-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathuglify.js
1 lines (1 loc) · 341 KB
/
uglify.js
1
!function(c){"use strict";function o(e){return e.split("")}function Be(e,n){return 0<=n.indexOf(e)}function ce(e,n){for(var t=n.length;0<=--t;)if(e(n[t]))return n[t]}function a(e){Object.defineProperty(e.prototype,"stack",{get:function(){var e=new Error(this.message);e.name=this.name;try{throw e}catch(e){return e.stack}}})}function u(e,n){this.message=e,this.defs=n}function ue(e,n,t){if(t)for(var i in e)if(le(e,i)&&!le(n,i))throw new u("`"+i+"` is not a supported option",n);for(var i in e)le(e,i)&&(n[i]=e[i]);return n}function X(){}function _e(){return!1}function B(){return!0}function l(){return this}function p(){return null}((u.prototype=Object.create(Error.prototype)).constructor=u).prototype.name="DefaultsError",a(u);h.is_op=function(e){return e===d||e instanceof v},h.splice=function(e){return new v(e)},d=h.skip={};var d,Ue=h;function h(e,n){for(var t=[],i=0;i<e.length;i++){var r=n(e[i],i);r!==d&&(r instanceof v?t.push.apply(t,r.v):t.push(r))}return t}function v(e){this.v=e}function K(e,n){if(e.indexOf(n)<0)return e.push(n)}function m(e,t){return e.replace(/\{([^{}]+)\}/g,function(e,n){n=t[n];return n instanceof ye?n.print_to_string():n})}function T(e,n){n=e.indexOf(n);0<=n&&e.splice(n,1)}function L(e){Array.isArray(e)||(e=e.split(" "));var n=Object.create(null);return e.forEach(function(e){n[e]=!0}),n}function ge(e,n){for(var t=e.length;0<=--t;)if(!n(e[t],t))return!1;return!0}function be(){this.values=Object.create(null)}function le(e,n){return Object.prototype.hasOwnProperty.call(e,n)}function x(e,n,t){for(var i,r=e.parent(-1),o=0;i=e.parent(o++);r=i){if(cn(i))return n&&i.value===r;if(i instanceof Ce){if(i.left===r)continue}else if("Call"==i.TYPE){if(i.expression===r)continue}else if(i instanceof Me){if(i.condition===r)continue}else{if(i instanceof Vn)return t;if(i instanceof $e){if(i.expression===r)continue}else if(i instanceof Oe){if(i.expressions[0]===r)continue}else{if(i instanceof we)return!0;if(i instanceof qt){if(i.tag===r)continue}else if(i instanceof nt&&i.expression===r)continue}}return!1}}function _(i,e){if(31<e.length)throw new Error("Too many properties: "+e.length+"\n"+e.join(", "));e.forEach(function(e,n){var t=1<<n;Object.defineProperty(i.prototype,e,{get:function(){return!!(this._bits&t)},set:function(e){e?this._bits|=t:this._bits&=~t}})})}function e(e,n,t,i){void 0===i&&(i=ye);var r,o=n=n?n.split(/\s+/):[],a=(i&&i.PROPS&&(n=n.concat(i.PROPS)),["return function AST_",e,"(props){","this._bits=0;","if(props){"]),s=(n.forEach(function(e){a.push("this.",e,"=props.",e,";")}),a.push("}"),Object.create(i&&i.prototype)),f=((t.initialize||s.initialize)&&a.push("this.initialize();"),a.push("};"),new Function(a.join(""))());for(r in f.prototype=s,(f.prototype.CTOR=f).prototype.TYPE=f.TYPE=e,i&&(f.BASE=i).SUBCLASSES.push(f),f.DEFMETHOD=function(e,n){this.prototype[e]=n},f.PROPS=n,f.SELF_PROPS=o,f.SUBCLASSES=[],t)le(t,r)&&(/^\$/.test(r)?f[r.substr(1)]=t[r]:f.DEFMETHOD(r,t[r]));return void 0!==c&&(c["AST_"+e]=f),f}be.prototype={set:function(e,n){return"__proto__"==e?this.proto_value=n:this.values[e]=n,this},add:function(e,n){var t=this.get(e);return t?t.push(n):this.set(e,[n]),this},get:function(e){return"__proto__"==e?this.proto_value:this.values[e]},del:function(e){return"__proto__"==e?delete this.proto_value:delete this.values[e],this},has:function(e){return"__proto__"==e?"proto_value"in this:e in this.values},all:function(e){for(var n in this.values)if(!e(this.values[n],n))return!1;return!("proto_value"in this&&!e(this.proto_value,"__proto__"))},each:function(e){for(var n in this.values)e(this.values[n],n);"proto_value"in this&&e(this.proto_value,"__proto__")},size:function(){return Object.keys(this.values).length+("proto_value"in this)},map:function(e){var n,t=[];for(n in this.values)t.push(e(this.values[n],n));return"proto_value"in this&&t.push(e(this.proto_value,"__proto__")),t},clone:function(){var t=new be;return this.each(function(e,n){t.set(n,e)}),t},toObject:function(){var t={};return this.each(function(e,n){t["$"+n]=e}),t}},be.fromObject=function(e){var n,t=new be;for(n in e)le(e,n)&&t.set(n.slice(1),e[n]);return t};var U=e("Token","type value line col pos endline endcol endpos nlb comments_before comments_after file raw",{},null),ye=e("Node","start end",{_clone:function(e){var n;return e?(n=this.clone()).transform(new Ht(function(e){if(e!==n)return e.clone(!0)})):new this.CTOR(this)},clone:function(e){return this._clone(e)},$documentation:"Base class of all AST nodes",$propdoc:{start:"[AST_Token] The first token of this node",end:"[AST_Token] The last token of this node"},walk:function(e){e.visit(this)},_validate:function(){if("Node"==this.TYPE)throw new Error("should not instantiate AST_Node")},validate:function(){for(var e=this.CTOR;e.prototype._validate.call(this),e=e.BASE;);},validate_ast:function(){var n={};this.walk(new Ye(function(e){if(e.validate_visited===n)throw new Error(m("cannot reuse {type} from [{file}:{line},{col}]",{type:"AST_"+e.TYPE,file:e.start.file,line:e.start.line,col:e.start.col}));e.validate_visited=n}))}},null),g=(_(ye,["_optimized","_squeezed","call_only","collapse_scanning","defined","evaluating","falsy","in_arg","in_bool","is_undefined","inlined","length_read","nested","new","optional","private","pure","redundant","static","terminal","truthy","uses_eval","uses_with"]),(ye.log_function=function(n,e){var t;function i(e){t[e]||(t[e]=!0,n(e))}"function"!=typeof n?ye.info=ye.warn=X:(t=Object.create(null),ye.info=e?function(e,n){i("INFO: "+m(e,n))}:X,ye.warn=function(e,n){i("WARN: "+m(e,n))})})(),[]),V=(ye.enable_validation=function(){ye.disable_validation(),function e(n){var t;n.SUBCLASSES.forEach(e),le(n.prototype,"transform")&&(t=n.prototype.transform,n.prototype.transform=function(e,n){e=t.call(this,e,n);if(e instanceof ye)e.validate();else if(!(null===e||n&&Ue.is_op(e)))throw new Error("invalid transformed value: "+e);return e},g.push(function(){n.prototype.transform=t}))}(this)},ye.disable_validation=function(){for(var e;e=g.pop();)e()},e("Statement",null,{$documentation:"Base class of all statements",_validate:function(){if("Statement"==this.TYPE)throw new Error("should not instantiate AST_Statement")}})),Ve=e("Debugger",null,{$documentation:"Represents a debugger statement"},V),pe=e("Directive","quote value",{$documentation:'Represents a directive, like "use strict";',$propdoc:{quote:"[string?] the original quote character",value:"[string] The value of this directive as a plain string (it's not an AST_String!)"},_validate:function(){if(null!=this.quote){if("string"!=typeof this.quote)throw new Error("quote must be string");if(!/^["']$/.test(this.quote))throw new Error("invalid quote: "+this.quote)}if("string"!=typeof this.value)throw new Error("value must be string")}},V),We=e("EmptyStatement",null,{$documentation:"The empty statement (empty block or simply a semicolon)"},V);function Ge(e){return e instanceof V&&!(e instanceof kn)&&!(e instanceof fn)}function b(e,n,t,i,r){if(t=t?"contain":"be",!(e instanceof ye))throw new Error(n+" must "+t+" AST_Node");if(e instanceof Ae)throw new Error(n+" cannot "+t+" AST_DefaultValue");if(e instanceof je)throw new Error(n+" cannot "+t+" AST_Destructured");if(e instanceof Pt&&!r)throw new Error(n+" cannot "+t+" AST_Hole");if(e instanceof qe&&!i)throw new Error(n+" cannot "+t+" AST_Spread");if(Ge(e))throw new Error(n+" cannot "+t+" AST_Statement");if(e instanceof ht)throw new Error(n+" cannot "+t+" AST_SymbolDeclaration")}function y(e,n){b(e[n],n)}var we=e("SimpleStatement","body",{$documentation:"A statement consisting of an expression, i.e. a = 1 + 2",$propdoc:{body:"[AST_Node] an expression node (should not be instanceof AST_Statement)"},walk:function(e){var n=this;e.visit(n,function(){n.body.walk(e)})},_validate:function(){y(this,"body")}},V),Je=e("BlockScope","_var_names enclosed functions make_def parent_scope variables",{$documentation:"Base class for all statements introducing a lexical scope",$propdoc:{enclosed:"[SymbolDef*/S] a list of all symbol definitions that are accessed from this scope or any subscopes",functions:"[Dictionary/S] like `variables`, but only lists function declarations",parent_scope:"[AST_Scope?/S] link to the parent scope",variables:"[Dictionary/S] a map of name ---\x3e SymbolDef for all variables/functions defined in this scope"},clone:function(e){e=this._clone(e);return this.enclosed&&(e.enclosed=this.enclosed.slice()),this.functions&&(e.functions=this.functions.clone()),this.variables&&(e.variables=this.variables.clone()),e},pinned:function(){return this.resolve().pinned()},resolve:function(){return this.parent_scope.resolve()},_validate:function(){if("BlockScope"==this.TYPE)throw new Error("should not instantiate AST_BlockScope");if(null!=this.parent_scope){if(!(this.parent_scope instanceof Je))throw new Error("parent_scope must be AST_BlockScope");if(!(this.resolve()instanceof ke))throw new Error("must be contained within AST_Scope")}}},V);function A(e,n){e.body.forEach(function(e){e.walk(n)})}var Xe=e("Block","body",{$documentation:"A body of statements (usually braced)",$propdoc:{body:"[AST_Statement*] an array of statements"},walk:function(e){var n=this;e.visit(n,function(){A(n,e)})},_validate:function(){if("Block"==this.TYPE)throw new Error("should not instantiate AST_Block");this.body.forEach(function(e){if(!Ge(e))throw new Error("body must contain AST_Statement")})}},Je),xe=e("BlockStatement",null,{$documentation:"A block statement"},Xe),w=e("StatementWithBody","body",{$documentation:"Base class for all statements that contain one nested body: `For`, `ForIn`, `Do`, `While`, `With`",$propdoc:{body:"[AST_Statement] the body; this should always be present, even if it's an AST_EmptyStatement"},_validate:function(){if("StatementWithBody"==this.TYPE)throw new Error("should not instantiate AST_StatementWithBody");if(!Ge(this.body))throw new Error("body must be AST_Statement")}},Je),de=e("LabeledStatement","label",{$documentation:"Statement with a label",$propdoc:{label:"[AST_Label] a label definition"},walk:function(e){var n=this;e.visit(n,function(){n.label.walk(e),n.body.walk(e)})},clone:function(e){var n,t,i=this._clone(e);return e&&(n=i.label,t=this.label,i.walk(new Ye(function(e){return e instanceof zn?e.label&&e.label.thedef===t?((e.label.thedef=n).references.push(e),!0):void 0:e instanceof ke||void 0}))),i},_validate:function(){if(!(this.label instanceof Et))throw new Error("label must be AST_Label")}},w),Ke=e("IterationStatement",null,{$documentation:"Internal class. All loops inherit from it.",_validate:function(){if("IterationStatement"==this.TYPE)throw new Error("should not instantiate AST_IterationStatement")}},w),Qe=e("DWLoop","condition",{$documentation:"Base class for do/while statements",$propdoc:{condition:"[AST_Node] the loop condition. Should not be instanceof AST_Statement"},_validate:function(){if("DWLoop"==this.TYPE)throw new Error("should not instantiate AST_DWLoop");y(this,"condition")}},Ke),Ze=e("Do",null,{$documentation:"A `do` statement",walk:function(e){var n=this;e.visit(n,function(){n.body.walk(e),n.condition.walk(e)})}},Qe),en=e("While",null,{$documentation:"A `while` statement",walk:function(e){var n=this;e.visit(n,function(){n.condition.walk(e),n.body.walk(e)})}},Qe),nn=e("For","init condition step",{$documentation:"A `for` statement",$propdoc:{init:"[AST_Node?] the `for` initialization code, or null if empty",condition:"[AST_Node?] the `for` termination clause, or null if empty",step:"[AST_Node?] the `for` update clause, or null if empty"},walk:function(e){var n=this;e.visit(n,function(){n.init&&n.init.walk(e),n.condition&&n.condition.walk(e),n.step&&n.step.walk(e),n.body.walk(e)})},_validate:function(){if(null!=this.init){if(!(this.init instanceof ye))throw new Error("init must be AST_Node");if(Ge(this.init)&&!(this.init instanceof Yn))throw new Error("init cannot be AST_Statement")}null!=this.condition&&y(this,"condition"),null!=this.step&&y(this,"step")}},Ke),tn=e("ForEnumeration","init object",{$documentation:"Base class for enumeration loops, i.e. `for ... in`, `for ... of` & `for await ... of`",$propdoc:{init:"[AST_Node] the assignment target during iteration",object:"[AST_Node] the object to iterate over"},walk:function(e){var n=this;e.visit(n,function(){n.init.walk(e),n.object.walk(e),n.body.walk(e)})},_validate:function(){if("ForEnumeration"==this.TYPE)throw new Error("should not instantiate AST_ForEnumeration");if(this.init instanceof Yn){if(1!=this.init.definitions.length)throw new Error("init must have single declaration")}else S(this.init,function(e){if(!(e instanceof $e||e instanceof Ie))throw new Error("init must be assignable: "+e.TYPE)});y(this,"object")}},Ke),rn=e("ForIn",null,{$documentation:"A `for ... in` statement"},tn),he=e("ForOf",null,{$documentation:"A `for ... of` statement"},tn),ve=e("ForAwaitOf",null,{$documentation:"A `for await ... of` statement"},he),on=e("With","expression",{$documentation:"A `with` statement",$propdoc:{expression:"[AST_Node] the `with` expression"},walk:function(e){var n=this;e.visit(n,function(){n.expression.walk(e),n.body.walk(e)})},_validate:function(){y(this,"expression")}},w),ke=e("Scope","fn_defs may_call_this uses_eval uses_with",{$documentation:"Base class for all statements introducing a lexical scope",$propdoc:{uses_eval:"[boolean/S] tells whether this scope contains a direct call to the global `eval`",uses_with:"[boolean/S] tells whether this scope uses the `with` statement"},pinned:function(){return this.uses_eval||this.uses_with},resolve:l,_validate:function(){if("Scope"==this.TYPE)throw new Error("should not instantiate AST_Scope")}},Xe),an=e("Toplevel","globals",{$documentation:"The toplevel scope",$propdoc:{globals:"[Dictionary/S] a map of name ---\x3e SymbolDef for all undeclared names"},wrap:function(e){var n=this.body;return Qt(["(function(exports){'$ORIG';})(typeof ",e,"=='undefined'?(",e,"={}):",e,");"].join(""),{filename:"wrap="+JSON.stringify(e)}).transform(new Ht(function(e){if(e instanceof pe&&"$ORIG"==e.value)return Ue.splice(n)}))},enclose:function(e){var n=(e="string"!=typeof e?"":e).indexOf(":"),t=(n<0&&(n=e.length),this.body);return Qt(["(function(",e.slice(0,n),'){"$ORIG"})(',e.slice(n+1),")"].join(""),{filename:"enclose="+JSON.stringify(e)}).transform(new Ht(function(e){if(e instanceof pe&&"$ORIG"==e.value)return Ue.splice(t)}))}},ke),Ee=e("Lambda","argnames length_read rest safe_ids uses_arguments",{$documentation:"Base class for functions",$propdoc:{argnames:"[(AST_DefaultValue|AST_Destructured|AST_SymbolFunarg)*] array of function arguments and/or destructured literals",length_read:"[boolean/S] whether length property of this function is accessed",rest:"[(AST_Destructured|AST_SymbolFunarg)?] rest parameter, or null if absent",uses_arguments:"[boolean|number/S] whether this function accesses the arguments array"},each_argname:function(n){var t=new Ye(function(e){return e instanceof Ae?(e.name.walk(t),!0):e instanceof ot?(e.value.walk(t),!0):void(e instanceof Ne&&n(e))});this.argnames.forEach(function(e){e.walk(t)}),this.rest&&this.rest.walk(t)},walk:function(n){var e=this;n.visit(e,function(){e.name&&e.name.walk(n),e.argnames.forEach(function(e){e.walk(n)}),e.rest&&e.rest.walk(n),A(e,n)})},_validate:function(){if("Lambda"==this.TYPE)throw new Error("should not instantiate AST_Lambda");this.argnames.forEach(function(e){S(e,function(e){if(!(e instanceof Ne))throw new Error("argnames must be AST_SymbolFunarg[]")},!0)}),null!=this.rest&&S(this.rest,function(e){if(!(e instanceof Ne))throw new Error("rest must be AST_SymbolFunarg")})}},ke),sn=e("Accessor",null,{$documentation:"A getter/setter function",_validate:function(){if(null!=this.name)throw new Error("name must be null")}},Ee),fn=e("LambdaExpression","inlined",{$documentation:"Base class for function expressions",$propdoc:{inlined:"[boolean/S] whether this function has been inlined"},_validate:function(){if("LambdaExpression"==this.TYPE)throw new Error("should not instantiate AST_LambdaExpression")}},Ee);function cn(e){return e instanceof me||e instanceof pn}function un(e){return e instanceof pn||e instanceof _n||e instanceof dn||e instanceof gn||e instanceof hn}function ln(e){return e instanceof gn||e instanceof hn||e instanceof yn||e instanceof mn}function D(e,n){cn(e)&&e.value?e.value.walk(n):A(e,n)}var me=e("Arrow","value",{$documentation:"An arrow function expression",$propdoc:{value:"[AST_Node?] simple return expression, or null if using function body."},walk:function(n){var e=this;n.visit(e,function(){e.argnames.forEach(function(e){e.walk(n)}),e.rest&&e.rest.walk(n),e.value?e.value.walk(n):A(e,n)})},_validate:function(){if(null!=this.name)throw new Error("name must be null");if(this.uses_arguments)throw new Error("uses_arguments must be false");if(null!=this.value&&(y(this,"value"),this.body.length))throw new Error("body must be empty if value exists")}},fn),pn=e("AsyncArrow","value",{$documentation:"An asynchronous arrow function expression",$propdoc:{value:"[AST_Node?] simple return expression, or null if using function body."},walk:function(n){var e=this;n.visit(e,function(){e.argnames.forEach(function(e){e.walk(n)}),e.rest&&e.rest.walk(n),e.value?e.value.walk(n):A(e,n)})},_validate:function(){if(null!=this.name)throw new Error("name must be null");if(this.uses_arguments)throw new Error("uses_arguments must be false");if(null!=this.value&&(y(this,"value"),this.body.length))throw new Error("body must be empty if value exists")}},fn),dn=e("AsyncFunction","name",{$documentation:"An asynchronous function expression",$propdoc:{name:"[AST_SymbolLambda?] the name of this function, or null if not specified"},_validate:function(){if(null!=this.name&&!(this.name instanceof yt))throw new Error("name must be AST_SymbolLambda")}},fn),hn=e("AsyncGeneratorFunction","name",{$documentation:"An asynchronous generator function expression",$propdoc:{name:"[AST_SymbolLambda?] the name of this function, or null if not specified"},_validate:function(){if(null!=this.name&&!(this.name instanceof yt))throw new Error("name must be AST_SymbolLambda")}},fn),vn=e("Function","name",{$documentation:"A function expression",$propdoc:{name:"[AST_SymbolLambda?] the name of this function, or null if not specified"},_validate:function(){if(null!=this.name&&!(this.name instanceof yt))throw new Error("name must be AST_SymbolLambda")}},fn),mn=e("GeneratorFunction","name",{$documentation:"A generator function expression",$propdoc:{name:"[AST_SymbolLambda?] the name of this function, or null if not specified"},_validate:function(){if(null!=this.name&&!(this.name instanceof yt))throw new Error("name must be AST_SymbolLambda")}},fn),Q=e("LambdaDefinition","inlined name",{$documentation:"Base class for function definitions",$propdoc:{inlined:"[boolean/S] whether this function has been inlined",name:"[AST_SymbolDefun] the name of this function"},_validate:function(){if("LambdaDefinition"==this.TYPE)throw new Error("should not instantiate AST_LambdaDefinition");if(!(this.name instanceof bt))throw new Error("name must be AST_SymbolDefun")}},Ee),_n=e("AsyncDefun",null,{$documentation:"An asynchronous function definition"},Q),gn=e("AsyncGeneratorDefun",null,{$documentation:"An asynchronous generator function definition"},Q),bn=e("Defun",null,{$documentation:"A function definition"},Q),yn=e("GeneratorDefun",null,{$documentation:"A generator function definition"},Q),wn=e("Class","extends name properties",{$documentation:"Base class for class literals",$propdoc:{extends:"[AST_Node?] the super class, or null if not specified",properties:"[AST_ClassProperty*] array of class properties"},walk:function(n){var e=this;n.visit(e,function(){e.name&&e.name.walk(n),e.extends&&e.extends.walk(n),e.properties.forEach(function(e){e.walk(n)})})},_validate:function(){if("Class"==this.TYPE)throw new Error("should not instantiate AST_Class");null!=this.extends&&y(this,"extends"),this.properties.forEach(function(e){if(!(e instanceof En))throw new Error("properties must contain AST_ClassProperty")})}},Je),xn=e("DefClass",null,{$documentation:"A class definition",$propdoc:{name:"[AST_SymbolDefClass] the name of this class"},resolve:function(e){return e?this:this.parent_scope.resolve()},_validate:function(){if(!(this.name instanceof wt))throw new Error("name must be AST_SymbolDefClass")}},wn),kn=e("ClassExpression",null,{$documentation:"A class expression",$propdoc:{name:"[AST_SymbolClass?] the name of this class, or null if not specified"},_validate:function(){if(null!=this.name&&!(this.name instanceof xt))throw new Error("name must be AST_SymbolClass")}},wn),En=e("ClassProperty","key private static value",{$documentation:"Base class for `class` properties",$propdoc:{key:"[string|AST_Node] property name (AST_Node for computed property)",private:"[boolean] whether this is a private property",static:"[boolean] whether this is a static property",value:"[AST_Node?] property value (AST_Accessor for getters/setters, AST_LambdaExpression for methods, null if not specified for fields)"},walk:function(e){var n=this;e.visit(n,function(){n.key instanceof ye&&n.key.walk(e),n.value&&n.value.walk(e)})},_validate:function(){if("ClassProperty"==this.TYPE)throw new Error("should not instantiate AST_ClassProperty");if("string"!=typeof this.key){if(!(this.key instanceof ye))throw new Error("key must be string or AST_Node");y(this,"key")}if(null!=this.value&&!(this.value instanceof ye))throw new Error("value must be AST_Node")}}),Sn=e("ClassField",null,{$documentation:"A `class` field",_validate:function(){null!=this.value&&y(this,"value")}},En),Tn=e("ClassGetter",null,{$documentation:"A `class` getter",_validate:function(){if(!(this.value instanceof sn))throw new Error("value must be AST_Accessor")}},En),An=e("ClassSetter",null,{$documentation:"A `class` setter",_validate:function(){if(!(this.value instanceof sn))throw new Error("value must be AST_Accessor")}},En),Dn=e("ClassMethod",null,{$documentation:"A `class` method",_validate:function(){if(!(this.value instanceof fn))throw new Error("value must be AST_LambdaExpression");if(cn(this.value))throw new Error("value cannot be AST_Arrow or AST_AsyncArrow");if(null!=this.value.name)throw new Error("name of class method's lambda must be null")}},En),O=e("Jump",null,{$documentation:"Base class for “jumps” (for now that's `return`, `throw`, `break` and `continue`)",_validate:function(){if("Jump"==this.TYPE)throw new Error("should not instantiate AST_Jump")}},V),On=e("Exit","value",{$documentation:"Base class for “exits” (`return` and `throw`)",$propdoc:{value:"[AST_Node?] the value returned or thrown by this statement; could be null for AST_Return"},walk:function(e){var n=this;e.visit(n,function(){n.value&&n.value.walk(e)})},_validate:function(){if("Exit"==this.TYPE)throw new Error("should not instantiate AST_Exit")}},O),$n=e("Return",null,{$documentation:"A `return` statement",_validate:function(){null!=this.value&&y(this,"value")}},On),qn=e("Throw",null,{$documentation:"A `throw` statement",_validate:function(){y(this,"value")}},On),zn=e("LoopControl","label",{$documentation:"Base class for loop control statements (`break` and `continue`)",$propdoc:{label:"[AST_LabelRef?] the label, or null if none"},walk:function(e){var n=this;e.visit(n,function(){n.label&&n.label.walk(e)})},_validate:function(){if("LoopControl"==this.TYPE)throw new Error("should not instantiate AST_LoopControl");if(null!=this.label&&!(this.label instanceof Tt))throw new Error("label must be AST_LabelRef")}},O),Cn=e("Break",null,{$documentation:"A `break` statement"},zn),Mn=e("Continue",null,{$documentation:"A `continue` statement"},zn),Se=e("If","condition alternative",{$documentation:"A `if` statement",$propdoc:{condition:"[AST_Node] the `if` condition",alternative:"[AST_Statement?] the `else` part, or null if not present"},walk:function(e){var n=this;e.visit(n,function(){n.condition.walk(e),n.body.walk(e),n.alternative&&n.alternative.walk(e)})},_validate:function(){if(y(this,"condition"),null!=this.alternative&&!Ge(this.alternative))throw new Error("alternative must be AST_Statement")}},w),Fn=e("Switch","expression",{$documentation:"A `switch` statement",$propdoc:{expression:"[AST_Node] the `switch` “discriminant”"},walk:function(e){var n=this;e.visit(n,function(){n.expression.walk(e),A(n,e)})},_validate:function(){y(this,"expression"),this.body.forEach(function(e){if(!(e instanceof k))throw new Error("body must be AST_SwitchBranch[]")})}},Xe),k=e("SwitchBranch",null,{$documentation:"Base class for `switch` branches",_validate:function(){if("SwitchBranch"==this.TYPE)throw new Error("should not instantiate AST_SwitchBranch")}},Xe),Pn=e("Default",null,{$documentation:"A `default` switch branch"},k),jn=e("Case","expression",{$documentation:"A `case` switch branch",$propdoc:{expression:"[AST_Node] the `case` expression"},walk:function(e){var n=this;e.visit(n,function(){n.expression.walk(e),A(n,e)})},_validate:function(){y(this,"expression")}},k),Nn=e("Try","bcatch bfinally",{$documentation:"A `try` statement",$propdoc:{bcatch:"[AST_Catch?] the catch block, or null if not present",bfinally:"[AST_Finally?] the finally block, or null if not present"},walk:function(e){var n=this;e.visit(n,function(){A(n,e),n.bcatch&&n.bcatch.walk(e),n.bfinally&&n.bfinally.walk(e)})},_validate:function(){if(null!=this.bcatch&&!(this.bcatch instanceof In))throw new Error("bcatch must be AST_Catch");if(null!=this.bfinally&&!(this.bfinally instanceof Hn))throw new Error("bfinally must be AST_Finally")}},Xe),In=e("Catch","argname",{$documentation:"A `catch` node; only makes sense as part of a `try` statement",$propdoc:{argname:"[(AST_Destructured|AST_SymbolCatch)?] symbol for the exception, or null if not present"},walk:function(e){var n=this;e.visit(n,function(){n.argname&&n.argname.walk(e),A(n,e)})},_validate:function(){null!=this.argname&&S(this.argname,function(e){if(!(e instanceof kt))throw new Error("argname must be AST_SymbolCatch")})}},Xe),Hn=e("Finally",null,{$documentation:"A `finally` node; only makes sense as part of a `try` statement"},Xe),Yn=e("Definitions","definitions",{$documentation:"Base class for `var` nodes (variable declarations/initializations)",$propdoc:{definitions:"[AST_VarDef*] array of variable definitions"},walk:function(n){var e=this;n.visit(e,function(){e.definitions.forEach(function(e){e.walk(n)})})},_validate:function(){if("Definitions"==this.TYPE)throw new Error("should not instantiate AST_Definitions");if(this.definitions.length<1)throw new Error("must have at least one definition")}},V),Rn=e("Const",null,{$documentation:"A `const` statement",_validate:function(){this.definitions.forEach(function(e){if(!(e instanceof Te))throw new Error("definitions must be AST_VarDef[]");S(e.name,function(e){if(!(e instanceof vt))throw new Error("name must be AST_SymbolConst")})})}},Yn),Ln=e("Let",null,{$documentation:"A `let` statement",_validate:function(){this.definitions.forEach(function(e){if(!(e instanceof Te))throw new Error("definitions must be AST_VarDef[]");S(e.name,function(e){if(!(e instanceof _t))throw new Error("name must be AST_SymbolLet")})})}},Yn),Bn=e("Var",null,{$documentation:"A `var` statement",_validate:function(){this.definitions.forEach(function(e){if(!(e instanceof Te))throw new Error("definitions must be AST_VarDef[]");S(e.name,function(e){if(!(e instanceof gt))throw new Error("name must be AST_SymbolVar")})})}},Yn),Te=e("VarDef","name value",{$documentation:"A variable declaration; only appears in a AST_Definitions node",$propdoc:{name:"[AST_Destructured|AST_SymbolVar] name of the variable",value:"[AST_Node?] initializer, or null of there's no initializer"},walk:function(e){var n=this;e.visit(n,function(){n.name.walk(e),n.value&&n.value.walk(e)})},_validate:function(){null!=this.value&&y(this,"value")}}),Un=e("ExportDeclaration","body",{$documentation:"An `export` statement",$propdoc:{body:"[AST_DefClass|AST_Definitions|AST_LambdaDefinition] the statement to export"},walk:function(e){var n=this;e.visit(n,function(){n.body.walk(e)})},_validate:function(){if(!(this.body instanceof xn||this.body instanceof Yn||this.body instanceof Q))throw new Error("body must be AST_DefClass, AST_Definitions or AST_LambdaDefinition")}},V),Vn=e("ExportDefault","body",{$documentation:"An `export default` statement",$propdoc:{body:"[AST_Node] the default export"},walk:function(e){var n=this;e.visit(n,function(){n.body.walk(e)})},_validate:function(){this.body instanceof xn||this.body instanceof Q||y(this,"body")}},V),Wn=e("ExportForeign","aliases keys path quote",{$documentation:"An `export ... from '...'` statement",$propdoc:{aliases:"[string*] array of aliases to export",keys:"[string*] array of keys to import",path:"[string] the path to import module",quote:"[string?] the original quote character"},_validate:function(){if(this.aliases.length!=this.keys.length)throw new Error("aliases:key length mismatch: "+this.aliases.length+" != "+this.keys.length);if(this.aliases.forEach(function(e){if("string"!=typeof e)throw new Error("aliases must contain string")}),this.keys.forEach(function(e){if("string"!=typeof e)throw new Error("keys must contain string")}),"string"!=typeof this.path)throw new Error("path must be string");if(null!=this.quote){if("string"!=typeof this.quote)throw new Error("quote must be string");if(!/^["']$/.test(this.quote))throw new Error("invalid quote: "+this.quote)}}},V),Gn=e("ExportReferences","properties",{$documentation:"An `export { ... }` statement",$propdoc:{properties:"[AST_SymbolExport*] array of aliases to export"},walk:function(n){var e=this;n.visit(e,function(){e.properties.forEach(function(e){e.walk(n)})})},_validate:function(){this.properties.forEach(function(e){if(!(e instanceof St))throw new Error("properties must contain AST_SymbolExport")})}},V),Jn=e("Import","all default path properties quote",{$documentation:"An `import` statement",$propdoc:{all:"[AST_SymbolImport?] the imported namespace, or null if not specified",default:"[AST_SymbolImport?] the alias for default `export`, or null if not specified",path:"[string] the path to import module",properties:"[(AST_SymbolImport*)?] array of aliases, or null if not specified",quote:"[string?] the original quote character"},walk:function(n){var e=this;n.visit(e,function(){e.all&&e.all.walk(n),e.default&&e.default.walk(n),e.properties&&e.properties.forEach(function(e){e.walk(n)})})},_validate:function(){if(null!=this.all){if(!(this.all instanceof mt))throw new Error("all must be AST_SymbolImport");if(null!=this.properties)throw new Error("cannot import both * and {} in the same statement")}if(null!=this.default){if(!(this.default instanceof mt))throw new Error("default must be AST_SymbolImport");if(""!==this.default.key)throw new Error("invalid default key: "+this.default.key)}if("string"!=typeof this.path)throw new Error("path must be string");if(null!=this.properties&&this.properties.forEach(function(e){if(!(e instanceof mt))throw new Error("properties must contain AST_SymbolImport")}),null!=this.quote){if("string"!=typeof this.quote)throw new Error("quote must be string");if(!/^["']$/.test(this.quote))throw new Error("invalid quote: "+this.quote)}}},V),Ae=e("DefaultValue","name value",{$documentation:"A default value declaration",$propdoc:{name:"[AST_Destructured|AST_SymbolDeclaration] name of the variable",value:"[AST_Node] value to assign if variable is `undefined`"},walk:function(e){var n=this;e.visit(n,function(){n.name.walk(e),n.value.walk(e)})},_validate:function(){y(this,"value")}});function E(e,n,t,i){e[n].forEach(function(e){b(e,n,!0,t,i)})}var De=e("Call","args expression optional pure terminal",{$documentation:"A function call expression",$propdoc:{args:"[AST_Node*] array of arguments",expression:"[AST_Node] expression to invoke as function",optional:"[boolean] whether the expression is optional chaining",pure:"[boolean/S] marker for side-effect-free call expression",terminal:"[boolean] whether the chain has ended"},walk:function(n){var e=this;n.visit(e,function(){e.expression.walk(n),e.args.forEach(function(e){e.walk(n)})})},_validate:function(){y(this,"expression"),E(this,"args",!0)}}),Xn=e("New",null,{$documentation:"An object instantiation. Derives from a function call since it has exactly the same properties",_validate:function(){if(this.optional)throw new Error("optional must be false");if(this.terminal)throw new Error("terminal must be false")}},De),Oe=e("Sequence","expressions",{$documentation:"A sequence expression (comma-separated expressions)",$propdoc:{expressions:"[AST_Node*] array of expressions (at least two)"},walk:function(n){var e=this;n.visit(e,function(){e.expressions.forEach(function(e){e.walk(n)})})},_validate:function(){if(this.expressions.length<2)throw new Error("expressions must contain multiple elements");E(this,"expressions")}});function Kn(e){for(;e instanceof $e;)e=e.expression;return e}var $e=e("PropAccess","expression optional property terminal",{$documentation:'Base class for property access expressions, i.e. `a.foo` or `a["foo"]`',$propdoc:{expression:"[AST_Node] the “container” expression",optional:"[boolean] whether the expression is optional chaining",property:"[AST_Node|string] the property to access. For AST_Dot this is always a plain string, while for AST_Sub it's an arbitrary AST_Node",terminal:"[boolean] whether the chain has ended"},get_property:function(){var e=this.property;return e instanceof $?e.value:e instanceof ze&&"void"==e.operator&&e.expression instanceof $?void 0:e},_validate:function(){if("PropAccess"==this.TYPE)throw new Error("should not instantiate AST_PropAccess");y(this,"expression")}}),Qn=e("Dot",null,{$documentation:"A dotted property access expression",walk:function(e){var n=this;e.visit(n,function(){n.expression.walk(e)})},_validate:function(){if("string"!=typeof this.property)throw new Error("property must be string")}},$e),Zn=e("Sub",null,{$documentation:'Index-style property access, i.e. `a["foo"]`',walk:function(e){var n=this;e.visit(n,function(){n.expression.walk(e),n.property.walk(e)})},_validate:function(){y(this,"property")}},$e),qe=e("Spread","expression",{$documentation:"Spread expression in array/object literals or function calls",$propdoc:{expression:"[AST_Node] expression to be expanded"},walk:function(e){var n=this;e.visit(n,function(){n.expression.walk(e)})},_validate:function(){y(this,"expression")}}),et=e("Unary","operator expression",{$documentation:"Base class for unary expressions",$propdoc:{operator:"[string] the operator",expression:"[AST_Node] expression that this unary operator applies to"},walk:function(e){var n=this;e.visit(n,function(){n.expression.walk(e)})},_validate:function(){if("Unary"==this.TYPE)throw new Error("should not instantiate AST_Unary");if("string"!=typeof this.operator)throw new Error("operator must be string");y(this,"expression")}}),ze=e("UnaryPrefix",null,{$documentation:"Unary prefix expression, i.e. `typeof i` or `++i`"},et),nt=e("UnaryPostfix",null,{$documentation:"Unary postfix expression, i.e. `i++`"},et),Ce=e("Binary","operator left right",{$documentation:"Binary expression, i.e. `a + b`",$propdoc:{left:"[AST_Node] left-hand side expression",operator:"[string] the operator",right:"[AST_Node] right-hand side expression"},walk:function(e){var n=this;e.visit(n,function(){n.left.walk(e),n.right.walk(e)})},_validate:function(){if(this instanceof Fe||y(this,"left"),"string"!=typeof this.operator)throw new Error("operator must be string");y(this,"right")}}),Me=e("Conditional","condition consequent alternative",{$documentation:"Conditional expression using the ternary operator, i.e. `a ? b : c`",$propdoc:{condition:"[AST_Node]",consequent:"[AST_Node]",alternative:"[AST_Node]"},walk:function(e){var n=this;e.visit(n,function(){n.condition.walk(e),n.consequent.walk(e),n.alternative.walk(e)})},_validate:function(){y(this,"condition"),y(this,"consequent"),y(this,"alternative")}}),Fe=e("Assign",null,{$documentation:"An assignment expression — `a = b + 5`",_validate:function(){if(this.operator.indexOf("=")<0)throw new Error('operator must contain "="');if(this.left instanceof je){if("="!=this.operator)throw new Error("invalid destructuring operator: "+this.operator);S(this.left,function(e){if(!(e instanceof $e||e instanceof Ie))throw new Error("left must be assignable: "+e.TYPE)})}else if(!(this.left instanceof jt||this.left instanceof z||this.left instanceof $e&&!this.left.optional||this.left instanceof Ie||this.left instanceof Ft))throw new Error("left must be assignable")}},Ce),tt=e("Await","expression",{$documentation:"An await expression",$propdoc:{expression:"[AST_Node] expression with Promise to resolve on"},walk:function(e){var n=this;e.visit(n,function(){n.expression.walk(e)})},_validate:function(){y(this,"expression")}}),it=e("Yield","expression nested",{$documentation:"A yield expression",$propdoc:{expression:"[AST_Node?] return value for iterator, or null if undefined",nested:"[boolean] whether to iterate over expression as generator"},walk:function(e){var n=this;e.visit(n,function(){n.expression&&n.expression.walk(e)})},_validate:function(){if(null!=this.expression)y(this,"expression");else if(this.nested)throw new Error("yield* must contain expression")}}),Pe=e("Array","elements",{$documentation:"An array literal",$propdoc:{elements:"[AST_Node*] array of elements"},walk:function(n){var e=this;n.visit(e,function(){e.elements.forEach(function(e){e.walk(n)})})},_validate:function(){E(this,"elements",!0,!0)}}),je=e("Destructured","rest",{$documentation:"Base class for destructured literal",$propdoc:{rest:"[(AST_Destructured|AST_SymbolDeclaration|AST_SymbolRef)?] rest parameter, or null if absent"},_validate:function(){if("Destructured"==this.TYPE)throw new Error("should not instantiate AST_Destructured")}});function S(e,n,t){if(e instanceof Ae&&t)return S(e.name,n);if(e instanceof je){if(null!=e.rest&&S(e.rest,n),e instanceof rt)return e.elements.forEach(function(e){e instanceof Pt||S(e,n,!0)});if(e instanceof at)return e.properties.forEach(function(e){S(e.value,n,!0)})}n(e)}var rt=e("DestructuredArray","elements",{$documentation:"A destructured array literal",$propdoc:{elements:"[(AST_DefaultValue|AST_Destructured|AST_SymbolDeclaration|AST_SymbolRef)*] array of elements"},walk:function(n){var e=this;n.visit(e,function(){e.elements.forEach(function(e){e.walk(n)}),e.rest&&e.rest.walk(n)})}},je),ot=e("DestructuredKeyVal","key value",{$documentation:"A key: value destructured property",$propdoc:{key:"[string|AST_Node] property name. For computed property this is an AST_Node.",value:"[AST_DefaultValue|AST_Destructured|AST_SymbolDeclaration|AST_SymbolRef] property value"},walk:function(e){var n=this;e.visit(n,function(){n.key instanceof ye&&n.key.walk(e),n.value.walk(e)})},_validate:function(){if("string"!=typeof this.key){if(!(this.key instanceof ye))throw new Error("key must be string or AST_Node");y(this,"key")}if(!(this.value instanceof ye))throw new Error("value must be AST_Node")}}),at=e("DestructuredObject","properties",{$documentation:"A destructured object literal",$propdoc:{properties:"[AST_DestructuredKeyVal*] array of properties"},walk:function(n){var e=this;n.visit(e,function(){e.properties.forEach(function(e){e.walk(n)}),e.rest&&e.rest.walk(n)})},_validate:function(){this.properties.forEach(function(e){if(!(e instanceof ot))throw new Error("properties must be AST_DestructuredKeyVal[]")})}},je),st=e("Object","properties",{$documentation:"An object literal",$propdoc:{properties:"[(AST_ObjectProperty|AST_Spread)*] array of properties"},walk:function(n){var e=this;n.visit(e,function(){e.properties.forEach(function(e){e.walk(n)})})},_validate:function(){this.properties.forEach(function(e){if(!(e instanceof ft||e instanceof qe))throw new Error("properties must contain AST_ObjectProperty and/or AST_Spread only")})}}),ft=e("ObjectProperty","key value",{$documentation:"Base class for literal object properties",$propdoc:{key:"[string|AST_Node] property name. For computed property this is an AST_Node.",value:"[AST_Node] property value. For getters and setters this is an AST_Accessor."},walk:function(e){var n=this;e.visit(n,function(){n.key instanceof ye&&n.key.walk(e),n.value.walk(e)})},_validate:function(){if("ObjectProperty"==this.TYPE)throw new Error("should not instantiate AST_ObjectProperty");if("string"!=typeof this.key){if(!(this.key instanceof ye))throw new Error("key must be string or AST_Node");y(this,"key")}if(!(this.value instanceof ye))throw new Error("value must be AST_Node")}}),ct=e("ObjectKeyVal",null,{$documentation:"A key: value object property",_validate:function(){y(this,"value")}},ft),ut=e("ObjectMethod",null,{$documentation:"A key(){} object property",_validate:function(){if(!(this.value instanceof fn))throw new Error("value must be AST_LambdaExpression");if(cn(this.value))throw new Error("value cannot be AST_Arrow or AST_AsyncArrow");if(null!=this.value.name)throw new Error("name of object method's lambda must be null")}},ct),lt=e("ObjectSetter",null,{$documentation:"An object setter property",_validate:function(){if(!(this.value instanceof sn))throw new Error("value must be AST_Accessor")}},ft),pt=e("ObjectGetter",null,{$documentation:"An object getter property",_validate:function(){if(!(this.value instanceof sn))throw new Error("value must be AST_Accessor")}},ft),dt=e("Symbol","scope name thedef",{$documentation:"Base class for all symbols",$propdoc:{name:"[string] name of this symbol",scope:"[AST_Scope/S] the current scope (not necessarily the definition scope)",thedef:"[SymbolDef/S] the definition of this symbol"},_validate:function(){if("Symbol"==this.TYPE)throw new Error("should not instantiate AST_Symbol");if("string"!=typeof this.name)throw new Error("name must be string")}}),ht=e("SymbolDeclaration","init",{$documentation:"A declaration symbol (symbol in var, function name or argument, symbol in catch)"},dt),vt=e("SymbolConst",null,{$documentation:"Symbol defining a constant"},ht),mt=e("SymbolImport","key",{$documentation:"Symbol defined by an `import` statement",$propdoc:{key:"[string] the original `export` name"},_validate:function(){if("string"!=typeof this.key)throw new Error("key must be string")}},vt),_t=e("SymbolLet",null,{$documentation:"Symbol defining a lexical-scoped variable"},ht),gt=e("SymbolVar",null,{$documentation:"Symbol defining a variable"},ht),Ne=e("SymbolFunarg","unused",{$documentation:"Symbol naming a function argument"},gt),bt=e("SymbolDefun",null,{$documentation:"Symbol defining a function"},ht),yt=e("SymbolLambda",null,{$documentation:"Symbol naming a function expression"},ht),wt=e("SymbolDefClass",null,{$documentation:"Symbol defining a class"},vt),xt=e("SymbolClass",null,{$documentation:"Symbol naming a class expression"},vt),kt=e("SymbolCatch",null,{$documentation:"Symbol naming the exception in catch"},ht),Et=e("Label","references",{$documentation:"Symbol naming a label (declaration)",$propdoc:{references:"[AST_LoopControl*] a list of nodes referring to this label"},initialize:function(){this.references=[],this.thedef=this}},dt),Ie=e("SymbolRef","fixed in_arg redef",{$documentation:"Reference to some symbol (not definition/declaration)"},dt),St=e("SymbolExport","alias",{$documentation:"Reference in an `export` statement",$propdoc:{alias:"[string] the `export` alias"},_validate:function(){if("string"!=typeof this.alias)throw new Error("alias must be string")}},Ie),Tt=e("LabelRef",null,{$documentation:"Reference to a label symbol"},dt),At=e("ObjectIdentity",null,{$documentation:"Base class for `super` & `this`",_validate:function(){if("ObjectIdentity"==this.TYPE)throw new Error("should not instantiate AST_ObjectIdentity")}},dt),Dt=e("Super",null,{$documentation:"The `super` symbol",_validate:function(){if("super"!==this.name)throw new Error('name must be "super"')}},At),Ot=e("This",null,{$documentation:"The `this` symbol",_validate:function(){if("This"==this.TYPE&&"this"!==this.name)throw new Error('name must be "this"')}},At),$t=e("NewTarget",null,{$documentation:"The `new.target` symbol",initialize:function(){this.name="new.target"},_validate:function(){if("new.target"!==this.name)throw new Error('name must be "new.target": '+this.name)}},Ot),qt=e("Template","expressions strings tag",{$documentation:"A template literal, i.e. tag`str1${expr1}...strN${exprN}strN+1`",$propdoc:{expressions:"[AST_Node*] the placeholder expressions",strings:"[string*] the raw text segments",tag:"[AST_Node] tag function, or null if absent"},walk:function(n){var e=this;n.visit(e,function(){e.tag&&e.tag.walk(n),e.expressions.forEach(function(e){e.walk(n)})})},_validate:function(){if(this.expressions.length+1!=this.strings.length)throw new Error("malformed template with "+this.expressions.length+" placeholder(s) but "+this.strings.length+" text segment(s)");E(this,"expressions"),this.strings.forEach(function(e){if("string"!=typeof e)throw new Error("strings must contain string")}),null!=this.tag&&y(this,"tag")}}),$=e("Constant",null,{$documentation:"Base class for all constants",_validate:function(){if("Constant"==this.TYPE)throw new Error("should not instantiate AST_Constant")}}),fe=e("String","quote value",{$documentation:"A string literal",$propdoc:{quote:"[string?] the original quote character",value:"[string] the contents of this string"},_validate:function(){if(null!=this.quote){if("string"!=typeof this.quote)throw new Error("quote must be string");if(!/^["']$/.test(this.quote))throw new Error("invalid quote: "+this.quote)}if("string"!=typeof this.value)throw new Error("value must be string")}},$),He=e("Number","value",{$documentation:"A number literal",$propdoc:{value:"[number] the numeric value"},_validate:function(){if("number"!=typeof this.value)throw new Error("value must be number");if(!isFinite(this.value))throw new Error("value must be finite");if(this.value<0)throw new Error("value cannot be negative")}},$),zt=e("BigInt","value",{$documentation:"A BigInt literal",$propdoc:{value:"[string] the numeric representation"},_validate:function(){if("string"!=typeof this.value)throw new Error("value must be string");if("-"==this.value[0])throw new Error("value cannot be negative")}},$),Ct=e("RegExp","value",{$documentation:"A regexp literal",$propdoc:{value:"[RegExp] the actual regexp"},_validate:function(){if(!(this.value instanceof RegExp))throw new Error("value must be RegExp")}},$),q=e("Atom",null,{$documentation:"Base class for atoms",_validate:function(){if("Atom"==this.TYPE)throw new Error("should not instantiate AST_Atom")}},$),Mt=e("Null",null,{$documentation:"The `null` atom",value:null},q),z=e("NaN",null,{$documentation:"The impossible value",value:NaN},q),Ft=e("Undefined",null,{$documentation:"The `undefined` value",value:void 0},q),Pt=e("Hole",null,{$documentation:"A hole in an array",value:void 0},q),jt=e("Infinity",null,{$documentation:"The `Infinity` value",value:1/0},q),C=e("Boolean",null,{$documentation:"Base class for booleans",_validate:function(){if("Boolean"==this.TYPE)throw new Error("should not instantiate AST_Boolean")}},q),Nt=e("False",null,{$documentation:"The `false` atom",value:!1},C),It=e("True",null,{$documentation:"The `true` atom",value:!0},C);function Ye(e){this.callback=e,this.directives=Object.create(null),this.stack=[]}function Ht(e,n){Ye.call(this),this.before=e,this.after=n}function M(e,n){return Ue(e,function(e){return e.transform(n,!0)})}function F(e,n){e.argnames=M(e.argnames,n),e.rest&&(e.rest=e.rest.transform(n)),e.value?e.value=e.value.transform(n):e.body=M(e.body,n)}Ye.prototype={visit:function(e,n){this.push(e),!this.callback(e,n||X)&&n&&n(),this.pop()},parent:function(e){return this.stack[this.stack.length-2-(e||0)]},push:function(e){e instanceof Ee?this.directives=Object.create(this.directives):e instanceof pe&&!this.directives[e.value]&&(this.directives[e.value]=e),this.stack.push(e)},pop:function(){this.stack.pop()instanceof Ee&&(this.directives=Object.getPrototypeOf(this.directives))},self:function(){return this.stack[this.stack.length-1]},find_parent:function(e){for(var n=this.stack,t=n.length-1;0<=--t;){var i=n[t];if(i instanceof e)return i}},has_directive:function(e){var n=this.directives[e];if(n)return n;var t=this.stack[this.stack.length-1];if(t instanceof ke)for(var i=0;i<t.body.length;++i){var r=t.body[i];if(!(r instanceof pe))break;if(r.value==e)return r}},loopcontrol_target:function(e){var n,t=this.stack;if(e.label){for(var i=t.length;0<=--i;)if((n=t[i])instanceof de&&n.label.name==e.label.name)return n.body}else for(i=t.length;0<=--i;)if((n=t[i])instanceof Ke||e instanceof Cn&&n instanceof Fn)return n},in_boolean_context:function(){for(var e,n=!0,t=0,i=this.self();e=this.parent(t++);i=e){if(e instanceof Ce)switch(e.operator){case"&&":case"||":e.left===i&&(n=!1);continue;default:return!1}if(!(e instanceof Me)){if(e instanceof Qe)return e.condition===i;if(e instanceof nn)return e.condition===i;if(e instanceof Se)return e.condition===i;if(e instanceof $n){if(e.in_bool)return!0;for(;e=this.parent(t++);)if(e instanceof Ee){if(e.name)return!1;if("Call"!=(e=this.parent(t++)).TYPE)return!1;break}}if(e instanceof Oe){if(e.tail_node()===i)continue;return!n||"d"}return e instanceof we?!n||"d":e instanceof ze&&"!"==e.operator}if(e.condition===i)return!0}}},Ht.prototype=new Ye,(n=function(e,i){e.DEFMETHOD("transform",function(e,n){var t;return e.push(this),void 0===(t=e.before?e.before(this,i,n):t)&&(i(t=this,e),e.after&&void 0!==(n=e.after(t,n))&&(t=n)),e.pop(),t})})(ye,X),n(de,function(e,n){e.label=e.label.transform(n),e.body=e.body.transform(n)}),n(we,function(e,n){e.body=e.body.transform(n)}),n(Xe,function(e,n){e.body=M(e.body,n)}),n(Ze,function(e,n){e.body=e.body.transform(n),e.condition=e.condition.transform(n)}),n(en,function(e,n){e.condition=e.condition.transform(n),e.body=e.body.transform(n)}),n(nn,function(e,n){e.init&&(e.init=e.init.transform(n)),e.condition&&(e.condition=e.condition.transform(n)),e.step&&(e.step=e.step.transform(n)),e.body=e.body.transform(n)}),n(tn,function(e,n){e.init=e.init.transform(n),e.object=e.object.transform(n),e.body=e.body.transform(n)}),n(on,function(e,n){e.expression=e.expression.transform(n),e.body=e.body.transform(n)}),n(On,function(e,n){e.value&&(e.value=e.value.transform(n))}),n(zn,function(e,n){e.label&&(e.label=e.label.transform(n))}),n(Se,function(e,n){e.condition=e.condition.transform(n),e.body=e.body.transform(n),e.alternative&&(e.alternative=e.alternative.transform(n))}),n(Fn,function(e,n){e.expression=e.expression.transform(n),e.body=M(e.body,n)}),n(jn,function(e,n){e.expression=e.expression.transform(n),e.body=M(e.body,n)}),n(Nn,function(e,n){e.body=M(e.body,n),e.bcatch&&(e.bcatch=e.bcatch.transform(n)),e.bfinally&&(e.bfinally=e.bfinally.transform(n))}),n(In,function(e,n){e.argname&&(e.argname=e.argname.transform(n)),e.body=M(e.body,n)}),n(Yn,function(e,n){e.definitions=M(e.definitions,n)}),n(Te,function(e,n){e.name=e.name.transform(n),e.value&&(e.value=e.value.transform(n))}),n(Ae,function(e,n){e.name=e.name.transform(n),e.value=e.value.transform(n)}),n(Ee,function(e,n){e.name&&(e.name=e.name.transform(n)),e.argnames=M(e.argnames,n),e.rest&&(e.rest=e.rest.transform(n)),e.body=M(e.body,n)}),n(me,F),n(pn,F),n(wn,function(e,n){e.name&&(e.name=e.name.transform(n)),e.extends&&(e.extends=e.extends.transform(n)),e.properties=M(e.properties,n)}),n(En,function(e,n){e.key instanceof ye&&(e.key=e.key.transform(n)),e.value&&(e.value=e.value.transform(n))}),n(De,function(e,n){e.expression=e.expression.transform(n),e.args=M(e.args,n)}),n(Oe,function(e,n){e.expressions=M(e.expressions,n)}),n(tt,function(e,n){e.expression=e.expression.transform(n)}),n(it,function(e,n){e.expression&&(e.expression=e.expression.transform(n))}),n(Qn,function(e,n){e.expression=e.expression.transform(n)}),n(Zn,function(e,n){e.expression=e.expression.transform(n),e.property=e.property.transform(n)}),n(qe,function(e,n){e.expression=e.expression.transform(n)}),n(et,function(e,n){e.expression=e.expression.transform(n)}),n(Ce,function(e,n){e.left=e.left.transform(n),e.right=e.right.transform(n)}),n(Me,function(e,n){e.condition=e.condition.transform(n),e.consequent=e.consequent.transform(n),e.alternative=e.alternative.transform(n)}),n(Pe,function(e,n){e.elements=M(e.elements,n)}),n(rt,function(e,n){e.elements=M(e.elements,n),e.rest&&(e.rest=e.rest.transform(n))}),n(ot,function(e,n){e.key instanceof ye&&(e.key=e.key.transform(n)),e.value=e.value.transform(n)}),n(at,function(e,n){e.properties=M(e.properties,n),e.rest&&(e.rest=e.rest.transform(n))}),n(st,function(e,n){e.properties=M(e.properties,n)}),n(ft,function(e,n){e.key instanceof ye&&(e.key=e.key.transform(n)),e.value=e.value.transform(n)}),n(Un,function(e,n){e.body=e.body.transform(n)}),n(Vn,function(e,n){e.body=e.body.transform(n)}),n(Gn,function(e,n){e.properties=M(e.properties,n)}),n(Jn,function(e,n){e.all&&(e.all=e.all.transform(n)),e.default&&(e.default=e.default.transform(n)),e.properties&&(e.properties=M(e.properties,n))}),n(qt,function(e,n){e.tag&&(e.tag=e.tag.transform(n)),e.expressions=M(e.expressions,n)});var P=["abstract async await boolean byte char double enum export final float goto implements import int interface let long native package private protected public short static super synchronized this throws transient volatile yield",N="false null true",Yt="break case catch class const continue debugger default delete do else extends finally for function if in instanceof new return switch throw try typeof var void while with"].join(" "),j="return new delete throw else case",Yt=L(Yt),P=L(P),j=L(j),N=L(N),I=/^0b([01]+)$/i,H=/^0x([0-9a-f]+)$/i,Y=/^0o?([0-7]+)$/i,R=L(["in","instanceof","typeof","new","void","delete","++","--","+","-","!","~","&","|","^","*","/","%","**",">>","<<",">>>","<",">","<=",">=","==","===","!=","!==","?","=","+=","-=","/=","*=","%=","**=",">>=","<<=",">>>=","&=","|=","^=","&&","||","??","&&=","||=","??="]),W="\n\r\u2028\u2029",G="+-*&%=<>!?|~^",Rt=",;:)}]",J="[{(,;:",Z=J+"`)}]",ee=W+" \t\f\v \ufeff",ne=L(o("./'\"#"+G+Z+ee));function te(e){return 56320<=e&&e<=57343}function ie(e){return 48<=e&&e<=57}function re(e){return!ne[e]}function Lt(e){return/^[a-z_$][a-z0-9_$]*$/i.test(e)}function oe(e){switch(e[0]){case"b":return"\b";case"f":return"\f";case"n":return"\n";case"r":return"\r";case"t":return"\t";case"u":if("{"==e[1]&&"}"==e.slice(-1))n=e.slice(2,-1);else{if(5!=e.length)return;n=e.slice(1)}return(n=parseInt(n,16))<0||isNaN(n)?void 0:n<65536?String.fromCharCode(n):1114111<n?void 0:String.fromCharCode(55232+(n>>10))+String.fromCharCode(56320+(1023&n));case"v":return"\v";case"x":return 3!=e.length?void 0:(n=parseInt(e.slice(1),16))<0||isNaN(n)?void 0:String.fromCharCode(n);var n;case"\r":case"\n":return"";default:return"0"==e?"\0":"0"<=e[0]&&e[0]<="9"?void 0:e}}function ae(e,n,t,i,r){this.message=e,this.filename=n,this.line=t,this.col=i,this.pos=r}function Bt(e,n,t,i,r){throw new ae(e,n,t,i,r)}function Ut(e,n,t){return e.type==n&&(null==t||e.value==t)}W=L(o(W)),G=L(o(G)),Rt=L(o(Rt)),J=L(o(J)),Z=L(o(Z)),ee=L(o(ee)),((ae.prototype=Object.create(Error.prototype)).constructor=ae).prototype.name="SyntaxError",a(ae);var se={};function Vt(i,r,o,a){var s={text:i,filename:r,pos:0,tokpos:0,line:1,tokline:0,col:0,tokcol:0,newline_before:!1,regex_allowed:!1,comments_before:[],directives:{},directive_stack:[],read_template:e("Unterminated template literal",function(e){for(var n="";;){var t=i();switch(t){case"\\":t+=i();break;case"`":return void e.push(n);case"$":if("{"==c())return u(),e.push(n),s.regex_allowed=!0}n+=t}function i(){var e=u(!0,!0);return"\r"==e?"\n":e}})},f=!1;function c(){return s.text.charAt(s.pos)}function u(e,n){var t=s.text.charAt(s.pos++);if(e&&!t)throw se;return W[t]?(s.col=0,s.line++,n||(s.newline_before=!0),"\r"==t&&"\n"==c()&&(s.pos++,t="\n")):s.col++,t}function l(e){for(;0<e--;)u()}function p(e){return s.text.substr(s.pos,e.length)==e}function d(){s.tokline=s.line,s.tokcol=s.col,s.tokpos=s.pos}function h(e,n,t){s.regex_allowed="operator"==e&&!Gt[n]||"keyword"==e&&j[n]||"punc"==e&&J[n],"punc"==e&&"."==n?f=!0:t||(f=!1);n={type:e,value:n,line:s.tokline,col:s.tokcol,pos:s.tokpos,endline:s.line,endcol:s.col,endpos:s.pos,nlb:s.newline_before,file:r};return/^(?:num|string|regexp)$/i.test(e)&&(n.raw=i.substring(n.pos,n.endpos)),t||(n.comments_before=s.comments_before,n.comments_after=s.comments_before=[]),s.newline_before=!1,new U(n)}function v(e){Bt(e,r,s.tokline,s.tokcol,s.tokpos)}function m(e){return/^0[0-7_]+$/.test(e)}function _(e){var t=!1,i=!1,r=!1,o="."==e,n=function(e){for(var n,t="";(n=c())&&e(n,t);)t+=u();return t}(function(e,n){switch(e){case"x":case"X":return!r&&(r=!0);case"e":case"E":return r||!t&&(t=i=!0);case"+":case"-":return i;case i=!1,".":return!(o||t||r||m(n))&&(o=!0)}return/[_0-9a-dfo]/i.test(e)}),e=(m(n=e?e+n:n)?S.has_directive("use strict")&&v("Legacy octal literals are not allowed in strict mode"):n=n.replace(r?/([1-9a-f]|.0)_(?=[0-9a-f])/gi:/([1-9]|.0)_(?=[0-9])/gi,"$1"),function(e){if(n=I.exec(e))return parseInt(n[1],2);if(n=H.exec(e))return parseInt(n[1],16);if(n=Y.exec(e))return parseInt(n[1],8);var n=parseFloat(e);return n==e?n:void 0}(n));return isNaN(e)&&v("Invalid syntax: "+n),o||t||"n"!=c()?h("num",e):h("bigint",n.toLowerCase()+u())}function g(e){var n,t=u(!0,e);{if("0"<=t&&t<="7")return n=t,"0"<=(r=c())&&r<="7"&&(n+=u(!0))[0]<="3"&&"0"<=(r=c())&&r<="7"&&(n+=u(!0)),"0"===n?"\0":(0<n.length&&S.has_directive("use strict")&&v("Legacy octal escape sequences are not allowed in strict mode"),String.fromCharCode(parseInt(n,8)));if("u"==t){var i=u(!0,e);if(t+=i,"{"!=i)t+=u(!0,e)+u(!0,e)+u(!0,e);else for(;t+=i=u(!0,e),"}"!=i;);}else"x"==t&&(t+=u(!0,e)+u(!0,e));var r=oe(t);return"string"!=typeof r&&v("Invalid escape sequence: \\"+t),r}}var b=e("Unterminated string constant",function(e){for(var n=u(),t="";;){var i=u(!0,!0);if("\\"==i)i=g(!0);else if(W[i])v("Unterminated string constant");else if(i==n)break;t+=i}var r=h("string",t);return r.quote=e,r});function y(e){var n,t=s.regex_allowed,i=function(){for(var e=s.text,n=s.pos;n<s.text.length;++n)if(W[e[n]])return n;return-1}();return-1==i?(n=s.text.substr(s.pos),s.pos=s.text.length):(n=s.text.substring(s.pos,i),s.pos=i),s.col=s.tokcol+(s.pos-s.tokpos),s.comments_before.push(h(e,n,!0)),s.regex_allowed=t,S}var w=e("Unterminated multiline comment",function(){var e=s.regex_allowed,n=function(e,n){if(e=s.text.indexOf(e,s.pos),n&&-1==e)throw se;return e}("*/",!0),n=s.text.substring(s.pos,n).replace(/\r\n|\r|\u2028|\u2029/g,"\n");return l(n.length+2),s.comments_before.push(h("comment2",n,!0)),s.regex_allowed=e,S});function x(){for(var e,n,t=!1,i=!1,r="#"==c()?u():"";e=c();)if(t)"u"!=e&&v("Expecting UnicodeEscapeSequence -- uXXXX"),re(e=g())||v("Unicode char: "+e.charCodeAt(0)+" is not valid in identifier"),r+=e,t=!1;else if("\\"==e)i=t=!0,u();else{if(!re(e))break;r+=u()}return Yt[r]&&i&&(n=r.charCodeAt(0).toString(16).toUpperCase(),r="\\u"+"0000".substr(n.length)+n+r.slice(1)),r}var k=e("Unterminated regular expression",function(e){for(var n,t=!1,i=!1;n=u(!0);)if(W[n])v("Unexpected line terminator");else if(t)e+="\\"+n,t=!1;else if("["==n)i=!0,e+=n;else if("]"==n&&i)i=!1,e+=n;else{if("/"==n&&!i)break;"\\"==n?t=!0:e+=n}var r=x();try{var o=new RegExp(e,r);return o.raw_source=e,h("regexp",o)}catch(e){v(e.message)}});function E(e){return h("operator",function e(n){if(!c())return n;var t=n+c();return R[t]?(u(),e(t)):n}(e||u()))}function e(n,t){return function(e){try{return t(e)}catch(e){if(e!==se)throw e;v(n)}}}function S(e){if(null!=e)return k(e);for(a&&0==s.pos&&p("#!")&&(d(),l(2),y("comment5"));;){for(;ee[c()];)u();if(d(),o){if(p("\x3c!--")){l(4),y("comment3");continue}if(p("--\x3e")&&s.newline_before){l(3),y("comment4");continue}}var n=c();if(!n)return h("eof");var t=n.charCodeAt(0);switch(t){case 34:case 39:return b(n);case 46:u();var i=c();if("."!=i)return ie(i.charCodeAt(0))?_("."):h("punc",".");for(var r=".";r+=".",u(),"."==c(););return h("operator",r);case 47:i=function(){switch(u(),c()){case"/":return u(),y("comment1");case"*":return u(),w()}return s.regex_allowed?k(""):E("/")}();if(i===S)continue;return i}if(ie(t))return _();if(Z[n])return h("punc",u());if(p("=>"))return h("punc",u()+u());if(G[n])return E();if(35!=t&&92!=t&&ne[n])break;return t=void 0,t=x(),f?h("name",t):N[t]?h("atom",t):Yt[t]?R[t]?h("operator",t):h("keyword",t):h("name",t)}v("Unexpected character '"+n+"'")}return S.context=function(e){return s=e?e:s},S.add_directive=function(e){s.directive_stack[s.directive_stack.length-1].push(e),s.directives[e]?s.directives[e]++:s.directives[e]=1},S.push_directives_stack=function(){s.directive_stack.push([])},S.pop_directives_stack=function(){for(var e=s.directive_stack.pop(),n=e.length;0<=--n;)s.directives[e[n]]--},S.has_directive=function(e){return 0<s.directives[e]},S}var Wt=L("typeof void delete -- ++ ! ~ - +"),Gt=L("-- ++"),Jt=L("= += -= /= *= %= **= >>= <<= >>>= &= |= ^= &&= ||= ??="),Xt=function(e,n){for(var t=0;t<e.length;)for(var i=e[t++],r=0;r<i.length;r++)n[i[r]]=t;return n}([["??"],["||"],["&&"],["|"],["^"],["&"],["==","===","!=","!=="],["<",">","<=",">=","in","instanceof"],[">>","<<",">>>"],["+","-"],["*","/","%"],["**"]],{}),Kt=L("atom bigint num regexp string");function Qt(e,S){S=ue(S,{bare_returns:!1,expression:!1,filename:null,html5_comments:!0,shebang:!0,strict:!1,toplevel:null},!0);var T={input:"string"==typeof e?Vt(e,S.filename,S.html5_comments,S.shebang):e,in_async:!1,in_directives:!0,in_funarg:-1,in_function:0,in_generator:!1,in_loop:0,labels:[],peeked:null,prev:null,token:null};function A(e,n){return Ut(T.token,e,n)}function D(){return T.peeked||(T.peeked=T.input())}function O(){return T.prev=T.token,T.peeked?(T.token=T.peeked,T.peeked=null):T.token=T.input(),T.in_directives=T.in_directives&&("string"==T.token.type||A("punc",";")),T.token}function $(){return T.prev}function q(e,n,t,i){var r=T.input.context();Bt(e,r.filename,null!=n?n:r.tokline,null!=t?t:r.tokcol,null!=i?i:r.tokpos)}function z(e,n){q(n,e.line,e.col)}function i(e,n){return e+(void 0===n?"":" «"+n+"»")}function C(e){z(e=null==e?T.token:e,"Unexpected token: "+i(e.type,e.value))}function M(e,n){if(A(e,n))return O();z(T.token,"Unexpected token: "+i(T.token.type,T.token.value)+", expected: "+i(e,n))}function F(e){M("punc",e)}function P(e){return e.nlb||!ge(e.comments_before,function(e){return!e.nlb})}function j(){return!S.strict&&(A("eof")||A("punc","}")||P(T.token))}function N(e){A("punc",";")?O():e||j()||F(";")}function I(){F("(");var e=X();return F(")"),e}function n(i){return function(){var e=T.token,n=i.apply(null,arguments),t=$();return n.start=e,n.end=t,n}}function H(){(A("operator","/")||A("operator","/="))&&(T.peeked=null,T.token=T.input(T.token.value.substr(1)))}T.token=O();var Y=n(function(){switch(H(),T.token.type){case"string":var e=T.in_directives,n=X();return e&&(n instanceof fe?(y=n.start.raw.slice(1,-1),T.input.add_directive(y),n.value=y):T.in_directives=e=!1),N(),e?new pe(n):new we({body:n});case"num":case"bigint":case"regexp":case"operator":case"atom":return R();case"name":switch(T.token.value){case"async":if(Ut(D(),"keyword","function"))return O(),O(),A("operator","*")?(O(),L(gn)):L(_n);break;case"await":if(T.in_async)return R();break;case"export":if(O(),A("operator","*"))return O(),o="*",A("name","as")&&(O(),ee()||M("name"),o=T.token.value,O()),M("name","from"),f=T.token,M("string"),N(),new Wn({aliases:[o],keys:["*"],path:f.value,quote:f.quote});if(A("punc","{")){O();for(var t=[],i=[];ee();){var r=T.token;O(),i.push(r),A("name","as")?(O(),ee()||M("name"),t.push(T.token.value),O()):t.push(r.value),A("punc","}")||F(",")}return(F("}"),A("name","from"))?(O(),f=T.token,M("string"),N(),new Wn({aliases:t,keys:i.map(function(e){return e.value}),path:f.value,quote:f.quote})):(N(),new Gn({properties:i.map(function(e,n){Ut(e,"name")||z(e,"Name expected");e=se(St,e);return e.alias=t[n],e})}))}return A("keyword","default")?(O(),o=T.token,(f=function(){if(A("name","async")){if(Ut(D(),"keyword","function"))return O(),O(),A("operator","*")?(O(),B(gn,L(hn))):B(_n,L(dn))}else if(A("keyword"))switch(T.token.value){case"class":return O(),B(xn,Z(kn));case"function":return(O(),A("operator","*"))?(O(),B(yn,L(mn))):B(bn,L(vn))}}())?(f.start=o,f.end=$()):(H(),f=X(),N()),new Vn({body:f})):new Un({body:ne()});case"import":var o=D();if("punc"==o.type&&/^[(.]$/.test(o.value))break;O();var a,s,f=null,c=V(mt,!0),u=null;if(c?(c.key="",A("punc",",")&&O()):!A("string"))if(A("operator","*"))O(),M("name","as"),(f=V(mt)).key="*";else{for(F("{"),u=[];ee();)Ut(D(),"name","as")?(s=T.token.value,O(),O(),(a=V(mt)).key=s):(a=V(mt)).key=a.name,u.push(a),A("punc","}")||F(",");F("}")}(f||c||u)&&M("name","from");var l=T.token;return M("string"),N(),new Jn({all:f,default:c,path:l.value,properties:u,quote:l.quote});case"let":if(ie())return O(),p=oe(),N(),p;break;case"yield":if(T.in_generator)return R()}return(Ut(D(),"punc",":")?function(){var n=V(Et);ge(T.labels,function(e){return e.name!=n.name})||q("Label "+n.name+" defined twice");F(":"),T.labels.push(n);var e=Y();T.labels.pop(),e instanceof Ke||n.references.forEach(function(e){e instanceof Mn&&z(e.label.start,"Continue label `"+n.name+"` must refer to IterationStatement")});return new de({body:e,label:n})}:R)();case"punc":switch(T.token.value){case"{":return new xe({start:T.token,body:U(),end:$()});case"[":case"(":case"`":return R();case";":return T.in_directives=!1,O(),new We;default:C()}case"keyword":switch(T.token.value){case"break":return O(),Q(Cn);case"class":return O(),Z(xn);case"const":O();var p=re();return N(),p;case"continue":return O(),Q(Mn);case"debugger":return O(),N(),new Ve;case"do":O();var n=K(Y),d=(M("keyword","while"),I());return N(!0),new Ze({body:n,condition:d});case"while":return O(),new en({condition:I(),body:K(Y)});case"for":O();var d=A("name","await")&&O(),h=(F("("),null);if(!d&&A("punc",";")||(h=A("keyword","const")?(O(),re(!0)):A("name","let")&&ie()?(O(),oe(!0)):A("keyword","var")?(O(),ae(!0)):X(!0),d?(M("name","of"),g=ve):A("operator","in")?(O(),g=rn):A("name","of")&&(O(),g=he),!g)){var v=h;F(";");var m=A("punc",";")?null:X(),_=(F(";"),A("punc",")")?null:X());return F(")"),new nn({init:v,condition:m,step:_,body:K(Y)});return}h instanceof Yn?(1<h.definitions.length&&z(h.start,"Only one variable declaration allowed in for..in/of loop"),g!==rn&&h.definitions[0].value&&z(h.definitions[0].value.start,"No initializers allowed in for..of loop")):G(h)||(h=J(h))instanceof je||z(h.start,"Invalid left-hand side in for..in/of loop");v=g,m=h,_=(H(),X());return F(")"),new v({init:m,object:_,body:K(Y)});case"function":return(O(),A("operator","*"))?(O(),L(yn)):L(bn);case"if":O();var g=I(),h=Y(),b=null;return A("keyword","else")&&(O(),b=Y()),new Se({condition:g,body:h,alternative:b});case"return":0!=T.in_function||S.bare_returns||q("'return' outside of function"),O();var y=null;return A("punc",";")?O():j()||(y=X(),N()),new $n({value:y});case"switch":return O(),new Fn({expression:I(),body:K(te)});case"throw":O(),P(T.token)&&q("Illegal newline after 'throw'");y=X();return N(),new qn({value:y});case"try":O();var w,x,b=U(),k=null,E=null;return A("keyword","catch")&&(x=T.token,O(),w=null,A("punc","(")&&(O(),w=W(kt),F(")")),k=new In({start:x,argname:w,body:U(),end:$()})),A("keyword","finally")&&(x=T.token,O(),E=new Hn({start:x,body:U(),end:$()})),k||E||q("Missing catch/finally blocks"),new Nn({body:b,bcatch:k,bfinally:E});case"var":O();p=ae();return N(),p;case"with":return T.input.has_directive("use strict")&&q("Strict mode may not include a with statement"),O(),new on({expression:I(),body:Y()})}}C()});function R(){var e=X();return N(),new we({body:e})}function Q(e){var n,t=null,e=(null!=(t=j()?t:V(Tt,!0))?((n=ce(function(e){return e.name==t.name},T.labels))||z(t.start,"Undefined label "+t.name),t.thedef=n):0==T.in_loop&&q(e.TYPE+" not inside a loop or switch"),N(),new e({label:t}));return n&&n.references.push(e),e}function m(e){if(A("name",e)){e=D();if(e&&!Ut(e,"operator","=")&&!("punc"==e.type&&/^[(;}]$/.test(e.value)||P(e)))return O()}}function Z(e){for(var n,t=T.in_async,i=T.in_generator,r=(T.input.push_directives_stack(),T.input.add_directive("use strict"),n=e===xn?V(wt):V(xt,!0),null),o=(A("keyword","extends")&&(O(),H(),r=_(!0)),F("{"),[]);!A("punc","}");)if(A("punc",";"))O();else{var a=T.token,s=!!m("static"),f=m("async");if(A("operator","*")){O();var c=A("name")&&/^#/.test(T.token.value),u=h(),l=T.token,p=L(f?hn:mn);p.start=l,p.end=$(),o.push(new Dn({start:a,static:s,private:c,key:u,value:p,end:$()}))}else{c=A("name")&&/^#/.test(T.token.value),u=h();if(A("punc","(")){l=T.token,p=L(f?dn:vn);p.start=l,p.end=$(),o.push(new Dn({start:a,static:s,private:c,key:u,value:p,end:$()}))}else{f&&C(f);f=null;if(A("operator","="))O(),T.in_async=!1,T.in_generator=!1,f=v(),T.in_generator=i,T.in_async=t;else if(!A("punc",";")&&!A("punc","}")){var d=null;switch(u){case"get":d=Tn;break;case"set":d=An}if(d){o.push(new d({start:a,static:s,private:A("name")&&/^#/.test(T.token.value),key:h(),value:b(),end:$()}));continue}}N(),o.push(new Sn({start:a,static:s,private:c,key:u,value:f,end:$()}))}}}return O(),T.input.pop_directives_stack(),T.in_generator=i,T.in_async=t,new e({extends:r,name:n,properties:o})}function l(e){var n;return e instanceof Pe?(n=null,e.elements[e.elements.length-1]instanceof qe&&(n=l(e.elements.pop().expression)),new rt({start:e.start,elements:e.elements.map(l),rest:n,end:e.end})):e instanceof Fe?new Ae({start:e.start,name:l(e.left),value:e.right,end:e.end}):e instanceof Ae?(e.name=l(e.name),e):e instanceof rt?(e.elements=e.elements.map(l),e.rest&&(e.rest=l(e.rest)),e):e instanceof at?(e.properties.forEach(function(e){e.value=l(e.value)}),e.rest&&(e.rest=l(e.rest)),e):e instanceof Pt?e:e instanceof st?(n=null,e.properties[e.properties.length-1]instanceof qe&&(n=l(e.properties.pop().expression)),new at({start:e.start,properties:e.properties.map(function(e){return e instanceof ct||z(e.start,"Invalid destructuring assignment"),new ot({start:e.start,key:e.key,value:l(e.value),end:e.end})}),rest:n,end:e.end})):e instanceof Ne?e:e instanceof Ie?new Ne(e):e instanceof it?new Ne({start:e.start,name:"yield",end:e.end}):void z(e.start,"Invalid arrow parameter")}function u(e,n,t){var i,r,o=T.in_async,a=T.in_generator,s=(T.in_async=t,T.in_generator=!1,T.in_funarg),f=(T.in_funarg=T.in_function,e.map(l)),e=(e=e.rest||null)&&l(e),s=(T.in_funarg=s,F("=>"),T.in_loop),c=T.labels,u=(++T.in_function,T.in_directives=!0,T.input.push_directives_stack(),T.in_loop=0,T.labels=[],r=A("punc","{")?(i=U(),null):(i=[],H(),v()),T.input.has_directive("use strict")),s=(T.input.pop_directives_stack(),--T.in_function,T.in_loop=s,T.labels=c,T.in_generator=a,T.in_async=o,new(t?pn:me)({start:n,argnames:f,rest:e,body:i,value:r,end:$()}));return u&&s.each_argname(w),s}var L=function(e){var n,t=T.in_async,i=T.in_generator,r=(/Defun$/.test(e.TYPE)?(n=V(bt),T.in_async=/^Async/.test(e.TYPE),T.in_generator=/Generator/.test(e.TYPE)):(T.in_async=/^Async/.test(e.TYPE),T.in_generator=/Generator/.test(e.TYPE),n=V(yt,!0)),!n||e===sn||n instanceof ht||C($()),F("("),T.in_funarg),o=(T.in_funarg=T.in_function,p(")",!S.strict,!1,function(){return c(Ne)})),r=(T.in_funarg=r,T.in_loop),a=T.labels,s=(++T.in_function,T.in_directives=!0,T.input.push_directives_stack(),T.in_loop=0,T.labels=[],U()),f=T.input.has_directive("use strict"),r=(T.input.pop_directives_stack(),--T.in_function,T.in_loop=r,T.labels=a,T.in_generator=i,T.in_async=t,new e({name:n,argnames:o,rest:o.rest||null,body:s}));return f&&(n&&w(n),r.each_argname(w)),r};function ee(){return A("name")||Lt(T.token.value)}function B(e,n){return n.name&&((n=new e(n)).name=new(e===xn?wt:bt)(n.name)),n}var ne=n(function(){if(A("name"))switch(T.token.value){case"async":return(O(),M("keyword","function"),A("operator","*"))?(O(),L(gn)):L(_n);case"let":O();var e=oe();return N(),e}else if(A("keyword"))switch(T.token.value){case"class":return O(),Z(xn);case"const":O();e=re();return N(),e;case"function":return(O(),A("operator","*"))?(O(),L(yn)):L(bn);case"var":O();e=ae();return N(),e}C()});function U(){F("{");for(var e=[];!A("punc","}");)A("eof")&&F("}"),e.push(Y());return O(),e}function te(){F("{");for(var e,n,t,i,r=[];!A("punc","}");)A("eof")&&F("}"),A("keyword","case")?(e&&(e.end=$()),n=[],e=new jn({start:(i=T.token,O(),i),expression:X(),body:n}),r.push(e),F(":")):A("keyword","default")?(e&&(e.end=$()),t&&q("More than one default clause in switch statement"),n=[],e=new Pn({start:(i=T.token,O(),F(":"),i),body:n}),r.push(e),t=e):(n||C(),n.push(Y()));return e&&(e.end=$()),O(),r}function r(e,n){for(var t=[];;){var i=T.token,r=W(e),o=null;if(A("operator","=")?(O(),o=v(n)):!n&&(e===vt||r instanceof je)&&q("Missing initializer in declaration"),t.push(new Te({start:i,name:r,value:o,end:$()})),!A("punc",","))break;O()}return t}function ie(){var e=D();return Ut(e,"name")||Ut(e,"punc","[")||Ut(e,"punc","{")}var re=function(e){return new Rn({start:$(),definitions:r(vt,e),end:$()})},oe=function(e){return new Ln({start:$(),definitions:r(_t,e),end:$()})},ae=function(e){return new Bn({start:$(),definitions:r(gt,e),end:$()})};var _=function(e){if(A("operator","new"))return n=e,f=T.token,M("operator","new"),(c=A("punc",".")&&Ut(D(),"name","target")?(O(),O(),new $t):(c=_(!1),s=A("punc","(")?(O(),p(")",!S.strict)):[],new Xn({expression:c,args:s}))).start=f,c.end=$(),d(c,n);var n,t=T.token;if(A("punc")){switch(t.value){case"`":return d(x(null),e);case"(":if(O(),A("punc",")"))return O(),u([],t);var i=X(!1,!0),r=t.comments_before.length,r=([].unshift.apply(i.start.comments_before,t.comments_before),t.comments_before.length=0,t.comments_before=i.start.comments_before,0==(t.comments_before_length=r)&&0<t.comments_before.length&&((r=t.comments_before[0]).nlb||(r.nlb=t.nlb,t.nlb=!1)),t.comments_after=i.start.comments_after,i.start=t,F(")"),$());return r.comments_before=i.end.comments_before,r.comments_after.forEach(function(e){i.end.comments_after.push(e),e.nlb&&(T.token.nlb=!0)}),r.comments_after.length=0,r.comments_after=i.end.comments_after,i.end=r,A("punc","=>")?u(i instanceof Oe?i.expressions:[i],t):d(i,e);case"[":return d(g(),e);case"{":return d(y(),e)}C()}if(A("keyword"))switch(t.value){case"class":O();var o=Z(kn);return o.start=t,o.end=$(),d(o,e);case"function":return O(),(a=A("operator","*")?(O(),L(mn)):L(vn)).start=t,a.end=$(),d(a,e)}if(A("name")){var a,s=se(Ie,t);if(O(),"async"==s.name){if(A("keyword","function"))return O(),(a=A("operator","*")?(O(),L(hn)):L(dn)).start=t,a.end=$(),d(a,e);if(A("name")&&Ut(D(),"punc","=>"))return t=T.token,s=se(Ie,t),O(),u([s],t,!0);if(A("punc","(")){var f=d(s,e);if(!A("punc","=>"))return f;var c=f.args;return c[c.length-1]instanceof qe&&(c.rest=c.pop().expression),u(c,t,!0)}}return A("punc","=>")?u([s],t):d(s,e)}if(Kt[T.token.type])return d(function(){var e,n=T.token,t=n.value;switch(n.type){case"num":isFinite(t)?e=new He({value:t}):(e=new jt,t<0&&(e=new ze({operator:"-",expression:e})));break;case"bigint":e=new zt({value:t});break;case"string":e=new fe({value:t,quote:n.quote});break;case"regexp":e=new Ct({value:t});break;case"atom":switch(t){case"false":e=new Nt;break;case"true":e=new It;break;case"null":e=new Mt;break;default:C()}break;default:C()}return O(),e.start=e.end=n,e}(),e);C()};function p(e,n,t,i){i=i||v;for(var r=!0,o=[];!A("punc",e)&&(r?r=!1:F(","),!n||!A("punc",e));)if(t&&A("punc",","))o.push(new Pt({start:T.token,end:T.token}));else if(A("operator","...")){if(i!==v){O(),o.rest=i(),o.rest instanceof Ae&&z(o.rest.start,"Invalid rest parameter");break}o.push(new qe({start:T.token,expression:(O(),i()),end:$()}))}else o.push(i());return F(e),o}var g=n(function(){return F("["),new Pe({elements:p("]",!S.strict,!0)})}),b=n(function(){return L(sn)}),y=n(function(){F("{");for(var e=!0,n=[];!A("punc","}")&&(e?e=!1:F(","),S.strict||!A("punc","}"));){var t=T.token;if(A("operator","*")){O();var i=h(),r=T.token,o=L(mn);o.start=r,o.end=$(),n.push(new ut({start:t,key:i,value:o,end:$()}))}else if(A("operator","..."))O(),n.push(new qe({start:t,expression:v(),end:$()}));else if(Ut(D(),"operator","=")){r=V(Ie);O(),n.push(new ct({start:t,key:t.value,value:new Fe({start:t,left:r,operator:"=",right:v(),end:$()}),end:$()}))}else if(Ut(D(),"punc",",")||Ut(D(),"punc","}"))n.push(new ct({start:t,key:t.value,value:V(Ie),end:$()}));else{i=h();if(A("punc","(")){var a=T.token;(s=L(vn)).start=a,s.end=$(),n.push(new ut({start:t,key:i,value:s,end:$()}))}else if(A("punc",":"))O(),n.push(new ct({start:t,key:i,value:v(),end:$()}));else{if("name"==t.type)switch(i){case"async":var s,f=A("operator","*")&&O(),a=(i=h(),T.token);(s=L(f?hn:dn)).start=a,s.end=$(),n.push(new ut({start:t,key:i,value:s,end:$()}));continue;case"get":n.push(new pt({start:t,key:h(),value:b(),end:$()}));continue;case"set":n.push(new lt({start:t,key:h(),value:b(),end:$()}));continue}C()}}}return O(),new st({properties:n})});function h(){var e=T.token;switch(e.type){case"operator":Yt[e.value]||C();case"num":case"string":case"name":case"keyword":case"atom":return O(),""+e.value;case"punc":F("[");var n=v();return F("]"),n;default:C()}}function se(e,n){var t=n.value;switch(t){case"await":T.in_async&&C(n);break;case"super":e=Dt;break;case"this":e=Ot;break;case"yield":T.in_generator&&C(n)}return new e({name:""+t,start:n,end:n})}function w(e){"arguments"!=e.name&&"eval"!=e.name&&"let"!=e.name||z(e.start,"Unexpected "+e.name+" in strict mode")}function V(e,n){if(!A("name"))return n||q("Name expected"),null;n=se(e,T.token);return T.input.has_directive("use strict")&&n instanceof ht&&w(n),O(),n}function W(e){var n,t=T.token;if(A("punc","["))return O(),n=p("]",!S.strict,!0,function(){return c(e)}),new rt({start:t,elements:n,rest:n.rest||null,end:$()});if(A("punc","{")){O();for(var i=!0,r=[],o=null;!A("punc","}")&&(i?i=!1:F(","),S.strict||!A("punc","}"));){var a=T.token;if(A("punc","[")||Ut(D(),"punc",":")){var s=h();F(":"),r.push(new ot({start:a,key:s,value:c(e),end:$()}))}else{if(A("operator","...")){O(),o=W(e);break}s=V(e);A("operator","=")&&(O(),s=new Ae({start:s.start,name:s,value:v(),end:$()})),r.push(new ot({start:a,key:a.value,value:s,end:$()}))}}return F("}"),new at({start:t,properties:r,rest:o,end:$()})}return V(e)}function c(e){var n=T.token,e=W(e);return A("operator","=")?(O(),new Ae({start:n,name:e,value:v(),end:$()})):e}function x(e){for(var n=e?e.start:T.token,t=T.input.context().read_template,i=[],r=[];t(i);)O(),r.push(X()),A("punc","}")||C();return O(),new qt({start:n,expressions:r,strings:i,tag:e,end:$()})}function d(e,n){for(var t=e.start,i=null;;)if(A("operator","?")&&Ut(D(),"punc",".")&&(O(),O(),i=e),A("punc","[")){O();var r=X();F("]"),e=new Zn({start:t,optional:i===e,expression:e,property:r,end:$()})}else if(n&&A("punc","("))O(),e=new De({start:t,optional:i===e,expression:e,args:p(")",!S.strict),end:$()});else if(i===e||A("punc","."))i!==e&&O(),e=new Qn({start:t,optional:i===e,expression:e,property:(r=void 0,r=T.token.value,M("name"),r),end:$()});else{if(!A("punc","`"))break;i&&q("Invalid template on optional chain"),e=x(e)}if(i&&(e.terminal=!0),e instanceof De&&!e.pure)for(var o=(t=e.start).comments_before,a=le(t,"comments_before_length")?t.comments_before_length:o.length;0<=--a;)if(/[@#]__PURE__/.test(o[a].value)){e.pure=!0;break}return e}function o(e){var n,t,i=T.token;if(T.in_async&&A("name","await"))return T.in_funarg===T.in_function&&q("Invalid use of await in function argument"),T.input.context().regex_allowed=!0,O(),new tt({start:i,expression:o(e),end:$()});if(T.in_generator&&A("name","yield"))return T.in_funarg===T.in_function&&q("Invalid use of yield in function argument"),T.input.context().regex_allowed=!0,O(),t=null,n=!1,A("operator","*")?(O(),t=v(e),n=!0):(A("punc")?Rt[T.token.value]:j())||(t=v(e)),new it({start:i,expression:t,nested:n,end:$()});if(A("operator")&&Wt[i.value])return O(),H(),(t=a(ze,i,o(e))).start=i,t.end=$(),t;for(var r=_(!0);A("operator")&&Gt[T.token.value]&&!P(T.token);)(r=a(nt,T.token,r)).start=i,r.end=T.token,O();return r}function a(e,n,t){var i=n.value;switch(i){case"++":case"--":G(t)||z(n,"Invalid use of "+i+" operator");break;case"delete":t instanceof Ie&&T.input.has_directive("use strict")&&z(t.start,"Calling delete on expression not allowed in strict mode")}return new e({operator:i,expression:t})}var s=function(e,n,t){var i=A("operator")?T.token.value:null,r=null!=(i="in"==i&&t?null:i)?Xt[i]:null;return null!=r&&n<r?(O(),r=s(o(t),"**"==i?r-1:r,t),s(new Ce({start:e.start,left:e,operator:i,right:r,end:r.end}),n,t)):e};var f=function(e){var n,t=T.token,i=s(o(i=e),0,i);return A("operator","?")?(O(),n=v(),F(":"),new Me({start:t,condition:i,consequent:n,alternative:v(e),end:$()})):i};function G(e){return e instanceof $e&&!e.optional||e instanceof Ie}function J(e){if(e instanceof Pe){var n=null;if(e.elements[e.elements.length-1]instanceof qe&&!((n=J(e.elements.pop().expression))instanceof je||G(n)))return e;var t=e.elements.map(J);return ge(t,function(e){return e instanceof Ae||e instanceof je||e instanceof Pt||G(e)})?new rt({start:e.start,elements:t,rest:n,end:e.end}):e}if(e instanceof Fe)return(t=J(e.left))instanceof je||G(t)?new Ae({start:e.start,name:t,value:e.right,end:e.end}):e;if(!(e instanceof st))return e;n=null;if(e.properties[e.properties.length-1]instanceof qe&&!((n=J(e.properties.pop().expression))instanceof je||G(n)))return e;for(var i=[],r=0;r<e.properties.length;r++){var o=e.properties[r];if(!(o instanceof ct))return e;var a=J(o.value);if(!(a instanceof Ae||a instanceof je||G(a)))return e;i.push(new ot({start:o.start,key:o.key,value:a,end:o.end}))}return new at({start:e.start,properties:i,rest:n,end:e.end})}function v(e){var n=T.token,t=f(e),i=T.token.value;if(A("operator")&&Jt[i]){if(G(t)||"="==i&&(t=J(t))instanceof je)return O(),new Fe({start:n,left:t,operator:i,right:v(e),end:$()});q("Invalid assignment")}return t}function X(e,n){for(var t=T.token,i=[];;){if(n&&A("operator","...")){O(),i.rest=W(Ne);break}if(i.push(v(e)),!A("punc",","))break;if(O(),n&&A("punc",")")&&Ut(D(),"punc","=>"))break}return 1!=i.length||i.rest?new Oe({start:t,expressions:i,end:$()}):i[0]}function K(e){++T.in_loop;e=e();return--T.in_loop,e}if(S.expression)return H(),e=X(),M("eof"),e;var e=T.token,k=[];for(T.input.push_directives_stack();!A("eof");)k.push(Y());T.input.pop_directives_stack();var E=$()||e,t=S.toplevel;return t?(t.body=t.body.concat(k),t.end=E):t=new an({start:e,body:k,end:E}),t}function Zt(e,n,t,i){this._bits=0,this.defun=void 0,this.eliminated=0,this.id=e,this.init=i,this.mangled_name=null,this.name=t.name,this.orig=[t],this.references=[],this.replaced=0,this.safe_ids=void 0,this.scope=n}function ei(e){return e.orig[0]instanceof Ne||e.orig[1]instanceof Ne}Zt.prototype={forEach:function(e){this.orig.forEach(e),this.references.forEach(e)},mangle:function(e){var n,t=e.cache&&e.cache.props;this.global&&t&&t.has(this.name)?this.mangled_name=t.get(this.name):this.mangled_name||this.unmangleable(e)||(n=this.redefined(),this.mangled_name=n?n.mangled_name||n.name:function(e,t){var n,i=e.scope,r=oi(i,t),o=i.cname_holes,a=new be,s=[i];e.forEach(function(e){var n=e.scope;do{if(Be(n,s))break;oi(n,t).each(function(e,n){a.set(n,e)}),s.push(n)}while(n=n.parent_scope)});for(var f=0;f<o.length;f++)if(n=Bi(o[f]),!a.has(n))return o.splice(f,1),r.set(n,!0),n;for(;;)if(n=Bi(++i.cname),!(r.has(n)||P[n]||t.reserved.has[n])){if(!a.has(n))break;o.push(i.cname)}return r.set(n,!0),n}(this,e),this.global&&t&&t.set(this.name,this.mangled_name))},redefined:function(){var n,e=this.defun;if(e)return n=this.name,e=e.variables.get(n)||e instanceof an&&e.globals.get(n)||this.orig[0]instanceof vt&&ce(function(e){return e.name==n},e.enclosed),e&&e!==this?e.redefined()||e:void 0},unmangleable:function(e){if(this.exported)return!0;if(this.undeclared)return!0;if(!e.eval&&this.scope.pinned())return!0;if(e.keep_fargs&&ei(this))return!0;if(e.keep_fnames){var n=this.orig[0];if(n instanceof xt)return!0;if(n instanceof wt)return!0;if(n instanceof bt)return!0;if(n instanceof yt)return!0}return!(e.toplevel||!this.global)}},_(Zt,["const_redefs","cross_loop","direct_access","exported","global","undeclared"]);var ni=L("delete ++ --");function ti(e,n){return n instanceof Fe?n.left===e&&e:n instanceof Ae?n.name===e&&e:n instanceof je||n instanceof ot?e:n instanceof tn?n.init===e&&e:n instanceof et?ni[n.operator]&&n.expression:void 0}function ii(e,n){e.enclosed=[],e.parent_scope=n,e.functions=new be,e.variables=new be,n&&(e.make_def=n.make_def)}function ri(e,n){ii(e,n),e.uses_eval=!1,e.uses_with=!1}function oi(e,n){var t,i=e.names_in_use;return i||(e.cname=-1,e.cname_holes=[],e.names_in_use=i=new be,t=n.cache&&n.cache.props,e.enclosed.forEach(function(e){e.unmangleable(n)&&i.set(e.name,!0),e.global&&t&&t.has(e.name)&&i.set(t.get(e.name),!0)})),i}function ai(e){return e=ue(e,{eval:!1,ie:!1,keep_fargs:!1,keep_fnames:!1,reserved:[],toplevel:!1,v8:!1,webkit:!1}),Array.isArray(e.reserved)||(e.reserved=[]),K(e.reserved,"arguments"),e.reserved.has=L(e.reserved),e}an.DEFMETHOD("figure_out_scope",function(u){u=ue(u,{cache:null,ie:!1});var l=this,a=null,s=!1,t=0,f=l.parent_scope=null,p=new Ye(function(i,e){var n,t;if(i instanceof xn)return n=s,s=p.parent()instanceof Un,i.name.walk(p),s=n,o(function(){i.extends&&i.extends.walk(p),i.properties.forEach(function(e){e.walk(p)})}),!0;if(i instanceof Yn)return n=s,s=p.parent()instanceof Un,e(),s=n,!0;if(i instanceof Q)return n=s,s=p.parent()instanceof Un,i.name.walk(p),s=n,o(function(){i.argnames.forEach(function(e){e.walk(p)}),i.rest&&i.rest.walk(p),A(i,p)}),!0;if(i instanceof k)return i.init_vars(f),e(),!0;if(i instanceof Nn)return o(function(){A(i,p)}),i.bcatch&&i.bcatch.walk(p),i.bfinally&&i.bfinally.walk(p),!0;if(i instanceof on){for(var r=f;!(r=r.resolve()).uses_with&&(r.uses_with=!0,r=r.parent_scope););return o(e),!0}if(i instanceof Je)return o(e),!0;function o(e){i.init_vars(f);var n=a,t=f;i instanceof ke&&(a=i),f=i,e(),f=t,a=n}i instanceof dt&&(i.scope=f),i instanceof Et&&((i.thedef=i).references=[]),i instanceof kt?f.def_variable(i).defun=a:i instanceof vt?((t=f.def_variable(i)).defun=a,s&&(t.exported=!0)):i instanceof bt?(t=a.def_function(i,p.parent()),s&&(t.exported=!0)):i instanceof Ne?a.def_variable(i):i instanceof yt?(t=a.def_function(i,"arguments"==i.name?void 0:a),u.ie&&"arguments"!=i.name&&(t.defun=a.parent_scope.resolve())):i instanceof _t?(t=f.def_variable(i),s&&(t.exported=!0)):i instanceof gt&&(t=a.def_variable(i,i instanceof mt?void 0:null),s&&(t.exported=!0))}),d=(l.make_def=function(e,n){return new Zt(++t,this,e,n)},l.walk(p),l.globals=new be,[]),p=new Ye(function(e){if(e instanceof In)return e.argname instanceof je?(d.push(e),e.argname.walk(p),d.pop(),A(e,p),!0):void 0;if(e instanceof Ee)return d.push(e),e.name&&e.name.walk(p),e.argnames.forEach(function(e){e.walk(p)}),e.rest&&e.rest.walk(p),d.pop(),D(e,p),!0;if(e instanceof zn)return e.label&&e.label.thedef.references.push(e),!0;if(e instanceof ht){var n,t=e.definition();if(t.preinit=t.references.length,e instanceof kt){if(n=t.redefined())for(var i=e.scope;i&&(K(i.enclosed,n),i!==n.scope);i=i.parent_scope);}else e instanceof vt?(n=t.redefined())&&(n.const_redefs=!0):t.scope!==e.scope&&(e instanceof bt||e instanceof Ne||e instanceof gt)&&(e.mark_enclosed(u),n=e.scope.find_variable(e.name),e.thedef!==n&&((e.thedef=n).orig.push(e),e.mark_enclosed(u)));return"arguments"!=e.name?!0:((r=e instanceof gt&&p.parent())instanceof Te&&!r.value||(a=e.scope.resolve().find_variable("arguments"))&&h(a)&&(a.scope.uses_arguments=3),!0)}if(e instanceof Ie){for(var r,o=e.name,a=e.scope.find_variable(o),s=d.length;0<s&&a&&!((s=d.lastIndexOf(a.scope,s-1))<0);){var f=a.orig[0];if(f instanceof kt||f instanceof Ne||f instanceof yt){e.in_arg=!0;break}a=a.scope.parent_scope.find_variable(o)}if(a?"arguments"==o&&h(a)&&(ti(e,r=p.parent())?a.scope.uses_arguments=3:a.scope.uses_arguments<2&&!(r instanceof $e&&r.expression===e)?a.scope.uses_arguments=2:a.scope.uses_arguments||(a.scope.uses_arguments=!0)):a=l.def_global(e),"eval"==o)if("Call"==(r=p.parent()).TYPE&&r.expression===e)for(i=e.scope;!(i=i.resolve()).uses_eval&&(i.uses_eval=!0,i=i.parent_scope););else a.undeclared&&(l.uses_eval=!0);if(a.init instanceof Q&&a.scope!==a.init.name.scope){var c=e.scope;do{if(c===a.init.name.scope)break}while(c=c.parent_scope);c||(a.init=void 0)}return e.thedef=a,e.reference(u),!0}});function h(e){return e.orig[0]instanceof Ne&&!(e.orig[1]instanceof Ne||e.orig[2]instanceof Ne)&&!cn(e.scope)}function i(e,n){var t,i,r=e.name,o=e.thedef;if(ge(o.orig,function(e){return!(e instanceof vt||e instanceof _t)}))return t=n.find_variable(r),t?(i=t.redefined())&&(t=i):t=l.globals.get(r),t?t.orig.push(e):t=n.def_variable(e),t.undeclared&&l.variables.set(r,t),"arguments"==r&&h(o)&&e instanceof yt||(o.defun=t.scope,o.forEach(function(e){e.redef=o,e.thedef=t,e.reference(u)})),1}l.walk(p),u.ie&&l.walk(new Ye(function(e){var n;return e instanceof kt?(i(e,n=(n=e.thedef.defun).name instanceof yt&&n.name.name==e.name?n.parent_scope.resolve():n),!0):e instanceof yt?(n=e.thedef,i(e,e.scope.parent_scope.resolve())?void 0!==e.thedef.init?e.thedef.init=!1:n.init&&(e.thedef.init=n.init):n.defun=void 0,!0):void 0}))}),an.DEFMETHOD("def_global",function(e){var n=this.globals,t=e.name;return n.has(t)?n.get(t):((e=this.make_def(e)).undeclared=!0,e.global=!0,n.set(t,e),e)}),Je.DEFMETHOD("init_vars",function(e){ii(this,e)}),ke.DEFMETHOD("init_vars",function(e){ri(this,e)}),me.DEFMETHOD("init_vars",function(e){return ri(this,e),this}),pn.DEFMETHOD("init_vars",function(e){ri(this,e)}),Ee.DEFMETHOD("init_vars",function(e){return ri(this,e),this.uses_arguments=!1,this.def_variable(new Ne({name:"arguments",start:this.start,end:this.end})),this}),dt.DEFMETHOD("mark_enclosed",function(e){for(var n=this.definition(),t=this.scope;t&&(K(t.enclosed,n),e?(e.keep_fargs&&t instanceof Ee&&t.each_argname(function(e){K(n.scope.enclosed,e.definition())}),e.keep_fnames&&t.functions.each(function(e){K(n.scope.enclosed,e)})):t._var_names=void 0,t!==n.scope);t=t.parent_scope);}),dt.DEFMETHOD("reference",function(e){this.definition().references.push(this),this.mark_enclosed(e)}),Je.DEFMETHOD("find_variable",function(e){return this.variables.get(e)||this.parent_scope&&this.parent_scope.find_variable(e)}),Je.DEFMETHOD("def_function",function(e,n){var t=this.def_variable(e,n);return(!t.init||t.init instanceof Q)&&(t.init=n),this.functions.set(e.name,t),t}),Je.DEFMETHOD("def_variable",function(e,n){var t=this.variables.get(e.name);return t?(t.orig.push(e),t.init instanceof fn&&(t.init=n)):(t=this.make_def(e,n),this.variables.set(e.name,t),t.global=!this.parent_scope),e.thedef=t}),dt.DEFMETHOD("unmangleable",function(e){var n=this.definition();return!n||n.unmangleable(e)}),Et.DEFMETHOD("unmangleable",_e),dt.DEFMETHOD("definition",function(){return this.thedef}),an.DEFMETHOD("mangle_names",function(o){(o=ai(o)).cache&&o.cache.props&&(n=oi(this,o),o.cache.props.each(function(e){n.set(e,!0)}));var n,a=-1,s=[],f=new Ye(function(e,n){var t,i,r;if(e instanceof de)return t=a,n(),o.v8&&function(e){var n,t=0;for(;n=e.parent(t++);){if(n instanceof Xe)return n instanceof an&&!o.toplevel;if(n instanceof de)return 1}}(f)||(a=t),!0;if(e instanceof Je)return o.webkit&&e instanceof Ke&&e.init instanceof Ln&&e.init.definitions.forEach(function(e){e.name.match_symbol(function(e){var n,t,i;e instanceof _t&&(n=e.definition(),t=e.scope.parent_scope,i=t.def_variable(e),e.thedef=n,t.to_mangle.push(i),n.redefined=function(){return i})})},!0),i=e.to_mangle=[],e.variables.each(function(e){!function(n){var e=n.orig[0],t=n.redefined();if(!t){if(!(e instanceof vt))return;var i=n.scope.resolve();if(n.scope===i)return;if(n.scope.parent_scope.find_variable(e.name))return;t=i.def_variable(e),i.to_mangle.push(t)}s.push(n),n.references.forEach(r),(e instanceof kt||e instanceof vt)&&r(e);return 1;function r(e){e.thedef=t,e.reference(o),e.thedef=n}}(e)&&i.push(e)}),n(),o.cache&&e instanceof an&&e.globals.each(c),e instanceof bn&&f.has_directive("use asm")&&((t=new Ie(e.name)).scope=e,t.reference(o)),(i=36<i.length?(n=i.map(function(e,n){return n}).sort(function(e,n){return i[n].references.length-i[e].references.length||e-n})).slice(0,36).sort(function(e,n){return e-n}).map(function(e){return i[e]}).concat(n.slice(36).sort(function(e,n){return e-n}).map(function(e){return i[e]})):i).forEach(c),!0;if(e instanceof Et){for(;r=Bi(++a),P[r];);return e.mangled_name=r,!0}});function c(e){o.reserved.has[e.name]||e.mangle(o)}this.walk(f),s.forEach(c)}),an.DEFMETHOD("find_colliding_names",function(t){var i=t.cache&&t.cache.props,n=Object.create(P);return t.reserved.forEach(r),this.globals.each(o),this.walk(new Ye(function(e){e instanceof Je&&e.variables.each(o)})),n;function r(e){n[e]=!0}function o(e){var n=e.name;if(e.global&&i&&i.has(n))n=i.get(n);else if(!e.unmangleable(t))return;r(n)}}),an.DEFMETHOD("expand_names",function(i){Bi.reset(),Bi.sort(),i=ai(i);var r=this.find_colliding_names(i),o=0;function n(n){var e,t;n.global&&i.cache||n.unmangleable(i)||i.reserved.has[n.name]||(e=n.redefined(),t=e?e.rename||e.name:function(){for(var e;e=Bi(o++),r[e];);return e}(),n.rename=t,n.forEach(function(e){e.definition()===n&&(e.name=t)}))}this.globals.each(n),this.walk(new Ye(function(e){e instanceof Je&&e.variables.each(n)}))}),ye.DEFMETHOD("tail_node",l),Oe.DEFMETHOD("tail_node",function(){return this.expressions[this.expressions.length-1]}),an.DEFMETHOD("compute_char_frequency",function(e){e=ai(e),Bi.reset();var n=dt.prototype.add_source_map;try{dt.prototype.add_source_map=function(){this.unmangleable(e)||Bi.consider(this.name,-1)},e.properties&&(Qn.prototype.add_source_map=function(){Bi.consider(this.property,-1)},Zn.prototype.add_source_map=function(){!function e(n){n instanceof fe?Bi.consider(n.value,-1):n instanceof Me?(e(n.consequent),e(n.alternative)):n instanceof Oe&&e(n.tail_node())}(this.property)}),Bi.consider(this.print_to_string(),1)}finally{dt.prototype.add_source_map=n,delete Qn.prototype.add_source_map,delete Zn.prototype.add_source_map}Bi.sort()});si=Object.create(null),ui=Ui("0123456789"),li=Ui("abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ$_"),Gi.consider=function(e,n){for(var t=e.length;0<=--t;)ci[e[t]]+=n},Gi.sort=function(){fi=li.sort(Wi).concat(ui).sort(Wi)},(Gi.reset=Vi)();var si,fi,ci,ui,li,n,pi,di,hi,vi,mi,_i,gi,bi,yi,wi,xi,ki,Ei,Si,Ti,Ai,Di,Oi,t,$i,qi,zi,Ci,Mi,Fi,Pi,ji,Ni,Ii,Hi,Yi,Ri,Li,Bi=Gi;function Ui(e){for(var n=[],t=0;t<e.length;t++){var i=e[t];n.push(i),si[i]=-.01*t}return n}function Vi(){fi=null,ci=Object.create(si)}function Wi(e,n){return ci[n]-ci[e]}function Gi(e){var n=li[e%54];for(e=Math.floor(e/54);0<=--e;e>>=6)n+=fi[63&e];return n}function Ji(e,n){if(!(this instanceof Ji))return new Ji(e,n);Ht.call(this,this.before,this.after),this.options=ue(e,{annotations:!n,arguments:!n,arrows:!n,assignments:!n,awaits:!n,booleans:!n,collapse_vars:!n,comparisons:!n,conditionals:!n,dead_code:!n,default_values:!n,directives:!n,drop_console:!1,drop_debugger:!n,evaluate:!n,expression:!1,functions:!n,global_defs:!1,hoist_exports:!n,hoist_funs:!1,hoist_props:!n,hoist_vars:!1,ie:!1,if_return:!n,imports:!n,inline:!n,join_vars:!n,keep_fargs:n,keep_fnames:!1,keep_infinity:!1,loops:!n,merge_vars:!n,negate_iife:!n,objects:!n,optional_chains:!n,passes:1,properties:!n,pure_funcs:null,pure_getters:!n&&"strict",reduce_funcs:!n,reduce_vars:!n,rests:!n,sequences:!n,side_effects:!n,spreads:!n,strings:!n,switches:!n,templates:!n,top_retain:null,toplevel:!(!e||!e.top_retain),typeofs:!n,unsafe:!1,unsafe_comps:!1,unsafe_Function:!1,unsafe_math:!1,unsafe_proto:!1,unsafe_regexp:!1,unsafe_undefined:!1,unused:!n,varify:!n,webkit:!1,yields:!n},!0);var e=this.options.evaluate,t=(this.eval_threshold=/eager/.test(e)?1/0:+e,this.options.global_defs);if("object"==typeof t)for(var i in t)/^@/.test(i)&&le(t,i)&&(t[i.slice(1)]=Qt(t[i],{expression:!0}));!0===this.options.inline&&(this.options.inline=4),this.drop_fargs=this.options.keep_fargs?_e:function(e,n){if(e.length_read)return!1;var t=e.name;if(!t)return n&&"Call"==n.TYPE&&n.expression===e;if(t.fixed_value()!==e)return!1;n=t.definition();if(n.direct_access)return!1;e=n.escaped;return e&&1!=e.depth};var r=this.options.pure_funcs,n=("function"==typeof r?this.pure_funcs=r:"string"==typeof r?this.pure_funcs=function(e){var n;return e instanceof De?n=e.expression:e instanceof qt&&(n=e.tag),!(n&&r===n.print_to_string())}:Array.isArray(r)?this.pure_funcs=function(e){var n;return e instanceof De?n=e.expression:e instanceof qt&&(n=e.tag),!(n&&Be(n.print_to_string(),r))}:this.pure_funcs=B,this.options.sequences),o=(this.sequences_limit=1==n?800:0|n,this.options.top_retain),e=(o instanceof RegExp?this.top_retain=function(e){return o.test(e.name)}:"function"==typeof o?this.top_retain=o:o&&("string"==typeof o&&(o=o.split(/,/)),this.top_retain=function(e){return Be(e.name,o)}),this.options.toplevel);this.toplevel="string"==typeof e?{funcs:/funcs/.test(e),vars:/vars/.test(e)}:{funcs:e,vars:e}}function Xi(e,n){var t,i=n.get_property();if(!(i instanceof ye)){if(e instanceof Pe){n=e.elements;if("length"==i)return Pr(n.length,e);"number"==typeof i&&i in n&&(t=n[i])}else if(e instanceof Ee){if("length"==i)return e.length_read=!0,Pr(e.argnames.length,e)}else if(e instanceof st)for(var i=""+i,r=e.properties,o=r.length;0<=--o;){if(!ha(r[o]))return;t||r[o].key!==i||(t=r[o].value)}return t instanceof Ie&&t.fixed_value()||t}}function Ki(e,n,t,i,r,o,a){var s=n.parent(r);if(!(e.option("unsafe")&&s instanceof Qn&&(c=i,f=s.property,c instanceof C?$i.Boolean[f]:c instanceof He?$i.Number[f]:c instanceof fe?$i.String[f]:"valueOf"!=f&&(c instanceof Pe?$i.Array[f]:c instanceof Ee?$i.Function[f]:c instanceof st?$i.Object[f]:c instanceof Ct&&($i.RegExp[f]&&!c.value.global))))){var f=ti(t,s);if(f)return f;if(0!=r||!i||!i.is_constant()){if(s instanceof Pe)return Ki(e,n,s,s,r+1);if(s instanceof Fe)switch(s.operator){case"=":return Ki(e,n,s,i,r+1,o,a);case"&&=":case"||=":case"??=":return Ki(e,n,s,s,r+1);default:return}if(s instanceof Ce)return xi[s.operator]?Ki(e,n,s,s,r+1):void 0;if(s instanceof De)return!o&&s.expression===t&&!s.is_expr_pure(e)&&(!(i instanceof fn)||!(s instanceof Xn)&&i.contains_this());if(s instanceof Me)return s.condition===t?void 0:Ki(e,n,s,s,r+1);if(s instanceof tn)return s.init===t;if(s instanceof ct){if(s.value!==t)return;var c=n.parent(r+1);return Ki(e,n,c,c,r+2)}if(s instanceof $e){if(s.expression!==t)return;var u=Xi(i,s);return(!o||a)&&Ki(e,n,s,u,r+1)}return s instanceof Oe&&s.tail_node()===t?Ki(e,n,s,i,r+1,o,a):void 0}}}function Qi(e){return e instanceof wn||e instanceof Ee}function Zi(e){return e instanceof wn||e instanceof bn||e instanceof vn}function er(e){return"arguments"==e.name&&e.scope.uses_arguments}function nr(e,n){do{if(e===n)return;if(n instanceof ke)return 1}while(n=n.parent_scope)}function tr(e,n,t){var i=e.redef||e.definition();return(!e.in_arg||!ei(i))&&ge(i.orig,function(e){return e instanceof vt||e instanceof _t?e instanceof mt||n&&Jo(n,e):!(t&&e instanceof yt)})}function ir(e,n,t,i){return i instanceof Fe?"="==i.operator&&i.right===t:i instanceof De?i.expression!==t||i instanceof Xn:i instanceof On?i.value===t&&n.resolve()!==e.scope.resolve():i instanceof Te&&i.value===t}function rr(e,n,t){t.assignments=0,t.bool_return=0,t.drop_return=0,t.cross_loop=!1,t.direct_access=!1,t.escaped=[],t.fixed=!t.const_redefs&&!t.scope.pinned()&&!n.exposed(t)&&!(t.init instanceof fn&&t.init!==t.scope)&&t.init,t.reassigned=0,t.recursive_refs=0,t.references=[],t.single_use=void 0}function or(e,n,t){t.variables.each(function(e){rr(0,n,e)})}function ar(t,i,r){r.fn_defs=[],r.variables.each(function(e){rr(0,i,e);var n=e.init;n instanceof Q&&(r.fn_defs.push(n),n.safe_ids=null),null===e.fixed?(e.safe_ids=t.safe_ids,hr(t,e)):e.fixed&&(t.loop_ids[e.id]=t.in_loop,hr(t,e))}),r.may_call_this=function(){r.may_call_this=r.contains_this()?B:_e},r.uses_arguments&&r.each_argname(function(e){e.definition().last_ref=!1}),i.option("ie")&&r.variables.each(function(e){var n=e.orig[0].definition();n!==e&&(n.fixed=!1)})}function sr(e,n){n=n.safe_ids;return void 0===n||n===e.safe_ids}function fr(e,n){var t=e.fn_scanning;(e.fn_scanning=n).walk(e),e.fn_scanning=t}function cr(t,i){i.enclosed.forEach(function(e){var n;i.variables.get(e.name)===e||mr(t,e)||(e.single_use=!1,(n="function"==typeof(n=e.fixed)?n():n)instanceof Ee&&void 0!==n.safe_ids||(e.fixed=!1))})}function ur(e,n,t){var i,r=t.safe_ids;void 0!==r&&!1!==r&&(t.parent_scope.resolve().may_call_this===B?Be(t,e.fn_visited)&&cr(e,t):r?(i=Be(t,e.fn_visited),r===e.safe_ids?i||fr(e,t):i?cr(e,t):t.safe_ids=!1):e.fn_scanning&&e.fn_scanning!==n.scope.resolve()?t.safe_ids=!1:(t.safe_ids=e.safe_ids,fr(e,t)))}function lr(n,e){var t=e.fn_defs,i=e.may_call_this===B?t:t.filter(function(e){return!1===e.safe_ids||(e.safe_ids=n.safe_ids,fr(n,e),!1)});dr(n),i.forEach(function(e){e.safe_ids=n.safe_ids,fr(n,e)}),t.forEach(function(e){e.safe_ids=void 0}),e.fn_defs=void 0,e.may_call_this=void 0}function pr(e){e.safe_ids=Object.create(e.safe_ids)}function dr(e){e.safe_ids=Object.getPrototypeOf(e.safe_ids)}function hr(e,n){e.safe_ids[n.id]={}}function vr(e,n){e.references.push(n),!1!==e.last_ref&&(e.last_ref=n)}function mr(e,n){if("m"==n.single_use)return!1;var t,i=e.safe_ids[n.id];return i?((t=le(e.safe_ids,n.id))||(i.read=!(!i.read||i.read===e.safe_ids)||e.safe_ids),null==n.fixed?!er(n)&&((!n.global||"arguments"!=n.name)&&(e.loop_ids[n.id]=null,n.fixed=Re(Ft,n.orig[0]),t&&(n.safe_ids=void 0),!0)):!i.assign||i.assign===e.safe_ids):n.fixed instanceof Q}function _r(e,n,t){if(!t){if(ei(n)&&n.scope.uses_arguments&&!e.has_directive("use strict"))return;if(!ge(n.orig,function(e){return!(e instanceof vt)}))return}if(void 0===n.fixed)return t||ge(n.orig,function(e){return!(e instanceof _t)});if(!1!==n.fixed&&0!==n.fixed){t=e.safe_ids[n.id];if(n.safe_ids)return n.safe_ids[n.id]=!1,n.safe_ids=void 0,null===n.fixed||le(e.safe_ids,n.id)&&!t.read;if(!le(e.safe_ids,n.id)){if(!t)return;if(t.read){var i=e.find_parent(Je);if(i instanceof wn)return;if(n.scope.resolve()!==i.resolve())return}t.assign=!(!t.assign||t.assign===e.safe_ids)||e.safe_ids}if(null!=n.fixed&&t.read){if(t.read!==e.safe_ids)return;if(e.loop_ids[n.id]!==e.in_loop)return}return mr(e,n)&&ge(n.orig,function(e){return!(e instanceof yt)})}}function gr(e,n){var t=Re(Ie,e,e);return t.fixed=n||Re(Ft,e),t}function br(t,i){return function(){var e=gr(t,i),n=t.definition();return n.references.push(e),n.replaced++,e}}function yr(e){return!!e&&(e instanceof Fe?"="==(n=e.operator)?yr(e.right):!xi[n.slice(0,-1)]:e instanceof Oe?yr(e.tail_node()):e.is_constant()||Qi(e)||e instanceof At);var n}function wr(e,n,t,i,r,o,a){var s,f=e.parent(o);if(!r||!r.is_constant()){if(ir(n,t,i,f))return n.escaped.push(f),!(1<a)||r&&r.is_constant_expression(t)||(a=1),(!n.escaped.depth||n.escaped.depth>a)&&(n.escaped.depth=a),n.scope.resolve()!==t.resolve()&&(n.escaped.cross_scope=!0),void(n.fixed&&(n.fixed.escaped=n.escaped));if(c=i,(s=f)instanceof Pe||(s instanceof Ce?xi[s.operator]:s instanceof Me?s.condition!==c:s instanceof Oe?s.tail_node()===c:s instanceof qe))wr(e,n,t,f,f,o+1,a);else if(f instanceof ct&&f.value===i){var c=e.parent(o+1);wr(e,n,t,c,c,o+2,a)}else if(f instanceof $e&&f.expression===i&&(wr(e,n,t,f,r=Xi(r,f),o+1,a+1),r))return;0<o||f instanceof De&&f.expression===i||f instanceof Oe&&f.tail_node()!==i||f instanceof we||f instanceof et&&!ni[f.operator]||(n.direct_access=!0,n.fixed&&(n.fixed.direct_access=!0))}}function xr(e){var n;e instanceof Zn&&((n=e.expression)instanceof Ie&&er(n=n.definition())&&((e=(e=e.property).is_constant()?e.value:e)instanceof ye||pi.test(e))&&(n.reassigned++,(e instanceof ye?n.scope.argnames:[n.scope.argnames[e]]).forEach(function(e){e instanceof Ne&&(e.definition().fixed=!1)})))}function kr(n,t){var i,r;return function(){var e=n();return r=i!==e?t(i=e):r}}function Er(c,n,e,u,l){var p=new Ye(function(i){var t,r,o,a,s,f,e;return i instanceof Ae?(Tr(i),pr(c),i.value.walk(c),dr(c),(e=u)&&(t=n,r=i,o=e,u=function(){var e,n=o();return no(n,t)||void 0===(e=Lo(t,n,!0))?s=a!==n?Le(r,[a=n,r.value]):s:e instanceof ye?r:n}),i.name.walk(p),u=e):i instanceof rt?(Tr(i),e=u,i.elements.forEach(function(n,t){if(n instanceof Pt)return Tr(n);e&&(u=kr(e,function(e){return Re(Zn,n,{expression:e,property:Re(He,n,{value:t})})})),n.walk(p)}),i.rest&&(e&&(u=n.option("rests")&&kr(e,function(e){if(!(e instanceof Pe))return i;for(var n=0,t=i.elements.length;n<t;n++)if(e.elements[n]instanceof qe)return i;return(f=f||Re(Pe,i)).elements=e.elements.slice(t),f})),i.rest.walk(p)),u=e):i instanceof at?(Tr(i),e=u,i.properties.forEach(function(i){Tr(i),i.key instanceof ye&&(pr(c),i.key.walk(c),dr(c)),e&&(u=kr(e,function(e){var n=i.key,t=Zn;return"string"==typeof n&&(Lt(n)?t=Qn:n=Pr(n,i)),Re(t,i,{expression:e,property:n})})),i.value.walk(p)}),i.rest&&(u=!1,i.rest.walk(p)),u=e):l(i,u,function(){for(var e=c.stack.length,n=0,t=p.stack.length-1;n<t;n++)c.stack.push(p.stack[n]);i.walk(c),c.stack.length=e}),!0});e.walk(p)}function Sr(i,e,r){var n,o=this,a=(o.inlined=!1,i.parent()),t=un(o)||ln(o),s=!1,f=(o.walk(new Ye(function(e){return t?s=!0:e instanceof $n?t=!0:e instanceof ke&&e!==o||void 0})),s&&pr(i),ar(i,r,o),!o.uses_arguments||i.has_directive("use strict")),c=(o.argnames.forEach(function(n,e){var t=a.args[e];Er(i,r,n,function(){var e=o.argnames.indexOf(n),e=e<0?t:a.args[e];return(e=e instanceof Oe&&e.expressions.length<2?e.expressions[0]:e)||Re(Ft,a)},l)}),o.rest),u=(c&&Er(i,r,c,r.option("rests")&&function(){return o.rest!==c?c:((n=n||Re(Pe,o)).elements=a.args.slice(o.argnames.length),n)},l),D(o,i),i.safe_ids);return lr(i,o),s||(i.safe_ids=u),!0;function l(e,n){var t=e.definition();n&&f&&void 0===t.fixed?(hr(i,t),i.loop_ids[t.id]=i.in_loop,t.fixed=n,t.fixed.assigns=[e]):t.fixed=!1}}function Tr(e){e._squeezed=!1,e._optimized=!1,e instanceof Je&&(e._var_names=void 0),e instanceof Ie&&(e.fixed=void 0)}function Ar(t,i){return this.transform(new Ht(function(e,n){return e instanceof Ae?((e=e.clone()).name=e.name.transform(this),e):e instanceof je?(n(e=e.clone(),this),e):e instanceof ot?((e=e.clone()).value=e.value.transform(this),e):e.convert_symbol(t,i)}))}function Dr(e,n){e=Re(e,this,this);return n(e,this),e}function Or(e){var n=e.definition();n.assignments++,n.references.push(e)}function $r(n,t){var i=new Ye(function(e){return e instanceof Ae?(e.value.walk(t),e.name.walk(i),!0):e instanceof ot?(e.key instanceof ye&&e.key.walk(t),e.value.walk(i),!0):n(e)});this.walk(i)}function qr(e){return e(this)}function zr(n,t){var i=!1,r=new Ye(function(e){return!!i||(e instanceof Ae?t?(e.name.walk(r),!0):i=!0:e instanceof ot?!t&&e.key instanceof ye?i=!0:(e.value.walk(r),!0):n(e)?i=!0:void 0)});return this.walk(r),i}function Cr(e){return e instanceof gn||e instanceof hn}function Mr(e){for(var n,t=0;n=e.parent(t++);)if(n.variables)return n}function Fr(e,n){if(e instanceof At)return!0;if(e instanceof $e){if("__proto__"===e.property)return!0;if((e=e.expression)instanceof Ie){if(e.is_immutable())return!1;e=e.fixed_value()}return e?!!e.tail_node().is_constant()||Fr(e,n):!0}if(e instanceof Ie){if(e.is_immutable())return!0;e=e.definition();return n.exposed(e)&&di[e.name]}return!1}function Re(e,n,t){return t=t||{},n&&(t.start||(t.start=n.start),t.end||(t.end=n.end)),new e(t)}function Le(e,n){return 1==n.length?n[0]:Re(Oe,e,{expressions:n.reduce(Ir,[])})}function Pr(e,n){switch(typeof e){case"string":return Re(fe,n,{value:e});case"number":return isNaN(e)?Re(z,n):isFinite(e)?1/e<0?Re(ze,n,{operator:"-",expression:Re(He,n,{value:-e})}):Re(He,n,{value:e}):e<0?Re(ze,n,{operator:"-",expression:Re(jt,n)}):Re(jt,n);case"boolean":return Re(e?It:Nt,n);case"undefined":return Re(Ft,n);default:if(null===e)return Re(Mt,n);if(e instanceof RegExp)return Re(Ct,n,{value:e});throw new Error(m("Can't handle constant of type: {type}",{type:typeof e}))}}function jr(e,n){return n instanceof $e||Gr(n)&&"eval"==n.name}function Nr(e,n,t,i){var r=!1;return"Call"==n.TYPE?r=n.expression===t&&jr(0,i):n instanceof qt?r=n.tag===t&&jr(0,i):n instanceof ze&&(r="delete"==n.operator||"typeof"==n.operator&&Gr(i)),r?Le(t,[Re(He,t,{value:0}),i]):i}function Ir(e,n){return n instanceof Oe?[].push.apply(e,n.expressions):e.push(n),e}function Hr(e){return e instanceof Rn||e instanceof xn||e instanceof Ln}function Yr(e){var n,t;return e instanceof Q?(n=e.name.definition(),t=e.name.scope,n.scope===t||ge(n.references,function(e){var n=e.scope;do{if(n===t)return 1}while(n=n.parent_scope)})):!Hr(e)}function Rr(e){if(null===e)return[];if(e instanceof xe)return ge(e.body,Yr)?e.body:[e];if(e instanceof We)return[];if(Ge(e))return[e];throw new Error("Can't convert thing to statement array")}function Lr(e){return null===e||(e instanceof We||e instanceof xe&&0==e.body.length)}function Br(e){return ge(e.body,function(e){return Lr(e)||e instanceof bn||e instanceof Bn&&Jr(e)})}function Ur(e){return e instanceof Ke&&e.body instanceof xe?e.body:e}function Vr(e){if("Call"!=e.TYPE)return!1;for(;(e=e.expression)instanceof $e;);return e instanceof fn?!cn(e):Vr(e)}function Wr(e){var n=e.expression;if(n.name)return!1;if(!(e instanceof Xn))return!0;var t=!1;return n.walk(new Ye(function(e){return!!t||(e instanceof $t?t=!0:e instanceof ke&&e!==n||void 0)})),!t}function Gr(e){return e instanceof Ie&&e.definition().undeclared}function Jr(e){return ge(e.definitions,function(e){return!e.value})}function Xr(e,n){return e instanceof xn?n&&!e.extends&&ge(e.properties,function(e){return!(e.key instanceof ye)&&!(e instanceof Sn&&e.static&&e.value)}):e instanceof Yn?(n||e instanceof Bn)&&Jr(e):e instanceof Un||e instanceof Vn?Xr(e.body,n):e instanceof Q}function Kr(e,n){var t=e.lastIndexOf(n);if(t<0)return!1;for(;++t<e.length;)if(!Xr(e[t],!0))return!1;return!0}function Qr(e,n){var t;if(e.init instanceof xe&&(t=e.init,e.init=t.body.pop(),t.body.push(e)),e.init instanceof bn?((t=t||Re(xe,e,{body:[e]})).body.splice(-1,0,e.init),e.init=null):e.init instanceof we?e.init=e.init.body:Lr(e.init)&&(e.init=null),t)return n?Ue.splice(t.body):t}function Zr(e,l){var de,he,ve,me,E=S(l,function(e){return e instanceof Ee}),n=l.self(),t=0;do{if(!de&&n.variables&&(de=n),n instanceof In)l.parent(t).bfinally&&((ve=ve||{}).bfinally=!0),t++;else if(n instanceof Hn)t++;else if(n instanceof Ke)he=!0;else{if(n instanceof ke){me=n;break}n instanceof Nn&&(ve=ve||{},n.bcatch&&(ve.bcatch=!0),n.bfinally&&(ve.bfinally=!0))}}while(n=l.parent(t++));var i,r,o=10;do{if(r=i,i=0,!(i=!function e(n){var t=!1,i=[];for(var r=0;r<n.length;){var o=n[r];if(o instanceof xe&&ge(o.body,Yr))t=!0,e(o.body),[].splice.apply(n,[r,1].concat(o.body)),r+=o.body.length;else{if(o instanceof pe){if(Be(o.value,i)){t=!0,n.splice(r,1);continue}i.push(o.value)}o instanceof We?(t=!0,n.splice(r,1)):r++}}return t}(e)?i:1)&&1==r)break;if(l.option("dead_code")&&!(i=!function(n,t){for(var e,i=t.self(),r=0,o=0,a=n.length;r<a;r++){var s,f=n[r];if(!(f instanceof zn)||Ur(s=t.loopcontrol_target(f))!==i||f instanceof Cn&&s instanceof Ke?n[o++]=f:f.label&&T(f.label.thedef.references,f),Eo(f)){e=n.slice(r+1);break}}n.length=o,e&&e.forEach(function(e){eo(t,e,n)});return n.length!=a}(e,l)?i:2)&&2==r)break;if(l.option("if_return")&&!(i=!function(o,a){for(var e,n=!1,t=a.parent(),i=a.self(),r=E&&t&&"Call"==t.TYPE&&t.expression===i,s=E&&a.option("conditionals")&&a.option("sequences"),f=function(e){for(var n=0,t=e.length;0<=--t;){var i=e[t];if(i instanceof Se&&i.body instanceof $n&&1<++n)return!0}return!1}(o),c=o.length;0<=--c;){var u,l,p,d=o[c],h=k(c),v=o[h];if(E&&!v&&d instanceof $n){if(!d.value){n=!0,o.splice(c,1);continue}var m=d.value.tail_node();if(m instanceof ze&&"void"==m.operator){n=!0,m===d.value?e=m.expression:(e=d.value.clone()).expressions[e.length-1]=m.expression,o[c]=Re(we,d,{body:e});continue}}if(d instanceof Se){m=Eo(d.body);if(y(m)){m.label&&T(m.label.thedef.references,m),n=!0,(d=d.clone()).body=Re(xe,d,{body:x(d.body,m)}),d.alternative=Re(xe,d,{body:Rr(d.alternative).concat(w())}),o[c]=d,o[c]=d.transform(a);continue}if(m&&!d.alternative&&v instanceof O){var _=d.condition;if((_=ao(_,_.negate(a),d.body instanceof xe))!==d.condition){n=!0,(d=d.clone()).condition=_,o[h]=d.body,d.body=v,o[c]=d,o[c]=d.transform(a);continue}}var g,_=Eo(d.alternative);if(y(_)){_.label&&T(_.label.thedef.references,_),n=!0,(d=d.clone()).body=Re(xe,d.body,{body:Rr(d.body).concat(w())}),d.alternative=Re(xe,d.alternative,{body:x(d.alternative,_)}),o[c]=d,o[c]=d.transform(a);continue}a.option("typeofs")&&(m&&!_&&(g=Re(xe,i,{body:o.slice(c+1)}),Ro(d.condition,null,g)),!m&&_&&(g=Re(xe,i,{body:o.slice(c+1)}),Ro(d.condition,g)))}d instanceof Se&&d.body instanceof $n&&(p=d.body.value,u=d.body.in_bool||v instanceof $n&&v.in_bool,!d.alternative&&v instanceof $n?(n=!0,(d=d.clone()).alternative=v,o.splice(c,1,d.transform(a)),o.splice(h,1)):!d.alternative&&!v&&E&&(u||p&&f)?(n=!0,(d=d.clone()).alternative=Re($n,d,{value:null}),o.splice(c,1,d.transform(a))):s&&!d.alternative&&(!(p=o[u=function(e){for(var n=e;0<=--n&&o[n]instanceof Bn;);return n}(c)])&&r||p instanceof Se&&p.body instanceof $n)&&k(h)==o.length&&v instanceof we&&(n=!0,l=[],p=p?function(e,n){var t=[e+1,c-e],i=[];for(;++e<c;){var r=o[e];r.remove_initializers(a,i),r.definitions.forEach(function(e){e.value&&n.push(Re(Fe,e,{operator:"=",left:e.name.convert_symbol(Ie,Or),right:e.value}))})}0<i.length&&t.push(Re(Bn,r,{definitions:i}));return t}(u,l):[c,1],d=d.clone(),l.push(d.condition),d.condition=Le(d,l),d.alternative=Re(xe,v,{body:[v,Re($n,v,{value:null})]}),p.push(d.transform(a)),o.splice(h,1),[].splice.apply(o,p),c=u+1))}return n;function b(n){return S(a,function(e){return e===n})}function y(e){if((e=e)instanceof $n?E&&no(e.value):e instanceof zn?(n=a.loopcontrol_target(e),e instanceof Mn?b(Ur(n)):!(n instanceof Ke)&&b(n)):void 0){for(var n,t=o.length;--t>c;){var i=o[t];if(i instanceof xn){if(i.name.definition().preinit)return}else if((i instanceof Rn||i instanceof Ln)&&!ge(i.definitions,function(e){return!e.name.match_symbol(function(e){return e instanceof ht&&e.definition().preinit})}))return}return 1}}function w(){var n=[],t=!1,e=o.splice(c+1).filter(function(e){return e instanceof Q?(n.push(e),!1):(Hr(e)&&(t=!0),!0)});return[].push.apply(t?e:o,n),e}function x(e,n){for(var t,e=Rr(e),i=e;(t=i[i.length-1])!==n;)i=t.body;return i.pop(),n.value&&i.push(Re(we,n.value,{body:n.value})),e}function k(e){for(var n=e+1;n<o.length&&Xr(o[n]);n++);return n}}(e,l)?i:3)&&3==r)break;if(l.option("awaits")&&l.option("side_effects")&&!(i=!function(e,n){if(!(!E||ve&&ve.bfinally)){for(var t=!1,i=e.length;0<=--i;){var r=e[i];if(!(r instanceof we))break;var o=r.body;if(!(o instanceof tt))break;o=o.expression;if(!ra(n,o))break;if(t=!0,o=o.drop_side_effect_free(n,!0)){r.body=o;break}}return e.length=i+1,t}}(e,l)?i:4)&&4==r)break;if(4<=l.option("inline")&&!(i=!function(e,n){var t=!1,i=e.length-1;E&&0<=i&&(o=e[i].try_inline(n,de))&&(e[i--]=o,t=!0);for(var r=he&&ve&&ve.bfinally?"try":he;0<=i;i--){var o;(o=e[i].try_inline(n,de,!0,r))&&(e[i]=o,t=!0)}return t}(e,l)?i:5)&&5==r)break;if(0<l.sequences_limit){if(!(i=!function(n,e){if(!(n.length<2)){for(var t=[],i=0,r=0,o=n.length;r<o;r++){var a=n[r];a instanceof we?(t.length>=e.sequences_limit&&s(),Ir(t,a.body)):(Xr(a)||s(),n[i++]=a)}return s(),(n.length=i)!=o}function s(){var e;t.length&&(e=Le(t[0],t),n[i++]=Re(we,e,{body:e}),t=[])}}(e,l)?i:6)&&6==r)break;if(!(i=!function(e,n){for(var t,i=!1,r=0,o=0;o<e.length;o++){var a,s=e[o];if(t&&(s instanceof On?!s.value&&Cr(me)||(s.value=p(s.value||Re(Ft,s)).optimize(n)):s instanceof nn?s.init instanceof Yn||(a=!1,t.body.walk(new Ye(function(e){return!!(a||e instanceof ke)||(e instanceof Ce&&"in"==e.operator?a=!0:void 0)})),a||(s.init?s.init=p(s.init):(s.init=t.body,r--,i=!0))):s instanceof rn?Hr(s.init)||(s.object=p(s.object)):s instanceof Se?s.condition=p(s.condition):(s instanceof Fn||s instanceof on)&&(s.expression=p(s.expression))),n.option("conditionals")&&s instanceof Se){var f=[],c=d(s.body,f),u=d(s.alternative,f);if(!1!==c&&!1!==u&&0<f.length){var l=f.length;f.push(Re(Se,s,{condition:s.condition,body:c||Re(We,s.body),alternative:u})),f.unshift(r,1),[].splice.apply(e,f),o+=l,r+=l+1,i=!(t=null);continue}}e[r++]=s,t=s instanceof we?s:null}return e.length=r,i;function p(e){r--,i=!0;var n=t.body;return Le(n,[n,e])}}(e,l)?i:7)&&7==r)break}if(l.option("join_vars")&&!(i=!function(e){for(var r,o=!1,n=0,t=-1;n<e.length;n++){var i,a,s,f=e[n],c=e[t];if(f instanceof Yn)c&&c.TYPE==f.TYPE?(c.definitions=c.definitions.concat(f.definitions),o=!0):r&&r.TYPE==f.TYPE&&Jr(f)?(r.definitions=r.definitions.concat(f.definitions),o=!0):f instanceof Bn?((a=v(c,f))?(a.length&&(c.body=Le(c,a),t++),o=!0):t++,e[t]=r=f):e[++t]=f;else{if(f instanceof On)f.value=u(f.value);else if(f instanceof nn)if(a=h(c,f.init))o=!0,f.init=a.length?Le(f.init,a):null;else{if(c instanceof Bn&&(!f.init||f.init.TYPE==c.TYPE)){f.init&&(c.definitions=c.definitions.concat(f.init.definitions)),f=f.clone(),r=f.init=c,e[t]=l(f),o=!0;continue}if(r&&f.init&&r.TYPE==f.init.TYPE&&Jr(f.init))r.definitions=r.definitions.concat(f.init.definitions),f.init=null,o=!0;else if(f.init instanceof Bn&&(r=f.init,a=v(c,f.init))){if(o=!0,0==a.length){e[t]=l(f);continue}c.body=Le(c,a)}}else if(f instanceof tn)r&&r.TYPE==f.init.TYPE&&(i=r.definitions.slice(),f.init=f.init.definitions[0].name.convert_symbol(Ie,function(e,n){i.push(Re(Te,n,{name:n,value:null})),n.definition().references.push(e)}),r.definitions=i,o=!0),f.object=u(f.object);else if(f instanceof Se)f.condition=u(f.condition);else if(f instanceof we){if(a=h(c,f.body)){if(o=!0,!a.length)continue;f.body=Le(f.body,a)}else if(c instanceof Yn&&(s=e[n+1])&&c.TYPE==s.TYPE&&(s=s.definitions[0]).value){o=!0,s.value=Le(f,[f.body,s.value]);continue}}else(f instanceof Fn||f instanceof on)&&(f.expression=u(f.expression));e[++t]=r?l(f):f}}return e.length=t+1,o;function u(e){var n=h(c,e,1);if(!n)return e;o=!0;var t=e.tail_node();return n[n.length-1]!==t&&n.push(t.left),Le(e,n)}function l(e){return e.transform(new Ht(function(e,n,t){if(e instanceof Yn){if(r===e)return e;if(r.TYPE!=e.TYPE)return e;var i=this.parent();return i instanceof tn&&i.init===e?e:Jr(e)?(r.definitions=r.definitions.concat(e.definitions),o=!0,i instanceof nn&&i.init===e?null:t?Ue.skip:Re(We,e)):e}return!(e instanceof Un)&&!(e instanceof ke)&&Ge(e)?void 0:e}))}}(e)?i:8)&&8==r)break;!l.option("collapse_vars")||!function(i,p){if(!me.pinned()){for(var d,j,N=new be,h=[],a=!1,v=new be,r=i.length,c=new Ht(function(e,n){if(O)return e;if(!D)return e!==m[_]?e:++_<m.length?C(e,c):(D=!0,(b=(g?F:ee)(e,0))===e&&(O=!0),e);var t,i,r,o=c.parent();if(!y&&Q(e,o)&&(y=o),E&&H&&q&&!y&&e instanceof Fe&&"="!=e.operator&&e.left.equivalent_to(w))return $++,a=!0,ye.info("Cascading {node} [{file}:{line},{col}]",{node:e,file:e.start.file,line:e.start.line,col:e.start.col}),q=!1,S=ce(w),e.right.transform(c),se(f),i=O?f:(O=!0,Re(Ce,f,{operator:E,left:w.fixed&&w.definition().fixed?w.fixed.to_binary():w,right:A})),Re(Fe,e,{operator:"=",left:e.left,right:Re(Ce,e,{operator:e.operator.slice(0,-1),left:i,right:e.right})});if(function(e,n){if(e===A)return 1;if(n instanceof nn&&e!==n.init)return 1;if(e instanceof Fe)return"="!=e.operator&&w.equivalent_to(e.left);if(e instanceof De)return w instanceof $e&&(w.equivalent_to(e.expression)&&(!(A instanceof fn)||A.contains_this()));return e instanceof wn?!p.has_directive("use strict"):e instanceof Ve||(e instanceof bn?Y&&w.name===e.name.name:e instanceof ot?e.key instanceof ye:e instanceof Qe||(e instanceof zn||(e instanceof Nn||e instanceof on)))}(e,o))return O=!0,e;if(e.single_use&&o instanceof Te&&o.value===e)return e;if(e instanceof ht||!(H&&w.equivalent_to(e)||k&&(t=k(e,this))))return function(e,n){if(!(e instanceof Ie))return;if(e.is_declared(p)){if(e.fixed_value())return;if(tr(e))return!(n instanceof $e&&n.expression===e)&&er(e.definition())}else if(K(e,n))return;return!J||(k=!1)}(e,o)?(O=!0,e):((Z(e,o)||R(e))&&(b=e)instanceof ke&&(O=!0),e instanceof sn||e instanceof je?(r=q,q=!1,n(e,c),q=r,X(e)):e instanceof Ae?(e.name=e.name.transform(c),r=q,q=!1,e.value=e.value.transform(c),q=r,X(e)):!(e instanceof Je)||e instanceof ke||e.variables&&e.variables.all(function(e){return!U.has(e.name)&&!S.has(e.name)})?C(e,c):(r=q,q=!1,C(e,c)||n(e,c),q=r,X(e)));if(!q||y&&(t||!W||!J))return t||g||(O=!0),e;if(ti(e,o))return g&&!t&&(l=!0),e;if(!t&&I&&e.fixed!==w.fixed)return O=!0,e;if(g)return y&&0==u&&(u=s-$),t||$++,e;if($++,a=O=!0,ye.info("Collapsing {node} [{file}:{line},{col}]",{node:e,file:e.start.file,line:e.start.line,col:e.start.col}),"Binary"==f.TYPE)return fe(f,e),Re(Fe,f,{operator:"=",left:f.right.left,right:"&&"==f.operator?Re(Me,f,{condition:f.left,consequent:f.right.right,alternative:e}):Re(Me,f,{condition:f.left,consequent:e,alternative:f.right.right})});if(f instanceof nt)return Re(ze,f,{operator:f.operator,expression:w.fixed&&w.definition().fixed?w.fixed.to_prefix():w});if(f instanceof ze)return se(f),f;if(fe(A,e),f instanceof Te)return(i=f.name.definition()).references.length-i.replaced!=1||p.exposed(i)?Re(Fe,f,{operator:"=",left:e,right:A}):(i.replaced++,Nr(0,o,e,A));se(A);n=f.clone();return n.right=A,n},X),o=new Ht(function(e){if(O)return e;if(!D){if(e!==m[_])return e;switch(_++,m.length-_){case 0:if(D=!0,l)return e;if(e!==f)return e;if(e instanceof Te)return e;z.replaced++;var n=o.parent();return n instanceof Oe&&n.tail_node()!==e?(g.replaced++,A===T?Ue.skip:Le(T,T.expressions.slice(0,-1))):A;case 1:if(!l&&e.body===f)return D=!0,z.replaced++,g.replaced++,null;default:return C(e,o)}}if(e instanceof Ie&&e.definition()===z){if(ti(e,o.parent()))return e;--$||(O=!0),ye.info("Replacing {node} [{file}:{line},{col}]",{node:e,file:e.start.file,line:e.start.line,col:e.start.col});var t=A.clone();return(t.scope=e.scope,t.reference(),$==u)?(O=!0,Re(Fe,f,{operator:"=",left:e,right:t})):(z.replaced++,t)}return e instanceof Pn||e instanceof ke?e:void 0},function(e){return ue(e,o)});0<=--r;){0==r&&p.option("unused")&&!function(){var e,n,r=p.self();if(r instanceof fn&&!ln(r)&&!r.uses_arguments&&!r.pinned()&&(e=p.parent())instanceof De&&e.expression===r&&Wr(e)&&ge(e.args,function(e){return!(e instanceof qe)}))for(var o=p.has_directive("use strict"),a=(o&&!Be(o,r.body)&&(o=!1),un(r)?function(e){return e instanceof dt&&"await"==e.name}:function(e){return e instanceof tt&&!t.find_parent(ke)}),s=null,t=new Ye(function(e,n){if(!l)return!0;if(a(e)||e instanceof it)return!(l=null);if(e instanceof At&&(o||!s))return!(l=null);if(e instanceof Ie&&r.variables.has(e.name)){var t=e.definition().scope;if(t!==me)for(;t=t.parent_scope;)if(t===me)return!0;l=null}var i;return e instanceof ke&&!cn(e)?(i=s,s=e,n(),s=i,!0):void 0}),i=(d=e.args.slice()).length,f=new be,c=r.argnames.length;0<=--c;){var u=r.argnames[c],l=d[c];if(u instanceof Ae&&(n=u.value,u=u.name,d[i+c]=n),u instanceof je){if(!function n(e,t){if(!t)return!(e instanceof dt);if(e instanceof Ae)return t.has_side_effects(p)||e.value.has_side_effects(p)||n(e.name,no(t)&&e.value);if(e instanceof je)return!(!e.rest||!n(e.rest))||(e instanceof rt?!(t instanceof Pe||t.is_string(p))||!ge(e.elements,function(e){return!n(e)}):e instanceof at?!t.is_defined(p)||!ge(e.properties,function(e){return!(e instanceof ye&&e.has_side_effects(p))&&!n(e.value)}):void 0)}(u,l))continue;h.length=0;break}f.has(u.name)||(f.set(u.name,!0),(l=n?no(l)?n:null:l)||n?l instanceof Ee&&l.pinned()?l=null:l&&l.walk(t):l=Re(Ft,u).transform(p),l&&((u=Re(Te,u,{name:u,value:l})).name_index=c,u.arg_index=n?i+c:c,h.unshift([u])))}}();var m=[];for(M(i[r]);0<h.length;){m=h.pop();var s,_=0,f=m[m.length-1],u=-1,l=!1,I=!1,g=null,b=null,y=null,w=function(n){if(n instanceof Fe){if(!((t=n.left)instanceof Ie))return t;var e=t.definition();return me.uses_arguments&&ei(e)?t:(p.exposed(e)||(s=re(e),e.fixed&&t.fixed&&((i=e.references.filter(function(e){return e.fixed===t.fixed}).length-1)<s&&(s=i,I=!(u=0))),"="==n.operator&&ie(n.right)),t)}if(n instanceof Ce)return n.right.left;if(n instanceof et)return n.expression;if(n instanceof Te){var t,i,e=(t=n.name).definition();if(!e.const_redefs)if(Be(t,e.orig))if(!me.uses_arguments||!ei(e))return i=e.orig.length-e.eliminated-(v.get(e.name)||0),s=re(e),e.fixed&&(s=Math.min(s,e.references.filter(function(e){if(!e.fixed)return!0;if(!e.fixed.assigns)return!0;e=e.fixed.assigns[0];return e===t||oe(e)===n.value}).length)),1<i&&!(t instanceof Ne)?(ie(n.value),Re(Ie,t,t)):ie(n.value)||1==s&&!p.exposed(e)?Re(Ie,t,t):void 0}}(f),x=w&&w.has_side_effects(p),H=w&&(!x||w instanceof Ie)&&!Fr(w,p),k=function(n){if(!(n instanceof Fe&&n.right.single_use)){for(var t,i=Object.create(null),e=new Ye(function(e){e instanceof Ie&&(i[e.definition().id]=!0)});n instanceof Fe&&"="==n.operator;)n.left.walk(e),n=n.right;if(n instanceof At)return o;if(n instanceof Ie)return(r=n.evaluate(p))===n?o:ae(r,o);if(n.is_truthy())return ae(!0,_e);if(n.is_constant()){var r=n.evaluate(p);if(!(r instanceof ye))return ae(r,o)}return w instanceof Ie?!!function e(n){if(n instanceof Pe)return!1;if(n instanceof Ce&&xi[n.operator])return e(n.left)&&e(n.right);if(n instanceof De)return!1;if(n instanceof Me)return e(n.consequent)&&e(n.alternative);if(n instanceof st)return!1;return!n.has_side_effects(p)}(n)&&(n.walk(new Ye(function(e){if(t)return!0;e instanceof Ie&&i[e.definition().id]&&(t=!0)})),!t&&o):!1}function o(e){return n.equivalent_to(e)}}(f);if(H||k){var E=f instanceof Fe&&f.operator.slice(0,-1),Y=f.name instanceof Ne,R=_e;if(f.may_throw(p)){if(Y&&un(me))continue;R=ve?function(e){return e.has_side_effects(p)}:t}var L=!1,B=!1,U=new be,V=!0,S=ce(f),W=function(e){var n=Kn(e);if(!(n instanceof Ie))return!1;if(n.definition().scope.resolve()!==me)return!1;if(!he)return!0;if(E)return!1;if(f instanceof et)return!1;n=S.get(n.name);return!n||n[0]===e}(w),T=oe(f),A=T,G=(x||(!E&&A instanceof Oe&&(A=A.tail_node()),x=!(f instanceof et)&&A.has_side_effects(p)),ve||!W?function(e){return e instanceof je}:_e),J=function(e){if(e instanceof et)return!1;if(x)return!1;if(g)return!0;if(!(w instanceof Ie))return!1;var n;if(e instanceof Te)n=1;else{if("="!=e.operator)return!1;n=2}e=w.definition();return e.references.length-e.replaced==n||!!e.fixed&&(!!w.fixed&&(e.references.filter(function(e){return e.fixed===w.fixed}).length==n&&(I=!0)))}(f),D=Y,O=!1,$=0,q=!d||!D;if(!q){for(var n=f.arg_index+1;!O&&n<d.length;n++)d[n]&&d[n].transform(c);q=!0}for(var e=r;!O&&e<i.length;e++)i[e].transform(c);if(g){if(!$||$+l<s){h.push(m),j=!0;continue}$==u&&(l=!0);var z=w.definition();O=!1,_=0,D=Y;for(e=r;!O&&e<i.length;e++)i[e].transform(o)||i.splice(e--,1);$=f instanceof Te&&f===m[m.length-1]&&z.references.length==z.replaced&&!p.exposed(z),g.last_ref=!1,g.single_use=!1,a=!0}$&&!function(e){var n,t,f,c,u,l=A===T?null:Le(T,T.expressions.slice(0,-1)),e=e.name_index;0<=e?(t=me.argnames[e])instanceof Ae?(me.argnames[e]=t=t.clone(),t.value=l||Re(He,t,{value:0})):(n=p.parent().args)[e]&&(me.argnames[e]=t.clone(),n[e]=l||Re(He,n[e],{value:0})):(f=m.length-1,c=m[f],(c instanceof Te||m[f-1].body===c)&&f--,u=new Ht(function(e,n,t){if(D)return e;if(e!==m[_])return e;if(++_<=f)return C(e,u);if(D=!0,e instanceof Yn){v.set(c.name.name,(v.get(c.name.name)||0)+1),g&&g.replaced++;var i=e.definitions,r=i.indexOf(c),o=c.clone();if(o.value=null,!l)return e.definitions[r]=o,e;var a,s=[Re(we,l,{body:l})];return 0<r&&((a=e.clone()).definitions=i.slice(0,r),s.unshift(a),(e=e.clone()).definitions=i.slice(r)),s.push(e),e.definitions[0]=o,t?Ue.splice(s):Re(xe,e,{body:s})}return l?Ge(e)?Re(we,l,{body:l}):l:t?Ue.skip:null},function(e,n){return e instanceof nn?Qr(e,n):ue(e,u)}),D=O=!1,_=0,(i[r]=i[r].transform(u))||i.splice(r,1))}(f)}}}return a}function X(e){return O||(b===e&&(O=!0),y===e&&(y=null)),e}function C(e,n){if(!(e instanceof Je))return e instanceof En&&!e.static?(e.key instanceof ye&&(e.key=e.key.transform(n)),e):void 0;if(e instanceof ke)return e;if(e instanceof tn)return e.object=e.object.transform(n),O=!0,e;if(e instanceof Fn){e.expression=e.expression.transform(n);for(var t=0;!O&&t<e.body.length;t++){var i=e.body[t];if(i instanceof jn){if(!D){if(i!==m[_])continue;_++}if(i.expression=i.expression.transform(n),!J)break;k=!1}}return O=!0,e}}function K(e,n){return n instanceof Fe?"="==n.operator&&n.left===e:n instanceof Ae?n.name===e:n instanceof rt||n instanceof ot&&n.value===e}function Q(e,n){return n instanceof Fe?n.left!==e&&xi[n.operator.slice(0,-1)]:n instanceof Ce?n.left!==e&&xi[n.operator]:n instanceof De?n.optional&&n.expression!==e:n instanceof jn?n.expression!==e:n instanceof Me||n instanceof Se?n.condition!==e:n instanceof Zn&&(n.optional&&n.expression!==e)}function Z(e,n){if(e instanceof tt)return 1;if("Binary"==e.TYPE)return"in"==e.operator&&!ia(e.right);if(e instanceof De){var t=e.expression;if(t instanceof Ie&&(f=t.definition(),t=t.fixed_value()),!(t instanceof Ee))return!e.is_expr_pure(p);if(f&&sa(p,f,t))return 1;if(t.collapse_scanning)return;t.collapse_scanning=!0;var i=q,r=(q=!1,b),o=y;if(ge(t.argnames,function(e){if(e instanceof Ae){if(e.value.transform(c),O)return;e=e.name}return!(e instanceof je)}))if(cn(t)&&t.value)t.value.transform(c);else for(var a=0;!O&&a<t.body.length;a++){var s=t.body[a];if(s instanceof $n){s.value&&s.value.transform(c);break}s.transform(c)}else O=!0;return(y=o,b=r,q=i,t.collapse_scanning=!1,O)?(O=!1,1):void 0}if(e instanceof On){if(ve){if(ve.bfinally)return 1;if(ve.bcatch&&e instanceof qn)return 1}return x||w instanceof $e||pe(w)}if(e instanceof vn)return p.option("ie")&&e.name&&S.has(e.name.name);if(e instanceof At)return le(e);if(e instanceof $e){if(x)return 1;o=e.expression;if(o instanceof Ie&&er(o.definition()))return 1;if(p.option("unsafe")){if(Gr(o)&&wi[o.name])return;if(ho(o))return}return V?!g&&((ve||!W)&&(!e.optional&&o.may_throw_on_access(p))):1}if(e instanceof qe)return 1;if(e instanceof Ie){if(le(e))return!K(e,n);if(x&&pe(e))return 1;var f=e.definition();return(ve||f.scope.resolve()!==me)&&!tr(e)}if(e instanceof qt)return!e.is_expr_pure(p);if(e instanceof Te)return G(e.name)||(e.value||n instanceof Ln)&&e.name.match_symbol(function(e){return e instanceof ht&&(S.has(e.name)||x&&pe(e))},!0);if(e instanceof it)return 1;r=ti(e.left,e);return r&&(r instanceof $e||(G(r)||r.match_symbol(function(e){return e instanceof Ie&&(S.has(e.name)||L&&p.exposed(e.definition()))},!0)))}function M(e,n){var t,i;m.push(e),e instanceof Pe?e.elements.forEach(function(e){M(e,n)}):e instanceof Fe?((i=e.left)instanceof je||h.push(m.slice()),M(i),M(e.right),i instanceof Ie&&"="==e.operator&&N.set(i.name,(N.get(i.name)||0)+1)):e instanceof tt?M(e.expression,n):e instanceof Ce?(i=xi[e.operator],n&&i&&"??"!=e.operator&&e.right instanceof Fe&&"="==e.right.operator&&!(e.right.left instanceof je)&&h.push(m.slice()),M(e.left,!i&&n),M(e.right,n)):e instanceof De?(M(e.expression),e.args.forEach(M)):e instanceof jn?M(e.expression):e instanceof Me?(M(e.condition),M(e.consequent,n),M(e.alternative,n)):e instanceof Yn?e.definitions.forEach(M):e instanceof Qn?M(e.expression):e instanceof Qe?(M(e.condition),e.body instanceof Xe||M(e.body)):e instanceof On?e.value&&M(e.value):e instanceof nn?(e.init&&M(e.init,!0),e.condition&&M(e.condition),e.step&&M(e.step,!0),e.body instanceof Xe||M(e.body)):e instanceof tn?(M(e.object),e.body instanceof Xe||M(e.body)):e instanceof Se?(M(e.condition),e.body instanceof Xe||M(e.body),!e.alternative||e.alternative instanceof Xe||M(e.alternative)):e instanceof st?e.properties.forEach(function(e){m.push(e),e.key instanceof ye&&M(e.key),e instanceof ct&&M(e.value,n),m.pop()}):e instanceof Oe?(t=e.expressions.length-(n?0:1),e.expressions.forEach(function(e,n){M(e,n<t)})):e instanceof we?M(e.body,!0):e instanceof qe?M(e.expression):e instanceof Zn?(M(e.expression),M(e.property)):e instanceof Fn?(M(e.expression),e.body.forEach(M)):e instanceof et?Gt[e.operator]?h.push(m.slice()):M(e.expression):e instanceof Te?(e.name instanceof gt&&(e.value?(i=e.name.definition()).references.length>i.replaced&&h.push(m.slice()):v.set(e.name.name,(v.get(e.name.name)||0)+1)),e.value&&M(e.value)):e instanceof it&&e.expression&&M(e.expression),m.pop()}function ee(e,n){var t=c.parent(n);return t instanceof Pe||t instanceof Fe||t instanceof tt||t instanceof Ce||t instanceof De||t instanceof jn||t instanceof Me?e:t instanceof Yn?P(t,n+1):t instanceof On||t instanceof Se||t instanceof Ke||t instanceof ft||t instanceof $e?e:t instanceof Oe?(t.tail_node()===e?ee:P)(t,n+1):t instanceof we?P(t,n+1):t instanceof qe||t instanceof Fn||t instanceof et||t instanceof Te||t instanceof it?e:null}function ne(e,n,t){for(var i;i=e,(e=c.parent(++t))instanceof Fe&&e.operator.slice(0,-1)==n||e instanceof Ce&&e.operator==n;);return i}function te(e,n,t,i,r){var o=q,a=(q=!1,b),s=y,f=c.stack;return c.stack=[i],e.transform(c),c.stack=f,y=s,b=a,q=o,O?(O=!1,t):n(i,r+1)}function F(e,n){var t,i=c.parent(n);return i instanceof Pe?F(i,n+1):i instanceof Fe?R(i)||i.left.match_symbol(function(e){return e instanceof Ie&&(w.name==e.name||g.name==e.name)})?e:i.left!==e&&xi[t=i.operator.slice(0,-1)]?ne(i,t,n):F(i,n+1):i instanceof Ce?i.left!==e&&xi[t=i.operator]?ne(i,t,n):F(i,n+1):i instanceof De?i:i instanceof jn?i.expression!==e?e:F(i,n+1):i instanceof Me?i.condition!==e?e:F(i,n+1):i instanceof Yn?P(i,n+1):i instanceof Ze?e:i instanceof On?P(i,n+1):i instanceof nn?i.init!==e&&i.condition!==e?e:F(i,n+1):i instanceof tn?i.init!==e?e:F(i,n+1):i instanceof Se?i.condition!==e?e:F(i,n+1):i instanceof ft?ge((t=c.parent(n+1)).properties,function(e){return e instanceof ct})?F(t,n+2):t:i instanceof $e?i.expression===e?F(i,n+1):e:i instanceof Oe?(i.tail_node()===e?F:P)(i,n+1):i instanceof we?P(i,n+1):i instanceof qe?F(i,n+1):i instanceof Fn?i.expression!==e?e:F(i,n+1):i instanceof et?"delete"==i.operator?e:F(i,n+1):i instanceof Te?i.name.match_symbol(function(e){return e instanceof ht&&(w.name==e.name||g.name==e.name)})?e:F(i,n+1):i instanceof en?i.condition!==e?e:F(i,n+1):i instanceof it?F(i,n+1):null}function P(n,t){var e,i=c.parent(t);return Z(n,i)||Q(n,i)?n:i instanceof Pe?P(i,t+1):i instanceof Fe?r(i.left):i instanceof tt?n:i instanceof Ce||i instanceof De||i instanceof jn||i instanceof Me||i instanceof Yn||i instanceof On||i instanceof Se?P(i,t+1):i instanceof Ke?n:i instanceof ft?ge((e=c.parent(t+1)).properties,function(e){return e instanceof ct})?P(e,t+2):e:i instanceof $e?(e=i.expression)===n?P(i,t+1):te(e,P,n,i,t):i instanceof Oe||i instanceof we?P(i,t+1):i instanceof qe?n:i instanceof Fn||i instanceof et?P(i,t+1):i instanceof Te?r(i.name):i instanceof it?n:null;function r(e){return R(i)?n:e!==n&&e instanceof je?te(e,P,n,i,t):P(i,t+1)}}function ie(e){if(j)j=!1;else if(!(s<1)){var n=(e=e.tail_node())instanceof Fe&&"="==e.operator?e.left:e;if(n instanceof Ie){var t=n.definition();if(!t.undeclared&&!er(t)){if(n!==e){if(Fr(n,p))return;if(t.references.length-t.replaced<2)return;e=f.clone();e[e instanceof Fe?"right":"value"]=n,0<=f.name_index&&(e.name_index=f.name_index,e.arg_index=f.arg_index),f=e}return g=t}}}}function re(e){return e.references.length-e.replaced-(N.get(e.name)||0)}function oe(e){return e instanceof Fe?e.right:e instanceof Ce?((n=e.clone()).right=e.right.right,n):e instanceof Te?e.value:void 0;var n}function ae(t,i){return function(e,n){if(n.in_boolean_context()){if(t&&e.is_truthy()&&!e.has_side_effects(p))return!0;if(e.is_constant()){n=e.evaluate(p);if(!(n instanceof ye))return!n==!t}}return i(e)}}function se(e){for(;e.write_only&&(e.write_only=!1,e instanceof Fe);)e=e.right}function fe(e,n){var t=n.scope||Mr(c)||de;e.walk(new Ye(function(e){if(e instanceof Je)return!0;e instanceof dt&&(e.scope=t)}))}function ce(s){var f=new be,c=(s instanceof Te&&(s.name.definition().fixed||(V=!1),f.add(s.name.name,w)),me.uses_arguments&&!p.has_directive("use strict")),u=me instanceof an,l=new Ye(function(n){var e,t,i;if(n instanceof Ie?(e=n.fixed_value())||(t=(e=n).definition(),i=n.fixed&&n.fixed.escaped||t.escaped,t.undeclared||!t.assignments&&i&&!i.cross_scope||!ir(t,n.scope,n,l.parent())&&fa(t)||(V=!1)):n instanceof At&&(e=n),e)f.add(n.name,Ki(p,l,n,e,0));else{if(n instanceof Ee){for(var r,o=0,a=n;r=l.parent(o++);a=r){if(r instanceof Fe){if(r.left===a)break;if("="==r.operator)continue;if(xi[r.operator.slice(0,-1)])continue;break}if(r instanceof Ce){if(xi[r.operator])continue;break}if(r instanceof De)return;if(r instanceof ke)return;if(r instanceof Oe){if(r.tail_node()===a)continue;break}if(r instanceof qt){if(r.tag)return;break}}return n.enclosed.forEach(function(e){e.scope!==n&&U.set(e.name,!0)}),!0}c&&n instanceof Zn&&(me.each_argname(function(e){p.option("reduce_vars")&&!e.definition().assignments||(e.definition().fixed||(V=!1),f.add(e.name,!0))}),c=!1)}u&&("Call"==n.TYPE?B||((i=n.expression)instanceof $e||i instanceof fn&&!i.contains_this()||(B=!0)):n instanceof $e&&function e(n){return n instanceof Ie&&!(n=n.fixed_value())||(n instanceof Fe?"="==n.operator&&e(n.right):n instanceof $e||n instanceof At)}(n.expression)&&(n!==w||s instanceof et?L=!0:B=!0))});return s.walk(l),f}function ue(e,n){if(e instanceof Oe)switch(e.expressions.length){case 0:return null;case 1:return Nr(0,n.parent(),e,e.expressions[0])}}function le(e){e=S.get(e.name);if(e&&!ge(e,function(e){return!e}))return e[0]!==w||void(k=!1)}function pe(e){e=e.definition();return!(1==e.orig.length&&e.orig[0]instanceof bt)&&(e.scope.resolve()!==me||(!(!B||!p.exposed(e))||!ge(e.references,function(e){return e.scope.resolve(!0)===me})))}function t(e,n){if(e instanceof Fe)return t(e.left,!0);if(e instanceof et)return t(e.expression,!0);if(e instanceof Te)return e.value&&t(e.value);if(n){if(e instanceof Qn)return t(e.expression,!0);if(e instanceof Zn)return t(e.expression,!0);if(e instanceof Ie)return e.definition().scope.resolve()!==me}return!1}}(e,l)||(i=9)}while(i&&0<o--);return e;function S(e,n){var t,i=e.self(),r=0;do{do{if(n(i))return!0}while((i=e.parent(r++))instanceof Se&&(t=i))}while((i instanceof xe||i instanceof ke)&&Kr(i.body,t))}function d(e,n){if(!(e instanceof xe))return e;for(var t=null,i=0;i<e.body.length;i++){var r=e.body[i];if(r instanceof Bn&&Jr(r))n.push(r);else{if(t||Hr(r))return!1;t=r}}return t}function p(e){return e instanceof Fe?[e]:e instanceof Oe?e.expressions.slice():void 0}function h(e,n,t){var i=p(n);if(i){for(var r=!1,o=i.length-(t=t||0);0<=--o;)if(u(f=i[o])){if(f.left instanceof Ie)a=i.slice(o+1);else{if(!(f.left instanceof $e&&u(f.left.expression)))continue;var a=i.slice(o+1),s=f.clone(),f=f.left.expression;s.left=s.left.clone(),s.left.expression=f.left.clone(),a.unshift(s)}0!=a.length&&_(f.left,f.right,a)&&(r=!0,i=i.slice(0,o).concat(f,a))}if(e instanceof Yn){for(o=e.definitions.length;0<=--o;){var c=e.definitions[o];if(c.value){_(c.name,c.value,i)&&(r=!0),!function(e,n,t){if(l.option("conditionals")&&!(e.name instanceof je)){for(var i=!1,r=e.name.definition();n.length>t;){var o=ta(l,r,e.value,n[0]);if(!o)break;e.value=o,n.shift(),i=!0}return i}}(c,i,t)||(r=!0);break}}e instanceof Bn&&m(e.definitions,i,t)&&(r=!0)}return r&&i}function u(e){return e instanceof Fe&&"="==e.operator}}function v(e,n){if(e instanceof we&&!Jr(n)){e=p(e.body);if(e){var t=[];if(m(t,e.reverse(),0))return n.definitions=t.reverse().concat(n.definitions),e.reverse()}}}function m(e,n,t){for(var i=!1;n.length>t;){var r=n[0];if(!(r instanceof Fe))break;if("="!=r.operator)break;var o=r.left;if(!(o instanceof Ie))break;if(Gr(o))break;if(o.scope.resolve()!==me)break;var a=o.definition();if(a.scope!==me)break;if(a.orig.length>a.eliminated+1)break;if("SymbolVar"!=a.orig[0].TYPE)break;o=Re(gt,o,o);e.push(Re(Te,r,{name:o,value:r.right})),a.orig.push(o),a.replaced++,n.shift(),i=!0}return i}function _(e,r,n){var o=new be;for(o.set(e.name,!0);r instanceof Fe&&"="==r.operator;)r.left instanceof Ie&&o.set(r.left.name,!0),r=r.right;if(r instanceof st){var t=!1;do{if(!function e(n){if(!(n instanceof Fe))return;if("="!=n.operator)return;if(!(n.left instanceof $e))return;var t=n.left.expression;if(!(t instanceof Ie))return;if(!o.has(t.name))return;if(!n.right.is_constant_expression(me))return;var i=n.left.property;i instanceof ye&&(i=(i=e(i)?n.left.property=i.right.clone():i).evaluate(l));if(i instanceof ye)return;i=""+i;t="__proto__"==i||l.has_directive("use strict")?function(e){e=e.key;return"string"==typeof e&&e!=i&&"__proto__"!=e}:function(e){var n=e.key;return e instanceof pt||e instanceof lt?"string"==typeof n&&n!=i:"__proto__"!==n};if(!ge(r.properties,t))return;r.properties.push(Re(ct,n,{key:i,value:n.right}));return!0}(n[0]))break}while(n.shift(),t=!0,n.length);return t}}}function eo(i,r,o){var a,s=!1;function f(e){a?(a.push(e),Yr(e)||(a.required=!0)):o.push(e)}r.walk(new Ye(function(e,n){return e instanceof xn?(e.extends=null,e.properties=[],f(e),!0):e instanceof Yn?(e.remove_initializers(i,t=[])&&ye.warn("Dropping initialization in unreachable code [{file}:{line},{col}]",e.start),0<t.length&&(e.definitions=t,f(e)),!0):e instanceof Q?(f(e),!0):e instanceof ke||(e instanceof Je?(t=a,a=[],n(),a.required?o.push(Re(xe,r,{body:a})):a.length&&[].push.apply(o,a),a=t,!0):void(e instanceof zn||(s=!0)));var t})),s&&ye.warn("Dropping unreachable code [{file}:{line},{col}]",r.start)}function no(e,n){return null==e||e.is_undefined||e instanceof Ft||e instanceof ze&&"void"==e.operator&&!(n&&e.expression.has_side_effects(n))}function to(e,n,t){switch(e){case"-":return n.is_negative_zero()&&(!(t instanceof $)||0==t.value);case"&&":case"||":return n.is_negative_zero()||t.is_negative_zero();case"*":case"/":case"%":case"**":return!0;default:return!1}}function io(e,n){return n||/strict/.test(e.option("pure_getters"))}function ro(e,n,t){switch(n){case"&&":return t.left.is_defined(e)&&t.right.is_defined(e);case"||":return t.left.is_truthy()||t.right.is_defined(e);case"??":return t.left.is_defined(e)||t.right.is_defined(e);default:return!0}}function oo(e){ye.warn("global_defs {node} redefined [{file}:{line},{col}]",{node:e,file:e.start.file,line:e.start.line,col:e.start.col})}function ao(e,n,t){return n.print_to_string().length-e.print_to_string().length<(t||0)?n:e}function so(e,n,t){return ao(Re(we,e,{body:e}),Re(we,n,{body:n}),t).body}function fo(e,n,t,i){return(x(e)?so:ao)(n,t,i)}function co(n){var t=Object.create(null);return Object.keys(n).forEach(function(e){t[e]=L(n[e])}),t}function uo(e){for(var n=0;n<e.length;n++){var t=e[n];if(!(t instanceof pe))return t}}function lo(){return this.value?Re($n,this.value,{value:this.value}):uo(this.body)}function po(e,n){var t=n.evaluate(e);return t===n?n:fo(e,n,Pr(t,n).optimize(e),e.eval_threshold)}function ho(e){if(e instanceof Qn){var n,t=e.expression;if(Gr(t))return(n=qi[t.name])&&(n[e.property]||"Math"==t.name&&"random"==e.property)}}function vo(e){e instanceof rt?e.elements.forEach(vo):e instanceof at?e.properties.forEach(function(e){vo(e.value)}):e instanceof $e?vo(e.expression):e instanceof Ie&&e.definition().references.forEach(function(e){delete e._eval})}function mo(e,n,t,i,r){for(var o=[],a=0;a<e.length;a++){var s=e[a],f=s._eval(n,t,i,r);if(s===f)return;o.push(f)}return o}function _o(e){return Re(ze,e,{operator:"!",expression:e})}function go(e,n,t){e=_o(e);return t?ao(e,t=Re(we,n,{body:n}))===t?n:e:ao(e,n)}function bo(e,n,t){return!ge(e,t?function(e){return e instanceof qe?!t(e,n):!e.has_side_effects(n)}:function(e){return!e.has_side_effects(n)})}function yo(e,n){e=e.expression;return!e.is_string(n)||e.has_side_effects(n)}function wo(e,n){for(var t=e.length;0<=--t;)if(e[t].may_throw(n))return!0;return!1}function xo(e,n){return!!e.may_throw(n)||(!((e=e instanceof Ie?e.fixed_value():e)instanceof Ee)||(!!wo(e.argnames,n)||(!!wo(e.body,n)||cn(e)&&e.value&&e.value.may_throw(n))))}function ko(e,n){for(var t=e.length;0<=--t;)if(!e[t].is_constant_expression(n))return!1;return!0}function Eo(e){return e&&e.aborts()}function So(){var e=this.body.length;return 0<e&&Eo(this.body[e-1])}function To(e,n,t){switch(e.body.length){case 0:return t?Ue.skip:Re(We,e);case 1:var i=e.body[0];return Yr(i)?n instanceof Ke&&i instanceof Q?e:i:e}return e}function Ao(e,n){!n.option("rests")||e.uses_arguments||e.rest instanceof rt&&n.drop_fargs(e,n.parent())&&(e.argnames=e.argnames.concat(e.rest.elements),e.rest=e.rest.rest)}function Do(e,n){if(!n.option("arrows"))return e;Ao(e,n);var t=Zr(e.value?[e.first_statement()]:e.body,n);switch(t.length){case 1:var i=t[0];if(i instanceof $n){e.body.length=0,e.value=i.value;break}default:e.body=t,e.value=null}return e}function Oo(e,n){for(var t=n.length;0<=--t;)n[t]||(n[t]=Re(Pt,e))}function $o(e,n){e=Re(kn,e,e);return e.name&&(e.name=n?null:Re(xt,e.name,e.name)),e}function qo(e,n){var t;switch(e.CTOR){case _n:t=dn;break;case gn:t=hn;break;case bn:t=vn;break;case yn:t=mn}var i=Re(t,e,e);return i.name=n?null:Re(yt,e.name,e.name),i}function zo(n,t){n.walk(new Ye(function(e){return e instanceof $n?(t(e),!0):e instanceof ke&&e!==n||void 0}))}function Co(e){var n=Object.create(null);return zo(e,function(e){var e=e.value;(e=e&&e.tail_node())instanceof Ie&&(e=e.definition().id,n[e]=(n[e]||0)+1)}),n}function Mo(e,n,t){if(t.exposed(e))return!1;switch(e.references.length-e.replaced-(n[e.id]||0)){case e.drop_return:return"d";case e.bool_return:return!0}}function Fo(e,i){zo(e,function(e){e.in_bool=!0;var n,t=e.value;t&&((n=Lo(i,t))?n instanceof ye||(t=t.drop_side_effect_free(i),e.value=t?Le(e.value,[t,Re(He,e.value,{value:1})]):Re(He,e.value,{value:1})):(t=t.drop_side_effect_free(i),e.value=t?Le(e.value,[t,Re(He,e.value,{value:0})]):null))})}function Po(e,n){if(!e.name||!n.option("ie"))return 1;e=e.name.definition();return!n.exposed(e)&&ge(e.references,function(e){return!(e instanceof Ie)})}function jo(o,n,e){if(n instanceof Ee){var t,i=cn(n),r=un(n),a=!1,s=!1;if(i&&o.option("arrows")?n.value?r&&!ra(o,n.value)||(t=n.value.drop_side_effect_free(o))!==n.value&&(a=!0,n.value=t):s=!0:ln(n)||(s=!(!e&&n.name)||(t=n.name.definition()).references.length==t.replaced),s&&(n.process_expression(!1,function(e){var n=e.value;if(n){if(r&&!ra(o,n))return e;n=n.drop_side_effect_free(o,!0)}return a=!0,n?Re(we,e,{body:n}):Re(We,e)}),zo(n,function(e){var n,t=e.value;!t||r&&!ra(o,t)||(n=t.drop_side_effect_free(o))!==t&&(a=!0,e.value=n)})),r&&o.option("awaits")){s&&n.process_expression("awaits",function(e){var n=e.body;if(n instanceof tt){if(ra(o,n.expression)){if(a=!0,!(n=n.expression.drop_side_effect_free(o,!0)))return Re(We,e);e.body=n}}else if(n instanceof Oe){for(var t=n.expressions,i=t.length;0<=--i;){var r=t[i];if(!(r instanceof tt))break;r=r.expression;if(!ra(o,r))break;if(a=!0,t[i]=r.drop_side_effect_free(o))break}switch(i){case-1:return Re(We,e);case 0:e.body=t[0];break;default:t.length=i+1}}return e});var f,c=!s&&n.name||i&&n.value&&!ra(o,n.value),u=new Ye(function(e){return!!c||(u.parent()===n&&e.may_throw(o)||e instanceof tt||e instanceof ve?c=!0:e instanceof $n?e.value&&!ra(o,e.value)?c=!0:void 0:e instanceof ke&&e!==n||void 0)});if(n.walk(u),!c){switch(n.CTOR){case pn:f=me;break;case dn:f=vn;break;case hn:f=mn}return Re(f,n,n)}}return a&&n.clone()}}function No(e,n,t,i){for(var r=e.length,o=[],a=!1,s=0;s<r;s++){var f=e[s],c=i&&f instanceof qe?i(f,n,t):f.drop_side_effect_free(n,t);c!==f&&(a=!0),c&&(o.push(c),t=!1)}return o.length?a?o:e:null}function Io(e,n,t){var i=e.expression;return i.is_string(n)?i.drop_side_effect_free(n,t):e}function Ho(e){return e instanceof qe?Re(Pe,e,{elements:[e]}):e}function Yo(n,e,t){t=t||zn;var i=!1,r=new Ye(function(e){return!!(i||e instanceof ke)||(e instanceof t&&r.loopcontrol_target(e)===n?i=!0:void 0)});return e instanceof de&&r.push(e),r.push(n),n.body.walk(r),i}function Ro(e,n,t){if((e=e instanceof Oe?e.tail_node():e)instanceof Ce)if(e.left instanceof fe){if(e.right instanceof ze&&"typeof"==e.right.operator){var i=e.right.expression;if(Gr(i)){var r,o,a,s,f,c,u,l="undefined"==e.left.value;switch(e.operator){case"==":r=l?t:n;break;case"!=":r=l?n:t;break;default:return}r&&(o=!1,a=i.definition(),f=[],c=[],u=new Ye(function(e,n){if(o)return!0;if(e instanceof Fe){var t=e.left;if(!(t instanceof Ie&&t.definition()===a))return;switch(e.right.walk(u),e.operator){case"=":case"&&=":o=!0}return!0}var i;return e instanceof De?(n(),(s=e.expression.tail_node())instanceof Ie&&(s=s.fixed_value(),i=f.length),s instanceof Ee?K(c,s)&&s.walk(u):o=!0,0<=i&&(f.length=i),!0):e instanceof Qe?(i=f.length,n(),o&&(f.length=i),!0):e instanceof nn?(e.init&&e.init.walk(u),i=f.length,e.condition&&e.condition.walk(u),e.body.walk(u),e.step&&e.step.walk(u),o&&(f.length=i),!0):e instanceof tn?(e.object.walk(u),i=f.length,e.init.walk(u),e.body.walk(u),o&&(f.length=i),!0):e instanceof ke?e!==s||void 0:e instanceof Ie?(e.definition()===a&&f.push(e),!0):void 0}),r.walk(u),f.forEach(function(e){e.defined=!0}))}}}else switch(e.operator){case"&&":Ro(e.left,n),Ro(e.right,n);break;case"||":Ro(p(e.left),t),Ro(p(e.right),t)}function p(e){if(e instanceof Ce)switch(e.operator){case"==":return(e=e.clone()).operator="!=",e;case"!=":return(e=e.clone()).operator="==",e}}}function Lo(e,n,t){return!!n.truthy||!(n.falsy&&!t)&&(!!n.is_truthy()||n.evaluate(e,!0))}function Bo(e,n){var t,i=0,r=!1,o=e.self();if(!Ge(o))for(;;){if(t=o,(o=e.parent(i++))instanceof Ce){var a=o.operator;if(!xi[a])return;var s=o.left;if(s===t)continue;if(f(s))switch(a){case"&&":n[r?"falsy":"truthy"]=!0;break;case"||":case"??":n[r?"truthy":"falsy"]=!0}}else if(o instanceof Me){s=o.condition;if(s===t)continue;if(f(s))switch(t){case o.consequent:n[r?"falsy":"truthy"]=!0;break;case o.alternative:n[r?"truthy":"falsy"]=!0}}else{if(o instanceof On)break;if(o instanceof Se)break;if(o instanceof Oe){if(o.expressions[0]===t)continue}else if(o instanceof we)break}return}for(;;){if(t=o,(o=e.parent(i++))instanceof xe){if(o.body[0]===t)continue}else if(o instanceof Se&&f(o.condition))switch(t){case o.body:n[r?"falsy":"truthy"]=!0;break;case o.alternative:n[r?"truthy":"falsy"]=!0}return}function f(e){return n.equivalent_to(e)||e instanceof ze&&("!"==e.operator&&(n.equivalent_to(e.expression)&&(r=!0)))}}function Uo(r){return function(n,t){var i=!1;return this.definitions.forEach(function(e){e.value&&(i=!0),e.name.match_symbol(function(e){e instanceof ht&&t.push(Re(Te,e,{name:e,value:r(n,e)}))},!0)}),i}}function Vo(e){return"arguments"!=e.name&&e.orig.length<(e.orig[0]instanceof yt?3:2)}function Wo(e,n){if(e.exposed(n))return!0;for(var t=n.scope.resolve(),i=n.scope;i!==t;)if((i=i.parent_scope).var_names().has(n.name))return!0}function Go(e){return Re(Bn,e,{definitions:e.definitions.map(function(e){return Re(Te,e,{name:e.name.convert_symbol(gt,function(e,n){var t=e.definition(),n=(t.orig[t.orig.indexOf(n)]=e,t.scope.resolve());t.scope!==n&&((t.scope=n).variables.set(t.name,t),n.enclosed.push(t),n.var_names().set(t.name,!0))}),value:e.value})})})}function Jo(e,n){if(!n.fixed_value())return!1;n=n.definition();return Vo(n)&&fa(n)&&!Wo(e,n)}function Xo(e,n){return n.option("varify")&&ge(e.definitions,function(e){return!e.name.match_symbol(function(e){if(e instanceof ht)return!Jo(n,e)},!0)})?Go(e):e}function Ko(e,n){if(n.option("optional_chains")&&e.terminal)do{var t=e.expression;if(e.optional){var i=Lo(n,t,!0);if(null==i)return Re(ze,e,{operator:"void",expression:t}).optimize(n);i instanceof ye||(e.optional=!1)}}while(("Call"==(e=t).TYPE||e instanceof $e)&&!e.terminal)}function Qo(e){var n=e.expression;if(!(n instanceof Oe))return e;var n=n.expressions.slice(),t=e.clone();return t.expression=n.pop(),n.push(t),Le(e,n)}function Zo(e,t,n){var i=e.expression,r=i instanceof Ie?i.fixed_value():i;if(r instanceof Ee&&(!r.uses_arguments&&!r.pinned()&&!(n&&n.indexOf(r)<0)&&ge(s=e.args,function(e){return!(e instanceof qe)}))){var o=r.argnames,n=r===i&&!r.name;if(r.rest){if(!n||!t.option("rests"))return;for(var a=o.length,s=s.slice(0,a);s.length<a;)s.push(Re(Ft,e).optimize(t));s.push(Re(Pe,e,{elements:e.args.slice(a)})),o=o.concat(r.rest),r.rest=null}else s=s.slice(),o=o.slice();for(var f=0,c=0,u=n&&t.option("default_values"),l=n&&t.drop_fargs(r,e)?function(e,n){return!e||(e instanceof rt?0==e.elements.length&&!e.rest&&n instanceof Pe:e instanceof at?0==e.properties.length&&!e.rest&&n&&!n.may_throw_on_access(t):e.unused)}:_e,p=[],d=0;d<s.length;d++){var h=o[d];if(u&&h instanceof Ae&&s[d].is_defined(t)&&(o[d]=h=h.name),h&&void 0===h.unused){if(l(h,s[d])){v=s[d].drop_side_effect_free(t);o.splice(d,1),s.splice(d,1),v&&p.push(v),d--;continue}p.push(s[d]),s[f++]=Le(e,p),p=[]}else{var v=s[d].drop_side_effect_free(t);if(l(h)){h&&o.splice(d,1),s.splice(d,1),v&&p.push(v),d--;continue}if(v)p.push(v),s[f++]=Le(e,p),p=[];else if(h){if(!p.length){s[f++]=Re(He,s[d],{value:0});continue}s[f++]=Le(e,p),p=[]}}c=f}for(;d<o.length;d++)l(o[d])&&o.splice(d--,1);r.argnames=o,s.length=c,e.args=s,p.length&&(i=Le(e,p),s.push(s.length<o.length?Re(ze,e,{operator:"void",expression:i}):i))}}function ea(e){var n=[];return un(e)&&n.push("await"),ln(e)&&n.push("yield"),n.length&&L(n)}function na(t,i){if(!i)return 1;var r=!0,o=new Ye(function(e){if(!r)return!0;if(e instanceof ke){if(e===t)return;if(cn(e))for(var n=0;r&&n<e.argnames.length;n++)e.argnames[n].walk(o);else e instanceof Q&&i[e.name.name]&&(r=!1);return!0}e instanceof dt&&i[e.name]&&e!==t.name&&(r=!1)});return t.walk(o),r}function ta(t,i,e,n){if(n instanceof Ce&&("&&"==n.operator||"||"==n.operator)&&n.right instanceof Fe&&"="==n.right.operator&&n.right.left instanceof Ie&&n.right.left.definition()===i&&!e.has_side_effects(t)&&r(n.left)&&r(n.right.right))return i.replaced++,"&&"==n.operator?Re(Me,n,{condition:n.left,consequent:n.right.right,alternative:e}):Re(Me,n,{condition:n.left,consequent:e,alternative:n.right.right});function r(e){var n;if(!e.has_side_effects(t))return n=!1,e.walk(new Ye(function(e){return!!n||(e instanceof Ie&&e.definition()===i?n=!0:void 0)})),!n}}function ia(e){return e instanceof Fe?"="==e.operator&&ia(e.right):e instanceof Oe?ia(e.tail_node()):e instanceof Ie?ia(e.fixed_value()):e instanceof Pe||e instanceof wn||e instanceof Ee||e instanceof Xn||e instanceof st}function ra(e,n){return!!n.is_constant()||(n instanceof Fe?"="!=n.operator||ra(e,n.right):n instanceof Ce?!xi[n.operator]||ra(e,n.left)&&ra(e,n.right):n instanceof Me?ra(e,n.consequent)&&ra(e,n.alternative):n instanceof Oe?ra(e,n.tail_node()):n instanceof Ie?(t=n.fixed_value())&&ra(e,t):n instanceof qt?!n.tag||ca(e,n.tag):n instanceof et||void 0);var t}function oa(e,n){return n instanceof Qn?oa(e,n.expression):n instanceof Zn?oa(e,n.expression)&&oa(e,n.property):n instanceof dt||!n.has_side_effects(e)}function aa(e,n){var t=e.right;e.left=Re(Ce,e,{operator:e.operator,left:e.left,right:t.left,start:e.left.start,end:t.left.end}),e.right=t.right,n?e.left=e.left.transform(n):e.operator==t.left.operator&&aa(e.left)}function sa(e,n,t){var i=0,r=e.self();do{if(r===t)return r;if(Qi(r)&&r.name&&r.name.definition()===n)return r}while(r=e.parent(i++))}function fa(e){var n=e.scope.resolve();return ge(e.references,function(e){return n===e.scope.resolve()})}function ca(e,n){return e.option("unsafe")&&n instanceof Qn&&"raw"==n.property&&Gr(n.expression)&&"String"==n.expression.name}function ua(e){var t=!1;if(e=e.replace(/\\(u\{[^{}]*\}?|u[\s\S]{0,4}|x[\s\S]{0,2}|[0-9]+|[\s\S])/g,function(e,n){n=oe(n);if("string"==typeof n)return n;t=!0}),!t)return e}function la(e,n){return e instanceof Ie||e.TYPE===n.TYPE}function pa(t,n){var i=!1,r=new Ye(function(e){return!!i||(e instanceof Ie&&Be(e.definition(),n)?i=!0:void 0)}),o=new Ye(function(e){if(i)return!0;if(e instanceof Ee&&e!==t){if(!(e.name||un(e)||ln(e))){var n=o.parent();if(n instanceof De&&n.expression===e)return}return e.walk(r),!0}});return t.walk(o),i}function da(e,n){var t;if(e)return t=n.parent(),"Call"!=t.TYPE?1:t.expression!==n.self()||(!(e instanceof Ie)||(e=e.fixed_value()))&&(e instanceof Ee&&!e.contains_this())}function ha(e){return e instanceof ct&&"string"==typeof e.key&&!(e instanceof ut&&e.value.contains_super())}function va(e){var n=e.definition().redefined();return n&&((e=e.clone()).thedef=n),e}function ma(n,e){var t=!1;return e.walk(new Ye(function(e){return!!t||(e instanceof Ie&&n.variables.get(e.name)===e.definition()?t=!0:void 0)})),t}function _a(e,n){var t=[];e.references.forEach(function(e){e=e.fixed;e&&K(t,e)&&(e.assigns?e.assigns.unshift(n):e.assigns=[n])})}function ga(e,n){var t=Re(Ie,n,n),i=Re(Fe,n,{operator:"=",left:t,right:Re(Ft,n).transform(e)}),e=n.definition();return e.fixed&&(t.fixed=function(){return i.right},t.fixed.assigns=[i],_a(e,i)),e.assignments++,e.references.push(t),i}function ba(e,n,t,i,r,o){for(var a=[],s=r.expressions,f=t,c=s.length-(o||0),u=c;0<=--c;f=!0){var l=s[c].try_inline(e,n,f,i);l&&(p(),a.push(l))}if(0!=a.length)return p(),!t&&a[0]instanceof we&&(a[0]=Re($n,r,{value:a[0].body})),Re(xe,r,{body:a.reverse()});function p(){c+1<u&&a.push(Re(we,r,{body:Le(r,s.slice(c+1,u))})),u=c}}function ya(e){return"comment2"==e.type&&/@preserve|@license|@cc_on/i.test(e.value)}function wa(f){f=ue(f,{annotations:!1,ascii_only:!1,beautify:!1,braces:!1,comments:!1,galio:!1,ie:!1,indent_level:4,indent_start:0,inline_script:!0,keep_quoted_props:!1,max_line_len:!1,preamble:null,preserve_line:!1,quote_keys:!1,quote_style:0,semicolons:!0,shebang:!0,source_map:null,v8:!1,webkit:!1,width:80,wrap_iife:!1},!0);var n,c=_e;function e(e){if("number"==typeof e)return new Array(e+1).join(" ");if(!e)return"";if(/^\s*$/.test(e))return e;throw new Error("unsupported indentation: "+JSON.stringify(""+e))}f.comments&&(n=f.comments,"string"==typeof f.comments&&/^\/.*\/[a-zA-Z]*$/.test(f.comments)&&(M=f.comments.lastIndexOf("/"),n=new RegExp(f.comments.substr(1,M-1),f.comments.substr(M+1))),c=n instanceof RegExp?function(e){return"comment5"!=e.type&&n.test(e.value)}:"function"==typeof n?function(e){return"comment5"!=e.type&&n(this,e)}:"some"===n?ya:B);var r,o,a,s,u,l,t,p=0,d=1,i=e(f.indent_start),h=e(f.indent_level),P=h.length+1>>1,v=0,m=!0,_=f.source_map&&[],g=!1,b=!1,y="";function w(){u=s=!1,t=[];var e=l;return l=r="",e}w();var x=f.ascii_only?function(e,t){return(e=t?e.replace(/[\ud800-\udbff][\udc00-\udfff]/g,function(e){return"\\u{"+(e.charCodeAt(0)-55232<<10|e.charCodeAt(1)-56320).toString(16)+"}"}):e).replace(/[\u0000-\u001f\u007f-\uffff]/g,function(e){var n=e.charCodeAt(0).toString(16);if(n.length<=2&&!t){for(;n.length<2;)n="0"+n;return"\\x"+n}for(;n.length<4;)n="0"+n;return"\\u"+n})}:function(e){for(var n,t="",i=0,r=0;i<e.length;i++){var o=e.charCodeAt(i);if(55296<=(n=o)&&n<=56319){if(te(e.charCodeAt(i+1))){i++;continue}}else if(!te(o))continue;t+=e.slice(r,i)+"\\u"+o.toString(16),r=i+1}return 0==r?e:t+e.slice(r)};function k(e){return"'"+e.replace(/\x27/g,"\\'")+"'"}function E(e){return'"'+e.replace(/\x22/g,'\\"')+'"'}var j=[null,k,E,function(e,n){return("'"==n?k:E)(e)}][f.quote_style]||function(e,n,t,i){return(i<t?k:E)(e)};function S(t,e){var i=0,r=0;return t=t.replace(/[\\\b\f\n\r\v\t\x22\x27\u2028\u2029\0\ufeff]/g,function(e,n){switch(e){case'"':return++i,'"';case"'":return++r,"'";case"\\":return"\\\\";case"\n":return"\\n";case"\r":return"\\r";case"\t":return"\\t";case"\b":return"\\b";case"\f":return"\\f";case"\v":return f.ie?"\\x0B":"\\v";case"\u2028":return"\\u2028";case"\u2029":return"\\u2029";case"\ufeff":return"\\ufeff";case"\0":return/[0-9]/.test(t.charAt(n+1))?"\\x00":"\\0"}return e}),j(x(t),e,i,r)}var N=_?function(n,t){_.forEach(function(e){e.line+=n,e.col+=t})}:X,T=_?function(){_.forEach(function(e){f.source_map.add(e.token.file,e.line,e.col,e.token.line,e.token.col,e.name||"name"!=e.token.type?e.name:e.token.value)}),_=[]}:X;function A(e){y+=l.slice(0,v);var n=(l=l.slice(v)).length;for(N(e,n-p),d+=e,p=n;e--;)y+="\n"}var D=f.max_line_len?function(e){m?p>f.max_line_len&&ye.warn("Output exceeds {max_line_len} characters",f):(p>f.max_line_len&&(A(1),m=!0),(m||e)&&T())}:X,I=L("( [ + * / - , ."),O=f.beautify||f.comments||f.max_line_len||f.preserve_line||f.shebang||!f.semicolons||f.source_map||f.width?function(e){var n=e.charAt(0),t=(g&&n&&(g=!1,"\n"!=n&&(O("\n"),q())),b&&n&&(b=!1,/[\s;})]/.test(n)||$()),r.slice(-1)),i=(u&&(u=!1,(":"==t&&"}"==n||";"!=t&&(!n||";}".indexOf(n)<0))&&((i=I[n])||f.semicolons?(l+=";",p++,m||(D(),m&&!i&&";"==l&&(l="",p=0)),v==l.length-1&&v++):(D(),l+="\n",d++,p=0,/^\s+$/.test(e)&&(u=!0)),f.beautify||(s=!1))),s&&((re(t)&&(re(n)||"\\"==n)||"/"==n&&n==t||("+"==n||"-"==n)&&n==r||"--"==e&&"!"==r||"in"==e&&"/"==t||"--"==r&&">"==n)&&(l+=" ",p++),"<"==t&&"!"==e||(s=!1)),a&&(_.push({token:a,name:o,line:d,col:p}),a=!1,m&&T()),l+=e,e.split(/\r?\n/)),n=i.length-1;d+=n,p+=i[0].length,0<n&&(D(),p=i[n].length),r=e}:function(e){var n=e.charAt(0),t=r.slice(-1);u&&(u=!1,(":"==t&&"}"==n||(!n||";}".indexOf(n)<0)&&";"!=t)&&(l+=";",s=!1)),s&&((re(t)&&(re(n)||"\\"==n)||"/"==n&&n==t||("+"==n||"-"==n)&&n==r||"--"==e&&"!"==r||"in"==e&&"/"==t||"--"==r&&">"==n)&&(l+=" "),"<"==t&&"!"==e||(s=!1)),l+=e,r=e},$=f.beautify?function(){O(" ")}:function(){s=!0},q=f.beautify?function(e){g&&O("\n"),O(e?i.slice(0,-P):i)}:X,z=f.beautify?function(e){var n=i;i+=h,e(),i=n}:function(e){e()},C=f.max_line_len||f.preserve_line?function(){D(),v=l.length,m=!1}:X,H=f.beautify?function(){O("\n"),v=l.length}:C,M=f.beautify?function(){O(";")}:function(){u=!0};var Y=_?function(e,n){a=e,o=n}:X;function F(e,n){g||(!e.nlb||!n&&/(^|\n) *$/.test(l)?n&&(b=!0):g=!0)}function R(e){var n=e.value.replace(/[@#]__PURE__/g," ");return(!/^\s*$/.test(n)||/^\s*$/.test(e.value))&&(/comment[134]/.test(e.type)?(O("//"+n),g=!0):"comment2"==e.type&&O("/*"+n+"*/"),1)}return{get:function(){return m||D(!0),y+l},reset:w,indent:q,should_break:f.beautify&&f.width?function(){return p>=f.width}:_e,has_parens:function(){return"("==r.slice(-1)},newline:H,print:O,space:$,comma:function(){C(),O(","),C(),$()},colon:function(){O(":"),$()},last:function(){return r},semicolon:M,force_semicolon:function(){u&&O(";"),O(";")},to_utf8:x,print_name:function(e){O(x(e.toString(),!0))},print_string:f.inline_script?function(e,n){e=S(e,n).replace(/<\x2f(script)([>\/\t\n\f\r ])/gi,"<\\/$1$2"),O(e.replace(/\x3c!--/g,"\\x3c!--").replace(/--\x3e/g,"--\\x3e"))}:function(e,n){O(S(e,n))},with_indent:z,with_block:function(e){O("{"),H(),z(e),q(),O("}")},with_parens:function(e){O("("),C(),e(),C(),O(")")},with_square:function(e){O("["),C(),e(),C(),O("]")},add_mapping:Y,option:function(e){return f[e]},prepend_comments:f.comments||f.shebang?function(e){var t,i=this;e instanceof On?t=e.value:e instanceof it&&(t=e.expression);var r,n,o=s(e)||[],a=(t&&((r=new Ye(function(e){if(t=e,!((n=r.parent())instanceof Ce?n.left===t:"Call"==n.TYPE?n.expression===t:n instanceof Me?n.condition===t:n instanceof Qn?n.expression===t:n instanceof On||(n instanceof Oe?n.expressions[0]===t:n instanceof Zn?n.expression===t:n instanceof nt||n instanceof it)))return!0;var n,t=s(e);t&&(o=o.concat(t))})).push(e),t.walk(r)),1==d&&0==p&&(0<o.length&&f.shebang&&"comment5"==o[0].type&&(O("#!"+o.shift().value+"\n"),q()),(n=f.preamble)&&O(n.replace(/\r\n?|\u2028|\u2029|(^|\S)\s*$/g,"$1\n"))),o=o.filter(c,e),!1);function s(e){var n=e.start;if(!n){if(!t)return;e.start=n=new U}e=n.comments_before;if(!e){if(!t)return;n.comments_before=e=[]}if(e._dumped!==i)return e._dumped=i,e}o.forEach(function(e,n){F(e,n),R(e)&&(a=!0)}),a&&F(e.start,!0)}:X,append_comments:f.comments?function(e,t){var n=e.end;(n=n&&n[t?"comments_before":"comments_after"])&&n._dumped!==this&&(e instanceof V||ge(n,function(e){return!/comment[134]/.test(e.type)}))&&(n._dumped=this,n.filter(c,e).forEach(function(e,n){F(e,n||!t),R(e)}))}:X,push_node:function(e){t.push(e)},pop_node:f.preserve_line?function(){var e=t.pop();e.start&&e.start.line>d&&A(e.start.line-d)}:function(){t.pop()},parent:function(e){return t[t.length-2-(e||0)]}}}function i(e,n){e.DEFMETHOD("_codegen",n)}function xa(e,n){e.DEFMETHOD("needs_parens",n)}function ka(e){var n=e.parent();return!e.has_parens()&&x(e,!1,!0)?this.name||!(n instanceof Vn):!!(e.option("webkit")&&n instanceof $e&&n.expression===this)||(!!(e.option("wrap_iife")&&n instanceof De&&n.expression===this)||void 0)}function Ea(e){return!e.has_parens()&&x(e,!0)}function Sa(e){e=e.parent();return e instanceof Ce?"**"==e.operator&&e.left===this:e instanceof De?e.expression===this:e instanceof wn||(e instanceof $e?e.expression===this:e instanceof qt?e.tag===this:void 0)}function Ta(e,n){return!!e.terminal&&((n instanceof De||n instanceof $e)&&n.expression===e)}function Aa(e,n){n=n.parent();return n instanceof tt||(n instanceof Ce?!(n instanceof Fe):n instanceof De?n.expression===e:n instanceof wn||(n instanceof Me?n.condition===e:n instanceof $e?n.expression===e:n instanceof qt?n.tag===e:n instanceof et||void 0))}function Da(e,t,i,n){var r=e.length-1,o=n,n=Ri;e.forEach(function(e,n){o&&(e instanceof pe?"use asm"==e.value&&(Ri=!0):e instanceof We||(e instanceof we&&e.body instanceof fe&&i.force_semicolon(),o=!1)),e instanceof We||(i.indent(),e.print(i),n==r&&t||(i.newline(),t&&i.newline()))}),Ri=n}function Oa(e,n){n.print("{"),n.with_indent(function(){n.append_comments(e,!0)}),n.print("}")}function $a(e,n,t){0<e.body.length?n.with_block(function(){Da(e.body,!1,n,t)}):Oa(e,n)}function qa(t,i){return function(e){var n=this;e.print(t),e.space(),e.with_parens(function(){n.init.print(e),e.space(),e.print(i),e.space(),n.object.print(e)}),Ja(n.body,e)}}function za(e,t){t.with_parens(function(){e.argnames.forEach(function(e,n){n&&t.comma(),e.print(t)}),e.rest&&(e.argnames.length&&t.comma(),t.print("..."),e.rest.print(t))})}function Ca(e,n){var t=1==e.argnames.length&&!e.rest&&e.argnames[0];t instanceof Ne&&"yield"!=t.name?t.print(n):za(e,n),n.space(),n.print("=>"),n.space(),e.value?e.value.print(n):$a(e,n,!0)}function Ma(e,n){e.name&&(n.space(),e.name.print(n)),za(e,n),n.space(),$a(e,n,!0)}function Fa(e){e.print("async"),e.space(),e.print("function"),Ma(this,e)}function Pa(e){e.print("async"),e.space(),e.print("function*"),Ma(this,e)}function ja(e){e.print("function*"),Ma(this,e)}function Na(e,n){var t=e.value;un(t)&&(n.print("async"),n.space()),ln(t)&&n.print("*"),Va(e,n),Ma(e.value,n)}function Ia(t,i){return function(e){e.print(t);var n=this[i];n&&(e.space(),n.print(e)),e.semicolon()}}function Ha(e,n){n.newline(),e.body.forEach(function(e){n.indent(),e.print(n),n.newline()})}function Ya(n){return function(t){t.print(n),t.space(),this.definitions.forEach(function(e,n){n&&t.comma(),e.print(t)});var e=t.parent();e instanceof Ke&&e.init===this||t.semicolon()}}function Ra(e,n,t){var i=!1;t&&e.walk(new Ye(function(e){return!!i||(e instanceof Ce&&"in"==e.operator?i=!0:e instanceof ke&&(!cn(e)||!e.value)||void 0)})),e.print(n,i)}function La(e,n){if(n.option("annotations")&&e.pure){var t,i=0,r=e;do{if(t=r,(r=n.parent(i++))instanceof De&&r.expression===t)return}while(r instanceof $e&&r.expression===t);n.print("/*@__PURE__*/")}}function Ba(e,t){(e.expression instanceof De||e.expression instanceof Ee)&&t.add_mapping(e.start),t.with_parens(function(){e.args.forEach(function(e,n){n&&t.comma(),e.print(t)})})}function Ua(e,t,i){var n=e.properties;0<n.length?t.with_block(function(){n.forEach(function(e,n){n&&(i||t.print(","),t.newline()),t.indent(),e.print(t)}),t.newline()}):Oa(e,t)}function Va(e,n){var t=e.key;if(t instanceof ye)return n.with_square(function(){t.print(n)});var i=e.start&&e.start.quote;if(n.option("quote_keys")||i&&n.option("keep_quoted_props"))n.print_string(t,i);else if(""+ +t==t&&0<=t)n.print(Ka(t));else if(e.private)n.print_name(t);else{if(P[t]?!n.option("ie"):Lt(t))return n.print_name(t),t;n.print_string(t,i)}}function Wa(n){return function(e){this.static&&(e.print("static"),e.space()),e.print(n),e.space(),Va(this,e),Ma(this.value,e)}}function Ga(e){var n=e.definition();return n&&n.mangled_name||e.name}function Ja(e,n){n.option("braces")&&!(e instanceof Rn||e instanceof Ln)?Qa(e,n):e instanceof We?n.force_semicolon():(n.space(),e.print(n))}function Xa(e,n){return 0<e.args.length||n.option("beautify")}function Ka(e){for(var n,t,i=e.toString(10).replace(/^0\./,".").replace("e+","e"),r=[i],o=(Math.floor(e)===e&&(e<0?r.push("-0x"+(-e).toString(16).toLowerCase()):r.push("0x"+e.toString(16).toLowerCase())),(e=/^\.0+/.exec(i))?(n=e[0].length,t=i.slice(n),r.push(t+"e-"+(t.length+n-1))):(e=/[^0]0+$/.exec(i))?(n=e[0].length-1,r.push(i.slice(0,-n)+"e"+n)):(e=/^(\d)\.(\d+)e(-?\d+)$/.exec(i))&&r.push(e[1]+e[2]+"e"+(e[3]-e[2].length)),r),a=o[0],s=a.length,f=1;f<o.length;++f)o[f].length<s&&(s=(a=o[f]).length);return a}function Qa(e,n){n.space(),e instanceof We?Oa(e,n):e instanceof xe?e.print(n):n.with_block(function(){n.indent(),e.print(n),n.newline()})}function Za(e,n){e.forEach(function(e){e.DEFMETHOD("add_source_map",n)})}(Ji.prototype=new Ht(function(e,n,t){if(e._squeezed)return e;var i=e instanceof ke,r=(i&&(e.hoist_properties(this),e.hoist_declarations(this),e.process_returns(this)),n(e,this),n(e,this),e.optimize(this));return!i||r!==e||this.has_directive("use asm")||r.pinned()||(r.drop_unused(this),r.merge_variables(this)&&r.drop_unused(this),n(r,this)),r===e&&(r._squeezed=!0),r})).option=function(e){return this.options[e]},Ji.prototype.exposed=function(e){if(e.exported)return!0;if(e.undeclared)return!0;if(!(e.global||e.scope.resolve()instanceof an))return!1;var n=this.toplevel;return!ge(e.orig,function(e){return n[e instanceof bt?"funcs":"vars"]})},Ji.prototype.compress=function(e){(e=e.resolve_defines(this)).hoist_exports(this),this.option("expression")&&e.process_expression(!0);for(var n=this.options.merge_vars,t=+this.options.passes||1,i=1/0,r=!1,o={ie:this.option("ie")},a=0;a<t;a++)if(e.figure_out_scope(o),(0<a||this.option("reduce_vars"))&&e.reset_opt_flags(this),this.options.merge_vars=n&&(r||a==t-1),e=e.transform(this),1<t){var s=0;if(e.walk(new Ye(function(){s++})),ye.info("pass {pass}: last_count: {min_count}, count: {count}",{pass:a,min_count:i,count:s}),s<i)i=s,r=!1;else{if(r)break;r=!0}}return this.option("expression")&&e.process_expression(!1),e},(n=function(e,n){e.DEFMETHOD("optimize",function(e){if(this._optimized)return this;if(e.has_directive("use asm"))return this;e=n(this,e);return e._optimized=!0,e})})(ye,function(e,n){return e}),ye.DEFMETHOD("equivalent_to",function(e){return this.TYPE==e.TYPE&&this.print_to_string()==e.print_to_string()}),an.DEFMETHOD("hoist_exports",function(e){if(e.option("hoist_exports")){for(var n=this.body,t=[],i=0;i<n.length;i++){var r=n[i];r instanceof Un?(n[i]=r=r.body,r instanceof Yn?r.definitions.forEach(function(e){e.name.match_symbol(o,!0)}):o(r.name)):r instanceof Gn&&(n.splice(i--,1),[].push.apply(t,r.properties))}t.length&&n.push(Re(Gn,this,{properties:t}))}function o(e){e instanceof ht&&((e=Re(St,e,e)).alias=e.name,t.push(e))}}),ke.DEFMETHOD("process_expression",function(r,o){var a=this,s=new Ht(function(e){if(r){if((e=e instanceof pe?Re(we,e,{body:Re(fe,e,e)}):e)instanceof we)return o?o(e):Re($n,e,{value:e.body})}else if(e instanceof $n){if(o)return o(e);var n=e.value;return n instanceof fe?Re(pe,e,n):Re(we,e,{body:n||Re(ze,e,{operator:"void",expression:Re(He,e,{value:0})})})}if(e instanceof Xe){if(e instanceof Ee){if(e!==a)return e}else if("awaits"===r&&e instanceof Nn&&e.bfinally)return e;for(var t=e.body.length;0<=--t;){var i=e.body[t];if(!Xr(i,!0)){e.body[t]=i.transform(s);break}}}else e instanceof Se?(e.body=e.body.transform(s),e.alternative&&(e.alternative=e.alternative.transform(s))):e instanceof on&&(e.body=e.body.transform(s));return e});a.transform(s)}),pi=/^(0|[1-9][0-9]*)$/,(t=function(e,n){e.DEFMETHOD("reduce_vars",n)})(ye,X),t(Fe,function(o,e,n){var a=this,s=a.left,f=a.right,t=s instanceof Ie&&s.definition(),i=t||s instanceof je;switch(a.operator){case"=":return s.equivalent_to(f)&&!s.has_side_effects(n)?(f.walk(o),function e(n){{var t;n instanceof Qn?e(n.expression):n instanceof Zn?(e(n.expression),n.property.walk(o)):n instanceof Ie?(vr(t=n.definition(),n),t.fixed&&(n.fixed=t.fixed,n.fixed.assigns?n.fixed.assigns.push(a):n.fixed.assigns=[a])):n.walk(o)}}(s),a.redundant=!0):t&&f instanceof fn?(l(),f.parent_scope.resolve().fn_defs.push(f),f.safe_ids=null,t.fixed&&a.write_only||ur(o,t,f),!0):i?(f.walk(o),l(),!0):void xr(s);case"&&=":case"||=":case"??=":var r=!0;default:if(!i)return xr(s),p();t.assignments++;var c=t.fixed;if(Ki(n,o,a,a,0))return t.fixed=!1,p();var u=mr(o,t);return r&&pr(o),f.walk(o),r&&dr(o),u&&!s.in_arg&&_r(o,t)?(vr(t,s),hr(o,t),t.single_use&&(t.single_use=!1),s.fixed=t.fixed=function(){return Re(Ce,a,{operator:a.operator.slice(0,-1),left:gr(s,c),right:a.right})},s.fixed.assigns=c&&c.assigns?c.assigns.slice():[t.orig[0]],s.fixed.assigns.push(a),s.fixed.to_binary=br(s,c)):(s.walk(o),t.fixed=!1),!0}function l(){var e=t&&sa(o,t),r=Ki(n,o,a,f,0,yr(f),e);Er(o,n,s,function(){return a.right},function(e,n,t){if(!(e instanceof Ie))return xr(e),void t();var i=e.definition();i.assignments++,n&&!e.in_arg&&_r(o,i)?r?(t(),i.fixed=0):(vr(i,e),hr(o,i),(s instanceof je||1==i.orig.length&&i.orig[0]instanceof bt)&&(i.single_use=!1),o.loop_ids[i.id]=o.in_loop,e.fixed=i.fixed=n,e.fixed.assigns=[a],wr(o,i,e.scope,a,f,0,1)):(t(),i.fixed=!1)})}function p(){if(r)return s.walk(o),pr(o),f.walk(o),dr(o),!0}}),t(Ce,function(e){if(xi[this.operator])return this.left.walk(e),pr(e),this.right.walk(e),dr(e),!0}),t(Je,function(e,n,t){or(0,t,this)}),t(De,function(n,e){var t,i=this,r=i.expression;if(r instanceof fn)return t=Wr(i),i.args.forEach(function(e){e.walk(n),e instanceof qe&&(t=!1)}),t&&(r.reduce_vars=Sr),r.walk(n),t&&delete r.reduce_vars,!0;if("Call"==i.TYPE)switch(n.in_boolean_context()){case"d":var o=!0;case!0:!function e(n,t){n instanceof Fe?"="==n.operator&&(e(n.left,t),e(n.right,t)):n instanceof Ce?xi[n.operator]&&(e(n.left,t),e(n.right,t)):n instanceof Me?(e(n.consequent,t),e(n.alternative,t)):n instanceof Ie&&((n=n.definition()).bool_return++,t&&n.drop_return++)}(r,o)}r.walk(n);var a=i.optional,i=(a&&pr(n),i.args.forEach(function(e){e.walk(n)}),a&&dr(n),r instanceof Ie&&r.fixed_value());return i instanceof Ee?ur(n,r.definition(),i):n.find_parent(ke).may_call_this(),!0}),t(wn,function(n,e,t){var i,r,o=this,t=(or(0,t,o),o.extends&&o.extends.walk(n),o.properties.filter(function(e){return Tr(e),e.key instanceof ye&&e.key.walk(n),e.value}));return o.name&&(i=o.name.definition(),((r=n.parent())instanceof Un||r instanceof Vn)&&(i.single_use=!1),_r(n,i,!0)?(hr(n,i),n.loop_ids[i.id]=n.in_loop,i.fixed=function(){return o},i.fixed.assigns=[o],Vo(i)||(i.single_use=!1)):i.fixed=!1),t.forEach(function(e){!e.static||e instanceof Sn&&e.value.contains_this()?(pr(n),e.value.walk(n),dr(n)):e.value.walk(n)}),!0}),t(Me,function(e){return this.condition.walk(e),pr(e),this.consequent.walk(e),dr(e),pr(e),this.alternative.walk(e),dr(e),!0}),t(Ae,function(e){return this.name.walk(e),pr(e),this.value.walk(e),dr(e),!0}),t(Ze,function(e){var n=e.in_loop;return e.in_loop=this,pr(e),this.body.walk(e),Yo(this,e.parent())&&(dr(e),pr(e)),this.condition.walk(e),dr(e),e.in_loop=n,!0}),t(nn,function(e,n,t){var i=this,t=(or(0,t,i),i.init&&i.init.walk(e),e.in_loop);return e.in_loop=i,pr(e),i.condition&&i.condition.walk(e),i.body.walk(e),i.step&&(Yo(i,e.parent())&&(dr(e),pr(e)),i.step.walk(e)),dr(e),e.in_loop=t,!0}),t(tn,function(e,n,t){var i=this,t=(or(0,t,i),i.object.walk(e),e.in_loop),r=(e.in_loop=i,pr(e),i.init);return r instanceof Yn?r.definitions[0].name.mark_symbol(function(e){e instanceof ht&&((e=e.definition()).assignments++,e.fixed=!1)},e):r instanceof je||r instanceof Ie?r.mark_symbol(function(e){var n;e instanceof Ie&&(vr(n=e.definition(),e),n.assignments++,e.is_immutable()||(n.fixed=!1))},e):r.walk(e),i.body.walk(e),dr(e),e.in_loop=t,!0}),t(Se,function(e){return this.condition.walk(e),pr(e),this.body.walk(e),dr(e),this.alternative&&(pr(e),this.alternative.walk(e),dr(e)),!0}),t(de,function(e){return pr(e),this.body.walk(e),dr(e),!0}),t(Ee,function(e,n,t){var i=this;return sr(e,i)&&K(e.fn_visited,i)&&(i.inlined=!1,pr(e),ar(e,t,i),n(),lr(e,i),i.name&&wr(e,i.name.definition(),i,i.name,i,0,1)),!0}),t(Q,function(e,n,t){var i=this,r=i.name.definition(),o=e.parent();return(o instanceof Un||o instanceof Vn)&&(r.single_use=!1),sr(e,i)&&K(e.fn_visited,i)&&(i.inlined=!1,pr(e),ar(e,t,i),n(),lr(e,i)),!0}),t(Zn,function(e){if(this.optional)return this.expression.walk(e),pr(e),this.property.walk(e),dr(e),!0}),t(Fn,function(n,e,t){or(0,t,this),this.expression.walk(n);var i=!0;return this.body.forEach(function(e){e instanceof Pn||(e.expression.walk(n),i&&(i=!1,pr(n)))}),i||dr(n),A(this,n),!0}),t(k,function(e){return pr(e),A(this,e),dr(e),!0}),t(kt,function(){this.definition().fixed=!1}),t(mt,function(){this.definition().fixed=!1}),t(Ie,function(t,e,n){var i,r,o=this.definition(),a=(vr(o,this),1==o.references.length&&!o.fixed&&o.orig[0]instanceof bt&&(t.loop_ids[o.id]=t.in_loop),sa(t,o));a&&a.enclosed.forEach(function(e){var n;o===e||e.scope.resolve()===a||!(n=e.fixed&&e.fixed.assigns)||n[n.length-1]instanceof Te||(n=t.safe_ids[e.id])&&(n.assign=!0)}),!1===o.fixed||0===o.fixed?(r=o.redefined())&&nr(o.scope,this.scope)&&(r.single_use=!1):void 0!==o.fixed&&mr(t,o)?o.fixed&&(this.in_arg&&o.orig[0]instanceof yt&&(this.fixed=o.scope),i=this.fixed_value(),a?o.recursive_refs++:!i||(r=o,!n.option("unused")||r.scope.pinned()||!1===r.single_use||r.references.length-r.recursive_refs!=1||ei(r)&&r.scope.uses_arguments)?o.single_use=!1:(o.in_loop=t.loop_ids[o.id]!==t.in_loop,o.single_use=Qi(i)&&!i.pinned()&&(!o.in_loop||t.parent()instanceof De)||!o.in_loop&&o.scope===this.scope.resolve()&&i.is_constant_expression()),Ki(n,t,this,i,0,yr(i),a)&&(o.single_use?o.single_use="m":o.fixed=0),o.fixed&&t.loop_ids[o.id]!==t.in_loop&&(o.cross_loop=!0),wr(t,o,this.scope,this,i,0,1)):o.fixed=!1,this.fixed||(this.fixed=o.fixed),i instanceof Ee&&!((n=t.parent())instanceof De&&n.expression===this)&&ur(t,o,i)}),t(qt,function(n,e){var t=this.tag;if(t){if(t instanceof fn)return this.expressions.forEach(function(e){e.walk(n)}),t.walk(n),!0;t.walk(n),this.expressions.forEach(function(e){e.walk(n)});var i=t instanceof Ie&&t.fixed_value();return i instanceof Ee?ur(n,t.definition(),i):n.find_parent(ke).may_call_this(),!0}}),t(an,function(e,n,t){return this.globals.each(function(e){rr(0,t,e)}),pr(e),ar(e,t,this),n(),lr(e,this),!0}),t(Nn,function(e,n,t){var i=this;return or(0,t,i),pr(e),A(i,e),dr(e),i.bcatch&&(pr(e),i.bcatch.walk(e),dr(e)),i.bfinally&&i.bfinally.walk(e),!0}),t(et,function(e,n){var t=this;if(Gt[t.operator]){var i,r,o=t.expression;if(o instanceof Ie)return(i=o.definition()).assignments++,r=i.fixed,mr(e,i)&&!o.in_arg&&_r(e,i)?(vr(i,o),hr(e,i),i.single_use&&(i.single_use=!1),i.fixed=function(){return Re(Ce,t,{operator:t.operator.slice(0,-1),left:Re(ze,t,{operator:"+",expression:gr(o,r)}),right:Re(He,t,{value:1})})},i.fixed.assigns=r&&r.assigns?r.assigns.slice():[],i.fixed.assigns.push(t),t instanceof ze?o.fixed=i.fixed:(o.fixed=function(){return Re(ze,t,{operator:"+",expression:gr(o,r)})},o.fixed.assigns=r&&r.assigns,o.fixed.to_prefix=br(o,i.fixed))):(o.walk(e),i.fixed=!1),!0;xr(o)}}),t(Te,function(i,e,n){var t,r=this,o=r.value;return o instanceof fn&&r.name instanceof ht?(a(),o.parent_scope.resolve().fn_defs.push(o),o.safe_ids=null,(t=r.name.definition()).fixed||ur(i,t,o)):o?(o.walk(i),a()):i.parent()instanceof Ln&&a(),!0;function a(){Er(i,n,r.name,function(){return r.value||Re(Ft,r)},function(e,n){var t=e.definition();n&&_r(i,t,!0)?(hr(i,t),i.loop_ids[t.id]=i.in_loop,t.fixed=n,t.fixed.assigns=[r],(e instanceof vt&&t.redefined()||!tr(e)&&!Vo(t))&&(t.single_use=!1)):t.fixed=!1})}}),t(en,function(e,n){var t=e.in_loop;return e.in_loop=this,pr(e),n(),dr(e),e.in_loop=t,!0}),an.DEFMETHOD("reset_opt_flags",function(t){var i=new Ye(t.option("reduce_vars")?function(e,n){return Tr(e),e.reduce_vars(i,n,t)}:Tr);i.fn_scanning=null,i.fn_visited=[],i.in_loop=null,i.loop_ids=Object.create(null),i.safe_ids=Object.create(null),this.walk(i)}),dt.DEFMETHOD("fixed_value",function(){var e=this.definition().fixed;if(e)return((e=this.fixed?this.fixed:e)instanceof ye?e:e()).tail_node();if(!(e=0===e&&this.fixed))return e;e=(e instanceof ye?e:e()).tail_node();return e.is_constant()&&e}),Ie.DEFMETHOD("is_immutable",function(){var e=this.redef||this.definition();return(this.in_arg||1==e.orig.length)&&e.orig[0]instanceof yt}),ye.DEFMETHOD("convert_symbol",X),Ae.DEFMETHOD("convert_symbol",Ar),je.DEFMETHOD("convert_symbol",Ar),ht.DEFMETHOD("convert_symbol",Dr),Ie.DEFMETHOD("convert_symbol",Dr),Ae.DEFMETHOD("mark_symbol",$r),je.DEFMETHOD("mark_symbol",$r),ht.DEFMETHOD("mark_symbol",qr),Ie.DEFMETHOD("mark_symbol",qr),ye.DEFMETHOD("match_symbol",function(e){return e(this)}),Ae.DEFMETHOD("match_symbol",zr),je.DEFMETHOD("match_symbol",zr),di=L("Infinity NaN undefined"),wi=L("Array Boolean clearInterval clearTimeout console Date decodeURI decodeURIComponent encodeURI encodeURIComponent Error escape eval EvalError Function isFinite isNaN JSON Map Math Number parseFloat parseInt RangeError ReferenceError RegExp Object Set setInterval setTimeout String SyntaxError TypeError unescape URIError WeakMap WeakSet"),Ie.DEFMETHOD("is_declared",function(e){return this.defined||!this.definition().undeclared||e.option("unsafe")&&wi[this.name]}),(t=function(e,n){e.DEFMETHOD("is_truthy",n)})(ye,_e),t(Pe,B),t(Fe,function(){return"="==this.operator&&this.right.is_truthy()}),t(Ee,B),t(st,B),t(Ct,B),t(Oe,function(){return this.tail_node().is_truthy()}),t(Ie,function(){var e=this.fixed_value();if(!e)return!1;this.is_truthy=_e;e=e.is_truthy();return delete this.is_truthy,e}),(t=function(e,n){e.DEFMETHOD("is_negative_zero",n)})(ye,B),t(Pe,_e),t(Fe,function(){var e=this.operator;return"="==e?this.right.is_negative_zero():to(e.slice(0,-1),this.left,this.right)}),t(Ce,function(){return to(this.operator,this.left,this.right)}),t($,function(){return 0==this.value&&1/this.value<0}),t(Ee,_e),t(st,_e),t(Ct,_e),t(Oe,function(){return this.tail_node().is_negative_zero()}),t(Ie,function(){var e=this.fixed_value();if(!e)return!0;this.is_negative_zero=B;e=e.is_negative_zero();return delete this.is_negative_zero,e}),t(ze,function(){return"+"==this.operator&&this.expression.is_negative_zero()||"-"==this.operator}),t=function(e,n){e.DEFMETHOD("_dot_throw",n)},ye.DEFMETHOD("may_throw_on_access",function(e,n){return!e.option("pure_getters")||this._dot_throw(e,n)}),t(ye,io),t(Pe,_e),t(Fe,function(e){var n=this.operator,t=this.left,i=this.right;return"="!=n?xi[n.slice(0,-1)]&&(t._dot_throw(e)||i._dot_throw(e)):!!i._dot_throw(e)&&(!(t instanceof Ie)||(!(i instanceof Ce&&"||"==i.operator&&t.name==i.left.name)||i.right._dot_throw(e)))}),t(Ce,function(e){return xi[this.operator]&&(this.left._dot_throw(e)||this.right._dot_throw(e))}),t(wn,_e),t(Me,function(e){return this.consequent._dot_throw(e)||this.alternative._dot_throw(e)}),t($,_e),t(Qn,function(e,n){if(!io(e,n))return!1;e=this.expression;return e instanceof Ie&&(e=e.fixed_value()),!("prototype"==this.property&&Qi(e))}),t(Ee,_e),t(Mt,B),t(st,function(n,t){return io(n,t)&&!ge(this.properties,function(e){return e instanceof ct&&("__proto__"!==e.key||!e.value._dot_throw(n,t))})}),t(At,function(e,n){return io(e,n)&&!this.scope.resolve().new}),t(Oe,function(e){return this.tail_node()._dot_throw(e)}),t(Ie,function(e,n){if(this.is_undefined)return!0;if(!io(e,n))return!1;if(Gr(this)&&this.is_declared(e))return!1;if(this.is_immutable())return!1;n=this.definition();if(er(n)&&!n.scope.rest&&ge(n.scope.argnames,function(e){return e instanceof Ne}))return 2<n.scope.uses_arguments;n=this.fixed_value();return!n||(this._dot_throw=B,n._dot_throw(e)?(delete this._dot_throw,!0):(this._dot_throw=_e,!1))}),t(ze,function(){return"void"==this.operator}),t(nt,_e),t(Ft,B),(t=function(e,n){e.DEFMETHOD("is_defined",n)})(ye,_e),t(Pe,B),t(Fe,function(e){var n=this.operator;return"="==n?this.right.is_defined(e):ro(e,n.slice(0,-1),this)}),t(Ce,function(e){return ro(e,this.operator,this)}),t(Me,function(e){return this.consequent.is_defined(e)&&this.alternative.is_defined(e)}),t($,B),t(Pt,_e),t(Ee,B),t(st,B),t(Oe,function(e){return this.tail_node().is_defined(e)}),t(Ie,function(e){if(this.is_undefined)return!1;if(Gr(this)&&this.is_declared(e))return!0;if(this.is_immutable())return!0;var n=this.fixed_value();if(!n)return!1;this.is_defined=_e;n=n.is_defined(e);return delete this.is_defined,n}),t(ze,function(){return"void"!=this.operator}),t(nt,B),t(Ft,_e),(t=function(e,n){e.DEFMETHOD("is_boolean",n)})(ye,_e),t(Fe,function(e){return"="==this.operator&&this.right.is_boolean(e)}),hi=L("in instanceof == != === !== < <= >= >"),t(Ce,function(e){return hi[this.operator]||xi[this.operator]&&this.left.is_boolean(e)&&this.right.is_boolean(e)}),t(C,B),vi=L("every hasOwnProperty isPrototypeOf propertyIsEnumerable some"),t(De,function(e){if(!e.option("unsafe"))return!1;e=this.expression;return e instanceof Qn&&(vi[e.property]||"test"==e.property&&e.expression instanceof Ct)}),t(Me,function(e){return this.consequent.is_boolean(e)&&this.alternative.is_boolean(e)}),t(Xn,_e),t(Oe,function(e){return this.tail_node().is_boolean(e)}),t(Ie,function(e){var n=this.fixed_value();if(!n)return!1;this.is_boolean=_e;n=n.is_boolean(e);return delete this.is_boolean,n}),mi=L("! delete"),t(ze,function(){return mi[this.operator]}),(t=function(e,n){e.DEFMETHOD("is_number",n)})(ye,_e),_i=L("- * / % ** & | ^ << >> >>>"),t(Fe,function(e){return _i[this.operator.slice(0,-1)]||"="==this.operator&&this.right.is_number(e)}),t(Ce,function(e){return!!_i[this.operator]||"+"==this.operator&&((this.left.is_boolean(e)||this.left.is_number(e))&&(this.right.is_boolean(e)||this.right.is_number(e)))}),gi=L(["charCodeAt","getDate","getDay","getFullYear","getHours","getMilliseconds","getMinutes","getMonth","getSeconds","getTime","getTimezoneOffset","getUTCDate","getUTCDay","getUTCFullYear","getUTCHours","getUTCMilliseconds","getUTCMinutes","getUTCMonth","getUTCSeconds","getYear","indexOf","lastIndexOf","localeCompare","push","search","setDate","setFullYear","setHours","setMilliseconds","setMinutes","setMonth","setSeconds","setTime","setUTCDate","setUTCFullYear","setUTCHours","setUTCMilliseconds","setUTCMinutes","setUTCMonth","setUTCSeconds","setYear"]),t(De,function(e){if(!e.option("unsafe"))return!1;e=this.expression;return e instanceof Qn&&(gi[e.property]||Gr(e.expression)&&"Math"==e.expression.name)}),t(Me,function(e){return this.consequent.is_number(e)&&this.alternative.is_number(e)}),t(Xn,_e),t(He,B),t(Oe,function(e){return this.tail_node().is_number(e)}),t(Ie,function(e,n){var t=this.fixed_value();if(!t)return!1;if(n&&t instanceof ze&&"+"==t.operator&&t.expression.equivalent_to(this))return!1;this.is_number=_e;n=t.is_number(e);return delete this.is_number,n}),bi=L("+ - ~ ++ --"),t(et,function(){return bi[this.operator]}),(t=function(e,n){e.DEFMETHOD("is_string",n)})(ye,_e),t(Fe,function(e){switch(this.operator){case"+=":if(this.left.is_string(e))return!0;case"=":return this.right.is_string(e)}}),t(Ce,function(e){return"+"==this.operator&&(this.left.is_string(e)||this.right.is_string(e))}),yi=L(["charAt","substr","substring","toExponential","toFixed","toLowerCase","toPrecision","toString","toUpperCase","trim"]),t(De,function(e){if(!e.option("unsafe"))return!1;e=this.expression;return e instanceof Qn&&yi[e.property]}),t(Me,function(e){return this.consequent.is_string(e)&&this.alternative.is_string(e)}),t(Oe,function(e){return this.tail_node().is_string(e)}),t(fe,B),t(Ie,function(e){var n=this.fixed_value();if(!n)return!1;this.is_string=_e;n=n.is_string(e);return delete this.is_string,n}),t(qt,function(e){return!this.tag||ca(e,this.tag)}),t(ze,function(){return"typeof"==this.operator}),xi=L("&& || ??"),t=function(e,n){e.DEFMETHOD("_find_defs",n)},an.DEFMETHOD("resolve_defines",function(o){return o.option("global_defs")?(this.figure_out_scope({ie:o.option("ie")}),this.transform(new Ht(function(e){var n=e._find_defs(o,"");if(n){for(var t,i=0,r=e;(t=this.parent(i++))&&t instanceof $e&&t.expression===r;)r=t;if(!ti(r,t))return n;oo(e)}}))):this}),t(ye,X),t(Qn,function(e,n){return this.expression._find_defs(e,"."+this.property+n)}),t(ht,function(e){this.definition().global&&le(e.option("global_defs"),this.name)&&oo(this)}),t(Ie,function(e,n){if(this.definition().global)return e=e.option("global_defs"),n=this.name+n,le(e,n)?function n(e,t){if(e instanceof ye)return e.clone(!0);if(Array.isArray(e))return Re(Pe,t,{elements:e.map(function(e){return n(e,t)})});if(e&&"object"==typeof e){var i,r=[];for(i in e)le(e,i)&&r.push(Re(ct,t,{key:i,value:n(e[i],t)}));return Re(st,t,{properties:r})}return Pr(e,t)}(e[n],this):void 0}),me.DEFMETHOD("first_statement",lo),pn.DEFMETHOD("first_statement",lo),Ee.DEFMETHOD("first_statement",function(){return uo(this.body)}),Ee.DEFMETHOD("length",function(){for(var e=this.argnames,n=0;n<e.length&&!(e[n]instanceof Ae);n++);return n}),$i=co({Array:["indexOf","join","lastIndexOf","slice"].concat(t=["constructor","toString","valueOf"]),Boolean:t,Function:t,Number:["toExponential","toFixed","toPrecision"].concat(t),Object:t,RegExp:["exec","test"].concat(t),String:["charAt","charCodeAt","concat","indexOf","italics","lastIndexOf","match","replace","search","slice","split","substr","substring","toLowerCase","toUpperCase","trim"].concat(t)}),qi=co({Array:["isArray"],Math:["abs","acos","asin","atan","ceil","cos","exp","floor","log","round","sin","sqrt","tan","atan2","pow","max","min"],Number:["isFinite","isNaN"],Object:["create","getOwnPropertyDescriptor","getOwnPropertyNames","getPrototypeOf","isExtensible","isFrozen","isSealed","keys"],String:["fromCharCode","raw"]}),(t=function(e,n){e.DEFMETHOD("is_constant",n)})(ye,_e),t($,B),t(Ct,_e),ki=L("! ~ - + void"),t(ze,function(){return ki[this.operator]&&this.expression instanceof $}),t=function(e,n){e.DEFMETHOD("_eval",n)},ye.DEFMETHOD("evaluate",function(e,n){if(!e.option("evaluate"))return this;var t=[],e=this._eval(e,n,t,1);return t.forEach(function(e){delete e._eval}),!n&&e&&!(e instanceof RegExp)&&("function"==typeof e||"object"==typeof e)?this:e}),Ei=new Ye(function(e){e instanceof Fe&&vo(e.left),e instanceof tn&&vo(e.init),e instanceof et&&Gt[e.operator]&&vo(e.expression)}),t(V,function(){throw new Error(m("Cannot evaluate a statement [{file}:{line},{col}]",this.start))}),t(sn,l),t(zt,l),t(wn,l),t(ye,l),t($,function(){return this.value}),t(Fe,function(e,n,t,i){var r=this.left;if(!n){if(!(r instanceof Ie))return this;if(!le(r,"_eval")){if(!r.fixed)return this;var o=r.definition();if(!o.fixed)return this;if(o.undeclared)return this;if(o.last_ref!==r)return this;if("m"==o.single_use)return this}}o=this.operator,o=!le(r,"_eval")&&r instanceof Ie&&r.fixed&&r.definition().fixed?r:"="==o?this.right:Re(Ce,this,{operator:o.slice(0,-1),left:r,right:this.right}),r.walk(Ei),o=o._eval(e,n,t,i);return"object"==typeof o?this:(vo(r),o)}),t(Oe,function(e,n,t,i){if(!n)return this;for(var r=this.expressions,o=0,a=r.length-1;o<a;o++)r[o].walk(Ei);var s=r[a],e=s._eval(e,n,t,i);return e===s?this:e}),t(Ee,function(e){return e.option("unsafe")?((e=function(){}).node=this,e.toString=function(){return"function(){}"},e):this}),t(Pe,function(e,n,t,i){if(e.option("unsafe")){for(var r=[],o=0;o<this.elements.length;o++){var a=this.elements[o];if(a instanceof Pt)return this;var s=a._eval(e,n,t,i);if(a===s)return this;r.push(s)}return r}return this}),t(st,function(e,n,t,i){if(e.option("unsafe")){for(var r={},o=0;o<this.properties.length;o++){var a=this.properties[o];if(!(a instanceof ct))return this;var s=a.key;if(s instanceof ye&&(s=s._eval(e,n,t,i))===a.key)return this;switch(s){case"__proto__":case"toString":case"valueOf":return this}if(r[s]=a.value._eval(e,n,t,i),r[s]===a.value)return this}return r}return this}),Si=L("! typeof void"),t(ze,function(e,n,t,i){var r=this.expression,o=this.operator;if(e.option("typeofs")&&"typeof"==o&&(r instanceof Ee||r instanceof Ie&&r.fixed_value()instanceof Ee))return"function";var a=r instanceof Ie&&r.definition(),s=(Si[o]||a&&a.fixed||i++,r.walk(Ei),r._eval(e,n,t,i));if(s===r)return n&&"void"==o?void 0:this;switch(o){case"!":return!s;case"typeof":return s instanceof RegExp?this:typeof s;case"void":return;case"~":return~s;case"-":return-s;case"+":return+s;case"++":case"--":if(!a)return this;if(!n){if(a.undeclared)return this;if(a.last_ref!==r)return this}return le(r,"_eval")&&(s=+(o[0]+1)+ +s),vo(r),s}return this}),t(nt,function(e,n,t,i){var r=this.expression;if(r instanceof Ie){if(!le(r,"_eval")){if(!r.fixed)return this;if(!n){var o=r.definition();if(!o.fixed)return this;if(o.undeclared)return this;if(o.last_ref!==r)return this}}}else if(!n)return this;r instanceof Ie&&r.definition().fixed||i++,r.walk(Ei);o=r._eval(e,n,t,i);return o===r?this:(vo(r),+o)}),Ti=L("&& || === !=="),t(Ce,function(e,n,t,i){Ti[this.operator]||i++;var r=this.left._eval(e,n,t,i);if(r===this.left)return this;if(this.operator==(r?"||":"&&"))return r;var o,a=this.right._eval(e,n&&!(r&&"object"==typeof r),t,i);if(a===this.right)return this;switch(this.operator){case"&&":o=r&&a;break;case"||":o=r||a;break;case"??":o=null==r?a:r;break;case"|":o=r|a;break;case"&":o=r&a;break;case"^":o=r^a;break;case"+":o=r+a;break;case"-":o=r-a;break;case"*":o=r*a;break;case"/":o=r/a;break;case"%":o=r%a;break;case"<<":o=r<<a;break;case">>":o=r>>a;break;case">>>":o=r>>>a;break;case"==":o=r==a;break;case"===":o=r===a;break;case"!=":o=r!=a;break;case"!==":o=r!==a;break;case"<":o=r<a;break;case"<=":o=r<=a;break;case">":o=a<r;break;case">=":o=a<=r;break;case"**":o=Math.pow(r,a);break;case"in":if(a&&"object"==typeof a&&le(a,r)){o=!0;break}default:return this}if(isNaN(o))return e.find_parent(on)?this:o;if(e.option("unsafe_math")&&!n&&o&&"number"==typeof o&&("+"==this.operator||"-"==this.operator)){t=Math.max(0,s(r),s(a));if(t<16)return+o.toFixed(t)}return o;function s(e){e=/(\.[0-9]*)?(e[^e]+)?$/.exec(+e);return(e[1]||".").length-1-(e[2]||"").slice(1)}}),t(Me,function(e,n,t,i){var r=this.condition._eval(e,n,t,i);if(r===this.condition)return this;r=r?this.consequent:this.alternative,e=r._eval(e,n,t,i);return e===r?this:e}),t(Ie,function(e,n,t,i){var r,o=this.fixed_value();if(!o)return this;if(le(o,"_eval"))r=o._eval();else{if(this._eval=l,r=o._eval(e,n,t,i),delete this._eval,r===o)return this;o._eval=function(){return r},t.push(o)}return r&&"object"==typeof r&&!function(n,e){var t=n.definition().escaped;switch(t.length){case 0:return 1;case 1:var i=!1;return t[0].walk(new Ye(function(e){return!!i||(e===n?i=!0:e instanceof ke||void 0)})),i;default:return e<=t.depth}}(this,i)?this:r}),Ai={Array:Array,Math:Math,Number:Number,Object:Object,String:String},Di=co({Math:["E","LN10","LN2","LOG2E","LOG10E","PI","SQRT1_2","SQRT2"],Number:["MAX_VALUE","MIN_VALUE","NaN","NEGATIVE_INFINITY","POSITIVE_INFINITY"]}),Oi=L("global ignoreCase multiline source"),t($e,function(e,n,t,i){if(e.option("unsafe")){var r,o=this.expression;if(!Gr(o)&&(null==(r=o._eval(e,n,t,i+1))||r===o))return this;var a=this.property;if(a instanceof ye&&(a=a._eval(e,n,t,i))===this.property)return this;if(void 0===r){e=Di[o.name];if(!e||!e[a])return this;r=Ai[o.name]}else if(r instanceof RegExp){if(!Oi[a])return this}else if("object"==typeof r){if(!le(r,a))return this}else if("function"==typeof r)switch(a){case"name":return r.node.name?r.node.name.name:"";case"length":return r.node.length();default:return this}return r[a]}return this}),t(De,function(i,r,o,a){var e=this.expression,n=e instanceof Ie?e.fixed_value():e;if(n instanceof me||n instanceof bn||n instanceof vn){if(n.evaluating)return this;if(n.name&&0<n.name.definition().recursive_refs)return this;if(this.is_expr_pure(i))return this;var s=mo(this.args,i,r,o,a);if(!ge(n.argnames,function(e,n){if(e instanceof Ae){if(!s)return;if(void 0===s[n]){var t=e.value._eval(i,r,o,a);if(t===e.value)return;s[n]=t}e=e.name}return!(e instanceof je)}))return this;if(n.rest instanceof je)return this;if(!s&&!r)return this;var t=n.first_statement();if(!(t instanceof $n)){if(r){n.walk(Ei);var f=!1;if(n.evaluating=!0,A(n,new Ye(function(e){return!!f||(e instanceof $n?(e.value&&void 0!==e.value._eval(i,!0,o,a)&&(f=!0),!0):e instanceof ke&&e!==n||void 0)})),n.evaluating=!1,!f)return}return this}if(!(u=t.value))return;var c=[];return s&&(!ge(n.argnames,function(e,n){return p(e,s[n])})||n.rest&&!p(n.rest,s.slice(n.argnames.length)))&&!r||(r&&n.argnames.forEach(function(e){e instanceof Ae&&e.value.walk(Ei)}),n.evaluating=!0,u=u._eval(i,r,o,a),n.evaluating=!1),c.forEach(function(e){delete e._eval}),u===t.value?this:u}if(i.option("unsafe")&&e instanceof $e){var u,t=e.property;if(t instanceof ye&&(t=t._eval(i,r,o,a))===e.property)return this;e=e.expression;if(Gr(e)){var l=qi[e.name];if(!l||!l[t])return this;u=Ai[e.name]}else{if(null==(u=e._eval(i,r,o,a+1))||u===e)return this;l=$i[u.constructor.name];if(!l||!l[t])return this;if(u instanceof RegExp&&u.global&&!(e instanceof Ct))return this}if(!(s=mo(this.args,i,r,o,a)))return this;if("replace"==t&&"function"==typeof s[1])return this;try{return u[t].apply(u,s)}catch(e){ye.warn("Error evaluating {code} [{file}:{line},{col}]",{code:this,file:this.start.file,line:this.start.line,col:this.start.col})}finally{u instanceof RegExp&&(u.lastIndex=0)}}return this;function p(e,n){var t=(e=e instanceof Ae?e.name:e).definition();if(t.orig[t.orig.length-1]!==e)return!1;var i=n;return t.references.forEach(function(e){e._eval=function(){return i},c.push(e)}),!0}}),t(Xn,l),t(qt,function(e,n,t,i){if(!e.option("templates"))return this;if(this.tag){if(!ca(e,this.tag))return this;f=function(e){return e}}var r=mo(this.expressions,e,n,t,i);if(!r)return this;for(var o=!1,a=f(this.strings[0]),s=0;s<r.length;s++)a+=r[s]+f(this.strings[s+1]);return o?(this._eval=l,this):a;function f(e){return"string"!=typeof(e=ua(e))&&(o=!0),e}}),(t=function(e,t){e.DEFMETHOD("negate",function(e,n){return t.call(this,e,n)})})(ye,function(){return _o(this)}),t(V,function(){throw new Error("Cannot negate a statement")}),t(Ce,function(e,n){var t=this.clone(),i=this.operator;if(e.option("unsafe_comps"))switch(i){case"<=":return t.operator=">",t;case"<":return t.operator=">=",t;case">=":return t.operator="<",t;case">":return t.operator="<=",t}switch(i){case"==":return t.operator="!=",t;case"!=":return t.operator="==",t;case"===":return t.operator="!==",t;case"!==":return t.operator="===",t;case"&&":return t.operator="||",t.left=t.left.negate(e,n),t.right=t.right.negate(e),go(this,t,n);case"||":return t.operator="&&",t.left=t.left.negate(e,n),t.right=t.right.negate(e),go(this,t,n)}return _o(this)}),t(kn,function(){return _o(this)}),t(Me,function(e,n){var t=this.clone();return t.consequent=t.consequent.negate(e),t.alternative=t.alternative.negate(e),go(this,t,n)}),t(fn,function(){return _o(this)}),t(Oe,function(e){var n=this.expressions.slice();return n.push(n.pop().negate(e)),Le(this,n)}),t(ze,function(){return"!"==this.operator?this.expression:_o(this)}),zi=L("Boolean decodeURI decodeURIComponent Date encodeURI encodeURIComponent Error escape EvalError isFinite isNaN Number Object parseFloat parseInt RangeError ReferenceError String SyntaxError TypeError unescape URIError"),Ci=L("Map Set WeakMap WeakSet"),De.DEFMETHOD("is_expr_pure",function(e){if(e.option("unsafe")){var n=this.expression;if(Gr(n)){if(zi[n.name])return!0;if(this instanceof Xn&&Ci[n.name])return!0}if(ho(n))return!0}return e.option("annotations")&&this.pure||!e.pure_funcs(this)}),qt.DEFMETHOD("is_expr_pure",function(e){var n,t=this.tag;if(!t)return!0;if(e.option("unsafe")){if(Gr(t)&&zi[t.name])return!0;if(t instanceof Qn&&Gr(t.expression))return(n=qi[t.expression.name])&&(n[t.property]||"Math"==t.expression.name&&"random"==t.property)}return!e.pure_funcs(this)}),ye.DEFMETHOD("is_call_pure",_e),De.DEFMETHOD("is_call_pure",function(e){if(!e.option("unsafe"))return!1;var n=this.expression;if(!(n instanceof Qn))return!1;var t,i=n.expression,r=n.property;if(i instanceof Pe)t=$i.Array;else if(i.is_boolean(e))t=$i.Boolean;else if(i.is_number(e))t=$i.Number;else if(i instanceof Ct)t=$i.RegExp;else if(i.is_string(e)){if(t=$i.String,"replace"==r){i=this.args[1];if(i&&!i.is_string(e))return!1}}else n.may_throw_on_access(e)||(t=$i.Object);return t&&t[r]}),(t=function(e,n){e.DEFMETHOD("safe_to_spread",n)})(ye,_e),t(Pe,B),t(Fe,function(){switch(this.operator){case"=":return this.right.safe_to_spread();case"&&=":case"||=":case"??=":return this.left.safe_to_spread()&&this.right.safe_to_spread()}return!0}),t(Ce,function(){return!xi[this.operator]||this.left.safe_to_spread()&&this.right.safe_to_spread()}),t($,B),t(Ee,B),t(st,function(){return ge(this.properties,function(e){return!(e instanceof pt||e instanceof qe)})}),t(Oe,function(){return this.tail_node().safe_to_spread()}),t(Ie,function(){var e=this.fixed_value();return e&&e.safe_to_spread()}),t(et,B),(t=function(e,n){e.DEFMETHOD("has_side_effects",n)})(ye,B),t(Pe,function(e){return bo(this.elements,e,yo)}),t(Fe,function(e){var n=this.left;if(!(n instanceof $e))return!0;var t=n.expression;return!(t instanceof At)||!t.scope.resolve().new||n instanceof Zn&&n.property.has_side_effects(e)||this.right.has_side_effects(e)}),t(Ce,function(e){return this.left.has_side_effects(e)||this.right.has_side_effects(e)||"in"==this.operator&&!ia(this.right)}),t(Xe,function(e){return bo(this.body,e)}),t(De,function(e){return!(this.is_expr_pure(e)||this.is_call_pure(e)&&!this.expression.has_side_effects(e))||bo(this.args,e,yo)}),t(jn,function(e){return this.expression.has_side_effects(e)||bo(this.body,e)}),t(wn,function(e){var n=this.extends;return!(!n||Zi(n=n instanceof Ie?n.fixed_value():n))||bo(this.properties,e)}),t(En,function(e){return this.key instanceof ye&&this.key.has_side_effects(e)||this.static&&this.value&&this.value.has_side_effects(e)}),t(Me,function(e){return this.condition.has_side_effects(e)||this.consequent.has_side_effects(e)||this.alternative.has_side_effects(e)}),t($,_e),t(Yn,function(e){return bo(this.definitions,e)}),t(rt,function(e){return bo(this.elements,e)}),t(ot,function(e){return this.key instanceof ye&&this.key.has_side_effects(e)||this.value.has_side_effects(e)}),t(at,function(e){return bo(this.properties,e)}),t(Qn,function(e){return this.expression.may_throw_on_access(e)||this.expression.has_side_effects(e)}),t(We,_e),t(Se,function(e){return this.condition.has_side_effects(e)||this.body&&this.body.has_side_effects(e)||this.alternative&&this.alternative.has_side_effects(e)}),t(de,function(e){return this.body.has_side_effects(e)}),t(Ee,_e),t(st,function(e){return bo(this.properties,e,function(e,n){e=e.expression;return!e.safe_to_spread()||e.has_side_effects(n)})}),t(At,_e),t(ft,function(e){return this.key instanceof ye&&this.key.has_side_effects(e)||this.value.has_side_effects(e)}),t(Oe,function(e){return bo(this.expressions,e)}),t(we,function(e){return this.body.has_side_effects(e)}),t(Zn,function(e){return this.expression.may_throw_on_access(e)||this.expression.has_side_effects(e)||this.property.has_side_effects(e)}),t(Fn,function(e){return this.expression.has_side_effects(e)||bo(this.body,e)}),t(ht,_e),t(Ie,function(e){return!this.is_declared(e)||!tr(this,e)}),t(qt,function(e){return!this.is_expr_pure(e)||bo(this.expressions,e)}),t(Nn,function(e){return bo(this.body,e)||this.bcatch&&this.bcatch.has_side_effects(e)||this.bfinally&&this.bfinally.has_side_effects(e)}),t(et,function(e){return ni[this.operator]||this.expression.has_side_effects(e)}),t(Te,function(){return this.value}),(t=function(e,n){e.DEFMETHOD("may_throw",n)})(ye,B),t($,_e),t(We,_e),t(Ee,_e),t(At,_e),t(ht,_e),t(Pe,function(e){return wo(this.elements,e)}),t(Fe,function(e){return!!this.right.may_throw(e)||!(!e.has_directive("use strict")&&"="==this.operator&&this.left instanceof Ie)&&this.left.may_throw(e)}),t(tt,function(e){return this.expression.may_throw(e)}),t(Ce,function(e){return this.left.may_throw(e)||this.right.may_throw(e)||"in"==this.operator&&!ia(this.right)}),t(Xe,function(e){return wo(this.body,e)}),t(De,function(e){if(wo(this.args,e))return!0;if(this.is_expr_pure(e))return!1;this.may_throw=B;e=xo(this.expression,e);return delete this.may_throw,e}),t(jn,function(e){return this.expression.may_throw(e)||wo(this.body,e)}),t(Me,function(e){return this.condition.may_throw(e)||this.consequent.may_throw(e)||this.alternative.may_throw(e)}),t(Ae,function(e){return this.name.may_throw(e)||this.value&&this.value.may_throw(e)}),t(Yn,function(e){return wo(this.definitions,e)}),t(Qn,function(e){return!this.optional&&this.expression.may_throw_on_access(e)||this.expression.may_throw(e)}),t(tn,function(e){if(this.init.may_throw(e))return!0;var n=this.object;return!!n.may_throw(e)||(!((n=n.tail_node())instanceof Pe||n.is_string(e))||this.body.may_throw(e))}),t(Se,function(e){return this.condition.may_throw(e)||this.body&&this.body.may_throw(e)||this.alternative&&this.alternative.may_throw(e)}),t(de,function(e){return this.body.may_throw(e)}),t(st,function(e){return wo(this.properties,e)}),t(ft,function(e){return this.value.may_throw(e)||this.key instanceof ye&&this.key.may_throw(e)}),t($n,function(e){return this.value&&this.value.may_throw(e)}),t(Oe,function(e){return wo(this.expressions,e)}),t(we,function(e){return this.body.may_throw(e)}),t(Zn,function(e){return!this.optional&&this.expression.may_throw_on_access(e)||this.expression.may_throw(e)||this.property.may_throw(e)}),t(Fn,function(e){return this.expression.may_throw(e)||wo(this.body,e)}),t(Ie,function(e){return!this.is_declared(e)||!tr(this,e)}),t(qt,function(e){if(wo(this.expressions,e))return!0;if(this.is_expr_pure(e))return!1;if(!this.tag)return!1;this.may_throw=B;e=xo(this.tag,e);return delete this.may_throw,e}),t(Nn,function(e){return(this.bcatch?this.bcatch.may_throw(e):wo(this.body,e))||this.bfinally&&this.bfinally.may_throw(e)}),t(et,function(e){return this.expression.may_throw(e)&&!("typeof"==this.operator&&this.expression instanceof Ie)}),t(Te,function(e){return this.name.may_throw(e)||this.value&&this.value.may_throw(e)}),(t=function(e,n){e.DEFMETHOD("is_constant_expression",n)})(ye,_e),t(Pe,function(e){return ko(this.elements,e)}),t(Ce,function(e){return this.left.is_constant_expression(e)&&this.right.is_constant_expression(e)&&("in"!=this.operator||ia(this.right))}),t(wn,function(e){var n=this.extends;return!(n&&!Zi(n))&&ko(this.properties,e)}),t(En,function(e){return"string"==typeof this.key&&(!this.value||this.value.is_constant_expression(e))}),t($,B),t(Ee,function(i){var r=this,o=!0,a=[];return r.walk(new Ye(function(e,n){if(!o)return!0;if(e instanceof Je)return e===r?void 0:(a.push(e),n(),a.pop(),!0);if(e instanceof Ie){if(r.inlined||e.redef)return!(o=!1);if(r.variables.has(e.name))return!0;n=e.definition();if(Be(n.scope,a))return!0;if(i&&!n.redefined()){var t=i.find_variable(e.name);if(t?t===n:n.undeclared)return o="f",!0}return!(o=!1)}return e instanceof At?(cn(r)&&ge(a,function(e){return!(e instanceof ke)||cn(e)})&&(o=!1),!0):void 0})),o}),t(st,function(e){return ko(this.properties,e)}),t(ft,function(e){return"string"==typeof this.key&&this.value.is_constant_expression(e)}),t(et,function(e){return this.expression.is_constant_expression(e)}),(t=function(e,n){e.DEFMETHOD("aborts",n)})(V,p),t(O,l),t(xe,So),t(k,So),t(Se,function(){return this.alternative&&Eo(this.body)&&Eo(this.alternative)&&this}),Mi=L(["use asm","use strict"]),n(pe,function(e,n){return!n.option("directives")||Mi[e.value]&&n.has_directive(e.value)===e?e:Re(We,e)}),n(Ve,function(e,n){return n.option("drop_debugger")?Re(We,e):e}),n(de,function(e,n){return n.option("dead_code")&&e.body instanceof Cn&&n.loopcontrol_target(e.body)===e.body?Re(We,e):n.option("unused")&&0==e.label.references.length?e.body:e}),n(zn,function(e,n){if(!n.option("dead_code"))return e;var t,i=e.label;return i&&(t=n.loopcontrol_target(e),e.label=null,n.loopcontrol_target(e)===t?T(i.thedef.references,e):e.label=i),e}),n(Xe,function(e,n){return e.body=Zr(e.body,n),e}),n(xe,function(e,n){return e.body=Zr(e.body,n),To(e,n.parent())}),n(Ee,function(e,n){return Ao(e,n),e.body=Zr(e.body,n),e}),n(me,Do),n(pn,Do),n(vn,function(n,e){Ao(n,e),n.body=Zr(n.body,e);var t=e.parent();if(e.option("inline"))for(var i=0;i<n.body.length;i++){var r=n.body[i];if(!(r instanceof pe)){if(r instanceof $n){if(i!=n.body.length-1)break;var o=r.value;if(!o||"Call"!=o.TYPE)break;if(o.is_expr_pure(e))break;var a=o.expression;if(a instanceof Ie){if(n.name&&n.name.definition()===a.definition())break;a=a.fixed_value()}if(!(a instanceof bn||a instanceof vn))break;if(a.rest)break;if(a.uses_arguments)break;if(a===o.expression){if(a.parent_scope!==n)break;if(!ge(a.enclosed,function(e){return e.scope!==n}))break}if(a.name&&(t instanceof Dn||t instanceof ut)&&t.value===e.self())break;if(a.contains_this())break;var s=a.argnames.length;if(0<s&&e.option("inline")<2)break;if(s>n.argnames.length)break;if(!ge(n.argnames,function(e){return e instanceof Ne}))break;if(!ge(o.args,function(e){return!(e instanceof qe)}))break;for(var f=0;f<s;f++){var c=o.args[f];if(!(c instanceof Ie))break;if(c.definition()!==n.argnames[f].definition())break}if(f<s)break;for(;f<o.args.length&&!o.args[f].has_side_effects(e);f++);if(f<o.args.length)break;if(s<n.argnames.length&&!e.drop_fargs(n,t)){if(!e.drop_fargs(a,o))break;for(;a.argnames.push(a.make_var(Ne,a,"argument_"+s)),++s<n.argnames.length;);}return o.expression}break}}return n}),Fi=L("arguments await yield"),ke.DEFMETHOD("merge_variables",function(l){if(l.option("merge_vars")){for(var p,d,h={},v=this,a=[],s=[],f=0,m=new be,_=Object.create(null),c=Object.create(null),g=new Ye(function(i,e){var n,t,r,o,a,s;if(i instanceof Fe)return o=i.left,f=i.right,o instanceof je?(f.walk(g),n=new Ye(function(e){if(!(e instanceof je))return e instanceof Ae?(w(),e.value.walk(g),x(),e.name.walk(n)):e instanceof ot?e.key instanceof ye?(w(),(h.block=e).key.walk(g),e.value.walk(n),x()):e.value.walk(n):e instanceof Ie?k(e):e.walk(g),!0}),o.walk(n),!0):xi[i.operator.slice(0,-1)]?(o.walk(g),w(),f.walk(g),o instanceof Ie&&k(o),x(),!0):o instanceof Ie?("="!=i.operator&&k(o,!0),f.walk(g),k(o),!0):void 0;if(i instanceof Ce)return xi[i.operator]?(u(i),!0):void 0;if(i instanceof Cn)return(s=g.loopcontrol_target(i))instanceof Ke||E(s),!0;if(i instanceof De)return(f=(r=i.expression).tail_node())instanceof fn?(r!==f&&r.expressions.slice(0,-1).forEach(function(e){e.walk(g)}),i.args.forEach(function(e){e.walk(g)}),f.walk(g),!0):(e(),c(r));if(i instanceof wn)return i.name&&i.name.walk(g),i.extends&&i.extends.walk(g),i.properties.filter(function(e){return e.key instanceof ye&&e.key.walk(g),e.value}).forEach(function(e){e.static?e.value.walk(g):(w(),e.value.walk(g),x())}),!0;if(i instanceof Me)return u(i.condition,i.consequent,i.alternative),!0;if(i instanceof Mn)return(s=g.loopcontrol_target(i))instanceof Ze&&E(s),!0;if(i instanceof Ze)return w(),h.block=i,h.loop=!0,a=h,i.body.walk(g),h.inserted===i&&(h=a),i.condition.walk(g),x(),!0;if(i instanceof nn)return i.init&&i.init.walk(g),w(),h.block=i,h.loop=!0,i.condition&&i.condition.walk(g),i.body.walk(g),i.step&&i.step.walk(g),x(),!0;if(i instanceof tn)return i.object.walk(g),w(),h.block=i,h.loop=!0,i.init.walk(g),i.body.walk(g),x(),!0;if(i instanceof Se)return u(i.condition,i.body,i.alternative),!0;if(i instanceof de)return w(),h.block=i,a=h,i.body.walk(g),h.inserted===i&&(h=a),x(),!0;if(i instanceof ke)return w(),(h.block=i)===v&&(d=h),i instanceof Ee&&(i.name&&(_[i.name.definition().id]=!1),n=i.uses_arguments&&!g.has_directive("use strict")?function(e){e instanceof Ne&&(_[e.definition().id]=!1)}:function(e){e instanceof Ne&&k(e)},t=new Ye(function(e){var n,t;if(e instanceof ht&&(_[e.definition().id]=!1),e instanceof Ie)return t=e.definition(),n=i.variables.get(e.name),n&&(n===t||t.undeclared||i.parent_scope.find_variable(e.name)===t)?(_[t.id]=!1,_[n.id]=!1):(t=h,x(),k(e,!0),h=t),!0}),i.argnames.forEach(function(e){e.mark_symbol(n,t)}),i.rest&&i.rest.mark_symbol(n,t)),D(i,g),x(),!0;if(i instanceof Zn)return r=i.expression,i.optional?(r.walk(g),w(),i.property.walk(g),x()):e(),c(r);if(i instanceof Fn)return i.expression.walk(g),a=h,i.body.forEach(function(e){e instanceof Pn||(e.expression.walk(g),a===h&&w())}),h=a,i.body.forEach(function(e){w(),h.block=i;var n=h;A(e,g),h.inserted===i&&(h=n),x()}),!0;if(i instanceof vt||i instanceof _t)return!(_[i.definition().id]=!1);if(i instanceof Ie)return k(i,!0),!0;if(i instanceof Nn)return o=p,a=h,A(p=i,g),h=a,i.bcatch&&(i.bcatch.argname&&i.bcatch.argname.mark_symbol(function(e){e instanceof kt&&(e=e.definition(),_[e.id]=!1,(e=e.redefined())&&(_[e.id]=!1))},g),i.bfinally||(p=o)?A(i.bcatch,g):(w(),A(i.bcatch,g),x())),p=o,h=a,i.bfinally&&i.bfinally.walk(g),!0;if(i instanceof et){if(!Gt[i.operator])return;var f=i.expression;return f instanceof Ie?(k(f,!0),!0):void 0}return i instanceof Te?((s=i.value)?s.walk(g):s=h.block instanceof tn&&h.block.init===g.parent(),i.name.mark_symbol(s?function(e){if(e instanceof ht)return e instanceof gt?k(e):_[e.definition().id]=!1,!0}:function(e){var n;if(e instanceof ht)return n=e.definition().id,e instanceof gt?n in _?_[n]&&_[n].push(e):m.add(n,e):_[n]=!1,!0},g),!0):i instanceof en?(w(),h.block=i,h.loop=!0,e(),x(),!0):void 0;function c(e){return l.option("ie")&&(e=Kn(e))instanceof Ie&&e.walk(g),!0}function u(e,n,t){var i=h,r=[i,i];if(e instanceof Ce)switch(e.operator){case"&&":r[0]=u(e.left,e.right)[0];break;case"||":case"??":r[1]=u(e.left,null,e.right)[1];break;default:e.walk(g)}else e instanceof Me?u(e.condition,e.consequent,e.alternative):e.walk(g);return h=r[0],n&&(w(),n.walk(g)),r[0]=h,h=r[1],t&&(w(),t.walk(g)),r[1]=h,h=i,r}}),e=(g.directives=Object.create(l.directives),v.walk(g),!1),n=Object.create(null);a.length&&s.length;){var t=s.shift();if(t){var i=t.definition,r=_[i.id];if(r){for(r={end:r.end};i.id in n;)i=n[i.id];r.start=_[i.id].start;var o=[];do{var u=a.shift();if(!(t.index>u.index)){var b=u.definition.id;if(b in c){var y=_[b];if(y){if(y.start.block===r.start.block&&T(y,r)&&(!y.start.loop&&fa(i)||T(r,y))&&(!l.option("webkit")||ei(i)===ei(u.definition))&&!u.definition.const_redefs&&ge(y,function(e){return e.scope.find_variable(i.name)===i})){y.forEach(function(e){e.thedef=i,e.name=i.name,(e instanceof Ie?i.references:i.orig).push(e)}),u.definition.fixed||(i.fixed=!1),n[b]=i,e=!0;break}o.push(u)}}}}while(a.length);o.length&&(a=o.concat(a))}}}return e}function w(){h=Object.create(h)}function x(){h=Object.getPrototypeOf(h)}function k(e,n){var t,i,r=e.definition(),o=h;if(p&&(w(),o=h,x()),r.id in _){if(!(i=_[r.id]))return;if(i.start.block!==o.block)return _[r.id]=!1;if(i.push(e),i.end=o,r.id in c)s[c[r.id]]=null;else if(!n)return}else{if((t=v.variables.get(r.name))!==r)return t&&d===o&&(_[t.id]=!1),_[r.id]=!1;if(l.exposed(r)||Fi[e.name])return _[r.id]=!1;if((i=m.get(r.id)||[]).push(e),_[r.id]=i,!n)return i.start=o,a.push({index:f++,definition:r});if(o.block!==v)return _[r.id]=!1;i.start=d}c[r.id]=s.length,s.push({index:f++,definition:r})}function E(e){for(var n=[];;){if(le(h,"block")){var t=h.block;if((t=t instanceof de?t.body:t)===e)break}n.push(h),x()}for(h.inserted=h.block,w();n.length;){var i=n.pop();w(),le(i,"block")&&(h.block=i.block),le(i,"loop")&&(h.loop=i.loop)}}function S(e,n){return e===n||e.isPrototypeOf(n)}function T(e,n){return S(e.start,e.end)||S(e.start,n.start)}}),ke.DEFMETHOD("drop_unused",function(A){if(A.option("unused")){var D=this,O=!(D instanceof an)||A.toplevel.funcs,$=!(D instanceof an)||A.toplevel.vars,q=/keep_assign/.test(A.option("unused"))?_e:function(e,n){var t,i=!1;if(e instanceof Fe?!e.write_only&&"="!=e.operator||(t=r(e.left,n)):e instanceof et&&e.write_only&&(t=r(e.expression,n)),t instanceof Ie){e=t.definition();if(!a[e.id]&&!A.exposed(e)&&tr(t,A,i))return t}function r(e,n){if(e instanceof $e){var t=e.expression;if(!t.may_throw_on_access(A,!0))return i=!0,n&&e instanceof Zn&&n.unshift(e.property),r(t,n)}else if(e instanceof Fe&&"="==e.operator)return e.write_only="p",t=r(e.right),n?(n.assign=e,t instanceof Ie?t:e.left):t;return e}},z=Object.create(null),a=Object.create(null),f=function(e){return(f=function e(n,t,i){var r=A.parent(t);if(!r)return i;n=r instanceof Ee&&Be(n,r.argnames);return e(r,t+1,n?function(e){var n=i(e);if(n)return n;if(n=r.variables.get(e)){e=n.orig[0];if(e instanceof Ne||e instanceof yt)return n}}:r.variables?function(e){return i(e)||r.variables.get(e)}:i)}(D,0,X))(e)},C=Object.create(null),c=[],M=Object.create(null),u=Object.create(null),l=Object.create(null),F=Object.create(null),p=(D instanceof an&&A.top_retain&&D.variables.each(function(e){!A.top_retain(e)||e.id in M||(M[e.id]=!0,c.push(e))}),new be),d=new be,P=this,j=((h=new Ye(function(s,e){if(s instanceof Ee&&s.uses_arguments&&!h.has_directive("use strict")&&s.each_argname(function(e){e=e.definition();e.id in M||(M[e.id]=!0,c.push(e))}),s!==D){if(P===D){var n,t,i;if(s instanceof xn)return r=s.name.definition(),(n=O&&!r.exported)||r.id in M||(M[r.id]=!0,c.push(r)),s.extends&&s.extends.walk(h),(t=h.parent()instanceof Vn)&&(a[r.id]=!0),i=[],s.properties.forEach(function(e){e.key instanceof ye&&e.key.walk(h);var n=e.value;n&&(e instanceof Sn&&e.static?(!t&&n.contains_this()&&(t=!0),o(n)):i.push(n))}),i.forEach(n&&t?o:function(e){d.add(r.id,e)}),!0;if(s instanceof Q){var r=s.name.definition();if(O&&!r.exported||r.id in M||(M[r.id]=!0,c.push(r)),d.add(r.id,s),!(h.parent()instanceof Vn))return!0;a[r.id]=!0}if(s instanceof Yn)return s.definitions.forEach(function(i){var r=i.value,o=r&&(i.name instanceof je||r.has_side_effects(A)),a=o&&"="==r.tail_node().operator;i.name.mark_symbol(function(e){var n,t;if(e instanceof ht)return n=e.definition(),F[n.id]=(F[n.id]||0)+1,s instanceof Bn&&n.orig[0]instanceof kt&&((t=n.redefined())&&(F[t.id]=(F[t.id]||0)+1)),n.id in M||$&&!n.exported&&(s instanceof Rn?!n.redefined():!n.const_redefs)&&(s instanceof Bn||Vo(n))||(M[n.id]=!0,c.push(n)),r&&(o?a&&_(n,e,l[n.id]):d.add(n.id,r),p.add(n.id,i)),!0},h),o&&r.walk(h)}),!0;if(s instanceof Ne)return r=s.definition(),F[r.id]=(F[r.id]||0)+1,p.add(r.id,s),!0;if(s instanceof mt)return(r=s.definition()).id in M||$&&Vo(r)||(M[r.id]=!0,c.push(r)),!0}return b(s,e,!0)}function o(e){var n=P;P=s,e.walk(h),P=n}})).directives=Object.create(A.directives),D.walk(h),A.option("keep_fnames")?_e:A.option("ie")?function(e){return!A.exposed(e)&&e.references.length==e.replaced}:function(e){return!(e.id in M)||!(e.orig.length-e.eliminated<2)&&(e.orig[1]instanceof Ne||ge(e.references,function(e){return!e.in_arg}))});A.option("ie")&&d.each(function(e,n){n in M||e.forEach(function(e){e.walk(new Ye(function(e){return e instanceof vn&&e.name&&!j(e.name.definition())?(e.walk(h),!0):e instanceof ke||void 0}))})});for(var h=new Ye(b),e=0;e<c.length;e++){var n=d.get(c[e].id);n&&n.forEach(function(e){e.walk(h)})}Object.keys(z).forEach(function(e){var n,t=z[e];t?(t=t.reduce(function(n,e){return e.forEach(function(e){K(n,e)}),n},[]),n=(p.get(e)||[]).filter(function(n){return ce(n instanceof et?function(e){return e===n}:function(e){return e===n||!(e instanceof et)&&i(e)===i(n)},t)}),t.length==n.length?z[e]=n:delete z[e]):delete z[e]});var N=[],I=[],H=[],Y=new Ht(function(t){if(t instanceof Ae)return x(Y,t);if(t instanceof je&&t.rest&&(t.rest=t.rest.transform(Y)),t instanceof rt){for(var e=!t.rest,n=t.elements.length;0<=--n;){var i=t.elements[n].transform(Y);i?(t.elements[n]=i,e=!1):e?t.elements.pop():t.elements[n]=Re(Pt,t.elements[n])}return t}var r;return t instanceof at?(r=[],t.properties.forEach(function(e){var n=!1;e.key instanceof ye&&(e.key=e.key.transform(R),n=e.key.has_side_effects(A)),(n||t.rest)&&((n=e.value)instanceof Ae?n.name:n)instanceof ht?(e.value=e.value.transform(R),r.push(e)):(n=!(n=e.value.transform(Y))&&t.rest?e.value instanceof rt?Re(rt,e.value,{elements:[]}):Re(at,e.value,{properties:[]}):n)&&(e.value=n,r.push(e))}),t.properties=r,t):t instanceof ht?t.definition().id in M?t:null:void 0}),R=new Ht(function(d,n,e){var t,i,h=R.parent();if($){var r,o,a=[],s=q(d,a);if(s){if(t=d,i=(m=s).definition(),(!(o=M[i.id])||t[t instanceof Fe?"left":"expression"]===m&&(o===m&&i.references.length-i.replaced==1||W(i,t)<0))&&(d instanceof Fe&&(r=J(d),!0===d.write_only&&(r=r.drop_side_effect_free(A))),r=r||Re(He,d,{value:0})),r)switch(!a.assign||(o=a.assign.drop_side_effect_free(A))&&(o.write_only=!0,a.unshift(o)),h instanceof Oe&&h.tail_node()!==d&&!r.has_side_effects(A)||a.push(r),a.length){case 0:return Ue.skip;case 1:return Nr(0,h,d,a[0].transform(R));default:return Le(d,a.map(function(e){return e.transform(R)}))}}else if(d instanceof nt&&d.expression instanceof Ie&&W(d.expression.definition(),d)<0)return Re(ze,d,{operator:"+",expression:d.expression})}if(d instanceof De)return I.push(d),d.args=d.args.map(function(e){return e.transform(R)}),d.expression=d.expression.transform(R),d;if(P===D){if(O&&d!==D&&d instanceof xn)if(!((p=d.name.definition()).id in M))return L(d.name,"Dropping unused class {name}"),p.eliminated++,n(d,R),l=$o(d,!0),h instanceof Vn?l:(l=l.drop_side_effect_free(A,!0))?Re(we,d,{body:l}):e?Ue.skip:Re(We,d);if(d instanceof kn&&d.name&&j(d.name.definition())&&N.push(d),d instanceof Ee){if(O&&d!==D&&d instanceof Q)if(!((p=d.name.definition()).id in M))return L(d.name,"Dropping unused function {name}"),p.eliminated++,h instanceof Vn?(T(),qo(d,!0)):e?Ue.skip:Re(We,d);if(d instanceof fn&&d.name&&j(d.name.definition())&&N.push(d),!(d instanceof sn)){var f,c,u=A.drop_fargs(d,h);if(u&&h instanceof De&&h.expression===d)for(f=h.args,c=0;c<f.length&&!(f[c]instanceof qe);c++);for(var l,p,v=d.argnames,m=d.rest,_=(m&&(!f||c<v.length||m instanceof Ne?m=m.transform(Y):(m=(l=G(m,Re(Pe,h,{elements:f.slice(v.length)}),function(e){return e.definition().id in M?e:null},!d.uses_arguments,m)).name,f.length=v.length,l.value.elements.length&&[].push.apply(f,l.value.elements)),m instanceof je&&!m.rest&&(!d.uses_arguments||R.has_directive("use strict"))&&(m instanceof rt?0==m.elements.length&&(m=null):0==m.properties.length&&(m=null)),(d.rest=m)&&(u=!1)),u?-1:d.length()),g=v.length;0<=--g;)(s=v[g])instanceof Ne?(p=s.definition()).id in M?(u=!1,W(p,s)<0&&(s.unused=null)):u?(L(s,"Dropping unused function argument {name}"),v.pop()):s.unused=!0:(!f||c<g?s.transform(Y):G(s,f[g],function(e){return e.definition().id in M?e:null},!d.uses_arguments,s).name)?u=!1:u?(B(s,"Dropping unused default argument {name}"),v.pop()):_<g?(B(s,"Dropping unused default argument assignment {name}"),s.name instanceof Ne&&(s.name.unused=!0),v[g]=s.name):(B(s,"Dropping unused default argument value {name}"),s.value=Re(He,s,{value:0}));H.push(d)}}if(d instanceof In&&d.argname instanceof je&&d.argname.transform(Y),!(d instanceof Yn)||h instanceof tn&&h.init===d)return d instanceof Fe?(n(d,R),d.left instanceof je?(l=G(d.left,d.right,function(e){return e},!0===d.write_only)).name?Re(Fe,d,{operator:d.operator,left:l.name,right:l.value}):l.value||(h instanceof Oe&&h.tail_node()!==d?Ue.skip:Re(He,d,{value:0})):d):d instanceof de&&d.body instanceof nn?(n(d,R),d.body instanceof xe?(i=d.body,d.body=i.body.pop(),i.body.push(d),e?Ue.splice(i.body):i):d):d instanceof ke?(T(),d):d instanceof mt?!A.option("imports")||d.definition().id in M?d:e?Ue.skip:null:void 0;var b=[],y=[],w=[],x=[],k=0,E=d instanceof Bn;switch(d.definitions.forEach(function(e){e.value&&(e.value=e.value.transform(R));var n=e.value;if(e.name instanceof je)(f=G(e.name,n,function(e){return!$||e.definition().id in M||l(e)||E&&!tr(e)?e:null},!0)).name?(e=Re(Te,e,{name:f.name,value:n=f.value}),p()):f.value&&x.push(f.value);else{var t,i,r,o,a,s=e.name.definition(),f=E?tr(e.name):Vo(s);if(!f||!$||s.id in M)if(n&&((o=W(s,e))<0||(a=n.tail_node())instanceof Ie&&a.definition()===s)&&(e=e.clone(),(n=n.drop_side_effect_free(A))&&ye.warn("Side effects in definition of variable {name} [{file}:{line},{col}]",U(e.name)),d instanceof Rn?e.value=n||Re(He,e,{value:0}):(e.value=null,n&&x.push(n)),n=null,0<=o&&(z[s.id][o]=e)),n||d instanceof Ln)if(A.option("functions")&&!A.option("ie")&&f&&n&&1==F[s.id]&&0==s.assignments&&(a=n.tail_node())instanceof fn&&!er(s)&&!cn(a)&&(r=a,0==(o=s.references).length?r===e.name.fixed_value():ge(o,function(e){return r===e.fixed_value()}))&&(i=a,E&&!A.has_directive("use strict")&&i instanceof vn?h instanceof Xe||h instanceof nn&&h.init===d||h instanceof Se:h instanceof ke)&&!1!==(i=function(t,i){if(!t.name)return null;var r,e=t.name.definition();if(1<e.orig.length)return null;if(0<e.assignments)return!1;if(e.name==i)return e;if(A.option("keep_fnames"))return!1;switch(i){case"await":r=un;break;case"yield":r=ln}return ge(e.references,function(e){var n=e.scope;if(n.find_variable(i)===s){if(r)do{if(n=n.resolve(),r(n))return}while(n!==t&&(n=n.parent_scope));return 1}})&&e}(a,e.name.name))){switch(ye.warn("Declaring {name} as function [{file}:{line},{col}]",U(e.name)),a.CTOR){case dn:t=_n;break;case hn:t=gn;break;case vn:t=bn;break;case mn:t=yn}var c=Re(t,e,a),u=(c.name=Re(bt,e.name,e.name),e.name.scope.resolve().def_function(c.name));i&&i.forEach(function(e){e.name=u.name,e.thedef=u,e.reference()}),b.push(c),n!==a&&[].push.apply(x,n.expressions.slice(0,-1))}else f&&1<F[s.id]&&!(h instanceof Un)&&s.orig.indexOf(e.name)>s.eliminated&&(F[s.id]--,k++),p();else h instanceof Un?p():f&&1<F[s.id]?(ye.info("Dropping declaration of variable {name} [{file}:{line},{col}]",U(e.name)),F[s.id]--,s.eliminated++):y.push(e);else l(e.name)?((n=n&&n.drop_side_effect_free(A))&&x.push(n),1<F[s.id]?(ye.warn("Dropping duplicated declaration of variable {name} [{file}:{line},{col}]",U(e.name)),F[s.id]--,s.eliminated++):(e.value=null,y.push(e))):((n=n&&n.drop_side_effect_free(A))?(ye.warn("Side effects in initialization of unused variable {name} [{file}:{line},{col}]",U(e.name)),x.push(n)):L(e.name,"Dropping unused variable {name}"),s.eliminated++)}function l(e){var n=e.definition();return n.orig[0]instanceof kt&&n.scope.resolve()===e.scope.resolve()}function p(){0<x.length&&(0==w.length?b.push(Re(we,d,{body:Le(d,x)})):n?(x.push(n),e.value=Le(n,x)):e.value=Re(ze,e,{operator:"void",expression:Le(e,x)}),x=[]),w.push(e)}}),y.length){case 0:if(0==w.length)break;if(w.length==k){[].unshift.apply(x,w.map(function(e){ye.info("Dropping duplicated definition of variable {name} [{file}:{line},{col}]",U(e.name));var n=e.name.definition(),t=Re(Ie,e.name,e.name),t=(n.references.push(t),Re(Fe,e,{operator:"=",left:t,right:e.value})),e=W(n,e);return 0<=e&&(z[n.id][e]=t),n.eliminated++,t}));break}case 1:if(0==w.length){var S=y[0].name.definition().id;if(S in C){d.definitions=y,C[S].init=d;break}}default:0<w.length&&(S=w[0].value)instanceof Oe&&(w[0].value=S.tail_node(),b.push(Re(we,d,{body:Le(S,S.expressions.slice(0,-1))}))),d.definitions=y.concat(w),b.push(d)}return 0<x.length&&b.push(Re(we,d,{body:Le(d,x)})),V(b,d,e)}function T(){var e=P;n(P=d,R),P=e}},function(e,n){if(e instanceof xe)return To(e,R.parent(),n);if(e instanceof nn)return Qr(e,n);if(e instanceof rn){if(!$||!A.option("loops"))return;if(!Lr(e.body))return;var t=g(e);if(!t)return;var i=t.definition();if(i.id in M)return;L(t,"Dropping unused loop variable {name}"),C[i.id]===e&&delete C[i.id];var t=[],r=e.object.drop_side_effect_free(A);return r&&(ye.warn("Side effects in object of for-in loop [{file}:{line},{col}]",r.start),t.push(Re(we,e,{body:r}))),e.init instanceof Yn&&i.orig[0]instanceof kt&&t.push(e.init),V(t,e,n)}return e instanceof Jn?(e.properties&&0==e.properties.length&&(e.properties=null),e):e instanceof Oe&&!(1<e.expressions.length)?Nr(0,R.parent(),e,e.expressions[0]):void 0});R.push(A.parent()),D.transform(R),D instanceof Ee&&1==D.body.length&&D.body[0]instanceof pe&&"use strict"==D.body[0].value&&(D.body.length=0),N.forEach(function(e){e.name=null}),I.forEach(function(e){Zo(e,A,H)})}function L(e,n){ye[0<e.definition().references.length?"info":"warn"](n+" [{file}:{line},{col}]",U(e))}function B(e,n){e.name instanceof Ne?L(e.name,n):ye.info(n+" [{file}:{line},{col}]",{name:e,file:e.start.file,line:e.start.line,col:e.start.col})}function U(e){return{name:e.name,file:e.start.file,line:e.start.line,col:e.start.col}}function i(e){return e[e instanceof Fe?"right":"value"]}function V(e,n,t){switch(e.length){case 0:return t?Ue.skip:Re(We,n);case 1:return e[0];default:return t?Ue.splice(e):Re(xe,n,{body:e})}}function v(e,n){return e.scope.resolve()===D&&(e.fixed&&n.fixed||(z[e.id]=!1),!1!==z[e.id])}function m(e,n){z[e.id]||(z[e.id]=[]),n.fixed.assigns&&K(z[e.id],n.fixed.assigns)}function W(e,n){e=z[e.id];return e&&e.indexOf(n)}function _(e,n,t){e.id in M||(n&&t?(M[e.id]=n,c.push(e)):(u[e.id]=n,l[e.id]=t))}function J(e){var n=e.right;if(!e.write_only)return n;if(!(n instanceof Ce&&xi[n.operator]))return n;if(!(n.left instanceof Ie))return n;if(!(e.left instanceof Ie))return n;e=e.left.definition();return n.left.definition()!==e||n.right.has_side_effects(A)?n:(v(e,n.left)&&m(e,n.left),n.right)}function g(e){var n=e.init;if(n instanceof Yn)return(n=n.definitions[0].name)instanceof ht&&n;for(;n instanceof $e;)n=n.expression.tail_node();return n instanceof Ie?n:void 0}function b(e,n,t){e instanceof Fe&&e.left instanceof Ie&&(i=e.left.definition()).scope.resolve()===D&&p.add(i.id,e),e instanceof et&&e.expression instanceof Ie&&(i=e.expression.definition()).scope.resolve()===D&&p.add(i.id,e);var i,r,o=[],a=q(e,o);if(a&&((r=a.definition()).scope.resolve()===D||D.variables.get(a.name)===r)&&(!er(r)||ge(D.argnames,function(e){return!e.match_symbol(function(e){if(e instanceof Ne)return(e=e.definition()).references.length>e.replaced},!0)}))){if("p"===e.write_only&&e.right.may_throw_on_access(A,!0))return;var s=o.assign;return s&&(s.write_only=!0,s.walk(h)),o.forEach(function(e){e.walk(h)}),e instanceof Fe&&(s=J(e),o=!1,t&&!0===e.write_only&&!s.has_side_effects(A)?d.add(r.id,s):(s.walk(h),o="="==s.tail_node().operator),e.left===a?e.write_only&&!o||_(r,a,l[r.id]):(t=a.fixed_value())&&t.is_constant()||_(r,u[r.id],!0)),v(r,a)&&ti(a,e)!==a&&m(r,a),!0}if(e instanceof rn){if(e.init instanceof Ie&&P===D&&((s=e.init.definition().id)in C||(C[s]=e)),!$||!A.option("loops"))return;if(!Lr(e.body))return;if(e.init.has_side_effects(A))return;if(!(a=g(e)))return;if((i=a.definition()).scope.resolve()!==D){o=f(a.name);if(o===i||o&&o.redefined()===i)return}return e.object.walk(h),!0}return e instanceof Ie?((r=e.definition()).id in M||(M[r.id]=!0,c.push(r)),!nr(r.scope,e.scope)||!(t=r.redefined())||t.id in M||(M[t.id]=!0,c.push(t)),v(r,e)&&m(r,e),!0):e instanceof ke?(s=P,P=e,n(),P=s,!0):void 0}function x(e,n){if(n.value=n.value.transform(R),!n.name.transform(e)){if(n.name instanceof je)return null;e=n.value.drop_side_effect_free(A);if(!e)return null;L(n.name,"Side effects in default value of unused variable {name}"),n.name.unused=null,n.value=e}return n}function G(e,v,m,_,g){var b=new Ht(function(r){if(r instanceof Ae){if(!(A.option("default_values")&&v&&v.is_defined(A)))return n=_,_=!1,e=x(b,r),_=n,!e&&_&&v&&(v=v.drop_side_effect_free(A)),e;r===g?g=r=r.name:r=r.name}if(r instanceof rt){var e,n=_,t=v,i=(v instanceof Ie&&(_=!1,v=v.fixed_value()),v instanceof Pe&&v.elements),o=[],a=_&&[],s=0;if(r.elements.forEach(function(e,n){(v=i&&i[n])instanceof Pt?v=null:v instanceof qe&&(_&&(a.length=s,Oo(t,a),[].push.apply(a,i.slice(n)),t.elements=a),v=i=!1),(e=e.transform(b))&&(o[s]=e),_&&v&&(a[s]=v),!e&&!v&&_&&i||s++}),v=i&&Re(Pe,t,{elements:i.slice(r.elements.length)}),r.rest&&(e=_,_=!1,r.rest=r.rest.transform(A.option("rests")?b:R),_=e,r.rest&&(o.length=s)),_&&(v=(v=v&&!r.rest?v.drop_side_effect_free(A):v)instanceof Pe?v.elements:v instanceof Oe?v.expressions:v&&[v])&&v.length&&(a.length=s,[].push.apply(a,v)),v=t,_=n,i&&a&&(Oo(v,a),v.elements=a),!r.rest&&(v instanceof Pe||v&&v.is_string(A)))switch(o.length){case 0:if(r===g)break;return _&&(v=v.drop_side_effect_free(A)),null;case 1:if(!_)break;if(r===g)break;var f=o[0];if(f.has_side_effects(A))break;if(v.has_side_effects(A)&&f.match_symbol(function(e){return e instanceof $e}))break;return v=Re(Zn,r,{expression:v,property:Re(He,r,{value:0})}),f}return Oo(r,o),r.elements=o,r}if(r instanceof at){var c,u,n=_,t=v,l=(v instanceof Ie&&(_=!1,v=v.fixed_value()),v instanceof st&&(c=[],u=new be,v.properties.forEach(function(e,n){if(e instanceof qe)return u=!1;var t=e.key;(t=t instanceof ye?t.evaluate(A,!0):t)instanceof ye?u=!1:!u||e instanceof lt||u.set(t,e),c[n]=t})),r.rest&&(v=!1,r.rest=r.rest.transform(A.option("rests")?b:R)),new be),p=_&&new be,d=[];if(r.properties.map(function(e){var n=e.key;return n instanceof ye&&(e.key=n=n.transform(R),n=n.evaluate(A,!0)),n instanceof ye?p=!1:l.set(n,!l.has(n)),n}).forEach(function(e,n){var t,i,n=r.properties[n];e instanceof ye?(v=_=!1,t=n.value.transform(b)||w(n.value)):(_=p&&l.get(e),(!(i=u&&u.get(e))||(v=i.value)instanceof sn)&&(v=!1),(t=n.value.transform(b))?p&&p.set(e,!1):((r.rest||y(n))&&(t=w(n.value)),p&&!p.has(e)&&(i?(p.set(e,i),null===v&&u.set(e,y(i)&&Re(ct,i,{key:i.key,value:Re(He,i,{value:0})}))):p.set(e,!0))),v&&(i.value=v)),t&&(n.value=t,d.push(n))}),v=t,_=n,p&&c&&(v.properties=Ue(v.properties,function(e,n){if(e instanceof qe)return e;n=c[n];if(n instanceof ye)return e;if(p.has(n)){var t=p.get(n);if(!t)return e;if(t===e)return u.get(n)||Ue.skip}else if(r.rest)return e;t=e.value.drop_side_effect_free(A);return t?(e.value=t,e):y(e)?Re(ct,e,{key:e.key,value:Re(He,e,{value:0})}):Ue.skip})),v&&!r.rest)switch(d.length){case 0:if(r===g)break;if(v.may_throw_on_access(A,!0))break;return _&&(v=v.drop_side_effect_free(A)),null;case 1:if(!_)break;if(r===g)break;var h=d[0];if(h.key instanceof ye)break;if(h.value.has_side_effects(A))break;if(v.has_side_effects(A)&&h.value.match_symbol(function(e){return e instanceof $e}))break;return v=Re(Zn,r,{expression:v,property:Pr(h.key,h)}),h.value}return r.properties=d,r}return!(r=r instanceof Pt?null:m(r))&&_&&v&&(v=v.drop_side_effect_free(A)),r});return{name:e.transform(b),value:v};function y(e){return e.key instanceof ye&&e.key.has_side_effects(A)}function w(e){return e instanceof Ae?w(e.name):e instanceof je?(null===v?v=Re(He,e,{value:0}):v&&(v.may_throw_on_access(A,!0)?v=Re(Pe,e,{elements:v instanceof Oe?v.expressions:[v]}):function e(n){n instanceof Fe?(n.write_only=!1,e(n.right)):n instanceof Ce?xi[n.operator]&&(e(n.left),e(n.right)):n instanceof Me?(e(n.consequent),e(n.alternative)):n instanceof Oe?e(n.tail_node()):n instanceof et&&(n.write_only=!1)}(v)),Re(at,e,{properties:[]})):(e.unused=null,e)}}}),ke.DEFMETHOD("hoist_declarations",function(a){var s,f,c,n,u,l,p,d,h,v;a.has_directive("use asm")||(s=a.option("hoist_funs"),f=a.option("hoist_vars"),c=this,f&&(n=0,c.walk(new Ye(function(e){return 1<n||(e instanceof Un||(e instanceof ke&&e!==c||(e instanceof Bn?(n++,!0):void 0)))})),n<=1&&(f=!1)),(s||f)&&(u=new be,l=[],p=[],d=new be,h=new Ht(function(e,n,t){if(e!==c){if(e instanceof pe)return l.push(e),t?Ue.skip:Re(We,e);var i;if(e instanceof Q)return s?(i=h.parent())instanceof Un||i instanceof Vn||i!==c&&a.has_directive("use strict")?e:(p.push(e),t?Ue.skip:Re(We,e)):e;if(e instanceof Bn){if(!f)return e;if((i=h.parent())instanceof Un)return e;if(!ge(e.definitions,function(e){e=e.name;return e instanceof gt&&!u.has(e.name)&&c.find_variable(e.name)===e.definition()}))return e;e.definitions.forEach(function(e){d.set(e.name.name,e)});var r=e.to_assignments();if(i instanceof tn&&i.init===e){if(r)return r;var o=e.definitions[0].name;return Re(Ie,o,o)}return i instanceof nn&&i.init===e?r:r?Re(we,e,{body:r}):t?Ue.skip:Re(We,e)}return e instanceof ke?e:e instanceof vt?(u.set(e.name,!0),e):void 0}}),c.transform(h),0<d.size()&&(v=[],c instanceof Ee&&c.each_argname(function(e){d.del(e.name)}),d.each(function(e,n){(e=e.clone()).name=e.name.clone(),e.value=null,v.push(e),d.set(n,e),e.name.definition().orig.unshift(e.name)}),0<v.length&&(function e(n){for(;n.length;){var t=n[0];if(t instanceof we){var i,r,o=t.body;if(o instanceof Fe&&"="==o.operator&&(i=o.left)instanceof dt&&d.has(i.name)){if((r=d.get(i.name)).value)break;var a=o.right;a instanceof Oe&&(a=a.clone()),r.value=a,T(v,r),v.push(r),n.shift();continue}if(o instanceof Oe&&(a=o.expressions[0])instanceof Fe&&"="==a.operator&&(i=a.left)instanceof dt&&d.has(i.name)){if((r=d.get(i.name)).value)break;r.value=a.right,T(v,r),v.push(r),t.body=Le(o,o.expressions.slice(1));continue}}if(t instanceof We)n.shift();else{if(!(t instanceof xe)||e(t.body))break;n.shift()}}return n.length}(c.body),p.push(Re(Bn,c,{definitions:v})))),c.body=l.concat(p,c.body)))}),ke.DEFMETHOD("process_returns",X),bn.DEFMETHOD("process_returns",function(e){if(e.option("booleans")&&!(e.parent()instanceof Vn))switch(Mo(this.name.definition(),Co(this),e)){case"d":jo(e,this,!0);break;case!0:Fo(this,e)}}),vn.DEFMETHOD("process_returns",function(n){if(n.option("booleans")){var t=!0,i=Co(this);if(!this.name||c(this.name.definition())){var e=n.parent();if(e instanceof Fe){if("="!=e.operator)return;if(!((o=e.left)instanceof Ie))return;if(!c(o.definition()))return}else if(e instanceof De&&e.expression!==this){var r=e.expression;if(!((r=r instanceof Ie?r.fixed_value():r)instanceof Ee))return;if(r.uses_arguments||r.pinned())return;for(var o,a=e.args,s=0;s<a.length;s++){var f=a[s];if(f===this){if(!(o=r.argnames[s])&&r.rest)return;break}if(f instanceof qe)return}if((o=o instanceof Ae?o.name:o)instanceof Ne&&!c(o.definition()))return}else{if("Call"!=e.TYPE)return;n.pop();e=n.in_boolean_context();switch(n.push(this),e){case!0:t=!1;case"d":break;default:return}}t?jo(n,this,!0):Fo(this,n)}}function c(e){switch(Mo(e,i,n)){case!0:t=!1;case"d":return 1}}}),Je.DEFMETHOD("var_names",function(){var t=this._var_names;return t||(this._var_names=t=new be,this.enclosed.forEach(function(e){t.set(e.name,!0)}),this.variables.each(function(e,n){t.set(n,!0)})),t}),ke.DEFMETHOD("make_var",function(e,n,t){for(var i=[this],r=(n instanceof ht&&n.definition().references.forEach(function(e){var n=e.scope;if(!Be(n,i))for(;K(i,n),(n=n.parent_scope)&&n!==this;);}),t=t.replace(/^[^a-z_$]|[^a-z0-9_$]/gi,"_")),o=0;!ge(i,function(e){return!e.var_names().has(r)});o++)r=t+"$"+o;var e=Re(e,n,{name:r,scope:this}),a=this.def_variable(e);return i.forEach(function(e){e.enclosed.push(a),e.var_names().set(r,!0)}),e}),ke.DEFMETHOD("hoist_properties",function(r){var s,o,f;function c(e,n,t){if(e instanceof dt){var i=e.definition();if(i.assignments==t)if(i.references.length-i.replaced!=t)if(!i.single_use)if(!o(i))if(e.fixed_value()===n)return(t=e.fixed||i.fixed).direct_access?void 0:(!t.escaped||1!=t.escaped.depth)&&(n instanceof st&&0<n.properties.length&&ge(n.properties,ha)&&tr(e,r))}}r.option("hoist_props")&&!r.has_directive("use asm")&&(o=(s=this)instanceof an&&r.top_retain||_e,f=Object.create(null),s.transform(new Ht(function(t,e){if(t instanceof Fe){if("="!=t.operator)return;if(!t.write_only)return;if(!c(t.left,t.right,1))return;e(t,this);var i=new be,r=[],o=[];return t.right.properties.forEach(function(e){var n=a(gt,t.left,e.key),n=(o.push(Re(Te,t,{name:n,value:null})),Re(Ie,t,{name:n.name,scope:s,thedef:n.definition()}));n.reference(),r.push(Re(Fe,t,{operator:"=",left:n,right:e.value}))}),i.value=t.right,f[t.left.definition().id]=i,s.body.splice(s.body.indexOf(this.stack[1])+1,0,Re(Bn,t,{definitions:o})),Le(t,r)}if(t instanceof ke)return t===s?void 0:t;var n;if(t instanceof Te&&c(t.name,t.value,0))return e(t,this),i=new be,n=[],e=t.clone(),e.value=t.name instanceof vt?Re(He,t,{value:0}):null,n.push(e),t.value.properties.forEach(function(e){n.push(Re(Te,t,{name:a(t.name.CTOR,t.name,e.key),value:e.value}))}),i.value=t.value,f[t.name.definition().id]=i,Ue.splice(n);function a(e,n,t){e=s.make_var(e,n,n.name+"_"+t);return i.set(t,e.definition()),e}})),s.transform(new Ht(function(e,n){if(e instanceof $e){if(!(e.expression instanceof Ie))return;if(!(i=f[e.expression.definition().id]))return;if(e.expression.fixed_value()!==i.value)return;var t=i.get(e.get_property()),t=Re(Ie,e,{name:t.name,scope:e.expression.scope,thedef:t});return t.reference(),t}if(e instanceof Ie){var i=f[e.definition().id];if(i&&e.fixed_value()===i.value)return Re(st,e,{properties:[]})}})))}),(t=function(e,n){e.DEFMETHOD("drop_side_effect_free",n)})(ye,l),t(sn,p),t(Pe,function(e,n){e=No(this.elements,e,n,Io);return e?e===this.elements&&ge(e,function(e){return e instanceof qe})?this:Le(this,e.map(Ho)):null}),t(Fe,function(e){var n=this.left;if(n instanceof $e){var t=n.expression;if(t.may_throw_on_access(e,!0))return this;if(e.has_directive("use strict")&&t.is_constant())return this}return n.has_side_effects(e)||xi[this.operator.slice(0,-1)]?this:(this.write_only=!0,Kn(n).is_constant_expression(e.find_parent(ke))?this.right.drop_side_effect_free(e):this)}),t(tt,function(e){if(!e.option("awaits"))return this;var n=this.expression;if(!ra(e,n))return this;var t=(n=n instanceof ze&&"!"==n.operator?n.expression:n).drop_side_effect_free(e);if(t===n)return this;t?ra(e,t)||(t=t.negate(e)):t=Re(He,n,{value:0});e=this.clone();return e.expression=t,e}),t(Ce,function(e,n){var t=this.left,i=this.right,r=this.operator;if("in"==r&&!ia(i))return(o=t.drop_side_effect_free(e,n))===t?this:((s=this.clone()).left=o||Re(He,t,{value:0}),s);var o,a=i.drop_side_effect_free(e,n);if(!a)return t.drop_side_effect_free(e,n);if(xi[r]&&a.has_side_effects(e)){var s=this;if(a!==i&&((s=s.clone()).right=a.drop_side_effect_free(e)),"??"==r)return s;var i=s.clone(),f=(i.operator="&&"==r?"||":"&&",i.left=t.negate(e,n),i.operator==i.right.operator&&aa(i),n?so:ao);return"&&"==r?f(s,i):f(i,s)}return(o=t.drop_side_effect_free(e,n))?(a=a.drop_side_effect_free(e))?Le(this,[o,a]):o:a}),t(De,function(e,n){var t=this;if(t.is_expr_pure(e))return t.pure&&ye.warn("Dropping __PURE__ call [{file}:{line},{col}]",t.start),(i=No(t.args,e,n,Io))&&Le(t,i.map(Ho));var i=t.expression;if(t.is_call_pure(e))return(f=t.args.slice()).unshift(i.expression),(f=No(f,e,n,Io))&&Le(t,f.map(Ho));if(e.option("yields")&&ln(i)){var r=t.clone(),o=(r.expression=Re(vn,i,i),r.expression.body=[],r.transform(e));if(o!==r)return o.drop_side_effect_free(e,n)}var a,s,r=jo(e,i);if(r&&((t=t.clone()).expression=r,i._squeezed&&(t.expression._squeezed=!0)),t instanceof Xn){var f,o=i;if((o=o instanceof Ie?o.fixed_value():o)instanceof Ee){if(a=e,(r=o).new=!0,s=ge(r.body,function(e){return!e.has_side_effects(a)})&&ge(r.argnames,function(e){return!e.match_symbol(_e)})&&!(r.rest&&r.rest.match_symbol(_e)),r.new=!1,s)return(f=t.args.slice()).unshift(i),(f=No(f,e,n,Io))&&Le(t,f.map(Ho));o.contains_this()||((t=Re(De,t,t)).expression=t.expression.clone(),t.args=t.args.slice())}}return t.call_only=!0,t}),t(kn,function(e,n){for(var t=this,i=[],r=[],o=t.properties,a=0;a<o.length;a++){var s=o[a];if(s.key instanceof ye&&i.push(s.key),s.static&&s.value&&s instanceof Sn&&s.value.has_side_effects(e)){if(s.value.contains_this())return t;r.push(s.value)}}var f=t.extends;if(!f||(f=!Zi(f=f instanceof Ie?f.fixed_value():f))||i.unshift(t.extends),i=No(i,e,n),r=No(r,e,n=i?!1:n),!i){if(!f&&!r&&!t.name)return null;i=[]}return f||t.name||!e.has_directive("use strict")?(n=$o(t),f||(n.extends=null),n.properties=[],r?n.properties.push(Re(Sn,t,{static:!0,key:i.length?Le(t,i):"c",value:Le(t,r)})):i.length&&n.properties.push(Re(Dn,t,{key:Le(t,i),value:Re(vn,t,{argnames:[],body:[]}).init_vars(n)})),n):(r&&i.push(Re(De,t,{expression:Re(me,t,{argnames:[],body:[],value:Le(t,r)}).init_vars(t.parent_scope),args:[]})),Le(t,i))}),t(Me,function(e){var n,t,i=this.consequent.drop_side_effect_free(e),r=this.alternative.drop_side_effect_free(e);return i===this.consequent&&r===this.alternative?this:(e.option("ie")&&(n=[],i instanceof vn&&(n.push(i),i=null),r instanceof vn&&(n.push(r),r=null)),i?r?((t=this.clone()).consequent=i,t.alternative=r):t=Re(Ce,this,{operator:"&&",left:this.condition,right:i}):t=r?Re(Ce,this,{operator:"||",left:this.condition,right:r}):this.condition.drop_side_effect_free(e),n?(t&&n.push(t),0==n.length?null:Le(this,n)):t)}),t($,p),t(Qn,function(e,n){var t=this.expression;return t.may_throw_on_access(e)?this:t.drop_side_effect_free(e,n)}),t(vn,function(e){return Po(this,e)?null:this}),t(fn,p),t(st,function(e,n){var t=[],e=(this.properties.forEach(function(e){e instanceof qe?t.push(e):(e.key instanceof ye&&t.push(e.key),t.push(e.value))}),No(t,e,n,function(e,n,t){var i=e.expression;return i.safe_to_spread()?i.drop_side_effect_free(n,t):e}));return e?e!==t||ge(e,function(e){return!(e instanceof qe)})?Le(this,e.map(function(e){return e instanceof qe?Re(st,e,{properties:[e]}):e})):this:null}),t(At,p),t(Oe,function(e,n){var t=No(this.expressions,e,n);if(!t)return null;var i,r=t.length-1,o=t[r];return e.option("awaits")&&0<r&&o instanceof tt&&o.expression.is_constant()&&(i=(t=t.slice(0,-1))[--r],o.expression=ra(e,i)?i:i.negate(e),t[r]=o),e.option("conditionals")&&0<r&&(i=t[r-1])instanceof Fe&&"="==i.operator&&(r=i.left)instanceof Ie&&(r=ta(e,r.definition(),i.right,o))&&((i=i.clone()).right=r,(t=t.slice(0,-2)).push(i.drop_side_effect_free(e,n))),t===this.expressions?this:Le(this,t)}),t(Zn,function(e,n){var t=this.expression;if(t.may_throw_on_access(e))return this;var i=this.property;return(t=t.drop_side_effect_free(e,n))?(i=i.drop_side_effect_free(e))?Le(this,[t,i]):t:i.drop_side_effect_free(e,n)}),t(Ie,function(e){return this.is_declared(e)&&tr(this,e)?null:this}),t(qt,function(e,n){var t=this;if(t.is_expr_pure(e))return 0==(i=t.expressions).length?null:Le(t,i).drop_side_effect_free(e,n);var i=t.tag,n=jo(e,i);return n&&((t=t.clone()).tag=n,i._squeezed&&(t.tag._squeezed=!0)),t}),t(et,function(e,n){var t=this.expression;if(ni[this.operator])return this.write_only=!t.has_side_effects(e),this;if("typeof"==this.operator&&t instanceof Ie&&tr(t,e))return null;var i=t.drop_side_effect_free(e,n);return n&&i&&Vr(i)?i===t&&"!"==this.operator?this:i.negate(e,n):i}),n(we,function(e,n){if(n.option("side_effects")){var t=e.body,n=t.drop_side_effect_free(n,!0);if(!n)return ye.warn("Dropping side-effect-free statement [{file}:{line},{col}]",e.start),Re(We,e);if(n!==t)return Re(we,e,{body:n})}return e}),n(en,function(e,n){return n.option("loops")?Re(nn,e,e).optimize(n):e}),n(Ze,function(t,e){if(!e.option("loops"))return t;var n=Lo(e,t.condition);if(!(n instanceof ye)){if(n&&!Yo(t,e.parent(),Mn))return Re(nn,t,{body:Re(xe,t.body,{body:[t.body,Re(we,t.condition,{body:t.condition})]})}).optimize(e);if(!Yo(t,e.parent()))return Re(xe,t.body,{body:[t.body,Re(we,t.condition,{body:t.condition})]}).optimize(e)}if(t.body instanceof xe&&!Yo(t,e.parent(),Mn)){for(var i=t.body.body,r=i.length;0<=--r;){var o=i[r];if(o instanceof Se&&!o.alternative&&o.body instanceof Cn&&e.loopcontrol_target(o.body)===t){if(a(o.condition))break;t.condition=Re(Ce,t,{operator:"&&",left:o.condition.negate(e),right:t.condition}),i.splice(r,1)}else if(o instanceof we){if(a(o.body))break;t.condition=Le(t,[o.body,t.condition]),i.splice(r,1)}else if(!Xr(o,!0))break}t.body=To(t.body,e.parent())}return t.body instanceof We?Re(nn,t,t).optimize(e):t.body instanceof we?Re(nn,t,{condition:Le(t.condition,[t.body.body,t.condition]),body:Re(We,t)}).optimize(e):t;function a(e){var n=!1;return e.walk(new Ye(function(e){return!!n||(e instanceof Ie?(Be(e.definition(),t.enclosed)||(n=!0),!0):void 0)})),n}}),n(nn,function(e,n){if(!n.option("loops"))return e;if(n.option("side_effects")&&(e.init&&(e.init=e.init.drop_side_effect_free(n)),e.step&&(e.step=e.step.drop_side_effect_free(n))),e.condition){var t=Lo(n,e.condition);if(t)t instanceof ye||(e.body=Re(xe,e.body,{body:[Re(we,e.condition,{body:e.condition}),e.body]}),e.condition=null);else if(n.option("dead_code"))return t=[],Ge(e.init)?t.push(e.init):e.init&&t.push(Re(we,e.init,{body:e.init})),t.push(Re(we,e.condition,{body:e.condition})),eo(n,e.body,t),Re(xe,e,{body:t}).optimize(n)}return function n(t,i){var e=a(t.body);if(i.option("dead_code")&&(e instanceof Cn||e instanceof Mn&&s(e)||e instanceof On))return r=[],Ge(t.init)?r.push(t.init):t.init&&r.push(Re(we,t.init,{body:t.init})),o=s(e)||e instanceof On,t.condition&&o?r.push(Re(Se,t,{condition:t.condition,body:e,alternative:null})):t.condition?r.push(Re(we,t.condition,{body:t.condition})):o&&r.push(e),eo(i,t.body,r),Re(xe,t,{body:r});if(e instanceof Se){var r,o=a(e.body);if(o instanceof Cn&&!s(o))return t.condition?t.condition=Re(Ce,t.condition,{left:t.condition,operator:"&&",right:e.condition.negate(i)}):t.condition=e.condition.negate(i),r=Rr(e.alternative),eo(i,e.body,r),f(r);if((o=a(e.alternative))instanceof Cn&&!s(o))return t.condition?t.condition=Re(Ce,t.condition,{left:t.condition,operator:"&&",right:e.condition}):t.condition=e.condition,r=Rr(e.body),eo(i,e.alternative,r),f(r)}return t;function a(e){return e instanceof xe?e.body[0]:e}function s(e){return i.loopcontrol_target(e)!==i.self()}function f(e){return t.body instanceof xe?(t.body=t.body.clone(),t.body.body=e.concat(t.body.body.slice(1)),t.body=t.body.transform(i)):t.body=Re(xe,t.body,{body:e}).transform(i),n(t,i)}}(e,n)}),n(tn,function(e,n){var t;return n.option("varify")&&Hr(e.init)&&(((t=e.init.definitions[0].name)instanceof je||t instanceof _t)&&!t.match_symbol(function(e){if(e instanceof ht)return!fa(e=e.definition())||Wo(n,e)},!0)&&(e.init=Go(e.init))),e}),n(Se,function(e,c){if(Lr(e.alternative)&&(e.alternative=null),!c.option("conditionals"))return e;if(c.option("booleans")&&!e.condition.has_side_effects(c)&&Bo(c,e.condition),c.option("dead_code")){var n=Lo(c,e.condition);if(!n)return ye.warn("Condition always false [{file}:{line},{col}]",e.condition.start),h=[Re(we,e.condition,{body:e.condition}).transform(c)],eo(c,e.body,h),e.alternative&&h.push(e.alternative),Re(xe,e,{body:h}).optimize(c);if(!(n instanceof ye))return ye.warn("Condition always true [{file}:{line},{col}]",e.condition.start),h=[Re(we,e.condition,{body:e.condition}).transform(c),e.body],e.alternative&&eo(c,e.alternative,h),Re(xe,e,{body:h}).optimize(c)}var n=e.condition.negate(c),t=e.condition.print_to_string().length,i=n.print_to_string().length,r=i<t,o=(e.alternative&&r&&(r=!1,e.condition=n,o=e.body,e.body=e.alternative,e.alternative=Lr(o)?null:o),[]),a=[],s=[],f=m(e.body,o,a,s),u=[],l=[],p=[],d=m(e.alternative,u,l,p);if(f instanceof xe||d instanceof xe){var h=[],v=[];if(f&&([].push.apply(h,o),[].push.apply(v,a),f instanceof xe?e.body=f:0==f.length?e.body=Re(We,e.body):e.body=Re(we,e.body,{body:Le(e.body,f)}),s.forEach(Or)),d&&([].push.apply(h,u),[].push.apply(v,l),d instanceof xe?e.alternative=d:0==d.length?e.alternative=null:e.alternative=Re(we,e.alternative,{body:Le(e.alternative,d)}),p.forEach(Or)),0<v.length&&h.push(Re(Bn,e,{definitions:v})),0<h.length)return h.push(e),Re(xe,e,{body:h}).optimize(c)}else if(f&&d)return h=o.concat(u),(0<a.length||0<l.length)&&h.push(Re(Bn,e,{definitions:a.concat(l)})),0==f.length?h.push(Re(we,e.condition,{body:0<d.length?Re(Ce,e,{operator:"||",left:e.condition,right:Le(e.alternative,d)}).transform(c):e.condition.clone()}).optimize(c)):0==d.length?(t===i&&!r&&e.condition instanceof Ce&&"||"==e.condition.operator&&(r=!0),h.push(Re(we,e,{body:Re(Ce,e,{operator:r?"||":"&&",left:r?n:e.condition,right:Le(e.body,f)}).transform(c)}).optimize(c))):h.push(Re(we,e,{body:Re(Me,e,{condition:e.condition,consequent:Le(e.body,f),alternative:Le(e.alternative,d)})}).optimize(c)),s.forEach(Or),p.forEach(Or),Re(xe,e,{body:h}).optimize(c);return(e=Lr(e.body)?Re(Se,e,{condition:n,body:e.alternative,alternative:null}):e).alternative instanceof On&&e.body.TYPE==e.alternative.TYPE?((v=Re(e.body.CTOR,e,{value:Re(Me,e,{condition:e.condition,consequent:e.body.value||Re(Ft,e.body).transform(c),alternative:e.alternative.value||Re(Ft,e.alternative).transform(c)})}))instanceof $n&&(v.in_bool=e.body.in_bool||e.alternative.in_bool),v):Eo((e=e.body instanceof Se&&!e.body.alternative&&!e.alternative?Re(Se,e,{condition:Re(Ce,e.condition,{operator:"&&",left:e.condition,right:e.body.condition}),body:e.body.body,alternative:null}):e).body)&&e.alternative?(o=e.alternative,e.alternative=null,Re(xe,e,{body:[e,o]}).optimize(c)):Eo(e.alternative)?(h=e.body,e.body=e.alternative,e.condition=r?n:e.condition.negate(c),e.alternative=null,Re(xe,e,{body:[e,h]}).optimize(c)):(c.option("typeofs")&&Ro(e.condition,e.body,e.alternative),e);function m(e,n,t,i){if(null==e)return[];if(e instanceof xe){for(var r=[],o=0;o<e.body.length;o++){var a=e.body[o];if(!(a instanceof We)){if(a instanceof On){if(0==o)return;0<r.length&&(a=a.clone(),r.push(a.value||Re(Ft,a).transform(c)),a.value=Le(e,r));var s=e.clone();return s.body=s.body.slice(o+1),s.body.unshift(a),s}if(a instanceof Q)n.push(a);else if(a instanceof we){if(!c.option("sequences")&&0<r.length)return;r.push(a.body)}else{if(!(a instanceof Bn))return;if(!c.option("sequences")&&0<r.length)return;a.remove_initializers(c,t),a.definitions.forEach(f)}}}return r}return e instanceof Q?(n.push(e),[]):e instanceof We?[]:e instanceof we?[e.body]:e instanceof Bn?(r=[],e.remove_initializers(c,t),e.definitions.forEach(f),r):void 0;function f(e){e.value&&r.push(Re(Fe,e,{operator:"=",left:e.name.convert_symbol(Ie,function(e){i.push(e)}),right:e.value}))}}}),n(Fn,function(i,t){if(!t.option("switches"))return i;if(!t.option("dead_code"))return i;for(var e,n,r,o=[],a=[],s=[],f=0,c=i.body.length;f<c;f++){if((e=i.body[f])instanceof Pn){var u=o[o.length-1];if(n||y(e.body[0],t)&&(!u||Eo(u))){x(e,u);continue}n=e}else{var l=e.expression,p=Re(Ce,i,{operator:"===",left:i.expression,right:l}).evaluate(t,!0);if(!p){l.has_side_effects(t)&&s.push(l),x(e,o[o.length-1]);continue}if(!(p instanceof ye))for(n&&(p=o.indexOf(n),o.splice(p,1),x(n,o[p-1]),n=null),l.has_side_effects(t)?r=e:n=e=Re(Pn,e,e);++f<c;)x(i.body[f],e)}if(c<=f+1||Eo(e)){var d,u=o[o.length-1],h=e.body;if(Eo(u))switch(u.body.length-h.length){case 1:if(!y(d=u.body[u.body.length-1],t))break;h=h.concat(d);case 0:var v=Re(xe,u,u),m=Re(xe,e,{body:h});v.equivalent_to(m)&&(u.body=[])}}s.length&&(e instanceof Pn?o.push(Re(jn,i,{expression:Le(i,s),body:[]})):(s.push(e.expression),e.expression=Le(i,s)),s=[]),o.push(e)}for(s.length&&!r&&o.push(Re(jn,i,{expression:Le(i,s),body:[]}));e=o[o.length-1];){if(y(d=e.body[e.body.length-1],t)&&e.body.pop(),e===n){if(!Br(e))break}else{if(e.expression.has_side_effects(t))break;if(n){if(!Br(n))break;if(o[o.length-2]!==n)break;n.body=n.body.concat(e.body),e.body=[]}else if(!Br(e))break}x(e),o.pop()===n&&(n=null)}if(!e)return a.push(Re(we,i.expression,{body:i.expression})),s.length&&a.push(Re(we,i,{body:Le(i,s)})),Re(xe,i,{body:a}).optimize(t);if(e===n)for(;(e=o[o.length-2])&&!(e instanceof Pn)&&Br(e);){if((l=e.expression).has_side_effects(t)){if((u=o[o.length-3])&&!Eo(u))break;n.body.unshift(Re(we,i,{body:l}))}x(e),o.splice(-2,1)}if(o[0].body=a.concat(o[0].body),i.body=o,t.option("conditionals"))switch(o.length){case 1:if(!w(o[0]))break;l=o[0].expression,h=o[0].body.slice();return o[0]!==n&&o[0]!==r?Re(Se,i,{condition:Re(Ce,i,{operator:"===",left:i.expression,right:l}),body:Re(xe,i,{body:h}),alternative:null}).optimize(t):(l&&h.unshift(Re(we,l,{body:l})),h.unshift(Re(we,i.expression,{body:i.expression})),Re(xe,i,{body:h}).optimize(t));case 2:if(!Be(n,o)||!w(o[1]))break;var _=(h=o[0].body.slice()).length&&y(h[h.length-1],t);if(_&&h.pop(),!ge(h,w))break;var g=o[1].body.length&&Re(xe,o[1],o[1]),b=Re(Se,i,{condition:Re(Ce,i,o[0]===n?{operator:"!==",left:i.expression,right:o[1].expression}:{operator:"===",left:i.expression,right:o[0].expression}),body:Re(xe,o[0],{body:h}),alternative:_&&g||null});return(b=!_&&g?Re(xe,i,{body:[b,g]}):b).optimize(t)}return i;function y(e,n){return e instanceof Cn&&n.loopcontrol_target(e)===i}function w(e){var n=!1,t=new Ye(function(e){if(n||e instanceof Ee||e instanceof we)return!0;y(e,t)&&(n=!0)});return t.push(i),e.walk(t),!n}function x(e,n){n&&!Eo(n)?n.body=n.body.concat(e.body):eo(t,e,a)}}),n(Nn,function(e,n){if(e.body=Zr(e.body,n),n.option("dead_code")){if(Br(e)&&!(e.bcatch&&e.bcatch.argname&&e.bcatch.argname.match_symbol(function(e){return e instanceof kt&&!tr(e)},!0)))return t=[],e.bcatch&&(eo(n,e.bcatch,t),t.forEach(function(e){e instanceof Bn&&e.definitions.forEach(function(e){var n=e.name.definition().redefined();n&&(e.name=e.name.clone(),e.name.thedef=n)})})),t.unshift(Re(xe,e,e).optimize(n)),e.bfinally&&t.push(Re(xe,e.bfinally,e.bfinally).optimize(n)),Re(xe,e,{body:t}).optimize(n);if(e.bfinally&&Br(e.bfinally)){var t=Re(xe,e.bfinally,e.bfinally).optimize(n);if(t=e.body.concat(t),!e.bcatch)return Re(xe,e,{body:t}).optimize(n);e.body=t,e.bfinally=null}}return e}),Rn.DEFMETHOD("remove_initializers",Uo(function(e,n){return Re(Ft,n).optimize(e)})),Ln.DEFMETHOD("remove_initializers",Uo(p)),Bn.DEFMETHOD("remove_initializers",Uo(p)),Yn.DEFMETHOD("to_assignments",function(){var e=this.definitions.reduce(function(e,t){var n,i,r,o=t.name.definition(),a=t.value;return a&&(a instanceof Oe&&(a=a.clone()),n=Re(Ie,t.name,t.name),i=Re(Fe,t,{operator:"=",left:n,right:a}),e.push(i),(r=function(){return i.right}).assigns=[i],r.direct_access=o.direct_access,r.escaped=o.escaped,n.fixed=r,o.references.forEach(function(e){var n;!e.fixed||(n=e.fixed.assigns)&&n[0]===t&&(1<n.length||e.fixed.to_binary||e.fixed.to_prefix?n[0]=i:(e.fixed=r,o.fixed===e.fixed&&(o.fixed=r)))}),o.references.push(n)),o.assignments++,o.eliminated++,o.single_use=!1,e},[]);return 0==e.length?null:Le(this,e)}),n(Rn,Xo),n(Ln,Xo),n(De,function(p,c){var o=p.expression,e=Ko(p,c);if(e)return e;if(c.option("sequences"))if(o instanceof $e){if((b=Qo(o))!==o)return(e=p.clone()).expression=b.expressions.pop(),b.expressions.push(e),b.optimize(c)}else if(!jr(0,o.tail_node()))if((b=Qo(p))!==p)return b.optimize(c);if(c.option("unused")&&Zo(p,c),c.option("unsafe"))if(Gr(o))switch(o.name){case"Array":if(1==p.args.length){if((s=p.args[0])instanceof He)try{var n=s.value;if(6<n)break;for(var t=Array(n),i=0;i<n;i++)t[i]=Re(Pt,p);return Re(Pe,p,{elements:t})}catch(e){ye.warn("Invalid array length: {length} [{file}:{line},{col}]",{length:n,file:p.start.file,line:p.start.line,col:p.start.col});break}if(!s.is_boolean(c)&&!s.is_string(c))break}return Re(Pe,p,{elements:p.args});case"Object":if(0==p.args.length)return Re(st,p,{properties:[]});break;case"String":if(0==p.args.length)return Re(fe,p,{value:""});if(1==p.args.length)return Re(Ce,p,{operator:"+",left:Re(fe,p,{value:""}),right:p.args[0]}).optimize(c);break;case"Number":if(0==p.args.length)return Re(He,p,{value:0});if(1==p.args.length)return Re(ze,p,{operator:"+",expression:Re(Ce,p,{operator:"+",left:Re(fe,p,{value:""}),right:p.args[0]})}).optimize(c);break;case"Boolean":if(0==p.args.length)return Re(Nt,p).optimize(c);if(1==p.args.length)return Re(ze,p,{operator:"!",expression:Re(ze,p,{operator:"!",expression:p.args[0]})}).optimize(c);break;case"RegExp":var P=[];if(ge(p.args,function(e){var n=e.evaluate(c);return P.unshift(n),e!==n}))try{return fo(c,p,Re(Ct,p,{value:RegExp.apply(RegExp,P)}))}catch(e){ye.warn("Error converting {expr} [{file}:{line},{col}]",{expr:p,file:p.start.file,line:p.start.line,col:p.start.col})}}else if(o instanceof Qn)switch(o.property){case"toString":var r=o.expression;if(0!=p.args.length||r.may_throw_on_access(c)||r instanceof Dt)break;return Re(Ce,p,{operator:"+",left:Re(fe,p,{value:""}),right:r}).optimize(c);case"join":if(o.expression instanceof Pe&&p.args.length<2)e:{var a=p.args[0];if(0==o.expression.elements.length&&!(a instanceof qe))return a?Le(p,[a,Re(fe,p,{value:""})]).optimize(c):Re(fe,p,{value:""});if(!(a&&(a=a.evaluate(c))instanceof ye)){for(var s,t=[],f=[],i=0;i<o.expression.elements.length;i++){var u=o.expression.elements[i];if((k=u.evaluate(c))!==u)f.push(k);else{if(u instanceof qe)break e;0<f.length&&(t.push(Re(fe,p,{value:f.join(a)})),f.length=0),t.push(u)}}return(0<f.length&&t.push(Re(fe,p,{value:f.join(a)})),1==t.length)?t[0].is_string(c)?t[0]:Re(Ce,t[0],{operator:"+",left:Re(fe,p,{value:""}),right:t[0]}):""==a?(s=t[0].is_string(c)||t[1].is_string(c)?t.shift():Re(fe,p,{value:""}),t.reduce(function(e,n){return Re(Ce,n,{operator:"+",left:e,right:n})},s).optimize(c)):((C=p.clone()).expression=C.expression.clone(),C.expression.expression=C.expression.expression.clone(),C.expression.expression.elements=t,fo(c,p,C))}}break;case"charAt":if(p.args.length<2)return(C=Re(Ce,p,{operator:"||",left:Re(Zn,p,{expression:o.expression,property:p.args.length?Re(Ce,p.args[0],{operator:"|",left:Re(He,p,{value:0}),right:p.args[0]}):Re(He,p,{value:0})}).optimize(c),right:Re(fe,p,{value:""})})).is_string=B,C.optimize(c);break;case"apply":if(2==p.args.length&&p.args[1]instanceof Pe)return($=p.args[1].elements.slice()).unshift(p.args[0]),Re(De,p,{expression:Re(Qn,o,{expression:o.expression,property:"call"}),args:$}).optimize(c);break;case"call":r=o.expression;if((r=r instanceof Ie?r.fixed_value():r)instanceof Ee&&!r.contains_this())return(p.args.length?Le(this,[p.args[0],Re(De,p,{expression:o.expression,args:p.args.slice(1)})]):Re(De,p,{expression:o.expression,args:[]})).optimize(c)}if(c.option("unsafe_Function")&&Gr(o)&&"Function"==o.name){if(0==p.args.length)return Re(vn,p,{argnames:[],body:[]}).init_vars(o.scope);if(ge(p.args,function(e){return e instanceof fe}))try{var l,d=Qt(m="n(function("+p.args.slice(0,-1).map(function(e){return e.value}).join()+"){"+p.args[p.args.length-1].value+"})"),h={ie:c.option("ie")},v=(d.figure_out_scope(h),new Ji(c.options)),m=((d=d.transform(v)).figure_out_scope(h),d.compute_char_frequency(h),d.mangle_names(h),d.walk(new Ye(function(e){return!!l||(e instanceof Ee?(l=e,!0):void 0)})),wa());return xe.prototype._codegen.call(l,m),p.args=[Re(fe,p,{value:l.argnames.map(function(e){return e.print_to_string()}).join()}),Re(fe,p.args[p.args.length-1],{value:m.get().replace(/^\{|\}$/g,"")})],p}catch(e){if(!(e instanceof ae))throw e;ye.warn("Error parsing code passed to new Function [{file}:{line},{col}]",p.args[p.args.length-1].start),ye.warn(e.toString())}}var _=o instanceof Ie?o.fixed_value():o,e=c.parent(),g=c.self(),b=_ instanceof Ee&&(!un(_)||c.option("awaits")&&e instanceof tt)&&(!ln(_)||c.option("yields")&&g instanceof it&&g.nested),v=b&&_.first_statement(),y=0,w=!1,x=!ge(p.args,function(e){return!(e instanceof qe)}),h=b&&ge(_.argnames,function(e,n){if(1==y&&p.args[n]instanceof qe&&(y=2),e instanceof Ae){if(no(1==(y=y||1)&&p.args[n])||(y=2),ma(_,e.value))return;e=e.name}return!(e instanceof je&&(w=!0,ma(_,e)))})&&!(_.rest instanceof je&&ma(_,_.rest)),d=h&&c.option("inline")&&!p.is_expr_pure(c);if(d&&v instanceof $n){var k=v.value;if(o===_&&!_.name&&(!k||k.is_constant_expression())&&na(_,ea(c.find_parent(ke))))return Le(p,I(k)).optimize(c)}if(b&&!_.contains_this()){var E,S=!1;if(d&&!_.uses_arguments&&!_.pinned()&&!(_.name&&_ instanceof fn)&&(o===_||!sa(c,E=o.definition(),_)&&_.is_constant_expression(Mr(c)))&&(k=function(e){var n=_.body.length;if(n<2&&(e=Y(e)))return e;if(c.option("inline")<3)return!1;e=null;for(var t=0;t<n;t++){var i=_.body[t];if(i instanceof Bn){if(S){if(e){if(!(e instanceof we))return!1;Jr(i)||(e=null)}}else if(!Jr(i)){if(e&&!(e instanceof we))return!1;S=!(e=null)}}else if(!(i instanceof _n||i instanceof bn||i instanceof We)){if(e)return!1;e=i}}return Y(e)}(v))){var T,j,A,D,O=o===_||E.single_use&&E.references.length-E.replaced==1;if(function(){if(!(y||w||x||S||_.rest)&&!(c.option("inline")<2&&_.argnames.length)&&_.variables.all(function(e){return e.references.length-e.replaced<2&&e.orig[0]instanceof Ne})){var i,n=c.find_parent(ke),r=!1,o=ea(n),a=[],s=!1;if(k.walk(new Ye(function(e,n){if(r)return!0;if(!(e instanceof Ce&&xi[e.operator]||e instanceof Me)){if(e instanceof ke)return r=!0;if(o&&e instanceof dt&&o[e.name])return r=!0;if(e instanceof Ie){var t=e.definition();if(_.variables.get(e.name)!==t)return void(a=null);if(t.init instanceof Q)return r=!0;if(ti(e,this.parent()))return r=!0;t=R(t);return(i<t||(i=t),a)?void(s?a=null:a.push(_.argnames[t])):void 0}return e.has_side_effects(c)?(n(),s=!0):void 0}a=null})),!r){var e=p.args.length;if(a&&_.argnames.length>=e){for(e=_.argnames.length;e-- >i&&_.argnames[e]===a.pop(););e++}return e<=i||ge(p.args.slice(i,e),s&&!a?function(e){return e.is_constant_expression(n)}:function(e){return!e.has_side_effects(c)})}}}()){var $=p.args.slice(),q=[],m=k.clone(!0).transform(new Ht(function(e){if(e instanceof Ie){var n=e.definition();if(_.variables.get(e.name)!==n)return q.push(e),e;var n=R(n),t=$[n];if(!t)return Re(Ft,p);$[n]=null;n=this.parent();return n?Nr(0,n,e,t):t}})),b=_.inlined,z=(o!==_&&(_.inlined=!0),[]),C=($.forEach(function(e){e&&((e=e.clone(!0)).walk(new Ye(function(e){e instanceof Ie&&q.push(e)})),z.push(e))},[]),z.push(m),Le(p,z).optimize(c));if(_.inlined=b,C=Nr(0,e,g,C),O||ao(C,p)===C)return q.forEach(function(e){e.scope=o===_?_.parent_scope:o.scope,e.reference();e=e.definition();O&&e.replaced++,e.single_use=!1}),C;C.has_side_effects(c)||(p.drop_side_effect_free=function(e,n){var t=this.args.slice();return t.unshift(this.expression),Le(this,t).drop_side_effect_free(e,n)})}if(O&&function(){var e,n=new be,t=0;D=g;for(;D.variables&&D.variables.each(function(e){n.set(e.name,!0)}),e=D,(D=c.parent(t++))instanceof Qe?A=[]:D instanceof nn?D.init!==e&&(A=[]):D instanceof tn&&D.init!==e&&D.object!==e&&(A=[]),!(D instanceof ke););if(!(j=D.body.indexOf(e)+1))return;if(!na(_,ea(D)))return;var i=(o!==_||_.parent_scope.resolve()===D)&&!D.pinned();D instanceof an&&(c.toplevel.vars?n.set("arguments",!0):i=!1);T=new be;var r=c.option("inline");return function(n,t){var i=!1;return _.each_argname(function(e){if(!i&&!e.unused){if(!t||L(n,e.name))return i=!0;T.set(e.name,!0),A&&A.push(e.definition())}}),!i}(n,2<=r&&i)&&(!!function(n,e){for(var t=0;t<_.body.length;t++){var i=_.body[t];if(i instanceof Q){var r=i.name;if(!e)return;if(T.has(r.name))return;if(L(n,r.name))return;if(!ge(i.enclosed,function(e){return e.scope===D||e.scope===i||!n.has(e.name)}))return;A&&A.push(r.definition())}else if(i instanceof Bn){if(!e)return;for(var o=i.definitions.length;0<=--o;){r=i.definitions[o].name;if(L(n,r.name))return;A&&A.push(r.definition())}}}return 1}(n,3<=r&&i)&&(!A||0==A.length||!pa(_,A)))}())return _._squeezed=!0,o!==_&&(_.parent_scope=o.scope),C=Le(p,function(){var e=[],n=[];(1<y||w||x||_.rest?function(i,r){function n(e,n){var t=n.definition(),e=(t.assignments++,t.references.push(e),Re(gt,n,n));t.orig.push(e),t.eliminated++,F(i,r,e)}r.push(Re(Fe,p,{operator:"=",left:Re(rt,p,{elements:_.argnames.map(function(e){return e.unused?Re(Pt,e):e.convert_symbol(Ie,n)}),rest:_.rest&&_.rest.convert_symbol(Ie,n)}),right:Re(Pe,p,{elements:p.args.slice()})}))}:function(e,n){for(var t=_.argnames.length,i=p.args.length;--i>=t;)n.push(p.args[i]);var r,o=[];for(i=t;0<=--i;){var a,s,f=_.argnames[i],c=(r=f instanceof Ae?(o.push(f),f.name):f,p.args[i]);r.unused||D.var_names().has(r.name)?c&&n.push(c):(a=Re(gt,r,r),(s=r.definition()).orig.push(a),s.eliminated++,void 0!==r.unused?(F(e,n,a),c&&n.push(c)):(!c&&A&&f===r&&(c=Re(Ft,p)),F(e,n,a,c)))}for(e.reverse(),n.reverse(),i=o.length;0<=--i;){var u,l=o[i];void 0!==l.name.unused?n.push(l.value):(u=Re(Ie,l.name,l.name),l.name.definition().references.push(u),n.push(Re(Fe,l,{operator:"=",left:u,right:l.value})))}})(e,n);var t=function(i,e){var t=[j,0],o=[],r=[],a=[],s=[],f=[];return _.body.filter(A?function(e){if(!(e instanceof Q))return!0;var n=Re(gt,e.name,va(e.name)),t=n.definition();return t.fixed=!1,t.orig.push(n),t.eliminated++,F(i,r,n,qo(e,!0)),!1}:function(e){if(!(e instanceof Q))return!0;var n=e.name.definition();return D.functions.set(n.name,n),D.variables.set(n.name,n),D.enclosed.push(n),D.var_names().set(n.name,!0),t.push(e),!1}).forEach(function(e){if(e instanceof Bn)for(var n=0;n<e.definitions.length;n++){var t=e.definitions[n],i=va(t.name),r=t.value;r&&0<f.length&&(f.push(r),r=Le(t,f),f=[]),F(o,a,i,r),!A||T.has(i.name)||1==i.definition().orig.length&&_.functions.has(i.name)||s.push(ga(c,i))}else e instanceof we&&f.push(e.body)}),[].push.apply(i,o),[].push.apply(e,s),[].push.apply(e,r),[].push.apply(e,a),t}(e,n);n.push(k),e.length&&t.push(Re(Bn,_,{definitions:e}));return[].splice.apply(D.body,t),_.enclosed.forEach(function(e){D.var_names().has(e.name)||(D.enclosed.push(e),D.var_names().set(e.name,!0))}),n}()).optimize(c),Nr(0,e,g,C)}if(c.option("side_effects")&&h&&ge(_.body,Lr)&&(_===o?Po(_,c):!y&&!w&&!_.rest)&&(!cn(_)||!_.value)&&na(_,ea(c.find_parent(ke))))return Le(p,I()).optimize(c)}if(c.option("drop_console")&&o instanceof $e){for(var M=o.expression;M.expression;)M=M.expression;if(Gr(M)&&"console"==M.name)return Re(Ft,p).optimize(c)}return c.option("negate_iife")&&e instanceof we&&Vr(g)?p.negate(c,!0):po(c,p);function N(e){return Re(Qn,e,{expression:Re(Pe,e,{elements:[]}),property:"e"})}function I(e){var a,t,n=p.args.slice(),i=1<y||w||_.rest;return(i||x)&&(n=[Re(Pe,p,{elements:n})]),i?(a=new Ht(function(i,e){return i instanceof Ae?Re(Ae,i,{name:i.name.transform(a)||N(i),value:i.value}):i instanceof rt?(t=[],i.elements.forEach(function(e,n){(e=e.transform(a))&&(t[n]=e)}),Oo(i,t),Re(rt,i,{elements:t})):i instanceof at?(r=[],o=[],i.properties.forEach(function(e){var n=e.key,t=e.value.transform(a);t?(o.length&&(n instanceof ye||(n=Pr(n,e)),o.push(n),n=Le(i,o),o=[]),r.push(Re(ot,e,{key:n,value:t}))):n instanceof ye&&o.push(n)}),o.length&&r.push(Re(ot,i,{key:Le(i,o),value:N(i)})),Re(at,i,{properties:r})):i instanceof Ne?null:void 0;var t,r,o}),t=[],_.argnames.forEach(function(e,n){(e=e.transform(a))&&(t[n]=e)}),(i=_.rest&&_.rest.transform(a))&&(t.length=_.argnames.length),Oo(_,t),n[0]=Re(Fe,p,{operator:"=",left:Re(rt,_,{elements:t,rest:i}),right:n[0]})):_.argnames.forEach(function(e){e instanceof Ae&&n.push(e.value)}),n.push(e||Re(Ft,p)),n}function H(){return p.call_only?Re(He,p,{value:0}):Re(Ft,p)}function Y(e){return e?e instanceof $n?e.value||H():e instanceof we?p.call_only?e.body:Re(ze,e,{operator:"void",expression:e.body}):void 0:H()}function R(e){for(var n=_.argnames.length;0<=--n;)if(_.argnames[n].definition()===e)return n}function L(e,n){return e.has(n)||di[n]||D.var_names().has(n)}function F(e,n,t,i){var r=t.definition();D.var_names().has(t.name)||(D.var_names().set(t.name,!0),e.push(Re(Te,t,{name:t,value:null}))),D.variables.set(t.name,r),D.enclosed.push(r),i&&(e=Re(Ie,t,t),r.assignments++,r.references.push(e),n.push(Re(Fe,p,{operator:"=",left:e,right:i})))}}),n(Xn,function(e,n){if(n.option("sequences")){var t=Qo(e);if(t!==e)return t.optimize(n)}if(n.option("unused")&&Zo(e,n),n.option("unsafe")){t=e.expression;if(Gr(t))switch(t.name){case"Object":case"RegExp":case"Function":case"Error":case"Array":return Re(De,e,e).transform(n)}}return e}),n(Oe,function(e,o){for(var n=function(){if(!o.option("side_effects"))return e.expressions;var t=[],i=x(o),r=e.expressions.length-1;return e.expressions.forEach(function(e,n){(e=n<r?e.drop_side_effect_free(o,i):e)&&(Ir(t,e),i=!1)}),t}(),t=n.length-1,i=1;i<t;i++){var r=n[i-1],a=c(r);if(a){var s=n[i];if(o.option("conditionals")){var f=ta(o,a,r.right,s);if(f){r.right=f,n.splice(i--,1),t--;continue}}o.option("dead_code")&&c(s)===a&&s.right.is_constant_expression(a.scope.resolve())&&(n[--i]=r.right)}}if(o.option("side_effects")){for(;0<t&&no(n[t],o);)t--;t<n.length-1&&(n[t]=Re(ze,e,{operator:"void",expression:n[t]}),n.length=t+1)}return 0==t?(e=Nr(0,o.parent(),o.self(),n[0]))instanceof Oe?e:e.optimize(o):(e.expressions=n,e);function c(e){return e instanceof Fe&&"="==e.operator&&e.left instanceof Ie&&e.left.definition()}}),n(nt,function(e,n){if(n.option("sequences")){var t=Qo(e);if(t!==e)return t.optimize(n)}return po(n,e)}),Pi=L("+ -"),ji=L("* / %"),n(ze,function(e,n){var t=e.operator,i=e.expression;if(n.option("sequences")&&function(){switch(t){case"delete":return!a(i.tail_node());case"typeof":return!Gr(i.tail_node());default:return 1}}()){var r=Qo(e);if(r!==e)return r.optimize(n)}switch(t){case"+":if(!n.option("evaluate"))break;if(!i.is_number(n,!0))break;var o=n.parent();if(o instanceof ze&&"delete"==o.operator)break;return i;case"-":if((i=i instanceof jt?i.transform(n):i)instanceof He||i instanceof jt)return e;break;case"!":if(!n.option("booleans"))break;if(i.is_truthy())return Le(e,[i,Re(Nt,e)]).optimize(n);if(n.in_boolean_context()){if(i instanceof ze&&"!"==i.operator)return i.expression;i instanceof Ce&&(e=fo(n,e,i.negate(n,x(n))))}break;case"delete":if(!n.option("evaluate"))break;if(a(i))break;return Le(e,[i,Re(It,e)]).optimize(n);case"typeof":if(!n.option("booleans"))break;if(!n.in_boolean_context())break;ye.warn("Boolean expression always true [{file}:{line},{col}]",e.start);o=[Re(It,e)];return i instanceof Ie&&tr(i,n)||o.unshift(i),Le(e,o).optimize(n);case"void":if(n.option("side_effects"))return(i=i.drop_side_effect_free(n))?(e.expression=i,e):Re(Ft,e).optimize(n)}return n.option("evaluate")&&i instanceof Ce&&Pi[t]&&ji[i.operator]&&(i.left.is_constant()||!i.right.has_side_effects(n))?Re(Ce,e,{operator:i.operator,left:Re(ze,i.left,{operator:t,expression:i.left}),right:i.right}):po(n,e);function a(e){return e instanceof jt||e instanceof z||e instanceof $t||e instanceof $e||e instanceof Ie||e instanceof Ft}}),n(tt,function(e,n){if(!n.option("awaits"))return e;if(n.option("sequences")){var t=Qo(e);if(t!==e)return t.optimize(n)}if(n.option("side_effects")){var i=e.expression;if(i instanceof tt)return i.optimize(n);if(i instanceof ze&&i.expression instanceof tt)return i.optimize(n);for(var r,o=0,a=e;r=n.parent(o++);a=r){if(cn(r)){if(r.value===a)return i.optimize(n)}else if(r instanceof $n){var s=!0;do{if(a=r,(r=n.parent(o++))instanceof Nn&&(r.bfinally||r.bcatch)!==a){s=!1;break}}while(r&&!(r instanceof ke));if(s)return i.optimize(n)}else if(r instanceof Oe&&r.tail_node()===a)continue;break}}return e}),n(it,function(e,n){if(!n.option("yields"))return e;if(n.option("sequences")){var t=Qo(e);if(t!==e)return t.optimize(n)}t=e.expression;if(e.nested&&"Call"==t.TYPE){t=t.clone().optimize(n);if("Call"!=t.TYPE)return t}return e}),Ce.DEFMETHOD("lift_sequences",function(e){if(this.left instanceof $e){if(!(this.left.expression instanceof Oe))return this;var n=this.left.expression.expressions.slice();return(t=this.clone()).left=t.left.clone(),t.left.expression=n.pop(),n.push(t),Le(this,n)}if(this.left instanceof Oe)return n=this.left.expressions.slice(),(t=this.clone()).left=n.pop(),n.push(t),Le(this,n);if(this.right instanceof Oe){if(this.left.has_side_effects(e))return this;for(var t,i="="==this.operator&&this.left instanceof Ie,r=(n=this.right.expressions).length-1,o=0;o<r&&(i||!n[o].has_side_effects(e));o++);if(o==r)return n=n.slice(),(t=this.clone()).right=n.pop(),n.push(t),Le(this,n);if(0<o)return(t=this.clone()).right=Le(this.right,n.slice(o)),(n=n.slice(0,o)).push(t),Le(this,n)}return this}),Ni=L("indexOf lastIndexOf"),Ii=L("== === != !== * & | ^"),n(Ce,function(t,a){if(!Ii[t.operator]||!t.right.is_constant()||t.left.is_constant()||t.left instanceof Ce&&Xt[t.left.operator]>=Xt[t.operator]||w(),a.option("sequences")){var e=t.lift_sequences(a);if(e!==t)return e.optimize(a)}if(a.option("assignments")&&xi[t.operator]){e=t.right;if(t.left instanceof Ie&&e instanceof Fe&&"="==e.operator&&t.left.equivalent_to(e.left))return t.right=e.right,e.right=t,e}if(a.option("comparisons"))switch(t.operator){case"===":case"!==":if(no(t.left,a)&&t.right.is_defined(a))return ye.warn("Expression always defined [{file}:{line},{col}]",t.start),Le(t,[t.right,Re("==="==t.operator?Nt:It,t)]).optimize(a);var n=!0;(t.left.is_string(a)&&t.right.is_string(a)||t.left.is_number(a)&&t.right.is_number(a)||t.left.is_boolean(a)&&t.right.is_boolean(a)||oa(a,t.left)&&t.left.equivalent_to(t.right))&&(t.operator=t.operator.slice(0,2));case"==":case"!=":if(!n&&no(t.left,a))t.left=Re(Mt,t.left);else if(a.option("typeofs")&&t.left instanceof fe&&"undefined"==t.left.value&&t.right instanceof ze&&"typeof"==t.right.operator)((i=t.right.expression)instanceof Ie?!i.is_declared(a):i instanceof $e&&a.option("ie"))||(t.right=i,t.left=Re(Ft,t.left).optimize(a),2==t.operator.length&&(t.operator+="="));else if(t.left instanceof Ie&&t.right instanceof Ie&&t.left.definition()===t.right.definition()&&ia(t.left))return Re("="==t.operator[0]?It:Nt,t).optimize(a);break;case"&&":case"||":var i;if((i=(f=(f=t.left).operator==t.operator?f.right:f).right)instanceof Fe&&"="==i.operator&&(i=i.left),f instanceof Ce&&f.operator==("&&"==t.operator?"!==":"===")&&t.right instanceof Ce&&f.operator==t.right.operator&&(no(f.left,a)&&t.right.left instanceof Mt||f.left instanceof Mt&&no(t.right.left,a))&&!i.has_side_effects(a)&&i.equivalent_to(t.right.right))return f.operator=f.operator.slice(0,-1),f.left=Re(Mt,t),t.left}var r,o=!1,s=a.parent();if(a.option("booleans")){var f=t.left;if(xi[t.operator]&&!f.has_side_effects(a)){if(f.equivalent_to(t.right))return Nr(0,s,a.self(),f).optimize(a);Bo(a,f)}o=a.in_boolean_context()}if(o)switch(t.operator){case"+":var c=t.left.evaluate(a,!0);if(c&&"string"==typeof c||(c=t.right.evaluate(a,!0))&&"string"==typeof c){ye.warn("+ in boolean context always true [{file}:{line},{col}]",t.start);c=[];if(t.left.evaluate(a)instanceof ye&&c.push(t.left),t.right.evaluate(a)instanceof ye&&c.push(t.right),c.length<2)return c.push(Re(It,t)),Le(t,c).optimize(a);t.truthy=!0}break;case"==":if(t.left instanceof fe&&""==t.left.value&&t.right.is_string(a))return Re(ze,t,{operator:"!",expression:t.right}).optimize(a);break;case"!=":if(t.left instanceof fe&&""==t.left.value&&t.right.is_string(a))return t.right.optimize(a)}if(a.option("comparisons")&&t.is_boolean(a)){if(!(s instanceof Ce)||s instanceof Fe){e=fo(a,t,Re(ze,t,{operator:"!",expression:t.negate(a,x(a))}));if(e!==t)return e}switch(t.operator){case">":w("<");break;case">=":w("<=")}}if(a.option("conditionals")&&xi[t.operator]&&t.right instanceof Ce&&t.operator==t.right.operator&&aa(t,a),a.option("strings")&&"+"==t.operator){if(t.right instanceof fe&&""==t.right.value&&t.left.is_string(a))return t.left.optimize(a);if(t.left instanceof fe&&""==t.left.value&&t.right.is_string(a))return t.right.optimize(a);if(t.left instanceof Ce&&"+"==t.left.operator&&t.left.left instanceof fe&&""==t.left.left.value&&t.right.is_string(a)&&(t.left.right.is_constant()||!t.right.has_side_effects(a)))return t.left=t.left.right,t.optimize(a);t.right instanceof Ce&&t.operator==t.right.operator&&(t.left.is_string(a)&&t.right.is_string(a)||t.right.left.is_string(a)&&(t.left.is_constant()||!t.right.right.has_side_effects(a)))&&aa(t,a)}if(a.option("evaluate")){var u=!0;switch(t.operator){case"&&":if(!(d=Lo(a,t.left)))return ye.warn("Condition left of && always false [{file}:{line},{col}]",t.start),Nr(0,s,a.self(),t.left).optimize(a);if(!(d instanceof ye))return ye.warn("Condition left of && always true [{file}:{line},{col}]",t.start),Le(t,[t.left,t.right]).optimize(a);if(t.right.evaluate(a,!0)){if((o||"&&"==s.operator&&s.left===a.self())&&!(t.right.evaluate(a)instanceof ye))return ye.warn("Dropping side-effect-free && [{file}:{line},{col}]",t.start),t.left.optimize(a)}else{if(o&&!(t.right.evaluate(a)instanceof ye))return ye.warn("Boolean && always false [{file}:{line},{col}]",t.start),Le(t,[t.left,Re(Nt,t)]).optimize(a);t.falsy=!0}if("||"==t.left.operator)if(!(p=Lo(a,t.left.right)))return Re(Me,t,{condition:t.left.left,consequent:t.right,alternative:t.left.right}).optimize(a);break;case"??":var l=!0;case"||":var p,d=Lo(a,t.left,l);if(l?null==d:!d)return ye.warn("Condition left of {operator} always {value} [{file}:{line},{col}]",{operator:t.operator,value:l?"nulish":"false",file:t.start.file,line:t.start.line,col:t.start.col}),Le(t,[t.left,t.right]).optimize(a);if(!(d instanceof ye))return ye.warn("Condition left of {operator} always {value} [{file}:{line},{col}]",{operator:t.operator,value:l?"defined":"true",file:t.start.file,line:t.start.line,col:t.start.col}),Nr(0,s,a.self(),t.left).optimize(a);if(l||!(d=t.right.evaluate(a,!0))||d instanceof ye){if((o||"||"==s.operator&&s.left===a.self())&&!t.right.evaluate(a))return ye.warn("Dropping side-effect-free {operator} [{file}:{line},{col}]",{operator:t.operator,file:t.start.file,line:t.start.line,col:t.start.col}),t.left.optimize(a)}else{if(o&&!(t.right.evaluate(a)instanceof ye))return ye.warn("Boolean || always true [{file}:{line},{col}]",t.start),Le(t,[t.left,Re(It,t)]).optimize(a);t.truthy=!0}if(!l&&"&&"==t.left.operator)if((p=Lo(a,t.left.right))&&!(p instanceof ye))return Re(Me,t,{condition:t.left.left,consequent:t.left.right,alternative:t.right}).optimize(a);break;case"+":if((t=(t=t.left instanceof $&&t.right instanceof Ce&&"+"==t.right.operator&&t.right.left instanceof $&&t.right.is_string(a)?Re(Ce,t,{operator:"+",left:Re(fe,t.left,{value:""+t.left.value+t.right.left.value,start:t.left.start,end:t.right.left.end}),right:t.right.right}):t).right instanceof $&&t.left instanceof Ce&&"+"==t.left.operator&&t.left.right instanceof $&&t.left.is_string(a)?Re(Ce,t,{operator:"+",left:t.left.left,right:Re(fe,t.right,{value:""+t.left.right.value+t.right.value,start:t.left.right.start,end:t.right.end})}):t).right instanceof ze&&"-"==t.right.operator&&t.left.is_number(a)){t=Re(Ce,t,{operator:"-",left:t.left,right:t.right.expression});break}if(t.left instanceof ze&&"-"==t.left.operator&&y()&&t.right.is_number(a)){t=Re(Ce,t,{operator:"-",left:t.right,right:t.left.expression});break}if(a.option("unsafe_math")&&t.left instanceof Ce&&Xt[t.left.operator]==Xt[t.operator]&&t.right.is_constant()&&(t.right.is_boolean(a)||t.right.is_number(a))&&t.left.is_number(a)&&!t.left.right.is_constant()&&(t.left.left.is_boolean(a)||t.left.left.is_number(a))){t=Re(Ce,t,{operator:t.left.operator,left:Re(Ce,t,{operator:t.operator,left:t.right,right:t.left.left}),right:t.left.right});break}case"-":if(t.right instanceof ze&&"-"==t.right.operator&&t.left.is_number(a)&&t.right.expression.is_number(a)){t=Re(Ce,t,{operator:"+",left:t.left,right:t.right.expression});break}case"*":case"/":u=a.option("unsafe_math"),"+"!=t.operator&&["left","right"].forEach(function(e){var n=t[e];n instanceof ze&&"+"==n.operator&&(((n=n.expression).is_boolean(a)||n.is_number(a)||n.is_string(a))&&(t[e]=n))});case"&":case"|":case"^":if("-"==t.operator||"/"==t.operator||!t.left.is_boolean(a)&&!t.left.is_number(a)||!t.right.is_boolean(a)&&!t.right.is_number(a)||!y()||t.left instanceof Ce&&t.left.operator!=t.operator&&Xt[t.left.operator]>=Xt[t.operator]||(d=Re(Ce,t,{operator:t.operator,left:t.right,right:t.left}),t=t.right instanceof $&&!(t.left instanceof $)?fo(a,d,t):fo(a,t,d)),!u||!t.is_number(a))break;!(t.right instanceof Ce&&"%"!=t.right.operator&&Xt[t.right.operator]==Xt[t.operator]&&t.right.is_number(a)&&("+"!=t.operator||t.right.left.is_boolean(a)||t.right.left.is_number(a)))||"-"==t.operator&&t.left.is_negative_zero()||!t.right.left.is_constant_expression()&&t.right.right.has_side_effects(a)||(l=t.right.right,r=!1,l.walk(new Ye(function(e){if(r)return!0;if(e instanceof Fe){if(e.left instanceof $e)return r=!0}else if(e instanceof et&&ni[e.operator]&&e.expression instanceof $e)return r=!0})),r)||"+"!=(t=Re(Ce,t,{operator:_(t.operator,t.right.operator),left:Re(Ce,t.left,{operator:t.operator,left:t.left,right:t.right.left,start:t.left.start,end:t.right.left.end}),right:t.right.right})).operator||t.right.is_boolean(a)||t.right.is_number(a)||(t.right=Re(ze,t.right,{operator:"+",expression:t.right})),t.right instanceof $&&t.left instanceof Ce&&"%"!=t.left.operator&&Xt[t.left.operator]==Xt[t.operator]&&t.left.is_number(a)&&(t.left.left instanceof $?(f=g(t.left,t.operator,t.left.left,t.right,t.left.left.start,t.right.end),t=g(t,t.left.operator,po(a,f),t.left.right)):t.left.right instanceof $&&(p=_(t.left.operator,t.operator),!(d=po(a,g(t.left,p,t.left.right,t.right))).is_constant()||"-"==t.left.operator&&0!=t.right.value&&0==+d.value&&t.left.left.is_negative_zero()||(t=g(t,t.left.operator,t.left.left,d))))}if(!(s instanceof ze&&"delete"==s.operator)){if(t.left instanceof He&&!t.right.is_constant())switch(t.operator){case"+":if(0==t.left.value){if(t.right.is_boolean(a))return Re(ze,t,{operator:"+",expression:t.right}).optimize(a);if(t.right.is_number(a)&&!t.right.is_negative_zero())return t.right}break;case"*":if(1==t.left.value)return Re(ze,t,{operator:"+",expression:t.right}).optimize(a)}if(t.right instanceof He&&!t.left.is_constant())switch(t.operator){case"+":if(0==t.right.value){if(t.left.is_boolean(a))return Re(ze,t,{operator:"+",expression:t.left}).optimize(a);if(t.left.is_number(a)&&!t.left.is_negative_zero())return t.left}break;case"-":if(0==t.right.value)return Re(ze,t,{operator:"+",expression:t.left}).optimize(a);break;case"/":if(1==t.right.value)return Re(ze,t,{operator:"+",expression:t.left}).optimize(a)}}}if(a.option("typeofs"))switch(t.operator){case"&&":Ro(t.left,t.right,null);break;case"||":Ro(t.left,null,t.right)}if(a.option("unsafe")){var h=b(t.right);if(o&&h&&("=="==t.operator||"!="==t.operator)&&t.left instanceof He&&0==t.left.value)return("=="==t.operator?Re(ze,t,{operator:"!",expression:t.right}):t.right).optimize(a);var v=b(t.left);if(a.option("comparisons")&&function(){switch(t.operator){case"<=":return h&&t.left instanceof He&&0==t.left.value;case"<":if(v&&t.right instanceof He&&0==t.right.value)return 1;case"==":case"!=":return h?t.left instanceof He&&-1==t.left.value||t.left instanceof ze&&"-"==t.left.operator&&t.left.expression instanceof He&&1==t.left.expression.value:void 0}}()){var m=Re(ze,t,{operator:"!",expression:Re(ze,t,{operator:"~",expression:v?t.left:t.right})});switch(t.operator){case"<":if(v)break;case"<=":case"!=":m=Re(ze,t,{operator:"!",expression:m})}return m.optimize(a)}}return po(a,t);function _(e,n){switch(e){case"-":return"+"==n?"-":"+";case"/":return"*"==n?"/":"*";default:return n}}function g(e,n,t,i,r,o){return"+"==n&&(t.is_boolean(a)||t.is_number(a)||(t=Re(ze,t,{operator:"+",expression:t})),i.is_boolean(a)||i.is_number(a)||(i=Re(ze,i,{operator:"+",expression:i}))),Re(Ce,e,{operator:n,left:t,right:i,start:r,end:o})}function b(e){return"Call"==e.TYPE&&e.expression instanceof Qn&&Ni[e.expression.property]}function y(){return t.left.is_constant()||t.right.is_constant()||!t.left.has_side_effects(a)&&!t.right.has_side_effects(a)}function w(e){y()&&(e&&(t.operator=e),e=t.left,t.left=t.right,t.right=e)}}),n(St,function(e){return e}),n(Ie,function(t,e){if(!e.option("ie")&&Gr(t)&&(!t.scope.resolve().uses_with||!e.find_parent(on)))switch(t.name){case"undefined":return Re(Ft,t).optimize(e);case"NaN":return Re(z,t).optimize(e);case"Infinity":return Re(jt,t).optimize(e)}var n=e.parent();if(e.option("reduce_vars")&&ti(e.self(),n)!==e.self()){var i,r,o,a,s,f,c,u,l,p=t.definition(),d=t.fixed_value(),n=p.single_use&&!(n instanceof De&&n.is_expr_pure(e));if(n)if(Qi(d)){if(p.scope===t.scope.resolve()&&!p.in_loop||e.option("reduce_funcs")&&1!=p.escaped.depth&&!d.inlined)if(sa(e,p,d))n=!1;else if(d.name&&d.name.definition()!==p)n=!1;else if(d.parent_scope!==t.scope||ei(p)){if("f"==(n=d.is_constant_expression(t.scope)))for(var h=t.scope;(h instanceof Q||h instanceof fn)&&(h.inlined=!0),h=h.parent_scope;);}else(d.name&&("await"==d.name.name&&un(d)||"yield"==d.name.name&&ln(d))||d.has_side_effects(e)||e.option("ie")&&d instanceof wn)&&(n=!1);else n=!1;n&&(d.parent_scope=t.scope)}else(!d||0<p.recursive_refs||!d.is_constant_expression()||d.drop_side_effect_free(e))&&(n=!1);if(n)return p.single_use=!1,d._squeezed=!0,d.single_use=!0,Qi(d=(d=d instanceof xn?$o(d):d)instanceof Q?qo(d):d)&&(h=t.scope.resolve(),d.enclosed.forEach(function(e){d.variables.has(e.name)||h.var_names().has(e.name)||(h.enclosed.push(e),h.var_names().set(e.name,!0))})),0<p.recursive_refs?(i=(l=d.clone(!0)).name.definition(),r=l.variables.get(l.name.name),o=r&&r.orig[0],n=l instanceof wn?(a="def_function",xt):(a="def_variable",yt),o instanceof n||(((o=Re(n,l.name,l.name)).scope=l).name=o,(r=l[a](o)).recursive_refs=p.recursive_refs),l.walk(new Ye(function(e){var n,t;e instanceof ht?e!==o&&((n=e.definition()).orig.push(e),n.eliminated++):e instanceof Ie&&((n=e.definition())===i?e.thedef=n=r:(n.single_use=!1,Qi(t=e.fixed_value())&&t.name&&t.name.definition()===n&&n.scope===t.name.scope&&d.variables.get(t.name.name)===n&&(t.name=t.name.clone(),e.thedef=n=l.variables.get(t.name.name)||l[a](t.name))),n.references.push(e))}))):(d instanceof ke?(e.push(d),l=d.optimize(e),e.pop()):l=d.optimize(e),l=l.transform(new Ht(function(e,n){return e instanceof ke||n(e=e.clone(),this),e}))),p.replaced++,l;if(d&&!1!==(s=t.fixed||p.fixed).should_replace)if(d instanceof Ot?ei(p)||!fa(p)||function(e){var n=t.scope;for(;n!==e.scope;){if(n instanceof wn)return 1;n=n.parent_scope}}(p)||(f=d):(n=d.evaluate(e,!0))!==d&&"function"!=typeof n&&(null===n||"object"!=typeof n||e.option("unsafe_regexp")&&n instanceof RegExp&&!p.cross_loop&&fa(p))&&(f=Pr(n,d)),f)if(void 0===s.should_replace&&(n=f.optimize(e).print_to_string().length,v(d)||(n=Math.min(n,d.print_to_string().length)),c=p.name.length,e.option("unused")&&!e.exposed(p)&&(u=p.references.length-p.replaced-p.assignments,u=Math.min(u,p.references.filter(function(e){return e.fixed===s}).length),c+=(c+2+n)/Math.max(1,u)),s.should_replace=n-Math.floor(c)<e.eval_threshold),s.should_replace)return v(d)?(l=f.optimize(e))===f&&(l=l.clone(!0)):(l=ao(f.optimize(e),d))!==f&&l!==d||(l=l.clone(!0)),p.replaced++,l}return t;function v(e){var n;return e.walk(new Ye(function(e){if(n=e instanceof Ie?!0:n)return!0})),n}}),n(qt,function(e,t){if(!t.option("templates"))return e;var i=e.tag;if(!i||ca(t,i)){for(var n,r=[],o=[],a=0;a<e.strings.length;a++){var s,f=e.strings[a];if(i||(s=ua(f))&&(f=d(s)),0<a){var c=e.expressions[a-1],u=function(e){var n=e.evaluate(t);if(n!==e&&!(i&&/\r|\\|`/.test(n)||(n=d(""+n)).length>e.print_to_string().length+"${}".length))return n}(c);if(u){var l,u=o[o.length-1]+u+f;if(i||typeof(l=ua(u))==n){o[o.length-1]=l?d(l):u;continue}}r.push(c)}o.push(f),i||(n=typeof s)}if(!i&&1<o.length){if(""==o[o.length-1])return Re(Ce,e,{operator:"+",left:Re(qt,e,{expressions:r.slice(0,-1),strings:o.slice(0,-1),tag:i}).transform(t),right:r[r.length-1]}).optimize(t);if(""==o[0]){for(var p=Re(Ce,e,{operator:"+",left:Re(fe,e,{value:""}),right:r[0]}),a=1;""==o[a]&&a<r.length;a++)p=Re(Ce,e,{operator:"+",left:p,right:r[a]});return fo(t,e,Re(Ce,e,{operator:"+",left:p.transform(t),right:Re(qt,e,{expressions:r.slice(a),strings:o.slice(a),tag:i}).transform(t)}).optimize(t))}}e.expressions=r,e.strings=o}return po(t,e);function d(e){return e.replace(/\r|\\|`|\${/g,function(e){return"\\"+("\r"==e?"r":e)})}}),n(Ft,function(e,n){if(n.option("unsafe_undefined")){var t=Mr(n).find_variable("undefined");if(t)return(t=Re(Ie,e,{name:"undefined",scope:t.scope,thedef:t})).is_undefined=!0,t}t=ti(n.self(),n.parent());return t&&la(t,e)?e:Re(ze,e,{operator:"void",expression:Re(He,e,{value:0})})}),n(jt,function(e,n){var t=ti(n.self(),n.parent());return(!t||!la(t,e))&&(!n.option("keep_infinity")||t||Mr(n).find_variable("Infinity"))?Re(Ce,e,{operator:"/",left:Re(He,e,{value:1}),right:Re(He,e,{value:0})}):e}),n(z,function(e,n){var t=ti(n.self(),n.parent());return(!t||!la(t,e))&&(t||Mr(n).find_variable("NaN"))?Re(Ce,e,{operator:"/",left:Re(He,e,{value:0}),right:Re(He,e,{value:0})}):e}),Hi=L("+ - * / % >> << >>> | ^ &"),Yi=L("* | ^ &"),n(Fe,function(o,a){if(a.option("dead_code"))if(o.left instanceof $e){if("="==o.operator){if(o.redundant)return e=[o.left.expression],o.left instanceof Zn&&e.push(o.left.property),e.push(o.right),Le(o,e).optimize(a);if(o.left.equivalent_to(o.right)&&!o.left.has_side_effects(a))return o.right;var e=o.left.expression;if(e instanceof Ee||!a.has_directive("use strict")&&e instanceof $&&!e.may_throw_on_access(a))return o.left instanceof Qn?o.right:Le(o,[o.left.property,o.right]).optimize(a)}}else if(o.left instanceof Ie&&tr(o.left,a)){if("="==o.operator&&o.left.equivalent_to(o.right)&&!((f=a.parent())instanceof ze&&"delete"==f.operator))return o.right;if(o.left.is_immutable())return d();var n,t=o.left.definition(),s=t.scope.resolve(),i=s===a.find_parent(Ee),r=0,f=a.self();if(!s.uses_arguments||!ei(t)||a.has_directive("use strict"))do{if(n=f,(f=a.parent(r++))instanceof Fe){if(f.left instanceof Ie&&f.left.definition()===t){if(p(r,f))break;return d(t)}if(f.left.match_symbol(function(e){if(e instanceof $e)return!0}))break}else{if(f instanceof On){if(!i)break;if(p(r,f))break;if(pa(s,[t]))break;return d(t)}if(f instanceof we){if(!i)break;if(pa(s,[t]))break;do{if(c=f,(f=a.parent(r++))===s&&Kr(f.body,c))return d(t)}while(c=c,(u=f)instanceof xe||u instanceof In||u instanceof Hn?Kr(u.body,c):u instanceof Se?u.body===c||u.alternative===c:u instanceof Nn?u.bfinally?u.bfinally===c:u.bcatch===c:void 0);break}if(f instanceof Te&&f.name instanceof ht&&f.name.definition()===t){if(p(r,f))break;return d(t)}}}while(function(e,n){if(n instanceof Ce)return n.right===e||n.right.is_constant_expression(s);if(n instanceof Me)return n.condition!==e||n.consequent.is_constant_expression(s)&&n.alternative.is_constant_expression(s);if(n instanceof Oe){var t=n.expressions,i=t.indexOf(e);if(i<0)return;for(var r=t.length;--r>i;)if(!t[r].is_constant_expression(s))return;return 1}if(n instanceof ze)return 1}(n,f))}var c,u,l;if(a.option("sequences")){var e=o.lift_sequences(a);if(e!==o)return e.optimize(a)}if(a.option("assignments")){if("="==o.operator&&o.left instanceof Ie&&o.right instanceof Ce){if((l=o.right.left)instanceof Ie&&l.name==o.left.name&&Hi[o.right.operator])return o.left.fixed&&(o.left.fixed.to_binary=function(){return l}),Re(Fe,o,{operator:o.right.operator+"=",left:o.left,right:o.right.right});if((l=o.right.right)instanceof Ie&&l.name==o.left.name&&Yi[o.right.operator]&&!o.right.left.has_side_effects(a))return o.left.fixed&&(o.left.fixed.to_binary=function(){return l}),Re(Fe,o,{operator:o.right.operator+"=",left:o.left,right:o.right.left})}if(("-="==o.operator||"+="==o.operator&&(o.left.is_boolean(a)||o.left.is_number(a)))&&o.right instanceof He&&1==o.right.value)return e=o.operator.slice(0,-1),Re(ze,o,{operator:e+e,expression:o.left})}return po(a,o);function p(e,n){var t,i=o.right,r=(o.right=Re(Mt,i),n.may_throw(a));for(o.right=i;t=a.parent(e++);n=t){if(t===s)return;if(t instanceof Nn){if(t.bfinally&&t.bfinally!==n)return 1;if(r&&t.bcatch&&t.bcatch!==n)return 1}}}function d(e){return e&&(e.fixed=!1),("="!=o.operator?Re(Ce,o,{operator:o.operator.slice(0,-1),left:o.left,right:o.right}):Nr(0,a.parent(),o,o.right)).optimize(a)}}),n(Me,function(r,n){if(n.option("sequences")&&r.condition instanceof Oe)return e=r.condition.expressions.slice(),r.condition=e.pop(),e.push(r),Le(r,e);if(!n.option("conditionals"))return r;var o=r.condition;if(n.option("booleans")&&!o.has_side_effects(n)&&Bo(n,o),!(o=Lo(n,o)))return ye.warn("Condition always false [{file}:{line},{col}]",r.start),Le(r,[r.condition,r.alternative]).optimize(n);if(!(o instanceof ye))return ye.warn("Condition always true [{file}:{line},{col}]",r.start),Le(r,[r.condition,r.consequent]).optimize(n);var e=o.negate(n,x(n)),t=(fo(n,o,e)===e&&(r=Re(Me,r,{condition:e,consequent:r.alternative,alternative:r.consequent}),e=o,o=r.condition),r.consequent),i=r.alternative;if(oa(n,o)){if(o.equivalent_to(t))return Re(Ce,r,{operator:"||",left:o,right:i}).optimize(n);if(o.equivalent_to(i))return Re(Ce,r,{operator:"&&",left:o,right:t}).optimize(n)}var a=t.tail_node();if(a instanceof Fe){var s="="==a.operator,f=s?i.tail_node():i;if((s||t===a)&&f instanceof Fe&&a.operator==f.operator&&a.left.equivalent_to(f.left)&&(s&&a.left instanceof Ie||!o.has_side_effects(n)&&v(t)&&v(i)))return Re(Fe,r,{operator:a.operator,left:a.left,right:Re(Me,r,{condition:o,consequent:m(t),alternative:m(i)})})}if(t.equivalent_to(i))return Le(r,[o,t]).optimize(n);var f=function e(n,t,i){if(!h(n,t))return!i&&Re(Me,r,{condition:o,consequent:n,alternative:t});i=n.clone();i.expression=e(n.expression,t.expression);return i}(t,i,!0);if(f)return f;if(t instanceof De&&i.TYPE==t.TYPE&&0<=(s=d(t,i))&&t.expression.equivalent_to(i.expression)&&!o.has_side_effects(n)&&!t.expression.has_side_effects(n))return a=t.clone(),f=t.args[s],a.args[s]=f instanceof qe?Re(qe,r,{expression:Re(Me,r,{condition:o,consequent:f.expression,alternative:i.args[s].expression})}):Re(Me,r,{condition:o,consequent:f,alternative:i.args[s]}),a;if(t instanceof Me&&t.alternative.equivalent_to(i))return Re(Me,r,{condition:Re(Ce,r,{left:o,operator:"&&",right:t.condition}),consequent:t.consequent,alternative:i});if(t instanceof Me&&t.consequent.equivalent_to(i))return Re(Me,r,{condition:Re(Ce,r,{left:e,operator:"||",right:t.condition}),consequent:i,alternative:t.alternative});if(i instanceof Me&&t.equivalent_to(i.consequent))return Re(Me,r,{condition:Re(Ce,r,{left:o,operator:"||",right:i.condition}),consequent:t,alternative:i.alternative});if(i instanceof Me&&t.equivalent_to(i.alternative))return Re(Me,r,{condition:Re(Ce,r,{left:e,operator:"&&",right:i.condition}),consequent:i.consequent,alternative:t});if((t instanceof Oe||i instanceof Oe)&&t.tail_node().equivalent_to(i.tail_node()))return Le(r,[Re(Me,r,{condition:o,consequent:_(t),alternative:_(i)}),t.tail_node()]).optimize(n);if(t instanceof Ce&&"&&"==t.operator&&t.right.equivalent_to(i))return Re(Ce,r,{operator:"&&",left:Re(Ce,r,{operator:"||",left:e,right:t.left}),right:i}).optimize(n);if(t instanceof Ce&&"||"==t.operator&&t.right.equivalent_to(i))return Re(Ce,r,{operator:"||",left:Re(Ce,r,{operator:"&&",left:o,right:t.left}),right:i}).optimize(n);if(i instanceof Ce&&"&&"==i.operator&&i.right.equivalent_to(t))return Re(Ce,r,{operator:"&&",left:Re(Ce,r,{operator:"||",left:o,right:i.left}),right:t}).optimize(n);if(i instanceof Ce&&"||"==i.operator&&i.right.equivalent_to(t))return Re(Ce,r,{operator:"||",left:Re(Ce,r,{operator:"&&",left:e,right:i.left}),right:t}).optimize(n);var c=n.option("booleans")&&n.in_boolean_context();return l(t)?p(i)?u(o):Re(Ce,r,{operator:"||",left:u(o),right:i}):p(t)?l(i)?u(o.negate(n)):Re(Ce,r,{operator:"&&",left:u(o.negate(n)),right:i}):l(i)?Re(Ce,r,{operator:"||",left:u(o.negate(n)),right:t}):p(i)?Re(Ce,r,{operator:"&&",left:u(o),right:t}):(n.option("typeofs")&&Ro(o,t,i),r);function u(e){return e.is_boolean(n)?e:Re(ze,e,{operator:"!",expression:e.negate(n)})}function l(e){return e instanceof It||c&&e instanceof $&&e.value||e instanceof ze&&"!"==e.operator&&e.expression instanceof $&&!e.expression.value}function p(e){return e instanceof Nt||c&&(e instanceof $&&!e.value||e instanceof ze&&"void"==e.operator&&!e.expression.has_side_effects(n))||e instanceof ze&&"!"==e.operator&&e.expression instanceof $&&e.expression.value}function d(e,n){var t=e.args,i=n.args,r=t.length;if(r!=i.length)return-2;for(var o=0;o<r;o++)if(!t[o].equivalent_to(i[o])){if(t[o]instanceof qe!=i[o]instanceof qe)return-3;for(var a=o+1;a<r;a++)if(!t[a].equivalent_to(i[a]))return-2;return o}return-1}function h(e,n){var t,i;if(e.TYPE==n.TYPE&&e.optional==n.optional)return e instanceof De?-1!=d(e,n)?void 0:"Call"!=e.TYPE||!(e.expression instanceof $e||n.expression instanceof $e)||h(e.expression,n.expression):e instanceof $e?(t=e.property,i=n.property,(t instanceof ye?t.equivalent_to(i):t==i)&&!(e.expression instanceof Dt||n.expression instanceof Dt)):void 0}function v(e){return e===e.tail_node()||ge(e.expressions.slice(0,-1),function(e){return!e.has_side_effects(n)})}function m(e){if(!(e instanceof Oe))return e.right;var n=e.expressions.slice();return n.push(n.pop().right),Le(e,n)}function _(e){return e instanceof Oe?Le(e,e.expressions.slice(0,-1)):Re(He,e,{value:0})}}),n(C,function(e,n){if(!n.option("booleans"))return e;if(n.in_boolean_context())return Re(He,e,{value:+e.value});n=n.parent();return n instanceof Ce&&("=="==n.operator||"!="==n.operator)?(ye.warn("Non-strict equality against boolean: {operator} {value} [{file}:{line},{col}]",{operator:n.operator,value:e.value,file:n.start.file,line:n.start.line,col:n.start.col}),Re(He,e,{value:+e.value})):Re(ze,e,{operator:"!",expression:Re(He,e,{value:1-e.value})})}),n(qe,function(e,n){var t=e.expression;return n.option("spreads")&&t instanceof Pe&&!(n.parent()instanceof st)?Ue.splice(t.elements.map(function(e){return e instanceof Pt?Re(Ft,e).optimize(n):e})):e}),n(Zn,function(e,t){var n=e.expression,i=e.property,r=Ko(e,t);if(r)return r;if(t.option("properties")){var o=i.evaluate(t);if(o!==i){"string"==typeof o&&("undefined"==o?o=void 0:(v=parseFloat(o)).toString()==o&&(o=v)),i=e.property=ao(i,Pr(o,i).transform(t));var a=""+o;if(Lt(a)&&a.length<=i.print_to_string().length+1)return Re(Qn,e,{optional:e.optional,expression:n,property:a}).optimize(t)}}var s,f,c,u,r=t.parent(),l=ti(t.self(),r);if(t.option("arguments")&&n instanceof Ie&&er(s=n.definition())&&!n.in_arg&&i instanceof He&&Math.floor(h=i.value)==h&&(f=s.scope)===function(){var e,n=0;for(;e=t.parent(n++);)if(e instanceof Ee){if(e instanceof sn)return;if(!cn(e))return c=t.parent(n),e}}()&&f.uses_arguments<(l?2:3)){r instanceof ze&&"delete"==r.operator&&(s.deleted||(s.deleted=[]),s.deleted[h]=!0);var p=f.argnames[h];if(s.deleted&&s.deleted[h])p=null;else if(p)(!(p instanceof Ne&&"await"!=p.name&&n.scope.find_variable(p.name)===(d=p.definition()))||(t.has_directive("use strict")||f.name||f.rest||!(c instanceof De&&h<c.args.length&&ge(c.args.slice(0,h+1),function(e){return!(e instanceof qe)}))||!ge(f.argnames,function(e){return e instanceof Ne}))&&(y()||d.assignments||1<d.orig.length))&&(p=null);else if((l||!y())&&h<f.argnames.length+5&&t.drop_fargs(f,c)&&!f.rest)for(;h>=f.argnames.length;)p=f.make_var(Ne,f,"argument_"+f.argnames.length),f.argnames.push(p);if(p&&ce(function(e){return e.name===p.name},f.argnames)===p)return l&&s.reassigned--,(d=Re(Ie,e,p)).reference(),p.unused=void 0,d}if(l)return e;if(t.option("sequences")&&"Call"!=r.TYPE&&!(r instanceof tn&&r.init===e)){var d=Qo(e);if(d!==e)return d.optimize(t)}if(o===i||(l=e.flatten_object(a,t))&&(n=e.expression=l.expression,i=e.property=l.property),t.option("properties")&&t.option("side_effects")&&i instanceof He&&n instanceof Pe&&ge(u=n.elements,function(e){return!(e instanceof qe)})){var h,r=u[h=i.value];if(da(r,t)){for(var v,m=r instanceof Pt,_=!m,g=[],b=u.length;--b>h;)(v=u[b].drop_side_effect_free(t))&&(g.unshift(v),_&&v.has_side_effects(t)&&(_=!1));for(_||g.unshift(r);0<=--b;)(v=u[b].drop_side_effect_free(t))?g.unshift(v):m?g.unshift(Re(Pt,u[b])):h--;return _?(g.push(r),Le(e,g).optimize(t)):Re(Zn,e,{expression:Re(Pe,n,{elements:g}),property:Re(He,i,{value:h})})}}return po(t,e);function y(){return!t.option("reduce_vars")||s.reassigned}}),fn.DEFMETHOD("contains_super",function(){var n=!1,t=this;return t.walk(new Ye(function(e){return!!n||(e instanceof Dt?n=!0:e!==t&&e instanceof ke&&!cn(e)||void 0)})),n}),(t=function(e,n){e.DEFMETHOD("contains_this",n)})(me,_e),t(pn,_e),t(ye,function(){var n=!1,t=this;return t.walk(new Ye(function(e){return!!n||(e instanceof Ot?n=!0:e!==t&&e instanceof ke&&!cn(e)||void 0)})),n}),$e.DEFMETHOD("flatten_object",function(e,n){if(n.option("properties")&&"__proto__"!==e){var t=this.expression;if(t instanceof st)for(var i=t.properties,r=i.length;0<=--r;){var o=i[r];if(o.key===e){if(!ge(i,ha))return;if(!da(o.value,n))return;for(var a,s=[],f=0;f<i.length;f++){var c=i[f].value;if(i[f]instanceof ut){var u,l,p,d=!(c.uses_arguments||ln(c)||c.contains_this());if(d&&(l=ea(u=u||n.find_parent(ke)),c.each_argname(function(e){l[e.name]&&(d=!1)})),d)p=un(c)?pn:me;else{if(!(r!=f||(a=n.parent())instanceof De&&a.expression===this))return;p=c.CTOR}c=Re(p,c,c)}s.push(c)}return Re(Zn,this,{expression:Re(Pe,t,{elements:s}),property:Re(He,this,{value:r})})}}}}),n(Qn,function(e,n){"arguments"!=e.property&&"caller"!=e.property||ye.warn("Function.prototype.{prop} not supported [{file}:{line},{col}]",{prop:e.property,file:e.start.file,line:e.start.line,col:e.start.col});var t=n.parent();if(ti(n.self(),t))return e;var i=Ko(e,n);if(i)return i;if(n.option("sequences")&&"Call"!=t.TYPE&&!(t instanceof tn&&t.init===e)){i=Qo(e);if(i!==e)return i.optimize(n)}if(n.option("unsafe_proto")&&e.expression instanceof Qn&&"prototype"==e.expression.property){var r=e.expression.expression;if(Gr(r))switch(r.name){case"Array":e.expression=Re(Pe,e.expression,{elements:[]});break;case"Function":e.expression=Re(vn,e.expression,{argnames:[],body:[]}).init_vars(r.scope);break;case"Number":e.expression=Re(He,e.expression,{value:0});break;case"Object":e.expression=Re(st,e.expression,{properties:[]});break;case"RegExp":e.expression=Re(Ct,e.expression,{value:/t/});break;case"String":e.expression=Re(fe,e.expression,{value:""})}}t=e.flatten_object(e.property,n);return t?t.optimize(n):po(n,e)}),n(rt,function(e,n){return n.option("rests")&&e.rest instanceof rt?Re(rt,e,{elements:e.elements.concat(e.rest.elements),rest:e.rest.rest}):e}),n(ot,function(e,n){var t;return n.option("objects")&&(t=e.key)instanceof ye&&(t=t.evaluate(n))!==e.key&&(e.key=""+t),e}),n(st,function(t,i){if(!i.option("objects"))return t;var e,r=!1,o=!1,a=!1,s=i.has_directive("use strict"),f=[],c=new be,u=[];return t.properties.forEach(function(e){if(!(e instanceof qe))return p(e);o=!0;var n=e.expression;i.option("spreads")&&n instanceof st&&ge(n.properties,function(e){return!(e instanceof pt)&&(!(e instanceof qe)&&("__proto__"!==e.key||(e instanceof lt||!e.value.has_side_effects(i))))})?(r=!0,n.properties.forEach(function(e){var n=e.key,t=e instanceof lt;if("__proto__"===n){if(!t)return;n=Pr(n,e)}p(t?Re(ct,e,{key:n,value:Re(Ft,e).optimize(i)}):e)})):(a=!0,l(),u.push(e))}),l(),r?(o&&a&&1==u.length&&((e=u[0])instanceof ft&&e.key instanceof He&&(e.key=""+e.key.value)),Re(st,t,{properties:u})):t;function l(){f.forEach(function(e){var n=c.get(e);switch(n.length){case 0:return;case 1:return u.push(n[0])}r=!0;e=s&&!a&&n.pop();u.push(1==n.length?n[0]:Re(ct,t,{key:n[0].key,value:Le(t,n.map(function(e){return e.value}))})),e&&u.push(e),n.length=0}),f=[],c=new be}function p(e){var n=e.key;n instanceof ye&&(o=!0,(n=n.evaluate(i))===e.key||"__proto__"===n?a=!0:n=e.key=""+n),ha(e)?(e.value.has_side_effects(i)&&l(),f.push(n),c.add(n,e)):(l(),u.push(e)),o&&!a&&"string"==typeof n&&pi.test(n)&&(a=!0,(e=c.has(n)?c.get(n)[0]:e).key=Re(He,e,{value:+n}))}}),(t=function(e,n){e.DEFMETHOD("try_inline",n)})(ye,X),t(Fe,X),t(tt,function(t,e,i,n){var r=this,e=function(e){if(!i)return e;if("Call"!=e.TYPE)return e;var n=e.expression;switch(n.CTOR){case pn:n=Re(me,n,n);break;case dn:n=Re(vn,n,n);break;case hn:n=Re(mn,n,n);break;default:return e}return(e=e.clone()).expression=n,e}(r.expression).try_inline(t,e,i,n);if(e)return i||zo(e,function(e){e.in_bool=!1;var n=e.value;n instanceof tt||(e.value=Re(tt,r,{expression:n||Re(Ft,e).transform(t)}))}),Eo(e)?e:Re(xe,r,{body:[e,Re(we,r,{body:Re(tt,r,{expression:Re(He,r,{value:0})})})]})}),t(Ce,function(n,e,t,i){if(void 0!==t){var r=this,o=r.operator;if(xi[o]){e=r.right.try_inline(n,e,t,i);if(e)return Re(Se,r,{condition:function(e){switch(o){case"&&":return e;case"||":return e.negate(n);case"??":return Re(Ce,r,{operator:"==",left:Re(Mt,r),right:e})}}(r.left),body:e,alternative:t?null:Re($n,r,{value:null})})}}}),t(xe,function(e,n,t,i){if(!t&&this.variables){var r=this.body,o=r.length-1;if(!(o<0)){e=r[o].try_inline(e,this,t,i);if(e)return r[o]=e,this}}}),t(De,function(t,i,e,r){if(!(t.option("inline")<4)){var o=this;if(!o.is_expr_pure(t)){var a=o.expression;if(a instanceof fn&&!(a.name||a.uses_arguments||a.pinned()||ln(a))){var s=cn(a);if(!(s&&a.value||a.body[0]instanceof pe||a.contains_this()||Cr(i=i||Mr(t)))){var f=new be;for(f.set("NaN",!0);!(i instanceof ke);)i.variables.each(function(e){f.set(e.name,!0)}),i=i.parent_scope;if(Be(i,t.stack)&&!(i.pinned()&&a.variables.size()>(s?0:1))){if(i instanceof an){if(a.variables.size()>(s?0:1)){if(!t.toplevel.vars)return;if(0<a.functions.size()&&!t.toplevel.funcs)return}f.set("arguments",!0)}var c=un(a);if(c){if(!t.option("awaits"))return;if(!un(i))return;if(o.may_throw(t))return}var u=i.var_names();if(r=r&&[],a.variables.all(function(e,n){return r&&r.push(e),!f.has(n)&&!u.has(n)||!s&&"arguments"==n&&1==e.orig.length})&&!(r&&0<r.length&&pa(a,r))){var l,p,d,h,n,v=!0;if(ge(a.argnames,function(e){var n=!1,t=new Ye(function(e){return!!n||(e instanceof Ae?ma(a,e.value)?n=!0:(e.name.walk(t),!0):e instanceof ot?e.key instanceof ye&&ma(a,e.key)?n=!0:(e.value.walk(t),!0):e instanceof Ne&&!ge(e.definition().orig,function(e){return!(e instanceof bt)})?n=!0:void 0)});return e.walk(t),!n&&(e instanceof Ne||(v=!1),1)})){if(a.rest){if(ma(a,a.rest))return;v=!1}if(!e||ge(a.body,function(e){var n=!1;return e.walk(new Ye(function(e){return!!n||(c&&e instanceof tt||e instanceof $n?n=!0:e instanceof ke&&e!==a||void 0)})),!n}))if(na(a,ea(i)))return a.functions.each(function(e,n){i.functions.set(n,e)}),l=[],a.variables.each(function(n,e){"arguments"!=e&&(u.set(e,!0),i.enclosed.push(n),i.variables.set(e,n),n.single_use=!1,!r||n.references.length==n.replaced||n.orig.length==n.eliminated||1==n.orig.length&&a.functions.has(e)||!ge(n.orig,function(e){return!(e instanceof vt)&&(e instanceof Ne?n.scope.resolve()!==a:!(e instanceof _t))})||(e=n.orig[0])instanceof kt||l.push(Re(we,e,{body:ga(t,va(e))})))}),p=Object.create(null),d=new be,v&&ge(o.args,function(e){return!(e instanceof qe)})?(h=o.args.slice(),a.argnames.forEach(function(e){var n=h.shift();e.unused?n&&l.push(Re(we,o,{body:n})):(n=Re(Te,o,{name:e.convert_symbol(gt,m),value:n||Re(Ft,o).transform(t)}),e instanceof Ne&&_a(e.definition(),n),l.push(Re(Bn,o,{definitions:[n]})))}),h.length&&l.push(Re(we,o,{body:Le(o,h)}))):l.push(Re(Bn,o,{definitions:[Re(Te,o,{name:Re(rt,o,{elements:a.argnames.map(function(e){return e.unused?Re(Pt,e):e.convert_symbol(gt,m)}),rest:a.rest&&a.rest.convert_symbol(gt,m)}),value:Re(Pe,o,{elements:o.args.slice()})})]})),d.each(function(e,n){n=p[n];[].unshift.apply(n.orig,e),n.eliminated+=e.length}),[].push.apply(l,r?a.body.filter(function(e){if(!(e instanceof Q))return!0;var n=Re(gt,e.name,va(e.name)),t=n.definition();return t.fixed=!1,t.orig.push(n),t.eliminated++,l.push(Re(Bn,e,{definitions:[Re(Te,e,{name:n,value:qo(e,!0)})]})),!1}):a.body),n=Re(xe,o,{body:l}),e||(c&&zo(n,function(e){var n=e.value;no(n)||(e.value=Re(tt,o,{expression:n}))}),l.push(Re($n,o,{value:null}))),n}}}}}}}function m(e,n){n=n.definition();p[n.id]=n,d.add(n.id,e)}}),t(Me,function(e,n,t,i){var r=this.consequent.try_inline(e,n,t,i),e=this.alternative.try_inline(e,n,t,i);if(r||e)return Re(Se,this,{condition:this.condition,body:r||o(this.consequent),alternative:e||o(this.alternative)});function o(e){return t?Re(we,e,{body:e}):Re($n,e,{value:e})}}),t(nn,function(e,n,t,i){var r=this.body.try_inline(e,n,!0,!0),o=(r&&(this.body=r),this.init);return(o=o&&o.try_inline(e,n,!0,i))?(this.init=null,o instanceof xe?(o.body.push(this),o):Re(xe,o,{body:[o,this]})):r&&this}),t(tn,function(e,n,t,i){var r=this.body.try_inline(e,n,!0,!0),o=(r&&(this.body=r),this.object);if(o instanceof Oe){e=ba(e,n,!0,i,o,1);if(e)return this.object=o.tail_node(),e.body.push(this),e}return r&&this}),t(Se,function(e,n,t,i){var r=this.body.try_inline(e,n,t,i),o=(r&&(this.body=r),this.alternative),t=((o=o&&o.try_inline(e,n,t,i))&&(this.alternative=o),this.condition);if(t instanceof Oe){e=ba(e,n,!0,i,t,1);if(e)return this.condition=t.tail_node(),e.body.push(this),e}return(r||o)&&this}),t(Ke,function(e,n,t,i){e=this.body.try_inline(e,n,!0,!0);if(e)return this.body=e,this}),t(de,function(e,n,t,i){e=this.body.try_inline(e,n,t,i);if(e)return this.body instanceof Ke&&e instanceof xe?(n=e.body.pop(),this.body=n,e.body.push(this),e):(this.body=e,this)}),t(Xn,X),t($n,function(e,n,t,i){var r=this.value;return r&&r.try_inline(e,n,void 0,"try"===i)}),t(Oe,function(e,n,t,i){return ba(e,n,t,i,this)}),t(we,function(e,n,t,i){for(var r=this.body;r instanceof ze;){var o=r.operator;if(ni[o])break;if("void"==o)break;r=r.expression}return(r=t||no(r)?r:Re(ze,this,{operator:"void",expression:r})).try_inline(e,n,t||!1,i)}),t(ze,function(t,e,n,i){var r=this,o=r.operator;if(!ni[o]){e=r.expression.try_inline(t,e,n=n||"void"!=o?n:!1,i);if(e)return n||zo(e,function(e){e.in_bool=!1;var n=e.value;"void"==o&&no(n)||(e.value=Re(ze,r,{operator:o,expression:n||Re(Ft,e).transform(t)}))}),e}}),t(on,function(e,n,t,i){var t=this.body.try_inline(e,n,t,i),r=(t&&(this.body=t),this.expression);if(r instanceof Oe){e=ba(e,n,!0,i,r,1);if(e)return this.expression=r.tail_node(),e.body.push(this),e}return t&&this}),t(it,function(e,n,t,i){if(e.option("yields")&&this.nested){var r=this.expression;if("Call"==r.TYPE){var o=r.expression;switch(o.CTOR){case hn:o=Re(dn,o,o);break;case mn:o=Re(vn,o,o);break;default:return}return(r=r.clone()).expression=o,r.try_inline(e,n,t,i)}}}),n($n,function(e,n){var t=e.value;return t&&n.option("side_effects")&&no(t,n)&&!Cr(n.find_parent(ke))&&(e.value=null),e}),Ri=!1,ye.DEFMETHOD("print",function(e,n){var t=this;function i(){e.prepend_comments(t),t.add_source_map(e),t._codegen(e),e.append_comments(t)}e.push_node(t),n||t.needs_parens(e)?e.with_parens(i):i(),e.pop_node()}),Li=wa({inline_script:!1,shebang:!1,width:!1}),ye.DEFMETHOD("print_to_string",function(e){return e?(e=wa(e),this.print(e),e.get()):(this.print(Li),Li.reset())}),xa(ye,_e),xa(dn,ka),xa(hn,ka),xa(kn,ka),xa(vn,ka),xa(mn,ka),xa(st,Ea),xa(tt,Sa),xa(et,Sa),xa(Oe,function(e){e=e.parent();return e instanceof Pe||cn(e)&&e.value===this||e instanceof tt||e instanceof Ce||e instanceof De||e instanceof wn||e instanceof En||e instanceof Me||e instanceof Ae||e instanceof ot||e instanceof Vn||e instanceof he||e instanceof ft||e instanceof $e&&e.expression===this||e instanceof qe||e instanceof qt&&e.tag===this||e instanceof et||e instanceof Te||e instanceof it}),xa(Ce,function(e){var n,t,i,r,e=e.parent();return e instanceof tt||(e instanceof Ce?(n=e.operator,t=Xt[n],i=this.operator,(r=Xt[i])<t||"??"==n&&("&&"==i||"||"==i)||t==r&&this===e["**"==n?"left":"right"]):e instanceof De?e.expression===this:e instanceof wn||(e instanceof $e?e.expression===this:e instanceof qt?e.tag===this:e instanceof et||void 0))}),xa($e,function(e){e=e.parent();return e instanceof Xn&&e.expression===this&&"Call"==Kn(this).TYPE||Ta(this,e)}),xa(De,function(e){var n=e.parent();if(n instanceof Xn)return n.expression===this;if(e.option("webkit")&&this.expression instanceof vn&&n instanceof $e&&n.expression===this){e=e.parent(1);if(e instanceof Fe&&e.left===n)return!0}return Ta(this,n)}),xa(Xn,function(e){if(Xa(this,e))return!1;e=e.parent();return e instanceof De?e.expression===this:e instanceof $e||(e instanceof qt?e.tag===this:void 0)}),xa(He,function(e){if(!e.option("galio"))return!1;e=e.parent();return e instanceof $e&&e.expression===this&&/^0/.test(Ka(this.value))}),xa(me,function(e){return Aa(this,e)}),xa(Fe,function(e){return!!Aa(this,e)||(e.option("v8")?this.left instanceof je:this.left instanceof at?Ea(e):void 0)}),xa(pn,function(e){return Aa(this,e)}),xa(Me,function(e){return Aa(this,e)}),xa(it,function(e){return Aa(this,e)}),i(pe,function(e){var n=this.quote,t=this.value;switch(e.option("quote_style")){case 0:case 2:-1==t.indexOf('"')&&(n='"');break;case 1:-1==t.indexOf("'")&&(n="'")}e.print(n+t+n),e.semicolon()}),i(Ve,function(e){e.print("debugger"),e.semicolon()}),i(an,function(e){Da(this.body,!0,e,!0),e.print("")}),i(de,function(e){this.label.print(e),e.colon(),this.body.print(e)}),i(we,function(e){this.body.print(e),e.semicolon()}),i(xe,function(e){$a(this,e)}),i(We,function(e){e.semicolon()}),i(Ze,function(e){var n=this;e.print("do"),Qa(n.body,e),e.space(),e.print("while"),e.space(),e.with_parens(function(){n.condition.print(e)}),e.semicolon()}),i(en,function(e){var n=this;e.print("while"),e.space(),e.with_parens(function(){n.condition.print(e)}),Ja(n.body,e)}),i(nn,function(e){var n=this;e.print("for"),e.space(),e.with_parens(function(){n.init?(n.init instanceof Yn?n.init.print(e):Ra(n.init,e,!0),e.print(";"),e.space()):e.print(";"),n.condition?(n.condition.print(e),e.print(";"),e.space()):e.print(";"),n.step&&n.step.print(e)}),Ja(n.body,e)}),i(ve,qa("for await","of")),i(rn,qa("for","in")),i(he,qa("for","of")),i(on,function(e){var n=this;e.print("with"),e.space(),e.with_parens(function(){n.expression.print(e)}),Ja(n.body,e)}),i(Un,function(e){e.print("export"),e.space(),this.body.print(e)}),i(Vn,function(e){e.print("export"),e.space(),e.print("default"),e.space();var n=this.body;n.print(e),n instanceof kn&&!n.name||n instanceof xn||n instanceof Q||n instanceof fn&&!n.name&&!cn(n)||e.semicolon()}),i(Wn,function(t){var i=this,n=(t.print("export"),t.space(),i.keys.length);function r(e){var n=i.aliases[e],e=i.keys[e];t.print_name(e),n!=e&&(t.space(),t.print("as"),t.space(),t.print_name(n))}0==n?Oa(i,t):"*"==i.keys[0]?r(0):t.with_block(function(){t.indent(),r(0);for(var e=1;e<n;e++)t.print(","),t.newline(),t.indent(),r(e);t.newline()}),t.space(),t.print("from"),t.space(),t.print_string(i.path,i.quote),t.semicolon()}),i(Gn,function(e){e.print("export"),e.space(),Ua(this,e),e.semicolon()}),i(Jn,function(e){var n=this;e.print("import"),e.space(),n.default&&n.default.print(e),n.all&&(n.default&&e.comma(),n.all.print(e)),n.properties&&(n.default&&e.comma(),Ua(n,e)),(n.all||n.default||n.properties)&&(e.space(),e.print("from"),e.space()),e.print_string(n.path,n.quote),e.semicolon()}),i(me,function(e){Ca(this,e)}),i(pn,function(e){e.print("async"),e.space(),Ca(this,e)}),i(Ee,function(e){e.print("function"),Ma(this,e)}),i(_n,Fa),i(dn,Fa),i(gn,Pa),i(hn,Pa),i(yn,ja),i(mn,ja),i(wn,function(e){e.print("class"),this.name&&(e.space(),this.name.print(e)),this.extends&&(e.space(),e.print("extends"),e.space(),this.extends.print(e)),e.space(),Ua(this,e,!0)}),i(Sn,function(e){this.static&&(e.print("static"),e.space()),Va(this,e),this.value&&(e.space(),e.print("="),e.space(),this.value.print(e)),e.semicolon()}),i(Tn,Wa("get")),i(An,Wa("set")),i(Dn,function(e){this.static&&(e.print("static"),e.space()),Na(this,e)}),i($n,Ia("return","value")),i(qn,Ia("throw","value")),i(Cn,Ia("break","label")),i(Mn,Ia("continue","label")),i(Se,function(e){var n=this;e.print("if"),e.space(),e.with_parens(function(){n.condition.print(e)}),n.alternative?(function(e,n){var t=e.body;if(n.option("braces")&&!(t instanceof Rn||t instanceof Ln)||n.option("ie")&&t instanceof Ze)return Qa(t,n);if(!t)return n.force_semicolon();for(;;)if(t instanceof Se){if(!t.alternative)return Qa(e.body,n);t=t.alternative}else{if(!(t instanceof w))break;t=t.body}Ja(e.body,n)}(n,e),e.space(),e.print("else"),n.alternative instanceof Se?(e.space(),n.alternative.print(e)):Ja(n.alternative,e)):Ja(n.body,e)}),i(Fn,function(t){var e=this,i=(t.print("switch"),t.space(),t.with_parens(function(){e.expression.print(t)}),t.space(),e.body.length-1);i<0?Oa(e,t):t.with_block(function(){e.body.forEach(function(e,n){t.indent(!0),e.print(t),n<i&&0<e.body.length&&t.newline()})})}),i(Pn,function(e){e.print("default:"),Ha(this,e)}),i(jn,function(e){e.print("case"),e.space(),this.expression.print(e),e.print(":"),Ha(this,e)}),i(Nn,function(e){e.print("try"),e.space(),$a(this,e),this.bcatch&&(e.space(),this.bcatch.print(e)),this.bfinally&&(e.space(),this.bfinally.print(e))}),i(In,function(e){var n=this;e.print("catch"),n.argname&&(e.space(),e.with_parens(function(){n.argname.print(e)})),e.space(),$a(n,e)}),i(Hn,function(e){e.print("finally"),e.space(),$a(this,e)}),i(Rn,Ya("const")),i(Ln,Ya("let")),i(Bn,Ya("var")),i(Te,function(e){var n;this.name.print(e),this.value&&(e.space(),e.print("="),e.space(),n=(n=e.parent(1))instanceof nn||n instanceof tn,Ra(this.value,e,n))}),i(Ae,function(e){this.name.print(e),e.space(),e.print("="),e.space(),this.value.print(e)}),i(De,function(e){La(this,e),this.expression.print(e),this.optional&&e.print("?."),Ba(this,e)}),i(Xn,function(e){La(this,e),e.print("new"),e.space(),this.expression.print(e),Xa(this,e)&&Ba(this,e)}),i(Oe,function(t){this.expressions.forEach(function(e,n){0<n&&(t.comma(),t.should_break()&&(t.newline(),t.indent())),e.print(t)})}),i(Qn,function(e){var n=this.expression,t=(n.print(e),this.property);e.option("ie")&&P[t]?(e.print(this.optional?"?.[":"["),e.add_mapping(this.end),e.print_string(t),e.print("]")):(n instanceof He&&!/[ex.)]/i.test(e.last())&&e.print("."),e.print(this.optional?"?.":"."),e.add_mapping(this.end),e.print_name(t))}),i(Zn,function(e){this.expression.print(e),e.print(this.optional?"?.[":"["),this.property.print(e),e.print("]")}),i(qe,function(e){e.print("..."),this.expression.print(e)}),i(ze,function(e){var n=this.operator,t=this.expression;e.print(n),(/^[a-z]/i.test(n)||/[+-]$/.test(n)&&t instanceof ze&&/^[+-]/.test(t.operator))&&e.space(),t.print(e)}),i(nt,function(e){this.expression.print(e),e.print(this.operator)}),i(Ce,function(e){this.left.print(e),e.space(),e.print(this.operator),e.space(),this.right.print(e)}),i(Me,function(e){this.condition.print(e),e.space(),e.print("?"),e.space(),this.consequent.print(e),e.space(),e.colon(),this.alternative.print(e)}),i(tt,function(e){e.print("await"),e.space(),this.expression.print(e)}),i(it,function(e){e.print(this.nested?"yield*":"yield"),this.expression&&(e.space(),this.expression.print(e))}),i(Pe,function(t){var e=this.elements,i=e.length;t.with_square(0<i?function(){t.space(),e.forEach(function(e,n){n&&t.comma(),e.print(t),n===i-1&&e instanceof Pt&&t.comma()}),t.space()}:X)}),i(rt,function(t){var e=this.elements,n=e.length,i=this.rest;t.with_square(n||i?function(){t.space(),e.forEach(function(e,n){n&&t.comma(),e.print(t)}),i?(n&&t.comma(),t.print("..."),i.print(t)):e[n-1]instanceof Pt&&t.comma(),t.space()}:X)}),i(ot,function(e){var n=Va(this,e),t=this.value;if(n)if(t instanceof Ae){if(t.name instanceof dt&&n==Ga(t.name))return e.space(),e.print("="),e.space(),void t.value.print(e)}else if(t instanceof dt&&n==Ga(t))return;e.colon(),t.print(e)}),i(at,function(t){var e=this.properties,n=e.length,i=this.rest;n||i?t.with_block(function(){e.forEach(function(e,n){n&&(t.print(","),t.newline()),t.indent(),e.print(t)}),i&&(n&&(t.print(","),t.newline()),t.indent(),t.print("..."),i.print(t)),t.newline()}):Oa(this,t)}),i(st,function(e){Ua(this,e)}),i(ct,function(e){Va(this,e),e.colon(),this.value.print(e)}),i(ut,function(e){Na(this,e)}),i(pt,Wa("get")),i(lt,Wa("set")),i(dt,function(e){e.print_name(Ga(this))}),i(St,function(e){var n=Ga(this),t=(e.print_name(n),this.alias);t!=n&&(e.space(),e.print("as"),e.space(),e.print_name(t))}),i(mt,function(e){var n=Ga(this),t=this.key;t&&t!=n&&(e.print_name(t),e.space(),e.print("as"),e.space()),e.print_name(n)}),i(Pt,X),i(qt,function(e){this.tag&&this.tag.print(e),e.print("`");for(var n=0;n<this.expressions.length;n++)e.print(this.strings[n]),e.print("${"),this.expressions[n].print(e),e.print("}");e.print(this.strings[n]),e.print("`")}),i($,function(e){e.print(""+this.value)}),i(fe,function(e){e.print_string(this.value,this.quote)}),i(He,function(e){var n=this.start;Ri&&n&&null!=n.raw?e.print(n.raw):e.print(Ka(this.value))}),i(Ct,function(e){var n=this.value,t=n.toString(),i=t.lastIndexOf("/"),n=(n.raw_source?t="/"+n.raw_source+t.slice(i):1==i?t="/(?:)"+t.slice(i):t.indexOf("/",1)<i&&(t="/"+t.slice(1,i).replace(/\\\\|[^/]?\//g,function(e){return"\\"==e[0]?e:e.slice(0,-1)+"\\/"})+t.slice(i)),e.print(e.to_utf8(t).replace(/\\(?:\0(?![0-9])|[^\0])/g,function(e){switch(e[1]){case"\n":return"\\n";case"\r":return"\\r";case"\t":return"\t";case"\b":return"\b";case"\f":return"\f";case"\0":return"\0";case"\v":return"\v";case"\u2028":return"\\u2028";case"\u2029":return"\\u2029";default:return e}}).replace(/[\n\r\u2028\u2029]/g,function(e){switch(e){case"\n":return"\\n";case"\r":return"\\r";case"\u2028":return"\\u2028";case"\u2029":return"\\u2029"}})),e.parent());n instanceof Ce&&/^in/.test(n.operator)&&n.left===this&&e.print(" ")}),Za([ye,de],X),Za([Pe,xe,In,$,Ve,Yn,je,Hn,O,Ee,Xn,st,w,dt,Fn,k,Nn],function(e){e.add_mapping(this.start)}),Za([En,ot,ft],function(e){"string"==typeof this.key&&e.add_mapping(this.start,this.key)});var es,ns,ts=o("ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/"),is=ts.reduce(function(e,n,t){return e[n]=t,e},Object.create(null));function rs(e){var n="";e=Math.abs(e)<<1|e>>>31;do{var t=31&e}while((e>>>=5)&&(t|=32),n+=ts[t],e);return n}function os(){var t=new be,i=[];return i.index=function(e){var n=t.get(e);return 0<=n||(n=i.length,i.push(e),t.set(e,n)),n},i}function as(l){var a,s=os(),o=l.includeSources&&new be,f=os(),c="",u=(l.orig&&Object.keys(l.orig).forEach(function(e){var n=l.orig[e],t=[0,0,1,0,0];if(l.orig[e]={names:n.names,mappings:n.mappings.split(/;/).map(function(e){return t[0]=0,e.split(/,/).map(function(e){return t.slice(0,function(e,n){for(var t=0,i=0,r=0,o=0;r<n.length;r++){var a=is[n[r]];t+=(31&a)<<i,32&a?i+=5:(e[o++]+=1&t?2147483648|-(t>>1):t>>1,t=i=0)}return o}(t,e))})}),sources:n.sources},o&&n.sourcesContent)for(var i=0;i<n.sources.length;i++){var r=n.sourcesContent[i];r&&o.set(n.sources[i],r)}}),1),p=0,d=0,h=1,v=0,m=0;return{add:l.orig?function(e,n,t,i,r,o){var a=l.orig[e];if(a){var s,f=a.mappings[i-1];if(!f)return;for(var c=0;c<f.length;c++){var u=f[c][0];if(u<=r&&(s=f[c]),r<=u)break}!s||s.length<4?e=null:(e=a.sources[s[1]],i=s[2],r=s[3],4<s.length&&(o=a.names[s[4]]))}_(e,n,t,i,r,o)}:_,setSourceContent:o?function(e,n){o.has(e)||o.set(e,n)}:X,toString:function(){return JSON.stringify({version:3,file:l.filename||void 0,sourceRoot:l.root||void 0,sources:s,sourcesContent:o?s.map(function(e){return o.get(e)||null}):void 0,names:f,mappings:c})}};function _(e,n,t,i,r,o){if(null!=a||null!=e){if(a=e,u<n)for(p=0;c+=";",++u<n;);else c&&(c+=",");c+=rs(t-p),p=t,null!=e&&(t=s.index(e),c+=rs(t-d),d=t,c+=rs(i-h),h=i,c+=rs(r-v),v=r,l.names&&null!=o&&(e=f.index(o),c+=rs(e-m),m=e))}}}function ss(i){return function(e){var n=e.key instanceof ye,t=n?f(e.key):e.private?{type:"PrivateIdentifier",name:e.key.slice(1)}:{type:"Literal",value:e.key};return{type:"MethodDefinition",kind:i,computed:n,key:t,static:e.static,value:f(e.value)}}}function fs(n){return function(e){return{type:"ForOfStatement",await:n,left:f(e.init),right:f(e.object),body:f(e.body)}}}function cs(e){var n=e.value;return"number"==typeof n&&(n<0||0===n&&1/n<0)?{type:"UnaryExpression",operator:"-",prefix:!0,argument:{type:"Literal",value:-n,raw:e.start.raw}}:{type:"Literal",value:n,raw:e.start.raw}}function us(e){for(var n=0;n<e.length;n++){var t=e[n];if(!(t instanceof we))break;var i=t.body;if(!(i instanceof fe))break;if(t.start.pos!==i.start.pos)break;e[n]=new pe(i)}return e}function ls(e){if("Literal"==e.type)return null!=e.raw?e.raw:e.value+""}function ps(e){var n=e.loc,t=n&&n.start,i=e.range;return new U({file:n&&n.source,line:t&&t.line,col:t&&t.column,pos:i?i[0]:e.start,endline:t&&t.line,endcol:t&&t.column,endpos:i?i[0]:e.start,raw:ls(e)})}function ds(e){var n=e.loc,t=n&&n.end,i=e.range;return new U({file:n&&n.source,line:t&&t.line,col:t&&t.column,pos:i?i[1]:e.end,endline:t&&t.line,endcol:t&&t.column,endpos:i?i[1]:e.end,raw:ls(e)})}function hs(e){return""+e["Identifier"==e.type?"name":"value"]}function vs(e,n,t){var o=["start: my_start_token(M)","end: my_end_token(M)"],a=["type: "+JSON.stringify(e)];t&&t.split(/\s*,\s*/).forEach(function(e){var n=/([a-z0-9$_]+)(=|@|>|%)([a-z0-9$_]+)/i.exec(e);if(!n)throw new Error("Can't understand property map: "+e);var t=n[1],i=n[2],r=n[3];switch(i){case"@":o.push(r+": M."+t+".map(from_moz)"),a.push(t+": M."+r+".map(to_moz)");break;case">":o.push(r+": from_moz(M."+t+")"),a.push(t+": to_moz(M."+r+")");break;case"=":o.push(r+": M."+t),a.push(t+": M."+r);break;case"%":o.push(r+": from_moz(M."+t+").body"),a.push(t+": to_moz_block(M)");break;default:throw new Error("Can't understand operator in propmap: "+e)}}),es[e]=new Function("U2","my_start_token","my_end_token","from_moz",["return function From_Moz_"+e+"(M) {"," return new U2.AST_"+n.TYPE+"({",o.join(",\n")," });","};"].join("\n"))(c,ps,ds,s),r(n,new Function("to_moz","to_moz_block","to_moz_scope",["return function To_Moz_"+e+"(M) {"," return {",a.join(",\n")," };","};"].join("\n"))(f,_s,gs))}function s(e){ns.push(e);var n=null;if(e){if(!le(es,e.type))throw new Error("Unsupported type: "+e.type);n=es[e.type](e)}return ns.pop(),n}function ms(e,n){var t=e.start,e=e.end;return null!=t.pos&&null!=e.endpos&&(n.range=[t.pos,e.endpos]),t.line&&(n.loc={start:{line:t.line,column:t.col},end:e.endline?{line:e.endline,column:e.endcol}:null},t.file&&(n.loc.source=t.file)),n}function r(e,n){e.DEFMETHOD("to_mozilla_ast",function(){return ms(this,n(this))})}function f(e){return null!=e?e.to_mozilla_ast():null}function _s(e){return{type:"BlockStatement",body:e.body.map(f)}}function gs(e,n){var t=n.body.map(f);return n.body[0]instanceof we&&n.body[0].body instanceof fe&&t.unshift(f(new We(n.body[0]))),{type:e,body:t}}(es={Program:function(e){return new an({start:ps(e),end:ds(e),body:us(e.body.map(s))})},ArrowFunctionExpression:function(e){var n=[],t=null,i=(e.params.forEach(function(e){"RestElement"==e.type?t=s(e.argument):n.push(s(e))}),new(e.async?pn:me)({start:ps(e),end:ds(e),argnames:n,rest:t})),e=s(e.body);return e instanceof xe?(i.body=us(e.body),i.value=null):(i.body=[],i.value=e),i},FunctionDeclaration:function(e){var n=e.async?e.generator?gn:_n:e.generator?yn:bn,t=[],i=null;return e.params.forEach(function(e){"RestElement"==e.type?i=s(e.argument):t.push(s(e))}),new n({start:ps(e),end:ds(e),name:s(e.id),argnames:t,rest:i,body:us(s(e.body).body)})},FunctionExpression:function(e){var n=e.async?e.generator?hn:dn:e.generator?mn:vn,t=[],i=null;return e.params.forEach(function(e){"RestElement"==e.type?i=s(e.argument):t.push(s(e))}),new n({start:ps(e),end:ds(e),name:s(e.id),argnames:t,rest:i,body:us(s(e.body).body)})},ClassDeclaration:function(e){return new xn({start:ps(e),end:ds(e),name:s(e.id),extends:s(e.superClass),properties:e.body.body.map(s)})},ClassExpression:function(e){return new kn({start:ps(e),end:ds(e),name:s(e.id),extends:s(e.superClass),properties:e.body.body.map(s)})},MethodDefinition:function(e){var n=e.key,t=!1,n=e.computed?s(n):"PrivateIdentifier"==n.type?(t=!0,"#"+n.name):hs(n),i=Dn,r=s(e.value);switch(e.kind){case"get":i=Tn,r=new sn(r);break;case"set":i=An,r=new sn(r)}return new i({start:ps(e),end:ds(e),key:n,private:t,static:e.static,value:r})},PropertyDefinition:function(e){var n=e.key,t=!1,n=e.computed?s(n):"PrivateIdentifier"==n.type?(t=!0,"#"+n.name):hs(n);return new Sn({start:ps(e),end:ds(e),key:n,private:t,static:e.static,value:s(e.value)})},ForOfStatement:function(e){return new(e.await?ve:he)({start:ps(e),end:ds(e),init:s(e.left),object:s(e.right),body:s(e.body)})},TryStatement:function(e){var n=e.handlers||[e.handler];if(1<n.length||e.guardedHandlers&&e.guardedHandlers.length)throw new Error("Multiple catch clauses are not supported.");return new Nn({start:ps(e),end:ds(e),body:s(e.block).body,bcatch:s(n[0]),bfinally:e.finalizer?new Hn(s(e.finalizer)):null})},Property:function(e){var n=(e.computed?s:hs)(e.key),n={start:ps(e),end:ds(e),key:n,value:s(e.value)};return"init"==e.kind?new(e.method?ut:ct)(n):(n.value=new sn(n.value),"get"==e.kind?new pt(n):"set"==e.kind?new lt(n):void 0)},ArrayExpression:function(e){return new Pe({start:ps(e),end:ds(e),elements:e.elements.map(function(e){return null===e?new Pt:s(e)})})},ArrayPattern:function(e){var n=[],t=null;return e.elements.forEach(function(e){null===e?n.push(new Pt):"RestElement"==e.type?t=s(e.argument):n.push(s(e))}),new rt({start:ps(e),end:ds(e),elements:n,rest:t})},ObjectPattern:function(e){var n=[],t=null;return e.properties.forEach(function(e){"RestElement"==e.type?t=s(e.argument):n.push(new ot(s(e)))}),new at({start:ps(e),end:ds(e),properties:n,rest:t})},MemberExpression:function(e){return new(e.computed?Zn:Qn)({start:ps(e),end:ds(e),optional:e.optional,expression:s(e.object),property:e.computed?s(e.property):e.property.name})},MetaProperty:function(e){var n=s(e.meta),t=hs(e.property);return"new"==n.name&&"target"==t?new $t({start:ps(e),end:ds(e),name:"new.target"}):new Qn({start:ps(e),end:ds(e),expression:n,property:t})},SwitchCase:function(e){return new(e.test?jn:Pn)({start:ps(e),end:ds(e),expression:s(e.test),body:e.consequent.map(s)})},ExportAllDeclaration:function(e){var n=e.exported?hs(e.exported):"*";return new Wn({start:ps(e),end:ds(e),aliases:[n],keys:["*"],path:e.source.value})},ExportDefaultDeclaration:function(e){var n=s(e.declaration);if(!n.name)switch(n.CTOR){case _n:n=new dn(n);break;case gn:n=new hn(n);break;case xn:n=new kn(n);break;case bn:n=new vn(n);break;case yn:n=new mn(n)}return new Vn({start:ps(e),end:ds(e),body:n})},ExportNamedDeclaration:function(e){return e.declaration?new Un({start:ps(e),end:ds(e),body:s(e.declaration)}):e.source?(n=[],t=[],e.specifiers.forEach(function(e){n.push(hs(e.exported)),t.push(hs(e.local))}),new Wn({start:ps(e),end:ds(e),aliases:n,keys:t,path:e.source.value})):new Gn({start:ps(e),end:ds(e),properties:e.specifiers.map(function(e){var n=new St(s(e.local));return n.alias=hs(e.exported),n})});var n,t},ImportDeclaration:function(e){var t=null,i=null,r=null;return e.specifiers.forEach(function(e){var n=new mt(s(e.local));switch(e.type){case"ImportDefaultSpecifier":(i=n).key="";break;case"ImportNamespaceSpecifier":(t=n).key="*";break;default:n.key=e.imported.name||syn.name,(r=r||[]).push(n)}}),new Jn({start:ps(e),end:ds(e),all:t,default:i,properties:r,path:e.source.value})},ImportExpression:function(e){var n=ps(e),t=s(e.source);return new De({start:n,end:ds(e),expression:new Ie({start:n,end:t.start,name:"import"}),args:[t]})},VariableDeclaration:function(e){return new({const:Rn,let:Ln}[e.kind]||Bn)({start:ps(e),end:ds(e),definitions:e.declarations.map(s)})},Literal:function(e){var n={start:ps(e),end:ds(e)};if(e.bigint)return n.value=e.bigint.toLowerCase()+"n",new zt(n);var t=e.value;if(null===t)return new Mt(n);var i=e.regex;if(i&&i.pattern)return n.value=new RegExp(i.pattern,i.flags),n.value.raw_source=i.pattern,new Ct(n);if(i)return n.value=e.regex&&e.raw?e.raw:t,new Ct(n);switch(typeof t){case"string":return n.value=t,new fe(n);case"number":if(isNaN(t))return new z(n);var r,o=isFinite(t)?(n.value=(r=1/t<0)?-t:t,new He(n)):(r=t<0,new jt(n));return r?new ze({start:n.start,end:n.end,operator:"-",expression:o}):o;case"boolean":return new(t?It:Nt)(n)}},TemplateLiteral:function(e){return new qt({start:ps(e),end:ds(e),expressions:e.expressions.map(s),strings:e.quasis.map(function(e){return e.value.raw})})},TaggedTemplateExpression:function(e){var n=s(e.quasi);return n.start=ps(e),n.end=ds(e),n.tag=s(e.tag),n},Identifier:function(e){for(var n,t=ns.length-1;"ArrayPattern"==(n=ns[--t]).type||"AssignmentPattern"==n.type&&n.left===ns[t+1]||"ObjectPattern"==n.type||"Property"==n.type&&n.value===ns[t+1]||"VariableDeclarator"==n.type&&n.id===ns[t+1];);var i=Ie;switch(n.type){case"ArrowFunctionExpression":n.body!==ns[t+1]&&(i=Ne);break;case"BreakStatement":case"ContinueStatement":i=Tt;break;case"CatchClause":i=kt;break;case"ClassDeclaration":n.id===ns[t+1]&&(i=wt);break;case"ClassExpression":n.id===ns[t+1]&&(i=xt);break;case"FunctionDeclaration":i=n.id===ns[t+1]?bt:Ne;break;case"FunctionExpression":i=n.id===ns[t+1]?yt:Ne;break;case"LabeledStatement":i=Et;break;case"VariableDeclaration":i={const:vt,let:_t}[n.kind]||gt}return new i({start:ps(e),end:ds(e),name:e.name})},Super:function(e){return new Dt({start:ps(e),end:ds(e),name:"super"})},ThisExpression:function(e){return new Ot({start:ps(e),end:ds(e),name:"this"})},ParenthesizedExpression:function(e){var n=s(e.expression);return n.start.parens||(n.start.parens=[]),n.start.parens.push(ps(e)),n.end.parens||(n.end.parens=[]),n.end.parens.push(ds(e)),n},ChainExpression:function(e){e=s(e.expression);return e.terminal=!0,e}}).UpdateExpression=es.UnaryExpression=function(e){return new(("prefix"in e?e.prefix:"UnaryExpression"==e.type)?ze:nt)({start:ps(e),end:ds(e),operator:e.operator,expression:s(e.argument)})},vs("EmptyStatement",We),vs("ExpressionStatement",we,"expression>body"),vs("BlockStatement",xe,"body@body"),vs("IfStatement",Se,"test>condition, consequent>body, alternate>alternative"),vs("LabeledStatement",de,"label>label, body>body"),vs("BreakStatement",Cn,"label>label"),vs("ContinueStatement",Mn,"label>label"),vs("WithStatement",on,"object>expression, body>body"),vs("SwitchStatement",Fn,"discriminant>expression, cases@body"),vs("ReturnStatement",$n,"argument>value"),vs("ThrowStatement",qn,"argument>value"),vs("WhileStatement",en,"test>condition, body>body"),vs("DoWhileStatement",Ze,"test>condition, body>body"),vs("ForStatement",nn,"init>init, test>condition, update>step, body>body"),vs("ForInStatement",rn,"left>init, right>object, body>body"),vs("DebuggerStatement",Ve),vs("VariableDeclarator",Te,"id>name, init>value"),vs("CatchClause",In,"param>argname, body%body"),vs("BinaryExpression",Ce,"operator=operator, left>left, right>right"),vs("LogicalExpression",Ce,"operator=operator, left>left, right>right"),vs("AssignmentExpression",Fe,"operator=operator, left>left, right>right"),vs("AssignmentPattern",Ae,"left>name, right>value"),vs("ConditionalExpression",Me,"test>condition, consequent>consequent, alternate>alternative"),vs("NewExpression",Xn,"callee>expression, arguments@args, pure=pure"),vs("CallExpression",De,"callee>expression, arguments@args, optional=optional, pure=pure"),vs("SequenceExpression",Oe,"expressions@expressions"),vs("SpreadElement",qe,"argument>expression"),vs("ObjectExpression",st,"properties@properties"),vs("AwaitExpression",tt,"argument>expression"),vs("YieldExpression",it,"argument>expression, delegate=nested"),r(an,function(e){return gs("Program",e)}),r(Q,function(e){var n=e.argnames.map(f);return e.rest&&n.push({type:"RestElement",argument:f(e.rest)}),{type:"FunctionDeclaration",id:f(e.name),async:un(e),generator:ln(e),params:n,body:gs("BlockStatement",e)}}),r(Ee,function(e){var n=e.argnames.map(f);return e.rest&&n.push({type:"RestElement",argument:f(e.rest)}),cn(e)?{type:"ArrowFunctionExpression",async:un(e),params:n,body:e.value?f(e.value):gs("BlockStatement",e)}:{type:"FunctionExpression",id:f(e.name),async:un(e),generator:ln(e),params:n,body:gs("BlockStatement",e)}}),r(xn,function(e){return{type:"ClassDeclaration",id:f(e.name),superClass:f(e.extends),body:{type:"ClassBody",body:e.properties.map(f)}}}),r(kn,function(e){return{type:"ClassExpression",id:f(e.name),superClass:f(e.extends),body:{type:"ClassBody",body:e.properties.map(f)}}}),r(Tn,ss("get")),r(An,ss("set")),r(Dn,ss("method")),r(Sn,function(e){var n=e.key instanceof ye;return{type:"PropertyDefinition",computed:n,key:n?f(e.key):e.private?{type:"PrivateIdentifier",name:e.key.slice(1)}:{type:"Literal",value:e.key},static:e.static,value:f(e.value)}}),r(ve,fs(!0)),r(he,fs(!1)),r(pe,function(e){return{type:"ExpressionStatement",expression:ms(e,{type:"Literal",value:e.value})}}),r(k,function(e){return{type:"SwitchCase",test:f(e.expression),consequent:e.body.map(f)}}),r(Nn,function(e){return{type:"TryStatement",block:_s(e),handler:f(e.bcatch),guardedHandlers:[],finalizer:f(e.bfinally)}}),r(In,function(e){return{type:"CatchClause",param:f(e.argname),guard:null,body:_s(e)}}),r(Un,function(e){return{type:"ExportNamedDeclaration",declaration:f(e.body)}}),r(Vn,function(e){return{type:"ExportDefaultDeclaration",declaration:f(e.body)}}),r(Wn,function(e){if("*"==e.keys[0])return{type:"ExportAllDeclaration",exported:"*"==e.aliases[0]?null:{type:"Identifier",name:e.aliases[0]},source:{type:"Literal",value:e.path}};for(var n=[],t=0;t<e.aliases.length;t++)n.push({type:"ExportSpecifier",exported:{type:"Identifier",name:e.aliases[t]},local:{type:"Identifier",name:e.keys[t]}});return{type:"ExportNamedDeclaration",specifiers:n,source:{type:"Literal",value:e.path}}}),r(Gn,function(e){return{type:"ExportNamedDeclaration",specifiers:e.properties.map(function(e){return{type:"ExportSpecifier",local:f(e),exported:{type:"Identifier",name:e.alias}}})}}),r(Jn,function(e){var n=e.properties?e.properties.map(function(e){return{type:"ImportSpecifier",local:f(e),imported:{type:"Identifier",name:e.key}}}):[];return e.all&&n.unshift({type:"ImportNamespaceSpecifier",local:f(e.all)}),e.default&&n.unshift({type:"ImportDefaultSpecifier",local:f(e.default)}),{type:"ImportDeclaration",specifiers:n,source:{type:"Literal",value:e.path}}}),r(Yn,function(e){return{type:"VariableDeclaration",kind:e.TYPE.toLowerCase(),declarations:e.definitions.map(f)}}),r($e,function(e){var n=e instanceof Zn,n={type:"MemberExpression",object:f(e.expression),computed:n,optional:e.optional,property:n?f(e.property):{type:"Identifier",name:e.property}};return e.terminal?{type:"ChainExpression",expression:n}:n}),r(et,function(e){return{type:"++"==e.operator||"--"==e.operator?"UpdateExpression":"UnaryExpression",operator:e.operator,prefix:e instanceof ze,argument:f(e.expression)}}),r(Ce,function(e){return{type:"&&"==e.operator||"||"==e.operator?"LogicalExpression":"BinaryExpression",left:f(e.left),operator:e.operator,right:f(e.right)}}),r(Pe,function(e){return{type:"ArrayExpression",elements:e.elements.map(f)}}),r(rt,function(e){var n=e.elements.map(f);return e.rest&&n.push({type:"RestElement",argument:f(e.rest)}),{type:"ArrayPattern",elements:n}}),r(ot,function(e){var n=e.key instanceof ye;return{type:"Property",kind:"init",computed:n,key:n?f(e.key):{type:"Literal",value:e.key},value:f(e.value)}}),r(at,function(e){var n=e.properties.map(f);return e.rest&&n.push({type:"RestElement",argument:f(e.rest)}),{type:"ObjectPattern",properties:n}}),r(ft,function(e){var n,t=e.key instanceof ye,i=t?f(e.key):{type:"Literal",value:e.key};return e instanceof ct?n="init":e instanceof pt?n="get":e instanceof lt&&(n="set"),{type:"Property",kind:n,computed:t,method:e instanceof ut,key:i,value:f(e.value)}}),r(dt,function(e){var n=e.definition();return{type:"Identifier",name:n&&n.mangled_name||e.name}}),r(Dt,function(){return{type:"Super"}}),r(Ot,function(){return{type:"ThisExpression"}}),r($t,function(){return{type:"MetaProperty",meta:{type:"Identifier",name:"new"},property:{type:"Identifier",name:"target"}}}),r(Ct,function(e){var n=e.value.toString().match(/\/([gimuy]*)$/)[1],t="/"+e.value.raw_source+"/"+n;return{type:"Literal",value:t,raw:t,regex:{pattern:e.value.raw_source,flags:n}}}),r(zt,function(e){e=e.value;return{type:"Literal",bigint:e.slice(0,-1),raw:e}}),r(C,cs),r($,cs),r(Mt,cs),r(q,function(e){return{type:"Identifier",name:String(e.value)}}),r(qt,function(e){var t=e.strings.length-1,n={type:"TemplateLiteral",expressions:e.expressions.map(f),quasis:e.strings.map(function(e,n){return{type:"TemplateElement",tail:n==t,value:{raw:e}}})};return e.tag?{type:"TaggedTemplateExpression",tag:f(e.tag),quasi:n}:n}),Xe.DEFMETHOD("to_mozilla_ast",xe.prototype.to_mozilla_ast),Pt.DEFMETHOD("to_mozilla_ast",p),ye.DEFMETHOD("to_mozilla_ast",function(){throw new Error("Cannot convert AST_"+this.TYPE)}),ns=null,ye.from_mozilla_ast=function(e){var n=ns,e=(ns=[],s(e));return ns=n,e.walk(new Ye(function(e){if(e instanceof Tt){for(var n,t,i=0;(n=this.parent(i))&&!(n instanceof ke);i++)if(n instanceof de&&n.label.name==e.name){e.thedef=n.label;break}e.thedef||(t=e.start,Bt("Undefined label "+e.name,t.file,t.line,t.col,t.pos))}})),e};bs=new be,["null","true","false","Infinity","-Infinity","undefined"].forEach(ks),[Array,Boolean,Date,Error,Function,Math,Number,Object,RegExp,String].forEach(function(e){Object.getOwnPropertyNames(e).map(ks),e.prototype&&(Object.getOwnPropertyNames(new e).map(ks),Object.getOwnPropertyNames(e.prototype).map(ks))});var bs,ys,ws,xs=bs;function ks(e){bs.set(e,!0)}function Es(e,n){e instanceof Me?(Es(e.consequent,n),Es(e.alternative,n)):e instanceof Oe?Es(e.tail_node(),n):e instanceof fe&&n(e.value)}function Ss(n){try{return JSON.parse(n)}catch(e){throw new Error("invalid input source map: "+n)}}function Ts(n,t,e){e.forEach(function(e){t[e]&&("object"!=typeof t[e]&&(t[e]={}),n in t[e]||(t[e][n]=t[n]))})}function As(e){e&&("props"in e?e.props instanceof be||(e.props=be.fromObject(e.props)):e.props=new be)}function Ds(e){return{props:e.props.toObject()}}ws="undefined"==typeof Buffer?(ys=atob,btoa):void 0===Buffer.alloc?(ys=function(e){return new Buffer(e,"base64").toString()},function(e){return new Buffer(e).toString("base64")}):(ys=function(e){return Buffer.from(e,"base64").toString()},function(e){return Buffer.from(e).toString("base64")}),c.Dictionary=be,c.is_statement=Ge,c.List=Ue,c.minify=function(i,r){try{(r=ue(r,{annotations:void 0,compress:{},enclose:!1,ie:!1,ie8:!1,keep_fargs:!1,keep_fnames:!1,mangle:{},nameCache:null,output:{},parse:{},rename:void 0,sourceMap:!1,timings:!1,toplevel:!1,v8:!1,validate:!1,warnings:!1,webkit:!1,wrap:!1},!0)).validate&&ye.enable_validation();var e,o,n=r.timings&&{start:Date.now()},t=(void 0!==r.annotations&&Ts("annotations",r,["compress","output"]),r.ie8&&(r.ie=r.ie||r.ie8),r.ie&&Ts("ie",r,["compress","mangle","output","rename"]),r.keep_fargs&&Ts("keep_fargs",r,["compress","mangle","rename"]),r.keep_fnames&&Ts("keep_fnames",r,["compress","mangle","rename"]),r.toplevel&&Ts("toplevel",r,["compress","mangle","rename"]),r.v8&&Ts("v8",r,["mangle","output","rename"]),r.webkit&&Ts("webkit",r,["compress","mangle","output","rename"]),r.mangle&&(r.mangle=ue(r.mangle,{cache:r.nameCache&&(r.nameCache.vars||{}),eval:!1,ie:!1,keep_fargs:!1,keep_fnames:!1,properties:!1,reserved:[],toplevel:!1,v8:!1,webkit:!1},!0),r.mangle.properties&&("object"!=typeof r.mangle.properties&&(r.mangle.properties={}),r.mangle.properties.keep_quoted&&(e=r.mangle.properties.reserved,Array.isArray(e)||(e=[]),r.mangle.properties.reserved=e),!r.nameCache||"cache"in r.mangle.properties||(r.mangle.properties.cache=r.nameCache.props||{})),As(r.mangle.cache),As(r.mangle.properties.cache)),void 0===r.rename&&(r.rename=r.compress&&r.mangle),r.sourceMap&&(r.sourceMap=ue(r.sourceMap,{content:null,filename:null,includeSources:!1,names:!0,root:null,url:null},!0)),[]);if(r.warnings&&ye.log_function(function(e){t.push(e)},"verbose"==r.warnings),n&&(n.parse=Date.now()),i instanceof an)o=i;else{"string"==typeof i&&(i=[i]),r.parse=r.parse||{},r.parse.toplevel=null;var a,s=r.sourceMap&&r.sourceMap.content;for(u in(s="string"==typeof s&&"inline"!=s?Ss(s):s)&&(r.sourceMap.orig=Object.create(null)),i)le(i,u)&&(r.parse.filename=u,r.parse.toplevel=o=Qt(i[u],r.parse),"inline"==s?(a=function(e,n){for(var t=n.end.comments_after,i=t.length;0<=--i;){var r=t[i];if("comment1"!=r.type)break;r=/^# ([^\s=]+)=(\S+)\s*$/.exec(r.value);if(!r)break;if("sourceMappingURL"==r[1]){if(r=/^data:application\/json(;.*?)?;base64,([^,]+)$/.exec(r[2]))return ys(r[2]);break}}ye.warn("inline source map not found: {name}",{name:e})}(u,o))&&(r.sourceMap.orig[u]=Ss(a)):s&&(r.sourceMap.orig[u]=s))}e&&(D=e,o.walk(new Ye(function(e){e instanceof En||e instanceof ft?e.start&&e.start.quote&&O(e.key):e instanceof Zn&&Es(e.property,O)}))),["enclose","wrap"].forEach(function(e){var n,t=r[e];t&&(n=o.print_to_string().slice(0,-1),o=o[e](t),i[o.start.file]=o.print_to_string().replace(n,""))}),r.validate&&o.validate_ast(),n&&(n.rename=Date.now()),r.rename&&(o.figure_out_scope(r.rename),o.expand_names(r.rename)),n&&(n.compress=Date.now()),r.compress&&(o=new Ji(r.compress).compress(o),r.validate&&o.validate_ast()),n&&(n.scope=Date.now()),r.mangle&&o.figure_out_scope(r.mangle),n&&(n.mangle=Date.now()),r.mangle&&(o.compute_char_frequency(r.mangle),o.mangle_names(r.mangle)),n&&(n.properties=Date.now()),r.mangle&&r.mangle.properties&&(g=o,b=r.mangle.properties,x=(b=ue(b,{builtins:!1,cache:null,debug:!1,keep_quoted:!1,regex:null,reserved:null},!0)).builtins?new be:xs.clone(),Array.isArray(b.reserved)&&b.reserved.forEach(function(e){x.set(e,!0)}),k=-1,b.cache?(y=b.cache.props).each(function(e){x.set(e,!0)}):y=new be,E=b.regex,(S=!1!==b.debug)&&(w=!0===b.debug?"":b.debug),T=new be,A=x.clone(),g.walk(new Ye(function(e){if(e instanceof Ce)"in"==e.operator&&Es(e.left,v);else if("Call"==e.TYPE){var n=e.expression;if(n instanceof Qn)switch(n.property){case"defineProperty":case"getOwnPropertyDescriptor":if(e.args.length<2)break;if(!((n=n.expression)instanceof Ie))break;if("Object"!=n.name)break;if(!n.definition().undeclared)break;Es(e.args[1],v);break;case"hasOwnProperty":if(e.args.length<1)break;Es(e.args[0],v)}}else e instanceof En?"string"==typeof e.key&&v(e.key):e instanceof Qn?v(e.property):e instanceof ft?"string"==typeof e.key&&v(e.key):e instanceof Zn&&Es(e.property,v)})),g.walk(new Ye(function(e){if(e instanceof Ce)"in"==e.operator&&_(e.left);else if("Call"==e.TYPE){var n=e.expression;if(n instanceof Qn)switch(n.property){case"defineProperty":case"getOwnPropertyDescriptor":if(e.args.length<2)break;if(!((n=n.expression)instanceof Ie))break;if("Object"!=n.name)break;if(!n.definition().undeclared)break;_(e.args[1]);break;case"hasOwnProperty":if(e.args.length<1)break;_(e.args[0])}}else e instanceof En?"string"==typeof e.key&&(e.key=m(e.key)):e instanceof Qn?e.property=m(e.property):e instanceof ft?"string"==typeof e.key&&(e.key=m(e.key)):e instanceof Zn&&(b.keep_quoted||_(e.property))}))),n&&(n.output=Date.now());var f={},c=ue(r.output,{ast:!1,code:!0});if(c.ast&&(f.ast=o),c.code){if(r.sourceMap&&(c.source_map=as(r.sourceMap),r.sourceMap.includeSources)){if(i instanceof an)throw new Error("original source content unavailable");for(var u in i)le(i,u)&&c.source_map.setSourceContent(u,i[u])}delete c.ast,delete c.code;var l,p=wa(c);o.print(p),f.code=p.get(),r.sourceMap&&(f.map=c.source_map.toString(),(l=r.sourceMap.url)&&(f.code=f.code.replace(/\n\/\/# sourceMappingURL=\S+\s*$/,""),f.code+="inline"==l?"\n//# sourceMappingURL=data:application/json;charset=utf-8;base64,"+ws(f.map):"\n//# sourceMappingURL="+l))}return r.nameCache&&r.mangle&&(r.mangle.cache&&(r.nameCache.vars=Ds(r.mangle.cache)),r.mangle.properties&&r.mangle.properties.cache&&(r.nameCache.props=Ds(r.mangle.properties.cache))),n&&(n.end=Date.now(),f.timings={parse:.001*(n.rename-n.parse),rename:.001*(n.compress-n.rename),compress:.001*(n.scope-n.compress),scope:.001*(n.mangle-n.scope),mangle:.001*(n.properties-n.mangle),properties:.001*(n.output-n.properties),output:.001*(n.end-n.output),total:.001*(n.end-n.start)}),t.length&&(f.warnings=t),f}catch(e){return{error:e}}finally{ye.log_function(),ye.disable_validation()}function d(e){return!A.has(e)&&!/^-?[0-9]+(\.[0-9]+)?(e[+-][0-9]+)?$/.test(e)}function h(e){return!x.has(e)&&((!E||E.test(e))&&(y.has(e)||T.has(e)))}function v(e){d(e)&&T.set(e,!0),h(e)||A.set(e,!0)}function m(e){if(!h(e))return e;var n,t=y.get(e);if(!t){if(!S||d(n="_$"+e+"$"+w+"_")&&(t=n),!t)for(;!d(t=Bi(++k)););/^#/.test(e)&&(t="#"+t),y.set(e,t)}return t}function _(e){e instanceof Oe?_(e.expressions.tail_node()):e instanceof fe?e.value=m(e.value):e instanceof Me&&(_(e.consequent),_(e.alternative))}var g,b,y,w,x,k,E,S,T,A,D;function O(e){K(D,e)}},c.parse=Qt,c.push_uniq=K,c.TreeTransformer=Ht,c.TreeWalker=Ye}("undefined"==typeof exports?exports={}:exports);