(function(){var h,aa=function(a){var b=0;return function(){return bc&&(c=Math.max(c+e,0));c>>0),xa=0,ya=function(a,b,c){return a.call.apply(a.bind,arguments)},za=function(a,b,c){if(!a)throw Error();if(2c&&(c=Math.max(0,a.length+c));if(n(a))return n(b)&&1==b.length?a.lastIndexOf(b,c):-1;for(;0<=c;c--)if(c in a&&a[c]===b)return c;return-1},Oa=Array.prototype.forEach?function(a,b,c){z(null!=a.length);Array.prototype.forEach.call(a,b,c)}:function(a,b,c){for(var d=a.length,e=n(a)?a.split(""):a,f=0;fb?null:n(a)?a.charAt(b):a[b]},Wa=function(a,b){return 0<=Ma(a,b)},Xa=function(a){if(!p(a))for(var b=a.length-1;0<=b;b--)delete a[b];a.length=0},Za= function(a,b){b=Ma(a,b);var c;(c=0<=b)&&Ya(a,b);return c},Ya=function(a,b){z(null!=a.length);Array.prototype.splice.call(a,b,1)},$a=function(a){return Array.prototype.concat.apply([],arguments)},ab=function(a){var b=a.length;if(0=arguments.length?Array.prototype.slice.call(a,b):Array.prototype.slice.call(a,b,c)},db=function(a){for(var b={},c=0,d=0;d")&&(a=a.replace(jb,">"));-1!=a.indexOf('"')&&(a=a.replace(kb,"""));-1!= a.indexOf("'")&&(a=a.replace(lb,"'"));-1!=a.indexOf("\x00")&&(a=a.replace(mb,"�"));return a},hb=/&/g,ib=//g,kb=/"/g,lb=/'/g,mb=/\x00/g,gb=/[\x00&<>"']/,ob=function(a,b){return ab?1:0},pb=function(a){var b=1;a=a.split(":");for(var c=[];0parseFloat(Tb)){Sb=String(Vb);break a}}Sb=Tb} var Wb=Sb,Kb={},Xb=function(a){return Lb(a,function(){for(var b=0,c=fb(String(Wb)).split("."),d=fb(String(a)).split("."),e=Math.max(c.length,d.length),f=0;0==b&&f=a.keyCode)a.keyCode=-1}catch(b){}};var fc="closure_listenable_"+(1E6*Math.random()|0),gc=function(a){return!(!a||!a[fc])},hc=0;var ic=function(a,b,c,d,e){this.listener=a;this.Tb=null;this.src=b;this.type=c;this.capture=!!d;this.ja=e;this.key=++hc;this.Ta=this.zb=!1},jc=function(a){a.Ta=!0;a.listener=null;a.Tb=null;a.src=null;a.ja=null};var kc=function(a){this.src=a;this.G={};this.ub=0};kc.prototype.add=function(a,b,c,d,e){var f=a.toString();a=this.G[f];a||(a=this.G[f]=[],this.ub++);var g=lc(a,b,d,e);-1c.keyCode||void 0!=c.returnValue)){a:{var e=!1;if(0==c.keyCode)try{c.keyCode= -1;break a}catch(g){e=!0}if(e||void 0==c.returnValue)c.returnValue=!0}c=[];for(e=b.currentTarget;e;e=e.parentNode)c.push(e);a=a.type;for(e=c.length-1;!b.Ca&&0<=e;e--){b.currentTarget=c[e];var f=Cc(c[e],a,!0,b);d=d&&f}for(e=0;!b.Ca&&e>>0),sc=function(a){z(a,"Listener can not be null.");if(q(a))return a;z(a.handleEvent, "An object listener must have handleEvent method.");a[Dc]||(a[Dc]=function(b){return a.handleEvent(b)});return a[Dc]};var A=function(){x.call(this);this.X=new kc(this);this.le=this;this.Tc=null};w(A,x);A.prototype[fc]=!0;h=A.prototype;h.addEventListener=function(a,b,c,d){rc(this,a,b,c,d)};h.removeEventListener=function(a,b,c,d){zc(this,a,b,c,d)}; h.dispatchEvent=function(a){Ec(this);var b=this.Tc;if(b){var c=[];for(var d=1;b;b=b.Tc)c.push(b),z(1E3>++d,"infinite loop")}b=this.le;d=a.type||a;if(n(a))a=new y(a,b);else if(a instanceof y)a.target=a.target||b;else{var e=a;a=new y(d,b);Ib(a,e)}e=!0;if(c)for(var f=c.length-1;!a.Ca&&0<=f;f--){var g=a.currentTarget=c[f];e=Fc(g,d,!0,a)&&e}a.Ca||(g=a.currentTarget=b,e=Fc(g,d,!0,a)&&e,a.Ca||(e=Fc(g,d,!1,a)&&e));if(c)for(f=0;!a.Ca&&f=a.length)throw Hc;if(b in a)return a[b++];b++}};return c}throw Error("Not implemented");},Kc=function(a,b){if(va(a))try{Oa(a,b,void 0)}catch(c){if(c!==Hc)throw c;}else{a=Jc(a);try{for(;;)b.call(void 0,a.next(),void 0,a)}catch(c){if(c!==Hc)throw c;}}};var B=function(a,b){this.s={};this.i=[];this.vb=this.l=0;var c=arguments.length;if(12*this.l&&Lc(this),!0):!1};var Lc=function(a){if(a.l!=a.i.length){for(var b=0,c=0;b=d.i.length)throw Hc;var e=d.i[b++];return a?e:d.s[e]};return e};var Mc=function(a,b){return Object.prototype.hasOwnProperty.call(a,b)};var Oc=function(a){if(a.m&&"function"==typeof a.m)a=a.m();else if(va(a)||n(a))a=a.length;else{var b=0,c;for(c in a)b++;a=b}return a},Pc=function(a){if(a.w&&"function"==typeof a.w)return a.w();if(n(a))return a.split("");if(va(a)){for(var b=[],c=a.length,d=0;dc)return!1;!(b instanceof C)&&5e&&(e+=d);return[a.Me,c,e,b.y].join("/")};Xc.prototype.Dc=function(){return this.va.length};var Zc=function(a){y.call(this,"tileevent");this.count=a};w(Zc,y);var $c={kind:"discovery#restDescription",name:"earthengine",version:"v1",rootUrl:"https://earthengine.googleapis.com/",servicePath:"",batchPath:"batch",id:"earthengine:v1",parameters:{"$.xgafv":{location:"query",required:!1},access_token:{location:"query",required:!1},alt:{location:"query",required:!1},callback:{location:"query",required:!1},fields:{location:"query",required:!1},key:{location:"query",required:!1},oauth_token:{location:"query",required:!1},prettyPrint:{location:"query",required:!1}, quotaUser:{location:"query",required:!1},uploadType:{location:"query",required:!1},upload_protocol:{location:"query",required:!1}},resources:{algorithms:{methods:{list:{id:"earthengine.algorithms.list",path:"v1/algorithms",httpMethod:"GET"}}},assets:{methods:{copy:{id:"earthengine.assets.copy",path:"v1/assets:copy",httpMethod:"POST",request:{$ref:"CopyAssetRequest"}},create:{id:"earthengine.assets.create",path:"v1/assets",httpMethod:"POST",request:{$ref:"EarthEngineAsset"}},"delete":{id:"earthengine.assets.delete", path:"v1/{+name}",httpMethod:"DELETE",parameters:{name:{location:"path",required:!0}}},get:{id:"earthengine.assets.get",path:"v1/{+name}",httpMethod:"GET",parameters:{name:{location:"path",required:!0},path:{location:"query",required:!1}}},getPixels:{id:"earthengine.assets.getPixels",path:"v1/{+name}:getPixels",httpMethod:"POST",request:{$ref:"GetPixelsRequest"},parameters:{name:{location:"path",required:!0}}},ingestImage:{id:"earthengine.assets.ingestImage",path:"v1/assets:ingestImage",httpMethod:"POST", request:{$ref:"IngestImageRequest"}},ingestTable:{id:"earthengine.assets.ingestTable",path:"v1/assets:ingestTable",httpMethod:"POST",request:{$ref:"IngestTableRequest"}},list:{id:"earthengine.assets.list",path:"v1/{+name}:list",httpMethod:"GET",parameters:{name:{location:"path",required:!0},parentPath:{location:"query",required:!1},pageSize:{location:"query",required:!1},pageToken:{location:"query",required:!1}}},listFeatures:{id:"earthengine.assets.listFeatures",path:"v1/{+name}:listFeatures",httpMethod:"GET", parameters:{name:{location:"path",required:!0},pageSize:{location:"query",required:!1},pageToken:{location:"query",required:!1},region:{location:"query",required:!1},filter:{location:"query",required:!1}}},listImages:{id:"earthengine.assets.listImages",path:"v1/{+name}:listImages",httpMethod:"GET",parameters:{name:{location:"path",required:!0},parentPath:{location:"query",required:!1},pageSize:{location:"query",required:!1},pageToken:{location:"query",required:!1},startTime:{location:"query",required:!1}, endTime:{location:"query",required:!1},region:{location:"query",required:!1},filter:{location:"query",required:!1},view:{location:"query",required:!1}}},move:{id:"earthengine.assets.move",path:"v1/{+sourceName}:move",httpMethod:"POST",request:{$ref:"MoveAssetRequest"},parameters:{sourceName:{location:"path",required:!0}}},patch:{id:"earthengine.assets.patch",path:"v1/{+name}",httpMethod:"PATCH",request:{$ref:"UpdateAssetRequest"},parameters:{name:{location:"path",required:!0}}}}},filmstrips:{methods:{create:{id:"earthengine.filmstrips.create", path:"v1/filmstrips",httpMethod:"POST",request:{$ref:"CreateFilmstripRequest"}},getPixels:{id:"earthengine.filmstrips.getPixels",path:"v1/{+name}:getPixels",httpMethod:"GET",parameters:{name:{location:"path",required:!0}}}}},maps:{methods:{create:{id:"earthengine.maps.create",path:"v1/maps",httpMethod:"POST",request:{$ref:"CreateMapRequest"}}},resources:{tiles:{methods:{get:{id:"earthengine.maps.tiles.get",path:"v1/{+parent}/tiles/{zoom}/{x}/{y}",httpMethod:"GET",parameters:{parent:{location:"path", required:!0},zoom:{location:"path",required:!0},x:{location:"path",required:!0},y:{location:"path",required:!0}}}}}}},operations:{methods:{cancel:{id:"earthengine.operations.cancel",path:"v1/{+name}:cancel",httpMethod:"POST",request:{$ref:"CancelOperationRequest"},parameters:{name:{location:"path",required:!0}}},"delete":{id:"earthengine.operations.delete",path:"v1/{+name}",httpMethod:"DELETE",parameters:{name:{location:"path",required:!0}}},get:{id:"earthengine.operations.get",path:"v1/{+name}", httpMethod:"GET",parameters:{name:{location:"path",required:!0}}},list:{id:"earthengine.operations.list",path:"v1/{+name}",httpMethod:"GET",parameters:{name:{location:"path",required:!0},filter:{location:"query",required:!1},pageSize:{location:"query",required:!1},pageToken:{location:"query",required:!1}}}}},projects:{methods:{},resources:{assets:{methods:{copy:{id:"earthengine.projects.assets.copy",path:"v1/{+sourceName}:copy",httpMethod:"POST",request:{$ref:"CopyAssetRequest"},parameters:{sourceName:{location:"path", required:!0}}},"delete":{id:"earthengine.projects.assets.delete",path:"v1/{+name}",httpMethod:"DELETE",parameters:{name:{location:"path",required:!0}}},get:{id:"earthengine.projects.assets.get",path:"v1/{+name}",httpMethod:"GET",parameters:{name:{location:"path",required:!0},path:{location:"query",required:!1}}},getIamPolicy:{id:"earthengine.projects.assets.getIamPolicy",path:"v1/{+resource}:getIamPolicy",httpMethod:"POST",request:{$ref:"GetIamPolicyRequest"},parameters:{resource:{location:"path", required:!0}}},getPixels:{id:"earthengine.projects.assets.getPixels",path:"v1/{+name}:getPixels",httpMethod:"POST",request:{$ref:"GetPixelsRequest"},parameters:{name:{location:"path",required:!0}}},list:{id:"earthengine.projects.assets.list",path:"v1/{+name}:list",httpMethod:"GET",parameters:{name:{location:"path",required:!0},parentPath:{location:"query",required:!1},pageSize:{location:"query",required:!1},pageToken:{location:"query",required:!1}}},listFeatures:{id:"earthengine.projects.assets.listFeatures", path:"v1/{+name}:listFeatures",httpMethod:"GET",parameters:{name:{location:"path",required:!0},pageSize:{location:"query",required:!1},pageToken:{location:"query",required:!1},region:{location:"query",required:!1},filter:{location:"query",required:!1}}},listImages:{id:"earthengine.projects.assets.listImages",path:"v1/{+name}:listImages",httpMethod:"GET",parameters:{name:{location:"path",required:!0},parentPath:{location:"query",required:!1},pageSize:{location:"query",required:!1},pageToken:{location:"query", required:!1},startTime:{location:"query",required:!1},endTime:{location:"query",required:!1},region:{location:"query",required:!1},filter:{location:"query",required:!1},view:{location:"query",required:!1}}},move:{id:"earthengine.projects.assets.move",path:"v1/{+sourceName}:move",httpMethod:"POST",request:{$ref:"MoveAssetRequest"},parameters:{sourceName:{location:"path",required:!0}}},patch:{id:"earthengine.projects.assets.patch",path:"v1/{+name}",httpMethod:"PATCH",request:{$ref:"UpdateAssetRequest"}, parameters:{name:{location:"path",required:!0}}},setIamPolicy:{id:"earthengine.projects.assets.setIamPolicy",path:"v1/{+resource}:setIamPolicy",httpMethod:"POST",request:{$ref:"SetIamPolicyRequest"},parameters:{resource:{location:"path",required:!0}}},testIamPermissions:{id:"earthengine.projects.assets.testIamPermissions",path:"v1/{+resource}:testIamPermissions",httpMethod:"POST",request:{$ref:"TestIamPermissionsRequest"},parameters:{resource:{location:"path",required:!0}}}}}}},thumbnails:{methods:{create:{id:"earthengine.thumbnails.create", path:"v1/thumbnails",httpMethod:"POST",request:{$ref:"CreateThumbnailRequest"}},getPixels:{id:"earthengine.thumbnails.getPixels",path:"v1/{+name}:getPixels",httpMethod:"GET",parameters:{name:{location:"path",required:!0}}}}},v1:{methods:{computeImage:{id:"earthengine.computeImage",path:"v1:computeImage",httpMethod:"POST",request:{$ref:"ComputeImageRequest"}},computeTable:{id:"earthengine.computeTable",path:"v1:computeTable",httpMethod:"POST",request:{$ref:"ComputeTableRequest"}},computeValue:{id:"earthengine.computeValue", path:"v1:computeValue",httpMethod:"POST",request:{$ref:"ComputeValueRequest"}},exportImage:{id:"earthengine.exportImage",path:"v1:exportImage",httpMethod:"POST",request:{$ref:"ExportImageRequest"}},exportMap:{id:"earthengine.exportMap",path:"v1:exportMap",httpMethod:"POST",request:{$ref:"ExportMapRequest"}},exportTable:{id:"earthengine.exportTable",path:"v1:exportTable",httpMethod:"POST",request:{$ref:"ExportTableRequest"}},exportVideo:{id:"earthengine.exportVideo",path:"v1:exportVideo",httpMethod:"POST", request:{$ref:"ExportVideoRequest"}},exportVideoMap:{id:"earthengine.exportVideoMap",path:"v1:exportVideoMap",httpMethod:"POST",request:{$ref:"ExportVideoMapRequest"}},ingestImage:{id:"earthengine.ingestImage",path:"v1:ingestImage",httpMethod:"POST",request:{$ref:"IngestImageRequest"}},ingestTable:{id:"earthengine.ingestTable",path:"v1:ingestTable",httpMethod:"POST",request:{$ref:"IngestTableRequest"}},listBuckets:{id:"earthengine.listBuckets",path:"v1:listBuckets",httpMethod:"GET"}}}},methods:{}};var ad=function(a,b){this.Je=100;this.xe=a;this.Ue=b;this.Pb=0;this.M=null};ad.prototype.get=function(){if(0");c=c.join("")}c=a.createElement(c);d&&(n(d)?c.className=d:p(d)?c.className=d.join(" "):je(c,d));2=b.qc&&b.cancel())}this.Sd?this.Sd.call(this.vd,this):this.Yc=!0;this.Oa||ue(this,new ve(this))}};te.prototype.sd=function(a,b){this.pc=!1;we(this,a,b)}; var we=function(a,b,c){a.Oa=!0;a.S=c;a.ib=!b;xe(a)},ze=function(a){if(a.Oa){if(!a.Yc)throw new ye(a);a.Yc=!1}};te.prototype.callback=function(a){ze(this);Ae(a);we(this,!0,a)};var ue=function(a,b){ze(a);Ae(b);we(a,!1,b)},Ae=function(a){z(!(a instanceof te),"An execution sequence may not be initiated with a blocking Deferred.")},Be=function(a,b,c){z(!a.nd,"Blocking Deferreds can not be re-used");a.Xb.push([b,c,void 0]);a.Oa&&xe(a)}; te.prototype.then=function(a,b,c){var d,e,f=new qd(function(a,b){d=a;e=b});Be(this,d,function(a){a instanceof ve?f.cancel():e(a)});return f.then(a,b,c)};te.prototype.$goog_Thenable=!0; var Ce=function(a){return Ra(a.Xb,function(a){return q(a[1])})},xe=function(a){if(a.ec&&a.Oa&&Ce(a)){var b=a.ec,c=De[b];c&&(k.clearTimeout(c.J),delete De[b]);a.ec=0}a.u&&(a.u.qc--,delete a.u);b=a.S;for(var d=c=!1;a.Xb.length&&!a.pc;){var e=a.Xb.shift(),f=e[0],g=e[1];e=e[2];if(f=a.ib?g:f)try{var l=f.call(e||a.vd,b);m(l)&&(a.ib=a.ib&&(l==b||l instanceof Error),a.S=b=l);if(nd(b)||"function"===typeof k.Promise&&b instanceof k.Promise)d=!0,a.pc=!0}catch(v){b=v,a.ib=!0,Ce(a)||(c=!0)}}a.S=b;d&&(l=t(a.sd, a,!0),d=t(a.sd,a,!1),b instanceof te?(Be(b,l,d),b.nd=!0):b.then(l,d));c&&(b=new Ee(b),De[b.J]=b,a.ec=b.J)},ye=function(){Da.call(this)};w(ye,Da);ye.prototype.message="Deferred has already fired";ye.prototype.name="AlreadyCalledError";var ve=function(){Da.call(this)};w(ve,Da);ve.prototype.message="Deferred was canceled";ve.prototype.name="CanceledError";var Ee=function(a){this.J=k.setTimeout(t(this.af,this),0);this.Eb=a}; Ee.prototype.af=function(){z(De[this.J],"Cannot throw an error that is not scheduled.");delete De[this.J];throw this.Eb;};var De={};var Ie=function(a){var b={},c=b.document||document,d=Nd(a),e=document.createElement("SCRIPT"),f={ae:e,sb:void 0},g=new te(f),l=null,v=null!=b.timeout?b.timeout:5E3;0=Re(this).value)for(q(b)&&(b=b()),a=new Je(a,String(b),this.Rd),c&&(a.yd=c),c=this;c;){var d=c,e=a;if(d.Hd)for(var f=0;b=d.Hd[f];f++)b(e);c=c.getParent()}};Le.prototype.info=function(a,b){this.log(Oe,a,b)}; var Se={},Te=null,Ue=function(a){Te||(Te=new Le(""),Se[""]=Te,Te.ce(Pe));var b;if(!(b=Se[a])){b=new Le(a);var c=a.lastIndexOf("."),d=a.substr(c+1);c=Ue(a.substr(0,c));c.Ed()[d]=b;b.u=c;Se[a]=b}return b};var Ve=function(a,b){a&&a.log(Qe,b,void 0)};var We=function(a){switch(a){case 200:case 201:case 202:case 204:case 206:case 304:case 1223:return!0;default:return!1}};var Xe=function(){};Xe.prototype.qd=null;Xe.prototype.hb=function(){var a;(a=this.qd)||(a={},Ye(this)&&(a[0]=!0,a[1]=!0),a=this.qd=a);return a};var Ze=function(a,b){this.df=a;this.Re=b};w(Ze,Xe);Ze.prototype.tc=function(){return this.df()};Ze.prototype.hb=function(){return this.Re()};var $e=function(){return $e.zd.tc()};$e.he=!1;$e.hb=function(){return $e.zd.hb()};$e.lf=function(a,b){$e.be(new Ze(z(a),z(b)))};$e.be=function(a){$e.zd=a};var af=function(){};w(af,Xe);af.prototype.tc=function(){var a=Ye(this);return a?new ActiveXObject(a):new XMLHttpRequest}; var Ye=function(a){if($e.he)return"";if(!a.Id&&"undefined"==typeof XMLHttpRequest&&"undefined"!=typeof ActiveXObject){for(var b=["MSXML2.XMLHTTP.6.0","MSXML2.XMLHTTP.3.0","MSXML2.XMLHTTP","Microsoft.XMLHTTP"],c=0;cb)throw Error("Bad port number "+b);a.Sa=b}else a.Sa=null}; sf.prototype.getPath=function(){return this.ka};sf.prototype.setPath=function(a,b){uf(this);this.ka=b?xf(a,!0):a;return this};var wf=function(a,b,c){uf(a);b instanceof yf?(a.V=b,a.V.Xc(a.T)):(c||(b=zf(b,Ef)),a.V=new yf(b,a.T))};sf.prototype.getQuery=function(){return this.V.toString()};sf.prototype.removeParameter=function(a){uf(this);this.V.remove(a);return this};var uf=function(a){if(a.He)throw Error("Tried to modify a read-only Uri");};sf.prototype.Xc=function(a){this.T=a;this.V&&this.V.Xc(a)}; var Ff=function(a){return a instanceof sf?a.clone():new sf(a,void 0)},xf=function(a,b){return a?b?decodeURI(a.replace(/%25/g,"%2525")):decodeURIComponent(a):""},zf=function(a,b,c){return n(a)?(a=encodeURI(a).replace(b,Gf),c&&(a=a.replace(/%25([0-9a-fA-F]{2})/g,"%$1")),a):null},Gf=function(a){a=a.charCodeAt(0);return"%"+(a>>4&15).toString(16)+(a&15).toString(16)},Af=/[#\/\?@]/g,Cf=/[#\?:]/g,Bf=/[#\?]/g,Ef=/[#\?@]/g,Df=/#/g,yf=function(a,b){this.l=this.o=null;this.P=a||null;this.T=!!b},Hf=function(a){a.o|| (a.o=new B,a.l=0,a.P&&cf(a.P,function(b,c){a.add(decodeURIComponent(b.replace(/\+/g," ")),c)}))};h=yf.prototype;h.m=function(){Hf(this);return this.l};h.add=function(a,b){Hf(this);this.P=null;a=If(this,a);var c=this.o.get(a);c||this.o.set(a,c=[]);c.push(b);this.l=Ia(this.l)+1;return this};h.remove=function(a){Hf(this);a=If(this,a);return this.o.oa(a)?(this.P=null,this.l=Ia(this.l)-this.o.get(a).length,this.o.remove(a)):!1};h.clear=function(){this.o=this.P=null;this.l=0}; h.isEmpty=function(){Hf(this);return 0==this.l};h.oa=function(a){Hf(this);a=If(this,a);return this.o.oa(a)};h.ab=function(a){var b=this.w();return Wa(b,a)};h.forEach=function(a,b){Hf(this);this.o.forEach(function(c,d){Oa(c,function(c){a.call(b,c,d,this)},this)},this)};h.$=function(){Hf(this);for(var a=this.o.w(),b=this.o.$(),c=[],d=0;d');Wf=a};u("ee.data.setCloudApiEnabled",Xf); var Yf=function(a,b,c,d,e,f,g){var l=["https://www.googleapis.com/auth/earthengine"];e&&(bb(l,e),db(l));Jf=a;Kf=l;var v={token_type:b,access_token:c,state:l.join(" "),expires_in:d};Rf(void 0,void 0,v);!1===g?f&&f():Mf(function(){k.gapi.auth.setToken(v);f&&f()})};u("ee.data.setAuthToken",Yf);var Nf=function(a,b,c){Sf&&Jf&&Sf({client_id:String(Jf),immediate:!0,scope:Kf.join(" ")},function(d){"immediate_failed"==d.error&&c?c():Rf(a,b,d)})},Zf=function(a){Sf=a};u("ee.data.setAuthTokenRefresher",Zf); var bg=function(){$f&&0<=Ba()-$f&&ag();return Lf};u("ee.data.getAuthToken",bg);var ag=function(){$f=Lf=null};u("ee.data.clearAuthToken",ag);var cg=function(){return Jf};u("ee.data.getAuthClientId",cg);var dg=function(){return Kf};u("ee.data.getAuthScopes",dg); var kg=function(a,b,c){null!=a?eg=a:fg||(eg="https://earthengine.googleapis.com/api");null!=b?gg=b:fg||(gg="https://earthengine.googleapis.com");m(c)&&(hg=c);!Wf||ig&&null==a||(ig=new Promise(function(a,b){gapi.load("client",{callback:function(){var b=Object.assign({},$c,{rootUrl:eg.replace(/\/api$/,"")});gapi.client.init({apiKey:Uf,discoveryDocs:[b]}).then(function(){jg=!0;a()})},onerror:b})}));fg=!0},ng=function(a,b,c){kg();if(c){var d=function(a){return lg(a.status,function(b){return a.headers[b.toLowerCase()]}, a.body,null,c,b)};ig.then(function(){a().then(d,d)});return null}if(!jg)throw Error("Cloud API not ready");return mg(function(c){a().then(function(){return null},function(){return null});return lg(c().status,function(a){try{return c().getResponseHeader(a)}catch(g){return null}},c().responseText,null,void 0,b)})},mg=function(a){if(XMLHttpRequest.prototype.lc)throw Error("Cannot initialize synchronous request mode");var b=function(){this.fa=new this.lc;XMLHttpRequest.Ie=this.fa};b.prototype.open=function(a, b,e,f,g){this.fa.open(a,b,!1,f,g)};b.prototype.send=function(a){this.fa.send(a)};b.prototype.abort=function(){this.fa.abort()};b.prototype.overrideMimeType=function(a){this.fa.overrideMimeType(a)};b.prototype.setRequestHeader=function(a,b){this.fa.setRequestHeader(a,b)};b.prototype.getResponseHeader=function(a){return this.fa.getResponseHeader(a)};b.prototype.getAllResponseHeaders=function(){return this.fa.getAllResponseHeaders()};"onabort onerror onload onloadstart onloadend onprogress onreadystatechange readyState responseText responseType responseXML status statusText upload withCredentials DONE UNSENT HEADERS_RECEIVED LOADING OPENED".split(" ").forEach(function(a){return Object.defineProperty(b.prototype, a,{get:function(){return this.fa[a]},set:function(b){this.fa[a]=b}})});b.prototype.lc=XMLHttpRequest;XMLHttpRequest=b;try{return a(function(){return XMLHttpRequest.Ie})}finally{XMLHttpRequest=XMLHttpRequest.prototype.lc}},pg=function(a){og=a};u("ee.data.setDeadline",pg);u("ee.data.setParamAugmenter",function(a){qg=a||Gc});var rg=function(){return eg};u("ee.data.getApiBaseUrl",rg);var sg=function(){return gg};u("ee.data.getTileBaseUrl",sg);var tg=function(){return hg};u("ee.data.getXsrfToken",tg); var ug=function(a){var b=F("/algorithms",null,a,"GET");return a?null:b},vg=function(a,b){a=Fb(a);return F("/mapid",G(a),b)};u("ee.data.getMapId",vg);var wg=function(a,b,c,d){var e=Math.pow(2,d);b%=e;0>b&&(b+=e);return[gg,"map",a.mapid,d,b,c].join("/")+"?token="+a.token};u("ee.data.getTileUrl",wg);var xg=function(a,b){a=Fb(a);return F("/value",G(a),b)};u("ee.data.getValue",xg); var yg=function(a,b){a=Fb(a);p(a.dimensions)&&(a.dimensions=a.dimensions.join("x"));a=G(a).add("getid","1");return F("/thumb",a,b)};u("ee.data.getThumbId",yg);var zg=function(a){return gg+"/api/thumb?thumbid="+a.thumbid+"&token="+a.token};u("ee.data.makeThumbUrl",zg);var Ag=function(a,b){a=Fb(a);return F("/download",G(a),b)};u("ee.data.getDownloadId",Ag);var Bg=function(a){return gg+"/api/download?docid="+a.docid+"&token="+a.token};u("ee.data.makeDownloadUrl",Bg); var Cg=function(a,b){a=Fb(a);return F("/table",G(a),b)};u("ee.data.getTableDownloadId",Cg);var Dg=function(a){return gg+"/api/table?docid="+a.docid+"&token="+a.token};u("ee.data.makeTableDownloadUrl",Dg);var Fg=function(a,b,c){var d=Eg;try{return Eg=a,b.call(c)}finally{Eg=d}};u("ee.data.withProfiling",Fg);var Gg=function(a,b){var c={};oa(a)&&(c.count=a);return F("/newtaskid",G(c),b)};u("ee.data.newTaskId",Gg); u("ee.data.getTaskStatus",function(a,b){if(n(a))a=[a];else if(!p(a))throw Error("Invalid taskId: expected a string or an array of strings.");return F("/taskstatus?q="+a.join(),null,b,"GET")});u("ee.data.getTaskList",function(a){return Hg(void 0,a)}); var Hg=function(a,b){function c(b){var c={pagesize:500};a&&(c.pagesize=Math.min(c.pagesize,a-e.tasks.length));b&&(c.pagetoken=b);return c}function d(b,f){F("/tasklist",G(c(f)),function(c,f){f?b(e,f):(bb(e.tasks,c.tasks),!c.next_page_token||a&&e.tasks.length>=a?b(e):d(b,c.next_page_token))},"GET")}var e={tasks:[]};if(b)return d(b),null;for(b="";;){var f=F("/tasklist",G(c(b)),void 0,"GET");bb(e.tasks,f.tasks);b=f.next_page_token;if(!f.next_page_token||a&&e.tasks.length>=a)break}return e}; u("ee.data.getTaskListWithLimit",Hg);u("ee.data.cancelTask",function(a,b){return Ig(a,"CANCEL",b)});var Ig=function(a,b,c){if(n(a))a=[a];else if(!p(a))throw Error("Invalid taskId: expected a string or an array of strings.");if(!Ab(Jg,b))throw Error("Invalid action: "+b);return F("/updatetask",G({id:a,action:b}),c,"POST")};u("ee.data.updateTask",Ig);var Kg=function(a,b,c){b=Fb(b);b.id=a;return F("/processingrequest",G(b),c)};u("ee.data.startProcessing",Kg); u("ee.data.startIngestion",function(a,b,c){a={id:a,request:Ud(b)};return F("/ingestionrequest",G(a),c)});u("ee.data.startTableIngestion",function(a,b,c){a={id:a,tableRequest:Ud(b)};return F("/ingestionrequest",G(a),c)});var Lg=function(a,b){return F("/info",(new yf).add("id",a),b)};u("ee.data.getInfo",Lg); var Mg=function(a,b){if(Wf)return ng(function(){return gapi.client.earthengine.assets.list({name:"projects/earthengine-legacy/assets/"+a.id})},function(a){return a.assets},b);var c=G(a);return F("/list",c,b)};u("ee.data.getList",Mg);u("ee.data.getAssetRoots",function(a){return F("/buckets",null,a,"GET")});u("ee.data.createAssetHome",function(a,b){a=G({id:a});F("/createbucket",a,b)}); u("ee.data.createAsset",function(a,b,c,d,e){n(a)||(a=Ud(a));a={value:a};void 0!==b&&(a.id=b);a.force=c||!1;void 0!=d&&(a.properties=Ud(d));return F("/create",G(a),e)});u("ee.data.createFolder",function(a,b,c){return F("/createfolder",G({id:a,force:b||!1}),c)});u("ee.data.renameAsset",function(a,b,c){F("/rename",G({sourceId:a,destinationId:b}),c)});u("ee.data.copyAsset",function(a,b,c){F("/copy",G({sourceId:a,destinationId:b}),c)});u("ee.data.deleteAsset",function(a,b){F("/delete",G({id:a}),b)}); u("ee.data.getAssetAcl",function(a,b){return F("/getacl",G({id:a}),b,"GET")});u("ee.data.setAssetAcl",function(a,b,c){a={id:a,value:Ud(b)};F("/setacl",G(a),c)});u("ee.data.setAssetProperties",function(a,b,c){a={id:a,properties:Ud(b)};F("/setproperties",G(a),c)});u("ee.data.getAssetRootQuota",function(a,b){return F("/quota",G({id:a}),b,"GET")}); var Jg={ef:"CANCEL",hf:"UPDATE"},F=function(a,b,c,d){kg();var e=Eg,f={"Content-Type":"application/x-www-form-urlencoded"},g=bg();if(null!=g)f.Authorization=g;else if(c&&Sf&&Jf)return Nf(function(){Fg(e,function(){F(a,b,c,d)})}),null;g=d||"POST";b=b?b.clone():new yf;e&&b.add("profiling","1");null!=Uf&&b.add("key",Uf);b=qg(b,a);null!=hg&&(f["X-XSRF-Token"]=hg);var l=b?b.toString():"";"GET"!=g||/^[\s\xa0]*$/.test(l)||(a+=-1!=a.indexOf("?")?"&":"?",a+=l,l=null);var v=eg+a;if(c)return Ng.push(Og(v,c,g, l,f)),Pg.Bc(),null;for(var D=function(a,b){this.setRequestHeader&&this.setRequestHeader(b,a)},M,ea=0;;){M=$e();M.open(g,v,!1);ub(f,D,M);M.send(l);if(429!=M.status||5f)return f++,setTimeout(function(){Ng.push(g);Pg.Bc()},Math.min(12E4,1E3*Math.pow(2, f))),null;var c=lg,d=a.getStatus(),e=t(a.getResponseHeader,a);try{var v=a.a?a.a.responseText:""}catch(tc){Ve(a.N,"Can not get responseText: "+tc.message),v=""}return c(d,e,v,l,b)};return g},lg=function(a,b,c,d,e,f){f=void 0===f?function(a){return a.data}:f;var g=b("X-Earth-Engine-Computation-Profile");g&&d&&d(g);b=(b=b("Content-Type"))?b.replace(/;.*/,""):"application/json";if("application/json"==b||"text/json"==b)try{var l=JSON.parse(c);var v=f(l)}catch(M){var D="Invalid JSON: "+c}else D="Response was unexpectedly not JSON, but "+ b;if(r(l))"error"in l&&"message"in l.error?D=l.error.message:void 0===v&&(D="Malformed response: "+c);else if(0===a)D="Failed to contact Earth Engine servers. Please check your connection, firewall, or browser extension settings.";else if(200>a||300<=a)D="Server returned HTTP code: "+a;if(e)return e(v,D),null;if(!D)return v;throw Error(D);},Mf=function(a){var b=function(){k.gapi.config.update("client/cors",!0);Sf||(Sf=k.gapi.auth.authorize);a()};if(r(k.gapi)&&r(k.gapi.auth)&&q(k.gapi.auth.authorize))b(); else{for(var c=Ba().toString(36);c in k;)c+="_";k[c]=function(){delete k[c];b()};Ie(Sd({onload:c}))}},Rf=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,setTimeout(Nf,.9*c),$f=Ba()+c;Lf=b;a&&a()}else b&&b(c.error||"Unknown error.")},G=function(a){var b=new yf;a=ba(Object.entries(a));for(var c=a.next();!c.done;c=a.next()){var d=ba(c.value);c=d.next().value;d=d.next().value;b.set(c,d)}return b},Ng=[],Pg=new Fd(function(){var a= Ng.shift();if(a){var b=a.url,c=a.callback,d=a.method,e=a.content;a=a.headers;var f=og,g=new E;hf.push(g);c&&g.ea("complete",c);g.nb("ready",g.ue);f&&(g.Ya=Math.max(0,f));g.send(b,d,e,a)}0==Ng.length||Pg.Bc()},350),eg=null,gg=null,hg=null,qg=Gc,Lf=null,$f=null,Jf=null,Kf=[],Sf=null,Od=new Jd(Hd,"https://apis.google.com/js/client.js?onload=%{onload}"),Uf=null,Wf=!1,ig=null,jg=!1,fg=!1,og=0,Eg=null;var Qg=function(){};var Rg=function(){this.ga=-1};var Sg=function(){this.ga=-1;this.ga=64;this.F=Array(4);this.pe=Array(this.ga);this.cc=this.Za=0;this.reset()};w(Sg,Rg);Sg.prototype.reset=function(){this.F[0]=1732584193;this.F[1]=4023233417;this.F[2]=2562383102;this.F[3]=271733878;this.cc=this.Za=0}; var Tg=function(a,b,c){c||(c=0);var d=Array(16);if(n(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.F[0];c=a.F[1];e=a.F[2];var f=a.F[3];var g=b+(f^c&(e^f))+d[0]+3614090360&4294967295;b=c+(g<<7&4294967295|g>>>25);g=f+(e^b&(c^e))+d[1]+3905402710&4294967295;f=b+(g<<12&4294967295|g>>>20);g=e+(c^f&(b^c))+d[2]+606105819&4294967295;e=f+(g<<17&4294967295|g>>>15);g=c+(b^e& (f^b))+d[3]+3250441966&4294967295;c=e+(g<<22&4294967295|g>>>10);g=b+(f^c&(e^f))+d[4]+4118548399&4294967295;b=c+(g<<7&4294967295|g>>>25);g=f+(e^b&(c^e))+d[5]+1200080426&4294967295;f=b+(g<<12&4294967295|g>>>20);g=e+(c^f&(b^c))+d[6]+2821735955&4294967295;e=f+(g<<17&4294967295|g>>>15);g=c+(b^e&(f^b))+d[7]+4249261313&4294967295;c=e+(g<<22&4294967295|g>>>10);g=b+(f^c&(e^f))+d[8]+1770035416&4294967295;b=c+(g<<7&4294967295|g>>>25);g=f+(e^b&(c^e))+d[9]+2336552879&4294967295;f=b+(g<<12&4294967295|g>>>20);g= e+(c^f&(b^c))+d[10]+4294925233&4294967295;e=f+(g<<17&4294967295|g>>>15);g=c+(b^e&(f^b))+d[11]+2304563134&4294967295;c=e+(g<<22&4294967295|g>>>10);g=b+(f^c&(e^f))+d[12]+1804603682&4294967295;b=c+(g<<7&4294967295|g>>>25);g=f+(e^b&(c^e))+d[13]+4254626195&4294967295;f=b+(g<<12&4294967295|g>>>20);g=e+(c^f&(b^c))+d[14]+2792965006&4294967295;e=f+(g<<17&4294967295|g>>>15);g=c+(b^e&(f^b))+d[15]+1236535329&4294967295;c=e+(g<<22&4294967295|g>>>10);g=b+(e^f&(c^e))+d[1]+4129170786&4294967295;b=c+(g<<5&4294967295| g>>>27);g=f+(c^e&(b^c))+d[6]+3225465664&4294967295;f=b+(g<<9&4294967295|g>>>23);g=e+(b^c&(f^b))+d[11]+643717713&4294967295;e=f+(g<<14&4294967295|g>>>18);g=c+(f^b&(e^f))+d[0]+3921069994&4294967295;c=e+(g<<20&4294967295|g>>>12);g=b+(e^f&(c^e))+d[5]+3593408605&4294967295;b=c+(g<<5&4294967295|g>>>27);g=f+(c^e&(b^c))+d[10]+38016083&4294967295;f=b+(g<<9&4294967295|g>>>23);g=e+(b^c&(f^b))+d[15]+3634488961&4294967295;e=f+(g<<14&4294967295|g>>>18);g=c+(f^b&(e^f))+d[4]+3889429448&4294967295;c=e+(g<<20&4294967295| g>>>12);g=b+(e^f&(c^e))+d[9]+568446438&4294967295;b=c+(g<<5&4294967295|g>>>27);g=f+(c^e&(b^c))+d[14]+3275163606&4294967295;f=b+(g<<9&4294967295|g>>>23);g=e+(b^c&(f^b))+d[3]+4107603335&4294967295;e=f+(g<<14&4294967295|g>>>18);g=c+(f^b&(e^f))+d[8]+1163531501&4294967295;c=e+(g<<20&4294967295|g>>>12);g=b+(e^f&(c^e))+d[13]+2850285829&4294967295;b=c+(g<<5&4294967295|g>>>27);g=f+(c^e&(b^c))+d[2]+4243563512&4294967295;f=b+(g<<9&4294967295|g>>>23);g=e+(b^c&(f^b))+d[7]+1735328473&4294967295;e=f+(g<<14&4294967295| g>>>18);g=c+(f^b&(e^f))+d[12]+2368359562&4294967295;c=e+(g<<20&4294967295|g>>>12);g=b+(c^e^f)+d[5]+4294588738&4294967295;b=c+(g<<4&4294967295|g>>>28);g=f+(b^c^e)+d[8]+2272392833&4294967295;f=b+(g<<11&4294967295|g>>>21);g=e+(f^b^c)+d[11]+1839030562&4294967295;e=f+(g<<16&4294967295|g>>>16);g=c+(e^f^b)+d[14]+4259657740&4294967295;c=e+(g<<23&4294967295|g>>>9);g=b+(c^e^f)+d[1]+2763975236&4294967295;b=c+(g<<4&4294967295|g>>>28);g=f+(b^c^e)+d[4]+1272893353&4294967295;f=b+(g<<11&4294967295|g>>>21);g=e+(f^ b^c)+d[7]+4139469664&4294967295;e=f+(g<<16&4294967295|g>>>16);g=c+(e^f^b)+d[10]+3200236656&4294967295;c=e+(g<<23&4294967295|g>>>9);g=b+(c^e^f)+d[13]+681279174&4294967295;b=c+(g<<4&4294967295|g>>>28);g=f+(b^c^e)+d[0]+3936430074&4294967295;f=b+(g<<11&4294967295|g>>>21);g=e+(f^b^c)+d[3]+3572445317&4294967295;e=f+(g<<16&4294967295|g>>>16);g=c+(e^f^b)+d[6]+76029189&4294967295;c=e+(g<<23&4294967295|g>>>9);g=b+(c^e^f)+d[9]+3654602809&4294967295;b=c+(g<<4&4294967295|g>>>28);g=f+(b^c^e)+d[12]+3873151461&4294967295; f=b+(g<<11&4294967295|g>>>21);g=e+(f^b^c)+d[15]+530742520&4294967295;e=f+(g<<16&4294967295|g>>>16);g=c+(e^f^b)+d[2]+3299628645&4294967295;c=e+(g<<23&4294967295|g>>>9);g=b+(e^(c|~f))+d[0]+4096336452&4294967295;b=c+(g<<6&4294967295|g>>>26);g=f+(c^(b|~e))+d[7]+1126891415&4294967295;f=b+(g<<10&4294967295|g>>>22);g=e+(b^(f|~c))+d[14]+2878612391&4294967295;e=f+(g<<15&4294967295|g>>>17);g=c+(f^(e|~b))+d[5]+4237533241&4294967295;c=e+(g<<21&4294967295|g>>>11);g=b+(e^(c|~f))+d[12]+1700485571&4294967295;b=c+ (g<<6&4294967295|g>>>26);g=f+(c^(b|~e))+d[3]+2399980690&4294967295;f=b+(g<<10&4294967295|g>>>22);g=e+(b^(f|~c))+d[10]+4293915773&4294967295;e=f+(g<<15&4294967295|g>>>17);g=c+(f^(e|~b))+d[1]+2240044497&4294967295;c=e+(g<<21&4294967295|g>>>11);g=b+(e^(c|~f))+d[8]+1873313359&4294967295;b=c+(g<<6&4294967295|g>>>26);g=f+(c^(b|~e))+d[15]+4264355552&4294967295;f=b+(g<<10&4294967295|g>>>22);g=e+(b^(f|~c))+d[6]+2734768916&4294967295;e=f+(g<<15&4294967295|g>>>17);g=c+(f^(e|~b))+d[13]+1309151649&4294967295; c=e+(g<<21&4294967295|g>>>11);g=b+(e^(c|~f))+d[4]+4149444226&4294967295;b=c+(g<<6&4294967295|g>>>26);g=f+(c^(b|~e))+d[11]+3174756917&4294967295;f=b+(g<<10&4294967295|g>>>22);g=e+(b^(f|~c))+d[2]+718787259&4294967295;e=f+(g<<15&4294967295|g>>>17);g=c+(f^(e|~b))+d[9]+3951481745&4294967295;a.F[0]=a.F[0]+b&4294967295;a.F[1]=a.F[1]+(e+(g<<21&4294967295|g>>>11))&4294967295;a.F[2]=a.F[2]+e&4294967295;a.F[3]=a.F[3]+f&4294967295}; Sg.prototype.update=function(a,b){m(b)||(b=a.length);for(var c=b-this.ga,d=this.pe,e=this.Za,f=0;fthis.Za?this.ga:2*this.ga)-this.Za);a[0]=128;for(var b=1;bb;++b)for(var d=0;32>d;d+=8)a[c++]=this.F[b]>>>d&255;return a};var Ug=function(a){this.wb="__ee_hash__";this.Mc=!1!==a;this.Wa=[];this.Na={};this.hd=[]};u("ee.Serializer",Ug);var Vg=new Td,Wg=new Sg,Yg=function(a,b){return Xg(new Ug(m(b)?b:!0),a)};u("ee.Serializer.encode",Yg);var Zg=function(a){return Vg.A(Yg(a))};u("ee.Serializer.toJSON",Zg);var $g=function(a){a=Xg(new Ug(!1),a);return"JSON"in k?k.JSON.stringify(a,null," "):Vg.A(a)};u("ee.Serializer.toReadableJSON",$g); var Xg=function(a,b){b=a.Db(b);a.Mc&&(b=r(b)&&"ValueRef"==b.type&&1==a.Wa.length?a.Wa[0][1]:{type:"CompoundValue",scope:a.Wa,value:b},a.Wa=[],Oa(a.hd,t(function(a){delete a[this.wb]},a)),a.hd=[],a.Na={});return b}; Ug.prototype.Db=function(a){if(!m(a))throw Error("Can't encode an undefined value.");var b=r(a)?a[this.wb]:null;if(this.Mc&&null!=b&&this.Na[b])return{type:"ValueRef",value:this.Na[b]};if(null===a||"boolean"==typeof a||oa(a)||n(a))return a;if(r(a)&&"function"==typeof a.getFullYear)return{type:"Invocation",functionName:"Date",arguments:{value:Math.floor(a.getTime())}};if(a instanceof Qg){var c=a.encode(t(this.Db,this));if(!(p(c)||r(c)&&"ArgumentRef"!=c.type))return c}else if(p(a))c=Qa(a,function(a){return this.Db(a)}, this);else if(r(a)&&!q(a))c=wb(a,function(a){if(!q(a))return this.Db(a)},this),Eb(c,this.wb),c={type:"Dictionary",value:c};else throw Error("Can't encode object: "+a);if(this.Mc){Wg.reset();Wg.update(Vg.A(c));b=Wg.digest().toString();if(this.Na[b])var d=this.Na[b];else d=String(this.Wa.length),this.Wa.push([d,c]),this.Na[b]=d;a[this.wb]=b;this.hd.push(a);return{type:"ValueRef",value:d}}return c};var H=function(a,b,c){if(!(this instanceof H))return ah(H,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.j=a;this.args=b;this.C=c||null};w(H,Qg);u("ee.ComputedObject",H);H.prototype.evaluate=function(a){if(!a||!q(a))throw Error("evaluate() requires a callback function.");xg({json:this.A()},a)};H.prototype.evaluate=H.prototype.evaluate; H.prototype.D=function(a){return xg({json:this.A()},a)};H.prototype.getInfo=H.prototype.D;H.prototype.encode=function(a){if(null===this.j&&null===this.args)return{type:"ArgumentRef",value:this.C};var b={},c;for(c in this.args)m(this.args[c])&&(b[c]=a(this.args[c]));b={type:"Invocation",arguments:b};a=a(this.j);b[n(a)?"functionName":"function"]=a;return b};H.prototype.A=function(){return Zg(this)};H.prototype.serialize=H.prototype.A; H.prototype.toString=function(){return"ee."+this.name()+"("+$g(this)+")"};u("ee.ComputedObject.prototype.toString",H.prototype.toString);H.prototype.name=function(){return"ComputedObject"};H.prototype.jd=function(a,b){var c=ab(arguments);c[0]=this;a.apply(k,c);return this};H.prototype.aside=H.prototype.jd; var bh=function(a,b){if(b instanceof a.constructor)return b;var c=function(){};c.prototype=a.constructor.prototype;a=new c;a.j=b.j;a.args=b.args;a.C=b.C;return a},ah=function(a,b){function c(){return a.apply(this,b)}c.prototype=a.prototype;return new c};var ch={},dh=function(a){return a.prototype instanceof H?a.prototype.name.call(null):a==Number?"Number":a==String?"String":a==Array?"Array":a==Date?"Date":"Object"},eh=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}},fh=function(a){return oa(a)|| a instanceof H&&"Number"==a.name()},gh=function(a){return n(a)||a instanceof H&&"String"==a.name()},hh=function(a){return r(a)&&!q(a)?(a=Object.getPrototypeOf(a),null!==a&&null===Object.getPrototypeOf(a)):!1};var I=function(){if(!(this instanceof I))return new I};w(I,Qg);u("ee.Function",I);var ih=Gc;I.prototype.call=function(a){return this.apply(jh(this,Array.prototype.slice.call(arguments,0)))};I.prototype.call=I.prototype.call;I.prototype.apply=function(a){a=new H(this,kh(this,a));return ih(a,this.L().returns)};I.prototype.apply=I.prototype.apply; var lh=function(a,b,c){var d=m(b),e=a.L(),f=!1;if(1==c.length&&hh(c[0])){var g=e.args;d&&(g=g.slice(1));g.length&&(f=!((1==g.length||g[1].optional)&&"Dictionary"==g[0].type))}if(f){if(c=Fb(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=jh(a,d?[b].concat(c):c);return a.apply(c)},kh=function(a,b){for(var c=a.L().args,d={},e={},f=0;f/,"");for(var c=0;c/,"");return new J(b,a)}),a&&a())};a?ug(c):c(ug())}},L=function(a,b,c,d){qh();var e=d||"";ub(oh,function(d,g){var f=g.split(".");if(2==f.length&&f[0]==b){f=e+f[1];var v=d.L();ph[g]=!0;var D=!1;v.args.length&&(g=v.args[0].type,D="Object"!=g&&eh(g,c)); g=D?a.prototype:a;f in g&&!g[f].signature||(g[f]=function(a){return lh(d,D?this:void 0,Array.prototype.slice.call(arguments,0))},g[f].toString=t(d.toString,d,f,D),g[f].signature=v)}})},uh=function(a){var b=function(a){for(var b in a)q(a[b])&&a[b].signature&&delete a[b]};b(a);b(a.prototype||{})};var N=function(a,b){var c=vh(a),d=Qa(c,function(a){return a.replace(/^opt_/,"")});a=(a=k.EXPORTED_FN_INFO?k.EXPORTED_FN_INFO[a.toString()].name.split(".").pop()+"()":null)?" to function "+a:"";var e={},f=b[0],g=r(f)&&!q(f)&&!p(f)&&!(f instanceof H);if(1d.length)throw Error("Received too many arguments"+a+". Expected at most "+d.length+" but got "+b.length+".");for(f=0;f=arguments.length){var c=arguments[0];if(b=hh(c))a:{b=zb(c);var d=["properties"];if(va(b)&&va(d)&&b.length==d.length){for(var e=b.length,f=0;fc||4/,"");c[e]=!0}var f=k.ee,g;for(g in b)g in c&&!(g in f)&&(f[g]=vj(g),pj.push(g),a[g]?(f[g].signature=a[g],f[g].signature.isConstructor=!0,ph[g]=!0):f[g].signature={});ch=f;wj()}catch(l){nj(l);return}jj="ready";for(kj=[];0a.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.ta++].join("-"),this.cd.Gd()].join("-");b=this.ud(d,b,c,a);b.tileSize=this.tileSize;Jj(b.O,this.opacity);this.ua.set(a,b);Mj(this,b);this.cd.Od(b,(new Date).getTime()/1E3);return b.O};h.releaseTile=function(a){var b=this.ua.get(a.id);this.ua.remove(a.id);b&&(b.abort(),Ca(b))}; var Mj=function(a,b){a.ja.ea(b,"status-changed",function(){switch(b.getStatus()){case "loaded":var a=b.Le,d=(new Date).getTime();Bj(this.Yb,b.zoom).tileLatencies.push(d-a);this.dispatchEvent(new Nj(this.Dc()));break;case "throttled":Bj(this.Yb,b.zoom).throttleCount++;this.dispatchEvent(new Oj(b.Ea));break;case "failed":Bj(this.Yb,b.zoom).errorCount++,this.dispatchEvent(new Pj(b.Ea,b.ye))}})}; Kj.prototype.f=function(){Kj.h.f.call(this);this.ua.forEach(Ca);this.ua.clear();this.ua=null;Ca(this.ja);this.cd=this.ja=null};var Lj=function(a,b){return Ta(a.ua.w(),function(a){return a.getStatus()==b})},Nj=function(){y.call(this,"tile-load")};w(Nj,y);var Oj=function(){y.call(this,"tile-throttle")};w(Oj,y);var Pj=function(a,b){y.call(this,"tile-fail");this.errorMessage=b};w(Pj,y); var Qj=function(a,b,c,d){A.call(this);this.La=a;this.zoom=b;this.O=c.createElement("div");this.O.id=d;this.Ne=5;this.Ub=function(){};this.Zc="new";this.Zd=0;this.Nc=!1};w(Qj,A); var Sj=function(a){if(!a.Nc&&"loading"==a.getStatus())throw Error("startLoad() can only be invoked once. Use retryLoad() after the first attempt.");Rj(a,"loading");a.Le=(new Date).getTime();a.ma=new E;a.ma.Va="blob";a.ma.ea("complete",function(){var a=qf(this.ma),c=this.ma.getStatus();429==c&&Rj(this,"throttled");if(We(c)){var d={};ub(rf(this.ma),function(a,b){d[b.toLowerCase()]=a});this.Ze=d;this.fe=a;this.eb()}else if(a){var e=new Ij;e.ea("loadend",function(){this.rb(e.H.result)},void 0,this);e.readAsText(a)}else this.rb("Failed to load tile.")}, !1,a);a.ma.nb("ready",Aa(Ca,a.ma));a.ma.send(a.Ea,"GET")};h=Qj.prototype;h.eb=function(){this.Ub(this);Rj(this,"loaded")};h.$a=function(){Ca(this.ma)};h.rb=function(a){var b=function(a){try{if(a=JSON.parse(a),a.error&&a.error.message)return a.error.message}catch(d){}return a};this.Zd>=this.Ne?(this.ye=b(a),Rj(this,"failed")):(this.$a(),setTimeout(t(function(){this.ca||(this.Nc=!0,Sj(this),this.Nc=!1)},this),1E3*Math.pow(2,this.Zd++)))};h.abort=function(){this.$a();Rj(this,"aborted")}; h.getStatus=function(){return this.Zc};var Rj=function(a,b){a.Zc=b;a.dispatchEvent("status-changed")},Tj={aborted:!0,failed:!0,loaded:!0};Qj.prototype.f=function(){Qj.h.f.call(this);this.$a();this.O.remove();this.Ub=null};var Uj=function(){x.call(this)};w(Uj,x);var Vj=function(a,b){Kj.call(this,a,b);this.pd=new B;this.xd=new B};w(Vj,Kj);u("ee.layers.BinaryOverlay",Vj);Vj.prototype.ud=function(a,b,c,d){var e=new Wj(a,b,c,d);this.ja.ea(e,"status-changed",function(){"loaded"==e.getStatus()&&(this.pd.set(a,new Float32Array(e.re)),this.xd.set(a,e.O))});return e};Vj.prototype.f=function(){Vj.h.f.call(this);this.xd=this.pd=null};var Wj=function(a,b,c,d){Qj.call(this,a,b,c,d)};w(Wj,Qj); Wj.prototype.eb=function(){var a=new Ij;a.ea("loadend",function(){this.re=a.H.result;Qj.prototype.eb.call(this)},void 0,this);a.readAsArrayBuffer(this.fe)};var Xj=function(a){A.call(this);this.kb={};this.jb={};this.za=new Cj(this);this.u=a};w(Xj,A);var Yj=[Nb&&!Xb("11")?"readystatechange":"load","abort","error"],Zj=function(a,b,c){(c=n(c)?c:c.src)&&(a.kb[b]={src:c,td:m(void 0)?void 0:null})},ak=function(a,b){delete a.kb[b];var c=a.jb[b];c&&(delete a.jb[b],a.za.fc(c,Yj,a.Td),Db(a.jb)&&Db(a.kb)&&a.dispatchEvent("complete"))}; Xj.prototype.start=function(){var a=this.kb;Oa(zb(a),function(b){var c=a[b];if(c&&(delete a[b],!this.ca)){if(this.u){var d=this.u;d=(d?new re(qe(d)):Ea||(Ea=new re)).we("IMG")}else d=new Image;c.td&&(d.crossOrigin=c.td);this.za.ea(d,Yj,this.Td);this.jb[b]=d;d.id=b;d.src=c.src}},this)}; Xj.prototype.Td=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));this.dispatchEvent({type:a.type,target:b});this.ca||ak(this,b.id)}};Xj.prototype.f=function(){delete this.kb;delete this.jb;Ca(this.za);Xj.h.f.call(this)};var bk=function(a,b){Kj.call(this,a,b)};w(bk,Kj);u("ee.layers.ImageOverlay",bk);bk.prototype.ud=function(a,b,c,d){return new ck(a,b,c,d)};var ck=function(a,b,c,d){Qj.call(this,a,b,c,d);this.Ub=dk;this.Jd=this.K=this.Kb=null;this.ob=""};w(ck,Qj); ck.prototype.eb=function(){try{var a=ge(this.fe);this.ob=ce(a);var b="about:invalid#zClosurez"!==this.ob?this.ob:this.Ea}catch(c){b=this.Ea}this.K=new Xj;Zj(this.K,this.O.id+"-image",b);this.Jd=qc(this.K,ek,function(a){"load"==a.type?(this.Kb=a.target,Qj.prototype.eb.call(this)):this.rb()},void 0,this);this.K.start()};ck.prototype.$a=function(){ck.h.$a.call(this);this.K&&(Ac(this.Jd),Ca(this.K))};ck.prototype.f=function(){ck.h.f.call(this);this.ob&&URL.revokeObjectURL(this.ob)}; var ek=["load","abort","error"],dk=function(a){a.O.appendChild(a.Kb)};var fk=function(a){for(var b=arguments[0],c=1;cthis.Nb)throw Error("[goog.structs.Pool] Min can not be greater than max");this.da=new ik;this.qa=new C;this.delay=0;this.Oc=null;this.xb()};w(jk,x);jk.prototype.gb=function(){var a=Ba();if(!(null!=this.Oc&&a-this.Octhis.Nb&&0=this.m()){for(var c=this.U,d=0;d>1,a[d].getKey()>c.getKey())a[b]=a[d],b=d;else break;a[b]=c};h=mk.prototype; h.remove=function(){var a=this.U,b=a.length,c=a[0];if(!(0>=b)){if(1==b)Xa(a);else{a[0]=a.pop();a=0;b=this.U;for(var d=b.length,e=b[a];a>1;){var f=2*a+1,g=2*a+2;f=ge.getKey())break;b[a]=b[f];a=f}b[a]=e}return c.hc}};h.w=function(){for(var a=this.U,b=[],c=a.length,d=0;da.Oe)return!1;a.md++;ak(a.K,a.J);setTimeout(t(a.$e,a),0);return!0}; uk.prototype.$e=function(){if(!this.Ja){var a=t(function(a){this.Ja||(Zj(this.K,this.J,a),qc(this.K,xk,t(this.Ee,this)),this.K.start())},this),b=this.getUrl();if(Ff(b).V.oa("profiling")){var c=new E;c.Va="blob";c.ea("complete",t(function(){this.Wd=c.getResponseHeader("X-Earth-Engine-Computation-Profile")||null;if(200<=c.getStatus()&&300>c.getStatus())try{var d=ce(ge(qf(c)));var e="about:invalid#zClosurez"!==d}catch(f){}a(e?d:b)},this));c.nb("ready",t(c.ba,c));c.send(b,"GET")}else a(b)}}; var yk=function(){this.W=!1};w(yk,x);yk.prototype.setActive=function(a){this.W=a};yk.prototype.Kd=function(){return this.W};var tk=function(a,b){pk.call(this,a,b)};w(tk,pk);tk.prototype.uc=function(){return new yk};tk.prototype.Bb=function(a){a.ba()};tk.prototype.Rc=function(a){return!a.ca&&!a.Kd()};var Z=function(a,b,c,d,e){Xc.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.ed=new C;this.Sc=1;this.R=e||null};w(Z,Xc);u("ee.MapLayerOverlay",Z);Z.prototype.nc=function(a){return rc(this,"tileevent",a)};Z.prototype.addTileCallback=Z.prototype.nc;Z.prototype.Wc=function(a){Ac(a)}; Z.prototype.removeTileCallback=Z.prototype.Wc;Z.prototype.getTile=function(a,b,c){if(ba.y||a.y>=1<