From 7211f0e7a4e33dda86f65940feb8313270cd6cda Mon Sep 17 00:00:00 2001 From: Google Earth Engine Authors Date: Fri, 10 Nov 2023 00:38:11 +0000 Subject: [PATCH] v0.1.379 PiperOrigin-RevId: 581060984 --- javascript/build/ee_api_js.js | 1294 +- javascript/build/ee_api_js_debug.js | 14406 +++++++-------- javascript/build/ee_api_js_npm.js | 14450 ++++++++-------- javascript/package.json | 2 +- javascript/src/apiclient.js | 9 +- javascript/src/ee.js | 3 +- javascript/src/eeapiclient/api_client.ts | 1 + .../src/eeapiclient/api_request_hook.ts | 1 + javascript/src/eeapiclient/domain_object.ts | 1 + javascript/src/eeapiclient/generated_types.ts | 1 + .../src/eeapiclient/multipart_request.ts | 1 + .../src/eeapiclient/promise_api_client.ts | 1 + .../eeapiclient/promise_request_service.ts | 1 + javascript/src/eeapiclient/request_params.ts | 1 + .../src/eeapiclient/request_params_test.ts | 1 + .../CloudMasking/Sentinel2ClearComposites.js | 58 - .../CloudMasking/Sentinel2CloudScorePlus.js | 35 + python/ee/__init__.py | 9 +- python/ee/_cloud_api_utils.py | 55 +- python/ee/_helpers.py | 3 +- python/ee/collection.py | 2 +- python/ee/data.py | 29 +- python/ee/deserializer.py | 5 +- python/ee/ee_number.py | 7 +- python/ee/ee_types.py | 5 +- python/ee/geometry.py | 19 +- python/ee/image.py | 2 +- python/ee/serializer.py | 7 +- python/ee/terrain.py | 10 +- python/ee/tests/algorithms.json | 68 +- 30 files changed, 15266 insertions(+), 15221 deletions(-) delete mode 100644 javascript/src/examples/CloudMasking/Sentinel2ClearComposites.js create mode 100644 javascript/src/examples/CloudMasking/Sentinel2CloudScorePlus.js diff --git a/javascript/build/ee_api_js.js b/javascript/build/ee_api_js.js index 158670e93..d270aa3f8 100644 --- a/javascript/build/ee_api_js.js +++ b/javascript/build/ee_api_js.js @@ -1,479 +1,486 @@ (function(){var h,aa=function(a){var b=0;return function(){return b>>0)+"_",d=0,e=function(g){if(this instanceof e)throw new TypeError("Symbol is not a constructor");return new b(c+(g||"")+"_"+d++,g)};return e}); +da("Symbol",function(a){if(a)return a;var b=function(g,f){this.Xi=g;ba(this,"description",{configurable:!0,writable:!0,value:f})};b.prototype.toString=function(){return this.Xi};var c="jscomp_symbol_"+(1E9*Math.random()>>>0)+"_",d=0,e=function(g){if(this instanceof e)throw new TypeError("Symbol is not a constructor");return new b(c+(g||"")+"_"+d++,g)};return e}); da("Symbol.iterator",function(a){if(a)return a;a=Symbol("Symbol.iterator");for(var b="Array Int8Array Uint8Array Uint8ClampedArray Int16Array Uint16Array Int32Array Uint32Array Float32Array Float64Array".split(" "),c=0;cb||1342177279>>=1)c+=c;return d}}); -var sa=function(a,b){a instanceof String&&(a+="");var c=0,d=!1,e={next:function(){if(!d&&c=e}});da("String.prototype.startsWith",function(a){return a?a:function(b,c){var d=ra(this,b,"startsWith");b+="";var e=d.length,g=b.length;c=Math.max(0,Math.min(c|0,d.length));for(var f=0;f=g}}); -da("Object.entries",function(a){return a?a:function(b){var c=[],d;for(d in b)ha(b,d)&&c.push([d,b[d]]);return c}});da("Object.is",function(a){return a?a:function(b,c){return b===c?0!==b||1/b===1/c:b!==b&&c!==c}});da("Array.prototype.includes",function(a){return a?a:function(b,c){var d=this;d instanceof String&&(d=String(d));var e=d.length;c=c||0;for(0>c&&(c=Math.max(c+e,0));cb||1342177279>>=1)c+=c;return d}}); +var ua=function(a,b){a instanceof String&&(a+="");var c=0,d=!1,e={next:function(){if(!d&&c=e}});da("String.prototype.startsWith",function(a){return a?a:function(b,c){var d=ta(this,b,"startsWith");b+="";var e=d.length,g=b.length;c=Math.max(0,Math.min(c|0,d.length));for(var f=0;f=g}}); +da("Object.entries",function(a){return a?a:function(b){var c=[],d;for(d in b)ja(b,d)&&c.push([d,b[d]]);return c}});da("Object.is",function(a){return a?a:function(b,c){return b===c?0!==b||1/b===1/c:b!==b&&c!==c}});da("Array.prototype.includes",function(a){return a?a:function(b,c){var d=this;d instanceof String&&(d=String(d));var e=d.length;c=c||0;for(0>c&&(c=Math.max(c+e,0));c>>0),ya=0,Ba=function(a,b,c){return a.call.apply(a.bind, -arguments)},Ca=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},Sa=Array.prototype.forEach?function(a,b){B(null!=a.length);Array.prototype.forEach.call(a,b,void 0)}:function(a,b){for(var c=a.length,d="string"===typeof a?a.split(""):a,e=0;e=arguments.length?Array.prototype.slice.call(a,b):Array.prototype.slice.call(a,b,c)} -function db(a){var b=[];if(0>a-0)return[];for(var c=0;c>>0),ac=function(a){B(a,"Listener can not be null.");if("function"===typeof a)return a;B(a.handleEvent,"An object listener must have handleEvent method.");a[ic]||(a[ic]=function(b){return a.handleEvent(b)}); -return a[ic]};var D=function(){z.call(this);this.Ha=new Tb(this);this.Rk=this;this.Sf=null};x(D,z);D.prototype[yb]=!0;h=D.prototype;h.addEventListener=function(a,b,c,d){$b(this,a,b,c,d)};h.removeEventListener=function(a,b,c,d){gc(this,a,b,c,d)}; -h.dispatchEvent=function(a){jc(this);var b=this.Sf;if(b){var c=[];for(var d=1;b;b=b.Sf)c.push(b),B(1E3>++d,"infinite loop")}b=this.Rk;d=a.type||a;if("string"===typeof a)a=new A(a,b);else if(a instanceof A)a.target=a.target||b;else{var e=a;a=new A(d,b);Sb(a,e)}e=!0;if(c)for(var g=c.length-1;!a.ad&&0<=g;g--){var f=a.currentTarget=c[g];e=kc(f,d,!0,a)&&e}a.ad||(f=a.currentTarget=b,e=kc(f,d,!0,a)&&e,a.ad||(e=kc(f,d,!1,a)&&e));if(c)for(g=0;!a.ad&&g=a.length)return qc;if(b in a)return{value:a[b++],done:!1};b++}};return c}throw Error("Not implemented");},sc=function(a,b){if(va(a))Sa(a,b);else for(a=rc(a);;){var c=a.next();if(c.done)break;b.call(void 0,c.value,void 0,a)}};var wc=function(a){if(a instanceof tc||a instanceof uc||a instanceof vc)return a;if("function"==typeof a.next)return new tc(function(){return a});if("function"==typeof a[Symbol.iterator])return new tc(function(){return a[Symbol.iterator]()});if("function"==typeof a.Ca)return new tc(function(){return a.Ca()});throw Error("Not an iterator or iterable.");},tc=function(a){this.sf=a};tc.prototype.Ca=function(){return new uc(this.sf())};tc.prototype[Symbol.iterator]=function(){return new vc(this.sf())}; -tc.prototype.yg=function(){return new vc(this.sf())};var uc=function(a){this.Qc=a};q(uc,pc);uc.prototype.next=function(){return this.Qc.next()};uc.prototype[Symbol.iterator]=function(){return new vc(this.Qc)};uc.prototype.yg=function(){return new vc(this.Qc)};var vc=function(a){tc.call(this,function(){return a});this.Qc=a};q(vc,tc);vc.prototype.next=function(){return this.Qc.next()};var xc=function(a,b){this.A={};this.K=[];this.md=this.size=0;var c=arguments.length;if(12*this.size&&yc(this),!0):!1};var yc=function(a){if(a.size!=a.K.length){for(var b=0,c=0;b=d.K.length)return qc;var g=d.K[b++];return{value:a?g:d.A[g],done:!1}};return e};h.lb=function(a){this.size=a};var zc=function(a,b){return Object.prototype.hasOwnProperty.call(a,b)};var Bc=function(a){if(a.R&&"function"==typeof a.R)a=a.R();else if(va(a)||"string"===typeof a)a=a.length;else{var b=0,c;for(c in a)b++;a=b}return a},Cc=function(a){if(a.Z&&"function"==typeof a.Z)return a.Z();if("undefined"!==typeof Map&&a instanceof Map||"undefined"!==typeof Set&&a instanceof Set)return Array.from(a.values());if("string"===typeof a)return a.split("");if(va(a)){for(var b=[],c=a.length,d=0;dc)return!1;!(b instanceof Gc)&&5e&&(e+=d);return[a.ol,c,e,b.y].join("/")};Lc.prototype.Lc=function(){return this.zb.length};var Nc=function(a){A.call(this,"tileevent");this.count=a};x(Nc,A);var Oc=function(){},Pc=new Oc;function Qc(a){return Object.assign({},{P:{},Ql:{},keys:[],La:{},s:{},H:{},th:!1},a)}var E=function(){this.h={}},F=function(a,b){return a.h.hasOwnProperty(b)?a.h[b]:null},G=function(a,b){return null!=a.h[b]};function Rc(a,b){return F(b,a)}function Sc(a,b,c){b[a]=c}function Tc(){return{}}function Uc(a,b){var c=new a;return null==b?c:Vc(b,Wc,Xc,Yc,a)}function Wc(a,b){return b[a]}function Xc(a,b,c){b.h[a]=c} -function Yc(a){if(null==a)throw Error("Cannot deserialize, target constructor was null.");return new a} -function Vc(a,b,c,d,e){e=d(e);for(var g=Zc(a,e),f=g.P||{},l=g.s||{},m=g.La||{},p=n(g.keys||[]),v=p.next(),y={};!v.done;y={Uc:y.Uc},v=p.next()){v=v.value;var C=b(v,a);if(null!=C){var Q=void 0;if(f.hasOwnProperty(v)){if(g.th&&0===C.length)continue;Q=$c(C,b,c,d,!0,!0,f[v])}else if(l.hasOwnProperty(v))Q=$c(C,b,c,d,!1,!0,l[v]);else if(m.hasOwnProperty(v))y.Uc=m[v],Q=y.Uc.oa?C.map(function(oa){return function(R){return ad(R,oa.Uc,b,c,d)}}(y)):ad(C,y.Uc,b,c,d);else if(Array.isArray(C)){if(g.th&&0===C.length)continue; -Q=$c(C,b,c,d,!0,!1)}else Q=C instanceof Oc?null:C;c(v,e,Q)}}return e}function ad(a,b,c,d,e){for(var g={},f=n(Object.keys(a)),l=f.next();!l.done;l=f.next()){l=l.value;var m=a[l];null!=m&&(g[l]=$c(m,c,d,e,b.qa,b.pa,b.ja))}return g} -function $c(a,b,c,d,e,g,f){if(g&&null==f)throw Error("Cannot deserialize a reference object without a constructor.");return null==a?a:e&&g?a.map(function(l){return Vc(l,b,c,d,f)}):e&&!g?a.map(function(l){return l}):!e&&g?Vc(a,b,c,d,f):a instanceof Oc?null:"object"===typeof a?JSON.parse(JSON.stringify(a)):a}function Zc(a,b){if(b instanceof E)a=Qc(b.i());else if(a instanceof E)a=Qc(a.i());else throw Error("Cannot find ClassMetadata.");return a};var bd;var ed=function(a,b){this.pg=a===cd&&b||"";this.Ck=dd};ed.prototype.rc=!0;ed.prototype.qc=function(){return this.pg};ed.prototype.toString=function(){return this.pg};var fd=function(a){if(a instanceof ed&&a.constructor===ed&&a.Ck===dd)return a.pg;La("expected object of type Const, got '"+a+"'");return"type_error:Const"},dd={},cd={};var hd=function(a,b){if(b!==gd)throw Error("TrustedResourceUrl is not meant to be built directly");this.Uf=a};hd.prototype.toString=function(){return this.Uf+""};hd.prototype.rc=!0;hd.prototype.qc=function(){return this.Uf.toString()}; -var id=function(a){if(a instanceof hd&&a.constructor===hd)return a.Uf;La("expected object of type TrustedResourceUrl, got '%s' of type %s",a,ua(a));return"type_error:TrustedResourceUrl"},nd=function(a){var b=fd(jd);if(!kd.test(b))throw Error("Invalid TrustedResourceUrl format: "+b);var c=b.replace(ld,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 -ed?fd(d):encodeURIComponent(String(d))});return md(c)},ld=/%{(\w+)}/g,kd=RegExp("^((https:)?//[0-9a-z.:[\\]-]+/|/[^/\\\\]|[^:/\\\\%]+/|[^:/\\\\%]*[?#]|about:blank#)","i"),gd={},md=function(a){if(void 0===bd){var b=null;var c=r.trustedTypes;if(c&&c.createPolicy)try{b=c.createPolicy("goog#html",{createHTML:Ea,createScript:Ea,createScriptURL:Ea})}catch(d){r.console&&r.console.error(d.message)}bd=b}a=(b=bd)?b.createScriptURL(a):a;return new hd(a,gd)};var pd=function(a,b){if(b!==od)throw Error("SafeUrl is not meant to be built directly");this.Tf=a};pd.prototype.toString=function(){return this.Tf.toString()};pd.prototype.rc=!0;pd.prototype.qc=function(){return this.Tf.toString()};var qd=function(a){if(a instanceof pd&&a.constructor===pd)return a.Tf;La("expected object of type SafeUrl, got '"+a+"' of type "+ua(a));return"type_error:SafeUrl"},od={},rd=new pd("about:invalid#zClosurez",od);new pd("about:blank",od);var sd={},td=function(){if(sd!==sd)throw Error("SafeStyle is not meant to be built directly");this.pi="";this.rc=!0};td.prototype.qc=function(){return this.pi};td.prototype.toString=function(){return this.pi.toString()};new td;var ud={},vd=function(){if(ud!==ud)throw Error("SafeStyleSheet is not meant to be built directly");this.oi="";this.rc=!0};vd.prototype.toString=function(){return this.oi.toString()};vd.prototype.qc=function(){return this.oi};new vd;var wd={},xd=function(){var a=r.trustedTypes&&r.trustedTypes.emptyHTML||"";if(wd!==wd)throw Error("SafeHtml is not meant to be built directly");this.ni=a;this.rc=!0};xd.prototype.qc=function(){return this.ni.toString()};xd.prototype.toString=function(){return this.ni.toString()};new xd;var zd=function(a,b){if(!t(a)||!t(a)||!t(a)||1!==a.nodeType||a.namespaceURI&&"http://www.w3.org/1999/xhtml"!==a.namespaceURI||a.tagName.toUpperCase()!=="SCRIPT".toString()){var c="SCRIPT".toString()+"; got: ";if(t(a))try{var d=a.constructor.displayName||a.constructor.name||Object.prototype.toString.call(a)}catch(e){d=""}else d=void 0===a?"undefined":null===a?"null":typeof a;La("Argument is not an HTML Element with tag name "+(c+d))}a:{c=(a.ownerDocument&&a.ownerDocument.defaultView|| -r).document;if(c.querySelector&&(c=c.querySelector("script[nonce]"))&&(c=c.nonce||c.getAttribute("nonce"))&&yd.test(c))break a;c=""}c&&a.setAttribute("nonce",c);a.src=id(b)},yd=/^[\w+/_-]+[=]{0,2}$/;var Ad=function(a,b){for(var c=a.split("%s"),d="",e=Array.prototype.slice.call(arguments,1);e.length&&1b)throw Error("Bad port number "+b);a.wc=b}else a.wc=null};Ed.prototype.getPath=function(){return this.Yb};Ed.prototype.setPath=function(a,b){Gd(this);this.Yb=b?Jd(a,!0):a;return this};var Id=function(a,b,c){Gd(a);b instanceof Kd?(a.Aa=b,a.Aa.hg(a.ya)):(c||(b=Ld(b,Qd)),a.Aa=new Kd(b,a.ya))};Ed.prototype.getQuery=function(){return this.Aa.toString()}; -Ed.prototype.removeParameter=function(a){Gd(this);this.Aa.remove(a);return this};var Gd=function(a){if(a.jl)throw Error("Tried to modify a read-only Uri");};Ed.prototype.hg=function(a){this.ya=a;this.Aa&&this.Aa.hg(a)}; -var Rd=function(a){return a instanceof Ed?a.clone():new Ed(a)},Jd=function(a,b){return a?b?decodeURI(a.replace(/%25/g,"%2525")):decodeURIComponent(a):""},Ld=function(a,b,c){return"string"===typeof a?(a=encodeURI(a).replace(b,Sd),c&&(a=a.replace(/%25([0-9a-fA-F]{2})/g,"%$1")),a):null},Sd=function(a){a=a.charCodeAt(0);return"%"+(a>>4&15).toString(16)+(a&15).toString(16)},Md=/[#\/\?@]/g,Od=/[#\?:]/g,Nd=/[#\?]/g,Qd=/[#\?@]/g,Pd=/#/g,Kd=function(a,b){this.X=this.N=null;this.sa=a||null;this.ya=!!b},Td= -function(a){a.N||(a.N=new Map,a.X=0,a.sa&&Dd(a.sa,function(b,c){a.add(decodeURIComponent(b.replace(/\+/g," ")),c)}))};h=Kd.prototype;h.R=function(){Td(this);return this.X};h.add=function(a,b){Td(this);this.sa=null;a=Ud(this,a);var c=this.N.get(a);c||this.N.set(a,c=[]);c.push(b);this.X=Ma(this.X)+1;return this};h.remove=function(a){Td(this);a=Ud(this,a);return this.N.has(a)?(this.sa=null,this.X=Ma(this.X)-this.N.get(a).length,this.N.delete(a)):!1};h.clear=function(){this.N=this.sa=null;this.X=0}; -h.isEmpty=function(){Td(this);return 0==this.X};h.Ob=function(a){Td(this);a=Ud(this,a);return this.N.has(a)};h.Gc=function(a){var b=this.Z();return Ya(b,a)};h.forEach=function(a,b){Td(this);this.N.forEach(function(c,d){c.forEach(function(e){a.call(b,e,d,this)},this)},this)};h.sb=function(){Td(this);for(var a=Array.from(this.N.values()),b=Array.from(this.N.keys()),c=[],d=0;d