@google/earthengine 0.1.386 → 0.1.388
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/browser.js +155 -246
- package/build/ee_api_js.js +279 -279
- package/build/ee_api_js_debug.js +133 -224
- package/build/ee_api_js_npm.js +155 -246
- package/build/main.js +155 -246
- package/package.json +1 -1
- package/src/apiclient.js +43 -40
- package/src/data.js +7 -6
- package/src/examples/Demos/TerrainVisualization.js +1 -2
- package/.tmp/BUILD +0 -699
- package/.tmp/METADATA +0 -23
- package/.tmp/VERSION_BUILD +0 -47
package/build/ee_api_js.js
CHANGED
|
@@ -412,80 +412,80 @@ var Zh=function(a){a.fc=Xh(function(){a.fc=null;a.yc&&!a.Zc&&(a.yc=!1,Zh(a))},a.
|
|
|
412
412
|
SPDX-License-Identifier: MIT
|
|
413
413
|
*/
|
|
414
414
|
var ai=function(a,b){this.he=[];this.di=a;this.oh=b||null;this.Pc=this.pc=!1;this.ia=void 0;this.kg=this.Qg=this.Se=!1;this.re=0;this.X=null;this.Te=0};x(ai,$h);ai.prototype.cancel=function(a){if(this.pc)this.ia instanceof ai&&this.ia.cancel();else{if(this.X){var b=this.X;delete this.X;a?b.cancel(a):(b.Te--,0>=b.Te&&b.cancel())}this.di?this.di.call(this.oh,this):this.kg=!0;this.pc||bi(this,new ci(this))}};ai.prototype.bh=function(a,b){this.Se=!1;di(this,a,b)};
|
|
415
|
-
var di=function(a,b,c){a.pc=!0;a.ia=c;a.Pc=!b;ei(a)},gi=function(a){if(a.pc){if(!a.kg)throw new fi(a);a.kg=!1}};ai.prototype.callback=function(a){gi(this);hi(a);di(this,!0,a)};var bi=function(a,b){gi(a);hi(b);di(a,!1,b)},hi=function(a){B(!(a instanceof ai),"An execution sequence may not be initiated with a blocking Deferred.")},ii=function(a,b,c,d){B(!a.Qg,"Blocking Deferreds can not be re-used");a.he.push([b,c,d]);a.pc&&ei(a)};
|
|
416
|
-
ai.prototype.then=function(a,b,c){var d,e,g=new Jh(function(f,l){e=f;d=l});
|
|
417
|
-
var
|
|
418
|
-
m,a.Pc=!0,
|
|
419
|
-
|
|
420
|
-
d))};g=b.attributes||{};Ub(g,{type:"text/javascript",charset:"UTF-8"});jh(e,g);td(e,a);
|
|
421
|
-
"Jsloader error (code #"+a+")";b&&(c+=": "+b);Ia.call(this,c);this.code=a};x(
|
|
422
|
-
var
|
|
423
|
-
return}}switch(typeof b){case "string":
|
|
424
|
-
d||(d="\\u"+(c.charCodeAt(0)|65536).toString(16).slice(1),
|
|
425
|
-
var
|
|
426
|
-
0)));var d=new
|
|
427
|
-
|
|
428
|
-
|
|
429
|
-
this.Cf=!0,this.o.open(b,String(a),!0),this.Cf=!1}catch(f){
|
|
430
|
-
f.toLowerCase()});e=r.FormData&&a instanceof r.FormData;!$a(
|
|
431
|
-
f.message))}if("setAttributionReporting"in this.o&&this.Qe)try{this.o.setAttributionReporting(this.Qe)}catch(f){
|
|
432
|
-
"Send error: "+f.message)),this.Gd(5,f)}};var
|
|
433
|
-
|
|
434
|
-
var
|
|
435
|
-
a.dispatchEvent("success");else{try{var g=2<a.ub()?a.o.statusText:""}catch(f){
|
|
436
|
-
var
|
|
437
|
-
|
|
438
|
-
var
|
|
439
|
-
|
|
415
|
+
var di=function(a,b,c){a.pc=!0;a.ia=c;a.Pc=!b;ei(a)},gi=function(a){if(a.pc){if(!a.kg)throw new fi(a);a.kg=!1}};ai.prototype.callback=function(a){gi(this);hi(a);di(this,!0,a)};var bi=function(a,b){gi(a);hi(b);di(a,!1,b)},hi=function(a){B(!(a instanceof ai),"An execution sequence may not be initiated with a blocking Deferred.")},ki=function(a){var b=ii();ji(b,a,null)},ji=function(a,b,c,d){B(!a.Qg,"Blocking Deferreds can not be re-used");a.he.push([b,c,d]);a.pc&&ei(a)};
|
|
416
|
+
ai.prototype.then=function(a,b,c){var d,e,g=new Jh(function(f,l){e=f;d=l});ji(this,e,function(f){f instanceof ci?g.cancel():d(f);return li},this);return g.then(a,b,c)};ai.prototype.$goog_Thenable=!0;
|
|
417
|
+
var mi=function(a){return Xa(a.he,function(b){return"function"===typeof b[1]})},li={},ei=function(a){if(a.re&&a.pc&&mi(a)){var b=a.re,c=ni[b];c&&(r.clearTimeout(c.fa),delete ni[b]);a.re=0}a.X&&(a.X.Te--,delete a.X);b=a.ia;for(var d=c=!1;a.he.length&&!a.Se;){var e=a.he.shift(),g=e[0],f=e[1];e=e[2];if(g=a.Pc?f:g)try{var l=g.call(e||a.oh,b);l===li&&(l=void 0);void 0!==l&&(a.Pc=a.Pc&&(l==b||l instanceof Error),a.ia=b=l);if(Gh(b)||"function"===typeof r.Promise&&b instanceof r.Promise)d=!0,a.Se=!0}catch(m){b=
|
|
418
|
+
m,a.Pc=!0,mi(a)||(c=!0)}}a.ia=b;d&&(l=u(a.bh,a,!0),d=u(a.bh,a,!1),b instanceof ai?(ji(b,l,d),b.Qg=!0):b.then(l,d));c&&(b=new oi(b),ni[b.fa]=b,a.re=b.fa)},fi=function(){Ia.call(this)};x(fi,Ia);fi.prototype.message="Deferred has already fired";fi.prototype.name="AlreadyCalledError";var ci=function(){Ia.call(this)};x(ci,Ia);ci.prototype.message="Deferred was canceled";ci.prototype.name="CanceledError";var oi=function(a){this.fa=r.setTimeout(u(this.Dl,this),0);this.Gd=a};
|
|
419
|
+
oi.prototype.Dl=function(){B(ni[this.fa],"Cannot throw an error that is not scheduled.");delete ni[this.fa];throw this.Gd;};var ni={};var ii=function(){var a=pi(qi),b={},c=b.document||document,d=gd(a).toString(),e=(new qh(c)).createElement("SCRIPT"),g={yi:e,ld:void 0},f=new ai(ri,g),l=null,m=null!=b.timeout?b.timeout:5E3;0<m&&(l=window.setTimeout(function(){si(e,!0);bi(f,new ti(1,"Timeout reached for loading script "+d))},m),g.ld=l);e.onload=e.onreadystatechange=function(){e.readyState&&"loaded"!=e.readyState&&"complete"!=e.readyState||(si(e,b.Ml||!1,l),f.callback(null))};e.onerror=function(){si(e,!0,l);bi(f,new ti(0,"Error while loading script "+
|
|
420
|
+
d))};g=b.attributes||{};Ub(g,{type:"text/javascript",charset:"UTF-8"});jh(e,g);td(e,a);ui(c).appendChild(e);return f},ui=function(a){var b;return(b=(a||document).getElementsByTagName("HEAD"))&&0!==b.length?b[0]:a.documentElement},ri=function(){if(this&&this.yi){var a=this.yi;a&&"SCRIPT"==a.tagName&&si(a,!0,this.ld)}},si=function(a,b,c){null!=c&&r.clearTimeout(c);a.onload=function(){};a.onerror=function(){};a.onreadystatechange=function(){};b&&window.setTimeout(function(){oh(a)},0)},ti=function(a,
|
|
421
|
+
b){var c="Jsloader error (code #"+a+")";b&&(c+=": "+b);Ia.call(this,c);this.code=a};x(ti,Ia);var vi=function(){this.fe=void 0};vi.prototype.va=function(a){var b=[];wi(this,a,b);return b.join("")};
|
|
422
|
+
var wi=function(a,b,c){if(null==b)c.push("null");else{if("object"==typeof b){if(Array.isArray(b)){var d=b;b=d.length;c.push("[");for(var e="",g=0;g<b;g++)c.push(e),e=d[g],wi(a,a.fe?a.fe.call(d,String(g),e):e,c),e=",";c.push("]");return}if(b instanceof String||b instanceof Number||b instanceof Boolean)b=b.valueOf();else{c.push("{");g="";for(d in b)Object.prototype.hasOwnProperty.call(b,d)&&(e=b[d],"function"!=typeof e&&(c.push(g),xi(d,c),c.push(":"),wi(a,a.fe?a.fe.call(b,d,e):e,c),g=","));c.push("}");
|
|
423
|
+
return}}switch(typeof b){case "string":xi(b,c);break;case "number":c.push(isFinite(b)&&!isNaN(b)?String(b):"null");break;case "boolean":c.push(String(b));break;case "function":c.push("null");break;default:throw Error("Unknown type: "+typeof b);}}},yi={'"':'\\"',"\\":"\\\\","/":"\\/","\b":"\\b","\f":"\\f","\n":"\\n","\r":"\\r","\t":"\\t","\v":"\\u000b"},zi=/\uffff/.test("\uffff")?/[\\"\x00-\x1f\x7f-\uffff]/g:/[\\"\x00-\x1f\x7f-\xff]/g,xi=function(a,b){b.push('"',a.replace(zi,function(c){var d=yi[c];
|
|
424
|
+
d||(d="\\u"+(c.charCodeAt(0)|65536).toString(16).slice(1),yi[c]=d);return d}),'"')};var Ai=function(a,b){this.name=a;this.value=b};Ai.prototype.toString=function(){return this.name};var Bi=new Ai("OFF",Infinity),Ci=new Ai("SEVERE",1E3),Di=new Ai("WARNING",900),Ei=new Ai("CONFIG",700),Fi=new Ai("FINE",500),Gi=function(){this.Bd=0;this.clear()},Hi;Gi.prototype.clear=function(){this.yd=Array(this.Bd);this.kh=-1;this.Kh=!1};var Ii=function(a,b,c){this.reset(a||Bi,b,c,void 0,void 0)};Ii.prototype.reset=function(){};
|
|
425
|
+
var Ji=function(a,b){this.level=null;this.al=[];this.parent=(void 0===b?null:b)||null;this.children=[];this.Th={wf:function(){return a}}},Ki=function(a){if(a.level)return a.level;if(a.parent)return Ki(a.parent);Na("Root logger has no level set.");return Bi},Li=function(a,b){for(;a;)a.al.forEach(function(c){c(b)}),a=a.parent},Mi=function(){this.entries={};var a=new Ji("");a.level=Ei;this.entries[""]=a},Ni,Oi=function(a,b){var c=a.entries[b];if(c)return c;c=Oi(a,b.slice(0,Math.max(b.lastIndexOf("."),
|
|
426
|
+
0)));var d=new Ji(b,c);a.entries[b]=d;c.children.push(d);return d},Pi=function(){Ni||(Ni=new Mi);return Ni},Qi=function(a,b,c){var d;if(d=a)if(d=a&&b){d=b.value;var e=a?Ki(Oi(Pi(),a.wf())):Bi;d=d>=e.value}if(d){b=b||Bi;d=Oi(Pi(),a.wf());"function"===typeof c&&(c=c());Hi||(Hi=new Gi);e=Hi;a=a.wf();if(0<e.Bd){var g=(e.kh+1)%e.Bd;e.kh=g;e.Kh?(e=e.yd[g],e.reset(b,c,a),a=e):(e.Kh=g==e.Bd-1,a=e.yd[g]=new Ii(b,c,a))}else a=new Ii(b,c,a);Li(d,a)}},Ri=function(a,b){a&&Qi(a,Ci,b)},Si=function(a,b){a&&Qi(a,
|
|
427
|
+
Fi,b)};var Ti=function(a){switch(a){case 200:case 201:case 202:case 204:case 206:case 304:case 1223:return!0;default:return!1}};var Ui=function(){};Ui.prototype.Ug=null;var Wi=function(a){var b;(b=a.Ug)||(b={},Vi(a)&&(b[0]=!0,b[1]=!0),b=a.Ug=b);return b};var Xi,Yi=function(){};x(Yi,Ui);var Zi=function(a){return(a=Vi(a))?new ActiveXObject(a):new XMLHttpRequest},Vi=function(a){if(!a.Gh&&"undefined"==typeof XMLHttpRequest&&"undefined"!=typeof ActiveXObject){for(var b=["MSXML2.XMLHTTP.6.0","MSXML2.XMLHTTP.3.0","MSXML2.XMLHTTP","Microsoft.XMLHTTP"],c=0;c<b.length;c++){var d=b[c];try{return new ActiveXObject(d),a.Gh=d}catch(e){}}throw Error("Could not create ActiveXObject. ActiveX might be disabled, or MSXML might not be installed");}return a.Gh};Xi=new Yi;var $i=function(a){D.call(this);this.headers=new Map;this.xe=a||null;this.Ea=!1;this.we=this.o=null;this.Tc=this.Oh=this.Td="";this.Ub=this.Cf=this.Rd=this.jf=!1;this.zc=0;this.ne=null;this.xc="";this.te=this.rl=this.Si=!1;this.Qe=this.Bg=null};x($i,D);$i.prototype.ba=Oi(Pi(),"goog.net.XhrIo").Th;var aj=/^https?$/i,bj=["POST","PUT"],cj=[];$i.prototype.Rk=function(){this.Ra();ab(cj,this)};$i.prototype.setTrustToken=function(a){this.Bg=a};$i.prototype.setAttributionReporting=function(a){this.Qe=a};
|
|
428
|
+
$i.prototype.send=function(a,b,c,d){if(this.o)throw Error("[goog.net.XhrIo] Object is active with another request="+this.Td+"; newUri="+a);b=b?b.toUpperCase():"GET";this.Td=a;this.Tc="";this.Oh=b;this.jf=!1;this.Ea=!0;this.o=this.xe?Zi(this.xe):Zi(Xi);this.we=this.xe?Wi(this.xe):Wi(Xi);this.o.onreadystatechange=u(this.gi,this);this.rl&&"onprogress"in this.o&&(this.o.onprogress=u(function(f){this.fi(f,!0)},this),this.o.upload&&(this.o.upload.onprogress=u(this.fi,this)));try{Si(this.ba,dj(this,"Opening Xhr")),
|
|
429
|
+
this.Cf=!0,this.o.open(b,String(a),!0),this.Cf=!1}catch(f){Si(this.ba,dj(this,"Error opening Xhr: "+f.message));this.Gd(5,f);return}a=c||"";c=new Map(this.headers);if(d)if(Object.getPrototypeOf(d)===Object.prototype)for(var e in d)c.set(e,d[e]);else if("function"===typeof d.keys&&"function"===typeof d.get){e=n(d.keys());for(var g=e.next();!g.done;g=e.next())g=g.value,c.set(g,d.get(g))}else throw Error("Unknown input type for opt_headers: "+String(d));d=Array.from(c.keys()).find(function(f){return"content-type"==
|
|
430
|
+
f.toLowerCase()});e=r.FormData&&a instanceof r.FormData;!$a(bj,b)||d||e||c.set("Content-Type","application/x-www-form-urlencoded;charset=utf-8");b=n(c);for(d=b.next();!d.done;d=b.next())c=n(d.value),d=c.next().value,c=c.next().value,this.o.setRequestHeader(d,c);this.xc&&(this.o.responseType=this.xc);"withCredentials"in this.o&&this.o.withCredentials!==this.Si&&(this.o.withCredentials=this.Si);if("setTrustToken"in this.o&&this.Bg)try{this.o.setTrustToken(this.Bg)}catch(f){Si(this.ba,dj(this,"Error SetTrustToken: "+
|
|
431
|
+
f.message))}if("setAttributionReporting"in this.o&&this.Qe)try{this.o.setAttributionReporting(this.Qe)}catch(f){Si(this.ba,dj(this,"Error SetAttributionReporting: "+f.message))}try{ej(this),0<this.zc&&(this.te=fj(this.o),Si(this.ba,dj(this,"Will abort after "+this.zc+"ms if incomplete, xhr2 "+this.te)),this.te?(this.o.timeout=this.zc,this.o.ontimeout=u(this.ld,this)):this.ne=Xh(this.ld,this.zc,this)),Si(this.ba,dj(this,"Sending request")),this.Rd=!0,this.o.send(a),this.Rd=!1}catch(f){Si(this.ba,dj(this,
|
|
432
|
+
"Send error: "+f.message)),this.Gd(5,f)}};var fj=function(a){return vb&&"number"===typeof a.timeout&&void 0!==a.ontimeout};$i.prototype.ld=function(){"undefined"!=typeof va&&this.o&&(this.Tc="Timed out after "+this.zc+"ms, aborting",Si(this.ba,dj(this,this.Tc)),this.dispatchEvent("timeout"),this.abort(8))};$i.prototype.Gd=function(a,b){this.Ea=!1;this.o&&(this.Ub=!0,this.o.abort(),this.Ub=!1);this.Tc=b;gj(this);hj(this)};var gj=function(a){a.jf||(a.jf=!0,a.dispatchEvent("complete"),a.dispatchEvent("error"))};
|
|
433
|
+
$i.prototype.abort=function(){this.o&&this.Ea&&(Si(this.ba,dj(this,"Aborting")),this.Ea=!1,this.Ub=!0,this.o.abort(),this.Ub=!1,this.dispatchEvent("complete"),this.dispatchEvent("abort"),hj(this))};$i.prototype.J=function(){this.o&&(this.Ea&&(this.Ea=!1,this.Ub=!0,this.o.abort(),this.Ub=!1),hj(this,!0));$i.L.J.call(this)};$i.prototype.gi=function(){this.Sa||(this.Cf||this.Rd||this.Ub?ij(this):this.nl())};$i.prototype.nl=function(){ij(this)};
|
|
434
|
+
var ij=function(a){if(a.Ea&&"undefined"!=typeof va)if(a.we[1]&&4==a.ub()&&2==a.getStatus())Si(a.ba,dj(a,"Local request error detected and ignored"));else if(a.Rd&&4==a.ub())Xh(a.gi,0,a);else if(a.dispatchEvent("readystatechange"),4==a.ub()){Si(a.ba,dj(a,"Request complete"));a.Ea=!1;try{var b=a.getStatus(),c;if(!(c=Ti(b))){var d;if(d=0===b){var e=String(a.Td).match(wd)[1]||null;!e&&r.self&&r.self.location&&(e=r.self.location.protocol.slice(0,-1));d=!aj.test(e?e.toLowerCase():"")}c=d}if(c)a.dispatchEvent("complete"),
|
|
435
|
+
a.dispatchEvent("success");else{try{var g=2<a.ub()?a.o.statusText:""}catch(f){Si(a.ba,"Can not get status: "+f.message),g=""}a.Tc=g+" ["+a.getStatus()+"]";gj(a)}}finally{hj(a)}}};$i.prototype.fi=function(a,b){B("progress"===a.type,"goog.net.EventType.PROGRESS is of the same type as raw XHR progress.");this.dispatchEvent(jj(a,"progress"));this.dispatchEvent(jj(a,b?"downloadprogress":"uploadprogress"))};
|
|
436
|
+
var jj=function(a,b){return{type:b,lengthComputable:a.lengthComputable,loaded:a.loaded,total:a.total}},hj=function(a,b){if(a.o){ej(a);var c=a.o,d=a.we[0]?function(){}:null;a.o=null;a.we=null;b||a.dispatchEvent("ready");try{c.onreadystatechange=d}catch(e){Ri(a.ba,"Problem encountered resetting onreadystatechange: "+e.message)}}},ej=function(a){a.o&&a.te&&(a.o.ontimeout=null);a.ne&&(r.clearTimeout(a.ne),a.ne=null)};$i.prototype.isActive=function(){return!!this.o};
|
|
437
|
+
$i.prototype.ub=function(){return this.o?this.o.readyState:0};$i.prototype.getStatus=function(){try{return 2<this.ub()?this.o.status:-1}catch(a){return-1}};
|
|
438
|
+
var kj=function(a){try{if(!a.o)return null;if("response"in a.o)return a.o.response;switch(a.xc){case "":case "text":return a.o.responseText;case "arraybuffer":if("mozResponseArrayBuffer"in a.o)return a.o.mozResponseArrayBuffer}Ri(a.ba,"Response type "+a.xc+" is not supported on this browser");return null}catch(b){return Si(a.ba,"Can not get response: "+b.message),null}};$i.prototype.getResponseHeader=function(a){if(this.o&&4==this.ub())return a=this.o.getResponseHeader(a),null===a?void 0:a};
|
|
439
|
+
$i.prototype.getAllResponseHeaders=function(){return this.o&&2<=this.ub()?this.o.getAllResponseHeaders()||"":""};var lj=function(a){var b={};a=a.getAllResponseHeaders().split("\r\n");for(var c=0;c<a.length;c++)if(!/^[\s\xa0]*$/.test(a[c])){var d=vd(a[c]),e=d[0];d=d[1];if("string"===typeof d){d=d.trim();var g=b[e]||[];b[e]=g;g.push(d)}}return Hb(b,function(f){return f.join(", ")})},dj=function(a,b){return b+" ["+a.Oh+" "+a.Td+" "+a.getStatus()+"]"};/*
|
|
440
440
|
|
|
441
441
|
SPDX-License-Identifier: Apache-2.0
|
|
442
442
|
*/
|
|
443
|
-
var
|
|
444
|
-
a.type);return new jd(URL.createObjectURL(a),id)}var
|
|
443
|
+
var mj=fa([""]),nj=ha(["\x00"],["\\0"]),oj=ha(["\n"],["\\n"]),pj=ha(["\x00"],["\\u0000"]),qj=fa([""]),rj=ha(["\x00"],["\\0"]),sj=ha(["\n"],["\\n"]),tj=ha(["\x00"],["\\u0000"]);function uj(a){return Object.isFrozen(a)&&Object.isFrozen(a.raw)}function vj(a){return-1===a.toString().indexOf("`")}var wj=vj(function(a){return a(mj)})||vj(function(a){return a(nj)})||vj(function(a){return a(oj)})||vj(function(a){return a(pj)}),xj=uj(qj)&&uj(rj)&&uj(sj)&&uj(tj);function zj(a){if("undefined"!==typeof MediaSource&&a instanceof MediaSource)return new jd(URL.createObjectURL(a),id);var b=a.type.match(/^([^;]+)(?:;\w+=(?:\w+|"[\w;,= ]+"))*$/i);if(2!==(null==b?void 0:b.length)||!(/^image\/(?:bmp|gif|jpeg|jpg|png|tiff|webp|x-icon|heic|heif|avif|x-ms-bmp)$/i.test(b[1])||/^video\/(?:mpeg|mp4|ogg|webm|x-matroska|quicktime|x-ms-wmv)$/i.test(b[1])||/^audio\/(?:3gpp2|3gpp|aac|amr|L16|midi|mp3|mp4|mpeg|oga|ogg|opus|x-m4a|x-matroska|x-wav|wav|webm)$/i.test(b[1])||/^font\/\w+/i.test(b[1])))throw Error("unsafe blob MIME type: "+
|
|
444
|
+
a.type);return new jd(URL.createObjectURL(a),id)}var Aj=[],Bj=function(a){var b=Oi(Pi(),"safevalues").Th;b&&Qi(b,Di,"A URL with content '"+a+"' was sanitized away.")};-1===Aj.indexOf(Bj)&&Aj.push(Bj);function pi(a){var b=sa.apply(1,arguments);if(!Array.isArray(a)||!Array.isArray(a.raw)||a.length!==a.raw.length||!wj&&a===a.raw||!(wj&&!xj||uj(a))||b.length+1!==a.length)throw new TypeError("\n ############################## ERROR ##############################\n\n It looks like you are trying to call a template tag function (fn`...`)\n using the normal function syntax (fn(...)), which is not supported.\n\n The functions in the safevalues library are not designed to be called\n like normal functions, and doing so invalidates the security guarantees\n that safevalues provides.\n\n If you are stuck and not sure how to proceed, please reach out to us\n instead through:\n - go/ise-hardening-yaqs (preferred) // LINE-INTERNAL\n - g/ise-hardening // LINE-INTERNAL\n - https://github.com/google/safevalues/issues\n\n ############################## ERROR ##############################");
|
|
445
445
|
if(0===b.length)return hd(a[0]);var c=a[0].toLowerCase();if(/^data:/.test(c))throw Error("Data URLs cannot have expressions in the template literal input.");if(/^https:\/\//.test(c)||/^\/\//.test(c)){var d=c.indexOf("//")+2;var e=c.indexOf("/",d);if(e<=d)throw Error("Can't interpolate data in a url's origin, Please make sure to fully specify the origin, terminated with '/'.");d=c.substring(d,e);if(!/^[0-9a-z.:-]+$/i.test(d))throw Error("The origin contains unsupported characters.");if(!/^[^:]*(:[0-9]+)?$/i.test(d))throw Error("Invalid port number.");
|
|
446
446
|
if(!/(^|\.)[a-z][^.]*$/i.test(d))throw Error("The top-level domain must start with a letter.");d=!0}else d=!1;if(!d)if(/^\//.test(c))if("/"===c||1<c.length&&"/"!==c[1]&&"\\"!==c[1])d=!0;else throw Error("The path start in the url is invalid.");else d=!1;if(!(d=d||RegExp("^[^:\\s\\\\/]+/").test(c)))if(/^about:blank/.test(c)){if("about:blank"!==c&&!/^about:blank#/.test(c))throw Error("The about url is invalid.");d=!0}else d=!1;if(!d)throw Error("Trying to interpolate expressions in an unsupported url format.");
|
|
447
|
-
c=a[0];for(d=0;d<b.length;d++)c+=encodeURIComponent(b[d])+a[d+1];return hd(c)};var
|
|
448
|
-
h.assets=function(){return new Rg(this.M)};h.Na=function(){return new Yg(this.M)};h.value=function(){return new bh(this.M)};h.maps=function(){return new Xg(this.M)};h.map=function(){return new Wg(this.M)};h.image=function(){return new Vg(this.M)};h.table=function(){return new Zg(this.M)};h.video=function(){return new dh(this.M)};var
|
|
449
|
-
|
|
450
|
-
|
|
451
|
-
|
|
452
|
-
Wc(p,f[m]))});return b?b(l):l};return this.callback?(
|
|
453
|
-
|
|
454
|
-
var
|
|
455
|
-
b&&d.push("https://www.googleapis.com/auth/devstorage.read_write");a=d=d.concat(c);c=b=0;for(var e={};c<a.length;){var g=a[c++],f=t(g)?"o"+Ca(g):(typeof g).charAt(0)+g;Object.prototype.hasOwnProperty.call(e,f)||(e[f]=!0,a[b++]=g)}a.length=b;return d},
|
|
456
|
-
b,d)})},
|
|
457
|
-
p&&(p="latest");m["x-goog-api-client"]="ee-js/"+p;p=
|
|
458
|
-
a.indexOf("?")?"&":"?",a+=v);e=a.startsWith("/")?
|
|
459
|
-
m.callback=function(z){z=z.target;if(429==z.getStatus()&&l<v)return l++,setTimeout(function(){
|
|
447
|
+
c=a[0];for(d=0;d<b.length;d++)c+=encodeURIComponent(b[d])+a[d+1];return hd(c)};var qi=fa(["https://accounts.google.com/gsi/client"]),Cj,J=function(a,b){Dj();this.callback=a;this.M=new Ej(!a,b)};J.prototype.pd=function(a){this.M.Rb=a;return this};J.prototype.handle=function(a){var b=this;if(a instanceof Promise){if(this.callback){var c=function(d,e){try{return b.callback(d,e)}catch(g){setTimeout(function(){throw g;},0)}};a.then(c,function(d){return c(void 0,d)})}}else a.then(function(d){a=d});return a};var Fj=function(){return"projects/"+Cj};h=J.prototype;h.Fc=function(){return new Pg(this.M)};
|
|
448
|
+
h.assets=function(){return new Rg(this.M)};h.Na=function(){return new Yg(this.M)};h.value=function(){return new bh(this.M)};h.maps=function(){return new Xg(this.M)};h.map=function(){return new Wg(this.M)};h.image=function(){return new Vg(this.M)};h.table=function(){return new Zg(this.M)};h.video=function(){return new dh(this.M)};var Ej=function(a,b){this.sync=a=void 0===a?!1:a;this.Rb=void 0;this.vi=null!=b?b:a?5:10};q(Ej,gh);
|
|
449
|
+
Ej.prototype.send=function(a,b){var c=this;Pd(a);var d=a.path||"",e=Gj()+d,g=Hj(a.u||{}),f=a.body?JSON.stringify(a.body):void 0;if(this.sync){d=Ij(e,g,void 0,a.B,f,this.vi,this.Rb);d=b?Wc(b,d):d;var l=function(m){return{then:function(p){return l(p(m))}}};return l(d)}return(new Promise(function(m,p){Ij(e,g,function(v,z){z?p(z):m(v)},a.B,f,c.vi,c.Rb)})).then(function(m){return b?Wc(b,m):m})};var Kj=function(a){J.call(this,a);this.M=new Jj;this.Rb=void 0};q(Kj,J);
|
|
450
|
+
Kj.prototype.pd=function(a){this.Rb=a;return this};
|
|
451
|
+
Kj.prototype.send=function(a,b){var c=this,d=Gj()+"/batch",e=a.map(function(f){var l=n(f);f=l.next().value;l=n(l.next().value);var m=l.next().value;l.next();return"--batch_EARTHENGINE_batch\r\nContent-Type: application/http\r\nContent-Transfer-Encoding: binary\r\nMIME-Version: 1.0\r\nContent-ID: <"+f+">\r\n\r\n"+m+"\r\n"}).join("")+"--batch_EARTHENGINE_batch--\r\n",g=function(f){var l={};a.forEach(function(m){var p=n(m);m=p.next().value;p=n(p.next().value);p.next();p=p.next().value;null!=f[m]&&(l[m]=
|
|
452
|
+
Wc(p,f[m]))});return b?b(l):l};return this.callback?(Ij(d,null,function(f,l){return c.callback(l?f:g(f),l)},"multipart/mixed; boundary=batch_EARTHENGINE_batch",e,void 0,this.Rb),null):g(Ij(d,null,void 0,"multipart/mixed; boundary=batch_EARTHENGINE_batch",e,void 0,this.Rb))};var Jj=function(){};q(Jj,gh);
|
|
453
|
+
Jj.prototype.send=function(a,b){var c=[a.B+" "+a.path+" HTTP/1.1"];c.push("Content-Type: application/json; charset=utf-8");var d=Lj();null!=d&&c.push("Authorization: "+d);a=a.body?JSON.stringify(a.body):"";return[c.join("\r\n")+"\r\n\r\n"+a,b]};
|
|
454
|
+
var Mj=function(a,b,c){a=n(b.split("--"+a.split("; boundary=")[1]));for(b=a.next();!b.done;b=a.next())if(b=b.value.split("\r\n\r\n"),!(3>b.length)){var d=b[0].match(/\r\nContent-ID: <response-([^>]*)>/)[1],e=Number(b[1].match(/^HTTP\S*\s(\d+)\s/)[1]);c(d,e,b.slice(2).join("\r\n\r\n"))}},Gj=function(){var a=Nj.replace(/\/api$/,"");return"window"in r&&!a.match(/^https?:\/\/content-/)?a.replace(/^(https?:\/\/)(.*\.googleapis\.com)$/,"$1content-$2"):a},Pj=function(a,b,c){var d=[];a&&(d=d.concat(Oj));
|
|
455
|
+
b&&d.push("https://www.googleapis.com/auth/devstorage.read_write");a=d=d.concat(c);c=b=0;for(var e={};c<a.length;){var g=a[c++],f=t(g)?"o"+Ca(g):(typeof g).charAt(0)+g;Object.prototype.hasOwnProperty.call(e,f)||(e[f]=!0,a[b++]=g)}a.length=b;return d},Vj=function(a,b,c){Qj&&Rj&&Qj({client_id:String(Rj),scope:Sj.join(" "),plugin_name:"earthengine"},function(d){if("immediate_failed"==d.error&&c)c();else if("window"in r)try{Tj(function(){try{Uj(a,b,d)}catch(e){b(e.toString())}})}catch(e){b(e.toString())}else Uj(a,
|
|
456
|
+
b,d)})},Lj=function(){Wj&&0<=Date.now()-Wj&&Xj();return Yj},Xj=function(){Wj=Yj=null},Dj=function(a,b,c,d){null!=a?Nj=a:Zj||(Nj="https://earthengine.googleapis.com/api");null!=b?ak=b:Zj||(ak="https://earthengine.googleapis.com");void 0!==c&&(bk=c);Cj=null!=d?d:Cj||"earthengine-legacy";Zj=!0},Ij=function(a,b,c,d,e,g,f){Dj();var l=ck,m="application/x-www-form-urlencoded";e&&(m="application/json",d&&d.startsWith("multipart")&&(m=d,d="POST"));d=d||"POST";m={"Content-Type":m};var p="0.1.388";"0.1.388"===
|
|
457
|
+
p&&(p="latest");m["x-goog-api-client"]="ee-js/"+p;p=Lj();if(null!=p)m.Authorization=p;else if(c&&Qj&&Rj)return Vj(function(){dk(l,function(){Ij(a,b,c,d)})}),null;b=b?b.clone():new Ed;null!=ek&&b.add("key",ek);l&&(m["X-Earth-Engine-Computation-Profiling"]="1");Cj&&"earthengine-legacy"!==Cj&&(m["X-Goog-User-Project"]=Cj);b=fk(b,a);null!=bk&&(m["X-XSRF-Token"]=bk);null!=gk&&(m["X-Earth-Engine-App-ID-Token"]=gk);p=e||null;var v=b?b.toString():"";"POST"===d&&void 0===e?p=v:/^[\s\xa0]*$/.test(v)||(a+=-1!=
|
|
458
|
+
a.indexOf("?")?"&":"?",a+=v);e=a.startsWith("/")?Nj+a:a;if(c)return hk.push(ik(e,c,d,p,m,g,f)),jk.qf(),null;v=function(Q,oa){this.setRequestHeader&&this.setRequestHeader(oa,Q)};var z=0;for(g=null!=g?g:5;;){var C=Zi(Xi);C.open(d,e,!1);Fb(m,v,C);C.send(p);if(429!=C.status||z>g)break;z++}return kk(C.status,function(Q){try{return C.getResponseHeader(Q)}catch(oa){return null}},C.responseText,l,void 0,e,d,f)},ik=function(a,b,c,d,e,g,f){var l=0,m={url:a,method:c,content:d,headers:e},p=ck,v=null!=g?g:10;
|
|
459
|
+
m.callback=function(z){z=z.target;if(429==z.getStatus()&&l<v)return l++,setTimeout(function(){hk.push(m);jk.qf()},Math.min(12E4,1E3*Math.pow(2,l))),null;var C=kk,Q=z.getStatus(),oa=u(z.getResponseHeader,z);try{var S=z.o?z.o.responseText:""}catch(Aa){Si(z.ba,"Can not get responseText: "+Aa.message),S=""}return C(Q,oa,S,p,b,a,c,f)};return m},dk=function(a,b){var c=ck;try{ck=a,b.call(void 0)}finally{ck=c}},kk=function(a,b,c,d,e,g,f,l){var m=d?b("X-Earth-Engine-Computation-Profile"):"";m&&d&&d(m);var p=
|
|
460
460
|
function(S){try{var Aa=JSON.parse(S);return!(t(Aa)&&"error"in Aa&&"message"in Aa.error)||l&&l(Aa)?{parsed:Aa}:Aa.error.message}catch(Jb){return"Invalid JSON: "+S}},v=function(S){if(0===S)return"Failed to contact Earth Engine servers. Please check your connection, firewall, or browser extension settings.";if(200>S||300<=S)return"Server returned HTTP code: "+S+" for "+f+" "+g},z,C;b=b("Content-Type")||"application/json";d=b.replace(/;.*/,"");if("application/json"===d||"text/json"===d)c=p(c),c.parsed?
|
|
461
|
-
C=c.parsed:z=c;else if("multipart/mixed"===d){C={};var Q=[];
|
|
462
|
-
|
|
463
|
-
|
|
464
|
-
w("ee.api.
|
|
465
|
-
var
|
|
466
|
-
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 a}},
|
|
467
|
-
switch(a){case "TF_RECORD":case "TFRECORD":return"TF_RECORD_TABLE";case "JSON":case "GEOJSON":return"GEO_JSON";default:return a}},
|
|
468
|
-
typeof c?c.split(","):c,c=!0);var d=[];if("gain"in a||"bias"in a){if("min"in a||"max"in a)throw Error("Gain and bias can't be specified with min and max");var e=b.Yc?b.Yc.length-1:255;d=
|
|
469
|
-
b:null},
|
|
461
|
+
C=c.parsed:z=c;else if("multipart/mixed"===d){C={};var Q=[];Mj(b,c,function(S,Aa,Jb){Jb=p(Jb);Jb.parsed&&(C[S]=Jb.parsed);(Aa=(Jb.parsed?"":Jb)||v(Aa))&&Q.push(S+": "+Aa)});Q.length&&(z=Q.join("\n"))}else var oa="Response was unexpectedly not JSON, but "+d;z=z||v(a)||oa;if(e)return e(C,z),null;if(!z)return C;throw Error(z);},Tj=function(a){var b=function(){Qj||(Qj=function(c,d){r.google.accounts.oauth2.initTokenClient({client_id:c.client_id,callback:d,scope:c.scope}).requestAccessToken()});a()};t(r.default_gsi)?
|
|
462
|
+
b():ki(b)},Uj=function(a,b,c){if(c.access_token){b=c.token_type+" "+c.access_token;if(c.expires_in||0===c.expires_in){c=900*c.expires_in;var d=setTimeout(Vj,.9*c);void 0!==d.unref&&d.unref();Wj=Date.now()+c}Yj=b;a&&a()}else b&&b(c.error||"Unknown error.")},Hj=function(a){var b=new Ed;a=n(Object.entries(a));for(var c=a.next();!c.done;c=a.next()){var d=n(c.value);c=d.next().value;d=d.next().value;b.set(c,d)}return b},hk=[],jk=new Yh(function(){var a=hk.shift();if(a){var b=a.url,c=a.callback,d=a.method,
|
|
463
|
+
e=a.content;a=a.headers;var g=lk,f=new $i;cj.push(f);c&&f.Xa("complete",c);f.Vc("ready",f.Rk);g&&(f.zc=Math.max(0,g));f.send(b,d,e,a)}0==hk.length||jk.qf()},350),Nj=null,ak=null,bk=null,gk=null,fk=qc,Yj=null,Wj=null,Rj=null,Sj=[],Qj=null,Oj=["https://www.googleapis.com/auth/earthengine","https://www.googleapis.com/auth/cloud-platform"],ek=null,Zj=!1,lk=0,ck=null;w("ee.api.ListAssetsResponse",pg);w("ee.api.EarthEngineAsset",lf);w("ee.api.Operation",sg);w("ee.api.ListFeaturesResponse",qg);
|
|
464
|
+
w("ee.api.FeatureViewLocation",of);var mk=function(){};mk.prototype.Eh=function(){return null};var nk=function(){};w("ee.Encodable.SourceFrame",nk);
|
|
465
|
+
var ok=function(a){if(void 0===a||null===a)a=Rc;return new Le({hb:a})},pk=function(a){return new Le({Oa:a})},qk=function(a){return new Le({Fa:new Ke({values:a})})},rk=function(a){return new Le({Ga:new hf({values:a})})},sk=function(a,b){return new Le({ya:new Wf({functionName:a,arguments:b})})},tk=function(a,b){return new Le({ya:new Wf({Va:a,arguments:b})})},uk=function(a,b){return new Le({Ua:new Vf({lc:a,body:b})})},vk=function(a){if(!a)return"AUTO_JPEG_PNG";a=a.toUpperCase();switch(a){case "JPG":return"JPEG";
|
|
466
|
+
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 a}},wk=function(a){if(!a)return"CSV";a=a.toUpperCase();
|
|
467
|
+
switch(a){case "TF_RECORD":case "TFRECORD":return"TF_RECORD_TABLE";case "JSON":case "GEOJSON":return"GEO_JSON";default:return a}},xk=function(a){if(!a)return"VERTICAL";a=a.toUpperCase();if("HORIZONTAL"!==a&&"VERTICAL"!==a)throw Error('Orientation must be "horizontal" or "vertical"');return a},yk=function(a){if(!a)return[];if("string"===typeof a)return a.split(",");if(Array.isArray(a))return a;throw Error("Invalid band list "+a);},Bk=function(a){var b=new tf,c=!1;"palette"in a&&(c=a.palette,b.Yc="string"===
|
|
468
|
+
typeof c?c.split(","):c,c=!0);var d=[];if("gain"in a||"bias"in a){if("min"in a||"max"in a)throw Error("Gain and bias can't be specified with min and max");var e=b.Yc?b.Yc.length-1:255;d=zk(a,"bias","gain").map(function(g){var f=-g.bias/g.gain;return{min:f,max:e/g.gain+f}})}else if("min"in a||"max"in a)d=zk(a,"min","max");0!==d.length&&(b.Wf=d.map(function(g){return new jf(g)}),c=!0);a=Ak(a.gamma);if(1<a.length)throw Error("Only one gamma value is supported");1===a.length&&(b.gamma=a[0],c=!0);return c?
|
|
469
|
+
b:null},Ak=function(a){return a?a.split(",").map(Number):[]},zk=function(a,b,c){var d=Ak(a[b]),e=Ak(a[c]);if(0===d.length)return e.map(function(g){var f={};return f[b]=0,f[c]=g,f});if(0===e.length)return d.map(function(g){var f={};return f[b]=g,f[c]=1,f});if(d.length!==e.length)throw Error("Length of "+b+" and "+c+" must match.");return d.map(function(g,f){var l={};return l[b]=g,l[c]=e[f],l})},Ck=function(a){var b=function(f){var l={};l.description=f.description||"";l.type=f.type||"";null!=f.ud&&
|
|
470
470
|
(l.name=f.ud);void 0!==f.defaultValue&&(l["default"]=f.defaultValue);null!=f.optional&&(l.optional=f.optional);return l},c=function(f){var l={};l.args=(f.arguments||[]).map(b);l.description=f.description||"";l.returns=f.cg||"";null!=f.hidden&&(l.hidden=f.hidden);f.preview&&(l.preview=f.preview);f.deprecated&&(l.deprecated=f.ff);f.sourceCodeUri&&(l.sourceCodeUri=f.sourceCodeUri);return l},d={};a=n(a.Fc||[]);for(var e=a.next();!e.done;e=a.next()){e=e.value;var g=e.name.replace(/^algorithms\//,"");d[g]=
|
|
471
|
-
c(e)}return d},
|
|
472
|
-
a},
|
|
471
|
+
c(e)}return d},Dk=/^projects\/((?:\w+(?:[\w\-]+\.[\w\-]+)*?\.\w+:)?[a-z][a-z0-9\-]{4,28}[a-z0-9])\/.+/,Ek=/^projects\/((?:\w+(?:[\w\-]+\.[\w\-]+)*?\.\w+:)?[a-z][a-z0-9\-]{4,28}[a-z0-9])\/assets\/(.*)$/,Fk=/^projects\/((?:\w+(?:[\w\-]+\.[\w\-]+)*?\.\w+:)?[a-z][a-z0-9\-]{4,28}[a-z0-9])\/assets\/?$/,Gk=function(a){return(a=Dk.exec(a))?a[1]:"earthengine-legacy"},Hk=function(a){return Ek.exec(a)?a:/^(users|projects)\/.*/.exec(a)?"projects/earthengine-legacy/assets/"+a:"projects/earthengine-public/assets/"+
|
|
472
|
+
a},Jk=function(a){return(a.assets||[]).map(Ik)},Kk=function(a){switch(a){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 "FEATURE_VIEW":return"FeatureView";default:return"Unknown"}},Ik=function(a){var b=Lk(Kk(a.type),a.name),c=Object.assign({},a.properties||{});a.sizeBytes&&(c["system:asset_size"]=Number(a.sizeBytes));a.startTime&&(c["system:time_start"]=
|
|
473
473
|
Date.parse(a.startTime));a.endTime&&(c["system:time_end"]=Date.parse(a.endTime));a.geometry&&(c["system:footprint"]=a.geometry);"string"===typeof a.title?c["system:title"]=a.title:"string"===typeof c.title&&(c["system:title"]=c.title);"string"===typeof a.description?c["system:description"]=a.description:"string"===typeof c.description&&(c["system:description"]=c.description);a.updateTime&&(b.version=1E3*Date.parse(a.updateTime));b.properties=c;a.bands&&(b.bands=a.bands.map(function(d){var e={id:d.id,
|
|
474
474
|
crs:d.grid.ef,dimensions:void 0,crs_transform:void 0};if(d.grid){if(null!=d.grid.Lb){var g=d.grid.Lb;e.crs_transform=[g.dg||0,g.ig||0,g.zg||0,g.jg||0,g.eg||0,g.Ag||0]}null!=d.grid.dimensions&&(e.dimensions=[d.grid.dimensions.width,d.grid.dimensions.height])}d.dataType&&(g={type:"PixelType"},g.precision=(d.dataType.precision||"").toLowerCase(),d.dataType.dd&&(g.min=d.dataType.dd.min||0,g.max=d.dataType.dd.max),e.data_type=g);return e}));a.Hd&&(b.mapLocation=a.Hd);a.featureCount&&(b.featureCount=a.featureCount);
|
|
475
|
-
return b},
|
|
476
|
-
c(e)||e);a("system:description");"string"!==typeof e&&null!==e||null!=d.description||(d.description=c(e)||e);Object.entries(d).forEach(function(g){var f=n(g);g=f.next().value;f=f.next().value;d[g]=c(f)||f});b.properties=d;return b},
|
|
477
|
-
(new Date(a.starttime)).toISOString());a.endtime&&(b.endTime=(new Date(a.endtime)).toISOString());a.bbox&&(b.region=
|
|
478
|
-
[[0,1],[2,1],[2,3],[0,3],[0,1]].map(function(b){return a[b[0]]+","+a[b[1]]}).join("],[")+"]]]}"},
|
|
479
|
-
e.length&&(d.all_users_can_read=!0);return d},
|
|
480
|
-
kf:null})},
|
|
481
|
-
default:return"UNKNOWN"}},e=Wc(wg,a.metadata||{});null!=e.description&&(b.description=e.description);null!=e.state&&(b.state=d(e.state));c("creation_timestamp_ms",e.df);c("update_timestamp_ms",e.updateTime);c("start_timestamp_ms",e.startTime);b.attempt=e.attempt;a.done&&null!=a.error&&(b.error_message=a.error.message);null!=a.name&&(b.id=
|
|
482
|
-
{started:"OK"};a.name&&(b.taskId=
|
|
483
|
-
|
|
484
|
-
""}));return new ig({nb:a.id||"",da:e})};a.fileBands.forEach(function(d){d.maskForAllBands?b.push(c(null)):null!=d.maskForBands&&b.push(c(d.maskForBands))});return b}
|
|
485
|
-
(b.endTime=(new Date(Number(d))).toISOString());b.properties=c}return b},
|
|
475
|
+
return b},Mk=function(a){var b=new lf,c=function(g){return null===g?Rc:void 0},d=Object.assign({},a),e;a=function(g){e=d[g];delete d[g];return e};void 0!==a("system:asset_size")&&(b.sizeBytes=c(e)||String(e));void 0!==a("system:time_start")&&(b.startTime=c(e)||(new Date(Number(e))).toISOString());void 0!==a("system:time_end")&&(b.endTime=c(e)||(new Date(Number(e))).toISOString());void 0!==a("system:footprint")&&(b.geometry=c(e)||e);a("system:title");"string"!==typeof e&&null!==e||null!=d.title||(d.title=
|
|
476
|
+
c(e)||e);a("system:description");"string"!==typeof e&&null!==e||null!=d.description||(d.description=c(e)||e);Object.entries(d).forEach(function(g){var f=n(g);g=f.next().value;f=f.next().value;d[g]=c(f)||f});b.properties=d;return b},Lk=function(a,b){var c={};c.type=a;null!=b&&(a=b.split("/"),b="projects"===a[0]&&"assets"===a[2]&&["earthengine-legacy","earthengine-public"].includes(a[1])?a.slice(3).join("/"):b,c.id=b);return c},Pk=function(a){var b={};a.num&&(b.pageSize=a.num);a.starttime&&(b.startTime=
|
|
477
|
+
(new Date(a.starttime)).toISOString());a.endtime&&(b.endTime=(new Date(a.endtime)).toISOString());a.bbox&&(b.region=Nk(a.bbox));a.region&&(b.region=a.region);a.bbox&&a.region&&console.warn("Multiple request parameters converted to region");var c="id num starttime endtime bbox region".split(" ");a=n(Object.keys(a).filter(function(e){return!c.includes(e)}));for(var d=a.next();!d.done;d=a.next())console.warn("Unrecognized key "+d.value+" ignored");return Ok(b)},Nk=function(a){return'{"type":"Polygon","coordinates":[[['+
|
|
478
|
+
[[0,1],[2,1],[2,3],[0,3],[0,1]].map(function(b){return a[b[0]]+","+a[b[1]]}).join("],[")+"]]]}"},Qk=function(a){var b={};(a.xd||[]).forEach(function(g){b[g.role]=g.Xb});var c=new Set,d=function(g){var f=g.replace(/^domain:|^group:|^serviceAccount:|^user:/,"");g.startsWith("group:")&&c.add(f);return f};a=b["roles/viewer"]||[];var e=a.filter(function(g){return"allUsers"!==g});d={owners:(b["roles/owner"]||[]).map(d),writers:(b["roles/editor"]||[]).map(d),readers:e.map(d)};0<c.size&&(d.groups=c);a.length!=
|
|
479
|
+
e.length&&(d.all_users_can_read=!0);return d},Rk=function(a){var b=function(d){return(a[d]||[]).map(function(e){if(e.includes(":"))return e;var g="user:";e.includes("@")?a.groups&&a.groups.has(e)?g="group:":e.match(/[@|\.]gserviceaccount\.com$/)&&(g="serviceAccount:"):g="domain:";return g+e})},c=a.all_users_can_read?["allUsers"]:[];b=[{role:"roles/owner",Xb:b("owners")},{role:"roles/viewer",Xb:b("readers").concat(c)},{role:"roles/editor",Xb:b("writers")}].map(function(d){return new Re(d)});return new Gf({xd:b.filter(function(d){return d.Xb.length}),
|
|
480
|
+
kf:null})},Tk=function(a){var b=/^projects\/(.+)\/operations\/.+$/.exec(a);return"projects/"+(b?b[1]:"earthengine-legacy")+"/operations/"+Sk(a)},Sk=function(a){var b=/^.*operations\/(.*)$/.exec(a);return b?b[1]:a},Uk=function(a){var b={},c=function(g,f){null!=f&&(b[g]=Date.parse(f))},d=function(g){switch(g){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";
|
|
481
|
+
default:return"UNKNOWN"}},e=Wc(wg,a.metadata||{});null!=e.description&&(b.description=e.description);null!=e.state&&(b.state=d(e.state));c("creation_timestamp_ms",e.df);c("update_timestamp_ms",e.updateTime);c("start_timestamp_ms",e.startTime);b.attempt=e.attempt;a.done&&null!=a.error&&(b.error_message=a.error.message);null!=a.name&&(b.id=Sk(a.name),b.name=a.name);b.task_type=e.type||"UNKNOWN";b.output_url=e.gf;b.source_url=e.fg;null!=e.vd&&(b.batch_eecu_usage_seconds=e.vd);return b},Vk=function(a){var b=
|
|
482
|
+
{started:"OK"};a.name&&(b.taskId=Sk(a.name),b.name=a.name);a.error&&(b.note=a.error.message);return b},Wk=function(a){return a.primaryPath?[a.primaryPath].concat(ia(a.additionalPaths||[])):null},Zk=function(a){var b=function(g){var f=Wc(kg,g);f.uris=Wk(g);return f},c=Wc(gg,a);c.name=Hk(a.id);c.tilesets=(a.tilesets||[]).map(function(g){var f=Wc(nf,g);f.sources=(g.sources||[]).map(b);return f});c.bands=(a.bands||[]).map(function(g){var f=Wc(hg,g);f.missingData=Xk(g.missingData);return f});c.missingData=
|
|
483
|
+
Xk(a.missingData);c.Mf=gb((a.tilesets||[]).map(Yk));c.pyramidingPolicy=a.pyramidingPolicy||null;if(a.properties){var d=Object.assign({},a.properties),e;a=function(g){e=d[g];delete d[g];return e};a("system:time_start")&&(c.startTime=(new Date(Number(e))).toISOString());a("system:time_end")&&(c.endTime=(new Date(Number(e))).toISOString());c.properties=d}return c},Yk=function(a){var b=[];if(!Array.isArray(a.fileBands))return b;var c=function(d){var e=[];null!=d&&Array.isArray(d.bandId)&&(e=d.bandId.map(function(g){return g||
|
|
484
|
+
""}));return new ig({nb:a.id||"",da:e})};a.fileBands.forEach(function(d){d.maskForAllBands?b.push(c(null)):null!=d.maskForBands&&b.push(c(d.maskForBands))});return b},$k=function(a){var b=Wc(ng,a);b.name=Hk(a.id);b.sources=(a.sources||[]).map(function(e){var g=Wc(Jg,e);g.uris=Wk(e);e.maxError&&(g.Vb=e.maxError);return g});if(a.properties){var c=Object.assign({},a.properties),d;a=function(e){d=c[e];delete c[e];return d};a("system:time_start")&&(b.startTime=(new Date(Number(d))).toISOString());a("system:time_end")&&
|
|
485
|
+
(b.endTime=(new Date(Number(d))).toISOString());b.properties=c}return b},Xk=function(a){if(null==a)return null;var b=new eg({values:[]});null!=a.value&&"number"===typeof a.value&&b.values.push(a.value);Array.isArray(a.values)&&a.values.map(function(c){"number"===typeof c&&b.values.push(c)});return 0==b.values.length?null:b},al=function(a){var b=[];"startTime"in a&&(b.push('startTime >= "'+(new Date(a.startTime)).toISOString()+'"'),delete a.startTime);"endTime"in a&&(b.push('endTime < "'+(new Date(a.endTime)).toISOString()+
|
|
486
486
|
'"'),delete a.endTime);if("region"in a){var c=a.region;if("object"===typeof c)try{c=JSON.stringify(c)}catch(e){throw Error('Filter parameter "region" must be a GeoJSON or WKT string.');}else if("string"!==typeof c)throw Error('Filter parameter "region" must be a GeoJSON or WKT string.');c=c.replace(/"/g,"'");b.push('intersects("'+c+'")');delete a.region}if("properties"in a){if(!Array.isArray(a.properties)&&a.properties.some(function(e){return"string"!==typeof e}))throw Error('Filter parameter "properties" must be an array of strings');
|
|
487
|
-
c=n(a.properties);for(var d=c.next();!d.done;d=c.next())b.push(d.value.trim().replace(/^(properties\.)?/,"properties."));delete a.properties}return b.join(" AND ")},
|
|
488
|
-
var
|
|
487
|
+
c=n(a.properties);for(var d=c.next();!d.done;d=c.next())b.push(d.value.trim().replace(/^(properties\.)?/,"properties."));delete a.properties}return b.join(" AND ")},Ok=function(a){a=Object.assign({},a);var b=al(a);b&&(a.filter=a.filter?a.filter+" AND "+b:b);return a};var bl=function(){this.blockSize=-1};var cl=function(){this.blockSize=-1;this.blockSize=64;this.W=Array(4);this.Ok=Array(this.blockSize);this.qe=this.Gc=0;this.reset()};x(cl,bl);cl.prototype.reset=function(){this.W[0]=1732584193;this.W[1]=4023233417;this.W[2]=2562383102;this.W[3]=271733878;this.qe=this.Gc=0};
|
|
488
|
+
var dl=function(a,b,c){c||(c=0);var d=Array(16);if("string"===typeof b)for(var e=0;16>e;++e)d[e]=b.charCodeAt(c++)|b.charCodeAt(c++)<<8|b.charCodeAt(c++)<<16|b.charCodeAt(c++)<<24;else for(e=0;16>e;++e)d[e]=b[c++]|b[c++]<<8|b[c++]<<16|b[c++]<<24;b=a.W[0];c=a.W[1];e=a.W[2];var g=a.W[3];var f=b+(g^c&(e^g))+d[0]+3614090360&4294967295;b=c+(f<<7&4294967295|f>>>25);f=g+(e^b&(c^e))+d[1]+3905402710&4294967295;g=b+(f<<12&4294967295|f>>>20);f=e+(c^g&(b^c))+d[2]+606105819&4294967295;e=g+(f<<17&4294967295|f>>>
|
|
489
489
|
15);f=c+(b^e&(g^b))+d[3]+3250441966&4294967295;c=e+(f<<22&4294967295|f>>>10);f=b+(g^c&(e^g))+d[4]+4118548399&4294967295;b=c+(f<<7&4294967295|f>>>25);f=g+(e^b&(c^e))+d[5]+1200080426&4294967295;g=b+(f<<12&4294967295|f>>>20);f=e+(c^g&(b^c))+d[6]+2821735955&4294967295;e=g+(f<<17&4294967295|f>>>15);f=c+(b^e&(g^b))+d[7]+4249261313&4294967295;c=e+(f<<22&4294967295|f>>>10);f=b+(g^c&(e^g))+d[8]+1770035416&4294967295;b=c+(f<<7&4294967295|f>>>25);f=g+(e^b&(c^e))+d[9]+2336552879&4294967295;g=b+(f<<12&4294967295|
|
|
490
490
|
f>>>20);f=e+(c^g&(b^c))+d[10]+4294925233&4294967295;e=g+(f<<17&4294967295|f>>>15);f=c+(b^e&(g^b))+d[11]+2304563134&4294967295;c=e+(f<<22&4294967295|f>>>10);f=b+(g^c&(e^g))+d[12]+1804603682&4294967295;b=c+(f<<7&4294967295|f>>>25);f=g+(e^b&(c^e))+d[13]+4254626195&4294967295;g=b+(f<<12&4294967295|f>>>20);f=e+(c^g&(b^c))+d[14]+2792965006&4294967295;e=g+(f<<17&4294967295|f>>>15);f=c+(b^e&(g^b))+d[15]+1236535329&4294967295;c=e+(f<<22&4294967295|f>>>10);f=b+(e^g&(c^e))+d[1]+4129170786&4294967295;b=c+(f<<
|
|
491
491
|
5&4294967295|f>>>27);f=g+(c^e&(b^c))+d[6]+3225465664&4294967295;g=b+(f<<9&4294967295|f>>>23);f=e+(b^c&(g^b))+d[11]+643717713&4294967295;e=g+(f<<14&4294967295|f>>>18);f=c+(g^b&(e^g))+d[0]+3921069994&4294967295;c=e+(f<<20&4294967295|f>>>12);f=b+(e^g&(c^e))+d[5]+3593408605&4294967295;b=c+(f<<5&4294967295|f>>>27);f=g+(c^e&(b^c))+d[10]+38016083&4294967295;g=b+(f<<9&4294967295|f>>>23);f=e+(b^c&(g^b))+d[15]+3634488961&4294967295;e=g+(f<<14&4294967295|f>>>18);f=c+(g^b&(e^g))+d[4]+3889429448&4294967295;c=
|
|
@@ -495,227 +495,227 @@ f>>>21);f=e+(g^b^c)+d[7]+4139469664&4294967295;e=g+(f<<16&4294967295|f>>>16);f=c
|
|
|
495
495
|
3873151461&4294967295;g=b+(f<<11&4294967295|f>>>21);f=e+(g^b^c)+d[15]+530742520&4294967295;e=g+(f<<16&4294967295|f>>>16);f=c+(e^g^b)+d[2]+3299628645&4294967295;c=e+(f<<23&4294967295|f>>>9);f=b+(e^(c|~g))+d[0]+4096336452&4294967295;b=c+(f<<6&4294967295|f>>>26);f=g+(c^(b|~e))+d[7]+1126891415&4294967295;g=b+(f<<10&4294967295|f>>>22);f=e+(b^(g|~c))+d[14]+2878612391&4294967295;e=g+(f<<15&4294967295|f>>>17);f=c+(g^(e|~b))+d[5]+4237533241&4294967295;c=e+(f<<21&4294967295|f>>>11);f=b+(e^(c|~g))+d[12]+1700485571&
|
|
496
496
|
4294967295;b=c+(f<<6&4294967295|f>>>26);f=g+(c^(b|~e))+d[3]+2399980690&4294967295;g=b+(f<<10&4294967295|f>>>22);f=e+(b^(g|~c))+d[10]+4293915773&4294967295;e=g+(f<<15&4294967295|f>>>17);f=c+(g^(e|~b))+d[1]+2240044497&4294967295;c=e+(f<<21&4294967295|f>>>11);f=b+(e^(c|~g))+d[8]+1873313359&4294967295;b=c+(f<<6&4294967295|f>>>26);f=g+(c^(b|~e))+d[15]+4264355552&4294967295;g=b+(f<<10&4294967295|f>>>22);f=e+(b^(g|~c))+d[6]+2734768916&4294967295;e=g+(f<<15&4294967295|f>>>17);f=c+(g^(e|~b))+d[13]+1309151649&
|
|
497
497
|
4294967295;c=e+(f<<21&4294967295|f>>>11);f=b+(e^(c|~g))+d[4]+4149444226&4294967295;b=c+(f<<6&4294967295|f>>>26);f=g+(c^(b|~e))+d[11]+3174756917&4294967295;g=b+(f<<10&4294967295|f>>>22);f=e+(b^(g|~c))+d[2]+718787259&4294967295;e=g+(f<<15&4294967295|f>>>17);f=c+(g^(e|~b))+d[9]+3951481745&4294967295;a.W[0]=a.W[0]+b&4294967295;a.W[1]=a.W[1]+(e+(f<<21&4294967295|f>>>11))&4294967295;a.W[2]=a.W[2]+e&4294967295;a.W[3]=a.W[3]+g&4294967295};
|
|
498
|
-
|
|
499
|
-
|
|
500
|
-
var
|
|
501
|
-
|
|
502
|
-
Wa(a,function(e){return this.Fd(e)},this);else if(t(a)&&"function"!==typeof a)c=Hb(a,function(e){if("function"!==typeof e)return this.Fd(e)},this),Qb(c,this.qd),c={type:"Dictionary",value:c};else throw Error("Can't encode object: "+a);if(this.Sd){b=
|
|
503
|
-
var
|
|
504
|
-
var
|
|
505
|
-
f&&null!=l.body?{argumentNames:l.lc,body:c(b[l.body])}:"functionInvocationValue"===f&&null!=l.Va?{arguments:Hb(l.arguments,c),functionReference:c(b[l.Va])}:"constantValue"===f?l===Rc?null:l:c(l)):e[f]=c(l)}return e};return a.result&&c(b[a.result])};w("ee.Serializer.encodeCloudApiPretty",
|
|
506
|
-
var
|
|
507
|
-
if(b instanceof
|
|
508
|
-
b){if(b in a.Zf)return a.Zf[b];var c=String(a.ll++);a.Zf[b]=c;a.ii[c]=
|
|
509
|
-
z,c+3)});d=f.every(d)?
|
|
510
|
-
f[m]=
|
|
511
|
-
null!=e.Oa&&c(e.Oa)};c(a.xi);return b};var
|
|
512
|
-
|
|
498
|
+
cl.prototype.update=function(a,b){void 0===b&&(b=a.length);for(var c=b-this.blockSize,d=this.Ok,e=this.Gc,g=0;g<b;){if(0==e)for(;g<=c;)dl(this,a,g),g+=this.blockSize;if("string"===typeof a)for(;g<b;){if(d[e++]=a.charCodeAt(g++),e==this.blockSize){dl(this,d);e=0;break}}else for(;g<b;)if(d[e++]=a[g++],e==this.blockSize){dl(this,d);e=0;break}}this.Gc=e;this.qe+=b};
|
|
499
|
+
cl.prototype.digest=function(){var a=Array((56>this.Gc?this.blockSize:2*this.blockSize)-this.Gc);a[0]=128;for(var b=1;b<a.length-8;++b)a[b]=0;var c=8*this.qe;for(b=a.length-8;b<a.length;++b)a[b]=c&255,c/=256;this.update(a);a=Array(16);for(b=c=0;4>b;++b)for(var d=0;32>d;d+=8)a[c++]=this.W[b]>>>d&255;return a};var el=function(a){this.qd="__ee_hash__";this.Sd=!1!==a;this.Ya=[];this.wa={};this.Dg=[];this.Od=new WeakMap;this.ng=new WeakMap;this.Ri=void 0};w("ee.Serializer",el);var fl=new vi,gl=new cl,il=function(a,b){return hl(new el(void 0!==b?b:!0),a)};w("ee.Serializer.encode",il);var jl=function(a){return fl.va(il(a))};w("ee.Serializer.toJSON",jl);var ll=function(a){return kl(il(a,!1))};w("ee.Serializer.toReadableJSON",ll);
|
|
500
|
+
var kl=function(a){return"JSON"in r?r.JSON.stringify(a,null," "):fl.va(a)},hl=function(a,b){b=a.Fd(b);a.Sd&&(b=t(b)&&"ValueRef"==b.type&&1==a.Ya.length?a.Ya[0][1]:{type:"CompoundValue",scope:a.Ya,value:b},a.Ya=[],Ua(a.Dg,u(function(c){delete c[this.qd]},a)),a.Dg=[],a.wa={});return b};
|
|
501
|
+
el.prototype.Fd=function(a){if(void 0===a)throw Error("Can't encode an undefined value.");var b=t(a)?a[this.qd]:null;if(this.Sd&&null!=b&&this.wa[b])return{type:"ValueRef",value:this.wa[b]};if(null===a||"boolean"===typeof a||"number"===typeof a||"string"===typeof a)return a;if(ya(a))return{type:"Invocation",functionName:"Date",arguments:{value:Math.floor(a.getTime())}};if(a instanceof mk){var c=a.encode(u(this.Fd,this));if(!(Array.isArray(c)||t(c)&&"ArgumentRef"!=c.type))return c}else if(Array.isArray(a))c=
|
|
502
|
+
Wa(a,function(e){return this.Fd(e)},this);else if(t(a)&&"function"!==typeof a)c=Hb(a,function(e){if("function"!==typeof e)return this.Fd(e)},this),Qb(c,this.qd),c={type:"Dictionary",value:c};else throw Error("Can't encode object: "+a);if(this.Sd){b=ml(c);if(this.wa[b])var d=this.wa[b];else d=String(this.Ya.length),this.Ya.push([d,c]),this.wa[b]=d;a[this.qd]=b;this.Dg.push(a);return{type:"ValueRef",value:d}}return c};
|
|
503
|
+
var ml=function(a){gl.reset();gl.update(fl.va(a));return gl.digest().toString()},ol=function(a){return Xc(nl(a),Tc,Uc,Vc)};w("ee.Serializer.encodeCloudApi",ol);
|
|
504
|
+
var nl=function(a,b){return pl(new el(!0),a,b)},pl=function(a,b,c){a.Ri=c;return ql(a,b)},rl=function(a,b){var c={};b=b.values;for(var d in b){var e=a.ng.get(b[d]);c[d]=Object.assign({},e)}return c},sl=function(a){a=ql(new el(!1),a);var b=a.values,c=function(d){if(!t(d))return d;var e=Array.isArray(d)?[]:{},g=d instanceof Object.getPrototypeOf(Le);d=n(Object.entries(g?d.h:d));for(var f=d.next();!f.done;f=d.next()){var l=n(f.value);f=l.next().value;l=l.next().value;g?null!==l&&(e[f]="functionDefinitionValue"===
|
|
505
|
+
f&&null!=l.body?{argumentNames:l.lc,body:c(b[l.body])}:"functionInvocationValue"===f&&null!=l.Va?{arguments:Hb(l.arguments,c),functionReference:c(b[l.Va])}:"constantValue"===f?l===Rc?null:l:c(l)):e[f]=c(l)}return e};return a.result&&c(b[a.result])};w("ee.Serializer.encodeCloudApiPretty",sl);var tl=function(a){return fl.va(ol(a))};w("ee.Serializer.toCloudApiJSON",tl);var ul=function(a){return kl(sl(a))};w("ee.Serializer.toReadableCloudApiJSON",ul);
|
|
506
|
+
var ql=function(a,b){try{var c=vl(a,b),d=new wl(c,a.Ya,a.Sd,a.ng),e=xl(d,d.xi);return new af({result:e,values:d.ii})}finally{a.Od=new WeakMap,a.wa={},a.Ya=[]}},vl=function(a,b){var c=function(f){var l=ml(f);t(b)&&a.Od.set(b,l);if(a.wa[l])return a.wa[l];var m=String(a.Ya.length);a.Ya.push([m,f]);return a.wa[l]=m};if(t(b)&&a.wa[a.Od.get(b)])return a.wa[a.Od.get(b)];if(null===b||"boolean"===typeof b||"string"===typeof b||"number"===typeof b)return c(ok(b));if(ya(b))return c(sk("Date",{value:ok(Math.floor(b.getTime()))}));
|
|
507
|
+
if(b instanceof mk){var d=b.na(a),e=b.Eh();null!==e&&a.ng.set(d,e);return c(d)}if(Array.isArray(b))return c(qk(b.map(function(f){return pk(vl(a,f))})));if(t(b)&&"function"!==typeof b){var g={};Object.keys(b).sort().forEach(function(f){g[f]=pk(vl(a,b[f]))});return c(rk(g))}throw Error("Can't encode object: "+b);},wl=function(a,b,c,d){var e=this;this.xi=a;this.values={};b.forEach(function(g){return e.values[g[0]]=g[1]});this.ri=c?yl(this):null;this.ii={};this.Zf={};this.ll=0;this.hd=d},xl=function(a,
|
|
508
|
+
b){if(b in a.Zf)return a.Zf[b];var c=String(a.ll++);a.Zf[b]=c;a.ii[c]=zl(a,a.values[b],0);return c},zl=function(a,b,c){var d=function(z){return null!==z.hb},e=function(z){return z===Rc?null:z},g=function(z,C){a.hd&&a.hd.has(z)&&!a.hd.has(C)&&a.hd.set(C,a.hd.get(z));return C};if(d(b)||null!=b.Wa||null!=b.qb||null!=b.Mb)return b;if(null!=b.Oa){d=a.values[b.Oa];if(null===a.ri||50>c&&1===a.ri[b.Oa])return d=zl(a,d,c),g(b,d);if(Al(d))return g(b,d);d=pk(xl(a,b.Oa));return g(b,d)}if(null!=b.Fa){var f=b.Fa.values.map(function(z){return zl(a,
|
|
509
|
+
z,c+3)});d=f.every(d)?ok(f.map(function(z){return e(z.hb)})):qk(f);return g(b,d)}if(null!=b.Ga){f={};for(var l={},m=n(Object.entries(b.Ga.values||{})),p=m.next();!p.done;p=m.next()){var v=n(p.value);p=v.next().value;v=v.next().value;f[p]=zl(a,v,c+3);null!==l&&d(f[p])?l[p]=e(f[p].hb):l=null}return null!==l?g(b,ok(l)):g(f,rk(f))}if(null!=b.Ua)return d=b.Ua,d=uk(d.lc||[],xl(a,d.body||"")),g(b,d);if(null!=b.ya){d=b.ya;f={};l=n(Object.keys(d.arguments||{}));for(m=l.next();!m.done;m=l.next())m=m.value,
|
|
510
|
+
f[m]=zl(a,d.arguments[m],c+3);d=d.functionName?sk(d.functionName,f):tk(xl(a,d.Va||""),f);return g(b,d)}throw Error("Can't optimize value: "+b);},Al=function(a){var b=a.hb;return null!==b?b===Rc||"number"===typeof b||"boolean"===typeof b:null!=a.Mb},yl=function(a){var b={},c=function(e){b[e]?b[e]++:(b[e]=1,d(a.values[e]))},d=function(e){null!=e.Fa?e.Fa.values.forEach(d):null!=e.Ga?Object.values(e.Ga.values).forEach(d):null!=e.Ua?c(e.Ua.body):null!=e.ya?(e=e.ya,null!=e.Va&&c(e.Va),Object.values(e.arguments).forEach(d)):
|
|
511
|
+
null!=e.Oa&&c(e.Oa)};c(a.xi);return b};var Gl=function(a){if(null==a.element)throw Error('"element" not found in params '+a);var b=a.selectors||null;null!=b&&"string"===typeof b&&(b=b.split(","));b=new Cf({l:nl(a.element),description:K(a.description),oa:null,sa:null,Id:null,wd:null,selectors:b,Vb:L(a.maxErrorMeters),requestId:K(a.id),maxVertices:L(a.maxVertices),O:L(a.maxWorkers)});var c=Bl(a);switch(c){case "GOOGLE_CLOUD_STORAGE":case "DRIVE":var d=new Ff({ja:null,ma:null,F:wk(a.fileFormat)});"GOOGLE_CLOUD_STORAGE"===c?d.ja=Cl(a):d.ma=
|
|
512
|
+
Dl(a);b.oa=d;break;case "ASSET":b.sa=new Df({Ha:El(a)});break;case "FEATURE_VIEW":c=new Nf({name:Hk(a.mapName)});d=null==a?null:new Sf({Of:L(a.maxFeaturesPerTile),tg:a.thinningStrategy});var e=null==a?null:new Rf({Eg:Fl(a.zOrderRanking),sg:Fl(a.thinningRanking)});d=new Of({rg:d,Yf:e});c=new Ef({mf:c,rc:d});b.Id=c;break;case "BIGQUERY":b.wd=new Qe({Re:new Pe({table:K(a.table),overwrite:!!a.overwrite,append:!!a.append})});break;default:throw Error('Export destination "'+c+'" unknown');}a.workloadTag&&
|
|
513
513
|
(b.workloadTag=a.workloadTag);return b};function K(a){return null!=a?String(a):null}function L(a){return null!=a?Number(a):null}
|
|
514
|
-
var
|
|
515
|
-
a=a.tfrecordTensorDepths;if(null!=a)if(t(a)){var c={};Fb(a,function(d,e){if("string"!==typeof e||"number"!==typeof d)throw Error('"tensorDepths" option must be an object of type Object<string, number>');c[e]=d});b.le=c}else throw Error('"tensorDepths" option needs to have the form Object<string, number>.');return b},
|
|
516
|
-
var d=a.tiffShardSize||a.shardSize;var e=!!a.tiffCloudOptimized;var g=!(!a.skipEmptyTiles&&!a.tiffSkipEmptyFiles),f=
|
|
517
|
-
c,d,e,g=L(null!=(b=a.endZoom)?b:a.maxZoom);b=L(null!=(c=a.startZoom)?c:a.minZoom);c=L(a.scale);var f=!(null!=(d=a.skipEmpty)?!d:!a.skipEmptyTiles);d=K(a.mapsApiKey);var l=
|
|
514
|
+
var Bl=function(a){var b="DRIVE";if(null==a)return b;null!=a.outputBucket||null!=a.outputPrefix?b="GOOGLE_CLOUD_STORAGE":null!=a.assetId?b="ASSET":null!=a.mapName&&(b="FEATURE_VIEW");null!=a.table&&(b="BIGQUERY");return b},Il=function(a){var b=new fg({Ze:!!a.tfrecordCompressed,Wb:K(a.tfrecordMaxFileSize),gg:!!a.tfrecordSequenceData,Xe:!!a.tfrecordCollapseBands,Pf:L(a.tfrecordMaskedThreshold),defaultValue:L(a.tfrecordDefaultValue),cc:Hl(a.tfrecordPatchDimensions),Lf:Hl(a.tfrecordKernelSize),le:null});
|
|
515
|
+
a=a.tfrecordTensorDepths;if(null!=a)if(t(a)){var c={};Fb(a,function(d,e){if("string"!==typeof e||"number"!==typeof d)throw Error('"tensorDepths" option must be an object of type Object<string, number>');c[e]=d});b.le=c}else throw Error('"tensorDepths" option needs to have the form Object<string, number>.');return b},Jl=function(a,b){var c=new yf({ja:null,ma:null,Jd:null,me:null,F:vk(a.fileFormat)});if("GEO_TIFF"===c.F){if(a.fileDimensions&&a.tiffFileDimensions)throw Error('Export cannot set both "fileDimensions" and "tiffFileDimensions".');
|
|
516
|
+
var d=a.tiffShardSize||a.shardSize;var e=!!a.tiffCloudOptimized;var g=!(!a.skipEmptyTiles&&!a.tiffSkipEmptyFiles),f=Hl(a.fileDimensions||a.tiffFileDimensions);d=L(d);var l=a.tiffNoData;l=null!=l?new Yf({rf:Number(l)}):null;e=new Xf({We:e,mg:g,cc:f,tileSize:d,Rf:l});c.Jd=e}else"TF_RECORD_IMAGE"===c.F&&(c.me=Il(a));"GOOGLE_CLOUD_STORAGE"===b?c.ja=Cl(a):c.ma=Dl(a);return c},Kl=function(a,b){var c=new If({ja:null,ma:null,F:"MP4"});"GOOGLE_CLOUD_STORAGE"===b?c.ja=Cl(a):c.ma=Dl(a);return c},Ll=function(a){var b,
|
|
517
|
+
c,d,e,g=L(null!=(b=a.endZoom)?b:a.maxZoom);b=L(null!=(c=a.startZoom)?c:a.minZoom);c=L(a.scale);var f=!(null!=(d=a.skipEmpty)?!d:!a.skipEmptyTiles);d=K(a.mapsApiKey);var l=Hl(null!=(e=a.dimensions)?e:a.tileDimensions);e=L(a.stride);var m=L(a.minTimeMachineZoomSubset);a=L(a.maxTimeMachineZoomSubset);a=null==m&&null==a?null:new Lg({start:null!=m?m:0,end:a});return new Bf({hf:g,og:b,scale:c,lg:f,Kf:d,dimensions:l,stride:e,Fg:a})},Hl=function(a){if(null==a)return null;var b=new Zf({height:0,width:0});
|
|
518
518
|
"string"===typeof a&&(-1!==a.indexOf("x")?a=a.split("x").map(Number):-1!==a.indexOf(",")&&(a=a.split(",").map(Number)));if(Array.isArray(a))if(2===a.length)b.height=a[0],b.width=a[1];else if(1===a.length)b.height=a[0],b.width=a[0];else throw Error("Unable to construct grid from dimensions: "+a);else if("number"!==typeof a||isNaN(a))if(t(a)&&null!=a.height&&null!=a.width)b.height=a.height,b.width=a.width;else throw Error("Unable to construct grid from dimensions: "+a);else b.height=a,b.width=a;return b},
|
|
519
|
-
|
|
520
|
-
JSON.stringify(b)+". Rules should either be a comma-separated string or list of strings.");},
|
|
521
|
-
"ASCENDING";break;case "DESC":b.direction="DESCENDING";break;default:throw Error("Ranking rule direction '"+c+"' is invalid. Directions are: ASC, DESC.");}switch(a.trim()){case ".geometryType":b.be=new Cg({});break;case ".minZoomLevel":b.ce=new Eg({});break;default:b.ae=new Bg({attributeName:K(a)})}return b};var
|
|
522
|
-
var
|
|
523
|
-
w("ee.data.setExpressionAugmenter",function(a){
|
|
524
|
-
w("ee.data.
|
|
525
|
-
var
|
|
526
|
-
w("ee.data.getMapId",
|
|
527
|
-
var
|
|
528
|
-
d.name.split("/").pop();return{token:e,formatTileUrl:function(g,f,l){return
|
|
529
|
-
var
|
|
530
|
-
var
|
|
531
|
-
var
|
|
532
|
-
ic:
|
|
533
|
-
var
|
|
534
|
-
var
|
|
535
|
-
var
|
|
536
|
-
if("string"===typeof a.bands)try{a.bands=JSON.parse(a.bands)}catch(e){a.bands=
|
|
537
|
-
JSON.parse(a.crs_transform)}catch(e){}var c=
|
|
538
|
-
var
|
|
539
|
-
"",token:""}}))};w("ee.data.getTableDownloadId",
|
|
540
|
-
var
|
|
541
|
-
var
|
|
542
|
-
var
|
|
543
|
-
var
|
|
544
|
-
var
|
|
545
|
-
var
|
|
546
|
-
b));case "EXPORT_VIDEO_MAP":return b=
|
|
547
|
-
var
|
|
548
|
-
c=new xf({Ha:
|
|
549
|
-
O:L(c.maxWorkers)});d.oa=
|
|
550
|
-
b;if(null==c.element)throw Error('"element" not found in params '+c);b=new Hf({l:
|
|
551
|
-
c+'" unknown');c=new vf({l:
|
|
552
|
-
var
|
|
553
|
-
var
|
|
554
|
-
w("ee.data.listAssets",
|
|
555
|
-
var
|
|
556
|
-
var
|
|
519
|
+
Cl=function(a){var b=null;null!=a.writePublicTiles&&(b=a.writePublicTiles?"PUBLIC":"DEFAULT_OBJECT_ACL");return new Ye({Ue:K(a.outputBucket),xa:K(a.outputPrefix),Ve:a.bucketCorsUris||null,permissions:b})},Dl=function(a){return new kf({tf:K(a.driveFolder),xa:K(a.driveFileNamePrefix)})},El=function(a){return new We({name:Hk(a.assetId)})},Fl=function(a){if(!a)return null;var b=a;"string"===typeof a&&(a=a.split(","));if(Array.isArray(a))return new Gg({Xf:(a||[]).map(Ml)});throw Error("Unable to build ranking rule from rules: "+
|
|
520
|
+
JSON.stringify(b)+". Rules should either be a comma-separated string or list of strings.");},Ml=function(a){var b=new Fg({direction:null,ae:null,ce:null,be:null});a=a.trim();a=a.match(/^([\S]+.*)\s+(ASC|DESC)$/);if(null==a)throw Error("Ranking rule format is invalid. Each rule should be defined by a rule type and a direction (ASC or DESC), separated by a space. Valid rule types are: .geometryType, .minZoomLevel, or a feature property name.");var c=n(a);c.next();a=c.next().value;c=c.next().value;switch(c.toUpperCase()){case "ASC":b.direction=
|
|
521
|
+
"ASCENDING";break;case "DESC":b.direction="DESCENDING";break;default:throw Error("Ranking rule direction '"+c+"' is invalid. Directions are: ASC, DESC.");}switch(a.trim()){case ".geometryType":b.be=new Cg({});break;case ".minZoomLevel":b.ce=new Eg({});break;default:b.ae=new Bg({attributeName:K(a)})}return b};var Nl=[],Ol=function(a){B(!Object.isSealed(a),"Cannot use getInstance() with a sealed constructor.");var b="Ef";if(a.Ef&&a.hasOwnProperty(b))return a.Ef;Nl.push(a);var c=new a;a.Ef=c;B(a.hasOwnProperty(b),"Could not instantiate singleton.");return c};var Ql=function(a,b,c,d,e,g){d=Pj(!g,!1,d||[]);Rj=a;Sj=d;null===a?Xj():Tj(function(){Vj(b,c,e||Fa(Pl,b,c))})};w("ee.data.authenticateViaOauth",Ql);var Rl=function(a,b,c,d,e){Ql(a,b,c,d,e)};w("ee.data.authenticate",Rl);var Pl=function(a,b){r.google.accounts.oauth2.initTokenClient({client_id:Rj,callback:Fa(Uj,a,b),scope:Sj.join(" ")}).requestAccessToken()};w("ee.data.authenticateViaPopup",Pl);
|
|
522
|
+
var Sl=function(a,b,c,d,e){if("window"in r)throw Error("Use of private key authentication in the browser is insecure. Consider using OAuth, instead.");d=Pj(!e,!e,d||[]);Rj=a.client_email;Sj=d;var g=new google.auth.JWT(a.client_email,null,a.private_key,d,null);Qj=function(f,l){g.authorize(function(m,p){m?l({error:m}):l({access_token:p.access_token,token_type:p.token_type,expires_in:(p.expiry_date-Date.now())/1E3})})};Vj(b,c)};w("ee.data.authenticateViaPrivateKey",Sl);
|
|
523
|
+
w("ee.data.setExpressionAugmenter",function(a){Tl=a||qc});var Tl=qc;w("ee.data.setAuthToken",function(a,b,c,d,e,g,f,l){e=Pj(!l,!1,e||[]);Rj=a;Sj=e;Uj(void 0,void 0,{token_type:b,access_token:c,state:e.join(" "),expires_in:d});!1===f?g&&g():Tj(function(){g&&g()})});w("ee.data.refreshAuthToken",Vj);w("ee.data.setAuthTokenRefresher",function(a){Qj=a});w("ee.data.getAuthToken",Lj);w("ee.data.clearAuthToken",Xj);w("ee.data.getAuthClientId",function(){return Rj});w("ee.data.getAuthScopes",function(){return Sj});
|
|
524
|
+
w("ee.data.setDeadline",function(a){lk=a});w("ee.data.setParamAugmenter",function(a){fk=a||qc});
|
|
525
|
+
var Ul=function(a){a=new J(a);return a.handle(a.Fc().list(Fj(),{prettyPrint:!1}).then(Ck))},Xl=function(a,b){if("string"===typeof a.image)throw Error("Image as JSON string not supported.");if(void 0!==a.version)throw Error("Image version specification not supported.");a=new sf({name:null,l:Tl(nl(a.image)),F:vk(a.format),da:yk(a.bands),ic:Bk(a)});var c={fields:"name"},d=Vl();d&&(c.workloadTag=d);b=new J(b);return b.handle(b.maps().create(Fj(),a,c).then(function(e){return Wl(e.name,"")}))};
|
|
526
|
+
w("ee.data.getMapId",Xl);var Yl=function(a,b,c,d){if(!a.formatTileUrl){var e=Wl(a.mapid,a.token,a.urlFormat);a.urlFormat=e.urlFormat;a.formatTileUrl=e.formatTileUrl}return a.formatTileUrl(b,c,d)};w("ee.data.getTileUrl",Yl);
|
|
527
|
+
var Wl=function(a,b,c){var d=void 0===c?"":c;d||(Dj(),c=ak,d=b?c+"/map/"+a+"/{z}/{x}/{y}?token="+b:c+"/v1/"+a+"/tiles/{z}/{x}/{y}");return{mapid:a,token:b,formatTileUrl:function(e,g,f){var l=Math.pow(2,f);e%=l;e=String(0>e?e+l:e);return d.replace("{x}",e).replace("{y}",g).replace("{z}",f)},urlFormat:d}},Zl=function(a,b){var c=a.visParams?Tl(nl(a.visParams)):null;a=new Mf({name:null,Nb:a.assetId,mapName:a.mapName,Cg:c});b=new J(b);return b.handle((new Tg(b.M)).create(Fj(),a,{fields:["name"]}).then(function(d){var e=
|
|
528
|
+
d.name.split("/").pop();return{token:e,formatTileUrl:function(g,f,l){return ak+"/v1/"+d.name+"/tiles/"+l+"/"+g+"/"+f},rawTilesKey:e.substring(0,e.lastIndexOf("-"))}}))};w("ee.data.getFeatureViewTilesKey",Zl);
|
|
529
|
+
var $l=function(a,b,c){c=new J(c);var d=Hk(a);a=c.handle;var e=c.assets();b=void 0===b?{}:b;var g=void 0===g?{}:g;e.j.C(d,RegExp("^projects/[^/]+/assets/.*$"));g=I(e.j,{body:null,B:"GET",D:"earthengine.projects.assets.listFeatures",path:"/"+e.m+"/"+d+":listFeatures",u:H(b,g),G:qg});return a.call(c,g)};w("ee.data.listFeatures",$l);
|
|
530
|
+
var am=function(a,b){var c=new el(!0);a=pl(c,a);var d={};c=rl(c,a);Object.keys(c).length&&(d={__source_code_nodes__:c});c={l:Tl(a,d)};if(a=Vl())c.workloadTag=a;b=new J(b);return b.handle(ch(b.value(),Fj(),new $e(c)).then(function(e){return e.result}))};w("ee.data.computeValue",am);
|
|
531
|
+
var bm=function(a,b){if("string"===typeof a.image)throw Error("Image as JSON string not supported.");if(void 0!==a.version)throw Error("Image version specification not supported.");if(void 0!==a.region)throw Error('"region" not supported in call to ee.data.getThumbId. Use ee.Image.getThumbURL.');if(void 0!==a.dimensions)throw Error('"dimensions" is not supported in call to ee.data.getThumbId. Use ee.Image.getThumbURL.');a=new Kg({name:null,l:Tl(nl(a.image)),F:vk(a.format),xa:a.name,da:yk(a.bands),
|
|
532
|
+
ic:Bk(a),grid:null});var c={fields:"name"},d=Vl();d&&(c.workloadTag=d);b=new J(b);return b.handle((new ah(b.M)).create(Fj(),a,c).then(function(e){return{thumbid:e.name,token:""}}))};w("ee.data.getThumbId",bm);
|
|
533
|
+
var cm=function(a,b){var c=new Jf({framesPerSecond:a.framesPerSecond||null,maxFrames:a.maxFrames||null,maxPixelsPerFrame:a.maxPixelsPerFrame||null});a=new Og({name:null,l:Tl(nl(a.imageCollection)),F:vk(a.format),Pa:c,grid:null});c={fields:"name"};var d=Vl();d&&(c.workloadTag=d);b=new J(b);return b.handle((new fh(b.M)).create(Fj(),a,c).then(function(e){return{thumbid:e.name,token:""}}))};w("ee.data.getVideoThumbId",cm);
|
|
534
|
+
var dm=function(a,b){a=new Uf({name:null,l:Tl(nl(a.imageCollection)),F:vk(a.format),orientation:xk(a.orientation),grid:null});var c={fields:"name"},d=Vl();d&&(c.workloadTag=d);b=new J(b);return b.handle((new Ug(b.M)).create(Fj(),a,c).then(function(e){return{thumbid:e.name,token:""}}))};w("ee.data.getFilmstripThumbId",dm);var em=function(a){return ak+"/v1/"+a.thumbid+":getPixels"};w("ee.data.makeThumbUrl",em);
|
|
535
|
+
var gm=function(a,b){a=Object.assign({},a);a.id&&(a.image=new M(a.id));if("string"===typeof a.image)throw Error("Image as serialized JSON string not supported.");if(!a.image)throw Error("Missing ID or image parameter.");a.filePerBand=!1!==a.filePerBand;a.format=a.format||(a.filePerBand?"ZIPPED_GEO_TIFF_PER_BAND":"ZIPPED_GEO_TIFF");if(null!=a.region&&(null!=a.scale||null!=a.crs_transform)&&null!=a.dimensions)throw Error("Cannot specify (bounding region, crs_transform/scale, dimensions) simultaneously.");
|
|
536
|
+
if("string"===typeof a.bands)try{a.bands=JSON.parse(a.bands)}catch(e){a.bands=yk(a.bands)}if(a.bands&&!Array.isArray(a.bands))throw Error("Bands parameter must be an array.");a.bands&&a.bands.every(function(e){return"string"===typeof e})&&(a.bands=a.bands.map(function(e){return{id:e}}));if(a.bands&&a.bands.some(function(e){return null==e.id}))throw Error("Each band dictionary must have an id.");"string"===typeof a.region&&(a.region=JSON.parse(a.region));if("string"===typeof a.crs_transform)try{a.crs_transform=
|
|
537
|
+
JSON.parse(a.crs_transform)}catch(e){}var c=fm(a.image,a);a=new Kg({name:null,l:Tl(nl(c)),F:vk(a.format),xa:a.name,da:a.bands&&yk(a.bands.map(function(e){return e.id})),grid:null});c={fields:"name"};var d=Vl();d&&(c.workloadTag=d);b=new J(b);return b.handle((new ah(b.M)).create(Fj(),a,c).then(function(e){return{docid:e.name,token:""}}))};w("ee.data.getDownloadId",gm);var hm=function(a){Dj();return ak+"/v1/"+a.docid+":getPixels"};w("ee.data.makeDownloadUrl",hm);
|
|
538
|
+
var im=function(a,b){b=new J(b);var c=wk(a.format),d=Tl(nl(a.table)),e=null;if(null!=a.selectors)if("string"===typeof a.selectors)e=a.selectors.split(",");else if(Array.isArray(a.selectors)&&a.selectors.every(function(g){return"string"===typeof g}))e=a.selectors;else throw Error("'selectors' parameter must be an array of strings.");a=new Ig({name:null,l:d,F:c,selectors:e,filename:a.filename||null});c={fields:"name"};if(d=Vl())c.workloadTag=d;return b.handle((new $g(b.M)).create(Fj(),a,c).then(function(g){return{docid:g.name||
|
|
539
|
+
"",token:""}}))};w("ee.data.getTableDownloadId",im);var jm=function(a){return ak+"/v1/"+a.docid+":getFeatures"};w("ee.data.makeTableDownloadUrl",jm);var km=function(a,b){var c=function(d){return Math.floor(Math.random()*Math.pow(2,4*d)).toString(16).padStart(d,"0")};a=fb(a||1).map(function(){return[c(8),c(4),"4"+c(3),(8+Math.floor(4*Math.random())).toString(16)+c(3),c(12)].join("-")});return b?b(a):a};w("ee.data.newTaskId",km);
|
|
540
|
+
var lm=function(a){return a.name&&a.done&&a.error},nm=function(a,b){var c=mm(a).map(Tk);if(1===c.length)return a=(new J(b)).pd(lm),a.handle(a.Na().get(c[0]).then(function(e){return[Uk(e)]}));a=(new Kj(b)).pd(lm);var d=a.Na();return a.send(c.map(function(e){return[e,d.get(e)]}),function(e){return c.map(function(g){return Uk(e[g])})})};w("ee.data.getTaskStatus",nm);
|
|
541
|
+
var mm=function(a){if("string"===typeof a)return[a];if(Array.isArray(a))return a;throw Error("Invalid value: expected a string or an array of strings.");},pm=function(a){return om(void 0,a)};w("ee.data.getTaskList",pm);var om=function(a,b){return b?(qm(a,function(c,d){return b(c?{tasks:c.map(Uk)}:null,d)}),null):{tasks:qm(a).map(Uk)}};w("ee.data.getTaskListWithLimit",om);
|
|
542
|
+
var qm=function(a,b){var c=[],d={pageSize:500},e=function(l){db(c,l.Na||[]);!l.nextPageToken||a&&c.length>=a?b&&b(a?c.slice(0,a):c):(d.pageToken=l.nextPageToken,g.handle(f.list(Fj(),d).then(e)));return null},g=new J(b?function(l,m){return m&&b(l,m)}:void 0),f=g.Na();g.handle(f.list(Fj(),d).then(e));return b?null:a?c.slice(0,a):c};w("ee.data.listOperations",qm);
|
|
543
|
+
var rm=function(a,b){a=mm(a).map(Tk);var c=new Te;if(1===a.length)b=new J(b),b.handle(b.Na().cancel(a[0],c));else{b=new Kj(b);var d=b.Na();b.send(a.map(function(e){return[e,d.cancel(e,c)]}))}};w("ee.data.cancelOperation",rm);var sm=function(a,b){var c=mm(a).map(Tk);if(!Array.isArray(a))return a=(new J(b)).pd(lm),a.handle(a.Na().get(c[0]));a=(new Kj(b)).pd(lm);var d=a.Na();return a.send(c.map(function(e){return[e,d.get(e)]}))};w("ee.data.getOperation",sm);
|
|
544
|
+
var um=function(a,b){return tm(a,"CANCEL",b)};w("ee.data.cancelTask",um);var tm=function(a,b,c){if(!Mb(vm,b))throw Error("Invalid action: "+b);a=mm(a);a=a.map(Tk);rm(a,c);return null};w("ee.data.updateTask",tm);
|
|
545
|
+
var Bm=function(a,b,c){b.id=a;var d=b.type;a=null!=b.sourceUrl?{__source_url__:b.sourceUrl}:{};if("workloadTag"in b)b.workloadTag||delete b.workloadTag;else{var e=Vl();e&&(b.workloadTag=e)}var g=new J(c);c=function(f){return g.handle(f.then(Vk))};switch(d){case "EXPORT_IMAGE":return b=wm(b,a),c(g.image().Ka(Fj(),b));case "EXPORT_FEATURES":return b=Gl(b),b.l=Tl(b.l,a),c(g.table().Ka(Fj(),b));case "EXPORT_VIDEO":return b=xm(b,a),c(g.video().Ka(Fj(),b));case "EXPORT_TILES":return b=ym(b,a),c(g.map().Ka(Fj(),
|
|
546
|
+
b));case "EXPORT_VIDEO_MAP":return b=zm(b),c((new eh(g.M)).Ka(Fj(),b));case "EXPORT_CLASSIFIER":return b=Am(b,a),c((new Sg(g.M)).Ka(Fj(),b));default:throw Error("Unable to start processing for task of type "+d);}};w("ee.data.startProcessing",Bm);
|
|
547
|
+
var wm=function(a,b){var c=Cm(a);if(null==c.element)throw Error('"element" not found in params '+c);var d=new wf({l:nl(c.element),description:K(c.description),oa:null,sa:null,grid:null,Qf:K(c.maxPixels),requestId:K(c.id),O:L(c.maxWorkers)}),e=Bl(c);switch(e){case "GOOGLE_CLOUD_STORAGE":case "DRIVE":d.oa=Jl(c,e);break;case "ASSET":e=c.pyramidingPolicy||{};try{e=JSON.parse(e)}catch(f){}var g="PYRAMIDING_POLICY_UNSPECIFIED";"string"===typeof e?(g=e,e={}):e[".default"]&&(g=e[".default"],delete e[".default"]);
|
|
548
|
+
c=new xf({Ha:El(c),pyramidingPolicy:g,Vf:Pb(e)?null:e,tileSize:L(c.shardSize)});d.sa=c;break;default:throw Error('Export destination "'+e+'" unknown');}d.l=Tl(d.l,b);a.workloadTag&&(d.workloadTag=a.workloadTag);return d},xm=function(a,b){var c=Dm(a);if(null==c.element)throw Error('"element" not found in params '+c);var d=new Kf({l:nl(c.element),description:K(c.description),Pa:new Jf({framesPerSecond:L(c.framesPerSecond),maxFrames:L(c.maxFrames),maxPixelsPerFrame:K(c.maxPixels)}),oa:null,requestId:K(c.id),
|
|
549
|
+
O:L(c.maxWorkers)});d.oa=Kl(c,Bl(c));d.l=Tl(d.l,b);a.workloadTag&&(d.workloadTag=a.workloadTag);return d},ym=function(a,b){var c=a.scale;delete a.scale;var d=Cm(a);d.scale=c;if(null==d.element)throw Error('"element" not found in params '+d);c=new Af({l:nl(d.element),description:K(d.description),ec:Ll(d),dc:Jl(d,"GOOGLE_CLOUD_STORAGE"),requestId:K(d.id),O:L(d.maxWorkers)});c.l=Tl(c.l,b);a.workloadTag&&(c.workloadTag=a.workloadTag);return c},zm=function(a){var b=a.scale;delete a.scale;var c=Dm(a);c.scale=
|
|
550
|
+
b;if(null==c.element)throw Error('"element" not found in params '+c);b=new Hf({l:nl(c.element),description:K(c.description),Pa:new Jf({framesPerSecond:L(c.framesPerSecond),maxFrames:L(c.maxFrames),maxPixelsPerFrame:null}),ec:Ll(c),dc:Kl(c,"GOOGLE_CLOUD_STORAGE"),requestId:K(c.id),version:K(c.version),O:L(c.maxWorkers)});b.l=Tl(b.l);a.workloadTag&&(b.workloadTag=a.workloadTag);return b},Am=function(a,b){if(null==a.element)throw Error('"element" not found in params '+a);var c=Bl(a);if("ASSET"!=c)throw Error('Export destination "'+
|
|
551
|
+
c+'" unknown');c=new vf({l:nl(a.element),description:K(a.description),requestId:K(a.id),sa:new Ve({Ha:El(a)}),O:L(a.maxWorkers)});c.l=Tl(c.l,b);a.workloadTag&&(c.workloadTag=a.workloadTag);return c},Fm=function(a,b,c){b=Zk(b);var d=function(e){return e?Vk(e):null};return d(Em(a,b,c&&function(e,g){return c(d(e),g)}))};w("ee.data.startIngestion",Fm);
|
|
552
|
+
var Em=function(a,b,c){b=new lg({Bf:b,requestId:a,overwrite:null,description:null});a=new J(c,a?void 0:0);return a.handle(a.image().import(Fj(),b))},Gm=function(a,b,c){b=new mg({qg:b,requestId:a,overwrite:null,description:null});a=new J(c,a?void 0:0);return a.handle(a.table().import(Fj(),b))},Hm=function(a,b,c){b=$k(b);var d=function(e){return e?Vk(e):null};return d(Gm(a,b,c&&function(e,g){return c(d(e),g)}))};w("ee.data.startTableIngestion",Hm);
|
|
553
|
+
var Im=function(a,b){b=new J(b);a=Hk(a);return b.handle(b.assets().get(a,{prettyPrint:!1}).then(Ik))};w("ee.data.getAsset",Im);w("ee.data.getInfo",Im);var Jm=function(a,b,c,d){b=void 0===b?{}:b;d=void 0===d?qc:d;var e=Fk.test(a);c=new J(c);var g=e?new Qg(c.M):c.assets();a=e?"projects/"+Gk(a):Hk(a);return c.handle(g.Ud(a,b).then(d))},Km=function(a,b){return Jm(a.id,Pk(a),b,function(c){return null==c?null:Jk(c)})};w("ee.data.getList",Km);var Lm=function(a,b,c){b=void 0===b?{}:b;return Jm(a,b,c)};
|
|
554
|
+
w("ee.data.listAssets",Lm);var Mm=function(a,b,c){b=void 0===b?{}:b;b=Ok(b);return Jm(a,b,c,function(d){if(null==d)return null;var e={};d.assets&&(e.images=d.assets);d.nextPageToken&&(e.nextPageToken=d.nextPageToken);return e})};w("ee.data.listImages",Mm);var Nm=function(a,b){b=new J(b);return b.handle((new Qg(b.M)).Ud(a||Fj()))};w("ee.data.listBuckets",Nm);var Om=function(a){a=new J(a);return a.handle((new Qg(a.M)).Ud(Fj()).then(Jk))};w("ee.data.getAssetRoots",Om);
|
|
555
|
+
var Pm=function(a,b){var c="projects/"+Gk(a);a="projects/earthengine-legacy"===c?a:void 0;var d=new lf({type:"Folder"});b=new J(b);b.handle(b.assets().create(c,d,{assetId:a}).then(Ik))};w("ee.data.createAssetHome",Pm);
|
|
556
|
+
var Qm=function(a,b,c,d,e){if(c)throw Error("Asset overwrite not supported.");if("string"===typeof a)throw Error("Asset cannot be specified as string.");b=a.name||b&&Hk(b);if(!b)throw Error("Either asset name or opt_path must be specified.");c=b.indexOf("/assets/");if(-1===c)throw Error("Asset name must contain /assets/.");a=Object.assign({},a);a.tilestoreEntry&&!a.tilestoreLocation&&(a.tilestoreLocation=a.tilestoreEntry,delete a.tilestoreEntry);a.tilestoreLocation&&(a.tilestoreLocation=new rf(a.tilestoreLocation));
|
|
557
557
|
a.gcsLocation&&!a.cloudStorageLocation&&(a.cloudStorageLocation=a.gcsLocation,delete a.gcsLocation);a.cloudStorageLocation&&(a.cloudStorageLocation=new Ze(a.cloudStorageLocation));d&&!a.properties&&(a.properties=Object.assign({},d));d=n(["title","description"]);for(var g=d.next();!g.done;g=d.next())if(g=g.value,a[g]){var f={};a.properties=Object.assign((f[g]=a[g],f),a.properties||{});delete a[g]}a=new lf(a);d=b.slice(0,c);b=b.slice(c+8);a.id=null;a.name=null;a:switch(c=a.type,c){case "ImageCollection":c=
|
|
558
|
-
"IMAGE_COLLECTION";break a;case "Folder":c="FOLDER"}a.type=c;e=new J(e);return e.handle(e.assets().create(d,a,{assetId:b}).then(
|
|
559
|
-
var
|
|
560
|
-
var
|
|
561
|
-
var
|
|
562
|
-
var
|
|
563
|
-
var
|
|
564
|
-
var
|
|
565
|
-
var
|
|
566
|
-
|
|
567
|
-
var
|
|
568
|
-
N.prototype.evaluate=N.prototype.evaluate;N.prototype.V=function(a){return
|
|
569
|
-
N.prototype.na=function(a){if(null===this.I&&null===this.args){a=this.U||a.Ri;if(!a)throw Error("A mapped function's arguments cannot be used in client-side operations");return new Le({Mb:a})}var b={},c;for(c in this.args)void 0!==this.args[c]&&(b[c]=
|
|
570
|
-
N.prototype.toString=function(){return"ee."+this.name()+"("+
|
|
571
|
-
var
|
|
572
|
-
"function"!==typeof a?(a=Object.getPrototypeOf(a),null!==a&&null===Object.getPrototypeOf(a)):!1},
|
|
573
|
-
var
|
|
574
|
-
c+") to function: "+a);return d},
|
|
575
|
-
|
|
576
|
-
d.push("Undocumented.")}return d.join("")};
|
|
577
|
-
var
|
|
578
|
-
var
|
|
579
|
-
f=p?a.prototype:a;l in f&&!f[l].signature||(f[l]=function(v){return
|
|
580
|
-
var l=new Ic(d);if(Kc(l,f).isEmpty())e[d[0]]=b[0];else{b=Lc(f,l);if(0!==b.size)throw Error("Unexpected arguments"+a+": "+Array.from(b.values()).join(", "));e=Rb(g)}}b=new Ic(Lb(e));c=Lc(new Ic(Va(c,function(m){return 0!=m.lastIndexOf("opt_",0)})),b);if(0!==c.size)throw Error("Missing required arguments"+a+": "+Array.from(c.values()).join(", "));return e},
|
|
581
|
-
"").match(b),null===a&&
|
|
582
|
-
T.prototype.set=function(a){var b;if(1>=arguments.length){var c=arguments[0];if(b=
|
|
583
|
-
arguments.length%2)throw Error("When Element.set() is passed multiple arguments, there must be an even number of them.");b=this;for(c=0;c<arguments.length;c+=2)f=arguments[c],d=arguments[c+1],b=P("Element.set",b,f,d)}return
|
|
584
|
-
null,null);this.ob=a.type;this.dh=null!=a.coordinates?Sb(a.coordinates):null;this.Dh=a.geometries||null;if(null!=b)this.ac=b;else if("crs"in a)if(t(a.crs)&&"name"==a.crs.type&&t(a.crs.properties)&&"string"===typeof a.crs.properties.name)this.ac=a.crs.properties.name;else throw Error("Invalid CRS declaration in GeoJSON: "+(new
|
|
585
|
-
var
|
|
586
|
-
var
|
|
587
|
-
var
|
|
588
|
-
d+"\u00b0");b=Math.max(b,-90);d=Math.min(d,90);360<=c-a?(a=-180,c=180):(a=
|
|
589
|
-
var
|
|
590
|
-
var
|
|
558
|
+
"IMAGE_COLLECTION";break a;case "Folder":c="FOLDER"}a.type=c;e=new J(e);return e.handle(e.assets().create(d,a,{assetId:b}).then(Ik))};w("ee.data.createAsset",Qm);var Rm=function(a,b,c){return Qm({type:"Folder"},a,b,void 0,c)};w("ee.data.createFolder",Rm);var Sm=function(a,b,c){a=Hk(a);b=Hk(b);b=new ug({Qb:b});c=new J(c);c.handle(c.assets().move(a,b).then(Ik))};w("ee.data.renameAsset",Sm);
|
|
559
|
+
var Tm=function(a,b,c,d){a=Hk(a);b=Hk(b);c=new df({Qb:b,overwrite:null!=c?c:null});d=new J(d);b=d.handle;var e=d.assets();var g=void 0===g?{}:g;var f=void 0===f?{}:f;e.j.C(a,RegExp("^projects/[^/]+/assets/.*$"));g=I(e.j,{body:c,B:"POST",D:"earthengine.projects.assets.copy",path:"/"+e.m+"/"+a+":copy",u:H(g,f),G:lf});b.call(d,g.then(Ik))};w("ee.data.copyAsset",Tm);var Um=function(a,b){b=new J(b);b.handle(b.assets().delete(Hk(a)))};w("ee.data.deleteAsset",Um);
|
|
560
|
+
var Vm=function(a,b){a=Hk(a);var c=new $f;b=new J(b);var d=b.handle,e=b.assets(),g={prettyPrint:!1};g=void 0===g?{}:g;var f=void 0===f?{}:f;e.j.C(a,RegExp("^projects/[^/]+/assets/.*$"));f=I(e.j,{body:c,B:"POST",D:"earthengine.projects.assets.getIamPolicy",path:"/"+e.m+"/"+a+":getIamPolicy",u:H(g,f),G:Gf});return d.call(b,f.then(Qk))};w("ee.data.getAssetAcl",Vm);
|
|
561
|
+
var Wm=function(a,b,c,d){b=new Ng({Nb:b,updateMask:(c||[]).join(",")});d=new J(d);c=d.handle;var e=d.assets();a=Hk(a);var g=void 0===g?{}:g;var f=void 0===f?{}:f;e.j.C(a,RegExp("^projects/[^/]+/assets/.*$"));g=I(e.j,{body:b,B:"PATCH",D:"earthengine.projects.assets.patch",path:"/"+e.m+"/"+a,u:H(g,f),G:lf});return c.call(d,g.then(Ik))};w("ee.data.updateAsset",Wm);
|
|
562
|
+
var Xm=function(a,b,c){a=Hk(a);b=Rk(b);b=new Hg({kb:b});c=new J(c);var d=c.handle,e=c.assets(),g={prettyPrint:!1};g=void 0===g?{}:g;var f=void 0===f?{}:f;e.j.C(a,RegExp("^projects/[^/]+/assets/.*$"));f=I(e.j,{body:b,B:"POST",D:"earthengine.projects.assets.setIamPolicy",path:"/"+e.m+"/"+a+":setIamPolicy",u:H(g,f),G:Gf});d.call(c,f)};w("ee.data.setAssetAcl",Xm);
|
|
563
|
+
var Ym=function(a,b,c){var d=Mk(b);b=Sc(d.i()).keys.filter(function(e){return"properties"!==e&&G(d,e)}).map(function(e){return e.replace(/([A-Z])/g,function(g,f){return"_"+f.toLowerCase()})}).concat(Object.keys(d.properties||{}).map(function(e){return'properties."'+e+'"'}));Wm(a,d,b,c)};w("ee.data.setAssetProperties",Ym);
|
|
564
|
+
var Zm=function(a,b){var c=Hk(a);b=new J(b);var d=b.assets(),e=d.j.C;d.j.C=function(g,f){"^projects\\/[^/]+\\/assets\\/.+$"===f.source&&(f=RegExp("^projects/[^/]+/assets/.*$"));return e(g,f)};c=d.get(c,{prettyPrint:!1});return b.handle(c.then(function(g){if(!(g instanceof lf&&g.quota))throw Error(a+" is not a root folder.");g=g.quota;return{asset_count:{usage:Number(g.Pe||0),limit:Number(g.Nf||0)},asset_size:{usage:Number(g.sizeBytes||0),limit:Number(g.Wb||0)}}}))};w("ee.data.getAssetRootQuota",Zm);
|
|
565
|
+
var $m=function(){this.default=this.tag=""};$m.prototype.get=function(){return this.tag};$m.prototype.set=function(a){this.tag=this.validate(a)};$m.prototype.reset=function(){this.tag=this.default};
|
|
566
|
+
$m.prototype.validate=function(a){if(null==a||""===a)return"";a=String(a);if(!/^([a-z0-9]|[a-z0-9][-_a-z0-9]{0,61}[a-z0-9])$/g.test(a))throw Error('Invalid tag, "'+a+'". Tags must be 1-63 characters, beginning and ending with a lowercase alphanumeric character ([a-z0-9]) with dashes (-), underscores (_), and lowercase alphanumerics between.');return a};var Vl=function(){return Ol($m).get()};w("ee.data.getWorkloadTag",Vl);var an=function(a){Ol($m).set(a)};w("ee.data.setWorkloadTag",an);
|
|
567
|
+
var bn=function(a){var b=Ol($m);b.default=b.validate(a);Ol($m).set(a)};w("ee.data.setDefaultWorkloadTag",bn);var cn=function(a){a&&(a=Ol($m),a.default=a.validate(""));Ol($m).reset()};w("ee.data.resetWorkloadTag",cn);var vm={Hl:"CANCEL",Kl:"UPDATE"};var N=function(a,b,c){if(!(this instanceof N))return dn(N,arguments);if(c&&(a||b))throw Error('When "opt_varName" is specified, "func" and "args" must be null.');if(a&&!b)throw Error('When "func" is specified, "args" must not be null.');this.I=a;this.args=b;this.U=c||null;this.zl=null};x(N,mk);w("ee.ComputedObject",N);N.prototype.Eh=function(){return this.zl};N.prototype.evaluate=function(a){if(!a||"function"!==typeof a)throw Error("evaluate() requires a callback function.");am(this,a)};
|
|
568
|
+
N.prototype.evaluate=N.prototype.evaluate;N.prototype.V=function(a){return am(this,a)};N.prototype.getInfo=N.prototype.V;N.prototype.encode=function(a){if(null===this.I&&null===this.args)return{type:"ArgumentRef",value:this.U};var b={},c;for(c in this.args)void 0!==this.args[c]&&(b[c]=a(this.args[c]));b={type:"Invocation",arguments:b};a=a(this.I);b["string"===typeof a?"functionName":"function"]=a;return b};
|
|
569
|
+
N.prototype.na=function(a){if(null===this.I&&null===this.args){a=this.U||a.Ri;if(!a)throw Error("A mapped function's arguments cannot be used in client-side operations");return new Le({Mb:a})}var b={},c;for(c in this.args)void 0!==this.args[c]&&(b[c]=pk(vl(a,this.args[c])));return"string"===typeof this.I?sk(String(this.I),b):this.I.Ed(a,b)};N.prototype.va=function(a){return(void 0===a?0:a)?jl(this):tl(this)};N.prototype.serialize=N.prototype.va;
|
|
570
|
+
N.prototype.toString=function(){return"ee."+this.name()+"("+ll(this)+")"};w("ee.ComputedObject.prototype.toString",N.prototype.toString);N.prototype.name=function(){return"ComputedObject"};N.prototype.Gg=function(a,b){var c=Array.from(arguments);c[0]=this;a.apply(r,c);return this};N.prototype.aside=N.prototype.Gg;
|
|
571
|
+
var en=function(a,b){if(b instanceof a.constructor)return b;var c=function(){};c.prototype=a.constructor.prototype;a=new c;a.I=b.I;a.args=b.args;a.U=b.U;return a},dn=function(a,b){function c(){return a.apply(this,b)}c.prototype=a.prototype;return new c};var fn={},gn=function(a,b){if(b==a)return!0;switch(a){case "Element":return"Element"==b||"Image"==b||"Feature"==b||"Collection"==b||"ImageCollection"==b||"FeatureCollection"==b;case "FeatureCollection":case "Collection":return"Collection"==b||"ImageCollection"==b||"FeatureCollection"==b;case "Object":return!0;default:return!1}},hn=function(a){return"number"===typeof a||a instanceof N&&"Number"==a.name()},jn=function(a){return"string"===typeof a||a instanceof N&&"String"==a.name()},kn=function(a){return t(a)&&
|
|
572
|
+
"function"!==typeof a?(a=Object.getPrototypeOf(a),null!==a&&null===Object.getPrototypeOf(a)):!1},ln=function(a,b,c){c=void 0===c?!1:c;return 1===a.length&&kn(a[0])&&(a=b.args,c&&(a=a.slice(1)),a.length)?!(1===a.length||a[1].optional)||"Dictionary"!==a[0].type:!1};var mn=function(){if(!(this instanceof mn))return new mn};x(mn,mk);w("ee.Function",mn);var nn=qc;mn.prototype.call=function(a){return this.apply(on(this,Array.prototype.slice.call(arguments,0)))};mn.prototype.call=mn.prototype.call;mn.prototype.apply=function(a){a=new N(this,pn(this,a));return nn(a,this.Z().returns)};mn.prototype.apply=mn.prototype.apply;
|
|
573
|
+
var qn=function(a,b,c){var d=void 0!==b,e=a.Z();if(ln(c,e,d)){if(c=Rb(c[0]),d){d=e.args[0].name;if(d in c)throw Error("Named args for "+e.name+" can't contain keyword "+d);c[d]=b}}else c=on(a,d?[b].concat(c):c);return a.apply(c)},pn=function(a,b){for(var c=a.Z().args,d={},e={},g=0;g<c.length;g++){var f=c[g].name;if(f in b&&void 0!==b[f])d[f]=nn(b[f],c[g].type);else if(!c[g].optional)throw Error("Required argument ("+f+") missing to function: "+a);e[f]=!0}c=[];for(var l in b)e[l]||c.push(l);if(0<c.length)throw Error("Unrecognized arguments ("+
|
|
574
|
+
c+") to function: "+a);return d},on=function(a,b){var c=a.Z().args;if(c.length<b.length)throw Error("Too many ("+b.length+") arguments to function: "+a);a={};for(var d=0;d<b.length;d++)a[c[d].name]=b[d];return a};
|
|
575
|
+
mn.prototype.toString=function(a,b){var c=this.Z(),d=[];d.push(a||c.name);d.push("(");d.push(Wa(c.args.slice(b?1:0),function(g){return g.name}).join(", "));d.push(")\n");d.push("\n");c.description?d.push(c.description):d.push("Undocumented.");d.push("\n");if(c.args.length)for(d.push("\nArgs:\n"),a=0;a<c.args.length;a++){b&&0==a?d.push(" this:"):d.push("\n ");var e=c.args[a];d.push(e.name);d.push(" (");d.push(e.type);e.optional&&d.push(", optional");d.push("): ");e.description?d.push(e.description):
|
|
576
|
+
d.push("Undocumented.")}return d.join("")};mn.prototype.va=function(a){return(void 0===a?0:a)?jl(this):tl(this)};var O=function(a,b){if(void 0===b)return rn(a);if(!(this instanceof O))return dn(O,arguments);this.xb=Sb(b);this.xb.name=a};x(O,mn);w("ee.ApiFunction",O);var P=function(a,b){return mn.prototype.call.apply(rn(a),Array.prototype.slice.call(arguments,1))};w("ee.ApiFunction._call",P);var sn=function(a,b){return rn(a).apply(b)};w("ee.ApiFunction._apply",sn);O.prototype.encode=function(){return this.xb.name};O.prototype.Ed=function(a,b){return sk(this.xb.name,b)};O.prototype.Z=function(){return this.xb};
|
|
577
|
+
var tn=null,un={},wn=function(){vn();return Hb(tn,function(a){return a.Z()})},xn=function(){vn();return Gb(tn,function(a,b){return!un[b]})},rn=function(a){var b=yn(a);if(!b)throw Error("Unknown built-in function name: "+a);return b};w("ee.ApiFunction.lookup",rn);
|
|
578
|
+
var yn=function(a){vn();return tn[a]||null},vn=function(a,b){if(tn)a&&a();else{var c=function(d,e){e?b&&b(Error(e)):(tn=Hb(d,function(g,f){g.returns=g.returns.replace(/<.*>/,"");for(var l=0;l<g.args.length;l++)g.args[l].type=g.args[l].type.replace(/<.*>/,"");return new O(f,g)}),a&&a())};a?Ul(c):c(Ul())}},zn=function(a,b,c,d){vn();var e=d||"";Fb(tn,function(g,f){var l=f.split(".");if(2==l.length&&l[0]==b){l=e+l[1];var m=g.Z();un[f]=!0;var p=!1;m.args.length&&(f=m.args[0].type,p="Object"!=f&&gn(f,c));
|
|
579
|
+
f=p?a.prototype:a;l in f&&!f[l].signature||(f[l]=function(v){return qn(g,p?this:void 0,Array.prototype.slice.call(arguments,0))},f[l].toString=u(g.toString,g,l,p),f[l].signature=m)}})},An=function(a){var b=function(c){for(var d in c)"function"===typeof c[d]&&c[d].signature&&delete c[d]};b(a);b(a.prototype||{})};var R=function(a,b){var c=Bn(a),d=Wa(c,function(m){return m.replace(/^opt_/,"")});a=(a=r.EXPORTED_FN_INFO?r.EXPORTED_FN_INFO[a.toString()].name.split(".").pop()+"()":null)?" to function "+a:"";var e={},g=b[0],f=t(g)&&"function"!==typeof g&&!Array.isArray(g)&&"Object"===Object.getPrototypeOf(g).constructor.name;if(1<b.length||!f){if(b.length>d.length)throw Error("Received too many arguments"+a+". Expected at most "+d.length+" but got "+b.length+".");for(g=0;g<b.length;g++)e[d[g]]=b[g]}else{f=new Ic(Lb(g));
|
|
580
|
+
var l=new Ic(d);if(Kc(l,f).isEmpty())e[d[0]]=b[0];else{b=Lc(f,l);if(0!==b.size)throw Error("Unexpected arguments"+a+": "+Array.from(b.values()).join(", "));e=Rb(g)}}b=new Ic(Lb(e));c=Lc(new Ic(Va(c,function(m){return 0!=m.lastIndexOf("opt_",0)})),b);if(0!==c.size)throw Error("Missing required arguments"+a+": "+Array.from(c.values()).join(", "));return e},Bn=function(a){var b=Cn,c=[];r.EXPORTED_FN_INFO?(a=r.EXPORTED_FN_INFO[a.toString()],t(a)||Dn(),c=a.paramNames,Array.isArray(c)||Dn()):(a=a.toString().replace(En,
|
|
581
|
+
"").match(b),null===a&&Dn(),c=(a[1].split(",")||[]).map(function(d){return d.replace(Fn,"")}));return c},Dn=function(){throw Error("Failed to locate function parameters.");},En=/((\/\/.*$)|(\/\*[\s\S]*?\*\/)|(\s))/mg,Cn=/^function[^\(]*\(([^\)]*)\)/m,Fn=/=.*$/;var T=function(a,b,c){N.call(this,a,b,c);Gn()};x(T,N);w("ee.Element",T);var Hn=!1,Gn=function(){Hn||(zn(T,"Element","Element"),Hn=!0)};T.prototype.name=function(){return"Element"};
|
|
582
|
+
T.prototype.set=function(a){var b;if(1>=arguments.length){var c=arguments[0];if(b=kn(c))a:{b=Lb(c);var d=["properties"];if(xa(b)&&xa(d)&&b.length==d.length){for(var e=b.length,g=0;g<e;g++)if(b[g]!==d[g]){b=!1;break a}b=!0}else b=!1}b&&t(c.properties)&&(c=c.properties);if(kn(c)){b=this;for(var f in c)d=c[f],b=P("Element.set",b,f,d)}else if(c instanceof N&&yn("Element.setMulti"))b=P("Element.setMulti",this,c);else throw Error("When Element.set() is passed one argument, it must be a dictionary.");}else{if(0!=
|
|
583
|
+
arguments.length%2)throw Error("When Element.set() is passed multiple arguments, there must be an even number of them.");b=this;for(c=0;c<arguments.length;c+=2)f=arguments[c],d=arguments[c+1],b=P("Element.set",b,f,d)}return en(this,b)};T.prototype.set=T.prototype.set;var U=function(a,b,c,d){if(!(this instanceof U))return dn(U,arguments);if(!("type"in a)){var e=R(U,arguments);a=e.geoJson;b=e.proj;c=e.geodesic;d=e.evenOdd}In();e=null!=b||null!=c||null!=d;if(a instanceof N&&!(a instanceof U&&a.ob)){if(e)throw Error("Setting the CRS, geodesic, or evenOdd flag on a computed Geometry is not supported. Use Geometry.transform().");N.call(this,a.I,a.args,a.U)}else{a instanceof U&&(a=a.encode());if(!Jn(a))throw Error("Invalid GeoJSON geometry: "+JSON.stringify(a));N.call(this,
|
|
584
|
+
null,null);this.ob=a.type;this.dh=null!=a.coordinates?Sb(a.coordinates):null;this.Dh=a.geometries||null;if(null!=b)this.ac=b;else if("crs"in a)if(t(a.crs)&&"name"==a.crs.type&&t(a.crs.properties)&&"string"===typeof a.crs.properties.name)this.ac=a.crs.properties.name;else throw Error("Invalid CRS declaration in GeoJSON: "+(new vi).va(a.crs));this.qc=c;void 0===this.qc&&"geodesic"in a&&(this.qc=!!a.geodesic);this.oc=d;void 0===this.oc&&"evenOdd"in a&&(this.oc=!!a.evenOdd)}};x(U,N);w("ee.Geometry",U);
|
|
585
|
+
var Kn=!1,In=function(){Kn||(zn(U,"Geometry","Geometry"),Kn=!0)},Ln=function(a,b){if(!(this instanceof Ln))return Mn(Ln,arguments);var c=Nn(Ln,"Point",1,arguments);if(!(c instanceof N)){var d=c.coordinates;if(!Array.isArray(d)||2!=d.length)throw Error("The Geometry.Point constructor requires 2 coordinates.");}U.call(this,c)};x(Ln,U);U.Point=Ln;var On=function(a,b){if(!(this instanceof On))return Mn(On,arguments);U.call(this,Nn(On,"MultiPoint",2,arguments))};x(On,U);U.MultiPoint=On;
|
|
586
|
+
var Pn=function(a,b,c,d){if(!(this instanceof Pn))return Mn(Pn,arguments);var e=Nn(Pn,"Rectangle",2,arguments);if(!(e instanceof N)){var g=e.coordinates;if(2!=g.length)throw Error("The Geometry.Rectangle constructor requires 2 points or 4 coordinates.");var f=g[0][0],l=g[0][1],m=g[1][0];g=g[1][1];e.coordinates=[[[f,g],[f,l],[m,l],[m,g]]];e.type="Polygon"}U.call(this,e)};x(Pn,U);U.Rectangle=Pn;
|
|
587
|
+
var Qn=function(a,b,c,d){if(!(this instanceof Qn))return Mn(Qn,arguments);var e=R(Qn,arguments);a=e.west;b=e.south;c=e.east;d=e.north;e=[a,b,c,d];if(Rn(e)){var g;return(g=new O("GeometryConstructors.BBox")).call.apply(g,ia(e))}if(!(Infinity>a))throw Error("Geometry.BBox: west must not be "+a);if(!(-Infinity<c))throw Error("Geometry.BBox: east must not be "+c);if(!(90>=b))throw Error("Geometry.BBox: south must be at most +90\u00b0, but was "+b+"\u00b0");if(!(-90<=d))throw Error("Geometry.BBox: north must be at least -90\u00b0, but was "+
|
|
588
|
+
d+"\u00b0");b=Math.max(b,-90);d=Math.min(d,90);360<=c-a?(a=-180,c=180):(a=Sn(a),c=Sn(c),c<a&&(c+=360));U.call(this,{type:"Polygon",coordinates:[[[a,d],[a,b],[c,b],[c,d]]]},void 0,!1,!0)};x(Qn,Pn);U.BBox=Qn;var Sn=function(a){a%=360;180<a?a-=360:-180>a&&(a+=360);return a},Tn=function(a,b,c,d){if(!(this instanceof Tn))return Mn(Tn,arguments);U.call(this,Nn(Tn,"LineString",2,arguments))};x(Tn,U);U.LineString=Tn;
|
|
589
|
+
var Un=function(a,b,c,d){if(!(this instanceof Un))return Mn(Un,arguments);U.call(this,Nn(Un,"LinearRing",2,arguments))};x(Un,U);U.LinearRing=Un;var Vn=function(a,b,c,d){if(!(this instanceof Vn))return Mn(Vn,arguments);U.call(this,Nn(Vn,"MultiLineString",3,arguments))};x(Vn,U);U.MultiLineString=Vn;var Wn=function(a,b,c,d,e){if(!(this instanceof Wn))return Mn(Wn,arguments);U.call(this,Nn(Wn,"Polygon",3,arguments))};x(Wn,U);U.Polygon=Wn;
|
|
590
|
+
var Xn=function(a,b,c,d,e){if(!(this instanceof Xn))return Mn(Xn,arguments);U.call(this,Nn(Xn,"MultiPolygon",4,arguments))};x(Xn,U);U.MultiPolygon=Xn;
|
|
591
591
|
U.prototype.encode=function(a){if(!this.ob){if(!a)throw Error("Must specify an encode function when encoding a computed geometry.");return N.prototype.encode.call(this,a)}a={type:this.ob};"GeometryCollection"==this.ob?a.geometries=this.Dh:a.coordinates=this.dh;null!=this.ac&&(a.crs={type:"name",properties:{name:this.ac}});null!=this.qc&&(a.geodesic=this.qc);null!=this.oc&&(a.evenOdd=this.oc);return a};
|
|
592
|
-
U.prototype.oe=function(){if(this.I)throw Error("Can't convert a computed Geometry to GeoJSON. Use evaluate() instead.");return this.encode()};U.prototype.toGeoJSON=U.prototype.oe;U.prototype.yg=function(){if(this.I)throw Error("Can't convert a computed Geometry to GeoJSON. Use evaluate() instead.");return(new
|
|
592
|
+
U.prototype.oe=function(){if(this.I)throw Error("Can't convert a computed Geometry to GeoJSON. Use evaluate() instead.");return this.encode()};U.prototype.toGeoJSON=U.prototype.oe;U.prototype.yg=function(){if(this.I)throw Error("Can't convert a computed Geometry to GeoJSON. Use evaluate() instead.");return(new vi).va(this.oe())};U.prototype.toGeoJSONString=U.prototype.yg;U.prototype.va=function(a){return(void 0===a?0:a)?jl(this):tl(this)};U.prototype.serialize=U.prototype.va;
|
|
593
593
|
U.prototype.toString=function(){return"ee.Geometry("+this.yg()+")"};
|
|
594
594
|
U.prototype.na=function(a){if(!this.ob){if(!a)throw Error("Must specify a serializer when encoding a computed geometry.");return N.prototype.na.call(this,a)}var b={},c="";"GeometryCollection"===this.ob?(b.geometries=this.Dh.map(function(e){return new U(e)}),c="GeometryConstructors.MultiGeometry"):(b.coordinates=this.dh,c="GeometryConstructors."+this.ob);null!=this.ac&&(b.crs="string"===typeof this.ac?(new O("Projection")).call(this.ac):this.ac);var d="Point"!==this.ob&&"MultiPoint"!==this.ob;null!=
|
|
595
595
|
this.qc&&d&&(b.geodesic=this.qc);null!=this.oc&&(b.evenOdd=this.oc);return(new O(c)).apply(b).na(a)};
|
|
596
|
-
var
|
|
597
|
-
b)return-1;return b+1}for(c=0;c<a.length;c++)if("number"!==typeof a[c])return-1;return 0==a.length%2?1:-1},
|
|
598
|
-
"Rectangle","MultiPolygon"],b))&&null==a.evenOdd&&(a.evenOdd=!0);if(b&&!1===a.geodesic&&!1===a.evenOdd)throw Error("Planar interiors must be even/odd.");return a}
|
|
599
|
-
typeof e})&&(b=
|
|
600
|
-
var
|
|
601
|
-
var
|
|
602
|
-
V.or=
|
|
603
|
-
V.prototype.name=function(){return"Filter"};var
|
|
604
|
-
W.prototype.pf=function(a,b,c){var d=R(W.prototype.pf,arguments);return this.filter(
|
|
605
|
-
W.prototype.limit=function(a,b,c){var d=R(W.prototype.limit,arguments);return
|
|
606
|
-
W.prototype.map=function(a,b){var c=this.elementType();return
|
|
607
|
-
c)throw Error('Can\'t specify both "id" and "system:index".');c=Rb(c);c["system:index"]=a.id}T.call(this,new O("Feature"),{geometry:new U(a.geometry),metadata:c})}else T.call(this,new O("Feature"),{geometry:new U(a),metadata:b||null})};x(X,T);w("ee.Feature",X);var
|
|
608
|
-
X.prototype.S=function(a,b){var c=R(X.prototype.getMap,arguments);return P("Collection",[this]).S(c.visParams,c.callback)};X.prototype.getMapId=X.prototype.S;X.prototype.getMap=X.prototype.S;X.prototype.getMap=X.prototype.getMap;X.prototype.name=function(){return"Feature"};var
|
|
609
|
-
f);break;case "dimensions_consumed":e=!0;break;case "bbox":null!=d.geometry&&console.warn("Multiple request parameters converted to region.");if(!(f instanceof
|
|
610
|
-
d.geometry&&console.warn("Multiple request parameters converted to region.");if(!(f instanceof U)){l=f;if("string"===typeof f)try{l=JSON.parse(f)}catch(m){throw Error('Region string "'+f+'" is not valid GeoJSON.');}if(Array.isArray(l))f=new
|
|
611
|
-
d):
|
|
612
|
-
0,e[0],e[1]],c,!1))}}else a=
|
|
613
|
-
b));c.image=a;return c},
|
|
614
|
-
var f=c(b);e=c(e);e=c(Object.assign(f,e));g=
|
|
615
|
-
a.args,a.U);else throw Error("Unrecognized argument type to convert to an Image: "+a);}else if(2==b){b=arguments[0];var c=arguments[1];if(
|
|
616
|
-
M.prototype.getInfo=M.prototype.V;M.prototype.S=function(a,b){var c=this,d=R(M.prototype.getMap,arguments),e=
|
|
617
|
-
M.prototype.sb=function(a,b){var c=R(M.prototype.sb,arguments),d=c.params?Rb(c.params):{};d.image=this;if(c.callback){var e=c.callback;
|
|
618
|
-
M.prototype.xf=function(a,b){var c=R(M.prototype.xf,arguments);if(c.callback)this.Kd(c.params,function(d,e){var g="";if(void 0===e)try{g=
|
|
619
|
-
var
|
|
620
|
-
M.prototype.select=function(a){var b=Array.prototype.slice.call(arguments),c={input:this,bandSelectors:b[0]||[]};if(2<b.length||
|
|
621
|
-
M.prototype.l=function(a,b){var c=R(M.prototype.l,arguments),d=["DEFAULT_EXPRESSION_IMAGE"],e={DEFAULT_EXPRESSION_IMAGE:this};if(c.map){var g=c.map,f;for(f in g)d.push(f),e[f]=new M(g[f])}var l=P("Image.parseExpression",c.expression,"DEFAULT_EXPRESSION_IMAGE",d);c=new
|
|
622
|
-
M.prototype.expression=M.prototype.l;M.prototype.clip=function(a){try{a=new U(a)}catch(b){}return P("Image.clip",this,a)};M.prototype.clip=M.prototype.clip;M.prototype.ti=function(a){var b=1!=arguments.length||
|
|
623
|
-
|
|
624
|
-
new O("Collection"),{features:a});else if(a&&"object"===typeof a&&"FeatureCollection"===a.type)W.call(this,new O("Collection"),{features:a.features.map(function(d){return new X(d)})});else if(a instanceof N)W.call(this,a.I,a.args,a.U);else throw Error("Unrecognized argument type to convert to a FeatureCollection: "+a);};x(Y,W);w("ee.FeatureCollection",Y);var
|
|
625
|
-
Y.prototype.S=function(a,b){var c=R(Y.prototype.S,arguments),d=
|
|
626
|
-
Y.prototype.sb=function(a,b,c,d){var e=R(Y.prototype.sb,arguments),g={table:this};e.format&&(g.format=e.format.toUpperCase());e.filename&&(g.filename=e.filename);e.selectors&&(g.selectors=e.selectors);if(e.callback)
|
|
627
|
-
Y.prototype.select=function(a,b,c){if(
|
|
628
|
-
else if(a instanceof N)W.call(this,a.I,a.args,a.U);else throw Error("Unrecognized argument type to convert to an ImageCollection: "+a);};x(Z,W);w("ee.ImageCollection",Z);var
|
|
629
|
-
Z.prototype.yf=function(a,b){var c=R(Z.prototype.yf,arguments);return
|
|
630
|
-
var
|
|
631
|
-
if(void 0===m)try{p=
|
|
596
|
+
var Jn=function(a){var b=a.type;if("GeometryCollection"==b){b=a.geometries;if(!Array.isArray(b))return!1;for(a=0;a<b.length;a++)if(!Jn(b[a]))return!1;return!0}a=a.coordinates;var c=Yn(a);return"Point"==b&&1==c||"MultiPoint"==b&&(2==c||0==a.length)||"LineString"==b&&2==c||"LinearRing"==b&&2==c||"MultiLineString"==b&&(3==c||0==a.length)||"Polygon"==b&&3==c||"MultiPolygon"==b&&(4==c||0==a.length)},Yn=function(a){if(!Array.isArray(a))return-1;if(Array.isArray(a[0])){for(var b=Yn(a[0]),c=1;c<a.length;c++)if(Yn(a[c])!=
|
|
597
|
+
b)return-1;return b+1}for(c=0;c<a.length;c++)if("number"!==typeof a[c])return-1;return 0==a.length%2?1:-1},Zn=function(a){if("number"!==typeof a[0]||2==a.length)return a;if(0!=a.length%2)throw Error("Invalid number of coordinates: "+a.length);for(var b=[],c=0;c<a.length;c+=2)b.push([a[c],a[c+1]]);return b},Nn=function(a,b,c,d){a=$n(a,d);if(Rn(a.coordinates)||null!=a.crs||null!=a.maxError)return(new O("GeometryConstructors."+b)).apply(a);a.type=b;a.coordinates=ao(c,a.coordinates);(b=$a(["Polygon",
|
|
598
|
+
"Rectangle","MultiPolygon"],b))&&null==a.evenOdd&&(a.evenOdd=!0);if(b&&!1===a.geodesic&&!1===a.evenOdd)throw Error("Planar interiors must be even/odd.");return a},$n=function(a,b){if(Ya(b,hn))return{coordinates:cb(b)};a=R(a,b);a.coordinates=a.coords;delete a.coords;a.crs=a.proj;delete a.proj;return Gb(a,function(c){return null!=c})},Rn=function(a){return Array.isArray(a)?Xa(a,Rn):a instanceof N},ao=function(a,b){if(1>a||4<a)throw Error("Unexpected nesting level.");Ya(b,function(e){return"number"===
|
|
599
|
+
typeof e})&&(b=Zn(b));for(var c=b,d=0;Array.isArray(c);)c=c[0],d++;for(;d<a;)b=[b],d++;if(Yn(b)!=a)throw Error("Invalid geometry");for(c=b;Array.isArray(c)&&1==c.length;)c=c[0];return Array.isArray(c)&&0==c.length?[]:b},Mn=function(a,b){var c=function(){};c.prototype=a.prototype;c=new c;a=a.apply(c,b);return void 0!==a?a:c};U.prototype.name=function(){return"Geometry"};var V=function(a){if(!(this instanceof V))return dn(V,arguments);if(a instanceof V)return a;bo();if(Array.isArray(a)){if(0==a.length)throw Error("Empty list specified for ee.Filter().");if(1==a.length)return new V(a[0]);N.call(this,new O("Filter.and"),{filters:a})}else if(a instanceof N)N.call(this,a.I,a.args,a.U);else if(void 0===a)N.call(this,null,null);else throw Error("Invalid argument specified for ee.Filter(): "+a);};x(V,N);w("ee.Filter",V);
|
|
600
|
+
var co=!1,bo=function(){co||(zn(V,"Filter","Filter"),co=!0)},eo={equals:"equals",less_than:"lessThan",greater_than:"greaterThan",contains:"stringContains",starts_with:"stringStartsWith",ends_with:"stringEndsWith"};V.prototype.sc=function(){return P("Filter.not",this)};V.prototype.not=V.prototype.sc;var fo=function(a,b){var c=R(fo,arguments);return P("Filter.equals",c.name,c.value)};V.eq=fo;var go=function(a,b){var c=R(go,arguments);return fo(c.name,c.value).sc()};V.neq=go;
|
|
601
|
+
var ho=function(a,b){var c=R(ho,arguments);return P("Filter.lessThan",c.name,c.value)};V.lt=ho;var io=function(a,b){var c=R(io,arguments);return ho(c.name,c.value).sc()};V.gte=io;var jo=function(a,b){var c=R(jo,arguments);return P("Filter.greaterThan",c.name,c.value)};V.gt=jo;var ko=function(a,b){var c=R(ko,arguments);return jo(c.name,c.value).sc()};V.lte=ko;var lo=function(a){return P("Filter.and",Array.prototype.slice.call(arguments))};V.and=lo;var mo=function(a){return P("Filter.or",Array.prototype.slice.call(arguments))};
|
|
602
|
+
V.or=mo;var no=function(a,b){var c=R(no,arguments);c=P("DateRange",c.start,c.end);return sn("Filter.dateRangeContains",{leftValue:c,rightField:"system:time_start"})};V.date=no;var oo=function(a,b,c,d){var e=R(oo,arguments);return sn("Filter.listContains",{leftField:e.rightField,rightValue:e.leftValue,rightField:e.leftField,leftValue:e.rightValue})};V.inList=oo;var po=function(a,b){return sn("Filter.intersects",{leftField:".all",rightValue:P("Feature",a),maxError:b})};V.bounds=po;
|
|
603
|
+
V.prototype.name=function(){return"Filter"};var qo=function(a,b,c){b=b.toLowerCase();var d=!1;0==b.lastIndexOf("not_",0)&&(d=!0,b=b.substring(4));if(!(b in eo))throw Error("Unknown filtering operator: "+b);a=P("Filter."+eo[b],a,c);return d?a.sc():a};V.metadata=qo;var W=function(a,b,c){T.call(this,a,b,c);ro()};x(W,T);w("ee.Collection",W);var so=!1,ro=function(){so||(zn(W,"Collection","Collection"),zn(W,"AggregateFeatureCollection","Collection","aggregate_"),so=!0)};W.prototype.filter=function(a){a=R(W.prototype.filter,arguments).filter;if(!a)throw Error("Empty filters.");return en(this,P("Collection.filter",this,a))};W.prototype.filter=W.prototype.filter;
|
|
604
|
+
W.prototype.pf=function(a,b,c){var d=R(W.prototype.pf,arguments);return this.filter(qo(d.name,d.operator,d.value))};W.prototype.filterMetadata=W.prototype.pf;W.prototype.xh=function(a){return this.filter(po(a))};W.prototype.filterBounds=W.prototype.xh;W.prototype.nf=function(a,b){var c=R(W.prototype.nf,arguments);return this.filter(no(c.start,c.end))};W.prototype.filterDate=W.prototype.nf;
|
|
605
|
+
W.prototype.limit=function(a,b,c){var d=R(W.prototype.limit,arguments);return en(this,P("Collection.limit",this,d.max,d.property,d.ascending))};W.prototype.limit=W.prototype.limit;W.prototype.sort=function(a,b){var c=R(W.prototype.sort,arguments);return en(this,P("Collection.limit",this,void 0,c.property,c.ascending))};W.prototype.sort=W.prototype.sort;W.prototype.name=function(){return"Collection"};W.prototype.elementType=function(){return T};
|
|
606
|
+
W.prototype.map=function(a,b){var c=this.elementType();return en(this,P("Collection.map",this,function(d){return a(new c(d))},b))};W.prototype.map=W.prototype.map;W.prototype.Mh=function(a,b){b=void 0!==b?b:null;var c=this.elementType();return P("Collection.iterate",this,function(d,e){return a(new c(d),e)},b)};W.prototype.iterate=W.prototype.Mh;var X=function(a,b){if(!(this instanceof X))return dn(X,arguments);if(a instanceof X){if(b)throw Error("Can't create Feature out of a Feature and properties.");return a}if(2<arguments.length)throw Error("The Feature constructor takes at most 2 arguments ("+arguments.length+" given)");to();if(a instanceof U||null===a)T.call(this,new O("Feature"),{geometry:a,metadata:b||null});else if(a instanceof N)T.call(this,a.I,a.args,a.U);else if("Feature"==a.type){var c=a.properties||{};if("id"in a){if("system:index"in
|
|
607
|
+
c)throw Error('Can\'t specify both "id" and "system:index".');c=Rb(c);c["system:index"]=a.id}T.call(this,new O("Feature"),{geometry:new U(a.geometry),metadata:c})}else T.call(this,new O("Feature"),{geometry:new U(a),metadata:b||null})};x(X,T);w("ee.Feature",X);var uo=!1,to=function(){uo||(zn(X,"Feature","Feature"),uo=!0)};X.prototype.V=function(a){return X.L.V.call(this,a)};X.prototype.getInfo=X.prototype.V;
|
|
608
|
+
X.prototype.S=function(a,b){var c=R(X.prototype.getMap,arguments);return P("Collection",[this]).S(c.visParams,c.callback)};X.prototype.getMapId=X.prototype.S;X.prototype.getMap=X.prototype.S;X.prototype.getMap=X.prototype.getMap;X.prototype.name=function(){return"Feature"};var Cm=function(a){var b={},c=vo(a.element,a);c=wo(c,a,b);b.element=c;return b},Dm=function(a){var b={},c=a.element.map(function(d){d=vo(d,a);return wo(d,a,b)});b.element=c;return b},wo=function(a,b,c){var d={},e=!1,g=["maxDimension","width","height","scale"];Fb(b,function(f,l){if(null!=f)switch(l){case "dimensions":l="string"===typeof f?f.split("x").map(Number):Array.isArray(f)?f:"number"===typeof f?[f]:[];if(1===l.length)d.maxDimension=l[0];else if(2===l.length)d.width=l[0],d.height=l[1];else throw Error("Invalid dimensions "+
|
|
609
|
+
f);break;case "dimensions_consumed":e=!0;break;case "bbox":null!=d.geometry&&console.warn("Multiple request parameters converted to region.");if(!(f instanceof Pn)){l=f;if("string"===typeof f)try{l=JSON.parse(f)}catch(m){l=f.split(/\s*,\s*/).map(Number)}if(Array.isArray(l)){if(l.some(isNaN))throw Error("Invalid bbox `{bboxArray}`, please specify a list of numbers.");f=new Pn(l,null,!1)}else throw Error('Invalid bbox "{bbox}" type, must be of type Array<number>');}d.geometry=f;break;case "region":null!=
|
|
610
|
+
d.geometry&&console.warn("Multiple request parameters converted to region.");if(!(f instanceof U)){l=f;if("string"===typeof f)try{l=JSON.parse(f)}catch(m){throw Error('Region string "'+f+'" is not valid GeoJSON.');}if(Array.isArray(l))f=new Wn(l,null,!1);else if(t(l))f=new U(l,null,!1);else throw Error("Region {region} was not convertible to an ee.Geometry.");}d.geometry=f;break;case "scale":d.scale=Number(f);break;default:c[l]=f}});Pb(d)||(d.input=a,a=g.some(function(f){return f in d})||e?sn("Image.clipToBoundsAndScale",
|
|
611
|
+
d):sn("Image.clip",d));return a},vo=function(a,b){var c=b.crs||"",d=b.crsTransform||b.crs_transform;null!=d&&(d=xo(d));if(!c&&!d)return a;if(d&&!c)throw Error('Must specify "crs" if "crsTransform" is specified.');if(d){if(a=sn("Image.reproject",{image:a,crs:c,crsTransform:d}),null!=b.dimensions&&null==b.scale&&null==b.region){var e=b.dimensions;"string"===typeof e&&(e=e.split("x").map(Number));2===e.length&&(delete b.dimensions,b.dimensions_consumed=!0,c=(new O("Projection")).call(c,d),b.region=new Pn([0,
|
|
612
|
+
0,e[0],e[1]],c,!1))}}else a=sn("Image.setDefaultProjection",{image:a,crs:c,crsTransform:[1,0,0,0,-1,0]});return a},xo=function(a){if("string"===typeof a)try{a=JSON.parse(a)}catch(b){}if(Array.isArray(a)){if(6===a.length&&Ya(a,function(b){return"number"===typeof b}))return a;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.");},zo=function(a,b){var c={};b=yo(b,c);Pb(b)||(b.image=a,a=sn("Image.visualize",
|
|
613
|
+
b));c.image=a;return c},yo=function(a,b){var c="bands gain bias min max gamma palette opacity forceRgbOutput".split(" "),d={};Fb(a,function(e,g){$a(c,g)?d[g]=e:b[g]=e});return d},fm=function(a,b){b=Object.assign({},b);var c=function(e){var g={};["crs","crs_transform","dimensions","region"].forEach(function(f){f in e&&(g[f]=e[f])});null!=e.scale&&null==e.dimensions&&(g.scale=e.scale);return g},d=function(e){var g=e.id;if(void 0===g)throw Error("Each band dictionary must have an id.");g=a.select(g);
|
|
614
|
+
var f=c(b);e=c(e);e=c(Object.assign(f,e));g=vo(g,e);return g=wo(g,e,{})};"ZIPPED_GEO_TIFF_PER_BAND"===b.format&&b.bands&&b.bands.length?(d=b.bands.map(d),a=d.reduce(function(e,g){return P("Image.addBands",e,g,null,!0)},d.shift())):(d=c(b),a=vo(a,d),a=wo(a,d,{}));return a};var M=function(a){if(!(this instanceof M))return dn(M,arguments);if(a instanceof M)return a;Ao();var b=arguments.length;if(0==b||1==b&&void 0===a)T.call(this,new O("Image.mask"),{image:new M(0),mask:new M(0)});else if(1==b)if(hn(a))T.call(this,new O("Image.constant"),{value:a});else if(jn(a))T.call(this,new O("Image.load"),{id:a});else{if(Array.isArray(a))return Bo(Wa(a,function(d){return new M(d)}));if(a instanceof N)"Array"==a.name()?T.call(this,new O("Image.constant"),{value:a}):T.call(this,a.I,
|
|
615
|
+
a.args,a.U);else throw Error("Unrecognized argument type to convert to an Image: "+a);}else if(2==b){b=arguments[0];var c=arguments[1];if(jn(b)&&hn(c))T.call(this,new O("Image.load"),{id:b,version:c});else throw Error("Unrecognized argument types to convert to an Image: "+arguments);}else throw Error("The Image constructor takes at most 2 arguments ("+b+" given)");};x(M,T);w("ee.Image",M);var Co=!1,Ao=function(){Co||(zn(M,"Image","Image"),Co=!0)};M.prototype.V=function(a){return M.L.V.call(this,a)};
|
|
616
|
+
M.prototype.getInfo=M.prototype.V;M.prototype.S=function(a,b){var c=this,d=R(M.prototype.getMap,arguments),e=zo(this,d.visParams);if(d.callback){var g=d.callback;Xl(e,function(f,l){f=f?Object.assign(f,{image:c}):void 0;g(f,l)})}else return d=Xl(e),d.image=this,d};M.prototype.getMapId=M.prototype.S;M.prototype.getMap=M.prototype.S;M.prototype.getMap=M.prototype.getMap;
|
|
617
|
+
M.prototype.sb=function(a,b){var c=R(M.prototype.sb,arguments),d=c.params?Rb(c.params):{};d.image=this;if(c.callback){var e=c.callback;gm(d,function(g,f){g?e(hm(g)):e(null,f)})}else return hm(gm(d))};M.prototype.getDownloadURL=M.prototype.sb;M.prototype.Kd=function(a,b){var c=R(M.prototype.sb,arguments),d=c.params?Rb(c.params):{},e={},g=vo(this,d);g=wo(g,d,e);d=zo(g,e);return c.callback?(bm(d,c.callback),null):bm(d)};M.prototype.getThumbId=M.prototype.Kd;
|
|
618
|
+
M.prototype.xf=function(a,b){var c=R(M.prototype.xf,arguments);if(c.callback)this.Kd(c.params,function(d,e){var g="";if(void 0===e)try{g=em(d)}catch(f){e=String(f.message)}c.callback(g,e)});else return em(this.Kd(c.params))};M.prototype.getThumbURL=M.prototype.xf;var Do=function(a,b,c){var d=R(Do,arguments);return Bo([d.r,d.g,d.b],["vis-red","vis-green","vis-blue"])};M.rgb=Do;var Eo=function(a){return Bo(Array.prototype.slice.call(arguments),null)};M.cat=Eo;
|
|
619
|
+
var Bo=function(a,b){if(0==a.length)return P("Image.constant",[]);for(var c=new M(a[0]),d=1;d<a.length;d++)c=P("Image.addBands",c,a[d]);b&&(c=c.select([".*"],b));return c};
|
|
620
|
+
M.prototype.select=function(a){var b=Array.prototype.slice.call(arguments),c={input:this,bandSelectors:b[0]||[]};if(2<b.length||jn(b[0])||hn(b[0])){for(var d=0;d<b.length;d++)if(!(jn(b[d])||hn(b[d])||b[d]instanceof N))throw Error("Illegal argument to select(): "+b[d]);c.bandSelectors=b}else b[1]&&(c.newNames=b[1]);return sn("Image.select",c)};M.prototype.select=M.prototype.select;
|
|
621
|
+
M.prototype.l=function(a,b){var c=R(M.prototype.l,arguments),d=["DEFAULT_EXPRESSION_IMAGE"],e={DEFAULT_EXPRESSION_IMAGE:this};if(c.map){var g=c.map,f;for(f in g)d.push(f),e[f]=new M(g[f])}var l=P("Image.parseExpression",c.expression,"DEFAULT_EXPRESSION_IMAGE",d);c=new mn;c.encode=function(m){return l.encode(m)};c.Ed=function(m,p){return tk(vl(m,l),p)};c.Z=function(){return{name:"",args:Wa(d,function(m){return{name:m,type:"Image",optional:!1}},this),returns:"Image"}};return c.apply(e)};
|
|
622
|
+
M.prototype.expression=M.prototype.l;M.prototype.clip=function(a){try{a=new U(a)}catch(b){}return P("Image.clip",this,a)};M.prototype.clip=M.prototype.clip;M.prototype.ti=function(a){var b=1!=arguments.length||jn(arguments[0])?Array.from(arguments):arguments[0];return P("Image.rename",this,b)};M.prototype.rename=M.prototype.ti;M.prototype.name=function(){return"Image"};var Fo=function(a){if(this instanceof Fo){if(1<arguments.length)throw Error("ee.List() only accepts 1 argument.");if(a instanceof Fo)return a}else return dn(Fo,arguments);Go();if(Array.isArray(a))N.call(this,null,null),this.Uc=a;else if(a instanceof N)N.call(this,a.I,a.args,a.U),this.Uc=null;else throw Error("Invalid argument specified for ee.List(): "+a);};x(Fo,N);w("ee.List",Fo);var Ho=!1,Go=function(){Ho||(zn(Fo,"List","List"),Ho=!0)};
|
|
623
|
+
Fo.prototype.encode=function(a){return Array.isArray(this.Uc)?Wa(this.Uc,function(b){return a(b)}):Fo.L.encode.call(this,a)};Fo.prototype.na=function(a){return Array.isArray(this.Uc)?pk(vl(a,this.Uc)):Fo.L.na.call(this,a)};Fo.prototype.name=function(){return"List"};var Y=function(a,b){if(!(this instanceof Y))return dn(Y,arguments);if(a instanceof Y)return a;if(2<arguments.length)throw Error("The FeatureCollection constructor takes at most 2 arguments ("+arguments.length+" given)");Io();a instanceof U&&(a=new X(a));a instanceof X&&(a=[a]);if(jn(a)){var c={tableId:a};b&&(c.geometryColumn=b);W.call(this,new O("Collection.loadTable"),c)}else if(Array.isArray(a))W.call(this,new O("Collection"),{features:Wa(a,function(d){return new X(d)})});else if(a instanceof Fo)W.call(this,
|
|
624
|
+
new O("Collection"),{features:a});else if(a&&"object"===typeof a&&"FeatureCollection"===a.type)W.call(this,new O("Collection"),{features:a.features.map(function(d){return new X(d)})});else if(a instanceof N)W.call(this,a.I,a.args,a.U);else throw Error("Unrecognized argument type to convert to a FeatureCollection: "+a);};x(Y,W);w("ee.FeatureCollection",Y);var Jo=!1,Io=function(){Jo||(zn(Y,"FeatureCollection","FeatureCollection"),Jo=!0)};
|
|
625
|
+
Y.prototype.S=function(a,b){var c=R(Y.prototype.S,arguments),d=sn("Collection.draw",{collection:this,color:(c.visParams||{}).color||"000000"});if(c.callback)d.S(void 0,c.callback);else return d.S()};Y.prototype.getMapId=Y.prototype.S;Y.prototype.getMap=Y.prototype.S;Y.prototype.getMap=Y.prototype.getMap;Y.prototype.V=function(a){return Y.L.V.call(this,a)};Y.prototype.getInfo=Y.prototype.V;
|
|
626
|
+
Y.prototype.sb=function(a,b,c,d){var e=R(Y.prototype.sb,arguments),g={table:this};e.format&&(g.format=e.format.toUpperCase());e.filename&&(g.filename=e.filename);e.selectors&&(g.selectors=e.selectors);if(e.callback)im(g,function(f,l){f?e.callback(jm(f)):e.callback(null,l)});else return jm(im(g))};Y.prototype.getDownloadURL=Y.prototype.sb;
|
|
627
|
+
Y.prototype.select=function(a,b,c){if(jn(a)){var d=Array.prototype.slice.call(arguments);return this.map(function(g){return g.select(d)})}var e=R(Y.prototype.select,arguments);return this.map(function(g){return g.select(e)})};Y.prototype.select=Y.prototype.select;Y.prototype.name=function(){return"FeatureCollection"};Y.prototype.elementType=function(){return X};var Z=function(a){if(!(this instanceof Z))return dn(Z,arguments);if(a instanceof Z)return a;if(1!=arguments.length)throw Error("The ImageCollection constructor takes exactly 1 argument ("+arguments.length+" given)");Ko();a instanceof M&&(a=[a]);if(jn(a))W.call(this,new O("ImageCollection.load"),{id:a});else if(Array.isArray(a))W.call(this,new O("ImageCollection.fromImages"),{images:Wa(a,function(b){return new M(b)})});else if(a instanceof Fo)W.call(this,new O("ImageCollection.fromImages"),{images:a});
|
|
628
|
+
else if(a instanceof N)W.call(this,a.I,a.args,a.U);else throw Error("Unrecognized argument type to convert to an ImageCollection: "+a);};x(Z,W);w("ee.ImageCollection",Z);var Lo=!1,Ko=function(){Lo||(zn(Z,"ImageCollection","ImageCollection"),zn(Z,"reduce","ImageCollection"),Lo=!0)};Z.prototype.vf=function(a,b){var c=R(Z.prototype.vf,arguments);return Mo(this,c,["png","jpg","jpeg"],"filmstrip")};Z.prototype.getFilmstripThumbURL=Z.prototype.vf;
|
|
629
|
+
Z.prototype.yf=function(a,b){var c=R(Z.prototype.yf,arguments);return Mo(this,c,["gif"],"video")};Z.prototype.getVideoThumbURL=Z.prototype.yf;
|
|
630
|
+
var Mo=function(a,b,c,d){var e={};a=a.map(function(l){l=vo(l,b.params);return wo(l,b.params,e)});var g={},f=yo(e,g);g.imageCollection=a.map(function(l){f.image=l;return sn("Image.visualize",f)});null!=b.params.dimensions&&(g.dimensions=b.params.dimensions);if(g.format){if(!Xa(c,function(l){return l.toLowerCase()==g.format.toLowerCase()}))throw Error("Invalid format specified.");}else g.format=c[0];c=bm;switch(d){case "video":c=cm;break;case "filmstrip":c=dm}if(b.callback)c(g,function(l,m){var p="";
|
|
631
|
+
if(void 0===m)try{p=em(l)}catch(v){m=String(v.message)}b.callback(p,m)});else return em(c(g))};Z.prototype.S=function(a,b){var c=R(Z.prototype.S,arguments),d=P("ImageCollection.mosaic",this);if(c.callback)d.S(c.visParams,c.callback);else return d.S(c.visParams)};Z.prototype.getMapId=Z.prototype.S;Z.prototype.getMap=Z.prototype.S;Z.prototype.getMap=Z.prototype.getMap;Z.prototype.V=function(a){return Z.L.V.call(this,a)};Z.prototype.getInfo=Z.prototype.V;
|
|
632
632
|
Z.prototype.select=function(a,b){var c=arguments;return this.map(function(d){return d.select.apply(d,c)})};Z.prototype.select=Z.prototype.select;Z.prototype.Hf=function(a,b,c,d){var e=R(Z.prototype.Hf,arguments);return this.map(function(g){return P("Image.linkCollection",g,e.imageCollection,e.linkedBands,e.linkedProperties,e.matchPropertyName)})};Z.prototype.linkCollection=Z.prototype.Hf;Z.prototype.first=function(){return new M(P("Collection.first",this))};Z.prototype.first=Z.prototype.first;
|
|
633
|
-
Z.prototype.name=function(){return"ImageCollection"};Z.prototype.elementType=function(){return M};var
|
|
634
|
-
|
|
635
|
-
w("module$contents$ee$batch_Export.image.toDrive",
|
|
636
|
-
var
|
|
637
|
-
var
|
|
638
|
-
w("module$contents$ee$batch_Export.video.toDrive"
|
|
639
|
-
var
|
|
640
|
-
e.fileFormat&&(e.fileFormat="GeoTIFF");a=e.fileFormat;null==a&&(a="GEO_TIFF");a=a.toUpperCase();switch(a){case "TIFF":case "TIF":case "GEO_TIFF":case "GEOTIFF":a="GEO_TIFF";break;case "TF_RECORD":case "TF_RECORD_IMAGE":case "TFRECORD":a="TF_RECORD_IMAGE";break;default:throw Error("Invalid file format "+a+". Supported formats are: 'GEOTIFF', 'TFRECORD'.");}e.fileFormat=a;null!=e.formatOptions&&(a=
|
|
641
|
-
delete e.crsTransform);break;case "EXPORT_TILES":b=
|
|
642
|
-
a&&(a="CSV");a=a.toUpperCase();switch(a){case "CSV":a="CSV";break;case "JSON":case "GEOJSON":case "GEO_JSON":a="GEO_JSON";break;case "KML":a="KML";break;case "KMZ":a="KMZ";break;case "SHP":a="SHP";break;case "TF_RECORD":case "TF_RECORD_TABLE":case "TFRECORD":a="TF_RECORD_TABLE";break;default:throw Error("Invalid file format "+a+". Supported formats are: 'CSV', 'GeoJSON', 'KML', 'KMZ', 'SHP', and 'TFRecord'.");}e.fileFormat=a;e=
|
|
643
|
-
(e.crs_transform=e.crsTransform,delete e.crsTransform);break;case "EXPORT_VIDEO_MAP":e=
|
|
644
|
-
}if(!(t(b)&&"type"in b))try{new
|
|
645
|
-
a.assetId||"";break;case "FEATURE_VIEW":a.mapName=a.mapName||"";break;case "BIGQUERY":a.table=a.table||"";break;default:b=wa(a.folder);if(!$a(["string","undefined"],b))throw Error('Error: toDrive "folder" parameter must be a string, but is of type '+b+".");a.driveFolder=a.folder||"";a.driveFileNamePrefix=a.fileNamePrefix||"";delete a.folder;delete a.fileNamePrefix}return a},
|
|
646
|
-
|
|
647
|
-
if(Object.keys(a).some(function(m){return null!==c&&m in c}))throw Error("Parameter specified at least twice: once in config, and once in config format options.");a=
|
|
648
|
-
|
|
649
|
-
|
|
650
|
-
|
|
651
|
-
|
|
652
|
-
var
|
|
653
|
-
"Number":c==String?"String":c==Array?"Array":c==Date?"Date":"Object"}})};return new
|
|
654
|
-
d.length;e++){var g=d[e],f=c+e;b[g].U=f;a.args[g].name=f}return a};var
|
|
655
|
-
a);N.call(this,d,e,g)};x(
|
|
656
|
-
var
|
|
657
|
-
a);return new
|
|
658
|
-
case "CompoundValue":throw Error("Nested CompoundValues are disallowed.");default:throw Error("Unknown encoded object type: "+c);}},
|
|
659
|
-
e)};return new N(new c,b)}throw Error("Invalid function value");},
|
|
660
|
-
var
|
|
661
|
-
f.Wa?
|
|
662
|
-
|
|
663
|
-
var
|
|
664
|
-
w("ee.InitState.LOADING","loading");w("ee.InitState.READY","ready");var
|
|
665
|
-
var
|
|
666
|
-
|
|
667
|
-
g=1==e.length;if(g&&e[0]instanceof d)return e[0];if(!(this instanceof d))return
|
|
668
|
-
|
|
669
|
-
a:new Y(a);case "ImageCollection":return new Z(a);case "Filter":return new V(a);case "Algorithm":if("string"===typeof a)return new O(a);if("function"===typeof a){b=a.length;c=[];for(var d=0;d<b;d++)c[d]="Object";return
|
|
670
|
-
default:if(b in c){d=
|
|
671
|
-
var
|
|
672
|
-
w("ee.FloatTileOverlay",
|
|
673
|
-
var
|
|
674
|
-
|
|
675
|
-
var
|
|
676
|
-
h.nc=function(a){this.dispatchEvent(new
|
|
677
|
-
h.Nc=function(){return
|
|
678
|
-
h.getTile=function(a,b,c){var d=1<<b;if(b<this.minZoom||0>a.y||a.y>=d)return c.createElement("div");var e=a.x%d;0>e&&(e+=d);d=new google.maps.Point(e,a.y);a=[a.x,a.y,b,this.yb++].join("-");e=this.ug.getUniqueId();a=[a,e].join("-");b=this.fh(d,b,c,a);b.tileSize=this.tileSize;
|
|
679
|
-
var
|
|
680
|
-
|
|
681
|
-
var
|
|
682
|
-
var
|
|
683
|
-
!1);a.Za.Vc("ready",Fa(Ha,a.Za));a.Ca&&a.Ca.endsWith("&profiling=1")&&(a.Ca=a.Ca.replace("&profiling=1",""),a.Za.headers.set("X-Earth-Engine-Computation-Profiling","1"));a.Za.send(a.Ca,"GET")};h=
|
|
684
|
-
h.gd=function(a){var b=function(c){try{if(c=JSON.parse(c),c.error&&c.error.message)return c.error.message}catch(d){}return c};this.wi>=this.jl?(this.Uk=b(a),
|
|
685
|
-
|
|
686
|
-
|
|
687
|
-
|
|
688
|
-
|
|
689
|
-
|
|
690
|
-
var
|
|
691
|
-
|
|
692
|
-
var
|
|
693
|
-
h.remove=function(a){var b=this.La;var c=Ta(b,a);0<=c?(bb(b,c),b=!0):b=!1;return b||ab(this.Qa,a)};h.aa=function(){for(var a=[],b=this.La.length-1;0<=b;--b)a.push(this.La[b]);var c=this.Qa.length;for(b=0;b<c;++b)a.push(this.Qa[b]);return a};var
|
|
694
|
-
var
|
|
695
|
-
h.contains=function(a){return this.Ta.contains(a)||this.vb.contains(a)};h.R=function(){return this.Ta.R()+this.vb.R()};h.isEmpty=function(){return this.Ta.isEmpty()&&this.vb.isEmpty()};h.J=function(){
|
|
633
|
+
Z.prototype.name=function(){return"ImageCollection"};Z.prototype.elementType=function(){return M};var No=function(a){this.af=a;this.id=null},Po=function(a){var b={element:Oo(a)};Object.assign(b,a);b=Gb(b,function(c){return null!=c});return new No(b)};No.prototype.start=function(a,b){var c=this;B(this.af,"Task config must be specified for tasks to be started.");this.id=this.id||km(1)[0];Pa(this.id,"Failed to obtain task ID.");if(a)Bm(this.id,this.af,function(e,g){if(g)b(g);else{var f;c.id=null!=(f=e.taskId)?f:null;a()}});else{var d;this.id=null!=(d=Bm(this.id,this.af).taskId)?d:null}};
|
|
634
|
+
No.prototype.start=No.prototype.start;var Qo=function(a,b,c,d,e,g,f,l,m,p,v){var z=R(Qo,arguments);z=Ro(z,"ASSET","EXPORT_IMAGE");return Po(z)};w("module$contents$ee$batch_Export.image.toAsset",Qo);var So=function(a,b,c,d,e,g,f,l,m,p,v,z,C,Q,oa){var S=R(So,arguments);S=Ro(S,"GOOGLE_CLOUD_STORAGE","EXPORT_IMAGE");return Po(S)};w("module$contents$ee$batch_Export.image.toCloudStorage",So);var To=function(a,b,c,d,e,g,f,l,m,p,v,z,C,Q,oa){var S=R(To,arguments);S=Ro(S,"DRIVE","EXPORT_IMAGE");return Po(S)};
|
|
635
|
+
w("module$contents$ee$batch_Export.image.toDrive",To);var Uo=function(a,b,c,d,e,g,f,l,m,p,v,z,C){var Q=R(Uo,arguments);Q=Ro(Q,"GOOGLE_CLOUD_STORAGE","EXPORT_TILES");return Po(Q)};w("module$contents$ee$batch_Export.map.toCloudStorage",Uo);var Vo=function(a,b,c,d,e,g,f){var l=R(Vo,arguments);l=Ro(l,"GOOGLE_CLOUD_STORAGE","EXPORT_FEATURES");return Po(l)};w("module$contents$ee$batch_Export.table.toCloudStorage",Vo);
|
|
636
|
+
var Wo=function(a,b,c,d,e,g,f){var l=R(Wo,arguments);l.type="EXPORT_FEATURES";l=Ro(l,"DRIVE","EXPORT_FEATURES");return Po(l)};w("module$contents$ee$batch_Export.table.toDrive",Wo);var Xo=function(a,b,c,d){var e=R(Xo,arguments);e=Ro(e,"ASSET","EXPORT_FEATURES");return Po(e)};w("module$contents$ee$batch_Export.table.toAsset",Xo);var Yo=function(a,b,c,d,e,g,f){var l=R(Yo,arguments);l=Ro(l,"FEATURE_VIEW","EXPORT_FEATURES");return Po(l)};w("module$contents$ee$batch_Export.table.toFeatureView",Yo);
|
|
637
|
+
var Zo=function(a,b,c,d,e,g,f){var l=R(Zo,arguments);l=Ro(l,"BIGQUERY","EXPORT_FEATURES");return Po(l)};w("module$contents$ee$batch_Export.table.toBigQuery",Zo);var $o=function(a,b,c,d,e,g,f,l,m,p,v,z){var C=R($o,arguments);C=Ro(C,"GOOGLE_CLOUD_STORAGE","EXPORT_VIDEO");return Po(C)};w("module$contents$ee$batch_Export.video.toCloudStorage",$o);var ap=function(a,b,c,d,e,g,f,l,m,p,v,z){var C=R(ap,arguments);C=Ro(C,"DRIVE","EXPORT_VIDEO");return Po(C)};
|
|
638
|
+
w("module$contents$ee$batch_Export.video.toDrive",ap);var bp=function(a,b,c,d,e,g,f,l,m,p,v,z,C,Q,oa,S,Aa,Jb,ar,br){var yj=R(bp,arguments);yj=Ro(yj,"GOOGLE_CLOUD_STORAGE","EXPORT_VIDEO_MAP");return Po(yj)};w("module$contents$ee$batch_Export.videoMap.toCloudStorage",bp);var cp=function(a,b,c){var d=R(cp,arguments);d=Ro(d,"ASSET","EXPORT_CLASSIFIER");return Po(d)};w("module$contents$ee$batch_Export.classifier.toAsset",cp);
|
|
639
|
+
var Oo=function(a){var b=function(d){return d in a},c=dp.find(b);B(1===Za(dp,b),'Expected a single "image", "collection" or "classifier" key.');b=a[c];if(!(b instanceof M||b instanceof Y||b instanceof Z||b instanceof T||b instanceof N))throw Error("Unknown element type provided: "+typeof b+". Expected: ee.Image, ee.ImageCollection, ee.FeatureCollection, ee.Element or ee.ComputedObject.");delete a[c];return b},Ro=function(a,b,c){var d=void 0===d?!0:d;var e={type:c};Object.assign(e,a);switch(c){case "EXPORT_IMAGE":null==
|
|
640
|
+
e.fileFormat&&(e.fileFormat="GeoTIFF");a=e.fileFormat;null==a&&(a="GEO_TIFF");a=a.toUpperCase();switch(a){case "TIFF":case "TIF":case "GEO_TIFF":case "GEOTIFF":a="GEO_TIFF";break;case "TF_RECORD":case "TF_RECORD_IMAGE":case "TFRECORD":a="TF_RECORD_IMAGE";break;default:throw Error("Invalid file format "+a+". Supported formats are: 'GEOTIFF', 'TFRECORD'.");}e.fileFormat=a;null!=e.formatOptions&&(a=ep(e,a),delete e.formatOptions,Object.assign(e,a));e=fp(e,b);null!=e.crsTransform&&(e.crs_transform=e.crsTransform,
|
|
641
|
+
delete e.crsTransform);break;case "EXPORT_TILES":b=fp(e,b);e=b.fileFormat;null==e&&(e="AUTO_JPEG_PNG");e=e.toUpperCase();switch(e){case "AUTO":case "AUTO_JPEG_PNG":case "AUTO_JPG_PNG":e="AUTO_JPEG_PNG";break;case "JPG":case "JPEG":e="JPEG";break;case "PNG":e="PNG";break;default:throw Error("Invalid file format "+e+". Supported formats are: 'AUTO', 'PNG', and 'JPEG'.");}b.fileFormat=e;e=b;break;case "EXPORT_FEATURES":Array.isArray(e.selectors)&&(e.selectors=e.selectors.join());a=e.fileFormat;null==
|
|
642
|
+
a&&(a="CSV");a=a.toUpperCase();switch(a){case "CSV":a="CSV";break;case "JSON":case "GEOJSON":case "GEO_JSON":a="GEO_JSON";break;case "KML":a="KML";break;case "KMZ":a="KMZ";break;case "SHP":a="SHP";break;case "TF_RECORD":case "TF_RECORD_TABLE":case "TFRECORD":a="TF_RECORD_TABLE";break;default:throw Error("Invalid file format "+a+". Supported formats are: 'CSV', 'GeoJSON', 'KML', 'KMZ', 'SHP', and 'TFRecord'.");}e.fileFormat=a;e=fp(e,b);break;case "EXPORT_VIDEO":e=gp(e);e=fp(e,b);null!=e.crsTransform&&
|
|
643
|
+
(e.crs_transform=e.crsTransform,delete e.crsTransform);break;case "EXPORT_VIDEO_MAP":e=gp(e);e.version=e.version||"V1";e.stride=e.stride||1;e.tileDimensions={width:e.tileWidth||256,height:e.tileHeight||256};e=fp(e,b);break;case "EXPORT_CLASSIFIER":e=fp(e,b);break;default:throw Error("Unknown export type: "+e.type);}if(d&&null!=e.region){d=e;b=e.region;if(b instanceof U)b=b.oe();else if("string"===typeof b)try{b=Ra(JSON.parse(b))}catch(g){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.");
|
|
644
|
+
}if(!(t(b)&&"type"in b))try{new Tn(b)}catch(g){try{new Wn(b)}catch(f){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.");}}b=JSON.stringify(b);d.region=b}return e},fp=function(a,b){switch(b){case "GOOGLE_CLOUD_STORAGE":a.outputBucket=a.bucket||"";a.outputPrefix=a.fileNamePrefix||a.path||"";delete a.fileNamePrefix;delete a.path;delete a.bucket;break;case "ASSET":a.assetId=
|
|
645
|
+
a.assetId||"";break;case "FEATURE_VIEW":a.mapName=a.mapName||"";break;case "BIGQUERY":a.table=a.table||"";break;default:b=wa(a.folder);if(!$a(["string","undefined"],b))throw Error('Error: toDrive "folder" parameter must be a string, but is of type '+b+".");a.driveFolder=a.folder||"";a.driveFileNamePrefix=a.fileNamePrefix||"";delete a.folder;delete a.fileNamePrefix}return a},hp={GEO_TIFF:["cloudOptimized","fileDimensions","noData","shardSize"],TF_RECORD_IMAGE:"patchDimensions kernelSize compressed maxFileSize defaultValue tensorDepths sequenceData collapseBands maskedThreshold".split(" ")},
|
|
646
|
+
ip={GEO_TIFF:"tiff",TF_RECORD_IMAGE:"tfrecord"},gp=function(a){a.videoOptions=a.framesPerSecond||5;a.maxFrames=a.maxFrames||1E3;a.maxPixels=a.maxPixels||1E8;var b=a.fileFormat;null==b&&(b="MP4");b=b.toUpperCase();switch(b){case "MP4":b="MP4";break;case "GIF":case "JIF":b="GIF";break;case "VP9":case "WEBM":b="VP9";break;default:throw Error("Invalid file format "+b+". Supported formats are: 'MP4', 'GIF', and 'WEBM'.");}a.fileFormat=b;return a},ep=function(a,b){var c=a.formatOptions;if(null==c)return{};
|
|
647
|
+
if(Object.keys(a).some(function(m){return null!==c&&m in c}))throw Error("Parameter specified at least twice: once in config, and once in config format options.");a=ip[b];for(var d=hp[b],e={},g=n(Object.entries(c)),f=g.next();!f.done;f=g.next()){var l=n(f.value);f=l.next().value;l=l.next().value;if(!$a(d,f))throw Error('"'+f+'" is not a valid option, the image format "'+b+'""may have the following options: '+(d.join(", ")+'".'));e[a+f[0].toUpperCase()+f.substring(1)]=Array.isArray(l)?l.join():l}return e},
|
|
648
|
+
dp=["image","collection","classifier"];var jp=function(a){if(!(this instanceof jp))return dn(jp,arguments);if(a instanceof jp)return a;kp();if("number"===typeof a)N.call(this,null,null),this.Wc=a;else if(a instanceof N)N.call(this,a.I,a.args,a.U),this.Wc=null;else throw Error("Invalid argument specified for ee.Number(): "+a);};x(jp,N);w("ee.Number",jp);var lp=!1,kp=function(){lp||(zn(jp,"Number","Number"),lp=!0)};jp.prototype.encode=function(a){return"number"===typeof this.Wc?this.Wc:jp.L.encode.call(this,a)};
|
|
649
|
+
jp.prototype.na=function(a){return"number"===typeof this.Wc?pk(vl(a,this.Wc)):jp.L.na.call(this,a)};jp.prototype.name=function(){return"Number"};var mp=function(a){if(!(this instanceof mp))return dn(mp,arguments);if(a instanceof mp)return a;np();if("string"===typeof a)N.call(this,null,null),this.jd=a;else if(a instanceof N)this.jd=null,a.I&&"String"==a.I.Z().returns?N.call(this,a.I,a.args,a.U):N.call(this,new O("String"),{input:a},null);else throw Error("Invalid argument specified for ee.String(): "+a);};x(mp,N);w("ee.String",mp);var op=!1,np=function(){op||(zn(mp,"String","String"),op=!0)};
|
|
650
|
+
mp.prototype.encode=function(a){return"string"===typeof this.jd?this.jd:mp.L.encode.call(this,a)};mp.prototype.na=function(a){return"string"===typeof this.jd?pk(vl(a,this.jd)):mp.L.na.call(this,a)};mp.prototype.name=function(){return"String"};var pp=function(a,b){if(!(this instanceof pp))return dn(pp,arguments);for(var c=[],d=a.args,e=0;e<d.length;e++){var g=d[e],f=g.type;c.push(qp(f in fn?fn[f]:null,g.name))}if(void 0===b.apply(null,c))throw Error("User-defined methods must return a value.");this.xb=rp(a,c,b);this.Rg=b.apply(null,c)};x(pp,mn);w("ee.CustomFunction",pp);pp.prototype.encode=function(a){return{type:"Function",argumentNames:Wa(this.xb.args,function(b){return b.name}),body:a(this.Rg)}};
|
|
651
|
+
pp.prototype.na=function(a){return uk(this.xb.args.map(function(b){return b.name}),vl(a,this.Rg))};pp.prototype.Ed=function(a,b){return tk(vl(a,this),b)};pp.prototype.Z=function(){return this.xb};
|
|
652
|
+
var qp=function(a,b){a=a||Object;if(!(a.prototype instanceof N))if(a&&a!=Object)if(a==String)a=mp;else if(a==Number)a=jp;else if(a==Array)a=r.ee.List;else throw Error("Variables must be of an EE type, e.g. ee.Image or ee.Number.");else a=N;var c=function(d){this.args=this.I=null;this.U=d};c.prototype=a.prototype;return new c(b)},sp=function(a,b){b={name:"",returns:"Object",args:Wa(b,function(c){return{name:null,type:"string"===typeof c?c:c.prototype instanceof N?c.prototype.name.call(null):c==Number?
|
|
653
|
+
"Number":c==String?"String":c==Array?"Array":c==Date?"Date":"Object"}})};return new pp(b,a)},rp=function(a,b,c){for(var d=[],e=0;e<b.length;e++)null===b[e].U&&d.push(e);if(0===d.length)return a;c="_MAPPING_VAR_"+function(l){var m=function(v){return v.map(p).reduce(function(z,C){return z+C},0)},p=function(v){return v.Ua?1:v.Fa?m(v.Fa.values):v.Ga?m(Object.values(v.Ga.values)):v.ya?m(Object.values(v.ya.arguments)):0};return m(Object.values(l.values))}(nl(c.apply(null,b),"<unbound>"))+"_";for(e=0;e<
|
|
654
|
+
d.length;e++){var g=d[e],f=c+e;b[g].U=f;a.args[g].name=f}return a};var tp=function(a,b){if(!(this instanceof tp))return dn(tp,arguments);if(a instanceof tp)return a;up();var c=R(tp,arguments);a=c.date;c=c.tz;var d=new O("Date"),e={},g=null;if(jn(a)){if(e.value=a,c)if(jn(c))e.timeZone=c;else throw Error("Invalid argument specified for ee.Date(..., opt_tz): "+c);}else if(hn(a))e.value=a;else if(ya(a))e.value=Math.floor(a.getTime());else if(a instanceof N)a.I&&"Date"==a.I.Z().returns?(d=a.I,e=a.args,g=a.U):e.value=a;else throw Error("Invalid argument specified for ee.Date(): "+
|
|
655
|
+
a);N.call(this,d,e,g)};x(tp,N);w("ee.Date",tp);var vp=!1,up=function(){vp||(zn(tp,"Date","Date"),vp=!0)};tp.prototype.name=function(){return"Date"};w("ee.Deserializer",function(){});var xp=function(a){return wp(JSON.parse(a))};w("ee.Deserializer.fromJSON",xp);var wp=function(a){if("result"in a&&"values"in a)return yp(a);var b={};if(t(a)&&"CompoundValue"===a.type){for(var c=a.scope,d=0;d<c.length;d++){var e=c[d][0],g=c[d][1];if(e in b)throw Error('Duplicate scope key "'+e+'" in scope #'+d+".");b[e]=zp(g,b)}a=a.value}return zp(a,b)};w("ee.Deserializer.decode",wp);
|
|
656
|
+
var zp=function(a,b){if(null===a||"number"===typeof a||"boolean"===typeof a||"string"===typeof a)return a;if(Array.isArray(a))return Wa(a,function(e){return zp(e,b)});if(!t(a)||"function"===typeof a)throw Error("Cannot decode object: "+a);var c=a.type;switch(c){case "ValueRef":if(a.value in b)return b[a.value];throw Error("Unknown ValueRef: "+a);case "ArgumentRef":a=a.value;if("string"!==typeof a)throw Error("Invalid variable name: "+a);return qp(Object,a);case "Date":a=a.value;if("number"!==typeof a)throw Error("Invalid date value: "+
|
|
657
|
+
a);return new tp(a/1E3);case "Bytes":return Ap(new Le({qb:a}),a);case "Invocation":return c="functionName"in a?rn(a.functionName):zp(a["function"],b),a=Hb(a.arguments,function(e){return zp(e,b)}),Bp(c,a);case "Dictionary":return Hb(a.value,function(e){return zp(e,b)});case "Function":var d=zp(a.body,b);a={name:"",args:Wa(a.argumentNames,function(e){return{name:e,type:"Object",optional:!1}}),returns:"Object"};return new pp(a,function(){return d});case "Point":case "MultiPoint":case "LineString":case "MultiLineString":case "Polygon":case "MultiPolygon":case "LinearRing":case "GeometryCollection":return new U(a);
|
|
658
|
+
case "CompoundValue":throw Error("Nested CompoundValues are disallowed.");default:throw Error("Unknown encoded object type: "+c);}},Ap=function(a,b){var c=function(){};q(c,mk);c.prototype.encode=function(){return b};c.prototype.na=function(){return a};return new c},Bp=function(a,b){if(a instanceof mn)return a.apply(b);if(a instanceof N){var c=function(){return mn.apply(this,arguments)||this};q(c,mn);c.prototype.encode=function(d){return a.encode(d)};c.prototype.Ed=function(d,e){return tk(vl(d,a),
|
|
659
|
+
e)};return new N(new c,b)}throw Error("Invalid function value");},Cp=function(a){return yp(JSON.parse(a))};w("ee.Deserializer.fromCloudApiJSON",Cp);
|
|
660
|
+
var yp=function(a){var b=Wc(af,a),c={},d=function(f,l){if(!(f in c)){if(!(f in b.values))throw Error("Cannot find "+l+" "+f);c[f]=e(b.values[f])}return c[f]},e=function(f){if(null!==f.hb)f=f.hb;else if(null!==f.Fa)f=f.Fa.values.map(e);else if(null!==f.Ga)f=Hb(f.Ga.values,e);else if(null!==f.Mb)f=qp(Object,f.Mb);else if(null!==f.Ua)f=g(f.Ua);else if(null!==f.ya){var l=f.ya;f=l.Va?d(l.Va,"function"):rn(l.functionName);l=Hb(l.arguments,e);f=Bp(f,l)}else f=null!==f.qb?Ap(new Le({qb:f.qb}),f.qb):null!==
|
|
661
|
+
f.Wa?Ap(new Le({Wa:f.Wa}),f.Wa):null!==f.Oa?d(f.Oa,"reference"):null;return f},g=function(f){var l=d(f.body,"function body");f={args:f.lc.map(function(m){return{name:m,type:"Object",optional:!1}}),name:"",returns:"Object"};return new pp(f,function(){return l})};return d(b.result,"result value")};w("ee.Deserializer.decodeCloudApi",yp);var Dp=function(a){if(!(this instanceof Dp))return dn(Dp,arguments);if(a instanceof Dp)return a;Ep();kn(a)?(N.call(this,null,null),this.Kc=a):(a instanceof N&&a.I&&"Dictionary"==a.I.Z().returns?N.call(this,a.I,a.args,a.U):N.call(this,new O("Dictionary"),{input:a},null),this.Kc=null)};x(Dp,N);w("ee.Dictionary",Dp);var Fp=!1,Ep=function(){Fp||(zn(Dp,"Dictionary","Dictionary"),Fp=!0)};Dp.prototype.encode=function(a){return null!==this.Kc?a(this.Kc):Dp.L.encode.call(this,a)};
|
|
662
|
+
Dp.prototype.na=function(a){return null!==this.Kc?pk(vl(a,this.Kc)):Dp.L.na.call(this,a)};Dp.prototype.name=function(){return"Dictionary"};var Gp={};w("ee.Terrain",Gp);Gp.Df=!1;Gp.initialize=function(){Gp.Df||(zn(Gp,"Terrain","Terrain"),Gp.Df=!0)};Gp.reset=function(){An(Gp);Gp.Df=!1};var Mp=function(a,b,c,d,e,g){if("ready"!=Hp||a||b){var f=null!=c;if(d)if(f)Ip.push(d);else throw Error("Can't pass an error callback without a success callback.");if("loading"==Hp&&f)Jp.push(c);else if(Hp="loading",Dj(a,b,e,g),f)Jp.push(c),vn(Kp,Lp);else try{vn(),Kp()}catch(l){throw Lp(l),l;}}else c&&c()};w("ee.initialize",Mp);
|
|
663
|
+
var Pp=function(){Hp="not_ready";bk=ak=Nj=null;Zj=!1;tn=null;un={};An(tp);vp=!1;An(Dp);Fp=!1;An(T);Hn=!1;An(M);Co=!1;An(X);uo=!1;An(W);so=!1;An(Z);Lo=!1;An(Y);Jo=!1;An(V);co=!1;An(U);Kn=!1;An(Fo);Ho=!1;An(jp);lp=!1;An(mp);op=!1;Gp.reset();for(var a=r.ee,b=0;b<Np.length;b++){var c=Np[b];An(a[c]);delete a[c]}Np=[];fn=a;a=Op;for(var d in a)delete a[d]};w("ee.reset",Pp);var Qp={Il:"not_ready",LOADING:"loading",Jl:"ready"};w("ee.InitState",Qp);w("ee.InitState.NOT_READY","not_ready");
|
|
664
|
+
w("ee.InitState.LOADING","loading");w("ee.InitState.READY","ready");var Hp="not_ready",Jp=[],Ip=[];w("ee.TILE_SIZE",256);var Np=[],Op={};w("ee.Algorithms",Op);var Rp=function(a,b){"string"===typeof a&&(a=new O(a));return mn.prototype.call.apply(a,Array.prototype.slice.call(arguments,1))};w("ee.call",Rp);var Sp=function(a,b){"string"===typeof a&&(a=new O(a));return a.apply(b)};w("ee.apply",Sp);
|
|
665
|
+
var Kp=function(){if("loading"==Hp){try{up();Ep();Gn();Ao();to();ro();Ko();Io();bo();In();Go();kp();np();Gp.initialize();var a=wn(),b={},c={},d;for(d in a){var e=void 0;e=-1!=d.indexOf(".")?d.slice(0,d.indexOf(".")):d;b[e]=!0;var g=a[d].returns.replace(/<.*>/,"");c[g]=!0}var f=r.ee,l;for(l in b)l in c&&!(l in f)&&(f[l]=Tp(l),Np.push(l),a[l]?(f[l].signature=a[l],f[l].signature.isConstructor=!0,un[l]=!0):f[l].signature={});fn=f;Up()}catch(m){Lp(m);return}Hp="ready";for(Ip=[];0<Jp.length;)Jp.shift()()}},
|
|
666
|
+
Lp=function(a){if("loading"==Hp)for(Hp="not_ready",Jp=[];0<Ip.length;)Ip.shift()(a)},Up=function(){var a=xn();Lb(a).sort().forEach(function(b){var c=a[b],d=c.Z();if(!d.hidden){b=b.split(".");var e=Op;for(e.signature={};1<b.length;){var g=b[0];g in e||(e[g]={signature:{}});e=e[g];b=eb(b,1)}g=function(f){return qn(c,void 0,Array.prototype.slice.call(arguments,0))};g.signature=d;g.toString=u(c.toString,c);e[b[0]]=g}})},Tp=function(a){var b=function(c){var d=r.ee[a],e=Array.prototype.slice.call(arguments),
|
|
667
|
+
g=1==e.length;if(g&&e[0]instanceof d)return e[0];if(!(this instanceof d))return dn(d,e);d=yn(a);var f=!(e[0]instanceof N),l=!1;d&&(g?f?l=!0:e[0].I&&e[0].I.Z().returns==d.Z().returns||(l=!0):l=!0);if(l)e=ln(e,d.Z())?e[0]:on(d,e),N.call(this,d,pn(d,e));else{if(!g)throw Error("Too many arguments for ee."+a+"(): "+e);if(f)throw Error("Invalid argument for ee."+a+"(): "+e+". Must be a ComputedObject.");e=e[0];N.call(this,e.I,e.args,e.U)}};x(b,N);b.prototype.name=function(){return a};zn(b,a,a);return b};
|
|
668
|
+
nn=function(a,b){if(null===a)return null;if(void 0!==a){var c=r.ee;switch(b){case "Image":return new M(a);case "Feature":return a instanceof W?P("Feature",P("Collection.geometry",a)):new X(a);case "Element":if(a instanceof T)return a;if(a instanceof U)return new X(a);if(a instanceof N)return new T(a.I,a.args,a.U);throw Error("Cannot convert "+a+" to Element.");case "Geometry":return a instanceof Y?P("Collection.geometry",a):new U(a);case "FeatureCollection":case "Collection":return a instanceof W?
|
|
669
|
+
a:new Y(a);case "ImageCollection":return new Z(a);case "Filter":return new V(a);case "Algorithm":if("string"===typeof a)return new O(a);if("function"===typeof a){b=a.length;c=[];for(var d=0;d<b;d++)c[d]="Object";return sp(a,c)}if(a instanceof mk)return a;throw Error("Argument is not a function: "+a);case "String":return jn(a)||a instanceof mp||a instanceof N?new mp(a):a;case "Dictionary":return kn(a)?a:new Dp(a);case "List":return new Fo(a);case "Number":case "Float":case "Long":case "Integer":case "Short":case "Byte":return new jp(a);
|
|
670
|
+
default:if(b in c){d=yn(b);if(a instanceof c[b])return a;if(d)return new c[b](a);if("string"===typeof a){if(a in c[b])return c[b][a].call();throw Error("Unknown algorithm: "+b+"."+a);}return new c[b](a)}return a}}};var Vp=function(a,b,c){Nc.call(this,a,b,c);this.tileSize=new google.maps.Size(256,256);this.Ah=new zc;this.zh=new zc};q(Vp,Nc);Vp.prototype.getTile=function(a,b){var c=Oc(this,a,b);b=[this.url,c].join("/")+"?token="+this.token;c=[c,this.yb,this.token].join("/");this.Ab.push(c);this.yb+=1;var d=lh("DIV");Wp(this,b,a,c,d);Xp(this);return d};
|
|
671
|
+
var Wp=function(a,b,c,d,e){var g=Zi(Xi);g.open("GET",b,!0);g.responseType="arraybuffer";g.onreadystatechange=u(function(){if(g.readyState===XMLHttpRequest.DONE&&200===g.status){var f=g.response;if(f)f=new Float32Array(f),this.Ah.set(c,f),this.zh.set(c,e),ab(this.Ab,d),Xp(this);else throw this.vg.add(d),Error("Unable to request floating point array buffers.");}},a);g.send()},Xp=function(a){a.dispatchEvent(new Pc(a.Ab.length))};Vp.prototype.J=function(){this.zh=this.Ah=null;Nc.prototype.J.call(this)};
|
|
672
|
+
w("ee.FloatTileOverlay",Vp);var Yp=function(){this.je=new Map};Yp.prototype.clear=function(){this.je.clear()};var Zp=function(a,b){a.je.has(b)||a.je.set(b,{throttleCount:0,errorCount:0,tileLatencies:[]});return a.je.get(b)};var $p=function(a){y.call(this);this.Tb=a;this.K={}};x($p,y);var aq=[];$p.prototype.Xa=function(a,b,c,d){Array.isArray(b)||(b&&(aq[0]=b.toString()),b=aq);for(var e=0;e<b.length;e++){var g=bc(a,b[e],c||this.handleEvent,d||!1,this.Tb||this);if(!g)break;this.K[g.key]=g}return this};$p.prototype.Vc=function(a,b,c,d){return bq(this,a,b,c,d)};
|
|
673
|
+
var bq=function(a,b,c,d,e,g){if(Array.isArray(c))for(var f=0;f<c.length;f++)bq(a,b,c[f],d,e,g);else{b=ac(b,c,d||a.handleEvent,e,g||a.Tb||a);if(!b)return a;a.K[b.key]=b}return a};$p.prototype.se=function(a,b,c,d,e){if(Array.isArray(b))for(var g=0;g<b.length;g++)this.se(a,b[g],c,d,e);else c=c||this.handleEvent,d=t(d)?!!d.capture:!!d,e=e||this.Tb||this,c=cc(c),d=!!d,b=Bb(a)?a.Mc(b,c,d,e):a?(a=ec(a))?a.Mc(b,c,d,e):null:null,b&&(jc(b),delete this.K[b.key])};
|
|
674
|
+
$p.prototype.ed=function(){Fb(this.K,function(a,b){this.K.hasOwnProperty(b)&&jc(a)},this);this.K={}};$p.prototype.J=function(){$p.L.J.call(this);this.ed()};$p.prototype.handleEvent=function(){throw Error("EventHandler.handleEvent not implemented");};var dq=function(a,b){void 0!==a.name?(this.name=a.name,this.code=Ob[a.name]):(this.code=a=Oa(a.code),this.name=cq(a));Ia.call(this,ud("%s %s",this.name,b))};x(dq,Ia);
|
|
675
|
+
var cq=function(a){var b=Nb(function(c){return a==c});if(void 0===b)throw Error("Invalid code: "+a);return b},eq={},Ob=(eq.AbortError=3,eq.EncodingError=5,eq.InvalidModificationError=9,eq.InvalidStateError=7,eq.NotFoundError=1,eq.NotReadableError=4,eq.NoModificationAllowedError=6,eq.PathExistsError=12,eq.QuotaExceededError=10,eq.SecurityError=2,eq.SyntaxError=8,eq.TypeMismatchError=11,eq);var fq=function(a,b){A.call(this,a.type,b);this.Ja=a};x(fq,A);var gq=function(){D.call(this);this.ca=new FileReader;this.ca.onloadstart=u(this.nc,this);this.ca.onprogress=u(this.nc,this);this.ca.onload=u(this.nc,this);this.ca.onabort=u(this.nc,this);this.ca.onerror=u(this.nc,this);this.ca.onloadend=u(this.nc,this)};x(gq,D);h=gq.prototype;h.abort=function(){try{this.ca.abort()}catch(a){throw new dq(a,"aborting read");}};h.ub=function(){return this.ca.readyState};h.getError=function(){return this.ca.error&&new dq(this.ca.error,"reading file")};
|
|
676
|
+
h.nc=function(a){this.dispatchEvent(new fq(a,this))};h.J=function(){gq.L.J.call(this);delete this.ca};h.readAsBinaryString=function(a){this.ca.readAsBinaryString(a)};h.readAsArrayBuffer=function(a){this.ca.readAsArrayBuffer(a)};h.readAsText=function(a,b){this.ca.readAsText(a,b)};var hq=function(a,b){B(a);a=a.style;"opacity"in a?a.opacity=b:"MozOpacity"in a?a.MozOpacity=b:"filter"in a&&(a.filter=""===b?"":"alpha(opacity="+100*Number(b)+")")};var iq=function(a,b){D.call(this);b=b||{};this.minZoom=b.minZoom||0;this.maxZoom=b.maxZoom||20;if(!window.google||!window.google.maps)throw Error("Google Maps API hasn't been initialized.");this.tileSize=b.tileSize||new google.maps.Size(256,256);this.name=b.name;this.opacity="opacity"in b?b.opacity:1;this.ie=new Yp(a.getUniqueId());this.zb=new zc;this.yb=0;this.ug=a;this.jb=new $p(this);this.radius=0};q(iq,D);h=iq.prototype;h.Oe=function(a){return bc(this,"tile-load",a)};h.bg=function(a){jc(a)};
|
|
677
|
+
h.Nc=function(){return jq(this,"throttled")+jq(this,"loading")+jq(this,"new")};h.setOpacity=function(a){this.opacity=a;this.zb.forEach(function(b){hq(b.la,this.opacity)},this)};h.getStats=function(){return this.ie};
|
|
678
|
+
h.getTile=function(a,b,c){var d=1<<b;if(b<this.minZoom||0>a.y||a.y>=d)return c.createElement("div");var e=a.x%d;0>e&&(e+=d);d=new google.maps.Point(e,a.y);a=[a.x,a.y,b,this.yb++].join("-");e=this.ug.getUniqueId();a=[a,e].join("-");b=this.fh(d,b,c,a);b.tileSize=this.tileSize;hq(b.la,this.opacity);this.zb.set(a,b);kq(this,b);this.dispatchEvent(new lq(this.Nc()));this.ug.If(b,(new Date).getTime()/1E3);return b.la};h.releaseTile=function(a){var b=this.zb.get(a.id);this.zb.remove(a.id);b&&(b.abort(),Ha(b))};
|
|
679
|
+
var kq=function(a,b){a.jb.Xa(b,"status-changed",function(){switch(b.getStatus()){case "loaded":var c=b.gl,d=(new Date).getTime();Zp(this.ie,b.zoom).tileLatencies.push(d-c);this.dispatchEvent(new mq(this.Nc()));break;case "throttled":Zp(this.ie,b.zoom).throttleCount++;this.dispatchEvent(new nq(b.Ca));break;case "failed":Zp(this.ie,b.zoom).errorCount++;this.dispatchEvent(new oq(b.Ca,b.Uk));break;case "aborted":this.dispatchEvent(new pq(this.Nc()))}})};
|
|
680
|
+
iq.prototype.J=function(){D.prototype.J.call(this);this.zb.forEach(Ha);this.zb.clear();this.zb=null;Ha(this.jb);this.ug=this.jb=null};var jq=function(a,b){return Za(a.zb.aa(),function(c){return c.getStatus()==b})};w("ee.layers.AbstractOverlay",iq);iq.prototype.removeTileCallback=iq.prototype.bg;iq.prototype.addTileCallback=iq.prototype.Oe;var mq=function(){A.call(this,"tile-load")};q(mq,A);var lq=function(){A.call(this,"tile-start")};q(lq,A);var nq=function(){A.call(this,"tile-throttle")};q(nq,A);
|
|
681
|
+
var oq=function(a,b){A.call(this,"tile-fail");this.errorMessage=b};q(oq,A);var pq=function(){A.call(this,"tile-abort")};q(pq,A);var qq=function(a,b,c,d){D.call(this);this.rb=a;this.zoom=b;this.la=c.createElement("div");this.la.id=d;this.jl=5;this.de=function(){};this.ke="new";this.wi=0;this.Ff=!1};q(qq,D);qq.prototype.getDiv=function(){return this.la};
|
|
682
|
+
var sq=function(a){if(!a.Ff&&"loading"==a.getStatus())throw Error("startLoad() can only be invoked once. Use retryLoad() after the first attempt.");rq(a,"loading");a.gl=(new Date).getTime();a.Za=new $i;a.Za.xc="blob";a.Za.Xa("complete",function(){var b=kj(a.Za),c=a.Za.getStatus();429==c&&rq(a,"throttled");if(Ti(c)){var d={};Fb(lj(a.Za),function(g,f){d[f.toLowerCase()]=g});a.Al=d;a.Di=b;a.Lc()}else if(b){var e=new gq;e.Xa("loadend",function(){a.gd(e.ca.result)});e.readAsText(b)}else a.gd("Failed to load tile.")},
|
|
683
|
+
!1);a.Za.Vc("ready",Fa(Ha,a.Za));a.Ca&&a.Ca.endsWith("&profiling=1")&&(a.Ca=a.Ca.replace("&profiling=1",""),a.Za.headers.set("X-Earth-Engine-Computation-Profiling","1"));a.Za.send(a.Ca,"GET")};h=qq.prototype;h.Lc=function(){this.de(this);rq(this,"loaded")};h.Hc=function(){Ha(this.Za)};
|
|
684
|
+
h.gd=function(a){var b=function(c){try{if(c=JSON.parse(c),c.error&&c.error.message)return c.error.message}catch(d){}return c};this.wi>=this.jl?(this.Uk=b(a),rq(this,"failed")):(this.Hc(),setTimeout(u(function(){this.Sa||(this.Ff=!0,sq(this),this.Ff=!1)},this),1E3*Math.pow(2,this.wi++)))};h.abort=function(){this.Hc();"aborted"!=this.getStatus()&&"removed"!=this.getStatus()&&rq(this,this.ke in tq?"removed":"aborted")};h.getStatus=function(){return this.ke};var rq=function(a,b){a.ke=b;a.dispatchEvent("status-changed")};
|
|
685
|
+
qq.prototype.J=function(){D.prototype.J.call(this);this.Hc();this.la.remove();this.de=null};var tq={aborted:!0,failed:!0,loaded:!0,removed:!0};var uq=function(){y.call(this)};q(uq,y);var vq=function(a,b){iq.call(this,a,b);this.Tg=new zc;this.rh=new zc};q(vq,iq);vq.prototype.fh=function(a,b,c,d){var e=new wq(a,b,c,d);this.jb.Xa(e,"status-changed",function(){"loaded"==e.getStatus()&&(this.Tg.set(a,new Float32Array(e.yd)),this.rh.set(a,e.la))});return e};vq.prototype.J=function(){iq.prototype.J.call(this);this.rh=this.Tg=null};w("ee.layers.BinaryOverlay",vq);var wq=function(a,b,c,d){qq.call(this,a,b,c,d)};q(wq,qq);
|
|
686
|
+
wq.prototype.Lc=function(){var a=new gq;a.Xa("loadend",function(){this.yd=a.ca.result;qq.prototype.Lc.call(this)},void 0,this);a.readAsArrayBuffer(this.Di)};var xq=function(a){D.call(this);this.Rc={};this.Qc={};this.Tb=new $p(this);this.X=a;this.Ye=!1};x(xq,D);var yq=["load","abort","error"],zq=function(a,b,c){if(c="string"===typeof c?c:c.src)a.Ye=!1,a.Rc[b]={src:c,eh:null}},Aq=function(a,b){delete a.Rc[b];var c=a.Qc[b];c&&(delete a.Qc[b],a.Tb.se(c,yq,a.ei))};
|
|
687
|
+
xq.prototype.start=function(){var a=this.Rc;Lb(a).forEach(function(b){var c=a[b];if(c&&(delete a[b],!this.Sa)){if(this.X){var d=this.X;d=(d?new qh(ph(d)):Ja||(Ja=new qh)).Sk("IMG")}else d=new Image;c.eh&&(d.crossOrigin=c.eh);this.Tb.Xa(d,yq,this.ei);this.Qc[b]=d;d.id=b;d.src=c.src}},this)};
|
|
688
|
+
xq.prototype.ei=function(a){var b=a.currentTarget;if(b){if("readystatechange"==a.type)if("complete"==b.readyState)a.type="load";else return;"undefined"==typeof b.naturalWidth&&("load"==a.type?(b.naturalWidth=b.width,b.naturalHeight=b.height):(b.naturalWidth=0,b.naturalHeight=0));Aq(this,b.id);this.dispatchEvent({type:a.type,target:b});!this.Sa&&Pb(this.Qc)&&Pb(this.Rc)&&!this.Ye&&(this.Ye=!0,this.dispatchEvent("complete"))}};xq.prototype.J=function(){delete this.Rc;delete this.Qc;Ha(this.Tb);xq.L.J.call(this)};var Bq=function(a,b){iq.call(this,a,b)};q(Bq,iq);Bq.prototype.fh=function(a,b,c,d){return new Cq(a,b,c,d)};w("ee.layers.ImageOverlay",Bq);var Cq=function(a,b,c,d){qq.call(this,a,b,c,d);this.de=Dq;this.Ih=this.ga=this.Qd=null;this.Xc=""};q(Cq,qq);
|
|
689
|
+
Cq.prototype.Lc=function(){try{var a=zj(this.Di);this.Xc=kd(a);var b=this.Xc!==ld.toString()?this.Xc:this.Ca}catch(c){b=this.Ca}this.ga=new xq;zq(this.ga,this.la.id+"-image",b);this.Ih=ac(this.ga,Eq,function(c){"load"==c.type?(this.Qd=c.target,qq.prototype.Lc.call(this)):this.gd()},void 0,this);this.ga.start()};Cq.prototype.Hc=function(){qq.prototype.Hc.call(this);this.ga&&(jc(this.Ih),Ha(this.ga))};Cq.prototype.J=function(){qq.prototype.J.call(this);this.Xc&&URL.revokeObjectURL(this.Xc)};
|
|
690
|
+
var Dq=function(a){a.la.appendChild(a.Qd)},Eq=["load","abort","error"];var Fq=function(a){for(var b=arguments[0],c=1;c<arguments.length;c++){var d=arguments[c];if(0==d.lastIndexOf("/",0))b=d;else{var e;(e=""==b)||(e=b.length-1,e=0<=e&&b.indexOf("/",e)==e);b=e?b+d:b+("/"+d)}}return b};var Gq=function(a,b,c,d){y.call(this);this.Sg=a;this.Zb=b;this.pg=d||"";this.Xd=c};q(Gq,uq);Gq.prototype.If=function(a){if(a.zoom<=this.Xd)a.Ca=this.Ld(a.rb,a.zoom);else{var b=a.zoom-this.Xd,c=Math.pow(2,b);c=new google.maps.Point(Math.floor(a.rb.x/c),Math.floor(a.rb.y/c));a.Ca=this.Ld(c,a.zoom-b);a.de=Fa(Hq,this.Xd)}var d=u(a.gd,a);a.gd=u(function(e){e&&(e.includes("The specified key does not exist.")||e.includes("AccessDenied"))?rq(a,"loaded"):d(e)},a);sq(a)};
|
|
691
|
+
Gq.prototype.getUniqueId=function(){return[this.Sg,this.Zb,this.Xd,this.pg].join("-")};Gq.prototype.Ld=function(a,b){a=Fq("https://storage.googleapis.com",this.Sg,this.Zb,String(b),String(a.x),String(a.y));this.pg&&(a+=this.pg);return a};
|
|
692
|
+
var Hq=function(a,b){if(!b.Qd)throw Error("Tile must have an image element to be rendered.");a=Math.pow(2,b.zoom-a);var c=b.tileSize.width,d=b.la.ownerDocument.createElement("canvas");d.setAttribute("width",c);d.setAttribute("height",c);b.la.appendChild(d);d=d.getContext("2d");d.imageSmoothingEnabled=!1;d.mozImageSmoothingEnabled=!1;d.webkitImageSmoothingEnabled=!1;d.drawImage(b.Qd,c/a*(b.rb.x%a),c/a*(b.rb.y%a),c/a,c/a,0,0,c,c)};w("ee.layers.CloudStorageTileSource",Gq);var Iq=function(){this.La=[];this.Qa=[]};h=Iq.prototype;h.enqueue=function(a){this.Qa.push(a)};h.Jc=function(){0===this.La.length&&(this.La=this.Qa,this.La.reverse(),this.Qa=[]);return this.La.pop()};h.R=function(){return this.La.length+this.Qa.length};h.isEmpty=function(){return 0===this.La.length&&0===this.Qa.length};h.clear=function(){this.La=[];this.Qa=[]};h.contains=function(a){return $a(this.La,a)||$a(this.Qa,a)};
|
|
693
|
+
h.remove=function(a){var b=this.La;var c=Ta(b,a);0<=c?(bb(b,c),b=!0):b=!1;return b||ab(this.Qa,a)};h.aa=function(){for(var a=[],b=this.La.length-1;0<=b;--b)a.push(this.La[b]);var c=this.Qa.length;for(b=0;b<c;++b)a.push(this.Qa[b]);return a};var Jq=function(a,b){y.call(this);this.Wh=a||0;this.Wd=b||10;if(this.Wh>this.Wd)throw Error("[goog.structs.Pool] Min can not be greater than max");this.Ta=new Iq;this.vb=new Ic;this.delay=0;this.Gf=null;this.rd()};x(Jq,y);Jq.prototype.Oc=function(){var a=Date.now();if(!(null!=this.Gf&&a-this.Gf<this.delay)){for(var b;0<this.Ta.R()&&(b=this.Ta.Jc(),!this.Sf(b));)this.rd();!b&&this.R()<this.Wd&&(b=this.bf());b&&(this.Gf=a,this.vb.add(b));return b}};
|
|
694
|
+
var Kq=function(a,b){return a.vb.remove(b)?(a.Ne(b),!0):!1};h=Jq.prototype;h.Ne=function(a){this.vb.remove(a);this.Sf(a)&&this.R()<this.Wd?this.Ta.enqueue(a):this.Cd(a)};h.rd=function(){for(var a=this.Ta;this.R()<this.Wh;)a.enqueue(this.bf());for(;this.R()>this.Wd&&0<this.Ta.R();)this.Cd(a.Jc())};h.bf=function(){return{}};h.Cd=function(a){if("function"==typeof a.Ra)a.Ra();else for(var b in a)a[b]=null};h.Sf=function(a){return"function"==typeof a.Pk?a.Pk():!0};
|
|
695
|
+
h.contains=function(a){return this.Ta.contains(a)||this.vb.contains(a)};h.R=function(){return this.Ta.R()+this.vb.R()};h.isEmpty=function(){return this.Ta.isEmpty()&&this.vb.isEmpty()};h.J=function(){Jq.L.J.call(this);if(0<this.vb.R())throw Error("[goog.structs.Pool] Objects not released");delete this.vb;for(var a=this.Ta;!a.isEmpty();)this.Cd(a.Jc());delete this.Ta};var Lq=function(a,b){this.Nh=a;this.ue=b};Lq.prototype.getKey=function(){return this.Nh};Lq.prototype.clone=function(){return new Lq(this.Nh,this.ue)};var Mq=function(a){this.Aa=[];if(a)a:{if(a instanceof Mq){var b=a.tb();a=a.aa();if(0>=this.R()){for(var c=this.Aa,d=0;d<b.length;d++)c.push(new Lq(b[d],a[d]));break a}}else b=Lb(a),a=Kb(a);for(c=0;c<b.length;c++)Nq(this,b[c],a[c])}},Nq=function(a,b,c){var d=a.Aa;d.push(new Lq(b,c));b=d.length-1;a=a.Aa;for(c=a[b];0<b;)if(d=b-1>>1,a[d].getKey()>c.getKey())a[b]=a[d],b=d;else break;a[b]=c};h=Mq.prototype;
|
|
696
696
|
h.remove=function(){var a=this.Aa,b=a.length,c=a[0];if(!(0>=b)){if(1==b)a.length=0;else{a[0]=a.pop();a=0;b=this.Aa;for(var d=b.length,e=b[a];a<d>>1;){var g=2*a+1,f=2*a+2;g=f<d&&b[f].getKey()<b[g].getKey()?f:g;if(b[g].getKey()>e.getKey())break;b[a]=b[g];a=g}b[a]=e}return c.ue}};h.aa=function(){for(var a=this.Aa,b=[],c=a.length,d=0;d<c;d++)b.push(a[d].ue);return b};h.tb=function(){for(var a=this.Aa,b=[],c=a.length,d=0;d<c;d++)b.push(a[d].getKey());return b};
|
|
697
|
-
h.Ic=function(a){return this.Aa.some(function(b){return b.ue==a})};h.Pb=function(a){return this.Aa.some(function(b){return b.getKey()==a})};h.clone=function(){return new
|
|
698
|
-
h.J=function(){
|
|
699
|
-
|
|
700
|
-
|
|
701
|
-
w("ee.MapTileManager",
|
|
702
|
-
h.retry=function(){if(this.Kg>this.kl)return!1;this.Kg++;
|
|
703
|
-
h.Bl=function(){if(!this.kc){var a=u(function(d){this.kc||(
|
|
704
|
-
h.Oi=null;h.Ja=null;h.ni=null;var
|
|
705
|
-
h.getTile=function(a,b,c){if(b<this.minZoom||0>a.y||a.y>=1<<b)return a=c.createElement("IMG"),a.style.width="0px",a.style.height="0px",a;b=Oc(this,a,b);a=[this.url,b].join("/")+"?token="+this.token;this.ua&&this.ua.isEnabled()&&(a+="&profiling=1");b=[b,this.yb,this.token].join("/");this.yb+=1;c=lh("DIV",{id:b});var d=(new Date).getTime()/1E3;this.Ab.push(b);
|
|
706
|
-
h.releaseTile=function(a){
|
|
707
|
-
h.Yk=function(a,b,c,d){"error"==c.type?(ab(this.Ab,b),this.vg.add(b),this.dispatchEvent(c)):(ab(this.Ab,b),c.target&&"load"==c.type&&(c=c.target,this.wg.add(c),1!=this.Tf&&
|
|
708
|
-
c=[["name","
|
|
709
|
-
"collection opt_description
|
|
710
|
-
"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(" "),"
|
|
711
|
-
|
|
712
|
-
["
|
|
713
|
-
"
|
|
714
|
-
"
|
|
715
|
-
["
|
|
716
|
-
"
|
|
717
|
-
"
|
|
718
|
-
|
|
719
|
-
["
|
|
720
|
-
|
|
721
|
-
|
|
697
|
+
h.Ic=function(a){return this.Aa.some(function(b){return b.ue==a})};h.Pb=function(a){return this.Aa.some(function(b){return b.getKey()==a})};h.clone=function(){return new Mq(this)};h.R=function(){return this.Aa.length};h.isEmpty=function(){return 0===this.Aa.length};h.clear=function(){this.Aa.length=0};var Oq=function(){Mq.apply(this,arguments)};q(Oq,Mq);Oq.prototype.enqueue=function(a,b){Nq(this,a,b)};Oq.prototype.Jc=function(){return this.remove()};var Pq=function(a,b){this.ph=void 0;this.ge=new Oq;Jq.call(this,a,b)};x(Pq,Jq);h=Pq.prototype;h.Oc=function(a,b){if(!a)return(a=Pq.L.Oc.call(this))&&this.delay&&(this.ph=r.setTimeout(u(this.Nd,this),this.delay)),a;this.ge.enqueue(void 0!==b?b:100,a);this.Nd()};h.Nd=function(){for(var a=this.ge;0<a.R();){var b=this.Oc();if(b)a.Jc().apply(this,[b]);else break}};h.Ne=function(a){Pq.L.Ne.call(this,a);this.Nd()};h.rd=function(){Pq.L.rd.call(this);this.Nd()};
|
|
698
|
+
h.J=function(){Pq.L.J.call(this);r.clearTimeout(this.ph);this.ge.clear();this.ge=null};var Qq=function(a,b){y.call(this);this.Jf=a;this.ua=b||null};q(Qq,uq);Qq.prototype.If=function(a,b){var c=bc(a,"status-changed",function(){switch(a.getStatus()){case "loaded":var e=a.Al["x-earth-engine-computation-profile"];this.ua&&e&&this.ua.Mk(a.la.id,e);break;case "failed":case "aborted":this.ua&&""!==a.la.id&&this.ua.sl(a.la.id),jc(c)}},void 0,this);a.Ca=this.Ld(a.rb,a.zoom);var d=u(this.zf,this,a);Rq().Oc(d,b)};Qq.prototype.getUniqueId=function(){return this.Jf.mapid+"-"+this.Jf.token};
|
|
699
|
+
Qq.prototype.zf=function(a,b){var c=Rq();if(a.Sa||"aborted"==a.getStatus())Kq(c,b);else{var d=bc(a,"status-changed",function(){a.ke in tq&&(jc(d),Kq(c,b))});sq(a)}};Qq.prototype.Ld=function(a,b){a=Yl(this.Jf,a.x,a.y,b);return this.ua&&this.ua.isEnabled()?a+"&profiling=1":a};var Rq=function(){Sq||(Sq=new Pq(0,4));return Sq};w("ee.layers.EarthEngineTileSource",Qq);var Sq=null;var Tq=function(a){y.call(this);this.Mi=a};q(Tq,uq);Tq.prototype.If=function(a){a.Ca=this.Mi.formatTileUrl(a.rb.x,a.rb.y,a.zoom);sq(a)};Tq.prototype.getUniqueId=function(){return this.Mi.token};w("ee.layers.FeatureViewTileSource",Tq);var Vq=function(){D.call(this);this.pe=new Uq(0,60);this.wc=new zc};q(Vq,D);Vq.prototype.send=function(a,b,c,d,e){if(this.wc.get(a))throw Error("[ee.MapTileManager] ID in use");b=new Wq(a,b,d,u(this.si,this),void 0!==e?e:1);this.wc.set(a,b);a=u(this.zf,this,b);this.pe.Oc(a,c);return b};Vq.prototype.abort=function(a){if(a=this.wc.get(a))a.kc||(a.kc=!0,a.Ja=new A("abort")),this.si(a)};
|
|
700
|
+
Vq.prototype.zf=function(a,b){if(a.ga||a.kc)Xq(this,b);else if(a.Oi=b,b.setActive(!0),b=new xq,a.ga=b,!a.retry())throw Error("Cannot dispatch first request!");};Vq.prototype.si=function(a){this.wc.remove(a.getId());a.ga&&(Xq(this,a.Oi),a.ga.Ra());a.Af&&a.Af(a.Ja,a.ni)};var Xq=function(a,b){b.setActive(!1);if(!Kq(a.pe,b))throw Error("Object not released");};Vq.prototype.J=function(){D.prototype.J.call(this);this.pe.Ra();this.pe=null;var a=this.wc;Ua(a.aa(),function(b){b.Ra()});a.clear();this.wc=null};
|
|
701
|
+
w("ee.MapTileManager",Vq);var Wq=function(a,b,c,d,e){y.call(this);this.fa=a;this.Gl=b;this.kl=void 0!==e?e:1;this.Af=c;this.bc=d};q(Wq,y);h=Wq.prototype;h.getId=function(){return this.fa};h.getUrl=function(){return this.Gl};h.Zk=function(a){if(this.kc)this.bc&&this.bc(this);else switch(a.type){case "load":this.Ja=a;this.bc&&this.bc(this);break;case "error":case "abort":this.retry()||(this.Ja=a,this.bc&&this.bc(this))}};h.J=function(){y.prototype.J.call(this);delete this.Af;delete this.bc};
|
|
702
|
+
h.retry=function(){if(this.Kg>this.kl)return!1;this.Kg++;Aq(this.ga,this.fa);setTimeout(u(this.Bl,this),0);return!0};
|
|
703
|
+
h.Bl=function(){if(!this.kc){var a=u(function(d){this.kc||(zq(this.ga,this.fa,d),ac(this.ga,Yq,u(this.Zk,this)),this.ga.start())},this),b=this.getUrl();if(Ld(b).Ba.Pb("profiling")){var c=new $i;c.xc="blob";c.Xa("complete",u(function(){this.ni=c.getResponseHeader("X-Earth-Engine-Computation-Profile")||null;if(200<=c.getStatus()&&300>c.getStatus())try{var d=kd(zj(kj(c)));var e=d!==ld.toString()}catch(g){}a(e?d:b)},this));c.Vc("ready",u(c.Ra,c));c.send(b,"GET")}else a(b)}};h.Kg=0;h.kc=!1;h.ga=null;
|
|
704
|
+
h.Oi=null;h.Ja=null;h.ni=null;var Yq=["load","abort","error"],Zq=function(){y.call(this);this.Ea=!1};q(Zq,y);Zq.prototype.setActive=function(a){this.Ea=a};Zq.prototype.isActive=function(){return this.Ea};var Uq=function(a,b){Pq.call(this,a,b)};q(Uq,Pq);Uq.prototype.bf=function(){return new Zq};Uq.prototype.Cd=function(a){a.Ra()};Uq.prototype.Sf=function(a){return!a.Sa&&!a.isActive()};var $q=function(a,b,c,d,e){Nc.call(this,a,b,c,d,e);this.minZoom=d.minZoom||0;this.maxZoom=d.maxZoom||20;if(!window.google||!window.google.maps)throw Error("Google Maps API hasn't been initialized.");this.tileSize=d.tileSize||new google.maps.Size(256,256);this.name=d.name;this.wg=new Ic;this.Tf=1;this.ua=e||null};q($q,Nc);h=$q.prototype;h.Oe=function(a){return bc(this,"tileevent",a)};h.bg=function(a){jc(a)};
|
|
705
|
+
h.getTile=function(a,b,c){if(b<this.minZoom||0>a.y||a.y>=1<<b)return a=c.createElement("IMG"),a.style.width="0px",a.style.height="0px",a;b=Oc(this,a,b);a=[this.url,b].join("/")+"?token="+this.token;this.ua&&this.ua.isEnabled()&&(a+="&profiling=1");b=[b,this.yb,this.token].join("/");this.yb+=1;c=lh("DIV",{id:b});var d=(new Date).getTime()/1E3;this.Ab.push(b);Ol(Vq).send(b,a,d,u(this.Yk,this,c,b));Xp(this);return c};h.Nc=function(){return this.Ab.length};
|
|
706
|
+
h.releaseTile=function(a){Ol(Vq).abort(a.id);if(void 0!==a.firstElementChild)var b=a.firstElementChild;else for(b=a.firstChild;b&&1!=b.nodeType;)b=b.nextSibling;this.wg.remove(b);""!==a.id&&(this.vg.remove(a.id),this.ua&&this.ua.sl(a.id))};h.setOpacity=function(a){this.Tf=a;var b=this.wg.Da();uc(b,function(c){hq(c,a)})};
|
|
707
|
+
h.Yk=function(a,b,c,d){"error"==c.type?(ab(this.Ab,b),this.vg.add(b),this.dispatchEvent(c)):(ab(this.Ab,b),c.target&&"load"==c.type&&(c=c.target,this.wg.add(c),1!=this.Tf&&hq(c,this.Tf),a.appendChild(c)),Xp(this));this.ua&&null!==d&&this.ua.Mk(b,d)};w("ee.MapLayerOverlay",$q);$q.prototype.removeTileCallback=$q.prototype.bg;$q.prototype.addTileCallback=$q.prototype.Oe;$q.prototype.getTile=$q.prototype.getTile;$q.prototype.setOpacity=$q.prototype.setOpacity;$q.prototype.releaseTile=$q.prototype.releaseTile;(function(){var a={},b="ee.ApiFunction._apply ee.ApiFunction.lookup ee.ApiFunction._call ee.batch.Export.classifier.toAsset ee.batch.Export.table.toDrive ee.batch.Export.image.toCloudStorage ee.batch.Export.table.toCloudStorage ee.batch.Export.table.toFeatureView ee.batch.Export.videoMap.toCloudStorage ee.batch.Export.image.toDrive ee.batch.Export.table.toBigQuery ee.batch.Export.map.toCloudStorage ee.batch.Export.image.toAsset ee.batch.Export.table.toAsset ee.batch.Export.video.toCloudStorage ee.batch.Export.video.toDrive ee.Collection.prototype.filterDate ee.Collection.prototype.filter ee.Collection.prototype.map ee.Collection.prototype.iterate ee.Collection.prototype.limit ee.Collection.prototype.sort ee.Collection.prototype.filterBounds ee.Collection.prototype.filterMetadata ee.ComputedObject.prototype.aside ee.ComputedObject.prototype.evaluate ee.ComputedObject.prototype.getInfo ee.ComputedObject.prototype.serialize ee.data.getAssetRoots ee.data.getAsset ee.data.listFeatures ee.data.createAssetHome ee.data.getOperation ee.data.setDefaultWorkloadTag ee.data.authenticateViaPrivateKey ee.data.getInfo ee.data.createAsset ee.data.resetWorkloadTag ee.data.newTaskId ee.data.computeValue ee.data.updateAsset ee.data.cancelTask ee.data.getThumbId ee.data.getVideoThumbId ee.data.getTaskStatus ee.data.startIngestion ee.data.createFolder ee.data.setAssetAcl ee.data.updateTask ee.data.getList ee.data.getFilmstripThumbId ee.data.startProcessing ee.data.renameAsset ee.data.authenticateViaOauth ee.data.listAssets ee.data.makeThumbUrl ee.data.setAssetProperties ee.data.getMapId ee.data.getTaskList ee.data.copyAsset ee.data.getAssetRootQuota ee.data.authenticate ee.data.getTileUrl ee.data.getDownloadId ee.data.listImages ee.data.setWorkloadTag ee.data.deleteAsset ee.data.startTableIngestion ee.data.makeDownloadUrl ee.data.getTaskListWithLimit ee.data.listOperations ee.data.getWorkloadTag ee.data.listBuckets ee.data.getAssetAcl ee.data.getFeatureViewTilesKey ee.data.cancelOperation ee.data.getTableDownloadId ee.data.authenticateViaPopup ee.data.makeTableDownloadUrl ee.Date ee.Deserializer.fromJSON ee.Deserializer.decodeCloudApi ee.Deserializer.fromCloudApiJSON ee.Deserializer.decode ee.Dictionary ee.InitState ee.apply ee.TILE_SIZE ee.Algorithms ee.call ee.reset ee.initialize ee.Element.prototype.set ee.Encodable.SourceFrame ee.Feature ee.Feature.prototype.getInfo ee.Feature.prototype.getMapId ee.Feature.prototype.getMap ee.FeatureCollection.prototype.getMap ee.FeatureCollection ee.FeatureCollection.prototype.getDownloadURL ee.FeatureCollection.prototype.getMapId ee.FeatureCollection.prototype.getInfo ee.FeatureCollection.prototype.select ee.Filter.eq ee.Filter ee.Filter.bounds ee.Filter.metadata ee.Filter.and ee.Filter.inList ee.Filter.gt ee.Filter.prototype.not ee.Filter.lt ee.Filter.or ee.Filter.neq ee.Filter.lte ee.Filter.gte ee.Filter.date ee.Function.prototype.call ee.Function.prototype.apply ee.Geometry.BBox ee.Geometry.LineString ee.Geometry.prototype.toGeoJSONString ee.Geometry.MultiPoint ee.Geometry.Polygon ee.Geometry.MultiPolygon ee.Geometry ee.Geometry.Rectangle ee.Geometry.Point ee.Geometry.prototype.serialize ee.Geometry.MultiLineString ee.Geometry.LinearRing ee.Geometry.prototype.toGeoJSON ee.Image.prototype.select ee.Image.prototype.getThumbURL ee.Image.rgb ee.Image.prototype.getInfo ee.Image.prototype.getMapId ee.Image.prototype.clip ee.Image.prototype.getMap ee.Image.prototype.expression ee.Image ee.Image.prototype.getDownloadURL ee.Image.prototype.getThumbId ee.Image.cat ee.Image.prototype.rename ee.ImageCollection.prototype.getMap ee.ImageCollection.prototype.first ee.ImageCollection.prototype.getVideoThumbURL ee.ImageCollection.prototype.getInfo ee.ImageCollection.prototype.select ee.ImageCollection.prototype.linkCollection ee.ImageCollection.prototype.getMapId ee.ImageCollection ee.ImageCollection.prototype.getFilmstripThumbURL ee.List ee.Number ee.Serializer.toReadableJSON ee.Serializer.toReadableCloudApiJSON ee.Serializer.encodeCloudApiPretty ee.Serializer.encode ee.Serializer.toJSON ee.Serializer.toCloudApiJSON ee.Serializer.encodeCloudApi ee.String ee.Terrain".split(" "),
|
|
708
|
+
c=[["name","namedArgs"],["name"],["name","var_args"],["classifier","opt_description","opt_assetId"],"collection opt_description opt_folder opt_fileNamePrefix opt_fileFormat opt_selectors opt_maxVertices".split(" "),"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_bucket opt_fileNamePrefix opt_fileFormat opt_selectors opt_maxVertices".split(" "),
|
|
709
|
+
"collection opt_description opt_assetId opt_maxFeaturesPerTile opt_thinningStrategy opt_thinningRanking opt_zOrderRanking".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(" "),"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(" "),
|
|
710
|
+
"collection opt_description opt_table opt_overwrite opt_append opt_selectors opt_maxVertices".split(" "),"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(" "),"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_assetId","opt_maxVertices"],
|
|
711
|
+
"collection opt_description opt_bucket opt_fileNamePrefix opt_framesPerSecond opt_dimensions opt_region opt_scale opt_crs opt_crsTransform opt_maxPixels opt_maxFrames".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(" "),["start","opt_end"],["filter"],["algorithm","opt_dropNulls"],["algorithm","opt_first"],["max","opt_property","opt_ascending"],["property","opt_ascending"],
|
|
712
|
+
["geometry"],["name","operator","value"],["func","var_args"],["callback"],["opt_callback"],["legacy"],["opt_callback"],["id","opt_callback"],["asset","params","opt_callback"],["requestedId","opt_callback"],["operationName","opt_callback"],["tag"],["privateKey","opt_success","opt_error","opt_extraScopes","opt_suppressDefaultScopes"],["id","opt_callback"],["value","opt_path","opt_force","opt_properties","opt_callback"],["opt_resetDefault"],["opt_count","opt_callback"],["obj","opt_callback"],["assetId",
|
|
713
|
+
"asset","updateFields","opt_callback"],["taskId","opt_callback"],["params","opt_callback"],["params","opt_callback"],["taskId","opt_callback"],["taskId","request","opt_callback"],["path","opt_force","opt_callback"],["assetId","aclUpdate","opt_callback"],["taskId","action","opt_callback"],["params","opt_callback"],["params","opt_callback"],["taskId","params","opt_callback"],["sourceId","destinationId","opt_callback"],"clientId success opt_error opt_extraScopes opt_onImmediateFailed opt_suppressDefaultScopes".split(" "),
|
|
714
|
+
["parent","opt_params","opt_callback"],["id"],["assetId","properties","opt_callback"],["params","opt_callback"],["opt_callback"],["sourceId","destinationId","opt_overwrite","opt_callback"],["rootId","opt_callback"],["clientId","success","opt_error","opt_extraScopes","opt_onImmediateFailed"],["id","x","y","z"],["params","opt_callback"],["parent","opt_params","opt_callback"],["tag"],["assetId","opt_callback"],["taskId","request","opt_callback"],["id"],["opt_limit","opt_callback"],["opt_limit","opt_callback"],
|
|
715
|
+
[],["project","opt_callback"],["assetId","opt_callback"],["params","opt_callback"],["operationName","opt_callback"],["params","opt_callback"],["opt_success","opt_error"],["id"],["date","opt_tz"],["json"],["json"],["json"],["json"],["opt_dict"],[],["func","namedArgs"],[],[],["func","var_args"],[],"opt_baseurl opt_tileurl opt_successCallback opt_errorCallback opt_xsrfToken opt_project".split(" "),["var_args"],[],["geometry","opt_properties"],["opt_callback"],["opt_visParams","opt_callback"],["opt_visParams",
|
|
716
|
+
"opt_callback"],["opt_visParams","opt_callback"],["args","opt_column"],["opt_format","opt_selectors","opt_filename","opt_callback"],["opt_visParams","opt_callback"],["opt_callback"],["propertySelectors","opt_newProperties","opt_retainGeometry"],["name","value"],["opt_filter"],["geometry","opt_errorMargin"],["name","operator","value"],["var_args"],["opt_leftField","opt_rightValue","opt_rightField","opt_leftValue"],["name","value"],[],["name","value"],["var_args"],["name","value"],["name","value"],
|
|
717
|
+
["name","value"],["start","opt_end"],["var_args"],["namedArgs"],["west","south","east","north"],["coords","opt_proj","opt_geodesic","opt_maxError"],[],["coords","opt_proj"],["coords","opt_proj","opt_geodesic","opt_maxError","opt_evenOdd"],["coords","opt_proj","opt_geodesic","opt_maxError","opt_evenOdd"],["geoJson","opt_proj","opt_geodesic","opt_evenOdd"],["coords","opt_proj","opt_geodesic","opt_evenOdd"],["coords","opt_proj"],["legacy"],["coords","opt_proj","opt_geodesic","opt_maxError"],["coords",
|
|
718
|
+
"opt_proj","opt_geodesic","opt_maxError"],[],["var_args"],["params","opt_callback"],["r","g","b"],["opt_callback"],["opt_visParams","opt_callback"],["geometry"],["opt_visParams","opt_callback"],["expression","opt_map"],["opt_args"],["params","opt_callback"],["params","opt_callback"],["var_args"],["var_args"],["opt_visParams","opt_callback"],[],["params","opt_callback"],["opt_callback"],["selectors","opt_names"],["imageCollection","opt_linkedBands","opt_linkedProperties","opt_matchPropertyName"],["opt_visParams",
|
|
719
|
+
"opt_callback"],["args"],["params","opt_callback"],["list"],["number"],["obj"],["obj"],["obj"],["obj","opt_isCompound"],["obj"],["obj"],["obj"],["string"],[]];[sn,rn,P,cp,Wo,So,Vo,Yo,bp,To,Zo,Uo,Qo,Xo,$o,ap,W.prototype.nf,W.prototype.filter,W.prototype.map,W.prototype.Mh,W.prototype.limit,W.prototype.sort,W.prototype.xh,W.prototype.pf,N.prototype.Gg,N.prototype.evaluate,N.prototype.V,N.prototype.va,Om,Im,$l,Pm,sm,bn,Sl,Im,Qm,cn,km,am,Wm,um,bm,cm,nm,Fm,Rm,Xm,tm,Km,dm,Bm,Sm,Ql,Lm,em,Ym,Xl,pm,Tm,Zm,
|
|
720
|
+
Rl,Yl,gm,Mm,an,Um,Hm,hm,om,qm,Vl,Nm,Vm,Zl,rm,im,Pl,jm,tp,xp,yp,Cp,wp,Dp,Qp,Sp,256,Op,Rp,Pp,Mp,T.prototype.set,nk,X,X.prototype.V,X.prototype.S,X.prototype.getMap,Y.prototype.getMap,Y,Y.prototype.sb,Y.prototype.S,Y.prototype.V,Y.prototype.select,fo,V,po,qo,lo,oo,jo,V.prototype.sc,ho,mo,go,ko,io,no,mn.prototype.call,mn.prototype.apply,Qn,Tn,U.prototype.yg,On,Wn,Xn,U,Pn,Ln,U.prototype.va,Vn,Un,U.prototype.oe,M.prototype.select,M.prototype.xf,Do,M.prototype.V,M.prototype.S,M.prototype.clip,M.prototype.getMap,
|
|
721
|
+
M.prototype.l,M,M.prototype.sb,M.prototype.Kd,Eo,M.prototype.ti,Z.prototype.getMap,Z.prototype.first,Z.prototype.yf,Z.prototype.V,Z.prototype.select,Z.prototype.Hf,Z.prototype.S,Z,Z.prototype.vf,Fo,jp,ll,ul,sl,il,jl,tl,ol,mp,Gp].forEach(function(d,e){d&&(a[d.toString()]={name:b[e],paramNames:c[e]})});r.EXPORTED_FN_INFO=a})();}).call(this);
|