Matt Hancher 3db36dcd34 v0.1.41
2014-12-04 16:23:59 -08:00

127 lines
66 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},m=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},ea=function(a){return"number"==typeof a},ga=function(a){return"function"==ca(a)},q=function(a){var b=typeof a;return"object"==b&&null!=a||"function"==b},ia=function(a,
b,c){return a.call.apply(a.bind,arguments)},ja=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)}},r=function(a,b,c){r=Function.prototype.bind&&-1!=Function.prototype.bind.toString().indexOf("native code")?ia:ja;return r.apply(null,arguments)},ka=Date.now||function(){return+new Date},
t=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]={}},u=function(a,b){function c(){}c.prototype=b.prototype;a.n=b.prototype;a.prototype=new c;a.prototype.constructor=a;a.Cb=function(a,c,g){for(var f=Array(arguments.length-2),n=2;n<arguments.length;n++)f[n-2]=arguments[n];return b.prototype[c].apply(a,f)}};
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 r.apply(null,c)}return r(this,a)};var la=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,b){b in a&&delete a[b]},v=function(a){var b={},c;for(c in a)b[c]=a[c];return b},sa=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]=sa(a[c]);return b}return a},ta="constructor hasOwnProperty isPrototypeOf propertyIsEnumerable toLocaleString toString valueOf".split(" "),ua=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 g=0;g<ta.length;g++)c=ta[g],Object.prototype.hasOwnProperty.call(d,c)&&(a[c]=d[c])}},va=function(a){var b=arguments.length;if(1==b&&m(arguments[0]))return va.apply(null,arguments[0]);for(var c={},d=0;d<b;d++)c[arguments[d]]=
!0;return c};var wa=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);},xa=function(a){return eval("("+a+")")},ya=function(a){this.aa=a};ya.prototype.h=function(a){var b=[];za(this,a,b);return b.join("")};
var za=function(a,b,c){switch(typeof b){case "string":Aa(b,c);break;case "number":c.push(isFinite(b)&&!isNaN(b)?b:"null");break;case "boolean":c.push(b);break;case "undefined":c.push("null");break;case "object":if(null==b){c.push("null");break}if(m(b)){var d=b.length;c.push("[");for(var e="",g=0;g<d;g++)c.push(e),e=b[g],za(a,a.aa?a.aa.call(b,String(g),e):e,c),e=",";c.push("]");break}c.push("{");d="";for(g in b)Object.prototype.hasOwnProperty.call(b,g)&&(e=b[g],"function"!=typeof e&&(c.push(d),Aa(g,
c),c.push(":"),za(a,a.aa?a.aa.call(b,g,e):e,c),d=","));c.push("}");break;case "function":break;default:throw Error("Unknown type: "+typeof b);}},Ba={'"':'\\"',"\\":"\\\\","/":"\\/","\b":"\\b","\f":"\\f","\n":"\\n","\r":"\\r","\t":"\\t","\x0B":"\\u000b"},Ca=/\uffff/.test("\uffff")?/[\\\"\x00-\x1f\x7f-\uffff]/g:/[\\\"\x00-\x1f\x7f-\xff]/g,Aa=function(a,b){b.push('"',a.replace(Ca,function(a){if(a in Ba)return Ba[a];var b=a.charCodeAt(0),e="\\u";16>b?e+="000":256>b?e+="00":4096>b&&(e+="0");return Ba[a]=
e+b.toString(16)}),'"')};var Da=function(a){if(Error.captureStackTrace)Error.captureStackTrace(this,Da);else{var b=Error().stack;b&&(this.stack=b)}a&&(this.message=String(a))};u(Da,Error);Da.prototype.name="CustomError";var Ea=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")},Fa=String.prototype.trim?function(a){return a.trim()}:function(a){return a.replace(/^[\s\xa0]+|[\s\xa0]+$/g,"")},Na=function(a){if(!Ga.test(a))return a;-1!=a.indexOf("&")&&(a=a.replace(Ha,"&amp;"));-1!=a.indexOf("<")&&(a=a.replace(Ia,"&lt;"));-1!=a.indexOf(">")&&(a=a.replace(Ja,"&gt;"));-1!=a.indexOf('"')&&(a=a.replace(Ka,"&quot;"));-1!=a.indexOf("'")&&
(a=a.replace(La,"&#39;"));-1!=a.indexOf("\x00")&&(a=a.replace(Ma,"&#0;"));return a},Ha=/&/g,Ia=/</g,Ja=/>/g,Ka=/"/g,La=/'/g,Ma=/\x00/g,Ga=/[\x00&<>"']/,Oa=function(a,b){return a<b?-1:a>b?1:0};var Pa=function(a,b){b.unshift(a);Da.call(this,Ea.apply(null,b));b.shift()};u(Pa,Da);Pa.prototype.name="AssertionError";var Qa=function(a,b,c){if(!a){var d="Assertion failed";if(b)var d=d+(": "+b),e=Array.prototype.slice.call(arguments,2);throw new Pa(""+d,e||[]);}return a},Ra=function(a,b){throw new Pa("Failure"+(a?": "+a:""),Array.prototype.slice.call(arguments,1));};var w=Array.prototype,Sa=w.indexOf?function(a,b,c){Qa(null!=a.length);return w.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},Ta=w.forEach?function(a,b,c){Qa(null!=a.length);w.forEach.call(a,b,c)}:function(a,b,c){for(var d=a.length,e=p(a)?a.split(""):a,g=0;g<d;g++)g in e&&b.call(c,e[g],g,a)},Ua=w.map?function(a,b,c){Qa(null!=a.length);return w.map.call(a,b,c)}:
function(a,b,c){for(var d=a.length,e=Array(d),g=p(a)?a.split(""):a,f=0;f<d;f++)f in g&&(e[f]=b.call(c,g[f],f,a));return e},Wa=function(a){var b;t:{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 t}b=-1}return 0>b?null:p(a)?a.charAt(b):a[b]},Xa=function(a,b){var c=Sa(a,b),d;if(d=0<=c)Qa(null!=a.length),w.splice.call(a,c,1);return d},Ya=function(a){return w.concat.apply(w,arguments)},Za=function(a,b){for(var c=1;c<arguments.length;c++){var d=arguments[c];
if(da(d)){var e=a.length||0,g=d.length||0;a.length=e+g;for(var f=0;f<g;f++)a[e+f]=d[f]}else a.push(d)}},$a=function(a,b,c){Qa(null!=a.length);return 2>=arguments.length?w.slice.call(a,b):w.slice.call(a,b,c)};var ab=function(){this.M=this.M;this.$=this.$};ab.prototype.M=!1;ab.prototype.Ia=function(){this.M||(this.M=!0,this.C())};ab.prototype.C=function(){if(this.$)for(;this.$.length;)this.$.shift()()};var bb=function(a,b){this.type=a;this.currentTarget=this.target=b;this.defaultPrevented=this.Z=!1;this.Oa=!0};bb.prototype.C=function(){};bb.prototype.Ia=function(){};var x;t:{var cb=k.navigator;if(cb){var db=cb.userAgent;if(db){x=db;break t}}x=""};var eb=-1!=x.indexOf("Opera")||-1!=x.indexOf("OPR"),y=-1!=x.indexOf("Trident")||-1!=x.indexOf("MSIE"),fb=-1!=x.indexOf("Gecko")&&-1==x.toLowerCase().indexOf("webkit")&&!(-1!=x.indexOf("Trident")||-1!=x.indexOf("MSIE")),hb=-1!=x.toLowerCase().indexOf("webkit"),ib=function(){var a=k.document;return a?a.documentMode:void 0},jb=function(){var a="",b;if(eb&&k.opera)return a=k.opera.version,ga(a)?a():a;fb?b=/rv\:([^\);]+)(\)|;)/:y?b=/\b(?:MSIE|rv)[: ]([^\);]+)(\)|;)/:hb&&(b=/WebKit\/(\S+)/);b&&(a=(a=b.exec(x))?
a[1]:"");return y&&(b=ib(),b>parseFloat(a))?String(b):a}(),kb={},z=function(a){var b;if(!(b=kb[a])){b=0;for(var c=Fa(String(jb)).split("."),d=Fa(String(a)).split("."),e=Math.max(c.length,d.length),g=0;0==b&&g<e;g++){var f=c[g]||"",n=d[g]||"",F=RegExp("(\\d*)(\\D*)","g"),D=RegExp("(\\d*)(\\D*)","g");do{var A=F.exec(f)||["","",""],ha=D.exec(n)||["","",""];if(0==A[0].length&&0==ha[0].length)break;b=Oa(0==A[1].length?0:parseInt(A[1],10),0==ha[1].length?0:parseInt(ha[1],10))||Oa(0==A[2].length,0==ha[2].length)||
Oa(A[2],ha[2])}while(0==b)}b=kb[a]=0<=b}return b},lb=k.document,mb=lb&&y?ib()||("CSS1Compat"==lb.compatMode?parseInt(jb,10):5):void 0;y&&z("9");!hb||z("528");fb&&z("1.9b")||y&&z("8")||eb&&z("9.5")||hb&&z("528");fb&&!z("8")||y&&z("9");var nb="closure_listenable_"+(1E6*Math.random()|0),ob=0;var pb=function(a,b,c,d,e){this.na=a;this.Ua=null;this.src=b;this.type=c;this.za=!!d;this.ma=e;this.key=++ob;this.oa=this.pa=!1},qb=function(a){a.oa=!0;a.na=null;a.Ua=null;a.src=null;a.ma=null};var rb=function(a){this.src=a;this.o={};this.qa=0};rb.prototype.add=function(a,b,c,d,e){var g=a.toString();a=this.o[g];a||(a=this.o[g]=[],this.qa++);var f;t:{for(f=0;f<a.length;++f){var n=a[f];if(!n.oa&&n.na==b&&n.za==!!d&&n.ma==e)break t}f=-1}-1<f?(b=a[f],c||(b.pa=!1)):(b=new pb(b,this.src,g,!!d,e),b.pa=c,a.push(b));return b};rb.prototype.Ra=function(){var a=0,b;for(b in this.o){for(var c=this.o[b],d=0;d<c.length;d++)++a,qb(c[d]);delete this.o[b];this.qa--}};var sb=function(){ab.call(this);this.A=new rb(this);this.Wa=this;this.sa=null};u(sb,ab);sb.prototype[nb]=!0;
sb.prototype.dispatchEvent=function(a){tb(this);var b,c=this.sa;if(c){b=[];for(var d=1;c;c=c.sa)b.push(c),Qa(1E3>++d,"infinite loop")}c=this.Wa;d=a.type||a;if(p(a))a=new bb(a,c);else if(a instanceof bb)a.target=a.target||c;else{var e=a;a=new bb(d,c);ua(a,e)}var e=!0,g;if(b)for(var f=b.length-1;!a.Z&&0<=f;f--)g=a.currentTarget=b[f],e=ub(g,d,!0,a)&&e;a.Z||(g=a.currentTarget=c,e=ub(g,d,!0,a)&&e,a.Z||(e=ub(g,d,!1,a)&&e));if(b)for(f=0;!a.Z&&f<b.length;f++)g=a.currentTarget=b[f],e=ub(g,d,!1,a)&&e;return e};
sb.prototype.C=function(){sb.n.C.call(this);this.A&&this.A.Ra();this.sa=null};sb.prototype.Ya=function(a){tb(this);this.A.add("complete",a,!1,void 0,void 0)};sb.prototype.Za=function(a){this.A.add("ready",a,!0,void 0,void 0)};
var ub=function(a,b,c,d){b=a.A.o[String(b)];if(!b)return!0;b=b.concat();for(var e=!0,g=0;g<b.length;++g){var f=b[g];if(f&&!f.oa&&f.za==c){var n=f.na,F=f.ma||f.src;if(f.pa){var D=a.A,A=f.type;A in D.o&&Xa(D.o[A],f)&&(qb(f),0==D.o[A].length&&(delete D.o[A],D.qa--))}e=!1!==n.call(F,d)&&e}}return e&&0!=d.Oa},tb=function(a){Qa(a.A,"Event target is not initialized. Did you call the superclass (goog.events.EventTarget) constructor?")};var vb="StopIteration"in k?k.StopIteration:Error("StopIteration"),wb=function(){};wb.prototype.next=function(){throw vb;};wb.prototype.hb=function(){return this};var xb=function(a,b){this.u={};this.i=[];this.ra=this.m=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.Qa(a)};xb.prototype.q=function(){yb(this);for(var a=[],b=0;b<this.i.length;b++)a.push(this.u[this.i[b]]);return a};xb.prototype.t=function(){yb(this);return this.i.concat()};xb.prototype.W=function(a){return Object.prototype.hasOwnProperty.call(this.u,a)};
var yb=function(a){if(a.m!=a.i.length){for(var b=0,c=0;b<a.i.length;){var d=a.i[b];Object.prototype.hasOwnProperty.call(a.u,d)&&(a.i[c++]=d);b++}a.i.length=c}if(a.m!=a.i.length){for(var e={},c=b=0;b<a.i.length;)d=a.i[b],Object.prototype.hasOwnProperty.call(e,d)||(a.i[c++]=d,e[d]=1),b++;a.i.length=c}};h=xb.prototype;h.get=function(a,b){return Object.prototype.hasOwnProperty.call(this.u,a)?this.u[a]:b};
h.set=function(a,b){Object.prototype.hasOwnProperty.call(this.u,a)||(this.m++,this.i.push(a),this.ra++);this.u[a]=b};h.Qa=function(a){var b;a instanceof xb?(b=a.t(),a=a.q()):(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.t(),d=0;d<c.length;d++){var e=c[d],g=this.get(e);a.call(b,g,e,this)}};h.clone=function(){return new xb(this)};
h.hb=function(a){yb(this);var b=0,c=this.i,d=this.u,e=this.ra,g=this,f=new wb;f.next=function(){for(;;){if(e!=g.ra)throw Error("The map has changed since the iterator was created");if(b>=c.length)throw vb;var f=c[b++];return a?f:d[f]}};return f};var zb=function(a){if("function"==typeof a.q)return a.q();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)},Ab=function(a,b){if("function"==typeof a.forEach)a.forEach(b,void 0);else if(da(a)||p(a))Ta(a,b,void 0);else{var c;if("function"==typeof a.t)c=a.t();else if("function"!=typeof a.q)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=zb(a),e=d.length,g=0;g<e;g++)b.call(void 0,d[g],c&&c[g],
a)}};var Cb=function(a){var b;b||(b=Bb(a||arguments.callee.caller,[]));return b},Bb=function(a,b){var c=[];if(0<=Sa(b,a))c.push("[...circular reference...]");else if(a&&50>b.length){c.push(Db(a)+"(");for(var d=a.arguments,e=0;d&&e<d.length;e++){0<e&&c.push(", ");var g;g=d[e];switch(typeof g){case "object":g=g?"object":"null";break;case "string":break;case "number":g=String(g);break;case "boolean":g=g?"true":"false";break;case "function":g=(g=Db(g))?g:"[fn]";break;default:g=typeof g}40<g.length&&(g=g.substr(0,
40)+"...");c.push(g)}b.push(a);c.push(")\n");try{c.push(Bb(a.caller,b))}catch(f){c.push("[exception trying to get caller]\n")}}else a?c.push("[...long stack...]"):c.push("[end]");return c.join("")},Db=function(a){if(Eb[a])return Eb[a];a=String(a);if(!Eb[a]){var b=/function ([^\(]+)/.exec(a);Eb[a]=b?b[1]:"[Anonymous]"}return Eb[a]},Eb={};var Fb=function(a,b,c,d,e){this.reset(a,b,c,d,e)};Fb.prototype.Da=null;Fb.prototype.Ca=null;var Gb=0;Fb.prototype.reset=function(a,b,c,d,e){"number"==typeof e||Gb++;d||ka();this.N=a;this.Va=b;delete this.Da;delete this.Ca};Fb.prototype.Fa=function(a){this.N=a};var Hb=function(a){this.Sa=a;this.Ba=this.ta=this.N=this.Y=null},Ib=function(a,b){this.name=a;this.value=b};Ib.prototype.toString=function(){return this.name};var Jb=new Ib("SEVERE",1E3),Kb=new Ib("CONFIG",700),Lb=new Ib("FINE",500);Hb.prototype.getParent=function(){return this.Y};Hb.prototype.ab=function(){this.ta||(this.ta={});return this.ta};Hb.prototype.Fa=function(a){this.N=a};var Mb=function(a){if(a.N)return a.N;if(a.Y)return Mb(a.Y);Ra("Root logger has no level set.");return null};
Hb.prototype.log=function(a,b,c){if(a.value>=Mb(this).value)for(ga(b)&&(b=b()),a=this.cb(a,b,c,Hb.prototype.log),b="log:"+a.Va,k.console&&(k.console.timeStamp?k.console.timeStamp(b):k.console.markTimeline&&k.console.markTimeline(b)),k.msWriteProfilerMark&&k.msWriteProfilerMark(b),b=this;b;){c=b;var d=a;if(c.Ba)for(var e=0,g=void 0;g=c.Ba[e];e++)g(d);b=b.getParent()}};
Hb.prototype.cb=function(a,b,c,d){var e=new Fb(a,String(b),this.Sa);if(c){var g;g=d||arguments.callee.caller;e.Da=c;var f;try{var n;var F;e:{for(var D=["window","location","href"],A=k,ha;ha=D.shift();)if(null!=A[ha])A=A[ha];else{F=null;break e}F=A}if(p(c))n={message:c,name:"Unknown error",lineNumber:"Not available",fileName:F,stack:"Not available"};else{var gb,fa,D=!1;try{gb=c.lineNumber||c.line||"Not available"}catch(Ee){gb="Not available",D=!0}try{fa=c.fileName||c.filename||c.sourceURL||k.$googDebugFname||
F}catch(Fe){fa="Not available",D=!0}n=!D&&c.lineNumber&&c.fileName&&c.stack&&c.message&&c.name?c:{message:c.message||"Not available",name:c.name||"UnknownError",lineNumber:gb,fileName:fa,stack:c.stack||"Not available"}}f="Message: "+Na(n.message)+'\nUrl: <a href="view-source:'+n.fileName+'" target="_new">'+n.fileName+"</a>\nLine: "+n.lineNumber+"\n\nBrowser stack:\n"+Na(n.stack+"-> ")+"[end]\n\nJS stack traversal:\n"+Na(Cb(g)+"-> ")}catch(ne){f="Exception trying to expose exception! You win, we lose. "+
ne}e.Ca=f}return e};var Nb={},Ob=null,Pb=function(a){Ob||(Ob=new Hb(""),Nb[""]=Ob,Ob.Fa(Kb));var b;if(!(b=Nb[a])){b=new Hb(a);var c=a.lastIndexOf("."),d=a.substr(c+1),c=Pb(a.substr(0,c));c.ab()[d]=b;b.Y=c;Nb[a]=b}return b};var Qb=function(a,b){a&&a.log(Lb,b,void 0)};[].push(function(){});var Rb=function(a,b,c){if(ga(a))c&&(a=r(a,c));else if(a&&"function"==typeof a.handleEvent)a=r(a.handleEvent,a);else throw Error("Invalid listener argument");return 2147483647<b?-1:k.setTimeout(a,b||0)};var Sb=/^(?:([^:/?#.]+):)?(?:\/\/(?:([^/?#]*)@)?([^/#?]*?)(?::([0-9]+))?(?=[/#?]|$))?([^?#]+)?(?:\?([^#]*))?(?:#(.*))?$/,Ub=function(a){if(Tb){Tb=!1;var b=k.location;if(b){var c=b.href;if(c&&(c=(c=Ub(c)[3]||null)?decodeURI(c):c)&&c!=b.hostname)throw Tb=!0,Error();}}return a.match(Sb)},Tb=hb;var Vb=function(){};Vb.prototype.Ha=null;Vb.prototype.I=function(){var a;(a=this.Ha)||(a={},Wb(this)&&(a[0]=!0,a[1]=!0),a=this.Ha=a);return a};var Xb=function(a,b){this.gb=a;this.fb=b};u(Xb,Vb);Xb.prototype.da=function(){return this.gb()};Xb.prototype.I=function(){return this.fb()};var B=function(){return B.Ea.da()};B.eb=!1;B.I=function(){return B.Ea.I()};B.Hb=function(a,b){B.Ja(new Xb(Qa(a),Qa(b)))};B.Ja=function(a){B.Ea=a};var Yb=function(){};u(Yb,Vb);Yb.prototype.da=function(){var a=Wb(this);return a?new ActiveXObject(a):new XMLHttpRequest};
var Wb=function(a){if(B.eb)return"";if(!a.Ga&&"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.Ga=d}catch(e){}}throw Error("Could not create ActiveXObject. ActiveX might be disabled, or MSXML might not be installed");}return a.Ga};B.Ja(new Yb);var C=function(a){sb.call(this);this.headers=new xb;this.T=a||null;this.s=!1;this.P=this.a=null;this.H=this.va=this.Q="";this.w=this.ba=this.O=this.ca=!1;this.B=0;this.R=null;this.wa="";this.S=this.La=!1};u(C,sb);var Zb=C.prototype,$b=Pb("goog.net.XhrIo");Zb.k=$b;var ac=/^https?$/i,bc=["POST","PUT"],cc=[],ec=function(a,b,c,d){var e=dc,g=new C;cc.push(g);b&&g.Ya(b);g.Za(g.Xa);e&&(g.B=Math.max(0,e));g.send(a,c,d,{"Content-Type":"application/x-www-form-urlencoded"})};
C.prototype.Xa=function(){this.Ia();Xa(cc,this)};
C.prototype.send=function(a,b,c,d){if(this.a)throw Error("[goog.net.XhrIo] Object is active with another request="+this.Q+"; newUri="+a);b=b?b.toUpperCase():"GET";this.Q=a;this.H="";this.va=b;this.ca=!1;this.s=!0;this.a=this.T?this.T.da():B();this.P=this.T?this.T.I():B.I();this.a.onreadystatechange=r(this.xa,this);try{Qb(this.k,fc(this,"Opening Xhr")),this.ba=!0,this.a.open(b,String(a),!0),this.ba=!1}catch(e){Qb(this.k,fc(this,"Error opening Xhr: "+e.message));gc(this,e);return}a=c||"";var g=this.headers.clone();
d&&Ab(d,function(a,b){g.set(b,a)});d=Wa(g.t());c=k.FormData&&a instanceof k.FormData;!(0<=Sa(bc,b))||d||c||g.set("Content-Type","application/x-www-form-urlencoded;charset=utf-8");g.forEach(function(a,b){this.a.setRequestHeader(b,a)},this);this.wa&&(this.a.responseType=this.wa);"withCredentials"in this.a&&(this.a.withCredentials=this.La);try{hc(this),0<this.B&&(this.S=ic(this.a),Qb(this.k,fc(this,"Will abort after "+this.B+"ms if incomplete, xhr2 "+this.S)),this.S?(this.a.timeout=this.B,this.a.ontimeout=
r(this.ya,this)):this.R=Rb(this.ya,this.B,this)),Qb(this.k,fc(this,"Sending request")),this.O=!0,this.a.send(a),this.O=!1}catch(f){Qb(this.k,fc(this,"Send error: "+f.message)),gc(this,f)}};var ic=function(a){return y&&z(9)&&ea(a.timeout)&&l(a.ontimeout)},Va=function(a){return"content-type"==a.toLowerCase()};C.prototype.ya=function(){"undefined"!=typeof aa&&this.a&&(this.H="Timed out after "+this.B+"ms, aborting",Qb(this.k,fc(this,this.H)),this.dispatchEvent("timeout"),this.abort(8))};
var gc=function(a,b){a.s=!1;a.a&&(a.w=!0,a.a.abort(),a.w=!1);a.H=b;jc(a);kc(a)},jc=function(a){a.ca||(a.ca=!0,a.dispatchEvent("complete"),a.dispatchEvent("error"))};C.prototype.abort=function(){this.a&&this.s&&(Qb(this.k,fc(this,"Aborting")),this.s=!1,this.w=!0,this.a.abort(),this.w=!1,this.dispatchEvent("complete"),this.dispatchEvent("abort"),kc(this))};C.prototype.C=function(){this.a&&(this.s&&(this.s=!1,this.w=!0,this.a.abort(),this.w=!1),kc(this,!0));C.n.C.call(this)};
C.prototype.xa=function(){this.M||(this.ba||this.O||this.w?lc(this):this.Ta())};C.prototype.Ta=function(){lc(this)};
var lc=function(a){if(a.s&&"undefined"!=typeof aa)if(a.P[1]&&4==mc(a)&&2==a.getStatus())Qb(a.k,fc(a,"Local request error detected and ignored"));else if(a.O&&4==mc(a))Rb(a.xa,0,a);else if(a.dispatchEvent("readystatechange"),4==mc(a)){Qb(a.k,fc(a,"Request complete"));a.s=!1;try{var b=a.getStatus(),c;t:switch(b){case 200:case 201:case 202:case 204:case 206:case 304:case 1223:c=!0;break t;default:c=!1}var d;if(!(d=c)){var e;if(e=0===b){var g=Ub(String(a.Q))[1]||null;if(!g&&self.location)var f=self.location.protocol,
g=f.substr(0,f.length-1);e=!ac.test(g?g.toLowerCase():"")}d=e}if(d)a.dispatchEvent("complete"),a.dispatchEvent("success");else{var n;try{n=2<mc(a)?a.a.statusText:""}catch(F){Qb(a.k,"Can not get status: "+F.message),n=""}a.H=n+" ["+a.getStatus()+"]";jc(a)}}finally{kc(a)}}},kc=function(a,b){if(a.a){hc(a);var c=a.a,d=a.P[0]?ba:null;a.a=null;a.P=null;b||a.dispatchEvent("ready");try{c.onreadystatechange=d}catch(e){(c=a.k)&&c.log(Jb,"Problem encountered resetting onreadystatechange: "+e.message,void 0)}}},
hc=function(a){a.a&&a.S&&(a.a.ontimeout=null);ea(a.R)&&(k.clearTimeout(a.R),a.R=null)},mc=function(a){return a.a?a.a.readyState:0};C.prototype.getStatus=function(){try{return 2<mc(this)?this.a.status:-1}catch(a){return-1}};var fc=function(a,b){return b+" ["+a.va+" "+a.Q+" "+a.getStatus()+"]"};var nc=function(a,b,c){this.p=a||null;this.$a=!!c},pc=function(a){if(!a.g&&(a.g=new xb,a.m=0,a.p))for(var b=a.p.split("&"),c=0;c<b.length;c++){var d=b[c].indexOf("="),e=null,g=null;0<=d?(e=b[c].substring(0,d),g=b[c].substring(d+1)):e=b[c];e=decodeURIComponent(e.replace(/\+/g," "));e=oc(a,e);a.add(e,g?decodeURIComponent(g.replace(/\+/g," ")):"")}};h=nc.prototype;h.g=null;h.m=null;h.add=function(a,b){pc(this);this.p=null;a=oc(this,a);var c=this.g.get(a);c||this.g.set(a,c=[]);c.push(b);this.m++;return this};
h.W=function(a){pc(this);a=oc(this,a);return this.g.W(a)};h.t=function(){pc(this);for(var a=this.g.q(),b=this.g.t(),c=[],d=0;d<b.length;d++)for(var e=a[d],g=0;g<e.length;g++)c.push(b[d]);return c};h.q=function(a){pc(this);var b=[];if(p(a))this.W(a)&&(b=Ya(b,this.g.get(oc(this,a))));else{a=this.g.q();for(var c=0;c<a.length;c++)b=Ya(b,a[c])}return b};h.set=function(a,b){pc(this);this.p=null;a=oc(this,a);this.W(a)&&(this.m-=this.g.get(a).length);this.g.set(a,[b]);this.m++;return this};
h.get=function(a,b){var c=a?this.q(a):[];return 0<c.length?String(c[0]):b};h.toString=function(){if(this.p)return this.p;if(!this.g)return"";for(var a=[],b=this.g.t(),c=0;c<b.length;c++)for(var d=b[c],e=encodeURIComponent(String(d)),d=this.q(d),g=0;g<d.length;g++){var f=e;""!==d[g]&&(f+="="+encodeURIComponent(String(d[g])));a.push(f)}return this.p=a.join("&")};h.clone=function(){var a=new nc;a.p=this.p;this.g&&(a.g=this.g.clone(),a.m=this.m);return a};
var oc=function(a,b){var c=String(b);a.$a&&(c=c.toLowerCase());return c};var qc=null,rc=null,sc=null,tc=!1,dc=0,uc={Db:"CANCEL",Gb:"UPDATE"},vc=function(a,b,c){null!=a?qc=a:tc||(qc="/api");null!=b?rc=b:tc||(rc="https://earthengine.googleapis.com");l(c)&&(sc=c);tc=!0};t("ee.data.setDeadline",function(a){dc=a});t("ee.data.getApiBaseUrl",function(){return qc});t("ee.data.getTileBaseUrl",function(){return rc});t("ee.data.getXsrfToken",function(){return sc});
t("ee.data.getInfo",function(a,b){k.console&&k.console.error&&k.console.error("ee.data.getInfo is DEPRECATED. Use ee.data.getValue() instead.");return E("/info",(new nc).add("id",a),b)});t("ee.data.getList",function(a,b){var c=G(a);return E("/list",c,b)});var wc=function(a,b){a=v(a);return E("/mapid",G(a),b)};t("ee.data.getMapId",wc);t("ee.data.getTileUrl",function(a,b,c,d){var e=Math.pow(2,d);b%=e;0>b&&(b+=e);return[rc,"map",a.mapid,d,b,c].join("/")+"?token="+a.token});
var xc=function(a,b){a=v(a);return E("/value",G(a),b)};t("ee.data.getValue",xc);var yc=function(a,b){a=v(a);m(a.size)&&(a.size=a.size.join("x"));var c=G(a).add("getid","1");return E("/thumb",c,b)};t("ee.data.getThumbId",yc);var zc=function(a){return rc+"/api/thumb?thumbid="+a.thumbid+"&token="+a.token};t("ee.data.makeThumbUrl",zc);var Ac=function(a,b){a=v(a);return E("/download",G(a),b)};t("ee.data.getDownloadId",Ac);var Bc=function(a){return rc+"/api/download?docid="+a.docid+"&token="+a.token};
t("ee.data.makeDownloadUrl",Bc);var Cc=function(a,b){a=v(a);return E("/table",G(a),b)};t("ee.data.getTableDownloadId",Cc);var Dc=function(a){return rc+"/api/table?docid="+a.docid+"&token="+a.token};t("ee.data.makeTableDownloadUrl",Dc);t("ee.data.createAsset",function(a,b,c,d){a={value:a};void 0!==b&&(a.id=b);a.force=c||!1;return E("/create",G(a),d)});t("ee.data.createFolder",function(a,b,c){return E("/createfolder",G({id:a,force:b||!1}),c)});
t("ee.data.newTaskId",function(a,b){var c={};ea(a)&&(c.count=a);return E("/newtaskid",G(c),b)});t("ee.data.getTaskStatus",function(a,b){if(p(a))a=[a];else if(!m(a))throw Error("Invalid task_id: expected a string or an array of strings.");return E("/taskstatus?q="+a.join(),null,b,"GET")});t("ee.data.getTaskList",function(a){return E("/tasklist",null,a,"GET")});t("ee.data.cancelTask",function(a,b){return Ec(a,"CANCEL",b)});
var Ec=function(a,b,c){if(p(a))a=[a];else if(!m(a))throw Error("Invalid task_id: expected a string or an array of strings.");var d;t:{for(d in uc)if(uc[d]==b){d=!0;break t}d=!1}if(!d)throw Error("Invalid action: "+b);return E("/updatetask",G({id:a,action:b}),c,"POST")};t("ee.data.updateTask",Ec);t("ee.data.prepareValue",function(a,b,c){b=v(b);b.tid=a;return E("/prepare",G(b),c)});t("ee.data.startProcessing",function(a,b,c){b=v(b);b.id=a;return E("/processingrequest",G(b),c)});
var E=function(a,b,c,d){function e(a,b,c){var d=!0,e,g;try{e=xa(b),g=e.data}catch(gb){d=!1}var fa=void 0;d&&q(e)?"error"in e&&"message"in e.error?fa=e.error.message:"data"in e||(fa="Malformed response: "+b):300<=a.status&&(fa="HTTP "+a.status+": "+(b||a.statusText));if(c)return c(g,fa),null;if(!fa)return g;throw Error(fa);}vc();d=d||"POST";null!=sc&&("GET"==d?(a+=-1!=a.indexOf("?")?"&":"?",a+="xsrfToken="+sc):(b||(b=new nc),b.add("xsrfToken",sc)));a=qc+a;b=b?b.toString():"";if(c)return ec(a,function(a){var b;
var d=a.target;try{b=d.a?d.a.responseText:""}catch(g){Qb(d.k,"Can not get responseText: "+g.message),b=""}return e(a.target,b,c)},d,b),null;var g=B();g.open(d,a,!1);g.setRequestHeader("Content-Type","application/x-www-form-urlencoded");g.send(b);return e(g,g.responseText,null)},G=function(a){var b=new nc,c;for(c in a)b.set(c,a[c]);return b};var Fc=function(){};var Gc=function(){this.r=-1};var Hc=function(){this.r=-1;this.r=64;this.f=Array(4);this.Pa=Array(this.r);this.X=this.L=0;this.reset()};u(Hc,Gc);Hc.prototype.reset=function(){this.f[0]=1732584193;this.f[1]=4023233417;this.f[2]=2562383102;this.f[3]=271733878;this.X=this.L=0};
var Ic=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.f[0];c=a.f[1];var e=a.f[2],g=a.f[3],f=0,f=b+(g^c&(e^g))+d[0]+3614090360&4294967295;b=c+(f<<7&4294967295|f>>>25);f=g+(e^b&(c^e))+d[1]+3905402710&4294967295;g=b+(f<<12&4294967295|f>>>20);f=e+(c^g&(b^c))+d[2]+606105819&4294967295;e=g+(f<<17&4294967295|f>>>15);f=c+(b^e&
(g^b))+d[3]+3250441966&4294967295;c=e+(f<<22&4294967295|f>>>10);f=b+(g^c&(e^g))+d[4]+4118548399&4294967295;b=c+(f<<7&4294967295|f>>>25);f=g+(e^b&(c^e))+d[5]+1200080426&4294967295;g=b+(f<<12&4294967295|f>>>20);f=e+(c^g&(b^c))+d[6]+2821735955&4294967295;e=g+(f<<17&4294967295|f>>>15);f=c+(b^e&(g^b))+d[7]+4249261313&4294967295;c=e+(f<<22&4294967295|f>>>10);f=b+(g^c&(e^g))+d[8]+1770035416&4294967295;b=c+(f<<7&4294967295|f>>>25);f=g+(e^b&(c^e))+d[9]+2336552879&4294967295;g=b+(f<<12&4294967295|f>>>20);f=
e+(c^g&(b^c))+d[10]+4294925233&4294967295;e=g+(f<<17&4294967295|f>>>15);f=c+(b^e&(g^b))+d[11]+2304563134&4294967295;c=e+(f<<22&4294967295|f>>>10);f=b+(g^c&(e^g))+d[12]+1804603682&4294967295;b=c+(f<<7&4294967295|f>>>25);f=g+(e^b&(c^e))+d[13]+4254626195&4294967295;g=b+(f<<12&4294967295|f>>>20);f=e+(c^g&(b^c))+d[14]+2792965006&4294967295;e=g+(f<<17&4294967295|f>>>15);f=c+(b^e&(g^b))+d[15]+1236535329&4294967295;c=e+(f<<22&4294967295|f>>>10);f=b+(e^g&(c^e))+d[1]+4129170786&4294967295;b=c+(f<<5&4294967295|
f>>>27);f=g+(c^e&(b^c))+d[6]+3225465664&4294967295;g=b+(f<<9&4294967295|f>>>23);f=e+(b^c&(g^b))+d[11]+643717713&4294967295;e=g+(f<<14&4294967295|f>>>18);f=c+(g^b&(e^g))+d[0]+3921069994&4294967295;c=e+(f<<20&4294967295|f>>>12);f=b+(e^g&(c^e))+d[5]+3593408605&4294967295;b=c+(f<<5&4294967295|f>>>27);f=g+(c^e&(b^c))+d[10]+38016083&4294967295;g=b+(f<<9&4294967295|f>>>23);f=e+(b^c&(g^b))+d[15]+3634488961&4294967295;e=g+(f<<14&4294967295|f>>>18);f=c+(g^b&(e^g))+d[4]+3889429448&4294967295;c=e+(f<<20&4294967295|
f>>>12);f=b+(e^g&(c^e))+d[9]+568446438&4294967295;b=c+(f<<5&4294967295|f>>>27);f=g+(c^e&(b^c))+d[14]+3275163606&4294967295;g=b+(f<<9&4294967295|f>>>23);f=e+(b^c&(g^b))+d[3]+4107603335&4294967295;e=g+(f<<14&4294967295|f>>>18);f=c+(g^b&(e^g))+d[8]+1163531501&4294967295;c=e+(f<<20&4294967295|f>>>12);f=b+(e^g&(c^e))+d[13]+2850285829&4294967295;b=c+(f<<5&4294967295|f>>>27);f=g+(c^e&(b^c))+d[2]+4243563512&4294967295;g=b+(f<<9&4294967295|f>>>23);f=e+(b^c&(g^b))+d[7]+1735328473&4294967295;e=g+(f<<14&4294967295|
f>>>18);f=c+(g^b&(e^g))+d[12]+2368359562&4294967295;c=e+(f<<20&4294967295|f>>>12);f=b+(c^e^g)+d[5]+4294588738&4294967295;b=c+(f<<4&4294967295|f>>>28);f=g+(b^c^e)+d[8]+2272392833&4294967295;g=b+(f<<11&4294967295|f>>>21);f=e+(g^b^c)+d[11]+1839030562&4294967295;e=g+(f<<16&4294967295|f>>>16);f=c+(e^g^b)+d[14]+4259657740&4294967295;c=e+(f<<23&4294967295|f>>>9);f=b+(c^e^g)+d[1]+2763975236&4294967295;b=c+(f<<4&4294967295|f>>>28);f=g+(b^c^e)+d[4]+1272893353&4294967295;g=b+(f<<11&4294967295|f>>>21);f=e+(g^
b^c)+d[7]+4139469664&4294967295;e=g+(f<<16&4294967295|f>>>16);f=c+(e^g^b)+d[10]+3200236656&4294967295;c=e+(f<<23&4294967295|f>>>9);f=b+(c^e^g)+d[13]+681279174&4294967295;b=c+(f<<4&4294967295|f>>>28);f=g+(b^c^e)+d[0]+3936430074&4294967295;g=b+(f<<11&4294967295|f>>>21);f=e+(g^b^c)+d[3]+3572445317&4294967295;e=g+(f<<16&4294967295|f>>>16);f=c+(e^g^b)+d[6]+76029189&4294967295;c=e+(f<<23&4294967295|f>>>9);f=b+(c^e^g)+d[9]+3654602809&4294967295;b=c+(f<<4&4294967295|f>>>28);f=g+(b^c^e)+d[12]+3873151461&4294967295;
g=b+(f<<11&4294967295|f>>>21);f=e+(g^b^c)+d[15]+530742520&4294967295;e=g+(f<<16&4294967295|f>>>16);f=c+(e^g^b)+d[2]+3299628645&4294967295;c=e+(f<<23&4294967295|f>>>9);f=b+(e^(c|~g))+d[0]+4096336452&4294967295;b=c+(f<<6&4294967295|f>>>26);f=g+(c^(b|~e))+d[7]+1126891415&4294967295;g=b+(f<<10&4294967295|f>>>22);f=e+(b^(g|~c))+d[14]+2878612391&4294967295;e=g+(f<<15&4294967295|f>>>17);f=c+(g^(e|~b))+d[5]+4237533241&4294967295;c=e+(f<<21&4294967295|f>>>11);f=b+(e^(c|~g))+d[12]+1700485571&4294967295;b=c+
(f<<6&4294967295|f>>>26);f=g+(c^(b|~e))+d[3]+2399980690&4294967295;g=b+(f<<10&4294967295|f>>>22);f=e+(b^(g|~c))+d[10]+4293915773&4294967295;e=g+(f<<15&4294967295|f>>>17);f=c+(g^(e|~b))+d[1]+2240044497&4294967295;c=e+(f<<21&4294967295|f>>>11);f=b+(e^(c|~g))+d[8]+1873313359&4294967295;b=c+(f<<6&4294967295|f>>>26);f=g+(c^(b|~e))+d[15]+4264355552&4294967295;g=b+(f<<10&4294967295|f>>>22);f=e+(b^(g|~c))+d[6]+2734768916&4294967295;e=g+(f<<15&4294967295|f>>>17);f=c+(g^(e|~b))+d[13]+1309151649&4294967295;
c=e+(f<<21&4294967295|f>>>11);f=b+(e^(c|~g))+d[4]+4149444226&4294967295;b=c+(f<<6&4294967295|f>>>26);f=g+(c^(b|~e))+d[11]+3174756917&4294967295;g=b+(f<<10&4294967295|f>>>22);f=e+(b^(g|~c))+d[2]+718787259&4294967295;e=g+(f<<15&4294967295|f>>>17);f=c+(g^(e|~b))+d[9]+3951481745&4294967295;a.f[0]=a.f[0]+b&4294967295;a.f[1]=a.f[1]+(e+(f<<21&4294967295|f>>>11))&4294967295;a.f[2]=a.f[2]+e&4294967295;a.f[3]=a.f[3]+g&4294967295};
Hc.prototype.update=function(a,b){l(b)||(b=a.length);for(var c=b-this.r,d=this.Pa,e=this.L,g=0;g<b;){if(0==e)for(;g<=c;)Ic(this,a,g),g+=this.r;if(p(a))for(;g<b;){if(d[e++]=a.charCodeAt(g++),e==this.r){Ic(this,d);e=0;break}}else for(;g<b;)if(d[e++]=a[g++],e==this.r){Ic(this,d);e=0;break}}this.L=e;this.X+=b};
var Kc=function(){var a=Jc,b=Array((56>a.L?a.r:2*a.r)-a.L);b[0]=128;for(var c=1;c<b.length-8;++c)b[c]=0;for(var d=8*a.X,c=b.length-8;c<b.length;++c)b[c]=d&255,d/=256;a.update(b);b=Array(16);for(c=d=0;4>c;++c)for(var e=0;32>e;e+=8)b[d++]=a.f[c]>>>e&255;return b};var Lc=function(a){this.U="__ee_hash__";this.ka=!1!==a;this.F=[];this.D={};this.la=[]};t("ee.Serializer",Lc);var Mc=new ya,Jc=new Hc,Oc=function(a,b){return Nc(new Lc(l(b)?b:!0),a)};t("ee.Serializer.encode",Oc);var Pc=function(a){return Mc.h(Oc(a))};t("ee.Serializer.toJSON",Pc);var Qc=function(a){a=Nc(new Lc(!1),a);return"JSON"in k?k.JSON.stringify(a,null," "):Mc.h(a)};t("ee.Serializer.toReadableJSON",Qc);
var Nc=function(a,b){var c=a.V(b);a.ka&&(c=q(c)&&"ValueRef"==c.type&&1==a.F.length?a.F[0][1]:{type:"CompoundValue",scope:a.F,value:c},a.F=[],Ta(a.la,r(function(a){delete a[this.U]},a)),a.la=[],a.D={});return c};
Lc.prototype.V=function(a){if(!l(a))throw Error("Can't encode an undefined value.");var b,c=q(a)?a[this.U]:null;if(this.ka&&null!=c&&this.D[c])return{type:"ValueRef",value:this.D[c]};if(null===a||"boolean"==typeof a||ea(a)||p(a))return a;if(q(a)&&"function"==typeof a.getFullYear)return{type:"Invocation",functionName:"Date",arguments:{value:Math.floor(a.getTime())}};if(a instanceof Fc){if(b=a.e(r(this.V,this)),!(m(b)||q(b)&&"ArgumentRef"!=b.type))return b}else if(m(a))b=Ua(a,function(a){return this.V(a)},
this);else if(q(a)&&!ga(a))b=oa(a,function(a){if(!ga(a))return this.V(a)},this),ra(b,this.U),b={type:"Dictionary",value:b};else throw Error("Can't encode object: "+a);if(this.ka){Jc.reset();Jc.update(Mc.h(b));var c=Kc().toString(),d;this.D[c]?d=this.D[c]:(d=String(this.F.length),this.F.push([d,b]),this.D[c]=d);a[this.U]=c;this.la.push(a);return{type:"ValueRef",value:d}}return b};var H=function(a,b,c){if(!(this instanceof H))return I(H,arguments);if(c&&(a||b))throw Error('When "opt_varName" is specified, "func" and "args" must be null.');if(a&&!b)throw Error('When "func" is specified, "args" must not be null.');this.b=a;this.c=b;this.d=c||null};u(H,Fc);t("ee.ComputedObject",H);H.prototype.j=function(a){return xc({json:this.h()},a)};t("ee.ComputedObject.prototype.getInfo",H.prototype.j);
H.prototype.e=function(a){if(null===this.b&&null===this.c)return{type:"ArgumentRef",value:this.d};var b={},c;for(c in this.c)l(this.c[c])&&(b[c]=a(this.c[c]));b={type:"Invocation",arguments:b};a=a(this.b);b[p(a)?"functionName":"function"]=a;return b};H.prototype.h=function(){return Pc(this)};t("ee.ComputedObject.prototype.serialize",H.prototype.h);H.prototype.toString=function(){return"ee."+this.name()+"("+Qc(this)+")"};t("ee.ComputedObject.prototype.toString",H.prototype.toString);
H.prototype.name=function(){return"ComputedObject"};var Rc=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.c=b.c;c.d=b.d;return c},I=function(a,b){function c(){return a.apply(this,b)}c.prototype=a.prototype;return new c};var J=function(){if(!(this instanceof J))return new J};u(J,Fc);t("ee.Function",J);var Sc=function(a){return a};J.prototype.call=function(a){return this.apply(Tc(this,Array.prototype.slice.call(arguments,0)))};t("ee.Function.prototype.call",J.prototype.call);J.prototype.apply=function(a){a=new H(this,Uc(this,a));return Sc(a,this.l().returns)};t("ee.Function.prototype.apply",J.prototype.apply);
var Uc=function(a,b){for(var c=a.l().args,d={},e={},g=0;g<c.length;g++){var f=c[g].name;if(f in b&&l(b[f]))d[f]=Sc(b[f],c[g].type);else if(!c[g].optional)throw Error("Required argument ("+f+") missing to function: "+a);e[f]=!0}var c=[],n;for(n in b)e[n]||c.push(n);if(0<c.length)throw Error("Unrecognized arguments ("+c+") to function: "+a);return d},Tc=function(a,b){var c=a.l().args;if(c.length<b.length)throw Error("Too many ("+b.length+") arguments to function: "+a);for(var d={},e=0;e<b.length;e++)d[c[e].name]=
b[e];return d};
J.prototype.toString=function(a,b){var c=this.l(),d=[];d.push(a||c.name);d.push("(");d.push(Ua(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 g=c.args[e];d.push(g.name);d.push(" (");d.push(g.type);g.optional&&d.push(", optional");d.push("): ");g.description?d.push(g.description):
d.push("Undocumented.")}}return d.join("")};J.prototype.h=function(){return Pc(this)};var Vc={},Wc=function(a){return a.prototype instanceof H?a.prototype.name.call(null):a==Number?"Number":a==String?"String":a==Array?"Array":a==Date?"Date":"Object"},Xc=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}},Yc=function(a){return ea(a)||
a instanceof H&&"Number"==a.name()},Zc=function(a){return p(a)||a instanceof H&&"String"==a.name()},$c=function(a){return q(a)&&!ga(a)?(a=Object.getPrototypeOf(a),null!==a&&null===Object.getPrototypeOf(a)):!1};var K=function(a,b){if(!l(b))return ad(a);if(!(this instanceof K))return I(K,arguments);this.G=sa(b);this.G.name=a};u(K,J);t("ee.ApiFunction",K);var L=function(a,b){return J.prototype.call.apply(ad(a),Array.prototype.slice.call(arguments,1))};t("ee.ApiFunction._call",L);var bd=function(a,b){return ad(a).apply(b)};t("ee.ApiFunction._apply",bd);K.prototype.e=function(){return this.G.name};K.prototype.l=function(){return this.G};
var ma=null,cd={},ed=function(){dd();return oa(ma,function(a){return a.l()})},fd=function(){dd();return na(function(a,b){return!cd[b]})},ad=function(a){var b=gd(a);if(!b)throw Error("Unknown built-in function name: "+a);return b};t("ee.ApiFunction.lookup",ad);
var gd=function(a){dd();return ma[a]||null},dd=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 K(b,a)}),a&&a())};a?E("/algorithms",null,c,"GET"):c(E("/algorithms",null,void 0,"GET"))}},M=function(a,b,c,d){dd();var e=d||"";la(ma,function(d,f){var n=f.split(".");if(2==n.length&&n[0]==b){var F=e+n[1],D=d.l();cd[f]=!0;var A=!1;D.args.length&&
(n=D.args[0].type,A="Object"!=n&&Xc(n,c));n=A?a.prototype:a;F in n||(n[F]=function(a){var b=Array.prototype.slice.call(arguments,0),c=!1;if(1==b.length&&$c(b[0])){var e=D.args;A&&(e=e.slice(1));e.length&&(c=!((1==e.length||e[1].optional)&&"Dictionary"==e[0].type))}if(c){if(b=v(b[0]),A){c=D.args[0].name;if(c in b)throw Error("Named args for "+F+" can't contain keyword "+c);b[c]=this}}else b=Tc(d,A?[this].concat(b):b);return d.apply(b)},n[F].toString=r(d.toString,d,F,A),n[F].signature=D)}})},N=function(a){var b=
function(a){for(var b in a)ga(a[b])&&a[b].signature&&delete a[b]};b(a);b(a.prototype)};var O=function(a,b,c){H.call(this,a,b,c);hd()};u(O,H);t("ee.Element",O);var id=!1,hd=function(){id||(M(O,"Element","Element"),id=!0)};O.prototype.name=function(){return"Element"};
O.prototype.set=function(a){var b;if(1>=arguments.length){var c=arguments[0];if(b=$c(c))t:{b=qa(c);var d=["properties"];if(da(b)&&da(d)&&b.length==d.length){for(var e=b.length,g=0;g<e;g++)if(b[g]!==d[g]){b=!1;break t}b=!0}else b=!1}b&&q(c.properties)&&(c=c.properties);if($c(c)){b=this;for(var f in c)d=c[f],b=L("Element.set",b,f,d)}else if(c instanceof H&&gd("Element.setMulti"))b=L("Element.setMulti",this,c);else throw Error("When Element.set() is passed one argument, it must be a dictionary.");}else{if(0!=
arguments.length%2)throw Error("When Element.set() is passed multiple arguments, there must be an even number of them.");b=this;for(c=0;c<arguments.length;c+=2)f=arguments[c],d=arguments[c+1],b=L("Element.set",b,f,d)}return Rc(this,b)};t("ee.Element.prototype.set",O.prototype.set);var P=function(a){if(!(this instanceof P))return I(P,arguments);if(a instanceof P)return a;jd();if(m(a)){if(0==a.length)throw Error("Empty list specified for ee.Filter().");if(1==a.length)return new P(a[0]);H.call(this,new K("Filter.and"),{filters:a});this.K=a}else if(a instanceof H)H.call(this,a.b,a.c,a.d),this.K=[a];else{if(l(a))throw Error("Invalid argument specified for ee.Filter(): "+a);H.call(this,null,null);this.K=[]}};u(P,H);t("ee.Filter",P);
var kd=!1,jd=function(){kd||(M(P,"Filter","Filter"),kd=!0)},ld={equals:"equals",less_than:"lessThan",greater_than:"greaterThan",contains:"stringContains",starts_with:"stringStartsWith",ends_with:"stringEndsWith"};P.prototype.length=function(){return this.K.length};P.prototype.length=P.prototype.length;var Q=function(a,b){var c=a.K.slice(0);b instanceof P?Za(c,b.K):b instanceof Array?Za(c,b):c.push(b);return new P(c)};P.prototype.v=function(){return L("Filter.not",this)};P.prototype.not=P.prototype.v;
var md=function(a,b,c){b=b.toLowerCase();var d=!1;0==b.lastIndexOf("not_",0)&&(d=!0,b=b.substring(4));if(!(b in ld))throw Error("Unknown filtering operator: "+b);a=L("Filter."+ld[b],a,c);return d?a.v():a};P.metadata=md;var nd=function(a,b){return L("Filter.equals",a,b)};P.eq=nd;var od=function(a,b){return nd(a,b).v()};P.neq=od;var pd=function(a,b){return L("Filter.lessThan",a,b)};P.lt=pd;var qd=function(a,b){return pd(a,b).v()};P.gte=qd;var rd=function(a,b){return L("Filter.greaterThan",a,b)};
P.gt=rd;var sd=function(a,b){return rd(a,b).v()};P.lte=sd;var td=function(a,b){return L("Filter.stringContains",a,b)};P.contains=td;var ud=function(a,b){return td(a,b).v()};P.not_contains=ud;var vd=function(a,b){return L("Filter.stringStartsWith",a,b)};P.starts_with=vd;var wd=function(a,b){return vd(a,b).v()};P.not_starts_with=wd;var xd=function(a,b){return L("Filter.stringEndsWith",a,b)};P.ends_with=xd;var yd=function(a,b){return xd(a,b).v()};P.not_ends_with=yd;
var zd=function(a){return L("Filter.and",Array.prototype.slice.call(arguments))};P.and=zd;P.or=function(a){return L("Filter.or",Array.prototype.slice.call(arguments))};var Ad=function(a,b){var c=L("DateRange",a,b);return bd("Filter.dateRangeContains",{leftValue:c,rightField:"system:time_start"})};P.date=Ad;var Bd=function(a,b,c,d){return bd("Filter.listContains",{leftField:c,rightValue:d,rightField:a,leftValue:b})};P.inList=Bd;
var Cd=function(a,b){return bd("Filter.intersects",{leftField:".all",rightValue:L("Feature",a),maxError:b})};P.bounds=Cd;P.prototype.lb=function(){return Q(this,nd.apply(null,[].slice.call(arguments)))};P.prototype.eq=P.prototype.lb;P.prototype.xb=function(){return Q(this,od.apply(null,[].slice.call(arguments)))};P.prototype.neq=P.prototype.xb;P.prototype.vb=function(){return Q(this,pd.apply(null,[].slice.call(arguments)))};P.prototype.lt=P.prototype.vb;
P.prototype.sb=function(){return Q(this,qd.apply(null,[].slice.call(arguments)))};P.prototype.gte=P.prototype.sb;P.prototype.rb=function(){return Q(this,rd.apply(null,[].slice.call(arguments)))};P.prototype.gt=P.prototype.rb;P.prototype.wb=function(){return Q(this,sd.apply(null,[].slice.call(arguments)))};P.prototype.lte=P.prototype.wb;P.prototype.contains=function(){return Q(this,td.apply(null,[].slice.call(arguments)))};P.prototype.contains=P.prototype.contains;
P.prototype.yb=function(){return Q(this,ud.apply(null,[].slice.call(arguments)))};P.prototype.not_contains=P.prototype.yb;P.prototype.Bb=function(){return Q(this,vd.apply(null,[].slice.call(arguments)))};P.prototype.starts_with=P.prototype.Bb;P.prototype.Ab=function(){return Q(this,wd.apply(null,[].slice.call(arguments)))};P.prototype.not_starts_with=P.prototype.Ab;P.prototype.kb=function(){return Q(this,xd.apply(null,[].slice.call(arguments)))};P.prototype.ends_with=P.prototype.kb;
P.prototype.zb=function(){return Q(this,yd.apply(null,[].slice.call(arguments)))};P.prototype.not_ends_with=P.prototype.zb;P.prototype.ib=function(){return Q(this,zd.apply(null,[].slice.call(arguments)))};P.prototype.and=P.prototype.ib;P.prototype.jb=function(){return Q(this,Ad.apply(null,[].slice.call(arguments)))};P.prototype.date=P.prototype.jb;P.prototype.tb=function(){return Q(this,Bd.apply(null,[].slice.call(arguments)))};P.prototype.inList=P.prototype.tb;
P.prototype.bounds=function(){return Q(this,Cd.apply(null,[].slice.call(arguments)))};P.prototype.bounds=P.prototype.bounds;P.prototype.name=function(){return"Filter"};var R=function(a,b,c){O.call(this,a,b,c);Dd()};u(R,O);t("ee.Collection",R);var Ed=!1,Dd=function(){Ed||(M(R,"Collection","Collection"),M(R,"AggregateFeatureCollection","Collection","aggregate_"),Ed=!0)};R.prototype.filter=function(a){if(!a)throw Error("Empty filters.");return Rc(this,L("Collection.filter",this,a))};t("ee.Collection.prototype.filter",R.prototype.filter);R.prototype.pb=function(a,b,c){return this.filter(md(a,b,c))};t("ee.Collection.prototype.filterMetadata",R.prototype.pb);
R.prototype.nb=function(a){return this.filter(Cd(a))};t("ee.Collection.prototype.filterBounds",R.prototype.nb);R.prototype.ob=function(a,b){return this.filter(Ad(a,b))};t("ee.Collection.prototype.filterDate",R.prototype.ob);R.prototype.limit=function(a,b,c){return Rc(this,L("Collection.limit",this,a,b,c))};t("ee.Collection.prototype.limit",R.prototype.limit);R.prototype.sort=function(a,b){return Rc(this,L("Collection.limit",this,void 0,a,b))};t("ee.Collection.prototype.sort",R.prototype.sort);
R.prototype.name=function(){return"Collection"};R.prototype.elementType=function(){return O};R.prototype.map=function(a){var b=this.elementType();return Rc(this,L("Collection.map",this,function(c){return a(new b(c))}))};t("ee.Collection.prototype.map",R.prototype.map);R.prototype.ub=function(a,b){var c=l(b)?b:null,d=this.elementType();return L("Collection.iterate",this,function(b,c){return a(new d(b),c)},c)};t("ee.Collection.prototype.iterate",R.prototype.ub);var S=function(a){if(!(this instanceof S))return I(S,arguments);if(a instanceof S)return a;Fd();if(ea(a))H.call(this,null,null),this.ja=a;else if(a instanceof H)H.call(this,a.b,a.c,a.d),this.ja=null;else throw Error("Invalid argument specified for ee.Number(): "+a);};u(S,H);t("ee.Number",S);var Gd=!1,Fd=function(){Gd||(M(S,"Number","Number"),Gd=!0)};S.prototype.e=function(a){return ea(this.ja)?this.ja:S.n.e.call(this,a)};S.prototype.name=function(){return"Number"};var T=function(a){if(!(this instanceof T))return I(T,arguments);if(a instanceof T)return a;Hd();if(p(a))H.call(this,null,null),this.ga=a;else if(a instanceof H)this.ga=null,a.b&&"String"==a.b.l().returns?H.call(this,a.b,a.c,a.d):H.call(this,new K("String"),{input:a},null);else throw Error("Invalid argument specified for ee.String(): "+a);};u(T,H);t("ee.String",T);var Id=!1,Hd=function(){Id||(M(T,"String","String"),Id=!0)};T.prototype.e=function(a){return p(this.ga)?this.ga:T.n.e.call(this,a)};
T.prototype.name=function(){return"String"};var Jd=function(a,b){if(!(this instanceof Jd))return I(Jd,arguments);for(var c=[],d=a.args,e=0;e<d.length;e++){var g=d[e],f=g.type;c.push(Kd(f in Vc?Vc[f]:null,g.name))}if(!l(b.apply(null,c)))throw Error("User-defined methods must return a value.");this.G=Ld(a,c,b);this.bb=b.apply(null,c)};u(Jd,J);t("ee.CustomFunction",Jd);Jd.prototype.e=function(a){return{type:"Function",argumentNames:Ua(this.G.args,function(a){return a.name}),body:a(this.bb)}};Jd.prototype.l=function(){return this.G};
var Kd=function(a,b){a=a||Object;if(!(a.prototype instanceof H))if(a&&a!=Object)if(a==String)a=T;else if(a==Number)a=S;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=H;var c=function(){};c.prototype=a.prototype;c=new c;c.b=null;c.c=null;c.d=b;return c},Md=function(a,b){var c=Ua(b,function(a){return{name:null,type:p(a)?a:Wc(a)}}),c={name:"",returns:p("Object")?"Object":Wc("Object"),args:c};return new Jd(c,a)},Ld=function(a,b,c){for(var d=
[],e=0;e<b.length;e++)null===b[e].d&&d.push(e);if(0==d.length)return a;var g=function(a){var b=0;q(a)&&!ga(a)&&("Function"==a.type&&b++,la(a,function(a){b+=g(a)}));return b},e=Oc(c.apply(null,b));c="_MAPPING_VAR_"+g(e)+"_";for(e=0;e<d.length;e++){var f=d[e],n=c+e;b[f].d=n;a.args[f].name=n}return a};var Nd=function(a,b){if(!(this instanceof Nd))return I(Nd,arguments);if(a instanceof Nd)return a;Od();var c=new K("Date"),d={},e=null;if(Zc(a)){if(d.value=a,b)if(Zc(b))d.timeZone=b;else throw Error("Invalid argument specified for ee.Date(..., opt_tz): "+b);}else if(Yc(a))d.value=a;else if(q(a)&&"function"==typeof a.getFullYear)d.value=Math.floor(a.getTime());else if(a instanceof H)a.b&&"Date"==a.b.l().returns?(c=a.b,d=a.c,e=a.d):d.value=a;else throw Error("Invalid argument specified for ee.Date(): "+
a);H.call(this,c,d,e)};u(Nd,H);t("ee.Date",Nd);var Pd=!1,Od=function(){Pd||(M(Nd,"Date","Date"),Pd=!0)};Nd.prototype.name=function(){return"Date"};var U=function(a,b,c){if(!(this instanceof U))return I(U,arguments);Qd();var d=null!=b||null!=c;if(a instanceof H&&!(a instanceof U&&a.J)){if(d)throw Error("Setting the CRS or geodesic on a computed Geometry is not suported. Use Geometry.transform().");H.call(this,a.b,a.c,a.d)}else{a instanceof U&&(a=a.e());if(3<arguments.length)throw Error("The Geometry constructor takes at most 3 arguments ("+arguments.length+" given)");if(!Rd(a))throw Error("Invalid GeoJSON geometry: "+JSON.stringify(a));H.call(this,
null,null);this.J=a.type;this.Ma=a.coordinates||null;this.Na=a.geometries||null;if(null!=b)this.fa=b;else if("crs"in a)if(q(a.crs)&&"name"==a.crs.type&&q(a.crs.properties)&&p(a.crs.properties.name))this.fa=a.crs.properties.name;else throw Error("Invalid CRS declaration in GeoJSON: "+(new ya).h(a.crs));this.ea=c;!l(c)&&"geodesic"in a&&(this.ea=Boolean(a.geodesic))}};u(U,H);t("ee.Geometry",U);
var Sd=!1,Qd=function(){Sd||(M(U,"Geometry","Geometry"),Sd=!0)},Td=function(a,b){if(!(this instanceof Td))return Ud(Td,arguments);if(2<arguments.length)throw Error("The Geometry.Point constructor takes at most 2 arguments ("+arguments.length+" given)");if(1==arguments.length&&m(arguments[0])&&2==arguments[0].length){var c=arguments[0];a=c[0];b=c[1]}U.call(this,{type:"Point",coordinates:[a,b]})};u(Td,U);U.Point=Td;
var Vd=function(a){if(!(this instanceof Vd))return Ud(Vd,arguments);U.call(this,{type:"MultiPoint",coordinates:Wd(a,2,arguments)})};u(Vd,U);U.MultiPoint=Vd;var Xd=function(a,b,c,d){if(!(this instanceof Xd))return I(Xd,arguments);if(4<arguments.length)throw Error("The Geometry.Rectangle constructor takes at most 4 arguments ("+arguments.length+" given)");if(m(a)){var e=a;a=e[0];b=e[1];c=e[2];d=e[3]}U.call(this,{type:"Polygon",coordinates:[[[a,d],[a,b],[c,b],[c,d]]]})};u(Xd,U);U.Rectangle=Xd;
var Yd=function(a){if(!(this instanceof Yd))return Ud(Yd,arguments);U.call(this,{type:"LineString",coordinates:Wd(a,2,arguments)})};u(Yd,U);U.LineString=Yd;var Zd=function(a){if(!(this instanceof Zd))return Ud(Zd,arguments);U.call(this,{type:"LinearRing",coordinates:Wd(a,2,arguments)})};u(Zd,U);U.LinearRing=Zd;var $d=function(a){if(!(this instanceof $d))return Ud($d,arguments);U.call(this,{type:"MultiLineString",coordinates:Wd(a,3,arguments)})};u($d,U);U.MultiLineString=$d;
var ae=function(a){if(!(this instanceof ae))return Ud(ae,arguments);U.call(this,{type:"Polygon",coordinates:Wd(a,3,arguments)})};u(ae,U);U.Polygon=ae;var be=function(a){if(!(this instanceof be))return Ud(be,arguments);U.call(this,{type:"MultiPolygon",coordinates:Wd(a,4,arguments)})};u(be,U);U.MultiPolygon=be;
U.prototype.e=function(a){if(!this.J){if(!a)throw Error("Must specify an encode function when encoding a computed geometry.");return H.prototype.e.call(this,a)}a={type:this.J};"GeometryCollection"==this.J?a.geometries=this.Na:a.coordinates=this.Ma;null!=this.fa&&(a.crs={type:"name",properties:{name:this.fa}});null!=this.ea&&(a.geodesic=this.ea);return a};U.prototype.Aa=function(){if(this.b)throw Error("Can't convert a computed Geometry to GeoJSON. Use getInfo() instead.");return this.e()};
U.prototype.toGeoJSON=U.prototype.Aa;U.prototype.Ka=function(){if(this.b)throw Error("Can't convert a computed Geometry to GeoJSON. Use getInfo() instead.");return(new ya).h(this.Aa())};U.prototype.toGeoJSONString=U.prototype.Ka;U.prototype.type=function(){if(this.b)throw Error("Can't get the type of a computed Geometry to GeoJSON. Use getInfo() instead.");return this.J};U.prototype.type=U.prototype.type;U.prototype.h=function(){return Pc(this)};U.prototype.serialize=U.prototype.h;
U.prototype.toString=function(){return"ee.Geometry("+this.Ka()+")"};
var Rd=function(a){var b=a.type;if("GeometryCollection"==b){b=a.geometries;if(!m(b))return!1;for(a=0;a<b.length;a++)if(!Rd(b[a]))return!1;return!0}a=ce(a.coordinates);return"Point"==b&&1==a||"MultiPoint"==b&&2==a||"LineString"==b&&2==a||"LinearRing"==b&&2==a||"MultiLineString"==b&&3==a||"Polygon"==b&&3==a||"MultiPolygon"==b&&4==a},ce=function(a){if(!m(a))return-1;if(m(a[0])){for(var b=ce(a[0]),c=1;c<a.length;c++)if(ce(a[c])!=b)return-1;return b+1}for(c=0;c<a.length;c++)if(!ea(a[c]))return-1;return 0==
a.length%2?1:-1},Wd=function(a,b,c){if(2>b||4<b)throw Error("Unexpected nesting level.");if(!m(a)&&c&&(a=Array.prototype.slice.call(c),"number"==typeof a[0])){if(0!=a.length%2)throw Error("Invalid number of coordinates: "+a.length);c=[];for(var d=0;d<a.length;d+=2)c.push([a[d],a[d+1]]);a=c}c=a;for(d=0;m(c);)c=c[0],d++;for(;d<b;)a=[a],d++;if(ce(a)!=b)throw Error("Invalid geometry");return a},Ud=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};U.prototype.name=function(){return"Geometry"};t("ee.Deserializer",function(){});t("ee.Deserializer.fromJSON",function(a){return de(wa(a))});var de=function(a){var b={};if(q(a)&&"CompoundValue"==a.type){for(var c=a.scope,d=0;d<c.length;d++){var e=c[d][0],g=c[d][1];if(e in b)throw Error('Duplicate scope key "'+e+'" in scope #'+d+".");b[e]=fe(g,b)}a=a.value}return fe(a,b)};t("ee.Deserializer.decode",de);
var fe=function(a,b){if(null===a||ea(a)||"boolean"==typeof a||p(a))return a;if(m(a))return Ua(a,function(a){return fe(a,b)});if(!q(a)||ga(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 Kd(Object,c);case "Date":c=a.value;if(!ea(c))throw Error("Invalid date value: "+c);return new Nd(c/1E3);case "Bytes":return c=
new Fc,c.e=function(){return a},c;case "Invocation":var c="functionName"in a?ad(a.functionName):fe(a["function"],b),d=oa(a.arguments,function(a){return fe(a,b)});if(c instanceof J)return c.apply(d);if(c instanceof H)return new H(c,d);throw Error("Invalid function value: "+a["function"]);case "Dictionary":return oa(a.value,function(a){return fe(a,b)});case "Function":var e=fe(a.body,b),c={name:"",args:Ua(a.argumentNames,function(a){return{name:a,type:"Object",optional:!1}}),returns:"Object"};return new Jd(c,
function(){return e});case "Point":case "MultiPoint":case "LineString":case "MultiLineString":case "Polygon":case "MultiPolygon":case "LinearRing":case "GeometryCollection":return new U(a);case "CompoundValue":throw Error("Nested CompoundValues are disallowed.");default:throw Error("Unknown encoded object type: "+c);}};var ge=function(a){if(!(this instanceof ge))return I(ge,arguments);if(a instanceof ge)return a;he();if($c(a))H.call(this,null,null),this.ha=a;else if(a instanceof H)H.call(this,a.b,a.c,a.d),this.ha=null;else throw Error("Invalid argument specified for ee.Dictionary(): "+a);};u(ge,H);t("ee.Dictionary",ge);var ie=!1,he=function(){ie||(M(ge,"Dictionary","Dictionary"),ie=!0)};ge.prototype.e=function(a){return null===this.ha?ge.n.e.call(this,a):a(this.ha)};ge.prototype.name=function(){return"Dictionary"};var V=function(a,b){if(!(this instanceof V))return I(V,arguments);if(a instanceof V){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)");je();if(a instanceof U||null===a)O.call(this,new K("Feature"),{geometry:a,metadata:b||null});else if(a instanceof H)O.call(this,a.b,a.c,a.d);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=v(c);c["system:index"]=a.id}O.call(this,new K("Feature"),{geometry:new U(a.geometry),metadata:c})}else O.call(this,new K("Feature"),{geometry:new U(a),metadata:b||null})};u(V,O);t("ee.Feature",V);var ke=!1,je=function(){ke||(M(V,"Feature","Feature"),ke=!0)};V.prototype.j=function(a){return V.n.j.call(this,a)};V.prototype.getInfo=V.prototype.j;V.prototype.getMap=function(a,b){return L("Collection",[this]).getMap(a,b)};
V.prototype.getMap=V.prototype.getMap;V.Point=function(a,b){return Td.apply(null,arguments)};V.MultiPoint=function(a){return Vd.apply(null,arguments)};V.Rectangle=function(a,b,c,d){return new Xd(a,b,c,d)};V.LineString=function(a){return Yd.apply(null,arguments)};V.LinearRing=function(a){return Zd.apply(null,arguments)};V.MultiLine=function(a){return $d.apply(null,arguments)};V.Polygon=function(a){return ae.apply(null,arguments)};V.MultiPolygon=function(a){return be.apply(null,arguments)};
V.prototype.name=function(){return"Feature"};var W=function(a){if(!(this instanceof W))return I(W,arguments);if(a instanceof W)return a;le();if(m(a))H.call(this,null,null),this.ia=a;else if(a instanceof H)H.call(this,a.b,a.c,a.d),this.ia=null;else throw Error("Invalid argument specified for ee.List(): "+a);};u(W,H);t("ee.List",W);var me=!1,le=function(){me||(M(W,"List","List"),me=!0)};W.prototype.e=function(a){return m(this.ia)?Ua(this.ia,function(b){return a(b)}):W.n.e.call(this,a)};W.prototype.name=function(){return"List"};var X=function(a,b){if(!(this instanceof X))return I(X,arguments);if(a instanceof X)return a;if(2<arguments.length)throw Error("The FeatureCollection constructor takes at most 2 arguments ("+arguments.length+" given)");oe();a instanceof U&&(a=new V(a));a instanceof V&&(a=[a]);if(Yc(a)||Zc(a)){var c={tableId:a};b&&(c.geometryColumn=b);R.call(this,new K("Collection.loadTable"),c)}else if(m(a))R.call(this,new K("Collection"),{features:Ua(a,function(a){return new V(a)})});else if(a instanceof W)R.call(this,
new K("Collection"),{features:a});else if(a instanceof H)R.call(this,a.b,a.c,a.d);else throw Error("Unrecognized argument type to convert to a FeatureCollection: "+a);};u(X,R);t("ee.FeatureCollection",X);var pe=!1,oe=function(){pe||(M(X,"FeatureCollection","FeatureCollection"),pe=!0)};X.prototype.getMap=function(a,b){var c=bd("Collection.draw",{collection:this,color:(a||{}).color||"000000"});if(b)c.getMap(null,b);else return c.getMap()};X.prototype.getMap=X.prototype.getMap;
X.prototype.j=function(a){return X.n.j.call(this,a)};X.prototype.getInfo=X.prototype.j;X.prototype.ua=function(a,b,c,d){var e={};e.table=this.h();a&&(e.format=a.toUpperCase());c&&(e.filename=c);b&&(e.selectors=b);if(d)Cc(e,function(a,b){a?d(Dc(a)):d(null,b)});else return Dc(Cc(e))};X.prototype.getDownloadURL=X.prototype.ua;X.prototype.select=function(a,b){var c=arguments;return this.map(function(a){return a.select.apply(a,c)})};X.prototype.select=X.prototype.select;X.prototype.name=function(){return"FeatureCollection"};
X.prototype.elementType=function(){return V};var Y=function(a){if(!(this instanceof Y))return I(Y,arguments);if(a instanceof Y)return a;qe();var b=arguments.length;if(0==b||1==b&&!l(a))O.call(this,new K("Image.mask"),{image:new Y(0),mask:new Y(0)});else if(1==b)if(Yc(a))O.call(this,new K("Image.constant"),{value:a});else if(Zc(a))O.call(this,new K("Image.load"),{id:a});else{if(m(a))return re(Ua(a,function(a){return new Y(a)}));if(a instanceof H)"Array"==a.name()?O.call(this,new K("Image.constant"),{value:a}):O.call(this,a.b,a.c,a.d);else throw Error("Unrecognized argument type to convert to an Image: "+
a);}else if(2==b){var b=arguments[0],c=arguments[1];if(Zc(b)&&Yc(c))O.call(this,new K("Image.load"),{id:b,version:c});else throw Error("Unrecognized argument types to convert to an Image: "+arguments);}else throw Error("The Image constructor takes at most 2 arguments ("+b+" given)");};u(Y,O);t("ee.Image",Y);var se=!1,qe=function(){se||(M(Y,"Image","Image"),M(Y,"Window","Image","focal_"),se=!0)};Y.prototype.j=function(a){return Y.n.j.call(this,a)};Y.prototype.getInfo=Y.prototype.j;
Y.prototype.getMap=function(a,b){var c=a?v(a):{};c.image=this.h();if(b)wc(c,r(function(a,c){a&&(a.image=this);b(a,c)},this));else return c=wc(c),c.image=this,c};Y.prototype.getMap=Y.prototype.getMap;Y.prototype.ua=function(a,b){var c=a?v(a):{};c.image=this.h();if(b)Ac(c,function(a,c){a?b(Bc(a)):b(null,c)});else return Bc(Ac(c))};Y.prototype.getDownloadURL=Y.prototype.ua;Y.prototype.qb=function(a){a=a?v(a):{};a.image=this.h();return zc(yc(a))};Y.prototype.getThumbURL=Y.prototype.qb;
Y.rgb=function(a,b,c){return re([a,b,c],["vis-red","vis-green","vis-blue"])};Y.cat=function(a){return re(Array.prototype.slice.call(arguments),null)};var re=function(a,b){if(0==a.length)throw Error("Can't combine 0 images.");for(var c=new Y(a[0]),d=1;d<a.length;d++)c=L("Image.addBands",c,a[d]);b&&(c=c.select([".*"],b));return c};
Y.prototype.select=function(a,b){l(a)||(a=[]);var c={input:this,bandSelectors:a};if(Zc(a)||Yc(a)){a=Array.prototype.slice.call(arguments);for(var d=0;d<a.length;d++)if(!(Zc(a[d])||Yc(a[d])||a[d]instanceof H))throw Error("Illegal argument to select(): "+a[d]);c.bandSelectors=a}else b&&(c.newNames=b);return bd("Image.select",c)};Y.prototype.select=Y.prototype.select;
Y.prototype.mb=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 Y(b[e]);var g=L("Image.parseExpression",a,"DEFAULT_EXPRESSION_IMAGE",c);e=new J;e.e=function(a){return g.e(a)};e.l=function(){return{name:"",args:Ua(c,function(a){return{name:a,type:"Image",optional:!1}},this),returns:"Image"}};return e.apply(d)};Y.prototype.expression=Y.prototype.mb;
Y.prototype.clip=function(a){try{a=new U(a)}catch(b){}return L("Image.clip",this,a)};Y.prototype.clip=Y.prototype.clip;Y.prototype.name=function(){return"Image"};var Z=function(a){if(!(this instanceof Z))return I(Z,arguments);if(a instanceof Z)return a;if(1!=arguments.length)throw Error("The ImageCollection constructor takes exactly 1 argument ("+arguments.length+" given)");te();a instanceof Y&&(a=[a]);if(Zc(a))R.call(this,new K("ImageCollection.load"),{id:a});else if(m(a))R.call(this,new K("ImageCollection.fromImages"),{images:Ua(a,function(a){return new Y(a)})});else if(a instanceof H)R.call(this,a.b,a.c,a.d);else throw Error("Unrecognized argument type to convert to an ImageCollection: "+
a);};u(Z,R);t("ee.ImageCollection",Z);var ue=!1,te=function(){ue||(M(Z,"ImageCollection","ImageCollection"),M(Z,"reduce","ImageCollection"),ue=!0)};Z.prototype.getMap=function(a,b){var c=L("ImageCollection.mosaic",this);if(b)c.getMap(a,b);else return c.getMap(a)};Z.prototype.getMap=Z.prototype.getMap;Z.prototype.j=function(a){return Z.n.j.call(this,a)};Z.prototype.getInfo=Z.prototype.j;Z.prototype.select=function(a,b){var c=arguments;return this.map(function(a){return a.select.apply(a,c)})};
Z.prototype.select=Z.prototype.select;Z.prototype.name=function(){return"ImageCollection"};Z.prototype.elementType=function(){return Y};t("ee.initialize",function(a,b,c,d,e){if("ready"!=ve||a||b){var g=null!=c;if(d)if(g)we.push(d);else throw Error("Can't pass an error callback without a success callback.");if("loading"==ve&&g)xe.push(c);else if(ve="loading",vc(a,b,e),g)xe.push(c),dd(ye,ze);else try{dd(),ye()}catch(f){throw ze(f),f;}}else c&&c()});
t("ee.reset",function(){ve="not_ready";sc=rc=qc=null;tc=!1;ma=null;cd={};N(Nd);Pd=!1;N(ge);ie=!1;N(O);id=!1;N(Y);se=!1;N(V);ke=!1;N(R);Ed=!1;N(Z);ue=!1;N(X);pe=!1;N(P);kd=!1;N(U);Sd=!1;N(W);me=!1;N(S);Gd=!1;N(T);Id=!1;for(var a=k.ee,b=0;b<Ae.length;b++){var c=Ae[b];N(a[c]);delete a[c]}Ae=[];Vc=a;var a=Be,d;for(d in a)delete a[d]});t("ee.InitState",{Eb:"not_ready",LOADING:"loading",Fb:"ready"});t("ee.InitState.NOT_READY","not_ready");t("ee.InitState.LOADING","loading");t("ee.InitState.READY","ready");
var ve="not_ready",xe=[],we=[];t("ee.TILE_SIZE",256);var Ae=[],Be={};t("ee.Algorithms",Be);t("ee.call",function(a,b){p(a)&&(a=new K(a));return J.prototype.call.apply(a,Array.prototype.slice.call(arguments,1))});t("ee.apply",function(a,b){p(a)&&(a=new K(a));return a.apply(b)});
var ye=function(){if("loading"==ve){try{Od();he();hd();qe();je();Dd();te();oe();jd();Qd();le();Fd();Hd();var a=ed(),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 g=k.ee,f;for(f in b)f in c&&!(f in g)&&(g[f]=Ce(f),Ae.push(f),a[f]?(g[f].signature=a[f],g[f].signature.isConstructor=!0,cd[f]=!0):g[f].signature={});Vc=g;De()}catch(n){ze(n);return}ve="ready";for(we=[];0<xe.length;)xe.shift()()}},ze=function(a){if("loading"==
ve)for(ve="not_ready",xe=[];0<we.length;)we.shift()(a)},De=function(){var a=fd();qa(a).sort().forEach(function(b){var c=a[b],d=c.l();if(!d.hidden){b=b.split(".");var e=Be;for(e.signature={};1<b.length;){var g=b[0];g in e||(e[g]={signature:{}});e=e[g];b=$a(b,1)}g=r(c.call,c);g.signature=d;g.toString=r(c.toString,c);e[b[0]]=g}})},Ce=function(a){var b=function(b){var d=k.ee[a],e=Array.prototype.slice.call(arguments),g=1==e.length;if(g&&e[0]instanceof d)return e[0];if(!(this instanceof d))return I(d,
e);var d=gd(a),f=!(e[0]instanceof H),n=!1;d&&(g?f?n=!0:e[0].b!=d&&(n=!0):n=!0);if(n)H.call(this,d,Uc(d,Tc(d,e)));else{if(!g)throw Error("Too many arguments for ee."+a+"(): "+e);if(f)throw Error("Invalid argument for ee."+a+"(): "+e+". Must be a ComputedObject.");e=e[0];H.call(this,e.b,e.c,e.d)}};u(b,H);b.prototype.name=function(){return a};M(b,a,a);return b},Sc=function(a,b){if(null===a)return null;if(l(a)){var c=k.ee;switch(b){case "Image":return new Y(a);case "Feature":return a instanceof R?L("Feature",
L("Collection.geometry",a)):new V(a);case "Element":if(a instanceof O)return a;if(a instanceof H)return new O(a.b,a.c,a.d);throw Error("Cannot convert "+a+" to Element.");case "Geometry":return a instanceof X?L("Collection.geometry",a):new U(a);case "FeatureCollection":case "Collection":return a instanceof R?a:new X(a);case "ImageCollection":return new Z(a);case "Filter":return new P(a);case "Algorithm":if(p(a))return new K(a);if(ga(a)){for(var c=a.length,d=[],e=0;e<c;e++)d[e]="Object";return Md(a,
d)}if(a instanceof Fc)return a;throw Error("Argument is not a function: "+a);case "String":return Zc(a)||a instanceof T||a instanceof H?new T(a):a;case "Dictionary":return $c(a)?a:new ge(a);case "List":return new W(a);case "Number":case "Float":case "Long":case "Integer":case "Short":case "Byte":return new S(a);default:if(b in c){d=gd(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}}};va("area base br col command embed hr img input keygen link meta param source track wbr".split(" "));va("action","cite","data","formaction","href","manifest","poster","src");va("embed","iframe","link","script","style","template");!fb&&!y||y&&y&&9<=mb||fb&&z("1.9.1");y&&z("9");y&&z("11");})();
//@ sourceMappingURL=ee_api_js.sourcemap