mirror of
https://github.com/google/earthengine-api.git
synced 2025-12-08 19:26:12 +00:00
227 lines
121 KiB
JavaScript
227 lines
121 KiB
JavaScript
(function() {var h,aa=aa||{},k=this,l=function(a){return void 0!==a},ba=function(){},da=function(){throw Error("unimplemented abstract method");},ea=function(a){var b=typeof a;if("object"==b)if(a){if(a instanceof Array)return"array";if(a instanceof Object)return b;var c=Object.prototype.toString.call(a);if("[object Window]"==c)return"object";if("[object Array]"==c||"number"==typeof a.length&&"undefined"!=typeof a.splice&&"undefined"!=typeof a.propertyIsEnumerable&&!a.propertyIsEnumerable("splice"))return"array";
|
|
if("[object Function]"==c||"undefined"!=typeof a.call&&"undefined"!=typeof a.propertyIsEnumerable&&!a.propertyIsEnumerable("call"))return"function"}else return"null";else if("function"==b&&"undefined"==typeof a.call)return"object";return b},fa=function(a){return null!=a},n=function(a){return"array"==ea(a)},ga=function(a){var b=ea(a);return"array"==b||"object"==b&&"number"==typeof a.length},p=function(a){return"string"==typeof a},ha=function(a){return"number"==typeof a},q=function(a){return"function"==
|
|
ea(a)},r=function(a){var b=typeof a;return"object"==b&&null!=a||"function"==b},ia="closure_uid_"+(1E9*Math.random()>>>0),ja=0,ka=function(a,b,c){return a.call.apply(a.bind,arguments)},la=function(a,b,c){if(!a)throw Error();if(2<arguments.length){var d=Array.prototype.slice.call(arguments,2);return function(){var c=Array.prototype.slice.call(arguments);Array.prototype.unshift.apply(c,d);return a.apply(b,c)}}return function(){return a.apply(b,arguments)}},t=function(a,b,c){t=Function.prototype.bind&&
|
|
-1!=Function.prototype.bind.toString().indexOf("native code")?ka:la;return t.apply(null,arguments)},ma=function(a,b){var c=Array.prototype.slice.call(arguments,1);return function(){var b=c.slice();b.push.apply(b,arguments);return a.apply(this,b)}},na=Date.now||function(){return+new Date},u=function(a,b){var c=a.split("."),d=k;c[0]in d||!d.execScript||d.execScript("var "+c[0]);for(var e;c.length&&(e=c.shift());)!c.length&&l(b)?d[e]=b:d=d[e]?d[e]:d[e]={}},w=function(a,b){function c(){}c.prototype=b.prototype;
|
|
a.j=b.prototype;a.prototype=new c;a.prototype.constructor=a;a.Pe=function(a,c,f){for(var d=Array(arguments.length-2),e=2;e<arguments.length;e++)d[e-2]=arguments[e];return b.prototype[c].apply(a,d)}};var x=function(a){if(Error.captureStackTrace)Error.captureStackTrace(this,x);else{var b=Error().stack;b&&(this.stack=b)}a&&(this.message=String(a))};w(x,Error);x.prototype.name="CustomError";var oa;var pa=function(a,b){for(var c=a.split("%s"),d="",e=Array.prototype.slice.call(arguments,1);e.length&&1<c.length;)d+=c.shift()+e.shift();return d+c.join("%s")},qa=String.prototype.trim?function(a){return a.trim()}:function(a){return a.replace(/^[\s\xa0]+|[\s\xa0]+$/g,"")},ya=function(a){if(!ra.test(a))return a;-1!=a.indexOf("&")&&(a=a.replace(sa,"&"));-1!=a.indexOf("<")&&(a=a.replace(ta,"<"));-1!=a.indexOf(">")&&(a=a.replace(ua,">"));-1!=a.indexOf('"')&&(a=a.replace(va,"""));-1!=a.indexOf("'")&&
|
|
(a=a.replace(wa,"'"));-1!=a.indexOf("\x00")&&(a=a.replace(xa,"�"));return a},sa=/&/g,ta=/</g,ua=/>/g,va=/"/g,wa=/'/g,xa=/\x00/g,ra=/[\x00&<>"']/,za=function(a,b){return a<b?-1:a>b?1:0};var Aa=function(a,b){b.unshift(a);x.call(this,pa.apply(null,b));b.shift()};w(Aa,x);Aa.prototype.name="AssertionError";
|
|
var Ba=function(a,b,c,d){var e="Assertion failed";if(c)var e=e+(": "+c),f=d;else a&&(e+=": "+a,f=b);throw new Aa(""+e,f||[]);},y=function(a,b,c){a||Ba("",null,b,Array.prototype.slice.call(arguments,2));return a},Ca=function(a,b){throw new Aa("Failure"+(a?": "+a:""),Array.prototype.slice.call(arguments,1));},Da=function(a,b,c){ha(a)||Ba("Expected number but got %s: %s.",[ea(a),a],b,Array.prototype.slice.call(arguments,2));return a},Ea=function(a,b,c){q(a)||Ba("Expected function but got %s: %s.",[ea(a),
|
|
a],b,Array.prototype.slice.call(arguments,2))},Fa=function(a,b,c){r(a)||Ba("Expected object but got %s: %s.",[ea(a),a],b,Array.prototype.slice.call(arguments,2))},Ga=function(a,b,c){n(a)||Ba("Expected array but got %s: %s.",[ea(a),a],b,Array.prototype.slice.call(arguments,2))};var Ha=Array.prototype.indexOf?function(a,b,c){y(null!=a.length);return Array.prototype.indexOf.call(a,b,c)}:function(a,b,c){c=null==c?0:0>c?Math.max(0,a.length+c):c;if(p(a))return p(b)&&1==b.length?a.indexOf(b,c):-1;for(;c<a.length;c++)if(c in a&&a[c]===b)return c;return-1},Ia=Array.prototype.lastIndexOf?function(a,b,c){y(null!=a.length);return Array.prototype.lastIndexOf.call(a,b,null==c?a.length-1:c)}:function(a,b,c){c=null==c?a.length-1:c;0>c&&(c=Math.max(0,a.length+c));if(p(a))return p(b)&&1==
|
|
b.length?a.lastIndexOf(b,c):-1;for(;0<=c;c--)if(c in a&&a[c]===b)return c;return-1},Ja=Array.prototype.forEach?function(a,b,c){y(null!=a.length);Array.prototype.forEach.call(a,b,c)}:function(a,b,c){for(var d=a.length,e=p(a)?a.split(""):a,f=0;f<d;f++)f in e&&b.call(c,e[f],f,a)},Ka=Array.prototype.filter?function(a,b,c){y(null!=a.length);return Array.prototype.filter.call(a,b,c)}:function(a,b,c){for(var d=a.length,e=[],f=0,g=p(a)?a.split(""):a,m=0;m<d;m++)if(m in g){var v=g[m];b.call(c,v,m,a)&&(e[f++]=
|
|
v)}return e},La=Array.prototype.map?function(a,b,c){y(null!=a.length);return Array.prototype.map.call(a,b,c)}:function(a,b,c){for(var d=a.length,e=Array(d),f=p(a)?a.split(""):a,g=0;g<d;g++)g in f&&(e[g]=b.call(c,f[g],g,a));return e},Ma=Array.prototype.some?function(a,b,c){y(null!=a.length);return Array.prototype.some.call(a,b,c)}:function(a,b,c){for(var d=a.length,e=p(a)?a.split(""):a,f=0;f<d;f++)if(f in e&&b.call(c,e[f],f,a))return!0;return!1},Na=Array.prototype.every?function(a,b,c){y(null!=a.length);
|
|
return Array.prototype.every.call(a,b,c)}:function(a,b,c){for(var d=a.length,e=p(a)?a.split(""):a,f=0;f<d;f++)if(f in e&&!b.call(c,e[f],f,a))return!1;return!0},Oa=function(a,b){var c=0;Ja(a,function(a,e,f){b.call(void 0,a,e,f)&&++c},void 0);return c},Qa=function(a){var b;a:{b=Pa;for(var c=a.length,d=p(a)?a.split(""):a,e=0;e<c;e++)if(e in d&&b.call(void 0,d[e],e,a)){b=e;break a}b=-1}return 0>b?null:p(a)?a.charAt(b):a[b]},Ra=function(a){if(!n(a))for(var b=a.length-1;0<=b;b--)delete a[b];a.length=0},
|
|
Ta=function(a,b){var c=Ha(a,b),d;(d=0<=c)&&Sa(a,c);return d},Sa=function(a,b){y(null!=a.length);Array.prototype.splice.call(a,b,1)},Ua=function(a){return Array.prototype.concat.apply(Array.prototype,arguments)},Va=function(a){var b=a.length;if(0<b){for(var c=Array(b),d=0;d<b;d++)c[d]=a[d];return c}return[]},Wa=function(a,b){for(var c=1;c<arguments.length;c++){var d=arguments[c];if(ga(d)){var e=a.length||0,f=d.length||0;a.length=e+f;for(var g=0;g<f;g++)a[e+g]=d[g]}else a.push(d)}},Xa=function(a,b,
|
|
c){y(null!=a.length);return 2>=arguments.length?Array.prototype.slice.call(a,b):Array.prototype.slice.call(a,b,c)},Ya=function(a){for(var b={},c=0,d=0;d<a.length;){var e=a[d++],f;f=e;f=r(f)?"o"+(f[ia]||(f[ia]=++ja)):(typeof f).charAt(0)+f;Object.prototype.hasOwnProperty.call(b,f)||(b[f]=!0,a[c++]=e)}a.length=c};var z=function(){this.aa=this.aa;this.Db=this.Db};z.prototype.aa=!1;z.prototype.T=function(){this.aa||(this.aa=!0,this.c())};z.prototype.c=function(){if(this.Db)for(;this.Db.length;)this.Db.shift()()};var Za=function(a){a&&"function"==typeof a.T&&a.T()};var A=function(a,b){this.type=a;this.currentTarget=this.target=b;this.defaultPrevented=this.Ia=!1;this.Pd=!0};A.prototype.preventDefault=function(){this.defaultPrevented=!0;this.Pd=!1};var $a=function(a,b,c){for(var d in a)b.call(c,a[d],d,a)},ab=function(a,b){var c={},d;for(d in a)b.call(void 0,a[d],d,a)&&(c[d]=a[d]);return c},bb=function(a,b,c){var d={},e;for(e in a)d[e]=b.call(c,a[e],e,a);return d},cb=function(a){var b=[],c=0,d;for(d in a)b[c++]=a[d];return b},db=function(a){var b=[],c=0,d;for(d in a)b[c++]=d;return b},fb=function(a){var b=eb,c;for(c in b)if(a.call(void 0,b[c],c,b))return c},gb=function(a){for(var b in a)return!1;return!0},hb=function(a,b){b in a&&delete a[b]},
|
|
ib=function(a){var b={},c;for(c in a)b[c]=a[c];return b},jb=function(a){var b=ea(a);if("object"==b||"array"==b){if(q(a.clone))return a.clone();var b="array"==b?[]:{},c;for(c in a)b[c]=jb(a[c]);return b}return a},kb="constructor hasOwnProperty isPrototypeOf propertyIsEnumerable toLocaleString toString valueOf".split(" "),lb=function(a,b){for(var c,d,e=1;e<arguments.length;e++){d=arguments[e];for(c in d)a[c]=d[c];for(var f=0;f<kb.length;f++)c=kb[f],Object.prototype.hasOwnProperty.call(d,c)&&(a[c]=d[c])}};var mb=function(a){mb[" "](a);return a};mb[" "]=ba;var ob=function(a,b){var c=nb;return Object.prototype.hasOwnProperty.call(c,a)?c[a]:c[a]=b(a)};var pb;a:{var qb=k.navigator;if(qb){var rb=qb.userAgent;if(rb){pb=rb;break a}}pb=""}var sb=function(a){return-1!=pb.indexOf(a)};var tb=sb("Opera"),ub=sb("Trident")||sb("MSIE"),vb=sb("Edge"),wb=sb("Gecko")&&!(-1!=pb.toLowerCase().indexOf("webkit")&&!sb("Edge"))&&!(sb("Trident")||sb("MSIE"))&&!sb("Edge"),xb=-1!=pb.toLowerCase().indexOf("webkit")&&!sb("Edge"),yb=function(){var a=k.document;return a?a.documentMode:void 0},zb;
|
|
a:{var Ab="",Bb=function(){var a=pb;if(wb)return/rv\:([^\);]+)(\)|;)/.exec(a);if(vb)return/Edge\/([\d\.]+)/.exec(a);if(ub)return/\b(?:MSIE|rv)[: ]([^\);]+)(\)|;)/.exec(a);if(xb)return/WebKit\/(\S+)/.exec(a);if(tb)return/(?:Version)[ \/]?(\S+)/.exec(a)}();Bb&&(Ab=Bb?Bb[1]:"");if(ub){var Cb=yb();if(null!=Cb&&Cb>parseFloat(Ab)){zb=String(Cb);break a}}zb=Ab}
|
|
var Db=zb,nb={},Eb=function(a){return ob(a,function(){for(var b=0,c=qa(String(Db)).split("."),d=qa(String(a)).split("."),e=Math.max(c.length,d.length),f=0;0==b&&f<e;f++){var g=c[f]||"",m=d[f]||"";do{g=/(\d*)(\D*)(.*)/.exec(g)||["","","",""];m=/(\d*)(\D*)(.*)/.exec(m)||["","","",""];if(0==g[0].length&&0==m[0].length)break;b=za(0==g[1].length?0:parseInt(g[1],10),0==m[1].length?0:parseInt(m[1],10))||za(0==g[2].length,0==m[2].length)||za(g[2],m[2]);g=g[3];m=m[3]}while(0==b)}return 0<=b})},Fb;var Gb=k.document;
|
|
Fb=Gb&&ub?yb()||("CSS1Compat"==Gb.compatMode?parseInt(Db,10):5):void 0;var Hb=!ub||9<=Number(Fb),Ib=ub&&!Eb("9");!xb||Eb("528");wb&&Eb("1.9b")||ub&&Eb("8")||tb&&Eb("9.5")||xb&&Eb("528");wb&&!Eb("8")||ub&&Eb("9");var Jb=function(a,b){A.call(this,a?a.type:"");this.relatedTarget=this.currentTarget=this.target=null;this.charCode=this.keyCode=this.button=this.screenY=this.screenX=this.clientY=this.clientX=this.offsetY=this.offsetX=0;this.metaKey=this.shiftKey=this.altKey=this.ctrlKey=!1;this.ja=this.state=null;if(a){var c=this.type=a.type,d=a.changedTouches?a.changedTouches[0]:null;this.target=a.target||a.srcElement;this.currentTarget=b;var e=a.relatedTarget;if(e){if(wb){var f;a:{try{mb(e.nodeName);f=!0;break a}catch(g){}f=
|
|
!1}f||(e=null)}}else"mouseover"==c?e=a.fromElement:"mouseout"==c&&(e=a.toElement);this.relatedTarget=e;null===d?(this.offsetX=xb||void 0!==a.offsetX?a.offsetX:a.layerX,this.offsetY=xb||void 0!==a.offsetY?a.offsetY:a.layerY,this.clientX=void 0!==a.clientX?a.clientX:a.pageX,this.clientY=void 0!==a.clientY?a.clientY:a.pageY,this.screenX=a.screenX||0,this.screenY=a.screenY||0):(this.clientX=void 0!==d.clientX?d.clientX:d.pageX,this.clientY=void 0!==d.clientY?d.clientY:d.pageY,this.screenX=d.screenX||
|
|
0,this.screenY=d.screenY||0);this.button=a.button;this.keyCode=a.keyCode||0;this.charCode=a.charCode||("keypress"==c?a.keyCode:0);this.ctrlKey=a.ctrlKey;this.altKey=a.altKey;this.shiftKey=a.shiftKey;this.metaKey=a.metaKey;this.state=a.state;this.ja=a;a.defaultPrevented&&this.preventDefault()}};w(Jb,A);
|
|
Jb.prototype.preventDefault=function(){Jb.j.preventDefault.call(this);var a=this.ja;if(a.preventDefault)a.preventDefault();else if(a.returnValue=!1,Ib)try{if(a.ctrlKey||112<=a.keyCode&&123>=a.keyCode)a.keyCode=-1}catch(b){}};var Kb="closure_listenable_"+(1E6*Math.random()|0),Lb=function(a){return!(!a||!a[Kb])},Mb=0;var Nb=function(a,b,c,d,e){this.listener=a;this.Eb=null;this.src=b;this.type=c;this.nb=!!d;this.ca=e;this.key=++Mb;this.Ja=this.mb=!1},Ob=function(a){a.Ja=!0;a.listener=null;a.Eb=null;a.src=null;a.ca=null};var Pb=function(a){this.src=a;this.F={};this.hb=0};Pb.prototype.add=function(a,b,c,d,e){var f=a.toString();a=this.F[f];a||(a=this.F[f]=[],this.hb++);var g=Qb(a,b,d,e);-1<g?(b=a[g],c||(b.mb=!1)):(b=new Nb(b,this.src,f,!!d,e),b.mb=c,a.push(b));return b};Pb.prototype.remove=function(a,b,c,d){a=a.toString();if(!(a in this.F))return!1;var e=this.F[a];b=Qb(e,b,c,d);return-1<b?(Ob(e[b]),Sa(e,b),0==e.length&&(delete this.F[a],this.hb--),!0):!1};
|
|
var Rb=function(a,b){var c=b.type;c in a.F&&Ta(a.F[c],b)&&(Ob(b),0==a.F[c].length&&(delete a.F[c],a.hb--))};Pb.prototype.eb=function(a){a=a&&a.toString();var b=0,c;for(c in this.F)if(!a||c==a){for(var d=this.F[c],e=0;e<d.length;e++)++b,Ob(d[e]);delete this.F[c];this.hb--}return b};Pb.prototype.Va=function(a,b,c,d){a=this.F[a.toString()];var e=-1;a&&(e=Qb(a,b,c,d));return-1<e?a[e]:null};var Qb=function(a,b,c,d){for(var e=0;e<a.length;++e){var f=a[e];if(!f.Ja&&f.listener==b&&f.nb==!!c&&f.ca==d)return e}return-1};var Sb="closure_lm_"+(1E6*Math.random()|0),Tb={},Ub=0,Vb=function(a,b,c,d,e){if(n(b)){for(var f=0;f<b.length;f++)Vb(a,b[f],c,d,e);return null}c=Wb(c);return Lb(a)?a.X(b,c,d,e):Xb(a,b,c,!1,d,e)},Xb=function(a,b,c,d,e,f){if(!b)throw Error("Invalid event type");var g=!!e,m=Yb(a);m||(a[Sb]=m=new Pb(a));c=m.add(b,c,d,e,f);if(c.Eb)return c;d=Zb();c.Eb=d;d.src=a;d.listener=c;if(a.addEventListener)a.addEventListener(b.toString(),d,g);else if(a.attachEvent)a.attachEvent($b(b.toString()),d);else throw Error("addEventListener and attachEvent are unavailable.");
|
|
Ub++;return c},Zb=function(){var a=ac,b=Hb?function(c){return a.call(b.src,b.listener,c)}:function(c){c=a.call(b.src,b.listener,c);if(!c)return c};return b},bc=function(a,b,c,d,e){if(n(b)){for(var f=0;f<b.length;f++)bc(a,b[f],c,d,e);return null}c=Wb(c);return Lb(a)?a.cb(b,c,d,e):Xb(a,b,c,!0,d,e)},cc=function(a,b,c,d,e){if(n(b))for(var f=0;f<b.length;f++)cc(a,b[f],c,d,e);else c=Wb(c),Lb(a)?a.Pb(b,c,d,e):a&&(a=Yb(a))&&(b=a.Va(b,c,!!d,e))&&dc(b)},dc=function(a){if(!ha(a)&&a&&!a.Ja){var b=a.src;if(Lb(b))Rb(b.U,
|
|
a);else{var c=a.type,d=a.Eb;b.removeEventListener?b.removeEventListener(c,d,a.nb):b.detachEvent&&b.detachEvent($b(c),d);Ub--;(c=Yb(b))?(Rb(c,a),0==c.hb&&(c.src=null,b[Sb]=null)):Ob(a)}}},$b=function(a){return a in Tb?Tb[a]:Tb[a]="on"+a},fc=function(a,b,c,d){var e=!0;if(a=Yb(a))if(b=a.F[b.toString()])for(b=b.concat(),a=0;a<b.length;a++){var f=b[a];f&&f.nb==c&&!f.Ja&&(f=ec(f,d),e=e&&!1!==f)}return e},ec=function(a,b){var c=a.listener,d=a.ca||a.src;a.mb&&dc(a);return c.call(d,b)},ac=function(a,b){if(a.Ja)return!0;
|
|
if(!Hb){var c;if(!(c=b))a:{c=["window","event"];for(var d=k,e;e=c.shift();)if(null!=d[e])d=d[e];else{c=null;break a}c=d}e=c;c=new Jb(e,this);d=!0;if(!(0>e.keyCode||void 0!=e.returnValue)){a:{var f=!1;if(0==e.keyCode)try{e.keyCode=-1;break a}catch(v){f=!0}if(f||void 0==e.returnValue)e.returnValue=!0}e=[];for(f=c.currentTarget;f;f=f.parentNode)e.push(f);for(var f=a.type,g=e.length-1;!c.Ia&&0<=g;g--){c.currentTarget=e[g];var m=fc(e[g],f,!0,c),d=d&&m}for(g=0;!c.Ia&&g<e.length;g++)c.currentTarget=e[g],
|
|
m=fc(e[g],f,!1,c),d=d&&m}return d}return ec(a,new Jb(b,this))},Yb=function(a){a=a[Sb];return a instanceof Pb?a:null},gc="__closure_events_fn_"+(1E9*Math.random()>>>0),Wb=function(a){y(a,"Listener can not be null.");if(q(a))return a;y(a.handleEvent,"An object listener must have handleEvent method.");a[gc]||(a[gc]=function(b){return a.handleEvent(b)});return a[gc]};var hc=function(a){z.call(this);this.ta=a;this.i={}};w(hc,z);var ic=[];hc.prototype.X=function(a,b,c,d){n(b)||(b&&(ic[0]=b.toString()),b=ic);for(var e=0;e<b.length;e++){var f=Vb(a,b[e],c||this.handleEvent,d||!1,this.ta||this);if(!f)break;this.i[f.key]=f}return this};hc.prototype.cb=function(a,b,c,d){return jc(this,a,b,c,d)};var jc=function(a,b,c,d,e,f){if(n(c))for(var g=0;g<c.length;g++)jc(a,b,c[g],d,e,f);else{b=bc(b,c,d||a.handleEvent,e,f||a.ta||a);if(!b)return a;a.i[b.key]=b}return a};
|
|
hc.prototype.Pb=function(a,b,c,d,e){if(n(b))for(var f=0;f<b.length;f++)this.Pb(a,b[f],c,d,e);else c=c||this.handleEvent,e=e||this.ta||this,c=Wb(c),d=!!d,b=Lb(a)?a.Va(b,c,d,e):a?(a=Yb(a))?a.Va(b,c,d,e):null:null,b&&(dc(b),delete this.i[b.key]);return this};hc.prototype.eb=function(){$a(this.i,function(a,b){this.i.hasOwnProperty(b)&&dc(a)},this);this.i={}};hc.prototype.c=function(){hc.j.c.call(this);this.eb()};
|
|
hc.prototype.handleEvent=function(){throw Error("EventHandler.handleEvent not implemented");};var B=function(){z.call(this);this.U=new Pb(this);this.Zd=this;this.xc=null};w(B,z);B.prototype[Kb]=!0;h=B.prototype;h.addEventListener=function(a,b,c,d){Vb(this,a,b,c,d)};h.removeEventListener=function(a,b,c,d){cc(this,a,b,c,d)};
|
|
h.dispatchEvent=function(a){kc(this);var b,c=this.xc;if(c){b=[];for(var d=1;c;c=c.xc)b.push(c),y(1E3>++d,"infinite loop")}c=this.Zd;d=a.type||a;if(p(a))a=new A(a,c);else if(a instanceof A)a.target=a.target||c;else{var e=a;a=new A(d,c);lb(a,e)}var e=!0,f;if(b)for(var g=b.length-1;!a.Ia&&0<=g;g--)f=a.currentTarget=b[g],e=lc(f,d,!0,a)&&e;a.Ia||(f=a.currentTarget=c,e=lc(f,d,!0,a)&&e,a.Ia||(e=lc(f,d,!1,a)&&e));if(b)for(g=0;!a.Ia&&g<b.length;g++)f=a.currentTarget=b[g],e=lc(f,d,!1,a)&&e;return e};
|
|
h.c=function(){B.j.c.call(this);this.U&&this.U.eb(void 0);this.xc=null};h.X=function(a,b,c,d){kc(this);return this.U.add(String(a),b,!1,c,d)};h.cb=function(a,b,c,d){return this.U.add(String(a),b,!0,c,d)};h.Pb=function(a,b,c,d){return this.U.remove(String(a),b,c,d)};var lc=function(a,b,c,d){b=a.U.F[String(b)];if(!b)return!0;b=b.concat();for(var e=!0,f=0;f<b.length;++f){var g=b[f];if(g&&!g.Ja&&g.nb==c){var m=g.listener,v=g.ca||g.src;g.mb&&Rb(a.U,g);e=!1!==m.call(v,d)&&e}}return e&&0!=d.Pd};
|
|
B.prototype.Va=function(a,b,c,d){return this.U.Va(String(a),b,c,d)};var kc=function(a){y(a.U,"Event target is not initialized. Did you call the superclass (goog.events.EventTarget) constructor?")};var mc=function(a,b,c){this.se=c;this.ke=a;this.Ee=b;this.Cb=0;this.xb=null};mc.prototype.get=function(){var a;0<this.Cb?(this.Cb--,a=this.xb,this.xb=a.next,a.next=null):a=this.ke();return a};mc.prototype.put=function(a){this.Ee(a);this.Cb<this.se&&(this.Cb++,a.next=this.xb,this.xb=a)};var nc=function(a){return a};var oc=function(a){k.setTimeout(function(){throw a;},0)},pc,qc=function(){var a=k.MessageChannel;"undefined"===typeof a&&"undefined"!==typeof window&&window.postMessage&&window.addEventListener&&!sb("Presto")&&(a=function(){var a=document.createElement("IFRAME");a.style.display="none";a.src="";document.documentElement.appendChild(a);var b=a.contentWindow,a=b.document;a.open();a.write("");a.close();var c="callImmediate"+Math.random(),d="file:"==b.location.protocol?"*":b.location.protocol+"//"+b.location.host,
|
|
a=t(function(a){if(("*"==d||a.origin==d)&&a.data==c)this.port1.onmessage()},this);b.addEventListener("message",a,!1);this.port1={};this.port2={postMessage:function(){b.postMessage(c,d)}}});if("undefined"!==typeof a&&!sb("Trident")&&!sb("MSIE")){var b=new a,c={},d=c;b.port1.onmessage=function(){if(l(c.next)){c=c.next;var a=c.Tc;c.Tc=null;a()}};return function(a){d.next={Tc:a};d=d.next;b.port2.postMessage(0)}}return"undefined"!==typeof document&&"onreadystatechange"in document.createElement("SCRIPT")?
|
|
function(a){var b=document.createElement("SCRIPT");b.onreadystatechange=function(){b.onreadystatechange=null;b.parentNode.removeChild(b);b=null;a();a=null};document.documentElement.appendChild(b)}:function(a){k.setTimeout(a,0)}};var rc=function(){this.Rb=this.ya=null},tc=new mc(function(){return new sc},function(a){a.reset()},100);rc.prototype.add=function(a,b){var c=tc.get();c.set(a,b);this.Rb?this.Rb.next=c:(y(!this.ya),this.ya=c);this.Rb=c};rc.prototype.remove=function(){var a=null;this.ya&&(a=this.ya,this.ya=this.ya.next,this.ya||(this.Rb=null),a.next=null);return a};var sc=function(){this.next=this.scope=this.jc=null};sc.prototype.set=function(a,b){this.jc=a;this.scope=b;this.next=null};
|
|
sc.prototype.reset=function(){this.next=this.scope=this.jc=null};var yc=function(a,b){uc||vc();wc||(uc(),wc=!0);xc.add(a,b)},uc,vc=function(){if(k.Promise&&k.Promise.resolve){var a=k.Promise.resolve(void 0);uc=function(){a.then(zc)}}else uc=function(){var a=zc;!q(k.setImmediate)||k.Window&&k.Window.prototype&&!sb("Edge")&&k.Window.prototype.setImmediate==k.setImmediate?(pc||(pc=qc()),pc(a)):k.setImmediate(a)}},wc=!1,xc=new rc,zc=function(){for(var a;a=xc.remove();){try{a.jc.call(a.scope)}catch(b){oc(b)}tc.put(a)}wc=!1};var Ac=function(a){a.prototype.then=a.prototype.then;a.prototype.$goog_Thenable=!0},Bc=function(a){if(!a)return!1;try{return!!a.$goog_Thenable}catch(b){return!1}};var Ec=function(a,b){this.K=0;this.fa=void 0;this.Ba=this.$=this.m=null;this.vb=this.fc=!1;if(a!=ba)try{var c=this;a.call(b,function(a){Cc(c,2,a)},function(a){if(!(a instanceof Dc))try{if(a instanceof Error)throw a;throw Error("Promise rejected.");}catch(e){}Cc(c,3,a)})}catch(d){Cc(this,3,d)}},Fc=function(){this.next=this.context=this.Fa=this.va=this.qa=null;this.lb=!1};Fc.prototype.reset=function(){this.context=this.Fa=this.va=this.qa=null;this.lb=!1};
|
|
var Gc=new mc(function(){return new Fc},function(a){a.reset()},100),Hc=function(a,b,c){var d=Gc.get();d.va=a;d.Fa=b;d.context=c;return d};Ec.prototype.then=function(a,b,c){null!=a&&Ea(a,"opt_onFulfilled should be a function.");null!=b&&Ea(b,"opt_onRejected should be a function. Did you pass opt_context as the second argument instead of the third?");return Ic(this,q(a)?a:null,q(b)?b:null,c)};Ac(Ec);Ec.prototype.cancel=function(a){0==this.K&&yc(function(){var b=new Dc(a);Jc(this,b)},this)};
|
|
var Jc=function(a,b){if(0==a.K)if(a.m){var c=a.m;if(c.$){for(var d=0,e=null,f=null,g=c.$;g&&(g.lb||(d++,g.qa==a&&(e=g),!(e&&1<d)));g=g.next)e||(f=g);e&&(0==c.K&&1==d?Jc(c,b):(f?(d=f,y(c.$),y(null!=d),d.next==c.Ba&&(c.Ba=d),d.next=d.next.next):Kc(c),Lc(c,e,3,b)))}a.m=null}else Cc(a,3,b)},Nc=function(a,b){a.$||2!=a.K&&3!=a.K||Mc(a);y(null!=b.va);a.Ba?a.Ba.next=b:a.$=b;a.Ba=b},Ic=function(a,b,c,d){var e=Hc(null,null,null);e.qa=new Ec(function(a,g){e.va=b?function(c){try{var e=b.call(d,c);a(e)}catch(ca){g(ca)}}:
|
|
a;e.Fa=c?function(b){try{var e=c.call(d,b);!l(e)&&b instanceof Dc?g(b):a(e)}catch(ca){g(ca)}}:g});e.qa.m=a;Nc(a,e);return e.qa};Ec.prototype.Ie=function(a){y(1==this.K);this.K=0;Cc(this,2,a)};Ec.prototype.Je=function(a){y(1==this.K);this.K=0;Cc(this,3,a)};
|
|
var Cc=function(a,b,c){if(0==a.K){a===c&&(b=3,c=new TypeError("Promise cannot resolve to itself"));a.K=1;var d;a:{var e=c,f=a.Ie,g=a.Je;if(e instanceof Ec)null!=f&&Ea(f,"opt_onFulfilled should be a function."),null!=g&&Ea(g,"opt_onRejected should be a function. Did you pass opt_context as the second argument instead of the third?"),Nc(e,Hc(f||ba,g||null,a)),d=!0;else if(Bc(e))e.then(f,g,a),d=!0;else{if(r(e))try{var m=e.then;if(q(m)){Oc(e,m,f,g,a);d=!0;break a}}catch(v){g.call(a,v);d=!0;break a}d=
|
|
!1}}d||(a.fa=c,a.K=b,a.m=null,Mc(a),3!=b||c instanceof Dc||Pc(a,c))}},Oc=function(a,b,c,d,e){var f=!1,g=function(a){f||(f=!0,c.call(e,a))},m=function(a){f||(f=!0,d.call(e,a))};try{b.call(a,g,m)}catch(v){m(v)}},Mc=function(a){a.fc||(a.fc=!0,yc(a.le,a))},Kc=function(a){var b=null;a.$&&(b=a.$,a.$=b.next,b.next=null);a.$||(a.Ba=null);null!=b&&y(null!=b.va);return b};Ec.prototype.le=function(){for(var a;a=Kc(this);)Lc(this,a,this.K,this.fa);this.fc=!1};
|
|
var Lc=function(a,b,c,d){if(3==c&&b.Fa&&!b.lb)for(;a&&a.vb;a=a.m)a.vb=!1;if(b.qa)b.qa.m=null,Qc(b,c,d);else try{b.lb?b.va.call(b.context):Qc(b,c,d)}catch(e){Rc.call(null,e)}Gc.put(b)},Qc=function(a,b,c){2==b?a.va.call(a.context,c):a.Fa&&a.Fa.call(a.context,c)},Pc=function(a,b){a.vb=!0;yc(function(){a.vb&&Rc.call(null,b)})},Rc=oc,Dc=function(a){x.call(this,a)};w(Dc,x);Dc.prototype.name="cancel";/*
|
|
Portions of this code are from MochiKit, received by
|
|
The Closure Authors under the MIT license. All other code is Copyright
|
|
2005-2009 The Closure Authors. All Rights Reserved.
|
|
*/
|
|
var Sc=function(a,b){this.Hb=[];this.Gd=a;this.Xc=b||null;this.Ya=this.Ea=!1;this.fa=void 0;this.Cc=this.Qc=this.Xb=!1;this.Ob=0;this.m=null;this.Yb=0};Sc.prototype.cancel=function(a){if(this.Ea)this.fa instanceof Sc&&this.fa.cancel();else{if(this.m){var b=this.m;delete this.m;a?b.cancel(a):(b.Yb--,0>=b.Yb&&b.cancel())}this.Gd?this.Gd.call(this.Xc,this):this.Cc=!0;this.Ea||Tc(this,new Uc)}};Sc.prototype.Uc=function(a,b){this.Xb=!1;Vc(this,a,b)};
|
|
var Vc=function(a,b,c){a.Ea=!0;a.fa=c;a.Ya=!b;Wc(a)},Yc=function(a){if(a.Ea){if(!a.Cc)throw new Xc;a.Cc=!1}};Sc.prototype.Zb=function(a){Yc(this);Zc(a);Vc(this,!0,a)};var Tc=function(a,b){Yc(a);Zc(b);Vc(a,!1,b)},Zc=function(a){y(!(a instanceof Sc),"An execution sequence may not be initiated with a blocking Deferred.")},$c=function(a,b,c){y(!a.Qc,"Blocking Deferreds can not be re-used");a.Hb.push([b,c,void 0]);a.Ea&&Wc(a)};
|
|
Sc.prototype.then=function(a,b,c){var d,e,f=new Ec(function(a,b){d=a;e=b});$c(this,d,function(a){a instanceof Uc?f.cancel():e(a)});return f.then(a,b,c)};Ac(Sc);
|
|
var ad=function(a){return Ma(a.Hb,function(a){return q(a[1])})},Wc=function(a){if(a.Ob&&a.Ea&&ad(a)){var b=a.Ob,c=bd[b];c&&(k.clearTimeout(c.da),delete bd[b]);a.Ob=0}a.m&&(a.m.Yb--,delete a.m);for(var b=a.fa,d=c=!1;a.Hb.length&&!a.Xb;){var e=a.Hb.shift(),f=e[0],g=e[1],e=e[2];if(f=a.Ya?g:f)try{var m=f.call(e||a.Xc,b);l(m)&&(a.Ya=a.Ya&&(m==b||m instanceof Error),a.fa=b=m);if(Bc(b)||"function"===typeof k.Promise&&b instanceof k.Promise)d=!0,a.Xb=!0}catch(v){b=v,a.Ya=!0,ad(a)||(c=!0)}}a.fa=b;d&&(m=t(a.Uc,
|
|
a,!0),d=t(a.Uc,a,!1),b instanceof Sc?($c(b,m,d),b.Qc=!0):b.then(m,d));c&&(b=new cd(b),bd[b.da]=b,a.Ob=b.da)},Xc=function(){x.call(this)};w(Xc,x);Xc.prototype.message="Deferred has already fired";Xc.prototype.name="AlreadyCalledError";var Uc=function(){x.call(this)};w(Uc,x);Uc.prototype.message="Deferred was canceled";Uc.prototype.name="CanceledError";var cd=function(a){this.da=k.setTimeout(t(this.He,this),0);this.sb=a};
|
|
cd.prototype.He=function(){y(bd[this.da],"Cannot throw an error that is not scheduled.");delete bd[this.da];throw this.sb;};var bd={};var ed=function(a,b){l(a.name)?(this.name=a.name,this.code=eb[a.name]):(this.code=a.code,this.name=dd(a.code));x.call(this,pa("%s %s",this.name,b))};w(ed,x);var dd=function(a){var b=fb(function(b){return a==b});if(!l(b))throw Error("Invalid code: "+a);return b},eb={AbortError:3,EncodingError:5,InvalidModificationError:9,InvalidStateError:7,NotFoundError:1,NotReadableError:4,NoModificationAllowedError:6,PathExistsError:12,QuotaExceededError:10,SecurityError:2,SyntaxError:8,TypeMismatchError:11};var fd=function(a,b){A.call(this,a.type,b);this.ja=a};w(fd,A);var gd=function(){B.call(this);this.J=new FileReader;this.J.onloadstart=t(this.Ca,this);this.J.onprogress=t(this.Ca,this);this.J.onload=t(this.Ca,this);this.J.onabort=t(this.Ca,this);this.J.onerror=t(this.Ca,this);this.J.onloadend=t(this.Ca,this)};w(gd,B);h=gd.prototype;h.abort=function(){try{this.J.abort()}catch(a){throw new ed(a,"aborting read");}};h.ka=function(){return this.J.readyState};h.Ca=function(a){this.dispatchEvent(new fd(a,this))};h.c=function(){gd.j.c.call(this);delete this.J};
|
|
h.readAsArrayBuffer=function(a){this.J.readAsArrayBuffer(a)};h.readAsText=function(a,b){this.J.readAsText(a,b)};var hd=function(a){return/^\s*$/.test(a)?!1:/^[\],:{}\s\u2028\u2029]*$/.test(a.replace(/\\["\\\/bfnrtu]/g,"@").replace(/(?:"[^"\\\n\r\u2028\u2029\x00-\x08\x0a-\x1f]*"|true|false|null|-?\d+(?:\.\d*)?(?:[eE][+\-]?\d+)?)[\s\u2028\u2029]*(?=:|,|]|}|$)/g,"]").replace(/(?:^|:|,)(?:[\s\u2028\u2029]*\[)+/g,""))},id=function(a){a=String(a);if(hd(a))try{return eval("("+a+")")}catch(b){}throw Error("Invalid JSON string: "+a);},jd=function(a){return eval("("+a+")")},ld=function(a){return(new kd(void 0)).v(a)},
|
|
kd=function(a){this.Fb=a};kd.prototype.v=function(a){var b=[];md(this,a,b);return b.join("")};
|
|
var md=function(a,b,c){if(null==b)c.push("null");else{if("object"==typeof b){if(n(b)){var d=b;b=d.length;c.push("[");for(var e="",f=0;f<b;f++)c.push(e),e=d[f],md(a,a.Fb?a.Fb.call(d,String(f),e):e,c),e=",";c.push("]");return}if(b instanceof String||b instanceof Number||b instanceof Boolean)b=b.valueOf();else{c.push("{");f="";for(d in b)Object.prototype.hasOwnProperty.call(b,d)&&(e=b[d],"function"!=typeof e&&(c.push(f),nd(d,c),c.push(":"),md(a,a.Fb?a.Fb.call(b,d,e):e,c),f=","));c.push("}");return}}switch(typeof b){case "string":nd(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);}}},od={'"':'\\"',"\\":"\\\\","/":"\\/","\b":"\\b","\f":"\\f","\n":"\\n","\r":"\\r","\t":"\\t","\x0B":"\\u000b"},pd=/\uffff/.test("\uffff")?/[\\\"\x00-\x1f\x7f-\uffff]/g:/[\\\"\x00-\x1f\x7f-\xff]/g,nd=function(a,b){b.push('"',a.replace(pd,function(a){var b=od[a];b||(b="\\u"+(a.charCodeAt(0)|65536).toString(16).substr(1),
|
|
od[a]=b);return b}),'"')};var rd=function(){this.yc="";this.Yd=qd};rd.prototype.toString=function(){return"TrustedResourceUrl{"+this.yc+"}"};var qd={};var sd="StopIteration"in k?k.StopIteration:{message:"StopIteration",stack:""},td=function(){};td.prototype.next=function(){throw sd;};td.prototype.za=function(){return this};
|
|
var ud=function(a){if(a instanceof td)return a;if("function"==typeof a.za)return a.za(!1);if(ga(a)){var b=0,c=new td;c.next=function(){for(;;){if(b>=a.length)throw sd;if(b in a)return a[b++];b++}};return c}throw Error("Not implemented");},vd=function(a,b){if(ga(a))try{Ja(a,b,void 0)}catch(c){if(c!==sd)throw c;}else{a=ud(a);try{for(;;)b.call(void 0,a.next(),void 0,a)}catch(c){if(c!==sd)throw c;}}};var wd=function(a,b){this.u={};this.i=[];this.ib=this.h=0;var c=arguments.length;if(1<c){if(c%2)throw Error("Uneven number of arguments");for(var d=0;d<c;d+=2)this.set(arguments[d],arguments[d+1])}else a&&this.addAll(a)};h=wd.prototype;h.B=function(){return this.h};h.s=function(){xd(this);for(var a=[],b=0;b<this.i.length;b++)a.push(this.u[this.i[b]]);return a};h.P=function(){xd(this);return this.i.concat()};h.ia=function(a){return yd(this.u,a)};h.isEmpty=function(){return 0==this.h};
|
|
h.clear=function(){this.u={};this.ib=this.h=this.i.length=0};h.remove=function(a){return yd(this.u,a)?(delete this.u[a],this.h--,this.ib++,this.i.length>2*this.h&&xd(this),!0):!1};var xd=function(a){if(a.h!=a.i.length){for(var b=0,c=0;b<a.i.length;){var d=a.i[b];yd(a.u,d)&&(a.i[c++]=d);b++}a.i.length=c}if(a.h!=a.i.length){for(var e={},c=b=0;b<a.i.length;)d=a.i[b],yd(e,d)||(a.i[c++]=d,e[d]=1),b++;a.i.length=c}};h=wd.prototype;h.get=function(a,b){return yd(this.u,a)?this.u[a]:b};
|
|
h.set=function(a,b){yd(this.u,a)||(this.h++,this.i.push(a),this.ib++);this.u[a]=b};h.addAll=function(a){var b;a instanceof wd?(b=a.P(),a=a.s()):(b=db(a),a=cb(a));for(var c=0;c<b.length;c++)this.set(b[c],a[c])};h.forEach=function(a,b){for(var c=this.P(),d=0;d<c.length;d++){var e=c[d],f=this.get(e);a.call(b,f,e,this)}};h.clone=function(){return new wd(this)};
|
|
h.za=function(a){xd(this);var b=0,c=this.ib,d=this,e=new td;e.next=function(){if(c!=d.ib)throw Error("The map has changed since the iterator was created");if(b>=d.i.length)throw sd;var e=d.i[b++];return a?e:d.u[e]};return e};var yd=function(a,b){return Object.prototype.hasOwnProperty.call(a,b)};var zd=function(a){if(a.s&&"function"==typeof a.s)return a.s();if(p(a))return a.split("");if(ga(a)){for(var b=[],c=a.length,d=0;d<c;d++)b.push(a[d]);return b}return cb(a)},Ad=function(a,b){if(a.forEach&&"function"==typeof a.forEach)a.forEach(b,void 0);else if(ga(a)||p(a))Ja(a,b,void 0);else{var c;if(a.P&&"function"==typeof a.P)c=a.P();else if(a.s&&"function"==typeof a.s)c=void 0;else if(ga(a)||p(a)){c=[];for(var d=a.length,e=0;e<d;e++)c.push(e)}else c=db(a);for(var d=zd(a),e=d.length,f=0;f<e;f++)b.call(void 0,
|
|
d[f],c&&c[f],a)}};var Bd=function(a){this.u=new wd;a&&this.addAll(a)},Cd=function(a){var b=typeof a;return"object"==b&&a||"function"==b?"o"+(a[ia]||(a[ia]=++ja)):b.substr(0,1)+a};h=Bd.prototype;h.B=function(){return this.u.B()};h.add=function(a){this.u.set(Cd(a),a)};h.addAll=function(a){a=zd(a);for(var b=a.length,c=0;c<b;c++)this.add(a[c])};h.eb=function(a){a=zd(a);for(var b=a.length,c=0;c<b;c++)this.remove(a[c])};h.remove=function(a){return this.u.remove(Cd(a))};h.clear=function(){this.u.clear()};h.isEmpty=function(){return this.u.isEmpty()};
|
|
h.contains=function(a){return this.u.ia(Cd(a))};var Dd=function(a,b){for(var c=new Bd,d=zd(b),e=0;e<d.length;e++){var f=d[e];a.contains(f)&&c.add(f)}return c},Ed=function(a,b){var c=a.clone();c.eb(b);return c};Bd.prototype.s=function(){return this.u.s()};Bd.prototype.clone=function(){return new Bd(this)};Bd.prototype.za=function(){return this.u.za(!1)};var Fd=function(a,b,c,d,e){this.reset(a,b,c,d,e)};Fd.prototype.bd=null;var Gd=0;Fd.prototype.reset=function(a,b,c,d,e){"number"==typeof e||Gd++;d||na();this.bb=a;this.xe=b;delete this.bd};Fd.prototype.Sd=function(a){this.bb=a};var Hd=function(a){this.ye=a;this.nd=this.$b=this.bb=this.m=null},Id=function(a,b){this.name=a;this.value=b};Id.prototype.toString=function(){return this.name};var Jd=new Id("SEVERE",1E3),Kd=new Id("CONFIG",700),Ld=new Id("FINE",500);Hd.prototype.getParent=function(){return this.m};Hd.prototype.hd=function(){this.$b||(this.$b={});return this.$b};Hd.prototype.Sd=function(a){this.bb=a};var Md=function(a){if(a.bb)return a.bb;if(a.m)return Md(a.m);Ca("Root logger has no level set.");return null};
|
|
Hd.prototype.log=function(a,b,c){if(a.value>=Md(this).value)for(q(b)&&(b=b()),a=new Fd(a,String(b),this.ye),c&&(a.bd=c),c="log:"+a.xe,k.console&&(k.console.timeStamp?k.console.timeStamp(c):k.console.markTimeline&&k.console.markTimeline(c)),k.msWriteProfilerMark&&k.msWriteProfilerMark(c),c=this;c;){b=c;var d=a;if(b.nd)for(var e=0,f;f=b.nd[e];e++)f(d);c=c.getParent()}};
|
|
var Nd={},Od=null,Pd=function(a){Od||(Od=new Hd(""),Nd[""]=Od,Od.Sd(Kd));var b;if(!(b=Nd[a])){b=new Hd(a);var c=a.lastIndexOf("."),d=a.substr(c+1),c=Pd(a.substr(0,c));c.hd()[d]=b;b.m=c;Nd[a]=b}return b};var Qd=function(a,b){a&&a.log(Ld,b,void 0)};var Rd=function(a,b,c){if(q(a))c&&(a=t(a,c));else if(a&&"function"==typeof a.handleEvent)a=t(a.handleEvent,a);else throw Error("Invalid listener argument");return 2147483647<Number(b)?-1:k.setTimeout(a,b||0)};var Sd=/^(?:([^:/?#.]+):)?(?:\/\/(?:([^/?#]*)@)?([^/#?]*?)(?::([0-9]+))?(?=[/#?]|$))?([^?#]+)?(?:\?([^#]*))?(?:#([\s\S]*))?$/,Td=function(a,b){if(a)for(var c=a.split("&"),d=0;d<c.length;d++){var e=c[d].indexOf("="),f,g=null;0<=e?(f=c[d].substring(0,e),g=c[d].substring(e+1)):f=c[d];b(f,g?decodeURIComponent(g.replace(/\+/g," ")):"")}};var Ud=function(){};Ud.prototype.Sc=null;Ud.prototype.ob=da;Ud.prototype.Xa=function(){return this.Sc||(this.Sc=this.sd())};Ud.prototype.sd=da;var Vd=function(a,b){this.Ke=a;this.Be=b};w(Vd,Ud);Vd.prototype.ob=function(){return this.Ke()};Vd.prototype.Xa=function(){return this.Be()};var Wd=function(){return Wd.cd.ob()};Wd.Xd=!1;Wd.Xa=function(){return Wd.cd.Xa()};Wd.Se=function(a,b){Wd.Rd(new Vd(y(a),y(b)))};Wd.Rd=function(a){Wd.cd=a};var Xd=function(){};w(Xd,Ud);Xd.prototype.ob=function(){var a=Yd(this);return a?new ActiveXObject(a):new XMLHttpRequest};Xd.prototype.sd=function(){var a={};Yd(this)&&(a[0]=!0,a[1]=!0);return a};
|
|
var Yd=function(a){if(Wd.Xd)return"";if(!a.od&&"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.od=d}catch(e){}}throw Error("Could not create ActiveXObject. ActiveX might be disabled, or MSXML might not be installed");}return a.od};Wd.Rd(new Xd);var C=function(a){B.call(this);this.headers=new wd;this.Tb=a||null;this.M=!1;this.Sb=this.a=null;this.ab=this.wd=this.Ab="";this.ua=this.oc=this.yb=this.ec=!1;this.Na=0;this.Jb=null;this.La="";this.Qb=this.Ce=this.Wd=!1};w(C,B);var Zd=C.prototype,$d=Pd("goog.net.XhrIo");Zd.G=$d;var ae=/^https?$/i,be=["POST","PUT"],ce=[];C.prototype.ge=function(){this.T();Ta(ce,this)};
|
|
C.prototype.send=function(a,b,c,d){if(this.a)throw Error("[goog.net.XhrIo] Object is active with another request="+this.Ab+"; newUri="+a);b=b?b.toUpperCase():"GET";this.Ab=a;this.ab="";this.wd=b;this.ec=!1;this.M=!0;this.a=this.Tb?this.Tb.ob():Wd();this.Sb=this.Tb?this.Tb.Xa():Wd.Xa();this.a.onreadystatechange=t(this.Jd,this);this.Ce&&"onprogress"in this.a&&(this.a.onprogress=t(function(a){this.Id(a,!0)},this),this.a.upload&&(this.a.upload.onprogress=t(this.Id,this)));try{Qd(this.G,de(this,"Opening Xhr")),
|
|
this.oc=!0,this.a.open(b,String(a),!0),this.oc=!1}catch(f){Qd(this.G,de(this,"Error opening Xhr: "+f.message));this.sb(5,f);return}a=c||"";var e=this.headers.clone();d&&Ad(d,function(a,b){e.set(b,a)});d=Qa(e.P());c=k.FormData&&a instanceof k.FormData;!(0<=Ha(be,b))||d||c||e.set("Content-Type","application/x-www-form-urlencoded;charset=utf-8");e.forEach(function(a,b){this.a.setRequestHeader(b,a)},this);this.La&&(this.a.responseType=this.La);"withCredentials"in this.a&&this.a.withCredentials!==this.Wd&&
|
|
(this.a.withCredentials=this.Wd);try{fe(this),0<this.Na&&(this.Qb=ge(this.a),Qd(this.G,de(this,"Will abort after "+this.Na+"ms if incomplete, xhr2 "+this.Qb)),this.Qb?(this.a.timeout=this.Na,this.a.ontimeout=t(this.fb,this)):this.Jb=Rd(this.fb,this.Na,this)),Qd(this.G,de(this,"Sending request")),this.yb=!0,this.a.send(a),this.yb=!1}catch(f){Qd(this.G,de(this,"Send error: "+f.message)),this.sb(5,f)}};
|
|
var ge=function(a){return ub&&Eb(9)&&ha(a.timeout)&&l(a.ontimeout)},Pa=function(a){return"content-type"==a.toLowerCase()};C.prototype.fb=function(){"undefined"!=typeof aa&&this.a&&(this.ab="Timed out after "+this.Na+"ms, aborting",Qd(this.G,de(this,this.ab)),this.dispatchEvent("timeout"),this.abort(8))};C.prototype.sb=function(a,b){this.M=!1;this.a&&(this.ua=!0,this.a.abort(),this.ua=!1);this.ab=b;he(this);ie(this)};var he=function(a){a.ec||(a.ec=!0,a.dispatchEvent("complete"),a.dispatchEvent("error"))};
|
|
C.prototype.abort=function(){this.a&&this.M&&(Qd(this.G,de(this,"Aborting")),this.M=!1,this.ua=!0,this.a.abort(),this.ua=!1,this.dispatchEvent("complete"),this.dispatchEvent("abort"),ie(this))};C.prototype.c=function(){this.a&&(this.M&&(this.M=!1,this.ua=!0,this.a.abort(),this.ua=!1),ie(this,!0));C.j.c.call(this)};C.prototype.Jd=function(){this.aa||(this.oc||this.yb||this.ua?je(this):this.ze())};C.prototype.ze=function(){je(this)};
|
|
var je=function(a){if(a.M&&"undefined"!=typeof aa)if(a.Sb[1]&&4==a.ka()&&2==a.getStatus())Qd(a.G,de(a,"Local request error detected and ignored"));else if(a.yb&&4==a.ka())Rd(a.Jd,0,a);else if(a.dispatchEvent("readystatechange"),4==a.ka()){Qd(a.G,de(a,"Request complete"));a.M=!1;try{var b=a.getStatus(),c;a:switch(b){case 200:case 201:case 202:case 204:case 206:case 304:case 1223:c=!0;break a;default:c=!1}var d;if(!(d=c)){var e;if(e=0===b){var f=String(a.Ab).match(Sd)[1]||null;if(!f&&k.self&&k.self.location)var g=
|
|
k.self.location.protocol,f=g.substr(0,g.length-1);e=!ae.test(f?f.toLowerCase():"")}d=e}if(d)a.dispatchEvent("complete"),a.dispatchEvent("success");else{var m;try{m=2<a.ka()?a.a.statusText:""}catch(v){Qd(a.G,"Can not get status: "+v.message),m=""}a.ab=m+" ["+a.getStatus()+"]";he(a)}}finally{ie(a)}}};
|
|
C.prototype.Id=function(a,b){y("progress"===a.type,"goog.net.EventType.PROGRESS is of the same type as raw XHR progress.");this.dispatchEvent(ke(a,"progress"));this.dispatchEvent(ke(a,b?"downloadprogress":"uploadprogress"))};
|
|
var ke=function(a,b){return{type:b,lengthComputable:a.lengthComputable,loaded:a.loaded,total:a.total}},ie=function(a,b){if(a.a){fe(a);var c=a.a,d=a.Sb[0]?ba:null;a.a=null;a.Sb=null;b||a.dispatchEvent("ready");try{c.onreadystatechange=d}catch(e){(c=a.G)&&c.log(Jd,"Problem encountered resetting onreadystatechange: "+e.message,void 0)}}},fe=function(a){a.a&&a.Qb&&(a.a.ontimeout=null);ha(a.Jb)&&(k.clearTimeout(a.Jb),a.Jb=null)};C.prototype.td=function(){return!!this.a};
|
|
C.prototype.ka=function(){return this.a?this.a.readyState:0};C.prototype.getStatus=function(){try{return 2<this.ka()?this.a.status:-1}catch(a){return-1}};
|
|
var le=function(a){try{if(!a.a)return null;if("response"in a.a)return a.a.response;switch(a.La){case "":case "text":return a.a.responseText;case "arraybuffer":if("mozResponseArrayBuffer"in a.a)return a.a.mozResponseArrayBuffer}var b=a.G;b&&b.log(Jd,"Response type "+a.La+" is not supported on this browser",void 0);return null}catch(c){return Qd(a.G,"Can not get response: "+c.message),null}};C.prototype.getResponseHeader=function(a){return this.a&&4==this.ka()?this.a.getResponseHeader(a):void 0};
|
|
C.prototype.getAllResponseHeaders=function(){return this.a&&4==this.ka()?this.a.getAllResponseHeaders():""};var me=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;d=2;for(var e=a[c].split(": "),f=[];0<d&&e.length;)f.push(e.shift()),d--;e.length&&f.push(e.join(": "));d=f;b[d[0]]=b[d[0]]?b[d[0]]+(", "+d[1]):d[1]}return b},de=function(a,b){return b+" ["+a.wd+" "+a.Ab+" "+a.getStatus()+"]"};var ne=!ub||9<=Number(Fb),oe=!wb&&!ub||ub&&9<=Number(Fb)||wb&&Eb("1.9.1");ub&&Eb("9");var qe=function(a,b){$a(b,function(b,d){"style"==d?a.style.cssText=b:"class"==d?a.className=b:"for"==d?a.htmlFor=b:pe.hasOwnProperty(d)?a.setAttribute(pe[d],b):0==d.lastIndexOf("aria-",0)||0==d.lastIndexOf("data-",0)?a.setAttribute(d,b):a[d]=b})},pe={cellpadding:"cellPadding",cellspacing:"cellSpacing",colspan:"colSpan",frameborder:"frameBorder",height:"height",maxlength:"maxLength",nonce:"nonce",role:"role",rowspan:"rowSpan",type:"type",usemap:"useMap",valign:"vAlign",width:"width"},se=function(a,
|
|
b,c){return re(document,arguments)},re=function(a,b){var c=String(b[0]),d=b[1];if(!ne&&d&&(d.name||d.type)){c=["<",c];d.name&&c.push(' name="',ya(d.name),'"');if(d.type){c.push(' type="',ya(d.type),'"');var e={};lb(e,d);delete e.type;d=e}c.push(">");c=c.join("")}c=a.createElement(c);d&&(p(d)?c.className=d:n(d)?c.className=d.join(" "):qe(c,d));2<b.length&&te(a,c,b);return c},te=function(a,b,c){function d(c){c&&b.appendChild(p(c)?a.createTextNode(c):c)}for(var e=2;e<c.length;e++){var f=c[e];!ga(f)||
|
|
r(f)&&0<f.nodeType?d(f):Ja(ue(f)?Va(f):f,d)}},ve=function(a){for(;a&&1!=a.nodeType;)a=a.nextSibling;return a},we=function(a){y(a,"Node cannot be null or undefined.");return 9==a.nodeType?a:a.ownerDocument||a.document},ue=function(a){if(a&&"number"==typeof a.length){if(r(a))return"function"==typeof a.item||"string"==typeof a.item;if(q(a))return"function"==typeof a.item}return!1},xe=function(a){this.qb=a||k.document||document};h=xe.prototype;h.getElementsByTagName=function(a,b){return(b||this.qb).getElementsByTagName(String(a))};
|
|
h.je=function(a,b,c){return re(this.qb,arguments)};h.createElement=function(a){return this.qb.createElement(String(a))};h.createTextNode=function(a){return this.qb.createTextNode(String(a))};h.appendChild=function(a,b){a.appendChild(b)};h.hd=function(a){return oe&&void 0!=a.children?a.children:Ka(a.childNodes,function(a){return 1==a.nodeType})};
|
|
h.contains=function(a,b){if(!a||!b)return!1;if(a.contains&&1==b.nodeType)return a==b||a.contains(b);if("undefined"!=typeof a.compareDocumentPosition)return a==b||!!(a.compareDocumentPosition(b)&16);for(;b&&a!=b;)b=b.parentNode;return b==a};var ye=function(a,b){y(a);var c=a.style;"opacity"in c?c.opacity=b:"MozOpacity"in c?c.MozOpacity=b:"filter"in c&&(c.filter=""===b?"":"alpha(opacity="+100*Number(b)+")")};var D=function(a,b){B.call(this);var c=b||{};this.minZoom=c.minZoom||0;this.maxZoom=c.maxZoom||20;if(!window.google||!window.google.maps)throw Error("Google Maps API hasn't been initialized.");this.tileSize=c.tileSize||new google.maps.Size(256,256);this.zb="isPng"in c?c.zb:!0;this.name=c.name;this.opacity="opacity"in c?c.opacity:1;this.pa=new wd;this.oa=0;this.Fc=a;this.ca=new hc(this);this.alt=this.radius=this.projection=void 0};w(D,B);u("ee.layers.AbstractOverlay",D);
|
|
D.prototype.Vb=function(a){return Vb(this,"tile-load",a)};D.prototype.addTileCallback=D.prototype.Vb;D.prototype.Ac=function(a){dc(a)};D.prototype.removeTileCallback=D.prototype.Ac;h=D.prototype;h.kc=function(){return ze(this,"loading")+ze(this,"new")};h.setOpacity=function(a){this.opacity=a;this.pa.forEach(function(a){ye(a.N,this.opacity)},this)};
|
|
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=Ae(this,a,b);var f=this.bc(d,b,c,a);f.tileSize=this.tileSize;ye(f.N,this.opacity);this.pa.set(a,f);this.ca.X(f,"status-changed",function(){"loaded"==f.getStatus()&&this.dispatchEvent(new Be(this.kc()));"failed"==f.getStatus()&&this.dispatchEvent(new Ce)});this.Fc.xd(f,(new Date).getTime()/1E3);return f.N};
|
|
h.releaseTile=function(a){var b=this.pa.get(a.id);this.pa.remove(a.id);b&&(b.abort(),Za(b))};h.bc=da;var Ae=function(a,b,c){b=[b.x,b.y,c,a.oa].join("-");a=a.Fc.kd();return[b,a].join("-")};D.prototype.c=function(){D.j.c.call(this);this.pa.forEach(Za);this.pa.clear();this.pa=null;Za(this.ca);this.Fc=this.ca=null};var ze=function(a,b){return Oa(a.pa.s(),function(a){return a.getStatus()==b})},Be=function(){A.call(this,"tile-load")};w(Be,A);var Ce=function(){A.call(this,"tile-fail")};w(Ce,A);
|
|
var De=function(a,b,c,d){B.call(this);this.he=a;this.zoom=b;this.N=c.createElement("div");this.N.id=d;this.ve=1;this.Dc="new";this.Od=0;this.rc=!1};w(De,B);
|
|
var Ge=function(a){if(!a.rc&&"loading"==a.getStatus())throw Error("startLoad() can only be invoked once. Use retryLoad() after the first attempt.");Ee(a,"loading");a.Z=new C;a.Z.La="blob";a.Z.X("complete",function(){var a=le(this.Z);if(200<=this.Z.getStatus()&&300>this.Z.getStatus())this.Fe=me(this.Z),this.Td=a,this.Ua();else{var c=new gd;c.X("loadend",function(){Fe(this,c.J.result)},void 0,this);c.readAsText(a)}},!1,a);a.Z.cb("ready",ma(Za,a.Z));a.Z.send(a.Ud,"GET")};
|
|
De.prototype.Ua=function(){Ee(this,"loaded")};De.prototype.Qa=function(){Za(this.Z)};var Fe=function(a,b){a.Od>=a.ve?(a.Re=b,Ee(a,"failed")):(a.Od++,a.rc=!0,a.Qa(),Ge(a),a.rc=!1)};De.prototype.abort=function(){this.Qa();Ee(this,"aborted")};De.prototype.getStatus=function(){return this.Dc};var Ee=function(a,b){a.Dc=b;a.dispatchEvent("status-changed")},He={aborted:!0,failed:!0,loaded:!0};De.prototype.c=function(){De.j.c.call(this);this.Qa();this.N.remove()};var Ie=function(){z.call(this)};w(Ie,z);Ie.prototype.xd=da;Ie.prototype.kd=da;var Je=function(a,b){D.call(this,a,b);this.Rc=new wd;this.Zc=new wd};w(Je,D);u("ee.layers.BinaryOverlay",Je);Je.prototype.bc=function(a,b,c,d){var e=new Ke(a,b,c,d);this.ca.X(e,"status-changed",function(){"loaded"==e.getStatus()&&(this.Rc.set(a,new Float32Array(e.ce)),this.Zc.set(a,e.N))});return e};Je.prototype.c=function(){Je.j.c.call(this);this.Zc=this.Rc=null};var Ke=function(a,b,c,d){De.call(this,a,b,c,d)};w(Ke,De);
|
|
Ke.prototype.Ua=function(){var a=new gd;a.X("loadend",function(){this.ce=a.J.result;De.prototype.Ua.call(this)},void 0,this);a.readAsArrayBuffer(this.Td)};var Le=function(a,b,c){z.call(this);this.te=null!=c?t(a,c):a;this.qe=b;this.de=t(this.Ae,this);this.Wb=[]};w(Le,z);h=Le.prototype;h.Ib=!1;h.Kd=0;h.Oa=null;h.ed=function(a){this.Wb=arguments;this.Oa||this.Kd?this.Ib=!0:Me(this)};h.stop=function(){this.Oa&&(k.clearTimeout(this.Oa),this.Oa=null,this.Ib=!1,this.Wb=[])};h.c=function(){Le.j.c.call(this);this.stop()};h.Ae=function(){this.Oa=null;this.Ib&&!this.Kd&&(this.Ib=!1,Me(this))};var Me=function(a){a.Oa=Rd(a.de,a.qe);a.te.apply(null,a.Wb)};var Oe=function(a){var b=new rd;b.yc=a;Ne(b)},Ne=function(a){var b={},c=b.document||document,d;a instanceof rd&&a.constructor===rd&&a.Yd===qd?d=a.yc:(Ca("expected object of type TrustedResourceUrl, got '"+a+"' of type "+ea(a)),d="type_error:TrustedResourceUrl");var e=document.createElement("SCRIPT");a={Qd:e,fb:void 0};var f=new Sc(Pe,a),g=null,m=null!=b.timeout?b.timeout:5E3;0<m&&(g=window.setTimeout(function(){Qe(e,!0);Tc(f,new Re(1,"Timeout reached for loading script "+d))},m),a.fb=g);e.onload=
|
|
e.onreadystatechange=function(){e.readyState&&"loaded"!=e.readyState&&"complete"!=e.readyState||(Qe(e,b.Qe||!1,g),f.Zb(null))};e.onerror=function(){Qe(e,!0,g);Tc(f,new Re(0,"Error while loading script "+d))};a=b.attributes||{};lb(a,{type:"text/javascript",charset:"UTF-8",src:d});qe(e,a);Se(c).appendChild(e)},Se=function(a){var b;return(b=(a||document).getElementsByTagName("HEAD"))&&0!=b.length?b[0]:a.documentElement},Pe=function(){if(this&&this.Qd){var a=this.Qd;a&&"SCRIPT"==a.tagName&&Qe(a,!0,this.fb)}},
|
|
Qe=function(a,b,c){null!=c&&k.clearTimeout(c);a.onload=ba;a.onerror=ba;a.onreadystatechange=ba;b&&window.setTimeout(function(){a&&a.parentNode&&a.parentNode.removeChild(a)},0)},Re=function(a,b){var c="Jsloader error (code #"+a+")";b&&(c+=": "+b);x.call(this,c);this.code=a};w(Re,x);var Te=function(a,b){this.ba=this.xa=this.ma="";this.Ha=null;this.ra=this.Ga="";this.L=this.re=!1;var c;if(a instanceof Te)this.L=l(b)?b:a.L,Ue(this,a.ma),c=a.xa,Ve(this),this.xa=c,c=a.ba,Ve(this),this.ba=c,We(this,a.Ha),this.setPath(a.getPath()),Xe(this,a.Y.clone()),c=a.ra,Ve(this),this.ra=c;else if(a&&(c=String(a).match(Sd))){this.L=!!b;Ue(this,c[1]||"",!0);var d=c[2]||"";Ve(this);this.xa=Ye(d);d=c[3]||"";Ve(this);this.ba=Ye(d,!0);We(this,c[4]);this.setPath(c[5]||"",!0);Xe(this,c[6]||"",!0);c=c[7]||
|
|
"";Ve(this);this.ra=Ye(c)}else this.L=!!b,this.Y=new Ze(null,0,this.L)};
|
|
Te.prototype.toString=function(){var a=[],b=this.ma;b&&a.push($e(b,af,!0),":");var c=this.ba;if(c||"file"==b)a.push("//"),(b=this.xa)&&a.push($e(b,af,!0),"@"),a.push(encodeURIComponent(String(c)).replace(/%25([0-9a-fA-F]{2})/g,"%$1")),c=this.Ha,null!=c&&a.push(":",String(c));if(c=this.getPath())this.ba&&"/"!=c.charAt(0)&&a.push("/"),a.push($e(c,"/"==c.charAt(0)?bf:cf,!0));(c=this.Y.toString())&&a.push("?",c);(c=this.ra)&&a.push("#",$e(c,df));return a.join("")};
|
|
Te.prototype.resolve=function(a){var b=this.clone(),c=!!a.ma;c?Ue(b,a.ma):c=!!a.xa;if(c){var d=a.xa;Ve(b);b.xa=d}else c=!!a.ba;c?(d=a.ba,Ve(b),b.ba=d):c=null!=a.Ha;d=a.getPath();if(c)We(b,a.Ha);else if(c=!!a.Ga){if("/"!=d.charAt(0))if(this.ba&&!this.Ga)d="/"+d;else{var e=b.getPath().lastIndexOf("/");-1!=e&&(d=b.getPath().substr(0,e+1)+d)}e=d;if(".."==e||"."==e)d="";else if(-1!=e.indexOf("./")||-1!=e.indexOf("/.")){for(var d=0==e.lastIndexOf("/",0),e=e.split("/"),f=[],g=0;g<e.length;){var m=e[g++];
|
|
"."==m?d&&g==e.length&&f.push(""):".."==m?((1<f.length||1==f.length&&""!=f[0])&&f.pop(),d&&g==e.length&&f.push("")):(f.push(m),d=!0)}d=f.join("/")}else d=e}c?b.setPath(d):c=""!==a.Y.toString();c?Xe(b,Ye(a.Y.toString())):c=!!a.ra;c&&(a=a.ra,Ve(b),b.ra=a);return b};Te.prototype.clone=function(){return new Te(this)};
|
|
var Ue=function(a,b,c){Ve(a);a.ma=c?Ye(b,!0):b;a.ma&&(a.ma=a.ma.replace(/:$/,""))},We=function(a,b){Ve(a);if(b){b=Number(b);if(isNaN(b)||0>b)throw Error("Bad port number "+b);a.Ha=b}else a.Ha=null};Te.prototype.getPath=function(){return this.Ga};Te.prototype.setPath=function(a,b){Ve(this);this.Ga=b?Ye(a,!0):a;return this};var Xe=function(a,b,c){Ve(a);b instanceof Ze?(a.Y=b,a.Y.Bc(a.L)):(c||(b=$e(b,ef)),a.Y=new Ze(b,0,a.L))},Ve=function(a){if(a.re)throw Error("Tried to modify a read-only Uri");};
|
|
Te.prototype.Bc=function(a){this.L=a;this.Y&&this.Y.Bc(a);return this};
|
|
var ff=function(a){return a instanceof Te?a.clone():new Te(a,void 0)},Ye=function(a,b){return a?b?decodeURI(a.replace(/%25/g,"%2525")):decodeURIComponent(a):""},$e=function(a,b,c){return p(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,Ze=function(a,b,c){this.h=this.l=null;this.H=a||null;this.L=!!c},hf=function(a){a.l||
|
|
(a.l=new wd,a.h=0,a.H&&Td(a.H,function(b,c){a.add(decodeURIComponent(b.replace(/\+/g," ")),c)}))};h=Ze.prototype;h.B=function(){hf(this);return this.h};h.add=function(a,b){hf(this);this.H=null;a=jf(this,a);var c=this.l.get(a);c||this.l.set(a,c=[]);c.push(b);this.h=Da(this.h)+1;return this};h.remove=function(a){hf(this);a=jf(this,a);return this.l.ia(a)?(this.H=null,this.h=Da(this.h)-this.l.get(a).length,this.l.remove(a)):!1};h.clear=function(){this.l=this.H=null;this.h=0};
|
|
h.isEmpty=function(){hf(this);return 0==this.h};h.ia=function(a){hf(this);a=jf(this,a);return this.l.ia(a)};h.P=function(){hf(this);for(var a=this.l.s(),b=this.l.P(),c=[],d=0;d<b.length;d++)for(var e=a[d],f=0;f<e.length;f++)c.push(b[d]);return c};h.s=function(a){hf(this);var b=[];if(p(a))this.ia(a)&&(b=Ua(b,this.l.get(jf(this,a))));else{a=this.l.s();for(var c=0;c<a.length;c++)b=Ua(b,a[c])}return b};
|
|
h.set=function(a,b){hf(this);this.H=null;a=jf(this,a);this.ia(a)&&(this.h=Da(this.h)-this.l.get(a).length);this.l.set(a,[b]);this.h=Da(this.h)+1;return this};h.get=function(a,b){var c=a?this.s(a):[];return 0<c.length?String(c[0]):b};h.setValues=function(a,b){this.remove(a);0<b.length&&(this.H=null,this.l.set(jf(this,a),Va(b)),this.h=Da(this.h)+b.length)};
|
|
h.toString=function(){if(this.H)return this.H;if(!this.l)return"";for(var a=[],b=this.l.P(),c=0;c<b.length;c++)for(var d=b[c],e=encodeURIComponent(String(d)),d=this.s(d),f=0;f<d.length;f++){var g=e;""!==d[f]&&(g+="="+encodeURIComponent(String(d[f])));a.push(g)}return this.H=a.join("&")};h.clone=function(){var a=new Ze;a.H=this.H;this.l&&(a.l=this.l.clone(),a.h=this.h);return a};var jf=function(a,b){var c=String(b);a.L&&(c=c.toLowerCase());return c};
|
|
Ze.prototype.Bc=function(a){a&&!this.L&&(hf(this),this.H=null,this.l.forEach(function(a,c){var b=c.toLowerCase();c!=b&&(this.remove(c),this.setValues(b,a))},this));this.L=a};var qf=function(a,b,c,d,e){var f=["https://www.googleapis.com/auth/earthengine"];d&&(Wa(f,d),Ya(f));kf=a;lf=f;null===a?mf=null:nf(function(){of(b,c,e||ma(pf,b,c))})};u("ee.data.authenticate",qf);var pf=function(a,b){k.gapi.auth.authorize({client_id:kf,immediate:!1,scope:lf.join(" ")},ma(rf,a,b))};u("ee.data.authenticateViaPopup",pf);
|
|
var sf=function(a,b,c,d,e,f,g){var m=["https://www.googleapis.com/auth/earthengine"];e&&(Wa(m,e),Ya(m));kf=a;lf=m;var v={token_type:b,access_token:c,state:m.join(" "),expires_in:d};rf(void 0,void 0,v);!1===g?f&&f():nf(function(){k.gapi.auth.setToken(v);f&&f()})};u("ee.data.setAuthToken",sf);var of=function(a,b,c){tf&&kf&&tf({client_id:String(kf),immediate:!0,scope:lf.join(" ")},function(d){"immediate_failed"==d.error&&c?c():rf(a,b,d)})},uf=function(a){tf=a};u("ee.data.setAuthTokenRefresher",uf);
|
|
var xf=function(){vf&&0<=na()-vf&&wf();return mf};u("ee.data.getAuthToken",xf);var wf=function(){vf=mf=null};u("ee.data.clearAuthToken",wf);var yf=function(){return kf};u("ee.data.getAuthClientId",yf);var zf=function(){return lf};u("ee.data.getAuthScopes",zf);var Ef=function(a,b,c){null!=a?Af=a:Bf||(Af="https://earthengine.googleapis.com/api");null!=b?Cf=b:Bf||(Cf="https://earthengine.googleapis.com");l(c)&&(Df=c);Bf=!0},Gf=function(a){Ff=a};u("ee.data.setDeadline",Gf);
|
|
u("ee.data.setParamAugmenter",function(a){Hf=a||nc});var If=function(){return Af};u("ee.data.getApiBaseUrl",If);var Jf=function(){return Cf};u("ee.data.getTileBaseUrl",Jf);var Kf=function(){return Df};u("ee.data.getXsrfToken",Kf);var Lf=function(a,b){a=ib(a);return E("/mapid",F(a),b)};u("ee.data.getMapId",Lf);var Mf=function(a,b,c,d){var e=Math.pow(2,d);b%=e;0>b&&(b+=e);return[Cf,"map",a.mapid,d,b,c].join("/")+"?token="+a.token};u("ee.data.getTileUrl",Mf);
|
|
var Nf=function(a,b){a=ib(a);return E("/value",F(a),b)};u("ee.data.getValue",Nf);var Of=function(a,b){a=ib(a);n(a.dimensions)&&(a.dimensions=a.dimensions.join("x"));var c=F(a).add("getid","1");return E("/thumb",c,b)};u("ee.data.getThumbId",Of);var Pf=function(a){return Cf+"/api/thumb?thumbid="+a.thumbid+"&token="+a.token};u("ee.data.makeThumbUrl",Pf);var Qf=function(a,b){a=ib(a);return E("/download",F(a),b)};u("ee.data.getDownloadId",Qf);
|
|
var Rf=function(a){return Cf+"/api/download?docid="+a.docid+"&token="+a.token};u("ee.data.makeDownloadUrl",Rf);var Sf=function(a,b){a=ib(a);return E("/table",F(a),b)};u("ee.data.getTableDownloadId",Sf);var Tf=function(a){return Cf+"/api/table?docid="+a.docid+"&token="+a.token};u("ee.data.makeTableDownloadUrl",Tf);var Vf=function(a,b,c){var d=Uf;try{return Uf=a,b.call(c)}finally{Uf=d}};u("ee.data.withProfiling",Vf);
|
|
u("ee.data.newTaskId",function(a,b){var c={};ha(a)&&(c.count=a);return E("/newtaskid",F(c),b)});u("ee.data.getTaskStatus",function(a,b){if(p(a))a=[a];else if(!n(a))throw Error("Invalid taskId: expected a string or an array of strings.");return E("/taskstatus?q="+a.join(),null,b,"GET")});u("ee.data.getTaskList",function(a){return E("/tasklist",null,a,"GET")});u("ee.data.cancelTask",function(a,b){return Wf(a,"CANCEL",b)});
|
|
var Wf=function(a,b,c){if(p(a))a=[a];else if(!n(a))throw Error("Invalid taskId: expected a string or an array of strings.");var d;a:{d=Xf;for(var e in d)if(d[e]==b){d=!0;break a}d=!1}if(!d)throw Error("Invalid action: "+b);return E("/updatetask",F({id:a,action:b}),c,"POST")};u("ee.data.updateTask",Wf);u("ee.data.startProcessing",function(a,b,c){b=ib(b);b.id=a;return E("/processingrequest",F(b),c)});
|
|
u("ee.data.startIngestion",function(a,b,c){a={id:a,request:ld(b)};return E("/ingestionrequest",F(a),c)});u("ee.data.startTableIngestion",function(a,b,c){a={id:a,tableRequest:ld(b)};return E("/ingestionrequest",F(a),c)});var Yf=function(a,b){return E("/info",(new Ze).add("id",a),b)};u("ee.data.getInfo",Yf);var Zf=function(a,b){var c=F(a);return E("/list",c,b)};u("ee.data.getList",Zf);u("ee.data.getAssetRoots",function(a){return E("/buckets",null,a,"GET")});
|
|
u("ee.data.createAssetHome",function(a,b){var c=F({id:a});E("/createbucket",c,b)});u("ee.data.createAsset",function(a,b,c,d){p(a)||(a=ld(a));a={value:a};void 0!==b&&(a.id=b);a.force=c||!1;return E("/create",F(a),d)});u("ee.data.createFolder",function(a,b,c){return E("/createfolder",F({id:a,force:b||!1}),c)});u("ee.data.renameAsset",function(a,b,c){E("/rename",F({sourceId:a,destinationId:b}),c)});u("ee.data.copyAsset",function(a,b,c){E("/copy",F({sourceId:a,destinationId:b}),c)});
|
|
u("ee.data.deleteAsset",function(a,b){E("/delete",F({id:a}),b)});u("ee.data.getAssetAcl",function(a,b){return E("/getacl",F({id:a}),b,"GET")});u("ee.data.setAssetAcl",function(a,b,c){a={id:a,value:ld(b)};E("/setacl",F(a),c)});u("ee.data.setAssetProperties",function(a,b,c){a={id:a,properties:ld(b)};E("/setproperties",F(a),c)});u("ee.data.getAssetRootQuota",function(a,b){return E("/quota",F({id:a}),b,"GET")});
|
|
var Xf={Le:"CANCEL",Oe:"UPDATE"},E=function(a,b,c,d){Ef();var e=Uf,f={"Content-Type":"application/x-www-form-urlencoded"},g=xf();if(null!=g)f.Authorization=g;else if(c&&tf&&kf)return of(function(){Vf(e,function(){E(a,b,c,d)})}),null;g=d||"POST";b=b?b.clone():new Ze;e&&b.add("profiling","1");b=Hf(b,a);null!=Df&&(f["X-XSRF-Token"]=Df);var m=function(a,b,c,d){var f=b("X-Earth-Engine-Computation-Profile");f&&e&&e(f);var g,m,v;b=(b=b("Content-Type"))?b.replace(/;.*/,""):"application/json";if("application/json"==
|
|
b||"text/json"==b)try{g=jd(c),m=g.data}catch(ej){v="Invalid JSON: "+c}else v="Response was unexpectedly not JSON, but "+b;if(r(g))"error"in g&&"message"in g.error?v=g.error.message:"data"in g||(v="Malformed response: "+c);else if(0===a)v="Failed to contact Earth Engine servers. Please check your connection, firewall, or browser extension settings.";else if(200>a||300<=a)v="Server returned HTTP code: "+a;if(d)return d(m,v),null;if(!v)return m;throw Error(v);},v=b?b.toString():"";"GET"!=g||/^[\s\xa0]*$/.test(v)||
|
|
(a+=-1!=a.indexOf("?")?"&":"?",a+=v,v=null);var ca=Af+a;if(c)return $f.push({url:ca,Zb:function(a){a=a.target;var b=a.getStatus(),d=t(a.getResponseHeader,a),e;try{e=a.a?a.a.responseText:""}catch(Pi){Qd(a.G,"Can not get responseText: "+Pi.message),e=""}return m(b,d,e,c)},method:g,content:v,headers:f}),ag.ed(),null;var W=Wd();W.open(g,ca,!1);$a(f,function(a,b){W.setRequestHeader(b,a)});W.send(v);return m(W.status,function(a){try{return W.getResponseHeader(a)}catch(dj){return null}},W.responseText,null)},
|
|
nf=function(a){var b=function(){k.gapi.config.update("client/cors",!0);tf||(tf=k.gapi.auth.authorize);a()};if(r(k.gapi)&&r(k.gapi.auth)&&q(k.gapi.auth.authorize))b();else{for(var c=na().toString(36);c in k;)c+="_";k[c]=function(){delete k[c];b()};Oe("https://apis.google.com/js/client.js?onload="+c)}},rf=function(a,b,c){c.access_token?(b=c.token_type+" "+c.access_token,isFinite(c.expires_in)&&(c=900*c.expires_in,setTimeout(of,.9*c),vf=na()+c),mf=b,a&&a()):b&&b(c.error||"Unknown error.")},F=function(a){var b=
|
|
new Ze,c;for(c in a)b.set(c,a[c]);return b},$f=[],ag=new Le(function(){var a=$f.shift();if(a){var b=a.url,c=a.Zb,d=a.method,e=a.content,a=a.headers,f=Ff,g=new C;ce.push(g);c&&g.X("complete",c);g.cb("ready",g.ge);f&&(g.Na=Math.max(0,f));g.send(b,d,e,a)}0==$f.length||ag.ed()},350),Af=null,Cf=null,Df=null,Hf=nc,mf=null,vf=null,kf=null,lf=[],tf=null,Bf=!1,Ff=0,Uf=null;var bg=function(){this.O=[];this.S=[]};h=bg.prototype;h.enqueue=function(a){this.S.push(a)};h.Ra=function(){0==this.O.length&&(this.O=this.S,this.O.reverse(),this.S=[]);return this.O.pop()};h.B=function(){return this.O.length+this.S.length};h.isEmpty=function(){return 0==this.O.length&&0==this.S.length};h.clear=function(){this.O=[];this.S=[]};h.contains=function(a){return 0<=Ha(this.O,a)||0<=Ha(this.S,a)};
|
|
h.remove=function(a){var b;b=this.O;var c=Ia(b,a);0<=c?(Sa(b,c),b=!0):b=!1;return b||Ta(this.S,a)};h.s=function(){for(var a=[],b=this.O.length-1;0<=b;--b)a.push(this.O[b]);for(var c=this.S.length,b=0;b<c;++b)a.push(this.S[b]);return a};var cg=function(a,b){z.call(this);this.Bd=a||0;this.Bb=b||10;if(this.Bd>this.Bb)throw Error("[goog.structs.Pool] Min can not be greater than max");this.V=new bg;this.la=new Bd;this.cc=0;this.sc=null;this.kb()};w(cg,z);cg.prototype.Wa=function(){var a=na();if(!(null!=this.sc&&a-this.sc<this.cc)){for(var b;0<this.V.B()&&(b=this.V.Ra(),!this.vc(b));)this.kb();!b&&this.B()<this.Bb&&(b=this.ac());b&&(this.sc=a,this.la.add(b));return b}};var dg=function(a,b){return a.la.remove(b)?(a.Ub(b),!0):!1};h=cg.prototype;
|
|
h.Ub=function(a){this.la.remove(a);this.vc(a)&&this.B()<this.Bb?this.V.enqueue(a):this.pb(a)};h.kb=function(){for(var a=this.V;this.B()<this.Bd;)a.enqueue(this.ac());for(;this.B()>this.Bb&&0<this.V.B();)this.pb(a.Ra())};h.ac=function(){return{}};h.pb=function(a){if("function"==typeof a.T)a.T();else for(var b in a)a[b]=null};h.vc=function(a){return"function"==typeof a.fe?a.fe():!0};h.contains=function(a){return this.V.contains(a)||this.la.contains(a)};h.B=function(){return this.V.B()+this.la.B()};
|
|
h.isEmpty=function(){return this.V.isEmpty()&&this.la.isEmpty()};h.c=function(){cg.j.c.call(this);if(0<this.la.B())throw Error("[goog.structs.Pool] Objects not released");delete this.la;for(var a=this.V;!a.isEmpty();)this.pb(a.Ra());delete this.V};var eg=function(a,b){this.vd=a;this.Lc=b};eg.prototype.getKey=function(){return this.vd};eg.prototype.clone=function(){return new eg(this.vd,this.Lc)};var fg=function(a){this.R=[];if(a)a:{var b;if(a instanceof fg){if(b=a.P(),a=a.s(),0>=this.B()){for(var c=this.R,d=0;d<b.length;d++)c.push(new eg(b[d],a[d]));break a}}else b=db(a),a=cb(a);for(d=0;d<b.length;d++)gg(this,b[d],a[d])}},gg=function(a,b,c){var d=a.R;d.push(new eg(b,c));b=d.length-1;a=a.R;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=fg.prototype;
|
|
h.remove=function(){var a=this.R,b=a.length,c=a[0];if(!(0>=b)){if(1==b)Ra(a);else{a[0]=a.pop();for(var a=0,b=this.R,d=b.length,e=b[a];a<d>>1;){var f=2*a+1,g=2*a+2,f=g<d&&b[g].getKey()<b[f].getKey()?g:f;if(b[f].getKey()>e.getKey())break;b[a]=b[f];a=f}b[a]=e}return c.Lc}};h.s=function(){for(var a=this.R,b=[],c=a.length,d=0;d<c;d++)b.push(a[d].Lc);return b};h.P=function(){for(var a=this.R,b=[],c=a.length,d=0;d<c;d++)b.push(a[d].getKey());return b};
|
|
h.ia=function(a){return Ma(this.R,function(b){return b.getKey()==a})};h.clone=function(){return new fg(this)};h.B=function(){return this.R.length};h.isEmpty=function(){return 0==this.R.length};h.clear=function(){Ra(this.R)};var hg=function(){fg.call(this)};w(hg,fg);hg.prototype.enqueue=function(a,b){gg(this,a,b)};hg.prototype.Ra=function(){return this.remove()};var ig=function(a,b){this.Yc=void 0;this.Gb=new hg;cg.call(this,a,b)};w(ig,cg);h=ig.prototype;h.Wa=function(a,b){if(!a){var c=ig.j.Wa.call(this);c&&this.cc&&(this.Yc=k.setTimeout(t(this.wb,this),this.cc));return c}this.Gb.enqueue(l(b)?b:100,a);this.wb()};h.wb=function(){for(var a=this.Gb;0<a.B();){var b=this.Wa();if(b)a.Ra().apply(this,[b]);else break}};h.Ub=function(a){ig.j.Ub.call(this,a);this.wb()};h.kb=function(){ig.j.kb.call(this);this.wb()};
|
|
h.c=function(){ig.j.c.call(this);k.clearTimeout(this.Yc);this.Gb.clear();this.Gb=null};var jg=function(a,b,c,d){z.call(this);this.Kc=a;this.Ad=b;this.gb=c;this.I=d||null};w(jg,Ie);u("ee.layers.EarthEngineTileSource",jg);jg.prototype.xd=function(a,b){var c=Vb(a,"status-changed",function(){switch(a.getStatus()){case "loaded":var b=a.Fe["x-earth-engine-computation-profile"];this.I&&b&&this.I.$d(a.N.id,b);break;case "failed":case "aborted":this.I&&""!==a.N.id&&this.I.De(a.N.id),dc(c)}},void 0,this);a.Ud=kg(this,a.he,a.zoom);var d=t(this.mc,this,a);lg().Wa(d,b)};
|
|
jg.prototype.kd=function(){return[this.Ad,this.gb].join("-")};jg.prototype.mc=function(a,b){var c=lg();if(a.aa||"aborted"==a.getStatus())dg(c,b);else{var d=Vb(a,"status-changed",function(){a.Dc in He&&(dc(d),dg(c,b))});Ge(a)}};var kg=function(a,b,c){b=[a.Kc,a.Ad,c,b.x,b.y].join("/");b+="?token="+a.gb;a.I&&a.I.isEnabled()&&(b+="&profiling=1");return b},lg=function(){mg||(mg=new ig(0,4));return mg},mg=null;var ng=function(a){B.call(this);this.$a={};this.Za={};this.ta=new hc(this);this.m=a};w(ng,B);var og=[ub&&!Eb("11")?"readystatechange":"load","abort","error"],pg=function(a,b,c){(c=p(c)?c:c.src)&&(a.$a[b]={src:c,Vc:l(void 0)?void 0:null})},qg=function(a,b){delete a.$a[b];var c=a.Za[b];c&&(delete a.Za[b],a.ta.Pb(c,og,a.Hd),gb(a.Za)&&gb(a.$a)&&a.dispatchEvent("complete"))};
|
|
ng.prototype.start=function(){var a=this.$a;Ja(db(a),function(b){var c=a[b];if(c&&(delete a[b],!this.aa)){var d;this.m?(d=this.m,d=(d?new xe(we(d)):oa||(oa=new xe)).je("IMG")):d=new Image;c.Vc&&(d.crossOrigin=c.Vc);this.ta.X(d,og,this.Hd);this.Za[b]=d;d.id=b;d.src=c.src}},this)};
|
|
ng.prototype.Hd=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.aa||qg(this,b.id)}};ng.prototype.c=function(){delete this.$a;delete this.Za;Za(this.ta);ng.j.c.call(this)};var rg=function(a,b){D.call(this,a,b)};w(rg,D);u("ee.layers.ImageOverlay",rg);rg.prototype.bc=function(a,b,c,d){return new sg(a,b,c,d)};var sg=function(a,b,c,d){De.call(this,a,b,c,d);this.pd=this.D=null};w(sg,De);sg.prototype.Ua=function(){var a;try{a=URL.createObjectURL(this.Td)}catch(b){a=this.Ud}this.D=new ng;pg(this.D,this.N.id+"-image",a);this.pd=bc(this.D,tg,function(a){"load"==a.type?(this.N.appendChild(a.target),De.prototype.Ua.call(this)):Fe(this)},void 0,this);this.D.start()};
|
|
sg.prototype.Qa=function(){sg.j.Qa.call(this);this.D&&(dc(this.pd),Za(this.D))};var tg=["load","abort","error"];var ug=function(a,b,c){B.call(this);this.ue=b;this.Kb=c;this.ga=[];this.Gc=new Bd;this.oa=0;this.url=a};w(ug,B);u("ee.AbstractOverlay",ug);ug.prototype.getTile=da;var vg=function(a,b,c){var d=1<<c,e=b.x%d;0>e&&(e+=d);return[a.ue,c,e,b.y].join("/")};ug.prototype.kc=function(){return this.ga.length};var wg=function(a){A.call(this,"tileevent");this.count=a};w(wg,A);var xg=function(){};xg.prototype.encode=da;var yg=function(){this.ha=-1};yg.prototype.reset=da;yg.prototype.update=da;yg.prototype.digest=da;var zg=function(){this.ha=64;this.A=Array(4);this.ae=Array(this.ha);this.Mb=this.Pa=0;this.reset()};w(zg,yg);zg.prototype.reset=function(){this.A[0]=1732584193;this.A[1]=4023233417;this.A[2]=2562383102;this.A[3]=271733878;this.Mb=this.Pa=0};
|
|
var Ag=function(a,b,c){c||(c=0);var d=Array(16);if(p(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.A[0];c=a.A[1];var e=a.A[2],f=a.A[3],g;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.A[0]=a.A[0]+b&4294967295;a.A[1]=a.A[1]+(e+(g<<21&4294967295|g>>>11))&4294967295;a.A[2]=a.A[2]+e&4294967295;a.A[3]=a.A[3]+f&4294967295};
|
|
zg.prototype.update=function(a,b){l(b)||(b=a.length);for(var c=b-this.ha,d=this.ae,e=this.Pa,f=0;f<b;){if(0==e)for(;f<=c;)Ag(this,a,f),f+=this.ha;if(p(a))for(;f<b;){if(d[e++]=a.charCodeAt(f++),e==this.ha){Ag(this,d);e=0;break}}else for(;f<b;)if(d[e++]=a[f++],e==this.ha){Ag(this,d);e=0;break}}this.Pa=e;this.Mb+=b};
|
|
zg.prototype.digest=function(){var a=Array((56>this.Pa?this.ha:2*this.ha)-this.Pa);a[0]=128;for(var b=1;b<a.length-8;++b)a[b]=0;for(var c=8*this.Mb,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.A[b]>>>d&255;return a};var Bg=function(a){this.jb="__ee_hash__";this.qc=!1!==a;this.Ma=[];this.Da={};this.Mc=[]};u("ee.Serializer",Bg);var Cg=new kd,Dg=new zg,Fg=function(a,b){return Eg(new Bg(l(b)?b:!0),a)};u("ee.Serializer.encode",Fg);var Gg=function(a){return Cg.v(Fg(a))};u("ee.Serializer.toJSON",Gg);var Hg=function(a){a=Eg(new Bg(!1),a);return"JSON"in k?k.JSON.stringify(a,null," "):Cg.v(a)};u("ee.Serializer.toReadableJSON",Hg);
|
|
var Eg=function(a,b){var c=a.rb(b);a.qc&&(c=r(c)&&"ValueRef"==c.type&&1==a.Ma.length?a.Ma[0][1]:{type:"CompoundValue",scope:a.Ma,value:c},a.Ma=[],Ja(a.Mc,t(function(a){delete a[this.jb]},a)),a.Mc=[],a.Da={});return c};
|
|
Bg.prototype.rb=function(a){if(!l(a))throw Error("Can't encode an undefined value.");var b,c=r(a)?a[this.jb]:null;if(this.qc&&null!=c&&this.Da[c])return{type:"ValueRef",value:this.Da[c]};if(null===a||"boolean"==typeof a||ha(a)||p(a))return a;if(r(a)&&"function"==typeof a.getFullYear)return{type:"Invocation",functionName:"Date",arguments:{value:Math.floor(a.getTime())}};if(a instanceof xg){if(b=a.encode(t(this.rb,this)),!(n(b)||r(b)&&"ArgumentRef"!=b.type))return b}else if(n(a))b=La(a,function(a){return this.rb(a)},
|
|
this);else if(r(a)&&!q(a))b=bb(a,function(a){if(!q(a))return this.rb(a)},this),hb(b,this.jb),b={type:"Dictionary",value:b};else throw Error("Can't encode object: "+a);if(this.qc){Dg.reset();Dg.update(Cg.v(b));var c=Dg.digest().toString(),d;this.Da[c]?d=this.Da[c]:(d=String(this.Ma.length),this.Ma.push([d,b]),this.Da[c]=d);a[this.jb]=c;this.Mc.push(a);return{type:"ValueRef",value:d}}return b};var G=function(a,b,c){if(!(this instanceof G))return H(G,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.f=a;this.o=b;this.w=c||null};w(G,xg);u("ee.ComputedObject",G);G.prototype.evaluate=function(a){if(!a||!q(a))throw Error("evaluate() requires a callback function.");Nf({json:this.v()},a)};G.prototype.evaluate=G.prototype.evaluate;
|
|
G.prototype.W=function(a){return Nf({json:this.v()},a)};G.prototype.getInfo=G.prototype.W;G.prototype.encode=function(a){if(null===this.f&&null===this.o)return{type:"ArgumentRef",value:this.w};var b={},c;for(c in this.o)l(this.o[c])&&(b[c]=a(this.o[c]));b={type:"Invocation",arguments:b};a=a(this.f);b[p(a)?"functionName":"function"]=a;return b};G.prototype.v=function(){return Gg(this)};G.prototype.serialize=G.prototype.v;G.prototype.toString=function(){return"ee."+this.name()+"("+Hg(this)+")"};
|
|
u("ee.ComputedObject.prototype.toString",G.prototype.toString);G.prototype.name=function(){return"ComputedObject"};G.prototype.Oc=function(a,b){var c=Va(arguments);c[0]=this;a.apply(k,c);return this};G.prototype.aside=G.prototype.Oc;var Ig=function(a,b){if(b instanceof a.constructor)return b;var c=function(){};c.prototype=a.constructor.prototype;c=new c;c.f=b.f;c.o=b.o;c.w=b.w;return c},H=function(a,b){function c(){return a.apply(this,b)}c.prototype=a.prototype;return new c};var Jg={},Kg=function(a){return a.prototype instanceof G?a.prototype.name.call(null):a==Number?"Number":a==String?"String":a==Array?"Array":a==Date?"Date":"Object"},Lg=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}},Mg=function(a){return ha(a)||
|
|
a instanceof G&&"Number"==a.name()},Ng=function(a){return p(a)||a instanceof G&&"String"==a.name()},Og=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,xg);u("ee.Function",I);var Pg=nc;I.prototype.C=da;I.prototype.call=function(a){return this.apply(Qg(this,Array.prototype.slice.call(arguments,0)))};I.prototype.call=I.prototype.call;I.prototype.apply=function(a){a=new G(this,Rg(this,a));return Pg(a,this.C().returns)};I.prototype.apply=I.prototype.apply;
|
|
var Sg=function(a,b,c){var d=l(b),e=a.C(),f=!1;if(1==c.length&&Og(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=ib(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=Qg(a,d?[b].concat(c):c);return a.apply(c)},Rg=function(a,b){for(var c=a.C().args,d={},e={},f=0;f<c.length;f++){var g=c[f].name;if(g in b&&l(b[g]))d[g]=Pg(b[g],c[f].type);else if(!c[f].optional)throw Error("Required argument ("+
|
|
g+") missing to function: "+a);e[g]=!0}var c=[],m;for(m in b)e[m]||c.push(m);if(0<c.length)throw Error("Unrecognized arguments ("+c+") to function: "+a);return d},Qg=function(a,b){var c=a.C().args;if(c.length<b.length)throw Error("Too many ("+b.length+") arguments to function: "+a);for(var d={},e=0;e<b.length;e++)d[c[e].name]=b[e];return d};
|
|
I.prototype.toString=function(a,b){var c=this.C(),d=[];d.push(a||c.name);d.push("(");d.push(La(c.args.slice(b?1:0),function(a){return a.name}).join(", "));d.push(")\n");d.push("\n");c.description?d.push(c.description):d.push("Undocumented.");d.push("\n");if(c.args.length){d.push("\nArgs:\n");for(var e=0;e<c.args.length;e++){b&&0==e?d.push(" this:"):d.push("\n ");var f=c.args[e];d.push(f.name);d.push(" (");d.push(f.type);f.optional&&d.push(", optional");d.push("): ");f.description?d.push(f.description):
|
|
d.push("Undocumented.")}}return d.join("")};I.prototype.v=function(){return Gg(this)};var J=function(a,b){if(!l(b))return Tg(a);if(!(this instanceof J))return H(J,arguments);this.na=jb(b);this.na.name=a};w(J,I);u("ee.ApiFunction",J);var K=function(a,b){return I.prototype.call.apply(Tg(a),Array.prototype.slice.call(arguments,1))};u("ee.ApiFunction._call",K);var Ug=function(a,b){return Tg(a).apply(b)};u("ee.ApiFunction._apply",Ug);J.prototype.encode=function(){return this.na.name};J.prototype.C=function(){return this.na};
|
|
var Vg=null,Wg={},Yg=function(){Xg();return bb(Vg,function(a){return a.C()})},Zg=function(){Xg();return ab(Vg,function(a,b){return!Wg[b]})},Tg=function(a){var b=$g(a);if(!b)throw Error("Unknown built-in function name: "+a);return b};u("ee.ApiFunction.lookup",Tg);
|
|
var $g=function(a){Xg();return Vg[a]||null},Xg=function(a,b){if(Vg)a&&a();else{var c=function(c,e){e?b&&b(Error(e)):(Vg=bb(c,function(a,b){a.returns=a.returns.replace(/<.*>/,"");for(var c=0;c<a.args.length;c++)a.args[c].type=a.args[c].type.replace(/<.*>/,"");return new J(b,a)}),a&&a())};a?E("/algorithms",null,c,"GET"):c(E("/algorithms",null,void 0,"GET"))}},L=function(a,b,c,d){Xg();var e=d||"";$a(Vg,function(d,g){var f=g.split(".");if(2==f.length&&f[0]==b){var f=e+f[1],v=d.C();Wg[g]=!0;var ca=!1;
|
|
if(v.args.length)var W=v.args[0].type,ca="Object"!=W&&Lg(W,c);W=ca?a.prototype:a;f in W&&!W[f].signature||(W[f]=function(a){return Sg(d,ca?this:void 0,Array.prototype.slice.call(arguments,0))},W[f].toString=t(d.toString,d,f,ca),W[f].signature=v)}})},M=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=ah(a),d=La(c,function(a){return a.replace(/^opt_/,"")}),e=k.EXPORTED_FN_INFO?k.EXPORTED_FN_INFO[a.toString()].name.split(".").pop()+"()":null,e=e?" to function "+e:"",f={},g=b[0],m=r(g)&&!q(g)&&!n(g)&&!(g instanceof G);if(1<b.length||!m){if(b.length>d.length)throw Error("Received too many arguments"+e+". Expected at most "+d.length+" but got "+b.length+".");for(g=0;g<b.length;g++)f[d[g]]=b[g]}else{var m=new Bd(db(g)),v=new Bd(d);if(Dd(v,m).isEmpty())f[d[0]]=b[0];else{f=Ed(m,
|
|
v);if(!f.isEmpty())throw Error("Unexpected arguments"+e+": "+f.s().join(", "));f=ib(g)}}d=new Bd(db(f));c=Ed(new Bd(Ka(c,function(a){return 0!=a.lastIndexOf("opt_",0)})),d);if(!c.isEmpty())throw Error("Missing required arguments"+e+": "+c.s().join(", "));return f},ah=function(a){k.EXPORTED_FN_INFO?(a=k.EXPORTED_FN_INFO[a.toString()],Fa(a),a=a.paramNames,Ga(a)):a=a.toString().replace(bh,"").match(ch)[1].split(",")||[];return a},bh=/((\/\/.*$)|(\/\*[\s\S]*?\*\/)|(\s))/mg,ch=/^function\s*[^\(]*\(\s*([^\)]*)\)/m;var O=function(a,b,c){G.call(this,a,b,c);dh()};w(O,G);u("ee.Element",O);var eh=!1,dh=function(){eh||(L(O,"Element","Element"),eh=!0)};O.prototype.name=function(){return"Element"};
|
|
O.prototype.set=function(a){var b;if(1>=arguments.length){var c=arguments[0];if(b=Og(c))a:{b=db(c);var d=["properties"];if(ga(b)&&ga(d)&&b.length==d.length){for(var e=b.length,f=0;f<e;f++)if(b[f]!==d[f]){b=!1;break a}b=!0}else b=!1}b&&r(c.properties)&&(c=c.properties);if(Og(c)){b=this;for(var g in c)d=c[g],b=K("Element.set",b,g,d)}else if(c instanceof G&&$g("Element.setMulti"))b=K("Element.setMulti",this,c);else throw Error("When Element.set() is passed one argument, it must be a dictionary.");}else{if(0!=
|
|
arguments.length%2)throw Error("When Element.set() is passed multiple arguments, there must be an even number of them.");b=this;for(c=0;c<arguments.length;c+=2)g=arguments[c],d=arguments[c+1],b=K("Element.set",b,g,d)}return Ig(this,b)};O.prototype.set=O.prototype.set;var P=function(a){if(!(this instanceof P))return H(P,arguments);if(a instanceof P)return a;fh();if(n(a)){if(0==a.length)throw Error("Empty list specified for ee.Filter().");if(1==a.length)return new P(a[0]);G.call(this,new J("Filter.and"),{filters:a});this.Ta=a}else if(a instanceof G)G.call(this,a.f,a.o,a.w),this.Ta=[a];else{if(l(a))throw Error("Invalid argument specified for ee.Filter(): "+a);G.call(this,null,null);this.Ta=[]}};w(P,G);u("ee.Filter",P);
|
|
var gh=!1,fh=function(){gh||(L(P,"Filter","Filter"),gh=!0)},hh={equals:"equals",less_than:"lessThan",greater_than:"greaterThan",contains:"stringContains",starts_with:"stringStartsWith",ends_with:"stringEndsWith"},Q=function(a,b){var c=a.Ta.slice(0);b instanceof P?Wa(c,b.Ta):b instanceof Array?Wa(c,b):c.push(b);return new P(c)};P.prototype.ea=function(){return K("Filter.not",this)};P.prototype.not=P.prototype.ea;var ih=function(a,b){var c=N(ih,arguments);return K("Filter.equals",c.name,c.value)};
|
|
P.eq=ih;var jh=function(a,b){var c=N(jh,arguments);return ih(c.name,c.value).ea()};P.neq=jh;var kh=function(a,b){var c=N(kh,arguments);return K("Filter.lessThan",c.name,c.value)};P.lt=kh;var lh=function(a,b){var c=N(lh,arguments);return kh(c.name,c.value).ea()};P.gte=lh;var mh=function(a,b){var c=N(mh,arguments);return K("Filter.greaterThan",c.name,c.value)};P.gt=mh;var nh=function(a,b){var c=N(nh,arguments);return mh(c.name,c.value).ea()};P.lte=nh;var oh=function(a){return K("Filter.and",Array.prototype.slice.call(arguments))};
|
|
P.and=oh;var ph=function(a){return K("Filter.or",Array.prototype.slice.call(arguments))};P.or=ph;var qh=function(a,b){var c=N(qh,arguments),c=K("DateRange",c.start,c.end);return Ug("Filter.dateRangeContains",{leftValue:c,rightField:"system:time_start"})};P.date=qh;var rh=function(a,b,c,d){var e=N(rh,arguments);return Ug("Filter.listContains",{leftField:e.rightField,rightValue:e.leftValue,rightField:e.leftField,leftValue:e.rightValue})};P.inList=rh;
|
|
var sh=function(a,b){return Ug("Filter.intersects",{leftField:".all",rightValue:K("Feature",a),maxError:b})};P.bounds=sh;P.prototype.name=function(){return"Filter"};var th=function(a,b,c){b=b.toLowerCase();var d=!1;0==b.lastIndexOf("not_",0)&&(d=!0,b=b.substring(4));if(!(b in hh))throw Error("Unknown filtering operator: "+b);a=K("Filter."+hh[b],a,c);return d?a.ea():a};P.metadata=th;var uh=function(a,b){return K("Filter.stringContains",a,b)};P.contains=uh;var vh=function(a,b){return uh(a,b).ea()};
|
|
P.not_contains=vh;var wh=function(a,b){return K("Filter.stringStartsWith",a,b)};P.starts_with=wh;var xh=function(a,b){return wh(a,b).ea()};P.not_starts_with=xh;var yh=function(a,b){return K("Filter.stringEndsWith",a,b)};P.ends_with=yh;var zh=function(a,b){return yh(a,b).ea()};P.not_ends_with=zh;P.prototype.ad=function(a){return Q(this,ih.apply(null,[].slice.call(arguments)))};P.prototype.eq=P.prototype.ad;P.prototype.length=function(){return this.Ta.length};P.prototype.length=P.prototype.length;
|
|
P.prototype.Cd=function(a){return Q(this,jh.apply(null,[].slice.call(arguments)))};P.prototype.neq=P.prototype.Cd;P.prototype.yd=function(a){return Q(this,kh.apply(null,[].slice.call(arguments)))};P.prototype.lt=P.prototype.yd;P.prototype.md=function(a){return Q(this,lh.apply(null,[].slice.call(arguments)))};P.prototype.gte=P.prototype.md;P.prototype.ld=function(a){return Q(this,mh.apply(null,[].slice.call(arguments)))};P.prototype.gt=P.prototype.ld;
|
|
P.prototype.zd=function(a){return Q(this,nh.apply(null,[].slice.call(arguments)))};P.prototype.lte=P.prototype.zd;P.prototype.contains=function(a){return Q(this,uh.apply(null,[].slice.call(arguments)))};P.prototype.contains=P.prototype.contains;P.prototype.Dd=function(a){return Q(this,vh.apply(null,[].slice.call(arguments)))};P.prototype.not_contains=P.prototype.Dd;P.prototype.Vd=function(a){return Q(this,wh.apply(null,[].slice.call(arguments)))};P.prototype.starts_with=P.prototype.Vd;
|
|
P.prototype.Fd=function(a){return Q(this,xh.apply(null,[].slice.call(arguments)))};P.prototype.not_starts_with=P.prototype.Fd;P.prototype.$c=function(a){return Q(this,yh.apply(null,[].slice.call(arguments)))};P.prototype.ends_with=P.prototype.$c;P.prototype.Ed=function(a){return Q(this,zh.apply(null,[].slice.call(arguments)))};P.prototype.not_ends_with=P.prototype.Ed;P.prototype.Nc=function(a){return Q(this,oh.apply(null,[].slice.call(arguments)))};P.prototype.and=P.prototype.Nc;
|
|
P.prototype.Wc=function(a){return Q(this,qh.apply(null,[].slice.call(arguments)))};P.prototype.date=P.prototype.Wc;P.prototype.qd=function(a){return Q(this,rh.apply(null,[].slice.call(arguments)))};P.prototype.inList=P.prototype.qd;P.prototype.bounds=function(a){return Q(this,sh.apply(null,[].slice.call(arguments)))};P.prototype.bounds=P.prototype.bounds;var R=function(a,b,c){O.call(this,a,b,c);Ah()};w(R,O);u("ee.Collection",R);var Bh=!1,Ah=function(){Bh||(L(R,"Collection","Collection"),L(R,"AggregateFeatureCollection","Collection","aggregate_"),Bh=!0)};R.prototype.filter=function(a){if(!a)throw Error("Empty filters.");return Ig(this,K("Collection.filter",this,a))};R.prototype.filter=R.prototype.filter;R.prototype.ic=function(a,b,c){var d=N(R.prototype.ic,arguments);return this.filter(th(d.name,d.operator,d.value))};R.prototype.filterMetadata=R.prototype.ic;
|
|
R.prototype.dd=function(a){return this.filter(sh(a))};R.prototype.filterBounds=R.prototype.dd;R.prototype.hc=function(a,b){var c=N(R.prototype.hc,arguments);return this.filter(qh(c.start,c.end))};R.prototype.filterDate=R.prototype.hc;R.prototype.limit=function(a,b,c){var d=N(R.prototype.limit,arguments);return Ig(this,K("Collection.limit",this,d.max,d.property,d.ascending))};R.prototype.limit=R.prototype.limit;
|
|
R.prototype.sort=function(a,b){var c=N(R.prototype.sort,arguments);return Ig(this,K("Collection.limit",this,void 0,c.property,c.ascending))};R.prototype.sort=R.prototype.sort;R.prototype.name=function(){return"Collection"};R.prototype.elementType=function(){return O};R.prototype.map=function(a,b){var c=this.elementType();return Ig(this,K("Collection.map",this,function(b){return a(new c(b))},b))};R.prototype.map=R.prototype.map;
|
|
R.prototype.ud=function(a,b){var c=l(b)?b:null,d=this.elementType();return K("Collection.iterate",this,function(b,c){return a(new d(b),c)},c)};R.prototype.iterate=R.prototype.ud;var Ch=function(a){if(!(this instanceof Ch))return H(Ch,arguments);if(a instanceof Ch)return a;Dh();if(ha(a))G.call(this,null,null),this.uc=a;else if(a instanceof G)G.call(this,a.f,a.o,a.w),this.uc=null;else throw Error("Invalid argument specified for ee.Number(): "+a);};w(Ch,G);u("ee.Number",Ch);var Eh=!1,Dh=function(){Eh||(L(Ch,"Number","Number"),Eh=!0)};Ch.prototype.encode=function(a){return ha(this.uc)?this.uc:Ch.j.encode.call(this,a)};Ch.prototype.name=function(){return"Number"};var Fh=function(a){if(!(this instanceof Fh))return H(Fh,arguments);if(a instanceof Fh)return a;Gh();if(p(a))G.call(this,null,null),this.Ec=a;else if(a instanceof G)this.Ec=null,a.f&&"String"==a.f.C().returns?G.call(this,a.f,a.o,a.w):G.call(this,new J("String"),{input:a},null);else throw Error("Invalid argument specified for ee.String(): "+a);};w(Fh,G);u("ee.String",Fh);var Hh=!1,Gh=function(){Hh||(L(Fh,"String","String"),Hh=!0)};
|
|
Fh.prototype.encode=function(a){return p(this.Ec)?this.Ec:Fh.j.encode.call(this,a)};Fh.prototype.name=function(){return"String"};var Ih=function(a,b){if(!(this instanceof Ih))return H(Ih,arguments);for(var c=[],d=a.args,e=0;e<d.length;e++){var f=d[e],g=f.type;c.push(Jh(g in Jg?Jg[g]:null,f.name))}if(!l(b.apply(null,c)))throw Error("User-defined methods must return a value.");this.na=Kh(a,c,b);this.be=b.apply(null,c)};w(Ih,I);u("ee.CustomFunction",Ih);Ih.prototype.encode=function(a){return{type:"Function",argumentNames:La(this.na.args,function(a){return a.name}),body:a(this.be)}};Ih.prototype.C=function(){return this.na};
|
|
var Jh=function(a,b){a=a||Object;if(!(a.prototype instanceof G))if(a&&a!=Object)if(a==String)a=Fh;else if(a==Number)a=Ch;else if(a==Array)a=k.ee.List;else throw Error("Variables must be of an EE type, e.g. ee.Image or ee.Number.");else a=G;var c=function(){};c.prototype=a.prototype;c=new c;c.f=null;c.o=null;c.w=b;return c},Lh=function(a,b){var c=La(b,function(a){return{name:null,type:p(a)?a:Kg(a)}}),c={name:"",returns:p("Object")?"Object":Kg("Object"),args:c};return new Ih(c,a)},Kh=function(a,b,c){for(var d=
|
|
[],e=0;e<b.length;e++)null===b[e].w&&d.push(e);if(0==d.length)return a;var f=function(a){var b=0;r(a)&&!q(a)&&("Function"==a.type&&b++,$a(a,function(a){b+=f(a)}));return b},e=Fg(c.apply(null,b));c="_MAPPING_VAR_"+f(e)+"_";for(e=0;e<d.length;e++){var g=d[e],m=c+e;b[g].w=m;a.args[g].name=m}return a};var Mh=function(a,b){if(!(this instanceof Mh))return H(Mh,arguments);if(a instanceof Mh)return a;Nh();var c=N(Mh,arguments);a=c.date;var c=c.tz,d=new J("Date"),e={},f=null;if(Ng(a)){if(e.value=a,c)if(Ng(c))e.timeZone=c;else throw Error("Invalid argument specified for ee.Date(..., opt_tz): "+c);}else if(Mg(a))e.value=a;else if(r(a)&&"function"==typeof a.getFullYear)e.value=Math.floor(a.getTime());else if(a instanceof G)a.f&&"Date"==a.f.C().returns?(d=a.f,e=a.o,f=a.w):e.value=a;else throw Error("Invalid argument specified for ee.Date(): "+
|
|
a);G.call(this,d,e,f)};w(Mh,G);u("ee.Date",Mh);var Oh=!1,Nh=function(){Oh||(L(Mh,"Date","Date"),Oh=!0)};Mh.prototype.name=function(){return"Date"};var S=function(a,b,c,d){if(!(this instanceof S))return H(S,arguments);if(!("type"in a)){var e=N(S,arguments);a=e.geoJson;b=e.proj;c=e.geodesic;d=e.evenOdd}Ph();e=null!=b||null!=c||null!=d;if(a instanceof G&&!(a instanceof S&&a.Nb)){if(e)throw Error("Setting the CRS, geodesic, or evenOdd flag on a computed Geometry is not suported. Use Geometry.transform().");G.call(this,a.f,a.o,a.w)}else{a instanceof S&&(a=a.encode());if(!Qh(a))throw Error("Invalid GeoJSON geometry: "+JSON.stringify(a));G.call(this,
|
|
null,null);this.Nb=a.type;this.ie=a.coordinates||null;this.me=a.geometries||null;if(null!=b)this.zc=b;else if("crs"in a)if(r(a.crs)&&"name"==a.crs.type&&r(a.crs.properties)&&p(a.crs.properties.name))this.zc=a.crs.properties.name;else throw Error("Invalid CRS declaration in GeoJSON: "+(new kd).v(a.crs));this.ub=c;!l(this.ub)&&"geodesic"in a&&(this.ub=!!a.geodesic);this.tb=d;!l(this.tb)&&"evenOdd"in a&&(this.tb=!!a.evenOdd)}};w(S,G);u("ee.Geometry",S);
|
|
var Rh=!1,Ph=function(){Rh||(L(S,"Geometry","Geometry"),Rh=!0)},Sh=function(a,b){if(!(this instanceof Sh))return Th(Sh,arguments);var c=Uh(Sh,"Point",1,arguments);if(!(c instanceof G)){var d=c.coordinates;if(!n(d)||2!=d.length)throw Error("The Geometry.Point constructor requires 2 coordinates.");}S.call(this,c)};w(Sh,S);S.Point=Sh;var Vh=function(a,b){if(!(this instanceof Vh))return Th(Vh,arguments);S.call(this,Uh(Vh,"MultiPoint",2,arguments))};w(Vh,S);S.MultiPoint=Vh;
|
|
var Wh=function(a,b,c,d,e){if(!(this instanceof Wh))return Th(Wh,arguments);var f=Uh(Wh,"Rectangle",2,arguments);if(!(f instanceof G)){var g=f.coordinates;if(2!=g.length)throw Error("The Geometry.Rectangle constructor requires 2 points or 4 coordinates.");var m=g[0][0],v=g[0][1],ca=g[1][0],g=g[1][1];f.coordinates=[[[m,g],[m,v],[ca,v],[ca,g]]];f.type="Polygon"}S.call(this,f)};w(Wh,S);S.Rectangle=Wh;
|
|
var Xh=function(a,b,c,d){if(!(this instanceof Xh))return Th(Xh,arguments);S.call(this,Uh(Xh,"LineString",2,arguments))};w(Xh,S);S.LineString=Xh;var Yh=function(a,b,c,d){if(!(this instanceof Yh))return Th(Yh,arguments);S.call(this,Uh(Yh,"LinearRing",2,arguments))};w(Yh,S);S.LinearRing=Yh;var Zh=function(a,b,c,d){if(!(this instanceof Zh))return Th(Zh,arguments);S.call(this,Uh(Zh,"MultiLineString",3,arguments))};w(Zh,S);S.MultiLineString=Zh;
|
|
var $h=function(a,b,c,d,e){if(!(this instanceof $h))return Th($h,arguments);S.call(this,Uh($h,"Polygon",3,arguments))};w($h,S);S.Polygon=$h;var ai=function(a,b,c,d,e){if(!(this instanceof ai))return Th(ai,arguments);S.call(this,Uh(ai,"MultiPolygon",4,arguments))};w(ai,S);S.MultiPolygon=ai;
|
|
S.prototype.encode=function(a){if(!this.Nb){if(!a)throw Error("Must specify an encode function when encoding a computed geometry.");return G.prototype.encode.call(this,a)}a={type:this.Nb};"GeometryCollection"==this.Nb?a.geometries=this.me:a.coordinates=this.ie;null!=this.zc&&(a.crs={type:"name",properties:{name:this.zc}});null!=this.ub&&(a.geodesic=this.ub);null!=this.tb&&(a.evenOdd=this.tb);return a};
|
|
S.prototype.Ic=function(){if(this.f)throw Error("Can't convert a computed Geometry to GeoJSON. Use getInfo() instead.");return this.encode()};S.prototype.toGeoJSON=S.prototype.Ic;S.prototype.Jc=function(){if(this.f)throw Error("Can't convert a computed Geometry to GeoJSON. Use getInfo() instead.");return(new kd).v(this.Ic())};S.prototype.toGeoJSONString=S.prototype.Jc;S.prototype.v=function(){return Gg(this)};S.prototype.serialize=S.prototype.v;
|
|
S.prototype.toString=function(){return"ee.Geometry("+this.Jc()+")"};
|
|
var Qh=function(a){var b=a.type;if("GeometryCollection"==b){b=a.geometries;if(!n(b))return!1;for(a=0;a<b.length;a++)if(!Qh(b[a]))return!1;return!0}a=a.coordinates;var c=bi(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)},bi=function(a){if(!n(a))return-1;if(n(a[0])){for(var b=bi(a[0]),c=1;c<a.length;c++)if(bi(a[c])!=b)return-1;return b+
|
|
1}for(c=0;c<a.length;c++)if(!ha(a[c]))return-1;return 0==a.length%2?1:-1},Uh=function(a,b,c,d){Na(d,Mg)?a={coordinates:Va(d)}:(a=N(a,d),a.coordinates=a.coords,delete a.coords,a.crs=a.proj,delete a.proj,a=ab(a,fa));if(ci(a.coordinates)||null!=a.crs||null!=a.geodesic||null!=a.maxError)return(new J("GeometryConstructors."+b)).apply(a);a.type=b;d=a.coordinates;if(1>c||4<c)throw Error("Unexpected nesting level.");if(Na(d,ha)&&ha(d[0])&&2!=d.length){if(0!=d.length%2)throw Error("Invalid number of coordinates: "+
|
|
d.length);for(var e=[],f=0;f<d.length;f+=2)e.push([d[f],d[f+1]]);d=e}e=d;for(f=0;n(e);)e=e[0],f++;for(;f<c;)d=[d],f++;if(bi(d)!=c)throw Error("Invalid geometry");for(e=d;n(e)&&1==e.length;)e=e[0];c=n(e)&&0==e.length?[]:d;a.coordinates=c;if(c=null==a.evenOdd)c=0<=Ha(["Polygon","Rectangle","MultiPolygon"],b);c&&(a.evenOdd=!0);return a},ci=function(a){return n(a)?Ma(a,ci):a instanceof G},Th=function(a,b){var c=function(){};c.prototype=a.prototype;var c=new c,d=a.apply(c,b);return void 0!==d?d:c};
|
|
S.prototype.name=function(){return"Geometry"};u("ee.Deserializer",function(){});var ei=function(a){return di(id(a))};u("ee.Deserializer.fromJSON",ei);var di=function(a){var b={};if(r(a)&&"CompoundValue"==a.type){for(var c=a.scope,d=0;d<c.length;d++){var e=c[d][0],f=c[d][1];if(e in b)throw Error('Duplicate scope key "'+e+'" in scope #'+d+".");b[e]=fi(f,b)}a=a.value}return fi(a,b)};u("ee.Deserializer.decode",di);
|
|
var fi=function(a,b){if(null===a||ha(a)||"boolean"==typeof a||p(a))return a;if(n(a))return La(a,function(a){return fi(a,b)});if(!r(a)||q(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":c=a.value;if(!p(c))throw Error("Invalid variable name: "+c);return Jh(Object,c);case "Date":c=a.value;if(!ha(c))throw Error("Invalid date value: "+c);return new Mh(c/1E3);case "Bytes":return c=
|
|
new xg,c.encode=function(){return a},c;case "Invocation":var c="functionName"in a?Tg(a.functionName):fi(a["function"],b),d=bb(a.arguments,function(a){return fi(a,b)});if(c instanceof I)return c.apply(d);if(c instanceof G)return new G(c,d);throw Error("Invalid function value: "+a["function"]);case "Dictionary":return bb(a.value,function(a){return fi(a,b)});case "Function":var e=fi(a.body,b),c={name:"",args:La(a.argumentNames,function(a){return{name:a,type:"Object",optional:!1}}),returns:"Object"};
|
|
return new Ih(c,function(){return e});case "Point":case "MultiPoint":case "LineString":case "MultiLineString":case "Polygon":case "MultiPolygon":case "LinearRing":case "GeometryCollection":return new S(a);case "CompoundValue":throw Error("Nested CompoundValues are disallowed.");default:throw Error("Unknown encoded object type: "+c);}};var gi=function(a){if(!(this instanceof gi))return H(gi,arguments);if(a instanceof gi)return a;hi();Og(a)?(G.call(this,null,null),this.dc=a):(a instanceof G&&a.f&&"Dictionary"==a.f.C().returns?G.call(this,a.f,a.o,a.w):G.call(this,new J("Dictionary"),{input:a},null),this.dc=null)};w(gi,G);u("ee.Dictionary",gi);var ii=!1,hi=function(){ii||(L(gi,"Dictionary","Dictionary"),ii=!0)};gi.prototype.encode=function(a){return null===this.dc?gi.j.encode.call(this,a):a(this.dc)};gi.prototype.name=function(){return"Dictionary"};var T=function(a,b){if(!(this instanceof T))return H(T,arguments);if(a instanceof T){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)");ji();if(a instanceof S||null===a)O.call(this,new J("Feature"),{geometry:a,metadata:b||null});else if(a instanceof G)O.call(this,a.f,a.o,a.w);else if("Feature"==a.type){var c=a.properties||{};if("id"in a){if("system:index"in
|
|
c)throw Error('Can\'t specify both "id" and "system:index".');c=ib(c);c["system:index"]=a.id}O.call(this,new J("Feature"),{geometry:new S(a.geometry),metadata:c})}else O.call(this,new J("Feature"),{geometry:new S(a),metadata:b||null})};w(T,O);u("ee.Feature",T);var ki=!1,ji=function(){ki||(L(T,"Feature","Feature"),ki=!0)};T.prototype.getInfo=T.prototype.W;T.prototype.getMap=function(a,b){var c=N(T.prototype.getMap,arguments);return K("Collection",[this]).getMap(c.visParams,c.callback)};
|
|
T.prototype.getMap=T.prototype.getMap;var li=function(a,b){return Sh.apply(null,arguments)};T.Point=li;var mi=function(a){return Vh.apply(null,arguments)};T.MultiPoint=mi;var ni=function(a,b,c,d){return new Wh([a,b,c,d])};T.Rectangle=ni;var oi=function(a){return Xh.apply(null,arguments)};T.LineString=oi;var pi=function(a){return Yh.apply(null,arguments)};T.LinearRing=pi;var qi=function(a){return Zh.apply(null,arguments)};T.MultiLine=qi;var ri=function(a){return $h.apply(null,arguments)};
|
|
T.Polygon=ri;var si=function(a){return ai.apply(null,arguments)};T.MultiPolygon=si;T.prototype.name=function(){return"Feature"};var ti=function(a){if(this instanceof ti){if(1<arguments.length)throw Error("ee.List() only accepts 1 argument.");if(a instanceof ti)return a}else return H(ti,arguments);ui();if(n(a))G.call(this,null,null),this.tc=a;else if(a instanceof G)G.call(this,a.f,a.o,a.w),this.tc=null;else throw Error("Invalid argument specified for ee.List(): "+a);};w(ti,G);u("ee.List",ti);var vi=!1,ui=function(){vi||(L(ti,"List","List"),vi=!0)};
|
|
ti.prototype.encode=function(a){return n(this.tc)?La(this.tc,function(b){return a(b)}):ti.j.encode.call(this,a)};ti.prototype.name=function(){return"List"};var U=function(a,b){if(!(this instanceof U))return H(U,arguments);if(a instanceof U)return a;if(2<arguments.length)throw Error("The FeatureCollection constructor takes at most 2 arguments ("+arguments.length+" given)");wi();a instanceof S&&(a=new T(a));a instanceof T&&(a=[a]);if(Mg(a)||Ng(a)){var c={tableId:a};b&&(c.geometryColumn=b);R.call(this,new J("Collection.loadTable"),c)}else if(n(a))R.call(this,new J("Collection"),{features:La(a,function(a){return new T(a)})});else if(a instanceof ti)R.call(this,
|
|
new J("Collection"),{features:a});else if(a instanceof G)R.call(this,a.f,a.o,a.w);else throw Error("Unrecognized argument type to convert to a FeatureCollection: "+a);};w(U,R);u("ee.FeatureCollection",U);var xi=!1,wi=function(){xi||(L(U,"FeatureCollection","FeatureCollection"),xi=!0)};U.prototype.getMap=function(a,b){var c=N(U.prototype.getMap,arguments),d=Ug("Collection.draw",{collection:this,color:(c.visParams||{}).color||"000000"});if(c.callback)d.getMap(null,c.callback);else return d.getMap()};
|
|
U.prototype.getMap=U.prototype.getMap;U.prototype.getInfo=U.prototype.W;U.prototype.sa=function(a,b,c,d){var e=N(U.prototype.sa,arguments),f={};f.table=this.v();e.format&&(f.format=e.format.toUpperCase());e.filename&&(f.filename=e.filename);if(e.selectors){var g=e.selectors;ga(g)&&(g=g.join(","));f.selectors=g}if(e.callback)Sf(f,function(a,b){a?e.callback(Tf(a)):e.callback(null,b)});else return Tf(Sf(f))};U.prototype.getDownloadURL=U.prototype.sa;
|
|
U.prototype.select=function(a,b){var c=arguments;return this.map(function(a){return a.select.apply(a,c)})};U.prototype.select=U.prototype.select;U.prototype.name=function(){return"FeatureCollection"};U.prototype.elementType=function(){return T};var V=function(a){if(!(this instanceof V))return H(V,arguments);if(a instanceof V)return a;yi();var b=arguments.length;if(0==b||1==b&&!l(a))O.call(this,new J("Image.mask"),{image:new V(0),mask:new V(0)});else if(1==b)if(Mg(a))O.call(this,new J("Image.constant"),{value:a});else if(Ng(a))O.call(this,new J("Image.load"),{id:a});else{if(n(a))return zi(La(a,function(a){return new V(a)}));if(a instanceof G)"Array"==a.name()?O.call(this,new J("Image.constant"),{value:a}):O.call(this,a.f,a.o,a.w);else throw Error("Unrecognized argument type to convert to an Image: "+
|
|
a);}else if(2==b){var b=arguments[0],c=arguments[1];if(Ng(b)&&Mg(c))O.call(this,new J("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)");};w(V,O);u("ee.Image",V);var Ai=!1,yi=function(){Ai||(L(V,"Image","Image"),L(V,"Window","Image","focal_"),Ai=!0)};V.prototype.getInfo=V.prototype.W;
|
|
V.prototype.getMap=function(a,b){var c=N(V.prototype.getMap,arguments),d=c.visParams?ib(c.visParams):{};d.image=this.v();if(c.callback)Lf(d,t(function(a,b){a&&(a.image=this);c.callback(a,b)},this));else return d=Lf(d),d.image=this,d};V.prototype.getMap=V.prototype.getMap;V.prototype.sa=function(a,b){var c=N(V.prototype.sa,arguments),d=c.params?ib(c.params):{};d.image=this.v();if(c.callback){var e=c.callback;Qf(d,function(a,b){a?e(Rf(a)):e(null,b)})}else return Rf(Qf(d))};
|
|
V.prototype.getDownloadURL=V.prototype.sa;V.prototype.lc=function(a,b){var c=N(V.prototype.lc,arguments),d=c.params?ib(c.params):{};d.image=this.v();if(d.region)if(n(d.region)||Og(d.region))d.region=ld(d.region);else if(!p(d.region))throw Error("The region parameter must be an array or a GeoJSON object.");if(c.callback)Of(d,function(a,b){var d="";if(!l(b))try{d=Pf(a)}catch(m){b=String(m.message)}c.callback(d,b)});else return Pf(Of(d))};V.prototype.getThumbURL=V.prototype.lc;
|
|
var Bi=function(a,b,c){var d=N(Bi,arguments);return zi([d.r,d.g,d.b],["vis-red","vis-green","vis-blue"])};V.rgb=Bi;var Ci=function(a){return zi(Array.prototype.slice.call(arguments),null)};V.cat=Ci;var zi=function(a,b){if(0==a.length)return K("Image.constant",[]);for(var c=new V(a[0]),d=1;d<a.length;d++)c=K("Image.addBands",c,a[d]);b&&(c=c.select([".*"],b));return c};
|
|
V.prototype.select=function(a){var b=Array.prototype.slice.call(arguments),c={input:this,bandSelectors:b[0]||[]};if(2<b.length||Ng(b[0])||Mg(b[0])){for(var d=0;d<b.length;d++)if(!(Ng(b[d])||Mg(b[d])||b[d]instanceof G))throw Error("Illegal argument to select(): "+b[d]);c.bandSelectors=b}else b[1]&&(c.newNames=b[1]);return Ug("Image.select",c)};V.prototype.select=V.prototype.select;
|
|
V.prototype.gc=function(a,b){var c=N(V.prototype.gc,arguments),d=["DEFAULT_EXPRESSION_IMAGE"],e={DEFAULT_EXPRESSION_IMAGE:this};if(c.map){var f=c.map,g;for(g in f)d.push(g),e[g]=new V(f[g])}var m=K("Image.parseExpression",c.expression,"DEFAULT_EXPRESSION_IMAGE",d),c=new I;c.encode=function(a){return m.encode(a)};c.C=function(){return{name:"",args:La(d,function(a){return{name:a,type:"Image",optional:!1}},this),returns:"Image"}};return c.apply(e)};V.prototype.expression=V.prototype.gc;
|
|
V.prototype.clip=function(a){try{a=new S(a)}catch(b){}return K("Image.clip",this,a)};V.prototype.clip=V.prototype.clip;V.prototype.Nd=function(a){var b;b=1!=arguments.length||Ng(arguments[0])?Va(arguments):arguments[0];return K("Image.rename",this,b)};V.prototype.rename=V.prototype.Nd;V.prototype.name=function(){return"Image"};var X=function(a){if(!(this instanceof X))return H(X,arguments);if(a instanceof X)return a;if(1!=arguments.length)throw Error("The ImageCollection constructor takes exactly 1 argument ("+arguments.length+" given)");Di();a instanceof V&&(a=[a]);if(Ng(a))R.call(this,new J("ImageCollection.load"),{id:a});else if(n(a))R.call(this,new J("ImageCollection.fromImages"),{images:La(a,function(a){return new V(a)})});else if(a instanceof ti)R.call(this,new J("ImageCollection.fromImages"),{images:a});else if(a instanceof
|
|
G)R.call(this,a.f,a.o,a.w);else throw Error("Unrecognized argument type to convert to an ImageCollection: "+a);};w(X,R);u("ee.ImageCollection",X);var Ei=!1,Di=function(){Ei||(L(X,"ImageCollection","ImageCollection"),L(X,"reduce","ImageCollection"),Ei=!0)};X.prototype.getMap=function(a,b){var c=N(X.prototype.getMap,arguments),d=K("ImageCollection.mosaic",this);if(c.callback)d.getMap(c.visParams,c.callback);else return d.getMap(c.visParams)};X.prototype.getMap=X.prototype.getMap;
|
|
X.prototype.getInfo=X.prototype.W;X.prototype.select=function(a,b){var c=arguments;return this.map(function(a){return a.select.apply(a,c)})};X.prototype.select=X.prototype.select;X.prototype.name=function(){return"ImageCollection"};X.prototype.elementType=function(){return V};var Fi={};u("ee.Terrain",Fi);Fi.pc=!1;Fi.pe=function(){Fi.pc||(L(Fi,"Terrain","Terrain"),Fi.pc=!0)};Fi.reset=function(){M(Fi);Fi.pc=!1};var Li=function(a,b,c,d,e){if("ready"!=Gi||a||b){var f=null!=c;if(d)if(f)Hi.push(d);else throw Error("Can't pass an error callback without a success callback.");if("loading"==Gi&&f)Ii.push(c);else if(Gi="loading",Ef(a,b,e),f)Ii.push(c),Xg(Ji,Ki);else try{Xg(),Ji()}catch(g){throw Ki(g),g;}}else c&&c()};u("ee.initialize",Li);
|
|
var Oi=function(){Gi="not_ready";Df=Cf=Af=null;Bf=!1;Vg=null;Wg={};M(Mh);Oh=!1;M(gi);ii=!1;M(O);eh=!1;M(V);Ai=!1;M(T);ki=!1;M(R);Bh=!1;M(X);Ei=!1;M(U);xi=!1;M(P);gh=!1;M(S);Rh=!1;M(ti);vi=!1;M(Ch);Eh=!1;M(Fh);Hh=!1;Fi.reset();for(var a=k.ee,b=0;b<Mi.length;b++){var c=Mi[b];M(a[c]);delete a[c]}Mi=[];Jg=a;var a=Ni,d;for(d in a)delete a[d]};u("ee.reset",Oi);var Qi={Me:"not_ready",LOADING:"loading",Ne:"ready"};u("ee.InitState",Qi);u("ee.InitState.NOT_READY","not_ready");u("ee.InitState.LOADING","loading");
|
|
u("ee.InitState.READY","ready");var Gi="not_ready",Ii=[],Hi=[];u("ee.TILE_SIZE",256);var Mi=[],Ni={};u("ee.Algorithms",Ni);var Ri=function(a,b){p(a)&&(a=new J(a));return I.prototype.call.apply(a,Array.prototype.slice.call(arguments,1))};u("ee.call",Ri);var Si=function(a,b){p(a)&&(a=new J(a));return a.apply(b)};u("ee.apply",Si);
|
|
var Ji=function(){if("loading"==Gi){try{Nh();hi();dh();yi();ji();Ah();Di();wi();fh();Ph();ui();Dh();Gh();Fi.pe();var a=Yg(),b={},c={},d;for(d in a){b[-1!=d.indexOf(".")?d.slice(0,d.indexOf(".")):d]=!0;var e=a[d].returns.replace(/<.*>/,"");c[e]=!0}var f=k.ee,g;for(g in b)g in c&&!(g in f)&&(f[g]=Ti(g),Mi.push(g),a[g]?(f[g].signature=a[g],f[g].signature.isConstructor=!0,Wg[g]=!0):f[g].signature={});Jg=f;Ui()}catch(m){Ki(m);return}Gi="ready";for(Hi=[];0<Ii.length;)Ii.shift()()}},Ki=function(a){if("loading"==
|
|
Gi)for(Gi="not_ready",Ii=[];0<Hi.length;)Hi.shift()(a)},Ui=function(){var a=Zg();db(a).sort().forEach(function(b){var c=a[b],d=c.C();if(!d.hidden){b=b.split(".");var e=Ni;for(e.signature={};1<b.length;){var f=b[0];f in e||(e[f]={signature:{}});e=e[f];b=Xa(b,1)}f=function(a){return Sg(c,void 0,Array.prototype.slice.call(arguments,0))};f.signature=d;f.toString=t(c.toString,c);e[b[0]]=f}})},Ti=function(a){var b=function(b){var c=k.ee[a],e=Array.prototype.slice.call(arguments),f=1==e.length;if(f&&e[0]instanceof
|
|
c)return e[0];if(!(this instanceof c))return H(c,e);var c=$g(a),g=!(e[0]instanceof G),m=!1;c&&(f?g?m=!0:e[0].f!=c&&(m=!0):m=!0);if(m)G.call(this,c,Rg(c,Qg(c,e)));else{if(!f)throw Error("Too many arguments for ee."+a+"(): "+e);if(g)throw Error("Invalid argument for ee."+a+"(): "+e+". Must be a ComputedObject.");e=e[0];G.call(this,e.f,e.o,e.w)}};w(b,G);b.prototype.name=function(){return a};L(b,a,a);return b},Pg=function(a,b){if(null===a)return null;if(l(a)){var c=k.ee;switch(b){case "Image":return new V(a);
|
|
case "Feature":return a instanceof R?K("Feature",K("Collection.geometry",a)):new T(a);case "Element":if(a instanceof O)return a;if(a instanceof S)return new T(a);if(a instanceof G)return new O(a.f,a.o,a.w);throw Error("Cannot convert "+a+" to Element.");case "Geometry":return a instanceof U?K("Collection.geometry",a):new S(a);case "FeatureCollection":case "Collection":return a instanceof R?a:new U(a);case "ImageCollection":return new X(a);case "Filter":return new P(a);case "Algorithm":if(p(a))return new J(a);
|
|
if(q(a)){for(var c=a.length,d=[],e=0;e<c;e++)d[e]="Object";return Lh(a,d)}if(a instanceof xg)return a;throw Error("Argument is not a function: "+a);case "String":return Ng(a)||a instanceof Fh||a instanceof G?new Fh(a):a;case "Dictionary":return Og(a)?a:new gi(a);case "List":return new ti(a);case "Number":case "Float":case "Long":case "Integer":case "Short":case "Byte":return new Ch(a);default:if(b in c){d=$g(b);if(a instanceof c[b])return a;if(d)return new c[b](a);if(p(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 Vi=function(a,b,c){ug.call(this,a,b,c);this.tileSize=new google.maps.Size(256,256);this.gd=new wd;this.fd=new wd};w(Vi,ug);u("ee.FloatTileOverlay",Vi);Vi.prototype.getTile=function(a,b){var c=vg(this,a,b),d=[this.url,c].join("/")+"?token="+this.Kb,c=[c,this.oa,this.Kb].join("/");this.ga.push(c);this.oa+=1;var e=se("DIV");Wi(this,d,a,c,e);this.Sa();return e};
|
|
var Wi=function(a,b,c,d,e){var f=Wd();f.open("GET",b,!0);f.responseType="arraybuffer";f.onreadystatechange=t(function(){if(f.readyState===XMLHttpRequest.DONE&&200===f.status){var a=f.response;if(a)a=new Float32Array(a),this.gd.set(c,a),this.fd.set(c,e),Ta(this.ga,d),this.Sa();else throw this.Gc.add(d),Error("Unable to request floating point array buffers.");}},a);f.send()};Vi.prototype.Sa=function(){this.dispatchEvent(new wg(this.ga.length))};Vi.prototype.c=function(){this.fd=this.gd=null;Vi.j.c.call(this)};var Y=function(){B.call(this);this.Lb=new Xi(0,4);this.Ka=new wd};w(Y,B);u("ee.MapTileManager",Y);Y.jd=function(){return Y.rd?Y.rd:Y.rd=new Y};Y.prototype.send=function(a,b,c,d,e){if(this.Ka.get(a))throw Error("[ee.MapTileManager] ID in use");b=new Yi(a,b,d,t(this.Md,this),l(e)?e:1);this.Ka.set(a,b);a=t(this.mc,this,b);this.Lb.Wa(a,c);return b};Y.prototype.abort=function(a){if(a=this.Ka.get(a))a.Aa||(a.Aa=!0,a.ja=new A("abort")),this.Md(a)};
|
|
Y.prototype.mc=function(a,b){if(a.D||a.Aa)Zi(this,b);else{a.gb=b;b.setActive(!0);var c=new ng;a.D=c;if(!$i(a))throw Error("Cannot dispatch first request!");}};Y.prototype.Md=function(a){this.Ka.remove(a.getId());a.D&&(Zi(this,a.gb),a.D.T());a.nc&&a.nc(a.ja,a.Ld)};var Zi=function(a,b){b.setActive(!1);if(!dg(a.Lb,b))throw Error("Object not released");};Y.prototype.c=function(){Y.j.c.call(this);this.Lb.T();this.Lb=null;var a=this.Ka;Ja(a.s(),function(a){a.T()});a.clear();this.Ka=null};
|
|
var Yi=function(a,b,c,d,e){z.call(this);this.da=a;this.Kc=b;this.we=l(e)?e:1;this.nc=c;this.wa=d};w(Yi,z);h=Yi.prototype;h.Pc=0;h.Aa=!1;h.D=null;h.gb=null;h.ja=null;h.Ld=null;var aj=["load","abort","error"];Yi.prototype.getId=function(){return this.da};Yi.prototype.getUrl=function(){return this.Kc};Yi.prototype.oe=function(a){if(this.Aa)this.wa&&this.wa(this);else switch(a.type){case "load":this.ja=a;this.wa&&this.wa(this);break;case "error":case "abort":$i(this)||(this.ja=a,this.wa&&this.wa(this))}};
|
|
Yi.prototype.c=function(){Yi.j.c.call(this);delete this.nc;delete this.wa};var $i=function(a){if(a.Pc>a.we)return!1;a.Pc++;qg(a.D,a.da);setTimeout(t(a.Ge,a),0);return!0};
|
|
Yi.prototype.Ge=function(){if(!this.Aa){var a=t(function(a){this.Aa||(pg(this.D,this.da,a),bc(this.D,aj,t(this.oe,this)),this.D.start())},this),b=this.getUrl();if(ff(b).Y.ia("profiling")){var c=new C;c.La="blob";c.X("complete",t(function(){this.Ld=c.getResponseHeader("X-Earth-Engine-Computation-Profile")||null;var d;if(200<=c.getStatus()&&300>c.getStatus())try{d=URL.createObjectURL(le(c))}catch(e){}a(d||b)},this));c.cb("ready",t(c.T,c));c.send(b,"GET")}else a(b)}};var bj=function(){this.M=!1};
|
|
w(bj,z);bj.prototype.setActive=function(a){this.M=a};bj.prototype.td=function(){return this.M};var Xi=function(a,b){ig.call(this,a,b)};w(Xi,ig);Xi.prototype.ac=function(){return new bj};Xi.prototype.pb=function(a){a.T()};Xi.prototype.vc=function(a){return!a.aa&&!a.td()};var Z=function(a,b,c,d,e){ug.call(this,a,b,c);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.zb=l(d.zb)?d.zb:!0;this.name=d.name;this.Hc=new Bd;this.wc=1;this.I=e||null};w(Z,ug);u("ee.MapLayerOverlay",Z);Z.prototype.Vb=function(a){return Vb(this,"tileevent",a)};Z.prototype.addTileCallback=Z.prototype.Vb;Z.prototype.Ac=function(a){dc(a)};
|
|
Z.prototype.removeTileCallback=Z.prototype.Ac;h=Z.prototype;h.Sa=function(){this.dispatchEvent(new wg(this.ga.length))};
|
|
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=vg(this,a,b);a=[this.url,b].join("/")+"?token="+this.Kb;this.I&&this.I.isEnabled()&&(a+="&profiling=1");b=[b,this.oa,this.Kb].join("/");this.oa+=1;c=se("DIV",{id:b});var d=(new Date).getTime()/1E3;this.ga.push(b);Y.jd().send(b,a,d,t(this.ne,this,c,b));this.Sa();return c};h.kc=function(){return this.ga.length};
|
|
h.releaseTile=function(a){Y.jd().abort(a.id);this.Hc.remove(l(a.firstElementChild)?a.firstElementChild:ve(a.firstChild));""!==a.id&&(this.Gc.remove(a.id),this.I&&this.I.De(a.id))};h.setOpacity=function(a){this.wc=a;var b=this.Hc.za();vd(b,function(b){ye(b,a)})};Z.prototype.getTile=Z.prototype.getTile;Z.prototype.setOpacity=Z.prototype.setOpacity;Z.prototype.releaseTile=Z.prototype.releaseTile;
|
|
Z.prototype.ne=function(a,b,c,d){"error"==c.type?(Ta(this.ga,b),this.Gc.add(b),this.dispatchEvent(c)):(Ta(this.ga,b),c.target&&"load"==c.type&&(c=c.target,this.Hc.add(c),1!=this.wc&&ye(c,this.wc),a.appendChild(c)),this.Sa());this.I&&null!==d&&this.I.$d(b,d)};var cj=function(a,b){if(!(this instanceof cj))return new cj(a,b);this.Ga=a;this.na=b};w(cj,I);u("ee.SavedFunction",cj);cj.prototype.encode=function(a){return K("LoadAlgorithmById",this.Ga).encode(a)};cj.prototype.C=function(){return this.na};(function(){var a={},b="ee.Collection.prototype.limit ee.Filter.prototype.not_contains ee.Filter.inList ee.Filter.not_ends_with ee.Element.prototype.set ee.Feature ee.Filter.contains ee.Filter.eq ee.Filter.prototype.starts_with ee.apply ee.initialize ee.Filter.prototype.inList ee.Filter.prototype.length ee.Filter.and ee.Deserializer.decode ee.FeatureCollection.prototype.getMap ee.data.getAuthToken ee.data.setAuthToken ee.Feature.MultiLine ee.Filter.neq ee.Filter.prototype.not ee.Filter.not_contains ee.TILE_SIZE ee.data.getTableDownloadId ee.Feature.Rectangle ee.ApiFunction._call ee.Feature.LinearRing ee.data.makeThumbUrl ee.data.getList ee.data.authenticate ee.Image.prototype.clip ee.Feature.prototype.getInfo ee.Function.prototype.call ee.ApiFunction._apply ee.data.getAuthClientId ee.Image.prototype.getDownloadURL ee.Algorithms ee.Geometry.prototype.serialize ee.ComputedObject.prototype.getInfo ee.Filter.lt ee.Filter.metadata ee.Filter.prototype.gte ee.Filter.gt ee.Collection.prototype.iterate ee.Feature.LineString ee.Filter.prototype.eq ee.ComputedObject.prototype.aside ee.Filter.or ee.ComputedObject.prototype.serialize ee.Feature.Point ee.data.getDownloadId ee.Feature.prototype.getMap ee.Filter.prototype.neq ee.Geometry.Point ee.Serializer.encode ee.data.getAuthScopes ee.Filter.ends_with ee.Filter.bounds ee.Filter.prototype.lt ee.Geometry.Polygon ee.Image.prototype.select ee.Geometry.MultiPolygon ee.data.setAuthTokenRefresher ee.data.getTileBaseUrl ee.FeatureCollection.prototype.select ee.data.getApiBaseUrl ee.Filter.prototype.date ee.Geometry.LinearRing ee.Number ee.Filter.prototype.lte ee.Filter.prototype.not_starts_with ee.data.setDeadline ee.ApiFunction.lookup ee.data.getTileUrl ee.data.getInfo ee.Filter.prototype.and ee.Date ee.Collection.prototype.filterMetadata ee.Filter.prototype.not_ends_with ee.Collection.prototype.filterBounds ee.Geometry.MultiLineString ee.FeatureCollection ee.ImageCollection.prototype.getMap ee.List ee.Collection.prototype.filter ee.Filter.starts_with ee.data.getXsrfToken ee.Serializer.toReadableJSON ee.ComputedObject.prototype.evaluate ee.Filter.prototype.gt ee.Image.prototype.getInfo ee.Terrain ee.Image.prototype.getThumbURL ee.Feature.MultiPoint ee.Filter ee.data.authenticateViaPopup ee.data.getThumbId ee.data.makeDownloadUrl ee.Filter.lte ee.InitState ee.Image.prototype.rename ee.Feature.Polygon ee.reset ee.Image.cat ee.Geometry.MultiPoint ee.Geometry.LineString ee.FeatureCollection.prototype.getInfo ee.Deserializer.fromJSON ee.Feature.MultiPolygon ee.Collection.prototype.sort ee.Collection.prototype.map ee.Filter.gte ee.Function.prototype.apply ee.ImageCollection.prototype.select ee.Serializer.toJSON ee.data.getValue ee.data.clearAuthToken ee.FeatureCollection.prototype.getDownloadURL ee.Filter.not_starts_with ee.Geometry.Rectangle ee.ImageCollection ee.data.getMapId ee.Collection.prototype.filterDate ee.Geometry.prototype.toGeoJSON ee.ImageCollection.prototype.getInfo ee.Image.rgb ee.call ee.Filter.prototype.bounds ee.String ee.Image.prototype.expression ee.Filter.date ee.Image ee.Dictionary ee.Geometry.prototype.toGeoJSONString ee.Filter.prototype.contains ee.Geometry ee.Image.prototype.getMap ee.data.makeTableDownloadUrl ee.Filter.prototype.ends_with".split(" "),
|
|
c=[["max","opt_property","opt_ascending"],["var_args"],["opt_leftField","opt_rightValue","opt_rightField","opt_leftValue"],["name","value"],["var_args"],["geometry","opt_properties"],["name","value"],["name","value"],["var_args"],["func","namedArgs"],["opt_baseurl","opt_tileurl","opt_successCallback","opt_errorCallback","opt_xsrfToken"],["var_args"],[],["var_args"],["json"],["opt_visParams","opt_callback"],[],"clientId tokenType accessToken expiresIn opt_extraScopes opt_callback opt_updateAuthLibrary".split(" "),
|
|
["coordinates"],["name","value"],[],["name","value"],[],["params","opt_callback"],["lon1","lat1","lon2","lat2"],["name","var_args"],["coordinates"],["id"],["params","opt_callback"],["clientId","success","opt_error","opt_extraScopes","opt_onImmediateFailed"],["geometry"],["opt_callback"],["var_args"],["name","namedArgs"],[],["params","opt_callback"],[],[],["opt_callback"],["name","value"],["name","operator","value"],["var_args"],["name","value"],["algorithm","opt_first"],["coordinates"],["var_args"],
|
|
["func","var_args"],["var_args"],[],["lon","lat"],["params","opt_callback"],["opt_visParams","opt_callback"],["var_args"],["coords","opt_proj"],["obj","opt_isCompound"],[],["name","value"],["geometry","opt_errorMargin"],["var_args"],["coords","opt_proj","opt_geodesic","opt_maxError","opt_evenOdd"],["var_args"],["coords","opt_proj","opt_geodesic","opt_maxError","opt_evenOdd"],["refresher"],[],["selectors","opt_names"],[],["var_args"],["coords","opt_proj","opt_geodesic","opt_maxError"],["number"],["var_args"],
|
|
["var_args"],["milliseconds"],["name"],["mapid","x","y","z"],["id","opt_callback"],["var_args"],["date","opt_tz"],["name","operator","value"],["var_args"],["geometry"],["coords","opt_proj","opt_geodesic","opt_maxError"],["args","opt_column"],["opt_visParams","opt_callback"],["list"],["newFilter"],["name","value"],[],["obj"],["callback"],["var_args"],["opt_callback"],[],["params","opt_callback"],["coordinates"],["opt_filter"],["opt_success","opt_error"],["params","opt_callback"],["id"],["name","value"],
|
|
[],["var_args"],["coordinates"],[],["var_args"],["coords","opt_proj"],["coords","opt_proj","opt_geodesic","opt_maxError"],["opt_callback"],["json"],["coordinates"],["property","opt_ascending"],["algorithm","opt_dropNulls"],["name","value"],["namedArgs"],["selectors","opt_names"],["obj"],["params","opt_callback"],[],["opt_format","opt_selectors","opt_filename","opt_callback"],["name","value"],["coords","opt_proj","opt_geodesic","opt_maxError","opt_evenOdd"],["args"],["params","opt_callback"],["start",
|
|
"opt_end"],[],["opt_callback"],["r","g","b"],["func","var_args"],["var_args"],["string"],["expression","opt_map"],["start","opt_end"],["opt_args"],["opt_dict"],[],["var_args"],["geoJson","opt_proj","opt_geodesic","opt_evenOdd"],["opt_visParams","opt_callback"],["id"],["var_args"]];[R.prototype.limit,P.prototype.Dd,rh,zh,O.prototype.set,T,uh,ih,P.prototype.Vd,Si,Li,P.prototype.qd,P.prototype.length,oh,di,U.prototype.getMap,xf,sf,qi,jh,P.prototype.ea,vh,256,Sf,ni,K,pi,Pf,Zf,qf,V.prototype.clip,T.prototype.W,
|
|
I.prototype.call,Ug,yf,V.prototype.sa,Ni,S.prototype.v,G.prototype.W,kh,th,P.prototype.md,mh,R.prototype.ud,oi,P.prototype.ad,G.prototype.Oc,ph,G.prototype.v,li,Qf,T.prototype.getMap,P.prototype.Cd,Sh,Fg,zf,yh,sh,P.prototype.yd,$h,V.prototype.select,ai,uf,Jf,U.prototype.select,If,P.prototype.Wc,Yh,Ch,P.prototype.zd,P.prototype.Fd,Gf,Tg,Mf,Yf,P.prototype.Nc,Mh,R.prototype.ic,P.prototype.Ed,R.prototype.dd,Zh,U,X.prototype.getMap,ti,R.prototype.filter,wh,Kf,Hg,G.prototype.evaluate,P.prototype.ld,V.prototype.W,
|
|
Fi,V.prototype.lc,mi,P,pf,Of,Rf,nh,Qi,V.prototype.Nd,ri,Oi,Ci,Vh,Xh,U.prototype.W,ei,si,R.prototype.sort,R.prototype.map,lh,I.prototype.apply,X.prototype.select,Gg,Nf,wf,U.prototype.sa,xh,Wh,X,Lf,R.prototype.hc,S.prototype.Ic,X.prototype.W,Bi,Ri,P.prototype.bounds,Fh,V.prototype.gc,qh,V,gi,S.prototype.Jc,P.prototype.contains,S,V.prototype.getMap,Tf,P.prototype.$c].forEach(function(d,e){d&&(a[d.toString()]={name:b[e],paramNames:c[e]})});k.EXPORTED_FN_INFO=a})();})();
|