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