12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788899091929394959697989910010110210310410510610710810911011111211311411511611711811912012112212312412512612712812913013113213313413513613713813914014114214314414514614714814915015115215315415515615715815916016116216316416516616716816917017117217317417517617717817918018118218318418518618718818919019119219319419519619719819920020120220320420520620720820921021121221321421521621721821922022122222322422522622722822923023123223323423523623723823924024124224324424524624724824925025125225325425525625725825926026126226326426526626726826927027127227327427527627727827928028128228328428528628728828929029129229329429529629729829930030130230330430530630730830931031131231331431531631731831932032132232332432532632732832933033133233333433533633733833934034134234334434534634734834935035135235335435535635735835936036136236336436536636736836937037137237337437537637737837938038138238338438538638738838939039139239339439539639739839940040140240340440540640740840941041141241341441541641741841942042142242342442542642742842943043143243343443543643743843944044144244344444544644744844945045145245345445545645745845946046146246346446546646746846947047147247347447547647747847948048148248348448548648748848949049149249349449549649749849950050150250350450550650750850951051151251351451551651751851952052152252352452552652752852953053153253353453553653753853954054154254354454554654754854955055155255355455555655755855956056156256356456556656756856957057157257357457557657757857958058158258358458558658758858959059159259359459559659759859960060160260360460560660760860961061161261361461561661761861962062162262362462562662762862963063163263363463563663763863964064164264364464564664764864965065165265365465565665765865966066166266366466566666766866967067167267367467567667767867968068168268368468568668768868969069169269369469569669769869970070170270370470570670770870971071171271371471571671771871972072172272372472572672772872973073173273373473573673773873974074174274374474574674774874975075175275375475575675775875976076176276376476576676776876977077177277377477577677777877978078178278378478578678778878979079179279379479579679779879980080180280380480580680780880981081181281381481581681781881982082182282382482582682782882983083183283383483583683783883984084184284384484584684784884985085185285385485585685785885986086186286386486586686786886987087187287387487587687787887988088188288388488588688788888989089189289389489589689789889990090190290390490590690790890991091191291391491591691791891992092192292392492592692792892993093193293393493593693793893994094194294394494594694794894995095195295395495595695795895996096196296396496596696796896997097197297397497597697797897998098198298398498598698798898999099199299399499599699799899910001001100210031004100510061007100810091010101110121013101410151016101710181019102010211022102310241025102610271028102910301031103210331034103510361037103810391040104110421043104410451046104710481049105010511052105310541055105610571058105910601061106210631064106510661067106810691070107110721073107410751076107710781079108010811082108310841085108610871088108910901091109210931094109510961097109810991100110111021103110411051106110711081109111011111112111311141115111611171118111911201121112211231124112511261127112811291130113111321133113411351136113711381139114011411142114311441145114611471148114911501151115211531154115511561157115811591160116111621163116411651166116711681169117011711172117311741175117611771178117911801181118211831184118511861187118811891190119111921193119411951196119711981199120012011202120312041205120612071208120912101211121212131214121512161217121812191220122112221223122412251226122712281229123012311232123312341235123612371238123912401241124212431244124512461247124812491250125112521253125412551256125712581259126012611262126312641265126612671268126912701271127212731274127512761277127812791280128112821283128412851286128712881289129012911292129312941295129612971298129913001301130213031304130513061307130813091310131113121313131413151316131713181319132013211322132313241325132613271328132913301331133213331334133513361337133813391340134113421343134413451346134713481349135013511352135313541355135613571358135913601361136213631364136513661367136813691370137113721373137413751376137713781379138013811382138313841385138613871388138913901391139213931394139513961397139813991400140114021403140414051406140714081409141014111412141314141415141614171418141914201421142214231424142514261427142814291430143114321433143414351436143714381439144014411442144314441445144614471448144914501451145214531454145514561457145814591460146114621463146414651466146714681469147014711472147314741475147614771478147914801481148214831484148514861487148814891490149114921493149414951496149714981499150015011502150315041505150615071508150915101511151215131514151515161517151815191520152115221523152415251526152715281529153015311532153315341535153615371538153915401541154215431544154515461547154815491550155115521553155415551556155715581559156015611562156315641565156615671568156915701571157215731574157515761577157815791580158115821583158415851586158715881589159015911592159315941595159615971598159916001601160216031604160516061607160816091610161116121613161416151616161716181619162016211622162316241625162616271628162916301631163216331634163516361637163816391640164116421643164416451646164716481649165016511652165316541655165616571658165916601661166216631664166516661667166816691670167116721673167416751676167716781679168016811682168316841685168616871688168916901691169216931694169516961697169816991700170117021703170417051706170717081709171017111712171317141715171617171718171917201721172217231724172517261727172817291730173117321733173417351736173717381739174017411742174317441745174617471748174917501751175217531754175517561757175817591760176117621763176417651766176717681769177017711772177317741775177617771778177917801781178217831784178517861787178817891790179117921793179417951796179717981799180018011802180318041805180618071808180918101811181218131814181518161817181818191820182118221823182418251826182718281829183018311832183318341835183618371838183918401841184218431844184518461847184818491850185118521853185418551856185718581859186018611862186318641865186618671868186918701871187218731874187518761877187818791880188118821883188418851886188718881889189018911892189318941895189618971898189919001901190219031904190519061907190819091910191119121913191419151916191719181919192019211922192319241925192619271928192919301931193219331934193519361937193819391940194119421943194419451946194719481949195019511952195319541955195619571958195919601961196219631964196519661967196819691970197119721973197419751976197719781979198019811982198319841985198619871988198919901991199219931994199519961997199819992000200120022003200420052006200720082009201020112012201320142015201620172018201920202021202220232024202520262027202820292030203120322033203420352036203720382039204020412042204320442045204620472048204920502051205220532054205520562057205820592060206120622063206420652066206720682069207020712072207320742075207620772078207920802081208220832084208520862087208820892090209120922093209420952096209720982099210021012102210321042105210621072108210921102111211221132114211521162117211821192120212121222123212421252126212721282129213021312132213321342135213621372138213921402141214221432144214521462147214821492150215121522153215421552156215721582159216021612162216321642165216621672168216921702171217221732174217521762177217821792180218121822183218421852186218721882189219021912192219321942195219621972198219922002201220222032204220522062207220822092210221122122213221422152216221722182219222022212222222322242225222622272228222922302231223222332234223522362237223822392240224122422243224422452246224722482249225022512252225322542255225622572258225922602261226222632264226522662267226822692270227122722273227422752276227722782279228022812282228322842285228622872288228922902291229222932294229522962297229822992300230123022303230423052306230723082309231023112312231323142315231623172318231923202321232223232324232523262327232823292330233123322333233423352336233723382339234023412342234323442345234623472348234923502351235223532354235523562357235823592360236123622363236423652366236723682369237023712372237323742375237623772378237923802381238223832384238523862387238823892390239123922393239423952396239723982399240024012402240324042405240624072408240924102411241224132414241524162417241824192420242124222423242424252426242724282429243024312432243324342435243624372438243924402441244224432444244524462447244824492450245124522453245424552456245724582459246024612462246324642465246624672468246924702471247224732474247524762477247824792480248124822483248424852486248724882489249024912492249324942495249624972498249925002501250225032504250525062507250825092510251125122513251425152516251725182519252025212522252325242525252625272528252925302531253225332534253525362537253825392540254125422543254425452546254725482549255025512552255325542555255625572558255925602561256225632564256525662567256825692570257125722573257425752576257725782579258025812582258325842585258625872588258925902591259225932594259525962597259825992600260126022603260426052606260726082609261026112612261326142615261626172618261926202621262226232624262526262627262826292630263126322633263426352636263726382639264026412642264326442645264626472648264926502651265226532654265526562657265826592660266126622663266426652666266726682669267026712672267326742675267626772678267926802681268226832684268526862687268826892690269126922693269426952696269726982699270027012702270327042705270627072708270927102711271227132714271527162717271827192720272127222723272427252726272727282729273027312732273327342735273627372738273927402741274227432744274527462747274827492750275127522753275427552756275727582759276027612762276327642765276627672768276927702771277227732774277527762777277827792780278127822783278427852786278727882789279027912792279327942795279627972798279928002801280228032804280528062807280828092810281128122813281428152816281728182819282028212822282328242825282628272828282928302831283228332834283528362837283828392840284128422843284428452846284728482849285028512852285328542855285628572858285928602861286228632864286528662867286828692870287128722873287428752876287728782879288028812882288328842885288628872888288928902891289228932894289528962897289828992900290129022903290429052906290729082909291029112912291329142915291629172918291929202921 |
- var COMPILED = false;
- var goog = goog || {};
- goog.global = this;
- goog.global.CLOSURE_UNCOMPILED_DEFINES;
- goog.global.CLOSURE_DEFINES;
- goog.isDef = function(val) {
-
-
- return val !== void 0;
- };
- goog.isString = function(val) {
- return typeof val == 'string';
- };
- goog.isBoolean = function(val) {
- return typeof val == 'boolean';
- };
- goog.isNumber = function(val) {
- return typeof val == 'number';
- };
- goog.exportPath_ = function(name, opt_object, opt_objectToExportTo) {
- var parts = name.split('.');
- var cur = opt_objectToExportTo || goog.global;
-
-
-
- if (!(parts[0] in cur) && cur.execScript) {
- cur.execScript('var ' + parts[0]);
- }
- for (var part; parts.length && (part = parts.shift());) {
- if (!parts.length && goog.isDef(opt_object)) {
-
- cur[part] = opt_object;
- } else if (cur[part] && cur[part] !== Object.prototype[part]) {
- cur = cur[part];
- } else {
- cur = cur[part] = {};
- }
- }
- };
- goog.define = function(name, defaultValue) {
- var value = defaultValue;
- if (!COMPILED) {
- if (goog.global.CLOSURE_UNCOMPILED_DEFINES &&
-
- (goog.global.CLOSURE_UNCOMPILED_DEFINES).nodeType ===
- undefined &&
- Object.prototype.hasOwnProperty.call(
- goog.global.CLOSURE_UNCOMPILED_DEFINES, name)) {
- value = goog.global.CLOSURE_UNCOMPILED_DEFINES[name];
- } else if (
- goog.global.CLOSURE_DEFINES &&
-
- (goog.global.CLOSURE_DEFINES).nodeType === undefined &&
- Object.prototype.hasOwnProperty.call(
- goog.global.CLOSURE_DEFINES, name)) {
- value = goog.global.CLOSURE_DEFINES[name];
- }
- }
- goog.exportPath_(name, value);
- };
- goog.define('goog.DEBUG', true);
- goog.define('goog.LOCALE', 'en');
- goog.define('goog.TRUSTED_SITE', true);
- goog.define('goog.STRICT_MODE_COMPATIBLE', false);
- goog.define('goog.DISALLOW_TEST_ONLY_CODE', COMPILED && !goog.DEBUG);
- goog.define('goog.ENABLE_CHROME_APP_SAFE_SCRIPT_LOADING', false);
- goog.provide = function(name) {
- if (goog.isInModuleLoader_()) {
- throw Error('goog.provide can not be used within a goog.module.');
- }
- if (!COMPILED) {
-
-
- if (goog.isProvided_(name)) {
- throw Error('Namespace "' + name + '" already declared.');
- }
- }
- goog.constructNamespace_(name);
- };
- goog.constructNamespace_ = function(name, opt_obj) {
- if (!COMPILED) {
- delete goog.implicitNamespaces_[name];
- var namespace = name;
- while ((namespace = namespace.substring(0, namespace.lastIndexOf('.')))) {
- if (goog.getObjectByName(namespace)) {
- break;
- }
- goog.implicitNamespaces_[namespace] = true;
- }
- }
- goog.exportPath_(name, opt_obj);
- };
- goog.VALID_MODULE_RE_ = /^[a-zA-Z_$][a-zA-Z0-9._$]*$/;
- goog.module = function(name) {
- if (!goog.isString(name) || !name ||
- name.search(goog.VALID_MODULE_RE_) == -1) {
- throw Error('Invalid module identifier');
- }
- if (!goog.isInModuleLoader_()) {
- throw Error(
- 'Module ' + name + ' 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 (goog.moduleLoaderState_.moduleName) {
- throw Error('goog.module may only be called once per module.');
- }
-
- goog.moduleLoaderState_.moduleName = name;
- if (!COMPILED) {
-
-
- if (goog.isProvided_(name)) {
- throw Error('Namespace "' + name + '" already declared.');
- }
- delete goog.implicitNamespaces_[name];
- }
- };
- goog.module.get = function(name) {
- return goog.module.getInternal_(name);
- };
- goog.module.getInternal_ = function(name) {
- if (!COMPILED) {
- if (name in goog.loadedModules_) {
- return goog.loadedModules_[name];
- } else if (!goog.implicitNamespaces_[name]) {
- var ns = goog.getObjectByName(name);
- return ns != null ? ns : null;
- }
- }
- return null;
- };
- goog.moduleLoaderState_ = null;
- goog.isInModuleLoader_ = function() {
- return goog.moduleLoaderState_ != null;
- };
- goog.module.declareLegacyNamespace = function() {
- if (!COMPILED && !goog.isInModuleLoader_()) {
- throw new Error(
- 'goog.module.declareLegacyNamespace must be called from ' +
- 'within a goog.module');
- }
- if (!COMPILED && !goog.moduleLoaderState_.moduleName) {
- throw Error(
- 'goog.module must be called prior to ' +
- 'goog.module.declareLegacyNamespace.');
- }
- goog.moduleLoaderState_.declareLegacyNamespace = true;
- };
- goog.setTestOnly = function(opt_message) {
- if (goog.DISALLOW_TEST_ONLY_CODE) {
- opt_message = opt_message || '';
- throw Error(
- 'Importing test-only code into non-debug environment' +
- (opt_message ? ': ' + opt_message : '.'));
- }
- };
- goog.forwardDeclare = function(name) {};
- goog.forwardDeclare('Document');
- goog.forwardDeclare('HTMLScriptElement');
- goog.forwardDeclare('XMLHttpRequest');
- if (!COMPILED) {
-
- goog.isProvided_ = function(name) {
- return (name in goog.loadedModules_) ||
- (!goog.implicitNamespaces_[name] &&
- goog.isDefAndNotNull(goog.getObjectByName(name)));
- };
-
- goog.implicitNamespaces_ = {'goog.module': true};
-
-
-
-
- }
- goog.getObjectByName = function(name, opt_obj) {
- var parts = name.split('.');
- var cur = opt_obj || goog.global;
- for (var part; part = parts.shift();) {
- if (goog.isDefAndNotNull(cur[part])) {
- cur = cur[part];
- } else {
- return null;
- }
- }
- return cur;
- };
- goog.globalize = function(obj, opt_global) {
- var global = opt_global || goog.global;
- for (var x in obj) {
- global[x] = obj[x];
- }
- };
- goog.addDependency = function(relPath, provides, requires, opt_loadFlags) {
- if (goog.DEPENDENCIES_ENABLED) {
- var provide, require;
- var path = relPath.replace(/\\/g, '/');
- var deps = goog.dependencies_;
- if (!opt_loadFlags || typeof opt_loadFlags === 'boolean') {
- opt_loadFlags = opt_loadFlags ? {'module': 'goog'} : {};
- }
- for (var i = 0; provide = provides[i]; i++) {
- deps.nameToPath[provide] = path;
- deps.loadFlags[path] = opt_loadFlags;
- }
- for (var j = 0; require = requires[j]; j++) {
- if (!(path in deps.requires)) {
- deps.requires[path] = {};
- }
- deps.requires[path][require] = true;
- }
- }
- };
- goog.define('goog.ENABLE_DEBUG_LOADER', true);
- goog.logToConsole_ = function(msg) {
- if (goog.global.console) {
- goog.global.console['error'](msg);
- }
- };
- goog.require = function(name) {
-
- if (!COMPILED) {
- if (goog.ENABLE_DEBUG_LOADER && goog.IS_OLD_IE_) {
- goog.maybeProcessDeferredDep_(name);
- }
- if (goog.isProvided_(name)) {
- if (goog.isInModuleLoader_()) {
- return goog.module.getInternal_(name);
- }
- } else if (goog.ENABLE_DEBUG_LOADER) {
- var path = goog.getPathFromDeps_(name);
- if (path) {
- goog.writeScripts_(path);
- } else {
- var errorMessage = 'goog.require could not find: ' + name;
- goog.logToConsole_(errorMessage);
- throw Error(errorMessage);
- }
- }
- return null;
- }
- };
- goog.basePath = '';
- goog.global.CLOSURE_BASE_PATH;
- goog.global.CLOSURE_NO_DEPS;
- goog.global.CLOSURE_IMPORT_SCRIPT;
- goog.nullFunction = function() {};
- goog.abstractMethod = function() {
- throw Error('unimplemented abstract method');
- };
- goog.addSingletonGetter = function(ctor) {
-
-
-
- ctor.instance_ = undefined;
- ctor.getInstance = function() {
- if (ctor.instance_) {
- return ctor.instance_;
- }
- if (goog.DEBUG) {
-
- goog.instantiatedSingletons_[goog.instantiatedSingletons_.length] = ctor;
- }
- return ctor.instance_ = new ctor;
- };
- };
- goog.instantiatedSingletons_ = [];
- goog.define('goog.LOAD_MODULE_USING_EVAL', true);
- goog.define('goog.SEAL_MODULE_EXPORTS', goog.DEBUG);
- goog.loadedModules_ = {};
- goog.DEPENDENCIES_ENABLED = !COMPILED && goog.ENABLE_DEBUG_LOADER;
- goog.define('goog.TRANSPILE', 'detect');
- goog.define('goog.TRANSPILER', 'transpile.js');
- if (goog.DEPENDENCIES_ENABLED) {
-
- goog.dependencies_ = {
- loadFlags: {},
- nameToPath: {},
- requires: {},
-
- visited: {},
- written: {},
- deferred: {}
- };
-
- goog.inHtmlDocument_ = function() {
-
- var doc = goog.global.document;
- return doc != null && 'write' in doc;
- };
-
- goog.findBasePath_ = function() {
- if (goog.isDef(goog.global.CLOSURE_BASE_PATH) &&
-
- goog.isString(goog.global.CLOSURE_BASE_PATH)) {
- goog.basePath = goog.global.CLOSURE_BASE_PATH;
- return;
- } else if (!goog.inHtmlDocument_()) {
- return;
- }
-
- var doc = goog.global.document;
-
- var currentScript = doc.currentScript;
- if (currentScript) {
- var scripts = [currentScript];
- } else {
- var scripts = doc.getElementsByTagName('SCRIPT');
- }
-
-
- for (var i = scripts.length - 1; i >= 0; --i) {
- var script = (scripts[i]);
- var src = script.src;
- var qmark = src.lastIndexOf('?');
- var l = qmark == -1 ? src.length : qmark;
- if (src.substr(l - 7, 7) == 'base.js') {
- goog.basePath = src.substr(0, l - 7);
- return;
- }
- }
- };
-
- goog.importScript_ = function(src, opt_sourceText) {
- var importScript =
- goog.global.CLOSURE_IMPORT_SCRIPT || goog.writeScriptTag_;
- if (importScript(src, opt_sourceText)) {
- goog.dependencies_.written[src] = true;
- }
- };
-
- goog.IS_OLD_IE_ =
- !!(!goog.global.atob && goog.global.document && goog.global.document.all);
-
- goog.oldIeWaiting_ = false;
-
- goog.importProcessedScript_ = function(src, isModule, needsTranspile) {
-
-
- var bootstrap = 'goog.retrieveAndExec_("' + src + '", ' + isModule + ', ' +
- needsTranspile + ');';
- goog.importScript_('', bootstrap);
- };
-
- goog.queuedModules_ = [];
-
- goog.wrapModule_ = function(srcUrl, scriptText) {
- if (!goog.LOAD_MODULE_USING_EVAL || !goog.isDef(goog.global.JSON)) {
- return '' +
- 'goog.loadModule(function(exports) {' +
- '"use strict";' + scriptText +
- '\n' +
- ';return exports' +
- '});' +
- '\n//# sourceURL=' + srcUrl + '\n';
- } else {
- return '' +
- 'goog.loadModule(' +
- goog.global.JSON.stringify(
- scriptText + '\n//# sourceURL=' + srcUrl + '\n') +
- ');';
- }
- };
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- goog.loadQueuedModules_ = function() {
- var count = goog.queuedModules_.length;
- if (count > 0) {
- var queue = goog.queuedModules_;
- goog.queuedModules_ = [];
- for (var i = 0; i < count; i++) {
- var path = queue[i];
- goog.maybeProcessDeferredPath_(path);
- }
- }
- goog.oldIeWaiting_ = false;
- };
-
- goog.maybeProcessDeferredDep_ = function(name) {
- if (goog.isDeferredModule_(name) && goog.allDepsAreAvailable_(name)) {
- var path = goog.getPathFromDeps_(name);
- goog.maybeProcessDeferredPath_(goog.basePath + path);
- }
- };
-
- goog.isDeferredModule_ = function(name) {
- var path = goog.getPathFromDeps_(name);
- var loadFlags = path && goog.dependencies_.loadFlags[path] || {};
- var languageLevel = loadFlags['lang'] || 'es3';
- if (path && (loadFlags['module'] == 'goog' ||
- goog.needsTranspile_(languageLevel))) {
- var abspath = goog.basePath + path;
- return (abspath) in goog.dependencies_.deferred;
- }
- return false;
- };
-
- goog.allDepsAreAvailable_ = function(name) {
- var path = goog.getPathFromDeps_(name);
- if (path && (path in goog.dependencies_.requires)) {
- for (var requireName in goog.dependencies_.requires[path]) {
- if (!goog.isProvided_(requireName) &&
- !goog.isDeferredModule_(requireName)) {
- return false;
- }
- }
- }
- return true;
- };
-
- goog.maybeProcessDeferredPath_ = function(abspath) {
- if (abspath in goog.dependencies_.deferred) {
- var src = goog.dependencies_.deferred[abspath];
- delete goog.dependencies_.deferred[abspath];
- goog.globalEval(src);
- }
- };
-
- goog.loadModuleFromUrl = function(url) {
-
-
-
- goog.retrieveAndExec_(url, true, false);
- };
-
- goog.writeScriptSrcNode_ = function(src) {
- goog.global.document.write(
- '<script type="text/javascript" src="' + src + '"></' +
- 'script>');
- };
-
- goog.appendScriptSrcNode_ = function(src) {
-
- var doc = goog.global.document;
- var scriptEl =
- (doc.createElement('script'));
- scriptEl.type = 'text/javascript';
- scriptEl.src = src;
- scriptEl.defer = false;
- scriptEl.async = false;
- doc.head.appendChild(scriptEl);
- };
-
- goog.writeScriptTag_ = function(src, opt_sourceText) {
- if (goog.inHtmlDocument_()) {
-
- var doc = goog.global.document;
-
-
-
-
- if (!goog.ENABLE_CHROME_APP_SAFE_SCRIPT_LOADING &&
- doc.readyState == 'complete') {
-
-
-
-
- var isDeps = /\bdeps.js$/.test(src);
- if (isDeps) {
- return false;
- } else {
- throw Error('Cannot write "' + src + '" after document load');
- }
- }
- if (opt_sourceText === undefined) {
- if (!goog.IS_OLD_IE_) {
- if (goog.ENABLE_CHROME_APP_SAFE_SCRIPT_LOADING) {
- goog.appendScriptSrcNode_(src);
- } else {
- goog.writeScriptSrcNode_(src);
- }
- } else {
- goog.oldIeWaiting_ = true;
- var state = ' onreadystatechange=\'goog.onScriptLoad_(this, ' +
- ++goog.lastNonModuleScriptIndex_ + ')\' ';
- doc.write(
- '<script type="text/javascript" src="' + src + '"' + state +
- '></' +
- 'script>');
- }
- } else {
- doc.write(
- '<script type="text/javascript">' +
- goog.protectScriptTag_(opt_sourceText) + '</' +
- 'script>');
- }
- return true;
- } else {
- return false;
- }
- };
-
- goog.protectScriptTag_ = function(str) {
- return str.replace(/<\/(SCRIPT)/ig, '\\x3c/$1');
- };
-
- goog.needsTranspile_ = function(lang) {
- if (goog.TRANSPILE == 'always') {
- return true;
- } else if (goog.TRANSPILE == 'never') {
- return false;
- } else if (!goog.requiresTranspilation_) {
- goog.requiresTranspilation_ = goog.createRequiresTranspilation_();
- }
- if (lang in goog.requiresTranspilation_) {
- return goog.requiresTranspilation_[lang];
- } else {
- throw new Error('Unknown language mode: ' + lang);
- }
- };
-
- goog.requiresTranspilation_ = null;
-
- goog.lastNonModuleScriptIndex_ = 0;
-
- goog.onScriptLoad_ = function(script, scriptIndex) {
-
-
- if (script.readyState == 'complete' &&
- goog.lastNonModuleScriptIndex_ == scriptIndex) {
- goog.loadQueuedModules_();
- }
- return true;
- };
-
- goog.writeScripts_ = function(pathToLoad) {
-
- var scripts = [];
- var seenScript = {};
- var deps = goog.dependencies_;
-
- function visitNode(path) {
- if (path in deps.written) {
- return;
- }
-
-
- if (path in deps.visited) {
- return;
- }
- deps.visited[path] = true;
- if (path in deps.requires) {
- for (var requireName in deps.requires[path]) {
-
-
- if (!goog.isProvided_(requireName)) {
- if (requireName in deps.nameToPath) {
- visitNode(deps.nameToPath[requireName]);
- } else {
- throw Error('Undefined nameToPath for ' + requireName);
- }
- }
- }
- }
- if (!(path in seenScript)) {
- seenScript[path] = true;
- scripts.push(path);
- }
- }
- visitNode(pathToLoad);
-
- for (var i = 0; i < scripts.length; i++) {
- var path = scripts[i];
- goog.dependencies_.written[path] = true;
- }
-
-
-
- var moduleState = goog.moduleLoaderState_;
- goog.moduleLoaderState_ = null;
- for (var i = 0; i < scripts.length; i++) {
- var path = scripts[i];
- if (path) {
- var loadFlags = deps.loadFlags[path] || {};
- var languageLevel = loadFlags['lang'] || 'es3';
- var needsTranspile = goog.needsTranspile_(languageLevel);
- if (loadFlags['module'] == 'goog' || needsTranspile) {
- goog.importProcessedScript_(
- goog.basePath + path, loadFlags['module'] == 'goog',
- needsTranspile);
- } else {
- goog.importScript_(goog.basePath + path);
- }
- } else {
- goog.moduleLoaderState_ = moduleState;
- throw Error('Undefined script input');
- }
- }
-
- goog.moduleLoaderState_ = moduleState;
- };
-
- goog.getPathFromDeps_ = function(rule) {
- if (rule in goog.dependencies_.nameToPath) {
- return goog.dependencies_.nameToPath[rule];
- } else {
- return null;
- }
- };
- goog.findBasePath_();
-
- if (!goog.global.CLOSURE_NO_DEPS) {
- goog.importScript_(goog.basePath + 'deps.js');
- }
- }
- goog.hasBadLetScoping = null;
- goog.useSafari10Workaround = function() {
- if (goog.hasBadLetScoping == null) {
- var hasBadLetScoping;
- try {
- hasBadLetScoping = !eval(
- '"use strict";' +
- 'let x = 1; function f() { return typeof x; };' +
- 'f() == "number";');
- } catch (e) {
-
- hasBadLetScoping = false;
- }
- goog.hasBadLetScoping = hasBadLetScoping;
- }
- return goog.hasBadLetScoping;
- };
- goog.workaroundSafari10EvalBug = function(moduleDef) {
- return '(function(){' + moduleDef +
- '\n' +
- ';' +
- '})();\n';
- };
- goog.loadModule = function(moduleDef) {
-
-
-
-
-
- var previousState = goog.moduleLoaderState_;
- try {
- goog.moduleLoaderState_ = {
- moduleName: undefined,
- declareLegacyNamespace: false
- };
- var exports;
- if (goog.isFunction(moduleDef)) {
- exports = moduleDef.call(undefined, {});
- } else if (goog.isString(moduleDef)) {
- if (goog.useSafari10Workaround()) {
- moduleDef = goog.workaroundSafari10EvalBug(moduleDef);
- }
- exports = goog.loadModuleFromSource_.call(undefined, moduleDef);
- } else {
- throw Error('Invalid module definition');
- }
- var moduleName = goog.moduleLoaderState_.moduleName;
- if (!goog.isString(moduleName) || !moduleName) {
- throw Error('Invalid module name \"' + moduleName + '\"');
- }
-
-
- if (goog.moduleLoaderState_.declareLegacyNamespace) {
- goog.constructNamespace_(moduleName, exports);
- } else if (
- goog.SEAL_MODULE_EXPORTS && Object.seal && typeof exports == 'object' &&
- exports != null) {
- Object.seal(exports);
- }
- goog.loadedModules_[moduleName] = exports;
- } finally {
- goog.moduleLoaderState_ = previousState;
- }
- };
- goog.loadModuleFromSource_ = (function() {
-
-
- 'use strict';
- var exports = {};
- eval(arguments[0]);
- return exports;
- });
- goog.normalizePath_ = function(path) {
- var components = path.split('/');
- var i = 0;
- while (i < components.length) {
- if (components[i] == '.') {
- components.splice(i, 1);
- } else if (
- i && components[i] == '..' && components[i - 1] &&
- components[i - 1] != '..') {
- components.splice(--i, 2);
- } else {
- i++;
- }
- }
- return components.join('/');
- };
- goog.global.CLOSURE_LOAD_FILE_SYNC;
- goog.loadFileSync_ = function(src) {
- if (goog.global.CLOSURE_LOAD_FILE_SYNC) {
- return goog.global.CLOSURE_LOAD_FILE_SYNC(src);
- } else {
- try {
-
- var xhr = new goog.global['XMLHttpRequest']();
- xhr.open('get', src, false);
- xhr.send();
-
-
-
-
- return xhr.status == 0 || xhr.status == 200 ? xhr.responseText : null;
- } catch (err) {
-
- return null;
- }
- }
- };
- goog.retrieveAndExec_ = function(src, isModule, needsTranspile) {
- if (!COMPILED) {
-
- var originalPath = src;
-
-
- src = goog.normalizePath_(src);
- var importScript =
- goog.global.CLOSURE_IMPORT_SCRIPT || goog.writeScriptTag_;
- var scriptText = goog.loadFileSync_(src);
- if (scriptText == null) {
- throw new Error('Load of "' + src + '" failed');
- }
- if (needsTranspile) {
- scriptText = goog.transpile_.call(goog.global, scriptText, src);
- }
- if (isModule) {
- scriptText = goog.wrapModule_(src, scriptText);
- } else {
- scriptText += '\n//# sourceURL=' + src;
- }
- var isOldIE = goog.IS_OLD_IE_;
- if (isOldIE && goog.oldIeWaiting_) {
- goog.dependencies_.deferred[originalPath] = scriptText;
- goog.queuedModules_.push(originalPath);
- } else {
- importScript(src, scriptText);
- }
- }
- };
- goog.transpile_ = function(code, path) {
- var jscomp = goog.global['$jscomp'];
- if (!jscomp) {
- goog.global['$jscomp'] = jscomp = {};
- }
- var transpile = jscomp.transpile;
- if (!transpile) {
- var transpilerPath = goog.basePath + goog.TRANSPILER;
- var transpilerCode = goog.loadFileSync_(transpilerPath);
- if (transpilerCode) {
-
-
-
- eval(transpilerCode + '\n//# sourceURL=' + transpilerPath);
-
-
-
- if (goog.global['$gwtExport'] && goog.global['$gwtExport']['$jscomp'] &&
- !goog.global['$gwtExport']['$jscomp']['transpile']) {
- throw new Error(
- 'The transpiler did not properly export the "transpile" ' +
- 'method. $gwtExport: ' + JSON.stringify(goog.global['$gwtExport']));
- }
-
-
-
- goog.global['$jscomp'].transpile =
- goog.global['$gwtExport']['$jscomp']['transpile'];
- jscomp = goog.global['$jscomp'];
- transpile = jscomp.transpile;
- }
- }
- if (!transpile) {
-
-
- var suffix = ' requires transpilation but no transpiler was found.';
- transpile = jscomp.transpile = function(code, path) {
-
-
-
-
- goog.logToConsole_(path + suffix);
- return code;
- };
- }
-
- return transpile(code, path);
- };
- goog.typeOf = function(value) {
- var s = typeof value;
- if (s == 'object') {
- if (value) {
-
-
-
-
-
- if (value instanceof Array) {
- return 'array';
- } else if (value instanceof Object) {
- return s;
- }
-
-
-
- var className = Object.prototype.toString.call(
- (value));
-
-
-
- if (className == '[object Window]') {
- return 'object';
- }
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- if ((className == '[object Array]' ||
-
-
-
- typeof value.length == 'number' &&
- typeof value.splice != 'undefined' &&
- typeof value.propertyIsEnumerable != 'undefined' &&
- !value.propertyIsEnumerable('splice')
- )) {
- return 'array';
- }
-
-
-
-
-
-
-
-
-
-
-
-
-
- if ((className == '[object Function]' ||
- typeof value.call != 'undefined' &&
- typeof value.propertyIsEnumerable != 'undefined' &&
- !value.propertyIsEnumerable('call'))) {
- return 'function';
- }
- } else {
- return 'null';
- }
- } else if (s == 'function' && typeof value.call == 'undefined') {
-
-
-
-
- return 'object';
- }
- return s;
- };
- goog.isNull = function(val) {
- return val === null;
- };
- goog.isDefAndNotNull = function(val) {
-
- return val != null;
- };
- goog.isArray = function(val) {
- return goog.typeOf(val) == 'array';
- };
- goog.isArrayLike = function(val) {
- var type = goog.typeOf(val);
-
- return type == 'array' || type == 'object' && typeof val.length == 'number';
- };
- goog.isDateLike = function(val) {
- return goog.isObject(val) && typeof val.getFullYear == 'function';
- };
- goog.isFunction = function(val) {
- return goog.typeOf(val) == 'function';
- };
- goog.isObject = function(val) {
- var type = typeof val;
- return type == 'object' && val != null || type == 'function';
-
-
- };
- goog.getUid = function(obj) {
-
-
-
-
- return obj[goog.UID_PROPERTY_] ||
- (obj[goog.UID_PROPERTY_] = ++goog.uidCounter_);
- };
- goog.hasUid = function(obj) {
- return !!obj[goog.UID_PROPERTY_];
- };
- goog.removeUid = function(obj) {
-
-
-
- if (obj !== null && 'removeAttribute' in obj) {
- obj.removeAttribute(goog.UID_PROPERTY_);
- }
- try {
- delete obj[goog.UID_PROPERTY_];
- } catch (ex) {
- }
- };
- goog.UID_PROPERTY_ = 'closure_uid_' + ((Math.random() * 1e9) >>> 0);
- goog.uidCounter_ = 0;
- goog.getHashCode = goog.getUid;
- goog.removeHashCode = goog.removeUid;
- goog.cloneObject = function(obj) {
- var type = goog.typeOf(obj);
- if (type == 'object' || type == 'array') {
- if (obj.clone) {
- return obj.clone();
- }
- var clone = type == 'array' ? [] : {};
- for (var key in obj) {
- clone[key] = goog.cloneObject(obj[key]);
- }
- return clone;
- }
- return obj;
- };
- goog.bindNative_ = function(fn, selfObj, var_args) {
- return (fn.call.apply(fn.bind, arguments));
- };
- goog.bindJs_ = function(fn, selfObj, var_args) {
- if (!fn) {
- throw new Error();
- }
- if (arguments.length > 2) {
- var boundArgs = Array.prototype.slice.call(arguments, 2);
- return function() {
-
- var newArgs = Array.prototype.slice.call(arguments);
- Array.prototype.unshift.apply(newArgs, boundArgs);
- return fn.apply(selfObj, newArgs);
- };
- } else {
- return function() {
- return fn.apply(selfObj, arguments);
- };
- }
- };
- goog.bind = function(fn, selfObj, var_args) {
-
- if (Function.prototype.bind &&
-
-
-
-
-
-
- Function.prototype.bind.toString().indexOf('native code') != -1) {
- goog.bind = goog.bindNative_;
- } else {
- goog.bind = goog.bindJs_;
- }
- return goog.bind.apply(null, arguments);
- };
- goog.partial = function(fn, var_args) {
- var args = Array.prototype.slice.call(arguments, 1);
- return function() {
-
-
- var newArgs = args.slice();
- newArgs.push.apply(newArgs, arguments);
- return fn.apply(this, newArgs);
- };
- };
- goog.mixin = function(target, source) {
- for (var x in source) {
- target[x] = source[x];
- }
-
-
-
-
-
- };
- goog.now = (goog.TRUSTED_SITE && Date.now) || (function() {
-
-
-
- return +new Date();
- });
- goog.globalEval = function(script) {
- if (goog.global.execScript) {
- goog.global.execScript(script, 'JavaScript');
- } else if (goog.global.eval) {
-
- if (goog.evalWorksForGlobals_ == null) {
- goog.global.eval('var _evalTest_ = 1;');
- if (typeof goog.global['_evalTest_'] != 'undefined') {
- try {
- delete goog.global['_evalTest_'];
- } catch (ignore) {
-
- }
- goog.evalWorksForGlobals_ = true;
- } else {
- goog.evalWorksForGlobals_ = false;
- }
- }
- if (goog.evalWorksForGlobals_) {
- goog.global.eval(script);
- } else {
-
- var doc = goog.global.document;
- var scriptElt =
- (doc.createElement('SCRIPT'));
- scriptElt.type = 'text/javascript';
- scriptElt.defer = false;
-
-
- scriptElt.appendChild(doc.createTextNode(script));
- doc.body.appendChild(scriptElt);
- doc.body.removeChild(scriptElt);
- }
- } else {
- throw Error('goog.globalEval not available');
- }
- };
- goog.evalWorksForGlobals_ = null;
- goog.cssNameMapping_;
- goog.cssNameMappingStyle_;
- goog.global.CLOSURE_CSS_NAME_MAP_FN;
- goog.getCssName = function(className, opt_modifier) {
-
-
- if (String(className).charAt(0) == '.') {
- throw new Error(
- 'className passed in goog.getCssName must not start with ".".' +
- ' You passed: ' + className);
- }
- var getMapping = function(cssName) {
- return goog.cssNameMapping_[cssName] || cssName;
- };
- var renameByParts = function(cssName) {
-
- var parts = cssName.split('-');
- var mapped = [];
- for (var i = 0; i < parts.length; i++) {
- mapped.push(getMapping(parts[i]));
- }
- return mapped.join('-');
- };
- var rename;
- if (goog.cssNameMapping_) {
- rename =
- goog.cssNameMappingStyle_ == 'BY_WHOLE' ? getMapping : renameByParts;
- } else {
- rename = function(a) {
- return a;
- };
- }
- var result =
- opt_modifier ? className + '-' + rename(opt_modifier) : rename(className);
-
-
- if (goog.global.CLOSURE_CSS_NAME_MAP_FN) {
- return goog.global.CLOSURE_CSS_NAME_MAP_FN(result);
- }
- return result;
- };
- goog.setCssNameMapping = function(mapping, opt_style) {
- goog.cssNameMapping_ = mapping;
- goog.cssNameMappingStyle_ = opt_style;
- };
- goog.global.CLOSURE_CSS_NAME_MAPPING;
- if (!COMPILED && goog.global.CLOSURE_CSS_NAME_MAPPING) {
-
-
- goog.cssNameMapping_ = goog.global.CLOSURE_CSS_NAME_MAPPING;
- }
- goog.getMsg = function(str, opt_values) {
- if (opt_values) {
- str = str.replace(/\{\$([^}]+)}/g, function(match, key) {
- return (opt_values != null && key in opt_values) ? opt_values[key] :
- match;
- });
- }
- return str;
- };
- goog.getMsgWithFallback = function(a, b) {
- return a;
- };
- goog.exportSymbol = function(publicPath, object, opt_objectToExportTo) {
- goog.exportPath_(publicPath, object, opt_objectToExportTo);
- };
- goog.exportProperty = function(object, publicName, symbol) {
- object[publicName] = symbol;
- };
- goog.inherits = function(childCtor, parentCtor) {
-
- function tempCtor() {}
- tempCtor.prototype = parentCtor.prototype;
- childCtor.superClass_ = parentCtor.prototype;
- childCtor.prototype = new tempCtor();
-
- childCtor.prototype.constructor = childCtor;
-
- childCtor.base = function(me, methodName, var_args) {
-
-
- var args = new Array(arguments.length - 2);
- for (var i = 2; i < arguments.length; i++) {
- args[i - 2] = arguments[i];
- }
- return parentCtor.prototype[methodName].apply(me, args);
- };
- };
- goog.base = function(me, opt_methodName, var_args) {
- var caller = arguments.callee.caller;
- if (goog.STRICT_MODE_COMPATIBLE || (goog.DEBUG && !caller)) {
- 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 (caller.superClass_) {
-
-
- var ctorArgs = new Array(arguments.length - 1);
- for (var i = 1; i < arguments.length; i++) {
- ctorArgs[i - 1] = arguments[i];
- }
-
- return caller.superClass_.constructor.apply(me, ctorArgs);
- }
-
-
- var args = new Array(arguments.length - 2);
- for (var i = 2; i < arguments.length; i++) {
- args[i - 2] = arguments[i];
- }
- var foundCaller = false;
- for (var ctor = me.constructor; ctor;
- ctor = ctor.superClass_ && ctor.superClass_.constructor) {
- if (ctor.prototype[opt_methodName] === caller) {
- foundCaller = true;
- } else if (foundCaller) {
- return ctor.prototype[opt_methodName].apply(me, args);
- }
- }
-
-
-
-
- if (me[opt_methodName] === caller) {
- return me.constructor.prototype[opt_methodName].apply(me, args);
- } else {
- throw Error(
- 'goog.base called from a method of one name ' +
- 'to a method of a different name');
- }
- };
- goog.scope = function(fn) {
- if (goog.isInModuleLoader_()) {
- throw Error('goog.scope is not supported within a goog.module.');
- }
- fn.call(goog.global);
- };
- if (!COMPILED) {
- goog.global['COMPILED'] = COMPILED;
- }
- goog.defineClass = function(superClass, def) {
-
- var constructor = def.constructor;
- var statics = def.statics;
- // Wrap the constructor prior to setting up the prototype and static methods.
- if (!constructor || constructor == Object.prototype.constructor) {
- constructor = function() {
- throw Error('cannot instantiate an interface (no constructor defined).');
- };
- }
- var cls = goog.defineClass.createSealingConstructor_(constructor, superClass);
- if (superClass) {
- goog.inherits(cls, superClass);
- }
-
- delete def.constructor;
- delete def.statics;
- goog.defineClass.applyProperties_(cls.prototype, def);
- if (statics != null) {
- if (statics instanceof Function) {
- statics(cls);
- } else {
- goog.defineClass.applyProperties_(cls, statics);
- }
- }
- return cls;
- };
- goog.defineClass.ClassDescriptor;
- goog.define('goog.defineClass.SEAL_CLASS_INSTANCES', goog.DEBUG);
- goog.defineClass.createSealingConstructor_ = function(ctr, superClass) {
- if (!goog.defineClass.SEAL_CLASS_INSTANCES) {
-
-
- return ctr;
- }
-
-
- var superclassSealable = !goog.defineClass.isUnsealable_(superClass);
-
- var wrappedCtr = function() {
-
-
- var instance = ctr.apply(this, arguments) || this;
- instance[goog.UID_PROPERTY_] = instance[goog.UID_PROPERTY_];
- if (this.constructor === wrappedCtr && superclassSealable &&
- Object.seal instanceof Function) {
- Object.seal(instance);
- }
- return instance;
- };
- return wrappedCtr;
- };
- goog.defineClass.isUnsealable_ = function(ctr) {
- return ctr && ctr.prototype &&
- ctr.prototype[goog.UNSEALABLE_CONSTRUCTOR_PROPERTY_];
- };
- goog.defineClass.OBJECT_PROTOTYPE_FIELDS_ = [
- 'constructor', 'hasOwnProperty', 'isPrototypeOf', 'propertyIsEnumerable',
- 'toLocaleString', 'toString', 'valueOf'
- ];
- goog.defineClass.applyProperties_ = function(target, source) {
-
- var key;
- for (key in source) {
- if (Object.prototype.hasOwnProperty.call(source, key)) {
- target[key] = source[key];
- }
- }
-
-
-
-
-
- for (var i = 0; i < goog.defineClass.OBJECT_PROTOTYPE_FIELDS_.length; i++) {
- key = goog.defineClass.OBJECT_PROTOTYPE_FIELDS_[i];
- if (Object.prototype.hasOwnProperty.call(source, key)) {
- target[key] = source[key];
- }
- }
- };
- goog.tagUnsealableClass = function(ctr) {
- if (!COMPILED && goog.defineClass.SEAL_CLASS_INSTANCES) {
- ctr.prototype[goog.UNSEALABLE_CONSTRUCTOR_PROPERTY_] = true;
- }
- };
- goog.UNSEALABLE_CONSTRUCTOR_PROPERTY_ = 'goog_defineClass_legacy_unsealable';
- goog.createRequiresTranspilation_ = function() {
- var requiresTranspilation = {'es3': false};
- var transpilationRequiredForAllLaterModes = false;
-
- function addNewerLanguageTranspilationCheck(modeName, isSupported) {
- if (transpilationRequiredForAllLaterModes) {
- requiresTranspilation[modeName] = true;
- } else if (isSupported()) {
- requiresTranspilation[modeName] = false;
- } else {
- requiresTranspilation[modeName] = true;
- transpilationRequiredForAllLaterModes = true;
- }
- }
-
- function /** boolean */ evalCheck(/** string */ code) {
- try {
- return !!eval(code);
- } catch (ignored) {
- return false;
- }
- }
- var userAgent = goog.global.navigator && goog.global.navigator.userAgent ?
- goog.global.navigator.userAgent :
- '';
-
- addNewerLanguageTranspilationCheck('es5', function() {
- return evalCheck('[1,].length==1');
- });
- addNewerLanguageTranspilationCheck('es6', function() {
-
-
- var re = /Edge\/(\d+)(\.\d)*/i;
- var edgeUserAgent = userAgent.match(re);
- if (edgeUserAgent && Number(edgeUserAgent[1]) < 15) {
- return false;
- }
-
-
-
-
- var es6fullTest =
- '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}';
- return evalCheck('(()=>{"use strict";' + es6fullTest + '})()');
- });
-
-
-
-
- addNewerLanguageTranspilationCheck('es6-impl', function() {
- return true;
- });
-
- addNewerLanguageTranspilationCheck('es7', function() {
- return evalCheck('2 ** 2 == 4');
- });
-
- addNewerLanguageTranspilationCheck('es8', function() {
- return evalCheck('async () => 1, true');
- });
- return requiresTranspilation;
- };
|