@hisptz/dhis2-analytics 1.0.44 → 1.0.45
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/build/cjs/components/CircularProgressDashboard/index.js +15 -0
- package/build/cjs/components/Map/components/MapLayer/components/GoogleEngineLayer/services/api.js +3 -2
- package/build/cjs/components/SingleValueContainer/index.js +16 -0
- package/build/es/components/CircularProgressDashboard/index.js +1 -0
- package/build/es/components/Map/components/MapLayer/components/GoogleEngineLayer/services/api.js +2 -1
- package/build/es/components/Map/components/MapLayer/components/GoogleEngineLayer/services/engine.js +1 -1
- package/build/es/components/SingleValueContainer/index.js +1 -0
- package/build/types/components/CircularProgressDashboard/index.d.ts +1 -0
- package/build/types/components/SingleValueContainer/index.d.ts +1 -0
- package/package.json +12 -8
- package/build/cjs/components/ChartAnalytics/ChartAnalytics.stories.js +0 -253
- package/build/cjs/components/ChartAnalytics/data/column-data.json +0 -210
- package/build/cjs/components/ChartAnalytics/data/complex-multi-series-data.json +0 -124
- package/build/cjs/components/ChartAnalytics/data/multi-series-data.json +0 -536
- package/build/cjs/components/ChartAnalytics/data/pie-data.json +0 -115
- package/build/cjs/components/ChartAnalytics/data/stacked-chart-data.json +0 -415
- package/build/cjs/components/CircularProgressDashboard/CircularProgressIndicator.stories.js +0 -45
- package/build/cjs/components/CustomPivotTable/CustomPivotTable.stories.js +0 -69
- package/build/cjs/components/Map/Map.stories.js +0 -352
- package/build/cjs/components/SingleValueContainer/SingleValueContainer.stories.js +0 -127
- package/build/cjs/components/Visualization/Visualization.stories.js +0 -138
- package/build/cjs/dataProviders/map.js +0 -31
- package/build/es/components/ChartAnalytics/ChartAnalytics.stories.js +0 -235
- package/build/es/components/ChartAnalytics/data/column-data.json +0 -210
- package/build/es/components/ChartAnalytics/data/complex-multi-series-data.json +0 -124
- package/build/es/components/ChartAnalytics/data/multi-series-data.json +0 -536
- package/build/es/components/ChartAnalytics/data/pie-data.json +0 -115
- package/build/es/components/ChartAnalytics/data/stacked-chart-data.json +0 -415
- package/build/es/components/CircularProgressDashboard/CircularProgressIndicator.stories.js +0 -34
- package/build/es/components/CustomPivotTable/CustomPivotTable.stories.js +0 -59
- package/build/es/components/Map/Map.stories.js +0 -334
- package/build/es/components/SingleValueContainer/SingleValueContainer.stories.js +0 -115
- package/build/es/components/Visualization/Visualization.stories.js +0 -129
- package/build/es/dataProviders/map.js +0 -24
- package/build/types/components/Map/components/MapLayer/components/GoogleEngineLayer/services/api.d.ts +0 -1
package/build/cjs/components/Map/components/MapLayer/components/GoogleEngineLayer/services/api.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
"use strict";// @ts-nocheck
|
|
1
|
+
"use strict";Object.defineProperty(exports,"__esModule",{value:true});exports.default=void 0;// @ts-nocheck
|
|
2
2
|
/*
|
|
3
3
|
|
|
4
4
|
Copyright The Closure Library Authors.
|
|
@@ -11,4 +11,5 @@ var isChrome87,$jscomp=$jscomp||{};$jscomp.scope={};$jscomp.arrayIteratorImpl=fu
|
|
|
11
11
|
Copyright 2005, 2007 Bob Ippolito. All Rights Reserved.
|
|
12
12
|
Copyright The Closure Library Authors.
|
|
13
13
|
SPDX-License-Identifier: MIT
|
|
14
|
-
*/goog.async.Deferred=function(opt_onCancelFunction,opt_defaultScope){this.sequence_=[];this.onCancelFunction_=opt_onCancelFunction;this.defaultScope_=opt_defaultScope||null;this.hadError_=this.fired_=!1;this.result_=void 0;this.silentlyCanceled_=this.blocking_=this.blocked_=!1;this.unhandledErrorId_=0;this.parent_=null;this.branches_=0;if(goog.async.Deferred.LONG_STACK_TRACES&&(this.constructorStack_=null,Error.captureStackTrace)){var target={stack:""};Error.captureStackTrace(target,goog.async.Deferred);"string"==typeof target.stack&&(this.constructorStack_=target.stack.replace(/^[^\n]*\n/,""));}};goog.async.Deferred.STRICT_ERRORS=!1;goog.async.Deferred.LONG_STACK_TRACES=!1;goog.async.Deferred.prototype.cancel=function(opt_deepCancel){if(this.hasFired()){this.result_ instanceof goog.async.Deferred&&this.result_.cancel();}else{if(this.parent_){var parent=this.parent_;delete this.parent_;opt_deepCancel?parent.cancel(opt_deepCancel):parent.branchCancel_();}this.onCancelFunction_?this.onCancelFunction_.call(this.defaultScope_,this):this.silentlyCanceled_=!0;this.hasFired()||this.errback(new goog.async.Deferred.CanceledError(this));}};goog.async.Deferred.prototype.branchCancel_=function(){this.branches_--;0>=this.branches_&&this.cancel();};goog.async.Deferred.prototype.continue_=function(isSuccess,res){this.blocked_=!1;this.updateResult_(isSuccess,res);};goog.async.Deferred.prototype.updateResult_=function(isSuccess,res){this.fired_=!0;this.result_=res;this.hadError_=!isSuccess;this.fire_();};goog.async.Deferred.prototype.check_=function(){if(this.hasFired()){if(!this.silentlyCanceled_){throw new goog.async.Deferred.AlreadyCalledError(this);}this.silentlyCanceled_=!1;}};goog.async.Deferred.prototype.callback=function(opt_result){this.check_();this.assertNotDeferred_(opt_result);this.updateResult_(!0,opt_result);};goog.async.Deferred.prototype.errback=function(opt_result){this.check_();this.assertNotDeferred_(opt_result);this.makeStackTraceLong_(opt_result);this.updateResult_(!1,opt_result);};goog.async.Deferred.unhandledErrorHandler_=function(e){throw e;};goog.async.Deferred.setUnhandledErrorHandler=function(handler){goog.async.Deferred.unhandledErrorHandler_=handler;};goog.async.Deferred.prototype.makeStackTraceLong_=function(error){goog.async.Deferred.LONG_STACK_TRACES&&this.constructorStack_&&goog.isObject(error)&&error.stack&&/^[^\n]+(\n [^\n]+)+/.test(error.stack)&&(error.stack=error.stack+"\nDEFERRED OPERATION:\n"+this.constructorStack_);};goog.async.Deferred.prototype.assertNotDeferred_=function(obj){goog.asserts.assert(!(obj instanceof goog.async.Deferred),"An execution sequence may not be initiated with a blocking Deferred.");};goog.async.Deferred.prototype.addCallback=function(cb,opt_scope){return this.addCallbacks(cb,null,opt_scope);};goog.async.Deferred.prototype.addErrback=function(eb,opt_scope){return this.addCallbacks(null,eb,opt_scope);};goog.async.Deferred.prototype.addBoth=function(f,opt_scope){return this.addCallbacks(f,f,opt_scope);};goog.async.Deferred.prototype.addFinally=function(f,opt_scope){return this.addCallbacks(f,function(err){var result=f.call(this,err);if(void 0===result){throw err;}return result;},opt_scope);};goog.async.Deferred.prototype.addCallbacks=function(cb,eb,opt_scope){goog.asserts.assert(!this.blocking_,"Blocking Deferreds can not be re-used");this.sequence_.push([cb,eb,opt_scope]);this.hasFired()&&this.fire_();return this;};goog.async.Deferred.prototype.then=function(opt_onFulfilled,opt_onRejected,opt_context){var reject,resolve,promise=new goog.Promise(function(res,rej){resolve=res;reject=rej;});this.addCallbacks(resolve,function(reason){reason instanceof goog.async.Deferred.CanceledError?promise.cancel():reject(reason);});return promise.then(opt_onFulfilled,opt_onRejected,opt_context);};goog.Thenable.addImplementation(goog.async.Deferred);goog.async.Deferred.prototype.chainDeferred=function(otherDeferred){this.addCallbacks(otherDeferred.callback,otherDeferred.errback,otherDeferred);return this;};goog.async.Deferred.prototype.awaitDeferred=function(otherDeferred){return otherDeferred instanceof goog.async.Deferred?this.addCallback(goog.bind(otherDeferred.branch,otherDeferred)):this.addCallback(function(){return otherDeferred;});};goog.async.Deferred.prototype.branch=function(opt_propagateCancel){var d=new goog.async.Deferred();this.chainDeferred(d);opt_propagateCancel&&(d.parent_=this,this.branches_++);return d;};goog.async.Deferred.prototype.hasFired=function(){return this.fired_;};goog.async.Deferred.prototype.isError=function(res){return res instanceof Error;};goog.async.Deferred.prototype.hasErrback_=function(){return module$contents$goog$array_some(this.sequence_,function(sequenceRow){return"function"===typeof sequenceRow[1];});};goog.async.Deferred.prototype.getLastValueForMigration=function(){return this.hasFired()&&!this.hadError_?this.result_:void 0;};goog.async.Deferred.prototype.fire_=function(){this.unhandledErrorId_&&this.hasFired()&&this.hasErrback_()&&(goog.async.Deferred.unscheduleError_(this.unhandledErrorId_),this.unhandledErrorId_=0);this.parent_&&(this.parent_.branches_--,delete this.parent_);for(var res=this.result_,unhandledException=!1,isNewlyBlocked=!1;this.sequence_.length&&!this.blocked_;){var sequenceEntry=this.sequence_.shift(),callback=sequenceEntry[0],errback=sequenceEntry[1],scope=sequenceEntry[2],f=this.hadError_?errback:callback;if(f){try{var ret=f.call(scope||this.defaultScope_,res);void 0!==ret&&(this.hadError_=this.hadError_&&(ret==res||this.isError(ret)),this.result_=res=ret);if(goog.Thenable.isImplementedBy(res)||"function"===typeof goog.global.Promise&&res instanceof goog.global.Promise){this.blocked_=isNewlyBlocked=!0;}}catch(ex){res=ex,this.hadError_=!0,this.makeStackTraceLong_(res),this.hasErrback_()||(unhandledException=!0);}}}this.result_=res;if(isNewlyBlocked){var onCallback=goog.bind(this.continue_,this,!0),onErrback=goog.bind(this.continue_,this,!1);res instanceof goog.async.Deferred?(res.addCallbacks(onCallback,onErrback),res.blocking_=!0):res.then(onCallback,onErrback);}else{!goog.async.Deferred.STRICT_ERRORS||!this.isError(res)||res instanceof goog.async.Deferred.CanceledError||(unhandledException=this.hadError_=!0);}unhandledException&&(this.unhandledErrorId_=goog.async.Deferred.scheduleError_(res));};goog.async.Deferred.succeed=function(opt_result){var d=new goog.async.Deferred();d.callback(opt_result);return d;};goog.async.Deferred.fromPromise=function(promise){var d=new goog.async.Deferred();promise.then(function(value){d.callback(value);},function(error){d.errback(error);});return d;};goog.async.Deferred.fail=function(res){var d=new goog.async.Deferred();d.errback(res);return d;};goog.async.Deferred.canceled=function(){var d=new goog.async.Deferred();d.cancel();return d;};goog.async.Deferred.when=function(value,callback,opt_scope){return value instanceof goog.async.Deferred?value.branch(!0).addCallback(callback,opt_scope):goog.async.Deferred.succeed(value).addCallback(callback,opt_scope);};goog.async.Deferred.AlreadyCalledError=function(deferred){module$contents$goog$debug$Error_DebugError.call(this);this.deferred=deferred;};goog.inherits(goog.async.Deferred.AlreadyCalledError,module$contents$goog$debug$Error_DebugError);goog.async.Deferred.AlreadyCalledError.prototype.message="Deferred has already fired";goog.async.Deferred.AlreadyCalledError.prototype.name="AlreadyCalledError";goog.async.Deferred.CanceledError=function(deferred){module$contents$goog$debug$Error_DebugError.call(this);this.deferred=deferred;};goog.inherits(goog.async.Deferred.CanceledError,module$contents$goog$debug$Error_DebugError);goog.async.Deferred.CanceledError.prototype.message="Deferred was canceled";goog.async.Deferred.CanceledError.prototype.name="CanceledError";goog.async.Deferred.Error_=function(error){this.id_=goog.global.setTimeout(goog.bind(this.throwError,this),0);this.error_=error;};goog.async.Deferred.Error_.prototype.throwError=function(){goog.asserts.assert(goog.async.Deferred.errorMap_[this.id_],"Cannot throw an error that is not scheduled.");delete goog.async.Deferred.errorMap_[this.id_];goog.async.Deferred.unhandledErrorHandler_(this.error_);};goog.async.Deferred.Error_.prototype.resetTimer=function(){goog.global.clearTimeout(this.id_);};goog.async.Deferred.errorMap_={};goog.async.Deferred.scheduleError_=function(error){var deferredError=new goog.async.Deferred.Error_(error);goog.async.Deferred.errorMap_[deferredError.id_]=deferredError;return deferredError.id_;};goog.async.Deferred.unscheduleError_=function(id){var error=goog.async.Deferred.errorMap_[id];error&&(error.resetTimer(),delete goog.async.Deferred.errorMap_[id]);};goog.async.Deferred.assertNoErrors=function(){var map=goog.async.Deferred.errorMap_,key;for(key in map){var error=map[key];error.resetTimer();error.throwError();}};goog.net={};goog.net.jsloader={};goog.net.jsloader.Options={};goog.net.jsloader.GLOBAL_VERIFY_OBJS_="closure_verification";goog.net.jsloader.DEFAULT_TIMEOUT=5000;goog.net.jsloader.scriptsToLoad_=[];goog.net.jsloader.safeLoadMany=function(trustedUris,opt_options){if(!trustedUris.length){return goog.async.Deferred.succeed(null);}var isAnotherModuleLoading=goog.net.jsloader.scriptsToLoad_.length;module$contents$goog$array_extend(goog.net.jsloader.scriptsToLoad_,trustedUris);if(isAnotherModuleLoading){return goog.net.jsloader.scriptLoadingDeferred_;}trustedUris=goog.net.jsloader.scriptsToLoad_;var popAndLoadNextScript=function(){var trustedUri=trustedUris.shift(),deferred=goog.net.jsloader.safeLoad(trustedUri,opt_options);trustedUris.length&&deferred.addBoth(popAndLoadNextScript);return deferred;};goog.net.jsloader.scriptLoadingDeferred_=popAndLoadNextScript();return goog.net.jsloader.scriptLoadingDeferred_;};goog.net.jsloader.safeLoad=function(trustedUri,opt_options){var options=opt_options||{},doc=options.document||document,uri=goog.html.TrustedResourceUrl.unwrap(trustedUri),script=new goog.dom.DomHelper(doc).createElement(goog.dom.TagName.SCRIPT),request={script_:script,timeout_:void 0},deferred=new goog.async.Deferred(goog.net.jsloader.cancel_,request),timeout=null,timeoutDuration=null!=options.timeout?options.timeout:goog.net.jsloader.DEFAULT_TIMEOUT;0<timeoutDuration&&(timeout=window.setTimeout(function(){goog.net.jsloader.cleanup_(script,!0);deferred.errback(new goog.net.jsloader.Error(goog.net.jsloader.ErrorCode.TIMEOUT,"Timeout reached for loading script "+uri));},timeoutDuration),request.timeout_=timeout);script.onload=script.onreadystatechange=function(){script.readyState&&"loaded"!=script.readyState&&"complete"!=script.readyState||(goog.net.jsloader.cleanup_(script,options.cleanupWhenDone||!1,timeout),deferred.callback(null));};script.onerror=function(){goog.net.jsloader.cleanup_(script,!0,timeout);deferred.errback(new goog.net.jsloader.Error(goog.net.jsloader.ErrorCode.LOAD_ERROR,"Error while loading script "+uri));};var properties=options.attributes||{};module$contents$goog$object_extend(properties,{type:"text/javascript",charset:"UTF-8"});goog.dom.setProperties(script,properties);goog.dom.safe.setScriptSrc(script,trustedUri);goog.net.jsloader.getScriptParentElement_(doc).appendChild(script);return deferred;};goog.net.jsloader.safeLoadAndVerify=function(trustedUri,verificationObjName,options){goog.global[goog.net.jsloader.GLOBAL_VERIFY_OBJS_]||(goog.global[goog.net.jsloader.GLOBAL_VERIFY_OBJS_]={});var verifyObjs=goog.global[goog.net.jsloader.GLOBAL_VERIFY_OBJS_],uri=goog.html.TrustedResourceUrl.unwrap(trustedUri);if(void 0!==verifyObjs[verificationObjName]){return goog.async.Deferred.fail(new goog.net.jsloader.Error(goog.net.jsloader.ErrorCode.VERIFY_OBJECT_ALREADY_EXISTS,"Verification object "+verificationObjName+" already defined."));}var sendDeferred=goog.net.jsloader.safeLoad(trustedUri,options),deferred=new goog.async.Deferred(goog.bind(sendDeferred.cancel,sendDeferred));sendDeferred.addCallback(function(){var result=verifyObjs[verificationObjName];void 0!==result?(deferred.callback(result),delete verifyObjs[verificationObjName]):deferred.errback(new goog.net.jsloader.Error(goog.net.jsloader.ErrorCode.VERIFY_ERROR,"Script "+uri+" loaded, but verification object "+verificationObjName+" was not defined."));});sendDeferred.addErrback(function(error){void 0!==verifyObjs[verificationObjName]&&delete verifyObjs[verificationObjName];deferred.errback(error);});return deferred;};goog.net.jsloader.getScriptParentElement_=function(doc){var headElements=goog.dom.getElementsByTagName(goog.dom.TagName.HEAD,doc);return headElements&&0!==headElements.length?headElements[0]:doc.documentElement;};goog.net.jsloader.cancel_=function(){if(this&&this.script_){var scriptNode=this.script_;scriptNode&&scriptNode.tagName==goog.dom.TagName.SCRIPT&&goog.net.jsloader.cleanup_(scriptNode,!0,this.timeout_);}};goog.net.jsloader.cleanup_=function(scriptNode,removeScriptNode,opt_timeout){null!=opt_timeout&&goog.global.clearTimeout(opt_timeout);scriptNode.onload=goog.nullFunction;scriptNode.onerror=goog.nullFunction;scriptNode.onreadystatechange=goog.nullFunction;removeScriptNode&&window.setTimeout(function(){goog.dom.removeNode(scriptNode);},0);};goog.net.jsloader.ErrorCode={LOAD_ERROR:0,TIMEOUT:1,VERIFY_ERROR:2,VERIFY_OBJECT_ALREADY_EXISTS:3};goog.net.jsloader.Error=function(code,opt_message){var msg="Jsloader error (code #"+code+")";opt_message&&(msg+=": "+opt_message);module$contents$goog$debug$Error_DebugError.call(this,msg);this.code=code;};goog.inherits(goog.net.jsloader.Error,module$contents$goog$debug$Error_DebugError);goog.json={};goog.json.Replacer={};goog.json.Reviver={};goog.json.USE_NATIVE_JSON=!1;goog.json.TRY_NATIVE_JSON=!0;goog.json.isValid=function(s){return /^\s*$/.test(s)?!1:/^[\],:{}\s\u2028\u2029]*$/.test(s.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,""));};goog.json.errorLogger_=goog.nullFunction;goog.json.setErrorLogger=function(errorLogger){goog.json.errorLogger_=errorLogger;};goog.json.parse=goog.json.USE_NATIVE_JSON?goog.global.JSON.parse:function(s){if(goog.json.TRY_NATIVE_JSON){try{return goog.global.JSON.parse(s);}catch(ex){var error=ex;}}var o=String(s);if(goog.json.isValid(o)){try{var result=eval("("+o+")");error&&goog.json.errorLogger_("Invalid JSON: "+o,error);return result;}catch(ex$50){}}throw Error("Invalid JSON string: "+o);};goog.json.serialize=goog.json.USE_NATIVE_JSON?goog.global.JSON.stringify:function(object,opt_replacer){return new goog.json.Serializer(opt_replacer).serialize(object);};goog.json.Serializer=function(opt_replacer){this.replacer_=opt_replacer;};goog.json.Serializer.prototype.serialize=function(object){var sb=[];this.serializeInternal(object,sb);return sb.join("");};goog.json.Serializer.prototype.serializeInternal=function(object,sb){if(null==object){sb.push("null");}else{if("object"==typeof object){if(Array.isArray(object)){this.serializeArray(object,sb);return;}if(object instanceof String||object instanceof Number||object instanceof Boolean){object=object.valueOf();}else{this.serializeObject_(object,sb);return;}}switch(typeof object){case"string":this.serializeString_(object,sb);break;case"number":this.serializeNumber_(object,sb);break;case"boolean":sb.push(String(object));break;case"function":sb.push("null");break;default:throw Error("Unknown type: "+typeof object);}}};goog.json.Serializer.charToJsonCharCache_={'"':'\\"',"\\":"\\\\","/":"\\/","\b":"\\b","\f":"\\f","\n":"\\n","\r":"\\r","\t":"\\t","\x0B":"\\u000b"};goog.json.Serializer.charsToReplace_=/\uffff/.test("\uffff")?/[\\"\x00-\x1f\x7f-\uffff]/g:/[\\"\x00-\x1f\x7f-\xff]/g;goog.json.Serializer.prototype.serializeString_=function(s,sb){sb.push('"',s.replace(goog.json.Serializer.charsToReplace_,function(c){var rv=goog.json.Serializer.charToJsonCharCache_[c];rv||(rv="\\u"+(c.charCodeAt(0)|65536).toString(16).substr(1),goog.json.Serializer.charToJsonCharCache_[c]=rv);return rv;}),'"');};goog.json.Serializer.prototype.serializeNumber_=function(n,sb){sb.push(isFinite(n)&&!isNaN(n)?String(n):"null");};goog.json.Serializer.prototype.serializeArray=function(arr,sb){var l=arr.length;sb.push("[");for(var sep="",i=0;i<l;i++){sb.push(sep);var value=arr[i];this.serializeInternal(this.replacer_?this.replacer_.call(arr,String(i),value):value,sb);sep=",";}sb.push("]");};goog.json.Serializer.prototype.serializeObject_=function(obj,sb){sb.push("{");var sep="",key;for(key in obj){if(Object.prototype.hasOwnProperty.call(obj,key)){var value=obj[key];"function"!=typeof value&&(sb.push(sep),this.serializeString_(key,sb),sb.push(":"),this.serializeInternal(this.replacer_?this.replacer_.call(obj,key,value):value,sb),sep=",");}}sb.push("}");};goog.json.hybrid={};goog.json.hybrid.stringify=goog.json.USE_NATIVE_JSON?goog.global.JSON.stringify:function(obj){if(goog.global.JSON){try{return goog.global.JSON.stringify(obj);}catch(e){}}return goog.json.serialize(obj);};goog.json.hybrid.parse_=function(jsonString,fallbackParser){if(goog.global.JSON){try{var obj=goog.global.JSON.parse(jsonString);goog.asserts.assert("object"==typeof obj);return obj;}catch(e){}}return fallbackParser(jsonString);};goog.json.hybrid.parse=goog.json.USE_NATIVE_JSON?goog.global.JSON.parse:function(jsonString){return goog.json.hybrid.parse_(jsonString,goog.json.parse);};goog.log={};goog.log.ENABLED=goog.debug.LOGGING_ENABLED;goog.log.ROOT_LOGGER_NAME="";var third_party$javascript$closure$log$log$classdecl$var0=function(name,value){this.name=name;this.value=value;};third_party$javascript$closure$log$log$classdecl$var0.prototype.toString=function(){return this.name;};goog.log.Level=third_party$javascript$closure$log$log$classdecl$var0;goog.log.Level.OFF=new goog.log.Level("OFF",Infinity);goog.log.Level.SHOUT=new goog.log.Level("SHOUT",1200);goog.log.Level.SEVERE=new goog.log.Level("SEVERE",1000);goog.log.Level.WARNING=new goog.log.Level("WARNING",900);goog.log.Level.INFO=new goog.log.Level("INFO",800);goog.log.Level.CONFIG=new goog.log.Level("CONFIG",700);goog.log.Level.FINE=new goog.log.Level("FINE",500);goog.log.Level.FINER=new goog.log.Level("FINER",400);goog.log.Level.FINEST=new goog.log.Level("FINEST",300);goog.log.Level.ALL=new goog.log.Level("ALL",0);goog.log.Level.PREDEFINED_LEVELS=[goog.log.Level.OFF,goog.log.Level.SHOUT,goog.log.Level.SEVERE,goog.log.Level.WARNING,goog.log.Level.INFO,goog.log.Level.CONFIG,goog.log.Level.FINE,goog.log.Level.FINER,goog.log.Level.FINEST,goog.log.Level.ALL];goog.log.Level.predefinedLevelsCache_=null;goog.log.Level.createPredefinedLevelsCache_=function(){goog.log.Level.predefinedLevelsCache_={};for(var i=0,level=void 0;level=goog.log.Level.PREDEFINED_LEVELS[i];i++){goog.log.Level.predefinedLevelsCache_[level.value]=level,goog.log.Level.predefinedLevelsCache_[level.name]=level;}};goog.log.Level.getPredefinedLevel=function(name){goog.log.Level.predefinedLevelsCache_||goog.log.Level.createPredefinedLevelsCache_();return goog.log.Level.predefinedLevelsCache_[name]||null;};goog.log.Level.getPredefinedLevelByValue=function(value){goog.log.Level.predefinedLevelsCache_||goog.log.Level.createPredefinedLevelsCache_();if(value in goog.log.Level.predefinedLevelsCache_){return goog.log.Level.predefinedLevelsCache_[value];}for(var i=0;i<goog.log.Level.PREDEFINED_LEVELS.length;++i){var level=goog.log.Level.PREDEFINED_LEVELS[i];if(level.value<=value){return level;}}return null;};var third_party$javascript$closure$log$log$classdecl$var1=function(){};third_party$javascript$closure$log$log$classdecl$var1.prototype.getName=function(){};goog.log.Logger=third_party$javascript$closure$log$log$classdecl$var1;goog.log.Logger.Level=goog.log.Level;var third_party$javascript$closure$log$log$classdecl$var2=function(capacity){this.capacity_="number"===typeof capacity?capacity:goog.log.LogBuffer.CAPACITY;this.clear();};third_party$javascript$closure$log$log$classdecl$var2.prototype.addRecord=function(level,msg,loggerName){if(!this.isBufferingEnabled()){return new goog.log.LogRecord(level,msg,loggerName);}var curIndex=(this.curIndex_+1)%this.capacity_;this.curIndex_=curIndex;if(this.isFull_){var ret=this.buffer_[curIndex];ret.reset(level,msg,loggerName);return ret;}this.isFull_=curIndex==this.capacity_-1;return this.buffer_[curIndex]=new goog.log.LogRecord(level,msg,loggerName);};third_party$javascript$closure$log$log$classdecl$var2.prototype.forEachRecord=function(func){var buffer=this.buffer_;if(buffer[0]){var curIndex=this.curIndex_,i=this.isFull_?curIndex:-1;do{i=(i+1)%this.capacity_,func(buffer[i]);}while(i!==curIndex);}};third_party$javascript$closure$log$log$classdecl$var2.prototype.isBufferingEnabled=function(){return 0<this.capacity_;};third_party$javascript$closure$log$log$classdecl$var2.prototype.isFull=function(){return this.isFull_;};third_party$javascript$closure$log$log$classdecl$var2.prototype.clear=function(){this.buffer_=Array(this.capacity_);this.curIndex_=-1;this.isFull_=!1;};goog.log.LogBuffer=third_party$javascript$closure$log$log$classdecl$var2;goog.log.LogBuffer.CAPACITY=0;goog.log.LogBuffer.getInstance=function(){goog.log.LogBuffer.instance_||(goog.log.LogBuffer.instance_=new goog.log.LogBuffer(goog.log.LogBuffer.CAPACITY));return goog.log.LogBuffer.instance_;};goog.log.LogBuffer.isBufferingEnabled=function(){return goog.log.LogBuffer.getInstance().isBufferingEnabled();};var third_party$javascript$closure$log$log$classdecl$var3=function(level,msg,loggerName,time,sequenceNumber){this.exception_=void 0;this.reset(level||goog.log.Level.OFF,msg,loggerName,time,sequenceNumber);};third_party$javascript$closure$log$log$classdecl$var3.prototype.reset=function(level,msg,loggerName,time,sequenceNumber){this.time_=time||goog.now();this.level_=level;this.msg_=msg;this.loggerName_=loggerName;this.exception_=void 0;this.sequenceNumber_="number"===typeof sequenceNumber?sequenceNumber:goog.log.LogRecord.nextSequenceNumber_;};third_party$javascript$closure$log$log$classdecl$var3.prototype.getLoggerName=function(){return this.loggerName_;};third_party$javascript$closure$log$log$classdecl$var3.prototype.setLoggerName=function(name){this.loggerName_=name;};third_party$javascript$closure$log$log$classdecl$var3.prototype.getException=function(){return this.exception_;};third_party$javascript$closure$log$log$classdecl$var3.prototype.setException=function(exception){this.exception_=exception;};third_party$javascript$closure$log$log$classdecl$var3.prototype.getLevel=function(){return this.level_;};third_party$javascript$closure$log$log$classdecl$var3.prototype.setLevel=function(level){this.level_=level;};third_party$javascript$closure$log$log$classdecl$var3.prototype.getMessage=function(){return this.msg_;};third_party$javascript$closure$log$log$classdecl$var3.prototype.setMessage=function(msg){this.msg_=msg;};third_party$javascript$closure$log$log$classdecl$var3.prototype.getMillis=function(){return this.time_;};third_party$javascript$closure$log$log$classdecl$var3.prototype.setMillis=function(time){this.time_=time;};third_party$javascript$closure$log$log$classdecl$var3.prototype.getSequenceNumber=function(){return this.sequenceNumber_;};goog.log.LogRecord=third_party$javascript$closure$log$log$classdecl$var3;goog.log.LogRecord.nextSequenceNumber_=0;var third_party$javascript$closure$log$log$classdecl$var4=function(name,parent){this.level=null;this.handlers=[];this.parent=(void 0===parent?null:parent)||null;this.children=[];this.logger={getName:function(){return name;}};};third_party$javascript$closure$log$log$classdecl$var4.prototype.getEffectiveLevel=function(){if(this.level){return this.level;}if(this.parent){return this.parent.getEffectiveLevel();}goog.asserts.fail("Root logger has no level set.");return goog.log.Level.OFF;};third_party$javascript$closure$log$log$classdecl$var4.prototype.publish=function(logRecord){for(var target=this;target;){target.handlers.forEach(function(handler){handler(logRecord);}),target=target.parent;}};goog.log.LogRegistryEntry_=third_party$javascript$closure$log$log$classdecl$var4;var third_party$javascript$closure$log$log$classdecl$var5=function(){this.entries={};var rootLogRegistryEntry=new goog.log.LogRegistryEntry_(goog.log.ROOT_LOGGER_NAME);rootLogRegistryEntry.level=goog.log.Level.CONFIG;this.entries[goog.log.ROOT_LOGGER_NAME]=rootLogRegistryEntry;};third_party$javascript$closure$log$log$classdecl$var5.prototype.getLogRegistryEntry=function(name,level){var entry=this.entries[name];if(entry){return void 0!==level&&(entry.level=level),entry;}var lastDotIndex=name.lastIndexOf("."),parentLogRegistryEntry=this.getLogRegistryEntry(name.substr(0,lastDotIndex)),logRegistryEntry=new goog.log.LogRegistryEntry_(name,parentLogRegistryEntry);this.entries[name]=logRegistryEntry;parentLogRegistryEntry.children.push(logRegistryEntry);void 0!==level&&(logRegistryEntry.level=level);return logRegistryEntry;};third_party$javascript$closure$log$log$classdecl$var5.prototype.getAllLoggers=function(){var $jscomp$this=this;return Object.keys(this.entries).map(function(loggerName){return $jscomp$this.entries[loggerName].logger;});};goog.log.LogRegistry_=third_party$javascript$closure$log$log$classdecl$var5;goog.log.LogRegistry_.getInstance=function(){goog.log.LogRegistry_.instance_||(goog.log.LogRegistry_.instance_=new goog.log.LogRegistry_());return goog.log.LogRegistry_.instance_;};goog.log.getLogger=function(name,level){return goog.log.ENABLED?goog.log.LogRegistry_.getInstance().getLogRegistryEntry(name,level).logger:null;};goog.log.getRootLogger=function(){return goog.log.ENABLED?goog.log.LogRegistry_.getInstance().getLogRegistryEntry(goog.log.ROOT_LOGGER_NAME).logger:null;};goog.log.addHandler=function(logger,handler){goog.log.ENABLED&&logger&&goog.log.LogRegistry_.getInstance().getLogRegistryEntry(logger.getName()).handlers.push(handler);};goog.log.removeHandler=function(logger,handler){if(goog.log.ENABLED&&logger){var loggerEntry=goog.log.LogRegistry_.getInstance().getLogRegistryEntry(logger.getName()),indexOfHandler=loggerEntry.handlers.indexOf(handler);if(-1!==indexOfHandler){return loggerEntry.handlers.splice(indexOfHandler,1),!0;}}return!1;};goog.log.setLevel=function(logger,level){goog.log.ENABLED&&logger&&(goog.log.LogRegistry_.getInstance().getLogRegistryEntry(logger.getName()).level=level);};goog.log.getLevel=function(logger){return goog.log.ENABLED&&logger?goog.log.LogRegistry_.getInstance().getLogRegistryEntry(logger.getName()).level:null;};goog.log.getEffectiveLevel=function(logger){return goog.log.ENABLED&&logger?goog.log.LogRegistry_.getInstance().getLogRegistryEntry(logger.getName()).getEffectiveLevel():goog.log.Level.OFF;};goog.log.isLoggable=function(logger,level){return goog.log.ENABLED&&logger&&level?level.value>=goog.log.getEffectiveLevel(logger).value:!1;};goog.log.getAllLoggers=function(){return goog.log.ENABLED?goog.log.LogRegistry_.getInstance().getAllLoggers():[];};goog.log.getLogRecord=function(logger,level,msg,exception){var logRecord=goog.log.LogBuffer.getInstance().addRecord(level||goog.log.Level.OFF,msg,logger.getName());logRecord.setException(exception);return logRecord;};goog.log.publishLogRecord=function(logger,logRecord){goog.log.ENABLED&&logger&&goog.log.isLoggable(logger,logRecord.getLevel())&&goog.log.LogRegistry_.getInstance().getLogRegistryEntry(logger.getName()).publish(logRecord);};goog.log.log=function(logger,level,msg,exception){if(goog.log.ENABLED&&logger&&goog.log.isLoggable(logger,level)){level=level||goog.log.Level.OFF;var loggerEntry=goog.log.LogRegistry_.getInstance().getLogRegistryEntry(logger.getName());"function"===typeof msg&&(msg=msg());var logRecord=goog.log.LogBuffer.getInstance().addRecord(level,msg,logger.getName());logRecord.setException(exception);loggerEntry.publish(logRecord);}};goog.log.error=function(logger,msg,exception){goog.log.ENABLED&&logger&&goog.log.log(logger,goog.log.Level.SEVERE,msg,exception);};goog.log.warning=function(logger,msg,exception){goog.log.ENABLED&&logger&&goog.log.log(logger,goog.log.Level.WARNING,msg,exception);};goog.log.info=function(logger,msg,exception){goog.log.ENABLED&&logger&&goog.log.log(logger,goog.log.Level.INFO,msg,exception);};goog.log.fine=function(logger,msg,exception){goog.log.ENABLED&&logger&&goog.log.log(logger,goog.log.Level.FINE,msg,exception);};goog.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};goog.net.ErrorCode.getDebugMessage=function(errorCode){switch(errorCode){case goog.net.ErrorCode.NO_ERROR:return"No Error";case goog.net.ErrorCode.ACCESS_DENIED:return"Access denied to content document";case goog.net.ErrorCode.FILE_NOT_FOUND:return"File not found";case goog.net.ErrorCode.FF_SILENT_ERROR:return"Firefox silently errored";case goog.net.ErrorCode.CUSTOM_ERROR:return"Application custom error";case goog.net.ErrorCode.EXCEPTION:return"An exception occurred";case goog.net.ErrorCode.HTTP_ERROR:return"Http response at 400 or 500 level";case goog.net.ErrorCode.ABORT:return"Request was aborted";case goog.net.ErrorCode.TIMEOUT:return"Request timed out";case goog.net.ErrorCode.OFFLINE:return"The resource is not available offline";default:return"Unrecognized error code";}};goog.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"};goog.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,MULTI_STATUS:207,MULTIPLE_CHOICES:300,MOVED_PERMANENTLY:301,FOUND:302,SEE_OTHER:303,NOT_MODIFIED:304,USE_PROXY:305,TEMPORARY_REDIRECT:307,PERMANENT_REDIRECT:308,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,UNPROCESSABLE_ENTITY:422,LOCKED:423,FAILED_DEPENDENCY:424,PRECONDITION_REQUIRED:428,TOO_MANY_REQUESTS:429,REQUEST_HEADER_FIELDS_TOO_LARGE:431,CLIENT_CLOSED_REQUEST:499,INTERNAL_SERVER_ERROR:500,NOT_IMPLEMENTED:501,BAD_GATEWAY:502,SERVICE_UNAVAILABLE:503,GATEWAY_TIMEOUT:504,HTTP_VERSION_NOT_SUPPORTED:505,INSUFFICIENT_STORAGE:507,NETWORK_AUTHENTICATION_REQUIRED:511,QUIRK_IE_NO_CONTENT:1223};goog.net.HttpStatus.isSuccess=function(status){switch(status){case goog.net.HttpStatus.OK:case goog.net.HttpStatus.CREATED:case goog.net.HttpStatus.ACCEPTED:case goog.net.HttpStatus.NO_CONTENT:case goog.net.HttpStatus.PARTIAL_CONTENT:case goog.net.HttpStatus.NOT_MODIFIED:case goog.net.HttpStatus.QUIRK_IE_NO_CONTENT:return!0;default:return!1;}};goog.net.XhrLike=function(){};goog.net.XhrLike.prototype.open=function(method,url,opt_async,opt_user,opt_password){};goog.net.XhrLike.prototype.send=function(opt_data){};goog.net.XhrLike.prototype.abort=function(){};goog.net.XhrLike.prototype.setRequestHeader=function(header,value){};goog.net.XhrLike.prototype.getResponseHeader=function(header){};goog.net.XhrLike.prototype.getAllResponseHeaders=function(){};goog.net.XhrLike.prototype.setTrustToken=function(trustTokenAttribute){};goog.net.XmlHttpFactory=function(){};goog.net.XmlHttpFactory.prototype.cachedOptions_=null;goog.net.XmlHttpFactory.prototype.getOptions=function(){return this.cachedOptions_||(this.cachedOptions_=this.internalGetOptions());};goog.net.WrapperXmlHttpFactory=function(xhrFactory,optionsFactory){this.xhrFactory_=xhrFactory;this.optionsFactory_=optionsFactory;};goog.inherits(goog.net.WrapperXmlHttpFactory,goog.net.XmlHttpFactory);goog.net.WrapperXmlHttpFactory.prototype.createInstance=function(){return this.xhrFactory_();};goog.net.WrapperXmlHttpFactory.prototype.getOptions=function(){return this.optionsFactory_();};goog.net.XmlHttp=function(){return goog.net.XmlHttp.factory_.createInstance();};goog.net.XmlHttp.ASSUME_NATIVE_XHR=!1;goog.net.XmlHttpDefines={};goog.net.XmlHttpDefines.ASSUME_NATIVE_XHR=!1;goog.net.XmlHttp.getOptions=function(){return goog.net.XmlHttp.factory_.getOptions();};goog.net.XmlHttp.OptionType={USE_NULL_FUNCTION:0,LOCAL_REQUEST_ERROR:1};goog.net.XmlHttp.ReadyState={UNINITIALIZED:0,LOADING:1,LOADED:2,INTERACTIVE:3,COMPLETE:4};goog.net.XmlHttp.setFactory=function(factory,optionsFactory){goog.net.XmlHttp.setGlobalFactory(new goog.net.WrapperXmlHttpFactory(goog.asserts.assert(factory),goog.asserts.assert(optionsFactory)));};goog.net.XmlHttp.setGlobalFactory=function(factory){goog.net.XmlHttp.factory_=factory;};goog.net.DefaultXmlHttpFactory=function(){};goog.inherits(goog.net.DefaultXmlHttpFactory,goog.net.XmlHttpFactory);goog.net.DefaultXmlHttpFactory.prototype.createInstance=function(){var progId=this.getProgId_();return progId?new ActiveXObject(progId):new XMLHttpRequest();};goog.net.DefaultXmlHttpFactory.prototype.internalGetOptions=function(){var options={};this.getProgId_()&&(options[goog.net.XmlHttp.OptionType.USE_NULL_FUNCTION]=!0,options[goog.net.XmlHttp.OptionType.LOCAL_REQUEST_ERROR]=!0);return options;};goog.net.DefaultXmlHttpFactory.prototype.getProgId_=function(){if(goog.net.XmlHttp.ASSUME_NATIVE_XHR||goog.net.XmlHttpDefines.ASSUME_NATIVE_XHR){return"";}if(!this.ieProgId_&&"undefined"==typeof XMLHttpRequest&&"undefined"!=typeof ActiveXObject){for(var ACTIVE_X_IDENTS=["MSXML2.XMLHTTP.6.0","MSXML2.XMLHTTP.3.0","MSXML2.XMLHTTP","Microsoft.XMLHTTP"],i=0;i<ACTIVE_X_IDENTS.length;i++){var candidate=ACTIVE_X_IDENTS[i];try{return new ActiveXObject(candidate),this.ieProgId_=candidate;}catch(e){}}throw Error("Could not create ActiveXObject. ActiveX might be disabled, or MSXML might not be installed");}return this.ieProgId_;};goog.net.XmlHttp.setGlobalFactory(new goog.net.DefaultXmlHttpFactory());goog.net.XhrIo=function(opt_xmlHttpFactory){goog.events.EventTarget.call(this);this.headers=new Map();this.xmlHttpFactory_=opt_xmlHttpFactory||null;this.active_=!1;this.xhrOptions_=this.xhr_=null;this.lastMethod_=this.lastUri_="";this.lastErrorCode_=goog.net.ErrorCode.NO_ERROR;this.lastError_="";this.inAbort_=this.inOpen_=this.inSend_=this.errorDispatched_=!1;this.timeoutInterval_=0;this.timeoutId_=null;this.responseType_=goog.net.XhrIo.ResponseType.DEFAULT;this.useXhr2Timeout_=this.progressEventsEnabled_=this.withCredentials_=!1;this.trustToken_=null;};goog.inherits(goog.net.XhrIo,goog.events.EventTarget);goog.net.XhrIo.ResponseType={DEFAULT:"",TEXT:"text",DOCUMENT:"document",BLOB:"blob",ARRAY_BUFFER:"arraybuffer"};goog.net.XhrIo.prototype.logger_=goog.log.getLogger("goog.net.XhrIo");goog.net.XhrIo.CONTENT_TYPE_HEADER="Content-Type";goog.net.XhrIo.CONTENT_TRANSFER_ENCODING="Content-Transfer-Encoding";goog.net.XhrIo.HTTP_SCHEME_PATTERN=/^https?$/i;goog.net.XhrIo.METHODS_WITH_FORM_DATA=["POST","PUT"];goog.net.XhrIo.FORM_CONTENT_TYPE="application/x-www-form-urlencoded;charset=utf-8";goog.net.XhrIo.XHR2_TIMEOUT_="timeout";goog.net.XhrIo.XHR2_ON_TIMEOUT_="ontimeout";goog.net.XhrIo.sendInstances_=[];goog.net.XhrIo.send=function(url,opt_callback,opt_method,opt_content,opt_headers,opt_timeoutInterval,opt_withCredentials){var x=new goog.net.XhrIo();goog.net.XhrIo.sendInstances_.push(x);opt_callback&&x.listen(goog.net.EventType.COMPLETE,opt_callback);x.listenOnce(goog.net.EventType.READY,x.cleanupSend_);opt_timeoutInterval&&x.setTimeoutInterval(opt_timeoutInterval);opt_withCredentials&&x.setWithCredentials(opt_withCredentials);x.send(url,opt_method,opt_content,opt_headers);return x;};goog.net.XhrIo.cleanup=function(){for(var instances=goog.net.XhrIo.sendInstances_;instances.length;){instances.pop().dispose();}};goog.net.XhrIo.protectEntryPoints=function(errorHandler){goog.net.XhrIo.prototype.onReadyStateChangeEntryPoint_=errorHandler.protectEntryPoint(goog.net.XhrIo.prototype.onReadyStateChangeEntryPoint_);};goog.net.XhrIo.prototype.cleanupSend_=function(){this.dispose();module$contents$goog$array_remove(goog.net.XhrIo.sendInstances_,this);};goog.net.XhrIo.prototype.getTimeoutInterval=function(){return this.timeoutInterval_;};goog.net.XhrIo.prototype.setTimeoutInterval=function(ms){this.timeoutInterval_=Math.max(0,ms);};goog.net.XhrIo.prototype.setResponseType=function(type){this.responseType_=type;};goog.net.XhrIo.prototype.getResponseType=function(){return this.responseType_;};goog.net.XhrIo.prototype.setWithCredentials=function(withCredentials){this.withCredentials_=withCredentials;};goog.net.XhrIo.prototype.getWithCredentials=function(){return this.withCredentials_;};goog.net.XhrIo.prototype.setProgressEventsEnabled=function(enabled){this.progressEventsEnabled_=enabled;};goog.net.XhrIo.prototype.getProgressEventsEnabled=function(){return this.progressEventsEnabled_;};goog.net.XhrIo.prototype.setTrustToken=function(trustToken){this.trustToken_=trustToken;};goog.net.XhrIo.prototype.send=function(url,opt_method,opt_content,opt_headers){if(this.xhr_){throw Error("[goog.net.XhrIo] Object is active with another request="+this.lastUri_+"; newUri="+url);}var method=opt_method?opt_method.toUpperCase():"GET";this.lastUri_=url;this.lastError_="";this.lastErrorCode_=goog.net.ErrorCode.NO_ERROR;this.lastMethod_=method;this.errorDispatched_=!1;this.active_=!0;this.xhr_=this.createXhr();this.xhrOptions_=this.xmlHttpFactory_?this.xmlHttpFactory_.getOptions():goog.net.XmlHttp.getOptions();this.xhr_.onreadystatechange=goog.bind(this.onReadyStateChange_,this);this.getProgressEventsEnabled()&&"onprogress"in this.xhr_&&(this.xhr_.onprogress=goog.bind(function(e){this.onProgressHandler_(e,!0);},this),this.xhr_.upload&&(this.xhr_.upload.onprogress=goog.bind(this.onProgressHandler_,this)));try{goog.log.fine(this.logger_,this.formatMsg_("Opening Xhr")),this.inOpen_=!0,this.xhr_.open(method,String(url),!0),this.inOpen_=!1;}catch(err$51){goog.log.fine(this.logger_,this.formatMsg_("Error opening Xhr: "+err$51.message));this.error_(goog.net.ErrorCode.EXCEPTION,err$51);return;}var content=opt_content||"",headers=new Map(this.headers);if(opt_headers){if(Object.getPrototypeOf(opt_headers)===Object.prototype){for(var key in opt_headers){headers.set(key,opt_headers[key]);}}else{if("function"===typeof opt_headers.keys&&"function"===typeof opt_headers.get){for(var $jscomp$iter$18=$jscomp.makeIterator(opt_headers.keys()),$jscomp$key$key=$jscomp$iter$18.next();!$jscomp$key$key.done;$jscomp$key$key=$jscomp$iter$18.next()){var key$52=$jscomp$key$key.value;headers.set(key$52,opt_headers.get(key$52));}}else{throw Error("Unknown input type for opt_headers: "+String(opt_headers));}}}var contentTypeKey=Array.from(headers.keys()).find(function(header){return goog.string.caseInsensitiveEquals(goog.net.XhrIo.CONTENT_TYPE_HEADER,header);}),contentIsFormData=goog.global.FormData&&content instanceof goog.global.FormData;!module$contents$goog$array_contains(goog.net.XhrIo.METHODS_WITH_FORM_DATA,method)||contentTypeKey||contentIsFormData||headers.set(goog.net.XhrIo.CONTENT_TYPE_HEADER,goog.net.XhrIo.FORM_CONTENT_TYPE);for(var $jscomp$iter$19=$jscomp.makeIterator(headers),$jscomp$key$=$jscomp$iter$19.next();!$jscomp$key$.done;$jscomp$key$=$jscomp$iter$19.next()){var $jscomp$destructuring$var19=$jscomp.makeIterator($jscomp$key$.value),key$53=$jscomp$destructuring$var19.next().value,value=$jscomp$destructuring$var19.next().value;this.xhr_.setRequestHeader(key$53,value);}this.responseType_&&(this.xhr_.responseType=this.responseType_);"withCredentials"in this.xhr_&&this.xhr_.withCredentials!==this.withCredentials_&&(this.xhr_.withCredentials=this.withCredentials_);if("setTrustToken"in this.xhr_&&this.trustToken_){try{this.xhr_.setTrustToken(this.trustToken_);}catch(err$54){goog.log.fine(this.logger_,this.formatMsg_("Error SetTrustToken: "+err$54.message));}}try{this.cleanUpTimeoutTimer_(),0<this.timeoutInterval_&&(this.useXhr2Timeout_=goog.net.XhrIo.shouldUseXhr2Timeout_(this.xhr_),goog.log.fine(this.logger_,this.formatMsg_("Will abort after "+this.timeoutInterval_+"ms if incomplete, xhr2 "+this.useXhr2Timeout_)),this.useXhr2Timeout_?(this.xhr_[goog.net.XhrIo.XHR2_TIMEOUT_]=this.timeoutInterval_,this.xhr_[goog.net.XhrIo.XHR2_ON_TIMEOUT_]=goog.bind(this.timeout_,this)):this.timeoutId_=goog.Timer.callOnce(this.timeout_,this.timeoutInterval_,this)),goog.log.fine(this.logger_,this.formatMsg_("Sending request")),this.inSend_=!0,this.xhr_.send(content),this.inSend_=!1;}catch(err$55){goog.log.fine(this.logger_,this.formatMsg_("Send error: "+err$55.message)),this.error_(goog.net.ErrorCode.EXCEPTION,err$55);}};goog.net.XhrIo.shouldUseXhr2Timeout_=function(xhr){return goog.userAgent.IE&&goog.userAgent.isVersionOrHigher(9)&&"number"===typeof xhr[goog.net.XhrIo.XHR2_TIMEOUT_]&&void 0!==xhr[goog.net.XhrIo.XHR2_ON_TIMEOUT_];};goog.net.XhrIo.prototype.createXhr=function(){return this.xmlHttpFactory_?this.xmlHttpFactory_.createInstance():goog.net.XmlHttp();};goog.net.XhrIo.prototype.timeout_=function(){"undefined"!=typeof goog&&this.xhr_&&(this.lastError_="Timed out after "+this.timeoutInterval_+"ms, aborting",this.lastErrorCode_=goog.net.ErrorCode.TIMEOUT,goog.log.fine(this.logger_,this.formatMsg_(this.lastError_)),this.dispatchEvent(goog.net.EventType.TIMEOUT),this.abort(goog.net.ErrorCode.TIMEOUT));};goog.net.XhrIo.prototype.error_=function(errorCode,err){this.active_=!1;this.xhr_&&(this.inAbort_=!0,this.xhr_.abort(),this.inAbort_=!1);this.lastError_=err;this.lastErrorCode_=errorCode;this.dispatchErrors_();this.cleanUpXhr_();};goog.net.XhrIo.prototype.dispatchErrors_=function(){this.errorDispatched_||(this.errorDispatched_=!0,this.dispatchEvent(goog.net.EventType.COMPLETE),this.dispatchEvent(goog.net.EventType.ERROR));};goog.net.XhrIo.prototype.abort=function(opt_failureCode){this.xhr_&&this.active_&&(goog.log.fine(this.logger_,this.formatMsg_("Aborting")),this.active_=!1,this.inAbort_=!0,this.xhr_.abort(),this.inAbort_=!1,this.lastErrorCode_=opt_failureCode||goog.net.ErrorCode.ABORT,this.dispatchEvent(goog.net.EventType.COMPLETE),this.dispatchEvent(goog.net.EventType.ABORT),this.cleanUpXhr_());};goog.net.XhrIo.prototype.disposeInternal=function(){this.xhr_&&(this.active_&&(this.active_=!1,this.inAbort_=!0,this.xhr_.abort(),this.inAbort_=!1),this.cleanUpXhr_(!0));goog.net.XhrIo.superClass_.disposeInternal.call(this);};goog.net.XhrIo.prototype.onReadyStateChange_=function(){if(!this.isDisposed()){if(this.inOpen_||this.inSend_||this.inAbort_){this.onReadyStateChangeHelper_();}else{this.onReadyStateChangeEntryPoint_();}}};goog.net.XhrIo.prototype.onReadyStateChangeEntryPoint_=function(){this.onReadyStateChangeHelper_();};goog.net.XhrIo.prototype.onReadyStateChangeHelper_=function(){if(this.active_&&"undefined"!=typeof goog){if(this.xhrOptions_[goog.net.XmlHttp.OptionType.LOCAL_REQUEST_ERROR]&&this.getReadyState()==goog.net.XmlHttp.ReadyState.COMPLETE&&2==this.getStatus()){goog.log.fine(this.logger_,this.formatMsg_("Local request error detected and ignored"));}else{if(this.inSend_&&this.getReadyState()==goog.net.XmlHttp.ReadyState.COMPLETE){goog.Timer.callOnce(this.onReadyStateChange_,0,this);}else{if(this.dispatchEvent(goog.net.EventType.READY_STATE_CHANGE),this.isComplete()){goog.log.fine(this.logger_,this.formatMsg_("Request complete"));this.active_=!1;try{this.isSuccess()?(this.dispatchEvent(goog.net.EventType.COMPLETE),this.dispatchEvent(goog.net.EventType.SUCCESS)):(this.lastErrorCode_=goog.net.ErrorCode.HTTP_ERROR,this.lastError_=this.getStatusText()+" ["+this.getStatus()+"]",this.dispatchErrors_());}finally{this.cleanUpXhr_();}}}}}};goog.net.XhrIo.prototype.onProgressHandler_=function(e,opt_isDownload){goog.asserts.assert(e.type===goog.net.EventType.PROGRESS,"goog.net.EventType.PROGRESS is of the same type as raw XHR progress.");this.dispatchEvent(goog.net.XhrIo.buildProgressEvent_(e,goog.net.EventType.PROGRESS));this.dispatchEvent(goog.net.XhrIo.buildProgressEvent_(e,opt_isDownload?goog.net.EventType.DOWNLOAD_PROGRESS:goog.net.EventType.UPLOAD_PROGRESS));};goog.net.XhrIo.buildProgressEvent_=function(e,eventType){return{type:eventType,lengthComputable:e.lengthComputable,loaded:e.loaded,total:e.total};};goog.net.XhrIo.prototype.cleanUpXhr_=function(opt_fromDispose){if(this.xhr_){this.cleanUpTimeoutTimer_();var xhr=this.xhr_,clearedOnReadyStateChange=this.xhrOptions_[goog.net.XmlHttp.OptionType.USE_NULL_FUNCTION]?goog.nullFunction:null;this.xhrOptions_=this.xhr_=null;opt_fromDispose||this.dispatchEvent(goog.net.EventType.READY);try{xhr.onreadystatechange=clearedOnReadyStateChange;}catch(e){goog.log.error(this.logger_,"Problem encountered resetting onreadystatechange: "+e.message);}}};goog.net.XhrIo.prototype.cleanUpTimeoutTimer_=function(){this.xhr_&&this.useXhr2Timeout_&&(this.xhr_[goog.net.XhrIo.XHR2_ON_TIMEOUT_]=null);this.timeoutId_&&(goog.Timer.clear(this.timeoutId_),this.timeoutId_=null);};goog.net.XhrIo.prototype.isActive=function(){return!!this.xhr_;};goog.net.XhrIo.prototype.isComplete=function(){return this.getReadyState()==goog.net.XmlHttp.ReadyState.COMPLETE;};goog.net.XhrIo.prototype.isSuccess=function(){var status=this.getStatus();return goog.net.HttpStatus.isSuccess(status)||0===status&&!this.isLastUriEffectiveSchemeHttp_();};goog.net.XhrIo.prototype.isLastUriEffectiveSchemeHttp_=function(){var scheme=goog.uri.utils.getEffectiveScheme(String(this.lastUri_));return goog.net.XhrIo.HTTP_SCHEME_PATTERN.test(scheme);};goog.net.XhrIo.prototype.getReadyState=function(){return this.xhr_?this.xhr_.readyState:goog.net.XmlHttp.ReadyState.UNINITIALIZED;};goog.net.XhrIo.prototype.getStatus=function(){try{return this.getReadyState()>goog.net.XmlHttp.ReadyState.LOADED?this.xhr_.status:-1;}catch(e){return-1;}};goog.net.XhrIo.prototype.getStatusText=function(){try{return this.getReadyState()>goog.net.XmlHttp.ReadyState.LOADED?this.xhr_.statusText:"";}catch(e){return goog.log.fine(this.logger_,"Can not get status: "+e.message),"";}};goog.net.XhrIo.prototype.getLastUri=function(){return String(this.lastUri_);};goog.net.XhrIo.prototype.getResponseText=function(){try{return this.xhr_?this.xhr_.responseText:"";}catch(e){return goog.log.fine(this.logger_,"Can not get responseText: "+e.message),"";}};goog.net.XhrIo.prototype.getResponseBody=function(){try{if(this.xhr_&&"responseBody"in this.xhr_){return this.xhr_.responseBody;}}catch(e){goog.log.fine(this.logger_,"Can not get responseBody: "+e.message);}return null;};goog.net.XhrIo.prototype.getResponseXml=function(){try{return this.xhr_?this.xhr_.responseXML:null;}catch(e){return goog.log.fine(this.logger_,"Can not get responseXML: "+e.message),null;}};goog.net.XhrIo.prototype.getResponseJson=function(opt_xssiPrefix){if(this.xhr_){var responseText=this.xhr_.responseText;opt_xssiPrefix&&0==responseText.indexOf(opt_xssiPrefix)&&(responseText=responseText.substring(opt_xssiPrefix.length));return goog.json.hybrid.parse(responseText);}};goog.net.XhrIo.prototype.getResponse=function(){try{if(!this.xhr_){return null;}if("response"in this.xhr_){return this.xhr_.response;}switch(this.responseType_){case goog.net.XhrIo.ResponseType.DEFAULT:case goog.net.XhrIo.ResponseType.TEXT:return this.xhr_.responseText;case goog.net.XhrIo.ResponseType.ARRAY_BUFFER:if("mozResponseArrayBuffer"in this.xhr_){return this.xhr_.mozResponseArrayBuffer;}}goog.log.error(this.logger_,"Response type "+this.responseType_+" is not supported on this browser");return null;}catch(e){return goog.log.fine(this.logger_,"Can not get response: "+e.message),null;}};goog.net.XhrIo.prototype.getResponseHeader=function(key){if(this.xhr_&&this.isComplete()){var value=this.xhr_.getResponseHeader(key);return null===value?void 0:value;}};goog.net.XhrIo.prototype.getAllResponseHeaders=function(){return this.xhr_&&this.isComplete()?this.xhr_.getAllResponseHeaders()||"":"";};goog.net.XhrIo.prototype.getResponseHeaders=function(){for(var headersObject={},headersArray=this.getAllResponseHeaders().split("\r\n"),i=0;i<headersArray.length;i++){if(!goog.string.isEmptyOrWhitespace(headersArray[i])){var keyValue=goog.string.splitLimit(headersArray[i],":",1),key=keyValue[0],value=keyValue[1];if("string"===typeof value){value=value.trim();var values$jscomp$0=headersObject[key]||[];headersObject[key]=values$jscomp$0;values$jscomp$0.push(value);}}}return module$contents$goog$object_map(headersObject,function(values){return values.join(", ");});};goog.net.XhrIo.prototype.getStreamingResponseHeader=function(key){return this.xhr_?this.xhr_.getResponseHeader(key):null;};goog.net.XhrIo.prototype.getAllStreamingResponseHeaders=function(){return this.xhr_?this.xhr_.getAllResponseHeaders():"";};goog.net.XhrIo.prototype.getLastErrorCode=function(){return this.lastErrorCode_;};goog.net.XhrIo.prototype.getLastError=function(){return"string"===typeof this.lastError_?this.lastError_:String(this.lastError_);};goog.net.XhrIo.prototype.formatMsg_=function(msg){return msg+" ["+this.lastMethod_+" "+this.lastUri_+" "+this.getStatus()+"]";};goog.debug.entryPointRegistry.register(function(transformer){goog.net.XhrIo.prototype.onReadyStateChangeEntryPoint_=transformer(goog.net.XhrIo.prototype.onReadyStateChangeEntryPoint_);});ee.apiclient={};var module$contents$ee$apiclient_apiclient={};ee.apiclient.VERSION=module$exports$ee$apiVersion.V1ALPHA;ee.apiclient.API_CLIENT_VERSION="0.1.288";ee.apiclient.NULL_VALUE=module$exports$eeapiclient$domain_object.NULL_VALUE;ee.apiclient.PromiseRequestService=module$exports$eeapiclient$promise_request_service.PromiseRequestService;ee.apiclient.MakeRequestParams=module$contents$eeapiclient$request_params_MakeRequestParams;ee.apiclient.deserialize=module$contents$eeapiclient$domain_object_deserialize;ee.apiclient.serialize=module$contents$eeapiclient$domain_object_serialize;var module$contents$ee$apiclient_Call=function(callback,retries){module$contents$ee$apiclient_apiclient.initialize();this.callback=callback;this.requestService=new module$contents$ee$apiclient_EERequestService(!callback,retries);};module$contents$ee$apiclient_Call.prototype.handle=function(response){var $jscomp$this=this;if(response instanceof Promise){if(this.callback){var callback=function(result,error){try{return $jscomp$this.callback(result,error);}catch(callbackError){setTimeout(function(){throw callbackError;},0);}};response.then(callback,function(error){return callback(void 0,error);});}}else{response.then(function(result){response=result;});}return response;};module$contents$ee$apiclient_Call.prototype.projectsPath=function(){return"projects/"+module$contents$ee$apiclient_apiclient.getProject();};module$contents$ee$apiclient_Call.prototype.algorithms=function(){return new module$exports$eeapiclient$ee_api_client.ProjectsAlgorithmsApiClientImpl(module$exports$ee$apiVersion.V1ALPHA,this.requestService);};module$contents$ee$apiclient_Call.prototype.projects=function(){return new module$exports$eeapiclient$ee_api_client.ProjectsApiClientImpl(module$exports$ee$apiVersion.V1ALPHA,this.requestService);};module$contents$ee$apiclient_Call.prototype.assets=function(){return new module$exports$eeapiclient$ee_api_client.ProjectsAssetsApiClientImpl(module$exports$ee$apiVersion.V1ALPHA,this.requestService);};module$contents$ee$apiclient_Call.prototype.operations=function(){return new module$exports$eeapiclient$ee_api_client.ProjectsOperationsApiClientImpl(module$exports$ee$apiVersion.V1ALPHA,this.requestService);};module$contents$ee$apiclient_Call.prototype.value=function(){return new module$exports$eeapiclient$ee_api_client.ProjectsValueApiClientImpl(module$exports$ee$apiVersion.V1ALPHA,this.requestService);};module$contents$ee$apiclient_Call.prototype.maps=function(){return new module$exports$eeapiclient$ee_api_client.ProjectsMapsApiClientImpl(module$exports$ee$apiVersion.V1ALPHA,this.requestService);};module$contents$ee$apiclient_Call.prototype.map=function(){return new module$exports$eeapiclient$ee_api_client.ProjectsMapApiClientImpl(module$exports$ee$apiVersion.V1ALPHA,this.requestService);};module$contents$ee$apiclient_Call.prototype.image=function(){return new module$exports$eeapiclient$ee_api_client.ProjectsImageApiClientImpl(module$exports$ee$apiVersion.V1ALPHA,this.requestService);};module$contents$ee$apiclient_Call.prototype.table=function(){return new module$exports$eeapiclient$ee_api_client.ProjectsTableApiClientImpl(module$exports$ee$apiVersion.V1ALPHA,this.requestService);};module$contents$ee$apiclient_Call.prototype.tables=function(){return new module$exports$eeapiclient$ee_api_client.ProjectsTablesApiClientImpl(module$exports$ee$apiVersion.V1ALPHA,this.requestService);};module$contents$ee$apiclient_Call.prototype.video=function(){return new module$exports$eeapiclient$ee_api_client.ProjectsVideoApiClientImpl(module$exports$ee$apiVersion.V1ALPHA,this.requestService);};module$contents$ee$apiclient_Call.prototype.videoMap=function(){return new module$exports$eeapiclient$ee_api_client.ProjectsVideoMapApiClientImpl(module$exports$ee$apiVersion.V1ALPHA,this.requestService);};module$contents$ee$apiclient_Call.prototype.classifier=function(){return new module$exports$eeapiclient$ee_api_client.ProjectsClassifierApiClientImpl(module$exports$ee$apiVersion.V1ALPHA,this.requestService);};module$contents$ee$apiclient_Call.prototype.dmsMaps=function(){return new module$exports$eeapiclient$ee_api_client.ProjectsDmsMapsApiClientImpl(module$exports$ee$apiVersion.V1ALPHA,this.requestService);};module$contents$ee$apiclient_Call.prototype.thumbnails=function(){return new module$exports$eeapiclient$ee_api_client.ProjectsThumbnailsApiClientImpl(module$exports$ee$apiVersion.V1ALPHA,this.requestService);};module$contents$ee$apiclient_Call.prototype.videoThumbnails=function(){return new module$exports$eeapiclient$ee_api_client.ProjectsVideoThumbnailsApiClientImpl(module$exports$ee$apiVersion.V1ALPHA,this.requestService);};module$contents$ee$apiclient_Call.prototype.filmstripThumbnails=function(){return new module$exports$eeapiclient$ee_api_client.ProjectsFilmstripThumbnailsApiClientImpl(module$exports$ee$apiVersion.V1ALPHA,this.requestService);};var module$contents$ee$apiclient_EERequestService=function(sync,retries){this.sync=sync=void 0===sync?!1:sync;this.retries=null!=retries?retries:sync?module$contents$ee$apiclient_apiclient.MAX_SYNC_RETRIES_:module$contents$ee$apiclient_apiclient.MAX_ASYNC_RETRIES_;};$jscomp.inherits(module$contents$ee$apiclient_EERequestService,module$exports$eeapiclient$promise_request_service.PromiseRequestService);module$contents$ee$apiclient_EERequestService.prototype.send=function(params,responseCtor){var $jscomp$this=this;module$contents$eeapiclient$request_params_processParams(params);var path=params.path||"",url=module$contents$ee$apiclient_apiclient.getSafeApiUrl()+path,args=module$contents$ee$apiclient_apiclient.makeRequest_(params.queryParams||{}),body=params.body?JSON.stringify(params.body):void 0;if(this.sync){var raw=module$contents$ee$apiclient_apiclient.send(url,args,void 0,params.httpMethod,body,this.retries),value$56=responseCtor?module$contents$eeapiclient$domain_object_deserialize(responseCtor,raw):raw,thenable=function(v){return{then:function(f){return thenable(f(v));}};};return thenable(value$56);}return new Promise(function(resolve,reject){module$contents$ee$apiclient_apiclient.send(url,args,function(value,error){error?reject(error):resolve(value);},params.httpMethod,body,$jscomp$this.retries);}).then(function(r){return responseCtor?module$contents$eeapiclient$domain_object_deserialize(responseCtor,r):r;});};module$contents$ee$apiclient_EERequestService.prototype.makeRequest=function(params){};var module$contents$ee$apiclient_BatchCall=function(callback){module$contents$ee$apiclient_Call.call(this,callback);this.requestService=new module$contents$ee$apiclient_BatchRequestService();};$jscomp.inherits(module$contents$ee$apiclient_BatchCall,module$contents$ee$apiclient_Call);module$contents$ee$apiclient_BatchCall.prototype.send=function(parts,getResponse){var $jscomp$this=this,batchUrl=module$contents$ee$apiclient_apiclient.getSafeApiUrl()+"/batch",body=parts.map(function($jscomp$destructuring$var20){var $jscomp$destructuring$var21=$jscomp.makeIterator($jscomp$destructuring$var20),id=$jscomp$destructuring$var21.next().value,$jscomp$destructuring$var22=$jscomp.makeIterator($jscomp$destructuring$var21.next().value),partBody=$jscomp$destructuring$var22.next().value,ctor=$jscomp$destructuring$var22.next().value;return"--batch_EARTHENGINE_batch\r\nContent-Type: application/http\r\nContent-Transfer-Encoding: binary\r\nMIME-Version: 1.0\r\nContent-ID: <"+id+">\r\n\r\n"+partBody+"\r\n";}).join("")+"--batch_EARTHENGINE_batch--\r\n",deserializeResponses=function(response){var result={};parts.forEach(function($jscomp$destructuring$var23){var $jscomp$destructuring$var24=$jscomp.makeIterator($jscomp$destructuring$var23),id=$jscomp$destructuring$var24.next().value,$jscomp$destructuring$var25=$jscomp.makeIterator($jscomp$destructuring$var24.next().value),partBody=$jscomp$destructuring$var25.next().value,ctor=$jscomp$destructuring$var25.next().value;null!=response[id]&&(result[id]=module$contents$eeapiclient$domain_object_deserialize(ctor,response[id]));});return getResponse?getResponse(result):result;};return this.callback?(module$contents$ee$apiclient_apiclient.send(batchUrl,null,function(result,err){return $jscomp$this.callback(err?result:deserializeResponses(result),err);},"multipart/mixed; boundary=batch_EARTHENGINE_batch",body),null):deserializeResponses(module$contents$ee$apiclient_apiclient.send(batchUrl,null,void 0,"multipart/mixed; boundary=batch_EARTHENGINE_batch",body));};var module$contents$ee$apiclient_BatchRequestService=function(){};$jscomp.inherits(module$contents$ee$apiclient_BatchRequestService,module$exports$eeapiclient$promise_request_service.PromiseRequestService);module$contents$ee$apiclient_BatchRequestService.prototype.send=function(params,responseCtor){var request=[params.httpMethod+" "+params.path+" HTTP/1.1"];request.push("Content-Type: application/json; charset=utf-8");var authToken=module$contents$ee$apiclient_apiclient.getAuthToken();null!=authToken&&request.push("Authorization: "+authToken);var body=params.body?JSON.stringify(params.body):"";return[request.join("\r\n")+"\r\n\r\n"+body,responseCtor];};module$contents$ee$apiclient_BatchRequestService.prototype.makeRequest=function(params){};module$contents$ee$apiclient_apiclient.parseBatchReply=function(contentType,responseText,handle){for(var boundary=contentType.split("; boundary=")[1],$jscomp$iter$20=$jscomp.makeIterator(responseText.split("--"+boundary)),$jscomp$key$part=$jscomp$iter$20.next();!$jscomp$key$part.done;$jscomp$key$part=$jscomp$iter$20.next()){var groups=$jscomp$key$part.value.split("\r\n\r\n");if(!(3>groups.length)){var id=groups[0].match(/\r\nContent-ID: <response-([^>]*)>/)[1],status=Number(groups[1].match(/^HTTP\S*\s(\d+)\s/)[1]),text=groups.slice(2).join("\r\n\r\n");handle(id,status,text);}}};module$contents$ee$apiclient_apiclient.setApiKey=function(apiKey){module$contents$ee$apiclient_apiclient.cloudApiKey_=apiKey;};module$contents$ee$apiclient_apiclient.getApiKey=function(){return module$contents$ee$apiclient_apiclient.cloudApiKey_;};module$contents$ee$apiclient_apiclient.DEFAULT_PROJECT_="earthengine-legacy";module$contents$ee$apiclient_apiclient.setProject=function(project){module$contents$ee$apiclient_apiclient.project_=project;};module$contents$ee$apiclient_apiclient.getProject=function(){return module$contents$ee$apiclient_apiclient.project_;};module$contents$ee$apiclient_apiclient.getSafeApiUrl=function(){var url=module$contents$ee$apiclient_apiclient.apiBaseUrl_.replace(/\/api$/,"");return"window"in goog.global&&!url.match(/^https?:\/\/content-/)?url.replace(/^(https?:\/\/)(.*\.googleapis\.com)$/,"$1content-$2"):url;};module$contents$ee$apiclient_apiclient.mergeAuthScopes_=function(includeDefaultScopes,includeStorageScope,extraScopes){var scopes=[];includeDefaultScopes&&(scopes=scopes.concat(module$contents$ee$apiclient_apiclient.DEFAULT_AUTH_SCOPES_));includeStorageScope&&scopes.push(module$contents$ee$apiclient_apiclient.STORAGE_SCOPE_);scopes=scopes.concat(extraScopes);module$contents$goog$array_removeDuplicates(scopes);return scopes;};module$contents$ee$apiclient_apiclient.setAuthToken=function(clientId,tokenType,accessToken,expiresIn,extraScopes,callback,updateAuthLibrary,suppressDefaultScopes){var scopes=module$contents$ee$apiclient_apiclient.mergeAuthScopes_(!suppressDefaultScopes,!1,extraScopes||[]);module$contents$ee$apiclient_apiclient.authClientId_=clientId;module$contents$ee$apiclient_apiclient.authScopes_=scopes;var tokenObject={token_type:tokenType,access_token:accessToken,state:scopes.join(" "),expires_in:expiresIn};module$contents$ee$apiclient_apiclient.handleAuthResult_(void 0,void 0,tokenObject);!1===updateAuthLibrary?callback&&callback():module$contents$ee$apiclient_apiclient.ensureAuthLibLoaded_(function(){goog.global.gapi.auth.setToken(tokenObject);callback&&callback();});};module$contents$ee$apiclient_apiclient.refreshAuthToken=function(success,error,onImmediateFailed){if(module$contents$ee$apiclient_apiclient.isAuthTokenRefreshingEnabled_()){var authArgs={client_id:String(module$contents$ee$apiclient_apiclient.authClientId_),immediate:!0,scope:module$contents$ee$apiclient_apiclient.authScopes_.join(" ")};module$contents$ee$apiclient_apiclient.authTokenRefresher_(authArgs,function(result){if("immediate_failed"==result.error&&onImmediateFailed){onImmediateFailed();}else{if("window"in goog.global){try{module$contents$ee$apiclient_apiclient.ensureAuthLibLoaded_(function(){try{goog.global.gapi.auth.setToken(result),module$contents$ee$apiclient_apiclient.handleAuthResult_(success,error,result);}catch(e){error(e.toString());}});}catch(e){error(e.toString());}}else{module$contents$ee$apiclient_apiclient.handleAuthResult_(success,error,result);}}});}};module$contents$ee$apiclient_apiclient.setAuthTokenRefresher=function(refresher){module$contents$ee$apiclient_apiclient.authTokenRefresher_=refresher;};module$contents$ee$apiclient_apiclient.getAuthToken=function(){module$contents$ee$apiclient_apiclient.authTokenExpiration_&&0<=Date.now()-module$contents$ee$apiclient_apiclient.authTokenExpiration_&&module$contents$ee$apiclient_apiclient.clearAuthToken();return module$contents$ee$apiclient_apiclient.authToken_;};module$contents$ee$apiclient_apiclient.clearAuthToken=function(){module$contents$ee$apiclient_apiclient.authToken_=null;module$contents$ee$apiclient_apiclient.authTokenExpiration_=null;};module$contents$ee$apiclient_apiclient.getAuthClientId=function(){return module$contents$ee$apiclient_apiclient.authClientId_;};module$contents$ee$apiclient_apiclient.getAuthScopes=function(){return module$contents$ee$apiclient_apiclient.authScopes_;};module$contents$ee$apiclient_apiclient.setAuthClient=function(clientId,scopes){module$contents$ee$apiclient_apiclient.authClientId_=clientId;module$contents$ee$apiclient_apiclient.authScopes_=scopes;};module$contents$ee$apiclient_apiclient.setAppIdToken=function(token){module$contents$ee$apiclient_apiclient.appIdToken_=token;};module$contents$ee$apiclient_apiclient.initialize=function(apiBaseUrl,tileBaseUrl,xsrfToken,project){null!=apiBaseUrl?module$contents$ee$apiclient_apiclient.apiBaseUrl_=apiBaseUrl:module$contents$ee$apiclient_apiclient.initialized_||(module$contents$ee$apiclient_apiclient.apiBaseUrl_=module$contents$ee$apiclient_apiclient.DEFAULT_API_BASE_URL_);null!=tileBaseUrl?module$contents$ee$apiclient_apiclient.tileBaseUrl_=tileBaseUrl:module$contents$ee$apiclient_apiclient.initialized_||(module$contents$ee$apiclient_apiclient.tileBaseUrl_=module$contents$ee$apiclient_apiclient.DEFAULT_TILE_BASE_URL_);void 0!==xsrfToken&&(module$contents$ee$apiclient_apiclient.xsrfToken_=xsrfToken);null!=project?module$contents$ee$apiclient_apiclient.setProject(project):module$contents$ee$apiclient_apiclient.setProject(module$contents$ee$apiclient_apiclient.getProject()||module$contents$ee$apiclient_apiclient.DEFAULT_PROJECT_);module$contents$ee$apiclient_apiclient.initialized_=!0;};module$contents$ee$apiclient_apiclient.reset=function(){module$contents$ee$apiclient_apiclient.apiBaseUrl_=null;module$contents$ee$apiclient_apiclient.tileBaseUrl_=null;module$contents$ee$apiclient_apiclient.xsrfToken_=null;module$contents$ee$apiclient_apiclient.initialized_=!1;};module$contents$ee$apiclient_apiclient.setDeadline=function(milliseconds){module$contents$ee$apiclient_apiclient.deadlineMs_=milliseconds;};module$contents$ee$apiclient_apiclient.setParamAugmenter=function(augmenter){module$contents$ee$apiclient_apiclient.paramAugmenter_=augmenter||goog.functions.identity;};module$contents$ee$apiclient_apiclient.getApiBaseUrl=function(){return module$contents$ee$apiclient_apiclient.apiBaseUrl_;};module$contents$ee$apiclient_apiclient.getTileBaseUrl=function(){return module$contents$ee$apiclient_apiclient.tileBaseUrl_;};module$contents$ee$apiclient_apiclient.getXsrfToken=function(){return module$contents$ee$apiclient_apiclient.xsrfToken_;};module$contents$ee$apiclient_apiclient.isInitialized=function(){return module$contents$ee$apiclient_apiclient.initialized_;};module$contents$ee$apiclient_apiclient.send=function(path,params,callback,method,body,retries){module$contents$ee$apiclient_apiclient.initialize();var profileHookAtCallTime=module$contents$ee$apiclient_apiclient.profileHook_,contentType="application/x-www-form-urlencoded";body&&(contentType="application/json",method&&method.startsWith("multipart")&&(contentType=method,method="POST"));method=method||"POST";var headers={"Content-Type":contentType},version="0.1.288";"0.1.288"===version&&(version="latest");headers[module$contents$ee$apiclient_apiclient.API_CLIENT_VERSION_HEADER]="ee-js/"+version;var authToken=module$contents$ee$apiclient_apiclient.getAuthToken();if(null!=authToken){headers.Authorization=authToken;}else{if(callback&&module$contents$ee$apiclient_apiclient.isAuthTokenRefreshingEnabled_()){return module$contents$ee$apiclient_apiclient.refreshAuthToken(function(){module$contents$ee$apiclient_apiclient.withProfiling(profileHookAtCallTime,function(){module$contents$ee$apiclient_apiclient.send(path,params,callback,method);});}),null;}}params=params?params.clone():new goog.Uri.QueryData();null!=module$contents$ee$apiclient_apiclient.cloudApiKey_&¶ms.add("key",module$contents$ee$apiclient_apiclient.cloudApiKey_);profileHookAtCallTime&&(headers[module$contents$ee$apiclient_apiclient.PROFILE_REQUEST_HEADER]="1");module$contents$ee$apiclient_apiclient.getProject()&&module$contents$ee$apiclient_apiclient.getProject()!==module$contents$ee$apiclient_apiclient.DEFAULT_PROJECT_&&(headers[module$contents$ee$apiclient_apiclient.USER_PROJECT_OVERRIDE_HEADER_]=module$contents$ee$apiclient_apiclient.getProject());params=module$contents$ee$apiclient_apiclient.paramAugmenter_(params,path);null!=module$contents$ee$apiclient_apiclient.xsrfToken_&&(headers["X-XSRF-Token"]=module$contents$ee$apiclient_apiclient.xsrfToken_);null!=module$contents$ee$apiclient_apiclient.appIdToken_&&(headers[module$contents$ee$apiclient_apiclient.APP_ID_TOKEN_HEADER_]=module$contents$ee$apiclient_apiclient.appIdToken_);var requestData=body||null,paramString=params?params.toString():"";"POST"===method&&void 0===body?requestData=paramString:goog.string.isEmptyOrWhitespace(paramString)||(path+=goog.string.contains(path,"?")?"&":"?",path+=paramString);var url=path.startsWith("/")?module$contents$ee$apiclient_apiclient.apiBaseUrl_+path:path;if(callback){return module$contents$ee$apiclient_apiclient.requestQueue_.push(module$contents$ee$apiclient_apiclient.buildAsyncRequest_(url,callback,method,requestData,headers,retries)),module$contents$ee$apiclient_apiclient.RequestThrottle_.fire(),null;}for(var setRequestHeader=function(value,key){this.setRequestHeader&&this.setRequestHeader(key,value);},xmlHttp,retryCount=0,maxRetries=null!=retries?retries:module$contents$ee$apiclient_apiclient.MAX_SYNC_RETRIES_;;){xmlHttp=(0,goog.net.XmlHttp)();xmlHttp.open(method,url,!1);module$contents$goog$object_forEach(headers,setRequestHeader,xmlHttp);xmlHttp.send(requestData);if(429!=xmlHttp.status||retryCount>maxRetries){break;}retryCount++;}return module$contents$ee$apiclient_apiclient.handleResponse_(xmlHttp.status,function getResponseHeaderSafe(header){try{return xmlHttp.getResponseHeader(header);}catch(e){return null;}},xmlHttp.responseText,profileHookAtCallTime,void 0,url,method);};module$contents$ee$apiclient_apiclient.buildAsyncRequest_=function(url,callback,method,content,headers,retries){var retryCount=0,request={url:url,method:method,content:content,headers:headers},profileHookAtCallTime=module$contents$ee$apiclient_apiclient.profileHook_,maxRetries=null!=retries?retries:module$contents$ee$apiclient_apiclient.MAX_ASYNC_RETRIES_;request.callback=function(e){var xhrIo=e.target;return 429==xhrIo.getStatus()&&retryCount<maxRetries?(retryCount++,setTimeout(function(){module$contents$ee$apiclient_apiclient.requestQueue_.push(request);module$contents$ee$apiclient_apiclient.RequestThrottle_.fire();},module$contents$ee$apiclient_apiclient.calculateRetryWait_(retryCount)),null):module$contents$ee$apiclient_apiclient.handleResponse_(xhrIo.getStatus(),goog.bind(xhrIo.getResponseHeader,xhrIo),xhrIo.getResponseText(),profileHookAtCallTime,callback,url,method);};return request;};module$contents$ee$apiclient_apiclient.withProfiling=function(hook,body,thisObject){var saved=module$contents$ee$apiclient_apiclient.profileHook_;try{return module$contents$ee$apiclient_apiclient.profileHook_=hook,body.call(thisObject);}finally{module$contents$ee$apiclient_apiclient.profileHook_=saved;}};module$contents$ee$apiclient_apiclient.handleResponse_=function(status$jscomp$0,getResponseHeader,responseText,profileHook,callback,url,method){var profileId=profileHook?getResponseHeader(module$contents$ee$apiclient_apiclient.PROFILE_HEADER):"";profileId&&profileHook&&profileHook(profileId);var parseJson=function(body){try{var response=JSON.parse(body);return goog.isObject(response)&&"error"in response&&"message"in response.error?response.error.message:{parsed:response};}catch(e){return"Invalid JSON: "+body;}},statusError=function(status){if(0===status){return"Failed to contact Earth Engine servers. Please check your connection, firewall, or browser extension settings.";}if(200>status||300<=status){return"Server returned HTTP code: "+status+" for "+method+" "+url;}},errorMessage,typeHeader=getResponseHeader("Content-Type")||"application/json",contentType=typeHeader.replace(/;.*/,"");if("application/json"===contentType||"text/json"===contentType){var response$jscomp$0=parseJson(responseText);if(response$jscomp$0.parsed){var data=response$jscomp$0.parsed;void 0===data&&(errorMessage="Malformed response: "+responseText);}else{errorMessage=response$jscomp$0;}}else{if("multipart/mixed"===contentType){data={};var errors=[];module$contents$ee$apiclient_apiclient.parseBatchReply(typeHeader,responseText,function(id,status,text){var response=parseJson(text);response.parsed&&(data[id]=response.parsed);var error=(response.parsed?"":response)||statusError(status);error&&errors.push(id+": "+error);});errors.length&&(errorMessage=errors.join("\n"));}else{var typeError="Response was unexpectedly not JSON, but "+contentType;}}errorMessage=errorMessage||statusError(status$jscomp$0)||typeError;if(callback){return callback(data,errorMessage),null;}if(!errorMessage){return data;}throw Error(errorMessage);};module$contents$ee$apiclient_apiclient.ensureAuthLibLoaded_=function(callback){var done=function(){goog.global.gapi.config.update("client/cors",!0);module$contents$ee$apiclient_apiclient.authTokenRefresher_||module$contents$ee$apiclient_apiclient.setAuthTokenRefresher(goog.global.gapi.auth.authorize);callback();};if(goog.isObject(goog.global.gapi)&&goog.isObject(goog.global.gapi.auth)&&"function"===typeof goog.global.gapi.auth.authorize){done();}else{for(var callbackName=Date.now().toString(36);(callbackName in goog.global);){callbackName+="_";}goog.global[callbackName]=function(){delete goog.global[callbackName];done();};goog.net.jsloader.safeLoad(goog.html.TrustedResourceUrl.format(module$contents$ee$apiclient_apiclient.AUTH_LIBRARY_URL_,{onload:callbackName}));}};module$contents$ee$apiclient_apiclient.handleAuthResult_=function(success,error,result){if(result.access_token){var token=result.token_type+" "+result.access_token;if(result.expires_in||0===result.expires_in){var expiresInMs=900*result.expires_in,timeout=setTimeout(module$contents$ee$apiclient_apiclient.refreshAuthToken,0.9*expiresInMs);void 0!==timeout.unref&&timeout.unref();module$contents$ee$apiclient_apiclient.authTokenExpiration_=Date.now()+expiresInMs;}module$contents$ee$apiclient_apiclient.authToken_=token;success&&success();}else{error&&error(result.error||"Unknown error.");}};module$contents$ee$apiclient_apiclient.makeRequest_=function(params){for(var request=new goog.Uri.QueryData(),$jscomp$iter$21=$jscomp.makeIterator(Object.entries(params)),$jscomp$key$=$jscomp$iter$21.next();!$jscomp$key$.done;$jscomp$key$=$jscomp$iter$21.next()){var $jscomp$destructuring$var27=$jscomp.makeIterator($jscomp$key$.value),name=$jscomp$destructuring$var27.next().value,item=$jscomp$destructuring$var27.next().value;request.set(name,item);}return request;};module$contents$ee$apiclient_apiclient.setupMockSend=function(calls){function getResponse(url,method,data){url=url.replace(apiBaseUrl,"").replace(module$exports$ee$apiVersion.V1ALPHA+"/projects/"+module$contents$ee$apiclient_apiclient.DEFAULT_PROJECT_+"/","");if(url in calls){var response=calls[url];}else{throw Error(url+" mock response not specified");}"function"===typeof response&&(response=response(url,method,data));"string"===typeof response&&(response={text:response,status:200,contentType:"application/json; charset=utf-8"});if("string"!==typeof response.text){throw Error(url+" mock response missing/invalid text");}if("number"!==typeof response.status&&"function"!==typeof response.status){throw Error(url+" mock response missing/invalid status");}return response;}calls=calls?module$contents$goog$object_clone(calls):{};var apiBaseUrl;goog.net.XhrIo.send=function(url,callback,method,data){apiBaseUrl=apiBaseUrl||module$contents$ee$apiclient_apiclient.apiBaseUrl_;var responseData=getResponse(url,method,data),e=new function(){this.target={};}();e.target.getResponseText=function(){return responseData.text;};e.target.getStatus="function"===typeof responseData.status?responseData.status:function(){return responseData.status;};e.target.getResponseHeader=function(header){return"Content-Type"===header?responseData.contentType:null;};setTimeout(goog.bind(callback,e,e),0);return new goog.net.XhrIo();};var fakeXmlHttp=function(){};fakeXmlHttp.prototype.open=function(method,urlIn){apiBaseUrl=apiBaseUrl||module$contents$ee$apiclient_apiclient.apiBaseUrl_;this.url=urlIn;this.method=method;};fakeXmlHttp.prototype.setRequestHeader=function(){};fakeXmlHttp.prototype.getResponseHeader=function(header){return"Content-Type"===header?this.contentType_||null:null;};fakeXmlHttp.prototype.send=function(data){var responseData=getResponse(this.url,this.method,data);this.responseText=responseData.text;this.status="function"===typeof responseData.status?responseData.status():responseData.status;this.contentType_=responseData.contentType;};goog.net.XmlHttp.setGlobalFactory({createInstance:function(){return new fakeXmlHttp();},getOptions:function(){return{};}});};module$contents$ee$apiclient_apiclient.isAuthTokenRefreshingEnabled_=function(){return!(!module$contents$ee$apiclient_apiclient.authTokenRefresher_||!module$contents$ee$apiclient_apiclient.authClientId_);};module$contents$ee$apiclient_apiclient.calculateRetryWait_=function(retryCount){return Math.min(module$contents$ee$apiclient_apiclient.MAX_RETRY_WAIT_,Math.pow(2,retryCount)*module$contents$ee$apiclient_apiclient.BASE_RETRY_WAIT_);};module$contents$ee$apiclient_apiclient.sleep_=function(timeInMs){for(var end=new Date().getTime()+timeInMs;new Date().getTime()<end;){}};module$contents$ee$apiclient_apiclient.NetworkRequest_=function(){};module$contents$ee$apiclient_apiclient.requestQueue_=[];module$contents$ee$apiclient_apiclient.REQUEST_THROTTLE_INTERVAL_MS_=350;module$contents$ee$apiclient_apiclient.RequestThrottle_=new module$contents$goog$async$Throttle_Throttle(function(){var request=module$contents$ee$apiclient_apiclient.requestQueue_.shift();request&&goog.net.XhrIo.send(request.url,request.callback,request.method,request.content,request.headers,module$contents$ee$apiclient_apiclient.deadlineMs_);module$contents$goog$array_isEmpty(module$contents$ee$apiclient_apiclient.requestQueue_)||module$contents$ee$apiclient_apiclient.RequestThrottle_.fire();},module$contents$ee$apiclient_apiclient.REQUEST_THROTTLE_INTERVAL_MS_);module$contents$ee$apiclient_apiclient.apiBaseUrl_=null;module$contents$ee$apiclient_apiclient.tileBaseUrl_=null;module$contents$ee$apiclient_apiclient.xsrfToken_=null;module$contents$ee$apiclient_apiclient.appIdToken_=null;module$contents$ee$apiclient_apiclient.paramAugmenter_=goog.functions.identity;module$contents$ee$apiclient_apiclient.authToken_=null;module$contents$ee$apiclient_apiclient.authTokenExpiration_=null;module$contents$ee$apiclient_apiclient.authClientId_=null;module$contents$ee$apiclient_apiclient.authScopes_=[];module$contents$ee$apiclient_apiclient.authTokenRefresher_=null;module$contents$ee$apiclient_apiclient.AUTH_SCOPE_="https://www.googleapis.com/auth/earthengine";module$contents$ee$apiclient_apiclient.READ_ONLY_AUTH_SCOPE_="https://www.googleapis.com/auth/earthengine.readonly";module$contents$ee$apiclient_apiclient.CLOUD_PLATFORM_SCOPE_="https://www.googleapis.com/auth/cloud-platform";module$contents$ee$apiclient_apiclient.DEFAULT_AUTH_SCOPES_=[module$contents$ee$apiclient_apiclient.AUTH_SCOPE_,module$contents$ee$apiclient_apiclient.CLOUD_PLATFORM_SCOPE_];module$contents$ee$apiclient_apiclient.AUTH_LIBRARY_URL_=goog.string.Const.from("https://apis.google.com/js/client.js?onload=%{onload}");module$contents$ee$apiclient_apiclient.STORAGE_SCOPE_="https://www.googleapis.com/auth/devstorage.read_write";module$contents$ee$apiclient_apiclient.cloudApiKey_=null;module$contents$ee$apiclient_apiclient.initialized_=!1;module$contents$ee$apiclient_apiclient.deadlineMs_=0;module$contents$ee$apiclient_apiclient.profileHook_=null;module$contents$ee$apiclient_apiclient.BASE_RETRY_WAIT_=1000;module$contents$ee$apiclient_apiclient.MAX_RETRY_WAIT_=120000;module$contents$ee$apiclient_apiclient.MAX_ASYNC_RETRIES_=10;module$contents$ee$apiclient_apiclient.MAX_SYNC_RETRIES_=5;module$contents$ee$apiclient_apiclient.APP_ID_TOKEN_HEADER_="X-Earth-Engine-App-ID-Token";module$contents$ee$apiclient_apiclient.PROFILE_HEADER="X-Earth-Engine-Computation-Profile";module$contents$ee$apiclient_apiclient.PROFILE_REQUEST_HEADER="X-Earth-Engine-Computation-Profiling";module$contents$ee$apiclient_apiclient.USER_PROJECT_OVERRIDE_HEADER_="X-Goog-User-Project";module$contents$ee$apiclient_apiclient.API_CLIENT_VERSION_HEADER="x-goog-api-client";module$contents$ee$apiclient_apiclient.DEFAULT_API_BASE_URL_="https://earthengine.googleapis.com/api";module$contents$ee$apiclient_apiclient.DEFAULT_TILE_BASE_URL_="https://earthengine.googleapis.com";module$contents$ee$apiclient_apiclient.AuthArgs=function(){};module$contents$ee$apiclient_apiclient.AuthResponse=function(){};ee.apiclient.Call=module$contents$ee$apiclient_Call;ee.apiclient.BatchCall=module$contents$ee$apiclient_BatchCall;ee.apiclient.setApiKey=module$contents$ee$apiclient_apiclient.setApiKey;ee.apiclient.getApiKey=module$contents$ee$apiclient_apiclient.getApiKey;ee.apiclient.setProject=module$contents$ee$apiclient_apiclient.setProject;ee.apiclient.getProject=module$contents$ee$apiclient_apiclient.getProject;ee.apiclient.DEFAULT_PROJECT=module$contents$ee$apiclient_apiclient.DEFAULT_PROJECT_;ee.apiclient.PROFILE_HEADER=module$contents$ee$apiclient_apiclient.PROFILE_HEADER;ee.apiclient.PROFILE_REQUEST_HEADER=module$contents$ee$apiclient_apiclient.PROFILE_REQUEST_HEADER;ee.apiclient.API_CLIENT_VERSION_HEADER=module$contents$ee$apiclient_apiclient.API_CLIENT_VERSION_HEADER;ee.apiclient.send=module$contents$ee$apiclient_apiclient.send;ee.apiclient.AUTH_SCOPE=module$contents$ee$apiclient_apiclient.AUTH_SCOPE_;ee.apiclient.READ_ONLY_AUTH_SCOPE=module$contents$ee$apiclient_apiclient.READ_ONLY_AUTH_SCOPE_;ee.apiclient.CLOUD_PLATFORM_SCOPE=module$contents$ee$apiclient_apiclient.CLOUD_PLATFORM_SCOPE_;ee.apiclient.STORAGE_SCOPE=module$contents$ee$apiclient_apiclient.STORAGE_SCOPE_;ee.apiclient.DEFAULT_AUTH_SCOPES=module$contents$ee$apiclient_apiclient.DEFAULT_AUTH_SCOPES_;ee.apiclient.makeRequest=module$contents$ee$apiclient_apiclient.makeRequest_;ee.apiclient.reset=module$contents$ee$apiclient_apiclient.reset;ee.apiclient.initialize=module$contents$ee$apiclient_apiclient.initialize;ee.apiclient.setDeadline=module$contents$ee$apiclient_apiclient.setDeadline;ee.apiclient.isInitialized=module$contents$ee$apiclient_apiclient.isInitialized;ee.apiclient.ensureAuthLibLoaded=module$contents$ee$apiclient_apiclient.ensureAuthLibLoaded_;ee.apiclient.handleAuthResult=module$contents$ee$apiclient_apiclient.handleAuthResult_;ee.apiclient.refreshAuthToken=module$contents$ee$apiclient_apiclient.refreshAuthToken;ee.apiclient.setAuthClient=module$contents$ee$apiclient_apiclient.setAuthClient;ee.apiclient.getAuthScopes=module$contents$ee$apiclient_apiclient.getAuthScopes;ee.apiclient.getAuthClientId=module$contents$ee$apiclient_apiclient.getAuthClientId;ee.apiclient.getAuthToken=module$contents$ee$apiclient_apiclient.getAuthToken;ee.apiclient.setAuthToken=module$contents$ee$apiclient_apiclient.setAuthToken;ee.apiclient.clearAuthToken=module$contents$ee$apiclient_apiclient.clearAuthToken;ee.apiclient.setAuthTokenRefresher=module$contents$ee$apiclient_apiclient.setAuthTokenRefresher;ee.apiclient.setAppIdToken=module$contents$ee$apiclient_apiclient.setAppIdToken;ee.apiclient.mergeAuthScopes=module$contents$ee$apiclient_apiclient.mergeAuthScopes_;ee.apiclient.setupMockSend=module$contents$ee$apiclient_apiclient.setupMockSend;ee.apiclient.setParamAugmenter=module$contents$ee$apiclient_apiclient.setParamAugmenter;ee.apiclient.withProfiling=module$contents$ee$apiclient_apiclient.withProfiling;ee.apiclient.getApiBaseUrl=module$contents$ee$apiclient_apiclient.getApiBaseUrl;ee.apiclient.getTileBaseUrl=module$contents$ee$apiclient_apiclient.getTileBaseUrl;ee.apiclient.AuthArgs=module$contents$ee$apiclient_apiclient.AuthArgs;ee.apiclient.AuthResponse=module$contents$ee$apiclient_apiclient.AuthResponse;ee.apiclient.RequestThrottle=module$contents$ee$apiclient_apiclient.RequestThrottle_;ee.apiclient.calculateRetryWait=module$contents$ee$apiclient_apiclient.calculateRetryWait_;ee.apiclient.MAX_ASYNC_RETRIES=module$contents$ee$apiclient_apiclient.MAX_ASYNC_RETRIES_;ee.apiclient.REQUEST_THROTTLE_INTERVAL_MS=module$contents$ee$apiclient_apiclient.REQUEST_THROTTLE_INTERVAL_MS_;ee.apiclient.isAuthTokenRefreshingEnabled=module$contents$ee$apiclient_apiclient.isAuthTokenRefreshingEnabled_;goog.exportSymbol("ee.api.ListAssetsResponse",module$exports$eeapiclient$ee_api_client.ListAssetsResponse);goog.exportSymbol("ee.api.EarthEngineAsset",module$exports$eeapiclient$ee_api_client.EarthEngineAsset);goog.exportSymbol("ee.api.ListImagesResponse",module$exports$eeapiclient$ee_api_client.ListImagesResponse);goog.exportSymbol("ee.api.Image",module$exports$eeapiclient$ee_api_client.Image);goog.exportSymbol("ee.api.Operation",module$exports$eeapiclient$ee_api_client.Operation);ee.Encodable=function(){};ee.rpc_node={};ee.rpc_node.constant=function(obj){if(void 0===obj||null===obj){obj=module$exports$eeapiclient$domain_object.NULL_VALUE;}return new module$exports$eeapiclient$ee_api_client.ValueNode({constantValue:obj});};ee.rpc_node.reference=function(ref){return new module$exports$eeapiclient$ee_api_client.ValueNode({valueReference:ref});};ee.rpc_node.array=function(values){return new module$exports$eeapiclient$ee_api_client.ValueNode({arrayValue:new module$exports$eeapiclient$ee_api_client.ArrayValue({values:values})});};ee.rpc_node.dictionary=function(values){return new module$exports$eeapiclient$ee_api_client.ValueNode({dictionaryValue:new module$exports$eeapiclient$ee_api_client.DictionaryValue({values:values})});};ee.rpc_node.functionByName=function(name,args){return new module$exports$eeapiclient$ee_api_client.ValueNode({functionInvocationValue:new module$exports$eeapiclient$ee_api_client.FunctionInvocation({functionName:name,arguments:args})});};ee.rpc_node.functionByReference=function(ref,args){return new module$exports$eeapiclient$ee_api_client.ValueNode({functionInvocationValue:new module$exports$eeapiclient$ee_api_client.FunctionInvocation({functionReference:ref,arguments:args})});};ee.rpc_node.functionDefinition=function(argumentNames,body){return new module$exports$eeapiclient$ee_api_client.ValueNode({functionDefinitionValue:new module$exports$eeapiclient$ee_api_client.FunctionDefinition({argumentNames:argumentNames,body:body})});};ee.rpc_node.argumentReference=function(ref){return new module$exports$eeapiclient$ee_api_client.ValueNode({argumentReference:ref});};ee.rpc_convert={};ee.rpc_convert.fileFormat=function(format){if(!format){return"AUTO_JPEG_PNG";}var upper=format.toUpperCase();switch(upper){case"JPG":return"JPEG";case"AUTO":return"AUTO_JPEG_PNG";case"TIF":case"TIFF":case"GEOTIF":case"GEOTIFF":return"GEO_TIFF";case"TF_RECORD":case"TFRECORD":return"TF_RECORD_IMAGE";case"NUMPY":return"NPY";case"ZIPPED_TIF":case"ZIPPED_TIFF":case"ZIPPED_GEOTIF":case"ZIPPED_GEOTIFF":return"ZIPPED_GEO_TIFF";case"ZIPPED_TIF_PER_BAND":case"ZIPPED_TIFF_PER_BAND":case"ZIPPED_GEOTIF_PER_BAND":case"ZIPPED_GEOTIFF_PER_BAND":return"ZIPPED_GEO_TIFF_PER_BAND";default:return upper;}};ee.rpc_convert.tableFileFormat=function(format){if(!format){return"CSV";}var upper=format.toUpperCase();switch(upper){case"TF_RECORD":case"TFRECORD":return"TF_RECORD_TABLE";case"JSON":case"GEOJSON":return"GEO_JSON";default:return upper;}};ee.rpc_convert.orientation=function(orientation){if(!orientation){return"VERTICAL";}var upper=orientation.toUpperCase();if("HORIZONTAL"!==upper||"VERTICAL"!==upper){throw Error('Orientation must be "horizontal" or "vertical"');}return upper;};ee.rpc_convert.bandList=function(bands){if(!bands){return[];}if("string"===typeof bands){return bands.split(",");}if(Array.isArray(bands)){return bands;}throw Error("Invalid band list "+bands);};ee.rpc_convert.visualizationOptions=function(params){var result=new module$exports$eeapiclient$ee_api_client.VisualizationOptions(),hasResult=!1;if("palette"in params){var pal=params.palette;result.paletteColors="string"===typeof pal?pal.split(","):pal;hasResult=!0;}var ranges=[];if("gain"in params||"bias"in params){if("min"in params||"max"in params){throw Error("Gain and bias can't be specified with min and max");}var valueRange=result.paletteColors?result.paletteColors.length-1:255;ranges=ee.rpc_convert.pairedValues(params,"bias","gain").map(function(pair){var min=-pair.bias/pair.gain;return{min:min,max:valueRange/pair.gain+min};});}else{if("min"in params||"max"in params){ranges=ee.rpc_convert.pairedValues(params,"min","max");}}0!==ranges.length&&(result.ranges=ranges.map(function(range){return new module$exports$eeapiclient$ee_api_client.DoubleRange(range);}),hasResult=!0);var gammas=ee.rpc_convert.csvToNumbers(params.gamma);if(1<gammas.length){throw Error("Only one gamma value is supported");}1===gammas.length&&(result.gamma=gammas[0],hasResult=!0);return hasResult?result:null;};ee.rpc_convert.csvToNumbers=function(csv){return csv?csv.split(",").map(Number):[];};ee.rpc_convert.pairedValues=function(obj,a,b){var aValues=ee.rpc_convert.csvToNumbers(obj[a]),bValues=ee.rpc_convert.csvToNumbers(obj[b]);if(0===aValues.length){return bValues.map(function(value){var $jscomp$compprop1={};return $jscomp$compprop1[a]=0,$jscomp$compprop1[b]=value,$jscomp$compprop1;});}if(0===bValues.length){return aValues.map(function(value){var $jscomp$compprop2={};return $jscomp$compprop2[a]=value,$jscomp$compprop2[b]=1,$jscomp$compprop2;});}if(aValues.length!==bValues.length){throw Error("Length of "+a+" and "+b+" must match.");}return aValues.map(function(value,index){var $jscomp$compprop3={};return $jscomp$compprop3[a]=value,$jscomp$compprop3[b]=bValues[index],$jscomp$compprop3;});};ee.rpc_convert.algorithms=function(result){for(var convertArgument=function(argument){var internalArgument={};internalArgument.description=argument.description||"";internalArgument.type=argument.type||"";null!=argument.argumentName&&(internalArgument.name=argument.argumentName);void 0!==argument.defaultValue&&(internalArgument["default"]=argument.defaultValue);null!=argument.optional&&(internalArgument.optional=argument.optional);return internalArgument;},convertAlgorithm=function(algorithm){var internalAlgorithm={};internalAlgorithm.args=(algorithm.arguments||[]).map(convertArgument);internalAlgorithm.description=algorithm.description||"";internalAlgorithm.returns=algorithm.returnType||"";null!=algorithm.hidden&&(internalAlgorithm.hidden=algorithm.hidden);algorithm.preview&&(internalAlgorithm.preview=algorithm.preview);algorithm.deprecated&&(internalAlgorithm.deprecated=algorithm.deprecationReason);algorithm.sourceCodeUri&&(internalAlgorithm.sourceCodeUri=algorithm.sourceCodeUri);return internalAlgorithm;},internalAlgorithms={},$jscomp$iter$22=$jscomp.makeIterator(result.algorithms||[]),$jscomp$key$algorithm=$jscomp$iter$22.next();!$jscomp$key$algorithm.done;$jscomp$key$algorithm=$jscomp$iter$22.next()){var algorithm$jscomp$0=$jscomp$key$algorithm.value,name=algorithm$jscomp$0.name.replace(/^algorithms\//,"");internalAlgorithms[name]=convertAlgorithm(algorithm$jscomp$0);}return internalAlgorithms;};ee.rpc_convert.DEFAULT_PROJECT="earthengine-legacy";ee.rpc_convert.PUBLIC_PROJECT="earthengine-public";ee.rpc_convert.PROJECT_ID_RE=/^projects\/((?:\w+(?:[\w\-]+\.[\w\-]+)*?\.\w+:)?[a-z][a-z0-9\-]{4,28}[a-z0-9])\/.+/;ee.rpc_convert.CLOUD_ASSET_ID_RE=/^projects\/((?:\w+(?:[\w\-]+\.[\w\-]+)*?\.\w+:)?[a-z][a-z0-9\-]{4,28}[a-z0-9])\/assets\/(.*)$/;ee.rpc_convert.CLOUD_ASSET_ROOT_RE=/^projects\/((?:\w+(?:[\w\-]+\.[\w\-]+)*?\.\w+:)?[a-z][a-z0-9\-]{4,28}[a-z0-9])\/assets\/?$/;ee.rpc_convert.projectIdFromPath=function(path){var matches=ee.rpc_convert.PROJECT_ID_RE.exec(path);return matches?matches[1]:ee.rpc_convert.DEFAULT_PROJECT;};ee.rpc_convert.projectParentFromPath=function(path){return"projects/"+ee.rpc_convert.projectIdFromPath(path);};ee.rpc_convert.assetIdToAssetName=function(param){return ee.rpc_convert.CLOUD_ASSET_ID_RE.exec(param)?param:/^(users|projects)\/.*/.exec(param)?"projects/"+ee.rpc_convert.DEFAULT_PROJECT+"/assets/"+param:"projects/"+ee.rpc_convert.PUBLIC_PROJECT+"/assets/"+param;};ee.rpc_convert.assetNameToAssetId=function(name){var parts=name.split("/"),isLegacyProject=function(id){return[ee.rpc_convert.DEFAULT_PROJECT,ee.rpc_convert.PUBLIC_PROJECT].includes(id);};return"projects"===parts[0]&&"assets"===parts[2]&&isLegacyProject(parts[1])?parts.slice(3).join("/"):name;};ee.rpc_convert.assetTypeForCreate=function(param){switch(param){case"ImageCollection":return"IMAGE_COLLECTION";case"Folder":return"FOLDER";default:return param;}};ee.rpc_convert.listAssetsToGetList=function(result){return(result.assets||[]).map(ee.rpc_convert.assetToLegacyResult);};ee.rpc_convert.listImagesToGetList=function(result){return(result.images||[]).map(ee.rpc_convert.imageToLegacyResult);};ee.rpc_convert.assetTypeToLegacyAssetType=function(type){switch(type){case"ALGORITHM":return"Algorithm";case"FOLDER":return"Folder";case"IMAGE":return"Image";case"IMAGE_COLLECTION":return"ImageCollection";case"TABLE":return"Table";case"CLASSIFIER":return"Classifier";case"DATA_MAPPING_SERVICE":return"DmsAsset";default:return"Unknown";}};ee.rpc_convert.legacyAssetTypeToAssetType=function(type){switch(type){case"Algorithm":return"ALGORITHM";case"Folder":return"FOLDER";case"Image":return"IMAGE";case"ImageCollection":return"IMAGE_COLLECTION";case"Table":return"TABLE";default:return"UNKNOWN";}};ee.rpc_convert.assetToLegacyResult=function(result){var asset=ee.rpc_convert.makeLegacyAsset_(ee.rpc_convert.assetTypeToLegacyAssetType(result.type),result.name),properties=Object.assign({},result.properties||{});result.sizeBytes&&(properties["system:asset_size"]=Number(result.sizeBytes));result.startTime&&(properties["system:time_start"]=Date.parse(result.startTime));result.endTime&&(properties["system:time_end"]=Date.parse(result.endTime));result.geometry&&(properties["system:footprint"]=result.geometry);"string"===typeof result.title&&(properties["system:title"]=result.title);"string"===typeof result.description&&(properties["system:description"]=result.description);result.updateTime&&(asset.version=1000*Date.parse(result.updateTime));asset.properties=properties;result.bands&&(asset.bands=result.bands.map(function(band){var legacyBand={id:band.id,crs:band.grid.crsCode,dimensions:void 0,crs_transform:void 0};if(band.grid){if(null!=band.grid.affineTransform){var affine=band.grid.affineTransform;legacyBand.crs_transform=[affine.scaleX||0,affine.shearX||0,affine.translateX||0,affine.shearY||0,affine.scaleY||0,affine.translateY||0];}null!=band.grid.dimensions&&(legacyBand.dimensions=[band.grid.dimensions.width,band.grid.dimensions.height]);}if(band.dataType){var dataType={type:"PixelType"};dataType.precision=(band.dataType.precision||"").toLowerCase();band.dataType.range&&(dataType.min=band.dataType.range.min||0,dataType.max=band.dataType.range.max);legacyBand.data_type=dataType;}return legacyBand;}));result.dmsAssetLocation&&(asset.dmsAssetLocation=result.dmsAssetLocation);return asset;};ee.rpc_convert.legacyPropertiesToAssetUpdate=function(legacyProperties){var asset=new module$exports$eeapiclient$ee_api_client.EarthEngineAsset(),toTimestamp=function(msec){return new Date(Number(msec)).toISOString();},asNull=function(value){return null===value?module$exports$eeapiclient$domain_object.NULL_VALUE:void 0;},properties=Object.assign({},legacyProperties),value$jscomp$0,extractValue=function(key){value$jscomp$0=properties[key];delete properties[key];return value$jscomp$0;};void 0!==extractValue("system:asset_size")&&(asset.sizeBytes=asNull(value$jscomp$0)||String(value$jscomp$0));void 0!==extractValue("system:time_start")&&(asset.startTime=asNull(value$jscomp$0)||toTimestamp(value$jscomp$0));void 0!==extractValue("system:time_end")&&(asset.endTime=asNull(value$jscomp$0)||toTimestamp(value$jscomp$0));void 0!==extractValue("system:footprint")&&(asset.geometry=asNull(value$jscomp$0)||value$jscomp$0);extractValue("system:title");"string"!==typeof value$jscomp$0&&null!==value$jscomp$0||null!=properties.title||(properties.title=asNull(value$jscomp$0)||value$jscomp$0);extractValue("system:description");"string"!==typeof value$jscomp$0&&null!==value$jscomp$0||null!=properties.description||(properties.description=asNull(value$jscomp$0)||value$jscomp$0);Object.entries(properties).forEach(function($jscomp$destructuring$var28){var $jscomp$destructuring$var29=$jscomp.makeIterator($jscomp$destructuring$var28),key=$jscomp$destructuring$var29.next().value,value=$jscomp$destructuring$var29.next().value;properties[key]=asNull(value)||value;});asset.properties=properties;return asset;};ee.rpc_convert.imageToLegacyResult=function(result){return ee.rpc_convert.makeLegacyAsset_("Image",result.name);};ee.rpc_convert.makeLegacyAsset_=function(type,name){var legacyAsset={};legacyAsset.type=type;null!=name&&(legacyAsset.id=ee.rpc_convert.assetNameToAssetId(name));return legacyAsset;};ee.rpc_convert.getListToListImages=function(param){var imagesRequest={},toTimestamp=function(msec){return new Date(msec).toISOString();};param.num&&(imagesRequest.pageSize=param.num);param.starttime&&(imagesRequest.startTime=toTimestamp(param.starttime));param.endtime&&(imagesRequest.endTime=toTimestamp(param.endtime));param.bbox&&(imagesRequest.region=ee.rpc_convert.boundingBoxToGeoJson(param.bbox));param.region&&(imagesRequest.region=param.region);param.bbox&¶m.region&&console.warn("Multiple request parameters converted to region");for(var allKeys="id num starttime endtime bbox region".split(" "),$jscomp$iter$23=$jscomp.makeIterator(Object.keys(param).filter(function(k){return!allKeys.includes(k);})),$jscomp$key$key=$jscomp$iter$23.next();!$jscomp$key$key.done;$jscomp$key$key=$jscomp$iter$23.next()){console.warn("Unrecognized key "+$jscomp$key$key.value+" ignored");}imagesRequest.fields="assets(type,path)";return imagesRequest;};ee.rpc_convert.boundingBoxToGeoJson=function(bbox){return'{"type":"Polygon","coordinates":[[['+[[0,1],[2,1],[2,3],[0,3],[0,1]].map(function(i){return bbox[i[0]]+","+bbox[i[1]];}).join("],[")+"]]]}";};ee.rpc_convert.iamPolicyToAcl=function(result){var bindingMap={};(result.bindings||[]).forEach(function(binding){bindingMap[binding.role]=binding.members;});var groups=new Set(),toAcl=function(member){var email=member.replace(/^group:|^user:|^serviceAccount:/,"");member.startsWith("group:")&&groups.add(email);return email;},readersWithAll=bindingMap["roles/viewer"]||[],readers=readersWithAll.filter(function(reader){return"allUsers"!==reader;}),internalAcl={owners:(bindingMap["roles/owner"]||[]).map(toAcl),writers:(bindingMap["roles/editor"]||[]).map(toAcl),readers:readers.map(toAcl)};0<groups.size&&(internalAcl.groups=groups);readersWithAll.length!=readers.length&&(internalAcl.all_users_can_read=!0);return internalAcl;};ee.rpc_convert.aclToIamPolicy=function(acls){var isGroup=function(email){return acls.groups&&acls.groups.has(email);},isServiceAccount=function(email){return email.match(/[@|\.]gserviceaccount\.com$/);},asMembers=function(aclName){return(acls[aclName]||[]).map(function(email){var prefix="user:";isGroup(email)?prefix="group:":isServiceAccount(email)&&(prefix="serviceAccount:");return prefix+email;});},all=acls.all_users_can_read?["allUsers"]:[],bindings=[{role:"roles/owner",members:asMembers("owners")},{role:"roles/viewer",members:asMembers("readers").concat(all)},{role:"roles/editor",members:asMembers("writers")}].map(function(params){return new module$exports$eeapiclient$ee_api_client.Binding(params);});return new module$exports$eeapiclient$ee_api_client.Policy({bindings:bindings.filter(function(binding){return binding.members.length;}),etag:null});};ee.rpc_convert.taskIdToOperationName=function(operationNameOrTaskId){return"projects/"+ee.rpc_convert.operationNameToProject(operationNameOrTaskId)+"/operations/"+ee.rpc_convert.operationNameToTaskId(operationNameOrTaskId);};ee.rpc_convert.operationNameToTaskId=function(result){var found=/^.*operations\/(.*)$/.exec(result);return found?found[1]:result;};ee.rpc_convert.operationNameToProject=function(operationNameOrTaskId){var found=/^projects\/(.+)\/operations\/.+$/.exec(operationNameOrTaskId);return found?found[1]:ee.rpc_convert.DEFAULT_PROJECT;};ee.rpc_convert.operationToTask=function(result){var internalTask={},assignTimestamp=function(field,timestamp){null!=timestamp&&(internalTask[field]=Date.parse(timestamp));},convertState=function(state){switch(state){case"PENDING":return"READY";case"RUNNING":return"RUNNING";case"CANCELLING":return"CANCEL_REQUESTED";case"SUCCEEDED":return"COMPLETED";case"CANCELLED":return"CANCELLED";case"FAILED":return"FAILED";default:return"UNKNOWN";}},metadata=module$contents$eeapiclient$domain_object_deserialize(module$exports$eeapiclient$ee_api_client.OperationMetadata,result.metadata||{});null!=metadata.description&&(internalTask.description=metadata.description);null!=metadata.state&&(internalTask.state=convertState(metadata.state));assignTimestamp("creation_timestamp_ms",metadata.createTime);assignTimestamp("update_timestamp_ms",metadata.updateTime);assignTimestamp("start_timestamp_ms",metadata.startTime);internalTask.attempt=metadata.attempt;result.done&&null!=result.error&&(internalTask.error_message=result.error.message);null!=result.name&&(internalTask.id=ee.rpc_convert.operationNameToTaskId(result.name),internalTask.name=result.name);internalTask.task_type=metadata.type||"UNKNOWN";internalTask.output_url=metadata.destinationUris;internalTask.source_url=metadata.scriptUri;return internalTask;};ee.rpc_convert.operationToProcessingResponse=function(operation){var result={started:"OK"};operation.name&&(result.taskId=ee.rpc_convert.operationNameToTaskId(operation.name),result.name=operation.name);operation.error&&(result.note=operation.error.message);return result;};ee.rpc_convert.sourcePathsToUris=function(source){return source.primaryPath?[source.primaryPath].concat($jscomp.arrayFromIterable(source.additionalPaths||[])):null;};ee.rpc_convert.toImageManifest=function(params){var convertImageSource=function(source){var apiSource=module$contents$eeapiclient$domain_object_deserialize(module$exports$eeapiclient$ee_api_client.ImageSource,source);apiSource.uris=ee.rpc_convert.sourcePathsToUris(source);return apiSource;},manifest=module$contents$eeapiclient$domain_object_deserialize(module$exports$eeapiclient$ee_api_client.ImageManifest,params);manifest.name=ee.rpc_convert.assetIdToAssetName(params.id);manifest.tilesets=(params.tilesets||[]).map(function(tileset){var apiTileset=module$contents$eeapiclient$domain_object_deserialize(module$exports$eeapiclient$ee_api_client.Tileset,tileset);apiTileset.sources=(tileset.sources||[]).map(convertImageSource);return apiTileset;});manifest.bands=(params.bands||[]).map(function(band){var apiBand=module$contents$eeapiclient$domain_object_deserialize(module$exports$eeapiclient$ee_api_client.TilesetBand,band);apiBand.missingData=ee.rpc_convert.toOnePlatformMissingData(band.missingData);return apiBand;});manifest.missingData=ee.rpc_convert.toOnePlatformMissingData(params.missingData);manifest.maskBands=module$contents$goog$array_flatten((params.tilesets||[]).map(ee.rpc_convert.toOnePlatformMaskBands));manifest.pyramidingPolicy=params.pyramidingPolicy||null;if(params.properties){var properties=Object.assign({},params.properties),toTimestamp=function(msec){return new Date(Number(msec)).toISOString();},value,extractValue=function(key){value=properties[key];delete properties[key];return value;};extractValue("system:time_start")&&(manifest.startTime=toTimestamp(value));extractValue("system:time_end")&&(manifest.endTime=toTimestamp(value));manifest.properties=properties;}return manifest;};ee.rpc_convert.toOnePlatformMaskBands=function(tileset){var maskBands=[];if(!Array.isArray(tileset.fileBands)){return maskBands;}var convertMaskConfig=function(maskConfig){var bandIds=[];null!=maskConfig&&Array.isArray(maskConfig.bandId)&&(bandIds=maskConfig.bandId.map(function(bandId){return bandId||"";}));return new module$exports$eeapiclient$ee_api_client.TilesetMaskBand({tilesetId:tileset.id||"",bandIds:bandIds});};tileset.fileBands.forEach(function(fileBand){fileBand.maskForAllBands?maskBands.push(convertMaskConfig(null)):null!=fileBand.maskForBands&&maskBands.push(convertMaskConfig(fileBand.maskForBands));});return maskBands;};ee.rpc_convert.toTableManifest=function(params){var manifest=module$contents$eeapiclient$domain_object_deserialize(module$exports$eeapiclient$ee_api_client.TableManifest,params);manifest.name=ee.rpc_convert.assetIdToAssetName(params.id);manifest.sources=(params.sources||[]).map(function(source){var apiSource=module$contents$eeapiclient$domain_object_deserialize(module$exports$eeapiclient$ee_api_client.TableSource,source);apiSource.uris=ee.rpc_convert.sourcePathsToUris(source);source.maxError&&(apiSource.maxErrorMeters=source.maxError);return apiSource;});if(params.properties){var properties=Object.assign({},params.properties),toTimestamp=function(msec){return new Date(Number(msec)).toISOString();},value,extractValue=function(key){value=properties[key];delete properties[key];return value;};extractValue("system:time_start")&&(manifest.startTime=toTimestamp(value));extractValue("system:time_end")&&(manifest.endTime=toTimestamp(value));manifest.properties=properties;}return manifest;};ee.rpc_convert.toOnePlatformMissingData=function(params){if(null==params){return null;}var missingData=new module$exports$eeapiclient$ee_api_client.MissingData({values:[]});null!=params.value&&"number"===typeof params.value&&missingData.values.push(params.value);Array.isArray(params.values)&¶ms.values.map(function(value){"number"===typeof value&&missingData.values.push(value);});return module$contents$goog$array_isEmpty(missingData.values)?null:missingData;};ee.rpc_convert.folderQuotaToAssetQuotaDetails=function(quota){var toNumber=function(field){return Number(field||0);};return{asset_count:{usage:toNumber(quota.assetCount),limit:toNumber(quota.maxAssetCount)},asset_size:{usage:toNumber(quota.sizeBytes),limit:toNumber(quota.maxSizeBytes)}};};goog.crypt={};goog.crypt.Hash=function(){this.blockSize=-1;};goog.crypt.Md5=function(){goog.crypt.Hash.call(this);this.blockSize=64;this.chain_=Array(4);this.block_=Array(this.blockSize);this.totalLength_=this.blockLength_=0;this.reset();};goog.inherits(goog.crypt.Md5,goog.crypt.Hash);goog.crypt.Md5.prototype.reset=function(){this.chain_[0]=1732584193;this.chain_[1]=4023233417;this.chain_[2]=2562383102;this.chain_[3]=271733878;this.totalLength_=this.blockLength_=0;};goog.crypt.Md5.prototype.compress_=function(buf,opt_offset){opt_offset||(opt_offset=0);var X=Array(16);if("string"===typeof buf){for(var i=0;16>i;++i){X[i]=buf.charCodeAt(opt_offset++)|buf.charCodeAt(opt_offset++)<<8|buf.charCodeAt(opt_offset++)<<16|buf.charCodeAt(opt_offset++)<<24;}}else{for(i=0;16>i;++i){X[i]=buf[opt_offset++]|buf[opt_offset++]<<8|buf[opt_offset++]<<16|buf[opt_offset++]<<24;}}var A=this.chain_[0],B=this.chain_[1],C=this.chain_[2],D=this.chain_[3],sum=0;sum=A+(D^B&(C^D))+X[0]+3614090360&4294967295;A=B+(sum<<7&4294967295|sum>>>25);sum=D+(C^A&(B^C))+X[1]+3905402710&4294967295;D=A+(sum<<12&4294967295|sum>>>20);sum=C+(B^D&(A^B))+X[2]+606105819&4294967295;C=D+(sum<<17&4294967295|sum>>>15);sum=B+(A^C&(D^A))+X[3]+3250441966&4294967295;B=C+(sum<<22&4294967295|sum>>>10);sum=A+(D^B&(C^D))+X[4]+4118548399&4294967295;A=B+(sum<<7&4294967295|sum>>>25);sum=D+(C^A&(B^C))+X[5]+1200080426&4294967295;D=A+(sum<<12&4294967295|sum>>>20);sum=C+(B^D&(A^B))+X[6]+2821735955&4294967295;C=D+(sum<<17&4294967295|sum>>>15);sum=B+(A^C&(D^A))+X[7]+4249261313&4294967295;B=C+(sum<<22&4294967295|sum>>>10);sum=A+(D^B&(C^D))+X[8]+1770035416&4294967295;A=B+(sum<<7&4294967295|sum>>>25);sum=D+(C^A&(B^C))+X[9]+2336552879&4294967295;D=A+(sum<<12&4294967295|sum>>>20);sum=C+(B^D&(A^B))+X[10]+4294925233&4294967295;C=D+(sum<<17&4294967295|sum>>>15);sum=B+(A^C&(D^A))+X[11]+2304563134&4294967295;B=C+(sum<<22&4294967295|sum>>>10);sum=A+(D^B&(C^D))+X[12]+1804603682&4294967295;A=B+(sum<<7&4294967295|sum>>>25);sum=D+(C^A&(B^C))+X[13]+4254626195&4294967295;D=A+(sum<<12&4294967295|sum>>>20);sum=C+(B^D&(A^B))+X[14]+2792965006&4294967295;C=D+(sum<<17&4294967295|sum>>>15);sum=B+(A^C&(D^A))+X[15]+1236535329&4294967295;B=C+(sum<<22&4294967295|sum>>>10);sum=A+(C^D&(B^C))+X[1]+4129170786&4294967295;A=B+(sum<<5&4294967295|sum>>>27);sum=D+(B^C&(A^B))+X[6]+3225465664&4294967295;D=A+(sum<<9&4294967295|sum>>>23);sum=C+(A^B&(D^A))+X[11]+643717713&4294967295;C=D+(sum<<14&4294967295|sum>>>18);sum=B+(D^A&(C^D))+X[0]+3921069994&4294967295;B=C+(sum<<20&4294967295|sum>>>12);sum=A+(C^D&(B^C))+X[5]+3593408605&4294967295;A=B+(sum<<5&4294967295|sum>>>27);sum=D+(B^C&(A^B))+X[10]+38016083&4294967295;D=A+(sum<<9&4294967295|sum>>>23);sum=C+(A^B&(D^A))+X[15]+3634488961&4294967295;C=D+(sum<<14&4294967295|sum>>>18);sum=B+(D^A&(C^D))+X[4]+3889429448&4294967295;B=C+(sum<<20&4294967295|sum>>>12);sum=A+(C^D&(B^C))+X[9]+568446438&4294967295;A=B+(sum<<5&4294967295|sum>>>27);sum=D+(B^C&(A^B))+X[14]+3275163606&4294967295;D=A+(sum<<9&4294967295|sum>>>23);sum=C+(A^B&(D^A))+X[3]+4107603335&4294967295;C=D+(sum<<14&4294967295|sum>>>18);sum=B+(D^A&(C^D))+X[8]+1163531501&4294967295;B=C+(sum<<20&4294967295|sum>>>12);sum=A+(C^D&(B^C))+X[13]+2850285829&4294967295;A=B+(sum<<5&4294967295|sum>>>27);sum=D+(B^C&(A^B))+X[2]+4243563512&4294967295;D=A+(sum<<9&4294967295|sum>>>23);sum=C+(A^B&(D^A))+X[7]+1735328473&4294967295;C=D+(sum<<14&4294967295|sum>>>18);sum=B+(D^A&(C^D))+X[12]+2368359562&4294967295;B=C+(sum<<20&4294967295|sum>>>12);sum=A+(B^C^D)+X[5]+4294588738&4294967295;A=B+(sum<<4&4294967295|sum>>>28);sum=D+(A^B^C)+X[8]+2272392833&4294967295;D=A+(sum<<11&4294967295|sum>>>21);sum=C+(D^A^B)+X[11]+1839030562&4294967295;C=D+(sum<<16&4294967295|sum>>>16);sum=B+(C^D^A)+X[14]+4259657740&4294967295;B=C+(sum<<23&4294967295|sum>>>9);sum=A+(B^C^D)+X[1]+2763975236&4294967295;A=B+(sum<<4&4294967295|sum>>>28);sum=D+(A^B^C)+X[4]+1272893353&4294967295;D=A+(sum<<11&4294967295|sum>>>21);sum=C+(D^A^B)+X[7]+4139469664&4294967295;C=D+(sum<<16&4294967295|sum>>>16);sum=B+(C^D^A)+X[10]+3200236656&4294967295;B=C+(sum<<23&4294967295|sum>>>9);sum=A+(B^C^D)+X[13]+681279174&4294967295;A=B+(sum<<4&4294967295|sum>>>28);sum=D+(A^B^C)+X[0]+3936430074&4294967295;D=A+(sum<<11&4294967295|sum>>>21);sum=C+(D^A^B)+X[3]+3572445317&4294967295;C=D+(sum<<16&4294967295|sum>>>16);sum=B+(C^D^A)+X[6]+76029189&4294967295;B=C+(sum<<23&4294967295|sum>>>9);sum=A+(B^C^D)+X[9]+3654602809&4294967295;A=B+(sum<<4&4294967295|sum>>>28);sum=D+(A^B^C)+X[12]+3873151461&4294967295;D=A+(sum<<11&4294967295|sum>>>21);sum=C+(D^A^B)+X[15]+530742520&4294967295;C=D+(sum<<16&4294967295|sum>>>16);sum=B+(C^D^A)+X[2]+3299628645&4294967295;B=C+(sum<<23&4294967295|sum>>>9);sum=A+(C^(B|~D))+X[0]+4096336452&4294967295;A=B+(sum<<6&4294967295|sum>>>26);sum=D+(B^(A|~C))+X[7]+1126891415&4294967295;D=A+(sum<<10&4294967295|sum>>>22);sum=C+(A^(D|~B))+X[14]+2878612391&4294967295;C=D+(sum<<15&4294967295|sum>>>17);sum=B+(D^(C|~A))+X[5]+4237533241&4294967295;B=C+(sum<<21&4294967295|sum>>>11);sum=A+(C^(B|~D))+X[12]+1700485571&4294967295;A=B+(sum<<6&4294967295|sum>>>26);sum=D+(B^(A|~C))+X[3]+2399980690&4294967295;D=A+(sum<<10&4294967295|sum>>>22);sum=C+(A^(D|~B))+X[10]+4293915773&4294967295;C=D+(sum<<15&4294967295|sum>>>17);sum=B+(D^(C|~A))+X[1]+2240044497&4294967295;B=C+(sum<<21&4294967295|sum>>>11);sum=A+(C^(B|~D))+X[8]+1873313359&4294967295;A=B+(sum<<6&4294967295|sum>>>26);sum=D+(B^(A|~C))+X[15]+4264355552&4294967295;D=A+(sum<<10&4294967295|sum>>>22);sum=C+(A^(D|~B))+X[6]+2734768916&4294967295;C=D+(sum<<15&4294967295|sum>>>17);sum=B+(D^(C|~A))+X[13]+1309151649&4294967295;B=C+(sum<<21&4294967295|sum>>>11);sum=A+(C^(B|~D))+X[4]+4149444226&4294967295;A=B+(sum<<6&4294967295|sum>>>26);sum=D+(B^(A|~C))+X[11]+3174756917&4294967295;D=A+(sum<<10&4294967295|sum>>>22);sum=C+(A^(D|~B))+X[2]+718787259&4294967295;C=D+(sum<<15&4294967295|sum>>>17);sum=B+(D^(C|~A))+X[9]+3951481745&4294967295;this.chain_[0]=this.chain_[0]+A&4294967295;this.chain_[1]=this.chain_[1]+(C+(sum<<21&4294967295|sum>>>11))&4294967295;this.chain_[2]=this.chain_[2]+C&4294967295;this.chain_[3]=this.chain_[3]+D&4294967295;};goog.crypt.Md5.prototype.update=function(bytes,opt_length){void 0===opt_length&&(opt_length=bytes.length);for(var lengthMinusBlock=opt_length-this.blockSize,block=this.block_,blockLength=this.blockLength_,i=0;i<opt_length;){if(0==blockLength){for(;i<=lengthMinusBlock;){this.compress_(bytes,i),i+=this.blockSize;}}if("string"===typeof bytes){for(;i<opt_length;){if(block[blockLength++]=bytes.charCodeAt(i++),blockLength==this.blockSize){this.compress_(block);blockLength=0;break;}}}else{for(;i<opt_length;){if(block[blockLength++]=bytes[i++],blockLength==this.blockSize){this.compress_(block);blockLength=0;break;}}}}this.blockLength_=blockLength;this.totalLength_+=opt_length;};goog.crypt.Md5.prototype.digest=function(){var pad=Array((56>this.blockLength_?this.blockSize:2*this.blockSize)-this.blockLength_);pad[0]=128;for(var i=1;i<pad.length-8;++i){pad[i]=0;}var totalBits=8*this.totalLength_;for(i=pad.length-8;i<pad.length;++i){pad[i]=totalBits&255,totalBits/=256;}this.update(pad);var digest=Array(16),n=0;for(i=0;4>i;++i){for(var j=0;32>j;j+=8){digest[n++]=this.chain_[i]>>>j&255;}}return digest;};ee.Serializer=function(opt_isCompound){this.HASH_KEY="__ee_hash__";this.isCompound_=!1!==opt_isCompound;this.scope_=[];this.encoded_={};this.withHashes_=[];this.hashes_=new WeakMap();this.unboundName=void 0;};goog.exportSymbol("ee.Serializer",ee.Serializer);ee.Serializer.jsonSerializer_=new goog.json.Serializer();ee.Serializer.hash_=new goog.crypt.Md5();ee.Serializer.encode=function(obj,opt_isCompound){return new ee.Serializer(void 0!==opt_isCompound?opt_isCompound:!0).encode_(obj);};goog.exportSymbol("ee.Serializer.encode",ee.Serializer.encode);ee.Serializer.toJSON=function(obj){return ee.Serializer.jsonSerializer_.serialize(ee.Serializer.encode(obj));};goog.exportSymbol("ee.Serializer.toJSON",ee.Serializer.toJSON);ee.Serializer.toReadableJSON=function(obj){return ee.Serializer.stringify(ee.Serializer.encode(obj,!1));};goog.exportSymbol("ee.Serializer.toReadableJSON",ee.Serializer.toReadableJSON);ee.Serializer.stringify=function(encoded){return"JSON"in goog.global?goog.global.JSON.stringify(encoded,null," "):ee.Serializer.jsonSerializer_.serialize(encoded);};ee.Serializer.prototype.encode_=function(object){var value=this.encodeValue_(object);this.isCompound_&&(value=goog.isObject(value)&&"ValueRef"==value.type&&1==this.scope_.length?this.scope_[0][1]:{type:"CompoundValue",scope:this.scope_,value:value},this.scope_=[],module$contents$goog$array_forEach(this.withHashes_,goog.bind(function(obj){delete obj[this.HASH_KEY];},this)),this.withHashes_=[],this.encoded_={});return value;};ee.Serializer.prototype.encodeValue_=function(object){if(void 0===object){throw Error("Can't encode an undefined value.");}var hash=goog.isObject(object)?object[this.HASH_KEY]:null;if(this.isCompound_&&null!=hash&&this.encoded_[hash]){return{type:"ValueRef",value:this.encoded_[hash]};}if(null===object||"boolean"===typeof object||"number"===typeof object||"string"===typeof object){return object;}if(goog.isDateLike(object)){return{type:"Invocation",functionName:"Date",arguments:{value:Math.floor(object.getTime())}};}if(object instanceof ee.Encodable){var result=object.encode(goog.bind(this.encodeValue_,this));if(!(Array.isArray(result)||goog.isObject(result)&&"ArgumentRef"!=result.type)){return result;}}else{if(Array.isArray(object)){result=module$contents$goog$array_map(object,function(element){return this.encodeValue_(element);},this);}else{if(goog.isObject(object)&&"function"!==typeof object){var encodedObject=module$contents$goog$object_map(object,function(element){if("function"!==typeof element){return this.encodeValue_(element);}},this);module$contents$goog$object_remove(encodedObject,this.HASH_KEY);result={type:"Dictionary",value:encodedObject};}else{throw Error("Can't encode object: "+object);}}}if(this.isCompound_){hash=ee.Serializer.computeHash(result);if(this.encoded_[hash]){var name=this.encoded_[hash];}else{name=String(this.scope_.length),this.scope_.push([name,result]),this.encoded_[hash]=name;}object[this.HASH_KEY]=hash;this.withHashes_.push(object);return{type:"ValueRef",value:name};}return result;};ee.Serializer.computeHash=function(obj){ee.Serializer.hash_.reset();ee.Serializer.hash_.update(ee.Serializer.jsonSerializer_.serialize(obj));return ee.Serializer.hash_.digest().toString();};ee.Serializer.encodeCloudApi=function(obj){return module$contents$eeapiclient$domain_object_serialize(ee.Serializer.encodeCloudApiExpression(obj));};goog.exportSymbol("ee.Serializer.encodeCloudApi",ee.Serializer.encodeCloudApi);ee.Serializer.encodeCloudApiExpression=function(obj,unboundName){var serializer=new ee.Serializer(!0);serializer.unboundName=unboundName;return serializer.encodeForCloudApi_(obj);};ee.Serializer.encodeCloudApiPretty=function(obj){var encoded=new ee.Serializer(!1).encodeForCloudApi_(obj),values=encoded.values,walkObject=function(object){if(!goog.isObject(object)){return object;}for(var ret=Array.isArray(object)?[]:{},isNode=object instanceof Object.getPrototypeOf(module$exports$eeapiclient$ee_api_client.ValueNode),$jscomp$iter$24=$jscomp.makeIterator(Object.entries(isNode?object.Serializable$values:object)),$jscomp$key$=$jscomp$iter$24.next();!$jscomp$key$.done;$jscomp$key$=$jscomp$iter$24.next()){var $jscomp$destructuring$var31=$jscomp.makeIterator($jscomp$key$.value),key=$jscomp$destructuring$var31.next().value,val=$jscomp$destructuring$var31.next().value;isNode?null!==val&&(ret[key]="functionDefinitionValue"===key&&null!=val.body?{argumentNames:val.argumentNames,body:walkObject(values[val.body])}:"functionInvocationValue"===key&&null!=val.functionReference?{arguments:module$contents$goog$object_map(val.arguments,walkObject),functionReference:walkObject(values[val.functionReference])}:"constantValue"===key?val===module$exports$eeapiclient$domain_object.NULL_VALUE?null:val:walkObject(val)):ret[key]=walkObject(val);}return ret;};return encoded.result&&walkObject(values[encoded.result]);};goog.exportSymbol("ee.Serializer.encodeCloudApiPretty",ee.Serializer.encodeCloudApiPretty);ee.Serializer.toCloudApiJSON=function(obj){return ee.Serializer.jsonSerializer_.serialize(ee.Serializer.encodeCloudApi(obj));};goog.exportSymbol("ee.Serializer.toCloudApiJSON",ee.Serializer.toCloudApiJSON);ee.Serializer.toReadableCloudApiJSON=function(obj){return ee.Serializer.stringify(ee.Serializer.encodeCloudApiPretty(obj));};goog.exportSymbol("ee.Serializer.toReadableCloudApiJSON",ee.Serializer.toReadableCloudApiJSON);ee.Serializer.prototype.encodeForCloudApi_=function(obj){try{var result=this.makeReference(obj);return new ExpressionOptimizer(result,this.scope_,this.isCompound_).optimize();}finally{this.hashes_=new WeakMap(),this.encoded_={},this.scope_=[];}};ee.Serializer.prototype.makeReference=function(obj){var $jscomp$this=this,makeRef=function(result){var hash=ee.Serializer.computeHash(result);goog.isObject(obj)&&$jscomp$this.hashes_.set(obj,hash);if($jscomp$this.encoded_[hash]){return $jscomp$this.encoded_[hash];}var name=String($jscomp$this.scope_.length);$jscomp$this.scope_.push([name,result]);return $jscomp$this.encoded_[hash]=name;};if(goog.isObject(obj)&&this.encoded_[this.hashes_.get(obj)]){return this.encoded_[this.hashes_.get(obj)];}if(null===obj||"boolean"===typeof obj||"string"===typeof obj||"number"===typeof obj){return makeRef(ee.rpc_node.constant(obj));}if(goog.isDateLike(obj)){return makeRef(ee.rpc_node.functionByName("Date",{value:ee.rpc_node.constant(Math.floor(obj.getTime()))}));}if(obj instanceof ee.Encodable){return makeRef(obj.encodeCloudValue(this));}if(Array.isArray(obj)){return makeRef(ee.rpc_node.array(obj.map(function(x){return ee.rpc_node.reference($jscomp$this.makeReference(x));})));}if(goog.isObject(obj)&&"function"!==typeof obj){var values={};Object.keys(obj).sort().forEach(function(k){values[k]=ee.rpc_node.reference($jscomp$this.makeReference(obj[k]));});return makeRef(ee.rpc_node.dictionary(values));}throw Error("Can't encode object: "+obj);};var ExpressionOptimizer=function(rootReference,values,isCompound){var $jscomp$this=this;this.rootReference=rootReference;this.values={};values.forEach(function(tuple){return $jscomp$this.values[tuple[0]]=tuple[1];});this.referenceCounts=isCompound?this.countReferences():null;this.optimizedValues={};this.referenceMap={};this.nextMappedRef=0;};ExpressionOptimizer.prototype.optimize=function(){var result=this.optimizeReference(this.rootReference);return new module$exports$eeapiclient$ee_api_client.Expression({result:result,values:this.optimizedValues});};ExpressionOptimizer.prototype.optimizeReference=function(ref){if(ref in this.referenceMap){return this.referenceMap[ref];}var mappedRef=String(this.nextMappedRef++);this.referenceMap[ref]=mappedRef;this.optimizedValues[mappedRef]=this.optimizeValue(this.values[ref],0);return mappedRef;};ExpressionOptimizer.prototype.optimizeValue=function(value,depth){var $jscomp$this=this,isConst=function(v){return null!==v.constantValue;},serializeConst=function(v){return v===module$exports$eeapiclient$domain_object.NULL_VALUE?null:v;};if(isConst(value)||null!=value.integerValue||null!=value.bytesValue||null!=value.argumentReference){return value;}if(null!=value.valueReference){var val=this.values[value.valueReference];return null===this.referenceCounts||50>depth&&1===this.referenceCounts[value.valueReference]?this.optimizeValue(val,depth):ExpressionOptimizer.isAlwaysLiftable(val)?val:ee.rpc_node.reference(this.optimizeReference(value.valueReference));}if(null!=value.arrayValue){var arr=value.arrayValue.values.map(function(v){return $jscomp$this.optimizeValue(v,depth+3);});return arr.every(isConst)?ee.rpc_node.constant(arr.map(function(v){return serializeConst(v.constantValue);})):ee.rpc_node.array(arr);}if(null!=value.dictionaryValue){for(var values={},constantValues={},$jscomp$iter$25=$jscomp.makeIterator(Object.entries(value.dictionaryValue.values||{})),$jscomp$key$=$jscomp$iter$25.next();!$jscomp$key$.done;$jscomp$key$=$jscomp$iter$25.next()){var $jscomp$destructuring$var33=$jscomp.makeIterator($jscomp$key$.value),k=$jscomp$destructuring$var33.next().value,v$jscomp$0=$jscomp$destructuring$var33.next().value;values[k]=this.optimizeValue(v$jscomp$0,depth+3);null!==constantValues&&isConst(values[k])?constantValues[k]=serializeConst(values[k].constantValue):constantValues=null;}return null!==constantValues?ee.rpc_node.constant(constantValues):ee.rpc_node.dictionary(values);}if(null!=value.functionDefinitionValue){var def=value.functionDefinitionValue;return ee.rpc_node.functionDefinition(def.argumentNames||[],this.optimizeReference(def.body||""));}if(null!=value.functionInvocationValue){for(var inv=value.functionInvocationValue,args={},$jscomp$iter$26=$jscomp.makeIterator(Object.keys(inv.arguments||{})),$jscomp$key$k=$jscomp$iter$26.next();!$jscomp$key$k.done;$jscomp$key$k=$jscomp$iter$26.next()){var k$57=$jscomp$key$k.value;args[k$57]=this.optimizeValue(inv.arguments[k$57],depth+3);}return inv.functionName?ee.rpc_node.functionByName(inv.functionName,args):ee.rpc_node.functionByReference(this.optimizeReference(inv.functionReference||""),args);}throw Error("Can't optimize value: "+value);};ExpressionOptimizer.isAlwaysLiftable=function(value){var constant=value.constantValue;return null!==constant?constant===module$exports$eeapiclient$domain_object.NULL_VALUE||"number"===typeof constant||"boolean"===typeof constant:null!=value.argumentReference;};ExpressionOptimizer.prototype.countReferences=function(){var $jscomp$this=this,counts={},visitReference=function(reference){counts[reference]?counts[reference]++:(counts[reference]=1,visitValue($jscomp$this.values[reference]));},visitValue=function(value){if(null!=value.arrayValue){value.arrayValue.values.forEach(visitValue);}else{if(null!=value.dictionaryValue){Object.values(value.dictionaryValue.values).forEach(visitValue);}else{if(null!=value.functionDefinitionValue){visitReference(value.functionDefinitionValue.body);}else{if(null!=value.functionInvocationValue){var inv=value.functionInvocationValue;null!=inv.functionReference&&visitReference(inv.functionReference);Object.values(inv.arguments).forEach(visitValue);}else{null!=value.valueReference&&visitReference(value.valueReference);}}}}};visitReference(this.rootReference);return counts;};ee.rpc_convert_batch={};ee.rpc_convert_batch.ExportDestination={DRIVE:"DRIVE",GCS:"GOOGLE_CLOUD_STORAGE",ASSET:"ASSET",DMS:"DMS"};ee.rpc_convert_batch.taskToExportImageRequest=function(params){if(null==params.element){throw Error('"element" not found in params '+params);}var result=new module$exports$eeapiclient$ee_api_client.ExportImageRequest({expression:ee.Serializer.encodeCloudApiExpression(params.element),description:stringOrNull_(params.description),fileExportOptions:null,assetExportOptions:null,grid:null,maxPixels:stringOrNull_(params.maxPixels),requestId:stringOrNull_(params.id),maxWorkerCount:numberOrNull_(params.maxWorkers)}),destination=ee.rpc_convert_batch.guessDestination_(params);switch(destination){case ee.rpc_convert_batch.ExportDestination.GCS:case ee.rpc_convert_batch.ExportDestination.DRIVE:result.fileExportOptions=ee.rpc_convert_batch.buildImageFileExportOptions_(params,destination);break;case ee.rpc_convert_batch.ExportDestination.ASSET:result.assetExportOptions=ee.rpc_convert_batch.buildImageAssetExportOptions_(params);break;default:throw Error('Export destination "'+destination+'" unknown');}return result;};ee.rpc_convert_batch.taskToExportTableRequest=function(params){if(null==params.element){throw Error('"element" not found in params '+params);}var selectors=params.selectors||null;null!=selectors&&"string"===typeof selectors&&(selectors=selectors.split(","));var result=new module$exports$eeapiclient$ee_api_client.ExportTableRequest({expression:ee.Serializer.encodeCloudApiExpression(params.element),description:stringOrNull_(params.description),fileExportOptions:null,assetExportOptions:null,dmsExportOptions:null,selectors:selectors,maxErrorMeters:numberOrNull_(params.maxErrorMeters),requestId:stringOrNull_(params.id),maxVertices:numberOrNull_(params.maxVertices),maxWorkerCount:numberOrNull_(params.maxWorkers)}),destination=ee.rpc_convert_batch.guessDestination_(params);switch(destination){case ee.rpc_convert_batch.ExportDestination.GCS:case ee.rpc_convert_batch.ExportDestination.DRIVE:result.fileExportOptions=ee.rpc_convert_batch.buildTableFileExportOptions_(params,destination);break;case ee.rpc_convert_batch.ExportDestination.ASSET:result.assetExportOptions=ee.rpc_convert_batch.buildTableAssetExportOptions_(params);break;case ee.rpc_convert_batch.ExportDestination.DMS:result.dmsExportOptions=ee.rpc_convert_batch.buildDmsAssetExportOptions_(params);break;default:throw Error('Export destination "'+destination+'" unknown');}return result;};ee.rpc_convert_batch.taskToExportVideoRequest=function(params){if(null==params.element){throw Error('"element" not found in params '+params);}var result=new module$exports$eeapiclient$ee_api_client.ExportVideoRequest({expression:ee.Serializer.encodeCloudApiExpression(params.element),description:stringOrNull_(params.description),videoOptions:ee.rpc_convert_batch.buildVideoOptions_(params),fileExportOptions:null,requestId:stringOrNull_(params.id),maxWorkerCount:numberOrNull_(params.maxWorkers)});result.fileExportOptions=ee.rpc_convert_batch.buildVideoFileExportOptions_(params,ee.rpc_convert_batch.guessDestination_(params));return result;};ee.rpc_convert_batch.taskToExportMapRequest=function(params){if(null==params.element){throw Error('"element" not found in params '+params);}return new module$exports$eeapiclient$ee_api_client.ExportMapRequest({expression:ee.Serializer.encodeCloudApiExpression(params.element),description:stringOrNull_(params.description),tileOptions:ee.rpc_convert_batch.buildTileOptions_(params),tileExportOptions:ee.rpc_convert_batch.buildImageFileExportOptions_(params,ee.rpc_convert_batch.ExportDestination.GCS),requestId:stringOrNull_(params.id),maxWorkerCount:numberOrNull_(params.maxWorkers)});};ee.rpc_convert_batch.taskToExportVideoMapRequest=function(params){if(null==params.element){throw Error('"element" not found in params '+params);}return new module$exports$eeapiclient$ee_api_client.ExportVideoMapRequest({expression:ee.Serializer.encodeCloudApiExpression(params.element),description:stringOrNull_(params.description),videoOptions:ee.rpc_convert_batch.buildVideoMapOptions_(params),tileOptions:ee.rpc_convert_batch.buildTileOptions_(params),tileExportOptions:ee.rpc_convert_batch.buildVideoFileExportOptions_(params,ee.rpc_convert_batch.ExportDestination.GCS),requestId:stringOrNull_(params.id),version:stringOrNull_(params.version),maxWorkerCount:numberOrNull_(params.maxWorkers)});};ee.rpc_convert_batch.taskToExportClassifierRequest=function(params){if(null==params.element){throw Error('"element" not found in params '+params);}var destination=ee.rpc_convert_batch.guessDestination_(params);if(destination!=ee.rpc_convert_batch.ExportDestination.ASSET){throw Error('Export destination "'+destination+'" unknown');}return new module$exports$eeapiclient$ee_api_client.ExportClassifierRequest({expression:ee.Serializer.encodeCloudApiExpression(params.element),description:stringOrNull_(params.description),requestId:stringOrNull_(params.id),assetExportOptions:new module$exports$eeapiclient$ee_api_client.ClassifierAssetExportOptions({earthEngineDestination:ee.rpc_convert_batch.buildEarthEngineDestination_(params)}),maxWorkerCount:numberOrNull_(params.maxWorkers)});};function stringOrNull_(value){return null!=value?String(value):null;}function numberOrNull_(value){return null!=value?Number(value):null;}ee.rpc_convert_batch.guessDestination_=function(params){var destination=ee.rpc_convert_batch.ExportDestination.DRIVE;if(null==params){return destination;}null!=params.outputBucket||null!=params.outputPrefix?destination=ee.rpc_convert_batch.ExportDestination.GCS:null!=params.assetId?destination=ee.rpc_convert_batch.ExportDestination.ASSET:null!=params.dmsName&&(destination=ee.rpc_convert_batch.ExportDestination.DMS);return destination;};ee.rpc_convert_batch.buildGeoTiffFormatOptions_=function(params){if(params.fileDimensions&¶ms.tiffFileDimensions){throw Error('Export cannot set both "fileDimensions" and "tiffFileDimensions".');}var tileSize=params.tiffShardSize||params.shardSize;return new module$exports$eeapiclient$ee_api_client.GeoTiffImageExportOptions({cloudOptimized:!!params.tiffCloudOptimized,skipEmptyFiles:!(!params.skipEmptyTiles&&!params.tiffSkipEmptyFiles),tileDimensions:ee.rpc_convert_batch.buildGridDimensions_(params.fileDimensions||params.tiffFileDimensions),tileSize:numberOrNull_(tileSize)});};ee.rpc_convert_batch.buildTfRecordFormatOptions_=function(params){var tfRecordOptions=new module$exports$eeapiclient$ee_api_client.TfRecordImageExportOptions({compress:!!params.tfrecordCompressed,maxSizeBytes:stringOrNull_(params.tfrecordMaxFileSize),sequenceData:!!params.tfrecordSequenceData,collapseBands:!!params.tfrecordCollapseBands,maxMaskedRatio:numberOrNull_(params.tfrecordMaskedThreshold),defaultValue:numberOrNull_(params.tfrecordDefaultValue),tileDimensions:ee.rpc_convert_batch.buildGridDimensions_(params.tfrecordPatchDimensions),marginDimensions:ee.rpc_convert_batch.buildGridDimensions_(params.tfrecordKernelSize),tensorDepths:null}),tensorDepths=params.tfrecordTensorDepths;if(null!=tensorDepths){if(goog.isObject(tensorDepths)){var result={};module$contents$goog$object_forEach(tensorDepths,function(v,k){if("string"!==typeof k||"number"!==typeof v){throw Error('"tensorDepths" option must be an object of type Object<string, number>');}result[k]=v;});tfRecordOptions.tensorDepths=result;}else{throw Error('"tensorDepths" option needs to have the form Object<string, number>.');}}return tfRecordOptions;};ee.rpc_convert_batch.buildImageFileExportOptions_=function(params,destination){var result=new module$exports$eeapiclient$ee_api_client.ImageFileExportOptions({gcsDestination:null,driveDestination:null,geoTiffOptions:null,tfRecordOptions:null,fileFormat:ee.rpc_convert.fileFormat(params.fileFormat)});"GEO_TIFF"===result.fileFormat?result.geoTiffOptions=ee.rpc_convert_batch.buildGeoTiffFormatOptions_(params):"TF_RECORD_IMAGE"===result.fileFormat&&(result.tfRecordOptions=ee.rpc_convert_batch.buildTfRecordFormatOptions_(params));destination===ee.rpc_convert_batch.ExportDestination.GCS?result.gcsDestination=ee.rpc_convert_batch.buildGcsDestination_(params):result.driveDestination=ee.rpc_convert_batch.buildDriveDestination_(params);return result;};ee.rpc_convert_batch.buildImageAssetExportOptions_=function(params){var allPolicies=params.pyramidingPolicy||{};try{allPolicies=JSON.parse(allPolicies);}catch($jscomp$unused$catch){}var defaultPyramidingPolicy="PYRAMIDING_POLICY_UNSPECIFIED";"string"===typeof allPolicies?(defaultPyramidingPolicy=allPolicies,allPolicies={}):allPolicies[".default"]&&(defaultPyramidingPolicy=allPolicies[".default"],delete allPolicies[".default"]);return new module$exports$eeapiclient$ee_api_client.ImageAssetExportOptions({earthEngineDestination:ee.rpc_convert_batch.buildEarthEngineDestination_(params),pyramidingPolicy:defaultPyramidingPolicy,pyramidingPolicyOverrides:module$contents$goog$object_isEmpty(allPolicies)?null:allPolicies,tileSize:numberOrNull_(params.shardSize)});};ee.rpc_convert_batch.buildTableFileExportOptions_=function(params,destination){var result=new module$exports$eeapiclient$ee_api_client.TableFileExportOptions({gcsDestination:null,driveDestination:null,fileFormat:ee.rpc_convert.tableFileFormat(params.fileFormat)});destination===ee.rpc_convert_batch.ExportDestination.GCS?result.gcsDestination=ee.rpc_convert_batch.buildGcsDestination_(params):result.driveDestination=ee.rpc_convert_batch.buildDriveDestination_(params);return result;};ee.rpc_convert_batch.buildTableAssetExportOptions_=function(params){return new module$exports$eeapiclient$ee_api_client.TableAssetExportOptions({earthEngineDestination:ee.rpc_convert_batch.buildEarthEngineDestination_(params)});};ee.rpc_convert_batch.buildDmsAssetExportOptions_=function(params){return new module$exports$eeapiclient$ee_api_client.DmsAssetExportOptions({dmsDestination:ee.rpc_convert_batch.buildDmsDestination_(params),ingestionTimeParameters:ee.rpc_convert_batch.buildDmsIngestionTimeParameters_(params.dmsIngestionTimeParameters)});};ee.rpc_convert_batch.buildVideoFileExportOptions_=function(params,destination){var result=new module$exports$eeapiclient$ee_api_client.VideoFileExportOptions({gcsDestination:null,driveDestination:null,fileFormat:"MP4"});destination===ee.rpc_convert_batch.ExportDestination.GCS?result.gcsDestination=ee.rpc_convert_batch.buildGcsDestination_(params):result.driveDestination=ee.rpc_convert_batch.buildDriveDestination_(params);return result;};ee.rpc_convert_batch.buildVideoOptions_=function(params){return new module$exports$eeapiclient$ee_api_client.VideoOptions({framesPerSecond:numberOrNull_(params.framesPerSecond),maxFrames:numberOrNull_(params.maxFrames),maxPixelsPerFrame:stringOrNull_(params.maxPixels)});};ee.rpc_convert_batch.buildVideoMapOptions_=function(params){return new module$exports$eeapiclient$ee_api_client.VideoOptions({framesPerSecond:numberOrNull_(params.framesPerSecond),maxFrames:numberOrNull_(params.maxFrames),maxPixelsPerFrame:null});};ee.rpc_convert_batch.buildTileOptions_=function(params){return new module$exports$eeapiclient$ee_api_client.TileOptions({maxZoom:numberOrNull_(params.maxZoom),scale:numberOrNull_(params.scale),minZoom:numberOrNull_(params.minZoom),skipEmptyTiles:!!params.skipEmptyTiles,mapsApiKey:stringOrNull_(params.mapsApiKey),tileDimensions:ee.rpc_convert_batch.buildGridDimensions_(params.tileDimensions),stride:numberOrNull_(params.stride),zoomSubset:ee.rpc_convert_batch.buildZoomSubset_(numberOrNull_(params.minTimeMachineZoomSubset),numberOrNull_(params.maxTimeMachineZoomSubset))});};ee.rpc_convert_batch.buildZoomSubset_=function(min,max){if(null==min&&null==max){return null;}var result=new module$exports$eeapiclient$ee_api_client.ZoomSubset({min:0,max:null});null!=min&&(result.min=min);result.max=max;return result;};ee.rpc_convert_batch.buildGridDimensions_=function(dimensions){if(null==dimensions){return null;}var result=new module$exports$eeapiclient$ee_api_client.GridDimensions({height:0,width:0});"string"===typeof dimensions&&(-1!==dimensions.indexOf("x")?dimensions=dimensions.split("x").map(Number):-1!==dimensions.indexOf(",")&&(dimensions=dimensions.split(",").map(Number)));if(Array.isArray(dimensions)){if(2===dimensions.length){result.height=dimensions[0],result.width=dimensions[1];}else{if(1===dimensions.length){result.height=dimensions[0],result.width=dimensions[0];}else{throw Error("Unable to construct grid from dimensions: "+dimensions);}}}else{if("number"!==typeof dimensions||isNaN(dimensions)){if(goog.isObject(dimensions)&&null!=dimensions.height&&null!=dimensions.width){result.height=dimensions.height,result.width=dimensions.width;}else{throw Error("Unable to construct grid from dimensions: "+dimensions);}}else{result.height=dimensions,result.width=dimensions;}}return result;};ee.rpc_convert_batch.buildGcsDestination_=function(params){var permissions=null;null!=params.writePublicTiles&&(permissions=params.writePublicTiles?"PUBLIC":"DEFAULT_OBJECT_ACL");return new module$exports$eeapiclient$ee_api_client.GcsDestination({bucket:stringOrNull_(params.outputBucket),filenamePrefix:stringOrNull_(params.outputPrefix),bucketCorsUris:params.bucketCorsUris||null,permissions:permissions});};ee.rpc_convert_batch.buildDriveDestination_=function(params){return new module$exports$eeapiclient$ee_api_client.DriveDestination({folder:stringOrNull_(params.driveFolder),filenamePrefix:stringOrNull_(params.driveFileNamePrefix)});};ee.rpc_convert_batch.buildEarthEngineDestination_=function(params){return new module$exports$eeapiclient$ee_api_client.EarthEngineDestination({name:ee.rpc_convert.assetIdToAssetName(params.assetId)});};ee.rpc_convert_batch.buildDmsDestination_=function(params){return new module$exports$eeapiclient$ee_api_client.DmsDestination({dmsName:ee.rpc_convert.assetIdToAssetName(params.dmsName)});};ee.rpc_convert_batch.buildDmsIngestionTimeParameters_=function(params){return new module$exports$eeapiclient$ee_api_client.DmsIngestionTimeParameters({thinningOptions:ee.rpc_convert_batch.buildThinningOptions_(params.thinningOptions),rankingOptions:ee.rpc_convert_batch.buildRankingOptions_(params.rankingOptions)});};ee.rpc_convert_batch.buildThinningOptions_=function(params){return null==params?null:new module$exports$eeapiclient$ee_api_client.ThinningOptions({maxFeaturesPerTile:numberOrNull_(params.maxFeaturesPerTile),thinningStrategy:params.thinningStrategy});};ee.rpc_convert_batch.buildRankingOptions_=function(params){return null==params?null:new module$exports$eeapiclient$ee_api_client.RankingOptions({zOrderRankingRule:ee.rpc_convert_batch.buildRankingRule_(params.zOrderRankingRule),thinningRankingRule:ee.rpc_convert_batch.buildRankingRule_(params.thinningRankingRule)});};ee.rpc_convert_batch.buildRankingRule_=function(params){if(null==params){return null;}if(params.rankByOneThingRule&&!Array.isArray(params.rankByOneThingRule)){throw Error('Parameter "rankByOneThingRule" should be an array, got '+typeof params.rankByOneThingRule);}return new module$exports$eeapiclient$ee_api_client.RankingRule({rankByOneThingRule:(params.rankByOneThingRule||[]).map(ee.rpc_convert_batch.buildRankByOneThingRule_),pseudoRandomTiebreaking:params.pseudoRandomTiebreaking||null});};ee.rpc_convert_batch.buildRankByOneThingRule_=function(params){var result=new module$exports$eeapiclient$ee_api_client.RankByOneThingRule({direction:stringOrNull_(params.direction),rankByAttributeRule:null,rankByMinVisibleLodRule:null,rankByGeometryTypeRule:null,rankByNaturalOrderRule:null});params.rankByAttributeRule?result.rankByAttributeRule=ee.rpc_convert_batch.buildRankByAttributeRule(params):params.rankByMinVisibleLodRule?result.rankByMinVisibleLodRule=new module$exports$eeapiclient$ee_api_client.RankByMinVisibleLodRule({}):params.rankByGeometryTypeRule?result.rankByGeometryTypeRule=new module$exports$eeapiclient$ee_api_client.RankByGeometryTypeRule({}):params.rankByNaturalOrderRule&&(result.rankByNaturalOrderRule=new module$exports$eeapiclient$ee_api_client.RankByNaturalOrder({}));return result;};ee.rpc_convert_batch.buildRankByAttributeRule=function(params){return new module$exports$eeapiclient$ee_api_client.RankByAttributeRule({attributeName:stringOrNull_(params.attributeName)});};ee.data={};ee.data.AbstractTaskConfig={};ee.data.AlgorithmsRegistry={};ee.data.AssetList={};ee.data.ClassifierTaskConfig={};ee.data.ImageTaskConfig={};ee.data.MapTaskConfig={};ee.data.TableDmsTaskConfig={};ee.data.TableTaskConfig={};ee.data.VideoMapTaskConfig={};ee.data.VideoTaskConfig={};ee.data.authenticateViaOauth=function(clientId,success,opt_error,opt_extraScopes,opt_onImmediateFailed,opt_suppressDefaultScopes){var scopes=module$contents$ee$apiclient_apiclient.mergeAuthScopes_(!opt_suppressDefaultScopes,!1,opt_extraScopes||[]);module$contents$ee$apiclient_apiclient.setAuthClient(clientId,scopes);null===clientId?module$contents$ee$apiclient_apiclient.clearAuthToken():module$contents$ee$apiclient_apiclient.ensureAuthLibLoaded_(function(){var onImmediateFailed=opt_onImmediateFailed||goog.partial(ee.data.authenticateViaPopup,success,opt_error);ee.data.refreshAuthToken(success,opt_error,onImmediateFailed);});};goog.exportSymbol("ee.data.authenticateViaOauth",ee.data.authenticateViaOauth);ee.data.authenticate=function(clientId,success,opt_error,opt_extraScopes,opt_onImmediateFailed){ee.data.authenticateViaOauth(clientId,success,opt_error,opt_extraScopes,opt_onImmediateFailed);};goog.exportSymbol("ee.data.authenticate",ee.data.authenticate);ee.data.authenticateViaPopup=function(opt_success,opt_error){goog.global.gapi.auth.authorize({client_id:module$contents$ee$apiclient_apiclient.getAuthClientId(),immediate:!1,scope:module$contents$ee$apiclient_apiclient.getAuthScopes().join(" ")},goog.partial(module$contents$ee$apiclient_apiclient.handleAuthResult_,opt_success,opt_error));};goog.exportSymbol("ee.data.authenticateViaPopup",ee.data.authenticateViaPopup);ee.data.authenticateViaPrivateKey=function(privateKey,opt_success,opt_error,opt_extraScopes,opt_suppressDefaultScopes){if("window"in goog.global){throw Error("Use of private key authentication in the browser is insecure. Consider using OAuth, instead.");}var scopes=module$contents$ee$apiclient_apiclient.mergeAuthScopes_(!opt_suppressDefaultScopes,!opt_suppressDefaultScopes,opt_extraScopes||[]);module$contents$ee$apiclient_apiclient.setAuthClient(privateKey.client_email,scopes);var jwtClient=new google.auth.JWT(privateKey.client_email,null,privateKey.private_key,scopes,null);ee.data.setAuthTokenRefresher(function(authArgs,callback){jwtClient.authorize(function(error,token){error?callback({error:error}):callback({access_token:token.access_token,token_type:token.token_type,expires_in:(token.expiry_date-Date.now())/1000});});});ee.data.refreshAuthToken(opt_success,opt_error);};goog.exportSymbol("ee.data.authenticateViaPrivateKey",ee.data.authenticateViaPrivateKey);ee.data.setApiKey=module$contents$ee$apiclient_apiclient.setApiKey;ee.data.setProject=module$contents$ee$apiclient_apiclient.setProject;ee.data.getProject=module$contents$ee$apiclient_apiclient.getProject;ee.data.PROFILE_REQUEST_HEADER=module$contents$ee$apiclient_apiclient.PROFILE_REQUEST_HEADER;ee.data.setExpressionAugmenter=function(augmenter){ee.data.expressionAugmenter_=augmenter||goog.functions.identity;};goog.exportSymbol("ee.data.setExpressionAugmenter",ee.data.setExpressionAugmenter);ee.data.expressionAugmenter_=goog.functions.identity;ee.data.setAuthToken=module$contents$ee$apiclient_apiclient.setAuthToken;goog.exportSymbol("ee.data.setAuthToken",ee.data.setAuthToken);ee.data.refreshAuthToken=module$contents$ee$apiclient_apiclient.refreshAuthToken;goog.exportSymbol("ee.data.refreshAuthToken",ee.data.refreshAuthToken);ee.data.setAuthTokenRefresher=module$contents$ee$apiclient_apiclient.setAuthTokenRefresher;goog.exportSymbol("ee.data.setAuthTokenRefresher",ee.data.setAuthTokenRefresher);ee.data.getAuthToken=module$contents$ee$apiclient_apiclient.getAuthToken;goog.exportSymbol("ee.data.getAuthToken",ee.data.getAuthToken);ee.data.clearAuthToken=module$contents$ee$apiclient_apiclient.clearAuthToken;goog.exportSymbol("ee.data.clearAuthToken",ee.data.clearAuthToken);ee.data.getAuthClientId=module$contents$ee$apiclient_apiclient.getAuthClientId;goog.exportSymbol("ee.data.getAuthClientId",ee.data.getAuthClientId);ee.data.getAuthScopes=module$contents$ee$apiclient_apiclient.getAuthScopes;goog.exportSymbol("ee.data.getAuthScopes",ee.data.getAuthScopes);ee.data.setDeadline=module$contents$ee$apiclient_apiclient.setDeadline;goog.exportSymbol("ee.data.setDeadline",ee.data.setDeadline);ee.data.setParamAugmenter=module$contents$ee$apiclient_apiclient.setParamAugmenter;goog.exportSymbol("ee.data.setParamAugmenter",ee.data.setParamAugmenter);ee.data.initialize=module$contents$ee$apiclient_apiclient.initialize;ee.data.reset=module$contents$ee$apiclient_apiclient.reset;ee.data.PROFILE_HEADER=module$contents$ee$apiclient_apiclient.PROFILE_HEADER;ee.data.makeRequest_=module$contents$ee$apiclient_apiclient.makeRequest_;ee.data.send_=module$contents$ee$apiclient_apiclient.send;ee.data.setupMockSend=module$contents$ee$apiclient_apiclient.setupMockSend;ee.data.withProfiling=module$contents$ee$apiclient_apiclient.withProfiling;ee.data.getAlgorithms=function(opt_callback){var call=new module$contents$ee$apiclient_Call(opt_callback);return call.handle(call.algorithms().list(call.projectsPath(),{prettyPrint:!1}).then(ee.rpc_convert.algorithms));};ee.data.getMapId=function(params,opt_callback){if("string"===typeof params.image){throw Error("Image as JSON string not supported.");}if(void 0!==params.version){throw Error("Image version specification not supported.");}var map=new module$exports$eeapiclient$ee_api_client.EarthEngineMap({name:null,expression:ee.data.expressionAugmenter_(ee.Serializer.encodeCloudApiExpression(params.image)),fileFormat:ee.rpc_convert.fileFormat(params.format),bandIds:ee.rpc_convert.bandList(params.bands),visualizationOptions:ee.rpc_convert.visualizationOptions(params)}),call=new module$contents$ee$apiclient_Call(opt_callback);return call.handle(call.maps().create(call.projectsPath(),map,{fields:["name"]}).then(function(response){return ee.data.makeMapId_(response.name,"");}));};goog.exportSymbol("ee.data.getMapId",ee.data.getMapId);ee.data.getTileUrl=function(id,x,y,z){if(!id.formatTileUrl){var newId=ee.data.makeMapId_(id.mapid,id.token,id.urlFormat);id.urlFormat=newId.urlFormat;id.formatTileUrl=newId.formatTileUrl;}return id.formatTileUrl(x,y,z);};goog.exportSymbol("ee.data.getTileUrl",ee.data.getTileUrl);ee.data.makeMapId_=function(mapid,token,opt_urlFormat){var urlFormat=void 0===opt_urlFormat?"":opt_urlFormat;if(!urlFormat){module$contents$ee$apiclient_apiclient.initialize();var base=module$contents$ee$apiclient_apiclient.getTileBaseUrl();urlFormat=token?base+"/map/"+mapid+"/{z}/{x}/{y}?token="+token:base+"/"+module$exports$ee$apiVersion.V1ALPHA+"/"+mapid+"/tiles/{z}/{x}/{y}";}return{mapid:mapid,token:token,formatTileUrl:function(x,y,z){var width=Math.pow(2,z);x%=width;x=String(0>x?x+width:x);return urlFormat.replace("{x}",x).replace("{y}",y).replace("{z}",z);},urlFormat:urlFormat};};ee.data.getDmsTilesKey=function(params,opt_callback){var visualizationExpression=params.visParams?ee.data.expressionAugmenter_(ee.Serializer.encodeCloudApiExpression(params.visParams)):null,map=new module$exports$eeapiclient$ee_api_client.DMSMap({name:null,asset:params.assetName,dmsName:params.mapName,visualizationExpression:visualizationExpression}),call=new module$contents$ee$apiclient_Call(opt_callback);return call.handle(call.dmsMaps().create(call.projectsPath(),map,{fields:["name"]}).then(function(response){return{token:response.name};}));};goog.exportSymbol("ee.data.getDmsTilesKey",ee.data.getDmsTilesKey);ee.data.computeValue=function(obj,opt_callback){var expression=ee.data.expressionAugmenter_(ee.Serializer.encodeCloudApiExpression(obj)),call=new module$contents$ee$apiclient_Call(opt_callback);return call.handle(call.value().compute(call.projectsPath(),new module$exports$eeapiclient$ee_api_client.ComputeValueRequest({expression:expression})).then(function(x){return x.result;}));};goog.exportSymbol("ee.data.computeValue",ee.data.computeValue);ee.data.getThumbId=function(params,opt_callback){if("string"===typeof params.image){throw Error("Image as JSON string not supported.");}if(void 0!==params.version){throw Error("Image version specification not supported.");}if(void 0!==params.region){throw Error('"region" not supported in call to ee.data.getThumbId. Use ee.Image.getThumbURL.');}if(void 0!==params.dimensions){throw Error('"dimensions" is not supported in call to ee.data.getThumbId. Use ee.Image.getThumbURL.');}var thumbnail=new module$exports$eeapiclient$ee_api_client.Thumbnail({name:null,expression:ee.data.expressionAugmenter_(ee.Serializer.encodeCloudApiExpression(params.image)),fileFormat:ee.rpc_convert.fileFormat(params.format),filenamePrefix:params.name,bandIds:ee.rpc_convert.bandList(params.bands),visualizationOptions:ee.rpc_convert.visualizationOptions(params),grid:null}),call=new module$contents$ee$apiclient_Call(opt_callback);return call.handle(call.thumbnails().create(call.projectsPath(),thumbnail,{fields:["name"]}).then(function(response){return{thumbid:response.name,token:""};}));};goog.exportSymbol("ee.data.getThumbId",ee.data.getThumbId);ee.data.getVideoThumbId=function(params,opt_callback){var videoOptions=new module$exports$eeapiclient$ee_api_client.VideoOptions({framesPerSecond:params.framesPerSecond||null,maxFrames:params.maxFrames||null,maxPixelsPerFrame:params.maxPixelsPerFrame||null}),request=new module$exports$eeapiclient$ee_api_client.VideoThumbnail({name:null,expression:ee.data.expressionAugmenter_(ee.Serializer.encodeCloudApiExpression(params.imageCollection)),fileFormat:ee.rpc_convert.fileFormat(params.format),videoOptions:videoOptions,grid:null}),call=new module$contents$ee$apiclient_Call(opt_callback);return call.handle(call.videoThumbnails().create(call.projectsPath(),request,{fields:["name"]}).then(function(response){return{thumbid:response.name,token:""};}));};goog.exportSymbol("ee.data.getVideoThumbId",ee.data.getVideoThumbId);ee.data.getFilmstripThumbId=function(params,opt_callback){var request=new module$exports$eeapiclient$ee_api_client.FilmstripThumbnail({name:null,expression:ee.data.expressionAugmenter_(ee.Serializer.encodeCloudApiExpression(params.imageCollection)),fileFormat:ee.rpc_convert.fileFormat(params.format),orientation:ee.rpc_convert.orientation(params.orientation),grid:null}),call=new module$contents$ee$apiclient_Call(opt_callback);return call.handle(call.filmstripThumbnails().create(call.projectsPath(),request,{fields:["name"]}).then(function(response){return{thumbid:response.name,token:""};}));};goog.exportSymbol("ee.data.getFilmstripThumbId",ee.data.getFilmstripThumbId);ee.data.makeThumbUrl=function(id){return module$contents$ee$apiclient_apiclient.getTileBaseUrl()+"/"+module$exports$ee$apiVersion.V1ALPHA+"/"+id.thumbid+":getPixels";};goog.exportSymbol("ee.data.makeThumbUrl",ee.data.makeThumbUrl);ee.data.getDownloadId=function(params,opt_callback){params=Object.assign({},params);params.id&&(params.image=new ee.Image(params.id));if("string"===typeof params.image){throw Error("Image as serialized JSON string not supported.");}if(!params.image){throw Error("Missing ID or image parameter.");}params.filePerBand=!1!==params.filePerBand;params.format=params.format||(params.filePerBand?"ZIPPED_GEO_TIFF_PER_BAND":"ZIPPED_GEO_TIFF");if(null!=params.region&&(null!=params.scale||null!=params.crs_transform)&&null!=params.dimensions){throw Error("Cannot specify (bounding region, crs_transform/scale, dimensions) simultaneously.");}if("string"===typeof params.bands){try{params.bands=JSON.parse(params.bands);}catch(e){params.bands=ee.rpc_convert.bandList(params.bands);}}if(params.bands&&!Array.isArray(params.bands)){throw Error("Bands parameter must be an array.");}params.bands&¶ms.bands.every(function(band){return"string"===typeof band;})&&(params.bands=params.bands.map(function(band){return{id:band};}));if(params.bands&¶ms.bands.some(function($jscomp$destructuring$var34){return null==$jscomp$destructuring$var34.id;})){throw Error("Each band dictionary must have an id.");}"string"===typeof params.region&&(params.region=JSON.parse(params.region));if("string"===typeof params.crs_transform){try{params.crs_transform=JSON.parse(params.crs_transform);}catch(e$58){}}var image=ee.data.images.buildDownloadIdImage(params.image,params),thumbnail=new module$exports$eeapiclient$ee_api_client.Thumbnail({name:null,expression:ee.data.expressionAugmenter_(ee.Serializer.encodeCloudApiExpression(image)),fileFormat:ee.rpc_convert.fileFormat(params.format),filenamePrefix:params.name,bandIds:params.bands&&ee.rpc_convert.bandList(params.bands.map(function(band){return band.id;})),grid:null}),call=new module$contents$ee$apiclient_Call(opt_callback);return call.handle(call.thumbnails().create(call.projectsPath(),thumbnail,{fields:["name"]}).then(function(response){return{docid:response.name,token:""};}));};goog.exportSymbol("ee.data.getDownloadId",ee.data.getDownloadId);ee.data.makeDownloadUrl=function(id){module$contents$ee$apiclient_apiclient.initialize();return module$contents$ee$apiclient_apiclient.getTileBaseUrl()+"/"+module$exports$ee$apiVersion.V1ALPHA+"/"+id.docid+":getPixels";};goog.exportSymbol("ee.data.makeDownloadUrl",ee.data.makeDownloadUrl);ee.data.getTableDownloadId=function(params,opt_callback){var call=new module$contents$ee$apiclient_Call(opt_callback),fileFormat=ee.rpc_convert.tableFileFormat(params.format),expression=ee.data.expressionAugmenter_(ee.Serializer.encodeCloudApiExpression(params.table)),selectors=null;if(null!=params.selectors){if("string"===typeof params.selectors){selectors=params.selectors.split(",");}else{if(Array.isArray(params.selectors)&¶ms.selectors.every(function(x){return"string"===typeof x;})){selectors=params.selectors;}else{throw Error("'selectors' parameter must be an array of strings.");}}}var table=new module$exports$eeapiclient$ee_api_client.Table({name:null,expression:expression,fileFormat:fileFormat,selectors:selectors,filename:params.filename||null});return call.handle(call.tables().create(call.projectsPath(),table,{fields:["name"]}).then(function(res){return{docid:res.name||"",token:""};}));};goog.exportSymbol("ee.data.getTableDownloadId",ee.data.getTableDownloadId);ee.data.makeTableDownloadUrl=function(id){return module$contents$ee$apiclient_apiclient.getTileBaseUrl()+"/"+module$exports$ee$apiVersion.V1ALPHA+"/"+id.docid+":getFeatures";};goog.exportSymbol("ee.data.makeTableDownloadUrl",ee.data.makeTableDownloadUrl);ee.data.newTaskId=function(opt_count,opt_callback){var rand=function(n){return Math.floor(Math.random()*n);},hex=function(d){return rand(Math.pow(2,4*d)).toString(16).padStart(d,"0");},variantPart=function(){return(8+rand(4)).toString(16)+hex(3);},uuids=module$contents$goog$array_range(opt_count||1).map(function(){return[hex(8),hex(4),"4"+hex(3),variantPart(),hex(12)].join("-");});return opt_callback?opt_callback(uuids):uuids;};goog.exportSymbol("ee.data.newTaskId",ee.data.newTaskId);ee.data.getTaskStatus=function(taskId,opt_callback){var opNames=ee.data.makeStringArray_(taskId).map(ee.rpc_convert.taskIdToOperationName);if(1===opNames.length){var call$60=new module$contents$ee$apiclient_Call(opt_callback);return call$60.handle(call$60.operations().get(opNames[0]).then(function(op){return[ee.rpc_convert.operationToTask(op)];}));}var call=new module$contents$ee$apiclient_BatchCall(opt_callback),operations=call.operations();return call.send(opNames.map(function(op){return[op,operations.get(op)];}),function(data){return opNames.map(function(id){return ee.rpc_convert.operationToTask(data[id]);});});};goog.exportSymbol("ee.data.getTaskStatus",ee.data.getTaskStatus);ee.data.makeStringArray_=function(value){if("string"===typeof value){return[value];}if(Array.isArray(value)){return value;}throw Error("Invalid value: expected a string or an array of strings.");};ee.data.TASKLIST_PAGE_SIZE_=500;ee.data.getTaskList=function(opt_callback){return ee.data.getTaskListWithLimit(void 0,opt_callback);};goog.exportSymbol("ee.data.getTaskList",ee.data.getTaskList);ee.data.getTaskListWithLimit=function(opt_limit,opt_callback){var convert=function(ops){return{tasks:ops.map(ee.rpc_convert.operationToTask)};};return opt_callback?(ee.data.listOperations(opt_limit,function(v,e){return opt_callback(v?convert(v):null,e);}),null):convert(ee.data.listOperations(opt_limit));};goog.exportSymbol("ee.data.getTaskListWithLimit",ee.data.getTaskListWithLimit);ee.data.listOperations=function(opt_limit,opt_callback){var ops=[],truncatedOps=function(){return opt_limit?ops.slice(0,opt_limit):ops;},params={pageSize:ee.data.TASKLIST_PAGE_SIZE_},getResponse=function(response){module$contents$goog$array_extend(ops,response.operations||[]);!response.nextPageToken||opt_limit&&ops.length>=opt_limit?opt_callback&&opt_callback(truncatedOps()):(params.pageToken=response.nextPageToken,call.handle(operations.list(call.projectsPath(),params).then(getResponse)));return null;},call=new module$contents$ee$apiclient_Call(opt_callback?function(value,err){return err&&opt_callback(value,err);}:void 0),operations=call.operations();call.handle(operations.list(call.projectsPath(),params).then(getResponse));return opt_callback?null:truncatedOps();};goog.exportSymbol("ee.data.listOperations",ee.data.listOperations);ee.data.cancelOperation=function(operationName,opt_callback){var opNames=ee.data.makeStringArray_(operationName),request=new module$exports$eeapiclient$ee_api_client.CancelOperationRequest();if(1===opNames.length){var call$61=new module$contents$ee$apiclient_Call(opt_callback);call$61.handle(call$61.operations().cancel(opNames[0],request));}else{var call=new module$contents$ee$apiclient_BatchCall(opt_callback),operations=call.operations();call.send(opNames.map(function(op){return[op,operations.cancel(op,request)];}));}};goog.exportSymbol("ee.data.cancelOperation",ee.data.cancelOperation);ee.data.getOperation=function(operationName,opt_callback){var opNames=ee.data.makeStringArray_(operationName).map(ee.rpc_convert.taskIdToOperationName);if(!Array.isArray(operationName)){var call$62=new module$contents$ee$apiclient_Call(opt_callback);return call$62.handle(call$62.operations().get(opNames[0]));}var call=new module$contents$ee$apiclient_BatchCall(opt_callback),operations=call.operations();return call.send(opNames.map(function(op){return[op,operations.get(op)];}));};goog.exportSymbol("ee.data.getOperation",ee.data.getOperation);ee.data.cancelTask=function(taskId,opt_callback){return ee.data.updateTask(taskId,ee.data.TaskUpdateActions.CANCEL,opt_callback);};goog.exportSymbol("ee.data.cancelTask",ee.data.cancelTask);ee.data.updateTask=function(taskId,action,opt_callback){if(!module$contents$goog$object_containsValue(ee.data.TaskUpdateActions,action)){throw Error("Invalid action: "+action);}taskId=ee.data.makeStringArray_(taskId);var operations=taskId.map(ee.rpc_convert.taskIdToOperationName);ee.data.cancelOperation(operations,opt_callback);return null;};goog.exportSymbol("ee.data.updateTask",ee.data.updateTask);ee.data.startProcessing=function(taskId,params,opt_callback){params.id=taskId;var taskType=params.type,metadata=null!=params.sourceUrl?{__source_url__:params.sourceUrl}:{},call=new module$contents$ee$apiclient_Call(opt_callback),handle=function(response){return call.handle(response.then(ee.rpc_convert.operationToProcessingResponse));};switch(taskType){case ee.data.ExportType.IMAGE:var imageRequest=ee.data.prepareExportImageRequest_(params,metadata);return handle(call.image().export(call.projectsPath(),imageRequest));case ee.data.ExportType.TABLE:var tableRequest=ee.rpc_convert_batch.taskToExportTableRequest(params);tableRequest.expression=ee.data.expressionAugmenter_(tableRequest.expression,metadata);return handle(call.table().export(call.projectsPath(),tableRequest));case ee.data.ExportType.VIDEO:var videoRequest=ee.data.prepareExportVideoRequest_(params,metadata);return handle(call.video().export(call.projectsPath(),videoRequest));case ee.data.ExportType.MAP:var mapRequest=ee.data.prepareExportMapRequest_(params,metadata);return handle(call.map().export(call.projectsPath(),mapRequest));case ee.data.ExportType.VIDEO_MAP:var videoMapRequest=ee.data.prepareExportVideoMapRequest_(params,metadata);return handle(call.videoMap().export(call.projectsPath(),videoMapRequest));case ee.data.ExportType.CLASSIFIER:var classifierRequest=ee.data.prepareExportClassifierRequest_(params,metadata);return handle(call.classifier().export(call.projectsPath(),classifierRequest));default:throw Error("Unable to start processing for task of type "+taskType);}};goog.exportSymbol("ee.data.startProcessing",ee.data.startProcessing);ee.data.prepareExportImageRequest_=function(taskConfig,metadata){var imageTask=ee.data.images.applyTransformsToImage(taskConfig),imageRequest=ee.rpc_convert_batch.taskToExportImageRequest(imageTask);imageRequest.expression=ee.data.expressionAugmenter_(imageRequest.expression,metadata);return imageRequest;};ee.data.prepareExportVideoRequest_=function(taskConfig,metadata){var videoTask=ee.data.images.applyTransformsToCollection(taskConfig),videoRequest=ee.rpc_convert_batch.taskToExportVideoRequest(videoTask);videoRequest.expression=ee.data.expressionAugmenter_(videoRequest.expression,metadata);return videoRequest;};ee.data.prepareExportMapRequest_=function(taskConfig,metadata){var scale=taskConfig.scale;delete taskConfig.scale;var mapTask=ee.data.images.applyTransformsToImage(taskConfig);mapTask.scale=scale;var mapRequest=ee.rpc_convert_batch.taskToExportMapRequest(mapTask);mapRequest.expression=ee.data.expressionAugmenter_(mapRequest.expression,metadata);return mapRequest;};ee.data.prepareExportVideoMapRequest_=function(taskConfig,metadata){var scale=taskConfig.scale;delete taskConfig.scale;var videoMapTask=ee.data.images.applyTransformsToCollection(taskConfig);videoMapTask.scale=scale;var videoMapRequest=ee.rpc_convert_batch.taskToExportVideoMapRequest(videoMapTask);videoMapRequest.expression=ee.data.expressionAugmenter_(videoMapRequest.expression);return videoMapRequest;};ee.data.prepareExportClassifierRequest_=function(taskConfig,metadata){var classifierRequest=ee.rpc_convert_batch.taskToExportClassifierRequest(taskConfig);classifierRequest.expression=ee.data.expressionAugmenter_(classifierRequest.expression);return classifierRequest;};ee.data.startIngestion=function(taskId,request,opt_callback){var manifest=ee.rpc_convert.toImageManifest(request),convert=function(arg){return arg?ee.rpc_convert.operationToProcessingResponse(arg):null;};return convert(ee.data.ingestImage(taskId,manifest,opt_callback&&function(arg,err){return opt_callback(convert(arg),err);}));};goog.exportSymbol("ee.data.startIngestion",ee.data.startIngestion);ee.data.ingestImage=function(taskId,imageManifest,callback){var request=new module$exports$eeapiclient$ee_api_client.ImportImageRequest({imageManifest:imageManifest,requestId:taskId,overwrite:null,description:null}),call=new module$contents$ee$apiclient_Call(callback,taskId?void 0:0);return call.handle(call.image().import(call.projectsPath(),request));};ee.data.ingestTable=function(taskId,tableManifest,callback){var request=new module$exports$eeapiclient$ee_api_client.ImportTableRequest({tableManifest:tableManifest,requestId:taskId,overwrite:null,description:null}),call=new module$contents$ee$apiclient_Call(callback,taskId?void 0:0);return call.handle(call.table().import(call.projectsPath(),request));};ee.data.startTableIngestion=function(taskId,request,opt_callback){var manifest=ee.rpc_convert.toTableManifest(request),convert=function(arg){return arg?ee.rpc_convert.operationToProcessingResponse(arg):null;};return convert(ee.data.ingestTable(taskId,manifest,opt_callback&&function(arg,err){return opt_callback(convert(arg),err);}));};goog.exportSymbol("ee.data.startTableIngestion",ee.data.startTableIngestion);ee.data.getAsset=function(id,opt_callback){var call=new module$contents$ee$apiclient_Call(opt_callback),name=ee.rpc_convert.assetIdToAssetName(id);return call.handle(call.assets().get(name,{prettyPrint:!1}).then(ee.rpc_convert.assetToLegacyResult));};goog.exportSymbol("ee.data.getAsset",ee.data.getAsset);ee.data.getInfo=ee.data.getAsset;goog.exportSymbol("ee.data.getInfo",ee.data.getInfo);ee.data.getList=function(params,opt_callback){var call=new module$contents$ee$apiclient_Call(opt_callback),methodRoot=call.assets(),parent=ee.rpc_convert.assetIdToAssetName(params.id),isProjectAssetRoot=ee.rpc_convert.CLOUD_ASSET_ROOT_RE.test(params.id);isProjectAssetRoot&&(methodRoot=call.projects(),parent=ee.rpc_convert.projectParentFromPath(params.id));if(Object.keys(params).every(function(k){return"id"===k||"num"===k;})){return call.handle(methodRoot.listAssets(parent,{pageSize:params.num}).then(ee.rpc_convert.listAssetsToGetList));}if(isProjectAssetRoot){throw Error("getList on a project does not support filtering options. Please provide a full asset path. Got: "+params.id);}var body=ee.rpc_convert.getListToListImages(params);return call.handle(methodRoot.listImages(parent,body).then(ee.rpc_convert.listImagesToGetList));};goog.exportSymbol("ee.data.getList",ee.data.getList);ee.data.listAssets=function(parent,params,opt_callback){params=void 0===params?{}:params;var isProjectAssetRoot=ee.rpc_convert.CLOUD_ASSET_ROOT_RE.test(parent),call=new module$contents$ee$apiclient_Call(opt_callback),methodRoot=isProjectAssetRoot?call.projects():call.assets();parent=isProjectAssetRoot?ee.rpc_convert.projectParentFromPath(parent):ee.rpc_convert.assetIdToAssetName(parent);return call.handle(methodRoot.listAssets(parent,params));};goog.exportSymbol("ee.data.listAssets",ee.data.listAssets);ee.data.listImages=function(parent,params,opt_callback){params=void 0===params?{}:params;var call=new module$contents$ee$apiclient_Call(opt_callback);return call.handle(call.assets().listImages(parent,params));};goog.exportSymbol("ee.data.listImages",ee.data.listImages);ee.data.listBuckets=function(project,opt_callback){var call=new module$contents$ee$apiclient_Call(opt_callback);return call.handle(call.projects().listAssets(project||call.projectsPath()));};goog.exportSymbol("ee.data.listBuckets",ee.data.listBuckets);ee.data.getAssetRoots=function(opt_callback){var call=new module$contents$ee$apiclient_Call(opt_callback);return call.handle(call.projects().listAssets(call.projectsPath()).then(ee.rpc_convert.listAssetsToGetList));};goog.exportSymbol("ee.data.getAssetRoots",ee.data.getAssetRoots);ee.data.createAssetHome=function(requestedId,opt_callback){var parent=ee.rpc_convert.projectParentFromPath(requestedId),assetId=parent==="projects/"+module$contents$ee$apiclient_apiclient.DEFAULT_PROJECT_?requestedId:void 0,asset=new module$exports$eeapiclient$ee_api_client.EarthEngineAsset({type:"Folder"}),call=new module$contents$ee$apiclient_Call(opt_callback);call.handle(call.assets().create(parent,asset,{assetId:assetId}).then(ee.rpc_convert.assetToLegacyResult));};goog.exportSymbol("ee.data.createAssetHome",ee.data.createAssetHome);ee.data.createAsset=function(value,opt_path,opt_force,opt_properties,opt_callback){if(opt_force){throw Error("Asset overwrite not supported.");}if("string"===typeof value){throw Error("Asset cannot be specified as string.");}var name=value.name||opt_path&&ee.rpc_convert.assetIdToAssetName(opt_path);if(!name){throw Error("Either asset name or opt_path must be specified.");}var split=name.indexOf("/assets/");if(-1===split){throw Error("Asset name must contain /assets/.");}var asset=new module$exports$eeapiclient$ee_api_client.EarthEngineAsset(value),parent=name.slice(0,split),assetId=name.slice(split+8);asset.id=null;asset.name=null;opt_properties&&!asset.properties&&(asset.properties=opt_properties);asset.type=ee.rpc_convert.assetTypeForCreate(asset.type);var call=new module$contents$ee$apiclient_Call(opt_callback);return call.handle(call.assets().create(parent,asset,{assetId:assetId}).then(ee.rpc_convert.assetToLegacyResult));};goog.exportSymbol("ee.data.createAsset",ee.data.createAsset);ee.data.createFolder=function(path,opt_force,opt_callback){return ee.data.createAsset({type:"Folder"},path,opt_force,void 0,opt_callback);};goog.exportSymbol("ee.data.createFolder",ee.data.createFolder);ee.data.renameAsset=function(sourceId,destinationId,opt_callback){var sourceName=ee.rpc_convert.assetIdToAssetName(sourceId),destinationName=ee.rpc_convert.assetIdToAssetName(destinationId),request=new module$exports$eeapiclient$ee_api_client.MoveAssetRequest({destinationName:destinationName}),call=new module$contents$ee$apiclient_Call(opt_callback);call.handle(call.assets().move(sourceName,request).then(ee.rpc_convert.assetToLegacyResult));};goog.exportSymbol("ee.data.renameAsset",ee.data.renameAsset);ee.data.copyAsset=function(sourceId,destinationId,opt_overwrite,opt_callback){var sourceName=ee.rpc_convert.assetIdToAssetName(sourceId),destinationName=ee.rpc_convert.assetIdToAssetName(destinationId),request=new module$exports$eeapiclient$ee_api_client.CopyAssetRequest({destinationName:destinationName,overwrite:null!=opt_overwrite?opt_overwrite:null}),call=new module$contents$ee$apiclient_Call(opt_callback);call.handle(call.assets().copy(sourceName,request).then(ee.rpc_convert.assetToLegacyResult));};goog.exportSymbol("ee.data.copyAsset",ee.data.copyAsset);ee.data.deleteAsset=function(assetId,opt_callback){var call=new module$contents$ee$apiclient_Call(opt_callback);call.handle(call.assets().delete(ee.rpc_convert.assetIdToAssetName(assetId)));};goog.exportSymbol("ee.data.deleteAsset",ee.data.deleteAsset);ee.data.getAssetAcl=function(assetId,opt_callback){var resource=ee.rpc_convert.assetIdToAssetName(assetId),request=new module$exports$eeapiclient$ee_api_client.GetIamPolicyRequest(),call=new module$contents$ee$apiclient_Call(opt_callback);return call.handle(call.assets().getIamPolicy(resource,request,{prettyPrint:!1}).then(ee.rpc_convert.iamPolicyToAcl));};goog.exportSymbol("ee.data.getAssetAcl",ee.data.getAssetAcl);ee.data.getIamPolicy=function(assetId,opt_callback){var resource=ee.rpc_convert.assetIdToAssetName(assetId),request=new module$exports$eeapiclient$ee_api_client.GetIamPolicyRequest(),call=new module$contents$ee$apiclient_Call(opt_callback);return call.handle(call.assets().getIamPolicy(resource,request,{prettyPrint:!1}));};ee.data.setIamPolicy=function(assetId,policy,opt_callback){var resource=ee.rpc_convert.assetIdToAssetName(assetId),request=new module$exports$eeapiclient$ee_api_client.SetIamPolicyRequest({policy:policy}),call=new module$contents$ee$apiclient_Call(opt_callback);return call.handle(call.assets().setIamPolicy(resource,request,{prettyPrint:!1}));};ee.data.updateAsset=function(assetId,asset,updateFields,opt_callback){var updateMask=(updateFields||[]).join(","),request=new module$exports$eeapiclient$ee_api_client.UpdateAssetRequest({asset:asset,updateMask:updateMask}),call=new module$contents$ee$apiclient_Call(opt_callback);return call.handle(call.assets().patch(ee.rpc_convert.assetIdToAssetName(assetId),request).then(ee.rpc_convert.assetToLegacyResult));};goog.exportSymbol("ee.data.updateAsset",ee.data.updateAsset);ee.data.setAssetAcl=function(assetId,aclUpdate,opt_callback){var resource=ee.rpc_convert.assetIdToAssetName(assetId),policy=ee.rpc_convert.aclToIamPolicy(aclUpdate),request=new module$exports$eeapiclient$ee_api_client.SetIamPolicyRequest({policy:policy}),call=new module$contents$ee$apiclient_Call(opt_callback);call.handle(call.assets().setIamPolicy(resource,request,{prettyPrint:!1}));};goog.exportSymbol("ee.data.setAssetAcl",ee.data.setAssetAcl);ee.data.setAssetProperties=function(assetId,properties,opt_callback){var asset=ee.rpc_convert.legacyPropertiesToAssetUpdate(properties),updateFields=asset.getClassMetadata().keys.filter(function(k){return"properties"!==k&&asset.Serializable$has(k);}).map(function(str){return str.replace(/([A-Z])/g,function(all,cap){return"_"+cap.toLowerCase();});}).concat(Object.keys(asset.properties||{}).map(function(k){return'properties."'+k+'"';}));ee.data.updateAsset(assetId,asset,updateFields,opt_callback);};goog.exportSymbol("ee.data.setAssetProperties",ee.data.setAssetProperties);ee.data.getAssetRootQuota=function(rootId,opt_callback){var name=ee.rpc_convert.assetIdToAssetName(rootId),call=new module$contents$ee$apiclient_Call(opt_callback),assetsCall=call.assets(),validateParams=assetsCall.$apiClient.$validateParameter;assetsCall.$apiClient.$validateParameter=function(param,pattern){"^projects\\/[^/]+\\/assets\\/.+$"===pattern.source&&(pattern=RegExp("^projects/[^/]+/assets/.*$"));return validateParams(param,pattern);};var getAssetRequest=assetsCall.get(name,{prettyPrint:!1});return call.handle(getAssetRequest.then(function(asset){if(!(asset instanceof module$exports$eeapiclient$ee_api_client.EarthEngineAsset&&asset.quota)){throw Error(rootId+" is not a root folder.");}return ee.rpc_convert.folderQuotaToAssetQuotaDetails(asset.quota);}));};goog.exportSymbol("ee.data.getAssetRootQuota",ee.data.getAssetRootQuota);ee.data.AssetType={ALGORITHM:"Algorithm",CLASSIFIER:"Classifier",DATA_MAPPING_SERVICE:"DmsAsset",FOLDER:"Folder",FEATURE_COLLECTION:"FeatureCollection",IMAGE:"Image",IMAGE_COLLECTION:"ImageCollection",TABLE:"Table",UNKNOWN:"Unknown"};ee.data.ExportType={IMAGE:"EXPORT_IMAGE",MAP:"EXPORT_TILES",TABLE:"EXPORT_FEATURES",VIDEO:"EXPORT_VIDEO",VIDEO_MAP:"EXPORT_VIDEO_MAP",CLASSIFIER:"EXPORT_CLASSIFIER"};ee.data.ExportState={UNSUBMITTED:"UNSUBMITTED",READY:"READY",RUNNING:"RUNNING",COMPLETED:"COMPLETED",FAILED:"FAILED",CANCEL_REQUESTED:"CANCEL_REQUESTED",CANCELLED:"CANCELLED"};ee.data.ExportDestination={DRIVE:"DRIVE",GCS:"GOOGLE_CLOUD_STORAGE",ASSET:"ASSET",DMS:"DMS"};ee.data.ThinningStrategy={GLOBALLY_CONSISTENT:"GLOBALLY_CONSISTENT",HIGHER_DENSITY:"HIGHER_DENSITY"};ee.data.Direction={ASCENDING:"ASCENDING",DESCENDING:"DESCENDING"};ee.data.SystemPropertyPrefix="system:";ee.data.SystemTimeProperty={START:"system:time_start",END:"system:time_end"};ee.data.SYSTEM_ASSET_SIZE_PROPERTY="system:asset_size";ee.data.AssetDetailsProperty={TITLE:"system:title",DESCRIPTION:"system:description",TAGS:"system:tags"};ee.data.ALLOWED_DESCRIPTION_HTML_TABLE_ELEMENTS_="col colgroup caption table tbody td tfoot th thead tr".split(" ");ee.data.ALLOWED_DESCRIPTION_HTML_ELEMENTS=ee.data.ALLOWED_DESCRIPTION_HTML_TABLE_ELEMENTS_.concat("a code em i li ol p strong sub sup ul".split(" "));ee.data.ShortAssetDescription=function(){};ee.data.AssetAcl=function(){};ee.data.AssetAclUpdate=function(){};ee.data.AssetQuotaEntry=function(){};ee.data.AssetQuotaDetails=function(){};ee.data.DmsAssetDescription=function(){};ee.data.FolderDescription=function(){};ee.data.FeatureCollectionDescription=function(){};ee.data.FeatureVisualizationParameters=function(){};ee.data.GeoJSONFeature=function(){};ee.data.GeoJSONGeometry=function(){};ee.data.GeoJSONGeometryCrs=function(){};ee.data.GeoJSONGeometryCrsProperties=function(){};ee.data.ImageCollectionDescription=function(){};ee.data.ImageDescription=function(){};ee.data.TableDescription=function(){};ee.data.TableDownloadParameters=function(){};ee.data.ImageVisualizationParameters=function(){};ee.data.DmsMapVisualizationParameters=function(){};ee.data.ThumbnailOptions=function(){};$jscomp.inherits(ee.data.ThumbnailOptions,ee.data.ImageVisualizationParameters);ee.data.VideoThumbnailOptions=function(){};$jscomp.inherits(ee.data.VideoThumbnailOptions,ee.data.ThumbnailOptions);ee.data.FilmstripThumbnailOptions=function(){};$jscomp.inherits(ee.data.FilmstripThumbnailOptions,ee.data.ThumbnailOptions);ee.data.BandDescription=function(){};ee.data.PixelTypeDescription=function(){};ee.data.AlgorithmSignature=function(){};ee.data.AlgorithmArgument=function(){};ee.data.ThumbnailId=function(){};ee.data.DownloadId=function(){};ee.data.RawMapId=function(){};ee.data.MapId=function(){};$jscomp.inherits(ee.data.MapId,ee.data.RawMapId);ee.data.DmsTilesKey=function(){};ee.data.MapZoomRange={MIN:0,MAX:24};ee.data.TaskStatus=function(){};ee.data.ProcessingResponse=function(){};ee.data.TaskListResponse=function(){};ee.data.TaskUpdateActions={CANCEL:"CANCEL",UPDATE:"UPDATE"};ee.data.AssetDescription=function(){};ee.data.IngestionRequest=function(){};ee.data.MissingData=function(){};ee.data.PyramidingPolicy={MEAN:"MEAN",MODE:"MODE",MIN:"MIN",MAX:"MAX",SAMPLE:"SAMPLE"};ee.data.Band=function(){};ee.data.Tileset=function(){};ee.data.FileBand=function(){};ee.data.FileSource=function(){};ee.data.TableIngestionRequest=function(){};ee.data.TableSource=function(){};$jscomp.inherits(ee.data.TableSource,ee.data.FileSource);ee.data.AuthPrivateKey=function(){};ee.ComputedObject=function(func,args,opt_varName){if(!(this instanceof ee.ComputedObject)){return ee.ComputedObject.construct(ee.ComputedObject,arguments);}if(opt_varName&&(func||args)){throw Error('When "opt_varName" is specified, "func" and "args" must be null.');}if(func&&!args){throw Error('When "func" is specified, "args" must not be null.');}this.func=func;this.args=args;this.varName=opt_varName||null;};goog.inherits(ee.ComputedObject,ee.Encodable);goog.exportSymbol("ee.ComputedObject",ee.ComputedObject);ee.ComputedObject.prototype.evaluate=function(callback){if(!callback||"function"!==typeof callback){throw Error("evaluate() requires a callback function.");}ee.data.computeValue(this,callback);};goog.exportProperty(ee.ComputedObject.prototype,"evaluate",ee.ComputedObject.prototype.evaluate);ee.ComputedObject.prototype.getInfo=function(opt_callback){return ee.data.computeValue(this,opt_callback);};goog.exportProperty(ee.ComputedObject.prototype,"getInfo",ee.ComputedObject.prototype.getInfo);ee.ComputedObject.prototype.encode=function(encoder){if(this.isVariable()){return{type:"ArgumentRef",value:this.varName};}var encodedArgs={},name;for(name in this.args){void 0!==this.args[name]&&(encodedArgs[name]=encoder(this.args[name]));}var result={type:"Invocation",arguments:encodedArgs},func=encoder(this.func);result["string"===typeof func?"functionName":"function"]=func;return result;};ee.ComputedObject.prototype.encodeCloudValue=function(serializer){if(this.isVariable()){var name=this.varName||serializer.unboundName;if(!name){throw Error("A mapped function's arguments cannot be used in client-side operations");}return ee.rpc_node.argumentReference(name);}var encodedArgs={},name$63;for(name$63 in this.args){void 0!==this.args[name$63]&&(encodedArgs[name$63]=ee.rpc_node.reference(serializer.makeReference(this.args[name$63])));}return"string"===typeof this.func?ee.rpc_node.functionByName(String(this.func),encodedArgs):this.func.encodeCloudInvocation(serializer,encodedArgs);};ee.ComputedObject.prototype.serialize=function(legacy){return(void 0===legacy?0:legacy)?ee.Serializer.toJSON(this):ee.Serializer.toCloudApiJSON(this);};goog.exportProperty(ee.ComputedObject.prototype,"serialize",ee.ComputedObject.prototype.serialize);ee.ComputedObject.prototype.toString=function(){return"ee."+this.name()+"("+ee.Serializer.toReadableJSON(this)+")";};goog.exportSymbol("ee.ComputedObject.prototype.toString",ee.ComputedObject.prototype.toString);ee.ComputedObject.prototype.isVariable=function(){return null===this.func&&null===this.args;};ee.ComputedObject.prototype.name=function(){return"ComputedObject";};ee.ComputedObject.prototype.aside=function(func,var_args){var args=Array.from(arguments);args[0]=this;func.apply(goog.global,args);return this;};goog.exportProperty(ee.ComputedObject.prototype,"aside",ee.ComputedObject.prototype.aside);ee.ComputedObject.prototype.castInternal=function(obj){if(obj instanceof this.constructor){return obj;}var klass=function(){};klass.prototype=this.constructor.prototype;var result=new klass();result.func=obj.func;result.args=obj.args;result.varName=obj.varName;return result;};ee.ComputedObject.construct=function(constructor,argsArray){function F(){return constructor.apply(this,argsArray);}F.prototype=constructor.prototype;return new F();};ee.Types={};ee.Types.registeredClasses_={};ee.Types.registerClasses=function(classes){ee.Types.registeredClasses_=classes;};ee.Types.nameToClass=function(name){return name in ee.Types.registeredClasses_?ee.Types.registeredClasses_[name]:null;};ee.Types.classToName=function(klass){return klass.prototype instanceof ee.ComputedObject?klass.prototype.name.call(null):klass==Number?"Number":klass==String?"String":klass==Array?"Array":klass==Date?"Date":"Object";};ee.Types.isSubtype=function(firstType,secondType){if(secondType==firstType){return!0;}switch(firstType){case"Element":return"Element"==secondType||"Image"==secondType||"Feature"==secondType||"Collection"==secondType||"ImageCollection"==secondType||"FeatureCollection"==secondType;case"FeatureCollection":case"Collection":return"Collection"==secondType||"ImageCollection"==secondType||"FeatureCollection"==secondType;case"Object":return!0;default:return!1;}};ee.Types.isNumber=function(obj){return"number"===typeof obj||obj instanceof ee.ComputedObject&&"Number"==obj.name();};ee.Types.isString=function(obj){return"string"===typeof obj||obj instanceof ee.ComputedObject&&"String"==obj.name();};ee.Types.isArray=function(obj){return Array.isArray(obj)||obj instanceof ee.ComputedObject&&"List"==obj.name();};ee.Types.isRegularObject=function(obj){if(goog.isObject(obj)&&"function"!==typeof obj){var proto=Object.getPrototypeOf(obj);return null!==proto&&null===Object.getPrototypeOf(proto);}return!1;};ee.Types.useKeywordArgs=function(args,signature,isInstance){isInstance=void 0===isInstance?!1:isInstance;if(1===args.length&&ee.Types.isRegularObject(args[0])){var formalArgs=signature.args;isInstance&&(formalArgs=formalArgs.slice(1));if(formalArgs.length){return!(1===formalArgs.length||formalArgs[1].optional)||"Dictionary"!==formalArgs[0].type;}}return!1;};ee.Function=function(){if(!(this instanceof ee.Function)){return new ee.Function();}};goog.inherits(ee.Function,ee.Encodable);goog.exportSymbol("ee.Function",ee.Function);ee.Function.promoter_=goog.functions.identity;ee.Function.registerPromoter=function(promoter){ee.Function.promoter_=promoter;};ee.Function.prototype.call=function(var_args){return this.apply(this.nameArgs(Array.prototype.slice.call(arguments,0)));};goog.exportProperty(ee.Function.prototype,"call",ee.Function.prototype.call);ee.Function.prototype.apply=function(namedArgs){var result=new ee.ComputedObject(this,this.promoteArgs(namedArgs));return ee.Function.promoter_(result,this.getReturnType());};goog.exportProperty(ee.Function.prototype,"apply",ee.Function.prototype.apply);ee.Function.prototype.callOrApply=function(thisValue,args){var isInstance=void 0!==thisValue,signature=this.getSignature();if(ee.Types.useKeywordArgs(args,signature,isInstance)){var namedArgs=module$contents$goog$object_clone(args[0]);if(isInstance){var firstArgName=signature.args[0].name;if(firstArgName in namedArgs){throw Error("Named args for "+signature.name+" can't contain keyword "+firstArgName);}namedArgs[firstArgName]=thisValue;}}else{namedArgs=this.nameArgs(isInstance?[thisValue].concat(args):args);}return this.apply(namedArgs);};ee.Function.prototype.promoteArgs=function(args){for(var specs=this.getSignature().args,promotedArgs={},known={},i=0;i<specs.length;i++){var name=specs[i].name;if(name in args&&void 0!==args[name]){promotedArgs[name]=ee.Function.promoter_(args[name],specs[i].type);}else{if(!specs[i].optional){throw Error("Required argument ("+name+") missing to function: "+this);}}known[name]=!0;}var unknown=[],argName;for(argName in args){known[argName]||unknown.push(argName);}if(0<unknown.length){throw Error("Unrecognized arguments ("+unknown+") to function: "+this);}return promotedArgs;};ee.Function.prototype.nameArgs=function(args){var specs=this.getSignature().args;if(specs.length<args.length){throw Error("Too many ("+args.length+") arguments to function: "+this);}for(var namedArgs={},i=0;i<args.length;i++){namedArgs[specs[i].name]=args[i];}return namedArgs;};ee.Function.prototype.getReturnType=function(){return this.getSignature().returns;};ee.Function.prototype.toString=function(opt_name,opt_isInstance){var signature=this.getSignature(),buffer=[];buffer.push(opt_name||signature.name);buffer.push("(");buffer.push(module$contents$goog$array_map(signature.args.slice(opt_isInstance?1:0),function(elem){return elem.name;}).join(", "));buffer.push(")\n");buffer.push("\n");signature.description?buffer.push(signature.description):buffer.push("Undocumented.");buffer.push("\n");if(signature.args.length){buffer.push("\nArgs:\n");for(var i=0;i<signature.args.length;i++){opt_isInstance&&0==i?buffer.push(" this:"):buffer.push("\n ");var arg=signature.args[i];buffer.push(arg.name);buffer.push(" (");buffer.push(arg.type);arg.optional&&buffer.push(", optional");buffer.push("): ");arg.description?buffer.push(arg.description):buffer.push("Undocumented.");}}return buffer.join("");};ee.Function.prototype.serialize=function(legacy){return(void 0===legacy?0:legacy)?ee.Serializer.toJSON(this):ee.Serializer.toCloudApiJSON(this);};ee.ApiFunction=function(name,opt_signature){if(void 0===opt_signature){return ee.ApiFunction.lookup(name);}if(!(this instanceof ee.ApiFunction)){return ee.ComputedObject.construct(ee.ApiFunction,arguments);}this.signature_=module$contents$goog$object_unsafeClone(opt_signature);this.signature_.name=name;};goog.inherits(ee.ApiFunction,ee.Function);goog.exportSymbol("ee.ApiFunction",ee.ApiFunction);ee.ApiFunction._call=function(name,var_args){return ee.Function.prototype.call.apply(ee.ApiFunction.lookup(name),Array.prototype.slice.call(arguments,1));};goog.exportSymbol("ee.ApiFunction._call",ee.ApiFunction._call);ee.ApiFunction._apply=function(name,namedArgs){return ee.ApiFunction.lookup(name).apply(namedArgs);};goog.exportSymbol("ee.ApiFunction._apply",ee.ApiFunction._apply);ee.ApiFunction.prototype.encode=function(encoder){return this.signature_.name;};ee.ApiFunction.prototype.encodeCloudInvocation=function(serializer,args){return ee.rpc_node.functionByName(this.signature_.name,args);};ee.ApiFunction.prototype.getSignature=function(){return this.signature_;};ee.ApiFunction.api_=null;ee.ApiFunction.boundSignatures_={};ee.ApiFunction.allSignatures=function(){ee.ApiFunction.initialize();return module$contents$goog$object_map(ee.ApiFunction.api_,function(func){return func.getSignature();});};ee.ApiFunction.unboundFunctions=function(){ee.ApiFunction.initialize();return module$contents$goog$object_filter(ee.ApiFunction.api_,function(func,name){return!ee.ApiFunction.boundSignatures_[name];});};ee.ApiFunction.lookup=function(name){var func=ee.ApiFunction.lookupInternal(name);if(!func){throw Error("Unknown built-in function name: "+name);}return func;};goog.exportSymbol("ee.ApiFunction.lookup",ee.ApiFunction.lookup);ee.ApiFunction.lookupInternal=function(name){ee.ApiFunction.initialize();return ee.ApiFunction.api_[name]||null;};ee.ApiFunction.initialize=function(opt_successCallback,opt_failureCallback){if(ee.ApiFunction.api_){opt_successCallback&&opt_successCallback();}else{var callback=function(data,opt_error){opt_error?opt_failureCallback&&opt_failureCallback(Error(opt_error)):(ee.ApiFunction.api_=module$contents$goog$object_map(data,function(sig,name){sig.returns=sig.returns.replace(/<.*>/,"");for(var i=0;i<sig.args.length;i++){sig.args[i].type=sig.args[i].type.replace(/<.*>/,"");}return new ee.ApiFunction(name,sig);}),opt_successCallback&&opt_successCallback());};opt_successCallback?ee.data.getAlgorithms(callback):callback(ee.data.getAlgorithms());}};ee.ApiFunction.reset=function(){ee.ApiFunction.api_=null;ee.ApiFunction.boundSignatures_={};};ee.ApiFunction.importApi=function(target,prefix,typeName,opt_prepend){ee.ApiFunction.initialize();var prepend=opt_prepend||"";module$contents$goog$object_forEach(ee.ApiFunction.api_,function(apiFunc,name){var parts=name.split(".");if(2==parts.length&&parts[0]==prefix){var fname=prepend+parts[1],signature=apiFunc.getSignature();ee.ApiFunction.boundSignatures_[name]=!0;var isInstance=!1;if(signature.args.length){var firstArgType=signature.args[0].type;isInstance="Object"!=firstArgType&&ee.Types.isSubtype(firstArgType,typeName);}var destination=isInstance?target.prototype:target;fname in destination&&!destination[fname].signature||(destination[fname]=function(var_args){return apiFunc.callOrApply(isInstance?this:void 0,Array.prototype.slice.call(arguments,0));},destination[fname].toString=goog.bind(apiFunc.toString,apiFunc,fname,isInstance),destination[fname].signature=signature);}});};ee.ApiFunction.clearApi=function(target$jscomp$0){var clear=function(target){for(var name in target){"function"===typeof target[name]&&target[name].signature&&delete target[name];}};clear(target$jscomp$0);clear(target$jscomp$0.prototype||{});};ee.arguments={};ee.arguments.extractFromFunction=function(fn,originalArgs){return ee.arguments.extractImpl_(fn,originalArgs,ee.arguments.JS_PARAM_DECL_MATCHER_FUNCTION_);};ee.arguments.extractFromClassConstructor=function(fn,originalArgs){return ee.arguments.extractImpl_(fn,originalArgs,ee.arguments.JS_PARAM_DECL_MATCHER_CLASS_CONSTRUCTOR_);};ee.arguments.extractFromClassMethod=function(fn,originalArgs){return ee.arguments.extractImpl_(fn,originalArgs,ee.arguments.JS_PARAM_DECL_MATCHER_CLASS_METHOD_);};ee.arguments.extract=ee.arguments.extractFromFunction;ee.arguments.extractImpl_=function(fn,originalArgs,parameterMatcher){var paramNamesWithOptPrefix=ee.arguments.getParamNames_(fn,parameterMatcher),paramNames=module$contents$goog$array_map(paramNamesWithOptPrefix,function(param){return param.replace(/^opt_/,"");}),fnName=ee.arguments.getFnName_(fn),fnNameSnippet=fnName?" to function "+fnName:"",args={},firstArg=originalArgs[0],firstArgCouldBeDictionary=goog.isObject(firstArg)&&"function"!==typeof firstArg&&!Array.isArray(firstArg)&&"Object"===Object.getPrototypeOf(firstArg).constructor.name;if(1<originalArgs.length||!firstArgCouldBeDictionary){if(originalArgs.length>paramNames.length){throw Error("Received too many arguments"+fnNameSnippet+". Expected at most "+paramNames.length+" but got "+originalArgs.length+".");}for(var i=0;i<originalArgs.length;i++){args[paramNames[i]]=originalArgs[i];}}else{var seen=new goog.structs.Set(module$contents$goog$object_getKeys(firstArg)),expected=new goog.structs.Set(paramNames);if(expected.intersection(seen).isEmpty()){args[paramNames[0]]=originalArgs[0];}else{var unexpected=seen.difference(expected);if(0!==unexpected.size){throw Error("Unexpected arguments"+fnNameSnippet+": "+Array.from(unexpected.values()).join(", "));}args=module$contents$goog$object_clone(firstArg);}}var provided=new goog.structs.Set(module$contents$goog$object_getKeys(args)),missing=new goog.structs.Set(module$contents$goog$array_filter(paramNamesWithOptPrefix,function(param){return!goog.string.startsWith(param,"opt_");})).difference(provided);if(0!==missing.size){throw Error("Missing required arguments"+fnNameSnippet+": "+Array.from(missing.values()).join(", "));}return args;};ee.arguments.getParamNames_=function(fn,parameterMatcher){var paramNames=[];if(goog.global.EXPORTED_FN_INFO){var exportedFnInfo=goog.global.EXPORTED_FN_INFO[fn.toString()];goog.isObject(exportedFnInfo)||ee.arguments.throwMatchFailedError_();paramNames=exportedFnInfo.paramNames;Array.isArray(paramNames)||ee.arguments.throwMatchFailedError_();}else{var fnMatchResult=fn.toString().replace(ee.arguments.JS_COMMENT_MATCHER_,"").match(parameterMatcher);null===fnMatchResult&&ee.arguments.throwMatchFailedError_();paramNames=(fnMatchResult[1].split(",")||[]).map(function(p){return p.replace(ee.arguments.JS_PARAM_DEFAULT_MATCHER_,"");});}return paramNames;};ee.arguments.getFnName_=function(fn){return goog.global.EXPORTED_FN_INFO?goog.global.EXPORTED_FN_INFO[fn.toString()].name.split(".").pop()+"()":null;};ee.arguments.throwMatchFailedError_=function(){throw Error("Failed to locate function parameters.");};ee.arguments.JS_COMMENT_MATCHER_=/((\/\/.*$)|(\/\*[\s\S]*?\*\/)|(\s))/gm;ee.arguments.JS_PARAM_DECL_MATCHER_FUNCTION_=/^function[^\(]*\(([^\)]*)\)/m;ee.arguments.JS_PARAM_DECL_MATCHER_CLASS_CONSTRUCTOR_=/^class[^\{]*{\S*?\bconstructor\(([^\)]*)\)/m;ee.arguments.JS_PARAM_DECL_MATCHER_CLASS_METHOD_=/[^\(]*\(([^\)]*)\)/m;ee.arguments.JS_PARAM_DEFAULT_MATCHER_=/=.*$/;ee.Element=function(func,args,opt_varName){ee.ComputedObject.call(this,func,args,opt_varName);ee.Element.initialize();};goog.inherits(ee.Element,ee.ComputedObject);goog.exportSymbol("ee.Element",ee.Element);ee.Element.initialized_=!1;ee.Element.initialize=function(){ee.Element.initialized_||(ee.ApiFunction.importApi(ee.Element,"Element","Element"),ee.Element.initialized_=!0);};ee.Element.reset=function(){ee.ApiFunction.clearApi(ee.Element);ee.Element.initialized_=!1;};ee.Element.prototype.name=function(){return"Element";};ee.Element.prototype.set=function(var_args){if(1>=arguments.length){var properties=arguments[0];ee.Types.isRegularObject(properties)&&module$contents$goog$array_equals(module$contents$goog$object_getKeys(properties),["properties"])&&goog.isObject(properties.properties)&&(properties=properties.properties);if(ee.Types.isRegularObject(properties)){var result=this;for(var key in properties){var value=properties[key];result=ee.ApiFunction._call("Element.set",result,key,value);}}else{if(properties instanceof ee.ComputedObject&&ee.ApiFunction.lookupInternal("Element.setMulti")){result=ee.ApiFunction._call("Element.setMulti",this,properties);}else{throw Error("When Element.set() is passed one argument, it must be a dictionary.");}}}else{if(0!=arguments.length%2){throw Error("When Element.set() is passed multiple arguments, there must be an even number of them.");}result=this;for(var i=0;i<arguments.length;i+=2){key=arguments[i],value=arguments[i+1],result=ee.ApiFunction._call("Element.set",result,key,value);}}return this.castInternal(result);};goog.exportProperty(ee.Element.prototype,"set",ee.Element.prototype.set);ee.Geometry=function(geoJson,opt_proj,opt_geodesic,opt_evenOdd){if(!(this instanceof ee.Geometry)){return ee.ComputedObject.construct(ee.Geometry,arguments);}if(!("type"in geoJson)){var args=ee.arguments.extractFromFunction(ee.Geometry,arguments);geoJson=args.geoJson;opt_proj=args.proj;opt_geodesic=args.geodesic;opt_evenOdd=args.evenOdd;}ee.Geometry.initialize();var options=null!=opt_proj||null!=opt_geodesic||null!=opt_evenOdd;if(geoJson instanceof ee.ComputedObject&&!(geoJson instanceof ee.Geometry&&geoJson.type_)){if(options){throw Error("Setting the CRS, geodesic, or evenOdd flag on a computed Geometry is not supported. Use Geometry.transform().");}ee.ComputedObject.call(this,geoJson.func,geoJson.args,geoJson.varName);}else{geoJson instanceof ee.Geometry&&(geoJson=geoJson.encode());if(!ee.Geometry.isValidGeometry_(geoJson)){throw Error("Invalid GeoJSON geometry: "+JSON.stringify(geoJson));}ee.ComputedObject.call(this,null,null);this.type_=geoJson.type;this.coordinates_=null!=geoJson.coordinates?module$contents$goog$object_unsafeClone(geoJson.coordinates):null;this.geometries_=geoJson.geometries||null;if(null!=opt_proj){this.proj_=opt_proj;}else{if("crs"in geoJson){if(goog.isObject(geoJson.crs)&&"name"==geoJson.crs.type&&goog.isObject(geoJson.crs.properties)&&"string"===typeof geoJson.crs.properties.name){this.proj_=geoJson.crs.properties.name;}else{throw Error("Invalid CRS declaration in GeoJSON: "+new goog.json.Serializer().serialize(geoJson.crs));}}}this.geodesic_=opt_geodesic;void 0===this.geodesic_&&"geodesic"in geoJson&&(this.geodesic_=!!geoJson.geodesic);this.evenOdd_=opt_evenOdd;void 0===this.evenOdd_&&"evenOdd"in geoJson&&(this.evenOdd_=!!geoJson.evenOdd);}};goog.inherits(ee.Geometry,ee.ComputedObject);goog.exportSymbol("ee.Geometry",ee.Geometry);ee.Geometry.initialized_=!1;ee.Geometry.initialize=function(){ee.Geometry.initialized_||(ee.ApiFunction.importApi(ee.Geometry,"Geometry","Geometry"),ee.Geometry.initialized_=!0);};ee.Geometry.reset=function(){ee.ApiFunction.clearApi(ee.Geometry);ee.Geometry.initialized_=!1;};ee.Geometry.Point=function(coords,opt_proj){if(!(this instanceof ee.Geometry.Point)){return ee.Geometry.createInstance_(ee.Geometry.Point,arguments);}var init=ee.Geometry.construct_(ee.Geometry.Point,"Point",1,arguments);if(!(init instanceof ee.ComputedObject)){var xy=init.coordinates;if(!Array.isArray(xy)||2!=xy.length){throw Error("The Geometry.Point constructor requires 2 coordinates.");}}ee.Geometry.call(this,init);};goog.inherits(ee.Geometry.Point,ee.Geometry);goog.exportProperty(ee.Geometry,"Point",ee.Geometry.Point);ee.Geometry.MultiPoint=function(coords,opt_proj){if(!(this instanceof ee.Geometry.MultiPoint)){return ee.Geometry.createInstance_(ee.Geometry.MultiPoint,arguments);}ee.Geometry.call(this,ee.Geometry.construct_(ee.Geometry.MultiPoint,"MultiPoint",2,arguments));};goog.inherits(ee.Geometry.MultiPoint,ee.Geometry);goog.exportProperty(ee.Geometry,"MultiPoint",ee.Geometry.MultiPoint);ee.Geometry.Rectangle=function(coords,opt_proj,opt_geodesic,opt_evenOdd){if(!(this instanceof ee.Geometry.Rectangle)){return ee.Geometry.createInstance_(ee.Geometry.Rectangle,arguments);}var init=ee.Geometry.construct_(ee.Geometry.Rectangle,"Rectangle",2,arguments);if(!(init instanceof ee.ComputedObject)){var xy=init.coordinates;if(2!=xy.length){throw Error("The Geometry.Rectangle constructor requires 2 points or 4 coordinates.");}var x1=xy[0][0],y1=xy[0][1],x2=xy[1][0],y2=xy[1][1];init.coordinates=[[[x1,y2],[x1,y1],[x2,y1],[x2,y2]]];init.type="Polygon";}ee.Geometry.call(this,init);};goog.inherits(ee.Geometry.Rectangle,ee.Geometry);goog.exportProperty(ee.Geometry,"Rectangle",ee.Geometry.Rectangle);ee.Geometry.BBox=function(west,south,east,north){if(!(this instanceof ee.Geometry.BBox)){return ee.Geometry.createInstance_(ee.Geometry.BBox,arguments);}var coordinates=[west,south,east,north];if(ee.Geometry.hasServerValue_(coordinates)){return new ee.ApiFunction("GeometryConstructors.BBox").apply(coordinates);}if(!(Infinity>west)){throw Error("Geometry.BBox: west must not be "+west);}if(!(-Infinity<east)){throw Error("Geometry.BBox: east must not be "+east);}if(!(90>=south)){throw Error("Geometry.BBox: south must be at most +90\u00b0, but was "+south+"\u00b0");}if(!(-90<=north)){throw Error("Geometry.BBox: north must be at least -90\u00b0, but was "+north+"\u00b0");}south=Math.max(south,-90);north=Math.min(north,90);360<=east-west?(west=-180,east=180):(west=ee.Geometry.canonicalizeLongitude_(west),east=ee.Geometry.canonicalizeLongitude_(east),east<west&&(east+=360));ee.Geometry.call(this,{type:"Polygon",coordinates:[[[west,north],[west,south],[east,south],[east,north]]]},void 0,!1,!0);};goog.inherits(ee.Geometry.BBox,ee.Geometry.Rectangle);goog.exportProperty(ee.Geometry,"BBox",ee.Geometry.BBox);ee.Geometry.canonicalizeLongitude_=function(longitude){longitude%=360;180<longitude?longitude-=360:-180>longitude&&(longitude+=360);return longitude;};ee.Geometry.LineString=function(coords,opt_proj,opt_geodesic,opt_maxError){if(!(this instanceof ee.Geometry.LineString)){return ee.Geometry.createInstance_(ee.Geometry.LineString,arguments);}ee.Geometry.call(this,ee.Geometry.construct_(ee.Geometry.LineString,"LineString",2,arguments));};goog.inherits(ee.Geometry.LineString,ee.Geometry);goog.exportProperty(ee.Geometry,"LineString",ee.Geometry.LineString);ee.Geometry.LinearRing=function(coords,opt_proj,opt_geodesic,opt_maxError){if(!(this instanceof ee.Geometry.LinearRing)){return ee.Geometry.createInstance_(ee.Geometry.LinearRing,arguments);}ee.Geometry.call(this,ee.Geometry.construct_(ee.Geometry.LinearRing,"LinearRing",2,arguments));};goog.inherits(ee.Geometry.LinearRing,ee.Geometry);goog.exportProperty(ee.Geometry,"LinearRing",ee.Geometry.LinearRing);ee.Geometry.MultiLineString=function(coords,opt_proj,opt_geodesic,opt_maxError){if(!(this instanceof ee.Geometry.MultiLineString)){return ee.Geometry.createInstance_(ee.Geometry.MultiLineString,arguments);}ee.Geometry.call(this,ee.Geometry.construct_(ee.Geometry.MultiLineString,"MultiLineString",3,arguments));};goog.inherits(ee.Geometry.MultiLineString,ee.Geometry);goog.exportProperty(ee.Geometry,"MultiLineString",ee.Geometry.MultiLineString);ee.Geometry.Polygon=function(coords,opt_proj,opt_geodesic,opt_maxError,opt_evenOdd){if(!(this instanceof ee.Geometry.Polygon)){return ee.Geometry.createInstance_(ee.Geometry.Polygon,arguments);}ee.Geometry.call(this,ee.Geometry.construct_(ee.Geometry.Polygon,"Polygon",3,arguments));};goog.inherits(ee.Geometry.Polygon,ee.Geometry);goog.exportProperty(ee.Geometry,"Polygon",ee.Geometry.Polygon);ee.Geometry.MultiPolygon=function(coords,opt_proj,opt_geodesic,opt_maxError,opt_evenOdd){if(!(this instanceof ee.Geometry.MultiPolygon)){return ee.Geometry.createInstance_(ee.Geometry.MultiPolygon,arguments);}ee.Geometry.call(this,ee.Geometry.construct_(ee.Geometry.MultiPolygon,"MultiPolygon",4,arguments));};goog.inherits(ee.Geometry.MultiPolygon,ee.Geometry);goog.exportProperty(ee.Geometry,"MultiPolygon",ee.Geometry.MultiPolygon);ee.Geometry.prototype.encode=function(opt_encoder){if(!this.type_){if(!opt_encoder){throw Error("Must specify an encode function when encoding a computed geometry.");}return ee.ComputedObject.prototype.encode.call(this,opt_encoder);}var result={type:this.type_};"GeometryCollection"==this.type_?result.geometries=this.geometries_:result.coordinates=this.coordinates_;null!=this.proj_&&(result.crs={type:"name",properties:{name:this.proj_}});null!=this.geodesic_&&(result.geodesic=this.geodesic_);null!=this.evenOdd_&&(result.evenOdd=this.evenOdd_);return result;};ee.Geometry.prototype.toGeoJSON=function(){if(this.func){throw Error("Can't convert a computed Geometry to GeoJSON. Use evaluate() instead.");}return this.encode();};goog.exportProperty(ee.Geometry.prototype,"toGeoJSON",ee.Geometry.prototype.toGeoJSON);ee.Geometry.prototype.toGeoJSONString=function(){if(this.func){throw Error("Can't convert a computed Geometry to GeoJSON. Use evaluate() instead.");}return new goog.json.Serializer().serialize(this.toGeoJSON());};goog.exportProperty(ee.Geometry.prototype,"toGeoJSONString",ee.Geometry.prototype.toGeoJSONString);ee.Geometry.prototype.serialize=function(legacy){return(void 0===legacy?0:legacy)?ee.Serializer.toJSON(this):ee.Serializer.toCloudApiJSON(this);};goog.exportProperty(ee.Geometry.prototype,"serialize",ee.Geometry.prototype.serialize);ee.Geometry.prototype.toString=function(){return"ee.Geometry("+this.toGeoJSONString()+")";};ee.Geometry.prototype.encodeCloudValue=function(serializer){if(!this.type_){if(!serializer){throw Error("Must specify a serializer when encoding a computed geometry.");}return ee.ComputedObject.prototype.encodeCloudValue.call(this,serializer);}var args={},func="";"GeometryCollection"===this.type_?(args.geometries=this.geometries_.map(function(geometry){return new ee.Geometry(geometry);}),func="GeometryConstructors.MultiGeometry"):(args.coordinates=this.coordinates_,func="GeometryConstructors."+this.type_);null!=this.proj_&&(args.crs="string"===typeof this.proj_?new ee.ApiFunction("Projection").call(this.proj_):this.proj_);var acceptsGeodesicArg="Point"!==this.type_&&"MultiPoint"!==this.type_;null!=this.geodesic_&&acceptsGeodesicArg&&(args.geodesic=this.geodesic_);null!=this.evenOdd_&&(args.evenOdd=this.evenOdd_);return new ee.ApiFunction(func).apply(args).encodeCloudValue(serializer);};ee.Geometry.isValidGeometry_=function(geometry){var type=geometry.type;if("GeometryCollection"==type){var geometries=geometry.geometries;if(!Array.isArray(geometries)){return!1;}for(var i=0;i<geometries.length;i++){if(!ee.Geometry.isValidGeometry_(geometries[i])){return!1;}}return!0;}var coords=geometry.coordinates,nesting=ee.Geometry.isValidCoordinates_(coords);return"Point"==type&&1==nesting||"MultiPoint"==type&&(2==nesting||0==coords.length)||"LineString"==type&&2==nesting||"LinearRing"==type&&2==nesting||"MultiLineString"==type&&(3==nesting||0==coords.length)||"Polygon"==type&&3==nesting||"MultiPolygon"==type&&(4==nesting||0==coords.length);};ee.Geometry.isValidCoordinates_=function(shape){if(!Array.isArray(shape)){return-1;}if(Array.isArray(shape[0])){for(var count=ee.Geometry.isValidCoordinates_(shape[0]),i=1;i<shape.length;i++){if(ee.Geometry.isValidCoordinates_(shape[i])!=count){return-1;}}return count+1;}for(i=0;i<shape.length;i++){if("number"!==typeof shape[i]){return-1;}}return 0==shape.length%2?1:-1;};ee.Geometry.coordinatesToLine_=function(coordinates){if("number"!==typeof coordinates[0]||2==coordinates.length){return coordinates;}if(0!=coordinates.length%2){throw Error("Invalid number of coordinates: "+coordinates.length);}for(var line=[],i=0;i<coordinates.length;i+=2){line.push([coordinates[i],coordinates[i+1]]);}return line;};ee.Geometry.construct_=function(jsConstructorFn,apiConstructorName,depth,originalArgs){var eeArgs=ee.Geometry.getEeApiArgs_(jsConstructorFn,originalArgs);if(ee.Geometry.hasServerValue_(eeArgs.coordinates)||null!=eeArgs.crs||null!=eeArgs.maxError){return new ee.ApiFunction("GeometryConstructors."+apiConstructorName).apply(eeArgs);}eeArgs.type=apiConstructorName;eeArgs.coordinates=ee.Geometry.fixDepth_(depth,eeArgs.coordinates);var isPolygon=module$contents$goog$array_contains(["Polygon","Rectangle","MultiPolygon"],apiConstructorName);isPolygon&&null==eeArgs.evenOdd&&(eeArgs.evenOdd=!0);if(isPolygon&&!1===eeArgs.geodesic&&!1===eeArgs.evenOdd){throw Error("Planar interiors must be even/odd.");}return eeArgs;};ee.Geometry.getEeApiArgs_=function(jsConstructorFn,originalArgs){if(module$contents$goog$array_every(originalArgs,ee.Types.isNumber)){return{coordinates:module$contents$goog$array_toArray(originalArgs)};}var args=ee.arguments.extractFromFunction(jsConstructorFn,originalArgs);args.coordinates=args.coords;delete args.coords;args.crs=args.proj;delete args.proj;return module$contents$goog$object_filter(args,function(x){return null!=x;});};ee.Geometry.hasServerValue_=function(coordinates){return Array.isArray(coordinates)?module$contents$goog$array_some(coordinates,ee.Geometry.hasServerValue_):coordinates instanceof ee.ComputedObject;};ee.Geometry.fixDepth_=function(depth,coords){if(1>depth||4<depth){throw Error("Unexpected nesting level.");}module$contents$goog$array_every(coords,function(x){return"number"===typeof x;})&&(coords=ee.Geometry.coordinatesToLine_(coords));for(var item=coords,count=0;Array.isArray(item);){item=item[0],count++;}for(;count<depth;){coords=[coords],count++;}if(ee.Geometry.isValidCoordinates_(coords)!=depth){throw Error("Invalid geometry");}for(item=coords;Array.isArray(item)&&1==item.length;){item=item[0];}return Array.isArray(item)&&0==item.length?[]:coords;};ee.Geometry.createInstance_=function(klass,args){var f=function(){};f.prototype=klass.prototype;var instance=new f(),result=klass.apply(instance,args);return void 0!==result?result:instance;};ee.Geometry.prototype.name=function(){return"Geometry";};ee.Filter=function(opt_filter){if(!(this instanceof ee.Filter)){return ee.ComputedObject.construct(ee.Filter,arguments);}if(opt_filter instanceof ee.Filter){return opt_filter;}ee.Filter.initialize();if(Array.isArray(opt_filter)){if(0==opt_filter.length){throw Error("Empty list specified for ee.Filter().");}if(1==opt_filter.length){return new ee.Filter(opt_filter[0]);}ee.ComputedObject.call(this,new ee.ApiFunction("Filter.and"),{filters:opt_filter});this.filter_=opt_filter;}else{if(opt_filter instanceof ee.ComputedObject){ee.ComputedObject.call(this,opt_filter.func,opt_filter.args,opt_filter.varName),this.filter_=[opt_filter];}else{if(void 0===opt_filter){ee.ComputedObject.call(this,null,null),this.filter_=[];}else{throw Error("Invalid argument specified for ee.Filter(): "+opt_filter);}}}};goog.inherits(ee.Filter,ee.ComputedObject);goog.exportSymbol("ee.Filter",ee.Filter);ee.Filter.initialized_=!1;ee.Filter.initialize=function(){ee.Filter.initialized_||(ee.ApiFunction.importApi(ee.Filter,"Filter","Filter"),ee.Filter.initialized_=!0);};ee.Filter.reset=function(){ee.ApiFunction.clearApi(ee.Filter);ee.Filter.initialized_=!1;};ee.Filter.functionNames_={equals:"equals",less_than:"lessThan",greater_than:"greaterThan",contains:"stringContains",starts_with:"stringStartsWith",ends_with:"stringEndsWith"};ee.Filter.prototype.append_=function(newFilter){var prev=this.filter_.slice(0);newFilter instanceof ee.Filter?module$contents$goog$array_extend(prev,newFilter.filter_):newFilter instanceof Array?module$contents$goog$array_extend(prev,newFilter):prev.push(newFilter);return new ee.Filter(prev);};ee.Filter.prototype.not=function(){return ee.ApiFunction._call("Filter.not",this);};goog.exportProperty(ee.Filter.prototype,"not",ee.Filter.prototype.not);ee.Filter.eq=function(name,value){var args=ee.arguments.extractFromFunction(ee.Filter.eq,arguments);return ee.ApiFunction._call("Filter.equals",args.name,args.value);};goog.exportProperty(ee.Filter,"eq",ee.Filter.eq);ee.Filter.neq=function(name,value){var args=ee.arguments.extractFromFunction(ee.Filter.neq,arguments);return ee.Filter.eq(args.name,args.value).not();};goog.exportProperty(ee.Filter,"neq",ee.Filter.neq);ee.Filter.lt=function(name,value){var args=ee.arguments.extractFromFunction(ee.Filter.lt,arguments);return ee.ApiFunction._call("Filter.lessThan",args.name,args.value);};goog.exportProperty(ee.Filter,"lt",ee.Filter.lt);ee.Filter.gte=function(name,value){var args=ee.arguments.extractFromFunction(ee.Filter.gte,arguments);return ee.Filter.lt(args.name,args.value).not();};goog.exportProperty(ee.Filter,"gte",ee.Filter.gte);ee.Filter.gt=function(name,value){var args=ee.arguments.extractFromFunction(ee.Filter.gt,arguments);return ee.ApiFunction._call("Filter.greaterThan",args.name,args.value);};goog.exportProperty(ee.Filter,"gt",ee.Filter.gt);ee.Filter.lte=function(name,value){var args=ee.arguments.extractFromFunction(ee.Filter.lte,arguments);return ee.Filter.gt(args.name,args.value).not();};goog.exportProperty(ee.Filter,"lte",ee.Filter.lte);ee.Filter.and=function(var_args){var args=Array.prototype.slice.call(arguments);return ee.ApiFunction._call("Filter.and",args);};goog.exportProperty(ee.Filter,"and",ee.Filter.and);ee.Filter.or=function(var_args){var args=Array.prototype.slice.call(arguments);return ee.ApiFunction._call("Filter.or",args);};goog.exportProperty(ee.Filter,"or",ee.Filter.or);ee.Filter.date=function(start,opt_end){var args=ee.arguments.extractFromFunction(ee.Filter.date,arguments),range=ee.ApiFunction._call("DateRange",args.start,args.end);return ee.ApiFunction._apply("Filter.dateRangeContains",{leftValue:range,rightField:"system:time_start"});};goog.exportProperty(ee.Filter,"date",ee.Filter.date);ee.Filter.inList=function(opt_leftField,opt_rightValue,opt_rightField,opt_leftValue){var args=ee.arguments.extractFromFunction(ee.Filter.inList,arguments);return ee.ApiFunction._apply("Filter.listContains",{leftField:args.rightField,rightValue:args.leftValue,rightField:args.leftField,leftValue:args.rightValue});};goog.exportProperty(ee.Filter,"inList",ee.Filter.inList);ee.Filter.bounds=function(geometry,opt_errorMargin){return ee.ApiFunction._apply("Filter.intersects",{leftField:".all",rightValue:ee.ApiFunction._call("Feature",geometry),maxError:opt_errorMargin});};goog.exportProperty(ee.Filter,"bounds",ee.Filter.bounds);ee.Filter.prototype.name=function(){return"Filter";};ee.Filter.metadata=function(name,operator,value){operator=operator.toLowerCase();var negated=!1;goog.string.startsWith(operator,"not_")&&(negated=!0,operator=operator.substring(4));if(!(operator in ee.Filter.functionNames_)){throw Error("Unknown filtering operator: "+operator);}var filter=ee.ApiFunction._call("Filter."+ee.Filter.functionNames_[operator],name,value);return negated?filter.not():filter;};goog.exportProperty(ee.Filter,"metadata",ee.Filter.metadata);ee.Collection=function(func,args,opt_varName){ee.Element.call(this,func,args,opt_varName);ee.Collection.initialize();};goog.inherits(ee.Collection,ee.Element);goog.exportSymbol("ee.Collection",ee.Collection);ee.Collection.initialized_=!1;ee.Collection.initialize=function(){ee.Collection.initialized_||(ee.ApiFunction.importApi(ee.Collection,"Collection","Collection"),ee.ApiFunction.importApi(ee.Collection,"AggregateFeatureCollection","Collection","aggregate_"),ee.Collection.initialized_=!0);};ee.Collection.reset=function(){ee.ApiFunction.clearApi(ee.Collection);ee.Collection.initialized_=!1;};ee.Collection.prototype.filter=function(filter){filter=ee.arguments.extractFromFunction(ee.Collection.prototype.filter,arguments).filter;if(!filter){throw Error("Empty filters.");}return this.castInternal(ee.ApiFunction._call("Collection.filter",this,filter));};goog.exportProperty(ee.Collection.prototype,"filter",ee.Collection.prototype.filter);ee.Collection.prototype.filterMetadata=function(name,operator,value){var args=ee.arguments.extractFromFunction(ee.Collection.prototype.filterMetadata,arguments);return this.filter(ee.Filter.metadata(args.name,args.operator,args.value));};goog.exportProperty(ee.Collection.prototype,"filterMetadata",ee.Collection.prototype.filterMetadata);ee.Collection.prototype.filterBounds=function(geometry){return this.filter(ee.Filter.bounds(geometry));};goog.exportProperty(ee.Collection.prototype,"filterBounds",ee.Collection.prototype.filterBounds);ee.Collection.prototype.filterDate=function(start,opt_end){var args=ee.arguments.extractFromFunction(ee.Collection.prototype.filterDate,arguments);return this.filter(ee.Filter.date(args.start,args.end));};goog.exportProperty(ee.Collection.prototype,"filterDate",ee.Collection.prototype.filterDate);ee.Collection.prototype.limit=function(max,opt_property,opt_ascending){var args=ee.arguments.extractFromFunction(ee.Collection.prototype.limit,arguments);return this.castInternal(ee.ApiFunction._call("Collection.limit",this,args.max,args.property,args.ascending));};goog.exportProperty(ee.Collection.prototype,"limit",ee.Collection.prototype.limit);ee.Collection.prototype.sort=function(property,opt_ascending){var args=ee.arguments.extractFromFunction(ee.Collection.prototype.sort,arguments);return this.castInternal(ee.ApiFunction._call("Collection.limit",this,void 0,args.property,args.ascending));};goog.exportProperty(ee.Collection.prototype,"sort",ee.Collection.prototype.sort);ee.Collection.prototype.name=function(){return"Collection";};ee.Collection.prototype.elementType=function(){return ee.Element;};ee.Collection.prototype.map=function(algorithm,opt_dropNulls){var elementType=this.elementType();return this.castInternal(ee.ApiFunction._call("Collection.map",this,function(e){return algorithm(new elementType(e));},opt_dropNulls));};goog.exportProperty(ee.Collection.prototype,"map",ee.Collection.prototype.map);ee.Collection.prototype.iterate=function(algorithm,opt_first){var first=void 0!==opt_first?opt_first:null,elementType=this.elementType();return ee.ApiFunction._call("Collection.iterate",this,function(e,p){return algorithm(new elementType(e),p);},first);};goog.exportProperty(ee.Collection.prototype,"iterate",ee.Collection.prototype.iterate);ee.Feature=function(geometry,opt_properties){if(!(this instanceof ee.Feature)){return ee.ComputedObject.construct(ee.Feature,arguments);}if(geometry instanceof ee.Feature){if(opt_properties){throw Error("Can't create Feature out of a Feature and properties.");}return geometry;}if(2<arguments.length){throw Error("The Feature constructor takes at most 2 arguments ("+arguments.length+" given)");}ee.Feature.initialize();if(geometry instanceof ee.Geometry||null===geometry){ee.Element.call(this,new ee.ApiFunction("Feature"),{geometry:geometry,metadata:opt_properties||null});}else{if(geometry instanceof ee.ComputedObject){ee.Element.call(this,geometry.func,geometry.args,geometry.varName);}else{if("Feature"==geometry.type){var properties=geometry.properties||{};if("id"in geometry){if("system:index"in properties){throw Error('Can\'t specify both "id" and "system:index".');}properties=module$contents$goog$object_clone(properties);properties["system:index"]=geometry.id;}ee.Element.call(this,new ee.ApiFunction("Feature"),{geometry:new ee.Geometry(geometry.geometry),metadata:properties});}else{ee.Element.call(this,new ee.ApiFunction("Feature"),{geometry:new ee.Geometry(geometry),metadata:opt_properties||null});}}}};goog.inherits(ee.Feature,ee.Element);goog.exportSymbol("ee.Feature",ee.Feature);ee.Feature.initialized_=!1;ee.Feature.initialize=function(){ee.Feature.initialized_||(ee.ApiFunction.importApi(ee.Feature,"Feature","Feature"),ee.Feature.initialized_=!0);};ee.Feature.reset=function(){ee.ApiFunction.clearApi(ee.Feature);ee.Feature.initialized_=!1;};ee.Feature.prototype.getInfo=function(opt_callback){return ee.Feature.superClass_.getInfo.call(this,opt_callback);};goog.exportProperty(ee.Feature.prototype,"getInfo",ee.Feature.prototype.getInfo);ee.Feature.prototype.getMap=function(opt_visParams,opt_callback){var args=ee.arguments.extractFromFunction(ee.Feature.prototype.getMap,arguments);return ee.ApiFunction._call("Collection",[this]).getMap(args.visParams,args.callback);};goog.exportProperty(ee.Feature.prototype,"getMap",ee.Feature.prototype.getMap);ee.Feature.prototype.name=function(){return"Feature";};ee.data.images={};ee.data.images.applyTransformsToImage=function(taskConfig){var resultParams={},image=ee.data.images.applyCrsAndTransform(taskConfig.element,taskConfig);image=ee.data.images.applySelectionAndScale(image,taskConfig,resultParams);resultParams.element=image;return resultParams;};ee.data.images.applyTransformsToCollection=function(taskConfig){var resultParams={},collection=taskConfig.element.map(function(image){var projected=ee.data.images.applyCrsAndTransform(image,taskConfig);return ee.data.images.applySelectionAndScale(projected,taskConfig,resultParams);});resultParams.element=collection;return resultParams;};ee.data.images.applySelectionAndScale=function(image,params,outParams){var clipParams={},dimensions_consumed=!1,SCALING_KEYS=["maxDimension","width","height","scale"];module$contents$goog$object_forEach(params,function(value,key){if(null!=value){switch(key){case"dimensions":var dims="string"===typeof value?value.split("x").map(Number):Array.isArray(value)?value:"number"===typeof value?[value]:[];if(1===dims.length){clipParams.maxDimension=dims[0];}else{if(2===dims.length){clipParams.width=dims[0],clipParams.height=dims[1];}else{throw Error("Invalid dimensions "+value);}}break;case"dimensions_consumed":dimensions_consumed=!0;break;case"bbox":null!=clipParams.geometry&&console.warn("Multiple request parameters converted to region.");clipParams.geometry=ee.data.images.bboxToGeometry(value);break;case"region":null!=clipParams.geometry&&console.warn("Multiple request parameters converted to region.");clipParams.geometry=ee.data.images.regionToGeometry(value);break;case"scale":clipParams.scale=Number(value);break;default:outParams[key]=value;}}});module$contents$goog$object_isEmpty(clipParams)||(clipParams.input=image,image=SCALING_KEYS.some(function(key){return key in clipParams;})||dimensions_consumed?ee.ApiFunction._apply("Image.clipToBoundsAndScale",clipParams):ee.ApiFunction._apply("Image.clip",clipParams));return image;};ee.data.images.bboxToGeometry=function(bbox){if(bbox instanceof ee.Geometry.Rectangle){return bbox;}var bboxArray=bbox;if("string"===typeof bbox){try{bboxArray=JSON.parse(bbox);}catch($jscomp$unused$catch){bboxArray=bbox.split(/\s*,\s*/).map(Number);}}if(Array.isArray(bboxArray)){if(bboxArray.some(isNaN)){throw Error("Invalid bbox `{bboxArray}`, please specify a list of numbers.");}return new ee.Geometry.Rectangle(bboxArray,null,!1);}throw Error('Invalid bbox "{bbox}" type, must be of type Array<number>');};ee.data.images.regionToGeometry=function(region){if(region instanceof ee.Geometry){return region;}var regionObject=region;if("string"===typeof region){try{regionObject=JSON.parse(region);}catch(e){throw Error('Region string "'+region+'" is not valid GeoJSON.');}}if(Array.isArray(regionObject)){return new ee.Geometry.Polygon(regionObject,null,!1);}if(goog.isObject(regionObject)){return new ee.Geometry(regionObject,null,!1);}throw Error("Region {region} was not convertible to an ee.Geometry.");};ee.data.images.applyCrsAndTransform=function(image,params){var crs=params.crs||"",crsTransform=params.crsTransform||params.crs_transform;null!=crsTransform&&(crsTransform=ee.data.images.maybeConvertCrsTransformToArray_(crsTransform));if(!crs&&!crsTransform){return image;}if(crsTransform&&!crs){throw Error('Must specify "crs" if "crsTransform" is specified.');}if(crsTransform){if(image=ee.ApiFunction._apply("Image.reproject",{image:image,crs:crs,crsTransform:crsTransform}),null!=params.dimensions&&null==params.scale&&null==params.region){var dimensions=params.dimensions;"string"===typeof dimensions&&(dimensions=dimensions.split("x").map(Number));if(2===dimensions.length){delete params.dimensions;params.dimensions_consumed=!0;var projection=new ee.ApiFunction("Projection").call(crs,crsTransform);params.region=new ee.Geometry.Rectangle([0,0,dimensions[0],dimensions[1]],projection,!1);}}}else{image=ee.ApiFunction._apply("Image.setDefaultProjection",{image:image,crs:crs,crsTransform:[1,0,0,0,-1,0]});}return image;};ee.data.images.maybeConvertCrsTransformToArray_=function(crsTransform){var transformArray=crsTransform;if("string"===typeof transformArray){try{transformArray=JSON.parse(transformArray);}catch(e){}}if(Array.isArray(transformArray)){if(6===transformArray.length&&module$contents$goog$array_every(transformArray,function(x){return"number"===typeof x;})){return transformArray;}throw Error("Invalid argument, crs transform must be a list of 6 numbers.");}throw Error("Invalid argument, crs transform was not a string or array.");};ee.data.images.applyVisualization=function(image,params){var request={},visParams=ee.data.images.extractVisParams(params,request);module$contents$goog$object_isEmpty(visParams)||(visParams.image=image,image=ee.ApiFunction._apply("Image.visualize",visParams));request.image=image;return request;};ee.data.images.extractVisParams=function(params,outParams){var keysToExtract="bands gain bias min max gamma palette opacity forceRgbOutput".split(" "),visParams={};module$contents$goog$object_forEach(params,function(value,key){module$contents$goog$array_contains(keysToExtract,key)?visParams[key]=value:outParams[key]=value;});return visParams;};ee.data.images.buildDownloadIdImage=function(image,params){params=Object.assign({},params);var extractAndValidateTransforms=function(obj){var extracted={};["crs","crs_transform","dimensions","region"].forEach(function(key){key in obj&&(extracted[key]=obj[key]);});null!=obj.scale&&null==obj.dimensions&&(extracted.scale=obj.scale);return extracted;},buildImagePerBand=function(band){var bandId=band.id;if(void 0===bandId){throw Error("Each band dictionary must have an id.");}var bandImage=image.select(bandId),copyParams=extractAndValidateTransforms(params),bandParams=extractAndValidateTransforms(band);bandParams=extractAndValidateTransforms(Object.assign(copyParams,bandParams));bandImage=ee.data.images.applyCrsAndTransform(bandImage,bandParams);return bandImage=ee.data.images.applySelectionAndScale(bandImage,bandParams,{});};if("ZIPPED_GEO_TIFF_PER_BAND"===params.format&¶ms.bands&¶ms.bands.length){var images=params.bands.map(buildImagePerBand);image=images.reduce(function(result,bandImage){return ee.ApiFunction._call("Image.addBands",result,bandImage,null,!0);},images.shift());}else{var copyParams=extractAndValidateTransforms(params);image=ee.data.images.applyCrsAndTransform(image,copyParams);image=ee.data.images.applySelectionAndScale(image,copyParams,{});}return image;};ee.Image=function(opt_args){if(!(this instanceof ee.Image)){return ee.ComputedObject.construct(ee.Image,arguments);}if(opt_args instanceof ee.Image){return opt_args;}ee.Image.initialize();var argCount=arguments.length;if(0==argCount||1==argCount&&void 0===opt_args){ee.Element.call(this,new ee.ApiFunction("Image.mask"),{image:new ee.Image(0),mask:new ee.Image(0)});}else{if(1==argCount){if(ee.Types.isNumber(opt_args)){ee.Element.call(this,new ee.ApiFunction("Image.constant"),{value:opt_args});}else{if(ee.Types.isString(opt_args)){ee.Element.call(this,new ee.ApiFunction("Image.load"),{id:opt_args});}else{if(Array.isArray(opt_args)){return ee.Image.combine_(module$contents$goog$array_map(opt_args,function(elem){return new ee.Image(elem);}));}if(opt_args instanceof ee.ComputedObject){"Array"==opt_args.name()?ee.Element.call(this,new ee.ApiFunction("Image.constant"),{value:opt_args}):ee.Element.call(this,opt_args.func,opt_args.args,opt_args.varName);}else{throw Error("Unrecognized argument type to convert to an Image: "+opt_args);}}}}else{if(2==argCount){var id=arguments[0],version=arguments[1];if(ee.Types.isString(id)&&ee.Types.isNumber(version)){ee.Element.call(this,new ee.ApiFunction("Image.load"),{id:id,version:version});}else{throw Error("Unrecognized argument types to convert to an Image: "+arguments);}}else{throw Error("The Image constructor takes at most 2 arguments ("+argCount+" given)");}}}};goog.inherits(ee.Image,ee.Element);goog.exportSymbol("ee.Image",ee.Image);ee.Image.initialized_=!1;ee.Image.initialize=function(){ee.Image.initialized_||(ee.ApiFunction.importApi(ee.Image,"Image","Image"),ee.Image.initialized_=!0);};ee.Image.reset=function(){ee.ApiFunction.clearApi(ee.Image);ee.Image.initialized_=!1;};ee.Image.prototype.getInfo=function(opt_callback){return ee.Image.superClass_.getInfo.call(this,opt_callback);};goog.exportProperty(ee.Image.prototype,"getInfo",ee.Image.prototype.getInfo);ee.Image.prototype.getMap=function(opt_visParams,opt_callback){var $jscomp$this=this,args=ee.arguments.extractFromFunction(ee.Image.prototype.getMap,arguments),request=ee.data.images.applyVisualization(this,args.visParams);if(args.callback){var callback=args.callback;ee.data.getMapId(request,function(data,error){var mapId=data?Object.assign(data,{image:$jscomp$this}):void 0;callback(mapId,error);});}else{var response=ee.data.getMapId(request);response.image=this;return response;}};goog.exportProperty(ee.Image.prototype,"getMap",ee.Image.prototype.getMap);ee.Image.prototype.getDownloadURL=function(params,opt_callback){var args=ee.arguments.extractFromFunction(ee.Image.prototype.getDownloadURL,arguments),request=args.params?module$contents$goog$object_clone(args.params):{};request.image=this;if(args.callback){var callback=args.callback;ee.data.getDownloadId(request,function(downloadId,error){downloadId?callback(ee.data.makeDownloadUrl(downloadId)):callback(null,error);});}else{return ee.data.makeDownloadUrl(ee.data.getDownloadId(request));}};goog.exportProperty(ee.Image.prototype,"getDownloadURL",ee.Image.prototype.getDownloadURL);ee.Image.prototype.getThumbId=function(params,opt_callback){var args=ee.arguments.extractFromFunction(ee.Image.prototype.getDownloadURL,arguments),request=args.params?module$contents$goog$object_clone(args.params):{},extra={},image=ee.data.images.applyCrsAndTransform(this,request);image=ee.data.images.applySelectionAndScale(image,request,extra);request=ee.data.images.applyVisualization(image,extra);return args.callback?(ee.data.getThumbId(request,args.callback),null):ee.data.getThumbId(request);};goog.exportProperty(ee.Image.prototype,"getThumbId",ee.Image.prototype.getThumbId);ee.Image.prototype.getThumbURL=function(params,opt_callback){var args=ee.arguments.extractFromFunction(ee.Image.prototype.getThumbURL,arguments);if(args.callback){this.getThumbId(args.params,function(thumbId,opt_error){var thumbUrl="";if(void 0===opt_error){try{thumbUrl=ee.data.makeThumbUrl(thumbId);}catch(e){opt_error=String(e.message);}}args.callback(thumbUrl,opt_error);});}else{return ee.data.makeThumbUrl(this.getThumbId(args.params));}};goog.exportProperty(ee.Image.prototype,"getThumbURL",ee.Image.prototype.getThumbURL);ee.Image.rgb=function(r,g,b){var args=ee.arguments.extractFromFunction(ee.Image.rgb,arguments);return ee.Image.combine_([args.r,args.g,args.b],["vis-red","vis-green","vis-blue"]);};goog.exportProperty(ee.Image,"rgb",ee.Image.rgb);ee.Image.cat=function(var_args){var args=Array.prototype.slice.call(arguments);return ee.Image.combine_(args,null);};goog.exportProperty(ee.Image,"cat",ee.Image.cat);ee.Image.combine_=function(images,opt_names){if(0==images.length){return ee.ApiFunction._call("Image.constant",[]);}for(var result=new ee.Image(images[0]),i=1;i<images.length;i++){result=ee.ApiFunction._call("Image.addBands",result,images[i]);}opt_names&&(result=result.select([".*"],opt_names));return result;};ee.Image.prototype.select=function(var_args){var args=Array.prototype.slice.call(arguments),algorithmArgs={input:this,bandSelectors:args[0]||[]};if(2<args.length||ee.Types.isString(args[0])||ee.Types.isNumber(args[0])){for(var i=0;i<args.length;i++){if(!(ee.Types.isString(args[i])||ee.Types.isNumber(args[i])||args[i]instanceof ee.ComputedObject)){throw Error("Illegal argument to select(): "+args[i]);}}algorithmArgs.bandSelectors=args;}else{args[1]&&(algorithmArgs.newNames=args[1]);}return ee.ApiFunction._apply("Image.select",algorithmArgs);};goog.exportProperty(ee.Image.prototype,"select",ee.Image.prototype.select);ee.Image.prototype.expression=function(expression,opt_map){var originalArgs=ee.arguments.extractFromFunction(ee.Image.prototype.expression,arguments),vars=["DEFAULT_EXPRESSION_IMAGE"],eeArgs={DEFAULT_EXPRESSION_IMAGE:this};if(originalArgs.map){var map=originalArgs.map,name$jscomp$0;for(name$jscomp$0 in map){vars.push(name$jscomp$0),eeArgs[name$jscomp$0]=new ee.Image(map[name$jscomp$0]);}}var body=ee.ApiFunction._call("Image.parseExpression",originalArgs.expression,"DEFAULT_EXPRESSION_IMAGE",vars),func=new ee.Function();func.encode=function(encoder){return body.encode(encoder);};func.encodeCloudInvocation=function(serializer,args){return ee.rpc_node.functionByReference(serializer.makeReference(body),args);};func.getSignature=function(){return{name:"",args:module$contents$goog$array_map(vars,function(name){return{name:name,type:"Image",optional:!1};},this),returns:"Image"};};return func.apply(eeArgs);};goog.exportProperty(ee.Image.prototype,"expression",ee.Image.prototype.expression);ee.Image.prototype.clip=function(geometry){try{geometry=new ee.Geometry(geometry);}catch(e){}return ee.ApiFunction._call("Image.clip",this,geometry);};goog.exportProperty(ee.Image.prototype,"clip",ee.Image.prototype.clip);ee.Image.prototype.rename=function(var_args){var names=1!=arguments.length||ee.Types.isString(arguments[0])?Array.from(arguments):arguments[0];return ee.ApiFunction._call("Image.rename",this,names);};goog.exportProperty(ee.Image.prototype,"rename",ee.Image.prototype.rename);ee.Image.prototype.name=function(){return"Image";};ee.List=function(list){if(this instanceof ee.List){if(1<arguments.length){throw Error("ee.List() only accepts 1 argument.");}if(list instanceof ee.List){return list;}}else{return ee.ComputedObject.construct(ee.List,arguments);}ee.List.initialize();if(Array.isArray(list)){ee.ComputedObject.call(this,null,null),this.list_=list;}else{if(list instanceof ee.ComputedObject){ee.ComputedObject.call(this,list.func,list.args,list.varName),this.list_=null;}else{throw Error("Invalid argument specified for ee.List(): "+list);}}};goog.inherits(ee.List,ee.ComputedObject);goog.exportSymbol("ee.List",ee.List);ee.List.initialized_=!1;ee.List.initialize=function(){ee.List.initialized_||(ee.ApiFunction.importApi(ee.List,"List","List"),ee.List.initialized_=!0);};ee.List.reset=function(){ee.ApiFunction.clearApi(ee.List);ee.List.initialized_=!1;};ee.List.prototype.encode=function(encoder){return Array.isArray(this.list_)?module$contents$goog$array_map(this.list_,function(elem){return encoder(elem);}):ee.List.superClass_.encode.call(this,encoder);};ee.List.prototype.encodeCloudValue=function(serializer){return Array.isArray(this.list_)?ee.rpc_node.reference(serializer.makeReference(this.list_)):ee.List.superClass_.encodeCloudValue.call(this,serializer);};ee.List.prototype.name=function(){return"List";};ee.FeatureCollection=function(args,opt_column){if(!(this instanceof ee.FeatureCollection)){return ee.ComputedObject.construct(ee.FeatureCollection,arguments);}if(args instanceof ee.FeatureCollection){return args;}if(2<arguments.length){throw Error("The FeatureCollection constructor takes at most 2 arguments ("+arguments.length+" given)");}ee.FeatureCollection.initialize();args instanceof ee.Geometry&&(args=new ee.Feature(args));args instanceof ee.Feature&&(args=[args]);if(ee.Types.isString(args)){var actualArgs={tableId:args};opt_column&&(actualArgs.geometryColumn=opt_column);ee.Collection.call(this,new ee.ApiFunction("Collection.loadTable"),actualArgs);}else{if(Array.isArray(args)){ee.Collection.call(this,new ee.ApiFunction("Collection"),{features:module$contents$goog$array_map(args,function(elem){return new ee.Feature(elem);})});}else{if(args instanceof ee.List){ee.Collection.call(this,new ee.ApiFunction("Collection"),{features:args});}else{if(args&&"object"===typeof args&&"FeatureCollection"===args.type){ee.Collection.call(this,new ee.ApiFunction("Collection"),{features:args.features.map(function(f){return new ee.Feature(f);})});}else{if(args instanceof ee.ComputedObject){ee.Collection.call(this,args.func,args.args,args.varName);}else{throw Error("Unrecognized argument type to convert to a FeatureCollection: "+args);}}}}}};goog.inherits(ee.FeatureCollection,ee.Collection);goog.exportSymbol("ee.FeatureCollection",ee.FeatureCollection);ee.FeatureCollection.initialized_=!1;ee.FeatureCollection.initialize=function(){ee.FeatureCollection.initialized_||(ee.ApiFunction.importApi(ee.FeatureCollection,"FeatureCollection","FeatureCollection"),ee.FeatureCollection.initialized_=!0);};ee.FeatureCollection.reset=function(){ee.ApiFunction.clearApi(ee.FeatureCollection);ee.FeatureCollection.initialized_=!1;};ee.FeatureCollection.prototype.getMap=function(opt_visParams,opt_callback){var args=ee.arguments.extractFromFunction(ee.FeatureCollection.prototype.getMap,arguments),painted=ee.ApiFunction._apply("Collection.draw",{collection:this,color:(args.visParams||{}).color||"000000"});if(args.callback){painted.getMap(void 0,args.callback);}else{return painted.getMap();}};goog.exportProperty(ee.FeatureCollection.prototype,"getMap",ee.FeatureCollection.prototype.getMap);ee.FeatureCollection.prototype.getInfo=function(opt_callback){return ee.FeatureCollection.superClass_.getInfo.call(this,opt_callback);};goog.exportProperty(ee.FeatureCollection.prototype,"getInfo",ee.FeatureCollection.prototype.getInfo);ee.FeatureCollection.prototype.getDownloadURL=function(opt_format,opt_selectors,opt_filename,opt_callback){var args=ee.arguments.extractFromFunction(ee.FeatureCollection.prototype.getDownloadURL,arguments),request={table:this};args.format&&(request.format=args.format.toUpperCase());args.filename&&(request.filename=args.filename);args.selectors&&(request.selectors=args.selectors);if(args.callback){ee.data.getTableDownloadId(request,function(downloadId,error){downloadId?args.callback(ee.data.makeTableDownloadUrl(downloadId)):args.callback(null,error);});}else{return ee.data.makeTableDownloadUrl(ee.data.getTableDownloadId(request));}};goog.exportProperty(ee.FeatureCollection.prototype,"getDownloadURL",ee.FeatureCollection.prototype.getDownloadURL);ee.FeatureCollection.prototype.select=function(propertySelectors,opt_newProperties,opt_retainGeometry){if(ee.Types.isString(propertySelectors)){var varargs=Array.prototype.slice.call(arguments);return this.map(function(feature){return feature.select(varargs);});}var args=ee.arguments.extractFromFunction(ee.FeatureCollection.prototype.select,arguments);return this.map(function(feature){return feature.select(args);});};goog.exportProperty(ee.FeatureCollection.prototype,"select",ee.FeatureCollection.prototype.select);ee.FeatureCollection.prototype.name=function(){return"FeatureCollection";};ee.FeatureCollection.prototype.elementType=function(){return ee.Feature;};ee.ImageCollection=function(args){if(!(this instanceof ee.ImageCollection)){return ee.ComputedObject.construct(ee.ImageCollection,arguments);}if(args instanceof ee.ImageCollection){return args;}if(1!=arguments.length){throw Error("The ImageCollection constructor takes exactly 1 argument ("+arguments.length+" given)");}ee.ImageCollection.initialize();args instanceof ee.Image&&(args=[args]);if(ee.Types.isString(args)){ee.Collection.call(this,new ee.ApiFunction("ImageCollection.load"),{id:args});}else{if(Array.isArray(args)){ee.Collection.call(this,new ee.ApiFunction("ImageCollection.fromImages"),{images:module$contents$goog$array_map(args,function(elem){return new ee.Image(elem);})});}else{if(args instanceof ee.List){ee.Collection.call(this,new ee.ApiFunction("ImageCollection.fromImages"),{images:args});}else{if(args instanceof ee.ComputedObject){ee.Collection.call(this,args.func,args.args,args.varName);}else{throw Error("Unrecognized argument type to convert to an ImageCollection: "+args);}}}}};goog.inherits(ee.ImageCollection,ee.Collection);goog.exportSymbol("ee.ImageCollection",ee.ImageCollection);ee.ImageCollection.initialized_=!1;ee.ImageCollection.initialize=function(){ee.ImageCollection.initialized_||(ee.ApiFunction.importApi(ee.ImageCollection,"ImageCollection","ImageCollection"),ee.ApiFunction.importApi(ee.ImageCollection,"reduce","ImageCollection"),ee.ImageCollection.initialized_=!0);};ee.ImageCollection.reset=function(){ee.ApiFunction.clearApi(ee.ImageCollection);ee.ImageCollection.initialized_=!1;};ee.ImageCollection.prototype.getFilmstripThumbURL=function(params,opt_callback){var args=ee.arguments.extractFromFunction(ee.ImageCollection.prototype.getFilmstripThumbURL,arguments);return ee.ImageCollection.prototype.getThumbURL_(this,args,["png","jpg","jpeg"],ee.ImageCollection.ThumbTypes.FILMSTRIP,opt_callback);};goog.exportProperty(ee.ImageCollection.prototype,"getFilmstripThumbURL",ee.ImageCollection.prototype.getFilmstripThumbURL);ee.ImageCollection.prototype.getVideoThumbURL=function(params,opt_callback){var args=ee.arguments.extractFromFunction(ee.ImageCollection.prototype.getVideoThumbURL,arguments);return ee.ImageCollection.prototype.getThumbURL_(this,args,["gif"],ee.ImageCollection.ThumbTypes.VIDEO,opt_callback);};goog.exportProperty(ee.ImageCollection.prototype,"getVideoThumbURL",ee.ImageCollection.prototype.getVideoThumbURL);ee.ImageCollection.ThumbTypes={FILMSTRIP:"filmstrip",VIDEO:"video",IMAGE:"image"};ee.ImageCollection.prototype.getThumbURL_=function(collection,args,validFormats,opt_thumbType,opt_callback){var extraParams={},clippedCollection=collection.map(function(image){var projected=ee.data.images.applyCrsAndTransform(image,args.params);return ee.data.images.applySelectionAndScale(projected,args.params,extraParams);}),request={},visParams=ee.data.images.extractVisParams(extraParams,request);request.imageCollection=clippedCollection.map(function(image){visParams.image=image;return ee.ApiFunction._apply("Image.visualize",visParams);});null!=args.params.dimensions&&(request.dimensions=args.params.dimensions);if(request.format){if(!module$contents$goog$array_some(validFormats,function(format){return goog.string.caseInsensitiveEquals(format,request.format);})){throw Error("Invalid format specified.");}}else{request.format=validFormats[0];}var getThumbId=ee.data.getThumbId;switch(opt_thumbType){case ee.ImageCollection.ThumbTypes.VIDEO:getThumbId=ee.data.getVideoThumbId;break;case ee.ImageCollection.ThumbTypes.FILMSTRIP:getThumbId=ee.data.getFilmstripThumbId;}if(args.callback){getThumbId(request,function(thumbId,opt_error){var thumbUrl="";if(void 0===opt_error){try{thumbUrl=ee.data.makeThumbUrl(thumbId);}catch(e){opt_error=String(e.message);}}args.callback(thumbUrl,opt_error);});}else{return ee.data.makeThumbUrl(getThumbId(request));}};ee.ImageCollection.prototype.getMap=function(opt_visParams,opt_callback){var args=ee.arguments.extractFromFunction(ee.ImageCollection.prototype.getMap,arguments),mosaic=ee.ApiFunction._call("ImageCollection.mosaic",this);if(args.callback){mosaic.getMap(args.visParams,args.callback);}else{return mosaic.getMap(args.visParams);}};goog.exportProperty(ee.ImageCollection.prototype,"getMap",ee.ImageCollection.prototype.getMap);ee.ImageCollection.prototype.getInfo=function(opt_callback){return ee.ImageCollection.superClass_.getInfo.call(this,opt_callback);};goog.exportProperty(ee.ImageCollection.prototype,"getInfo",ee.ImageCollection.prototype.getInfo);ee.ImageCollection.prototype.select=function(selectors,opt_names){var varargs=arguments;return this.map(function(obj){return obj.select.apply(obj,varargs);});};goog.exportProperty(ee.ImageCollection.prototype,"select",ee.ImageCollection.prototype.select);ee.ImageCollection.prototype.first=function(){return new ee.Image(ee.ApiFunction._call("Collection.first",this));};goog.exportProperty(ee.ImageCollection.prototype,"first",ee.ImageCollection.prototype.first);ee.ImageCollection.prototype.name=function(){return"ImageCollection";};ee.ImageCollection.prototype.elementType=function(){return ee.Image;};ee.batch={};var module$contents$ee$batch_Export={image:{},map:{},table:{},video:{},videoMap:{},classifier:{}},module$contents$ee$batch_ExportTask=function(config){this.config_=config;this.id=null;};module$contents$ee$batch_ExportTask.create=function(exportArgs){var config={element:module$contents$ee$batch_Export.extractElement(exportArgs)};Object.assign(config,exportArgs);config=module$contents$goog$object_filter(config,function(x){return null!=x;});return new module$contents$ee$batch_ExportTask(config);};module$contents$ee$batch_ExportTask.prototype.start=function(opt_success,opt_error){var $jscomp$this=this;goog.asserts.assert(this.config_,"Task config must be specified for tasks to be started.");if(opt_success){var startProcessing=function(){goog.asserts.assertString($jscomp$this.id);ee.data.startProcessing($jscomp$this.id,$jscomp$this.config_,function(_,error){error?opt_error(error):opt_success();});};this.id?startProcessing():ee.data.newTaskId(1,function(ids){var id=ids&&ids[0];id?($jscomp$this.id=id,startProcessing()):opt_error("Failed to obtain task ID.");});}else{this.id=this.id||ee.data.newTaskId(1)[0],goog.asserts.assertString(this.id,"Failed to obtain task ID."),ee.data.startProcessing(this.id,this.config_);}};goog.exportProperty(module$contents$ee$batch_ExportTask.prototype,"start",module$contents$ee$batch_ExportTask.prototype.start);module$contents$ee$batch_Export.image.toAsset=function(image,opt_description,opt_assetId,opt_pyramidingPolicy,opt_dimensions,opt_region,opt_scale,opt_crs,opt_crsTransform,opt_maxPixels,opt_shardSize){var clientConfig=ee.arguments.extractFromFunction(module$contents$ee$batch_Export.image.toAsset,arguments),serverConfig=module$contents$ee$batch_Export.convertToServerParams(clientConfig,ee.data.ExportDestination.ASSET,ee.data.ExportType.IMAGE);return module$contents$ee$batch_ExportTask.create(serverConfig);};goog.exportSymbol("module$contents$ee$batch_Export.image.toAsset",module$contents$ee$batch_Export.image.toAsset);module$contents$ee$batch_Export.image.toCloudStorage=function(image,opt_description,opt_bucket,opt_fileNamePrefix,opt_dimensions,opt_region,opt_scale,opt_crs,opt_crsTransform,opt_maxPixels,opt_shardSize,opt_fileDimensions,opt_skipEmptyTiles,opt_fileFormat,opt_formatOptions){var clientConfig=ee.arguments.extractFromFunction(module$contents$ee$batch_Export.image.toCloudStorage,arguments),serverConfig=module$contents$ee$batch_Export.convertToServerParams(clientConfig,ee.data.ExportDestination.GCS,ee.data.ExportType.IMAGE);return module$contents$ee$batch_ExportTask.create(serverConfig);};goog.exportSymbol("module$contents$ee$batch_Export.image.toCloudStorage",module$contents$ee$batch_Export.image.toCloudStorage);module$contents$ee$batch_Export.image.toDrive=function(image,opt_description,opt_folder,opt_fileNamePrefix,opt_dimensions,opt_region,opt_scale,opt_crs,opt_crsTransform,opt_maxPixels,opt_shardSize,opt_fileDimensions,opt_skipEmptyTiles,opt_fileFormat,opt_formatOptions){var clientConfig=ee.arguments.extractFromFunction(module$contents$ee$batch_Export.image.toDrive,arguments),serverConfig=module$contents$ee$batch_Export.convertToServerParams(clientConfig,ee.data.ExportDestination.DRIVE,ee.data.ExportType.IMAGE);return module$contents$ee$batch_ExportTask.create(serverConfig);};goog.exportSymbol("module$contents$ee$batch_Export.image.toDrive",module$contents$ee$batch_Export.image.toDrive);module$contents$ee$batch_Export.map.toCloudStorage=function(image,opt_description,opt_bucket,opt_fileFormat,opt_path,opt_writePublicTiles,opt_scale,opt_maxZoom,opt_minZoom,opt_region,opt_skipEmptyTiles,opt_mapsApiKey,opt_bucketCorsUris){var clientConfig=ee.arguments.extractFromFunction(module$contents$ee$batch_Export.map.toCloudStorage,arguments),serverConfig=module$contents$ee$batch_Export.convertToServerParams(clientConfig,ee.data.ExportDestination.GCS,ee.data.ExportType.MAP);return module$contents$ee$batch_ExportTask.create(serverConfig);};goog.exportSymbol("module$contents$ee$batch_Export.map.toCloudStorage",module$contents$ee$batch_Export.map.toCloudStorage);module$contents$ee$batch_Export.table.toCloudStorage=function(collection,opt_description,opt_bucket,opt_fileNamePrefix,opt_fileFormat,opt_selectors,opt_maxVertices){var clientConfig=ee.arguments.extractFromFunction(module$contents$ee$batch_Export.table.toCloudStorage,arguments),serverConfig=module$contents$ee$batch_Export.convertToServerParams(clientConfig,ee.data.ExportDestination.GCS,ee.data.ExportType.TABLE);return module$contents$ee$batch_ExportTask.create(serverConfig);};goog.exportSymbol("module$contents$ee$batch_Export.table.toCloudStorage",module$contents$ee$batch_Export.table.toCloudStorage);module$contents$ee$batch_Export.table.toDrive=function(collection,opt_description,opt_folder,opt_fileNamePrefix,opt_fileFormat,opt_selectors,opt_maxVertices){var clientConfig=ee.arguments.extractFromFunction(module$contents$ee$batch_Export.table.toDrive,arguments);clientConfig.type=ee.data.ExportType.TABLE;var serverConfig=module$contents$ee$batch_Export.convertToServerParams(clientConfig,ee.data.ExportDestination.DRIVE,ee.data.ExportType.TABLE);return module$contents$ee$batch_ExportTask.create(serverConfig);};goog.exportSymbol("module$contents$ee$batch_Export.table.toDrive",module$contents$ee$batch_Export.table.toDrive);module$contents$ee$batch_Export.table.toAsset=function(collection,opt_description,opt_assetId,opt_maxVertices){var clientConfig=ee.arguments.extractFromFunction(module$contents$ee$batch_Export.table.toAsset,arguments),serverConfig=module$contents$ee$batch_Export.convertToServerParams(clientConfig,ee.data.ExportDestination.ASSET,ee.data.ExportType.TABLE);return module$contents$ee$batch_ExportTask.create(serverConfig);};goog.exportSymbol("module$contents$ee$batch_Export.table.toAsset",module$contents$ee$batch_Export.table.toAsset);module$contents$ee$batch_Export.table.toDmsLayer=function(collection,opt_description,opt_assetId,opt_maxVertices){var clientConfig=ee.arguments.extractFromFunction(module$contents$ee$batch_Export.table.toDmsLayer,arguments),serverConfig=module$contents$ee$batch_Export.convertToServerParams(clientConfig,ee.data.ExportDestination.DMS,ee.data.ExportType.TABLE);return module$contents$ee$batch_ExportTask.create(serverConfig);};goog.exportSymbol("module$contents$ee$batch_Export.table.toDmsLayer",module$contents$ee$batch_Export.table.toDmsLayer);module$contents$ee$batch_Export.video.toCloudStorage=function(collection,opt_description,opt_bucket,opt_fileNamePrefix,opt_framesPerSecond,opt_dimensions,opt_region,opt_scale,opt_crs,opt_crsTransform,opt_maxPixels,opt_maxFrames){var clientConfig=ee.arguments.extractFromFunction(module$contents$ee$batch_Export.video.toCloudStorage,arguments),serverConfig=module$contents$ee$batch_Export.convertToServerParams(clientConfig,ee.data.ExportDestination.GCS,ee.data.ExportType.VIDEO);return module$contents$ee$batch_ExportTask.create(serverConfig);};goog.exportSymbol("module$contents$ee$batch_Export.video.toCloudStorage",module$contents$ee$batch_Export.video.toCloudStorage);module$contents$ee$batch_Export.video.toDrive=function(collection,opt_description,opt_folder,opt_fileNamePrefix,opt_framesPerSecond,opt_dimensions,opt_region,opt_scale,opt_crs,opt_crsTransform,opt_maxPixels,opt_maxFrames){var clientConfig=ee.arguments.extractFromFunction(module$contents$ee$batch_Export.video.toDrive,arguments),serverConfig=module$contents$ee$batch_Export.convertToServerParams(clientConfig,ee.data.ExportDestination.DRIVE,ee.data.ExportType.VIDEO);return module$contents$ee$batch_ExportTask.create(serverConfig);};goog.exportSymbol("module$contents$ee$batch_Export.video.toDrive",module$contents$ee$batch_Export.video.toDrive);module$contents$ee$batch_Export.videoMap.toCloudStorage=function(collection,opt_description,opt_bucket,opt_fileNamePrefix,opt_framesPerSecond,opt_writePublicTiles,opt_minZoom,opt_maxZoom,opt_scale,opt_region,opt_skipEmptyTiles,opt_minTimeMachineZoomSubset,opt_maxTimeMachineZoomSubset,opt_tileWidth,opt_tileHeight,opt_tileStride,opt_videoFormat,opt_version,opt_mapsApiKey,opt_bucketCorsUris){var clientConfig=ee.arguments.extractFromFunction(module$contents$ee$batch_Export.videoMap.toCloudStorage,arguments),serverConfig=module$contents$ee$batch_Export.convertToServerParams(clientConfig,ee.data.ExportDestination.GCS,ee.data.ExportType.VIDEO_MAP);return module$contents$ee$batch_ExportTask.create(serverConfig);};goog.exportSymbol("module$contents$ee$batch_Export.videoMap.toCloudStorage",module$contents$ee$batch_Export.videoMap.toCloudStorage);module$contents$ee$batch_Export.classifier.toAsset=function(classifier,opt_description,opt_assetId){var clientConfig=ee.arguments.extractFromFunction(module$contents$ee$batch_Export.classifier.toAsset,arguments),serverConfig=module$contents$ee$batch_Export.convertToServerParams(clientConfig,ee.data.ExportDestination.ASSET,ee.data.ExportType.CLASSIFIER);return module$contents$ee$batch_ExportTask.create(serverConfig);};goog.exportSymbol("module$contents$ee$batch_Export.classifier.toAsset",module$contents$ee$batch_Export.classifier.toAsset);module$contents$ee$batch_Export.serializeRegion=function(region){if(region instanceof ee.Geometry){region=region.toGeoJSON();}else{if("string"===typeof region){try{region=goog.asserts.assertObject(JSON.parse(region));}catch(x){throw Error("Invalid format for region property. Region must be GeoJSON LinearRing or Polygon specified as actual coordinates or serialized as a string. See Export documentation.");}}}if(!(goog.isObject(region)&&"type"in region)){try{new ee.Geometry.LineString(region);}catch(e){try{new ee.Geometry.Polygon(region);}catch(e2){throw Error("Invalid format for region property. Region must be GeoJSON LinearRing or Polygon specified as actual coordinates or serialized as a string. See Export documentation.");}}}return JSON.stringify(region);};module$contents$ee$batch_Export.resolveRegionParam=function(params){params=module$contents$goog$object_clone(params);if(!params.region){return goog.Promise.resolve(params);}var region=params.region;if(region instanceof ee.ComputedObject){return region instanceof ee.Element&&(region=region.geometry()),new goog.Promise(function(resolve,reject){region.getInfo(function(regionInfo,error){error?reject(error):(params.region=params.type===ee.data.ExportType.IMAGE?new ee.Geometry(regionInfo):module$contents$ee$batch_Export.serializeRegion(regionInfo),resolve(params));});});}params.region=params.type===ee.data.ExportType.IMAGE?new ee.Geometry(region):module$contents$ee$batch_Export.serializeRegion(region);return goog.Promise.resolve(params);};module$contents$ee$batch_Export.extractElement=function(exportArgs){var isInArgs=function(key){return key in exportArgs;},eeElementKey=module$contents$ee$batch_Export.EE_ELEMENT_KEYS.find(isInArgs);goog.asserts.assert(1===module$contents$goog$array_count(module$contents$ee$batch_Export.EE_ELEMENT_KEYS,isInArgs),'Expected a single "image", "collection" or "classifier" key.');var element=exportArgs[eeElementKey];if(element instanceof ee.Image){var result=element;}else{if(element instanceof ee.FeatureCollection){result=element;}else{if(element instanceof ee.ImageCollection){result=element;}else{if(element instanceof ee.Element){result=element;}else{if(element instanceof ee.ComputedObject){result=element;}else{throw Error("Unknown element type provided: "+typeof element+". Expected: ee.Image, ee.ImageCollection, ee.FeatureCollection, ee.Element or ee.ComputedObject.");}}}}}delete exportArgs[eeElementKey];return result;};module$contents$ee$batch_Export.convertToServerParams=function(originalArgs,destination,exportType,serializeRegion){serializeRegion=void 0===serializeRegion?!0:serializeRegion;var taskConfig={type:exportType};Object.assign(taskConfig,originalArgs);switch(exportType){case ee.data.ExportType.IMAGE:taskConfig=module$contents$ee$batch_Export.image.prepareTaskConfig_(taskConfig,destination);break;case ee.data.ExportType.MAP:taskConfig=module$contents$ee$batch_Export.map.prepareTaskConfig_(taskConfig,destination);break;case ee.data.ExportType.TABLE:taskConfig=module$contents$ee$batch_Export.table.prepareTaskConfig_(taskConfig,destination);break;case ee.data.ExportType.VIDEO:taskConfig=module$contents$ee$batch_Export.video.prepareTaskConfig_(taskConfig,destination);break;case ee.data.ExportType.VIDEO_MAP:taskConfig=module$contents$ee$batch_Export.videoMap.prepareTaskConfig_(taskConfig,destination);break;case ee.data.ExportType.CLASSIFIER:taskConfig=module$contents$ee$batch_Export.classifier.prepareTaskConfig_(taskConfig,destination);break;default:throw Error("Unknown export type: "+taskConfig.type);}serializeRegion&&null!=taskConfig.region&&(taskConfig.region=module$contents$ee$batch_Export.serializeRegion(taskConfig.region));return taskConfig;};module$contents$ee$batch_Export.prepareDestination_=function(taskConfig,destination){switch(destination){case ee.data.ExportDestination.GCS:taskConfig.outputBucket=taskConfig.bucket||"";taskConfig.outputPrefix=taskConfig.fileNamePrefix||taskConfig.path||"";delete taskConfig.fileNamePrefix;delete taskConfig.path;delete taskConfig.bucket;break;case ee.data.ExportDestination.ASSET:taskConfig.assetId=taskConfig.assetId||"";break;case ee.data.ExportDestination.DMS:taskConfig.dmsName=taskConfig.dmsName||"";break;default:var folderType=goog.typeOf(taskConfig.folder);if(!module$contents$goog$array_contains(["string","undefined"],folderType)){throw Error('Error: toDrive "folder" parameter must be a string, but is of type '+folderType+".");}taskConfig.driveFolder=taskConfig.folder||"";taskConfig.driveFileNamePrefix=taskConfig.fileNamePrefix||"";delete taskConfig.folder;delete taskConfig.fileNamePrefix;}return taskConfig;};module$contents$ee$batch_Export.image.prepareTaskConfig_=function(taskConfig,destination){null==taskConfig.fileFormat&&(taskConfig.fileFormat="GeoTIFF");taskConfig=module$contents$ee$batch_Export.reconcileImageFormat(taskConfig);taskConfig=module$contents$ee$batch_Export.prepareDestination_(taskConfig,destination);null!=taskConfig.crsTransform&&(taskConfig[module$contents$ee$batch_Export.CRS_TRANSFORM_KEY]=taskConfig.crsTransform,delete taskConfig.crsTransform);return taskConfig;};module$contents$ee$batch_Export.table.prepareTaskConfig_=function(taskConfig,destination){Array.isArray(taskConfig.selectors)&&(taskConfig.selectors=taskConfig.selectors.join());taskConfig=module$contents$ee$batch_Export.reconcileTableFormat(taskConfig);return taskConfig=module$contents$ee$batch_Export.prepareDestination_(taskConfig,destination);};module$contents$ee$batch_Export.map.prepareTaskConfig_=function(taskConfig,destination){taskConfig=module$contents$ee$batch_Export.prepareDestination_(taskConfig,destination);return taskConfig=module$contents$ee$batch_Export.reconcileMapFormat(taskConfig);};module$contents$ee$batch_Export.video.prepareTaskConfig_=function(taskConfig,destination){taskConfig=module$contents$ee$batch_Export.reconcileVideoFormat_(taskConfig);taskConfig=module$contents$ee$batch_Export.prepareDestination_(taskConfig,destination);null!=taskConfig.crsTransform&&(taskConfig[module$contents$ee$batch_Export.CRS_TRANSFORM_KEY]=taskConfig.crsTransform,delete taskConfig.crsTransform);return taskConfig;};module$contents$ee$batch_Export.videoMap.prepareTaskConfig_=function(taskConfig,destination){taskConfig=module$contents$ee$batch_Export.reconcileVideoFormat_(taskConfig);taskConfig.version=taskConfig.version||module$contents$ee$batch_VideoMapVersion.V1;taskConfig.stride=taskConfig.stride||1;taskConfig.tileDimensions={width:taskConfig.tileWidth||256,height:taskConfig.tileHeight||256};return taskConfig=module$contents$ee$batch_Export.prepareDestination_(taskConfig,destination);};module$contents$ee$batch_Export.classifier.prepareTaskConfig_=function(taskConfig,destination){return taskConfig=module$contents$ee$batch_Export.prepareDestination_(taskConfig,destination);};var module$contents$ee$batch_VideoFormat={MP4:"MP4",GIF:"GIF",VP9:"VP9"},module$contents$ee$batch_MapFormat={AUTO_JPEG_PNG:"AUTO_JPEG_PNG",JPEG:"JPEG",PNG:"PNG"},module$contents$ee$batch_ImageFormat={GEO_TIFF:"GEO_TIFF",TF_RECORD_IMAGE:"TF_RECORD_IMAGE"},module$contents$ee$batch_TableFormat={CSV:"CSV",GEO_JSON:"GEO_JSON",KML:"KML",KMZ:"KMZ",SHP:"SHP",TF_RECORD_TABLE:"TF_RECORD_TABLE"},module$contents$ee$batch_VideoMapVersion={V1:"V1",V2:"V2"},module$contents$ee$batch_FORMAT_OPTIONS_MAP={GEO_TIFF:["cloudOptimized","fileDimensions","shardSize"],TF_RECORD_IMAGE:"patchDimensions kernelSize compressed maxFileSize defaultValue tensorDepths sequenceData collapseBands maskedThreshold".split(" ")},module$contents$ee$batch_FORMAT_PREFIX_MAP={GEO_TIFF:"tiff",TF_RECORD_IMAGE:"tfrecord"};module$contents$ee$batch_Export.reconcileVideoFormat_=function(taskConfig){taskConfig.videoOptions=taskConfig.framesPerSecond||5.0;taskConfig.maxFrames=taskConfig.maxFrames||1000;taskConfig.maxPixels=taskConfig.maxPixels||1e8;var formatString=taskConfig.fileFormat;null==formatString&&(formatString=module$contents$ee$batch_VideoFormat.MP4);formatString=formatString.toUpperCase();switch(formatString){case"MP4":formatString=module$contents$ee$batch_VideoFormat.MP4;break;case"GIF":case"JIF":formatString=module$contents$ee$batch_VideoFormat.GIF;break;case"VP9":case"WEBM":formatString=module$contents$ee$batch_VideoFormat.VP9;break;default:throw Error("Invalid file format "+formatString+". Supported formats are: 'MP4', 'GIF', and 'WEBM'.");}taskConfig.fileFormat=formatString;return taskConfig;};module$contents$ee$batch_Export.reconcileImageFormat=function(taskConfig){var formatString=taskConfig.fileFormat;null==formatString&&(formatString=module$contents$ee$batch_ImageFormat.GEO_TIFF);formatString=formatString.toUpperCase();switch(formatString){case"TIFF":case"TIF":case"GEO_TIFF":case"GEOTIFF":formatString=module$contents$ee$batch_ImageFormat.GEO_TIFF;break;case"TF_RECORD":case"TF_RECORD_IMAGE":case"TFRECORD":formatString=module$contents$ee$batch_ImageFormat.TF_RECORD_IMAGE;break;default:throw Error("Invalid file format "+formatString+". Supported formats are: 'GEOTIFF', 'TFRECORD'.");}taskConfig.fileFormat=formatString;if(null!=taskConfig.formatOptions){var formatOptions=module$contents$ee$batch_Export.prefixImageFormatOptions_(taskConfig,formatString);delete taskConfig.formatOptions;Object.assign(taskConfig,formatOptions);}return taskConfig;};module$contents$ee$batch_Export.reconcileMapFormat=function(taskConfig){var formatString=taskConfig.fileFormat;null==formatString&&(formatString=module$contents$ee$batch_MapFormat.AUTO_JPEG_PNG);formatString=formatString.toUpperCase();switch(formatString){case"AUTO":case"AUTO_JPEG_PNG":case"AUTO_JPG_PNG":formatString=module$contents$ee$batch_MapFormat.AUTO_JPEG_PNG;break;case"JPG":case"JPEG":formatString=module$contents$ee$batch_MapFormat.JPEG;break;case"PNG":formatString=module$contents$ee$batch_MapFormat.PNG;break;default:throw Error("Invalid file format "+formatString+". Supported formats are: 'AUTO', 'PNG', and 'JPEG'.");}taskConfig.fileFormat=formatString;return taskConfig;};module$contents$ee$batch_Export.reconcileTableFormat=function(taskConfig){var formatString=taskConfig.fileFormat;null==formatString&&(formatString=module$contents$ee$batch_TableFormat.CSV);formatString=formatString.toUpperCase();switch(formatString){case"CSV":formatString=module$contents$ee$batch_TableFormat.CSV;break;case"JSON":case"GEOJSON":case"GEO_JSON":formatString=module$contents$ee$batch_TableFormat.GEO_JSON;break;case"KML":formatString=module$contents$ee$batch_TableFormat.KML;break;case"KMZ":formatString=module$contents$ee$batch_TableFormat.KMZ;break;case"SHP":formatString=module$contents$ee$batch_TableFormat.SHP;break;case"TF_RECORD":case"TF_RECORD_TABLE":case"TFRECORD":formatString=module$contents$ee$batch_TableFormat.TF_RECORD_TABLE;break;default:throw Error("Invalid file format "+formatString+". Supported formats are: 'CSV', 'GeoJSON', 'KML', 'KMZ', 'SHP', and 'TFRecord'.");}taskConfig.fileFormat=formatString;return taskConfig;};module$contents$ee$batch_Export.prefixImageFormatOptions_=function(taskConfig,imageFormat){var formatOptions=taskConfig.formatOptions;if(null==formatOptions){return{};}if(Object.keys(taskConfig).some(function(key){return module$contents$goog$object_containsKey(formatOptions,key);})){throw Error("Parameter specified at least twice: once in config, and once in config format options.");}for(var prefix=module$contents$ee$batch_FORMAT_PREFIX_MAP[imageFormat],validOptionKeys=module$contents$ee$batch_FORMAT_OPTIONS_MAP[imageFormat],prefixedOptions={},$jscomp$iter$27=$jscomp.makeIterator(Object.entries(formatOptions)),$jscomp$key$=$jscomp$iter$27.next();!$jscomp$key$.done;$jscomp$key$=$jscomp$iter$27.next()){var $jscomp$destructuring$var37=$jscomp.makeIterator($jscomp$key$.value),key$jscomp$0=$jscomp$destructuring$var37.next().value,value=$jscomp$destructuring$var37.next().value;if(!module$contents$goog$array_contains(validOptionKeys,key$jscomp$0)){var validKeysMsg=validOptionKeys.join(", ");throw Error('"'+key$jscomp$0+'" is not a valid option, the image format "'+imageFormat+'""may have the following options: '+(validKeysMsg+'".'));}var prefixedKey=prefix+key$jscomp$0[0].toUpperCase()+key$jscomp$0.substring(1);Array.isArray(value)?prefixedOptions[prefixedKey]=value.join():prefixedOptions[prefixedKey]=value;}return prefixedOptions;};module$contents$ee$batch_Export.CRS_TRANSFORM_KEY="crs_transform";module$contents$ee$batch_Export.EE_ELEMENT_KEYS=["image","collection","classifier"];ee.batch.Export=module$contents$ee$batch_Export;ee.batch.ExportTask=module$contents$ee$batch_ExportTask;ee.batch.ImageFormat=module$contents$ee$batch_ImageFormat;ee.batch.MapFormat=module$contents$ee$batch_MapFormat;ee.batch.ServerTaskConfig={};ee.batch.TableFormat=module$contents$ee$batch_TableFormat;ee.batch.VideoFormat=module$contents$ee$batch_VideoFormat;ee.Number=function(number){if(!(this instanceof ee.Number)){return ee.ComputedObject.construct(ee.Number,arguments);}if(number instanceof ee.Number){return number;}ee.Number.initialize();if("number"===typeof number){ee.ComputedObject.call(this,null,null),this.number_=number;}else{if(number instanceof ee.ComputedObject){ee.ComputedObject.call(this,number.func,number.args,number.varName),this.number_=null;}else{throw Error("Invalid argument specified for ee.Number(): "+number);}}};goog.inherits(ee.Number,ee.ComputedObject);goog.exportSymbol("ee.Number",ee.Number);ee.Number.initialized_=!1;ee.Number.initialize=function(){ee.Number.initialized_||(ee.ApiFunction.importApi(ee.Number,"Number","Number"),ee.Number.initialized_=!0);};ee.Number.reset=function(){ee.ApiFunction.clearApi(ee.Number);ee.Number.initialized_=!1;};ee.Number.prototype.encode=function(encoder){return"number"===typeof this.number_?this.number_:ee.Number.superClass_.encode.call(this,encoder);};ee.Number.prototype.encodeCloudValue=function(serializer){return"number"===typeof this.number_?ee.rpc_node.reference(serializer.makeReference(this.number_)):ee.Number.superClass_.encodeCloudValue.call(this,serializer);};ee.Number.prototype.name=function(){return"Number";};ee.String=function(string){if(!(this instanceof ee.String)){return ee.ComputedObject.construct(ee.String,arguments);}if(string instanceof ee.String){return string;}ee.String.initialize();if("string"===typeof string){ee.ComputedObject.call(this,null,null),this.string_=string;}else{if(string instanceof ee.ComputedObject){this.string_=null,string.func&&"String"==string.func.getSignature().returns?ee.ComputedObject.call(this,string.func,string.args,string.varName):ee.ComputedObject.call(this,new ee.ApiFunction("String"),{input:string},null);}else{throw Error("Invalid argument specified for ee.String(): "+string);}}};goog.inherits(ee.String,ee.ComputedObject);goog.exportSymbol("ee.String",ee.String);ee.String.initialized_=!1;ee.String.initialize=function(){ee.String.initialized_||(ee.ApiFunction.importApi(ee.String,"String","String"),ee.String.initialized_=!0);};ee.String.reset=function(){ee.ApiFunction.clearApi(ee.String);ee.String.initialized_=!1;};ee.String.prototype.encode=function(encoder){return"string"===typeof this.string_?this.string_:ee.String.superClass_.encode.call(this,encoder);};ee.String.prototype.encodeCloudValue=function(serializer){return"string"===typeof this.string_?ee.rpc_node.reference(serializer.makeReference(this.string_)):ee.String.superClass_.encodeCloudValue.call(this,serializer);};ee.String.prototype.name=function(){return"String";};ee.CustomFunction=function(signature,body){if(!(this instanceof ee.CustomFunction)){return ee.ComputedObject.construct(ee.CustomFunction,arguments);}for(var vars=[],args=signature.args,i=0;i<args.length;i++){var arg=args[i];vars.push(ee.CustomFunction.variable(ee.Types.nameToClass(arg.type),arg.name));}if(void 0===body.apply(null,vars)){throw Error("User-defined methods must return a value.");}this.signature_=ee.CustomFunction.resolveNamelessArgs_(signature,vars,body);this.body_=body.apply(null,vars);};goog.inherits(ee.CustomFunction,ee.Function);goog.exportSymbol("ee.CustomFunction",ee.CustomFunction);ee.CustomFunction.prototype.encode=function(encoder){return{type:"Function",argumentNames:module$contents$goog$array_map(this.signature_.args,function(arg){return arg.name;}),body:encoder(this.body_)};};ee.CustomFunction.prototype.encodeCloudValue=function(serializer){return ee.rpc_node.functionDefinition(this.signature_.args.map(function(arg){return arg.name;}),serializer.makeReference(this.body_));};ee.CustomFunction.prototype.encodeCloudInvocation=function(serializer,args){return ee.rpc_node.functionByReference(serializer.makeReference(this),args);};ee.CustomFunction.prototype.getSignature=function(){return this.signature_;};ee.CustomFunction.variable=function(type,name$jscomp$0){type=type||Object;if(!(type.prototype instanceof ee.ComputedObject)){if(type&&type!=Object){if(type==String){type=ee.String;}else{if(type==Number){type=ee.Number;}else{if(type==Array){type=goog.global.ee.List;}else{throw Error("Variables must be of an EE type, e.g. ee.Image or ee.Number.");}}}}else{type=ee.ComputedObject;}}var klass=function(name){this.args=this.func=null;this.varName=name;};klass.prototype=type.prototype;return new klass(name$jscomp$0);};ee.CustomFunction.create=function(func,returnType,arg_types){var stringifyType=function(type){return"string"===typeof type?type:ee.Types.classToName(type);},args=module$contents$goog$array_map(arg_types,function(argType){return{name:null,type:stringifyType(argType)};}),signature={name:"",returns:stringifyType(returnType),args:args};return new ee.CustomFunction(signature,func);};ee.CustomFunction.resolveNamelessArgs_=function(signature,vars,body){for(var namelessArgIndices=[],i=0;i<vars.length;i++){null===vars[i].varName&&namelessArgIndices.push(i);}if(0===namelessArgIndices.length){return signature;}for(var baseName="_MAPPING_VAR_"+function(expression){var countNodes=function(nodes){return nodes.map(countNode).reduce(function(a,b){return a+b;},0);},countNode=function(node){return node.functionDefinitionValue?1:node.arrayValue?countNodes(node.arrayValue.values):node.dictionaryValue?countNodes(Object.values(node.dictionaryValue.values)):node.functionInvocationValue?countNodes(Object.values(node.functionInvocationValue.arguments)):0;};return countNodes(Object.values(expression.values));}(ee.Serializer.encodeCloudApiExpression(body.apply(null,vars),"<unbound>"))+"_",i$64=0;i$64<namelessArgIndices.length;i$64++){var index=namelessArgIndices[i$64],name=baseName+i$64;vars[index].varName=name;signature.args[index].name=name;}return signature;};ee.Date=function(date,opt_tz){if(!(this instanceof ee.Date)){return ee.ComputedObject.construct(ee.Date,arguments);}if(date instanceof ee.Date){return date;}ee.Date.initialize();var jsArgs=ee.arguments.extractFromFunction(ee.Date,arguments);date=jsArgs.date;var tz=jsArgs.tz,func=new ee.ApiFunction("Date"),args={},varName=null;if(ee.Types.isString(date)){if(args.value=date,tz){if(ee.Types.isString(tz)){args.timeZone=tz;}else{throw Error("Invalid argument specified for ee.Date(..., opt_tz): "+tz);}}}else{if(ee.Types.isNumber(date)){args.value=date;}else{if(goog.isDateLike(date)){args.value=Math.floor(date.getTime());}else{if(date instanceof ee.ComputedObject){date.func&&"Date"==date.func.getSignature().returns?(func=date.func,args=date.args,varName=date.varName):args.value=date;}else{throw Error("Invalid argument specified for ee.Date(): "+date);}}}}ee.ComputedObject.call(this,func,args,varName);};goog.inherits(ee.Date,ee.ComputedObject);goog.exportSymbol("ee.Date",ee.Date);ee.Date.initialized_=!1;ee.Date.initialize=function(){ee.Date.initialized_||(ee.ApiFunction.importApi(ee.Date,"Date","Date"),ee.Date.initialized_=!0);};ee.Date.reset=function(){ee.ApiFunction.clearApi(ee.Date);ee.Date.initialized_=!1;};ee.Date.prototype.name=function(){return"Date";};ee.Deserializer=function(){};goog.exportSymbol("ee.Deserializer",ee.Deserializer);ee.Deserializer.fromJSON=function(json){return ee.Deserializer.decode(JSON.parse(json));};goog.exportSymbol("ee.Deserializer.fromJSON",ee.Deserializer.fromJSON);ee.Deserializer.decode=function(json){if("result"in json&&"values"in json){return ee.Deserializer.decodeCloudApi(json);}var namedValues={};if(goog.isObject(json)&&"CompoundValue"===json.type){for(var scopes=json.scope,i=0;i<scopes.length;i++){var key=scopes[i][0],value=scopes[i][1];if(key in namedValues){throw Error('Duplicate scope key "'+key+'" in scope #'+i+".");}namedValues[key]=ee.Deserializer.decodeValue_(value,namedValues);}json=json.value;}return ee.Deserializer.decodeValue_(json,namedValues);};goog.exportSymbol("ee.Deserializer.decode",ee.Deserializer.decode);ee.Deserializer.decodeValue_=function(json,namedValues){if(null===json||"number"===typeof json||"boolean"===typeof json||"string"===typeof json){return json;}if(Array.isArray(json)){return module$contents$goog$array_map(json,function(element){return ee.Deserializer.decodeValue_(element,namedValues);});}if(!goog.isObject(json)||"function"===typeof json){throw Error("Cannot decode object: "+json);}var typeName=json.type;switch(typeName){case"ValueRef":if(json.value in namedValues){return namedValues[json.value];}throw Error("Unknown ValueRef: "+json);case"ArgumentRef":var varName=json.value;if("string"!==typeof varName){throw Error("Invalid variable name: "+varName);}return ee.CustomFunction.variable(Object,varName);case"Date":var microseconds=json.value;if("number"!==typeof microseconds){throw Error("Invalid date value: "+microseconds);}return new ee.Date(microseconds/1000);case"Bytes":return ee.Deserializer.roundTrip_(new module$exports$eeapiclient$ee_api_client.ValueNode({bytesValue:json}),json);case"Invocation":var func="functionName"in json?ee.ApiFunction.lookup(json.functionName):ee.Deserializer.decodeValue_(json["function"],namedValues);var args=module$contents$goog$object_map(json.arguments,function(element){return ee.Deserializer.decodeValue_(element,namedValues);});return ee.Deserializer.invocation_(func,args);case"Dictionary":return module$contents$goog$object_map(json.value,function(element){return ee.Deserializer.decodeValue_(element,namedValues);});case"Function":var body=ee.Deserializer.decodeValue_(json.body,namedValues),signature={name:"",args:module$contents$goog$array_map(json.argumentNames,function(argName){return{name:argName,type:"Object",optional:!1};}),returns:"Object"};return new ee.CustomFunction(signature,function(){return body;});case"Point":case"MultiPoint":case"LineString":case"MultiLineString":case"Polygon":case"MultiPolygon":case"LinearRing":case"GeometryCollection":return new ee.Geometry(json);case"CompoundValue":throw Error("Nested CompoundValues are disallowed.");default:throw Error("Unknown encoded object type: "+typeName);}};ee.Deserializer.roundTrip_=function(node,value){var Reencoder=function(){};$jscomp.inherits(Reencoder,ee.Encodable);Reencoder.prototype.encode=function(encoder){return value;};Reencoder.prototype.encodeCloudValue=function(encoder){return node;};return new Reencoder();};ee.Deserializer.invocation_=function(func,args$jscomp$0){if(func instanceof ee.Function){return func.apply(args$jscomp$0);}if(func instanceof ee.ComputedObject){var ComputedFunction=function(){return ee.Function.apply(this,arguments)||this;};$jscomp.inherits(ComputedFunction,ee.Function);ComputedFunction.prototype.encode=function(encoder){return func.encode(encoder);};ComputedFunction.prototype.encodeCloudInvocation=function(serializer,args){return ee.rpc_node.functionByReference(serializer.makeReference(func),args);};return new ee.ComputedObject(new ComputedFunction(),args$jscomp$0);}throw Error("Invalid function value");};ee.Deserializer.fromCloudApiJSON=function(json){return ee.Deserializer.decodeCloudApi(JSON.parse(json));};goog.exportSymbol("ee.Deserializer.fromCloudApiJSON",ee.Deserializer.fromCloudApiJSON);ee.Deserializer.decodeCloudApi=function(json){var expression=module$contents$eeapiclient$domain_object_deserialize(module$exports$eeapiclient$ee_api_client.Expression,json),decoded={},lookup=function(reference,kind){if(!(reference in decoded)){if(!(reference in expression.values)){throw Error("Cannot find "+kind+" "+reference);}decoded[reference]=decode(expression.values[reference]);}return decoded[reference];},decode=function(node){return null!==node.constantValue?node.constantValue:null!==node.arrayValue?node.arrayValue.values.map(decode):null!==node.dictionaryValue?module$contents$goog$object_map(node.dictionaryValue.values,decode):null!==node.argumentReference?ee.CustomFunction.variable(Object,node.argumentReference):null!==node.functionDefinitionValue?decodeFunctionDefinition(node.functionDefinitionValue):null!==node.functionInvocationValue?decodeFunctionInvocation(node.functionInvocationValue):null!==node.bytesValue?ee.Deserializer.roundTrip_(new module$exports$eeapiclient$ee_api_client.ValueNode({bytesValue:node.bytesValue}),node.bytesValue):null!==node.integerValue?ee.Deserializer.roundTrip_(new module$exports$eeapiclient$ee_api_client.ValueNode({integerValue:node.integerValue}),node.integerValue):null!==node.valueReference?lookup(node.valueReference,"reference"):null;},decodeFunctionDefinition=function(defined){var body=lookup(defined.body,"function body"),signature={args:defined.argumentNames.map(function(name){return{name:name,type:"Object",optional:!1};}),name:"",returns:"Object"};return new ee.CustomFunction(signature,function(){return body;});},decodeFunctionInvocation=function(invoked){var func=invoked.functionReference?lookup(invoked.functionReference,"function"):ee.ApiFunction.lookup(invoked.functionName),args=module$contents$goog$object_map(invoked.arguments,decode);return ee.Deserializer.invocation_(func,args);};return lookup(expression.result,"result value");};goog.exportSymbol("ee.Deserializer.decodeCloudApi",ee.Deserializer.decodeCloudApi);ee.Dictionary=function(opt_dict){if(!(this instanceof ee.Dictionary)){return ee.ComputedObject.construct(ee.Dictionary,arguments);}if(opt_dict instanceof ee.Dictionary){return opt_dict;}ee.Dictionary.initialize();ee.Types.isRegularObject(opt_dict)?(ee.ComputedObject.call(this,null,null),this.dict_=opt_dict):(opt_dict instanceof ee.ComputedObject&&opt_dict.func&&"Dictionary"==opt_dict.func.getSignature().returns?ee.ComputedObject.call(this,opt_dict.func,opt_dict.args,opt_dict.varName):ee.ComputedObject.call(this,new ee.ApiFunction("Dictionary"),{input:opt_dict},null),this.dict_=null);};goog.inherits(ee.Dictionary,ee.ComputedObject);goog.exportSymbol("ee.Dictionary",ee.Dictionary);ee.Dictionary.initialized_=!1;ee.Dictionary.initialize=function(){ee.Dictionary.initialized_||(ee.ApiFunction.importApi(ee.Dictionary,"Dictionary","Dictionary"),ee.Dictionary.initialized_=!0);};ee.Dictionary.reset=function(){ee.ApiFunction.clearApi(ee.Dictionary);ee.Dictionary.initialized_=!1;};ee.Dictionary.prototype.encode=function(encoder){return null!==this.dict_?encoder(this.dict_):ee.Dictionary.superClass_.encode.call(this,encoder);};ee.Dictionary.prototype.encodeCloudValue=function(serializer){return null!==this.dict_?ee.rpc_node.reference(serializer.makeReference(this.dict_)):ee.Dictionary.superClass_.encodeCloudValue.call(this,serializer);};ee.Dictionary.prototype.name=function(){return"Dictionary";};ee.Terrain={};goog.exportSymbol("ee.Terrain",ee.Terrain);ee.Terrain.initialized_=!1;ee.Terrain.initialize=function(){ee.Terrain.initialized_||(ee.ApiFunction.importApi(ee.Terrain,"Terrain","Terrain"),ee.Terrain.initialized_=!0);};ee.Terrain.reset=function(){ee.ApiFunction.clearApi(ee.Terrain);ee.Terrain.initialized_=!1;};ee.initialize=function(opt_baseurl,opt_tileurl,opt_successCallback,opt_errorCallback,opt_xsrfToken,opt_project){if(ee.ready_!=ee.InitState.READY||opt_baseurl||opt_tileurl){var isAsynchronous=null!=opt_successCallback;if(opt_errorCallback){if(isAsynchronous){ee.errorCallbacks_.push(opt_errorCallback);}else{throw Error("Can't pass an error callback without a success callback.");}}if(ee.ready_==ee.InitState.LOADING&&isAsynchronous){ee.successCallbacks_.push(opt_successCallback);}else{if(ee.ready_=ee.InitState.LOADING,ee.data.initialize(opt_baseurl,opt_tileurl,opt_xsrfToken,opt_project),isAsynchronous){ee.successCallbacks_.push(opt_successCallback),ee.ApiFunction.initialize(ee.initializationSuccess_,ee.initializationFailure_);}else{try{ee.ApiFunction.initialize(),ee.initializationSuccess_();}catch(e){throw ee.initializationFailure_(e),e;}}}}else{opt_successCallback&&opt_successCallback();}};goog.exportSymbol("ee.initialize",ee.initialize);ee.reset=function(){ee.ready_=ee.InitState.NOT_READY;ee.data.reset();ee.ApiFunction.reset();ee.Date.reset();ee.Dictionary.reset();ee.Element.reset();ee.Image.reset();ee.Feature.reset();ee.Collection.reset();ee.ImageCollection.reset();ee.FeatureCollection.reset();ee.Filter.reset();ee.Geometry.reset();ee.List.reset();ee.Number.reset();ee.String.reset();ee.Terrain.reset();ee.resetGeneratedClasses_();module$contents$goog$object_clear(ee.Algorithms);};goog.exportSymbol("ee.reset",ee.reset);ee.InitState={NOT_READY:"not_ready",LOADING:"loading",READY:"ready"};goog.exportSymbol("ee.InitState",ee.InitState);goog.exportSymbol("ee.InitState.NOT_READY",ee.InitState.NOT_READY);goog.exportSymbol("ee.InitState.LOADING",ee.InitState.LOADING);goog.exportSymbol("ee.InitState.READY",ee.InitState.READY);ee.ready_=ee.InitState.NOT_READY;ee.successCallbacks_=[];ee.errorCallbacks_=[];ee.TILE_SIZE=256;goog.exportSymbol("ee.TILE_SIZE",ee.TILE_SIZE);ee.generatedClasses_=[];ee.Algorithms={};goog.exportSymbol("ee.Algorithms",ee.Algorithms);ee.ready=function(){return ee.ready_;};ee.call=function(func,var_args){"string"===typeof func&&(func=new ee.ApiFunction(func));var args=Array.prototype.slice.call(arguments,1);return ee.Function.prototype.call.apply(func,args);};goog.exportSymbol("ee.call",ee.call);ee.apply=function(func,namedArgs){"string"===typeof func&&(func=new ee.ApiFunction(func));return func.apply(namedArgs);};goog.exportSymbol("ee.apply",ee.apply);ee.initializationSuccess_=function(){if(ee.ready_==ee.InitState.LOADING){try{ee.Date.initialize(),ee.Dictionary.initialize(),ee.Element.initialize(),ee.Image.initialize(),ee.Feature.initialize(),ee.Collection.initialize(),ee.ImageCollection.initialize(),ee.FeatureCollection.initialize(),ee.Filter.initialize(),ee.Geometry.initialize(),ee.List.initialize(),ee.Number.initialize(),ee.String.initialize(),ee.Terrain.initialize(),ee.initializeGeneratedClasses_(),ee.initializeUnboundMethods_();}catch(e){ee.initializationFailure_(e);return;}ee.ready_=ee.InitState.READY;for(ee.errorCallbacks_=[];0<ee.successCallbacks_.length;){ee.successCallbacks_.shift()();}}};ee.initializationFailure_=function(e){if(ee.ready_==ee.InitState.LOADING){for(ee.ready_=ee.InitState.NOT_READY,ee.successCallbacks_=[];0<ee.errorCallbacks_.length;){ee.errorCallbacks_.shift()(e);}}};ee.promote_=function(arg,klass){if(null===arg){return null;}if(void 0!==arg){var exportedEE=goog.global.ee;switch(klass){case"Image":return new ee.Image(arg);case"Feature":return arg instanceof ee.Collection?ee.ApiFunction._call("Feature",ee.ApiFunction._call("Collection.geometry",arg)):new ee.Feature(arg);case"Element":if(arg instanceof ee.Element){return arg;}if(arg instanceof ee.Geometry){return new ee.Feature(arg);}if(arg instanceof ee.ComputedObject){return new ee.Element(arg.func,arg.args,arg.varName);}throw Error("Cannot convert "+arg+" to Element.");case"Geometry":return arg instanceof ee.FeatureCollection?ee.ApiFunction._call("Collection.geometry",arg):new ee.Geometry(arg);case"FeatureCollection":case"Collection":return arg instanceof ee.Collection?arg:new ee.FeatureCollection(arg);case"ImageCollection":return new ee.ImageCollection(arg);case"Filter":return new ee.Filter(arg);case"Algorithm":if("string"===typeof arg){return new ee.ApiFunction(arg);}if("function"===typeof arg){return ee.CustomFunction.create(arg,"Object",module$contents$goog$array_repeat("Object",arg.length));}if(arg instanceof ee.Encodable){return arg;}throw Error("Argument is not a function: "+arg);case"String":return ee.Types.isString(arg)||arg instanceof ee.String||arg instanceof ee.ComputedObject?new ee.String(arg):arg;case"Dictionary":return ee.Types.isRegularObject(arg)?arg:new ee.Dictionary(arg);case"List":return new ee.List(arg);case"Number":case"Float":case"Long":case"Integer":case"Short":case"Byte":return new ee.Number(arg);default:if(klass in exportedEE){var ctor=ee.ApiFunction.lookupInternal(klass);if(arg instanceof exportedEE[klass]){return arg;}if(ctor){return new exportedEE[klass](arg);}if("string"===typeof arg){if(arg in exportedEE[klass]){return exportedEE[klass][arg].call();}throw Error("Unknown algorithm: "+klass+"."+arg);}return new exportedEE[klass](arg);}return arg;}}};ee.initializeUnboundMethods_=function(){var unbound=ee.ApiFunction.unboundFunctions();module$contents$goog$object_getKeys(unbound).sort().forEach(function(name){var func=unbound[name],signature=func.getSignature();if(!signature.hidden){var nameParts=name.split("."),target=ee.Algorithms;for(target.signature={};1<nameParts.length;){var first=nameParts[0];first in target||(target[first]={signature:{}});target=target[first];nameParts=module$contents$goog$array_slice(nameParts,1);}var bound=function(var_args){return func.callOrApply(void 0,Array.prototype.slice.call(arguments,0));};bound.signature=signature;bound.toString=goog.bind(func.toString,func);target[nameParts[0]]=bound;}});};ee.initializeGeneratedClasses_=function(){var signatures=ee.ApiFunction.allSignatures(),names={},returnTypes={},sig;for(sig in signatures){var type=-1!=sig.indexOf(".")?sig.slice(0,sig.indexOf(".")):sig;names[type]=!0;var rtype=signatures[sig].returns.replace(/<.*>/,"");returnTypes[rtype]=!0;}var exportedEE=goog.global.ee,name;for(name in names){name in returnTypes&&!(name in exportedEE)&&(exportedEE[name]=ee.makeClass_(name),ee.generatedClasses_.push(name),signatures[name]?(exportedEE[name].signature=signatures[name],exportedEE[name].signature.isConstructor=!0,ee.ApiFunction.boundSignatures_[name]=!0):exportedEE[name].signature={});}ee.Types.registerClasses(exportedEE);};ee.resetGeneratedClasses_=function(){for(var exportedEE=goog.global.ee,i=0;i<ee.generatedClasses_.length;i++){var name=ee.generatedClasses_[i];ee.ApiFunction.clearApi(exportedEE[name]);delete exportedEE[name];}ee.generatedClasses_=[];ee.Types.registerClasses(exportedEE);};ee.makeClass_=function(name){var target=function(var_args){var klass=goog.global.ee[name],args=Array.prototype.slice.call(arguments),onlyOneArg=1==args.length;if(onlyOneArg&&args[0]instanceof klass){return args[0];}if(!(this instanceof klass)){return ee.ComputedObject.construct(klass,args);}var ctor=ee.ApiFunction.lookupInternal(name),firstArgIsPrimitive=!(args[0]instanceof ee.ComputedObject),shouldUseConstructor=!1;ctor&&(onlyOneArg?firstArgIsPrimitive?shouldUseConstructor=!0:args[0].func&&args[0].func.getSignature().returns==ctor.getSignature().returns||(shouldUseConstructor=!0):shouldUseConstructor=!0);if(shouldUseConstructor){var namedArgs=ee.Types.useKeywordArgs(args,ctor.getSignature())?args[0]:ctor.nameArgs(args);ee.ComputedObject.call(this,ctor,ctor.promoteArgs(namedArgs));}else{if(!onlyOneArg){throw Error("Too many arguments for ee."+name+"(): "+args);}if(firstArgIsPrimitive){throw Error("Invalid argument for ee."+name+"(): "+args+". Must be a ComputedObject.");}var theOneArg=args[0];ee.ComputedObject.call(this,theOneArg.func,theOneArg.args,theOneArg.varName);}};goog.inherits(target,ee.ComputedObject);target.prototype.name=function(){return name;};ee.ApiFunction.importApi(target,name,name);return target;};ee.Function.registerPromoter(ee.promote_);ee.FloatTileOverlay=function(url,mapId,token){ee.AbstractOverlay.call(this,url,mapId,token);this.tileSize=new google.maps.Size(ee.FloatTileOverlay.TILE_EDGE_LENGTH,ee.FloatTileOverlay.TILE_EDGE_LENGTH);this.floatTiles_=new goog.structs.Map();this.floatTileDivs_=new goog.structs.Map();};$jscomp.inherits(ee.FloatTileOverlay,ee.AbstractOverlay);ee.FloatTileOverlay.prototype.getTile=function(coord,zoom,ownerDocument){var tileId=this.getTileId(coord,zoom),src=[this.url,tileId].join("/")+"?token="+this.token,uniqueTileId=[tileId,this.tileCounter,this.token].join("/");this.tilesLoading.push(uniqueTileId);this.tileCounter+=1;var div=goog.dom.createDom(goog.dom.TagName.DIV),floatTile=this.loadFloatTile_(src,coord,uniqueTileId,div);this.dispatchTileEvent_();return div;};ee.FloatTileOverlay.prototype.loadFloatTile_=function(tileUrl,coord,tileId,div){var tileRequest=goog.net.XmlHttp();tileRequest.open("GET",tileUrl,!0);tileRequest.responseType="arraybuffer";tileRequest.onreadystatechange=goog.bind(function(){if(tileRequest.readyState===XMLHttpRequest.DONE&&200===tileRequest.status){var tileResponse=tileRequest.response;if(tileResponse){var floatBuffer=new Float32Array(tileResponse);this.handleFloatTileLoaded_(floatBuffer,coord,tileId,div);}else{throw this.tilesFailed.add(tileId),Error("Unable to request floating point array buffers.");}}},this);tileRequest.send();};ee.FloatTileOverlay.prototype.handleFloatTileLoaded_=function(floatTile,coord,tileId,div){this.floatTiles_.set(coord,floatTile);this.floatTileDivs_.set(coord,div);module$contents$goog$array_remove(this.tilesLoading,tileId);this.dispatchTileEvent_();};ee.FloatTileOverlay.prototype.getAllFloatTiles=function(){return this.floatTiles_;};ee.FloatTileOverlay.prototype.getAllFloatTileDivs=function(){return this.floatTileDivs_;};ee.FloatTileOverlay.prototype.getLoadedFloatTilesCount=function(){return this.floatTiles_.getCount();};ee.FloatTileOverlay.prototype.dispatchTileEvent_=function(){this.dispatchEvent(new ee.TileEvent(this.tilesLoading.length));};ee.FloatTileOverlay.prototype.disposeInternal=function(){this.floatTileDivs_=this.floatTiles_=null;ee.AbstractOverlay.prototype.disposeInternal.call(this);};goog.exportSymbol("ee.FloatTileOverlay",ee.FloatTileOverlay);ee.FloatTileOverlay.TILE_EDGE_LENGTH=256;ee.layers={};var module$contents$ee$layers$AbstractOverlayStats_AbstractOverlayStats=function(uniqueId){this.statsByZoom_=new Map();this.uniqueId_=uniqueId;};module$contents$ee$layers$AbstractOverlayStats_AbstractOverlayStats.prototype.addTileStats=function(start,end,zoom){this.getStatsForZoom_(zoom).tileLatencies.push(end-start);};module$contents$ee$layers$AbstractOverlayStats_AbstractOverlayStats.prototype.incrementThrottleCounter=function(zoom){this.getStatsForZoom_(zoom).throttleCount++;};module$contents$ee$layers$AbstractOverlayStats_AbstractOverlayStats.prototype.incrementErrorCounter=function(zoom){this.getStatsForZoom_(zoom).errorCount++;};module$contents$ee$layers$AbstractOverlayStats_AbstractOverlayStats.prototype.clear=function(){this.statsByZoom_.clear();};module$contents$ee$layers$AbstractOverlayStats_AbstractOverlayStats.prototype.hasData=function(){return 0<this.statsByZoom_.size;};module$contents$ee$layers$AbstractOverlayStats_AbstractOverlayStats.prototype.getSummaryList=function(){var $jscomp$this=this,summaryList=[];this.statsByZoom_.forEach(function(stats,zoom){return summaryList.push({layerId:$jscomp$this.uniqueId_,zoomLevel:zoom,tileLatencies:stats.tileLatencies,throttleCount:stats.throttleCount,errorCount:stats.errorCount});});return summaryList;};module$contents$ee$layers$AbstractOverlayStats_AbstractOverlayStats.prototype.getStatsForZoom_=function(zoom){this.statsByZoom_.has(zoom)||this.statsByZoom_.set(zoom,{throttleCount:0,errorCount:0,tileLatencies:[]});return this.statsByZoom_.get(zoom);};module$contents$ee$layers$AbstractOverlayStats_AbstractOverlayStats.LayerStatsForZoomLevel=function(){};module$contents$ee$layers$AbstractOverlayStats_AbstractOverlayStats.Summary=function(){};ee.layers.AbstractOverlayStats=module$contents$ee$layers$AbstractOverlayStats_AbstractOverlayStats;goog.events.EventHandler=function(opt_scope){goog.Disposable.call(this);this.handler_=opt_scope;this.keys_={};};goog.inherits(goog.events.EventHandler,goog.Disposable);goog.events.EventHandler.typeArray_=[];goog.events.EventHandler.prototype.listen=function(src,type,opt_fn,opt_options){return this.listen_(src,type,opt_fn,opt_options);};goog.events.EventHandler.prototype.listenWithScope=function(src,type,fn,options,scope){return this.listen_(src,type,fn,options,scope);};goog.events.EventHandler.prototype.listen_=function(src,type,opt_fn,opt_options,opt_scope){Array.isArray(type)||(type&&(goog.events.EventHandler.typeArray_[0]=type.toString()),type=goog.events.EventHandler.typeArray_);for(var i=0;i<type.length;i++){var listenerObj=goog.events.listen(src,type[i],opt_fn||this.handleEvent,opt_options||!1,opt_scope||this.handler_||this);if(!listenerObj){break;}this.keys_[listenerObj.key]=listenerObj;}return this;};goog.events.EventHandler.prototype.listenOnce=function(src,type,opt_fn,opt_options){return this.listenOnce_(src,type,opt_fn,opt_options);};goog.events.EventHandler.prototype.listenOnceWithScope=function(src,type,fn,capture,scope){return this.listenOnce_(src,type,fn,capture,scope);};goog.events.EventHandler.prototype.listenOnce_=function(src,type,opt_fn,opt_options,opt_scope){if(Array.isArray(type)){for(var i=0;i<type.length;i++){this.listenOnce_(src,type[i],opt_fn,opt_options,opt_scope);}}else{var listenerObj=goog.events.listenOnce(src,type,opt_fn||this.handleEvent,opt_options,opt_scope||this.handler_||this);if(!listenerObj){return this;}this.keys_[listenerObj.key]=listenerObj;}return this;};goog.events.EventHandler.prototype.listenWithWrapper=function(src,wrapper,listener,opt_capt){return this.listenWithWrapper_(src,wrapper,listener,opt_capt);};goog.events.EventHandler.prototype.listenWithWrapperAndScope=function(src,wrapper,listener,capture,scope){return this.listenWithWrapper_(src,wrapper,listener,capture,scope);};goog.events.EventHandler.prototype.listenWithWrapper_=function(src,wrapper,listener,opt_capt,opt_scope){wrapper.listen(src,listener,opt_capt,opt_scope||this.handler_||this,this);return this;};goog.events.EventHandler.prototype.getListenerCount=function(){var count=0,key;for(key in this.keys_){Object.prototype.hasOwnProperty.call(this.keys_,key)&&count++;}return count;};goog.events.EventHandler.prototype.unlisten=function(src,type,opt_fn,opt_options,opt_scope){if(Array.isArray(type)){for(var i=0;i<type.length;i++){this.unlisten(src,type[i],opt_fn,opt_options,opt_scope);}}else{var listener=goog.events.getListener(src,type,opt_fn||this.handleEvent,goog.isObject(opt_options)?!!opt_options.capture:!!opt_options,opt_scope||this.handler_||this);listener&&(goog.events.unlistenByKey(listener),delete this.keys_[listener.key]);}return this;};goog.events.EventHandler.prototype.unlistenWithWrapper=function(src,wrapper,listener,opt_capt,opt_scope){wrapper.unlisten(src,listener,opt_capt,opt_scope||this.handler_||this,this);return this;};goog.events.EventHandler.prototype.removeAll=function(){module$contents$goog$object_forEach(this.keys_,function(listenerObj,key){this.keys_.hasOwnProperty(key)&&goog.events.unlistenByKey(listenerObj);},this);this.keys_={};};goog.events.EventHandler.prototype.disposeInternal=function(){goog.events.EventHandler.superClass_.disposeInternal.call(this);this.removeAll();};goog.events.EventHandler.prototype.handleEvent=function(e){throw Error("EventHandler.handleEvent not implemented");};goog.fs.DOMErrorLike=function(){};goog.fs.Error=function(error,action){if(void 0!==error.name){this.name=error.name,this.code=goog.fs.Error.getCodeFromName_(error.name);}else{var code=goog.asserts.assertNumber(error.code);this.code=code;this.name=goog.fs.Error.getNameFromCode_(code);}module$contents$goog$debug$Error_DebugError.call(this,goog.string.subs("%s %s",this.name,action));};goog.inherits(goog.fs.Error,module$contents$goog$debug$Error_DebugError);goog.fs.Error.ErrorName={ABORT:"AbortError",ENCODING:"EncodingError",INVALID_MODIFICATION:"InvalidModificationError",INVALID_STATE:"InvalidStateError",NOT_FOUND:"NotFoundError",NOT_READABLE:"NotReadableError",NO_MODIFICATION_ALLOWED:"NoModificationAllowedError",PATH_EXISTS:"PathExistsError",QUOTA_EXCEEDED:"QuotaExceededError",SECURITY:"SecurityError",SYNTAX:"SyntaxError",TYPE_MISMATCH:"TypeMismatchError"};goog.fs.Error.ErrorCode={NOT_FOUND:1,SECURITY:2,ABORT:3,NOT_READABLE:4,ENCODING:5,NO_MODIFICATION_ALLOWED:6,INVALID_STATE:7,SYNTAX:8,INVALID_MODIFICATION:9,QUOTA_EXCEEDED:10,TYPE_MISMATCH:11,PATH_EXISTS:12};goog.fs.Error.getNameFromCode_=function(code){var name=module$contents$goog$object_findKey(goog.fs.Error.NameToCodeMap_,function(c){return code==c;});if(void 0===name){throw Error("Invalid code: "+code);}return name;};goog.fs.Error.getCodeFromName_=function(name){return goog.fs.Error.NameToCodeMap_[name];};var $jscomp$compprop4={};goog.fs.Error.NameToCodeMap_=($jscomp$compprop4[goog.fs.Error.ErrorName.ABORT]=goog.fs.Error.ErrorCode.ABORT,$jscomp$compprop4[goog.fs.Error.ErrorName.ENCODING]=goog.fs.Error.ErrorCode.ENCODING,$jscomp$compprop4[goog.fs.Error.ErrorName.INVALID_MODIFICATION]=goog.fs.Error.ErrorCode.INVALID_MODIFICATION,$jscomp$compprop4[goog.fs.Error.ErrorName.INVALID_STATE]=goog.fs.Error.ErrorCode.INVALID_STATE,$jscomp$compprop4[goog.fs.Error.ErrorName.NOT_FOUND]=goog.fs.Error.ErrorCode.NOT_FOUND,$jscomp$compprop4[goog.fs.Error.ErrorName.NOT_READABLE]=goog.fs.Error.ErrorCode.NOT_READABLE,$jscomp$compprop4[goog.fs.Error.ErrorName.NO_MODIFICATION_ALLOWED]=goog.fs.Error.ErrorCode.NO_MODIFICATION_ALLOWED,$jscomp$compprop4[goog.fs.Error.ErrorName.PATH_EXISTS]=goog.fs.Error.ErrorCode.PATH_EXISTS,$jscomp$compprop4[goog.fs.Error.ErrorName.QUOTA_EXCEEDED]=goog.fs.Error.ErrorCode.QUOTA_EXCEEDED,$jscomp$compprop4[goog.fs.Error.ErrorName.SECURITY]=goog.fs.Error.ErrorCode.SECURITY,$jscomp$compprop4[goog.fs.Error.ErrorName.SYNTAX]=goog.fs.Error.ErrorCode.SYNTAX,$jscomp$compprop4[goog.fs.Error.ErrorName.TYPE_MISMATCH]=goog.fs.Error.ErrorCode.TYPE_MISMATCH,$jscomp$compprop4);goog.fs.ProgressEvent=function(event,target){goog.events.Event.call(this,event.type,target);this.event_=event;};goog.inherits(goog.fs.ProgressEvent,goog.events.Event);goog.fs.ProgressEvent.prototype.isLengthComputable=function(){return this.event_.lengthComputable;};goog.fs.ProgressEvent.prototype.getLoaded=function(){return this.event_.loaded;};goog.fs.ProgressEvent.prototype.getTotal=function(){return this.event_.total;};goog.fs.FileReader=function(){goog.events.EventTarget.call(this);this.reader_=new FileReader();this.reader_.onloadstart=goog.bind(this.dispatchProgressEvent_,this);this.reader_.onprogress=goog.bind(this.dispatchProgressEvent_,this);this.reader_.onload=goog.bind(this.dispatchProgressEvent_,this);this.reader_.onabort=goog.bind(this.dispatchProgressEvent_,this);this.reader_.onerror=goog.bind(this.dispatchProgressEvent_,this);this.reader_.onloadend=goog.bind(this.dispatchProgressEvent_,this);};goog.inherits(goog.fs.FileReader,goog.events.EventTarget);goog.fs.FileReader.ReadyState={INIT:0,LOADING:1,DONE:2};goog.fs.FileReader.EventType={LOAD_START:"loadstart",PROGRESS:"progress",LOAD:"load",ABORT:"abort",ERROR:"error",LOAD_END:"loadend"};goog.fs.FileReader.prototype.abort=function(){try{this.reader_.abort();}catch(e){throw new goog.fs.Error(e,"aborting read");}};goog.fs.FileReader.prototype.getReadyState=function(){return this.reader_.readyState;};goog.fs.FileReader.prototype.getResult=function(){return this.reader_.result;};goog.fs.FileReader.prototype.getError=function(){return this.reader_.error&&new goog.fs.Error(this.reader_.error,"reading file");};goog.fs.FileReader.prototype.dispatchProgressEvent_=function(event){this.dispatchEvent(new goog.fs.ProgressEvent(event,this));};goog.fs.FileReader.prototype.disposeInternal=function(){goog.fs.FileReader.superClass_.disposeInternal.call(this);delete this.reader_;};goog.fs.FileReader.prototype.readAsBinaryString=function(blob){this.reader_.readAsBinaryString(blob);};goog.fs.FileReader.readAsBinaryString=function(blob){var reader=new goog.fs.FileReader(),d=goog.fs.FileReader.createDeferred_(reader);reader.readAsBinaryString(blob);return d;};goog.fs.FileReader.prototype.readAsArrayBuffer=function(blob){this.reader_.readAsArrayBuffer(blob);};goog.fs.FileReader.readAsArrayBuffer=function(blob){var reader=new goog.fs.FileReader(),d=goog.fs.FileReader.createDeferred_(reader);reader.readAsArrayBuffer(blob);return d;};goog.fs.FileReader.prototype.readAsText=function(blob,opt_encoding){this.reader_.readAsText(blob,opt_encoding);};goog.fs.FileReader.readAsText=function(blob,opt_encoding){var reader=new goog.fs.FileReader(),d=goog.fs.FileReader.createDeferred_(reader);reader.readAsText(blob,opt_encoding);return d;};goog.fs.FileReader.prototype.readAsDataUrl=function(blob){this.reader_.readAsDataURL(blob);};goog.fs.FileReader.readAsDataUrl=function(blob){var reader=new goog.fs.FileReader(),d=goog.fs.FileReader.createDeferred_(reader);reader.readAsDataUrl(blob);return d;};goog.fs.FileReader.createDeferred_=function(reader){var deferred=new goog.async.Deferred();reader.listen(goog.fs.FileReader.EventType.LOAD_END,goog.partial(function(d,r,e){var result=r.getResult(),error=r.getError();null==result||error?d.errback(error):d.callback(result);r.dispose();},deferred,reader));return deferred;};goog.dom.vendor={};goog.dom.vendor.getVendorJsPrefix=function(){return goog.userAgent.WEBKIT?"Webkit":goog.userAgent.GECKO?"Moz":goog.userAgent.IE?"ms":null;};goog.dom.vendor.getVendorPrefix=function(){return goog.userAgent.WEBKIT?"-webkit":goog.userAgent.GECKO?"-moz":goog.userAgent.IE?"-ms":null;};goog.dom.vendor.getPrefixedPropertyName=function(propertyName,opt_object){if(opt_object&&propertyName in opt_object){return propertyName;}var prefix=goog.dom.vendor.getVendorJsPrefix();if(prefix){prefix=prefix.toLowerCase();var prefixedPropertyName=prefix+goog.string.toTitleCase(propertyName);return void 0===opt_object||prefixedPropertyName in opt_object?prefixedPropertyName:null;}return null;};goog.dom.vendor.getPrefixedEventType=function(eventType){return((goog.dom.vendor.getVendorJsPrefix()||"")+eventType).toLowerCase();};goog.math.Box=function(top,right,bottom,left){this.top=top;this.right=right;this.bottom=bottom;this.left=left;};goog.math.Box.boundingBox=function(var_args){for(var box=new goog.math.Box(arguments[0].y,arguments[0].x,arguments[0].y,arguments[0].x),i=1;i<arguments.length;i++){box.expandToIncludeCoordinate(arguments[i]);}return box;};goog.math.Box.prototype.getWidth=function(){return this.right-this.left;};goog.math.Box.prototype.getHeight=function(){return this.bottom-this.top;};goog.math.Box.prototype.clone=function(){return new goog.math.Box(this.top,this.right,this.bottom,this.left);};goog.DEBUG&&(goog.math.Box.prototype.toString=function(){return"("+this.top+"t, "+this.right+"r, "+this.bottom+"b, "+this.left+"l)";});goog.math.Box.prototype.contains=function(other){return goog.math.Box.contains(this,other);};goog.math.Box.prototype.expand=function(top,opt_right,opt_bottom,opt_left){goog.isObject(top)?(this.top-=top.top,this.right+=top.right,this.bottom+=top.bottom,this.left-=top.left):(this.top-=top,this.right+=Number(opt_right),this.bottom+=Number(opt_bottom),this.left-=Number(opt_left));return this;};goog.math.Box.prototype.expandToInclude=function(box){this.left=Math.min(this.left,box.left);this.top=Math.min(this.top,box.top);this.right=Math.max(this.right,box.right);this.bottom=Math.max(this.bottom,box.bottom);};goog.math.Box.prototype.expandToIncludeCoordinate=function(coord){this.top=Math.min(this.top,coord.y);this.right=Math.max(this.right,coord.x);this.bottom=Math.max(this.bottom,coord.y);this.left=Math.min(this.left,coord.x);};goog.math.Box.equals=function(a,b){return a==b?!0:a&&b?a.top==b.top&&a.right==b.right&&a.bottom==b.bottom&&a.left==b.left:!1;};goog.math.Box.contains=function(box,other){return box&&other?other instanceof goog.math.Box?other.left>=box.left&&other.right<=box.right&&other.top>=box.top&&other.bottom<=box.bottom:other.x>=box.left&&other.x<=box.right&&other.y>=box.top&&other.y<=box.bottom:!1;};goog.math.Box.relativePositionX=function(box,coord){return coord.x<box.left?coord.x-box.left:coord.x>box.right?coord.x-box.right:0;};goog.math.Box.relativePositionY=function(box,coord){return coord.y<box.top?coord.y-box.top:coord.y>box.bottom?coord.y-box.bottom:0;};goog.math.Box.distance=function(box,coord){var x=goog.math.Box.relativePositionX(box,coord),y=goog.math.Box.relativePositionY(box,coord);return Math.sqrt(x*x+y*y);};goog.math.Box.intersects=function(a,b){return a.left<=b.right&&b.left<=a.right&&a.top<=b.bottom&&b.top<=a.bottom;};goog.math.Box.intersectsWithPadding=function(a,b,padding){return a.left<=b.right+padding&&b.left<=a.right+padding&&a.top<=b.bottom+padding&&b.top<=a.bottom+padding;};goog.math.Box.prototype.ceil=function(){this.top=Math.ceil(this.top);this.right=Math.ceil(this.right);this.bottom=Math.ceil(this.bottom);this.left=Math.ceil(this.left);return this;};goog.math.Box.prototype.floor=function(){this.top=Math.floor(this.top);this.right=Math.floor(this.right);this.bottom=Math.floor(this.bottom);this.left=Math.floor(this.left);return this;};goog.math.Box.prototype.round=function(){this.top=Math.round(this.top);this.right=Math.round(this.right);this.bottom=Math.round(this.bottom);this.left=Math.round(this.left);return this;};goog.math.Box.prototype.translate=function(tx,opt_ty){tx instanceof goog.math.Coordinate?(this.left+=tx.x,this.right+=tx.x,this.top+=tx.y,this.bottom+=tx.y):(goog.asserts.assertNumber(tx),this.left+=tx,this.right+=tx,"number"===typeof opt_ty&&(this.top+=opt_ty,this.bottom+=opt_ty));return this;};goog.math.Box.prototype.scale=function(sx,opt_sy){var sy="number"===typeof opt_sy?opt_sy:sx;this.left*=sx;this.right*=sx;this.top*=sy;this.bottom*=sy;return this;};goog.math.IRect=function(){};goog.math.Rect=function(x,y,w,h){this.left=x;this.top=y;this.width=w;this.height=h;};goog.math.Rect.prototype.clone=function(){return new goog.math.Rect(this.left,this.top,this.width,this.height);};goog.math.Rect.prototype.toBox=function(){return new goog.math.Box(this.top,this.left+this.width,this.top+this.height,this.left);};goog.math.Rect.createFromPositionAndSize=function(position,size){return new goog.math.Rect(position.x,position.y,size.width,size.height);};goog.math.Rect.createFromBox=function(box){return new goog.math.Rect(box.left,box.top,box.right-box.left,box.bottom-box.top);};goog.DEBUG&&(goog.math.Rect.prototype.toString=function(){return"("+this.left+", "+this.top+" - "+this.width+"w x "+this.height+"h)";});goog.math.Rect.equals=function(a,b){return a==b?!0:a&&b?a.left==b.left&&a.width==b.width&&a.top==b.top&&a.height==b.height:!1;};goog.math.Rect.prototype.intersection=function(rect){var x0=Math.max(this.left,rect.left),x1=Math.min(this.left+this.width,rect.left+rect.width);if(x0<=x1){var y0=Math.max(this.top,rect.top),y1=Math.min(this.top+this.height,rect.top+rect.height);if(y0<=y1){return this.left=x0,this.top=y0,this.width=x1-x0,this.height=y1-y0,!0;}}return!1;};goog.math.Rect.intersection=function(a,b){var x0=Math.max(a.left,b.left),x1=Math.min(a.left+a.width,b.left+b.width);if(x0<=x1){var y0=Math.max(a.top,b.top),y1=Math.min(a.top+a.height,b.top+b.height);if(y0<=y1){return new goog.math.Rect(x0,y0,x1-x0,y1-y0);}}return null;};goog.math.Rect.intersects=function(a,b){return a.left<=b.left+b.width&&b.left<=a.left+a.width&&a.top<=b.top+b.height&&b.top<=a.top+a.height;};goog.math.Rect.prototype.intersects=function(rect){return goog.math.Rect.intersects(this,rect);};goog.math.Rect.difference=function(a,b){var intersection=goog.math.Rect.intersection(a,b);if(!intersection||!intersection.height||!intersection.width){return[a.clone()];}var result=[],top=a.top,height=a.height,ar=a.left+a.width,ab=a.top+a.height,br=b.left+b.width,bb=b.top+b.height;b.top>a.top&&(result.push(new goog.math.Rect(a.left,a.top,a.width,b.top-a.top)),top=b.top,height-=b.top-a.top);bb<ab&&(result.push(new goog.math.Rect(a.left,bb,a.width,ab-bb)),height=bb-top);b.left>a.left&&result.push(new goog.math.Rect(a.left,top,b.left-a.left,height));br<ar&&result.push(new goog.math.Rect(br,top,ar-br,height));return result;};goog.math.Rect.prototype.difference=function(rect){return goog.math.Rect.difference(this,rect);};goog.math.Rect.prototype.boundingRect=function(rect){var right=Math.max(this.left+this.width,rect.left+rect.width),bottom=Math.max(this.top+this.height,rect.top+rect.height);this.left=Math.min(this.left,rect.left);this.top=Math.min(this.top,rect.top);this.width=right-this.left;this.height=bottom-this.top;};goog.math.Rect.boundingRect=function(a,b){if(!a||!b){return null;}var newRect=new goog.math.Rect(a.left,a.top,a.width,a.height);newRect.boundingRect(b);return newRect;};goog.math.Rect.prototype.contains=function(another){return another instanceof goog.math.Coordinate?another.x>=this.left&&another.x<=this.left+this.width&&another.y>=this.top&&another.y<=this.top+this.height:this.left<=another.left&&this.left+this.width>=another.left+another.width&&this.top<=another.top&&this.top+this.height>=another.top+another.height;};goog.math.Rect.prototype.squaredDistance=function(point){var dx=point.x<this.left?this.left-point.x:Math.max(point.x-(this.left+this.width),0),dy=point.y<this.top?this.top-point.y:Math.max(point.y-(this.top+this.height),0);return dx*dx+dy*dy;};goog.math.Rect.prototype.distance=function(point){return Math.sqrt(this.squaredDistance(point));};goog.math.Rect.prototype.getSize=function(){return new goog.math.Size(this.width,this.height);};goog.math.Rect.prototype.getTopLeft=function(){return new goog.math.Coordinate(this.left,this.top);};goog.math.Rect.prototype.getCenter=function(){return new goog.math.Coordinate(this.left+this.width/2,this.top+this.height/2);};goog.math.Rect.prototype.getBottomRight=function(){return new goog.math.Coordinate(this.left+this.width,this.top+this.height);};goog.math.Rect.prototype.ceil=function(){this.left=Math.ceil(this.left);this.top=Math.ceil(this.top);this.width=Math.ceil(this.width);this.height=Math.ceil(this.height);return this;};goog.math.Rect.prototype.floor=function(){this.left=Math.floor(this.left);this.top=Math.floor(this.top);this.width=Math.floor(this.width);this.height=Math.floor(this.height);return this;};goog.math.Rect.prototype.round=function(){this.left=Math.round(this.left);this.top=Math.round(this.top);this.width=Math.round(this.width);this.height=Math.round(this.height);return this;};goog.math.Rect.prototype.translate=function(tx,opt_ty){tx instanceof goog.math.Coordinate?(this.left+=tx.x,this.top+=tx.y):(this.left+=goog.asserts.assertNumber(tx),"number"===typeof opt_ty&&(this.top+=opt_ty));return this;};goog.math.Rect.prototype.scale=function(sx,opt_sy){var sy="number"===typeof opt_sy?opt_sy:sx;this.left*=sx;this.width*=sx;this.top*=sy;this.height*=sy;return this;};goog.style={};goog.style.setStyle=function(element,style,opt_value){if("string"===typeof style){goog.style.setStyle_(element,opt_value,style);}else{for(var key in style){goog.style.setStyle_(element,style[key],key);}}};goog.style.setStyle_=function(element,value,style){var propertyName=goog.style.getVendorJsStyleName_(element,style);propertyName&&(element.style[propertyName]=value);};goog.style.styleNameCache_={};goog.style.getVendorJsStyleName_=function(element,style){var propertyName=goog.style.styleNameCache_[style];if(!propertyName){var camelStyle=goog.string.toCamelCase(style);propertyName=camelStyle;if(void 0===element.style[camelStyle]){var prefixedStyle=goog.dom.vendor.getVendorJsPrefix()+goog.string.toTitleCase(camelStyle);void 0!==element.style[prefixedStyle]&&(propertyName=prefixedStyle);}goog.style.styleNameCache_[style]=propertyName;}return propertyName;};goog.style.getVendorStyleName_=function(element,style){var camelStyle=goog.string.toCamelCase(style);if(void 0===element.style[camelStyle]){var prefixedStyle=goog.dom.vendor.getVendorJsPrefix()+goog.string.toTitleCase(camelStyle);if(void 0!==element.style[prefixedStyle]){return goog.dom.vendor.getVendorPrefix()+"-"+style;}}return style;};goog.style.getStyle=function(element,property){var styleValue=element.style[goog.string.toCamelCase(property)];return"undefined"!==typeof styleValue?styleValue:element.style[goog.style.getVendorJsStyleName_(element,property)]||"";};goog.style.getComputedStyle=function(element,property){var doc=goog.dom.getOwnerDocument(element);if(doc.defaultView&&doc.defaultView.getComputedStyle){var styles=doc.defaultView.getComputedStyle(element,null);if(styles){return styles[property]||styles.getPropertyValue(property)||"";}}return"";};goog.style.getCascadedStyle=function(element,style){return element.currentStyle?element.currentStyle[style]:null;};goog.style.getStyle_=function(element,style){return goog.style.getComputedStyle(element,style)||goog.style.getCascadedStyle(element,style)||element.style&&element.style[style];};goog.style.getComputedBoxSizing=function(element){return goog.style.getStyle_(element,"boxSizing")||goog.style.getStyle_(element,"MozBoxSizing")||goog.style.getStyle_(element,"WebkitBoxSizing")||null;};goog.style.getComputedPosition=function(element){return goog.style.getStyle_(element,"position");};goog.style.getBackgroundColor=function(element){return goog.style.getStyle_(element,"backgroundColor");};goog.style.getComputedOverflowX=function(element){return goog.style.getStyle_(element,"overflowX");};goog.style.getComputedOverflowY=function(element){return goog.style.getStyle_(element,"overflowY");};goog.style.getComputedZIndex=function(element){return goog.style.getStyle_(element,"zIndex");};goog.style.getComputedTextAlign=function(element){return goog.style.getStyle_(element,"textAlign");};goog.style.getComputedCursor=function(element){return goog.style.getStyle_(element,"cursor");};goog.style.getComputedTransform=function(element){var property=goog.style.getVendorStyleName_(element,"transform");return goog.style.getStyle_(element,property)||goog.style.getStyle_(element,"transform");};goog.style.setPosition=function(el,arg1,opt_arg2){if(arg1 instanceof goog.math.Coordinate){var x=arg1.x;var y=arg1.y;}else{x=arg1,y=opt_arg2;}el.style.left=goog.style.getPixelStyleValue_(x,!1);el.style.top=goog.style.getPixelStyleValue_(y,!1);};goog.style.getPosition=function(element){return new goog.math.Coordinate(element.offsetLeft,element.offsetTop);};goog.style.getClientViewportElement=function(opt_node){var doc=opt_node?goog.dom.getOwnerDocument(opt_node):goog.dom.getDocument();return!goog.userAgent.IE||goog.userAgent.isDocumentModeOrHigher(9)||goog.dom.getDomHelper(doc).isCss1CompatMode()?doc.documentElement:doc.body;};goog.style.getViewportPageOffset=function(doc){var body=doc.body,documentElement=doc.documentElement;return new goog.math.Coordinate(body.scrollLeft||documentElement.scrollLeft,body.scrollTop||documentElement.scrollTop);};goog.style.getBoundingClientRect_=function(el){try{return el.getBoundingClientRect();}catch(e){return{left:0,top:0,right:0,bottom:0};}};goog.style.getOffsetParent=function(element){if(goog.userAgent.IE&&!goog.userAgent.isDocumentModeOrHigher(8)){return goog.asserts.assert(element&&"offsetParent"in element),element.offsetParent;}for(var doc=goog.dom.getOwnerDocument(element),positionStyle=goog.style.getStyle_(element,"position"),skipStatic="fixed"==positionStyle||"absolute"==positionStyle,parent=element.parentNode;parent&&parent!=doc;parent=parent.parentNode){if(parent.nodeType==goog.dom.NodeType.DOCUMENT_FRAGMENT&&parent.host&&(parent=parent.host),positionStyle=goog.style.getStyle_(parent,"position"),skipStatic=skipStatic&&"static"==positionStyle&&parent!=doc.documentElement&&parent!=doc.body,!skipStatic&&(parent.scrollWidth>parent.clientWidth||parent.scrollHeight>parent.clientHeight||"fixed"==positionStyle||"absolute"==positionStyle||"relative"==positionStyle)){return parent;}}return null;};goog.style.getVisibleRectForElement=function(element){for(var visibleRect=new goog.math.Box(0,Infinity,Infinity,0),dom=goog.dom.getDomHelper(element),body=dom.getDocument().body,documentElement=dom.getDocument().documentElement,scrollEl=dom.getDocumentScrollElement(),el=element;el=goog.style.getOffsetParent(el);){if(!(goog.userAgent.IE&&0==el.clientWidth||goog.userAgent.WEBKIT&&0==el.clientHeight&&el==body)&&el!=body&&el!=documentElement&&"visible"!=goog.style.getStyle_(el,"overflow")){var pos=goog.style.getPageOffset(el),client=goog.style.getClientLeftTop(el);pos.x+=client.x;pos.y+=client.y;visibleRect.top=Math.max(visibleRect.top,pos.y);visibleRect.right=Math.min(visibleRect.right,pos.x+el.clientWidth);visibleRect.bottom=Math.min(visibleRect.bottom,pos.y+el.clientHeight);visibleRect.left=Math.max(visibleRect.left,pos.x);}}var scrollX=scrollEl.scrollLeft,scrollY=scrollEl.scrollTop;visibleRect.left=Math.max(visibleRect.left,scrollX);visibleRect.top=Math.max(visibleRect.top,scrollY);var winSize=dom.getViewportSize();visibleRect.right=Math.min(visibleRect.right,scrollX+winSize.width);visibleRect.bottom=Math.min(visibleRect.bottom,scrollY+winSize.height);return 0<=visibleRect.top&&0<=visibleRect.left&&visibleRect.bottom>visibleRect.top&&visibleRect.right>visibleRect.left?visibleRect:null;};goog.style.getContainerOffsetToScrollInto=function(element,opt_container,opt_center){var container=opt_container||goog.dom.getDocumentScrollElement(),elementPos=goog.style.getPageOffset(element),containerPos=goog.style.getPageOffset(container),containerBorder=goog.style.getBorderBox(container);if(container==goog.dom.getDocumentScrollElement()){var relX=elementPos.x-container.scrollLeft,relY=elementPos.y-container.scrollTop;goog.userAgent.IE&&!goog.userAgent.isDocumentModeOrHigher(10)&&(relX+=containerBorder.left,relY+=containerBorder.top);}else{relX=elementPos.x-containerPos.x-containerBorder.left,relY=elementPos.y-containerPos.y-containerBorder.top;}var elementSize=goog.style.getSizeWithDisplay_(element),spaceX=container.clientWidth-elementSize.width,spaceY=container.clientHeight-elementSize.height,scrollLeft=container.scrollLeft,scrollTop=container.scrollTop;opt_center?(scrollLeft+=relX-spaceX/2,scrollTop+=relY-spaceY/2):(scrollLeft+=Math.min(relX,Math.max(relX-spaceX,0)),scrollTop+=Math.min(relY,Math.max(relY-spaceY,0)));return new goog.math.Coordinate(scrollLeft,scrollTop);};goog.style.scrollIntoContainerView=function(element,opt_container,opt_center){var container=opt_container||goog.dom.getDocumentScrollElement(),offset=goog.style.getContainerOffsetToScrollInto(element,container,opt_center);container.scrollLeft=offset.x;container.scrollTop=offset.y;};goog.style.getClientLeftTop=function(el){return new goog.math.Coordinate(el.clientLeft,el.clientTop);};goog.style.getPageOffset=function(el){var doc=goog.dom.getOwnerDocument(el);goog.asserts.assertObject(el,"Parameter is required");var pos=new goog.math.Coordinate(0,0),viewportElement=goog.style.getClientViewportElement(doc);if(el==viewportElement){return pos;}var box=goog.style.getBoundingClientRect_(el),scrollCoord=goog.dom.getDomHelper(doc).getDocumentScroll();pos.x=box.left+scrollCoord.x;pos.y=box.top+scrollCoord.y;return pos;};goog.style.getPageOffsetLeft=function(el){return goog.style.getPageOffset(el).x;};goog.style.getPageOffsetTop=function(el){return goog.style.getPageOffset(el).y;};goog.style.getFramedPageOffset=function(el,relativeWin){var position=new goog.math.Coordinate(0,0),currentWin=goog.dom.getWindow(goog.dom.getOwnerDocument(el));if(!goog.reflect.canAccessProperty(currentWin,"parent")){return position;}var currentEl=el;do{var offset=currentWin==relativeWin?goog.style.getPageOffset(currentEl):goog.style.getClientPositionForElement_(goog.asserts.assert(currentEl));position.x+=offset.x;position.y+=offset.y;}while(currentWin&¤tWin!=relativeWin&¤tWin!=currentWin.parent&&(currentEl=currentWin.frameElement)&&(currentWin=currentWin.parent));return position;};goog.style.translateRectForAnotherFrame=function(rect,origBase,newBase){if(origBase.getDocument()!=newBase.getDocument()){var body=origBase.getDocument().body,pos=goog.style.getFramedPageOffset(body,newBase.getWindow());pos=goog.math.Coordinate.difference(pos,goog.style.getPageOffset(body));!goog.userAgent.IE||goog.userAgent.isDocumentModeOrHigher(9)||origBase.isCss1CompatMode()||(pos=goog.math.Coordinate.difference(pos,origBase.getDocumentScroll()));rect.left+=pos.x;rect.top+=pos.y;}};goog.style.getRelativePosition=function(a,b){var ap=goog.style.getClientPosition(a),bp=goog.style.getClientPosition(b);return new goog.math.Coordinate(ap.x-bp.x,ap.y-bp.y);};goog.style.getClientPositionForElement_=function(el){var box=goog.style.getBoundingClientRect_(el);return new goog.math.Coordinate(box.left,box.top);};goog.style.getClientPosition=function(el){goog.asserts.assert(el);if(el.nodeType==goog.dom.NodeType.ELEMENT){return goog.style.getClientPositionForElement_(el);}var targetEvent=el.changedTouches?el.changedTouches[0]:el;return new goog.math.Coordinate(targetEvent.clientX,targetEvent.clientY);};goog.style.setPageOffset=function(el,x,opt_y){var cur=goog.style.getPageOffset(el);x instanceof goog.math.Coordinate&&(opt_y=x.y,x=x.x);var dx=goog.asserts.assertNumber(x)-cur.x;goog.style.setPosition(el,el.offsetLeft+dx,el.offsetTop+(Number(opt_y)-cur.y));};goog.style.setSize=function(element,w,opt_h){if(w instanceof goog.math.Size){var h=w.height;w=w.width;}else{if(void 0==opt_h){throw Error("missing height argument");}h=opt_h;}goog.style.setWidth(element,w);goog.style.setHeight(element,h);};goog.style.getPixelStyleValue_=function(value,round){"number"==typeof value&&(value=(round?Math.round(value):value)+"px");return value;};goog.style.setHeight=function(element,height){element.style.height=goog.style.getPixelStyleValue_(height,!0);};goog.style.setWidth=function(element,width){element.style.width=goog.style.getPixelStyleValue_(width,!0);};goog.style.getSize=function(element){return goog.style.evaluateWithTemporaryDisplay_(goog.style.getSizeWithDisplay_,element);};goog.style.evaluateWithTemporaryDisplay_=function(fn,element){if("none"!=goog.style.getStyle_(element,"display")){return fn(element);}var style=element.style,originalDisplay=style.display,originalVisibility=style.visibility,originalPosition=style.position;style.visibility="hidden";style.position="absolute";style.display="inline";var retVal=fn(element);style.display=originalDisplay;style.position=originalPosition;style.visibility=originalVisibility;return retVal;};goog.style.getSizeWithDisplay_=function(element){var offsetWidth=element.offsetWidth,offsetHeight=element.offsetHeight,webkitOffsetsZero=goog.userAgent.WEBKIT&&!offsetWidth&&!offsetHeight;if((void 0===offsetWidth||webkitOffsetsZero)&&element.getBoundingClientRect){var clientRect=goog.style.getBoundingClientRect_(element);return new goog.math.Size(clientRect.right-clientRect.left,clientRect.bottom-clientRect.top);}return new goog.math.Size(offsetWidth,offsetHeight);};goog.style.getTransformedSize=function(element){if(!element.getBoundingClientRect){return null;}var clientRect=goog.style.evaluateWithTemporaryDisplay_(goog.style.getBoundingClientRect_,element);return new goog.math.Size(clientRect.right-clientRect.left,clientRect.bottom-clientRect.top);};goog.style.getBounds=function(element){var o=goog.style.getPageOffset(element),s=goog.style.getSize(element);return new goog.math.Rect(o.x,o.y,s.width,s.height);};goog.style.toCamelCase=function(selector){return goog.string.toCamelCase(String(selector));};goog.style.toSelectorCase=function(selector){return goog.string.toSelectorCase(selector);};goog.style.getOpacity=function(el){goog.asserts.assert(el);var style=el.style,result="";if("opacity"in style){result=style.opacity;}else{if("MozOpacity"in style){result=style.MozOpacity;}else{if("filter"in style){var match=style.filter.match(/alpha\(opacity=([\d.]+)\)/);match&&(result=String(match[1]/100));}}}return""==result?result:Number(result);};goog.style.setOpacity=function(el,alpha){goog.asserts.assert(el);var style=el.style;"opacity"in style?style.opacity=alpha:"MozOpacity"in style?style.MozOpacity=alpha:"filter"in style&&(style.filter=""===alpha?"":"alpha(opacity="+100*Number(alpha)+")");};goog.style.setTransparentBackgroundImage=function(el,src){var style=el.style;style.backgroundImage="url("+src+")";style.backgroundPosition="top left";style.backgroundRepeat="no-repeat";};goog.style.clearTransparentBackgroundImage=function(el){var style=el.style;"filter"in style?style.filter="":style.backgroundImage="none";};goog.style.showElement=function(el,display){goog.style.setElementShown(el,display);};goog.style.setElementShown=function(el,isShown){el.style.display=isShown?"":"none";};goog.style.isElementShown=function(el){return"none"!=el.style.display;};goog.style.installSafeStyleSheet=function(safeStyleSheet,opt_node){var dh=goog.dom.getDomHelper(opt_node),doc=dh.getDocument();if(goog.userAgent.IE&&doc.createStyleSheet){var styleSheet=doc.createStyleSheet();goog.style.setSafeStyleSheet(styleSheet,safeStyleSheet);return styleSheet;}var head=dh.getElementsByTagNameAndClass(goog.dom.TagName.HEAD)[0];if(!head){var body=dh.getElementsByTagNameAndClass(goog.dom.TagName.BODY)[0];head=dh.createDom(goog.dom.TagName.HEAD);body.parentNode.insertBefore(head,body);}var el=dh.createDom(goog.dom.TagName.STYLE),nonce=goog.dom.safe.getStyleNonce();nonce&&el.setAttribute("nonce",nonce);goog.style.setSafeStyleSheet(el,safeStyleSheet);dh.appendChild(head,el);return el;};goog.style.uninstallStyles=function(styleSheet){goog.dom.removeNode(styleSheet.ownerNode||styleSheet.owningElement||styleSheet);};goog.style.setSafeStyleSheet=function(element,safeStyleSheet){var stylesString=module$contents$goog$html$SafeStyleSheet_SafeStyleSheet.unwrap(safeStyleSheet);goog.userAgent.IE&&void 0!==element.cssText?element.cssText=stylesString:goog.global.trustedTypes?goog.dom.setTextContent(element,stylesString):element.innerHTML=stylesString;};goog.style.setPreWrap=function(el){el.style.whiteSpace=goog.userAgent.GECKO?"-moz-pre-wrap":"pre-wrap";};goog.style.setInlineBlock=function(el){var style=el.style;style.position="relative";style.display="inline-block";};goog.style.isRightToLeft=function(el){return"rtl"==goog.style.getStyle_(el,"direction");};goog.style.unselectableStyle_=goog.userAgent.GECKO?"MozUserSelect":goog.userAgent.WEBKIT||goog.userAgent.EDGE?"WebkitUserSelect":null;goog.style.isUnselectable=function(el){return goog.style.unselectableStyle_?"none"==el.style[goog.style.unselectableStyle_].toLowerCase():goog.userAgent.IE?"on"==el.getAttribute("unselectable"):!1;};goog.style.setUnselectable=function(el,unselectable,opt_noRecurse){var descendants=opt_noRecurse?null:el.getElementsByTagName("*"),name=goog.style.unselectableStyle_;if(name){var value=unselectable?"none":"";el.style&&(el.style[name]=value);if(descendants){for(var i=0,descendant;descendant=descendants[i];i++){descendant.style&&(descendant.style[name]=value);}}}else{if(goog.userAgent.IE&&(value=unselectable?"on":"",el.setAttribute("unselectable",value),descendants)){for(i=0;descendant=descendants[i];i++){descendant.setAttribute("unselectable",value);}}}};goog.style.getBorderBoxSize=function(element){return new goog.math.Size(element.offsetWidth,element.offsetHeight);};goog.style.setBorderBoxSize=function(element,size){var doc=goog.dom.getOwnerDocument(element),isCss1CompatMode=goog.dom.getDomHelper(doc).isCss1CompatMode();if(!goog.userAgent.IE||goog.userAgent.isVersionOrHigher("10")||isCss1CompatMode){goog.style.setBoxSizingSize_(element,size,"border-box");}else{var style=element.style;if(isCss1CompatMode){var paddingBox=goog.style.getPaddingBox(element),borderBox=goog.style.getBorderBox(element);style.pixelWidth=size.width-borderBox.left-paddingBox.left-paddingBox.right-borderBox.right;style.pixelHeight=size.height-borderBox.top-paddingBox.top-paddingBox.bottom-borderBox.bottom;}else{style.pixelWidth=size.width,style.pixelHeight=size.height;}}};goog.style.getContentBoxSize=function(element){var doc=goog.dom.getOwnerDocument(element),ieCurrentStyle=goog.userAgent.IE&&element.currentStyle;if(ieCurrentStyle&&goog.dom.getDomHelper(doc).isCss1CompatMode()&&"auto"!=ieCurrentStyle.width&&"auto"!=ieCurrentStyle.height&&!ieCurrentStyle.boxSizing){var width=goog.style.getIePixelValue_(element,ieCurrentStyle.width,"width","pixelWidth"),height=goog.style.getIePixelValue_(element,ieCurrentStyle.height,"height","pixelHeight");return new goog.math.Size(width,height);}var borderBoxSize=goog.style.getBorderBoxSize(element),paddingBox=goog.style.getPaddingBox(element),borderBox=goog.style.getBorderBox(element);return new goog.math.Size(borderBoxSize.width-borderBox.left-paddingBox.left-paddingBox.right-borderBox.right,borderBoxSize.height-borderBox.top-paddingBox.top-paddingBox.bottom-borderBox.bottom);};goog.style.setContentBoxSize=function(element,size){var doc=goog.dom.getOwnerDocument(element),isCss1CompatMode=goog.dom.getDomHelper(doc).isCss1CompatMode();if(!goog.userAgent.IE||goog.userAgent.isVersionOrHigher("10")||isCss1CompatMode){goog.style.setBoxSizingSize_(element,size,"content-box");}else{var style=element.style;if(isCss1CompatMode){style.pixelWidth=size.width,style.pixelHeight=size.height;}else{var paddingBox=goog.style.getPaddingBox(element),borderBox=goog.style.getBorderBox(element);style.pixelWidth=size.width+borderBox.left+paddingBox.left+paddingBox.right+borderBox.right;style.pixelHeight=size.height+borderBox.top+paddingBox.top+paddingBox.bottom+borderBox.bottom;}}};goog.style.setBoxSizingSize_=function(element,size,boxSizing){var style=element.style;goog.userAgent.GECKO?style.MozBoxSizing=boxSizing:goog.userAgent.WEBKIT?style.WebkitBoxSizing=boxSizing:style.boxSizing=boxSizing;style.width=Math.max(size.width,0)+"px";style.height=Math.max(size.height,0)+"px";};goog.style.getIePixelValue_=function(element,value,name,pixelName){if(/^\d+px?$/.test(value)){return parseInt(value,10);}var oldStyleValue=element.style[name],oldRuntimeValue=element.runtimeStyle[name];element.runtimeStyle[name]=element.currentStyle[name];element.style[name]=value;var pixelValue=element.style[pixelName];element.style[name]=oldStyleValue;element.runtimeStyle[name]=oldRuntimeValue;return+pixelValue;};goog.style.getIePixelDistance_=function(element,propName){var value=goog.style.getCascadedStyle(element,propName);return value?goog.style.getIePixelValue_(element,value,"left","pixelLeft"):0;};goog.style.getBox_=function(element,stylePrefix){if(goog.userAgent.IE){var left=goog.style.getIePixelDistance_(element,stylePrefix+"Left"),right=goog.style.getIePixelDistance_(element,stylePrefix+"Right"),top=goog.style.getIePixelDistance_(element,stylePrefix+"Top"),bottom=goog.style.getIePixelDistance_(element,stylePrefix+"Bottom");return new goog.math.Box(top,right,bottom,left);}left=goog.style.getComputedStyle(element,stylePrefix+"Left");right=goog.style.getComputedStyle(element,stylePrefix+"Right");top=goog.style.getComputedStyle(element,stylePrefix+"Top");bottom=goog.style.getComputedStyle(element,stylePrefix+"Bottom");return new goog.math.Box(parseFloat(top),parseFloat(right),parseFloat(bottom),parseFloat(left));};goog.style.getPaddingBox=function(element){return goog.style.getBox_(element,"padding");};goog.style.getMarginBox=function(element){return goog.style.getBox_(element,"margin");};goog.style.ieBorderWidthKeywords_={thin:2,medium:4,thick:6};goog.style.getIePixelBorder_=function(element,prop){if("none"==goog.style.getCascadedStyle(element,prop+"Style")){return 0;}var width=goog.style.getCascadedStyle(element,prop+"Width");return width in goog.style.ieBorderWidthKeywords_?goog.style.ieBorderWidthKeywords_[width]:goog.style.getIePixelValue_(element,width,"left","pixelLeft");};goog.style.getBorderBox=function(element){if(goog.userAgent.IE&&!goog.userAgent.isDocumentModeOrHigher(9)){var left=goog.style.getIePixelBorder_(element,"borderLeft"),right=goog.style.getIePixelBorder_(element,"borderRight"),top=goog.style.getIePixelBorder_(element,"borderTop"),bottom=goog.style.getIePixelBorder_(element,"borderBottom");return new goog.math.Box(top,right,bottom,left);}left=goog.style.getComputedStyle(element,"borderLeftWidth");right=goog.style.getComputedStyle(element,"borderRightWidth");top=goog.style.getComputedStyle(element,"borderTopWidth");bottom=goog.style.getComputedStyle(element,"borderBottomWidth");return new goog.math.Box(parseFloat(top),parseFloat(right),parseFloat(bottom),parseFloat(left));};goog.style.getFontFamily=function(el){var doc=goog.dom.getOwnerDocument(el),font="";if(doc.body.createTextRange&&goog.dom.contains(doc,el)){var range=doc.body.createTextRange();range.moveToElementText(el);try{font=range.queryCommandValue("FontName");}catch(e){font="";}}font||(font=goog.style.getStyle_(el,"fontFamily"));var fontsArray=font.split(",");1<fontsArray.length&&(font=fontsArray[0]);return goog.string.stripQuotes(font,"\"'");};goog.style.lengthUnitRegex_=/[^\d]+$/;goog.style.getLengthUnits=function(value){var units=value.match(goog.style.lengthUnitRegex_);return units&&units[0]||null;};goog.style.ABSOLUTE_CSS_LENGTH_UNITS_={cm:1,in:1,mm:1,pc:1,pt:1};goog.style.CONVERTIBLE_RELATIVE_CSS_UNITS_={em:1,ex:1};goog.style.getFontSize=function(el){var fontSize=goog.style.getStyle_(el,"fontSize"),sizeUnits=goog.style.getLengthUnits(fontSize);if(fontSize&&"px"==sizeUnits){return parseInt(fontSize,10);}if(goog.userAgent.IE){if(String(sizeUnits)in goog.style.ABSOLUTE_CSS_LENGTH_UNITS_){return goog.style.getIePixelValue_(el,fontSize,"left","pixelLeft");}if(el.parentNode&&el.parentNode.nodeType==goog.dom.NodeType.ELEMENT&&String(sizeUnits)in goog.style.CONVERTIBLE_RELATIVE_CSS_UNITS_){var parentElement=el.parentNode,parentSize=goog.style.getStyle_(parentElement,"fontSize");return goog.style.getIePixelValue_(parentElement,fontSize==parentSize?"1em":fontSize,"left","pixelLeft");}}var sizeElement=goog.dom.createDom(goog.dom.TagName.SPAN,{style:"visibility:hidden;position:absolute;line-height:0;padding:0;margin:0;border:0;height:1em;"});goog.dom.appendChild(el,sizeElement);fontSize=sizeElement.offsetHeight;goog.dom.removeNode(sizeElement);return fontSize;};goog.style.parseStyleAttribute=function(value){var result={};value.split(/\s*;\s*/).forEach(function(pair){var keyValue=pair.match(/\s*([\w-]+)\s*:(.+)/);if(keyValue){var styleValue=goog.string.trim(keyValue[2]);result[goog.string.toCamelCase(keyValue[1].toLowerCase())]=styleValue;}});return result;};goog.style.toStyleAttribute=function(obj){var buffer=[];module$contents$goog$object_forEach(obj,function(value,key){buffer.push(goog.string.toSelectorCase(key),":",value,";");});return buffer.join("");};goog.style.setFloat=function(el,value){el.style[goog.userAgent.IE?"styleFloat":"cssFloat"]=value;};goog.style.getFloat=function(el){return el.style[goog.userAgent.IE?"styleFloat":"cssFloat"]||"";};goog.style.getScrollbarWidth=function(opt_className){var outerDiv=goog.dom.createElement(goog.dom.TagName.DIV);opt_className&&(outerDiv.className=opt_className);outerDiv.style.cssText="overflow:auto;position:absolute;top:0;width:100px;height:100px";var innerDiv=goog.dom.createElement(goog.dom.TagName.DIV);goog.style.setSize(innerDiv,"200px","200px");outerDiv.appendChild(innerDiv);goog.dom.appendChild(goog.dom.getDocument().body,outerDiv);var width=outerDiv.offsetWidth-outerDiv.clientWidth;goog.dom.removeNode(outerDiv);return width;};goog.style.MATRIX_TRANSLATION_REGEX_=RegExp("matrix\\([0-9\\.\\-]+, [0-9\\.\\-]+, [0-9\\.\\-]+, [0-9\\.\\-]+, ([0-9\\.\\-]+)p?x?, ([0-9\\.\\-]+)p?x?\\)");goog.style.getCssTranslation=function(element){var transform=goog.style.getComputedTransform(element);if(!transform){return new goog.math.Coordinate(0,0);}var matches=transform.match(goog.style.MATRIX_TRANSLATION_REGEX_);return matches?new goog.math.Coordinate(parseFloat(matches[1]),parseFloat(matches[2])):new goog.math.Coordinate(0,0);};ee.layers.AbstractOverlay=function(tileSource,opt_options){goog.events.EventTarget.call(this);var options=opt_options||{};this.minZoom=options.minZoom||0;this.maxZoom=options.maxZoom||20;if(!window.google||!window.google.maps){throw Error("Google Maps API hasn't been initialized.");}this.tileSize=options.tileSize||new google.maps.Size(ee.layers.AbstractOverlay.DEFAULT_TILE_EDGE_LENGTH,ee.layers.AbstractOverlay.DEFAULT_TILE_EDGE_LENGTH);this.isPng="isPng"in options?options.isPng:!0;this.name=options.name;this.opacity="opacity"in options?options.opacity:1;this.stats=new module$contents$ee$layers$AbstractOverlayStats_AbstractOverlayStats(tileSource.getUniqueId());this.tilesById=new goog.structs.Map();this.tileCounter=0;this.tileSource=tileSource;this.handler=new goog.events.EventHandler(this);this.projection=null;this.radius=0;this.alt=null;};$jscomp.inherits(ee.layers.AbstractOverlay,goog.events.EventTarget);ee.layers.AbstractOverlay.prototype.addTileCallback=function(callback){return goog.events.listen(this,ee.layers.AbstractOverlay.EventType.TILE_LOAD,callback);};ee.layers.AbstractOverlay.prototype.removeTileCallback=function(callbackId){goog.events.unlistenByKey(callbackId);};ee.layers.AbstractOverlay.prototype.getLoadingTilesCount=function(){return this.getTileCountForStatus_(ee.layers.AbstractTile.Status.THROTTLED)+this.getTileCountForStatus_(ee.layers.AbstractTile.Status.LOADING)+this.getTileCountForStatus_(ee.layers.AbstractTile.Status.NEW);};ee.layers.AbstractOverlay.prototype.getFailedTilesCount=function(){return this.getTileCountForStatus_(ee.layers.AbstractTile.Status.FAILED);};ee.layers.AbstractOverlay.prototype.getLoadedTilesCount=function(){return this.getTileCountForStatus_(ee.layers.AbstractTile.Status.LOADED);};ee.layers.AbstractOverlay.prototype.setOpacity=function(opacity){this.opacity=opacity;this.tilesById.forEach(function(tile){goog.style.setOpacity(tile.div,this.opacity);},this);};ee.layers.AbstractOverlay.prototype.getStats=function(){return this.stats;};ee.layers.AbstractOverlay.prototype.getTile=function(coord,zoom,ownerDocument){var maxCoord=1<<zoom;if(zoom<this.minZoom||0>coord.y||coord.y>=maxCoord){return ownerDocument.createElement("div");}var x=coord.x%maxCoord;0>x&&(x+=maxCoord);var normalizedCoord=new google.maps.Point(x,coord.y),uniqueId=this.getUniqueTileId_(coord,zoom),tile=this.createTile(normalizedCoord,zoom,ownerDocument,uniqueId);tile.tileSize=this.tileSize;goog.style.setOpacity(tile.div,this.opacity);this.tilesById.set(uniqueId,tile);this.registerStatusChangeListener_(tile);this.dispatchEvent(new ee.layers.TileStartEvent(this.getLoadingTilesCount()));this.tileSource.loadTile(tile,new Date().getTime()/1000);return tile.div;};ee.layers.AbstractOverlay.prototype.releaseTile=function(tileDiv){var tile=this.tilesById.get(tileDiv.id);this.tilesById.remove(tileDiv.id);tile&&(tile.abort(),module$contents$goog$dispose_dispose(tile));};ee.layers.AbstractOverlay.prototype.registerStatusChangeListener_=function(tile){this.handler.listen(tile,ee.layers.AbstractTile.EventType.STATUS_CHANGED,function(){var Status=ee.layers.AbstractTile.Status;switch(tile.getStatus()){case Status.LOADED:this.stats.addTileStats(tile.loadingStartTs_,new Date().getTime(),tile.zoom);this.dispatchEvent(new ee.layers.TileLoadEvent(this.getLoadingTilesCount()));break;case Status.THROTTLED:this.stats.incrementThrottleCounter(tile.zoom);this.dispatchEvent(new ee.layers.TileThrottleEvent(tile.sourceUrl));break;case Status.FAILED:this.stats.incrementErrorCounter(tile.zoom);this.dispatchEvent(new ee.layers.TileFailEvent(tile.sourceUrl,tile.errorMessage_));break;case Status.ABORTED:this.dispatchEvent(new ee.layers.TileAbortEvent(this.getLoadingTilesCount()));}});};ee.layers.AbstractOverlay.prototype.getUniqueTileId_=function(coord,z){var tileId=[coord.x,coord.y,z,this.tileCounter++].join("-"),sourceId=this.tileSource.getUniqueId();return[tileId,sourceId].join("-");};ee.layers.AbstractOverlay.prototype.disposeInternal=function(){goog.events.EventTarget.prototype.disposeInternal.call(this);this.tilesById.forEach(module$contents$goog$dispose_dispose);this.tilesById.clear();this.tilesById=null;module$contents$goog$dispose_dispose(this.handler);this.tileSource=this.handler=null;};ee.layers.AbstractOverlay.prototype.getTileCountForStatus_=function(status){return module$contents$goog$array_count(this.tilesById.getValues(),function(tile){return tile.getStatus()==status;});};goog.exportSymbol("ee.layers.AbstractOverlay",ee.layers.AbstractOverlay);goog.exportProperty(ee.layers.AbstractOverlay.prototype,"removeTileCallback",ee.layers.AbstractOverlay.prototype.removeTileCallback);goog.exportProperty(ee.layers.AbstractOverlay.prototype,"addTileCallback",ee.layers.AbstractOverlay.prototype.addTileCallback);ee.layers.AbstractOverlay.EventType={TILE_FAIL:"tile-fail",TILE_ABORT:"tile-abort",TILE_THROTTLE:"tile-throttle",TILE_LOAD:"tile-load",TILE_START:"tile-start"};ee.layers.AbstractOverlay.DEFAULT_TILE_EDGE_LENGTH=256;ee.layers.TileLoadEvent=function(loadingTileCount){goog.events.Event.call(this,ee.layers.AbstractOverlay.EventType.TILE_LOAD);this.loadingTileCount=loadingTileCount;};$jscomp.inherits(ee.layers.TileLoadEvent,goog.events.Event);ee.layers.TileStartEvent=function(loadingTileCount){goog.events.Event.call(this,ee.layers.AbstractOverlay.EventType.TILE_START);this.loadingTileCount=loadingTileCount;};$jscomp.inherits(ee.layers.TileStartEvent,goog.events.Event);ee.layers.TileThrottleEvent=function(tileUrl){goog.events.Event.call(this,ee.layers.AbstractOverlay.EventType.TILE_THROTTLE);this.tileUrl=tileUrl;};$jscomp.inherits(ee.layers.TileThrottleEvent,goog.events.Event);ee.layers.TileFailEvent=function(tileUrl,opt_errorMessage){goog.events.Event.call(this,ee.layers.AbstractOverlay.EventType.TILE_FAIL);this.tileUrl=tileUrl;this.errorMessage=opt_errorMessage;};$jscomp.inherits(ee.layers.TileFailEvent,goog.events.Event);ee.layers.TileAbortEvent=function(loadingTileCount){goog.events.Event.call(this,ee.layers.AbstractOverlay.EventType.TILE_ABORT);this.loadingTileCount=loadingTileCount;};$jscomp.inherits(ee.layers.TileAbortEvent,goog.events.Event);ee.layers.AbstractTile=function(coord,zoom,ownerDocument,uniqueId){goog.events.EventTarget.call(this);this.coord=coord;this.zoom=zoom;this.div=ownerDocument.createElement("div");this.div.id=uniqueId;this.maxRetries=ee.layers.AbstractTile.DEFAULT_MAX_LOAD_RETRIES_;this.renderer=function(){};this.status_=ee.layers.AbstractTile.Status.NEW;this.retryAttemptCount_=0;this.isRetrying_=!1;};$jscomp.inherits(ee.layers.AbstractTile,goog.events.EventTarget);ee.layers.AbstractTile.prototype.startLoad=function(){var $jscomp$this=this;if(!this.isRetrying_&&this.getStatus()==ee.layers.AbstractTile.Status.LOADING){throw Error("startLoad() can only be invoked once. Use retryLoad() after the first attempt.");}this.setStatus(ee.layers.AbstractTile.Status.LOADING);this.loadingStartTs_=new Date().getTime();this.xhrIo_=new goog.net.XhrIo();this.xhrIo_.setResponseType(goog.net.XhrIo.ResponseType.BLOB);this.xhrIo_.listen(goog.net.EventType.COMPLETE,function(event){var blob=$jscomp$this.xhrIo_.getResponse(),status=$jscomp$this.xhrIo_.getStatus(),HttpStatus=goog.net.HttpStatus;status==HttpStatus.TOO_MANY_REQUESTS&&$jscomp$this.setStatus(ee.layers.AbstractTile.Status.THROTTLED);if(HttpStatus.isSuccess(status)){var sourceResponseHeaders={};module$contents$goog$object_forEach($jscomp$this.xhrIo_.getResponseHeaders(),function(value,name){sourceResponseHeaders[name.toLowerCase()]=value;});$jscomp$this.sourceResponseHeaders=sourceResponseHeaders;$jscomp$this.sourceData=blob;$jscomp$this.finishLoad();}else{if(blob){var reader=new goog.fs.FileReader();reader.listen(goog.fs.FileReader.EventType.LOAD_END,function(){$jscomp$this.retryLoad(reader.getResult());},void 0);reader.readAsText(blob);}else{$jscomp$this.retryLoad("Failed to load tile.");}}},!1);this.xhrIo_.listenOnce(goog.net.EventType.READY,goog.partial(module$contents$goog$dispose_dispose,this.xhrIo_));this.sourceUrl&&this.sourceUrl.endsWith("&profiling=1")&&(this.sourceUrl=this.sourceUrl.replace("&profiling=1",""),this.xhrIo_.headers.set(module$contents$ee$apiclient_apiclient.PROFILE_REQUEST_HEADER,"1"));this.xhrIo_.send(this.sourceUrl,"GET");};ee.layers.AbstractTile.prototype.finishLoad=function(){this.renderer(this);this.setStatus(ee.layers.AbstractTile.Status.LOADED);};ee.layers.AbstractTile.prototype.cancelLoad=function(){module$contents$goog$dispose_dispose(this.xhrIo_);};ee.layers.AbstractTile.prototype.retryLoad=function(opt_errorMessage){var parseError=function(error){try{if(error=JSON.parse(error),error.error&&error.error.message){return error.error.message;}}catch(e){}return error;};this.retryAttemptCount_>=this.maxRetries?(this.errorMessage_=parseError(opt_errorMessage),this.setStatus(ee.layers.AbstractTile.Status.FAILED)):(this.cancelLoad(),setTimeout(goog.bind(function(){this.isDisposed()||(this.isRetrying_=!0,this.startLoad(),this.isRetrying_=!1);},this),1000*Math.pow(2,this.retryAttemptCount_++)));};ee.layers.AbstractTile.prototype.abort=function(){this.cancelLoad();this.getStatus()!=ee.layers.AbstractTile.Status.ABORTED&&this.getStatus()!=ee.layers.AbstractTile.Status.REMOVED&&this.setStatus(this.isDone()?ee.layers.AbstractTile.Status.REMOVED:ee.layers.AbstractTile.Status.ABORTED);};ee.layers.AbstractTile.prototype.isDone=function(){return this.status_ in ee.layers.AbstractTile.DONE_STATUS_SET_;};ee.layers.AbstractTile.prototype.getStatus=function(){return this.status_;};ee.layers.AbstractTile.prototype.setStatus=function(status){this.status_=status;this.dispatchEvent(ee.layers.AbstractTile.EventType.STATUS_CHANGED);};ee.layers.AbstractTile.prototype.disposeInternal=function(){goog.events.EventTarget.prototype.disposeInternal.call(this);this.cancelLoad();this.div.remove();this.renderer=null;};ee.layers.AbstractTile.EventType={STATUS_CHANGED:"status-changed"};ee.layers.AbstractTile.Status={NEW:"new",LOADING:"loading",THROTTLED:"throttled",LOADED:"loaded",FAILED:"failed",ABORTED:"aborted",REMOVED:"removed"};ee.layers.AbstractTile.DONE_STATUS_SET_=module$contents$goog$object_createSet(ee.layers.AbstractTile.Status.ABORTED,ee.layers.AbstractTile.Status.FAILED,ee.layers.AbstractTile.Status.LOADED,ee.layers.AbstractTile.Status.REMOVED);ee.layers.AbstractTile.DEFAULT_MAX_LOAD_RETRIES_=5;var module$exports$ee$layers$AbstractTileSource=function(){goog.Disposable.call(this);};$jscomp.inherits(module$exports$ee$layers$AbstractTileSource,goog.Disposable);ee.layers.BinaryOverlay=function(tileSource,opt_options){ee.layers.AbstractOverlay.call(this,tileSource,opt_options);this.buffersByCoord_=new goog.structs.Map();this.divsByCoord_=new goog.structs.Map();};$jscomp.inherits(ee.layers.BinaryOverlay,ee.layers.AbstractOverlay);ee.layers.BinaryOverlay.prototype.createTile=function(coord,zoom,ownerDocument,uniqueId){var tile=new ee.layers.BinaryTile(coord,zoom,ownerDocument,uniqueId);this.handler.listen(tile,ee.layers.AbstractTile.EventType.STATUS_CHANGED,function(){tile.getStatus()==ee.layers.AbstractTile.Status.LOADED&&(this.buffersByCoord_.set(coord,new Float32Array(tile.buffer_)),this.divsByCoord_.set(coord,tile.div));});return tile;};ee.layers.BinaryOverlay.prototype.getBuffersByCoord=function(){return this.buffersByCoord_;};ee.layers.BinaryOverlay.prototype.getDivsByCoord=function(){return this.divsByCoord_;};ee.layers.BinaryOverlay.prototype.disposeInternal=function(){ee.layers.AbstractOverlay.prototype.disposeInternal.call(this);this.divsByCoord_=this.buffersByCoord_=null;};goog.exportSymbol("ee.layers.BinaryOverlay",ee.layers.BinaryOverlay);ee.layers.BinaryTile=function(coord,zoom,ownerDocument,uniqueId){ee.layers.AbstractTile.call(this,coord,zoom,ownerDocument,uniqueId);};$jscomp.inherits(ee.layers.BinaryTile,ee.layers.AbstractTile);ee.layers.BinaryTile.prototype.finishLoad=function(){var reader=new goog.fs.FileReader();reader.listen(goog.fs.FileReader.EventType.LOAD_END,function(){this.buffer_=reader.getResult();ee.layers.AbstractTile.prototype.finishLoad.call(this);},void 0,this);reader.readAsArrayBuffer(this.sourceData);};goog.net.ImageLoader=function(opt_parent){goog.events.EventTarget.call(this);this.imageIdToRequestMap_={};this.imageIdToImageMap_={};this.handler_=new goog.events.EventHandler(this);this.parent_=opt_parent;this.completionFired_=!1;};goog.inherits(goog.net.ImageLoader,goog.events.EventTarget);goog.net.ImageLoader.CorsRequestType={ANONYMOUS:"anonymous",USE_CREDENTIALS:"use-credentials"};goog.net.ImageLoader.IMAGE_LOAD_EVENTS_=[goog.userAgent.IE&&!goog.userAgent.isVersionOrHigher("11")?goog.net.EventType.READY_STATE_CHANGE:goog.events.EventType.LOAD,goog.net.EventType.ABORT,goog.net.EventType.ERROR];goog.net.ImageLoader.prototype.addImage=function(id,image,opt_corsRequestType){var src="string"===typeof image?image:image.src;src&&(this.completionFired_=!1,this.imageIdToRequestMap_[id]={src:src,corsRequestType:void 0!==opt_corsRequestType?opt_corsRequestType:null});};goog.net.ImageLoader.prototype.removeImage=function(id){delete this.imageIdToRequestMap_[id];var image=this.imageIdToImageMap_[id];image&&(delete this.imageIdToImageMap_[id],this.handler_.unlisten(image,goog.net.ImageLoader.IMAGE_LOAD_EVENTS_,this.onNetworkEvent_));};goog.net.ImageLoader.prototype.start=function(){var imageIdToRequestMap=this.imageIdToRequestMap_;module$contents$goog$object_getKeys(imageIdToRequestMap).forEach(function(id){var imageRequest=imageIdToRequestMap[id];imageRequest&&(delete imageIdToRequestMap[id],this.loadImage_(imageRequest,id));},this);};goog.net.ImageLoader.prototype.loadImage_=function(imageRequest,id){if(!this.isDisposed()){var image=this.parent_?goog.dom.getDomHelper(this.parent_).createDom(goog.dom.TagName.IMG):new Image();imageRequest.corsRequestType&&(image.crossOrigin=imageRequest.corsRequestType);this.handler_.listen(image,goog.net.ImageLoader.IMAGE_LOAD_EVENTS_,this.onNetworkEvent_);this.imageIdToImageMap_[id]=image;image.id=id;image.src=imageRequest.src;}};goog.net.ImageLoader.prototype.onNetworkEvent_=function(evt){var image=evt.currentTarget;if(image){if(evt.type==goog.net.EventType.READY_STATE_CHANGE){if(image.readyState==goog.net.EventType.COMPLETE){evt.type=goog.events.EventType.LOAD;}else{return;}}"undefined"==typeof image.naturalWidth&&(evt.type==goog.events.EventType.LOAD?(image.naturalWidth=image.width,image.naturalHeight=image.height):(image.naturalWidth=0,image.naturalHeight=0));this.removeImage(image.id);this.dispatchEvent({type:evt.type,target:image});this.isDisposed()||this.maybeFireCompletionEvent_();}};goog.net.ImageLoader.prototype.maybeFireCompletionEvent_=function(){module$contents$goog$object_isEmpty(this.imageIdToImageMap_)&&module$contents$goog$object_isEmpty(this.imageIdToRequestMap_)&&!this.completionFired_&&(this.completionFired_=!0,this.dispatchEvent(goog.net.EventType.COMPLETE));};goog.net.ImageLoader.prototype.disposeInternal=function(){delete this.imageIdToRequestMap_;delete this.imageIdToImageMap_;module$contents$goog$dispose_dispose(this.handler_);goog.net.ImageLoader.superClass_.disposeInternal.call(this);};ee.layers.ImageOverlay=function(tileSource,opt_options){ee.layers.AbstractOverlay.call(this,tileSource,opt_options);};$jscomp.inherits(ee.layers.ImageOverlay,ee.layers.AbstractOverlay);ee.layers.ImageOverlay.prototype.createTile=function(coord,zoom,ownerDocument,uniqueId){return new ee.layers.ImageTile(coord,zoom,ownerDocument,uniqueId);};goog.exportSymbol("ee.layers.ImageOverlay",ee.layers.ImageOverlay);ee.layers.ImageTile=function(coord,zoom,ownerDocument,uniqueId){ee.layers.AbstractTile.call(this,coord,zoom,ownerDocument,uniqueId);this.renderer=ee.layers.ImageTile.defaultRenderer_;this.imageLoaderListenerKey_=this.imageLoader_=this.imageEl=null;this.objectUrl_="";};$jscomp.inherits(ee.layers.ImageTile,ee.layers.AbstractTile);ee.layers.ImageTile.prototype.finishLoad=function(){try{var safeUrl=goog.html.SafeUrl.fromBlob(this.sourceData);this.objectUrl_=goog.html.SafeUrl.unwrap(safeUrl);var imageUrl=this.objectUrl_!==goog.html.SafeUrl.INNOCUOUS_STRING?this.objectUrl_:this.sourceUrl;}catch(e){imageUrl=this.sourceUrl;}this.imageLoader_=new goog.net.ImageLoader();this.imageLoader_.addImage(this.div.id+"-image",imageUrl);this.imageLoaderListenerKey_=goog.events.listenOnce(this.imageLoader_,ee.layers.ImageTile.IMAGE_LOADER_EVENTS_,function(event){event.type==goog.events.EventType.LOAD?(this.imageEl=event.target,ee.layers.AbstractTile.prototype.finishLoad.call(this)):this.retryLoad();},void 0,this);this.imageLoader_.start();};ee.layers.ImageTile.prototype.cancelLoad=function(){ee.layers.AbstractTile.prototype.cancelLoad.call(this);this.imageLoader_&&(goog.events.unlistenByKey(this.imageLoaderListenerKey_),module$contents$goog$dispose_dispose(this.imageLoader_));};ee.layers.ImageTile.prototype.disposeInternal=function(){ee.layers.AbstractTile.prototype.disposeInternal.call(this);this.objectUrl_&&URL.revokeObjectURL(this.objectUrl_);};ee.layers.ImageTile.defaultRenderer_=function(tile){tile.div.appendChild(tile.imageEl);};ee.layers.ImageTile.IMAGE_LOADER_EVENTS_=[goog.events.EventType.LOAD,goog.net.EventType.ABORT,goog.net.EventType.ERROR];goog.string.path={};goog.string.path.baseName=function(path){var i=path.lastIndexOf("/")+1;return path.slice(i);};goog.string.path.basename=goog.string.path.baseName;goog.string.path.dirname=function(path){var i=path.lastIndexOf("/")+1,head=path.slice(0,i);/^\/+$/.test(head)||(head=head.replace(/\/+$/,""));return head;};goog.string.path.extension=function(path){var baseName=goog.string.path.baseName(path).replace(/\.+/g,"."),separatorIndex=baseName.lastIndexOf(".");return 0>=separatorIndex?"":baseName.substr(separatorIndex+1);};goog.string.path.join=function(var_args){for(var path=arguments[0],i=1;i<arguments.length;i++){var arg=arguments[i];path=goog.string.startsWith(arg,"/")?arg:""==path||goog.string.endsWith(path,"/")?path+arg:path+("/"+arg);}return path;};goog.string.path.normalizePath=function(path){if(""==path){return".";}var initialSlashes="";goog.string.startsWith(path,"/")&&(initialSlashes="/",goog.string.startsWith(path,"//")&&!goog.string.startsWith(path,"///")&&(initialSlashes="//"));for(var parts=path.split("/"),newParts=[],i=0;i<parts.length;i++){var part=parts[i];""!=part&&"."!=part&&(".."!=part||!initialSlashes&&!newParts.length||".."==module$contents$goog$array_peek(newParts)?newParts.push(part):newParts.pop());}return initialSlashes+newParts.join("/")||".";};goog.string.path.split=function(path){var head=goog.string.path.dirname(path),tail=goog.string.path.baseName(path);return[head,tail];};var module$contents$ee$layers$CloudStorageTileSource_CloudStorageTileSource=function(bucket,path,maxZoom,opt_suffix){module$exports$ee$layers$AbstractTileSource.call(this);this.bucket_=bucket;this.path_=path;this.suffix_=opt_suffix||"";this.maxZoom_=maxZoom;};$jscomp.inherits(module$contents$ee$layers$CloudStorageTileSource_CloudStorageTileSource,module$exports$ee$layers$AbstractTileSource);module$contents$ee$layers$CloudStorageTileSource_CloudStorageTileSource.prototype.loadTile=function(tile,opt_priority){if(tile.zoom<=this.maxZoom_){tile.sourceUrl=this.getTileUrl_(tile.coord,tile.zoom);}else{var zoomSteps=tile.zoom-this.maxZoom_,zoomFactor=Math.pow(2,zoomSteps),upperCoord=new google.maps.Point(Math.floor(tile.coord.x/zoomFactor),Math.floor(tile.coord.y/zoomFactor));tile.sourceUrl=this.getTileUrl_(upperCoord,tile.zoom-zoomSteps);tile.renderer=goog.partial(module$contents$ee$layers$CloudStorageTileSource_CloudStorageTileSource.zoomTileRenderer_,this.maxZoom_);}var originalRetryLoad=goog.bind(tile.retryLoad,tile);tile.retryLoad=goog.bind(function(opt_errorMessage){opt_errorMessage&&(opt_errorMessage.includes(module$contents$ee$layers$CloudStorageTileSource_CloudStorageTileSource.MISSING_TILE_ERROR_)||opt_errorMessage.includes(module$contents$ee$layers$CloudStorageTileSource_CloudStorageTileSource.ACCESS_DENIED_ERROR_))?tile.setStatus(ee.layers.AbstractTile.Status.LOADED):originalRetryLoad(opt_errorMessage);},tile);tile.startLoad();};module$contents$ee$layers$CloudStorageTileSource_CloudStorageTileSource.prototype.getUniqueId=function(){return[this.bucket_,this.path_,this.maxZoom_,this.suffix_].join("-");};module$contents$ee$layers$CloudStorageTileSource_CloudStorageTileSource.prototype.getTileUrl_=function(coord,zoom){var url=goog.string.path.join(module$contents$ee$layers$CloudStorageTileSource_CloudStorageTileSource.BASE_URL,this.bucket_,this.path_,String(zoom),String(coord.x),String(coord.y));this.suffix_&&(url+=this.suffix_);return url;};module$contents$ee$layers$CloudStorageTileSource_CloudStorageTileSource.zoomTileRenderer_=function(maxZoom,tile){if(!tile.imageEl){throw Error("Tile must have an image element to be rendered.");}var zoomFactor=Math.pow(2,tile.zoom-maxZoom),sideLength=tile.tileSize.width,canv=tile.div.ownerDocument.createElement("canvas");canv.setAttribute("width",sideLength);canv.setAttribute("height",sideLength);tile.div.appendChild(canv);var context=canv.getContext("2d");context.imageSmoothingEnabled=!1;context.mozImageSmoothingEnabled=!1;context.webkitImageSmoothingEnabled=!1;context.drawImage(tile.imageEl,sideLength/zoomFactor*(tile.coord.x%zoomFactor),sideLength/zoomFactor*(tile.coord.y%zoomFactor),sideLength/zoomFactor,sideLength/zoomFactor,0,0,sideLength,sideLength);};goog.exportSymbol("ee.layers.CloudStorageTileSource",module$contents$ee$layers$CloudStorageTileSource_CloudStorageTileSource);module$contents$ee$layers$CloudStorageTileSource_CloudStorageTileSource.BASE_URL="https://storage.googleapis.com";module$contents$ee$layers$CloudStorageTileSource_CloudStorageTileSource.MISSING_TILE_ERROR_="The specified key does not exist.";module$contents$ee$layers$CloudStorageTileSource_CloudStorageTileSource.ACCESS_DENIED_ERROR_="AccessDenied";ee.layers.CloudStorageTileSource=module$contents$ee$layers$CloudStorageTileSource_CloudStorageTileSource;goog.structs.Queue=function(){this.front_=[];this.back_=[];};goog.structs.Queue.prototype.maybeFlip_=function(){0===this.front_.length&&(this.front_=this.back_,this.front_.reverse(),this.back_=[]);};goog.structs.Queue.prototype.enqueue=function(element){this.back_.push(element);};goog.structs.Queue.prototype.dequeue=function(){this.maybeFlip_();return this.front_.pop();};goog.structs.Queue.prototype.peek=function(){this.maybeFlip_();return module$contents$goog$array_peek(this.front_);};goog.structs.Queue.prototype.getCount=function(){return this.front_.length+this.back_.length;};goog.structs.Queue.prototype.isEmpty=function(){return 0===this.front_.length&&0===this.back_.length;};goog.structs.Queue.prototype.clear=function(){this.front_=[];this.back_=[];};goog.structs.Queue.prototype.contains=function(obj){return module$contents$goog$array_contains(this.front_,obj)||module$contents$goog$array_contains(this.back_,obj);};goog.structs.Queue.prototype.remove=function(obj){return module$contents$goog$array_removeLast(this.front_,obj)||module$contents$goog$array_remove(this.back_,obj);};goog.structs.Queue.prototype.getValues=function(){for(var res=[],i=this.front_.length-1;0<=i;--i){res.push(this.front_[i]);}var len=this.back_.length;for(i=0;i<len;++i){res.push(this.back_[i]);}return res;};goog.structs.Pool=function(opt_minCount,opt_maxCount){goog.Disposable.call(this);this.minCount_=opt_minCount||0;this.maxCount_=opt_maxCount||10;if(this.minCount_>this.maxCount_){throw Error(goog.structs.Pool.ERROR_MIN_MAX_);}this.freeQueue_=new goog.structs.Queue();this.inUseSet_=new goog.structs.Set();this.delay=0;this.lastAccess=null;this.adjustForMinMax();};goog.inherits(goog.structs.Pool,goog.Disposable);goog.structs.Pool.ERROR_MIN_MAX_="[goog.structs.Pool] Min can not be greater than max";goog.structs.Pool.ERROR_DISPOSE_UNRELEASED_OBJS_="[goog.structs.Pool] Objects not released";goog.structs.Pool.prototype.setMinimumCount=function(min){if(min>this.maxCount_){throw Error(goog.structs.Pool.ERROR_MIN_MAX_);}this.minCount_=min;this.adjustForMinMax();};goog.structs.Pool.prototype.setMaximumCount=function(max){if(max<this.minCount_){throw Error(goog.structs.Pool.ERROR_MIN_MAX_);}this.maxCount_=max;this.adjustForMinMax();};goog.structs.Pool.prototype.setDelay=function(delay){this.delay=delay;};goog.structs.Pool.prototype.getObject=function(){var time=Date.now();if(!(null!=this.lastAccess&&time-this.lastAccess<this.delay)){var obj=this.removeFreeObject_();obj&&(this.lastAccess=time,this.inUseSet_.add(obj));return obj;}};goog.structs.Pool.prototype.releaseObject=function(obj){return this.inUseSet_.remove(obj)?(this.addFreeObject(obj),!0):!1;};goog.structs.Pool.prototype.removeFreeObject_=function(){for(var obj;0<this.getFreeCount()&&(obj=this.freeQueue_.dequeue(),!this.objectCanBeReused(obj));){this.adjustForMinMax();}!obj&&this.getCount()<this.maxCount_&&(obj=this.createObject());return obj;};goog.structs.Pool.prototype.addFreeObject=function(obj){this.inUseSet_.remove(obj);this.objectCanBeReused(obj)&&this.getCount()<this.maxCount_?this.freeQueue_.enqueue(obj):this.disposeObject(obj);};goog.structs.Pool.prototype.adjustForMinMax=function(){for(var freeQueue=this.freeQueue_;this.getCount()<this.minCount_;){freeQueue.enqueue(this.createObject());}for(;this.getCount()>this.maxCount_&&0<this.getFreeCount();){this.disposeObject(freeQueue.dequeue());}};goog.structs.Pool.prototype.createObject=function(){return{};};goog.structs.Pool.prototype.disposeObject=function(obj){if("function"==typeof obj.dispose){obj.dispose();}else{for(var i in obj){obj[i]=null;}}};goog.structs.Pool.prototype.objectCanBeReused=function(obj){return"function"==typeof obj.canBeReused?obj.canBeReused():!0;};goog.structs.Pool.prototype.contains=function(obj){return this.freeQueue_.contains(obj)||this.inUseSet_.contains(obj);};goog.structs.Pool.prototype.getCount=function(){return this.freeQueue_.getCount()+this.inUseSet_.getCount();};goog.structs.Pool.prototype.getInUseCount=function(){return this.inUseSet_.getCount();};goog.structs.Pool.prototype.getFreeCount=function(){return this.freeQueue_.getCount();};goog.structs.Pool.prototype.isEmpty=function(){return this.freeQueue_.isEmpty()&&this.inUseSet_.isEmpty();};goog.structs.Pool.prototype.disposeInternal=function(){goog.structs.Pool.superClass_.disposeInternal.call(this);if(0<this.getInUseCount()){throw Error(goog.structs.Pool.ERROR_DISPOSE_UNRELEASED_OBJS_);}delete this.inUseSet_;for(var freeQueue=this.freeQueue_;!freeQueue.isEmpty();){this.disposeObject(freeQueue.dequeue());}delete this.freeQueue_;};goog.structs.Node=function(key,value){this.key_=key;this.value_=value;};goog.structs.Node.prototype.getKey=function(){return this.key_;};goog.structs.Node.prototype.getValue=function(){return this.value_;};goog.structs.Node.prototype.clone=function(){return new goog.structs.Node(this.key_,this.value_);};goog.structs.Heap=function(opt_heap){this.nodes_=[];opt_heap&&this.insertAll(opt_heap);};goog.structs.Heap.prototype.insert=function(key,value){var node=new goog.structs.Node(key,value),nodes=this.nodes_;nodes.push(node);this.moveUp_(nodes.length-1);};goog.structs.Heap.prototype.insertAll=function(heap){if(heap instanceof goog.structs.Heap){var keys=heap.getKeys();var values=heap.getValues();if(0>=this.getCount()){for(var nodes=this.nodes_,i=0;i<keys.length;i++){nodes.push(new goog.structs.Node(keys[i],values[i]));}return;}}else{keys=module$contents$goog$object_getKeys(heap),values=module$contents$goog$object_getValues(heap);}for(i=0;i<keys.length;i++){this.insert(keys[i],values[i]);}};goog.structs.Heap.prototype.remove=function(){var nodes=this.nodes_,count=nodes.length,rootNode=nodes[0];if(!(0>=count)){return 1==count?module$contents$goog$array_clear(nodes):(nodes[0]=nodes.pop(),this.moveDown_(0)),rootNode.getValue();}};goog.structs.Heap.prototype.peek=function(){var nodes=this.nodes_;if(0!=nodes.length){return nodes[0].getValue();}};goog.structs.Heap.prototype.peekKey=function(){return this.nodes_[0]&&this.nodes_[0].getKey();};goog.structs.Heap.prototype.moveDown_=function(index){for(var nodes=this.nodes_,count=nodes.length,node=nodes[index];index<count>>1;){var leftChildIndex=this.getLeftChildIndex_(index),rightChildIndex=this.getRightChildIndex_(index),smallerChildIndex=rightChildIndex<count&&nodes[rightChildIndex].getKey()<nodes[leftChildIndex].getKey()?rightChildIndex:leftChildIndex;if(nodes[smallerChildIndex].getKey()>node.getKey()){break;}nodes[index]=nodes[smallerChildIndex];index=smallerChildIndex;}nodes[index]=node;};goog.structs.Heap.prototype.moveUp_=function(index){for(var nodes=this.nodes_,node=nodes[index];0<index;){var parentIndex=this.getParentIndex_(index);if(nodes[parentIndex].getKey()>node.getKey()){nodes[index]=nodes[parentIndex],index=parentIndex;}else{break;}}nodes[index]=node;};goog.structs.Heap.prototype.getLeftChildIndex_=function(index){return 2*index+1;};goog.structs.Heap.prototype.getRightChildIndex_=function(index){return 2*index+2;};goog.structs.Heap.prototype.getParentIndex_=function(index){return index-1>>1;};goog.structs.Heap.prototype.getValues=function(){for(var nodes=this.nodes_,rv=[],l=nodes.length,i=0;i<l;i++){rv.push(nodes[i].getValue());}return rv;};goog.structs.Heap.prototype.getKeys=function(){for(var nodes=this.nodes_,rv=[],l=nodes.length,i=0;i<l;i++){rv.push(nodes[i].getKey());}return rv;};goog.structs.Heap.prototype.containsValue=function(val){return module$contents$goog$array_some(this.nodes_,function(node){return node.getValue()==val;});};goog.structs.Heap.prototype.containsKey=function(key){return module$contents$goog$array_some(this.nodes_,function(node){return node.getKey()==key;});};goog.structs.Heap.prototype.clone=function(){return new goog.structs.Heap(this);};goog.structs.Heap.prototype.getCount=function(){return this.nodes_.length;};goog.structs.Heap.prototype.isEmpty=function(){return 0===this.nodes_.length;};goog.structs.Heap.prototype.clear=function(){module$contents$goog$array_clear(this.nodes_);};goog.structs.PriorityQueue=function(){goog.structs.Heap.call(this);};goog.inherits(goog.structs.PriorityQueue,goog.structs.Heap);goog.structs.PriorityQueue.prototype.enqueue=function(priority,value){this.insert(priority,value);};goog.structs.PriorityQueue.prototype.dequeue=function(){return this.remove();};goog.structs.PriorityPool=function(opt_minCount,opt_maxCount){this.delayTimeout_=void 0;this.requestQueue_=new goog.structs.PriorityQueue();goog.structs.Pool.call(this,opt_minCount,opt_maxCount);};goog.inherits(goog.structs.PriorityPool,goog.structs.Pool);goog.structs.PriorityPool.DEFAULT_PRIORITY_=100;goog.structs.PriorityPool.prototype.setDelay=function(delay){goog.structs.PriorityPool.superClass_.setDelay.call(this,delay);null!=this.lastAccess&&(goog.global.clearTimeout(this.delayTimeout_),this.delayTimeout_=goog.global.setTimeout(goog.bind(this.handleQueueRequests_,this),this.delay+this.lastAccess-Date.now()),this.handleQueueRequests_());};goog.structs.PriorityPool.prototype.getObject=function(opt_callback,opt_priority){if(!opt_callback){var result=goog.structs.PriorityPool.superClass_.getObject.call(this);result&&this.delay&&(this.delayTimeout_=goog.global.setTimeout(goog.bind(this.handleQueueRequests_,this),this.delay));return result;}this.requestQueue_.enqueue(void 0!==opt_priority?opt_priority:goog.structs.PriorityPool.DEFAULT_PRIORITY_,opt_callback);this.handleQueueRequests_();};goog.structs.PriorityPool.prototype.handleQueueRequests_=function(){for(var requestQueue=this.requestQueue_;0<requestQueue.getCount();){var obj=this.getObject();if(obj){requestQueue.dequeue().apply(this,[obj]);}else{break;}}};goog.structs.PriorityPool.prototype.addFreeObject=function(obj){goog.structs.PriorityPool.superClass_.addFreeObject.call(this,obj);this.handleQueueRequests_();};goog.structs.PriorityPool.prototype.adjustForMinMax=function(){goog.structs.PriorityPool.superClass_.adjustForMinMax.call(this);this.handleQueueRequests_();};goog.structs.PriorityPool.prototype.disposeInternal=function(){goog.structs.PriorityPool.superClass_.disposeInternal.call(this);goog.global.clearTimeout(this.delayTimeout_);this.requestQueue_.clear();this.requestQueue_=null;};var module$contents$ee$layers$EarthEngineTileSource_EarthEngineTileSource=function(mapId,opt_profiler){module$exports$ee$layers$AbstractTileSource.call(this);this.mapId_=mapId;this.profiler_=opt_profiler||null;};$jscomp.inherits(module$contents$ee$layers$EarthEngineTileSource_EarthEngineTileSource,module$exports$ee$layers$AbstractTileSource);module$contents$ee$layers$EarthEngineTileSource_EarthEngineTileSource.prototype.loadTile=function(tile,opt_priority){var ProfilerHeader=module$contents$ee$apiclient_apiclient.PROFILE_HEADER.toLowerCase(),key=goog.events.listen(tile,ee.layers.AbstractTile.EventType.STATUS_CHANGED,function(){switch(tile.getStatus()){case ee.layers.AbstractTile.Status.LOADED:var profileId=tile.sourceResponseHeaders[ProfilerHeader];this.profiler_&&profileId&&this.profiler_.addTile(tile.div.id,profileId);break;case ee.layers.AbstractTile.Status.FAILED:case ee.layers.AbstractTile.Status.ABORTED:this.profiler_&&""!==tile.div.id&&this.profiler_.removeTile(tile.div.id),goog.events.unlistenByKey(key);}},void 0,this);tile.sourceUrl=this.getTileUrl_(tile.coord,tile.zoom);var handleAvailableToken=goog.bind(this.handleAvailableToken_,this,tile);module$contents$ee$layers$EarthEngineTileSource_EarthEngineTileSource.getGlobalTokenPool_().getObject(handleAvailableToken,opt_priority);};module$contents$ee$layers$EarthEngineTileSource_EarthEngineTileSource.prototype.getUniqueId=function(){return this.mapId_.mapid+"-"+this.mapId_.token;};module$contents$ee$layers$EarthEngineTileSource_EarthEngineTileSource.prototype.handleAvailableToken_=function(tile,token){var tokenPool=module$contents$ee$layers$EarthEngineTileSource_EarthEngineTileSource.getGlobalTokenPool_();if(tile.isDisposed()||tile.getStatus()==ee.layers.AbstractTile.Status.ABORTED){tokenPool.releaseObject(token);}else{var key=goog.events.listen(tile,ee.layers.AbstractTile.EventType.STATUS_CHANGED,function(){tile.isDone()&&(goog.events.unlistenByKey(key),tokenPool.releaseObject(token));});tile.startLoad();}};module$contents$ee$layers$EarthEngineTileSource_EarthEngineTileSource.prototype.getTileUrl_=function(coord,zoom){var url=ee.data.getTileUrl(this.mapId_,coord.x,coord.y,zoom);return this.profiler_&&this.profiler_.isEnabled()?url+"&profiling=1":url;};module$contents$ee$layers$EarthEngineTileSource_EarthEngineTileSource.getGlobalTokenPool_=function(){module$contents$ee$layers$EarthEngineTileSource_EarthEngineTileSource.TOKEN_POOL_||(module$contents$ee$layers$EarthEngineTileSource_EarthEngineTileSource.TOKEN_POOL_=new goog.structs.PriorityPool(0,module$contents$ee$layers$EarthEngineTileSource_EarthEngineTileSource.TOKEN_COUNT_));return module$contents$ee$layers$EarthEngineTileSource_EarthEngineTileSource.TOKEN_POOL_;};goog.exportSymbol("ee.layers.EarthEngineTileSource",module$contents$ee$layers$EarthEngineTileSource_EarthEngineTileSource);module$contents$ee$layers$EarthEngineTileSource_EarthEngineTileSource.TOKEN_POOL_=null;module$contents$ee$layers$EarthEngineTileSource_EarthEngineTileSource.TOKEN_COUNT_=4;ee.layers.EarthEngineTileSource=module$contents$ee$layers$EarthEngineTileSource_EarthEngineTileSource;goog.singleton={};var module$contents$goog$singleton_instantiatedSingletons=[],module$contents$goog$singleton_Singleton=function(){};goog.singleton.getInstance=function(ctor){(0,goog.asserts.assert)(!Object.isSealed(ctor),"Cannot use getInstance() with a sealed constructor.");if(ctor.instance_&&ctor.hasOwnProperty("instance_")){return ctor.instance_;}goog.DEBUG&&module$contents$goog$singleton_instantiatedSingletons.push(ctor);var instance=new ctor();ctor.instance_=instance;(0,goog.asserts.assert)(ctor.hasOwnProperty("instance_"),"Could not instantiate singleton.");return instance;};goog.singleton.instantiatedSingletons=module$contents$goog$singleton_instantiatedSingletons;ee.MapTileManager=function(){goog.events.EventTarget.call(this);this.tokenPool_=new ee.MapTileManager.TokenPool_(0,60);this.requests_=new goog.structs.Map();};$jscomp.inherits(ee.MapTileManager,goog.events.EventTarget);ee.MapTileManager.prototype.getOutstandingCount=function(){return this.requests_.getCount();};ee.MapTileManager.prototype.send=function(id,url,opt_priority,opt_imageCompletedCallback,opt_maxRetries){if(this.requests_.get(id)){throw Error(ee.MapTileManager.ERROR_ID_IN_USE_);}var request=new ee.MapTileManager.Request_(id,url,opt_imageCompletedCallback,goog.bind(this.releaseRequest_,this),void 0!==opt_maxRetries?opt_maxRetries:ee.MapTileManager.MAX_RETRIES);this.requests_.set(id,request);var callback=goog.bind(this.handleAvailableToken_,this,request);this.tokenPool_.getObject(callback,opt_priority);return request;};ee.MapTileManager.prototype.abort=function(id){var request=this.requests_.get(id);request&&(request.setAborted(!0),this.releaseRequest_(request));};ee.MapTileManager.prototype.handleAvailableToken_=function(request,token){if(request.getImageLoader()||request.getAborted()){this.releaseObject_(token);}else{if(request.setToken(token),token.setActive(!0),request.setImageLoader(new goog.net.ImageLoader()),!request.retry()){throw Error("Cannot dispatch first request!");}}};ee.MapTileManager.prototype.releaseRequest_=function(request){this.requests_.remove(request.getId());request.getImageLoader()&&(this.releaseObject_(request.getToken()),request.getImageLoader().dispose());request.fireImageEventCallback();};ee.MapTileManager.prototype.releaseObject_=function(token){token.setActive(!1);if(!this.tokenPool_.releaseObject(token)){throw Error("Object not released");}};ee.MapTileManager.prototype.disposeInternal=function(){goog.events.EventTarget.prototype.disposeInternal.call(this);this.tokenPool_.dispose();this.tokenPool_=null;var requests=this.requests_;module$contents$goog$array_forEach(requests.getValues(),function(value){value.dispose();});requests.clear();this.requests_=null;};ee.MapTileManager.getInstance=function(){return goog.singleton.getInstance(ee.MapTileManager);};goog.exportSymbol("ee.MapTileManager",ee.MapTileManager);ee.MapTileManager.MAX_RETRIES=1;ee.MapTileManager.ERROR_ID_IN_USE_="[ee.MapTileManager] ID in use";ee.MapTileManager.Request_=function(id,url,opt_imageEventCallback,opt_requestCompleteCallback,opt_maxRetries){goog.Disposable.call(this);this.id_=id;this.url_=url;this.maxRetries_=void 0!==opt_maxRetries?opt_maxRetries:ee.MapTileManager.MAX_RETRIES;this.imageEventCallback_=opt_imageEventCallback;this.requestCompleteCallback_=opt_requestCompleteCallback;};$jscomp.inherits(ee.MapTileManager.Request_,goog.Disposable);ee.MapTileManager.Request_.prototype.getImageLoader=function(){return this.imageLoader_;};ee.MapTileManager.Request_.prototype.setImageLoader=function(imageLoader){this.imageLoader_=imageLoader;};ee.MapTileManager.Request_.prototype.getToken=function(){return this.token_;};ee.MapTileManager.Request_.prototype.setToken=function(token){this.token_=token;};ee.MapTileManager.Request_.prototype.addImageEventListener=function(){goog.events.listenOnce(this.imageLoader_,ee.MapTileManager.Request_.IMAGE_LOADER_EVENT_TYPES_,goog.bind(this.handleImageEvent_,this));};ee.MapTileManager.Request_.prototype.fireImageEventCallback=function(){this.imageEventCallback_&&this.imageEventCallback_(this.event_,this.profileId_);};ee.MapTileManager.Request_.prototype.getId=function(){return this.id_;};ee.MapTileManager.Request_.prototype.getUrl=function(){return this.url_;};ee.MapTileManager.Request_.prototype.getMaxRetries=function(){return this.maxRetries_;};ee.MapTileManager.Request_.prototype.getAttemptCount=function(){return this.attemptCount_;};ee.MapTileManager.Request_.prototype.increaseAttemptCount=function(){this.attemptCount_++;};ee.MapTileManager.Request_.prototype.hasReachedMaxRetries=function(){return this.attemptCount_>this.maxRetries_;};ee.MapTileManager.Request_.prototype.setAborted=function(aborted){aborted&&!this.aborted_&&(this.aborted_=aborted,this.event_=new goog.events.Event(goog.net.EventType.ABORT));};ee.MapTileManager.Request_.prototype.getAborted=function(){return this.aborted_;};ee.MapTileManager.Request_.prototype.handleImageEvent_=function(e){if(this.getAborted()){this.markCompleted_();}else{switch(e.type){case goog.events.EventType.LOAD:this.handleSuccess_(e);this.markCompleted_();break;case goog.net.EventType.ERROR:case goog.net.EventType.ABORT:this.handleError_(e);}}};ee.MapTileManager.Request_.prototype.markCompleted_=function(){this.requestCompleteCallback_&&this.requestCompleteCallback_(this);};ee.MapTileManager.Request_.prototype.handleSuccess_=function(e){this.event_=e;};ee.MapTileManager.Request_.prototype.handleError_=function(e){this.retry()||(this.event_=e,this.markCompleted_());};ee.MapTileManager.Request_.prototype.disposeInternal=function(){goog.Disposable.prototype.disposeInternal.call(this);delete this.imageEventCallback_;delete this.requestCompleteCallback_;};ee.MapTileManager.Request_.prototype.retry=function(){if(this.hasReachedMaxRetries()){return!1;}this.increaseAttemptCount();this.imageLoader_.removeImage(this.id_);setTimeout(goog.bind(this.start_,this),0);return!0;};ee.MapTileManager.Request_.prototype.start_=function(){if(!this.getAborted()){var actuallyLoadImage=goog.bind(function(imageUrl){this.getAborted()||(this.imageLoader_.addImage(this.id_,imageUrl),this.addImageEventListener(),this.imageLoader_.start());},this),sourceUrl=this.getUrl();if(goog.Uri.parse(sourceUrl).getQueryData().containsKey("profiling")){var xhrIo=new goog.net.XhrIo();xhrIo.setResponseType(goog.net.XhrIo.ResponseType.BLOB);xhrIo.listen(goog.net.EventType.COMPLETE,goog.bind(function(event){this.profileId_=xhrIo.getResponseHeader(module$contents$ee$apiclient_apiclient.PROFILE_HEADER)||null;if(200<=xhrIo.getStatus()&&300>xhrIo.getStatus()){try{var objectUrl=goog.html.SafeUrl.unwrap(goog.html.SafeUrl.fromBlob(xhrIo.getResponse()));var ok=objectUrl!==goog.html.SafeUrl.INNOCUOUS_STRING;}catch(e){}}actuallyLoadImage(ok?objectUrl:sourceUrl);},this));xhrIo.listenOnce(goog.net.EventType.READY,goog.bind(xhrIo.dispose,xhrIo));xhrIo.send(sourceUrl,"GET");}else{actuallyLoadImage(sourceUrl);}}};ee.MapTileManager.Request_.prototype.attemptCount_=0;ee.MapTileManager.Request_.prototype.aborted_=!1;ee.MapTileManager.Request_.prototype.imageLoader_=null;ee.MapTileManager.Request_.prototype.token_=null;ee.MapTileManager.Request_.prototype.event_=null;ee.MapTileManager.Request_.prototype.profileId_=null;ee.MapTileManager.Request_.IMAGE_LOADER_EVENT_TYPES_=[goog.events.EventType.LOAD,goog.net.EventType.ABORT,goog.net.EventType.ERROR];ee.MapTileManager.Token_=function(){goog.Disposable.call(this);this.active_=!1;};$jscomp.inherits(ee.MapTileManager.Token_,goog.Disposable);ee.MapTileManager.Token_.prototype.setActive=function(val){this.active_=val;};ee.MapTileManager.Token_.prototype.isActive=function(){return this.active_;};ee.MapTileManager.TokenPool_=function(opt_minCount,opt_maxCount){goog.structs.PriorityPool.call(this,opt_minCount,opt_maxCount);};$jscomp.inherits(ee.MapTileManager.TokenPool_,goog.structs.PriorityPool);ee.MapTileManager.TokenPool_.prototype.createObject=function(){return new ee.MapTileManager.Token_();};ee.MapTileManager.TokenPool_.prototype.disposeObject=function(obj){obj.dispose();};ee.MapTileManager.TokenPool_.prototype.objectCanBeReused=function(obj){return!obj.isDisposed()&&!obj.isActive();};ee.MapLayerOverlay=function(url,mapId,token,init,opt_profiler){ee.AbstractOverlay.call(this,url,mapId,token,init,opt_profiler);this.minZoom=init.minZoom||0;this.maxZoom=init.maxZoom||20;if(!window.google||!window.google.maps){throw Error("Google Maps API hasn't been initialized.");}this.tileSize=init.tileSize||new google.maps.Size(256,256);this.isPng=void 0!==init.isPng?init.isPng:!0;this.name=init.name;this.tiles_=new goog.structs.Set();this.opacity_=1.0;this.visible_=!0;this.profiler_=opt_profiler||null;};$jscomp.inherits(ee.MapLayerOverlay,ee.AbstractOverlay);ee.MapLayerOverlay.prototype.addTileCallback=function(callback){return goog.events.listen(this,ee.AbstractOverlay.EventType.TILE_LOADED,callback);};ee.MapLayerOverlay.prototype.removeTileCallback=function(callbackId){goog.events.unlistenByKey(callbackId);};ee.MapLayerOverlay.prototype.dispatchTileEvent_=function(){this.dispatchEvent(new ee.TileEvent(this.tilesLoading.length));};ee.MapLayerOverlay.prototype.getTile=function(coord,zoom,ownerDocument){var maxCoord;if(zoom<this.minZoom||0>coord.y||coord.y>=1<<zoom){var img=ownerDocument.createElement("IMG");img.style.width="0px";img.style.height="0px";return img;}var profiling=this.profiler_&&this.profiler_.isEnabled(),tileId=this.getTileId(coord,zoom),src=[this.url,tileId].join("/")+"?token="+this.token;profiling&&(src+="&profiling=1");var uniqueTileId=[tileId,this.tileCounter,this.token].join("/");this.tileCounter+=1;var div=goog.dom.createDom(goog.dom.TagName.DIV,{id:uniqueTileId}),priority=new Date().getTime()/1000;this.tilesLoading.push(uniqueTileId);ee.MapTileManager.getInstance().send(uniqueTileId,src,priority,goog.bind(this.handleImageCompleted_,this,div,uniqueTileId));this.dispatchTileEvent_();return div;};ee.MapLayerOverlay.prototype.getLoadedTilesCount=function(){return this.tiles_.getCount();};ee.MapLayerOverlay.prototype.getLoadingTilesCount=function(){return this.tilesLoading.length;};ee.MapLayerOverlay.prototype.releaseTile=function(tileDiv){ee.MapTileManager.getInstance().abort(tileDiv.id);this.tiles_.remove(goog.dom.getFirstElementChild(tileDiv));""!==tileDiv.id&&(this.tilesFailed.remove(tileDiv.id),this.profiler_&&this.profiler_.removeTile(tileDiv.id));};ee.MapLayerOverlay.prototype.setOpacity=function(opacity){this.opacity_=opacity;var iter=this.tiles_.__iterator__();goog.iter.forEach(iter,function(tile){goog.style.setOpacity(tile,opacity);});};ee.MapLayerOverlay.prototype.handleImageCompleted_=function(div,tileId,e,profileId){if(e.type==goog.net.EventType.ERROR){module$contents$goog$array_remove(this.tilesLoading,tileId),this.tilesFailed.add(tileId),this.dispatchEvent(e);}else{module$contents$goog$array_remove(this.tilesLoading,tileId);if(e.target&&e.type==goog.events.EventType.LOAD){var tile=e.target;this.tiles_.add(tile);1.0!=this.opacity_&&goog.style.setOpacity(tile,this.opacity_);div.appendChild(tile);}this.dispatchTileEvent_();}this.profiler_&&null!==profileId&&this.profiler_.addTile(tileId,profileId);};goog.exportSymbol("ee.MapLayerOverlay",ee.MapLayerOverlay);goog.exportProperty(ee.MapLayerOverlay.prototype,"removeTileCallback",ee.MapLayerOverlay.prototype.removeTileCallback);goog.exportProperty(ee.MapLayerOverlay.prototype,"addTileCallback",ee.MapLayerOverlay.prototype.addTileCallback);goog.exportProperty(ee.MapLayerOverlay.prototype,"getTile",ee.MapLayerOverlay.prototype.getTile);goog.exportProperty(ee.MapLayerOverlay.prototype,"setOpacity",ee.MapLayerOverlay.prototype.setOpacity);goog.exportProperty(ee.MapLayerOverlay.prototype,"releaseTile",ee.MapLayerOverlay.prototype.releaseTile);goog.async.Delay=function(listener,opt_interval,opt_handler){goog.Disposable.call(this);this.listener_=listener;this.interval_=opt_interval||0;this.handler_=opt_handler;this.callback_=goog.bind(this.doAction_,this);};goog.inherits(goog.async.Delay,goog.Disposable);goog.async.Delay.prototype.id_=0;goog.async.Delay.prototype.disposeInternal=function(){goog.async.Delay.superClass_.disposeInternal.call(this);this.stop();delete this.listener_;delete this.handler_;};goog.async.Delay.prototype.start=function(opt_interval){this.stop();this.id_=goog.Timer.callOnce(this.callback_,void 0!==opt_interval?opt_interval:this.interval_);};goog.async.Delay.prototype.startIfNotActive=function(opt_interval){this.isActive()||this.start(opt_interval);};goog.async.Delay.prototype.stop=function(){this.isActive()&&goog.Timer.clear(this.id_);this.id_=0;};goog.async.Delay.prototype.fire=function(){this.stop();this.doAction_();};goog.async.Delay.prototype.fireIfActive=function(){this.isActive()&&this.fire();};goog.async.Delay.prototype.isActive=function(){return 0!=this.id_;};goog.async.Delay.prototype.doAction_=function(){this.id_=0;this.listener_&&this.listener_.call(this.handler_);};ee.data.Profiler=function(format){goog.events.EventTarget.call(this);this.format_=format;this.isEnabled_=!1;this.lastRefreshToken_=null;this.profileIds_=Object.create(null);this.tileProfileIds_=Object.create(null);this.showInternal_=!1;this.profileError_=null;this.throttledRefresh_=new goog.async.Delay(goog.bind(this.refresh_,this),ee.data.Profiler.DELAY_BEFORE_REFRESH_);this.profileData_=ee.data.Profiler.getEmptyProfile_(format);this.MAX_RETRY_COUNT_=5;};$jscomp.inherits(ee.data.Profiler,goog.events.EventTarget);ee.data.Profiler.prototype.isEnabled=function(){return this.isEnabled_;};ee.data.Profiler.prototype.setEnabled=function(value){this.isEnabled_=!!value;this.dispatchEvent(new goog.events.Event(ee.data.Profiler.EventType.STATE_CHANGED));};ee.data.Profiler.prototype.isLoading=function(){return null!==this.lastRefreshToken_;};ee.data.Profiler.prototype.isError=function(){return null!=this.profileError_;};ee.data.Profiler.prototype.getStatusText=function(){if(this.profileError_){return this.profileError_;}if(this.lastRefreshToken_){return"Loading...";}var profiles=0,nonTileProfiles=0,tileProfiles=0;module$contents$goog$object_forEach(this.profileIds_,function(refCount){profiles++;Infinity===refCount?nonTileProfiles++:tileProfiles++;},this);return"Viewing "+profiles+" profiles, "+nonTileProfiles+" from API calls and "+tileProfiles+" from map tiles.";};ee.data.Profiler.prototype.getProfileData=function(){return this.profileData_;};ee.data.Profiler.prototype.clearAndDrop=function(){this.profileIds_=Object.create(null);this.tileProfileIds_=Object.create(null);this.refresh_();};ee.data.Profiler.prototype.getProfileHook=function(){var profileIds=this.profileIds_;return this.isEnabled_?goog.bind(function(profileId){profileIds[profileId]=Infinity;this.throttledRefresh_.start();},this):null;};ee.data.Profiler.prototype.removeProfile_=function(profileId){var count=this.profileIds_[profileId];1<count?this.profileIds_[profileId]--:void 0!==count&&(delete this.profileIds_[profileId],this.throttledRefresh_.start());};ee.data.Profiler.prototype.refresh_=function(retryAttempt){var $jscomp$this=this;retryAttempt=void 0===retryAttempt?0:retryAttempt;var marker={};this.lastRefreshToken_=marker;var handleResponse=function(result,error){marker==$jscomp$this.lastRefreshToken_&&(error&&"number"===typeof retryAttempt&&retryAttempt<$jscomp$this.MAX_RETRY_COUNT_?goog.Timer.callOnce(goog.bind($jscomp$this.refresh_,$jscomp$this,retryAttempt+1),2*ee.data.Profiler.DELAY_BEFORE_REFRESH_):($jscomp$this.profileError_=error||null,$jscomp$this.profileData_=error?ee.data.Profiler.getEmptyProfile_($jscomp$this.format_):result,$jscomp$this.lastRefreshToken_=null,$jscomp$this.dispatchEvent(ee.data.Profiler.EventType.STATE_CHANGED),$jscomp$this.dispatchEvent(ee.data.Profiler.EventType.DATA_CHANGED)));},ids=module$contents$goog$object_getKeys(this.profileIds_);0===ids.length?handleResponse(ee.data.Profiler.getEmptyProfile_(this.format_),void 0):(ee.ApiFunction._apply(this.showInternal_?"Profile.getProfilesInternal":"Profile.getProfiles",{ids:ids,format:this.format_.toString()}).getInfo(handleResponse),this.dispatchEvent(ee.data.Profiler.EventType.STATE_CHANGED));};ee.data.Profiler.prototype.addTile=function(tileId,profileId){this.tileProfileIds_[tileId]||(this.tileProfileIds_[tileId]=profileId,this.profileIds_[profileId]=(this.profileIds_[profileId]||0)+1,this.throttledRefresh_.start());};ee.data.Profiler.prototype.removeTile=function(tileId){var profileId=this.tileProfileIds_[tileId];profileId&&(delete this.tileProfileIds_[tileId],this.removeProfile_(profileId));};ee.data.Profiler.prototype.getShowInternal=function(){return this.showInternal_;};ee.data.Profiler.prototype.setShowInternal=function(value){this.showInternal_=!!value;this.throttledRefresh_.fire();};ee.data.Profiler.prototype.setParentEventTarget=function(parent){throw Error("not applicable");};ee.data.Profiler.getEmptyProfile_=function(format){switch(format){case ee.data.Profiler.Format.TEXT:return"";case ee.data.Profiler.Format.JSON:return ee.data.Profiler.EMPTY_JSON_PROFILE_;default:throw Error("Invalid Profiler data format: "+format);}};ee.data.Profiler.DELAY_BEFORE_REFRESH_=500;ee.data.Profiler.EMPTY_JSON_PROFILE_={cols:[],rows:[]};ee.data.Profiler.EventType={STATE_CHANGED:"statechanged",DATA_CHANGED:"datachanged"};ee.data.Profiler.Format=function(format){this.format_=format;};ee.data.Profiler.Format.prototype.toString=function(){return this.format_;};ee.data.Profiler.Format.TEXT=new ee.data.Profiler.Format("text");ee.data.Profiler.Format.JSON=new ee.data.Profiler.Format("json");(function(){var exportedFnInfo={},orderedFnNames="ee.ApiFunction._call ee.ApiFunction._apply ee.ApiFunction.lookup ee.batch.Export.table.toDmsLayer ee.batch.Export.image.toAsset ee.batch.Export.videoMap.toCloudStorage ee.batch.Export.video.toCloudStorage ee.batch.Export.classifier.toAsset ee.batch.Export.image.toCloudStorage ee.batch.Export.video.toDrive ee.batch.Export.image.toDrive ee.batch.Export.table.toAsset ee.batch.Export.map.toCloudStorage ee.batch.Export.table.toDrive ee.batch.Export.table.toCloudStorage ee.Collection.prototype.filterDate ee.Collection.prototype.filter ee.Collection.prototype.filterMetadata ee.Collection.prototype.limit ee.Collection.prototype.map ee.Collection.prototype.filterBounds ee.Collection.prototype.sort ee.Collection.prototype.iterate ee.ComputedObject.prototype.aside ee.ComputedObject.prototype.evaluate ee.ComputedObject.prototype.serialize ee.ComputedObject.prototype.getInfo ee.data.authenticateViaPopup ee.data.makeTableDownloadUrl ee.data.newTaskId ee.data.getList ee.data.authenticateViaPrivateKey ee.data.cancelOperation ee.data.getTaskStatus ee.data.listAssets ee.data.authenticateViaOauth ee.data.getOperation ee.data.startTableIngestion ee.data.listOperations ee.data.getAssetAcl ee.data.listImages ee.data.cancelTask ee.data.getMapId ee.data.getDmsTilesKey ee.data.getAsset ee.data.getThumbId ee.data.getInfo ee.data.getTaskList ee.data.listBuckets ee.data.authenticate ee.data.createAssetHome ee.data.deleteAsset ee.data.getTileUrl ee.data.getAssetRoots ee.data.computeValue ee.data.updateTask ee.data.getTaskListWithLimit ee.data.startIngestion ee.data.getVideoThumbId ee.data.startProcessing ee.data.getFilmstripThumbId ee.data.getAssetRootQuota ee.data.createAsset ee.data.makeThumbUrl ee.data.createFolder ee.data.getDownloadId ee.data.renameAsset ee.data.updateAsset ee.data.makeDownloadUrl ee.data.getTableDownloadId ee.data.setAssetProperties ee.data.copyAsset ee.data.setAssetAcl ee.Date ee.Deserializer.fromCloudApiJSON ee.Deserializer.fromJSON ee.Deserializer.decode ee.Deserializer.decodeCloudApi ee.Dictionary ee.reset ee.call ee.TILE_SIZE ee.InitState ee.apply ee.initialize ee.Algorithms ee.Element.prototype.set ee.Feature ee.Feature.prototype.getMap ee.Feature.prototype.getInfo ee.FeatureCollection.prototype.getMap ee.FeatureCollection.prototype.getInfo ee.FeatureCollection ee.FeatureCollection.prototype.select ee.FeatureCollection.prototype.getDownloadURL ee.Filter.prototype.not ee.Filter.date ee.Filter.gte ee.Filter.neq ee.Filter.and ee.Filter.metadata ee.Filter.gt ee.Filter.lte ee.Filter.inList ee.Filter.eq ee.Filter ee.Filter.or ee.Filter.bounds ee.Filter.lt ee.Function.prototype.apply ee.Function.prototype.call ee.Geometry.MultiLineString ee.Geometry.prototype.toGeoJSON ee.Geometry.BBox ee.Geometry ee.Geometry.prototype.toGeoJSONString ee.Geometry.Rectangle ee.Geometry.Polygon ee.Geometry.MultiPolygon ee.Geometry.LinearRing ee.Geometry.LineString ee.Geometry.prototype.serialize ee.Geometry.Point ee.Geometry.MultiPoint ee.Image.cat ee.Image.prototype.select ee.Image.prototype.getInfo ee.Image.prototype.expression ee.Image.prototype.rename ee.Image.prototype.getThumbId ee.Image.prototype.clip ee.Image.prototype.getMap ee.Image.prototype.getDownloadURL ee.Image.prototype.getThumbURL ee.Image ee.Image.rgb ee.ImageCollection.prototype.getVideoThumbURL ee.ImageCollection.prototype.getInfo ee.ImageCollection.prototype.first ee.ImageCollection ee.ImageCollection.prototype.getMap ee.ImageCollection.prototype.getFilmstripThumbURL ee.ImageCollection.prototype.select ee.List ee.Number ee.Serializer.toReadableCloudApiJSON ee.Serializer.encodeCloudApi ee.Serializer.toCloudApiJSON ee.Serializer.encode ee.Serializer.encodeCloudApiPretty ee.Serializer.toReadableJSON ee.Serializer.toJSON ee.String ee.Terrain".split(" "),orderedParamLists=[["name","var_args"],["name","namedArgs"],["name"],["collection","opt_description","opt_assetId","opt_maxVertices"],"image opt_description opt_assetId opt_pyramidingPolicy opt_dimensions opt_region opt_scale opt_crs opt_crsTransform opt_maxPixels opt_shardSize".split(" "),"collection opt_description opt_bucket opt_fileNamePrefix opt_framesPerSecond opt_writePublicTiles opt_minZoom opt_maxZoom opt_scale opt_region opt_skipEmptyTiles opt_minTimeMachineZoomSubset opt_maxTimeMachineZoomSubset opt_tileWidth opt_tileHeight opt_tileStride opt_videoFormat opt_version opt_mapsApiKey opt_bucketCorsUris".split(" "),"collection opt_description opt_bucket opt_fileNamePrefix opt_framesPerSecond opt_dimensions opt_region opt_scale opt_crs opt_crsTransform opt_maxPixels opt_maxFrames".split(" "),["classifier","opt_description","opt_assetId"],"image opt_description opt_bucket opt_fileNamePrefix opt_dimensions opt_region opt_scale opt_crs opt_crsTransform opt_maxPixels opt_shardSize opt_fileDimensions opt_skipEmptyTiles opt_fileFormat opt_formatOptions".split(" "),"collection opt_description opt_folder opt_fileNamePrefix opt_framesPerSecond opt_dimensions opt_region opt_scale opt_crs opt_crsTransform opt_maxPixels opt_maxFrames".split(" "),"image opt_description opt_folder opt_fileNamePrefix opt_dimensions opt_region opt_scale opt_crs opt_crsTransform opt_maxPixels opt_shardSize opt_fileDimensions opt_skipEmptyTiles opt_fileFormat opt_formatOptions".split(" "),["collection","opt_description","opt_assetId","opt_maxVertices"],"image opt_description opt_bucket opt_fileFormat opt_path opt_writePublicTiles opt_scale opt_maxZoom opt_minZoom opt_region opt_skipEmptyTiles opt_mapsApiKey opt_bucketCorsUris".split(" "),"collection opt_description opt_folder opt_fileNamePrefix opt_fileFormat opt_selectors opt_maxVertices".split(" "),"collection opt_description opt_bucket opt_fileNamePrefix opt_fileFormat opt_selectors opt_maxVertices".split(" "),["start","opt_end"],["filter"],["name","operator","value"],["max","opt_property","opt_ascending"],["algorithm","opt_dropNulls"],["geometry"],["property","opt_ascending"],["algorithm","opt_first"],["func","var_args"],["callback"],["legacy"],["opt_callback"],["opt_success","opt_error"],["id"],["opt_count","opt_callback"],["params","opt_callback"],["privateKey","opt_success","opt_error","opt_extraScopes","opt_suppressDefaultScopes"],["operationName","opt_callback"],["taskId","opt_callback"],["parent","params","opt_callback"],"clientId success opt_error opt_extraScopes opt_onImmediateFailed opt_suppressDefaultScopes".split(" "),["operationName","opt_callback"],["taskId","request","opt_callback"],["opt_limit","opt_callback"],["assetId","opt_callback"],["parent","params","opt_callback"],["taskId","opt_callback"],["params","opt_callback"],["params","opt_callback"],["id","opt_callback"],["params","opt_callback"],["id","opt_callback"],["opt_callback"],["project","opt_callback"],["clientId","success","opt_error","opt_extraScopes","opt_onImmediateFailed"],["requestedId","opt_callback"],["assetId","opt_callback"],["id","x","y","z"],["opt_callback"],["obj","opt_callback"],["taskId","action","opt_callback"],["opt_limit","opt_callback"],["taskId","request","opt_callback"],["params","opt_callback"],["taskId","params","opt_callback"],["params","opt_callback"],["rootId","opt_callback"],["value","opt_path","opt_force","opt_properties","opt_callback"],["id"],["path","opt_force","opt_callback"],["params","opt_callback"],["sourceId","destinationId","opt_callback"],["assetId","asset","updateFields","opt_callback"],["id"],["params","opt_callback"],["assetId","properties","opt_callback"],["sourceId","destinationId","opt_overwrite","opt_callback"],["assetId","aclUpdate","opt_callback"],["date","opt_tz"],["json"],["json"],["json"],["json"],["opt_dict"],[],["func","var_args"],[],[],["func","namedArgs"],"opt_baseurl opt_tileurl opt_successCallback opt_errorCallback opt_xsrfToken opt_project".split(" "),[],["var_args"],["geometry","opt_properties"],["opt_visParams","opt_callback"],["opt_callback"],["opt_visParams","opt_callback"],["opt_callback"],["args","opt_column"],["propertySelectors","opt_newProperties","opt_retainGeometry"],["opt_format","opt_selectors","opt_filename","opt_callback"],[],["start","opt_end"],["name","value"],["name","value"],["var_args"],["name","operator","value"],["name","value"],["name","value"],["opt_leftField","opt_rightValue","opt_rightField","opt_leftValue"],["name","value"],["opt_filter"],["var_args"],["geometry","opt_errorMargin"],["name","value"],["namedArgs"],["var_args"],["coords","opt_proj","opt_geodesic","opt_maxError"],[],["west","south","east","north"],["geoJson","opt_proj","opt_geodesic","opt_evenOdd"],[],["coords","opt_proj","opt_geodesic","opt_evenOdd"],["coords","opt_proj","opt_geodesic","opt_maxError","opt_evenOdd"],["coords","opt_proj","opt_geodesic","opt_maxError","opt_evenOdd"],["coords","opt_proj","opt_geodesic","opt_maxError"],["coords","opt_proj","opt_geodesic","opt_maxError"],["legacy"],["coords","opt_proj"],["coords","opt_proj"],["var_args"],["var_args"],["opt_callback"],["expression","opt_map"],["var_args"],["params","opt_callback"],["geometry"],["opt_visParams","opt_callback"],["params","opt_callback"],["params","opt_callback"],["opt_args"],["r","g","b"],["params","opt_callback"],["opt_callback"],[],["args"],["opt_visParams","opt_callback"],["params","opt_callback"],["selectors","opt_names"],["list"],["number"],["obj"],["obj"],["obj"],["obj","opt_isCompound"],["obj"],["obj"],["obj"],["string"],[]];[ee.ApiFunction._call,ee.ApiFunction._apply,ee.ApiFunction.lookup,module$contents$ee$batch_Export.table.toDmsLayer,module$contents$ee$batch_Export.image.toAsset,module$contents$ee$batch_Export.videoMap.toCloudStorage,module$contents$ee$batch_Export.video.toCloudStorage,module$contents$ee$batch_Export.classifier.toAsset,module$contents$ee$batch_Export.image.toCloudStorage,module$contents$ee$batch_Export.video.toDrive,module$contents$ee$batch_Export.image.toDrive,module$contents$ee$batch_Export.table.toAsset,module$contents$ee$batch_Export.map.toCloudStorage,module$contents$ee$batch_Export.table.toDrive,module$contents$ee$batch_Export.table.toCloudStorage,ee.Collection.prototype.filterDate,ee.Collection.prototype.filter,ee.Collection.prototype.filterMetadata,ee.Collection.prototype.limit,ee.Collection.prototype.map,ee.Collection.prototype.filterBounds,ee.Collection.prototype.sort,ee.Collection.prototype.iterate,ee.ComputedObject.prototype.aside,ee.ComputedObject.prototype.evaluate,ee.ComputedObject.prototype.serialize,ee.ComputedObject.prototype.getInfo,ee.data.authenticateViaPopup,ee.data.makeTableDownloadUrl,ee.data.newTaskId,ee.data.getList,ee.data.authenticateViaPrivateKey,ee.data.cancelOperation,ee.data.getTaskStatus,ee.data.listAssets,ee.data.authenticateViaOauth,ee.data.getOperation,ee.data.startTableIngestion,ee.data.listOperations,ee.data.getAssetAcl,ee.data.listImages,ee.data.cancelTask,ee.data.getMapId,ee.data.getDmsTilesKey,ee.data.getAsset,ee.data.getThumbId,ee.data.getInfo,ee.data.getTaskList,ee.data.listBuckets,ee.data.authenticate,ee.data.createAssetHome,ee.data.deleteAsset,ee.data.getTileUrl,ee.data.getAssetRoots,ee.data.computeValue,ee.data.updateTask,ee.data.getTaskListWithLimit,ee.data.startIngestion,ee.data.getVideoThumbId,ee.data.startProcessing,ee.data.getFilmstripThumbId,ee.data.getAssetRootQuota,ee.data.createAsset,ee.data.makeThumbUrl,ee.data.createFolder,ee.data.getDownloadId,ee.data.renameAsset,ee.data.updateAsset,ee.data.makeDownloadUrl,ee.data.getTableDownloadId,ee.data.setAssetProperties,ee.data.copyAsset,ee.data.setAssetAcl,ee.Date,ee.Deserializer.fromCloudApiJSON,ee.Deserializer.fromJSON,ee.Deserializer.decode,ee.Deserializer.decodeCloudApi,ee.Dictionary,ee.reset,ee.call,ee.TILE_SIZE,ee.InitState,ee.apply,ee.initialize,ee.Algorithms,ee.Element.prototype.set,ee.Feature,ee.Feature.prototype.getMap,ee.Feature.prototype.getInfo,ee.FeatureCollection.prototype.getMap,ee.FeatureCollection.prototype.getInfo,ee.FeatureCollection,ee.FeatureCollection.prototype.select,ee.FeatureCollection.prototype.getDownloadURL,ee.Filter.prototype.not,ee.Filter.date,ee.Filter.gte,ee.Filter.neq,ee.Filter.and,ee.Filter.metadata,ee.Filter.gt,ee.Filter.lte,ee.Filter.inList,ee.Filter.eq,ee.Filter,ee.Filter.or,ee.Filter.bounds,ee.Filter.lt,ee.Function.prototype.apply,ee.Function.prototype.call,ee.Geometry.MultiLineString,ee.Geometry.prototype.toGeoJSON,ee.Geometry.BBox,ee.Geometry,ee.Geometry.prototype.toGeoJSONString,ee.Geometry.Rectangle,ee.Geometry.Polygon,ee.Geometry.MultiPolygon,ee.Geometry.LinearRing,ee.Geometry.LineString,ee.Geometry.prototype.serialize,ee.Geometry.Point,ee.Geometry.MultiPoint,ee.Image.cat,ee.Image.prototype.select,ee.Image.prototype.getInfo,ee.Image.prototype.expression,ee.Image.prototype.rename,ee.Image.prototype.getThumbId,ee.Image.prototype.clip,ee.Image.prototype.getMap,ee.Image.prototype.getDownloadURL,ee.Image.prototype.getThumbURL,ee.Image,ee.Image.rgb,ee.ImageCollection.prototype.getVideoThumbURL,ee.ImageCollection.prototype.getInfo,ee.ImageCollection.prototype.first,ee.ImageCollection,ee.ImageCollection.prototype.getMap,ee.ImageCollection.prototype.getFilmstripThumbURL,ee.ImageCollection.prototype.select,ee.List,ee.Number,ee.Serializer.toReadableCloudApiJSON,ee.Serializer.encodeCloudApi,ee.Serializer.toCloudApiJSON,ee.Serializer.encode,ee.Serializer.encodeCloudApiPretty,ee.Serializer.toReadableJSON,ee.Serializer.toJSON,ee.String,ee.Terrain].forEach(function(fn,i){fn&&(exportedFnInfo[fn.toString()]={name:orderedFnNames[i],paramNames:orderedParamLists[i]});});goog.global.EXPORTED_FN_INFO=exportedFnInfo;})();goog.Timer.defaultTimerObject=self;module.exports=goog.global.ee=ee;
|
|
14
|
+
*/goog.async.Deferred=function(opt_onCancelFunction,opt_defaultScope){this.sequence_=[];this.onCancelFunction_=opt_onCancelFunction;this.defaultScope_=opt_defaultScope||null;this.hadError_=this.fired_=!1;this.result_=void 0;this.silentlyCanceled_=this.blocking_=this.blocked_=!1;this.unhandledErrorId_=0;this.parent_=null;this.branches_=0;if(goog.async.Deferred.LONG_STACK_TRACES&&(this.constructorStack_=null,Error.captureStackTrace)){var target={stack:""};Error.captureStackTrace(target,goog.async.Deferred);"string"==typeof target.stack&&(this.constructorStack_=target.stack.replace(/^[^\n]*\n/,""));}};goog.async.Deferred.STRICT_ERRORS=!1;goog.async.Deferred.LONG_STACK_TRACES=!1;goog.async.Deferred.prototype.cancel=function(opt_deepCancel){if(this.hasFired()){this.result_ instanceof goog.async.Deferred&&this.result_.cancel();}else{if(this.parent_){var parent=this.parent_;delete this.parent_;opt_deepCancel?parent.cancel(opt_deepCancel):parent.branchCancel_();}this.onCancelFunction_?this.onCancelFunction_.call(this.defaultScope_,this):this.silentlyCanceled_=!0;this.hasFired()||this.errback(new goog.async.Deferred.CanceledError(this));}};goog.async.Deferred.prototype.branchCancel_=function(){this.branches_--;0>=this.branches_&&this.cancel();};goog.async.Deferred.prototype.continue_=function(isSuccess,res){this.blocked_=!1;this.updateResult_(isSuccess,res);};goog.async.Deferred.prototype.updateResult_=function(isSuccess,res){this.fired_=!0;this.result_=res;this.hadError_=!isSuccess;this.fire_();};goog.async.Deferred.prototype.check_=function(){if(this.hasFired()){if(!this.silentlyCanceled_){throw new goog.async.Deferred.AlreadyCalledError(this);}this.silentlyCanceled_=!1;}};goog.async.Deferred.prototype.callback=function(opt_result){this.check_();this.assertNotDeferred_(opt_result);this.updateResult_(!0,opt_result);};goog.async.Deferred.prototype.errback=function(opt_result){this.check_();this.assertNotDeferred_(opt_result);this.makeStackTraceLong_(opt_result);this.updateResult_(!1,opt_result);};goog.async.Deferred.unhandledErrorHandler_=function(e){throw e;};goog.async.Deferred.setUnhandledErrorHandler=function(handler){goog.async.Deferred.unhandledErrorHandler_=handler;};goog.async.Deferred.prototype.makeStackTraceLong_=function(error){goog.async.Deferred.LONG_STACK_TRACES&&this.constructorStack_&&goog.isObject(error)&&error.stack&&/^[^\n]+(\n [^\n]+)+/.test(error.stack)&&(error.stack=error.stack+"\nDEFERRED OPERATION:\n"+this.constructorStack_);};goog.async.Deferred.prototype.assertNotDeferred_=function(obj){goog.asserts.assert(!(obj instanceof goog.async.Deferred),"An execution sequence may not be initiated with a blocking Deferred.");};goog.async.Deferred.prototype.addCallback=function(cb,opt_scope){return this.addCallbacks(cb,null,opt_scope);};goog.async.Deferred.prototype.addErrback=function(eb,opt_scope){return this.addCallbacks(null,eb,opt_scope);};goog.async.Deferred.prototype.addBoth=function(f,opt_scope){return this.addCallbacks(f,f,opt_scope);};goog.async.Deferred.prototype.addFinally=function(f,opt_scope){return this.addCallbacks(f,function(err){var result=f.call(this,err);if(void 0===result){throw err;}return result;},opt_scope);};goog.async.Deferred.prototype.addCallbacks=function(cb,eb,opt_scope){goog.asserts.assert(!this.blocking_,"Blocking Deferreds can not be re-used");this.sequence_.push([cb,eb,opt_scope]);this.hasFired()&&this.fire_();return this;};goog.async.Deferred.prototype.then=function(opt_onFulfilled,opt_onRejected,opt_context){var reject,resolve,promise=new goog.Promise(function(res,rej){resolve=res;reject=rej;});this.addCallbacks(resolve,function(reason){reason instanceof goog.async.Deferred.CanceledError?promise.cancel():reject(reason);});return promise.then(opt_onFulfilled,opt_onRejected,opt_context);};goog.Thenable.addImplementation(goog.async.Deferred);goog.async.Deferred.prototype.chainDeferred=function(otherDeferred){this.addCallbacks(otherDeferred.callback,otherDeferred.errback,otherDeferred);return this;};goog.async.Deferred.prototype.awaitDeferred=function(otherDeferred){return otherDeferred instanceof goog.async.Deferred?this.addCallback(goog.bind(otherDeferred.branch,otherDeferred)):this.addCallback(function(){return otherDeferred;});};goog.async.Deferred.prototype.branch=function(opt_propagateCancel){var d=new goog.async.Deferred();this.chainDeferred(d);opt_propagateCancel&&(d.parent_=this,this.branches_++);return d;};goog.async.Deferred.prototype.hasFired=function(){return this.fired_;};goog.async.Deferred.prototype.isError=function(res){return res instanceof Error;};goog.async.Deferred.prototype.hasErrback_=function(){return module$contents$goog$array_some(this.sequence_,function(sequenceRow){return"function"===typeof sequenceRow[1];});};goog.async.Deferred.prototype.getLastValueForMigration=function(){return this.hasFired()&&!this.hadError_?this.result_:void 0;};goog.async.Deferred.prototype.fire_=function(){this.unhandledErrorId_&&this.hasFired()&&this.hasErrback_()&&(goog.async.Deferred.unscheduleError_(this.unhandledErrorId_),this.unhandledErrorId_=0);this.parent_&&(this.parent_.branches_--,delete this.parent_);for(var res=this.result_,unhandledException=!1,isNewlyBlocked=!1;this.sequence_.length&&!this.blocked_;){var sequenceEntry=this.sequence_.shift(),callback=sequenceEntry[0],errback=sequenceEntry[1],scope=sequenceEntry[2],f=this.hadError_?errback:callback;if(f){try{var ret=f.call(scope||this.defaultScope_,res);void 0!==ret&&(this.hadError_=this.hadError_&&(ret==res||this.isError(ret)),this.result_=res=ret);if(goog.Thenable.isImplementedBy(res)||"function"===typeof goog.global.Promise&&res instanceof goog.global.Promise){this.blocked_=isNewlyBlocked=!0;}}catch(ex){res=ex,this.hadError_=!0,this.makeStackTraceLong_(res),this.hasErrback_()||(unhandledException=!0);}}}this.result_=res;if(isNewlyBlocked){var onCallback=goog.bind(this.continue_,this,!0),onErrback=goog.bind(this.continue_,this,!1);res instanceof goog.async.Deferred?(res.addCallbacks(onCallback,onErrback),res.blocking_=!0):res.then(onCallback,onErrback);}else{!goog.async.Deferred.STRICT_ERRORS||!this.isError(res)||res instanceof goog.async.Deferred.CanceledError||(unhandledException=this.hadError_=!0);}unhandledException&&(this.unhandledErrorId_=goog.async.Deferred.scheduleError_(res));};goog.async.Deferred.succeed=function(opt_result){var d=new goog.async.Deferred();d.callback(opt_result);return d;};goog.async.Deferred.fromPromise=function(promise){var d=new goog.async.Deferred();promise.then(function(value){d.callback(value);},function(error){d.errback(error);});return d;};goog.async.Deferred.fail=function(res){var d=new goog.async.Deferred();d.errback(res);return d;};goog.async.Deferred.canceled=function(){var d=new goog.async.Deferred();d.cancel();return d;};goog.async.Deferred.when=function(value,callback,opt_scope){return value instanceof goog.async.Deferred?value.branch(!0).addCallback(callback,opt_scope):goog.async.Deferred.succeed(value).addCallback(callback,opt_scope);};goog.async.Deferred.AlreadyCalledError=function(deferred){module$contents$goog$debug$Error_DebugError.call(this);this.deferred=deferred;};goog.inherits(goog.async.Deferred.AlreadyCalledError,module$contents$goog$debug$Error_DebugError);goog.async.Deferred.AlreadyCalledError.prototype.message="Deferred has already fired";goog.async.Deferred.AlreadyCalledError.prototype.name="AlreadyCalledError";goog.async.Deferred.CanceledError=function(deferred){module$contents$goog$debug$Error_DebugError.call(this);this.deferred=deferred;};goog.inherits(goog.async.Deferred.CanceledError,module$contents$goog$debug$Error_DebugError);goog.async.Deferred.CanceledError.prototype.message="Deferred was canceled";goog.async.Deferred.CanceledError.prototype.name="CanceledError";goog.async.Deferred.Error_=function(error){this.id_=goog.global.setTimeout(goog.bind(this.throwError,this),0);this.error_=error;};goog.async.Deferred.Error_.prototype.throwError=function(){goog.asserts.assert(goog.async.Deferred.errorMap_[this.id_],"Cannot throw an error that is not scheduled.");delete goog.async.Deferred.errorMap_[this.id_];goog.async.Deferred.unhandledErrorHandler_(this.error_);};goog.async.Deferred.Error_.prototype.resetTimer=function(){goog.global.clearTimeout(this.id_);};goog.async.Deferred.errorMap_={};goog.async.Deferred.scheduleError_=function(error){var deferredError=new goog.async.Deferred.Error_(error);goog.async.Deferred.errorMap_[deferredError.id_]=deferredError;return deferredError.id_;};goog.async.Deferred.unscheduleError_=function(id){var error=goog.async.Deferred.errorMap_[id];error&&(error.resetTimer(),delete goog.async.Deferred.errorMap_[id]);};goog.async.Deferred.assertNoErrors=function(){var map=goog.async.Deferred.errorMap_,key;for(key in map){var error=map[key];error.resetTimer();error.throwError();}};goog.net={};goog.net.jsloader={};goog.net.jsloader.Options={};goog.net.jsloader.GLOBAL_VERIFY_OBJS_="closure_verification";goog.net.jsloader.DEFAULT_TIMEOUT=5000;goog.net.jsloader.scriptsToLoad_=[];goog.net.jsloader.safeLoadMany=function(trustedUris,opt_options){if(!trustedUris.length){return goog.async.Deferred.succeed(null);}var isAnotherModuleLoading=goog.net.jsloader.scriptsToLoad_.length;module$contents$goog$array_extend(goog.net.jsloader.scriptsToLoad_,trustedUris);if(isAnotherModuleLoading){return goog.net.jsloader.scriptLoadingDeferred_;}trustedUris=goog.net.jsloader.scriptsToLoad_;var popAndLoadNextScript=function(){var trustedUri=trustedUris.shift(),deferred=goog.net.jsloader.safeLoad(trustedUri,opt_options);trustedUris.length&&deferred.addBoth(popAndLoadNextScript);return deferred;};goog.net.jsloader.scriptLoadingDeferred_=popAndLoadNextScript();return goog.net.jsloader.scriptLoadingDeferred_;};goog.net.jsloader.safeLoad=function(trustedUri,opt_options){var options=opt_options||{},doc=options.document||document,uri=goog.html.TrustedResourceUrl.unwrap(trustedUri),script=new goog.dom.DomHelper(doc).createElement(goog.dom.TagName.SCRIPT),request={script_:script,timeout_:void 0},deferred=new goog.async.Deferred(goog.net.jsloader.cancel_,request),timeout=null,timeoutDuration=null!=options.timeout?options.timeout:goog.net.jsloader.DEFAULT_TIMEOUT;0<timeoutDuration&&(timeout=window.setTimeout(function(){goog.net.jsloader.cleanup_(script,!0);deferred.errback(new goog.net.jsloader.Error(goog.net.jsloader.ErrorCode.TIMEOUT,"Timeout reached for loading script "+uri));},timeoutDuration),request.timeout_=timeout);script.onload=script.onreadystatechange=function(){script.readyState&&"loaded"!=script.readyState&&"complete"!=script.readyState||(goog.net.jsloader.cleanup_(script,options.cleanupWhenDone||!1,timeout),deferred.callback(null));};script.onerror=function(){goog.net.jsloader.cleanup_(script,!0,timeout);deferred.errback(new goog.net.jsloader.Error(goog.net.jsloader.ErrorCode.LOAD_ERROR,"Error while loading script "+uri));};var properties=options.attributes||{};module$contents$goog$object_extend(properties,{type:"text/javascript",charset:"UTF-8"});goog.dom.setProperties(script,properties);goog.dom.safe.setScriptSrc(script,trustedUri);goog.net.jsloader.getScriptParentElement_(doc).appendChild(script);return deferred;};goog.net.jsloader.safeLoadAndVerify=function(trustedUri,verificationObjName,options){goog.global[goog.net.jsloader.GLOBAL_VERIFY_OBJS_]||(goog.global[goog.net.jsloader.GLOBAL_VERIFY_OBJS_]={});var verifyObjs=goog.global[goog.net.jsloader.GLOBAL_VERIFY_OBJS_],uri=goog.html.TrustedResourceUrl.unwrap(trustedUri);if(void 0!==verifyObjs[verificationObjName]){return goog.async.Deferred.fail(new goog.net.jsloader.Error(goog.net.jsloader.ErrorCode.VERIFY_OBJECT_ALREADY_EXISTS,"Verification object "+verificationObjName+" already defined."));}var sendDeferred=goog.net.jsloader.safeLoad(trustedUri,options),deferred=new goog.async.Deferred(goog.bind(sendDeferred.cancel,sendDeferred));sendDeferred.addCallback(function(){var result=verifyObjs[verificationObjName];void 0!==result?(deferred.callback(result),delete verifyObjs[verificationObjName]):deferred.errback(new goog.net.jsloader.Error(goog.net.jsloader.ErrorCode.VERIFY_ERROR,"Script "+uri+" loaded, but verification object "+verificationObjName+" was not defined."));});sendDeferred.addErrback(function(error){void 0!==verifyObjs[verificationObjName]&&delete verifyObjs[verificationObjName];deferred.errback(error);});return deferred;};goog.net.jsloader.getScriptParentElement_=function(doc){var headElements=goog.dom.getElementsByTagName(goog.dom.TagName.HEAD,doc);return headElements&&0!==headElements.length?headElements[0]:doc.documentElement;};goog.net.jsloader.cancel_=function(){if(this&&this.script_){var scriptNode=this.script_;scriptNode&&scriptNode.tagName==goog.dom.TagName.SCRIPT&&goog.net.jsloader.cleanup_(scriptNode,!0,this.timeout_);}};goog.net.jsloader.cleanup_=function(scriptNode,removeScriptNode,opt_timeout){null!=opt_timeout&&goog.global.clearTimeout(opt_timeout);scriptNode.onload=goog.nullFunction;scriptNode.onerror=goog.nullFunction;scriptNode.onreadystatechange=goog.nullFunction;removeScriptNode&&window.setTimeout(function(){goog.dom.removeNode(scriptNode);},0);};goog.net.jsloader.ErrorCode={LOAD_ERROR:0,TIMEOUT:1,VERIFY_ERROR:2,VERIFY_OBJECT_ALREADY_EXISTS:3};goog.net.jsloader.Error=function(code,opt_message){var msg="Jsloader error (code #"+code+")";opt_message&&(msg+=": "+opt_message);module$contents$goog$debug$Error_DebugError.call(this,msg);this.code=code;};goog.inherits(goog.net.jsloader.Error,module$contents$goog$debug$Error_DebugError);goog.json={};goog.json.Replacer={};goog.json.Reviver={};goog.json.USE_NATIVE_JSON=!1;goog.json.TRY_NATIVE_JSON=!0;goog.json.isValid=function(s){return /^\s*$/.test(s)?!1:/^[\],:{}\s\u2028\u2029]*$/.test(s.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,""));};goog.json.errorLogger_=goog.nullFunction;goog.json.setErrorLogger=function(errorLogger){goog.json.errorLogger_=errorLogger;};goog.json.parse=goog.json.USE_NATIVE_JSON?goog.global.JSON.parse:function(s){if(goog.json.TRY_NATIVE_JSON){try{return goog.global.JSON.parse(s);}catch(ex){var error=ex;}}var o=String(s);if(goog.json.isValid(o)){try{var result=eval("("+o+")");error&&goog.json.errorLogger_("Invalid JSON: "+o,error);return result;}catch(ex$50){}}throw Error("Invalid JSON string: "+o);};goog.json.serialize=goog.json.USE_NATIVE_JSON?goog.global.JSON.stringify:function(object,opt_replacer){return new goog.json.Serializer(opt_replacer).serialize(object);};goog.json.Serializer=function(opt_replacer){this.replacer_=opt_replacer;};goog.json.Serializer.prototype.serialize=function(object){var sb=[];this.serializeInternal(object,sb);return sb.join("");};goog.json.Serializer.prototype.serializeInternal=function(object,sb){if(null==object){sb.push("null");}else{if("object"==typeof object){if(Array.isArray(object)){this.serializeArray(object,sb);return;}if(object instanceof String||object instanceof Number||object instanceof Boolean){object=object.valueOf();}else{this.serializeObject_(object,sb);return;}}switch(typeof object){case"string":this.serializeString_(object,sb);break;case"number":this.serializeNumber_(object,sb);break;case"boolean":sb.push(String(object));break;case"function":sb.push("null");break;default:throw Error("Unknown type: "+typeof object);}}};goog.json.Serializer.charToJsonCharCache_={'"':'\\"',"\\":"\\\\","/":"\\/","\b":"\\b","\f":"\\f","\n":"\\n","\r":"\\r","\t":"\\t","\x0B":"\\u000b"};goog.json.Serializer.charsToReplace_=/\uffff/.test("\uffff")?/[\\"\x00-\x1f\x7f-\uffff]/g:/[\\"\x00-\x1f\x7f-\xff]/g;goog.json.Serializer.prototype.serializeString_=function(s,sb){sb.push('"',s.replace(goog.json.Serializer.charsToReplace_,function(c){var rv=goog.json.Serializer.charToJsonCharCache_[c];rv||(rv="\\u"+(c.charCodeAt(0)|65536).toString(16).substr(1),goog.json.Serializer.charToJsonCharCache_[c]=rv);return rv;}),'"');};goog.json.Serializer.prototype.serializeNumber_=function(n,sb){sb.push(isFinite(n)&&!isNaN(n)?String(n):"null");};goog.json.Serializer.prototype.serializeArray=function(arr,sb){var l=arr.length;sb.push("[");for(var sep="",i=0;i<l;i++){sb.push(sep);var value=arr[i];this.serializeInternal(this.replacer_?this.replacer_.call(arr,String(i),value):value,sb);sep=",";}sb.push("]");};goog.json.Serializer.prototype.serializeObject_=function(obj,sb){sb.push("{");var sep="",key;for(key in obj){if(Object.prototype.hasOwnProperty.call(obj,key)){var value=obj[key];"function"!=typeof value&&(sb.push(sep),this.serializeString_(key,sb),sb.push(":"),this.serializeInternal(this.replacer_?this.replacer_.call(obj,key,value):value,sb),sep=",");}}sb.push("}");};goog.json.hybrid={};goog.json.hybrid.stringify=goog.json.USE_NATIVE_JSON?goog.global.JSON.stringify:function(obj){if(goog.global.JSON){try{return goog.global.JSON.stringify(obj);}catch(e){}}return goog.json.serialize(obj);};goog.json.hybrid.parse_=function(jsonString,fallbackParser){if(goog.global.JSON){try{var obj=goog.global.JSON.parse(jsonString);goog.asserts.assert("object"==typeof obj);return obj;}catch(e){}}return fallbackParser(jsonString);};goog.json.hybrid.parse=goog.json.USE_NATIVE_JSON?goog.global.JSON.parse:function(jsonString){return goog.json.hybrid.parse_(jsonString,goog.json.parse);};goog.log={};goog.log.ENABLED=goog.debug.LOGGING_ENABLED;goog.log.ROOT_LOGGER_NAME="";var third_party$javascript$closure$log$log$classdecl$var0=function(name,value){this.name=name;this.value=value;};third_party$javascript$closure$log$log$classdecl$var0.prototype.toString=function(){return this.name;};goog.log.Level=third_party$javascript$closure$log$log$classdecl$var0;goog.log.Level.OFF=new goog.log.Level("OFF",Infinity);goog.log.Level.SHOUT=new goog.log.Level("SHOUT",1200);goog.log.Level.SEVERE=new goog.log.Level("SEVERE",1000);goog.log.Level.WARNING=new goog.log.Level("WARNING",900);goog.log.Level.INFO=new goog.log.Level("INFO",800);goog.log.Level.CONFIG=new goog.log.Level("CONFIG",700);goog.log.Level.FINE=new goog.log.Level("FINE",500);goog.log.Level.FINER=new goog.log.Level("FINER",400);goog.log.Level.FINEST=new goog.log.Level("FINEST",300);goog.log.Level.ALL=new goog.log.Level("ALL",0);goog.log.Level.PREDEFINED_LEVELS=[goog.log.Level.OFF,goog.log.Level.SHOUT,goog.log.Level.SEVERE,goog.log.Level.WARNING,goog.log.Level.INFO,goog.log.Level.CONFIG,goog.log.Level.FINE,goog.log.Level.FINER,goog.log.Level.FINEST,goog.log.Level.ALL];goog.log.Level.predefinedLevelsCache_=null;goog.log.Level.createPredefinedLevelsCache_=function(){goog.log.Level.predefinedLevelsCache_={};for(var i=0,level=void 0;level=goog.log.Level.PREDEFINED_LEVELS[i];i++){goog.log.Level.predefinedLevelsCache_[level.value]=level,goog.log.Level.predefinedLevelsCache_[level.name]=level;}};goog.log.Level.getPredefinedLevel=function(name){goog.log.Level.predefinedLevelsCache_||goog.log.Level.createPredefinedLevelsCache_();return goog.log.Level.predefinedLevelsCache_[name]||null;};goog.log.Level.getPredefinedLevelByValue=function(value){goog.log.Level.predefinedLevelsCache_||goog.log.Level.createPredefinedLevelsCache_();if(value in goog.log.Level.predefinedLevelsCache_){return goog.log.Level.predefinedLevelsCache_[value];}for(var i=0;i<goog.log.Level.PREDEFINED_LEVELS.length;++i){var level=goog.log.Level.PREDEFINED_LEVELS[i];if(level.value<=value){return level;}}return null;};var third_party$javascript$closure$log$log$classdecl$var1=function(){};third_party$javascript$closure$log$log$classdecl$var1.prototype.getName=function(){};goog.log.Logger=third_party$javascript$closure$log$log$classdecl$var1;goog.log.Logger.Level=goog.log.Level;var third_party$javascript$closure$log$log$classdecl$var2=function(capacity){this.capacity_="number"===typeof capacity?capacity:goog.log.LogBuffer.CAPACITY;this.clear();};third_party$javascript$closure$log$log$classdecl$var2.prototype.addRecord=function(level,msg,loggerName){if(!this.isBufferingEnabled()){return new goog.log.LogRecord(level,msg,loggerName);}var curIndex=(this.curIndex_+1)%this.capacity_;this.curIndex_=curIndex;if(this.isFull_){var ret=this.buffer_[curIndex];ret.reset(level,msg,loggerName);return ret;}this.isFull_=curIndex==this.capacity_-1;return this.buffer_[curIndex]=new goog.log.LogRecord(level,msg,loggerName);};third_party$javascript$closure$log$log$classdecl$var2.prototype.forEachRecord=function(func){var buffer=this.buffer_;if(buffer[0]){var curIndex=this.curIndex_,i=this.isFull_?curIndex:-1;do{i=(i+1)%this.capacity_,func(buffer[i]);}while(i!==curIndex);}};third_party$javascript$closure$log$log$classdecl$var2.prototype.isBufferingEnabled=function(){return 0<this.capacity_;};third_party$javascript$closure$log$log$classdecl$var2.prototype.isFull=function(){return this.isFull_;};third_party$javascript$closure$log$log$classdecl$var2.prototype.clear=function(){this.buffer_=Array(this.capacity_);this.curIndex_=-1;this.isFull_=!1;};goog.log.LogBuffer=third_party$javascript$closure$log$log$classdecl$var2;goog.log.LogBuffer.CAPACITY=0;goog.log.LogBuffer.getInstance=function(){goog.log.LogBuffer.instance_||(goog.log.LogBuffer.instance_=new goog.log.LogBuffer(goog.log.LogBuffer.CAPACITY));return goog.log.LogBuffer.instance_;};goog.log.LogBuffer.isBufferingEnabled=function(){return goog.log.LogBuffer.getInstance().isBufferingEnabled();};var third_party$javascript$closure$log$log$classdecl$var3=function(level,msg,loggerName,time,sequenceNumber){this.exception_=void 0;this.reset(level||goog.log.Level.OFF,msg,loggerName,time,sequenceNumber);};third_party$javascript$closure$log$log$classdecl$var3.prototype.reset=function(level,msg,loggerName,time,sequenceNumber){this.time_=time||goog.now();this.level_=level;this.msg_=msg;this.loggerName_=loggerName;this.exception_=void 0;this.sequenceNumber_="number"===typeof sequenceNumber?sequenceNumber:goog.log.LogRecord.nextSequenceNumber_;};third_party$javascript$closure$log$log$classdecl$var3.prototype.getLoggerName=function(){return this.loggerName_;};third_party$javascript$closure$log$log$classdecl$var3.prototype.setLoggerName=function(name){this.loggerName_=name;};third_party$javascript$closure$log$log$classdecl$var3.prototype.getException=function(){return this.exception_;};third_party$javascript$closure$log$log$classdecl$var3.prototype.setException=function(exception){this.exception_=exception;};third_party$javascript$closure$log$log$classdecl$var3.prototype.getLevel=function(){return this.level_;};third_party$javascript$closure$log$log$classdecl$var3.prototype.setLevel=function(level){this.level_=level;};third_party$javascript$closure$log$log$classdecl$var3.prototype.getMessage=function(){return this.msg_;};third_party$javascript$closure$log$log$classdecl$var3.prototype.setMessage=function(msg){this.msg_=msg;};third_party$javascript$closure$log$log$classdecl$var3.prototype.getMillis=function(){return this.time_;};third_party$javascript$closure$log$log$classdecl$var3.prototype.setMillis=function(time){this.time_=time;};third_party$javascript$closure$log$log$classdecl$var3.prototype.getSequenceNumber=function(){return this.sequenceNumber_;};goog.log.LogRecord=third_party$javascript$closure$log$log$classdecl$var3;goog.log.LogRecord.nextSequenceNumber_=0;var third_party$javascript$closure$log$log$classdecl$var4=function(name,parent){this.level=null;this.handlers=[];this.parent=(void 0===parent?null:parent)||null;this.children=[];this.logger={getName:function(){return name;}};};third_party$javascript$closure$log$log$classdecl$var4.prototype.getEffectiveLevel=function(){if(this.level){return this.level;}if(this.parent){return this.parent.getEffectiveLevel();}goog.asserts.fail("Root logger has no level set.");return goog.log.Level.OFF;};third_party$javascript$closure$log$log$classdecl$var4.prototype.publish=function(logRecord){for(var target=this;target;){target.handlers.forEach(function(handler){handler(logRecord);}),target=target.parent;}};goog.log.LogRegistryEntry_=third_party$javascript$closure$log$log$classdecl$var4;var third_party$javascript$closure$log$log$classdecl$var5=function(){this.entries={};var rootLogRegistryEntry=new goog.log.LogRegistryEntry_(goog.log.ROOT_LOGGER_NAME);rootLogRegistryEntry.level=goog.log.Level.CONFIG;this.entries[goog.log.ROOT_LOGGER_NAME]=rootLogRegistryEntry;};third_party$javascript$closure$log$log$classdecl$var5.prototype.getLogRegistryEntry=function(name,level){var entry=this.entries[name];if(entry){return void 0!==level&&(entry.level=level),entry;}var lastDotIndex=name.lastIndexOf("."),parentLogRegistryEntry=this.getLogRegistryEntry(name.substr(0,lastDotIndex)),logRegistryEntry=new goog.log.LogRegistryEntry_(name,parentLogRegistryEntry);this.entries[name]=logRegistryEntry;parentLogRegistryEntry.children.push(logRegistryEntry);void 0!==level&&(logRegistryEntry.level=level);return logRegistryEntry;};third_party$javascript$closure$log$log$classdecl$var5.prototype.getAllLoggers=function(){var $jscomp$this=this;return Object.keys(this.entries).map(function(loggerName){return $jscomp$this.entries[loggerName].logger;});};goog.log.LogRegistry_=third_party$javascript$closure$log$log$classdecl$var5;goog.log.LogRegistry_.getInstance=function(){goog.log.LogRegistry_.instance_||(goog.log.LogRegistry_.instance_=new goog.log.LogRegistry_());return goog.log.LogRegistry_.instance_;};goog.log.getLogger=function(name,level){return goog.log.ENABLED?goog.log.LogRegistry_.getInstance().getLogRegistryEntry(name,level).logger:null;};goog.log.getRootLogger=function(){return goog.log.ENABLED?goog.log.LogRegistry_.getInstance().getLogRegistryEntry(goog.log.ROOT_LOGGER_NAME).logger:null;};goog.log.addHandler=function(logger,handler){goog.log.ENABLED&&logger&&goog.log.LogRegistry_.getInstance().getLogRegistryEntry(logger.getName()).handlers.push(handler);};goog.log.removeHandler=function(logger,handler){if(goog.log.ENABLED&&logger){var loggerEntry=goog.log.LogRegistry_.getInstance().getLogRegistryEntry(logger.getName()),indexOfHandler=loggerEntry.handlers.indexOf(handler);if(-1!==indexOfHandler){return loggerEntry.handlers.splice(indexOfHandler,1),!0;}}return!1;};goog.log.setLevel=function(logger,level){goog.log.ENABLED&&logger&&(goog.log.LogRegistry_.getInstance().getLogRegistryEntry(logger.getName()).level=level);};goog.log.getLevel=function(logger){return goog.log.ENABLED&&logger?goog.log.LogRegistry_.getInstance().getLogRegistryEntry(logger.getName()).level:null;};goog.log.getEffectiveLevel=function(logger){return goog.log.ENABLED&&logger?goog.log.LogRegistry_.getInstance().getLogRegistryEntry(logger.getName()).getEffectiveLevel():goog.log.Level.OFF;};goog.log.isLoggable=function(logger,level){return goog.log.ENABLED&&logger&&level?level.value>=goog.log.getEffectiveLevel(logger).value:!1;};goog.log.getAllLoggers=function(){return goog.log.ENABLED?goog.log.LogRegistry_.getInstance().getAllLoggers():[];};goog.log.getLogRecord=function(logger,level,msg,exception){var logRecord=goog.log.LogBuffer.getInstance().addRecord(level||goog.log.Level.OFF,msg,logger.getName());logRecord.setException(exception);return logRecord;};goog.log.publishLogRecord=function(logger,logRecord){goog.log.ENABLED&&logger&&goog.log.isLoggable(logger,logRecord.getLevel())&&goog.log.LogRegistry_.getInstance().getLogRegistryEntry(logger.getName()).publish(logRecord);};goog.log.log=function(logger,level,msg,exception){if(goog.log.ENABLED&&logger&&goog.log.isLoggable(logger,level)){level=level||goog.log.Level.OFF;var loggerEntry=goog.log.LogRegistry_.getInstance().getLogRegistryEntry(logger.getName());"function"===typeof msg&&(msg=msg());var logRecord=goog.log.LogBuffer.getInstance().addRecord(level,msg,logger.getName());logRecord.setException(exception);loggerEntry.publish(logRecord);}};goog.log.error=function(logger,msg,exception){goog.log.ENABLED&&logger&&goog.log.log(logger,goog.log.Level.SEVERE,msg,exception);};goog.log.warning=function(logger,msg,exception){goog.log.ENABLED&&logger&&goog.log.log(logger,goog.log.Level.WARNING,msg,exception);};goog.log.info=function(logger,msg,exception){goog.log.ENABLED&&logger&&goog.log.log(logger,goog.log.Level.INFO,msg,exception);};goog.log.fine=function(logger,msg,exception){goog.log.ENABLED&&logger&&goog.log.log(logger,goog.log.Level.FINE,msg,exception);};goog.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};goog.net.ErrorCode.getDebugMessage=function(errorCode){switch(errorCode){case goog.net.ErrorCode.NO_ERROR:return"No Error";case goog.net.ErrorCode.ACCESS_DENIED:return"Access denied to content document";case goog.net.ErrorCode.FILE_NOT_FOUND:return"File not found";case goog.net.ErrorCode.FF_SILENT_ERROR:return"Firefox silently errored";case goog.net.ErrorCode.CUSTOM_ERROR:return"Application custom error";case goog.net.ErrorCode.EXCEPTION:return"An exception occurred";case goog.net.ErrorCode.HTTP_ERROR:return"Http response at 400 or 500 level";case goog.net.ErrorCode.ABORT:return"Request was aborted";case goog.net.ErrorCode.TIMEOUT:return"Request timed out";case goog.net.ErrorCode.OFFLINE:return"The resource is not available offline";default:return"Unrecognized error code";}};goog.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"};goog.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,MULTI_STATUS:207,MULTIPLE_CHOICES:300,MOVED_PERMANENTLY:301,FOUND:302,SEE_OTHER:303,NOT_MODIFIED:304,USE_PROXY:305,TEMPORARY_REDIRECT:307,PERMANENT_REDIRECT:308,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,UNPROCESSABLE_ENTITY:422,LOCKED:423,FAILED_DEPENDENCY:424,PRECONDITION_REQUIRED:428,TOO_MANY_REQUESTS:429,REQUEST_HEADER_FIELDS_TOO_LARGE:431,CLIENT_CLOSED_REQUEST:499,INTERNAL_SERVER_ERROR:500,NOT_IMPLEMENTED:501,BAD_GATEWAY:502,SERVICE_UNAVAILABLE:503,GATEWAY_TIMEOUT:504,HTTP_VERSION_NOT_SUPPORTED:505,INSUFFICIENT_STORAGE:507,NETWORK_AUTHENTICATION_REQUIRED:511,QUIRK_IE_NO_CONTENT:1223};goog.net.HttpStatus.isSuccess=function(status){switch(status){case goog.net.HttpStatus.OK:case goog.net.HttpStatus.CREATED:case goog.net.HttpStatus.ACCEPTED:case goog.net.HttpStatus.NO_CONTENT:case goog.net.HttpStatus.PARTIAL_CONTENT:case goog.net.HttpStatus.NOT_MODIFIED:case goog.net.HttpStatus.QUIRK_IE_NO_CONTENT:return!0;default:return!1;}};goog.net.XhrLike=function(){};goog.net.XhrLike.prototype.open=function(method,url,opt_async,opt_user,opt_password){};goog.net.XhrLike.prototype.send=function(opt_data){};goog.net.XhrLike.prototype.abort=function(){};goog.net.XhrLike.prototype.setRequestHeader=function(header,value){};goog.net.XhrLike.prototype.getResponseHeader=function(header){};goog.net.XhrLike.prototype.getAllResponseHeaders=function(){};goog.net.XhrLike.prototype.setTrustToken=function(trustTokenAttribute){};goog.net.XmlHttpFactory=function(){};goog.net.XmlHttpFactory.prototype.cachedOptions_=null;goog.net.XmlHttpFactory.prototype.getOptions=function(){return this.cachedOptions_||(this.cachedOptions_=this.internalGetOptions());};goog.net.WrapperXmlHttpFactory=function(xhrFactory,optionsFactory){this.xhrFactory_=xhrFactory;this.optionsFactory_=optionsFactory;};goog.inherits(goog.net.WrapperXmlHttpFactory,goog.net.XmlHttpFactory);goog.net.WrapperXmlHttpFactory.prototype.createInstance=function(){return this.xhrFactory_();};goog.net.WrapperXmlHttpFactory.prototype.getOptions=function(){return this.optionsFactory_();};goog.net.XmlHttp=function(){return goog.net.XmlHttp.factory_.createInstance();};goog.net.XmlHttp.ASSUME_NATIVE_XHR=!1;goog.net.XmlHttpDefines={};goog.net.XmlHttpDefines.ASSUME_NATIVE_XHR=!1;goog.net.XmlHttp.getOptions=function(){return goog.net.XmlHttp.factory_.getOptions();};goog.net.XmlHttp.OptionType={USE_NULL_FUNCTION:0,LOCAL_REQUEST_ERROR:1};goog.net.XmlHttp.ReadyState={UNINITIALIZED:0,LOADING:1,LOADED:2,INTERACTIVE:3,COMPLETE:4};goog.net.XmlHttp.setFactory=function(factory,optionsFactory){goog.net.XmlHttp.setGlobalFactory(new goog.net.WrapperXmlHttpFactory(goog.asserts.assert(factory),goog.asserts.assert(optionsFactory)));};goog.net.XmlHttp.setGlobalFactory=function(factory){goog.net.XmlHttp.factory_=factory;};goog.net.DefaultXmlHttpFactory=function(){};goog.inherits(goog.net.DefaultXmlHttpFactory,goog.net.XmlHttpFactory);goog.net.DefaultXmlHttpFactory.prototype.createInstance=function(){var progId=this.getProgId_();return progId?new ActiveXObject(progId):new XMLHttpRequest();};goog.net.DefaultXmlHttpFactory.prototype.internalGetOptions=function(){var options={};this.getProgId_()&&(options[goog.net.XmlHttp.OptionType.USE_NULL_FUNCTION]=!0,options[goog.net.XmlHttp.OptionType.LOCAL_REQUEST_ERROR]=!0);return options;};goog.net.DefaultXmlHttpFactory.prototype.getProgId_=function(){if(goog.net.XmlHttp.ASSUME_NATIVE_XHR||goog.net.XmlHttpDefines.ASSUME_NATIVE_XHR){return"";}if(!this.ieProgId_&&"undefined"==typeof XMLHttpRequest&&"undefined"!=typeof ActiveXObject){for(var ACTIVE_X_IDENTS=["MSXML2.XMLHTTP.6.0","MSXML2.XMLHTTP.3.0","MSXML2.XMLHTTP","Microsoft.XMLHTTP"],i=0;i<ACTIVE_X_IDENTS.length;i++){var candidate=ACTIVE_X_IDENTS[i];try{return new ActiveXObject(candidate),this.ieProgId_=candidate;}catch(e){}}throw Error("Could not create ActiveXObject. ActiveX might be disabled, or MSXML might not be installed");}return this.ieProgId_;};goog.net.XmlHttp.setGlobalFactory(new goog.net.DefaultXmlHttpFactory());goog.net.XhrIo=function(opt_xmlHttpFactory){goog.events.EventTarget.call(this);this.headers=new Map();this.xmlHttpFactory_=opt_xmlHttpFactory||null;this.active_=!1;this.xhrOptions_=this.xhr_=null;this.lastMethod_=this.lastUri_="";this.lastErrorCode_=goog.net.ErrorCode.NO_ERROR;this.lastError_="";this.inAbort_=this.inOpen_=this.inSend_=this.errorDispatched_=!1;this.timeoutInterval_=0;this.timeoutId_=null;this.responseType_=goog.net.XhrIo.ResponseType.DEFAULT;this.useXhr2Timeout_=this.progressEventsEnabled_=this.withCredentials_=!1;this.trustToken_=null;};goog.inherits(goog.net.XhrIo,goog.events.EventTarget);goog.net.XhrIo.ResponseType={DEFAULT:"",TEXT:"text",DOCUMENT:"document",BLOB:"blob",ARRAY_BUFFER:"arraybuffer"};goog.net.XhrIo.prototype.logger_=goog.log.getLogger("goog.net.XhrIo");goog.net.XhrIo.CONTENT_TYPE_HEADER="Content-Type";goog.net.XhrIo.CONTENT_TRANSFER_ENCODING="Content-Transfer-Encoding";goog.net.XhrIo.HTTP_SCHEME_PATTERN=/^https?$/i;goog.net.XhrIo.METHODS_WITH_FORM_DATA=["POST","PUT"];goog.net.XhrIo.FORM_CONTENT_TYPE="application/x-www-form-urlencoded;charset=utf-8";goog.net.XhrIo.XHR2_TIMEOUT_="timeout";goog.net.XhrIo.XHR2_ON_TIMEOUT_="ontimeout";goog.net.XhrIo.sendInstances_=[];goog.net.XhrIo.send=function(url,opt_callback,opt_method,opt_content,opt_headers,opt_timeoutInterval,opt_withCredentials){var x=new goog.net.XhrIo();goog.net.XhrIo.sendInstances_.push(x);opt_callback&&x.listen(goog.net.EventType.COMPLETE,opt_callback);x.listenOnce(goog.net.EventType.READY,x.cleanupSend_);opt_timeoutInterval&&x.setTimeoutInterval(opt_timeoutInterval);opt_withCredentials&&x.setWithCredentials(opt_withCredentials);x.send(url,opt_method,opt_content,opt_headers);return x;};goog.net.XhrIo.cleanup=function(){for(var instances=goog.net.XhrIo.sendInstances_;instances.length;){instances.pop().dispose();}};goog.net.XhrIo.protectEntryPoints=function(errorHandler){goog.net.XhrIo.prototype.onReadyStateChangeEntryPoint_=errorHandler.protectEntryPoint(goog.net.XhrIo.prototype.onReadyStateChangeEntryPoint_);};goog.net.XhrIo.prototype.cleanupSend_=function(){this.dispose();module$contents$goog$array_remove(goog.net.XhrIo.sendInstances_,this);};goog.net.XhrIo.prototype.getTimeoutInterval=function(){return this.timeoutInterval_;};goog.net.XhrIo.prototype.setTimeoutInterval=function(ms){this.timeoutInterval_=Math.max(0,ms);};goog.net.XhrIo.prototype.setResponseType=function(type){this.responseType_=type;};goog.net.XhrIo.prototype.getResponseType=function(){return this.responseType_;};goog.net.XhrIo.prototype.setWithCredentials=function(withCredentials){this.withCredentials_=withCredentials;};goog.net.XhrIo.prototype.getWithCredentials=function(){return this.withCredentials_;};goog.net.XhrIo.prototype.setProgressEventsEnabled=function(enabled){this.progressEventsEnabled_=enabled;};goog.net.XhrIo.prototype.getProgressEventsEnabled=function(){return this.progressEventsEnabled_;};goog.net.XhrIo.prototype.setTrustToken=function(trustToken){this.trustToken_=trustToken;};goog.net.XhrIo.prototype.send=function(url,opt_method,opt_content,opt_headers){if(this.xhr_){throw Error("[goog.net.XhrIo] Object is active with another request="+this.lastUri_+"; newUri="+url);}var method=opt_method?opt_method.toUpperCase():"GET";this.lastUri_=url;this.lastError_="";this.lastErrorCode_=goog.net.ErrorCode.NO_ERROR;this.lastMethod_=method;this.errorDispatched_=!1;this.active_=!0;this.xhr_=this.createXhr();this.xhrOptions_=this.xmlHttpFactory_?this.xmlHttpFactory_.getOptions():goog.net.XmlHttp.getOptions();this.xhr_.onreadystatechange=goog.bind(this.onReadyStateChange_,this);this.getProgressEventsEnabled()&&"onprogress"in this.xhr_&&(this.xhr_.onprogress=goog.bind(function(e){this.onProgressHandler_(e,!0);},this),this.xhr_.upload&&(this.xhr_.upload.onprogress=goog.bind(this.onProgressHandler_,this)));try{goog.log.fine(this.logger_,this.formatMsg_("Opening Xhr")),this.inOpen_=!0,this.xhr_.open(method,String(url),!0),this.inOpen_=!1;}catch(err$51){goog.log.fine(this.logger_,this.formatMsg_("Error opening Xhr: "+err$51.message));this.error_(goog.net.ErrorCode.EXCEPTION,err$51);return;}var content=opt_content||"",headers=new Map(this.headers);if(opt_headers){if(Object.getPrototypeOf(opt_headers)===Object.prototype){for(var key in opt_headers){headers.set(key,opt_headers[key]);}}else{if("function"===typeof opt_headers.keys&&"function"===typeof opt_headers.get){for(var $jscomp$iter$18=$jscomp.makeIterator(opt_headers.keys()),$jscomp$key$key=$jscomp$iter$18.next();!$jscomp$key$key.done;$jscomp$key$key=$jscomp$iter$18.next()){var key$52=$jscomp$key$key.value;headers.set(key$52,opt_headers.get(key$52));}}else{throw Error("Unknown input type for opt_headers: "+String(opt_headers));}}}var contentTypeKey=Array.from(headers.keys()).find(function(header){return goog.string.caseInsensitiveEquals(goog.net.XhrIo.CONTENT_TYPE_HEADER,header);}),contentIsFormData=goog.global.FormData&&content instanceof goog.global.FormData;!module$contents$goog$array_contains(goog.net.XhrIo.METHODS_WITH_FORM_DATA,method)||contentTypeKey||contentIsFormData||headers.set(goog.net.XhrIo.CONTENT_TYPE_HEADER,goog.net.XhrIo.FORM_CONTENT_TYPE);for(var $jscomp$iter$19=$jscomp.makeIterator(headers),$jscomp$key$=$jscomp$iter$19.next();!$jscomp$key$.done;$jscomp$key$=$jscomp$iter$19.next()){var $jscomp$destructuring$var19=$jscomp.makeIterator($jscomp$key$.value),key$53=$jscomp$destructuring$var19.next().value,value=$jscomp$destructuring$var19.next().value;this.xhr_.setRequestHeader(key$53,value);}this.responseType_&&(this.xhr_.responseType=this.responseType_);"withCredentials"in this.xhr_&&this.xhr_.withCredentials!==this.withCredentials_&&(this.xhr_.withCredentials=this.withCredentials_);if("setTrustToken"in this.xhr_&&this.trustToken_){try{this.xhr_.setTrustToken(this.trustToken_);}catch(err$54){goog.log.fine(this.logger_,this.formatMsg_("Error SetTrustToken: "+err$54.message));}}try{this.cleanUpTimeoutTimer_(),0<this.timeoutInterval_&&(this.useXhr2Timeout_=goog.net.XhrIo.shouldUseXhr2Timeout_(this.xhr_),goog.log.fine(this.logger_,this.formatMsg_("Will abort after "+this.timeoutInterval_+"ms if incomplete, xhr2 "+this.useXhr2Timeout_)),this.useXhr2Timeout_?(this.xhr_[goog.net.XhrIo.XHR2_TIMEOUT_]=this.timeoutInterval_,this.xhr_[goog.net.XhrIo.XHR2_ON_TIMEOUT_]=goog.bind(this.timeout_,this)):this.timeoutId_=goog.Timer.callOnce(this.timeout_,this.timeoutInterval_,this)),goog.log.fine(this.logger_,this.formatMsg_("Sending request")),this.inSend_=!0,this.xhr_.send(content),this.inSend_=!1;}catch(err$55){goog.log.fine(this.logger_,this.formatMsg_("Send error: "+err$55.message)),this.error_(goog.net.ErrorCode.EXCEPTION,err$55);}};goog.net.XhrIo.shouldUseXhr2Timeout_=function(xhr){return goog.userAgent.IE&&goog.userAgent.isVersionOrHigher(9)&&"number"===typeof xhr[goog.net.XhrIo.XHR2_TIMEOUT_]&&void 0!==xhr[goog.net.XhrIo.XHR2_ON_TIMEOUT_];};goog.net.XhrIo.prototype.createXhr=function(){return this.xmlHttpFactory_?this.xmlHttpFactory_.createInstance():goog.net.XmlHttp();};goog.net.XhrIo.prototype.timeout_=function(){"undefined"!=typeof goog&&this.xhr_&&(this.lastError_="Timed out after "+this.timeoutInterval_+"ms, aborting",this.lastErrorCode_=goog.net.ErrorCode.TIMEOUT,goog.log.fine(this.logger_,this.formatMsg_(this.lastError_)),this.dispatchEvent(goog.net.EventType.TIMEOUT),this.abort(goog.net.ErrorCode.TIMEOUT));};goog.net.XhrIo.prototype.error_=function(errorCode,err){this.active_=!1;this.xhr_&&(this.inAbort_=!0,this.xhr_.abort(),this.inAbort_=!1);this.lastError_=err;this.lastErrorCode_=errorCode;this.dispatchErrors_();this.cleanUpXhr_();};goog.net.XhrIo.prototype.dispatchErrors_=function(){this.errorDispatched_||(this.errorDispatched_=!0,this.dispatchEvent(goog.net.EventType.COMPLETE),this.dispatchEvent(goog.net.EventType.ERROR));};goog.net.XhrIo.prototype.abort=function(opt_failureCode){this.xhr_&&this.active_&&(goog.log.fine(this.logger_,this.formatMsg_("Aborting")),this.active_=!1,this.inAbort_=!0,this.xhr_.abort(),this.inAbort_=!1,this.lastErrorCode_=opt_failureCode||goog.net.ErrorCode.ABORT,this.dispatchEvent(goog.net.EventType.COMPLETE),this.dispatchEvent(goog.net.EventType.ABORT),this.cleanUpXhr_());};goog.net.XhrIo.prototype.disposeInternal=function(){this.xhr_&&(this.active_&&(this.active_=!1,this.inAbort_=!0,this.xhr_.abort(),this.inAbort_=!1),this.cleanUpXhr_(!0));goog.net.XhrIo.superClass_.disposeInternal.call(this);};goog.net.XhrIo.prototype.onReadyStateChange_=function(){if(!this.isDisposed()){if(this.inOpen_||this.inSend_||this.inAbort_){this.onReadyStateChangeHelper_();}else{this.onReadyStateChangeEntryPoint_();}}};goog.net.XhrIo.prototype.onReadyStateChangeEntryPoint_=function(){this.onReadyStateChangeHelper_();};goog.net.XhrIo.prototype.onReadyStateChangeHelper_=function(){if(this.active_&&"undefined"!=typeof goog){if(this.xhrOptions_[goog.net.XmlHttp.OptionType.LOCAL_REQUEST_ERROR]&&this.getReadyState()==goog.net.XmlHttp.ReadyState.COMPLETE&&2==this.getStatus()){goog.log.fine(this.logger_,this.formatMsg_("Local request error detected and ignored"));}else{if(this.inSend_&&this.getReadyState()==goog.net.XmlHttp.ReadyState.COMPLETE){goog.Timer.callOnce(this.onReadyStateChange_,0,this);}else{if(this.dispatchEvent(goog.net.EventType.READY_STATE_CHANGE),this.isComplete()){goog.log.fine(this.logger_,this.formatMsg_("Request complete"));this.active_=!1;try{this.isSuccess()?(this.dispatchEvent(goog.net.EventType.COMPLETE),this.dispatchEvent(goog.net.EventType.SUCCESS)):(this.lastErrorCode_=goog.net.ErrorCode.HTTP_ERROR,this.lastError_=this.getStatusText()+" ["+this.getStatus()+"]",this.dispatchErrors_());}finally{this.cleanUpXhr_();}}}}}};goog.net.XhrIo.prototype.onProgressHandler_=function(e,opt_isDownload){goog.asserts.assert(e.type===goog.net.EventType.PROGRESS,"goog.net.EventType.PROGRESS is of the same type as raw XHR progress.");this.dispatchEvent(goog.net.XhrIo.buildProgressEvent_(e,goog.net.EventType.PROGRESS));this.dispatchEvent(goog.net.XhrIo.buildProgressEvent_(e,opt_isDownload?goog.net.EventType.DOWNLOAD_PROGRESS:goog.net.EventType.UPLOAD_PROGRESS));};goog.net.XhrIo.buildProgressEvent_=function(e,eventType){return{type:eventType,lengthComputable:e.lengthComputable,loaded:e.loaded,total:e.total};};goog.net.XhrIo.prototype.cleanUpXhr_=function(opt_fromDispose){if(this.xhr_){this.cleanUpTimeoutTimer_();var xhr=this.xhr_,clearedOnReadyStateChange=this.xhrOptions_[goog.net.XmlHttp.OptionType.USE_NULL_FUNCTION]?goog.nullFunction:null;this.xhrOptions_=this.xhr_=null;opt_fromDispose||this.dispatchEvent(goog.net.EventType.READY);try{xhr.onreadystatechange=clearedOnReadyStateChange;}catch(e){goog.log.error(this.logger_,"Problem encountered resetting onreadystatechange: "+e.message);}}};goog.net.XhrIo.prototype.cleanUpTimeoutTimer_=function(){this.xhr_&&this.useXhr2Timeout_&&(this.xhr_[goog.net.XhrIo.XHR2_ON_TIMEOUT_]=null);this.timeoutId_&&(goog.Timer.clear(this.timeoutId_),this.timeoutId_=null);};goog.net.XhrIo.prototype.isActive=function(){return!!this.xhr_;};goog.net.XhrIo.prototype.isComplete=function(){return this.getReadyState()==goog.net.XmlHttp.ReadyState.COMPLETE;};goog.net.XhrIo.prototype.isSuccess=function(){var status=this.getStatus();return goog.net.HttpStatus.isSuccess(status)||0===status&&!this.isLastUriEffectiveSchemeHttp_();};goog.net.XhrIo.prototype.isLastUriEffectiveSchemeHttp_=function(){var scheme=goog.uri.utils.getEffectiveScheme(String(this.lastUri_));return goog.net.XhrIo.HTTP_SCHEME_PATTERN.test(scheme);};goog.net.XhrIo.prototype.getReadyState=function(){return this.xhr_?this.xhr_.readyState:goog.net.XmlHttp.ReadyState.UNINITIALIZED;};goog.net.XhrIo.prototype.getStatus=function(){try{return this.getReadyState()>goog.net.XmlHttp.ReadyState.LOADED?this.xhr_.status:-1;}catch(e){return-1;}};goog.net.XhrIo.prototype.getStatusText=function(){try{return this.getReadyState()>goog.net.XmlHttp.ReadyState.LOADED?this.xhr_.statusText:"";}catch(e){return goog.log.fine(this.logger_,"Can not get status: "+e.message),"";}};goog.net.XhrIo.prototype.getLastUri=function(){return String(this.lastUri_);};goog.net.XhrIo.prototype.getResponseText=function(){try{return this.xhr_?this.xhr_.responseText:"";}catch(e){return goog.log.fine(this.logger_,"Can not get responseText: "+e.message),"";}};goog.net.XhrIo.prototype.getResponseBody=function(){try{if(this.xhr_&&"responseBody"in this.xhr_){return this.xhr_.responseBody;}}catch(e){goog.log.fine(this.logger_,"Can not get responseBody: "+e.message);}return null;};goog.net.XhrIo.prototype.getResponseXml=function(){try{return this.xhr_?this.xhr_.responseXML:null;}catch(e){return goog.log.fine(this.logger_,"Can not get responseXML: "+e.message),null;}};goog.net.XhrIo.prototype.getResponseJson=function(opt_xssiPrefix){if(this.xhr_){var responseText=this.xhr_.responseText;opt_xssiPrefix&&0==responseText.indexOf(opt_xssiPrefix)&&(responseText=responseText.substring(opt_xssiPrefix.length));return goog.json.hybrid.parse(responseText);}};goog.net.XhrIo.prototype.getResponse=function(){try{if(!this.xhr_){return null;}if("response"in this.xhr_){return this.xhr_.response;}switch(this.responseType_){case goog.net.XhrIo.ResponseType.DEFAULT:case goog.net.XhrIo.ResponseType.TEXT:return this.xhr_.responseText;case goog.net.XhrIo.ResponseType.ARRAY_BUFFER:if("mozResponseArrayBuffer"in this.xhr_){return this.xhr_.mozResponseArrayBuffer;}}goog.log.error(this.logger_,"Response type "+this.responseType_+" is not supported on this browser");return null;}catch(e){return goog.log.fine(this.logger_,"Can not get response: "+e.message),null;}};goog.net.XhrIo.prototype.getResponseHeader=function(key){if(this.xhr_&&this.isComplete()){var value=this.xhr_.getResponseHeader(key);return null===value?void 0:value;}};goog.net.XhrIo.prototype.getAllResponseHeaders=function(){return this.xhr_&&this.isComplete()?this.xhr_.getAllResponseHeaders()||"":"";};goog.net.XhrIo.prototype.getResponseHeaders=function(){for(var headersObject={},headersArray=this.getAllResponseHeaders().split("\r\n"),i=0;i<headersArray.length;i++){if(!goog.string.isEmptyOrWhitespace(headersArray[i])){var keyValue=goog.string.splitLimit(headersArray[i],":",1),key=keyValue[0],value=keyValue[1];if("string"===typeof value){value=value.trim();var values$jscomp$0=headersObject[key]||[];headersObject[key]=values$jscomp$0;values$jscomp$0.push(value);}}}return module$contents$goog$object_map(headersObject,function(values){return values.join(", ");});};goog.net.XhrIo.prototype.getStreamingResponseHeader=function(key){return this.xhr_?this.xhr_.getResponseHeader(key):null;};goog.net.XhrIo.prototype.getAllStreamingResponseHeaders=function(){return this.xhr_?this.xhr_.getAllResponseHeaders():"";};goog.net.XhrIo.prototype.getLastErrorCode=function(){return this.lastErrorCode_;};goog.net.XhrIo.prototype.getLastError=function(){return"string"===typeof this.lastError_?this.lastError_:String(this.lastError_);};goog.net.XhrIo.prototype.formatMsg_=function(msg){return msg+" ["+this.lastMethod_+" "+this.lastUri_+" "+this.getStatus()+"]";};goog.debug.entryPointRegistry.register(function(transformer){goog.net.XhrIo.prototype.onReadyStateChangeEntryPoint_=transformer(goog.net.XhrIo.prototype.onReadyStateChangeEntryPoint_);});ee.apiclient={};var module$contents$ee$apiclient_apiclient={};ee.apiclient.VERSION=module$exports$ee$apiVersion.V1ALPHA;ee.apiclient.API_CLIENT_VERSION="0.1.288";ee.apiclient.NULL_VALUE=module$exports$eeapiclient$domain_object.NULL_VALUE;ee.apiclient.PromiseRequestService=module$exports$eeapiclient$promise_request_service.PromiseRequestService;ee.apiclient.MakeRequestParams=module$contents$eeapiclient$request_params_MakeRequestParams;ee.apiclient.deserialize=module$contents$eeapiclient$domain_object_deserialize;ee.apiclient.serialize=module$contents$eeapiclient$domain_object_serialize;var module$contents$ee$apiclient_Call=function(callback,retries){module$contents$ee$apiclient_apiclient.initialize();this.callback=callback;this.requestService=new module$contents$ee$apiclient_EERequestService(!callback,retries);};module$contents$ee$apiclient_Call.prototype.handle=function(response){var $jscomp$this=this;if(response instanceof Promise){if(this.callback){var callback=function(result,error){try{return $jscomp$this.callback(result,error);}catch(callbackError){setTimeout(function(){throw callbackError;},0);}};response.then(callback,function(error){return callback(void 0,error);});}}else{response.then(function(result){response=result;});}return response;};module$contents$ee$apiclient_Call.prototype.projectsPath=function(){return"projects/"+module$contents$ee$apiclient_apiclient.getProject();};module$contents$ee$apiclient_Call.prototype.algorithms=function(){return new module$exports$eeapiclient$ee_api_client.ProjectsAlgorithmsApiClientImpl(module$exports$ee$apiVersion.V1ALPHA,this.requestService);};module$contents$ee$apiclient_Call.prototype.projects=function(){return new module$exports$eeapiclient$ee_api_client.ProjectsApiClientImpl(module$exports$ee$apiVersion.V1ALPHA,this.requestService);};module$contents$ee$apiclient_Call.prototype.assets=function(){return new module$exports$eeapiclient$ee_api_client.ProjectsAssetsApiClientImpl(module$exports$ee$apiVersion.V1ALPHA,this.requestService);};module$contents$ee$apiclient_Call.prototype.operations=function(){return new module$exports$eeapiclient$ee_api_client.ProjectsOperationsApiClientImpl(module$exports$ee$apiVersion.V1ALPHA,this.requestService);};module$contents$ee$apiclient_Call.prototype.value=function(){return new module$exports$eeapiclient$ee_api_client.ProjectsValueApiClientImpl(module$exports$ee$apiVersion.V1ALPHA,this.requestService);};module$contents$ee$apiclient_Call.prototype.maps=function(){return new module$exports$eeapiclient$ee_api_client.ProjectsMapsApiClientImpl(module$exports$ee$apiVersion.V1ALPHA,this.requestService);};module$contents$ee$apiclient_Call.prototype.map=function(){return new module$exports$eeapiclient$ee_api_client.ProjectsMapApiClientImpl(module$exports$ee$apiVersion.V1ALPHA,this.requestService);};module$contents$ee$apiclient_Call.prototype.image=function(){return new module$exports$eeapiclient$ee_api_client.ProjectsImageApiClientImpl(module$exports$ee$apiVersion.V1ALPHA,this.requestService);};module$contents$ee$apiclient_Call.prototype.table=function(){return new module$exports$eeapiclient$ee_api_client.ProjectsTableApiClientImpl(module$exports$ee$apiVersion.V1ALPHA,this.requestService);};module$contents$ee$apiclient_Call.prototype.tables=function(){return new module$exports$eeapiclient$ee_api_client.ProjectsTablesApiClientImpl(module$exports$ee$apiVersion.V1ALPHA,this.requestService);};module$contents$ee$apiclient_Call.prototype.video=function(){return new module$exports$eeapiclient$ee_api_client.ProjectsVideoApiClientImpl(module$exports$ee$apiVersion.V1ALPHA,this.requestService);};module$contents$ee$apiclient_Call.prototype.videoMap=function(){return new module$exports$eeapiclient$ee_api_client.ProjectsVideoMapApiClientImpl(module$exports$ee$apiVersion.V1ALPHA,this.requestService);};module$contents$ee$apiclient_Call.prototype.classifier=function(){return new module$exports$eeapiclient$ee_api_client.ProjectsClassifierApiClientImpl(module$exports$ee$apiVersion.V1ALPHA,this.requestService);};module$contents$ee$apiclient_Call.prototype.dmsMaps=function(){return new module$exports$eeapiclient$ee_api_client.ProjectsDmsMapsApiClientImpl(module$exports$ee$apiVersion.V1ALPHA,this.requestService);};module$contents$ee$apiclient_Call.prototype.thumbnails=function(){return new module$exports$eeapiclient$ee_api_client.ProjectsThumbnailsApiClientImpl(module$exports$ee$apiVersion.V1ALPHA,this.requestService);};module$contents$ee$apiclient_Call.prototype.videoThumbnails=function(){return new module$exports$eeapiclient$ee_api_client.ProjectsVideoThumbnailsApiClientImpl(module$exports$ee$apiVersion.V1ALPHA,this.requestService);};module$contents$ee$apiclient_Call.prototype.filmstripThumbnails=function(){return new module$exports$eeapiclient$ee_api_client.ProjectsFilmstripThumbnailsApiClientImpl(module$exports$ee$apiVersion.V1ALPHA,this.requestService);};var module$contents$ee$apiclient_EERequestService=function(sync,retries){this.sync=sync=void 0===sync?!1:sync;this.retries=null!=retries?retries:sync?module$contents$ee$apiclient_apiclient.MAX_SYNC_RETRIES_:module$contents$ee$apiclient_apiclient.MAX_ASYNC_RETRIES_;};$jscomp.inherits(module$contents$ee$apiclient_EERequestService,module$exports$eeapiclient$promise_request_service.PromiseRequestService);module$contents$ee$apiclient_EERequestService.prototype.send=function(params,responseCtor){var $jscomp$this=this;module$contents$eeapiclient$request_params_processParams(params);var path=params.path||"",url=module$contents$ee$apiclient_apiclient.getSafeApiUrl()+path,args=module$contents$ee$apiclient_apiclient.makeRequest_(params.queryParams||{}),body=params.body?JSON.stringify(params.body):void 0;if(this.sync){var raw=module$contents$ee$apiclient_apiclient.send(url,args,void 0,params.httpMethod,body,this.retries),value$56=responseCtor?module$contents$eeapiclient$domain_object_deserialize(responseCtor,raw):raw,thenable=function(v){return{then:function(f){return thenable(f(v));}};};return thenable(value$56);}return new Promise(function(resolve,reject){module$contents$ee$apiclient_apiclient.send(url,args,function(value,error){error?reject(error):resolve(value);},params.httpMethod,body,$jscomp$this.retries);}).then(function(r){return responseCtor?module$contents$eeapiclient$domain_object_deserialize(responseCtor,r):r;});};module$contents$ee$apiclient_EERequestService.prototype.makeRequest=function(params){};var module$contents$ee$apiclient_BatchCall=function(callback){module$contents$ee$apiclient_Call.call(this,callback);this.requestService=new module$contents$ee$apiclient_BatchRequestService();};$jscomp.inherits(module$contents$ee$apiclient_BatchCall,module$contents$ee$apiclient_Call);module$contents$ee$apiclient_BatchCall.prototype.send=function(parts,getResponse){var $jscomp$this=this,batchUrl=module$contents$ee$apiclient_apiclient.getSafeApiUrl()+"/batch",body=parts.map(function($jscomp$destructuring$var20){var $jscomp$destructuring$var21=$jscomp.makeIterator($jscomp$destructuring$var20),id=$jscomp$destructuring$var21.next().value,$jscomp$destructuring$var22=$jscomp.makeIterator($jscomp$destructuring$var21.next().value),partBody=$jscomp$destructuring$var22.next().value,ctor=$jscomp$destructuring$var22.next().value;return"--batch_EARTHENGINE_batch\r\nContent-Type: application/http\r\nContent-Transfer-Encoding: binary\r\nMIME-Version: 1.0\r\nContent-ID: <"+id+">\r\n\r\n"+partBody+"\r\n";}).join("")+"--batch_EARTHENGINE_batch--\r\n",deserializeResponses=function(response){var result={};parts.forEach(function($jscomp$destructuring$var23){var $jscomp$destructuring$var24=$jscomp.makeIterator($jscomp$destructuring$var23),id=$jscomp$destructuring$var24.next().value,$jscomp$destructuring$var25=$jscomp.makeIterator($jscomp$destructuring$var24.next().value),partBody=$jscomp$destructuring$var25.next().value,ctor=$jscomp$destructuring$var25.next().value;null!=response[id]&&(result[id]=module$contents$eeapiclient$domain_object_deserialize(ctor,response[id]));});return getResponse?getResponse(result):result;};return this.callback?(module$contents$ee$apiclient_apiclient.send(batchUrl,null,function(result,err){return $jscomp$this.callback(err?result:deserializeResponses(result),err);},"multipart/mixed; boundary=batch_EARTHENGINE_batch",body),null):deserializeResponses(module$contents$ee$apiclient_apiclient.send(batchUrl,null,void 0,"multipart/mixed; boundary=batch_EARTHENGINE_batch",body));};var module$contents$ee$apiclient_BatchRequestService=function(){};$jscomp.inherits(module$contents$ee$apiclient_BatchRequestService,module$exports$eeapiclient$promise_request_service.PromiseRequestService);module$contents$ee$apiclient_BatchRequestService.prototype.send=function(params,responseCtor){var request=[params.httpMethod+" "+params.path+" HTTP/1.1"];request.push("Content-Type: application/json; charset=utf-8");var authToken=module$contents$ee$apiclient_apiclient.getAuthToken();null!=authToken&&request.push("Authorization: "+authToken);var body=params.body?JSON.stringify(params.body):"";return[request.join("\r\n")+"\r\n\r\n"+body,responseCtor];};module$contents$ee$apiclient_BatchRequestService.prototype.makeRequest=function(params){};module$contents$ee$apiclient_apiclient.parseBatchReply=function(contentType,responseText,handle){for(var boundary=contentType.split("; boundary=")[1],$jscomp$iter$20=$jscomp.makeIterator(responseText.split("--"+boundary)),$jscomp$key$part=$jscomp$iter$20.next();!$jscomp$key$part.done;$jscomp$key$part=$jscomp$iter$20.next()){var groups=$jscomp$key$part.value.split("\r\n\r\n");if(!(3>groups.length)){var id=groups[0].match(/\r\nContent-ID: <response-([^>]*)>/)[1],status=Number(groups[1].match(/^HTTP\S*\s(\d+)\s/)[1]),text=groups.slice(2).join("\r\n\r\n");handle(id,status,text);}}};module$contents$ee$apiclient_apiclient.setApiKey=function(apiKey){module$contents$ee$apiclient_apiclient.cloudApiKey_=apiKey;};module$contents$ee$apiclient_apiclient.getApiKey=function(){return module$contents$ee$apiclient_apiclient.cloudApiKey_;};module$contents$ee$apiclient_apiclient.DEFAULT_PROJECT_="earthengine-legacy";module$contents$ee$apiclient_apiclient.setProject=function(project){module$contents$ee$apiclient_apiclient.project_=project;};module$contents$ee$apiclient_apiclient.getProject=function(){return module$contents$ee$apiclient_apiclient.project_;};module$contents$ee$apiclient_apiclient.getSafeApiUrl=function(){var url=module$contents$ee$apiclient_apiclient.apiBaseUrl_.replace(/\/api$/,"");return"window"in goog.global&&!url.match(/^https?:\/\/content-/)?url.replace(/^(https?:\/\/)(.*\.googleapis\.com)$/,"$1content-$2"):url;};module$contents$ee$apiclient_apiclient.mergeAuthScopes_=function(includeDefaultScopes,includeStorageScope,extraScopes){var scopes=[];includeDefaultScopes&&(scopes=scopes.concat(module$contents$ee$apiclient_apiclient.DEFAULT_AUTH_SCOPES_));includeStorageScope&&scopes.push(module$contents$ee$apiclient_apiclient.STORAGE_SCOPE_);scopes=scopes.concat(extraScopes);module$contents$goog$array_removeDuplicates(scopes);return scopes;};module$contents$ee$apiclient_apiclient.setAuthToken=function(clientId,tokenType,accessToken,expiresIn,extraScopes,callback,updateAuthLibrary,suppressDefaultScopes){var scopes=module$contents$ee$apiclient_apiclient.mergeAuthScopes_(!suppressDefaultScopes,!1,extraScopes||[]);module$contents$ee$apiclient_apiclient.authClientId_=clientId;module$contents$ee$apiclient_apiclient.authScopes_=scopes;var tokenObject={token_type:tokenType,access_token:accessToken,state:scopes.join(" "),expires_in:expiresIn};module$contents$ee$apiclient_apiclient.handleAuthResult_(void 0,void 0,tokenObject);!1===updateAuthLibrary?callback&&callback():module$contents$ee$apiclient_apiclient.ensureAuthLibLoaded_(function(){goog.global.gapi.auth.setToken(tokenObject);callback&&callback();});};module$contents$ee$apiclient_apiclient.refreshAuthToken=function(success,error,onImmediateFailed){if(module$contents$ee$apiclient_apiclient.isAuthTokenRefreshingEnabled_()){var authArgs={client_id:String(module$contents$ee$apiclient_apiclient.authClientId_),immediate:!0,scope:module$contents$ee$apiclient_apiclient.authScopes_.join(" ")};module$contents$ee$apiclient_apiclient.authTokenRefresher_(authArgs,function(result){if("immediate_failed"==result.error&&onImmediateFailed){onImmediateFailed();}else{if("window"in goog.global){try{module$contents$ee$apiclient_apiclient.ensureAuthLibLoaded_(function(){try{goog.global.gapi.auth.setToken(result),module$contents$ee$apiclient_apiclient.handleAuthResult_(success,error,result);}catch(e){error(e.toString());}});}catch(e){error(e.toString());}}else{module$contents$ee$apiclient_apiclient.handleAuthResult_(success,error,result);}}});}};module$contents$ee$apiclient_apiclient.setAuthTokenRefresher=function(refresher){module$contents$ee$apiclient_apiclient.authTokenRefresher_=refresher;};module$contents$ee$apiclient_apiclient.getAuthToken=function(){module$contents$ee$apiclient_apiclient.authTokenExpiration_&&0<=Date.now()-module$contents$ee$apiclient_apiclient.authTokenExpiration_&&module$contents$ee$apiclient_apiclient.clearAuthToken();return module$contents$ee$apiclient_apiclient.authToken_;};module$contents$ee$apiclient_apiclient.clearAuthToken=function(){module$contents$ee$apiclient_apiclient.authToken_=null;module$contents$ee$apiclient_apiclient.authTokenExpiration_=null;};module$contents$ee$apiclient_apiclient.getAuthClientId=function(){return module$contents$ee$apiclient_apiclient.authClientId_;};module$contents$ee$apiclient_apiclient.getAuthScopes=function(){return module$contents$ee$apiclient_apiclient.authScopes_;};module$contents$ee$apiclient_apiclient.setAuthClient=function(clientId,scopes){module$contents$ee$apiclient_apiclient.authClientId_=clientId;module$contents$ee$apiclient_apiclient.authScopes_=scopes;};module$contents$ee$apiclient_apiclient.setAppIdToken=function(token){module$contents$ee$apiclient_apiclient.appIdToken_=token;};module$contents$ee$apiclient_apiclient.initialize=function(apiBaseUrl,tileBaseUrl,xsrfToken,project){null!=apiBaseUrl?module$contents$ee$apiclient_apiclient.apiBaseUrl_=apiBaseUrl:module$contents$ee$apiclient_apiclient.initialized_||(module$contents$ee$apiclient_apiclient.apiBaseUrl_=module$contents$ee$apiclient_apiclient.DEFAULT_API_BASE_URL_);null!=tileBaseUrl?module$contents$ee$apiclient_apiclient.tileBaseUrl_=tileBaseUrl:module$contents$ee$apiclient_apiclient.initialized_||(module$contents$ee$apiclient_apiclient.tileBaseUrl_=module$contents$ee$apiclient_apiclient.DEFAULT_TILE_BASE_URL_);void 0!==xsrfToken&&(module$contents$ee$apiclient_apiclient.xsrfToken_=xsrfToken);null!=project?module$contents$ee$apiclient_apiclient.setProject(project):module$contents$ee$apiclient_apiclient.setProject(module$contents$ee$apiclient_apiclient.getProject()||module$contents$ee$apiclient_apiclient.DEFAULT_PROJECT_);module$contents$ee$apiclient_apiclient.initialized_=!0;};module$contents$ee$apiclient_apiclient.reset=function(){module$contents$ee$apiclient_apiclient.apiBaseUrl_=null;module$contents$ee$apiclient_apiclient.tileBaseUrl_=null;module$contents$ee$apiclient_apiclient.xsrfToken_=null;module$contents$ee$apiclient_apiclient.initialized_=!1;};module$contents$ee$apiclient_apiclient.setDeadline=function(milliseconds){module$contents$ee$apiclient_apiclient.deadlineMs_=milliseconds;};module$contents$ee$apiclient_apiclient.setParamAugmenter=function(augmenter){module$contents$ee$apiclient_apiclient.paramAugmenter_=augmenter||goog.functions.identity;};module$contents$ee$apiclient_apiclient.getApiBaseUrl=function(){return module$contents$ee$apiclient_apiclient.apiBaseUrl_;};module$contents$ee$apiclient_apiclient.getTileBaseUrl=function(){return module$contents$ee$apiclient_apiclient.tileBaseUrl_;};module$contents$ee$apiclient_apiclient.getXsrfToken=function(){return module$contents$ee$apiclient_apiclient.xsrfToken_;};module$contents$ee$apiclient_apiclient.isInitialized=function(){return module$contents$ee$apiclient_apiclient.initialized_;};module$contents$ee$apiclient_apiclient.send=function(path,params,callback,method,body,retries){module$contents$ee$apiclient_apiclient.initialize();var profileHookAtCallTime=module$contents$ee$apiclient_apiclient.profileHook_,contentType="application/x-www-form-urlencoded";body&&(contentType="application/json",method&&method.startsWith("multipart")&&(contentType=method,method="POST"));method=method||"POST";var headers={"Content-Type":contentType},version="0.1.288";"0.1.288"===version&&(version="latest");headers[module$contents$ee$apiclient_apiclient.API_CLIENT_VERSION_HEADER]="ee-js/"+version;var authToken=module$contents$ee$apiclient_apiclient.getAuthToken();if(null!=authToken){headers.Authorization=authToken;}else{if(callback&&module$contents$ee$apiclient_apiclient.isAuthTokenRefreshingEnabled_()){return module$contents$ee$apiclient_apiclient.refreshAuthToken(function(){module$contents$ee$apiclient_apiclient.withProfiling(profileHookAtCallTime,function(){module$contents$ee$apiclient_apiclient.send(path,params,callback,method);});}),null;}}params=params?params.clone():new goog.Uri.QueryData();null!=module$contents$ee$apiclient_apiclient.cloudApiKey_&¶ms.add("key",module$contents$ee$apiclient_apiclient.cloudApiKey_);profileHookAtCallTime&&(headers[module$contents$ee$apiclient_apiclient.PROFILE_REQUEST_HEADER]="1");module$contents$ee$apiclient_apiclient.getProject()&&module$contents$ee$apiclient_apiclient.getProject()!==module$contents$ee$apiclient_apiclient.DEFAULT_PROJECT_&&(headers[module$contents$ee$apiclient_apiclient.USER_PROJECT_OVERRIDE_HEADER_]=module$contents$ee$apiclient_apiclient.getProject());params=module$contents$ee$apiclient_apiclient.paramAugmenter_(params,path);null!=module$contents$ee$apiclient_apiclient.xsrfToken_&&(headers["X-XSRF-Token"]=module$contents$ee$apiclient_apiclient.xsrfToken_);null!=module$contents$ee$apiclient_apiclient.appIdToken_&&(headers[module$contents$ee$apiclient_apiclient.APP_ID_TOKEN_HEADER_]=module$contents$ee$apiclient_apiclient.appIdToken_);var requestData=body||null,paramString=params?params.toString():"";"POST"===method&&void 0===body?requestData=paramString:goog.string.isEmptyOrWhitespace(paramString)||(path+=goog.string.contains(path,"?")?"&":"?",path+=paramString);var url=path.startsWith("/")?module$contents$ee$apiclient_apiclient.apiBaseUrl_+path:path;if(callback){return module$contents$ee$apiclient_apiclient.requestQueue_.push(module$contents$ee$apiclient_apiclient.buildAsyncRequest_(url,callback,method,requestData,headers,retries)),module$contents$ee$apiclient_apiclient.RequestThrottle_.fire(),null;}for(var setRequestHeader=function(value,key){this.setRequestHeader&&this.setRequestHeader(key,value);},xmlHttp,retryCount=0,maxRetries=null!=retries?retries:module$contents$ee$apiclient_apiclient.MAX_SYNC_RETRIES_;;){xmlHttp=(0,goog.net.XmlHttp)();xmlHttp.open(method,url,!1);module$contents$goog$object_forEach(headers,setRequestHeader,xmlHttp);xmlHttp.send(requestData);if(429!=xmlHttp.status||retryCount>maxRetries){break;}retryCount++;}return module$contents$ee$apiclient_apiclient.handleResponse_(xmlHttp.status,function getResponseHeaderSafe(header){try{return xmlHttp.getResponseHeader(header);}catch(e){return null;}},xmlHttp.responseText,profileHookAtCallTime,void 0,url,method);};module$contents$ee$apiclient_apiclient.buildAsyncRequest_=function(url,callback,method,content,headers,retries){var retryCount=0,request={url:url,method:method,content:content,headers:headers},profileHookAtCallTime=module$contents$ee$apiclient_apiclient.profileHook_,maxRetries=null!=retries?retries:module$contents$ee$apiclient_apiclient.MAX_ASYNC_RETRIES_;request.callback=function(e){var xhrIo=e.target;return 429==xhrIo.getStatus()&&retryCount<maxRetries?(retryCount++,setTimeout(function(){module$contents$ee$apiclient_apiclient.requestQueue_.push(request);module$contents$ee$apiclient_apiclient.RequestThrottle_.fire();},module$contents$ee$apiclient_apiclient.calculateRetryWait_(retryCount)),null):module$contents$ee$apiclient_apiclient.handleResponse_(xhrIo.getStatus(),goog.bind(xhrIo.getResponseHeader,xhrIo),xhrIo.getResponseText(),profileHookAtCallTime,callback,url,method);};return request;};module$contents$ee$apiclient_apiclient.withProfiling=function(hook,body,thisObject){var saved=module$contents$ee$apiclient_apiclient.profileHook_;try{return module$contents$ee$apiclient_apiclient.profileHook_=hook,body.call(thisObject);}finally{module$contents$ee$apiclient_apiclient.profileHook_=saved;}};module$contents$ee$apiclient_apiclient.handleResponse_=function(status$jscomp$0,getResponseHeader,responseText,profileHook,callback,url,method){var profileId=profileHook?getResponseHeader(module$contents$ee$apiclient_apiclient.PROFILE_HEADER):"";profileId&&profileHook&&profileHook(profileId);var parseJson=function(body){try{var response=JSON.parse(body);return goog.isObject(response)&&"error"in response&&"message"in response.error?response.error.message:{parsed:response};}catch(e){return"Invalid JSON: "+body;}},statusError=function(status){if(0===status){return"Failed to contact Earth Engine servers. Please check your connection, firewall, or browser extension settings.";}if(200>status||300<=status){return"Server returned HTTP code: "+status+" for "+method+" "+url;}},errorMessage,typeHeader=getResponseHeader("Content-Type")||"application/json",contentType=typeHeader.replace(/;.*/,"");if("application/json"===contentType||"text/json"===contentType){var response$jscomp$0=parseJson(responseText);if(response$jscomp$0.parsed){var data=response$jscomp$0.parsed;void 0===data&&(errorMessage="Malformed response: "+responseText);}else{errorMessage=response$jscomp$0;}}else{if("multipart/mixed"===contentType){data={};var errors=[];module$contents$ee$apiclient_apiclient.parseBatchReply(typeHeader,responseText,function(id,status,text){var response=parseJson(text);response.parsed&&(data[id]=response.parsed);var error=(response.parsed?"":response)||statusError(status);error&&errors.push(id+": "+error);});errors.length&&(errorMessage=errors.join("\n"));}else{var typeError="Response was unexpectedly not JSON, but "+contentType;}}errorMessage=errorMessage||statusError(status$jscomp$0)||typeError;if(callback){return callback(data,errorMessage),null;}if(!errorMessage){return data;}throw Error(errorMessage);};module$contents$ee$apiclient_apiclient.ensureAuthLibLoaded_=function(callback){var done=function(){goog.global.gapi.config.update("client/cors",!0);module$contents$ee$apiclient_apiclient.authTokenRefresher_||module$contents$ee$apiclient_apiclient.setAuthTokenRefresher(goog.global.gapi.auth.authorize);callback();};if(goog.isObject(goog.global.gapi)&&goog.isObject(goog.global.gapi.auth)&&"function"===typeof goog.global.gapi.auth.authorize){done();}else{for(var callbackName=Date.now().toString(36);(callbackName in goog.global);){callbackName+="_";}goog.global[callbackName]=function(){delete goog.global[callbackName];done();};goog.net.jsloader.safeLoad(goog.html.TrustedResourceUrl.format(module$contents$ee$apiclient_apiclient.AUTH_LIBRARY_URL_,{onload:callbackName}));}};module$contents$ee$apiclient_apiclient.handleAuthResult_=function(success,error,result){if(result.access_token){var token=result.token_type+" "+result.access_token;if(result.expires_in||0===result.expires_in){var expiresInMs=900*result.expires_in,timeout=setTimeout(module$contents$ee$apiclient_apiclient.refreshAuthToken,0.9*expiresInMs);void 0!==timeout.unref&&timeout.unref();module$contents$ee$apiclient_apiclient.authTokenExpiration_=Date.now()+expiresInMs;}module$contents$ee$apiclient_apiclient.authToken_=token;success&&success();}else{error&&error(result.error||"Unknown error.");}};module$contents$ee$apiclient_apiclient.makeRequest_=function(params){for(var request=new goog.Uri.QueryData(),$jscomp$iter$21=$jscomp.makeIterator(Object.entries(params)),$jscomp$key$=$jscomp$iter$21.next();!$jscomp$key$.done;$jscomp$key$=$jscomp$iter$21.next()){var $jscomp$destructuring$var27=$jscomp.makeIterator($jscomp$key$.value),name=$jscomp$destructuring$var27.next().value,item=$jscomp$destructuring$var27.next().value;request.set(name,item);}return request;};module$contents$ee$apiclient_apiclient.setupMockSend=function(calls){function getResponse(url,method,data){url=url.replace(apiBaseUrl,"").replace(module$exports$ee$apiVersion.V1ALPHA+"/projects/"+module$contents$ee$apiclient_apiclient.DEFAULT_PROJECT_+"/","");if(url in calls){var response=calls[url];}else{throw Error(url+" mock response not specified");}"function"===typeof response&&(response=response(url,method,data));"string"===typeof response&&(response={text:response,status:200,contentType:"application/json; charset=utf-8"});if("string"!==typeof response.text){throw Error(url+" mock response missing/invalid text");}if("number"!==typeof response.status&&"function"!==typeof response.status){throw Error(url+" mock response missing/invalid status");}return response;}calls=calls?module$contents$goog$object_clone(calls):{};var apiBaseUrl;goog.net.XhrIo.send=function(url,callback,method,data){apiBaseUrl=apiBaseUrl||module$contents$ee$apiclient_apiclient.apiBaseUrl_;var responseData=getResponse(url,method,data),e=new function(){this.target={};}();e.target.getResponseText=function(){return responseData.text;};e.target.getStatus="function"===typeof responseData.status?responseData.status:function(){return responseData.status;};e.target.getResponseHeader=function(header){return"Content-Type"===header?responseData.contentType:null;};setTimeout(goog.bind(callback,e,e),0);return new goog.net.XhrIo();};var fakeXmlHttp=function(){};fakeXmlHttp.prototype.open=function(method,urlIn){apiBaseUrl=apiBaseUrl||module$contents$ee$apiclient_apiclient.apiBaseUrl_;this.url=urlIn;this.method=method;};fakeXmlHttp.prototype.setRequestHeader=function(){};fakeXmlHttp.prototype.getResponseHeader=function(header){return"Content-Type"===header?this.contentType_||null:null;};fakeXmlHttp.prototype.send=function(data){var responseData=getResponse(this.url,this.method,data);this.responseText=responseData.text;this.status="function"===typeof responseData.status?responseData.status():responseData.status;this.contentType_=responseData.contentType;};goog.net.XmlHttp.setGlobalFactory({createInstance:function(){return new fakeXmlHttp();},getOptions:function(){return{};}});};module$contents$ee$apiclient_apiclient.isAuthTokenRefreshingEnabled_=function(){return!(!module$contents$ee$apiclient_apiclient.authTokenRefresher_||!module$contents$ee$apiclient_apiclient.authClientId_);};module$contents$ee$apiclient_apiclient.calculateRetryWait_=function(retryCount){return Math.min(module$contents$ee$apiclient_apiclient.MAX_RETRY_WAIT_,Math.pow(2,retryCount)*module$contents$ee$apiclient_apiclient.BASE_RETRY_WAIT_);};module$contents$ee$apiclient_apiclient.sleep_=function(timeInMs){for(var end=new Date().getTime()+timeInMs;new Date().getTime()<end;){}};module$contents$ee$apiclient_apiclient.NetworkRequest_=function(){};module$contents$ee$apiclient_apiclient.requestQueue_=[];module$contents$ee$apiclient_apiclient.REQUEST_THROTTLE_INTERVAL_MS_=350;module$contents$ee$apiclient_apiclient.RequestThrottle_=new module$contents$goog$async$Throttle_Throttle(function(){var request=module$contents$ee$apiclient_apiclient.requestQueue_.shift();request&&goog.net.XhrIo.send(request.url,request.callback,request.method,request.content,request.headers,module$contents$ee$apiclient_apiclient.deadlineMs_);module$contents$goog$array_isEmpty(module$contents$ee$apiclient_apiclient.requestQueue_)||module$contents$ee$apiclient_apiclient.RequestThrottle_.fire();},module$contents$ee$apiclient_apiclient.REQUEST_THROTTLE_INTERVAL_MS_);module$contents$ee$apiclient_apiclient.apiBaseUrl_=null;module$contents$ee$apiclient_apiclient.tileBaseUrl_=null;module$contents$ee$apiclient_apiclient.xsrfToken_=null;module$contents$ee$apiclient_apiclient.appIdToken_=null;module$contents$ee$apiclient_apiclient.paramAugmenter_=goog.functions.identity;module$contents$ee$apiclient_apiclient.authToken_=null;module$contents$ee$apiclient_apiclient.authTokenExpiration_=null;module$contents$ee$apiclient_apiclient.authClientId_=null;module$contents$ee$apiclient_apiclient.authScopes_=[];module$contents$ee$apiclient_apiclient.authTokenRefresher_=null;module$contents$ee$apiclient_apiclient.AUTH_SCOPE_="https://www.googleapis.com/auth/earthengine";module$contents$ee$apiclient_apiclient.READ_ONLY_AUTH_SCOPE_="https://www.googleapis.com/auth/earthengine.readonly";module$contents$ee$apiclient_apiclient.CLOUD_PLATFORM_SCOPE_="https://www.googleapis.com/auth/cloud-platform";module$contents$ee$apiclient_apiclient.DEFAULT_AUTH_SCOPES_=[module$contents$ee$apiclient_apiclient.AUTH_SCOPE_,module$contents$ee$apiclient_apiclient.CLOUD_PLATFORM_SCOPE_];module$contents$ee$apiclient_apiclient.AUTH_LIBRARY_URL_=goog.string.Const.from("https://apis.google.com/js/client.js?onload=%{onload}");module$contents$ee$apiclient_apiclient.STORAGE_SCOPE_="https://www.googleapis.com/auth/devstorage.read_write";module$contents$ee$apiclient_apiclient.cloudApiKey_=null;module$contents$ee$apiclient_apiclient.initialized_=!1;module$contents$ee$apiclient_apiclient.deadlineMs_=0;module$contents$ee$apiclient_apiclient.profileHook_=null;module$contents$ee$apiclient_apiclient.BASE_RETRY_WAIT_=1000;module$contents$ee$apiclient_apiclient.MAX_RETRY_WAIT_=120000;module$contents$ee$apiclient_apiclient.MAX_ASYNC_RETRIES_=10;module$contents$ee$apiclient_apiclient.MAX_SYNC_RETRIES_=5;module$contents$ee$apiclient_apiclient.APP_ID_TOKEN_HEADER_="X-Earth-Engine-App-ID-Token";module$contents$ee$apiclient_apiclient.PROFILE_HEADER="X-Earth-Engine-Computation-Profile";module$contents$ee$apiclient_apiclient.PROFILE_REQUEST_HEADER="X-Earth-Engine-Computation-Profiling";module$contents$ee$apiclient_apiclient.USER_PROJECT_OVERRIDE_HEADER_="X-Goog-User-Project";module$contents$ee$apiclient_apiclient.API_CLIENT_VERSION_HEADER="x-goog-api-client";module$contents$ee$apiclient_apiclient.DEFAULT_API_BASE_URL_="https://earthengine.googleapis.com/api";module$contents$ee$apiclient_apiclient.DEFAULT_TILE_BASE_URL_="https://earthengine.googleapis.com";module$contents$ee$apiclient_apiclient.AuthArgs=function(){};module$contents$ee$apiclient_apiclient.AuthResponse=function(){};ee.apiclient.Call=module$contents$ee$apiclient_Call;ee.apiclient.BatchCall=module$contents$ee$apiclient_BatchCall;ee.apiclient.setApiKey=module$contents$ee$apiclient_apiclient.setApiKey;ee.apiclient.getApiKey=module$contents$ee$apiclient_apiclient.getApiKey;ee.apiclient.setProject=module$contents$ee$apiclient_apiclient.setProject;ee.apiclient.getProject=module$contents$ee$apiclient_apiclient.getProject;ee.apiclient.DEFAULT_PROJECT=module$contents$ee$apiclient_apiclient.DEFAULT_PROJECT_;ee.apiclient.PROFILE_HEADER=module$contents$ee$apiclient_apiclient.PROFILE_HEADER;ee.apiclient.PROFILE_REQUEST_HEADER=module$contents$ee$apiclient_apiclient.PROFILE_REQUEST_HEADER;ee.apiclient.API_CLIENT_VERSION_HEADER=module$contents$ee$apiclient_apiclient.API_CLIENT_VERSION_HEADER;ee.apiclient.send=module$contents$ee$apiclient_apiclient.send;ee.apiclient.AUTH_SCOPE=module$contents$ee$apiclient_apiclient.AUTH_SCOPE_;ee.apiclient.READ_ONLY_AUTH_SCOPE=module$contents$ee$apiclient_apiclient.READ_ONLY_AUTH_SCOPE_;ee.apiclient.CLOUD_PLATFORM_SCOPE=module$contents$ee$apiclient_apiclient.CLOUD_PLATFORM_SCOPE_;ee.apiclient.STORAGE_SCOPE=module$contents$ee$apiclient_apiclient.STORAGE_SCOPE_;ee.apiclient.DEFAULT_AUTH_SCOPES=module$contents$ee$apiclient_apiclient.DEFAULT_AUTH_SCOPES_;ee.apiclient.makeRequest=module$contents$ee$apiclient_apiclient.makeRequest_;ee.apiclient.reset=module$contents$ee$apiclient_apiclient.reset;ee.apiclient.initialize=module$contents$ee$apiclient_apiclient.initialize;ee.apiclient.setDeadline=module$contents$ee$apiclient_apiclient.setDeadline;ee.apiclient.isInitialized=module$contents$ee$apiclient_apiclient.isInitialized;ee.apiclient.ensureAuthLibLoaded=module$contents$ee$apiclient_apiclient.ensureAuthLibLoaded_;ee.apiclient.handleAuthResult=module$contents$ee$apiclient_apiclient.handleAuthResult_;ee.apiclient.refreshAuthToken=module$contents$ee$apiclient_apiclient.refreshAuthToken;ee.apiclient.setAuthClient=module$contents$ee$apiclient_apiclient.setAuthClient;ee.apiclient.getAuthScopes=module$contents$ee$apiclient_apiclient.getAuthScopes;ee.apiclient.getAuthClientId=module$contents$ee$apiclient_apiclient.getAuthClientId;ee.apiclient.getAuthToken=module$contents$ee$apiclient_apiclient.getAuthToken;ee.apiclient.setAuthToken=module$contents$ee$apiclient_apiclient.setAuthToken;ee.apiclient.clearAuthToken=module$contents$ee$apiclient_apiclient.clearAuthToken;ee.apiclient.setAuthTokenRefresher=module$contents$ee$apiclient_apiclient.setAuthTokenRefresher;ee.apiclient.setAppIdToken=module$contents$ee$apiclient_apiclient.setAppIdToken;ee.apiclient.mergeAuthScopes=module$contents$ee$apiclient_apiclient.mergeAuthScopes_;ee.apiclient.setupMockSend=module$contents$ee$apiclient_apiclient.setupMockSend;ee.apiclient.setParamAugmenter=module$contents$ee$apiclient_apiclient.setParamAugmenter;ee.apiclient.withProfiling=module$contents$ee$apiclient_apiclient.withProfiling;ee.apiclient.getApiBaseUrl=module$contents$ee$apiclient_apiclient.getApiBaseUrl;ee.apiclient.getTileBaseUrl=module$contents$ee$apiclient_apiclient.getTileBaseUrl;ee.apiclient.AuthArgs=module$contents$ee$apiclient_apiclient.AuthArgs;ee.apiclient.AuthResponse=module$contents$ee$apiclient_apiclient.AuthResponse;ee.apiclient.RequestThrottle=module$contents$ee$apiclient_apiclient.RequestThrottle_;ee.apiclient.calculateRetryWait=module$contents$ee$apiclient_apiclient.calculateRetryWait_;ee.apiclient.MAX_ASYNC_RETRIES=module$contents$ee$apiclient_apiclient.MAX_ASYNC_RETRIES_;ee.apiclient.REQUEST_THROTTLE_INTERVAL_MS=module$contents$ee$apiclient_apiclient.REQUEST_THROTTLE_INTERVAL_MS_;ee.apiclient.isAuthTokenRefreshingEnabled=module$contents$ee$apiclient_apiclient.isAuthTokenRefreshingEnabled_;goog.exportSymbol("ee.api.ListAssetsResponse",module$exports$eeapiclient$ee_api_client.ListAssetsResponse);goog.exportSymbol("ee.api.EarthEngineAsset",module$exports$eeapiclient$ee_api_client.EarthEngineAsset);goog.exportSymbol("ee.api.ListImagesResponse",module$exports$eeapiclient$ee_api_client.ListImagesResponse);goog.exportSymbol("ee.api.Image",module$exports$eeapiclient$ee_api_client.Image);goog.exportSymbol("ee.api.Operation",module$exports$eeapiclient$ee_api_client.Operation);ee.Encodable=function(){};ee.rpc_node={};ee.rpc_node.constant=function(obj){if(void 0===obj||null===obj){obj=module$exports$eeapiclient$domain_object.NULL_VALUE;}return new module$exports$eeapiclient$ee_api_client.ValueNode({constantValue:obj});};ee.rpc_node.reference=function(ref){return new module$exports$eeapiclient$ee_api_client.ValueNode({valueReference:ref});};ee.rpc_node.array=function(values){return new module$exports$eeapiclient$ee_api_client.ValueNode({arrayValue:new module$exports$eeapiclient$ee_api_client.ArrayValue({values:values})});};ee.rpc_node.dictionary=function(values){return new module$exports$eeapiclient$ee_api_client.ValueNode({dictionaryValue:new module$exports$eeapiclient$ee_api_client.DictionaryValue({values:values})});};ee.rpc_node.functionByName=function(name,args){return new module$exports$eeapiclient$ee_api_client.ValueNode({functionInvocationValue:new module$exports$eeapiclient$ee_api_client.FunctionInvocation({functionName:name,arguments:args})});};ee.rpc_node.functionByReference=function(ref,args){return new module$exports$eeapiclient$ee_api_client.ValueNode({functionInvocationValue:new module$exports$eeapiclient$ee_api_client.FunctionInvocation({functionReference:ref,arguments:args})});};ee.rpc_node.functionDefinition=function(argumentNames,body){return new module$exports$eeapiclient$ee_api_client.ValueNode({functionDefinitionValue:new module$exports$eeapiclient$ee_api_client.FunctionDefinition({argumentNames:argumentNames,body:body})});};ee.rpc_node.argumentReference=function(ref){return new module$exports$eeapiclient$ee_api_client.ValueNode({argumentReference:ref});};ee.rpc_convert={};ee.rpc_convert.fileFormat=function(format){if(!format){return"AUTO_JPEG_PNG";}var upper=format.toUpperCase();switch(upper){case"JPG":return"JPEG";case"AUTO":return"AUTO_JPEG_PNG";case"TIF":case"TIFF":case"GEOTIF":case"GEOTIFF":return"GEO_TIFF";case"TF_RECORD":case"TFRECORD":return"TF_RECORD_IMAGE";case"NUMPY":return"NPY";case"ZIPPED_TIF":case"ZIPPED_TIFF":case"ZIPPED_GEOTIF":case"ZIPPED_GEOTIFF":return"ZIPPED_GEO_TIFF";case"ZIPPED_TIF_PER_BAND":case"ZIPPED_TIFF_PER_BAND":case"ZIPPED_GEOTIF_PER_BAND":case"ZIPPED_GEOTIFF_PER_BAND":return"ZIPPED_GEO_TIFF_PER_BAND";default:return upper;}};ee.rpc_convert.tableFileFormat=function(format){if(!format){return"CSV";}var upper=format.toUpperCase();switch(upper){case"TF_RECORD":case"TFRECORD":return"TF_RECORD_TABLE";case"JSON":case"GEOJSON":return"GEO_JSON";default:return upper;}};ee.rpc_convert.orientation=function(orientation){if(!orientation){return"VERTICAL";}var upper=orientation.toUpperCase();if("HORIZONTAL"!==upper||"VERTICAL"!==upper){throw Error('Orientation must be "horizontal" or "vertical"');}return upper;};ee.rpc_convert.bandList=function(bands){if(!bands){return[];}if("string"===typeof bands){return bands.split(",");}if(Array.isArray(bands)){return bands;}throw Error("Invalid band list "+bands);};ee.rpc_convert.visualizationOptions=function(params){var result=new module$exports$eeapiclient$ee_api_client.VisualizationOptions(),hasResult=!1;if("palette"in params){var pal=params.palette;result.paletteColors="string"===typeof pal?pal.split(","):pal;hasResult=!0;}var ranges=[];if("gain"in params||"bias"in params){if("min"in params||"max"in params){throw Error("Gain and bias can't be specified with min and max");}var valueRange=result.paletteColors?result.paletteColors.length-1:255;ranges=ee.rpc_convert.pairedValues(params,"bias","gain").map(function(pair){var min=-pair.bias/pair.gain;return{min:min,max:valueRange/pair.gain+min};});}else{if("min"in params||"max"in params){ranges=ee.rpc_convert.pairedValues(params,"min","max");}}0!==ranges.length&&(result.ranges=ranges.map(function(range){return new module$exports$eeapiclient$ee_api_client.DoubleRange(range);}),hasResult=!0);var gammas=ee.rpc_convert.csvToNumbers(params.gamma);if(1<gammas.length){throw Error("Only one gamma value is supported");}1===gammas.length&&(result.gamma=gammas[0],hasResult=!0);return hasResult?result:null;};ee.rpc_convert.csvToNumbers=function(csv){return csv?csv.split(",").map(Number):[];};ee.rpc_convert.pairedValues=function(obj,a,b){var aValues=ee.rpc_convert.csvToNumbers(obj[a]),bValues=ee.rpc_convert.csvToNumbers(obj[b]);if(0===aValues.length){return bValues.map(function(value){var $jscomp$compprop1={};return $jscomp$compprop1[a]=0,$jscomp$compprop1[b]=value,$jscomp$compprop1;});}if(0===bValues.length){return aValues.map(function(value){var $jscomp$compprop2={};return $jscomp$compprop2[a]=value,$jscomp$compprop2[b]=1,$jscomp$compprop2;});}if(aValues.length!==bValues.length){throw Error("Length of "+a+" and "+b+" must match.");}return aValues.map(function(value,index){var $jscomp$compprop3={};return $jscomp$compprop3[a]=value,$jscomp$compprop3[b]=bValues[index],$jscomp$compprop3;});};ee.rpc_convert.algorithms=function(result){for(var convertArgument=function(argument){var internalArgument={};internalArgument.description=argument.description||"";internalArgument.type=argument.type||"";null!=argument.argumentName&&(internalArgument.name=argument.argumentName);void 0!==argument.defaultValue&&(internalArgument["default"]=argument.defaultValue);null!=argument.optional&&(internalArgument.optional=argument.optional);return internalArgument;},convertAlgorithm=function(algorithm){var internalAlgorithm={};internalAlgorithm.args=(algorithm.arguments||[]).map(convertArgument);internalAlgorithm.description=algorithm.description||"";internalAlgorithm.returns=algorithm.returnType||"";null!=algorithm.hidden&&(internalAlgorithm.hidden=algorithm.hidden);algorithm.preview&&(internalAlgorithm.preview=algorithm.preview);algorithm.deprecated&&(internalAlgorithm.deprecated=algorithm.deprecationReason);algorithm.sourceCodeUri&&(internalAlgorithm.sourceCodeUri=algorithm.sourceCodeUri);return internalAlgorithm;},internalAlgorithms={},$jscomp$iter$22=$jscomp.makeIterator(result.algorithms||[]),$jscomp$key$algorithm=$jscomp$iter$22.next();!$jscomp$key$algorithm.done;$jscomp$key$algorithm=$jscomp$iter$22.next()){var algorithm$jscomp$0=$jscomp$key$algorithm.value,name=algorithm$jscomp$0.name.replace(/^algorithms\//,"");internalAlgorithms[name]=convertAlgorithm(algorithm$jscomp$0);}return internalAlgorithms;};ee.rpc_convert.DEFAULT_PROJECT="earthengine-legacy";ee.rpc_convert.PUBLIC_PROJECT="earthengine-public";ee.rpc_convert.PROJECT_ID_RE=/^projects\/((?:\w+(?:[\w\-]+\.[\w\-]+)*?\.\w+:)?[a-z][a-z0-9\-]{4,28}[a-z0-9])\/.+/;ee.rpc_convert.CLOUD_ASSET_ID_RE=/^projects\/((?:\w+(?:[\w\-]+\.[\w\-]+)*?\.\w+:)?[a-z][a-z0-9\-]{4,28}[a-z0-9])\/assets\/(.*)$/;ee.rpc_convert.CLOUD_ASSET_ROOT_RE=/^projects\/((?:\w+(?:[\w\-]+\.[\w\-]+)*?\.\w+:)?[a-z][a-z0-9\-]{4,28}[a-z0-9])\/assets\/?$/;ee.rpc_convert.projectIdFromPath=function(path){var matches=ee.rpc_convert.PROJECT_ID_RE.exec(path);return matches?matches[1]:ee.rpc_convert.DEFAULT_PROJECT;};ee.rpc_convert.projectParentFromPath=function(path){return"projects/"+ee.rpc_convert.projectIdFromPath(path);};ee.rpc_convert.assetIdToAssetName=function(param){return ee.rpc_convert.CLOUD_ASSET_ID_RE.exec(param)?param:/^(users|projects)\/.*/.exec(param)?"projects/"+ee.rpc_convert.DEFAULT_PROJECT+"/assets/"+param:"projects/"+ee.rpc_convert.PUBLIC_PROJECT+"/assets/"+param;};ee.rpc_convert.assetNameToAssetId=function(name){var parts=name.split("/"),isLegacyProject=function(id){return[ee.rpc_convert.DEFAULT_PROJECT,ee.rpc_convert.PUBLIC_PROJECT].includes(id);};return"projects"===parts[0]&&"assets"===parts[2]&&isLegacyProject(parts[1])?parts.slice(3).join("/"):name;};ee.rpc_convert.assetTypeForCreate=function(param){switch(param){case"ImageCollection":return"IMAGE_COLLECTION";case"Folder":return"FOLDER";default:return param;}};ee.rpc_convert.listAssetsToGetList=function(result){return(result.assets||[]).map(ee.rpc_convert.assetToLegacyResult);};ee.rpc_convert.listImagesToGetList=function(result){return(result.images||[]).map(ee.rpc_convert.imageToLegacyResult);};ee.rpc_convert.assetTypeToLegacyAssetType=function(type){switch(type){case"ALGORITHM":return"Algorithm";case"FOLDER":return"Folder";case"IMAGE":return"Image";case"IMAGE_COLLECTION":return"ImageCollection";case"TABLE":return"Table";case"CLASSIFIER":return"Classifier";case"DATA_MAPPING_SERVICE":return"DmsAsset";default:return"Unknown";}};ee.rpc_convert.legacyAssetTypeToAssetType=function(type){switch(type){case"Algorithm":return"ALGORITHM";case"Folder":return"FOLDER";case"Image":return"IMAGE";case"ImageCollection":return"IMAGE_COLLECTION";case"Table":return"TABLE";default:return"UNKNOWN";}};ee.rpc_convert.assetToLegacyResult=function(result){var asset=ee.rpc_convert.makeLegacyAsset_(ee.rpc_convert.assetTypeToLegacyAssetType(result.type),result.name),properties=Object.assign({},result.properties||{});result.sizeBytes&&(properties["system:asset_size"]=Number(result.sizeBytes));result.startTime&&(properties["system:time_start"]=Date.parse(result.startTime));result.endTime&&(properties["system:time_end"]=Date.parse(result.endTime));result.geometry&&(properties["system:footprint"]=result.geometry);"string"===typeof result.title&&(properties["system:title"]=result.title);"string"===typeof result.description&&(properties["system:description"]=result.description);result.updateTime&&(asset.version=1000*Date.parse(result.updateTime));asset.properties=properties;result.bands&&(asset.bands=result.bands.map(function(band){var legacyBand={id:band.id,crs:band.grid.crsCode,dimensions:void 0,crs_transform:void 0};if(band.grid){if(null!=band.grid.affineTransform){var affine=band.grid.affineTransform;legacyBand.crs_transform=[affine.scaleX||0,affine.shearX||0,affine.translateX||0,affine.shearY||0,affine.scaleY||0,affine.translateY||0];}null!=band.grid.dimensions&&(legacyBand.dimensions=[band.grid.dimensions.width,band.grid.dimensions.height]);}if(band.dataType){var dataType={type:"PixelType"};dataType.precision=(band.dataType.precision||"").toLowerCase();band.dataType.range&&(dataType.min=band.dataType.range.min||0,dataType.max=band.dataType.range.max);legacyBand.data_type=dataType;}return legacyBand;}));result.dmsAssetLocation&&(asset.dmsAssetLocation=result.dmsAssetLocation);return asset;};ee.rpc_convert.legacyPropertiesToAssetUpdate=function(legacyProperties){var asset=new module$exports$eeapiclient$ee_api_client.EarthEngineAsset(),toTimestamp=function(msec){return new Date(Number(msec)).toISOString();},asNull=function(value){return null===value?module$exports$eeapiclient$domain_object.NULL_VALUE:void 0;},properties=Object.assign({},legacyProperties),value$jscomp$0,extractValue=function(key){value$jscomp$0=properties[key];delete properties[key];return value$jscomp$0;};void 0!==extractValue("system:asset_size")&&(asset.sizeBytes=asNull(value$jscomp$0)||String(value$jscomp$0));void 0!==extractValue("system:time_start")&&(asset.startTime=asNull(value$jscomp$0)||toTimestamp(value$jscomp$0));void 0!==extractValue("system:time_end")&&(asset.endTime=asNull(value$jscomp$0)||toTimestamp(value$jscomp$0));void 0!==extractValue("system:footprint")&&(asset.geometry=asNull(value$jscomp$0)||value$jscomp$0);extractValue("system:title");"string"!==typeof value$jscomp$0&&null!==value$jscomp$0||null!=properties.title||(properties.title=asNull(value$jscomp$0)||value$jscomp$0);extractValue("system:description");"string"!==typeof value$jscomp$0&&null!==value$jscomp$0||null!=properties.description||(properties.description=asNull(value$jscomp$0)||value$jscomp$0);Object.entries(properties).forEach(function($jscomp$destructuring$var28){var $jscomp$destructuring$var29=$jscomp.makeIterator($jscomp$destructuring$var28),key=$jscomp$destructuring$var29.next().value,value=$jscomp$destructuring$var29.next().value;properties[key]=asNull(value)||value;});asset.properties=properties;return asset;};ee.rpc_convert.imageToLegacyResult=function(result){return ee.rpc_convert.makeLegacyAsset_("Image",result.name);};ee.rpc_convert.makeLegacyAsset_=function(type,name){var legacyAsset={};legacyAsset.type=type;null!=name&&(legacyAsset.id=ee.rpc_convert.assetNameToAssetId(name));return legacyAsset;};ee.rpc_convert.getListToListImages=function(param){var imagesRequest={},toTimestamp=function(msec){return new Date(msec).toISOString();};param.num&&(imagesRequest.pageSize=param.num);param.starttime&&(imagesRequest.startTime=toTimestamp(param.starttime));param.endtime&&(imagesRequest.endTime=toTimestamp(param.endtime));param.bbox&&(imagesRequest.region=ee.rpc_convert.boundingBoxToGeoJson(param.bbox));param.region&&(imagesRequest.region=param.region);param.bbox&¶m.region&&console.warn("Multiple request parameters converted to region");for(var allKeys="id num starttime endtime bbox region".split(" "),$jscomp$iter$23=$jscomp.makeIterator(Object.keys(param).filter(function(k){return!allKeys.includes(k);})),$jscomp$key$key=$jscomp$iter$23.next();!$jscomp$key$key.done;$jscomp$key$key=$jscomp$iter$23.next()){console.warn("Unrecognized key "+$jscomp$key$key.value+" ignored");}imagesRequest.fields="assets(type,path)";return imagesRequest;};ee.rpc_convert.boundingBoxToGeoJson=function(bbox){return'{"type":"Polygon","coordinates":[[['+[[0,1],[2,1],[2,3],[0,3],[0,1]].map(function(i){return bbox[i[0]]+","+bbox[i[1]];}).join("],[")+"]]]}";};ee.rpc_convert.iamPolicyToAcl=function(result){var bindingMap={};(result.bindings||[]).forEach(function(binding){bindingMap[binding.role]=binding.members;});var groups=new Set(),toAcl=function(member){var email=member.replace(/^group:|^user:|^serviceAccount:/,"");member.startsWith("group:")&&groups.add(email);return email;},readersWithAll=bindingMap["roles/viewer"]||[],readers=readersWithAll.filter(function(reader){return"allUsers"!==reader;}),internalAcl={owners:(bindingMap["roles/owner"]||[]).map(toAcl),writers:(bindingMap["roles/editor"]||[]).map(toAcl),readers:readers.map(toAcl)};0<groups.size&&(internalAcl.groups=groups);readersWithAll.length!=readers.length&&(internalAcl.all_users_can_read=!0);return internalAcl;};ee.rpc_convert.aclToIamPolicy=function(acls){var isGroup=function(email){return acls.groups&&acls.groups.has(email);},isServiceAccount=function(email){return email.match(/[@|\.]gserviceaccount\.com$/);},asMembers=function(aclName){return(acls[aclName]||[]).map(function(email){var prefix="user:";isGroup(email)?prefix="group:":isServiceAccount(email)&&(prefix="serviceAccount:");return prefix+email;});},all=acls.all_users_can_read?["allUsers"]:[],bindings=[{role:"roles/owner",members:asMembers("owners")},{role:"roles/viewer",members:asMembers("readers").concat(all)},{role:"roles/editor",members:asMembers("writers")}].map(function(params){return new module$exports$eeapiclient$ee_api_client.Binding(params);});return new module$exports$eeapiclient$ee_api_client.Policy({bindings:bindings.filter(function(binding){return binding.members.length;}),etag:null});};ee.rpc_convert.taskIdToOperationName=function(operationNameOrTaskId){return"projects/"+ee.rpc_convert.operationNameToProject(operationNameOrTaskId)+"/operations/"+ee.rpc_convert.operationNameToTaskId(operationNameOrTaskId);};ee.rpc_convert.operationNameToTaskId=function(result){var found=/^.*operations\/(.*)$/.exec(result);return found?found[1]:result;};ee.rpc_convert.operationNameToProject=function(operationNameOrTaskId){var found=/^projects\/(.+)\/operations\/.+$/.exec(operationNameOrTaskId);return found?found[1]:ee.rpc_convert.DEFAULT_PROJECT;};ee.rpc_convert.operationToTask=function(result){var internalTask={},assignTimestamp=function(field,timestamp){null!=timestamp&&(internalTask[field]=Date.parse(timestamp));},convertState=function(state){switch(state){case"PENDING":return"READY";case"RUNNING":return"RUNNING";case"CANCELLING":return"CANCEL_REQUESTED";case"SUCCEEDED":return"COMPLETED";case"CANCELLED":return"CANCELLED";case"FAILED":return"FAILED";default:return"UNKNOWN";}},metadata=module$contents$eeapiclient$domain_object_deserialize(module$exports$eeapiclient$ee_api_client.OperationMetadata,result.metadata||{});null!=metadata.description&&(internalTask.description=metadata.description);null!=metadata.state&&(internalTask.state=convertState(metadata.state));assignTimestamp("creation_timestamp_ms",metadata.createTime);assignTimestamp("update_timestamp_ms",metadata.updateTime);assignTimestamp("start_timestamp_ms",metadata.startTime);internalTask.attempt=metadata.attempt;result.done&&null!=result.error&&(internalTask.error_message=result.error.message);null!=result.name&&(internalTask.id=ee.rpc_convert.operationNameToTaskId(result.name),internalTask.name=result.name);internalTask.task_type=metadata.type||"UNKNOWN";internalTask.output_url=metadata.destinationUris;internalTask.source_url=metadata.scriptUri;return internalTask;};ee.rpc_convert.operationToProcessingResponse=function(operation){var result={started:"OK"};operation.name&&(result.taskId=ee.rpc_convert.operationNameToTaskId(operation.name),result.name=operation.name);operation.error&&(result.note=operation.error.message);return result;};ee.rpc_convert.sourcePathsToUris=function(source){return source.primaryPath?[source.primaryPath].concat($jscomp.arrayFromIterable(source.additionalPaths||[])):null;};ee.rpc_convert.toImageManifest=function(params){var convertImageSource=function(source){var apiSource=module$contents$eeapiclient$domain_object_deserialize(module$exports$eeapiclient$ee_api_client.ImageSource,source);apiSource.uris=ee.rpc_convert.sourcePathsToUris(source);return apiSource;},manifest=module$contents$eeapiclient$domain_object_deserialize(module$exports$eeapiclient$ee_api_client.ImageManifest,params);manifest.name=ee.rpc_convert.assetIdToAssetName(params.id);manifest.tilesets=(params.tilesets||[]).map(function(tileset){var apiTileset=module$contents$eeapiclient$domain_object_deserialize(module$exports$eeapiclient$ee_api_client.Tileset,tileset);apiTileset.sources=(tileset.sources||[]).map(convertImageSource);return apiTileset;});manifest.bands=(params.bands||[]).map(function(band){var apiBand=module$contents$eeapiclient$domain_object_deserialize(module$exports$eeapiclient$ee_api_client.TilesetBand,band);apiBand.missingData=ee.rpc_convert.toOnePlatformMissingData(band.missingData);return apiBand;});manifest.missingData=ee.rpc_convert.toOnePlatformMissingData(params.missingData);manifest.maskBands=module$contents$goog$array_flatten((params.tilesets||[]).map(ee.rpc_convert.toOnePlatformMaskBands));manifest.pyramidingPolicy=params.pyramidingPolicy||null;if(params.properties){var properties=Object.assign({},params.properties),toTimestamp=function(msec){return new Date(Number(msec)).toISOString();},value,extractValue=function(key){value=properties[key];delete properties[key];return value;};extractValue("system:time_start")&&(manifest.startTime=toTimestamp(value));extractValue("system:time_end")&&(manifest.endTime=toTimestamp(value));manifest.properties=properties;}return manifest;};ee.rpc_convert.toOnePlatformMaskBands=function(tileset){var maskBands=[];if(!Array.isArray(tileset.fileBands)){return maskBands;}var convertMaskConfig=function(maskConfig){var bandIds=[];null!=maskConfig&&Array.isArray(maskConfig.bandId)&&(bandIds=maskConfig.bandId.map(function(bandId){return bandId||"";}));return new module$exports$eeapiclient$ee_api_client.TilesetMaskBand({tilesetId:tileset.id||"",bandIds:bandIds});};tileset.fileBands.forEach(function(fileBand){fileBand.maskForAllBands?maskBands.push(convertMaskConfig(null)):null!=fileBand.maskForBands&&maskBands.push(convertMaskConfig(fileBand.maskForBands));});return maskBands;};ee.rpc_convert.toTableManifest=function(params){var manifest=module$contents$eeapiclient$domain_object_deserialize(module$exports$eeapiclient$ee_api_client.TableManifest,params);manifest.name=ee.rpc_convert.assetIdToAssetName(params.id);manifest.sources=(params.sources||[]).map(function(source){var apiSource=module$contents$eeapiclient$domain_object_deserialize(module$exports$eeapiclient$ee_api_client.TableSource,source);apiSource.uris=ee.rpc_convert.sourcePathsToUris(source);source.maxError&&(apiSource.maxErrorMeters=source.maxError);return apiSource;});if(params.properties){var properties=Object.assign({},params.properties),toTimestamp=function(msec){return new Date(Number(msec)).toISOString();},value,extractValue=function(key){value=properties[key];delete properties[key];return value;};extractValue("system:time_start")&&(manifest.startTime=toTimestamp(value));extractValue("system:time_end")&&(manifest.endTime=toTimestamp(value));manifest.properties=properties;}return manifest;};ee.rpc_convert.toOnePlatformMissingData=function(params){if(null==params){return null;}var missingData=new module$exports$eeapiclient$ee_api_client.MissingData({values:[]});null!=params.value&&"number"===typeof params.value&&missingData.values.push(params.value);Array.isArray(params.values)&¶ms.values.map(function(value){"number"===typeof value&&missingData.values.push(value);});return module$contents$goog$array_isEmpty(missingData.values)?null:missingData;};ee.rpc_convert.folderQuotaToAssetQuotaDetails=function(quota){var toNumber=function(field){return Number(field||0);};return{asset_count:{usage:toNumber(quota.assetCount),limit:toNumber(quota.maxAssetCount)},asset_size:{usage:toNumber(quota.sizeBytes),limit:toNumber(quota.maxSizeBytes)}};};goog.crypt={};goog.crypt.Hash=function(){this.blockSize=-1;};goog.crypt.Md5=function(){goog.crypt.Hash.call(this);this.blockSize=64;this.chain_=Array(4);this.block_=Array(this.blockSize);this.totalLength_=this.blockLength_=0;this.reset();};goog.inherits(goog.crypt.Md5,goog.crypt.Hash);goog.crypt.Md5.prototype.reset=function(){this.chain_[0]=1732584193;this.chain_[1]=4023233417;this.chain_[2]=2562383102;this.chain_[3]=271733878;this.totalLength_=this.blockLength_=0;};goog.crypt.Md5.prototype.compress_=function(buf,opt_offset){opt_offset||(opt_offset=0);var X=Array(16);if("string"===typeof buf){for(var i=0;16>i;++i){X[i]=buf.charCodeAt(opt_offset++)|buf.charCodeAt(opt_offset++)<<8|buf.charCodeAt(opt_offset++)<<16|buf.charCodeAt(opt_offset++)<<24;}}else{for(i=0;16>i;++i){X[i]=buf[opt_offset++]|buf[opt_offset++]<<8|buf[opt_offset++]<<16|buf[opt_offset++]<<24;}}var A=this.chain_[0],B=this.chain_[1],C=this.chain_[2],D=this.chain_[3],sum=0;sum=A+(D^B&(C^D))+X[0]+3614090360&4294967295;A=B+(sum<<7&4294967295|sum>>>25);sum=D+(C^A&(B^C))+X[1]+3905402710&4294967295;D=A+(sum<<12&4294967295|sum>>>20);sum=C+(B^D&(A^B))+X[2]+606105819&4294967295;C=D+(sum<<17&4294967295|sum>>>15);sum=B+(A^C&(D^A))+X[3]+3250441966&4294967295;B=C+(sum<<22&4294967295|sum>>>10);sum=A+(D^B&(C^D))+X[4]+4118548399&4294967295;A=B+(sum<<7&4294967295|sum>>>25);sum=D+(C^A&(B^C))+X[5]+1200080426&4294967295;D=A+(sum<<12&4294967295|sum>>>20);sum=C+(B^D&(A^B))+X[6]+2821735955&4294967295;C=D+(sum<<17&4294967295|sum>>>15);sum=B+(A^C&(D^A))+X[7]+4249261313&4294967295;B=C+(sum<<22&4294967295|sum>>>10);sum=A+(D^B&(C^D))+X[8]+1770035416&4294967295;A=B+(sum<<7&4294967295|sum>>>25);sum=D+(C^A&(B^C))+X[9]+2336552879&4294967295;D=A+(sum<<12&4294967295|sum>>>20);sum=C+(B^D&(A^B))+X[10]+4294925233&4294967295;C=D+(sum<<17&4294967295|sum>>>15);sum=B+(A^C&(D^A))+X[11]+2304563134&4294967295;B=C+(sum<<22&4294967295|sum>>>10);sum=A+(D^B&(C^D))+X[12]+1804603682&4294967295;A=B+(sum<<7&4294967295|sum>>>25);sum=D+(C^A&(B^C))+X[13]+4254626195&4294967295;D=A+(sum<<12&4294967295|sum>>>20);sum=C+(B^D&(A^B))+X[14]+2792965006&4294967295;C=D+(sum<<17&4294967295|sum>>>15);sum=B+(A^C&(D^A))+X[15]+1236535329&4294967295;B=C+(sum<<22&4294967295|sum>>>10);sum=A+(C^D&(B^C))+X[1]+4129170786&4294967295;A=B+(sum<<5&4294967295|sum>>>27);sum=D+(B^C&(A^B))+X[6]+3225465664&4294967295;D=A+(sum<<9&4294967295|sum>>>23);sum=C+(A^B&(D^A))+X[11]+643717713&4294967295;C=D+(sum<<14&4294967295|sum>>>18);sum=B+(D^A&(C^D))+X[0]+3921069994&4294967295;B=C+(sum<<20&4294967295|sum>>>12);sum=A+(C^D&(B^C))+X[5]+3593408605&4294967295;A=B+(sum<<5&4294967295|sum>>>27);sum=D+(B^C&(A^B))+X[10]+38016083&4294967295;D=A+(sum<<9&4294967295|sum>>>23);sum=C+(A^B&(D^A))+X[15]+3634488961&4294967295;C=D+(sum<<14&4294967295|sum>>>18);sum=B+(D^A&(C^D))+X[4]+3889429448&4294967295;B=C+(sum<<20&4294967295|sum>>>12);sum=A+(C^D&(B^C))+X[9]+568446438&4294967295;A=B+(sum<<5&4294967295|sum>>>27);sum=D+(B^C&(A^B))+X[14]+3275163606&4294967295;D=A+(sum<<9&4294967295|sum>>>23);sum=C+(A^B&(D^A))+X[3]+4107603335&4294967295;C=D+(sum<<14&4294967295|sum>>>18);sum=B+(D^A&(C^D))+X[8]+1163531501&4294967295;B=C+(sum<<20&4294967295|sum>>>12);sum=A+(C^D&(B^C))+X[13]+2850285829&4294967295;A=B+(sum<<5&4294967295|sum>>>27);sum=D+(B^C&(A^B))+X[2]+4243563512&4294967295;D=A+(sum<<9&4294967295|sum>>>23);sum=C+(A^B&(D^A))+X[7]+1735328473&4294967295;C=D+(sum<<14&4294967295|sum>>>18);sum=B+(D^A&(C^D))+X[12]+2368359562&4294967295;B=C+(sum<<20&4294967295|sum>>>12);sum=A+(B^C^D)+X[5]+4294588738&4294967295;A=B+(sum<<4&4294967295|sum>>>28);sum=D+(A^B^C)+X[8]+2272392833&4294967295;D=A+(sum<<11&4294967295|sum>>>21);sum=C+(D^A^B)+X[11]+1839030562&4294967295;C=D+(sum<<16&4294967295|sum>>>16);sum=B+(C^D^A)+X[14]+4259657740&4294967295;B=C+(sum<<23&4294967295|sum>>>9);sum=A+(B^C^D)+X[1]+2763975236&4294967295;A=B+(sum<<4&4294967295|sum>>>28);sum=D+(A^B^C)+X[4]+1272893353&4294967295;D=A+(sum<<11&4294967295|sum>>>21);sum=C+(D^A^B)+X[7]+4139469664&4294967295;C=D+(sum<<16&4294967295|sum>>>16);sum=B+(C^D^A)+X[10]+3200236656&4294967295;B=C+(sum<<23&4294967295|sum>>>9);sum=A+(B^C^D)+X[13]+681279174&4294967295;A=B+(sum<<4&4294967295|sum>>>28);sum=D+(A^B^C)+X[0]+3936430074&4294967295;D=A+(sum<<11&4294967295|sum>>>21);sum=C+(D^A^B)+X[3]+3572445317&4294967295;C=D+(sum<<16&4294967295|sum>>>16);sum=B+(C^D^A)+X[6]+76029189&4294967295;B=C+(sum<<23&4294967295|sum>>>9);sum=A+(B^C^D)+X[9]+3654602809&4294967295;A=B+(sum<<4&4294967295|sum>>>28);sum=D+(A^B^C)+X[12]+3873151461&4294967295;D=A+(sum<<11&4294967295|sum>>>21);sum=C+(D^A^B)+X[15]+530742520&4294967295;C=D+(sum<<16&4294967295|sum>>>16);sum=B+(C^D^A)+X[2]+3299628645&4294967295;B=C+(sum<<23&4294967295|sum>>>9);sum=A+(C^(B|~D))+X[0]+4096336452&4294967295;A=B+(sum<<6&4294967295|sum>>>26);sum=D+(B^(A|~C))+X[7]+1126891415&4294967295;D=A+(sum<<10&4294967295|sum>>>22);sum=C+(A^(D|~B))+X[14]+2878612391&4294967295;C=D+(sum<<15&4294967295|sum>>>17);sum=B+(D^(C|~A))+X[5]+4237533241&4294967295;B=C+(sum<<21&4294967295|sum>>>11);sum=A+(C^(B|~D))+X[12]+1700485571&4294967295;A=B+(sum<<6&4294967295|sum>>>26);sum=D+(B^(A|~C))+X[3]+2399980690&4294967295;D=A+(sum<<10&4294967295|sum>>>22);sum=C+(A^(D|~B))+X[10]+4293915773&4294967295;C=D+(sum<<15&4294967295|sum>>>17);sum=B+(D^(C|~A))+X[1]+2240044497&4294967295;B=C+(sum<<21&4294967295|sum>>>11);sum=A+(C^(B|~D))+X[8]+1873313359&4294967295;A=B+(sum<<6&4294967295|sum>>>26);sum=D+(B^(A|~C))+X[15]+4264355552&4294967295;D=A+(sum<<10&4294967295|sum>>>22);sum=C+(A^(D|~B))+X[6]+2734768916&4294967295;C=D+(sum<<15&4294967295|sum>>>17);sum=B+(D^(C|~A))+X[13]+1309151649&4294967295;B=C+(sum<<21&4294967295|sum>>>11);sum=A+(C^(B|~D))+X[4]+4149444226&4294967295;A=B+(sum<<6&4294967295|sum>>>26);sum=D+(B^(A|~C))+X[11]+3174756917&4294967295;D=A+(sum<<10&4294967295|sum>>>22);sum=C+(A^(D|~B))+X[2]+718787259&4294967295;C=D+(sum<<15&4294967295|sum>>>17);sum=B+(D^(C|~A))+X[9]+3951481745&4294967295;this.chain_[0]=this.chain_[0]+A&4294967295;this.chain_[1]=this.chain_[1]+(C+(sum<<21&4294967295|sum>>>11))&4294967295;this.chain_[2]=this.chain_[2]+C&4294967295;this.chain_[3]=this.chain_[3]+D&4294967295;};goog.crypt.Md5.prototype.update=function(bytes,opt_length){void 0===opt_length&&(opt_length=bytes.length);for(var lengthMinusBlock=opt_length-this.blockSize,block=this.block_,blockLength=this.blockLength_,i=0;i<opt_length;){if(0==blockLength){for(;i<=lengthMinusBlock;){this.compress_(bytes,i),i+=this.blockSize;}}if("string"===typeof bytes){for(;i<opt_length;){if(block[blockLength++]=bytes.charCodeAt(i++),blockLength==this.blockSize){this.compress_(block);blockLength=0;break;}}}else{for(;i<opt_length;){if(block[blockLength++]=bytes[i++],blockLength==this.blockSize){this.compress_(block);blockLength=0;break;}}}}this.blockLength_=blockLength;this.totalLength_+=opt_length;};goog.crypt.Md5.prototype.digest=function(){var pad=Array((56>this.blockLength_?this.blockSize:2*this.blockSize)-this.blockLength_);pad[0]=128;for(var i=1;i<pad.length-8;++i){pad[i]=0;}var totalBits=8*this.totalLength_;for(i=pad.length-8;i<pad.length;++i){pad[i]=totalBits&255,totalBits/=256;}this.update(pad);var digest=Array(16),n=0;for(i=0;4>i;++i){for(var j=0;32>j;j+=8){digest[n++]=this.chain_[i]>>>j&255;}}return digest;};ee.Serializer=function(opt_isCompound){this.HASH_KEY="__ee_hash__";this.isCompound_=!1!==opt_isCompound;this.scope_=[];this.encoded_={};this.withHashes_=[];this.hashes_=new WeakMap();this.unboundName=void 0;};goog.exportSymbol("ee.Serializer",ee.Serializer);ee.Serializer.jsonSerializer_=new goog.json.Serializer();ee.Serializer.hash_=new goog.crypt.Md5();ee.Serializer.encode=function(obj,opt_isCompound){return new ee.Serializer(void 0!==opt_isCompound?opt_isCompound:!0).encode_(obj);};goog.exportSymbol("ee.Serializer.encode",ee.Serializer.encode);ee.Serializer.toJSON=function(obj){return ee.Serializer.jsonSerializer_.serialize(ee.Serializer.encode(obj));};goog.exportSymbol("ee.Serializer.toJSON",ee.Serializer.toJSON);ee.Serializer.toReadableJSON=function(obj){return ee.Serializer.stringify(ee.Serializer.encode(obj,!1));};goog.exportSymbol("ee.Serializer.toReadableJSON",ee.Serializer.toReadableJSON);ee.Serializer.stringify=function(encoded){return"JSON"in goog.global?goog.global.JSON.stringify(encoded,null," "):ee.Serializer.jsonSerializer_.serialize(encoded);};ee.Serializer.prototype.encode_=function(object){var value=this.encodeValue_(object);this.isCompound_&&(value=goog.isObject(value)&&"ValueRef"==value.type&&1==this.scope_.length?this.scope_[0][1]:{type:"CompoundValue",scope:this.scope_,value:value},this.scope_=[],module$contents$goog$array_forEach(this.withHashes_,goog.bind(function(obj){delete obj[this.HASH_KEY];},this)),this.withHashes_=[],this.encoded_={});return value;};ee.Serializer.prototype.encodeValue_=function(object){if(void 0===object){throw Error("Can't encode an undefined value.");}var hash=goog.isObject(object)?object[this.HASH_KEY]:null;if(this.isCompound_&&null!=hash&&this.encoded_[hash]){return{type:"ValueRef",value:this.encoded_[hash]};}if(null===object||"boolean"===typeof object||"number"===typeof object||"string"===typeof object){return object;}if(goog.isDateLike(object)){return{type:"Invocation",functionName:"Date",arguments:{value:Math.floor(object.getTime())}};}if(object instanceof ee.Encodable){var result=object.encode(goog.bind(this.encodeValue_,this));if(!(Array.isArray(result)||goog.isObject(result)&&"ArgumentRef"!=result.type)){return result;}}else{if(Array.isArray(object)){result=module$contents$goog$array_map(object,function(element){return this.encodeValue_(element);},this);}else{if(goog.isObject(object)&&"function"!==typeof object){var encodedObject=module$contents$goog$object_map(object,function(element){if("function"!==typeof element){return this.encodeValue_(element);}},this);module$contents$goog$object_remove(encodedObject,this.HASH_KEY);result={type:"Dictionary",value:encodedObject};}else{throw Error("Can't encode object: "+object);}}}if(this.isCompound_){hash=ee.Serializer.computeHash(result);if(this.encoded_[hash]){var name=this.encoded_[hash];}else{name=String(this.scope_.length),this.scope_.push([name,result]),this.encoded_[hash]=name;}object[this.HASH_KEY]=hash;this.withHashes_.push(object);return{type:"ValueRef",value:name};}return result;};ee.Serializer.computeHash=function(obj){ee.Serializer.hash_.reset();ee.Serializer.hash_.update(ee.Serializer.jsonSerializer_.serialize(obj));return ee.Serializer.hash_.digest().toString();};ee.Serializer.encodeCloudApi=function(obj){return module$contents$eeapiclient$domain_object_serialize(ee.Serializer.encodeCloudApiExpression(obj));};goog.exportSymbol("ee.Serializer.encodeCloudApi",ee.Serializer.encodeCloudApi);ee.Serializer.encodeCloudApiExpression=function(obj,unboundName){var serializer=new ee.Serializer(!0);serializer.unboundName=unboundName;return serializer.encodeForCloudApi_(obj);};ee.Serializer.encodeCloudApiPretty=function(obj){var encoded=new ee.Serializer(!1).encodeForCloudApi_(obj),values=encoded.values,walkObject=function(object){if(!goog.isObject(object)){return object;}for(var ret=Array.isArray(object)?[]:{},isNode=object instanceof Object.getPrototypeOf(module$exports$eeapiclient$ee_api_client.ValueNode),$jscomp$iter$24=$jscomp.makeIterator(Object.entries(isNode?object.Serializable$values:object)),$jscomp$key$=$jscomp$iter$24.next();!$jscomp$key$.done;$jscomp$key$=$jscomp$iter$24.next()){var $jscomp$destructuring$var31=$jscomp.makeIterator($jscomp$key$.value),key=$jscomp$destructuring$var31.next().value,val=$jscomp$destructuring$var31.next().value;isNode?null!==val&&(ret[key]="functionDefinitionValue"===key&&null!=val.body?{argumentNames:val.argumentNames,body:walkObject(values[val.body])}:"functionInvocationValue"===key&&null!=val.functionReference?{arguments:module$contents$goog$object_map(val.arguments,walkObject),functionReference:walkObject(values[val.functionReference])}:"constantValue"===key?val===module$exports$eeapiclient$domain_object.NULL_VALUE?null:val:walkObject(val)):ret[key]=walkObject(val);}return ret;};return encoded.result&&walkObject(values[encoded.result]);};goog.exportSymbol("ee.Serializer.encodeCloudApiPretty",ee.Serializer.encodeCloudApiPretty);ee.Serializer.toCloudApiJSON=function(obj){return ee.Serializer.jsonSerializer_.serialize(ee.Serializer.encodeCloudApi(obj));};goog.exportSymbol("ee.Serializer.toCloudApiJSON",ee.Serializer.toCloudApiJSON);ee.Serializer.toReadableCloudApiJSON=function(obj){return ee.Serializer.stringify(ee.Serializer.encodeCloudApiPretty(obj));};goog.exportSymbol("ee.Serializer.toReadableCloudApiJSON",ee.Serializer.toReadableCloudApiJSON);ee.Serializer.prototype.encodeForCloudApi_=function(obj){try{var result=this.makeReference(obj);return new ExpressionOptimizer(result,this.scope_,this.isCompound_).optimize();}finally{this.hashes_=new WeakMap(),this.encoded_={},this.scope_=[];}};ee.Serializer.prototype.makeReference=function(obj){var $jscomp$this=this,makeRef=function(result){var hash=ee.Serializer.computeHash(result);goog.isObject(obj)&&$jscomp$this.hashes_.set(obj,hash);if($jscomp$this.encoded_[hash]){return $jscomp$this.encoded_[hash];}var name=String($jscomp$this.scope_.length);$jscomp$this.scope_.push([name,result]);return $jscomp$this.encoded_[hash]=name;};if(goog.isObject(obj)&&this.encoded_[this.hashes_.get(obj)]){return this.encoded_[this.hashes_.get(obj)];}if(null===obj||"boolean"===typeof obj||"string"===typeof obj||"number"===typeof obj){return makeRef(ee.rpc_node.constant(obj));}if(goog.isDateLike(obj)){return makeRef(ee.rpc_node.functionByName("Date",{value:ee.rpc_node.constant(Math.floor(obj.getTime()))}));}if(obj instanceof ee.Encodable){return makeRef(obj.encodeCloudValue(this));}if(Array.isArray(obj)){return makeRef(ee.rpc_node.array(obj.map(function(x){return ee.rpc_node.reference($jscomp$this.makeReference(x));})));}if(goog.isObject(obj)&&"function"!==typeof obj){var values={};Object.keys(obj).sort().forEach(function(k){values[k]=ee.rpc_node.reference($jscomp$this.makeReference(obj[k]));});return makeRef(ee.rpc_node.dictionary(values));}throw Error("Can't encode object: "+obj);};var ExpressionOptimizer=function(rootReference,values,isCompound){var $jscomp$this=this;this.rootReference=rootReference;this.values={};values.forEach(function(tuple){return $jscomp$this.values[tuple[0]]=tuple[1];});this.referenceCounts=isCompound?this.countReferences():null;this.optimizedValues={};this.referenceMap={};this.nextMappedRef=0;};ExpressionOptimizer.prototype.optimize=function(){var result=this.optimizeReference(this.rootReference);return new module$exports$eeapiclient$ee_api_client.Expression({result:result,values:this.optimizedValues});};ExpressionOptimizer.prototype.optimizeReference=function(ref){if(ref in this.referenceMap){return this.referenceMap[ref];}var mappedRef=String(this.nextMappedRef++);this.referenceMap[ref]=mappedRef;this.optimizedValues[mappedRef]=this.optimizeValue(this.values[ref],0);return mappedRef;};ExpressionOptimizer.prototype.optimizeValue=function(value,depth){var $jscomp$this=this,isConst=function(v){return null!==v.constantValue;},serializeConst=function(v){return v===module$exports$eeapiclient$domain_object.NULL_VALUE?null:v;};if(isConst(value)||null!=value.integerValue||null!=value.bytesValue||null!=value.argumentReference){return value;}if(null!=value.valueReference){var val=this.values[value.valueReference];return null===this.referenceCounts||50>depth&&1===this.referenceCounts[value.valueReference]?this.optimizeValue(val,depth):ExpressionOptimizer.isAlwaysLiftable(val)?val:ee.rpc_node.reference(this.optimizeReference(value.valueReference));}if(null!=value.arrayValue){var arr=value.arrayValue.values.map(function(v){return $jscomp$this.optimizeValue(v,depth+3);});return arr.every(isConst)?ee.rpc_node.constant(arr.map(function(v){return serializeConst(v.constantValue);})):ee.rpc_node.array(arr);}if(null!=value.dictionaryValue){for(var values={},constantValues={},$jscomp$iter$25=$jscomp.makeIterator(Object.entries(value.dictionaryValue.values||{})),$jscomp$key$=$jscomp$iter$25.next();!$jscomp$key$.done;$jscomp$key$=$jscomp$iter$25.next()){var $jscomp$destructuring$var33=$jscomp.makeIterator($jscomp$key$.value),k=$jscomp$destructuring$var33.next().value,v$jscomp$0=$jscomp$destructuring$var33.next().value;values[k]=this.optimizeValue(v$jscomp$0,depth+3);null!==constantValues&&isConst(values[k])?constantValues[k]=serializeConst(values[k].constantValue):constantValues=null;}return null!==constantValues?ee.rpc_node.constant(constantValues):ee.rpc_node.dictionary(values);}if(null!=value.functionDefinitionValue){var def=value.functionDefinitionValue;return ee.rpc_node.functionDefinition(def.argumentNames||[],this.optimizeReference(def.body||""));}if(null!=value.functionInvocationValue){for(var inv=value.functionInvocationValue,args={},$jscomp$iter$26=$jscomp.makeIterator(Object.keys(inv.arguments||{})),$jscomp$key$k=$jscomp$iter$26.next();!$jscomp$key$k.done;$jscomp$key$k=$jscomp$iter$26.next()){var k$57=$jscomp$key$k.value;args[k$57]=this.optimizeValue(inv.arguments[k$57],depth+3);}return inv.functionName?ee.rpc_node.functionByName(inv.functionName,args):ee.rpc_node.functionByReference(this.optimizeReference(inv.functionReference||""),args);}throw Error("Can't optimize value: "+value);};ExpressionOptimizer.isAlwaysLiftable=function(value){var constant=value.constantValue;return null!==constant?constant===module$exports$eeapiclient$domain_object.NULL_VALUE||"number"===typeof constant||"boolean"===typeof constant:null!=value.argumentReference;};ExpressionOptimizer.prototype.countReferences=function(){var $jscomp$this=this,counts={},visitReference=function(reference){counts[reference]?counts[reference]++:(counts[reference]=1,visitValue($jscomp$this.values[reference]));},visitValue=function(value){if(null!=value.arrayValue){value.arrayValue.values.forEach(visitValue);}else{if(null!=value.dictionaryValue){Object.values(value.dictionaryValue.values).forEach(visitValue);}else{if(null!=value.functionDefinitionValue){visitReference(value.functionDefinitionValue.body);}else{if(null!=value.functionInvocationValue){var inv=value.functionInvocationValue;null!=inv.functionReference&&visitReference(inv.functionReference);Object.values(inv.arguments).forEach(visitValue);}else{null!=value.valueReference&&visitReference(value.valueReference);}}}}};visitReference(this.rootReference);return counts;};ee.rpc_convert_batch={};ee.rpc_convert_batch.ExportDestination={DRIVE:"DRIVE",GCS:"GOOGLE_CLOUD_STORAGE",ASSET:"ASSET",DMS:"DMS"};ee.rpc_convert_batch.taskToExportImageRequest=function(params){if(null==params.element){throw Error('"element" not found in params '+params);}var result=new module$exports$eeapiclient$ee_api_client.ExportImageRequest({expression:ee.Serializer.encodeCloudApiExpression(params.element),description:stringOrNull_(params.description),fileExportOptions:null,assetExportOptions:null,grid:null,maxPixels:stringOrNull_(params.maxPixels),requestId:stringOrNull_(params.id),maxWorkerCount:numberOrNull_(params.maxWorkers)}),destination=ee.rpc_convert_batch.guessDestination_(params);switch(destination){case ee.rpc_convert_batch.ExportDestination.GCS:case ee.rpc_convert_batch.ExportDestination.DRIVE:result.fileExportOptions=ee.rpc_convert_batch.buildImageFileExportOptions_(params,destination);break;case ee.rpc_convert_batch.ExportDestination.ASSET:result.assetExportOptions=ee.rpc_convert_batch.buildImageAssetExportOptions_(params);break;default:throw Error('Export destination "'+destination+'" unknown');}return result;};ee.rpc_convert_batch.taskToExportTableRequest=function(params){if(null==params.element){throw Error('"element" not found in params '+params);}var selectors=params.selectors||null;null!=selectors&&"string"===typeof selectors&&(selectors=selectors.split(","));var result=new module$exports$eeapiclient$ee_api_client.ExportTableRequest({expression:ee.Serializer.encodeCloudApiExpression(params.element),description:stringOrNull_(params.description),fileExportOptions:null,assetExportOptions:null,dmsExportOptions:null,selectors:selectors,maxErrorMeters:numberOrNull_(params.maxErrorMeters),requestId:stringOrNull_(params.id),maxVertices:numberOrNull_(params.maxVertices),maxWorkerCount:numberOrNull_(params.maxWorkers)}),destination=ee.rpc_convert_batch.guessDestination_(params);switch(destination){case ee.rpc_convert_batch.ExportDestination.GCS:case ee.rpc_convert_batch.ExportDestination.DRIVE:result.fileExportOptions=ee.rpc_convert_batch.buildTableFileExportOptions_(params,destination);break;case ee.rpc_convert_batch.ExportDestination.ASSET:result.assetExportOptions=ee.rpc_convert_batch.buildTableAssetExportOptions_(params);break;case ee.rpc_convert_batch.ExportDestination.DMS:result.dmsExportOptions=ee.rpc_convert_batch.buildDmsAssetExportOptions_(params);break;default:throw Error('Export destination "'+destination+'" unknown');}return result;};ee.rpc_convert_batch.taskToExportVideoRequest=function(params){if(null==params.element){throw Error('"element" not found in params '+params);}var result=new module$exports$eeapiclient$ee_api_client.ExportVideoRequest({expression:ee.Serializer.encodeCloudApiExpression(params.element),description:stringOrNull_(params.description),videoOptions:ee.rpc_convert_batch.buildVideoOptions_(params),fileExportOptions:null,requestId:stringOrNull_(params.id),maxWorkerCount:numberOrNull_(params.maxWorkers)});result.fileExportOptions=ee.rpc_convert_batch.buildVideoFileExportOptions_(params,ee.rpc_convert_batch.guessDestination_(params));return result;};ee.rpc_convert_batch.taskToExportMapRequest=function(params){if(null==params.element){throw Error('"element" not found in params '+params);}return new module$exports$eeapiclient$ee_api_client.ExportMapRequest({expression:ee.Serializer.encodeCloudApiExpression(params.element),description:stringOrNull_(params.description),tileOptions:ee.rpc_convert_batch.buildTileOptions_(params),tileExportOptions:ee.rpc_convert_batch.buildImageFileExportOptions_(params,ee.rpc_convert_batch.ExportDestination.GCS),requestId:stringOrNull_(params.id),maxWorkerCount:numberOrNull_(params.maxWorkers)});};ee.rpc_convert_batch.taskToExportVideoMapRequest=function(params){if(null==params.element){throw Error('"element" not found in params '+params);}return new module$exports$eeapiclient$ee_api_client.ExportVideoMapRequest({expression:ee.Serializer.encodeCloudApiExpression(params.element),description:stringOrNull_(params.description),videoOptions:ee.rpc_convert_batch.buildVideoMapOptions_(params),tileOptions:ee.rpc_convert_batch.buildTileOptions_(params),tileExportOptions:ee.rpc_convert_batch.buildVideoFileExportOptions_(params,ee.rpc_convert_batch.ExportDestination.GCS),requestId:stringOrNull_(params.id),version:stringOrNull_(params.version),maxWorkerCount:numberOrNull_(params.maxWorkers)});};ee.rpc_convert_batch.taskToExportClassifierRequest=function(params){if(null==params.element){throw Error('"element" not found in params '+params);}var destination=ee.rpc_convert_batch.guessDestination_(params);if(destination!=ee.rpc_convert_batch.ExportDestination.ASSET){throw Error('Export destination "'+destination+'" unknown');}return new module$exports$eeapiclient$ee_api_client.ExportClassifierRequest({expression:ee.Serializer.encodeCloudApiExpression(params.element),description:stringOrNull_(params.description),requestId:stringOrNull_(params.id),assetExportOptions:new module$exports$eeapiclient$ee_api_client.ClassifierAssetExportOptions({earthEngineDestination:ee.rpc_convert_batch.buildEarthEngineDestination_(params)}),maxWorkerCount:numberOrNull_(params.maxWorkers)});};function stringOrNull_(value){return null!=value?String(value):null;}function numberOrNull_(value){return null!=value?Number(value):null;}ee.rpc_convert_batch.guessDestination_=function(params){var destination=ee.rpc_convert_batch.ExportDestination.DRIVE;if(null==params){return destination;}null!=params.outputBucket||null!=params.outputPrefix?destination=ee.rpc_convert_batch.ExportDestination.GCS:null!=params.assetId?destination=ee.rpc_convert_batch.ExportDestination.ASSET:null!=params.dmsName&&(destination=ee.rpc_convert_batch.ExportDestination.DMS);return destination;};ee.rpc_convert_batch.buildGeoTiffFormatOptions_=function(params){if(params.fileDimensions&¶ms.tiffFileDimensions){throw Error('Export cannot set both "fileDimensions" and "tiffFileDimensions".');}var tileSize=params.tiffShardSize||params.shardSize;return new module$exports$eeapiclient$ee_api_client.GeoTiffImageExportOptions({cloudOptimized:!!params.tiffCloudOptimized,skipEmptyFiles:!(!params.skipEmptyTiles&&!params.tiffSkipEmptyFiles),tileDimensions:ee.rpc_convert_batch.buildGridDimensions_(params.fileDimensions||params.tiffFileDimensions),tileSize:numberOrNull_(tileSize)});};ee.rpc_convert_batch.buildTfRecordFormatOptions_=function(params){var tfRecordOptions=new module$exports$eeapiclient$ee_api_client.TfRecordImageExportOptions({compress:!!params.tfrecordCompressed,maxSizeBytes:stringOrNull_(params.tfrecordMaxFileSize),sequenceData:!!params.tfrecordSequenceData,collapseBands:!!params.tfrecordCollapseBands,maxMaskedRatio:numberOrNull_(params.tfrecordMaskedThreshold),defaultValue:numberOrNull_(params.tfrecordDefaultValue),tileDimensions:ee.rpc_convert_batch.buildGridDimensions_(params.tfrecordPatchDimensions),marginDimensions:ee.rpc_convert_batch.buildGridDimensions_(params.tfrecordKernelSize),tensorDepths:null}),tensorDepths=params.tfrecordTensorDepths;if(null!=tensorDepths){if(goog.isObject(tensorDepths)){var result={};module$contents$goog$object_forEach(tensorDepths,function(v,k){if("string"!==typeof k||"number"!==typeof v){throw Error('"tensorDepths" option must be an object of type Object<string, number>');}result[k]=v;});tfRecordOptions.tensorDepths=result;}else{throw Error('"tensorDepths" option needs to have the form Object<string, number>.');}}return tfRecordOptions;};ee.rpc_convert_batch.buildImageFileExportOptions_=function(params,destination){var result=new module$exports$eeapiclient$ee_api_client.ImageFileExportOptions({gcsDestination:null,driveDestination:null,geoTiffOptions:null,tfRecordOptions:null,fileFormat:ee.rpc_convert.fileFormat(params.fileFormat)});"GEO_TIFF"===result.fileFormat?result.geoTiffOptions=ee.rpc_convert_batch.buildGeoTiffFormatOptions_(params):"TF_RECORD_IMAGE"===result.fileFormat&&(result.tfRecordOptions=ee.rpc_convert_batch.buildTfRecordFormatOptions_(params));destination===ee.rpc_convert_batch.ExportDestination.GCS?result.gcsDestination=ee.rpc_convert_batch.buildGcsDestination_(params):result.driveDestination=ee.rpc_convert_batch.buildDriveDestination_(params);return result;};ee.rpc_convert_batch.buildImageAssetExportOptions_=function(params){var allPolicies=params.pyramidingPolicy||{};try{allPolicies=JSON.parse(allPolicies);}catch($jscomp$unused$catch){}var defaultPyramidingPolicy="PYRAMIDING_POLICY_UNSPECIFIED";"string"===typeof allPolicies?(defaultPyramidingPolicy=allPolicies,allPolicies={}):allPolicies[".default"]&&(defaultPyramidingPolicy=allPolicies[".default"],delete allPolicies[".default"]);return new module$exports$eeapiclient$ee_api_client.ImageAssetExportOptions({earthEngineDestination:ee.rpc_convert_batch.buildEarthEngineDestination_(params),pyramidingPolicy:defaultPyramidingPolicy,pyramidingPolicyOverrides:module$contents$goog$object_isEmpty(allPolicies)?null:allPolicies,tileSize:numberOrNull_(params.shardSize)});};ee.rpc_convert_batch.buildTableFileExportOptions_=function(params,destination){var result=new module$exports$eeapiclient$ee_api_client.TableFileExportOptions({gcsDestination:null,driveDestination:null,fileFormat:ee.rpc_convert.tableFileFormat(params.fileFormat)});destination===ee.rpc_convert_batch.ExportDestination.GCS?result.gcsDestination=ee.rpc_convert_batch.buildGcsDestination_(params):result.driveDestination=ee.rpc_convert_batch.buildDriveDestination_(params);return result;};ee.rpc_convert_batch.buildTableAssetExportOptions_=function(params){return new module$exports$eeapiclient$ee_api_client.TableAssetExportOptions({earthEngineDestination:ee.rpc_convert_batch.buildEarthEngineDestination_(params)});};ee.rpc_convert_batch.buildDmsAssetExportOptions_=function(params){return new module$exports$eeapiclient$ee_api_client.DmsAssetExportOptions({dmsDestination:ee.rpc_convert_batch.buildDmsDestination_(params),ingestionTimeParameters:ee.rpc_convert_batch.buildDmsIngestionTimeParameters_(params.dmsIngestionTimeParameters)});};ee.rpc_convert_batch.buildVideoFileExportOptions_=function(params,destination){var result=new module$exports$eeapiclient$ee_api_client.VideoFileExportOptions({gcsDestination:null,driveDestination:null,fileFormat:"MP4"});destination===ee.rpc_convert_batch.ExportDestination.GCS?result.gcsDestination=ee.rpc_convert_batch.buildGcsDestination_(params):result.driveDestination=ee.rpc_convert_batch.buildDriveDestination_(params);return result;};ee.rpc_convert_batch.buildVideoOptions_=function(params){return new module$exports$eeapiclient$ee_api_client.VideoOptions({framesPerSecond:numberOrNull_(params.framesPerSecond),maxFrames:numberOrNull_(params.maxFrames),maxPixelsPerFrame:stringOrNull_(params.maxPixels)});};ee.rpc_convert_batch.buildVideoMapOptions_=function(params){return new module$exports$eeapiclient$ee_api_client.VideoOptions({framesPerSecond:numberOrNull_(params.framesPerSecond),maxFrames:numberOrNull_(params.maxFrames),maxPixelsPerFrame:null});};ee.rpc_convert_batch.buildTileOptions_=function(params){return new module$exports$eeapiclient$ee_api_client.TileOptions({maxZoom:numberOrNull_(params.maxZoom),scale:numberOrNull_(params.scale),minZoom:numberOrNull_(params.minZoom),skipEmptyTiles:!!params.skipEmptyTiles,mapsApiKey:stringOrNull_(params.mapsApiKey),tileDimensions:ee.rpc_convert_batch.buildGridDimensions_(params.tileDimensions),stride:numberOrNull_(params.stride),zoomSubset:ee.rpc_convert_batch.buildZoomSubset_(numberOrNull_(params.minTimeMachineZoomSubset),numberOrNull_(params.maxTimeMachineZoomSubset))});};ee.rpc_convert_batch.buildZoomSubset_=function(min,max){if(null==min&&null==max){return null;}var result=new module$exports$eeapiclient$ee_api_client.ZoomSubset({min:0,max:null});null!=min&&(result.min=min);result.max=max;return result;};ee.rpc_convert_batch.buildGridDimensions_=function(dimensions){if(null==dimensions){return null;}var result=new module$exports$eeapiclient$ee_api_client.GridDimensions({height:0,width:0});"string"===typeof dimensions&&(-1!==dimensions.indexOf("x")?dimensions=dimensions.split("x").map(Number):-1!==dimensions.indexOf(",")&&(dimensions=dimensions.split(",").map(Number)));if(Array.isArray(dimensions)){if(2===dimensions.length){result.height=dimensions[0],result.width=dimensions[1];}else{if(1===dimensions.length){result.height=dimensions[0],result.width=dimensions[0];}else{throw Error("Unable to construct grid from dimensions: "+dimensions);}}}else{if("number"!==typeof dimensions||isNaN(dimensions)){if(goog.isObject(dimensions)&&null!=dimensions.height&&null!=dimensions.width){result.height=dimensions.height,result.width=dimensions.width;}else{throw Error("Unable to construct grid from dimensions: "+dimensions);}}else{result.height=dimensions,result.width=dimensions;}}return result;};ee.rpc_convert_batch.buildGcsDestination_=function(params){var permissions=null;null!=params.writePublicTiles&&(permissions=params.writePublicTiles?"PUBLIC":"DEFAULT_OBJECT_ACL");return new module$exports$eeapiclient$ee_api_client.GcsDestination({bucket:stringOrNull_(params.outputBucket),filenamePrefix:stringOrNull_(params.outputPrefix),bucketCorsUris:params.bucketCorsUris||null,permissions:permissions});};ee.rpc_convert_batch.buildDriveDestination_=function(params){return new module$exports$eeapiclient$ee_api_client.DriveDestination({folder:stringOrNull_(params.driveFolder),filenamePrefix:stringOrNull_(params.driveFileNamePrefix)});};ee.rpc_convert_batch.buildEarthEngineDestination_=function(params){return new module$exports$eeapiclient$ee_api_client.EarthEngineDestination({name:ee.rpc_convert.assetIdToAssetName(params.assetId)});};ee.rpc_convert_batch.buildDmsDestination_=function(params){return new module$exports$eeapiclient$ee_api_client.DmsDestination({dmsName:ee.rpc_convert.assetIdToAssetName(params.dmsName)});};ee.rpc_convert_batch.buildDmsIngestionTimeParameters_=function(params){return new module$exports$eeapiclient$ee_api_client.DmsIngestionTimeParameters({thinningOptions:ee.rpc_convert_batch.buildThinningOptions_(params.thinningOptions),rankingOptions:ee.rpc_convert_batch.buildRankingOptions_(params.rankingOptions)});};ee.rpc_convert_batch.buildThinningOptions_=function(params){return null==params?null:new module$exports$eeapiclient$ee_api_client.ThinningOptions({maxFeaturesPerTile:numberOrNull_(params.maxFeaturesPerTile),thinningStrategy:params.thinningStrategy});};ee.rpc_convert_batch.buildRankingOptions_=function(params){return null==params?null:new module$exports$eeapiclient$ee_api_client.RankingOptions({zOrderRankingRule:ee.rpc_convert_batch.buildRankingRule_(params.zOrderRankingRule),thinningRankingRule:ee.rpc_convert_batch.buildRankingRule_(params.thinningRankingRule)});};ee.rpc_convert_batch.buildRankingRule_=function(params){if(null==params){return null;}if(params.rankByOneThingRule&&!Array.isArray(params.rankByOneThingRule)){throw Error('Parameter "rankByOneThingRule" should be an array, got '+typeof params.rankByOneThingRule);}return new module$exports$eeapiclient$ee_api_client.RankingRule({rankByOneThingRule:(params.rankByOneThingRule||[]).map(ee.rpc_convert_batch.buildRankByOneThingRule_),pseudoRandomTiebreaking:params.pseudoRandomTiebreaking||null});};ee.rpc_convert_batch.buildRankByOneThingRule_=function(params){var result=new module$exports$eeapiclient$ee_api_client.RankByOneThingRule({direction:stringOrNull_(params.direction),rankByAttributeRule:null,rankByMinVisibleLodRule:null,rankByGeometryTypeRule:null,rankByNaturalOrderRule:null});params.rankByAttributeRule?result.rankByAttributeRule=ee.rpc_convert_batch.buildRankByAttributeRule(params):params.rankByMinVisibleLodRule?result.rankByMinVisibleLodRule=new module$exports$eeapiclient$ee_api_client.RankByMinVisibleLodRule({}):params.rankByGeometryTypeRule?result.rankByGeometryTypeRule=new module$exports$eeapiclient$ee_api_client.RankByGeometryTypeRule({}):params.rankByNaturalOrderRule&&(result.rankByNaturalOrderRule=new module$exports$eeapiclient$ee_api_client.RankByNaturalOrder({}));return result;};ee.rpc_convert_batch.buildRankByAttributeRule=function(params){return new module$exports$eeapiclient$ee_api_client.RankByAttributeRule({attributeName:stringOrNull_(params.attributeName)});};ee.data={};ee.data.AbstractTaskConfig={};ee.data.AlgorithmsRegistry={};ee.data.AssetList={};ee.data.ClassifierTaskConfig={};ee.data.ImageTaskConfig={};ee.data.MapTaskConfig={};ee.data.TableDmsTaskConfig={};ee.data.TableTaskConfig={};ee.data.VideoMapTaskConfig={};ee.data.VideoTaskConfig={};ee.data.authenticateViaOauth=function(clientId,success,opt_error,opt_extraScopes,opt_onImmediateFailed,opt_suppressDefaultScopes){var scopes=module$contents$ee$apiclient_apiclient.mergeAuthScopes_(!opt_suppressDefaultScopes,!1,opt_extraScopes||[]);module$contents$ee$apiclient_apiclient.setAuthClient(clientId,scopes);null===clientId?module$contents$ee$apiclient_apiclient.clearAuthToken():module$contents$ee$apiclient_apiclient.ensureAuthLibLoaded_(function(){var onImmediateFailed=opt_onImmediateFailed||goog.partial(ee.data.authenticateViaPopup,success,opt_error);ee.data.refreshAuthToken(success,opt_error,onImmediateFailed);});};goog.exportSymbol("ee.data.authenticateViaOauth",ee.data.authenticateViaOauth);ee.data.authenticate=function(clientId,success,opt_error,opt_extraScopes,opt_onImmediateFailed){ee.data.authenticateViaOauth(clientId,success,opt_error,opt_extraScopes,opt_onImmediateFailed);};goog.exportSymbol("ee.data.authenticate",ee.data.authenticate);ee.data.authenticateViaPopup=function(opt_success,opt_error){goog.global.gapi.auth.authorize({client_id:module$contents$ee$apiclient_apiclient.getAuthClientId(),immediate:!1,scope:module$contents$ee$apiclient_apiclient.getAuthScopes().join(" ")},goog.partial(module$contents$ee$apiclient_apiclient.handleAuthResult_,opt_success,opt_error));};goog.exportSymbol("ee.data.authenticateViaPopup",ee.data.authenticateViaPopup);ee.data.authenticateViaPrivateKey=function(privateKey,opt_success,opt_error,opt_extraScopes,opt_suppressDefaultScopes){if("window"in goog.global){throw Error("Use of private key authentication in the browser is insecure. Consider using OAuth, instead.");}var scopes=module$contents$ee$apiclient_apiclient.mergeAuthScopes_(!opt_suppressDefaultScopes,!opt_suppressDefaultScopes,opt_extraScopes||[]);module$contents$ee$apiclient_apiclient.setAuthClient(privateKey.client_email,scopes);var jwtClient=new google.auth.JWT(privateKey.client_email,null,privateKey.private_key,scopes,null);ee.data.setAuthTokenRefresher(function(authArgs,callback){jwtClient.authorize(function(error,token){error?callback({error:error}):callback({access_token:token.access_token,token_type:token.token_type,expires_in:(token.expiry_date-Date.now())/1000});});});ee.data.refreshAuthToken(opt_success,opt_error);};goog.exportSymbol("ee.data.authenticateViaPrivateKey",ee.data.authenticateViaPrivateKey);ee.data.setApiKey=module$contents$ee$apiclient_apiclient.setApiKey;ee.data.setProject=module$contents$ee$apiclient_apiclient.setProject;ee.data.getProject=module$contents$ee$apiclient_apiclient.getProject;ee.data.PROFILE_REQUEST_HEADER=module$contents$ee$apiclient_apiclient.PROFILE_REQUEST_HEADER;ee.data.setExpressionAugmenter=function(augmenter){ee.data.expressionAugmenter_=augmenter||goog.functions.identity;};goog.exportSymbol("ee.data.setExpressionAugmenter",ee.data.setExpressionAugmenter);ee.data.expressionAugmenter_=goog.functions.identity;ee.data.setAuthToken=module$contents$ee$apiclient_apiclient.setAuthToken;goog.exportSymbol("ee.data.setAuthToken",ee.data.setAuthToken);ee.data.refreshAuthToken=module$contents$ee$apiclient_apiclient.refreshAuthToken;goog.exportSymbol("ee.data.refreshAuthToken",ee.data.refreshAuthToken);ee.data.setAuthTokenRefresher=module$contents$ee$apiclient_apiclient.setAuthTokenRefresher;goog.exportSymbol("ee.data.setAuthTokenRefresher",ee.data.setAuthTokenRefresher);ee.data.getAuthToken=module$contents$ee$apiclient_apiclient.getAuthToken;goog.exportSymbol("ee.data.getAuthToken",ee.data.getAuthToken);ee.data.clearAuthToken=module$contents$ee$apiclient_apiclient.clearAuthToken;goog.exportSymbol("ee.data.clearAuthToken",ee.data.clearAuthToken);ee.data.getAuthClientId=module$contents$ee$apiclient_apiclient.getAuthClientId;goog.exportSymbol("ee.data.getAuthClientId",ee.data.getAuthClientId);ee.data.getAuthScopes=module$contents$ee$apiclient_apiclient.getAuthScopes;goog.exportSymbol("ee.data.getAuthScopes",ee.data.getAuthScopes);ee.data.setDeadline=module$contents$ee$apiclient_apiclient.setDeadline;goog.exportSymbol("ee.data.setDeadline",ee.data.setDeadline);ee.data.setParamAugmenter=module$contents$ee$apiclient_apiclient.setParamAugmenter;goog.exportSymbol("ee.data.setParamAugmenter",ee.data.setParamAugmenter);ee.data.initialize=module$contents$ee$apiclient_apiclient.initialize;ee.data.reset=module$contents$ee$apiclient_apiclient.reset;ee.data.PROFILE_HEADER=module$contents$ee$apiclient_apiclient.PROFILE_HEADER;ee.data.makeRequest_=module$contents$ee$apiclient_apiclient.makeRequest_;ee.data.send_=module$contents$ee$apiclient_apiclient.send;ee.data.setupMockSend=module$contents$ee$apiclient_apiclient.setupMockSend;ee.data.withProfiling=module$contents$ee$apiclient_apiclient.withProfiling;ee.data.getAlgorithms=function(opt_callback){var call=new module$contents$ee$apiclient_Call(opt_callback);return call.handle(call.algorithms().list(call.projectsPath(),{prettyPrint:!1}).then(ee.rpc_convert.algorithms));};ee.data.getMapId=function(params,opt_callback){if("string"===typeof params.image){throw Error("Image as JSON string not supported.");}if(void 0!==params.version){throw Error("Image version specification not supported.");}var map=new module$exports$eeapiclient$ee_api_client.EarthEngineMap({name:null,expression:ee.data.expressionAugmenter_(ee.Serializer.encodeCloudApiExpression(params.image)),fileFormat:ee.rpc_convert.fileFormat(params.format),bandIds:ee.rpc_convert.bandList(params.bands),visualizationOptions:ee.rpc_convert.visualizationOptions(params)}),call=new module$contents$ee$apiclient_Call(opt_callback);return call.handle(call.maps().create(call.projectsPath(),map,{fields:["name"]}).then(function(response){return ee.data.makeMapId_(response.name,"");}));};goog.exportSymbol("ee.data.getMapId",ee.data.getMapId);ee.data.getTileUrl=function(id,x,y,z){if(!id.formatTileUrl){var newId=ee.data.makeMapId_(id.mapid,id.token,id.urlFormat);id.urlFormat=newId.urlFormat;id.formatTileUrl=newId.formatTileUrl;}return id.formatTileUrl(x,y,z);};goog.exportSymbol("ee.data.getTileUrl",ee.data.getTileUrl);ee.data.makeMapId_=function(mapid,token,opt_urlFormat){var urlFormat=void 0===opt_urlFormat?"":opt_urlFormat;if(!urlFormat){module$contents$ee$apiclient_apiclient.initialize();var base=module$contents$ee$apiclient_apiclient.getTileBaseUrl();urlFormat=token?base+"/map/"+mapid+"/{z}/{x}/{y}?token="+token:base+"/"+module$exports$ee$apiVersion.V1ALPHA+"/"+mapid+"/tiles/{z}/{x}/{y}";}return{mapid:mapid,token:token,formatTileUrl:function(x,y,z){var width=Math.pow(2,z);x%=width;x=String(0>x?x+width:x);return urlFormat.replace("{x}",x).replace("{y}",y).replace("{z}",z);},urlFormat:urlFormat};};ee.data.getDmsTilesKey=function(params,opt_callback){var visualizationExpression=params.visParams?ee.data.expressionAugmenter_(ee.Serializer.encodeCloudApiExpression(params.visParams)):null,map=new module$exports$eeapiclient$ee_api_client.DMSMap({name:null,asset:params.assetName,dmsName:params.mapName,visualizationExpression:visualizationExpression}),call=new module$contents$ee$apiclient_Call(opt_callback);return call.handle(call.dmsMaps().create(call.projectsPath(),map,{fields:["name"]}).then(function(response){return{token:response.name};}));};goog.exportSymbol("ee.data.getDmsTilesKey",ee.data.getDmsTilesKey);ee.data.computeValue=function(obj,opt_callback){var expression=ee.data.expressionAugmenter_(ee.Serializer.encodeCloudApiExpression(obj)),call=new module$contents$ee$apiclient_Call(opt_callback);return call.handle(call.value().compute(call.projectsPath(),new module$exports$eeapiclient$ee_api_client.ComputeValueRequest({expression:expression})).then(function(x){return x.result;}));};goog.exportSymbol("ee.data.computeValue",ee.data.computeValue);ee.data.getThumbId=function(params,opt_callback){if("string"===typeof params.image){throw Error("Image as JSON string not supported.");}if(void 0!==params.version){throw Error("Image version specification not supported.");}if(void 0!==params.region){throw Error('"region" not supported in call to ee.data.getThumbId. Use ee.Image.getThumbURL.');}if(void 0!==params.dimensions){throw Error('"dimensions" is not supported in call to ee.data.getThumbId. Use ee.Image.getThumbURL.');}var thumbnail=new module$exports$eeapiclient$ee_api_client.Thumbnail({name:null,expression:ee.data.expressionAugmenter_(ee.Serializer.encodeCloudApiExpression(params.image)),fileFormat:ee.rpc_convert.fileFormat(params.format),filenamePrefix:params.name,bandIds:ee.rpc_convert.bandList(params.bands),visualizationOptions:ee.rpc_convert.visualizationOptions(params),grid:null}),call=new module$contents$ee$apiclient_Call(opt_callback);return call.handle(call.thumbnails().create(call.projectsPath(),thumbnail,{fields:["name"]}).then(function(response){return{thumbid:response.name,token:""};}));};goog.exportSymbol("ee.data.getThumbId",ee.data.getThumbId);ee.data.getVideoThumbId=function(params,opt_callback){var videoOptions=new module$exports$eeapiclient$ee_api_client.VideoOptions({framesPerSecond:params.framesPerSecond||null,maxFrames:params.maxFrames||null,maxPixelsPerFrame:params.maxPixelsPerFrame||null}),request=new module$exports$eeapiclient$ee_api_client.VideoThumbnail({name:null,expression:ee.data.expressionAugmenter_(ee.Serializer.encodeCloudApiExpression(params.imageCollection)),fileFormat:ee.rpc_convert.fileFormat(params.format),videoOptions:videoOptions,grid:null}),call=new module$contents$ee$apiclient_Call(opt_callback);return call.handle(call.videoThumbnails().create(call.projectsPath(),request,{fields:["name"]}).then(function(response){return{thumbid:response.name,token:""};}));};goog.exportSymbol("ee.data.getVideoThumbId",ee.data.getVideoThumbId);ee.data.getFilmstripThumbId=function(params,opt_callback){var request=new module$exports$eeapiclient$ee_api_client.FilmstripThumbnail({name:null,expression:ee.data.expressionAugmenter_(ee.Serializer.encodeCloudApiExpression(params.imageCollection)),fileFormat:ee.rpc_convert.fileFormat(params.format),orientation:ee.rpc_convert.orientation(params.orientation),grid:null}),call=new module$contents$ee$apiclient_Call(opt_callback);return call.handle(call.filmstripThumbnails().create(call.projectsPath(),request,{fields:["name"]}).then(function(response){return{thumbid:response.name,token:""};}));};goog.exportSymbol("ee.data.getFilmstripThumbId",ee.data.getFilmstripThumbId);ee.data.makeThumbUrl=function(id){return module$contents$ee$apiclient_apiclient.getTileBaseUrl()+"/"+module$exports$ee$apiVersion.V1ALPHA+"/"+id.thumbid+":getPixels";};goog.exportSymbol("ee.data.makeThumbUrl",ee.data.makeThumbUrl);ee.data.getDownloadId=function(params,opt_callback){params=Object.assign({},params);params.id&&(params.image=new ee.Image(params.id));if("string"===typeof params.image){throw Error("Image as serialized JSON string not supported.");}if(!params.image){throw Error("Missing ID or image parameter.");}params.filePerBand=!1!==params.filePerBand;params.format=params.format||(params.filePerBand?"ZIPPED_GEO_TIFF_PER_BAND":"ZIPPED_GEO_TIFF");if(null!=params.region&&(null!=params.scale||null!=params.crs_transform)&&null!=params.dimensions){throw Error("Cannot specify (bounding region, crs_transform/scale, dimensions) simultaneously.");}if("string"===typeof params.bands){try{params.bands=JSON.parse(params.bands);}catch(e){params.bands=ee.rpc_convert.bandList(params.bands);}}if(params.bands&&!Array.isArray(params.bands)){throw Error("Bands parameter must be an array.");}params.bands&¶ms.bands.every(function(band){return"string"===typeof band;})&&(params.bands=params.bands.map(function(band){return{id:band};}));if(params.bands&¶ms.bands.some(function($jscomp$destructuring$var34){return null==$jscomp$destructuring$var34.id;})){throw Error("Each band dictionary must have an id.");}"string"===typeof params.region&&(params.region=JSON.parse(params.region));if("string"===typeof params.crs_transform){try{params.crs_transform=JSON.parse(params.crs_transform);}catch(e$58){}}var image=ee.data.images.buildDownloadIdImage(params.image,params),thumbnail=new module$exports$eeapiclient$ee_api_client.Thumbnail({name:null,expression:ee.data.expressionAugmenter_(ee.Serializer.encodeCloudApiExpression(image)),fileFormat:ee.rpc_convert.fileFormat(params.format),filenamePrefix:params.name,bandIds:params.bands&&ee.rpc_convert.bandList(params.bands.map(function(band){return band.id;})),grid:null}),call=new module$contents$ee$apiclient_Call(opt_callback);return call.handle(call.thumbnails().create(call.projectsPath(),thumbnail,{fields:["name"]}).then(function(response){return{docid:response.name,token:""};}));};goog.exportSymbol("ee.data.getDownloadId",ee.data.getDownloadId);ee.data.makeDownloadUrl=function(id){module$contents$ee$apiclient_apiclient.initialize();return module$contents$ee$apiclient_apiclient.getTileBaseUrl()+"/"+module$exports$ee$apiVersion.V1ALPHA+"/"+id.docid+":getPixels";};goog.exportSymbol("ee.data.makeDownloadUrl",ee.data.makeDownloadUrl);ee.data.getTableDownloadId=function(params,opt_callback){var call=new module$contents$ee$apiclient_Call(opt_callback),fileFormat=ee.rpc_convert.tableFileFormat(params.format),expression=ee.data.expressionAugmenter_(ee.Serializer.encodeCloudApiExpression(params.table)),selectors=null;if(null!=params.selectors){if("string"===typeof params.selectors){selectors=params.selectors.split(",");}else{if(Array.isArray(params.selectors)&¶ms.selectors.every(function(x){return"string"===typeof x;})){selectors=params.selectors;}else{throw Error("'selectors' parameter must be an array of strings.");}}}var table=new module$exports$eeapiclient$ee_api_client.Table({name:null,expression:expression,fileFormat:fileFormat,selectors:selectors,filename:params.filename||null});return call.handle(call.tables().create(call.projectsPath(),table,{fields:["name"]}).then(function(res){return{docid:res.name||"",token:""};}));};goog.exportSymbol("ee.data.getTableDownloadId",ee.data.getTableDownloadId);ee.data.makeTableDownloadUrl=function(id){return module$contents$ee$apiclient_apiclient.getTileBaseUrl()+"/"+module$exports$ee$apiVersion.V1ALPHA+"/"+id.docid+":getFeatures";};goog.exportSymbol("ee.data.makeTableDownloadUrl",ee.data.makeTableDownloadUrl);ee.data.newTaskId=function(opt_count,opt_callback){var rand=function(n){return Math.floor(Math.random()*n);},hex=function(d){return rand(Math.pow(2,4*d)).toString(16).padStart(d,"0");},variantPart=function(){return(8+rand(4)).toString(16)+hex(3);},uuids=module$contents$goog$array_range(opt_count||1).map(function(){return[hex(8),hex(4),"4"+hex(3),variantPart(),hex(12)].join("-");});return opt_callback?opt_callback(uuids):uuids;};goog.exportSymbol("ee.data.newTaskId",ee.data.newTaskId);ee.data.getTaskStatus=function(taskId,opt_callback){var opNames=ee.data.makeStringArray_(taskId).map(ee.rpc_convert.taskIdToOperationName);if(1===opNames.length){var call$60=new module$contents$ee$apiclient_Call(opt_callback);return call$60.handle(call$60.operations().get(opNames[0]).then(function(op){return[ee.rpc_convert.operationToTask(op)];}));}var call=new module$contents$ee$apiclient_BatchCall(opt_callback),operations=call.operations();return call.send(opNames.map(function(op){return[op,operations.get(op)];}),function(data){return opNames.map(function(id){return ee.rpc_convert.operationToTask(data[id]);});});};goog.exportSymbol("ee.data.getTaskStatus",ee.data.getTaskStatus);ee.data.makeStringArray_=function(value){if("string"===typeof value){return[value];}if(Array.isArray(value)){return value;}throw Error("Invalid value: expected a string or an array of strings.");};ee.data.TASKLIST_PAGE_SIZE_=500;ee.data.getTaskList=function(opt_callback){return ee.data.getTaskListWithLimit(void 0,opt_callback);};goog.exportSymbol("ee.data.getTaskList",ee.data.getTaskList);ee.data.getTaskListWithLimit=function(opt_limit,opt_callback){var convert=function(ops){return{tasks:ops.map(ee.rpc_convert.operationToTask)};};return opt_callback?(ee.data.listOperations(opt_limit,function(v,e){return opt_callback(v?convert(v):null,e);}),null):convert(ee.data.listOperations(opt_limit));};goog.exportSymbol("ee.data.getTaskListWithLimit",ee.data.getTaskListWithLimit);ee.data.listOperations=function(opt_limit,opt_callback){var ops=[],truncatedOps=function(){return opt_limit?ops.slice(0,opt_limit):ops;},params={pageSize:ee.data.TASKLIST_PAGE_SIZE_},getResponse=function(response){module$contents$goog$array_extend(ops,response.operations||[]);!response.nextPageToken||opt_limit&&ops.length>=opt_limit?opt_callback&&opt_callback(truncatedOps()):(params.pageToken=response.nextPageToken,call.handle(operations.list(call.projectsPath(),params).then(getResponse)));return null;},call=new module$contents$ee$apiclient_Call(opt_callback?function(value,err){return err&&opt_callback(value,err);}:void 0),operations=call.operations();call.handle(operations.list(call.projectsPath(),params).then(getResponse));return opt_callback?null:truncatedOps();};goog.exportSymbol("ee.data.listOperations",ee.data.listOperations);ee.data.cancelOperation=function(operationName,opt_callback){var opNames=ee.data.makeStringArray_(operationName),request=new module$exports$eeapiclient$ee_api_client.CancelOperationRequest();if(1===opNames.length){var call$61=new module$contents$ee$apiclient_Call(opt_callback);call$61.handle(call$61.operations().cancel(opNames[0],request));}else{var call=new module$contents$ee$apiclient_BatchCall(opt_callback),operations=call.operations();call.send(opNames.map(function(op){return[op,operations.cancel(op,request)];}));}};goog.exportSymbol("ee.data.cancelOperation",ee.data.cancelOperation);ee.data.getOperation=function(operationName,opt_callback){var opNames=ee.data.makeStringArray_(operationName).map(ee.rpc_convert.taskIdToOperationName);if(!Array.isArray(operationName)){var call$62=new module$contents$ee$apiclient_Call(opt_callback);return call$62.handle(call$62.operations().get(opNames[0]));}var call=new module$contents$ee$apiclient_BatchCall(opt_callback),operations=call.operations();return call.send(opNames.map(function(op){return[op,operations.get(op)];}));};goog.exportSymbol("ee.data.getOperation",ee.data.getOperation);ee.data.cancelTask=function(taskId,opt_callback){return ee.data.updateTask(taskId,ee.data.TaskUpdateActions.CANCEL,opt_callback);};goog.exportSymbol("ee.data.cancelTask",ee.data.cancelTask);ee.data.updateTask=function(taskId,action,opt_callback){if(!module$contents$goog$object_containsValue(ee.data.TaskUpdateActions,action)){throw Error("Invalid action: "+action);}taskId=ee.data.makeStringArray_(taskId);var operations=taskId.map(ee.rpc_convert.taskIdToOperationName);ee.data.cancelOperation(operations,opt_callback);return null;};goog.exportSymbol("ee.data.updateTask",ee.data.updateTask);ee.data.startProcessing=function(taskId,params,opt_callback){params.id=taskId;var taskType=params.type,metadata=null!=params.sourceUrl?{__source_url__:params.sourceUrl}:{},call=new module$contents$ee$apiclient_Call(opt_callback),handle=function(response){return call.handle(response.then(ee.rpc_convert.operationToProcessingResponse));};switch(taskType){case ee.data.ExportType.IMAGE:var imageRequest=ee.data.prepareExportImageRequest_(params,metadata);return handle(call.image().export(call.projectsPath(),imageRequest));case ee.data.ExportType.TABLE:var tableRequest=ee.rpc_convert_batch.taskToExportTableRequest(params);tableRequest.expression=ee.data.expressionAugmenter_(tableRequest.expression,metadata);return handle(call.table().export(call.projectsPath(),tableRequest));case ee.data.ExportType.VIDEO:var videoRequest=ee.data.prepareExportVideoRequest_(params,metadata);return handle(call.video().export(call.projectsPath(),videoRequest));case ee.data.ExportType.MAP:var mapRequest=ee.data.prepareExportMapRequest_(params,metadata);return handle(call.map().export(call.projectsPath(),mapRequest));case ee.data.ExportType.VIDEO_MAP:var videoMapRequest=ee.data.prepareExportVideoMapRequest_(params,metadata);return handle(call.videoMap().export(call.projectsPath(),videoMapRequest));case ee.data.ExportType.CLASSIFIER:var classifierRequest=ee.data.prepareExportClassifierRequest_(params,metadata);return handle(call.classifier().export(call.projectsPath(),classifierRequest));default:throw Error("Unable to start processing for task of type "+taskType);}};goog.exportSymbol("ee.data.startProcessing",ee.data.startProcessing);ee.data.prepareExportImageRequest_=function(taskConfig,metadata){var imageTask=ee.data.images.applyTransformsToImage(taskConfig),imageRequest=ee.rpc_convert_batch.taskToExportImageRequest(imageTask);imageRequest.expression=ee.data.expressionAugmenter_(imageRequest.expression,metadata);return imageRequest;};ee.data.prepareExportVideoRequest_=function(taskConfig,metadata){var videoTask=ee.data.images.applyTransformsToCollection(taskConfig),videoRequest=ee.rpc_convert_batch.taskToExportVideoRequest(videoTask);videoRequest.expression=ee.data.expressionAugmenter_(videoRequest.expression,metadata);return videoRequest;};ee.data.prepareExportMapRequest_=function(taskConfig,metadata){var scale=taskConfig.scale;delete taskConfig.scale;var mapTask=ee.data.images.applyTransformsToImage(taskConfig);mapTask.scale=scale;var mapRequest=ee.rpc_convert_batch.taskToExportMapRequest(mapTask);mapRequest.expression=ee.data.expressionAugmenter_(mapRequest.expression,metadata);return mapRequest;};ee.data.prepareExportVideoMapRequest_=function(taskConfig,metadata){var scale=taskConfig.scale;delete taskConfig.scale;var videoMapTask=ee.data.images.applyTransformsToCollection(taskConfig);videoMapTask.scale=scale;var videoMapRequest=ee.rpc_convert_batch.taskToExportVideoMapRequest(videoMapTask);videoMapRequest.expression=ee.data.expressionAugmenter_(videoMapRequest.expression);return videoMapRequest;};ee.data.prepareExportClassifierRequest_=function(taskConfig,metadata){var classifierRequest=ee.rpc_convert_batch.taskToExportClassifierRequest(taskConfig);classifierRequest.expression=ee.data.expressionAugmenter_(classifierRequest.expression);return classifierRequest;};ee.data.startIngestion=function(taskId,request,opt_callback){var manifest=ee.rpc_convert.toImageManifest(request),convert=function(arg){return arg?ee.rpc_convert.operationToProcessingResponse(arg):null;};return convert(ee.data.ingestImage(taskId,manifest,opt_callback&&function(arg,err){return opt_callback(convert(arg),err);}));};goog.exportSymbol("ee.data.startIngestion",ee.data.startIngestion);ee.data.ingestImage=function(taskId,imageManifest,callback){var request=new module$exports$eeapiclient$ee_api_client.ImportImageRequest({imageManifest:imageManifest,requestId:taskId,overwrite:null,description:null}),call=new module$contents$ee$apiclient_Call(callback,taskId?void 0:0);return call.handle(call.image().import(call.projectsPath(),request));};ee.data.ingestTable=function(taskId,tableManifest,callback){var request=new module$exports$eeapiclient$ee_api_client.ImportTableRequest({tableManifest:tableManifest,requestId:taskId,overwrite:null,description:null}),call=new module$contents$ee$apiclient_Call(callback,taskId?void 0:0);return call.handle(call.table().import(call.projectsPath(),request));};ee.data.startTableIngestion=function(taskId,request,opt_callback){var manifest=ee.rpc_convert.toTableManifest(request),convert=function(arg){return arg?ee.rpc_convert.operationToProcessingResponse(arg):null;};return convert(ee.data.ingestTable(taskId,manifest,opt_callback&&function(arg,err){return opt_callback(convert(arg),err);}));};goog.exportSymbol("ee.data.startTableIngestion",ee.data.startTableIngestion);ee.data.getAsset=function(id,opt_callback){var call=new module$contents$ee$apiclient_Call(opt_callback),name=ee.rpc_convert.assetIdToAssetName(id);return call.handle(call.assets().get(name,{prettyPrint:!1}).then(ee.rpc_convert.assetToLegacyResult));};goog.exportSymbol("ee.data.getAsset",ee.data.getAsset);ee.data.getInfo=ee.data.getAsset;goog.exportSymbol("ee.data.getInfo",ee.data.getInfo);ee.data.getList=function(params,opt_callback){var call=new module$contents$ee$apiclient_Call(opt_callback),methodRoot=call.assets(),parent=ee.rpc_convert.assetIdToAssetName(params.id),isProjectAssetRoot=ee.rpc_convert.CLOUD_ASSET_ROOT_RE.test(params.id);isProjectAssetRoot&&(methodRoot=call.projects(),parent=ee.rpc_convert.projectParentFromPath(params.id));if(Object.keys(params).every(function(k){return"id"===k||"num"===k;})){return call.handle(methodRoot.listAssets(parent,{pageSize:params.num}).then(ee.rpc_convert.listAssetsToGetList));}if(isProjectAssetRoot){throw Error("getList on a project does not support filtering options. Please provide a full asset path. Got: "+params.id);}var body=ee.rpc_convert.getListToListImages(params);return call.handle(methodRoot.listImages(parent,body).then(ee.rpc_convert.listImagesToGetList));};goog.exportSymbol("ee.data.getList",ee.data.getList);ee.data.listAssets=function(parent,params,opt_callback){params=void 0===params?{}:params;var isProjectAssetRoot=ee.rpc_convert.CLOUD_ASSET_ROOT_RE.test(parent),call=new module$contents$ee$apiclient_Call(opt_callback),methodRoot=isProjectAssetRoot?call.projects():call.assets();parent=isProjectAssetRoot?ee.rpc_convert.projectParentFromPath(parent):ee.rpc_convert.assetIdToAssetName(parent);return call.handle(methodRoot.listAssets(parent,params));};goog.exportSymbol("ee.data.listAssets",ee.data.listAssets);ee.data.listImages=function(parent,params,opt_callback){params=void 0===params?{}:params;var call=new module$contents$ee$apiclient_Call(opt_callback);return call.handle(call.assets().listImages(parent,params));};goog.exportSymbol("ee.data.listImages",ee.data.listImages);ee.data.listBuckets=function(project,opt_callback){var call=new module$contents$ee$apiclient_Call(opt_callback);return call.handle(call.projects().listAssets(project||call.projectsPath()));};goog.exportSymbol("ee.data.listBuckets",ee.data.listBuckets);ee.data.getAssetRoots=function(opt_callback){var call=new module$contents$ee$apiclient_Call(opt_callback);return call.handle(call.projects().listAssets(call.projectsPath()).then(ee.rpc_convert.listAssetsToGetList));};goog.exportSymbol("ee.data.getAssetRoots",ee.data.getAssetRoots);ee.data.createAssetHome=function(requestedId,opt_callback){var parent=ee.rpc_convert.projectParentFromPath(requestedId),assetId=parent==="projects/"+module$contents$ee$apiclient_apiclient.DEFAULT_PROJECT_?requestedId:void 0,asset=new module$exports$eeapiclient$ee_api_client.EarthEngineAsset({type:"Folder"}),call=new module$contents$ee$apiclient_Call(opt_callback);call.handle(call.assets().create(parent,asset,{assetId:assetId}).then(ee.rpc_convert.assetToLegacyResult));};goog.exportSymbol("ee.data.createAssetHome",ee.data.createAssetHome);ee.data.createAsset=function(value,opt_path,opt_force,opt_properties,opt_callback){if(opt_force){throw Error("Asset overwrite not supported.");}if("string"===typeof value){throw Error("Asset cannot be specified as string.");}var name=value.name||opt_path&&ee.rpc_convert.assetIdToAssetName(opt_path);if(!name){throw Error("Either asset name or opt_path must be specified.");}var split=name.indexOf("/assets/");if(-1===split){throw Error("Asset name must contain /assets/.");}var asset=new module$exports$eeapiclient$ee_api_client.EarthEngineAsset(value),parent=name.slice(0,split),assetId=name.slice(split+8);asset.id=null;asset.name=null;opt_properties&&!asset.properties&&(asset.properties=opt_properties);asset.type=ee.rpc_convert.assetTypeForCreate(asset.type);var call=new module$contents$ee$apiclient_Call(opt_callback);return call.handle(call.assets().create(parent,asset,{assetId:assetId}).then(ee.rpc_convert.assetToLegacyResult));};goog.exportSymbol("ee.data.createAsset",ee.data.createAsset);ee.data.createFolder=function(path,opt_force,opt_callback){return ee.data.createAsset({type:"Folder"},path,opt_force,void 0,opt_callback);};goog.exportSymbol("ee.data.createFolder",ee.data.createFolder);ee.data.renameAsset=function(sourceId,destinationId,opt_callback){var sourceName=ee.rpc_convert.assetIdToAssetName(sourceId),destinationName=ee.rpc_convert.assetIdToAssetName(destinationId),request=new module$exports$eeapiclient$ee_api_client.MoveAssetRequest({destinationName:destinationName}),call=new module$contents$ee$apiclient_Call(opt_callback);call.handle(call.assets().move(sourceName,request).then(ee.rpc_convert.assetToLegacyResult));};goog.exportSymbol("ee.data.renameAsset",ee.data.renameAsset);ee.data.copyAsset=function(sourceId,destinationId,opt_overwrite,opt_callback){var sourceName=ee.rpc_convert.assetIdToAssetName(sourceId),destinationName=ee.rpc_convert.assetIdToAssetName(destinationId),request=new module$exports$eeapiclient$ee_api_client.CopyAssetRequest({destinationName:destinationName,overwrite:null!=opt_overwrite?opt_overwrite:null}),call=new module$contents$ee$apiclient_Call(opt_callback);call.handle(call.assets().copy(sourceName,request).then(ee.rpc_convert.assetToLegacyResult));};goog.exportSymbol("ee.data.copyAsset",ee.data.copyAsset);ee.data.deleteAsset=function(assetId,opt_callback){var call=new module$contents$ee$apiclient_Call(opt_callback);call.handle(call.assets().delete(ee.rpc_convert.assetIdToAssetName(assetId)));};goog.exportSymbol("ee.data.deleteAsset",ee.data.deleteAsset);ee.data.getAssetAcl=function(assetId,opt_callback){var resource=ee.rpc_convert.assetIdToAssetName(assetId),request=new module$exports$eeapiclient$ee_api_client.GetIamPolicyRequest(),call=new module$contents$ee$apiclient_Call(opt_callback);return call.handle(call.assets().getIamPolicy(resource,request,{prettyPrint:!1}).then(ee.rpc_convert.iamPolicyToAcl));};goog.exportSymbol("ee.data.getAssetAcl",ee.data.getAssetAcl);ee.data.getIamPolicy=function(assetId,opt_callback){var resource=ee.rpc_convert.assetIdToAssetName(assetId),request=new module$exports$eeapiclient$ee_api_client.GetIamPolicyRequest(),call=new module$contents$ee$apiclient_Call(opt_callback);return call.handle(call.assets().getIamPolicy(resource,request,{prettyPrint:!1}));};ee.data.setIamPolicy=function(assetId,policy,opt_callback){var resource=ee.rpc_convert.assetIdToAssetName(assetId),request=new module$exports$eeapiclient$ee_api_client.SetIamPolicyRequest({policy:policy}),call=new module$contents$ee$apiclient_Call(opt_callback);return call.handle(call.assets().setIamPolicy(resource,request,{prettyPrint:!1}));};ee.data.updateAsset=function(assetId,asset,updateFields,opt_callback){var updateMask=(updateFields||[]).join(","),request=new module$exports$eeapiclient$ee_api_client.UpdateAssetRequest({asset:asset,updateMask:updateMask}),call=new module$contents$ee$apiclient_Call(opt_callback);return call.handle(call.assets().patch(ee.rpc_convert.assetIdToAssetName(assetId),request).then(ee.rpc_convert.assetToLegacyResult));};goog.exportSymbol("ee.data.updateAsset",ee.data.updateAsset);ee.data.setAssetAcl=function(assetId,aclUpdate,opt_callback){var resource=ee.rpc_convert.assetIdToAssetName(assetId),policy=ee.rpc_convert.aclToIamPolicy(aclUpdate),request=new module$exports$eeapiclient$ee_api_client.SetIamPolicyRequest({policy:policy}),call=new module$contents$ee$apiclient_Call(opt_callback);call.handle(call.assets().setIamPolicy(resource,request,{prettyPrint:!1}));};goog.exportSymbol("ee.data.setAssetAcl",ee.data.setAssetAcl);ee.data.setAssetProperties=function(assetId,properties,opt_callback){var asset=ee.rpc_convert.legacyPropertiesToAssetUpdate(properties),updateFields=asset.getClassMetadata().keys.filter(function(k){return"properties"!==k&&asset.Serializable$has(k);}).map(function(str){return str.replace(/([A-Z])/g,function(all,cap){return"_"+cap.toLowerCase();});}).concat(Object.keys(asset.properties||{}).map(function(k){return'properties."'+k+'"';}));ee.data.updateAsset(assetId,asset,updateFields,opt_callback);};goog.exportSymbol("ee.data.setAssetProperties",ee.data.setAssetProperties);ee.data.getAssetRootQuota=function(rootId,opt_callback){var name=ee.rpc_convert.assetIdToAssetName(rootId),call=new module$contents$ee$apiclient_Call(opt_callback),assetsCall=call.assets(),validateParams=assetsCall.$apiClient.$validateParameter;assetsCall.$apiClient.$validateParameter=function(param,pattern){"^projects\\/[^/]+\\/assets\\/.+$"===pattern.source&&(pattern=RegExp("^projects/[^/]+/assets/.*$"));return validateParams(param,pattern);};var getAssetRequest=assetsCall.get(name,{prettyPrint:!1});return call.handle(getAssetRequest.then(function(asset){if(!(asset instanceof module$exports$eeapiclient$ee_api_client.EarthEngineAsset&&asset.quota)){throw Error(rootId+" is not a root folder.");}return ee.rpc_convert.folderQuotaToAssetQuotaDetails(asset.quota);}));};goog.exportSymbol("ee.data.getAssetRootQuota",ee.data.getAssetRootQuota);ee.data.AssetType={ALGORITHM:"Algorithm",CLASSIFIER:"Classifier",DATA_MAPPING_SERVICE:"DmsAsset",FOLDER:"Folder",FEATURE_COLLECTION:"FeatureCollection",IMAGE:"Image",IMAGE_COLLECTION:"ImageCollection",TABLE:"Table",UNKNOWN:"Unknown"};ee.data.ExportType={IMAGE:"EXPORT_IMAGE",MAP:"EXPORT_TILES",TABLE:"EXPORT_FEATURES",VIDEO:"EXPORT_VIDEO",VIDEO_MAP:"EXPORT_VIDEO_MAP",CLASSIFIER:"EXPORT_CLASSIFIER"};ee.data.ExportState={UNSUBMITTED:"UNSUBMITTED",READY:"READY",RUNNING:"RUNNING",COMPLETED:"COMPLETED",FAILED:"FAILED",CANCEL_REQUESTED:"CANCEL_REQUESTED",CANCELLED:"CANCELLED"};ee.data.ExportDestination={DRIVE:"DRIVE",GCS:"GOOGLE_CLOUD_STORAGE",ASSET:"ASSET",DMS:"DMS"};ee.data.ThinningStrategy={GLOBALLY_CONSISTENT:"GLOBALLY_CONSISTENT",HIGHER_DENSITY:"HIGHER_DENSITY"};ee.data.Direction={ASCENDING:"ASCENDING",DESCENDING:"DESCENDING"};ee.data.SystemPropertyPrefix="system:";ee.data.SystemTimeProperty={START:"system:time_start",END:"system:time_end"};ee.data.SYSTEM_ASSET_SIZE_PROPERTY="system:asset_size";ee.data.AssetDetailsProperty={TITLE:"system:title",DESCRIPTION:"system:description",TAGS:"system:tags"};ee.data.ALLOWED_DESCRIPTION_HTML_TABLE_ELEMENTS_="col colgroup caption table tbody td tfoot th thead tr".split(" ");ee.data.ALLOWED_DESCRIPTION_HTML_ELEMENTS=ee.data.ALLOWED_DESCRIPTION_HTML_TABLE_ELEMENTS_.concat("a code em i li ol p strong sub sup ul".split(" "));ee.data.ShortAssetDescription=function(){};ee.data.AssetAcl=function(){};ee.data.AssetAclUpdate=function(){};ee.data.AssetQuotaEntry=function(){};ee.data.AssetQuotaDetails=function(){};ee.data.DmsAssetDescription=function(){};ee.data.FolderDescription=function(){};ee.data.FeatureCollectionDescription=function(){};ee.data.FeatureVisualizationParameters=function(){};ee.data.GeoJSONFeature=function(){};ee.data.GeoJSONGeometry=function(){};ee.data.GeoJSONGeometryCrs=function(){};ee.data.GeoJSONGeometryCrsProperties=function(){};ee.data.ImageCollectionDescription=function(){};ee.data.ImageDescription=function(){};ee.data.TableDescription=function(){};ee.data.TableDownloadParameters=function(){};ee.data.ImageVisualizationParameters=function(){};ee.data.DmsMapVisualizationParameters=function(){};ee.data.ThumbnailOptions=function(){};$jscomp.inherits(ee.data.ThumbnailOptions,ee.data.ImageVisualizationParameters);ee.data.VideoThumbnailOptions=function(){};$jscomp.inherits(ee.data.VideoThumbnailOptions,ee.data.ThumbnailOptions);ee.data.FilmstripThumbnailOptions=function(){};$jscomp.inherits(ee.data.FilmstripThumbnailOptions,ee.data.ThumbnailOptions);ee.data.BandDescription=function(){};ee.data.PixelTypeDescription=function(){};ee.data.AlgorithmSignature=function(){};ee.data.AlgorithmArgument=function(){};ee.data.ThumbnailId=function(){};ee.data.DownloadId=function(){};ee.data.RawMapId=function(){};ee.data.MapId=function(){};$jscomp.inherits(ee.data.MapId,ee.data.RawMapId);ee.data.DmsTilesKey=function(){};ee.data.MapZoomRange={MIN:0,MAX:24};ee.data.TaskStatus=function(){};ee.data.ProcessingResponse=function(){};ee.data.TaskListResponse=function(){};ee.data.TaskUpdateActions={CANCEL:"CANCEL",UPDATE:"UPDATE"};ee.data.AssetDescription=function(){};ee.data.IngestionRequest=function(){};ee.data.MissingData=function(){};ee.data.PyramidingPolicy={MEAN:"MEAN",MODE:"MODE",MIN:"MIN",MAX:"MAX",SAMPLE:"SAMPLE"};ee.data.Band=function(){};ee.data.Tileset=function(){};ee.data.FileBand=function(){};ee.data.FileSource=function(){};ee.data.TableIngestionRequest=function(){};ee.data.TableSource=function(){};$jscomp.inherits(ee.data.TableSource,ee.data.FileSource);ee.data.AuthPrivateKey=function(){};ee.ComputedObject=function(func,args,opt_varName){if(!(this instanceof ee.ComputedObject)){return ee.ComputedObject.construct(ee.ComputedObject,arguments);}if(opt_varName&&(func||args)){throw Error('When "opt_varName" is specified, "func" and "args" must be null.');}if(func&&!args){throw Error('When "func" is specified, "args" must not be null.');}this.func=func;this.args=args;this.varName=opt_varName||null;};goog.inherits(ee.ComputedObject,ee.Encodable);goog.exportSymbol("ee.ComputedObject",ee.ComputedObject);ee.ComputedObject.prototype.evaluate=function(callback){if(!callback||"function"!==typeof callback){throw Error("evaluate() requires a callback function.");}ee.data.computeValue(this,callback);};goog.exportProperty(ee.ComputedObject.prototype,"evaluate",ee.ComputedObject.prototype.evaluate);ee.ComputedObject.prototype.getInfo=function(opt_callback){return ee.data.computeValue(this,opt_callback);};goog.exportProperty(ee.ComputedObject.prototype,"getInfo",ee.ComputedObject.prototype.getInfo);ee.ComputedObject.prototype.encode=function(encoder){if(this.isVariable()){return{type:"ArgumentRef",value:this.varName};}var encodedArgs={},name;for(name in this.args){void 0!==this.args[name]&&(encodedArgs[name]=encoder(this.args[name]));}var result={type:"Invocation",arguments:encodedArgs},func=encoder(this.func);result["string"===typeof func?"functionName":"function"]=func;return result;};ee.ComputedObject.prototype.encodeCloudValue=function(serializer){if(this.isVariable()){var name=this.varName||serializer.unboundName;if(!name){throw Error("A mapped function's arguments cannot be used in client-side operations");}return ee.rpc_node.argumentReference(name);}var encodedArgs={},name$63;for(name$63 in this.args){void 0!==this.args[name$63]&&(encodedArgs[name$63]=ee.rpc_node.reference(serializer.makeReference(this.args[name$63])));}return"string"===typeof this.func?ee.rpc_node.functionByName(String(this.func),encodedArgs):this.func.encodeCloudInvocation(serializer,encodedArgs);};ee.ComputedObject.prototype.serialize=function(legacy){return(void 0===legacy?0:legacy)?ee.Serializer.toJSON(this):ee.Serializer.toCloudApiJSON(this);};goog.exportProperty(ee.ComputedObject.prototype,"serialize",ee.ComputedObject.prototype.serialize);ee.ComputedObject.prototype.toString=function(){return"ee."+this.name()+"("+ee.Serializer.toReadableJSON(this)+")";};goog.exportSymbol("ee.ComputedObject.prototype.toString",ee.ComputedObject.prototype.toString);ee.ComputedObject.prototype.isVariable=function(){return null===this.func&&null===this.args;};ee.ComputedObject.prototype.name=function(){return"ComputedObject";};ee.ComputedObject.prototype.aside=function(func,var_args){var args=Array.from(arguments);args[0]=this;func.apply(goog.global,args);return this;};goog.exportProperty(ee.ComputedObject.prototype,"aside",ee.ComputedObject.prototype.aside);ee.ComputedObject.prototype.castInternal=function(obj){if(obj instanceof this.constructor){return obj;}var klass=function(){};klass.prototype=this.constructor.prototype;var result=new klass();result.func=obj.func;result.args=obj.args;result.varName=obj.varName;return result;};ee.ComputedObject.construct=function(constructor,argsArray){function F(){return constructor.apply(this,argsArray);}F.prototype=constructor.prototype;return new F();};ee.Types={};ee.Types.registeredClasses_={};ee.Types.registerClasses=function(classes){ee.Types.registeredClasses_=classes;};ee.Types.nameToClass=function(name){return name in ee.Types.registeredClasses_?ee.Types.registeredClasses_[name]:null;};ee.Types.classToName=function(klass){return klass.prototype instanceof ee.ComputedObject?klass.prototype.name.call(null):klass==Number?"Number":klass==String?"String":klass==Array?"Array":klass==Date?"Date":"Object";};ee.Types.isSubtype=function(firstType,secondType){if(secondType==firstType){return!0;}switch(firstType){case"Element":return"Element"==secondType||"Image"==secondType||"Feature"==secondType||"Collection"==secondType||"ImageCollection"==secondType||"FeatureCollection"==secondType;case"FeatureCollection":case"Collection":return"Collection"==secondType||"ImageCollection"==secondType||"FeatureCollection"==secondType;case"Object":return!0;default:return!1;}};ee.Types.isNumber=function(obj){return"number"===typeof obj||obj instanceof ee.ComputedObject&&"Number"==obj.name();};ee.Types.isString=function(obj){return"string"===typeof obj||obj instanceof ee.ComputedObject&&"String"==obj.name();};ee.Types.isArray=function(obj){return Array.isArray(obj)||obj instanceof ee.ComputedObject&&"List"==obj.name();};ee.Types.isRegularObject=function(obj){if(goog.isObject(obj)&&"function"!==typeof obj){var proto=Object.getPrototypeOf(obj);return null!==proto&&null===Object.getPrototypeOf(proto);}return!1;};ee.Types.useKeywordArgs=function(args,signature,isInstance){isInstance=void 0===isInstance?!1:isInstance;if(1===args.length&&ee.Types.isRegularObject(args[0])){var formalArgs=signature.args;isInstance&&(formalArgs=formalArgs.slice(1));if(formalArgs.length){return!(1===formalArgs.length||formalArgs[1].optional)||"Dictionary"!==formalArgs[0].type;}}return!1;};ee.Function=function(){if(!(this instanceof ee.Function)){return new ee.Function();}};goog.inherits(ee.Function,ee.Encodable);goog.exportSymbol("ee.Function",ee.Function);ee.Function.promoter_=goog.functions.identity;ee.Function.registerPromoter=function(promoter){ee.Function.promoter_=promoter;};ee.Function.prototype.call=function(var_args){return this.apply(this.nameArgs(Array.prototype.slice.call(arguments,0)));};goog.exportProperty(ee.Function.prototype,"call",ee.Function.prototype.call);ee.Function.prototype.apply=function(namedArgs){var result=new ee.ComputedObject(this,this.promoteArgs(namedArgs));return ee.Function.promoter_(result,this.getReturnType());};goog.exportProperty(ee.Function.prototype,"apply",ee.Function.prototype.apply);ee.Function.prototype.callOrApply=function(thisValue,args){var isInstance=void 0!==thisValue,signature=this.getSignature();if(ee.Types.useKeywordArgs(args,signature,isInstance)){var namedArgs=module$contents$goog$object_clone(args[0]);if(isInstance){var firstArgName=signature.args[0].name;if(firstArgName in namedArgs){throw Error("Named args for "+signature.name+" can't contain keyword "+firstArgName);}namedArgs[firstArgName]=thisValue;}}else{namedArgs=this.nameArgs(isInstance?[thisValue].concat(args):args);}return this.apply(namedArgs);};ee.Function.prototype.promoteArgs=function(args){for(var specs=this.getSignature().args,promotedArgs={},known={},i=0;i<specs.length;i++){var name=specs[i].name;if(name in args&&void 0!==args[name]){promotedArgs[name]=ee.Function.promoter_(args[name],specs[i].type);}else{if(!specs[i].optional){throw Error("Required argument ("+name+") missing to function: "+this);}}known[name]=!0;}var unknown=[],argName;for(argName in args){known[argName]||unknown.push(argName);}if(0<unknown.length){throw Error("Unrecognized arguments ("+unknown+") to function: "+this);}return promotedArgs;};ee.Function.prototype.nameArgs=function(args){var specs=this.getSignature().args;if(specs.length<args.length){throw Error("Too many ("+args.length+") arguments to function: "+this);}for(var namedArgs={},i=0;i<args.length;i++){namedArgs[specs[i].name]=args[i];}return namedArgs;};ee.Function.prototype.getReturnType=function(){return this.getSignature().returns;};ee.Function.prototype.toString=function(opt_name,opt_isInstance){var signature=this.getSignature(),buffer=[];buffer.push(opt_name||signature.name);buffer.push("(");buffer.push(module$contents$goog$array_map(signature.args.slice(opt_isInstance?1:0),function(elem){return elem.name;}).join(", "));buffer.push(")\n");buffer.push("\n");signature.description?buffer.push(signature.description):buffer.push("Undocumented.");buffer.push("\n");if(signature.args.length){buffer.push("\nArgs:\n");for(var i=0;i<signature.args.length;i++){opt_isInstance&&0==i?buffer.push(" this:"):buffer.push("\n ");var arg=signature.args[i];buffer.push(arg.name);buffer.push(" (");buffer.push(arg.type);arg.optional&&buffer.push(", optional");buffer.push("): ");arg.description?buffer.push(arg.description):buffer.push("Undocumented.");}}return buffer.join("");};ee.Function.prototype.serialize=function(legacy){return(void 0===legacy?0:legacy)?ee.Serializer.toJSON(this):ee.Serializer.toCloudApiJSON(this);};ee.ApiFunction=function(name,opt_signature){if(void 0===opt_signature){return ee.ApiFunction.lookup(name);}if(!(this instanceof ee.ApiFunction)){return ee.ComputedObject.construct(ee.ApiFunction,arguments);}this.signature_=module$contents$goog$object_unsafeClone(opt_signature);this.signature_.name=name;};goog.inherits(ee.ApiFunction,ee.Function);goog.exportSymbol("ee.ApiFunction",ee.ApiFunction);ee.ApiFunction._call=function(name,var_args){return ee.Function.prototype.call.apply(ee.ApiFunction.lookup(name),Array.prototype.slice.call(arguments,1));};goog.exportSymbol("ee.ApiFunction._call",ee.ApiFunction._call);ee.ApiFunction._apply=function(name,namedArgs){return ee.ApiFunction.lookup(name).apply(namedArgs);};goog.exportSymbol("ee.ApiFunction._apply",ee.ApiFunction._apply);ee.ApiFunction.prototype.encode=function(encoder){return this.signature_.name;};ee.ApiFunction.prototype.encodeCloudInvocation=function(serializer,args){return ee.rpc_node.functionByName(this.signature_.name,args);};ee.ApiFunction.prototype.getSignature=function(){return this.signature_;};ee.ApiFunction.api_=null;ee.ApiFunction.boundSignatures_={};ee.ApiFunction.allSignatures=function(){ee.ApiFunction.initialize();return module$contents$goog$object_map(ee.ApiFunction.api_,function(func){return func.getSignature();});};ee.ApiFunction.unboundFunctions=function(){ee.ApiFunction.initialize();return module$contents$goog$object_filter(ee.ApiFunction.api_,function(func,name){return!ee.ApiFunction.boundSignatures_[name];});};ee.ApiFunction.lookup=function(name){var func=ee.ApiFunction.lookupInternal(name);if(!func){throw Error("Unknown built-in function name: "+name);}return func;};goog.exportSymbol("ee.ApiFunction.lookup",ee.ApiFunction.lookup);ee.ApiFunction.lookupInternal=function(name){ee.ApiFunction.initialize();return ee.ApiFunction.api_[name]||null;};ee.ApiFunction.initialize=function(opt_successCallback,opt_failureCallback){if(ee.ApiFunction.api_){opt_successCallback&&opt_successCallback();}else{var callback=function(data,opt_error){opt_error?opt_failureCallback&&opt_failureCallback(Error(opt_error)):(ee.ApiFunction.api_=module$contents$goog$object_map(data,function(sig,name){sig.returns=sig.returns.replace(/<.*>/,"");for(var i=0;i<sig.args.length;i++){sig.args[i].type=sig.args[i].type.replace(/<.*>/,"");}return new ee.ApiFunction(name,sig);}),opt_successCallback&&opt_successCallback());};opt_successCallback?ee.data.getAlgorithms(callback):callback(ee.data.getAlgorithms());}};ee.ApiFunction.reset=function(){ee.ApiFunction.api_=null;ee.ApiFunction.boundSignatures_={};};ee.ApiFunction.importApi=function(target,prefix,typeName,opt_prepend){ee.ApiFunction.initialize();var prepend=opt_prepend||"";module$contents$goog$object_forEach(ee.ApiFunction.api_,function(apiFunc,name){var parts=name.split(".");if(2==parts.length&&parts[0]==prefix){var fname=prepend+parts[1],signature=apiFunc.getSignature();ee.ApiFunction.boundSignatures_[name]=!0;var isInstance=!1;if(signature.args.length){var firstArgType=signature.args[0].type;isInstance="Object"!=firstArgType&&ee.Types.isSubtype(firstArgType,typeName);}var destination=isInstance?target.prototype:target;fname in destination&&!destination[fname].signature||(destination[fname]=function(var_args){return apiFunc.callOrApply(isInstance?this:void 0,Array.prototype.slice.call(arguments,0));},destination[fname].toString=goog.bind(apiFunc.toString,apiFunc,fname,isInstance),destination[fname].signature=signature);}});};ee.ApiFunction.clearApi=function(target$jscomp$0){var clear=function(target){for(var name in target){"function"===typeof target[name]&&target[name].signature&&delete target[name];}};clear(target$jscomp$0);clear(target$jscomp$0.prototype||{});};ee.arguments={};ee.arguments.extractFromFunction=function(fn,originalArgs){return ee.arguments.extractImpl_(fn,originalArgs,ee.arguments.JS_PARAM_DECL_MATCHER_FUNCTION_);};ee.arguments.extractFromClassConstructor=function(fn,originalArgs){return ee.arguments.extractImpl_(fn,originalArgs,ee.arguments.JS_PARAM_DECL_MATCHER_CLASS_CONSTRUCTOR_);};ee.arguments.extractFromClassMethod=function(fn,originalArgs){return ee.arguments.extractImpl_(fn,originalArgs,ee.arguments.JS_PARAM_DECL_MATCHER_CLASS_METHOD_);};ee.arguments.extract=ee.arguments.extractFromFunction;ee.arguments.extractImpl_=function(fn,originalArgs,parameterMatcher){var paramNamesWithOptPrefix=ee.arguments.getParamNames_(fn,parameterMatcher),paramNames=module$contents$goog$array_map(paramNamesWithOptPrefix,function(param){return param.replace(/^opt_/,"");}),fnName=ee.arguments.getFnName_(fn),fnNameSnippet=fnName?" to function "+fnName:"",args={},firstArg=originalArgs[0],firstArgCouldBeDictionary=goog.isObject(firstArg)&&"function"!==typeof firstArg&&!Array.isArray(firstArg)&&"Object"===Object.getPrototypeOf(firstArg).constructor.name;if(1<originalArgs.length||!firstArgCouldBeDictionary){if(originalArgs.length>paramNames.length){throw Error("Received too many arguments"+fnNameSnippet+". Expected at most "+paramNames.length+" but got "+originalArgs.length+".");}for(var i=0;i<originalArgs.length;i++){args[paramNames[i]]=originalArgs[i];}}else{var seen=new goog.structs.Set(module$contents$goog$object_getKeys(firstArg)),expected=new goog.structs.Set(paramNames);if(expected.intersection(seen).isEmpty()){args[paramNames[0]]=originalArgs[0];}else{var unexpected=seen.difference(expected);if(0!==unexpected.size){throw Error("Unexpected arguments"+fnNameSnippet+": "+Array.from(unexpected.values()).join(", "));}args=module$contents$goog$object_clone(firstArg);}}var provided=new goog.structs.Set(module$contents$goog$object_getKeys(args)),missing=new goog.structs.Set(module$contents$goog$array_filter(paramNamesWithOptPrefix,function(param){return!goog.string.startsWith(param,"opt_");})).difference(provided);if(0!==missing.size){throw Error("Missing required arguments"+fnNameSnippet+": "+Array.from(missing.values()).join(", "));}return args;};ee.arguments.getParamNames_=function(fn,parameterMatcher){var paramNames=[];if(goog.global.EXPORTED_FN_INFO){var exportedFnInfo=goog.global.EXPORTED_FN_INFO[fn.toString()];goog.isObject(exportedFnInfo)||ee.arguments.throwMatchFailedError_();paramNames=exportedFnInfo.paramNames;Array.isArray(paramNames)||ee.arguments.throwMatchFailedError_();}else{var fnMatchResult=fn.toString().replace(ee.arguments.JS_COMMENT_MATCHER_,"").match(parameterMatcher);null===fnMatchResult&&ee.arguments.throwMatchFailedError_();paramNames=(fnMatchResult[1].split(",")||[]).map(function(p){return p.replace(ee.arguments.JS_PARAM_DEFAULT_MATCHER_,"");});}return paramNames;};ee.arguments.getFnName_=function(fn){return goog.global.EXPORTED_FN_INFO?goog.global.EXPORTED_FN_INFO[fn.toString()].name.split(".").pop()+"()":null;};ee.arguments.throwMatchFailedError_=function(){throw Error("Failed to locate function parameters.");};ee.arguments.JS_COMMENT_MATCHER_=/((\/\/.*$)|(\/\*[\s\S]*?\*\/)|(\s))/gm;ee.arguments.JS_PARAM_DECL_MATCHER_FUNCTION_=/^function[^\(]*\(([^\)]*)\)/m;ee.arguments.JS_PARAM_DECL_MATCHER_CLASS_CONSTRUCTOR_=/^class[^\{]*{\S*?\bconstructor\(([^\)]*)\)/m;ee.arguments.JS_PARAM_DECL_MATCHER_CLASS_METHOD_=/[^\(]*\(([^\)]*)\)/m;ee.arguments.JS_PARAM_DEFAULT_MATCHER_=/=.*$/;ee.Element=function(func,args,opt_varName){ee.ComputedObject.call(this,func,args,opt_varName);ee.Element.initialize();};goog.inherits(ee.Element,ee.ComputedObject);goog.exportSymbol("ee.Element",ee.Element);ee.Element.initialized_=!1;ee.Element.initialize=function(){ee.Element.initialized_||(ee.ApiFunction.importApi(ee.Element,"Element","Element"),ee.Element.initialized_=!0);};ee.Element.reset=function(){ee.ApiFunction.clearApi(ee.Element);ee.Element.initialized_=!1;};ee.Element.prototype.name=function(){return"Element";};ee.Element.prototype.set=function(var_args){if(1>=arguments.length){var properties=arguments[0];ee.Types.isRegularObject(properties)&&module$contents$goog$array_equals(module$contents$goog$object_getKeys(properties),["properties"])&&goog.isObject(properties.properties)&&(properties=properties.properties);if(ee.Types.isRegularObject(properties)){var result=this;for(var key in properties){var value=properties[key];result=ee.ApiFunction._call("Element.set",result,key,value);}}else{if(properties instanceof ee.ComputedObject&&ee.ApiFunction.lookupInternal("Element.setMulti")){result=ee.ApiFunction._call("Element.setMulti",this,properties);}else{throw Error("When Element.set() is passed one argument, it must be a dictionary.");}}}else{if(0!=arguments.length%2){throw Error("When Element.set() is passed multiple arguments, there must be an even number of them.");}result=this;for(var i=0;i<arguments.length;i+=2){key=arguments[i],value=arguments[i+1],result=ee.ApiFunction._call("Element.set",result,key,value);}}return this.castInternal(result);};goog.exportProperty(ee.Element.prototype,"set",ee.Element.prototype.set);ee.Geometry=function(geoJson,opt_proj,opt_geodesic,opt_evenOdd){if(!(this instanceof ee.Geometry)){return ee.ComputedObject.construct(ee.Geometry,arguments);}if(!("type"in geoJson)){var args=ee.arguments.extractFromFunction(ee.Geometry,arguments);geoJson=args.geoJson;opt_proj=args.proj;opt_geodesic=args.geodesic;opt_evenOdd=args.evenOdd;}ee.Geometry.initialize();var options=null!=opt_proj||null!=opt_geodesic||null!=opt_evenOdd;if(geoJson instanceof ee.ComputedObject&&!(geoJson instanceof ee.Geometry&&geoJson.type_)){if(options){throw Error("Setting the CRS, geodesic, or evenOdd flag on a computed Geometry is not supported. Use Geometry.transform().");}ee.ComputedObject.call(this,geoJson.func,geoJson.args,geoJson.varName);}else{geoJson instanceof ee.Geometry&&(geoJson=geoJson.encode());if(!ee.Geometry.isValidGeometry_(geoJson)){throw Error("Invalid GeoJSON geometry: "+JSON.stringify(geoJson));}ee.ComputedObject.call(this,null,null);this.type_=geoJson.type;this.coordinates_=null!=geoJson.coordinates?module$contents$goog$object_unsafeClone(geoJson.coordinates):null;this.geometries_=geoJson.geometries||null;if(null!=opt_proj){this.proj_=opt_proj;}else{if("crs"in geoJson){if(goog.isObject(geoJson.crs)&&"name"==geoJson.crs.type&&goog.isObject(geoJson.crs.properties)&&"string"===typeof geoJson.crs.properties.name){this.proj_=geoJson.crs.properties.name;}else{throw Error("Invalid CRS declaration in GeoJSON: "+new goog.json.Serializer().serialize(geoJson.crs));}}}this.geodesic_=opt_geodesic;void 0===this.geodesic_&&"geodesic"in geoJson&&(this.geodesic_=!!geoJson.geodesic);this.evenOdd_=opt_evenOdd;void 0===this.evenOdd_&&"evenOdd"in geoJson&&(this.evenOdd_=!!geoJson.evenOdd);}};goog.inherits(ee.Geometry,ee.ComputedObject);goog.exportSymbol("ee.Geometry",ee.Geometry);ee.Geometry.initialized_=!1;ee.Geometry.initialize=function(){ee.Geometry.initialized_||(ee.ApiFunction.importApi(ee.Geometry,"Geometry","Geometry"),ee.Geometry.initialized_=!0);};ee.Geometry.reset=function(){ee.ApiFunction.clearApi(ee.Geometry);ee.Geometry.initialized_=!1;};ee.Geometry.Point=function(coords,opt_proj){if(!(this instanceof ee.Geometry.Point)){return ee.Geometry.createInstance_(ee.Geometry.Point,arguments);}var init=ee.Geometry.construct_(ee.Geometry.Point,"Point",1,arguments);if(!(init instanceof ee.ComputedObject)){var xy=init.coordinates;if(!Array.isArray(xy)||2!=xy.length){throw Error("The Geometry.Point constructor requires 2 coordinates.");}}ee.Geometry.call(this,init);};goog.inherits(ee.Geometry.Point,ee.Geometry);goog.exportProperty(ee.Geometry,"Point",ee.Geometry.Point);ee.Geometry.MultiPoint=function(coords,opt_proj){if(!(this instanceof ee.Geometry.MultiPoint)){return ee.Geometry.createInstance_(ee.Geometry.MultiPoint,arguments);}ee.Geometry.call(this,ee.Geometry.construct_(ee.Geometry.MultiPoint,"MultiPoint",2,arguments));};goog.inherits(ee.Geometry.MultiPoint,ee.Geometry);goog.exportProperty(ee.Geometry,"MultiPoint",ee.Geometry.MultiPoint);ee.Geometry.Rectangle=function(coords,opt_proj,opt_geodesic,opt_evenOdd){if(!(this instanceof ee.Geometry.Rectangle)){return ee.Geometry.createInstance_(ee.Geometry.Rectangle,arguments);}var init=ee.Geometry.construct_(ee.Geometry.Rectangle,"Rectangle",2,arguments);if(!(init instanceof ee.ComputedObject)){var xy=init.coordinates;if(2!=xy.length){throw Error("The Geometry.Rectangle constructor requires 2 points or 4 coordinates.");}var x1=xy[0][0],y1=xy[0][1],x2=xy[1][0],y2=xy[1][1];init.coordinates=[[[x1,y2],[x1,y1],[x2,y1],[x2,y2]]];init.type="Polygon";}ee.Geometry.call(this,init);};goog.inherits(ee.Geometry.Rectangle,ee.Geometry);goog.exportProperty(ee.Geometry,"Rectangle",ee.Geometry.Rectangle);ee.Geometry.BBox=function(west,south,east,north){if(!(this instanceof ee.Geometry.BBox)){return ee.Geometry.createInstance_(ee.Geometry.BBox,arguments);}var coordinates=[west,south,east,north];if(ee.Geometry.hasServerValue_(coordinates)){return new ee.ApiFunction("GeometryConstructors.BBox").apply(coordinates);}if(!(Infinity>west)){throw Error("Geometry.BBox: west must not be "+west);}if(!(-Infinity<east)){throw Error("Geometry.BBox: east must not be "+east);}if(!(90>=south)){throw Error("Geometry.BBox: south must be at most +90\u00b0, but was "+south+"\u00b0");}if(!(-90<=north)){throw Error("Geometry.BBox: north must be at least -90\u00b0, but was "+north+"\u00b0");}south=Math.max(south,-90);north=Math.min(north,90);360<=east-west?(west=-180,east=180):(west=ee.Geometry.canonicalizeLongitude_(west),east=ee.Geometry.canonicalizeLongitude_(east),east<west&&(east+=360));ee.Geometry.call(this,{type:"Polygon",coordinates:[[[west,north],[west,south],[east,south],[east,north]]]},void 0,!1,!0);};goog.inherits(ee.Geometry.BBox,ee.Geometry.Rectangle);goog.exportProperty(ee.Geometry,"BBox",ee.Geometry.BBox);ee.Geometry.canonicalizeLongitude_=function(longitude){longitude%=360;180<longitude?longitude-=360:-180>longitude&&(longitude+=360);return longitude;};ee.Geometry.LineString=function(coords,opt_proj,opt_geodesic,opt_maxError){if(!(this instanceof ee.Geometry.LineString)){return ee.Geometry.createInstance_(ee.Geometry.LineString,arguments);}ee.Geometry.call(this,ee.Geometry.construct_(ee.Geometry.LineString,"LineString",2,arguments));};goog.inherits(ee.Geometry.LineString,ee.Geometry);goog.exportProperty(ee.Geometry,"LineString",ee.Geometry.LineString);ee.Geometry.LinearRing=function(coords,opt_proj,opt_geodesic,opt_maxError){if(!(this instanceof ee.Geometry.LinearRing)){return ee.Geometry.createInstance_(ee.Geometry.LinearRing,arguments);}ee.Geometry.call(this,ee.Geometry.construct_(ee.Geometry.LinearRing,"LinearRing",2,arguments));};goog.inherits(ee.Geometry.LinearRing,ee.Geometry);goog.exportProperty(ee.Geometry,"LinearRing",ee.Geometry.LinearRing);ee.Geometry.MultiLineString=function(coords,opt_proj,opt_geodesic,opt_maxError){if(!(this instanceof ee.Geometry.MultiLineString)){return ee.Geometry.createInstance_(ee.Geometry.MultiLineString,arguments);}ee.Geometry.call(this,ee.Geometry.construct_(ee.Geometry.MultiLineString,"MultiLineString",3,arguments));};goog.inherits(ee.Geometry.MultiLineString,ee.Geometry);goog.exportProperty(ee.Geometry,"MultiLineString",ee.Geometry.MultiLineString);ee.Geometry.Polygon=function(coords,opt_proj,opt_geodesic,opt_maxError,opt_evenOdd){if(!(this instanceof ee.Geometry.Polygon)){return ee.Geometry.createInstance_(ee.Geometry.Polygon,arguments);}ee.Geometry.call(this,ee.Geometry.construct_(ee.Geometry.Polygon,"Polygon",3,arguments));};goog.inherits(ee.Geometry.Polygon,ee.Geometry);goog.exportProperty(ee.Geometry,"Polygon",ee.Geometry.Polygon);ee.Geometry.MultiPolygon=function(coords,opt_proj,opt_geodesic,opt_maxError,opt_evenOdd){if(!(this instanceof ee.Geometry.MultiPolygon)){return ee.Geometry.createInstance_(ee.Geometry.MultiPolygon,arguments);}ee.Geometry.call(this,ee.Geometry.construct_(ee.Geometry.MultiPolygon,"MultiPolygon",4,arguments));};goog.inherits(ee.Geometry.MultiPolygon,ee.Geometry);goog.exportProperty(ee.Geometry,"MultiPolygon",ee.Geometry.MultiPolygon);ee.Geometry.prototype.encode=function(opt_encoder){if(!this.type_){if(!opt_encoder){throw Error("Must specify an encode function when encoding a computed geometry.");}return ee.ComputedObject.prototype.encode.call(this,opt_encoder);}var result={type:this.type_};"GeometryCollection"==this.type_?result.geometries=this.geometries_:result.coordinates=this.coordinates_;null!=this.proj_&&(result.crs={type:"name",properties:{name:this.proj_}});null!=this.geodesic_&&(result.geodesic=this.geodesic_);null!=this.evenOdd_&&(result.evenOdd=this.evenOdd_);return result;};ee.Geometry.prototype.toGeoJSON=function(){if(this.func){throw Error("Can't convert a computed Geometry to GeoJSON. Use evaluate() instead.");}return this.encode();};goog.exportProperty(ee.Geometry.prototype,"toGeoJSON",ee.Geometry.prototype.toGeoJSON);ee.Geometry.prototype.toGeoJSONString=function(){if(this.func){throw Error("Can't convert a computed Geometry to GeoJSON. Use evaluate() instead.");}return new goog.json.Serializer().serialize(this.toGeoJSON());};goog.exportProperty(ee.Geometry.prototype,"toGeoJSONString",ee.Geometry.prototype.toGeoJSONString);ee.Geometry.prototype.serialize=function(legacy){return(void 0===legacy?0:legacy)?ee.Serializer.toJSON(this):ee.Serializer.toCloudApiJSON(this);};goog.exportProperty(ee.Geometry.prototype,"serialize",ee.Geometry.prototype.serialize);ee.Geometry.prototype.toString=function(){return"ee.Geometry("+this.toGeoJSONString()+")";};ee.Geometry.prototype.encodeCloudValue=function(serializer){if(!this.type_){if(!serializer){throw Error("Must specify a serializer when encoding a computed geometry.");}return ee.ComputedObject.prototype.encodeCloudValue.call(this,serializer);}var args={},func="";"GeometryCollection"===this.type_?(args.geometries=this.geometries_.map(function(geometry){return new ee.Geometry(geometry);}),func="GeometryConstructors.MultiGeometry"):(args.coordinates=this.coordinates_,func="GeometryConstructors."+this.type_);null!=this.proj_&&(args.crs="string"===typeof this.proj_?new ee.ApiFunction("Projection").call(this.proj_):this.proj_);var acceptsGeodesicArg="Point"!==this.type_&&"MultiPoint"!==this.type_;null!=this.geodesic_&&acceptsGeodesicArg&&(args.geodesic=this.geodesic_);null!=this.evenOdd_&&(args.evenOdd=this.evenOdd_);return new ee.ApiFunction(func).apply(args).encodeCloudValue(serializer);};ee.Geometry.isValidGeometry_=function(geometry){var type=geometry.type;if("GeometryCollection"==type){var geometries=geometry.geometries;if(!Array.isArray(geometries)){return!1;}for(var i=0;i<geometries.length;i++){if(!ee.Geometry.isValidGeometry_(geometries[i])){return!1;}}return!0;}var coords=geometry.coordinates,nesting=ee.Geometry.isValidCoordinates_(coords);return"Point"==type&&1==nesting||"MultiPoint"==type&&(2==nesting||0==coords.length)||"LineString"==type&&2==nesting||"LinearRing"==type&&2==nesting||"MultiLineString"==type&&(3==nesting||0==coords.length)||"Polygon"==type&&3==nesting||"MultiPolygon"==type&&(4==nesting||0==coords.length);};ee.Geometry.isValidCoordinates_=function(shape){if(!Array.isArray(shape)){return-1;}if(Array.isArray(shape[0])){for(var count=ee.Geometry.isValidCoordinates_(shape[0]),i=1;i<shape.length;i++){if(ee.Geometry.isValidCoordinates_(shape[i])!=count){return-1;}}return count+1;}for(i=0;i<shape.length;i++){if("number"!==typeof shape[i]){return-1;}}return 0==shape.length%2?1:-1;};ee.Geometry.coordinatesToLine_=function(coordinates){if("number"!==typeof coordinates[0]||2==coordinates.length){return coordinates;}if(0!=coordinates.length%2){throw Error("Invalid number of coordinates: "+coordinates.length);}for(var line=[],i=0;i<coordinates.length;i+=2){line.push([coordinates[i],coordinates[i+1]]);}return line;};ee.Geometry.construct_=function(jsConstructorFn,apiConstructorName,depth,originalArgs){var eeArgs=ee.Geometry.getEeApiArgs_(jsConstructorFn,originalArgs);if(ee.Geometry.hasServerValue_(eeArgs.coordinates)||null!=eeArgs.crs||null!=eeArgs.maxError){return new ee.ApiFunction("GeometryConstructors."+apiConstructorName).apply(eeArgs);}eeArgs.type=apiConstructorName;eeArgs.coordinates=ee.Geometry.fixDepth_(depth,eeArgs.coordinates);var isPolygon=module$contents$goog$array_contains(["Polygon","Rectangle","MultiPolygon"],apiConstructorName);isPolygon&&null==eeArgs.evenOdd&&(eeArgs.evenOdd=!0);if(isPolygon&&!1===eeArgs.geodesic&&!1===eeArgs.evenOdd){throw Error("Planar interiors must be even/odd.");}return eeArgs;};ee.Geometry.getEeApiArgs_=function(jsConstructorFn,originalArgs){if(module$contents$goog$array_every(originalArgs,ee.Types.isNumber)){return{coordinates:module$contents$goog$array_toArray(originalArgs)};}var args=ee.arguments.extractFromFunction(jsConstructorFn,originalArgs);args.coordinates=args.coords;delete args.coords;args.crs=args.proj;delete args.proj;return module$contents$goog$object_filter(args,function(x){return null!=x;});};ee.Geometry.hasServerValue_=function(coordinates){return Array.isArray(coordinates)?module$contents$goog$array_some(coordinates,ee.Geometry.hasServerValue_):coordinates instanceof ee.ComputedObject;};ee.Geometry.fixDepth_=function(depth,coords){if(1>depth||4<depth){throw Error("Unexpected nesting level.");}module$contents$goog$array_every(coords,function(x){return"number"===typeof x;})&&(coords=ee.Geometry.coordinatesToLine_(coords));for(var item=coords,count=0;Array.isArray(item);){item=item[0],count++;}for(;count<depth;){coords=[coords],count++;}if(ee.Geometry.isValidCoordinates_(coords)!=depth){throw Error("Invalid geometry");}for(item=coords;Array.isArray(item)&&1==item.length;){item=item[0];}return Array.isArray(item)&&0==item.length?[]:coords;};ee.Geometry.createInstance_=function(klass,args){var f=function(){};f.prototype=klass.prototype;var instance=new f(),result=klass.apply(instance,args);return void 0!==result?result:instance;};ee.Geometry.prototype.name=function(){return"Geometry";};ee.Filter=function(opt_filter){if(!(this instanceof ee.Filter)){return ee.ComputedObject.construct(ee.Filter,arguments);}if(opt_filter instanceof ee.Filter){return opt_filter;}ee.Filter.initialize();if(Array.isArray(opt_filter)){if(0==opt_filter.length){throw Error("Empty list specified for ee.Filter().");}if(1==opt_filter.length){return new ee.Filter(opt_filter[0]);}ee.ComputedObject.call(this,new ee.ApiFunction("Filter.and"),{filters:opt_filter});this.filter_=opt_filter;}else{if(opt_filter instanceof ee.ComputedObject){ee.ComputedObject.call(this,opt_filter.func,opt_filter.args,opt_filter.varName),this.filter_=[opt_filter];}else{if(void 0===opt_filter){ee.ComputedObject.call(this,null,null),this.filter_=[];}else{throw Error("Invalid argument specified for ee.Filter(): "+opt_filter);}}}};goog.inherits(ee.Filter,ee.ComputedObject);goog.exportSymbol("ee.Filter",ee.Filter);ee.Filter.initialized_=!1;ee.Filter.initialize=function(){ee.Filter.initialized_||(ee.ApiFunction.importApi(ee.Filter,"Filter","Filter"),ee.Filter.initialized_=!0);};ee.Filter.reset=function(){ee.ApiFunction.clearApi(ee.Filter);ee.Filter.initialized_=!1;};ee.Filter.functionNames_={equals:"equals",less_than:"lessThan",greater_than:"greaterThan",contains:"stringContains",starts_with:"stringStartsWith",ends_with:"stringEndsWith"};ee.Filter.prototype.append_=function(newFilter){var prev=this.filter_.slice(0);newFilter instanceof ee.Filter?module$contents$goog$array_extend(prev,newFilter.filter_):newFilter instanceof Array?module$contents$goog$array_extend(prev,newFilter):prev.push(newFilter);return new ee.Filter(prev);};ee.Filter.prototype.not=function(){return ee.ApiFunction._call("Filter.not",this);};goog.exportProperty(ee.Filter.prototype,"not",ee.Filter.prototype.not);ee.Filter.eq=function(name,value){var args=ee.arguments.extractFromFunction(ee.Filter.eq,arguments);return ee.ApiFunction._call("Filter.equals",args.name,args.value);};goog.exportProperty(ee.Filter,"eq",ee.Filter.eq);ee.Filter.neq=function(name,value){var args=ee.arguments.extractFromFunction(ee.Filter.neq,arguments);return ee.Filter.eq(args.name,args.value).not();};goog.exportProperty(ee.Filter,"neq",ee.Filter.neq);ee.Filter.lt=function(name,value){var args=ee.arguments.extractFromFunction(ee.Filter.lt,arguments);return ee.ApiFunction._call("Filter.lessThan",args.name,args.value);};goog.exportProperty(ee.Filter,"lt",ee.Filter.lt);ee.Filter.gte=function(name,value){var args=ee.arguments.extractFromFunction(ee.Filter.gte,arguments);return ee.Filter.lt(args.name,args.value).not();};goog.exportProperty(ee.Filter,"gte",ee.Filter.gte);ee.Filter.gt=function(name,value){var args=ee.arguments.extractFromFunction(ee.Filter.gt,arguments);return ee.ApiFunction._call("Filter.greaterThan",args.name,args.value);};goog.exportProperty(ee.Filter,"gt",ee.Filter.gt);ee.Filter.lte=function(name,value){var args=ee.arguments.extractFromFunction(ee.Filter.lte,arguments);return ee.Filter.gt(args.name,args.value).not();};goog.exportProperty(ee.Filter,"lte",ee.Filter.lte);ee.Filter.and=function(var_args){var args=Array.prototype.slice.call(arguments);return ee.ApiFunction._call("Filter.and",args);};goog.exportProperty(ee.Filter,"and",ee.Filter.and);ee.Filter.or=function(var_args){var args=Array.prototype.slice.call(arguments);return ee.ApiFunction._call("Filter.or",args);};goog.exportProperty(ee.Filter,"or",ee.Filter.or);ee.Filter.date=function(start,opt_end){var args=ee.arguments.extractFromFunction(ee.Filter.date,arguments),range=ee.ApiFunction._call("DateRange",args.start,args.end);return ee.ApiFunction._apply("Filter.dateRangeContains",{leftValue:range,rightField:"system:time_start"});};goog.exportProperty(ee.Filter,"date",ee.Filter.date);ee.Filter.inList=function(opt_leftField,opt_rightValue,opt_rightField,opt_leftValue){var args=ee.arguments.extractFromFunction(ee.Filter.inList,arguments);return ee.ApiFunction._apply("Filter.listContains",{leftField:args.rightField,rightValue:args.leftValue,rightField:args.leftField,leftValue:args.rightValue});};goog.exportProperty(ee.Filter,"inList",ee.Filter.inList);ee.Filter.bounds=function(geometry,opt_errorMargin){return ee.ApiFunction._apply("Filter.intersects",{leftField:".all",rightValue:ee.ApiFunction._call("Feature",geometry),maxError:opt_errorMargin});};goog.exportProperty(ee.Filter,"bounds",ee.Filter.bounds);ee.Filter.prototype.name=function(){return"Filter";};ee.Filter.metadata=function(name,operator,value){operator=operator.toLowerCase();var negated=!1;goog.string.startsWith(operator,"not_")&&(negated=!0,operator=operator.substring(4));if(!(operator in ee.Filter.functionNames_)){throw Error("Unknown filtering operator: "+operator);}var filter=ee.ApiFunction._call("Filter."+ee.Filter.functionNames_[operator],name,value);return negated?filter.not():filter;};goog.exportProperty(ee.Filter,"metadata",ee.Filter.metadata);ee.Collection=function(func,args,opt_varName){ee.Element.call(this,func,args,opt_varName);ee.Collection.initialize();};goog.inherits(ee.Collection,ee.Element);goog.exportSymbol("ee.Collection",ee.Collection);ee.Collection.initialized_=!1;ee.Collection.initialize=function(){ee.Collection.initialized_||(ee.ApiFunction.importApi(ee.Collection,"Collection","Collection"),ee.ApiFunction.importApi(ee.Collection,"AggregateFeatureCollection","Collection","aggregate_"),ee.Collection.initialized_=!0);};ee.Collection.reset=function(){ee.ApiFunction.clearApi(ee.Collection);ee.Collection.initialized_=!1;};ee.Collection.prototype.filter=function(filter){filter=ee.arguments.extractFromFunction(ee.Collection.prototype.filter,arguments).filter;if(!filter){throw Error("Empty filters.");}return this.castInternal(ee.ApiFunction._call("Collection.filter",this,filter));};goog.exportProperty(ee.Collection.prototype,"filter",ee.Collection.prototype.filter);ee.Collection.prototype.filterMetadata=function(name,operator,value){var args=ee.arguments.extractFromFunction(ee.Collection.prototype.filterMetadata,arguments);return this.filter(ee.Filter.metadata(args.name,args.operator,args.value));};goog.exportProperty(ee.Collection.prototype,"filterMetadata",ee.Collection.prototype.filterMetadata);ee.Collection.prototype.filterBounds=function(geometry){return this.filter(ee.Filter.bounds(geometry));};goog.exportProperty(ee.Collection.prototype,"filterBounds",ee.Collection.prototype.filterBounds);ee.Collection.prototype.filterDate=function(start,opt_end){var args=ee.arguments.extractFromFunction(ee.Collection.prototype.filterDate,arguments);return this.filter(ee.Filter.date(args.start,args.end));};goog.exportProperty(ee.Collection.prototype,"filterDate",ee.Collection.prototype.filterDate);ee.Collection.prototype.limit=function(max,opt_property,opt_ascending){var args=ee.arguments.extractFromFunction(ee.Collection.prototype.limit,arguments);return this.castInternal(ee.ApiFunction._call("Collection.limit",this,args.max,args.property,args.ascending));};goog.exportProperty(ee.Collection.prototype,"limit",ee.Collection.prototype.limit);ee.Collection.prototype.sort=function(property,opt_ascending){var args=ee.arguments.extractFromFunction(ee.Collection.prototype.sort,arguments);return this.castInternal(ee.ApiFunction._call("Collection.limit",this,void 0,args.property,args.ascending));};goog.exportProperty(ee.Collection.prototype,"sort",ee.Collection.prototype.sort);ee.Collection.prototype.name=function(){return"Collection";};ee.Collection.prototype.elementType=function(){return ee.Element;};ee.Collection.prototype.map=function(algorithm,opt_dropNulls){var elementType=this.elementType();return this.castInternal(ee.ApiFunction._call("Collection.map",this,function(e){return algorithm(new elementType(e));},opt_dropNulls));};goog.exportProperty(ee.Collection.prototype,"map",ee.Collection.prototype.map);ee.Collection.prototype.iterate=function(algorithm,opt_first){var first=void 0!==opt_first?opt_first:null,elementType=this.elementType();return ee.ApiFunction._call("Collection.iterate",this,function(e,p){return algorithm(new elementType(e),p);},first);};goog.exportProperty(ee.Collection.prototype,"iterate",ee.Collection.prototype.iterate);ee.Feature=function(geometry,opt_properties){if(!(this instanceof ee.Feature)){return ee.ComputedObject.construct(ee.Feature,arguments);}if(geometry instanceof ee.Feature){if(opt_properties){throw Error("Can't create Feature out of a Feature and properties.");}return geometry;}if(2<arguments.length){throw Error("The Feature constructor takes at most 2 arguments ("+arguments.length+" given)");}ee.Feature.initialize();if(geometry instanceof ee.Geometry||null===geometry){ee.Element.call(this,new ee.ApiFunction("Feature"),{geometry:geometry,metadata:opt_properties||null});}else{if(geometry instanceof ee.ComputedObject){ee.Element.call(this,geometry.func,geometry.args,geometry.varName);}else{if("Feature"==geometry.type){var properties=geometry.properties||{};if("id"in geometry){if("system:index"in properties){throw Error('Can\'t specify both "id" and "system:index".');}properties=module$contents$goog$object_clone(properties);properties["system:index"]=geometry.id;}ee.Element.call(this,new ee.ApiFunction("Feature"),{geometry:new ee.Geometry(geometry.geometry),metadata:properties});}else{ee.Element.call(this,new ee.ApiFunction("Feature"),{geometry:new ee.Geometry(geometry),metadata:opt_properties||null});}}}};goog.inherits(ee.Feature,ee.Element);goog.exportSymbol("ee.Feature",ee.Feature);ee.Feature.initialized_=!1;ee.Feature.initialize=function(){ee.Feature.initialized_||(ee.ApiFunction.importApi(ee.Feature,"Feature","Feature"),ee.Feature.initialized_=!0);};ee.Feature.reset=function(){ee.ApiFunction.clearApi(ee.Feature);ee.Feature.initialized_=!1;};ee.Feature.prototype.getInfo=function(opt_callback){return ee.Feature.superClass_.getInfo.call(this,opt_callback);};goog.exportProperty(ee.Feature.prototype,"getInfo",ee.Feature.prototype.getInfo);ee.Feature.prototype.getMap=function(opt_visParams,opt_callback){var args=ee.arguments.extractFromFunction(ee.Feature.prototype.getMap,arguments);return ee.ApiFunction._call("Collection",[this]).getMap(args.visParams,args.callback);};goog.exportProperty(ee.Feature.prototype,"getMap",ee.Feature.prototype.getMap);ee.Feature.prototype.name=function(){return"Feature";};ee.data.images={};ee.data.images.applyTransformsToImage=function(taskConfig){var resultParams={},image=ee.data.images.applyCrsAndTransform(taskConfig.element,taskConfig);image=ee.data.images.applySelectionAndScale(image,taskConfig,resultParams);resultParams.element=image;return resultParams;};ee.data.images.applyTransformsToCollection=function(taskConfig){var resultParams={},collection=taskConfig.element.map(function(image){var projected=ee.data.images.applyCrsAndTransform(image,taskConfig);return ee.data.images.applySelectionAndScale(projected,taskConfig,resultParams);});resultParams.element=collection;return resultParams;};ee.data.images.applySelectionAndScale=function(image,params,outParams){var clipParams={},dimensions_consumed=!1,SCALING_KEYS=["maxDimension","width","height","scale"];module$contents$goog$object_forEach(params,function(value,key){if(null!=value){switch(key){case"dimensions":var dims="string"===typeof value?value.split("x").map(Number):Array.isArray(value)?value:"number"===typeof value?[value]:[];if(1===dims.length){clipParams.maxDimension=dims[0];}else{if(2===dims.length){clipParams.width=dims[0],clipParams.height=dims[1];}else{throw Error("Invalid dimensions "+value);}}break;case"dimensions_consumed":dimensions_consumed=!0;break;case"bbox":null!=clipParams.geometry&&console.warn("Multiple request parameters converted to region.");clipParams.geometry=ee.data.images.bboxToGeometry(value);break;case"region":null!=clipParams.geometry&&console.warn("Multiple request parameters converted to region.");clipParams.geometry=ee.data.images.regionToGeometry(value);break;case"scale":clipParams.scale=Number(value);break;default:outParams[key]=value;}}});module$contents$goog$object_isEmpty(clipParams)||(clipParams.input=image,image=SCALING_KEYS.some(function(key){return key in clipParams;})||dimensions_consumed?ee.ApiFunction._apply("Image.clipToBoundsAndScale",clipParams):ee.ApiFunction._apply("Image.clip",clipParams));return image;};ee.data.images.bboxToGeometry=function(bbox){if(bbox instanceof ee.Geometry.Rectangle){return bbox;}var bboxArray=bbox;if("string"===typeof bbox){try{bboxArray=JSON.parse(bbox);}catch($jscomp$unused$catch){bboxArray=bbox.split(/\s*,\s*/).map(Number);}}if(Array.isArray(bboxArray)){if(bboxArray.some(isNaN)){throw Error("Invalid bbox `{bboxArray}`, please specify a list of numbers.");}return new ee.Geometry.Rectangle(bboxArray,null,!1);}throw Error('Invalid bbox "{bbox}" type, must be of type Array<number>');};ee.data.images.regionToGeometry=function(region){if(region instanceof ee.Geometry){return region;}var regionObject=region;if("string"===typeof region){try{regionObject=JSON.parse(region);}catch(e){throw Error('Region string "'+region+'" is not valid GeoJSON.');}}if(Array.isArray(regionObject)){return new ee.Geometry.Polygon(regionObject,null,!1);}if(goog.isObject(regionObject)){return new ee.Geometry(regionObject,null,!1);}throw Error("Region {region} was not convertible to an ee.Geometry.");};ee.data.images.applyCrsAndTransform=function(image,params){var crs=params.crs||"",crsTransform=params.crsTransform||params.crs_transform;null!=crsTransform&&(crsTransform=ee.data.images.maybeConvertCrsTransformToArray_(crsTransform));if(!crs&&!crsTransform){return image;}if(crsTransform&&!crs){throw Error('Must specify "crs" if "crsTransform" is specified.');}if(crsTransform){if(image=ee.ApiFunction._apply("Image.reproject",{image:image,crs:crs,crsTransform:crsTransform}),null!=params.dimensions&&null==params.scale&&null==params.region){var dimensions=params.dimensions;"string"===typeof dimensions&&(dimensions=dimensions.split("x").map(Number));if(2===dimensions.length){delete params.dimensions;params.dimensions_consumed=!0;var projection=new ee.ApiFunction("Projection").call(crs,crsTransform);params.region=new ee.Geometry.Rectangle([0,0,dimensions[0],dimensions[1]],projection,!1);}}}else{image=ee.ApiFunction._apply("Image.setDefaultProjection",{image:image,crs:crs,crsTransform:[1,0,0,0,-1,0]});}return image;};ee.data.images.maybeConvertCrsTransformToArray_=function(crsTransform){var transformArray=crsTransform;if("string"===typeof transformArray){try{transformArray=JSON.parse(transformArray);}catch(e){}}if(Array.isArray(transformArray)){if(6===transformArray.length&&module$contents$goog$array_every(transformArray,function(x){return"number"===typeof x;})){return transformArray;}throw Error("Invalid argument, crs transform must be a list of 6 numbers.");}throw Error("Invalid argument, crs transform was not a string or array.");};ee.data.images.applyVisualization=function(image,params){var request={},visParams=ee.data.images.extractVisParams(params,request);module$contents$goog$object_isEmpty(visParams)||(visParams.image=image,image=ee.ApiFunction._apply("Image.visualize",visParams));request.image=image;return request;};ee.data.images.extractVisParams=function(params,outParams){var keysToExtract="bands gain bias min max gamma palette opacity forceRgbOutput".split(" "),visParams={};module$contents$goog$object_forEach(params,function(value,key){module$contents$goog$array_contains(keysToExtract,key)?visParams[key]=value:outParams[key]=value;});return visParams;};ee.data.images.buildDownloadIdImage=function(image,params){params=Object.assign({},params);var extractAndValidateTransforms=function(obj){var extracted={};["crs","crs_transform","dimensions","region"].forEach(function(key){key in obj&&(extracted[key]=obj[key]);});null!=obj.scale&&null==obj.dimensions&&(extracted.scale=obj.scale);return extracted;},buildImagePerBand=function(band){var bandId=band.id;if(void 0===bandId){throw Error("Each band dictionary must have an id.");}var bandImage=image.select(bandId),copyParams=extractAndValidateTransforms(params),bandParams=extractAndValidateTransforms(band);bandParams=extractAndValidateTransforms(Object.assign(copyParams,bandParams));bandImage=ee.data.images.applyCrsAndTransform(bandImage,bandParams);return bandImage=ee.data.images.applySelectionAndScale(bandImage,bandParams,{});};if("ZIPPED_GEO_TIFF_PER_BAND"===params.format&¶ms.bands&¶ms.bands.length){var images=params.bands.map(buildImagePerBand);image=images.reduce(function(result,bandImage){return ee.ApiFunction._call("Image.addBands",result,bandImage,null,!0);},images.shift());}else{var copyParams=extractAndValidateTransforms(params);image=ee.data.images.applyCrsAndTransform(image,copyParams);image=ee.data.images.applySelectionAndScale(image,copyParams,{});}return image;};ee.Image=function(opt_args){if(!(this instanceof ee.Image)){return ee.ComputedObject.construct(ee.Image,arguments);}if(opt_args instanceof ee.Image){return opt_args;}ee.Image.initialize();var argCount=arguments.length;if(0==argCount||1==argCount&&void 0===opt_args){ee.Element.call(this,new ee.ApiFunction("Image.mask"),{image:new ee.Image(0),mask:new ee.Image(0)});}else{if(1==argCount){if(ee.Types.isNumber(opt_args)){ee.Element.call(this,new ee.ApiFunction("Image.constant"),{value:opt_args});}else{if(ee.Types.isString(opt_args)){ee.Element.call(this,new ee.ApiFunction("Image.load"),{id:opt_args});}else{if(Array.isArray(opt_args)){return ee.Image.combine_(module$contents$goog$array_map(opt_args,function(elem){return new ee.Image(elem);}));}if(opt_args instanceof ee.ComputedObject){"Array"==opt_args.name()?ee.Element.call(this,new ee.ApiFunction("Image.constant"),{value:opt_args}):ee.Element.call(this,opt_args.func,opt_args.args,opt_args.varName);}else{throw Error("Unrecognized argument type to convert to an Image: "+opt_args);}}}}else{if(2==argCount){var id=arguments[0],version=arguments[1];if(ee.Types.isString(id)&&ee.Types.isNumber(version)){ee.Element.call(this,new ee.ApiFunction("Image.load"),{id:id,version:version});}else{throw Error("Unrecognized argument types to convert to an Image: "+arguments);}}else{throw Error("The Image constructor takes at most 2 arguments ("+argCount+" given)");}}}};goog.inherits(ee.Image,ee.Element);goog.exportSymbol("ee.Image",ee.Image);ee.Image.initialized_=!1;ee.Image.initialize=function(){ee.Image.initialized_||(ee.ApiFunction.importApi(ee.Image,"Image","Image"),ee.Image.initialized_=!0);};ee.Image.reset=function(){ee.ApiFunction.clearApi(ee.Image);ee.Image.initialized_=!1;};ee.Image.prototype.getInfo=function(opt_callback){return ee.Image.superClass_.getInfo.call(this,opt_callback);};goog.exportProperty(ee.Image.prototype,"getInfo",ee.Image.prototype.getInfo);ee.Image.prototype.getMap=function(opt_visParams,opt_callback){var $jscomp$this=this,args=ee.arguments.extractFromFunction(ee.Image.prototype.getMap,arguments),request=ee.data.images.applyVisualization(this,args.visParams);if(args.callback){var callback=args.callback;ee.data.getMapId(request,function(data,error){var mapId=data?Object.assign(data,{image:$jscomp$this}):void 0;callback(mapId,error);});}else{var response=ee.data.getMapId(request);response.image=this;return response;}};goog.exportProperty(ee.Image.prototype,"getMap",ee.Image.prototype.getMap);ee.Image.prototype.getDownloadURL=function(params,opt_callback){var args=ee.arguments.extractFromFunction(ee.Image.prototype.getDownloadURL,arguments),request=args.params?module$contents$goog$object_clone(args.params):{};request.image=this;if(args.callback){var callback=args.callback;ee.data.getDownloadId(request,function(downloadId,error){downloadId?callback(ee.data.makeDownloadUrl(downloadId)):callback(null,error);});}else{return ee.data.makeDownloadUrl(ee.data.getDownloadId(request));}};goog.exportProperty(ee.Image.prototype,"getDownloadURL",ee.Image.prototype.getDownloadURL);ee.Image.prototype.getThumbId=function(params,opt_callback){var args=ee.arguments.extractFromFunction(ee.Image.prototype.getDownloadURL,arguments),request=args.params?module$contents$goog$object_clone(args.params):{},extra={},image=ee.data.images.applyCrsAndTransform(this,request);image=ee.data.images.applySelectionAndScale(image,request,extra);request=ee.data.images.applyVisualization(image,extra);return args.callback?(ee.data.getThumbId(request,args.callback),null):ee.data.getThumbId(request);};goog.exportProperty(ee.Image.prototype,"getThumbId",ee.Image.prototype.getThumbId);ee.Image.prototype.getThumbURL=function(params,opt_callback){var args=ee.arguments.extractFromFunction(ee.Image.prototype.getThumbURL,arguments);if(args.callback){this.getThumbId(args.params,function(thumbId,opt_error){var thumbUrl="";if(void 0===opt_error){try{thumbUrl=ee.data.makeThumbUrl(thumbId);}catch(e){opt_error=String(e.message);}}args.callback(thumbUrl,opt_error);});}else{return ee.data.makeThumbUrl(this.getThumbId(args.params));}};goog.exportProperty(ee.Image.prototype,"getThumbURL",ee.Image.prototype.getThumbURL);ee.Image.rgb=function(r,g,b){var args=ee.arguments.extractFromFunction(ee.Image.rgb,arguments);return ee.Image.combine_([args.r,args.g,args.b],["vis-red","vis-green","vis-blue"]);};goog.exportProperty(ee.Image,"rgb",ee.Image.rgb);ee.Image.cat=function(var_args){var args=Array.prototype.slice.call(arguments);return ee.Image.combine_(args,null);};goog.exportProperty(ee.Image,"cat",ee.Image.cat);ee.Image.combine_=function(images,opt_names){if(0==images.length){return ee.ApiFunction._call("Image.constant",[]);}for(var result=new ee.Image(images[0]),i=1;i<images.length;i++){result=ee.ApiFunction._call("Image.addBands",result,images[i]);}opt_names&&(result=result.select([".*"],opt_names));return result;};ee.Image.prototype.select=function(var_args){var args=Array.prototype.slice.call(arguments),algorithmArgs={input:this,bandSelectors:args[0]||[]};if(2<args.length||ee.Types.isString(args[0])||ee.Types.isNumber(args[0])){for(var i=0;i<args.length;i++){if(!(ee.Types.isString(args[i])||ee.Types.isNumber(args[i])||args[i]instanceof ee.ComputedObject)){throw Error("Illegal argument to select(): "+args[i]);}}algorithmArgs.bandSelectors=args;}else{args[1]&&(algorithmArgs.newNames=args[1]);}return ee.ApiFunction._apply("Image.select",algorithmArgs);};goog.exportProperty(ee.Image.prototype,"select",ee.Image.prototype.select);ee.Image.prototype.expression=function(expression,opt_map){var originalArgs=ee.arguments.extractFromFunction(ee.Image.prototype.expression,arguments),vars=["DEFAULT_EXPRESSION_IMAGE"],eeArgs={DEFAULT_EXPRESSION_IMAGE:this};if(originalArgs.map){var map=originalArgs.map,name$jscomp$0;for(name$jscomp$0 in map){vars.push(name$jscomp$0),eeArgs[name$jscomp$0]=new ee.Image(map[name$jscomp$0]);}}var body=ee.ApiFunction._call("Image.parseExpression",originalArgs.expression,"DEFAULT_EXPRESSION_IMAGE",vars),func=new ee.Function();func.encode=function(encoder){return body.encode(encoder);};func.encodeCloudInvocation=function(serializer,args){return ee.rpc_node.functionByReference(serializer.makeReference(body),args);};func.getSignature=function(){return{name:"",args:module$contents$goog$array_map(vars,function(name){return{name:name,type:"Image",optional:!1};},this),returns:"Image"};};return func.apply(eeArgs);};goog.exportProperty(ee.Image.prototype,"expression",ee.Image.prototype.expression);ee.Image.prototype.clip=function(geometry){try{geometry=new ee.Geometry(geometry);}catch(e){}return ee.ApiFunction._call("Image.clip",this,geometry);};goog.exportProperty(ee.Image.prototype,"clip",ee.Image.prototype.clip);ee.Image.prototype.rename=function(var_args){var names=1!=arguments.length||ee.Types.isString(arguments[0])?Array.from(arguments):arguments[0];return ee.ApiFunction._call("Image.rename",this,names);};goog.exportProperty(ee.Image.prototype,"rename",ee.Image.prototype.rename);ee.Image.prototype.name=function(){return"Image";};ee.List=function(list){if(this instanceof ee.List){if(1<arguments.length){throw Error("ee.List() only accepts 1 argument.");}if(list instanceof ee.List){return list;}}else{return ee.ComputedObject.construct(ee.List,arguments);}ee.List.initialize();if(Array.isArray(list)){ee.ComputedObject.call(this,null,null),this.list_=list;}else{if(list instanceof ee.ComputedObject){ee.ComputedObject.call(this,list.func,list.args,list.varName),this.list_=null;}else{throw Error("Invalid argument specified for ee.List(): "+list);}}};goog.inherits(ee.List,ee.ComputedObject);goog.exportSymbol("ee.List",ee.List);ee.List.initialized_=!1;ee.List.initialize=function(){ee.List.initialized_||(ee.ApiFunction.importApi(ee.List,"List","List"),ee.List.initialized_=!0);};ee.List.reset=function(){ee.ApiFunction.clearApi(ee.List);ee.List.initialized_=!1;};ee.List.prototype.encode=function(encoder){return Array.isArray(this.list_)?module$contents$goog$array_map(this.list_,function(elem){return encoder(elem);}):ee.List.superClass_.encode.call(this,encoder);};ee.List.prototype.encodeCloudValue=function(serializer){return Array.isArray(this.list_)?ee.rpc_node.reference(serializer.makeReference(this.list_)):ee.List.superClass_.encodeCloudValue.call(this,serializer);};ee.List.prototype.name=function(){return"List";};ee.FeatureCollection=function(args,opt_column){if(!(this instanceof ee.FeatureCollection)){return ee.ComputedObject.construct(ee.FeatureCollection,arguments);}if(args instanceof ee.FeatureCollection){return args;}if(2<arguments.length){throw Error("The FeatureCollection constructor takes at most 2 arguments ("+arguments.length+" given)");}ee.FeatureCollection.initialize();args instanceof ee.Geometry&&(args=new ee.Feature(args));args instanceof ee.Feature&&(args=[args]);if(ee.Types.isString(args)){var actualArgs={tableId:args};opt_column&&(actualArgs.geometryColumn=opt_column);ee.Collection.call(this,new ee.ApiFunction("Collection.loadTable"),actualArgs);}else{if(Array.isArray(args)){ee.Collection.call(this,new ee.ApiFunction("Collection"),{features:module$contents$goog$array_map(args,function(elem){return new ee.Feature(elem);})});}else{if(args instanceof ee.List){ee.Collection.call(this,new ee.ApiFunction("Collection"),{features:args});}else{if(args&&"object"===typeof args&&"FeatureCollection"===args.type){ee.Collection.call(this,new ee.ApiFunction("Collection"),{features:args.features.map(function(f){return new ee.Feature(f);})});}else{if(args instanceof ee.ComputedObject){ee.Collection.call(this,args.func,args.args,args.varName);}else{throw Error("Unrecognized argument type to convert to a FeatureCollection: "+args);}}}}}};goog.inherits(ee.FeatureCollection,ee.Collection);goog.exportSymbol("ee.FeatureCollection",ee.FeatureCollection);ee.FeatureCollection.initialized_=!1;ee.FeatureCollection.initialize=function(){ee.FeatureCollection.initialized_||(ee.ApiFunction.importApi(ee.FeatureCollection,"FeatureCollection","FeatureCollection"),ee.FeatureCollection.initialized_=!0);};ee.FeatureCollection.reset=function(){ee.ApiFunction.clearApi(ee.FeatureCollection);ee.FeatureCollection.initialized_=!1;};ee.FeatureCollection.prototype.getMap=function(opt_visParams,opt_callback){var args=ee.arguments.extractFromFunction(ee.FeatureCollection.prototype.getMap,arguments),painted=ee.ApiFunction._apply("Collection.draw",{collection:this,color:(args.visParams||{}).color||"000000"});if(args.callback){painted.getMap(void 0,args.callback);}else{return painted.getMap();}};goog.exportProperty(ee.FeatureCollection.prototype,"getMap",ee.FeatureCollection.prototype.getMap);ee.FeatureCollection.prototype.getInfo=function(opt_callback){return ee.FeatureCollection.superClass_.getInfo.call(this,opt_callback);};goog.exportProperty(ee.FeatureCollection.prototype,"getInfo",ee.FeatureCollection.prototype.getInfo);ee.FeatureCollection.prototype.getDownloadURL=function(opt_format,opt_selectors,opt_filename,opt_callback){var args=ee.arguments.extractFromFunction(ee.FeatureCollection.prototype.getDownloadURL,arguments),request={table:this};args.format&&(request.format=args.format.toUpperCase());args.filename&&(request.filename=args.filename);args.selectors&&(request.selectors=args.selectors);if(args.callback){ee.data.getTableDownloadId(request,function(downloadId,error){downloadId?args.callback(ee.data.makeTableDownloadUrl(downloadId)):args.callback(null,error);});}else{return ee.data.makeTableDownloadUrl(ee.data.getTableDownloadId(request));}};goog.exportProperty(ee.FeatureCollection.prototype,"getDownloadURL",ee.FeatureCollection.prototype.getDownloadURL);ee.FeatureCollection.prototype.select=function(propertySelectors,opt_newProperties,opt_retainGeometry){if(ee.Types.isString(propertySelectors)){var varargs=Array.prototype.slice.call(arguments);return this.map(function(feature){return feature.select(varargs);});}var args=ee.arguments.extractFromFunction(ee.FeatureCollection.prototype.select,arguments);return this.map(function(feature){return feature.select(args);});};goog.exportProperty(ee.FeatureCollection.prototype,"select",ee.FeatureCollection.prototype.select);ee.FeatureCollection.prototype.name=function(){return"FeatureCollection";};ee.FeatureCollection.prototype.elementType=function(){return ee.Feature;};ee.ImageCollection=function(args){if(!(this instanceof ee.ImageCollection)){return ee.ComputedObject.construct(ee.ImageCollection,arguments);}if(args instanceof ee.ImageCollection){return args;}if(1!=arguments.length){throw Error("The ImageCollection constructor takes exactly 1 argument ("+arguments.length+" given)");}ee.ImageCollection.initialize();args instanceof ee.Image&&(args=[args]);if(ee.Types.isString(args)){ee.Collection.call(this,new ee.ApiFunction("ImageCollection.load"),{id:args});}else{if(Array.isArray(args)){ee.Collection.call(this,new ee.ApiFunction("ImageCollection.fromImages"),{images:module$contents$goog$array_map(args,function(elem){return new ee.Image(elem);})});}else{if(args instanceof ee.List){ee.Collection.call(this,new ee.ApiFunction("ImageCollection.fromImages"),{images:args});}else{if(args instanceof ee.ComputedObject){ee.Collection.call(this,args.func,args.args,args.varName);}else{throw Error("Unrecognized argument type to convert to an ImageCollection: "+args);}}}}};goog.inherits(ee.ImageCollection,ee.Collection);goog.exportSymbol("ee.ImageCollection",ee.ImageCollection);ee.ImageCollection.initialized_=!1;ee.ImageCollection.initialize=function(){ee.ImageCollection.initialized_||(ee.ApiFunction.importApi(ee.ImageCollection,"ImageCollection","ImageCollection"),ee.ApiFunction.importApi(ee.ImageCollection,"reduce","ImageCollection"),ee.ImageCollection.initialized_=!0);};ee.ImageCollection.reset=function(){ee.ApiFunction.clearApi(ee.ImageCollection);ee.ImageCollection.initialized_=!1;};ee.ImageCollection.prototype.getFilmstripThumbURL=function(params,opt_callback){var args=ee.arguments.extractFromFunction(ee.ImageCollection.prototype.getFilmstripThumbURL,arguments);return ee.ImageCollection.prototype.getThumbURL_(this,args,["png","jpg","jpeg"],ee.ImageCollection.ThumbTypes.FILMSTRIP,opt_callback);};goog.exportProperty(ee.ImageCollection.prototype,"getFilmstripThumbURL",ee.ImageCollection.prototype.getFilmstripThumbURL);ee.ImageCollection.prototype.getVideoThumbURL=function(params,opt_callback){var args=ee.arguments.extractFromFunction(ee.ImageCollection.prototype.getVideoThumbURL,arguments);return ee.ImageCollection.prototype.getThumbURL_(this,args,["gif"],ee.ImageCollection.ThumbTypes.VIDEO,opt_callback);};goog.exportProperty(ee.ImageCollection.prototype,"getVideoThumbURL",ee.ImageCollection.prototype.getVideoThumbURL);ee.ImageCollection.ThumbTypes={FILMSTRIP:"filmstrip",VIDEO:"video",IMAGE:"image"};ee.ImageCollection.prototype.getThumbURL_=function(collection,args,validFormats,opt_thumbType,opt_callback){var extraParams={},clippedCollection=collection.map(function(image){var projected=ee.data.images.applyCrsAndTransform(image,args.params);return ee.data.images.applySelectionAndScale(projected,args.params,extraParams);}),request={},visParams=ee.data.images.extractVisParams(extraParams,request);request.imageCollection=clippedCollection.map(function(image){visParams.image=image;return ee.ApiFunction._apply("Image.visualize",visParams);});null!=args.params.dimensions&&(request.dimensions=args.params.dimensions);if(request.format){if(!module$contents$goog$array_some(validFormats,function(format){return goog.string.caseInsensitiveEquals(format,request.format);})){throw Error("Invalid format specified.");}}else{request.format=validFormats[0];}var getThumbId=ee.data.getThumbId;switch(opt_thumbType){case ee.ImageCollection.ThumbTypes.VIDEO:getThumbId=ee.data.getVideoThumbId;break;case ee.ImageCollection.ThumbTypes.FILMSTRIP:getThumbId=ee.data.getFilmstripThumbId;}if(args.callback){getThumbId(request,function(thumbId,opt_error){var thumbUrl="";if(void 0===opt_error){try{thumbUrl=ee.data.makeThumbUrl(thumbId);}catch(e){opt_error=String(e.message);}}args.callback(thumbUrl,opt_error);});}else{return ee.data.makeThumbUrl(getThumbId(request));}};ee.ImageCollection.prototype.getMap=function(opt_visParams,opt_callback){var args=ee.arguments.extractFromFunction(ee.ImageCollection.prototype.getMap,arguments),mosaic=ee.ApiFunction._call("ImageCollection.mosaic",this);if(args.callback){mosaic.getMap(args.visParams,args.callback);}else{return mosaic.getMap(args.visParams);}};goog.exportProperty(ee.ImageCollection.prototype,"getMap",ee.ImageCollection.prototype.getMap);ee.ImageCollection.prototype.getInfo=function(opt_callback){return ee.ImageCollection.superClass_.getInfo.call(this,opt_callback);};goog.exportProperty(ee.ImageCollection.prototype,"getInfo",ee.ImageCollection.prototype.getInfo);ee.ImageCollection.prototype.select=function(selectors,opt_names){var varargs=arguments;return this.map(function(obj){return obj.select.apply(obj,varargs);});};goog.exportProperty(ee.ImageCollection.prototype,"select",ee.ImageCollection.prototype.select);ee.ImageCollection.prototype.first=function(){return new ee.Image(ee.ApiFunction._call("Collection.first",this));};goog.exportProperty(ee.ImageCollection.prototype,"first",ee.ImageCollection.prototype.first);ee.ImageCollection.prototype.name=function(){return"ImageCollection";};ee.ImageCollection.prototype.elementType=function(){return ee.Image;};ee.batch={};var module$contents$ee$batch_Export={image:{},map:{},table:{},video:{},videoMap:{},classifier:{}},module$contents$ee$batch_ExportTask=function(config){this.config_=config;this.id=null;};module$contents$ee$batch_ExportTask.create=function(exportArgs){var config={element:module$contents$ee$batch_Export.extractElement(exportArgs)};Object.assign(config,exportArgs);config=module$contents$goog$object_filter(config,function(x){return null!=x;});return new module$contents$ee$batch_ExportTask(config);};module$contents$ee$batch_ExportTask.prototype.start=function(opt_success,opt_error){var $jscomp$this=this;goog.asserts.assert(this.config_,"Task config must be specified for tasks to be started.");if(opt_success){var startProcessing=function(){goog.asserts.assertString($jscomp$this.id);ee.data.startProcessing($jscomp$this.id,$jscomp$this.config_,function(_,error){error?opt_error(error):opt_success();});};this.id?startProcessing():ee.data.newTaskId(1,function(ids){var id=ids&&ids[0];id?($jscomp$this.id=id,startProcessing()):opt_error("Failed to obtain task ID.");});}else{this.id=this.id||ee.data.newTaskId(1)[0],goog.asserts.assertString(this.id,"Failed to obtain task ID."),ee.data.startProcessing(this.id,this.config_);}};goog.exportProperty(module$contents$ee$batch_ExportTask.prototype,"start",module$contents$ee$batch_ExportTask.prototype.start);module$contents$ee$batch_Export.image.toAsset=function(image,opt_description,opt_assetId,opt_pyramidingPolicy,opt_dimensions,opt_region,opt_scale,opt_crs,opt_crsTransform,opt_maxPixels,opt_shardSize){var clientConfig=ee.arguments.extractFromFunction(module$contents$ee$batch_Export.image.toAsset,arguments),serverConfig=module$contents$ee$batch_Export.convertToServerParams(clientConfig,ee.data.ExportDestination.ASSET,ee.data.ExportType.IMAGE);return module$contents$ee$batch_ExportTask.create(serverConfig);};goog.exportSymbol("module$contents$ee$batch_Export.image.toAsset",module$contents$ee$batch_Export.image.toAsset);module$contents$ee$batch_Export.image.toCloudStorage=function(image,opt_description,opt_bucket,opt_fileNamePrefix,opt_dimensions,opt_region,opt_scale,opt_crs,opt_crsTransform,opt_maxPixels,opt_shardSize,opt_fileDimensions,opt_skipEmptyTiles,opt_fileFormat,opt_formatOptions){var clientConfig=ee.arguments.extractFromFunction(module$contents$ee$batch_Export.image.toCloudStorage,arguments),serverConfig=module$contents$ee$batch_Export.convertToServerParams(clientConfig,ee.data.ExportDestination.GCS,ee.data.ExportType.IMAGE);return module$contents$ee$batch_ExportTask.create(serverConfig);};goog.exportSymbol("module$contents$ee$batch_Export.image.toCloudStorage",module$contents$ee$batch_Export.image.toCloudStorage);module$contents$ee$batch_Export.image.toDrive=function(image,opt_description,opt_folder,opt_fileNamePrefix,opt_dimensions,opt_region,opt_scale,opt_crs,opt_crsTransform,opt_maxPixels,opt_shardSize,opt_fileDimensions,opt_skipEmptyTiles,opt_fileFormat,opt_formatOptions){var clientConfig=ee.arguments.extractFromFunction(module$contents$ee$batch_Export.image.toDrive,arguments),serverConfig=module$contents$ee$batch_Export.convertToServerParams(clientConfig,ee.data.ExportDestination.DRIVE,ee.data.ExportType.IMAGE);return module$contents$ee$batch_ExportTask.create(serverConfig);};goog.exportSymbol("module$contents$ee$batch_Export.image.toDrive",module$contents$ee$batch_Export.image.toDrive);module$contents$ee$batch_Export.map.toCloudStorage=function(image,opt_description,opt_bucket,opt_fileFormat,opt_path,opt_writePublicTiles,opt_scale,opt_maxZoom,opt_minZoom,opt_region,opt_skipEmptyTiles,opt_mapsApiKey,opt_bucketCorsUris){var clientConfig=ee.arguments.extractFromFunction(module$contents$ee$batch_Export.map.toCloudStorage,arguments),serverConfig=module$contents$ee$batch_Export.convertToServerParams(clientConfig,ee.data.ExportDestination.GCS,ee.data.ExportType.MAP);return module$contents$ee$batch_ExportTask.create(serverConfig);};goog.exportSymbol("module$contents$ee$batch_Export.map.toCloudStorage",module$contents$ee$batch_Export.map.toCloudStorage);module$contents$ee$batch_Export.table.toCloudStorage=function(collection,opt_description,opt_bucket,opt_fileNamePrefix,opt_fileFormat,opt_selectors,opt_maxVertices){var clientConfig=ee.arguments.extractFromFunction(module$contents$ee$batch_Export.table.toCloudStorage,arguments),serverConfig=module$contents$ee$batch_Export.convertToServerParams(clientConfig,ee.data.ExportDestination.GCS,ee.data.ExportType.TABLE);return module$contents$ee$batch_ExportTask.create(serverConfig);};goog.exportSymbol("module$contents$ee$batch_Export.table.toCloudStorage",module$contents$ee$batch_Export.table.toCloudStorage);module$contents$ee$batch_Export.table.toDrive=function(collection,opt_description,opt_folder,opt_fileNamePrefix,opt_fileFormat,opt_selectors,opt_maxVertices){var clientConfig=ee.arguments.extractFromFunction(module$contents$ee$batch_Export.table.toDrive,arguments);clientConfig.type=ee.data.ExportType.TABLE;var serverConfig=module$contents$ee$batch_Export.convertToServerParams(clientConfig,ee.data.ExportDestination.DRIVE,ee.data.ExportType.TABLE);return module$contents$ee$batch_ExportTask.create(serverConfig);};goog.exportSymbol("module$contents$ee$batch_Export.table.toDrive",module$contents$ee$batch_Export.table.toDrive);module$contents$ee$batch_Export.table.toAsset=function(collection,opt_description,opt_assetId,opt_maxVertices){var clientConfig=ee.arguments.extractFromFunction(module$contents$ee$batch_Export.table.toAsset,arguments),serverConfig=module$contents$ee$batch_Export.convertToServerParams(clientConfig,ee.data.ExportDestination.ASSET,ee.data.ExportType.TABLE);return module$contents$ee$batch_ExportTask.create(serverConfig);};goog.exportSymbol("module$contents$ee$batch_Export.table.toAsset",module$contents$ee$batch_Export.table.toAsset);module$contents$ee$batch_Export.table.toDmsLayer=function(collection,opt_description,opt_assetId,opt_maxVertices){var clientConfig=ee.arguments.extractFromFunction(module$contents$ee$batch_Export.table.toDmsLayer,arguments),serverConfig=module$contents$ee$batch_Export.convertToServerParams(clientConfig,ee.data.ExportDestination.DMS,ee.data.ExportType.TABLE);return module$contents$ee$batch_ExportTask.create(serverConfig);};goog.exportSymbol("module$contents$ee$batch_Export.table.toDmsLayer",module$contents$ee$batch_Export.table.toDmsLayer);module$contents$ee$batch_Export.video.toCloudStorage=function(collection,opt_description,opt_bucket,opt_fileNamePrefix,opt_framesPerSecond,opt_dimensions,opt_region,opt_scale,opt_crs,opt_crsTransform,opt_maxPixels,opt_maxFrames){var clientConfig=ee.arguments.extractFromFunction(module$contents$ee$batch_Export.video.toCloudStorage,arguments),serverConfig=module$contents$ee$batch_Export.convertToServerParams(clientConfig,ee.data.ExportDestination.GCS,ee.data.ExportType.VIDEO);return module$contents$ee$batch_ExportTask.create(serverConfig);};goog.exportSymbol("module$contents$ee$batch_Export.video.toCloudStorage",module$contents$ee$batch_Export.video.toCloudStorage);module$contents$ee$batch_Export.video.toDrive=function(collection,opt_description,opt_folder,opt_fileNamePrefix,opt_framesPerSecond,opt_dimensions,opt_region,opt_scale,opt_crs,opt_crsTransform,opt_maxPixels,opt_maxFrames){var clientConfig=ee.arguments.extractFromFunction(module$contents$ee$batch_Export.video.toDrive,arguments),serverConfig=module$contents$ee$batch_Export.convertToServerParams(clientConfig,ee.data.ExportDestination.DRIVE,ee.data.ExportType.VIDEO);return module$contents$ee$batch_ExportTask.create(serverConfig);};goog.exportSymbol("module$contents$ee$batch_Export.video.toDrive",module$contents$ee$batch_Export.video.toDrive);module$contents$ee$batch_Export.videoMap.toCloudStorage=function(collection,opt_description,opt_bucket,opt_fileNamePrefix,opt_framesPerSecond,opt_writePublicTiles,opt_minZoom,opt_maxZoom,opt_scale,opt_region,opt_skipEmptyTiles,opt_minTimeMachineZoomSubset,opt_maxTimeMachineZoomSubset,opt_tileWidth,opt_tileHeight,opt_tileStride,opt_videoFormat,opt_version,opt_mapsApiKey,opt_bucketCorsUris){var clientConfig=ee.arguments.extractFromFunction(module$contents$ee$batch_Export.videoMap.toCloudStorage,arguments),serverConfig=module$contents$ee$batch_Export.convertToServerParams(clientConfig,ee.data.ExportDestination.GCS,ee.data.ExportType.VIDEO_MAP);return module$contents$ee$batch_ExportTask.create(serverConfig);};goog.exportSymbol("module$contents$ee$batch_Export.videoMap.toCloudStorage",module$contents$ee$batch_Export.videoMap.toCloudStorage);module$contents$ee$batch_Export.classifier.toAsset=function(classifier,opt_description,opt_assetId){var clientConfig=ee.arguments.extractFromFunction(module$contents$ee$batch_Export.classifier.toAsset,arguments),serverConfig=module$contents$ee$batch_Export.convertToServerParams(clientConfig,ee.data.ExportDestination.ASSET,ee.data.ExportType.CLASSIFIER);return module$contents$ee$batch_ExportTask.create(serverConfig);};goog.exportSymbol("module$contents$ee$batch_Export.classifier.toAsset",module$contents$ee$batch_Export.classifier.toAsset);module$contents$ee$batch_Export.serializeRegion=function(region){if(region instanceof ee.Geometry){region=region.toGeoJSON();}else{if("string"===typeof region){try{region=goog.asserts.assertObject(JSON.parse(region));}catch(x){throw Error("Invalid format for region property. Region must be GeoJSON LinearRing or Polygon specified as actual coordinates or serialized as a string. See Export documentation.");}}}if(!(goog.isObject(region)&&"type"in region)){try{new ee.Geometry.LineString(region);}catch(e){try{new ee.Geometry.Polygon(region);}catch(e2){throw Error("Invalid format for region property. Region must be GeoJSON LinearRing or Polygon specified as actual coordinates or serialized as a string. See Export documentation.");}}}return JSON.stringify(region);};module$contents$ee$batch_Export.resolveRegionParam=function(params){params=module$contents$goog$object_clone(params);if(!params.region){return goog.Promise.resolve(params);}var region=params.region;if(region instanceof ee.ComputedObject){return region instanceof ee.Element&&(region=region.geometry()),new goog.Promise(function(resolve,reject){region.getInfo(function(regionInfo,error){error?reject(error):(params.region=params.type===ee.data.ExportType.IMAGE?new ee.Geometry(regionInfo):module$contents$ee$batch_Export.serializeRegion(regionInfo),resolve(params));});});}params.region=params.type===ee.data.ExportType.IMAGE?new ee.Geometry(region):module$contents$ee$batch_Export.serializeRegion(region);return goog.Promise.resolve(params);};module$contents$ee$batch_Export.extractElement=function(exportArgs){var isInArgs=function(key){return key in exportArgs;},eeElementKey=module$contents$ee$batch_Export.EE_ELEMENT_KEYS.find(isInArgs);goog.asserts.assert(1===module$contents$goog$array_count(module$contents$ee$batch_Export.EE_ELEMENT_KEYS,isInArgs),'Expected a single "image", "collection" or "classifier" key.');var element=exportArgs[eeElementKey];if(element instanceof ee.Image){var result=element;}else{if(element instanceof ee.FeatureCollection){result=element;}else{if(element instanceof ee.ImageCollection){result=element;}else{if(element instanceof ee.Element){result=element;}else{if(element instanceof ee.ComputedObject){result=element;}else{throw Error("Unknown element type provided: "+typeof element+". Expected: ee.Image, ee.ImageCollection, ee.FeatureCollection, ee.Element or ee.ComputedObject.");}}}}}delete exportArgs[eeElementKey];return result;};module$contents$ee$batch_Export.convertToServerParams=function(originalArgs,destination,exportType,serializeRegion){serializeRegion=void 0===serializeRegion?!0:serializeRegion;var taskConfig={type:exportType};Object.assign(taskConfig,originalArgs);switch(exportType){case ee.data.ExportType.IMAGE:taskConfig=module$contents$ee$batch_Export.image.prepareTaskConfig_(taskConfig,destination);break;case ee.data.ExportType.MAP:taskConfig=module$contents$ee$batch_Export.map.prepareTaskConfig_(taskConfig,destination);break;case ee.data.ExportType.TABLE:taskConfig=module$contents$ee$batch_Export.table.prepareTaskConfig_(taskConfig,destination);break;case ee.data.ExportType.VIDEO:taskConfig=module$contents$ee$batch_Export.video.prepareTaskConfig_(taskConfig,destination);break;case ee.data.ExportType.VIDEO_MAP:taskConfig=module$contents$ee$batch_Export.videoMap.prepareTaskConfig_(taskConfig,destination);break;case ee.data.ExportType.CLASSIFIER:taskConfig=module$contents$ee$batch_Export.classifier.prepareTaskConfig_(taskConfig,destination);break;default:throw Error("Unknown export type: "+taskConfig.type);}serializeRegion&&null!=taskConfig.region&&(taskConfig.region=module$contents$ee$batch_Export.serializeRegion(taskConfig.region));return taskConfig;};module$contents$ee$batch_Export.prepareDestination_=function(taskConfig,destination){switch(destination){case ee.data.ExportDestination.GCS:taskConfig.outputBucket=taskConfig.bucket||"";taskConfig.outputPrefix=taskConfig.fileNamePrefix||taskConfig.path||"";delete taskConfig.fileNamePrefix;delete taskConfig.path;delete taskConfig.bucket;break;case ee.data.ExportDestination.ASSET:taskConfig.assetId=taskConfig.assetId||"";break;case ee.data.ExportDestination.DMS:taskConfig.dmsName=taskConfig.dmsName||"";break;default:var folderType=goog.typeOf(taskConfig.folder);if(!module$contents$goog$array_contains(["string","undefined"],folderType)){throw Error('Error: toDrive "folder" parameter must be a string, but is of type '+folderType+".");}taskConfig.driveFolder=taskConfig.folder||"";taskConfig.driveFileNamePrefix=taskConfig.fileNamePrefix||"";delete taskConfig.folder;delete taskConfig.fileNamePrefix;}return taskConfig;};module$contents$ee$batch_Export.image.prepareTaskConfig_=function(taskConfig,destination){null==taskConfig.fileFormat&&(taskConfig.fileFormat="GeoTIFF");taskConfig=module$contents$ee$batch_Export.reconcileImageFormat(taskConfig);taskConfig=module$contents$ee$batch_Export.prepareDestination_(taskConfig,destination);null!=taskConfig.crsTransform&&(taskConfig[module$contents$ee$batch_Export.CRS_TRANSFORM_KEY]=taskConfig.crsTransform,delete taskConfig.crsTransform);return taskConfig;};module$contents$ee$batch_Export.table.prepareTaskConfig_=function(taskConfig,destination){Array.isArray(taskConfig.selectors)&&(taskConfig.selectors=taskConfig.selectors.join());taskConfig=module$contents$ee$batch_Export.reconcileTableFormat(taskConfig);return taskConfig=module$contents$ee$batch_Export.prepareDestination_(taskConfig,destination);};module$contents$ee$batch_Export.map.prepareTaskConfig_=function(taskConfig,destination){taskConfig=module$contents$ee$batch_Export.prepareDestination_(taskConfig,destination);return taskConfig=module$contents$ee$batch_Export.reconcileMapFormat(taskConfig);};module$contents$ee$batch_Export.video.prepareTaskConfig_=function(taskConfig,destination){taskConfig=module$contents$ee$batch_Export.reconcileVideoFormat_(taskConfig);taskConfig=module$contents$ee$batch_Export.prepareDestination_(taskConfig,destination);null!=taskConfig.crsTransform&&(taskConfig[module$contents$ee$batch_Export.CRS_TRANSFORM_KEY]=taskConfig.crsTransform,delete taskConfig.crsTransform);return taskConfig;};module$contents$ee$batch_Export.videoMap.prepareTaskConfig_=function(taskConfig,destination){taskConfig=module$contents$ee$batch_Export.reconcileVideoFormat_(taskConfig);taskConfig.version=taskConfig.version||module$contents$ee$batch_VideoMapVersion.V1;taskConfig.stride=taskConfig.stride||1;taskConfig.tileDimensions={width:taskConfig.tileWidth||256,height:taskConfig.tileHeight||256};return taskConfig=module$contents$ee$batch_Export.prepareDestination_(taskConfig,destination);};module$contents$ee$batch_Export.classifier.prepareTaskConfig_=function(taskConfig,destination){return taskConfig=module$contents$ee$batch_Export.prepareDestination_(taskConfig,destination);};var module$contents$ee$batch_VideoFormat={MP4:"MP4",GIF:"GIF",VP9:"VP9"},module$contents$ee$batch_MapFormat={AUTO_JPEG_PNG:"AUTO_JPEG_PNG",JPEG:"JPEG",PNG:"PNG"},module$contents$ee$batch_ImageFormat={GEO_TIFF:"GEO_TIFF",TF_RECORD_IMAGE:"TF_RECORD_IMAGE"},module$contents$ee$batch_TableFormat={CSV:"CSV",GEO_JSON:"GEO_JSON",KML:"KML",KMZ:"KMZ",SHP:"SHP",TF_RECORD_TABLE:"TF_RECORD_TABLE"},module$contents$ee$batch_VideoMapVersion={V1:"V1",V2:"V2"},module$contents$ee$batch_FORMAT_OPTIONS_MAP={GEO_TIFF:["cloudOptimized","fileDimensions","shardSize"],TF_RECORD_IMAGE:"patchDimensions kernelSize compressed maxFileSize defaultValue tensorDepths sequenceData collapseBands maskedThreshold".split(" ")},module$contents$ee$batch_FORMAT_PREFIX_MAP={GEO_TIFF:"tiff",TF_RECORD_IMAGE:"tfrecord"};module$contents$ee$batch_Export.reconcileVideoFormat_=function(taskConfig){taskConfig.videoOptions=taskConfig.framesPerSecond||5.0;taskConfig.maxFrames=taskConfig.maxFrames||1000;taskConfig.maxPixels=taskConfig.maxPixels||1e8;var formatString=taskConfig.fileFormat;null==formatString&&(formatString=module$contents$ee$batch_VideoFormat.MP4);formatString=formatString.toUpperCase();switch(formatString){case"MP4":formatString=module$contents$ee$batch_VideoFormat.MP4;break;case"GIF":case"JIF":formatString=module$contents$ee$batch_VideoFormat.GIF;break;case"VP9":case"WEBM":formatString=module$contents$ee$batch_VideoFormat.VP9;break;default:throw Error("Invalid file format "+formatString+". Supported formats are: 'MP4', 'GIF', and 'WEBM'.");}taskConfig.fileFormat=formatString;return taskConfig;};module$contents$ee$batch_Export.reconcileImageFormat=function(taskConfig){var formatString=taskConfig.fileFormat;null==formatString&&(formatString=module$contents$ee$batch_ImageFormat.GEO_TIFF);formatString=formatString.toUpperCase();switch(formatString){case"TIFF":case"TIF":case"GEO_TIFF":case"GEOTIFF":formatString=module$contents$ee$batch_ImageFormat.GEO_TIFF;break;case"TF_RECORD":case"TF_RECORD_IMAGE":case"TFRECORD":formatString=module$contents$ee$batch_ImageFormat.TF_RECORD_IMAGE;break;default:throw Error("Invalid file format "+formatString+". Supported formats are: 'GEOTIFF', 'TFRECORD'.");}taskConfig.fileFormat=formatString;if(null!=taskConfig.formatOptions){var formatOptions=module$contents$ee$batch_Export.prefixImageFormatOptions_(taskConfig,formatString);delete taskConfig.formatOptions;Object.assign(taskConfig,formatOptions);}return taskConfig;};module$contents$ee$batch_Export.reconcileMapFormat=function(taskConfig){var formatString=taskConfig.fileFormat;null==formatString&&(formatString=module$contents$ee$batch_MapFormat.AUTO_JPEG_PNG);formatString=formatString.toUpperCase();switch(formatString){case"AUTO":case"AUTO_JPEG_PNG":case"AUTO_JPG_PNG":formatString=module$contents$ee$batch_MapFormat.AUTO_JPEG_PNG;break;case"JPG":case"JPEG":formatString=module$contents$ee$batch_MapFormat.JPEG;break;case"PNG":formatString=module$contents$ee$batch_MapFormat.PNG;break;default:throw Error("Invalid file format "+formatString+". Supported formats are: 'AUTO', 'PNG', and 'JPEG'.");}taskConfig.fileFormat=formatString;return taskConfig;};module$contents$ee$batch_Export.reconcileTableFormat=function(taskConfig){var formatString=taskConfig.fileFormat;null==formatString&&(formatString=module$contents$ee$batch_TableFormat.CSV);formatString=formatString.toUpperCase();switch(formatString){case"CSV":formatString=module$contents$ee$batch_TableFormat.CSV;break;case"JSON":case"GEOJSON":case"GEO_JSON":formatString=module$contents$ee$batch_TableFormat.GEO_JSON;break;case"KML":formatString=module$contents$ee$batch_TableFormat.KML;break;case"KMZ":formatString=module$contents$ee$batch_TableFormat.KMZ;break;case"SHP":formatString=module$contents$ee$batch_TableFormat.SHP;break;case"TF_RECORD":case"TF_RECORD_TABLE":case"TFRECORD":formatString=module$contents$ee$batch_TableFormat.TF_RECORD_TABLE;break;default:throw Error("Invalid file format "+formatString+". Supported formats are: 'CSV', 'GeoJSON', 'KML', 'KMZ', 'SHP', and 'TFRecord'.");}taskConfig.fileFormat=formatString;return taskConfig;};module$contents$ee$batch_Export.prefixImageFormatOptions_=function(taskConfig,imageFormat){var formatOptions=taskConfig.formatOptions;if(null==formatOptions){return{};}if(Object.keys(taskConfig).some(function(key){return module$contents$goog$object_containsKey(formatOptions,key);})){throw Error("Parameter specified at least twice: once in config, and once in config format options.");}for(var prefix=module$contents$ee$batch_FORMAT_PREFIX_MAP[imageFormat],validOptionKeys=module$contents$ee$batch_FORMAT_OPTIONS_MAP[imageFormat],prefixedOptions={},$jscomp$iter$27=$jscomp.makeIterator(Object.entries(formatOptions)),$jscomp$key$=$jscomp$iter$27.next();!$jscomp$key$.done;$jscomp$key$=$jscomp$iter$27.next()){var $jscomp$destructuring$var37=$jscomp.makeIterator($jscomp$key$.value),key$jscomp$0=$jscomp$destructuring$var37.next().value,value=$jscomp$destructuring$var37.next().value;if(!module$contents$goog$array_contains(validOptionKeys,key$jscomp$0)){var validKeysMsg=validOptionKeys.join(", ");throw Error('"'+key$jscomp$0+'" is not a valid option, the image format "'+imageFormat+'""may have the following options: '+(validKeysMsg+'".'));}var prefixedKey=prefix+key$jscomp$0[0].toUpperCase()+key$jscomp$0.substring(1);Array.isArray(value)?prefixedOptions[prefixedKey]=value.join():prefixedOptions[prefixedKey]=value;}return prefixedOptions;};module$contents$ee$batch_Export.CRS_TRANSFORM_KEY="crs_transform";module$contents$ee$batch_Export.EE_ELEMENT_KEYS=["image","collection","classifier"];ee.batch.Export=module$contents$ee$batch_Export;ee.batch.ExportTask=module$contents$ee$batch_ExportTask;ee.batch.ImageFormat=module$contents$ee$batch_ImageFormat;ee.batch.MapFormat=module$contents$ee$batch_MapFormat;ee.batch.ServerTaskConfig={};ee.batch.TableFormat=module$contents$ee$batch_TableFormat;ee.batch.VideoFormat=module$contents$ee$batch_VideoFormat;ee.Number=function(number){if(!(this instanceof ee.Number)){return ee.ComputedObject.construct(ee.Number,arguments);}if(number instanceof ee.Number){return number;}ee.Number.initialize();if("number"===typeof number){ee.ComputedObject.call(this,null,null),this.number_=number;}else{if(number instanceof ee.ComputedObject){ee.ComputedObject.call(this,number.func,number.args,number.varName),this.number_=null;}else{throw Error("Invalid argument specified for ee.Number(): "+number);}}};goog.inherits(ee.Number,ee.ComputedObject);goog.exportSymbol("ee.Number",ee.Number);ee.Number.initialized_=!1;ee.Number.initialize=function(){ee.Number.initialized_||(ee.ApiFunction.importApi(ee.Number,"Number","Number"),ee.Number.initialized_=!0);};ee.Number.reset=function(){ee.ApiFunction.clearApi(ee.Number);ee.Number.initialized_=!1;};ee.Number.prototype.encode=function(encoder){return"number"===typeof this.number_?this.number_:ee.Number.superClass_.encode.call(this,encoder);};ee.Number.prototype.encodeCloudValue=function(serializer){return"number"===typeof this.number_?ee.rpc_node.reference(serializer.makeReference(this.number_)):ee.Number.superClass_.encodeCloudValue.call(this,serializer);};ee.Number.prototype.name=function(){return"Number";};ee.String=function(string){if(!(this instanceof ee.String)){return ee.ComputedObject.construct(ee.String,arguments);}if(string instanceof ee.String){return string;}ee.String.initialize();if("string"===typeof string){ee.ComputedObject.call(this,null,null),this.string_=string;}else{if(string instanceof ee.ComputedObject){this.string_=null,string.func&&"String"==string.func.getSignature().returns?ee.ComputedObject.call(this,string.func,string.args,string.varName):ee.ComputedObject.call(this,new ee.ApiFunction("String"),{input:string},null);}else{throw Error("Invalid argument specified for ee.String(): "+string);}}};goog.inherits(ee.String,ee.ComputedObject);goog.exportSymbol("ee.String",ee.String);ee.String.initialized_=!1;ee.String.initialize=function(){ee.String.initialized_||(ee.ApiFunction.importApi(ee.String,"String","String"),ee.String.initialized_=!0);};ee.String.reset=function(){ee.ApiFunction.clearApi(ee.String);ee.String.initialized_=!1;};ee.String.prototype.encode=function(encoder){return"string"===typeof this.string_?this.string_:ee.String.superClass_.encode.call(this,encoder);};ee.String.prototype.encodeCloudValue=function(serializer){return"string"===typeof this.string_?ee.rpc_node.reference(serializer.makeReference(this.string_)):ee.String.superClass_.encodeCloudValue.call(this,serializer);};ee.String.prototype.name=function(){return"String";};ee.CustomFunction=function(signature,body){if(!(this instanceof ee.CustomFunction)){return ee.ComputedObject.construct(ee.CustomFunction,arguments);}for(var vars=[],args=signature.args,i=0;i<args.length;i++){var arg=args[i];vars.push(ee.CustomFunction.variable(ee.Types.nameToClass(arg.type),arg.name));}if(void 0===body.apply(null,vars)){throw Error("User-defined methods must return a value.");}this.signature_=ee.CustomFunction.resolveNamelessArgs_(signature,vars,body);this.body_=body.apply(null,vars);};goog.inherits(ee.CustomFunction,ee.Function);goog.exportSymbol("ee.CustomFunction",ee.CustomFunction);ee.CustomFunction.prototype.encode=function(encoder){return{type:"Function",argumentNames:module$contents$goog$array_map(this.signature_.args,function(arg){return arg.name;}),body:encoder(this.body_)};};ee.CustomFunction.prototype.encodeCloudValue=function(serializer){return ee.rpc_node.functionDefinition(this.signature_.args.map(function(arg){return arg.name;}),serializer.makeReference(this.body_));};ee.CustomFunction.prototype.encodeCloudInvocation=function(serializer,args){return ee.rpc_node.functionByReference(serializer.makeReference(this),args);};ee.CustomFunction.prototype.getSignature=function(){return this.signature_;};ee.CustomFunction.variable=function(type,name$jscomp$0){type=type||Object;if(!(type.prototype instanceof ee.ComputedObject)){if(type&&type!=Object){if(type==String){type=ee.String;}else{if(type==Number){type=ee.Number;}else{if(type==Array){type=goog.global.ee.List;}else{throw Error("Variables must be of an EE type, e.g. ee.Image or ee.Number.");}}}}else{type=ee.ComputedObject;}}var klass=function(name){this.args=this.func=null;this.varName=name;};klass.prototype=type.prototype;return new klass(name$jscomp$0);};ee.CustomFunction.create=function(func,returnType,arg_types){var stringifyType=function(type){return"string"===typeof type?type:ee.Types.classToName(type);},args=module$contents$goog$array_map(arg_types,function(argType){return{name:null,type:stringifyType(argType)};}),signature={name:"",returns:stringifyType(returnType),args:args};return new ee.CustomFunction(signature,func);};ee.CustomFunction.resolveNamelessArgs_=function(signature,vars,body){for(var namelessArgIndices=[],i=0;i<vars.length;i++){null===vars[i].varName&&namelessArgIndices.push(i);}if(0===namelessArgIndices.length){return signature;}for(var baseName="_MAPPING_VAR_"+function(expression){var countNodes=function(nodes){return nodes.map(countNode).reduce(function(a,b){return a+b;},0);},countNode=function(node){return node.functionDefinitionValue?1:node.arrayValue?countNodes(node.arrayValue.values):node.dictionaryValue?countNodes(Object.values(node.dictionaryValue.values)):node.functionInvocationValue?countNodes(Object.values(node.functionInvocationValue.arguments)):0;};return countNodes(Object.values(expression.values));}(ee.Serializer.encodeCloudApiExpression(body.apply(null,vars),"<unbound>"))+"_",i$64=0;i$64<namelessArgIndices.length;i$64++){var index=namelessArgIndices[i$64],name=baseName+i$64;vars[index].varName=name;signature.args[index].name=name;}return signature;};ee.Date=function(date,opt_tz){if(!(this instanceof ee.Date)){return ee.ComputedObject.construct(ee.Date,arguments);}if(date instanceof ee.Date){return date;}ee.Date.initialize();var jsArgs=ee.arguments.extractFromFunction(ee.Date,arguments);date=jsArgs.date;var tz=jsArgs.tz,func=new ee.ApiFunction("Date"),args={},varName=null;if(ee.Types.isString(date)){if(args.value=date,tz){if(ee.Types.isString(tz)){args.timeZone=tz;}else{throw Error("Invalid argument specified for ee.Date(..., opt_tz): "+tz);}}}else{if(ee.Types.isNumber(date)){args.value=date;}else{if(goog.isDateLike(date)){args.value=Math.floor(date.getTime());}else{if(date instanceof ee.ComputedObject){date.func&&"Date"==date.func.getSignature().returns?(func=date.func,args=date.args,varName=date.varName):args.value=date;}else{throw Error("Invalid argument specified for ee.Date(): "+date);}}}}ee.ComputedObject.call(this,func,args,varName);};goog.inherits(ee.Date,ee.ComputedObject);goog.exportSymbol("ee.Date",ee.Date);ee.Date.initialized_=!1;ee.Date.initialize=function(){ee.Date.initialized_||(ee.ApiFunction.importApi(ee.Date,"Date","Date"),ee.Date.initialized_=!0);};ee.Date.reset=function(){ee.ApiFunction.clearApi(ee.Date);ee.Date.initialized_=!1;};ee.Date.prototype.name=function(){return"Date";};ee.Deserializer=function(){};goog.exportSymbol("ee.Deserializer",ee.Deserializer);ee.Deserializer.fromJSON=function(json){return ee.Deserializer.decode(JSON.parse(json));};goog.exportSymbol("ee.Deserializer.fromJSON",ee.Deserializer.fromJSON);ee.Deserializer.decode=function(json){if("result"in json&&"values"in json){return ee.Deserializer.decodeCloudApi(json);}var namedValues={};if(goog.isObject(json)&&"CompoundValue"===json.type){for(var scopes=json.scope,i=0;i<scopes.length;i++){var key=scopes[i][0],value=scopes[i][1];if(key in namedValues){throw Error('Duplicate scope key "'+key+'" in scope #'+i+".");}namedValues[key]=ee.Deserializer.decodeValue_(value,namedValues);}json=json.value;}return ee.Deserializer.decodeValue_(json,namedValues);};goog.exportSymbol("ee.Deserializer.decode",ee.Deserializer.decode);ee.Deserializer.decodeValue_=function(json,namedValues){if(null===json||"number"===typeof json||"boolean"===typeof json||"string"===typeof json){return json;}if(Array.isArray(json)){return module$contents$goog$array_map(json,function(element){return ee.Deserializer.decodeValue_(element,namedValues);});}if(!goog.isObject(json)||"function"===typeof json){throw Error("Cannot decode object: "+json);}var typeName=json.type;switch(typeName){case"ValueRef":if(json.value in namedValues){return namedValues[json.value];}throw Error("Unknown ValueRef: "+json);case"ArgumentRef":var varName=json.value;if("string"!==typeof varName){throw Error("Invalid variable name: "+varName);}return ee.CustomFunction.variable(Object,varName);case"Date":var microseconds=json.value;if("number"!==typeof microseconds){throw Error("Invalid date value: "+microseconds);}return new ee.Date(microseconds/1000);case"Bytes":return ee.Deserializer.roundTrip_(new module$exports$eeapiclient$ee_api_client.ValueNode({bytesValue:json}),json);case"Invocation":var func="functionName"in json?ee.ApiFunction.lookup(json.functionName):ee.Deserializer.decodeValue_(json["function"],namedValues);var args=module$contents$goog$object_map(json.arguments,function(element){return ee.Deserializer.decodeValue_(element,namedValues);});return ee.Deserializer.invocation_(func,args);case"Dictionary":return module$contents$goog$object_map(json.value,function(element){return ee.Deserializer.decodeValue_(element,namedValues);});case"Function":var body=ee.Deserializer.decodeValue_(json.body,namedValues),signature={name:"",args:module$contents$goog$array_map(json.argumentNames,function(argName){return{name:argName,type:"Object",optional:!1};}),returns:"Object"};return new ee.CustomFunction(signature,function(){return body;});case"Point":case"MultiPoint":case"LineString":case"MultiLineString":case"Polygon":case"MultiPolygon":case"LinearRing":case"GeometryCollection":return new ee.Geometry(json);case"CompoundValue":throw Error("Nested CompoundValues are disallowed.");default:throw Error("Unknown encoded object type: "+typeName);}};ee.Deserializer.roundTrip_=function(node,value){var Reencoder=function(){};$jscomp.inherits(Reencoder,ee.Encodable);Reencoder.prototype.encode=function(encoder){return value;};Reencoder.prototype.encodeCloudValue=function(encoder){return node;};return new Reencoder();};ee.Deserializer.invocation_=function(func,args$jscomp$0){if(func instanceof ee.Function){return func.apply(args$jscomp$0);}if(func instanceof ee.ComputedObject){var ComputedFunction=function(){return ee.Function.apply(this,arguments)||this;};$jscomp.inherits(ComputedFunction,ee.Function);ComputedFunction.prototype.encode=function(encoder){return func.encode(encoder);};ComputedFunction.prototype.encodeCloudInvocation=function(serializer,args){return ee.rpc_node.functionByReference(serializer.makeReference(func),args);};return new ee.ComputedObject(new ComputedFunction(),args$jscomp$0);}throw Error("Invalid function value");};ee.Deserializer.fromCloudApiJSON=function(json){return ee.Deserializer.decodeCloudApi(JSON.parse(json));};goog.exportSymbol("ee.Deserializer.fromCloudApiJSON",ee.Deserializer.fromCloudApiJSON);ee.Deserializer.decodeCloudApi=function(json){var expression=module$contents$eeapiclient$domain_object_deserialize(module$exports$eeapiclient$ee_api_client.Expression,json),decoded={},lookup=function(reference,kind){if(!(reference in decoded)){if(!(reference in expression.values)){throw Error("Cannot find "+kind+" "+reference);}decoded[reference]=decode(expression.values[reference]);}return decoded[reference];},decode=function(node){return null!==node.constantValue?node.constantValue:null!==node.arrayValue?node.arrayValue.values.map(decode):null!==node.dictionaryValue?module$contents$goog$object_map(node.dictionaryValue.values,decode):null!==node.argumentReference?ee.CustomFunction.variable(Object,node.argumentReference):null!==node.functionDefinitionValue?decodeFunctionDefinition(node.functionDefinitionValue):null!==node.functionInvocationValue?decodeFunctionInvocation(node.functionInvocationValue):null!==node.bytesValue?ee.Deserializer.roundTrip_(new module$exports$eeapiclient$ee_api_client.ValueNode({bytesValue:node.bytesValue}),node.bytesValue):null!==node.integerValue?ee.Deserializer.roundTrip_(new module$exports$eeapiclient$ee_api_client.ValueNode({integerValue:node.integerValue}),node.integerValue):null!==node.valueReference?lookup(node.valueReference,"reference"):null;},decodeFunctionDefinition=function(defined){var body=lookup(defined.body,"function body"),signature={args:defined.argumentNames.map(function(name){return{name:name,type:"Object",optional:!1};}),name:"",returns:"Object"};return new ee.CustomFunction(signature,function(){return body;});},decodeFunctionInvocation=function(invoked){var func=invoked.functionReference?lookup(invoked.functionReference,"function"):ee.ApiFunction.lookup(invoked.functionName),args=module$contents$goog$object_map(invoked.arguments,decode);return ee.Deserializer.invocation_(func,args);};return lookup(expression.result,"result value");};goog.exportSymbol("ee.Deserializer.decodeCloudApi",ee.Deserializer.decodeCloudApi);ee.Dictionary=function(opt_dict){if(!(this instanceof ee.Dictionary)){return ee.ComputedObject.construct(ee.Dictionary,arguments);}if(opt_dict instanceof ee.Dictionary){return opt_dict;}ee.Dictionary.initialize();ee.Types.isRegularObject(opt_dict)?(ee.ComputedObject.call(this,null,null),this.dict_=opt_dict):(opt_dict instanceof ee.ComputedObject&&opt_dict.func&&"Dictionary"==opt_dict.func.getSignature().returns?ee.ComputedObject.call(this,opt_dict.func,opt_dict.args,opt_dict.varName):ee.ComputedObject.call(this,new ee.ApiFunction("Dictionary"),{input:opt_dict},null),this.dict_=null);};goog.inherits(ee.Dictionary,ee.ComputedObject);goog.exportSymbol("ee.Dictionary",ee.Dictionary);ee.Dictionary.initialized_=!1;ee.Dictionary.initialize=function(){ee.Dictionary.initialized_||(ee.ApiFunction.importApi(ee.Dictionary,"Dictionary","Dictionary"),ee.Dictionary.initialized_=!0);};ee.Dictionary.reset=function(){ee.ApiFunction.clearApi(ee.Dictionary);ee.Dictionary.initialized_=!1;};ee.Dictionary.prototype.encode=function(encoder){return null!==this.dict_?encoder(this.dict_):ee.Dictionary.superClass_.encode.call(this,encoder);};ee.Dictionary.prototype.encodeCloudValue=function(serializer){return null!==this.dict_?ee.rpc_node.reference(serializer.makeReference(this.dict_)):ee.Dictionary.superClass_.encodeCloudValue.call(this,serializer);};ee.Dictionary.prototype.name=function(){return"Dictionary";};ee.Terrain={};goog.exportSymbol("ee.Terrain",ee.Terrain);ee.Terrain.initialized_=!1;ee.Terrain.initialize=function(){ee.Terrain.initialized_||(ee.ApiFunction.importApi(ee.Terrain,"Terrain","Terrain"),ee.Terrain.initialized_=!0);};ee.Terrain.reset=function(){ee.ApiFunction.clearApi(ee.Terrain);ee.Terrain.initialized_=!1;};ee.initialize=function(opt_baseurl,opt_tileurl,opt_successCallback,opt_errorCallback,opt_xsrfToken,opt_project){if(ee.ready_!=ee.InitState.READY||opt_baseurl||opt_tileurl){var isAsynchronous=null!=opt_successCallback;if(opt_errorCallback){if(isAsynchronous){ee.errorCallbacks_.push(opt_errorCallback);}else{throw Error("Can't pass an error callback without a success callback.");}}if(ee.ready_==ee.InitState.LOADING&&isAsynchronous){ee.successCallbacks_.push(opt_successCallback);}else{if(ee.ready_=ee.InitState.LOADING,ee.data.initialize(opt_baseurl,opt_tileurl,opt_xsrfToken,opt_project),isAsynchronous){ee.successCallbacks_.push(opt_successCallback),ee.ApiFunction.initialize(ee.initializationSuccess_,ee.initializationFailure_);}else{try{ee.ApiFunction.initialize(),ee.initializationSuccess_();}catch(e){throw ee.initializationFailure_(e),e;}}}}else{opt_successCallback&&opt_successCallback();}};goog.exportSymbol("ee.initialize",ee.initialize);ee.reset=function(){ee.ready_=ee.InitState.NOT_READY;ee.data.reset();ee.ApiFunction.reset();ee.Date.reset();ee.Dictionary.reset();ee.Element.reset();ee.Image.reset();ee.Feature.reset();ee.Collection.reset();ee.ImageCollection.reset();ee.FeatureCollection.reset();ee.Filter.reset();ee.Geometry.reset();ee.List.reset();ee.Number.reset();ee.String.reset();ee.Terrain.reset();ee.resetGeneratedClasses_();module$contents$goog$object_clear(ee.Algorithms);};goog.exportSymbol("ee.reset",ee.reset);ee.InitState={NOT_READY:"not_ready",LOADING:"loading",READY:"ready"};goog.exportSymbol("ee.InitState",ee.InitState);goog.exportSymbol("ee.InitState.NOT_READY",ee.InitState.NOT_READY);goog.exportSymbol("ee.InitState.LOADING",ee.InitState.LOADING);goog.exportSymbol("ee.InitState.READY",ee.InitState.READY);ee.ready_=ee.InitState.NOT_READY;ee.successCallbacks_=[];ee.errorCallbacks_=[];ee.TILE_SIZE=256;goog.exportSymbol("ee.TILE_SIZE",ee.TILE_SIZE);ee.generatedClasses_=[];ee.Algorithms={};goog.exportSymbol("ee.Algorithms",ee.Algorithms);ee.ready=function(){return ee.ready_;};ee.call=function(func,var_args){"string"===typeof func&&(func=new ee.ApiFunction(func));var args=Array.prototype.slice.call(arguments,1);return ee.Function.prototype.call.apply(func,args);};goog.exportSymbol("ee.call",ee.call);ee.apply=function(func,namedArgs){"string"===typeof func&&(func=new ee.ApiFunction(func));return func.apply(namedArgs);};goog.exportSymbol("ee.apply",ee.apply);ee.initializationSuccess_=function(){if(ee.ready_==ee.InitState.LOADING){try{ee.Date.initialize(),ee.Dictionary.initialize(),ee.Element.initialize(),ee.Image.initialize(),ee.Feature.initialize(),ee.Collection.initialize(),ee.ImageCollection.initialize(),ee.FeatureCollection.initialize(),ee.Filter.initialize(),ee.Geometry.initialize(),ee.List.initialize(),ee.Number.initialize(),ee.String.initialize(),ee.Terrain.initialize(),ee.initializeGeneratedClasses_(),ee.initializeUnboundMethods_();}catch(e){ee.initializationFailure_(e);return;}ee.ready_=ee.InitState.READY;for(ee.errorCallbacks_=[];0<ee.successCallbacks_.length;){ee.successCallbacks_.shift()();}}};ee.initializationFailure_=function(e){if(ee.ready_==ee.InitState.LOADING){for(ee.ready_=ee.InitState.NOT_READY,ee.successCallbacks_=[];0<ee.errorCallbacks_.length;){ee.errorCallbacks_.shift()(e);}}};ee.promote_=function(arg,klass){if(null===arg){return null;}if(void 0!==arg){var exportedEE=goog.global.ee;switch(klass){case"Image":return new ee.Image(arg);case"Feature":return arg instanceof ee.Collection?ee.ApiFunction._call("Feature",ee.ApiFunction._call("Collection.geometry",arg)):new ee.Feature(arg);case"Element":if(arg instanceof ee.Element){return arg;}if(arg instanceof ee.Geometry){return new ee.Feature(arg);}if(arg instanceof ee.ComputedObject){return new ee.Element(arg.func,arg.args,arg.varName);}throw Error("Cannot convert "+arg+" to Element.");case"Geometry":return arg instanceof ee.FeatureCollection?ee.ApiFunction._call("Collection.geometry",arg):new ee.Geometry(arg);case"FeatureCollection":case"Collection":return arg instanceof ee.Collection?arg:new ee.FeatureCollection(arg);case"ImageCollection":return new ee.ImageCollection(arg);case"Filter":return new ee.Filter(arg);case"Algorithm":if("string"===typeof arg){return new ee.ApiFunction(arg);}if("function"===typeof arg){return ee.CustomFunction.create(arg,"Object",module$contents$goog$array_repeat("Object",arg.length));}if(arg instanceof ee.Encodable){return arg;}throw Error("Argument is not a function: "+arg);case"String":return ee.Types.isString(arg)||arg instanceof ee.String||arg instanceof ee.ComputedObject?new ee.String(arg):arg;case"Dictionary":return ee.Types.isRegularObject(arg)?arg:new ee.Dictionary(arg);case"List":return new ee.List(arg);case"Number":case"Float":case"Long":case"Integer":case"Short":case"Byte":return new ee.Number(arg);default:if(klass in exportedEE){var ctor=ee.ApiFunction.lookupInternal(klass);if(arg instanceof exportedEE[klass]){return arg;}if(ctor){return new exportedEE[klass](arg);}if("string"===typeof arg){if(arg in exportedEE[klass]){return exportedEE[klass][arg].call();}throw Error("Unknown algorithm: "+klass+"."+arg);}return new exportedEE[klass](arg);}return arg;}}};ee.initializeUnboundMethods_=function(){var unbound=ee.ApiFunction.unboundFunctions();module$contents$goog$object_getKeys(unbound).sort().forEach(function(name){var func=unbound[name],signature=func.getSignature();if(!signature.hidden){var nameParts=name.split("."),target=ee.Algorithms;for(target.signature={};1<nameParts.length;){var first=nameParts[0];first in target||(target[first]={signature:{}});target=target[first];nameParts=module$contents$goog$array_slice(nameParts,1);}var bound=function(var_args){return func.callOrApply(void 0,Array.prototype.slice.call(arguments,0));};bound.signature=signature;bound.toString=goog.bind(func.toString,func);target[nameParts[0]]=bound;}});};ee.initializeGeneratedClasses_=function(){var signatures=ee.ApiFunction.allSignatures(),names={},returnTypes={},sig;for(sig in signatures){var type=-1!=sig.indexOf(".")?sig.slice(0,sig.indexOf(".")):sig;names[type]=!0;var rtype=signatures[sig].returns.replace(/<.*>/,"");returnTypes[rtype]=!0;}var exportedEE=goog.global.ee,name;for(name in names){name in returnTypes&&!(name in exportedEE)&&(exportedEE[name]=ee.makeClass_(name),ee.generatedClasses_.push(name),signatures[name]?(exportedEE[name].signature=signatures[name],exportedEE[name].signature.isConstructor=!0,ee.ApiFunction.boundSignatures_[name]=!0):exportedEE[name].signature={});}ee.Types.registerClasses(exportedEE);};ee.resetGeneratedClasses_=function(){for(var exportedEE=goog.global.ee,i=0;i<ee.generatedClasses_.length;i++){var name=ee.generatedClasses_[i];ee.ApiFunction.clearApi(exportedEE[name]);delete exportedEE[name];}ee.generatedClasses_=[];ee.Types.registerClasses(exportedEE);};ee.makeClass_=function(name){var target=function(var_args){var klass=goog.global.ee[name],args=Array.prototype.slice.call(arguments),onlyOneArg=1==args.length;if(onlyOneArg&&args[0]instanceof klass){return args[0];}if(!(this instanceof klass)){return ee.ComputedObject.construct(klass,args);}var ctor=ee.ApiFunction.lookupInternal(name),firstArgIsPrimitive=!(args[0]instanceof ee.ComputedObject),shouldUseConstructor=!1;ctor&&(onlyOneArg?firstArgIsPrimitive?shouldUseConstructor=!0:args[0].func&&args[0].func.getSignature().returns==ctor.getSignature().returns||(shouldUseConstructor=!0):shouldUseConstructor=!0);if(shouldUseConstructor){var namedArgs=ee.Types.useKeywordArgs(args,ctor.getSignature())?args[0]:ctor.nameArgs(args);ee.ComputedObject.call(this,ctor,ctor.promoteArgs(namedArgs));}else{if(!onlyOneArg){throw Error("Too many arguments for ee."+name+"(): "+args);}if(firstArgIsPrimitive){throw Error("Invalid argument for ee."+name+"(): "+args+". Must be a ComputedObject.");}var theOneArg=args[0];ee.ComputedObject.call(this,theOneArg.func,theOneArg.args,theOneArg.varName);}};goog.inherits(target,ee.ComputedObject);target.prototype.name=function(){return name;};ee.ApiFunction.importApi(target,name,name);return target;};ee.Function.registerPromoter(ee.promote_);ee.FloatTileOverlay=function(url,mapId,token){ee.AbstractOverlay.call(this,url,mapId,token);this.tileSize=new google.maps.Size(ee.FloatTileOverlay.TILE_EDGE_LENGTH,ee.FloatTileOverlay.TILE_EDGE_LENGTH);this.floatTiles_=new goog.structs.Map();this.floatTileDivs_=new goog.structs.Map();};$jscomp.inherits(ee.FloatTileOverlay,ee.AbstractOverlay);ee.FloatTileOverlay.prototype.getTile=function(coord,zoom,ownerDocument){var tileId=this.getTileId(coord,zoom),src=[this.url,tileId].join("/")+"?token="+this.token,uniqueTileId=[tileId,this.tileCounter,this.token].join("/");this.tilesLoading.push(uniqueTileId);this.tileCounter+=1;var div=goog.dom.createDom(goog.dom.TagName.DIV),floatTile=this.loadFloatTile_(src,coord,uniqueTileId,div);this.dispatchTileEvent_();return div;};ee.FloatTileOverlay.prototype.loadFloatTile_=function(tileUrl,coord,tileId,div){var tileRequest=goog.net.XmlHttp();tileRequest.open("GET",tileUrl,!0);tileRequest.responseType="arraybuffer";tileRequest.onreadystatechange=goog.bind(function(){if(tileRequest.readyState===XMLHttpRequest.DONE&&200===tileRequest.status){var tileResponse=tileRequest.response;if(tileResponse){var floatBuffer=new Float32Array(tileResponse);this.handleFloatTileLoaded_(floatBuffer,coord,tileId,div);}else{throw this.tilesFailed.add(tileId),Error("Unable to request floating point array buffers.");}}},this);tileRequest.send();};ee.FloatTileOverlay.prototype.handleFloatTileLoaded_=function(floatTile,coord,tileId,div){this.floatTiles_.set(coord,floatTile);this.floatTileDivs_.set(coord,div);module$contents$goog$array_remove(this.tilesLoading,tileId);this.dispatchTileEvent_();};ee.FloatTileOverlay.prototype.getAllFloatTiles=function(){return this.floatTiles_;};ee.FloatTileOverlay.prototype.getAllFloatTileDivs=function(){return this.floatTileDivs_;};ee.FloatTileOverlay.prototype.getLoadedFloatTilesCount=function(){return this.floatTiles_.getCount();};ee.FloatTileOverlay.prototype.dispatchTileEvent_=function(){this.dispatchEvent(new ee.TileEvent(this.tilesLoading.length));};ee.FloatTileOverlay.prototype.disposeInternal=function(){this.floatTileDivs_=this.floatTiles_=null;ee.AbstractOverlay.prototype.disposeInternal.call(this);};goog.exportSymbol("ee.FloatTileOverlay",ee.FloatTileOverlay);ee.FloatTileOverlay.TILE_EDGE_LENGTH=256;ee.layers={};var module$contents$ee$layers$AbstractOverlayStats_AbstractOverlayStats=function(uniqueId){this.statsByZoom_=new Map();this.uniqueId_=uniqueId;};module$contents$ee$layers$AbstractOverlayStats_AbstractOverlayStats.prototype.addTileStats=function(start,end,zoom){this.getStatsForZoom_(zoom).tileLatencies.push(end-start);};module$contents$ee$layers$AbstractOverlayStats_AbstractOverlayStats.prototype.incrementThrottleCounter=function(zoom){this.getStatsForZoom_(zoom).throttleCount++;};module$contents$ee$layers$AbstractOverlayStats_AbstractOverlayStats.prototype.incrementErrorCounter=function(zoom){this.getStatsForZoom_(zoom).errorCount++;};module$contents$ee$layers$AbstractOverlayStats_AbstractOverlayStats.prototype.clear=function(){this.statsByZoom_.clear();};module$contents$ee$layers$AbstractOverlayStats_AbstractOverlayStats.prototype.hasData=function(){return 0<this.statsByZoom_.size;};module$contents$ee$layers$AbstractOverlayStats_AbstractOverlayStats.prototype.getSummaryList=function(){var $jscomp$this=this,summaryList=[];this.statsByZoom_.forEach(function(stats,zoom){return summaryList.push({layerId:$jscomp$this.uniqueId_,zoomLevel:zoom,tileLatencies:stats.tileLatencies,throttleCount:stats.throttleCount,errorCount:stats.errorCount});});return summaryList;};module$contents$ee$layers$AbstractOverlayStats_AbstractOverlayStats.prototype.getStatsForZoom_=function(zoom){this.statsByZoom_.has(zoom)||this.statsByZoom_.set(zoom,{throttleCount:0,errorCount:0,tileLatencies:[]});return this.statsByZoom_.get(zoom);};module$contents$ee$layers$AbstractOverlayStats_AbstractOverlayStats.LayerStatsForZoomLevel=function(){};module$contents$ee$layers$AbstractOverlayStats_AbstractOverlayStats.Summary=function(){};ee.layers.AbstractOverlayStats=module$contents$ee$layers$AbstractOverlayStats_AbstractOverlayStats;goog.events.EventHandler=function(opt_scope){goog.Disposable.call(this);this.handler_=opt_scope;this.keys_={};};goog.inherits(goog.events.EventHandler,goog.Disposable);goog.events.EventHandler.typeArray_=[];goog.events.EventHandler.prototype.listen=function(src,type,opt_fn,opt_options){return this.listen_(src,type,opt_fn,opt_options);};goog.events.EventHandler.prototype.listenWithScope=function(src,type,fn,options,scope){return this.listen_(src,type,fn,options,scope);};goog.events.EventHandler.prototype.listen_=function(src,type,opt_fn,opt_options,opt_scope){Array.isArray(type)||(type&&(goog.events.EventHandler.typeArray_[0]=type.toString()),type=goog.events.EventHandler.typeArray_);for(var i=0;i<type.length;i++){var listenerObj=goog.events.listen(src,type[i],opt_fn||this.handleEvent,opt_options||!1,opt_scope||this.handler_||this);if(!listenerObj){break;}this.keys_[listenerObj.key]=listenerObj;}return this;};goog.events.EventHandler.prototype.listenOnce=function(src,type,opt_fn,opt_options){return this.listenOnce_(src,type,opt_fn,opt_options);};goog.events.EventHandler.prototype.listenOnceWithScope=function(src,type,fn,capture,scope){return this.listenOnce_(src,type,fn,capture,scope);};goog.events.EventHandler.prototype.listenOnce_=function(src,type,opt_fn,opt_options,opt_scope){if(Array.isArray(type)){for(var i=0;i<type.length;i++){this.listenOnce_(src,type[i],opt_fn,opt_options,opt_scope);}}else{var listenerObj=goog.events.listenOnce(src,type,opt_fn||this.handleEvent,opt_options,opt_scope||this.handler_||this);if(!listenerObj){return this;}this.keys_[listenerObj.key]=listenerObj;}return this;};goog.events.EventHandler.prototype.listenWithWrapper=function(src,wrapper,listener,opt_capt){return this.listenWithWrapper_(src,wrapper,listener,opt_capt);};goog.events.EventHandler.prototype.listenWithWrapperAndScope=function(src,wrapper,listener,capture,scope){return this.listenWithWrapper_(src,wrapper,listener,capture,scope);};goog.events.EventHandler.prototype.listenWithWrapper_=function(src,wrapper,listener,opt_capt,opt_scope){wrapper.listen(src,listener,opt_capt,opt_scope||this.handler_||this,this);return this;};goog.events.EventHandler.prototype.getListenerCount=function(){var count=0,key;for(key in this.keys_){Object.prototype.hasOwnProperty.call(this.keys_,key)&&count++;}return count;};goog.events.EventHandler.prototype.unlisten=function(src,type,opt_fn,opt_options,opt_scope){if(Array.isArray(type)){for(var i=0;i<type.length;i++){this.unlisten(src,type[i],opt_fn,opt_options,opt_scope);}}else{var listener=goog.events.getListener(src,type,opt_fn||this.handleEvent,goog.isObject(opt_options)?!!opt_options.capture:!!opt_options,opt_scope||this.handler_||this);listener&&(goog.events.unlistenByKey(listener),delete this.keys_[listener.key]);}return this;};goog.events.EventHandler.prototype.unlistenWithWrapper=function(src,wrapper,listener,opt_capt,opt_scope){wrapper.unlisten(src,listener,opt_capt,opt_scope||this.handler_||this,this);return this;};goog.events.EventHandler.prototype.removeAll=function(){module$contents$goog$object_forEach(this.keys_,function(listenerObj,key){this.keys_.hasOwnProperty(key)&&goog.events.unlistenByKey(listenerObj);},this);this.keys_={};};goog.events.EventHandler.prototype.disposeInternal=function(){goog.events.EventHandler.superClass_.disposeInternal.call(this);this.removeAll();};goog.events.EventHandler.prototype.handleEvent=function(e){throw Error("EventHandler.handleEvent not implemented");};goog.fs.DOMErrorLike=function(){};goog.fs.Error=function(error,action){if(void 0!==error.name){this.name=error.name,this.code=goog.fs.Error.getCodeFromName_(error.name);}else{var code=goog.asserts.assertNumber(error.code);this.code=code;this.name=goog.fs.Error.getNameFromCode_(code);}module$contents$goog$debug$Error_DebugError.call(this,goog.string.subs("%s %s",this.name,action));};goog.inherits(goog.fs.Error,module$contents$goog$debug$Error_DebugError);goog.fs.Error.ErrorName={ABORT:"AbortError",ENCODING:"EncodingError",INVALID_MODIFICATION:"InvalidModificationError",INVALID_STATE:"InvalidStateError",NOT_FOUND:"NotFoundError",NOT_READABLE:"NotReadableError",NO_MODIFICATION_ALLOWED:"NoModificationAllowedError",PATH_EXISTS:"PathExistsError",QUOTA_EXCEEDED:"QuotaExceededError",SECURITY:"SecurityError",SYNTAX:"SyntaxError",TYPE_MISMATCH:"TypeMismatchError"};goog.fs.Error.ErrorCode={NOT_FOUND:1,SECURITY:2,ABORT:3,NOT_READABLE:4,ENCODING:5,NO_MODIFICATION_ALLOWED:6,INVALID_STATE:7,SYNTAX:8,INVALID_MODIFICATION:9,QUOTA_EXCEEDED:10,TYPE_MISMATCH:11,PATH_EXISTS:12};goog.fs.Error.getNameFromCode_=function(code){var name=module$contents$goog$object_findKey(goog.fs.Error.NameToCodeMap_,function(c){return code==c;});if(void 0===name){throw Error("Invalid code: "+code);}return name;};goog.fs.Error.getCodeFromName_=function(name){return goog.fs.Error.NameToCodeMap_[name];};var $jscomp$compprop4={};goog.fs.Error.NameToCodeMap_=($jscomp$compprop4[goog.fs.Error.ErrorName.ABORT]=goog.fs.Error.ErrorCode.ABORT,$jscomp$compprop4[goog.fs.Error.ErrorName.ENCODING]=goog.fs.Error.ErrorCode.ENCODING,$jscomp$compprop4[goog.fs.Error.ErrorName.INVALID_MODIFICATION]=goog.fs.Error.ErrorCode.INVALID_MODIFICATION,$jscomp$compprop4[goog.fs.Error.ErrorName.INVALID_STATE]=goog.fs.Error.ErrorCode.INVALID_STATE,$jscomp$compprop4[goog.fs.Error.ErrorName.NOT_FOUND]=goog.fs.Error.ErrorCode.NOT_FOUND,$jscomp$compprop4[goog.fs.Error.ErrorName.NOT_READABLE]=goog.fs.Error.ErrorCode.NOT_READABLE,$jscomp$compprop4[goog.fs.Error.ErrorName.NO_MODIFICATION_ALLOWED]=goog.fs.Error.ErrorCode.NO_MODIFICATION_ALLOWED,$jscomp$compprop4[goog.fs.Error.ErrorName.PATH_EXISTS]=goog.fs.Error.ErrorCode.PATH_EXISTS,$jscomp$compprop4[goog.fs.Error.ErrorName.QUOTA_EXCEEDED]=goog.fs.Error.ErrorCode.QUOTA_EXCEEDED,$jscomp$compprop4[goog.fs.Error.ErrorName.SECURITY]=goog.fs.Error.ErrorCode.SECURITY,$jscomp$compprop4[goog.fs.Error.ErrorName.SYNTAX]=goog.fs.Error.ErrorCode.SYNTAX,$jscomp$compprop4[goog.fs.Error.ErrorName.TYPE_MISMATCH]=goog.fs.Error.ErrorCode.TYPE_MISMATCH,$jscomp$compprop4);goog.fs.ProgressEvent=function(event,target){goog.events.Event.call(this,event.type,target);this.event_=event;};goog.inherits(goog.fs.ProgressEvent,goog.events.Event);goog.fs.ProgressEvent.prototype.isLengthComputable=function(){return this.event_.lengthComputable;};goog.fs.ProgressEvent.prototype.getLoaded=function(){return this.event_.loaded;};goog.fs.ProgressEvent.prototype.getTotal=function(){return this.event_.total;};goog.fs.FileReader=function(){goog.events.EventTarget.call(this);this.reader_=new FileReader();this.reader_.onloadstart=goog.bind(this.dispatchProgressEvent_,this);this.reader_.onprogress=goog.bind(this.dispatchProgressEvent_,this);this.reader_.onload=goog.bind(this.dispatchProgressEvent_,this);this.reader_.onabort=goog.bind(this.dispatchProgressEvent_,this);this.reader_.onerror=goog.bind(this.dispatchProgressEvent_,this);this.reader_.onloadend=goog.bind(this.dispatchProgressEvent_,this);};goog.inherits(goog.fs.FileReader,goog.events.EventTarget);goog.fs.FileReader.ReadyState={INIT:0,LOADING:1,DONE:2};goog.fs.FileReader.EventType={LOAD_START:"loadstart",PROGRESS:"progress",LOAD:"load",ABORT:"abort",ERROR:"error",LOAD_END:"loadend"};goog.fs.FileReader.prototype.abort=function(){try{this.reader_.abort();}catch(e){throw new goog.fs.Error(e,"aborting read");}};goog.fs.FileReader.prototype.getReadyState=function(){return this.reader_.readyState;};goog.fs.FileReader.prototype.getResult=function(){return this.reader_.result;};goog.fs.FileReader.prototype.getError=function(){return this.reader_.error&&new goog.fs.Error(this.reader_.error,"reading file");};goog.fs.FileReader.prototype.dispatchProgressEvent_=function(event){this.dispatchEvent(new goog.fs.ProgressEvent(event,this));};goog.fs.FileReader.prototype.disposeInternal=function(){goog.fs.FileReader.superClass_.disposeInternal.call(this);delete this.reader_;};goog.fs.FileReader.prototype.readAsBinaryString=function(blob){this.reader_.readAsBinaryString(blob);};goog.fs.FileReader.readAsBinaryString=function(blob){var reader=new goog.fs.FileReader(),d=goog.fs.FileReader.createDeferred_(reader);reader.readAsBinaryString(blob);return d;};goog.fs.FileReader.prototype.readAsArrayBuffer=function(blob){this.reader_.readAsArrayBuffer(blob);};goog.fs.FileReader.readAsArrayBuffer=function(blob){var reader=new goog.fs.FileReader(),d=goog.fs.FileReader.createDeferred_(reader);reader.readAsArrayBuffer(blob);return d;};goog.fs.FileReader.prototype.readAsText=function(blob,opt_encoding){this.reader_.readAsText(blob,opt_encoding);};goog.fs.FileReader.readAsText=function(blob,opt_encoding){var reader=new goog.fs.FileReader(),d=goog.fs.FileReader.createDeferred_(reader);reader.readAsText(blob,opt_encoding);return d;};goog.fs.FileReader.prototype.readAsDataUrl=function(blob){this.reader_.readAsDataURL(blob);};goog.fs.FileReader.readAsDataUrl=function(blob){var reader=new goog.fs.FileReader(),d=goog.fs.FileReader.createDeferred_(reader);reader.readAsDataUrl(blob);return d;};goog.fs.FileReader.createDeferred_=function(reader){var deferred=new goog.async.Deferred();reader.listen(goog.fs.FileReader.EventType.LOAD_END,goog.partial(function(d,r,e){var result=r.getResult(),error=r.getError();null==result||error?d.errback(error):d.callback(result);r.dispose();},deferred,reader));return deferred;};goog.dom.vendor={};goog.dom.vendor.getVendorJsPrefix=function(){return goog.userAgent.WEBKIT?"Webkit":goog.userAgent.GECKO?"Moz":goog.userAgent.IE?"ms":null;};goog.dom.vendor.getVendorPrefix=function(){return goog.userAgent.WEBKIT?"-webkit":goog.userAgent.GECKO?"-moz":goog.userAgent.IE?"-ms":null;};goog.dom.vendor.getPrefixedPropertyName=function(propertyName,opt_object){if(opt_object&&propertyName in opt_object){return propertyName;}var prefix=goog.dom.vendor.getVendorJsPrefix();if(prefix){prefix=prefix.toLowerCase();var prefixedPropertyName=prefix+goog.string.toTitleCase(propertyName);return void 0===opt_object||prefixedPropertyName in opt_object?prefixedPropertyName:null;}return null;};goog.dom.vendor.getPrefixedEventType=function(eventType){return((goog.dom.vendor.getVendorJsPrefix()||"")+eventType).toLowerCase();};goog.math.Box=function(top,right,bottom,left){this.top=top;this.right=right;this.bottom=bottom;this.left=left;};goog.math.Box.boundingBox=function(var_args){for(var box=new goog.math.Box(arguments[0].y,arguments[0].x,arguments[0].y,arguments[0].x),i=1;i<arguments.length;i++){box.expandToIncludeCoordinate(arguments[i]);}return box;};goog.math.Box.prototype.getWidth=function(){return this.right-this.left;};goog.math.Box.prototype.getHeight=function(){return this.bottom-this.top;};goog.math.Box.prototype.clone=function(){return new goog.math.Box(this.top,this.right,this.bottom,this.left);};goog.DEBUG&&(goog.math.Box.prototype.toString=function(){return"("+this.top+"t, "+this.right+"r, "+this.bottom+"b, "+this.left+"l)";});goog.math.Box.prototype.contains=function(other){return goog.math.Box.contains(this,other);};goog.math.Box.prototype.expand=function(top,opt_right,opt_bottom,opt_left){goog.isObject(top)?(this.top-=top.top,this.right+=top.right,this.bottom+=top.bottom,this.left-=top.left):(this.top-=top,this.right+=Number(opt_right),this.bottom+=Number(opt_bottom),this.left-=Number(opt_left));return this;};goog.math.Box.prototype.expandToInclude=function(box){this.left=Math.min(this.left,box.left);this.top=Math.min(this.top,box.top);this.right=Math.max(this.right,box.right);this.bottom=Math.max(this.bottom,box.bottom);};goog.math.Box.prototype.expandToIncludeCoordinate=function(coord){this.top=Math.min(this.top,coord.y);this.right=Math.max(this.right,coord.x);this.bottom=Math.max(this.bottom,coord.y);this.left=Math.min(this.left,coord.x);};goog.math.Box.equals=function(a,b){return a==b?!0:a&&b?a.top==b.top&&a.right==b.right&&a.bottom==b.bottom&&a.left==b.left:!1;};goog.math.Box.contains=function(box,other){return box&&other?other instanceof goog.math.Box?other.left>=box.left&&other.right<=box.right&&other.top>=box.top&&other.bottom<=box.bottom:other.x>=box.left&&other.x<=box.right&&other.y>=box.top&&other.y<=box.bottom:!1;};goog.math.Box.relativePositionX=function(box,coord){return coord.x<box.left?coord.x-box.left:coord.x>box.right?coord.x-box.right:0;};goog.math.Box.relativePositionY=function(box,coord){return coord.y<box.top?coord.y-box.top:coord.y>box.bottom?coord.y-box.bottom:0;};goog.math.Box.distance=function(box,coord){var x=goog.math.Box.relativePositionX(box,coord),y=goog.math.Box.relativePositionY(box,coord);return Math.sqrt(x*x+y*y);};goog.math.Box.intersects=function(a,b){return a.left<=b.right&&b.left<=a.right&&a.top<=b.bottom&&b.top<=a.bottom;};goog.math.Box.intersectsWithPadding=function(a,b,padding){return a.left<=b.right+padding&&b.left<=a.right+padding&&a.top<=b.bottom+padding&&b.top<=a.bottom+padding;};goog.math.Box.prototype.ceil=function(){this.top=Math.ceil(this.top);this.right=Math.ceil(this.right);this.bottom=Math.ceil(this.bottom);this.left=Math.ceil(this.left);return this;};goog.math.Box.prototype.floor=function(){this.top=Math.floor(this.top);this.right=Math.floor(this.right);this.bottom=Math.floor(this.bottom);this.left=Math.floor(this.left);return this;};goog.math.Box.prototype.round=function(){this.top=Math.round(this.top);this.right=Math.round(this.right);this.bottom=Math.round(this.bottom);this.left=Math.round(this.left);return this;};goog.math.Box.prototype.translate=function(tx,opt_ty){tx instanceof goog.math.Coordinate?(this.left+=tx.x,this.right+=tx.x,this.top+=tx.y,this.bottom+=tx.y):(goog.asserts.assertNumber(tx),this.left+=tx,this.right+=tx,"number"===typeof opt_ty&&(this.top+=opt_ty,this.bottom+=opt_ty));return this;};goog.math.Box.prototype.scale=function(sx,opt_sy){var sy="number"===typeof opt_sy?opt_sy:sx;this.left*=sx;this.right*=sx;this.top*=sy;this.bottom*=sy;return this;};goog.math.IRect=function(){};goog.math.Rect=function(x,y,w,h){this.left=x;this.top=y;this.width=w;this.height=h;};goog.math.Rect.prototype.clone=function(){return new goog.math.Rect(this.left,this.top,this.width,this.height);};goog.math.Rect.prototype.toBox=function(){return new goog.math.Box(this.top,this.left+this.width,this.top+this.height,this.left);};goog.math.Rect.createFromPositionAndSize=function(position,size){return new goog.math.Rect(position.x,position.y,size.width,size.height);};goog.math.Rect.createFromBox=function(box){return new goog.math.Rect(box.left,box.top,box.right-box.left,box.bottom-box.top);};goog.DEBUG&&(goog.math.Rect.prototype.toString=function(){return"("+this.left+", "+this.top+" - "+this.width+"w x "+this.height+"h)";});goog.math.Rect.equals=function(a,b){return a==b?!0:a&&b?a.left==b.left&&a.width==b.width&&a.top==b.top&&a.height==b.height:!1;};goog.math.Rect.prototype.intersection=function(rect){var x0=Math.max(this.left,rect.left),x1=Math.min(this.left+this.width,rect.left+rect.width);if(x0<=x1){var y0=Math.max(this.top,rect.top),y1=Math.min(this.top+this.height,rect.top+rect.height);if(y0<=y1){return this.left=x0,this.top=y0,this.width=x1-x0,this.height=y1-y0,!0;}}return!1;};goog.math.Rect.intersection=function(a,b){var x0=Math.max(a.left,b.left),x1=Math.min(a.left+a.width,b.left+b.width);if(x0<=x1){var y0=Math.max(a.top,b.top),y1=Math.min(a.top+a.height,b.top+b.height);if(y0<=y1){return new goog.math.Rect(x0,y0,x1-x0,y1-y0);}}return null;};goog.math.Rect.intersects=function(a,b){return a.left<=b.left+b.width&&b.left<=a.left+a.width&&a.top<=b.top+b.height&&b.top<=a.top+a.height;};goog.math.Rect.prototype.intersects=function(rect){return goog.math.Rect.intersects(this,rect);};goog.math.Rect.difference=function(a,b){var intersection=goog.math.Rect.intersection(a,b);if(!intersection||!intersection.height||!intersection.width){return[a.clone()];}var result=[],top=a.top,height=a.height,ar=a.left+a.width,ab=a.top+a.height,br=b.left+b.width,bb=b.top+b.height;b.top>a.top&&(result.push(new goog.math.Rect(a.left,a.top,a.width,b.top-a.top)),top=b.top,height-=b.top-a.top);bb<ab&&(result.push(new goog.math.Rect(a.left,bb,a.width,ab-bb)),height=bb-top);b.left>a.left&&result.push(new goog.math.Rect(a.left,top,b.left-a.left,height));br<ar&&result.push(new goog.math.Rect(br,top,ar-br,height));return result;};goog.math.Rect.prototype.difference=function(rect){return goog.math.Rect.difference(this,rect);};goog.math.Rect.prototype.boundingRect=function(rect){var right=Math.max(this.left+this.width,rect.left+rect.width),bottom=Math.max(this.top+this.height,rect.top+rect.height);this.left=Math.min(this.left,rect.left);this.top=Math.min(this.top,rect.top);this.width=right-this.left;this.height=bottom-this.top;};goog.math.Rect.boundingRect=function(a,b){if(!a||!b){return null;}var newRect=new goog.math.Rect(a.left,a.top,a.width,a.height);newRect.boundingRect(b);return newRect;};goog.math.Rect.prototype.contains=function(another){return another instanceof goog.math.Coordinate?another.x>=this.left&&another.x<=this.left+this.width&&another.y>=this.top&&another.y<=this.top+this.height:this.left<=another.left&&this.left+this.width>=another.left+another.width&&this.top<=another.top&&this.top+this.height>=another.top+another.height;};goog.math.Rect.prototype.squaredDistance=function(point){var dx=point.x<this.left?this.left-point.x:Math.max(point.x-(this.left+this.width),0),dy=point.y<this.top?this.top-point.y:Math.max(point.y-(this.top+this.height),0);return dx*dx+dy*dy;};goog.math.Rect.prototype.distance=function(point){return Math.sqrt(this.squaredDistance(point));};goog.math.Rect.prototype.getSize=function(){return new goog.math.Size(this.width,this.height);};goog.math.Rect.prototype.getTopLeft=function(){return new goog.math.Coordinate(this.left,this.top);};goog.math.Rect.prototype.getCenter=function(){return new goog.math.Coordinate(this.left+this.width/2,this.top+this.height/2);};goog.math.Rect.prototype.getBottomRight=function(){return new goog.math.Coordinate(this.left+this.width,this.top+this.height);};goog.math.Rect.prototype.ceil=function(){this.left=Math.ceil(this.left);this.top=Math.ceil(this.top);this.width=Math.ceil(this.width);this.height=Math.ceil(this.height);return this;};goog.math.Rect.prototype.floor=function(){this.left=Math.floor(this.left);this.top=Math.floor(this.top);this.width=Math.floor(this.width);this.height=Math.floor(this.height);return this;};goog.math.Rect.prototype.round=function(){this.left=Math.round(this.left);this.top=Math.round(this.top);this.width=Math.round(this.width);this.height=Math.round(this.height);return this;};goog.math.Rect.prototype.translate=function(tx,opt_ty){tx instanceof goog.math.Coordinate?(this.left+=tx.x,this.top+=tx.y):(this.left+=goog.asserts.assertNumber(tx),"number"===typeof opt_ty&&(this.top+=opt_ty));return this;};goog.math.Rect.prototype.scale=function(sx,opt_sy){var sy="number"===typeof opt_sy?opt_sy:sx;this.left*=sx;this.width*=sx;this.top*=sy;this.height*=sy;return this;};goog.style={};goog.style.setStyle=function(element,style,opt_value){if("string"===typeof style){goog.style.setStyle_(element,opt_value,style);}else{for(var key in style){goog.style.setStyle_(element,style[key],key);}}};goog.style.setStyle_=function(element,value,style){var propertyName=goog.style.getVendorJsStyleName_(element,style);propertyName&&(element.style[propertyName]=value);};goog.style.styleNameCache_={};goog.style.getVendorJsStyleName_=function(element,style){var propertyName=goog.style.styleNameCache_[style];if(!propertyName){var camelStyle=goog.string.toCamelCase(style);propertyName=camelStyle;if(void 0===element.style[camelStyle]){var prefixedStyle=goog.dom.vendor.getVendorJsPrefix()+goog.string.toTitleCase(camelStyle);void 0!==element.style[prefixedStyle]&&(propertyName=prefixedStyle);}goog.style.styleNameCache_[style]=propertyName;}return propertyName;};goog.style.getVendorStyleName_=function(element,style){var camelStyle=goog.string.toCamelCase(style);if(void 0===element.style[camelStyle]){var prefixedStyle=goog.dom.vendor.getVendorJsPrefix()+goog.string.toTitleCase(camelStyle);if(void 0!==element.style[prefixedStyle]){return goog.dom.vendor.getVendorPrefix()+"-"+style;}}return style;};goog.style.getStyle=function(element,property){var styleValue=element.style[goog.string.toCamelCase(property)];return"undefined"!==typeof styleValue?styleValue:element.style[goog.style.getVendorJsStyleName_(element,property)]||"";};goog.style.getComputedStyle=function(element,property){var doc=goog.dom.getOwnerDocument(element);if(doc.defaultView&&doc.defaultView.getComputedStyle){var styles=doc.defaultView.getComputedStyle(element,null);if(styles){return styles[property]||styles.getPropertyValue(property)||"";}}return"";};goog.style.getCascadedStyle=function(element,style){return element.currentStyle?element.currentStyle[style]:null;};goog.style.getStyle_=function(element,style){return goog.style.getComputedStyle(element,style)||goog.style.getCascadedStyle(element,style)||element.style&&element.style[style];};goog.style.getComputedBoxSizing=function(element){return goog.style.getStyle_(element,"boxSizing")||goog.style.getStyle_(element,"MozBoxSizing")||goog.style.getStyle_(element,"WebkitBoxSizing")||null;};goog.style.getComputedPosition=function(element){return goog.style.getStyle_(element,"position");};goog.style.getBackgroundColor=function(element){return goog.style.getStyle_(element,"backgroundColor");};goog.style.getComputedOverflowX=function(element){return goog.style.getStyle_(element,"overflowX");};goog.style.getComputedOverflowY=function(element){return goog.style.getStyle_(element,"overflowY");};goog.style.getComputedZIndex=function(element){return goog.style.getStyle_(element,"zIndex");};goog.style.getComputedTextAlign=function(element){return goog.style.getStyle_(element,"textAlign");};goog.style.getComputedCursor=function(element){return goog.style.getStyle_(element,"cursor");};goog.style.getComputedTransform=function(element){var property=goog.style.getVendorStyleName_(element,"transform");return goog.style.getStyle_(element,property)||goog.style.getStyle_(element,"transform");};goog.style.setPosition=function(el,arg1,opt_arg2){if(arg1 instanceof goog.math.Coordinate){var x=arg1.x;var y=arg1.y;}else{x=arg1,y=opt_arg2;}el.style.left=goog.style.getPixelStyleValue_(x,!1);el.style.top=goog.style.getPixelStyleValue_(y,!1);};goog.style.getPosition=function(element){return new goog.math.Coordinate(element.offsetLeft,element.offsetTop);};goog.style.getClientViewportElement=function(opt_node){var doc=opt_node?goog.dom.getOwnerDocument(opt_node):goog.dom.getDocument();return!goog.userAgent.IE||goog.userAgent.isDocumentModeOrHigher(9)||goog.dom.getDomHelper(doc).isCss1CompatMode()?doc.documentElement:doc.body;};goog.style.getViewportPageOffset=function(doc){var body=doc.body,documentElement=doc.documentElement;return new goog.math.Coordinate(body.scrollLeft||documentElement.scrollLeft,body.scrollTop||documentElement.scrollTop);};goog.style.getBoundingClientRect_=function(el){try{return el.getBoundingClientRect();}catch(e){return{left:0,top:0,right:0,bottom:0};}};goog.style.getOffsetParent=function(element){if(goog.userAgent.IE&&!goog.userAgent.isDocumentModeOrHigher(8)){return goog.asserts.assert(element&&"offsetParent"in element),element.offsetParent;}for(var doc=goog.dom.getOwnerDocument(element),positionStyle=goog.style.getStyle_(element,"position"),skipStatic="fixed"==positionStyle||"absolute"==positionStyle,parent=element.parentNode;parent&&parent!=doc;parent=parent.parentNode){if(parent.nodeType==goog.dom.NodeType.DOCUMENT_FRAGMENT&&parent.host&&(parent=parent.host),positionStyle=goog.style.getStyle_(parent,"position"),skipStatic=skipStatic&&"static"==positionStyle&&parent!=doc.documentElement&&parent!=doc.body,!skipStatic&&(parent.scrollWidth>parent.clientWidth||parent.scrollHeight>parent.clientHeight||"fixed"==positionStyle||"absolute"==positionStyle||"relative"==positionStyle)){return parent;}}return null;};goog.style.getVisibleRectForElement=function(element){for(var visibleRect=new goog.math.Box(0,Infinity,Infinity,0),dom=goog.dom.getDomHelper(element),body=dom.getDocument().body,documentElement=dom.getDocument().documentElement,scrollEl=dom.getDocumentScrollElement(),el=element;el=goog.style.getOffsetParent(el);){if(!(goog.userAgent.IE&&0==el.clientWidth||goog.userAgent.WEBKIT&&0==el.clientHeight&&el==body)&&el!=body&&el!=documentElement&&"visible"!=goog.style.getStyle_(el,"overflow")){var pos=goog.style.getPageOffset(el),client=goog.style.getClientLeftTop(el);pos.x+=client.x;pos.y+=client.y;visibleRect.top=Math.max(visibleRect.top,pos.y);visibleRect.right=Math.min(visibleRect.right,pos.x+el.clientWidth);visibleRect.bottom=Math.min(visibleRect.bottom,pos.y+el.clientHeight);visibleRect.left=Math.max(visibleRect.left,pos.x);}}var scrollX=scrollEl.scrollLeft,scrollY=scrollEl.scrollTop;visibleRect.left=Math.max(visibleRect.left,scrollX);visibleRect.top=Math.max(visibleRect.top,scrollY);var winSize=dom.getViewportSize();visibleRect.right=Math.min(visibleRect.right,scrollX+winSize.width);visibleRect.bottom=Math.min(visibleRect.bottom,scrollY+winSize.height);return 0<=visibleRect.top&&0<=visibleRect.left&&visibleRect.bottom>visibleRect.top&&visibleRect.right>visibleRect.left?visibleRect:null;};goog.style.getContainerOffsetToScrollInto=function(element,opt_container,opt_center){var container=opt_container||goog.dom.getDocumentScrollElement(),elementPos=goog.style.getPageOffset(element),containerPos=goog.style.getPageOffset(container),containerBorder=goog.style.getBorderBox(container);if(container==goog.dom.getDocumentScrollElement()){var relX=elementPos.x-container.scrollLeft,relY=elementPos.y-container.scrollTop;goog.userAgent.IE&&!goog.userAgent.isDocumentModeOrHigher(10)&&(relX+=containerBorder.left,relY+=containerBorder.top);}else{relX=elementPos.x-containerPos.x-containerBorder.left,relY=elementPos.y-containerPos.y-containerBorder.top;}var elementSize=goog.style.getSizeWithDisplay_(element),spaceX=container.clientWidth-elementSize.width,spaceY=container.clientHeight-elementSize.height,scrollLeft=container.scrollLeft,scrollTop=container.scrollTop;opt_center?(scrollLeft+=relX-spaceX/2,scrollTop+=relY-spaceY/2):(scrollLeft+=Math.min(relX,Math.max(relX-spaceX,0)),scrollTop+=Math.min(relY,Math.max(relY-spaceY,0)));return new goog.math.Coordinate(scrollLeft,scrollTop);};goog.style.scrollIntoContainerView=function(element,opt_container,opt_center){var container=opt_container||goog.dom.getDocumentScrollElement(),offset=goog.style.getContainerOffsetToScrollInto(element,container,opt_center);container.scrollLeft=offset.x;container.scrollTop=offset.y;};goog.style.getClientLeftTop=function(el){return new goog.math.Coordinate(el.clientLeft,el.clientTop);};goog.style.getPageOffset=function(el){var doc=goog.dom.getOwnerDocument(el);goog.asserts.assertObject(el,"Parameter is required");var pos=new goog.math.Coordinate(0,0),viewportElement=goog.style.getClientViewportElement(doc);if(el==viewportElement){return pos;}var box=goog.style.getBoundingClientRect_(el),scrollCoord=goog.dom.getDomHelper(doc).getDocumentScroll();pos.x=box.left+scrollCoord.x;pos.y=box.top+scrollCoord.y;return pos;};goog.style.getPageOffsetLeft=function(el){return goog.style.getPageOffset(el).x;};goog.style.getPageOffsetTop=function(el){return goog.style.getPageOffset(el).y;};goog.style.getFramedPageOffset=function(el,relativeWin){var position=new goog.math.Coordinate(0,0),currentWin=goog.dom.getWindow(goog.dom.getOwnerDocument(el));if(!goog.reflect.canAccessProperty(currentWin,"parent")){return position;}var currentEl=el;do{var offset=currentWin==relativeWin?goog.style.getPageOffset(currentEl):goog.style.getClientPositionForElement_(goog.asserts.assert(currentEl));position.x+=offset.x;position.y+=offset.y;}while(currentWin&¤tWin!=relativeWin&¤tWin!=currentWin.parent&&(currentEl=currentWin.frameElement)&&(currentWin=currentWin.parent));return position;};goog.style.translateRectForAnotherFrame=function(rect,origBase,newBase){if(origBase.getDocument()!=newBase.getDocument()){var body=origBase.getDocument().body,pos=goog.style.getFramedPageOffset(body,newBase.getWindow());pos=goog.math.Coordinate.difference(pos,goog.style.getPageOffset(body));!goog.userAgent.IE||goog.userAgent.isDocumentModeOrHigher(9)||origBase.isCss1CompatMode()||(pos=goog.math.Coordinate.difference(pos,origBase.getDocumentScroll()));rect.left+=pos.x;rect.top+=pos.y;}};goog.style.getRelativePosition=function(a,b){var ap=goog.style.getClientPosition(a),bp=goog.style.getClientPosition(b);return new goog.math.Coordinate(ap.x-bp.x,ap.y-bp.y);};goog.style.getClientPositionForElement_=function(el){var box=goog.style.getBoundingClientRect_(el);return new goog.math.Coordinate(box.left,box.top);};goog.style.getClientPosition=function(el){goog.asserts.assert(el);if(el.nodeType==goog.dom.NodeType.ELEMENT){return goog.style.getClientPositionForElement_(el);}var targetEvent=el.changedTouches?el.changedTouches[0]:el;return new goog.math.Coordinate(targetEvent.clientX,targetEvent.clientY);};goog.style.setPageOffset=function(el,x,opt_y){var cur=goog.style.getPageOffset(el);x instanceof goog.math.Coordinate&&(opt_y=x.y,x=x.x);var dx=goog.asserts.assertNumber(x)-cur.x;goog.style.setPosition(el,el.offsetLeft+dx,el.offsetTop+(Number(opt_y)-cur.y));};goog.style.setSize=function(element,w,opt_h){if(w instanceof goog.math.Size){var h=w.height;w=w.width;}else{if(void 0==opt_h){throw Error("missing height argument");}h=opt_h;}goog.style.setWidth(element,w);goog.style.setHeight(element,h);};goog.style.getPixelStyleValue_=function(value,round){"number"==typeof value&&(value=(round?Math.round(value):value)+"px");return value;};goog.style.setHeight=function(element,height){element.style.height=goog.style.getPixelStyleValue_(height,!0);};goog.style.setWidth=function(element,width){element.style.width=goog.style.getPixelStyleValue_(width,!0);};goog.style.getSize=function(element){return goog.style.evaluateWithTemporaryDisplay_(goog.style.getSizeWithDisplay_,element);};goog.style.evaluateWithTemporaryDisplay_=function(fn,element){if("none"!=goog.style.getStyle_(element,"display")){return fn(element);}var style=element.style,originalDisplay=style.display,originalVisibility=style.visibility,originalPosition=style.position;style.visibility="hidden";style.position="absolute";style.display="inline";var retVal=fn(element);style.display=originalDisplay;style.position=originalPosition;style.visibility=originalVisibility;return retVal;};goog.style.getSizeWithDisplay_=function(element){var offsetWidth=element.offsetWidth,offsetHeight=element.offsetHeight,webkitOffsetsZero=goog.userAgent.WEBKIT&&!offsetWidth&&!offsetHeight;if((void 0===offsetWidth||webkitOffsetsZero)&&element.getBoundingClientRect){var clientRect=goog.style.getBoundingClientRect_(element);return new goog.math.Size(clientRect.right-clientRect.left,clientRect.bottom-clientRect.top);}return new goog.math.Size(offsetWidth,offsetHeight);};goog.style.getTransformedSize=function(element){if(!element.getBoundingClientRect){return null;}var clientRect=goog.style.evaluateWithTemporaryDisplay_(goog.style.getBoundingClientRect_,element);return new goog.math.Size(clientRect.right-clientRect.left,clientRect.bottom-clientRect.top);};goog.style.getBounds=function(element){var o=goog.style.getPageOffset(element),s=goog.style.getSize(element);return new goog.math.Rect(o.x,o.y,s.width,s.height);};goog.style.toCamelCase=function(selector){return goog.string.toCamelCase(String(selector));};goog.style.toSelectorCase=function(selector){return goog.string.toSelectorCase(selector);};goog.style.getOpacity=function(el){goog.asserts.assert(el);var style=el.style,result="";if("opacity"in style){result=style.opacity;}else{if("MozOpacity"in style){result=style.MozOpacity;}else{if("filter"in style){var match=style.filter.match(/alpha\(opacity=([\d.]+)\)/);match&&(result=String(match[1]/100));}}}return""==result?result:Number(result);};goog.style.setOpacity=function(el,alpha){goog.asserts.assert(el);var style=el.style;"opacity"in style?style.opacity=alpha:"MozOpacity"in style?style.MozOpacity=alpha:"filter"in style&&(style.filter=""===alpha?"":"alpha(opacity="+100*Number(alpha)+")");};goog.style.setTransparentBackgroundImage=function(el,src){var style=el.style;style.backgroundImage="url("+src+")";style.backgroundPosition="top left";style.backgroundRepeat="no-repeat";};goog.style.clearTransparentBackgroundImage=function(el){var style=el.style;"filter"in style?style.filter="":style.backgroundImage="none";};goog.style.showElement=function(el,display){goog.style.setElementShown(el,display);};goog.style.setElementShown=function(el,isShown){el.style.display=isShown?"":"none";};goog.style.isElementShown=function(el){return"none"!=el.style.display;};goog.style.installSafeStyleSheet=function(safeStyleSheet,opt_node){var dh=goog.dom.getDomHelper(opt_node),doc=dh.getDocument();if(goog.userAgent.IE&&doc.createStyleSheet){var styleSheet=doc.createStyleSheet();goog.style.setSafeStyleSheet(styleSheet,safeStyleSheet);return styleSheet;}var head=dh.getElementsByTagNameAndClass(goog.dom.TagName.HEAD)[0];if(!head){var body=dh.getElementsByTagNameAndClass(goog.dom.TagName.BODY)[0];head=dh.createDom(goog.dom.TagName.HEAD);body.parentNode.insertBefore(head,body);}var el=dh.createDom(goog.dom.TagName.STYLE),nonce=goog.dom.safe.getStyleNonce();nonce&&el.setAttribute("nonce",nonce);goog.style.setSafeStyleSheet(el,safeStyleSheet);dh.appendChild(head,el);return el;};goog.style.uninstallStyles=function(styleSheet){goog.dom.removeNode(styleSheet.ownerNode||styleSheet.owningElement||styleSheet);};goog.style.setSafeStyleSheet=function(element,safeStyleSheet){var stylesString=module$contents$goog$html$SafeStyleSheet_SafeStyleSheet.unwrap(safeStyleSheet);goog.userAgent.IE&&void 0!==element.cssText?element.cssText=stylesString:goog.global.trustedTypes?goog.dom.setTextContent(element,stylesString):element.innerHTML=stylesString;};goog.style.setPreWrap=function(el){el.style.whiteSpace=goog.userAgent.GECKO?"-moz-pre-wrap":"pre-wrap";};goog.style.setInlineBlock=function(el){var style=el.style;style.position="relative";style.display="inline-block";};goog.style.isRightToLeft=function(el){return"rtl"==goog.style.getStyle_(el,"direction");};goog.style.unselectableStyle_=goog.userAgent.GECKO?"MozUserSelect":goog.userAgent.WEBKIT||goog.userAgent.EDGE?"WebkitUserSelect":null;goog.style.isUnselectable=function(el){return goog.style.unselectableStyle_?"none"==el.style[goog.style.unselectableStyle_].toLowerCase():goog.userAgent.IE?"on"==el.getAttribute("unselectable"):!1;};goog.style.setUnselectable=function(el,unselectable,opt_noRecurse){var descendants=opt_noRecurse?null:el.getElementsByTagName("*"),name=goog.style.unselectableStyle_;if(name){var value=unselectable?"none":"";el.style&&(el.style[name]=value);if(descendants){for(var i=0,descendant;descendant=descendants[i];i++){descendant.style&&(descendant.style[name]=value);}}}else{if(goog.userAgent.IE&&(value=unselectable?"on":"",el.setAttribute("unselectable",value),descendants)){for(i=0;descendant=descendants[i];i++){descendant.setAttribute("unselectable",value);}}}};goog.style.getBorderBoxSize=function(element){return new goog.math.Size(element.offsetWidth,element.offsetHeight);};goog.style.setBorderBoxSize=function(element,size){var doc=goog.dom.getOwnerDocument(element),isCss1CompatMode=goog.dom.getDomHelper(doc).isCss1CompatMode();if(!goog.userAgent.IE||goog.userAgent.isVersionOrHigher("10")||isCss1CompatMode){goog.style.setBoxSizingSize_(element,size,"border-box");}else{var style=element.style;if(isCss1CompatMode){var paddingBox=goog.style.getPaddingBox(element),borderBox=goog.style.getBorderBox(element);style.pixelWidth=size.width-borderBox.left-paddingBox.left-paddingBox.right-borderBox.right;style.pixelHeight=size.height-borderBox.top-paddingBox.top-paddingBox.bottom-borderBox.bottom;}else{style.pixelWidth=size.width,style.pixelHeight=size.height;}}};goog.style.getContentBoxSize=function(element){var doc=goog.dom.getOwnerDocument(element),ieCurrentStyle=goog.userAgent.IE&&element.currentStyle;if(ieCurrentStyle&&goog.dom.getDomHelper(doc).isCss1CompatMode()&&"auto"!=ieCurrentStyle.width&&"auto"!=ieCurrentStyle.height&&!ieCurrentStyle.boxSizing){var width=goog.style.getIePixelValue_(element,ieCurrentStyle.width,"width","pixelWidth"),height=goog.style.getIePixelValue_(element,ieCurrentStyle.height,"height","pixelHeight");return new goog.math.Size(width,height);}var borderBoxSize=goog.style.getBorderBoxSize(element),paddingBox=goog.style.getPaddingBox(element),borderBox=goog.style.getBorderBox(element);return new goog.math.Size(borderBoxSize.width-borderBox.left-paddingBox.left-paddingBox.right-borderBox.right,borderBoxSize.height-borderBox.top-paddingBox.top-paddingBox.bottom-borderBox.bottom);};goog.style.setContentBoxSize=function(element,size){var doc=goog.dom.getOwnerDocument(element),isCss1CompatMode=goog.dom.getDomHelper(doc).isCss1CompatMode();if(!goog.userAgent.IE||goog.userAgent.isVersionOrHigher("10")||isCss1CompatMode){goog.style.setBoxSizingSize_(element,size,"content-box");}else{var style=element.style;if(isCss1CompatMode){style.pixelWidth=size.width,style.pixelHeight=size.height;}else{var paddingBox=goog.style.getPaddingBox(element),borderBox=goog.style.getBorderBox(element);style.pixelWidth=size.width+borderBox.left+paddingBox.left+paddingBox.right+borderBox.right;style.pixelHeight=size.height+borderBox.top+paddingBox.top+paddingBox.bottom+borderBox.bottom;}}};goog.style.setBoxSizingSize_=function(element,size,boxSizing){var style=element.style;goog.userAgent.GECKO?style.MozBoxSizing=boxSizing:goog.userAgent.WEBKIT?style.WebkitBoxSizing=boxSizing:style.boxSizing=boxSizing;style.width=Math.max(size.width,0)+"px";style.height=Math.max(size.height,0)+"px";};goog.style.getIePixelValue_=function(element,value,name,pixelName){if(/^\d+px?$/.test(value)){return parseInt(value,10);}var oldStyleValue=element.style[name],oldRuntimeValue=element.runtimeStyle[name];element.runtimeStyle[name]=element.currentStyle[name];element.style[name]=value;var pixelValue=element.style[pixelName];element.style[name]=oldStyleValue;element.runtimeStyle[name]=oldRuntimeValue;return+pixelValue;};goog.style.getIePixelDistance_=function(element,propName){var value=goog.style.getCascadedStyle(element,propName);return value?goog.style.getIePixelValue_(element,value,"left","pixelLeft"):0;};goog.style.getBox_=function(element,stylePrefix){if(goog.userAgent.IE){var left=goog.style.getIePixelDistance_(element,stylePrefix+"Left"),right=goog.style.getIePixelDistance_(element,stylePrefix+"Right"),top=goog.style.getIePixelDistance_(element,stylePrefix+"Top"),bottom=goog.style.getIePixelDistance_(element,stylePrefix+"Bottom");return new goog.math.Box(top,right,bottom,left);}left=goog.style.getComputedStyle(element,stylePrefix+"Left");right=goog.style.getComputedStyle(element,stylePrefix+"Right");top=goog.style.getComputedStyle(element,stylePrefix+"Top");bottom=goog.style.getComputedStyle(element,stylePrefix+"Bottom");return new goog.math.Box(parseFloat(top),parseFloat(right),parseFloat(bottom),parseFloat(left));};goog.style.getPaddingBox=function(element){return goog.style.getBox_(element,"padding");};goog.style.getMarginBox=function(element){return goog.style.getBox_(element,"margin");};goog.style.ieBorderWidthKeywords_={thin:2,medium:4,thick:6};goog.style.getIePixelBorder_=function(element,prop){if("none"==goog.style.getCascadedStyle(element,prop+"Style")){return 0;}var width=goog.style.getCascadedStyle(element,prop+"Width");return width in goog.style.ieBorderWidthKeywords_?goog.style.ieBorderWidthKeywords_[width]:goog.style.getIePixelValue_(element,width,"left","pixelLeft");};goog.style.getBorderBox=function(element){if(goog.userAgent.IE&&!goog.userAgent.isDocumentModeOrHigher(9)){var left=goog.style.getIePixelBorder_(element,"borderLeft"),right=goog.style.getIePixelBorder_(element,"borderRight"),top=goog.style.getIePixelBorder_(element,"borderTop"),bottom=goog.style.getIePixelBorder_(element,"borderBottom");return new goog.math.Box(top,right,bottom,left);}left=goog.style.getComputedStyle(element,"borderLeftWidth");right=goog.style.getComputedStyle(element,"borderRightWidth");top=goog.style.getComputedStyle(element,"borderTopWidth");bottom=goog.style.getComputedStyle(element,"borderBottomWidth");return new goog.math.Box(parseFloat(top),parseFloat(right),parseFloat(bottom),parseFloat(left));};goog.style.getFontFamily=function(el){var doc=goog.dom.getOwnerDocument(el),font="";if(doc.body.createTextRange&&goog.dom.contains(doc,el)){var range=doc.body.createTextRange();range.moveToElementText(el);try{font=range.queryCommandValue("FontName");}catch(e){font="";}}font||(font=goog.style.getStyle_(el,"fontFamily"));var fontsArray=font.split(",");1<fontsArray.length&&(font=fontsArray[0]);return goog.string.stripQuotes(font,"\"'");};goog.style.lengthUnitRegex_=/[^\d]+$/;goog.style.getLengthUnits=function(value){var units=value.match(goog.style.lengthUnitRegex_);return units&&units[0]||null;};goog.style.ABSOLUTE_CSS_LENGTH_UNITS_={cm:1,in:1,mm:1,pc:1,pt:1};goog.style.CONVERTIBLE_RELATIVE_CSS_UNITS_={em:1,ex:1};goog.style.getFontSize=function(el){var fontSize=goog.style.getStyle_(el,"fontSize"),sizeUnits=goog.style.getLengthUnits(fontSize);if(fontSize&&"px"==sizeUnits){return parseInt(fontSize,10);}if(goog.userAgent.IE){if(String(sizeUnits)in goog.style.ABSOLUTE_CSS_LENGTH_UNITS_){return goog.style.getIePixelValue_(el,fontSize,"left","pixelLeft");}if(el.parentNode&&el.parentNode.nodeType==goog.dom.NodeType.ELEMENT&&String(sizeUnits)in goog.style.CONVERTIBLE_RELATIVE_CSS_UNITS_){var parentElement=el.parentNode,parentSize=goog.style.getStyle_(parentElement,"fontSize");return goog.style.getIePixelValue_(parentElement,fontSize==parentSize?"1em":fontSize,"left","pixelLeft");}}var sizeElement=goog.dom.createDom(goog.dom.TagName.SPAN,{style:"visibility:hidden;position:absolute;line-height:0;padding:0;margin:0;border:0;height:1em;"});goog.dom.appendChild(el,sizeElement);fontSize=sizeElement.offsetHeight;goog.dom.removeNode(sizeElement);return fontSize;};goog.style.parseStyleAttribute=function(value){var result={};value.split(/\s*;\s*/).forEach(function(pair){var keyValue=pair.match(/\s*([\w-]+)\s*:(.+)/);if(keyValue){var styleValue=goog.string.trim(keyValue[2]);result[goog.string.toCamelCase(keyValue[1].toLowerCase())]=styleValue;}});return result;};goog.style.toStyleAttribute=function(obj){var buffer=[];module$contents$goog$object_forEach(obj,function(value,key){buffer.push(goog.string.toSelectorCase(key),":",value,";");});return buffer.join("");};goog.style.setFloat=function(el,value){el.style[goog.userAgent.IE?"styleFloat":"cssFloat"]=value;};goog.style.getFloat=function(el){return el.style[goog.userAgent.IE?"styleFloat":"cssFloat"]||"";};goog.style.getScrollbarWidth=function(opt_className){var outerDiv=goog.dom.createElement(goog.dom.TagName.DIV);opt_className&&(outerDiv.className=opt_className);outerDiv.style.cssText="overflow:auto;position:absolute;top:0;width:100px;height:100px";var innerDiv=goog.dom.createElement(goog.dom.TagName.DIV);goog.style.setSize(innerDiv,"200px","200px");outerDiv.appendChild(innerDiv);goog.dom.appendChild(goog.dom.getDocument().body,outerDiv);var width=outerDiv.offsetWidth-outerDiv.clientWidth;goog.dom.removeNode(outerDiv);return width;};goog.style.MATRIX_TRANSLATION_REGEX_=RegExp("matrix\\([0-9\\.\\-]+, [0-9\\.\\-]+, [0-9\\.\\-]+, [0-9\\.\\-]+, ([0-9\\.\\-]+)p?x?, ([0-9\\.\\-]+)p?x?\\)");goog.style.getCssTranslation=function(element){var transform=goog.style.getComputedTransform(element);if(!transform){return new goog.math.Coordinate(0,0);}var matches=transform.match(goog.style.MATRIX_TRANSLATION_REGEX_);return matches?new goog.math.Coordinate(parseFloat(matches[1]),parseFloat(matches[2])):new goog.math.Coordinate(0,0);};ee.layers.AbstractOverlay=function(tileSource,opt_options){goog.events.EventTarget.call(this);var options=opt_options||{};this.minZoom=options.minZoom||0;this.maxZoom=options.maxZoom||20;if(!window.google||!window.google.maps){throw Error("Google Maps API hasn't been initialized.");}this.tileSize=options.tileSize||new google.maps.Size(ee.layers.AbstractOverlay.DEFAULT_TILE_EDGE_LENGTH,ee.layers.AbstractOverlay.DEFAULT_TILE_EDGE_LENGTH);this.isPng="isPng"in options?options.isPng:!0;this.name=options.name;this.opacity="opacity"in options?options.opacity:1;this.stats=new module$contents$ee$layers$AbstractOverlayStats_AbstractOverlayStats(tileSource.getUniqueId());this.tilesById=new goog.structs.Map();this.tileCounter=0;this.tileSource=tileSource;this.handler=new goog.events.EventHandler(this);this.projection=null;this.radius=0;this.alt=null;};$jscomp.inherits(ee.layers.AbstractOverlay,goog.events.EventTarget);ee.layers.AbstractOverlay.prototype.addTileCallback=function(callback){return goog.events.listen(this,ee.layers.AbstractOverlay.EventType.TILE_LOAD,callback);};ee.layers.AbstractOverlay.prototype.removeTileCallback=function(callbackId){goog.events.unlistenByKey(callbackId);};ee.layers.AbstractOverlay.prototype.getLoadingTilesCount=function(){return this.getTileCountForStatus_(ee.layers.AbstractTile.Status.THROTTLED)+this.getTileCountForStatus_(ee.layers.AbstractTile.Status.LOADING)+this.getTileCountForStatus_(ee.layers.AbstractTile.Status.NEW);};ee.layers.AbstractOverlay.prototype.getFailedTilesCount=function(){return this.getTileCountForStatus_(ee.layers.AbstractTile.Status.FAILED);};ee.layers.AbstractOverlay.prototype.getLoadedTilesCount=function(){return this.getTileCountForStatus_(ee.layers.AbstractTile.Status.LOADED);};ee.layers.AbstractOverlay.prototype.setOpacity=function(opacity){this.opacity=opacity;this.tilesById.forEach(function(tile){goog.style.setOpacity(tile.div,this.opacity);},this);};ee.layers.AbstractOverlay.prototype.getStats=function(){return this.stats;};ee.layers.AbstractOverlay.prototype.getTile=function(coord,zoom,ownerDocument){var maxCoord=1<<zoom;if(zoom<this.minZoom||0>coord.y||coord.y>=maxCoord){return ownerDocument.createElement("div");}var x=coord.x%maxCoord;0>x&&(x+=maxCoord);var normalizedCoord=new google.maps.Point(x,coord.y),uniqueId=this.getUniqueTileId_(coord,zoom),tile=this.createTile(normalizedCoord,zoom,ownerDocument,uniqueId);tile.tileSize=this.tileSize;goog.style.setOpacity(tile.div,this.opacity);this.tilesById.set(uniqueId,tile);this.registerStatusChangeListener_(tile);this.dispatchEvent(new ee.layers.TileStartEvent(this.getLoadingTilesCount()));this.tileSource.loadTile(tile,new Date().getTime()/1000);return tile.div;};ee.layers.AbstractOverlay.prototype.releaseTile=function(tileDiv){var tile=this.tilesById.get(tileDiv.id);this.tilesById.remove(tileDiv.id);tile&&(tile.abort(),module$contents$goog$dispose_dispose(tile));};ee.layers.AbstractOverlay.prototype.registerStatusChangeListener_=function(tile){this.handler.listen(tile,ee.layers.AbstractTile.EventType.STATUS_CHANGED,function(){var Status=ee.layers.AbstractTile.Status;switch(tile.getStatus()){case Status.LOADED:this.stats.addTileStats(tile.loadingStartTs_,new Date().getTime(),tile.zoom);this.dispatchEvent(new ee.layers.TileLoadEvent(this.getLoadingTilesCount()));break;case Status.THROTTLED:this.stats.incrementThrottleCounter(tile.zoom);this.dispatchEvent(new ee.layers.TileThrottleEvent(tile.sourceUrl));break;case Status.FAILED:this.stats.incrementErrorCounter(tile.zoom);this.dispatchEvent(new ee.layers.TileFailEvent(tile.sourceUrl,tile.errorMessage_));break;case Status.ABORTED:this.dispatchEvent(new ee.layers.TileAbortEvent(this.getLoadingTilesCount()));}});};ee.layers.AbstractOverlay.prototype.getUniqueTileId_=function(coord,z){var tileId=[coord.x,coord.y,z,this.tileCounter++].join("-"),sourceId=this.tileSource.getUniqueId();return[tileId,sourceId].join("-");};ee.layers.AbstractOverlay.prototype.disposeInternal=function(){goog.events.EventTarget.prototype.disposeInternal.call(this);this.tilesById.forEach(module$contents$goog$dispose_dispose);this.tilesById.clear();this.tilesById=null;module$contents$goog$dispose_dispose(this.handler);this.tileSource=this.handler=null;};ee.layers.AbstractOverlay.prototype.getTileCountForStatus_=function(status){return module$contents$goog$array_count(this.tilesById.getValues(),function(tile){return tile.getStatus()==status;});};goog.exportSymbol("ee.layers.AbstractOverlay",ee.layers.AbstractOverlay);goog.exportProperty(ee.layers.AbstractOverlay.prototype,"removeTileCallback",ee.layers.AbstractOverlay.prototype.removeTileCallback);goog.exportProperty(ee.layers.AbstractOverlay.prototype,"addTileCallback",ee.layers.AbstractOverlay.prototype.addTileCallback);ee.layers.AbstractOverlay.EventType={TILE_FAIL:"tile-fail",TILE_ABORT:"tile-abort",TILE_THROTTLE:"tile-throttle",TILE_LOAD:"tile-load",TILE_START:"tile-start"};ee.layers.AbstractOverlay.DEFAULT_TILE_EDGE_LENGTH=256;ee.layers.TileLoadEvent=function(loadingTileCount){goog.events.Event.call(this,ee.layers.AbstractOverlay.EventType.TILE_LOAD);this.loadingTileCount=loadingTileCount;};$jscomp.inherits(ee.layers.TileLoadEvent,goog.events.Event);ee.layers.TileStartEvent=function(loadingTileCount){goog.events.Event.call(this,ee.layers.AbstractOverlay.EventType.TILE_START);this.loadingTileCount=loadingTileCount;};$jscomp.inherits(ee.layers.TileStartEvent,goog.events.Event);ee.layers.TileThrottleEvent=function(tileUrl){goog.events.Event.call(this,ee.layers.AbstractOverlay.EventType.TILE_THROTTLE);this.tileUrl=tileUrl;};$jscomp.inherits(ee.layers.TileThrottleEvent,goog.events.Event);ee.layers.TileFailEvent=function(tileUrl,opt_errorMessage){goog.events.Event.call(this,ee.layers.AbstractOverlay.EventType.TILE_FAIL);this.tileUrl=tileUrl;this.errorMessage=opt_errorMessage;};$jscomp.inherits(ee.layers.TileFailEvent,goog.events.Event);ee.layers.TileAbortEvent=function(loadingTileCount){goog.events.Event.call(this,ee.layers.AbstractOverlay.EventType.TILE_ABORT);this.loadingTileCount=loadingTileCount;};$jscomp.inherits(ee.layers.TileAbortEvent,goog.events.Event);ee.layers.AbstractTile=function(coord,zoom,ownerDocument,uniqueId){goog.events.EventTarget.call(this);this.coord=coord;this.zoom=zoom;this.div=ownerDocument.createElement("div");this.div.id=uniqueId;this.maxRetries=ee.layers.AbstractTile.DEFAULT_MAX_LOAD_RETRIES_;this.renderer=function(){};this.status_=ee.layers.AbstractTile.Status.NEW;this.retryAttemptCount_=0;this.isRetrying_=!1;};$jscomp.inherits(ee.layers.AbstractTile,goog.events.EventTarget);ee.layers.AbstractTile.prototype.startLoad=function(){var $jscomp$this=this;if(!this.isRetrying_&&this.getStatus()==ee.layers.AbstractTile.Status.LOADING){throw Error("startLoad() can only be invoked once. Use retryLoad() after the first attempt.");}this.setStatus(ee.layers.AbstractTile.Status.LOADING);this.loadingStartTs_=new Date().getTime();this.xhrIo_=new goog.net.XhrIo();this.xhrIo_.setResponseType(goog.net.XhrIo.ResponseType.BLOB);this.xhrIo_.listen(goog.net.EventType.COMPLETE,function(event){var blob=$jscomp$this.xhrIo_.getResponse(),status=$jscomp$this.xhrIo_.getStatus(),HttpStatus=goog.net.HttpStatus;status==HttpStatus.TOO_MANY_REQUESTS&&$jscomp$this.setStatus(ee.layers.AbstractTile.Status.THROTTLED);if(HttpStatus.isSuccess(status)){var sourceResponseHeaders={};module$contents$goog$object_forEach($jscomp$this.xhrIo_.getResponseHeaders(),function(value,name){sourceResponseHeaders[name.toLowerCase()]=value;});$jscomp$this.sourceResponseHeaders=sourceResponseHeaders;$jscomp$this.sourceData=blob;$jscomp$this.finishLoad();}else{if(blob){var reader=new goog.fs.FileReader();reader.listen(goog.fs.FileReader.EventType.LOAD_END,function(){$jscomp$this.retryLoad(reader.getResult());},void 0);reader.readAsText(blob);}else{$jscomp$this.retryLoad("Failed to load tile.");}}},!1);this.xhrIo_.listenOnce(goog.net.EventType.READY,goog.partial(module$contents$goog$dispose_dispose,this.xhrIo_));this.sourceUrl&&this.sourceUrl.endsWith("&profiling=1")&&(this.sourceUrl=this.sourceUrl.replace("&profiling=1",""),this.xhrIo_.headers.set(module$contents$ee$apiclient_apiclient.PROFILE_REQUEST_HEADER,"1"));this.xhrIo_.send(this.sourceUrl,"GET");};ee.layers.AbstractTile.prototype.finishLoad=function(){this.renderer(this);this.setStatus(ee.layers.AbstractTile.Status.LOADED);};ee.layers.AbstractTile.prototype.cancelLoad=function(){module$contents$goog$dispose_dispose(this.xhrIo_);};ee.layers.AbstractTile.prototype.retryLoad=function(opt_errorMessage){var parseError=function(error){try{if(error=JSON.parse(error),error.error&&error.error.message){return error.error.message;}}catch(e){}return error;};this.retryAttemptCount_>=this.maxRetries?(this.errorMessage_=parseError(opt_errorMessage),this.setStatus(ee.layers.AbstractTile.Status.FAILED)):(this.cancelLoad(),setTimeout(goog.bind(function(){this.isDisposed()||(this.isRetrying_=!0,this.startLoad(),this.isRetrying_=!1);},this),1000*Math.pow(2,this.retryAttemptCount_++)));};ee.layers.AbstractTile.prototype.abort=function(){this.cancelLoad();this.getStatus()!=ee.layers.AbstractTile.Status.ABORTED&&this.getStatus()!=ee.layers.AbstractTile.Status.REMOVED&&this.setStatus(this.isDone()?ee.layers.AbstractTile.Status.REMOVED:ee.layers.AbstractTile.Status.ABORTED);};ee.layers.AbstractTile.prototype.isDone=function(){return this.status_ in ee.layers.AbstractTile.DONE_STATUS_SET_;};ee.layers.AbstractTile.prototype.getStatus=function(){return this.status_;};ee.layers.AbstractTile.prototype.setStatus=function(status){this.status_=status;this.dispatchEvent(ee.layers.AbstractTile.EventType.STATUS_CHANGED);};ee.layers.AbstractTile.prototype.disposeInternal=function(){goog.events.EventTarget.prototype.disposeInternal.call(this);this.cancelLoad();this.div.remove();this.renderer=null;};ee.layers.AbstractTile.EventType={STATUS_CHANGED:"status-changed"};ee.layers.AbstractTile.Status={NEW:"new",LOADING:"loading",THROTTLED:"throttled",LOADED:"loaded",FAILED:"failed",ABORTED:"aborted",REMOVED:"removed"};ee.layers.AbstractTile.DONE_STATUS_SET_=module$contents$goog$object_createSet(ee.layers.AbstractTile.Status.ABORTED,ee.layers.AbstractTile.Status.FAILED,ee.layers.AbstractTile.Status.LOADED,ee.layers.AbstractTile.Status.REMOVED);ee.layers.AbstractTile.DEFAULT_MAX_LOAD_RETRIES_=5;var module$exports$ee$layers$AbstractTileSource=function(){goog.Disposable.call(this);};$jscomp.inherits(module$exports$ee$layers$AbstractTileSource,goog.Disposable);ee.layers.BinaryOverlay=function(tileSource,opt_options){ee.layers.AbstractOverlay.call(this,tileSource,opt_options);this.buffersByCoord_=new goog.structs.Map();this.divsByCoord_=new goog.structs.Map();};$jscomp.inherits(ee.layers.BinaryOverlay,ee.layers.AbstractOverlay);ee.layers.BinaryOverlay.prototype.createTile=function(coord,zoom,ownerDocument,uniqueId){var tile=new ee.layers.BinaryTile(coord,zoom,ownerDocument,uniqueId);this.handler.listen(tile,ee.layers.AbstractTile.EventType.STATUS_CHANGED,function(){tile.getStatus()==ee.layers.AbstractTile.Status.LOADED&&(this.buffersByCoord_.set(coord,new Float32Array(tile.buffer_)),this.divsByCoord_.set(coord,tile.div));});return tile;};ee.layers.BinaryOverlay.prototype.getBuffersByCoord=function(){return this.buffersByCoord_;};ee.layers.BinaryOverlay.prototype.getDivsByCoord=function(){return this.divsByCoord_;};ee.layers.BinaryOverlay.prototype.disposeInternal=function(){ee.layers.AbstractOverlay.prototype.disposeInternal.call(this);this.divsByCoord_=this.buffersByCoord_=null;};goog.exportSymbol("ee.layers.BinaryOverlay",ee.layers.BinaryOverlay);ee.layers.BinaryTile=function(coord,zoom,ownerDocument,uniqueId){ee.layers.AbstractTile.call(this,coord,zoom,ownerDocument,uniqueId);};$jscomp.inherits(ee.layers.BinaryTile,ee.layers.AbstractTile);ee.layers.BinaryTile.prototype.finishLoad=function(){var reader=new goog.fs.FileReader();reader.listen(goog.fs.FileReader.EventType.LOAD_END,function(){this.buffer_=reader.getResult();ee.layers.AbstractTile.prototype.finishLoad.call(this);},void 0,this);reader.readAsArrayBuffer(this.sourceData);};goog.net.ImageLoader=function(opt_parent){goog.events.EventTarget.call(this);this.imageIdToRequestMap_={};this.imageIdToImageMap_={};this.handler_=new goog.events.EventHandler(this);this.parent_=opt_parent;this.completionFired_=!1;};goog.inherits(goog.net.ImageLoader,goog.events.EventTarget);goog.net.ImageLoader.CorsRequestType={ANONYMOUS:"anonymous",USE_CREDENTIALS:"use-credentials"};goog.net.ImageLoader.IMAGE_LOAD_EVENTS_=[goog.userAgent.IE&&!goog.userAgent.isVersionOrHigher("11")?goog.net.EventType.READY_STATE_CHANGE:goog.events.EventType.LOAD,goog.net.EventType.ABORT,goog.net.EventType.ERROR];goog.net.ImageLoader.prototype.addImage=function(id,image,opt_corsRequestType){var src="string"===typeof image?image:image.src;src&&(this.completionFired_=!1,this.imageIdToRequestMap_[id]={src:src,corsRequestType:void 0!==opt_corsRequestType?opt_corsRequestType:null});};goog.net.ImageLoader.prototype.removeImage=function(id){delete this.imageIdToRequestMap_[id];var image=this.imageIdToImageMap_[id];image&&(delete this.imageIdToImageMap_[id],this.handler_.unlisten(image,goog.net.ImageLoader.IMAGE_LOAD_EVENTS_,this.onNetworkEvent_));};goog.net.ImageLoader.prototype.start=function(){var imageIdToRequestMap=this.imageIdToRequestMap_;module$contents$goog$object_getKeys(imageIdToRequestMap).forEach(function(id){var imageRequest=imageIdToRequestMap[id];imageRequest&&(delete imageIdToRequestMap[id],this.loadImage_(imageRequest,id));},this);};goog.net.ImageLoader.prototype.loadImage_=function(imageRequest,id){if(!this.isDisposed()){var image=this.parent_?goog.dom.getDomHelper(this.parent_).createDom(goog.dom.TagName.IMG):new Image();imageRequest.corsRequestType&&(image.crossOrigin=imageRequest.corsRequestType);this.handler_.listen(image,goog.net.ImageLoader.IMAGE_LOAD_EVENTS_,this.onNetworkEvent_);this.imageIdToImageMap_[id]=image;image.id=id;image.src=imageRequest.src;}};goog.net.ImageLoader.prototype.onNetworkEvent_=function(evt){var image=evt.currentTarget;if(image){if(evt.type==goog.net.EventType.READY_STATE_CHANGE){if(image.readyState==goog.net.EventType.COMPLETE){evt.type=goog.events.EventType.LOAD;}else{return;}}"undefined"==typeof image.naturalWidth&&(evt.type==goog.events.EventType.LOAD?(image.naturalWidth=image.width,image.naturalHeight=image.height):(image.naturalWidth=0,image.naturalHeight=0));this.removeImage(image.id);this.dispatchEvent({type:evt.type,target:image});this.isDisposed()||this.maybeFireCompletionEvent_();}};goog.net.ImageLoader.prototype.maybeFireCompletionEvent_=function(){module$contents$goog$object_isEmpty(this.imageIdToImageMap_)&&module$contents$goog$object_isEmpty(this.imageIdToRequestMap_)&&!this.completionFired_&&(this.completionFired_=!0,this.dispatchEvent(goog.net.EventType.COMPLETE));};goog.net.ImageLoader.prototype.disposeInternal=function(){delete this.imageIdToRequestMap_;delete this.imageIdToImageMap_;module$contents$goog$dispose_dispose(this.handler_);goog.net.ImageLoader.superClass_.disposeInternal.call(this);};ee.layers.ImageOverlay=function(tileSource,opt_options){ee.layers.AbstractOverlay.call(this,tileSource,opt_options);};$jscomp.inherits(ee.layers.ImageOverlay,ee.layers.AbstractOverlay);ee.layers.ImageOverlay.prototype.createTile=function(coord,zoom,ownerDocument,uniqueId){return new ee.layers.ImageTile(coord,zoom,ownerDocument,uniqueId);};goog.exportSymbol("ee.layers.ImageOverlay",ee.layers.ImageOverlay);ee.layers.ImageTile=function(coord,zoom,ownerDocument,uniqueId){ee.layers.AbstractTile.call(this,coord,zoom,ownerDocument,uniqueId);this.renderer=ee.layers.ImageTile.defaultRenderer_;this.imageLoaderListenerKey_=this.imageLoader_=this.imageEl=null;this.objectUrl_="";};$jscomp.inherits(ee.layers.ImageTile,ee.layers.AbstractTile);ee.layers.ImageTile.prototype.finishLoad=function(){try{var safeUrl=goog.html.SafeUrl.fromBlob(this.sourceData);this.objectUrl_=goog.html.SafeUrl.unwrap(safeUrl);var imageUrl=this.objectUrl_!==goog.html.SafeUrl.INNOCUOUS_STRING?this.objectUrl_:this.sourceUrl;}catch(e){imageUrl=this.sourceUrl;}this.imageLoader_=new goog.net.ImageLoader();this.imageLoader_.addImage(this.div.id+"-image",imageUrl);this.imageLoaderListenerKey_=goog.events.listenOnce(this.imageLoader_,ee.layers.ImageTile.IMAGE_LOADER_EVENTS_,function(event){event.type==goog.events.EventType.LOAD?(this.imageEl=event.target,ee.layers.AbstractTile.prototype.finishLoad.call(this)):this.retryLoad();},void 0,this);this.imageLoader_.start();};ee.layers.ImageTile.prototype.cancelLoad=function(){ee.layers.AbstractTile.prototype.cancelLoad.call(this);this.imageLoader_&&(goog.events.unlistenByKey(this.imageLoaderListenerKey_),module$contents$goog$dispose_dispose(this.imageLoader_));};ee.layers.ImageTile.prototype.disposeInternal=function(){ee.layers.AbstractTile.prototype.disposeInternal.call(this);this.objectUrl_&&URL.revokeObjectURL(this.objectUrl_);};ee.layers.ImageTile.defaultRenderer_=function(tile){tile.div.appendChild(tile.imageEl);};ee.layers.ImageTile.IMAGE_LOADER_EVENTS_=[goog.events.EventType.LOAD,goog.net.EventType.ABORT,goog.net.EventType.ERROR];goog.string.path={};goog.string.path.baseName=function(path){var i=path.lastIndexOf("/")+1;return path.slice(i);};goog.string.path.basename=goog.string.path.baseName;goog.string.path.dirname=function(path){var i=path.lastIndexOf("/")+1,head=path.slice(0,i);/^\/+$/.test(head)||(head=head.replace(/\/+$/,""));return head;};goog.string.path.extension=function(path){var baseName=goog.string.path.baseName(path).replace(/\.+/g,"."),separatorIndex=baseName.lastIndexOf(".");return 0>=separatorIndex?"":baseName.substr(separatorIndex+1);};goog.string.path.join=function(var_args){for(var path=arguments[0],i=1;i<arguments.length;i++){var arg=arguments[i];path=goog.string.startsWith(arg,"/")?arg:""==path||goog.string.endsWith(path,"/")?path+arg:path+("/"+arg);}return path;};goog.string.path.normalizePath=function(path){if(""==path){return".";}var initialSlashes="";goog.string.startsWith(path,"/")&&(initialSlashes="/",goog.string.startsWith(path,"//")&&!goog.string.startsWith(path,"///")&&(initialSlashes="//"));for(var parts=path.split("/"),newParts=[],i=0;i<parts.length;i++){var part=parts[i];""!=part&&"."!=part&&(".."!=part||!initialSlashes&&!newParts.length||".."==module$contents$goog$array_peek(newParts)?newParts.push(part):newParts.pop());}return initialSlashes+newParts.join("/")||".";};goog.string.path.split=function(path){var head=goog.string.path.dirname(path),tail=goog.string.path.baseName(path);return[head,tail];};var module$contents$ee$layers$CloudStorageTileSource_CloudStorageTileSource=function(bucket,path,maxZoom,opt_suffix){module$exports$ee$layers$AbstractTileSource.call(this);this.bucket_=bucket;this.path_=path;this.suffix_=opt_suffix||"";this.maxZoom_=maxZoom;};$jscomp.inherits(module$contents$ee$layers$CloudStorageTileSource_CloudStorageTileSource,module$exports$ee$layers$AbstractTileSource);module$contents$ee$layers$CloudStorageTileSource_CloudStorageTileSource.prototype.loadTile=function(tile,opt_priority){if(tile.zoom<=this.maxZoom_){tile.sourceUrl=this.getTileUrl_(tile.coord,tile.zoom);}else{var zoomSteps=tile.zoom-this.maxZoom_,zoomFactor=Math.pow(2,zoomSteps),upperCoord=new google.maps.Point(Math.floor(tile.coord.x/zoomFactor),Math.floor(tile.coord.y/zoomFactor));tile.sourceUrl=this.getTileUrl_(upperCoord,tile.zoom-zoomSteps);tile.renderer=goog.partial(module$contents$ee$layers$CloudStorageTileSource_CloudStorageTileSource.zoomTileRenderer_,this.maxZoom_);}var originalRetryLoad=goog.bind(tile.retryLoad,tile);tile.retryLoad=goog.bind(function(opt_errorMessage){opt_errorMessage&&(opt_errorMessage.includes(module$contents$ee$layers$CloudStorageTileSource_CloudStorageTileSource.MISSING_TILE_ERROR_)||opt_errorMessage.includes(module$contents$ee$layers$CloudStorageTileSource_CloudStorageTileSource.ACCESS_DENIED_ERROR_))?tile.setStatus(ee.layers.AbstractTile.Status.LOADED):originalRetryLoad(opt_errorMessage);},tile);tile.startLoad();};module$contents$ee$layers$CloudStorageTileSource_CloudStorageTileSource.prototype.getUniqueId=function(){return[this.bucket_,this.path_,this.maxZoom_,this.suffix_].join("-");};module$contents$ee$layers$CloudStorageTileSource_CloudStorageTileSource.prototype.getTileUrl_=function(coord,zoom){var url=goog.string.path.join(module$contents$ee$layers$CloudStorageTileSource_CloudStorageTileSource.BASE_URL,this.bucket_,this.path_,String(zoom),String(coord.x),String(coord.y));this.suffix_&&(url+=this.suffix_);return url;};module$contents$ee$layers$CloudStorageTileSource_CloudStorageTileSource.zoomTileRenderer_=function(maxZoom,tile){if(!tile.imageEl){throw Error("Tile must have an image element to be rendered.");}var zoomFactor=Math.pow(2,tile.zoom-maxZoom),sideLength=tile.tileSize.width,canv=tile.div.ownerDocument.createElement("canvas");canv.setAttribute("width",sideLength);canv.setAttribute("height",sideLength);tile.div.appendChild(canv);var context=canv.getContext("2d");context.imageSmoothingEnabled=!1;context.mozImageSmoothingEnabled=!1;context.webkitImageSmoothingEnabled=!1;context.drawImage(tile.imageEl,sideLength/zoomFactor*(tile.coord.x%zoomFactor),sideLength/zoomFactor*(tile.coord.y%zoomFactor),sideLength/zoomFactor,sideLength/zoomFactor,0,0,sideLength,sideLength);};goog.exportSymbol("ee.layers.CloudStorageTileSource",module$contents$ee$layers$CloudStorageTileSource_CloudStorageTileSource);module$contents$ee$layers$CloudStorageTileSource_CloudStorageTileSource.BASE_URL="https://storage.googleapis.com";module$contents$ee$layers$CloudStorageTileSource_CloudStorageTileSource.MISSING_TILE_ERROR_="The specified key does not exist.";module$contents$ee$layers$CloudStorageTileSource_CloudStorageTileSource.ACCESS_DENIED_ERROR_="AccessDenied";ee.layers.CloudStorageTileSource=module$contents$ee$layers$CloudStorageTileSource_CloudStorageTileSource;goog.structs.Queue=function(){this.front_=[];this.back_=[];};goog.structs.Queue.prototype.maybeFlip_=function(){0===this.front_.length&&(this.front_=this.back_,this.front_.reverse(),this.back_=[]);};goog.structs.Queue.prototype.enqueue=function(element){this.back_.push(element);};goog.structs.Queue.prototype.dequeue=function(){this.maybeFlip_();return this.front_.pop();};goog.structs.Queue.prototype.peek=function(){this.maybeFlip_();return module$contents$goog$array_peek(this.front_);};goog.structs.Queue.prototype.getCount=function(){return this.front_.length+this.back_.length;};goog.structs.Queue.prototype.isEmpty=function(){return 0===this.front_.length&&0===this.back_.length;};goog.structs.Queue.prototype.clear=function(){this.front_=[];this.back_=[];};goog.structs.Queue.prototype.contains=function(obj){return module$contents$goog$array_contains(this.front_,obj)||module$contents$goog$array_contains(this.back_,obj);};goog.structs.Queue.prototype.remove=function(obj){return module$contents$goog$array_removeLast(this.front_,obj)||module$contents$goog$array_remove(this.back_,obj);};goog.structs.Queue.prototype.getValues=function(){for(var res=[],i=this.front_.length-1;0<=i;--i){res.push(this.front_[i]);}var len=this.back_.length;for(i=0;i<len;++i){res.push(this.back_[i]);}return res;};goog.structs.Pool=function(opt_minCount,opt_maxCount){goog.Disposable.call(this);this.minCount_=opt_minCount||0;this.maxCount_=opt_maxCount||10;if(this.minCount_>this.maxCount_){throw Error(goog.structs.Pool.ERROR_MIN_MAX_);}this.freeQueue_=new goog.structs.Queue();this.inUseSet_=new goog.structs.Set();this.delay=0;this.lastAccess=null;this.adjustForMinMax();};goog.inherits(goog.structs.Pool,goog.Disposable);goog.structs.Pool.ERROR_MIN_MAX_="[goog.structs.Pool] Min can not be greater than max";goog.structs.Pool.ERROR_DISPOSE_UNRELEASED_OBJS_="[goog.structs.Pool] Objects not released";goog.structs.Pool.prototype.setMinimumCount=function(min){if(min>this.maxCount_){throw Error(goog.structs.Pool.ERROR_MIN_MAX_);}this.minCount_=min;this.adjustForMinMax();};goog.structs.Pool.prototype.setMaximumCount=function(max){if(max<this.minCount_){throw Error(goog.structs.Pool.ERROR_MIN_MAX_);}this.maxCount_=max;this.adjustForMinMax();};goog.structs.Pool.prototype.setDelay=function(delay){this.delay=delay;};goog.structs.Pool.prototype.getObject=function(){var time=Date.now();if(!(null!=this.lastAccess&&time-this.lastAccess<this.delay)){var obj=this.removeFreeObject_();obj&&(this.lastAccess=time,this.inUseSet_.add(obj));return obj;}};goog.structs.Pool.prototype.releaseObject=function(obj){return this.inUseSet_.remove(obj)?(this.addFreeObject(obj),!0):!1;};goog.structs.Pool.prototype.removeFreeObject_=function(){for(var obj;0<this.getFreeCount()&&(obj=this.freeQueue_.dequeue(),!this.objectCanBeReused(obj));){this.adjustForMinMax();}!obj&&this.getCount()<this.maxCount_&&(obj=this.createObject());return obj;};goog.structs.Pool.prototype.addFreeObject=function(obj){this.inUseSet_.remove(obj);this.objectCanBeReused(obj)&&this.getCount()<this.maxCount_?this.freeQueue_.enqueue(obj):this.disposeObject(obj);};goog.structs.Pool.prototype.adjustForMinMax=function(){for(var freeQueue=this.freeQueue_;this.getCount()<this.minCount_;){freeQueue.enqueue(this.createObject());}for(;this.getCount()>this.maxCount_&&0<this.getFreeCount();){this.disposeObject(freeQueue.dequeue());}};goog.structs.Pool.prototype.createObject=function(){return{};};goog.structs.Pool.prototype.disposeObject=function(obj){if("function"==typeof obj.dispose){obj.dispose();}else{for(var i in obj){obj[i]=null;}}};goog.structs.Pool.prototype.objectCanBeReused=function(obj){return"function"==typeof obj.canBeReused?obj.canBeReused():!0;};goog.structs.Pool.prototype.contains=function(obj){return this.freeQueue_.contains(obj)||this.inUseSet_.contains(obj);};goog.structs.Pool.prototype.getCount=function(){return this.freeQueue_.getCount()+this.inUseSet_.getCount();};goog.structs.Pool.prototype.getInUseCount=function(){return this.inUseSet_.getCount();};goog.structs.Pool.prototype.getFreeCount=function(){return this.freeQueue_.getCount();};goog.structs.Pool.prototype.isEmpty=function(){return this.freeQueue_.isEmpty()&&this.inUseSet_.isEmpty();};goog.structs.Pool.prototype.disposeInternal=function(){goog.structs.Pool.superClass_.disposeInternal.call(this);if(0<this.getInUseCount()){throw Error(goog.structs.Pool.ERROR_DISPOSE_UNRELEASED_OBJS_);}delete this.inUseSet_;for(var freeQueue=this.freeQueue_;!freeQueue.isEmpty();){this.disposeObject(freeQueue.dequeue());}delete this.freeQueue_;};goog.structs.Node=function(key,value){this.key_=key;this.value_=value;};goog.structs.Node.prototype.getKey=function(){return this.key_;};goog.structs.Node.prototype.getValue=function(){return this.value_;};goog.structs.Node.prototype.clone=function(){return new goog.structs.Node(this.key_,this.value_);};goog.structs.Heap=function(opt_heap){this.nodes_=[];opt_heap&&this.insertAll(opt_heap);};goog.structs.Heap.prototype.insert=function(key,value){var node=new goog.structs.Node(key,value),nodes=this.nodes_;nodes.push(node);this.moveUp_(nodes.length-1);};goog.structs.Heap.prototype.insertAll=function(heap){if(heap instanceof goog.structs.Heap){var keys=heap.getKeys();var values=heap.getValues();if(0>=this.getCount()){for(var nodes=this.nodes_,i=0;i<keys.length;i++){nodes.push(new goog.structs.Node(keys[i],values[i]));}return;}}else{keys=module$contents$goog$object_getKeys(heap),values=module$contents$goog$object_getValues(heap);}for(i=0;i<keys.length;i++){this.insert(keys[i],values[i]);}};goog.structs.Heap.prototype.remove=function(){var nodes=this.nodes_,count=nodes.length,rootNode=nodes[0];if(!(0>=count)){return 1==count?module$contents$goog$array_clear(nodes):(nodes[0]=nodes.pop(),this.moveDown_(0)),rootNode.getValue();}};goog.structs.Heap.prototype.peek=function(){var nodes=this.nodes_;if(0!=nodes.length){return nodes[0].getValue();}};goog.structs.Heap.prototype.peekKey=function(){return this.nodes_[0]&&this.nodes_[0].getKey();};goog.structs.Heap.prototype.moveDown_=function(index){for(var nodes=this.nodes_,count=nodes.length,node=nodes[index];index<count>>1;){var leftChildIndex=this.getLeftChildIndex_(index),rightChildIndex=this.getRightChildIndex_(index),smallerChildIndex=rightChildIndex<count&&nodes[rightChildIndex].getKey()<nodes[leftChildIndex].getKey()?rightChildIndex:leftChildIndex;if(nodes[smallerChildIndex].getKey()>node.getKey()){break;}nodes[index]=nodes[smallerChildIndex];index=smallerChildIndex;}nodes[index]=node;};goog.structs.Heap.prototype.moveUp_=function(index){for(var nodes=this.nodes_,node=nodes[index];0<index;){var parentIndex=this.getParentIndex_(index);if(nodes[parentIndex].getKey()>node.getKey()){nodes[index]=nodes[parentIndex],index=parentIndex;}else{break;}}nodes[index]=node;};goog.structs.Heap.prototype.getLeftChildIndex_=function(index){return 2*index+1;};goog.structs.Heap.prototype.getRightChildIndex_=function(index){return 2*index+2;};goog.structs.Heap.prototype.getParentIndex_=function(index){return index-1>>1;};goog.structs.Heap.prototype.getValues=function(){for(var nodes=this.nodes_,rv=[],l=nodes.length,i=0;i<l;i++){rv.push(nodes[i].getValue());}return rv;};goog.structs.Heap.prototype.getKeys=function(){for(var nodes=this.nodes_,rv=[],l=nodes.length,i=0;i<l;i++){rv.push(nodes[i].getKey());}return rv;};goog.structs.Heap.prototype.containsValue=function(val){return module$contents$goog$array_some(this.nodes_,function(node){return node.getValue()==val;});};goog.structs.Heap.prototype.containsKey=function(key){return module$contents$goog$array_some(this.nodes_,function(node){return node.getKey()==key;});};goog.structs.Heap.prototype.clone=function(){return new goog.structs.Heap(this);};goog.structs.Heap.prototype.getCount=function(){return this.nodes_.length;};goog.structs.Heap.prototype.isEmpty=function(){return 0===this.nodes_.length;};goog.structs.Heap.prototype.clear=function(){module$contents$goog$array_clear(this.nodes_);};goog.structs.PriorityQueue=function(){goog.structs.Heap.call(this);};goog.inherits(goog.structs.PriorityQueue,goog.structs.Heap);goog.structs.PriorityQueue.prototype.enqueue=function(priority,value){this.insert(priority,value);};goog.structs.PriorityQueue.prototype.dequeue=function(){return this.remove();};goog.structs.PriorityPool=function(opt_minCount,opt_maxCount){this.delayTimeout_=void 0;this.requestQueue_=new goog.structs.PriorityQueue();goog.structs.Pool.call(this,opt_minCount,opt_maxCount);};goog.inherits(goog.structs.PriorityPool,goog.structs.Pool);goog.structs.PriorityPool.DEFAULT_PRIORITY_=100;goog.structs.PriorityPool.prototype.setDelay=function(delay){goog.structs.PriorityPool.superClass_.setDelay.call(this,delay);null!=this.lastAccess&&(goog.global.clearTimeout(this.delayTimeout_),this.delayTimeout_=goog.global.setTimeout(goog.bind(this.handleQueueRequests_,this),this.delay+this.lastAccess-Date.now()),this.handleQueueRequests_());};goog.structs.PriorityPool.prototype.getObject=function(opt_callback,opt_priority){if(!opt_callback){var result=goog.structs.PriorityPool.superClass_.getObject.call(this);result&&this.delay&&(this.delayTimeout_=goog.global.setTimeout(goog.bind(this.handleQueueRequests_,this),this.delay));return result;}this.requestQueue_.enqueue(void 0!==opt_priority?opt_priority:goog.structs.PriorityPool.DEFAULT_PRIORITY_,opt_callback);this.handleQueueRequests_();};goog.structs.PriorityPool.prototype.handleQueueRequests_=function(){for(var requestQueue=this.requestQueue_;0<requestQueue.getCount();){var obj=this.getObject();if(obj){requestQueue.dequeue().apply(this,[obj]);}else{break;}}};goog.structs.PriorityPool.prototype.addFreeObject=function(obj){goog.structs.PriorityPool.superClass_.addFreeObject.call(this,obj);this.handleQueueRequests_();};goog.structs.PriorityPool.prototype.adjustForMinMax=function(){goog.structs.PriorityPool.superClass_.adjustForMinMax.call(this);this.handleQueueRequests_();};goog.structs.PriorityPool.prototype.disposeInternal=function(){goog.structs.PriorityPool.superClass_.disposeInternal.call(this);goog.global.clearTimeout(this.delayTimeout_);this.requestQueue_.clear();this.requestQueue_=null;};var module$contents$ee$layers$EarthEngineTileSource_EarthEngineTileSource=function(mapId,opt_profiler){module$exports$ee$layers$AbstractTileSource.call(this);this.mapId_=mapId;this.profiler_=opt_profiler||null;};$jscomp.inherits(module$contents$ee$layers$EarthEngineTileSource_EarthEngineTileSource,module$exports$ee$layers$AbstractTileSource);module$contents$ee$layers$EarthEngineTileSource_EarthEngineTileSource.prototype.loadTile=function(tile,opt_priority){var ProfilerHeader=module$contents$ee$apiclient_apiclient.PROFILE_HEADER.toLowerCase(),key=goog.events.listen(tile,ee.layers.AbstractTile.EventType.STATUS_CHANGED,function(){switch(tile.getStatus()){case ee.layers.AbstractTile.Status.LOADED:var profileId=tile.sourceResponseHeaders[ProfilerHeader];this.profiler_&&profileId&&this.profiler_.addTile(tile.div.id,profileId);break;case ee.layers.AbstractTile.Status.FAILED:case ee.layers.AbstractTile.Status.ABORTED:this.profiler_&&""!==tile.div.id&&this.profiler_.removeTile(tile.div.id),goog.events.unlistenByKey(key);}},void 0,this);tile.sourceUrl=this.getTileUrl_(tile.coord,tile.zoom);var handleAvailableToken=goog.bind(this.handleAvailableToken_,this,tile);module$contents$ee$layers$EarthEngineTileSource_EarthEngineTileSource.getGlobalTokenPool_().getObject(handleAvailableToken,opt_priority);};module$contents$ee$layers$EarthEngineTileSource_EarthEngineTileSource.prototype.getUniqueId=function(){return this.mapId_.mapid+"-"+this.mapId_.token;};module$contents$ee$layers$EarthEngineTileSource_EarthEngineTileSource.prototype.handleAvailableToken_=function(tile,token){var tokenPool=module$contents$ee$layers$EarthEngineTileSource_EarthEngineTileSource.getGlobalTokenPool_();if(tile.isDisposed()||tile.getStatus()==ee.layers.AbstractTile.Status.ABORTED){tokenPool.releaseObject(token);}else{var key=goog.events.listen(tile,ee.layers.AbstractTile.EventType.STATUS_CHANGED,function(){tile.isDone()&&(goog.events.unlistenByKey(key),tokenPool.releaseObject(token));});tile.startLoad();}};module$contents$ee$layers$EarthEngineTileSource_EarthEngineTileSource.prototype.getTileUrl_=function(coord,zoom){var url=ee.data.getTileUrl(this.mapId_,coord.x,coord.y,zoom);return this.profiler_&&this.profiler_.isEnabled()?url+"&profiling=1":url;};module$contents$ee$layers$EarthEngineTileSource_EarthEngineTileSource.getGlobalTokenPool_=function(){module$contents$ee$layers$EarthEngineTileSource_EarthEngineTileSource.TOKEN_POOL_||(module$contents$ee$layers$EarthEngineTileSource_EarthEngineTileSource.TOKEN_POOL_=new goog.structs.PriorityPool(0,module$contents$ee$layers$EarthEngineTileSource_EarthEngineTileSource.TOKEN_COUNT_));return module$contents$ee$layers$EarthEngineTileSource_EarthEngineTileSource.TOKEN_POOL_;};goog.exportSymbol("ee.layers.EarthEngineTileSource",module$contents$ee$layers$EarthEngineTileSource_EarthEngineTileSource);module$contents$ee$layers$EarthEngineTileSource_EarthEngineTileSource.TOKEN_POOL_=null;module$contents$ee$layers$EarthEngineTileSource_EarthEngineTileSource.TOKEN_COUNT_=4;ee.layers.EarthEngineTileSource=module$contents$ee$layers$EarthEngineTileSource_EarthEngineTileSource;goog.singleton={};var module$contents$goog$singleton_instantiatedSingletons=[],module$contents$goog$singleton_Singleton=function(){};goog.singleton.getInstance=function(ctor){(0,goog.asserts.assert)(!Object.isSealed(ctor),"Cannot use getInstance() with a sealed constructor.");if(ctor.instance_&&ctor.hasOwnProperty("instance_")){return ctor.instance_;}goog.DEBUG&&module$contents$goog$singleton_instantiatedSingletons.push(ctor);var instance=new ctor();ctor.instance_=instance;(0,goog.asserts.assert)(ctor.hasOwnProperty("instance_"),"Could not instantiate singleton.");return instance;};goog.singleton.instantiatedSingletons=module$contents$goog$singleton_instantiatedSingletons;ee.MapTileManager=function(){goog.events.EventTarget.call(this);this.tokenPool_=new ee.MapTileManager.TokenPool_(0,60);this.requests_=new goog.structs.Map();};$jscomp.inherits(ee.MapTileManager,goog.events.EventTarget);ee.MapTileManager.prototype.getOutstandingCount=function(){return this.requests_.getCount();};ee.MapTileManager.prototype.send=function(id,url,opt_priority,opt_imageCompletedCallback,opt_maxRetries){if(this.requests_.get(id)){throw Error(ee.MapTileManager.ERROR_ID_IN_USE_);}var request=new ee.MapTileManager.Request_(id,url,opt_imageCompletedCallback,goog.bind(this.releaseRequest_,this),void 0!==opt_maxRetries?opt_maxRetries:ee.MapTileManager.MAX_RETRIES);this.requests_.set(id,request);var callback=goog.bind(this.handleAvailableToken_,this,request);this.tokenPool_.getObject(callback,opt_priority);return request;};ee.MapTileManager.prototype.abort=function(id){var request=this.requests_.get(id);request&&(request.setAborted(!0),this.releaseRequest_(request));};ee.MapTileManager.prototype.handleAvailableToken_=function(request,token){if(request.getImageLoader()||request.getAborted()){this.releaseObject_(token);}else{if(request.setToken(token),token.setActive(!0),request.setImageLoader(new goog.net.ImageLoader()),!request.retry()){throw Error("Cannot dispatch first request!");}}};ee.MapTileManager.prototype.releaseRequest_=function(request){this.requests_.remove(request.getId());request.getImageLoader()&&(this.releaseObject_(request.getToken()),request.getImageLoader().dispose());request.fireImageEventCallback();};ee.MapTileManager.prototype.releaseObject_=function(token){token.setActive(!1);if(!this.tokenPool_.releaseObject(token)){throw Error("Object not released");}};ee.MapTileManager.prototype.disposeInternal=function(){goog.events.EventTarget.prototype.disposeInternal.call(this);this.tokenPool_.dispose();this.tokenPool_=null;var requests=this.requests_;module$contents$goog$array_forEach(requests.getValues(),function(value){value.dispose();});requests.clear();this.requests_=null;};ee.MapTileManager.getInstance=function(){return goog.singleton.getInstance(ee.MapTileManager);};goog.exportSymbol("ee.MapTileManager",ee.MapTileManager);ee.MapTileManager.MAX_RETRIES=1;ee.MapTileManager.ERROR_ID_IN_USE_="[ee.MapTileManager] ID in use";ee.MapTileManager.Request_=function(id,url,opt_imageEventCallback,opt_requestCompleteCallback,opt_maxRetries){goog.Disposable.call(this);this.id_=id;this.url_=url;this.maxRetries_=void 0!==opt_maxRetries?opt_maxRetries:ee.MapTileManager.MAX_RETRIES;this.imageEventCallback_=opt_imageEventCallback;this.requestCompleteCallback_=opt_requestCompleteCallback;};$jscomp.inherits(ee.MapTileManager.Request_,goog.Disposable);ee.MapTileManager.Request_.prototype.getImageLoader=function(){return this.imageLoader_;};ee.MapTileManager.Request_.prototype.setImageLoader=function(imageLoader){this.imageLoader_=imageLoader;};ee.MapTileManager.Request_.prototype.getToken=function(){return this.token_;};ee.MapTileManager.Request_.prototype.setToken=function(token){this.token_=token;};ee.MapTileManager.Request_.prototype.addImageEventListener=function(){goog.events.listenOnce(this.imageLoader_,ee.MapTileManager.Request_.IMAGE_LOADER_EVENT_TYPES_,goog.bind(this.handleImageEvent_,this));};ee.MapTileManager.Request_.prototype.fireImageEventCallback=function(){this.imageEventCallback_&&this.imageEventCallback_(this.event_,this.profileId_);};ee.MapTileManager.Request_.prototype.getId=function(){return this.id_;};ee.MapTileManager.Request_.prototype.getUrl=function(){return this.url_;};ee.MapTileManager.Request_.prototype.getMaxRetries=function(){return this.maxRetries_;};ee.MapTileManager.Request_.prototype.getAttemptCount=function(){return this.attemptCount_;};ee.MapTileManager.Request_.prototype.increaseAttemptCount=function(){this.attemptCount_++;};ee.MapTileManager.Request_.prototype.hasReachedMaxRetries=function(){return this.attemptCount_>this.maxRetries_;};ee.MapTileManager.Request_.prototype.setAborted=function(aborted){aborted&&!this.aborted_&&(this.aborted_=aborted,this.event_=new goog.events.Event(goog.net.EventType.ABORT));};ee.MapTileManager.Request_.prototype.getAborted=function(){return this.aborted_;};ee.MapTileManager.Request_.prototype.handleImageEvent_=function(e){if(this.getAborted()){this.markCompleted_();}else{switch(e.type){case goog.events.EventType.LOAD:this.handleSuccess_(e);this.markCompleted_();break;case goog.net.EventType.ERROR:case goog.net.EventType.ABORT:this.handleError_(e);}}};ee.MapTileManager.Request_.prototype.markCompleted_=function(){this.requestCompleteCallback_&&this.requestCompleteCallback_(this);};ee.MapTileManager.Request_.prototype.handleSuccess_=function(e){this.event_=e;};ee.MapTileManager.Request_.prototype.handleError_=function(e){this.retry()||(this.event_=e,this.markCompleted_());};ee.MapTileManager.Request_.prototype.disposeInternal=function(){goog.Disposable.prototype.disposeInternal.call(this);delete this.imageEventCallback_;delete this.requestCompleteCallback_;};ee.MapTileManager.Request_.prototype.retry=function(){if(this.hasReachedMaxRetries()){return!1;}this.increaseAttemptCount();this.imageLoader_.removeImage(this.id_);setTimeout(goog.bind(this.start_,this),0);return!0;};ee.MapTileManager.Request_.prototype.start_=function(){if(!this.getAborted()){var actuallyLoadImage=goog.bind(function(imageUrl){this.getAborted()||(this.imageLoader_.addImage(this.id_,imageUrl),this.addImageEventListener(),this.imageLoader_.start());},this),sourceUrl=this.getUrl();if(goog.Uri.parse(sourceUrl).getQueryData().containsKey("profiling")){var xhrIo=new goog.net.XhrIo();xhrIo.setResponseType(goog.net.XhrIo.ResponseType.BLOB);xhrIo.listen(goog.net.EventType.COMPLETE,goog.bind(function(event){this.profileId_=xhrIo.getResponseHeader(module$contents$ee$apiclient_apiclient.PROFILE_HEADER)||null;if(200<=xhrIo.getStatus()&&300>xhrIo.getStatus()){try{var objectUrl=goog.html.SafeUrl.unwrap(goog.html.SafeUrl.fromBlob(xhrIo.getResponse()));var ok=objectUrl!==goog.html.SafeUrl.INNOCUOUS_STRING;}catch(e){}}actuallyLoadImage(ok?objectUrl:sourceUrl);},this));xhrIo.listenOnce(goog.net.EventType.READY,goog.bind(xhrIo.dispose,xhrIo));xhrIo.send(sourceUrl,"GET");}else{actuallyLoadImage(sourceUrl);}}};ee.MapTileManager.Request_.prototype.attemptCount_=0;ee.MapTileManager.Request_.prototype.aborted_=!1;ee.MapTileManager.Request_.prototype.imageLoader_=null;ee.MapTileManager.Request_.prototype.token_=null;ee.MapTileManager.Request_.prototype.event_=null;ee.MapTileManager.Request_.prototype.profileId_=null;ee.MapTileManager.Request_.IMAGE_LOADER_EVENT_TYPES_=[goog.events.EventType.LOAD,goog.net.EventType.ABORT,goog.net.EventType.ERROR];ee.MapTileManager.Token_=function(){goog.Disposable.call(this);this.active_=!1;};$jscomp.inherits(ee.MapTileManager.Token_,goog.Disposable);ee.MapTileManager.Token_.prototype.setActive=function(val){this.active_=val;};ee.MapTileManager.Token_.prototype.isActive=function(){return this.active_;};ee.MapTileManager.TokenPool_=function(opt_minCount,opt_maxCount){goog.structs.PriorityPool.call(this,opt_minCount,opt_maxCount);};$jscomp.inherits(ee.MapTileManager.TokenPool_,goog.structs.PriorityPool);ee.MapTileManager.TokenPool_.prototype.createObject=function(){return new ee.MapTileManager.Token_();};ee.MapTileManager.TokenPool_.prototype.disposeObject=function(obj){obj.dispose();};ee.MapTileManager.TokenPool_.prototype.objectCanBeReused=function(obj){return!obj.isDisposed()&&!obj.isActive();};ee.MapLayerOverlay=function(url,mapId,token,init,opt_profiler){ee.AbstractOverlay.call(this,url,mapId,token,init,opt_profiler);this.minZoom=init.minZoom||0;this.maxZoom=init.maxZoom||20;if(!window.google||!window.google.maps){throw Error("Google Maps API hasn't been initialized.");}this.tileSize=init.tileSize||new google.maps.Size(256,256);this.isPng=void 0!==init.isPng?init.isPng:!0;this.name=init.name;this.tiles_=new goog.structs.Set();this.opacity_=1.0;this.visible_=!0;this.profiler_=opt_profiler||null;};$jscomp.inherits(ee.MapLayerOverlay,ee.AbstractOverlay);ee.MapLayerOverlay.prototype.addTileCallback=function(callback){return goog.events.listen(this,ee.AbstractOverlay.EventType.TILE_LOADED,callback);};ee.MapLayerOverlay.prototype.removeTileCallback=function(callbackId){goog.events.unlistenByKey(callbackId);};ee.MapLayerOverlay.prototype.dispatchTileEvent_=function(){this.dispatchEvent(new ee.TileEvent(this.tilesLoading.length));};ee.MapLayerOverlay.prototype.getTile=function(coord,zoom,ownerDocument){var maxCoord;if(zoom<this.minZoom||0>coord.y||coord.y>=1<<zoom){var img=ownerDocument.createElement("IMG");img.style.width="0px";img.style.height="0px";return img;}var profiling=this.profiler_&&this.profiler_.isEnabled(),tileId=this.getTileId(coord,zoom),src=[this.url,tileId].join("/")+"?token="+this.token;profiling&&(src+="&profiling=1");var uniqueTileId=[tileId,this.tileCounter,this.token].join("/");this.tileCounter+=1;var div=goog.dom.createDom(goog.dom.TagName.DIV,{id:uniqueTileId}),priority=new Date().getTime()/1000;this.tilesLoading.push(uniqueTileId);ee.MapTileManager.getInstance().send(uniqueTileId,src,priority,goog.bind(this.handleImageCompleted_,this,div,uniqueTileId));this.dispatchTileEvent_();return div;};ee.MapLayerOverlay.prototype.getLoadedTilesCount=function(){return this.tiles_.getCount();};ee.MapLayerOverlay.prototype.getLoadingTilesCount=function(){return this.tilesLoading.length;};ee.MapLayerOverlay.prototype.releaseTile=function(tileDiv){ee.MapTileManager.getInstance().abort(tileDiv.id);this.tiles_.remove(goog.dom.getFirstElementChild(tileDiv));""!==tileDiv.id&&(this.tilesFailed.remove(tileDiv.id),this.profiler_&&this.profiler_.removeTile(tileDiv.id));};ee.MapLayerOverlay.prototype.setOpacity=function(opacity){this.opacity_=opacity;var iter=this.tiles_.__iterator__();goog.iter.forEach(iter,function(tile){goog.style.setOpacity(tile,opacity);});};ee.MapLayerOverlay.prototype.handleImageCompleted_=function(div,tileId,e,profileId){if(e.type==goog.net.EventType.ERROR){module$contents$goog$array_remove(this.tilesLoading,tileId),this.tilesFailed.add(tileId),this.dispatchEvent(e);}else{module$contents$goog$array_remove(this.tilesLoading,tileId);if(e.target&&e.type==goog.events.EventType.LOAD){var tile=e.target;this.tiles_.add(tile);1.0!=this.opacity_&&goog.style.setOpacity(tile,this.opacity_);div.appendChild(tile);}this.dispatchTileEvent_();}this.profiler_&&null!==profileId&&this.profiler_.addTile(tileId,profileId);};goog.exportSymbol("ee.MapLayerOverlay",ee.MapLayerOverlay);goog.exportProperty(ee.MapLayerOverlay.prototype,"removeTileCallback",ee.MapLayerOverlay.prototype.removeTileCallback);goog.exportProperty(ee.MapLayerOverlay.prototype,"addTileCallback",ee.MapLayerOverlay.prototype.addTileCallback);goog.exportProperty(ee.MapLayerOverlay.prototype,"getTile",ee.MapLayerOverlay.prototype.getTile);goog.exportProperty(ee.MapLayerOverlay.prototype,"setOpacity",ee.MapLayerOverlay.prototype.setOpacity);goog.exportProperty(ee.MapLayerOverlay.prototype,"releaseTile",ee.MapLayerOverlay.prototype.releaseTile);goog.async.Delay=function(listener,opt_interval,opt_handler){goog.Disposable.call(this);this.listener_=listener;this.interval_=opt_interval||0;this.handler_=opt_handler;this.callback_=goog.bind(this.doAction_,this);};goog.inherits(goog.async.Delay,goog.Disposable);goog.async.Delay.prototype.id_=0;goog.async.Delay.prototype.disposeInternal=function(){goog.async.Delay.superClass_.disposeInternal.call(this);this.stop();delete this.listener_;delete this.handler_;};goog.async.Delay.prototype.start=function(opt_interval){this.stop();this.id_=goog.Timer.callOnce(this.callback_,void 0!==opt_interval?opt_interval:this.interval_);};goog.async.Delay.prototype.startIfNotActive=function(opt_interval){this.isActive()||this.start(opt_interval);};goog.async.Delay.prototype.stop=function(){this.isActive()&&goog.Timer.clear(this.id_);this.id_=0;};goog.async.Delay.prototype.fire=function(){this.stop();this.doAction_();};goog.async.Delay.prototype.fireIfActive=function(){this.isActive()&&this.fire();};goog.async.Delay.prototype.isActive=function(){return 0!=this.id_;};goog.async.Delay.prototype.doAction_=function(){this.id_=0;this.listener_&&this.listener_.call(this.handler_);};ee.data.Profiler=function(format){goog.events.EventTarget.call(this);this.format_=format;this.isEnabled_=!1;this.lastRefreshToken_=null;this.profileIds_=Object.create(null);this.tileProfileIds_=Object.create(null);this.showInternal_=!1;this.profileError_=null;this.throttledRefresh_=new goog.async.Delay(goog.bind(this.refresh_,this),ee.data.Profiler.DELAY_BEFORE_REFRESH_);this.profileData_=ee.data.Profiler.getEmptyProfile_(format);this.MAX_RETRY_COUNT_=5;};$jscomp.inherits(ee.data.Profiler,goog.events.EventTarget);ee.data.Profiler.prototype.isEnabled=function(){return this.isEnabled_;};ee.data.Profiler.prototype.setEnabled=function(value){this.isEnabled_=!!value;this.dispatchEvent(new goog.events.Event(ee.data.Profiler.EventType.STATE_CHANGED));};ee.data.Profiler.prototype.isLoading=function(){return null!==this.lastRefreshToken_;};ee.data.Profiler.prototype.isError=function(){return null!=this.profileError_;};ee.data.Profiler.prototype.getStatusText=function(){if(this.profileError_){return this.profileError_;}if(this.lastRefreshToken_){return"Loading...";}var profiles=0,nonTileProfiles=0,tileProfiles=0;module$contents$goog$object_forEach(this.profileIds_,function(refCount){profiles++;Infinity===refCount?nonTileProfiles++:tileProfiles++;},this);return"Viewing "+profiles+" profiles, "+nonTileProfiles+" from API calls and "+tileProfiles+" from map tiles.";};ee.data.Profiler.prototype.getProfileData=function(){return this.profileData_;};ee.data.Profiler.prototype.clearAndDrop=function(){this.profileIds_=Object.create(null);this.tileProfileIds_=Object.create(null);this.refresh_();};ee.data.Profiler.prototype.getProfileHook=function(){var profileIds=this.profileIds_;return this.isEnabled_?goog.bind(function(profileId){profileIds[profileId]=Infinity;this.throttledRefresh_.start();},this):null;};ee.data.Profiler.prototype.removeProfile_=function(profileId){var count=this.profileIds_[profileId];1<count?this.profileIds_[profileId]--:void 0!==count&&(delete this.profileIds_[profileId],this.throttledRefresh_.start());};ee.data.Profiler.prototype.refresh_=function(retryAttempt){var $jscomp$this=this;retryAttempt=void 0===retryAttempt?0:retryAttempt;var marker={};this.lastRefreshToken_=marker;var handleResponse=function(result,error){marker==$jscomp$this.lastRefreshToken_&&(error&&"number"===typeof retryAttempt&&retryAttempt<$jscomp$this.MAX_RETRY_COUNT_?goog.Timer.callOnce(goog.bind($jscomp$this.refresh_,$jscomp$this,retryAttempt+1),2*ee.data.Profiler.DELAY_BEFORE_REFRESH_):($jscomp$this.profileError_=error||null,$jscomp$this.profileData_=error?ee.data.Profiler.getEmptyProfile_($jscomp$this.format_):result,$jscomp$this.lastRefreshToken_=null,$jscomp$this.dispatchEvent(ee.data.Profiler.EventType.STATE_CHANGED),$jscomp$this.dispatchEvent(ee.data.Profiler.EventType.DATA_CHANGED)));},ids=module$contents$goog$object_getKeys(this.profileIds_);0===ids.length?handleResponse(ee.data.Profiler.getEmptyProfile_(this.format_),void 0):(ee.ApiFunction._apply(this.showInternal_?"Profile.getProfilesInternal":"Profile.getProfiles",{ids:ids,format:this.format_.toString()}).getInfo(handleResponse),this.dispatchEvent(ee.data.Profiler.EventType.STATE_CHANGED));};ee.data.Profiler.prototype.addTile=function(tileId,profileId){this.tileProfileIds_[tileId]||(this.tileProfileIds_[tileId]=profileId,this.profileIds_[profileId]=(this.profileIds_[profileId]||0)+1,this.throttledRefresh_.start());};ee.data.Profiler.prototype.removeTile=function(tileId){var profileId=this.tileProfileIds_[tileId];profileId&&(delete this.tileProfileIds_[tileId],this.removeProfile_(profileId));};ee.data.Profiler.prototype.getShowInternal=function(){return this.showInternal_;};ee.data.Profiler.prototype.setShowInternal=function(value){this.showInternal_=!!value;this.throttledRefresh_.fire();};ee.data.Profiler.prototype.setParentEventTarget=function(parent){throw Error("not applicable");};ee.data.Profiler.getEmptyProfile_=function(format){switch(format){case ee.data.Profiler.Format.TEXT:return"";case ee.data.Profiler.Format.JSON:return ee.data.Profiler.EMPTY_JSON_PROFILE_;default:throw Error("Invalid Profiler data format: "+format);}};ee.data.Profiler.DELAY_BEFORE_REFRESH_=500;ee.data.Profiler.EMPTY_JSON_PROFILE_={cols:[],rows:[]};ee.data.Profiler.EventType={STATE_CHANGED:"statechanged",DATA_CHANGED:"datachanged"};ee.data.Profiler.Format=function(format){this.format_=format;};ee.data.Profiler.Format.prototype.toString=function(){return this.format_;};ee.data.Profiler.Format.TEXT=new ee.data.Profiler.Format("text");ee.data.Profiler.Format.JSON=new ee.data.Profiler.Format("json");(function(){var exportedFnInfo={},orderedFnNames="ee.ApiFunction._call ee.ApiFunction._apply ee.ApiFunction.lookup ee.batch.Export.table.toDmsLayer ee.batch.Export.image.toAsset ee.batch.Export.videoMap.toCloudStorage ee.batch.Export.video.toCloudStorage ee.batch.Export.classifier.toAsset ee.batch.Export.image.toCloudStorage ee.batch.Export.video.toDrive ee.batch.Export.image.toDrive ee.batch.Export.table.toAsset ee.batch.Export.map.toCloudStorage ee.batch.Export.table.toDrive ee.batch.Export.table.toCloudStorage ee.Collection.prototype.filterDate ee.Collection.prototype.filter ee.Collection.prototype.filterMetadata ee.Collection.prototype.limit ee.Collection.prototype.map ee.Collection.prototype.filterBounds ee.Collection.prototype.sort ee.Collection.prototype.iterate ee.ComputedObject.prototype.aside ee.ComputedObject.prototype.evaluate ee.ComputedObject.prototype.serialize ee.ComputedObject.prototype.getInfo ee.data.authenticateViaPopup ee.data.makeTableDownloadUrl ee.data.newTaskId ee.data.getList ee.data.authenticateViaPrivateKey ee.data.cancelOperation ee.data.getTaskStatus ee.data.listAssets ee.data.authenticateViaOauth ee.data.getOperation ee.data.startTableIngestion ee.data.listOperations ee.data.getAssetAcl ee.data.listImages ee.data.cancelTask ee.data.getMapId ee.data.getDmsTilesKey ee.data.getAsset ee.data.getThumbId ee.data.getInfo ee.data.getTaskList ee.data.listBuckets ee.data.authenticate ee.data.createAssetHome ee.data.deleteAsset ee.data.getTileUrl ee.data.getAssetRoots ee.data.computeValue ee.data.updateTask ee.data.getTaskListWithLimit ee.data.startIngestion ee.data.getVideoThumbId ee.data.startProcessing ee.data.getFilmstripThumbId ee.data.getAssetRootQuota ee.data.createAsset ee.data.makeThumbUrl ee.data.createFolder ee.data.getDownloadId ee.data.renameAsset ee.data.updateAsset ee.data.makeDownloadUrl ee.data.getTableDownloadId ee.data.setAssetProperties ee.data.copyAsset ee.data.setAssetAcl ee.Date ee.Deserializer.fromCloudApiJSON ee.Deserializer.fromJSON ee.Deserializer.decode ee.Deserializer.decodeCloudApi ee.Dictionary ee.reset ee.call ee.TILE_SIZE ee.InitState ee.apply ee.initialize ee.Algorithms ee.Element.prototype.set ee.Feature ee.Feature.prototype.getMap ee.Feature.prototype.getInfo ee.FeatureCollection.prototype.getMap ee.FeatureCollection.prototype.getInfo ee.FeatureCollection ee.FeatureCollection.prototype.select ee.FeatureCollection.prototype.getDownloadURL ee.Filter.prototype.not ee.Filter.date ee.Filter.gte ee.Filter.neq ee.Filter.and ee.Filter.metadata ee.Filter.gt ee.Filter.lte ee.Filter.inList ee.Filter.eq ee.Filter ee.Filter.or ee.Filter.bounds ee.Filter.lt ee.Function.prototype.apply ee.Function.prototype.call ee.Geometry.MultiLineString ee.Geometry.prototype.toGeoJSON ee.Geometry.BBox ee.Geometry ee.Geometry.prototype.toGeoJSONString ee.Geometry.Rectangle ee.Geometry.Polygon ee.Geometry.MultiPolygon ee.Geometry.LinearRing ee.Geometry.LineString ee.Geometry.prototype.serialize ee.Geometry.Point ee.Geometry.MultiPoint ee.Image.cat ee.Image.prototype.select ee.Image.prototype.getInfo ee.Image.prototype.expression ee.Image.prototype.rename ee.Image.prototype.getThumbId ee.Image.prototype.clip ee.Image.prototype.getMap ee.Image.prototype.getDownloadURL ee.Image.prototype.getThumbURL ee.Image ee.Image.rgb ee.ImageCollection.prototype.getVideoThumbURL ee.ImageCollection.prototype.getInfo ee.ImageCollection.prototype.first ee.ImageCollection ee.ImageCollection.prototype.getMap ee.ImageCollection.prototype.getFilmstripThumbURL ee.ImageCollection.prototype.select ee.List ee.Number ee.Serializer.toReadableCloudApiJSON ee.Serializer.encodeCloudApi ee.Serializer.toCloudApiJSON ee.Serializer.encode ee.Serializer.encodeCloudApiPretty ee.Serializer.toReadableJSON ee.Serializer.toJSON ee.String ee.Terrain".split(" "),orderedParamLists=[["name","var_args"],["name","namedArgs"],["name"],["collection","opt_description","opt_assetId","opt_maxVertices"],"image opt_description opt_assetId opt_pyramidingPolicy opt_dimensions opt_region opt_scale opt_crs opt_crsTransform opt_maxPixels opt_shardSize".split(" "),"collection opt_description opt_bucket opt_fileNamePrefix opt_framesPerSecond opt_writePublicTiles opt_minZoom opt_maxZoom opt_scale opt_region opt_skipEmptyTiles opt_minTimeMachineZoomSubset opt_maxTimeMachineZoomSubset opt_tileWidth opt_tileHeight opt_tileStride opt_videoFormat opt_version opt_mapsApiKey opt_bucketCorsUris".split(" "),"collection opt_description opt_bucket opt_fileNamePrefix opt_framesPerSecond opt_dimensions opt_region opt_scale opt_crs opt_crsTransform opt_maxPixels opt_maxFrames".split(" "),["classifier","opt_description","opt_assetId"],"image opt_description opt_bucket opt_fileNamePrefix opt_dimensions opt_region opt_scale opt_crs opt_crsTransform opt_maxPixels opt_shardSize opt_fileDimensions opt_skipEmptyTiles opt_fileFormat opt_formatOptions".split(" "),"collection opt_description opt_folder opt_fileNamePrefix opt_framesPerSecond opt_dimensions opt_region opt_scale opt_crs opt_crsTransform opt_maxPixels opt_maxFrames".split(" "),"image opt_description opt_folder opt_fileNamePrefix opt_dimensions opt_region opt_scale opt_crs opt_crsTransform opt_maxPixels opt_shardSize opt_fileDimensions opt_skipEmptyTiles opt_fileFormat opt_formatOptions".split(" "),["collection","opt_description","opt_assetId","opt_maxVertices"],"image opt_description opt_bucket opt_fileFormat opt_path opt_writePublicTiles opt_scale opt_maxZoom opt_minZoom opt_region opt_skipEmptyTiles opt_mapsApiKey opt_bucketCorsUris".split(" "),"collection opt_description opt_folder opt_fileNamePrefix opt_fileFormat opt_selectors opt_maxVertices".split(" "),"collection opt_description opt_bucket opt_fileNamePrefix opt_fileFormat opt_selectors opt_maxVertices".split(" "),["start","opt_end"],["filter"],["name","operator","value"],["max","opt_property","opt_ascending"],["algorithm","opt_dropNulls"],["geometry"],["property","opt_ascending"],["algorithm","opt_first"],["func","var_args"],["callback"],["legacy"],["opt_callback"],["opt_success","opt_error"],["id"],["opt_count","opt_callback"],["params","opt_callback"],["privateKey","opt_success","opt_error","opt_extraScopes","opt_suppressDefaultScopes"],["operationName","opt_callback"],["taskId","opt_callback"],["parent","params","opt_callback"],"clientId success opt_error opt_extraScopes opt_onImmediateFailed opt_suppressDefaultScopes".split(" "),["operationName","opt_callback"],["taskId","request","opt_callback"],["opt_limit","opt_callback"],["assetId","opt_callback"],["parent","params","opt_callback"],["taskId","opt_callback"],["params","opt_callback"],["params","opt_callback"],["id","opt_callback"],["params","opt_callback"],["id","opt_callback"],["opt_callback"],["project","opt_callback"],["clientId","success","opt_error","opt_extraScopes","opt_onImmediateFailed"],["requestedId","opt_callback"],["assetId","opt_callback"],["id","x","y","z"],["opt_callback"],["obj","opt_callback"],["taskId","action","opt_callback"],["opt_limit","opt_callback"],["taskId","request","opt_callback"],["params","opt_callback"],["taskId","params","opt_callback"],["params","opt_callback"],["rootId","opt_callback"],["value","opt_path","opt_force","opt_properties","opt_callback"],["id"],["path","opt_force","opt_callback"],["params","opt_callback"],["sourceId","destinationId","opt_callback"],["assetId","asset","updateFields","opt_callback"],["id"],["params","opt_callback"],["assetId","properties","opt_callback"],["sourceId","destinationId","opt_overwrite","opt_callback"],["assetId","aclUpdate","opt_callback"],["date","opt_tz"],["json"],["json"],["json"],["json"],["opt_dict"],[],["func","var_args"],[],[],["func","namedArgs"],"opt_baseurl opt_tileurl opt_successCallback opt_errorCallback opt_xsrfToken opt_project".split(" "),[],["var_args"],["geometry","opt_properties"],["opt_visParams","opt_callback"],["opt_callback"],["opt_visParams","opt_callback"],["opt_callback"],["args","opt_column"],["propertySelectors","opt_newProperties","opt_retainGeometry"],["opt_format","opt_selectors","opt_filename","opt_callback"],[],["start","opt_end"],["name","value"],["name","value"],["var_args"],["name","operator","value"],["name","value"],["name","value"],["opt_leftField","opt_rightValue","opt_rightField","opt_leftValue"],["name","value"],["opt_filter"],["var_args"],["geometry","opt_errorMargin"],["name","value"],["namedArgs"],["var_args"],["coords","opt_proj","opt_geodesic","opt_maxError"],[],["west","south","east","north"],["geoJson","opt_proj","opt_geodesic","opt_evenOdd"],[],["coords","opt_proj","opt_geodesic","opt_evenOdd"],["coords","opt_proj","opt_geodesic","opt_maxError","opt_evenOdd"],["coords","opt_proj","opt_geodesic","opt_maxError","opt_evenOdd"],["coords","opt_proj","opt_geodesic","opt_maxError"],["coords","opt_proj","opt_geodesic","opt_maxError"],["legacy"],["coords","opt_proj"],["coords","opt_proj"],["var_args"],["var_args"],["opt_callback"],["expression","opt_map"],["var_args"],["params","opt_callback"],["geometry"],["opt_visParams","opt_callback"],["params","opt_callback"],["params","opt_callback"],["opt_args"],["r","g","b"],["params","opt_callback"],["opt_callback"],[],["args"],["opt_visParams","opt_callback"],["params","opt_callback"],["selectors","opt_names"],["list"],["number"],["obj"],["obj"],["obj"],["obj","opt_isCompound"],["obj"],["obj"],["obj"],["string"],[]];[ee.ApiFunction._call,ee.ApiFunction._apply,ee.ApiFunction.lookup,module$contents$ee$batch_Export.table.toDmsLayer,module$contents$ee$batch_Export.image.toAsset,module$contents$ee$batch_Export.videoMap.toCloudStorage,module$contents$ee$batch_Export.video.toCloudStorage,module$contents$ee$batch_Export.classifier.toAsset,module$contents$ee$batch_Export.image.toCloudStorage,module$contents$ee$batch_Export.video.toDrive,module$contents$ee$batch_Export.image.toDrive,module$contents$ee$batch_Export.table.toAsset,module$contents$ee$batch_Export.map.toCloudStorage,module$contents$ee$batch_Export.table.toDrive,module$contents$ee$batch_Export.table.toCloudStorage,ee.Collection.prototype.filterDate,ee.Collection.prototype.filter,ee.Collection.prototype.filterMetadata,ee.Collection.prototype.limit,ee.Collection.prototype.map,ee.Collection.prototype.filterBounds,ee.Collection.prototype.sort,ee.Collection.prototype.iterate,ee.ComputedObject.prototype.aside,ee.ComputedObject.prototype.evaluate,ee.ComputedObject.prototype.serialize,ee.ComputedObject.prototype.getInfo,ee.data.authenticateViaPopup,ee.data.makeTableDownloadUrl,ee.data.newTaskId,ee.data.getList,ee.data.authenticateViaPrivateKey,ee.data.cancelOperation,ee.data.getTaskStatus,ee.data.listAssets,ee.data.authenticateViaOauth,ee.data.getOperation,ee.data.startTableIngestion,ee.data.listOperations,ee.data.getAssetAcl,ee.data.listImages,ee.data.cancelTask,ee.data.getMapId,ee.data.getDmsTilesKey,ee.data.getAsset,ee.data.getThumbId,ee.data.getInfo,ee.data.getTaskList,ee.data.listBuckets,ee.data.authenticate,ee.data.createAssetHome,ee.data.deleteAsset,ee.data.getTileUrl,ee.data.getAssetRoots,ee.data.computeValue,ee.data.updateTask,ee.data.getTaskListWithLimit,ee.data.startIngestion,ee.data.getVideoThumbId,ee.data.startProcessing,ee.data.getFilmstripThumbId,ee.data.getAssetRootQuota,ee.data.createAsset,ee.data.makeThumbUrl,ee.data.createFolder,ee.data.getDownloadId,ee.data.renameAsset,ee.data.updateAsset,ee.data.makeDownloadUrl,ee.data.getTableDownloadId,ee.data.setAssetProperties,ee.data.copyAsset,ee.data.setAssetAcl,ee.Date,ee.Deserializer.fromCloudApiJSON,ee.Deserializer.fromJSON,ee.Deserializer.decode,ee.Deserializer.decodeCloudApi,ee.Dictionary,ee.reset,ee.call,ee.TILE_SIZE,ee.InitState,ee.apply,ee.initialize,ee.Algorithms,ee.Element.prototype.set,ee.Feature,ee.Feature.prototype.getMap,ee.Feature.prototype.getInfo,ee.FeatureCollection.prototype.getMap,ee.FeatureCollection.prototype.getInfo,ee.FeatureCollection,ee.FeatureCollection.prototype.select,ee.FeatureCollection.prototype.getDownloadURL,ee.Filter.prototype.not,ee.Filter.date,ee.Filter.gte,ee.Filter.neq,ee.Filter.and,ee.Filter.metadata,ee.Filter.gt,ee.Filter.lte,ee.Filter.inList,ee.Filter.eq,ee.Filter,ee.Filter.or,ee.Filter.bounds,ee.Filter.lt,ee.Function.prototype.apply,ee.Function.prototype.call,ee.Geometry.MultiLineString,ee.Geometry.prototype.toGeoJSON,ee.Geometry.BBox,ee.Geometry,ee.Geometry.prototype.toGeoJSONString,ee.Geometry.Rectangle,ee.Geometry.Polygon,ee.Geometry.MultiPolygon,ee.Geometry.LinearRing,ee.Geometry.LineString,ee.Geometry.prototype.serialize,ee.Geometry.Point,ee.Geometry.MultiPoint,ee.Image.cat,ee.Image.prototype.select,ee.Image.prototype.getInfo,ee.Image.prototype.expression,ee.Image.prototype.rename,ee.Image.prototype.getThumbId,ee.Image.prototype.clip,ee.Image.prototype.getMap,ee.Image.prototype.getDownloadURL,ee.Image.prototype.getThumbURL,ee.Image,ee.Image.rgb,ee.ImageCollection.prototype.getVideoThumbURL,ee.ImageCollection.prototype.getInfo,ee.ImageCollection.prototype.first,ee.ImageCollection,ee.ImageCollection.prototype.getMap,ee.ImageCollection.prototype.getFilmstripThumbURL,ee.ImageCollection.prototype.select,ee.List,ee.Number,ee.Serializer.toReadableCloudApiJSON,ee.Serializer.encodeCloudApi,ee.Serializer.toCloudApiJSON,ee.Serializer.encode,ee.Serializer.encodeCloudApiPretty,ee.Serializer.toReadableJSON,ee.Serializer.toJSON,ee.String,ee.Terrain].forEach(function(fn,i){fn&&(exportedFnInfo[fn.toString()]={name:orderedFnNames[i],paramNames:orderedParamLists[i]});});goog.global.EXPORTED_FN_INFO=exportedFnInfo;})();goog.Timer.defaultTimerObject=self;// module.exports = goog.global.ee = ee;
|
|
15
|
+
var _default=ee;exports.default=_default;
|