var b,l=l||{};l.global=this;l.exportPath_=function(a,c,d){a=a.split(".");d=d||l.global;a[0]in d||!d.execScript||d.execScript("var "+a[0]);for(var e;a.length&&(e=a.shift());)a.length||void 0===c?d=d[e]?d[e]:d[e]={}:d[e]=c};l.define=function(a,c){l.exportPath_(a,c)};l.DEBUG=!0;l.LOCALE="en";l.TRUSTED_SITE=!0;l.provide=function(a){l.exportPath_(a)};l.setTestOnly=function(a){if(!l.DEBUG)throw a=a||"",Error("Importing test-only code into non-debug environment"+a?": "+a:".");};l.forwardDeclare=function(){};
l.getObjectByName=function(a){a=a.split(".");for(var c=l.global,d;d=a.shift();)if(l.isDefAndNotNull(c[d]))c=c[d];else return null;return c};l.globalize=function(a,c){var d=c||l.global,e;for(e in a)d[e]=a[e]};l.addDependency=function(a,c,d){if(l.DEPENDENCIES_ENABLED){var e;a=a.replace(/\\/g,"/");for(var f=l.dependencies_,g=0;e=c[g];g++)f.nameToPath[e]=a,a in f.pathToNames||(f.pathToNames[a]={}),f.pathToNames[a][e]=!0;for(e=0;c=d[e];e++)a in f.requires||(f.requires[a]={}),f.requires[a][c]=!0}};
l.useStrictRequires=!1;l.ENABLE_DEBUG_LOADER=!0;l.require=function(){};l.basePath="";l.nullFunction=function(){};l.identityFunction=function(a){return a};l.abstractMethod=function(){throw Error("unimplemented abstract method");};l.addSingletonGetter=function(a){a.getInstance=function(){if(a.instance_)return a.instance_;l.DEBUG&&(l.instantiatedSingletons_[l.instantiatedSingletons_.length]=a);return a.instance_=new a}};l.instantiatedSingletons_=[];l.DEPENDENCIES_ENABLED=!1;
l.DEPENDENCIES_ENABLED&&(l.included_={},l.dependencies_={pathToNames:{},nameToPath:{},requires:{},visited:{},written:{}},l.inHtmlDocument_=function(){var a=l.global.document;return"undefined"!=typeof a&&"write"in a},l.findBasePath_=function(){if(l.global.CLOSURE_BASE_PATH)l.basePath=l.global.CLOSURE_BASE_PATH;else if(l.inHtmlDocument_())for(var a=l.global.document.getElementsByTagName("script"),c=a.length-1;0<=c;--c){var d=a[c].src,e=d.lastIndexOf("?"),e=-1==e?d.length:e;if("base.js"==d.substr(e-
7,7)){l.basePath=d.substr(0,e-7);break}}},l.importScript_=function(a){var c=l.global.CLOSURE_IMPORT_SCRIPT||l.writeScriptTag_;!l.dependencies_.written[a]&&c(a)&&(l.dependencies_.written[a]=!0)},l.writeScriptTag_=function(a){if(l.inHtmlDocument_()){var c=l.global.document;if("complete"==c.readyState){if(/\bdeps.js$/.test(a))return!1;throw Error('Cannot write "'+a+'" after document load');}c.write('<script type="text/javascript" src="'+a+'">\x3c/script>');return!0}return!1},l.writeScripts_=function(){function a(f){if(!(f in
e.written)){if(!(f in e.visited)&&(e.visited[f]=!0,f in e.requires))for(var h in e.requires[f])if(!l.isProvided_(h))if(h in e.nameToPath)a(e.nameToPath[h]);else throw Error("Undefined nameToPath for "+h);f in d||(d[f]=!0,c.push(f))}}var c=[],d={},e=l.dependencies_,f;for(f in l.included_)e.written[f]||a(f);for(f=0;f<c.length;f++)if(c[f])l.importScript_(l.basePath+c[f]);else throw Error("Undefined script input");},l.getPathFromDeps_=function(a){return a in l.dependencies_.nameToPath?l.dependencies_.nameToPath[a]:
null},l.findBasePath_(),l.global.CLOSURE_NO_DEPS||l.importScript_(l.basePath+"deps.js"));
l.typeOf=function(a){var c=typeof a;if("object"==c)if(a){if(a instanceof Array)return"array";if(a instanceof Object)return c;var d=Object.prototype.toString.call(a);if("[object Window]"==d)return"object";if("[object Array]"==d||"number"==typeof a.length&&"undefined"!=typeof a.splice&&"undefined"!=typeof a.propertyIsEnumerable&&!a.propertyIsEnumerable("splice"))return"array";if("[object Function]"==d||"undefined"!=typeof a.call&&"undefined"!=typeof a.propertyIsEnumerable&&!a.propertyIsEnumerable("call"))return"function"}else return"null";
else if("function"==c&&"undefined"==typeof a.call)return"object";return c};l.isDef=function(a){return void 0!==a};l.isNull=function(a){return null===a};l.isDefAndNotNull=function(a){return null!=a};l.isArray=function(a){return"array"==l.typeOf(a)};l.isArrayLike=function(a){var c=l.typeOf(a);return"array"==c||"object"==c&&"number"==typeof a.length};l.isDateLike=function(a){return l.isObject(a)&&"function"==typeof a.getFullYear};l.isString=function(a){return"string"==typeof a};
l.isBoolean=function(a){return"boolean"==typeof a};l.isNumber=function(a){return"number"==typeof a};l.isFunction=function(a){return"function"==l.typeOf(a)};l.isObject=function(a){var c=typeof a;return"object"==c&&null!=a||"function"==c};l.getUid=function(a){return a[l.UID_PROPERTY_]||(a[l.UID_PROPERTY_]=++l.uidCounter_)};l.hasUid=function(a){return!!a[l.UID_PROPERTY_]};l.removeUid=function(a){"removeAttribute"in a&&a.removeAttribute(l.UID_PROPERTY_);try{delete a[l.UID_PROPERTY_]}catch(c){}};
l.UID_PROPERTY_="closure_uid_"+(1E9*Math.random()>>>0);l.uidCounter_=0;l.getHashCode=l.getUid;l.removeHashCode=l.removeUid;l.cloneObject=function(a){var c=l.typeOf(a);if("object"==c||"array"==c){if(a.clone)return a.clone();var c="array"==c?[]:{},d;for(d in a)c[d]=l.cloneObject(a[d]);return c}return a};l.bindNative_=function(a,c,d){return a.call.apply(a.bind,arguments)};
l.bindJs_=function(a,c,d){if(!a)throw Error();if(2<arguments.length){var e=Array.prototype.slice.call(arguments,2);return function(){var d=Array.prototype.slice.call(arguments);Array.prototype.unshift.apply(d,e);return a.apply(c,d)}}return function(){return a.apply(c,arguments)}};l.bind=function(a,c,d){Function.prototype.bind&&-1!=Function.prototype.bind.toString().indexOf("native code")?l.bind=l.bindNative_:l.bind=l.bindJs_;return l.bind.apply(null,arguments)};
l.partial=function(a,c){var d=Array.prototype.slice.call(arguments,1);return function(){var c=d.slice();c.push.apply(c,arguments);return a.apply(this,c)}};l.mixin=function(a,c){for(var d in c)a[d]=c[d]};l.now=l.TRUSTED_SITE&&Date.now||function(){return+new Date};
l.globalEval=function(a){if(l.global.execScript)l.global.execScript(a,"JavaScript");else if(l.global.eval)if(null==l.evalWorksForGlobals_&&(l.global.eval("var _et_ = 1;"),"undefined"!=typeof l.global._et_?(delete l.global._et_,l.evalWorksForGlobals_=!0):l.evalWorksForGlobals_=!1),l.evalWorksForGlobals_)l.global.eval(a);else{var c=l.global.document,d=c.createElement("script");d.type="text/javascript";d.defer=!1;d.appendChild(c.createTextNode(a));c.body.appendChild(d);c.body.removeChild(d)}else throw Error("goog.globalEval not available");
};l.evalWorksForGlobals_=null;l.getCssName=function(a,c){var d=function(a){return l.cssNameMapping_[a]||a},e=function(a){a=a.split("-");for(var c=[],e=0;e<a.length;e++)c.push(d(a[e]));return c.join("-")},e=l.cssNameMapping_?"BY_WHOLE"==l.cssNameMappingStyle_?d:e:function(a){return a};return c?a+"-"+e(c):e(a)};l.setCssNameMapping=function(a,c){l.cssNameMapping_=a;l.cssNameMappingStyle_=c};
l.getMsg=function(a,c){var d=c||{},e;for(e in d){var f=(""+d[e]).replace(/\$/g,"$$$$");a=a.replace(RegExp("\\{\\$"+e+"\\}","gi"),f)}return a};l.getMsgWithFallback=function(a){return a};l.exportSymbol=function(a,c,d){l.exportPath_(a,c,d)};l.exportProperty=function(a,c,d){a[c]=d};
l.inherits=function(a,c){function d(){}d.prototype=c.prototype;a.superClass_=c.prototype;a.prototype=new d;a.prototype.constructor=a;a.base=function(a,d,g){var h=Array.prototype.slice.call(arguments,2);return c.prototype[d].apply(a,h)}};
l.base=function(a,c,d){var e=arguments.callee.caller;if(l.DEBUG&&!e)throw Error("arguments.caller not defined.  goog.base() expects not to be running in strict mode. See http://www.ecma-international.org/ecma-262/5.1/#sec-C");if(e.superClass_)return e.superClass_.constructor.apply(a,Array.prototype.slice.call(arguments,1));for(var f=Array.prototype.slice.call(arguments,2),g=!1,h=a.constructor;h;h=h.superClass_&&h.superClass_.constructor)if(h.prototype[c]===e)g=!0;else if(g)return h.prototype[c].apply(a,
f);if(a[c]===e)return a.constructor.prototype[c].apply(a,f);throw Error("goog.base called from a method of one name to a method of a different name");};l.scope=function(a){a.call(l.global)};l.MODIFY_FUNCTION_PROTOTYPES=!0;
l.MODIFY_FUNCTION_PROTOTYPES&&(Function.prototype.bind=Function.prototype.bind||function(a,c){if(1<arguments.length){var d=Array.prototype.slice.call(arguments,1);d.unshift(this,a);return l.bind.apply(null,d)}return l.bind(this,a)},Function.prototype.partial=function(a){var c=Array.prototype.slice.call(arguments);c.unshift(this,null);return l.bind.apply(null,c)},Function.prototype.inherits=function(a){l.inherits(this,a)},Function.prototype.mixin=function(a){l.mixin(this.prototype,a)});l.craw={};l.craw.AppBackgroundDelegate=function(){};l.craw.AppBackgroundDelegate.impl_=l.craw.AppBackgroundDelegate;l.craw.AppBackgroundDelegate.setImpl=function(){l.craw.AppBackgroundDelegate.impl_=n.BackgroundDelegate};l.craw.AppBackgroundDelegate.createImpl=function(){return new l.craw.AppBackgroundDelegate.impl_};l.craw.AppBackgroundDelegate.prototype.getDefaultUrl=function(){return null};l.craw.AppBackgroundDelegate.prototype.getWindowBounds=function(){};l.craw.WindowConfig=function(a,c){this.url_=a;this.useAuth_=c};l.craw.WindowConfig.prototype.getUrl=function(){return this.url_};l.craw.WindowConfig.prototype.getUseAuth=function(){return this.useAuth_};var n={Errors:{}};n.Errors.ErrorTypes={MINT_JWT_ERROR:"MINT_JWT_ERROR",PURCHASE_CANCELED:"PURCHASE_CANCELED",GET_PURCHASES_ERROR:"GET_PURCHASES_ERROR",GET_SKU_DETAILS_ERROR:"GET_SKU_DETAILS_ERROR",ENV_NOT_SUPPORTED_ERROR:"ENV_NOT_SUPPORTED_ERROR",TOKEN_MISSING_ERROR:"TOKEN_MISSING_ERROR",INVALID_RESPONSE_ERROR:"INVALID_RESPONSE_ERROR"};n.Errors.getErrorResponse=function(a){return{request:{},response:{errorType:a}}};l.debug={};l.debug.Error=function(a){if(Error.captureStackTrace)Error.captureStackTrace(this,l.debug.Error);else{var c=Error().stack;c&&(this.stack=c)}a&&(this.message=String(a))};l.inherits(l.debug.Error,Error);l.debug.Error.prototype.name="CustomError";l.dom={};l.dom.NodeType={ELEMENT:1,ATTRIBUTE:2,TEXT:3,CDATA_SECTION:4,ENTITY_REFERENCE:5,ENTITY:6,PROCESSING_INSTRUCTION:7,COMMENT:8,DOCUMENT:9,DOCUMENT_TYPE:10,DOCUMENT_FRAGMENT:11,NOTATION:12};l.string={};l.string.Unicode={NBSP:"\u00a0"};l.string.startsWith=function(a,c){return 0==a.lastIndexOf(c,0)};l.string.endsWith=function(a){var c=a.length-1;return 0<=c&&a.indexOf("/",c)==c};l.string.caseInsensitiveStartsWith=function(a,c){return 0==l.string.caseInsensitiveCompare(c,a.substr(0,c.length))};l.string.caseInsensitiveEndsWith=function(a,c){return 0==l.string.caseInsensitiveCompare(c,a.substr(a.length-c.length,c.length))};
l.string.caseInsensitiveEquals=function(a){return l.net.XhrIo.CONTENT_TYPE_HEADER.toLowerCase()==a.toLowerCase()};l.string.subs=function(a,c){for(var d=a.split("%s"),e="",f=Array.prototype.slice.call(arguments,1);f.length&&1<d.length;)e+=d.shift()+f.shift();return e+d.join("%s")};l.string.collapseWhitespace=function(a){return a.replace(/[\s\xa0]+/g," ").replace(/^\s+|\s+$/g,"")};l.string.isEmpty=function(a){return/^[\s\xa0]*$/.test(a)};l.string.isEmptySafe=function(a){return l.string.isEmpty(l.string.makeSafe(a))};
l.string.isBreakingWhitespace=function(a){return!/[^\t\n\r ]/.test(a)};l.string.isAlpha=function(a){return!/[^a-zA-Z]/.test(a)};l.string.isNumeric=function(a){return!/[^0-9]/.test(a)};l.string.isAlphaNumeric=function(a){return!/[^a-zA-Z0-9]/.test(a)};l.string.isSpace=function(a){return" "==a};l.string.isUnicodeChar=function(a){return 1==a.length&&" "<=a&&"~">=a||"\u0080"<=a&&"\ufffd">=a};l.string.stripNewlines=function(a){return a.replace(/(\r\n|\r|\n)+/g," ")};
l.string.canonicalizeNewlines=function(a){return a.replace(/(\r\n|\r|\n)/g,"\n")};l.string.normalizeWhitespace=function(a){return a.replace(/\xa0|\s/g," ")};l.string.normalizeSpaces=function(a){return a.replace(/\xa0|[ \t]+/g," ")};l.string.collapseBreakingSpaces=function(a){return a.replace(/[\t\r\n ]+/g," ").replace(/^[\t\r\n ]+|[\t\r\n ]+$/g,"")};l.string.trim=function(a){return a.replace(/^[\s\xa0]+|[\s\xa0]+$/g,"")};l.string.trimLeft=function(a){return a.replace(/^[\s\xa0]+/,"")};
l.string.trimRight=function(a){return a.replace(/[\s\xa0]+$/,"")};l.string.caseInsensitiveCompare=function(a,c){var d=String(a).toLowerCase(),e=String(c).toLowerCase();return d<e?-1:d==e?0:1};l.string.numerateCompareRegExp_=/(\.\d+)|(\d+)|(\D+)/g;
l.string.numerateCompare=function(a,c){if(a==c)return 0;if(!a)return-1;if(!c)return 1;for(var d=a.toLowerCase().match(l.string.numerateCompareRegExp_),e=c.toLowerCase().match(l.string.numerateCompareRegExp_),f=Math.min(d.length,e.length),g=0;g<f;g++){var h=d[g],k=e[g];if(h!=k)return d=parseInt(h,10),!isNaN(d)&&(e=parseInt(k,10),!isNaN(e)&&d-e)?d-e:h<k?-1:1}return d.length!=e.length?d.length-e.length:a<c?-1:1};l.string.urlEncode=function(a){return encodeURIComponent(String(a))};
l.string.urlDecode=function(a){return decodeURIComponent(a.replace(/\+/g," "))};l.string.newLineToBr=function(a,c){return a.replace(/(\r\n|\r|\n)/g,c?"<br />":"<br>")};
l.string.htmlEscape=function(a){if(!l.string.allRe_.test(a))return a;-1!=a.indexOf("&")&&(a=a.replace(l.string.amperRe_,"&amp;"));-1!=a.indexOf("<")&&(a=a.replace(l.string.ltRe_,"&lt;"));-1!=a.indexOf(">")&&(a=a.replace(l.string.gtRe_,"&gt;"));-1!=a.indexOf('"')&&(a=a.replace(l.string.quotRe_,"&quot;"));-1!=a.indexOf("'")&&(a=a.replace(l.string.singleQuoteRe_,"&#39;"));return a};l.string.amperRe_=/&/g;l.string.ltRe_=/</g;l.string.gtRe_=/>/g;l.string.quotRe_=/"/g;l.string.singleQuoteRe_=/'/g;
l.string.allRe_=/[&<>"']/;l.string.unescapeEntities=function(a){return l.string.contains(a,"&")?"document"in l.global?l.string.unescapeEntitiesUsingDom_(a):l.string.unescapePureXmlEntities_(a):a};l.string.unescapeEntitiesWithDocument=function(a,c){return l.string.contains(a,"&")?l.string.unescapeEntitiesUsingDom_(a,c):a};
l.string.unescapeEntitiesUsingDom_=function(a,c){var d={"&amp;":"&","&lt;":"<","&gt;":">","&quot;":'"'},e;e=c?c.createElement("div"):document.createElement("div");return a.replace(l.string.HTML_ENTITY_PATTERN_,function(a,c){var h=d[a];if(h)return h;if("#"==c.charAt(0)){var k=Number("0"+c.substr(1));isNaN(k)||(h=String.fromCharCode(k))}h||(e.innerHTML=a+" ",h=e.firstChild.nodeValue.slice(0,-1));return d[a]=h})};
l.string.unescapePureXmlEntities_=function(a){return a.replace(/&([^;]+);/g,function(a,d){switch(d){case "amp":return"&";case "lt":return"<";case "gt":return">";case "quot":return'"';default:if("#"==d.charAt(0)){var e=Number("0"+d.substr(1));if(!isNaN(e))return String.fromCharCode(e)}return a}})};l.string.HTML_ENTITY_PATTERN_=/&([^;\s<&]+);?/g;l.string.whitespaceEscape=function(a,c){return l.string.newLineToBr(a.replace(/  /g," &#160;"),c)};
l.string.stripQuotes=function(a,c){for(var d=c.length,e=0;e<d;e++){var f=1==d?c:c.charAt(e);if(a.charAt(0)==f&&a.charAt(a.length-1)==f)return a.substring(1,a.length-1)}return a};l.string.truncate=function(a,c,d){d&&(a=l.string.unescapeEntities(a));a.length>c&&(a=a.substring(0,c-3)+"...");d&&(a=l.string.htmlEscape(a));return a};
l.string.truncateMiddle=function(a,c,d,e){d&&(a=l.string.unescapeEntities(a));if(e&&a.length>c)e>c&&(e=c),a=a.substring(0,c-e)+"..."+a.substring(a.length-e);else if(a.length>c){e=Math.floor(c/2);var f=a.length-e;a=a.substring(0,e+c%2)+"..."+a.substring(f)}d&&(a=l.string.htmlEscape(a));return a};l.string.specialEscapeChars_={"\x00":"\\0","\b":"\\b","\f":"\\f","\n":"\\n","\r":"\\r","\t":"\\t","\x0B":"\\x0B",'"':'\\"',"\\":"\\\\"};l.string.jsEscapeCache_={"'":"\\'"};
l.string.quote=function(a){a=String(a);if(a.quote)return a.quote();for(var c=['"'],d=0;d<a.length;d++){var e=a.charAt(d),f=e.charCodeAt(0);c[d+1]=l.string.specialEscapeChars_[e]||(31<f&&127>f?e:l.string.escapeChar(e))}c.push('"');return c.join("")};l.string.escapeString=function(a){for(var c=[],d=0;d<a.length;d++)c[d]=l.string.escapeChar(a.charAt(d));return c.join("")};
l.string.escapeChar=function(a){if(a in l.string.jsEscapeCache_)return l.string.jsEscapeCache_[a];if(a in l.string.specialEscapeChars_)return l.string.jsEscapeCache_[a]=l.string.specialEscapeChars_[a];var c=a,d=a.charCodeAt(0);if(31<d&&127>d)c=a;else{if(256>d){if(c="\\x",16>d||256<d)c+="0"}else c="\\u",4096>d&&(c+="0");c+=d.toString(16).toUpperCase()}return l.string.jsEscapeCache_[a]=c};l.string.toMap=function(a){for(var c={},d=0;d<a.length;d++)c[a.charAt(d)]=!0;return c};
l.string.contains=function(a,c){return-1!=a.indexOf(c)};l.string.countOf=function(a,c){return a&&c?a.split(c).length-1:0};l.string.removeAt=function(a,c,d){var e=a;0<=c&&c<a.length&&0<d&&(e=a.substr(0,c)+a.substr(c+d,a.length-c-d));return e};l.string.remove=function(a,c){var d=RegExp(l.string.regExpEscape(c),"");return a.replace(d,"")};l.string.removeAll=function(a,c){var d=RegExp(l.string.regExpEscape(c),"g");return a.replace(d,"")};
l.string.regExpEscape=function(a){return String(a).replace(/([-()\[\]{}+?*.$\^|,:#<!\\])/g,"\\$1").replace(/\x08/g,"\\x08")};l.string.repeat=function(a,c){return Array(c+1).join(a)};l.string.padNumber=function(a,c,d){a=l.isDef(d)?a.toFixed(d):String(a);d=a.indexOf(".");-1==d&&(d=a.length);return l.string.repeat("0",Math.max(0,c-d))+a};l.string.makeSafe=function(a){return null==a?"":String(a)};l.string.buildString=function(a){return Array.prototype.join.call(arguments,"")};
l.string.getRandomString=function(){return Math.floor(2147483648*Math.random()).toString(36)+Math.abs(Math.floor(2147483648*Math.random())^l.now()).toString(36)};
l.string.compareVersions=function(a,c){for(var d=0,e=l.string.trim(String(a)).split("."),f=l.string.trim(String(c)).split("."),g=Math.max(e.length,f.length),h=0;0==d&&h<g;h++){var k=e[h]||"",m=f[h]||"",p=RegExp("(\\d*)(\\D*)","g"),J=RegExp("(\\d*)(\\D*)","g");do{var v=p.exec(k)||["","",""],u=J.exec(m)||["","",""];if(0==v[0].length&&0==u[0].length)break;d=l.string.compareElements_(0==v[1].length?0:parseInt(v[1],10),0==u[1].length?0:parseInt(u[1],10))||l.string.compareElements_(0==v[2].length,0==u[2].length)||
l.string.compareElements_(v[2],u[2])}while(0==d)}return d};l.string.compareElements_=function(a,c){return a<c?-1:a>c?1:0};l.string.HASHCODE_MAX_=4294967296;l.string.hashCode=function(a){for(var c=0,d=0;d<a.length;++d)c=31*c+a.charCodeAt(d),c%=l.string.HASHCODE_MAX_;return c};l.string.uniqueStringCounter_=2147483648*Math.random()|0;l.string.createUniqueString=function(){return"goog_"+l.string.uniqueStringCounter_++};
l.string.toNumber=function(a){var c=Number(a);return 0==c&&l.string.isEmpty(a)?NaN:c};l.string.isLowerCamelCase=function(a){return/^[a-z]+([A-Z][a-z]*)*$/.test(a)};l.string.isUpperCamelCase=function(a){return/^([A-Z][a-z]*)+$/.test(a)};l.string.toCamelCase=function(a){return String(a).replace(/\-([a-z])/g,function(a,d){return d.toUpperCase()})};l.string.toSelectorCase=function(a){return String(a).replace(/([A-Z])/g,"-$1").toLowerCase()};
l.string.toTitleCase=function(a,c){var d=l.isString(c)?l.string.regExpEscape(c):"\\s";return a.replace(RegExp("(^"+(d?"|["+d+"]+":"")+")([a-z])","g"),function(a,c,d){return c+d.toUpperCase()})};l.string.parseInt=function(a){isFinite(a)&&(a=String(a));return l.isString(a)?/^\s*-?0x/i.test(a)?parseInt(a,16):parseInt(a,10):NaN};l.string.splitLimit=function(a,c,d){a=a.split(c);for(var e=[];0<d&&a.length;)e.push(a.shift()),d--;a.length&&e.push(a.join(c));return e};l.asserts={};l.asserts.ENABLE_ASSERTS=l.DEBUG;l.asserts.AssertionError=function(a,c){c.unshift(a);l.debug.Error.call(this,l.string.subs.apply(null,c));c.shift()};l.inherits(l.asserts.AssertionError,l.debug.Error);l.asserts.AssertionError.prototype.name="AssertionError";l.asserts.doAssertFailure_=function(a,c,d,e){var f="Assertion failed";if(d)var f=f+(": "+d),g=e;else a&&(f+=": "+a,g=c);throw new l.asserts.AssertionError(""+f,g||[]);};
l.asserts.assert=function(a,c,d){l.asserts.ENABLE_ASSERTS&&!a&&l.asserts.doAssertFailure_("",null,c,Array.prototype.slice.call(arguments,2));return a};l.asserts.fail=function(a,c){if(l.asserts.ENABLE_ASSERTS)throw new l.asserts.AssertionError("Failure"+(a?": "+a:""),Array.prototype.slice.call(arguments,1));};
l.asserts.assertNumber=function(a,c,d){l.asserts.ENABLE_ASSERTS&&!l.isNumber(a)&&l.asserts.doAssertFailure_("Expected number but got %s: %s.",[l.typeOf(a),a],c,Array.prototype.slice.call(arguments,2));return a};l.asserts.assertString=function(a,c,d){l.asserts.ENABLE_ASSERTS&&!l.isString(a)&&l.asserts.doAssertFailure_("Expected string but got %s: %s.",[l.typeOf(a),a],c,Array.prototype.slice.call(arguments,2));return a};
l.asserts.assertFunction=function(a,c,d){l.asserts.ENABLE_ASSERTS&&!l.isFunction(a)&&l.asserts.doAssertFailure_("Expected function but got %s: %s.",[l.typeOf(a),a],c,Array.prototype.slice.call(arguments,2));return a};l.asserts.assertObject=function(a,c,d){l.asserts.ENABLE_ASSERTS&&!l.isObject(a)&&l.asserts.doAssertFailure_("Expected object but got %s: %s.",[l.typeOf(a),a],c,Array.prototype.slice.call(arguments,2));return a};
l.asserts.assertArray=function(a,c,d){l.asserts.ENABLE_ASSERTS&&!l.isArray(a)&&l.asserts.doAssertFailure_("Expected array but got %s: %s.",[l.typeOf(a),a],c,Array.prototype.slice.call(arguments,2))};l.asserts.assertBoolean=function(a,c,d){l.asserts.ENABLE_ASSERTS&&!l.isBoolean(a)&&l.asserts.doAssertFailure_("Expected boolean but got %s: %s.",[l.typeOf(a),a],c,Array.prototype.slice.call(arguments,2));return a};
l.asserts.assertElement=function(a,c,d){!l.asserts.ENABLE_ASSERTS||l.isObject(a)&&a.nodeType==l.dom.NodeType.ELEMENT||l.asserts.doAssertFailure_("Expected Element but got %s: %s.",[l.typeOf(a),a],c,Array.prototype.slice.call(arguments,2));return a};l.asserts.assertInstanceof=function(a,c,d,e){!l.asserts.ENABLE_ASSERTS||a instanceof c||l.asserts.doAssertFailure_("instanceof check failed.",null,d,Array.prototype.slice.call(arguments,3));return a};
l.asserts.assertObjectPrototypeIsIntact=function(){for(var a in Object.prototype)l.asserts.fail(a+" should not be enumerable in Object.prototype.")};l.array={};l.NATIVE_ARRAY_PROTOTYPES=l.TRUSTED_SITE;l.array.ASSUME_NATIVE_FUNCTIONS=!1;l.array.peek=function(a){return a[a.length-1]};l.array.ARRAY_PROTOTYPE_=Array.prototype;
l.array.indexOf=l.NATIVE_ARRAY_PROTOTYPES&&(l.array.ASSUME_NATIVE_FUNCTIONS||l.array.ARRAY_PROTOTYPE_.indexOf)?function(a,c,d){l.asserts.assert(null!=a.length);return l.array.ARRAY_PROTOTYPE_.indexOf.call(a,c,d)}:function(a,c,d){d=null==d?0:0>d?Math.max(0,a.length+d):d;if(l.isString(a))return l.isString(c)&&1==c.length?a.indexOf(c,d):-1;for(;d<a.length;d++)if(d in a&&a[d]===c)return d;return-1};
l.array.lastIndexOf=l.NATIVE_ARRAY_PROTOTYPES&&(l.array.ASSUME_NATIVE_FUNCTIONS||l.array.ARRAY_PROTOTYPE_.lastIndexOf)?function(a,c,d){l.asserts.assert(null!=a.length);return l.array.ARRAY_PROTOTYPE_.lastIndexOf.call(a,c,null==d?a.length-1:d)}:function(a,c,d){d=null==d?a.length-1:d;0>d&&(d=Math.max(0,a.length+d));if(l.isString(a))return l.isString(c)&&1==c.length?a.lastIndexOf(c,d):-1;for(;0<=d;d--)if(d in a&&a[d]===c)return d;return-1};
l.array.forEach=l.NATIVE_ARRAY_PROTOTYPES&&(l.array.ASSUME_NATIVE_FUNCTIONS||l.array.ARRAY_PROTOTYPE_.forEach)?function(a,c,d){l.asserts.assert(null!=a.length);l.array.ARRAY_PROTOTYPE_.forEach.call(a,c,d)}:function(a,c,d){for(var e=a.length,f=l.isString(a)?a.split(""):a,g=0;g<e;g++)g in f&&c.call(d,f[g],g,a)};l.array.forEachRight=function(a,c){for(var d=a.length,e=l.isString(a)?a.split(""):a,d=d-1;0<=d;--d)d in e&&c.call(void 0,e[d],d,a)};
l.array.filter=l.NATIVE_ARRAY_PROTOTYPES&&(l.array.ASSUME_NATIVE_FUNCTIONS||l.array.ARRAY_PROTOTYPE_.filter)?function(a,c,d){l.asserts.assert(null!=a.length);return l.array.ARRAY_PROTOTYPE_.filter.call(a,c,d)}:function(a,c,d){for(var e=a.length,f=[],g=0,h=l.isString(a)?a.split(""):a,k=0;k<e;k++)if(k in h){var m=h[k];c.call(d,m,k,a)&&(f[g++]=m)}return f};
l.array.map=l.NATIVE_ARRAY_PROTOTYPES&&(l.array.ASSUME_NATIVE_FUNCTIONS||l.array.ARRAY_PROTOTYPE_.map)?function(a,c,d){l.asserts.assert(null!=a.length);return l.array.ARRAY_PROTOTYPE_.map.call(a,c,d)}:function(a,c,d){for(var e=a.length,f=Array(e),g=l.isString(a)?a.split(""):a,h=0;h<e;h++)h in g&&(f[h]=c.call(d,g[h],h,a));return f};
l.array.reduce=l.NATIVE_ARRAY_PROTOTYPES&&(l.array.ASSUME_NATIVE_FUNCTIONS||l.array.ARRAY_PROTOTYPE_.reduce)?function(a,c,d,e){l.asserts.assert(null!=a.length);e&&(c=l.bind(c,e));return l.array.ARRAY_PROTOTYPE_.reduce.call(a,c,d)}:function(a,c,d,e){var f=d;l.array.forEach(a,function(d,h){f=c.call(e,f,d,h,a)});return f};
l.array.reduceRight=l.NATIVE_ARRAY_PROTOTYPES&&(l.array.ASSUME_NATIVE_FUNCTIONS||l.array.ARRAY_PROTOTYPE_.reduceRight)?function(a,c,d,e){l.asserts.assert(null!=a.length);e&&(c=l.bind(c,e));return l.array.ARRAY_PROTOTYPE_.reduceRight.call(a,c,d)}:function(a,c,d,e){var f=d;l.array.forEachRight(a,function(d,h){f=c.call(e,f,d,h,a)});return f};
l.array.some=l.NATIVE_ARRAY_PROTOTYPES&&(l.array.ASSUME_NATIVE_FUNCTIONS||l.array.ARRAY_PROTOTYPE_.some)?function(a,c,d){l.asserts.assert(null!=a.length);return l.array.ARRAY_PROTOTYPE_.some.call(a,c,d)}:function(a,c,d){for(var e=a.length,f=l.isString(a)?a.split(""):a,g=0;g<e;g++)if(g in f&&c.call(d,f[g],g,a))return!0;return!1};
l.array.every=l.NATIVE_ARRAY_PROTOTYPES&&(l.array.ASSUME_NATIVE_FUNCTIONS||l.array.ARRAY_PROTOTYPE_.every)?function(a,c,d){l.asserts.assert(null!=a.length);return l.array.ARRAY_PROTOTYPE_.every.call(a,c,d)}:function(a,c,d){for(var e=a.length,f=l.isString(a)?a.split(""):a,g=0;g<e;g++)if(g in f&&!c.call(d,f[g],g,a))return!1;return!0};l.array.count=function(a,c,d){var e=0;l.array.forEach(a,function(a,g,h){c.call(d,a,g,h)&&++e},d);return e};
l.array.find=function(a,c,d){c=l.array.findIndex(a,c,d);return 0>c?null:l.isString(a)?a.charAt(c):a[c]};l.array.findIndex=function(a,c,d){for(var e=a.length,f=l.isString(a)?a.split(""):a,g=0;g<e;g++)if(g in f&&c.call(d,f[g],g,a))return g;return-1};l.array.findRight=function(a,c,d){c=l.array.findIndexRight(a,c,d);return 0>c?null:l.isString(a)?a.charAt(c):a[c]};
l.array.findIndexRight=function(a,c,d){for(var e=a.length,f=l.isString(a)?a.split(""):a,e=e-1;0<=e;e--)if(e in f&&c.call(d,f[e],e,a))return e;return-1};l.array.contains=function(a,c){return 0<=l.array.indexOf(a,c)};l.array.isEmpty=function(a){return 0==a.length};l.array.clear=function(a){if(!l.isArray(a))for(var c=a.length-1;0<=c;c--)delete a[c];a.length=0};l.array.insert=function(a,c){l.array.contains(a,c)||a.push(c)};l.array.insertAt=function(a,c,d){l.array.splice(a,d,0,c)};
l.array.insertArrayAt=function(a,c,d){l.partial(l.array.splice,a,d,0).apply(null,c)};l.array.insertBefore=function(a,c,d){var e;2==arguments.length||0>(e=l.array.indexOf(a,d))?a.push(c):l.array.insertAt(a,c,e)};l.array.remove=function(a,c){var d=l.array.indexOf(a,c),e;(e=0<=d)&&l.array.removeAt(a,d);return e};l.array.removeAt=function(a,c){l.asserts.assert(null!=a.length);return 1==l.array.ARRAY_PROTOTYPE_.splice.call(a,c,1).length};
l.array.removeIf=function(a,c,d){c=l.array.findIndex(a,c,d);return 0<=c?(l.array.removeAt(a,c),!0):!1};l.array.concat=function(a){return l.array.ARRAY_PROTOTYPE_.concat.apply(l.array.ARRAY_PROTOTYPE_,arguments)};l.array.toArray=function(a){var c=a.length;if(0<c){for(var d=Array(c),e=0;e<c;e++)d[e]=a[e];return d}return[]};l.array.clone=l.array.toArray;
l.array.extend=function(a,c){for(var d=1;d<arguments.length;d++){var e=arguments[d],f;if(l.isArray(e)||(f=l.isArrayLike(e))&&Object.prototype.hasOwnProperty.call(e,"callee"))a.push.apply(a,e);else if(f)for(var g=a.length,h=e.length,k=0;k<h;k++)a[g+k]=e[k];else a.push(e)}};l.array.splice=function(a,c,d,e){l.asserts.assert(null!=a.length);return l.array.ARRAY_PROTOTYPE_.splice.apply(a,l.array.slice(arguments,1))};
l.array.slice=function(a,c,d){l.asserts.assert(null!=a.length);return 2>=arguments.length?l.array.ARRAY_PROTOTYPE_.slice.call(a,c):l.array.ARRAY_PROTOTYPE_.slice.call(a,c,d)};l.array.removeDuplicates=function(a,c){for(var d=c||a,e={},f=0,g=0;g<a.length;){var h=a[g++],k=l.isObject(h)?"o"+l.getUid(h):(typeof h).charAt(0)+h;Object.prototype.hasOwnProperty.call(e,k)||(e[k]=!0,d[f++]=h)}d.length=f};l.array.binarySearch=function(a,c,d){return l.array.binarySearch_(a,d||l.array.defaultCompare,!1,c)};
l.array.binarySelect=function(a,c,d){return l.array.binarySearch_(a,c,!0,void 0,d)};l.array.binarySearch_=function(a,c,d,e,f){for(var g=0,h=a.length,k;g<h;){var m=g+h>>1,p;p=d?c.call(f,a[m],m,a):c(e,a[m]);0<p?g=m+1:(h=m,k=!p)}return k?g:~g};l.array.sort=function(a,c){a.sort(c||l.array.defaultCompare)};
l.array.stableSort=function(a,c){for(var d=0;d<a.length;d++)a[d]={index:d,value:a[d]};var e=c||l.array.defaultCompare;l.array.sort(a,function(a,c){return e(a.value,c.value)||a.index-c.index});for(d=0;d<a.length;d++)a[d]=a[d].value};l.array.sortObjectsByKey=function(a,c,d){var e=d||l.array.defaultCompare;l.array.sort(a,function(a,d){return e(a[c],d[c])})};l.array.isSorted=function(a){for(var c=l.array.defaultCompare,d=1;d<a.length;d++)if(0<c(a[d-1],a[d]))return!1;return!0};
l.array.equals=function(a,c,d){if(!l.isArrayLike(a)||!l.isArrayLike(c)||a.length!=c.length)return!1;var e=a.length;d=d||l.array.defaultCompareEquality;for(var f=0;f<e;f++)if(!d(a[f],c[f]))return!1;return!0};l.array.compare3=function(a,c,d){d=d||l.array.defaultCompare;for(var e=Math.min(a.length,c.length),f=0;f<e;f++){var g=d(a[f],c[f]);if(0!=g)return g}return l.array.defaultCompare(a.length,c.length)};l.array.defaultCompare=function(a,c){return a>c?1:a<c?-1:0};
l.array.defaultCompareEquality=function(a,c){return a===c};l.array.binaryInsert=function(a,c,d){d=l.array.binarySearch(a,c,d);return 0>d?(l.array.insertAt(a,c,-(d+1)),!0):!1};l.array.binaryRemove=function(a,c,d){c=l.array.binarySearch(a,c,d);return 0<=c?l.array.removeAt(a,c):!1};l.array.bucket=function(a,c,d){for(var e={},f=0;f<a.length;f++){var g=a[f],h=c.call(d,g,f,a);l.isDef(h)&&(e[h]||(e[h]=[])).push(g)}return e};
l.array.toObject=function(a,c,d){var e={};l.array.forEach(a,function(f,g){e[c.call(d,f,g,a)]=f});return e};l.array.range=function(a,c,d){var e=[],f=0,g=a;d=d||1;void 0!==c&&(f=a,g=c);if(0>d*(g-f))return[];if(0<d)for(a=f;a<g;a+=d)e.push(a);else for(a=f;a>g;a+=d)e.push(a);return e};l.array.repeat=function(a,c){for(var d=[],e=0;e<c;e++)d[e]=a;return d};l.array.flatten=function(a){for(var c=[],d=0;d<arguments.length;d++){var e=arguments[d];l.isArray(e)?c.push.apply(c,l.array.flatten.apply(null,e)):c.push(e)}return c};
l.array.rotate=function(a,c){l.asserts.assert(null!=a.length);a.length&&(c%=a.length,0<c?l.array.ARRAY_PROTOTYPE_.unshift.apply(a,a.splice(-c,c)):0>c&&l.array.ARRAY_PROTOTYPE_.push.apply(a,a.splice(0,-c)));return a};l.array.moveItem=function(a,c,d){l.asserts.assert(0<=c&&c<a.length);l.asserts.assert(0<=d&&d<a.length);c=l.array.ARRAY_PROTOTYPE_.splice.call(a,c,1);l.array.ARRAY_PROTOTYPE_.splice.call(a,d,0,c[0])};
l.array.zip=function(a){if(!arguments.length)return[];for(var c=[],d=0;;d++){for(var e=[],f=0;f<arguments.length;f++){var g=arguments[f];if(d>=g.length)return c;e.push(g[d])}c.push(e)}};l.array.shuffle=function(a,c){for(var d=c||Math.random,e=a.length-1;0<e;e--){var f=Math.floor(d()*(e+1)),g=a[e];a[e]=a[f];a[f]=g}};l.functions={};l.functions.constant=function(a){return function(){return a}};l.functions.FALSE=l.functions.constant(!1);l.functions.TRUE=l.functions.constant(!0);l.functions.NULL=l.functions.constant(null);l.functions.identity=function(a){return a};l.functions.error=function(a){return function(){throw Error(a);}};l.functions.fail=function(a){return function(){throw a;}};l.functions.lock=function(a,c){c=c||0;return function(){return a.apply(this,Array.prototype.slice.call(arguments,0,c))}};
l.functions.nth=function(a){return function(){return arguments[a]}};l.functions.withReturnValue=function(a,c){return l.functions.sequence(a,l.functions.constant(c))};l.functions.compose=function(a,c){var d=arguments,e=d.length;return function(){var a;e&&(a=d[e-1].apply(this,arguments));for(var c=e-2;0<=c;c--)a=d[c].call(this,a);return a}};l.functions.sequence=function(a){var c=arguments,d=c.length;return function(){for(var a,f=0;f<d;f++)a=c[f].apply(this,arguments);return a}};
l.functions.and=function(a){var c=arguments,d=c.length;return function(){for(var a=0;a<d;a++)if(!c[a].apply(this,arguments))return!1;return!0}};l.functions.or=function(a){var c=arguments,d=c.length;return function(){for(var a=0;a<d;a++)if(c[a].apply(this,arguments))return!0;return!1}};l.functions.not=function(a){return function(){return!a.apply(this,arguments)}};l.functions.create=function(a,c){var d=function(){};d.prototype=a.prototype;d=new d;a.apply(d,Array.prototype.slice.call(arguments,1));return d};
l.functions.CACHE_RETURN_VALUE=!0;l.functions.cacheReturnValue=function(a){var c=!1,d;return function(){if(!l.functions.CACHE_RETURN_VALUE)return a();c||(d=a(),c=!0);return d}};l.math={};l.math.randomInt=function(a){return Math.floor(Math.random()*a)};l.math.uniformRandom=function(a,c){return a+Math.random()*(c-a)};l.math.clamp=function(a,c,d){return Math.min(Math.max(a,c),d)};l.math.modulo=function(a){a%=360;return 0>360*a?a+360:a};l.math.lerp=function(a,c,d){return a+d*(c-a)};l.math.nearlyEquals=function(a,c,d){return Math.abs(a-c)<=(d||1E-6)};l.math.standardAngle=function(a){return l.math.modulo(a)};l.math.toRadians=function(a){return a*Math.PI/180};
l.math.toDegrees=function(a){return 180*a/Math.PI};l.math.angleDx=function(a,c){return c*Math.cos(l.math.toRadians(a))};l.math.angleDy=function(a,c){return c*Math.sin(l.math.toRadians(a))};l.math.angle=function(a,c,d,e){return l.math.standardAngle(l.math.toDegrees(Math.atan2(e-c,d-a)))};l.math.angleDifference=function(a,c){var d=l.math.standardAngle(c)-l.math.standardAngle(a);180<d?d-=360:-180>=d&&(d=360+d);return d};l.math.sign=function(a){return 0==a?0:0>a?-1:1};
l.math.longestCommonSubsequence=function(a,c,d,e){d=d||function(a,c){return a==c};e=e||function(c){return a[c]};for(var f=a.length,g=c.length,h=[],k=0;k<f+1;k++)h[k]=[],h[k][0]=0;for(var m=0;m<g+1;m++)h[0][m]=0;for(k=1;k<=f;k++)for(m=1;m<=g;m++)d(a[k-1],c[m-1])?h[k][m]=h[k-1][m-1]+1:h[k][m]=Math.max(h[k-1][m],h[k][m-1]);for(var p=[],k=f,m=g;0<k&&0<m;)d(a[k-1],c[m-1])?(p.unshift(e(k-1,m-1)),k--,m--):h[k-1][m]>h[k][m-1]?k--:m--;return p};
l.math.sum=function(a){return l.array.reduce(arguments,function(a,d){return a+d},0)};l.math.average=function(a){return l.math.sum.apply(null,arguments)/arguments.length};l.math.sampleVariance=function(a){var c=arguments.length;if(2>c)return 0;var d=l.math.average.apply(null,arguments);return l.math.sum.apply(null,l.array.map(arguments,function(a){return Math.pow(a-d,2)}))/(c-1)};l.math.standardDeviation=function(a){return Math.sqrt(l.math.sampleVariance.apply(null,arguments))};
l.math.isInt=function(a){return isFinite(a)&&0==a%1};l.math.isFiniteNumber=function(a){return isFinite(a)&&!isNaN(a)};l.math.safeFloor=function(a,c){l.asserts.assert(!l.isDef(c)||0<c);return Math.floor(a+(c||2E-15))};l.math.safeCeil=function(a,c){l.asserts.assert(!l.isDef(c)||0<c);return Math.ceil(a-(c||2E-15))};l.iter={};l.iter.StopIteration="StopIteration"in l.global?l.global.StopIteration:Error("StopIteration");l.iter.Iterator=function(){};l.iter.Iterator.prototype.next=function(){throw l.iter.StopIteration;};l.iter.Iterator.prototype.__iterator__=function(){return this};
l.iter.toIterator=function(a){if(a instanceof l.iter.Iterator)return a;if("function"==typeof a.__iterator__)return a.__iterator__(!1);if(l.isArrayLike(a)){var c=0,d=new l.iter.Iterator;d.next=function(){for(;;){if(c>=a.length)throw l.iter.StopIteration;if(c in a)return a[c++];c++}};return d}throw Error("Not implemented");};
l.iter.forEach=function(a,c,d){if(l.isArrayLike(a))try{l.array.forEach(a,c,d)}catch(e){if(e!==l.iter.StopIteration)throw e;}else{a=l.iter.toIterator(a);try{for(;;)c.call(d,a.next(),void 0,a)}catch(f){if(f!==l.iter.StopIteration)throw f;}}};l.iter.filter=function(a,c,d){var e=l.iter.toIterator(a);a=new l.iter.Iterator;a.next=function(){for(;;){var a=e.next();if(c.call(d,a,void 0,e))return a}};return a};
l.iter.range=function(a,c,d){var e=0,f=a,g=d||1;1<arguments.length&&(e=a,f=c);if(0==g)throw Error("Range step argument must not be zero");var h=new l.iter.Iterator;h.next=function(){if(0<g&&e>=f||0>g&&e<=f)throw l.iter.StopIteration;var a=e;e+=g;return a};return h};l.iter.join=function(a,c){return l.iter.toArray(a).join(c)};l.iter.map=function(a,c,d){var e=l.iter.toIterator(a);a=new l.iter.Iterator;a.next=function(){for(;;){var a=e.next();return c.call(d,a,void 0,e)}};return a};
l.iter.reduce=function(a,c,d,e){var f=d;l.iter.forEach(a,function(a){f=c.call(e,f,a)});return f};l.iter.some=function(a,c,d){a=l.iter.toIterator(a);try{for(;;)if(c.call(d,a.next(),void 0,a))return!0}catch(e){if(e!==l.iter.StopIteration)throw e;}return!1};l.iter.every=function(a,c,d){a=l.iter.toIterator(a);try{for(;;)if(!c.call(d,a.next(),void 0,a))return!1}catch(e){if(e!==l.iter.StopIteration)throw e;}return!0};
l.iter.chain=function(a){var c=l.iter.toIterator(arguments),d=new l.iter.Iterator,e=null;d.next=function(){for(;;){if(null==e){var a=c.next();e=l.iter.toIterator(a)}try{return e.next()}catch(d){if(d!==l.iter.StopIteration)throw d;e=null}}};return d};l.iter.chainFromIterable=function(a){return l.iter.chain.apply(void 0,a)};
l.iter.dropWhile=function(a,c,d){var e=l.iter.toIterator(a);a=new l.iter.Iterator;var f=!0;a.next=function(){for(;;){var a=e.next();if(!f||!c.call(d,a,void 0,e))return f=!1,a}};return a};l.iter.takeWhile=function(a,c,d){var e=l.iter.toIterator(a);a=new l.iter.Iterator;var f=!0;a.next=function(){for(;;)if(f){var a=e.next();if(c.call(d,a,void 0,e))return a;f=!1}else throw l.iter.StopIteration;};return a};
l.iter.toArray=function(a){if(l.isArrayLike(a))return l.array.toArray(a);a=l.iter.toIterator(a);var c=[];l.iter.forEach(a,function(a){c.push(a)});return c};l.iter.equals=function(a,c){var d=l.iter.zipLongest({},a,c);return l.iter.every(d,function(a){return a[0]==a[1]})};l.iter.nextOrValue=function(a){try{l.iter.toIterator(a).next()}catch(c){if(c!=l.iter.StopIteration)throw c;}};
l.iter.product=function(a){if(l.array.some(arguments,function(a){return!a.length})||!arguments.length)return new l.iter.Iterator;var c=new l.iter.Iterator,d=arguments,e=l.array.repeat(0,d.length);c.next=function(){if(e){for(var a=l.array.map(e,function(a,c){return d[c][a]}),c=e.length-1;0<=c;c--){l.asserts.assert(e);if(e[c]<d[c].length-1){e[c]++;break}if(0==c){e=null;break}e[c]=0}return a}throw l.iter.StopIteration;};return c};
l.iter.cycle=function(a){var c=l.iter.toIterator(a),d=[],e=0;a=new l.iter.Iterator;var f=!1;a.next=function(){var a=null;if(!f)try{return a=c.next(),d.push(a),a}catch(h){if(h!=l.iter.StopIteration||l.array.isEmpty(d))throw h;f=!0}a=d[e];e=(e+1)%d.length;return a};return a};l.iter.count=function(a,c){var d=a||0,e=l.isDef(c)?c:1,f=new l.iter.Iterator;f.next=function(){var a=d;d+=e;return a};return f};l.iter.repeat=function(a){var c=new l.iter.Iterator;c.next=l.functions.constant(a);return c};
l.iter.accumulate=function(a){var c=l.iter.toIterator(a),d=0;a=new l.iter.Iterator;a.next=function(){return d+=c.next()};return a};l.iter.zip=function(a){var c=arguments,d=new l.iter.Iterator;if(0<c.length){var e=l.array.map(c,l.iter.toIterator);d.next=function(){return l.array.map(e,function(a){return a.next()})}}return d};
l.iter.zipLongest=function(a,c){var d=l.array.slice(arguments,1),e=new l.iter.Iterator;if(0<d.length){var f=l.array.map(d,l.iter.toIterator);e.next=function(){var c=!1,d=l.array.map(f,function(d){var e;try{e=d.next(),c=!0}catch(f){if(f!==l.iter.StopIteration)throw f;e=a}return e});if(!c)throw l.iter.StopIteration;return d}}return e};l.iter.compress=function(a,c){var d=l.iter.toIterator(c);return l.iter.filter(a,function(){return!!d.next()})};
l.iter.GroupByIterator_=function(a,c){this.iterator=l.iter.toIterator(a);this.keyFunc=c||l.functions.identity};l.inherits(l.iter.GroupByIterator_,l.iter.Iterator);
l.iter.GroupByIterator_.prototype.next=function(){for(;this.currentKey==this.targetKey;)this.currentValue=this.iterator.next(),this.currentKey=this.keyFunc(this.currentValue);for(var a=this.targetKey=this.currentKey,c=this.targetKey,d=[];this.currentKey==c;){d.push(this.currentValue);try{this.currentValue=this.iterator.next()}catch(e){if(e!==l.iter.StopIteration)throw e;break}this.currentKey=this.keyFunc(this.currentValue)}return[a,d]};
l.iter.groupBy=function(a,c){return new l.iter.GroupByIterator_(a,c)};l.iter.tee=function(a,c){var d=l.iter.toIterator(a),e=l.array.map(l.array.range(l.isNumber(c)?c:2),function(){return[]}),f=function(){var a=d.next();l.array.forEach(e,function(c){c.push(a)})};return l.array.map(e,function(a){var c=new l.iter.Iterator;c.next=function(){l.array.isEmpty(a)&&f();l.asserts.assert(!l.array.isEmpty(a));return a.shift()};return c})};l.iter.enumerate=function(a,c){return l.iter.zip(l.iter.count(c),a)};
l.iter.limit=function(a,c){l.asserts.assert(l.math.isInt(c)&&0<=c);var d=l.iter.toIterator(a),e=new l.iter.Iterator,f=c;e.next=function(){if(0<f--)return d.next();throw l.iter.StopIteration;};return e};l.iter.consume=function(a,c){l.asserts.assert(l.math.isInt(c)&&0<=c);for(var d=l.iter.toIterator(a);0<c--;)l.iter.nextOrValue(d);return d};
l.iter.slice=function(a,c,d){l.asserts.assert(l.math.isInt(c)&&0<=c);a=l.iter.consume(a,c);l.isNumber(d)&&(l.asserts.assert(l.math.isInt(d)&&d>=c),a=l.iter.limit(a,d-c));return a};l.iter.hasDuplicates_=function(a){var c=[];l.array.removeDuplicates(a,c);return a.length!=c.length};l.iter.permutations=function(a,c){var d=l.iter.toArray(a),d=l.array.repeat(d,l.isNumber(c)?c:d.length),d=l.iter.product.apply(void 0,d);return l.iter.filter(d,function(a){return!l.iter.hasDuplicates_(a)})};
l.iter.combinations=function(a,c){function d(a){return e[a]}var e=l.iter.toArray(a),f=l.iter.range(e.length),f=l.iter.permutations(f,c),g=l.iter.filter(f,function(a){return l.array.isSorted(a)}),f=new l.iter.Iterator;f.next=function(){return l.array.map(g.next(),d)};return f};
l.iter.combinationsWithReplacement=function(a,c){function d(a){return e[a]}var e=l.iter.toArray(a),f=l.array.range(e.length),f=l.array.repeat(f,c),f=l.iter.product.apply(void 0,f),g=l.iter.filter(f,function(a){return l.array.isSorted(a)}),f=new l.iter.Iterator;f.next=function(){return l.array.map(g.next(),d)};return f};l.object={};l.object.forEach=function(a,c,d){for(var e in a)c.call(d,a[e],e,a)};l.object.filter=function(a,c,d){var e={},f;for(f in a)c.call(d,a[f],f,a)&&(e[f]=a[f]);return e};l.object.map=function(a,c,d){var e={},f;for(f in a)e[f]=c.call(d,a[f],f,a);return e};l.object.some=function(a,c,d){for(var e in a)if(c.call(d,a[e],e,a))return!0;return!1};l.object.every=function(a,c,d){for(var e in a)if(!c.call(d,a[e],e,a))return!1;return!0};l.object.getCount=function(a){var c=0,d;for(d in a)c++;return c};
l.object.getAnyKey=function(a){for(var c in a)return c};l.object.getAnyValue=function(a){for(var c in a)return a[c]};l.object.contains=function(a,c){return l.object.containsValue(a,c)};l.object.getValues=function(a){var c=[],d=0,e;for(e in a)c[d++]=a[e];return c};l.object.getKeys=function(a){var c=[],d=0,e;for(e in a)c[d++]=e;return c};l.object.getValueByKeys=function(a,c){for(var d=l.isArrayLike(c),e=d?c:arguments,d=d?0:1;d<e.length&&(a=a[e[d]],l.isDef(a));d++);return a};
l.object.containsKey=function(a,c){return c in a};l.object.containsValue=function(a,c){for(var d in a)if(a[d]==c)return!0;return!1};l.object.findKey=function(a,c,d){for(var e in a)if(c.call(d,a[e],e,a))return e};l.object.findValue=function(a,c,d){return(c=l.object.findKey(a,c,d))&&a[c]};l.object.isEmpty=function(a){for(var c in a)return!1;return!0};l.object.clear=function(a){for(var c in a)delete a[c]};l.object.remove=function(a,c){var d;(d=c in a)&&delete a[c];return d};
l.object.add=function(a,c,d){if(c in a)throw Error('The object already contains the key "'+c+'"');l.object.set(a,c,d)};l.object.get=function(a,c,d){return c in a?a[c]:d};l.object.set=function(a,c,d){a[c]=d};l.object.setIfUndefined=function(a,c,d){return c in a?a[c]:a[c]=d};l.object.clone=function(a){var c={},d;for(d in a)c[d]=a[d];return c};
l.object.unsafeClone=function(a){var c=l.typeOf(a);if("object"==c||"array"==c){if(a.clone)return a.clone();var c="array"==c?[]:{},d;for(d in a)c[d]=l.object.unsafeClone(a[d]);return c}return a};l.object.transpose=function(a){var c={},d;for(d in a)c[a[d]]=d;return c};l.object.PROTOTYPE_FIELDS_="constructor hasOwnProperty isPrototypeOf propertyIsEnumerable toLocaleString toString valueOf".split(" ");
l.object.extend=function(a,c){for(var d,e,f=1;f<arguments.length;f++){e=arguments[f];for(d in e)a[d]=e[d];for(var g=0;g<l.object.PROTOTYPE_FIELDS_.length;g++)d=l.object.PROTOTYPE_FIELDS_[g],Object.prototype.hasOwnProperty.call(e,d)&&(a[d]=e[d])}};l.object.create=function(a){var c=arguments.length;if(1==c&&l.isArray(arguments[0]))return l.object.create.apply(null,arguments[0]);if(c%2)throw Error("Uneven number of arguments");for(var d={},e=0;e<c;e+=2)d[arguments[e]]=arguments[e+1];return d};
l.object.createSet=function(a){var c=arguments.length;if(1==c&&l.isArray(arguments[0]))return l.object.createSet.apply(null,arguments[0]);for(var d={},e=0;e<c;e++)d[arguments[e]]=!0;return d};l.object.createImmutableView=function(a){var c=a;Object.isFrozen&&!Object.isFrozen(a)&&(c=Object.create(a),Object.freeze(c));return c};l.object.isImmutableView=function(a){return!!Object.isFrozen&&Object.isFrozen(a)};l.structs={};l.structs.Map=function(a,c){this.map_={};this.keys_=[];this.version_=this.count_=0;var d=arguments.length;if(1<d){if(d%2)throw Error("Uneven number of arguments");for(var e=0;e<d;e+=2)this.set(arguments[e],arguments[e+1])}else a&&this.addAll(a)};b=l.structs.Map.prototype;b.getCount=function(){return this.count_};b.getValues=function(){r(this);for(var a=[],c=0;c<this.keys_.length;c++)a.push(this.map_[this.keys_[c]]);return a};b.getKeys=function(){r(this);return this.keys_.concat()};
b.containsKey=function(a){return l.structs.Map.hasKey_(this.map_,a)};b.containsValue=function(a){for(var c=0;c<this.keys_.length;c++){var d=this.keys_[c];if(l.structs.Map.hasKey_(this.map_,d)&&this.map_[d]==a)return!0}return!1};b.equals=function(a,c){if(this===a)return!0;if(this.count_!=a.getCount())return!1;var d=c||l.structs.Map.defaultEquals;r(this);for(var e,f=0;e=this.keys_[f];f++)if(!d(this.get(e),a.get(e)))return!1;return!0};l.structs.Map.defaultEquals=function(a,c){return a===c};
l.structs.Map.prototype.isEmpty=function(){return 0==this.count_};l.structs.Map.prototype.clear=function(){this.map_={};this.version_=this.count_=this.keys_.length=0};l.structs.Map.prototype.remove=function(a){return l.structs.Map.hasKey_(this.map_,a)?(delete this.map_[a],this.count_--,this.version_++,this.keys_.length>2*this.count_&&r(this),!0):!1};
var r=function(a){if(a.count_!=a.keys_.length){for(var c=0,d=0;c<a.keys_.length;){var e=a.keys_[c];l.structs.Map.hasKey_(a.map_,e)&&(a.keys_[d++]=e);c++}a.keys_.length=d}if(a.count_!=a.keys_.length){for(var f={},d=c=0;c<a.keys_.length;)e=a.keys_[c],l.structs.Map.hasKey_(f,e)||(a.keys_[d++]=e,f[e]=1),c++;a.keys_.length=d}};b=l.structs.Map.prototype;b.get=function(a,c){return l.structs.Map.hasKey_(this.map_,a)?this.map_[a]:c};
b.set=function(a,c){l.structs.Map.hasKey_(this.map_,a)||(this.count_++,this.keys_.push(a),this.version_++);this.map_[a]=c};b.addAll=function(a){var c;a instanceof l.structs.Map?(c=a.getKeys(),a=a.getValues()):(c=l.object.getKeys(a),a=l.object.getValues(a));for(var d=0;d<c.length;d++)this.set(c[d],a[d])};b.clone=function(){return new l.structs.Map(this)};b.transpose=function(){for(var a=new l.structs.Map,c=0;c<this.keys_.length;c++){var d=this.keys_[c];a.set(this.map_[d],d)}return a};
b.toObject=function(){r(this);for(var a={},c=0;c<this.keys_.length;c++){var d=this.keys_[c];a[d]=this.map_[d]}return a};b.__iterator__=function(a){r(this);var c=0,d=this.keys_,e=this.map_,f=this.version_,g=this,h=new l.iter.Iterator;h.next=function(){for(;;){if(f!=g.version_)throw Error("The map has changed since the iterator was created");if(c>=d.length)throw l.iter.StopIteration;var h=d[c++];return a?h:e[h]}};return h};
l.structs.Map.hasKey_=function(a,c){return Object.prototype.hasOwnProperty.call(a,c)};l.structs.getCount=function(a){return"function"==typeof a.getCount?a.getCount():l.isArrayLike(a)||l.isString(a)?a.length:l.object.getCount(a)};l.structs.getValues=function(a){if("function"==typeof a.getValues)return a.getValues();if(l.isString(a))return a.split("");if(l.isArrayLike(a)){for(var c=[],d=a.length,e=0;e<d;e++)c.push(a[e]);return c}return l.object.getValues(a)};
l.structs.getKeys=function(a){if("function"==typeof a.getKeys)return a.getKeys();if("function"!=typeof a.getValues){if(l.isArrayLike(a)||l.isString(a)){var c=[];a=a.length;for(var d=0;d<a;d++)c.push(d);return c}return l.object.getKeys(a)}};l.structs.contains=function(a,c){return"function"==typeof a.contains?a.contains(c):"function"==typeof a.containsValue?a.containsValue(c):l.isArrayLike(a)||l.isString(a)?l.array.contains(a,c):l.object.containsValue(a,c)};
l.structs.isEmpty=function(a){return"function"==typeof a.isEmpty?a.isEmpty():l.isArrayLike(a)||l.isString(a)?l.array.isEmpty(a):l.object.isEmpty(a)};l.structs.clear=function(a){"function"==typeof a.clear?a.clear():l.isArrayLike(a)?l.array.clear(a):l.object.clear(a)};
l.structs.forEach=function(a,c,d){if("function"==typeof a.forEach)a.forEach(c,d);else if(l.isArrayLike(a)||l.isString(a))l.array.forEach(a,c,d);else for(var e=l.structs.getKeys(a),f=l.structs.getValues(a),g=f.length,h=0;h<g;h++)c.call(d,f[h],e&&e[h],a)};
l.structs.filter=function(a,c,d){if("function"==typeof a.filter)return a.filter(c,d);if(l.isArrayLike(a)||l.isString(a))return l.array.filter(a,c,d);var e,f=l.structs.getKeys(a),g=l.structs.getValues(a),h=g.length;if(f){e={};for(var k=0;k<h;k++)c.call(d,g[k],f[k],a)&&(e[f[k]]=g[k])}else for(e=[],k=0;k<h;k++)c.call(d,g[k],void 0,a)&&e.push(g[k]);return e};
l.structs.map=function(a,c,d){if("function"==typeof a.map)return a.map(c,d);if(l.isArrayLike(a)||l.isString(a))return l.array.map(a,c,d);var e,f=l.structs.getKeys(a),g=l.structs.getValues(a),h=g.length;if(f){e={};for(var k=0;k<h;k++)e[f[k]]=c.call(d,g[k],f[k],a)}else for(e=[],k=0;k<h;k++)e[k]=c.call(d,g[k],void 0,a);return e};
l.structs.some=function(a,c,d){if("function"==typeof a.some)return a.some(c,d);if(l.isArrayLike(a)||l.isString(a))return l.array.some(a,c,d);for(var e=l.structs.getKeys(a),f=l.structs.getValues(a),g=f.length,h=0;h<g;h++)if(c.call(d,f[h],e&&e[h],a))return!0;return!1};
l.structs.every=function(a,c,d){if("function"==typeof a.every)return a.every(c,d);if(l.isArrayLike(a)||l.isString(a))return l.array.every(a,c,d);for(var e=l.structs.getKeys(a),f=l.structs.getValues(a),g=f.length,h=0;h<g;h++)if(!c.call(d,f[h],e&&e[h],a))return!1;return!0};l.userAgent={};l.userAgent.ASSUME_IE=!1;l.userAgent.ASSUME_GECKO=!1;l.userAgent.ASSUME_WEBKIT=!1;l.userAgent.ASSUME_MOBILE_WEBKIT=!1;l.userAgent.ASSUME_OPERA=!1;l.userAgent.ASSUME_ANY_VERSION=!1;l.userAgent.BROWSER_KNOWN_=l.userAgent.ASSUME_IE||l.userAgent.ASSUME_GECKO||l.userAgent.ASSUME_MOBILE_WEBKIT||l.userAgent.ASSUME_WEBKIT||l.userAgent.ASSUME_OPERA;l.userAgent.getUserAgentString=function(){return l.global.navigator?l.global.navigator.userAgent:null};l.userAgent.getNavigator=function(){return l.global.navigator};
l.userAgent.init_=function(){l.userAgent.detectedOpera_=!1;l.userAgent.detectedIe_=!1;l.userAgent.detectedWebkit_=!1;l.userAgent.detectedMobile_=!1;l.userAgent.detectedGecko_=!1;var a;if(!l.userAgent.BROWSER_KNOWN_&&(a=l.userAgent.getUserAgentString())){var c=l.userAgent.getNavigator();l.userAgent.detectedOpera_=l.string.startsWith(a,"Opera");l.userAgent.detectedIe_=!l.userAgent.detectedOpera_&&(l.string.contains(a,"MSIE")||l.string.contains(a,"Trident"));l.userAgent.detectedWebkit_=!l.userAgent.detectedOpera_&&
l.string.contains(a,"WebKit");l.userAgent.detectedMobile_=l.userAgent.detectedWebkit_&&l.string.contains(a,"Mobile");l.userAgent.detectedGecko_=!l.userAgent.detectedOpera_&&!l.userAgent.detectedWebkit_&&!l.userAgent.detectedIe_&&"Gecko"==c.product}};l.userAgent.BROWSER_KNOWN_||l.userAgent.init_();l.userAgent.OPERA=l.userAgent.BROWSER_KNOWN_?l.userAgent.ASSUME_OPERA:l.userAgent.detectedOpera_;l.userAgent.IE=l.userAgent.BROWSER_KNOWN_?l.userAgent.ASSUME_IE:l.userAgent.detectedIe_;
l.userAgent.GECKO=l.userAgent.BROWSER_KNOWN_?l.userAgent.ASSUME_GECKO:l.userAgent.detectedGecko_;l.userAgent.WEBKIT=l.userAgent.BROWSER_KNOWN_?l.userAgent.ASSUME_WEBKIT||l.userAgent.ASSUME_MOBILE_WEBKIT:l.userAgent.detectedWebkit_;l.userAgent.MOBILE=l.userAgent.ASSUME_MOBILE_WEBKIT||l.userAgent.detectedMobile_;l.userAgent.SAFARI=l.userAgent.WEBKIT;l.userAgent.determinePlatform_=function(){var a=l.userAgent.getNavigator();return a&&a.platform||""};l.userAgent.PLATFORM=l.userAgent.determinePlatform_();
l.userAgent.ASSUME_MAC=!1;l.userAgent.ASSUME_WINDOWS=!1;l.userAgent.ASSUME_LINUX=!1;l.userAgent.ASSUME_X11=!1;l.userAgent.ASSUME_ANDROID=!1;l.userAgent.ASSUME_IPHONE=!1;l.userAgent.ASSUME_IPAD=!1;l.userAgent.PLATFORM_KNOWN_=l.userAgent.ASSUME_MAC||l.userAgent.ASSUME_WINDOWS||l.userAgent.ASSUME_LINUX||l.userAgent.ASSUME_X11||l.userAgent.ASSUME_ANDROID||l.userAgent.ASSUME_IPHONE||l.userAgent.ASSUME_IPAD;
l.userAgent.initPlatform_=function(){l.userAgent.detectedMac_=l.string.contains(l.userAgent.PLATFORM,"Mac");l.userAgent.detectedWindows_=l.string.contains(l.userAgent.PLATFORM,"Win");l.userAgent.detectedLinux_=l.string.contains(l.userAgent.PLATFORM,"Linux");l.userAgent.detectedX11_=!!l.userAgent.getNavigator()&&l.string.contains(l.userAgent.getNavigator().appVersion||"","X11");var a=l.userAgent.getUserAgentString();l.userAgent.detectedAndroid_=!!a&&l.string.contains(a,"Android");l.userAgent.detectedIPhone_=
!!a&&l.string.contains(a,"iPhone");l.userAgent.detectedIPad_=!!a&&l.string.contains(a,"iPad")};l.userAgent.PLATFORM_KNOWN_||l.userAgent.initPlatform_();l.userAgent.MAC=l.userAgent.PLATFORM_KNOWN_?l.userAgent.ASSUME_MAC:l.userAgent.detectedMac_;l.userAgent.WINDOWS=l.userAgent.PLATFORM_KNOWN_?l.userAgent.ASSUME_WINDOWS:l.userAgent.detectedWindows_;l.userAgent.LINUX=l.userAgent.PLATFORM_KNOWN_?l.userAgent.ASSUME_LINUX:l.userAgent.detectedLinux_;
l.userAgent.X11=l.userAgent.PLATFORM_KNOWN_?l.userAgent.ASSUME_X11:l.userAgent.detectedX11_;l.userAgent.ANDROID=l.userAgent.PLATFORM_KNOWN_?l.userAgent.ASSUME_ANDROID:l.userAgent.detectedAndroid_;l.userAgent.IPHONE=l.userAgent.PLATFORM_KNOWN_?l.userAgent.ASSUME_IPHONE:l.userAgent.detectedIPhone_;l.userAgent.IPAD=l.userAgent.PLATFORM_KNOWN_?l.userAgent.ASSUME_IPAD:l.userAgent.detectedIPad_;
l.userAgent.determineVersion_=function(){var a="",c;l.userAgent.OPERA&&l.global.opera?(a=l.global.opera.version,a="function"==typeof a?a():a):(l.userAgent.GECKO?c=/rv\:([^\);]+)(\)|;)/:l.userAgent.IE?c=/\b(?:MSIE|rv)[: ]([^\);]+)(\)|;)/:l.userAgent.WEBKIT&&(c=/WebKit\/(\S+)/),c&&(a=(a=c.exec(l.userAgent.getUserAgentString()))?a[1]:""));return l.userAgent.IE&&(c=l.userAgent.getDocumentMode_(),c>parseFloat(a))?String(c):a};
l.userAgent.getDocumentMode_=function(){var a=l.global.document;return a?a.documentMode:void 0};l.userAgent.VERSION=l.userAgent.determineVersion_();l.userAgent.compare=function(a,c){return l.string.compareVersions(a,c)};l.userAgent.isVersionOrHigherCache_={};l.userAgent.isVersionOrHigher=function(a){return l.userAgent.ASSUME_ANY_VERSION||l.userAgent.isVersionOrHigherCache_[a]||(l.userAgent.isVersionOrHigherCache_[a]=0<=l.string.compareVersions(l.userAgent.VERSION,a))};l.userAgent.isVersion=l.userAgent.isVersionOrHigher;
l.userAgent.isDocumentModeOrHigher=function(a){return l.userAgent.IE&&l.userAgent.DOCUMENT_MODE>=a};l.userAgent.isDocumentMode=l.userAgent.isDocumentModeOrHigher;var s=l.global.document;l.userAgent.DOCUMENT_MODE=s&&l.userAgent.IE?l.userAgent.getDocumentMode_()||("CSS1Compat"==s.compatMode?parseInt(l.userAgent.VERSION,10):5):void 0;l.uri={};l.uri.utils={};l.uri.utils.CharCode_={AMPERSAND:38,EQUAL:61,HASH:35,QUESTION:63};l.uri.utils.buildFromEncodedParts=function(a,c,d,e,f,g,h){var k="";a&&(k+=a+":");d&&(k+="//",c&&(k+=c+"@"),k+=d,e&&(k+=":"+e));f&&(k+=f);g&&(k+="?"+g);h&&(k+="#"+h);return k};l.uri.utils.splitRe_=RegExp("^(?:([^:/?#.]+):)?(?://(?:([^/?#]*)@)?([^/#?]*?)(?::([0-9]+))?(?=[/#?]|$))?([^?#]+)?(?:\\?([^#]*))?(?:#(.*))?$");l.uri.utils.ComponentIndex={SCHEME:1,USER_INFO:2,DOMAIN:3,PORT:4,PATH:5,QUERY_DATA:6,FRAGMENT:7};
l.uri.utils.split=function(a){l.uri.utils.phishingProtection_();return a.match(l.uri.utils.splitRe_)};l.uri.utils.needsPhishingProtection_=l.userAgent.WEBKIT;l.uri.utils.phishingProtection_=function(){if(l.uri.utils.needsPhishingProtection_){l.uri.utils.needsPhishingProtection_=!1;var a=l.global.location;if(a){var c=a.href;if(c&&(c=l.uri.utils.getDomain(c))&&c!=a.hostname)throw l.uri.utils.needsPhishingProtection_=!0,Error();}}};l.uri.utils.decodeIfPossible_=function(a){return a&&decodeURIComponent(a)};
l.uri.utils.getComponentByIndex_=function(a,c){return l.uri.utils.split(c)[a]||null};l.uri.utils.getScheme=function(a){return l.uri.utils.getComponentByIndex_(l.uri.utils.ComponentIndex.SCHEME,a)};l.uri.utils.getEffectiveScheme=function(a){a=l.uri.utils.getScheme(a);!a&&self.location&&(a=self.location.protocol,a=a.substr(0,a.length-1));return a?a.toLowerCase():""};l.uri.utils.getUserInfoEncoded=function(a){return l.uri.utils.getComponentByIndex_(l.uri.utils.ComponentIndex.USER_INFO,a)};
l.uri.utils.getUserInfo=function(a){return l.uri.utils.decodeIfPossible_(l.uri.utils.getUserInfoEncoded(a))};l.uri.utils.getDomainEncoded=function(a){return l.uri.utils.getComponentByIndex_(l.uri.utils.ComponentIndex.DOMAIN,a)};l.uri.utils.getDomain=function(a){return l.uri.utils.decodeIfPossible_(l.uri.utils.getDomainEncoded(a))};l.uri.utils.getPort=function(a){return Number(l.uri.utils.getComponentByIndex_(l.uri.utils.ComponentIndex.PORT,a))||null};
l.uri.utils.getPathEncoded=function(a){return l.uri.utils.getComponentByIndex_(l.uri.utils.ComponentIndex.PATH,a)};l.uri.utils.getPath=function(a){return l.uri.utils.decodeIfPossible_(l.uri.utils.getPathEncoded(a))};l.uri.utils.getQueryData=function(a){return l.uri.utils.getComponentByIndex_(l.uri.utils.ComponentIndex.QUERY_DATA,a)};l.uri.utils.getFragmentEncoded=function(a){var c=a.indexOf("#");return 0>c?null:a.substr(c+1)};
l.uri.utils.setFragmentEncoded=function(a,c){return l.uri.utils.removeFragment(a)+(c?"#"+c:"")};l.uri.utils.getFragment=function(a){return l.uri.utils.decodeIfPossible_(l.uri.utils.getFragmentEncoded(a))};l.uri.utils.getHost=function(a){a=l.uri.utils.split(a);return l.uri.utils.buildFromEncodedParts(a[l.uri.utils.ComponentIndex.SCHEME],a[l.uri.utils.ComponentIndex.USER_INFO],a[l.uri.utils.ComponentIndex.DOMAIN],a[l.uri.utils.ComponentIndex.PORT])};
l.uri.utils.getPathAndAfter=function(a){a=l.uri.utils.split(a);return l.uri.utils.buildFromEncodedParts(null,null,null,null,a[l.uri.utils.ComponentIndex.PATH],a[l.uri.utils.ComponentIndex.QUERY_DATA],a[l.uri.utils.ComponentIndex.FRAGMENT])};l.uri.utils.removeFragment=function(a){var c=a.indexOf("#");return 0>c?a:a.substr(0,c)};
l.uri.utils.haveSameDomain=function(a,c){var d=l.uri.utils.split(a),e=l.uri.utils.split(c);return d[l.uri.utils.ComponentIndex.DOMAIN]==e[l.uri.utils.ComponentIndex.DOMAIN]&&d[l.uri.utils.ComponentIndex.SCHEME]==e[l.uri.utils.ComponentIndex.SCHEME]&&d[l.uri.utils.ComponentIndex.PORT]==e[l.uri.utils.ComponentIndex.PORT]};
l.uri.utils.assertNoFragmentsOrQueries_=function(a){if(l.DEBUG&&(0<=a.indexOf("#")||0<=a.indexOf("?")))throw Error("goog.uri.utils: Fragment or query identifiers are not supported: ["+a+"]");};l.uri.utils.appendQueryData_=function(a){if(a[1]){var c=a[0],d=c.indexOf("#");0<=d&&(a.push(c.substr(d)),a[0]=c=c.substr(0,d));d=c.indexOf("?");0>d?a[1]="?":d==c.length-1&&(a[1]=void 0)}return a.join("")};
l.uri.utils.appendKeyValuePairs_=function(a,c,d){if(l.isArray(c)){l.asserts.assertArray(c);for(var e=0;e<c.length;e++)l.uri.utils.appendKeyValuePairs_(a,String(c[e]),d)}else null!=c&&d.push("&",a,""===c?"":"=",l.string.urlEncode(c))};l.uri.utils.buildQueryDataBuffer_=function(a,c,d){l.asserts.assert(0==Math.max(c.length-(d||0),0)%2,"goog.uri.utils: Key/value lists must be even in length.");for(d=d||0;d<c.length;d+=2)l.uri.utils.appendKeyValuePairs_(c[d],c[d+1],a);return a};
l.uri.utils.buildQueryData=function(a,c){var d=l.uri.utils.buildQueryDataBuffer_([],a,c);d[0]="";return d.join("")};l.uri.utils.buildQueryDataBufferFromMap_=function(a,c){for(var d in c)l.uri.utils.appendKeyValuePairs_(d,c[d],a);return a};l.uri.utils.buildQueryDataFromMap=function(a){a=l.uri.utils.buildQueryDataBufferFromMap_([],a);a[0]="";return a.join("")};
l.uri.utils.appendParams=function(a,c){return l.uri.utils.appendQueryData_(2==arguments.length?l.uri.utils.buildQueryDataBuffer_([a],arguments[1],0):l.uri.utils.buildQueryDataBuffer_([a],arguments,1))};l.uri.utils.appendParamsFromMap=function(a,c){return l.uri.utils.appendQueryData_(l.uri.utils.buildQueryDataBufferFromMap_([a],c))};l.uri.utils.appendParam=function(a,c,d){a=[a,"&",c];l.isDefAndNotNull(d)&&a.push("=",l.string.urlEncode(d));return l.uri.utils.appendQueryData_(a)};
l.uri.utils.findParam_=function(a,c,d,e){for(var f=d.length;0<=(c=a.indexOf(d,c))&&c<e;){var g=a.charCodeAt(c-1);if(g==l.uri.utils.CharCode_.AMPERSAND||g==l.uri.utils.CharCode_.QUESTION)if(g=a.charCodeAt(c+f),!g||g==l.uri.utils.CharCode_.EQUAL||g==l.uri.utils.CharCode_.AMPERSAND||g==l.uri.utils.CharCode_.HASH)return c;c+=f+1}return-1};l.uri.utils.hashOrEndRe_=/#|$/;l.uri.utils.hasParam=function(a,c){return 0<=l.uri.utils.findParam_(a,0,c,a.search(l.uri.utils.hashOrEndRe_))};
l.uri.utils.getParamValue=function(a,c){var d=a.search(l.uri.utils.hashOrEndRe_),e=l.uri.utils.findParam_(a,0,c,d);if(0>e)return null;var f=a.indexOf("&",e);if(0>f||f>d)f=d;e+=c.length+1;return l.string.urlDecode(a.substr(e,f-e))};l.uri.utils.getParamValues=function(a,c){for(var d=a.search(l.uri.utils.hashOrEndRe_),e=0,f,g=[];0<=(f=l.uri.utils.findParam_(a,e,c,d));){e=a.indexOf("&",f);if(0>e||e>d)e=d;f+=c.length+1;g.push(l.string.urlDecode(a.substr(f,e-f)))}return g};
l.uri.utils.trailingQueryPunctuationRe_=/[?&]($|#)/;l.uri.utils.removeParam=function(a,c){for(var d=a.search(l.uri.utils.hashOrEndRe_),e=0,f,g=[];0<=(f=l.uri.utils.findParam_(a,e,c,d));)g.push(a.substring(e,f)),e=Math.min(a.indexOf("&",f)+1||d,d);g.push(a.substr(e));return g.join("").replace(l.uri.utils.trailingQueryPunctuationRe_,"$1")};
l.uri.utils.setParam=function(a){var c=l.uri.utils.StandardQueryParam.RANDOM,d=l.string.getRandomString();return l.uri.utils.appendParam(l.uri.utils.removeParam(a,c),c,d)};l.uri.utils.appendPath=function(a,c){l.uri.utils.assertNoFragmentsOrQueries_(a);l.string.endsWith(a)&&(a=a.substr(0,a.length-1));l.string.startsWith(c,"/")&&(c=c.substr(1));return l.string.buildString(a,"/",c)};
l.uri.utils.setPath=function(a,c){l.string.startsWith(c,"/")||(c="/"+c);var d=l.uri.utils.split(a);return l.uri.utils.buildFromEncodedParts(d[l.uri.utils.ComponentIndex.SCHEME],d[l.uri.utils.ComponentIndex.USER_INFO],d[l.uri.utils.ComponentIndex.DOMAIN],d[l.uri.utils.ComponentIndex.PORT],c,d[l.uri.utils.ComponentIndex.QUERY_DATA],d[l.uri.utils.ComponentIndex.FRAGMENT])};l.uri.utils.StandardQueryParam={RANDOM:"zx"};l.uri.utils.makeUnique=function(a){return l.uri.utils.setParam(a)};l.Uri=function(a,c){var d;a instanceof l.Uri?(this.ignoreCase_=l.isDef(c)?c:a.ignoreCase_,t(this,a.getScheme()),w(this,a.getUserInfo()),x(this,a.getDomain()),y(this,a.getPort()),this.setPath(a.getPath()),z(this,a.getQueryData().clone()),A(this,a.getFragment())):a&&(d=l.uri.utils.split(String(a)))?(this.ignoreCase_=!!c,t(this,d[l.uri.utils.ComponentIndex.SCHEME]||"",!0),w(this,d[l.uri.utils.ComponentIndex.USER_INFO]||"",!0),x(this,d[l.uri.utils.ComponentIndex.DOMAIN]||"",!0),y(this,d[l.uri.utils.ComponentIndex.PORT]),
this.setPath(d[l.uri.utils.ComponentIndex.PATH]||"",!0),z(this,d[l.uri.utils.ComponentIndex.QUERY_DATA]||"",!0),A(this,d[l.uri.utils.ComponentIndex.FRAGMENT]||"",!0)):(this.ignoreCase_=!!c,this.queryData_=new l.Uri.QueryData(null,0,this.ignoreCase_))};l.Uri.preserveParameterTypesCompatibilityFlag=!1;l.Uri.RANDOM_PARAM=l.uri.utils.StandardQueryParam.RANDOM;b=l.Uri.prototype;b.scheme_="";b.userInfo_="";b.domain_="";b.port_=null;b.path_="";b.fragment_="";b.isReadOnly_=!1;b.ignoreCase_=!1;
b.toString=function(){var a=[],c=this.getScheme();c&&a.push(l.Uri.encodeSpecialChars_(c,l.Uri.reDisallowedInSchemeOrUserInfo_),":");if(c=this.getDomain()){a.push("//");var d=this.getUserInfo();d&&a.push(l.Uri.encodeSpecialChars_(d,l.Uri.reDisallowedInSchemeOrUserInfo_),"@");a.push(l.string.urlEncode(c));c=this.getPort();null!=c&&a.push(":",String(c))}if(c=this.getPath())this.domain_&&"/"!=c.charAt(0)&&a.push("/"),a.push(l.Uri.encodeSpecialChars_(c,"/"==c.charAt(0)?l.Uri.reDisallowedInAbsolutePath_:
l.Uri.reDisallowedInRelativePath_));(c=this.queryData_.toString())&&a.push("?",c);(c=this.getFragment())&&a.push("#",l.Uri.encodeSpecialChars_(c,l.Uri.reDisallowedInFragment_));return a.join("")};
b.resolve=function(a){var c=this.clone(),d=!!a.scheme_;d?t(c,a.getScheme()):d=!!a.userInfo_;d?w(c,a.getUserInfo()):d=!!a.domain_;d?x(c,a.getDomain()):d=null!=a.port_;var e=a.getPath();if(d)y(c,a.getPort());else if(d=!!a.path_){if("/"!=e.charAt(0))if(this.domain_&&!this.path_)e="/"+e;else{var f=c.getPath().lastIndexOf("/");-1!=f&&(e=c.getPath().substr(0,f+1)+e)}e=l.Uri.removeDotSegments(e)}d?c.setPath(e):d=""!==a.queryData_.toString();d?z(c,l.Uri.decodeOrEmpty_(a.queryData_.toString())):d=!!a.fragment_;
d&&A(c,a.getFragment());return c};b.clone=function(){return new l.Uri(this)};b.getScheme=function(){return this.scheme_};var t=function(a,c,d){B(a);a.scheme_=d?l.Uri.decodeOrEmpty_(c):c;a.scheme_&&(a.scheme_=a.scheme_.replace(/:$/,""))};l.Uri.prototype.getUserInfo=function(){return this.userInfo_};var w=function(a,c,d){B(a);a.userInfo_=d?l.Uri.decodeOrEmpty_(c):c};l.Uri.prototype.getDomain=function(){return this.domain_};var x=function(a,c,d){B(a);a.domain_=d?l.Uri.decodeOrEmpty_(c):c};
l.Uri.prototype.getPort=function(){return this.port_};var y=function(a,c){B(a);if(c){c=Number(c);if(isNaN(c)||0>c)throw Error("Bad port number "+c);a.port_=c}else a.port_=null};l.Uri.prototype.getPath=function(){return this.path_};l.Uri.prototype.setPath=function(a,c){B(this);this.path_=c?l.Uri.decodeOrEmpty_(a):a;return this};
var z=function(a,c,d){B(a);c instanceof l.Uri.QueryData?(a.queryData_=c,a.queryData_.setIgnoreCase(a.ignoreCase_)):(d||(c=l.Uri.encodeSpecialChars_(c,l.Uri.reDisallowedInQuery_)),a.queryData_=new l.Uri.QueryData(c,0,a.ignoreCase_))};l.Uri.prototype.getQueryData=function(){return this.queryData_};l.Uri.prototype.getFragment=function(){return this.fragment_};var A=function(a,c,d){B(a);a.fragment_=d?l.Uri.decodeOrEmpty_(c):c};
l.Uri.prototype.makeUnique=function(){B(this);var a=l.Uri.RANDOM_PARAM,c=l.string.getRandomString();B(this);this.queryData_.set(a,c);return this};var B=function(a){if(a.isReadOnly_)throw Error("Tried to modify a read-only Uri");};l.Uri.prototype.setIgnoreCase=function(a){this.ignoreCase_=a;this.queryData_&&this.queryData_.setIgnoreCase(a);return this};l.Uri.parse=function(a,c){return a instanceof l.Uri?a.clone():new l.Uri(a,c)};
l.Uri.create=function(a,c,d,e,f,g,h,k){k=new l.Uri(null,k);a&&t(k,a);c&&w(k,c);d&&x(k,d);e&&y(k,e);f&&k.setPath(f);g&&z(k,g);h&&A(k,h);return k};l.Uri.resolve=function(a,c){a instanceof l.Uri||(a=l.Uri.parse(a));c instanceof l.Uri||(c=l.Uri.parse(c));return a.resolve(c)};
l.Uri.removeDotSegments=function(a){if(".."==a||"."==a)return"";if(l.string.contains(a,"./")||l.string.contains(a,"/.")){var c=l.string.startsWith(a,"/");a=a.split("/");for(var d=[],e=0;e<a.length;){var f=a[e++];"."==f?c&&e==a.length&&d.push(""):".."==f?((1<d.length||1==d.length&&""!=d[0])&&d.pop(),c&&e==a.length&&d.push("")):(d.push(f),c=!0)}return d.join("/")}return a};l.Uri.decodeOrEmpty_=function(a){return a?decodeURIComponent(a):""};
l.Uri.encodeSpecialChars_=function(a,c){return l.isString(a)?encodeURI(a).replace(c,l.Uri.encodeChar_):null};l.Uri.encodeChar_=function(a){a=a.charCodeAt(0);return"%"+(a>>4&15).toString(16)+(a&15).toString(16)};l.Uri.reDisallowedInSchemeOrUserInfo_=/[#\/\?@]/g;l.Uri.reDisallowedInRelativePath_=/[\#\?:]/g;l.Uri.reDisallowedInAbsolutePath_=/[\#\?]/g;l.Uri.reDisallowedInQuery_=/[\#\?@]/g;l.Uri.reDisallowedInFragment_=/#/g;
l.Uri.haveSameDomain=function(a,c){var d=l.uri.utils.split(a),e=l.uri.utils.split(c);return d[l.uri.utils.ComponentIndex.DOMAIN]==e[l.uri.utils.ComponentIndex.DOMAIN]&&d[l.uri.utils.ComponentIndex.PORT]==e[l.uri.utils.ComponentIndex.PORT]};l.Uri.QueryData=function(a,c,d){this.encodedQuery_=a||null;this.ignoreCase_=!!d};
var D=function(a){if(!a.keyMap_&&(a.keyMap_=new l.structs.Map,a.count_=0,a.encodedQuery_))for(var c=a.encodedQuery_.split("&"),d=0;d<c.length;d++){var e=c[d].indexOf("="),f=null,g=null;0<=e?(f=c[d].substring(0,e),g=c[d].substring(e+1)):f=c[d];f=l.string.urlDecode(f);f=C(a,f);a.add(f,g?l.string.urlDecode(g):"")}};
l.Uri.QueryData.createFromMap=function(a,c,d){c=l.structs.getKeys(a);if("undefined"==typeof c)throw Error("Keys are undefined");d=new l.Uri.QueryData(null,0,d);a=l.structs.getValues(a);for(var e=0;e<c.length;e++){var f=c[e],g=a[e];l.isArray(g)?E(d,f,g):d.add(f,g)}return d};l.Uri.QueryData.createFromKeysValues=function(a,c,d,e){if(a.length!=c.length)throw Error("Mismatched lengths for keys/values");d=new l.Uri.QueryData(null,0,e);for(e=0;e<a.length;e++)d.add(a[e],c[e]);return d};b=l.Uri.QueryData.prototype;
b.keyMap_=null;b.count_=null;b.getCount=function(){D(this);return this.count_};b.add=function(a,c){D(this);this.encodedQuery_=null;a=C(this,a);var d=this.keyMap_.get(a);d||this.keyMap_.set(a,d=[]);d.push(c);this.count_++;return this};b.remove=function(a){D(this);a=C(this,a);return this.keyMap_.containsKey(a)?(this.encodedQuery_=null,this.count_-=this.keyMap_.get(a).length,this.keyMap_.remove(a)):!1};b.clear=function(){this.keyMap_=this.encodedQuery_=null;this.count_=0};
b.isEmpty=function(){D(this);return 0==this.count_};b.containsKey=function(a){D(this);a=C(this,a);return this.keyMap_.containsKey(a)};b.containsValue=function(a){var c=this.getValues();return l.array.contains(c,a)};b.getKeys=function(){D(this);for(var a=this.keyMap_.getValues(),c=this.keyMap_.getKeys(),d=[],e=0;e<c.length;e++)for(var f=a[e],g=0;g<f.length;g++)d.push(c[e]);return d};
b.getValues=function(a){D(this);var c=[];if(l.isString(a))this.containsKey(a)&&(c=l.array.concat(c,this.keyMap_.get(C(this,a))));else{a=this.keyMap_.getValues();for(var d=0;d<a.length;d++)c=l.array.concat(c,a[d])}return c};b.set=function(a,c){D(this);this.encodedQuery_=null;a=C(this,a);this.containsKey(a)&&(this.count_-=this.keyMap_.get(a).length);this.keyMap_.set(a,[c]);this.count_++;return this};
b.get=function(a,c){var d=a?this.getValues(a):[];return l.Uri.preserveParameterTypesCompatibilityFlag?0<d.length?d[0]:c:0<d.length?String(d[0]):c};var E=function(a,c,d){a.remove(c);0<d.length&&(a.encodedQuery_=null,a.keyMap_.set(C(a,c),l.array.clone(d)),a.count_+=d.length)};
l.Uri.QueryData.prototype.toString=function(){if(this.encodedQuery_)return this.encodedQuery_;if(!this.keyMap_)return"";for(var a=[],c=this.keyMap_.getKeys(),d=0;d<c.length;d++)for(var e=c[d],f=l.string.urlEncode(e),e=this.getValues(e),g=0;g<e.length;g++){var h=f;""!==e[g]&&(h+="="+l.string.urlEncode(e[g]));a.push(h)}return this.encodedQuery_=a.join("&")};
l.Uri.QueryData.prototype.clone=function(){var a=new l.Uri.QueryData;a.encodedQuery_=this.encodedQuery_;this.keyMap_&&(a.keyMap_=this.keyMap_.clone(),a.count_=this.count_);return a};var C=function(a,c){var d=String(c);a.ignoreCase_&&(d=d.toLowerCase());return d};l.Uri.QueryData.prototype.setIgnoreCase=function(a){a&&!this.ignoreCase_&&(D(this),this.encodedQuery_=null,l.structs.forEach(this.keyMap_,function(a,d){var e=d.toLowerCase();d!=e&&(this.remove(d),E(this,e,a))},this));this.ignoreCase_=a};
l.Uri.QueryData.prototype.extend=function(a){for(var c=0;c<arguments.length;c++)l.structs.forEach(arguments[c],function(a,c){this.add(c,a)},this)};n.WebStoreService=function(a){this.baseUrl_=a||n.WebStoreService.Environment.SANDBOX;this.baseUrlAndPath_=this.baseUrl_+n.WebStoreService.WEB_STORE_REQUEST_PATH_};n.WebStoreService.Environment={PROD:"https://www.googleapis.com",SANDBOX:"https://www-googleapis-staging.sandbox.google.com"};n.WebStoreService.WEB_STORE_REQUEST_PATH_="/chromewebstore/v1.1";
var G=function(a,c,d,e,f,g,h,k,m,p){var J=d?d:"",v=k||"application/x-www-form-urlencoded",u=function(a,c){if(c&&200==a){var d=null;try{d=JSON.parse(c)}catch(e){g(n.Errors.ErrorTypes.INVALID_RESPONSE_ERROR);return}f(d)}else g(n.Errors.ErrorTypes.INVALID_RESPONSE_ERROR)},O=function(F){F||g(n.Errors.ErrorTypes.TOKEN_MISSING_ERROR);var q=new XMLHttpRequest;q.open(e,c);q.setRequestHeader("Authorization","Bearer "+F);q.setRequestHeader("Content-Type",v);q.onreadystatechange=function(){4==q.readyState&&
(401==q.status&&F?chrome.identity.removeCachedAuthToken({token:F},function(){h?G(a,e,d,e,f,g,!1,k,m,p):(console.log(q),u(q.status,q.responseText))}):(console.log(q),u(q.status,q.responseText)))};q.send(J)};p?O(p):chrome.identity.getAuthToken({interactive:m||!1},O)},H=function(a,c){var d=c.parameters||{};if("env"in d){switch(d.env){case "prod":a.baseUrl_=n.WebStoreService.Environment.PROD;break;default:a.baseUrl_=n.WebStoreService.Environment.SANDBOX}a.baseUrlAndPath_=a.baseUrl_+n.WebStoreService.WEB_STORE_REQUEST_PATH_}};
n.WebStoreService.prototype.onFailure_=function(a,c,d){a(n.Errors.getErrorResponse(d||c))};
var I=function(a,c,d,e,f){c=a.baseUrlAndPath_+"/items/"+c+"/payments";e=l.bind(a.onFailure_,a,e,n.Errors.ErrorTypes.GET_PURCHASES_ERROR);G(a,c,null,"GET",d,e,!0,void 0,f)},K=function(a,c,d,e,f,g){var h=new l.Uri.QueryData;h.add("hl",g.hl?g.hl:window.navigator.language);g.gl&&h.add("gl",g.gl);h.add("projection",g.projection?g.projection:"THIN");c=a.baseUrlAndPath_+"/items/"+c+"/skus";f&&(c=c+"/"+f);f=new l.Uri(c);z(f,h);e=l.bind(a.onFailure_,a,e,n.Errors.ErrorTypes.GET_SKU_DETAILS_ERROR);G(a,f.toString(),
null,"GET",d,e,!0,void 0,g.interactive)};n.BackgroundDelegate=function(){chrome.runtime.onConnectExternal.addListener(l.bind(this.onConnect_,this))};l.inherits(n.BackgroundDelegate,l.craw.AppBackgroundDelegate);l.craw.AppBackgroundDelegate.setImpl();n.BackgroundDelegate.Methods_={BUY:"buy",GET_PURCHASES:"getPurchases",GET_SKU_DETAILS:"getSkuDetails"};n.BackgroundDelegate.METHOD_NAME_="method";n.BackgroundDelegate.prototype.getDefaultUrl=function(){return null};n.BackgroundDelegate.prototype.getWindowBounds=function(){return{width:580,height:430}};
var aa=function(a,c,d,e,f){chrome.identity.getAuthToken({interactive:!1},function(g){chrome.app.window.create("/html/craw_window.html",{bounds:a.getWindowBounds("https://www.google.com/intl/en-US/chrome/blank.html"),frame:"chrome",hidden:!1},function(a){d.onDisconnect.addListener(function(){a.close()});var k=a.contentWindow;k.crawConfig_=new l.craw.WindowConfig("https://www.google.com/intl/en-US/chrome/blank.html",!1);k.iapJwt_=e;k.sku_=f;var m=c.parameters;m||(m={});m.userSessionIndex=0;m.fullscreen=
!0;m.oauthToken=g;m.propertyId="ChromeIAP";m.applicationId=d.sender.id;k.iapParams_=m;a.onClosed.addListener(function(){var a=k.purchase_result;a||(a=n.Errors.getErrorResponse(n.Errors.ErrorTypes.PURCHASE_CANCELED));"response"in a||(a.response={errorType:n.Errors.ErrorTypes.PURCHASE_CANCELED});d.postMessage(a);d.disconnect()})})})},ba=function(a,c,d,e){var f=a.parameters||{};H(e,a);I(e,c,function(a){d({response:{details:a}})},d,f.interactive)},ca=function(a,c,d,e){var f=a.parameters||{};H(e,a);K(e,
c,function(a){d({response:{details:a}})},d,a.sku,f)};
n.BackgroundDelegate.prototype.onConnect_=function(a){var c=function(c){a.postMessage(c);a.disconnect()},d=new n.WebStoreService;a.onMessage.addListener(l.bind(function(e){!e.sku&&n.BackgroundDelegate.Methods_.GET_SKU_DETAILS!=e[n.BackgroundDelegate.METHOD_NAME_]&&n.BackgroundDelegate.Methods_.GET_PURCHASES!=e[n.BackgroundDelegate.METHOD_NAME_]||"prod"==(e.parameters||{}).env?n.BackgroundDelegate.Methods_.GET_PURCHASES==e[n.BackgroundDelegate.METHOD_NAME_]?ba(e,a.sender.id,c,d):n.BackgroundDelegate.Methods_.GET_SKU_DETAILS==
e[n.BackgroundDelegate.METHOD_NAME_]?ca(e,a.sender.id,c,d):aa(this,e,a,e.jwt,e.sku):c(n.Errors.getErrorResponse(n.Errors.ErrorTypes.ENV_NOT_SUPPORTED_ERROR))},this))};l.debug.entryPointRegistry={};l.debug.EntryPointMonitor=function(){};l.debug.entryPointRegistry.refList_=[];l.debug.entryPointRegistry.monitors_=[];l.debug.entryPointRegistry.monitorsMayExist_=!1;l.debug.entryPointRegistry.register=function(a){l.debug.entryPointRegistry.refList_[l.debug.entryPointRegistry.refList_.length]=a;if(l.debug.entryPointRegistry.monitorsMayExist_)for(var c=l.debug.entryPointRegistry.monitors_,d=0;d<c.length;d++)a(l.bind(c[d].wrap,c[d]))};
l.debug.entryPointRegistry.monitorAll=function(a){l.debug.entryPointRegistry.monitorsMayExist_=!0;for(var c=l.bind(a.wrap,a),d=0;d<l.debug.entryPointRegistry.refList_.length;d++)l.debug.entryPointRegistry.refList_[d](c);l.debug.entryPointRegistry.monitors_.push(a)};
l.debug.entryPointRegistry.unmonitorAllIfPossible=function(a){var c=l.debug.entryPointRegistry.monitors_;l.asserts.assert(a==c[c.length-1],"Only the most recent monitor can be unwrapped.");a=l.bind(a.unwrap,a);for(var d=0;d<l.debug.entryPointRegistry.refList_.length;d++)l.debug.entryPointRegistry.refList_[d](a);c.length--};l.disposable={};l.disposable.IDisposable=function(){};l.Disposable=function(){l.Disposable.MONITORING_MODE!=l.Disposable.MonitoringMode.OFF&&(l.Disposable.instances_[l.getUid(this)]=this)};l.Disposable.MonitoringMode={OFF:0,PERMANENT:1,INTERACTIVE:2};l.Disposable.MONITORING_MODE=0;l.Disposable.INCLUDE_STACK_ON_CREATION=!0;l.Disposable.instances_={};l.Disposable.getUndisposedObjects=function(){var a=[],c;for(c in l.Disposable.instances_)l.Disposable.instances_.hasOwnProperty(c)&&a.push(l.Disposable.instances_[Number(c)]);return a};
l.Disposable.clearUndisposedObjects=function(){l.Disposable.instances_={}};l.Disposable.prototype.disposed_=!1;l.Disposable.prototype.isDisposed=function(){return this.disposed_};
l.Disposable.prototype.dispose=function(){if(!this.disposed_&&(this.disposed_=!0,this.disposeInternal(),l.Disposable.MONITORING_MODE!=l.Disposable.MonitoringMode.OFF)){var a=l.getUid(this);if(l.Disposable.MONITORING_MODE==l.Disposable.MonitoringMode.PERMANENT&&!l.Disposable.instances_.hasOwnProperty(a))throw Error(this+" did not call the goog.Disposable base constructor or was disposed of after a clearUndisposedObjects call");delete l.Disposable.instances_[a]}};
l.Disposable.prototype.disposeInternal=function(){if(this.onDisposeCallbacks_)for(;this.onDisposeCallbacks_.length;)this.onDisposeCallbacks_.shift()()};l.Disposable.isDisposed=function(a){return a&&"function"==typeof a.isDisposed?a.isDisposed():!1};l.dispose=function(a){a&&"function"==typeof a.dispose&&a.dispose()};l.disposeAll=function(a){for(var c=0,d=arguments.length;c<d;++c){var e=arguments[c];l.isArrayLike(e)?l.disposeAll.apply(null,e):l.dispose(e)}};l.events={};l.events.EventId=function(a){this.id=a};l.events.EventId.prototype.toString=function(){return this.id};l.events.Event=function(a,c){this.type=a instanceof l.events.EventId?String(a):a;this.currentTarget=this.target=c;this.defaultPrevented=this.propagationStopped_=!1;this.returnValue_=!0};l.events.Event.prototype.disposeInternal=function(){};l.events.Event.prototype.dispose=function(){};l.events.Event.prototype.stopPropagation=function(){this.propagationStopped_=!0};l.events.Event.prototype.preventDefault=function(){this.defaultPrevented=!0;this.returnValue_=!1};l.events.Event.stopPropagation=function(a){a.stopPropagation()};
l.events.Event.preventDefault=function(a){a.preventDefault()};l.reflect={};l.reflect.object=function(a,c){return c};l.reflect.sinkValue=function(a){l.reflect.sinkValue[" "](a);return a};l.reflect.sinkValue[" "]=l.nullFunction;l.reflect.canAccessProperty=function(a){try{return l.reflect.sinkValue(a.nodeName),!0}catch(c){}return!1};l.events.BrowserFeature={HAS_W3C_BUTTON:!l.userAgent.IE||l.userAgent.isDocumentModeOrHigher(9),HAS_W3C_EVENT_SUPPORT:!l.userAgent.IE||l.userAgent.isDocumentModeOrHigher(9),SET_KEY_CODE_TO_PREVENT_DEFAULT:l.userAgent.IE&&!l.userAgent.isVersionOrHigher("9"),HAS_NAVIGATOR_ONLINE_PROPERTY:!l.userAgent.WEBKIT||l.userAgent.isVersionOrHigher("528"),HAS_HTML5_NETWORK_EVENT_SUPPORT:l.userAgent.GECKO&&l.userAgent.isVersionOrHigher("1.9b")||l.userAgent.IE&&l.userAgent.isVersionOrHigher("8")||l.userAgent.OPERA&&
l.userAgent.isVersionOrHigher("9.5")||l.userAgent.WEBKIT&&l.userAgent.isVersionOrHigher("528"),HTML5_NETWORK_EVENTS_FIRE_ON_BODY:l.userAgent.GECKO&&!l.userAgent.isVersionOrHigher("8")||l.userAgent.IE&&!l.userAgent.isVersionOrHigher("9"),TOUCH_ENABLED:"ontouchstart"in l.global||!!(l.global.document&&document.documentElement&&"ontouchstart"in document.documentElement)||!(!l.global.navigator||!l.global.navigator.msMaxTouchPoints)};l.events.getVendorPrefixedName_=function(a){return l.userAgent.WEBKIT?"webkit"+a:l.userAgent.OPERA?"o"+a.toLowerCase():a.toLowerCase()};
l.events.EventType={CLICK:"click",DBLCLICK:"dblclick",MOUSEDOWN:"mousedown",MOUSEUP:"mouseup",MOUSEOVER:"mouseover",MOUSEOUT:"mouseout",MOUSEMOVE:"mousemove",MOUSEENTER:"mouseenter",MOUSELEAVE:"mouseleave",SELECTSTART:"selectstart",KEYPRESS:"keypress",KEYDOWN:"keydown",KEYUP:"keyup",BLUR:"blur",FOCUS:"focus",DEACTIVATE:"deactivate",FOCUSIN:l.userAgent.IE?"focusin":"DOMFocusIn",FOCUSOUT:l.userAgent.IE?"focusout":"DOMFocusOut",CHANGE:"change",SELECT:"select",SUBMIT:"submit",INPUT:"input",PROPERTYCHANGE:"propertychange",
DRAGSTART:"dragstart",DRAG:"drag",DRAGENTER:"dragenter",DRAGOVER:"dragover",DRAGLEAVE:"dragleave",DROP:"drop",DRAGEND:"dragend",TOUCHSTART:"touchstart",TOUCHMOVE:"touchmove",TOUCHEND:"touchend",TOUCHCANCEL:"touchcancel",BEFOREUNLOAD:"beforeunload",CONSOLEMESSAGE:"consolemessage",CONTEXTMENU:"contextmenu",DOMCONTENTLOADED:"DOMContentLoaded",ERROR:"error",HELP:"help",LOAD:"load",LOSECAPTURE:"losecapture",ORIENTATIONCHANGE:"orientationchange",READYSTATECHANGE:"readystatechange",RESIZE:"resize",SCROLL:"scroll",
UNLOAD:"unload",HASHCHANGE:"hashchange",PAGEHIDE:"pagehide",PAGESHOW:"pageshow",POPSTATE:"popstate",COPY:"copy",PASTE:"paste",CUT:"cut",BEFORECOPY:"beforecopy",BEFORECUT:"beforecut",BEFOREPASTE:"beforepaste",ONLINE:"online",OFFLINE:"offline",MESSAGE:"message",CONNECT:"connect",ANIMATIONSTART:l.events.getVendorPrefixedName_("AnimationStart"),ANIMATIONEND:l.events.getVendorPrefixedName_("AnimationEnd"),ANIMATIONITERATION:l.events.getVendorPrefixedName_("AnimationIteration"),TRANSITIONEND:l.events.getVendorPrefixedName_("TransitionEnd"),
POINTERDOWN:"pointerdown",POINTERUP:"pointerup",POINTERCANCEL:"pointercancel",POINTERMOVE:"pointermove",POINTEROVER:"pointerover",POINTEROUT:"pointerout",POINTERENTER:"pointerenter",POINTERLEAVE:"pointerleave",GOTPOINTERCAPTURE:"gotpointercapture",LOSTPOINTERCAPTURE:"lostpointercapture",MSGESTURECHANGE:"MSGestureChange",MSGESTUREEND:"MSGestureEnd",MSGESTUREHOLD:"MSGestureHold",MSGESTURESTART:"MSGestureStart",MSGESTURETAP:"MSGestureTap",MSGOTPOINTERCAPTURE:"MSGotPointerCapture",MSINERTIASTART:"MSInertiaStart",
MSLOSTPOINTERCAPTURE:"MSLostPointerCapture",MSPOINTERCANCEL:"MSPointerCancel",MSPOINTERDOWN:"MSPointerDown",MSPOINTERENTER:"MSPointerEnter",MSPOINTERHOVER:"MSPointerHover",MSPOINTERLEAVE:"MSPointerLeave",MSPOINTERMOVE:"MSPointerMove",MSPOINTEROUT:"MSPointerOut",MSPOINTEROVER:"MSPointerOver",MSPOINTERUP:"MSPointerUp",TEXTINPUT:"textinput",COMPOSITIONSTART:"compositionstart",COMPOSITIONUPDATE:"compositionupdate",COMPOSITIONEND:"compositionend",EXIT:"exit",LOADABORT:"loadabort",LOADCOMMIT:"loadcommit",
LOADREDIRECT:"loadredirect",LOADSTART:"loadstart",LOADSTOP:"loadstop",RESPONSIVE:"responsive",SIZECHANGED:"sizechanged",UNRESPONSIVE:"unresponsive",VISIBILITYCHANGE:"visibilitychange",STORAGE:"storage"};l.events.BrowserEvent=function(a,c){l.events.Event.call(this,a?a.type:"");this.relatedTarget=this.currentTarget=this.target=null;this.charCode=this.keyCode=this.button=this.screenY=this.screenX=this.clientY=this.clientX=this.offsetY=this.offsetX=0;this.metaKey=this.shiftKey=this.altKey=this.ctrlKey=!1;this.event_=this.state=null;if(a){var d=this.type=a.type;this.target=a.target||a.srcElement;this.currentTarget=c;var e=a.relatedTarget;e?l.userAgent.GECKO&&(l.reflect.canAccessProperty(e)||(e=null)):
d==l.events.EventType.MOUSEOVER?e=a.fromElement:d==l.events.EventType.MOUSEOUT&&(e=a.toElement);this.relatedTarget=e;this.offsetX=l.userAgent.WEBKIT||void 0!==a.offsetX?a.offsetX:a.layerX;this.offsetY=l.userAgent.WEBKIT||void 0!==a.offsetY?a.offsetY:a.layerY;this.clientX=void 0!==a.clientX?a.clientX:a.pageX;this.clientY=void 0!==a.clientY?a.clientY:a.pageY;this.screenX=a.screenX||0;this.screenY=a.screenY||0;this.button=a.button;this.keyCode=a.keyCode||0;this.charCode=a.charCode||("keypress"==d?a.keyCode:
0);this.ctrlKey=a.ctrlKey;this.altKey=a.altKey;this.shiftKey=a.shiftKey;this.metaKey=a.metaKey;this.state=a.state;this.event_=a;a.defaultPrevented&&this.preventDefault()}};l.inherits(l.events.BrowserEvent,l.events.Event);l.events.BrowserEvent.MouseButton={LEFT:0,MIDDLE:1,RIGHT:2};l.events.BrowserEvent.IEButtonMap=[1,4,2];
l.events.BrowserEvent.prototype.stopPropagation=function(){l.events.BrowserEvent.superClass_.stopPropagation.call(this);this.event_.stopPropagation?this.event_.stopPropagation():this.event_.cancelBubble=!0};
l.events.BrowserEvent.prototype.preventDefault=function(){l.events.BrowserEvent.superClass_.preventDefault.call(this);var a=this.event_;if(a.preventDefault)a.preventDefault();else if(a.returnValue=!1,l.events.BrowserFeature.SET_KEY_CODE_TO_PREVENT_DEFAULT)try{if(a.ctrlKey||112<=a.keyCode&&123>=a.keyCode)a.keyCode=-1}catch(c){}};l.events.BrowserEvent.prototype.disposeInternal=function(){};l.events.Listenable=function(){};l.events.Listenable.IMPLEMENTED_BY_PROP="closure_listenable_"+(1E6*Math.random()|0);l.events.Listenable.addImplementation=function(){l.events.EventTarget.prototype[l.events.Listenable.IMPLEMENTED_BY_PROP]=!0};l.events.Listenable.isImplementedBy=function(a){try{return!(!a||!a[l.events.Listenable.IMPLEMENTED_BY_PROP])}catch(c){return!1}};l.events.ListenableKey=function(){};l.events.ListenableKey.counter_=0;l.events.ListenableKey.reserveKey=function(){return++l.events.ListenableKey.counter_};l.events.Listener=function(a,c,d,e,f,g){this.listener=a;this.proxy=c;this.src=d;this.type=e;this.capture=!!f;this.handler=g;this.key=l.events.ListenableKey.reserveKey();this.removed=this.callOnce=!1};l.events.Listener.ENABLE_MONITORING=!1;var L=function(a){a.removed=!0;a.listener=null;a.proxy=null;a.src=null;a.handler=null};l.events.ListenerMap=function(a){this.src=a;this.listeners={};this.typeCount_=0};l.events.ListenerMap.prototype.add=function(a,c,d,e,f){var g=this.listeners[a];g||(g=this.listeners[a]=[],this.typeCount_++);var h=l.events.ListenerMap.findListenerIndex_(g,c,e,f);-1<h?(a=g[h],d||(a.callOnce=!1)):(a=new l.events.Listener(c,null,this.src,a,!!e,f),a.callOnce=d,g.push(a));return a};
l.events.ListenerMap.prototype.remove=function(a,c,d,e){if(!(a in this.listeners))return!1;var f=this.listeners[a];c=l.events.ListenerMap.findListenerIndex_(f,c,d,e);return-1<c?(L(f[c]),l.array.removeAt(f,c),0==f.length&&(delete this.listeners[a],this.typeCount_--),!0):!1};var M=function(a,c){var d=c.type;if(!(d in a.listeners))return!1;var e=l.array.remove(a.listeners[d],c);e&&(L(c),0==a.listeners[d].length&&(delete a.listeners[d],a.typeCount_--));return e};
l.events.ListenerMap.prototype.removeAll=function(a){var c=0,d;for(d in this.listeners)if(!a||d==a){for(var e=this.listeners[d],f=0;f<e.length;f++)++c,L(e[f]);delete this.listeners[d];this.typeCount_--}return c};l.events.ListenerMap.prototype.getListeners=function(a,c){var d=this.listeners[a],e=[];if(d)for(var f=0;f<d.length;++f){var g=d[f];g.capture==c&&e.push(g)}return e};
l.events.ListenerMap.prototype.getListener=function(a,c,d,e){a=this.listeners[a];var f=-1;a&&(f=l.events.ListenerMap.findListenerIndex_(a,c,d,e));return-1<f?a[f]:null};l.events.ListenerMap.prototype.hasListener=function(a,c){var d=l.isDef(a),e=l.isDef(c);return l.object.some(this.listeners,function(f){for(var g=0;g<f.length;++g)if(!(d&&f[g].type!=a||e&&f[g].capture!=c))return!0;return!1})};
l.events.ListenerMap.findListenerIndex_=function(a,c,d,e){for(var f=0;f<a.length;++f){var g=a[f];if(!g.removed&&g.listener==c&&g.capture==!!d&&g.handler==e)return f}return-1};l.events.listeners_={};l.events.LISTENER_MAP_PROP_="closure_lm_"+(1E6*Math.random()|0);l.events.onString_="on";l.events.onStringMap_={};l.events.CaptureSimulationMode={OFF_AND_FAIL:0,OFF_AND_SILENT:1,ON:2};l.events.CAPTURE_SIMULATION_MODE=2;l.events.listenerCountEstimate_=0;
l.events.listen=function(a,c,d,e,f){if(l.isArray(c)){for(var g=0;g<c.length;g++)l.events.listen(a,c[g],d,e,f);return null}d=l.events.wrapListener(d);return l.events.Listenable.isImplementedBy(a)?a.listen(c,d,e,f):l.events.listen_(a,c,d,!1,e,f)};
l.events.listen_=function(a,c,d,e,f,g){if(!c)throw Error("Invalid event type");var h=!!f;if(h&&!l.events.BrowserFeature.HAS_W3C_EVENT_SUPPORT){if(l.events.CAPTURE_SIMULATION_MODE==l.events.CaptureSimulationMode.OFF_AND_FAIL)return l.asserts.fail("Can not register capture listener in IE8-."),null;if(l.events.CAPTURE_SIMULATION_MODE==l.events.CaptureSimulationMode.OFF_AND_SILENT)return null}var k=l.events.getListenerMap_(a);k||(a[l.events.LISTENER_MAP_PROP_]=k=new l.events.ListenerMap(a));d=k.add(c,
d,e,f,g);if(d.proxy)return d;e=l.events.getProxy();d.proxy=e;e.src=a;e.listener=d;a.addEventListener?a.addEventListener(c,e,h):a.attachEvent(l.events.getOnString_(c),e);l.events.listenerCountEstimate_++;return d};l.events.getProxy=function(){var a=l.events.handleBrowserEvent_,c=l.events.BrowserFeature.HAS_W3C_EVENT_SUPPORT?function(d){return a.call(c.src,c.listener,d)}:function(d){d=a.call(c.src,c.listener,d);if(!d)return d};return c};
l.events.listenOnce=function(a,c,d,e,f){if(l.isArray(c)){for(var g=0;g<c.length;g++)l.events.listenOnce(a,c[g],d,e,f);return null}d=l.events.wrapListener(d);return l.events.Listenable.isImplementedBy(a)?a.listenOnce(c,d,e,f):l.events.listen_(a,c,d,!0,e,f)};l.events.listenWithWrapper=function(a,c,d,e,f){c.listen(a,d,e,f)};
l.events.unlisten=function(a,c,d,e,f){if(l.isArray(c)){for(var g=0;g<c.length;g++)l.events.unlisten(a,c[g],d,e,f);return null}d=l.events.wrapListener(d);if(l.events.Listenable.isImplementedBy(a))return a.unlisten(c,d,e,f);if(!a)return!1;if(a=l.events.getListenerMap_(a))if(c=a.getListener(c,d,!!e,f))return l.events.unlistenByKey(c);return!1};
l.events.unlistenByKey=function(a){if(l.isNumber(a)||!a||a.removed)return!1;var c=a.src;if(l.events.Listenable.isImplementedBy(c))return c.unlistenByKey(a);var d=a.type,e=a.proxy;c.removeEventListener?c.removeEventListener(d,e,a.capture):c.detachEvent&&c.detachEvent(l.events.getOnString_(d),e);l.events.listenerCountEstimate_--;(d=l.events.getListenerMap_(c))?(M(d,a),0==d.typeCount_&&(d.src=null,c[l.events.LISTENER_MAP_PROP_]=null)):L(a);return!0};
l.events.unlistenWithWrapper=function(a,c,d,e,f){c.unlisten(a,d,e,f)};l.events.removeAll=function(a,c){if(!a)return 0;if(l.events.Listenable.isImplementedBy(a))return a.eventTargetListeners_?a.eventTargetListeners_.removeAll(c):0;var d=l.events.getListenerMap_(a);if(!d)return 0;var e=0,f;for(f in d.listeners)if(!c||f==c)for(var g=l.array.clone(d.listeners[f]),h=0;h<g.length;++h)l.events.unlistenByKey(g[h])&&++e;return e};
l.events.removeAllNativeListeners=function(){return l.events.listenerCountEstimate_=0};l.events.getListeners=function(a,c,d){return l.events.Listenable.isImplementedBy(a)?a.getListeners(c,d):a?(a=l.events.getListenerMap_(a))?a.getListeners(c,d):[]:[]};l.events.getListener=function(a,c,d,e,f){d=l.events.wrapListener(d);e=!!e;return l.events.Listenable.isImplementedBy(a)?a.getListener(c,d,e,f):a?(a=l.events.getListenerMap_(a))?a.getListener(c,d,e,f):null:null};
l.events.hasListener=function(a,c,d){if(l.events.Listenable.isImplementedBy(a))return a.hasListener(c,d);a=l.events.getListenerMap_(a);return!!a&&a.hasListener(c,d)};l.events.expose=function(a){var c=[],d;for(d in a)a[d]&&a[d].id?c.push(d+" = "+a[d]+" ("+a[d].id+")"):c.push(d+" = "+a[d]);return c.join("\n")};l.events.getOnString_=function(a){return a in l.events.onStringMap_?l.events.onStringMap_[a]:l.events.onStringMap_[a]=l.events.onString_+a};
l.events.fireListeners=function(a,c,d,e){return l.events.Listenable.isImplementedBy(a)?a.fireListeners(c,d,e):l.events.fireListeners_(a,c,d,e)};l.events.fireListeners_=function(a,c,d,e){var f=1;if(a=l.events.getListenerMap_(a))if(c=a.listeners[c])for(c=l.array.clone(c),a=0;a<c.length;a++){var g=c[a];g&&g.capture==d&&!g.removed&&(f&=!1!==l.events.fireListener(g,e))}return Boolean(f)};
l.events.fireListener=function(a,c){var d=a.listener,e=a.handler||a.src;a.callOnce&&l.events.unlistenByKey(a);return d.call(e,c)};l.events.getTotalListenerCount=function(){return l.events.listenerCountEstimate_};l.events.dispatchEvent=function(a,c){l.asserts.assert(l.events.Listenable.isImplementedBy(a),"Can not use goog.events.dispatchEvent with non-goog.events.Listenable instance.");return a.dispatchEvent(c)};l.events.protectBrowserEventEntryPoint=function(a){l.events.handleBrowserEvent_=a.protectEntryPoint(l.events.handleBrowserEvent_)};
l.events.handleBrowserEvent_=function(a,c){if(a.removed)return!0;if(!l.events.BrowserFeature.HAS_W3C_EVENT_SUPPORT){var d=c||l.getObjectByName("window.event"),e=new l.events.BrowserEvent(d,this),f=!0;if(l.events.CAPTURE_SIMULATION_MODE==l.events.CaptureSimulationMode.ON){if(!l.events.isMarkedIeEvent_(d)){l.events.markIeEvent_(d);for(var d=[],g=e.currentTarget;g;g=g.parentNode)d.push(g);for(var g=a.type,h=d.length-1;!e.propagationStopped_&&0<=h;h--)e.currentTarget=d[h],f&=l.events.fireListeners_(d[h],
g,!0,e);for(h=0;!e.propagationStopped_&&h<d.length;h++)e.currentTarget=d[h],f&=l.events.fireListeners_(d[h],g,!1,e)}}else f=l.events.fireListener(a,e);return f}return l.events.fireListener(a,new l.events.BrowserEvent(c,this))};l.events.markIeEvent_=function(a){var c=!1;if(0==a.keyCode)try{a.keyCode=-1;return}catch(d){c=!0}if(c||void 0==a.returnValue)a.returnValue=!0};l.events.isMarkedIeEvent_=function(a){return 0>a.keyCode||void 0!=a.returnValue};l.events.uniqueIdCounter_=0;
l.events.getUniqueId=function(a){return a+"_"+l.events.uniqueIdCounter_++};l.events.getListenerMap_=function(a){a=a[l.events.LISTENER_MAP_PROP_];return a instanceof l.events.ListenerMap?a:null};l.events.LISTENER_WRAPPER_PROP_="__closure_events_fn_"+(1E9*Math.random()>>>0);
l.events.wrapListener=function(a){l.asserts.assert(a,"Listener can not be null.");if(l.isFunction(a))return a;l.asserts.assert(a.handleEvent,"An object listener must have handleEvent method.");return a[l.events.LISTENER_WRAPPER_PROP_]||(a[l.events.LISTENER_WRAPPER_PROP_]=function(c){return a.handleEvent(c)})};l.debug.entryPointRegistry.register(function(a){l.events.handleBrowserEvent_=a(l.events.handleBrowserEvent_)});l.events.EventTarget=function(){l.Disposable.call(this);this.eventTargetListeners_=new l.events.ListenerMap(this);this.actualEventTarget_=this};l.inherits(l.events.EventTarget,l.Disposable);l.events.Listenable.addImplementation();l.events.EventTarget.MAX_ANCESTORS_=1E3;b=l.events.EventTarget.prototype;b.parentEventTarget_=null;b.addEventListener=function(a,c,d,e){l.events.listen(this,a,c,d,e)};b.removeEventListener=function(a,c,d,e){l.events.unlisten(this,a,c,d,e)};
b.dispatchEvent=function(a){N(this);var c,d=this.parentEventTarget_;if(d){c=[];for(var e=1;d;d=d.parentEventTarget_)c.push(d),l.asserts.assert(++e<l.events.EventTarget.MAX_ANCESTORS_,"infinite loop")}return l.events.EventTarget.dispatchEventInternal_(this.actualEventTarget_,a,c)};b.disposeInternal=function(){l.events.EventTarget.superClass_.disposeInternal.call(this);this.eventTargetListeners_&&this.eventTargetListeners_.removeAll(void 0);this.parentEventTarget_=null};
b.listen=function(a,c,d,e){N(this);return this.eventTargetListeners_.add(String(a),c,!1,d,e)};b.listenOnce=function(a,c,d,e){return this.eventTargetListeners_.add(String(a),c,!0,d,e)};b.unlisten=function(a,c,d,e){return this.eventTargetListeners_.remove(String(a),c,d,e)};b.unlistenByKey=function(a){return M(this.eventTargetListeners_,a)};
b.fireListeners=function(a,c,d){a=this.eventTargetListeners_.listeners[String(a)];if(!a)return!0;a=l.array.clone(a);for(var e=!0,f=0;f<a.length;++f){var g=a[f];if(g&&!g.removed&&g.capture==c){var h=g.listener,k=g.handler||g.src;g.callOnce&&this.unlistenByKey(g);e=!1!==h.call(k,d)&&e}}return e&&!1!=d.returnValue_};b.getListeners=function(a,c){return this.eventTargetListeners_.getListeners(String(a),c)};b.getListener=function(a,c,d,e){return this.eventTargetListeners_.getListener(String(a),c,d,e)};
b.hasListener=function(a,c){return this.eventTargetListeners_.hasListener(l.isDef(a)?String(a):void 0,c)};var N=function(a){l.asserts.assert(a.eventTargetListeners_,"Event target is not initialized. Did you call the superclass (goog.events.EventTarget) constructor?")};
l.events.EventTarget.dispatchEventInternal_=function(a,c,d){var e=c.type||c;if(l.isString(c))c=new l.events.Event(c,a);else if(c instanceof l.events.Event)c.target=c.target||a;else{var f=c;c=new l.events.Event(e,a);l.object.extend(c,f)}var f=!0,g;if(d)for(var h=d.length-1;!c.propagationStopped_&&0<=h;h--)g=c.currentTarget=d[h],f=g.fireListeners(e,!0,c)&&f;c.propagationStopped_||(g=c.currentTarget=a,f=g.fireListeners(e,!0,c)&&f,c.propagationStopped_||(f=g.fireListeners(e,!1,c)&&f));if(d)for(h=0;!c.propagationStopped_&&
h<d.length;h++)g=c.currentTarget=d[h],f=g.fireListeners(e,!1,c)&&f;return f};l.json={};l.json.USE_NATIVE_JSON=!1;l.json.isValid_=function(a){return/^\s*$/.test(a)?!1:/^[\],:{}\s\u2028\u2029]*$/.test(a.replace(/\\["\\\/bfnrtu]/g,"@").replace(/"[^"\\\n\r\u2028\u2029\x00-\x08\x0a-\x1f]*"|true|false|null|-?\d+(?:\.\d*)?(?:[eE][+\-]?\d+)?/g,"]").replace(/(?:^|:|,)(?:[\s\u2028\u2029]*\[)+/g,""))};l.json.parse=l.json.USE_NATIVE_JSON?l.global.JSON.parse:function(a){a=String(a);if(l.json.isValid_(a))try{return eval("("+a+")")}catch(c){}throw Error("Invalid JSON string: "+a);};
l.json.unsafeParse=l.json.USE_NATIVE_JSON?l.global.JSON.parse:function(a){return eval("("+a+")")};l.json.serialize=l.json.USE_NATIVE_JSON?l.global.JSON.stringify:function(a,c){return(new l.json.Serializer(c)).serialize(a)};l.json.Serializer=function(a){this.replacer_=a};l.json.Serializer.prototype.serialize=function(a){var c=[];P(this,a,c);return c.join("")};
var P=function(a,c,d){switch(typeof c){case "string":Q(c,d);break;case "number":d.push(isFinite(c)&&!isNaN(c)?c:"null");break;case "boolean":d.push(c);break;case "undefined":d.push("null");break;case "object":if(null==c){d.push("null");break}if(l.isArray(c)){var e=c.length;d.push("[");for(var f="",g=0;g<e;g++)d.push(f),f=c[g],P(a,a.replacer_?a.replacer_.call(c,String(g),f):f,d),f=",";d.push("]");break}d.push("{");e="";for(g in c)Object.prototype.hasOwnProperty.call(c,g)&&(f=c[g],"function"!=typeof f&&
(d.push(e),Q(g,d),d.push(":"),P(a,a.replacer_?a.replacer_.call(c,g,f):f,d),e=","));d.push("}");break;case "function":break;default:throw Error("Unknown type: "+typeof c);}};l.json.Serializer.charToJsonCharCache_={'"':'\\"',"\\":"\\\\","/":"\\/","\b":"\\b","\f":"\\f","\n":"\\n","\r":"\\r","\t":"\\t","\x0B":"\\u000b"};l.json.Serializer.charsToReplace_=/\uffff/.test("\uffff")?/[\\\"\x00-\x1f\x7f-\uffff]/g:/[\\\"\x00-\x1f\x7f-\xff]/g;
var Q=function(a,c){c.push('"',a.replace(l.json.Serializer.charsToReplace_,function(a){if(a in l.json.Serializer.charToJsonCharCache_)return l.json.Serializer.charToJsonCharCache_[a];var c=a.charCodeAt(0),f="\\u";16>c?f+="000":256>c?f+="00":4096>c&&(f+="0");return l.json.Serializer.charToJsonCharCache_[a]=f+c.toString(16)}),'"')};l.structs.Collection=function(){};l.structs.Set=function(a){this.map_=new l.structs.Map;a&&this.addAll(a)};l.structs.Set.getKey_=function(a){var c=typeof a;return"object"==c&&a||"function"==c?"o"+l.getUid(a):c.substr(0,1)+a};b=l.structs.Set.prototype;b.getCount=function(){return this.map_.getCount()};b.add=function(a){this.map_.set(l.structs.Set.getKey_(a),a)};b.addAll=function(a){a=l.structs.getValues(a);for(var c=a.length,d=0;d<c;d++)this.add(a[d])};b.removeAll=function(a){a=l.structs.getValues(a);for(var c=a.length,d=0;d<c;d++)this.remove(a[d])};
b.remove=function(a){return this.map_.remove(l.structs.Set.getKey_(a))};b.clear=function(){this.map_.clear()};b.isEmpty=function(){return this.map_.isEmpty()};b.contains=function(a){return this.map_.containsKey(l.structs.Set.getKey_(a))};b.getValues=function(){return this.map_.getValues()};b.clone=function(){return new l.structs.Set(this)};b.equals=function(a){return this.getCount()==l.structs.getCount(a)&&da(this,a)};
var da=function(a,c){var d=l.structs.getCount(c);if(a.getCount()>d)return!1;!(c instanceof l.structs.Set)&&5<d&&(c=new l.structs.Set(c));return l.structs.every(a,function(a){return l.structs.contains(c,a)})};l.structs.Set.prototype.__iterator__=function(){return this.map_.__iterator__(!1)};l.debug.LOGGING_ENABLED=l.DEBUG;l.debug.catchErrors=function(a,c,d){d=d||l.global;var e=d.onerror,f=!!c;l.userAgent.WEBKIT&&!l.userAgent.isVersionOrHigher("535.3")&&(f=!f);d.onerror=function(c,d,k,m,p){e&&e(c,d,k,m,p);a({message:c,fileName:d,line:k,col:m,error:p});return f}};l.debug.expose=function(a,c){if("undefined"==typeof a)return"undefined";if(null==a)return"NULL";var d=[],e;for(e in a)if(c||!l.isFunction(a[e])){var f=e+" = ";try{f+=a[e]}catch(g){f+="*** "+g+" ***"}d.push(f)}return d.join("\n")};
l.debug.deepExpose=function(a,c){var d=[],e=function(a,g,h){var k=g+"  ";h=new l.structs.Set(h);try{if(l.isDef(a))if(l.isNull(a))d.push("NULL");else if(l.isString(a))d.push('"'+a.replace(/\n/g,"\n"+g)+'"');else if(l.isFunction(a))d.push(String(a).replace(/\n/g,"\n"+g));else if(l.isObject(a))if(h.contains(a))d.push("*** reference loop detected ***");else{h.add(a);d.push("{");for(var m in a)if(c||!l.isFunction(a[m]))d.push("\n"),d.push(k),d.push(m+" = "),e(a[m],k,h);d.push("\n"+g+"}")}else d.push(a);
else d.push("undefined")}catch(p){d.push("*** "+p+" ***")}};e(a,"",new l.structs.Set);return d.join("")};l.debug.exposeArray=function(a){for(var c=[],d=0;d<a.length;d++)l.isArray(a[d])?c.push(l.debug.exposeArray(a[d])):c.push(a[d]);return"[ "+c.join(", ")+" ]"};
l.debug.exposeException=function(a,c){try{var d=l.debug.normalizeErrorObject(a);return"Message: "+l.string.htmlEscape(d.message)+'\nUrl: <a href="view-source:'+d.fileName+'" target="_new">'+d.fileName+"</a>\nLine: "+d.lineNumber+"\n\nBrowser stack:\n"+l.string.htmlEscape(d.stack+"-> ")+"[end]\n\nJS stack traversal:\n"+l.string.htmlEscape(l.debug.getStacktrace(c)+"-> ")}catch(e){return"Exception trying to expose exception! You win, we lose. "+e}};
l.debug.normalizeErrorObject=function(a){var c=l.getObjectByName("window.location.href");if(l.isString(a))return{message:a,name:"Unknown error",lineNumber:"Not available",fileName:c,stack:"Not available"};var d,e,f=!1;try{d=a.lineNumber||a.line||"Not available"}catch(g){d="Not available",f=!0}try{e=a.fileName||a.filename||a.sourceURL||l.global.$googDebugFname||c}catch(h){e="Not available",f=!0}return!f&&a.lineNumber&&a.fileName&&a.stack&&a.message&&a.name?a:{message:a.message||"Not available",name:a.name||
"UnknownError",lineNumber:d,fileName:e,stack:a.stack||"Not available"}};l.debug.enhanceError=function(a,c){var d="string"==typeof a?Error(a):a;d.stack||(d.stack=l.debug.getStacktrace(arguments.callee.caller));if(c){for(var e=0;d["message"+e];)++e;d["message"+e]=String(c)}return d};
l.debug.getStacktraceSimple=function(a){for(var c=[],d=arguments.callee.caller,e=0;d&&(!a||e<a);){c.push(l.debug.getFunctionName(d));c.push("()\n");try{d=d.caller}catch(f){c.push("[exception trying to get caller]\n");break}e++;if(e>=l.debug.MAX_STACK_DEPTH){c.push("[...long stack...]");break}}a&&e>=a?c.push("[...reached max depth limit...]"):c.push("[end]");return c.join("")};l.debug.MAX_STACK_DEPTH=50;
l.debug.getStacktrace=function(a){return l.debug.getStacktraceHelper_(a||arguments.callee.caller,[])};
l.debug.getStacktraceHelper_=function(a,c){var d=[];if(l.array.contains(c,a))d.push("[...circular reference...]");else if(a&&c.length<l.debug.MAX_STACK_DEPTH){d.push(l.debug.getFunctionName(a)+"(");for(var e=a.arguments,f=0;e&&f<e.length;f++){0<f&&d.push(", ");var g;g=e[f];switch(typeof g){case "object":g=g?"object":"null";break;case "string":break;case "number":g=String(g);break;case "boolean":g=g?"true":"false";break;case "function":g=(g=l.debug.getFunctionName(g))?g:"[fn]";break;default:g=typeof g}40<
g.length&&(g=g.substr(0,40)+"...");d.push(g)}c.push(a);d.push(")\n");try{d.push(l.debug.getStacktraceHelper_(a.caller,c))}catch(h){d.push("[exception trying to get caller]\n")}}else a?d.push("[...long stack...]"):d.push("[end]");return d.join("")};l.debug.setFunctionResolver=function(a){l.debug.fnNameResolver_=a};
l.debug.getFunctionName=function(a){if(l.debug.fnNameCache_[a])return l.debug.fnNameCache_[a];if(l.debug.fnNameResolver_){var c=l.debug.fnNameResolver_(a);if(c)return l.debug.fnNameCache_[a]=c}a=String(a);l.debug.fnNameCache_[a]||(c=/function ([^\(]+)/.exec(a),l.debug.fnNameCache_[a]=c?c[1]:"[Anonymous]");return l.debug.fnNameCache_[a]};l.debug.makeWhitespaceVisible=function(a){return a.replace(/ /g,"[_]").replace(/\f/g,"[f]").replace(/\n/g,"[n]\n").replace(/\r/g,"[r]").replace(/\t/g,"[t]")};
l.debug.fnNameCache_={};l.debug.LogRecord=function(a,c,d,e,f){this.reset(a,c,d,e,f)};l.debug.LogRecord.prototype.exception_=null;l.debug.LogRecord.prototype.exceptionText_=null;l.debug.LogRecord.ENABLE_SEQUENCE_NUMBERS=!0;l.debug.LogRecord.nextSequenceNumber_=0;l.debug.LogRecord.prototype.reset=function(a,c,d,e,f){l.debug.LogRecord.ENABLE_SEQUENCE_NUMBERS&&("number"==typeof f||l.debug.LogRecord.nextSequenceNumber_++);e||l.now();this.level_=a;this.msg_=c;delete this.exception_;delete this.exceptionText_};
l.debug.LogRecord.prototype.setLevel=function(a){this.level_=a};l.debug.LogRecord.prototype.getMessage=function(){return this.msg_};l.debug.LogBuffer=function(){l.asserts.assert(l.debug.LogBuffer.isBufferingEnabled(),"Cannot use goog.debug.LogBuffer without defining goog.debug.LogBuffer.CAPACITY.");this.clear()};l.debug.LogBuffer.getInstance=function(){l.debug.LogBuffer.instance_||(l.debug.LogBuffer.instance_=new l.debug.LogBuffer);return l.debug.LogBuffer.instance_};l.debug.LogBuffer.CAPACITY=0;l.debug.LogBuffer.isBufferingEnabled=function(){return 0<l.debug.LogBuffer.CAPACITY};
l.debug.LogBuffer.prototype.clear=function(){this.buffer_=Array(l.debug.LogBuffer.CAPACITY);this.curIndex_=-1;this.isFull_=!1};l.debug.Logger=function(a){this.name_=a;this.handlers_=this.children_=this.level_=this.parent_=null};l.debug.Logger.ENABLE_HIERARCHY=!0;l.debug.Logger.ENABLE_HIERARCHY||(l.debug.Logger.rootHandlers_=[]);l.debug.Logger.Level=function(a,c){this.name=a;this.value=c};l.debug.Logger.Level.prototype.toString=function(){return this.name};l.debug.Logger.Level.OFF=new l.debug.Logger.Level("OFF",Infinity);l.debug.Logger.Level.SHOUT=new l.debug.Logger.Level("SHOUT",1200);
l.debug.Logger.Level.SEVERE=new l.debug.Logger.Level("SEVERE",1E3);l.debug.Logger.Level.WARNING=new l.debug.Logger.Level("WARNING",900);l.debug.Logger.Level.INFO=new l.debug.Logger.Level("INFO",800);l.debug.Logger.Level.CONFIG=new l.debug.Logger.Level("CONFIG",700);l.debug.Logger.Level.FINE=new l.debug.Logger.Level("FINE",500);l.debug.Logger.Level.FINER=new l.debug.Logger.Level("FINER",400);l.debug.Logger.Level.FINEST=new l.debug.Logger.Level("FINEST",300);
l.debug.Logger.Level.ALL=new l.debug.Logger.Level("ALL",0);l.debug.Logger.Level.PREDEFINED_LEVELS=[l.debug.Logger.Level.OFF,l.debug.Logger.Level.SHOUT,l.debug.Logger.Level.SEVERE,l.debug.Logger.Level.WARNING,l.debug.Logger.Level.INFO,l.debug.Logger.Level.CONFIG,l.debug.Logger.Level.FINE,l.debug.Logger.Level.FINER,l.debug.Logger.Level.FINEST,l.debug.Logger.Level.ALL];l.debug.Logger.Level.predefinedLevelsCache_=null;
l.debug.Logger.Level.createPredefinedLevelsCache_=function(){l.debug.Logger.Level.predefinedLevelsCache_={};for(var a=0,c;c=l.debug.Logger.Level.PREDEFINED_LEVELS[a];a++)l.debug.Logger.Level.predefinedLevelsCache_[c.value]=c,l.debug.Logger.Level.predefinedLevelsCache_[c.name]=c};l.debug.Logger.Level.getPredefinedLevel=function(a){l.debug.Logger.Level.predefinedLevelsCache_||l.debug.Logger.Level.createPredefinedLevelsCache_();return l.debug.Logger.Level.predefinedLevelsCache_[a]||null};
l.debug.Logger.Level.getPredefinedLevelByValue=function(a){l.debug.Logger.Level.predefinedLevelsCache_||l.debug.Logger.Level.createPredefinedLevelsCache_();if(a in l.debug.Logger.Level.predefinedLevelsCache_)return l.debug.Logger.Level.predefinedLevelsCache_[a];for(var c=0;c<l.debug.Logger.Level.PREDEFINED_LEVELS.length;++c){var d=l.debug.Logger.Level.PREDEFINED_LEVELS[c];if(d.value<=a)return d}return null};l.debug.Logger.getLogger=function(a){return l.debug.LogManager.getLogger(a)};
l.debug.Logger.logToProfilers=function(a){l.global.console&&(l.global.console.timeStamp?l.global.console.timeStamp(a):l.global.console.markTimeline&&l.global.console.markTimeline(a));l.global.msWriteProfilerMark&&l.global.msWriteProfilerMark(a)};b=l.debug.Logger.prototype;
b.addHandler=function(a){l.debug.LOGGING_ENABLED&&(l.debug.Logger.ENABLE_HIERARCHY?(this.handlers_||(this.handlers_=[]),this.handlers_.push(a)):(l.asserts.assert(!this.name_,"Cannot call addHandler on a non-root logger when goog.debug.Logger.ENABLE_HIERARCHY is false."),l.debug.Logger.rootHandlers_.push(a)))};b.removeHandler=function(a){if(l.debug.LOGGING_ENABLED){var c=l.debug.Logger.ENABLE_HIERARCHY?this.handlers_:l.debug.Logger.rootHandlers_;return!!c&&l.array.remove(c,a)}return!1};
b.getParent=function(){return this.parent_};b.getChildren=function(){this.children_||(this.children_={});return this.children_};b.setLevel=function(a){l.debug.LOGGING_ENABLED&&(l.debug.Logger.ENABLE_HIERARCHY?this.level_=a:(l.asserts.assert(!this.name_,"Cannot call setLevel() on a non-root logger when goog.debug.Logger.ENABLE_HIERARCHY is false."),l.debug.Logger.rootLevel_=a))};
var R=function(a){if(!l.debug.LOGGING_ENABLED)return l.debug.Logger.Level.OFF;if(!l.debug.Logger.ENABLE_HIERARCHY)return l.debug.Logger.rootLevel_;if(a.level_)return a.level_;if(a.parent_)return R(a.parent_);l.asserts.fail("Root logger has no level set.");return null};b=l.debug.Logger.prototype;
b.log=function(a,c,d){if(l.debug.LOGGING_ENABLED&&l.debug.LOGGING_ENABLED&&a.value>=R(this).value)if(l.isFunction(c)&&(c=c()),a=this.getLogRecord(a,c,d),l.debug.Logger.logToProfilers("log:"+a.getMessage()),l.debug.Logger.ENABLE_HIERARCHY)for(c=this;c;){d=c;var e=a;if(d.handlers_)for(var f=0,g=void 0;g=d.handlers_[f];f++)g(e);c=c.getParent()}else for(c=0;d=l.debug.Logger.rootHandlers_[c++];)d(a)};
b.getLogRecord=function(a,c,d){var e;if(l.debug.LogBuffer.isBufferingEnabled()){var f=l.debug.LogBuffer.getInstance();e=this.name_;var g=(f.curIndex_+1)%l.debug.LogBuffer.CAPACITY;f.curIndex_=g;f.isFull_?(f=f.buffer_[g],f.reset(a,c,e),e=f):(f.isFull_=g==l.debug.LogBuffer.CAPACITY-1,e=f.buffer_[g]=new l.debug.LogRecord(a,c,e))}else e=new l.debug.LogRecord(a,String(c),this.name_);d&&(e.exception_=d,f=l.debug.exposeException(d,arguments.callee.caller),e.exceptionText_=f);return e};
b.warning=function(a,c){l.debug.LOGGING_ENABLED&&this.log(l.debug.Logger.Level.WARNING,a,c)};b.info=function(a,c){l.debug.LOGGING_ENABLED&&this.log(l.debug.Logger.Level.INFO,a,c)};b.fine=function(a,c){l.debug.LOGGING_ENABLED&&this.log(l.debug.Logger.Level.FINE,a,c)};l.debug.LogManager={};l.debug.LogManager.loggers_={};l.debug.LogManager.rootLogger_=null;
l.debug.LogManager.initialize=function(){l.debug.LogManager.rootLogger_||(l.debug.LogManager.rootLogger_=new l.debug.Logger(""),l.debug.LogManager.loggers_[""]=l.debug.LogManager.rootLogger_,l.debug.LogManager.rootLogger_.setLevel(l.debug.Logger.Level.CONFIG))};l.debug.LogManager.getLoggers=function(){return l.debug.LogManager.loggers_};l.debug.LogManager.getRoot=function(){l.debug.LogManager.initialize();return l.debug.LogManager.rootLogger_};
l.debug.LogManager.getLogger=function(a){l.debug.LogManager.initialize();return l.debug.LogManager.loggers_[a]||l.debug.LogManager.createLogger_(a)};l.debug.LogManager.createFunctionForCatchErrors=function(a){return function(c){var d=a||l.debug.LogManager.getRoot();l.debug.LOGGING_ENABLED&&d.log(l.debug.Logger.Level.SEVERE,"Error: "+c.message+" ("+c.fileName+" @ Line: "+c.line+")",void 0)}};
l.debug.LogManager.createLogger_=function(a){var c=new l.debug.Logger(a);if(l.debug.Logger.ENABLE_HIERARCHY){var d=a.lastIndexOf("."),e=a.substr(d+1),d=l.debug.LogManager.getLogger(a.substr(0,d));d.getChildren()[e]=c;c.parent_=d}return l.debug.LogManager.loggers_[a]=c};l.log={};l.log.ENABLED=l.debug.LOGGING_ENABLED;l.log.Logger=l.debug.Logger;l.log.Level=l.debug.Logger.Level;l.log.LogRecord=l.debug.LogRecord;l.log.getLogger=function(a,c){if(l.log.ENABLED){var d=l.debug.LogManager.getLogger(a);c&&d&&d.setLevel(c);return d}return null};l.log.addHandler=function(a,c){l.log.ENABLED&&a&&a.addHandler(c)};l.log.removeHandler=function(a,c){return l.log.ENABLED&&a?a.removeHandler(c):!1};l.log.log=function(a,c,d,e){l.log.ENABLED&&a&&a.log(c,d,e)};
l.log.error=function(a,c,d){l.log.ENABLED&&a&&l.debug.LOGGING_ENABLED&&a.log(l.debug.Logger.Level.SEVERE,c,d)};l.log.warning=function(a,c,d){l.log.ENABLED&&a&&a.warning(c,d)};l.log.info=function(a,c,d){l.log.ENABLED&&a&&a.info(c,d)};l.log.fine=function(a,c,d){l.log.ENABLED&&a&&a.fine(c,d)};l.Timer=function(a,c){l.events.EventTarget.call(this);this.interval_=a||1;this.timerObject_=c||l.Timer.defaultTimerObject;this.boundTick_=l.bind(this.tick_,this);this.last_=l.now()};l.inherits(l.Timer,l.events.EventTarget);l.Timer.MAX_TIMEOUT_=2147483647;l.Timer.prototype.enabled=!1;l.Timer.defaultTimerObject=l.global;l.Timer.intervalScale=0.8;l.Timer.prototype.timer_=null;
l.Timer.prototype.tick_=function(){if(this.enabled){var a=l.now()-this.last_;0<a&&a<this.interval_*l.Timer.intervalScale?this.timer_=this.timerObject_.setTimeout(this.boundTick_,this.interval_-a):(this.timer_&&(this.timerObject_.clearTimeout(this.timer_),this.timer_=null),this.dispatchEvent(l.Timer.TICK),this.enabled&&(this.timer_=this.timerObject_.setTimeout(this.boundTick_,this.interval_),this.last_=l.now()))}};
l.Timer.prototype.stop=function(){this.enabled=!1;this.timer_&&(this.timerObject_.clearTimeout(this.timer_),this.timer_=null)};l.Timer.prototype.disposeInternal=function(){l.Timer.superClass_.disposeInternal.call(this);this.stop();delete this.timerObject_};l.Timer.TICK="tick";
l.Timer.callOnce=function(a,c,d){if(l.isFunction(a))d&&(a=l.bind(a,d));else if(a&&"function"==typeof a.handleEvent)a=l.bind(a.handleEvent,a);else throw Error("Invalid listener argument");return c>l.Timer.MAX_TIMEOUT_?-1:l.Timer.defaultTimerObject.setTimeout(a,c||0)};l.Timer.clear=function(a){l.Timer.defaultTimerObject.clearTimeout(a)};l.net={};l.net.ErrorCode={NO_ERROR:0,ACCESS_DENIED:1,FILE_NOT_FOUND:2,FF_SILENT_ERROR:3,CUSTOM_ERROR:4,EXCEPTION:5,HTTP_ERROR:6,ABORT:7,TIMEOUT:8,OFFLINE:9};
l.net.ErrorCode.getDebugMessage=function(a){switch(a){case l.net.ErrorCode.NO_ERROR:return"No Error";case l.net.ErrorCode.ACCESS_DENIED:return"Access denied to content document";case l.net.ErrorCode.FILE_NOT_FOUND:return"File not found";case l.net.ErrorCode.FF_SILENT_ERROR:return"Firefox silently errored";case l.net.ErrorCode.CUSTOM_ERROR:return"Application custom error";case l.net.ErrorCode.EXCEPTION:return"An exception occurred";case l.net.ErrorCode.HTTP_ERROR:return"Http response at 400 or 500 level";
case l.net.ErrorCode.ABORT:return"Request was aborted";case l.net.ErrorCode.TIMEOUT:return"Request timed out";case l.net.ErrorCode.OFFLINE:return"The resource is not available offline";default:return"Unrecognized error code"}};l.net.EventType={COMPLETE:"complete",SUCCESS:"success",ERROR:"error",ABORT:"abort",READY:"ready",READY_STATE_CHANGE:"readystatechange",TIMEOUT:"timeout",INCREMENTAL_DATA:"incrementaldata",PROGRESS:"progress"};l.net.HttpStatus={CONTINUE:100,SWITCHING_PROTOCOLS:101,OK:200,CREATED:201,ACCEPTED:202,NON_AUTHORITATIVE_INFORMATION:203,NO_CONTENT:204,RESET_CONTENT:205,PARTIAL_CONTENT:206,MULTIPLE_CHOICES:300,MOVED_PERMANENTLY:301,FOUND:302,SEE_OTHER:303,NOT_MODIFIED:304,USE_PROXY:305,TEMPORARY_REDIRECT:307,BAD_REQUEST:400,UNAUTHORIZED:401,PAYMENT_REQUIRED:402,FORBIDDEN:403,NOT_FOUND:404,METHOD_NOT_ALLOWED:405,NOT_ACCEPTABLE:406,PROXY_AUTHENTICATION_REQUIRED:407,REQUEST_TIMEOUT:408,CONFLICT:409,GONE:410,LENGTH_REQUIRED:411,
PRECONDITION_FAILED:412,REQUEST_ENTITY_TOO_LARGE:413,REQUEST_URI_TOO_LONG:414,UNSUPPORTED_MEDIA_TYPE:415,REQUEST_RANGE_NOT_SATISFIABLE:416,EXPECTATION_FAILED:417,INTERNAL_SERVER_ERROR:500,NOT_IMPLEMENTED:501,BAD_GATEWAY:502,SERVICE_UNAVAILABLE:503,GATEWAY_TIMEOUT:504,HTTP_VERSION_NOT_SUPPORTED:505,QUIRK_IE_NO_CONTENT:1223};
l.net.HttpStatus.isSuccess=function(a){switch(a){case l.net.HttpStatus.OK:case l.net.HttpStatus.CREATED:case l.net.HttpStatus.ACCEPTED:case l.net.HttpStatus.NO_CONTENT:case l.net.HttpStatus.PARTIAL_CONTENT:case l.net.HttpStatus.NOT_MODIFIED:case l.net.HttpStatus.QUIRK_IE_NO_CONTENT:return!0;default:return!1}};l.net.XhrLike=function(){};l.net.XhrLike.prototype.open=function(){};l.net.XhrLike.prototype.send=function(){};l.net.XhrLike.prototype.abort=function(){};l.net.XhrLike.prototype.setRequestHeader=function(){};l.net.XmlHttpFactory=function(){};l.net.XmlHttpFactory.prototype.cachedOptions_=null;l.net.XmlHttpFactory.prototype.getOptions=function(){var a;(a=this.cachedOptions_)||(a={},S(this)&&(a[l.net.XmlHttp.OptionType.USE_NULL_FUNCTION]=!0,a[l.net.XmlHttp.OptionType.LOCAL_REQUEST_ERROR]=!0),a=this.cachedOptions_=a);return a};l.net.WrapperXmlHttpFactory=function(a,c){this.xhrFactory_=a;this.optionsFactory_=c};l.inherits(l.net.WrapperXmlHttpFactory,l.net.XmlHttpFactory);l.net.WrapperXmlHttpFactory.prototype.createInstance=function(){return this.xhrFactory_()};l.net.WrapperXmlHttpFactory.prototype.getOptions=function(){return this.optionsFactory_()};l.net.XmlHttp=function(){return l.net.XmlHttp.factory_.createInstance()};l.net.XmlHttp.ASSUME_NATIVE_XHR=!1;l.net.XmlHttpDefines={};l.net.XmlHttpDefines.ASSUME_NATIVE_XHR=!1;l.net.XmlHttp.getOptions=function(){return l.net.XmlHttp.factory_.getOptions()};l.net.XmlHttp.OptionType={USE_NULL_FUNCTION:0,LOCAL_REQUEST_ERROR:1};l.net.XmlHttp.ReadyState={UNINITIALIZED:0,LOADING:1,LOADED:2,INTERACTIVE:3,COMPLETE:4};
l.net.XmlHttp.setFactory=function(a,c){l.net.XmlHttp.setGlobalFactory(new l.net.WrapperXmlHttpFactory(l.asserts.assert(a),l.asserts.assert(c)))};l.net.XmlHttp.setGlobalFactory=function(a){l.net.XmlHttp.factory_=a};l.net.DefaultXmlHttpFactory=function(){};l.inherits(l.net.DefaultXmlHttpFactory,l.net.XmlHttpFactory);l.net.DefaultXmlHttpFactory.prototype.createInstance=function(){var a=S(this);return a?new ActiveXObject(a):new XMLHttpRequest};
var S=function(a){if(l.net.XmlHttp.ASSUME_NATIVE_XHR||l.net.XmlHttpDefines.ASSUME_NATIVE_XHR)return"";if(!a.ieProgId_&&"undefined"==typeof XMLHttpRequest&&"undefined"!=typeof ActiveXObject){for(var c=["MSXML2.XMLHTTP.6.0","MSXML2.XMLHTTP.3.0","MSXML2.XMLHTTP","Microsoft.XMLHTTP"],d=0;d<c.length;d++){var e=c[d];try{return new ActiveXObject(e),a.ieProgId_=e}catch(f){}}throw Error("Could not create ActiveXObject. ActiveX might be disabled, or MSXML might not be installed");}return a.ieProgId_};l.net.XmlHttp.setGlobalFactory(new l.net.DefaultXmlHttpFactory);l.net.XhrIo=function(a){l.events.EventTarget.call(this);this.headers=new l.structs.Map;this.xmlHttpFactory_=a||null;this.active_=!1;this.xhrOptions_=this.xhr_=null;this.lastError_=this.lastMethod_=this.lastUri_="";this.inAbort_=this.inOpen_=this.inSend_=this.errorDispatched_=!1;this.timeoutInterval_=0;this.timeoutId_=null;this.responseType_=l.net.XhrIo.ResponseType.DEFAULT;this.useXhr2Timeout_=this.withCredentials_=!1};l.inherits(l.net.XhrIo,l.events.EventTarget);
l.net.XhrIo.ResponseType={DEFAULT:"",TEXT:"text",DOCUMENT:"document",BLOB:"blob",ARRAY_BUFFER:"arraybuffer"};l.net.XhrIo.prototype.logger_=l.log.getLogger("goog.net.XhrIo");l.net.XhrIo.CONTENT_TYPE_HEADER="Content-Type";l.net.XhrIo.HTTP_SCHEME_PATTERN=/^https?$/i;l.net.XhrIo.METHODS_WITH_FORM_DATA=["POST","PUT"];l.net.XhrIo.FORM_CONTENT_TYPE="application/x-www-form-urlencoded;charset=utf-8";l.net.XhrIo.XHR2_TIMEOUT_="timeout";l.net.XhrIo.XHR2_ON_TIMEOUT_="ontimeout";l.net.XhrIo.sendInstances_=[];
l.net.XhrIo.send=function(a,c,d,e,f,g,h){var k=new l.net.XhrIo;l.net.XhrIo.sendInstances_.push(k);c&&k.listen(l.net.EventType.COMPLETE,c);k.listenOnce(l.net.EventType.READY,k.cleanupSend_);g&&(k.timeoutInterval_=Math.max(0,g));h&&(k.withCredentials_=h);k.send(a,d,e,f)};l.net.XhrIo.cleanup=function(){for(var a=l.net.XhrIo.sendInstances_;a.length;)a.pop().dispose()};l.net.XhrIo.protectEntryPoints=function(a){l.net.XhrIo.prototype.onReadyStateChangeEntryPoint_=a.protectEntryPoint(l.net.XhrIo.prototype.onReadyStateChangeEntryPoint_)};
l.net.XhrIo.prototype.cleanupSend_=function(){this.dispose();l.array.remove(l.net.XhrIo.sendInstances_,this)};
l.net.XhrIo.prototype.send=function(a,c,d,e){if(this.xhr_)throw Error("[goog.net.XhrIo] Object is active with another request="+this.lastUri_+"; newUri="+a);c=c?c.toUpperCase():"GET";this.lastUri_=a;this.lastError_="";this.lastMethod_=c;this.errorDispatched_=!1;this.active_=!0;this.xhr_=this.xmlHttpFactory_?this.xmlHttpFactory_.createInstance():l.net.XmlHttp();this.xhrOptions_=this.xmlHttpFactory_?this.xmlHttpFactory_.getOptions():l.net.XmlHttp.getOptions();this.xhr_.onreadystatechange=l.bind(this.onReadyStateChange_,
this);try{l.log.fine(this.logger_,T(this,"Opening Xhr")),this.inOpen_=!0,this.xhr_.open(c,String(a),!0),this.inOpen_=!1}catch(f){l.log.fine(this.logger_,T(this,"Error opening Xhr: "+f.message));U(this,f);return}a=d||"";var g=this.headers.clone();e&&l.structs.forEach(e,function(a,c){g.set(c,a)});e=l.array.find(g.getKeys(),l.net.XhrIo.isContentTypeHeader_);d=l.global.FormData&&a instanceof l.global.FormData;!l.array.contains(l.net.XhrIo.METHODS_WITH_FORM_DATA,c)||e||d||g.set(l.net.XhrIo.CONTENT_TYPE_HEADER,
l.net.XhrIo.FORM_CONTENT_TYPE);l.structs.forEach(g,function(a,c){this.xhr_.setRequestHeader(c,a)},this);this.responseType_&&(this.xhr_.responseType=this.responseType_);l.object.containsKey(this.xhr_,"withCredentials")&&(this.xhr_.withCredentials=this.withCredentials_);try{V(this),0<this.timeoutInterval_&&(this.useXhr2Timeout_=l.net.XhrIo.shouldUseXhr2Timeout_(this.xhr_),l.log.fine(this.logger_,T(this,"Will abort after "+this.timeoutInterval_+"ms if incomplete, xhr2 "+this.useXhr2Timeout_)),this.useXhr2Timeout_?
(this.xhr_[l.net.XhrIo.XHR2_TIMEOUT_]=this.timeoutInterval_,this.xhr_[l.net.XhrIo.XHR2_ON_TIMEOUT_]=l.bind(this.timeout_,this)):this.timeoutId_=l.Timer.callOnce(this.timeout_,this.timeoutInterval_,this)),l.log.fine(this.logger_,T(this,"Sending request")),this.inSend_=!0,this.xhr_.send(a),this.inSend_=!1}catch(h){l.log.fine(this.logger_,T(this,"Send error: "+h.message)),U(this,h)}};
l.net.XhrIo.shouldUseXhr2Timeout_=function(a){return l.userAgent.IE&&l.userAgent.isVersionOrHigher(9)&&l.isNumber(a[l.net.XhrIo.XHR2_TIMEOUT_])&&l.isDef(a[l.net.XhrIo.XHR2_ON_TIMEOUT_])};l.net.XhrIo.isContentTypeHeader_=function(a){return l.string.caseInsensitiveEquals(a)};
l.net.XhrIo.prototype.timeout_=function(){"undefined"!=typeof l&&this.xhr_&&(this.lastError_="Timed out after "+this.timeoutInterval_+"ms, aborting",l.log.fine(this.logger_,T(this,this.lastError_)),this.dispatchEvent(l.net.EventType.TIMEOUT),this.abort(l.net.ErrorCode.TIMEOUT))};var U=function(a,c){a.active_=!1;a.xhr_&&(a.inAbort_=!0,a.xhr_.abort(),a.inAbort_=!1);a.lastError_=c;W(a);X(a)},W=function(a){a.errorDispatched_||(a.errorDispatched_=!0,a.dispatchEvent(l.net.EventType.COMPLETE),a.dispatchEvent(l.net.EventType.ERROR))};
l.net.XhrIo.prototype.abort=function(){this.xhr_&&this.active_&&(l.log.fine(this.logger_,T(this,"Aborting")),this.active_=!1,this.inAbort_=!0,this.xhr_.abort(),this.inAbort_=!1,this.dispatchEvent(l.net.EventType.COMPLETE),this.dispatchEvent(l.net.EventType.ABORT),X(this))};l.net.XhrIo.prototype.disposeInternal=function(){this.xhr_&&(this.active_&&(this.active_=!1,this.inAbort_=!0,this.xhr_.abort(),this.inAbort_=!1),X(this,!0));l.net.XhrIo.superClass_.disposeInternal.call(this)};
l.net.XhrIo.prototype.onReadyStateChange_=function(){if(!this.isDisposed())if(this.inOpen_||this.inSend_||this.inAbort_)Y(this);else this.onReadyStateChangeEntryPoint_()};l.net.XhrIo.prototype.onReadyStateChangeEntryPoint_=function(){Y(this)};
var Y=function(a){if(a.active_&&"undefined"!=typeof l)if(a.xhrOptions_[l.net.XmlHttp.OptionType.LOCAL_REQUEST_ERROR]&&Z(a)==l.net.XmlHttp.ReadyState.COMPLETE&&2==$(a))l.log.fine(a.logger_,T(a,"Local request error detected and ignored"));else if(a.inSend_&&Z(a)==l.net.XmlHttp.ReadyState.COMPLETE)l.Timer.callOnce(a.onReadyStateChange_,0,a);else if(a.dispatchEvent(l.net.EventType.READY_STATE_CHANGE),Z(a)==l.net.XmlHttp.ReadyState.COMPLETE){l.log.fine(a.logger_,T(a,"Request complete"));a.active_=!1;try{if(a.isSuccess())a.dispatchEvent(l.net.EventType.COMPLETE),
a.dispatchEvent(l.net.EventType.SUCCESS);else{var c;try{c=Z(a)>l.net.XmlHttp.ReadyState.LOADED?a.xhr_.statusText:""}catch(d){l.log.fine(a.logger_,"Can not get status: "+d.message),c=""}a.lastError_=c+" ["+$(a)+"]";W(a)}}finally{X(a)}}},X=function(a,c){if(a.xhr_){V(a);var d=a.xhr_,e=a.xhrOptions_[l.net.XmlHttp.OptionType.USE_NULL_FUNCTION]?l.nullFunction:null;a.xhr_=null;a.xhrOptions_=null;c||a.dispatchEvent(l.net.EventType.READY);try{d.onreadystatechange=e}catch(f){l.log.error(a.logger_,"Problem encountered resetting onreadystatechange: "+
f.message)}}},V=function(a){a.xhr_&&a.useXhr2Timeout_&&(a.xhr_[l.net.XhrIo.XHR2_ON_TIMEOUT_]=null);l.isNumber(a.timeoutId_)&&(l.Timer.clear(a.timeoutId_),a.timeoutId_=null)};l.net.XhrIo.prototype.isSuccess=function(){var a=$(this),c;if(!(c=l.net.HttpStatus.isSuccess(a))){if(a=0===a)a=l.uri.utils.getEffectiveScheme(String(this.lastUri_)),a=!l.net.XhrIo.HTTP_SCHEME_PATTERN.test(a);c=a}return c};
var Z=function(a){return a.xhr_?a.xhr_.readyState:l.net.XmlHttp.ReadyState.UNINITIALIZED},$=function(a){try{return Z(a)>l.net.XmlHttp.ReadyState.LOADED?a.xhr_.status:-1}catch(c){return-1}},T=function(a,c){return c+" ["+a.lastMethod_+" "+a.lastUri_+" "+$(a)+"]"};l.debug.entryPointRegistry.register(function(a){l.net.XhrIo.prototype.onReadyStateChangeEntryPoint_=a(l.net.XhrIo.prototype.onReadyStateChangeEntryPoint_)});l.craw.AppAuthenticator=function(){};l.craw.AppAuthenticator.UBERAUTH_URL_="https://www.google.com/accounts/OAuthLogin?issueuberauth=1";l.craw.AppBackground=function(a){this.delegate_=a;chrome.app.runtime.onLaunched.addListener(l.bind(this.launchWindow_,this,this.delegate_.getDefaultUrl()))};l.craw.AppBackground.prototype.launchWindow_=function(a){null!==a&&chrome.app.window.create("/html/craw_window.html",{id:"",bounds:this.delegate_.getWindowBounds(a),frame:"chrome",hidden:!1},function(c){c.contentWindow.crawConfig_=new l.craw.WindowConfig(a,!0)})};window.onload=function(){new l.craw.AppBackground(l.craw.AppBackgroundDelegate.createImpl())};
