diff --git a/ee_api_js.js b/ee_api_js.js new file mode 100644 index 0000000..281808c --- /dev/null +++ b/ee_api_js.js @@ -0,0 +1,685 @@ +(function(){/* + + Copyright The Closure Library Authors. + SPDX-License-Identifier: Apache-2.0 +*/ +var k,aa=function(a){var b=0;return function(){return b=e}});la("String.prototype.startsWith",function(a){return a?a:function(b,c){var d=ma(this,b,"startsWith");b+="";var e=d.length,f=b.length;c=Math.max(0,Math.min(c|0,d.length));for(var g=0;g=f}}); +la("String.prototype.repeat",function(a){return a?a:function(b){var c=ma(this,null,"repeat");if(0>b||1342177279>>=1)c+=c;return d}});var na=function(){na=function(){};r.Symbol||(r.Symbol=oa)},pa=function(a,b){this.Nh=a;ka(this,"description",{configurable:!0,writable:!0,value:b})};pa.prototype.toString=function(){return this.Nh}; +var oa=function(){function a(c){if(this instanceof a)throw new TypeError("Symbol is not a constructor");return new pa("jscomp_symbol_"+(c||"")+"_"+b++,c)}var b=0;return a}(),ra=function(){na();var a=r.Symbol.iterator;a||(a=r.Symbol.iterator=r.Symbol("Symbol.iterator"));"function"!=typeof Array.prototype[a]&&ka(Array.prototype,a,{configurable:!0,writable:!0,value:function(){return qa(aa(this))}});ra=function(){}},qa=function(a){ra();a={next:a};a[r.Symbol.iterator]=function(){return this};return a}, +sa=function(a,b){ra();a instanceof String&&(a+="");var c=0,d={next:function(){if(cc&&(c=Math.max(c+e,0));c>>0),Ea=0,Ga=function(a,b,c){return a.call.apply(a.bind,arguments)},Ha=function(a,b,c){if(!a)throw Error();if(2c&&(c=Math.max(0,a.length+c));if("string"===typeof a)return"string"!==typeof b|| +1!=b.length?-1:a.lastIndexOf(b,c);for(;0<=c;c--)if(c in a&&a[c]===b)return c;return-1},Ya=Array.prototype.forEach?function(a,b,c){B(null!=a.length);Array.prototype.forEach.call(a,b,c)}:function(a,b,c){for(var d=a.length,e="string"===typeof a?a.split(""):a,f=0;fb?null:"string"=== +typeof a?a.charAt(b):a[b]},fb=function(a,b){return 0<=Wa(a,b)},gb=function(a){if(!Array.isArray(a))for(var b=a.length-1;0<=b;b--)delete a[b];a.length=0},ib=function(a,b){b=Wa(a,b);var c;(c=0<=b)&&hb(a,b);return c},hb=function(a,b){B(null!=a.length);Array.prototype.splice.call(a,b,1)},jb=function(a){return Array.prototype.concat.apply([],arguments)},kb=function(a){var b=a.length;if(0=arguments.length?Array.prototype.slice.call(a,b):Array.prototype.slice.call(a,b,c)},nb=function(a){for(var b={},c=0,d=0;da-0)return[];for(var c=0;c/g,ub=/"/g,vb=/'/g,wb=/\x00/g,xb=/[\x00&<>"']/,yb=function(a,b){return ab?1:0};var zb;a:{var Ab=t.navigator;if(Ab){var Bb=Ab.userAgent;if(Bb){zb=Bb;break a}}zb=""}var Cb=function(a){return-1!=zb.indexOf(a)};var Db=function(a,b,c){for(var d in a)b.call(c,a[d],d,a)},Eb=function(a,b){var c={},d;for(d in a)b.call(void 0,a[d],d,a)&&(c[d]=a[d]);return c},Fb=function(a,b,c){var d={},e;for(e in a)d[e]=b.call(c,a[e],e,a);return d},Gb=function(a,b){for(var c in a)if(b.call(void 0,a[c],c,a))return!0;return!1},Hb=function(a){var b=[],c=0,d;for(d in a)b[c++]=a[d];return b},Ib=function(a){var b=[],c=0,d;for(d in a)b[c++]=d;return b},Jb=function(a,b){for(var c in a)if(a[c]==b)return!0;return!1},Lb=function(a){var b= +Kb,c;for(c in b)if(a.call(void 0,b[c],c,b))return c},Mb=function(a){for(var b in a)return!1;return!0},Nb=function(a,b){b in a&&delete a[b]},Ob=function(a){var b={},c;for(c in a)b[c]=a[c];return b},Pb=function(a){var b=za(a);if("object"==b||"array"==b){if(Ca(a.clone))return a.clone();b="array"==b?[]:{};for(var c in a)b[c]=Pb(a[c]);return b}return a},Qb="constructor hasOwnProperty isPrototypeOf propertyIsEnumerable toLocaleString toString valueOf".split(" "),Rb=function(a,b){for(var c,d,e=1;e"}else f=void 0===a?"undefined":null===a?"null":typeof a;Ra("Argument is not a %s (or a non-Element, non-Location mock); got: %s", +b,f)}};var Tb=function(a){return a};var Wb=function(a,b){this.Ff=a===Ub&&b||"";this.Yh=Vb};Wb.prototype.Bb=!0;Wb.prototype.zb=function(){return this.Ff};Wb.prototype.toString=function(){return"Const{"+this.Ff+"}"};var Xb=function(a){if(a instanceof Wb&&a.constructor===Wb&&a.Yh===Vb)return a.Ff;Ra("expected object of type Const, got '"+a+"'");return"type_error:Const"},Vb={},Ub={},Yb=new Wb(Ub,"");var Zb=function(){this.hf=""};Zb.prototype.Bb=!0;Zb.prototype.zb=function(){return this.hf.toString()};Zb.prototype.toString=function(){return"SafeScript{"+this.hf+"}"};Zb.prototype.Za=function(a){this.hf=a;return this};(new Zb).Za("");var bc=function(a,b){this.mf=a===$b&&b||"";this.Zh=ac};bc.prototype.Bb=!0;bc.prototype.zb=function(){return this.mf.toString()};bc.prototype.toString=function(){return"TrustedResourceUrl{"+this.mf+"}"}; +var cc=function(a){if(a instanceof bc&&a.constructor===bc&&a.Zh===ac)return a.mf;Ra("expected object of type TrustedResourceUrl, got '"+a+"' of type "+za(a));return"type_error:TrustedResourceUrl"},gc=function(a){var b=Xb(dc);if(!ec.test(b))throw Error("Invalid TrustedResourceUrl format: "+b);var c=b.replace(fc,function(d,e){if(!Object.prototype.hasOwnProperty.call(a,e))throw Error('Found marker, "'+e+'", in format string, "'+b+'", but no valid label mapping found in args: '+JSON.stringify(a));d=a[e]; +return d instanceof Wb?Xb(d):encodeURIComponent(String(d))});return new bc($b,c)},fc=/%{(\w+)}/g,ec=/^((https:)?\/\/[0-9a-z.:[\]-]+\/|\/[^/\\]|[^:/\\%]+\/|[^:/\\%]*[?#]|about:blank#)/i,ac={},$b={};var jc=function(a,b){this.lf=a===hc&&b||"";this.Xh=ic};jc.prototype.Bb=!0;jc.prototype.zb=function(){return this.lf.toString()};jc.prototype.toString=function(){return"SafeUrl{"+this.lf+"}"}; +var kc=function(a){if(a instanceof jc&&a.constructor===jc&&a.Xh===ic)return a.lf;Ra("expected object of type SafeUrl, got '"+a+"' of type "+za(a));return"type_error:SafeUrl"},lc=/^(?:audio\/(?:3gpp2|3gpp|aac|L16|midi|mp3|mp4|mpeg|oga|ogg|opus|x-m4a|x-wav|wav|webm)|image\/(?:bmp|gif|jpeg|jpg|png|tiff|webp|x-icon)|text\/csv|video\/(?:mpeg|mp4|ogg|webm|quicktime))(?:;\w+=(?:\w+|"[\w;=]+"))*$/i,mc=function(a){if(lc.test(a.type)){var b=void 0!==t.URL&&void 0!==t.URL.createObjectURL?t.URL:void 0!==t.webkitURL&& +void 0!==t.webkitURL.createObjectURL?t.webkitURL:void 0!==t.createObjectURL?t:null;if(null==b)throw Error("This browser doesn't seem to support blob URLs");a=b.createObjectURL(a)}else a="about:invalid#zClosurez";return new jc(hc,a)},ic={},hc={};var nc=function(){this.kf=""};nc.prototype.Bb=!0;nc.prototype.zb=function(){return this.kf};nc.prototype.toString=function(){return"SafeStyle{"+this.kf+"}"};nc.prototype.Za=function(a){this.kf=a;return this};(new nc).Za("");var oc=function(){this.jf=""};oc.prototype.Bb=!0;oc.prototype.zb=function(){return this.jf};oc.prototype.toString=function(){return"SafeStyleSheet{"+this.jf+"}"};oc.prototype.Za=function(a){this.jf=a;return this};(new oc).Za("");var qc=function(){this.zd="";this.Wh=pc};qc.prototype.Bb=!0;qc.prototype.zb=function(){return this.zd.toString()};qc.prototype.toString=function(){return"SafeHtml{"+this.zd+"}"};var sc=function(){var a=rc;if(a instanceof qc&&a.constructor===qc&&a.Wh===pc)return a.zd;Ra("expected object of type SafeHtml, got '"+a+"' of type "+za(a));return"type_error:SafeHtml"},pc={};qc.prototype.Za=function(a){this.zd=a;return this};(new qc).Za("");var rc=(new qc).Za("");(new qc).Za("
");var tc=function(a){var b=new bc($b,Xb(Yb));Sb(a,"HTMLIFrameElement");a.src=cc(b).toString()},uc=function(a,b){Sb(a,"HTMLScriptElement");a.src=cc(b);if(null===xa)b:{b=t.document;if((b=b.querySelector&&b.querySelector("script[nonce]"))&&(b=b.nonce||b.getAttribute("nonce"))&&wa.test(b)){xa=b;break b}xa=""}b=xa;b&&a.setAttribute("nonce",b)};var vc=function(a,b){for(var c=a.split("%s"),d="",e=Array.prototype.slice.call(arguments,1);e.length&&1")&&(a=a.replace(tb,">")),-1!=a.indexOf('"')&&(a=a.replace(ub,""")),-1!=a.indexOf("'")&&(a=a.replace(vb,"'")),-1!=a.indexOf("\x00")&&(a=a.replace(wb,"�")));return a},xc=function(a){var b=1;a= +a.split(":");for(var c=[];0parseFloat(Ic)){Hc=String(Kc);break a}}Hc=Ic} +var Lc=Hc,zc={},Mc=function(a){return Ac(a,function(){for(var b=0,c=qb(String(Lc)).split("."),d=qb(String(a)).split("."),e=Math.max(c.length,d.length),f=0;0==b&&f=a.keyCode)a.keyCode=-1}catch(b){}};var Wc="closure_listenable_"+(1E6*Math.random()|0),Xc=function(a){return!(!a||!a[Wc])},Yc=0;var Zc=function(a,b,c,d,e){this.listener=a;this.Ad=null;this.src=b;this.type=c;this.capture=!!d;this.Ya=e;this.key=++Yc;this.bc=this.ed=!1},$c=function(a){a.bc=!0;a.listener=null;a.Ad=null;a.src=null;a.Ya=null};var ad=function(a){this.src=a;this.$={};this.Tc=0};ad.prototype.add=function(a,b,c,d,e){var f=a.toString();a=this.$[f];a||(a=this.$[f]=[],this.Tc++);var g=bd(a,b,d,e);-1d.keyCode||void 0!=d.returnValue)){a:{var e=!1;if(0==d.keyCode)try{d.keyCode=-1;break a}catch(g){e=!0}if(e||void 0==d.returnValue)d.returnValue=!0}d=[];for(e=b.currentTarget;e;e=e.parentNode)d.push(e);a=a.type;for(e=d.length-1;!b.Ib&&0<=e;e--){b.currentTarget=d[e];var f=rd(d[e],a,!0,b);c=c&&f}for(e=0;!b.Ib&&e>>0),id=function(a){B(a,"Listener can not be null.");if(Ca(a))return a;B(a.handleEvent,"An object listener must have handleEvent method.");a[sd]||(a[sd]=function(b){return a.handleEvent(b)});return a[sd]};var td=function(){Ka.call(this);this.Ba=new ad(this);this.ci=this;this.ff=null};A(td,Ka);td.prototype[Wc]=!0;k=td.prototype;k.addEventListener=function(a,b,c,d){hd(this,a,b,c,d)};k.removeEventListener=function(a,b,c,d){od(this,a,b,c,d)}; +k.dispatchEvent=function(a){ud(this);var b=this.ff;if(b){var c=[];for(var d=1;b;b=b.ff)c.push(b),B(1E3>++d,"infinite loop")}b=this.ci;d=a.type||a;if("string"===typeof a)a=new Ma(a,b);else if(a instanceof Ma)a.target=a.target||b;else{var e=a;a=new Ma(d,b);Rb(a,e)}e=!0;if(c)for(var f=c.length-1;!a.Ib&&0<=f;f--){var g=a.currentTarget=c[f];e=vd(g,d,!0,a)&&e}a.Ib||(g=a.currentTarget=b,e=vd(g,d,!0,a)&&e,a.Ib||(e=vd(g,d,!1,a)&&e));if(c)for(f=0;!a.Ib&&f=a.length)throw wd;if(b in a)return a[b++];b++}};return c}throw Error("Not implemented");},zd=function(a,b){if(Aa(a))try{Ya(a,b,void 0)}catch(c){if(c!==wd)throw c;}else{a=yd(a);try{for(;;)b.call(void 0,a.next(),void 0,a)}catch(c){if(c!==wd)throw c;}}};var Ad=function(a,b){this.j={};this.H=[];this.Vc=this.I=0;var c=arguments.length;if(12*this.I&&Bd(this),!0):!1};var Bd=function(a){if(a.I!=a.H.length){for(var b=0,c=0;b=d.H.length)throw wd;var f=d.H[b++];return a?f:d.j[f]};return e};var Cd=function(a,b){return Object.prototype.hasOwnProperty.call(a,b)};var Ed=function(a){if(a.L&&"function"==typeof a.L)a=a.L();else if(Aa(a)||"string"===typeof a)a=a.length;else{var b=0,c;for(c in a)b++;a=b}return a},Fd=function(a){if(a.T&&"function"==typeof a.T)return a.T();if("string"===typeof a)return a.split("");if(Aa(a)){for(var b=[],c=a.length,d=0;dc)return!1;!(b instanceof Jd)&&5e&&(e+=d);return[a.Ai,c,e,b.y].join("/")};Md.prototype.zc=function(){return this.pb.length};var Od=function(a){Ma.call(this,"tileevent");this.count=a};A(Od,Ma);var Pd=function(){},Qd=new Pd;function Rd(a){return Object.assign({O:{},sk:{},keys:[],xa:{},u:{},K:{}},a)}var C=function(){this.a={}},D=function(a,b){return a.a.hasOwnProperty(b)?a.a[b]:null},F=function(a,b){return null!=a.a[b]};function Sd(a,b){return D(b,a)}function Td(a,b,c){b[a]=c}function Ud(){return{}}function Vd(a,b){var c=new a;return null==b?c:Wd(b,Xd,Yd,Zd,a)}function Xd(a,b){return b[a]}function Yd(a,b,c){b.a[a]=c} +function Zd(a){if(null==a)throw Error("Cannot deserialize, target constructor was null.");return new a} +function Wd(a,b,c,d,e){e=d(e);var f=$d(a,e),g=f.O||{},h=f.u||{},m=f.xa||{},p={};f=l(f.keys||[]);for(var q=f.next();!q.done;p={lc:p.lc},q=f.next()){q=q.value;var v=b(q,a);if(null!=v){var z=void 0;g.hasOwnProperty(q)?z=ae(v,b,c,d,!0,!0,g[q]):h.hasOwnProperty(q)?z=ae(v,b,c,d,!1,!0,h[q]):m.hasOwnProperty(q)?(p.lc=m[q],z=p.lc.ka?v.map(function(E){return function(L){return be(L,E.lc,b,c,d)}}(p)):be(v,p.lc,b,c,d)):z=Array.isArray(v)?ae(v,b,c,d,!0,!1):v instanceof Pd?null:v;c(q,e,z)}}return e} +function be(a,b,c,d,e){for(var f={},g=l(Object.keys(a)),h=g.next();!h.done;h=g.next()){h=h.value;var m=a[h];null!=m&&(f[h]=ae(m,c,d,e,b.ma,b.la,b.fa))}return f}function ae(a,b,c,d,e,f,g){if(f&&null==g)throw Error("Cannot deserialize a reference object without a constructor.");return null==a?a:e&&f?a.map(function(h){return Wd(h,b,c,d,g)}):e&&!f?a.map(function(h){return h}):!e&&f?Wd(a,b,c,d,g):a instanceof Pd?null:"object"===typeof a?JSON.parse(JSON.stringify(a)):a} +function $d(a,b){if(b instanceof C)a=Rd(b.f());else if(a instanceof C)a=Rd(a.f());else throw Error("Cannot find ClassMetadata.");return a};var ce=function(){};ce.prototype.w=function(a,b){a=String(a);if(!b.test(a))throw Error("parameter ["+a+"] does not match pattern ["+b.toString()+"]");};function de(a){var b=a.body instanceof C?Wd(a.body,Sd,Td,Ud):a.body;return{path:a.path,s:a.s,A:a.A,body:b,o:a.o,Bh:a.Bh&&a.Bh}};function fe(a,b){if(null==a)return null;a=a.tk(b);return null==a?null:a};var ge=function(a,b){this.P=a;this.ti=void 0===b?null:b};n(ge,ce);var he=function(a,b,c){var d=fe(a.ti,b);if(null==d)return c;d.uk();return c.then(function(e){d.wk(e);return e},function(e){d.vk(e);throw e;})},G=function(a,b){var c=b.C||void 0;return he(a,b,a.P.send(de(b),c))};var ie={get Oh(){return"ADMIN_READ"},get Ph(){return"DATA_READ"},get Qh(){return"DATA_WRITE"},get Ij(){return"LOG_TYPE_UNSPECIFIED"},values:function(){return["LOG_TYPE_UNSPECIFIED","ADMIN_READ","DATA_WRITE","DATA_READ"]}},je={get Oh(){return"ADMIN_READ"},get Vi(){return"ADMIN_WRITE"},get Ph(){return"DATA_READ"},get Qh(){return"DATA_WRITE"},get Rj(){return"PERMISSION_TYPE_UNSPECIFIED"},values:function(){return["PERMISSION_TYPE_UNSPECIFIED","ADMIN_READ","ADMIN_WRITE","DATA_READ","DATA_WRITE"]}},ke= +{get dj(){return"CAPABILITY_GROUP_UNSPECIFIED"},get ej(){return"CLOUD_ALPHA"},get oj(){return"EXTERNAL"},get zj(){return"INTERNAL"},get Ej(){return"LIMITED"},get Sj(){return"PREAUTHORIZED"},get Uj(){return"PREVIEW"},get Vh(){return"PUBLIC"},values:function(){return"CAPABILITY_GROUP_UNSPECIFIED PUBLIC INTERNAL EXTERNAL LIMITED PREAUTHORIZED PREVIEW CLOUD_ALPHA".split(" ")}},le={get Ui(){return"ADMIN_ACTIVITY"},get hj(){return"DATA_ACCESS"},get kk(){return"UNSPECIFIED_LOG_NAME"},values:function(){return["UNSPECIFIED_LOG_NAME", +"ADMIN_ACTIVITY","DATA_ACCESS"]}},me={get Yi(){return"APPROVER"},get Zi(){return"ATTRIBUTION"},get $i(){return"AUTHORITY"},get fj(){return"CREDENTIALS_TYPE"},get Bj(){return"JUSTIFICATION_TYPE"},get Uh(){return"NO_ATTR"},get Yj(){return"SECURITY_REALM"},values:function(){return"NO_ATTR AUTHORITY ATTRIBUTION SECURITY_REALM APPROVER JUSTIFICATION_TYPE CREDENTIALS_TYPE".split(" ")}},ne={get mj(){return"DISCHARGED"},get nj(){return"EQUALS"},get vj(){return"IN"},get Kj(){return"NOT_EQUALS"},get Lj(){return"NOT_IN"}, +get Oj(){return"NO_OP"},values:function(){return"NO_OP EQUALS NOT_EQUALS IN NOT_IN DISCHARGED".split(" ")}},oe={get Aj(){return"IP"},get Jj(){return"NAME"},get Uh(){return"NO_ATTR"},get Wj(){return"REGION"},get Zj(){return"SERVICE"},values:function(){return["NO_ATTR","REGION","SERVICE","NAME","IP"]}},pe={get Gj(){return"LOG_FAIL_CLOSED"},get Hj(){return"LOG_MODE_UNSPECIFIED"},values:function(){return["LOG_MODE_UNSPECIFIED","LOG_FAIL_CLOSED"]}},qe={get qj(){return"FOLDER"},get tj(){return"IMAGE"}, +get uj(){return"IMAGE_COLLECTION"},get ck(){return"TABLE"},get gk(){return"TYPE_UNSPECIFIED"},values:function(){return["TYPE_UNSPECIFIED","IMAGE","IMAGE_COLLECTION","TABLE","FOLDER"]}},re={get Vd(){return"AUTO_JPEG_PNG"},get Wd(){return"GEO_TIFF"},get Xd(){return"IMAGE_FILE_FORMAT_UNSPECIFIED"},get Yd(){return"JPEG"},get Zd(){return"MULTI_BAND_IMAGE_TILE"},get $d(){return"NPY"},get ae(){return"PNG"},get be(){return"TF_RECORD_IMAGE"},get ce(){return"ZIPPED_GEO_TIFF"},get de(){return"ZIPPED_GEO_TIFF_PER_BAND"}, +values:function(){return"IMAGE_FILE_FORMAT_UNSPECIFIED JPEG PNG AUTO_JPEG_PNG NPY GEO_TIFF TF_RECORD_IMAGE MULTI_BAND_IMAGE_TILE ZIPPED_GEO_TIFF ZIPPED_GEO_TIFF_PER_BAND".split(" ")}},se={get mk(){return"V1"},get nk(){return"V2"},get pk(){return"VERSION_UNSPECIFIED"},values:function(){return["VERSION_UNSPECIFIED","V1","V2"]}},te={get Vd(){return"AUTO_JPEG_PNG"},get Wd(){return"GEO_TIFF"},get Xd(){return"IMAGE_FILE_FORMAT_UNSPECIFIED"},get Yd(){return"JPEG"},get Zd(){return"MULTI_BAND_IMAGE_TILE"}, +get $d(){return"NPY"},get ae(){return"PNG"},get be(){return"TF_RECORD_IMAGE"},get ce(){return"ZIPPED_GEO_TIFF"},get de(){return"ZIPPED_GEO_TIFF_PER_BAND"},values:function(){return"IMAGE_FILE_FORMAT_UNSPECIFIED JPEG PNG AUTO_JPEG_PNG NPY GEO_TIFF TF_RECORD_IMAGE MULTI_BAND_IMAGE_TILE ZIPPED_GEO_TIFF ZIPPED_GEO_TIFF_PER_BAND".split(" ")}},ue={get sj(){return"HORIZONTAL"},get Pj(){return"ORIENTATION_UNSPECIFIED"},get qk(){return"VERTICAL"},values:function(){return["ORIENTATION_UNSPECIFIED","HORIZONTAL", +"VERTICAL"]}},ve={get jj(){return"DEFAULT_OBJECT_ACL"},get Vh(){return"PUBLIC"},get fk(){return"TILE_PERMISSIONS_UNSPECIFIED"},values:function(){return["TILE_PERMISSIONS_UNSPECIFIED","PUBLIC","DEFAULT_OBJECT_ACL"]}},we={get MAX(){return"MAX"},get Xc(){return"MEAN"},get MIN(){return"MIN"},get Yc(){return"MODE"},get Zc(){return"PYRAMIDING_POLICY_UNSPECIFIED"},get $c(){return"SAMPLE"},values:function(){return"PYRAMIDING_POLICY_UNSPECIFIED MEAN SAMPLE MIN MAX MODE".split(" ")}},xe={get MAX(){return"MAX"}, +get Xc(){return"MEAN"},get MIN(){return"MIN"},get Yc(){return"MODE"},get Zc(){return"PYRAMIDING_POLICY_UNSPECIFIED"},get $c(){return"SAMPLE"},values:function(){return"PYRAMIDING_POLICY_UNSPECIFIED MEAN SAMPLE MIN MAX MODE".split(" ")}},ye={get MAX(){return"MAX"},get Xc(){return"MEAN"},get MIN(){return"MIN"},get Yc(){return"MODE"},get Zc(){return"PYRAMIDING_POLICY_UNSPECIFIED"},get $c(){return"SAMPLE"},values:function(){return"PYRAMIDING_POLICY_UNSPECIFIED MEAN SAMPLE MIN MAX MODE".split(" ")}},ze= +{get Vd(){return"AUTO_JPEG_PNG"},get Wd(){return"GEO_TIFF"},get Xd(){return"IMAGE_FILE_FORMAT_UNSPECIFIED"},get Yd(){return"JPEG"},get Zd(){return"MULTI_BAND_IMAGE_TILE"},get $d(){return"NPY"},get ae(){return"PNG"},get be(){return"TF_RECORD_IMAGE"},get ce(){return"ZIPPED_GEO_TIFF"},get de(){return"ZIPPED_GEO_TIFF_PER_BAND"},values:function(){return"IMAGE_FILE_FORMAT_UNSPECIFIED JPEG PNG AUTO_JPEG_PNG NPY GEO_TIFF TF_RECORD_IMAGE MULTI_BAND_IMAGE_TILE ZIPPED_GEO_TIFF ZIPPED_GEO_TIFF_PER_BAND".split(" ")}}, +Ae={get MAX(){return"MAX"},get Xc(){return"MEAN"},get MIN(){return"MIN"},get Yc(){return"MODE"},get Zc(){return"PYRAMIDING_POLICY_UNSPECIFIED"},get $c(){return"SAMPLE"},values:function(){return"PYRAMIDING_POLICY_UNSPECIFIED MEAN SAMPLE MIN MAX MODE".split(" ")}},Be={get bj(){return"CANCELLED"},get cj(){return"CANCELLING"},get pj(){return"FAILED"},get Qj(){return"PENDING"},get Xj(){return"RUNNING"},get ak(){return"STATE_UNSPECIFIED"},get bk(){return"SUCCEEDED"},values:function(){return"STATE_UNSPECIFIED PENDING RUNNING CANCELLING SUCCEEDED CANCELLED FAILED".split(" ")}}, +Ce={get Rh(){return"DOUBLE"},get FLOAT(){return"FLOAT"},get INT(){return"INT"},get Tj(){return"PRECISION_UNSPECIFIED"},values:function(){return["PRECISION_UNSPECIFIED","INT","FLOAT","DOUBLE"]}},De={get Wi(){return"ALLOW"},get Xi(){return"ALLOW_WITH_LOG"},get kj(){return"DENY"},get lj(){return"DENY_WITH_LOG"},get Fj(){return"LOG"},get Nj(){return"NO_ACTION"},values:function(){return"NO_ACTION ALLOW ALLOW_WITH_LOG DENY DENY_WITH_LOG LOG".split(" ")}},Ee={get gj(){return"CSV"},get rj(){return"GEO_JSON"}, +get Cj(){return"KML"},get Dj(){return"KMZ"},get $j(){return"SHP"},get dk(){return"TABLE_FILE_FORMAT_UNSPECIFIED"},get ek(){return"TF_RECORD_TABLE"},values:function(){return"TABLE_FILE_FORMAT_UNSPECIFIED CSV GEO_JSON KML KMZ SHP TF_RECORD_TABLE".split(" ")}},Fe={get Vd(){return"AUTO_JPEG_PNG"},get Wd(){return"GEO_TIFF"},get Xd(){return"IMAGE_FILE_FORMAT_UNSPECIFIED"},get Yd(){return"JPEG"},get Zd(){return"MULTI_BAND_IMAGE_TILE"},get $d(){return"NPY"},get ae(){return"PNG"},get be(){return"TF_RECORD_IMAGE"}, +get ce(){return"ZIPPED_GEO_TIFF"},get de(){return"ZIPPED_GEO_TIFF_PER_BAND"},values:function(){return"IMAGE_FILE_FORMAT_UNSPECIFIED JPEG PNG AUTO_JPEG_PNG NPY GEO_TIFF TF_RECORD_IMAGE MULTI_BAND_IMAGE_TILE ZIPPED_GEO_TIFF ZIPPED_GEO_TIFF_PER_BAND".split(" ")}},Ge={get MAX(){return"MAX"},get Xc(){return"MEAN"},get MIN(){return"MIN"},get Yc(){return"MODE"},get Zc(){return"PYRAMIDING_POLICY_UNSPECIFIED"},get $c(){return"SAMPLE"},values:function(){return"PYRAMIDING_POLICY_UNSPECIFIED MEAN SAMPLE MIN MAX MODE".split(" ")}}, +He={get ij(){return"DATA_TYPE_UNSPECIFIED"},get Rh(){return"DOUBLE"},get FLOAT(){return"FLOAT"},get wj(){return"INT16"},get xj(){return"INT32"},get yj(){return"INT8"},get hk(){return"UINT16"},get ik(){return"UINT32"},get jk(){return"UINT8"},values:function(){return"DATA_TYPE_UNSPECIFIED INT8 UINT8 INT16 UINT16 INT32 UINT32 FLOAT DOUBLE".split(" ")}},Ie={get Sh(){return"GIF"},get Th(){return"MP4"},get $h(){return"VIDEO_FILE_FORMAT_UNSPECIFIED"},get ai(){return"VP9"},values:function(){return["VIDEO_FILE_FORMAT_UNSPECIFIED", +"MP4","GIF","VP9"]}},Je={get Sh(){return"GIF"},get Th(){return"MP4"},get $h(){return"VIDEO_FILE_FORMAT_UNSPECIFIED"},get ai(){return"VP9"},values:function(){return["VIDEO_FILE_FORMAT_UNSPECIFIED","MP4","GIF","VP9"]}},Ke=function(a){a=void 0===a?{}:a;this.a={};this.a.scaleX=null==a.uf?null:a.uf;this.a.shearX=null==a.zf?null:a.zf;this.a.translateX=null==a.Mf?null:a.Mf;this.a.shearY=null==a.Af?null:a.Af;this.a.scaleY=null==a.vf?null:a.vf;this.a.translateY=null==a.Nf?null:a.Nf};n(Ke,C); +Ke.prototype.f=function(){return{keys:"scaleX scaleY shearX shearY translateX translateY".split(" ")}}; +r.Object.defineProperties(Ke.prototype,{uf:{configurable:!0,enumerable:!0,get:function(){return F(this,"scaleX")?D(this,"scaleX"):null},set:function(a){this.a.scaleX=a}},vf:{configurable:!0,enumerable:!0,get:function(){return F(this,"scaleY")?D(this,"scaleY"):null},set:function(a){this.a.scaleY=a}},zf:{configurable:!0,enumerable:!0,get:function(){return F(this,"shearX")?D(this,"shearX"):null},set:function(a){this.a.shearX=a}},Af:{configurable:!0,enumerable:!0,get:function(){return F(this,"shearY")? +D(this,"shearY"):null},set:function(a){this.a.shearY=a}},Mf:{configurable:!0,enumerable:!0,get:function(){return F(this,"translateX")?D(this,"translateX"):null},set:function(a){this.a.translateX=a}},Nf:{configurable:!0,enumerable:!0,get:function(){return F(this,"translateY")?D(this,"translateY"):null},set:function(a){this.a.translateY=a}}}); +var Le=function(a){a=void 0===a?{}:a;this.a={};this.a.name=null==a.name?null:a.name;this.a.description=null==a.description?null:a.description;this.a.returnType=null==a.tf?null:a.tf;this.a.arguments=null==a.arguments?null:a.arguments;this.a.deprecated=null==a.deprecated?null:a.deprecated;this.a.deprecationReason=null==a.ye?null:a.ye;this.a.hidden=null==a.hidden?null:a.hidden;this.a.preview=null==a.preview?null:a.preview;this.a.sourceCodeUri=null==a.sourceCodeUri?null:a.sourceCodeUri};n(Le,C); +Le.prototype.f=function(){return{O:{arguments:Me},keys:"arguments deprecated deprecationReason description hidden name preview returnType sourceCodeUri".split(" ")}}; +r.Object.defineProperties(Le.prototype,{arguments:{configurable:!0,enumerable:!0,get:function(){return F(this,"arguments")?D(this,"arguments"):null},set:function(a){this.a.arguments=a}},deprecated:{configurable:!0,enumerable:!0,get:function(){return F(this,"deprecated")?D(this,"deprecated"):null},set:function(a){this.a.deprecated=a}},ye:{configurable:!0,enumerable:!0,get:function(){return F(this,"deprecationReason")?D(this,"deprecationReason"):null},set:function(a){this.a.deprecationReason=a}},description:{configurable:!0, +enumerable:!0,get:function(){return F(this,"description")?D(this,"description"):null},set:function(a){this.a.description=a}},hidden:{configurable:!0,enumerable:!0,get:function(){return F(this,"hidden")?D(this,"hidden"):null},set:function(a){this.a.hidden=a}},name:{configurable:!0,enumerable:!0,get:function(){return F(this,"name")?D(this,"name"):null},set:function(a){this.a.name=a}},preview:{configurable:!0,enumerable:!0,get:function(){return F(this,"preview")?D(this,"preview"):null},set:function(a){this.a.preview= +a}},tf:{configurable:!0,enumerable:!0,get:function(){return F(this,"returnType")?D(this,"returnType"):null},set:function(a){this.a.returnType=a}},sourceCodeUri:{configurable:!0,enumerable:!0,get:function(){return F(this,"sourceCodeUri")?D(this,"sourceCodeUri"):null},set:function(a){this.a.sourceCodeUri=a}}}); +var Me=function(a){a=void 0===a?{}:a;this.a={};this.a.argumentName=null==a.cd?null:a.cd;this.a.type=null==a.type?null:a.type;this.a.description=null==a.description?null:a.description;this.a.optional=null==a.optional?null:a.optional;this.a.defaultValue=null==a.defaultValue?null:a.defaultValue};n(Me,C);Me.prototype.f=function(){return{keys:["argumentName","defaultValue","description","optional","type"]}}; +r.Object.defineProperties(Me.prototype,{cd:{configurable:!0,enumerable:!0,get:function(){return F(this,"argumentName")?D(this,"argumentName"):null},set:function(a){this.a.argumentName=a}},defaultValue:{configurable:!0,enumerable:!0,get:function(){return F(this,"defaultValue")?D(this,"defaultValue"):null},set:function(a){this.a.defaultValue=a}},description:{configurable:!0,enumerable:!0,get:function(){return F(this,"description")?D(this,"description"):null},set:function(a){this.a.description=a}},optional:{configurable:!0, +enumerable:!0,get:function(){return F(this,"optional")?D(this,"optional"):null},set:function(a){this.a.optional=a}},type:{configurable:!0,enumerable:!0,get:function(){return F(this,"type")?D(this,"type"):null},set:function(a){this.a.type=a}}});var Ne=function(a){a=void 0===a?{}:a;this.a={};this.a.values=null==a.values?null:a.values};n(Ne,C);Ne.prototype.f=function(){return{O:{values:Oe},keys:["values"]}}; +r.Object.defineProperties(Ne.prototype,{values:{configurable:!0,enumerable:!0,get:function(){return F(this,"values")?D(this,"values"):null},set:function(a){this.a.values=a}}});var Pe=function(a){a=void 0===a?{}:a;this.a={};this.a.service=null==a.xh?null:a.xh;this.a.exemptedMembers=null==a.wc?null:a.wc;this.a.auditLogConfigs=null==a.Vf?null:a.Vf};n(Pe,C);Pe.prototype.f=function(){return{O:{auditLogConfigs:Qe},keys:["auditLogConfigs","exemptedMembers","service"]}}; +r.Object.defineProperties(Pe.prototype,{Vf:{configurable:!0,enumerable:!0,get:function(){return F(this,"auditLogConfigs")?D(this,"auditLogConfigs"):null},set:function(a){this.a.auditLogConfigs=a}},wc:{configurable:!0,enumerable:!0,get:function(){return F(this,"exemptedMembers")?D(this,"exemptedMembers"):null},set:function(a){this.a.exemptedMembers=a}},xh:{configurable:!0,enumerable:!0,get:function(){return F(this,"service")?D(this,"service"):null},set:function(a){this.a.service=a}}}); +var Qe=function(a){a=void 0===a?{}:a;this.a={};this.a.logType=null==a.ah?null:a.ah;this.a.exemptedMembers=null==a.wc?null:a.wc;this.a.ignoreChildExemptions=null==a.Pg?null:a.Pg};n(Qe,C);Qe.prototype.f=function(){return{K:{logType:ie},keys:["exemptedMembers","ignoreChildExemptions","logType"]}}; +r.Object.defineProperties(Qe.prototype,{wc:{configurable:!0,enumerable:!0,get:function(){return F(this,"exemptedMembers")?D(this,"exemptedMembers"):null},set:function(a){this.a.exemptedMembers=a}},Pg:{configurable:!0,enumerable:!0,get:function(){return F(this,"ignoreChildExemptions")?D(this,"ignoreChildExemptions"):null},set:function(a){this.a.ignoreChildExemptions=a}},ah:{configurable:!0,enumerable:!0,get:function(){return F(this,"logType")?D(this,"logType"):null},set:function(a){this.a.logType= +a}}});var Re=function(a){a=void 0===a?{}:a;this.a={};this.a.permissionType=null==a.lh?null:a.lh};n(Re,C);Re.prototype.f=function(){return{K:{permissionType:je},keys:["permissionType"]}};r.Object.defineProperties(Re.prototype,{lh:{configurable:!0,enumerable:!0,get:function(){return F(this,"permissionType")?D(this,"permissionType"):null},set:function(a){this.a.permissionType=a}}}); +var Se=function(a){a=void 0===a?{}:a;this.a={};this.a.role=null==a.ec?null:a.ec;this.a.members=null==a.Fb?null:a.Fb;this.a.condition=null==a.fg?null:a.fg};n(Se,C);Se.prototype.f=function(){return{keys:["condition","members","role"],u:{condition:Te}}}; +r.Object.defineProperties(Se.prototype,{fg:{configurable:!0,enumerable:!0,get:function(){return F(this,"condition")?D(this,"condition"):null},set:function(a){this.a.condition=a}},Fb:{configurable:!0,enumerable:!0,get:function(){return F(this,"members")?D(this,"members"):null},set:function(a){this.a.members=a}},ec:{configurable:!0,enumerable:!0,get:function(){return F(this,"role")?D(this,"role"):null},set:function(a){this.a.role=a}}});var Ue=function(){this.a={}};n(Ue,C);Ue.prototype.f=function(){return{keys:[]}}; +var Ve=function(a){a=void 0===a?{}:a;this.a={};this.a.capabilities=null==a.cg?null:a.cg};n(Ve,C);Ve.prototype.f=function(){return{K:{capabilities:ke},keys:["capabilities"]}};r.Object.defineProperties(Ve.prototype,{cg:{configurable:!0,enumerable:!0,get:function(){return F(this,"capabilities")?D(this,"capabilities"):null},set:function(a){this.a.capabilities=a}}});var We=function(a){a=void 0===a?{}:a;this.a={};this.a.logName=null==a.$g?null:a.$g;this.a.authorizationLoggingOptions=null==a.Wf?null:a.Wf}; +n(We,C);We.prototype.f=function(){return{K:{logName:le},keys:["authorizationLoggingOptions","logName"],u:{authorizationLoggingOptions:Re}}}; +r.Object.defineProperties(We.prototype,{Wf:{configurable:!0,enumerable:!0,get:function(){return F(this,"authorizationLoggingOptions")?D(this,"authorizationLoggingOptions"):null},set:function(a){this.a.authorizationLoggingOptions=a}},$g:{configurable:!0,enumerable:!0,get:function(){return F(this,"logName")?D(this,"logName"):null},set:function(a){this.a.logName=a}}});var Xe=function(a){a=void 0===a?{}:a;this.a={};this.a.expression=null==a.i?null:a.i};n(Xe,C); +Xe.prototype.f=function(){return{keys:["expression"],u:{expression:Ye}}};r.Object.defineProperties(Xe.prototype,{i:{configurable:!0,enumerable:!0,get:function(){return F(this,"expression")?D(this,"expression"):null},set:function(a){this.a.expression=a}}});var Ze=function(a){a=void 0===a?{}:a;this.a={};this.a.result=null==a.result?null:a.result};n(Ze,C);Ze.prototype.f=function(){return{keys:["result"]}}; +r.Object.defineProperties(Ze.prototype,{result:{configurable:!0,enumerable:!0,get:function(){return F(this,"result")?D(this,"result"):null},set:function(a){this.a.result=a}}});var $e=function(a){a=void 0===a?{}:a;this.a={};this.a.iam=null==a.Lg?null:a.Lg;this.a.sys=null==a.Fh?null:a.Fh;this.a.svc=null==a.Eh?null:a.Eh;this.a.op=null==a.jh?null:a.jh;this.a.values=null==a.values?null:a.values};n($e,C);$e.prototype.f=function(){return{K:{iam:me,op:ne,sys:oe},keys:["iam","op","svc","sys","values"]}}; +r.Object.defineProperties($e.prototype,{Lg:{configurable:!0,enumerable:!0,get:function(){return F(this,"iam")?D(this,"iam"):null},set:function(a){this.a.iam=a}},jh:{configurable:!0,enumerable:!0,get:function(){return F(this,"op")?D(this,"op"):null},set:function(a){this.a.op=a}},Eh:{configurable:!0,enumerable:!0,get:function(){return F(this,"svc")?D(this,"svc"):null},set:function(a){this.a.svc=a}},Fh:{configurable:!0,enumerable:!0,get:function(){return F(this,"sys")?D(this,"sys"):null},set:function(a){this.a.sys= +a}},values:{configurable:!0,enumerable:!0,get:function(){return F(this,"values")?D(this,"values"):null},set:function(a){this.a.values=a}}});var af=function(a){a=void 0===a?{}:a;this.a={};this.a.destinationName=null==a.ub?null:a.ub;this.a.overwrite=null==a.overwrite?null:a.overwrite;this.a.bandIds=null==a.ba?null:a.ba};n(af,C);af.prototype.f=function(){return{keys:["bandIds","destinationName","overwrite"]}}; +r.Object.defineProperties(af.prototype,{ba:{configurable:!0,enumerable:!0,get:function(){return F(this,"bandIds")?D(this,"bandIds"):null},set:function(a){this.a.bandIds=a}},ub:{configurable:!0,enumerable:!0,get:function(){return F(this,"destinationName")?D(this,"destinationName"):null},set:function(a){this.a.destinationName=a}},overwrite:{configurable:!0,enumerable:!0,get:function(){return F(this,"overwrite")?D(this,"overwrite"):null},set:function(a){this.a.overwrite=a}}}); +var bf=function(a){a=void 0===a?{}:a;this.a={};this.a.metric=null==a.bh?null:a.bh;this.a.field=null==a.wg?null:a.wg;this.a.customFields=null==a.og?null:a.og};n(bf,C);bf.prototype.f=function(){return{O:{customFields:cf},keys:["customFields","field","metric"]}}; +r.Object.defineProperties(bf.prototype,{og:{configurable:!0,enumerable:!0,get:function(){return F(this,"customFields")?D(this,"customFields"):null},set:function(a){this.a.customFields=a}},wg:{configurable:!0,enumerable:!0,get:function(){return F(this,"field")?D(this,"field"):null},set:function(a){this.a.field=a}},bh:{configurable:!0,enumerable:!0,get:function(){return F(this,"metric")?D(this,"metric"):null},set:function(a){this.a.metric=a}}}); +var cf=function(a){a=void 0===a?{}:a;this.a={};this.a.name=null==a.name?null:a.name;this.a.value=null==a.value?null:a.value};n(cf,C);cf.prototype.f=function(){return{keys:["name","value"]}};r.Object.defineProperties(cf.prototype,{name:{configurable:!0,enumerable:!0,get:function(){return F(this,"name")?D(this,"name"):null},set:function(a){this.a.name=a}},value:{configurable:!0,enumerable:!0,get:function(){return F(this,"value")?D(this,"value"):null},set:function(a){this.a.value=a}}}); +var df=function(a){a=void 0===a?{}:a;this.a={};this.a.logMode=null==a.Zg?null:a.Zg};n(df,C);df.prototype.f=function(){return{K:{logMode:pe},keys:["logMode"]}};r.Object.defineProperties(df.prototype,{Zg:{configurable:!0,enumerable:!0,get:function(){return F(this,"logMode")?D(this,"logMode"):null},set:function(a){this.a.logMode=a}}});var ef=function(a){a=void 0===a?{}:a;this.a={};this.a.values=null==a.values?null:a.values};n(ef,C); +ef.prototype.f=function(){return{keys:["values"],xa:{values:{fa:Oe,ka:!1,la:!0,ma:!1}}}};r.Object.defineProperties(ef.prototype,{values:{configurable:!0,enumerable:!0,get:function(){return F(this,"values")?D(this,"values"):null},set:function(a){this.a.values=a}}});var ff=function(a){a=void 0===a?{}:a;this.a={};this.a.min=null==a.min?null:a.min;this.a.max=null==a.max?null:a.max};n(ff,C);ff.prototype.f=function(){return{keys:["max","min"]}}; +r.Object.defineProperties(ff.prototype,{max:{configurable:!0,enumerable:!0,get:function(){return F(this,"max")?D(this,"max"):null},set:function(a){this.a.max=a}},min:{configurable:!0,enumerable:!0,get:function(){return F(this,"min")?D(this,"min"):null},set:function(a){this.a.min=a}}});var gf=function(a){a=void 0===a?{}:a;this.a={};this.a.folder=null==a.Je?null:a.Je;this.a.filenamePrefix=null==a.ua?null:a.ua};n(gf,C);gf.prototype.f=function(){return{keys:["filenamePrefix","folder"]}}; +r.Object.defineProperties(gf.prototype,{ua:{configurable:!0,enumerable:!0,get:function(){return F(this,"filenamePrefix")?D(this,"filenamePrefix"):null},set:function(a){this.a.filenamePrefix=a}},Je:{configurable:!0,enumerable:!0,get:function(){return F(this,"folder")?D(this,"folder"):null},set:function(a){this.a.folder=a}}}); +var hf=function(a){a=void 0===a?{}:a;this.a={};this.a.type=null==a.type?null:a.type;this.a.name=null==a.name?null:a.name;this.a.id=null==a.id?null:a.id;this.a.updateTime=null==a.Ia?null:a.Ia;this.a.title=null==a.title?null:a.title;this.a.description=null==a.description?null:a.description;this.a.properties=null==a.properties?null:a.properties;this.a.startTime=null==a.startTime?null:a.startTime;this.a.endTime=null==a.endTime?null:a.endTime;this.a.geometry=null==a.geometry?null:a.geometry;this.a.bands= +null==a.bands?null:a.bands;this.a.sizeBytes=null==a.za?null:a.za;this.a.quota=null==a.quota?null:a.quota;this.a.tilestoreEntry=null==a.Ih?null:a.Ih;this.a.gcsLocation=null==a.Eg?null:a.Eg;this.a.expression=null==a.i?null:a.i};n(hf,C); +hf.prototype.f=function(){return{O:{bands:jf},K:{type:qe},keys:"bands description endTime expression gcsLocation geometry id name properties quota sizeBytes startTime tilestoreEntry title type updateTime".split(" "),xa:{geometry:{fa:null,ka:!1,la:!1,ma:!1},properties:{fa:null,ka:!1,la:!1,ma:!1}},u:{expression:Ye,gcsLocation:kf,quota:lf,tilestoreEntry:mf}}}; +r.Object.defineProperties(hf.prototype,{bands:{configurable:!0,enumerable:!0,get:function(){return F(this,"bands")?D(this,"bands"):null},set:function(a){this.a.bands=a}},description:{configurable:!0,enumerable:!0,get:function(){return F(this,"description")?D(this,"description"):null},set:function(a){this.a.description=a}},endTime:{configurable:!0,enumerable:!0,get:function(){return F(this,"endTime")?D(this,"endTime"):null},set:function(a){this.a.endTime=a}},i:{configurable:!0,enumerable:!0,get:function(){return F(this, +"expression")?D(this,"expression"):null},set:function(a){this.a.expression=a}},Eg:{configurable:!0,enumerable:!0,get:function(){return F(this,"gcsLocation")?D(this,"gcsLocation"):null},set:function(a){this.a.gcsLocation=a}},geometry:{configurable:!0,enumerable:!0,get:function(){return F(this,"geometry")?D(this,"geometry"):null},set:function(a){this.a.geometry=a}},id:{configurable:!0,enumerable:!0,get:function(){return F(this,"id")?D(this,"id"):null},set:function(a){this.a.id=a}},name:{configurable:!0, +enumerable:!0,get:function(){return F(this,"name")?D(this,"name"):null},set:function(a){this.a.name=a}},properties:{configurable:!0,enumerable:!0,get:function(){return F(this,"properties")?D(this,"properties"):null},set:function(a){this.a.properties=a}},quota:{configurable:!0,enumerable:!0,get:function(){return F(this,"quota")?D(this,"quota"):null},set:function(a){this.a.quota=a}},za:{configurable:!0,enumerable:!0,get:function(){return F(this,"sizeBytes")?D(this,"sizeBytes"):null},set:function(a){this.a.sizeBytes= +a}},startTime:{configurable:!0,enumerable:!0,get:function(){return F(this,"startTime")?D(this,"startTime"):null},set:function(a){this.a.startTime=a}},Ih:{configurable:!0,enumerable:!0,get:function(){return F(this,"tilestoreEntry")?D(this,"tilestoreEntry"):null},set:function(a){this.a.tilestoreEntry=a}},title:{configurable:!0,enumerable:!0,get:function(){return F(this,"title")?D(this,"title"):null},set:function(a){this.a.title=a}},type:{configurable:!0,enumerable:!0,get:function(){return F(this,"type")? +D(this,"type"):null},set:function(a){this.a.type=a}},Ia:{configurable:!0,enumerable:!0,get:function(){return F(this,"updateTime")?D(this,"updateTime"):null},set:function(a){this.a.updateTime=a}}});var nf=function(a){a=void 0===a?{}:a;this.a={};this.a.name=null==a.name?null:a.name};n(nf,C);nf.prototype.f=function(){return{keys:["name"]}}; +r.Object.defineProperties(nf.prototype,{name:{configurable:!0,enumerable:!0,get:function(){return F(this,"name")?D(this,"name"):null},set:function(a){this.a.name=a}}});var of=function(a){a=void 0===a?{}:a;this.a={};this.a.name=null==a.name?null:a.name;this.a.expression=null==a.i?null:a.i;this.a.fileFormat=null==a.F?null:a.F;this.a.bandIds=null==a.ba?null:a.ba;this.a.visualizationOptions=null==a.Ob?null:a.Ob};n(of,C); +of.prototype.f=function(){return{K:{fileFormat:re},keys:["bandIds","expression","fileFormat","name","visualizationOptions"],u:{expression:Ye,visualizationOptions:pf}}}; +r.Object.defineProperties(of.prototype,{ba:{configurable:!0,enumerable:!0,get:function(){return F(this,"bandIds")?D(this,"bandIds"):null},set:function(a){this.a.bandIds=a}},i:{configurable:!0,enumerable:!0,get:function(){return F(this,"expression")?D(this,"expression"):null},set:function(a){this.a.expression=a}},F:{configurable:!0,enumerable:!0,get:function(){return F(this,"fileFormat")?D(this,"fileFormat"):null},set:function(a){this.a.fileFormat=a}},name:{configurable:!0,enumerable:!0,get:function(){return F(this, +"name")?D(this,"name"):null},set:function(a){this.a.name=a}},Ob:{configurable:!0,enumerable:!0,get:function(){return F(this,"visualizationOptions")?D(this,"visualizationOptions"):null},set:function(a){this.a.visualizationOptions=a}}});var qf=function(){this.a={}};n(qf,C);qf.prototype.f=function(){return{keys:[]}}; +var rf=function(a){a=void 0===a?{}:a;this.a={};this.a.expression=null==a.i?null:a.i;this.a.description=null==a.description?null:a.description;this.a.fileExportOptions=null==a.ha?null:a.ha;this.a.assetExportOptions=null==a.Ua?null:a.Ua;this.a.maxPixels=null==a.bf?null:a.bf;this.a.grid=null==a.J?null:a.J;this.a.requestId=null==a.requestId?null:a.requestId;this.a.maxWorkerCount=null==a.U?null:a.U};n(rf,C); +rf.prototype.f=function(){return{keys:"assetExportOptions description expression fileExportOptions grid maxPixels maxWorkerCount requestId".split(" "),u:{assetExportOptions:sf,expression:Ye,fileExportOptions:tf,grid:uf}}}; +r.Object.defineProperties(rf.prototype,{Ua:{configurable:!0,enumerable:!0,get:function(){return F(this,"assetExportOptions")?D(this,"assetExportOptions"):null},set:function(a){this.a.assetExportOptions=a}},description:{configurable:!0,enumerable:!0,get:function(){return F(this,"description")?D(this,"description"):null},set:function(a){this.a.description=a}},i:{configurable:!0,enumerable:!0,get:function(){return F(this,"expression")?D(this,"expression"):null},set:function(a){this.a.expression=a}}, +ha:{configurable:!0,enumerable:!0,get:function(){return F(this,"fileExportOptions")?D(this,"fileExportOptions"):null},set:function(a){this.a.fileExportOptions=a}},J:{configurable:!0,enumerable:!0,get:function(){return F(this,"grid")?D(this,"grid"):null},set:function(a){this.a.grid=a}},bf:{configurable:!0,enumerable:!0,get:function(){return F(this,"maxPixels")?D(this,"maxPixels"):null},set:function(a){this.a.maxPixels=a}},U:{configurable:!0,enumerable:!0,get:function(){return F(this,"maxWorkerCount")? +D(this,"maxWorkerCount"):null},set:function(a){this.a.maxWorkerCount=a}},requestId:{configurable:!0,enumerable:!0,get:function(){return F(this,"requestId")?D(this,"requestId"):null},set:function(a){this.a.requestId=a}}}); +var vf=function(a){a=void 0===a?{}:a;this.a={};this.a.expression=null==a.i?null:a.i;this.a.description=null==a.description?null:a.description;this.a.tileOptions=null==a.Lb?null:a.Lb;this.a.tileExportOptions=null==a.Kb?null:a.Kb;this.a.requestId=null==a.requestId?null:a.requestId;this.a.maxWorkerCount=null==a.U?null:a.U};n(vf,C);vf.prototype.f=function(){return{keys:"description expression maxWorkerCount requestId tileExportOptions tileOptions".split(" "),u:{expression:Ye,tileExportOptions:tf,tileOptions:wf}}}; +r.Object.defineProperties(vf.prototype,{description:{configurable:!0,enumerable:!0,get:function(){return F(this,"description")?D(this,"description"):null},set:function(a){this.a.description=a}},i:{configurable:!0,enumerable:!0,get:function(){return F(this,"expression")?D(this,"expression"):null},set:function(a){this.a.expression=a}},U:{configurable:!0,enumerable:!0,get:function(){return F(this,"maxWorkerCount")?D(this,"maxWorkerCount"):null},set:function(a){this.a.maxWorkerCount=a}},requestId:{configurable:!0, +enumerable:!0,get:function(){return F(this,"requestId")?D(this,"requestId"):null},set:function(a){this.a.requestId=a}},Kb:{configurable:!0,enumerable:!0,get:function(){return F(this,"tileExportOptions")?D(this,"tileExportOptions"):null},set:function(a){this.a.tileExportOptions=a}},Lb:{configurable:!0,enumerable:!0,get:function(){return F(this,"tileOptions")?D(this,"tileOptions"):null},set:function(a){this.a.tileOptions=a}}}); +var xf=function(a){a=void 0===a?{}:a;this.a={};this.a.expression=null==a.i?null:a.i;this.a.description=null==a.description?null:a.description;this.a.fileExportOptions=null==a.ha?null:a.ha;this.a.assetExportOptions=null==a.Ua?null:a.Ua;this.a.selectors=null==a.selectors?null:a.selectors;this.a.requestId=null==a.requestId?null:a.requestId;this.a.maxErrorMeters=null==a.Db?null:a.Db;this.a.maxWorkerCount=null==a.U?null:a.U;this.a.maxVertices=null==a.maxVertices?null:a.maxVertices};n(xf,C); +xf.prototype.f=function(){return{keys:"assetExportOptions description expression fileExportOptions maxErrorMeters maxVertices maxWorkerCount requestId selectors".split(" "),u:{assetExportOptions:yf,expression:Ye,fileExportOptions:zf}}}; +r.Object.defineProperties(xf.prototype,{Ua:{configurable:!0,enumerable:!0,get:function(){return F(this,"assetExportOptions")?D(this,"assetExportOptions"):null},set:function(a){this.a.assetExportOptions=a}},description:{configurable:!0,enumerable:!0,get:function(){return F(this,"description")?D(this,"description"):null},set:function(a){this.a.description=a}},i:{configurable:!0,enumerable:!0,get:function(){return F(this,"expression")?D(this,"expression"):null},set:function(a){this.a.expression=a}}, +ha:{configurable:!0,enumerable:!0,get:function(){return F(this,"fileExportOptions")?D(this,"fileExportOptions"):null},set:function(a){this.a.fileExportOptions=a}},Db:{configurable:!0,enumerable:!0,get:function(){return F(this,"maxErrorMeters")?D(this,"maxErrorMeters"):null},set:function(a){this.a.maxErrorMeters=a}},maxVertices:{configurable:!0,enumerable:!0,get:function(){return F(this,"maxVertices")?D(this,"maxVertices"):null},set:function(a){this.a.maxVertices=a}},U:{configurable:!0,enumerable:!0, +get:function(){return F(this,"maxWorkerCount")?D(this,"maxWorkerCount"):null},set:function(a){this.a.maxWorkerCount=a}},requestId:{configurable:!0,enumerable:!0,get:function(){return F(this,"requestId")?D(this,"requestId"):null},set:function(a){this.a.requestId=a}},selectors:{configurable:!0,enumerable:!0,get:function(){return F(this,"selectors")?D(this,"selectors"):null},set:function(a){this.a.selectors=a}}}); +var Af=function(a){a=void 0===a?{}:a;this.a={};this.a.expression=null==a.i?null:a.i;this.a.description=null==a.description?null:a.description;this.a.videoOptions=null==a.Ja?null:a.Ja;this.a.tileOptions=null==a.Lb?null:a.Lb;this.a.tileExportOptions=null==a.Kb?null:a.Kb;this.a.requestId=null==a.requestId?null:a.requestId;this.a.version=null==a.version?null:a.version;this.a.maxWorkerCount=null==a.U?null:a.U};n(Af,C); +Af.prototype.f=function(){return{K:{version:se},keys:"description expression maxWorkerCount requestId tileExportOptions tileOptions version videoOptions".split(" "),u:{expression:Ye,tileExportOptions:Bf,tileOptions:wf,videoOptions:Cf}}}; +r.Object.defineProperties(Af.prototype,{description:{configurable:!0,enumerable:!0,get:function(){return F(this,"description")?D(this,"description"):null},set:function(a){this.a.description=a}},i:{configurable:!0,enumerable:!0,get:function(){return F(this,"expression")?D(this,"expression"):null},set:function(a){this.a.expression=a}},U:{configurable:!0,enumerable:!0,get:function(){return F(this,"maxWorkerCount")?D(this,"maxWorkerCount"):null},set:function(a){this.a.maxWorkerCount=a}},requestId:{configurable:!0, +enumerable:!0,get:function(){return F(this,"requestId")?D(this,"requestId"):null},set:function(a){this.a.requestId=a}},Kb:{configurable:!0,enumerable:!0,get:function(){return F(this,"tileExportOptions")?D(this,"tileExportOptions"):null},set:function(a){this.a.tileExportOptions=a}},Lb:{configurable:!0,enumerable:!0,get:function(){return F(this,"tileOptions")?D(this,"tileOptions"):null},set:function(a){this.a.tileOptions=a}},version:{configurable:!0,enumerable:!0,get:function(){return F(this,"version")? +D(this,"version"):null},set:function(a){this.a.version=a}},Ja:{configurable:!0,enumerable:!0,get:function(){return F(this,"videoOptions")?D(this,"videoOptions"):null},set:function(a){this.a.videoOptions=a}}}); +var Df=function(a){a=void 0===a?{}:a;this.a={};this.a.expression=null==a.i?null:a.i;this.a.description=null==a.description?null:a.description;this.a.videoOptions=null==a.Ja?null:a.Ja;this.a.fileExportOptions=null==a.ha?null:a.ha;this.a.requestId=null==a.requestId?null:a.requestId;this.a.maxWorkerCount=null==a.U?null:a.U};n(Df,C);Df.prototype.f=function(){return{keys:"description expression fileExportOptions maxWorkerCount requestId videoOptions".split(" "),u:{expression:Ye,fileExportOptions:Bf,videoOptions:Cf}}}; +r.Object.defineProperties(Df.prototype,{description:{configurable:!0,enumerable:!0,get:function(){return F(this,"description")?D(this,"description"):null},set:function(a){this.a.description=a}},i:{configurable:!0,enumerable:!0,get:function(){return F(this,"expression")?D(this,"expression"):null},set:function(a){this.a.expression=a}},ha:{configurable:!0,enumerable:!0,get:function(){return F(this,"fileExportOptions")?D(this,"fileExportOptions"):null},set:function(a){this.a.fileExportOptions=a}},U:{configurable:!0, +enumerable:!0,get:function(){return F(this,"maxWorkerCount")?D(this,"maxWorkerCount"):null},set:function(a){this.a.maxWorkerCount=a}},requestId:{configurable:!0,enumerable:!0,get:function(){return F(this,"requestId")?D(this,"requestId"):null},set:function(a){this.a.requestId=a}},Ja:{configurable:!0,enumerable:!0,get:function(){return F(this,"videoOptions")?D(this,"videoOptions"):null},set:function(a){this.a.videoOptions=a}}}); +var Te=function(a){a=void 0===a?{}:a;this.a={};this.a.expression=null==a.i?null:a.i;this.a.title=null==a.title?null:a.title;this.a.description=null==a.description?null:a.description;this.a.location=null==a.location?null:a.location};n(Te,C);Te.prototype.f=function(){return{keys:["description","expression","location","title"]}}; +r.Object.defineProperties(Te.prototype,{description:{configurable:!0,enumerable:!0,get:function(){return F(this,"description")?D(this,"description"):null},set:function(a){this.a.description=a}},i:{configurable:!0,enumerable:!0,get:function(){return F(this,"expression")?D(this,"expression"):null},set:function(a){this.a.expression=a}},location:{configurable:!0,enumerable:!0,get:function(){return F(this,"location")?D(this,"location"):null},set:function(a){this.a.location=a}},title:{configurable:!0,enumerable:!0, +get:function(){return F(this,"title")?D(this,"title"):null},set:function(a){this.a.title=a}}});var Ye=function(a){a=void 0===a?{}:a;this.a={};this.a.values=null==a.values?null:a.values;this.a.result=null==a.result?null:a.result};n(Ye,C);Ye.prototype.f=function(){return{keys:["result","values"],xa:{values:{fa:Oe,ka:!1,la:!0,ma:!1}}}}; +r.Object.defineProperties(Ye.prototype,{result:{configurable:!0,enumerable:!0,get:function(){return F(this,"result")?D(this,"result"):null},set:function(a){this.a.result=a}},values:{configurable:!0,enumerable:!0,get:function(){return F(this,"values")?D(this,"values"):null},set:function(a){this.a.values=a}}}); +var Ef=function(a){a=void 0===a?{}:a;this.a={};this.a.name=null==a.name?null:a.name;this.a.expression=null==a.i?null:a.i;this.a.orientation=null==a.orientation?null:a.orientation;this.a.fileFormat=null==a.F?null:a.F;this.a.grid=null==a.J?null:a.J};n(Ef,C);Ef.prototype.f=function(){return{K:{fileFormat:te,orientation:ue},keys:["expression","fileFormat","grid","name","orientation"],u:{expression:Ye,grid:uf}}}; +r.Object.defineProperties(Ef.prototype,{i:{configurable:!0,enumerable:!0,get:function(){return F(this,"expression")?D(this,"expression"):null},set:function(a){this.a.expression=a}},F:{configurable:!0,enumerable:!0,get:function(){return F(this,"fileFormat")?D(this,"fileFormat"):null},set:function(a){this.a.fileFormat=a}},J:{configurable:!0,enumerable:!0,get:function(){return F(this,"grid")?D(this,"grid"):null},set:function(a){this.a.grid=a}},name:{configurable:!0,enumerable:!0,get:function(){return F(this, +"name")?D(this,"name"):null},set:function(a){this.a.name=a}},orientation:{configurable:!0,enumerable:!0,get:function(){return F(this,"orientation")?D(this,"orientation"):null},set:function(a){this.a.orientation=a}}});var lf=function(a){a=void 0===a?{}:a;this.a={};this.a.sizeBytes=null==a.za?null:a.za;this.a.maxSizeBytes=null==a.Eb?null:a.Eb;this.a.assetCount=null==a.je?null:a.je;this.a.maxAssetCount=null==a.$e?null:a.$e};n(lf,C); +lf.prototype.f=function(){return{keys:["assetCount","maxAssetCount","maxSizeBytes","sizeBytes"]}}; +r.Object.defineProperties(lf.prototype,{je:{configurable:!0,enumerable:!0,get:function(){return F(this,"assetCount")?D(this,"assetCount"):null},set:function(a){this.a.assetCount=a}},$e:{configurable:!0,enumerable:!0,get:function(){return F(this,"maxAssetCount")?D(this,"maxAssetCount"):null},set:function(a){this.a.maxAssetCount=a}},Eb:{configurable:!0,enumerable:!0,get:function(){return F(this,"maxSizeBytes")?D(this,"maxSizeBytes"):null},set:function(a){this.a.maxSizeBytes=a}},za:{configurable:!0, +enumerable:!0,get:function(){return F(this,"sizeBytes")?D(this,"sizeBytes"):null},set:function(a){this.a.sizeBytes=a}}});var Ff=function(a){a=void 0===a?{}:a;this.a={};this.a.argumentNames=null==a.nc?null:a.nc;this.a.body=null==a.body?null:a.body};n(Ff,C);Ff.prototype.f=function(){return{keys:["argumentNames","body"]}}; +r.Object.defineProperties(Ff.prototype,{nc:{configurable:!0,enumerable:!0,get:function(){return F(this,"argumentNames")?D(this,"argumentNames"):null},set:function(a){this.a.argumentNames=a}},body:{configurable:!0,enumerable:!0,get:function(){return F(this,"body")?D(this,"body"):null},set:function(a){this.a.body=a}}}); +var Gf=function(a){a=void 0===a?{}:a;this.a={};this.a.functionName=null==a.functionName?null:a.functionName;this.a.functionReference=null==a.ib?null:a.ib;this.a.arguments=null==a.arguments?null:a.arguments};n(Gf,C);Gf.prototype.f=function(){return{keys:["arguments","functionName","functionReference"],xa:{arguments:{fa:Oe,ka:!1,la:!0,ma:!1}}}}; +r.Object.defineProperties(Gf.prototype,{arguments:{configurable:!0,enumerable:!0,get:function(){return F(this,"arguments")?D(this,"arguments"):null},set:function(a){this.a.arguments=a}},functionName:{configurable:!0,enumerable:!0,get:function(){return F(this,"functionName")?D(this,"functionName"):null},set:function(a){this.a.functionName=a}},ib:{configurable:!0,enumerable:!0,get:function(){return F(this,"functionReference")?D(this,"functionReference"):null},set:function(a){this.a.functionReference= +a}}});var Hf=function(a){a=void 0===a?{}:a;this.a={};this.a.bucket=null==a.me?null:a.me;this.a.filenamePrefix=null==a.ua?null:a.ua;this.a.permissions=null==a.permissions?null:a.permissions;this.a.bucketCorsUris=null==a.ne?null:a.ne};n(Hf,C);Hf.prototype.f=function(){return{K:{permissions:ve},keys:["bucket","bucketCorsUris","filenamePrefix","permissions"]}}; +r.Object.defineProperties(Hf.prototype,{me:{configurable:!0,enumerable:!0,get:function(){return F(this,"bucket")?D(this,"bucket"):null},set:function(a){this.a.bucket=a}},ne:{configurable:!0,enumerable:!0,get:function(){return F(this,"bucketCorsUris")?D(this,"bucketCorsUris"):null},set:function(a){this.a.bucketCorsUris=a}},ua:{configurable:!0,enumerable:!0,get:function(){return F(this,"filenamePrefix")?D(this,"filenamePrefix"):null},set:function(a){this.a.filenamePrefix=a}},permissions:{configurable:!0, +enumerable:!0,get:function(){return F(this,"permissions")?D(this,"permissions"):null},set:function(a){this.a.permissions=a}}});r.Object.defineProperties(Hf,{Permissions:{configurable:!0,enumerable:!0,get:function(){return ve}}});var kf=function(a){a=void 0===a?{}:a;this.a={};this.a.uris=null==a.Ra?null:a.Ra};n(kf,C);kf.prototype.f=function(){return{keys:["uris"]}}; +r.Object.defineProperties(kf.prototype,{Ra:{configurable:!0,enumerable:!0,get:function(){return F(this,"uris")?D(this,"uris"):null},set:function(a){this.a.uris=a}}});var If=function(a){a=void 0===a?{}:a;this.a={};this.a.cloudOptimized=null==a.qe?null:a.qe;this.a.tileDimensions=null==a.Ha?null:a.Ha;this.a.skipEmptyFiles=null==a.Cf?null:a.Cf};n(If,C);If.prototype.f=function(){return{keys:["cloudOptimized","skipEmptyFiles","tileDimensions"],u:{tileDimensions:Jf}}}; +r.Object.defineProperties(If.prototype,{qe:{configurable:!0,enumerable:!0,get:function(){return F(this,"cloudOptimized")?D(this,"cloudOptimized"):null},set:function(a){this.a.cloudOptimized=a}},Cf:{configurable:!0,enumerable:!0,get:function(){return F(this,"skipEmptyFiles")?D(this,"skipEmptyFiles"):null},set:function(a){this.a.skipEmptyFiles=a}},Ha:{configurable:!0,enumerable:!0,get:function(){return F(this,"tileDimensions")?D(this,"tileDimensions"):null},set:function(a){this.a.tileDimensions=a}}}); +var Kf=function(a){a=void 0===a?{}:a;this.a={};this.a.options=null==a.options?null:a.options};n(Kf,C);Kf.prototype.f=function(){return{keys:["options"],u:{options:Lf}}};r.Object.defineProperties(Kf.prototype,{options:{configurable:!0,enumerable:!0,get:function(){return F(this,"options")?D(this,"options"):null},set:function(a){this.a.options=a}}});var Lf=function(a){a=void 0===a?{}:a;this.a={};this.a.requestedPolicyVersion=null==a.sh?null:a.sh};n(Lf,C);Lf.prototype.f=function(){return{keys:["requestedPolicyVersion"]}}; +r.Object.defineProperties(Lf.prototype,{sh:{configurable:!0,enumerable:!0,get:function(){return F(this,"requestedPolicyVersion")?D(this,"requestedPolicyVersion"):null},set:function(a){this.a.requestedPolicyVersion=a}}});var Jf=function(a){a=void 0===a?{}:a;this.a={};this.a.width=null==a.width?null:a.width;this.a.height=null==a.height?null:a.height};n(Jf,C);Jf.prototype.f=function(){return{keys:["height","width"]}}; +r.Object.defineProperties(Jf.prototype,{height:{configurable:!0,enumerable:!0,get:function(){return F(this,"height")?D(this,"height"):null},set:function(a){this.a.height=a}},width:{configurable:!0,enumerable:!0,get:function(){return F(this,"width")?D(this,"width"):null},set:function(a){this.a.width=a}}});var Mf=function(a){a=void 0===a?{}:a;this.a={};this.a.x=null==a.x?null:a.x;this.a.y=null==a.y?null:a.y};n(Mf,C);Mf.prototype.f=function(){return{keys:["x","y"]}}; +r.Object.defineProperties(Mf.prototype,{x:{configurable:!0,enumerable:!0,get:function(){return F(this,"x")?D(this,"x"):null},set:function(a){this.a.x=a}},y:{configurable:!0,enumerable:!0,get:function(){return F(this,"y")?D(this,"y"):null},set:function(a){this.a.y=a}}}); +var Nf=function(a){a=void 0===a?{}:a;this.a={};this.a.name=null==a.name?null:a.name;this.a.id=null==a.id?null:a.id;this.a.updateTime=null==a.Ia?null:a.Ia;this.a.title=null==a.title?null:a.title;this.a.description=null==a.description?null:a.description;this.a.properties=null==a.properties?null:a.properties;this.a.startTime=null==a.startTime?null:a.startTime;this.a.endTime=null==a.endTime?null:a.endTime;this.a.geometry=null==a.geometry?null:a.geometry;this.a.bands=null==a.bands?null:a.bands;this.a.sizeBytes= +null==a.za?null:a.za};n(Nf,C);Nf.prototype.f=function(){return{O:{bands:jf},keys:"bands description endTime geometry id name properties sizeBytes startTime title updateTime".split(" "),xa:{geometry:{fa:null,ka:!1,la:!1,ma:!1},properties:{fa:null,ka:!1,la:!1,ma:!1}}}}; +r.Object.defineProperties(Nf.prototype,{bands:{configurable:!0,enumerable:!0,get:function(){return F(this,"bands")?D(this,"bands"):null},set:function(a){this.a.bands=a}},description:{configurable:!0,enumerable:!0,get:function(){return F(this,"description")?D(this,"description"):null},set:function(a){this.a.description=a}},endTime:{configurable:!0,enumerable:!0,get:function(){return F(this,"endTime")?D(this,"endTime"):null},set:function(a){this.a.endTime=a}},geometry:{configurable:!0,enumerable:!0, +get:function(){return F(this,"geometry")?D(this,"geometry"):null},set:function(a){this.a.geometry=a}},id:{configurable:!0,enumerable:!0,get:function(){return F(this,"id")?D(this,"id"):null},set:function(a){this.a.id=a}},name:{configurable:!0,enumerable:!0,get:function(){return F(this,"name")?D(this,"name"):null},set:function(a){this.a.name=a}},properties:{configurable:!0,enumerable:!0,get:function(){return F(this,"properties")?D(this,"properties"):null},set:function(a){this.a.properties=a}},za:{configurable:!0, +enumerable:!0,get:function(){return F(this,"sizeBytes")?D(this,"sizeBytes"):null},set:function(a){this.a.sizeBytes=a}},startTime:{configurable:!0,enumerable:!0,get:function(){return F(this,"startTime")?D(this,"startTime"):null},set:function(a){this.a.startTime=a}},title:{configurable:!0,enumerable:!0,get:function(){return F(this,"title")?D(this,"title"):null},set:function(a){this.a.title=a}},Ia:{configurable:!0,enumerable:!0,get:function(){return F(this,"updateTime")?D(this,"updateTime"):null},set:function(a){this.a.updateTime= +a}}});var sf=function(a){a=void 0===a?{}:a;this.a={};this.a.earthEngineDestination=null==a.wb?null:a.wb;this.a.pyramidingPolicy=null==a.pyramidingPolicy?null:a.pyramidingPolicy;this.a.pyramidingPolicyOverrides=null==a.nf?null:a.nf;this.a.tileSize=null==a.tileSize?null:a.tileSize};n(sf,C); +sf.prototype.f=function(){return{K:{pyramidingPolicy:we,pyramidingPolicyOverrides:xe},keys:["earthEngineDestination","pyramidingPolicy","pyramidingPolicyOverrides","tileSize"],xa:{pyramidingPolicyOverrides:{fa:null,ka:!1,la:!1,ma:!1}},u:{earthEngineDestination:nf}}}; +r.Object.defineProperties(sf.prototype,{wb:{configurable:!0,enumerable:!0,get:function(){return F(this,"earthEngineDestination")?D(this,"earthEngineDestination"):null},set:function(a){this.a.earthEngineDestination=a}},pyramidingPolicy:{configurable:!0,enumerable:!0,get:function(){return F(this,"pyramidingPolicy")?D(this,"pyramidingPolicy"):null},set:function(a){this.a.pyramidingPolicy=a}},nf:{configurable:!0,enumerable:!0,get:function(){return F(this,"pyramidingPolicyOverrides")?D(this,"pyramidingPolicyOverrides"): +null},set:function(a){this.a.pyramidingPolicyOverrides=a}},tileSize:{configurable:!0,enumerable:!0,get:function(){return F(this,"tileSize")?D(this,"tileSize"):null},set:function(a){this.a.tileSize=a}}}); +var jf=function(a){a=void 0===a?{}:a;this.a={};this.a.id=null==a.id?null:a.id;this.a.dataType=null==a.dataType?null:a.dataType;this.a.grid=null==a.J?null:a.J;this.a.pyramidingPolicy=null==a.pyramidingPolicy?null:a.pyramidingPolicy;this.a.tilesets=null==a.tilesets?null:a.tilesets;this.a.missingData=null==a.missingData?null:a.missingData};n(jf,C); +jf.prototype.f=function(){return{O:{tilesets:Of},K:{pyramidingPolicy:ye},keys:"dataType grid id missingData pyramidingPolicy tilesets".split(" "),u:{dataType:Pf,grid:uf,missingData:Qf}}}; +r.Object.defineProperties(jf.prototype,{dataType:{configurable:!0,enumerable:!0,get:function(){return F(this,"dataType")?D(this,"dataType"):null},set:function(a){this.a.dataType=a}},J:{configurable:!0,enumerable:!0,get:function(){return F(this,"grid")?D(this,"grid"):null},set:function(a){this.a.grid=a}},id:{configurable:!0,enumerable:!0,get:function(){return F(this,"id")?D(this,"id"):null},set:function(a){this.a.id=a}},missingData:{configurable:!0,enumerable:!0,get:function(){return F(this,"missingData")? +D(this,"missingData"):null},set:function(a){this.a.missingData=a}},pyramidingPolicy:{configurable:!0,enumerable:!0,get:function(){return F(this,"pyramidingPolicy")?D(this,"pyramidingPolicy"):null},set:function(a){this.a.pyramidingPolicy=a}},tilesets:{configurable:!0,enumerable:!0,get:function(){return F(this,"tilesets")?D(this,"tilesets"):null},set:function(a){this.a.tilesets=a}}}); +var tf=function(a){a=void 0===a?{}:a;this.a={};this.a.fileFormat=null==a.F?null:a.F;this.a.driveDestination=null==a.ga?null:a.ga;this.a.gcsDestination=null==a.ia?null:a.ia;this.a.geoTiffOptions=null==a.ld?null:a.ld;this.a.tfRecordOptions=null==a.Jd?null:a.Jd};n(tf,C);tf.prototype.f=function(){return{K:{fileFormat:ze},keys:["driveDestination","fileFormat","gcsDestination","geoTiffOptions","tfRecordOptions"],u:{driveDestination:gf,gcsDestination:Hf,geoTiffOptions:If,tfRecordOptions:Rf}}}; +r.Object.defineProperties(tf.prototype,{ga:{configurable:!0,enumerable:!0,get:function(){return F(this,"driveDestination")?D(this,"driveDestination"):null},set:function(a){this.a.driveDestination=a}},F:{configurable:!0,enumerable:!0,get:function(){return F(this,"fileFormat")?D(this,"fileFormat"):null},set:function(a){this.a.fileFormat=a}},ia:{configurable:!0,enumerable:!0,get:function(){return F(this,"gcsDestination")?D(this,"gcsDestination"):null},set:function(a){this.a.gcsDestination=a}},ld:{configurable:!0, +enumerable:!0,get:function(){return F(this,"geoTiffOptions")?D(this,"geoTiffOptions"):null},set:function(a){this.a.geoTiffOptions=a}},Jd:{configurable:!0,enumerable:!0,get:function(){return F(this,"tfRecordOptions")?D(this,"tfRecordOptions"):null},set:function(a){this.a.tfRecordOptions=a}}}); +var Sf=function(a){a=void 0===a?{}:a;this.a={};this.a.name=null==a.name?null:a.name;this.a.properties=null==a.properties?null:a.properties;this.a.uriPrefix=null==a.Uc?null:a.Uc;this.a.tilesets=null==a.tilesets?null:a.tilesets;this.a.bands=null==a.bands?null:a.bands;this.a.maskBands=null==a.Ze?null:a.Ze;this.a.footprint=null==a.Cg?null:a.Cg;this.a.missingData=null==a.missingData?null:a.missingData;this.a.pyramidingPolicy=null==a.pyramidingPolicy?null:a.pyramidingPolicy;this.a.startTime=null==a.startTime? +null:a.startTime;this.a.endTime=null==a.endTime?null:a.endTime};n(Sf,C);Sf.prototype.f=function(){return{O:{bands:Tf,maskBands:Uf,tilesets:Vf},K:{pyramidingPolicy:Ae},keys:"bands endTime footprint maskBands missingData name properties pyramidingPolicy startTime tilesets uriPrefix".split(" "),xa:{properties:{fa:null,ka:!1,la:!1,ma:!1}},u:{footprint:Wf,missingData:Qf}}}; +r.Object.defineProperties(Sf.prototype,{bands:{configurable:!0,enumerable:!0,get:function(){return F(this,"bands")?D(this,"bands"):null},set:function(a){this.a.bands=a}},endTime:{configurable:!0,enumerable:!0,get:function(){return F(this,"endTime")?D(this,"endTime"):null},set:function(a){this.a.endTime=a}},Cg:{configurable:!0,enumerable:!0,get:function(){return F(this,"footprint")?D(this,"footprint"):null},set:function(a){this.a.footprint=a}},Ze:{configurable:!0,enumerable:!0,get:function(){return F(this, +"maskBands")?D(this,"maskBands"):null},set:function(a){this.a.maskBands=a}},missingData:{configurable:!0,enumerable:!0,get:function(){return F(this,"missingData")?D(this,"missingData"):null},set:function(a){this.a.missingData=a}},name:{configurable:!0,enumerable:!0,get:function(){return F(this,"name")?D(this,"name"):null},set:function(a){this.a.name=a}},properties:{configurable:!0,enumerable:!0,get:function(){return F(this,"properties")?D(this,"properties"):null},set:function(a){this.a.properties= +a}},pyramidingPolicy:{configurable:!0,enumerable:!0,get:function(){return F(this,"pyramidingPolicy")?D(this,"pyramidingPolicy"):null},set:function(a){this.a.pyramidingPolicy=a}},startTime:{configurable:!0,enumerable:!0,get:function(){return F(this,"startTime")?D(this,"startTime"):null},set:function(a){this.a.startTime=a}},tilesets:{configurable:!0,enumerable:!0,get:function(){return F(this,"tilesets")?D(this,"tilesets"):null},set:function(a){this.a.tilesets=a}},Uc:{configurable:!0,enumerable:!0,get:function(){return F(this, +"uriPrefix")?D(this,"uriPrefix"):null},set:function(a){this.a.uriPrefix=a}}});var Xf=function(a){a=void 0===a?{}:a;this.a={};this.a.uris=null==a.Ra?null:a.Ra;this.a.affineTransform=null==a.qb?null:a.qb};n(Xf,C);Xf.prototype.f=function(){return{keys:["affineTransform","uris"],u:{affineTransform:Ke}}}; +r.Object.defineProperties(Xf.prototype,{qb:{configurable:!0,enumerable:!0,get:function(){return F(this,"affineTransform")?D(this,"affineTransform"):null},set:function(a){this.a.affineTransform=a}},Ra:{configurable:!0,enumerable:!0,get:function(){return F(this,"uris")?D(this,"uris"):null},set:function(a){this.a.uris=a}}}); +var Yf=function(a){a=void 0===a?{}:a;this.a={};this.a.imageManifest=null==a.Pe?null:a.Pe;this.a.description=null==a.description?null:a.description;this.a.overwrite=null==a.overwrite?null:a.overwrite;this.a.requestId=null==a.requestId?null:a.requestId};n(Yf,C);Yf.prototype.f=function(){return{keys:["description","imageManifest","overwrite","requestId"],u:{imageManifest:Sf}}}; +r.Object.defineProperties(Yf.prototype,{description:{configurable:!0,enumerable:!0,get:function(){return F(this,"description")?D(this,"description"):null},set:function(a){this.a.description=a}},Pe:{configurable:!0,enumerable:!0,get:function(){return F(this,"imageManifest")?D(this,"imageManifest"):null},set:function(a){this.a.imageManifest=a}},overwrite:{configurable:!0,enumerable:!0,get:function(){return F(this,"overwrite")?D(this,"overwrite"):null},set:function(a){this.a.overwrite=a}},requestId:{configurable:!0, +enumerable:!0,get:function(){return F(this,"requestId")?D(this,"requestId"):null},set:function(a){this.a.requestId=a}}});var Zf=function(a){a=void 0===a?{}:a;this.a={};this.a.tableManifest=null==a.Hf?null:a.Hf;this.a.description=null==a.description?null:a.description;this.a.overwrite=null==a.overwrite?null:a.overwrite;this.a.requestId=null==a.requestId?null:a.requestId};n(Zf,C);Zf.prototype.f=function(){return{keys:["description","overwrite","requestId","tableManifest"],u:{tableManifest:$f}}}; +r.Object.defineProperties(Zf.prototype,{description:{configurable:!0,enumerable:!0,get:function(){return F(this,"description")?D(this,"description"):null},set:function(a){this.a.description=a}},overwrite:{configurable:!0,enumerable:!0,get:function(){return F(this,"overwrite")?D(this,"overwrite"):null},set:function(a){this.a.overwrite=a}},requestId:{configurable:!0,enumerable:!0,get:function(){return F(this,"requestId")?D(this,"requestId"):null},set:function(a){this.a.requestId=a}},Hf:{configurable:!0, +enumerable:!0,get:function(){return F(this,"tableManifest")?D(this,"tableManifest"):null},set:function(a){this.a.tableManifest=a}}});var ag=function(a){a=void 0===a?{}:a;this.a={};this.a.algorithms=null==a.mc?null:a.mc};n(ag,C);ag.prototype.f=function(){return{O:{algorithms:Le},keys:["algorithms"]}};r.Object.defineProperties(ag.prototype,{mc:{configurable:!0,enumerable:!0,get:function(){return F(this,"algorithms")?D(this,"algorithms"):null},set:function(a){this.a.algorithms=a}}}); +var bg=function(a){a=void 0===a?{}:a;this.a={};this.a.assets=null==a.S?null:a.S;this.a.nextPageToken=null==a.nextPageToken?null:a.nextPageToken};n(bg,C);bg.prototype.f=function(){return{O:{assets:hf},keys:["assets","nextPageToken"]}}; +r.Object.defineProperties(bg.prototype,{S:{configurable:!0,enumerable:!0,get:function(){return F(this,"assets")?D(this,"assets"):null},set:function(a){this.a.assets=a}},nextPageToken:{configurable:!0,enumerable:!0,get:function(){return F(this,"nextPageToken")?D(this,"nextPageToken"):null},set:function(a){this.a.nextPageToken=a}}});var cg=function(a){a=void 0===a?{}:a;this.a={};this.a.images=null==a.images?null:a.images;this.a.nextPageToken=null==a.nextPageToken?null:a.nextPageToken};n(cg,C); +cg.prototype.f=function(){return{O:{images:Nf},keys:["images","nextPageToken"]}};r.Object.defineProperties(cg.prototype,{images:{configurable:!0,enumerable:!0,get:function(){return F(this,"images")?D(this,"images"):null},set:function(a){this.a.images=a}},nextPageToken:{configurable:!0,enumerable:!0,get:function(){return F(this,"nextPageToken")?D(this,"nextPageToken"):null},set:function(a){this.a.nextPageToken=a}}}); +var dg=function(a){a=void 0===a?{}:a;this.a={};this.a.operations=null==a.Fa?null:a.Fa;this.a.nextPageToken=null==a.nextPageToken?null:a.nextPageToken};n(dg,C);dg.prototype.f=function(){return{O:{operations:eg},keys:["nextPageToken","operations"]}}; +r.Object.defineProperties(dg.prototype,{nextPageToken:{configurable:!0,enumerable:!0,get:function(){return F(this,"nextPageToken")?D(this,"nextPageToken"):null},set:function(a){this.a.nextPageToken=a}},Fa:{configurable:!0,enumerable:!0,get:function(){return F(this,"operations")?D(this,"operations"):null},set:function(a){this.a.operations=a}}}); +var fg=function(a){a=void 0===a?{}:a;this.a={};this.a.counter=null==a.jg?null:a.jg;this.a.dataAccess=null==a.pg?null:a.pg;this.a.cloudAudit=null==a.eg?null:a.eg};n(fg,C);fg.prototype.f=function(){return{keys:["cloudAudit","counter","dataAccess"],u:{cloudAudit:We,counter:bf,dataAccess:df}}}; +r.Object.defineProperties(fg.prototype,{eg:{configurable:!0,enumerable:!0,get:function(){return F(this,"cloudAudit")?D(this,"cloudAudit"):null},set:function(a){this.a.cloudAudit=a}},jg:{configurable:!0,enumerable:!0,get:function(){return F(this,"counter")?D(this,"counter"):null},set:function(a){this.a.counter=a}},pg:{configurable:!0,enumerable:!0,get:function(){return F(this,"dataAccess")?D(this,"dataAccess"):null},set:function(a){this.a.dataAccess=a}}}); +var Qf=function(a){a=void 0===a?{}:a;this.a={};this.a.values=null==a.values?null:a.values};n(Qf,C);Qf.prototype.f=function(){return{keys:["values"]}};r.Object.defineProperties(Qf.prototype,{values:{configurable:!0,enumerable:!0,get:function(){return F(this,"values")?D(this,"values"):null},set:function(a){this.a.values=a}}});var gg=function(a){a=void 0===a?{}:a;this.a={};this.a.destinationName=null==a.ub?null:a.ub};n(gg,C);gg.prototype.f=function(){return{keys:["destinationName"]}}; +r.Object.defineProperties(gg.prototype,{ub:{configurable:!0,enumerable:!0,get:function(){return F(this,"destinationName")?D(this,"destinationName"):null},set:function(a){this.a.destinationName=a}}});var eg=function(a){a=void 0===a?{}:a;this.a={};this.a.name=null==a.name?null:a.name;this.a.metadata=null==a.cf?null:a.cf;this.a.done=null==a.done?null:a.done;this.a.error=null==a.error?null:a.error;this.a.response=null==a.response?null:a.response};n(eg,C); +eg.prototype.f=function(){return{keys:["done","error","metadata","name","response"],xa:{metadata:{fa:null,ka:!1,la:!1,ma:!1},response:{fa:null,ka:!1,la:!1,ma:!1}},u:{error:hg}}}; +r.Object.defineProperties(eg.prototype,{done:{configurable:!0,enumerable:!0,get:function(){return F(this,"done")?D(this,"done"):null},set:function(a){this.a.done=a}},error:{configurable:!0,enumerable:!0,get:function(){return F(this,"error")?D(this,"error"):null},set:function(a){this.a.error=a}},cf:{configurable:!0,enumerable:!0,get:function(){return F(this,"metadata")?D(this,"metadata"):null},set:function(a){this.a.metadata=a}},name:{configurable:!0,enumerable:!0,get:function(){return F(this,"name")? +D(this,"name"):null},set:function(a){this.a.name=a}},response:{configurable:!0,enumerable:!0,get:function(){return F(this,"response")?D(this,"response"):null},set:function(a){this.a.response=a}}}); +var ig=function(a){a=void 0===a?{}:a;this.a={};this.a.state=null==a.state?null:a.state;this.a.description=null==a.description?null:a.description;this.a.type=null==a.type?null:a.type;this.a.priority=null==a.priority?null:a.priority;this.a.createTime=null==a.we?null:a.we;this.a.updateTime=null==a.Ia?null:a.Ia;this.a.startTime=null==a.startTime?null:a.startTime;this.a.endTime=null==a.endTime?null:a.endTime;this.a.scriptUri=null==a.wf?null:a.wf;this.a.destinationUris=null==a.ze?null:a.ze};n(ig,C); +ig.prototype.f=function(){return{K:{state:Be},keys:"createTime description destinationUris endTime priority scriptUri startTime state type updateTime".split(" ")}}; +r.Object.defineProperties(ig.prototype,{we:{configurable:!0,enumerable:!0,get:function(){return F(this,"createTime")?D(this,"createTime"):null},set:function(a){this.a.createTime=a}},description:{configurable:!0,enumerable:!0,get:function(){return F(this,"description")?D(this,"description"):null},set:function(a){this.a.description=a}},ze:{configurable:!0,enumerable:!0,get:function(){return F(this,"destinationUris")?D(this,"destinationUris"):null},set:function(a){this.a.destinationUris=a}},endTime:{configurable:!0, +enumerable:!0,get:function(){return F(this,"endTime")?D(this,"endTime"):null},set:function(a){this.a.endTime=a}},priority:{configurable:!0,enumerable:!0,get:function(){return F(this,"priority")?D(this,"priority"):null},set:function(a){this.a.priority=a}},wf:{configurable:!0,enumerable:!0,get:function(){return F(this,"scriptUri")?D(this,"scriptUri"):null},set:function(a){this.a.scriptUri=a}},startTime:{configurable:!0,enumerable:!0,get:function(){return F(this,"startTime")?D(this,"startTime"):null}, +set:function(a){this.a.startTime=a}},state:{configurable:!0,enumerable:!0,get:function(){return F(this,"state")?D(this,"state"):null},set:function(a){this.a.state=a}},type:{configurable:!0,enumerable:!0,get:function(){return F(this,"type")?D(this,"type"):null},set:function(a){this.a.type=a}},Ia:{configurable:!0,enumerable:!0,get:function(){return F(this,"updateTime")?D(this,"updateTime"):null},set:function(a){this.a.updateTime=a}}}); +var Pf=function(a){a=void 0===a?{}:a;this.a={};this.a.precision=null==a.precision?null:a.precision;this.a.range=null==a.Nc?null:a.Nc;this.a.dimensionsCount=null==a.tg?null:a.tg};n(Pf,C);Pf.prototype.f=function(){return{K:{precision:Ce},keys:["dimensionsCount","precision","range"],u:{range:ff}}}; +r.Object.defineProperties(Pf.prototype,{tg:{configurable:!0,enumerable:!0,get:function(){return F(this,"dimensionsCount")?D(this,"dimensionsCount"):null},set:function(a){this.a.dimensionsCount=a}},precision:{configurable:!0,enumerable:!0,get:function(){return F(this,"precision")?D(this,"precision"):null},set:function(a){this.a.precision=a}},Nc:{configurable:!0,enumerable:!0,get:function(){return F(this,"range")?D(this,"range"):null},set:function(a){this.a.range=a}}}); +var Wf=function(a){a=void 0===a?{}:a;this.a={};this.a.points=null==a.mh?null:a.mh;this.a.bandId=null==a.Xf?null:a.Xf};n(Wf,C);Wf.prototype.f=function(){return{O:{points:Mf},keys:["bandId","points"]}};r.Object.defineProperties(Wf.prototype,{Xf:{configurable:!0,enumerable:!0,get:function(){return F(this,"bandId")?D(this,"bandId"):null},set:function(a){this.a.bandId=a}},mh:{configurable:!0,enumerable:!0,get:function(){return F(this,"points")?D(this,"points"):null},set:function(a){this.a.points=a}}}); +var uf=function(a){a=void 0===a?{}:a;this.a={};this.a.crsCode=null==a.xe?null:a.xe;this.a.crsWkt=null==a.lg?null:a.lg;this.a.dimensions=null==a.dimensions?null:a.dimensions;this.a.affineTransform=null==a.qb?null:a.qb};n(uf,C);uf.prototype.f=function(){return{keys:["affineTransform","crsCode","crsWkt","dimensions"],u:{affineTransform:Ke,dimensions:Jf}}}; +r.Object.defineProperties(uf.prototype,{qb:{configurable:!0,enumerable:!0,get:function(){return F(this,"affineTransform")?D(this,"affineTransform"):null},set:function(a){this.a.affineTransform=a}},xe:{configurable:!0,enumerable:!0,get:function(){return F(this,"crsCode")?D(this,"crsCode"):null},set:function(a){this.a.crsCode=a}},lg:{configurable:!0,enumerable:!0,get:function(){return F(this,"crsWkt")?D(this,"crsWkt"):null},set:function(a){this.a.crsWkt=a}},dimensions:{configurable:!0,enumerable:!0, +get:function(){return F(this,"dimensions")?D(this,"dimensions"):null},set:function(a){this.a.dimensions=a}}});var jg=function(a){a=void 0===a?{}:a;this.a={};this.a.version=null==a.version?null:a.version;this.a.bindings=null==a.dd?null:a.dd;this.a.auditConfigs=null==a.Uf?null:a.Uf;this.a.rules=null==a.rules?null:a.rules;this.a.etag=null==a.De?null:a.De;this.a.iamOwned=null==a.Mg?null:a.Mg};n(jg,C);jg.prototype.f=function(){return{O:{auditConfigs:Pe,bindings:Se,rules:kg},keys:"auditConfigs bindings etag iamOwned rules version".split(" ")}}; +r.Object.defineProperties(jg.prototype,{Uf:{configurable:!0,enumerable:!0,get:function(){return F(this,"auditConfigs")?D(this,"auditConfigs"):null},set:function(a){this.a.auditConfigs=a}},dd:{configurable:!0,enumerable:!0,get:function(){return F(this,"bindings")?D(this,"bindings"):null},set:function(a){this.a.bindings=a}},De:{configurable:!0,enumerable:!0,get:function(){return F(this,"etag")?D(this,"etag"):null},set:function(a){this.a.etag=a}},Mg:{configurable:!0,enumerable:!0,get:function(){return F(this, +"iamOwned")?D(this,"iamOwned"):null},set:function(a){this.a.iamOwned=a}},rules:{configurable:!0,enumerable:!0,get:function(){return F(this,"rules")?D(this,"rules"):null},set:function(a){this.a.rules=a}},version:{configurable:!0,enumerable:!0,get:function(){return F(this,"version")?D(this,"version"):null},set:function(a){this.a.version=a}}}); +var kg=function(a){a=void 0===a?{}:a;this.a={};this.a.description=null==a.description?null:a.description;this.a.permissions=null==a.permissions?null:a.permissions;this.a.action=null==a.action?null:a.action;this.a["in"]=null==a.Rg?null:a.Rg;this.a.notIn=null==a.eh?null:a.eh;this.a.conditions=null==a.conditions?null:a.conditions;this.a.logConfig=null==a.Yg?null:a.Yg};n(kg,C);kg.prototype.f=function(){return{O:{conditions:$e,logConfig:fg},K:{action:De},keys:"action conditions description in logConfig notIn permissions".split(" ")}}; +r.Object.defineProperties(kg.prototype,{action:{configurable:!0,enumerable:!0,get:function(){return F(this,"action")?D(this,"action"):null},set:function(a){this.a.action=a}},conditions:{configurable:!0,enumerable:!0,get:function(){return F(this,"conditions")?D(this,"conditions"):null},set:function(a){this.a.conditions=a}},description:{configurable:!0,enumerable:!0,get:function(){return F(this,"description")?D(this,"description"):null},set:function(a){this.a.description=a}},Rg:{configurable:!0,enumerable:!0, +get:function(){return F(this,"in")?D(this,"in"):null},set:function(a){this.a["in"]=a}},Yg:{configurable:!0,enumerable:!0,get:function(){return F(this,"logConfig")?D(this,"logConfig"):null},set:function(a){this.a.logConfig=a}},eh:{configurable:!0,enumerable:!0,get:function(){return F(this,"notIn")?D(this,"notIn"):null},set:function(a){this.a.notIn=a}},permissions:{configurable:!0,enumerable:!0,get:function(){return F(this,"permissions")?D(this,"permissions"):null},set:function(a){this.a.permissions= +a}}});var lg=function(a){a=void 0===a?{}:a;this.a={};this.a.assets=null==a.S?null:a.S;this.a.nextPageToken=null==a.nextPageToken?null:a.nextPageToken};n(lg,C);lg.prototype.f=function(){return{O:{assets:hf},keys:["assets","nextPageToken"]}}; +r.Object.defineProperties(lg.prototype,{S:{configurable:!0,enumerable:!0,get:function(){return F(this,"assets")?D(this,"assets"):null},set:function(a){this.a.assets=a}},nextPageToken:{configurable:!0,enumerable:!0,get:function(){return F(this,"nextPageToken")?D(this,"nextPageToken"):null},set:function(a){this.a.nextPageToken=a}}});var mg=function(a){a=void 0===a?{}:a;this.a={};this.a.policy=null==a.gf?null:a.gf;this.a.updateMask=null==a.jc?null:a.jc};n(mg,C); +mg.prototype.f=function(){return{keys:["policy","updateMask"],u:{policy:jg}}};r.Object.defineProperties(mg.prototype,{gf:{configurable:!0,enumerable:!0,get:function(){return F(this,"policy")?D(this,"policy"):null},set:function(a){this.a.policy=a}},jc:{configurable:!0,enumerable:!0,get:function(){return F(this,"updateMask")?D(this,"updateMask"):null},set:function(a){this.a.updateMask=a}}}); +var hg=function(a){a=void 0===a?{}:a;this.a={};this.a.code=null==a.code?null:a.code;this.a.message=null==a.message?null:a.message;this.a.details=null==a.details?null:a.details};n(hg,C);hg.prototype.f=function(){return{keys:["code","details","message"],xa:{details:{fa:null,ka:!0,la:!1,ma:!1}}}}; +r.Object.defineProperties(hg.prototype,{code:{configurable:!0,enumerable:!0,get:function(){return F(this,"code")?D(this,"code"):null},set:function(a){this.a.code=a}},details:{configurable:!0,enumerable:!0,get:function(){return F(this,"details")?D(this,"details"):null},set:function(a){this.a.details=a}},message:{configurable:!0,enumerable:!0,get:function(){return F(this,"message")?D(this,"message"):null},set:function(a){this.a.message=a}}}); +var yf=function(a){a=void 0===a?{}:a;this.a={};this.a.earthEngineDestination=null==a.wb?null:a.wb};n(yf,C);yf.prototype.f=function(){return{keys:["earthEngineDestination"],u:{earthEngineDestination:nf}}};r.Object.defineProperties(yf.prototype,{wb:{configurable:!0,enumerable:!0,get:function(){return F(this,"earthEngineDestination")?D(this,"earthEngineDestination"):null},set:function(a){this.a.earthEngineDestination=a}}}); +var zf=function(a){a=void 0===a?{}:a;this.a={};this.a.fileFormat=null==a.F?null:a.F;this.a.driveDestination=null==a.ga?null:a.ga;this.a.gcsDestination=null==a.ia?null:a.ia};n(zf,C);zf.prototype.f=function(){return{K:{fileFormat:Ee},keys:["driveDestination","fileFormat","gcsDestination"],u:{driveDestination:gf,gcsDestination:Hf}}}; +r.Object.defineProperties(zf.prototype,{ga:{configurable:!0,enumerable:!0,get:function(){return F(this,"driveDestination")?D(this,"driveDestination"):null},set:function(a){this.a.driveDestination=a}},F:{configurable:!0,enumerable:!0,get:function(){return F(this,"fileFormat")?D(this,"fileFormat"):null},set:function(a){this.a.fileFormat=a}},ia:{configurable:!0,enumerable:!0,get:function(){return F(this,"gcsDestination")?D(this,"gcsDestination"):null},set:function(a){this.a.gcsDestination=a}}}); +var $f=function(a){a=void 0===a?{}:a;this.a={};this.a.name=null==a.name?null:a.name;this.a.properties=null==a.properties?null:a.properties;this.a.uriPrefix=null==a.Uc?null:a.Uc;this.a.sources=null==a.sources?null:a.sources;this.a.startTime=null==a.startTime?null:a.startTime;this.a.endTime=null==a.endTime?null:a.endTime};n($f,C);$f.prototype.f=function(){return{O:{sources:ng},keys:"endTime name properties sources startTime uriPrefix".split(" "),xa:{properties:{fa:null,ka:!1,la:!1,ma:!1}}}}; +r.Object.defineProperties($f.prototype,{endTime:{configurable:!0,enumerable:!0,get:function(){return F(this,"endTime")?D(this,"endTime"):null},set:function(a){this.a.endTime=a}},name:{configurable:!0,enumerable:!0,get:function(){return F(this,"name")?D(this,"name"):null},set:function(a){this.a.name=a}},properties:{configurable:!0,enumerable:!0,get:function(){return F(this,"properties")?D(this,"properties"):null},set:function(a){this.a.properties=a}},sources:{configurable:!0,enumerable:!0,get:function(){return F(this, +"sources")?D(this,"sources"):null},set:function(a){this.a.sources=a}},startTime:{configurable:!0,enumerable:!0,get:function(){return F(this,"startTime")?D(this,"startTime"):null},set:function(a){this.a.startTime=a}},Uc:{configurable:!0,enumerable:!0,get:function(){return F(this,"uriPrefix")?D(this,"uriPrefix"):null},set:function(a){this.a.uriPrefix=a}}}); +var ng=function(a){a=void 0===a?{}:a;this.a={};this.a.uris=null==a.Ra?null:a.Ra;this.a.charset=null==a.charset?null:a.charset;this.a.maxErrorMeters=null==a.Db?null:a.Db;this.a.maxVertices=null==a.maxVertices?null:a.maxVertices;this.a.crs=null==a.crs?null:a.crs;this.a.geodesic=null==a.geodesic?null:a.geodesic;this.a.primaryGeometryColumn=null==a.nh?null:a.nh;this.a.xColumn=null==a.Lh?null:a.Lh;this.a.yColumn=null==a.Mh?null:a.Mh;this.a.dateFormat=null==a.qg?null:a.qg;this.a.csvDelimiter=null==a.mg? +null:a.mg;this.a.csvQualifier=null==a.ng?null:a.ng};n(ng,C);ng.prototype.f=function(){return{keys:"charset crs csvDelimiter csvQualifier dateFormat geodesic maxErrorMeters maxVertices primaryGeometryColumn uris xColumn yColumn".split(" ")}}; +r.Object.defineProperties(ng.prototype,{charset:{configurable:!0,enumerable:!0,get:function(){return F(this,"charset")?D(this,"charset"):null},set:function(a){this.a.charset=a}},crs:{configurable:!0,enumerable:!0,get:function(){return F(this,"crs")?D(this,"crs"):null},set:function(a){this.a.crs=a}},mg:{configurable:!0,enumerable:!0,get:function(){return F(this,"csvDelimiter")?D(this,"csvDelimiter"):null},set:function(a){this.a.csvDelimiter=a}},ng:{configurable:!0,enumerable:!0,get:function(){return F(this, +"csvQualifier")?D(this,"csvQualifier"):null},set:function(a){this.a.csvQualifier=a}},qg:{configurable:!0,enumerable:!0,get:function(){return F(this,"dateFormat")?D(this,"dateFormat"):null},set:function(a){this.a.dateFormat=a}},geodesic:{configurable:!0,enumerable:!0,get:function(){return F(this,"geodesic")?D(this,"geodesic"):null},set:function(a){this.a.geodesic=a}},Db:{configurable:!0,enumerable:!0,get:function(){return F(this,"maxErrorMeters")?D(this,"maxErrorMeters"):null},set:function(a){this.a.maxErrorMeters= +a}},maxVertices:{configurable:!0,enumerable:!0,get:function(){return F(this,"maxVertices")?D(this,"maxVertices"):null},set:function(a){this.a.maxVertices=a}},nh:{configurable:!0,enumerable:!0,get:function(){return F(this,"primaryGeometryColumn")?D(this,"primaryGeometryColumn"):null},set:function(a){this.a.primaryGeometryColumn=a}},Ra:{configurable:!0,enumerable:!0,get:function(){return F(this,"uris")?D(this,"uris"):null},set:function(a){this.a.uris=a}},Lh:{configurable:!0,enumerable:!0,get:function(){return F(this, +"xColumn")?D(this,"xColumn"):null},set:function(a){this.a.xColumn=a}},Mh:{configurable:!0,enumerable:!0,get:function(){return F(this,"yColumn")?D(this,"yColumn"):null},set:function(a){this.a.yColumn=a}}}); +var Rf=function(a){a=void 0===a?{}:a;this.a={};this.a.tileDimensions=null==a.Ha?null:a.Ha;this.a.marginDimensions=null==a.Ye?null:a.Ye;this.a.compress=null==a.se?null:a.se;this.a.maxSizeBytes=null==a.Eb?null:a.Eb;this.a.defaultValue=null==a.defaultValue?null:a.defaultValue;this.a.tensorDepths=null==a.Id?null:a.Id;this.a.sequenceData=null==a.xf?null:a.xf;this.a.collapseBands=null==a.re?null:a.re;this.a.maxMaskedRatio=null==a.af?null:a.af};n(Rf,C); +Rf.prototype.f=function(){return{keys:"collapseBands compress defaultValue marginDimensions maxMaskedRatio maxSizeBytes sequenceData tensorDepths tileDimensions".split(" "),xa:{tensorDepths:{fa:null,ka:!1,la:!1,ma:!1}},u:{marginDimensions:Jf,tileDimensions:Jf}}}; +r.Object.defineProperties(Rf.prototype,{re:{configurable:!0,enumerable:!0,get:function(){return F(this,"collapseBands")?D(this,"collapseBands"):null},set:function(a){this.a.collapseBands=a}},se:{configurable:!0,enumerable:!0,get:function(){return F(this,"compress")?D(this,"compress"):null},set:function(a){this.a.compress=a}},defaultValue:{configurable:!0,enumerable:!0,get:function(){return F(this,"defaultValue")?D(this,"defaultValue"):null},set:function(a){this.a.defaultValue=a}},Ye:{configurable:!0, +enumerable:!0,get:function(){return F(this,"marginDimensions")?D(this,"marginDimensions"):null},set:function(a){this.a.marginDimensions=a}},af:{configurable:!0,enumerable:!0,get:function(){return F(this,"maxMaskedRatio")?D(this,"maxMaskedRatio"):null},set:function(a){this.a.maxMaskedRatio=a}},Eb:{configurable:!0,enumerable:!0,get:function(){return F(this,"maxSizeBytes")?D(this,"maxSizeBytes"):null},set:function(a){this.a.maxSizeBytes=a}},xf:{configurable:!0,enumerable:!0,get:function(){return F(this, +"sequenceData")?D(this,"sequenceData"):null},set:function(a){this.a.sequenceData=a}},Id:{configurable:!0,enumerable:!0,get:function(){return F(this,"tensorDepths")?D(this,"tensorDepths"):null},set:function(a){this.a.tensorDepths=a}},Ha:{configurable:!0,enumerable:!0,get:function(){return F(this,"tileDimensions")?D(this,"tileDimensions"):null},set:function(a){this.a.tileDimensions=a}}}); +var og=function(a){a=void 0===a?{}:a;this.a={};this.a.name=null==a.name?null:a.name;this.a.expression=null==a.i?null:a.i;this.a.fileFormat=null==a.F?null:a.F;this.a.bandIds=null==a.ba?null:a.ba;this.a.visualizationOptions=null==a.Ob?null:a.Ob;this.a.grid=null==a.J?null:a.J;this.a.filenamePrefix=null==a.ua?null:a.ua};n(og,C);og.prototype.f=function(){return{K:{fileFormat:Fe},keys:"bandIds expression fileFormat filenamePrefix grid name visualizationOptions".split(" "),u:{expression:Ye,grid:uf,visualizationOptions:pf}}}; +r.Object.defineProperties(og.prototype,{ba:{configurable:!0,enumerable:!0,get:function(){return F(this,"bandIds")?D(this,"bandIds"):null},set:function(a){this.a.bandIds=a}},i:{configurable:!0,enumerable:!0,get:function(){return F(this,"expression")?D(this,"expression"):null},set:function(a){this.a.expression=a}},F:{configurable:!0,enumerable:!0,get:function(){return F(this,"fileFormat")?D(this,"fileFormat"):null},set:function(a){this.a.fileFormat=a}},ua:{configurable:!0,enumerable:!0,get:function(){return F(this, +"filenamePrefix")?D(this,"filenamePrefix"):null},set:function(a){this.a.filenamePrefix=a}},J:{configurable:!0,enumerable:!0,get:function(){return F(this,"grid")?D(this,"grid"):null},set:function(a){this.a.grid=a}},name:{configurable:!0,enumerable:!0,get:function(){return F(this,"name")?D(this,"name"):null},set:function(a){this.a.name=a}},Ob:{configurable:!0,enumerable:!0,get:function(){return F(this,"visualizationOptions")?D(this,"visualizationOptions"):null},set:function(a){this.a.visualizationOptions= +a}}});var wf=function(a){a=void 0===a?{}:a;this.a={};this.a.maxZoom=null==a.maxZoom?null:a.maxZoom;this.a.scale=null==a.scale?null:a.scale;this.a.minZoom=null==a.minZoom?null:a.minZoom;this.a.skipEmptyTiles=null==a.Df?null:a.Df;this.a.mapsApiKey=null==a.Xe?null:a.Xe;this.a.tileDimensions=null==a.Ha?null:a.Ha;this.a.stride=null==a.Ef?null:a.Ef;this.a.zoomSubset=null==a.Pf?null:a.Pf};n(wf,C); +wf.prototype.f=function(){return{keys:"mapsApiKey maxZoom minZoom scale skipEmptyTiles stride tileDimensions zoomSubset".split(" "),u:{tileDimensions:Jf,zoomSubset:pg}}}; +r.Object.defineProperties(wf.prototype,{Xe:{configurable:!0,enumerable:!0,get:function(){return F(this,"mapsApiKey")?D(this,"mapsApiKey"):null},set:function(a){this.a.mapsApiKey=a}},maxZoom:{configurable:!0,enumerable:!0,get:function(){return F(this,"maxZoom")?D(this,"maxZoom"):null},set:function(a){this.a.maxZoom=a}},minZoom:{configurable:!0,enumerable:!0,get:function(){return F(this,"minZoom")?D(this,"minZoom"):null},set:function(a){this.a.minZoom=a}},scale:{configurable:!0,enumerable:!0,get:function(){return F(this, +"scale")?D(this,"scale"):null},set:function(a){this.a.scale=a}},Df:{configurable:!0,enumerable:!0,get:function(){return F(this,"skipEmptyTiles")?D(this,"skipEmptyTiles"):null},set:function(a){this.a.skipEmptyTiles=a}},Ef:{configurable:!0,enumerable:!0,get:function(){return F(this,"stride")?D(this,"stride"):null},set:function(a){this.a.stride=a}},Ha:{configurable:!0,enumerable:!0,get:function(){return F(this,"tileDimensions")?D(this,"tileDimensions"):null},set:function(a){this.a.tileDimensions=a}}, +Pf:{configurable:!0,enumerable:!0,get:function(){return F(this,"zoomSubset")?D(this,"zoomSubset"):null},set:function(a){this.a.zoomSubset=a}}});var Vf=function(a){a=void 0===a?{}:a;this.a={};this.a.id=null==a.id?null:a.id;this.a.sources=null==a.sources?null:a.sources;this.a.dataType=null==a.dataType?null:a.dataType;this.a.crs=null==a.crs?null:a.crs;this.a.subdatasetPrefix=null==a.Ch?null:a.Ch;this.a.subdatasetSuffix=null==a.Dh?null:a.Dh};n(Vf,C); +Vf.prototype.f=function(){return{O:{sources:Xf},K:{dataType:He},keys:"crs dataType id sources subdatasetPrefix subdatasetSuffix".split(" ")}}; +r.Object.defineProperties(Vf.prototype,{crs:{configurable:!0,enumerable:!0,get:function(){return F(this,"crs")?D(this,"crs"):null},set:function(a){this.a.crs=a}},dataType:{configurable:!0,enumerable:!0,get:function(){return F(this,"dataType")?D(this,"dataType"):null},set:function(a){this.a.dataType=a}},id:{configurable:!0,enumerable:!0,get:function(){return F(this,"id")?D(this,"id"):null},set:function(a){this.a.id=a}},sources:{configurable:!0,enumerable:!0,get:function(){return F(this,"sources")? +D(this,"sources"):null},set:function(a){this.a.sources=a}},Ch:{configurable:!0,enumerable:!0,get:function(){return F(this,"subdatasetPrefix")?D(this,"subdatasetPrefix"):null},set:function(a){this.a.subdatasetPrefix=a}},Dh:{configurable:!0,enumerable:!0,get:function(){return F(this,"subdatasetSuffix")?D(this,"subdatasetSuffix"):null},set:function(a){this.a.subdatasetSuffix=a}}}); +var Tf=function(a){a=void 0===a?{}:a;this.a={};this.a.id=null==a.id?null:a.id;this.a.tilesetId=null==a.hc?null:a.hc;this.a.tilesetBandIndex=null==a.Hh?null:a.Hh;this.a.missingData=null==a.missingData?null:a.missingData;this.a.pyramidingPolicy=null==a.pyramidingPolicy?null:a.pyramidingPolicy};n(Tf,C);Tf.prototype.f=function(){return{K:{pyramidingPolicy:Ge},keys:["id","missingData","pyramidingPolicy","tilesetBandIndex","tilesetId"],u:{missingData:Qf}}}; +r.Object.defineProperties(Tf.prototype,{id:{configurable:!0,enumerable:!0,get:function(){return F(this,"id")?D(this,"id"):null},set:function(a){this.a.id=a}},missingData:{configurable:!0,enumerable:!0,get:function(){return F(this,"missingData")?D(this,"missingData"):null},set:function(a){this.a.missingData=a}},pyramidingPolicy:{configurable:!0,enumerable:!0,get:function(){return F(this,"pyramidingPolicy")?D(this,"pyramidingPolicy"):null},set:function(a){this.a.pyramidingPolicy=a}},Hh:{configurable:!0, +enumerable:!0,get:function(){return F(this,"tilesetBandIndex")?D(this,"tilesetBandIndex"):null},set:function(a){this.a.tilesetBandIndex=a}},hc:{configurable:!0,enumerable:!0,get:function(){return F(this,"tilesetId")?D(this,"tilesetId"):null},set:function(a){this.a.tilesetId=a}}});var Uf=function(a){a=void 0===a?{}:a;this.a={};this.a.tilesetId=null==a.hc?null:a.hc;this.a.bandIds=null==a.ba?null:a.ba};n(Uf,C);Uf.prototype.f=function(){return{keys:["bandIds","tilesetId"]}}; +r.Object.defineProperties(Uf.prototype,{ba:{configurable:!0,enumerable:!0,get:function(){return F(this,"bandIds")?D(this,"bandIds"):null},set:function(a){this.a.bandIds=a}},hc:{configurable:!0,enumerable:!0,get:function(){return F(this,"tilesetId")?D(this,"tilesetId"):null},set:function(a){this.a.tilesetId=a}}});var mf=function(a){a=void 0===a?{}:a;this.a={};this.a.sources=null==a.sources?null:a.sources;this.a.pathPrefix=null==a.pathPrefix?null:a.pathPrefix};n(mf,C); +mf.prototype.f=function(){return{O:{sources:qg},keys:["pathPrefix","sources"]}};r.Object.defineProperties(mf.prototype,{pathPrefix:{configurable:!0,enumerable:!0,get:function(){return F(this,"pathPrefix")?D(this,"pathPrefix"):null},set:function(a){this.a.pathPrefix=a}},sources:{configurable:!0,enumerable:!0,get:function(){return F(this,"sources")?D(this,"sources"):null},set:function(a){this.a.sources=a}}}); +var qg=function(a){a=void 0===a?{}:a;this.a={};this.a.pathSuffix=null==a.pathSuffix?null:a.pathSuffix;this.a.headerSizeBytes=null==a.Kg?null:a.Kg};n(qg,C);qg.prototype.f=function(){return{keys:["headerSizeBytes","pathSuffix"]}}; +r.Object.defineProperties(qg.prototype,{Kg:{configurable:!0,enumerable:!0,get:function(){return F(this,"headerSizeBytes")?D(this,"headerSizeBytes"):null},set:function(a){this.a.headerSizeBytes=a}},pathSuffix:{configurable:!0,enumerable:!0,get:function(){return F(this,"pathSuffix")?D(this,"pathSuffix"):null},set:function(a){this.a.pathSuffix=a}}}); +var Of=function(a){a=void 0===a?{}:a;this.a={};this.a.fileIndexes=null==a.xg?null:a.xg;this.a.firstTileIndex=null==a.zg?null:a.zg;this.a.tilesPerFile=null==a.Gh?null:a.Gh};n(Of,C);Of.prototype.f=function(){return{keys:["fileIndexes","firstTileIndex","tilesPerFile"]}}; +r.Object.defineProperties(Of.prototype,{xg:{configurable:!0,enumerable:!0,get:function(){return F(this,"fileIndexes")?D(this,"fileIndexes"):null},set:function(a){this.a.fileIndexes=a}},zg:{configurable:!0,enumerable:!0,get:function(){return F(this,"firstTileIndex")?D(this,"firstTileIndex"):null},set:function(a){this.a.firstTileIndex=a}},Gh:{configurable:!0,enumerable:!0,get:function(){return F(this,"tilesPerFile")?D(this,"tilesPerFile"):null},set:function(a){this.a.tilesPerFile=a}}}); +var rg=function(a){a=void 0===a?{}:a;this.a={};this.a.asset=null==a.ie?null:a.ie;this.a.updateMask=null==a.jc?null:a.jc};n(rg,C);rg.prototype.f=function(){return{keys:["asset","updateMask"],u:{asset:hf}}}; +r.Object.defineProperties(rg.prototype,{ie:{configurable:!0,enumerable:!0,get:function(){return F(this,"asset")?D(this,"asset"):null},set:function(a){this.a.asset=a}},jc:{configurable:!0,enumerable:!0,get:function(){return F(this,"updateMask")?D(this,"updateMask"):null},set:function(a){this.a.updateMask=a}}}); +var Oe=function(a){a=void 0===a?{}:a;this.a={};this.a.constantValue=null==a.tb?null:a.tb;this.a.integerValue=null==a.Te?null:a.Te;this.a.bytesValue=null==a.oe?null:a.oe;this.a.arrayValue=null==a.rb?null:a.rb;this.a.dictionaryValue=null==a.vb?null:a.vb;this.a.functionDefinitionValue=null==a.yb?null:a.yb;this.a.functionInvocationValue=null==a.hb?null:a.hb;this.a.argumentReference=null==a.oc?null:a.oc;this.a.valueReference=null==a.cb?null:a.cb};n(Oe,C); +Oe.prototype.f=function(){return{keys:"argumentReference arrayValue bytesValue constantValue dictionaryValue functionDefinitionValue functionInvocationValue integerValue valueReference".split(" "),u:{arrayValue:Ne,dictionaryValue:ef,functionDefinitionValue:Ff,functionInvocationValue:Gf}}}; +r.Object.defineProperties(Oe.prototype,{oc:{configurable:!0,enumerable:!0,get:function(){return F(this,"argumentReference")?D(this,"argumentReference"):null},set:function(a){this.a.argumentReference=a}},rb:{configurable:!0,enumerable:!0,get:function(){return F(this,"arrayValue")?D(this,"arrayValue"):null},set:function(a){this.a.arrayValue=a}},oe:{configurable:!0,enumerable:!0,get:function(){return F(this,"bytesValue")?D(this,"bytesValue"):null},set:function(a){this.a.bytesValue=a}},tb:{configurable:!0, +enumerable:!0,get:function(){return F(this,"constantValue")?D(this,"constantValue"):null},set:function(a){this.a.constantValue=a}},vb:{configurable:!0,enumerable:!0,get:function(){return F(this,"dictionaryValue")?D(this,"dictionaryValue"):null},set:function(a){this.a.dictionaryValue=a}},yb:{configurable:!0,enumerable:!0,get:function(){return F(this,"functionDefinitionValue")?D(this,"functionDefinitionValue"):null},set:function(a){this.a.functionDefinitionValue=a}},hb:{configurable:!0,enumerable:!0, +get:function(){return F(this,"functionInvocationValue")?D(this,"functionInvocationValue"):null},set:function(a){this.a.functionInvocationValue=a}},Te:{configurable:!0,enumerable:!0,get:function(){return F(this,"integerValue")?D(this,"integerValue"):null},set:function(a){this.a.integerValue=a}},cb:{configurable:!0,enumerable:!0,get:function(){return F(this,"valueReference")?D(this,"valueReference"):null},set:function(a){this.a.valueReference=a}}}); +var Bf=function(a){a=void 0===a?{}:a;this.a={};this.a.fileFormat=null==a.F?null:a.F;this.a.driveDestination=null==a.ga?null:a.ga;this.a.gcsDestination=null==a.ia?null:a.ia};n(Bf,C);Bf.prototype.f=function(){return{K:{fileFormat:Ie},keys:["driveDestination","fileFormat","gcsDestination"],u:{driveDestination:gf,gcsDestination:Hf}}}; +r.Object.defineProperties(Bf.prototype,{ga:{configurable:!0,enumerable:!0,get:function(){return F(this,"driveDestination")?D(this,"driveDestination"):null},set:function(a){this.a.driveDestination=a}},F:{configurable:!0,enumerable:!0,get:function(){return F(this,"fileFormat")?D(this,"fileFormat"):null},set:function(a){this.a.fileFormat=a}},ia:{configurable:!0,enumerable:!0,get:function(){return F(this,"gcsDestination")?D(this,"gcsDestination"):null},set:function(a){this.a.gcsDestination=a}}}); +var Cf=function(a){a=void 0===a?{}:a;this.a={};this.a.framesPerSecond=null==a.framesPerSecond?null:a.framesPerSecond;this.a.maxFrames=null==a.maxFrames?null:a.maxFrames;this.a.maxPixelsPerFrame=null==a.maxPixelsPerFrame?null:a.maxPixelsPerFrame};n(Cf,C);Cf.prototype.f=function(){return{keys:["framesPerSecond","maxFrames","maxPixelsPerFrame"]}}; +r.Object.defineProperties(Cf.prototype,{framesPerSecond:{configurable:!0,enumerable:!0,get:function(){return F(this,"framesPerSecond")?D(this,"framesPerSecond"):null},set:function(a){this.a.framesPerSecond=a}},maxFrames:{configurable:!0,enumerable:!0,get:function(){return F(this,"maxFrames")?D(this,"maxFrames"):null},set:function(a){this.a.maxFrames=a}},maxPixelsPerFrame:{configurable:!0,enumerable:!0,get:function(){return F(this,"maxPixelsPerFrame")?D(this,"maxPixelsPerFrame"):null},set:function(a){this.a.maxPixelsPerFrame= +a}}});var sg=function(a){a=void 0===a?{}:a;this.a={};this.a.name=null==a.name?null:a.name;this.a.expression=null==a.i?null:a.i;this.a.videoOptions=null==a.Ja?null:a.Ja;this.a.fileFormat=null==a.F?null:a.F;this.a.grid=null==a.J?null:a.J};n(sg,C);sg.prototype.f=function(){return{K:{fileFormat:Je},keys:["expression","fileFormat","grid","name","videoOptions"],u:{expression:Ye,grid:uf,videoOptions:Cf}}}; +r.Object.defineProperties(sg.prototype,{i:{configurable:!0,enumerable:!0,get:function(){return F(this,"expression")?D(this,"expression"):null},set:function(a){this.a.expression=a}},F:{configurable:!0,enumerable:!0,get:function(){return F(this,"fileFormat")?D(this,"fileFormat"):null},set:function(a){this.a.fileFormat=a}},J:{configurable:!0,enumerable:!0,get:function(){return F(this,"grid")?D(this,"grid"):null},set:function(a){this.a.grid=a}},name:{configurable:!0,enumerable:!0,get:function(){return F(this, +"name")?D(this,"name"):null},set:function(a){this.a.name=a}},Ja:{configurable:!0,enumerable:!0,get:function(){return F(this,"videoOptions")?D(this,"videoOptions"):null},set:function(a){this.a.videoOptions=a}}});var pf=function(a){a=void 0===a?{}:a;this.a={};this.a.ranges=null==a.pf?null:a.pf;this.a.paletteColors=null==a.Lc?null:a.Lc;this.a.gamma=null==a.gamma?null:a.gamma;this.a.opacity=null==a.opacity?null:a.opacity};n(pf,C); +pf.prototype.f=function(){return{O:{ranges:ff},keys:["gamma","opacity","paletteColors","ranges"]}}; +r.Object.defineProperties(pf.prototype,{gamma:{configurable:!0,enumerable:!0,get:function(){return F(this,"gamma")?D(this,"gamma"):null},set:function(a){this.a.gamma=a}},opacity:{configurable:!0,enumerable:!0,get:function(){return F(this,"opacity")?D(this,"opacity"):null},set:function(a){this.a.opacity=a}},Lc:{configurable:!0,enumerable:!0,get:function(){return F(this,"paletteColors")?D(this,"paletteColors"):null},set:function(a){this.a.paletteColors=a}},pf:{configurable:!0,enumerable:!0,get:function(){return F(this, +"ranges")?D(this,"ranges"):null},set:function(a){this.a.ranges=a}}});var pg=function(a){a=void 0===a?{}:a;this.a={};this.a.min=null==a.min?null:a.min;this.a.max=null==a.max?null:a.max};n(pg,C);pg.prototype.f=function(){return{keys:["max","min"]}}; +r.Object.defineProperties(pg.prototype,{max:{configurable:!0,enumerable:!0,get:function(){return F(this,"max")?D(this,"max"):null},set:function(a){this.a.max=a}},min:{configurable:!0,enumerable:!0,get:function(){return F(this,"min")?D(this,"min"):null},set:function(a){this.a.min=a}}});var tg=function(a){this.m="v1alpha";this.h=new ge(a,null)}; +tg.prototype.list=function(a,b){var c=void 0===b?{$Xgafv:void 0,access_token:void 0,alt:void 0,callback:void 0,fields:void 0,key:void 0,oauth_token:void 0,prettyPrint:void 0,quotaUser:void 0,uploadType:void 0,upload_protocol:void 0}:b;b=void 0===c.$Xgafv?void 0:c.$Xgafv;var d=void 0===c.access_token?void 0:c.access_token,e=void 0===c.alt?void 0:c.alt,f=void 0===c.callback?void 0:c.callback,g=void 0===c.fields?void 0:c.fields,h=void 0===c.key?void 0:c.key,m=void 0===c.oauth_token?void 0:c.oauth_token, +p=void 0===c.prettyPrint?void 0:c.prettyPrint,q=void 0===c.quotaUser?void 0:c.quotaUser,v=void 0===c.uploadType?void 0:c.uploadType;c=void 0===c.upload_protocol?void 0:c.upload_protocol;this.h.w(a,/^projects\/[^/]+$/);return G(this.h,{body:null,s:"GET",A:"earthengine.projects.algorithms.list",path:"/"+this.m+"/"+a+"/algorithms",o:{"$.xgafv":b,access_token:d,alt:e,callback:f,fields:g,key:h,oauth_token:m,prettyPrint:p,quotaUser:q,uploadType:v,upload_protocol:c},C:ag})}; +var ug=function(a){this.m="v1alpha";this.h=new ge(a,null)}; +ug.prototype.getCapabilities=function(a,b){var c=void 0===b?{$Xgafv:void 0,access_token:void 0,alt:void 0,callback:void 0,fields:void 0,key:void 0,oauth_token:void 0,prettyPrint:void 0,quotaUser:void 0,uploadType:void 0,upload_protocol:void 0}:b;b=void 0===c.$Xgafv?void 0:c.$Xgafv;var d=void 0===c.access_token?void 0:c.access_token,e=void 0===c.alt?void 0:c.alt,f=void 0===c.callback?void 0:c.callback,g=void 0===c.fields?void 0:c.fields,h=void 0===c.key?void 0:c.key,m=void 0===c.oauth_token?void 0: +c.oauth_token,p=void 0===c.prettyPrint?void 0:c.prettyPrint,q=void 0===c.quotaUser?void 0:c.quotaUser,v=void 0===c.uploadType?void 0:c.uploadType;c=void 0===c.upload_protocol?void 0:c.upload_protocol;this.h.w(a,/^projects\/[^/]+$/);return G(this.h,{body:null,s:"GET",A:"earthengine.projects.getCapabilities",path:"/"+this.m+"/"+a+"/capabilities",o:{"$.xgafv":b,access_token:d,alt:e,callback:f,fields:g,key:h,oauth_token:m,prettyPrint:p,quotaUser:q,uploadType:v,upload_protocol:c},C:Ve})}; +ug.prototype.Gc=function(a,b){var c=void 0===b?{$Xgafv:void 0,access_token:void 0,alt:void 0,callback:void 0,fields:void 0,key:void 0,oauth_token:void 0,pageSize:void 0,pageToken:void 0,prettyPrint:void 0,quotaUser:void 0,uploadType:void 0,upload_protocol:void 0}:b;b=void 0===c.$Xgafv?void 0:c.$Xgafv;var d=void 0===c.access_token?void 0:c.access_token,e=void 0===c.alt?void 0:c.alt,f=void 0===c.callback?void 0:c.callback,g=void 0===c.fields?void 0:c.fields,h=void 0===c.key?void 0:c.key,m=void 0=== +c.oauth_token?void 0:c.oauth_token,p=void 0===c.pageSize?void 0:c.pageSize,q=void 0===c.pageToken?void 0:c.pageToken,v=void 0===c.prettyPrint?void 0:c.prettyPrint,z=void 0===c.quotaUser?void 0:c.quotaUser,E=void 0===c.uploadType?void 0:c.uploadType;c=void 0===c.upload_protocol?void 0:c.upload_protocol;this.h.w(a,/^projects\/[^/]+$/);return G(this.h,{body:null,s:"GET",A:"earthengine.projects.listAssets",path:"/"+this.m+"/"+a+":listAssets",o:{"$.xgafv":b,access_token:d,alt:e,callback:f,fields:g,key:h, +oauth_token:m,pageSize:p,pageToken:q,prettyPrint:v,quotaUser:z,uploadType:E,upload_protocol:c},C:bg})};var vg=function(a){this.m="v1alpha";this.h=new ge(a,null)};k=vg.prototype; +k.create=function(a,b,c){var d=void 0===c?{$Xgafv:void 0,access_token:void 0,alt:void 0,assetId:void 0,callback:void 0,fields:void 0,key:void 0,oauth_token:void 0,overwrite:void 0,prettyPrint:void 0,quotaUser:void 0,uploadType:void 0,upload_protocol:void 0}:c;c=void 0===d.$Xgafv?void 0:d.$Xgafv;var e=void 0===d.access_token?void 0:d.access_token,f=void 0===d.alt?void 0:d.alt,g=void 0===d.assetId?void 0:d.assetId,h=void 0===d.callback?void 0:d.callback,m=void 0===d.fields?void 0:d.fields,p=void 0=== +d.key?void 0:d.key,q=void 0===d.oauth_token?void 0:d.oauth_token,v=void 0===d.overwrite?void 0:d.overwrite,z=void 0===d.prettyPrint?void 0:d.prettyPrint,E=void 0===d.quotaUser?void 0:d.quotaUser,L=void 0===d.uploadType?void 0:d.uploadType;d=void 0===d.upload_protocol?void 0:d.upload_protocol;this.h.w(a,/^projects\/[^/]+$/);return G(this.h,{body:b,s:"POST",A:"earthengine.projects.assets.create",path:"/"+this.m+"/"+a+"/assets",o:{"$.xgafv":c,access_token:e,alt:f,assetId:g,callback:h,fields:m,key:p, +oauth_token:q,overwrite:v,prettyPrint:z,quotaUser:E,uploadType:L,upload_protocol:d},C:hf})}; +k.delete=function(a,b){var c=void 0===b?{$Xgafv:void 0,access_token:void 0,alt:void 0,callback:void 0,fields:void 0,key:void 0,oauth_token:void 0,prettyPrint:void 0,quotaUser:void 0,uploadType:void 0,upload_protocol:void 0}:b;b=void 0===c.$Xgafv?void 0:c.$Xgafv;var d=void 0===c.access_token?void 0:c.access_token,e=void 0===c.alt?void 0:c.alt,f=void 0===c.callback?void 0:c.callback,g=void 0===c.fields?void 0:c.fields,h=void 0===c.key?void 0:c.key,m=void 0===c.oauth_token?void 0:c.oauth_token,p=void 0=== +c.prettyPrint?void 0:c.prettyPrint,q=void 0===c.quotaUser?void 0:c.quotaUser,v=void 0===c.uploadType?void 0:c.uploadType;c=void 0===c.upload_protocol?void 0:c.upload_protocol;this.h.w(a,/^projects\/[^/]+\/assets\/.*$/);return G(this.h,{body:null,s:"DELETE",A:"earthengine.projects.assets.delete",path:"/"+this.m+"/"+a,o:{"$.xgafv":b,access_token:d,alt:e,callback:f,fields:g,key:h,oauth_token:m,prettyPrint:p,quotaUser:q,uploadType:v,upload_protocol:c},C:qf})}; +k.get=function(a,b){var c=void 0===b?{$Xgafv:void 0,access_token:void 0,alt:void 0,callback:void 0,fields:void 0,key:void 0,oauth_token:void 0,prettyPrint:void 0,quotaUser:void 0,uploadType:void 0,upload_protocol:void 0}:b;b=void 0===c.$Xgafv?void 0:c.$Xgafv;var d=void 0===c.access_token?void 0:c.access_token,e=void 0===c.alt?void 0:c.alt,f=void 0===c.callback?void 0:c.callback,g=void 0===c.fields?void 0:c.fields,h=void 0===c.key?void 0:c.key,m=void 0===c.oauth_token?void 0:c.oauth_token,p=void 0=== +c.prettyPrint?void 0:c.prettyPrint,q=void 0===c.quotaUser?void 0:c.quotaUser,v=void 0===c.uploadType?void 0:c.uploadType;c=void 0===c.upload_protocol?void 0:c.upload_protocol;this.h.w(a,/^projects\/[^/]+\/assets\/.*$/);return G(this.h,{body:null,s:"GET",A:"earthengine.projects.assets.get",path:"/"+this.m+"/"+a,o:{"$.xgafv":b,access_token:d,alt:e,callback:f,fields:g,key:h,oauth_token:m,prettyPrint:p,quotaUser:q,uploadType:v,upload_protocol:c},C:hf})}; +k.link=function(a,b,c){var d=void 0===c?{$Xgafv:void 0,access_token:void 0,alt:void 0,callback:void 0,fields:void 0,key:void 0,oauth_token:void 0,prettyPrint:void 0,quotaUser:void 0,uploadType:void 0,upload_protocol:void 0}:c;c=void 0===d.$Xgafv?void 0:d.$Xgafv;var e=void 0===d.access_token?void 0:d.access_token,f=void 0===d.alt?void 0:d.alt,g=void 0===d.callback?void 0:d.callback,h=void 0===d.fields?void 0:d.fields,m=void 0===d.key?void 0:d.key,p=void 0===d.oauth_token?void 0:d.oauth_token,q=void 0=== +d.prettyPrint?void 0:d.prettyPrint,v=void 0===d.quotaUser?void 0:d.quotaUser,z=void 0===d.uploadType?void 0:d.uploadType;d=void 0===d.upload_protocol?void 0:d.upload_protocol;this.h.w(a,/^projects\/[^/]+\/assets\/.*$/);return G(this.h,{body:b,s:"POST",A:"earthengine.projects.assets.link",path:"/"+this.m+"/"+a+":link",o:{"$.xgafv":c,access_token:e,alt:f,callback:g,fields:h,key:m,oauth_token:p,prettyPrint:q,quotaUser:v,uploadType:z,upload_protocol:d},C:hf})}; +k.Gc=function(a,b){var c=void 0===b?{$Xgafv:void 0,access_token:void 0,alt:void 0,callback:void 0,fields:void 0,key:void 0,oauth_token:void 0,pageSize:void 0,pageToken:void 0,prettyPrint:void 0,quotaUser:void 0,uploadType:void 0,upload_protocol:void 0}:b;b=void 0===c.$Xgafv?void 0:c.$Xgafv;var d=void 0===c.access_token?void 0:c.access_token,e=void 0===c.alt?void 0:c.alt,f=void 0===c.callback?void 0:c.callback,g=void 0===c.fields?void 0:c.fields,h=void 0===c.key?void 0:c.key,m=void 0===c.oauth_token? +void 0:c.oauth_token,p=void 0===c.pageSize?void 0:c.pageSize,q=void 0===c.pageToken?void 0:c.pageToken,v=void 0===c.prettyPrint?void 0:c.prettyPrint,z=void 0===c.quotaUser?void 0:c.quotaUser,E=void 0===c.uploadType?void 0:c.uploadType;c=void 0===c.upload_protocol?void 0:c.upload_protocol;this.h.w(a,/^projects\/[^/]+\/assets\/.*$/);return G(this.h,{body:null,s:"GET",A:"earthengine.projects.assets.listAssets",path:"/"+this.m+"/"+a+":listAssets",o:{"$.xgafv":b,access_token:d,alt:e,callback:f,fields:g, +key:h,oauth_token:m,pageSize:p,pageToken:q,prettyPrint:v,quotaUser:z,uploadType:E,upload_protocol:c},C:bg})}; +var wg=function(a,b,c){var d=void 0===c?{$Xgafv:void 0,access_token:void 0,alt:void 0,callback:void 0,endTime:void 0,fields:void 0,filter:void 0,key:void 0,oauth_token:void 0,pageSize:void 0,pageToken:void 0,prettyPrint:void 0,quotaUser:void 0,region:void 0,startTime:void 0,uploadType:void 0,upload_protocol:void 0,view:void 0}:c;c=void 0===d.$Xgafv?void 0:d.$Xgafv;var e=void 0===d.access_token?void 0:d.access_token,f=void 0===d.alt?void 0:d.alt,g=void 0===d.callback?void 0:d.callback,h=void 0===d.endTime? +void 0:d.endTime,m=void 0===d.fields?void 0:d.fields,p=void 0===d.filter?void 0:d.filter,q=void 0===d.key?void 0:d.key,v=void 0===d.oauth_token?void 0:d.oauth_token,z=void 0===d.pageSize?void 0:d.pageSize,E=void 0===d.pageToken?void 0:d.pageToken,L=void 0===d.prettyPrint?void 0:d.prettyPrint,Z=void 0===d.quotaUser?void 0:d.quotaUser,Kj=void 0===d.region?void 0:d.region,Lj=void 0===d.startTime?void 0:d.startTime,Mj=void 0===d.uploadType?void 0:d.uploadType,Nj=void 0===d.upload_protocol?void 0:d.upload_protocol; +d=void 0===d.view?void 0:d.view;a.h.w(b,/^projects\/[^/]+\/assets\/.*$/);return G(a.h,{body:null,s:"GET",A:"earthengine.projects.assets.listImages",path:"/"+a.m+"/"+b+":listImages",o:{"$.xgafv":c,access_token:e,alt:f,callback:g,endTime:h,fields:m,filter:p,key:q,oauth_token:v,pageSize:z,pageToken:E,prettyPrint:L,quotaUser:Z,region:Kj,startTime:Lj,uploadType:Mj,upload_protocol:Nj,view:d},C:cg})}; +vg.prototype.move=function(a,b,c){var d=void 0===c?{$Xgafv:void 0,access_token:void 0,alt:void 0,callback:void 0,fields:void 0,key:void 0,oauth_token:void 0,prettyPrint:void 0,quotaUser:void 0,uploadType:void 0,upload_protocol:void 0}:c;c=void 0===d.$Xgafv?void 0:d.$Xgafv;var e=void 0===d.access_token?void 0:d.access_token,f=void 0===d.alt?void 0:d.alt,g=void 0===d.callback?void 0:d.callback,h=void 0===d.fields?void 0:d.fields,m=void 0===d.key?void 0:d.key,p=void 0===d.oauth_token?void 0:d.oauth_token, +q=void 0===d.prettyPrint?void 0:d.prettyPrint,v=void 0===d.quotaUser?void 0:d.quotaUser,z=void 0===d.uploadType?void 0:d.uploadType;d=void 0===d.upload_protocol?void 0:d.upload_protocol;this.h.w(a,/^projects\/[^/]+\/assets\/.*$/);return G(this.h,{body:b,s:"POST",A:"earthengine.projects.assets.move",path:"/"+this.m+"/"+a+":move",o:{"$.xgafv":c,access_token:e,alt:f,callback:g,fields:h,key:m,oauth_token:p,prettyPrint:q,quotaUser:v,uploadType:z,upload_protocol:d},C:hf})}; +vg.prototype.search=function(a,b){var c=void 0===b?{$Xgafv:void 0,access_token:void 0,alt:void 0,callback:void 0,fields:void 0,key:void 0,nextPageToken:void 0,oauth_token:void 0,pageSize:void 0,prettyPrint:void 0,query:void 0,quotaUser:void 0,uploadType:void 0,upload_protocol:void 0}:b;b=void 0===c.$Xgafv?void 0:c.$Xgafv;var d=void 0===c.access_token?void 0:c.access_token,e=void 0===c.alt?void 0:c.alt,f=void 0===c.callback?void 0:c.callback,g=void 0===c.fields?void 0:c.fields,h=void 0===c.key?void 0: +c.key,m=void 0===c.nextPageToken?void 0:c.nextPageToken,p=void 0===c.oauth_token?void 0:c.oauth_token,q=void 0===c.pageSize?void 0:c.pageSize,v=void 0===c.prettyPrint?void 0:c.prettyPrint,z=void 0===c.query?void 0:c.query,E=void 0===c.quotaUser?void 0:c.quotaUser,L=void 0===c.uploadType?void 0:c.uploadType;c=void 0===c.upload_protocol?void 0:c.upload_protocol;this.h.w(a,/^projects\/[^/]+$/);return G(this.h,{body:null,s:"GET",A:"earthengine.projects.assets.search",path:"/"+this.m+"/"+a+"/assets:search", +o:{"$.xgafv":b,access_token:d,alt:e,callback:f,fields:g,key:h,nextPageToken:m,oauth_token:p,pageSize:q,prettyPrint:v,query:z,quotaUser:E,uploadType:L,upload_protocol:c},C:lg})};var xg=function(a){this.m="v1alpha";this.h=new ge(a,null)}; +xg.prototype.create=function(a,b,c){var d=void 0===c?{$Xgafv:void 0,access_token:void 0,alt:void 0,callback:void 0,fields:void 0,key:void 0,oauth_token:void 0,prettyPrint:void 0,quotaUser:void 0,uploadType:void 0,upload_protocol:void 0}:c;c=void 0===d.$Xgafv?void 0:d.$Xgafv;var e=void 0===d.access_token?void 0:d.access_token,f=void 0===d.alt?void 0:d.alt,g=void 0===d.callback?void 0:d.callback,h=void 0===d.fields?void 0:d.fields,m=void 0===d.key?void 0:d.key,p=void 0===d.oauth_token?void 0:d.oauth_token, +q=void 0===d.prettyPrint?void 0:d.prettyPrint,v=void 0===d.quotaUser?void 0:d.quotaUser,z=void 0===d.uploadType?void 0:d.uploadType;d=void 0===d.upload_protocol?void 0:d.upload_protocol;this.h.w(a,/^projects\/[^/]+$/);return G(this.h,{body:b,s:"POST",A:"earthengine.projects.filmstripThumbnails.create",path:"/"+this.m+"/"+a+"/filmstripThumbnails",o:{"$.xgafv":c,access_token:e,alt:f,callback:g,fields:h,key:m,oauth_token:p,prettyPrint:q,quotaUser:v,uploadType:z,upload_protocol:d},C:Ef})}; +var yg=function(a){this.m="v1alpha";this.h=new ge(a,null)};yg.prototype.Xa=function(a,b){this.h.w(a,/^projects\/[^/]+$/);return G(this.h,{body:b,s:"POST",A:"earthengine.projects.image.export",path:"/"+this.m+"/"+a+"/image:export",o:{"$.xgafv":void 0,access_token:void 0,alt:void 0,callback:void 0,fields:void 0,key:void 0,oauth_token:void 0,prettyPrint:void 0,quotaUser:void 0,uploadType:void 0,upload_protocol:void 0},C:eg})}; +yg.prototype.import=function(a,b,c){var d=void 0===c?{$Xgafv:void 0,access_token:void 0,alt:void 0,callback:void 0,fields:void 0,key:void 0,oauth_token:void 0,prettyPrint:void 0,quotaUser:void 0,uploadType:void 0,upload_protocol:void 0}:c;c=void 0===d.$Xgafv?void 0:d.$Xgafv;var e=void 0===d.access_token?void 0:d.access_token,f=void 0===d.alt?void 0:d.alt,g=void 0===d.callback?void 0:d.callback,h=void 0===d.fields?void 0:d.fields,m=void 0===d.key?void 0:d.key,p=void 0===d.oauth_token?void 0:d.oauth_token, +q=void 0===d.prettyPrint?void 0:d.prettyPrint,v=void 0===d.quotaUser?void 0:d.quotaUser,z=void 0===d.uploadType?void 0:d.uploadType;d=void 0===d.upload_protocol?void 0:d.upload_protocol;this.h.w(a,/^projects\/[^/]+$/);return G(this.h,{body:b,s:"POST",A:"earthengine.projects.image.import",path:"/"+this.m+"/"+a+"/image:import",o:{"$.xgafv":c,access_token:e,alt:f,callback:g,fields:h,key:m,oauth_token:p,prettyPrint:q,quotaUser:v,uploadType:z,upload_protocol:d},C:eg})}; +var zg=function(a){this.m="v1alpha";this.h=new ge(a,null)};zg.prototype.Xa=function(a,b){this.h.w(a,/^projects\/[^/]+$/);return G(this.h,{body:b,s:"POST",A:"earthengine.projects.map.export",path:"/"+this.m+"/"+a+"/map:export",o:{"$.xgafv":void 0,access_token:void 0,alt:void 0,callback:void 0,fields:void 0,key:void 0,oauth_token:void 0,prettyPrint:void 0,quotaUser:void 0,uploadType:void 0,upload_protocol:void 0},C:eg})};var Ag=function(a){this.m="v1alpha";this.h=new ge(a,null)}; +Ag.prototype.create=function(a,b,c){var d=void 0===c?{$Xgafv:void 0,access_token:void 0,alt:void 0,callback:void 0,fields:void 0,key:void 0,oauth_token:void 0,prettyPrint:void 0,quotaUser:void 0,uploadType:void 0,upload_protocol:void 0}:c;c=void 0===d.$Xgafv?void 0:d.$Xgafv;var e=void 0===d.access_token?void 0:d.access_token,f=void 0===d.alt?void 0:d.alt,g=void 0===d.callback?void 0:d.callback,h=void 0===d.fields?void 0:d.fields,m=void 0===d.key?void 0:d.key,p=void 0===d.oauth_token?void 0:d.oauth_token, +q=void 0===d.prettyPrint?void 0:d.prettyPrint,v=void 0===d.quotaUser?void 0:d.quotaUser,z=void 0===d.uploadType?void 0:d.uploadType;d=void 0===d.upload_protocol?void 0:d.upload_protocol;this.h.w(a,/^projects\/[^/]+$/);return G(this.h,{body:b,s:"POST",A:"earthengine.projects.maps.create",path:"/"+this.m+"/"+a+"/maps",o:{"$.xgafv":c,access_token:e,alt:f,callback:g,fields:h,key:m,oauth_token:p,prettyPrint:q,quotaUser:v,uploadType:z,upload_protocol:d},C:of})}; +var Bg=function(a){this.m="v1alpha";this.h=new ge(a,null)};k=Bg.prototype; +k.cancel=function(a,b,c){var d=void 0===c?{$Xgafv:void 0,access_token:void 0,alt:void 0,callback:void 0,fields:void 0,key:void 0,oauth_token:void 0,prettyPrint:void 0,quotaUser:void 0,uploadType:void 0,upload_protocol:void 0}:c;c=void 0===d.$Xgafv?void 0:d.$Xgafv;var e=void 0===d.access_token?void 0:d.access_token,f=void 0===d.alt?void 0:d.alt,g=void 0===d.callback?void 0:d.callback,h=void 0===d.fields?void 0:d.fields,m=void 0===d.key?void 0:d.key,p=void 0===d.oauth_token?void 0:d.oauth_token,q=void 0=== +d.prettyPrint?void 0:d.prettyPrint,v=void 0===d.quotaUser?void 0:d.quotaUser,z=void 0===d.uploadType?void 0:d.uploadType;d=void 0===d.upload_protocol?void 0:d.upload_protocol;this.h.w(a,/^projects\/[^/]+\/operations\/.*$/);return G(this.h,{body:b,s:"POST",A:"earthengine.projects.operations.cancel",path:"/"+this.m+"/"+a+":cancel",o:{"$.xgafv":c,access_token:e,alt:f,callback:g,fields:h,key:m,oauth_token:p,prettyPrint:q,quotaUser:v,uploadType:z,upload_protocol:d},C:qf})}; +k.delete=function(a,b){var c=void 0===b?{$Xgafv:void 0,access_token:void 0,alt:void 0,callback:void 0,fields:void 0,key:void 0,oauth_token:void 0,prettyPrint:void 0,quotaUser:void 0,uploadType:void 0,upload_protocol:void 0}:b;b=void 0===c.$Xgafv?void 0:c.$Xgafv;var d=void 0===c.access_token?void 0:c.access_token,e=void 0===c.alt?void 0:c.alt,f=void 0===c.callback?void 0:c.callback,g=void 0===c.fields?void 0:c.fields,h=void 0===c.key?void 0:c.key,m=void 0===c.oauth_token?void 0:c.oauth_token,p=void 0=== +c.prettyPrint?void 0:c.prettyPrint,q=void 0===c.quotaUser?void 0:c.quotaUser,v=void 0===c.uploadType?void 0:c.uploadType;c=void 0===c.upload_protocol?void 0:c.upload_protocol;this.h.w(a,/^projects\/[^/]+\/operations\/.*$/);return G(this.h,{body:null,s:"DELETE",A:"earthengine.projects.operations.delete",path:"/"+this.m+"/"+a,o:{"$.xgafv":b,access_token:d,alt:e,callback:f,fields:g,key:h,oauth_token:m,prettyPrint:p,quotaUser:q,uploadType:v,upload_protocol:c},C:qf})}; +k.get=function(a,b){var c=void 0===b?{$Xgafv:void 0,access_token:void 0,alt:void 0,callback:void 0,fields:void 0,key:void 0,oauth_token:void 0,prettyPrint:void 0,quotaUser:void 0,uploadType:void 0,upload_protocol:void 0}:b;b=void 0===c.$Xgafv?void 0:c.$Xgafv;var d=void 0===c.access_token?void 0:c.access_token,e=void 0===c.alt?void 0:c.alt,f=void 0===c.callback?void 0:c.callback,g=void 0===c.fields?void 0:c.fields,h=void 0===c.key?void 0:c.key,m=void 0===c.oauth_token?void 0:c.oauth_token,p=void 0=== +c.prettyPrint?void 0:c.prettyPrint,q=void 0===c.quotaUser?void 0:c.quotaUser,v=void 0===c.uploadType?void 0:c.uploadType;c=void 0===c.upload_protocol?void 0:c.upload_protocol;this.h.w(a,/^projects\/[^/]+\/operations\/.*$/);return G(this.h,{body:null,s:"GET",A:"earthengine.projects.operations.get",path:"/"+this.m+"/"+a,o:{"$.xgafv":b,access_token:d,alt:e,callback:f,fields:g,key:h,oauth_token:m,prettyPrint:p,quotaUser:q,uploadType:v,upload_protocol:c},C:eg})}; +k.list=function(a,b){var c=void 0===b?{$Xgafv:void 0,access_token:void 0,alt:void 0,callback:void 0,fields:void 0,filter:void 0,key:void 0,oauth_token:void 0,pageSize:void 0,pageToken:void 0,prettyPrint:void 0,quotaUser:void 0,uploadType:void 0,upload_protocol:void 0}:b;b=void 0===c.$Xgafv?void 0:c.$Xgafv;var d=void 0===c.access_token?void 0:c.access_token,e=void 0===c.alt?void 0:c.alt,f=void 0===c.callback?void 0:c.callback,g=void 0===c.fields?void 0:c.fields,h=void 0===c.filter?void 0:c.filter, +m=void 0===c.key?void 0:c.key,p=void 0===c.oauth_token?void 0:c.oauth_token,q=void 0===c.pageSize?void 0:c.pageSize,v=void 0===c.pageToken?void 0:c.pageToken,z=void 0===c.prettyPrint?void 0:c.prettyPrint,E=void 0===c.quotaUser?void 0:c.quotaUser,L=void 0===c.uploadType?void 0:c.uploadType;c=void 0===c.upload_protocol?void 0:c.upload_protocol;this.h.w(a,/^projects\/[^/]+$/);return G(this.h,{body:null,s:"GET",A:"earthengine.projects.operations.list",path:"/"+this.m+"/"+a+"/operations",o:{"$.xgafv":b, +access_token:d,alt:e,callback:f,fields:g,filter:h,key:m,oauth_token:p,pageSize:q,pageToken:v,prettyPrint:z,quotaUser:E,uploadType:L,upload_protocol:c},C:dg})}; +k.wait=function(a,b,c){var d=void 0===c?{$Xgafv:void 0,access_token:void 0,alt:void 0,callback:void 0,fields:void 0,key:void 0,oauth_token:void 0,prettyPrint:void 0,quotaUser:void 0,uploadType:void 0,upload_protocol:void 0}:c;c=void 0===d.$Xgafv?void 0:d.$Xgafv;var e=void 0===d.access_token?void 0:d.access_token,f=void 0===d.alt?void 0:d.alt,g=void 0===d.callback?void 0:d.callback,h=void 0===d.fields?void 0:d.fields,m=void 0===d.key?void 0:d.key,p=void 0===d.oauth_token?void 0:d.oauth_token,q=void 0=== +d.prettyPrint?void 0:d.prettyPrint,v=void 0===d.quotaUser?void 0:d.quotaUser,z=void 0===d.uploadType?void 0:d.uploadType;d=void 0===d.upload_protocol?void 0:d.upload_protocol;this.h.w(a,/^projects\/[^/]+\/operations\/.*$/);return G(this.h,{body:b,s:"POST",A:"earthengine.projects.operations.wait",path:"/"+this.m+"/"+a+":wait",o:{"$.xgafv":c,access_token:e,alt:f,callback:g,fields:h,key:m,oauth_token:p,prettyPrint:q,quotaUser:v,uploadType:z,upload_protocol:d},C:eg})}; +var Cg=function(a){this.m="v1alpha";this.h=new ge(a,null)};Cg.prototype.Xa=function(a,b){this.h.w(a,/^projects\/[^/]+$/);return G(this.h,{body:b,s:"POST",A:"earthengine.projects.table.export",path:"/"+this.m+"/"+a+"/table:export",o:{"$.xgafv":void 0,access_token:void 0,alt:void 0,callback:void 0,fields:void 0,key:void 0,oauth_token:void 0,prettyPrint:void 0,quotaUser:void 0,uploadType:void 0,upload_protocol:void 0},C:eg})}; +Cg.prototype.import=function(a,b,c){var d=void 0===c?{$Xgafv:void 0,access_token:void 0,alt:void 0,callback:void 0,fields:void 0,key:void 0,oauth_token:void 0,prettyPrint:void 0,quotaUser:void 0,uploadType:void 0,upload_protocol:void 0}:c;c=void 0===d.$Xgafv?void 0:d.$Xgafv;var e=void 0===d.access_token?void 0:d.access_token,f=void 0===d.alt?void 0:d.alt,g=void 0===d.callback?void 0:d.callback,h=void 0===d.fields?void 0:d.fields,m=void 0===d.key?void 0:d.key,p=void 0===d.oauth_token?void 0:d.oauth_token, +q=void 0===d.prettyPrint?void 0:d.prettyPrint,v=void 0===d.quotaUser?void 0:d.quotaUser,z=void 0===d.uploadType?void 0:d.uploadType;d=void 0===d.upload_protocol?void 0:d.upload_protocol;this.h.w(a,/^projects\/[^/]+$/);return G(this.h,{body:b,s:"POST",A:"earthengine.projects.table.import",path:"/"+this.m+"/"+a+"/table:import",o:{"$.xgafv":c,access_token:e,alt:f,callback:g,fields:h,key:m,oauth_token:p,prettyPrint:q,quotaUser:v,uploadType:z,upload_protocol:d},C:eg})}; +var Dg=function(a){this.m="v1alpha";this.h=new ge(a,null)}; +Dg.prototype.create=function(a,b,c){var d=void 0===c?{$Xgafv:void 0,access_token:void 0,alt:void 0,callback:void 0,fields:void 0,key:void 0,oauth_token:void 0,prettyPrint:void 0,quotaUser:void 0,uploadType:void 0,upload_protocol:void 0}:c;c=void 0===d.$Xgafv?void 0:d.$Xgafv;var e=void 0===d.access_token?void 0:d.access_token,f=void 0===d.alt?void 0:d.alt,g=void 0===d.callback?void 0:d.callback,h=void 0===d.fields?void 0:d.fields,m=void 0===d.key?void 0:d.key,p=void 0===d.oauth_token?void 0:d.oauth_token, +q=void 0===d.prettyPrint?void 0:d.prettyPrint,v=void 0===d.quotaUser?void 0:d.quotaUser,z=void 0===d.uploadType?void 0:d.uploadType;d=void 0===d.upload_protocol?void 0:d.upload_protocol;this.h.w(a,/^projects\/[^/]+$/);return G(this.h,{body:b,s:"POST",A:"earthengine.projects.thumbnails.create",path:"/"+this.m+"/"+a+"/thumbnails",o:{"$.xgafv":c,access_token:e,alt:f,callback:g,fields:h,key:m,oauth_token:p,prettyPrint:q,quotaUser:v,uploadType:z,upload_protocol:d},C:og})}; +var Eg=function(a){this.m="v1alpha";this.h=new ge(a,null)},Fg=function(a,b,c){a.h.w(b,/^projects\/[^/]+$/);return G(a.h,{body:c,s:"POST",A:"earthengine.projects.value.compute",path:"/"+a.m+"/"+b+"/value:compute",o:{"$.xgafv":void 0,access_token:void 0,alt:void 0,callback:void 0,fields:void 0,key:void 0,oauth_token:void 0,prettyPrint:void 0,quotaUser:void 0,uploadType:void 0,upload_protocol:void 0},C:Ze})},Gg=function(a){this.m="v1alpha";this.h=new ge(a,null)}; +Gg.prototype.Xa=function(a,b){this.h.w(a,/^projects\/[^/]+$/);return G(this.h,{body:b,s:"POST",A:"earthengine.projects.video.export",path:"/"+this.m+"/"+a+"/video:export",o:{"$.xgafv":void 0,access_token:void 0,alt:void 0,callback:void 0,fields:void 0,key:void 0,oauth_token:void 0,prettyPrint:void 0,quotaUser:void 0,uploadType:void 0,upload_protocol:void 0},C:eg})};var Hg=function(a){this.m="v1alpha";this.h=new ge(a,null)}; +Hg.prototype.Xa=function(a,b){this.h.w(a,/^projects\/[^/]+$/);return G(this.h,{body:b,s:"POST",A:"earthengine.projects.videoMap.export",path:"/"+this.m+"/"+a+"/videoMap:export",o:{"$.xgafv":void 0,access_token:void 0,alt:void 0,callback:void 0,fields:void 0,key:void 0,oauth_token:void 0,prettyPrint:void 0,quotaUser:void 0,uploadType:void 0,upload_protocol:void 0},C:eg})};var Ig=function(a){this.m="v1alpha";this.h=new ge(a,null)}; +Ig.prototype.create=function(a,b,c){var d=void 0===c?{$Xgafv:void 0,access_token:void 0,alt:void 0,callback:void 0,fields:void 0,key:void 0,oauth_token:void 0,prettyPrint:void 0,quotaUser:void 0,uploadType:void 0,upload_protocol:void 0}:c;c=void 0===d.$Xgafv?void 0:d.$Xgafv;var e=void 0===d.access_token?void 0:d.access_token,f=void 0===d.alt?void 0:d.alt,g=void 0===d.callback?void 0:d.callback,h=void 0===d.fields?void 0:d.fields,m=void 0===d.key?void 0:d.key,p=void 0===d.oauth_token?void 0:d.oauth_token, +q=void 0===d.prettyPrint?void 0:d.prettyPrint,v=void 0===d.quotaUser?void 0:d.quotaUser,z=void 0===d.uploadType?void 0:d.uploadType;d=void 0===d.upload_protocol?void 0:d.upload_protocol;this.h.w(a,/^projects\/[^/]+$/);return G(this.h,{body:b,s:"POST",A:"earthengine.projects.videoThumbnails.create",path:"/"+this.m+"/"+a+"/videoThumbnails",o:{"$.xgafv":c,access_token:e,alt:f,callback:g,fields:h,key:m,oauth_token:p,prettyPrint:q,quotaUser:v,uploadType:z,upload_protocol:d},C:sg})};var Jg=!Cc||9<=Number(Pc),Kg=!Ec&&!Cc||Cc&&9<=Number(Pc)||Ec&&Mc("1.9.1");var Lg=function(a,b){this.x=void 0!==a?a:0;this.y=void 0!==b?b:0};k=Lg.prototype;k.clone=function(){return new Lg(this.x,this.y)};k.toString=function(){return"("+this.x+", "+this.y+")"};k.equals=function(a){return a instanceof Lg&&(this==a?!0:this&&a?this.x==a.x&&this.y==a.y:!1)};k.ceil=function(){this.x=Math.ceil(this.x);this.y=Math.ceil(this.y);return this};k.floor=function(){this.x=Math.floor(this.x);this.y=Math.floor(this.y);return this}; +k.round=function(){this.x=Math.round(this.x);this.y=Math.round(this.y);return this};k.translate=function(a,b){a instanceof Lg?(this.x+=a.x,this.y+=a.y):(this.x+=Number(a),"number"===typeof b&&(this.y+=b));return this};k.scale=function(a,b){this.x*=a;this.y*="number"===typeof b?b:a;return this};var Mg=function(a,b){this.width=a;this.height=b};k=Mg.prototype;k.clone=function(){return new Mg(this.width,this.height)};k.toString=function(){return"("+this.width+" x "+this.height+")"};k.aspectRatio=function(){return this.width/this.height};k.isEmpty=function(){return!(this.width*this.height)};k.ceil=function(){this.width=Math.ceil(this.width);this.height=Math.ceil(this.height);return this};k.floor=function(){this.width=Math.floor(this.width);this.height=Math.floor(this.height);return this}; +k.round=function(){this.width=Math.round(this.width);this.height=Math.round(this.height);return this};k.scale=function(a,b){this.width*=a;this.height*="number"===typeof b?b:a;return this};var Og=function(a,b){Db(b,function(c,d){c&&"object"==typeof c&&c.Bb&&(c=c.zb());"style"==d?a.style.cssText=c:"class"==d?a.className=c:"for"==d?a.htmlFor=c:Ng.hasOwnProperty(d)?a.setAttribute(Ng[d],c):0==d.lastIndexOf("aria-",0)||0==d.lastIndexOf("data-",0)?a.setAttribute(d,c):a[d]=c})},Ng={cellpadding:"cellPadding",cellspacing:"cellSpacing",colspan:"colSpan",frameborder:"frameBorder",height:"height",maxlength:"maxLength",nonce:"nonce",role:"role",rowspan:"rowSpan",type:"type",usemap:"useMap",valign:"vAlign", +width:"width"},Qg=function(a,b,c){return Pg(document,arguments)},Pg=function(a,b){var c=String(b[0]),d=b[1];if(!Jg&&d&&(d.name||d.type)){c=["<",c];d.name&&c.push(' name="',wc(d.name),'"');if(d.type){c.push(' type="',wc(d.type),'"');var e={};Rb(e,d);delete e.type;d=e}c.push(">");c=c.join("")}c=Rg(a,c);d&&("string"===typeof d?c.className=d:Array.isArray(d)?c.className=d.join(" "):Og(c,d));2=b.le&&b.cancel())}this.fh?this.fh.call(this.rg,this):this.Bf=!0;this.Wb||Dh(this,new Eh(this))}};Ch.prototype.gg=function(a,b){this.ke=!1;Fh(this,a,b)}; +var Fh=function(a,b,c){a.Wb=!0;a.sa=c;a.Bc=!b;Gh(a)},Ih=function(a){if(a.Wb){if(!a.Bf)throw new Hh(a);a.Bf=!1}};Ch.prototype.callback=function(a){Ih(this);Jh(a);Fh(this,!0,a)};var Dh=function(a,b){Ih(a);Jh(b);Fh(a,!1,b)},Jh=function(a){B(!(a instanceof Ch),"An execution sequence may not be initiated with a blocking Deferred.")},Kh=function(a,b,c){B(!a.Yf,"Blocking Deferreds can not be re-used");a.Ed.push([b,c,void 0]);a.Wb&&Gh(a)}; +Ch.prototype.then=function(a,b,c){var d,e,f=new nh(function(g,h){d=g;e=h});Kh(this,d,function(g){g instanceof Eh?f.cancel():e(g)});return f.then(a,b,c)};Ch.prototype.$goog_Thenable=!0; +var Lh=function(a){return ab(a.Ed,function(b){return Ca(b[1])})},Gh=function(a){if(a.Nd&&a.Wb&&Lh(a)){var b=a.Nd,c=Mh[b];c&&(t.clearTimeout(c.da),delete Mh[b]);a.Nd=0}a.N&&(a.N.le--,delete a.N);b=a.sa;for(var d=c=!1;a.Ed.length&&!a.ke;){var e=a.Ed.shift(),f=e[0],g=e[1];e=e[2];if(f=a.Bc?g:f)try{var h=f.call(e||a.rg,b);void 0!==h&&(a.Bc=a.Bc&&(h==b||h instanceof Error),a.sa=b=h);if(kh(b)||"function"===typeof t.Promise&&b instanceof t.Promise)d=!0,a.ke=!0}catch(m){b=m,a.Bc=!0,Lh(a)||(c=!0)}}a.sa=b;d&& +(h=x(a.gg,a,!0),d=x(a.gg,a,!1),b instanceof Ch?(Kh(b,h,d),b.Yf=!0):b.then(h,d));c&&(b=new Nh(b),Mh[b.da]=b,a.Nd=b.da)},Hh=function(){Na.call(this)};A(Hh,Na);Hh.prototype.message="Deferred has already fired";Hh.prototype.name="AlreadyCalledError";var Eh=function(){Na.call(this)};A(Eh,Na);Eh.prototype.message="Deferred was canceled";Eh.prototype.name="CanceledError";var Nh=function(a){this.da=t.setTimeout(x(this.Qi,this),0);this.kd=a}; +Nh.prototype.Qi=function(){B(Mh[this.da],"Cannot throw an error that is not scheduled.");delete Mh[this.da];throw this.kd;};var Mh={};var Rh=function(a){var b={},c=b.document||document,d=cc(a).toString(),e=Rg(document,"SCRIPT"),f={wh:e,Rc:void 0},g=new Ch(f),h=null,m=null!=b.timeout?b.timeout:5E3;0=mi(this).value)for(Ca(b)&&(b=b()),a=new ei(a,String(b),this.Di),c&&(a.vg=c),c=this;c;){var d=c,e=a;if(d.Jg)for(var f=0;b=d.Jg[f];f++)b(e);c=c.getParent()}};gi.prototype.info=function(a,b){this.log(ji,a,b)}; +var ni={},oi=null,qi=function(a){oi||(oi=new gi(""),ni[""]=oi,oi.yh(ki));var b;if(!(b=ni[a])){b=new gi(a);var c=a.lastIndexOf("."),d=a.substr(c+1);c=qi(a.substr(0,c));c.Gg()[d]=b;b.N=c;ni[a]=b}return b};var ri=function(a,b){a&&a.log(li,b,void 0)};var si=function(a,b,c){if(Ca(a))c&&(a=x(a,c));else if(a&&"function"==typeof a.handleEvent)a=x(a.handleEvent,a);else throw Error("Invalid listener argument");return 2147483647b)throw Error("Bad port number "+b);a.ac=b}else a.ac=null};Oi.prototype.getPath=function(){return this.$a};Oi.prototype.setPath=function(a,b){Qi(this);this.$a=b?Ti(a,!0):a;return this};var Si=function(a,b,c){Qi(a);b instanceof Ui?(a.ya=b,a.ya.yf(a.va)):(c||(b=Vi(b,$i)),a.ya=new Ui(b,a.va))};Oi.prototype.getQuery=function(){return this.ya.toString()}; +Oi.prototype.removeParameter=function(a){Qi(this);this.ya.remove(a);return this};var Qi=function(a){if(a.wi)throw Error("Tried to modify a read-only Uri");};Oi.prototype.yf=function(a){this.va=a;this.ya&&this.ya.yf(a)}; +var aj=function(a){return a instanceof Oi?a.clone():new Oi(a,void 0)},Ti=function(a,b){return a?b?decodeURI(a.replace(/%25/g,"%2525")):decodeURIComponent(a):""},Vi=function(a,b,c){return"string"===typeof a?(a=encodeURI(a).replace(b,bj),c&&(a=a.replace(/%25([0-9a-fA-F]{2})/g,"%$1")),a):null},bj=function(a){a=a.charCodeAt(0);return"%"+(a>>4&15).toString(16)+(a&15).toString(16)},Wi=/[#\/\?@]/g,Yi=/[#\?:]/g,Xi=/[#\?]/g,$i=/[#\?@]/g,Zi=/#/g,Ui=function(a,b){this.I=this.M=null;this.qa=a||null;this.va=!!b}, +cj=function(a){a.M||(a.M=new Ad,a.I=0,a.qa&&ui(a.qa,function(b,c){a.add(decodeURIComponent(b.replace(/\+/g," ")),c)}))};k=Ui.prototype;k.L=function(){cj(this);return this.I};k.add=function(a,b){cj(this);this.qa=null;a=dj(this,a);var c=this.M.get(a);c||this.M.set(a,c=[]);c.push(b);this.I=Sa(this.I)+1;return this};k.remove=function(a){cj(this);a=dj(this,a);return this.M.gb(a)?(this.qa=null,this.I=Sa(this.I)-this.M.get(a).length,this.M.remove(a)):!1};k.clear=function(){this.M=this.qa=null;this.I=0}; +k.isEmpty=function(){cj(this);return 0==this.I};k.gb=function(a){cj(this);a=dj(this,a);return this.M.gb(a)};k.sc=function(a){var b=this.T();return fb(b,a)};k.forEach=function(a,b){cj(this);this.M.forEach(function(c,d){Ya(c,function(e){a.call(b,e,d,this)},this)},this)};k.Ea=function(){cj(this);for(var a=this.M.T(),b=this.M.Ea(),c=[],d=0;d\r\n\r\n"+m+"\r\n"}).join("")+"--batch_EARTHENGINE_batch--\r\n",f=function(g){var h={};a.forEach(function(m){var p=l(m);m=p.next().value;p=l(p.next().value);p.next();p=p.next().value;null!=g[m]&&(h[m]= +Vd(p,g[m]))});return b?b(h):h};return this.callback?(K(d,null,function(g,h){return c.callback(h?g:f(g),h)},"multipart/mixed; boundary=batch_EARTHENGINE_batch",e),null):f(K(d,null,void 0,"multipart/mixed; boundary=batch_EARTHENGINE_batch",e))};var kj=function(){};n(kj,Li); +kj.prototype.send=function(a,b){var c=[a.s+" "+a.path+" HTTP/1.1"];c.push("Content-Type: application/json; charset=utf-8");var d=mj();null!=d&&c.push("Authorization: "+d);a=a.body?JSON.stringify(a.body):"";return[c.join("\r\n")+"\r\n\r\n"+a,b]}; +var nj=function(a,b,c){a=l(b.split("--"+a.split("; boundary=")[1]));for(b=a.next();!b.done;b=a.next())if(b=b.value.split("\r\n\r\n"),!(3>b.length)){var d=b[0].match(/\r\nContent-ID: ]*)>/)[1],e=Number(b[1].match(/^HTTP\S*\s(\d+)\s/)[1]);c(d,e,b.slice(2).join("\r\n\r\n"))}},jj=function(){var a=oj.replace(/\/api$/,"");return"window"in t&&!a.match(/^https?:\/\/content-/)?a.replace(/^(https?:\/\/)(.*\.googleapis\.com)$/,"$1content-$2"):a},uj=function(a,b,c){pj&&qj&&pj({client_id:String(qj), +immediate:!0,scope:rj.join(" ")},function(d){if("immediate_failed"==d.error&&c)c();else if(M&&"window"in t)try{sj(function(){try{t.gapi.auth.setToken(d),tj(a,b,d)}catch(e){b(e.toString())}})}catch(e){b(e.toString())}else tj(a,b,d)})},mj=function(){vj&&0<=Ja()-vj&&wj();return xj},wj=function(){vj=xj=null},yj=function(a,b){qj=a;rj=b},gj=function(a,b,c){null!=a?oj=a:zj||(oj="https://earthengine.googleapis.com/api");null!=b?Aj=b:zj||(Aj="https://earthengine.googleapis.com");void 0!==c&&(Bj=c);M&&(ej= +ej||"earthengine-legacy");zj=!0},K=function(a,b,c,d,e,f){gj();var g=Cj,h="application/x-www-form-urlencoded";e&&(h="application/json",d&&d.startsWith("multipart")&&(h=d,d="POST"));d=d||"POST";h={"Content-Type":h};var m=fj.test(a);if(M&&!m){var p="0.1.216";"0.1.216"===p&&(p="latest");h["x-goog-api-client"]="ee-js/"+p}p=mj();if(null!=p)h.Authorization=p;else if(c&&pj&&qj)return uj(function(){Dj(g,function(){K(a,b,c,d)})}),null;b=b?b.clone():new Ui;null!=Ej&&b.add("key",Ej);M?(g&&(h["X-Earth-Engine-Computation-Profile"]= +"1"),ej&&"earthengine-legacy"!==ej&&!m&&(h["X-Goog-User-Project"]=ej)):g&&b.add("profiling","1");b=Fj(b,a);null!=Bj&&(h["X-XSRF-Token"]=Bj);null!=Gj&&(h["X-Earth-Engine-App-ID-Token"]=Gj);m=e||null;p=b?b.toString():"";"POST"===d&&void 0===e?m=p:/^[\s\xa0]*$/.test(p)||(a+=-1!=a.indexOf("?")?"&":"?",a+=p);e=a.startsWith("/")?oj+a:a;if(c)return Hj.push(Ij(e,c,d,m,h,f)),Jj.He(),null;p=function(z,E){this.setRequestHeader&&this.setRequestHeader(E,z)};var q=0;for(f=null!=f?f:5;;){var v=Yh(Wh);v.open(d,e, +!1);Db(h,p,v);v.send(m);if(429!=v.status||q>f)break;q++}return Oj(v.status,function(z){try{return v.getResponseHeader(z)}catch(E){return null}},v.responseText,g)},Ij=function(a,b,c,d,e,f){var g=0,h={url:a,method:c,content:d,headers:e},m=Cj,p=null!=f?f:10;h.callback=function(q){q=q.target;if(429==q.getStatus()&&gE||300<=E)return"Server returned HTTP code: "+E},p;b=b("Content-Type")||"application/json";d=b.replace(/;.*/,"");if("application/json"===d||"text/json"===d)if(b=h(c),b.parsed){var q=g(b.parsed);void 0===q&&(p="Malformed response: "+c)}else p=b;else if("multipart/mixed"===d){q={};var v=[];nj(b,c,function(E,L,Z){Z=h(Z);Z.parsed&&(q[E]=g(Z.parsed));(L=(Z.parsed?"":Z)||m(L))&&v.push(E+": "+L)});v.length&&(p=v.join("\n"))}else var z="Response was unexpectedly not JSON, but "+d;p=p||m(a)||z;if(e)return e(q, +p),null;if(!p)return q;throw Error(p);},sj=function(a){var b=function(){t.gapi.config.update("client/cors",!0);pj||(pj=t.gapi.auth.authorize);a()};if(w(t.gapi)&&w(t.gapi.auth)&&Ca(t.gapi.auth.authorize))b();else{for(var c=Ja().toString(36);c in t;)c+="_";t[c]=function(){delete t[c];b()};Rh(gc({onload:c}))}},tj=function(a,b,c){if(c.access_token){b=c.token_type+" "+c.access_token;if(c.expires_in||0===c.expires_in){c=900*c.expires_in;var d=setTimeout(uj,.9*c);void 0!==d.unref&&d.unref();vj=Ja()+c}xj= +b;a&&a()}else b&&b(c.error||"Unknown error.")},J=function(a){var b=new Ui;a=l(Object.entries(a));for(var c=a.next();!c.done;c=a.next()){var d=l(c.value);c=d.next().value;d=d.next().value;b.set(c,d)}return b},Hj=[],Jj=new Mi(function(){var a=Hj.shift();if(a){var b=a.url,c=a.callback,d=a.method,e=a.content;a=a.headers;var f=Pj,g=new vi;Ai.push(g);c&&g.Oa("complete",c);g.Ic("ready",g.ji);f&&(g.ic=Math.max(0,f));g.send(b,d,e,a)}0==Hj.length||Jj.He()},350),oj=null,Aj=null,Bj=null,Gj=null,Fj=Tb,xj=null, +vj=null,qj=null,rj=[],pj=null,dc=new Wb(Ub,"https://apis.google.com/js/client.js?onload=%{onload}"),Ej=null,M=!0,zj=!1,Pj=0,Cj=null;var Qj=function(){},Rj=function(a){if(void 0===a||null===a)a=Qd;return new Oe({tb:a})},Sj=function(a){return new Oe({cb:a})},Tj=function(a){return new Oe({rb:new Ne({values:a})})},Uj=function(a){return new Oe({vb:new ef({values:a})})},Vj=function(a,b){return new Oe({hb:new Gf({functionName:a,arguments:b})})},Wj=function(a,b){return new Oe({hb:new Gf({ib:a,arguments:b})})},Xj=function(a,b){return new Oe({yb:new Ff({nc:a,body:b})})},Yj=function(a){if(!a)return"AUTO_JPEG_PNG";a=a.toUpperCase();switch(a){case "JPG":return"JPEG"; +case "AUTO":return"AUTO_JPEG_PNG";case "TIF":case "TIFF":case "GEOTIF":case "GEOTIFF":return"GEO_TIFF";case "TF_RECORD":case "TFRECORD":return"TF_RECORD_IMAGE";case "NUMPY":return"NPY";case "ZIPPED_TIF":case "ZIPPED_TIFF":case "ZIPPED_GEOTIF":case "ZIPPED_GEOTIFF":return"ZIPPED_GEO_TIFF";case "ZIPPED_TIF_PER_BAND":case "ZIPPED_TIFF_PER_BAND":case "ZIPPED_GEOTIF_PER_BAND":case "ZIPPED_GEOTIFF_PER_BAND":return"ZIPPED_GEO_TIFF_PER_BAND";default:return a}},Zj=function(a){if(!a)return"CSV";a=a.toUpperCase(); +switch(a){case "TF_RECORD":case "TFRECORD":return"TF_RECORD_TABLE";case "JSON":case "GEOJSON":return"GEO_JSON";default:return a}},ak=function(a){if(!a)return"VERTICAL";a=a.toUpperCase();if("HORIZONTAL"!==a||"VERTICAL"!==a)throw Error('Orientation must be "horizontal" or "vertical"');return a},bk=function(a){if(!a)return[];if("string"===typeof a)return a.split(",");if(u(a))return a;throw Error("Invalid band list "+a);},ek=function(a){var b=new pf,c=!1;"palette"in a&&(c=a.palette,b.Lc="string"===typeof c? +c.split(","):c,c=!0);var d=[];if("gain"in a||"bias"in a){if("min"in a||"max"in a)throw Error("Gain and bias can't be specified with min and max");var e=b.Lc?b.Lc.length-1:255;d=ck(a,"bias","gain").map(function(f){var g=-f.bias/f.gain;return{min:g,max:e/f.gain+g}})}else if("min"in a||"max"in a)d=ck(a,"min","max");0!==d.length&&(b.pf=d.map(function(f){return new ff(f)}),c=!0);a=dk(a.gamma);if(1e;++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.Y[0];c=a.Y[1];e=a.Y[2];var f=a.Y[3];var g=b+(f^c&(e^f))+d[0]+3614090360&4294967295;b=c+(g<<7&4294967295|g>>>25);g=f+(e^b&(c^e))+d[1]+3905402710&4294967295;f=b+(g<<12&4294967295|g>>>20);g=e+(c^f&(b^c))+d[2]+606105819&4294967295;e=f+(g<<17&4294967295|g>>> +15);g=c+(b^e&(f^b))+d[3]+3250441966&4294967295;c=e+(g<<22&4294967295|g>>>10);g=b+(f^c&(e^f))+d[4]+4118548399&4294967295;b=c+(g<<7&4294967295|g>>>25);g=f+(e^b&(c^e))+d[5]+1200080426&4294967295;f=b+(g<<12&4294967295|g>>>20);g=e+(c^f&(b^c))+d[6]+2821735955&4294967295;e=f+(g<<17&4294967295|g>>>15);g=c+(b^e&(f^b))+d[7]+4249261313&4294967295;c=e+(g<<22&4294967295|g>>>10);g=b+(f^c&(e^f))+d[8]+1770035416&4294967295;b=c+(g<<7&4294967295|g>>>25);g=f+(e^b&(c^e))+d[9]+2336552879&4294967295;f=b+(g<<12&4294967295| +g>>>20);g=e+(c^f&(b^c))+d[10]+4294925233&4294967295;e=f+(g<<17&4294967295|g>>>15);g=c+(b^e&(f^b))+d[11]+2304563134&4294967295;c=e+(g<<22&4294967295|g>>>10);g=b+(f^c&(e^f))+d[12]+1804603682&4294967295;b=c+(g<<7&4294967295|g>>>25);g=f+(e^b&(c^e))+d[13]+4254626195&4294967295;f=b+(g<<12&4294967295|g>>>20);g=e+(c^f&(b^c))+d[14]+2792965006&4294967295;e=f+(g<<17&4294967295|g>>>15);g=c+(b^e&(f^b))+d[15]+1236535329&4294967295;c=e+(g<<22&4294967295|g>>>10);g=b+(e^f&(c^e))+d[1]+4129170786&4294967295;b=c+(g<< +5&4294967295|g>>>27);g=f+(c^e&(b^c))+d[6]+3225465664&4294967295;f=b+(g<<9&4294967295|g>>>23);g=e+(b^c&(f^b))+d[11]+643717713&4294967295;e=f+(g<<14&4294967295|g>>>18);g=c+(f^b&(e^f))+d[0]+3921069994&4294967295;c=e+(g<<20&4294967295|g>>>12);g=b+(e^f&(c^e))+d[5]+3593408605&4294967295;b=c+(g<<5&4294967295|g>>>27);g=f+(c^e&(b^c))+d[10]+38016083&4294967295;f=b+(g<<9&4294967295|g>>>23);g=e+(b^c&(f^b))+d[15]+3634488961&4294967295;e=f+(g<<14&4294967295|g>>>18);g=c+(f^b&(e^f))+d[4]+3889429448&4294967295;c= +e+(g<<20&4294967295|g>>>12);g=b+(e^f&(c^e))+d[9]+568446438&4294967295;b=c+(g<<5&4294967295|g>>>27);g=f+(c^e&(b^c))+d[14]+3275163606&4294967295;f=b+(g<<9&4294967295|g>>>23);g=e+(b^c&(f^b))+d[3]+4107603335&4294967295;e=f+(g<<14&4294967295|g>>>18);g=c+(f^b&(e^f))+d[8]+1163531501&4294967295;c=e+(g<<20&4294967295|g>>>12);g=b+(e^f&(c^e))+d[13]+2850285829&4294967295;b=c+(g<<5&4294967295|g>>>27);g=f+(c^e&(b^c))+d[2]+4243563512&4294967295;f=b+(g<<9&4294967295|g>>>23);g=e+(b^c&(f^b))+d[7]+1735328473&4294967295; +e=f+(g<<14&4294967295|g>>>18);g=c+(f^b&(e^f))+d[12]+2368359562&4294967295;c=e+(g<<20&4294967295|g>>>12);g=b+(c^e^f)+d[5]+4294588738&4294967295;b=c+(g<<4&4294967295|g>>>28);g=f+(b^c^e)+d[8]+2272392833&4294967295;f=b+(g<<11&4294967295|g>>>21);g=e+(f^b^c)+d[11]+1839030562&4294967295;e=f+(g<<16&4294967295|g>>>16);g=c+(e^f^b)+d[14]+4259657740&4294967295;c=e+(g<<23&4294967295|g>>>9);g=b+(c^e^f)+d[1]+2763975236&4294967295;b=c+(g<<4&4294967295|g>>>28);g=f+(b^c^e)+d[4]+1272893353&4294967295;f=b+(g<<11&4294967295| +g>>>21);g=e+(f^b^c)+d[7]+4139469664&4294967295;e=f+(g<<16&4294967295|g>>>16);g=c+(e^f^b)+d[10]+3200236656&4294967295;c=e+(g<<23&4294967295|g>>>9);g=b+(c^e^f)+d[13]+681279174&4294967295;b=c+(g<<4&4294967295|g>>>28);g=f+(b^c^e)+d[0]+3936430074&4294967295;f=b+(g<<11&4294967295|g>>>21);g=e+(f^b^c)+d[3]+3572445317&4294967295;e=f+(g<<16&4294967295|g>>>16);g=c+(e^f^b)+d[6]+76029189&4294967295;c=e+(g<<23&4294967295|g>>>9);g=b+(c^e^f)+d[9]+3654602809&4294967295;b=c+(g<<4&4294967295|g>>>28);g=f+(b^c^e)+d[12]+ +3873151461&4294967295;f=b+(g<<11&4294967295|g>>>21);g=e+(f^b^c)+d[15]+530742520&4294967295;e=f+(g<<16&4294967295|g>>>16);g=c+(e^f^b)+d[2]+3299628645&4294967295;c=e+(g<<23&4294967295|g>>>9);g=b+(e^(c|~f))+d[0]+4096336452&4294967295;b=c+(g<<6&4294967295|g>>>26);g=f+(c^(b|~e))+d[7]+1126891415&4294967295;f=b+(g<<10&4294967295|g>>>22);g=e+(b^(f|~c))+d[14]+2878612391&4294967295;e=f+(g<<15&4294967295|g>>>17);g=c+(f^(e|~b))+d[5]+4237533241&4294967295;c=e+(g<<21&4294967295|g>>>11);g=b+(e^(c|~f))+d[12]+1700485571& +4294967295;b=c+(g<<6&4294967295|g>>>26);g=f+(c^(b|~e))+d[3]+2399980690&4294967295;f=b+(g<<10&4294967295|g>>>22);g=e+(b^(f|~c))+d[10]+4293915773&4294967295;e=f+(g<<15&4294967295|g>>>17);g=c+(f^(e|~b))+d[1]+2240044497&4294967295;c=e+(g<<21&4294967295|g>>>11);g=b+(e^(c|~f))+d[8]+1873313359&4294967295;b=c+(g<<6&4294967295|g>>>26);g=f+(c^(b|~e))+d[15]+4264355552&4294967295;f=b+(g<<10&4294967295|g>>>22);g=e+(b^(f|~c))+d[6]+2734768916&4294967295;e=f+(g<<15&4294967295|g>>>17);g=c+(f^(e|~b))+d[13]+1309151649& +4294967295;c=e+(g<<21&4294967295|g>>>11);g=b+(e^(c|~f))+d[4]+4149444226&4294967295;b=c+(g<<6&4294967295|g>>>26);g=f+(c^(b|~e))+d[11]+3174756917&4294967295;f=b+(g<<10&4294967295|g>>>22);g=e+(b^(f|~c))+d[2]+718787259&4294967295;e=f+(g<<15&4294967295|g>>>17);g=c+(f^(e|~b))+d[9]+3951481745&4294967295;a.Y[0]=a.Y[0]+b&4294967295;a.Y[1]=a.Y[1]+(e+(g<<21&4294967295|g>>>11))&4294967295;a.Y[2]=a.Y[2]+e&4294967295;a.Y[3]=a.Y[3]+f&4294967295}; +Gk.prototype.update=function(a,b){void 0===b&&(b=a.length);for(var c=b-this.fb,d=this.fi,e=this.qc,f=0;fthis.qc?this.fb:2*this.fb)-this.qc);a[0]=128;for(var b=1;bb;++b)for(var d=0;32>d;d+=8)a[c++]=this.Y[b]>>>d&255;return a};var Ik=function(a){this.Wc="__ee_hash__";this.td=!1!==a;this.Pa=[];this.ta={};this.Of=[];this.qd=new WeakMap};y("ee.Serializer",Ik);var Jk=new Zh,Kk=new Gk,Mk=function(a,b){return Lk(new Ik(void 0!==b?b:!0),a)};y("ee.Serializer.encode",Mk);var Nk=function(a){return Jk.X(Mk(a))};y("ee.Serializer.toJSON",Nk);var Pk=function(a){return Ok(Mk(a,!1))};y("ee.Serializer.toReadableJSON",Pk); +var Ok=function(a){return"JSON"in t?t.JSON.stringify(a,null," "):Jk.X(a)},Lk=function(a,b){b=a.jd(b);a.td&&(b=w(b)&&"ValueRef"==b.type&&1==a.Pa.length?a.Pa[0][1]:{type:"CompoundValue",scope:a.Pa,value:b},a.Pa=[],Ya(a.Of,x(function(c){delete c[this.Wc]},a)),a.Of=[],a.ta={});return b}; +Ik.prototype.jd=function(a){if(void 0===a)throw Error("Can't encode an undefined value.");var b=w(a)?a[this.Wc]:null;if(this.td&&null!=b&&this.ta[b])return{type:"ValueRef",value:this.ta[b]};if(null===a||"boolean"===typeof a||"number"===typeof a||"string"===typeof a)return a;if(Ba(a))return{type:"Invocation",functionName:"Date",arguments:{value:Math.floor(a.getTime())}};if(a instanceof Qj){var c=a.encode(x(this.jd,this));if(!(u(c)||w(c)&&"ArgumentRef"!=c.type))return c}else if(u(a))c=$a(a,function(e){return this.jd(e)}, +this);else if(w(a)&&!Ca(a))c=Fb(a,function(e){if(!Ca(e))return this.jd(e)},this),Nb(c,this.Wc),c={type:"Dictionary",value:c};else throw Error("Can't encode object: "+a);if(this.td){b=Qk(c);if(this.ta[b])var d=this.ta[b];else d=String(this.Pa.length),this.Pa.push([d,c]),this.ta[b]=d;a[this.Wc]=b;this.Of.push(a);return{type:"ValueRef",value:d}}return c};var Qk=function(a){Kk.reset();Kk.update(Jk.X(a));return Kk.digest().toString()},Sk=function(a){return Wd(Rk(a),Sd,Td,Ud)}; +y("ee.Serializer.encodeCloudApi",Sk); +var Rk=function(a){return Tk(new Ik(!0),a)},Uk=function(a){a=Tk(new Ik(!1),a);var b=a.values,c=function(d){if(!w(d))return d;var e=u(d)?[]:{},f=d instanceof Object.getPrototypeOf(Oe);d=l(Object.entries(f?d.a:d));for(var g=d.next();!g.done;g=d.next()){var h=l(g.value);g=h.next().value;h=h.next().value;f?null!==h&&(e[g]="functionDefinitionValue"===g&&null!=h.body?{argumentNames:h.nc,body:c(b[h.body])}:"functionInvocationValue"===g&&null!=h.ib?{arguments:Fb(h.arguments,c),functionReference:c(b[h.ib])}: +"constantValue"===g?h===Qd?null:h:c(h)):e[g]=c(h)}return e};return a.result&&c(b[a.result])};y("ee.Serializer.encodeCloudApiPretty",Uk);var Vk=function(a){return Ok(Uk(a))};y("ee.Serializer.toReadableCloudApiJSON",Vk); +var Tk=function(a,b){try{var c=Wk(a,b),d=new Xk(c,a.Pa,a.td),e=Yk(d,d.vh);return new Ye({result:e,values:d.kh})}finally{a.qd=new WeakMap,a.ta={},a.Pa=[]}},Wk=function(a,b){var c=function(e){var f=Qk(e);if(a.ta[f])return a.ta[f];var g=String(a.Pa.length);a.Pa.push([g,e]);a.ta[f]=g;w(b)&&a.qd.set(b,f);return g};if(w(b)&&a.ta[a.qd.get(b)])return a.ta[a.qd.get(b)];if(null===b||"boolean"===typeof b||"string"===typeof b||"number"===typeof b)return c(Rj(b));if(Ba(b))return c(Vj("Date",{value:Rj(Math.floor(b.getTime()))})); +if(b instanceof Qj)return c(b.pa(function(e){return Wk(a,e)}));if(u(b))return c(Tj(b.map(function(e){return Sj(Wk(a,e))})));if(w(b)&&!Ca(b)){var d={};Object.keys(b).sort().forEach(function(e){d[e]=Sj(Wk(a,b[e]))});return c(Uj(d))}throw Error("Can't encode object: "+b);},Xk=function(a,b,c){var d=this;this.vh=a;this.values={};b.forEach(function(e){return d.values[e[0]]=e[1]});this.ph=c?Zk(this):null;this.kh={};this.qf={};this.Ei=0},Yk=function(a,b){if(b in a.qf)return a.qf[b];var c=String(a.Ei++);a.qf[b]= +c;a.kh[c]=$k(a,a.values[b],0);return c},$k=function(a,b,c){var d=function(p){return null!==p.tb},e=function(p){return p===Qd?null:p};if(d(b)||null!=b.Te||null!=b.oe||null!=b.oc)return b;if(null!=b.cb)return d=a.values[b.cb],null===a.ph||50>c&&1===a.ph[b.cb]?$k(a,d,c):al(d)?d:Sj(Yk(a,b.cb));if(null!=b.rb){var f=b.rb.values.map(function(p){return $k(a,p,c+3)});return f.every(d)?Rj(f.map(function(p){return e(p.tb)})):Tj(f)}if(null!=b.vb){f={};var g={};b=l(Object.entries(b.vb.values||{}));for(var h=b.next();!h.done;h= +b.next()){var m=l(h.value);h=m.next().value;m=m.next().value;f[h]=$k(a,m,c+3);null!==g&&d(f[h])?g[h]=e(f[h].tb):g=null}return null!==g?Rj(g):Uj(f)}if(null!=b.yb)return d=b.yb,Xj(d.nc||[],Yk(a,d.body||""));if(null!=b.hb){d=b.hb;f={};g=l(Object.keys(d.arguments||{}));for(b=g.next();!b.done;b=g.next())b=b.value,f[b]=$k(a,d.arguments[b],c+3);return d.functionName?Vj(d.functionName,f):Wj(Yk(a,d.ib||""),f)}throw Error("Can't optimize value: "+b);},al=function(a){var b=a.tb;return null!==b?b===Qd||"number"=== +typeof b||"boolean"===typeof b:null!=a.oc},Zk=function(a){var b={},c=function(e){b[e]?b[e]++:(b[e]=1,d(a.values[e]))},d=function(e){null!=e.rb?e.rb.values.forEach(d):null!=e.vb?Object.values(e.vb.values).forEach(d):null!=e.yb?c(e.yb.body):null!=e.hb?(e=e.hb,null!=e.ib&&c(e.ib),Object.values(e.arguments).forEach(d)):null!=e.cb&&c(e.cb)};c(a.vh);return b};var gl=function(a){if(null==a.element)throw Error('"element" not found in params '+a);var b=a.selectors||null;null!=b&&"string"===typeof b&&(b=b.split(","));b=new xf({i:Rk(a.element),description:bl(a.description),ha:null,Ua:null,selectors:b,Db:cl(a.maxErrorMeters),requestId:bl(a.id),U:cl(a.maxWorkers)});var c=dl(a);switch(c){case "GOOGLE_CLOUD_STORAGE":case "DRIVE":var d=new zf({ia:null,ga:null,F:Zj(a.fileFormat)});"GOOGLE_CLOUD_STORAGE"===c?d.ia=el(a):d.ga=fl(a);b.ha=d;break;case "ASSET":b.Ua=new yf({wb:new nf({name:kk(a.assetId)})}); +break;default:throw Error('Export destination "'+c+'" unknown');}return b};function bl(a){return null!=a?String(a):null}function cl(a){return null!=a?Number(a):null} +var dl=function(a){var b="DRIVE";if(null==a)return b;null!=a.outputBucket||null!=a.outputPrefix?b="GOOGLE_CLOUD_STORAGE":null!=a.assetId&&(b="ASSET");return b},il=function(a){var b=new Rf({se:!!a.tfrecordCompressed,Eb:bl(a.tfrecordMaxFileSize),xf:!!a.tfrecordSequenceData,re:!!a.tfrecordCollapseBands,af:cl(a.tfrecordMaskedThreshold),defaultValue:cl(a.tfrecordDefaultValue),Ha:hl(a.tfrecordPatchDimensions),Ye:hl(a.tfrecordKernelSize),Id:null});a=a.tfrecordTensorDepths;if(null!=a)if(w(a)){var c={};Db(a, +function(d,e){if("string"!==typeof e||"number"!==typeof d)throw Error('"tensorDepths" option must be an object of type Object');c[e]=d});b.Id=c}else throw Error('"tensorDepths" option needs to have the form Object.');return b},jl=function(a,b){var c=new tf({ia:null,ga:null,ld:null,Jd:null,F:Yj(a.fileFormat)});if("GEO_TIFF"===c.F){if(a.fileDimensions&&a.tiffFileDimensions)throw Error('Export cannot set both "fileDimensions" and "tiffFileDimensions".');var d=new If({qe:!!a.tiffCloudOptimized, +Cf:!!a.tiffSkipEmptyFiles,Ha:hl(a.fileDimensions||a.tiffFileDimensions)});c.ld=d}else"TF_RECORD_IMAGE"===c.F&&(c.Jd=il(a));"GOOGLE_CLOUD_STORAGE"===b?c.ia=el(a):c.ga=fl(a);return c},kl=function(a,b){var c=new Bf({ia:null,ga:null,F:"MP4"});"GOOGLE_CLOUD_STORAGE"===b?c.ia=el(a):c.ga=fl(a);return c},ll=function(a){var b=cl(a.maxZoom),c=cl(a.scale),d=cl(a.minZoom),e=!!a.skipEmptyTiles,f=bl(a.mapsApiKey),g=hl(a.tileDimensions),h=cl(a.stride);var m=cl(a.minTimeMachineZoomSubset);a=cl(a.maxTimeMachineZoomSubset); +if(null==m&&null==a)m=null;else{var p=new pg({min:0,max:null});null!=m&&(p.min=m);p.max=a;m=p}return new wf({maxZoom:b,scale:c,minZoom:d,Df:e,Xe:f,Ha:g,Ef:h,Pf:m})},hl=function(a){if(null==a)return null;var b=new Jf({height:0,width:0});"string"===typeof a&&(-1!==a.indexOf("x")?a=a.split("x").map(Number):-1!==a.indexOf(",")&&(a=a.split(",").map(Number)));if(u(a))if(2===a.length)b.height=a[0],b.width=a[1];else if(1===a.length)b.height=a[0],b.width=a[0];else throw Error("Unable to construct grid from dimensions: "+ +a);else if("number"!==typeof a||isNaN(a))if(w(a)&&null!=a.height&&null!=a.width)b.height=a.height,b.width=a.width;else throw Error("Unable to construct grid from dimensions: "+a);else b.height=a,b.width=a;return b},el=function(a){var b=null;null!=a.writePublicTiles&&(b=a.writePublicTiles?"PUBLIC":"DEFAULT_OBJECT_ACL");return new Hf({me:bl(a.outputBucket),ua:bl(a.outputPrefix),ne:a.bucketCorsUris||null,permissions:b})},fl=function(a){return new gf({Je:bl(a.driveFolder),ua:bl(a.driveFileNamePrefix)})};var nl=function(a,b){this.Ta=a;this.Qd=b;this.j={};this.pc=!0;if(0e?e+h:e);return d.replace("{x}",e).replace("{y}",f).replace("{z}",g)},urlFormat:d}},Cl=function(a,b){if(M)return a=xl(Rk(a)),b=new H(b),I(b,Fg(b.value(),ij(),new Xe({i:a})).then(function(c){return c.result}));a={json:Nk(a)};return K("/value",J(a),b)}; +y("ee.data.computeValue",Cl); +var Dl=function(a,b){if(M){if("string"===typeof a.image)throw Error("Image as JSON string not supported.");if(void 0!==a.version)throw Error("Image version specification not supported.");if(void 0!==a.region)throw Error('"region" not supported in call to ee.data.getThumbId. Use ee.Image.getThumbURL.');if(void 0!==a.dimensions)throw Error('"dimensions" is not supported in call to ee.data.getThumbId. Use ee.Image.getThumbURL.');a=new og({name:null,i:xl(Rk(a.image)),F:Yj(a.format),ua:a.name,ba:bk(a.bands), +Ob:ek(a),J:null});b=new H(b);return I(b,(new Dg(b.P)).create(ij(),a,{fields:["name"]}).then(function(d){return{thumbid:d.name,token:""}}))}a=Ob(a);u(a.dimensions)&&(a.dimensions=a.dimensions.join("x"));var c=a.image||a.imageCollection;"string"!==typeof c&&(c=c.X());a.image=c;delete a.imageCollection;a=J(a).add("getid","1");return K("/thumb",a,b)};y("ee.data.getThumbId",Dl); +var El=function(a,b){if(!M)throw Error("getVideoThumbId is only supported in Cloud API mode.");var c=new Cf({framesPerSecond:a.framesPerSecond||null,maxFrames:a.maxFrames||null,maxPixelsPerFrame:a.maxPixelsPerFrame||null});a=new sg({name:null,i:xl(Rk(a.imageCollection)),F:Yj(a.format),Ja:c,J:null});b=new H(b);return I(b,(new Ig(b.P)).create(ij(),a,{fields:["name"]}).then(function(d){return{thumbid:d.name,token:""}}))};y("ee.data.getVideoThumbId",El);wl.push("getVideoThumbId"); +var Fl=function(a,b){if(!M)throw Error("getFilmstripThumbId is only supported in Cloud API mode.");a=new Ef({name:null,i:xl(Rk(a.imageCollection)),F:Yj(a.format),orientation:ak(a.orientation),J:null});b=new H(b);return I(b,(new xg(b.P)).create(ij(),a,{fields:["name"]}).then(function(c){return{thumbid:c.name,token:""}}))};y("ee.data.getFilmstripThumbId",Fl);wl.push("getFilmstripThumbId"); +var Gl=function(a){return M?Aj+"/v1alpha/"+a.thumbid+":getPixels":Aj+"/api/thumb?thumbid="+a.thumbid+"&token="+a.token};y("ee.data.makeThumbUrl",Gl); +var Il=function(a,b){if(M){a=Object.assign({},a);a.id&&(a.image=new N(a.id));if("string"===typeof a.image)throw Error("Image as serialized JSON string not supported.");if(!a.image)throw Error("Missing ID or image parameter.");a.filePerBand=!1!==a.filePerBand;a.format=a.format||(a.filePerBand?"ZIPPED_GEO_TIFF_PER_BAND":"ZIPPED_GEO_TIFF");if(null!=a.region&&(null!=a.scale||null!=a.crs_transform)&&null!=a.dimensions)throw Error("Cannot specify (bounding region, crs_transform/scale, dimensions) simultaneously."); +if("string"===typeof a.bands)try{a.bands=JSON.parse(a.bands)}catch(d){a.bands=bk(a.bands)}if(a.bands&&!Array.isArray(a.bands))throw Error("Bands parameter must be an array.");a.bands&&a.bands.every(function(d){return"string"===typeof d})&&(a.bands=a.bands.map(function(d){return{id:d}}));if(a.bands&&a.bands.some(function(d){return null==d.id}))throw Error("Each band dictionary must have an id.");"string"===typeof a.region&&(a.region=JSON.parse(a.region));if("string"===typeof a.crs_transform)try{a.crs_transform= +JSON.parse(a.crs_transform)}catch(d){}var c=Hl(a.image,a);a=new og({name:null,i:xl(Rk(c)),F:Yj(a.format),ua:a.name,ba:a.bands&&bk(a.bands.map(function(d){return d.id})),J:null});b=new H(b);return I(b,(new Dg(b.P)).create(ij(),a,{fields:["name"]}).then(function(d){return{docid:d.name,token:""}}))}a=Ob(a);return K("/download",J(a),b)};y("ee.data.getDownloadId",Il);var Jl=function(a){gj();var b=Aj;return M?b+"/v1alpha/"+a.docid+":getPixels":b+"/api/download?docid="+a.docid+"&token="+a.token}; +y("ee.data.makeDownloadUrl",Jl);var Kl=function(a,b){if(M&&b){var c=b;b=function(d,e){return c((d||{}).data||d,e)}}a=Ob(a);a=K("/table",J(a),b);return M?(a||{}).data||a:a};y("ee.data.getTableDownloadId",Kl);var Ll=function(a){return Aj+"/api/table?docid="+a.docid+"&token="+a.token};y("ee.data.makeTableDownloadUrl",Ll); +var Ml=function(a,b){if(M){var c=function(e){return Math.floor(Math.random()*Math.pow(2,4*e)).toString(16).padStart(e,"0")};a=ob(a||1).map(function(){return[c(8),c(4),"4"+c(3),(8+Math.floor(4*Math.random())).toString(16)+c(3),c(12)].join("-")});return b?b(a):a}var d={};"number"===typeof a&&(d.count=a);return K("/newtaskid",J(d),b)};y("ee.data.newTaskId",Ml); +var Ol=function(a,b){if(M){var c=Nl(a).map(wk);if(1===c.length)return b=new H(b),I(b,b.Fa().get(c[0]).then(function(e){return[yk(e)]}));b=new lj(b);var d=b.Fa();return b.send(c.map(function(e){return[e,d.get(e)]}),function(e){return c.map(function(f){return yk(e[f])})})}a="/taskstatus?q="+Nl(a).join();return K(a,null,b,"GET")};y("ee.data.getTaskStatus",Ol); +var Nl=function(a){if("string"===typeof a)return[a];if(u(a))return a;throw Error("Invalid value: expected a string or an array of strings.");},Ql=function(a){return Pl(void 0,a)};y("ee.data.getTaskList",Ql); +var Pl=function(a,b){function c(h){var m={pagesize:500};a&&(m.pagesize=Math.min(m.pagesize,a-e.tasks.length));h&&(m.pagetoken=h);return m}function d(h,m){m=c(m);K("/tasklist",J(m),function(p,q){q?h(e,q):(lb(e.tasks,p.tasks),!p.next_page_token||a&&e.tasks.length>=a?h(e):d(h,p.next_page_token))},"GET")}if(M)return b?(Rl(a,function(h,m){return b(h?{tasks:h.map(yk)}:null,m)}),null):{tasks:Rl(a).map(yk)};var e={tasks:[]};if(b)return d(b),null;for(var f="";;){f=c(f);var g=K("/tasklist",J(f),void 0,"GET"); +lb(e.tasks,g.tasks);f=g.next_page_token;if(!g.next_page_token||a&&e.tasks.length>=a)break}return e};y("ee.data.getTaskListWithLimit",Pl);var Rl=function(a,b){var c=[],d={pageSize:500},e=function(h){lb(c,h.Fa||[]);!h.nextPageToken||a&&c.length>=a?b&&b(a?c.slice(0,a):c):(d.pageToken=h.nextPageToken,I(f,g.list(ij(),d).then(e)));return null},f=new H(b?function(h,m){return m&&b(h,m)}:void 0),g=f.Fa();I(f,g.list(ij(),d).then(e));return b?null:a?c.slice(0,a):c};y("ee.data.listOperations",Rl);wl.push("listOperations"); +var Sl=function(a,b){a=Nl(a);var c=new Ue;if(1===a.length)b=new H(b),I(b,b.Fa().cancel(a[0],c));else{b=new lj(b);var d=b.Fa();b.send(a.map(function(e){return[e,d.cancel(e,c)]}))}};y("ee.data.cancelOperation",Sl);wl.push("cancelOperation");var Tl=function(a,b){var c=Nl(a).map(wk);if(!u(a))return a=new H(b),I(a,a.Fa().get(c[0]));a=new lj(b);var d=a.Fa();return a.send(c.map(function(e){return[e,d.get(e)]}))};y("ee.data.getOperation",Tl);wl.push("getOperation"); +var Vl=function(a,b){return Ul(a,"CANCEL",b)};y("ee.data.cancelTask",Vl);var Ul=function(a,b,c){if(!Jb(Wl,b))throw Error("Invalid action: "+b);a=Nl(a);return M?(a=a.map(wk),Sl(a,c),null):K("/updatetask",J({id:a,action:b}),c,"POST")};y("ee.data.updateTask",Ul); +var am=function(a,b,c){if(M){b.id=a;var d=b.type;a=null!=b.sourceUrl?{__source_url__:b.sourceUrl}:{};var e=new H(c);c=function(f){return I(e,f.then(zk))};switch(d){case "EXPORT_IMAGE":return b=Xl(b,a),c(e.image().Xa(ij(),b));case "EXPORT_FEATURES":return b=gl(b),b.i=xl(b.i,a),c(e.table().Xa(ij(),b));case "EXPORT_VIDEO":return b=Yl(b,a),c(e.video().Xa(ij(),b));case "EXPORT_TILES":return b=Zl(b,a),c(e.map().Xa(ij(),b));case "EXPORT_VIDEO_MAP":return b=$l(b),c((new Hg(e.P)).Xa(ij(),b));default:throw Error("Unable to start processing for task of type "+ +d);}}b=Ob(b);null!=b.element&&(b.json=b.element.X(),delete b.element);u(b.crs_transform)&&(b.crs_transform=b.crs_transform.toString());b.id=a;return K("/processingrequest",J(b),c)};y("ee.data.startProcessing",am); +var Xl=function(a,b){var c=bm(a);if(null==c.element)throw Error('"element" not found in params '+c);a=new rf({i:Rk(c.element),description:bl(c.description),ha:null,Ua:null,J:null,bf:bl(c.maxPixels),requestId:bl(c.id),U:cl(c.maxWorkers)});var d=dl(c);switch(d){case "GOOGLE_CLOUD_STORAGE":case "DRIVE":a.ha=jl(c,d);break;case "ASSET":d=c.pyramidingPolicy||{};try{d=JSON.parse(d)}catch(f){}var e="PYRAMIDING_POLICY_UNSPECIFIED";"string"===typeof d?(e=d,d={}):d[".default"]&&(e=d[".default"],delete d[".default"]); +c=new sf({wb:new nf({name:kk(c.assetId)}),pyramidingPolicy:e,nf:Mb(d)?null:d});a.Ua=c;break;default:throw Error('Export destination "'+d+'" unknown');}a.i=xl(a.i,b);return a},Yl=function(a,b){a=cm(a);if(null==a.element)throw Error('"element" not found in params '+a);var c=new Df({i:Rk(a.element),description:bl(a.description),Ja:new Cf({framesPerSecond:cl(a.framesPerSecond),maxFrames:cl(a.maxFrames),maxPixelsPerFrame:bl(a.maxPixels)}),ha:null,requestId:bl(a.id),U:cl(a.maxWorkers)});c.ha=kl(a,dl(a)); +c.i=xl(c.i,b);return c},Zl=function(a,b){var c=a.scale;delete a.scale;a=bm(a);a.scale=c;if(null==a.element)throw Error('"element" not found in params '+a);c=new vf({i:Rk(a.element),description:bl(a.description),Lb:ll(a),Kb:jl(a,"GOOGLE_CLOUD_STORAGE"),requestId:bl(a.id),U:cl(a.maxWorkers)});c.i=xl(c.i,b);return c},$l=function(a){var b=a.scale;delete a.scale;a=cm(a);a.scale=b;if(null==a.element)throw Error('"element" not found in params '+a);b=new Af({i:Rk(a.element),description:bl(a.description), +Ja:new Cf({framesPerSecond:cl(a.framesPerSecond),maxFrames:cl(a.maxFrames),maxPixelsPerFrame:null}),Lb:ll(a),Kb:kl(a,"GOOGLE_CLOUD_STORAGE"),requestId:bl(a.id),version:bl(a.version),U:cl(a.maxWorkers)});b.i=xl(b.i);return b},em=function(a,b,c){if(M){b=Dk(b);var d=function(e){return e?zk(e):null};return d(dm(a,b,c&&function(e,f){return c(d(e),f)}))}a={id:a,request:$h(b)};return K("/ingestionrequest",J(a),c)};y("ee.data.startIngestion",em); +var dm=function(a,b,c){b=new Yf({Pe:b,requestId:a,overwrite:null,description:null});a=new H(c,a?void 0:0);return I(a,a.image().import(ij(),b))},fm=function(a,b,c){b=new Zf({Hf:b,requestId:a,overwrite:null,description:null});a=new H(c,a?void 0:0);return I(a,a.table().import(ij(),b))},gm=function(a,b,c){if(M){b=Ek(b);var d=function(e){return e?zk(e):null};return d(fm(a,b,c&&function(e,f){return c(d(e),f)}))}a={id:a,tableRequest:$h(b)};return K("/ingestionrequest",J(a),c)}; +y("ee.data.startTableIngestion",gm);var hm=function(a,b){return M?(b=new H(b),a=kk(a),I(b,b.S().get(a,{prettyPrint:!1}).then(lk))):K("/info",(new Ui).add("id",a),b)};y("ee.data.getAsset",hm);wl.push("getAsset");y("ee.data.getInfo",hm); +var im=function(a,b){if(M){b=new H(b);var c=b.S(),d=kk(a.id),e=ik.test(a.id);e&&(c=new ug(b.P),d="projects/"+jk(a.id));if(Object.keys(a).every(function(f){return"id"===f||"num"===f}))return I(b,c.Gc(d,{pageSize:a.num}).then(mk));if(e)throw Error("getList on a project does not support filtering options. Please provide a full asset path. Got: "+a.id);a=tk(a);return I(b,wg(c,d,a).then(ok))}a=J(a);return K("/list",a,b)};y("ee.data.getList",im); +var jm=function(a,b,c){b=void 0===b?{}:b;var d=ik.test(a);c=new H(c);var e=d?new ug(c.P):c.S();a=d?"projects/"+jk(a):kk(a);return I(c,e.Gc(a,b))};y("ee.data.listAssets",jm);wl.push("listAssets");var km=function(a,b,c){b=void 0===b?{}:b;c=new H(c);return I(c,wg(c.S(),a,b))};y("ee.data.listImages",km);wl.push("listImages");var lm=function(a,b){b=new H(b);return I(b,(new ug(b.P)).Gc(a||ij()))};y("ee.data.listBuckets",lm);wl.push("listBuckets"); +var mm=function(a){return M?(a=new H(a),I(a,(new ug(a.P)).Gc(ij()).then(mk))):K("/buckets",null,a,"GET")};y("ee.data.getAssetRoots",mm);var nm=function(a,b){if(M){var c="projects/"+jk(a);a="projects/earthengine-legacy"===c?a:void 0;var d=new hf({type:"Folder"});b=new H(b);I(b,b.S().create(c,d,{assetId:a}).then(lk))}else c=J({id:a}),K("/createbucket",c,b)};y("ee.data.createAssetHome",nm); +var om=function(a,b,c,d,e){if(M){if(c)throw Error("Asset overwrite not supported.");if("string"===typeof a)throw Error("Asset cannot be specified as string.");c=a.name||b&&kk(b);if(!c)throw Error("Either asset name or opt_path must be specified.");var f=c.indexOf("/assets/");if(-1===f)throw Error("Asset name must contain /assets/.");a=new hf(a);b=c.slice(0,f);c=c.slice(f+8);a.id=null;a.name=null;d&&!a.properties&&(a.properties=d);a:switch(d=a.type,d){case "ImageCollection":d="IMAGE_COLLECTION";break a; +case "Folder":d="FOLDER"}a.type=d;e=new H(e);return I(e,e.S().create(b,a,{assetId:c}).then(lk))}"string"!==typeof a&&(a=$h(a));a={value:a};void 0!==b&&(a.id=b);a.force=c||!1;void 0!=d&&(a.properties=$h(d));return K("/create",J(a),e)};y("ee.data.createAsset",om);var pm=function(a,b,c){return M?om({type:"Folder"},a,b,void 0,c):K("/createfolder",J({id:a,force:b||!1}),c)};y("ee.data.createFolder",pm); +var qm=function(a,b,c){M?(a=kk(a),b=kk(b),b=new gg({ub:b}),c=new H(c),I(c,c.S().move(a,b).then(lk))):K("/rename",J({sourceId:a,destinationId:b}),c)};y("ee.data.renameAsset",qm); +var rm=function(a,b,c,d){if(M){a=kk(a);b=kk(b);c=new af({ub:b,overwrite:null!=c?c:null});d=new H(d);b=lk;var e=d.S();e.h.w(a,/^projects\/[^/]+\/assets\/.*$/);a=G(e.h,{body:c,s:"POST",A:"earthengine.projects.assets.copy",path:"/"+e.m+"/"+a+":copy",o:{"$.xgafv":void 0,access_token:void 0,alt:void 0,callback:void 0,fields:void 0,key:void 0,oauth_token:void 0,prettyPrint:void 0,quotaUser:void 0,uploadType:void 0,upload_protocol:void 0},C:hf});I(d,a.then(b))}else a={sourceId:a,destinationId:b},c&&(a.allowOverwrite= +c),K("/copy",J(a),d)};y("ee.data.copyAsset",rm);var sm=function(a,b){M?(b=new H(b),I(b,b.S().delete(kk(a)))):K("/delete",J({id:a}),b)};y("ee.data.deleteAsset",sm); +var tm=function(a,b){if(M){a=kk(a);var c=new Kf;b=new H(b);var d=b.S(),e={prettyPrint:!1},f=void 0===e?{$Xgafv:void 0,access_token:void 0,alt:void 0,callback:void 0,fields:void 0,key:void 0,oauth_token:void 0,prettyPrint:void 0,quotaUser:void 0,uploadType:void 0,upload_protocol:void 0}:e;e=void 0===f.$Xgafv?void 0:f.$Xgafv;var g=void 0===f.access_token?void 0:f.access_token,h=void 0===f.alt?void 0:f.alt,m=void 0===f.callback?void 0:f.callback,p=void 0===f.fields?void 0:f.fields,q=void 0===f.key?void 0: +f.key,v=void 0===f.oauth_token?void 0:f.oauth_token,z=void 0===f.prettyPrint?void 0:f.prettyPrint,E=void 0===f.quotaUser?void 0:f.quotaUser,L=void 0===f.uploadType?void 0:f.uploadType;f=void 0===f.upload_protocol?void 0:f.upload_protocol;d.h.w(a,/^projects\/[^/]+\/assets\/.*$/);a=G(d.h,{body:c,s:"POST",A:"earthengine.projects.assets.getIamPolicy",path:"/"+d.m+"/"+a+":getIamPolicy",o:{"$.xgafv":e,access_token:g,alt:h,callback:m,fields:p,key:q,oauth_token:v,prettyPrint:z,quotaUser:E,uploadType:L,upload_protocol:f}, +C:jg});return I(b,a.then(uk))}return K("/getacl",J({id:a}),b,"GET")};y("ee.data.getAssetAcl",tm); +var um=function(a,b,c,d){b=new rg({ie:b,jc:(c||[]).join(",")});d=new H(d);c=lk;var e=d.S();a=kk(a);e.h.w(a,/^projects\/[^/]+\/assets\/.*$/);a=G(e.h,{body:b,s:"PATCH",A:"earthengine.projects.assets.patch",path:"/"+e.m+"/"+a,o:{"$.xgafv":void 0,access_token:void 0,alt:void 0,callback:void 0,fields:void 0,key:void 0,oauth_token:void 0,prettyPrint:void 0,quotaUser:void 0,uploadType:void 0,upload_protocol:void 0},C:hf});return I(d,a.then(c))};y("ee.data.updateAsset",um); +var vm=function(a,b,c){if(M){a=kk(a);b=vk(b);b=new mg({gf:b});c=new H(c);var d=c.S(),e={prettyPrint:!1},f=void 0===e?{$Xgafv:void 0,access_token:void 0,alt:void 0,callback:void 0,fields:void 0,key:void 0,oauth_token:void 0,prettyPrint:void 0,quotaUser:void 0,uploadType:void 0,upload_protocol:void 0}:e;e=void 0===f.$Xgafv?void 0:f.$Xgafv;var g=void 0===f.access_token?void 0:f.access_token,h=void 0===f.alt?void 0:f.alt,m=void 0===f.callback?void 0:f.callback,p=void 0===f.fields?void 0:f.fields,q=void 0=== +f.key?void 0:f.key,v=void 0===f.oauth_token?void 0:f.oauth_token,z=void 0===f.prettyPrint?void 0:f.prettyPrint,E=void 0===f.quotaUser?void 0:f.quotaUser,L=void 0===f.uploadType?void 0:f.uploadType;f=void 0===f.upload_protocol?void 0:f.upload_protocol;d.h.w(a,/^projects\/[^/]+\/assets\/.*$/);a=G(d.h,{body:b,s:"POST",A:"earthengine.projects.assets.setIamPolicy",path:"/"+d.m+"/"+a+":setIamPolicy",o:{"$.xgafv":e,access_token:g,alt:h,callback:m,fields:p,key:q,oauth_token:v,prettyPrint:z,quotaUser:E,uploadType:L, +upload_protocol:f},C:jg});I(c,a)}else b={readers:b.readers,writers:b.writers,all_users_can_read:b.all_users_can_read},a={id:a,value:$h(b)},K("/setacl",J(a),c)};y("ee.data.setAssetAcl",vm); +var wm=function(a,b,c){if(M){var d=rk(b);b=Rd(d.f()).keys.filter(function(e){return"properties"!==e&&F(d,e)}).map(function(e){return e.replace(/([A-Z])/g,function(f,g){return"_"+g.toLowerCase()})}).concat(Object.keys(d.properties||{}).map(function(e){return'properties."'+e+'"'}));um(a,d,b,c)}else a={id:a,properties:$h(b)},K("/setproperties",J(a),c)};y("ee.data.setAssetProperties",wm); +var xm=function(a,b){if(M){var c=kk(a);b=new H(b);var d=b.S(),e=d.h.w;d.h.w=function(f,g){"^projects\\/[^/]+\\/assets\\/.+$"===g.source&&(g=/^projects\/[^/]+\/assets\/.*$/);return e(f,g)};c=d.get(c,{prettyPrint:!1});return I(b,c.then(function(f){if(!(f instanceof hf&&f.quota))throw Error(a+" is not a root folder.");f=f.quota;return{asset_count:{usage:Number(f.je||0),limit:Number(f.$e||0)},asset_size:{usage:Number(f.za||0),limit:Number(f.Eb||0)}}}))}return K("/quota",J({id:a}),b,"GET")}; +y("ee.data.getAssetRootQuota",xm);var Wl={aj:"CANCEL",lk:"UPDATE"};var O=function(a,b,c){if(!(this instanceof O))return ym(O,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.args=b;this.R=c||null};A(O,Qj);y("ee.ComputedObject",O);O.prototype.evaluate=function(a){if(!a||!Ca(a))throw Error("evaluate() requires a callback function.");Cl(this,a)};O.prototype.evaluate=O.prototype.evaluate; +O.prototype.W=function(a){return Cl(this,a)};O.prototype.getInfo=O.prototype.W;O.prototype.encode=function(a){if(null===this.B&&null===this.args)return{type:"ArgumentRef",value:this.R};var b={},c;for(c in this.args)void 0!==this.args[c]&&(b[c]=a(this.args[c]));b={type:"Invocation",arguments:b};a=a(this.B);b["string"===typeof a?"functionName":"function"]=a;return b}; +O.prototype.pa=function(a){if(null===this.B&&null===this.args){if(null===this.R)throw Error("Internal error: function argument not initialized.");return new Oe({oc:this.R})}var b={},c;for(c in this.args)void 0!==this.args[c]&&(b[c]=Sj(a(this.args[c])));return"string"===typeof this.B?Vj(String(this.B),b):this.B.Be(a,b)};O.prototype.X=function(){return Nk(this)};O.prototype.serialize=O.prototype.X;O.prototype.toString=function(){return"ee."+this.name()+"("+Pk(this)+")"}; +y("ee.ComputedObject.prototype.toString",O.prototype.toString);O.prototype.name=function(){return"ComputedObject"};O.prototype.Qf=function(a,b){var c=kb(arguments);c[0]=this;a.apply(t,c);return this};O.prototype.aside=O.prototype.Qf;var zm=function(a,b){if(b instanceof a.constructor)return b;var c=function(){};c.prototype=a.constructor.prototype;a=new c;a.B=b.B;a.args=b.args;a.R=b.R;return a},ym=function(a,b){function c(){return a.apply(this,b)}c.prototype=a.prototype;return new c};var Am={},Bm=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}},Cm=function(a){return"number"===typeof a||a instanceof O&&"Number"==a.name()},Dm=function(a){return"string"===typeof a||a instanceof O&&"String"==a.name()},Em=function(a){return w(a)&& +!Ca(a)?(a=Object.getPrototypeOf(a),null!==a&&null===Object.getPrototypeOf(a)):!1},Fm=function(a,b,c){c=void 0===c?!1:c;return 1===a.length&&Em(a[0])&&(a=b.args,c&&(a=a.slice(1)),a.length)?!(1===a.length||a[1].optional)||"Dictionary"!==a[0].type:!1};var Gm=function(){if(!(this instanceof Gm))return new Gm};A(Gm,Qj);y("ee.Function",Gm);var Hm=Tb;Gm.prototype.call=function(a){return this.apply(Im(this,Array.prototype.slice.call(arguments,0)))};Gm.prototype.call=Gm.prototype.call;Gm.prototype.apply=function(a){a=new O(this,Jm(this,a));return Hm(a,this.Z().returns)};Gm.prototype.apply=Gm.prototype.apply; +var Km=function(a,b,c){var d=void 0!==b,e=a.Z();if(Fm(c,e,d)){if(c=Ob(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=Im(a,d?[b].concat(c):c);return a.apply(c)},Jm=function(a,b){for(var c=a.Z().args,d={},e={},f=0;f/,"");for(var h=0;h/,"");return new P(g,f)}),a&&a())};a?yl(c):c(yl())}},Tm=function(a,b,c,d){Pm();var e=d||"";Db(Nm,function(f,g){var h=g.split(".");if(2==h.length&&h[0]==b){h=e+h[1];var m=f.Z();Om[g]=!0;var p=!1;m.args.length&&(g=m.args[0].type,p="Object"!=g&&Bm(g,c)); +g=p?a.prototype:a;h in g&&!g[h].signature||(g[h]=function(q){return Km(f,p?this:void 0,Array.prototype.slice.call(arguments,0))},g[h].toString=x(f.toString,f,h,p),g[h].signature=m)}})},Um=function(a){var b=function(c){for(var d in c)Ca(c[d])&&c[d].signature&&delete c[d]};b(a);b(a.prototype||{})};var R=function(a,b){var c=Vm(a),d=$a(c,function(m){return m.replace(/^opt_/,"")});a=(a=t.EXPORTED_FN_INFO?t.EXPORTED_FN_INFO[a.toString()].name.split(".").pop()+"()":null)?" to function "+a:"";var e={},f=b[0],g=w(f)&&!Ca(f)&&!u(f)&&"Object"===Object.getPrototypeOf(f).constructor.name;if(1d.length)throw Error("Received too many arguments"+a+". Expected at most "+d.length+" but got "+b.length+".");for(f=0;f=arguments.length){var c=arguments[0];if(b=Em(c))a:{b=Ib(c);var d=["properties"];if(Aa(b)&&Aa(d)&&b.length==d.length){for(var e=b.length,f=0;fa||4');}d.geometry=f;break;case "region":null!=d.geometry&&console.warn("Multiple request parameters converted to region."); +if(!(f instanceof T)){g=f;if("string"===typeof f)try{g=JSON.parse(f)}catch(h){throw Error('Region string "'+f+'" is not valid GeoJSON.');}if(w(g))f=new T(g,null,!1);else throw Error("Region {region} was not convertible to an ee.Geometry.");}d.geometry=f;break;case "scale":d.scale=Number(f);break;default:c[g]=f}});Mb(d)||(d.input=a,a=e.some(function(f){return f in d})?Mm("Image.clipToBoundsAndScale",d):Mm("Image.clip",d));return a},Nn=function(a,b){var c=b.crs||"",d=b.crsTransform||b.crs_transform; +null!=d&&(d=Pn(d));if(!c&&!d)return a;if(d&&!c)throw Error('Must specify "crs" if "crsTransform" is specified.');if(d){if(a=Mm("Image.reproject",{image:a,crs:c,crsTransform:d}),null!=b.dimensions&&null==b.scale&&null==b.region){var e=b.dimensions;"string"===typeof e&&(e=e.split("x").map(Number));2===e.length&&(delete b.dimensions,c=(new P("Projection")).call(c,d),b.region=new jn([0,0,e[0],e[1]],c,!1))}}else a=Mm("Image.setDefaultProjection",{image:a,crs:c,crsTransform:[1,0,0,0,-1,0]});return a},Pn= +function(a){if("string"===typeof a)try{a=JSON.parse(a)}catch(b){}if(u(a)){if(6===a.length&&bb(a,function(b){return"number"===typeof b}))return a;throw Error("Invalid argument, crs transform must be a list of 6 numbers.");}throw Error("Invalid argument, crs transform was not a string or array.");},Rn=function(a,b){var c={};b=Qn(b,c);Mb(b)||(b.image=a,a=Mm("Image.visualize",b));c.image=a;return c},Qn=function(a,b){var c="bands gain bias min max gamma palette opacity forceRgbOutput".split(" "),d={}; +Db(a,function(e,f){fb(c,f)?d[f]=e:b[f]=e});return d},Hl=function(a,b){b=Object.assign({},b);var c=function(e){var f={};["crs","crs_transform","dimensions","region"].forEach(function(g){g in e&&(f[g]=e[g])});null!=e.scale&&null==e.dimensions&&(f.scale=e.scale);return f},d=function(e){var f=e.id;if(void 0===f)throw Error("Each band dictionary must have an id.");f=a.select(f);var g=c(b);e=c(e);e=c(Object.assign(g,e));f=Nn(f,e);return f=On(f,e,{})};"ZIPPED_GEO_TIFF_PER_BAND"===b.format&&b.bands&&b.bands.length? +(d=b.bands.map(d),a=d.reduce(function(e,f){return Q("Image.addBands",e,f,null,!0)},d.shift())):(d=c(b),a=Nn(a,d),a=On(a,d,{}));return a};var N=function(a){if(!(this instanceof N))return ym(N,arguments);if(a instanceof N)return a;Sn();var b=arguments.length;if(0==b||1==b&&void 0===a)S.call(this,new P("Image.mask"),{image:new N(0),mask:new N(0)});else if(1==b)if(Cm(a))S.call(this,new P("Image.constant"),{value:a});else if(Dm(a))S.call(this,new P("Image.load"),{id:a});else{if(u(a))return Tn($a(a,function(d){return new N(d)}));if(a instanceof O)"Array"==a.name()?S.call(this,new P("Image.constant"),{value:a}):S.call(this,a.B,a.args,a.R); +else throw Error("Unrecognized argument type to convert to an Image: "+a);}else if(2==b){b=arguments[0];var c=arguments[1];if(Dm(b)&&Cm(c))S.call(this,new P("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)");};A(N,S);y("ee.Image",N);var Un=!1,Sn=function(){Un||(Tm(N,"Image","Image"),Tm(N,"Window","Image","focal_"),Un=!0)}; +N.prototype.W=function(a){return N.G.W.call(this,a)};N.prototype.getInfo=N.prototype.W;N.prototype.getMap=function(a,b){var c=this,d=R(N.prototype.getMap,arguments),e=Rn(this,d.visParams);if(d.callback){var f=d.callback;Al(e,function(g,h){g=g?Object.assign(g,{image:c}):void 0;f(g,h)})}else return d=Al(e),d.image=this,d};N.prototype.getMap=N.prototype.getMap; +N.prototype.jb=function(a,b){var c=R(N.prototype.jb,arguments),d=c.params?Ob(c.params):{};d.image=M?this:this.X();if(c.callback){var e=c.callback;Il(d,function(f,g){f?e(Jl(f)):e(null,g)})}else return Jl(Il(d))};N.prototype.getDownloadURL=N.prototype.jb; +N.prototype.md=function(a,b){var c=R(N.prototype.jb,arguments),d=c.params?Ob(c.params):{};if(M){var e={},f=Nn(this,d);f=On(f,d,e);d=Rn(f,e)}else if(d=Rn(this,d),d.region)if(d.region instanceof T&&(d.region=d.region.Sc()),u(d.region)||Em(d.region))d.region=$h(d.region);else if("string"!==typeof d.region)throw Error("The region parameter must be an array or a GeoJSON object.");return c.callback?(Dl(d,c.callback),null):Dl(d)};N.prototype.getThumbId=N.prototype.md; +N.prototype.Le=function(a,b){var c=R(N.prototype.Le,arguments);if(c.callback)this.md(c.params,function(d,e){var f="";if(void 0===e)try{f=Gl(d)}catch(g){e=String(g.message)}c.callback(f,e)});else return Gl(this.md(c.params))};N.prototype.getThumbURL=N.prototype.Le;var Vn=function(a,b,c){var d=R(Vn,arguments);return Tn([d.r,d.g,d.b],["vis-red","vis-green","vis-blue"])};N.rgb=Vn;var Wn=function(a){return Tn(Array.prototype.slice.call(arguments),null)};N.cat=Wn; +var Tn=function(a,b){if(0==a.length)return Q("Image.constant",[]);for(var c=new N(a[0]),d=1;d/,"");c[e]=!0}var f=t.ee,g;for(g in b)g in c&&!(g in f)&&(f[g]=ep(g),Zo.push(g),a[g]?(f[g].signature=a[g],f[g].signature.isConstructor=!0,Om[g]=!0):f[g].signature={});Am=f;fp()}catch(h){Xo(h);return}To="ready";for(Uo=[];0=this.left&&a.right<=this.right&&a.top>=this.top&&a.bottom<=this.bottom:a.x>=this.left&&a.x<=this.right&&a.y>=this.top&&a.y<=this.bottom:!1}; +k.expand=function(a,b,c,d){w(a)?(this.top-=a.top,this.right+=a.right,this.bottom+=a.bottom,this.left-=a.left):(this.top-=a,this.right+=Number(b),this.bottom+=Number(c),this.left-=Number(d));return this};k.ceil=function(){this.top=Math.ceil(this.top);this.right=Math.ceil(this.right);this.bottom=Math.ceil(this.bottom);this.left=Math.ceil(this.left);return this}; +k.floor=function(){this.top=Math.floor(this.top);this.right=Math.floor(this.right);this.bottom=Math.floor(this.bottom);this.left=Math.floor(this.left);return this};k.round=function(){this.top=Math.round(this.top);this.right=Math.round(this.right);this.bottom=Math.round(this.bottom);this.left=Math.round(this.left);return this}; +k.translate=function(a,b){a instanceof Lg?(this.left+=a.x,this.right+=a.x,this.top+=a.y,this.bottom+=a.y):(Sa(a),this.left+=a,this.right+=a,"number"===typeof b&&(this.top+=b,this.bottom+=b));return this};k.scale=function(a,b){b="number"===typeof b?b:a;this.left*=a;this.right*=a;this.top*=b;this.bottom*=b;return this};var tp=function(a,b,c,d){this.left=a;this.top=b;this.width=c;this.height=d};k=tp.prototype;k.clone=function(){return new tp(this.left,this.top,this.width,this.height)};k.toString=function(){return"("+this.left+", "+this.top+" - "+this.width+"w x "+this.height+"h)"}; +k.Sg=function(a){var b=Math.max(this.left,a.left),c=Math.min(this.left+this.width,a.left+a.width);if(b<=c){var d=Math.max(this.top,a.top);a=Math.min(this.top+this.height,a.top+a.height);if(d<=a)return this.left=b,this.top=d,this.width=c-b,this.height=a-d,!0}return!1};k.intersects=function(a){return this.left<=a.left+a.width&&a.left<=this.left+this.width&&this.top<=a.top+a.height&&a.top<=this.top+this.height}; +k.Ae=function(a){b:{var b=Math.max(this.left,a.left);var c=Math.min(this.left+this.width,a.left+a.width);if(b<=c){var d=Math.max(this.top,a.top),e=Math.min(this.top+this.height,a.top+a.height);if(d<=e){b=new tp(b,d,c-b,e-d);break b}}b=null}if(b&&b.height&&b.width){b=[];c=this.top;d=this.height;e=this.left+this.width;var f=this.top+this.height,g=a.left+a.width,h=a.top+a.height;a.top>this.top&&(b.push(new tp(this.left,this.top,this.width,a.top-this.top)),c=a.top,d-=a.top-this.top);hthis.left&&b.push(new tp(this.left,c,a.left-this.left,d));g=this.left&&a.x<=this.left+this.width&&a.y>=this.top&&a.y<=this.top+this.height:this.left<=a.left&&this.left+this.width>=a.left+a.width&&this.top<=a.top&&this.top+this.height>=a.top+a.height}; +k.distance=function(a){var b=a.xa.y||a.y>=d)return c.createElement("div");var e=a.x%d;0>e&&(e+=d);d=new google.maps.Point(e,a.y);a=[[a.x,a.y,b,this.nb++].join("-"),this.If.Ig()].join("-");b=this.kg(d,b,c,a);b.tileSize=this.tileSize;up(b.oa,this.opacity);this.ob.set(a,b);xp(this,b);this.dispatchEvent(new yp(this.zc()));this.If.Xg(b,(new Date).getTime()/1E3);return b.oa};k.releaseTile=function(a){var b=this.ob.get(a.id);this.ob.remove(a.id);b&&(b.abort(),La(b))}; +var xp=function(a,b){a.Ya.Oa(b,"status-changed",function(){switch(b.getStatus()){case "loaded":var c=b.zi,d=(new Date).getTime();kp(this.Fd,b.zoom).tileLatencies.push(d-c);this.dispatchEvent(new zp(this.zc()));break;case "throttled":kp(this.Fd,b.zoom).throttleCount++;this.dispatchEvent(new Ap(b.Ga));break;case "failed":kp(this.Fd,b.zoom).errorCount++;this.dispatchEvent(new Bp(b.Ga,b.mi));break;case "aborted":this.dispatchEvent(new Cp(this.zc()))}})}; +vp.prototype.D=function(){vp.G.D.call(this);this.ob.forEach(La);this.ob.clear();this.ob=null;La(this.Ya);this.If=this.Ya=null};var wp=function(a,b){return cb(a.ob.T(),function(c){return c.getStatus()==b})},zp=function(){Ma.call(this,"tile-load")};A(zp,Ma);var yp=function(){Ma.call(this,"tile-start")};A(yp,Ma);var Ap=function(){Ma.call(this,"tile-throttle")};A(Ap,Ma);var Bp=function(a,b){Ma.call(this,"tile-fail");this.errorMessage=b};A(Bp,Ma);var Cp=function(){Ma.call(this,"tile-abort")};A(Cp,Ma); +var Dp=function(a,b,c,d){td.call(this);this.Tb=a;this.zoom=b;this.oa=c.createElement("div");this.oa.id=d;this.Bi=5;this.Bd=function(){};this.Hd="new";this.uh=0;this.Ue=!1};A(Dp,td); +var Fp=function(a){if(!a.Ue&&"loading"==a.getStatus())throw Error("startLoad() can only be invoked once. Use retryLoad() after the first attempt.");Ep(a,"loading");a.zi=(new Date).getTime();a.Sa=new vi;a.Sa.dc="blob";a.Sa.Oa("complete",function(){var b=Ii(this.Sa),c=this.Sa.getStatus();429==c&&Ep(this,"throttled");if(Sh(c)){var d={};Db(Ji(this.Sa),function(f,g){d[g.toLowerCase()]=f});this.Oi=d;this.Ah=b;this.xc()}else if(b){var e=new rp;e.Oa("loadend",function(){this.Pc(e.aa.result)},void 0,this); +e.readAsText(b)}else this.Pc("Failed to load tile.")},!1,a);a.Sa.Ic("ready",Ia(La,a.Sa));a.Ga&&a.Ga.endsWith("&profiling=1")&&M&&(a.Ga=a.Ga.replace("&profiling=1",""),a.Sa.headers.set("X-Earth-Engine-Computation-Profile","1"));a.Sa.send(a.Ga,"GET")};k=Dp.prototype;k.xc=function(){this.Bd(this);Ep(this,"loaded")};k.rc=function(){La(this.Sa)}; +k.Pc=function(a){var b=function(c){try{if(c=JSON.parse(c),c.error&&c.error.message)return c.error.message}catch(d){}return c};this.uh>=this.Bi?(this.mi=b(a),Ep(this,"failed")):(this.rc(),setTimeout(x(function(){this.Ma||(this.Ue=!0,Fp(this),this.Ue=!1)},this),1E3*Math.pow(2,this.uh++)))};k.abort=function(){this.rc();"aborted"!=this.getStatus()&&"removed"!=this.getStatus()&&Ep(this,this.Hd in Gp?"removed":"aborted")};k.getStatus=function(){return this.Hd}; +var Ep=function(a,b){a.Hd=b;a.dispatchEvent("status-changed")},Gp={aborted:!0,failed:!0,loaded:!0,removed:!0};Dp.prototype.D=function(){Dp.G.D.call(this);this.rc();this.oa.remove();this.Bd=null};var Hp=function(){Ka.call(this)};A(Hp,Ka);var Ip=function(a,b){vp.call(this,a,b);this.ag=new Ad;this.ug=new Ad};n(Ip,vp);Ip.prototype.kg=function(a,b,c,d){var e=new Jp(a,b,c,d);this.Ya.Oa(e,"status-changed",function(){"loaded"==e.getStatus()&&(this.ag.set(a,new Float32Array(e.gi)),this.ug.set(a,e.oa))});return e};Ip.prototype.D=function(){vp.prototype.D.call(this);this.ug=this.ag=null};y("ee.layers.BinaryOverlay",Ip);var Jp=function(a,b,c,d){Dp.call(this,a,b,c,d)};n(Jp,Dp); +Jp.prototype.xc=function(){var a=new rp;a.Oa("loadend",function(){this.gi=a.aa.result;Dp.prototype.xc.call(this)},void 0,this);a.readAsArrayBuffer(this.Ah)};var Kp=function(a){td.call(this);this.Dc={};this.Cc={};this.Ab=new lp(this);this.N=a};A(Kp,td);var Lp=[Cc&&!Mc("11")?"readystatechange":"load","abort","error"],Mp=function(a,b,c){(c="string"===typeof c?c:c.src)&&(a.Dc[b]={src:c,ig:null})},Np=function(a,b){delete a.Dc[b];var c=a.Cc[b];c&&(delete a.Cc[b],a.Ab.Od(c,Lp,a.gh),Mb(a.Cc)&&Mb(a.Dc)&&a.dispatchEvent("complete"))}; +Kp.prototype.start=function(){var a=this.Dc;Ya(Ib(a),function(b){var c=a[b];if(c&&(delete a[b],!this.Ma)){if(this.N){var d=this.N;d=(d?new Xg(Wg(d)):Oa||(Oa=new Xg)).ki("IMG")}else d=new Image;c.ig&&(d.crossOrigin=c.ig);this.Ab.Oa(d,Lp,this.gh);this.Cc[b]=d;d.id=b;d.src=c.src}},this)}; +Kp.prototype.gh=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.Ma||Np(this,b.id)}};Kp.prototype.D=function(){delete this.Dc;delete this.Cc;La(this.Ab);Kp.G.D.call(this)};var Op=function(a,b){vp.call(this,a,b)};n(Op,vp);Op.prototype.kg=function(a,b,c,d){return new Pp(a,b,c,d)};y("ee.layers.ImageOverlay",Op);var Pp=function(a,b,c,d){Dp.call(this,a,b,c,d);this.Bd=Qp;this.Qg=this.ea=this.rd=null;this.Kc=""};n(Pp,Dp); +Pp.prototype.xc=function(){try{var a=mc(this.Ah);this.Kc=kc(a);var b="about:invalid#zClosurez"!==this.Kc?this.Kc:this.Ga}catch(c){b=this.Ga}this.ea=new Kp;Mp(this.ea,this.oa.id+"-image",b);this.Qg=gd(this.ea,Rp,function(c){"load"==c.type?(this.rd=c.target,Dp.prototype.xc.call(this)):this.Pc()},void 0,this);this.ea.start()};Pp.prototype.rc=function(){Dp.prototype.rc.call(this);this.ea&&(pd(this.Qg),La(this.ea))};Pp.prototype.D=function(){Dp.prototype.D.call(this);this.Kc&&URL.revokeObjectURL(this.Kc)}; +var Qp=function(a){a.oa.appendChild(a.rd)},Rp=["load","abort","error"];var Sp=function(a){for(var b=arguments[0],c=1;cthis.vd)throw Error("[goog.structs.Pool] Min can not be greater than max");this.Na=new Vp;this.lb=new Jd;this.delay=0;this.Ve=null;this.ad()};A(Wp,Ka);Wp.prototype.Ac=function(){var a=Ja();if(!(null!=this.Ve&&a-this.Vethis.vd&&0=this.L()){for(var c=this.wa,d=0;d>1,a[d].getKey()>c.getKey())a[b]=a[d],b=d;else break;a[b]=c};k=Zp.prototype; +k.remove=function(){var a=this.wa,b=a.length,c=a[0];if(!(0>=b)){if(1==b)gb(a);else{a[0]=a.pop();a=0;b=this.wa;for(var d=b.length,e=b[a];a>1;){var f=2*a+1,g=2*a+2;f=ge.getKey())break;b[a]=b[f];a=f}b[a]=e}return c.Rd}};k.T=function(){for(var a=this.wa,b=[],c=a.length,d=0;dthis.Ci)return!1;this.Tf++;Np(this.ea,this.da);setTimeout(x(this.Pi,this),0);return!0}; +k.Pi=function(){if(!this.Rb){var a=x(function(d){this.Rb||(Mp(this.ea,this.da,d),gd(this.ea,jq,x(this.si,this)),this.ea.start())},this),b=this.getUrl();if(aj(b).ya.gb("profiling")){var c=new vi;c.dc="blob";c.Oa("complete",x(function(){this.oh=c.getResponseHeader("X-Earth-Engine-Computation-Profile")||null;if(200<=c.getStatus()&&300>c.getStatus())try{var d=kc(mc(Ii(c)));var e="about:invalid#zClosurez"!==d}catch(f){}a(e?d:b)},this));c.Ic("ready",x(c.La,c));c.send(b,"GET")}else a(b)}}; +var kq=function(){Ka.call(this);this.Aa=!1};A(kq,Ka);kq.prototype.setActive=function(a){this.Aa=a};kq.prototype.Tg=function(){return this.Aa};var fq=function(a,b){bq.call(this,a,b)};A(fq,bq);fq.prototype.ue=function(){return new kq};fq.prototype.gd=function(a){a.La()};fq.prototype.df=function(a){return!a.Ma&&!a.Tg()};var lq=function(a,b,c,d,e){Md.call(this,a,b,c,d,e);this.minZoom=d.minZoom||0;this.maxZoom=d.maxZoom||20;if(!window.google||!window.google.maps)throw Error("Google Maps API hasn't been initialized.");this.tileSize=d.tileSize||new google.maps.Size(256,256);this.name=d.name;this.Kf=new Jd;this.ef=1;this.ra=e||null};n(lq,Md);k=lq.prototype;k.ge=function(a){return hd(this,"tileevent",a)};k.sf=function(a){pd(a)}; +k.getTile=function(a,b,c){if(ba.y||a.y>=1<" msgstr "" +msgid "Cancel mapping?" +msgstr "" + +msgid "All your changes will be lost. Are you sure you want to proceed?" +msgstr "" + +msgid "Yes" +msgstr "" + +msgid "No" +msgstr "" + +msgid "General info" +msgstr "" + +msgid "Google Earth Engine variables mapping" +msgstr "" + +msgid "Summary and save" +msgstr "" + +msgid "Field cannot be blank" +msgstr "" + +msgid "Dataset" +msgstr "" + msgid "Help" msgstr "" @@ -82,16 +115,19 @@ msgid "" "to proceed?" msgstr "" -msgid "Yes" +msgid "Id" msgstr "" -msgid "No" +msgid "Comment" msgstr "" -msgid "Id" +msgid "Data element id" msgstr "" -msgid "Name" +msgid "Data element code" +msgstr "" + +msgid "Data element name" msgstr "" msgid "Description" @@ -106,18 +142,50 @@ msgstr "" msgid "Selected query period" msgstr "" +msgid "{{n}} data values from {{name}} google data set." +msgstr "" + +msgid "No effective import into DHIS2, file download" +msgstr "" + +msgid "Import config failed" +msgstr "" + msgid "Instance Dataset" msgstr "" +msgid "Instance DataSet" +msgstr "" + msgid "G.E.E Dataset" msgstr "" msgid "Created at" msgstr "" +msgid "Attribute mappings" +msgstr "" + +msgid "Google Band mapping with Data Element.q" +msgstr "" + msgid "Click to show feedback" msgstr "" +msgid "Import successful \n" +msgstr "" + +msgid "New import request" +msgstr "" + +msgid "" +"This operation will collect and import data from Google Earth Engine to the " +"instance. Are you sure you want to proceed?" +msgstr "" + +msgid "Importing..." +msgstr "" + msgid "Import" msgstr "" @@ -145,7 +213,7 @@ msgstr "" msgid "List" msgstr "" -msgid "Data set" +msgid "Dataset id" msgstr "" msgid "Created" @@ -163,7 +231,7 @@ msgstr "" msgid "{{n}} mappings deleted" msgstr "" -msgid "Delete project" +msgid "Delete mapping" msgstr "" msgid "" @@ -177,29 +245,62 @@ msgstr "" msgid "Proceed" msgstr "" -msgid "Cancel" +msgid "Search by name or code" msgstr "" -msgid "Search by name or code" +msgid "New mapping" msgstr "" -msgid "General info" +msgid "Edit mapping" msgstr "" -msgid "Summary and save" +msgid "Fixed period" msgstr "" -msgid "New mapping" +msgid "Today" msgstr "" -msgid "Edit mapping" +msgid "Yesterday" msgstr "" -msgid "Cancel mapping creation" +msgid "Last 7 days" msgstr "" -msgid "Cancel mapping edition" +msgid "Last 14 days" msgstr "" -msgid "Ok" +msgid "This week" +msgstr "" + +msgid "Last week" +msgstr "" + +msgid "This month" +msgstr "" + +msgid "Last month" +msgstr "" + +msgid "This quarter" +msgstr "" + +msgid "Last quarter" +msgstr "" + +msgid "This year" +msgstr "" + +msgid "Last year" +msgstr "" + +msgid "Field {{field}} cannot be blank" +msgstr "" + +msgid "This URL and username combination already exists" +msgstr "" + +msgid "You need to select at least one {{element}}" +msgstr "" + +msgid "Start and end dates are not a valid period" msgstr "" diff --git a/i18n/es.po b/i18n/es.po index 887a464..e1828f7 100644 --- a/i18n/es.po +++ b/i18n/es.po @@ -1,56 +1,62 @@ msgid "" msgstr "" "Project-Id-Version: i18next-conv\n" -"POT-Creation-Date: 2020-03-30T07:07:17.941Z\n" +"POT-Creation-Date: 2020-04-02T14:50:37.733Z\n" "PO-Revision-Date: 2018-10-25T09:02:35.143Z\n" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=UTF-8\n" "Content-Transfer-Encoding: 8bit\n" "Plural-Forms: nplurals=2; plural=(n != 1)\n" -msgid "Select organisation unit" +msgid "Mapping for attribute {{attr}}" msgstr "" -msgid "Save" +msgid "Cancel" msgstr "" -msgid "Fixed period" +msgid "Disable mapping" msgstr "" -msgid "Today" +msgid "Are you sure you want to disable mapping for {{total}} attributes?" msgstr "" -msgid "Yesterday" +msgid "Please select at least one item to disable mapping" msgstr "" -msgid "Last 7 days" +msgid "Google Attribute" msgstr "" -msgid "Last 14 days" +msgid "Mapped Id" msgstr "" -msgid "This week" +msgid "Set mapping" msgstr "" -msgid "Last week" +msgid "Mapped Name" msgstr "" -msgid "This month" +msgid "Mapped Code" msgstr "" -msgid "Last month" +msgid "Ok" msgstr "" -msgid "This quarter" +msgid "Search by name / code" msgstr "" -msgid "Last quarter" +msgid "Name" msgstr "" -msgid "This year" +msgid "Code" msgstr "" -msgid "Last year" +msgid "Select" +msgstr "" + +msgid "Select organisation unit" +msgstr "" + +msgid "Save" msgstr "" msgid "Select period interval" @@ -68,6 +74,33 @@ msgstr "" msgid "" msgstr "" +msgid "Cancel mapping?" +msgstr "" + +msgid "All your changes will be lost. Are you sure you want to proceed?" +msgstr "" + +msgid "Yes" +msgstr "" + +msgid "No" +msgstr "" + +msgid "General info" +msgstr "" + +msgid "Google Earth Engine variables mapping" +msgstr "" + +msgid "Summary and save" +msgstr "" + +msgid "Field cannot be blank" +msgstr "" + +msgid "Dataset" +msgstr "" + msgid "Help" msgstr "" @@ -82,16 +115,19 @@ msgid "" "to proceed?" msgstr "" -msgid "Yes" +msgid "Id" msgstr "" -msgid "No" +msgid "Comment" msgstr "" -msgid "Id" +msgid "Data element id" msgstr "" -msgid "Name" +msgid "Data element code" +msgstr "" + +msgid "Data element name" msgstr "" msgid "Description" @@ -106,18 +142,50 @@ msgstr "" msgid "Selected query period" msgstr "" +msgid "{{n}} data values from {{name}} google data set." +msgstr "" + +msgid "No effective import into DHIS2, file download" +msgstr "" + +msgid "Import config failed" +msgstr "" + msgid "Instance Dataset" msgstr "" +msgid "Instance DataSet" +msgstr "" + msgid "G.E.E Dataset" msgstr "" msgid "Created at" msgstr "" +msgid "Attribute mappings" +msgstr "" + +msgid "Google Band mapping with Data Element.q" +msgstr "" + msgid "Click to show feedback" msgstr "Pinche para ver feedback" +msgid "Import successful \n" +msgstr "" + +msgid "New import request" +msgstr "" + +msgid "" +"This operation will collect and import data from Google Earth Engine to the " +"instance. Are you sure you want to proceed?" +msgstr "" + +msgid "Importing..." +msgstr "" + msgid "Import" msgstr "" @@ -145,7 +213,7 @@ msgstr "" msgid "List" msgstr "" -msgid "Data set" +msgid "Dataset id" msgstr "" msgid "Created" @@ -163,7 +231,7 @@ msgstr "" msgid "{{n}} mappings deleted" msgstr "" -msgid "Delete project" +msgid "Delete mapping" msgstr "" msgid "" @@ -177,29 +245,62 @@ msgstr "" msgid "Proceed" msgstr "" -msgid "Cancel" +msgid "Search by name or code" msgstr "" -msgid "Search by name or code" +msgid "New mapping" msgstr "" -msgid "General info" +msgid "Edit mapping" msgstr "" -msgid "Summary and save" +msgid "Fixed period" msgstr "" -msgid "New mapping" +msgid "Today" msgstr "" -msgid "Edit mapping" +msgid "Yesterday" msgstr "" -msgid "Cancel mapping creation" +msgid "Last 7 days" msgstr "" -msgid "Cancel mapping edition" +msgid "Last 14 days" msgstr "" -msgid "Ok" +msgid "This week" +msgstr "" + +msgid "Last week" +msgstr "" + +msgid "This month" +msgstr "" + +msgid "Last month" +msgstr "" + +msgid "This quarter" +msgstr "" + +msgid "Last quarter" +msgstr "" + +msgid "This year" +msgstr "" + +msgid "Last year" +msgstr "" + +msgid "Field {{field}} cannot be blank" +msgstr "" + +msgid "This URL and username combination already exists" +msgstr "" + +msgid "You need to select at least one {{element}}" +msgstr "" + +msgid "Start and end dates are not a valid period" msgstr "" diff --git a/package.json b/package.json index baf96c5..0525ffd 100644 --- a/package.json +++ b/package.json @@ -26,9 +26,9 @@ "axios": "^0.19.2", "classnames": "^2.2.6", "d2": "^31.8.1", - "d2-api": "0.1.1-beta.4", + "d2-api": "0.2.1-beta.1", "d2-manifest": "^1.0.0", - "d2-ui-components": "1.2.0", + "d2-ui-components": "1.3.0", "font-awesome": "^4.7.0", "lodash": "^4.17.15", "postcss-rtl": "^1.3.2", diff --git a/src/components/app/App.tsx b/src/components/app/App.tsx index 997060c..a908675 100644 --- a/src/components/app/App.tsx +++ b/src/components/app/App.tsx @@ -1,5 +1,4 @@ import React, { useEffect, useState } from "react"; -import moment from "moment"; //@ts-ignore import { HeaderBar } from "@dhis2/ui-widgets"; import { MuiThemeProvider } from "@material-ui/core/styles"; @@ -11,7 +10,7 @@ import _ from "lodash"; import i18n from "@dhis2/d2-i18n"; import { init } from "d2"; import { SnackbarProvider } from "d2-ui-components"; -import { D2ApiDefault, D2Api } from "d2-api"; +import { D2ApiDefault } from "d2-api"; import "./App.css"; import { muiTheme } from "./themes/dhis2.theme"; @@ -22,9 +21,6 @@ import { AppContext } from "../../contexts/app-context"; import { Config } from "../../models/Config"; import { User } from "../../models/User"; import { LinearProgress } from "@material-ui/core"; -import { GeeDhis2 } from "../../models/GeeDhis2"; -import Axios from "axios"; -import { EarthEngine } from "../../models/EarthEngine"; import ee from "@google/earthengine"; type D2 = object; @@ -90,8 +86,6 @@ const App = () => { // Google Earth Engine must be defined globally in window (as var 'ee') to work Object.assign(window, { app: appContext, ee }); - testGee(api); - setShowShareButton(_(appConfig).get("appearance.showShareButton") || false); if (currentUser.canReportFeedback()) { initFeedbackTool(d2, appConfig); @@ -138,39 +132,6 @@ const App = () => { } }; -async function testGee(api: D2Api) { - // const credentials = await api.get("/tokens/google").getData(); - - // Workaround until we have a working dhis-google-auth.json - const tokenUrl = "https://play.dhis2.org/2.33dev/api/tokens/google"; - //const tokenUrl = "http://localhost:8030/api/tokens/google"; - const auth = { username: "admin", password: "district" }; - const credentials = (await Axios.get(tokenUrl, { auth })).data; - - const earthEngine = await EarthEngine.init(credentials); - const geeDhis2 = GeeDhis2.init(api, earthEngine); - - const dataValueSet = await geeDhis2.getDataValueSet({ - geeDataSetId: "ECMWF/ERA5/DAILY", - mapping: { - // eslint-disable-next-line @typescript-eslint/camelcase - total_precipitation: "uWYGA1xiwuZ", - // eslint-disable-next-line @typescript-eslint/camelcase - mean_2m_air_temperature: "RSJpUZqMoxC", - }, - orgUnits: [{ id: "IyO9ICB0WIn" }, { id: "xloTsC6lk5Q" }], - interval: { - type: "daily", - start: moment("2018-08-23"), - end: moment("2018-08-25"), // Last day is not included - }, - }); - console.log(dataValueSet); - - const res = await geeDhis2.postDataValueSet(dataValueSet); - console.log(res); -} - interface AppConfig { appKey: string; appearance: { diff --git a/src/components/attribute-mapping/AttributeMappingDialog.tsx b/src/components/attribute-mapping/AttributeMappingDialog.tsx new file mode 100644 index 0000000..85cd44f --- /dev/null +++ b/src/components/attribute-mapping/AttributeMappingDialog.tsx @@ -0,0 +1,90 @@ +import i18n from "@dhis2/d2-i18n"; +import DialogContent from "@material-ui/core/DialogContent"; +import { ConfirmationDialog, TableSorting, TablePagination } from "d2-ui-components"; +import React, { useEffect, useState, useCallback } from "react"; +import DataElementsTable from "../data-elements/DataElementsTable"; +import DataElement from "../../models/DataElement"; +import { D2Api } from "d2-api"; +import AttributeMapping from "../../models/AttributeMapping"; + +export interface AttributeMappingDialogConfig { + dataset: string; + attributeMapping?: AttributeMapping; +} + +export interface AttributeMappingDialogProps { + api: D2Api; + params: AttributeMappingDialogConfig; + onMappingChange: (newMapping: AttributeMapping) => void; + onClose: () => void; +} + +type DataElementSorting = TableSorting; + +const AttributeMappingDialog: React.FC = props => { + const { api, params, onMappingChange, onClose } = props; + const { dataset, attributeMapping } = params; + const [rows, setRows] = useState(undefined); + const [pagination, setPagination] = useState({ + page: 1, + pageSize: 15, + pageSizeOptions: [10, 15, 30], + }); + const [sorting, setSorting] = useState({ + field: "name" as const, + order: "asc" as const, + }); + + useEffect(() => { + getDataElements(sorting, { page: 1 }); + // eslint-disable-next-line react-hooks/exhaustive-deps + }, [sorting]); + + async function getDataElements( + sorting: TableSorting, + paginationOptions: Partial + ) { + const listPagination = { ...pagination, ...paginationOptions }; + + const res = await DataElement.getList(api, dataset); + setRows(res.dataElements); + setPagination({ ...listPagination, ...res.pager }); + setSorting(sorting); + } + + const onSelectedDataElement = useCallback( + (dataElement: DataElement) => { + if (attributeMapping) { + onMappingChange(attributeMapping.setDataElement(dataElement)); + } else { + console.error("Error adding mapping of google band."); + } + }, + [onMappingChange, attributeMapping] + ); + + const title = i18n.t("Mapping for attribute {{attr}}", { + attr: attributeMapping ? attributeMapping.geeBand : "-", + }); + + return ( + + + + + + ); +}; + +export default AttributeMappingDialog; diff --git a/src/components/attribute-mapping/AttributeMappingTable.tsx b/src/components/attribute-mapping/AttributeMappingTable.tsx new file mode 100644 index 0000000..9e03794 --- /dev/null +++ b/src/components/attribute-mapping/AttributeMappingTable.tsx @@ -0,0 +1,257 @@ +import i18n from "@dhis2/d2-i18n"; +import { Icon, IconButton, makeStyles, Tooltip, Typography } from "@material-ui/core"; +import { D2Api } from "d2-api"; +import { + TableAction, + TableColumn, + useSnackbar, + ObjectsTable, + ConfirmationDialog, +} from "d2-ui-components"; +import _ from "lodash"; +import React, { useCallback, useMemo, useState } from "react"; +import Mapping from "../../models/Mapping"; +import AttributeMapping from "../../models/AttributeMapping"; +import AttributeMappingDialog, { AttributeMappingDialogConfig } from "./AttributeMappingDialog"; + +const useStyles = makeStyles({ + iconButton: { + padding: 0, + paddingLeft: 8, + paddingRight: 8, + }, + instanceDropdown: { + order: 0, + }, + actionButtons: { + order: 10, + marginRight: 10, + }, +}); + +interface WarningDialog { + title?: string; + description?: string; + action?: () => void; +} + +interface AttributeMappingConfig { + selection: string[]; + mappedId: string | undefined; +} + +export interface AttributeMappingTableProps { + api: D2Api; + mapping: Mapping; + onChange(newMapping: Mapping): void; + availableBands: string[]; +} + +export default function AttributeMappingTable({ + api, + mapping, + onChange, + availableBands, +}: AttributeMappingTableProps) { + const classes = useStyles(); + const snackbar = useSnackbar(); + + const [warningDialog, setWarningDialog] = useState(null); + const [newMappingConfig, setNewMappingConfig] = useState( + null + ); + + const [rows, setRows] = useState( + AttributeMapping.getList(availableBands, mapping.attributeMappingDictionary) + .attributeMappings + ); + + const openMappingDialog = useCallback( + (geeBands: string[]) => { + setNewMappingConfig({ + dataset: mapping.dataSetId, + attributeMapping: _.find(rows, ["id", geeBands[0]]), + }); + }, + [rows, mapping] + ); + + const deleteMapping = useCallback( + (geeBands: string[], dryRun = true) => { + if (dryRun) { + if (geeBands.length > 0) { + setWarningDialog({ + title: i18n.t("Disable mapping"), + description: i18n.t( + "Are you sure you want to disable mapping for {{total}} attributes?", + { + total: geeBands.length, + } + ), + action: () => deleteMapping(geeBands, false), + }); + } else { + snackbar.error(i18n.t("Please select at least one item to disable mapping")); + } + } else { + const newMapping = mapping.set( + "attributeMappingDictionary", + _.omit(mapping.attributeMappingDictionary, geeBands) + ); + setRows( + AttributeMapping.getList(availableBands, newMapping.attributeMappingDictionary) + .attributeMappings + ); + onChange(newMapping); + } + }, + [snackbar, availableBands, mapping, onChange] + ); + + const onMappingChange = useCallback( + (newAttributeMapping: AttributeMapping) => { + const newMapping = mapping.set("attributeMappingDictionary", { + ...mapping.attributeMappingDictionary, + [newAttributeMapping.id]: newAttributeMapping, + }); + setRows( + AttributeMapping.getList(availableBands, newMapping.attributeMappingDictionary) + .attributeMappings + ); + onChange(newMapping); + setNewMappingConfig(null); + }, + [mapping, availableBands, onChange] + ); + + const columns: TableColumn[] = useMemo( + () => [ + { + name: "geeBand", + text: i18n.t("Google Attribute"), + }, + { + name: "dataElementId", + text: i18n.t("Mapped Id"), + sortable: false, + /*eslint-disable*/ + getValue: (row: AttributeMapping) => { + const value = row.dataElementId ?? "-"; + return ( + + + {value} + + + { + openMappingDialog([row.id]); + }} + > + open_in_new + + + + ); + }, + }, + { + name: "dataElementName", + text: i18n.t("Mapped Name"), + sortable: false, + getValue: (row: AttributeMapping) => { + const value = row.dataElementName ?? "-"; + return ( + + + {value} + + + ); + }, + }, + { + name: "dataElementCode", + text: i18n.t("Mapped Code"), + sortable: false, + getValue: (row: AttributeMapping) => { + const value = row.dataElementCode ?? "-"; + + return ( + + + {value} + + + ); + }, + }, + ], + [classes, openMappingDialog] + ); + + const actions: TableAction[] = useMemo( + () => [ + { + // Required to disable default "select" action + name: "select", + text: "Select", + isActive: () => false, + }, + { + name: "set-mapping", + text: i18n.t("Set mapping"), + multiple: false, + onClick: openMappingDialog, + icon: open_in_new, + }, + { + name: "delete-mapping", + text: i18n.t("Disable mapping"), + multiple: true, + onClick: deleteMapping, + icon: sync_disabled, + }, + ], + [deleteMapping, openMappingDialog] + ); + + const closeWarningDialog = () => setWarningDialog(null); + const closeAttributeMappingDialog = () => setNewMappingConfig(null); + + return ( + + {!!warningDialog && ( + { + if (warningDialog.action) warningDialog.action(); + setWarningDialog(null); + }} + onCancel={closeWarningDialog} + /> + )} + + {!!newMappingConfig && ( + + )} + + + rows={rows} + actions={actions} + forceSelectionColumn={true} + columns={columns} + searchBoxLabel={i18n.t("Search by name / code")} + /> + + ); +} diff --git a/src/components/data-elements/DataElementsTable.tsx b/src/components/data-elements/DataElementsTable.tsx new file mode 100644 index 0000000..ea32802 --- /dev/null +++ b/src/components/data-elements/DataElementsTable.tsx @@ -0,0 +1,79 @@ +import React from "react"; +import { + ObjectsTable, + TablePagination, + TableColumn, + MouseActionsMapping, + TableAction, +} from "d2-ui-components"; +import _ from "lodash"; +import i18n from "../../locales"; +import DataElement from "../../models/DataElement"; + +export interface DataElementsTableProps { + dataElements: DataElement[]; + onSelectedMapping: (dataElement: DataElement) => void; +} + +const initialPagination: Partial = { + pageSize: 50, + page: 1, + pageSizeOptions: [10, 20, 50], +}; + +const DataElementsTable: React.FC = props => { + const { dataElements, onSelectedMapping } = props; + + const columns: TableColumn[] = [ + { + name: "name" as const, + text: i18n.t("Name"), + sortable: true, + }, + { + name: "code" as const, + text: i18n.t("Code"), + sortable: true, + }, + ]; + + const mouseActionsMapping: MouseActionsMapping = { + left: { + type: "action", + action: "select", + }, + right: { + type: "contextual", + }, + }; + + const actions: TableAction[] = [ + { + name: "select", + text: i18n.t("Select"), + multiple: false, + primary: true, + onClick: (ids: string[]) => { + const selectedDataElement = _.find(dataElements, ["id", ids[0]]); + selectedDataElement + ? onSelectedMapping(selectedDataElement) + : console.log("Could not select data element"); + }, + }, + ]; + + return ( + + rows={dataElements} + forceSelectionColumn={false} + mouseActionsMapping={mouseActionsMapping} + actions={actions} + initialState={{ pagination: initialPagination }} + columns={columns} + searchBoxLabel={i18n.t("Search by name / code")} + searchBoxColumns={["name", "code"]} + /> + ); +}; + +export default React.memo(DataElementsTable); diff --git a/src/components/dialogs/PeriodSelectorDialog.tsx b/src/components/dialogs/PeriodSelectorDialog.tsx index 5d84249..c83b23a 100644 --- a/src/components/dialogs/PeriodSelectorDialog.tsx +++ b/src/components/dialogs/PeriodSelectorDialog.tsx @@ -4,34 +4,9 @@ import { DatePicker, ConfirmationDialog } from "d2-ui-components"; import { DialogContent } from "@material-ui/core"; import i18n from "../../locales"; import Dropdown from "../dropdown/Dropdown"; +import { PeriodInformation } from "../../models/Import"; +import { availablePeriods } from "../../utils/import"; -export const availablePeriods: { - [id: string]: { - name: string; - start?: [number, string]; - end?: [number, string]; - }; -} = { - FIXED: { name: i18n.t("Fixed period") }, - TODAY: { name: i18n.t("Today"), start: [0, "day"] }, - YESTERDAY: { name: i18n.t("Yesterday"), start: [1, "day"] }, - LAST_7_DAYS: { name: i18n.t("Last 7 days"), start: [7, "day"], end: [0, "day"] }, - LAST_14_DAYS: { name: i18n.t("Last 14 days"), start: [14, "day"], end: [0, "day"] }, - THIS_WEEK: { name: i18n.t("This week"), start: [0, "isoWeek"] }, - LAST_WEEK: { name: i18n.t("Last week"), start: [1, "isoWeek"] }, - THIS_MONTH: { name: i18n.t("This month"), start: [0, "month"] }, - LAST_MONTH: { name: i18n.t("Last month"), start: [1, "month"] }, - THIS_QUARTER: { name: i18n.t("This quarter"), start: [0, "quarter"] }, - LAST_QUARTER: { name: i18n.t("Last quarter"), start: [1, "quarter"] }, - THIS_YEAR: { name: i18n.t("This year"), start: [0, "year"] }, - LAST_YEAR: { name: i18n.t("Last year"), start: [1, "year"] }, -}; - -export type PeriodInformation = { - id: string; - startDate?: Date; - endDate?: Date; -}; interface PeriodSelectorDialogProps { periodInformation: PeriodInformation; onCancel(): void; @@ -41,7 +16,6 @@ interface PeriodSelectorDialogProps { const PeriodSelectorDialog: React.FC = props => { const { periodInformation, onCancel, onSave } = props; - console.log({ periodInformation }); const [period, setPeriod] = React.useState(periodInformation.id); const [fixedStart, setFixedStart] = React.useState( periodInformation.startDate ?? undefined diff --git a/src/components/mappings/wizard/ExitWizardButton.jsx b/src/components/mappings/wizard/ExitWizardButton.jsx new file mode 100644 index 0000000..4a0e9ac --- /dev/null +++ b/src/components/mappings/wizard/ExitWizardButton.jsx @@ -0,0 +1,33 @@ +import React from "react"; +import PropTypes from "prop-types"; +import { ConfirmationDialog } from "d2-ui-components"; +import i18n from "@dhis2/d2-i18n"; + +class ExitWizardButton extends React.Component { + static propTypes = { + isOpen: PropTypes.bool, + onConfirm: PropTypes.func.isRequired, + onCancel: PropTypes.func.isRequired, + }; + render() { + const { isOpen, onCancel, onConfirm } = this.props; + + if (!isOpen) return null; + + return ( + + ); + } +} + +export default React.memo(ExitWizardButton); diff --git a/src/components/mappings/wizard/MappingWizard.tsx b/src/components/mappings/wizard/MappingWizard.tsx new file mode 100644 index 0000000..3b6b99b --- /dev/null +++ b/src/components/mappings/wizard/MappingWizard.tsx @@ -0,0 +1,82 @@ +import React from "react"; +import { WizardStep, Wizard } from "d2-ui-components"; +import { D2Api } from "d2-api"; +import Mapping from "../../../models/Mapping"; +import { useLocation } from "react-router"; +import _ from "lodash"; +import { History, Location } from "history"; +import { Config } from "../../../models/Config"; +import { useAppContext } from "../../../contexts/app-context"; +import { stepList } from "./Steps"; +import { getValidationMessages } from "../../../utils/validations"; +import DataSet from "../../../models/DataSet"; + +interface MappingWizardProps { + mapping?: Mapping; + dataSets: DataSet[]; + onChange(newMapping: Mapping): void; + onCancel(): void; +} + +export interface StepProps { + api: D2Api; + config: Config; + mapping: Mapping; + dataSets: DataSet[]; + onChange(newMapping: Mapping): void; + onCancel(): void; +} + +interface Props { + api: D2Api; + config: Config; + history: History; + location: Location; + snackbar: any; +} + +const MappingWizard: React.FC = props => { + const location = useLocation(); + const { api, config } = useAppContext(); + const { mapping, onChange, onCancel, dataSets } = props; + + const steps = stepList.map(step => ({ + ...step, + props: { + api, + config, + mapping, + dataSets, + onChange, + onCancel, + }, + })); + + const onStepChangeRequest = async (_currentStep: WizardStep, newStep: WizardStep) => { + const index = _(steps).findIndex(step => step.key === newStep.key); + const validationMessages = await Promise.all( + _.take(steps, index).map(({ validationKeys }) => + getValidationMessages(api, mapping, validationKeys) + ) + ); + + return _.flatten(validationMessages); + }; + + const urlHash = location.hash.slice(1); + const stepExists = steps.find(step => step.key === urlHash); + const firstStepKey = steps.map(step => step.key)[0]; + const initialStepKey = stepExists ? urlHash : firstStepKey; + + return ( + + ); +}; + +export default MappingWizard; diff --git a/src/components/mappings/wizard/Steps.ts b/src/components/mappings/wizard/Steps.ts new file mode 100644 index 0000000..f1643e9 --- /dev/null +++ b/src/components/mappings/wizard/Steps.ts @@ -0,0 +1,25 @@ +import i18n from "../../../locales"; +import GeneralInfoStep from "./steps/GeneralInfoStep"; +import VariablesMappingStep from "./steps/VariablesMappingStep"; +import SummaryStep from "./steps/SummaryStep"; + +export const stepList = [ + { + key: "general-info", + label: i18n.t("General info"), + component: GeneralInfoStep, + validationKeys: ["name", "geeImage", "dataSet"], + }, + { + key: "de-mappings", + label: i18n.t("Google Earth Engine variables mapping"), + component: VariablesMappingStep, + validationKeys: ["attributeMappingDictionary"], + }, + { + key: "summary-save", + label: i18n.t("Summary and save"), + component: SummaryStep, + validationKeys: [], + }, +]; diff --git a/src/components/mappings/wizard/steps/GeneralInfoStep.tsx b/src/components/mappings/wizard/steps/GeneralInfoStep.tsx new file mode 100644 index 0000000..d147cac --- /dev/null +++ b/src/components/mappings/wizard/steps/GeneralInfoStep.tsx @@ -0,0 +1,121 @@ +import React from "react"; +import _ from "lodash"; +import { Card, CardContent } from "@material-ui/core"; + +import { StepProps } from "../MappingWizard"; +import i18n from "../../../../locales"; +import Mapping, { MappingData } from "../../../../models/Mapping"; + +/* eslint-disable @typescript-eslint/no-var-requires */ +const { TextField, DropDown } = require("@dhis2/d2-ui-core"); +const { FormBuilder, Validators } = require("@dhis2/d2-ui-forms"); + +type StringField = "name" | "description"; +type DropdownField = "geeImage" | "dataSetId"; + +class GeneralInfoStep extends React.Component { + onUpdateField = (fieldName: K, newValue: MappingData[K]) => { + const { mapping, onChange, dataSets } = this.props; + let newMapping = mapping.set(fieldName, newValue as MappingData[K]); + + if (fieldName === "geeImage") { + newMapping = newMapping.set("attributeMappingDictionary", {}); + } else if (fieldName === "dataSetId") { + newMapping = newMapping.set( + "dataSetName", + _.find(dataSets, ["id", newValue])?.name ?? "-" + ); + } + onChange(newMapping); + }; + + render() { + const { config, mapping, dataSets } = this.props; + const fields = [ + getTextField("name", mapping.name, { + validators: [validators.presence], + props: { + floatingLabelText: Mapping.getFieldName("name") + " (*)", + }, + }), + getTextField("description", mapping.description, { + props: { multiLine: true, floatingLabelText: Mapping.getFieldName("description") }, + }), + getDropdownField("geeImage", mapping.geeImage, { + validators: [validators.presence], + props: { + floatingLabelText: Mapping.getFieldName("geeImage") + " (*)", + menuItems: _(config.data.base.googleDatasets) + .mapValues((value, key) => ({ ...value, id: key })) + .values() + .value(), + style: { marginTop: 20 }, + }, + }), + getDropdownField("dataSetId", mapping.dataSetId, { + validators: [validators.presence], + props: { + floatingLabelText: Mapping.getFieldName("dataSetId") + " (*)", + menuItems: _(dataSets) + .map(value => ({ ...value, displayName: value.name })) + .value(), + style: { marginTop: 20 }, + }, + }), + ]; + return ( + + + + + + ); + } +} + +type Validator = { message: string; validator: (value: T) => boolean }; + +const validators = { + presence: { + message: i18n.t("Field cannot be blank"), + validator: Validators.isRequired, + }, +}; + +function getTextField( + name: StringField, + value: string, + { validators, props }: { validators?: Validator[]; props?: _.Dictionary } = {} +) { + return { + name, + value, + component: TextField, + props: { + floatingLabelText: name, + style: { width: "33%" }, + changeEvent: "onBlur", + "data-field": name, + ...(props || {}), + }, + validators: validators || [], + }; +} + +function getDropdownField( + name: DropdownField, + value: string, + { validators, props }: { validators?: Validator[]; props?: _.Dictionary } = {} +) { + return { + name, + value, + component: DropDown, + props: { + ...(props || {}), + }, + validators: validators || [], + }; +} + +export default React.memo(GeneralInfoStep); diff --git a/src/components/mappings/wizard/steps/SummaryStep.tsx b/src/components/mappings/wizard/steps/SummaryStep.tsx new file mode 100644 index 0000000..a852b5e --- /dev/null +++ b/src/components/mappings/wizard/steps/SummaryStep.tsx @@ -0,0 +1,116 @@ +import React, { useState } from "react"; +import _ from "lodash"; +import { StepProps } from "../MappingWizard"; +import { makeStyles, Button, LinearProgress } from "@material-ui/core"; +import i18n from "../../../../locales"; +import Mapping from "../../../../models/Mapping"; +import { useGoTo } from "../../../../router"; +import { useSnackbar } from "d2-ui-components"; + +const SummaryStep: React.FC = props => { + const { api, config, mapping, onCancel } = props; + const goTo = useGoTo(); + const snackbar = useSnackbar(); + const classes = useStyles(); + + const [isSaving, setSaving] = useState(false); + + async function save() { + try { + setSaving(true); + await mapping.save(api, config); + setSaving(false); + goTo("imports"); + snackbar.success(`${i18n.t("Mapping saved:")} ${mapping.name}`); + } catch (err) { + setSaving(false); + snackbar.error(err.message || err.toString()); + } + } + + return ( + +
+
    + + + + {mapping.dataSetName} - ({mapping.dataSetId}) + + } + /> + + + {_.map(mapping.attributeMappingDictionary, attributeMapping => ( + + {attributeMapping.dataElementName} - ( + {attributeMapping.dataElementId}) + + } + separator=" ->" + > + ))} +
+ } + /> + + + + + + {isSaving && } +
+
+ ); +}; + +const LiEntry = ({ + label, + value, + separator = ":", +}: { + label: string; + value?: React.ReactNode; + separator?: string; +}) => { + return ( +
  • + {label} + {separator} {value || "-"} +
  • + ); +}; + +const useStyles = makeStyles({ + wrapper: { + padding: 5, + }, + saveButton: { + margin: 10, + backgroundColor: "#2b98f0", + color: "white", + }, +}); + +export default React.memo(SummaryStep); diff --git a/src/components/mappings/wizard/steps/VariablesMappingStep.tsx b/src/components/mappings/wizard/steps/VariablesMappingStep.tsx new file mode 100644 index 0000000..9bb1b2d --- /dev/null +++ b/src/components/mappings/wizard/steps/VariablesMappingStep.tsx @@ -0,0 +1,28 @@ +import React from "react"; +import _ from "lodash"; +import { Card, CardContent } from "@material-ui/core"; + +import { StepProps } from "../MappingWizard"; +import AttributeMappingTable from "../../../attribute-mapping/AttributeMappingTable"; + +class VariablesMappingStep extends React.Component { + render() { + const { api, config, mapping, onChange } = this.props; + return ( + + + + + + ); + } +} + +export default React.memo(VariablesMappingStep); diff --git a/src/models/AttributeMapping.ts b/src/models/AttributeMapping.ts new file mode 100644 index 0000000..79b6651 --- /dev/null +++ b/src/models/AttributeMapping.ts @@ -0,0 +1,119 @@ +import { D2Api } from "d2-api"; +import _ from "lodash"; +import i18n from "../locales"; +import { Config } from "./Config"; +import { getDataStore } from "../utils/dhis2"; +import { Validation } from "../types/validations"; +import { AttributeMappingDictionary } from "./Mapping"; +import DataElement from "./DataElement"; + +export interface AttributeMappingData { + id: string; + geeBand: string; + comment: string; + dataElementId?: string; + dataElementCode?: string; + dataElementName?: string; +} + +export type AttributeMappingField = keyof AttributeMappingData; + +function defineGetters(sourceObject: any, targetObject: any) { + Object.keys(sourceObject).forEach(function (key) { + Object.defineProperty(targetObject, key, { + get: () => sourceObject[key], + enumerable: true, + configurable: true, + }); + }); +} + +class AttributeMapping { + data: AttributeMappingData; + + static fieldNames: Record = { + id: i18n.t("Id"), + comment: i18n.t("Comment"), + geeBand: i18n.t("Google Attribute"), + dataElementId: i18n.t("Data element id"), + dataElementCode: i18n.t("Data element code"), + dataElementName: i18n.t("Data element name"), + }; + + static getFieldName(field: AttributeMappingField): string { + return this.fieldNames[field]; + } + + constructor(rawData: AttributeMappingData) { + this.data = { + ...rawData, + }; + defineGetters(this.data, this); + } + + public static build(attrMapping: AttributeMappingData | undefined): AttributeMapping { + return attrMapping ? new AttributeMapping(attrMapping) : this.create(); + } + + public static async get(api: D2Api, config: Config, id = " ") { + const dataStore = getDataStore(api, config); + const data = await dataStore.get(id).getData(); + + return this.build(data); + } + + public static create() { + return new AttributeMapping({ + id: "", + comment: "", + geeBand: "", + dataElementId: "", + dataElementCode: "", + dataElementName: "", + }); + } + public static getList( + availableBands: string[], + mappingDictionary: AttributeMappingDictionary + ): { attributeMappings: AttributeMapping[] } { + const attributeMappings: AttributeMapping[] = availableBands.map( + band => + mappingDictionary[band] ?? + new AttributeMapping({ + id: band, + geeBand: band, + comment: "", + }) + ); + return { attributeMappings: attributeMappings }; + } + + public set( + field: K, + value: AttributeMappingData[K] + ): AttributeMapping { + return new AttributeMapping({ ...this.data, [field]: value }); + } + + public async validate(): Promise { + return _.pickBy({ + geeImage: _.compact([ + !this.geeBand.trim() + ? { + key: "cannotBeEmpty", + namespace: { element: AttributeMapping.getFieldName("geeBand") }, + } + : null, + ]), + }); + } + + public setDataElement(dataElement: DataElement) { + return this.set("dataElementId", dataElement.id) + .set("dataElementName", dataElement.name) + .set("dataElementCode", dataElement.code); + } +} +interface AttributeMapping extends AttributeMappingData {} + +export default AttributeMapping; diff --git a/src/models/Config.ts b/src/models/Config.ts index f1ae427..1a77009 100644 --- a/src/models/Config.ts +++ b/src/models/Config.ts @@ -2,6 +2,10 @@ import { D2Api, MetadataPick } from "d2-api"; const baseConfig = { // Add here static configuration + gee: { + serviceAccount: "test-63@foo-dhis2-gee-app.iam.gserviceaccount.com", + privateKeyFile: "foo-dhis2-gee-app-09be93975aeb.json", + }, dataStore: { namespace: "dhis2-gee-app", keys: { @@ -11,6 +15,38 @@ const baseConfig = { }, }, }, + googleDatasets: { + chirpsDaily: { + displayName: "CHIRPS - DAILY", + pointer: "UCSB-CHG/CHIRPS/DAILY", + bands: ["precipitation"], + doc: + "https://developers.google.com/earth-engine/datasets/catalog/UCSB-CHG_CHIRPS_DAILY", + }, + era5Daily: { + displayName: "ERA5 - DAILY", + pointer: "ECMWF/ERA5/DAILY", + bands: [ + "mean_2m_air_temperature", + "minimum_2m_air_temperature", + "maximum_2m_air_temperature", + "dewpoint_2m_temperature", + "total_precipitation", + "surface_pressure", + "mean_sea_level_pressure", + "u_component_of_wind_10m", + "v_component_of_wind_10m", + ], + doc: + "https://developers.google.com/earth-engine/datasets/catalog/UCSB-CHG_CHIRPS_DAILY", + }, + daymetV3: { + displayName: "DAYMET V3", + pointer: "NASA/ORNL/DAYMET_V3", + bands: ["dayl", "prcp", "srad", "swe", "tmax", "tmin", "vp"], + doc: "https://developers.google.com/earth-engine/datasets/catalog/NASA_ORNL_DAYMET_V3", + }, + }, }; export type BaseConfig = typeof baseConfig; diff --git a/src/models/DataElement.ts b/src/models/DataElement.ts new file mode 100644 index 0000000..c241dc2 --- /dev/null +++ b/src/models/DataElement.ts @@ -0,0 +1,66 @@ +import { Id, D2Api } from "d2-api"; +import { Config } from "./Config"; +import i18n from "../locales"; +import { TablePagination } from "d2-ui-components"; + +export interface DataElementData { + id: Id; + name: string; + code: string; +} + +export interface SelectionInfo { + selected?: DataElement[]; + messages?: string[]; +} + +export type DataElementField = keyof DataElementData; + +function defineGetters(sourceObject: any, targetObject: any) { + Object.keys(sourceObject).forEach(function (key) { + Object.defineProperty(targetObject, key, { + get: () => sourceObject[key], + enumerable: true, + configurable: true, + }); + }); +} + +class DataElement { + constructor(private api: D2Api, private config: Config, public data: DataElement) { + defineGetters(this.data, this); + } + + static fieldNames: Record = { + id: i18n.t("Id"), + name: i18n.t("Name"), + code: i18n.t("Code"), + }; + + static getFieldName(field: DataElementField): string { + return this.fieldNames[field]; + } + + static async getList( + api: D2Api, + datasetId: string + ): Promise<{ dataElements: DataElement[] | undefined; pager: Partial }> { + const { objects, pager } = await api.models.dataElements + .get({ + fields: { + id: true, + name: true, + code: true, + }, + filter: { + "dataSetElements.dataSet.id": { eq: datasetId }, + }, + }) + .getData(); + return { dataElements: objects.map(o => o as DataElement), pager: pager }; + } +} + +interface DataElement extends DataElementData {} + +export default DataElement; diff --git a/src/models/DataSet.ts b/src/models/DataSet.ts new file mode 100644 index 0000000..b0d3b02 --- /dev/null +++ b/src/models/DataSet.ts @@ -0,0 +1,56 @@ +import { Id, D2Api } from "d2-api"; +import i18n from "../locales"; +import { TablePagination } from "d2-ui-components"; + +export interface DataSetData { + id: Id; + name: string; + code: string; +} + +export type DataElementField = keyof DataSetData; + +function defineGetters(sourceObject: any, targetObject: any) { + Object.keys(sourceObject).forEach(function (key) { + Object.defineProperty(targetObject, key, { + get: () => sourceObject[key], + enumerable: true, + configurable: true, + }); + }); +} + +class DataSet { + constructor(public data: DataSet) { + defineGetters(this.data, this); + } + + static fieldNames: Record = { + id: i18n.t("Id"), + name: i18n.t("Name"), + code: i18n.t("Code"), + }; + + static getFieldName(field: DataElementField): string { + return this.fieldNames[field]; + } + + static async getList( + api: D2Api + ): Promise<{ dataSets: DataSet[] | undefined; pager: Partial }> { + const { objects, pager } = await api.models.dataSets + .get({ + fields: { + id: true, + name: true, + code: true, + }, + }) + .getData(); + return { dataSets: objects.map(o => o as DataSet), pager: pager }; + } +} + +interface DataSet extends DataSetData {} + +export default DataSet; diff --git a/src/models/Import.ts b/src/models/Import.ts index 8f727e4..fea7b25 100644 --- a/src/models/Import.ts +++ b/src/models/Import.ts @@ -1,15 +1,26 @@ import { D2Api } from "d2-api"; +import _ from "lodash"; import DataStore from "d2-api/api/dataStore"; -import { getDataStore } from "../utils/dhis2"; +import { getDataStore, getImportCountString } from "../utils/dhis2"; import { Config } from "./Config"; import i18n from "../locales"; -import { PeriodInformation } from "../components/dialogs/PeriodSelectorDialog"; +import { EarthEngine, Interval, Credentials } from "./EarthEngine"; +import { GeeDhis2, OrgUnit, DataValueSet } from "./GeeDhis2"; +import Mapping from "./Mapping"; +import { getAttributeMappings, getDataSetValue } from "../utils/gee"; +import { buildPeriod, downloadFile } from "../utils/import"; + +export type PeriodInformation = { + id: string; + startDate?: Date; + endDate?: Date; +}; export interface DataImportData { name: string | undefined; description: string | undefined; id: string | undefined; - selectedMappings: string[]; + selectedMappings: Mapping[]; selectedOUs: string[]; periodInformation: PeriodInformation; } @@ -63,7 +74,7 @@ export class DataImport { return new DataImport(api, config, importPrefix, data); } - public setSelectedMappings(selectedMappings: string[]) { + public setSelectedMappings(selectedMappings: Mapping[]) { const newData = { ...this.data, selectedMappings: selectedMappings }; return new DataImport(this.api, this.config, this.importPrefix, newData); } @@ -79,6 +90,94 @@ export class DataImport { } public async save() { - await this.dataStore.save(this.importKey, this.data); + await this.dataStore.save(this.importKey, this.data).getData(); + } + + public async run( + dryRun: boolean, + api: D2Api + ): Promise<{ success: boolean; failures: string[]; messages: string[] }> { + let failures: string[] = []; + let messages: string[] = []; + try { + const credentials = await api.get("/tokens/google").getData(); + + const earthEngine = await EarthEngine.init(credentials); + const geeDhis2 = GeeDhis2.init(this.api, earthEngine); + + const baseImportConfig: { orgUnits: OrgUnit[]; interval: Interval } = { + //orgUnits: [{ id: "IyO9ICB0WIn" }, { id: "xloTsC6lk5Q" }], + orgUnits: this.data.selectedOUs.map(o => { + return { + id: o.split("/").pop(), + } as OrgUnit; + }), + interval: { + type: "daily", + ...buildPeriod(this.data.periodInformation), + }, + }; + let importDataValueSet: DataValueSet = { dataValues: [] }; + + await Promise.all( + this.data.selectedMappings.map(async selectedMapping => { + try { + const dataValueSet: DataValueSet = await geeDhis2.getDataValueSet({ + ...baseImportConfig, + geeDataSetId: getDataSetValue( + selectedMapping.geeImage, + this.config, + "pointer" + ), + mapping: getAttributeMappings( + selectedMapping.attributeMappingDictionary + ), + }); + + importDataValueSet = { + dataValues: _.concat( + importDataValueSet.dataValues, + dataValueSet.dataValues + ), + }; + messages = [ + ...messages, + i18n.t("{{n}} data values from {{name}} google data set.", { + name: getDataSetValue( + selectedMapping.geeImage, + this.config, + "displayName" + ), + n: dataValueSet.dataValues.length, + }), + ]; + } catch (err) { + failures = [...failures, err]; + } + }) + ); + if (!dryRun) { + const res = await geeDhis2.postDataValueSet(importDataValueSet); + messages = [...messages, getImportCountString(res.importCount)]; + } else { + messages = [...messages, i18n.t("No effective import into DHIS2, file download")]; + downloadFile({ + filename: "data.json", + mimeType: "application/json", + contents: JSON.stringify(importDataValueSet), + }); + } + return { + success: _.isEmpty(failures) && !_.isEmpty(messages), + messages: messages, + failures: failures, + }; + } catch (err) { + return { + success: false, + messages: messages, + failures: [...failures, i18n.t("Import config failed"), err], + }; + } } } diff --git a/src/models/Mapping.ts b/src/models/Mapping.ts index 3f4df1b..2a9cfe4 100644 --- a/src/models/Mapping.ts +++ b/src/models/Mapping.ts @@ -4,14 +4,23 @@ import i18n from "../locales"; import { TablePagination } from "d2-ui-components"; import { Config } from "./Config"; import { getDataStore } from "../utils/dhis2"; +import { Validation } from "../types/validations"; +import AttributeMapping from "./AttributeMapping"; +import { generateUid } from "d2/uid"; + +export interface AttributeMappingDictionary { + [geeBand: string]: AttributeMapping; +} export interface MappingData { id: Id; name: string; description: string; - dataSet: string; + dataSetId: string; + dataSetName: string; geeImage: string; created: Date; + attributeMappingDictionary: AttributeMappingDictionary; } export type MappingField = keyof MappingData; @@ -33,9 +42,11 @@ class Mapping { id: i18n.t("Id"), name: i18n.t("Name"), description: i18n.t("Description"), - dataSet: i18n.t("Instance Dataset"), + dataSetId: i18n.t("Instance Dataset"), + dataSetName: i18n.t("Instance DataSet"), geeImage: i18n.t("G.E.E Dataset"), created: i18n.t("Created at"), + attributeMappingDictionary: i18n.t("Attribute mappings"), }; static getFieldName(field: MappingField): string { @@ -55,18 +66,22 @@ class Mapping { public static async get(api: D2Api, config: Config, id = " ") { const dataStore = getDataStore(api, config); - const data = await dataStore.get(id).getData(); - - return this.build(data); + const mappingsKey = config.data.base.dataStore.keys.mappings; + const mappingsById = await dataStore + .get<{ [id: string]: Mapping } | undefined>(mappingsKey) + .getData(); + return this.build(mappingsById ? mappingsById[id] : undefined); } public static create() { return new Mapping({ - id: "", + id: generateUid(), name: "", description: "", - dataSet: "", + dataSetId: "", + dataSetName: "", geeImage: "", + attributeMappingDictionary: {}, created: new Date(), }); } @@ -76,14 +91,15 @@ class Mapping { ): Promise<{ mappings: Mapping[] | undefined; pager: Partial }> { const dataStore = getDataStore(api, config); const mappingsKey = config.data.base.dataStore.keys.mappings; - const mappings = await dataStore.get(mappingsKey).getData(); + const mappings = await dataStore + .get<{ [id: string]: Mapping } | undefined>(mappingsKey) + .getData(); return { mappings: mappings ? _.values(mappings) : [], pager: {} }; } public set(field: K, value: MappingData[K]): Mapping { return new Mapping({ ...this.data, [field]: value }); } - static async delete(api: D2Api, config: Config, mappingsToDelete: string[]) { const mappings = await (await Mapping.getList(api, config)).mappings; Mapping.saveList( @@ -97,6 +113,61 @@ class Mapping { const dataStore = getDataStore(api, config); dataStore.save(config.data.base.dataStore.keys.mappings, newMappings); } + + public async validate(): Promise { + return _.pickBy({ + name: _.compact([ + !this.name.trim() + ? { + key: "cannotBeBlank", + namespace: { field: Mapping.getFieldName("name") }, + } + : null, + ]), + geeImage: _.compact([ + !this.geeImage.trim() + ? { + key: "cannotBeBlank", + namespace: { element: Mapping.getFieldName("geeImage") }, + } + : null, + ]), + dataSet: _.compact([ + !this.dataSetId.trim() + ? { + key: "cannotBeBlank", + namespace: { element: Mapping.getFieldName("dataSetId") }, + } + : null, + ]), + attributeMappingDictionary: _.compact([ + _.isEmpty(this.attributeMappingDictionary) + ? { + key: "cannotBeEmpty", + namespace: { + element: i18n.t("Google Band mapping with Data Element.q"), + }, + } + : null, + ]), + }); + } + + public async save(api: D2Api, config: Config) { + const dataStore = getDataStore(api, config); + const mappingsKey = config.data.base.dataStore.keys.mappings; + const mappingsById = await dataStore.get(mappingsKey).getData(); + const newMappingsList = { + ...mappingsById, + [this.id]: { + ...this.data, + attributeMappingDictionary: _(this.data.attributeMappingDictionary).mapValues( + am => am.data + ), + }, + }; + await dataStore.save(mappingsKey, newMappingsList).getData(); + } } interface Mapping extends MappingData {} diff --git a/src/pages/import/ImportDetail.tsx b/src/pages/import/ImportDetail.tsx index 7737aa3..063b4cc 100644 --- a/src/pages/import/ImportDetail.tsx +++ b/src/pages/import/ImportDetail.tsx @@ -1,17 +1,18 @@ -import React, { useCallback } from "react"; +import React, { useCallback, useState } from "react"; import i18n from "../../locales"; +import _ from "lodash"; import { useAppContext } from "../../contexts/app-context"; import { makeStyles } from "@material-ui/styles"; import PageHeader from "../../components/page-header/PageHeader"; import MappingsList from "../mappings/MappingsList"; -import { Button } from "@material-ui/core"; +import { Button, LinearProgress } from "@material-ui/core"; import GetAppIcon from "@material-ui/icons/GetApp"; import ImportExportIcon from "@material-ui/icons/ImportExport"; -import { DataImport } from "../../models/Import"; +import { DataImport, PeriodInformation } from "../../models/Import"; import OUDialog from "../../components/dialogs/OrganisationUnitDialog"; -import PeriodSelectorDialog, { - PeriodInformation, -} from "../../components/dialogs/PeriodSelectorDialog"; +import PeriodSelectorDialog from "../../components/dialogs/PeriodSelectorDialog"; +import { ConfirmationDialog, useSnackbar } from "d2-ui-components"; +import Mapping from "../../models/Mapping"; interface ImportDetailProps { prefix: string; @@ -21,11 +22,14 @@ const ImportDetail: React.FunctionComponent = props => { const { prefix } = props; const { api, config } = useAppContext(); const classes = useStyles(); - const [selectedMappings, setSelectedMappings] = React.useState([]); - const [selectedOUs, setSelectedOUs] = React.useState([]); - const [periodInformation, setPeriodInformation] = React.useState({ id: "" }); - const [showOUDialog, setOUDialog] = React.useState(false); - const [showPeriodDialog, setPeriodDialog] = React.useState(false); + const snackbar = useSnackbar(); + const [selectedMappings, setSelectedMappings] = useState([]); + const [selectedOUs, setSelectedOUs] = useState([]); + const [periodInformation, setPeriodInformation] = useState({ id: "" }); + const [showOUDialog, setOUDialog] = useState(false); + const [showPeriodDialog, setPeriodDialog] = useState(false); + const [openImportDialog, setOpenImportDialog] = useState(false); + const [isImporting, setImporting] = useState(false); React.useEffect(() => { DataImport.getImportData(api, config, prefix).then(imp => { @@ -41,7 +45,7 @@ const ImportDetail: React.FunctionComponent = props => { }, []); const onSelectedMappingsChange = useCallback( - (newSelectedMappings: string[]) => { + (newSelectedMappings: Mapping[]) => { setSelectedMappings(newSelectedMappings); DataImport.getImportData(api, config, prefix).then(imp => { imp @@ -52,9 +56,19 @@ const ImportDetail: React.FunctionComponent = props => { [api, config, prefix] ); + const onDeleteMappings = useCallback( + (deletedMappingsIds: string[]) => { + const newSelectedMappings = _.filter( + selectedMappings, + m => !deletedMappingsIds.includes(m.id) + ); + onSelectedMappingsChange(newSelectedMappings); + }, + [selectedMappings, onSelectedMappingsChange] + ); + const onSelectedOUsSave = useCallback( (newSelectedOUs: string[]) => { - console.log({ newSelectedOUs }); setSelectedOUs(newSelectedOUs); DataImport.getImportData(api, config, prefix).then(imp => { imp ? imp.setSelectedOUs(newSelectedOUs).save() : console.log("No import found"); @@ -75,8 +89,55 @@ const ImportDetail: React.FunctionComponent = props => { [api, config, prefix] ); + const importData = useCallback(() => { + setImporting(true); + DataImport.getImportData(api, config, prefix).then(async imp => { + const response = await imp.run(false, api); + console.log({ response }); + setImporting(false); + setOpenImportDialog(false); + + if (response?.success) { + snackbar.success(i18n.t("Import successful \n") + response.messages.join("\n")); + } else { + snackbar.error(i18n.t("Import failed: \n") + response.failures.join("\n")); + } + }); + }, [api, config, prefix, snackbar]); + + const downloadData = useCallback(() => { + setImporting(true); + DataImport.getImportData(api, config, prefix).then(async imp => { + const response = await imp.run(true, api); + console.log({ response }); + setImporting(false); + + if (response?.success) { + snackbar.success(i18n.t("Import successful \n") + response.messages.join("\n")); + } else { + snackbar.error(i18n.t("Import failed: ") + response.failures.join("\n")); + } + }); + }, [api, config, prefix, snackbar]); + return ( + {openImportDialog && ( + (isImporting ? { undefined } : setOpenImportDialog(false))} + title={i18n.t("New import request")} + description={i18n.t( + "This operation will collect and import data from Google Earth Engine to the instance. Are you sure you want to proceed?" + )} + saveText={isImporting ? i18n.t("Importing...") : i18n.t("Import")} + disableSave={isImporting} + cancelText={i18n.t("Cancel")} + > + {isImporting && } + + )} {showOUDialog && ( = props => { > {i18n.t("Select Period")} - - ); diff --git a/src/pages/mappings/MappingsList.tsx b/src/pages/mappings/MappingsList.tsx index 230ccb7..848fdde 100644 --- a/src/pages/mappings/MappingsList.tsx +++ b/src/pages/mappings/MappingsList.tsx @@ -22,12 +22,13 @@ type ContextualAction = "details" | "edit" | "delete"; interface MappingsListProps { header?: string; - selectedMappings?: string[]; - onSelectionChange: (selectedMappings: string[]) => void; + selectedMappings?: Mapping[]; + onSelectionChange: (selectedMappings: Mapping[]) => void; + onDeleteMappings: (deletedMappings: string[]) => void; } const mouseActionsMapping: MouseActionsMapping = { - left: { type: "contextual" }, + left: { type: "action", action: "edit" }, right: { type: "contextual" }, }; @@ -44,7 +45,8 @@ function getComponentConfig( const initialSorting = { field: "name" as const, order: "asc" as const }; const columns: TableColumn[] = [ { name: "name" as const, text: i18n.t("Name"), sortable: true }, - { name: "dataSet" as const, text: i18n.t("Data set"), sortable: true }, + { name: "dataSetName" as const, text: i18n.t("Dataset"), sortable: true }, + { name: "dataSetId" as const, text: i18n.t("Dataset id"), sortable: true, hidden: true }, { name: "geeImage" as const, text: i18n.t("G.E.E Dataset"), sortable: true }, ]; @@ -90,7 +92,7 @@ const MappingsList: React.FC = props => { const { api, config } = useAppContext(); const goTo = useGoTo(); const snackbar = useSnackbar(); - const { header, selectedMappings, onSelectionChange } = props; + const { header, selectedMappings, onSelectionChange, onDeleteMappings } = props; const [mappingIdsToDelete, setMappingIdsToDelete] = useState(undefined); const componentConfig = React.useMemo(() => { return getComponentConfig(goTo, setMappingIdsToDelete); @@ -105,9 +107,8 @@ const MappingsList: React.FC = props => { const [objectsTableKey] = useState(() => new Date().getTime()); const selection = useMemo(() => { - console.log({ rows }); return rows - .filter(mapping => selectedMappings?.includes(mapping.id)) + .filter(mapping => selectedMappings?.map(m => m.id).includes(mapping.id)) .map(mapping => ({ id: mapping.id })); }, [rows, selectedMappings]); @@ -137,6 +138,7 @@ const MappingsList: React.FC = props => { snackbar, async () => { await Mapping.delete(api, config, mappingIdsToDelete ?? []); + onDeleteMappings(mappingIdsToDelete ?? []); snackbar.success( i18n.t("{{n}} mappings deleted", { n: mappingIdsToDelete ? mappingIdsToDelete.length : 0, @@ -145,6 +147,7 @@ const MappingsList: React.FC = props => { }, { onFinally: () => { + setDeleting(false); setMappingIdsToDelete(undefined); getMappings(sorting, { page: 1 }); }, @@ -157,6 +160,13 @@ const MappingsList: React.FC = props => { setMappingIdsToDelete(undefined); }, []); + const onTableChange = useCallback( + (newSelectedMappingsIds: string[]) => { + const newSelectedMappings = _.filter(rows, m => newSelectedMappingsIds.includes(m.id)); + onSelectionChange(newSelectedMappings); + }, + [rows, onSelectionChange] + ); return (
    {mappingIdsToDelete && ( @@ -164,7 +174,7 @@ const MappingsList: React.FC = props => { isOpen={true} onSave={deleteMappings} onCancel={isDeleting ? undefined : closeDeleteDialog} - title={i18n.t("Delete project")} + title={i18n.t("Delete mapping")} description={i18n.t( "This operation will delete ({{n}}) mappings. This operation cannot be undone. Are you sure you want to proceed?", { n: mappingIdsToDelete.length } @@ -181,7 +191,7 @@ const MappingsList: React.FC = props => { key={objectsTableKey} selection={selection} searchBoxLabel={i18n.t("Search by name or code")} - onChange={state => onSelectionChange(state.selection.map(m => m.id))} + onChange={state => onTableChange(state.selection.map(m => m.id))} forceSelectionColumn={true} pagination={pagination} details={componentConfig.details} diff --git a/src/pages/mappings/edit-mappings/MappingCreationPage.tsx b/src/pages/mappings/edit-mappings/MappingCreationPage.tsx index ce67913..87b9f05 100644 --- a/src/pages/mappings/edit-mappings/MappingCreationPage.tsx +++ b/src/pages/mappings/edit-mappings/MappingCreationPage.tsx @@ -1,51 +1,62 @@ -import React from "react"; +import React, { useEffect, useState } from "react"; import PageHeader from "../../../components/page-header/PageHeader"; import i18n from "../../../locales"; import { useGoTo } from "../../../router"; -import { ConfirmationDialog } from "d2-ui-components"; +import { useLoading } from "d2-ui-components"; +import MappingWizard from "../../../components/mappings/wizard/MappingWizard"; +import Mapping from "../../../models/Mapping"; +import { useAppContext } from "../../../contexts/app-context"; +import ExitWizardButton from "../../../components/mappings/wizard/ExitWizardButton"; +import DataSet from "../../../models/DataSet"; interface SyncRulesCreationParams { id?: string; action: "edit" | "new"; } -/* -const initialSteps = [ - { - key: "general-info", - label: i18n.t("General info"), - component: GeneralInfoStep, - description: i18n.t(`Please fill out information below for your project:`), - props: {} - }, - { - key: "save-info", - label: i18n.t("Summary and save"), - component: GeneralInfoStep, - description: i18n.t(`Please fill out information below for your project:`), - props: {} - }, -]; -*/ const MappingCreation: React.FC = props => { const goTo = useGoTo(); + const loading = useLoading(); + const { api, config } = useAppContext(); const { id, action } = props; const isEdit = action === "edit" && !!id; const title = !isEdit ? i18n.t("New mapping") : i18n.t("Edit mapping"); - const cancel = !isEdit ? i18n.t("Cancel mapping creation") : i18n.t("Cancel mapping edition"); + const [mapping, updateMapping] = useState(Mapping.create()); + const [dialogOpen, setDialogOpen] = useState(false); + const [dataSets, updateDataSets] = useState([]); + + async function getDataSets() { + const res = await DataSet.getList(api); + updateDataSets(res.dataSets); + } + + useEffect(() => { + getDataSets(); + if (isEdit && !!id) { + Mapping.get(api, config, id).then(m => { + updateMapping(m); + }); + } + // eslint-disable-next-line react-hooks/exhaustive-deps + }, [api, config, loading, isEdit, id]); return ( - console.log("save")} - onCancel={() => console.log("cancel")} - saveText={i18n.t("Ok")} + setDialogOpen(true)} /> + goTo("imports")} + onCancel={() => setDialogOpen(false)} /> - goTo("imports")} /> + + setDialogOpen(true)} + > ); }; diff --git a/src/pages/root/Root.tsx b/src/pages/root/Root.tsx index 61f9071..9a8517d 100644 --- a/src/pages/root/Root.tsx +++ b/src/pages/root/Root.tsx @@ -7,26 +7,20 @@ const Root = () => { return ( - {/* - } - /> - } /> - */} - {/* - } - /> - */} - } /> } /> } /> + } /> + ( + + )} + /> + {/* Default route */} } /> diff --git a/src/router.ts b/src/router.ts index 14e78d4..cc4afe7 100644 --- a/src/router.ts +++ b/src/router.ts @@ -2,7 +2,7 @@ import { useHistory } from "react-router"; const routes = { imports: () => "/", - mapings: () => `/mappings`, + mappings: () => `/mappings`, "mappings.edit": ({ id }: { id: string }) => `/mappings/${id}`, "mappings.new": () => `/mappings/new`, }; diff --git a/src/types/d2.d.ts b/src/types/d2.d.ts index 13f2651..0f1787f 100644 --- a/src/types/d2.d.ts +++ b/src/types/d2.d.ts @@ -3,3 +3,7 @@ declare module "d2" { export function init(config: { baseUrl: string; headers?: any }): D2; } + +declare module "d2/uid" { + export function generateUid(): string; +} diff --git a/src/types/validations.ts b/src/types/validations.ts new file mode 100644 index 0000000..ac059a9 --- /dev/null +++ b/src/types/validations.ts @@ -0,0 +1,8 @@ +export interface ValidationItem { + key: string; + namespace: object; +} + +export interface Validation { + [key: string]: ValidationItem[]; +} diff --git a/src/utils/dhis2.ts b/src/utils/dhis2.ts index 46580b2..91e181d 100644 --- a/src/utils/dhis2.ts +++ b/src/utils/dhis2.ts @@ -1,6 +1,23 @@ -import { D2Api } from "d2-api"; +import { D2Api, DataValueSetsPostResponse } from "d2-api"; import { Config } from "../models/Config"; +import i18n from "../locales"; export function getDataStore(api: D2Api, config: Config) { return api.dataStore(config.data.base.dataStore.namespace); } + +export async function getOrgUnitSubtree(api: D2Api, orgUnitId: string): Promise { + const { organisationUnits } = (await api + .get(`/organisationUnits/${orgUnitId}`, { fields: "id", includeDescendants: true }) + .getData()) as { organisationUnits: { id: string }[] }; + + return organisationUnits.map(({ id }) => id); +} + +export function getImportCountString(importCount: DataValueSetsPostResponse["importCount"]) { + return i18n.t("Imported: {{imported}} - updated: {{updated}} - ignored: {{ignored}}", { + imported: importCount.imported, + updated: importCount.updated, + ignored: importCount.ignored, + }); +} diff --git a/src/utils/gee.ts b/src/utils/gee.ts new file mode 100644 index 0000000..a277e08 --- /dev/null +++ b/src/utils/gee.ts @@ -0,0 +1,17 @@ +import { Config } from "../models/Config"; +import _ from "lodash"; +import { AttributeMappingDictionary } from "../models/Mapping"; + +export function getDataSetValue(id: string, config: Config, value: string) { + const ds = _(config.data.base.googleDatasets).get(id); + return ds ? ds[value] : ""; +} + +export function getAttributeMappings( + attributeMappingsDictionary: AttributeMappingDictionary +): Record { + const bandDeMappings = _.mapValues(attributeMappingsDictionary, m => { + return m.dataElementId ?? ""; + }); + return bandDeMappings; +} diff --git a/src/utils/import.ts b/src/utils/import.ts new file mode 100644 index 0000000..6c80dcb --- /dev/null +++ b/src/utils/import.ts @@ -0,0 +1,67 @@ +import moment, { Moment } from "moment"; +import { PeriodInformation } from "../models/Import"; +import i18n from "../locales"; + +export const availablePeriods: { + [id: string]: { + name: string; + start?: [number, string]; + end?: [number, string]; + }; +} = { + FIXED: { name: i18n.t("Fixed period") }, + TODAY: { name: i18n.t("Today"), start: [0, "day"] }, + YESTERDAY: { name: i18n.t("Yesterday"), start: [1, "day"] }, + LAST_7_DAYS: { name: i18n.t("Last 7 days"), start: [7, "day"], end: [0, "day"] }, + LAST_14_DAYS: { name: i18n.t("Last 14 days"), start: [14, "day"], end: [0, "day"] }, + THIS_WEEK: { name: i18n.t("This week"), start: [0, "isoWeek"] }, + LAST_WEEK: { name: i18n.t("Last week"), start: [1, "isoWeek"] }, + THIS_MONTH: { name: i18n.t("This month"), start: [0, "month"] }, + LAST_MONTH: { name: i18n.t("Last month"), start: [1, "month"] }, + THIS_QUARTER: { name: i18n.t("This quarter"), start: [0, "quarter"] }, + LAST_QUARTER: { name: i18n.t("Last quarter"), start: [1, "quarter"] }, + THIS_YEAR: { name: i18n.t("This year"), start: [0, "year"] }, + LAST_YEAR: { name: i18n.t("Last year"), start: [1, "year"] }, +}; + +export function buildPeriod(periodInfo: PeriodInformation): { start: Moment; end: Moment } { + const { + id, + startDate = "1970-01-01", + endDate = moment().add(10, "years").endOf("year").format("YYYY-MM-DD"), + } = periodInfo; + + if (!id || id === "ALL" || id === "FIXED") { + return { start: moment(startDate), end: moment(endDate) }; + } else { + const { start, end = start } = availablePeriods[id]; + if (start === undefined || end === undefined) + throw new Error("Unsupported period provided"); + + const [startAmount, startType] = start; + const [endAmount, endType] = end; + + return { + start: moment() + .subtract(startAmount, startType as moment.unitOfTime.DurationConstructor) + .startOf(startType as moment.unitOfTime.DurationConstructor), + end: moment() + .subtract(endAmount, endType as moment.unitOfTime.DurationConstructor) + .endOf(endType as moment.unitOfTime.DurationConstructor), + }; + } +} + +type Options = { filename: string; mimeType: string; contents: string | ArrayBuffer }; + +export function downloadFile(options: Options) { + const { filename, mimeType, contents } = options; + const blob = new Blob([contents], { type: mimeType }); + const element = document.createElement("a"); + element.id = "download-file"; + element.href = window.URL.createObjectURL(blob); + element.setAttribute("download", filename); + element.style.display = "none"; + document.body.appendChild(element); + element.click(); +} diff --git a/src/utils/tests.tsx b/src/utils/tests.tsx index 8b5ae87..7da6bd0 100644 --- a/src/utils/tests.tsx +++ b/src/utils/tests.tsx @@ -27,13 +27,50 @@ export function getTestUser() { export function getTestConfig() { return new Config({ base: { + gee: { + serviceAccount: "test-63@foo-dhis2-gee-app.iam.gserviceaccount.com", + privateKeyFile: "foo-dhis2-gee-app-09be93975aeb.json", + }, dataStore: { namespace: "dhis2-gee-app", keys: { + mappings: "mappings", imports: { suffix: "@import", }, - mappings: "mappings", + }, + }, + googleDatasets: { + chirpsDaily: { + displayName: "CHIRPS - DAILY", + pointer: "UCSB-CHG/CHIRPS/DAILY", + bands: ["precipitation"], + doc: + "https://developers.google.com/earth-engine/datasets/catalog/UCSB-CHG_CHIRPS_DAILY", + }, + era5Daily: { + displayName: "ERA5 - DAILY", + pointer: "ECMWF/ERA5/DAILY", + bands: [ + "mean_2m_air_temperature", + "minimum_2m_air_temperature", + "maximum_2m_air_temperature", + "dewpoint_2m_temperature", + "total_precipitation", + "surface_pressure", + "mean_sea_level_pressure", + "u_component_of_wind_10m", + "v_component_of_wind_10m", + ], + doc: + "https://developers.google.com/earth-engine/datasets/catalog/UCSB-CHG_CHIRPS_DAILY", + }, + daymetV3: { + displayName: "DAYMET V3", + pointer: "NASA/ORNL/DAYMET_V3", + bands: ["dayl", "prcp", "srad", "swe", "tmax", "tmin", "vp"], + doc: + "https://developers.google.com/earth-engine/datasets/catalog/NASA_ORNL_DAYMET_V3", }, }, }, diff --git a/src/utils/validations.js b/src/utils/validations.js new file mode 100644 index 0000000..027f091 --- /dev/null +++ b/src/utils/validations.js @@ -0,0 +1,28 @@ +import _ from "lodash"; +import i18n from "@dhis2/d2-i18n"; + +const translations = { + cannotBeBlank: namespace => i18n.t("Field {{field}} cannot be blank", namespace), + urlUsernameComboAlreadyExists: () => i18n.t("This URL and username combination already exists"), + cannotBeEmpty: namespace => i18n.t("You need to select at least one {{element}}", namespace), + + invalidPeriod: () => i18n.t("Start and end dates are not a valid period"), +}; + +export async function getValidationMessages(d2, model, validationKeys = null) { + const validationObj = await model.validate(d2); + + return _(validationObj) + .at(validationKeys || _.keys(validationObj)) + .flatten() + .compact() + .map(error => { + const translation = translations[error.key]; + if (translation) { + return i18n.t(translation(error.namespace)); + } else { + return `Missing translations: ${error.key}`; + } + }) + .value(); +} diff --git a/yarn.lock b/yarn.lock index 8ff211b..dc173ec 100644 --- a/yarn.lock +++ b/yarn.lock @@ -3223,7 +3223,7 @@ balanced-match@^1.0.0: base64-js@^1.0.2, base64-js@^1.3.0: version "1.3.1" - resolved "https://registry.npmjs.org/base64-js/-/base64-js-1.3.1.tgz#58ece8cb75dd07e71ed08c736abc5fac4dbf8df1" + resolved "https://registry.yarnpkg.com/base64-js/-/base64-js-1.3.1.tgz#58ece8cb75dd07e71ed08c736abc5fac4dbf8df1" integrity sha512-mLQ4i2QO1ytvGWFWmcngKO//JXAQueZvwEKtjgQFM4jIK0kU+ytMfplL8j+n5mspOfjHwoAg+9yhb7BwAHm36g== base@^0.11.1: @@ -4693,10 +4693,10 @@ cypress@^4.0.1: url "0.11.0" yauzl "2.10.0" -d2-api@0.1.1-beta.4: - version "0.1.1-beta.4" - resolved "https://registry.npmjs.org/d2-api/-/d2-api-0.1.1-beta.4.tgz#93cc2ca2a7c30de2e8a33e4b34f1faddeb3422dc" - integrity sha512-HoHEG3LQYow2mSg/5hXoBa9FIbkZD3TMlfBvnr82zhsfykwt+GOF//gkNrj8Sy4s7bKpdMGKk5i1hiPMpfJekg== +d2-api@0.2.1-beta.1: + version "0.2.1-beta.1" + resolved "https://registry.yarnpkg.com/d2-api/-/d2-api-0.2.1-beta.1.tgz#202ba67b1527e49a7b07cbe6c24cc1c6606f439f" + integrity sha512-ZL4gzqIgU40XEUYNlogv/vuP+4K4AU0wbe0fw89GMFqI/nRuqf9EIdaC71iPRYbZksOAx9e7uvrpH7YzfQIQgg== dependencies: "@babel/runtime" "^7.5.4" "@dhis2/d2-i18n" "^1.0.5" @@ -4732,10 +4732,10 @@ d2-manifest@^1.0.0: minimist "^1.1.0" readline-sync "^1.4.1" -d2-ui-components@1.2.0: - version "1.2.0" - resolved "https://registry.npmjs.org/d2-ui-components/-/d2-ui-components-1.2.0.tgz#cff3f1cb17ef56d5920a16cff88c1e578489f10b" - integrity sha512-R6uaxBmRhKrmPNDPJSltQcTiM0Ofb1J55KshRdMXV1khjTm0GtQieg/UTKc0EsEFhVDKfHTnbFVriwQX7lTIbQ== +d2-ui-components@1.3.0: + version "1.3.0" + resolved "https://registry.yarnpkg.com/d2-ui-components/-/d2-ui-components-1.3.0.tgz#1ab87580fc07fe57573c8eae475c9581e400aaa0" + integrity sha512-F7psGDnAnmMSk9fmz7tgakHYGLeD56+WJc/DkT4UMBbnuf59Fgg88KDRyEWr+QJ8bhvo/xBvRGYe8bl/ZfVbZg== dependencies: "@date-io/core" "^1.3.6" "@date-io/moment" "^1.0.2" @@ -4830,7 +4830,7 @@ debug@3.1.0, debug@=3.1.0: debug@4, debug@4.1.1, debug@^4.0.0, debug@^4.0.1, debug@^4.1.0, debug@^4.1.1: version "4.1.1" - resolved "https://registry.npmjs.org/debug/-/debug-4.1.1.tgz#3b72260255109c6b589cee050f1d516139664791" + resolved "https://registry.yarnpkg.com/debug/-/debug-4.1.1.tgz#3b72260255109c6b589cee050f1d516139664791" integrity sha512-pYAIzeRo8J6KPEaJ0VWOh5Pzkbw/RetuzehGM7QRRX5he4fPHx2rdKMB256ehJCkX+XRQm16eZLqLNS8RSZXZw== dependencies: ms "^2.1.1" @@ -9591,7 +9591,7 @@ lru-cache@^4.0.1: lru-cache@^5.0.0, lru-cache@^5.1.1: version "5.1.1" - resolved "https://registry.npmjs.org/lru-cache/-/lru-cache-5.1.1.tgz#1da27e6710271947695daf6848e847f01d84b920" + resolved "https://registry.yarnpkg.com/lru-cache/-/lru-cache-5.1.1.tgz#1da27e6710271947695daf6848e847f01d84b920" integrity sha512-KpNARQA3Iwv+jTA0utUVVbrh+Jlrr1Fv0e56GGzAFOXN7dk/FviaDW8LHmK52DlcH4WP2n6gI8vN1aesBFgo9w== dependencies: yallist "^3.0.2" @@ -9867,7 +9867,7 @@ mime@1.6.0: mime@^2.2.0, mime@^2.4.4: version "2.4.4" - resolved "https://registry.npmjs.org/mime/-/mime-2.4.4.tgz#bd7b91135fc6b01cde3e9bae33d659b63d8857e5" + resolved "https://registry.yarnpkg.com/mime/-/mime-2.4.4.tgz#bd7b91135fc6b01cde3e9bae33d659b63d8857e5" integrity sha512-LRxmNwziLPT828z+4YkNzloCFC2YM4wrB99k+AV5ZbEyfGNWfG8SO1FUXLmLDBSo89NrJZ4DIWeLjy1CHGhMGA== mimic-fn@^1.0.0: