var a,k=k||{};k.global=this;k.isDef=function(b){return void 0!==b};k.exportPath_=function(b,c,d){b=b.split(".");d=d||k.global;b[0]in d||!d.execScript||d.execScript("var "+b[0]);for(var e;b.length&&(e=b.shift());)!b.length&&k.isDef(c)?d[e]=c:d=d[e]&&d[e]!==Object.prototype[e]?d[e]:d[e]={}};k.define=function(b,c){k.exportPath_(b,c)};k.DEBUG=!0;k.LOCALE="en";k.TRUSTED_SITE=!0;k.STRICT_MODE_COMPATIBLE=!1;k.DISALLOW_TEST_ONLY_CODE=!k.DEBUG;k.ENABLE_CHROME_APP_SAFE_SCRIPT_LOADING=!1;
k.provide=function(b){if(k.isInModuleLoader_())throw Error("goog.provide can not be used within a goog.module.");k.constructNamespace_(b)};k.constructNamespace_=function(b,c){k.exportPath_(b,c)};k.VALID_MODULE_RE_=/^[a-zA-Z_$][a-zA-Z0-9._$]*$/;
k.module=function(b){if(!k.isString(b)||!b||-1==b.search(k.VALID_MODULE_RE_))throw Error("Invalid module identifier");if(!k.isInModuleLoader_())throw Error("Module "+b+" has been loaded incorrectly. Note, modules cannot be loaded as normal scripts. They require some kind of pre-processing step. You're likely trying to load a module via a script tag or as a part of a concatenated bundle without rewriting the module. For more info see: https://github.com/google/closure-library/wiki/goog.module:-an-ES6-module-like-alternative-to-goog.provide.");if(k.moduleLoaderState_.moduleName)throw Error("goog.module may only be called once per module.");
k.moduleLoaderState_.moduleName=b};k.module.get=function(){return null};k.module.getInternal_=function(){return null};k.moduleLoaderState_=null;k.isInModuleLoader_=function(){return null!=k.moduleLoaderState_};k.module.declareLegacyNamespace=function(){k.moduleLoaderState_.declareLegacyNamespace=!0};k.setTestOnly=function(b){if(k.DISALLOW_TEST_ONLY_CODE)throw b=b||"",Error("Importing test-only code into non-debug environment"+(b?": "+b:"."));};k.forwardDeclare=function(){};
k.getObjectByName=function(b){b=b.split(".");for(var c=k.global,d;d=b.shift();)if(k.isDefAndNotNull(c[d]))c=c[d];else return null;return c};k.globalize=function(b,c){c=c||k.global;for(var d in b)c[d]=b[d]};k.addDependency=function(b,c,d,e){if(k.DEPENDENCIES_ENABLED){var f;b=b.replace(/\\/g,"/");var g=k.dependencies_;e&&"boolean"!==typeof e||(e=e?{module:"goog"}:{});for(var h=0;f=c[h];h++)g.nameToPath[f]=b,g.loadFlags[b]=e;for(e=0;c=d[e];e++)b in g.requires||(g.requires[b]={}),g.requires[b][c]=!0}};
k.useStrictRequires=!1;k.ENABLE_DEBUG_LOADER=!0;k.logToConsole_=function(b){k.global.console&&k.global.console.error(b)};k.require=function(){};k.basePath="";k.nullFunction=function(){};k.abstractMethod=function(){throw Error("unimplemented abstract method");};k.addSingletonGetter=function(b){b.instance_=void 0;b.getInstance=function(){if(b.instance_)return b.instance_;k.DEBUG&&(k.instantiatedSingletons_[k.instantiatedSingletons_.length]=b);return b.instance_=new b}};k.instantiatedSingletons_=[];
k.LOAD_MODULE_USING_EVAL=!0;k.SEAL_MODULE_EXPORTS=k.DEBUG;k.loadedModules_={};k.DEPENDENCIES_ENABLED=!1;k.TRANSPILE="detect";k.TRANSPILER="transpile.js";
k.DEPENDENCIES_ENABLED&&(k.dependencies_={loadFlags:{},nameToPath:{},requires:{},visited:{},written:{},deferred:{}},k.inHtmlDocument_=function(){var b=k.global.document;return null!=b&&"write"in b},k.findBasePath_=function(){if(k.isDef(k.global.CLOSURE_BASE_PATH))k.basePath=k.global.CLOSURE_BASE_PATH;else if(k.inHtmlDocument_())for(var b=k.global.document.getElementsByTagName("SCRIPT"),c=b.length-1;0<=c;--c){var d=b[c].src,e=d.lastIndexOf("?"),e=-1==e?d.length:e;if("base.js"==d.substr(e-7,7)){k.basePath=
d.substr(0,e-7);break}}},k.importScript_=function(b,c){(k.global.CLOSURE_IMPORT_SCRIPT||k.writeScriptTag_)(b,c)&&(k.dependencies_.written[b]=!0)},k.IS_OLD_IE_=!(k.global.atob||!k.global.document||!k.global.document.all),k.importProcessedScript_=function(b,c,d){k.importScript_("",'goog.retrieveAndExec_("'+b+'", '+c+", "+d+");")},k.queuedModules_=[],k.wrapModule_=function(b,c){return k.LOAD_MODULE_USING_EVAL&&k.isDef(k.global.JSON)?"goog.loadModule("+k.global.JSON.stringify(c+"\n//# sourceURL="+b+"\n")+
");":'goog.loadModule(function(exports) {"use strict";'+c+"\n;return exports});\n//# sourceURL="+b+"\n"},k.loadQueuedModules_=function(){var b=k.queuedModules_.length;if(0<b){var c=k.queuedModules_;k.queuedModules_=[];for(var d=0;d<b;d++)k.maybeProcessDeferredPath_(c[d])}},k.maybeProcessDeferredDep_=function(b){k.isDeferredModule_(b)&&k.allDepsAreAvailable_(b)&&k.maybeProcessDeferredPath_(k.basePath+k.getPathFromDeps_(b))},k.isDeferredModule_=function(b){var c=(b=k.getPathFromDeps_(b))&&k.dependencies_.loadFlags[b]||
{},d=c.lang||"es3";return b&&("goog"==c.module||k.needsTranspile_(d))?k.basePath+b in k.dependencies_.deferred:!1},k.allDepsAreAvailable_=function(b){if((b=k.getPathFromDeps_(b))&&b in k.dependencies_.requires)for(var c in k.dependencies_.requires[b])if(!k.isProvided_(c)&&!k.isDeferredModule_(c))return!1;return!0},k.maybeProcessDeferredPath_=function(b){if(b in k.dependencies_.deferred){var c=k.dependencies_.deferred[b];delete k.dependencies_.deferred[b];k.globalEval(c)}},k.loadModuleFromUrl=function(){},
k.writeScriptSrcNode_=function(b){k.global.document.write('<script type="text/javascript" src="'+b+'">\x3c/script>')},k.appendScriptSrcNode_=function(b){var c=k.global.document,d=c.createElement("script");d.type="text/javascript";d.src=b;d.defer=!1;d.async=!1;c.head.appendChild(d)},k.writeScriptTag_=function(b,c){if(k.inHtmlDocument_()){var d=k.global.document;if(!k.ENABLE_CHROME_APP_SAFE_SCRIPT_LOADING&&"complete"==d.readyState){if(/\bdeps.js$/.test(b))return!1;throw Error('Cannot write "'+b+'" after document load');
}void 0===c?k.IS_OLD_IE_?(c=" onreadystatechange='goog.onScriptLoad_(this, "+ ++k.lastNonModuleScriptIndex_+")' ",d.write('<script type="text/javascript" src="'+b+'"'+c+">\x3c/script>")):k.ENABLE_CHROME_APP_SAFE_SCRIPT_LOADING?k.appendScriptSrcNode_(b):k.writeScriptSrcNode_(b):d.write('<script type="text/javascript">'+k.protectScriptTag_(c)+"\x3c/script>");return!0}return!1},k.protectScriptTag_=function(b){return b.replace(/<\/(SCRIPT)/ig,"\\x3c/$1")},k.needsTranspile_=function(b){if("always"==k.TRANSPILE)return!0;
if("never"==k.TRANSPILE)return!1;k.requiresTranspilation_||(k.requiresTranspilation_=k.createRequiresTranspilation_());if(b in k.requiresTranspilation_)return k.requiresTranspilation_[b];throw Error("Unknown language mode: "+b);},k.requiresTranspilation_=null,k.lastNonModuleScriptIndex_=0,k.onScriptLoad_=function(b,c){"complete"==b.readyState&&k.lastNonModuleScriptIndex_==c&&k.loadQueuedModules_();return!0},k.writeScripts_=function(b){function c(b){if(!(b in f.written||b in f.visited)){f.visited[b]=
!0;if(b in f.requires)for(var g in f.requires[b])if(!k.isProvided_(g))if(g in f.nameToPath)c(f.nameToPath[g]);else throw Error("Undefined nameToPath for "+g);b in e||(e[b]=!0,d.push(b))}}var d=[],e={},f=k.dependencies_;c(b);for(b=0;b<d.length;b++){var g=d[b];k.dependencies_.written[g]=!0}var h=k.moduleLoaderState_;k.moduleLoaderState_=null;for(b=0;b<d.length;b++)if(g=d[b]){var l=f.loadFlags[g]||{},m=k.needsTranspile_(l.lang||"es3");"goog"==l.module||m?k.importProcessedScript_(k.basePath+g,"goog"==
l.module,m):k.importScript_(k.basePath+g)}else throw k.moduleLoaderState_=h,Error("Undefined script input");k.moduleLoaderState_=h},k.getPathFromDeps_=function(b){return b in k.dependencies_.nameToPath?k.dependencies_.nameToPath[b]:null},k.findBasePath_(),k.global.CLOSURE_NO_DEPS||k.importScript_(k.basePath+"deps.js"));k.hasBadLetScoping=null;
k.useSafari10Workaround=function(){if(null==k.hasBadLetScoping){var b;try{b=!eval('"use strict";let x = 1; function f() { return typeof x; };f() == "number";')}catch(c){b=!1}k.hasBadLetScoping=b}return k.hasBadLetScoping};k.workaroundSafari10EvalBug=function(b){return"(function(){"+b+"\n;})();\n"};
k.loadModule=function(b){var c=k.moduleLoaderState_;try{k.moduleLoaderState_={moduleName:void 0,declareLegacyNamespace:!1};var d;if(k.isFunction(b))d=b.call(void 0,{});else if(k.isString(b))k.useSafari10Workaround()&&(b=k.workaroundSafari10EvalBug(b)),d=k.loadModuleFromSource_.call(void 0,b);else throw Error("Invalid module definition");var e=k.moduleLoaderState_.moduleName;if(!k.isString(e)||!e)throw Error('Invalid module name "'+e+'"');k.moduleLoaderState_.declareLegacyNamespace?k.constructNamespace_(e,
d):k.SEAL_MODULE_EXPORTS&&Object.seal&&"object"==typeof d&&null!=d&&Object.seal(d);k.loadedModules_[e]=d}finally{k.moduleLoaderState_=c}};k.loadModuleFromSource_=function(b){eval(b);return{}};k.normalizePath_=function(b){b=b.split("/");for(var c=0;c<b.length;)"."==b[c]?b.splice(c,1):c&&".."==b[c]&&b[c-1]&&".."!=b[c-1]?b.splice(--c,2):c++;return b.join("/")};
k.loadFileSync_=function(b){if(k.global.CLOSURE_LOAD_FILE_SYNC)return k.global.CLOSURE_LOAD_FILE_SYNC(b);try{var c=new k.global.XMLHttpRequest;c.open("get",b,!1);c.send();return 0==c.status||200==c.status?c.responseText:null}catch(d){return null}};k.retrieveAndExec_=function(){};
k.transpile_=function(b,c){var d=k.global.$jscomp;d||(k.global.$jscomp=d={});var e=d.transpile;if(!e){var f=k.basePath+k.TRANSPILER,g=k.loadFileSync_(f);if(g){eval(g+"\n//# sourceURL="+f);if(k.global.$gwtExport&&k.global.$gwtExport.$jscomp&&!k.global.$gwtExport.$jscomp.transpile)throw Error('The transpiler did not properly export the "transpile" method. $gwtExport: '+JSON.stringify(k.global.$gwtExport));k.global.$jscomp.transpile=k.global.$gwtExport.$jscomp.transpile;d=k.global.$jscomp;e=d.transpile}}if(!e)var h=
" requires transpilation but no transpiler was found.",h=h+' Please add "//javascript/closure:transpiler" as a data dependency to ensure it is included.',e=d.transpile=function(b,c){k.logToConsole_(c+h);return b};return e(b,c)};
k.typeOf=function(b){var c=typeof b;if("object"==c)if(b){if(b instanceof Array)return"array";if(b instanceof Object)return c;var d=Object.prototype.toString.call(b);if("[object Window]"==d)return"object";if("[object Array]"==d||"number"==typeof b.length&&"undefined"!=typeof b.splice&&"undefined"!=typeof b.propertyIsEnumerable&&!b.propertyIsEnumerable("splice"))return"array";if("[object Function]"==d||"undefined"!=typeof b.call&&"undefined"!=typeof b.propertyIsEnumerable&&!b.propertyIsEnumerable("call"))return"function"}else return"null";
else if("function"==c&&"undefined"==typeof b.call)return"object";return c};k.isNull=function(b){return null===b};k.isDefAndNotNull=function(b){return null!=b};k.isArray=function(b){return"array"==k.typeOf(b)};k.isArrayLike=function(b){var c=k.typeOf(b);return"array"==c||"object"==c&&"number"==typeof b.length};k.isDateLike=function(b){return k.isObject(b)&&"function"==typeof b.getFullYear};k.isString=function(b){return"string"==typeof b};k.isBoolean=function(b){return"boolean"==typeof b};
k.isNumber=function(b){return"number"==typeof b};k.isFunction=function(b){return"function"==k.typeOf(b)};k.isObject=function(b){var c=typeof b;return"object"==c&&null!=b||"function"==c};k.getUid=function(b){return b[k.UID_PROPERTY_]||(b[k.UID_PROPERTY_]=++k.uidCounter_)};k.hasUid=function(b){return!!b[k.UID_PROPERTY_]};k.removeUid=function(b){null!==b&&"removeAttribute"in b&&b.removeAttribute(k.UID_PROPERTY_);try{delete b[k.UID_PROPERTY_]}catch(c){}};
k.UID_PROPERTY_="closure_uid_"+(1E9*Math.random()>>>0);k.uidCounter_=0;k.getHashCode=k.getUid;k.removeHashCode=k.removeUid;k.cloneObject=function(b){var c=k.typeOf(b);if("object"==c||"array"==c){if(b.clone)return b.clone();var c="array"==c?[]:{},d;for(d in b)c[d]=k.cloneObject(b[d]);return c}return b};k.bindNative_=function(b,c,d){return b.call.apply(b.bind,arguments)};
k.bindJs_=function(b,c,d){if(!b)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 b.apply(c,d)}}return function(){return b.apply(c,arguments)}};k.bind=function(b,c,d){Function.prototype.bind&&-1!=Function.prototype.bind.toString().indexOf("native code")?k.bind=k.bindNative_:k.bind=k.bindJs_;return k.bind.apply(null,arguments)};
k.partial=function(b,c){var d=Array.prototype.slice.call(arguments,1);return function(){var c=d.slice();c.push.apply(c,arguments);return b.apply(this,c)}};k.mixin=function(b,c){for(var d in c)b[d]=c[d]};k.now=k.TRUSTED_SITE&&Date.now||function(){return+new Date};
k.globalEval=function(b){if(k.global.execScript)k.global.execScript(b,"JavaScript");else if(k.global.eval){if(null==k.evalWorksForGlobals_)if(k.global.eval("var _evalTest_ = 1;"),"undefined"!=typeof k.global._evalTest_){try{delete k.global._evalTest_}catch(e){}k.evalWorksForGlobals_=!0}else k.evalWorksForGlobals_=!1;if(k.evalWorksForGlobals_)k.global.eval(b);else{var c=k.global.document,d=c.createElement("SCRIPT");d.type="text/javascript";d.defer=!1;d.appendChild(c.createTextNode(b));c.body.appendChild(d);
c.body.removeChild(d)}}else throw Error("goog.globalEval not available");};k.evalWorksForGlobals_=null;
k.getCssName=function(b,c){if("."==String(b).charAt(0))throw Error('className passed in goog.getCssName must not start with ".". You passed: '+b);var d=function(b){return k.cssNameMapping_[b]||b},e=function(b){b=b.split("-");for(var c=[],e=0;e<b.length;e++)c.push(d(b[e]));return c.join("-")},e=k.cssNameMapping_?"BY_WHOLE"==k.cssNameMappingStyle_?d:e:function(b){return b};b=c?b+"-"+e(c):e(b);return k.global.CLOSURE_CSS_NAME_MAP_FN?k.global.CLOSURE_CSS_NAME_MAP_FN(b):b};
k.setCssNameMapping=function(b,c){k.cssNameMapping_=b;k.cssNameMappingStyle_=c};k.getMsg=function(b,c){c&&(b=b.replace(/\{\$([^}]+)}/g,function(b,e){return null!=c&&e in c?c[e]:b}));return b};k.getMsgWithFallback=function(b){return b};k.exportSymbol=function(b,c,d){k.exportPath_(b,c,d)};k.exportProperty=function(b,c,d){b[c]=d};
k.inherits=function(b,c){function d(){}d.prototype=c.prototype;b.superClass_=c.prototype;b.prototype=new d;b.prototype.constructor=b;b.base=function(b,d,g){for(var e=Array(arguments.length-2),f=2;f<arguments.length;f++)e[f-2]=arguments[f];return c.prototype[d].apply(b,e)}};
k.base=function(b,c,d){var e=arguments.callee.caller;if(k.STRICT_MODE_COMPATIBLE||k.DEBUG&&!e)throw Error("arguments.caller not defined.  goog.base() cannot be used with strict mode code. See http://www.ecma-international.org/ecma-262/5.1/#sec-C");if(e.superClass_){for(var f=Array(arguments.length-1),g=1;g<arguments.length;g++)f[g-1]=arguments[g];return e.superClass_.constructor.apply(b,f)}f=Array(arguments.length-2);for(g=2;g<arguments.length;g++)f[g-2]=arguments[g];for(var g=!1,h=b.constructor;h;h=
h.superClass_&&h.superClass_.constructor)if(h.prototype[c]===e)g=!0;else if(g)return h.prototype[c].apply(b,f);if(b[c]===e)return b.constructor.prototype[c].apply(b,f);throw Error("goog.base called from a method of one name to a method of a different name");};k.scope=function(b){if(k.isInModuleLoader_())throw Error("goog.scope is not supported within a goog.module.");b.call(k.global)};
k.defineClass=function(b,c){var d=c.constructor,e=c.statics;d&&d!=Object.prototype.constructor||(d=function(){throw Error("cannot instantiate an interface (no constructor defined).");});d=k.defineClass.createSealingConstructor_(d,b);b&&k.inherits(d,b);delete c.constructor;delete c.statics;k.defineClass.applyProperties_(d.prototype,c);null!=e&&(e instanceof Function?e(d):k.defineClass.applyProperties_(d,e));return d};k.defineClass.SEAL_CLASS_INSTANCES=k.DEBUG;
k.defineClass.createSealingConstructor_=function(b,c){if(!k.defineClass.SEAL_CLASS_INSTANCES)return b;var d=!k.defineClass.isUnsealable_(c),e=function(){var c=b.apply(this,arguments)||this;c[k.UID_PROPERTY_]=c[k.UID_PROPERTY_];this.constructor===e&&d&&Object.seal instanceof Function&&Object.seal(c);return c};return e};k.defineClass.isUnsealable_=function(b){return b&&b.prototype&&b.prototype[k.UNSEALABLE_CONSTRUCTOR_PROPERTY_]};k.defineClass.OBJECT_PROTOTYPE_FIELDS_="constructor hasOwnProperty isPrototypeOf propertyIsEnumerable toLocaleString toString valueOf".split(" ");
k.defineClass.applyProperties_=function(b,c){for(var d in c)Object.prototype.hasOwnProperty.call(c,d)&&(b[d]=c[d]);for(var e=0;e<k.defineClass.OBJECT_PROTOTYPE_FIELDS_.length;e++)d=k.defineClass.OBJECT_PROTOTYPE_FIELDS_[e],Object.prototype.hasOwnProperty.call(c,d)&&(b[d]=c[d])};k.tagUnsealableClass=function(){};k.UNSEALABLE_CONSTRUCTOR_PROPERTY_="goog_defineClass_legacy_unsealable";
k.createRequiresTranspilation_=function(){function b(b,c){e?d[b]=!0:c()?d[b]=!1:e=d[b]=!0}function c(b){try{return!!eval(b)}catch(h){return!1}}var d={es3:!1},e=!1,f=k.global.navigator&&k.global.navigator.userAgent?k.global.navigator.userAgent:"";b("es5",function(){return c("[1,].length==1")});b("es6",function(){var b=f.match(/Edge\/(\d+)(\.\d)*/i);return b&&15>Number(b[1])?!1:c('(()=>{"use strict";class X{constructor(){if(new.target!=String)throw 1;this.x=42}}let q=Reflect.construct(X,[],String);if(q.x!=42||!(q instanceof String))throw 1;for(const a of[2,3]){if(a==2)continue;function f(z={a}){let a=0;return z.a}{function f(){return 0;}}return f()==3}})()')});
b("es6-impl",function(){return!0});b("es7",function(){return c("2 ** 2 == 4")});b("es8",function(){return c("async () => 1, true")});return d};k.craw={};k.craw.AppWindowDelegate=function(){};k.craw.AppWindowDelegate.defaultImpl_=k.craw.AppWindowDelegate;k.craw.AppWindowDelegate.setDefaultImpl=function(){k.craw.AppWindowDelegate.defaultImpl_=n.WindowDelegate};k.craw.AppWindowDelegate.createDefaultImpl=function(b){return new k.craw.AppWindowDelegate.defaultImpl_(b)};k.craw.AppWindowDelegate.prototype.onWindowReady=function(){};k.craw.AppWindowDelegate.prototype.pollOnlineStatus=function(){return null};
k.craw.AppWindowDelegate.prototype.finishedLaunch=function(){return!0};k.craw.AppWindowDelegate.prototype.getAppUnavailableMessage=function(){return chrome.i18n.getMessage("craw_app_unavailable")};k.debug={};k.debug.Error=function(b){if(Error.captureStackTrace)Error.captureStackTrace(this,k.debug.Error);else{var c=Error().stack;c&&(this.stack=c)}b&&(this.message=String(b))};k.inherits(k.debug.Error,Error);k.debug.Error.prototype.name="CustomError";k.dom={};k.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};k.string={};k.string.DETECT_DOUBLE_ESCAPING=!1;k.string.FORCE_NON_DOM_HTML_UNESCAPING=!1;k.string.Unicode={NBSP:"\u00a0"};k.string.startsWith=function(b,c){return 0==b.lastIndexOf(c,0)};k.string.endsWith=function(b,c){var d=b.length-c.length;return 0<=d&&b.indexOf(c,d)==d};k.string.caseInsensitiveStartsWith=function(b){return 0==k.string.caseInsensitiveCompare("tel:",b.substr(0,4))};
k.string.caseInsensitiveEndsWith=function(b,c){return 0==k.string.caseInsensitiveCompare(c,b.substr(b.length-c.length,c.length))};k.string.caseInsensitiveEquals=function(b){return k.net.XhrIo.CONTENT_TYPE_HEADER.toLowerCase()==b.toLowerCase()};k.string.subs=function(b,c){for(var d=b.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")};
k.string.collapseWhitespace=function(b){return b.replace(/[\s\xa0]+/g," ").replace(/^\s+|\s+$/g,"")};k.string.isEmptyOrWhitespace=function(b){return/^[\s\xa0]*$/.test(b)};k.string.isEmptyString=function(b){return 0==b.length};k.string.isEmpty=k.string.isEmptyOrWhitespace;k.string.isEmptyOrWhitespaceSafe=function(b){return k.string.isEmptyOrWhitespace(k.string.makeSafe(b))};k.string.isEmptySafe=k.string.isEmptyOrWhitespaceSafe;k.string.isBreakingWhitespace=function(b){return!/[^\t\n\r ]/.test(b)};
k.string.isAlpha=function(b){return!/[^a-zA-Z]/.test(b)};k.string.isNumeric=function(b){return!/[^0-9]/.test(b)};k.string.isAlphaNumeric=function(b){return!/[^a-zA-Z0-9]/.test(b)};k.string.isSpace=function(b){return" "==b};k.string.isUnicodeChar=function(b){return 1==b.length&&" "<=b&&"~">=b||"\u0080"<=b&&"\ufffd">=b};k.string.stripNewlines=function(b){return b.replace(/(\r\n|\r|\n)+/g," ")};k.string.canonicalizeNewlines=function(b){return b.replace(/(\r\n|\r|\n)/g,"\n")};
k.string.normalizeWhitespace=function(b){return b.replace(/\xa0|\s/g," ")};k.string.normalizeSpaces=function(b){return b.replace(/\xa0|[ \t]+/g," ")};k.string.collapseBreakingSpaces=function(b){return b.replace(/[\t\r\n ]+/g," ").replace(/^[\t\r\n ]+|[\t\r\n ]+$/g,"")};k.string.trim=k.TRUSTED_SITE&&String.prototype.trim?function(b){return b.trim()}:function(b){return b.replace(/^[\s\xa0]+|[\s\xa0]+$/g,"")};k.string.trimLeft=function(b){return b.replace(/^[\s\xa0]+/,"")};
k.string.trimRight=function(b){return b.replace(/[\s\xa0]+$/,"")};k.string.caseInsensitiveCompare=function(b,c){b=String(b).toLowerCase();c=String(c).toLowerCase();return b<c?-1:b==c?0:1};
k.string.numberAwareCompare_=function(b,c,d){if(b==c)return 0;if(!b)return-1;if(!c)return 1;for(var e=b.toLowerCase().match(d),f=c.toLowerCase().match(d),g=Math.min(e.length,f.length),h=0;h<g;h++){d=e[h];var l=f[h];if(d!=l)return b=parseInt(d,10),!isNaN(b)&&(c=parseInt(l,10),!isNaN(c)&&b-c)?b-c:d<l?-1:1}return e.length!=f.length?e.length-f.length:b<c?-1:1};k.string.intAwareCompare=function(b,c){return k.string.numberAwareCompare_(b,c,/\d+|\D+/g)};
k.string.floatAwareCompare=function(b,c){return k.string.numberAwareCompare_(b,c,/\d+|\.\d+|\D+/g)};k.string.numerateCompare=k.string.floatAwareCompare;k.string.urlEncode=function(b){return encodeURIComponent(String(b))};k.string.urlDecode=function(b){return decodeURIComponent(b.replace(/\+/g," "))};k.string.newLineToBr=function(b,c){return b.replace(/(\r\n|\r|\n)/g,c?"<br />":"<br>")};
k.string.htmlEscape=function(b,c){if(c)b=b.replace(k.string.AMP_RE_,"&amp;").replace(k.string.LT_RE_,"&lt;").replace(k.string.GT_RE_,"&gt;").replace(k.string.QUOT_RE_,"&quot;").replace(k.string.SINGLE_QUOTE_RE_,"&#39;").replace(k.string.NULL_RE_,"&#0;"),k.string.DETECT_DOUBLE_ESCAPING&&(b=b.replace(k.string.E_RE_,"&#101;"));else{if(!k.string.ALL_RE_.test(b))return b;-1!=b.indexOf("&")&&(b=b.replace(k.string.AMP_RE_,"&amp;"));-1!=b.indexOf("<")&&(b=b.replace(k.string.LT_RE_,"&lt;"));-1!=b.indexOf(">")&&
(b=b.replace(k.string.GT_RE_,"&gt;"));-1!=b.indexOf('"')&&(b=b.replace(k.string.QUOT_RE_,"&quot;"));-1!=b.indexOf("'")&&(b=b.replace(k.string.SINGLE_QUOTE_RE_,"&#39;"));-1!=b.indexOf("\x00")&&(b=b.replace(k.string.NULL_RE_,"&#0;"));k.string.DETECT_DOUBLE_ESCAPING&&-1!=b.indexOf("e")&&(b=b.replace(k.string.E_RE_,"&#101;"))}return b};k.string.AMP_RE_=/&/g;k.string.LT_RE_=/</g;k.string.GT_RE_=/>/g;k.string.QUOT_RE_=/"/g;k.string.SINGLE_QUOTE_RE_=/'/g;k.string.NULL_RE_=/\x00/g;k.string.E_RE_=/e/g;
k.string.ALL_RE_=k.string.DETECT_DOUBLE_ESCAPING?/[\x00&<>"'e]/:/[\x00&<>"']/;k.string.unescapeEntities=function(b){return k.string.contains(b,"&")?!k.string.FORCE_NON_DOM_HTML_UNESCAPING&&"document"in k.global?k.string.unescapeEntitiesUsingDom_(b):k.string.unescapePureXmlEntities_(b):b};k.string.unescapeEntitiesWithDocument=function(b,c){return k.string.contains(b,"&")?k.string.unescapeEntitiesUsingDom_(b,c):b};
k.string.unescapeEntitiesUsingDom_=function(b,c){var d={"&amp;":"&","&lt;":"<","&gt;":">","&quot;":'"'},e;e=c?c.createElement("div"):k.global.document.createElement("div");return b.replace(k.string.HTML_ENTITY_PATTERN_,function(b,c){var f=d[b];if(f)return f;"#"==c.charAt(0)&&(c=Number("0"+c.substr(1)),isNaN(c)||(f=String.fromCharCode(c)));f||(e.innerHTML=b+" ",f=e.firstChild.nodeValue.slice(0,-1));return d[b]=f})};
k.string.unescapePureXmlEntities_=function(b){return b.replace(/&([^;]+);/g,function(b,d){switch(d){case "amp":return"&";case "lt":return"<";case "gt":return">";case "quot":return'"';default:return"#"!=d.charAt(0)||(d=Number("0"+d.substr(1)),isNaN(d))?b:String.fromCharCode(d)}})};k.string.HTML_ENTITY_PATTERN_=/&([^;\s<&]+);?/g;k.string.whitespaceEscape=function(b){return k.string.newLineToBr(b.replace(/  /g," &#160;"),void 0)};
k.string.preserveSpaces=function(b){return b.replace(/(^|[\n ]) /g,"$1"+k.string.Unicode.NBSP)};k.string.stripQuotes=function(b,c){for(var d=c.length,e=0;e<d;e++){var f=1==d?c:c.charAt(e);if(b.charAt(0)==f&&b.charAt(b.length-1)==f)return b.substring(1,b.length-1)}return b};k.string.truncate=function(b,c,d){d&&(b=k.string.unescapeEntities(b));b.length>c&&(b=b.substring(0,c-3)+"...");d&&(b=k.string.htmlEscape(b));return b};
k.string.truncateMiddle=function(b,c,d,e){d&&(b=k.string.unescapeEntities(b));e&&b.length>c?(e>c&&(e=c),b=b.substring(0,c-e)+"..."+b.substring(b.length-e)):b.length>c&&(e=Math.floor(c/2),b=b.substring(0,e+c%2)+"..."+b.substring(b.length-e));d&&(b=k.string.htmlEscape(b));return b};k.string.specialEscapeChars_={"\x00":"\\0","\b":"\\b","\f":"\\f","\n":"\\n","\r":"\\r","\t":"\\t","\x0B":"\\x0B",'"':'\\"',"\\":"\\\\","<":"<"};k.string.jsEscapeCache_={"'":"\\'"};
k.string.quote=function(b){b=String(b);for(var c=['"'],d=0;d<b.length;d++){var e=b.charAt(d),f=e.charCodeAt(0);c[d+1]=k.string.specialEscapeChars_[e]||(31<f&&127>f?e:k.string.escapeChar(e))}c.push('"');return c.join("")};k.string.escapeString=function(b){for(var c=[],d=0;d<b.length;d++)c[d]=k.string.escapeChar(b.charAt(d));return c.join("")};
k.string.escapeChar=function(b){if(b in k.string.jsEscapeCache_)return k.string.jsEscapeCache_[b];if(b in k.string.specialEscapeChars_)return k.string.jsEscapeCache_[b]=k.string.specialEscapeChars_[b];var c,d=b.charCodeAt(0);if(31<d&&127>d)c=b;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 k.string.jsEscapeCache_[b]=c};k.string.contains=function(b,c){return-1!=b.indexOf(c)};
k.string.caseInsensitiveContains=function(b,c){return k.string.contains(b.toLowerCase(),c.toLowerCase())};k.string.countOf=function(b,c){return b&&c?b.split(c).length-1:0};k.string.removeAt=function(b,c,d){var e=b;0<=c&&c<b.length&&0<d&&(e=b.substr(0,c)+b.substr(c+d,b.length-c-d));return e};k.string.remove=function(b,c){return b.replace(c,"")};k.string.removeAll=function(b,c){c=new RegExp(k.string.regExpEscape(c),"g");return b.replace(c,"")};
k.string.replaceAll=function(b,c,d){c=new RegExp(k.string.regExpEscape(c),"g");return b.replace(c,d.replace(/\$/g,"$$$$"))};k.string.regExpEscape=function(b){return String(b).replace(/([-()\[\]{}+?*.$\^|,:#<!\\])/g,"\\$1").replace(/\x08/g,"\\x08")};k.string.repeat=String.prototype.repeat?function(b,c){return b.repeat(c)}:function(b,c){return Array(c+1).join(b)};
k.string.padNumber=function(b,c,d){b=k.isDef(d)?b.toFixed(d):String(b);d=b.indexOf(".");-1==d&&(d=b.length);return k.string.repeat("0",Math.max(0,c-d))+b};k.string.makeSafe=function(b){return null==b?"":String(b)};k.string.buildString=function(b){return Array.prototype.join.call(arguments,"")};k.string.getRandomString=function(){return Math.floor(2147483648*Math.random()).toString(36)+Math.abs(Math.floor(2147483648*Math.random())^k.now()).toString(36)};
k.string.compareVersions=function(b,c){var d=0;b=k.string.trim(String(b)).split(".");c=k.string.trim(String(c)).split(".");for(var e=Math.max(b.length,c.length),f=0;0==d&&f<e;f++){var g=b[f]||"",h=c[f]||"";do{g=/(\d*)(\D*)(.*)/.exec(g)||["","","",""];h=/(\d*)(\D*)(.*)/.exec(h)||["","","",""];if(0==g[0].length&&0==h[0].length)break;d=k.string.compareElements_(0==g[1].length?0:parseInt(g[1],10),0==h[1].length?0:parseInt(h[1],10))||k.string.compareElements_(0==g[2].length,0==h[2].length)||k.string.compareElements_(g[2],
h[2]);g=g[3];h=h[3]}while(0==d)}return d};k.string.compareElements_=function(b,c){return b<c?-1:b>c?1:0};k.string.hashCode=function(b){for(var c=0,d=0;d<b.length;++d)c=31*c+b.charCodeAt(d)>>>0;return c};k.string.uniqueStringCounter_=2147483648*Math.random()|0;k.string.createUniqueString=function(){return"goog_"+k.string.uniqueStringCounter_++};k.string.toNumber=function(b){var c=Number(b);return 0==c&&k.string.isEmptyOrWhitespace(b)?NaN:c};k.string.isLowerCamelCase=function(b){return/^[a-z]+([A-Z][a-z]*)*$/.test(b)};
k.string.isUpperCamelCase=function(b){return/^([A-Z][a-z]*)+$/.test(b)};k.string.toCamelCase=function(b){return String(b).replace(/\-([a-z])/g,function(b,d){return d.toUpperCase()})};k.string.toSelectorCase=function(b){return String(b).replace(/([A-Z])/g,"-$1").toLowerCase()};k.string.toTitleCase=function(b,c){c=k.isString(c)?k.string.regExpEscape(c):"\\s";return b.replace(new RegExp("(^"+(c?"|["+c+"]+":"")+")([a-z])","g"),function(b,c,f){return c+f.toUpperCase()})};
k.string.capitalize=function(b){return String(b.charAt(0)).toUpperCase()+String(b.substr(1)).toLowerCase()};k.string.parseInt=function(b){isFinite(b)&&(b=String(b));return k.isString(b)?/^\s*-?0x/i.test(b)?parseInt(b,16):parseInt(b,10):NaN};k.string.splitLimit=function(b,c,d){b=b.split(c);for(var e=[];0<d&&b.length;)e.push(b.shift()),d--;b.length&&e.push(b.join(c));return e};
k.string.lastComponent=function(b,c){if(c)"string"==typeof c&&(c=[c]);else return b;for(var d=-1,e=0;e<c.length;e++)if(""!=c[e]){var f=b.lastIndexOf(c[e]);f>d&&(d=f)}return-1==d?b:b.slice(d+1)};
k.string.editDistance=function(b,c){var d=[],e=[];if(b==c)return 0;if(!b.length||!c.length)return Math.max(b.length,c.length);for(var f=0;f<c.length+1;f++)d[f]=f;for(f=0;f<b.length;f++){e[0]=f+1;for(var g=0;g<c.length;g++)e[g+1]=Math.min(e[g]+1,d[g+1]+1,d[g]+Number(b[f]!=c[g]));for(g=0;g<d.length;g++)d[g]=e[g]}return e[c.length]};k.asserts={};k.asserts.ENABLE_ASSERTS=k.DEBUG;k.asserts.AssertionError=function(b,c){c.unshift(b);k.debug.Error.call(this,k.string.subs.apply(null,c));c.shift()};k.inherits(k.asserts.AssertionError,k.debug.Error);k.asserts.AssertionError.prototype.name="AssertionError";k.asserts.DEFAULT_ERROR_HANDLER=function(b){throw b;};k.asserts.errorHandler_=k.asserts.DEFAULT_ERROR_HANDLER;
k.asserts.doAssertFailure_=function(b,c,d,e){var f="Assertion failed";if(d)var f=f+(": "+d),g=e;else b&&(f+=": "+b,g=c);b=new k.asserts.AssertionError(""+f,g||[]);k.asserts.errorHandler_(b)};k.asserts.setErrorHandler=function(b){k.asserts.ENABLE_ASSERTS&&(k.asserts.errorHandler_=b)};k.asserts.assert=function(b,c,d){k.asserts.ENABLE_ASSERTS&&!b&&k.asserts.doAssertFailure_("",null,c,Array.prototype.slice.call(arguments,2));return b};
k.asserts.fail=function(b,c){k.asserts.ENABLE_ASSERTS&&k.asserts.errorHandler_(new k.asserts.AssertionError("Failure"+(b?": "+b:""),Array.prototype.slice.call(arguments,1)))};k.asserts.assertNumber=function(b,c,d){k.asserts.ENABLE_ASSERTS&&!k.isNumber(b)&&k.asserts.doAssertFailure_("Expected number but got %s: %s.",[k.typeOf(b),b],c,Array.prototype.slice.call(arguments,2));return b};
k.asserts.assertString=function(b,c,d){k.asserts.ENABLE_ASSERTS&&!k.isString(b)&&k.asserts.doAssertFailure_("Expected string but got %s: %s.",[k.typeOf(b),b],c,Array.prototype.slice.call(arguments,2))};k.asserts.assertFunction=function(b,c,d){k.asserts.ENABLE_ASSERTS&&!k.isFunction(b)&&k.asserts.doAssertFailure_("Expected function but got %s: %s.",[k.typeOf(b),b],c,Array.prototype.slice.call(arguments,2))};
k.asserts.assertObject=function(b,c,d){k.asserts.ENABLE_ASSERTS&&!k.isObject(b)&&k.asserts.doAssertFailure_("Expected object but got %s: %s.",[k.typeOf(b),b],c,Array.prototype.slice.call(arguments,2));return b};k.asserts.assertArray=function(b,c,d){k.asserts.ENABLE_ASSERTS&&!k.isArray(b)&&k.asserts.doAssertFailure_("Expected array but got %s: %s.",[k.typeOf(b),b],c,Array.prototype.slice.call(arguments,2))};
k.asserts.assertBoolean=function(b,c,d){k.asserts.ENABLE_ASSERTS&&!k.isBoolean(b)&&k.asserts.doAssertFailure_("Expected boolean but got %s: %s.",[k.typeOf(b),b],c,Array.prototype.slice.call(arguments,2));return b};k.asserts.assertElement=function(b,c,d){!k.asserts.ENABLE_ASSERTS||k.isObject(b)&&b.nodeType==k.dom.NodeType.ELEMENT||k.asserts.doAssertFailure_("Expected Element but got %s: %s.",[k.typeOf(b),b],c,Array.prototype.slice.call(arguments,2));return b};
k.asserts.assertInstanceof=function(b,c,d,e){!k.asserts.ENABLE_ASSERTS||b instanceof c||k.asserts.doAssertFailure_("Expected instanceof %s but got %s.",[k.asserts.getType_(c),k.asserts.getType_(b)],d,Array.prototype.slice.call(arguments,3));return b};k.asserts.assertObjectPrototypeIsIntact=function(){for(var b in Object.prototype)k.asserts.fail(b+" should not be enumerable in Object.prototype.")};
k.asserts.getType_=function(b){return b instanceof Function?b.displayName||b.name||"unknown type name":b instanceof Object?b.constructor.displayName||b.constructor.name||Object.prototype.toString.call(b):null===b?"null":typeof b};k.disposable={};k.disposable.IDisposable=function(){};k.Disposable=function(){k.Disposable.MONITORING_MODE!=k.Disposable.MonitoringMode.OFF&&(k.Disposable.instances_[k.getUid(this)]=this);this.disposed_=this.disposed_;this.onDisposeCallbacks_=this.onDisposeCallbacks_};k.Disposable.MonitoringMode={OFF:0,PERMANENT:1,INTERACTIVE:2};k.Disposable.MONITORING_MODE=0;k.Disposable.INCLUDE_STACK_ON_CREATION=!0;k.Disposable.instances_={};
k.Disposable.getUndisposedObjects=function(){var b=[],c;for(c in k.Disposable.instances_)k.Disposable.instances_.hasOwnProperty(c)&&b.push(k.Disposable.instances_[Number(c)]);return b};k.Disposable.clearUndisposedObjects=function(){k.Disposable.instances_={}};k.Disposable.prototype.disposed_=!1;k.Disposable.prototype.isDisposed=function(){return this.disposed_};
k.Disposable.prototype.dispose=function(){if(!this.disposed_&&(this.disposed_=!0,this.disposeInternal(),k.Disposable.MONITORING_MODE!=k.Disposable.MonitoringMode.OFF)){var b=k.getUid(this);if(k.Disposable.MONITORING_MODE==k.Disposable.MonitoringMode.PERMANENT&&!k.Disposable.instances_.hasOwnProperty(b))throw Error(this+" did not call the goog.Disposable base constructor or was disposed of after a clearUndisposedObjects call");delete k.Disposable.instances_[b]}};
k.Disposable.prototype.disposeInternal=function(){if(this.onDisposeCallbacks_)for(;this.onDisposeCallbacks_.length;)this.onDisposeCallbacks_.shift()()};k.Disposable.isDisposed=function(b){return b&&"function"==typeof b.isDisposed?b.isDisposed():!1};k.dispose=function(b){b&&"function"==typeof b.dispose&&b.dispose()};k.disposeAll=function(b){for(var c=0,d=arguments.length;c<d;++c){var e=arguments[c];k.isArrayLike(e)?k.disposeAll.apply(null,e):k.dispose(e)}};k.object={};k.object.is=function(b,c){return b===c?0!==b||1/b===1/c:b!==b&&c!==c};k.object.forEach=function(b,c,d){for(var e in b)c.call(d,b[e],e,b)};k.object.filter=function(b,c,d){var e={},f;for(f in b)c.call(d,b[f],f,b)&&(e[f]=b[f]);return e};k.object.map=function(b,c,d){var e={},f;for(f in b)e[f]=c.call(d,b[f],f,b);return e};k.object.some=function(b,c,d){for(var e in b)if(c.call(d,b[e],e,b))return!0;return!1};k.object.every=function(b,c,d){for(var e in b)if(!c.call(d,b[e],e,b))return!1;return!0};
k.object.getCount=function(b){var c=0,d;for(d in b)c++;return c};k.object.getAnyKey=function(b){for(var c in b)return c};k.object.getAnyValue=function(b){for(var c in b)return b[c]};k.object.contains=function(b,c){return k.object.containsValue(b,c)};k.object.getValues=function(b){var c=[],d=0,e;for(e in b)c[d++]=b[e];return c};k.object.getKeys=function(b){var c=[],d=0,e;for(e in b)c[d++]=e;return c};
k.object.getValueByKeys=function(b,c){for(var d=k.isArrayLike(c),e=d?c:arguments,d=d?0:1;d<e.length&&(b=b[e[d]],k.isDef(b));d++);return b};k.object.containsKey=function(b,c){return null!==b&&c in b};k.object.containsValue=function(b,c){for(var d in b)if(b[d]==c)return!0;return!1};k.object.findKey=function(b,c,d){for(var e in b)if(c.call(d,b[e],e,b))return e};k.object.findValue=function(b,c,d){return(c=k.object.findKey(b,c,d))&&b[c]};k.object.isEmpty=function(b){for(var c in b)return!1;return!0};
k.object.clear=function(b){for(var c in b)delete b[c]};k.object.remove=function(b,c){var d;(d=c in b)&&delete b[c];return d};k.object.add=function(b,c,d){if(null!==b&&c in b)throw Error('The object already contains the key "'+c+'"');k.object.set(b,c,d)};k.object.get=function(b,c,d){return null!==b&&c in b?b[c]:d};k.object.set=function(b,c,d){b[c]=d};k.object.setIfUndefined=function(b,c,d){return c in b?b[c]:b[c]=d};
k.object.setWithReturnValueIfNotSet=function(b,c,d){if(c in b)return b[c];d=d();return b[c]=d};k.object.equals=function(b,c){for(var d in b)if(!(d in c)||b[d]!==c[d])return!1;for(d in c)if(!(d in b))return!1;return!0};k.object.clone=function(b){var c={},d;for(d in b)c[d]=b[d];return c};k.object.unsafeClone=function(b){var c=k.typeOf(b);if("object"==c||"array"==c){if(k.isFunction(b.clone))return b.clone();var c="array"==c?[]:{},d;for(d in b)c[d]=k.object.unsafeClone(b[d]);return c}return b};
k.object.transpose=function(b){var c={},d;for(d in b)c[b[d]]=d;return c};k.object.PROTOTYPE_FIELDS_="constructor hasOwnProperty isPrototypeOf propertyIsEnumerable toLocaleString toString valueOf".split(" ");k.object.extend=function(b,c){for(var d,e,f=1;f<arguments.length;f++){e=arguments[f];for(d in e)b[d]=e[d];for(var g=0;g<k.object.PROTOTYPE_FIELDS_.length;g++)d=k.object.PROTOTYPE_FIELDS_[g],Object.prototype.hasOwnProperty.call(e,d)&&(b[d]=e[d])}};
k.object.create=function(b){var c=arguments.length;if(1==c&&k.isArray(arguments[0]))return k.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};k.object.createSet=function(b){var c=arguments.length;if(1==c&&k.isArray(arguments[0]))return k.object.createSet.apply(null,arguments[0]);for(var d={},e=0;e<c;e++)d[arguments[e]]=!0;return d};
k.object.createImmutableView=function(b){var c=b;Object.isFrozen&&!Object.isFrozen(b)&&(c=Object.create(b),Object.freeze(c));return c};k.object.isImmutableView=function(b){return!!Object.isFrozen&&Object.isFrozen(b)};k.object.getAllPropertyNames=function(b,c){if(!b)return[];if(!Object.getOwnPropertyNames||!Object.getPrototypeOf)return k.object.getKeys(b);for(var d={};b&&(b!==Object.prototype||c);){for(var e=Object.getOwnPropertyNames(b),f=0;f<e.length;f++)d[e[f]]=!0;b=Object.getPrototypeOf(b)}return k.object.getKeys(d)};k.events={};k.events.EventId=function(b){this.id=b};k.events.EventId.prototype.toString=function(){return this.id};k.events.Event=function(b,c){this.type=b instanceof k.events.EventId?String(b):b;this.currentTarget=this.target=c;this.defaultPrevented=this.propagationStopped_=!1;this.returnValue_=!0};k.events.Event.prototype.stopPropagation=function(){this.propagationStopped_=!0};k.events.Event.prototype.preventDefault=function(){this.defaultPrevented=!0;this.returnValue_=!1};k.events.Event.stopPropagation=function(b){b.stopPropagation()};k.events.Event.preventDefault=function(b){b.preventDefault()};k.debug.entryPointRegistry={};k.debug.EntryPointMonitor=function(){};k.debug.entryPointRegistry.refList_=[];k.debug.entryPointRegistry.monitors_=[];k.debug.entryPointRegistry.monitorsMayExist_=!1;k.debug.entryPointRegistry.register=function(b){k.debug.entryPointRegistry.refList_[k.debug.entryPointRegistry.refList_.length]=b;if(k.debug.entryPointRegistry.monitorsMayExist_)for(var c=k.debug.entryPointRegistry.monitors_,d=0;d<c.length;d++)b(k.bind(c[d].wrap,c[d]))};
k.debug.entryPointRegistry.monitorAll=function(b){k.debug.entryPointRegistry.monitorsMayExist_=!0;for(var c=k.bind(b.wrap,b),d=0;d<k.debug.entryPointRegistry.refList_.length;d++)k.debug.entryPointRegistry.refList_[d](c);k.debug.entryPointRegistry.monitors_.push(b)};
k.debug.entryPointRegistry.unmonitorAllIfPossible=function(b){var c=k.debug.entryPointRegistry.monitors_;k.asserts.assert(b==c[c.length-1],"Only the most recent monitor can be unwrapped.");b=k.bind(b.unwrap,b);for(var d=0;d<k.debug.entryPointRegistry.refList_.length;d++)k.debug.entryPointRegistry.refList_[d](b);c.length--};k.reflect={};k.reflect.object=function(b,c){return c};k.reflect.objectProperty=function(b){return b};k.reflect.sinkValue=function(b){k.reflect.sinkValue[" "](b);return b};k.reflect.sinkValue[" "]=k.nullFunction;k.reflect.canAccessProperty=function(b){try{return k.reflect.sinkValue(b.nodeName),!0}catch(c){}return!1};k.reflect.cache=function(b,c,d,e){e=e?e(c):c;return Object.prototype.hasOwnProperty.call(b,e)?b[e]:b[e]=d(c)};k.array={};k.NATIVE_ARRAY_PROTOTYPES=k.TRUSTED_SITE;k.array.ASSUME_NATIVE_FUNCTIONS=!1;k.array.peek=function(b){return b[b.length-1]};k.array.last=k.array.peek;
k.array.indexOf=k.NATIVE_ARRAY_PROTOTYPES&&(k.array.ASSUME_NATIVE_FUNCTIONS||Array.prototype.indexOf)?function(b,c,d){k.asserts.assert(null!=b.length);return Array.prototype.indexOf.call(b,c,d)}:function(b,c,d){d=null==d?0:0>d?Math.max(0,b.length+d):d;if(k.isString(b))return k.isString(c)&&1==c.length?b.indexOf(c,d):-1;for(;d<b.length;d++)if(d in b&&b[d]===c)return d;return-1};
k.array.lastIndexOf=k.NATIVE_ARRAY_PROTOTYPES&&(k.array.ASSUME_NATIVE_FUNCTIONS||Array.prototype.lastIndexOf)?function(b,c,d){k.asserts.assert(null!=b.length);return Array.prototype.lastIndexOf.call(b,c,null==d?b.length-1:d)}:function(b,c,d){d=null==d?b.length-1:d;0>d&&(d=Math.max(0,b.length+d));if(k.isString(b))return k.isString(c)&&1==c.length?b.lastIndexOf(c,d):-1;for(;0<=d;d--)if(d in b&&b[d]===c)return d;return-1};
k.array.forEach=k.NATIVE_ARRAY_PROTOTYPES&&(k.array.ASSUME_NATIVE_FUNCTIONS||Array.prototype.forEach)?function(b,c,d){k.asserts.assert(null!=b.length);Array.prototype.forEach.call(b,c,d)}:function(b,c,d){for(var e=b.length,f=k.isString(b)?b.split(""):b,g=0;g<e;g++)g in f&&c.call(d,f[g],g,b)};k.array.forEachRight=function(b,c){for(var d=b.length,e=k.isString(b)?b.split(""):b,d=d-1;0<=d;--d)d in e&&c.call(void 0,e[d],d,b)};
k.array.filter=k.NATIVE_ARRAY_PROTOTYPES&&(k.array.ASSUME_NATIVE_FUNCTIONS||Array.prototype.filter)?function(b,c,d){k.asserts.assert(null!=b.length);return Array.prototype.filter.call(b,c,d)}:function(b,c,d){for(var e=b.length,f=[],g=0,h=k.isString(b)?b.split(""):b,l=0;l<e;l++)if(l in h){var m=h[l];c.call(d,m,l,b)&&(f[g++]=m)}return f};
k.array.map=k.NATIVE_ARRAY_PROTOTYPES&&(k.array.ASSUME_NATIVE_FUNCTIONS||Array.prototype.map)?function(b,c,d){k.asserts.assert(null!=b.length);return Array.prototype.map.call(b,c,d)}:function(b,c,d){for(var e=b.length,f=Array(e),g=k.isString(b)?b.split(""):b,h=0;h<e;h++)h in g&&(f[h]=c.call(d,g[h],h,b));return f};
k.array.reduce=k.NATIVE_ARRAY_PROTOTYPES&&(k.array.ASSUME_NATIVE_FUNCTIONS||Array.prototype.reduce)?function(b,c,d,e){k.asserts.assert(null!=b.length);e&&(c=k.bind(c,e));return Array.prototype.reduce.call(b,c,d)}:function(b,c,d,e){var f=d;k.array.forEach(b,function(d,h){f=c.call(e,f,d,h,b)});return f};
k.array.reduceRight=k.NATIVE_ARRAY_PROTOTYPES&&(k.array.ASSUME_NATIVE_FUNCTIONS||Array.prototype.reduceRight)?function(b,c,d,e){k.asserts.assert(null!=b.length);k.asserts.assert(null!=c);e&&(c=k.bind(c,e));return Array.prototype.reduceRight.call(b,c,d)}:function(b,c,d,e){var f=d;k.array.forEachRight(b,function(d,h){f=c.call(e,f,d,h,b)});return f};
k.array.some=k.NATIVE_ARRAY_PROTOTYPES&&(k.array.ASSUME_NATIVE_FUNCTIONS||Array.prototype.some)?function(b,c,d){k.asserts.assert(null!=b.length);return Array.prototype.some.call(b,c,d)}:function(b,c,d){for(var e=b.length,f=k.isString(b)?b.split(""):b,g=0;g<e;g++)if(g in f&&c.call(d,f[g],g,b))return!0;return!1};
k.array.every=k.NATIVE_ARRAY_PROTOTYPES&&(k.array.ASSUME_NATIVE_FUNCTIONS||Array.prototype.every)?function(b,c,d){k.asserts.assert(null!=b.length);return Array.prototype.every.call(b,c,d)}:function(b,c,d){for(var e=b.length,f=k.isString(b)?b.split(""):b,g=0;g<e;g++)if(g in f&&!c.call(d,f[g],g,b))return!1;return!0};k.array.count=function(b,c,d){var e=0;k.array.forEach(b,function(b,g,h){c.call(d,b,g,h)&&++e},d);return e};
k.array.find=function(b,c,d){c=k.array.findIndex(b,c,d);return 0>c?null:k.isString(b)?b.charAt(c):b[c]};k.array.findIndex=function(b,c,d){for(var e=b.length,f=k.isString(b)?b.split(""):b,g=0;g<e;g++)if(g in f&&c.call(d,f[g],g,b))return g;return-1};k.array.findRight=function(b,c,d){c=k.array.findIndexRight(b,c,d);return 0>c?null:k.isString(b)?b.charAt(c):b[c]};
k.array.findIndexRight=function(b,c,d){for(var e=b.length,f=k.isString(b)?b.split(""):b,e=e-1;0<=e;e--)if(e in f&&c.call(d,f[e],e,b))return e;return-1};k.array.contains=function(b,c){return 0<=k.array.indexOf(b,c)};k.array.isEmpty=function(b){return 0==b.length};k.array.clear=function(b){if(!k.isArray(b))for(var c=b.length-1;0<=c;c--)delete b[c];b.length=0};k.array.insert=function(b,c){k.array.contains(b,c)||b.push(c)};k.array.insertAt=function(b,c,d){k.array.splice(b,d,0,c)};
k.array.insertArrayAt=function(b,c,d){k.partial(k.array.splice,b,d,0).apply(null,c)};k.array.insertBefore=function(b,c,d){var e;2==arguments.length||0>(e=k.array.indexOf(b,d))?b.push(c):k.array.insertAt(b,c,e)};k.array.remove=function(b,c){c=k.array.indexOf(b,c);var d;(d=0<=c)&&k.array.removeAt(b,c);return d};k.array.removeLast=function(b,c){c=k.array.lastIndexOf(b,c);return 0<=c?(k.array.removeAt(b,c),!0):!1};
k.array.removeAt=function(b,c){k.asserts.assert(null!=b.length);return 1==Array.prototype.splice.call(b,c,1).length};k.array.removeIf=function(b,c,d){c=k.array.findIndex(b,c,d);return 0<=c?(k.array.removeAt(b,c),!0):!1};k.array.removeAllIf=function(b,c,d){var e=0;k.array.forEachRight(b,function(f,g){c.call(d,f,g,b)&&k.array.removeAt(b,g)&&e++});return e};k.array.concat=function(b){return Array.prototype.concat.apply([],arguments)};k.array.join=function(b){return Array.prototype.concat.apply([],arguments)};
k.array.toArray=function(b){var c=b.length;if(0<c){for(var d=Array(c),e=0;e<c;e++)d[e]=b[e];return d}return[]};k.array.clone=k.array.toArray;k.array.extend=function(b,c){for(var d=1;d<arguments.length;d++){var e=arguments[d];if(k.isArrayLike(e)){var f=b.length||0,g=e.length||0;b.length=f+g;for(var h=0;h<g;h++)b[f+h]=e[h]}else b.push(e)}};k.array.splice=function(b,c,d,e){k.asserts.assert(null!=b.length);return Array.prototype.splice.apply(b,k.array.slice(arguments,1))};
k.array.slice=function(b,c,d){k.asserts.assert(null!=b.length);return 2>=arguments.length?Array.prototype.slice.call(b,c):Array.prototype.slice.call(b,c,d)};k.array.removeDuplicates=function(b,c){c=c||b;for(var d={},e=0,f=0;f<b.length;){var g=b[f++],h;h=g;h=k.isObject(h)?"o"+k.getUid(h):(typeof h).charAt(0)+h;Object.prototype.hasOwnProperty.call(d,h)||(d[h]=!0,c[e++]=g)}c.length=e};k.array.binarySearch=function(b,c,d){return k.array.binarySearch_(b,d||k.array.defaultCompare,!1,c)};
k.array.binarySelect=function(b,c,d){return k.array.binarySearch_(b,c,!0,void 0,d)};k.array.binarySearch_=function(b,c,d,e,f){for(var g=0,h=b.length,l;g<h;){var m=g+h>>1,p;p=d?c.call(f,b[m],m,b):c(e,b[m]);0<p?g=m+1:(h=m,l=!p)}return l?g:~g};k.array.sort=function(b,c){b.sort(c||k.array.defaultCompare)};
k.array.stableSort=function(b,c){for(var d=Array(b.length),e=0;e<b.length;e++)d[e]={index:e,value:b[e]};var f=c||k.array.defaultCompare;k.array.sort(d,function(b,c){return f(b.value,c.value)||b.index-c.index});for(e=0;e<b.length;e++)b[e]=d[e].value};k.array.sortByKey=function(b,c,d){var e=d||k.array.defaultCompare;k.array.sort(b,function(b,d){return e(c(b),c(d))})};k.array.sortObjectsByKey=function(b,c,d){k.array.sortByKey(b,function(b){return b[c]},d)};
k.array.isSorted=function(b){for(var c=k.array.defaultCompare,d=1;d<b.length;d++)if(0<c(b[d-1],b[d]))return!1;return!0};k.array.equals=function(b,c,d){if(!k.isArrayLike(b)||!k.isArrayLike(c)||b.length!=c.length)return!1;var e=b.length;d=d||k.array.defaultCompareEquality;for(var f=0;f<e;f++)if(!d(b[f],c[f]))return!1;return!0};
k.array.compare3=function(b,c,d){d=d||k.array.defaultCompare;for(var e=Math.min(b.length,c.length),f=0;f<e;f++){var g=d(b[f],c[f]);if(0!=g)return g}return k.array.defaultCompare(b.length,c.length)};k.array.defaultCompare=function(b,c){return b>c?1:b<c?-1:0};k.array.inverseDefaultCompare=function(b,c){return-k.array.defaultCompare(b,c)};k.array.defaultCompareEquality=function(b,c){return b===c};
k.array.binaryInsert=function(b,c,d){d=k.array.binarySearch(b,c,d);return 0>d?(k.array.insertAt(b,c,-(d+1)),!0):!1};k.array.binaryRemove=function(b,c,d){c=k.array.binarySearch(b,c,d);return 0<=c?k.array.removeAt(b,c):!1};k.array.bucket=function(b,c,d){for(var e={},f=0;f<b.length;f++){var g=b[f],h=c.call(d,g,f,b);k.isDef(h)&&(e[h]||(e[h]=[])).push(g)}return e};k.array.toObject=function(b,c,d){var e={};k.array.forEach(b,function(f,g){e[c.call(d,f,g,b)]=f});return e};
k.array.range=function(b,c,d){var e=[],f=0,g=b;d=d||1;void 0!==c&&(f=b,g=c);if(0>d*(g-f))return[];if(0<d)for(b=f;b<g;b+=d)e.push(b);else for(b=f;b>g;b+=d)e.push(b);return e};k.array.repeat=function(b,c){for(var d=[],e=0;e<c;e++)d[e]=b;return d};k.array.flatten=function(b){for(var c=[],d=0;d<arguments.length;d++){var e=arguments[d];if(k.isArray(e))for(var f=0;f<e.length;f+=8192)for(var g=k.array.slice(e,f,f+8192),g=k.array.flatten.apply(null,g),h=0;h<g.length;h++)c.push(g[h]);else c.push(e)}return c};
k.array.rotate=function(b,c){k.asserts.assert(null!=b.length);b.length&&(c%=b.length,0<c?Array.prototype.unshift.apply(b,b.splice(-c,c)):0>c&&Array.prototype.push.apply(b,b.splice(0,-c)));return b};k.array.moveItem=function(b,c,d){k.asserts.assert(0<=c&&c<b.length);k.asserts.assert(0<=d&&d<b.length);c=Array.prototype.splice.call(b,c,1);Array.prototype.splice.call(b,d,0,c[0])};
k.array.zip=function(b){if(!arguments.length)return[];for(var c=[],d=arguments[0].length,e=1;e<arguments.length;e++)arguments[e].length<d&&(d=arguments[e].length);for(e=0;e<d;e++){for(var f=[],g=0;g<arguments.length;g++)f.push(arguments[g][e]);c.push(f)}return c};k.array.shuffle=function(b,c){c=c||Math.random;for(var d=b.length-1;0<d;d--){var e=Math.floor(c()*(d+1)),f=b[d];b[d]=b[e];b[e]=f}};k.array.copyByIndex=function(b,c){var d=[];k.array.forEach(c,function(c){d.push(b[c])});return d};
k.array.concatMap=function(b,c,d){return k.array.concat.apply([],k.array.map(b,c,d))};k.labs={};k.labs.userAgent={};k.labs.userAgent.util={};k.labs.userAgent.util.getNativeUserAgentString_=function(){var b=k.labs.userAgent.util.getNavigator_();return b&&(b=b.userAgent)?b:""};k.labs.userAgent.util.getNavigator_=function(){return k.global.navigator};k.labs.userAgent.util.userAgent_=k.labs.userAgent.util.getNativeUserAgentString_();k.labs.userAgent.util.setUserAgent=function(b){k.labs.userAgent.util.userAgent_=b||k.labs.userAgent.util.getNativeUserAgentString_()};
k.labs.userAgent.util.getUserAgent=function(){return k.labs.userAgent.util.userAgent_};k.labs.userAgent.util.matchUserAgent=function(b){return k.string.contains(k.labs.userAgent.util.getUserAgent(),b)};k.labs.userAgent.util.matchUserAgentIgnoreCase=function(){return k.string.caseInsensitiveContains(k.labs.userAgent.util.getUserAgent(),"WebKit")};
k.labs.userAgent.util.extractVersionTuples=function(b){for(var c=/(\w[\w ]+)\/([^\s]+)\s*(?:\((.*?)\))?/g,d=[],e;e=c.exec(b);)d.push([e[1],e[2],e[3]||void 0]);return d};k.labs.userAgent.browser={};k.labs.userAgent.browser.matchOpera_=function(){return k.labs.userAgent.util.matchUserAgent("Opera")};k.labs.userAgent.browser.matchIE_=function(){return k.labs.userAgent.util.matchUserAgent("Trident")||k.labs.userAgent.util.matchUserAgent("MSIE")};k.labs.userAgent.browser.matchEdge_=function(){return k.labs.userAgent.util.matchUserAgent("Edge")};k.labs.userAgent.browser.matchFirefox_=function(){return k.labs.userAgent.util.matchUserAgent("Firefox")};
k.labs.userAgent.browser.matchSafari_=function(){return k.labs.userAgent.util.matchUserAgent("Safari")&&!(k.labs.userAgent.browser.matchChrome_()||k.labs.userAgent.browser.matchCoast_()||k.labs.userAgent.browser.matchOpera_()||k.labs.userAgent.browser.matchEdge_()||k.labs.userAgent.browser.isSilk()||k.labs.userAgent.util.matchUserAgent("Android"))};k.labs.userAgent.browser.matchCoast_=function(){return k.labs.userAgent.util.matchUserAgent("Coast")};
k.labs.userAgent.browser.matchIosWebview_=function(){return(k.labs.userAgent.util.matchUserAgent("iPad")||k.labs.userAgent.util.matchUserAgent("iPhone"))&&!k.labs.userAgent.browser.matchSafari_()&&!k.labs.userAgent.browser.matchChrome_()&&!k.labs.userAgent.browser.matchCoast_()&&k.labs.userAgent.util.matchUserAgent("AppleWebKit")};k.labs.userAgent.browser.matchChrome_=function(){return(k.labs.userAgent.util.matchUserAgent("Chrome")||k.labs.userAgent.util.matchUserAgent("CriOS"))&&!k.labs.userAgent.browser.matchEdge_()};
k.labs.userAgent.browser.matchAndroidBrowser_=function(){return k.labs.userAgent.util.matchUserAgent("Android")&&!(k.labs.userAgent.browser.isChrome()||k.labs.userAgent.browser.isFirefox()||k.labs.userAgent.browser.isOpera()||k.labs.userAgent.browser.isSilk())};k.labs.userAgent.browser.isOpera=k.labs.userAgent.browser.matchOpera_;k.labs.userAgent.browser.isIE=k.labs.userAgent.browser.matchIE_;k.labs.userAgent.browser.isEdge=k.labs.userAgent.browser.matchEdge_;k.labs.userAgent.browser.isFirefox=k.labs.userAgent.browser.matchFirefox_;
k.labs.userAgent.browser.isSafari=k.labs.userAgent.browser.matchSafari_;k.labs.userAgent.browser.isCoast=k.labs.userAgent.browser.matchCoast_;k.labs.userAgent.browser.isIosWebview=k.labs.userAgent.browser.matchIosWebview_;k.labs.userAgent.browser.isChrome=k.labs.userAgent.browser.matchChrome_;k.labs.userAgent.browser.isAndroidBrowser=k.labs.userAgent.browser.matchAndroidBrowser_;k.labs.userAgent.browser.isSilk=function(){return k.labs.userAgent.util.matchUserAgent("Silk")};
k.labs.userAgent.browser.getVersion=function(){function b(b){b=k.array.find(b,e);return d[b]||""}var c=k.labs.userAgent.util.getUserAgent();if(k.labs.userAgent.browser.isIE())return k.labs.userAgent.browser.getIEVersion_(c);var c=k.labs.userAgent.util.extractVersionTuples(c),d={};k.array.forEach(c,function(b){d[b[0]]=b[1]});var e=k.partial(k.object.containsKey,d);return k.labs.userAgent.browser.isOpera()?b(["Version","Opera"]):k.labs.userAgent.browser.isEdge()?b(["Edge"]):k.labs.userAgent.browser.isChrome()?
b(["Chrome","CriOS"]):(c=c[2])&&c[1]||""};k.labs.userAgent.browser.isVersionOrHigher=function(b){return 0<=k.string.compareVersions(k.labs.userAgent.browser.getVersion(),b)};
k.labs.userAgent.browser.getIEVersion_=function(b){var c=/rv: *([\d\.]*)/.exec(b);if(c&&c[1])return c[1];var c="",d=/MSIE +([\d\.]+)/.exec(b);if(d&&d[1])if(b=/Trident\/(\d.\d)/.exec(b),"7.0"==d[1])if(b&&b[1])switch(b[1]){case "4.0":c="8.0";break;case "5.0":c="9.0";break;case "6.0":c="10.0";break;case "7.0":c="11.0"}else c="7.0";else c=d[1];return c};k.labs.userAgent.engine={};k.labs.userAgent.engine.isPresto=function(){return k.labs.userAgent.util.matchUserAgent("Presto")};k.labs.userAgent.engine.isTrident=function(){return k.labs.userAgent.util.matchUserAgent("Trident")||k.labs.userAgent.util.matchUserAgent("MSIE")};k.labs.userAgent.engine.isEdge=function(){return k.labs.userAgent.util.matchUserAgent("Edge")};k.labs.userAgent.engine.isWebKit=function(){return k.labs.userAgent.util.matchUserAgentIgnoreCase()&&!k.labs.userAgent.engine.isEdge()};
k.labs.userAgent.engine.isGecko=function(){return k.labs.userAgent.util.matchUserAgent("Gecko")&&!k.labs.userAgent.engine.isWebKit()&&!k.labs.userAgent.engine.isTrident()&&!k.labs.userAgent.engine.isEdge()};
k.labs.userAgent.engine.getVersion=function(){var b=k.labs.userAgent.util.getUserAgent();if(b){var b=k.labs.userAgent.util.extractVersionTuples(b),c=k.labs.userAgent.engine.getEngineTuple_(b);if(c)return"Gecko"==c[0]?k.labs.userAgent.engine.getVersionForKey_(b):c[1];var b=b[0],d;if(b&&(d=b[2])&&(d=/Trident\/([^\s;]+)/.exec(d)))return d[1]}return""};
k.labs.userAgent.engine.getEngineTuple_=function(b){if(!k.labs.userAgent.engine.isEdge())return b[1];for(var c=0;c<b.length;c++){var d=b[c];if("Edge"==d[0])return d}};k.labs.userAgent.engine.isVersionOrHigher=function(b){return 0<=k.string.compareVersions(k.labs.userAgent.engine.getVersion(),b)};k.labs.userAgent.engine.getVersionForKey_=function(b){return(b=k.array.find(b,function(b){return"Firefox"==b[0]}))&&b[1]||""};k.labs.userAgent.platform={};k.labs.userAgent.platform.isAndroid=function(){return k.labs.userAgent.util.matchUserAgent("Android")};k.labs.userAgent.platform.isIpod=function(){return k.labs.userAgent.util.matchUserAgent("iPod")};k.labs.userAgent.platform.isIphone=function(){return k.labs.userAgent.util.matchUserAgent("iPhone")&&!k.labs.userAgent.util.matchUserAgent("iPod")&&!k.labs.userAgent.util.matchUserAgent("iPad")};k.labs.userAgent.platform.isIpad=function(){return k.labs.userAgent.util.matchUserAgent("iPad")};
k.labs.userAgent.platform.isIos=function(){return k.labs.userAgent.platform.isIphone()||k.labs.userAgent.platform.isIpad()||k.labs.userAgent.platform.isIpod()};k.labs.userAgent.platform.isMacintosh=function(){return k.labs.userAgent.util.matchUserAgent("Macintosh")};k.labs.userAgent.platform.isLinux=function(){return k.labs.userAgent.util.matchUserAgent("Linux")};k.labs.userAgent.platform.isWindows=function(){return k.labs.userAgent.util.matchUserAgent("Windows")};
k.labs.userAgent.platform.isChromeOS=function(){return k.labs.userAgent.util.matchUserAgent("CrOS")};
k.labs.userAgent.platform.getVersion=function(){var b=k.labs.userAgent.util.getUserAgent(),c="";k.labs.userAgent.platform.isWindows()?(c=/Windows (?:NT|Phone) ([0-9.]+)/,c=(b=c.exec(b))?b[1]:"0.0"):k.labs.userAgent.platform.isIos()?(c=/(?:iPhone|iPod|iPad|CPU)\s+OS\s+(\S+)/,c=(b=c.exec(b))&&b[1].replace(/_/g,".")):k.labs.userAgent.platform.isMacintosh()?(c=/Mac OS X ([0-9_.]+)/,c=(b=c.exec(b))?b[1].replace(/_/g,"."):"10"):k.labs.userAgent.platform.isAndroid()?(c=/Android\s+([^\);]+)(\)|;)/,c=(b=c.exec(b))&&
b[1]):k.labs.userAgent.platform.isChromeOS()&&(c=/(?:CrOS\s+(?:i686|x86_64)\s+([0-9.]+))/,c=(b=c.exec(b))&&b[1]);return c||""};k.labs.userAgent.platform.isVersionOrHigher=function(b){return 0<=k.string.compareVersions(k.labs.userAgent.platform.getVersion(),b)};k.userAgent={};k.userAgent.ASSUME_IE=!1;k.userAgent.ASSUME_EDGE=!1;k.userAgent.ASSUME_GECKO=!1;k.userAgent.ASSUME_WEBKIT=!1;k.userAgent.ASSUME_MOBILE_WEBKIT=!1;k.userAgent.ASSUME_OPERA=!1;k.userAgent.ASSUME_ANY_VERSION=!1;k.userAgent.BROWSER_KNOWN_=k.userAgent.ASSUME_IE||k.userAgent.ASSUME_EDGE||k.userAgent.ASSUME_GECKO||k.userAgent.ASSUME_MOBILE_WEBKIT||k.userAgent.ASSUME_WEBKIT||k.userAgent.ASSUME_OPERA;k.userAgent.getUserAgentString=function(){return k.labs.userAgent.util.getUserAgent()};
k.userAgent.getNavigator=function(){return k.global.navigator||null};k.userAgent.OPERA=k.userAgent.BROWSER_KNOWN_?k.userAgent.ASSUME_OPERA:k.labs.userAgent.browser.isOpera();k.userAgent.IE=k.userAgent.BROWSER_KNOWN_?k.userAgent.ASSUME_IE:k.labs.userAgent.browser.isIE();k.userAgent.EDGE=k.userAgent.BROWSER_KNOWN_?k.userAgent.ASSUME_EDGE:k.labs.userAgent.engine.isEdge();k.userAgent.EDGE_OR_IE=k.userAgent.EDGE||k.userAgent.IE;k.userAgent.GECKO=k.userAgent.BROWSER_KNOWN_?k.userAgent.ASSUME_GECKO:k.labs.userAgent.engine.isGecko();
k.userAgent.WEBKIT=k.userAgent.BROWSER_KNOWN_?k.userAgent.ASSUME_WEBKIT||k.userAgent.ASSUME_MOBILE_WEBKIT:k.labs.userAgent.engine.isWebKit();k.userAgent.isMobile_=function(){return k.userAgent.WEBKIT&&k.labs.userAgent.util.matchUserAgent("Mobile")};k.userAgent.MOBILE=k.userAgent.ASSUME_MOBILE_WEBKIT||k.userAgent.isMobile_();k.userAgent.SAFARI=k.userAgent.WEBKIT;k.userAgent.determinePlatform_=function(){var b=k.userAgent.getNavigator();return b&&b.platform||""};k.userAgent.PLATFORM=k.userAgent.determinePlatform_();
k.userAgent.ASSUME_MAC=!1;k.userAgent.ASSUME_WINDOWS=!1;k.userAgent.ASSUME_LINUX=!1;k.userAgent.ASSUME_X11=!1;k.userAgent.ASSUME_ANDROID=!1;k.userAgent.ASSUME_IPHONE=!1;k.userAgent.ASSUME_IPAD=!1;k.userAgent.ASSUME_IPOD=!1;k.userAgent.PLATFORM_KNOWN_=k.userAgent.ASSUME_MAC||k.userAgent.ASSUME_WINDOWS||k.userAgent.ASSUME_LINUX||k.userAgent.ASSUME_X11||k.userAgent.ASSUME_ANDROID||k.userAgent.ASSUME_IPHONE||k.userAgent.ASSUME_IPAD||k.userAgent.ASSUME_IPOD;
k.userAgent.MAC=k.userAgent.PLATFORM_KNOWN_?k.userAgent.ASSUME_MAC:k.labs.userAgent.platform.isMacintosh();k.userAgent.WINDOWS=k.userAgent.PLATFORM_KNOWN_?k.userAgent.ASSUME_WINDOWS:k.labs.userAgent.platform.isWindows();k.userAgent.isLegacyLinux_=function(){return k.labs.userAgent.platform.isLinux()||k.labs.userAgent.platform.isChromeOS()};k.userAgent.LINUX=k.userAgent.PLATFORM_KNOWN_?k.userAgent.ASSUME_LINUX:k.userAgent.isLegacyLinux_();
k.userAgent.isX11_=function(){var b=k.userAgent.getNavigator();return!!b&&k.string.contains(b.appVersion||"","X11")};k.userAgent.X11=k.userAgent.PLATFORM_KNOWN_?k.userAgent.ASSUME_X11:k.userAgent.isX11_();k.userAgent.ANDROID=k.userAgent.PLATFORM_KNOWN_?k.userAgent.ASSUME_ANDROID:k.labs.userAgent.platform.isAndroid();k.userAgent.IPHONE=k.userAgent.PLATFORM_KNOWN_?k.userAgent.ASSUME_IPHONE:k.labs.userAgent.platform.isIphone();k.userAgent.IPAD=k.userAgent.PLATFORM_KNOWN_?k.userAgent.ASSUME_IPAD:k.labs.userAgent.platform.isIpad();
k.userAgent.IPOD=k.userAgent.PLATFORM_KNOWN_?k.userAgent.ASSUME_IPOD:k.labs.userAgent.platform.isIpod();k.userAgent.IOS=k.userAgent.PLATFORM_KNOWN_?k.userAgent.ASSUME_IPHONE||k.userAgent.ASSUME_IPAD||k.userAgent.ASSUME_IPOD:k.labs.userAgent.platform.isIos();k.userAgent.determineVersion_=function(){var b="",c=k.userAgent.getVersionRegexResult_();c&&(b=c?c[1]:"");return k.userAgent.IE&&(c=k.userAgent.getDocumentMode_(),null!=c&&c>parseFloat(b))?String(c):b};
k.userAgent.getVersionRegexResult_=function(){var b=k.userAgent.getUserAgentString();if(k.userAgent.GECKO)return/rv\:([^\);]+)(\)|;)/.exec(b);if(k.userAgent.EDGE)return/Edge\/([\d\.]+)/.exec(b);if(k.userAgent.IE)return/\b(?:MSIE|rv)[: ]([^\);]+)(\)|;)/.exec(b);if(k.userAgent.WEBKIT)return/WebKit\/(\S+)/.exec(b);if(k.userAgent.OPERA)return/(?:Version)[ \/]?(\S+)/.exec(b)};k.userAgent.getDocumentMode_=function(){var b=k.global.document;return b?b.documentMode:void 0};k.userAgent.VERSION=k.userAgent.determineVersion_();
k.userAgent.compare=function(b,c){return k.string.compareVersions(b,c)};k.userAgent.isVersionOrHigherCache_={};k.userAgent.isVersionOrHigher=function(b){return k.userAgent.ASSUME_ANY_VERSION||k.reflect.cache(k.userAgent.isVersionOrHigherCache_,b,function(){return 0<=k.string.compareVersions(k.userAgent.VERSION,b)})};k.userAgent.isVersion=k.userAgent.isVersionOrHigher;k.userAgent.isDocumentModeOrHigher=function(b){return Number(k.userAgent.DOCUMENT_MODE)>=b};k.userAgent.isDocumentMode=k.userAgent.isDocumentModeOrHigher;
var r;var t=k.global.document;r=t&&k.userAgent.IE?k.userAgent.getDocumentMode_()||("CSS1Compat"==t.compatMode?parseInt(k.userAgent.VERSION,10):5):void 0;k.userAgent.DOCUMENT_MODE=r;k.events.BrowserFeature={HAS_W3C_BUTTON:!k.userAgent.IE||k.userAgent.isDocumentModeOrHigher(9),HAS_W3C_EVENT_SUPPORT:!k.userAgent.IE||k.userAgent.isDocumentModeOrHigher(9),SET_KEY_CODE_TO_PREVENT_DEFAULT:k.userAgent.IE&&!k.userAgent.isVersionOrHigher("9"),HAS_NAVIGATOR_ONLINE_PROPERTY:!k.userAgent.WEBKIT||k.userAgent.isVersionOrHigher("528"),HAS_HTML5_NETWORK_EVENT_SUPPORT:k.userAgent.GECKO&&k.userAgent.isVersionOrHigher("1.9b")||k.userAgent.IE&&k.userAgent.isVersionOrHigher("8")||k.userAgent.OPERA&&
k.userAgent.isVersionOrHigher("9.5")||k.userAgent.WEBKIT&&k.userAgent.isVersionOrHigher("528"),HTML5_NETWORK_EVENTS_FIRE_ON_BODY:k.userAgent.GECKO&&!k.userAgent.isVersionOrHigher("8")||k.userAgent.IE&&!k.userAgent.isVersionOrHigher("9"),TOUCH_ENABLED:"ontouchstart"in k.global||!!(k.global.document&&document.documentElement&&"ontouchstart"in document.documentElement)||!(!k.global.navigator||!k.global.navigator.msMaxTouchPoints)};k.events.getVendorPrefixedName_=function(b){return k.userAgent.WEBKIT?"webkit"+b:k.userAgent.OPERA?"o"+b.toLowerCase():b.toLowerCase()};
k.events.EventType={CLICK:"click",RIGHTCLICK:"rightclick",DBLCLICK:"dblclick",MOUSEDOWN:"mousedown",MOUSEUP:"mouseup",MOUSEOVER:"mouseover",MOUSEOUT:"mouseout",MOUSEMOVE:"mousemove",MOUSEENTER:"mouseenter",MOUSELEAVE:"mouseleave",SELECTIONCHANGE:"selectionchange",SELECTSTART:"selectstart",WHEEL:"wheel",KEYPRESS:"keypress",KEYDOWN:"keydown",KEYUP:"keyup",BLUR:"blur",FOCUS:"focus",DEACTIVATE:"deactivate",FOCUSIN:k.userAgent.IE?"focusin":"DOMFocusIn",FOCUSOUT:k.userAgent.IE?"focusout":"DOMFocusOut",
CHANGE:"change",RESET:"reset",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",DEVICEMOTION:"devicemotion",DEVICEORIENTATION:"deviceorientation",DOMCONTENTLOADED:"DOMContentLoaded",
ERROR:"error",HELP:"help",LOAD:"load",LOSECAPTURE:"losecapture",ORIENTATIONCHANGE:"orientationchange",READYSTATECHANGE:"readystatechange",RESIZE:"resize",SCROLL:"scroll",UNLOAD:"unload",CANPLAY:"canplay",CANPLAYTHROUGH:"canplaythrough",DURATIONCHANGE:"durationchange",EMPTIED:"emptied",ENDED:"ended",LOADEDDATA:"loadeddata",LOADEDMETADATA:"loadedmetadata",PAUSE:"pause",PLAY:"play",PLAYING:"playing",RATECHANGE:"ratechange",SEEKED:"seeked",SEEKING:"seeking",STALLED:"stalled",SUSPEND:"suspend",TIMEUPDATE:"timeupdate",
VOLUMECHANGE:"volumechange",WAITING:"waiting",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:k.events.getVendorPrefixedName_("AnimationStart"),ANIMATIONEND:k.events.getVendorPrefixedName_("AnimationEnd"),ANIMATIONITERATION:k.events.getVendorPrefixedName_("AnimationIteration"),
TRANSITIONEND:k.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",TEXT:"text",TEXTINPUT:k.userAgent.IE?"textinput":"textInput",COMPOSITIONSTART:"compositionstart",COMPOSITIONUPDATE:"compositionupdate",
COMPOSITIONEND:"compositionend",BEFOREINPUT:"beforeinput",EXIT:"exit",LOADABORT:"loadabort",LOADCOMMIT:"loadcommit",LOADREDIRECT:"loadredirect",LOADSTART:"loadstart",LOADSTOP:"loadstop",RESPONSIVE:"responsive",SIZECHANGED:"sizechanged",UNRESPONSIVE:"unresponsive",VISIBILITYCHANGE:"visibilitychange",STORAGE:"storage",DOMSUBTREEMODIFIED:"DOMSubtreeModified",DOMNODEINSERTED:"DOMNodeInserted",DOMNODEREMOVED:"DOMNodeRemoved",DOMNODEREMOVEDFROMDOCUMENT:"DOMNodeRemovedFromDocument",DOMNODEINSERTEDINTODOCUMENT:"DOMNodeInsertedIntoDocument",
DOMATTRMODIFIED:"DOMAttrModified",DOMCHARACTERDATAMODIFIED:"DOMCharacterDataModified",BEFOREPRINT:"beforeprint",AFTERPRINT:"afterprint"};k.events.BrowserEvent=function(b,c){k.events.Event.call(this,b?b.type:"");this.relatedTarget=this.currentTarget=this.target=null;this.button=this.screenY=this.screenX=this.clientY=this.clientX=this.offsetY=this.offsetX=0;this.key="";this.charCode=this.keyCode=0;this.metaKey=this.shiftKey=this.altKey=this.ctrlKey=!1;this.event_=this.state=null;if(b){var d=this.type=b.type,e=b.changedTouches?b.changedTouches[0]:null;this.target=b.target||b.srcElement;this.currentTarget=c;(c=b.relatedTarget)?k.userAgent.GECKO&&
(k.reflect.canAccessProperty(c)||(c=null)):d==k.events.EventType.MOUSEOVER?c=b.fromElement:d==k.events.EventType.MOUSEOUT&&(c=b.toElement);this.relatedTarget=c;k.isNull(e)?(this.offsetX=k.userAgent.WEBKIT||void 0!==b.offsetX?b.offsetX:b.layerX,this.offsetY=k.userAgent.WEBKIT||void 0!==b.offsetY?b.offsetY:b.layerY,this.clientX=void 0!==b.clientX?b.clientX:b.pageX,this.clientY=void 0!==b.clientY?b.clientY:b.pageY,this.screenX=b.screenX||0,this.screenY=b.screenY||0):(this.clientX=void 0!==e.clientX?
e.clientX:e.pageX,this.clientY=void 0!==e.clientY?e.clientY:e.pageY,this.screenX=e.screenX||0,this.screenY=e.screenY||0);this.button=b.button;this.keyCode=b.keyCode||0;this.key=b.key||"";this.charCode=b.charCode||("keypress"==d?b.keyCode:0);this.ctrlKey=b.ctrlKey;this.altKey=b.altKey;this.shiftKey=b.shiftKey;this.metaKey=b.metaKey;this.state=b.state;this.event_=b;b.defaultPrevented&&this.preventDefault()}};k.inherits(k.events.BrowserEvent,k.events.Event);
k.events.BrowserEvent.MouseButton={LEFT:0,MIDDLE:1,RIGHT:2};k.events.BrowserEvent.IEButtonMap=[1,4,2];k.events.BrowserEvent.prototype.stopPropagation=function(){k.events.BrowserEvent.superClass_.stopPropagation.call(this);this.event_.stopPropagation?this.event_.stopPropagation():this.event_.cancelBubble=!0};
k.events.BrowserEvent.prototype.preventDefault=function(){k.events.BrowserEvent.superClass_.preventDefault.call(this);var b=this.event_;if(b.preventDefault)b.preventDefault();else if(b.returnValue=!1,k.events.BrowserFeature.SET_KEY_CODE_TO_PREVENT_DEFAULT)try{if(b.ctrlKey||112<=b.keyCode&&123>=b.keyCode)b.keyCode=-1}catch(c){}};k.events.Listenable=function(){};k.events.Listenable.IMPLEMENTED_BY_PROP="closure_listenable_"+(1E6*Math.random()|0);k.events.Listenable.addImplementation=function(b){b.prototype[k.events.Listenable.IMPLEMENTED_BY_PROP]=!0};k.events.Listenable.isImplementedBy=function(b){return!(!b||!b[k.events.Listenable.IMPLEMENTED_BY_PROP])};k.events.ListenableKey=function(){};k.events.ListenableKey.counter_=0;k.events.ListenableKey.reserveKey=function(){return++k.events.ListenableKey.counter_};k.events.Listener=function(b,c,d,e,f,g){this.listener=b;this.proxy=c;this.src=d;this.type=e;this.capture=!!f;this.handler=g;this.key=k.events.ListenableKey.reserveKey();this.removed=this.callOnce=!1};k.events.Listener.ENABLE_MONITORING=!1;var u=function(b){b.removed=!0;b.listener=null;b.proxy=null;b.src=null;b.handler=null};k.events.ListenerMap=function(b){this.src=b;this.listeners={};this.typeCount_=0};k.events.ListenerMap.prototype.add=function(b,c,d,e,f){var g=b.toString();b=this.listeners[g];b||(b=this.listeners[g]=[],this.typeCount_++);var h=k.events.ListenerMap.findListenerIndex_(b,c,e,f);-1<h?(c=b[h],d||(c.callOnce=!1)):(c=new k.events.Listener(c,null,this.src,g,!!e,f),c.callOnce=d,b.push(c));return c};
k.events.ListenerMap.prototype.remove=function(b,c,d,e){b=b.toString();if(!(b in this.listeners))return!1;var f=this.listeners[b];c=k.events.ListenerMap.findListenerIndex_(f,c,d,e);return-1<c?(u(f[c]),k.array.removeAt(f,c),0==f.length&&(delete this.listeners[b],this.typeCount_--),!0):!1};var v=function(b,c){var d=c.type;if(!(d in b.listeners))return!1;var e=k.array.remove(b.listeners[d],c);e&&(u(c),0==b.listeners[d].length&&(delete b.listeners[d],b.typeCount_--));return e};
k.events.ListenerMap.prototype.removeAll=function(b){b=b&&b.toString();var c=0,d;for(d in this.listeners)if(!b||d==b){for(var e=this.listeners[d],f=0;f<e.length;f++)++c,u(e[f]);delete this.listeners[d];this.typeCount_--}return c};k.events.ListenerMap.prototype.getListeners=function(b,c){b=this.listeners[b.toString()];var d=[];if(b)for(var e=0;e<b.length;++e){var f=b[e];f.capture==c&&d.push(f)}return d};
k.events.ListenerMap.prototype.getListener=function(b,c,d,e){b=this.listeners[b.toString()];var f=-1;b&&(f=k.events.ListenerMap.findListenerIndex_(b,c,d,e));return-1<f?b[f]:null};k.events.ListenerMap.prototype.hasListener=function(b,c){var d=k.isDef(b),e=d?b.toString():"",f=k.isDef(c);return k.object.some(this.listeners,function(b){for(var g=0;g<b.length;++g)if(!(d&&b[g].type!=e||f&&b[g].capture!=c))return!0;return!1})};
k.events.ListenerMap.findListenerIndex_=function(b,c,d,e){for(var f=0;f<b.length;++f){var g=b[f];if(!g.removed&&g.listener==c&&g.capture==!!d&&g.handler==e)return f}return-1};k.events.LISTENER_MAP_PROP_="closure_lm_"+(1E6*Math.random()|0);k.events.onString_="on";k.events.onStringMap_={};k.events.CaptureSimulationMode={OFF_AND_FAIL:0,OFF_AND_SILENT:1,ON:2};k.events.CAPTURE_SIMULATION_MODE=2;k.events.listenerCountEstimate_=0;k.events.listen=function(b,c,d,e,f){if(k.isArray(c)){for(var g=0;g<c.length;g++)k.events.listen(b,c[g],d,e,f);return null}d=k.events.wrapListener(d);return k.events.Listenable.isImplementedBy(b)?b.listen(c,d,e,f):k.events.listen_(b,c,d,!1,e,f)};
k.events.listen_=function(b,c,d,e,f,g){if(!c)throw Error("Invalid event type");var h=!!f;if(h&&!k.events.BrowserFeature.HAS_W3C_EVENT_SUPPORT){if(k.events.CAPTURE_SIMULATION_MODE==k.events.CaptureSimulationMode.OFF_AND_FAIL)return k.asserts.fail("Can not register capture listener in IE8-."),null;if(k.events.CAPTURE_SIMULATION_MODE==k.events.CaptureSimulationMode.OFF_AND_SILENT)return null}var l=k.events.getListenerMap_(b);l||(b[k.events.LISTENER_MAP_PROP_]=l=new k.events.ListenerMap(b));d=l.add(c,
d,e,f,g);if(d.proxy)return d;e=k.events.getProxy();d.proxy=e;e.src=b;e.listener=d;if(b.addEventListener)b.addEventListener(c.toString(),e,h);else if(b.attachEvent)b.attachEvent(k.events.getOnString_(c.toString()),e);else throw Error("addEventListener and attachEvent are unavailable.");k.events.listenerCountEstimate_++;return d};
k.events.getProxy=function(){var b=k.events.handleBrowserEvent_,c=k.events.BrowserFeature.HAS_W3C_EVENT_SUPPORT?function(d){return b.call(c.src,c.listener,d)}:function(d){d=b.call(c.src,c.listener,d);if(!d)return d};return c};k.events.listenOnce=function(b,c,d,e,f){if(k.isArray(c)){for(var g=0;g<c.length;g++)k.events.listenOnce(b,c[g],d,e,f);return null}d=k.events.wrapListener(d);return k.events.Listenable.isImplementedBy(b)?b.listenOnce(c,d,e,f):k.events.listen_(b,c,d,!0,e,f)};
k.events.listenWithWrapper=function(b,c,d,e,f){c.listen(b,d,e,f)};k.events.unlisten=function(b,c,d,e,f){if(k.isArray(c)){for(var g=0;g<c.length;g++)k.events.unlisten(b,c[g],d,e,f);return null}d=k.events.wrapListener(d);if(k.events.Listenable.isImplementedBy(b))return b.unlisten(c,d,e,f);if(!b)return!1;if(b=k.events.getListenerMap_(b))if(c=b.getListener(c,d,!!e,f))return k.events.unlistenByKey(c);return!1};
k.events.unlistenByKey=function(b){if(k.isNumber(b)||!b||b.removed)return!1;var c=b.src;if(k.events.Listenable.isImplementedBy(c))return c.unlistenByKey(b);var d=b.type,e=b.proxy;c.removeEventListener?c.removeEventListener(d,e,b.capture):c.detachEvent&&c.detachEvent(k.events.getOnString_(d),e);k.events.listenerCountEstimate_--;(d=k.events.getListenerMap_(c))?(v(d,b),0==d.typeCount_&&(d.src=null,c[k.events.LISTENER_MAP_PROP_]=null)):u(b);return!0};
k.events.unlistenWithWrapper=function(b,c,d,e,f){c.unlisten(b,d,e,f)};k.events.removeAll=function(b,c){if(!b)return 0;if(k.events.Listenable.isImplementedBy(b))return b.eventTargetListeners_?b.eventTargetListeners_.removeAll(c):0;b=k.events.getListenerMap_(b);if(!b)return 0;var d=0;c=c&&c.toString();for(var e in b.listeners)if(!c||e==c)for(var f=b.listeners[e].concat(),g=0;g<f.length;++g)k.events.unlistenByKey(f[g])&&++d;return d};
k.events.getListeners=function(b,c,d){return k.events.Listenable.isImplementedBy(b)?b.getListeners(c,d):b?(b=k.events.getListenerMap_(b))?b.getListeners(c,d):[]:[]};k.events.getListener=function(b,c,d,e,f){d=k.events.wrapListener(d);e=!!e;return k.events.Listenable.isImplementedBy(b)?b.getListener(c,d,e,f):b?(b=k.events.getListenerMap_(b))?b.getListener(c,d,e,f):null:null};
k.events.hasListener=function(b,c,d){if(k.events.Listenable.isImplementedBy(b))return b.hasListener(c,d);b=k.events.getListenerMap_(b);return!!b&&b.hasListener(c,d)};k.events.expose=function(b){var c=[],d;for(d in b)b[d]&&b[d].id?c.push(d+" = "+b[d]+" ("+b[d].id+")"):c.push(d+" = "+b[d]);return c.join("\n")};k.events.getOnString_=function(b){return b in k.events.onStringMap_?k.events.onStringMap_[b]:k.events.onStringMap_[b]=k.events.onString_+b};
k.events.fireListeners=function(b,c,d,e){return k.events.Listenable.isImplementedBy(b)?b.fireListeners(c,d,e):k.events.fireListeners_(b,c,d,e)};k.events.fireListeners_=function(b,c,d,e){var f=!0;if(b=k.events.getListenerMap_(b))if(c=b.listeners[c.toString()])for(c=c.concat(),b=0;b<c.length;b++){var g=c[b];g&&g.capture==d&&!g.removed&&(g=k.events.fireListener(g,e),f=f&&!1!==g)}return f};
k.events.fireListener=function(b,c){var d=b.listener,e=b.handler||b.src;b.callOnce&&k.events.unlistenByKey(b);return d.call(e,c)};k.events.getTotalListenerCount=function(){return k.events.listenerCountEstimate_};k.events.dispatchEvent=function(b,c){k.asserts.assert(k.events.Listenable.isImplementedBy(b),"Can not use goog.events.dispatchEvent with non-goog.events.Listenable instance.");return b.dispatchEvent(c)};k.events.protectBrowserEventEntryPoint=function(b){k.events.handleBrowserEvent_=b.protectEntryPoint(k.events.handleBrowserEvent_)};
k.events.handleBrowserEvent_=function(b,c){if(b.removed)return!0;if(!k.events.BrowserFeature.HAS_W3C_EVENT_SUPPORT){var d=c||k.getObjectByName("window.event");c=new k.events.BrowserEvent(d,this);var e=!0;if(k.events.CAPTURE_SIMULATION_MODE==k.events.CaptureSimulationMode.ON){if(!k.events.isMarkedIeEvent_(d)){k.events.markIeEvent_(d);for(var d=[],f=c.currentTarget;f;f=f.parentNode)d.push(f);b=b.type;for(f=d.length-1;!c.propagationStopped_&&0<=f;f--){c.currentTarget=d[f];var g=k.events.fireListeners_(d[f],
b,!0,c),e=e&&g}for(f=0;!c.propagationStopped_&&f<d.length;f++)c.currentTarget=d[f],g=k.events.fireListeners_(d[f],b,!1,c),e=e&&g}}else e=k.events.fireListener(b,c);return e}return k.events.fireListener(b,new k.events.BrowserEvent(c,this))};k.events.markIeEvent_=function(b){var c=!1;if(0==b.keyCode)try{b.keyCode=-1;return}catch(d){c=!0}if(c||void 0==b.returnValue)b.returnValue=!0};k.events.isMarkedIeEvent_=function(b){return 0>b.keyCode||void 0!=b.returnValue};k.events.uniqueIdCounter_=0;
k.events.getUniqueId=function(b){return b+"_"+k.events.uniqueIdCounter_++};k.events.getListenerMap_=function(b){b=b[k.events.LISTENER_MAP_PROP_];return b instanceof k.events.ListenerMap?b:null};k.events.LISTENER_WRAPPER_PROP_="__closure_events_fn_"+(1E9*Math.random()>>>0);
k.events.wrapListener=function(b){k.asserts.assert(b,"Listener can not be null.");if(k.isFunction(b))return b;k.asserts.assert(b.handleEvent,"An object listener must have handleEvent method.");b[k.events.LISTENER_WRAPPER_PROP_]||(b[k.events.LISTENER_WRAPPER_PROP_]=function(c){return b.handleEvent(c)});return b[k.events.LISTENER_WRAPPER_PROP_]};k.debug.entryPointRegistry.register(function(b){k.events.handleBrowserEvent_=b(k.events.handleBrowserEvent_)});k.events.EventTarget=function(){k.Disposable.call(this);this.eventTargetListeners_=new k.events.ListenerMap(this);this.actualEventTarget_=this;this.parentEventTarget_=null};k.inherits(k.events.EventTarget,k.Disposable);k.events.Listenable.addImplementation(k.events.EventTarget);k.events.EventTarget.MAX_ANCESTORS_=1E3;a=k.events.EventTarget.prototype;a.addEventListener=function(b,c,d,e){k.events.listen(this,b,c,d,e)};a.removeEventListener=function(b,c,d,e){k.events.unlisten(this,b,c,d,e)};
a.dispatchEvent=function(b){w(this);var c,d=this.parentEventTarget_;if(d){c=[];for(var e=1;d;d=d.parentEventTarget_)c.push(d),k.asserts.assert(++e<k.events.EventTarget.MAX_ANCESTORS_,"infinite loop")}return k.events.EventTarget.dispatchEventInternal_(this.actualEventTarget_,b,c)};a.disposeInternal=function(){k.events.EventTarget.superClass_.disposeInternal.call(this);this.eventTargetListeners_&&this.eventTargetListeners_.removeAll(void 0);this.parentEventTarget_=null};
a.listen=function(b,c,d,e){w(this);return this.eventTargetListeners_.add(String(b),c,!1,d,e)};a.listenOnce=function(b,c,d,e){return this.eventTargetListeners_.add(String(b),c,!0,d,e)};a.unlisten=function(b,c,d,e){return this.eventTargetListeners_.remove(String(b),c,d,e)};a.unlistenByKey=function(b){return v(this.eventTargetListeners_,b)};
a.fireListeners=function(b,c,d){b=this.eventTargetListeners_.listeners[String(b)];if(!b)return!0;b=b.concat();for(var e=!0,f=0;f<b.length;++f){var g=b[f];if(g&&!g.removed&&g.capture==c){var h=g.listener,l=g.handler||g.src;g.callOnce&&this.unlistenByKey(g);e=!1!==h.call(l,d)&&e}}return e&&0!=d.returnValue_};a.getListeners=function(b,c){return this.eventTargetListeners_.getListeners(String(b),c)};a.getListener=function(b,c,d,e){return this.eventTargetListeners_.getListener(String(b),c,d,e)};
a.hasListener=function(b,c){return this.eventTargetListeners_.hasListener(k.isDef(b)?String(b):void 0,c)};var w=function(b){k.asserts.assert(b.eventTargetListeners_,"Event target is not initialized. Did you call the superclass (goog.events.EventTarget) constructor?")};
k.events.EventTarget.dispatchEventInternal_=function(b,c,d){var e=c.type||c;if(k.isString(c))c=new k.events.Event(c,b);else if(c instanceof k.events.Event)c.target=c.target||b;else{var f=c;c=new k.events.Event(e,b);k.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=b,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};k.functions={};k.functions.constant=function(b){return function(){return b}};k.functions.FALSE=k.functions.constant(!1);k.functions.TRUE=k.functions.constant(!0);k.functions.NULL=k.functions.constant(null);k.functions.identity=function(b){return b};k.functions.error=function(b){return function(){throw Error(b);}};k.functions.fail=function(b){return function(){throw b;}};k.functions.lock=function(b,c){c=c||0;return function(){return b.apply(this,Array.prototype.slice.call(arguments,0,c))}};
k.functions.nth=function(b){return function(){return arguments[b]}};k.functions.partialRight=function(b,c){var d=Array.prototype.slice.call(arguments,1);return function(){var c=Array.prototype.slice.call(arguments);c.push.apply(c,d);return b.apply(this,c)}};k.functions.withReturnValue=function(b,c){return k.functions.sequence(b,k.functions.constant(c))};k.functions.equalTo=function(b,c){return function(d){return c?b==d:b===d}};
k.functions.compose=function(b,c){var d=arguments,e=d.length;return function(){var b;e&&(b=d[e-1].apply(this,arguments));for(var c=e-2;0<=c;c--)b=d[c].call(this,b);return b}};k.functions.sequence=function(b){var c=arguments,d=c.length;return function(){for(var b,f=0;f<d;f++)b=c[f].apply(this,arguments);return b}};k.functions.and=function(b){var c=arguments,d=c.length;return function(){for(var b=0;b<d;b++)if(!c[b].apply(this,arguments))return!1;return!0}};
k.functions.or=function(b){var c=arguments,d=c.length;return function(){for(var b=0;b<d;b++)if(c[b].apply(this,arguments))return!0;return!1}};k.functions.not=function(b){return function(){return!b.apply(this,arguments)}};k.functions.create=function(b,c){var d=function(){};d.prototype=b.prototype;d=new d;b.apply(d,Array.prototype.slice.call(arguments,1));return d};k.functions.CACHE_RETURN_VALUE=!0;
k.functions.cacheReturnValue=function(b){var c=!1,d;return function(){if(!k.functions.CACHE_RETURN_VALUE)return b();c||(d=b(),c=!0);return d}};k.functions.once=function(b){var c=b;return function(){if(c){var b=c;c=null;b()}}};k.functions.debounce=function(b,c,d){var e=0;return function(f){k.global.clearTimeout(e);var g=arguments;e=k.global.setTimeout(function(){b.apply(d,g)},c)}};
k.functions.throttle=function(b,c,d){var e=0,f=!1,g=[],h=function(){e=0;f&&(f=!1,l())},l=function(){e=k.global.setTimeout(h,c);b.apply(d,g)};return function(b){g=arguments;e?f=!0:l()}};k.functions.rateLimit=function(b,c,d){var e=0,f=function(){e=0};return function(g){e||(e=k.global.setTimeout(f,c),b.apply(d,arguments))}};k.math={};k.math.randomInt=function(){return Math.floor(Math.random()*k.craw.AppWindow.NETWORK_TEST_URLS_.length)};k.math.uniformRandom=function(b,c){return b+Math.random()*(c-b)};k.math.clamp=function(b,c,d){return Math.min(Math.max(b,c),d)};k.math.modulo=function(b,c){b%=c;return 0>b*c?b+c:b};k.math.lerp=function(b,c,d){return b+d*(c-b)};k.math.nearlyEquals=function(b,c,d){return Math.abs(b-c)<=(d||1E-6)};k.math.standardAngle=function(b){return k.math.modulo(b,360)};
k.math.standardAngleInRadians=function(b){return k.math.modulo(b,2*Math.PI)};k.math.toRadians=function(b){return b*Math.PI/180};k.math.toDegrees=function(b){return 180*b/Math.PI};k.math.angleDx=function(b,c){return c*Math.cos(k.math.toRadians(b))};k.math.angleDy=function(b,c){return c*Math.sin(k.math.toRadians(b))};k.math.angle=function(b,c,d,e){return k.math.standardAngle(k.math.toDegrees(Math.atan2(e-c,d-b)))};
k.math.angleDifference=function(b,c){b=k.math.standardAngle(c)-k.math.standardAngle(b);180<b?b-=360:-180>=b&&(b=360+b);return b};k.math.sign=function(b){return 0<b?1:0>b?-1:b};
k.math.longestCommonSubsequence=function(b,c,d,e){d=d||function(b,c){return b==c};e=e||function(c){return b[c]};for(var f=b.length,g=c.length,h=[],l=0;l<f+1;l++)h[l]=[],h[l][0]=0;for(var m=0;m<g+1;m++)h[0][m]=0;for(l=1;l<=f;l++)for(m=1;m<=g;m++)d(b[l-1],c[m-1])?h[l][m]=h[l-1][m-1]+1:h[l][m]=Math.max(h[l-1][m],h[l][m-1]);for(var p=[],l=f,m=g;0<l&&0<m;)d(b[l-1],c[m-1])?(p.unshift(e(l-1,m-1)),l--,m--):h[l-1][m]>h[l][m-1]?l--:m--;return p};
k.math.sum=function(b){return k.array.reduce(arguments,function(b,d){return b+d},0)};k.math.average=function(b){return k.math.sum.apply(null,arguments)/arguments.length};k.math.sampleVariance=function(b){var c=arguments.length;if(2>c)return 0;var d=k.math.average.apply(null,arguments);return k.math.sum.apply(null,k.array.map(arguments,function(b){return Math.pow(b-d,2)}))/(c-1)};k.math.standardDeviation=function(b){return Math.sqrt(k.math.sampleVariance.apply(null,arguments))};
k.math.isInt=function(b){return isFinite(b)&&0==b%1};k.math.isFiniteNumber=function(b){return isFinite(b)&&!isNaN(b)};k.math.isNegativeZero=function(b){return 0==b&&0>1/b};k.math.log10Floor=function(b){if(0<b){var c=Math.round(Math.log(b)*Math.LOG10E);return c-(parseFloat("1e"+c)>b?1:0)}return 0==b?-Infinity:NaN};k.math.safeFloor=function(b,c){k.asserts.assert(!k.isDef(c)||0<c);return Math.floor(b+(c||2E-15))};
k.math.safeCeil=function(b,c){k.asserts.assert(!k.isDef(c)||0<c);return Math.ceil(b-(c||2E-15))};k.iter={};k.iter.StopIteration="StopIteration"in k.global?k.global.StopIteration:{message:"StopIteration",stack:""};k.iter.Iterator=function(){};k.iter.Iterator.prototype.next=function(){throw k.iter.StopIteration;};k.iter.Iterator.prototype.__iterator__=function(){return this};
k.iter.toIterator=function(b){if(b instanceof k.iter.Iterator)return b;if("function"==typeof b.__iterator__)return b.__iterator__(!1);if(k.isArrayLike(b)){var c=0,d=new k.iter.Iterator;d.next=function(){for(;;){if(c>=b.length)throw k.iter.StopIteration;if(c in b)return b[c++];c++}};return d}throw Error("Not implemented");};
k.iter.forEach=function(b,c,d){if(k.isArrayLike(b))try{k.array.forEach(b,c,d)}catch(e){if(e!==k.iter.StopIteration)throw e;}else{b=k.iter.toIterator(b);try{for(;;)c.call(d,b.next(),void 0,b)}catch(e){if(e!==k.iter.StopIteration)throw e;}}};k.iter.filter=function(b,c,d){var e=k.iter.toIterator(b);b=new k.iter.Iterator;b.next=function(){for(;;){var b=e.next();if(c.call(d,b,void 0,e))return b}};return b};k.iter.filterFalse=function(b,c,d){return k.iter.filter(b,k.functions.not(c),d)};
k.iter.range=function(b,c,d){var e=0,f=b,g=d||1;1<arguments.length&&(e=b,f=c);if(0==g)throw Error("Range step argument must not be zero");var h=new k.iter.Iterator;h.next=function(){if(0<g&&e>=f||0>g&&e<=f)throw k.iter.StopIteration;var b=e;e+=g;return b};return h};k.iter.join=function(b,c){return k.iter.toArray(b).join(c)};k.iter.map=function(b,c,d){var e=k.iter.toIterator(b);b=new k.iter.Iterator;b.next=function(){var b=e.next();return c.call(d,b,void 0,e)};return b};
k.iter.reduce=function(b,c,d,e){var f=d;k.iter.forEach(b,function(b){f=c.call(e,f,b)});return f};k.iter.some=function(b,c,d){b=k.iter.toIterator(b);try{for(;;)if(c.call(d,b.next(),void 0,b))return!0}catch(e){if(e!==k.iter.StopIteration)throw e;}return!1};k.iter.every=function(b,c,d){b=k.iter.toIterator(b);try{for(;;)if(!c.call(d,b.next(),void 0,b))return!1}catch(e){if(e!==k.iter.StopIteration)throw e;}return!0};k.iter.chain=function(b){return k.iter.chainFromIterable(arguments)};
k.iter.chainFromIterable=function(b){var c=k.iter.toIterator(b);b=new k.iter.Iterator;var d=null;b.next=function(){for(;;){if(null==d){var b=c.next();d=k.iter.toIterator(b)}try{return d.next()}catch(f){if(f!==k.iter.StopIteration)throw f;d=null}}};return b};k.iter.dropWhile=function(b,c,d){var e=k.iter.toIterator(b);b=new k.iter.Iterator;var f=!0;b.next=function(){for(;;){var b=e.next();if(!f||!c.call(d,b,void 0,e))return f=!1,b}};return b};
k.iter.takeWhile=function(b,c,d){var e=k.iter.toIterator(b);b=new k.iter.Iterator;b.next=function(){var b=e.next();if(c.call(d,b,void 0,e))return b;throw k.iter.StopIteration;};return b};k.iter.toArray=function(b){if(k.isArrayLike(b))return k.array.toArray(b);b=k.iter.toIterator(b);var c=[];k.iter.forEach(b,function(b){c.push(b)});return c};k.iter.equals=function(b,c,d){b=k.iter.zipLongest({},b,c);var e=d||k.array.defaultCompareEquality;return k.iter.every(b,function(b){return e(b[0],b[1])})};
k.iter.nextOrValue=function(b){try{k.iter.toIterator(b).next()}catch(c){if(c!=k.iter.StopIteration)throw c;}};
k.iter.product=function(b){if(k.array.some(arguments,function(b){return!b.length})||!arguments.length)return new k.iter.Iterator;var c=new k.iter.Iterator,d=arguments,e=k.array.repeat(0,d.length);c.next=function(){if(e){for(var b=k.array.map(e,function(b,c){return d[c][b]}),c=e.length-1;0<=c;c--){k.asserts.assert(e);if(e[c]<d[c].length-1){e[c]++;break}if(0==c){e=null;break}e[c]=0}return b}throw k.iter.StopIteration;};return c};
k.iter.cycle=function(b){var c=k.iter.toIterator(b),d=[],e=0;b=new k.iter.Iterator;var f=!1;b.next=function(){var b=null;if(!f)try{return b=c.next(),d.push(b),b}catch(h){if(h!=k.iter.StopIteration||k.array.isEmpty(d))throw h;f=!0}b=d[e];e=(e+1)%d.length;return b};return b};k.iter.count=function(b,c){var d=b||0,e=k.isDef(c)?c:1;b=new k.iter.Iterator;b.next=function(){var b=d;d+=e;return b};return b};k.iter.repeat=function(b){var c=new k.iter.Iterator;c.next=k.functions.constant(b);return c};
k.iter.accumulate=function(b){var c=k.iter.toIterator(b),d=0;b=new k.iter.Iterator;b.next=function(){return d+=c.next()};return b};k.iter.zip=function(b){var c=arguments,d=new k.iter.Iterator;if(0<c.length){var e=k.array.map(c,k.iter.toIterator);d.next=function(){return k.array.map(e,function(b){return b.next()})}}return d};
k.iter.zipLongest=function(b,c){var d=k.array.slice(arguments,1),e=new k.iter.Iterator;if(0<d.length){var f=k.array.map(d,k.iter.toIterator);e.next=function(){var c=!1,d=k.array.map(f,function(d){var e;try{e=d.next(),c=!0}catch(p){if(p!==k.iter.StopIteration)throw p;e=b}return e});if(!c)throw k.iter.StopIteration;return d}}return e};k.iter.compress=function(b,c){var d=k.iter.toIterator(c);return k.iter.filter(b,function(){return!!d.next()})};
k.iter.GroupByIterator_=function(b,c){this.iterator=k.iter.toIterator(b);this.keyFunc=c||k.functions.identity};k.inherits(k.iter.GroupByIterator_,k.iter.Iterator);
k.iter.GroupByIterator_.prototype.next=function(){for(;this.currentKey==this.targetKey;)this.currentValue=this.iterator.next(),this.currentKey=this.keyFunc(this.currentValue);for(var b=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!==k.iter.StopIteration)throw e;break}this.currentKey=this.keyFunc(this.currentValue)}return[b,d]};
k.iter.groupBy=function(b,c){return new k.iter.GroupByIterator_(b,c)};k.iter.starMap=function(b,c,d){var e=k.iter.toIterator(b);b=new k.iter.Iterator;b.next=function(){var b=k.iter.toArray(e.next());return c.apply(d,k.array.concat(b,void 0,e))};return b};
k.iter.tee=function(b,c){var d=k.iter.toIterator(b),e=k.array.map(k.array.range(k.isNumber(c)?c:2),function(){return[]}),f=function(){var b=d.next();k.array.forEach(e,function(c){c.push(b)})};return k.array.map(e,function(b){var c=new k.iter.Iterator;c.next=function(){k.array.isEmpty(b)&&f();k.asserts.assert(!k.array.isEmpty(b));return b.shift()};return c})};k.iter.enumerate=function(b,c){return k.iter.zip(k.iter.count(c),b)};
k.iter.limit=function(b,c){k.asserts.assert(k.math.isInt(c)&&0<=c);var d=k.iter.toIterator(b);b=new k.iter.Iterator;var e=c;b.next=function(){if(0<e--)return d.next();throw k.iter.StopIteration;};return b};k.iter.consume=function(b,c){k.asserts.assert(k.math.isInt(c)&&0<=c);for(b=k.iter.toIterator(b);0<c--;)k.iter.nextOrValue(b);return b};
k.iter.slice=function(b,c,d){k.asserts.assert(k.math.isInt(c)&&0<=c);b=k.iter.consume(b,c);k.isNumber(d)&&(k.asserts.assert(k.math.isInt(d)&&d>=c),b=k.iter.limit(b,d-c));return b};k.iter.hasDuplicates_=function(b){var c=[];k.array.removeDuplicates(b,c);return b.length!=c.length};k.iter.permutations=function(b,c){b=k.iter.toArray(b);c=k.array.repeat(b,k.isNumber(c)?c:b.length);c=k.iter.product.apply(void 0,c);return k.iter.filter(c,function(b){return!k.iter.hasDuplicates_(b)})};
k.iter.combinations=function(b,c){function d(b){return e[b]}var e=k.iter.toArray(b);b=k.iter.range(e.length);c=k.iter.permutations(b,c);var f=k.iter.filter(c,function(b){return k.array.isSorted(b)});c=new k.iter.Iterator;c.next=function(){return k.array.map(f.next(),d)};return c};
k.iter.combinationsWithReplacement=function(b,c){function d(b){return e[b]}var e=k.iter.toArray(b);b=k.array.range(e.length);c=k.array.repeat(b,c);c=k.iter.product.apply(void 0,c);var f=k.iter.filter(c,function(b){return k.array.isSorted(b)});c=new k.iter.Iterator;c.next=function(){return k.array.map(f.next(),d)};return c};k.structs={};k.structs.Map=function(b,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 b&&this.addAll(b)};a=k.structs.Map.prototype;a.getCount=function(){return this.count_};a.getValues=function(){x(this);for(var b=[],c=0;c<this.keys_.length;c++)b.push(this.map_[this.keys_[c]]);return b};a.getKeys=function(){x(this);return this.keys_.concat()};
a.containsKey=function(b){return k.structs.Map.hasKey_(this.map_,b)};a.containsValue=function(b){for(var c=0;c<this.keys_.length;c++){var d=this.keys_[c];if(k.structs.Map.hasKey_(this.map_,d)&&this.map_[d]==b)return!0}return!1};a.equals=function(b,c){if(this===b)return!0;if(this.count_!=b.getCount())return!1;c=c||k.structs.Map.defaultEquals;x(this);for(var d,e=0;d=this.keys_[e];e++)if(!c(this.get(d),b.get(d)))return!1;return!0};k.structs.Map.defaultEquals=function(b,c){return b===c};
k.structs.Map.prototype.isEmpty=function(){return 0==this.count_};k.structs.Map.prototype.clear=function(){this.map_={};this.version_=this.count_=this.keys_.length=0};k.structs.Map.prototype.remove=function(b){return k.structs.Map.hasKey_(this.map_,b)?(delete this.map_[b],this.count_--,this.version_++,this.keys_.length>2*this.count_&&x(this),!0):!1};
var x=function(b){if(b.count_!=b.keys_.length){for(var c=0,d=0;c<b.keys_.length;){var e=b.keys_[c];k.structs.Map.hasKey_(b.map_,e)&&(b.keys_[d++]=e);c++}b.keys_.length=d}if(b.count_!=b.keys_.length){for(var f={},d=c=0;c<b.keys_.length;)e=b.keys_[c],k.structs.Map.hasKey_(f,e)||(b.keys_[d++]=e,f[e]=1),c++;b.keys_.length=d}};a=k.structs.Map.prototype;a.get=function(b,c){return k.structs.Map.hasKey_(this.map_,b)?this.map_[b]:c};
a.set=function(b,c){k.structs.Map.hasKey_(this.map_,b)||(this.count_++,this.keys_.push(b),this.version_++);this.map_[b]=c};a.addAll=function(b){var c;b instanceof k.structs.Map?(c=b.getKeys(),b=b.getValues()):(c=k.object.getKeys(b),b=k.object.getValues(b));for(var d=0;d<c.length;d++)this.set(c[d],b[d])};a.forEach=function(b,c){for(var d=this.getKeys(),e=0;e<d.length;e++){var f=d[e],g=this.get(f);b.call(c,g,f,this)}};a.clone=function(){return new k.structs.Map(this)};
a.transpose=function(){for(var b=new k.structs.Map,c=0;c<this.keys_.length;c++){var d=this.keys_[c];b.set(this.map_[d],d)}return b};a.toObject=function(){x(this);for(var b={},c=0;c<this.keys_.length;c++){var d=this.keys_[c];b[d]=this.map_[d]}return b};
a.__iterator__=function(b){x(this);var c=0,d=this.version_,e=this,f=new k.iter.Iterator;f.next=function(){if(d!=e.version_)throw Error("The map has changed since the iterator was created");if(c>=e.keys_.length)throw k.iter.StopIteration;var f=e.keys_[c++];return b?f:e.map_[f]};return f};k.structs.Map.hasKey_=function(b,c){return Object.prototype.hasOwnProperty.call(b,c)};k.structs.LinkedMap=function(b,c,d){this.maxCount_=b||null;this.cache_=!!c;this.evictionCallback_=d;this.map_=new k.structs.Map;this.head_=new k.structs.LinkedMap.Node_("",void 0);this.head_.next=this.head_.prev=this.head_};var z=function(b,c){(c=b.map_.get(c))&&b.cache_&&(c.remove(),y(b,c));return c};a=k.structs.LinkedMap.prototype;a.get=function(b,c){return(b=z(this,b))?b.value:c};a.set=function(b,c){var d=z(this,b);d?d.value=c:(d=new k.structs.LinkedMap.Node_(b,c),this.map_.set(b,d),y(this,d))};
a.peek=function(){return this.head_.next.value};a.shift=function(){return A(this,this.head_.next)};a.pop=function(){return A(this,this.head_.prev)};a.remove=function(b){return(b=this.map_.get(b))?(this.removeNode(b),!0):!1};a.removeNode=function(b){b.remove();this.map_.remove(b.key)};a.getCount=function(){return this.map_.getCount()};a.isEmpty=function(){return this.map_.isEmpty()};a.getKeys=function(){return this.map(function(b,c){return c})};a.getValues=function(){return this.map(function(b){return b})};
a.contains=function(b){return this.some(function(c){return c==b})};a.containsKey=function(b){return this.map_.containsKey(b)};a.clear=function(){B(this,0)};a.forEach=function(b,c){for(var d=this.head_.next;d!=this.head_;d=d.next)b.call(c,d.value,d.key,this)};a.map=function(b,c){for(var d=[],e=this.head_.next;e!=this.head_;e=e.next)d.push(b.call(c,e.value,e.key,this));return d};a.some=function(b,c){for(var d=this.head_.next;d!=this.head_;d=d.next)if(b.call(c,d.value,d.key,this))return!0;return!1};
a.every=function(b,c){for(var d=this.head_.next;d!=this.head_;d=d.next)if(!b.call(c,d.value,d.key,this))return!1;return!0};
var y=function(b,c){b.cache_?(c.next=b.head_.next,c.prev=b.head_,b.head_.next=c,c.next.prev=c):(c.prev=b.head_.prev,c.next=b.head_,b.head_.prev=c,c.prev.next=c);null!=b.maxCount_&&B(b,b.maxCount_)},B=function(b,c){for(;b.getCount()>c;){var d=b.cache_?b.head_.prev:b.head_.next;b.removeNode(d);b.evictionCallback_&&b.evictionCallback_(d.key,d.value)}},A=function(b,c){b.head_!=c&&b.removeNode(c);return c.value};k.structs.LinkedMap.Node_=function(b,c){this.key=b;this.value=c};
k.structs.LinkedMap.Node_.prototype.remove=function(){this.prev.next=this.next;this.next.prev=this.prev;delete this.prev;delete this.next};var n={LicensesCache:function(b,c){k.events.EventTarget.call(this);this.timeout_=b||36E5;this.cache_=new k.structs.LinkedMap(c||100,!0)}};k.inherits(n.LicensesCache,k.events.EventTarget);n.LicensesCache.Entry=function(b){this.timeStamp_=k.now();this.licenses_=b};n.LicensesCache.prototype.get=function(b){b=this.cache_.get(b);var c;if(c=b)c=this.timeout_,c=k.now()-b.timeStamp_<=c;return c?b.licenses_:null};n.LicensesCache.prototype.remove=function(b){this.cache_.remove(b)};k.structs.getCount=function(b){return b.getCount&&"function"==typeof b.getCount?b.getCount():k.isArrayLike(b)||k.isString(b)?b.length:k.object.getCount(b)};k.structs.getValues=function(b){if(b.getValues&&"function"==typeof b.getValues)return b.getValues();if(k.isString(b))return b.split("");if(k.isArrayLike(b)){for(var c=[],d=b.length,e=0;e<d;e++)c.push(b[e]);return c}return k.object.getValues(b)};
k.structs.getKeys=function(b){if(b.getKeys&&"function"==typeof b.getKeys)return b.getKeys();if(!b.getValues||"function"!=typeof b.getValues){if(k.isArrayLike(b)||k.isString(b)){var c=[];b=b.length;for(var d=0;d<b;d++)c.push(d);return c}return k.object.getKeys(b)}};
k.structs.contains=function(b,c){return b.contains&&"function"==typeof b.contains?b.contains(c):b.containsValue&&"function"==typeof b.containsValue?b.containsValue(c):k.isArrayLike(b)||k.isString(b)?k.array.contains(b,c):k.object.containsValue(b,c)};k.structs.isEmpty=function(b){return b.isEmpty&&"function"==typeof b.isEmpty?b.isEmpty():k.isArrayLike(b)||k.isString(b)?k.array.isEmpty(b):k.object.isEmpty(b)};
k.structs.clear=function(b){b.clear&&"function"==typeof b.clear?b.clear():k.isArrayLike(b)?k.array.clear(b):k.object.clear(b)};k.structs.forEach=function(b,c,d){if(b.forEach&&"function"==typeof b.forEach)b.forEach(c,d);else if(k.isArrayLike(b)||k.isString(b))k.array.forEach(b,c,d);else for(var e=k.structs.getKeys(b),f=k.structs.getValues(b),g=f.length,h=0;h<g;h++)c.call(d,f[h],e&&e[h],b)};
k.structs.filter=function(b,c,d){if("function"==typeof b.filter)return b.filter(c,d);if(k.isArrayLike(b)||k.isString(b))return k.array.filter(b,c,d);var e,f=k.structs.getKeys(b),g=k.structs.getValues(b),h=g.length;if(f){e={};for(var l=0;l<h;l++)c.call(d,g[l],f[l],b)&&(e[f[l]]=g[l])}else for(e=[],l=0;l<h;l++)c.call(d,g[l],void 0,b)&&e.push(g[l]);return e};
k.structs.map=function(b,c,d){if("function"==typeof b.map)return b.map(c,d);if(k.isArrayLike(b)||k.isString(b))return k.array.map(b,c,d);var e,f=k.structs.getKeys(b),g=k.structs.getValues(b),h=g.length;if(f){e={};for(var l=0;l<h;l++)e[f[l]]=c.call(d,g[l],f[l],b)}else for(e=[],l=0;l<h;l++)e[l]=c.call(d,g[l],void 0,b);return e};
k.structs.some=function(b,c,d){if("function"==typeof b.some)return b.some(c,d);if(k.isArrayLike(b)||k.isString(b))return k.array.some(b,c,d);for(var e=k.structs.getKeys(b),f=k.structs.getValues(b),g=f.length,h=0;h<g;h++)if(c.call(d,f[h],e&&e[h],b))return!0;return!1};
k.structs.every=function(b,c,d){if("function"==typeof b.every)return b.every(c,d);if(k.isArrayLike(b)||k.isString(b))return k.array.every(b,c,d);for(var e=k.structs.getKeys(b),f=k.structs.getValues(b),g=f.length,h=0;h<g;h++)if(!c.call(d,f[h],e&&e[h],b))return!1;return!0};k.uri={};k.uri.utils={};k.uri.utils.CharCode_={AMPERSAND:38,EQUAL:61,HASH:35,QUESTION:63};k.uri.utils.buildFromEncodedParts=function(b,c,d,e,f,g,h){var l="";b&&(l+=b+":");d&&(l+="//",c&&(l+=c+"@"),l+=d,e&&(l+=":"+e));f&&(l+=f);g&&(l+="?"+g);h&&(l+="#"+h);return l};k.uri.utils.splitRe_=/^(?:([^:/?#.]+):)?(?:\/\/(?:([^/?#]*)@)?([^/#?]*?)(?::([0-9]+))?(?=[/#?]|$))?([^?#]+)?(?:\?([^#]*))?(?:#([\s\S]*))?$/;k.uri.utils.ComponentIndex={SCHEME:1,USER_INFO:2,DOMAIN:3,PORT:4,PATH:5,QUERY_DATA:6,FRAGMENT:7};
k.uri.utils.split=function(b){return b.match(k.uri.utils.splitRe_)};k.uri.utils.decodeIfPossible_=function(b,c){return b?c?decodeURI(b):decodeURIComponent(b):b};k.uri.utils.getComponentByIndex_=function(b,c){return k.uri.utils.split(c)[b]||null};k.uri.utils.getScheme=function(b){return k.uri.utils.getComponentByIndex_(k.uri.utils.ComponentIndex.SCHEME,b)};
k.uri.utils.getEffectiveScheme=function(b){b=k.uri.utils.getScheme(b);!b&&k.global.self&&k.global.self.location&&(b=k.global.self.location.protocol,b=b.substr(0,b.length-1));return b?b.toLowerCase():""};k.uri.utils.getUserInfoEncoded=function(b){return k.uri.utils.getComponentByIndex_(k.uri.utils.ComponentIndex.USER_INFO,b)};k.uri.utils.getUserInfo=function(b){return k.uri.utils.decodeIfPossible_(k.uri.utils.getUserInfoEncoded(b))};
k.uri.utils.getDomainEncoded=function(b){return k.uri.utils.getComponentByIndex_(k.uri.utils.ComponentIndex.DOMAIN,b)};k.uri.utils.getDomain=function(b){return k.uri.utils.decodeIfPossible_(k.uri.utils.getDomainEncoded(b),!0)};k.uri.utils.getPort=function(b){return Number(k.uri.utils.getComponentByIndex_(k.uri.utils.ComponentIndex.PORT,b))||null};k.uri.utils.getPathEncoded=function(b){return k.uri.utils.getComponentByIndex_(k.uri.utils.ComponentIndex.PATH,b)};
k.uri.utils.getPath=function(b){return k.uri.utils.decodeIfPossible_(k.uri.utils.getPathEncoded(b),!0)};k.uri.utils.getQueryData=function(b){return k.uri.utils.getComponentByIndex_(k.uri.utils.ComponentIndex.QUERY_DATA,b)};k.uri.utils.getFragmentEncoded=function(b){var c=b.indexOf("#");return 0>c?null:b.substr(c+1)};k.uri.utils.setFragmentEncoded=function(b,c){return k.uri.utils.removeFragment(b)+(c?"#"+c:"")};k.uri.utils.getFragment=function(b){return k.uri.utils.decodeIfPossible_(k.uri.utils.getFragmentEncoded(b))};
k.uri.utils.getHost=function(b){b=k.uri.utils.split(b);return k.uri.utils.buildFromEncodedParts(b[k.uri.utils.ComponentIndex.SCHEME],b[k.uri.utils.ComponentIndex.USER_INFO],b[k.uri.utils.ComponentIndex.DOMAIN],b[k.uri.utils.ComponentIndex.PORT])};k.uri.utils.getOrigin=function(b){b=k.uri.utils.split(b);return k.uri.utils.buildFromEncodedParts(b[k.uri.utils.ComponentIndex.SCHEME],null,b[k.uri.utils.ComponentIndex.DOMAIN],b[k.uri.utils.ComponentIndex.PORT])};
k.uri.utils.getPathAndAfter=function(b){b=k.uri.utils.split(b);return k.uri.utils.buildFromEncodedParts(null,null,null,null,b[k.uri.utils.ComponentIndex.PATH],b[k.uri.utils.ComponentIndex.QUERY_DATA],b[k.uri.utils.ComponentIndex.FRAGMENT])};k.uri.utils.removeFragment=function(b){var c=b.indexOf("#");return 0>c?b:b.substr(0,c)};
k.uri.utils.haveSameDomain=function(b,c){b=k.uri.utils.split(b);c=k.uri.utils.split(c);return b[k.uri.utils.ComponentIndex.DOMAIN]==c[k.uri.utils.ComponentIndex.DOMAIN]&&b[k.uri.utils.ComponentIndex.SCHEME]==c[k.uri.utils.ComponentIndex.SCHEME]&&b[k.uri.utils.ComponentIndex.PORT]==c[k.uri.utils.ComponentIndex.PORT]};k.uri.utils.assertNoFragmentsOrQueries_=function(b){k.asserts.assert(0>b.indexOf("#")&&0>b.indexOf("?"),"goog.uri.utils: Fragment or query identifiers are not supported: [%s]",b)};
k.uri.utils.parseQueryData=function(b,c){if(b){b=b.split("&");for(var d=0;d<b.length;d++){var e=b[d].indexOf("="),f,g=null;0<=e?(f=b[d].substring(0,e),g=b[d].substring(e+1)):f=b[d];c(f,g?k.string.urlDecode(g):"")}}};k.uri.utils.appendQueryData_=function(b){if(b[1]){var c=b[0],d=c.indexOf("#");0<=d&&(b.push(c.substr(d)),b[0]=c=c.substr(0,d));d=c.indexOf("?");0>d?b[1]="?":d==c.length-1&&(b[1]=void 0)}return b.join("")};
k.uri.utils.appendKeyValuePairs_=function(b,c,d){k.asserts.assertString(b);if(k.isArray(c)){k.asserts.assertArray(c);for(var e=0;e<c.length;e++)k.uri.utils.appendKeyValuePairs_(b,String(c[e]),d)}else null!=c&&d.push("&",b,""===c?"":"=",k.string.urlEncode(c))};k.uri.utils.buildQueryDataBuffer_=function(b,c,d){k.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)k.uri.utils.appendKeyValuePairs_(c[d],c[d+1],b);return b};
k.uri.utils.buildQueryData=function(b,c){b=k.uri.utils.buildQueryDataBuffer_([],b,c);b[0]="";return b.join("")};k.uri.utils.buildQueryDataBufferFromMap_=function(b,c){for(var d in c)k.uri.utils.appendKeyValuePairs_(d,c[d],b);return b};k.uri.utils.buildQueryDataFromMap=function(b){b=k.uri.utils.buildQueryDataBufferFromMap_([],b);b[0]="";return b.join("")};
k.uri.utils.appendParams=function(b,c){return k.uri.utils.appendQueryData_(2==arguments.length?k.uri.utils.buildQueryDataBuffer_([b],arguments[1],0):k.uri.utils.buildQueryDataBuffer_([b],arguments,1))};k.uri.utils.appendParamsFromMap=function(b,c){return k.uri.utils.appendQueryData_(k.uri.utils.buildQueryDataBufferFromMap_([b],c))};k.uri.utils.appendParam=function(b,c,d){b=[b,"&",c];k.isDefAndNotNull(d)&&b.push("=",k.string.urlEncode(d));return k.uri.utils.appendQueryData_(b)};
k.uri.utils.findParam_=function(b,c,d,e){for(var f=d.length;0<=(c=b.indexOf(d,c))&&c<e;){var g=b.charCodeAt(c-1);if(g==k.uri.utils.CharCode_.AMPERSAND||g==k.uri.utils.CharCode_.QUESTION)if(g=b.charCodeAt(c+f),!g||g==k.uri.utils.CharCode_.EQUAL||g==k.uri.utils.CharCode_.AMPERSAND||g==k.uri.utils.CharCode_.HASH)return c;c+=f+1}return-1};k.uri.utils.hashOrEndRe_=/#|$/;k.uri.utils.hasParam=function(b,c){return 0<=k.uri.utils.findParam_(b,0,c,b.search(k.uri.utils.hashOrEndRe_))};
k.uri.utils.getParamValue=function(b,c){var d=b.search(k.uri.utils.hashOrEndRe_),e=k.uri.utils.findParam_(b,0,c,d);if(0>e)return null;var f=b.indexOf("&",e);if(0>f||f>d)f=d;e+=c.length+1;return k.string.urlDecode(b.substr(e,f-e))};k.uri.utils.getParamValues=function(b,c){for(var d=b.search(k.uri.utils.hashOrEndRe_),e=0,f,g=[];0<=(f=k.uri.utils.findParam_(b,e,c,d));){e=b.indexOf("&",f);if(0>e||e>d)e=d;f+=c.length+1;g.push(k.string.urlDecode(b.substr(f,e-f)))}return g};
k.uri.utils.trailingQueryPunctuationRe_=/[?&]($|#)/;k.uri.utils.removeParam=function(b,c){for(var d=b.search(k.uri.utils.hashOrEndRe_),e=0,f,g=[];0<=(f=k.uri.utils.findParam_(b,e,c,d));)g.push(b.substring(e,f)),e=Math.min(b.indexOf("&",f)+1||d,d);g.push(b.substr(e));return g.join("").replace(k.uri.utils.trailingQueryPunctuationRe_,"$1")};
k.uri.utils.setParam=function(b){var c=k.uri.utils.StandardQueryParam.RANDOM,d=k.string.getRandomString();return k.uri.utils.appendParam(k.uri.utils.removeParam(b,c),c,d)};k.uri.utils.appendPath=function(b,c){k.uri.utils.assertNoFragmentsOrQueries_(b);k.string.endsWith(b,"/")&&(b=b.substr(0,b.length-1));k.string.startsWith(c,"/")&&(c=c.substr(1));return k.string.buildString(b,"/",c)};
k.uri.utils.setPath=function(b,c){k.string.startsWith(c,"/")||(c="/"+c);b=k.uri.utils.split(b);return k.uri.utils.buildFromEncodedParts(b[k.uri.utils.ComponentIndex.SCHEME],b[k.uri.utils.ComponentIndex.USER_INFO],b[k.uri.utils.ComponentIndex.DOMAIN],b[k.uri.utils.ComponentIndex.PORT],c,b[k.uri.utils.ComponentIndex.QUERY_DATA],b[k.uri.utils.ComponentIndex.FRAGMENT])};k.uri.utils.StandardQueryParam={RANDOM:"zx"};k.uri.utils.makeUnique=function(b){return k.uri.utils.setParam(b)};k.Uri=function(b,c){this.domain_=this.userInfo_=this.scheme_="";this.port_=null;this.fragment_=this.path_="";this.ignoreCase_=this.isReadOnly_=!1;var d;b instanceof k.Uri?(this.ignoreCase_=k.isDef(c)?c:b.ignoreCase_,C(this,b.getScheme()),D(this,b.getUserInfo()),E(this,b.getDomain()),F(this,b.getPort()),this.setPath(b.getPath()),G(this,b.getQueryData().clone()),I(this,b.getFragment())):b&&(d=k.uri.utils.split(String(b)))?(this.ignoreCase_=!!c,C(this,d[k.uri.utils.ComponentIndex.SCHEME]||"",!0),D(this,
d[k.uri.utils.ComponentIndex.USER_INFO]||"",!0),E(this,d[k.uri.utils.ComponentIndex.DOMAIN]||"",!0),F(this,d[k.uri.utils.ComponentIndex.PORT]),this.setPath(d[k.uri.utils.ComponentIndex.PATH]||"",!0),G(this,d[k.uri.utils.ComponentIndex.QUERY_DATA]||"",!0),I(this,d[k.uri.utils.ComponentIndex.FRAGMENT]||"",!0)):(this.ignoreCase_=!!c,this.queryData_=new k.Uri.QueryData(null,0,this.ignoreCase_))};k.Uri.preserveParameterTypesCompatibilityFlag=!1;k.Uri.RANDOM_PARAM=k.uri.utils.StandardQueryParam.RANDOM;
k.Uri.prototype.toString=function(){var b=[],c=this.getScheme();c&&b.push(k.Uri.encodeSpecialChars_(c,k.Uri.reDisallowedInSchemeOrUserInfo_,!0),":");var d=this.getDomain();if(d||"file"==c)b.push("//"),(c=this.getUserInfo())&&b.push(k.Uri.encodeSpecialChars_(c,k.Uri.reDisallowedInSchemeOrUserInfo_,!0),"@"),b.push(k.Uri.removeDoubleEncoding_(k.string.urlEncode(d))),d=this.getPort(),null!=d&&b.push(":",String(d));if(d=this.getPath())this.domain_&&"/"!=d.charAt(0)&&b.push("/"),b.push(k.Uri.encodeSpecialChars_(d,
"/"==d.charAt(0)?k.Uri.reDisallowedInAbsolutePath_:k.Uri.reDisallowedInRelativePath_,!0));(d=this.queryData_.toString())&&b.push("?",d);(d=this.getFragment())&&b.push("#",k.Uri.encodeSpecialChars_(d,k.Uri.reDisallowedInFragment_));return b.join("")};
k.Uri.prototype.resolve=function(b){var c=this.clone(),d=!!b.scheme_;d?C(c,b.getScheme()):d=!!b.userInfo_;d?D(c,b.getUserInfo()):d=!!b.domain_;d?E(c,b.getDomain()):d=null!=b.port_;var e=b.getPath();if(d)F(c,b.getPort());else if(d=!!b.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=k.Uri.removeDotSegments(e)}d?c.setPath(e):d=""!==b.queryData_.toString();d?G(c,b.getQueryData().clone()):d=!!b.fragment_;d&&
I(c,b.getFragment());return c};k.Uri.prototype.clone=function(){return new k.Uri(this)};k.Uri.prototype.getScheme=function(){return this.scheme_};var C=function(b,c,d){J(b);b.scheme_=d?k.Uri.decodeOrEmpty_(c,!0):c;b.scheme_&&(b.scheme_=b.scheme_.replace(/:$/,""))};k.Uri.prototype.getUserInfo=function(){return this.userInfo_};var D=function(b,c,d){J(b);b.userInfo_=d?k.Uri.decodeOrEmpty_(c):c};k.Uri.prototype.getDomain=function(){return this.domain_};
var E=function(b,c,d){J(b);b.domain_=d?k.Uri.decodeOrEmpty_(c,!0):c};k.Uri.prototype.getPort=function(){return this.port_};var F=function(b,c){J(b);if(c){c=Number(c);if(isNaN(c)||0>c)throw Error("Bad port number "+c);b.port_=c}else b.port_=null};k.Uri.prototype.getPath=function(){return this.path_};k.Uri.prototype.setPath=function(b,c){J(this);this.path_=c?k.Uri.decodeOrEmpty_(b,!0):b;return this};
var G=function(b,c,d){J(b);c instanceof k.Uri.QueryData?(b.queryData_=c,b.queryData_.setIgnoreCase(b.ignoreCase_)):(d||(c=k.Uri.encodeSpecialChars_(c,k.Uri.reDisallowedInQuery_)),b.queryData_=new k.Uri.QueryData(c,0,b.ignoreCase_))};k.Uri.prototype.getQueryData=function(){return this.queryData_};var K=function(b,c,d){J(b);b.queryData_.set(c,d)};k.Uri.prototype.getFragment=function(){return this.fragment_};var I=function(b,c,d){J(b);b.fragment_=d?k.Uri.decodeOrEmpty_(c):c};
k.Uri.prototype.makeUnique=function(){J(this);K(this,k.Uri.RANDOM_PARAM,k.string.getRandomString());return this};var J=function(b){if(b.isReadOnly_)throw Error("Tried to modify a read-only Uri");};k.Uri.prototype.setIgnoreCase=function(b){this.ignoreCase_=b;this.queryData_&&this.queryData_.setIgnoreCase(b);return this};k.Uri.parse=function(b,c){return b instanceof k.Uri?b.clone():new k.Uri(b,c)};
k.Uri.create=function(b,c,d,e,f,g,h,l){l=new k.Uri(null,l);b&&C(l,b);c&&D(l,c);d&&E(l,d);e&&F(l,e);f&&l.setPath(f);g&&G(l,g);h&&I(l,h);return l};k.Uri.resolve=function(b,c){b instanceof k.Uri||(b=k.Uri.parse(b));c instanceof k.Uri||(c=k.Uri.parse(c));return b.resolve(c)};
k.Uri.removeDotSegments=function(b){if(".."==b||"."==b)return"";if(k.string.contains(b,"./")||k.string.contains(b,"/.")){var c=k.string.startsWith(b,"/");b=b.split("/");for(var d=[],e=0;e<b.length;){var f=b[e++];"."==f?c&&e==b.length&&d.push(""):".."==f?((1<d.length||1==d.length&&""!=d[0])&&d.pop(),c&&e==b.length&&d.push("")):(d.push(f),c=!0)}return d.join("/")}return b};k.Uri.decodeOrEmpty_=function(b,c){return b?c?decodeURI(b.replace(/%25/g,"%2525")):decodeURIComponent(b):""};
k.Uri.encodeSpecialChars_=function(b,c,d){return k.isString(b)?(b=encodeURI(b).replace(c,k.Uri.encodeChar_),d&&(b=k.Uri.removeDoubleEncoding_(b)),b):null};k.Uri.encodeChar_=function(b){b=b.charCodeAt(0);return"%"+(b>>4&15).toString(16)+(b&15).toString(16)};k.Uri.removeDoubleEncoding_=function(b){return b.replace(/%25([0-9a-fA-F]{2})/g,"%$1")};k.Uri.reDisallowedInSchemeOrUserInfo_=/[#\/\?@]/g;k.Uri.reDisallowedInRelativePath_=/[\#\?:]/g;k.Uri.reDisallowedInAbsolutePath_=/[\#\?]/g;
k.Uri.reDisallowedInQuery_=/[\#\?@]/g;k.Uri.reDisallowedInFragment_=/#/g;k.Uri.haveSameDomain=function(b,c){b=k.uri.utils.split(b);c=k.uri.utils.split(c);return b[k.uri.utils.ComponentIndex.DOMAIN]==c[k.uri.utils.ComponentIndex.DOMAIN]&&b[k.uri.utils.ComponentIndex.PORT]==c[k.uri.utils.ComponentIndex.PORT]};k.Uri.QueryData=function(b,c,d){this.count_=this.keyMap_=null;this.encodedQuery_=b||null;this.ignoreCase_=!!d};
var L=function(b){b.keyMap_||(b.keyMap_=new k.structs.Map,b.count_=0,b.encodedQuery_&&k.uri.utils.parseQueryData(b.encodedQuery_,function(c,d){b.add(k.string.urlDecode(c),d)}))};k.Uri.QueryData.createFromMap=function(b,c,d){c=k.structs.getKeys(b);if("undefined"==typeof c)throw Error("Keys are undefined");d=new k.Uri.QueryData(null,0,d);b=k.structs.getValues(b);for(var e=0;e<c.length;e++){var f=c[e],g=b[e];k.isArray(g)?M(d,f,g):d.add(f,g)}return d};
k.Uri.QueryData.createFromKeysValues=function(b,c,d,e){if(b.length!=c.length)throw Error("Mismatched lengths for keys/values");d=new k.Uri.QueryData(null,0,e);for(e=0;e<b.length;e++)d.add(b[e],c[e]);return d};a=k.Uri.QueryData.prototype;a.getCount=function(){L(this);return this.count_};a.add=function(b,c){L(this);this.encodedQuery_=null;b=N(this,b);var d=this.keyMap_.get(b);d||this.keyMap_.set(b,d=[]);d.push(c);this.count_=k.asserts.assertNumber(this.count_)+1;return this};
a.remove=function(b){L(this);b=N(this,b);return this.keyMap_.containsKey(b)?(this.encodedQuery_=null,this.count_=k.asserts.assertNumber(this.count_)-this.keyMap_.get(b).length,this.keyMap_.remove(b)):!1};a.clear=function(){this.keyMap_=this.encodedQuery_=null;this.count_=0};a.isEmpty=function(){L(this);return 0==this.count_};a.containsKey=function(b){L(this);b=N(this,b);return this.keyMap_.containsKey(b)};a.containsValue=function(b){var c=this.getValues();return k.array.contains(c,b)};
a.getKeys=function(){L(this);for(var b=this.keyMap_.getValues(),c=this.keyMap_.getKeys(),d=[],e=0;e<c.length;e++)for(var f=b[e],g=0;g<f.length;g++)d.push(c[e]);return d};a.getValues=function(b){L(this);var c=[];if(k.isString(b))this.containsKey(b)&&(c=k.array.concat(c,this.keyMap_.get(N(this,b))));else{b=this.keyMap_.getValues();for(var d=0;d<b.length;d++)c=k.array.concat(c,b[d])}return c};
a.set=function(b,c){L(this);this.encodedQuery_=null;b=N(this,b);this.containsKey(b)&&(this.count_=k.asserts.assertNumber(this.count_)-this.keyMap_.get(b).length);this.keyMap_.set(b,[c]);this.count_=k.asserts.assertNumber(this.count_)+1;return this};a.get=function(b,c){b=b?this.getValues(b):[];return k.Uri.preserveParameterTypesCompatibilityFlag?0<b.length?b[0]:c:0<b.length?String(b[0]):c};
var M=function(b,c,d){b.remove(c);0<d.length&&(b.encodedQuery_=null,b.keyMap_.set(N(b,c),k.array.clone(d)),b.count_=k.asserts.assertNumber(b.count_)+d.length)};
k.Uri.QueryData.prototype.toString=function(){if(this.encodedQuery_)return this.encodedQuery_;if(!this.keyMap_)return"";for(var b=[],c=this.keyMap_.getKeys(),d=0;d<c.length;d++)for(var e=c[d],f=k.string.urlEncode(e),e=this.getValues(e),g=0;g<e.length;g++){var h=f;""!==e[g]&&(h+="="+k.string.urlEncode(e[g]));b.push(h)}return this.encodedQuery_=b.join("&")};
k.Uri.QueryData.prototype.clone=function(){var b=new k.Uri.QueryData;b.encodedQuery_=this.encodedQuery_;this.keyMap_&&(b.keyMap_=this.keyMap_.clone(),b.count_=this.count_);return b};var N=function(b,c){c=String(c);b.ignoreCase_&&(c=c.toLowerCase());return c};k.Uri.QueryData.prototype.setIgnoreCase=function(b){b&&!this.ignoreCase_&&(L(this),this.encodedQuery_=null,this.keyMap_.forEach(function(b,d){var c=d.toLowerCase();d!=c&&(this.remove(d),M(this,c,b))},this));this.ignoreCase_=b};
k.Uri.QueryData.prototype.extend=function(b){for(var c=0;c<arguments.length;c++)k.structs.forEach(arguments[c],function(b,c){this.add(c,b)},this)};n.Errors={};n.Errors.ErrorTypes={MINT_JWT_ERROR:"MINT_JWT_ERROR",PURCHASE_CANCELED:"PURCHASE_CANCELED",CONSUME_PURCHASE_ERROR:"CONSUME_PURCHASE_ERROR",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(b){return{request:{},response:{errorType:b}}};n.WebStoreService=function(b){this.baseUrl_=b||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 O=function(b,c,d,e,f,g,h,l,m,p){var la=d?d:"",ma=l||"application/x-www-form-urlencoded",W=function(b,c){if(c&&200==b){b=null;try{b=JSON.parse(c)}catch(ra){g(n.Errors.ErrorTypes.INVALID_RESPONSE_ERROR);return}f(b)}else g(n.Errors.ErrorTypes.INVALID_RESPONSE_ERROR)},Y=function(H){if(H){var q=new XMLHttpRequest;q.open(e,c);q.setRequestHeader("Authorization","Bearer "+H);q.setRequestHeader("Content-Type",ma);q.onreadystatechange=function(){4==q.readyState&&(401==q.status&&H?chrome.identity.removeCachedAuthToken({token:H},
function(){h?O(b,e,d,e,f,g,!1,l,m,p):(console.log(q),W(q.status,q.responseText))}):(console.log(q),W(q.status,q.responseText)))};q.send(la)}else g(n.Errors.ErrorTypes.TOKEN_MISSING_ERROR)};p?Y(p):chrome.identity.getAuthToken({interactive:m||!1},Y)};n.WebStoreService.prototype.onFailure_=function(b,c,d){b(n.Errors.getErrorResponse(d||c))};
var aa=function(b,c,d,e,f,g,h,l){c={hl:window.navigator.language,itemId:c,sku:d,paymentVersion:1};h&&(c.gl=h);h=new k.Uri.QueryData;l&&h.add("projection",l);l=new k.Uri(b.baseUrlAndPath_+"/payments/buy");G(l,h);f=k.bind(b.onFailure_,b,f,n.Errors.ErrorTypes.MINT_JWT_ERROR);O(b,l.toString(),JSON.stringify(c),"POST",function(b){e(b.jwt,b.paymentData,b.signature)},f,!0,"application/json",void 0,g)};k.dom.TagName=function(b){this.tagName_=b};k.dom.TagName.prototype.toString=function(){return this.tagName_};k.dom.TagName.A=new k.dom.TagName("A");k.dom.TagName.ABBR=new k.dom.TagName("ABBR");k.dom.TagName.ACRONYM=new k.dom.TagName("ACRONYM");k.dom.TagName.ADDRESS=new k.dom.TagName("ADDRESS");k.dom.TagName.APPLET=new k.dom.TagName("APPLET");k.dom.TagName.AREA=new k.dom.TagName("AREA");k.dom.TagName.ARTICLE=new k.dom.TagName("ARTICLE");k.dom.TagName.ASIDE=new k.dom.TagName("ASIDE");
k.dom.TagName.AUDIO=new k.dom.TagName("AUDIO");k.dom.TagName.B=new k.dom.TagName("B");k.dom.TagName.BASE=new k.dom.TagName("BASE");k.dom.TagName.BASEFONT=new k.dom.TagName("BASEFONT");k.dom.TagName.BDI=new k.dom.TagName("BDI");k.dom.TagName.BDO=new k.dom.TagName("BDO");k.dom.TagName.BIG=new k.dom.TagName("BIG");k.dom.TagName.BLOCKQUOTE=new k.dom.TagName("BLOCKQUOTE");k.dom.TagName.BODY=new k.dom.TagName("BODY");k.dom.TagName.BR=new k.dom.TagName("BR");k.dom.TagName.BUTTON=new k.dom.TagName("BUTTON");
k.dom.TagName.CANVAS=new k.dom.TagName("CANVAS");k.dom.TagName.CAPTION=new k.dom.TagName("CAPTION");k.dom.TagName.CENTER=new k.dom.TagName("CENTER");k.dom.TagName.CITE=new k.dom.TagName("CITE");k.dom.TagName.CODE=new k.dom.TagName("CODE");k.dom.TagName.COL=new k.dom.TagName("COL");k.dom.TagName.COLGROUP=new k.dom.TagName("COLGROUP");k.dom.TagName.COMMAND=new k.dom.TagName("COMMAND");k.dom.TagName.DATA=new k.dom.TagName("DATA");k.dom.TagName.DATALIST=new k.dom.TagName("DATALIST");
k.dom.TagName.DD=new k.dom.TagName("DD");k.dom.TagName.DEL=new k.dom.TagName("DEL");k.dom.TagName.DETAILS=new k.dom.TagName("DETAILS");k.dom.TagName.DFN=new k.dom.TagName("DFN");k.dom.TagName.DIALOG=new k.dom.TagName("DIALOG");k.dom.TagName.DIR=new k.dom.TagName("DIR");k.dom.TagName.DIV=new k.dom.TagName("DIV");k.dom.TagName.DL=new k.dom.TagName("DL");k.dom.TagName.DT=new k.dom.TagName("DT");k.dom.TagName.EM=new k.dom.TagName("EM");k.dom.TagName.EMBED=new k.dom.TagName("EMBED");
k.dom.TagName.FIELDSET=new k.dom.TagName("FIELDSET");k.dom.TagName.FIGCAPTION=new k.dom.TagName("FIGCAPTION");k.dom.TagName.FIGURE=new k.dom.TagName("FIGURE");k.dom.TagName.FONT=new k.dom.TagName("FONT");k.dom.TagName.FOOTER=new k.dom.TagName("FOOTER");k.dom.TagName.FORM=new k.dom.TagName("FORM");k.dom.TagName.FRAME=new k.dom.TagName("FRAME");k.dom.TagName.FRAMESET=new k.dom.TagName("FRAMESET");k.dom.TagName.H1=new k.dom.TagName("H1");k.dom.TagName.H2=new k.dom.TagName("H2");k.dom.TagName.H3=new k.dom.TagName("H3");
k.dom.TagName.H4=new k.dom.TagName("H4");k.dom.TagName.H5=new k.dom.TagName("H5");k.dom.TagName.H6=new k.dom.TagName("H6");k.dom.TagName.HEAD=new k.dom.TagName("HEAD");k.dom.TagName.HEADER=new k.dom.TagName("HEADER");k.dom.TagName.HGROUP=new k.dom.TagName("HGROUP");k.dom.TagName.HR=new k.dom.TagName("HR");k.dom.TagName.HTML=new k.dom.TagName("HTML");k.dom.TagName.I=new k.dom.TagName("I");k.dom.TagName.IFRAME=new k.dom.TagName("IFRAME");k.dom.TagName.IMG=new k.dom.TagName("IMG");
k.dom.TagName.INPUT=new k.dom.TagName("INPUT");k.dom.TagName.INS=new k.dom.TagName("INS");k.dom.TagName.ISINDEX=new k.dom.TagName("ISINDEX");k.dom.TagName.KBD=new k.dom.TagName("KBD");k.dom.TagName.KEYGEN=new k.dom.TagName("KEYGEN");k.dom.TagName.LABEL=new k.dom.TagName("LABEL");k.dom.TagName.LEGEND=new k.dom.TagName("LEGEND");k.dom.TagName.LI=new k.dom.TagName("LI");k.dom.TagName.LINK=new k.dom.TagName("LINK");k.dom.TagName.MAP=new k.dom.TagName("MAP");k.dom.TagName.MARK=new k.dom.TagName("MARK");
k.dom.TagName.MATH=new k.dom.TagName("MATH");k.dom.TagName.MENU=new k.dom.TagName("MENU");k.dom.TagName.META=new k.dom.TagName("META");k.dom.TagName.METER=new k.dom.TagName("METER");k.dom.TagName.NAV=new k.dom.TagName("NAV");k.dom.TagName.NOFRAMES=new k.dom.TagName("NOFRAMES");k.dom.TagName.NOSCRIPT=new k.dom.TagName("NOSCRIPT");k.dom.TagName.OBJECT=new k.dom.TagName("OBJECT");k.dom.TagName.OL=new k.dom.TagName("OL");k.dom.TagName.OPTGROUP=new k.dom.TagName("OPTGROUP");k.dom.TagName.OPTION=new k.dom.TagName("OPTION");
k.dom.TagName.OUTPUT=new k.dom.TagName("OUTPUT");k.dom.TagName.P=new k.dom.TagName("P");k.dom.TagName.PARAM=new k.dom.TagName("PARAM");k.dom.TagName.PRE=new k.dom.TagName("PRE");k.dom.TagName.PROGRESS=new k.dom.TagName("PROGRESS");k.dom.TagName.Q=new k.dom.TagName("Q");k.dom.TagName.RP=new k.dom.TagName("RP");k.dom.TagName.RT=new k.dom.TagName("RT");k.dom.TagName.RUBY=new k.dom.TagName("RUBY");k.dom.TagName.S=new k.dom.TagName("S");k.dom.TagName.SAMP=new k.dom.TagName("SAMP");
k.dom.TagName.SCRIPT=new k.dom.TagName("SCRIPT");k.dom.TagName.SECTION=new k.dom.TagName("SECTION");k.dom.TagName.SELECT=new k.dom.TagName("SELECT");k.dom.TagName.SMALL=new k.dom.TagName("SMALL");k.dom.TagName.SOURCE=new k.dom.TagName("SOURCE");k.dom.TagName.SPAN=new k.dom.TagName("SPAN");k.dom.TagName.STRIKE=new k.dom.TagName("STRIKE");k.dom.TagName.STRONG=new k.dom.TagName("STRONG");k.dom.TagName.STYLE=new k.dom.TagName("STYLE");k.dom.TagName.SUB=new k.dom.TagName("SUB");k.dom.TagName.SUMMARY=new k.dom.TagName("SUMMARY");
k.dom.TagName.SUP=new k.dom.TagName("SUP");k.dom.TagName.SVG=new k.dom.TagName("SVG");k.dom.TagName.TABLE=new k.dom.TagName("TABLE");k.dom.TagName.TBODY=new k.dom.TagName("TBODY");k.dom.TagName.TD=new k.dom.TagName("TD");k.dom.TagName.TEMPLATE=new k.dom.TagName("TEMPLATE");k.dom.TagName.TEXTAREA=new k.dom.TagName("TEXTAREA");k.dom.TagName.TFOOT=new k.dom.TagName("TFOOT");k.dom.TagName.TH=new k.dom.TagName("TH");k.dom.TagName.THEAD=new k.dom.TagName("THEAD");k.dom.TagName.TIME=new k.dom.TagName("TIME");
k.dom.TagName.TITLE=new k.dom.TagName("TITLE");k.dom.TagName.TR=new k.dom.TagName("TR");k.dom.TagName.TRACK=new k.dom.TagName("TRACK");k.dom.TagName.TT=new k.dom.TagName("TT");k.dom.TagName.U=new k.dom.TagName("U");k.dom.TagName.UL=new k.dom.TagName("UL");k.dom.TagName.VAR=new k.dom.TagName("VAR");k.dom.TagName.VIDEO=new k.dom.TagName("VIDEO");k.dom.TagName.WBR=new k.dom.TagName("WBR");k.dom.tags={};k.dom.tags.VOID_TAGS_={area:!0,base:!0,br:!0,col:!0,command:!0,embed:!0,hr:!0,img:!0,input:!0,keygen:!0,link:!0,meta:!0,param:!0,source:!0,track:!0,wbr:!0};k.dom.tags.isVoidTag=function(b){return!0===k.dom.tags.VOID_TAGS_[b]};k.i18n={};k.i18n.bidi={};k.i18n.bidi.FORCE_RTL=!1;
k.i18n.bidi.IS_RTL=k.i18n.bidi.FORCE_RTL||("ar"==k.LOCALE.substring(0,2).toLowerCase()||"fa"==k.LOCALE.substring(0,2).toLowerCase()||"he"==k.LOCALE.substring(0,2).toLowerCase()||"iw"==k.LOCALE.substring(0,2).toLowerCase()||"ps"==k.LOCALE.substring(0,2).toLowerCase()||"sd"==k.LOCALE.substring(0,2).toLowerCase()||"ug"==k.LOCALE.substring(0,2).toLowerCase()||"ur"==k.LOCALE.substring(0,2).toLowerCase()||"yi"==k.LOCALE.substring(0,2).toLowerCase())&&(2==k.LOCALE.length||"-"==k.LOCALE.substring(2,3)||"_"==
k.LOCALE.substring(2,3))||3<=k.LOCALE.length&&"ckb"==k.LOCALE.substring(0,3).toLowerCase()&&(3==k.LOCALE.length||"-"==k.LOCALE.substring(3,4)||"_"==k.LOCALE.substring(3,4));k.i18n.bidi.Format={LRE:"\u202a",RLE:"\u202b",PDF:"\u202c",LRM:"\u200e",RLM:"\u200f"};k.i18n.bidi.Dir={LTR:1,RTL:-1,NEUTRAL:0};k.i18n.bidi.RIGHT="right";k.i18n.bidi.LEFT="left";k.i18n.bidi.I18N_RIGHT=k.i18n.bidi.IS_RTL?k.i18n.bidi.LEFT:k.i18n.bidi.RIGHT;k.i18n.bidi.I18N_LEFT=k.i18n.bidi.IS_RTL?k.i18n.bidi.RIGHT:k.i18n.bidi.LEFT;
k.i18n.bidi.toDir=function(b){return"number"==typeof b?0<b?k.i18n.bidi.Dir.LTR:0>b?k.i18n.bidi.Dir.RTL:k.i18n.bidi.Dir.NEUTRAL:null==b?null:b?k.i18n.bidi.Dir.RTL:k.i18n.bidi.Dir.LTR};k.i18n.bidi.ltrChars_="A-Za-z\u00c0-\u00d6\u00d8-\u00f6\u00f8-\u02b8\u0300-\u0590\u0800-\u1fff\u200e\u2c00-\ufb1c\ufe00-\ufe6f\ufefd-\uffff";k.i18n.bidi.rtlChars_="\u0591-\u06ef\u06fa-\u07ff\u200f\ufb1d-\ufdff\ufe70-\ufefc";k.i18n.bidi.htmlSkipReg_=/<[^>]*>|&[^;]+;/g;
k.i18n.bidi.stripHtmlIfNeeded_=function(b,c){return c?b.replace(k.i18n.bidi.htmlSkipReg_,""):b};k.i18n.bidi.rtlCharReg_=new RegExp("["+k.i18n.bidi.rtlChars_+"]");k.i18n.bidi.ltrCharReg_=new RegExp("["+k.i18n.bidi.ltrChars_+"]");k.i18n.bidi.hasAnyRtl=function(b,c){return k.i18n.bidi.rtlCharReg_.test(k.i18n.bidi.stripHtmlIfNeeded_(b,c))};k.i18n.bidi.hasRtlChar=k.i18n.bidi.hasAnyRtl;k.i18n.bidi.hasAnyLtr=function(b){return k.i18n.bidi.ltrCharReg_.test(k.i18n.bidi.stripHtmlIfNeeded_(b,void 0))};
k.i18n.bidi.ltrRe_=new RegExp("^["+k.i18n.bidi.ltrChars_+"]");k.i18n.bidi.rtlRe_=new RegExp("^["+k.i18n.bidi.rtlChars_+"]");k.i18n.bidi.isRtlChar=function(b){return k.i18n.bidi.rtlRe_.test(b)};k.i18n.bidi.isLtrChar=function(b){return k.i18n.bidi.ltrRe_.test(b)};k.i18n.bidi.isNeutralChar=function(b){return!k.i18n.bidi.isLtrChar(b)&&!k.i18n.bidi.isRtlChar(b)};k.i18n.bidi.ltrDirCheckRe_=new RegExp("^[^"+k.i18n.bidi.rtlChars_+"]*["+k.i18n.bidi.ltrChars_+"]");
k.i18n.bidi.rtlDirCheckRe_=new RegExp("^[^"+k.i18n.bidi.ltrChars_+"]*["+k.i18n.bidi.rtlChars_+"]");k.i18n.bidi.startsWithRtl=function(b,c){return k.i18n.bidi.rtlDirCheckRe_.test(k.i18n.bidi.stripHtmlIfNeeded_(b,c))};k.i18n.bidi.isRtlText=k.i18n.bidi.startsWithRtl;k.i18n.bidi.startsWithLtr=function(b,c){return k.i18n.bidi.ltrDirCheckRe_.test(k.i18n.bidi.stripHtmlIfNeeded_(b,c))};k.i18n.bidi.isLtrText=k.i18n.bidi.startsWithLtr;k.i18n.bidi.isRequiredLtrRe_=/^http:\/\/.*/;
k.i18n.bidi.isNeutralText=function(b,c){b=k.i18n.bidi.stripHtmlIfNeeded_(b,c);return k.i18n.bidi.isRequiredLtrRe_.test(b)||!k.i18n.bidi.hasAnyLtr(b)&&!k.i18n.bidi.hasAnyRtl(b)};k.i18n.bidi.ltrExitDirCheckRe_=new RegExp("["+k.i18n.bidi.ltrChars_+"][^"+k.i18n.bidi.rtlChars_+"]*$");k.i18n.bidi.rtlExitDirCheckRe_=new RegExp("["+k.i18n.bidi.rtlChars_+"][^"+k.i18n.bidi.ltrChars_+"]*$");k.i18n.bidi.endsWithLtr=function(b,c){return k.i18n.bidi.ltrExitDirCheckRe_.test(k.i18n.bidi.stripHtmlIfNeeded_(b,c))};
k.i18n.bidi.isLtrExitText=k.i18n.bidi.endsWithLtr;k.i18n.bidi.endsWithRtl=function(b,c){return k.i18n.bidi.rtlExitDirCheckRe_.test(k.i18n.bidi.stripHtmlIfNeeded_(b,c))};k.i18n.bidi.isRtlExitText=k.i18n.bidi.endsWithRtl;k.i18n.bidi.rtlLocalesRe_=/^(ar|ckb|dv|he|iw|fa|nqo|ps|sd|ug|ur|yi|.*[-_](Arab|Hebr|Thaa|Nkoo|Tfng))(?!.*[-_](Latn|Cyrl)($|-|_))($|-|_)/i;k.i18n.bidi.isRtlLanguage=function(b){return k.i18n.bidi.rtlLocalesRe_.test(b)};k.i18n.bidi.bracketGuardTextRe_=/(\(.*?\)+)|(\[.*?\]+)|(\{.*?\}+)|(<.*?>+)/g;
k.i18n.bidi.guardBracketInText=function(b,c){c=(void 0===c?k.i18n.bidi.hasAnyRtl(b):c)?k.i18n.bidi.Format.RLM:k.i18n.bidi.Format.LRM;return b.replace(k.i18n.bidi.bracketGuardTextRe_,c+"$&"+c)};k.i18n.bidi.enforceRtlInHtml=function(b){return"<"==b.charAt(0)?b.replace(/<\w+/,"$& dir=rtl"):"\n<span dir=rtl>"+b+"</span>"};k.i18n.bidi.enforceRtlInText=function(b){return k.i18n.bidi.Format.RLE+b+k.i18n.bidi.Format.PDF};
k.i18n.bidi.enforceLtrInHtml=function(b){return"<"==b.charAt(0)?b.replace(/<\w+/,"$& dir=ltr"):"\n<span dir=ltr>"+b+"</span>"};k.i18n.bidi.enforceLtrInText=function(b){return k.i18n.bidi.Format.LRE+b+k.i18n.bidi.Format.PDF};k.i18n.bidi.dimensionsRe_=/:\s*([.\d][.\w]*)\s+([.\d][.\w]*)\s+([.\d][.\w]*)\s+([.\d][.\w]*)/g;k.i18n.bidi.leftRe_=/left/gi;k.i18n.bidi.rightRe_=/right/gi;k.i18n.bidi.tempRe_=/%%%%/g;
k.i18n.bidi.mirrorCSS=function(b){return b.replace(k.i18n.bidi.dimensionsRe_,":$1 $4 $3 $2").replace(k.i18n.bidi.leftRe_,"%%%%").replace(k.i18n.bidi.rightRe_,k.i18n.bidi.LEFT).replace(k.i18n.bidi.tempRe_,k.i18n.bidi.RIGHT)};k.i18n.bidi.doubleQuoteSubstituteRe_=/([\u0591-\u05f2])"/g;k.i18n.bidi.singleQuoteSubstituteRe_=/([\u0591-\u05f2])'/g;k.i18n.bidi.normalizeHebrewQuote=function(b){return b.replace(k.i18n.bidi.doubleQuoteSubstituteRe_,"$1\u05f4").replace(k.i18n.bidi.singleQuoteSubstituteRe_,"$1\u05f3")};
k.i18n.bidi.wordSeparatorRe_=/\s+/;k.i18n.bidi.hasNumeralsRe_=/[\d\u06f0-\u06f9]/;k.i18n.bidi.rtlDetectionThreshold_=.4;
k.i18n.bidi.estimateDirection=function(b,c){var d=0,e=0,f=!1;b=k.i18n.bidi.stripHtmlIfNeeded_(b,c).split(k.i18n.bidi.wordSeparatorRe_);for(c=0;c<b.length;c++){var g=b[c];k.i18n.bidi.startsWithRtl(g)?(d++,e++):k.i18n.bidi.isRequiredLtrRe_.test(g)?f=!0:k.i18n.bidi.hasAnyLtr(g)?e++:k.i18n.bidi.hasNumeralsRe_.test(g)&&(f=!0)}return 0==e?f?k.i18n.bidi.Dir.LTR:k.i18n.bidi.Dir.NEUTRAL:d/e>k.i18n.bidi.rtlDetectionThreshold_?k.i18n.bidi.Dir.RTL:k.i18n.bidi.Dir.LTR};
k.i18n.bidi.detectRtlDirectionality=function(b,c){return k.i18n.bidi.estimateDirection(b,c)==k.i18n.bidi.Dir.RTL};k.i18n.bidi.setElementDirAndAlign=function(b,c){b&&(c=k.i18n.bidi.toDir(c))&&(b.style.textAlign=c==k.i18n.bidi.Dir.RTL?k.i18n.bidi.RIGHT:k.i18n.bidi.LEFT,b.dir=c==k.i18n.bidi.Dir.RTL?"rtl":"ltr")};k.i18n.bidi.setElementDirByTextDirectionality=function(b,c){switch(k.i18n.bidi.estimateDirection(c)){case k.i18n.bidi.Dir.LTR:b.dir="ltr";break;case k.i18n.bidi.Dir.RTL:b.dir="rtl";break;default:b.removeAttribute("dir")}};
k.i18n.bidi.DirectionalString=function(){};k.string.TypedString=function(){};k.string.Const=function(){this.stringConstValueWithSecurityContract__googStringSecurityPrivate_="";this.STRING_CONST_TYPE_MARKER__GOOG_STRING_SECURITY_PRIVATE_=k.string.Const.TYPE_MARKER_};k.string.Const.prototype.implementsGoogStringTypedString=!0;k.string.Const.prototype.getTypedStringValue=function(){return this.stringConstValueWithSecurityContract__googStringSecurityPrivate_};
k.string.Const.prototype.toString=function(){return"Const{"+this.stringConstValueWithSecurityContract__googStringSecurityPrivate_+"}"};k.string.Const.unwrap=function(b){if(b instanceof k.string.Const&&b.constructor===k.string.Const&&b.STRING_CONST_TYPE_MARKER__GOOG_STRING_SECURITY_PRIVATE_===k.string.Const.TYPE_MARKER_)return b.stringConstValueWithSecurityContract__googStringSecurityPrivate_;k.asserts.fail("expected object of type Const, got '"+b+"'");return"type_error:Const"};
k.string.Const.from=function(b){return k.string.Const.create__googStringSecurityPrivate_(b)};k.string.Const.TYPE_MARKER_={};k.string.Const.create__googStringSecurityPrivate_=function(b){var c=new k.string.Const;c.stringConstValueWithSecurityContract__googStringSecurityPrivate_=b;return c};k.string.Const.EMPTY=k.string.Const.from("");k.html={};k.html.SafeScript=function(){this.privateDoNotAccessOrElseSafeScriptWrappedValue_="";this.SAFE_SCRIPT_TYPE_MARKER_GOOG_HTML_SECURITY_PRIVATE_=k.html.SafeScript.TYPE_MARKER_GOOG_HTML_SECURITY_PRIVATE_};k.html.SafeScript.prototype.implementsGoogStringTypedString=!0;k.html.SafeScript.TYPE_MARKER_GOOG_HTML_SECURITY_PRIVATE_={};k.html.SafeScript.fromConstant=function(b){b=k.string.Const.unwrap(b);return 0===b.length?k.html.SafeScript.EMPTY:k.html.SafeScript.createSafeScriptSecurityPrivateDoNotAccessOrElse(b)};
k.html.SafeScript.prototype.getTypedStringValue=function(){return this.privateDoNotAccessOrElseSafeScriptWrappedValue_};k.DEBUG&&(k.html.SafeScript.prototype.toString=function(){return"SafeScript{"+this.privateDoNotAccessOrElseSafeScriptWrappedValue_+"}"});
k.html.SafeScript.unwrap=function(b){if(b instanceof k.html.SafeScript&&b.constructor===k.html.SafeScript&&b.SAFE_SCRIPT_TYPE_MARKER_GOOG_HTML_SECURITY_PRIVATE_===k.html.SafeScript.TYPE_MARKER_GOOG_HTML_SECURITY_PRIVATE_)return b.privateDoNotAccessOrElseSafeScriptWrappedValue_;k.asserts.fail("expected object of type SafeScript, got '"+b+"' of type "+k.typeOf(b));return"type_error:SafeScript"};k.html.SafeScript.createSafeScriptSecurityPrivateDoNotAccessOrElse=function(b){return(new k.html.SafeScript).initSecurityPrivateDoNotAccessOrElse_(b)};
k.html.SafeScript.prototype.initSecurityPrivateDoNotAccessOrElse_=function(b){this.privateDoNotAccessOrElseSafeScriptWrappedValue_=b;return this};k.html.SafeScript.EMPTY=k.html.SafeScript.createSafeScriptSecurityPrivateDoNotAccessOrElse("");k.html.SafeStyle=function(){this.privateDoNotAccessOrElseSafeStyleWrappedValue_="";this.SAFE_STYLE_TYPE_MARKER_GOOG_HTML_SECURITY_PRIVATE_=k.html.SafeStyle.TYPE_MARKER_GOOG_HTML_SECURITY_PRIVATE_};k.html.SafeStyle.prototype.implementsGoogStringTypedString=!0;k.html.SafeStyle.TYPE_MARKER_GOOG_HTML_SECURITY_PRIVATE_={};
k.html.SafeStyle.fromConstant=function(b){b=k.string.Const.unwrap(b);if(0===b.length)return k.html.SafeStyle.EMPTY;k.html.SafeStyle.checkStyle_(b);k.asserts.assert(k.string.endsWith(b,";"),"Last character of style string is not ';': "+b);k.asserts.assert(k.string.contains(b,":"),"Style string must contain at least one ':', to specify a \"name: value\" pair: "+b);return k.html.SafeStyle.createSafeStyleSecurityPrivateDoNotAccessOrElse(b)};
k.html.SafeStyle.checkStyle_=function(b){k.asserts.assert(!/[<>]/.test(b),"Forbidden characters in style string: "+b)};k.html.SafeStyle.prototype.getTypedStringValue=function(){return this.privateDoNotAccessOrElseSafeStyleWrappedValue_};k.DEBUG&&(k.html.SafeStyle.prototype.toString=function(){return"SafeStyle{"+this.privateDoNotAccessOrElseSafeStyleWrappedValue_+"}"});
k.html.SafeStyle.unwrap=function(b){if(b instanceof k.html.SafeStyle&&b.constructor===k.html.SafeStyle&&b.SAFE_STYLE_TYPE_MARKER_GOOG_HTML_SECURITY_PRIVATE_===k.html.SafeStyle.TYPE_MARKER_GOOG_HTML_SECURITY_PRIVATE_)return b.privateDoNotAccessOrElseSafeStyleWrappedValue_;k.asserts.fail("expected object of type SafeStyle, got '"+b+"' of type "+k.typeOf(b));return"type_error:SafeStyle"};k.html.SafeStyle.createSafeStyleSecurityPrivateDoNotAccessOrElse=function(b){return(new k.html.SafeStyle).initSecurityPrivateDoNotAccessOrElse_(b)};
k.html.SafeStyle.prototype.initSecurityPrivateDoNotAccessOrElse_=function(b){this.privateDoNotAccessOrElseSafeStyleWrappedValue_=b;return this};k.html.SafeStyle.EMPTY=k.html.SafeStyle.createSafeStyleSecurityPrivateDoNotAccessOrElse("");k.html.SafeStyle.INNOCUOUS_STRING="zClosurez";
k.html.SafeStyle.create=function(b){var c="",d;for(d in b){if(!/^[-_a-zA-Z0-9]+$/.test(d))throw Error("Name allows only [-_a-zA-Z0-9], got: "+d);var e=b[d];null!=e&&(e instanceof k.string.Const?(e=k.string.Const.unwrap(e),k.asserts.assert(!/[{;}]/.test(e),"Value does not allow [{;}].")):k.html.SafeStyle.VALUE_RE_.test(e)?k.html.SafeStyle.hasBalancedQuotes_(e)||(k.asserts.fail("String value requires balanced quotes, got: "+e),e=k.html.SafeStyle.INNOCUOUS_STRING):(k.asserts.fail("String value allows only [-,.\"'%_!# a-zA-Z0-9], rgb() and rgba(), got: "+
e),e=k.html.SafeStyle.INNOCUOUS_STRING),c+=d+":"+e+";")}if(!c)return k.html.SafeStyle.EMPTY;k.html.SafeStyle.checkStyle_(c);return k.html.SafeStyle.createSafeStyleSecurityPrivateDoNotAccessOrElse(c)};k.html.SafeStyle.hasBalancedQuotes_=function(b){for(var c=!0,d=!0,e=0;e<b.length;e++){var f=b.charAt(e);"'"==f&&d?c=!c:'"'==f&&c&&(d=!d)}return c&&d};k.html.SafeStyle.VALUE_RE_=/^([-,."'%_!# a-zA-Z0-9]+|(?:rgb|hsl)a?\([0-9.%, ]+\))$/;
k.html.SafeStyle.concat=function(b){var c="",d=function(b){k.isArray(b)?k.array.forEach(b,d):c+=k.html.SafeStyle.unwrap(b)};k.array.forEach(arguments,d);return c?k.html.SafeStyle.createSafeStyleSecurityPrivateDoNotAccessOrElse(c):k.html.SafeStyle.EMPTY};k.html.SafeStyleSheet=function(){this.privateDoNotAccessOrElseSafeStyleSheetWrappedValue_="";this.SAFE_STYLE_SHEET_TYPE_MARKER_GOOG_HTML_SECURITY_PRIVATE_=k.html.SafeStyleSheet.TYPE_MARKER_GOOG_HTML_SECURITY_PRIVATE_};k.html.SafeStyleSheet.prototype.implementsGoogStringTypedString=!0;k.html.SafeStyleSheet.TYPE_MARKER_GOOG_HTML_SECURITY_PRIVATE_={};
k.html.SafeStyleSheet.concat=function(b){var c="",d=function(b){k.isArray(b)?k.array.forEach(b,d):c+=k.html.SafeStyleSheet.unwrap(b)};k.array.forEach(arguments,d);return k.html.SafeStyleSheet.createSafeStyleSheetSecurityPrivateDoNotAccessOrElse(c)};k.html.SafeStyleSheet.fromConstant=function(b){b=k.string.Const.unwrap(b);if(0===b.length)return k.html.SafeStyleSheet.EMPTY;k.asserts.assert(!k.string.contains(b,"<"),"Forbidden '<' character in style sheet string: "+b);return k.html.SafeStyleSheet.createSafeStyleSheetSecurityPrivateDoNotAccessOrElse(b)};
k.html.SafeStyleSheet.prototype.getTypedStringValue=function(){return this.privateDoNotAccessOrElseSafeStyleSheetWrappedValue_};k.DEBUG&&(k.html.SafeStyleSheet.prototype.toString=function(){return"SafeStyleSheet{"+this.privateDoNotAccessOrElseSafeStyleSheetWrappedValue_+"}"});
k.html.SafeStyleSheet.unwrap=function(b){if(b instanceof k.html.SafeStyleSheet&&b.constructor===k.html.SafeStyleSheet&&b.SAFE_STYLE_SHEET_TYPE_MARKER_GOOG_HTML_SECURITY_PRIVATE_===k.html.SafeStyleSheet.TYPE_MARKER_GOOG_HTML_SECURITY_PRIVATE_)return b.privateDoNotAccessOrElseSafeStyleSheetWrappedValue_;k.asserts.fail("expected object of type SafeStyleSheet, got '"+b+"' of type "+k.typeOf(b));return"type_error:SafeStyleSheet"};
k.html.SafeStyleSheet.createSafeStyleSheetSecurityPrivateDoNotAccessOrElse=function(b){return(new k.html.SafeStyleSheet).initSecurityPrivateDoNotAccessOrElse_(b)};k.html.SafeStyleSheet.prototype.initSecurityPrivateDoNotAccessOrElse_=function(b){this.privateDoNotAccessOrElseSafeStyleSheetWrappedValue_=b;return this};k.html.SafeStyleSheet.EMPTY=k.html.SafeStyleSheet.createSafeStyleSheetSecurityPrivateDoNotAccessOrElse("");k.fs={};k.fs.url={};k.fs.url.createObjectUrl=function(b){return k.fs.url.getUrlObject_().createObjectURL(b)};k.fs.url.revokeObjectUrl=function(b){k.fs.url.getUrlObject_().revokeObjectURL(b)};k.fs.url.getUrlObject_=function(){var b=k.fs.url.findUrlObject_();if(null!=b)return b;throw Error("This browser doesn't seem to support blob URLs");};
k.fs.url.findUrlObject_=function(){return k.isDef(k.global.URL)&&k.isDef(k.global.URL.createObjectURL)?k.global.URL:k.isDef(k.global.webkitURL)&&k.isDef(k.global.webkitURL.createObjectURL)?k.global.webkitURL:k.isDef(k.global.createObjectURL)?k.global:null};k.fs.url.browserSupportsObjectUrls=function(){return null!=k.fs.url.findUrlObject_()};k.html.TrustedResourceUrl=function(){this.privateDoNotAccessOrElseTrustedResourceUrlWrappedValue_="";this.TRUSTED_RESOURCE_URL_TYPE_MARKER_GOOG_HTML_SECURITY_PRIVATE_=k.html.TrustedResourceUrl.TYPE_MARKER_GOOG_HTML_SECURITY_PRIVATE_};k.html.TrustedResourceUrl.prototype.implementsGoogStringTypedString=!0;k.html.TrustedResourceUrl.prototype.getTypedStringValue=function(){return this.privateDoNotAccessOrElseTrustedResourceUrlWrappedValue_};
k.html.TrustedResourceUrl.prototype.implementsGoogI18nBidiDirectionalString=!0;k.html.TrustedResourceUrl.prototype.getDirection=function(){return k.i18n.bidi.Dir.LTR};k.DEBUG&&(k.html.TrustedResourceUrl.prototype.toString=function(){return"TrustedResourceUrl{"+this.privateDoNotAccessOrElseTrustedResourceUrlWrappedValue_+"}"});
k.html.TrustedResourceUrl.unwrap=function(b){if(b instanceof k.html.TrustedResourceUrl&&b.constructor===k.html.TrustedResourceUrl&&b.TRUSTED_RESOURCE_URL_TYPE_MARKER_GOOG_HTML_SECURITY_PRIVATE_===k.html.TrustedResourceUrl.TYPE_MARKER_GOOG_HTML_SECURITY_PRIVATE_)return b.privateDoNotAccessOrElseTrustedResourceUrlWrappedValue_;k.asserts.fail("expected object of type TrustedResourceUrl, got '"+b+"' of type "+k.typeOf(b));return"type_error:TrustedResourceUrl"};
k.html.TrustedResourceUrl.format=function(b,c){var d=k.string.Const.unwrap(b);if(!k.html.TrustedResourceUrl.BASE_URL_.test(d))throw Error("Invalid TrustedResourceUrl format: "+d);b=d.replace(k.html.TrustedResourceUrl.FORMAT_MARKER_,function(b,f){if(!Object.prototype.hasOwnProperty.call(c,f))throw Error('Found marker, "'+f+'", in format string, "'+d+'", but no valid label mapping found in args: '+JSON.stringify(c));b=c[f];return b instanceof k.string.Const?k.string.Const.unwrap(b):encodeURIComponent(String(b))});
return k.html.TrustedResourceUrl.createTrustedResourceUrlSecurityPrivateDoNotAccessOrElse(b)};k.html.TrustedResourceUrl.FORMAT_MARKER_=/%{(\w+)}/g;k.html.TrustedResourceUrl.BASE_URL_=/^(?:https:)?\/\/[0-9a-z.:[\]-]+\/|^\/[^\/\\]/i;k.html.TrustedResourceUrl.fromConstant=function(b){return k.html.TrustedResourceUrl.createTrustedResourceUrlSecurityPrivateDoNotAccessOrElse(k.string.Const.unwrap(b))};
k.html.TrustedResourceUrl.fromConstants=function(b){for(var c="",d=0;d<b.length;d++)c+=k.string.Const.unwrap(b[d]);return k.html.TrustedResourceUrl.createTrustedResourceUrlSecurityPrivateDoNotAccessOrElse(c)};k.html.TrustedResourceUrl.TYPE_MARKER_GOOG_HTML_SECURITY_PRIVATE_={};k.html.TrustedResourceUrl.createTrustedResourceUrlSecurityPrivateDoNotAccessOrElse=function(b){var c=new k.html.TrustedResourceUrl;c.privateDoNotAccessOrElseTrustedResourceUrlWrappedValue_=b;return c};k.html.SafeUrl=function(){this.privateDoNotAccessOrElseSafeHtmlWrappedValue_="";this.SAFE_URL_TYPE_MARKER_GOOG_HTML_SECURITY_PRIVATE_=k.html.SafeUrl.TYPE_MARKER_GOOG_HTML_SECURITY_PRIVATE_};k.html.SafeUrl.INNOCUOUS_STRING="about:invalid#zClosurez";k.html.SafeUrl.prototype.implementsGoogStringTypedString=!0;k.html.SafeUrl.prototype.getTypedStringValue=function(){return this.privateDoNotAccessOrElseSafeHtmlWrappedValue_};k.html.SafeUrl.prototype.implementsGoogI18nBidiDirectionalString=!0;
k.html.SafeUrl.prototype.getDirection=function(){return k.i18n.bidi.Dir.LTR};k.DEBUG&&(k.html.SafeUrl.prototype.toString=function(){return"SafeUrl{"+this.privateDoNotAccessOrElseSafeHtmlWrappedValue_+"}"});
k.html.SafeUrl.unwrap=function(b){if(b instanceof k.html.SafeUrl&&b.constructor===k.html.SafeUrl&&b.SAFE_URL_TYPE_MARKER_GOOG_HTML_SECURITY_PRIVATE_===k.html.SafeUrl.TYPE_MARKER_GOOG_HTML_SECURITY_PRIVATE_)return b.privateDoNotAccessOrElseSafeHtmlWrappedValue_;k.asserts.fail("expected object of type SafeUrl, got '"+b+"' of type "+k.typeOf(b));return"type_error:SafeUrl"};k.html.SafeUrl.fromConstant=function(b){return k.html.SafeUrl.createSafeUrlSecurityPrivateDoNotAccessOrElse(k.string.Const.unwrap(b))};
k.html.SAFE_MIME_TYPE_PATTERN_=/^(?:image\/(?:bmp|gif|jpeg|jpg|png|tiff|webp)|video\/(?:mpeg|mp4|ogg|webm))$/i;k.html.SafeUrl.fromBlob=function(b){b=k.html.SAFE_MIME_TYPE_PATTERN_.test(b.type)?k.fs.url.createObjectUrl(b):k.html.SafeUrl.INNOCUOUS_STRING;return k.html.SafeUrl.createSafeUrlSecurityPrivateDoNotAccessOrElse(b)};k.html.DATA_URL_PATTERN_=/^data:([^;,]*);base64,[a-z0-9+\/]+=*$/i;
k.html.SafeUrl.fromDataUrl=function(b){var c=b.match(k.html.DATA_URL_PATTERN_),c=c&&k.html.SAFE_MIME_TYPE_PATTERN_.test(c[1]);return k.html.SafeUrl.createSafeUrlSecurityPrivateDoNotAccessOrElse(c?b:k.html.SafeUrl.INNOCUOUS_STRING)};k.html.SafeUrl.fromTelUrl=function(b){k.string.caseInsensitiveStartsWith(b)||(b=k.html.SafeUrl.INNOCUOUS_STRING);return k.html.SafeUrl.createSafeUrlSecurityPrivateDoNotAccessOrElse(b)};k.html.SafeUrl.fromTrustedResourceUrl=function(b){return k.html.SafeUrl.createSafeUrlSecurityPrivateDoNotAccessOrElse(k.html.TrustedResourceUrl.unwrap(b))};
k.html.SAFE_URL_PATTERN_=/^(?:(?:https?|mailto|ftp):|[^&:/?#]*(?:[/?#]|$))/i;k.html.SafeUrl.sanitize=function(b){if(b instanceof k.html.SafeUrl)return b;b=b.implementsGoogStringTypedString?b.getTypedStringValue():String(b);k.html.SAFE_URL_PATTERN_.test(b)||(b=k.html.SafeUrl.INNOCUOUS_STRING);return k.html.SafeUrl.createSafeUrlSecurityPrivateDoNotAccessOrElse(b)};k.html.SafeUrl.TYPE_MARKER_GOOG_HTML_SECURITY_PRIVATE_={};
k.html.SafeUrl.createSafeUrlSecurityPrivateDoNotAccessOrElse=function(b){var c=new k.html.SafeUrl;c.privateDoNotAccessOrElseSafeHtmlWrappedValue_=b;return c};k.html.SafeUrl.ABOUT_BLANK=k.html.SafeUrl.createSafeUrlSecurityPrivateDoNotAccessOrElse("about:blank");k.html.SafeHtml=function(){this.privateDoNotAccessOrElseSafeHtmlWrappedValue_="";this.SAFE_HTML_TYPE_MARKER_GOOG_HTML_SECURITY_PRIVATE_=k.html.SafeHtml.TYPE_MARKER_GOOG_HTML_SECURITY_PRIVATE_;this.dir_=null};k.html.SafeHtml.prototype.implementsGoogI18nBidiDirectionalString=!0;k.html.SafeHtml.prototype.getDirection=function(){return this.dir_};k.html.SafeHtml.prototype.implementsGoogStringTypedString=!0;k.html.SafeHtml.prototype.getTypedStringValue=function(){return this.privateDoNotAccessOrElseSafeHtmlWrappedValue_};
k.DEBUG&&(k.html.SafeHtml.prototype.toString=function(){return"SafeHtml{"+this.privateDoNotAccessOrElseSafeHtmlWrappedValue_+"}"});k.html.SafeHtml.unwrap=function(b){if(b instanceof k.html.SafeHtml&&b.constructor===k.html.SafeHtml&&b.SAFE_HTML_TYPE_MARKER_GOOG_HTML_SECURITY_PRIVATE_===k.html.SafeHtml.TYPE_MARKER_GOOG_HTML_SECURITY_PRIVATE_)return b.privateDoNotAccessOrElseSafeHtmlWrappedValue_;k.asserts.fail("expected object of type SafeHtml, got '"+b+"' of type "+k.typeOf(b));return"type_error:SafeHtml"};
k.html.SafeHtml.htmlEscape=function(b){if(b instanceof k.html.SafeHtml)return b;var c=null;b.implementsGoogI18nBidiDirectionalString&&(c=b.getDirection());return k.html.SafeHtml.createSafeHtmlSecurityPrivateDoNotAccessOrElse(k.string.htmlEscape(b.implementsGoogStringTypedString?b.getTypedStringValue():String(b)),c)};
k.html.SafeHtml.htmlEscapePreservingNewlines=function(b){if(b instanceof k.html.SafeHtml)return b;b=k.html.SafeHtml.htmlEscape(b);return k.html.SafeHtml.createSafeHtmlSecurityPrivateDoNotAccessOrElse(k.string.newLineToBr(k.html.SafeHtml.unwrap(b)),b.getDirection())};
k.html.SafeHtml.htmlEscapePreservingNewlinesAndSpaces=function(b){if(b instanceof k.html.SafeHtml)return b;b=k.html.SafeHtml.htmlEscape(b);return k.html.SafeHtml.createSafeHtmlSecurityPrivateDoNotAccessOrElse(k.string.whitespaceEscape(k.html.SafeHtml.unwrap(b)),b.getDirection())};k.html.SafeHtml.from=k.html.SafeHtml.htmlEscape;k.html.SafeHtml.VALID_NAMES_IN_TAG_=/^[a-zA-Z0-9-]+$/;k.html.SafeHtml.URL_ATTRIBUTES_={action:!0,cite:!0,data:!0,formaction:!0,href:!0,manifest:!0,poster:!0,src:!0};
k.html.SafeHtml.NOT_ALLOWED_TAG_NAMES_={APPLET:!0,BASE:!0,EMBED:!0,IFRAME:!0,LINK:!0,MATH:!0,META:!0,OBJECT:!0,SCRIPT:!0,STYLE:!0,SVG:!0,TEMPLATE:!0};k.html.SafeHtml.create=function(b,c,d){k.html.SafeHtml.verifyTagName(String(b));return k.html.SafeHtml.createSafeHtmlTagSecurityPrivateDoNotAccessOrElse(String(b),c,d)};
k.html.SafeHtml.verifyTagName=function(b){if(!k.html.SafeHtml.VALID_NAMES_IN_TAG_.test(b))throw Error("Invalid tag name <"+b+">.");if(b.toUpperCase()in k.html.SafeHtml.NOT_ALLOWED_TAG_NAMES_)throw Error("Tag name <"+b+"> is not allowed for SafeHtml.");};
k.html.SafeHtml.createIframe=function(b,c,d,e){b&&k.html.TrustedResourceUrl.unwrap(b);var f={};f.src=b||null;f.srcdoc=c&&k.html.SafeHtml.unwrap(c);b=k.html.SafeHtml.combineAttributes(f,{sandbox:""},d);return k.html.SafeHtml.createSafeHtmlTagSecurityPrivateDoNotAccessOrElse("iframe",b,e)};
k.html.SafeHtml.createSandboxIframe=function(b,c,d,e){if(!k.html.SafeHtml.canUseSandboxIframe())throw Error("The browser does not support sandboxed iframes.");var f={};f.src=b?k.html.SafeUrl.unwrap(k.html.SafeUrl.sanitize(b)):null;f.srcdoc=c||null;f.sandbox="";b=k.html.SafeHtml.combineAttributes(f,{},d);return k.html.SafeHtml.createSafeHtmlTagSecurityPrivateDoNotAccessOrElse("iframe",b,e)};k.html.SafeHtml.canUseSandboxIframe=function(){return k.global.HTMLIFrameElement&&"sandbox"in k.global.HTMLIFrameElement.prototype};
k.html.SafeHtml.createScriptSrc=function(b,c){k.html.TrustedResourceUrl.unwrap(b);b=k.html.SafeHtml.combineAttributes({src:b},{},c);return k.html.SafeHtml.createSafeHtmlTagSecurityPrivateDoNotAccessOrElse("script",b)};
k.html.SafeHtml.createScript=function(b,c){for(var d in c){var e=d.toLowerCase();if("language"==e||"src"==e||"text"==e||"type"==e)throw Error('Cannot set "'+e+'" attribute');}d="";b=k.array.concat(b);for(e=0;e<b.length;e++)d+=k.html.SafeScript.unwrap(b[e]);b=k.html.SafeHtml.createSafeHtmlSecurityPrivateDoNotAccessOrElse(d,k.i18n.bidi.Dir.NEUTRAL);return k.html.SafeHtml.createSafeHtmlTagSecurityPrivateDoNotAccessOrElse("script",c,b)};
k.html.SafeHtml.createStyle=function(b,c){c=k.html.SafeHtml.combineAttributes({type:"text/css"},{},c);var d="";b=k.array.concat(b);for(var e=0;e<b.length;e++)d+=k.html.SafeStyleSheet.unwrap(b[e]);b=k.html.SafeHtml.createSafeHtmlSecurityPrivateDoNotAccessOrElse(d,k.i18n.bidi.Dir.NEUTRAL);return k.html.SafeHtml.createSafeHtmlTagSecurityPrivateDoNotAccessOrElse("style",c,b)};
k.html.SafeHtml.createMetaRefresh=function(b,c){b=k.html.SafeUrl.unwrap(k.html.SafeUrl.sanitize(b));(k.labs.userAgent.browser.isIE()||k.labs.userAgent.browser.isEdge())&&k.string.contains(b,";")&&(b="'"+b.replace(/'/g,"%27")+"'");return k.html.SafeHtml.createSafeHtmlTagSecurityPrivateDoNotAccessOrElse("meta",{"http-equiv":"refresh",content:(c||0)+"; url="+b})};
k.html.SafeHtml.getAttrNameAndValue_=function(b,c,d){if(d instanceof k.string.Const)d=k.string.Const.unwrap(d);else if("style"==c.toLowerCase())d=k.html.SafeHtml.getStyleValue_(d);else{if(/^on/i.test(c))throw Error('Attribute "'+c+'" requires goog.string.Const value, "'+d+'" given.');if(c.toLowerCase()in k.html.SafeHtml.URL_ATTRIBUTES_)if(d instanceof k.html.TrustedResourceUrl)d=k.html.TrustedResourceUrl.unwrap(d);else if(d instanceof k.html.SafeUrl)d=k.html.SafeUrl.unwrap(d);else if(k.isString(d))d=
k.html.SafeUrl.sanitize(d).getTypedStringValue();else throw Error('Attribute "'+c+'" on tag "'+b+'" requires goog.html.SafeUrl, goog.string.Const, or string, value "'+d+'" given.');}d.implementsGoogStringTypedString&&(d=d.getTypedStringValue());k.asserts.assert(k.isString(d)||k.isNumber(d),"String or number value expected, got "+typeof d+" with value: "+d);return c+'="'+k.string.htmlEscape(String(d))+'"'};
k.html.SafeHtml.getStyleValue_=function(b){if(!k.isObject(b))throw Error('The "style" attribute requires goog.html.SafeStyle or map of style properties, '+typeof b+" given: "+b);b instanceof k.html.SafeStyle||(b=k.html.SafeStyle.create(b));return k.html.SafeStyle.unwrap(b)};k.html.SafeHtml.createWithDir=function(b,c,d,e){c=k.html.SafeHtml.create(c,d,e);c.dir_=b;return c};
k.html.SafeHtml.concat=function(b){var c=k.i18n.bidi.Dir.NEUTRAL,d="",e=function(b){k.isArray(b)?k.array.forEach(b,e):(b=k.html.SafeHtml.htmlEscape(b),d+=k.html.SafeHtml.unwrap(b),b=b.getDirection(),c==k.i18n.bidi.Dir.NEUTRAL?c=b:b!=k.i18n.bidi.Dir.NEUTRAL&&c!=b&&(c=null))};k.array.forEach(arguments,e);return k.html.SafeHtml.createSafeHtmlSecurityPrivateDoNotAccessOrElse(d,c)};k.html.SafeHtml.concatWithDir=function(b,c){var d=k.html.SafeHtml.concat(k.array.slice(arguments,1));d.dir_=b;return d};
k.html.SafeHtml.TYPE_MARKER_GOOG_HTML_SECURITY_PRIVATE_={};k.html.SafeHtml.createSafeHtmlSecurityPrivateDoNotAccessOrElse=function(b,c){return(new k.html.SafeHtml).initSecurityPrivateDoNotAccessOrElse_(b,c)};k.html.SafeHtml.prototype.initSecurityPrivateDoNotAccessOrElse_=function(b,c){this.privateDoNotAccessOrElseSafeHtmlWrappedValue_=b;this.dir_=c;return this};
k.html.SafeHtml.createSafeHtmlTagSecurityPrivateDoNotAccessOrElse=function(b,c,d){var e=null,f;f="<"+b+k.html.SafeHtml.stringifyAttributes(b,c);k.isDefAndNotNull(d)?k.isArray(d)||(d=[d]):d=[];k.dom.tags.isVoidTag(b.toLowerCase())?(k.asserts.assert(!d.length,"Void tag <"+b+"> does not allow content."),f+=">"):(e=k.html.SafeHtml.concat(d),f+=">"+k.html.SafeHtml.unwrap(e)+"</"+b+">",e=e.getDirection());(b=c&&c.dir)&&(e=/^(ltr|rtl|auto)$/i.test(b)?k.i18n.bidi.Dir.NEUTRAL:null);return k.html.SafeHtml.createSafeHtmlSecurityPrivateDoNotAccessOrElse(f,
e)};k.html.SafeHtml.stringifyAttributes=function(b,c){var d="";if(c)for(var e in c){if(!k.html.SafeHtml.VALID_NAMES_IN_TAG_.test(e))throw Error('Invalid attribute name "'+e+'".');var f=c[e];k.isDefAndNotNull(f)&&(d+=" "+k.html.SafeHtml.getAttrNameAndValue_(b,e,f))}return d};
k.html.SafeHtml.combineAttributes=function(b,c,d){var e={},f;for(f in b)k.asserts.assert(f.toLowerCase()==f,"Must be lower case"),e[f]=b[f];for(f in c)k.asserts.assert(f.toLowerCase()==f,"Must be lower case"),e[f]=c[f];for(f in d){var g=f.toLowerCase();if(g in b)throw Error('Cannot override "'+g+'" attribute, got "'+f+'" with value "'+d[f]+'"');g in c&&delete e[g];e[f]=d[f]}return e};k.html.SafeHtml.DOCTYPE_HTML=k.html.SafeHtml.createSafeHtmlSecurityPrivateDoNotAccessOrElse("<!DOCTYPE html>",k.i18n.bidi.Dir.NEUTRAL);
k.html.SafeHtml.EMPTY=k.html.SafeHtml.createSafeHtmlSecurityPrivateDoNotAccessOrElse("",k.i18n.bidi.Dir.NEUTRAL);k.html.SafeHtml.BR=k.html.SafeHtml.createSafeHtmlSecurityPrivateDoNotAccessOrElse("<br>",k.i18n.bidi.Dir.NEUTRAL);k.html.uncheckedconversions={};k.html.uncheckedconversions.safeHtmlFromStringKnownToSatisfyTypeContract=function(b,c){k.asserts.assertString(k.string.Const.unwrap(b),"must provide justification");k.asserts.assert(!k.string.isEmptyOrWhitespace(k.string.Const.unwrap(b)),"must provide non-empty justification");return k.html.SafeHtml.createSafeHtmlSecurityPrivateDoNotAccessOrElse(c,null)};
k.html.uncheckedconversions.safeScriptFromStringKnownToSatisfyTypeContract=function(b,c){k.asserts.assertString(k.string.Const.unwrap(b),"must provide justification");k.asserts.assert(!k.string.isEmptyOrWhitespace(k.string.Const.unwrap(b)),"must provide non-empty justification");return k.html.SafeScript.createSafeScriptSecurityPrivateDoNotAccessOrElse(c)};
k.html.uncheckedconversions.safeStyleFromStringKnownToSatisfyTypeContract=function(b,c){k.asserts.assertString(k.string.Const.unwrap(b),"must provide justification");k.asserts.assert(!k.string.isEmptyOrWhitespace(k.string.Const.unwrap(b)),"must provide non-empty justification");return k.html.SafeStyle.createSafeStyleSecurityPrivateDoNotAccessOrElse(c)};
k.html.uncheckedconversions.safeStyleSheetFromStringKnownToSatisfyTypeContract=function(b,c){k.asserts.assertString(k.string.Const.unwrap(b),"must provide justification");k.asserts.assert(!k.string.isEmptyOrWhitespace(k.string.Const.unwrap(b)),"must provide non-empty justification");return k.html.SafeStyleSheet.createSafeStyleSheetSecurityPrivateDoNotAccessOrElse(c)};
k.html.uncheckedconversions.safeUrlFromStringKnownToSatisfyTypeContract=function(b,c){k.asserts.assertString(k.string.Const.unwrap(b),"must provide justification");k.asserts.assert(!k.string.isEmptyOrWhitespace(k.string.Const.unwrap(b)),"must provide non-empty justification");return k.html.SafeUrl.createSafeUrlSecurityPrivateDoNotAccessOrElse(c)};
k.html.uncheckedconversions.trustedResourceUrlFromStringKnownToSatisfyTypeContract=function(b,c){k.asserts.assertString(k.string.Const.unwrap(b),"must provide justification");k.asserts.assert(!k.string.isEmptyOrWhitespace(k.string.Const.unwrap(b)),"must provide non-empty justification");return k.html.TrustedResourceUrl.createTrustedResourceUrlSecurityPrivateDoNotAccessOrElse(c)};k.math.Coordinate=function(b,c){this.x=k.isDef(b)?b:0;this.y=k.isDef(c)?c:0};k.math.Coordinate.prototype.clone=function(){return new k.math.Coordinate(this.x,this.y)};k.DEBUG&&(k.math.Coordinate.prototype.toString=function(){return"("+this.x+", "+this.y+")"});k.math.Coordinate.prototype.equals=function(b){return b instanceof k.math.Coordinate&&k.math.Coordinate.equals(this,b)};k.math.Coordinate.equals=function(b,c){return b==c?!0:b&&c?b.x==c.x&&b.y==c.y:!1};
k.math.Coordinate.distance=function(b,c){var d=b.x-c.x;b=b.y-c.y;return Math.sqrt(d*d+b*b)};k.math.Coordinate.magnitude=function(b){return Math.sqrt(b.x*b.x+b.y*b.y)};k.math.Coordinate.azimuth=function(b){return k.math.angle(0,0,b.x,b.y)};k.math.Coordinate.squaredDistance=function(b,c){var d=b.x-c.x;b=b.y-c.y;return d*d+b*b};k.math.Coordinate.difference=function(b,c){return new k.math.Coordinate(b.x-c.x,b.y-c.y)};k.math.Coordinate.sum=function(b,c){return new k.math.Coordinate(b.x+c.x,b.y+c.y)};
k.math.Coordinate.prototype.ceil=function(){this.x=Math.ceil(this.x);this.y=Math.ceil(this.y);return this};k.math.Coordinate.prototype.floor=function(){this.x=Math.floor(this.x);this.y=Math.floor(this.y);return this};k.math.Coordinate.prototype.round=function(){this.x=Math.round(this.x);this.y=Math.round(this.y);return this};k.math.Size=function(b,c){this.width=b;this.height=c};k.math.Size.equals=function(b,c){return b==c?!0:b&&c?b.width==c.width&&b.height==c.height:!1};k.math.Size.prototype.clone=function(){return new k.math.Size(this.width,this.height)};k.DEBUG&&(k.math.Size.prototype.toString=function(){return"("+this.width+" x "+this.height+")"});a=k.math.Size.prototype;a.area=function(){return this.width*this.height};a.isEmpty=function(){return!this.area()};
a.ceil=function(){this.width=Math.ceil(this.width);this.height=Math.ceil(this.height);return this};a.floor=function(){this.width=Math.floor(this.width);this.height=Math.floor(this.height);return this};a.round=function(){this.width=Math.round(this.width);this.height=Math.round(this.height);return this};k.dom.BrowserFeature={CAN_ADD_NAME_OR_TYPE_ATTRIBUTES:!k.userAgent.IE||k.userAgent.isDocumentModeOrHigher(9),CAN_USE_CHILDREN_ATTRIBUTE:!k.userAgent.GECKO&&!k.userAgent.IE||k.userAgent.IE&&k.userAgent.isDocumentModeOrHigher(9)||k.userAgent.GECKO&&k.userAgent.isVersionOrHigher("1.9.1"),CAN_USE_INNER_TEXT:k.userAgent.IE&&!k.userAgent.isVersionOrHigher("9"),CAN_USE_PARENT_ELEMENT_PROPERTY:k.userAgent.IE||k.userAgent.OPERA||k.userAgent.WEBKIT,INNER_HTML_NEEDS_SCOPED_ELEMENT:k.userAgent.IE,LEGACY_IE_RANGES:k.userAgent.IE&&
!k.userAgent.isDocumentModeOrHigher(9)};k.dom.safe={};k.dom.safe.InsertAdjacentHtmlPosition={AFTERBEGIN:"afterbegin",AFTEREND:"afterend",BEFOREBEGIN:"beforebegin",BEFOREEND:"beforeend"};k.dom.safe.insertAdjacentHtml=function(b,c,d){b.insertAdjacentHTML(c,k.html.SafeHtml.unwrap(d))};k.dom.safe.SET_INNER_HTML_DISALLOWED_TAGS_={MATH:!0,SCRIPT:!0,STYLE:!0,SVG:!0,TEMPLATE:!0};
k.dom.safe.setInnerHtml=function(b,c){if(k.asserts.ENABLE_ASSERTS&&k.dom.safe.SET_INNER_HTML_DISALLOWED_TAGS_[b.tagName.toUpperCase()])throw Error("goog.dom.safe.setInnerHtml cannot be used to set content of "+b.tagName+".");b.innerHTML=k.html.SafeHtml.unwrap(c)};k.dom.safe.setOuterHtml=function(b,c){b.outerHTML=k.html.SafeHtml.unwrap(c)};k.dom.safe.setStyle=function(b,c){b.style.cssText=k.html.SafeStyle.unwrap(c)};k.dom.safe.documentWrite=function(b,c){b.write(k.html.SafeHtml.unwrap(c))};
k.dom.safe.setAnchorHref=function(b,c){k.dom.safe.assertIsHTMLAnchorElement_(b);c=c instanceof k.html.SafeUrl?c:k.html.SafeUrl.sanitize(c);b.href=k.html.SafeUrl.unwrap(c)};k.dom.safe.setImageSrc=function(b,c){k.dom.safe.assertIsHTMLImageElement_(b);c=c instanceof k.html.SafeUrl?c:k.html.SafeUrl.sanitize(c);b.src=k.html.SafeUrl.unwrap(c)};k.dom.safe.setEmbedSrc=function(b,c){k.dom.safe.assertIsHTMLEmbedElement_(b);b.src=k.html.TrustedResourceUrl.unwrap(c)};
k.dom.safe.setFrameSrc=function(b,c){k.dom.safe.assertIsHTMLFrameElement_(b);b.src=k.html.TrustedResourceUrl.unwrap(c)};k.dom.safe.setIframeSrc=function(b,c){k.dom.safe.assertIsHTMLIFrameElement_(b);b.src=k.html.TrustedResourceUrl.unwrap(c)};k.dom.safe.setIframeSrcdoc=function(b,c){k.dom.safe.assertIsHTMLIFrameElement_(b);b.srcdoc=k.html.SafeHtml.unwrap(c)};
k.dom.safe.setLinkHrefAndRel=function(b,c,d){k.dom.safe.assertIsHTMLLinkElement_(b);b.rel=d;k.string.caseInsensitiveContains(d,"stylesheet")?(k.asserts.assert(c instanceof k.html.TrustedResourceUrl,'URL must be TrustedResourceUrl because "rel" contains "stylesheet"'),b.href=k.html.TrustedResourceUrl.unwrap(c)):b.href=c instanceof k.html.TrustedResourceUrl?k.html.TrustedResourceUrl.unwrap(c):c instanceof k.html.SafeUrl?k.html.SafeUrl.unwrap(c):k.html.SafeUrl.sanitize(c).getTypedStringValue()};
k.dom.safe.setObjectData=function(b,c){k.dom.safe.assertIsHTMLObjectElement_(b);b.data=k.html.TrustedResourceUrl.unwrap(c)};k.dom.safe.setScriptSrc=function(b,c){k.dom.safe.assertIsHTMLScriptElement_(b);b.src=k.html.TrustedResourceUrl.unwrap(c)};k.dom.safe.setLocationHref=function(b,c){k.dom.safe.assertIsLocation_(b);c=c instanceof k.html.SafeUrl?c:k.html.SafeUrl.sanitize(c);b.href=k.html.SafeUrl.unwrap(c)};
k.dom.safe.openInWindow=function(b,c,d,e,f){b=b instanceof k.html.SafeUrl?b:k.html.SafeUrl.sanitize(b);return(c||window).open(k.html.SafeUrl.unwrap(b),d?k.string.Const.unwrap(d):"",e,f)};k.dom.safe.assertIsLocation_=function(b){k.asserts.ENABLE_ASSERTS&&"undefined"!=typeof Location&&"undefined"!=typeof Element&&k.asserts.assert(b&&(b instanceof Location||!(b instanceof Element)),"Argument is not a Location (or a non-Element mock); got: %s",k.dom.safe.debugStringForType_(b))};
k.dom.safe.assertIsHTMLAnchorElement_=function(b){k.asserts.ENABLE_ASSERTS&&"undefined"!=typeof HTMLAnchorElement&&"undefined"!=typeof Location&&"undefined"!=typeof Element&&k.asserts.assert(b&&(b instanceof HTMLAnchorElement||!(b instanceof Location||b instanceof Element)),"Argument is not a HTMLAnchorElement (or a non-Element mock); got: %s",k.dom.safe.debugStringForType_(b))};
k.dom.safe.assertIsHTMLLinkElement_=function(b){k.asserts.ENABLE_ASSERTS&&"undefined"!=typeof HTMLLinkElement&&"undefined"!=typeof Location&&"undefined"!=typeof Element&&k.asserts.assert(b&&(b instanceof HTMLLinkElement||!(b instanceof Location||b instanceof Element)),"Argument is not a HTMLLinkElement (or a non-Element mock); got: %s",k.dom.safe.debugStringForType_(b))};
k.dom.safe.assertIsHTMLImageElement_=function(b){k.asserts.ENABLE_ASSERTS&&"undefined"!=typeof HTMLImageElement&&"undefined"!=typeof Element&&k.asserts.assert(b&&(b instanceof HTMLImageElement||!(b instanceof Element)),"Argument is not a HTMLImageElement (or a non-Element mock); got: %s",k.dom.safe.debugStringForType_(b))};
k.dom.safe.assertIsHTMLEmbedElement_=function(b){k.asserts.ENABLE_ASSERTS&&"undefined"!=typeof HTMLEmbedElement&&"undefined"!=typeof Element&&k.asserts.assert(b&&(b instanceof HTMLEmbedElement||!(b instanceof Element)),"Argument is not a HTMLEmbedElement (or a non-Element mock); got: %s",k.dom.safe.debugStringForType_(b))};
k.dom.safe.assertIsHTMLFrameElement_=function(b){k.asserts.ENABLE_ASSERTS&&"undefined"!=typeof HTMLFrameElement&&"undefined"!=typeof Element&&k.asserts.assert(b&&(b instanceof HTMLFrameElement||!(b instanceof Element)),"Argument is not a HTMLFrameElement (or a non-Element mock); got: %s",k.dom.safe.debugStringForType_(b))};
k.dom.safe.assertIsHTMLIFrameElement_=function(b){k.asserts.ENABLE_ASSERTS&&"undefined"!=typeof HTMLIFrameElement&&"undefined"!=typeof Element&&k.asserts.assert(b&&(b instanceof HTMLIFrameElement||!(b instanceof Element)),"Argument is not a HTMLIFrameElement (or a non-Element mock); got: %s",k.dom.safe.debugStringForType_(b))};
k.dom.safe.assertIsHTMLObjectElement_=function(b){k.asserts.ENABLE_ASSERTS&&"undefined"!=typeof HTMLObjectElement&&"undefined"!=typeof Element&&k.asserts.assert(b&&(b instanceof HTMLObjectElement||!(b instanceof Element)),"Argument is not a HTMLObjectElement (or a non-Element mock); got: %s",k.dom.safe.debugStringForType_(b))};
k.dom.safe.assertIsHTMLScriptElement_=function(b){k.asserts.ENABLE_ASSERTS&&"undefined"!=typeof HTMLScriptElement&&"undefined"!=typeof Element&&k.asserts.assert(b&&(b instanceof HTMLScriptElement||!(b instanceof Element)),"Argument is not a HTMLScriptElement (or a non-Element mock); got: %s",k.dom.safe.debugStringForType_(b))};
k.dom.safe.debugStringForType_=function(b){return k.isObject(b)?b.constructor.displayName||b.constructor.name||Object.prototype.toString.call(b):void 0===b?"undefined":null===b?"null":typeof b};k.dom.ASSUME_QUIRKS_MODE=!1;k.dom.ASSUME_STANDARDS_MODE=!1;k.dom.COMPAT_MODE_KNOWN_=k.dom.ASSUME_QUIRKS_MODE||k.dom.ASSUME_STANDARDS_MODE;k.dom.getDomHelper=function(b){return b?new k.dom.DomHelper(k.dom.getOwnerDocument(b)):k.dom.defaultDomHelper_||(k.dom.defaultDomHelper_=new k.dom.DomHelper)};k.dom.getDocument=function(){return document};k.dom.getElement=function(b){return k.dom.getElementHelper_(document,b)};k.dom.getElementHelper_=function(b,c){return k.isString(c)?b.getElementById(c):c};
k.dom.getRequiredElement=function(b){return k.dom.getRequiredElementHelper_(document,b)};k.dom.getRequiredElementHelper_=function(b,c){k.asserts.assertString(c);b=k.dom.getElementHelper_(b,c);return b=k.asserts.assertElement(b,"No element found with id: "+c)};k.dom.$=k.dom.getElement;k.dom.getElementsByTagName=function(b,c){return(c||document).getElementsByTagName(String(b))};k.dom.getElementsByTagNameAndClass=function(b,c,d){return k.dom.getElementsByTagNameAndClass_(document,b,c,d)};
k.dom.getElementsByClass=function(b,c){var d=c||document;return k.dom.canUseQuerySelector_(d)?d.querySelectorAll("."+b):k.dom.getElementsByTagNameAndClass_(document,"*",b,c)};k.dom.getElementByClass=function(b,c){var d=c||document;return(d.getElementsByClassName?d.getElementsByClassName(b)[0]:k.dom.canUseQuerySelector_(d)?d.querySelector("."+b):k.dom.getElementsByTagNameAndClass_(document,"*",b,c)[0])||null};
k.dom.getRequiredElementByClass=function(b,c){c=k.dom.getElementByClass(b,c);return k.asserts.assert(c,"No element found with className: "+b)};k.dom.canUseQuerySelector_=function(b){return!(!b.querySelectorAll||!b.querySelector)};
k.dom.getElementsByTagNameAndClass_=function(b,c,d,e){b=e||b;c=c&&"*"!=c?String(c).toUpperCase():"";if(k.dom.canUseQuerySelector_(b)&&(c||d))return b.querySelectorAll(c+(d?"."+d:""));if(d&&b.getElementsByClassName){b=b.getElementsByClassName(d);if(c){e={};for(var f=0,g=0,h;h=b[g];g++)c==h.nodeName&&(e[f++]=h);e.length=f;return e}return b}b=b.getElementsByTagName(c||"*");if(d){e={};for(g=f=0;h=b[g];g++)c=h.className,"function"==typeof c.split&&k.array.contains(c.split(/\s+/),d)&&(e[f++]=h);e.length=
f;return e}return b};k.dom.$$=k.dom.getElementsByTagNameAndClass;k.dom.setProperties=function(b,c){k.object.forEach(c,function(c,e){"style"==e?b.style.cssText=c:"class"==e?b.className=c:"for"==e?b.htmlFor=c:k.dom.DIRECT_ATTRIBUTE_MAP_.hasOwnProperty(e)?b.setAttribute(k.dom.DIRECT_ATTRIBUTE_MAP_[e],c):k.string.startsWith(e,"aria-")||k.string.startsWith(e,"data-")?b.setAttribute(e,c):b[e]=c})};
k.dom.DIRECT_ATTRIBUTE_MAP_={cellpadding:"cellPadding",cellspacing:"cellSpacing",colspan:"colSpan",frameborder:"frameBorder",height:"height",maxlength:"maxLength",nonce:"nonce",role:"role",rowspan:"rowSpan",type:"type",usemap:"useMap",valign:"vAlign",width:"width"};k.dom.getViewportSize=function(b){return k.dom.getViewportSize_(b||window)};k.dom.getViewportSize_=function(b){b=b.document;b=k.dom.isCss1CompatMode_(b)?b.documentElement:b.body;return new k.math.Size(b.clientWidth,b.clientHeight)};
k.dom.getDocumentHeight=function(){return k.dom.getDocumentHeight_(window)};k.dom.getDocumentHeightForWindow=function(b){return k.dom.getDocumentHeight_(b)};
k.dom.getDocumentHeight_=function(b){var c=b.document,d=0;if(c){var d=c.body,e=c.documentElement;if(!e||!d)return 0;b=k.dom.getViewportSize_(b).height;if(k.dom.isCss1CompatMode_(c)&&e.scrollHeight)d=e.scrollHeight!=b?e.scrollHeight:e.offsetHeight;else{var c=e.scrollHeight,f=e.offsetHeight;e.clientHeight!=f&&(c=d.scrollHeight,f=d.offsetHeight);d=c>b?c>f?c:f:c<f?c:f}}return d};k.dom.getPageScroll=function(b){return k.dom.getDomHelper((b||k.global||window).document).getDocumentScroll()};
k.dom.getDocumentScroll=function(){return k.dom.getDocumentScroll_(document)};k.dom.getDocumentScroll_=function(b){var c=k.dom.getDocumentScrollElement_(b);b=k.dom.getWindow_(b);return k.userAgent.IE&&k.userAgent.isVersionOrHigher("10")&&b.pageYOffset!=c.scrollTop?new k.math.Coordinate(c.scrollLeft,c.scrollTop):new k.math.Coordinate(b.pageXOffset||c.scrollLeft,b.pageYOffset||c.scrollTop)};k.dom.getDocumentScrollElement=function(){return k.dom.getDocumentScrollElement_(document)};
k.dom.getDocumentScrollElement_=function(b){return b.scrollingElement?b.scrollingElement:!k.userAgent.WEBKIT&&k.dom.isCss1CompatMode_(b)?b.documentElement:b.body||b.documentElement};k.dom.getWindow=function(b){return b?k.dom.getWindow_(b):window};k.dom.getWindow_=function(b){return b.parentWindow||b.defaultView};k.dom.createDom=function(b,c,d){return k.dom.createDom_(document,arguments)};
k.dom.createDom_=function(b,c){var d=String(c[0]),e=c[1];if(!k.dom.BrowserFeature.CAN_ADD_NAME_OR_TYPE_ATTRIBUTES&&e&&(e.name||e.type)){d=["<",d];e.name&&d.push(' name="',k.string.htmlEscape(e.name),'"');if(e.type){d.push(' type="',k.string.htmlEscape(e.type),'"');var f={};k.object.extend(f,e);delete f.type;e=f}d.push(">");d=d.join("")}d=b.createElement(d);e&&(k.isString(e)?d.className=e:k.isArray(e)?d.className=e.join(" "):k.dom.setProperties(d,e));2<c.length&&k.dom.append_(b,d,c,2);return d};
k.dom.append_=function(b,c,d,e){function f(d){d&&c.appendChild(k.isString(d)?b.createTextNode(d):d)}for(;e<d.length;e++){var g=d[e];k.isArrayLike(g)&&!k.dom.isNodeLike(g)?k.array.forEach(k.dom.isNodeList(g)?k.array.toArray(g):g,f):f(g)}};k.dom.$dom=k.dom.createDom;k.dom.createElement=function(b){return k.dom.createElement_(document,b)};k.dom.createElement_=function(b,c){return b.createElement(String(c))};k.dom.createTextNode=function(b){return document.createTextNode(String(b))};
k.dom.createTable=function(b,c,d){return k.dom.createTable_(document,b,c,!!d)};k.dom.createTable_=function(b,c,d,e){for(var f=k.dom.createElement_(b,"TABLE"),g=f.appendChild(k.dom.createElement_(b,"TBODY")),h=0;h<c;h++){for(var l=k.dom.createElement_(b,"TR"),m=0;m<d;m++){var p=k.dom.createElement_(b,"TD");e&&k.dom.setTextContent(p,k.string.Unicode.NBSP);l.appendChild(p)}g.appendChild(l)}return f};
k.dom.constHtmlToNode=function(b){var c=k.array.map(arguments,k.string.Const.unwrap),c=k.html.uncheckedconversions.safeHtmlFromStringKnownToSatisfyTypeContract(k.string.Const.from("Constant HTML string, that gets turned into a Node later, so it will be automatically balanced."),c.join(""));return k.dom.safeHtmlToNode(c)};k.dom.safeHtmlToNode=function(b){return k.dom.safeHtmlToNode_(document,b)};
k.dom.safeHtmlToNode_=function(b,c){var d=k.dom.createElement_(b,"DIV");k.dom.BrowserFeature.INNER_HTML_NEEDS_SCOPED_ELEMENT?(k.dom.safe.setInnerHtml(d,k.html.SafeHtml.concat(k.html.SafeHtml.BR,c)),d.removeChild(d.firstChild)):k.dom.safe.setInnerHtml(d,c);return k.dom.childrenToNode_(b,d)};k.dom.childrenToNode_=function(b,c){if(1==c.childNodes.length)return c.removeChild(c.firstChild);for(b=b.createDocumentFragment();c.firstChild;)b.appendChild(c.firstChild);return b};k.dom.isCss1CompatMode=function(){return k.dom.isCss1CompatMode_(document)};
k.dom.isCss1CompatMode_=function(b){return k.dom.COMPAT_MODE_KNOWN_?k.dom.ASSUME_STANDARDS_MODE:"CSS1Compat"==b.compatMode};k.dom.canHaveChildren=function(b){if(b.nodeType!=k.dom.NodeType.ELEMENT)return!1;switch(b.tagName){case "APPLET":case "AREA":case "BASE":case "BR":case "COL":case "COMMAND":case "EMBED":case "FRAME":case "HR":case "IMG":case "INPUT":case "IFRAME":case "ISINDEX":case "KEYGEN":case "LINK":case "NOFRAMES":case "NOSCRIPT":case "META":case "OBJECT":case "PARAM":case "SCRIPT":case "SOURCE":case "STYLE":case "TRACK":case "WBR":return!1}return!0};
k.dom.appendChild=function(b,c){b.appendChild(c)};k.dom.append=function(b,c){k.dom.append_(k.dom.getOwnerDocument(b),b,arguments,1)};k.dom.removeChildren=function(b){for(var c;c=b.firstChild;)b.removeChild(c)};k.dom.insertSiblingBefore=function(b,c){c.parentNode&&c.parentNode.insertBefore(b,c)};k.dom.insertSiblingAfter=function(b,c){c.parentNode&&c.parentNode.insertBefore(b,c.nextSibling)};k.dom.insertChildAt=function(b,c,d){b.insertBefore(c,b.childNodes[d]||null)};
k.dom.removeNode=function(b){return b&&b.parentNode?b.parentNode.removeChild(b):null};k.dom.replaceNode=function(b,c){var d=c.parentNode;d&&d.replaceChild(b,c)};k.dom.flattenElement=function(b){var c,d=b.parentNode;if(d&&d.nodeType!=k.dom.NodeType.DOCUMENT_FRAGMENT){if(b.removeNode)return b.removeNode(!1);for(;c=b.firstChild;)d.insertBefore(c,b);return k.dom.removeNode(b)}};
k.dom.getChildren=function(b){return k.dom.BrowserFeature.CAN_USE_CHILDREN_ATTRIBUTE&&void 0!=b.children?b.children:k.array.filter(b.childNodes,function(b){return b.nodeType==k.dom.NodeType.ELEMENT})};k.dom.getFirstElementChild=function(b){return k.isDef(b.firstElementChild)?b.firstElementChild:k.dom.getNextElementNode_(b.firstChild,!0)};k.dom.getLastElementChild=function(b){return k.isDef(b.lastElementChild)?b.lastElementChild:k.dom.getNextElementNode_(b.lastChild,!1)};
k.dom.getNextElementSibling=function(b){return k.isDef(b.nextElementSibling)?b.nextElementSibling:k.dom.getNextElementNode_(b.nextSibling,!0)};k.dom.getPreviousElementSibling=function(b){return k.isDef(b.previousElementSibling)?b.previousElementSibling:k.dom.getNextElementNode_(b.previousSibling,!1)};k.dom.getNextElementNode_=function(b,c){for(;b&&b.nodeType!=k.dom.NodeType.ELEMENT;)b=c?b.nextSibling:b.previousSibling;return b};
k.dom.getNextNode=function(b){if(!b)return null;if(b.firstChild)return b.firstChild;for(;b&&!b.nextSibling;)b=b.parentNode;return b?b.nextSibling:null};k.dom.getPreviousNode=function(b){if(!b)return null;if(!b.previousSibling)return b.parentNode;for(b=b.previousSibling;b&&b.lastChild;)b=b.lastChild;return b};k.dom.isNodeLike=function(b){return k.isObject(b)&&0<b.nodeType};k.dom.isElement=function(b){return k.isObject(b)&&b.nodeType==k.dom.NodeType.ELEMENT};
k.dom.isWindow=function(b){return k.isObject(b)&&b.window==b};k.dom.getParentElement=function(b){var c;if(k.dom.BrowserFeature.CAN_USE_PARENT_ELEMENT_PROPERTY&&!(k.userAgent.IE&&k.userAgent.isVersionOrHigher("9")&&!k.userAgent.isVersionOrHigher("10")&&k.global.SVGElement&&b instanceof k.global.SVGElement)&&(c=b.parentElement))return c;c=b.parentNode;return k.dom.isElement(c)?c:null};
k.dom.contains=function(b,c){if(!b||!c)return!1;if(b.contains&&c.nodeType==k.dom.NodeType.ELEMENT)return b==c||b.contains(c);if("undefined"!=typeof b.compareDocumentPosition)return b==c||!!(b.compareDocumentPosition(c)&16);for(;c&&b!=c;)c=c.parentNode;return c==b};
k.dom.compareNodeOrder=function(b,c){if(b==c)return 0;if(b.compareDocumentPosition)return b.compareDocumentPosition(c)&2?1:-1;if(k.userAgent.IE&&!k.userAgent.isDocumentModeOrHigher(9)){if(b.nodeType==k.dom.NodeType.DOCUMENT)return-1;if(c.nodeType==k.dom.NodeType.DOCUMENT)return 1}if("sourceIndex"in b||b.parentNode&&"sourceIndex"in b.parentNode){var d=b.nodeType==k.dom.NodeType.ELEMENT,e=c.nodeType==k.dom.NodeType.ELEMENT;if(d&&e)return b.sourceIndex-c.sourceIndex;var f=b.parentNode,g=c.parentNode;
return f==g?k.dom.compareSiblingOrder_(b,c):!d&&k.dom.contains(f,c)?-1*k.dom.compareParentsDescendantNodeIe_(b,c):!e&&k.dom.contains(g,b)?k.dom.compareParentsDescendantNodeIe_(c,b):(d?b.sourceIndex:f.sourceIndex)-(e?c.sourceIndex:g.sourceIndex)}e=k.dom.getOwnerDocument(b);d=e.createRange();d.selectNode(b);d.collapse(!0);b=e.createRange();b.selectNode(c);b.collapse(!0);return d.compareBoundaryPoints(k.global.Range.START_TO_END,b)};
k.dom.compareParentsDescendantNodeIe_=function(b,c){var d=b.parentNode;if(d==c)return-1;for(;c.parentNode!=d;)c=c.parentNode;return k.dom.compareSiblingOrder_(c,b)};k.dom.compareSiblingOrder_=function(b,c){for(;c=c.previousSibling;)if(c==b)return-1;return 1};
k.dom.findCommonAncestor=function(b){var c,d=arguments.length;if(!d)return null;if(1==d)return arguments[0];var e=[],f=Infinity;for(c=0;c<d;c++){for(var g=[],h=arguments[c];h;)g.unshift(h),h=h.parentNode;e.push(g);f=Math.min(f,g.length)}g=null;for(c=0;c<f;c++){for(var h=e[0][c],l=1;l<d;l++)if(h!=e[l][c])return g;g=h}return g};k.dom.getOwnerDocument=function(b){k.asserts.assert(b,"Node cannot be null or undefined.");return b.nodeType==k.dom.NodeType.DOCUMENT?b:b.ownerDocument||b.document};
k.dom.getFrameContentDocument=function(b){return b.contentDocument||b.contentWindow.document};k.dom.getFrameContentWindow=function(b){try{return b.contentWindow||(b.contentDocument?k.dom.getWindow(b.contentDocument):null)}catch(c){}return null};
k.dom.setTextContent=function(b,c){k.asserts.assert(null!=b,"goog.dom.setTextContent expects a non-null value for node");if("textContent"in b)b.textContent=c;else if(b.nodeType==k.dom.NodeType.TEXT)b.data=c;else if(b.firstChild&&b.firstChild.nodeType==k.dom.NodeType.TEXT){for(;b.lastChild!=b.firstChild;)b.removeChild(b.lastChild);b.firstChild.data=c}else{k.dom.removeChildren(b);var d=k.dom.getOwnerDocument(b);b.appendChild(d.createTextNode(String(c)))}};
k.dom.getOuterHtml=function(b){k.asserts.assert(null!==b,"goog.dom.getOuterHtml expects a non-null value for element");if("outerHTML"in b)return b.outerHTML;var c=k.dom.getOwnerDocument(b),c=k.dom.createElement_(c,"DIV");c.appendChild(b.cloneNode(!0));return c.innerHTML};k.dom.findNode=function(b,c){var d=[];return k.dom.findNodes_(b,c,d,!0)?d[0]:void 0};k.dom.findNodes=function(b,c){var d=[];k.dom.findNodes_(b,c,d,!1);return d};
k.dom.findNodes_=function(b,c,d,e){if(null!=b)for(b=b.firstChild;b;){if(c(b)&&(d.push(b),e)||k.dom.findNodes_(b,c,d,e))return!0;b=b.nextSibling}return!1};k.dom.TAGS_TO_IGNORE_={SCRIPT:1,STYLE:1,HEAD:1,IFRAME:1,OBJECT:1};k.dom.PREDEFINED_TAG_VALUES_={IMG:" ",BR:"\n"};k.dom.isFocusableTabIndex=function(b){return k.dom.hasSpecifiedTabIndex_(b)&&k.dom.isTabIndexFocusable_(b)};k.dom.setFocusableTabIndex=function(b,c){c?b.tabIndex=0:(b.tabIndex=-1,b.removeAttribute("tabIndex"))};
k.dom.isFocusable=function(b){var c;return(c=k.dom.nativelySupportsFocus_(b)?!b.disabled&&(!k.dom.hasSpecifiedTabIndex_(b)||k.dom.isTabIndexFocusable_(b)):k.dom.isFocusableTabIndex(b))&&k.userAgent.IE?k.dom.hasNonZeroBoundingRect_(b):c};k.dom.hasSpecifiedTabIndex_=function(b){return k.userAgent.IE&&!k.userAgent.isVersionOrHigher("9")?(b=b.getAttributeNode("tabindex"),k.isDefAndNotNull(b)&&b.specified):b.hasAttribute("tabindex")};
k.dom.isTabIndexFocusable_=function(b){b=b.tabIndex;return k.isNumber(b)&&0<=b&&32768>b};k.dom.nativelySupportsFocus_=function(b){return"A"==b.tagName||"INPUT"==b.tagName||"TEXTAREA"==b.tagName||"SELECT"==b.tagName||"BUTTON"==b.tagName};k.dom.hasNonZeroBoundingRect_=function(b){b=!k.isFunction(b.getBoundingClientRect)||k.userAgent.IE&&null==b.parentElement?{height:b.offsetHeight,width:b.offsetWidth}:b.getBoundingClientRect();return k.isDefAndNotNull(b)&&0<b.height&&0<b.width};
k.dom.getTextContent=function(b){if(k.dom.BrowserFeature.CAN_USE_INNER_TEXT&&null!==b&&"innerText"in b)b=k.string.canonicalizeNewlines(b.innerText);else{var c=[];k.dom.getTextContent_(b,c,!0);b=c.join("")}b=b.replace(/ \xAD /g," ").replace(/\xAD/g,"");b=b.replace(/\u200B/g,"");k.dom.BrowserFeature.CAN_USE_INNER_TEXT||(b=b.replace(/ +/g," "));" "!=b&&(b=b.replace(/^\s*/,""));return b};k.dom.getRawTextContent=function(b){var c=[];k.dom.getTextContent_(b,c,!1);return c.join("")};
k.dom.getTextContent_=function(b,c,d){if(!(b.nodeName in k.dom.TAGS_TO_IGNORE_))if(b.nodeType==k.dom.NodeType.TEXT)d?c.push(String(b.nodeValue).replace(/(\r\n|\r|\n)/g,"")):c.push(b.nodeValue);else if(b.nodeName in k.dom.PREDEFINED_TAG_VALUES_)c.push(k.dom.PREDEFINED_TAG_VALUES_[b.nodeName]);else for(b=b.firstChild;b;)k.dom.getTextContent_(b,c,d),b=b.nextSibling};k.dom.getNodeTextLength=function(b){return k.dom.getTextContent(b).length};
k.dom.getNodeTextOffset=function(b,c){c=c||k.dom.getOwnerDocument(b).body;for(var d=[];b&&b!=c;){for(var e=b;e=e.previousSibling;)d.unshift(k.dom.getTextContent(e));b=b.parentNode}return k.string.trimLeft(d.join("")).replace(/ +/g," ").length};
k.dom.getNodeAtOffset=function(b,c,d){b=[b];for(var e=0,f=null;0<b.length&&e<c;)if(f=b.pop(),!(f.nodeName in k.dom.TAGS_TO_IGNORE_))if(f.nodeType==k.dom.NodeType.TEXT)var g=f.nodeValue.replace(/(\r\n|\r|\n)/g,"").replace(/ +/g," "),e=e+g.length;else if(f.nodeName in k.dom.PREDEFINED_TAG_VALUES_)e+=k.dom.PREDEFINED_TAG_VALUES_[f.nodeName].length;else for(g=f.childNodes.length-1;0<=g;g--)b.push(f.childNodes[g]);k.isObject(d)&&(d.remainder=f?f.nodeValue.length+c-e-1:0,d.node=f);return f};
k.dom.isNodeList=function(b){if(b&&"number"==typeof b.length){if(k.isObject(b))return"function"==typeof b.item||"string"==typeof b.item;if(k.isFunction(b))return"function"==typeof b.item}return!1};k.dom.getAncestorByTagNameAndClass=function(b,c,d,e){if(!c&&!d)return null;var f=c?String(c).toUpperCase():null;return k.dom.getAncestor(b,function(b){return(!f||b.nodeName==f)&&(!d||k.isString(b.className)&&k.array.contains(b.className.split(/\s+/),d))},!0,e)};
k.dom.getAncestorByClass=function(b,c,d){return k.dom.getAncestorByTagNameAndClass(b,null,c,d)};k.dom.getAncestor=function(b,c,d,e){b&&!d&&(b=b.parentNode);for(d=0;b&&(null==e||d<=e);){k.asserts.assert("parentNode"!=b.name);if(c(b))return b;b=b.parentNode;d++}return null};k.dom.getActiveElement=function(b){try{return b&&b.activeElement}catch(c){}return null};
k.dom.getPixelRatio=function(){var b=k.dom.getWindow();return k.isDef(b.devicePixelRatio)?b.devicePixelRatio:b.matchMedia?k.dom.matchesPixelRatio_(3)||k.dom.matchesPixelRatio_(2)||k.dom.matchesPixelRatio_(1.5)||k.dom.matchesPixelRatio_(1)||.75:1};k.dom.matchesPixelRatio_=function(b){return k.dom.getWindow().matchMedia("(min-resolution: "+b+"dppx),(min--moz-device-pixel-ratio: "+b+"),(min-resolution: "+96*b+"dpi)").matches?b:0};k.dom.getCanvasContext2D=function(b){return b.getContext("2d")};
k.dom.DomHelper=function(b){this.document_=b||k.global.document||document};a=k.dom.DomHelper.prototype;a.getDomHelper=k.dom.getDomHelper;a.getDocument=function(){return this.document_};a.getElement=function(b){return k.dom.getElementHelper_(this.document_,b)};a.getRequiredElement=function(b){return k.dom.getRequiredElementHelper_(this.document_,b)};a.$=k.dom.DomHelper.prototype.getElement;a.getElementsByTagName=function(b,c){return(c||this.document_).getElementsByTagName(String(b))};
a.getElementsByTagNameAndClass=function(b,c,d){return k.dom.getElementsByTagNameAndClass_(this.document_,b,c,d)};a.getElementsByClass=function(b,c){return k.dom.getElementsByClass(b,c||this.document_)};a.getElementByClass=function(b,c){return k.dom.getElementByClass(b,c||this.document_)};a.getRequiredElementByClass=function(b,c){return k.dom.getRequiredElementByClass(b,c||this.document_)};a.$$=k.dom.DomHelper.prototype.getElementsByTagNameAndClass;a.setProperties=k.dom.setProperties;
a.getViewportSize=function(b){return k.dom.getViewportSize(b||this.getWindow())};a.getDocumentHeight=function(){return k.dom.getDocumentHeight_(this.getWindow())};a.createDom=function(b,c,d){return k.dom.createDom_(this.document_,arguments)};a.$dom=k.dom.DomHelper.prototype.createDom;a.createElement=function(b){return k.dom.createElement_(this.document_,b)};a.createTextNode=function(b){return this.document_.createTextNode(String(b))};
a.createTable=function(b,c,d){return k.dom.createTable_(this.document_,b,c,!!d)};a.safeHtmlToNode=function(b){return k.dom.safeHtmlToNode_(this.document_,b)};a.isCss1CompatMode=function(){return k.dom.isCss1CompatMode_(this.document_)};a.getWindow=function(){return k.dom.getWindow_(this.document_)};a.getDocumentScrollElement=function(){return k.dom.getDocumentScrollElement_(this.document_)};a.getDocumentScroll=function(){return k.dom.getDocumentScroll_(this.document_)};
a.getActiveElement=function(b){return k.dom.getActiveElement(b||this.document_)};a.appendChild=k.dom.appendChild;a.append=k.dom.append;a.canHaveChildren=k.dom.canHaveChildren;a.removeChildren=k.dom.removeChildren;a.insertSiblingBefore=k.dom.insertSiblingBefore;a.insertSiblingAfter=k.dom.insertSiblingAfter;a.insertChildAt=k.dom.insertChildAt;a.removeNode=k.dom.removeNode;a.replaceNode=k.dom.replaceNode;a.flattenElement=k.dom.flattenElement;a.getChildren=k.dom.getChildren;a.getFirstElementChild=k.dom.getFirstElementChild;
a.getLastElementChild=k.dom.getLastElementChild;a.getNextElementSibling=k.dom.getNextElementSibling;a.getPreviousElementSibling=k.dom.getPreviousElementSibling;a.getNextNode=k.dom.getNextNode;a.getPreviousNode=k.dom.getPreviousNode;a.isNodeLike=k.dom.isNodeLike;a.isElement=k.dom.isElement;a.isWindow=k.dom.isWindow;a.getParentElement=k.dom.getParentElement;a.contains=k.dom.contains;a.compareNodeOrder=k.dom.compareNodeOrder;a.findCommonAncestor=k.dom.findCommonAncestor;a.getOwnerDocument=k.dom.getOwnerDocument;
a.getFrameContentDocument=k.dom.getFrameContentDocument;a.getFrameContentWindow=k.dom.getFrameContentWindow;a.setTextContent=k.dom.setTextContent;a.getOuterHtml=k.dom.getOuterHtml;a.findNode=k.dom.findNode;a.findNodes=k.dom.findNodes;a.isFocusableTabIndex=k.dom.isFocusableTabIndex;a.setFocusableTabIndex=k.dom.setFocusableTabIndex;a.isFocusable=k.dom.isFocusable;a.getTextContent=k.dom.getTextContent;a.getNodeTextLength=k.dom.getNodeTextLength;a.getNodeTextOffset=k.dom.getNodeTextOffset;
a.getNodeAtOffset=k.dom.getNodeAtOffset;a.isNodeList=k.dom.isNodeList;a.getAncestorByTagNameAndClass=k.dom.getAncestorByTagNameAndClass;a.getAncestorByClass=k.dom.getAncestorByClass;a.getAncestor=k.dom.getAncestor;a.getCanvasContext2D=k.dom.getCanvasContext2D;n.WindowDelegate=function(){k.craw.AppWindowDelegate.call(this);this.isFinishedLaunch_=this.retrieveJwtFailed_=this.transactionStarted_=this.walletIsLoaded_=!1;this.webStoreService_=new n.WebStoreService};k.inherits(n.WindowDelegate,k.craw.AppWindowDelegate);k.craw.AppWindowDelegate.setDefaultImpl();n.WindowDelegate.prototype.getAppUnavailableMessage=function(){return chrome.i18n.getMessage("iap_unavailable")};
n.WindowDelegate.prototype.pollOnlineStatus=function(){if(!window.iapParams_.oauthToken)return chrome.i18n.getMessage("please_sign_in");if(this.retrieveJwtFailed_)return chrome.i18n.getMessage("jwt_retrieve_failed")};n.WindowDelegate.prototype.finishedLaunch=function(){return this.isFinishedLaunch_};
var P=function(b){var c=window.iapParams_;b.isFinishedLaunch_&&c.oauthToken&&b.walletIsLoaded_&&!b.transactionStarted_&&(b.transactionStarted_=!0,k.dom.getDocument().querySelector("webview").contentWindow.postMessage({jwt:window.iapJwt_,parameters:c},"*"))};n.WindowDelegate.prototype.retrieveJwtOnSuccess_=function(b,c,d){window.iapJwt_=b;window.payment_data=c;window.signature=d;this.retrieveJwtFailed_=!1;this.isFinishedLaunch_=!0;P(this)};
n.WindowDelegate.prototype.retrieveJwtOnFailed_=function(){this.isFinishedLaunch_=this.retrieveJwtFailed_=!0};
n.WindowDelegate.prototype.onWindowReady=function(){var b=k.dom.getDocument().querySelector("webview");if(b){b.style.borderTop="1px #eaeaea solid";var c=!1,d=window.iapParams_,e=this,f=function(b){if(window.sku_){var c=window.sku_,d=window.iapParams_||{},f=e.webStoreService_,g=d||{};if("env"in g){switch(g.env){case "prod":f.baseUrl_=n.WebStoreService.Environment.PROD;break;default:f.baseUrl_=n.WebStoreService.Environment.SANDBOX}f.baseUrlAndPath_=f.baseUrl_+n.WebStoreService.WEB_STORE_REQUEST_PATH_}e.retrieveJwtFailed_=
!1;e.isFinishedLaunch_=!1;aa(e.webStoreService_,d.applicationId,c,k.bind(e.retrieveJwtOnSuccess_,e),k.bind(e.retrieveJwtOnFailed_,e),b,d.gl,d.projection)}else e.isFinishedLaunch_=!0,P(e)};d.oauthToken?f(d.oauthToken):chrome.identity.getAuthToken({interactive:!0},function(b){window.iapParams_.oauthToken=b;f(b)});b.addEventListener("contentload",function(){if(!c){c=!0;var e;switch(d.env||"sandbox"){case "prod":e="https://payments.google.com/payments/v4/js/integrator.js";break;default:e="https://sandbox.google.com/payments/v4/js/integrator.js"}b.executeScript({runAt:"document_start",
code:'document.write("<script type=\\"text/javascript\\" src=\\"'+e+"\\\" data-payments-main>\x3c/script><script type=\\\"text/javascript\\\">window.addEventListener('message', function(e) {  if (e.origin != 'chrome-extension://"+chrome.runtime.id+"') return;var mode = payments.business.integration.mashupMode.embedded('renderplace');var bootstrapper = payments.business.integration.bootstrap.asMashupMode(mode);bootstrapper    .usingDefaultActivityStatusChangeHandler()    .usingBaseZIndex(1201)    .usingOnResizeFrameCallback(function() {        var iframe = document.getElementById('renderplaceIframe');        var size = {'width': iframe.clientWidth, 'height': iframe.clientHeight};        e.source.postMessage({resize: size}, e.origin);})    .usingOAuthToken(e.data.parameters.oauthToken)    .usingStyle('pc=#FF0000;ac=#0000FF');var standaloneContextBootstrapper = bootstrapper.inStandaloneContext(    payments.business.integration.standaloneContextAuthId.forGaia());var buyFlowScenario =    standaloneContextBootstrapper.buyFlow(function(res) {        e.source.postMessage({type: 'success', result: res}, e.origin);});buyFlowScenario.withEncryptedParameters(e.data.jwt);buyFlowScenario.load(undefined, function(res) {    e.source.postMessage({type: 'failure', result: res}, e.origin);});}, false);console.log('registered payment listener: ' + Date.now());\x3c/script>&nbsp;\");"},
function(){console.log("did exec once");b.executeScript({runAt:"document_end",code:"document.write(\"<script type=\\\"text/javascript\\\">var elem = document.createElement('div');elem.setAttribute('id', 'renderplace');elem.setAttribute('style', 'margin-left:35px;margin-right:35px;');document.body.appendChild(elem);console.log('finished loading, start payment: ' + Date.now());\x3c/script>\");"})})}},!1);b.addEventListener("consolemessage",function(b){-1!=b.message.indexOf("finished")&&(e.walletIsLoaded_=
!0,P(e))});b.addEventListener("newwindow",function(b){window.open(b.targetUrl);b.window.discard()},!1)}};window.addEventListener("message",function(b){console.log(b);if("type"in b.data)window.purchase_result=b.data.result,window.close();else if("resize"in b.data){var c=chrome.app.window.current(),d=c.getBounds();c.resizeTo(d.width+0,b.data.resize.height+60)}},!1);k.json={};k.json.USE_NATIVE_JSON=!1;k.json.TRY_NATIVE_JSON=!1;k.json.isValid=function(b){return/^\s*$/.test(b)?!1:/^[\],:{}\s\u2028\u2029]*$/.test(b.replace(/\\["\\\/bfnrtu]/g,"@").replace(/(?:"[^"\\\n\r\u2028\u2029\x00-\x08\x0a-\x1f]*"|true|false|null|-?\d+(?:\.\d*)?(?:[eE][+\-]?\d+)?)[\s\u2028\u2029]*(?=:|,|]|}|$)/g,"]").replace(/(?:^|:|,)(?:[\s\u2028\u2029]*\[)+/g,""))};k.json.errorLogger_=k.nullFunction;k.json.setErrorLogger=function(b){k.json.errorLogger_=b};
k.json.parse=k.json.USE_NATIVE_JSON?k.global.JSON.parse:function(b){var c;if(k.json.TRY_NATIVE_JSON)try{return k.global.JSON.parse(b)}catch(e){c=e}b=String(b);if(k.json.isValid(b))try{var d=eval("("+b+")");c&&k.json.errorLogger_("Invalid JSON: "+b,c);return d}catch(e){}throw Error("Invalid JSON string: "+b);};
k.json.unsafeParse=k.json.USE_NATIVE_JSON?k.global.JSON.parse:function(b){var c;if(k.json.TRY_NATIVE_JSON)try{return k.global.JSON.parse(b)}catch(e){c=e}var d=eval("("+b+")");c&&k.json.errorLogger_("Invalid JSON: "+b,c);return d};k.json.serialize=k.json.USE_NATIVE_JSON?k.global.JSON.stringify:function(b,c){return(new k.json.Serializer(c)).serialize(b)};k.json.Serializer=function(b){this.replacer_=b};k.json.Serializer.prototype.serialize=function(b){var c=[];Q(this,b,c);return c.join("")};
var Q=function(b,c,d){if(null==c)d.push("null");else{if("object"==typeof c){if(k.isArray(c)){var e=c;c=e.length;d.push("[");for(var f="",g=0;g<c;g++)d.push(f),f=e[g],Q(b,b.replacer_?b.replacer_.call(e,String(g),f):f,d),f=",";d.push("]");return}if(c instanceof String||c instanceof Number||c instanceof Boolean)c=c.valueOf();else{d.push("{");g="";for(e in c)Object.prototype.hasOwnProperty.call(c,e)&&(f=c[e],"function"!=typeof f&&(d.push(g),R(e,d),d.push(":"),Q(b,b.replacer_?b.replacer_.call(c,e,f):f,
d),g=","));d.push("}");return}}switch(typeof c){case "string":R(c,d);break;case "number":d.push(isFinite(c)&&!isNaN(c)?String(c):"null");break;case "boolean":d.push(String(c));break;case "function":d.push("null");break;default:throw Error("Unknown type: "+typeof c);}}};k.json.Serializer.charToJsonCharCache_={'"':'\\"',"\\":"\\\\","/":"\\/","\b":"\\b","\f":"\\f","\n":"\\n","\r":"\\r","\t":"\\t","\x0B":"\\u000b"};
k.json.Serializer.charsToReplace_=/\uffff/.test("\uffff")?/[\\\"\x00-\x1f\x7f-\uffff]/g:/[\\\"\x00-\x1f\x7f-\xff]/g;var R=function(b,c){c.push('"',b.replace(k.json.Serializer.charsToReplace_,function(b){var c=k.json.Serializer.charToJsonCharCache_[b];c||(c="\\u"+(b.charCodeAt(0)|65536).toString(16).substr(1),k.json.Serializer.charToJsonCharCache_[b]=c);return c}),'"')};k.structs.Collection=function(){};k.structs.Set=function(b){this.map_=new k.structs.Map;b&&this.addAll(b)};k.structs.Set.getKey_=function(b){var c=typeof b;return"object"==c&&b||"function"==c?"o"+k.getUid(b):c.substr(0,1)+b};a=k.structs.Set.prototype;a.getCount=function(){return this.map_.getCount()};a.add=function(b){this.map_.set(k.structs.Set.getKey_(b),b)};a.addAll=function(b){b=k.structs.getValues(b);for(var c=b.length,d=0;d<c;d++)this.add(b[d])};a.removeAll=function(b){b=k.structs.getValues(b);for(var c=b.length,d=0;d<c;d++)this.remove(b[d])};
a.remove=function(b){return this.map_.remove(k.structs.Set.getKey_(b))};a.clear=function(){this.map_.clear()};a.isEmpty=function(){return this.map_.isEmpty()};a.contains=function(b){return this.map_.containsKey(k.structs.Set.getKey_(b))};a.difference=function(b){var c=this.clone();c.removeAll(b);return c};a.getValues=function(){return this.map_.getValues()};a.clone=function(){return new k.structs.Set(this)};a.equals=function(b){return this.getCount()==k.structs.getCount(b)&&ba(this,b)};
var ba=function(b,c){var d=k.structs.getCount(c);if(b.getCount()>d)return!1;!(c instanceof k.structs.Set)&&5<d&&(c=new k.structs.Set(c));return k.structs.every(b,function(b){return k.structs.contains(c,b)})};k.structs.Set.prototype.__iterator__=function(){return this.map_.__iterator__(!1)};k.debug.LOGGING_ENABLED=k.DEBUG;k.debug.FORCE_SLOPPY_STACKS=!1;k.debug.catchErrors=function(b,c,d){d=d||k.global;var e=d.onerror,f=!!c;k.userAgent.WEBKIT&&!k.userAgent.isVersionOrHigher("535.3")&&(f=!f);d.onerror=function(c,d,l,m,p){e&&e(c,d,l,m,p);b({message:c,fileName:d,line:l,col:m,error:p});return f}};k.debug.expose=function(b,c){if("undefined"==typeof b)return"undefined";if(null==b)return"NULL";var d=[],e;for(e in b)if(c||!k.isFunction(b[e])){var f=e+" = ";try{f+=b[e]}catch(g){f+="*** "+g+" ***"}d.push(f)}return d.join("\n")};
k.debug.deepExpose=function(b,c){var d=[],e=function(b,g,h){var f=g+"  ";h=new k.structs.Set(h);try{if(k.isDef(b))if(k.isNull(b))d.push("NULL");else if(k.isString(b))d.push('"'+b.replace(/\n/g,"\n"+g)+'"');else if(k.isFunction(b))d.push(String(b).replace(/\n/g,"\n"+g));else if(k.isObject(b))if(h.contains(b))d.push("*** reference loop detected ***");else{h.add(b);d.push("{");for(var m in b)if(c||!k.isFunction(b[m]))d.push("\n"),d.push(f),d.push(m+" = "),e(b[m],f,h);d.push("\n"+g+"}")}else d.push(b);
else d.push("undefined")}catch(p){d.push("*** "+p+" ***")}};e(b,"",new k.structs.Set);return d.join("")};k.debug.exposeArray=function(b){for(var c=[],d=0;d<b.length;d++)k.isArray(b[d])?c.push(k.debug.exposeArray(b[d])):c.push(b[d]);return"[ "+c.join(", ")+" ]"};k.debug.exposeException=function(b,c){b=k.debug.exposeExceptionAsHtml(b,c);return k.html.SafeHtml.unwrap(b)};
k.debug.exposeExceptionAsHtml=function(b,c){try{var d=k.debug.normalizeErrorObject(b),e=k.debug.createViewSourceUrl_(d.fileName);return k.html.SafeHtml.concat(k.html.SafeHtml.htmlEscapePreservingNewlinesAndSpaces("Message: "+d.message+"\nUrl: "),k.html.SafeHtml.create("a",{href:e,target:"_new"},d.fileName),k.html.SafeHtml.htmlEscapePreservingNewlinesAndSpaces("\nLine: "+d.lineNumber+"\n\nBrowser stack:\n"+d.stack+"-> [end]\n\nJS stack traversal:\n"+k.debug.getStacktrace(c)+"-> "))}catch(f){return k.html.SafeHtml.htmlEscapePreservingNewlinesAndSpaces("Exception trying to expose exception! You win, we lose. "+
f)}};k.debug.createViewSourceUrl_=function(b){k.isDefAndNotNull(b)||(b="");if(!/^https?:\/\//i.test(b))return k.html.SafeUrl.fromConstant(k.string.Const.from("sanitizedviewsrc"));b=k.html.SafeUrl.sanitize(b);return k.html.uncheckedconversions.safeUrlFromStringKnownToSatisfyTypeContract(k.string.Const.from("view-source scheme plus HTTP/HTTPS URL"),"view-source:"+k.html.SafeUrl.unwrap(b))};
k.debug.normalizeErrorObject=function(b){var c=k.getObjectByName("window.location.href");if(k.isString(b))return{message:b,name:"Unknown error",lineNumber:"Not available",fileName:c,stack:"Not available"};var d,e,f=!1;try{d=b.lineNumber||b.line||"Not available"}catch(g){d="Not available",f=!0}try{e=b.fileName||b.filename||b.sourceURL||k.global.$googDebugFname||c}catch(g){e="Not available",f=!0}return!f&&b.lineNumber&&b.fileName&&b.stack&&b.message&&b.name?b:{message:b.message||"Not available",name:b.name||
"UnknownError",lineNumber:d,fileName:e,stack:b.stack||"Not available"}};k.debug.enhanceError=function(b,c){b instanceof Error||(b=Error(b),Error.captureStackTrace&&Error.captureStackTrace(b,k.debug.enhanceError));b.stack||(b.stack=k.debug.getStacktrace(k.debug.enhanceError));if(c){for(var d=0;b["message"+d];)++d;b["message"+d]=String(c)}return b};
k.debug.getStacktraceSimple=function(b){if(!k.debug.FORCE_SLOPPY_STACKS){var c=k.debug.getNativeStackTrace_(k.debug.getStacktraceSimple);if(c)return c}for(var c=[],d=arguments.callee.caller,e=0;d&&(!b||e<b);){c.push(k.debug.getFunctionName(d));c.push("()\n");try{d=d.caller}catch(f){c.push("[exception trying to get caller]\n");break}e++;if(e>=k.debug.MAX_STACK_DEPTH){c.push("[...long stack...]");break}}b&&e>=b?c.push("[...reached max depth limit...]"):c.push("[end]");return c.join("")};
k.debug.MAX_STACK_DEPTH=50;k.debug.getNativeStackTrace_=function(b){var c=Error();if(Error.captureStackTrace)return Error.captureStackTrace(c,b),String(c.stack);try{throw c;}catch(d){c=d}return(b=c.stack)?String(b):null};k.debug.getStacktrace=function(b){var c;k.debug.FORCE_SLOPPY_STACKS||(c=k.debug.getNativeStackTrace_(b||k.debug.getStacktrace));c||(c=k.debug.getStacktraceHelper_(b||arguments.callee.caller,[]));return c};
k.debug.getStacktraceHelper_=function(b,c){var d=[];if(k.array.contains(c,b))d.push("[...circular reference...]");else if(b&&c.length<k.debug.MAX_STACK_DEPTH){d.push(k.debug.getFunctionName(b)+"(");for(var e=b.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=k.debug.getFunctionName(g))?g:"[fn]";break;default:g=typeof g}40<
g.length&&(g=g.substr(0,40)+"...");d.push(g)}c.push(b);d.push(")\n");try{d.push(k.debug.getStacktraceHelper_(b.caller,c))}catch(h){d.push("[exception trying to get caller]\n")}}else b?d.push("[...long stack...]"):d.push("[end]");return d.join("")};k.debug.setFunctionResolver=function(b){k.debug.fnNameResolver_=b};
k.debug.getFunctionName=function(b){if(k.debug.fnNameCache_[b])return k.debug.fnNameCache_[b];if(k.debug.fnNameResolver_){var c=k.debug.fnNameResolver_(b);if(c)return k.debug.fnNameCache_[b]=c}b=String(b);k.debug.fnNameCache_[b]||(c=/function ([^\(]+)/.exec(b),k.debug.fnNameCache_[b]=c?c[1]:"[Anonymous]");return k.debug.fnNameCache_[b]};k.debug.makeWhitespaceVisible=function(b){return b.replace(/ /g,"[_]").replace(/\f/g,"[f]").replace(/\n/g,"[n]\n").replace(/\r/g,"[r]").replace(/\t/g,"[t]")};
k.debug.runtimeType=function(b){return b instanceof Function?b.displayName||b.name||"unknown type name":b instanceof Object?b.constructor.displayName||b.constructor.name||Object.prototype.toString.call(b):null===b?"null":typeof b};k.debug.fnNameCache_={};k.debug.LogRecord=function(b,c,d,e,f){this.reset(b,c,d,e,f)};k.debug.LogRecord.prototype.exception_=null;k.debug.LogRecord.ENABLE_SEQUENCE_NUMBERS=!0;k.debug.LogRecord.nextSequenceNumber_=0;k.debug.LogRecord.prototype.reset=function(b,c,d,e,f){k.debug.LogRecord.ENABLE_SEQUENCE_NUMBERS&&("number"==typeof f||k.debug.LogRecord.nextSequenceNumber_++);e||k.now();this.level_=b;this.msg_=c;delete this.exception_};k.debug.LogRecord.prototype.setLevel=function(b){this.level_=b};
k.debug.LogRecord.prototype.getMessage=function(){return this.msg_};k.debug.LogBuffer=function(){k.asserts.assert(k.debug.LogBuffer.isBufferingEnabled(),"Cannot use goog.debug.LogBuffer without defining goog.debug.LogBuffer.CAPACITY.");this.clear()};k.debug.LogBuffer.getInstance=function(){k.debug.LogBuffer.instance_||(k.debug.LogBuffer.instance_=new k.debug.LogBuffer);return k.debug.LogBuffer.instance_};k.debug.LogBuffer.CAPACITY=0;k.debug.LogBuffer.isBufferingEnabled=function(){return 0<k.debug.LogBuffer.CAPACITY};
k.debug.LogBuffer.prototype.clear=function(){this.buffer_=Array(k.debug.LogBuffer.CAPACITY);this.curIndex_=-1;this.isFull_=!1};k.debug.Logger=function(b){this.name_=b;this.handlers_=this.children_=this.level_=this.parent_=null};k.debug.Logger.ROOT_LOGGER_NAME="";k.debug.Logger.ENABLE_HIERARCHY=!0;k.debug.Logger.ENABLE_HIERARCHY||(k.debug.Logger.rootHandlers_=[]);k.debug.Logger.Level=function(b,c){this.name=b;this.value=c};k.debug.Logger.Level.prototype.toString=function(){return this.name};k.debug.Logger.Level.OFF=new k.debug.Logger.Level("OFF",Infinity);k.debug.Logger.Level.SHOUT=new k.debug.Logger.Level("SHOUT",1200);
k.debug.Logger.Level.SEVERE=new k.debug.Logger.Level("SEVERE",1E3);k.debug.Logger.Level.WARNING=new k.debug.Logger.Level("WARNING",900);k.debug.Logger.Level.INFO=new k.debug.Logger.Level("INFO",800);k.debug.Logger.Level.CONFIG=new k.debug.Logger.Level("CONFIG",700);k.debug.Logger.Level.FINE=new k.debug.Logger.Level("FINE",500);k.debug.Logger.Level.FINER=new k.debug.Logger.Level("FINER",400);k.debug.Logger.Level.FINEST=new k.debug.Logger.Level("FINEST",300);
k.debug.Logger.Level.ALL=new k.debug.Logger.Level("ALL",0);k.debug.Logger.Level.PREDEFINED_LEVELS=[k.debug.Logger.Level.OFF,k.debug.Logger.Level.SHOUT,k.debug.Logger.Level.SEVERE,k.debug.Logger.Level.WARNING,k.debug.Logger.Level.INFO,k.debug.Logger.Level.CONFIG,k.debug.Logger.Level.FINE,k.debug.Logger.Level.FINER,k.debug.Logger.Level.FINEST,k.debug.Logger.Level.ALL];k.debug.Logger.Level.predefinedLevelsCache_=null;
k.debug.Logger.Level.createPredefinedLevelsCache_=function(){k.debug.Logger.Level.predefinedLevelsCache_={};for(var b=0,c;c=k.debug.Logger.Level.PREDEFINED_LEVELS[b];b++)k.debug.Logger.Level.predefinedLevelsCache_[c.value]=c,k.debug.Logger.Level.predefinedLevelsCache_[c.name]=c};k.debug.Logger.Level.getPredefinedLevel=function(b){k.debug.Logger.Level.predefinedLevelsCache_||k.debug.Logger.Level.createPredefinedLevelsCache_();return k.debug.Logger.Level.predefinedLevelsCache_[b]||null};
k.debug.Logger.Level.getPredefinedLevelByValue=function(b){k.debug.Logger.Level.predefinedLevelsCache_||k.debug.Logger.Level.createPredefinedLevelsCache_();if(b in k.debug.Logger.Level.predefinedLevelsCache_)return k.debug.Logger.Level.predefinedLevelsCache_[b];for(var c=0;c<k.debug.Logger.Level.PREDEFINED_LEVELS.length;++c){var d=k.debug.Logger.Level.PREDEFINED_LEVELS[c];if(d.value<=b)return d}return null};k.debug.Logger.getLogger=function(b){return k.debug.LogManager.getLogger(b)};
k.debug.Logger.logToProfilers=function(b){k.global.console&&(k.global.console.timeStamp?k.global.console.timeStamp(b):k.global.console.markTimeline&&k.global.console.markTimeline(b));k.global.msWriteProfilerMark&&k.global.msWriteProfilerMark(b)};a=k.debug.Logger.prototype;
a.addHandler=function(b){k.debug.LOGGING_ENABLED&&(k.debug.Logger.ENABLE_HIERARCHY?(this.handlers_||(this.handlers_=[]),this.handlers_.push(b)):(k.asserts.assert(!this.name_,"Cannot call addHandler on a non-root logger when goog.debug.Logger.ENABLE_HIERARCHY is false."),k.debug.Logger.rootHandlers_.push(b)))};a.removeHandler=function(b){if(k.debug.LOGGING_ENABLED){var c=k.debug.Logger.ENABLE_HIERARCHY?this.handlers_:k.debug.Logger.rootHandlers_;return!!c&&k.array.remove(c,b)}return!1};
a.getParent=function(){return this.parent_};a.getChildren=function(){this.children_||(this.children_={});return this.children_};a.setLevel=function(b){k.debug.LOGGING_ENABLED&&(k.debug.Logger.ENABLE_HIERARCHY?this.level_=b:(k.asserts.assert(!this.name_,"Cannot call setLevel() on a non-root logger when goog.debug.Logger.ENABLE_HIERARCHY is false."),k.debug.Logger.rootLevel_=b))};
var ca=function(b){if(!k.debug.LOGGING_ENABLED)return k.debug.Logger.Level.OFF;if(!k.debug.Logger.ENABLE_HIERARCHY)return k.debug.Logger.rootLevel_;if(b.level_)return b.level_;if(b.parent_)return ca(b.parent_);k.asserts.fail("Root logger has no level set.");return null};
k.debug.Logger.prototype.log=function(b,c,d){if(k.debug.LOGGING_ENABLED&&k.debug.LOGGING_ENABLED&&b.value>=ca(this).value){k.isFunction(c)&&(c=c());if(k.debug.LogBuffer.isBufferingEnabled()){var e=k.debug.LogBuffer.getInstance(),f=this.name_,g=(e.curIndex_+1)%k.debug.LogBuffer.CAPACITY;e.curIndex_=g;e.isFull_?(e=e.buffer_[g],e.reset(b,c,f),b=e):(e.isFull_=g==k.debug.LogBuffer.CAPACITY-1,b=e.buffer_[g]=new k.debug.LogRecord(b,c,f))}else b=new k.debug.LogRecord(b,String(c),this.name_);d&&(b.exception_=
d);k.debug.Logger.logToProfilers("log:"+b.getMessage());if(k.debug.Logger.ENABLE_HIERARCHY)for(d=this;d;){f=d;e=b;if(f.handlers_)for(g=0;c=f.handlers_[g];g++)c(e);d=d.getParent()}else for(d=0;c=k.debug.Logger.rootHandlers_[d++];)c(b)}};k.debug.Logger.prototype.warning=function(b,c){k.debug.LOGGING_ENABLED&&this.log(k.debug.Logger.Level.WARNING,b,c)};k.debug.Logger.prototype.info=function(b,c){k.debug.LOGGING_ENABLED&&this.log(k.debug.Logger.Level.INFO,b,c)};
k.debug.Logger.prototype.fine=function(b,c){k.debug.LOGGING_ENABLED&&this.log(k.debug.Logger.Level.FINE,b,c)};k.debug.LogManager={};k.debug.LogManager.loggers_={};k.debug.LogManager.rootLogger_=null;k.debug.LogManager.initialize=function(){k.debug.LogManager.rootLogger_||(k.debug.LogManager.rootLogger_=new k.debug.Logger(k.debug.Logger.ROOT_LOGGER_NAME),k.debug.LogManager.loggers_[k.debug.Logger.ROOT_LOGGER_NAME]=k.debug.LogManager.rootLogger_,k.debug.LogManager.rootLogger_.setLevel(k.debug.Logger.Level.CONFIG))};
k.debug.LogManager.getLoggers=function(){return k.debug.LogManager.loggers_};k.debug.LogManager.getRoot=function(){k.debug.LogManager.initialize();return k.debug.LogManager.rootLogger_};k.debug.LogManager.getLogger=function(b){k.debug.LogManager.initialize();return k.debug.LogManager.loggers_[b]||k.debug.LogManager.createLogger_(b)};
k.debug.LogManager.createFunctionForCatchErrors=function(b){return function(c){var d=b||k.debug.LogManager.getRoot();k.debug.LOGGING_ENABLED&&d.log(k.debug.Logger.Level.SEVERE,"Error: "+c.message+" ("+c.fileName+" @ Line: "+c.line+")",void 0)}};
k.debug.LogManager.createLogger_=function(b){var c=new k.debug.Logger(b);if(k.debug.Logger.ENABLE_HIERARCHY){var d=b.lastIndexOf("."),e=b.substr(d+1),d=k.debug.LogManager.getLogger(b.substr(0,d));d.getChildren()[e]=c;c.parent_=d}return k.debug.LogManager.loggers_[b]=c};k.log={};k.log.ENABLED=k.debug.LOGGING_ENABLED;k.log.ROOT_LOGGER_NAME=k.debug.Logger.ROOT_LOGGER_NAME;k.log.Logger=k.debug.Logger;k.log.Level=k.debug.Logger.Level;k.log.LogRecord=k.debug.LogRecord;k.log.getLogger=function(b,c){return k.log.ENABLED?(b=k.debug.LogManager.getLogger(b),c&&b&&b.setLevel(c),b):null};k.log.addHandler=function(b,c){k.log.ENABLED&&b&&b.addHandler(c)};k.log.removeHandler=function(b,c){return k.log.ENABLED&&b?b.removeHandler(c):!1};
k.log.log=function(b,c,d,e){k.log.ENABLED&&b&&b.log(c,d,e)};k.log.error=function(b,c,d){k.log.ENABLED&&b&&k.debug.LOGGING_ENABLED&&b.log(k.debug.Logger.Level.SEVERE,c,d)};k.log.warning=function(b,c,d){k.log.ENABLED&&b&&b.warning(c,d)};k.log.info=function(b,c,d){k.log.ENABLED&&b&&b.info(c,d)};k.log.fine=function(b,c,d){k.log.ENABLED&&b&&b.fine(c,d)};k.async={};k.async.FreeList=function(b,c,d){this.limit_=d;this.create_=b;this.reset_=c;this.occupants_=0;this.head_=null};k.async.FreeList.prototype.get=function(){var b;0<this.occupants_?(this.occupants_--,b=this.head_,this.head_=b.next,b.next=null):b=this.create_();return b};k.async.FreeList.prototype.put=function(b){this.reset_(b);this.occupants_<this.limit_&&(this.occupants_++,b.next=this.head_,this.head_=b)};k.async.throwException=function(b){k.global.setTimeout(function(){throw b;},0)};k.async.nextTick=function(b,c,d){var e=b;c&&(e=k.bind(b,c));e=k.async.nextTick.wrapCallback_(e);k.isFunction(k.global.setImmediate)&&(d||k.async.nextTick.useSetImmediate_())?k.global.setImmediate(e):(k.async.nextTick.setImmediate_||(k.async.nextTick.setImmediate_=k.async.nextTick.getSetImmediateEmulator_()),k.async.nextTick.setImmediate_(e))};
k.async.nextTick.useSetImmediate_=function(){return k.global.Window&&k.global.Window.prototype&&!k.labs.userAgent.browser.isEdge()&&k.global.Window.prototype.setImmediate==k.global.setImmediate?!1:!0};
k.async.nextTick.getSetImmediateEmulator_=function(){var b=k.global.MessageChannel;"undefined"===typeof b&&"undefined"!==typeof window&&window.postMessage&&window.addEventListener&&!k.labs.userAgent.engine.isPresto()&&(b=function(){var b=document.createElement("IFRAME");b.style.display="none";b.src="";document.documentElement.appendChild(b);var c=b.contentWindow,b=c.document;b.open();b.write("");b.close();var d="callImmediate"+Math.random(),e="file:"==c.location.protocol?"*":c.location.protocol+"//"+
c.location.host,b=k.bind(function(b){if(("*"==e||b.origin==e)&&b.data==d)this.port1.onmessage()},this);c.addEventListener("message",b,!1);this.port1={};this.port2={postMessage:function(){c.postMessage(d,e)}}});if("undefined"!==typeof b&&!k.labs.userAgent.browser.isIE()){var c=new b,d={},e=d;c.port1.onmessage=function(){if(k.isDef(d.next)){d=d.next;var b=d.cb;d.cb=null;b()}};return function(b){e.next={cb:b};e=e.next;c.port2.postMessage(0)}}return"undefined"!==typeof document&&"onreadystatechange"in
document.createElement("SCRIPT")?function(b){var c=document.createElement("SCRIPT");c.onreadystatechange=function(){c.onreadystatechange=null;c.parentNode.removeChild(c);c=null;b();b=null};document.documentElement.appendChild(c)}:function(b){k.global.setTimeout(b,0)}};k.async.nextTick.wrapCallback_=k.functions.identity;k.debug.entryPointRegistry.register(function(b){k.async.nextTick.wrapCallback_=b});k.async.WorkQueue=function(){this.workTail_=this.workHead_=null};k.async.WorkQueue.DEFAULT_MAX_UNUSED=100;k.async.WorkQueue.freelist_=new k.async.FreeList(function(){return new k.async.WorkItem},function(b){b.reset()},k.async.WorkQueue.DEFAULT_MAX_UNUSED);k.async.WorkQueue.prototype.add=function(b,c){var d=k.async.WorkQueue.freelist_.get();d.set(b,c);this.workTail_?this.workTail_.next=d:(k.asserts.assert(!this.workHead_),this.workHead_=d);this.workTail_=d};
k.async.WorkQueue.prototype.remove=function(){var b=null;this.workHead_&&(b=this.workHead_,this.workHead_=this.workHead_.next,this.workHead_||(this.workTail_=null),b.next=null);return b};k.async.WorkItem=function(){this.next=this.scope=this.fn=null};k.async.WorkItem.prototype.set=function(b,c){this.fn=b;this.scope=c;this.next=null};k.async.WorkItem.prototype.reset=function(){this.next=this.scope=this.fn=null};k.async.run=function(b,c){k.async.run.schedule_||k.async.run.initializeRunner_();k.async.run.workQueueScheduled_||(k.async.run.schedule_(),k.async.run.workQueueScheduled_=!0);k.async.run.workQueue_.add(b,c)};k.async.run.initializeRunner_=function(){if(-1!=String(k.global.Promise).indexOf("[native code]")){var b=k.global.Promise.resolve(void 0);k.async.run.schedule_=function(){b.then(k.async.run.processWorkQueue)}}else k.async.run.schedule_=function(){k.async.nextTick(k.async.run.processWorkQueue)}};
k.async.run.forceNextTick=function(b){k.async.run.schedule_=function(){k.async.nextTick(k.async.run.processWorkQueue);b&&b(k.async.run.processWorkQueue)}};k.async.run.workQueueScheduled_=!1;k.async.run.workQueue_=new k.async.WorkQueue;k.DEBUG&&(k.async.run.resetQueue=function(){k.async.run.workQueueScheduled_=!1;k.async.run.workQueue_=new k.async.WorkQueue});
k.async.run.processWorkQueue=function(){for(var b;b=k.async.run.workQueue_.remove();){try{b.fn.call(b.scope)}catch(c){k.async.throwException(c)}k.async.WorkQueue.freelist_.put(b)}k.async.run.workQueueScheduled_=!1};k.promise={};k.promise.Resolver=function(){};k.Thenable=function(){};k.Thenable.prototype.then=function(){};k.Thenable.IMPLEMENTED_BY_PROP="$goog_Thenable";k.Thenable.addImplementation=function(b){b.prototype.then=b.prototype.then;b.prototype[k.Thenable.IMPLEMENTED_BY_PROP]=!0};k.Thenable.isImplementedBy=function(b){if(!b)return!1;try{return!!b[k.Thenable.IMPLEMENTED_BY_PROP]}catch(c){return!1}};k.Promise=function(b,c){this.state_=k.Promise.State_.PENDING;this.result_=void 0;this.callbackEntriesTail_=this.callbackEntries_=this.parent_=null;this.executing_=!1;0<k.Promise.UNHANDLED_REJECTION_DELAY?this.unhandledRejectionId_=0:0==k.Promise.UNHANDLED_REJECTION_DELAY&&(this.hadUnhandledRejection_=!1);k.Promise.LONG_STACK_TRACES&&(this.stack_=[],S(this,Error("created")),this.currentStep_=0);if(b!=k.nullFunction)try{var d=this;b.call(c,function(b){T(d,k.Promise.State_.FULFILLED,b)},function(b){if(k.DEBUG&&
!(b instanceof k.Promise.CancellationError))try{if(b instanceof Error)throw b;throw Error("Promise rejected.");}catch(f){}T(d,k.Promise.State_.REJECTED,b)})}catch(e){T(this,k.Promise.State_.REJECTED,e)}};k.Promise.LONG_STACK_TRACES=!1;k.Promise.UNHANDLED_REJECTION_DELAY=0;k.Promise.State_={PENDING:0,BLOCKED:1,FULFILLED:2,REJECTED:3};k.Promise.CallbackEntry_=function(){this.next=this.context=this.onRejected=this.onFulfilled=this.child=null;this.always=!1};
k.Promise.CallbackEntry_.prototype.reset=function(){this.context=this.onRejected=this.onFulfilled=this.child=null;this.always=!1};k.Promise.DEFAULT_MAX_UNUSED=100;k.Promise.freelist_=new k.async.FreeList(function(){return new k.Promise.CallbackEntry_},function(b){b.reset()},k.Promise.DEFAULT_MAX_UNUSED);k.Promise.getCallbackEntry_=function(b,c,d){var e=k.Promise.freelist_.get();e.onFulfilled=b;e.onRejected=c;e.context=d;return e};k.Promise.returnEntry_=function(b){k.Promise.freelist_.put(b)};
k.Promise.resolve=function(b){if(b instanceof k.Promise)return b;var c=new k.Promise(k.nullFunction);T(c,k.Promise.State_.FULFILLED,b);return c};k.Promise.reject=function(b){return new k.Promise(function(c,d){d(b)})};k.Promise.resolveThen_=function(b,c,d){k.Promise.maybeThen_(b,c,d,null)||k.async.run(k.partial(c,b))};k.Promise.race=function(b){return new k.Promise(function(c,d){b.length||c(void 0);for(var e=0,f;e<b.length;e++)f=b[e],k.Promise.resolveThen_(f,c,d)})};
k.Promise.all=function(b){return new k.Promise(function(c,d){var e=b.length,f=[];if(e)for(var g=function(b,d){e--;f[b]=d;0==e&&c(f)},h=function(b){d(b)},l=0,m;l<b.length;l++)m=b[l],k.Promise.resolveThen_(m,k.partial(g,l),h);else c(f)})};
k.Promise.allSettled=function(b){return new k.Promise(function(c){var d=b.length,e=[];if(d)for(var f=function(b,f,g){d--;e[b]=f?{fulfilled:!0,value:g}:{fulfilled:!1,reason:g};0==d&&c(e)},g=0,h;g<b.length;g++)h=b[g],k.Promise.resolveThen_(h,k.partial(f,g,!0),k.partial(f,g,!1));else c(e)})};
k.Promise.firstFulfilled=function(b){return new k.Promise(function(c,d){var e=b.length,f=[];if(e)for(var g=function(b){c(b)},h=function(b,c){e--;f[b]=c;0==e&&d(f)},l=0,m;l<b.length;l++)m=b[l],k.Promise.resolveThen_(m,g,k.partial(h,l));else c(void 0)})};k.Promise.withResolver=function(){var b,c,d=new k.Promise(function(d,f){b=d;c=f});return new k.Promise.Resolver_(d,b,c)};
k.Promise.prototype.then=function(b,c,d){null!=b&&k.asserts.assertFunction(b,"opt_onFulfilled should be a function.");null!=c&&k.asserts.assertFunction(c,"opt_onRejected should be a function. Did you pass opt_context as the second argument instead of the third?");k.Promise.LONG_STACK_TRACES&&S(this,Error("then"));return da(this,k.isFunction(b)?b:null,k.isFunction(c)?c:null,d)};k.Thenable.addImplementation(k.Promise);
var ea=function(b,c){k.Promise.LONG_STACK_TRACES&&S(b,Error("thenCatch"));return da(b,null,c,void 0)},ga=function(b,c){b.callbackEntries_||b.state_!=k.Promise.State_.FULFILLED&&b.state_!=k.Promise.State_.REJECTED||fa(b);k.asserts.assert(null!=c.onFulfilled);b.callbackEntriesTail_?b.callbackEntriesTail_.next=c:b.callbackEntries_=c;b.callbackEntriesTail_=c},da=function(b,c,d,e){var f=k.Promise.getCallbackEntry_(null,null,null);f.child=new k.Promise(function(b,h){f.onFulfilled=c?function(d){try{var f=
c.call(e,d);b(f)}catch(p){h(p)}}:b;f.onRejected=d?function(c){try{var f=d.call(e,c);!k.isDef(f)&&c instanceof k.Promise.CancellationError?h(c):b(f)}catch(p){h(p)}}:h});f.child.parent_=b;ga(b,f);return f.child};k.Promise.prototype.unblockAndFulfill_=function(b){k.asserts.assert(this.state_==k.Promise.State_.BLOCKED);this.state_=k.Promise.State_.PENDING;T(this,k.Promise.State_.FULFILLED,b)};
k.Promise.prototype.unblockAndReject_=function(b){k.asserts.assert(this.state_==k.Promise.State_.BLOCKED);this.state_=k.Promise.State_.PENDING;T(this,k.Promise.State_.REJECTED,b)};
var T=function(b,c,d){b.state_==k.Promise.State_.PENDING&&(b===d&&(c=k.Promise.State_.REJECTED,d=new TypeError("Promise cannot resolve to itself")),b.state_=k.Promise.State_.BLOCKED,k.Promise.maybeThen_(d,b.unblockAndFulfill_,b.unblockAndReject_,b)||(b.result_=d,b.state_=c,b.parent_=null,fa(b),c!=k.Promise.State_.REJECTED||d instanceof k.Promise.CancellationError||k.Promise.addUnhandledRejection_(b,d)))};
k.Promise.maybeThen_=function(b,c,d,e){if(b instanceof k.Promise)return null!=c&&k.asserts.assertFunction(c,"opt_onFulfilled should be a function."),null!=d&&k.asserts.assertFunction(d,"opt_onRejected should be a function. Did you pass opt_context as the second argument instead of the third?"),k.Promise.LONG_STACK_TRACES&&S(b,Error("then")),ga(b,k.Promise.getCallbackEntry_(c||k.nullFunction,d||null,e)),!0;if(k.Thenable.isImplementedBy(b))return b.then(c,d,e),!0;if(k.isObject(b))try{var f=b.then;if(k.isFunction(f))return k.Promise.tryThen_(b,
f,c,d,e),!0}catch(g){return d.call(e,g),!0}return!1};k.Promise.tryThen_=function(b,c,d,e,f){var g=!1,h=function(b){g||(g=!0,d.call(f,b))},l=function(b){g||(g=!0,e.call(f,b))};try{c.call(b,h,l)}catch(m){l(m)}};var fa=function(b){b.executing_||(b.executing_=!0,k.async.run(b.executeCallbacks_,b))},ha=function(b){var c=null;b.callbackEntries_&&(c=b.callbackEntries_,b.callbackEntries_=c.next,c.next=null);b.callbackEntries_||(b.callbackEntriesTail_=null);null!=c&&k.asserts.assert(null!=c.onFulfilled);return c};
k.Promise.prototype.executeCallbacks_=function(){for(var b;b=ha(this);){k.Promise.LONG_STACK_TRACES&&this.currentStep_++;var c=this.state_,d=this.result_;if(c==k.Promise.State_.REJECTED&&b.onRejected&&!b.always)if(0<k.Promise.UNHANDLED_REJECTION_DELAY)for(var e=this;e&&e.unhandledRejectionId_;e=e.parent_)k.global.clearTimeout(e.unhandledRejectionId_),e.unhandledRejectionId_=0;else if(0==k.Promise.UNHANDLED_REJECTION_DELAY)for(e=this;e&&e.hadUnhandledRejection_;e=e.parent_)e.hadUnhandledRejection_=
!1;if(b.child)b.child.parent_=null,k.Promise.invokeCallback_(b,c,d);else try{b.always?b.onFulfilled.call(b.context):k.Promise.invokeCallback_(b,c,d)}catch(f){k.Promise.handleRejection_.call(null,f)}k.Promise.returnEntry_(b)}this.executing_=!1};k.Promise.invokeCallback_=function(b,c,d){c==k.Promise.State_.FULFILLED?b.onFulfilled.call(b.context,d):b.onRejected&&b.onRejected.call(b.context,d)};
var S=function(b,c){if(k.Promise.LONG_STACK_TRACES&&k.isString(c.stack)){var d=c.stack.split("\n",4)[3];c=c.message;c+=Array(11-c.length).join(" ");b.stack_.push(c+d)}},ia=function(b,c){if(k.Promise.LONG_STACK_TRACES&&c&&k.isString(c.stack)&&b.stack_.length){for(var d=["Promise trace:"],e=b;e;e=e.parent_){for(var f=b.currentStep_;0<=f;f--)d.push(e.stack_[f]);d.push("Value: ["+(e.state_==k.Promise.State_.REJECTED?"REJECTED":"FULFILLED")+"] <"+String(e.result_)+">")}c.stack+="\n\n"+d.join("\n")}};
k.Promise.addUnhandledRejection_=function(b,c){0<k.Promise.UNHANDLED_REJECTION_DELAY?b.unhandledRejectionId_=k.global.setTimeout(function(){ia(b,c);k.Promise.handleRejection_.call(null,c)},k.Promise.UNHANDLED_REJECTION_DELAY):0==k.Promise.UNHANDLED_REJECTION_DELAY&&(b.hadUnhandledRejection_=!0,k.async.run(function(){b.hadUnhandledRejection_&&(ia(b,c),k.Promise.handleRejection_.call(null,c))}))};k.Promise.handleRejection_=k.async.throwException;
k.Promise.setUnhandledRejectionHandler=function(b){k.Promise.handleRejection_=b};k.Promise.CancellationError=function(b){k.debug.Error.call(this,b)};k.inherits(k.Promise.CancellationError,k.debug.Error);k.Promise.CancellationError.prototype.name="cancel";k.Promise.Resolver_=function(b,c,d){this.promise=b;this.resolve=c;this.reject=d};k.Timer=function(b,c){k.events.EventTarget.call(this);this.interval_=b||1;this.timerObject_=c||k.Timer.defaultTimerObject;this.boundTick_=k.bind(this.tick_,this);this.last_=k.now()};k.inherits(k.Timer,k.events.EventTarget);k.Timer.MAX_TIMEOUT_=2147483647;k.Timer.INVALID_TIMEOUT_ID_=-1;k.Timer.prototype.enabled=!1;k.Timer.defaultTimerObject=k.global;k.Timer.intervalScale=.8;k.Timer.prototype.timer_=null;
k.Timer.prototype.tick_=function(){if(this.enabled){var b=k.now()-this.last_;0<b&&b<this.interval_*k.Timer.intervalScale?this.timer_=this.timerObject_.setTimeout(this.boundTick_,this.interval_-b):(this.timer_&&(this.timerObject_.clearTimeout(this.timer_),this.timer_=null),this.dispatchEvent(k.Timer.TICK),this.enabled&&(this.timer_=this.timerObject_.setTimeout(this.boundTick_,this.interval_),this.last_=k.now()))}};
k.Timer.prototype.stop=function(){this.enabled=!1;this.timer_&&(this.timerObject_.clearTimeout(this.timer_),this.timer_=null)};k.Timer.prototype.disposeInternal=function(){k.Timer.superClass_.disposeInternal.call(this);this.stop();delete this.timerObject_};k.Timer.TICK="tick";
k.Timer.callOnce=function(b,c,d){if(k.isFunction(b))d&&(b=k.bind(b,d));else if(b&&"function"==typeof b.handleEvent)b=k.bind(b.handleEvent,b);else throw Error("Invalid listener argument");return Number(c)>k.Timer.MAX_TIMEOUT_?k.Timer.INVALID_TIMEOUT_ID_:k.Timer.defaultTimerObject.setTimeout(b,c||0)};k.Timer.clear=function(b){k.Timer.defaultTimerObject.clearTimeout(b)};
k.Timer.promise=function(b,c){var d=null;return ea(new k.Promise(function(e,f){d=k.Timer.callOnce(function(){e(c)},b);d==k.Timer.INVALID_TIMEOUT_ID_&&f(Error("Failed to schedule timer."))}),function(b){k.Timer.clear(d);throw b;})};k.net={};k.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};
k.net.ErrorCode.getDebugMessage=function(b){switch(b){case k.net.ErrorCode.NO_ERROR:return"No Error";case k.net.ErrorCode.ACCESS_DENIED:return"Access denied to content document";case k.net.ErrorCode.FILE_NOT_FOUND:return"File not found";case k.net.ErrorCode.FF_SILENT_ERROR:return"Firefox silently errored";case k.net.ErrorCode.CUSTOM_ERROR:return"Application custom error";case k.net.ErrorCode.EXCEPTION:return"An exception occurred";case k.net.ErrorCode.HTTP_ERROR:return"Http response at 400 or 500 level";
case k.net.ErrorCode.ABORT:return"Request was aborted";case k.net.ErrorCode.TIMEOUT:return"Request timed out";case k.net.ErrorCode.OFFLINE:return"The resource is not available offline";default:return"Unrecognized error code"}};k.net.EventType={COMPLETE:"complete",SUCCESS:"success",ERROR:"error",ABORT:"abort",READY:"ready",READY_STATE_CHANGE:"readystatechange",TIMEOUT:"timeout",INCREMENTAL_DATA:"incrementaldata",PROGRESS:"progress",DOWNLOAD_PROGRESS:"downloadprogress",UPLOAD_PROGRESS:"uploadprogress"};k.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,PRECONDITION_REQUIRED:428,TOO_MANY_REQUESTS:429,REQUEST_HEADER_FIELDS_TOO_LARGE:431,INTERNAL_SERVER_ERROR:500,NOT_IMPLEMENTED:501,BAD_GATEWAY:502,SERVICE_UNAVAILABLE:503,GATEWAY_TIMEOUT:504,HTTP_VERSION_NOT_SUPPORTED:505,NETWORK_AUTHENTICATION_REQUIRED:511,QUIRK_IE_NO_CONTENT:1223};
k.net.HttpStatus.isSuccess=function(b){switch(b){case k.net.HttpStatus.OK:case k.net.HttpStatus.CREATED:case k.net.HttpStatus.ACCEPTED:case k.net.HttpStatus.NO_CONTENT:case k.net.HttpStatus.PARTIAL_CONTENT:case k.net.HttpStatus.NOT_MODIFIED:case k.net.HttpStatus.QUIRK_IE_NO_CONTENT:return!0;default:return!1}};k.net.XhrLike=function(){};k.net.XhrLike.prototype.open=function(){};k.net.XhrLike.prototype.send=function(){};k.net.XhrLike.prototype.abort=function(){};k.net.XhrLike.prototype.setRequestHeader=function(){};k.net.XmlHttpFactory=function(){};k.net.XmlHttpFactory.prototype.cachedOptions_=null;k.net.XmlHttpFactory.prototype.getOptions=function(){var b;(b=this.cachedOptions_)||(b={},ja(this)&&(b[k.net.XmlHttp.OptionType.USE_NULL_FUNCTION]=!0,b[k.net.XmlHttp.OptionType.LOCAL_REQUEST_ERROR]=!0),b=this.cachedOptions_=b);return b};k.net.WrapperXmlHttpFactory=function(b,c){this.xhrFactory_=b;this.optionsFactory_=c};k.inherits(k.net.WrapperXmlHttpFactory,k.net.XmlHttpFactory);k.net.WrapperXmlHttpFactory.prototype.createInstance=function(){return this.xhrFactory_()};k.net.WrapperXmlHttpFactory.prototype.getOptions=function(){return this.optionsFactory_()};k.net.XmlHttp=function(){return k.net.XmlHttp.factory_.createInstance()};k.net.XmlHttp.ASSUME_NATIVE_XHR=!1;k.net.XmlHttpDefines={};k.net.XmlHttpDefines.ASSUME_NATIVE_XHR=!1;k.net.XmlHttp.getOptions=function(){return k.net.XmlHttp.factory_.getOptions()};k.net.XmlHttp.OptionType={USE_NULL_FUNCTION:0,LOCAL_REQUEST_ERROR:1};k.net.XmlHttp.ReadyState={UNINITIALIZED:0,LOADING:1,LOADED:2,INTERACTIVE:3,COMPLETE:4};
k.net.XmlHttp.setFactory=function(b,c){k.net.XmlHttp.setGlobalFactory(new k.net.WrapperXmlHttpFactory(k.asserts.assert(b),k.asserts.assert(c)))};k.net.XmlHttp.setGlobalFactory=function(b){k.net.XmlHttp.factory_=b};k.net.DefaultXmlHttpFactory=function(){};k.inherits(k.net.DefaultXmlHttpFactory,k.net.XmlHttpFactory);k.net.DefaultXmlHttpFactory.prototype.createInstance=function(){var b=ja(this);return b?new ActiveXObject(b):new XMLHttpRequest};
var ja=function(b){if(k.net.XmlHttp.ASSUME_NATIVE_XHR||k.net.XmlHttpDefines.ASSUME_NATIVE_XHR)return"";if(!b.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),b.ieProgId_=e}catch(f){}}throw Error("Could not create ActiveXObject. ActiveX might be disabled, or MSXML might not be installed");}return b.ieProgId_};k.net.XmlHttp.setGlobalFactory(new k.net.DefaultXmlHttpFactory);k.net.XhrIo=function(b){k.events.EventTarget.call(this);this.headers=new k.structs.Map;this.xmlHttpFactory_=b||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_=k.net.XhrIo.ResponseType.DEFAULT;this.useXhr2Timeout_=this.progressEventsEnabled_=this.withCredentials_=!1};k.inherits(k.net.XhrIo,k.events.EventTarget);
k.net.XhrIo.ResponseType={DEFAULT:"",TEXT:"text",DOCUMENT:"document",BLOB:"blob",ARRAY_BUFFER:"arraybuffer"};k.net.XhrIo.prototype.logger_=k.log.getLogger("goog.net.XhrIo");k.net.XhrIo.CONTENT_TYPE_HEADER="Content-Type";k.net.XhrIo.CONTENT_TRANSFER_ENCODING="Content-Transfer-Encoding";k.net.XhrIo.HTTP_SCHEME_PATTERN=/^https?$/i;k.net.XhrIo.METHODS_WITH_FORM_DATA=["POST","PUT"];k.net.XhrIo.FORM_CONTENT_TYPE="application/x-www-form-urlencoded;charset=utf-8";k.net.XhrIo.XHR2_TIMEOUT_="timeout";
k.net.XhrIo.XHR2_ON_TIMEOUT_="ontimeout";k.net.XhrIo.sendInstances_=[];k.net.XhrIo.send=function(b,c,d,e,f,g,h){var l=new k.net.XhrIo;k.net.XhrIo.sendInstances_.push(l);c&&l.listen(k.net.EventType.COMPLETE,c);l.listenOnce(k.net.EventType.READY,l.cleanupSend_);g&&(l.timeoutInterval_=Math.max(0,g));h&&(l.withCredentials_=h);l.send(b,d,e,f);return l};k.net.XhrIo.cleanup=function(){for(var b=k.net.XhrIo.sendInstances_;b.length;)b.pop().dispose()};
k.net.XhrIo.protectEntryPoints=function(b){k.net.XhrIo.prototype.onReadyStateChangeEntryPoint_=b.protectEntryPoint(k.net.XhrIo.prototype.onReadyStateChangeEntryPoint_)};k.net.XhrIo.prototype.cleanupSend_=function(){this.dispose();k.array.remove(k.net.XhrIo.sendInstances_,this)};
k.net.XhrIo.prototype.send=function(b,c,d,e){if(this.xhr_)throw Error("[goog.net.XhrIo] Object is active with another request="+this.lastUri_+"; newUri="+b);c=c?c.toUpperCase():"GET";this.lastUri_=b;this.lastError_="";this.lastMethod_=c;this.errorDispatched_=!1;this.active_=!0;this.xhr_=this.xmlHttpFactory_?this.xmlHttpFactory_.createInstance():k.net.XmlHttp();this.xhrOptions_=this.xmlHttpFactory_?this.xmlHttpFactory_.getOptions():k.net.XmlHttp.getOptions();this.xhr_.onreadystatechange=k.bind(this.onReadyStateChange_,
this);this.progressEventsEnabled_&&"onprogress"in this.xhr_&&(this.xhr_.onprogress=k.bind(function(b){this.onProgressHandler_(b,!0)},this),this.xhr_.upload&&(this.xhr_.upload.onprogress=k.bind(this.onProgressHandler_,this)));try{k.log.fine(this.logger_,U(this,"Opening Xhr")),this.inOpen_=!0,this.xhr_.open(c,String(b),!0),this.inOpen_=!1}catch(g){k.log.fine(this.logger_,U(this,"Error opening Xhr: "+g.message));ka(this,g);return}b=d||"";var f=this.headers.clone();e&&k.structs.forEach(e,function(b,c){f.set(c,
b)});e=k.array.find(f.getKeys(),k.net.XhrIo.isContentTypeHeader_);d=k.global.FormData&&b instanceof k.global.FormData;!k.array.contains(k.net.XhrIo.METHODS_WITH_FORM_DATA,c)||e||d||f.set(k.net.XhrIo.CONTENT_TYPE_HEADER,k.net.XhrIo.FORM_CONTENT_TYPE);f.forEach(function(b,c){this.xhr_.setRequestHeader(c,b)},this);this.responseType_&&(this.xhr_.responseType=this.responseType_);"withCredentials"in this.xhr_&&this.xhr_.withCredentials!==this.withCredentials_&&(this.xhr_.withCredentials=this.withCredentials_);
try{na(this),0<this.timeoutInterval_&&(this.useXhr2Timeout_=k.net.XhrIo.shouldUseXhr2Timeout_(this.xhr_),k.log.fine(this.logger_,U(this,"Will abort after "+this.timeoutInterval_+"ms if incomplete, xhr2 "+this.useXhr2Timeout_)),this.useXhr2Timeout_?(this.xhr_[k.net.XhrIo.XHR2_TIMEOUT_]=this.timeoutInterval_,this.xhr_[k.net.XhrIo.XHR2_ON_TIMEOUT_]=k.bind(this.timeout_,this)):this.timeoutId_=k.Timer.callOnce(this.timeout_,this.timeoutInterval_,this)),k.log.fine(this.logger_,U(this,"Sending request")),
this.inSend_=!0,this.xhr_.send(b),this.inSend_=!1}catch(g){k.log.fine(this.logger_,U(this,"Send error: "+g.message)),ka(this,g)}};k.net.XhrIo.shouldUseXhr2Timeout_=function(b){return k.userAgent.IE&&k.userAgent.isVersionOrHigher(9)&&k.isNumber(b[k.net.XhrIo.XHR2_TIMEOUT_])&&k.isDef(b[k.net.XhrIo.XHR2_ON_TIMEOUT_])};k.net.XhrIo.isContentTypeHeader_=function(b){return k.string.caseInsensitiveEquals(b)};
k.net.XhrIo.prototype.timeout_=function(){"undefined"!=typeof k&&this.xhr_&&(this.lastError_="Timed out after "+this.timeoutInterval_+"ms, aborting",k.log.fine(this.logger_,U(this,this.lastError_)),this.dispatchEvent(k.net.EventType.TIMEOUT),this.abort(k.net.ErrorCode.TIMEOUT))};var ka=function(b,c){b.active_=!1;b.xhr_&&(b.inAbort_=!0,b.xhr_.abort(),b.inAbort_=!1);b.lastError_=c;oa(b);V(b)},oa=function(b){b.errorDispatched_||(b.errorDispatched_=!0,b.dispatchEvent(k.net.EventType.COMPLETE),b.dispatchEvent(k.net.EventType.ERROR))};
k.net.XhrIo.prototype.abort=function(){this.xhr_&&this.active_&&(k.log.fine(this.logger_,U(this,"Aborting")),this.active_=!1,this.inAbort_=!0,this.xhr_.abort(),this.inAbort_=!1,this.dispatchEvent(k.net.EventType.COMPLETE),this.dispatchEvent(k.net.EventType.ABORT),V(this))};k.net.XhrIo.prototype.disposeInternal=function(){this.xhr_&&(this.active_&&(this.active_=!1,this.inAbort_=!0,this.xhr_.abort(),this.inAbort_=!1),V(this,!0));k.net.XhrIo.superClass_.disposeInternal.call(this)};
k.net.XhrIo.prototype.onReadyStateChange_=function(){if(!this.isDisposed())if(this.inOpen_||this.inSend_||this.inAbort_)pa(this);else this.onReadyStateChangeEntryPoint_()};k.net.XhrIo.prototype.onReadyStateChangeEntryPoint_=function(){pa(this)};
var pa=function(b){if(b.active_&&"undefined"!=typeof k)if(b.xhrOptions_[k.net.XmlHttp.OptionType.LOCAL_REQUEST_ERROR]&&X(b)==k.net.XmlHttp.ReadyState.COMPLETE&&2==Z(b))k.log.fine(b.logger_,U(b,"Local request error detected and ignored"));else if(b.inSend_&&X(b)==k.net.XmlHttp.ReadyState.COMPLETE)k.Timer.callOnce(b.onReadyStateChange_,0,b);else if(b.dispatchEvent(k.net.EventType.READY_STATE_CHANGE),X(b)==k.net.XmlHttp.ReadyState.COMPLETE){k.log.fine(b.logger_,U(b,"Request complete"));b.active_=!1;
try{if(b.isSuccess())b.dispatchEvent(k.net.EventType.COMPLETE),b.dispatchEvent(k.net.EventType.SUCCESS);else{var c;try{c=X(b)>k.net.XmlHttp.ReadyState.LOADED?b.xhr_.statusText:""}catch(d){k.log.fine(b.logger_,"Can not get status: "+d.message),c=""}b.lastError_=c+" ["+Z(b)+"]";oa(b)}}finally{V(b)}}};
k.net.XhrIo.prototype.onProgressHandler_=function(b,c){k.asserts.assert(b.type===k.net.EventType.PROGRESS,"goog.net.EventType.PROGRESS is of the same type as raw XHR progress.");this.dispatchEvent(k.net.XhrIo.buildProgressEvent_(b,k.net.EventType.PROGRESS));this.dispatchEvent(k.net.XhrIo.buildProgressEvent_(b,c?k.net.EventType.DOWNLOAD_PROGRESS:k.net.EventType.UPLOAD_PROGRESS))};k.net.XhrIo.buildProgressEvent_=function(b,c){return{type:c,lengthComputable:b.lengthComputable,loaded:b.loaded,total:b.total}};
var V=function(b,c){if(b.xhr_){na(b);var d=b.xhr_,e=b.xhrOptions_[k.net.XmlHttp.OptionType.USE_NULL_FUNCTION]?k.nullFunction:null;b.xhr_=null;b.xhrOptions_=null;c||b.dispatchEvent(k.net.EventType.READY);try{d.onreadystatechange=e}catch(f){k.log.error(b.logger_,"Problem encountered resetting onreadystatechange: "+f.message)}}},na=function(b){b.xhr_&&b.useXhr2Timeout_&&(b.xhr_[k.net.XhrIo.XHR2_ON_TIMEOUT_]=null);k.isNumber(b.timeoutId_)&&(k.Timer.clear(b.timeoutId_),b.timeoutId_=null)};
k.net.XhrIo.prototype.isSuccess=function(){var b=Z(this),c;if(!(c=k.net.HttpStatus.isSuccess(b))){if(b=0===b)b=k.uri.utils.getEffectiveScheme(String(this.lastUri_)),b=!k.net.XhrIo.HTTP_SCHEME_PATTERN.test(b);c=b}return c};var X=function(b){return b.xhr_?b.xhr_.readyState:k.net.XmlHttp.ReadyState.UNINITIALIZED},Z=function(b){try{return X(b)>k.net.XmlHttp.ReadyState.LOADED?b.xhr_.status:-1}catch(c){return-1}},U=function(b,c){return c+" ["+b.lastMethod_+" "+b.lastUri_+" "+Z(b)+"]"};
k.debug.entryPointRegistry.register(function(b){k.net.XhrIo.prototype.onReadyStateChangeEntryPoint_=b(k.net.XhrIo.prototype.onReadyStateChangeEntryPoint_)});k.craw.AppAuthenticator=function(b,c,d){this.appUrl_=b;this.authCompletedCallback_=c;this.authFailedCallback_=d||k.functions.NULL;this.uberTokenAttempts_=0};k.craw.AppAuthenticator.UBERAUTH_URL_="https://www.google.com/accounts/OAuthLogin?issueuberauth=1";
k.craw.AppAuthenticator.prototype.onAuthTokenReceived_=function(b){if(k.isDef(b)){var c=k.bind(this.onUberAuthResponse_,this),d="source="+chrome.runtime.getManifest().oauth2.client_id,e={Authorization:"Bearer "+b,"Content-Type":"application/x-www-form-urlencoded"},f=k.bind(function(){0===this.uberTokenAttempts_?(++this.uberTokenAttempts_,chrome.identity.removeCachedAuthToken({token:b},k.bind(this.authenticate,this))):this.authFailedCallback_()},this);k.net.XhrIo.send(k.craw.AppAuthenticator.UBERAUTH_URL_,
function(){if(this.isSuccess()){var b;try{b=this.xhr_?this.xhr_.responseText:""}catch(h){k.log.fine(this.logger_,"Can not get responseText: "+h.message),b=""}c(b)}else f()},"POST",d,e)}else this.authFailedCallback_()};k.craw.AppAuthenticator.prototype.onUberAuthResponse_=function(b){var c=k.Uri.parse("https://accounts.google.com/MergeSession");K(c,"source","appsv2");K(c,"uberauth",b);K(c,"continue",this.appUrl_);this.authCompletedCallback_(c.toString())};
k.craw.AppAuthenticator.prototype.authenticate=function(){chrome.identity.getAuthToken({interactive:!0},k.bind(this.onAuthTokenReceived_,this))};k.craw.WindowConfig=function(b,c){this.url_=b;this.useAuth_=c};k.craw.WindowConfig.prototype.getUrl=function(){return this.url_};k.craw.WindowConfig.prototype.getUseAuth=function(){return this.useAuth_};k.craw.AppWindow=function(b){this.config_=b;this.authenticator_=new k.craw.AppAuthenticator(b.getUrl(),k.bind(this.navigateToUrl_,this),k.bind(this.showOfflineWarning,this));this.webview_=k.dom.getDocument().querySelector("webview");this.hasLaunched_=!1;this.loadingOverlay_=k.dom.getElement("loading_overlay");this.offlineOverlay_=k.dom.getElement("offline_overlay");this.customStatus_=null;this.delegate_=k.craw.AppWindowDelegate.createDefaultImpl(this);this.webview_.addEventListener("contentload",
k.bind(this.onContentLoad_,this),!1);this.webview_.addEventListener("newwindow",k.bind(this.onNewWindow_,this),!1);this.delegate_.onWindowReady();this.pollOnlineStatus_()};k.craw.AppWindow.REQUEST_FILTER_URL_PATTERN_="https://*.google.com/*";k.craw.AppWindow.REQUEST_FILTER_TYPE_="main_frame";k.craw.AppWindow.QUERY_NOCACHE_PARAMETER_="nocache";k.craw.AppWindow.NETWORK_TEST_URLS_=["https://www.google.com/images/cleardot.gif","https://www.google.com/images/dot2.gif","https://www.google.com/images/x2.gif"];
k.craw.AppWindow.prototype.navigateToUrl_=function(b){this.webview_.src=b;this.hasLaunched_=!0};k.craw.AppWindow.prototype.onContentLoad_=function(){};k.craw.AppWindow.prototype.onNewWindow_=function(){};var qa=function(b){b.hasLaunched_=!1;b.config_.getUseAuth()?b.authenticator_.authenticate():b.navigateToUrl_(b.config_.getUrl())};a=k.craw.AppWindow.prototype;a.hideVisibleOverlays_=function(){this.loadingOverlay_.style.display="none";this.offlineOverlay_.style.display="none"};
a.fadeInOfflineOverlay_=function(){this.offlineOverlay_.style.opacity="1"};a.showOfflineWarning=function(){k.dom.getElement("app_unavailable").innerText=this.delegate_.getAppUnavailableMessage();k.dom.getElement("connect_to_network").innerText=this.customStatus_||chrome.i18n.getMessage("craw_connect_to_network");this.offlineOverlay_.style.display="-webkit-flex";this.offlineOverlay_.style.pointerEvents="all";k.Timer.callOnce(k.bind(this.fadeInOfflineOverlay_,this),0)};
a.setOnlineStatus_=function(b){k.Timer.callOnce(k.bind(this.pollOnlineStatus_,this),1E3);b?this.hasLaunched_?this.delegate_.finishedLaunch()&&(this.offlineOverlay_.style.opacity="0",this.offlineOverlay_.style.pointerEvents="none",this.loadingOverlay_.style.opacity="0",this.loadingOverlay_.style.pointerEvents="none",k.Timer.callOnce(k.bind(this.hideVisibleOverlays_,this),250)):qa(this):this.showOfflineWarning()};
a.pollOnlineStatus_=function(){if(this.customStatus_=this.delegate_.pollOnlineStatus())this.setOnlineStatus_(!1);else{var b=k.bind(this.setOnlineStatus_,this),c=new k.Uri(k.craw.AppWindow.NETWORK_TEST_URLS_[k.math.randomInt()]);K(c,k.craw.AppWindow.QUERY_NOCACHE_PARAMETER_,Date.now().toString());k.net.XhrIo.send(c.toString(),function(){b(this.isSuccess())})}};window.onload=function(){qa(new k.craw.AppWindow(k.dom.getWindow().crawConfig_))};
