'use strict';var $jscomp=$jscomp||{};$jscomp.scope={};$jscomp.arrayIteratorImpl=function(b){var a=0;return function(){return aa)++g;else if(47===a)if(a=h.charCodeAt(g+1),42===a){a=void 0;var b=l.onComment&&l.locations&&new e,d=g,f=h.indexOf("*/",g+=2);-1===f&&c(g-2,"Unterminated comment");g=f+2;if(l.locations)for(X.lastIndex=d;(a=X.exec(h))&&a.index=a?a=Va(!0):(++g,a=f(xa)),a;case 40:return++g,f(I);case 41:return++g,f(E);case 59:return++g,f(J);case 44:return++g,f(K);case 91:return++g,f(ka);case 93:return++g,f(la);case 123:return++g,f(Y);case 125:return++g,f(R);case 58:return++g,f(Z);case 63:return++g,f(ya);case 48:if(a=h.charCodeAt(g+1),120===a||88===a)return g+=2,a=S(16),null==a&&c(w+2,"Expected hexadecimal number"),ma(h.charCodeAt(g))&&c(g,"Identifier directly after number"),f(aa,a);case 49:case 50:case 51:case 52:case 53:case 54:case 55:case 56:case 57:return Va(!1); case 34:case 39:a:{g++;for(var b="";;){g>=Q&&c(w,"Unterminated string constant");var d=h.charCodeAt(g);if(d===a){++g;a=f(ca,b);break a}if(92===d){d=h.charCodeAt(++g);var e=/^[0-7]+/.exec(h.slice(g,g+3));for(e&&(e=e[0]);e&&255=Q)return f(qa);var b=h.charCodeAt(g);if(ma(b)||92===b)return Za();a=B(b);if(!1===a){b=String.fromCharCode(b);if("\\"===b||$a.test(b))return Za();c(g,"Unexpected character '"+b+"'")}return a}function r(a, b){var c=h.slice(g,g+b);g+=b;f(a,c)}function da(){for(var a,b,d=g;;){g>=Q&&c(d,"Unterminated regular expression");var e=h.charAt(g);oa.test(e)&&c(d,"Unterminated regular expression");if(a)a=!1;else{if("["===e)b=!0;else if("]"===e&&b)b=!1;else if("/"===e&&!b)break;a="\\"===e}++g}a=h.slice(d,g);++g;(b=ab())&&!/^[gmsiy]*$/.test(b)&&c(d,"Invalid regexp flag");return f(Ba,new RegExp(a,b))}function S(a,b){for(var c=g,d=0,e=0,z=null==b?Infinity:b;e=f?f-48:Infinity;if(f>=a)break;++g;d=d*a+f}return g===c||null!=b&&g-c!==b?null:d}function Va(a){var b=g,d=!1,e=48===h.charCodeAt(g);a||null!==S(10)||c(b,"Invalid number");46===h.charCodeAt(g)&&(++g,S(10),d=!0);a=h.charCodeAt(g);if(69===a||101===a)a=h.charCodeAt(++g),43!==a&&45!==a||++g,null===S(10)&&c(b,"Invalid number"),d=!0;ma(h.charCodeAt(g))&&c(g,"Identifier directly after number");a=h.slice(b,g);var z;d?z=parseFloat(a):e&&1!==a.length?/[89]/.test(a)||C?c(b,"Invalid number"):z=parseInt(a, 8):z=parseInt(a,10);return f(aa,z)}function na(a){a=S(16,a);null===a&&c(w,"Bad character escape sequence");return a}function ab(){ba=!1;for(var a,b=!0,d=g;;){var e=h.charCodeAt(g);if(bb(e))ba&&(a+=h.charAt(g)),++g;else if(92===e){ba||(a=h.slice(d,g));ba=!0;117!=h.charCodeAt(++g)&&c(g,"Expecting Unicode escape sequence \\uXXXX");++g;e=na(4);var f=String.fromCharCode(e);f||c(g-1,"Invalid Unicode escape");(b?ma(e):bb(e))||c(g-4,"Invalid Unicode escape");a+=f}else break;b=!1}return ba?a:h.slice(d,g)} function Za(){var a=ab(),b=U;ba||(Mb(a)?b=Ca[a]:(l.forbidReserved&&(3===l.ecmaVersion?Nb:Ob)(a)||C&&cb(a))&&c(w,"The keyword '"+a+"' is reserved"));return f(b,a)}function q(){Da=w;L=W;Ea=ja;x()}function Fa(a){C=a;g=L;if(l.locations)for(;gb){var e=O(a);e.left=a;e.operator=H;a=m;q();e.right=Ra(Sa(),d,c);d=n(e,a===Wa||a===Xa?"LogicalExpression":"BinaryExpression");return Ra(d,b,c)}return a}function Sa(){if(m.prefix){var a=y(),b=m.isUpdate;a.operator=H;P=a.prefix= !0;q();a.argument=Sa();b?sa(a.argument):C&&"delete"===a.operator&&"Identifier"===a.argument.type&&c(a.start,"Deleting local variable in strict mode");return n(a,b?"UpdateExpression":"UnaryExpression")}for(b=ia(va());m.postfix&&!ra();)a=O(b),a.operator=H,a.prefix=!1,a.argument=b,sa(b),q(),b=n(a,"UpdateExpression");return b}function ia(a,b){if(t(xa)){var c=O(a);c.object=a;c.property=N(!0);c.computed=!1;return ia(n(c,"MemberExpression"),b)}return t(ka)?(c=O(a),c.object=a,c.property=A(),c.computed=!0, u(la),ia(n(c,"MemberExpression"),b)):!b&&t(I)?(c=O(a),c.callee=a,c.arguments=Ta(E,!1),ia(n(c,"CallExpression"),b)):a}function va(){switch(m){case vb:var a=y();q();return n(a,"ThisExpression");case U:return N();case aa:case ca:case Ba:return a=y(),a.value=H,a.raw=h.slice(w,W),q(),n(a,"Literal");case wb:case xb:case yb:return a=y(),a.value=m.atomValue,a.raw=m.keyword,q(),n(a,"Literal");case I:a=pa;var b=w;q();var d=A();d.start=b;d.end=W;l.locations&&(d.loc.start=a,d.loc.end=ja);l.ranges&&(d.range=[b, W]);u(E);return d;case ka:return a=y(),q(),a.elements=Ta(la,!0,!0),n(a,"ArrayExpression");case Y:a=y();b=!0;d=!1;a.properties=[];for(q();!t(R);){if(b)b=!1;else if(u(K),l.allowTrailingCommas&&t(R))break;var e={key:m===aa||m===ca?va():N(!0)},f=!1;if(t(Z)){e.value=A(!0);var g=e.kind="init"}else 5<=l.ecmaVersion&&"Identifier"===e.key.type&&("get"===e.key.name||"set"===e.key.name)?(f=d=!0,g=e.kind=e.key.name,e.key=m===aa||m===ca?va():N(!0),m!==I&&M(),e.value=Na(y(),!1)):M();if("Identifier"===e.key.type&& (C||d))for(var p=0;pd?a.id:a.params[d],(cb(e.name)||ta(e.name))&&c(e.start,"Defining '"+e.name+"' in strict mode"),0<=d)for(var f=0;fa?36===a:91>a?!0:97>a?95===a:123>a?!0:170<=a&&$a.test(String.fromCharCode(a))},bb=b.isIdentifierChar=function(a){return 48>a?36===a:58>a?!0:65>a?!1:91>a?!0:97>a?95===a:123>a?!0:170<=a&&Qb.test(String.fromCharCode(a))},ba,Ia={kind:"loop"},Pb={kind:"switch"}});var Interpreter=function(b,a){"string"===typeof b&&(b=acorn.parse(b,Interpreter.PARSE_OPTIONS));this.ast=b;this.initFunc_=a;this.paused_=!1;this.polyfills_=[];this.functionCounter_=0;this.stepFunctions_=Object.create(null);a=/^step([A-Z]\w*)$/;var c,d;for(d in this)"function"===typeof this[d]&&(c=d.match(a))&&(this.stepFunctions_[c[1]]=this[d].bind(this));this.global=this.createScope(this.ast,null);this.ast=acorn.parse(this.polyfills_.join("\n"),Interpreter.PARSE_OPTIONS);this.polyfills_=void 0;this.stripLocations_(this.ast, void 0,void 0);c=new Interpreter.State(this.ast,this.global);c.done=!1;this.stateStack=[c];this.run();this.value=void 0;this.ast=b;c=new Interpreter.State(this.ast,this.global);c.done=!1;this.stateStack.length=0;this.stateStack[0]=c;this.nodeConstructor=c.node.constructor;this.stateStack=this.stateStack};Interpreter.PARSE_OPTIONS={ecmaVersion:5};Interpreter.READONLY_DESCRIPTOR={configurable:!0,enumerable:!0,writable:!1};Interpreter.NONENUMERABLE_DESCRIPTOR={configurable:!0,enumerable:!1,writable:!0}; Interpreter.READONLY_NONENUMERABLE_DESCRIPTOR={configurable:!0,enumerable:!1,writable:!1};Interpreter.VARIABLE_DESCRIPTOR={configurable:!1,enumerable:!0,writable:!0};Interpreter.STEP_ERROR={STEP_ERROR:!0};Interpreter.SCOPE_REFERENCE={SCOPE_REFERENCE:!0};Interpreter.VALUE_IN_DESCRIPTOR={VALUE_IN_DESCRIPTOR:!0};Interpreter.REGEXP_TIMEOUT={REGEXP_TIMEOUT:!0};Interpreter.toStringCycles_=[];Interpreter.vm=null; Interpreter.WORKER_CODE=["onmessage = function(e) {","var result;","var data = e.data;","switch (data[0]) {","case 'split':","result = data[1].split(data[2], data[3]);","break;","case 'match':","result = data[1].match(data[2]);","break;","case 'search':","result = data[1].search(data[2]);","break;","case 'replace':","result = data[1].replace(data[2], data[3]);","break;","case 'exec':","var regexp = data[1];","regexp.lastIndex = data[2];","result = [regexp.exec(data[3]), data[1].lastIndex];","break;", "default:","throw 'Unknown RegExp operation: ' + data[0];","}","postMessage(result);","};"];Interpreter.prototype.REGEXP_MODE=2;Interpreter.prototype.REGEXP_THREAD_TIMEOUT=1E3; Interpreter.prototype.appendCode=function(b){var a=this.stateStack[0];if(!a||"Program"!==a.node.type)throw Error("Expecting original AST to start with a Program node.");"string"===typeof b&&(b=acorn.parse(b,Interpreter.PARSE_OPTIONS));if(!b||"Program"!==b.type)throw Error("Expecting new AST to start with a Program node.");this.populateScope_(b,a.scope);for(var c=0,d;d=b.body[c];c++)a.node.body.push(d);a.done=!1}; Interpreter.prototype.step=function(){var b=this.stateStack,a=b[b.length-1];if(!a)return!1;var c=a.node,d=c.type;if("Program"===d&&a.done)return!1;if(this.paused_)return!0;try{var e=this.stepFunctions_[d](b,a,c)}catch(f){if(f!==Interpreter.STEP_ERROR)throw f;}e&&b.push(e);return c.end?!0:this.step()};Interpreter.prototype.run=function(){for(;!this.paused_&&this.step(););return this.paused_}; Interpreter.prototype.initGlobalScope=function(b){this.setProperty(b,"NaN",NaN,Interpreter.READONLY_DESCRIPTOR);this.setProperty(b,"Infinity",Infinity,Interpreter.READONLY_DESCRIPTOR);this.setProperty(b,"undefined",void 0,Interpreter.READONLY_DESCRIPTOR);this.setProperty(b,"window",b,Interpreter.READONLY_DESCRIPTOR);this.setProperty(b,"this",b,Interpreter.READONLY_DESCRIPTOR);this.setProperty(b,"self",b);this.OBJECT_PROTO=new Interpreter.Object(null);this.FUNCTION_PROTO=new Interpreter.Object(this.OBJECT_PROTO); this.initFunction(b);this.initObject(b);b.proto=this.OBJECT_PROTO;this.setProperty(b,"constructor",this.OBJECT,Interpreter.NONENUMERABLE_DESCRIPTOR);this.initArray(b);this.initString(b);this.initBoolean(b);this.initNumber(b);this.initDate(b);this.initRegExp(b);this.initError(b);this.initMath(b);this.initJSON(b);var a=this,c=this.createNativeFunction(function(a){throw EvalError("Can't happen");},!1);c.eval=!0;this.setProperty(b,"eval",c);this.setProperty(b,"parseInt",this.createNativeFunction(parseInt, !1));this.setProperty(b,"parseFloat",this.createNativeFunction(parseFloat,!1));this.setProperty(b,"isNaN",this.createNativeFunction(isNaN,!1));this.setProperty(b,"isFinite",this.createNativeFunction(isFinite,!1));c=[[escape,"escape"],[unescape,"unescape"],[decodeURI,"decodeURI"],[decodeURIComponent,"decodeURIComponent"],[encodeURI,"encodeURI"],[encodeURIComponent,"encodeURIComponent"]];for(var d=0;d>> 0;","if (arguments.length > 1) T = thisArg;","k = 0;","while (k < len) {","if (k in O && !callbackfn.call(T, O[k], k, O)) return false;","k++;","}","return true;","}","});","Object.defineProperty(Array.prototype, 'filter',","{configurable: true, writable: true, value:","function(fun/*, thisArg*/) {", "if (this === void 0 || this === null || typeof fun !== 'function') throw TypeError();","var t = Object(this);","var len = t.length >>> 0;","var res = [];","var thisArg = arguments.length >= 2 ? arguments[1] : void 0;","for (var i = 0; i < len; i++) {","if (i in t) {","var val = t[i];","if (fun.call(thisArg, val, i, t)) res.push(val);","}","}","return res;","}","});","Object.defineProperty(Array.prototype, 'forEach',","{configurable: true, writable: true, value:","function(callback, thisArg) {","if (!this || typeof callback !== 'function') throw TypeError();", "var T, k;","var O = Object(this);","var len = O.length >>> 0;","if (arguments.length > 1) T = thisArg;","k = 0;","while (k < len) {","if (k in O) callback.call(T, O[k], k, O);","k++;","}","}","});","Object.defineProperty(Array.prototype, 'map',","{configurable: true, writable: true, value:","function(callback, thisArg) {","if (!this || typeof callback !== 'function') new TypeError;","var T, A, k;","var O = Object(this);","var len = O.length >>> 0;","if (arguments.length > 1) T = thisArg;","A = new Array(len);", "k = 0;","while (k < len) {","if (k in O) A[k] = callback.call(T, O[k], k, O);","k++;","}","return A;","}","});","Object.defineProperty(Array.prototype, 'reduce',","{configurable: true, writable: true, value:","function(callback /*, initialValue*/) {","if (!this || typeof callback !== 'function') throw TypeError();","var t = Object(this), len = t.length >>> 0, k = 0, value;","if (arguments.length === 2) {","value = arguments[1];","} else {","while (k < len && !(k in t)) k++;","if (k >= len) {","throw TypeError('Reduce of empty array with no initial value');", "}","value = t[k++];","}","for (; k < len; k++) {","if (k in t) value = callback(value, t[k], k, t);","}","return value;","}","});","Object.defineProperty(Array.prototype, 'reduceRight',","{configurable: true, writable: true, value:","function(callback /*, initialValue*/) {","if (null === this || 'undefined' === typeof this || 'function' !== typeof callback) throw TypeError();","var t = Object(this), len = t.length >>> 0, k = len - 1, value;","if (arguments.length >= 2) {","value = arguments[1];", "} else {","while (k >= 0 && !(k in t)) k--;","if (k < 0) {","throw TypeError('Reduce of empty array with no initial value');","}","value = t[k--];","}","for (; k >= 0; k--) {","if (k in t) value = callback(value, t[k], k, t);","}","return value;","}","});","Object.defineProperty(Array.prototype, 'some',","{configurable: true, writable: true, value:","function(fun/*, thisArg*/) {","if (!this || typeof fun !== 'function') throw TypeError();","var t = Object(this);","var len = t.length >>> 0;","var thisArg = arguments.length >= 2 ? arguments[1] : void 0;", "for (var i = 0; i < len; i++) {","if (i in t && fun.call(thisArg, t[i], i, t)) {","return true;","}","}","return false;","}","});","(function() {","var sort_ = Array.prototype.sort;","Array.prototype.sort = function(opt_comp) {","if (typeof opt_comp !== 'function') {","return sort_.call(this);","}","for (var i = 0; i < this.length; i++) {","var changes = 0;","for (var j = 0; j < this.length - i - 1; j++) {","if (opt_comp(this[j], this[j + 1]) > 0) {","var swap = this[j];","this[j] = this[j + 1];", "this[j + 1] = swap;","changes++;","}","}","if (!changes) break;","}","return this;","};","})();","Object.defineProperty(Array.prototype, 'toLocaleString',","{configurable: true, writable: true, value:","function() {","var out = [];","for (var i = 0; i < this.length; i++) {","out[i] = (this[i] === null || this[i] === undefined) ? '' : this[i].toLocaleString();","}","return out.join(',');","}","});","")}; Interpreter.prototype.initString=function(b){var a=this;var c=function(b){b=String(b);return a.calledWithNew()?(this.data=b,this):b};this.STRING=this.createNativeFunction(c,!0);this.setProperty(b,"String",this.STRING);this.setProperty(this.STRING,"fromCharCode",this.createNativeFunction(String.fromCharCode,!1),Interpreter.NONENUMERABLE_DESCRIPTOR);b="charAt charCodeAt concat indexOf lastIndexOf slice substr substring toLocaleLowerCase toLocaleUpperCase toLowerCase toUpperCase trim".split(" ");for(c= 0;c= 0; i--) {","str = str.substring(0, subs[i][0]) + subs[i][2] + str.substring(subs[i][0] + subs[i][1]);","}","} else {","var i = str.indexOf(substr);","if (i !== -1) {","var inject = newSubstr(str.substr(i, substr.length), i, str);", "str = str.substring(0, i) + inject + str.substring(i + substr.length);","}","}","return str;","};","})();","")};Interpreter.prototype.initBoolean=function(b){var a=this;this.BOOLEAN=this.createNativeFunction(function(b){b=!!b;return a.calledWithNew()?(this.data=b,this):b},!0);this.setProperty(b,"Boolean",this.BOOLEAN)}; Interpreter.prototype.initNumber=function(b){var a=this;var c=function(b){b=Number(b);return a.calledWithNew()?(this.data=b,this):b};this.NUMBER=this.createNativeFunction(c,!0);this.setProperty(b,"Number",this.NUMBER);b=["MAX_VALUE","MIN_VALUE","NaN","NEGATIVE_INFINITY","POSITIVE_INFINITY"];for(c=0;c>>0;return a===Number(b)?a:NaN};Interpreter.legalArrayIndex=function(b){var a=b>>>0;return String(a)===String(b)&&4294967295!==a?a:NaN}; Interpreter.Object=function(b){this.getter=Object.create(null);this.setter=Object.create(null);this.properties=Object.create(null);this.proto=b};Interpreter.Object.prototype.proto=null;Interpreter.Object.prototype.isObject=!0;Interpreter.Object.prototype.class="Object";Interpreter.Object.prototype.data=null; Interpreter.Object.prototype.toString=function(){if("Array"===this.class){var b=Interpreter.toStringCycles_;b.push(this);try{for(var a=[],c=0;ca.charCodeAt(0)&&this.isa(b,this.STRING)){var c=Interpreter.legalArrayIndex(a);if(!isNaN(c)&&c>=":d>>=e;break;case ">>>=":d>>>=e;break;case "&=":d&=e;break;case "^=":d^=e;break;case "|=":d|=e;break;default:throw SyntaxError("Unknown assignment expression: "+c.operator);}if(c=this.setValue(a.leftReference_,d))return a.doneSetter_= !0,a.setterValue_=d,this.createSetter_(c,a.leftReference_,d);b.pop();b[b.length-1].value=d}}; Interpreter.prototype.stepBinaryExpression=function(b,a,c){if(!a.doneLeft_)return a.doneLeft_=!0,new Interpreter.State(c.left,a.scope);if(!a.doneRight_)return a.doneRight_=!0,a.leftValue_=a.value,new Interpreter.State(c.right,a.scope);b.pop();var d=a.leftValue_;a=a.value;switch(c.operator){case "==":c=d==a;break;case "!=":c=d!=a;break;case "===":c=d===a;break;case "!==":c=d!==a;break;case ">":c=d>a;break;case ">=":c=d>=a;break;case "<":c=d>":c=d>>a;break;case ">>>":c=d>>>a;break;case "in":a&&a.isObject||this.throwException(this.TYPE_ERROR,"'in' expects an object, not '"+a+"'");c=this.hasProperty(a,d);break;case "instanceof":this.isa(a,this.FUNCTION)||this.throwException(this.TYPE_ERROR,"Right-hand side of instanceof is not an object");c=d.isObject?this.isa(d,a):!1;break; default:throw SyntaxError("Unknown binary operator: "+c.operator);}b[b.length-1].value=c};Interpreter.prototype.stepBlockStatement=function(b,a,c){var d=a.n_||0;if(c=c.body[d])return a.n_=d+1,new Interpreter.State(c,a.scope);b.pop()};Interpreter.prototype.stepBreakStatement=function(b,a,c){this.unwind(Interpreter.Completion.BREAK,void 0,c.label&&c.label.name)}; Interpreter.prototype.stepCallExpression=function(b,a,c){if(!a.doneCallee_){a.doneCallee_=1;var d=new Interpreter.State(c.callee,a.scope);d.components=!0;return d}if(1===a.doneCallee_){a.doneCallee_=2;d=a.value;if(Array.isArray(d)){if(a.func_=this.getValue(d),d[0]===Interpreter.SCOPE_REFERENCE?a.directEval_="eval"===d[1]:a.funcThis_=d[0],(d=a.func_)&&"object"===typeof d&&d.isGetter)return d.isGetter=!1,a.doneCallee_=1,this.createGetter_(d,a.value)}else a.func_=d;a.arguments_=[];a.n_=0}d=a.func_;if(!a.doneArgs_){0!== a.n_&&a.arguments_.push(a.value);if(c.arguments[a.n_])return new Interpreter.State(c.arguments[a.n_++],a.scope);if("NewExpression"===c.type){d.illegalConstructor&&this.throwException(this.TYPE_ERROR,d+" is not a constructor");var e=d.properties.prototype;if("object"!==typeof e||null===e)e=this.OBJECT_PROTO;a.funcThis_=this.createObjectProto(e);a.isConstructor=!0}else void 0===a.funcThis_&&(a.funcThis_=a.scope.strict?void 0:this.global);a.doneArgs_=!0}if(a.doneExec_)b.pop(),b[b.length-1].value=a.isConstructor&& "object"!==typeof a.value?a.funcThis_:a.value;else{a.doneExec_=!0;d&&d.isObject||this.throwException(this.TYPE_ERROR,d+" is not a function");if(b=d.node){c=this.createScope(b.body,d.parentScope);for(var f=0;ff?a.arguments_[f]:void 0);e=this.createObjectProto(this.ARRAY_PROTO);for(f=0;f