// All material copyright Esri, All Rights Reserved, unless otherwise specified. // See https://js.arcgis.com/4.30/esri/copyright.txt for details. //>>built define("../../chunks/tslib.es6 ../../core/Error ../../core/JSONSupport ../../core/lang ../../core/Logger ../../core/accessorSupport/decorators/property ../../core/accessorSupport/decorators/cast ../../core/accessorSupport/decorators/subclass ./SimpleBandStatistics ./rasterFormats/pixelRangeUtils".split(" "),function(p,w,m,x,u,q,y,z,v,A){var t;m=t=class extends m.JSONSupport{static createEmptyBand(a,b){return new (t.getPixelArrayConstructor(a))(b)}static combineBandMasks(a){if(2>a.length)return a[0]; const b=a[0].length,k=(new Uint8Array(b)).fill(255);for(let l=0;l{var l=this.mask;let f=Infinity,c=-Infinity;const d=k.length;let h,g=0;if(null!=l)for(h=0;hc?g:c);else for(h=0;hc?g:c;return new v.SimpleBandStatistics(f,c)});var a=this.mask,b=0;if(null!=a)for(let k=0;kk?k:ne>=b.length),c=l===a.length&&!a.some((e,r)=>e!==r);if(f||c)return this;l=this.bandMasks?.length=== l?a.map(e=>this.bandMasks[e]):void 0;let {mask:d,validPixelCount:h}=this;const {width:g,height:n}=this;l?.length&&(d=t.combineBandMasks(l),h=d.filter(e=>!!e).length);return new t({pixelType:this.pixelType,width:g,height:n,mask:d,bandMasks:l,validPixelCount:h,maskIsAlpha:this.maskIsAlpha,pixels:a.map(e=>b[e]),statistics:k&&a.map(e=>k[e])})}clone(){const a=new t({width:this.width,height:this.height,pixelType:this.pixelType,maskIsAlpha:this.maskIsAlpha,validPixelCount:this.validPixelCount});null!=this.mask&& (a.mask=new Uint8Array(this.mask));this.bandMasks&&(a.bandMasks=this.bandMasks.map(l=>new Uint8Array(l)));let b;const k=t.getPixelArrayConstructor(this.pixelType);if(this.pixels&&0