12 |
- (window["webpackJsonp"]=window["webpackJsonp"]||[]).push([["chunk-cfae2ce4"],{"0ffd":function(e,t,r){"use strict";r.d(t,"a",(function(){return c}));const n=(()=>{const e=[];return e[254]="NEWSUBFILETYPE",e[255]="SUBFILETYPE",e[256]="IMAGEWIDTH",e[257]="IMAGELENGTH",e[258]="BITSPERSAMPLE",e[259]="COMPRESSION",e[262]="PHOTOMETRICINTERPRETATION",e[263]="THRESHHOLDING",e[264]="CELLWIDTH",e[265]="CELLLENGTH",e[266]="FILLORDER",e[269]="DOCUMENTNAME",e[270]="IMAGEDESCRIPTION",e[271]="MAKE",e[272]="MODEL",e[273]="STRIPOFFSETS",e[274]="ORIENTATION",e[277]="SAMPLESPERPIXEL",e[278]="ROWSPERSTRIP",e[279]="STRIPBYTECOUNTS",e[280]="MINSAMPLEVALUE",e[281]="MAXSAMPLEVALUE",e[282]="XRESOLUTION",e[283]="YRESOLUTION",e[284]="PLANARCONFIGURATION",e[285]="PAGENAME",e[286]="XPOSITION",e[287]="YPOSITION",e[288]="FREEOFFSETS",e[289]="FREEBYTECOUNTS",e[290]="GRAYRESPONSEUNIT",e[291]="GRAYRESPONSECURVE",e[292]="T4OPTIONS",e[293]="T6OPTIONS",e[296]="RESOLUTIONUNIT",e[297]="PAGENUMBER",e[300]="COLORRESPONSEUNIT",e[301]="TRANSFERFUNCTION",e[305]="SOFTWARE",e[306]="DATETIME",e[315]="ARTIST",e[316]="HOSTCOMPUTER",e[317]="PREDICTOR",e[318]="WHITEPOINT",e[319]="PRIMARYCHROMATICITIES",e[320]="COLORMAP",e[321]="HALFTONEHINTS",e[322]="TILEWIDTH",e[323]="TILELENGTH",e[324]="TILEOFFSETS",e[325]="TILEBYTECOUNTS",e[326]="BADFAXLINES",e[327]="CLEANFAXDATA",e[328]="CONSECUTIVEBADFAXLINES",e[330]="SUBIFD",e[332]="INKSET",e[333]="INKNAMES",e[334]="NUMBEROFINKS",e[336]="DOTRANGE",e[337]="TARGETPRINTER",e[338]="EXTRASAMPLES",e[339]="SAMPLEFORMAT",e[340]="SMINSAMPLEVALUE",e[341]="SMAXSAMPLEVALUE",e[342]="TRANSFERRANGE",e[347]="JPEGTABLES",e[512]="JPEGPROC",e[513]="JPEGIFOFFSET",e[514]="JPEGIFBYTECOUNT",e[515]="JPEGRESTARTINTERVAL",e[517]="JPEGLOSSLESSPREDICTORS",e[518]="JPEGPOINTTRANSFORM",e[519]="JPEGQTABLES",e[520]="JPEGDCTABLES",e[521]="JPEGACTABLES",e[529]="YCBCRCOEFFICIENTS",e[530]="YCBCRSUBSAMPLING",e[531]="YCBCRPOSITIONING",e[532]="REFERENCEBLACKWHITE",e[700]="XMP",e[33550]="GEOPIXELSCALE",e[33922]="GEOTIEPOINTS",e[33432]="COPYRIGHT",e[42112]="GDAL_METADATA",e[42113]="GDAL_NODATA",e[50844]="RPCCOEFFICIENT",e[34264]="GEOTRANSMATRIX",e[34735]="GEOKEYDIRECTORY",e[34736]="GEODOUBLEPARAMS",e[34737]="GEOASCIIPARAMS",e[34665]="EXIFIFD",e[34853]="GPSIFD",e[40965]="INTEROPERABILITYIFD",e})(),o=(()=>{const e=[].concat(n);return e[36864]="ExifVersion",e[40960]="FlashpixVersion",e[40961]="ColorSpace",e[42240]="Gamma",e[37121]="ComponentsConfiguration",e[37122]="CompressedBitsPerPixel",e[40962]="PixelXDimension",e[40963]="PixelYDimension",e[37500]="MakerNote",e[37510]="UserComment",e[40964]="RelatedSoundFile",e[36867]="DateTimeOriginal",e[36868]="DateTimeDigitized",e[36880]="OffsetTime",e[36881]="OffsetTimeOriginal",e[36882]="OffsetTimeDigitized",e[37520]="SubSecTime",e[37521]="SubSecTimeOriginal",e[37522]="SubSecTimeDigitized",e[37888]="Temperature",e[37889]="Humidity",e[37890]="Pressure",e[37891]="WaterDepth",e[37892]="Acceleration",e[37893]="CameraElevationAngle",e[42016]="ImageUniqueID",e[42032]="CameraOwnerName",e[42033]="BodySerialNumber",e[42034]="LensSpecification",e[42035]="LensMake",e[42036]="LensModel",e[42037]="LensSerialNumber",e[33434]="ExposureTime",e[33437]="FNumber",e[34850]="ExposureProgram",e[34852]="SpectralSensitivity",e[34855]="PhotographicSensitivity",e[34856]="OECF",e[34864]="SensitivityType",e[34865]="StandardOutputSensitivity",e[34866]="RecommendedExposureIndex",e[34867]="ISOSpeed",e[34868]="ISOSpeedLatitudeyyy",e[34869]="ISOSpeedLatitudezzz",e[37377]="ShutterSpeedValue",e[37378]="ApertureValue",e[37379]="BrightnessValue",e[37380]="ExposureBiasValue",e[37381]="MaxApertureValue",e[37382]="SubjectDistance",e[37383]="MeteringMode",e[37384]="LightSource",e[37385]="Flash",e[37386]="FocalLength",e[37396]="SubjectArea",e[41483]="FlashEnergy",e[41484]="SpatialFrequencyResponse",e[41486]="FocalPlaneXResolution",e[41487]="FocalPlaneYResolution",e[41488]="FocalPlaneResolutionUnit",e[41492]="SubjectLocation",e[41493]="ExposureIndex",e[41495]="SensingMethod",e[41728]="FileSource",e[41729]="SceneType",e[41730]="CFAPattern",e[41985]="CustomRendered",e[41986]="ExposureMode",e[41987]="WhiteBalance",e[41988]="DigitalZoomRatio",e[41989]="FocalLengthIn35mmFilm",e[41990]="SceneCaptureType",e[41991]="GainControl",e[41992]="Contrast",e[41993]="Saturation",e[41994]="Sharpness",e[41995]="DeviceSettingDescription",e[41996]="SubjectDistanceRange",e})(),i=["GPSVersionID","GPSLatitudeRef","GPSLatitude","GPSLongitudeRef","GPSLongitude","GPSAltitudeRef","GPSAltitude","GPSTimeStamp","GPSSatellites","GPSStatus","GPSMeasureMode","GPSDOP","GPSSpeedRef","GPSSpeed","GPSTrackRef","GPSTrack","GPSImgDirectionRef","GPSImgDirection","GPSMapDatum","GPSDestLatitudeRef","GPSDestLatitude","GPSDestLongitudeRef","GPSDestLongitude","GPSDestBearingRef","GPSDestBearing","GPSDestDistanceRef","GPSDestDistance","GPSProcessingMethod","GPSAreaInformation","GPSDateStamp","GPSDifferential","GPSHPositioningError"],a=(()=>{const e=[];return e[1024]="GTModelTypeGeoKey",e[1025]="GTRasterTypeGeoKey",e[1026]="GTCitationGeoKey",e[2048]="GeographicTypeGeoKey",e[2049]="GeogCitationGeoKey",e[2050]="GeogGeodeticDatumGeoKey",e[2051]="GeogPrimeMeridianGeoKey",e[2052]="GeogLinearUnitsGeoKey",e[2053]="GeogLinearUnitSizeGeoKey",e[2054]="GeogAngularUnitsGeoKey",e[2055]="GeogAngularUnitSizeGeoKey",e[2056]="GeogEllipsoidGeoKey",e[2057]="GeogSemiMajorAxisGeoKey",e[2058]="GeogSemiMinorAxisGeoKey",e[2059]="GeogInvFlatteningGeoKey",e[2061]="GeogPrimeMeridianLongGeoKey",e[2060]="GeogAzimuthUnitsGeoKey",e[3072]="ProjectedCSTypeGeoKey",e[3073]="PCSCitationGeoKey",e[3074]="ProjectionGeoKey",e[3075]="ProjCoordTransGeoKey",e[3076]="ProjLinearUnitsGeoKey",e[3077]="ProjLinearUnitSizeGeoKey",e[3078]="ProjStdParallel1GeoKey",e[3079]="ProjStdParallel2GeoKey",e[3080]="ProjNatOriginLongGeoKey",e[3081]="ProjNatOriginLatGeoKey",e[3082]="ProjFalseEastingGeoKey",e[3083]="ProjFalseNorthingGeoKey",e[3084]="ProjFalseOriginLongGeoKey",e[3085]="ProjFalseOriginLatGeoKey",e[3086]="ProjFalseOriginEastingGeoKey",e[3087]="ProjFalseOriginNorthingGeoKey",e[3088]="ProjCenterLongGeoKey",e[3090]="ProjCenterEastingGeoKey",e[3091]="ProjCenterNorthingGeoKey",e[3092]="ProjScaleAtNatOriginGeoKey",e[3093]="ProjScaleAtCenterGeoKey",e[3094]="ProjAzimuthAngleGeoKey",e[3095]="ProjStraightVertPoleLongGeoKey",e[4096]="VerticalCSTypeGeoKey",e[4097]="VerticalCitationGeoKey",e[4098]="VerticalDatumGeoKey",e[4099]="VerticalUnitsGeoKey",e})(),s=function(e,t){let r=(t||n)[e];return void 0===r&&(r="unknown"+String(e)),r},l=new Map;l.set("EXIFIFD",o),l.set("GPSIFD",i);const c={TIFF_TAGS:n,ifdTags:l,GEO_KEYS:a,getTagName:s}},1451:function(e,t,r){"use strict";r.d(t,"a",(function(){return L})),r.d(t,"b",(function(){return U}));var n=r("ce50"),o=r("3e27"),i=r("f4cc"),a=r("c4c2");class s{constructor(e){e&&(this.canvas=e.canvas,this.ctx=e.ctx||e.canvas&&e.canvas.getContext("2d"))}decode(e,t,r){if(!e||e.byteLength<10)throw new n["a"]("imagecanvasdecoder: decode","required a valid encoded data as input.");let{width:o,height:a,format:l}=t;const{applyJpegMask:c}=t;if(c&&(!o||!a))throw new n["a"]("imagecanvasdecoder: decode","image width and height are needed to apply jpeg mask directly to canvas");return new Promise((n,u)=>{let h=null;"jpg"===l&&c&&(h=s._getMask(e,{width:o,height:a}));const f=new Blob([new Uint8Array(e)],{type:"image/"+l=="jpg"?"jpeg":l}),d=URL.createObjectURL(f),p=new Image;let m;p.src=d,p.onload=()=>{if(URL.revokeObjectURL(d),Object(i["n"])(r))return void u(Object(i["e"])());o=p.width,a=p.height,this.canvas?(this.canvas.width===o&&this.canvas.height===a||(this.canvas.width=o,this.canvas.height=a),this.ctx.clearRect(0,0,o,a)):(this.canvas=document.createElement("canvas"),this.canvas.width=o,this.canvas.height=a,this.ctx=this.canvas.getContext("2d")),this.ctx.drawImage(p,0,0);const e=this.ctx.getImageData(0,0,o,a);let s;if(m=e.data,t.renderOnCanvas){if(h)for(s=0;s<h.length;s++)h[s]?m[4*s+3]=255:m[4*s+3]=0;return this.ctx.putImageData(e,0,0),void n(null)}const l=o*a,c=new Uint8Array(l),f=new Uint8Array(l),g=new Uint8Array(l);if(h)for(s=0;s<l;s++)c[s]=m[4*s],f[s]=m[4*s+1],g[s]=m[4*s+2];else for(h=new Uint8Array(l),s=0;s<l;s++)c[s]=m[4*s],f[s]=m[4*s+1],g[s]=m[4*s+2],h[s]=m[4*s+3];n({width:o,height:a,pixels:[c,f,g],mask:h,pixelType:"u8"})},p.onerror=()=>{URL.revokeObjectURL(d),u("cannot load image")}})}static _getMask(e,t){let r=null;try{const n=new Uint8Array(e),o=Math.ceil(n.length/2);let i=0;const s=n.length-2;for(i=o;i<s&&(255!==n[i]||217!==n[i+1]);i++);if(i+=2,i<n.length-1){const e=new a["a"](n.subarray(i)).getBytes();r=new Uint8Array(t.width*t.height);let o=0;for(let t=0;t<e.length;t++)for(let n=7;n>=0;n--)r[o++]=e[t]>>n&1}}catch(n){}return r}}var l=r("e90e");class c{static decode(e){const t=new Uint8Array(e),r=new l["a"];r.parse(t);const{width:n,height:o,numComponents:i,eof:s}=r,c=r.getData(n,o,!0);let u;const h=n*o;let f=0,d=0,p=0;if(s<t.length-1){const e=new a["a"](t.subarray(s)).getBytes();u=new Uint8Array(h);let r=0;for(f=0;f<e.length;f++)for(p=7;p>=0;p--)u[r++]=e[f]>>p&1}let m,g=null;if(1===i)g=[c,c,c];else{for(g=[],f=0;f<3;f++)m=new Uint8Array(h),g.push(m);for(p=0,d=0;d<h;d++)for(f=0;f<3;f++)g[f][d]=c[p++]}return{width:n,height:o,pixels:g,mask:u}}}var u=r("7754"),h=r("adb6");const f=function(e,t){const r=t.width*t.height,n=t.pixelType;return Math.floor(e.byteLength/(r*d(n)))},d=function(e){let t=1;switch(e){case Uint8Array:case Int8Array:t=1;break;case Uint16Array:case Int16Array:t=2;break;case Uint32Array:case Int32Array:case Float32Array:t=4;break;case Float64Array:t=8}return t},p=function(e,t){if(8*e.byteLength<t)return null;const r=new Uint8Array(e,0,Math.ceil(t/8)),n=new Uint8Array(t);let o=0,i=0,a=0,s=0;for(a=0;a<r.length-1;a++)for(i=r[a],s=7;s>=0;s--)n[o++]=i>>s&1;for(s=7;o<t-1;)i=r[r.length-1],n[o++]=i>>s&1,s--;return n};class m{static decode(e,t){const r=t.pixelType,n=[],o=t.width*t.height,i=f(e,t),{bandIds:a,format:s}=t,l=a&&a.length||f(e,t),c=e.byteLength-e.byteLength%(o*d(r)),u=new r(e,0,o*i);let h,m,g,y,b;if("bip"===s)for(h=0;h<l;h++){for(y=new r(o),b=a?a[h]:h,m=0;m<o;m++)y[m]=u[m*i+b];n.push(y)}else if("bsq"===s)for(h=0;h<l;h++)b=a?a[h]:h,n.push(u.subarray(b*o,(b+1)*o));return c<e.byteLength-1&&(g=p(e.slice(c),o)),{pixels:n,mask:g}}}var g=r("6d3d"),y=r("e55a"),b=function(e){var t,r,n,o,i,s;function l(e){var t,r,n,o,i,a,s,l,c,u,h,f,d;for(this.data=e,this.pos=8,this.palette=[],this.imgData=[],this.transparency={},this.animation=null,this.text={},i=null;;){switch(t=this.readUInt32(),l=function(){var e,t;for(t=[],e=0;e<4;++e)t.push(String.fromCharCode(this.data[this.pos++]));return t}.call(this).join(""),l){case"IHDR":this.width=this.readUInt32(),this.height=this.readUInt32(),this.bits=this.data[this.pos++],this.colorType=this.data[this.pos++],this.compressionMethod=this.data[this.pos++],this.filterMethod=this.data[this.pos++],this.interlaceMethod=this.data[this.pos++];break;case"acTL":this.animation={numFrames:this.readUInt32(),numPlays:this.readUInt32()||1/0,frames:[]};break;case"PLTE":this.palette=this.read(t);break;case"fcTL":i&&this.animation.frames.push(i),this.pos+=4,i={width:this.readUInt32(),height:this.readUInt32(),xOffset:this.readUInt32(),yOffset:this.readUInt32()},o=this.readUInt16(),n=this.readUInt16()||100,i.delay=1e3*o/n,i.disposeOp=this.data[this.pos++],i.blendOp=this.data[this.pos++],i.data=[];break;case"IDAT":case"fdAT":for("fdAT"===l&&(this.pos+=4,t-=4),e=(null!=i?i.data:void 0)||this.imgData,h=0;0<=t?h<t:h>t;0<=t?++h:--h)e.push(this.data[this.pos++]);break;case"tRNS":switch(this.transparency={},this.colorType){case 3:if(this.transparency.indexed=this.read(t),(c=255-this.transparency.indexed.length)>0)for(f=0;0<=c?f<c:f>c;0<=c?++f:--f)this.transparency.indexed.push(255);break;case 0:this.transparency.grayscale=this.read(t)[0];break;case 2:this.transparency.rgb=this.read(t)}break;case"tEXt":a=(u=this.read(t)).indexOf(0),s=String.fromCharCode.apply(String,u.slice(0,a)),this.text[s]=String.fromCharCode.apply(String,u.slice(a+1));break;case"IEND":return i&&this.animation.frames.push(i),this.colors=function(){switch(this.colorType){case 0:case 3:case 4:return 1;case 2:case 6:return 3}}.call(this),this.hasAlphaChannel=4===(d=this.colorType)||6===d,r=this.colors+(this.hasAlphaChannel?1:0),this.pixelBitlength=this.bits*r,this.colorSpace=function(){switch(this.colors){case 1:return"DeviceGray";case 3:return"DeviceRGB"}}.call(this),void(this.imgData=new Uint8Array(this.imgData));default:this.pos+=t}if(this.pos+=4,this.pos>this.data.length)throw new Error("Incomplete or corrupt PNG file")}}return l.load=function(e,t,r){var n;return"function"==typeof t&&(r=t),(n=new XMLHttpRequest).open("GET",e,!0),n.responseType="arraybuffer",n.onload=function(){var e;return e=new l(new Uint8Array(n.response||n.mozResponseArrayBuffer)),"function"==typeof(null!=t?t.getContext:void 0)&&e.render(t),"function"==typeof r?r(e):void 0},n.send(null)},r=1,n=2,t=0,l.prototype.read=function(e){var t,r;for(r=[],t=0;0<=e?t<e:t>e;0<=e?++t:--t)r.push(this.data[this.pos++]);return r},l.prototype.readUInt32=function(){return this.data[this.pos++]<<24|this.data[this.pos++]<<16|this.data[this.pos++]<<8|this.data[this.pos++]},l.prototype.readUInt16=function(){return this.data[this.pos++]<<8|this.data[this.pos++]},l.prototype.decodePixels=function(e){var t,r,n,o,i,s,l,c,u,h,f,d,p,m,g,y,b,w,x,C,v,k,T;if(null==e&&(e=this.imgData),0===e.length)return new Uint8Array(0);for(e=(e=new a["a"](e)).getBytes(),y=(d=this.pixelBitlength/8)*this.width,p=new Uint8Array(y*this.height),s=e.length,g=0,m=0,r=0;m<s;){switch(e[m++]){case 0:for(o=x=0;x<y;o=x+=1)p[r++]=e[m++];break;case 1:for(o=C=0;C<y;o=C+=1)t=e[m++],i=o<d?0:p[r-d],p[r++]=(t+i)%256;break;case 2:for(o=v=0;v<y;o=v+=1)t=e[m++],n=(o-o%d)/d,b=g&&p[(g-1)*y+n*d+o%d],p[r++]=(b+t)%256;break;case 3:for(o=k=0;k<y;o=k+=1)t=e[m++],n=(o-o%d)/d,i=o<d?0:p[r-d],b=g&&p[(g-1)*y+n*d+o%d],p[r++]=(t+Math.floor((i+b)/2))%256;break;case 4:for(o=T=0;T<y;o=T+=1)t=e[m++],n=(o-o%d)/d,i=o<d?0:p[r-d],0===g?b=w=0:(b=p[(g-1)*y+n*d+o%d],w=n&&p[(g-1)*y+(n-1)*d+o%d]),l=i+b-w,c=Math.abs(l-i),h=Math.abs(l-b),f=Math.abs(l-w),u=c<=h&&c<=f?i:h<=f?b:w,p[r++]=(t+u)%256;break;default:throw new Error("Invalid filter algorithm: "+e[m-1])}g++}return p},l.prototype.decodePalette=function(){var e,t,r,n,o,i,a,s,l;for(r=this.palette,i=this.transparency.indexed||[],o=new Uint8Array((i.length||0)+r.length),n=0,e=0,t=a=0,s=r.length;a<s;t=a+=3)o[n++]=r[t],o[n++]=r[t+1],o[n++]=r[t+2],o[n++]=null!=(l=i[e++])?l:255;return o},l.prototype.copyToImageData=function(e,t){var r,n,o,i,a,s,l,c,u,h,f;if(n=this.colors,u=null,r=this.hasAlphaChannel,this.palette.length&&(u=null!=(f=this._decodedPalette)?f:this._decodedPalette=this.decodePalette(),n=4,r=!0),c=(o=e.data||e).length,a=u||t,i=s=0,1===n)for(;i<c;)l=u?4*t[i/4]:s,h=a[l++],o[i++]=h,o[i++]=h,o[i++]=h,o[i++]=r?a[l++]:this.transparency.grayscale&&this.transparency.grayscale===h?0:255,s=l;else for(;i<c;)l=u?4*t[i/4]:s,o[i++]=a[l++],o[i++]=a[l++],o[i++]=a[l++],o[i++]=r?a[l++]:this.transparency.rgb&&this.transparency.rgb[1]===a[l-3]&&this.transparency.rgb[3]===a[l-2]&&this.transparency.rgb[5]===a[l-1]?0:255,s=l},l.prototype.decode=function(){var e;return e=new Uint8Array(this.width*this.height*4),this.copyToImageData(e,this.decodePixels()),e},i=e.document&&e.document.createElement("canvas"),s=i&&i.getContext("2d"),o=function(e){var t;return s.width=e.width,s.height=e.height,s.clearRect(0,0,e.width,e.height),s.putImageData(e,0,0),(t=new Image).src=i.toDataURL(),t},l.prototype.decodeFrames=function(e){var t,r,n,i,a,s,l,c;if(this.animation){for(c=[],r=a=0,s=(l=this.animation.frames).length;a<s;r=++a)t=l[r],n=e.createImageData(t.width,t.height),i=this.decodePixels(new Uint8Array(t.data)),this.copyToImageData(n,i),t.imageData=n,c.push(t.image=o(n));return c}},l.prototype.renderFrame=function(e,o){var i,a,s;return i=(a=this.animation.frames)[o],s=a[o-1],0===o&&e.clearRect(0,0,this.width,this.height),(null!=s?s.disposeOp:void 0)===r?e.clearRect(s.xOffset,s.yOffset,s.width,s.height):(null!=s?s.disposeOp:void 0)===n&&e.putImageData(s.imageData,s.xOffset,s.yOffset),i.blendOp===t&&e.clearRect(i.xOffset,i.yOffset,i.width,i.height),e.drawImage(i.image,i.xOffset,i.yOffset)},l.prototype.animate=function(e){var t,r,n,o,i,a,s=this;return r=0,a=this.animation,o=a.numFrames,n=a.frames,i=a.numPlays,(t=function(){var a,l;if(a=r++%o,l=n[a],s.renderFrame(e,a),o>1&&r/o<i)return s.animation._timeout=setTimeout(t,l.delay)})()},l.prototype.stopAnimation=function(){var e;return clearTimeout(null!=(e=this.animation)?e._timeout:void 0)},l.prototype.render=function(e){var t,r;return e._png&&e._png.stopAnimation(),e._png=this,e.width=this.width,e.height=this.height,t=e.getContext("2d"),this.animation?(this.decodeFrames(t),this.animate(t)):(r=t.createImageData(this.width,this.height),this.copyToImageData(r,this.decodePixels()),t.putImageData(r,0,0))},l}(self);const w=new Set(["jpg","png","bmp","gif"]),x=new Set(["S8","U8","S16","U16","S32","U32","F32","F64"]);async function C(e,t){var r;if(!y["a"])throw new n["a"]("rasterCoded:decode","lerc decoder is not supported on big endian platform");await Object(u["b"])();const{offset:i,noDataValue:a}=t;let s=null==(r=t.pixelType)?void 0:r.toUpperCase();s&&!x.has(s)&&(s=null);const{width:l,height:c,pixelType:h,statistics:f,pixels:d,mask:p}=Object(u["a"])(e,{inputOffset:i,noDataValue:a,pixelType:s});return new o["a"]({width:l,height:c,pixelType:h.toLowerCase(),pixels:d,mask:p,statistics:f})}async function v(e,t){const r=await Object(g["a"])(e,t.pyramidLevel||0),n=new o["a"]({width:r.width,height:r.height,pixels:r.pixels,pixelType:r.pixelType.toLowerCase(),mask:r.mask,statistics:null});return n.updateStatistics(),n}async function k(e,t){const r=await Object(g["b"])(e,t.customOptions),n=new o["a"]({width:r.width,height:r.height,pixels:r.pixels,pixelType:r.pixelType.toLowerCase(),mask:r.mask,statistics:null});return n.updateStatistics(),n}function T(e,t){const r=t.pixelType||"u8",n=o["a"].getPixelArrayConstructor(r),i="u8"===r?e:new n(e.buffer),a=[],s=t.planes||1;if(1===s)a.push(i);else for(let o=0;o<s;o++){const r=(t.width||1)*(t.height||e.length),l=new n(r);for(let e=0;e<r;e++)l[e]=i[e*s+o];a.push(l)}const l=new o["a"]({width:t.width||1,height:t.height||e.length,pixels:a,pixelType:r,statistics:null});return l.updateStatistics(),l}function S(e,t){return T(new a["a"](new Uint8Array(e)).getBytes(),t)}function O(e,t){return T(Object(h["a"])(e,t.offset,t.eof,!t.isInputBigEndian),t)}function A(e,t,r){const{pixelTypeCtor:n}=E(t.pixelType),i=(0,m.decode)(e,{width:t.width,height:t.height,pixelType:n,format:r}),a=new o["a"]({width:t.width,height:t.height,pixels:i.pixels,pixelType:t.pixelType,mask:i.mask,statistics:null});return a.updateStatistics(),a}function I(e){const t=c.decode(e),r=new o["a"]({width:t.width,height:t.height,pixels:t.pixels,pixelType:"U8",mask:t.mask,statistics:null});return r.updateStatistics(),r}function M(e,t){const r=new Uint8Array(e),n=new b(r),{width:i,height:a}=t,s=i*a,l=n.decode();let c,u=0,h=0;const f=new Uint8Array(s);for(u=0;u<s;u++)f[u]=l[4*u+3];const d=new o["a"]({width:i,height:a,pixels:[],pixelType:"U8",mask:f,statistics:[]});for(u=0;u<3;u++){for(c=new Uint8Array(s),h=0;h<s;h++)c[h]=l[4*h+u];d.addData({pixels:c})}return d.updateStatistics(),d}async function P(e,t,r,n){const i=new s,a={applyJpegMask:!1,format:t,...r},l=await i.decode(e,a,n),c=new o["a"](l);return c.updateStatistics(),c}function R(e){if(null==e)throw new n["a"]("rasterCodec:decode","parameter encodeddata is required.");const t=new Uint8Array(e,0,10);let r="";return 255===t[0]&&216===t[1]?r="jpg":137===t[0]&&80===t[1]&&78===t[2]&&71===t[3]?r="png":67===t[0]&&110===t[1]&&116===t[2]&&90===t[3]&&73===t[4]&&109===t[5]&&97===t[6]&&103===t[7]&&101===t[8]&&32===t[9]?r="lerc":76===t[0]&&101===t[1]&&114===t[2]&&99===t[3]&&50===t[4]&&32===t[5]?r="lerc2":73===t[0]&&73===t[1]&&42===t[2]&&0===t[3]||77===t[0]&&77===t[1]&&0===t[2]&&42===t[3]||73===t[0]&&73===t[1]&&43===t[2]&&0===t[3]||77===t[0]&&77===t[1]&&0===t[2]&&43===t[3]?r="tiff":71===t[0]&&73===t[1]&&70===t[2]?r="gif":66===t[0]&&77===t[1]?r="bmp":String.fromCharCode.apply(null,t).toLowerCase().indexOf("error")>-1&&(r="error"),r}function D(e){let t=null;switch(e){case"lerc":case"lerc2":t=C;break;case"jpg":t=I;break;case"png":t=M;break;case"bsq":case"bip":t=(t,r)=>A(t,r,e);break;case"tiff":t=v;break;case"deflate":t=S;break;case"lzw":t=O;break;case"error":t=()=>{throw new n["a"]("rasterCodec:decode","input data contains error")};break;default:t=()=>{throw new n["a"]("rasterCodec:decode","unsupported raster format")}}return t}function E(e){let t=null,r=null;switch(e?e.toLowerCase():"f32"){case"u1":case"u2":case"u4":case"u8":r=255,t=Uint8Array;break;case"u16":r=r||65535,t=Uint16Array;break;case"u32":r=r||2**32-1,t=Uint32Array;break;case"s8":r=r||-128,t=Int8Array;break;case"s16":r=r||-32768,t=Int16Array;break;case"s32":r=r||0-2**31,t=Int32Array;break;default:t=Float32Array}return{pixelTypeCtor:t,noDataValue:r}}function j(e,t=1){if(!e)return;const{pixels:r,width:n,height:i,mask:a}=e;if(!r||0===r.length)return;const s=r.length,l=n-1,c=i-1,u=[];let h,f,d,p,m,g,y;const b=o["a"].getPixelArrayConstructor(e.pixelType);if(0===t){for(h=0;h<s;h++){for(m=r[h],g=new b(l*c),f=0;f<c;f++)for(p=f*n,d=0;d<l;d++)g[f*l+d]=m[p+d];u.push(g)}if(a)for(y=new Uint8Array(l*c),f=0;f<c;f++)for(p=f*n,d=0;d<l;d++)y[f*l+d]=a[p+d]}else{for(h=0;h<s;h++){for(m=r[h],g=new b(l*c),f=0;f<c;f++)for(p=f*n,d=0;d<l;d++)g[f*l+d]=(m[p+d]+m[p+d+1]+m[p+n+d]+m[p+n+d+1])/4;u.push(g)}if(a)for(y=new Uint8Array(l*c),f=0;f<c;f++)for(p=f*n,d=0;d<l;d++)y[f*l+d]=Math.min.apply(null,[a[p+d],a[p+d+1],a[p+n+d],a[p+n+d+1]])}e.width=l,e.height=c,e.mask=y,e.pixels=u}function U(e){let t=R(e);return"lerc2"===t?t="lerc":"error"===t&&(t=""),t}async function L(e,t={},r){if(null==e)throw new n["a"]("rasterCodec:decode","missing encodeddata parameter.");let o,i,a=t.format&&t.format.toLowerCase();if(!("bsq"!==a&&"bip"!==a||null!=t.width&&null!=t.height))throw new n["a"]("rasterCodec:decode","requires width and height in options parameter.");return"tiff"===a&&t.customOptions?k(e,t):((!a||"bsq"!==a&&"bip"!==a&&"deflate"!==a&&"lzw"!==a)&&(a=R(e)),t.useCanvas&&w.has(a)?i=await P(e,a,t,r):(o=D(a),t.isPoint&&((t={...t}).width++,t.height++),i=await o(e,t),t.isPoint&&j(i)),i)}},"19db":function(e,t,r){"use strict";r.d(t,"a",(function(){return m})),r.d(t,"b",(function(){return g})),r.d(t,"c",(function(){return y})),r.d(t,"d",(function(){return D})),r.d(t,"e",(function(){return R})),r.d(t,"f",(function(){return h})),r.d(t,"g",(function(){return E})),r.d(t,"h",(function(){return b})),r.d(t,"i",(function(){return u})),r.d(t,"j",(function(){return d}));var n=r("fa8a"),o=r("b2b2"),i=r("3e27"),a=r("9dee");const s=new Map;s.set("meter-per-second",1),s.set("kilometer-per-hour",.277778),s.set("knots",.514444),s.set("feet-per-second",.3048),s.set("mile-per-hour",.44704);const l=180/Math.PI,c=5,u=new n["a"]({esriMetersPerSecond:"meter-per-second",esriKilometersPerHour:"kilometer-per-hour",esriKnots:"knots",esriFeetPerSecond:"feet-per-second",esriMilesPerHour:"mile-per-hour"});function h(e,t){return s.get(e)/s.get(t)||1}function f(e){return(450-e)%360}function d(e,t="geographic"){const[r,n]=e,o=Math.sqrt(r*r+n*n);let i=Math.atan2(n,r)*l;return i=(360+i)%360,"geographic"===t&&(i=f(i)),[o,i]}function p(e,t="geographic"){let r=e[1];"geographic"===t&&(r=f(r)),r%=360;const n=e[0];return[n*Math.cos(r/l),n*Math.sin(r/l)]}function m(e,t,r,n="geographic"){if(!Object(a["j"])(e)||Object(o["j"])(r))return e;const i="vector-magdir"===t?e.clone():Object(o["t"])(g(e,t)),s=i.pixels[1];for(let o=0;o<s.length;o++)s[o]="geographic"===n?(s[o]+r[o]+270)%360:(s[o]+360-r[o])%360;return"vector-magdir"===t?i:g(i,"vector-magdir")}function g(e,t,r="geographic",n=1){if(!Object(a["j"])(e))return e;const{pixels:o,width:s,height:l}=e,c=s*l,u=o[0],h=o[1],f=e.pixelType.startsWith("f")?e.pixelType:"f32",m=i["a"].createEmptyBand(f,c),g=i["a"].createEmptyBand(f,c);let y=0;for(let i=0;i<l;i++)for(let e=0;e<s;e++)"vector-uv"===t?([m[y],g[y]]=d([u[y],h[y]],r),m[y]*=n):([m[y],g[y]]=p([u[y],h[y]],r),m[y]*=n,g[y]*=n),y++;const b=new i["a"]({pixelType:f,width:e.width,height:e.height,mask:e.mask,validPixelCount:e.validPixelCount,maskIsAlpha:e.maskIsAlpha,pixels:[m,g]});return b.updateStatistics(),b}function y(e,t,r=1){if(1===r||!Object(a["j"])(e))return e;const n=e.clone(),{pixels:o,width:i,height:s}=n,l=o[0],c=o[1];let u=0;for(let a=0;a<s;a++)for(let e=0;e<i;e++)"vector-uv"===t?(l[u]*=r,c[u]*=r):l[u]*=r,u++;return n.updateStatistics(),n}function b(e,t,r,n,i){if(!Object(o["k"])(i)||!i.spatialReference.equals(e.spatialReference))return{extent:e,width:Math.round(t/n),height:Math.round(r/n),resolution:e.width/t};const a=i.xmin,s=i.ymax,l=(e.xmax-e.xmin)/t*n,c=(e.ymax-e.ymin)/r*n,u=(l+c)/2;return e.xmin=a+Math.floor((e.xmin-a)/l)*l,e.xmax=a+Math.ceil((e.xmax-a)/l)*l,e.ymin=s+Math.floor((e.ymin-s)/c)*c,e.ymax=s+Math.ceil((e.ymax-s)/c)*c,{extent:e,width:Math.round(e.width/l),height:Math.round(e.height/c),resolution:u}}const w=x(0,0,0);function x(e=0,t=0,r=Math.PI,n=!0){n&&(r=(2*Math.PI-r)%(2*Math.PI));const o=n?-1:1,i=13*o,a=-7*o,s=-2*o,l=-16*o,c=21.75,[u,h]=v(0,t+i,r,c),[f,d]=v(e-5.5,t+a,r,c),[p,m]=v(e+5.5,t+a,r,c),[g,y]=v(e-1.5,t+s,r,c),[b,w]=v(e+1.5,t+s,r,c),[x,C]=v(e-1.5,t+l,r,c),[k,T]=v(e+1.5,t+l,r,c);return[u,h,f,d,g,y,b,w,p,m,x,C,k,T]}function C(e=0,t=Math.PI,r=!0){r&&(t=(2*Math.PI-t)%(2*Math.PI));const n=10,o=r?-1:1,i=5*o,a=20*o,s=25*o,l=45,u=0,h=0,f=2,d=0,p=f*o;let[m,g]=[u+n/2,h-a],[y,b]=[m+f,g],[w,x]=[y-d,b+p],[C,k]=[u-n/2,h-s],[T,S]=[C+d,k-p],O=Math.ceil(e/c),A=Math.floor(O/10);O-=8*A;const I=[],M=[];for(let c=0;c<O/2;c++,A--){A<=0&&O%2==1&&c===(O-1)/2&&(C=u,T=C+d,k=(k+g)/2,S=k-p);const[e,r]=v(C,k,t,l);if(A>0){const[n,o]=v(y,k,t,l),[i,a]=v(m,g,t,l);I.push(n),I.push(o),I.push(e),I.push(r),I.push(i),I.push(a)}else{const[n,o]=v(y,b,t,l),[i,a]=v(w,x,t,l),[s,c]=v(T,S,t,l);M.push(e),M.push(r),M.push(s),M.push(c),M.push(i),M.push(a),M.push(n),M.push(o)}k+=i,g+=i,b+=i,x+=i,S+=i}const[P,R]=v(u+n/2,h+a,t,l),D=n/2+f,[E,j]=v(u+D,h+a,t,l),[U,L]=v(u+n/2,h-s,t,l),[B,G]=v(u+D,h-s,t,l);return{pennants:I,barbs:M,shaft:[P,R,E,j,U,L,B,G]}}function v(e,t,r,n=1){const o=Math.sqrt(e*e+t*t)/n,i=(2*Math.PI+Math.atan2(t,e))%(2*Math.PI);return[o,(2*Math.PI+i-r)%(2*Math.PI)]}const k=[0,1,3,6,10,16,21,27,33,40,47,55,63],T=[0,.5,1,1.5,2],S=[0,.25,.5,1,1.5,2,2.5,3,3.5,4];function O(e,t,r,n){const o=h(n||"knots",r);let i;for(i=1;i<t.length;i++)if(i===t.length-1){if(e<t[i]*o)break}else if(e<=t[i]*o)break;return Math.min(i-1,t.length-2)}function A(e,t,r,n,o){let i=0;switch(t){case"beaufort_kn":i=O(e,k,"knots",r);break;case"beaufort_km":i=O(e,k,"kilometer-per-hour",r);break;case"beaufort_ft":i=O(e,k,"feet-per-second",r);break;case"beaufort_m":i=O(e,k,"meter-per-second",r);break;case"classified_arrow":i=O(e,o,n,r);break;case"ocean_current_m":i=O(e,T,"meter-per-second",r);break;case"ocean_current_kn":i=O(e,S,"knots",r)}return i}function I(e,t){const{style:r,inputUnit:n,outputUnit:o,breakValues:i}=t,a=u.fromJSON(n),s=u.fromJSON(o),l=42,c=15;let h=0,f=0;const{width:d,height:p,mask:m}=e,g=e.pixels[0],y=e.pixels[1],b=m?m.filter(e=>e>0).length:d*p,x=new Float32Array(b*l),C=new Uint32Array(c*b);for(let u=0;u<p;u++)for(let e=0;e<d;e++){const t=u*d+e;if(!m||m[u*d+e]){var v;const n=null!=(v=(y[t]+360)%360/180*Math.PI)?v:2*Math.PI*Math.random(),o=A(g[t],r,a,s,i);for(let r=0;r<w.length;r+=2)x[h++]=(e+.5)/d,x[h++]=(u+.5)/p,x[h++]=w[r],x[h++]=w[r+1]+n,x[h++]=o,x[h++]=g[t];const c=7*(h/l-1);C[f++]=c,C[f++]=c+1,C[f++]=c+2,C[f++]=c+0,C[f++]=c+4,C[f++]=c+3,C[f++]=c+0,C[f++]=c+2,C[f++]=c+3,C[f++]=c+2,C[f++]=c+5,C[f++]=c+3,C[f++]=c+5,C[f++]=c+6,C[f++]=c+3}}return{vertexData:x,indexData:C}}const M=[];function P(e,t){if(0===M.length)for(let c=0;c<30;c++)M.push(C(5*c,0));const r=h(u.fromJSON(t.inputUnit),"knots"),{width:n,height:o,mask:i}=e,a=e.pixels[0],s=e.pixels[1],l=6,f=[],d=[];let p=0,m=0;for(let u=0;u<o;u++)for(let e=0;e<n;e++){const t=u*n+e,h=a[t]*r;if((!i||i[u*n+e])&&h>=c){var g;const r=null!=(g=(s[t]+360)%360/180*Math.PI)?g:2*Math.PI*Math.random(),{pennants:i,barbs:a,shaft:c}=M[Math.min(Math.floor(h/5),29)];if(i.length+a.length===0)continue;let y=f.length/l;const b=(e+.5)/n,w=(u+.5)/o;for(let e=0;e<i.length;e+=2)f[p++]=b,f[p++]=w,f[p++]=i[e],f[p++]=i[e+1]+r,f[p++]=0,f[p++]=h;for(let e=0;e<a.length;e+=2)f[p++]=b,f[p++]=w,f[p++]=a[e],f[p++]=a[e+1]+r,f[p++]=0,f[p++]=h;for(let e=0;e<c.length;e+=2)f[p++]=b,f[p++]=w,f[p++]=c[e],f[p++]=c[e+1]+r,f[p++]=0,f[p++]=h;for(let e=0;e<i.length/6;e++)d[m++]=y,d[m++]=y+1,d[m++]=y+2,y+=3;for(let e=0;e<a.length/8;e++)d[m++]=y,d[m++]=y+1,d[m++]=y+2,d[m++]=y+1,d[m++]=y+2,d[m++]=y+3,y+=4;d[m++]=y+0,d[m++]=y+1,d[m++]=y+2,d[m++]=y+1,d[m++]=y+3,d[m++]=y+2,y+=4}}return{vertexData:new Float32Array(f),indexData:new Uint32Array(d)}}function R(e,t){const r=24;let n=0,o=0;const{width:i,height:a,mask:s}=e,l=e.pixels[0],f=[],d=[],p=h(u.fromJSON(t.inputUnit),"knots"),m="wind_speed"===t.style?c:Number.MAX_VALUE;for(let c=0;c<a;c++)for(let e=0;e<i;e++){const t=l[c*i+e]*p;if((!s||s[c*i+e])&&t<m){for(let r=0;r<4;r++)f[n++]=(e+.5)/i,f[n++]=(c+.5)/a,f[n++]=r<2?-.5:.5,f[n++]=r%2==0?-.5:.5,f[n++]=0,f[n++]=t;const s=4*(n/r-1);d[o++]=s,d[o++]=s+1,d[o++]=s+2,d[o++]=s+1,d[o++]=s+2,d[o++]=s+3}}return{vertexData:new Float32Array(f),indexData:new Uint32Array(d)}}function D(e,t){return"simple_scalar"===t.style?R(e,t):"wind_speed"===t.style?P(e,t):I(e,t)}function E(e,t,r,n=[0,0],o=.5){const{width:a,height:s,mask:l}=e,[c,u]=e.pixels,[h,f]=n,m=Math.round((a-h)/r),g=Math.round((s-f)/r),y=m*g,b=new Float32Array(y),w=new Float32Array(y),x=new Uint8Array(y),C="vector-uv"===t;for(let i=0;i<g;i++)for(let e=0;e<m;e++){let t=0;const n=i*m+e,g=Math.max(0,i*r+f),y=Math.max(0,e*r+h),v=Math.min(s,g+r),k=Math.min(a,y+r);for(let e=g;e<v;e++)for(let r=y;r<k;r++){const o=e*a+r;if(!l||l[o]){t++;const e=C?[c[o],u[o]]:[c[o],(360+u[o])%360],[r,i]=C?e:p(e);b[n]+=r,w[n]+=i}}if(t>=(v-g)*(k-y)*(1-o)){x[n]=1;const[e,r]=d([b[n]/t,w[n]/t]);b[n]=e,w[n]=r}else x[n]=0,b[n]=0,w[n]=0}const v=new i["a"]({width:m,height:g,pixels:[b,w],mask:x});return v.updateStatistics(),v}},2616:function(e,t,r){"use strict";r.d(t,"a",(function(){return f})),r.d(t,"b",(function(){return x}));r("e06a");var n=r("e92d"),o=r("38a4"),i=r("b2b2"),a=r("f4cc"),s=r("880d"),l=r("7f83"),c=r("3af1");const u=n["a"].getLogger("esri.views.2d.engine.flow.dataUtils"),h=9;async function f(e,t,r){const n=performance.now(),o=d(e,t),i=performance.now(),s=m(e,o,t.width,t.height),l=performance.now(),c=y(s,!0),h=performance.now(),f=b(c),p=performance.now();if(e.profile){const e={"_createFlowFieldFromData()":Math.round(i-n),"_getStreamlines()":Math.round(l-i),"createAnimatedLinesData()":Math.round(h-l),"createLinesMesh()":Math.round(p-h),"Total elapsed time":Math.round(p-n)};u.info("createStreamlinesMesh profile",e)}return await Promise.resolve(),Object(a["v"])(r),f}function d(e,t){const r=g(t.data,t.width,t.height,e.smoothing);return e.interpolate?(e,n)=>{const o=Math.floor(e),i=Math.floor(n);if(o<0||o>=t.width)return[0,0];if(i<0||i>=t.height)return[0,0];const a=e-o,s=n-i,l=o,c=i,u=o<t.width-1?o+1:o,h=i<t.height-1?i+1:i,f=r[2*(c*t.width+l)],d=r[2*(c*t.width+u)],p=r[2*(h*t.width+l)],m=r[2*(h*t.width+u)],g=r[2*(c*t.width+l)+1],y=r[2*(c*t.width+u)+1];return[(f*(1-s)+p*s)*(1-a)+(d*(1-s)+m*s)*a,(g*(1-s)+r[2*(h*t.width+l)+1]*s)*(1-a)+(y*(1-s)+r[2*(h*t.width+u)+1]*s)*a]}:(e,n)=>{const o=Math.round(e),i=Math.round(n);return o<0||o>=t.width||i<0||i>=t.height?[0,0]:[r[2*(i*t.width+o)+0],r[2*(i*t.width+o)+1]]}}function p(e,t,r,n,o,i,a,s,l){const c=[];let u=r,h=n,f=0,[d,p]=t(u,h);d*=e.velocityScale,p*=e.velocityScale;const m=Math.sqrt(d*d+p*p);let g,y;c.push({x:u,y:h,t:f,speed:m});for(let b=0;b<e.verticesPerLine;b++){let[r,n]=t(u,h);r*=e.velocityScale,n*=e.velocityScale;const d=Math.sqrt(r*r+n*n);if(d<e.minSpeedThreshold)return c;const p=r/d,m=n/d;if(u+=p*e.segmentLength,h+=m*e.segmentLength,f+=e.segmentLength/d,Math.acos(p*g+m*y)>e.maxTurnAngle)return c;if(e.mergeLines){const e=Math.round(u*l),t=Math.round(h*l);if(e<0||e>a-1||t<0||t>s-1)return c;const r=i[t*a+e];if(-1!==r&&r!==o)return c;i[t*a+e]=o}c.push({x:u,y:h,t:f,speed:d}),g=p,y=m}return c}function m(e,t,r,n){const o=[],i=new s["a"],a=1/Math.max(e.lineCollisionWidth,1),l=Math.round(r*a),c=Math.round(n*a),u=new Int32Array(l*c);for(let s=0;s<u.length;s++)u[s]=-1;const h=[];for(let s=0;s<n;s+=e.lineSpacing)for(let t=0;t<r;t+=e.lineSpacing)h.push({x:t,y:s,sort:i.getFloat()});h.sort((e,t)=>e.sort-t.sort);for(const{x:s,y:f}of h)if(i.getFloat()<e.density){const r=p(e,t,s,f,o.length,u,l,c,a);if(r.length<2)continue;o.push(r)}return o}function g(e,t,r,n){if(0===n)return e;const o=Math.round(3*n),i=new Array(2*o+1);let a=0;for(let c=-o;c<=o;c++){const e=Math.exp(-c*c/(n*n));i[c+o]=e,a+=e}for(let c=-o;c<=o;c++)i[c+o]/=a;const s=new Float32Array(e.length);for(let c=0;c<r;c++)for(let r=0;r<t;r++){let n=0,a=0;for(let s=-o;s<=o;s++){if(r+s<0||r+s>=t)continue;const l=i[s+o];n+=l*e[2*(c*t+(r+s))+0],a+=l*e[2*(c*t+(r+s))+1]}s[2*(c*t+r)+0]=n,s[2*(c*t+r)+1]=a}const l=new Float32Array(e.length);for(let c=0;c<t;c++)for(let e=0;e<r;e++){let n=0,a=0;for(let l=-o;l<=o;l++){if(e+l<0||e+l>=r)continue;const u=i[l+o];n+=u*s[2*((e+l)*t+c)+0],a+=u*s[2*((e+l)*t+c)+1]}l[2*(e*t+c)+0]=n,l[2*(e*t+c)+1]=a}return l}function y(e,t){const r=new s["a"],n=e.reduce((e,t)=>e+t.length,0),o=new Float32Array(4*n),i=new Array(e.length);let a=0,l=0;for(const s of e){const e=a;for(const t of s)o[4*a+0]=t.x,o[4*a+1]=t.y,o[4*a+2]=t.t,o[4*a+3]=t.speed,a++;i[l++]={startVertex:e,numberOfVertices:s.length,totalTime:s[s.length-1].t,timeSeed:t?r.getFloat():0}}return{lineVertices:o,lineDescriptors:i}}function b(e,t=10){const{lineVertices:r,lineDescriptors:n}=e;let o=0,i=0;for(const h of n)o+=2*h.numberOfVertices,i+=6*(h.numberOfVertices-1);const a=new Float32Array(o*h),s=new Uint32Array(i);let l=0,c=0;function u(){s[c++]=l-2,s[c++]=l,s[c++]=l-1,s[c++]=l,s[c++]=l+1,s[c++]=l-1}function f(e,t,r,n,o,i,s,c){const u=l*h;let f=0;a[u+f++]=e,a[u+f++]=t,a[u+f++]=1,a[u+f++]=r,a[u+f++]=i,a[u+f++]=s,a[u+f++]=n/2,a[u+f++]=o/2,a[u+f++]=c,l++,a[u+f++]=e,a[u+f++]=t,a[u+f++]=-1,a[u+f++]=r,a[u+f++]=i,a[u+f++]=s,a[u+f++]=-n/2,a[u+f++]=-o/2,a[u+f++]=c,l++}for(const h of n){const{totalTime:e,timeSeed:n}=h;let o=null,i=null,a=null,s=null,l=null,c=null;for(let d=0;d<h.numberOfVertices;d++){const p=r[4*(h.startVertex+d)+0],m=r[4*(h.startVertex+d)+1],g=r[4*(h.startVertex+d)+2],y=r[4*(h.startVertex+d)+3];let b=null,w=null,x=null,C=null;if(d>0){b=p-o,w=m-i;const r=Math.sqrt(b*b+w*w);if(b/=r,w/=r,d>1){let e=b+l,r=w+c;const n=Math.sqrt(e*e+r*r);e/=n,r/=n;const o=Math.min(1/(e*b+r*w),t);e*=o,r*=o,x=-r,C=e}else x=-w,C=b;null!==x&&null!==C&&(f(o,i,a,x,C,e,n,y),u())}o=p,i=m,a=g,l=b,c=w,s=y}f(o,i,a,-c,l,e,n,s)}return{vertexData:a,indexData:s}}function w(e,t){const r=t.pixels,{width:n,height:i}=t,a=new Float32Array(n*i*2);if("vector-uv"===e)for(let o=0;o<n*i;o++)a[2*o+0]=r[0][o],a[2*o+1]=-r[1][o];else if("vector-magdir"===e)for(let s=0;s<n*i;s++){const e=r[0][s],t=Object(o["h"])(r[1][s]),n=Math.cos(t-Math.PI/2),i=Math.sin(t-Math.PI/2);a[2*s+0]=n*e,a[2*s+1]=i*e}return{data:a,width:n,height:i}}async function x(e,t,r,n,o,i){const a=Object(l["e"])(t.spatialReference);if(!a)return C(e,t,r,n,o,i);const[s,u]=a.valid,h=u-s,f=Math.ceil(t.width/h),d=t.width/f,p=Math.round(r/f);let m=t.xmin;const g=[];for(let l=0;l<f;l++){const r=new c["a"]({xmin:m,xmax:m+d,ymin:t.ymin,ymax:t.ymax,spatialReference:t.spatialReference});g.push(C(e,r,p,n,o,i)),m+=d}const y=await Promise.all(g),b={data:new Float32Array(r*n*2),width:r,height:n};let w=0;for(const l of y){for(let e=0;e<l.height;e++)for(let t=0;t<l.width;t++)w+t>=r||(b.data[2*(e*r+w+t)+0]=l.data[2*(e*l.width+t)+0],b.data[2*(e*r+w+t)+1]=l.data[2*(e*l.width+t)+1]);w+=l.width}return b}async function C(e,t,r,n,o,a){const s={requestProjectedLocalDirections:!0,signal:a};if(Object(i["k"])(o)&&(s.timeExtent=o),"imagery"===e.type){await e.load({signal:a});const o=e.rasterInfo.dataType,l=await e.fetchImage(t,r,n,s);return!l||Object(i["j"])(l.pixelData)||Object(i["j"])(l.pixelData.pixelBlock)?{data:new Float32Array(r*n*2),width:r,height:n}:w(o,l.pixelData.pixelBlock)}await e.load({signal:a});const l=e.rasterInfo.dataType,c=await e.fetchPixels(t,r,n,s);return!c||Object(i["j"])(c.pixelBlock)?{data:new Float32Array(r*n*2),width:r,height:n}:w(l,c.pixelBlock)}},"3e27":function(e,t,r){"use strict";r.d(t,"a",(function(){return m}));var n,o=r("a4ee"),i=(r("c120"),r("ce50")),a=r("6a0ed"),s=r("7ffa"),l=r("e92d"),c=r("b2b2"),u=r("59b2"),h=r("1a3e"),f=r("d386");const d=l["a"].getLogger("esri.layers.support.PixelBlock");let p=n=class extends a["a"]{constructor(e){super(e),this.width=null,this.height=null,this.pixelType="f32",this.validPixelCount=null,this.mask=null,this.maskIsAlpha=!1,this.pixels=null,this.statistics=null}static createEmptyBand(e,t){return new(n.getPixelArrayConstructor(e))(t)}static getPixelArrayConstructor(e){let t;switch(e){case"u1":case"u2":case"u4":case"u8":t=Uint8Array;break;case"u16":t=Uint16Array;break;case"u32":t=Uint32Array;break;case"s8":t=Int8Array;break;case"s16":t=Int16Array;break;case"s32":t=Int32Array;break;case"f32":case"c64":case"c128":case"unknown":t=Float32Array;break;case"f64":t=Float64Array}return t}castPixelType(e){if(!e)return"f32";let t=e.toLowerCase();return["u1","u2","u4"].indexOf(t)>-1?t="u8":-1===["unknown","u8","s8","u16","s16","u32","s32","f32","f64"].indexOf(t)&&(t="f32"),t}getPlaneCount(){return this.pixels&&this.pixels.length}addData(e){if(!e.pixels||e.pixels.length!==this.width*this.height)throw new i["a"]("pixelblock:invalid-or-missing-pixels","add data requires valid pixels array that has same length defined by pixel block width * height");this.pixels||(this.pixels=[]),this.statistics||(this.statistics=[]),this.pixels.push(e.pixels),this.statistics.push(e.statistics||{minValue:null,maxValue:null})}getAsRGBA(){const e=new ArrayBuffer(this.width*this.height*4);switch(this.pixelType){case"s8":case"s16":case"u16":case"s32":case"u32":case"f32":case"f64":this._fillFromNon8Bit(e);break;default:this._fillFrom8Bit(e)}return new Uint8ClampedArray(e)}getAsRGBAFloat(){const e=new Float32Array(this.width*this.height*4);return this._fillFrom32Bit(e),e}updateStatistics(){this.statistics=this.pixels.map(e=>this._calculateBandStatistics(e,this.mask));const e=this.mask;let t=0;if(e)for(let r=0;r<e.length;r++)e[r]&&t++;else t=this.width*this.height;this.validPixelCount=t}clamp(e){if(!e||"f64"===e||"f32"===e)return;let t;switch(e){case"u8":t=[0,255];break;case"u16":t=[0,65535];break;case"u32":t=[0,4294967295];break;case"s8":t=[-128,127];break;case"s16":t=[-32768,32767];break;case"s32":t=[-2147483648,2147483647];break;default:t=[-34e38,34e38]}const[r,o]=t,i=this.pixels,a=this.width*this.height,s=i.length;let l,c,u;const h=[];for(let f=0;f<s;f++){u=n.createEmptyBand(e,a),l=i[f];for(let e=0;e<a;e++)c=l[e],u[e]=c>o?o:c<r?r:c;h.push(u)}this.pixels=h,this.pixelType=e}extractBands(e){if(Object(c["j"])(e)||0===e.length||null==this.pixels||0===this.pixels.length)return this;const t=this.pixels.length,r=e.some(e=>e>=this.pixels.length),o=t===e.length&&!e.some((e,t)=>e!==t);return r||o?this:new n({pixelType:this.pixelType,width:this.width,height:this.height,mask:this.mask,validPixelCount:this.validPixelCount,maskIsAlpha:this.maskIsAlpha,pixels:e.map(e=>this.pixels[e]),statistics:this.statistics&&e.map(e=>this.statistics[e])})}clone(){const e=new n({width:this.width,height:this.height,pixelType:this.pixelType,maskIsAlpha:this.maskIsAlpha,validPixelCount:this.validPixelCount});let t;this.mask&&(this.mask instanceof Uint8Array?e.mask=new Uint8Array(this.mask):e.mask=this.mask.slice(0));const r=n.getPixelArrayConstructor(this.pixelType);if(this.pixels&&this.pixels.length>0){e.pixels=[];const n=this.pixels[0].slice;for(t=0;t<this.pixels.length;t++)e.pixels[t]=n?this.pixels[t].slice(0,this.pixels[t].length):new r(this.pixels[t])}if(this.statistics)for(e.statistics=[],t=0;t<this.statistics.length;t++)e.statistics[t]=Object(s["a"])(this.statistics[t]);return e}_fillFrom8Bit(e){const{mask:t,maskIsAlpha:r,pixels:n}=this;if(!e||!n||!n.length)return void d.error("getAsRGBA()","Unable to convert to RGBA. The input pixel block is empty.");let o,i,a,s;o=i=a=n[0],n.length>=3?(i=n[1],a=n[2]):2===n.length&&(i=n[1]);const l=new Uint32Array(e),c=this.width*this.height;if(o.length===c)if(t&&t.length===c)if(r)for(s=0;s<c;s++)t[s]&&(l[s]=t[s]<<24|a[s]<<16|i[s]<<8|o[s]);else for(s=0;s<c;s++)t[s]&&(l[s]=255<<24|a[s]<<16|i[s]<<8|o[s]);else for(s=0;s<c;s++)l[s]=255<<24|a[s]<<16|i[s]<<8|o[s];else d.error("getAsRGBA()","Unable to convert to RGBA. The pixelblock is invalid.")}_fillFromNon8Bit(e){const{pixels:t,mask:r,statistics:n}=this;if(!e||!t||!t.length)return void d.error("getAsRGBA()","Unable to convert to RGBA. The input pixel block is empty.");const o=this.pixelType;let i=1,a=0,s=1;if(n&&n.length>0)a=n.map(e=>e.minValue).reduce((e,t)=>Math.min(e,t)),s=n.map(e=>e.maxValue-e.minValue).reduce((e,t)=>Math.max(e,t)),i=255/s;else{let e=255;"s8"===o?(a=-128,e=127):"u16"===o?e=65535:"s16"===o?(a=-32768,e=32767):"u32"===o?e=4294967295:"s32"===o?(a=-2147483648,e=2147483647):"f32"===o?(a=-34e38,e=34e38):"f64"===o&&(a=-Number.MAX_VALUE,e=Number.MAX_VALUE),i=255/(e-a)}const l=new Uint32Array(e),c=this.width*this.height;let u,h,f,p,m;if(u=h=f=t[0],u.length!==c)return d.error("getAsRGBA()","Unable to convert to RGBA. The pixelblock is invalid.");if(t.length>=2)if(h=t[1],t.length>=3&&(f=t[2]),r&&r.length===c)for(p=0;p<c;p++)r[p]&&(l[p]=255<<24|(f[p]-a)*i<<16|(h[p]-a)*i<<8|(u[p]-a)*i);else for(p=0;p<c;p++)l[p]=255<<24|(f[p]-a)*i<<16|(h[p]-a)*i<<8|(u[p]-a)*i;else if(r&&r.length===c)for(p=0;p<c;p++)m=(u[p]-a)*i,r[p]&&(l[p]=255<<24|m<<16|m<<8|m);else for(p=0;p<c;p++)m=(u[p]-a)*i,l[p]=255<<24|m<<16|m<<8|m}_fillFrom32Bit(e){const{pixels:t,mask:r}=this;if(!e||!t||!t.length)return d.error("getAsRGBAFloat()","Unable to convert to RGBA. The input pixel block is empty.");let n,o,i,a;n=o=i=t[0],t.length>=3?(o=t[1],i=t[2]):2===t.length&&(o=t[1]);const s=this.width*this.height;if(n.length!==s)return d.error("getAsRGBAFloat()","Unable to convert to RGBA. The pixelblock is invalid.");let l=0;if(r&&r.length===s)for(a=0;a<s;a++)e[l++]=n[a],e[l++]=o[a],e[l++]=i[a],e[l++]=1&r[a];else for(a=0;a<s;a++)e[l++]=n[a],e[l++]=o[a],e[l++]=i[a],e[l++]=1}_calculateBandStatistics(e,t){let r=1/0,n=-1/0;const o=e.length;let i,a=0;if(t)for(i=0;i<o;i++)t[i]&&(a=e[i],r=a<r?a:r,n=a>n?a:n);else for(i=0;i<o;i++)a=e[i],r=a<r?a:r,n=a>n?a:n;return{minValue:r,maxValue:n}}};Object(o["a"])([Object(u["b"])({json:{write:!0}})],p.prototype,"width",void 0),Object(o["a"])([Object(u["b"])({json:{write:!0}})],p.prototype,"height",void 0),Object(o["a"])([Object(u["b"])({json:{write:!0}})],p.prototype,"pixelType",void 0),Object(o["a"])([Object(h["a"])("pixelType")],p.prototype,"castPixelType",null),Object(o["a"])([Object(u["b"])({json:{write:!0}})],p.prototype,"validPixelCount",void 0),Object(o["a"])([Object(u["b"])({json:{write:!0}})],p.prototype,"mask",void 0),Object(o["a"])([Object(u["b"])({json:{write:!0}})],p.prototype,"maskIsAlpha",void 0),Object(o["a"])([Object(u["b"])({json:{write:!0}})],p.prototype,"pixels",void 0),Object(o["a"])([Object(u["b"])({json:{write:!0}})],p.prototype,"statistics",void 0),p=n=Object(o["a"])([Object(f["a"])("esri.layers.support.PixelBlock")],p);const m=p},"53d3":function(e,t,r){"use strict";r.d(t,"a",(function(){return c}));var n=r("a4ee"),o=r("6a0ed"),i=r("59b2"),a=(r("b50f"),r("c120"),r("cea0"),r("d386")),s=r("4ae5");let l=class extends o["a"]{constructor(){super(...arguments),this.blockWidth=void 0,this.blockHeight=void 0,this.compression=null,this.origin=null,this.firstPyramidLevel=null,this.maximumPyramidLevel=null,this.pyramidScalingFactor=2,this.pyramidBlockWidth=null,this.pyramidBlockHeight=null,this.isVirtualTileInfo=!1,this.tileInfo=null,this.blockBoundary=null}};Object(n["a"])([Object(i["b"])({type:Number,json:{write:!0}})],l.prototype,"blockWidth",void 0),Object(n["a"])([Object(i["b"])({type:Number,json:{write:!0}})],l.prototype,"blockHeight",void 0),Object(n["a"])([Object(i["b"])({type:String,json:{write:!0}})],l.prototype,"compression",void 0),Object(n["a"])([Object(i["b"])({type:s["a"],json:{write:!0}})],l.prototype,"origin",void 0),Object(n["a"])([Object(i["b"])({type:Number,json:{write:!0}})],l.prototype,"firstPyramidLevel",void 0),Object(n["a"])([Object(i["b"])({type:Number,json:{write:!0}})],l.prototype,"maximumPyramidLevel",void 0),Object(n["a"])([Object(i["b"])({json:{write:!0}})],l.prototype,"pyramidResolutions",void 0),Object(n["a"])([Object(i["b"])({type:Number,json:{write:!0}})],l.prototype,"pyramidScalingFactor",void 0),Object(n["a"])([Object(i["b"])({type:Number,json:{write:!0}})],l.prototype,"pyramidBlockWidth",void 0),Object(n["a"])([Object(i["b"])({type:Number,json:{write:!0}})],l.prototype,"pyramidBlockHeight",void 0),Object(n["a"])([Object(i["b"])({type:Boolean,json:{write:!0}})],l.prototype,"isVirtualTileInfo",void 0),Object(n["a"])([Object(i["b"])({json:{write:!0}})],l.prototype,"tileInfo",void 0),Object(n["a"])([Object(i["b"])()],l.prototype,"blockBoundary",void 0),l=Object(n["a"])([Object(a["a"])("esri.layers.support.RasterStorageInfo")],l);const c=l},"6d3d":function(e,t,r){"use strict";r.d(t,"a",(function(){return G})),r.d(t,"b",(function(){return B})),r.d(t,"c",(function(){return I})),r.d(t,"d",(function(){return M})),r.d(t,"e",(function(){return A})),r.d(t,"f",(function(){return U})),r.d(t,"g",(function(){return j}));var n=r("742a"),o=r("e90e"),i=r("7754"),a=r("adb6"),s=r("0ffd"),l=r("e55a"),c=r("c4c2");const u=[0,1,1,2,4,8,1,1,2,4,8,4,8,-1,-1,-1,8,8,8],h=4294967296,f=new Set([1,5,6,7,8,34712,34887]);function d(e,t){let r="unknown";return 3===e?r="f32":1===e?1===t?r="u1":2===t?r="u2":4===t?r="u4":t<=8?r="u8":t<=16?r="u16":t<=32&&(r="u32"):2===e&&(t<=8?r="s8":t<=16?r="s16":t<=32&&(r="s32")),r}function p(e){let t=null;switch(e?e.toLowerCase():"f32"){case"u1":case"u2":case"u4":case"u8":t=Uint8Array;break;case"u16":t=Uint16Array;break;case"u32":t=Uint32Array;break;case"s8":t=Int8Array;break;case"s16":t=Int16Array;break;case"s32":t=Int32Array;break;default:t=Float32Array}return t}function m(e,t){return{x:t[0]*e.x+t[1]*e.y+t[2],y:t[3]*e.x+t[4]*e.y+t[5]}}function g(e,t){var r;return null==(r=e.get(t))?void 0:r.values}function y(e,t){var r;return null==(r=e.get(t))?void 0:r.values}function b(e,t){var r;return null==(r=e.get(t))?void 0:r.values[0]}function w(e,t){var r;return null==(r=e.get(t))?void 0:r.values[0]}function x(e,t,r,n=0,o=s["a"].TIFF_TAGS,i=4){const a=8===i,l=a?R(new DataView(e,r,8),0,t):new DataView(e,r,2).getUint16(0,t),c=4+2*i,u=a?8:2,h=u+l*c;if(r+h>e.byteLength)return{success:!1,ifd:null,nextIFD:null,requiredBufferSize:h};const f=r+h+4<=e.byteLength?E(new DataView(e,r+h,8===i?8:4),0,t,8===i):null,d=r+u,p=new Map;let m,g,y,b,w,x,C;for(let v=0;v<l;v++){g=new DataView(e,d+c*v,c),y=g.getUint16(0,t),w=g.getUint16(2,t),b=s["a"].getTagName(y,o);const r=[];2===i?(x=g.getUint16(4,t),C=g.getUint16(6,t)):4===i?(x=g.getUint32(4,t),C=g.getUint32(8,t)):8===i&&(x=E(g,4,t,!0),C=E(g,12,t,!0),r.push(g.getUint32(12,t)),r.push(g.getUint32(16,t))),m={id:y,type:w,valueCount:x,valueOffset:C,valueOffsets:r,values:null},A(e,t,m,n,!1,i),p.set(b,m)}return{success:!0,ifd:p,nextIFD:f,requiredBufferSize:h}}const C=function(e,t){return Object(i["a"])(e,{inputOffset:t}).pixels[0]};async function v(e,t,r,n,s){var u,h;const f=l["a"]===t,m=w(r,"BITSPERSAMPLE"),g=d(null!=(u=w(r,"SAMPLEFORMAT"))?u:1,m),y=null!=(h=w(r,"COMPRESSION"))?h:1,b=p(g);let x,v,k,T,S,O,A;if(34887===y)return await Object(i["b"])(),C(e,n);if(1===y)k=e.slice(n,n+s),T=new Uint8Array(k);else if(8===y||32946===y)T=new Uint8Array(e,n,s),O=new c["a"](T),A=O.getBytes(),k=new ArrayBuffer(A.length),T=new Uint8Array(k),T.set(A);else if(6===y){T=new Uint8Array(e,n,s);const t=new o["a"];t.parse(T);const r=t.getData(t.width,t.height,!0);k=new ArrayBuffer(r.length),T=new Uint8Array(k),T.set(r)}else if(7===y){const t=r.get("JPEGTABLES").values,i=t.length-2;T=new Uint8Array(i+s-2);for(let e=0;e<i;e++)T[e]=t[e];const a=new Uint8Array(e,n+2,s-2);for(let e=0;e<a.length;e++)T[i+e]=a[e];const l=new o["a"];l.parse(T);const c=l.getData(l.width,l.height,!0);k=new ArrayBuffer(c.length),T=new Uint8Array(k),T.set(c)}else 5===y&&(T=Object(a["a"])(e,n,s,t),k=T.buffer);if("u8"===g||"s8"===g||f)v=new b(k);else{switch(k=new ArrayBuffer(T.length),S=new Uint8Array(k),g){case"u16":case"s16":for(x=0;x<T.length;x+=2)S[x]=T[x+1],S[x+1]=T[x];break;case"u32":case"s32":case"f32":for(x=0;x<T.length;x+=4)S[x]=T[x+3],S[x+1]=T[x+2],S[x+2]=T[x+1],S[x+3]=T[x]}v=new b(k)}return v}async function k(e,t,r){var n;const o=y(r,"TILEOFFSETS");if(void 0===o)return null;const i=y(r,"TILEBYTECOUNTS"),{width:a,height:s,pixelType:l,tileWidth:c,tileHeight:u}=I([r]),h=M(r,t),f=t.planes,d=a*s,m=w(r,"BITSPERSAMPLE"),g=34887===(null!=(n=w(r,"COMPRESSION"))?n:1),b=p(l),x=[];for(let p=0;p<f;p++)x.push(new b(d));let C,k,T,S,O,A,P,R,D,E,j,U,L;const B=Math.ceil(a/c);if(m%8==0)if(g&&h&&f>1){const n=Math.round(o.length/f);for(C=0;C<n;C++){A=Math.floor(C/B)*u,P=C%B*c,R=A*a+P;for(let n=0;n<f;n++){const l=C*f+n;for(T=await v(e,t.littleEndian,r,o[l],i[l]),E=0,D=R,U=Math.min(c,a-P),j=Math.min(u,s-A),L=x[n],S=0;S<j;S++)for(D=R+S*a,E=S*c,O=0;O<U;O++,D++,E++)L[D]=T[E]}}}else for(C=0;C<o.length;C++)for(A=Math.floor(C/B)*u,P=C%B*c,R=A*a+P,T=await v(e,t.littleEndian,r,o[C],i[C]),E=0,D=R,U=Math.min(c,a-P),j=Math.min(u,s-A),k=0;k<f;k++)if(L=x[k],h||g)for(S=0;S<j;S++)for(D=R+S*a,E=c*u*k+S*c,O=0;O<U;O++,D++,E++)L[D]=T[E];else for(S=0;S<j;S++)for(D=R+S*a,E=S*c*f+k,O=0;O<U;O++,D++,E+=f)L[D]=T[E];return{width:a,height:s,pixelType:l,pixels:x}}const T=function(e,t,r){var n;const i=l["a"]===t.littleEndian,s=y(r,"STRIPOFFSETS");if(void 0===s)return null;const{width:u,height:h,pixelType:f}=I([r]),d=t.planes,m=u*h,g=w(r,"BITSPERSAMPLE"),b=p(f),x=new b(m*d),C=y(r,"STRIPBYTECOUNTS"),v=w(r,"ROWSPERSTRIP"),k=null!=(n=w(r,"COMPRESSION"))?n:1;let T,S,O,A,M,P,R,D,E,j,U,L=v;if(g%8==0)for(T=0;T<s.length;T++){if(M=T*(v*u)*d,L=(T+1)*v>h?h-T*v:v,"u8"===f||"s8"===f||i){if(8===k||32946===k)R=new Uint8Array(e,s[T],C[T]),j=new c["a"](R),U=j.getBytes(),P=new ArrayBuffer(U.length),R=new Uint8Array(P),R.set(U),R.length!==L*u*d*g/8&&console.log("strip byte counts is different than expected");else if(6===k){R=new Uint8Array(e,s[T],C[T]);const t=new o["a"];t.parse(R);const r=t.getData(t.width,t.height,!0);P=new ArrayBuffer(r.length),R=new Uint8Array(P),R.set(r)}else 5===k?(R=Object(a["a"])(e,s[T],C[T],t.littleEndian),P=R.buffer):1===k&&(C[T]!==L*u*d*g/8&&console.log("strip byte counts is different than expected"),P=e.slice(s[T],s[T]+C[T]));A=new b(P)}else{switch(6===k||8===k||32946===k?(R=new Uint8Array(e,s[T],C[T]),j=new c["a"](R),R=j.getBytes(),P=new ArrayBuffer(R.length),D=new Uint8Array(P),R.length!==L*u*d*g/8&&console.log("strip byte counts is different than expected")):1===k&&(C[T]!==L*u*d*g/8&&console.log("strip byte counts is different than expected"),P=new ArrayBuffer(C[T]),R=new Uint8Array(e,s[T],C[T]),D=new Uint8Array(P)),f){case"u16":case"s16":for(O=0;O<R.length;O+=2)D[O]=R[O+1],D[O+1]=R[O];break;case"u32":case"s32":case"f32":for(O=0;O<R.length;O+=4)D[O]=R[O+3],D[O+1]=R[O+2],D[O+2]=R[O+1],D[O+3]=R[O]}A=new b(P)}x.set(A,M)}const B=[];if(1===d)B.push(x);else for(T=0;T<d;T++){for(E=new b(m),S=0;S<m;S++)E[S]=x[S*d+T];B.push(E)}return{width:u,height:h,pixelType:f,pixels:B}},S=function(e,t,r){if(!(e&&e.length>0&&t&&r))return null;let n,o,i;const a=e[0].length,s=e.length,l=new Uint8Array(a);for(let c=0;c<s;c++)if(n=e[c],o=t[c],i=r[c],0===c)for(let e=0;e<a;e++)l[e]=n[e]<o||n[e]>i?0:1;else for(let e=0;e<a;e++)l[e]&&(l[e]=n[e]<o||n[e]>i?0:1);return l},O=function(e){if(!e)return null;const t=e.match(/<Item(.*?)Item>/gi);if(!t||0===t.length)return null;const r=new Map;let n,o,i,a,s;for(let y=0;y<t.length;y++)n=t[y],o=n.slice("<Item ".length,n.indexOf(">")),a=n.indexOf("sample="),a>-1&&(s=n.slice(a+'sample="'.length,n.indexOf('"',a+'sample="'.length))),a=n.indexOf("name="),a>-1&&(o=n.slice(a+'name="'.length,n.indexOf('"',a+'name="'.length))),o&&(i=n.slice(n.indexOf(">")+1,n.indexOf("</Item>")).trim(),null!=s?r.has(o)?r.get(o)[s]=i:r.set(o,[i]):r.set(o,i)),s=null;const l=r.get("STATISTICS_MINIMUM"),c=r.get("STATISTICS_MAXIMUM"),u=r.get("STATISTICS_MEAN"),h=r.get("STATISTICS_STDDEV");let f=null;if(l&&c){f=[];for(let e=0;e<l.length;e++)f.push({min:parseFloat(l[e]),max:parseFloat(c[e]),avg:u&&parseFloat(u[e]),stddev:h&&parseFloat(h[e])})}const d=r.get("BandName"),p=r.get("WavelengthMin"),m=r.get("WavelengthMax");let g=null;if(d){g=[];for(let e=0;e<d.length;e++)g.push({BandName:d[e],WavelengthMin:p&&parseFloat(p[e]),WavelengthMax:m&&parseFloat(m[e])})}return{statistics:f,bandProperties:g,dataType:r.get("DataType"),rawMetadata:r}};function A(e,t,r,n=0,o=!1,i=4){if(r.values)return!0;const a=r.type,s=r.valueCount;let l=r.valueOffset,c=[];const f=u[a],d=8*f,p=s*f,m=s*u[a]*8;let g,y;const b=8===i?64:32,w=r.valueOffsets;if(m>b&&p>(o?e.byteLength:e?e.byteLength-l+n:0))return r.offlineOffsetSize=[l,p],r.values=null,!1;if(m<=b){if(!t)if(b<=32)l>>>=32-m;else{const e=null!=w&&w.length?w[0]:l>>>0,t=null!=w&&w.length?w[1]:Math.round((l-e)/h);m<=32?(l=e>>>32-m,w[0]=l):(l=e*2**(32-m)+(t>>>32-m),w[0]=e,w[1]=t>>>32-m)}if(1===s&&d===b)c=[l];else if(64===b){const e=null!=w&&w.length?w[0]:l>>>0,t=null!=w&&w.length?w[1]:Math.round((l-e)/h);let r=e,n=32;for(y=1;y<=s;y++){const e=32-d*y%32;if(n<d){const o=r<<e>>>32-n,i=t<<32-n>>>32-n;r=t,c.push(o+i*2**(d-n)),n-=32-(d-n)}else c.push(r<<e>>>32-d),n-=d;0===n&&(n=32,r=t)}}else for(y=1;y<=s;y++){const e=32-d*y;c.push(l<<e>>>32-d)}}else{l-=n,o&&(l=0);for(let r=l;r<l+p;r+=f){switch(a){case 1:case 2:case 7:g=new DataView(e,r,1).getUint8(0);break;case 3:g=new DataView(e,r,2).getUint16(0,t);break;case 4:case 13:g=new DataView(e,r,4).getUint32(0,t);break;case 5:g=new DataView(e,r,4).getUint32(0,t)/new DataView(e,r+4,4).getUint32(0,t);break;case 6:g=new DataView(e,r,1).getInt8(0);break;case 8:g=new DataView(e,r,2).getInt16(0,t);break;case 9:g=new DataView(e,r,4).getInt32(0,t);break;case 10:g=new DataView(e,r,4).getInt32(0,t)/new DataView(e,r+4,4).getInt32(0,t);break;case 11:g=new DataView(e,r,4).getFloat32(0,t);break;case 12:g=new DataView(e,r,8).getFloat64(0,t);break;case 16:case 18:g=R(new DataView(e,r,8),0,t);break;case 17:g=D(new DataView(e,r,8),0,t);break;default:g=null}c.push(g)}}if(2===a){let e="";const t=c;for(c=[],y=0;y<t.length;y++)0===t[y]&&""!==e?(c.push(e),e=""):e+=String.fromCharCode(t[y]);""===e&&0!==c.length||c.push(e)}return r.values=c,!0}function I(e){var t,r;const n=e[0],o=w(n,"TILEWIDTH"),i=w(n,"TILELENGTH"),a=w(n,"IMAGEWIDTH"),s=w(n,"IMAGELENGTH"),l=w(n,"BITSPERSAMPLE"),c=w(n,"SAMPLESPERPIXEL"),u=null!=(t=w(n,"SAMPLEFORMAT"))?t:1,h=d(u,l),p=M(n),x=g(n,"GDAL_NODATA");let C;null!=x&&x.length&&(C=x.map(e=>parseFloat(e)),C.some(e=>isNaN(e))&&(C=null));const v=null!=(r=w(n,"COMPRESSION"))?r:1;let k;switch(v){case 1:k="NONE";break;case 2:case 3:case 4:case 32771:k="CCITT";break;case 5:k="LZW";break;case 6:case 7:k="JPEG";break;case 32773:k="PACKBITS";break;case 8:case 32946:k="DEFLATE";break;case 34712:k="JPEG2000";break;case 34887:k="LERC";break;default:k=String(v)}let T=!0,S="";f.has(v)||(T=!1,S+="unsupported tag compression "+v),u>3&&(T=!1,S+="unsupported tag sampleFormat "+u),l%8!=0&&(T=!1,S+="unsupported tag bitsPerSample "+l);const A=b(n,"GEOASCIIPARAMS");let I;if(A){const e=A.split("|").find(e=>e.indexOf("ESRI PE String = ")>-1),t=e?e.replace("ESRI PE String = ",""):"";I=t.startsWith("COMPD_CS")||t.startsWith("PROJCS")||t.startsWith("GEOGCS")?{wkid:null,wkt:t}:null}const P=y(n,"GEOTIEPOINTS"),R=y(n,"GEOPIXELSCALE"),D=y(n,"GEOTRANSMATRIX"),E=n.has("GEOKEYDIRECTORY")?n.get("GEOKEYDIRECTORY").data:null;let j,U,B=!1;if(E){B=2===w(E,"GTRasterTypeGeoKey");const e=w(E,"GTModelTypeGeoKey");if(2===e){const e=w(E,"GeographicTypeGeoKey");e>=1024&&e<=32766&&(I={wkid:e})}else if(1===e){const e=w(E,"ProjectedCSTypeGeoKey");e>=1024&&e<=32766&&(I={wkid:e})}}if(R&&P&&P.length>=6?(j=[R[0],0,P[3]-P[0]*R[0],0,-Math.abs(R[1]),P[4]-P[1]*R[1]],B&&(j[2]-=.5*j[0]+.5*j[1],j[5]-=.5*j[3]+.5*j[4])):D&&16===D.length&&(j=B?[D[0],D[1],D[3]-.5*D[0],D[4],D[5],D[7]-.5*D[5]]:[D[0],D[1],D[3],D[4],D[5],D[7]]),j){const e=[{x:0,y:s},{x:0,y:0},{x:a,y:s},{x:a,y:0}];let t,r=Number.POSITIVE_INFINITY,n=Number.POSITIVE_INFINITY,o=Number.NEGATIVE_INFINITY,i=Number.NEGATIVE_INFINITY;for(let a=0;a<e.length;a++)t=m(e[a],j),r=t.x>r?r:t.x,o=t.x<o?o:t.x,n=t.y>n?n:t.y,i=t.y<i?i:t.y;U={xmin:r,xmax:o,ymin:n,ymax:i,spatialReference:I}}else U={xmin:-.5,ymin:.5-s,xmax:a-.5,ymax:.5,spatialReference:I};const G=e.filter(e=>1===b(e,"NEWSUBFILETYPE"));let _,N,F,V,z;if(G.length>0){_=Math.round(Math.log(a/w(G[0],"IMAGEWIDTH"))/Math.LN2);const e=G[G.length-1];N=Math.round(Math.log(a/w(e,"IMAGEWIDTH"))/Math.LN2),F=w(e,"TILEWIDTH"),V=w(e,"TILELENGTH")}F=N>0?F||o:null,V=N>0?V||i:null,o&&(z=[{maxCol:Math.ceil(a/o)-1,maxRow:Math.ceil(s/i)-1,minRow:0,minCol:0}],G.forEach(e=>{z.push({maxCol:Math.ceil(w(e,"IMAGEWIDTH")/w(e,"TILEWIDTH"))-1,maxRow:Math.ceil(w(e,"IMAGELENGTH")/w(e,"TILELENGTH"))-1,minRow:0,minCol:0})}));const W=b(e[0],"GDAL_METADATA"),H=O(W);return S+=" "+L({width:a,height:s,tileWidth:o,tileHeight:i,planes:c,ifds:e}),{width:a,height:s,tileWidth:o,tileHeight:i,planes:c,isBSQ:p,pixelType:h,compression:k,noData:C,isSupported:T,message:S,extent:U,affine:R?null:j,firstPyramidLevel:_,maximumPyramidLevel:N,pyramidBlockWidth:F,pyramidBlockHeight:V,tileBoundary:z,metadata:H}}function M(e,t){const r=g(e,"PLANARCONFIGURATION");return r?2===r[0]:!!t&&t.isBSQ}function P(e){const{littleEndian:t,isBigTiff:r,firstIFD:n}=j(e);let o=n;const i=[];do{const n=U(e,t,o,0,s["a"].TIFF_TAGS,r?8:4);if(!n.success)break;i.push(n.ifd),o=n.nextIFD}while(o>0);return{...I(i),littleEndian:t,isBigTiff:r,ifds:i}}function R(e,t,r){const n=e.getUint32(t,r),o=e.getUint32(t+4,r);return r?o*h+n:n*h+o}function D(e,t,r){let n=r?e.getInt32(t,r):e.getUint32(t,r),o=r?e.getUint32(t+4,r):e.getInt32(t+4,r);const i=(r?n:o)>=0?1:-1;return r?n*=i:o*=i,i*(r?o*h+n:n*h+o)}function E(e,t,r,n){return n?R(e,t,r):e.getUint32(t,r)}function j(e){const t=new DataView(e,0,16),r=t.getUint16(0,!1);let n=null;if(18761===r)n=!0;else{if(19789!==r)throw"unexpected endianess byte";n=!1}const o=t.getUint16(2,n);if(42!==o&&43!==o)throw"unexpected tiff identifier";let i=4;const a=43===o;if(a){const e=t.getUint16(i,n);if(i+=2,8!==e)throw"unsupported bigtiff version";if(0!==t.getUint16(i,n))throw"unsupported bigtiff version";i+=2}return{littleEndian:n,isBigTiff:a,firstIFD:E(t,i,n,a)}}function U(e,t,r,o=0,i=s["a"].TIFF_TAGS,a=4){const l=x(e,t,r,o,i,a);let c;const u=l.ifd;if(u){if(s["a"].ifdTags.forEach((r,n)=>{u.has(n)&&(c=u.get(n),c.data=x(e,t,c.valueOffset-o,o,r).ifd)}),u.has("GEOKEYDIRECTORY")){c=u.get("GEOKEYDIRECTORY");const r=c.values;if(r&&r.length>4){const n=r[0]+"."+r[1]+"."+r[2];c.data=x(e,t,c.valueOffset+6-o,o,s["a"].GEO_KEYS,2).ifd,c.data&&c.data.set("GEOTIFFVersion",{id:0,type:2,valueCount:1,valueOffset:null,values:[n]})}}if(u.has("XMP")){c=u.get("XMP");const e=c.values;"number"==typeof e[0]&&7===c.type&&(c.values=[Object(n["a"])(new Uint8Array(e))])}}return l}function L(e){const{width:t,height:r,tileHeight:n,tileWidth:o}=e,i=e.planes,a=o?o*n:t*r,s=w(e.ifds[0],"BITSPERSAMPLE");let l="";return a*i>2**30/(s>8?s/8:1)&&(l=o?"tiled tiff exceeding 1 gigabits per tile is not supported":"scanline tiff exceeding 1 gigabits is not supported"),l}async function B(e,t){var r;const{headerInfo:n,ifd:o,offsets:i,sizes:a}=t,s=[];for(let p=0;p<i.length;p++){const t=await v(e,n.littleEndian,o,i[p],a[p]||e.byteLength);s.push(t)}const l=M(o,n),{pixelType:c,planes:u}=n,h=p(c),f=w(o,"TILEWIDTH"),d=w(o,"TILELENGTH"),m=null!=(r=w(o,"COMPRESSION"))?r:1,g=f*d;let y;const b=[];let x=s[0];const C=34887===m;for(let p=0;p<u;p++){if(y=new h(g),l&&C){x=s[p];for(let e=0;e<g;e++)y[e]=x[p][e+p]}else if(l||C&&!l)y=x.slice(g*p,g*(p+1));else for(let e=0;e<g;e++)y[e]=x[e*u+p];b.push(y)}const k=n.noData?n.noData[0]:null,T=n.metadata?n.metadata.statistics:null,O=T?T.map(e=>e.min):null,A=T?T.map(e=>e.max):null;let I,P;if(null!=k)if(I=new Uint8Array(g),Math.abs(k)>1e24)for(P=0;P<g;P++)Math.abs((b[0][P]-k)/k)<1e-6?I[P]=0:I[P]=1;else for(P=0;P<g;P++)b[0][P]===k?I[P]=0:I[P]=1;else O&&A&&t.applyMinMaxConstraint&&(I=S(b,O,A));return{pixelType:c,width:f,height:d,pixels:b,mask:I,noDataValue:k}}async function G(e,t=0,r){r=r||P(e);const{ifds:n,noData:o}=r;if(0===n.length)throw"no valid image file directory";const i=L(r);if(i)throw i;let a,s;const l=-1===t?n[n.length-1]:n[t],c=o?o[0]:null;if(s=r.tileWidth?await k(e,r,l):await T(e,r,l),null!==c){if(s.mask=new Uint8Array(s.width*s.height),Math.abs(c)>1e24)for(a=0;a<s.width*s.height;a++)Math.abs((s.pixels[0][a]-c)/c)<1e-6?s.mask[a]=0:s.mask[a]=1;else for(a=0;a<s.width*s.height;a++)s.pixels[0][a]===c?s.mask[a]=0:s.mask[a]=1;s.noDataValue=c}return s}},7220:function(e,t,r){"use strict";r.d(t,"a",(function(){return T}));var n=r("a4ee"),o=r("d329"),i=r("6a0ed"),a=r("e92d"),s=r("b2b2"),l=r("59b2"),c=(r("b50f"),r("c120"),r("cea0"),r("d386")),u=r("a4f3"),h=r("9dee"),f=r("3e27");function d(e){let{altitude:t,azimuth:r}=e;const{hillshadeType:n,pixelSizePower:o,pixelSizeFactor:i,scalingType:a,isGCS:s,resolution:l}=e,c="multi-directional"===n?2*e.zFactor:e.zFactor,{x:u,y:h}=l;let f=c/(8*u),d=c/(8*h);if(s&&c>.001&&(f/=111e3,d/=111e3),"adjusted"===a)if(s){const e=111e3*u,t=111e3*h;f=(c+e**o*i)/(8*e),d=(c+t**o*i)/(8*t)}else f=(c+u**o*i)/(8*u),d=(c+h**o*i)/(8*h);let p=(90-t)*Math.PI/180,m=Math.cos(p),g=(360-r+90)*Math.PI/180,y=Math.sin(p)*Math.cos(g),b=Math.sin(p)*Math.sin(g);const w=[315,270,225,360,180,0],x=[60,60,60,60,60,90],C=new Float32Array([3,5,3,2,1,4]),v=C.reduce((e,t)=>e+t),k=C.map(e=>e/v),T="multi-directional"===n?w.length:1,S=new Float32Array(6),O=new Float32Array(6),A=new Float32Array(6);if("multi-directional"===n)for(let I=0;I<T;I++)t=x[I],r=w[I],p=(90-t)*Math.PI/180,m=Math.cos(p),g=(360-r+90)*Math.PI/180,y=Math.sin(p)*Math.cos(g),b=Math.sin(p)*Math.sin(g),S[I]=m,O[I]=y,A[I]=b;else S.fill(m),O.fill(y),A.fill(b);return{resolution:l,factor:[f,d],sinZcosA:y,sinZsinA:b,cosZ:m,sinZcosAs:O,sinZsinAs:A,cosZs:S,weights:k,hillshadeType:["traditional","multi-directional"].indexOf(n)}}function p(e,t){if(!Object(h["j"])(e))return e;const{width:r,height:n,mask:o}=e,i=new Uint8Array(r*n);o&&i.set(o);const{factor:a,sinZcosA:s,sinZsinA:l,cosZ:c,sinZcosAs:u,sinZsinAs:p,cosZs:m,weights:g}=d(t),[y,b]=a,{hillshadeType:w}=t,x=e.pixels[0],C=new Uint8Array(r*n);let v,k,T,S,O,A,I,M;const P=1;for(let h=P;h<n-P;h++){const e=h*r;for(let t=P;t<r-P;t++){if(o&&!o[e+t]){C[e+t]=0;continue}let n=8;if(o&&(n=o[e-r+t-1]+o[e-r+t]+o[e-r+t+1]+o[e+t-1]+o[e+t+1]+o[e+r+t-1]+o[e+r+t]+o[e+r+t+1],n<7)){C[e+t]=0,i[e+t]=0;continue}7===n?(v=o[e-r+t-1]?x[e-r+t-1]:x[e+t],k=o[e-r+t]?x[e-r+t]:x[e+t],T=o[e-r+t+1]?x[e-r+t+1]:x[e+t],S=o[e+t-1]?x[e+t-1]:x[e+t],O=o[e+t+1]?x[e+t+1]:x[e+t],A=o[e+r+t-1]?x[e+r+t-1]:x[e+t],I=o[e+r+t]?x[e+r+t]:x[e+t],M=o[e+r+t+1]?x[e+r+t+1]:x[e+t]):(v=x[e-r+t-1],k=x[e-r+t],T=x[e-r+t+1],S=x[e+t-1],O=x[e+t+1],A=x[e+r+t-1],I=x[e+r+t],M=x[e+r+t+1]);const a=(T+O+O+M-(v+S+S+A))*y,h=(A+I+I+M-(v+k+k+T))*b,f=Math.sqrt(1+a*a+h*h);let d=0;if("traditional"===w){let e=255*(c+l*h-s*a)/f;e<0&&(e=0),d=e}else{const e=p.length;for(let t=0;t<e;t++){let e=255*(m[t]+p[t]*h-u[t]*a)/f;e<0&&(e=0),d+=e*g[t]}}C[e+t]=255&d}}for(let h=0;h<n;h++)C[h*r]=C[h*r+1],C[(h+1)*r-1]=C[(h+1)*r-2];for(let h=1;h<r-1;h++)C[h]=C[h+r],C[h+(n-1)*r]=C[h+(n-2)*r];return new f["a"]({width:r,height:n,pixels:[C],mask:o?i:null,pixelType:"u8",validPixelCount:e.validPixelCount,statistics:[{minValue:0,maxValue:255}]})}function m(e,t,r,n){if(!Object(h["j"])(e)||!Object(h["j"])(t))return;const{min:o,max:i}=n,a=e.pixels[0],{pixels:s,mask:l}=t,c=s[0],u=255.00001/(i-o),f=new Uint8ClampedArray(c.length),d=new Uint8ClampedArray(c.length),p=new Uint8ClampedArray(c.length),m=r.length-1;for(let h=0;h<c.length;h++){if(l&&0===l[h])continue;const e=Math.floor((c[h]-o)*u),[t,n]=r[e<0?0:e>m?m:e],i=a[h],s=i*n,g=s*(1-Math.abs(t%2-1)),y=i-s;switch(Math.floor(t)){case 0:f[h]=s+y,d[h]=g+y,p[h]=y;break;case 1:f[h]=g+y,d[h]=s+y,p[h]=y;break;case 2:f[h]=y,d[h]=s+y,p[h]=g+y;break;case 3:f[h]=y,d[h]=g+y,p[h]=s+y;break;case 4:f[h]=g+y,d[h]=y,p[h]=s+y;break;case 5:case 6:f[h]=s+y,d[h]=y,p[h]=g+y}}e.pixels=[f,d,p],e.updateStatistics()}var g=r("7c6e");const y=a["a"].getLogger("esri.renderers.support.RasterSymbolizer");function b(e,t){const{attributeTable:r,bandCount:n}=e;return!(!Object(s["k"])(r)||n>1)&&(!t||null!=r.fields.find(e=>e.name.toLowerCase()===t.toLowerCase()))}function w(e){return"elevation"===e.dataType}function x(e){const{bandCount:t,colormap:r}=e;return Object(s["k"])(r)&&r.length&&1===t}const C={u1:[0,1],u2:[0,3],u4:[0,15],u8:[0,255],s8:[-128,127],u16:[0,65535],s16:[-32768,32767],u32:[0,4294967295],s32:[-2147483648,2147483647],f32:[-34e38,34e38],f64:[-Number.MAX_VALUE,Number.MAX_VALUE]};let v=class extends i["a"]{constructor(e){super(e)}bind(){const{rendererJSON:e}=this;if(!e)return{success:!1};let t;switch(this.lookup={rendererJSON:{}},e.type){case"uniqueValue":t=this._updateUVRenderer(e);break;case"rasterColormap":t=this._updateColormapRenderer(e);break;case"rasterStretch":t=this._updateStretchRenderer(e);break;case"classBreaks":t=this._updateClassBreaksRenderer(e);break;case"rasterShadedRelief":t=this._updateShadedReliefRenderer(e);break;case"vectorField":t=this._updateVectorFieldRenderer();break;case"flowRenderer":t=this._updateFlowRenderer()}return t}symbolize(e){let t=e&&e.pixelBlock;if(!k(t))return t;if(e.simpleStretchParams&&"rasterStretch"===this.rendererJSON.type)return this.simpleStretch(t,e.simpleStretchParams);try{let r;switch(t.pixels.length>3&&(t=Object(h["h"])(t,[0,1,2])),this.rendererJSON.type){case"uniqueValue":case"rasterColormap":r=this._symbolizeColormap(t);break;case"classBreaks":r=this._symbolizeClassBreaks(t);break;case"rasterStretch":r=this._symbolizeStretch(t,e.bandIds);break;case"rasterShadedRelief":{const{extent:n}=e,o=n.spatialReference.isGeographic,i={x:(n.xmax-n.xmin)/t.width,y:(n.ymax-n.ymin)/t.height};r=this._symbolizeShadedRelief(t,{isGCS:o,resolution:i});break}}return r}catch(r){return y.error("symbolize",r.message),t}}simpleStretch(e,t){if(!k(e))return e;try{return e.pixels.length>3&&(e=Object(h["h"])(e,[0,1,2])),Object(h["q"])(e,t)}catch(r){return y.error("symbolize",r.message),e}}generateWebGLParameters(e){if(["uniqueValue","rasterColormap","classBreaks"].indexOf(this.rendererJSON.type)>-1){var t;const{indexedColormap:e,offset:r}=(null==(t=this.lookup)?void 0:t.colormapLut)||{};return{colormap:e,colormapOffset:r,type:"lut"}}const{pixelBlock:r,isGCS:n,resolution:o,bandIds:i}=e,{rendererJSON:a}=this;return"rasterStretch"===a.type?this._generateStretchWebGLParams(r,a,i):"rasterShadedRelief"===a.type?this._generateShadedReliefWebGLParams(a,n,o):"vectorField"===a.type?this._generateVectorFieldWebGLParams(a):null}_isLUTChanged(e){if(!this.lookup||!this.lookup.rendererJSON)return!0;if("colorRamp"in this.rendererJSON){const t=this.rendererJSON.colorRamp;return e?JSON.stringify(t)!==JSON.stringify(this.lookup.rendererJSON.colorRamp):(this.rendererJSON,this.lookup.rendererJSON,JSON.stringify(this.rendererJSON)!==JSON.stringify(this.lookup.rendererJSON))}return JSON.stringify(this.rendererJSON)!==JSON.stringify(this.lookup.rendererJSON)}_symbolizeColormap(e){return this._isLUTChanged()&&!this.bind().success?e:Object(h["b"])(e,this.lookup.colormapLut)}_symbolizeClassBreaks(e){const t=this.rasterInfo.pixelType,r=["u8","u16","s8","s16"].indexOf(t)>-1;return this._isLUTChanged()&&!this.bind().success?e:r?Object(h["b"])(e,this.lookup.colormapLut):Object(h["n"])(e,this.lookup.remapLut)}_symbolizeStretch(e,t){const{pixelType:r,bandCount:n}=this.rasterInfo,o=this.rendererJSON,i=["u8","u16","s8","s16"].indexOf(r)>-1;let a,l;const{dra:c}=o,u=o.useGamma?o.gamma:null;if("histogramEqualization"===o.stretchType){const r=c?null:this.lookup.histogramLut,n=this._getStretchCutoff(o,e,t,!r),i=Object(h["q"])(e,{...n,gamma:u});l=Object(h["k"])(i,{lut:c?n.histogramLut:r,offset:0})}else if(i){var f,d;if(c){const n=this._getStretchCutoff(o,e,t);a=Object(h["e"])({pixelType:r,...n,gamma:u})}else if(this._isLUTChanged()){if(!this.bind().success)return e;a=this.lookup?this.lookup.stretchLut:null}else a=this.lookup?this.lookup.stretchLut:null;if(!a)return e;n>1&&(null==t?void 0:t.length)===(null==(f=Object(s["t"])(e))?void 0:f.pixels.length)&&(null==(d=a)?void 0:d.lut.length)===n&&(a={lut:t.map(e=>a.lut[e]),offset:a.offset}),l=Object(h["k"])(e,a)}else{const r=this._getStretchCutoff(o,e,t);l=Object(h["q"])(e,{...r,gamma:u})}if(o.colorRamp){if(this._isLUTChanged(!0)&&!this.bind().success)return e;l=Object(h["b"])(l,this.lookup.colormapLut)}return l}_symbolizeShadedRelief(e,t){var r,n;const o=this.rendererJSON,i={...o,...t},a=p(e,i);if(!o.colorRamp)return a;let l;if(this._isLUTChanged(!0)){if(!this.bind().success)return a;l=this.lookup?this.lookup.hsvMap:null}else l=this.lookup?this.lookup.hsvMap:null;if(!l)return a;const c=null!=(r=null==(n=Object(s["t"])(this.rasterInfo.statistics))?void 0:n[0])?r:{min:0,max:8e3};return m(a,e,l,c),a}_isVectorFieldData(){const{bandCount:e,dataType:t}=this.rasterInfo;return 2===e&&("vector-magdir"===t||"vector-uv"===t)}_updateVectorFieldRenderer(){return this._isVectorFieldData()?{success:!0}:{success:!1,error:`Unsupported data type "${this.rasterInfo.dataType}"; VectorFieldRenderer only supports "vector-magdir" and "vector-uv".`}}_updateFlowRenderer(){return this._isVectorFieldData()?{success:!0}:{success:!1,error:`Unsupported data type "${this.rasterInfo.dataType}"; FlowRenderer only supports "vector-magdir" and "vector-uv".`}}_updateUVRenderer(e){const{bandCount:t,attributeTable:r,pixelType:n}=this.rasterInfo,o=e.field1;if(!o)return{success:!1,error:"Unsupported renderer; missing UniqueValueRenderer.field."};const i=e.defaultSymbol,a=1===t&&["u8","s8"].includes(n);if(!b(this.rasterInfo,o)&&!a)return{success:!1,error:"Unsupported data; UniqueValueRenderer is only supported on single band data with a valid raster attribute table."};const s=[];if(r){const t=r.fields.find(e=>"value"===e.name.toLowerCase());if(!t)return{success:!1,error:"Unsupported data; the data's raster attribute table does not have a value field."};r.features.forEach(r=>{var n;const a=e.uniqueValueInfos.find(e=>String(e.value)===String(r.attributes[o])),l=null==a||null==(n=a.symbol)?void 0:n.color;l?s.push([r.attributes[t.name]].concat(l)):i&&s.push([r.attributes[t.name]].concat(i.color))})}else{if("value"!==o.toLowerCase())return{success:!1,error:'Unsupported renderer; UniqueValueRenderer.field must be "Value" when raster attribute table is not availalbe.'};e.uniqueValueInfos.forEach(e=>{var t;const r=null==e||null==(t=e.symbol)?void 0:t.color;r?s.push([parseInt(""+e.value,10)].concat(r)):i&&s.push([parseInt(""+e.value,10)].concat(i.color))})}if(0===s.length)return{success:!1,error:"Invalid UniqueValueRenderer. Cannot find matching records in the raster attribute table."};const l=Object(h["c"])({colormap:s});return this.lookup={rendererJSON:e,colormapLut:l},this.canRenderInWebGL=!0,{success:!0}}_updateColormapRenderer(e){if(!x(this.rasterInfo))return{success:!1,error:"Unsupported data; the data source does not have a colormap."};const t=e.colormapInfos.map(e=>[e.value].concat(e.color)).sort((e,t)=>e[0]-t[0]);if(!t||0===t.length)return{success:!1,error:"Unsupported renderer; ColormapRenderer must have meaningful colormapInfos."};const r=Object(h["c"])({colormap:t});return this.lookup={rendererJSON:e,colormapLut:r},this.canRenderInWebGL=!0,{success:!0}}_updateShadedReliefRenderer(e){if(!w(this.rasterInfo))return{success:!1,error:`Unsupported data type "${this.rasterInfo.dataType}"; ShadedReliefRenderer only supports "elevation".`};if(e.colorRamp){const t=Object(g["b"])(e.colorRamp,256,!0),r=Object(h["c"])({colormap:t}),n=[],i=r.indexedColormap;for(let e=0;e<i.length;e+=4){const t=Object(o["a"])({r:i[e],g:i[e+1],b:i[e+2]});n.push([t.h/60,t.s/100,255*t.v/100])}this.lookup={rendererJSON:e,colormapLut:r,hsvMap:n}}else this.lookup=null;return this.canRenderInWebGL=!0,{success:!0}}_updateClassBreaksRenderer(e){const t=this.rasterInfo.pixelType,r=["u8","u16","s8","s16"].indexOf(t)>-1,n=e.classBreakInfos;if(null==n||!n.length)return{success:!1,error:"Unsupported renderer; missing or invalid ClassBreaksRenderer.classBreakInfos."};const o=n.sort((e,t)=>e.classMaxValue-t.classMaxValue),i=o[o.length-1];let a=e.minValue;if(!r){const t=[];for(let e=0;e<o.length;e++){var s;t.push({value:null!=(s=o[e].classMinValue)?s:a,mappedColor:o[e].symbol.color}),a=o[e].classMaxValue}return t.push({value:i.classMaxValue,mappedColor:i.symbol.color}),this.lookup={rendererJSON:e,remapLut:t},this.canRenderInWebGL=!1,{success:!0}}const l=[];a=Math.floor(e.minValue);for(let u=0;u<o.length;u++){const e=o[u];for(let t=a;t<e.classMaxValue;t++)l.push([t].concat(e.symbol.color));a=Math.ceil(e.classMaxValue)}i.classMaxValue===a&&l.push([i.classMaxValue].concat(i.symbol.color));const c=Object(h["c"])({colormap:l,fillUnspecified:!1});return this.lookup={rendererJSON:e,colormapLut:c},this.canRenderInWebGL=!0,{success:!0}}_isHistogramRequired(e){return"percentClip"===e||"histogramEqualization"===e}_isValidRasterStatistics(e){return Object(s["k"])(e)&&e.length>0&&null!=e[0].min&&null!=e[0].max}_updateStretchRenderer(e){var t;let{stretchType:r,dra:n}=e;if(!("none"===r||null!=(t=e.statistics)&&t.length||this._isValidRasterStatistics(this.rasterInfo.statistics)||n))return{success:!1,error:"Unsupported renderer; StretchRenderer.statistics is required when dynamic range adjustment is not used."};const o=Object(s["t"])(e.histograms||this.rasterInfo.histograms);!this._isHistogramRequired(e.stretchType)||null!=o&&o.length||n||(r="minMax");const{gamma:i,useGamma:a,colorRamp:l}=e,c=this.rasterInfo.pixelType,u=!n&&["u8","u16","s8","s16"].indexOf(c)>-1;if("histogramEqualization"===r){const t=o.map(e=>Object(h["d"])(e));this.lookup={rendererJSON:e,histogramLut:t}}else if(u){const t=this._getStretchCutoff(e),r=Object(h["e"])({pixelType:c,...t,gamma:a?i:null});this.lookup={rendererJSON:e,stretchLut:r}}if(l){const t=Object(g["b"])(l,256,!0);this.lookup||(this.lookup={rendererJSON:e}),this.lookup.colormapLut=Object(h["c"])({colormap:t}),this.lookup.rendererJSON=e}return this.canRenderInWebGL=!0,{success:!0}}_getStretchCutoff(e,t=null,r,n){var o,i,a;let l,c,u=e.stretchType;var f;if(e.dra)if("minMax"===u&&Object(s["k"])(t)&&t.statistics)l=t.statistics.map(e=>[e.minValue,e.maxValue,0,0]);else{const e=Object(h["g"])(t);l=Object(s["k"])(e)?e.statistics:null,c=Object(s["k"])(e)?e.histograms:null}else l=(null==(f=e.statistics)?void 0:f.length)>0?e.statistics:Object(s["t"])(this.rasterInfo.statistics),c=e.histograms||Object(s["t"])(this.rasterInfo.histograms);!this._isHistogramRequired(u)||null!=(o=c)&&o.length||(u="minMax");const d=(null==(i=l)?void 0:i.length)||(null==(a=c)?void 0:a.length)||this.rasterInfo.bandCount,p=[],m=[];let g,y,b,w,x,v,k,T,S,O,A,I;switch(l&&!Array.isArray(l[0])&&(l=l.map(e=>[e.min,e.max,e.avg,e.stddev])),u){case"none":{const e=C[this.rasterInfo.pixelType]||C.f32;for(T=0;T<d;T++)p[T]=e[0],m[T]=e[1]}break;case"minMax":for(T=0;T<d;T++)p[T]=l[T][0],m[T]=l[T][1];break;case"standardDeviation":for(T=0;T<d;T++)p[T]=l[T][2]-e.numberOfStandardDeviations*l[T][3],m[T]=l[T][2]+e.numberOfStandardDeviations*l[T][3],p[T]<l[T][0]&&(p[T]=l[T][0]),m[T]>l[T][1]&&(m[T]=l[T][1]);break;case"histogramEqualization":for(T=0;T<d;T++)p[T]=c[T].min,m[T]=c[T].max;break;case"percentClip":for(T=0;T<c.length;T++){for(g=c[T],x=new Uint32Array(g.size),w=[...g.counts],w.length>=20&&(w[0]=w[1]=w[2]=w[w.length-1]=w[w.length-2]=0),b=0,y=(g.max-g.min)/g.size,k=-.5===g.min&&1===y?.5:0,S=0;S<g.size;S++)b+=w[S],x[S]=b;for(v=(e.minPercent||0)*b/100,S=0;S<g.size;S++)if(x[S]>v){p[T]=g.min+y*(S+k);break}for(v=(1-(e.maxPercent||0)/100)*b,S=g.size-2;S>=0;S--)if(x[S]<v){m[T]=g.min+y*(S+2-k);break}}break;default:for(T=0;T<d;T++)p[T]=l[T][0],m[T]=l[T][1]}"histogramEqualization"===u?(A=c[0].size||256,O=0,n&&(I=c.map(e=>Object(h["d"])(e)))):(A=e.max||255,O=e.min||0);const M={minCutOff:p,maxCutOff:m,outMax:A,outMin:O,histogramLut:I};return this._getSelectedBandCutoffs(M,r)}_getSelectedBandCutoffs(e,t){if(null==t||0===t.length)return e;const r=Math.max.apply(null,t),{minCutOff:n,maxCutOff:o,outMin:i,outMax:a,histogramLut:s}=e;return n.length===t.length||n.length<=r?e:{minCutOff:t.map(e=>n[e]),maxCutOff:t.map(e=>o[e]),histogramLut:s?t.map(e=>s[e]):null,outMin:i,outMax:a}}_generateStretchWebGLParams(e,t,r){let n=null,o=null;const i=this.lookup&&this.lookup.colormapLut;t.colorRamp&&i&&(n=i.indexedColormap,o=i.offset),"histogramEqualization"===t.stretchType&&(t={...t,stretchType:"minMax"});const{gamma:a}=t,l=!!(t.useGamma&&a&&a.some(e=>1!==e)),{minCutOff:c,maxCutOff:u,outMin:h,outMax:f}=this._getStretchCutoff(t,e,r);let d=0;Object(s["k"])(e)&&(d=e.getPlaneCount(),2===d&&((e=e.clone()).statistics=[e.statistics[0]],e.pixels=[e.pixels[0]]));const p=Math.min(3,(null==r?void 0:r.length)||d||this.rasterInfo.bandCount),m=new Float32Array(p),g=n||l?1:255;let y;for(y=0;y<p;y++)m[y]=(f-h)/(u[y]-c[y])/g;const b=new Float32Array(p);if(l)for(y=0;y<p;y++)a[y]>1?a[y]>2?b[y]=6.5+(a[y]-2)**2.5:b[y]=6.5+100*(2-a[y])**4:b[y]=1;return{bandCount:p,outMin:h/g,outMax:f/g,minCutOff:c,maxCutOff:u,factor:m,useGamma:l,gamma:l?a:[1,1,1],gammaCorrection:l?b:[1,1,1],colormap:n,colormapOffset:o,stretchType:t.stretchType,type:"stretch"}}_generateShadedReliefWebGLParams(e,t,r){var n,o,i;let a=null,l=null;const c=this.lookup&&this.lookup.colormapLut;e.colorRamp&&c&&(a=c.indexedColormap,l=c.offset);const u={...e,isGCS:t,resolution:r},h=d(u),f=null==(n=Object(s["t"])(this.rasterInfo.statistics))?void 0:n[0];return{...h,minValue:null!=(o=null==f?void 0:f.min)?o:0,maxValue:null!=(i=null==f?void 0:f.max)?i:8e3,hillshadeType:"traditional"===e.hillshadeType?0:1,type:"hillshade",colormap:a,colormapOffset:l}}_generateVectorFieldWebGLParams(e){var t,r,n,o,i,a,l,c;const{style:u,inputUnit:h,outputUnit:f,visualVariables:d,symbolTileSize:p,flowRepresentation:m}=e;let g;const y=null!=(t=null==(r=this.rasterInfo.statistics)?void 0:r[0].min)?t:0,b=null!=(n=null==(o=this.rasterInfo.statistics)?void 0:o[0].max)?n:50,w=null!=(i=null==d?void 0:d.find(e=>"sizeInfo"===e.type))?i:{type:"sizeInfo",field:"Magnitude",maxDataValue:b,maxSize:.8*p,minDataValue:y,minSize:.2*p},x=null!=(a=w.minDataValue)?a:y,C=null!=(l=w.maxDataValue)?l:b,v=Object(s["k"])(w.maxSize)&&Object(s["k"])(w.minSize)?[w.minSize/p,w.maxSize/p]:[.2,.8];if("wind_speed"===u){const e=(v[0]+v[1])/2;v[0]=v[1]=e}const k=Object(s["k"])(x)&&Object(s["k"])(C)?[x,C]:null;if("classified_arrow"===u)if(Object(s["k"])(x)&&Object(s["k"])(C)&&Object(s["k"])(w)){g=[];const e=(w.maxDataValue-w.minDataValue)/5;for(let t=0;t<6;t++)g.push(w.minDataValue+e*t)}else g=[0,1e-6,3.5,7,10.5,14];const T="flow_to"===m===("ocean_current_kn"===u||"ocean_current_m"===u)?0:Math.PI,S=null==d?void 0:d.find(e=>"rotationInfo"===e.type);return{breakValues:g,dataRange:k,inputUnit:h,outputUnit:f,symbolTileSize:p,symbolPercentRange:v,style:u||"single_arrow",rotation:T,rotationType:(null==(c=this.rasterInfo.storageInfo)?void 0:c.tileInfo)&&"vector-uv"===this.rasterInfo.dataType?"geographic":(null==S?void 0:S.rotationType)||e.rotationType,type:"vectorField"}}};function k(e){return Object(h["j"])(e)&&0!==e.validPixelCount}Object(n["a"])([Object(l["b"])({json:{write:!0}})],v.prototype,"rendererJSON",void 0),Object(n["a"])([Object(l["b"])({type:u["a"],json:{write:!0}})],v.prototype,"rasterInfo",void 0),Object(n["a"])([Object(l["b"])({json:{write:!0}})],v.prototype,"lookup",void 0),Object(n["a"])([Object(l["b"])()],v.prototype,"canRenderInWebGL",void 0),v=Object(n["a"])([Object(c["a"])("esri.renderers.support.RasterSymbolizer")],v);const T=v},"742a":function(e,t,r){"use strict";function n(e,t){let r=0,n="",o=0,i=0;const a=e.length;for(;r<a;)i=e[r++],o=i>>4,o<8?o=1:15===o?(o=4,i=(7&i)<<18|(63&e[r++])<<12|(63&e[r++])<<6|63&e[r++]):14===o?(o=3,i=(15&i)<<12|(63&e[r++])<<6|63&e[r++]):(o=2,i=(31&i)<<6|63&e[r++]),(0!==i||t)&&(n+=String.fromCharCode(i));return n}r.d(t,"a",(function(){return n}))},7754:function(e,t,r){"use strict";r.d(t,"a",(function(){return f})),r.d(t,"b",(function(){return s}));var n=r("b2cd");const o=[{pixelType:"S8",size:1,ctor:Int8Array,range:[-128,128]},{pixelType:"U8",size:1,ctor:Uint8Array,range:[0,255]},{pixelType:"S16",size:2,ctor:Int16Array,range:[-32768,32767]},{pixelType:"U16",size:2,ctor:Uint16Array,range:[0,65536]},{pixelType:"S32",size:4,ctor:Int32Array,range:[-2147483648,2147483647]},{pixelType:"U32",size:4,ctor:Uint32Array,range:[0,4294967296]},{pixelType:"F32",size:4,ctor:Float32Array,range:[-34027999387901484e22,34027999387901484e22]},{pixelType:"F64",size:8,ctor:Float64Array,range:[-17976931348623157e292,17976931348623157e292]}];let i=null,a=!1;function s(){return i||(i=r.e("chunk-0744fcd6").then(r.bind(null,"5494")).then(e=>e.l).then(({default:e})=>e({locateFile:e=>Object(n["b"])("esri/layers/support/rasterFormats/"+e)})).then(e=>{u(e),a=!0}),i)}const l={getBlobInfo:null,decode:null};function c(e){return 16+(e>>3<<3)}function u(e){const{_malloc:t,_free:r,_lerc_getBlobInfo:n,_lerc_getDataRanges:i,_lerc_decode_4D:a,asm:s}=e;let u;const h=Object.values(s).find(t=>t&&"buffer"in t&&t.buffer===e.HEAPU8.buffer),f=e=>{const r=e.map(e=>c(e)),n=r.reduce((e,t)=>e+t),o=t(n);u=new Uint8Array(h.buffer);let i=r[0];r[0]=o;for(let t=1;t<r.length;t++){const e=r[t];r[t]=r[t-1]+i,i=e}return r};l.getBlobInfo=e=>{const t=12,o=3,a=new Uint8Array(4*t),s=new Uint8Array(8*o),[l,c,d]=f([e.length,a.length,s.length]);u.set(e,l),u.set(a,c),u.set(s,d);let p=n(l,e.length,c,d,t,o);if(p)throw r(l),"lerc-getBlobInfo: error code is "+p;u=new Uint8Array(h.buffer),a.set(u.slice(c,c+a.length)),s.set(u.slice(d,d+s.length));const m=new Uint32Array(a.buffer),g=new Float64Array(s.buffer),[y,b,w,x,C,v,k,T,S,,O]=m,A={version:y,dimCount:w,width:x,height:C,validPixelCount:k,bandCount:v,blobSize:T,maskCount:S,dataType:b,minValue:g[0],maxValue:g[1],maxZerror:g[2],statistics:[],bandCountWithNoData:O};if(O)return A;if(1===w&&1===v)return r(l),A.statistics.push({minValue:g[0],maxValue:g[1]}),A;const I=w*v*8,M=new Uint8Array(I),P=new Uint8Array(I);let R,D=l,E=0,j=!1;if(u.byteLength<l+2*I?(r(l),j=!0,[D,E,R]=f([e.length,I,I]),u.set(e,D)):[E,R]=f([I,I]),u.set(M,E),u.set(P,R),p=i(l,e.length,w,v,E,R),p)throw r(D),j||r(E),"lerc-getDataRanges: error code is "+p;u=new Uint8Array(h.buffer),M.set(u.slice(E,E+I)),P.set(u.slice(R,R+I));const U=new Float64Array(M.buffer),L=new Float64Array(P.buffer),B=A.statistics;for(let r=0;r<v;r++)if(w>1){const e=U.slice(r*w,(r+1)*w),t=L.slice(r*w,(r+1)*w),n=Math.min.apply(null,e),o=Math.max.apply(null,t);B.push({minValue:n,maxValue:o,dimStats:{minValues:e,maxValues:t}})}else B.push({minValue:U[r],maxValue:L[r]});return r(D),j||r(E),A},l.decode=(e,t)=>{const{maskCount:n,dimCount:i,bandCount:s,width:l,height:c,dataType:d,bandCountWithNoData:p}=t,m=o[d],g=l*c,y=new Uint8Array(g*s),b=g*i*s*m.size,w=new Uint8Array(b),x=new Uint8Array(s),C=8*s,v=new Uint8Array(C),[k,T,S,O,A]=f([e.length,y.length,w.length,x.length,v.length]);u.set(e,k),u.set(y,T),u.set(w,S),u.set(x,O),u.set(v,A);const I=a(k,e.length,n,T,i,l,c,s,d,S,O,A);if(I)throw r(k),"lerc-decode: error code is "+I;u=new Uint8Array(h.buffer),w.set(u.slice(S,S+b)),y.set(u.slice(T,T+g));let M=null;if(p){x.set(u.slice(O,O+s)),v.set(u.slice(A,A+C)),M=[];for(let e=0;e<x.length;e++)M.push(x[e]?v[e]:null)}return r(k),{data:w,maskData:y,noDataValues:M}}}function h(e,t,r,n,o){if(r<2)return e;const i=new n(t*r);if(o)for(let a=0,s=0;a<t;a++)for(let n=0,o=a;n<r;n++,o+=t)i[o]=e[s++];else for(let a=0,s=0;a<t;a++)for(let n=0,o=a;n<r;n++,o+=t)i[s++]=e[o];return i}function f(e,t={}){var r;const n=null!=(r=t.inputOffset)?r:0,i=e instanceof Uint8Array?e.subarray(n):new Uint8Array(e,n),a=l.getBlobInfo(i),{data:s,maskData:c}=l.decode(i,a),{width:u,height:f,bandCount:d,dimCount:p,dataType:m,maskCount:g,statistics:y}=a,b=o[m],w=new b.ctor(s.buffer),x=[],C=[],v=u*f,k=v*p;for(let o=0;o<d;o++){const e=w.subarray(o*k,(o+1)*k);if(t.returnPixelInterleavedDims)x.push(e);else{const t=h(e,v,p,b.ctor,!0);x.push(t)}C.push(c.subarray(o*k,(o+1)*k))}const T=0===g?null:1===g?C[0]:new Uint8Array(v);if(g>1){T.set(C[0]);for(let e=1;e<C.length;e++){const t=C[e];for(let e=0;e<v;e++)T[e]=T[e]&t[e]}}const{noDataValue:S}=t,O=null!=S&&b.range[0]<=S&&b.range[1]>=S;if(g>0&&O){const{noDataValue:e}=t;for(let t=0;t<d;t++){const r=x[t],n=C[t]||T;for(let t=0;t<v;t++)0===n[t]&&(r[t]=e)}}const A=g===d&&d>1?C:null;return{width:u,height:f,bandCount:d,pixelType:t.pixelType&&0===a.version?t.pixelType:b.pixelType,dimCount:p,statistics:y,pixels:x,mask:T,bandMasks:A}}},"7c6e":function(e,t,r){"use strict";r.d(t,"a",(function(){return i})),r.d(t,"b",(function(){return h})),r.d(t,"c",(function(){return u})),r.d(t,"d",(function(){return f})),r.d(t,"e",(function(){return m}));var n=r("9ef0"),o=r("d329");const i=[{id:"aspect_predefined",type:"multipart",colorRamps:[{fromColor:[190,190,190],toColor:[255,45,8]},{fromColor:[255,45,8],toColor:[255,181,61]},{fromColor:[255,181,61],toColor:[255,254,52]},{fromColor:[255,254,52],toColor:[0,251,50]},{fromColor:[0,251,50],toColor:[255,254,52]},{fromColor:[0,253,255],toColor:[0,181,255]},{fromColor:[0,181,255],toColor:[26,35,253]},{fromColor:[26,35,253],toColor:[255,57,251]},{fromColor:[255,57,251],toColor:[255,45,8]}]},{id:"blackToWhite_predefined",fromColor:[0,0,0],toColor:[255,255,255]},{id:"blueBright_predefined",fromColor:[204,204,255],toColor:[0,0,224]},{id:"blueLightToDark_predefined",fromColor:[211,229,232],toColor:[46,100,140]},{id:"blueGreenBright_predefined",fromColor:[203,245,234],toColor:[48,207,146]},{id:"blueGreenLightToDark_predefined",fromColor:[216,242,237],toColor:[21,79,74]},{id:"brownLightToDark_predefined",fromColor:[240,236,170],toColor:[102,72,48]},{id:"brownToBlueGreenDivergingBright_predefined",type:"multipart",colorRamps:[{fromColor:[156,85,31],toColor:[255,255,191]},{fromColor:[255,255,191],toColor:[33,130,145]}]},{id:"brownToBlueGreenDivergingDark_predefined",type:"multipart",colorRamps:[{fromColor:[110,70,45],toColor:[204,204,102]},{fromColor:[204,204,102],toColor:[48,100,102]}]},{id:"coefficientBias_predefined",fromColor:[214,214,255],toColor:[0,57,148]},{id:"coldToHotDiverging_predefined",type:"multipart",colorRamps:[{fromColor:[69,117,181],toColor:[255,255,191]},{fromColor:[255,255,191],toColor:[214,47,39]}]},{id:"conditionNumber_predefined",type:"multipart",colorRamps:[{fromColor:[0,97,0],toColor:[255,255,0]},{fromColor:[255,255,0],toColor:[255,34,0]}]},{id:"cyanToPurple_predefined",type:"multipart",colorRamps:[{fromColor:[0,245,245],toColor:[0,0,245]},{fromColor:[0,0,245],toColor:[245,0,245]}]},{id:"cyanLightToBlueDark_predefined",type:"multipart",colorRamps:[{fromColor:[182,237,240],toColor:[31,131,224]},{fromColor:[31,131,224],toColor:[9,9,145]}]},{id:"distance_predefined",fromColor:[255,200,0],toColor:[0,0,255]},{id:"elevation1_predefined",type:"multipart",colorRamps:[{fromColor:[175,240,233],toColor:[255,255,179]},{fromColor:[255,255,179],toColor:[0,128,64]},{fromColor:[0,128,64],toColor:[252,186,3]},{fromColor:[252,186,3],toColor:[128,0,0]},{fromColor:[120,0,0],toColor:[105,48,13]},{fromColor:[105,48,13],toColor:[171,171,171]},{fromColor:[171,171,171],toColor:[255,252,255]}]},{id:"elevation2_predefined",type:"multipart",colorRamps:[{fromColor:[118,219,211],toColor:[255,255,199]},{fromColor:[255,255,199],toColor:[255,255,128]},{fromColor:[255,255,128],toColor:[217,194,121]},{fromColor:[217,194,121],toColor:[135,96,38]},{fromColor:[135,96,38],toColor:[150,150,181]},{fromColor:[150,150,181],toColor:[181,150,181]},{fromColor:[181,150,181],toColor:[255,252,255]}]},{id:"errors_predefined",fromColor:[255,235,214],toColor:[196,10,10]},{id:"grayLightToDark_predefined",fromColor:[219,219,219],toColor:[69,69,69]},{id:"greenBright_predefined",fromColor:[204,255,204],toColor:[14,204,14]},{id:"greenLightToDark_predefined",fromColor:[220,245,233],toColor:[34,102,51]},{id:"greenToBlue_predefined",type:"multipart",colorRamps:[{fromColor:[32,204,16],toColor:[0,242,242]},{fromColor:[0,242,242],toColor:[2,33,227]}]},{id:"orangeBright_predefined",fromColor:[255,235,204],toColor:[240,118,5]},{id:"orangeLightToDark_predefined",fromColor:[250,233,212],toColor:[171,65,36]},{id:"partialSpectrum_predefined",type:"multipart",colorRamps:[{fromColor:[242,241,162],toColor:[255,255,0]},{fromColor:[255,255,0],toColor:[255,0,0]},{fromColor:[252,3,69],toColor:[176,7,237]},{fromColor:[176,7,237],toColor:[2,29,173]}]},{id:"partialSpectrum1Diverging_predefined",type:"multipart",colorRamps:[{fromColor:[135,38,38],toColor:[240,149,12]},{fromColor:[240,149,12],toColor:[255,255,191]},{fromColor:[255,255,191],toColor:[74,80,181]},{fromColor:[74,80,181],toColor:[39,32,122]}]},{id:"partialSpectrum2Diverging_predefined",type:"multipart",colorRamps:[{fromColor:[115,77,42],toColor:[201,137,52]},{fromColor:[201,137,52],toColor:[255,255,191]},{fromColor:[255,255,191],toColor:[91,63,176]},{fromColor:[91,63,176],toColor:[81,13,97]}]},{id:"pinkToYellowGreenDivergingBright_predefined",type:"multipart",colorRamps:[{fromColor:[158,30,113],toColor:[255,255,191]},{fromColor:[255,255,191],toColor:[99,110,45]}]},{id:"pinkToYellowGreenDivergingDark_predefined",type:"multipart",colorRamps:[{fromColor:[97,47,73],toColor:[204,204,102]},{fromColor:[204,204,102],toColor:[22,59,15]}]},{id:"precipitation_predefined",type:"multipart",colorRamps:[{fromColor:[194,82,60],toColor:[237,161,19]},{fromColor:[237,161,19],toColor:[255,255,0]},{fromColor:[255,255,0],toColor:[0,219,0]},{fromColor:[0,219,0],toColor:[32,153,143]},{fromColor:[32,153,143],toColor:[11,44,122]}]},{id:"prediction_predefined",type:"multipart",colorRamps:[{fromColor:[40,146,199],toColor:[250,250,100]},{fromColor:[250,250,100],toColor:[232,16,20]}]},{id:"purpleBright_predefined",fromColor:[255,204,255],toColor:[199,0,199]},{id:"purpleToGreenDivergingBright_predefined",type:"multipart",colorRamps:[{fromColor:[77,32,150],toColor:[255,255,191]},{fromColor:[255,255,191],toColor:[20,122,11]}]},{id:"purpleToGreenDivergingDark_predefined",type:"multipart",colorRamps:[{fromColor:[67,14,89],toColor:[204,204,102]},{fromColor:[204,204,102],toColor:[24,79,15]}]},{id:"purpleBlueBright_predefined",fromColor:[223,184,230],toColor:[112,12,242]},{id:"purpleBlueLightToDark_predefined",fromColor:[229,213,242],toColor:[93,44,112]},{id:"purpleRedBright_predefined",fromColor:[255,204,225],toColor:[199,0,99]},{id:"purpleRedLightToDark_predefined",fromColor:[250,215,246],toColor:[143,17,57]},{id:"redBright_predefined",fromColor:[255,204,204],toColor:[219,0,0]},{id:"redLightToDark_predefined",fromColor:[255,224,224],toColor:[143,10,10]},{id:"redToBlueDivergingBright_predefined",type:"multipart",colorRamps:[{fromColor:[196,69,57],toColor:[255,255,191]},{fromColor:[255,255,191],toColor:[48,95,207]}]},{id:"redToBlueDivergingDark_predefined",type:"multipart",colorRamps:[{fromColor:[107,13,13],toColor:[204,204,102]},{fromColor:[204,204,102],toColor:[13,53,97]}]},{id:"redToGreen_predefined",type:"multipart",colorRamps:[{fromColor:[245,0,0],toColor:[245,245,0]},{fromColor:[245,245,0],toColor:[0,245,0]}]},{id:"redToGreenDivergingBright_predefined",type:"multipart",colorRamps:[{fromColor:[186,20,20],toColor:[255,255,191]},{fromColor:[255,255,191],toColor:[54,145,33]}]},{id:"redToGreenDivergingDark_predefined",type:"multipart",colorRamps:[{fromColor:[97,21,13],toColor:[204,204,102]},{fromColor:[204,204,102],toColor:[16,69,16]}]},{id:"slope_predefined",type:"multipart",colorRamps:[{fromColor:[56,168,0],toColor:[255,255,0]},{fromColor:[255,255,0],toColor:[255,0,0]}]},{id:"spectrumFullBright_predefined",type:"multipart",colorRamps:[{fromColor:[255,0,0],toColor:[255,255,0]},{fromColor:[255,255,0],toColor:[0,255,255]},{fromColor:[0,255,255],toColor:[0,0,255]}]},{id:"spectrumFullDark_predefined",type:"multipart",colorRamps:[{fromColor:[153,0,0],toColor:[153,153,0]},{fromColor:[153,153,0],toColor:[0,153,153]},{fromColor:[0,153,153],toColor:[0,0,153]}]},{id:"spectrumFullLight_predefined",type:"multipart",colorRamps:[{fromColor:[255,153,153],toColor:[255,255,153]},{fromColor:[255,255,153],toColor:[153,255,255]},{fromColor:[153,255,255],toColor:[153,153,255]}]},{id:"surface_predefined",type:"multipart",colorRamps:[{fromColor:[112,153,89],toColor:[242,238,162]},{fromColor:[242,238,162],toColor:[242,206,133]},{fromColor:[242,206,133],toColor:[194,140,124]},{fromColor:[194,140,124],toColor:[255,242,255]}]},{id:"temperature_predefined",type:"multipart",colorRamps:[{fromColor:[255,252,255],toColor:[255,0,255]},{fromColor:[255,0,255],toColor:[0,0,255]},{fromColor:[0,0,255],toColor:[0,255,255]},{fromColor:[0,255,255],toColor:[0,255,0]},{fromColor:[0,255,0],toColor:[255,255,0]},{fromColor:[255,255,0],toColor:[255,128,0]},{fromColor:[255,128,0],toColor:[128,0,0]}]},{id:"whiteToBlack_predefined",fromColor:[255,255,255],toColor:[0,0,0]},{id:"yellowToDarkRed_predefined",type:"multipart",colorRamps:[{fromColor:[255,255,128],toColor:[242,167,46]},{fromColor:[242,167,46],toColor:[107,0,0]}]},{id:"yellowToGreenToDarkBlue_predefined",type:"multipart",colorRamps:[{fromColor:[255,255,128],toColor:[56,224,9]},{fromColor:[56,224,9],toColor:[26,147,171]},{fromColor:[26,147,171],toColor:[12,16,120]}]},{id:"yellowToRed_predefined",fromColor:[245,245,0],toColor:[255,0,0]},{id:"yellowGreenBright_predefined",fromColor:[236,252,204],toColor:[157,204,16]},{id:"yellowGreenLightToDark_predefined",fromColor:[215,240,175],toColor:[96,107,45]}],a={aspect_predefined:"Aspect",blackToWhite_predefined:"Black to White",blueBright_predefined:"Blue Bright",blueLightToDark_predefined:"Blue Light to Dark",blueGreenBright_predefined:"Blue-Green Bright",blueGreenLightToDark_predefined:"Blue-Green Light to Dark",brownLightToDark_predefined:"Brown Light to Dark",brownToBlueGreenDivergingBright_predefined:"Brown to Blue Green Diverging, Bright",brownToBlueGreenDivergingDark_predefined:"Brown to Blue Green Diverging, Dark",coefficientBias_predefined:"Coefficient Bias",coldToHotDiverging_predefined:"Cold to Hot Diverging",conditionNumber_predefined:"Condition Number",cyanToPurple_predefined:"Cyan to Purple",cyanLightToBlueDark_predefined:"Cyan-Light to Blue-Dark",distance_predefined:"Distance",elevation1_predefined:"Elevation #1",elevation2_predefined:"Elevation #2",errors_predefined:"Errors",grayLightToDark_predefined:"Gray Light to Dark",greenBright_predefined:"Green Bright",greenLightToDark_predefined:"Green Light to Dark",greenToBlue_predefined:"Green to Blue",orangeBright_predefined:"Orange Bright",orangeLightToDark_predefined:"Orange Light to Dark",partialSpectrum_predefined:"Partial Spectrum",partialSpectrum1Diverging_predefined:"Partial Spectrum 1 Diverging",partialSpectrum2Diverging_predefined:"Partial Spectrum 2 Diverging",pinkToYellowGreenDivergingBright_predefined:"Pink to YellowGreen Diverging, Bright",pinkToYellowGreenDivergingDark_predefined:"Pink to YellowGreen Diverging, Dark",precipitation_predefined:"Precipitation",prediction_predefined:"Prediction",purpleBright_predefined:"Purple Bright",purpleToGreenDivergingBright_predefined:"Purple to Green Diverging, Bright",purpleToGreenDivergingDark_predefined:"Purple to Green Diverging, Dark",purpleBlueBright_predefined:"Purple-Blue Bright",purpleBlueLightToDark_predefined:"Purple-Blue Light to Dark",purpleRedBright_predefined:"Purple-Red Bright",purpleRedLightToDark_predefined:"Purple-Red Light to Dark",redBright_predefined:"Red Bright",redLightToDark_predefined:"Red Light to Dark",redToBlueDivergingBright_predefined:"Red to Blue Diverging, Bright",redToBlueDivergingDark_predefined:"Red to Blue Diverging, Dark",redToGreen_predefined:"Red to Green",redToGreenDivergingBright_predefined:"Red to Green Diverging, Bright",redToGreenDivergingDark_predefined:"Red to Green Diverging, Dark",slope_predefined:"Slope",spectrumFullBright_predefined:"Spectrum-Full Bright",spectrumFullDark_predefined:"Spectrum-Full Dark",spectrumFullLight_predefined:"Spectrum-Full Light",surface_predefined:"Surface",temperature_predefined:"Temperature",whiteToBlack_predefined:"White to Black",yellowToDarkRed_predefined:"Yellow to Dark Red",yellowToGreenToDarkBlue_predefined:"Yellow to Green to Dark Blue",yellowToRed_predefined:"Yellow to Red",yellowGreenBright_predefined:"Yellow-Green Bright",yellowGreenLightToDark_predefined:"Yellow-Green Light to Dark"};function s(e,t){if(!e||!t||e.length!==t.length)return!1;for(let r=0;r<e.length;r++)if(e[r]>t[r]+2||e[r]<t[r]-2)return!1;return!0}function l(e,t,r){const n=Object(o["b"])(e),i=Object(o["b"])(t),a={l:n.l*(1-r)+r*i.l,a:n.a*(1-r)+r*i.a,b:n.b*(1-r)+r*i.b};return Object(o["d"])(a)}function c(e,t){if(!e)return;const r=t||i;let o,a=null;return"algorithmic"===e.type?r.some(t=>{if(s(e.fromColor.toRgb(),t.fromColor)&&s(e.toColor.toRgb(),t.toColor))return a=t.id,!0}):"multipart"===e.type&&r.some(t=>{if(e.colorRamps&&t.colorRamps&&e.colorRamps.length===t.colorRamps.length&&(o=e.colorRamps,!t.colorRamps.some((e,t)=>{if(!s(o[t].fromColor.toRgb(),new n["a"](e.fromColor).toRgb())||!s(o[t].toColor.toRgb(),new n["a"](e.toColor).toRgb()))return!0}))){if(a)return!0;a=t.id}}),a}function u(e){const t=c(e);return t?a[t]:null}function h(e,t,r=!1){if(!e||!t||t<1)return;const n="toJSON"in e?e.toJSON():e,o="multipart"===n.type?n.colorRamps.length:1,i=[],a=[];let s,c,u,h,f,d=0;if(1===t)return s="multipart"===n.type?n.colorRamps[0].fromColor:n.fromColor,a.push([0].concat(s)),a;for(let l=0;l<o;l++)i[l]={start:null,end:null},i[l].start=d,i[l].end=d+1/o,d=i[l].end;for(let p=0;p<t;p++)h=p/(t-1),i.forEach((e,i)=>{if(h>=e.start&&(h<e.end||p===t-1&&i===o-1)){f=(h-e.start)/(e.end-e.start),"multipart"===n.type?(s=n.colorRamps[i].fromColor,c=n.colorRamps[i].toColor):(s=n.fromColor,c=n.toColor),0===p?a.push([p].concat(s.slice(0,3))):p===t-1?a.push([p].concat(c.slice(0,3))):(u=l({r:s[0],g:s[1],b:s[2]},{r:c[0],g:c[1],b:c[2]},f),a.push([p,u.r,u.g,u.b]));const o=null!=s[3]?s[3]>1?s[3]/255:s[3]:1,d=null!=c[3]?c[3]>1?c[3]/255:c[3]:1;r&&a[p].push(Math.min(255,Math.round(255*(o*(1-f)+d*f))))}});return a}function f(e){const t=u(e);if(e){if("algorithmic"===e.type)return{...d(e),Name:t};if(e.colorRamps){const r=e.colorRamps.map(d);return{type:"MultiPartColorRamp",NumColorRamps:r.length,ArrayOfColorRamp:r,Name:t}}}}function d(e){if(!e)return;const t=e.toJSON();return{Algorithm:(null==t?void 0:t.Algorithm)||"esriHSVAlgorithm",type:"AlgorithmicColorRamp",FromColor:p(e.fromColor),ToColor:p(e.toColor)}}function p(e){const t=Object(o["a"])(e);return{type:"HsvColor",Hue:t.h,Saturation:t.s,Value:t.v,AlphaValue:255}}function m(e){const t=e.reverse().map(e=>{const t=e.toString(16);return t.length<2?"0"+t:t});return 4294967295&Number.parseInt(t.join(""),16)}},"9dee":function(e,t,r){"use strict";r.d(t,"a",(function(){return D})),r.d(t,"b",(function(){return l})),r.d(t,"c",(function(){return s})),r.d(t,"d",(function(){return d})),r.d(t,"e",(function(){return h})),r.d(t,"f",(function(){return u})),r.d(t,"g",(function(){return c})),r.d(t,"h",(function(){return a})),r.d(t,"i",(function(){return R})),r.d(t,"j",(function(){return i})),r.d(t,"k",(function(){return m})),r.d(t,"l",(function(){return x})),r.d(t,"m",(function(){return b})),r.d(t,"n",(function(){return g})),r.d(t,"o",(function(){return v})),r.d(t,"p",(function(){return M})),r.d(t,"q",(function(){return p}));var n=r("b2b2"),o=r("3e27");function i(e){return Object(n["k"])(e)&&"esri.layers.support.PixelBlock"===e.declaredClass&&e.pixels&&e.pixels.length>0}function a(e,t){if(null==t||!t.length||!i(e))return e;const r=e.pixels.length;return t&&t.some(e=>e>=r)||1===r&&1===t.length&&0===t[0]?e:r!==t.length||t.some((e,t)=>e!==t)?new o["a"]({pixelType:e.pixelType,width:e.width,height:e.height,mask:e.mask,validPixelCount:e.validPixelCount,maskIsAlpha:e.maskIsAlpha,pixels:t.map(t=>e.pixels[t]),statistics:e.statistics&&t.map(t=>e.statistics[t])}):e}function s(e){if(!e)return;const t=e.colormap;if(!t||0===t.length)return;const r=t.sort((e,t)=>e[0]-t[0]);let n=0;r[0][0]<0&&(n=r[0][0]);const o=Math.max(256,r[r.length-1][0]-n+1),i=new Uint8Array(4*o),a=[];let s,l=0,c=0;const u=5===r[0].length;if(o>65536)return r.forEach(e=>{a[e[0]-n]=u?e.slice(1):e.slice(1).concat([255])}),{indexed2DColormap:a,offset:n,alphaSpecified:u};if(e.fillUnspecified)for(s=r[c],l=s[0]-n;l<o;l++)i[4*l]=s[1],i[4*l+1]=s[2],i[4*l+2]=s[3],i[4*l+3]=u?s[4]:255,l===s[0]-n&&(s=c===r.length-1?s:r[++c]);else for(l=0;l<r.length;l++)s=r[l],c=4*(s[0]-n),i[c]=s[1],i[c+1]=s[2],i[c+2]=s[3],i[c+3]=u?s[4]:255;return{indexedColormap:i,offset:n,alphaSpecified:u}}function l(e,t){if(!i(e))return e;if(!t&&(t.indexedColormap||t.indexed2DColormap))return e;const r=e.clone(),n=r.pixels;let o=r.mask;const a=r.width*r.height;if(1!==n.length)return e;const{indexedColormap:s,indexed2DColormap:l,offset:c,alphaSpecified:u}=t,h=s.length-1;let f=0;const d=n[0],p=new Uint8Array(d.length),m=new Uint8Array(d.length),g=new Uint8Array(d.length);let y,b=0;if(s)if(o)for(f=0;f<a;f++)o[f]&&(b=4*(d[f]-c),b<c||b>h?o[f]=0:(p[f]=s[b],m[f]=s[b+1],g[f]=s[b+2],o[f]=s[b+3]));else{for(o=new Uint8Array(a),f=0;f<a;f++)b=4*(d[f]-c),b<c||b>h?o[f]=0:(p[f]=s[b],m[f]=s[b+1],g[f]=s[b+2],o[f]=s[b+3]);r.mask=o}else if(o)for(f=0;f<a;f++)o[f]&&(y=l[d[f]],p[f]=y[0],m[f]=y[1],g[f]=y[2],o[f]=y[3]);else{for(o=new Uint8Array(a),f=0;f<a;f++)y=l[d[f]],p[f]=y[0],m[f]=y[1],g[f]=y[2],o[f]=y[3];r.mask=o}return r.pixels=[p,m,g],r.statistics=null,r.pixelType="u8",r.maskIsAlpha=u,r}function c(e){if(!i(e))return null;e.statistics||e.updateStatistics();const{pixels:t,mask:r,pixelType:n,statistics:o}=e,a=e.width*e.height,s=t.length;let l,c,u,h,f;const d=[],p=[];let m,g,y,b,w,x,C,v,k,T;const S=256;for(h=0;h<s;h++){if(m=new Uint32Array(S),y=t[h],"u8"===n)if(l=-.5,c=255.5,r)for(f=0;f<a;f++)r[f]&&m[y[f]]++;else for(f=0;f<a;f++)m[y[f]]++;else{if(l=o[h].minValue,c=o[h].maxValue,u=(c-l)/S,g=new Uint32Array(S+1),r)for(f=0;f<a;f++)r[f]&&g[Math.floor((y[f]-l)/u)]++;else for(f=0;f<a;f++)g[Math.floor((y[f]-l)/u)]++;for(f=0;f<255;f++)m[f]=g[f];m[255]=g[255]+g[256]}for(d.push({min:l,max:c,size:S,counts:m}),b=0,w=0,v=0,f=0;f<S;f++)b+=m[f],w+=f*m[f];for(k=w/b,f=0;f<S;f++)v+=m[f]*(f-k)**2;T=Math.sqrt(v/(b-1)),u=(c-l)/S,x=(k+.5)*u+l,C=T*u,p.push({min:l,max:c,avg:x,stddev:C})}return{statistics:p,histograms:d}}function u(e){const t=[];for(let r=0;r<e.length;r++){const{min:n,max:o,size:i,counts:a}=e[r];let s=0,l=0;for(let e=0;e<i;e++)s+=a[e],l+=e*a[e];const c=l/s;let u=0;for(let e=0;e<i;e++)u+=a[e]*(e-c)**2;const h=(o-n)/i,f=(c+.5)*h+n,d=Math.sqrt(u/(s-1))*h;t.push({min:n,max:o,avg:f,stddev:d})}return t}function h(e){const{minCutOff:t,maxCutOff:r,gamma:n,pixelType:o}=e,i=e.outMin||0,a=e.outMax||255;if(-1===["u8","u16","s8","s16"].indexOf(o))return null;const s=t.length;let l,c,u=0;"s8"===o?u=-127:"s16"===o&&(u=-32767);let h=256;["u16","s16"].indexOf(o)>-1&&(h=65536);const d=[],p=[],m=a-i;for(l=0;l<s;l++)p[l]=r[l]-t[l],d[l]=m/(r[l]-t[l]);const g=n&&n.length>=s,y=[];if(g)for(l=0;l<s;l++)n[l]>1?n[l]>2?y[l]=6.5+(n[l]-2)**2.5:y[l]=6.5+100*(2-n[l])**4:y[l]=1;let b;const w=[];let x,C,v;if(g)for(l=0;l<s;l++){for(v=[],c=0;c<h;c++)x=c+u,b=(x-t[l])/p[l],C=1,n[l]>1&&(C-=(1/m)**(b*y[l])),x<r[l]&&x>t[l]?v[c]=Math.floor(C*m*b**(1/n[l]))+i:x>=r[l]?v[c]=a:v[c]=i;w[l]=v}else for(l=0;l<s;l++){for(v=[],c=0;c<h;c++)x=c+u,x<=t[l]?v[c]=i:x>=r[l]?v[c]=a:v[c]=Math.floor((x-t[l])/p[l]*m)+i;w[l]=v}if(null!=e.contrastOffset){const t=f(e.contrastOffset,e.brightnessOffset);for(l=0;l<s;l++)for(v=w[l],c=0;c<h;c++)v[c]=t[v[c]]}return{lut:w,offset:u}}function f(e,t){const r=Math.min(Math.max(e,-100),100),n=Math.min(Math.max(t,-100),100),o=255,i=128;let a,s;const l=new Uint8Array(256);for(a=0;a<256;a++)r>0&&r<100?s=(200*a-100*o+2*o*n)/(2*(100-r))+i:r<=0&&r>-100?s=(200*a-100*o+2*o*n)*(100+r)/2e4+i:100===r?(s=200*a-100*o+(o+1)*(100-r)+2*o*n,s=s>0?o:0):-100===r&&(s=i),l[a]=s>o?o:s<0?0:s;return l}function d(e,t=256){t=Math.min(t,256);const{size:r,counts:n}=e,o=new Uint8Array(r),i=n.reduce((e,r)=>e+r/t,0);let a=0,s=0,l=0,c=i;for(let u=0;u<r;u++)if(l+=n[u],!(u<r-1&&l+n[u+1]<c)){for(;a<t-1&&c<l;)a++,c+=i;for(let e=s;e<=u;e++)o[e]=a;s=u+1}for(let u=s;u<r;u++)o[u]=t-1;return o}function p(e,t){if(!i(e))return null;const r=e.clone(),{pixels:n,mask:o}=r,{minCutOff:a,maxCutOff:s,gamma:l}=t,c=t.outMin||0,u=t.outMax||255,h=r.width*r.height,f=n.length;let d,p,m,g,y;const b=u-c,w=[],x=[];for(d=0;d<f;d++)x[d]=s[d]-a[d],w[d]=b/(s[d]-a[d]);const C=l&&l.length>=f,v=[];if(C)for(d=0;d<f;d++)l[d]>1?l[d]>2?v[d]=6.5+(l[d]-2)**2.5:v[d]=6.5+100*(2-l[d])**4:v[d]=1;if(C)if(null!=o){for(p=0;p<h;p++)if(o[p])for(d=0;d<f;d++)m=n[d][p],y=(m-a[d])/x[d],g=1,l[d]>1&&(g-=(1/b)**(y*v[d])),m<s[d]&&m>a[d]?n[d][p]=Math.floor(g*b*y**(1/l[d]))+c:m>=s[d]?n[d][p]=u:n[d][p]=c}else for(p=0;p<h;p++)for(d=0;d<f;d++)m=n[d][p],y=(m-a[d])/x[d],g=1,l[d]>1&&(g-=(1/b)**(y*v[d])),m<s[d]&&m>a[d]?n[d][p]=Math.floor(g*b*y**(1/l[d]))+c:m>=s[d]?n[d][p]=u:n[d][p]=c;else if(null!=o){for(p=0;p<h;p++)if(o[p])for(d=0;d<f;d++)m=n[d][p],m<s[d]&&m>a[d]?n[d][p]=Math.floor((m-a[d])/x[d]*b)+c:m>=s[d]?n[d][p]=u:n[d][p]=c}else for(p=0;p<h;p++)for(d=0;d<f;d++)m=n[d][p],m<s[d]&&m>a[d]?n[d][p]=Math.floor((m-a[d])/x[d]*b)+c:m>=s[d]?n[d][p]=u:n[d][p]=c;return r.pixelType="u8",r.updateStatistics(),r}function m(e,t){if(!i(e))return null;const{pixels:r,mask:n}=e,a=e.width*e.height,s=r.length;let l=t.lut;const{offset:c}=t;let u,h;l&&1===l[0].length&&(l=r.map(()=>l));const f=[];let d,p,m;if(c)if(null==n)for(u=0;u<s;u++){for(d=r[u],p=l[u],m=new Uint8Array(a),h=0;h<a;h++)m[h]=p[d[h]-c];f.push(m)}else for(u=0;u<s;u++){for(d=r[u],p=l[u],m=new Uint8Array(a),h=0;h<a;h++)n[h]&&(m[h]=p[d[h]-c]);f.push(m)}else if(null==n)for(u=0;u<s;u++){for(d=r[u],p=l[u],m=new Uint8Array(a),h=0;h<a;h++)m[h]=p[d[h]];f.push(m)}else for(u=0;u<s;u++){for(d=r[u],p=l[u],m=new Uint8Array(a),h=0;h<a;h++)n[h]&&(m[h]=p[d[h]]);f.push(m)}const g=new o["a"]({width:e.width,height:e.height,pixels:f,mask:n,pixelType:"u8"});return g.updateStatistics(),g}function g(e,t){if(!i(e))return null;const r=e.clone(),{pixels:n}=r,o=r.width*r.height,a=t.length,s=Math.floor(a/2),l=t[Math.floor(s)],c=n[0];let u,h,f,d,p,m,g=!1;const y=new Uint8Array(o),b=new Uint8Array(o),w=new Uint8Array(o);let x=r.mask;const C=4===t[0].mappedColor.length;for(x||(x=new Uint8Array(o),x.fill(C?255:1),r.mask=x),p=0;p<o;p++)if(x[p]){for(u=c[p],g=!1,m=s,h=l,f=0,d=a-1;d-f>1;){if(u===h.value){g=!0;break}u>h.value?f=m:d=m,m=Math.floor((f+d)/2),h=t[Math.floor(m)]}g||(u===t[f].value?(h=t[f],g=!0):u===t[d].value?(h=t[d],g=!0):u<t[f].value?(g=!1,h=null):u>t[f].value&&(u<t[d].value?(h=t[f],g=!0):d===a-1?(g=!1,h=null):(h=t[d],g=!0))),g?(y[p]=h.mappedColor[0],b[p]=h.mappedColor[1],w[p]=h.mappedColor[2],x[p]=h.mappedColor[3]):y[p]=b[p]=w[p]=x[p]=0}return r.pixels=[y,b,w],r.mask=x,r.pixelType="u8",r.maskIsAlpha=C,r}function y(e,t,r,n,o,i,a,s){return{xmin:o<=r*e?0:o<r*e+e?o-r*e:e,ymin:i<=n*t?0:i<n*t+t?i-n*t:t,xmax:o+a<=r*e?0:o+a<r*e+e?o+a-r*e:e,ymax:i+s<=n*t?0:i+s<n*t+t?i+s-n*t:t}}function b(e,t){if(!e||0===e.length)return null;const r=e.find(e=>e.pixelBlock);if(!r||Object(n["j"])(r.pixelBlock))return null;const o=(r.extent.xmax-r.extent.xmin)/r.pixelBlock.width,i=(r.extent.ymax-r.extent.ymin)/r.pixelBlock.height,a=.01*Math.min(o,i),s=e.sort((e,t)=>Math.abs(e.extent.ymax-t.extent.ymax)>a?t.extent.ymax-e.extent.ymax:Math.abs(e.extent.xmin-t.extent.xmin)>a?e.extent.xmin-t.extent.xmin:0),l=Math.min.apply(null,s.map(e=>e.extent.xmin)),c=Math.min.apply(null,s.map(e=>e.extent.ymin)),u=Math.max.apply(null,s.map(e=>e.extent.xmax)),h=Math.max.apply(null,s.map(e=>e.extent.ymax)),f={x:Math.round((t.xmin-l)/o),y:Math.round((h-t.ymax)/i)},d={width:Math.round((u-l)/o),height:Math.round((h-c)/i)},p={width:Math.round((t.xmax-t.xmin)/o),height:Math.round((t.ymax-t.ymin)/i)};return Math.round(d.width/r.pixelBlock.width)*Math.round(d.height/r.pixelBlock.height)!==s.length||f.x<0||f.y<0||d.width<p.width||d.height<p.height?null:{extent:t,pixelBlock:x(s.map(e=>e.pixelBlock),d,{clipOffset:f,clipSize:p})}}function w(e,t,r,n,o,i){const{width:a,height:s}=r.block,{x:l,y:c}=r.offset,{width:u,height:h}=r.mosaic,f=y(a,s,n,o,l,c,u,h);let d=0,p=0;if(i){const e=i.hasGCSSShiftTransform?360:i.halfWorldWidth,t=a*i.resolutionX,r=i.startX+n*t,o=r+t;r<e&&o>e?p=i.rightPadding:r>=e&&(d=i.leftMargin-i.rightPadding,p=0)}if(f.xmax-=p,"number"!=typeof t)for(let m=f.ymin;m<f.ymax;m++){const r=(o*s+m-c)*u+(n*a-l)+d,i=m*a;for(let n=f.xmin;n<f.xmax;n++)e[r+n]=t[i+n]}else for(let m=f.ymin;m<f.ymax;m++){const r=(o*s+m-c)*u+(n*a-l)+d;for(let n=f.xmin;n<f.xmax;n++)e[r+n]=t}}function x(e,t,r={}){const{clipOffset:a,clipSize:s,alignmentInfo:l,blockWidths:c}=r;if(c)return C(e,t,{blockWidths:c});const u=e.find(e=>i(e));if(Object(n["j"])(u))return null;const h=s?s.width:t.width,f=s?s.height:t.height,d=u.width,p=u.height,m=t.width/d,g=t.height/p,y={offset:a||{x:0,y:0},mosaic:s||t,block:{width:d,height:p}},b=u.pixelType,x=o["a"].getPixelArrayConstructor(b),v=u.pixels.length,k=[];let T,S,O;for(let n=0;n<v;n++){S=new x(h*f);for(let t=0;t<g;t++)for(let r=0;r<m;r++){const o=e[t*m+r];i(o)&&(T=o.pixels[n],w(S,T,y,r,t,l))}k.push(S)}if(e.some(e=>Object(n["j"])(e)||e.mask&&e.mask.length>0)){O=new Uint8Array(h*f);for(let t=0;t<g;t++)for(let r=0;r<m;r++){const o=e[t*m+r],i=Object(n["k"])(o)?o.mask:null;w(O,i||(o?1:0),y,r,t,l)}}const A=new o["a"]({width:h,height:f,pixels:k,pixelType:b,mask:O});return A.updateStatistics(),A}function C(e,t,r){const a=e.find(e=>Object(n["k"])(e));if(!Object(n["k"])(a))return null;const s=e.some(e=>!Object(n["k"])(e)||!!e.mask),{width:l,height:c}=t,u=s?new Uint8Array(l*c):null,{blockWidths:h}=r,f=[],d=a.getPlaneCount(),p=o["a"].getPixelArrayConstructor(a.pixelType);if(s)for(let n=0,o=0;n<e.length;o+=h[n],n++){const t=e[n];if(!i(t))continue;const r=t.mask;for(let e=0;e<c;e++)for(let i=0;i<h[n];i++)u[e*l+i+o]=null==r?255:r[e*t.width+i]}for(let n=0;n<d;n++){const t=new p(l*c);for(let r=0,o=0;r<e.length;o+=h[r],r++){const a=e[r];if(!i(a))continue;const s=a.pixels[n];if(null!=s)for(let e=0;e<c;e++)for(let n=0;n<h[r];n++)t[e*l+n+o]=s[e*a.width+n]}f.push(t)}const m=new o["a"]({width:l,height:c,mask:u,pixels:f,pixelType:a.pixelType});return m.updateStatistics(),m}function v(e,t,r){if(!i(e))return null;const{width:n,height:o}=e,a=t.x,s=t.y,l=r.width+a,c=r.height+s;if(a<0||s<0||l>n||c>o)return e;if(0===a&&0===s&&l===n&&c===o)return e;e.mask||(e.mask=new Uint8Array(n*o));const u=e.mask;for(let i=0;i<o;i++){const e=i*n;for(let t=0;t<n;t++)u[e+t]=i<s||i>=c||t<a||t>=l?0:1}return e.updateStatistics(),e}function k(e){if(!i(e))return null;const t=e.clone(),{width:r,height:n,pixels:o,mask:a}=e,s=o[0],l=t.pixels[0];for(let i=2;i<n-1;i++){const e=new Map;for(let n=i-2;n<i+2;n++)for(let t=0;t<4;t++){const o=n*r+t;O(e,s[o],a?a[o]:1)}l[i*r]=T(e),l[i*r+1]=l[i*r+2]=l[i*r];let t=3;for(;t<r-1;t++){let n=(i-2)*r+t+1;O(e,s[n],a?a[n]:1),n=(i-1)*r+t+1,O(e,s[n],a?a[n]:1),n=i*r+t+1,O(e,s[n],a?a[n]:1),n=(i+1)*r+t+1,O(e,s[n],a?a[n]:1),n=(i-2)*r+t-3,S(e,s[n],a?a[n]:1),n=(i-1)*r+t-3,S(e,s[n],a?a[n]:1),n=i*r+t-3,S(e,s[n],a?a[n]:1),n=(i+1)*r+t-3,S(e,s[n],a?a[n]:1),l[i*r+t]=T(e)}l[i*r+t+1]=l[i*r+t]}for(let i=0;i<r;i++)l[i]=l[r+i]=l[2*r+i],l[(n-1)*r+i]=l[(n-2)*r+i];return t.updateStatistics(),t}function T(e){if(0===e.size)return 0;let t=0,r=-1,n=0;const o=e.keys();let i=o.next();for(;!i.done;)n=e.get(i.value),n>t&&(r=i.value,t=n),i=o.next();return r}function S(e,t,r){if(0===r)return;const n=e.get(t);1===n?e.delete(t):e.set(t,n-1)}function O(e,t,r){0!==r&&e.set(t,e.has(t)?e.get(t)+1:1)}function A(e,t,r){let{x:n,y:a}=t;const{width:s,height:l}=r;if(0===n&&0===a&&l===e.height&&s===e.width)return e;const{width:c,height:u}=e,h=Math.max(0,a),f=Math.max(0,n),d=Math.min(n+s,c),p=Math.min(a+l,u);if(d<0||p<0||!i(e))return null;n=Math.max(0,-n),a=Math.max(0,-a);const{pixels:m,mask:g}=e,y=s*l,b=m.length,w=[];for(let i=0;i<b;i++){const t=m[i],r=o["a"].createEmptyBand(e.pixelType,y);for(let e=h;e<p;e++){const o=e*c;let i=(e+a-h)*s+n;for(let e=f;e<d;e++)r[i++]=t[o+e]}w.push(r)}const x=new Uint8Array(y);for(let o=h;o<p;o++){const e=o*c;let t=(o+a-h)*s+n;for(let r=f;r<d;r++)x[t++]=g?g[e+r]:1}const C=new o["a"]({width:r.width,height:r.height,pixelType:e.pixelType,pixels:w,mask:x});return C.updateStatistics(),C}function I(e,t=!0){if(!i(e))return null;const{pixels:r,width:n,height:a,mask:s,pixelType:l}=e,c=[],u=Math.round(n/2),h=Math.round(a/2),f=a-1,d=n-1;for(let i=0;i<r.length;i++){const e=r[i],s=o["a"].createEmptyBand(l,u*h);let p=0;for(let r=0;r<a;r+=2)for(let o=0;o<n;o+=2){const i=e[r*n+o];if(t){const t=o===d?i:e[r*n+o+1],a=r===f?i:e[r*n+o+n],l=o===d?a:r===f?t:e[r*n+o+n+1];s[p++]=(i+t+a+l)/4}else s[p++]=i}c.push(s)}let p=null;if(s){p=new Uint8Array(u*h);let e=0;for(let r=0;r<a;r+=2)for(let o=0;o<n;o+=2){const i=s[r*n+o];if(t){const t=o===d?i:s[r*n+o+1],a=r===f?i:s[r*n+o+n],l=o===d?a:r===f?t:s[r*n+o+n+1];p[e++]=i*t*a*l?1:0}else p[e++]=i}}return new o["a"]({width:u,height:h,pixelType:l,pixels:c,mask:p})}function M(e,t,r){if(!i(e))return null;const{width:n,height:o}=t;let{width:a,height:s}=e;const l=new Map,c={x:0,y:0},u=null==r?1:1+r;let h=e;for(let i=0;i<u;i++){const e=Math.ceil(a/n),r=Math.ceil(s/o);for(let a=0;a<r;a++){c.y=a*o;for(let r=0;r<e;r++){c.x=r*n;const e=A(h,c,t);l.set(`${i}/${a}/${r}`,e)}}i<u-1&&(h=I(h)),a=Math.round(a/2),s=Math.round(s/2)}return l}function P(e,t,r,n,o=.5){const{width:i,height:a}=e,{width:s,height:l}=t,c=n.cols,u=n.rows,h=Math.ceil(s/c-.1/c),f=Math.ceil(l/u-.1/u);let d,p,m,g,y,b,w;const x=h*c,C=x*f*u,v=new Float32Array(C),k=new Float32Array(C),T=new Uint32Array(C),S=new Uint32Array(C);let O,A,I=0;for(let M=0;M<f;M++)for(let e=0;e<h;e++){d=12*(M*h+e),p=r[d],m=r[d+1],g=r[d+2],y=r[d+3],b=r[d+4],w=r[d+5];for(let t=0;t<u;t++){I=(M*u+t)*x+e*c,A=(t+.5)/u;for(let e=0;e<t;e++)O=(e+.5)/c,v[I+e]=(p*O+m*A+g)*i-o,k[I+e]=(y*O+b*A+w)*a-o,T[I+e]=Math.round(v[I+e]),S[I+e]=Math.round(k[I+e])}d+=6,p=r[d],m=r[d+1],g=r[d+2],y=r[d+3],b=r[d+4],w=r[d+5];for(let t=0;t<u;t++){I=(M*u+t)*x+e*c,A=(t+.5)/u;for(let e=t;e<c;e++)O=(e+.5)/c,v[I+e]=(p*O+m*A+g)*i-o,k[I+e]=(y*O+b*A+w)*a-o,T[I+e]=Math.round(v[I+e]),S[I+e]=Math.round(k[I+e])}}return{offsets_x:v,offsets_y:k,offsets_xi:T,offsets_yi:S,gridWidth:x}}function R(e,t){const{coefficients:r,spacing:n}=t,{offsets_x:o,offsets_y:i,gridWidth:a}=P(e,e,r,{rows:n[0],cols:n[1]},.5),{width:s,height:l}=e,c=new Float32Array(s*l),u=180/Math.PI;for(let h=0;h<l;h++)for(let e=0;e<s;e++){const t=h*a+e,r=0===h?t:t-a,n=h===l-1?t:t+a,f=o[r]-o[n],d=i[n]-i[r];if(isNaN(f)||isNaN(d))c[h*s+e]=90;else{let t=Math.atan2(d,f)*u;t=(360+t)%360,c[h*s+e]=t}}return c}function D(e,t,r,n,a="nearest"){if(!i(e))return null;"majority"===a&&(e=k(e));const{pixels:s,mask:l,pixelType:c}=e,u=e.width,h=e.height,f=o["a"].getPixelArrayConstructor(c),d=s.length,{width:p,height:m}=t;let g=!1;for(let o=0;o<r.length;o+=3)-1===r[o]&&-1===r[o+1]&&-1===r[o+2]&&(g=!0);const{offsets_x:y,offsets_y:b,offsets_xi:w,offsets_yi:x,gridWidth:C}=P({width:u,height:h},t,r,n,"majority"===a?0:.5);let v;const T=(e,t,r)=>{const n=e instanceof Float32Array||e instanceof Float64Array?0:.5;for(let o=0;o<m;o++){v=o*C;for(let i=0;i<p;i++){if(y[v]<0||b[v]<0)e[o*p+i]=0;else if(r)e[o*p+i]=t[w[v]+x[v]*u];else{const r=Math.floor(y[v]),a=Math.floor(b[v]),s=Math.ceil(y[v]),c=Math.ceil(b[v]),h=y[v]-r,f=b[v]-a;if(!l||l[r+a*u]&&l[r+a*u]&&l[r+c*u]&&l[s+c*u]){const l=(1-h)*t[r+a*u]+h*t[s+a*u],d=(1-h)*t[r+c*u]+h*t[s+c*u];e[o*p+i]=(1-f)*l+f*d+n}else e[o*p+i]=t[w[v]+x[v]*u]}v++}}},S=[];let O;for(let o=0;o<d;o++)O=new f(p*m),T(O,s[o],"nearest"===a||"majority"===a),S.push(O);const A=new o["a"]({width:p,height:m,pixelType:c,pixels:S});if(l)A.mask=new Uint8Array(p*m),T(A.mask,l,!0);else if(g){A.mask=new Uint8Array(p*m);for(let e=0;e<p*m;e++)A.mask[e]=y[e]<0||b[e]<0?0:1}return A.updateStatistics(),A}},a4f3:function(e,t,r){"use strict";r.d(t,"a",(function(){return f}));var n=r("a4ee"),o=r("6a0ed"),i=r("b2b2"),a=r("59b2"),s=(r("b50f"),r("c120"),r("cea0"),r("d386")),l=r("3af1"),c=r("5996"),u=r("53d3");let h=class extends o["a"]{constructor(e){super(e),this.attributeTable=null,this.bandCount=null,this.colormap=null,this.extent=null,this.format=void 0,this.height=null,this.width=null,this.histograms=null,this.keyProperties={},this.multidimensionalInfo=null,this.noDataValue=null,this.pixelSize=null,this.pixelType=null,this.isPseudoSpatialReference=!1,this.spatialReference=null,this.statistics=null,this.storageInfo=null,this.transform=null}get dataType(){var e,t,r;const n=null!=(e=null==(t=this.keyProperties)||null==(r=t.DataType)?void 0:r.toLowerCase())?e:"generic";return"stdtime"===n?"standard-time":n}get nativeExtent(){return this._get("nativeExtent")||this.extent}set nativeExtent(e){e&&this._set("nativeExtent",e)}get nativePixelSize(){if(!Object(i["k"])(this.transform)||!this.transform.affectsPixelSize)return this.pixelSize;const e=this.nativeExtent;return{x:e.width/this.width,y:e.height/this.height}}};Object(n["a"])([Object(a["b"])({json:{write:!0}})],h.prototype,"attributeTable",void 0),Object(n["a"])([Object(a["b"])({json:{write:!0}})],h.prototype,"bandCount",void 0),Object(n["a"])([Object(a["b"])({json:{write:!0}})],h.prototype,"colormap",void 0),Object(n["a"])([Object(a["b"])({type:String,readOnly:!0})],h.prototype,"dataType",null),Object(n["a"])([Object(a["b"])({type:l["a"],json:{write:!0}})],h.prototype,"extent",void 0),Object(n["a"])([Object(a["b"])({type:l["a"],json:{write:!0}})],h.prototype,"nativeExtent",null),Object(n["a"])([Object(a["b"])({json:{write:!0}})],h.prototype,"nativePixelSize",null),Object(n["a"])([Object(a["b"])({json:{write:!0}})],h.prototype,"format",void 0),Object(n["a"])([Object(a["b"])({json:{write:!0}})],h.prototype,"height",void 0),Object(n["a"])([Object(a["b"])({json:{write:!0}})],h.prototype,"width",void 0),Object(n["a"])([Object(a["b"])({json:{write:!0}})],h.prototype,"histograms",void 0),Object(n["a"])([Object(a["b"])({json:{write:!0}})],h.prototype,"keyProperties",void 0),Object(n["a"])([Object(a["b"])({json:{write:!0}})],h.prototype,"multidimensionalInfo",void 0),Object(n["a"])([Object(a["b"])()],h.prototype,"noDataValue",void 0),Object(n["a"])([Object(a["b"])({json:{write:!0}})],h.prototype,"pixelSize",void 0),Object(n["a"])([Object(a["b"])({json:{write:!0}})],h.prototype,"pixelType",void 0),Object(n["a"])([Object(a["b"])()],h.prototype,"isPseudoSpatialReference",void 0),Object(n["a"])([Object(a["b"])({type:c["a"],json:{write:!0}})],h.prototype,"spatialReference",void 0),Object(n["a"])([Object(a["b"])({json:{write:!0}})],h.prototype,"statistics",void 0),Object(n["a"])([Object(a["b"])({type:u["a"],json:{write:!0}})],h.prototype,"storageInfo",void 0),Object(n["a"])([Object(a["b"])({json:{write:!0}})],h.prototype,"transform",void 0),h=Object(n["a"])([Object(s["a"])("esri.layers.support.RasterInfo")],h);const f=h},adb6:function(e,t,r){"use strict";function n(e,t,r,n=!0){if(t%4!=0||r%4!=0){const o=new ArrayBuffer(4*Math.ceil(r/4)),i=new Uint8Array(o),a=new Uint8Array(e,t,r);if(n)for(let e=0;e<i.length;e+=4)i[e]=a[e+3],i[e+1]=a[e+2],i[e+2]=a[e+1],i[e+3]=a[e];else i.set(a);return new Uint32Array(i.buffer)}if(n){const n=new Uint8Array(e,t,r),o=new Uint8Array(n.length);for(let e=0;e<o.length;e+=4)o[e]=n[e+3],o[e+1]=n[e+2],o[e+2]=n[e+1],o[e+3]=n[e];return new Uint32Array(o.buffer)}return new Uint32Array(e,t,r/4)}function o(){const e=[];for(let t=0;t<=257;t++)e[t]=[t];return e}function i(e,t){for(let r=0;r<t.length;r++)e.push(t[r])}r.d(t,"a",(function(){return s}));const a=new Set;function s(e,t,r,s=!0){const l=n(e,t,r,s);let c=9,u=o(),h=32,f=u.length,d=[],p=1,m=l[0],g=0;const y=l.length,b=8*(4*y-r),w=[];for(;null!=m;){if(h>=c)h-=c,g=m>>>32-c,m<<=c;else{g=m>>>32-h,m=l[p++];const e=c-h;h=32-e,g=(g<<e)+(m>>>h),m<<=e}if(257===g)break;if(256===g){c=9,u=o(),f=u.length,d=[];continue}const e=u[g];if(null==e){if(g>u.length)throw"data integrity issue: code does not exist on code page";d.push(d[0]),u[f++]=d.slice(),i(w,d)}else i(w,e),d.push(e[0]),d.length>1&&(u[f++]=d.slice()),d=e.slice();if(a.has(f)&&c++,0===h&&(m=l[p++],h=32),p>y||p===y&&h<=b)break}return new Uint8Array(w)}a.add(511),a.add(1023),a.add(2047),a.add(4095),a.add(8191)},c4c2:function(e,t,r){"use strict";r.d(t,"a",(function(){return s}));var n,o,i,a={exports:{}};o=a,void 0!==(n=function(){function e(){this.pos=0,this.bufferLength=0,this.eof=!1,this.buffer=null}return e.prototype={ensureBuffer:function(e){var t=this.buffer,r=t?t.byteLength:0;if(e<r)return t;for(var n=512;n<e;)n<<=1;for(var o=new Uint8Array(n),i=0;i<r;++i)o[i]=t[i];return this.buffer=o},getByte:function(){for(var e=this.pos;this.bufferLength<=e;){if(this.eof)return null;this.readBlock()}return this.buffer[this.pos++]},getBytes:function(e){var t=this.pos;if(e){this.ensureBuffer(t+e);for(var r=t+e;!this.eof&&this.bufferLength<r;)this.readBlock();var n=this.bufferLength;r>n&&(r=n)}else{for(;!this.eof;)this.readBlock();r=this.bufferLength}return this.pos=r,this.buffer.subarray(t,r)},lookChar:function(){for(var e=this.pos;this.bufferLength<=e;){if(this.eof)return null;this.readBlock()}return String.fromCharCode(this.buffer[this.pos])},getChar:function(){for(var e=this.pos;this.bufferLength<=e;){if(this.eof)return null;this.readBlock()}return String.fromCharCode(this.buffer[this.pos++])},makeSubStream:function(e,t,r){for(var n=e+t;this.bufferLength<=n&&!this.eof;)this.readBlock();return new Stream(this.buffer,e,t,r)},skip:function(e){e||(e=1),this.pos+=e},reset:function(){this.pos=0}},e}(),i=function(){if(!self||!self.Uint32Array)return null;var e=new Uint32Array([16,17,18,0,8,7,9,6,10,5,11,4,12,3,13,2,14,1,15]),t=new Uint32Array([3,4,5,6,7,8,9,10,65547,65549,65551,65553,131091,131095,131099,131103,196643,196651,196659,196667,262211,262227,262243,262259,327811,327843,327875,327907,258,258,258]),r=new Uint32Array([1,2,3,4,65541,65543,131081,131085,196625,196633,262177,262193,327745,327777,393345,393409,459009,459137,524801,525057,590849,591361,657409,658433,724993,727041,794625,798721,868353,876545]),o=[new Uint32Array([459008,524368,524304,524568,459024,524400,524336,590016,459016,524384,524320,589984,524288,524416,524352,590048,459012,524376,524312,589968,459028,524408,524344,590032,459020,524392,524328,59e4,524296,524424,524360,590064,459010,524372,524308,524572,459026,524404,524340,590024,459018,524388,524324,589992,524292,524420,524356,590056,459014,524380,524316,589976,459030,524412,524348,590040,459022,524396,524332,590008,524300,524428,524364,590072,459009,524370,524306,524570,459025,524402,524338,590020,459017,524386,524322,589988,524290,524418,524354,590052,459013,524378,524314,589972,459029,524410,524346,590036,459021,524394,524330,590004,524298,524426,524362,590068,459011,524374,524310,524574,459027,524406,524342,590028,459019,524390,524326,589996,524294,524422,524358,590060,459015,524382,524318,589980,459031,524414,524350,590044,459023,524398,524334,590012,524302,524430,524366,590076,459008,524369,524305,524569,459024,524401,524337,590018,459016,524385,524321,589986,524289,524417,524353,590050,459012,524377,524313,589970,459028,524409,524345,590034,459020,524393,524329,590002,524297,524425,524361,590066,459010,524373,524309,524573,459026,524405,524341,590026,459018,524389,524325,589994,524293,524421,524357,590058,459014,524381,524317,589978,459030,524413,524349,590042,459022,524397,524333,590010,524301,524429,524365,590074,459009,524371,524307,524571,459025,524403,524339,590022,459017,524387,524323,589990,524291,524419,524355,590054,459013,524379,524315,589974,459029,524411,524347,590038,459021,524395,524331,590006,524299,524427,524363,590070,459011,524375,524311,524575,459027,524407,524343,590030,459019,524391,524327,589998,524295,524423,524359,590062,459015,524383,524319,589982,459031,524415,524351,590046,459023,524399,524335,590014,524303,524431,524367,590078,459008,524368,524304,524568,459024,524400,524336,590017,459016,524384,524320,589985,524288,524416,524352,590049,459012,524376,524312,589969,459028,524408,524344,590033,459020,524392,524328,590001,524296,524424,524360,590065,459010,524372,524308,524572,459026,524404,524340,590025,459018,524388,524324,589993,524292,524420,524356,590057,459014,524380,524316,589977,459030,524412,524348,590041,459022,524396,524332,590009,524300,524428,524364,590073,459009,524370,524306,524570,459025,524402,524338,590021,459017,524386,524322,589989,524290,524418,524354,590053,459013,524378,524314,589973,459029,524410,524346,590037,459021,524394,524330,590005,524298,524426,524362,590069,459011,524374,524310,524574,459027,524406,524342,590029,459019,524390,524326,589997,524294,524422,524358,590061,459015,524382,524318,589981,459031,524414,524350,590045,459023,524398,524334,590013,524302,524430,524366,590077,459008,524369,524305,524569,459024,524401,524337,590019,459016,524385,524321,589987,524289,524417,524353,590051,459012,524377,524313,589971,459028,524409,524345,590035,459020,524393,524329,590003,524297,524425,524361,590067,459010,524373,524309,524573,459026,524405,524341,590027,459018,524389,524325,589995,524293,524421,524357,590059,459014,524381,524317,589979,459030,524413,524349,590043,459022,524397,524333,590011,524301,524429,524365,590075,459009,524371,524307,524571,459025,524403,524339,590023,459017,524387,524323,589991,524291,524419,524355,590055,459013,524379,524315,589975,459029,524411,524347,590039,459021,524395,524331,590007,524299,524427,524363,590071,459011,524375,524311,524575,459027,524407,524343,590031,459019,524391,524327,589999,524295,524423,524359,590063,459015,524383,524319,589983,459031,524415,524351,590047,459023,524399,524335,590015,524303,524431,524367,590079]),9],i=[new Uint32Array([327680,327696,327688,327704,327684,327700,327692,327708,327682,327698,327690,327706,327686,327702,327694,0,327681,327697,327689,327705,327685,327701,327693,327709,327683,327699,327691,327707,327687,327703,327695,0]),5];function a(e){throw new Error(e)}function s(e){var t=0,r=e[t++],o=e[t++];-1!=r&&-1!=o||a("Invalid header in flate stream"),8!=(15&r)&&a("Unknown compression method in flate stream"),((r<<8)+o)%31!=0&&a("Bad FCHECK in flate stream"),32&o&&a("FDICT bit set in flate stream"),this.bytes=e,this.bytesPos=t,this.codeSize=0,this.codeBuf=0,n.call(this)}return s.prototype=Object.create(n.prototype),s.prototype.getBits=function(e){for(var t,r=this.codeSize,n=this.codeBuf,o=this.bytes,i=this.bytesPos;r<e;)void 0===(t=o[i++])&&a("Bad encoding in flate stream"),n|=t<<r,r+=8;return t=n&(1<<e)-1,this.codeBuf=n>>e,this.codeSize=r-=e,this.bytesPos=i,t},s.prototype.getCode=function(e){for(var t=e[0],r=e[1],n=this.codeSize,o=this.codeBuf,i=this.bytes,s=this.bytesPos;n<r;){var l;void 0===(l=i[s++])&&a("Bad encoding in flate stream"),o|=l<<n,n+=8}var c=t[o&(1<<r)-1],u=c>>16,h=65535&c;return(0==n||n<u||0==u)&&a("Bad encoding in flate stream"),this.codeBuf=o>>u,this.codeSize=n-u,this.bytesPos=s,h},s.prototype.generateHuffmanTable=function(e){for(var t=e.length,r=0,n=0;n<t;++n)e[n]>r&&(r=e[n]);for(var o=1<<r,i=new Uint32Array(o),a=1,s=0,l=2;a<=r;++a,s<<=1,l<<=1)for(var c=0;c<t;++c)if(e[c]==a){var u=0,h=s;for(n=0;n<a;++n)u=u<<1|1&h,h>>=1;for(n=u;n<o;n+=l)i[n]=a<<16|c;++s}return[i,r]},s.prototype.readBlock=function(){function n(e,t,r,n,o){for(var i=e.getBits(r)+n;i-- >0;)t[p++]=o}var s=this.getBits(3);if(1&s&&(this.eof=!0),0!=(s>>=1)){var l,c;if(1==s)l=o,c=i;else if(2==s){for(var u=this.getBits(5)+257,h=this.getBits(5)+1,f=this.getBits(4)+4,d=Array(e.length),p=0;p<f;)d[e[p++]]=this.getBits(3);for(var m=this.generateHuffmanTable(d),g=0,y=(p=0,u+h),b=new Array(y);p<y;){var w=this.getCode(m);16==w?n(this,b,2,3,g):17==w?n(this,b,3,3,g=0):18==w?n(this,b,7,11,g=0):b[p++]=g=w}l=this.generateHuffmanTable(b.slice(0,u)),c=this.generateHuffmanTable(b.slice(u,y))}else a("Unknown block type in flate stream");for(var x=(D=this.buffer)?D.length:0,C=this.bufferLength;;){var v=this.getCode(l);if(v<256)C+1>=x&&(x=(D=this.ensureBuffer(C+1)).length),D[C++]=v;else{if(256==v)return void(this.bufferLength=C);var k=(v=t[v-=257])>>16;k>0&&(k=this.getBits(k)),g=(65535&v)+k,v=this.getCode(c),(k=(v=r[v])>>16)>0&&(k=this.getBits(k));var T=(65535&v)+k;C+g>=x&&(x=(D=this.ensureBuffer(C+g)).length);for(var S=0;S<g;++S,++C)D[C]=D[C-T]}}}else{var O,A=this.bytes,I=this.bytesPos;void 0===(O=A[I++])&&a("Bad block header in flate stream");var M=O;void 0===(O=A[I++])&&a("Bad block header in flate stream"),M|=O<<8,void 0===(O=A[I++])&&a("Bad block header in flate stream");var P=O;void 0===(O=A[I++])&&a("Bad block header in flate stream"),(P|=O<<8)!=(65535&~M)&&a("Bad uncompressed block length in flate stream"),this.codeBuf=0,this.codeSize=0;var R=this.bufferLength,D=this.ensureBuffer(R+M),E=R+M;this.bufferLength=E;for(var j=R;j<E;++j){if(void 0===(O=A[I++])){this.eof=!0;break}D[j]=O}this.bytesPos=I}},s}())&&(o.exports=i);const s=a.exports},d329:function(e,t,r){"use strict";function n(e){return"r"in e&&"g"in e&&"b"in e}function o(e){return"h"in e&&"s"in e&&"v"in e}function i(e){return"l"in e&&"a"in e&&"b"in e}function a(e){return"l"in e&&"c"in e&&"h"in e}function s(e){return"x"in e&&"y"in e&&"z"in e}r.d(t,"a",(function(){return T})),r.d(t,"b",(function(){return S})),r.d(t,"c",(function(){return O})),r.d(t,"d",(function(){return k}));const l=[[.4124,.3576,.1805],[.2126,.7152,.0722],[.0193,.1192,.9505]],c=[[3.2406,-1.5372,-.4986],[-.9689,1.8758,.0415],[.0557,-.204,1.057]];function u(e,t){const r=[];let n,o;if(e[0].length!==t.length)throw"dimensions do not match";const i=e.length,a=e[0].length;let s=0;for(n=0;n<i;n++){for(s=0,o=0;o<a;o++)s+=e[n][o]*t[o];r.push(s)}return r}function h(e){const t=[e.r/255,e.g/255,e.b/255].map(e=>e<=.04045?e/12.92:((e+.055)/1.055)**2.4),r=u(l,t);return{x:100*r[0],y:100*r[1],z:100*r[2]}}function f(e){const t=u(c,[e.x/100,e.y/100,e.z/100]).map(e=>{const t=e<=.0031308?12.92*e:1.055*e**(1/2.4)-.055;return Math.min(1,Math.max(t,0))});return{r:Math.round(255*t[0]),g:Math.round(255*t[1]),b:Math.round(255*t[2])}}function d(e){const t=[e.x/95.047,e.y/100,e.z/108.883].map(e=>e>(6/29)**3?e**(1/3):1/3*(29/6)**2*e+4/29);return{l:116*t[1]-16,a:500*(t[0]-t[1]),b:200*(t[1]-t[2])}}function p(e){const t=e.l,r=[(t+16)/116+e.a/500,(t+16)/116,(t+16)/116-e.b/200].map(e=>e>6/29?e**3:3*(6/29)**2*(e-4/29));return{x:95.047*r[0],y:100*r[1],z:108.883*r[2]}}function m(e){const t=e.l,r=e.a,n=e.b,o=Math.sqrt(r*r+n*n);let i=Math.atan2(n,r);return i=i>0?i:i+2*Math.PI,{l:t,c:o,h:i}}function g(e){const t=e.l,r=e.c,n=e.h;return{l:t,a:r*Math.cos(n),b:r*Math.sin(n)}}function y(e){return d(h(e))}function b(e){return f(p(e))}function w(e){return m(d(h(e)))}function x(e){return f(p(g(e)))}function C(e){const t=e.r,r=e.g,n=e.b,o=Math.max(t,r,n),i=o-Math.min(t,r,n);let a=o,s=0===i?0:o===t?(r-n)/i%6:o===r?(n-t)/i+2:(t-r)/i+4,l=0===i?0:i/a;return s<0&&(s+=6),s*=60,l*=100,a*=100/255,{h:s,s:l,v:a}}function v(e){const t=(e.h+360)%360/60,r=e.s/100,n=e.v/100*255,o=n*r,i=o*(1-Math.abs(t%2-1));let a;switch(Math.floor(t)){case 0:a={r:o,g:i,b:0};break;case 1:a={r:i,g:o,b:0};break;case 2:a={r:0,g:o,b:i};break;case 3:a={r:0,g:i,b:o};break;case 4:a={r:i,g:0,b:o};break;case 5:case 6:a={r:o,g:0,b:i};break;default:a={r:0,g:0,b:0}}return a.r=Math.round(a.r+n-o),a.g=Math.round(a.g+n-o),a.b=Math.round(a.b+n-o),a}function k(e){return n(e)?e:a(e)?x(e):i(e)?b(e):s(e)?f(e):o(e)?v(e):e}function T(e){return o(e)?e:C(k(e))}function S(e){return i(e)?e:y(k(e))}function O(e){return a(e)?e:w(k(e))}},e55a:function(e,t,r){"use strict";r.d(t,"a",(function(){return n}));const n=(()=>{const e=new ArrayBuffer(4),t=new Uint8Array(e);return new Uint32Array(e)[0]=1,1===t[0]})()},e90e:function(e,t,r){"use strict";r.d(t,"a",(function(){return s}));var n,o,i,a={exports:{}};n=a,o=function(){var e=function(){function e(e){this.message="JPEG error: "+e}return e.prototype=new Error,e.prototype.name="JpegError",e.constructor=e,e}();return function(){if(!self||!self.Uint8ClampedArray)return null;var t=new Uint8Array([0,1,8,16,9,2,3,10,17,24,32,25,18,11,4,5,12,19,26,33,40,48,41,34,27,20,13,6,7,14,21,28,35,42,49,56,57,50,43,36,29,22,15,23,30,37,44,51,58,59,52,45,38,31,39,46,53,60,61,54,47,55,62,63]),r=4017,n=799,o=3406,i=2276,a=1567,s=3784,l=5793,c=2896;function u(){this.decodeTransform=null,this.colorTransform=-1}function h(e,t){for(var r,n,o=0,i=[],a=16;a>0&&!e[a-1];)a--;i.push({children:[],index:0});var s,l=i[0];for(r=0;r<a;r++){for(n=0;n<e[r];n++){for((l=i.pop()).children[l.index]=t[o];l.index>0;)l=i.pop();for(l.index++,i.push(l);i.length<=r;)i.push(s={children:[],index:0}),l.children[l.index]=s.children,l=s;o++}r+1<a&&(i.push(s={children:[],index:0}),l.children[l.index]=s.children,l=s)}return i[0].children}function f(e,t,r){return 64*((e.blocksPerLine+1)*t+r)}function d(r,n,o,i,a,s,l,c,u){var h=o.mcusPerLine,d=o.progressive,p=n,m=0,y=0;function b(){if(y>0)return y--,m>>y&1;if(255===(m=r[n++])){var t=r[n++];if(t)throw new e("unexpected marker "+(m<<8|t).toString(16))}return y=7,m>>>7}function w(t){for(var r=t;;){if("number"==typeof(r=r[b()]))return r;if("object"!=typeof r)throw new e("invalid huffman sequence")}}function x(e){for(var t=0;e>0;)t=t<<1|b(),e--;return t}function C(e){if(1===e)return 1===b()?1:-1;var t=x(e);return t>=1<<e-1?t:t+(-1<<e)+1}function v(e,r){var n=w(e.huffmanTableDC),o=0===n?0:C(n);e.blockData[r]=e.pred+=o;for(var i=1;i<64;){var a=w(e.huffmanTableAC),s=15&a,l=a>>4;if(0!==s){var c=t[i+=l];e.blockData[r+c]=C(s),i++}else{if(l<15)break;i+=16}}}function k(e,t){var r=w(e.huffmanTableDC),n=0===r?0:C(r)<<u;e.blockData[t]=e.pred+=n}function T(e,t){e.blockData[t]|=b()<<u}var S=0;function O(e,r){if(S>0)S--;else for(var n=s,o=l;n<=o;){var i=w(e.huffmanTableAC),a=15&i,c=i>>4;if(0!==a){var h=t[n+=c];e.blockData[r+h]=C(a)*(1<<u),n++}else{if(c<15){S=x(c)+(1<<c)-1;break}n+=16}}}var A,I=0;function M(r,n){for(var o,i,a=s,c=l,h=0;a<=c;){var f=t[a];switch(I){case 0:if(h=(i=w(r.huffmanTableAC))>>4,0==(o=15&i))h<15?(S=x(h)+(1<<h),I=4):(h=16,I=1);else{if(1!==o)throw new e("invalid ACn encoding");A=C(o),I=h?2:3}continue;case 1:case 2:r.blockData[n+f]?r.blockData[n+f]+=b()<<u:0==--h&&(I=2===I?3:0);break;case 3:r.blockData[n+f]?r.blockData[n+f]+=b()<<u:(r.blockData[n+f]=A<<u,I=0);break;case 4:r.blockData[n+f]&&(r.blockData[n+f]+=b()<<u)}a++}4===I&&0==--S&&(I=0)}function P(e,t,r,n,o){var i=r%h;t(e,f(e,(r/h|0)*e.v+n,i*e.h+o))}function R(e,t,r){t(e,f(e,r/e.blocksPerLine|0,r%e.blocksPerLine))}var D,E,j,U,L,B,G=i.length;B=d?0===s?0===c?k:T:0===c?O:M:v;var _,N,F,V,z=0;for(N=1===G?i[0].blocksPerLine*i[0].blocksPerColumn:h*o.mcusPerColumn;z<N;){var W=a?Math.min(N-z,a):N;for(E=0;E<G;E++)i[E].pred=0;if(S=0,1===G)for(D=i[0],L=0;L<W;L++)R(D,B,z),z++;else for(L=0;L<W;L++){for(E=0;E<G;E++)for(F=(D=i[E]).h,V=D.v,j=0;j<V;j++)for(U=0;U<F;U++)P(D,B,z,j,U);z++}y=0,(_=g(r,n))&&_.invalid&&(console.log("decodeScan - unexpected MCU data, next marker is: "+_.invalid),n=_.offset);var H=_&&_.marker;if(!H||H<=65280)throw new e("marker was not found");if(!(H>=65488&&H<=65495))break;n+=2}return(_=g(r,n))&&_.invalid&&(console.log("decodeScan - unexpected Scan data, next marker is: "+_.invalid),n=_.offset),n-p}function p(t,u,h){var f,d,p,m,g,y,b,w,x,C,v,k,T,S,O,A,I,M=t.quantizationTable,P=t.blockData;if(!M)throw new e("missing required Quantization Table.");for(var R=0;R<64;R+=8)x=P[u+R],C=P[u+R+1],v=P[u+R+2],k=P[u+R+3],T=P[u+R+4],S=P[u+R+5],O=P[u+R+6],A=P[u+R+7],x*=M[R],0!=(C|v|k|T|S|O|A)?(C*=M[R+1],v*=M[R+2],k*=M[R+3],T*=M[R+4],S*=M[R+5],O*=M[R+6],A*=M[R+7],d=(f=(f=l*x+128>>8)+(d=l*T+128>>8)+1>>1)-d,I=(p=v)*s+(m=O)*a+128>>8,p=p*a-m*s+128>>8,b=(g=(g=c*(C-A)+128>>8)+(b=S<<4)+1>>1)-b,y=(w=(w=c*(C+A)+128>>8)+(y=k<<4)+1>>1)-y,m=(f=f+(m=I)+1>>1)-m,p=(d=d+p+1>>1)-p,I=g*i+w*o+2048>>12,g=g*o-w*i+2048>>12,w=I,I=y*n+b*r+2048>>12,y=y*r-b*n+2048>>12,b=I,h[R]=f+w,h[R+7]=f-w,h[R+1]=d+b,h[R+6]=d-b,h[R+2]=p+y,h[R+5]=p-y,h[R+3]=m+g,h[R+4]=m-g):(I=l*x+512>>10,h[R]=I,h[R+1]=I,h[R+2]=I,h[R+3]=I,h[R+4]=I,h[R+5]=I,h[R+6]=I,h[R+7]=I);for(var D=0;D<8;++D)x=h[D],0!=((C=h[D+8])|(v=h[D+16])|(k=h[D+24])|(T=h[D+32])|(S=h[D+40])|(O=h[D+48])|(A=h[D+56]))?(d=(f=4112+((f=l*x+2048>>12)+(d=l*T+2048>>12)+1>>1))-d,I=(p=v)*s+(m=O)*a+2048>>12,p=p*a-m*s+2048>>12,m=I,b=(g=(g=c*(C-A)+2048>>12)+(b=S)+1>>1)-b,y=(w=(w=c*(C+A)+2048>>12)+(y=k)+1>>1)-y,I=g*i+w*o+2048>>12,g=g*o-w*i+2048>>12,w=I,I=y*n+b*r+2048>>12,y=y*r-b*n+2048>>12,x=(x=(f=f+m+1>>1)+w)<16?0:x>=4080?255:x>>4,C=(C=(d=d+p+1>>1)+(b=I))<16?0:C>=4080?255:C>>4,v=(v=(p=d-p)+y)<16?0:v>=4080?255:v>>4,k=(k=(m=f-m)+g)<16?0:k>=4080?255:k>>4,T=(T=m-g)<16?0:T>=4080?255:T>>4,S=(S=p-y)<16?0:S>=4080?255:S>>4,O=(O=d-b)<16?0:O>=4080?255:O>>4,A=(A=f-w)<16?0:A>=4080?255:A>>4,P[u+D]=x,P[u+D+8]=C,P[u+D+16]=v,P[u+D+24]=k,P[u+D+32]=T,P[u+D+40]=S,P[u+D+48]=O,P[u+D+56]=A):(I=(I=l*x+8192>>14)<-2040?0:I>=2024?255:I+2056>>4,P[u+D]=I,P[u+D+8]=I,P[u+D+16]=I,P[u+D+24]=I,P[u+D+32]=I,P[u+D+40]=I,P[u+D+48]=I,P[u+D+56]=I)}function m(e,t){for(var r=t.blocksPerLine,n=t.blocksPerColumn,o=new Int16Array(64),i=0;i<n;i++)for(var a=0;a<r;a++)p(t,f(t,i,a),o);return t.blockData}function g(e,t,r){function n(t){return e[t]<<8|e[t+1]}var o=e.length-1,i=r<t?r:t;if(t>=o)return null;var a=n(t);if(a>=65472&&a<=65534)return{invalid:null,marker:a,offset:t};for(var s=n(i);!(s>=65472&&s<=65534);){if(++i>=o)return null;s=n(i)}return{invalid:a.toString(16),marker:s,offset:i}}return u.prototype={parse:function(r){function n(){var e=r[l]<<8|r[l+1];return l+=2,e}function o(){var e=n(),t=l+e-2,o=g(r,t,l);o&&o.invalid&&(console.log("readDataBlock - incorrect length, next marker is: "+o.invalid),t=o.offset);var i=r.subarray(l,t);return l+=i.length,i}function i(e){for(var t=Math.ceil(e.samplesPerLine/8/e.maxH),r=Math.ceil(e.scanLines/8/e.maxV),n=0;n<e.components.length;n++){G=e.components[n];var o=Math.ceil(Math.ceil(e.samplesPerLine/8)*G.h/e.maxH),i=Math.ceil(Math.ceil(e.scanLines/8)*G.v/e.maxV),a=t*G.h,s=r*G.v*64*(a+1);G.blockData=new Int16Array(s),G.blocksPerLine=o,G.blocksPerColumn=i}e.mcusPerLine=t,e.mcusPerColumn=r}var a,s,l=0,c=null,u=null,f=[],p=[],y=[],b=n();if(65496!==b)throw new e("SOI not found");for(b=n();65497!==b;){var w,x,C;switch(b){case 65504:case 65505:case 65506:case 65507:case 65508:case 65509:case 65510:case 65511:case 65512:case 65513:case 65514:case 65515:case 65516:case 65517:case 65518:case 65519:case 65534:var v=o();65504===b&&74===v[0]&&70===v[1]&&73===v[2]&&70===v[3]&&0===v[4]&&(c={version:{major:v[5],minor:v[6]},densityUnits:v[7],xDensity:v[8]<<8|v[9],yDensity:v[10]<<8|v[11],thumbWidth:v[12],thumbHeight:v[13],thumbData:v.subarray(14,14+3*v[12]*v[13])}),65518===b&&65===v[0]&&100===v[1]&&111===v[2]&&98===v[3]&&101===v[4]&&(u={version:v[5]<<8|v[6],flags0:v[7]<<8|v[8],flags1:v[9]<<8|v[10],transformCode:v[11]});break;case 65499:for(var k=n()+l-2;l<k;){var T=r[l++],S=new Uint16Array(64);if(T>>4==0)for(x=0;x<64;x++)S[t[x]]=r[l++];else{if(T>>4!=1)throw new e("DQT - invalid table spec");for(x=0;x<64;x++)S[t[x]]=n()}f[15&T]=S}break;case 65472:case 65473:case 65474:if(a)throw new e("Only single frame JPEGs supported");n(),(a={}).extended=65473===b,a.progressive=65474===b,a.precision=r[l++],a.scanLines=n(),a.samplesPerLine=n(),a.components=[],a.componentIds={};var O,A=r[l++],I=0,M=0;for(w=0;w<A;w++){O=r[l];var P=r[l+1]>>4,R=15&r[l+1];I<P&&(I=P),M<R&&(M=R);var D=r[l+2];C=a.components.push({h:P,v:R,quantizationId:D,quantizationTable:null}),a.componentIds[O]=C-1,l+=3}a.maxH=I,a.maxV=M,i(a);break;case 65476:var E=n();for(w=2;w<E;){var j=r[l++],U=new Uint8Array(16),L=0;for(x=0;x<16;x++,l++)L+=U[x]=r[l];var B=new Uint8Array(L);for(x=0;x<L;x++,l++)B[x]=r[l];w+=17+L,(j>>4==0?y:p)[15&j]=h(U,B)}break;case 65501:n(),s=n();break;case 65498:n();var G,_=r[l++],N=[];for(w=0;w<_;w++){var F=a.componentIds[r[l++]];G=a.components[F];var V=r[l++];G.huffmanTableDC=y[V>>4],G.huffmanTableAC=p[15&V],N.push(G)}var z=r[l++],W=r[l++],H=r[l++],K=d(r,l,a,N,s,z,W,H>>4,15&H);l+=K;break;case 65535:255!==r[l]&&l--;break;default:if(255===r[l-3]&&r[l-2]>=192&&r[l-2]<=254){l-=3;break}throw new e("unknown marker "+b.toString(16))}b=n()}for(this.width=a.samplesPerLine,this.height=a.scanLines,this.jfif=c,this.eof=l,this.adobe=u,this.components=[],w=0;w<a.components.length;w++){var J=f[(G=a.components[w]).quantizationId];J&&(G.quantizationTable=J),this.components.push({output:m(a,G),scaleX:G.h/a.maxH,scaleY:G.v/a.maxV,blocksPerLine:G.blocksPerLine,blocksPerColumn:G.blocksPerColumn})}this.numComponents=this.components.length},_getLinearizedBlockData:function(e,t){var r,n,o,i,a,s,l,c,u,h,f,d=this.width/e,p=this.height/t,m=0,g=this.components.length,y=e*t*g,b=new Uint8ClampedArray(y),w=new Uint32Array(e),x=4294967288;for(l=0;l<g;l++){for(n=(r=this.components[l]).scaleX*d,o=r.scaleY*p,m=l,f=r.output,i=r.blocksPerLine+1<<3,a=0;a<e;a++)c=0|a*n,w[a]=(c&x)<<3|7&c;for(s=0;s<t;s++)for(h=i*((c=0|s*o)&x)|(7&c)<<3,a=0;a<e;a++)b[m]=f[h+w[a]],m+=g}var C=this.decodeTransform;if(C)for(l=0;l<y;)for(c=0,u=0;c<g;c++,l++,u+=2)b[l]=(b[l]*C[u]>>8)+C[u+1];return b},_isColorConversionNeeded:function(){return this.adobe?!!this.adobe.transformCode:3===this.numComponents?0!==this.colorTransform:1===this.colorTransform},_convertYccToRgb:function(e){for(var t,r,n,o=0,i=e.length;o<i;o+=3)t=e[o],r=e[o+1],n=e[o+2],e[o]=t-179.456+1.402*n,e[o+1]=t+135.459-.344*r-.714*n,e[o+2]=t-226.816+1.772*r;return e},_convertYcckToRgb:function(e){for(var t,r,n,o,i=0,a=0,s=e.length;a<s;a+=4)t=e[a],r=e[a+1],n=e[a+2],o=e[a+3],e[i++]=r*(-660635669420364e-19*r+.000437130475926232*n-54080610064599e-18*t+.00048449797120281*o-.154362151871126)-122.67195406894+n*(-.000957964378445773*n+.000817076911346625*t-.00477271405408747*o+1.53380253221734)+t*(.000961250184130688*t-.00266257332283933*o+.48357088451265)+o*(-.000336197177618394*o+.484791561490776),e[i++]=107.268039397724+r*(219927104525741e-19*r-.000640992018297945*n+.000659397001245577*t+.000426105652938837*o-.176491792462875)+n*(-.000778269941513683*n+.00130872261408275*t+.000770482631801132*o-.151051492775562)+t*(.00126935368114843*t-.00265090189010898*o+.25802910206845)+o*(-.000318913117588328*o-.213742400323665),e[i++]=r*(-.000570115196973677*r-263409051004589e-19*n+.0020741088115012*t-.00288260236853442*o+.814272968359295)-20.810012546947+n*(-153496057440975e-19*n-.000132689043961446*t+.000560833691242812*o-.195152027534049)+t*(.00174418132927582*t-.00255243321439347*o+.116935020465145)+o*(-.000343531996510555*o+.24165260232407);return e},_convertYcckToCmyk:function(e){for(var t,r,n,o=0,i=e.length;o<i;o+=4)t=e[o],r=e[o+1],n=e[o+2],e[o]=434.456-t-1.402*n,e[o+1]=119.541-t+.344*r+.714*n,e[o+2]=481.816-t-1.772*r;return e},_convertCmykToRgb:function(e){for(var t,r,n,o,i=0,a=1/255,s=0,l=e.length;s<l;s+=4)t=e[s]*a,r=e[s+1]*a,n=e[s+2]*a,o=e[s+3]*a,e[i++]=255+t*(-4.387332384609988*t+54.48615194189176*r+18.82290502165302*n+212.25662451639585*o-285.2331026137004)+r*(1.7149763477362134*r-5.6096736904047315*n-17.873870861415444*o-5.497006427196366)+n*(-2.5217340131683033*n-21.248923337353073*o+17.5119270841813)-o*(21.86122147463605*o+189.48180835922747),e[i++]=255+t*(8.841041422036149*t+60.118027045597366*r+6.871425592049007*n+31.159100130055922*o-79.2970844816548)+r*(-15.310361306967817*r+17.575251261109482*n+131.35250912493976*o-190.9453302588951)+n*(4.444339102852739*n+9.8632861493405*o-24.86741582555878)-o*(20.737325471181034*o+187.80453709719578),e[i++]=255+t*(.8842522430003296*t+8.078677503112928*r+30.89978309703729*n-.23883238689178934*o-14.183576799673286)+r*(10.49593273432072*r+63.02378494754052*n+50.606957656360734*o-112.23884253719248)+n*(.03296041114873217*n+115.60384449646641*o-193.58209356861505)-o*(22.33816807309886*o+180.12613974708367);return e},getData:function(t,r,n){if(this.numComponents>4)throw new e("Unsupported color mode");var o=this._getLinearizedBlockData(t,r);if(1===this.numComponents&&n){for(var i=o.length,a=new Uint8ClampedArray(3*i),s=0,l=0;l<i;l++){var c=o[l];a[s++]=c,a[s++]=c,a[s++]=c}return a}if(3===this.numComponents&&this._isColorConversionNeeded())return this._convertYccToRgb(o);if(4===this.numComponents){if(this._isColorConversionNeeded())return n?this._convertYcckToRgb(o):this._convertYcckToCmyk(o);if(n)return this._convertCmykToRgb(o)}return o}},u}()},void 0!==(i=o())&&(n.exports=i);const s=a.exports}}]);
- //# sourceMappingURL=chunk-cfae2ce4.578e9c51.js.map
|