mirror of
https://github.com/google/earthengine-api.git
synced 2025-12-08 19:26:12 +00:00
201 lines
101 KiB
JavaScript
201 lines
101 KiB
JavaScript
(function() {var h,aa=aa||{},l=this,m=function(a){return void 0!==a},ba=function(){},ca=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},n=function(a){return"array"==ca(a)},da=function(a){var b=ca(a);return"array"==b||"object"==b&&"number"==typeof a.length},p=function(a){return"string"==typeof a},q=function(a){return"number"==typeof a},r=function(a){return"function"==ca(a)},t=function(a){var b=typeof a;return"object"==b&&null!=a||"function"==b},ea="closure_uid_"+
|
|
(1E9*Math.random()>>>0),fa=0,ga=function(a,b,c){return a.call.apply(a.bind,arguments)},ha=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)}},u=function(a,b,c){u=Function.prototype.bind&&-1!=Function.prototype.bind.toString().indexOf("native code")?ga:ha;return u.apply(null,arguments)},
|
|
ia=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)}},ja=Date.now||function(){return+new Date},v=function(a,b){var c=a.split("."),d=l;c[0]in d||!d.execScript||d.execScript("var "+c[0]);for(var e;c.length&&(e=c.shift());)!c.length&&m(b)?d[e]=b:d=d[e]?d[e]:d[e]={}},x=function(a,b){function c(){}c.prototype=b.prototype;a.l=b.prototype;a.prototype=new c;a.prototype.constructor=a;a.Wd=function(a,c,f){for(var g=
|
|
Array(arguments.length-2),k=2;k<arguments.length;k++)g[k-2]=arguments[k];return b.prototype[c].apply(a,g)}};var ka=function(a,b,c){for(var d in a)b.call(c,a[d],d,a)},ma=function(a){var b=la,c={},d;for(d in b)a.call(void 0,b[d],d,b)&&(c[d]=b[d]);return c},na=function(a,b,c){var d={},e;for(e in a)d[e]=b.call(c,a[e],e,a);return d},oa=function(a){var b=[],c=0,d;for(d in a)b[c++]=a[d];return b},pa=function(a){var b=[],c=0,d;for(d in a)b[c++]=d;return b},qa=function(a){return null!==a&&"withCredentials"in a},ra=function(a){for(var b in a)return!1;return!0},sa=function(a,b){b in a&&delete a[b]},ta=function(a){var b=
|
|
{},c;for(c in a)b[c]=a[c];return b},ua=function(a){var b=ca(a);if("object"==b||"array"==b){if(r(a.clone))return a.clone();var b="array"==b?[]:{},c;for(c in a)b[c]=ua(a[c]);return b}return a},va="constructor hasOwnProperty isPrototypeOf propertyIsEnumerable toLocaleString toString valueOf".split(" "),wa=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<va.length;f++)c=va[f],Object.prototype.hasOwnProperty.call(d,c)&&(a[c]=d[c])}};var y=function(a){if(Error.captureStackTrace)Error.captureStackTrace(this,y);else{var b=Error().stack;b&&(this.stack=b)}a&&(this.message=String(a))};x(y,Error);y.prototype.name="CustomError";var xa;var ya=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")},za=String.prototype.trim?function(a){return a.trim()}:function(a){return a.replace(/^[\s\xa0]+|[\s\xa0]+$/g,"")},Ha=function(a){if(!Aa.test(a))return a;-1!=a.indexOf("&")&&(a=a.replace(Ba,"&"));-1!=a.indexOf("<")&&(a=a.replace(Ca,"<"));-1!=a.indexOf(">")&&(a=a.replace(Da,">"));-1!=a.indexOf('"')&&(a=a.replace(Ea,"""));-1!=a.indexOf("'")&&
|
|
(a=a.replace(Fa,"'"));-1!=a.indexOf("\x00")&&(a=a.replace(Ga,"�"));return a},Ba=/&/g,Ca=/</g,Da=/>/g,Ea=/"/g,Fa=/'/g,Ga=/\x00/g,Aa=/[\x00&<>"']/,Ia=function(a,b){return a<b?-1:a>b?1:0};var Ja=function(a,b){b.unshift(a);y.call(this,ya.apply(null,b));b.shift()};x(Ja,y);Ja.prototype.name="AssertionError";
|
|
var Ka=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 Ja(""+e,f||[]);},z=function(a,b,c){a||Ka("",null,b,Array.prototype.slice.call(arguments,2));return a},La=function(a,b){throw new Ja("Failure"+(a?": "+a:""),Array.prototype.slice.call(arguments,1));},Ma=function(a,b,c){r(a)||Ka("Expected function but got %s: %s.",[ca(a),a],b,Array.prototype.slice.call(arguments,2))};var Na=Array.prototype.indexOf?function(a,b,c){z(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},Oa=Array.prototype.lastIndexOf?function(a,b,c){z(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},Pa=Array.prototype.forEach?function(a,b,c){z(null!=a.length);Array.prototype.forEach.call(a,b,c)}:function(a,b,c){for(var d=a.length,e=p(a)?a.split(""):a,f=0;f<d;f++)f in e&&b.call(c,e[f],f,a)},Qa=Array.prototype.filter?function(a,b,c){z(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,k=0;k<d;k++)if(k in g){var w=g[k];b.call(c,w,k,a)&&(e[f++]=
|
|
w)}return e},Ra=Array.prototype.map?function(a,b,c){z(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},Sa=Array.prototype.some?function(a,b,c){z(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},Ta=Array.prototype.every?function(a,b,c){z(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},Va=function(a){var b;a:{b=Ua;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]},Wa=function(a){if(!n(a))for(var b=a.length-1;0<=b;b--)delete a[b];a.length=0},Ya=function(a,b){var c=Na(a,b),d;(d=0<=c)&&Xa(a,c);return d},Xa=function(a,b){z(null!=a.length);
|
|
Array.prototype.splice.call(a,b,1)},Za=function(a){return Array.prototype.concat.apply(Array.prototype,arguments)},$a=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[]},ab=function(a,b){for(var c=1;c<arguments.length;c++){var d=arguments[c];if(da(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)}},bb=function(a,b,c){z(null!=a.length);return 2>=arguments.length?Array.prototype.slice.call(a,b):Array.prototype.slice.call(a,
|
|
b,c)},cb=function(a){for(var b={},c=0,d=0;d<a.length;){var e=a[d++],f;f=e;f=t(f)?"o"+(f[ea]||(f[ea]=++fa)):(typeof f).charAt(0)+f;Object.prototype.hasOwnProperty.call(b,f)||(b[f]=!0,a[c++]=e)}a.length=c};var db=function(a){return a};var eb=function(a){a=String(a);if(/^\s*$/.test(a)?0:/^[\],:{}\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,"")))try{return eval("("+a+")")}catch(b){}throw Error("Invalid JSON string: "+a);},fb=function(a){return eval("("+a+")")},hb=function(a){return(new gb(void 0)).w(a)},gb=function(a){this.lb=a};
|
|
gb.prototype.w=function(a){var b=[];ib(this,a,b);return b.join("")};
|
|
var ib=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],ib(a,a.lb?a.lb.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),kb(d,c),c.push(":"),ib(a,a.lb?a.lb.call(b,d,e):e,c),f=","));c.push("}");return}}switch(typeof b){case "string":kb(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);}}},lb={'"':'\\"',"\\":"\\\\","/":"\\/","\b":"\\b","\f":"\\f","\n":"\\n","\r":"\\r","\t":"\\t","\x0B":"\\u000b"},mb=/\uffff/.test("\uffff")?/[\\\"\x00-\x1f\x7f-\uffff]/g:/[\\\"\x00-\x1f\x7f-\xff]/g,kb=function(a,b){b.push('"',a.replace(mb,function(a){var b=lb[a];b||(b="\\u"+(a.charCodeAt(0)|65536).toString(16).substr(1),
|
|
lb[a]=b);return b}),'"')};var nb;a:{var ob=l.navigator;if(ob){var pb=ob.userAgent;if(pb){nb=pb;break a}}nb=""}var A=function(a){return-1!=nb.indexOf(a)};var qb=A("Opera")||A("OPR"),B=A("Trident")||A("MSIE"),rb=A("Edge"),sb=A("Gecko")&&!(-1!=nb.toLowerCase().indexOf("webkit")&&!A("Edge"))&&!(A("Trident")||A("MSIE"))&&!A("Edge"),tb=-1!=nb.toLowerCase().indexOf("webkit")&&!A("Edge"),ub=function(){var a=nb;if(sb)return/rv\:([^\);]+)(\)|;)/.exec(a);if(rb)return/Edge\/([\d\.]+)/.exec(a);if(B)return/\b(?:MSIE|rv)[: ]([^\);]+)(\)|;)/.exec(a);if(tb)return/WebKit\/(\S+)/.exec(a)},vb=function(){var a=l.document;return a?a.documentMode:void 0},wb=function(){if(qb&&
|
|
l.opera){var a;var b=l.opera.version;try{a=b()}catch(c){a=b}return a}a="";(b=ub())&&(a=b?b[1]:"");return B&&(b=vb(),b>parseFloat(a))?String(b):a}(),xb={},yb=function(a){var b;if(!(b=xb[a])){b=0;for(var c=za(String(wb)).split("."),d=za(String(a)).split("."),e=Math.max(c.length,d.length),f=0;0==b&&f<e;f++){var g=c[f]||"",k=d[f]||"",w=RegExp("(\\d*)(\\D*)","g"),P=RegExp("(\\d*)(\\D*)","g");do{var H=w.exec(g)||["","",""],jb=P.exec(k)||["","",""];if(0==H[0].length&&0==jb[0].length)break;b=Ia(0==H[1].length?
|
|
0:parseInt(H[1],10),0==jb[1].length?0:parseInt(jb[1],10))||Ia(0==H[2].length,0==jb[2].length)||Ia(H[2],jb[2])}while(0==b)}b=xb[a]=0<=b}return b},zb=l.document,Ab=zb&&B?vb()||("CSS1Compat"==zb.compatMode?parseInt(wb,10):5):void 0;var Bb=!B||9<=Ab,Cb=!sb&&!B||B&&9<=Ab||sb&&yb("1.9.1");B&&yb("9");var Eb=function(a,b){ka(b,function(b,d){"style"==d?a.style.cssText=b:"class"==d?a.className=b:"for"==d?a.htmlFor=b:Db.hasOwnProperty(d)?a.setAttribute(Db[d],b):0==d.lastIndexOf("aria-",0)||0==d.lastIndexOf("data-",0)?a.setAttribute(d,b):a[d]=b})},Db={cellpadding:"cellPadding",cellspacing:"cellSpacing",colspan:"colSpan",frameborder:"frameBorder",height:"height",maxlength:"maxLength",role:"role",rowspan:"rowSpan",type:"type",usemap:"useMap",valign:"vAlign",width:"width"},Gb=function(a,b,c){return Fb(document,
|
|
arguments)},Fb=function(a,b){var c=b[0],d=b[1];if(!Bb&&d&&(d.name||d.type)){c=["<",c];d.name&&c.push(' name="',Ha(d.name),'"');if(d.type){c.push(' type="',Ha(d.type),'"');var e={};wa(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(" "):Eb(c,d));2<b.length&&Hb(a,c,b);return c},Hb=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];!da(f)||t(f)&&0<f.nodeType?d(f):Pa(Ib(f)?
|
|
$a(f):f,d)}},Jb=function(a){for(;a&&1!=a.nodeType;)a=a.nextSibling;return a},Kb=function(a){z(a,"Node cannot be null or undefined.");return 9==a.nodeType?a:a.ownerDocument||a.document},Ib=function(a){if(a&&"number"==typeof a.length){if(t(a))return"function"==typeof a.item||"string"==typeof a.item;if(r(a))return"function"==typeof a.item}return!1},Lb=function(a){this.Gb=a||l.document||document};h=Lb.prototype;h.Xc=function(a,b,c){return Fb(this.Gb,arguments)};h.createElement=function(a){return this.Gb.createElement(a)};
|
|
h.createTextNode=function(a){return this.Gb.createTextNode(String(a))};h.appendChild=function(a,b){a.appendChild(b)};h.oc=function(a){return Cb&&void 0!=a.children?a.children:Qa(a.childNodes,function(a){return 1==a.nodeType})};h.contains=function(a,b){if(a.contains&&1==b.nodeType)return a==b||a.contains(b);if("undefined"!=typeof a.compareDocumentPosition)return a==b||Boolean(a.compareDocumentPosition(b)&16);for(;b&&a!=b;)b=b.parentNode;return b==a};var Mb=function(a,b,c){this.sd=c;this.Yc=a;this.Id=b;this.gb=0;this.ab=null};Mb.prototype.get=function(){var a;0<this.gb?(this.gb--,a=this.ab,this.ab=a.next,a.next=null):a=this.Yc();return a};Mb.prototype.put=function(a){this.Id(a);this.gb<this.sd&&(this.gb++,a.next=this.ab,this.ab=a)};var Nb=function(a){l.setTimeout(function(){throw a;},0)},Ob,Pb=function(){var a=l.MessageChannel;"undefined"===typeof a&&"undefined"!==typeof window&&window.postMessage&&window.addEventListener&&!A("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=u(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&&!A("Trident")&&!A("MSIE")){var b=new a,c={},d=c;b.port1.onmessage=function(){if(m(c.next)){c=c.next;var a=c.hc;c.hc=null;a()}};return function(a){d.next={hc: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){l.setTimeout(a,0)}};var Qb=function(){this.vb=this.ka=null},Sb=new Mb(function(){return new Rb},function(a){a.reset()},100);Qb.prototype.add=function(a,b){var c=Sb.get();c.set(a,b);this.vb?this.vb.next=c:(z(!this.ka),this.ka=c);this.vb=c};Qb.prototype.remove=function(){var a=null;this.ka&&(a=this.ka,this.ka=this.ka.next,this.ka||(this.vb=null),a.next=null);return a};var Rb=function(){this.next=this.scope=this.Kb=null};Rb.prototype.set=function(a,b){this.Kb=a;this.scope=b;this.next=null};
|
|
Rb.prototype.reset=function(){this.next=this.scope=this.Kb=null};var Xb=function(a,b){Tb||Ub();Vb||(Tb(),Vb=!0);Wb.add(a,b)},Tb,Ub=function(){if(l.Promise&&l.Promise.resolve){var a=l.Promise.resolve(void 0);Tb=function(){a.then(Yb)}}else Tb=function(){var a=Yb;!r(l.setImmediate)||l.Window&&l.Window.prototype&&!A("Edge")&&l.Window.prototype.setImmediate==l.setImmediate?(Ob||(Ob=Pb()),Ob(a)):l.setImmediate(a)}},Vb=!1,Wb=new Qb,Yb=function(){for(var a=null;a=Wb.remove();){try{a.Kb.call(a.scope)}catch(b){Nb(b)}Sb.put(a)}Vb=!1};var Zb=function(a){a.prototype.then=a.prototype.then;a.prototype.$goog_Thenable=!0},$b=function(a){if(!a)return!1;try{return!!a.$goog_Thenable}catch(b){return!1}};var cc=function(a,b){this.F=0;this.W=void 0;this.ma=this.T=this.h=null;this.Ya=this.Jb=!1;if(a!=ba)try{var c=this;a.call(b,function(a){ac(c,2,a)},function(a){if(!(a instanceof bc))try{if(a instanceof Error)throw a;throw Error("Promise rejected.");}catch(b){}ac(c,3,a)})}catch(d){ac(this,3,d)}},dc=function(){this.next=this.context=this.pa=this.ha=this.ca=null;this.Ra=!1};dc.prototype.reset=function(){this.context=this.pa=this.ha=this.ca=null;this.Ra=!1};
|
|
var ec=new Mb(function(){return new dc},function(a){a.reset()},100),fc=function(a,b,c){var d=ec.get();d.ha=a;d.pa=b;d.context=c;return d};cc.prototype.then=function(a,b,c){null!=a&&Ma(a,"opt_onFulfilled should be a function.");null!=b&&Ma(b,"opt_onRejected should be a function. Did you pass opt_context as the second argument instead of the third?");return gc(this,r(a)?a:null,r(b)?b:null,c)};Zb(cc);cc.prototype.cancel=function(a){0==this.F&&Xb(function(){var b=new bc(a);hc(this,b)},this)};
|
|
var hc=function(a,b){if(0==a.F)if(a.h){var c=a.h;if(c.T){for(var d=0,e=null,f=null,g=c.T;g&&(g.Ra||(d++,g.ca==a&&(e=g),!(e&&1<d)));g=g.next)e||(f=g);e&&(0==c.F&&1==d?hc(c,b):(f?(d=f,z(c.T),z(null!=d),d.next==c.ma&&(c.ma=d),d.next=d.next.next):ic(c),jc(c,e,3,b)))}a.h=null}else ac(a,3,b)},lc=function(a,b){a.T||2!=a.F&&3!=a.F||kc(a);z(null!=b.ha);a.ma?a.ma.next=b:a.T=b;a.ma=b},gc=function(a,b,c,d){var e=fc(null,null,null);e.ca=new cc(function(a,g){e.ha=b?function(c){try{var e=b.call(d,c);a(e)}catch(P){g(P)}}:
|
|
a;e.pa=c?function(b){try{var e=c.call(d,b);!m(e)&&b instanceof bc?g(b):a(e)}catch(P){g(P)}}:g});e.ca.h=a;lc(a,e);return e.ca};cc.prototype.Md=function(a){z(1==this.F);this.F=0;ac(this,2,a)};cc.prototype.Nd=function(a){z(1==this.F);this.F=0;ac(this,3,a)};
|
|
var ac=function(a,b,c){if(0==a.F){a==c&&(b=3,c=new TypeError("Promise cannot resolve to itself"));a.F=1;var d;a:{var e=c,f=a.Md,g=a.Nd;if(e instanceof cc)null!=f&&Ma(f,"opt_onFulfilled should be a function."),null!=g&&Ma(g,"opt_onRejected should be a function. Did you pass opt_context as the second argument instead of the third?"),lc(e,fc(f||ba,g||null,a)),d=!0;else if($b(e))e.then(f,g,a),d=!0;else{if(t(e))try{var k=e.then;if(r(k)){mc(e,k,f,g,a);d=!0;break a}}catch(w){g.call(a,w);d=!0;break a}d=!1}}d||
|
|
(a.W=c,a.F=b,a.h=null,kc(a),3!=b||c instanceof bc||nc(a,c))}},mc=function(a,b,c,d,e){var f=!1,g=function(a){f||(f=!0,c.call(e,a))},k=function(a){f||(f=!0,d.call(e,a))};try{b.call(a,g,k)}catch(w){k(w)}},kc=function(a){a.Jb||(a.Jb=!0,Xb(a.bd,a))},ic=function(a){var b=null;a.T&&(b=a.T,a.T=b.next,b.next=null);a.T||(a.ma=null);null!=b&&z(null!=b.ha);return b};cc.prototype.bd=function(){for(var a=null;a=ic(this);)jc(this,a,this.F,this.W);this.Jb=!1};
|
|
var jc=function(a,b,c,d){if(3==c&&b.pa&&!b.Ra)for(;a&&a.Ya;a=a.h)a.Ya=!1;if(b.ca)b.ca.h=null,oc(b,c,d);else try{b.Ra?b.ha.call(b.context):oc(b,c,d)}catch(e){pc.call(null,e)}ec.put(b)},oc=function(a,b,c){2==b?a.ha.call(a.context,c):a.pa&&a.pa.call(a.context,c)},nc=function(a,b){a.Ya=!0;Xb(function(){a.Ya&&pc.call(null,b)})},pc=Nb,bc=function(a){y.call(this,a)};x(bc,y);bc.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 qc=function(a,b){this.nb=[];this.yc=a;this.kc=b||null;this.Ea=this.oa=!1;this.W=void 0;this.Zb=this.fc=this.zb=!1;this.sb=0;this.h=null;this.Ab=0};qc.prototype.cancel=function(a){if(this.oa)this.W instanceof qc&&this.W.cancel();else{if(this.h){var b=this.h;delete this.h;a?b.cancel(a):(b.Ab--,0>=b.Ab&&b.cancel())}this.yc?this.yc.call(this.kc,this):this.Zb=!0;this.oa||rc(this,new sc)}};qc.prototype.ic=function(a,b){this.zb=!1;tc(this,a,b)};
|
|
var tc=function(a,b,c){a.oa=!0;a.W=c;a.Ea=!b;uc(a)},wc=function(a){if(a.oa){if(!a.Zb)throw new vc;a.Zb=!1}},rc=function(a,b){wc(a);xc(b);tc(a,!1,b)},xc=function(a){z(!(a instanceof qc),"An execution sequence may not be initiated with a blocking Deferred.")},yc=function(a,b,c){z(!a.fc,"Blocking Deferreds can not be re-used");a.nb.push([b,c,void 0]);a.oa&&uc(a)};
|
|
qc.prototype.then=function(a,b,c){var d,e,f=new cc(function(a,b){d=a;e=b});yc(this,d,function(a){a instanceof sc?f.cancel():e(a)});return f.then(a,b,c)};Zb(qc);
|
|
var zc=function(a){return Sa(a.nb,function(a){return r(a[1])})},uc=function(a){if(a.sb&&a.oa&&zc(a)){var b=a.sb,c=Ac[b];c&&(l.clearTimeout(c.V),delete Ac[b]);a.sb=0}a.h&&(a.h.Ab--,delete a.h);for(var b=a.W,d=c=!1;a.nb.length&&!a.zb;){var e=a.nb.shift(),f=e[0],g=e[1],e=e[2];if(f=a.Ea?g:f)try{var k=f.call(e||a.kc,b);m(k)&&(a.Ea=a.Ea&&(k==b||k instanceof Error),a.W=b=k);if($b(b)||"function"===typeof l.Promise&&b instanceof l.Promise)d=!0,a.zb=!0}catch(w){b=w,a.Ea=!0,zc(a)||(c=!0)}}a.W=b;d&&(k=u(a.ic,
|
|
a,!0),d=u(a.ic,a,!1),b instanceof qc?(yc(b,k,d),b.fc=!0):b.then(k,d));c&&(b=new Bc(b),Ac[b.V]=b,a.sb=b.V)},vc=function(){y.call(this)};x(vc,y);vc.prototype.message="Deferred has already fired";vc.prototype.name="AlreadyCalledError";var sc=function(){y.call(this)};x(sc,y);sc.prototype.message="Deferred was canceled";sc.prototype.name="CanceledError";var Bc=function(a){this.V=l.setTimeout(u(this.Ld,this),0);this.Wa=a};
|
|
Bc.prototype.Ld=function(){z(Ac[this.V],"Cannot throw an error that is not scheduled.");delete Ac[this.V];throw this.Wa;};var Ac={};var Gc=function(a){var b={},c=b.document||document,d=document.createElement("SCRIPT"),e={Fc:d,Ma:void 0},f=new qc(Cc,e),g=null,k=null!=b.timeout?b.timeout:5E3;0<k&&(g=window.setTimeout(function(){Dc(d,!0);rc(f,new Ec(1,"Timeout reached for loading script "+a))},k),e.Ma=g);d.onload=d.onreadystatechange=function(){d.readyState&&"loaded"!=d.readyState&&"complete"!=d.readyState||(Dc(d,b.Xd||!1,g),wc(f),xc(null),tc(f,!0,null))};d.onerror=function(){Dc(d,!0,g);rc(f,new Ec(0,"Error while loading script "+
|
|
a))};e=b.attributes||{};wa(e,{type:"text/javascript",charset:"UTF-8",src:a});Eb(d,e);Fc(c).appendChild(d)},Fc=function(a){var b=a.getElementsByTagName("HEAD");return b&&0!=b.length?b[0]:a.documentElement},Cc=function(){if(this&&this.Fc){var a=this.Fc;a&&"SCRIPT"==a.tagName&&Dc(a,!0,this.Ma)}},Dc=function(a,b,c){null!=c&&l.clearTimeout(c);a.onload=ba;a.onerror=ba;a.onreadystatechange=ba;b&&window.setTimeout(function(){a&&a.parentNode&&a.parentNode.removeChild(a)},0)},Ec=function(a,b){var c="Jsloader error (code #"+
|
|
a+")";b&&(c+=": "+b);y.call(this,c);this.code=a};x(Ec,y);var Hc=function(){this.Y=this.Y;this.hb=this.hb};Hc.prototype.Y=!1;Hc.prototype.N=function(){this.Y||(this.Y=!0,this.s())};Hc.prototype.s=function(){if(this.hb)for(;this.hb.length;)this.hb.shift()()};var Ic=function(a,b){this.type=a;this.currentTarget=this.target=b;this.defaultPrevented=this.sa=!1;this.Ec=!0};Ic.prototype.preventDefault=function(){this.defaultPrevented=!0;this.Ec=!1};var Jc=function(a){Jc[" "](a);return a};Jc[" "]=ba;var Kc=!B||9<=Ab,Lc=B&&!yb("9");!tb||yb("528");sb&&yb("1.9b")||B&&yb("8")||qb&&yb("9.5")||tb&&yb("528");sb&&!yb("8")||B&&yb("9");var Mc=function(a,b){Ic.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.da=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(sb){var f;a:{try{Jc(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=tb||void 0!==a.offsetX?a.offsetX:a.layerX,this.offsetY=tb||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.da=a;a.defaultPrevented&&this.preventDefault()}};x(Mc,Ic);
|
|
Mc.prototype.preventDefault=function(){Mc.l.preventDefault.call(this);var a=this.da;if(a.preventDefault)a.preventDefault();else if(a.returnValue=!1,Lc)try{if(a.ctrlKey||112<=a.keyCode&&123>=a.keyCode)a.keyCode=-1}catch(b){}};var Nc="closure_listenable_"+(1E6*Math.random()|0),Oc=function(a){return!(!a||!a[Nc])},Pc=0;var Qc=function(a,b,c,d,e){this.listener=a;this.jb=null;this.src=b;this.type=c;this.Ta=!!d;this.$a=e;this.key=++Pc;this.ta=this.Sa=!1},Rc=function(a){a.ta=!0;a.listener=null;a.jb=null;a.src=null;a.$a=null};var Sc=function(a){this.src=a;this.A={};this.Na=0};Sc.prototype.add=function(a,b,c,d,e){var f=a.toString();a=this.A[f];a||(a=this.A[f]=[],this.Na++);var g=Tc(a,b,d,e);-1<g?(b=a[g],c||(b.Sa=!1)):(b=new Qc(b,this.src,f,!!d,e),b.Sa=c,a.push(b));return b};Sc.prototype.remove=function(a,b,c,d){a=a.toString();if(!(a in this.A))return!1;var e=this.A[a];b=Tc(e,b,c,d);return-1<b?(Rc(e[b]),Xa(e,b),0==e.length&&(delete this.A[a],this.Na--),!0):!1};
|
|
var Uc=function(a,b){var c=b.type;c in a.A&&Ya(a.A[c],b)&&(Rc(b),0==a.A[c].length&&(delete a.A[c],a.Na--))};Sc.prototype.kb=function(a){a=a&&a.toString();var b=0,c;for(c in this.A)if(!a||c==a){for(var d=this.A[c],e=0;e<d.length;e++)++b,Rc(d[e]);delete this.A[c];this.Na--}return b};Sc.prototype.Ca=function(a,b,c,d){a=this.A[a.toString()];var e=-1;a&&(e=Tc(a,b,c,d));return-1<e?a[e]:null};var Tc=function(a,b,c,d){for(var e=0;e<a.length;++e){var f=a[e];if(!f.ta&&f.listener==b&&f.Ta==!!c&&f.$a==d)return e}return-1};var Vc="closure_lm_"+(1E6*Math.random()|0),Wc={},Xc=0,Yc=function(a,b,c,d,e){if(n(b)){for(var f=0;f<b.length;f++)Yc(a,b[f],c,d,e);return null}c=Zc(c);return Oc(a)?a.Ja(b,c,d,e):$c(a,b,c,!1,d,e)},$c=function(a,b,c,d,e,f){if(!b)throw Error("Invalid event type");var g=!!e,k=ad(a);k||(a[Vc]=k=new Sc(a));c=k.add(b,c,d,e,f);if(c.jb)return c;d=bd();c.jb=d;d.src=a;d.listener=c;if(a.addEventListener)a.addEventListener(b.toString(),d,g);else if(a.attachEvent)a.attachEvent(cd(b.toString()),d);else throw Error("addEventListener and attachEvent are unavailable.");
|
|
Xc++;return c},bd=function(){var a=dd,b=Kc?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},ed=function(a,b,c,d,e){if(n(b)){for(var f=0;f<b.length;f++)ed(a,b[f],c,d,e);return null}c=Zc(c);return Oc(a)?a.eb(b,c,d,e):$c(a,b,c,!0,d,e)},fd=function(a,b,c,d,e){if(n(b))for(var f=0;f<b.length;f++)fd(a,b[f],c,d,e);else c=Zc(c),Oc(a)?a.tb(b,c,d,e):a&&(a=ad(a))&&(b=a.Ca(b,c,!!d,e))&&gd(b)},gd=function(a){if(!q(a)&&a&&!a.ta){var b=a.src;if(Oc(b))Uc(b.O,
|
|
a);else{var c=a.type,d=a.jb;b.removeEventListener?b.removeEventListener(c,d,a.Ta):b.detachEvent&&b.detachEvent(cd(c),d);Xc--;(c=ad(b))?(Uc(c,a),0==c.Na&&(c.src=null,b[Vc]=null)):Rc(a)}}},cd=function(a){return a in Wc?Wc[a]:Wc[a]="on"+a},id=function(a,b,c,d){var e=!0;if(a=ad(a))if(b=a.A[b.toString()])for(b=b.concat(),a=0;a<b.length;a++){var f=b[a];f&&f.Ta==c&&!f.ta&&(f=hd(f,d),e=e&&!1!==f)}return e},hd=function(a,b){var c=a.listener,d=a.$a||a.src;a.Sa&&gd(a);return c.call(d,b)},dd=function(a,b){if(a.ta)return!0;
|
|
if(!Kc){var c;if(!(c=b))a:{c=["window","event"];for(var d=l,e;e=c.shift();)if(null!=d[e])d=d[e];else{c=null;break a}c=d}e=c;c=new Mc(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(w){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.sa&&0<=g;g--){c.currentTarget=e[g];var k=id(e[g],f,!0,c),d=d&&k}for(g=0;!c.sa&&g<e.length;g++)c.currentTarget=e[g],
|
|
k=id(e[g],f,!1,c),d=d&&k}return d}return hd(a,new Mc(b,this))},ad=function(a){a=a[Vc];return a instanceof Sc?a:null},jd="__closure_events_fn_"+(1E9*Math.random()>>>0),Zc=function(a){z(a,"Listener can not be null.");if(r(a))return a;z(a.handleEvent,"An object listener must have handleEvent method.");a[jd]||(a[jd]=function(b){return a.handleEvent(b)});return a[jd]};var C=function(){Hc.call(this);this.O=new Sc(this);this.Oc=this;this.Wb=null};x(C,Hc);C.prototype[Nc]=!0;h=C.prototype;h.addEventListener=function(a,b,c,d){Yc(this,a,b,c,d)};h.removeEventListener=function(a,b,c,d){fd(this,a,b,c,d)};
|
|
h.dispatchEvent=function(a){kd(this);var b,c=this.Wb;if(c){b=[];for(var d=1;c;c=c.Wb)b.push(c),z(1E3>++d,"infinite loop")}c=this.Oc;d=a.type||a;if(p(a))a=new Ic(a,c);else if(a instanceof Ic)a.target=a.target||c;else{var e=a;a=new Ic(d,c);wa(a,e)}var e=!0,f;if(b)for(var g=b.length-1;!a.sa&&0<=g;g--)f=a.currentTarget=b[g],e=ld(f,d,!0,a)&&e;a.sa||(f=a.currentTarget=c,e=ld(f,d,!0,a)&&e,a.sa||(e=ld(f,d,!1,a)&&e));if(b)for(g=0;!a.sa&&g<b.length;g++)f=a.currentTarget=b[g],e=ld(f,d,!1,a)&&e;return e};
|
|
h.s=function(){C.l.s.call(this);this.O&&this.O.kb(void 0);this.Wb=null};h.Ja=function(a,b,c,d){kd(this);return this.O.add(String(a),b,!1,c,d)};h.eb=function(a,b,c,d){return this.O.add(String(a),b,!0,c,d)};h.tb=function(a,b,c,d){return this.O.remove(String(a),b,c,d)};var ld=function(a,b,c,d){b=a.O.A[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.ta&&g.Ta==c){var k=g.listener,w=g.$a||g.src;g.Sa&&Uc(a.O,g);e=!1!==k.call(w,d)&&e}}return e&&0!=d.Ec};
|
|
C.prototype.Ca=function(a,b,c,d){return this.O.Ca(String(a),b,c,d)};var kd=function(a){z(a.O,"Event target is not initialized. Did you call the superclass (goog.events.EventTarget) constructor?")};var md="StopIteration"in l?l.StopIteration:{message:"StopIteration",stack:""},nd=function(){};nd.prototype.next=function(){throw md;};nd.prototype.la=function(){return this};
|
|
var od=function(a){if(a instanceof nd)return a;if("function"==typeof a.la)return a.la(!1);if(da(a)){var b=0,c=new nd;c.next=function(){for(;;){if(b>=a.length)throw md;if(b in a)return a[b++];b++}};return c}throw Error("Not implemented");},pd=function(a,b){if(da(a))try{Pa(a,b,void 0)}catch(c){if(c!==md)throw c;}else{a=od(a);try{for(;;)b.call(void 0,a.next(),void 0,a)}catch(c){if(c!==md)throw c;}}};var qd=function(a,b){this.j={};this.c=[];this.Oa=this.f=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=qd.prototype;h.u=function(){return this.f};h.v=function(){rd(this);for(var a=[],b=0;b<this.c.length;b++)a.push(this.j[this.c[b]]);return a};h.K=function(){rd(this);return this.c.concat()};h.X=function(a){return sd(this.j,a)};h.isEmpty=function(){return 0==this.f};
|
|
h.clear=function(){this.j={};this.Oa=this.f=this.c.length=0};h.remove=function(a){return sd(this.j,a)?(delete this.j[a],this.f--,this.Oa++,this.c.length>2*this.f&&rd(this),!0):!1};var rd=function(a){if(a.f!=a.c.length){for(var b=0,c=0;b<a.c.length;){var d=a.c[b];sd(a.j,d)&&(a.c[c++]=d);b++}a.c.length=c}if(a.f!=a.c.length){for(var e={},c=b=0;b<a.c.length;)d=a.c[b],sd(e,d)||(a.c[c++]=d,e[d]=1),b++;a.c.length=c}};h=qd.prototype;h.get=function(a,b){return sd(this.j,a)?this.j[a]:b};
|
|
h.set=function(a,b){sd(this.j,a)||(this.f++,this.c.push(a),this.Oa++);this.j[a]=b};h.addAll=function(a){var b;a instanceof qd?(b=a.K(),a=a.v()):(b=pa(a),a=oa(a));for(var c=0;c<b.length;c++)this.set(b[c],a[c])};h.forEach=function(a,b){for(var c=this.K(),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 qd(this)};
|
|
h.la=function(a){rd(this);var b=0,c=this.Oa,d=this,e=new nd;e.next=function(){if(c!=d.Oa)throw Error("The map has changed since the iterator was created");if(b>=d.c.length)throw md;var e=d.c[b++];return a?e:d.j[e]};return e};var sd=function(a,b){return Object.prototype.hasOwnProperty.call(a,b)};var td=function(a){if(a.v&&"function"==typeof a.v)return a.v();if(p(a))return a.split("");if(da(a)){for(var b=[],c=a.length,d=0;d<c;d++)b.push(a[d]);return b}return oa(a)},ud=function(a,b){if(a.forEach&&"function"==typeof a.forEach)a.forEach(b,void 0);else if(da(a)||p(a))Pa(a,b,void 0);else{var c;if(a.K&&"function"==typeof a.K)c=a.K();else if(a.v&&"function"==typeof a.v)c=void 0;else if(da(a)||p(a)){c=[];for(var d=a.length,e=0;e<d;e++)c.push(e)}else c=pa(a);for(var d=td(a),e=d.length,f=0;f<e;f++)b.call(void 0,
|
|
d[f],c&&c[f],a)}};var vd=function(a){this.j=new qd;a&&this.addAll(a)},wd=function(a){var b=typeof a;return"object"==b&&a||"function"==b?"o"+(a[ea]||(a[ea]=++fa)):b.substr(0,1)+a};h=vd.prototype;h.u=function(){return this.j.u()};h.add=function(a){this.j.set(wd(a),a)};h.addAll=function(a){a=td(a);for(var b=a.length,c=0;c<b;c++)this.add(a[c])};h.kb=function(a){a=td(a);for(var b=a.length,c=0;c<b;c++)this.remove(a[c])};h.remove=function(a){return this.j.remove(wd(a))};h.clear=function(){this.j.clear()};h.isEmpty=function(){return this.j.isEmpty()};
|
|
h.contains=function(a){return this.j.X(wd(a))};h.v=function(){return this.j.v()};h.clone=function(){return new vd(this)};h.la=function(){return this.j.la(!1)};var xd=function(a,b,c,d,e){this.reset(a,b,c,d,e)};xd.prototype.mc=null;var yd=0;xd.prototype.reset=function(a,b,c,d,e){"number"==typeof e||yd++;d||ja();this.Ia=a;this.xd=b;delete this.mc};xd.prototype.Hc=function(a){this.Ia=a};var zd=function(a){this.yd=a;this.qc=this.Bb=this.Ia=this.h=null},Ad=function(a,b){this.name=a;this.value=b};Ad.prototype.toString=function(){return this.name};var Bd=new Ad("SEVERE",1E3),Cd=new Ad("CONFIG",700),Dd=new Ad("FINE",500);zd.prototype.getParent=function(){return this.h};zd.prototype.oc=function(){this.Bb||(this.Bb={});return this.Bb};zd.prototype.Hc=function(a){this.Ia=a};var Ed=function(a){if(a.Ia)return a.Ia;if(a.h)return Ed(a.h);La("Root logger has no level set.");return null};
|
|
zd.prototype.log=function(a,b,c){if(a.value>=Ed(this).value)for(r(b)&&(b=b()),a=new xd(a,String(b),this.yd),c&&(a.mc=c),c="log:"+a.xd,l.console&&(l.console.timeStamp?l.console.timeStamp(c):l.console.markTimeline&&l.console.markTimeline(c)),l.msWriteProfilerMark&&l.msWriteProfilerMark(c),c=this;c;){b=c;var d=a;if(b.qc)for(var e=0,f=void 0;f=b.qc[e];e++)f(d);c=c.getParent()}};
|
|
var Fd={},Gd=null,Hd=function(a){Gd||(Gd=new zd(""),Fd[""]=Gd,Gd.Hc(Cd));var b;if(!(b=Fd[a])){b=new zd(a);var c=a.lastIndexOf("."),d=a.substr(c+1),c=Hd(a.substr(0,c));c.oc()[d]=b;b.h=c;Fd[a]=b}return b};var Id=function(a,b){a&&a.log(Dd,b,void 0)};var Jd=function(a,b,c){if(r(a))c&&(a=u(a,c));else if(a&&"function"==typeof a.handleEvent)a=u(a.handleEvent,a);else throw Error("Invalid listener argument");return 2147483647<b?-1:l.setTimeout(a,b||0)};var Kd=/^(?:([^:/?#.]+):)?(?:\/\/(?:([^/?#]*)@)?([^/#?]*?)(?::([0-9]+))?(?=[/#?]|$))?([^?#]+)?(?:\?([^#]*))?(?:#(.*))?$/,Ld=function(a,b){if(a)for(var c=a.split("&"),d=0;d<c.length;d++){var e=c[d].indexOf("="),f=null,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 Md=function(){};Md.prototype.gc=null;Md.prototype.Da=function(){var a;(a=this.gc)||(a={},Nd(this)&&(a[0]=!0,a[1]=!0),a=this.gc=a);return a};var Od=function(a,b){this.Qd=a;this.Ed=b};x(Od,Md);Od.prototype.Cb=function(){return this.Qd()};Od.prototype.Da=function(){return this.Ed()};var Pd=function(){return Pd.nc.Cb()};Pd.Nc=!1;Pd.Da=function(){return Pd.nc.Da()};Pd.Zd=function(a,b){Pd.Gc(new Od(z(a),z(b)))};Pd.Gc=function(a){Pd.nc=a};var Qd=function(){};x(Qd,Md);Qd.prototype.Cb=function(){var a=Nd(this);return a?new ActiveXObject(a):new XMLHttpRequest};
|
|
var Nd=function(a){if(Pd.Nc)return"";if(!a.rc&&"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.rc=d}catch(e){}}throw Error("Could not create ActiveXObject. ActiveX might be disabled, or MSXML might not be installed");}return a.rc};Pd.Gc(new Qd);var D=function(a){C.call(this);this.headers=new qd;this.xb=a||null;this.J=!1;this.wb=this.a=null;this.Ha=this.wc=this.cb="";this.ga=this.Ob=this.bb=this.Hb=!1;this.xa=0;this.ob=null;this.Ka="";this.ub=this.Fd=this.Pd=!1};x(D,C);var Rd=D.prototype,Sd=Hd("goog.net.XhrIo");Rd.B=Sd;var Td=/^https?$/i,Ud=["POST","PUT"],Vd=[],Xd=function(a,b,c,d,e){var f=Wd,g=new D;Vd.push(g);b&&g.Ja("complete",b);g.eb("ready",g.Vc);f&&(g.xa=Math.max(0,f));g.send(a,c,d,e)};D.prototype.Vc=function(){this.N();Ya(Vd,this)};
|
|
D.prototype.send=function(a,b,c,d){if(this.a)throw Error("[goog.net.XhrIo] Object is active with another request="+this.cb+"; newUri="+a);b=b?b.toUpperCase():"GET";this.cb=a;this.Ha="";this.wc=b;this.Hb=!1;this.J=!0;this.a=this.xb?this.xb.Cb():Pd();this.wb=this.xb?this.xb.Da():Pd.Da();this.a.onreadystatechange=u(this.Bc,this);this.Fd&&"onprogress"in this.a&&(this.a.onprogress=u(function(a){this.Ac(a,!0)},this),this.a.upload&&(this.a.upload.onprogress=u(this.Ac,this)));try{Id(this.B,Yd(this,"Opening Xhr")),
|
|
this.Ob=!0,this.a.open(b,String(a),!0),this.Ob=!1}catch(f){Id(this.B,Yd(this,"Error opening Xhr: "+f.message));this.Wa(5,f);return}a=c||"";var e=this.headers.clone();d&&ud(d,function(a,b){e.set(b,a)});d=Va(e.K());c=l.FormData&&a instanceof l.FormData;!(0<=Na(Ud,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.Ka&&(this.a.responseType=this.Ka);qa(this.a)&&(this.a.withCredentials=this.Pd);try{Zd(this),
|
|
0<this.xa&&(this.ub=$d(this.a),Id(this.B,Yd(this,"Will abort after "+this.xa+"ms if incomplete, xhr2 "+this.ub)),this.ub?(this.a.timeout=this.xa,this.a.ontimeout=u(this.Ma,this)):this.ob=Jd(this.Ma,this.xa,this)),Id(this.B,Yd(this,"Sending request")),this.bb=!0,this.a.send(a),this.bb=!1}catch(f){Id(this.B,Yd(this,"Send error: "+f.message)),this.Wa(5,f)}};var $d=function(a){return B&&yb(9)&&q(a.timeout)&&m(a.ontimeout)},Ua=function(a){return"content-type"==a.toLowerCase()};
|
|
D.prototype.Ma=function(){"undefined"!=typeof aa&&this.a&&(this.Ha="Timed out after "+this.xa+"ms, aborting",Id(this.B,Yd(this,this.Ha)),this.dispatchEvent("timeout"),this.abort(8))};D.prototype.Wa=function(a,b){this.J=!1;this.a&&(this.ga=!0,this.a.abort(),this.ga=!1);this.Ha=b;ae(this);be(this)};var ae=function(a){a.Hb||(a.Hb=!0,a.dispatchEvent("complete"),a.dispatchEvent("error"))};
|
|
D.prototype.abort=function(){this.a&&this.J&&(Id(this.B,Yd(this,"Aborting")),this.J=!1,this.ga=!0,this.a.abort(),this.ga=!1,this.dispatchEvent("complete"),this.dispatchEvent("abort"),be(this))};D.prototype.s=function(){this.a&&(this.J&&(this.J=!1,this.ga=!0,this.a.abort(),this.ga=!1),be(this,!0));D.l.s.call(this)};D.prototype.Bc=function(){this.Y||(this.Ob||this.bb||this.ga?ce(this):this.Dd())};D.prototype.Dd=function(){ce(this)};
|
|
var ce=function(a){if(a.J&&"undefined"!=typeof aa)if(a.wb[1]&&4==de(a)&&2==a.getStatus())Id(a.B,Yd(a,"Local request error detected and ignored"));else if(a.bb&&4==de(a))Jd(a.Bc,0,a);else if(a.dispatchEvent("readystatechange"),4==de(a)){Id(a.B,Yd(a,"Request complete"));a.J=!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.cb).match(Kd)[1]||null;if(!f&&l.self&&l.self.location)var g=
|
|
l.self.location.protocol,f=g.substr(0,g.length-1);e=!Td.test(f?f.toLowerCase():"")}d=e}if(d)a.dispatchEvent("complete"),a.dispatchEvent("success");else{var k;try{k=2<de(a)?a.a.statusText:""}catch(w){Id(a.B,"Can not get status: "+w.message),k=""}a.Ha=k+" ["+a.getStatus()+"]";ae(a)}}finally{be(a)}}};
|
|
D.prototype.Ac=function(a,b){z("progress"===a.type,"goog.net.EventType.PROGRESS is of the same type as raw XHR progress.");this.dispatchEvent(fe(a,"progress"));this.dispatchEvent(fe(a,b?"downloadprogress":"uploadprogress"))};
|
|
var fe=function(a,b){return{type:b,lengthComputable:a.lengthComputable,loaded:a.loaded,total:a.total}},be=function(a,b){if(a.a){Zd(a);var c=a.a,d=a.wb[0]?ba:null;a.a=null;a.wb=null;b||a.dispatchEvent("ready");try{c.onreadystatechange=d}catch(e){(c=a.B)&&c.log(Bd,"Problem encountered resetting onreadystatechange: "+e.message,void 0)}}},Zd=function(a){a.a&&a.ub&&(a.a.ontimeout=null);q(a.ob)&&(l.clearTimeout(a.ob),a.ob=null)};D.prototype.tc=function(){return!!this.a};
|
|
var de=function(a){return a.a?a.a.readyState:0};D.prototype.getStatus=function(){try{return 2<de(this)?this.a.status:-1}catch(a){return-1}};
|
|
var ge=function(a){try{if(!a.a)return null;if("response"in a.a)return a.a.response;switch(a.Ka){case "":case "text":return a.a.responseText;case "arraybuffer":if("mozResponseArrayBuffer"in a.a)return a.a.mozResponseArrayBuffer}var b=a.B;b&&b.log(Bd,"Response type "+a.Ka+" is not supported on this browser",void 0);return null}catch(c){return Id(a.B,"Can not get response: "+c.message),null}};D.prototype.getResponseHeader=function(a){return this.a&&4==de(this)?this.a.getResponseHeader(a):void 0};
|
|
var Yd=function(a,b){return b+" ["+a.wc+" "+a.cb+" "+a.getStatus()+"]"};var he=function(a,b){this.U=this.ja=this.ba="";this.qa=null;this.ea=this.ib="";this.I=this.qd=!1;var c;if(a instanceof he)this.I=m(b)?b:a.I,ie(this,a.ba),c=a.ja,je(this),this.ja=c,c=a.U,je(this),this.U=c,ke(this,a.qa),this.setPath(a.getPath()),le(this,a.R.clone()),c=a.ea,je(this),this.ea=c;else if(a&&(c=String(a).match(Kd))){this.I=!!b;ie(this,c[1]||"",!0);var d=c[2]||"";je(this);this.ja=me(d);d=c[3]||"";je(this);this.U=me(d,!0);ke(this,c[4]);this.setPath(c[5]||"",!0);le(this,c[6]||"",!0);c=c[7]||
|
|
"";je(this);this.ea=me(c)}else this.I=!!b,this.R=new ne(null,0,this.I)};
|
|
he.prototype.toString=function(){var a=[],b=this.ba;b&&a.push(oe(b,pe,!0),":");var c=this.U;if(c||"file"==b)a.push("//"),(b=this.ja)&&a.push(oe(b,pe,!0),"@"),a.push(encodeURIComponent(String(c)).replace(/%25([0-9a-fA-F]{2})/g,"%$1")),c=this.qa,null!=c&&a.push(":",String(c));if(c=this.getPath())this.U&&"/"!=c.charAt(0)&&a.push("/"),a.push(oe(c,"/"==c.charAt(0)?qe:re,!0));(c=this.R.toString())&&a.push("?",c);(c=this.ea)&&a.push("#",oe(c,se));return a.join("")};
|
|
he.prototype.resolve=function(a){var b=this.clone(),c=!!a.ba;c?ie(b,a.ba):c=!!a.ja;if(c){var d=a.ja;je(b);b.ja=d}else c=!!a.U;c?(d=a.U,je(b),b.U=d):c=null!=a.qa;d=a.getPath();if(c)ke(b,a.qa);else if(c=!!a.ib){if("/"!=d.charAt(0))if(this.U&&!this.ib)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 k=e[g++];"."==
|
|
k?d&&g==e.length&&f.push(""):".."==k?((1<f.length||1==f.length&&""!=f[0])&&f.pop(),d&&g==e.length&&f.push("")):(f.push(k),d=!0)}d=f.join("/")}else d=e}c?b.setPath(d):c=""!==a.R.toString();c?le(b,me(a.R.toString())):c=!!a.ea;c&&(a=a.ea,je(b),b.ea=a);return b};he.prototype.clone=function(){return new he(this)};
|
|
var ie=function(a,b,c){je(a);a.ba=c?me(b,!0):b;a.ba&&(a.ba=a.ba.replace(/:$/,""))},ke=function(a,b){je(a);if(b){b=Number(b);if(isNaN(b)||0>b)throw Error("Bad port number "+b);a.qa=b}else a.qa=null};he.prototype.getPath=function(){return this.ib};he.prototype.setPath=function(a,b){je(this);this.ib=b?me(a,!0):a;return this};
|
|
var le=function(a,b,c){je(a);b instanceof ne?(a.R=b,a.R.Yb(a.I)):(c||(b=oe(b,te)),a.R=new ne(b,0,a.I))},ue=function(a){return a.R},je=function(a){if(a.qd)throw Error("Tried to modify a read-only Uri");};he.prototype.Yb=function(a){this.I=a;this.R&&this.R.Yb(a);return this};
|
|
var ve=function(a){return a instanceof he?a.clone():new he(a,void 0)},me=function(a,b){return a?b?decodeURI(a.replace(/%25/g,"%2525")):decodeURIComponent(a):""},oe=function(a,b,c){return p(a)?(a=encodeURI(a).replace(b,we),c&&(a=a.replace(/%25([0-9a-fA-F]{2})/g,"%$1")),a):null},we=function(a){a=a.charCodeAt(0);return"%"+(a>>4&15).toString(16)+(a&15).toString(16)},pe=/[#\/\?@]/g,re=/[\#\?:]/g,qe=/[\#\?]/g,te=/[\#\?@]/g,se=/#/g,ne=function(a,b,c){this.f=this.g=null;this.C=a||null;this.I=!!c},xe=function(a){a.g||
|
|
(a.g=new qd,a.f=0,a.C&&Ld(a.C,function(b,c){a.add(decodeURIComponent(b.replace(/\+/g," ")),c)}))};h=ne.prototype;h.u=function(){xe(this);return this.f};h.add=function(a,b){xe(this);this.C=null;a=ye(this,a);var c=this.g.get(a);c||this.g.set(a,c=[]);c.push(b);this.f++;return this};h.remove=function(a){xe(this);a=ye(this,a);return this.g.X(a)?(this.C=null,this.f-=this.g.get(a).length,this.g.remove(a)):!1};h.clear=function(){this.g=this.C=null;this.f=0};h.isEmpty=function(){xe(this);return 0==this.f};
|
|
h.X=function(a){xe(this);a=ye(this,a);return this.g.X(a)};h.K=function(){xe(this);for(var a=this.g.v(),b=this.g.K(),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.v=function(a){xe(this);var b=[];if(p(a))this.X(a)&&(b=Za(b,this.g.get(ye(this,a))));else{a=this.g.v();for(var c=0;c<a.length;c++)b=Za(b,a[c])}return b};h.set=function(a,b){xe(this);this.C=null;a=ye(this,a);this.X(a)&&(this.f-=this.g.get(a).length);this.g.set(a,[b]);this.f++;return this};
|
|
h.get=function(a,b){var c=a?this.v(a):[];return 0<c.length?String(c[0]):b};h.setValues=function(a,b){this.remove(a);0<b.length&&(this.C=null,this.g.set(ye(this,a),$a(b)),this.f+=b.length)};h.toString=function(){if(this.C)return this.C;if(!this.g)return"";for(var a=[],b=this.g.K(),c=0;c<b.length;c++)for(var d=b[c],e=encodeURIComponent(String(d)),d=this.v(d),f=0;f<d.length;f++){var g=e;""!==d[f]&&(g+="="+encodeURIComponent(String(d[f])));a.push(g)}return this.C=a.join("&")};
|
|
h.clone=function(){var a=new ne;a.C=this.C;this.g&&(a.g=this.g.clone(),a.f=this.f);return a};var ye=function(a,b){var c=String(b);a.I&&(c=c.toLowerCase());return c};ne.prototype.Yb=function(a){a&&!this.I&&(xe(this),this.C=null,this.g.forEach(function(a,c){var d=c.toLowerCase();c!=d&&(this.remove(c),this.setValues(d,a))},this));this.I=a};v("ee.data.authenticate",function(a,b,c,d,e){var f=["https://www.googleapis.com/auth/earthengine"];d&&(ab(f,d),cb(f));ze=a;Ae=f;null===a?Be=null:Ce(function(){De(b,c,e||ia(Ee,b,c))})});var Ee=function(a,b){l.gapi.auth.authorize({client_id:ze,immediate:!1,scope:Ae.join(" ")},ia(Fe,a,b))};v("ee.data.authenticateViaPopup",Ee);
|
|
v("ee.data.setAuthToken",function(a,b,c,d,e,f,g){var k=["https://www.googleapis.com/auth/earthengine"];e&&(ab(k,e),cb(k));ze=a;Ae=k;var w={token_type:b,access_token:c,state:k.join(" "),expires_in:d};Fe(void 0,void 0,w);!1===g?f&&f():Ce(function(){l.gapi.auth.setToken(w);f&&f()})});var De=function(a,b,c){Boolean(Ge&&ze)&&Ge({client_id:String(ze),immediate:!0,scope:Ae.join(" ")},function(d){"immediate_failed"==d.error&&c?c():Fe(a,b,d)})};v("ee.data.setAuthTokenRefresher",function(a){Ge=a});
|
|
var Je=function(){He&&0<=ja()-He&&Ie();return Be};v("ee.data.getAuthToken",Je);var Ie=function(){He=Be=null};v("ee.data.clearAuthToken",Ie);v("ee.data.getAuthClientId",function(){return ze});v("ee.data.getAuthScopes",function(){return Ae});var Oe=function(a,b,c){null!=a?Ke=a:Le||(Ke="https://earthengine.googleapis.com/api");null!=b?Me=b:Le||(Me="https://earthengine.googleapis.com");m(c)&&(Ne=c);Le=!0};v("ee.data.setDeadline",function(a){Wd=a});v("ee.data.setParamAugmenter",function(a){Pe=a||db});
|
|
v("ee.data.getApiBaseUrl",function(){return Ke});v("ee.data.getTileBaseUrl",function(){return Me});v("ee.data.getXsrfToken",function(){return Ne});var Qe=function(a,b){a=ta(a);return E("/mapid",F(a),b)};v("ee.data.getMapId",Qe);v("ee.data.getTileUrl",function(a,b,c,d){var e=Math.pow(2,d);b%=e;0>b&&(b+=e);return[Me,"map",a.mapid,d,b,c].join("/")+"?token="+a.token});var Re=function(a,b){a=ta(a);return E("/value",F(a),b)};v("ee.data.getValue",Re);
|
|
var Se=function(a,b){a=ta(a);n(a.size)&&(a.size=a.size.join("x"));var c=F(a).add("getid","1");return E("/thumb",c,b)};v("ee.data.getThumbId",Se);var Te=function(a){return Me+"/api/thumb?thumbid="+a.thumbid+"&token="+a.token};v("ee.data.makeThumbUrl",Te);var Ue=function(a,b){a=ta(a);return E("/download",F(a),b)};v("ee.data.getDownloadId",Ue);var Ve=function(a){return Me+"/api/download?docid="+a.docid+"&token="+a.token};v("ee.data.makeDownloadUrl",Ve);
|
|
var We=function(a,b){a=ta(a);return E("/table",F(a),b)};v("ee.data.getTableDownloadId",We);var Xe=function(a){return Me+"/api/table?docid="+a.docid+"&token="+a.token};v("ee.data.makeTableDownloadUrl",Xe);var Ze=function(a,b,c){var d=Ye;try{return Ye=a,b.call(c)}finally{Ye=d}};v("ee.data.withProfiling",Ze);v("ee.data.newTaskId",function(a,b){var c={};q(a)&&(c.count=a);return E("/newtaskid",F(c),b)});
|
|
v("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")});v("ee.data.getTaskList",function(a){return E("/tasklist",null,a,"GET")});v("ee.data.cancelTask",function(a,b){return $e(a,"CANCEL",b)});
|
|
var $e=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=af;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")};v("ee.data.updateTask",$e);v("ee.data.prepareValue",function(a,b,c){b=ta(b);b.tid=a;return E("/prepare",F(b),c)});v("ee.data.startProcessing",function(a,b,c){b=ta(b);b.id=a;return E("/processingrequest",F(b),c)});
|
|
v("ee.data.startIngestion",function(a,b,c){a={id:a,request:hb(b)};return E("/ingestionrequest",F(a),c)});v("ee.data.getInfo",function(a,b){return E("/info",(new ne).add("id",a),b)});v("ee.data.getList",function(a,b){var c=F(a);return E("/list",c,b)});v("ee.data.getAssetRoots",function(a){return E("/buckets",null,a,"GET")});v("ee.data.createAssetHome",function(a,b){var c=F({id:a});E("/createbucket",c,b)});
|
|
v("ee.data.createAsset",function(a,b,c,d){p(a)||(a=hb(a));a={value:a};void 0!==b&&(a.id=b);a.force=c||!1;return E("/create",F(a),d)});v("ee.data.createFolder",function(a,b,c){return E("/createfolder",F({id:a,force:b||!1}),c)});v("ee.data.getAssetAcl",function(a,b){return E("/getacl",F({id:a}),b,"GET")});v("ee.data.setAssetAcl",function(a,b,c){a={id:a,value:hb(b)};E("/setacl",F(a),c)});
|
|
var af={Rd:"CANCEL",Ud:"UPDATE"},E=function(a,b,c,d){Oe();var e=Ye,f={"Content-Type":"application/x-www-form-urlencoded"},g=Je();if(null!=g)f.Authorization=g;else if(c&&Boolean(Ge&&ze))return De(function(){Ze(e,function(){E(a,b,c,d)})}),null;g=d||"POST";b=b?b.clone():new ne;e&&b.add("profiling","1");b=Pe(b,a);null!=Ne&&(f["X-XSRF-Token"]=Ne);var k=function(a,b,c,d){var f=b("X-Earth-Engine-Computation-Profile");f&&e&&e(f);var g,k,w;b=(b=b("Content-Type"))?b.replace(/;.*/,""):"application/json";if("application/json"==
|
|
b||"text/json"==b)try{g=fb(c),k=g.data}catch(H){w="Invalid JSON: "+c}else w="Response was unexpectedly not JSON, but "+b;if(t(g))"error"in g&&"message"in g.error?w=g.error.message:"data"in g||(w="Malformed response: "+c);else if(200>a||300<=a)w="Server returned HTTP code: "+a;if(d)return d(k,w),null;if(!w)return k;throw Error(w);},w=b?b.toString():"";"GET"!=g||/^[\s\xa0]*$/.test(w)||(a+=-1!=a.indexOf("?")?"&":"?",a+=w,w=null);var P=Ke+a;if(c)return Xd(P,function(a){a=a.target;var b=a.getStatus(),
|
|
d=u(a.getResponseHeader,a),e;try{e=a.a?a.a.responseText:""}catch(f){Id(a.B,"Can not get responseText: "+f.message),e=""}return k(b,d,e,c)},g,w,f),null;var H=Pd();H.open(g,P,!1);ka(f,function(a,b){H.setRequestHeader(b,a)});H.send(w);return k(H.status,function(a){try{return H.getResponseHeader(a)}catch(b){return null}},H.responseText,null)},Ce=function(a){var b=function(){l.gapi.config.update("client/cors",!0);Ge||(Ge=l.gapi.auth.authorize);a()};if(t(l.gapi)&&t(l.gapi.auth)&&r(l.gapi.auth.authorize))b();
|
|
else{for(var c=ja().toString(36);c in l;)c+="_";l[c]=function(){delete l[c];b()};Gc("https://apis.google.com/js/client.js?onload="+c)}},Fe=function(a,b,c){c.access_token?(b=c.token_type+" "+c.access_token,isFinite(c.expires_in)&&(c=900*c.expires_in,setTimeout(De,.9*c),He=ja()+c),Be=b,a&&a()):b&&b(c.error||"Unknown error.")},F=function(a){var b=new ne,c;for(c in a)b.set(c,a[c]);return b},Ke=null,Me=null,Ne=null,Pe=db,Be=null,He=null,ze=null,Ae=[],Ge=null,Le=!1,Wd=0,Ye=null;var bf=function(){};var cf=function(){this.S=-1};var df=function(){this.S=-1;this.S=64;this.o=Array(4);this.Sc=Array(this.S);this.qb=this.za=0;this.reset()};x(df,cf);df.prototype.reset=function(){this.o[0]=1732584193;this.o[1]=4023233417;this.o[2]=2562383102;this.o[3]=271733878;this.qb=this.za=0};
|
|
var ef=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.o[0];c=a.o[1];var e=a.o[2],f=a.o[3],g=0,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.o[0]=a.o[0]+b&4294967295;a.o[1]=a.o[1]+(e+(g<<21&4294967295|g>>>11))&4294967295;a.o[2]=a.o[2]+e&4294967295;a.o[3]=a.o[3]+f&4294967295};
|
|
df.prototype.update=function(a,b){m(b)||(b=a.length);for(var c=b-this.S,d=this.Sc,e=this.za,f=0;f<b;){if(0==e)for(;f<=c;)ef(this,a,f),f+=this.S;if(p(a))for(;f<b;){if(d[e++]=a.charCodeAt(f++),e==this.S){ef(this,d);e=0;break}}else for(;f<b;)if(d[e++]=a[f++],e==this.S){ef(this,d);e=0;break}}this.za=e;this.qb+=b};
|
|
df.prototype.digest=function(){var a=Array((56>this.za?this.S:2*this.S)-this.za);a[0]=128;for(var b=1;b<a.length-8;++b)a[b]=0;for(var c=8*this.qb,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.o[b]>>>d&255;return a};var ff=function(a){this.Pa="__ee_hash__";this.Qb=!1!==a;this.va=[];this.na={};this.dc=[]};v("ee.Serializer",ff);var gf=new gb,hf=new df,kf=function(a,b){return jf(new ff(m(b)?b:!0),a)};v("ee.Serializer.encode",kf);var lf=function(a){return gf.w(kf(a))};v("ee.Serializer.toJSON",lf);var mf=function(a){a=jf(new ff(!1),a);return"JSON"in l?l.JSON.stringify(a,null," "):gf.w(a)};v("ee.Serializer.toReadableJSON",mf);
|
|
var jf=function(a,b){var c=a.Va(b);a.Qb&&(c=t(c)&&"ValueRef"==c.type&&1==a.va.length?a.va[0][1]:{type:"CompoundValue",scope:a.va,value:c},a.va=[],Pa(a.dc,u(function(a){delete a[this.Pa]},a)),a.dc=[],a.na={});return c};
|
|
ff.prototype.Va=function(a){if(!m(a))throw Error("Can't encode an undefined value.");var b,c=t(a)?a[this.Pa]:null;if(this.Qb&&null!=c&&this.na[c])return{type:"ValueRef",value:this.na[c]};if(null===a||"boolean"==typeof a||q(a)||p(a))return a;if(t(a)&&"function"==typeof a.getFullYear)return{type:"Invocation",functionName:"Date",arguments:{value:Math.floor(a.getTime())}};if(a instanceof bf){if(b=a.encode(u(this.Va,this)),!(n(b)||t(b)&&"ArgumentRef"!=b.type))return b}else if(n(a))b=Ra(a,function(a){return this.Va(a)},
|
|
this);else if(t(a)&&!r(a))b=na(a,function(a){if(!r(a))return this.Va(a)},this),sa(b,this.Pa),b={type:"Dictionary",value:b};else throw Error("Can't encode object: "+a);if(this.Qb){hf.reset();hf.update(gf.w(b));var c=hf.digest().toString(),d;this.na[c]?d=this.na[c]:(d=String(this.va.length),this.va.push([d,b]),this.na[c]=d);a[this.Pa]=c;this.dc.push(a);return{type:"ValueRef",value:d}}return b};var G=function(a,b,c){if(!(this instanceof G))return I(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.b=a;this.i=b;this.m=c||null};x(G,bf);v("ee.ComputedObject",G);G.prototype.D=function(a){return Re({json:this.w()},a)};G.prototype.getInfo=G.prototype.D;
|
|
G.prototype.encode=function(a){if(null===this.b&&null===this.i)return{type:"ArgumentRef",value:this.m};var b={},c;for(c in this.i)m(this.i[c])&&(b[c]=a(this.i[c]));b={type:"Invocation",arguments:b};a=a(this.b);b[p(a)?"functionName":"function"]=a;return b};G.prototype.w=function(){return lf(this)};G.prototype.serialize=G.prototype.w;G.prototype.toString=function(){return"ee."+this.name()+"("+mf(this)+")"};G.prototype.toString=G.prototype.toString;G.prototype.name=function(){return"ComputedObject"};
|
|
G.prototype.Rc=function(a,b){var c=$a(arguments);c[0]=this;a.apply(l,c);return this};G.prototype.aside=G.prototype.Rc;var nf=function(a,b){if(b instanceof a.constructor)return b;var c=function(){};c.prototype=a.constructor.prototype;c=new c;c.b=b.b;c.i=b.i;c.m=b.m;return c},I=function(a,b){function c(){return a.apply(this,b)}c.prototype=a.prototype;return new c};var of={},pf=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"},qf=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}},rf=function(a){return q(a)||
|
|
a instanceof G&&"Number"==a.name()},sf=function(a){return p(a)||a instanceof G&&"String"==a.name()},tf=function(a){return t(a)&&!r(a)?(a=Object.getPrototypeOf(a),null!==a&&null===Object.getPrototypeOf(a)):!1};var J=function(){if(!(this instanceof J))return new J};x(J,bf);v("ee.Function",J);var uf=db;J.prototype.call=function(a){return this.apply(vf(this,Array.prototype.slice.call(arguments,0)))};J.prototype.call=J.prototype.call;J.prototype.apply=function(a){a=new G(this,wf(this,a));return uf(a,this.H().returns)};J.prototype.apply=J.prototype.apply;
|
|
var xf=function(a,b,c){var d=m(b),e=a.H(),f=!1;if(1==c.length&&tf(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=ta(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=vf(a,d?[b].concat(c):c);return a.apply(c)},wf=function(a,b){for(var c=a.H().args,d={},e={},f=0;f<c.length;f++){var g=c[f].name;if(g in b&&m(b[g]))d[g]=uf(b[g],c[f].type);else if(!c[f].optional)throw Error("Required argument ("+
|
|
g+") missing to function: "+a);e[g]=!0}var c=[],k;for(k in b)e[k]||c.push(k);if(0<c.length)throw Error("Unrecognized arguments ("+c+") to function: "+a);return d},vf=function(a,b){var c=a.H().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};
|
|
J.prototype.toString=function(a,b){var c=this.H(),d=[];d.push(a||c.name);d.push("(");d.push(Ra(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("")};J.prototype.w=function(){return lf(this)};var K=function(a,b){if(!m(b))return yf(a);if(!(this instanceof K))return I(K,arguments);this.wa=ua(b);this.wa.name=a};x(K,J);v("ee.ApiFunction",K);var L=function(a,b){return J.prototype.call.apply(yf(a),Array.prototype.slice.call(arguments,1))};v("ee.ApiFunction._call",L);var zf=function(a,b){return yf(a).apply(b)};v("ee.ApiFunction._apply",zf);K.prototype.encode=function(){return this.wa.name};K.prototype.H=function(){return this.wa};
|
|
var la=null,Af={},Cf=function(){Bf();return na(la,function(a){return a.H()})},Df=function(){Bf();return ma(function(a,b){return!Af[b]})},yf=function(a){var b=Ef(a);if(!b)throw Error("Unknown built-in function name: "+a);return b};v("ee.ApiFunction.lookup",yf);
|
|
var Ef=function(a){Bf();return la[a]||null},Bf=function(a,b){if(la)a&&a();else{var c=function(c,e){e?b&&b(Error(e)):(la=na(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 K(b,a)}),a&&a())};a?E("/algorithms",null,c,"GET"):c(E("/algorithms",null,void 0,"GET"))}},M=function(a,b,c,d){Bf();var e=d||"";ka(la,function(d,g){var k=g.split(".");if(2==k.length&&k[0]==b){var k=e+k[1],w=d.H();Af[g]=!0;var P=!1;if(w.args.length)var H=
|
|
w.args[0].type,P="Object"!=H&&qf(H,c);H=P?a.prototype:a;k in H&&!H[k].signature||(H[k]=function(a){return xf(d,P?this:void 0,Array.prototype.slice.call(arguments,0))},H[k].toString=u(d.toString,d,k,P),H[k].signature=w)}})},N=function(a){var b=function(a){for(var b in a)r(a[b])&&a[b].signature&&delete a[b]};b(a);b(a.prototype)};var O=function(a,b,c){G.call(this,a,b,c);Ff()};x(O,G);v("ee.Element",O);var Gf=!1,Ff=function(){Gf||(M(O,"Element","Element"),Gf=!0)};O.prototype.name=function(){return"Element"};
|
|
O.prototype.set=function(a){var b;if(1>=arguments.length){var c=arguments[0];if(b=tf(c))a:{b=pa(c);var d=["properties"];if(da(b)&&da(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&&t(c.properties)&&(c=c.properties);if(tf(c)){b=this;for(var g in c)d=c[g],b=L("Element.set",b,g,d)}else if(c instanceof G&&Ef("Element.setMulti"))b=L("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=L("Element.set",b,g,d)}return nf(this,b)};O.prototype.set=O.prototype.set;var Q=function(a){if(!(this instanceof Q))return I(Q,arguments);if(a instanceof Q)return a;Hf();if(n(a)){if(0==a.length)throw Error("Empty list specified for ee.Filter().");if(1==a.length)return new Q(a[0]);G.call(this,new K("Filter.and"),{filters:a});this.Ba=a}else if(a instanceof G)G.call(this,a.b,a.i,a.m),this.Ba=[a];else{if(m(a))throw Error("Invalid argument specified for ee.Filter(): "+a);G.call(this,null,null);this.Ba=[]}};x(Q,G);v("ee.Filter",Q);
|
|
var If=!1,Hf=function(){If||(M(Q,"Filter","Filter"),If=!0)},Jf={equals:"equals",less_than:"lessThan",greater_than:"greaterThan",contains:"stringContains",starts_with:"stringStartsWith",ends_with:"stringEndsWith"};Q.prototype.length=function(){return this.Ba.length};Q.prototype.length=Q.prototype.length;var R=function(a,b){var c=a.Ba.slice(0);b instanceof Q?ab(c,b.Ba):b instanceof Array?ab(c,b):c.push(b);return new Q(c)};Q.prototype.aa=function(){return L("Filter.not",this)};Q.prototype.not=Q.prototype.aa;
|
|
var Kf=function(a,b,c){b=b.toLowerCase();var d=!1;0==b.lastIndexOf("not_",0)&&(d=!0,b=b.substring(4));if(!(b in Jf))throw Error("Unknown filtering operator: "+b);a=L("Filter."+Jf[b],a,c);return d?a.aa():a};Q.metadata=Kf;var Lf=function(a,b){return L("Filter.equals",a,b)};Q.eq=Lf;var Mf=function(a,b){return Lf(a,b).aa()};Q.neq=Mf;var Nf=function(a,b){return L("Filter.lessThan",a,b)};Q.lt=Nf;var Of=function(a,b){return Nf(a,b).aa()};Q.gte=Of;var Pf=function(a,b){return L("Filter.greaterThan",a,b)};
|
|
Q.gt=Pf;var Qf=function(a,b){return Pf(a,b).aa()};Q.lte=Qf;var Rf=function(a,b){return L("Filter.stringContains",a,b)};Q.contains=Rf;var Sf=function(a,b){return Rf(a,b).aa()};Q.not_contains=Sf;var Tf=function(a,b){return L("Filter.stringStartsWith",a,b)};Q.starts_with=Tf;var Uf=function(a,b){return Tf(a,b).aa()};Q.not_starts_with=Uf;var Vf=function(a,b){return L("Filter.stringEndsWith",a,b)};Q.ends_with=Vf;var Wf=function(a,b){return Vf(a,b).aa()};Q.not_ends_with=Wf;
|
|
var Xf=function(a){return L("Filter.and",Array.prototype.slice.call(arguments))};Q.and=Xf;Q.or=function(a){return L("Filter.or",Array.prototype.slice.call(arguments))};var Yf=function(a,b){var c=L("DateRange",a,b);return zf("Filter.dateRangeContains",{leftValue:c,rightField:"system:time_start"})};Q.date=Yf;var Zf=function(a,b,c,d){return zf("Filter.listContains",{leftField:c,rightValue:d,rightField:a,leftValue:b})};Q.inList=Zf;
|
|
var $f=function(a,b){return zf("Filter.intersects",{leftField:".all",rightValue:L("Feature",a),maxError:b})};Q.bounds=$f;Q.prototype.ad=function(a){return R(this,Lf.apply(null,[].slice.call(arguments)))};Q.prototype.eq=Q.prototype.ad;Q.prototype.zd=function(a){return R(this,Mf.apply(null,[].slice.call(arguments)))};Q.prototype.neq=Q.prototype.zd;Q.prototype.td=function(a){return R(this,Nf.apply(null,[].slice.call(arguments)))};Q.prototype.lt=Q.prototype.td;
|
|
Q.prototype.kd=function(a){return R(this,Of.apply(null,[].slice.call(arguments)))};Q.prototype.gte=Q.prototype.kd;Q.prototype.jd=function(a){return R(this,Pf.apply(null,[].slice.call(arguments)))};Q.prototype.gt=Q.prototype.jd;Q.prototype.ud=function(a){return R(this,Qf.apply(null,[].slice.call(arguments)))};Q.prototype.lte=Q.prototype.ud;Q.prototype.contains=function(a){return R(this,Rf.apply(null,[].slice.call(arguments)))};Q.prototype.contains=Q.prototype.contains;
|
|
Q.prototype.Ad=function(a){return R(this,Sf.apply(null,[].slice.call(arguments)))};Q.prototype.not_contains=Q.prototype.Ad;Q.prototype.Kd=function(a){return R(this,Tf.apply(null,[].slice.call(arguments)))};Q.prototype.starts_with=Q.prototype.Kd;Q.prototype.Cd=function(a){return R(this,Uf.apply(null,[].slice.call(arguments)))};Q.prototype.not_starts_with=Q.prototype.Cd;Q.prototype.$c=function(a){return R(this,Vf.apply(null,[].slice.call(arguments)))};Q.prototype.ends_with=Q.prototype.$c;
|
|
Q.prototype.Bd=function(a){return R(this,Wf.apply(null,[].slice.call(arguments)))};Q.prototype.not_ends_with=Q.prototype.Bd;Q.prototype.Qc=function(a){return R(this,Xf.apply(null,[].slice.call(arguments)))};Q.prototype.and=Q.prototype.Qc;Q.prototype.Zc=function(a){return R(this,Yf.apply(null,[].slice.call(arguments)))};Q.prototype.date=Q.prototype.Zc;Q.prototype.od=function(a){return R(this,Zf.apply(null,[].slice.call(arguments)))};Q.prototype.inList=Q.prototype.od;
|
|
Q.prototype.bounds=function(a){return R(this,$f.apply(null,[].slice.call(arguments)))};Q.prototype.bounds=Q.prototype.bounds;Q.prototype.name=function(){return"Filter"};var S=function(a,b,c){O.call(this,a,b,c);ag()};x(S,O);v("ee.Collection",S);var bg=!1,ag=function(){bg||(M(S,"Collection","Collection"),M(S,"AggregateFeatureCollection","Collection","aggregate_"),bg=!0)};S.prototype.filter=function(a){if(!a)throw Error("Empty filters.");return nf(this,L("Collection.filter",this,a))};S.prototype.filter=S.prototype.filter;S.prototype.fd=function(a,b,c){return this.filter(Kf(a,b,c))};S.prototype.filterMetadata=S.prototype.fd;S.prototype.dd=function(a){return this.filter($f(a))};
|
|
S.prototype.filterBounds=S.prototype.dd;S.prototype.ed=function(a,b){return this.filter(Yf(a,b))};S.prototype.filterDate=S.prototype.ed;S.prototype.limit=function(a,b,c){return nf(this,L("Collection.limit",this,a,b,c))};S.prototype.limit=S.prototype.limit;S.prototype.sort=function(a,b){return nf(this,L("Collection.limit",this,void 0,a,b))};S.prototype.sort=S.prototype.sort;S.prototype.name=function(){return"Collection"};S.prototype.elementType=function(){return O};
|
|
S.prototype.map=function(a,b){var c=this.elementType();return nf(this,L("Collection.map",this,function(b){return a(new c(b))},b))};S.prototype.map=S.prototype.map;S.prototype.rd=function(a,b){var c=m(b)?b:null,d=this.elementType();return L("Collection.iterate",this,function(b,c){return a(new d(b),c)},c)};S.prototype.iterate=S.prototype.rd;var cg=function(a){if(!(this instanceof cg))return I(cg,arguments);if(a instanceof cg)return a;dg();if(q(a))G.call(this,null,null),this.Tb=a;else if(a instanceof G)G.call(this,a.b,a.i,a.m),this.Tb=null;else throw Error("Invalid argument specified for ee.Number(): "+a);};x(cg,G);v("ee.Number",cg);var eg=!1,dg=function(){eg||(M(cg,"Number","Number"),eg=!0)};cg.prototype.encode=function(a){return q(this.Tb)?this.Tb:cg.l.encode.call(this,a)};cg.prototype.name=function(){return"Number"};var fg=function(a){if(!(this instanceof fg))return I(fg,arguments);if(a instanceof fg)return a;gg();if(p(a))G.call(this,null,null),this.$b=a;else if(a instanceof G)this.$b=null,a.b&&"String"==a.b.H().returns?G.call(this,a.b,a.i,a.m):G.call(this,new K("String"),{input:a},null);else throw Error("Invalid argument specified for ee.String(): "+a);};x(fg,G);v("ee.String",fg);var hg=!1,gg=function(){hg||(M(fg,"String","String"),hg=!0)};
|
|
fg.prototype.encode=function(a){return p(this.$b)?this.$b:fg.l.encode.call(this,a)};fg.prototype.name=function(){return"String"};var ig=function(a,b){if(!(this instanceof ig))return I(ig,arguments);for(var c=[],d=a.args,e=0;e<d.length;e++){var f=d[e],g=f.type;c.push(jg(g in of?of[g]:null,f.name))}if(!m(b.apply(null,c)))throw Error("User-defined methods must return a value.");this.wa=kg(a,c,b);this.Tc=b.apply(null,c)};x(ig,J);v("ee.CustomFunction",ig);ig.prototype.encode=function(a){return{type:"Function",argumentNames:Ra(this.wa.args,function(a){return a.name}),body:a(this.Tc)}};ig.prototype.H=function(){return this.wa};
|
|
var jg=function(a,b){a=a||Object;if(!(a.prototype instanceof G))if(a&&a!=Object)if(a==String)a=fg;else if(a==Number)a=cg;else if(a==Array)a=l.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.b=null;c.i=null;c.m=b;return c},lg=function(a,b){var c=Ra(b,function(a){return{name:null,type:p(a)?a:pf(a)}}),c={name:"",returns:p("Object")?"Object":pf("Object"),args:c};return new ig(c,a)},kg=function(a,b,c){for(var d=
|
|
[],e=0;e<b.length;e++)null===b[e].m&&d.push(e);if(0==d.length)return a;var f=function(a){var b=0;t(a)&&!r(a)&&("Function"==a.type&&b++,ka(a,function(a){b+=f(a)}));return b},e=kf(c.apply(null,b));c="_MAPPING_VAR_"+f(e)+"_";for(e=0;e<d.length;e++){var g=d[e],k=c+e;b[g].m=k;a.args[g].name=k}return a};var mg=function(a,b){if(!(this instanceof mg))return I(mg,arguments);if(a instanceof mg)return a;ng();var c=new K("Date"),d={},e=null;if(sf(a)){if(d.value=a,b)if(sf(b))d.timeZone=b;else throw Error("Invalid argument specified for ee.Date(..., opt_tz): "+b);}else if(rf(a))d.value=a;else if(t(a)&&"function"==typeof a.getFullYear)d.value=Math.floor(a.getTime());else if(a instanceof G)a.b&&"Date"==a.b.H().returns?(c=a.b,d=a.i,e=a.m):d.value=a;else throw Error("Invalid argument specified for ee.Date(): "+
|
|
a);G.call(this,c,d,e)};x(mg,G);v("ee.Date",mg);var og=!1,ng=function(){og||(M(mg,"Date","Date"),og=!0)};mg.prototype.name=function(){return"Date"};var T=function(a,b,c,d){if(!(this instanceof T))return I(T,arguments);pg();var e=null!=b||null!=c||null!=d;if(a instanceof G&&!(a instanceof T&&a.rb)){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.b,a.i,a.m)}else{a instanceof T&&(a=a.encode());if(4<arguments.length)throw Error("The Geometry constructor takes at most 4 arguments ("+arguments.length+" given)");if(!qg(a))throw Error("Invalid GeoJSON geometry: "+
|
|
JSON.stringify(a));G.call(this,null,null);this.rb=a.type;this.Wc=a.coordinates||null;this.gd=a.geometries||null;if(null!=b)this.Xb=b;else if("crs"in a)if(t(a.crs)&&"name"==a.crs.type&&t(a.crs.properties)&&p(a.crs.properties.name))this.Xb=a.crs.properties.name;else throw Error("Invalid CRS declaration in GeoJSON: "+(new gb).w(a.crs));this.Lb=c;!m(c)&&"geodesic"in a&&(this.Lb=Boolean(a.geodesic));this.Ib=d;!m(d)&&"evenOdd"in a&&(this.Ib=Boolean(a.evenOdd))}};x(T,G);v("ee.Geometry",T);
|
|
var rg=!1,pg=function(){rg||(M(T,"Geometry","Geometry"),rg=!0)},sg=function(a,b){if(!(this instanceof sg))return tg(sg,arguments);var c=ug("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.");}T.call(this,c)};x(sg,T);T.Point=sg;var vg=function(a,b){if(!(this instanceof vg))return tg(vg,arguments);T.call(this,ug("MultiPoint",2,arguments))};x(vg,T);T.MultiPoint=vg;
|
|
var wg=function(a,b,c,d,e){if(!(this instanceof wg))return tg(wg,arguments);var f=ug("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 k=g[0][0],w=g[0][1],P=g[1][0],g=g[1][1];f.coordinates=[[[k,g],[k,w],[P,w],[P,g]]];f.type="Polygon"}T.call(this,f)};x(wg,T);T.Rectangle=wg;var xg=function(a,b,c,d){if(!(this instanceof xg))return tg(xg,arguments);T.call(this,ug("LineString",2,arguments))};
|
|
x(xg,T);T.LineString=xg;var yg=function(a,b,c,d){if(!(this instanceof yg))return tg(yg,arguments);T.call(this,ug("LinearRing",2,arguments))};x(yg,T);T.LinearRing=yg;var zg=function(a,b,c,d){if(!(this instanceof zg))return tg(zg,arguments);T.call(this,ug("MultiLineString",3,arguments))};x(zg,T);T.MultiLineString=zg;var Ag=function(a,b,c,d,e){if(!(this instanceof Ag))return tg(Ag,arguments);T.call(this,ug("Polygon",3,arguments))};x(Ag,T);T.Polygon=Ag;
|
|
var Bg=function(a,b,c,d,e){if(!(this instanceof Bg))return tg(Bg,arguments);T.call(this,ug("MultiPolygon",4,arguments))};x(Bg,T);T.MultiPolygon=Bg;
|
|
T.prototype.encode=function(a){if(!this.rb){if(!a)throw Error("Must specify an encode function when encoding a computed geometry.");return G.prototype.encode.call(this,a)}a={type:this.rb};"GeometryCollection"==this.rb?a.geometries=this.gd:a.coordinates=this.Wc;null!=this.Xb&&(a.crs={type:"name",properties:{name:this.Xb}});null!=this.Lb&&(a.geodesic=this.Lb);null!=this.Ib&&(a.evenOdd=this.Ib);return a};
|
|
T.prototype.Jc=function(){if(this.b)throw Error("Can't convert a computed Geometry to GeoJSON. Use getInfo() instead.");return this.encode()};T.prototype.toGeoJSON=T.prototype.Jc;T.prototype.Kc=function(){if(this.b)throw Error("Can't convert a computed Geometry to GeoJSON. Use getInfo() instead.");return(new gb).w(this.Jc())};T.prototype.toGeoJSONString=T.prototype.Kc;T.prototype.w=function(){return lf(this)};T.prototype.serialize=T.prototype.w;
|
|
T.prototype.toString=function(){return"ee.Geometry("+this.Kc()+")"};
|
|
var qg=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(!qg(b[a]))return!1;return!0}a=a.coordinates;var c=Cg(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)},Cg=function(a){if(!n(a))return-1;if(n(a[0])){for(var b=Cg(a[0]),c=1;c<a.length;c++)if(Cg(a[c])!=b)return-1;return b+
|
|
1}for(c=0;c<a.length;c++)if(!q(a[c]))return-1;return 0==a.length%2?1:-1},ug=function(a,b,c){var d={},e=["coordinates","crs","geodesic","maxError","evenOdd"];if(Ta(c,rf))d.coordinates=$a(c);else{if(c.length>e.length)throw Error("Geometry constructor given extra arguments.");for(var f=0;f<e.length;f++)null!=c[f]&&(d[e[f]]=c[f])}if(Dg(d.coordinates)||null!=d.crs||null!=d.geodesic||null!=d.maxError)return(new K("GeometryConstructors."+a)).apply(d);d.type=a;c=d.coordinates;if(1>b||4<b)throw Error("Unexpected nesting level.");
|
|
if(Ta(c,q)&&q(c[0])&&2!=c.length){if(0!=c.length%2)throw Error("Invalid number of coordinates: "+c.length);e=[];for(f=0;f<c.length;f+=2)e.push([c[f],c[f+1]]);c=e}e=c;for(f=0;n(e);)e=e[0],f++;for(;f<b;)c=[c],f++;if(Cg(c)!=b)throw Error("Invalid geometry");for(e=c;n(e)&&1==e.length;)e=e[0];b=n(e)&&0==e.length?[]:c;d.coordinates=b;if(b=null==d.evenOdd)b=0<=Na(["Polygon","Rectangle","MultiPolygon"],a);b&&(d.evenOdd=!0);return d},Dg=function(a){return n(a)?Sa(a,Dg):a instanceof G},tg=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};T.prototype.name=function(){return"Geometry"};v("ee.Deserializer",function(){});v("ee.Deserializer.fromJSON",function(a){return Eg(eb(a))});var Eg=function(a){var b={};if(t(a)&&"CompoundValue"==a.type){for(var c=a.scope,d=0;d<c.length;d++){var e=c[d][0],f=c[d][1];if(e in b)throw Error('Duplicate scope key "'+e+'" in scope #'+d+".");b[e]=Fg(f,b)}a=a.value}return Fg(a,b)};v("ee.Deserializer.decode",Eg);
|
|
var Fg=function(a,b){if(null===a||q(a)||"boolean"==typeof a||p(a))return a;if(n(a))return Ra(a,function(a){return Fg(a,b)});if(!t(a)||r(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 jg(Object,c);case "Date":c=a.value;if(!q(c))throw Error("Invalid date value: "+c);return new mg(c/1E3);case "Bytes":return c=new bf,
|
|
c.encode=function(){return a},c;case "Invocation":var c="functionName"in a?yf(a.functionName):Fg(a["function"],b),d=na(a.arguments,function(a){return Fg(a,b)});if(c instanceof J)return c.apply(d);if(c instanceof G)return new G(c,d);throw Error("Invalid function value: "+a["function"]);case "Dictionary":return na(a.value,function(a){return Fg(a,b)});case "Function":var e=Fg(a.body,b),c={name:"",args:Ra(a.argumentNames,function(a){return{name:a,type:"Object",optional:!1}}),returns:"Object"};return new ig(c,
|
|
function(){return e});case "Point":case "MultiPoint":case "LineString":case "MultiLineString":case "Polygon":case "MultiPolygon":case "LinearRing":case "GeometryCollection":return new T(a);case "CompoundValue":throw Error("Nested CompoundValues are disallowed.");default:throw Error("Unknown encoded object type: "+c);}};var Gg=function(a){if(!(this instanceof Gg))return I(Gg,arguments);if(a instanceof Gg)return a;Hg();if(tf(a))G.call(this,null,null),this.Fb=a;else if(a instanceof G)G.call(this,a.b,a.i,a.m),this.Fb=null;else throw Error("Invalid argument specified for ee.Dictionary(): "+a);};x(Gg,G);v("ee.Dictionary",Gg);var Ig=!1,Hg=function(){Ig||(M(Gg,"Dictionary","Dictionary"),Ig=!0)};Gg.prototype.encode=function(a){return null===this.Fb?Gg.l.encode.call(this,a):a(this.Fb)};Gg.prototype.name=function(){return"Dictionary"};var U=function(a,b){if(!(this instanceof U))return I(U,arguments);if(a instanceof U){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)");Jg();if(a instanceof T||null===a)O.call(this,new K("Feature"),{geometry:a,metadata:b||null});else if(a instanceof G)O.call(this,a.b,a.i,a.m);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=ta(c);c["system:index"]=a.id}O.call(this,new K("Feature"),{geometry:new T(a.geometry),metadata:c})}else O.call(this,new K("Feature"),{geometry:new T(a),metadata:b||null})};x(U,O);v("ee.Feature",U);var Kg=!1,Jg=function(){Kg||(M(U,"Feature","Feature"),Kg=!0)};U.prototype.D=function(a){return U.l.D.call(this,a)};U.prototype.getInfo=U.prototype.D;U.prototype.getMap=function(a,b){return L("Collection",[this]).getMap(a,b)};
|
|
U.prototype.getMap=U.prototype.getMap;U.Point=function(a,b){return sg.apply(null,arguments)};U.MultiPoint=function(a){return vg.apply(null,arguments)};U.Rectangle=function(a,b,c,d){return new wg([a,b,c,d])};U.LineString=function(a){return xg.apply(null,arguments)};U.LinearRing=function(a){return yg.apply(null,arguments)};U.MultiLine=function(a){return zg.apply(null,arguments)};U.Polygon=function(a){return Ag.apply(null,arguments)};U.MultiPolygon=function(a){return Bg.apply(null,arguments)};
|
|
U.prototype.name=function(){return"Feature"};var Lg=function(a){if(this instanceof Lg){if(1<arguments.length)throw Error("ee.List() only accepts 1 argument.");if(a instanceof Lg)return a}else return I(Lg,arguments);Mg();if(n(a))G.call(this,null,null),this.Sb=a;else if(a instanceof G)G.call(this,a.b,a.i,a.m),this.Sb=null;else throw Error("Invalid argument specified for ee.List(): "+a);};x(Lg,G);v("ee.List",Lg);var Ng=!1,Mg=function(){Ng||(M(Lg,"List","List"),Ng=!0)};
|
|
Lg.prototype.encode=function(a){return n(this.Sb)?Ra(this.Sb,function(b){return a(b)}):Lg.l.encode.call(this,a)};Lg.prototype.name=function(){return"List"};var V=function(a,b){if(!(this instanceof V))return I(V,arguments);if(a instanceof V)return a;if(2<arguments.length)throw Error("The FeatureCollection constructor takes at most 2 arguments ("+arguments.length+" given)");Og();a instanceof T&&(a=new U(a));a instanceof U&&(a=[a]);if(rf(a)||sf(a)){var c={tableId:a};b&&(c.geometryColumn=b);S.call(this,new K("Collection.loadTable"),c)}else if(n(a))S.call(this,new K("Collection"),{features:Ra(a,function(a){return new U(a)})});else if(a instanceof Lg)S.call(this,
|
|
new K("Collection"),{features:a});else if(a instanceof G)S.call(this,a.b,a.i,a.m);else throw Error("Unrecognized argument type to convert to a FeatureCollection: "+a);};x(V,S);v("ee.FeatureCollection",V);var Pg=!1,Og=function(){Pg||(M(V,"FeatureCollection","FeatureCollection"),Pg=!0)};V.prototype.getMap=function(a,b){var c=zf("Collection.draw",{collection:this,color:(a||{}).color||"000000"});if(b)c.getMap(null,b);else return c.getMap()};V.prototype.getMap=V.prototype.getMap;
|
|
V.prototype.D=function(a){return V.l.D.call(this,a)};V.prototype.getInfo=V.prototype.D;V.prototype.Mb=function(a,b,c,d){var e={};e.table=this.w();a&&(e.format=a.toUpperCase());c&&(e.filename=c);b&&(da(b)&&(b=b.join(",")),e.selectors=b);if(d)We(e,function(a,b){a?d(Xe(a)):d(null,b)});else return Xe(We(e))};V.prototype.getDownloadURL=V.prototype.Mb;V.prototype.select=function(a,b){var c=arguments;return this.map(function(a){return a.select.apply(a,c)})};V.prototype.select=V.prototype.select;
|
|
V.prototype.name=function(){return"FeatureCollection"};V.prototype.elementType=function(){return U};var W=function(a){if(!(this instanceof W))return I(W,arguments);if(a instanceof W)return a;Qg();var b=arguments.length;if(0==b||1==b&&!m(a))O.call(this,new K("Image.mask"),{image:new W(0),mask:new W(0)});else if(1==b)if(rf(a))O.call(this,new K("Image.constant"),{value:a});else if(sf(a))O.call(this,new K("Image.load"),{id:a});else{if(n(a))return Rg(Ra(a,function(a){return new W(a)}));if(a instanceof G)"Array"==a.name()?O.call(this,new K("Image.constant"),{value:a}):O.call(this,a.b,a.i,a.m);else throw Error("Unrecognized argument type to convert to an Image: "+
|
|
a);}else if(2==b){var b=arguments[0],c=arguments[1];if(sf(b)&&rf(c))O.call(this,new K("Image.load"),{id:b,version:c});else throw Error("Unrecognized argument types to convert to an Image: "+arguments);}else throw Error("The Image constructor takes at most 2 arguments ("+b+" given)");};x(W,O);v("ee.Image",W);var Sg=!1,Qg=function(){Sg||(M(W,"Image","Image"),M(W,"Window","Image","focal_"),Sg=!0)};W.prototype.D=function(a){return W.l.D.call(this,a)};W.prototype.getInfo=W.prototype.D;
|
|
W.prototype.getMap=function(a,b){var c=a?ta(a):{};c.image=this.w();if(b)Qe(c,u(function(a,c){a&&(a.image=this);b(a,c)},this));else return c=Qe(c),c.image=this,c};W.prototype.getMap=W.prototype.getMap;W.prototype.Mb=function(a,b){var c=a?ta(a):{};c.image=this.w();if(b)Ue(c,function(a,c){a?b(Ve(a)):b(null,c)});else return Ve(Ue(c))};W.prototype.getDownloadURL=W.prototype.Mb;
|
|
W.prototype.hd=function(a,b){var c=a?ta(a):{};c.image=this.w();if(c.region)if(n(c.region)||tf(c.region))c.region=hb(c.region);else if(!p(c.region))throw Error("The region parameter must be an array or a GeoJSON object.");if(b)Se(c,function(a,c){var f="";if(!m(c))try{f=Te(a)}catch(g){c=String(g.message)}b(f,c)});else return Te(Se(c))};W.prototype.getThumbURL=W.prototype.hd;W.rgb=function(a,b,c){return Rg([a,b,c],["vis-red","vis-green","vis-blue"])};
|
|
W.cat=function(a){return Rg(Array.prototype.slice.call(arguments),null)};var Rg=function(a,b){if(0==a.length)return L("Image.constant",[]);for(var c=new W(a[0]),d=1;d<a.length;d++)c=L("Image.addBands",c,a[d]);b&&(c=c.select([".*"],b));return c};
|
|
W.prototype.select=function(a){var b=Array.prototype.slice.call(arguments),c={input:this,bandSelectors:b[0]||[]};if(2<b.length||sf(b[0])||rf(b[0])){for(var d=0;d<b.length;d++)if(!(sf(b[d])||rf(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 zf("Image.select",c)};W.prototype.select=W.prototype.select;
|
|
W.prototype.cd=function(a,b){var c=["DEFAULT_EXPRESSION_IMAGE"],d={DEFAULT_EXPRESSION_IMAGE:this};if(b)for(var e in b)c.push(e),d[e]=new W(b[e]);var f=L("Image.parseExpression",a,"DEFAULT_EXPRESSION_IMAGE",c);e=new J;e.encode=function(a){return f.encode(a)};e.H=function(){return{name:"",args:Ra(c,function(a){return{name:a,type:"Image",optional:!1}},this),returns:"Image"}};return e.apply(d)};W.prototype.expression=W.prototype.cd;
|
|
W.prototype.clip=function(a){try{a=new T(a)}catch(b){}return L("Image.clip",this,a)};W.prototype.clip=W.prototype.clip;W.prototype.Hd=function(a){var b;b=1!=arguments.length||sf(arguments[0])?$a(arguments):arguments[0];return L("Image.rename",this,b)};W.prototype.rename=W.prototype.Hd;W.prototype.name=function(){return"Image"};var X=function(a){if(!(this instanceof X))return I(X,arguments);if(a instanceof X)return a;if(1!=arguments.length)throw Error("The ImageCollection constructor takes exactly 1 argument ("+arguments.length+" given)");Tg();a instanceof W&&(a=[a]);if(sf(a))S.call(this,new K("ImageCollection.load"),{id:a});else if(n(a))S.call(this,new K("ImageCollection.fromImages"),{images:Ra(a,function(a){return new W(a)})});else if(a instanceof Lg)S.call(this,new K("ImageCollection.fromImages"),{images:a});else if(a instanceof
|
|
G)S.call(this,a.b,a.i,a.m);else throw Error("Unrecognized argument type to convert to an ImageCollection: "+a);};x(X,S);v("ee.ImageCollection",X);var Ug=!1,Tg=function(){Ug||(M(X,"ImageCollection","ImageCollection"),M(X,"reduce","ImageCollection"),Ug=!0)};X.prototype.getMap=function(a,b){var c=L("ImageCollection.mosaic",this);if(b)c.getMap(a,b);else return c.getMap(a)};X.prototype.getMap=X.prototype.getMap;X.prototype.D=function(a){return X.l.D.call(this,a)};X.prototype.getInfo=X.prototype.D;
|
|
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 W};var Vg={};v("ee.Terrain",Vg);Vg.Pb=!1;Vg.pd=function(){Vg.Pb||(M(Vg,"Terrain","Terrain"),Vg.Pb=!0)};Vg.reset=function(){N(Vg);Vg.Pb=!1};v("ee.initialize",function(a,b,c,d,e){if("ready"!=Wg||a||b){var f=null!=c;if(d)if(f)Xg.push(d);else throw Error("Can't pass an error callback without a success callback.");if("loading"==Wg&&f)Yg.push(c);else if(Wg="loading",Oe(a,b,e),f)Yg.push(c),Bf(Zg,$g);else try{Bf(),Zg()}catch(g){throw $g(g),g;}}else c&&c()});
|
|
v("ee.reset",function(){Wg="not_ready";Ne=Me=Ke=null;Le=!1;la=null;Af={};N(mg);og=!1;N(Gg);Ig=!1;N(O);Gf=!1;N(W);Sg=!1;N(U);Kg=!1;N(S);bg=!1;N(X);Ug=!1;N(V);Pg=!1;N(Q);If=!1;N(T);rg=!1;N(Lg);Ng=!1;N(cg);eg=!1;N(fg);hg=!1;Vg.reset();for(var a=l.ee,b=0;b<ah.length;b++){var c=ah[b];N(a[c]);delete a[c]}ah=[];of=a;var a=bh,d;for(d in a)delete a[d]});v("ee.InitState",{Sd:"not_ready",LOADING:"loading",Td:"ready"});v("ee.InitState.NOT_READY","not_ready");v("ee.InitState.LOADING","loading");
|
|
v("ee.InitState.READY","ready");var Wg="not_ready",Yg=[],Xg=[];v("ee.TILE_SIZE",256);var ah=[],bh={};v("ee.Algorithms",bh);v("ee.call",function(a,b){p(a)&&(a=new K(a));return J.prototype.call.apply(a,Array.prototype.slice.call(arguments,1))});v("ee.apply",function(a,b){p(a)&&(a=new K(a));return a.apply(b)});
|
|
var Zg=function(){if("loading"==Wg){try{ng();Hg();Ff();Qg();Jg();ag();Tg();Og();Hf();pg();Mg();dg();gg();Vg.pd();var a=Cf(),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=l.ee,g;for(g in b)g in c&&!(g in f)&&(f[g]=ch(g),ah.push(g),a[g]?(f[g].signature=a[g],f[g].signature.isConstructor=!0,Af[g]=!0):f[g].signature={});of=f;dh()}catch(k){$g(k);return}Wg="ready";for(Xg=[];0<Yg.length;)Yg.shift()()}},$g=function(a){if("loading"==
|
|
Wg)for(Wg="not_ready",Yg=[];0<Xg.length;)Xg.shift()(a)},dh=function(){var a=Df();pa(a).sort().forEach(function(b){var c=a[b],d=c.H();if(!d.hidden){b=b.split(".");var e=bh;for(e.signature={};1<b.length;){var f=b[0];f in e||(e[f]={signature:{}});e=e[f];b=bb(b,1)}f=function(a){return xf(c,void 0,Array.prototype.slice.call(arguments,0))};f.signature=d;f.toString=u(c.toString,c);e[b[0]]=f}})},ch=function(a){var b=function(b){var d=l.ee[a],e=Array.prototype.slice.call(arguments),f=1==e.length;if(f&&e[0]instanceof
|
|
d)return e[0];if(!(this instanceof d))return I(d,e);var d=Ef(a),g=!(e[0]instanceof G),k=!1;d&&(f?g?k=!0:e[0].b!=d&&(k=!0):k=!0);if(k)G.call(this,d,wf(d,vf(d,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.b,e.i,e.m)}};x(b,G);b.prototype.name=function(){return a};M(b,a,a);return b},uf=function(a,b){if(null===a)return null;if(m(a)){var c=l.ee;switch(b){case "Image":return new W(a);
|
|
case "Feature":return a instanceof S?L("Feature",L("Collection.geometry",a)):new U(a);case "Element":if(a instanceof O)return a;if(a instanceof T)return new U(a);if(a instanceof G)return new O(a.b,a.i,a.m);throw Error("Cannot convert "+a+" to Element.");case "Geometry":return a instanceof V?L("Collection.geometry",a):new T(a);case "FeatureCollection":case "Collection":return a instanceof S?a:new V(a);case "ImageCollection":return new X(a);case "Filter":return new Q(a);case "Algorithm":if(p(a))return new K(a);
|
|
if(r(a)){for(var c=a.length,d=[],e=0;e<c;e++)d[e]="Object";return lg(a,d)}if(a instanceof bf)return a;throw Error("Argument is not a function: "+a);case "String":return sf(a)||a instanceof fg||a instanceof G?new fg(a):a;case "Dictionary":return tf(a)?a:new Gg(a);case "List":return new Lg(a);case "Number":case "Float":case "Long":case "Integer":case "Short":case "Byte":return new cg(a);default:if(b in c){d=Ef(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 eh=function(a,b){z(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*b+")")};var fh=function(a){Hc.call(this);this.fa=a;this.c={}};x(fh,Hc);var gh=[];fh.prototype.Ja=function(a,b,c,d){n(b)||(b&&(gh[0]=b.toString()),b=gh);for(var e=0;e<b.length;e++){var f=Yc(a,b[e],c||this.handleEvent,d||!1,this.fa||this);if(!f)break;this.c[f.key]=f}return this};fh.prototype.eb=function(a,b,c,d){return hh(this,a,b,c,d)};var hh=function(a,b,c,d,e,f){if(n(c))for(var g=0;g<c.length;g++)hh(a,b,c[g],d,e,f);else{b=ed(b,c,d||a.handleEvent,e,f||a.fa||a);if(!b)return a;a.c[b.key]=b}return a};
|
|
fh.prototype.tb=function(a,b,c,d,e){if(n(b))for(var f=0;f<b.length;f++)this.tb(a,b[f],c,d,e);else c=c||this.handleEvent,e=e||this.fa||this,c=Zc(c),d=!!d,b=Oc(a)?a.Ca(b,c,d,e):a?(a=ad(a))?a.Ca(b,c,d,e):null:null,b&&(gd(b),delete this.c[b.key]);return this};fh.prototype.kb=function(){ka(this.c,function(a,b){this.c.hasOwnProperty(b)&&gd(a)},this);this.c={}};fh.prototype.s=function(){fh.l.s.call(this);this.kb()};
|
|
fh.prototype.handleEvent=function(){throw Error("EventHandler.handleEvent not implemented");};var ih=function(a){C.call(this);this.Ga={};this.Fa={};this.fa=new fh(this);this.h=a};x(ih,C);var jh=[B&&!yb("11")?"readystatechange":"load","abort","error"],kh=function(a,b){delete a.Ga[b];var c=a.Fa[b];c&&(delete a.Fa[b],a.fa.tb(c,jh,a.zc),ra(a.Fa)&&ra(a.Ga)&&a.dispatchEvent("complete"))};
|
|
ih.prototype.start=function(){var a=this.Ga;Pa(pa(a),function(b){var c=a[b];if(c&&(delete a[b],!this.Y)){var d;this.h?(d=this.h,d=(d?new Lb(Kb(d)):xa||(xa=new Lb)).Xc("IMG")):d=new Image;c.jc&&(d.crossOrigin=c.jc);this.fa.Ja(d,jh,this.zc);this.Fa[b]=d;d.id=b;d.src=c.src}},this)};
|
|
ih.prototype.zc=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.Y||kh(this,b.id)}};ih.prototype.s=function(){delete this.Ga;delete this.Fa;var a=this.fa;a&&"function"==typeof a.N&&a.N();ih.l.s.call(this)};var lh=function(){this.G=[];this.M=[]};h=lh.prototype;h.enqueue=function(a){this.M.push(a)};h.Aa=function(){0==this.G.length&&(this.G=this.M,this.G.reverse(),this.M=[]);return this.G.pop()};h.u=function(){return this.G.length+this.M.length};h.isEmpty=function(){return 0==this.G.length&&0==this.M.length};h.clear=function(){this.G=[];this.M=[]};h.contains=function(a){return 0<=Na(this.G,a)||0<=Na(this.M,a)};h.remove=function(a){var b=Oa(this.G,a);if(0>b)return Ya(this.M,a);Xa(this.G,b);return!0};
|
|
h.v=function(){for(var a=[],b=this.G.length-1;0<=b;--b)a.push(this.G[b]);for(var c=this.M.length,b=0;b<c;++b)a.push(this.M[b]);return a};var mh=function(a,b){Hc.call(this);this.xc=a||0;this.fb=b||10;if(this.xc>this.fb)throw Error("[goog.structs.Pool] Min can not be greater than max");this.P=new lh;this.$=new vd;this.Eb=0;this.Rb=null;this.Qa()};x(mh,Hc);h=mh.prototype;h.Xa=function(){var a=ja();if(!(null!=this.Rb&&a-this.Rb<this.Eb)){for(var b;0<this.P.u()&&(b=this.P.Aa(),!this.Ub(b));)this.Qa();!b&&this.u()<this.fb&&(b=this.Db());b&&(this.Rb=a,this.$.add(b));return b}};
|
|
h.yb=function(a){this.$.remove(a);this.Ub(a)&&this.u()<this.fb?this.P.enqueue(a):this.Ua(a)};h.Qa=function(){for(var a=this.P;this.u()<this.xc;)a.enqueue(this.Db());for(;this.u()>this.fb&&0<this.P.u();)this.Ua(a.Aa())};h.Db=function(){return{}};h.Ua=function(a){if("function"==typeof a.N)a.N();else for(var b in a)a[b]=null};h.Ub=function(a){return"function"==typeof a.Uc?a.Uc():!0};h.contains=function(a){return this.P.contains(a)||this.$.contains(a)};h.u=function(){return this.P.u()+this.$.u()};
|
|
h.isEmpty=function(){return this.P.isEmpty()&&this.$.isEmpty()};h.s=function(){mh.l.s.call(this);if(0<this.$.u())throw Error("[goog.structs.Pool] Objects not released");delete this.$;for(var a=this.P;!a.isEmpty();)this.Ua(a.Aa());delete this.P};var nh=function(a,b){this.vc=a;this.cc=b};nh.prototype.getKey=function(){return this.vc};nh.prototype.clone=function(){return new nh(this.vc,this.cc)};var oh=function(a){this.L=[];if(a)a:{var b,c;if(a instanceof oh){if(b=a.K(),c=a.v(),0>=a.u()){a=this.L;for(var d=0;d<b.length;d++)a.push(new nh(b[d],c[d]));break a}}else b=pa(a),c=oa(a);for(d=0;d<b.length;d++)ph(this,b[d],c[d])}},ph=function(a,b,c){var d=a.L;d.push(new nh(b,c));b=d.length-1;a=a.L;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=oh.prototype;
|
|
h.remove=function(){var a=this.L,b=a.length,c=a[0];if(!(0>=b)){if(1==b)Wa(a);else{a[0]=a.pop();for(var a=0,b=this.L,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.cc}};h.v=function(){for(var a=this.L,b=[],c=a.length,d=0;d<c;d++)b.push(a[d].cc);return b};h.K=function(){for(var a=this.L,b=[],c=a.length,d=0;d<c;d++)b.push(a[d].getKey());return b};
|
|
h.X=function(a){return Sa(this.L,function(b){return b.getKey()==a})};h.clone=function(){return new oh(this)};h.u=function(){return this.L.length};h.isEmpty=function(){return 0==this.L.length};h.clear=function(){Wa(this.L)};var qh=function(){oh.call(this)};x(qh,oh);qh.prototype.enqueue=function(a,b){ph(this,a,b)};qh.prototype.Aa=function(){return this.remove()};var rh=function(a,b){this.lc=void 0;this.mb=new qh;mh.call(this,a,b)};x(rh,mh);h=rh.prototype;h.Xa=function(a,b){if(!a){var c=rh.l.Xa.call(this);c&&this.Eb&&(this.lc=l.setTimeout(u(this.Za,this),this.Eb));return c}this.mb.enqueue(m(b)?b:100,a);this.Za()};h.Za=function(){for(var a=this.mb;0<a.u();){var b=this.Xa();if(b)a.Aa().apply(this,[b]);else break}};h.yb=function(a){rh.l.yb.call(this,a);this.Za()};h.Qa=function(){rh.l.Qa.call(this);this.Za()};
|
|
h.s=function(){rh.l.s.call(this);l.clearTimeout(this.lc);this.mb.clear();this.mb=null};var Y=function(){C.call(this);this.pb=new sh(0,4);this.ua=new qd};x(Y,C);v("ee.MapTileManager",Y);Y.pc=function(){return Y.sc?Y.sc:Y.sc=new Y};Y.prototype.send=function(a,b,c,d,e){if(this.ua.get(a))throw Error("[ee.MapTileManager] ID in use");b=new th(a,b,d,u(this.Dc,this),m(e)?e:1);this.ua.set(a,b);a=u(this.ld,this,b);this.pb.Xa(a,c);return b};Y.prototype.abort=function(a){if(a=this.ua.get(a))a.ya||(a.ya=!0,a.da=new Ic("abort")),this.Dc(a)};
|
|
Y.prototype.ld=function(a,b){if(a.Z||a.ya)uh(this,b);else{a.Mc=b;b.setActive(!0);var c=new ih;a.Z=c;if(!vh(a))throw Error("Cannot dispatch first request!");}};Y.prototype.Dc=function(a){this.ua.remove(a.V);a.Z&&(uh(this,a.Mc),a.Z.N());a.Nb&&a.Nb(a.da,a.Cc)};var uh=function(a,b){b.setActive(!1);var c;c=a.pb;c.$.remove(b)?(c.yb(b),c=!0):c=!1;if(!c)throw Error("Object not released");};
|
|
Y.prototype.s=function(){Y.l.s.call(this);this.pb.N();this.pb=null;var a=this.ua;Pa(a.v(),function(a){a.N()});a.clear();this.ua=null};var th=function(a,b,c,d,e){Hc.call(this);this.V=a;this.Od=b;this.wd=m(e)?e:1;this.Nb=c;this.ia=d};x(th,Hc);h=th.prototype;h.ec=0;h.ya=!1;h.Z=null;h.Mc=null;h.da=null;h.Cc=null;var wh=["load","abort","error"];th.prototype.getUrl=function(){return this.Od};
|
|
th.prototype.nd=function(a){if(this.ya)this.ia&&this.ia(this);else switch(a.type){case "load":this.da=a;this.ia&&this.ia(this);break;case "error":case "abort":vh(this)||(this.da=a,this.ia&&this.ia(this))}};th.prototype.s=function(){th.l.s.call(this);delete this.Nb;delete this.ia};var vh=function(a){if(a.ec>a.wd)return!1;a.ec++;kh(a.Z,a.V);setTimeout(u(a.Jd,a),0);return!0};
|
|
th.prototype.Jd=function(){if(!this.ya){var a=u(function(a){(a=p(a)?a:a.src)&&(this.Z.Ga[this.V]={src:a,jc:m(void 0)?void 0:null});ed(this.Z,wh,u(this.nd,this));this.Z.start()},this),b=this.getUrl();if(ue(ve(b)).X("profiling")){var c=new D;c.Ka="blob";c.Ja("complete",u(function(){this.Cc=c.getResponseHeader("X-Earth-Engine-Computation-Profile")||null;var d;try{d=URL.createObjectURL(ge(c))}catch(e){}a(d||b)},this));c.eb("ready",u(c.N,c));c.send(b,"GET")}else a(b)}};var xh=function(){this.J=!1};
|
|
x(xh,Hc);xh.prototype.setActive=function(a){this.J=a};xh.prototype.tc=function(){return this.J};var sh=function(a,b){rh.call(this,a,b)};x(sh,rh);sh.prototype.Db=function(){return new xh};sh.prototype.Ua=function(a){a.N()};sh.prototype.Ub=function(a){return!a.Y&&!a.tc()};var Z=function(a,b,c,d,e){C.call(this);this.vd=b;this.Lc=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.uc=m(d.uc)?d.uc:!0;this.name=d.name;this.La=[];this.bc=new vd;this.Ic=new vd;this.ac=0;this.url=a;this.Vb=1;this.ra=e||null};x(Z,C);v("ee.MapLayerOverlay",Z);Z.prototype.Pc=function(a){return Yc(this,"tileevent",a)};
|
|
Z.prototype.addTileCallback=Z.prototype.Pc;Z.prototype.Gd=function(a){gd(a)};Z.prototype.removeTileCallback=Z.prototype.Gd;
|
|
Z.prototype.getTile=function(a,b,c){var d=1<<b;if(b<this.minZoom||0>a.y||a.y>=d)return a=c.createElement("IMG"),a.style.width="0px",a.style.height="0px",a;c=a.x%d;0>c&&(c+=d);b=[this.vd,b,c,a.y].join("/");a=[this.url,b].join("/")+"?token="+this.Lc;this.ra&&this.ra.isEnabled()&&(a+="&profiling=1&no-cache=1");b=[b,this.ac,this.Lc].join("/");this.ac+=1;d=Gb("div",{id:b});c=(new Date).getTime()/1E3;this.La.push(b);Y.pc().send(b,a,c,u(this.md,this,d,b));this.dispatchEvent(new yh(this.La.length));return d};
|
|
Z.prototype.releaseTile=function(a){Y.pc().abort(a.id);this.bc.remove(m(a.firstElementChild)?a.firstElementChild:Jb(a.firstChild));this.Ic.remove(a.id);this.ra&&this.ra.Yd(a.id)};Z.prototype.setOpacity=function(a){this.Vb=a;var b=this.bc.la();pd(b,function(b){eh(b,a)})};Z.prototype.getTile=Z.prototype.getTile;Z.prototype.setOpacity=Z.prototype.setOpacity;Z.prototype.releaseTile=Z.prototype.releaseTile;
|
|
Z.prototype.md=function(a,b,c,d){"error"==c.type?(Ya(this.La,b),this.Ic.add(b),this.dispatchEvent(c)):(Ya(this.La,b),c.target&&"load"==c.type&&(c=c.target,this.bc.add(c),1!=this.Vb&&eh(c,this.Vb),a.appendChild(c)),this.dispatchEvent(new yh(this.La.length)));this.ra&&null!==d&&this.ra.Vd(b,d)};var yh=function(a){Ic.call(this,"tileevent");this.count=a};x(yh,Ic);})();
|
|
//@ sourceMappingURL=ee_api_js.sourcemap
|