@arcgis/core
Version:
ArcGIS Maps SDK for JavaScript: A complete 2D and 3D mapping and data visualization API
1 lines • 168 kB
JavaScript
"use strict";(self.webpackChunkRemoteClient=self.webpackChunkRemoteClient||[]).push([[8610],{4151(t,e,r){r.d(e,{A:()=>n});class n{constructor(t=null,e=null,r=null){this.minValue=t,this.maxValue=e,this.noDataValue=r}}},9334(t,e,r){function n(t,e){let r=0,n="",o=0,i=0;const s=t.length;for(;r<s;)i=t[r++],o=i>>4,o<8?o=1:15===o?(o=4,i=(7&i)<<18|(63&t[r++])<<12|(63&t[r++])<<6|63&t[r++]):14===o?(o=3,i=(15&i)<<12|(63&t[r++])<<6|63&t[r++]):(o=2,i=(31&i)<<6|63&t[r++]),(0!==i||e)&&(n+=String.fromCharCode(i));return n}r.d(e,{w:()=>n})},10713(t,e,r){r.d(e,{Z:()=>n});const n=(()=>{const t=new ArrayBuffer(4),e=new Uint8Array(t);return new Uint32Array(t)[0]=1,1===e[0]})()},11053(t,e,r){r.d(e,{c:()=>n,g:()=>o});var n="undefined"!=typeof globalThis?globalThis:"undefined"!=typeof window?window:void 0!==r.g?r.g:"undefined"!=typeof self?self:{};function o(t){return t&&t.__esModule&&Object.prototype.hasOwnProperty.call(t,"default")?t.default:t}},13868(t,e,r){r.d(e,{SZ:()=>o,e8:()=>s,hm:()=>i});var n=r(66552);const o=(0,n.O)()({RSP_NearestNeighbor:"nearest",RSP_BilinearInterpolation:"bilinear",RSP_CubicConvolution:"cubic",RSP_Majority:"majority"}),i=(0,n.O)()({esriNoDataMatchAny:"any",esriNoDataMatchAll:"all"}),s=(0,n.O)()({U1:"u1",U2:"u2",U4:"u4",U8:"u8",S8:"s8",U16:"u16",S16:"s16",U32:"u32",S32:"s32",F32:"f32",F64:"f64",C64:"c64",C128:"c128",UNKNOWN:"unknown"})},14140(t,e,r){r.d(e,{A:()=>f});var n,o=r(5482),i=r(49186),s=r(25482),a=r(4718),l=r(53966),c=r(91429),u=r(94778),h=r(4151);let f=class extends s.o{static{n=this}static createEmptyBand(t,e){return new(n.getPixelArrayConstructor(t))(e)}static combineBandMasks(t){if(t.length<2)return t[0];const e=t[0].length,r=new Uint8Array(e).fill(255);for(let n=0;n<t.length;n++){const o=t[n];for(let t=0;t<e;t++)o[t]||(r[t]=0)}return r}static getPixelArrayConstructor(t){let e;switch(t){case"u1":case"u2":case"u4":case"u8":e=Uint8Array;break;case"u16":e=Uint16Array;break;case"u32":e=Uint32Array;break;case"s8":e=Int8Array;break;case"s16":e=Int16Array;break;case"s32":e=Int32Array;break;case"f32":case"c64":case"c128":case"unknown":e=Float32Array;break;case"f64":e=Float64Array}return e}constructor(t){super(t),this.width=null,this.height=null,this.pixelType="f32",this.validPixelCount=null,this.mask=null,this.maskIsAlpha=!1,this.premultiplyAlpha=!1,this.statistics=null,this.depthCount=1}castPixelType(t){if(!t)return"f32";let e=t.toLowerCase();return["u1","u2","u4"].includes(e)?e="u8":["unknown","u8","s8","u16","s16","u32","s32","f32","f64"].includes(e)||(e="f32"),e}getPlaneCount(){return this.pixels?.length}addData(t){if(!t.pixels||t.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(t.pixels),this.statistics.push(t.statistics??new h.A)}getAsRGBA(){const t=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(t);break;default:this._fillFrom8Bit(t)}return new Uint8ClampedArray(t)}getAsRGBAFloat(){const t=new Float32Array(this.width*this.height*4);return this._fillFrom32Bit(t),t}updateStatistics(){if(!this.pixels)return;this.statistics=this.pixels.map(t=>function(t,e){let r=1/0,n=-1/0;const o=t.length;let i,s=0;if(null!=e)for(i=0;i<o;i++)e[i]&&(s=t[i],r=s<r?s:r,n=s>n?s:n);else for(i=0;i<o;i++)s=t[i],r=s<r?s:r,n=s>n?s:n;return new h.A(r,n)}(t,this.mask));const t=this.mask;let e=0;if(null!=t)for(let r=0;r<t.length;r++)t[r]&&e++;else e=this.width*this.height;this.validPixelCount=e}clamp(t){if(!t||"f64"===t||"f32"===t||!this.pixels)return;const[e,r]=(0,u.hP)(t),o=this.pixels,i=this.width*this.height,s=o.length;let a,l,c;const h=[];for(let u=0;u<s;u++){c=n.createEmptyBand(t,i),a=o[u];for(let t=0;t<i;t++)l=a[t],c[t]=l>r?r:l<e?e:l;h.push(c)}this.pixels=h,this.pixelType=t}extractBands(t){const{pixels:e,statistics:r}=this;if(null==t||0===t.length||!e||0===e.length)return this;const o=e.length,i=t.some(t=>t>=e.length),s=o===t.length&&!t.some((t,e)=>t!==e);if(i||s)return this;const a=this.bandMasks?.length===o?t.map(t=>this.bandMasks[t]):void 0;let{mask:l,validPixelCount:c}=this;const{width:u,height:h}=this;return a?.length&&(l=n.combineBandMasks(a),c=l.filter(t=>!!t).length),new n({pixelType:this.pixelType,width:u,height:h,mask:l,bandMasks:a,validPixelCount:c,maskIsAlpha:this.maskIsAlpha,pixels:t.map(t=>e[t]),statistics:r&&t.map(t=>r[t])})}clone(){const t=new n({width:this.width,height:this.height,pixelType:this.pixelType,maskIsAlpha:this.maskIsAlpha,validPixelCount:this.validPixelCount,premultiplyAlpha:this.premultiplyAlpha,depthCount:this.depthCount});let e;null!=this.mask&&(t.mask=new Uint8Array(this.mask)),this.noDataValues&&(t.noDataValues=[...this.noDataValues]),this.bandMasks&&(t.bandMasks=this.bandMasks.map(t=>new Uint8Array(t)));const r=n.getPixelArrayConstructor(this.pixelType);if(this.pixels&&this.pixels.length>0){t.pixels=[];const n=!!this.pixels[0].slice;for(e=0;e<this.pixels.length;e++)t.pixels[e]=n?this.pixels[e].slice():new r(this.pixels[e])}if(this.statistics)for(t.statistics=[],e=0;e<this.statistics.length;e++)t.statistics[e]=(0,a.o8)(this.statistics[e]);return t}getTransferableObject(){const{pixels:t,bandMasks:e,mask:r}=this;this.pixels=[],this.bandMasks=void 0,this.mask=void 0;const n=this.toJSON();this.pixels=t,this.bandMasks=e,this.mask=r,n.pixels=t?[...t]:t,n.bandMasks=e?[...e]:e,n.mask=r;const o=[];return[...t??[],r,...e??[]].filter(t=>null!=t&&ArrayBuffer.isView(t)).forEach(t=>{t&&!o.includes(t.buffer)&&o.push(t.buffer)}),{pixelBlock:n,transferList:o}}_fillFrom8Bit(t){const{mask:e,maskIsAlpha:r,premultiplyAlpha:n,pixels:o}=this;if(!t||!o?.length)return void l.A.getLogger(this).error("getAsRGBA()","Unable to convert to RGBA. The input pixel block is empty.");let i,s,a,c;i=s=a=o[0],o.length>=3?(s=o[1],a=o[2]):2===o.length&&(s=o[1]);const u=new Uint32Array(t),h=this.width*this.height;if(i.length===h)if(null!=e&&e.length===h)if(r)for(c=0;c<h;c++){const t=e[c];if(t){const e=t/255;u[c]=n?t<<24|a[c]*e<<16|s[c]*e<<8|i[c]*e:t<<24|a[c]<<16|s[c]<<8|i[c]}}else for(c=0;c<h;c++)e[c]&&(u[c]=255<<24|a[c]<<16|s[c]<<8|i[c]);else for(c=0;c<h;c++)u[c]=255<<24|a[c]<<16|s[c]<<8|i[c];else l.A.getLogger(this).error("getAsRGBA()","Unable to convert to RGBA. The pixelblock is invalid.")}_fillFromNon8Bit(t){const{pixels:e,mask:r,statistics:n}=this;if(!t||!e?.length)return void l.A.getLogger(this).error("getAsRGBA()","Unable to convert to RGBA. The input pixel block is empty.");const o=this.pixelType;let i=1,s=0,a=1;if(n&&n.length>0){for(const t of n)if(null!=t.minValue&&(s=Math.min(s,t.minValue)),null!=t.maxValue&&null!=t.minValue){const e=t.maxValue-t.minValue;a=Math.max(a,e)}i=255/a}else{let t=255;"s8"===o?(s=-128,t=127):"u16"===o?t=65535:"s16"===o?(s=-32768,t=32767):"u32"===o?t=4294967295:"s32"===o?(s=-2147483648,t=2147483647):"f32"===o?(s=-34e38,t=34e38):"f64"===o&&(s=-Number.MAX_VALUE,t=Number.MAX_VALUE),i=255/(t-s)}const c=new Uint32Array(t),u=this.width*this.height;let h,f,d,p,m;if(h=f=d=e[0],h.length!==u)return l.A.getLogger(this).error("getAsRGBA()","Unable to convert to RGBA. The pixelblock is invalid.");if(e.length>=2)if(f=e[1],e.length>=3&&(d=e[2]),null!=r&&r.length===u)for(p=0;p<u;p++)r[p]&&(c[p]=255<<24|(d[p]-s)*i<<16|(f[p]-s)*i<<8|(h[p]-s)*i);else for(p=0;p<u;p++)c[p]=255<<24|(d[p]-s)*i<<16|(f[p]-s)*i<<8|(h[p]-s)*i;else if(null!=r&&r.length===u)for(p=0;p<u;p++)m=(h[p]-s)*i,r[p]&&(c[p]=255<<24|m<<16|m<<8|m);else for(p=0;p<u;p++)m=(h[p]-s)*i,c[p]=255<<24|m<<16|m<<8|m}_fillFrom32Bit(t){const{pixels:e,mask:r}=this;if(!t||!e?.length)return l.A.getLogger(this).error("getAsRGBAFloat()","Unable to convert to RGBA. The input pixel block is empty.");let n,o,i,s;n=o=i=e[0],e.length>=3?(o=e[1],i=e[2]):2===e.length&&(o=e[1]);const a=this.width*this.height;if(n.length!==a)return l.A.getLogger(this).error("getAsRGBAFloat()","Unable to convert to RGBA. The pixelblock is invalid.");let c=0;if(null!=r&&r.length===a)for(s=0;s<a;s++)t[c++]=n[s],t[c++]=o[s],t[c++]=i[s],t[c++]=1&r[s];else for(s=0;s<a;s++)t[c++]=n[s],t[c++]=o[s],t[c++]=i[s],t[c++]=1}};(0,o.Cg)([(0,c.MZ)({json:{write:!0}})],f.prototype,"width",void 0),(0,o.Cg)([(0,c.MZ)({json:{write:!0}})],f.prototype,"height",void 0),(0,o.Cg)([(0,c.MZ)({json:{write:!0}})],f.prototype,"pixelType",void 0),(0,o.Cg)([(0,c.wg)("pixelType")],f.prototype,"castPixelType",null),(0,o.Cg)([(0,c.MZ)({json:{write:!0}})],f.prototype,"validPixelCount",void 0),(0,o.Cg)([(0,c.MZ)({json:{write:!0}})],f.prototype,"mask",void 0),(0,o.Cg)([(0,c.MZ)({json:{write:!0}})],f.prototype,"maskIsAlpha",void 0),(0,o.Cg)([(0,c.MZ)({json:{write:!0}})],f.prototype,"pixels",void 0),(0,o.Cg)([(0,c.MZ)()],f.prototype,"premultiplyAlpha",void 0),(0,o.Cg)([(0,c.MZ)({json:{write:!0}})],f.prototype,"statistics",void 0),(0,o.Cg)([(0,c.MZ)({json:{write:!0}})],f.prototype,"depthCount",void 0),(0,o.Cg)([(0,c.MZ)({json:{write:!0}})],f.prototype,"noDataValues",void 0),(0,o.Cg)([(0,c.MZ)({json:{write:!0}})],f.prototype,"bandMasks",void 0),f=n=(0,o.Cg)([(0,c.$K)("esri.layers.support.PixelBlock")],f)},20223(t,e,r){r.d(e,{A:()=>c});var n,o=r(5482),i=r(25482),s=r(4718),a=r(91429),l=r(86738);let c=class extends i.o{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.isBsqTile=!1,this.isVirtualTileInfo=!1,this.tileInfo=null,this.transposeInfo=null,this.blockBoundary=null}static{n=this}clone(){return new n({blockWidth:this.blockWidth,blockHeight:this.blockHeight,compression:this.compression,origin:(0,s.o8)(this.origin),firstPyramidLevel:this.firstPyramidLevel,maximumPyramidLevel:this.maximumPyramidLevel,pyramidResolutions:(0,s.o8)(this.pyramidResolutions),pyramidScalingFactor:this.pyramidScalingFactor,pyramidBlockWidth:this.pyramidBlockWidth,pyramidBlockHeight:this.pyramidBlockHeight,isBsqTile:this.isBsqTile,isVirtualTileInfo:this.isVirtualTileInfo,tileInfo:(0,s.o8)(this.tileInfo),transposeInfo:(0,s.o8)(this.transposeInfo),blockBoundary:(0,s.o8)(this.blockBoundary)})}};(0,o.Cg)([(0,a.MZ)({type:Number,json:{write:!0}})],c.prototype,"blockWidth",void 0),(0,o.Cg)([(0,a.MZ)({type:Number,json:{write:!0}})],c.prototype,"blockHeight",void 0),(0,o.Cg)([(0,a.MZ)({type:String,json:{write:!0}})],c.prototype,"compression",void 0),(0,o.Cg)([(0,a.MZ)({type:l.A,json:{write:!0}})],c.prototype,"origin",void 0),(0,o.Cg)([(0,a.MZ)({type:Number,json:{write:!0}})],c.prototype,"firstPyramidLevel",void 0),(0,o.Cg)([(0,a.MZ)({type:Number,json:{write:!0}})],c.prototype,"maximumPyramidLevel",void 0),(0,o.Cg)([(0,a.MZ)({json:{write:!0}})],c.prototype,"pyramidResolutions",void 0),(0,o.Cg)([(0,a.MZ)({type:Number,json:{write:!0}})],c.prototype,"pyramidScalingFactor",void 0),(0,o.Cg)([(0,a.MZ)({type:Number,json:{write:!0}})],c.prototype,"pyramidBlockWidth",void 0),(0,o.Cg)([(0,a.MZ)({type:Number,json:{write:!0}})],c.prototype,"pyramidBlockHeight",void 0),(0,o.Cg)([(0,a.MZ)({json:{write:!0}})],c.prototype,"isBsqTile",void 0),(0,o.Cg)([(0,a.MZ)({type:Boolean,json:{write:!0}})],c.prototype,"isVirtualTileInfo",void 0),(0,o.Cg)([(0,a.MZ)({json:{write:!0}})],c.prototype,"tileInfo",void 0),(0,o.Cg)([(0,a.MZ)()],c.prototype,"transposeInfo",void 0),(0,o.Cg)([(0,a.MZ)({json:{write:!0}})],c.prototype,"blockBoundary",void 0),c=n=(0,o.Cg)([(0,a.$K)("esri.layers.support.RasterStorageInfo")],c)},20758(t,e,r){r.d(e,{D:()=>V,g:()=>F});var n=r(49186),o=r(97768),i=r(74887),s=r(68060);class a{constructor(t){this._canvas=null,this._ctx=null,t&&(this._canvas=t.canvas,this._ctx=t.ctx||t.canvas&&t.canvas.getContext("2d"))}decode(t,e,r){if(!t||t.byteLength<10)throw new n.A("imagecanvasdecoder: decode","required a valid encoded data as input.");let{width:o=0,height:s=0,format:l}=e;const{applyJpegMask:c}=e;if(c&&(!o||!s))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=a._getMask(t,{width:o,height:s}));const f=new Blob([new Uint8Array(t)],{type:"image/"+l=="jpg"?"jpeg":l}),d=URL.createObjectURL(f),p=new Image;p.src=d,p.onload=()=>{if(URL.revokeObjectURL(d),(0,i.G4)(r))return void u((0,i.NK)());o=p.width,s=p.height,this._canvas&&this._ctx?(this._canvas.width===o&&this._canvas.height===s||(this._canvas.width=o,this._canvas.height=s),this._ctx.clearRect(0,0,o,s)):(this._canvas=document.createElement("canvas"),this._canvas.width=o,this._canvas.height=s,this._ctx=this._canvas.getContext("2d")),this._ctx.drawImage(p,0,0);const t=this._ctx.getImageData(0,0,o,s),a=t.data;if(e.renderOnCanvas){if(h)for(let t=0;t<h.length;t++)h[t]?a[4*t+3]=255:a[4*t+3]=0;return this._ctx.putImageData(t,0,0),void n(null)}const l=o*s,c=new Uint8Array(l),f=new Uint8Array(l),m=new Uint8Array(l);if(h)for(let t=0;t<l;t++)c[t]=a[4*t],f[t]=a[4*t+1],m[t]=a[4*t+2];else{h=new Uint8Array(l);for(let t=0;t<l;t++)c[t]=a[4*t],f[t]=a[4*t+1],m[t]=a[4*t+2],h[t]=a[4*t+3]}n({width:o,height:s,pixels:[c,f,m],mask:h,pixelType:"u8"})},p.onerror=()=>{URL.revokeObjectURL(d),u("cannot load image")}})}static _getMask(t,e){let r=null;try{const n=new Uint8Array(t),o=Math.ceil(n.length/2);let i=0;const a=n.length-2;for(i=o;i<a&&(255!==n[i]||217!==n[i+1]);i++);if(i+=2,i<n.length-1){const t=new s.Z(n.subarray(i)).getBytes();r=new Uint8Array(e.width*e.height);let o=0;for(let e=0;e<t.length;e++)for(let n=7;n>=0;n--)r[o++]=t[e]>>n&1}}catch(t){}return r}}var l=r(61294);class c{static decode(t,e=!1){const r=new Uint8Array(t),n=new l.J;n.parse(r);const{width:o,height:i,numComponents:a,eof:c}=n,u=n.getData(o,i,!0),h=o*i;let f,d=null;if(!e&&c<r.length-1)try{const t=new s.Z(r.subarray(c)).getBytes();d=new Uint8Array(h);let e=0;for(let r=0;r<t.length;r++)for(let n=7;n>=0;n--)d[e++]=t[r]>>n&1}catch{}if(1===a&&u.length===o*i){const t=new Uint8Array(u.buffer);f=[t,t,t]}else{f=[];for(let t=0;t<3;t++)f.push(new Uint8Array(h));let t=0;for(let e=0;e<h;e++)for(let r=0;r<3;r++)f[r][e]=u[t++]}return{width:o,height:i,pixels:f,mask:d}}}var u=r(43946),h=r(73051),f=r(94778),d=r(2741);const p=new Set(["uint8","int8","uint16","int16","uint32","int32","int64","uint64"]),m=new Map([["uint8",{byteCount:1,pixelType:"u8",ctor:Uint8Array}],["int8",{byteCount:1,pixelType:"s8",ctor:Int8Array}],["uint16",{byteCount:2,pixelType:"u16",ctor:Uint16Array}],["int16",{byteCount:2,pixelType:"s16",ctor:Int16Array}],["uint32",{byteCount:4,pixelType:"u32",ctor:Uint32Array}],["int32",{byteCount:4,pixelType:"s32",ctor:Int32Array}],["uint64",{byteCount:8,pixelType:"f64",ctor:BigUint64Array}],["int64",{byteCount:8,pixelType:"f64",ctor:BigInt64Array}]]);let g;function y(){return g??=r.e(6154).then(r.bind(r,56154)).then(({default:t})=>t({locateFile:t=>(0,d.s)(`esri/layers/raster/formats/${t}`)})).then(t=>{!function(t){const{_GetInfo:e,_decode:r,_malloc:n,_free:o,writeArrayToMemory:i,UTF8ToString:s}=t;w.getBlobInfo=t=>{t.length>1e3&&(t=t.slice(0,1e3));const r=n(t.length);i(t,r);const a=e(r,t.length);if(o(r),!a)return null;const l=s(a);o(a);try{const t=JSON.parse(l);return{width:t.xsize,height:t.ysize,bandCount:t.nbands,dataType:t.dtype,mode:t.mode,bandMap:t.bandmap}}catch{return null}},w.decode=(e,n)=>{const{dataType:o,width:i,height:s,bandCount:a}=n;if(!p.has(o))throw new Error("Unsupported data type: "+o);const{_malloc:l,_free:c}=t,u=l(e.length);t.writeArrayToMemory(e,u);const{ctor:h,byteCount:f}=C(o),d=i*s*a*f,m=l(d),g=l(1024);if(0===r(u,e.length,m,g))throw c(u),c(m),c(g),new Error("Decoding failed: "+t.UTF8ToString(g));const y=new h(t.HEAPU8.slice(m,m+d).buffer);if(c(u),c(m),c(g),y instanceof BigInt64Array||y instanceof BigUint64Array){const t=new Float64Array(y.length);for(let e=0;e<y.length;e++)t[e]=Number(y[e]);return t}return y}}(t)}),g}const w={getBlobInfo:null,decode:null};function C(t){if(!m.has(t))throw new Error("Unsupported data type: "+t);return m.get(t)}function b(t){const e=new Uint8Array(t),r=w.getBlobInfo(e);if(!r)return null;const n=w.decode(e,r);if(!n)return null;const{width:o,height:i,bandCount:s,dataType:a}=r,{ctor:l,pixelType:c}=C(a),u=l===BigInt64Array||l===BigUint64Array?Float64Array:l,h=Array.from({length:s},()=>new u(o*i));for(let t=0,e=0;t<o*i;t++)for(let r=0;r<s;r++)h[r][t]=n[e++];return{width:o,height:i,pixelType:c,pixels:h}}const x=(t,e)=>{const r=e.width*e.height,n=e.pixelType;return Math.floor(t.byteLength/(r*v(n)))},v=t=>{let e=1;switch(t){case Uint8Array:case Int8Array:e=1;break;case Uint16Array:case Int16Array:e=2;break;case Uint32Array:case Int32Array:case Float32Array:e=4;break;case Float64Array:e=8}return e};class A{static decode(t,e){const r=e.pixelType,n=[],o=e.width*e.height,i=x(t,e),{bandIds:s,format:a}=e,l=s?.length||x(t,e),c=t.byteLength-t.byteLength%(o*v(r)),u=new r(t,0,o*i);if("bip"===a)for(let t=0;t<l;t++){const e=new r(o),a=s?s[t]:t;for(let t=0;t<o;t++)e[t]=u[t*i+a];n.push(e)}else if("bsq"===a)for(let t=0;t<l;t++){const e=s?s[t]:t;n.push(u.subarray(e*o,(e+1)*o))}let h=null;return c<t.byteLength-1&&(h=((t,e)=>{if(8*t.byteLength<e)return null;const r=new Uint8Array(t,0,Math.ceil(e/8)),n=new Uint8Array(e);let o=0,i=0;for(let t=0;t<r.length-1;t++){i=r[t];for(let t=7;t>=0;t--)n[o++]=i>>t&1}let s=7;for(;o<e-1;)i=r[r.length-1],n[o++]=i>>s&1,s--;return n})(t.slice(c),o)),{pixels:n,mask:h}}}var k=r(87877),M=r(10713),T=r(14140),S=r(4151),I=function(t){var e,r,n;function o(t){var e,r,n,o,i,s,a,l,c,u,h,f,d;for(this.data=t,this.pos=8,this.palette=[],this.imgData=[],this.transparency={},this.animation=null,this.text={},i=null;;){switch(e=this.readUInt32(),l=function(){var t,e;for(e=[],t=0;t<4;++t)e.push(String.fromCharCode(this.data[this.pos++]));return e}.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(e);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,e-=4),t=(null!=i?i.data:void 0)||this.imgData,h=0;0<=e?h<e:h>e;0<=e?++h:--h)t.push(this.data[this.pos++]);break;case"tRNS":switch(this.transparency={},this.colorType){case 3:if(this.transparency.indexed=this.read(e),(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(e)[0];break;case 2:this.transparency.rgb=this.read(e)}break;case"tEXt":s=(u=this.read(e)).indexOf(0),a=String.fromCharCode.apply(String,u.slice(0,s)),this.text[a]=String.fromCharCode.apply(String,u.slice(s+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+=e}if(this.pos+=4,this.pos>this.data.length)throw new Error("Incomplete or corrupt PNG file")}}return o.load=function(t,e,r){var n;return"function"==typeof e&&(r=e),(n=new XMLHttpRequest).open("GET",t,!0),n.responseType="arraybuffer",n.onload=function(){var t;return t=new o(new Uint8Array(n.response||n.mozResponseArrayBuffer)),"function"==typeof(null!=e?e.getContext:void 0)&&t.render(e),"function"==typeof r?r(t):void 0},n.send(null)},o.prototype.read=function(t){var e,r;for(r=[],e=0;0<=t?e<t:e>t;0<=t?++e:--e)r.push(this.data[this.pos++]);return r},o.prototype.readUInt32=function(){return this.data[this.pos++]<<24|this.data[this.pos++]<<16|this.data[this.pos++]<<8|this.data[this.pos++]},o.prototype.readUInt16=function(){return this.data[this.pos++]<<8|this.data[this.pos++]},o.prototype.decodePixels=function(t){var e,r,n,o,i,a,l,c,u,h,f,d,p,m,g,y,w,C,b,x,v,A,k;if(null==t&&(t=this.imgData),0===t.length)return new Uint8Array(0);for(t=(t=new s.Z(t)).getBytes(),y=(d=this.pixelBitlength/8)*this.width,p=new Uint8Array(y*this.height),a=t.length,g=0,m=0,r=0;m<a;){switch(t[m++]){case 0:for(o=b=0;b<y;o=b+=1)p[r++]=t[m++];break;case 1:for(o=x=0;x<y;o=x+=1)e=t[m++],i=o<d?0:p[r-d],p[r++]=(e+i)%256;break;case 2:for(o=v=0;v<y;o=v+=1)e=t[m++],n=(o-o%d)/d,w=g&&p[(g-1)*y+n*d+o%d],p[r++]=(w+e)%256;break;case 3:for(o=A=0;A<y;o=A+=1)e=t[m++],n=(o-o%d)/d,i=o<d?0:p[r-d],w=g&&p[(g-1)*y+n*d+o%d],p[r++]=(e+Math.floor((i+w)/2))%256;break;case 4:for(o=k=0;k<y;o=k+=1)e=t[m++],n=(o-o%d)/d,i=o<d?0:p[r-d],0===g?w=C=0:(w=p[(g-1)*y+n*d+o%d],C=n&&p[(g-1)*y+(n-1)*d+o%d]),l=i+w-C,c=Math.abs(l-i),h=Math.abs(l-w),f=Math.abs(l-C),u=c<=h&&c<=f?i:h<=f?w:C,p[r++]=(e+u)%256;break;default:throw new Error("Invalid filter algorithm: "+t[m-1])}g++}return p},o.prototype.decodePalette=function(){var t,e,r,n,o,i,s,a,l;for(r=this.palette,i=this.transparency.indexed||[],o=new Uint8Array((i.length||0)+r.length),n=0,r.length,t=0,e=s=0,a=r.length;s<a;e=s+=3)o[n++]=r[e],o[n++]=r[e+1],o[n++]=r[e+2],o[n++]=null!=(l=i[t++])?l:255;return o},o.prototype.copyToImageData=function(t,e){var r,n,o,i,s,a,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=t.data||t).length,s=u||e,i=a=0,1===n)for(;i<c;)l=u?4*e[i/4]:a,h=s[l++],o[i++]=h,o[i++]=h,o[i++]=h,o[i++]=r?s[l++]:this.transparency.grayscale&&this.transparency.grayscale===h?0:255,a=l;else for(;i<c;)l=u?4*e[i/4]:a,o[i++]=s[l++],o[i++]=s[l++],o[i++]=s[l++],o[i++]=r?s[l++]:this.transparency.rgb&&this.transparency.rgb[1]===s[l-3]&&this.transparency.rgb[3]===s[l-2]&&this.transparency.rgb[5]===s[l-1]?0:255,a=l},o.prototype.decode=function(){var t;return t=new Uint8Array(this.width*this.height*4),this.copyToImageData(t,this.decodePixels()),t},r=t.document&&t.document.createElement("canvas"),n=r&&r.getContext("2d"),e=function(t){var e;return n.width=t.width,n.height=t.height,n.clearRect(0,0,t.width,t.height),n.putImageData(t,0,0),(e=new Image).src=r.toDataURL(),e},o.prototype.decodeFrames=function(t){var r,n,o,i,s,a,l,c;if(this.animation){for(c=[],n=s=0,a=(l=this.animation.frames).length;s<a;n=++s)r=l[n],o=t.createImageData(r.width,r.height),i=this.decodePixels(new Uint8Array(r.data)),this.copyToImageData(o,i),r.imageData=o,c.push(r.image=e(o));return c}},o.prototype.renderFrame=function(t,e){var r,n,o;return r=(n=this.animation.frames)[e],o=n[e-1],0===e&&t.clearRect(0,0,this.width,this.height),1===(null!=o?o.disposeOp:void 0)?t.clearRect(o.xOffset,o.yOffset,o.width,o.height):2===(null!=o?o.disposeOp:void 0)&&t.putImageData(o.imageData,o.xOffset,o.yOffset),0===r.blendOp&&t.clearRect(r.xOffset,r.yOffset,r.width,r.height),t.drawImage(r.image,r.xOffset,r.yOffset)},o.prototype.animate=function(t){var e,r,n,o,i,s,a=this;return r=0,s=this.animation,o=s.numFrames,n=s.frames,i=s.numPlays,(e=function(){var s,l;if(s=r++%o,l=n[s],a.renderFrame(t,s),o>1&&r/o<i)return a.animation._timeout=setTimeout(e,l.delay)})()},o.prototype.stopAnimation=function(){var t;return clearTimeout(null!=(t=this.animation)?t._timeout:void 0)},o.prototype.render=function(t){var e,r;return t._png&&t._png.stopAnimation(),t._png=this,t.width=this.width,t.height=this.height,e=t.getContext("2d"),this.animation?(this.decodeFrames(e),this.animate(e)):(r=e.createImageData(this.width,this.height),this.copyToImageData(r,this.decodePixels()),e.putImageData(r,0,0))},o}(self);const P=new Set(["jpg","png","bmp","gif"]);async function E(t,e){if(!M.Z)throw new n.A("rasterCoded:decode","lerc decoder is not supported on big endian platform");await(0,u.Hh)();const{offset:r}=e,{width:o,height:i,pixelType:s,statistics:a,depthCount:l,noDataValues:c,bandMasks:h,pixels:f,mask:d}=(0,u.D4)(t,{inputOffset:r,returnInterleaved:e.returnInterleaved}),p=new T.A({width:o,height:i,pixelType:s.toLowerCase(),pixels:f,mask:d,statistics:a.map(({minValue:t,maxValue:e})=>new S.A(t,e)),bandMasks:h,depthCount:l,noDataValues:c});return a?.length||p.updateStatistics(),p}async function R(t,e){await y();const r=b(t);if(!r)throw new n.A("rasterCodec:decode","failed to decode the input data.");const{width:o,height:i,pixels:s,pixelType:a}=r,l=new T.A({width:o,height:i,pixelType:a,pixels:s});return l.updateStatistics(),l}async function L(t,e){const r=await(0,k.D4)(t,{...e,noDataValue:e.tiffNoDataValue,matchAllNoData:e.matchAllNoData});(0,o.Lw)(r);const n=new T.A({width:r.width,height:r.height,pixels:r.pixels,pixelType:r.pixelType.toLowerCase(),mask:r.mask,bandMasks:r.bandMasks,statistics:null});return n.updateStatistics(),n}function U(t,e){const r=e.pixelType||"u8",n=T.A.getPixelArrayConstructor(r),o="u8"===r?t:new n(t.buffer),i=[],s=e.planes||1;if(1===s)i.push(o);else for(let r=0;r<s;r++){const a=(e.width||1)*(e.height||t.length),l=new n(a);for(let t=0;t<a;t++)l[t]=o[t*s+r];i.push(l)}const a=new T.A({width:e.width||1,height:e.height||t.length,pixels:i,pixelType:r,statistics:null});return a.updateStatistics(),a}function D(t,e){return U(new s.Z(new Uint8Array(t)).getBytes(),e)}function O(t,e){return U((0,h.D)(t,e.offset,e.eof,!e.isInputBigEndian),e)}function B(t,e){const r=c.decode(t,e.hasNoZlibMask??void 0),n=new T.A({width:r.width,height:r.height,pixels:r.pixels,pixelType:"u8",mask:r.mask,statistics:null});return n.updateStatistics(),n}function N(t,e){const r=new Uint8Array(t),n=new I(r),{width:o,height:i}=e,s=o*i,a=n.decode();let l,c=0,u=0;const h=new Uint8Array(s);for(c=0;c<s;c++)h[c]=a[4*c+3];const f=new T.A({width:o,height:i,pixels:[],pixelType:"u8",mask:h,statistics:[]});for(c=0;c<3;c++){for(l=new Uint8Array(s),u=0;u<s;u++)l[u]=a[4*u+c];f.addData({pixels:l})}return f.updateStatistics(),f}function G(t){if(null==t)throw new n.A("rasterCodec:decode","parameter encodeddata is required.");const e=new Uint8Array(t,0,10);let r="";return 255===e[0]&&216===e[1]?r="jpg":137===e[0]&&80===e[1]&&78===e[2]&&71===e[3]?r="png":67===e[0]&&110===e[1]&&116===e[2]&&90===e[3]&&73===e[4]&&109===e[5]&&97===e[6]&&103===e[7]&&101===e[8]&&32===e[9]?r="lerc":76===e[0]&&101===e[1]&&114===e[2]&&99===e[3]&&50===e[4]&&32===e[5]?r="lerc2":73===e[0]&&73===e[1]&&42===e[2]&&0===e[3]||77===e[0]&&77===e[1]&&0===e[2]&&42===e[3]||73===e[0]&&73===e[1]&&43===e[2]&&0===e[3]||77===e[0]&&77===e[1]&&0===e[2]&&43===e[3]?r="tiff":71===e[0]&&73===e[1]&&70===e[2]?r="gif":66===e[0]&&77===e[1]?r="bmp":81===e[0]&&66===e[1]&&51===e[2]?r="qb3":String.fromCharCode.apply(null,e).toLowerCase().includes("error")&&(r="error"),r}function F(t){let e=G(t);return"lerc2"===e?e="lerc":"error"===e&&(e=""),e}async function V(t,e={},r){if(null==t)throw new n.A("rasterCodec:decode","missing encodeddata parameter.");let o=e.format?.toLowerCase();if(!("bsq"!==o&&"bip"!==o||null!=e.width&&null!=e.height))throw new n.A("rasterCodec:decode","requires width and height in options parameter.");if("tiff"===o&&e.customOptions)return async function(t,e){const r=await(0,k.s$)(t,e.customOptions),n=new T.A({width:r.width,height:r.height,pixels:r.pixels,pixelType:r.pixelType.toLowerCase(),mask:r.mask,statistics:null});return n.updateStatistics(),n}(t,e);if((!o||"bsq"!==o&&"bip"!==o&&"deflate"!==o&&"lzw"!==o)&&(o=G(t)),e.useCanvas&&P.has(o))return async function(t,e,r,n){const o=new a,i={applyJpegMask:!1,format:e,...r},s=await o.decode(t,i,n),l=new T.A(s);return l.updateStatistics(),l}(t,o,e,r);const i=function(t){let e=null;switch(t){case"lerc":case"lerc2":e=E;break;case"jpg":e=B;break;case"png":e=N;break;case"bsq":case"bip":e=(e,r)=>function(t,e,r){const{pixelTypeCtor:n}=function(t){let e=null,r=null;switch(t?t.toLowerCase():"f32"){case"u1":case"u2":case"u4":case"u8":r=255,e=Uint8Array;break;case"u16":r=r||65535,e=Uint16Array;break;case"u32":r=r||2**32-1,e=Uint32Array;break;case"s8":r=r||-128,e=Int8Array;break;case"s16":r=r||-32768,e=Int16Array;break;case"s32":r=r||0-2**31,e=Int32Array;break;default:e=Float32Array}return{pixelTypeCtor:e,noDataValue:r}}(e.pixelType),o=(0,A.decode)(t,{width:e.width,height:e.height,pixelType:n,format:r}),i=new T.A({width:e.width,height:e.height,pixels:o.pixels,pixelType:e.pixelType,mask:o.mask,statistics:null});return i.updateStatistics(),i}(e,r,t);break;case"tiff":e=L;break;case"deflate":e=D;break;case"lzw":e=O;break;case"qb3":e=R;break;case"error":e=()=>{throw new n.A("rasterCodec:decode","input data contains error")};break;default:e=()=>{throw new n.A("rasterCodec:decode","unsupported raster format")}}return e}(o);let s;e.isPoint&&(null!=(e={...e}).width&&e.width++,null!=e.height&&e.height++);const{offsets:l}=e;if(l&&l.length>1){const r=l.map((r,n)=>i(t.slice(r,l[n+1]),e)),n=await Promise.all(r);s=n[0],s.pixels=n.map(t=>t.pixels[0]);const o=n.map(t=>t.mask);n.some(t=>null!=t)&&(o.forEach((t,e)=>{null==t&&(o[e]=new Uint8Array(s.width*s.height).fill(255))}),s.bandMasks=o,s.mask=T.A.combineBandMasks(o)),s.updateStatistics()}else s=await i(t,{...e,offset:l?.[0]??e.offset});return"jpg"!==o&&null!=e.noDataValue&&1===s.depthCount&&(0,f.Sp)(s,e.noDataValue,{customFloatTolerance:e.tolerance}),e.isPoint&&function(t,e=1){if(!t)return;const{pixels:r,width:n,height:o,mask:i}=t;if(!r||0===r.length)return;const s=n-1,a=o-1,l=[];let c=null;const u=T.A.getPixelArrayConstructor(t.pixelType);if(0===e){for(const t of r){const e=new u(s*a);for(let r=0;r<a;r++){const o=r*n;for(let n=0;n<s;n++)e[r*s+n]=t[o+n]}l.push(e)}if(null!=i){c=new Uint8Array(s*a);for(let t=0;t<a;t++){const e=t*n;for(let r=0;r<s;r++)c[t*s+r]=i[e+r]}}}else{for(const t of r){const e=new u(s*a);for(let r=0;r<a;r++){const o=r*n;for(let i=0;i<s;i++)e[r*s+i]=(t[o+i]+t[o+i+1]+t[o+n+i]+t[o+n+i+1])/4}l.push(e)}if(i){c=new Uint8Array(s*a);for(let t=0;t<a;t++){const e=t*n;for(let r=0;r<s;r++)c[t*s+r]=Math.min.apply(null,[i[e+r],i[e+r+1],i[e+n+r],i[e+n+r+1]])}}}t.width=s,t.height=a,t.mask=c,t.pixels=l}(s),s}},34251(t,e,r){r.d(e,{FI:()=>p,KL:()=>c,Lu:()=>h,MD:()=>l,Rn:()=>m,Y2:()=>d});var n=r(66552),o=r(47520),i=r(14140);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 a=180/Math.PI,l=new n.J({esriMetersPerSecond:"meter-per-second",esriKilometersPerHour:"kilometer-per-hour",esriKnots:"knots",esriFeetPerSecond:"feet-per-second",esriMilesPerHour:"mile-per-hour"});function c(t,e){return s.get(t)/s.get(e)||1}function u(t){return(450-t)%360}function h(t,e="geographic"){const[r,n]=t,o=Math.sqrt(r*r+n*n);let i=Math.atan2(n,r)*a;return i=(360+i)%360,"geographic"===e&&(i=u(i)),[o,i]}function f(t,e="geographic"){let r=t[1];"geographic"===e&&(r=u(r)),r%=360;const n=t[0];return[n*Math.cos(r/a),n*Math.sin(r/a)]}function d(t,e,r,n="geographic"){if(!(0,o.AB)(t)||null==r)return t;const i="vector-magdir"===e?t.clone():p(t,e),s=i.pixels[1];for(let t=0;t<s.length;t++)s[t]="geographic"===n?(s[t]+r[t]+270)%360:(s[t]+360-r[t])%360;return"vector-magdir"===e?i:p(i,"vector-magdir")}function p(t,e,r="geographic",n=1){if(!(0,o.AB)(t))return t;const{pixels:s,width:a,height:l}=t,c=a*l,u=s[0],d=s[1],p=t.pixelType.startsWith("f")?t.pixelType:"f32",m=i.A.createEmptyBand(p,c),g=i.A.createEmptyBand(p,c);let y=0;for(let t=0;t<l;t++)for(let t=0;t<a;t++)"vector-uv"===e?([m[y],g[y]]=h([u[y],d[y]],r),m[y]*=n):([m[y],g[y]]=f([u[y],d[y]],r),m[y]*=n,g[y]*=n),y++;const w=new i.A({pixelType:p,width:t.width,height:t.height,mask:t.mask,validPixelCount:t.validPixelCount,maskIsAlpha:t.maskIsAlpha,pixels:[m,g]});return w.updateStatistics(),w}function m(t,e,r=1){if(1===r||!(0,o.AB)(t))return t;const n=t.clone(),{pixels:i,width:s,height:a}=n,l=i[0],c=i[1];let u=0;for(let t=0;t<a;t++)for(let t=0;t<s;t++)"vector-uv"===e?(l[u]*=r,c[u]*=r):l[u]*=r,u++;return n.updateStatistics(),n}function g(t,e,r,n=1){const o=Math.sqrt(t*t+e*e)/n,i=(2*Math.PI+Math.atan2(e,t))%(2*Math.PI);return[o,(2*Math.PI+i-r)%(2*Math.PI)]}!function(t=0,e=0,r=Math.PI,n=!0){n&&(r=(2*Math.PI-r)%(2*Math.PI));const o=n?-1:1,i=13*o,s=-7*o,a=-2*o,l=-16*o,c=21.75,[u,h]=g(0,e+i,r,c),[f,d]=g(t-5.5,e+s,r,c),[p,m]=g(t+5.5,e+s,r,c),[y,w]=g(t-1.5,e+a,r,c),[C,b]=g(t+1.5,e+a,r,c),[x,v]=g(t-1.5,e+l,r,c),[A,k]=g(t+1.5,e+l,r,c)}(0,0,0)},43946(t,e,r){r.d(e,{D4:()=>u,Hh:()=>s});var n=r(2741);const o=[{pixelType:"S8",size:1,ctor:Int8Array,range:[-128,127]},{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;function s(){return i||(i=r.e(382).then(r.bind(r,30382)).then(({default:t})=>t({locateFile:t=>(0,n.s)(`esri/layers/raster/formats/${t}`)})).then(t=>{!function(t){const{_malloc:e,_free:r,memory:n,_lerc_getBlobInfo:i,_lerc_getDataRanges:s,_lerc_decode_4D:c}=t;let u;const h=t=>{const r=t.map(t=>function(t){return 16+(t>>3<<3)}(t)),o=r.reduce((t,e)=>t+e),i=e(o);u=new Uint8Array(n.buffer);let s=r[0];r[0]=i;for(let t=1;t<r.length;t++){const e=r[t];r[t]=r[t-1]+s,s=e}return r};a.getBlobInfo=t=>{const e=new Uint8Array(48),o=new Uint8Array(24),[a,c,f]=h([t.length,e.length,o.length]);u.set(t,a),u.set(e,c),u.set(o,f);let d=i(a,t.length,c,f,12,3);if(d)throw r(a),new Error(`lerc-getBlobInfo: error code is ${d}`);u=new Uint8Array(n.buffer),l(u,c,e),l(u,f,o);const p=new Uint32Array(e.buffer),m=new Float64Array(o.buffer),[g,y,,w,C,b,x,v,A,k,M]=p,T={version:g,depthCount:k,width:w,height:C,validPixelCount:x,bandCount:b,blobSize:v,maskCount:A,dataType:y,minValue:m[0],maxValue:m[1],maxZerror:m[2],statistics:[],bandCountWithNoData:M};if(M&&k>1)return r(a),T;if(1===k&&1===b)return r(a),T.statistics.push({minValue:m[0],maxValue:m[1]}),T;const S=k*b*8,I=new Uint8Array(S),P=new Uint8Array(S);let E=a,R=0,L=0,U=!1;if(u.byteLength<a+2*S?(r(a),U=!0,[E,R,L]=h([t.length,S,S]),u.set(t,E)):[R,L]=h([S,S]),u.set(I,R),u.set(P,L),d=s(E,t.length,k,b,R,L),d)throw r(E),U||r(R),new Error(`lerc-getDataRanges: error code is ${d}`);u=new Uint8Array(n.buffer),l(u,R,I),l(u,L,P);const D=new Float64Array(I.buffer),O=new Float64Array(P.buffer),B=T.statistics;for(let t=0;t<b;t++)if(k>1){const e=D.slice(t*k,(t+1)*k),r=O.slice(t*k,(t+1)*k),n=Math.min.apply(null,e),o=Math.max.apply(null,r);B.push({minValue:n,maxValue:o,depthStats:{minValues:e,maxValues:r}})}else B.push({minValue:D[t],maxValue:O[t]});return r(E),U||r(R),T},a.decode=(t,e)=>{const{maskCount:i,depthCount:s,bandCount:a,width:f,height:d,dataType:p,bandCountWithNoData:m}=e,g=o[p],y=f*d,w=new Uint8Array(y*a),C=y*s*a*g.size,b=new Uint8Array(C),x=new Uint8Array(a),v=new Uint8Array(8*a),[A,k,M,T,S]=h([t.length,w.length,b.length,x.length,v.length]);u.set(t,A),u.set(w,k),u.set(b,M),u.set(x,T),u.set(v,S);const I=c(A,t.length,i,k,s,f,d,a,p,M,T,S);if(I)throw r(A),new Error(`lerc-decode: error code is ${I}`);u=new Uint8Array(n.buffer),l(u,M,b),l(u,k,w);let P=null;if(m){l(u,T,x),l(u,S,v),P=[];const t=new Float64Array(v.buffer);for(let e=0;e<x.length;e++)P.push(x[e]?t[e]:null)}return r(A),{data:b,maskData:w,noDataValues:P}}}(t)}),i)}const a={getBlobInfo:null,decode:null};function l(t,e,r){r.set(t.slice(e,e+r.length))}function c(t,e,r,n,o){if(r<2)return t;const i=new n(e*r);for(let n=0,o=0;n<e;n++)for(let s=0,a=n;s<r;s++,a+=e)i[a]=t[o++];return i}function u(t,e={}){const r=e.inputOffset??0,n=t instanceof Uint8Array?t.subarray(r):new Uint8Array(t,r),i=a.getBlobInfo(n),{data:s,maskData:l,noDataValues:u}=a.decode(n,i),{width:h,height:f,bandCount:d,depthCount:p,dataType:m,maskCount:g,statistics:y}=i,w=o[m],C=new w.ctor(s.buffer),b=[],x=[],v=h*f,A=v*p;for(let t=0;t<d;t++){const r=C.subarray(t*A,(t+1)*A);if(e.returnInterleaved)b.push(r);else{const t=c(r,v,p,w.ctor);b.push(t)}x.push(l.subarray(t*A,(t+1)*A))}const k=0===g?null:1===g?x[0]:new Uint8Array(v);if(g>1){k.set(x[0]);for(let t=1;t<x.length;t++){const e=x[t];for(let t=0;t<v;t++)k[t]=k[t]&e[t]}}const{noDataValue:M}=e,T=null!=M&&w.range[0]<=M&&w.range[1]>=M;if(g>0&&T)for(let t=0;t<d;t++){const e=b[t],r=x[t]||k;for(let t=0;t<v;t++)0===r[t]&&(e[t]=M)}const S=g===d&&d>1?x:null,{pixelType:I}=w;return{width:h,height:f,bandCount:d,pixelType:I,depthCount:p,statistics:y,pixels:b,mask:k,bandMasks:S,noDataValues:u}}},47520(t,e,r){r.d(e,{$Q:()=>L,$i:()=>G,AB:()=>l,Ew:()=>C,Hx:()=>y,J$:()=>O,L:()=>F,QF:()=>N,UK:()=>d,Wt:()=>M,Wy:()=>c,XU:()=>k,YD:()=>v,_F:()=>g,bL:()=>w,dK:()=>A,eH:()=>f,et:()=>s,lD:()=>D,qL:()=>h,z$:()=>I,z7:()=>S,zg:()=>u});var n=r(34727),o=r(94778),i=r(14140);const s=9,a="PixelID";function l(t){return null!=t&&t.pixels?.length>0}function c(t){if(!t?.length||t.some(t=>!l(t)))return null;if(1===t.length)return t[0]?.clone()??null;const e=t,{width:r,height:n,pixelType:o}=e[0];if(e.some(t=>t.width!==r||t.height!==n))return null;const s=e.map(({mask:t})=>t).filter(t=>null!=t);let a=null;s.length&&(a=new Uint8Array(r*n),a.set(s[0]),s.length>1&&v(s.slice(1),a));const c=[];e.forEach(({pixels:t})=>c.push(...t));const u=null!=a&&c.length===e.length?e.map(({width:t,height:e,mask:r})=>r??new Uint8Array(t*e).fill(255)):null,h=e.map(({statistics:t})=>t).filter(t=>t?.length),f=[];return h.forEach(t=>f.push(...t)),new i.A({pixelType:o,width:r,height:n,mask:a,bandMasks:u,pixels:c,statistics:f.length?f:null})}function u(t){if(!t)return;const e=t.colormap;if(!e||0===e.length)return;const r=e.sort((t,e)=>t[0]-e[0]),n=r[0][0]<0?r[0][0]:0,o=Math.max(256,r[r.length-1][0]-n+1),i=new Uint8Array(4*o),s=[],a=5===r[0].length;if(o>65536)return r.forEach(t=>{s[t[0]-n]=a?t.slice(1):t.slice(1).concat([255])}),{indexed2DColormap:s,offset:n,alphaSpecified:a};if(t.fillUnspecified){let t=r[0];for(let e=t[0]-n,s=0;e<o;e++)i[4*e]=t[1],i[4*e+1]=t[2],i[4*e+2]=t[3],i[4*e+3]=a?t[4]:255,e===t[0]-n&&(t=s===r.length-1?t:r[++s])}else for(let t=0;t<r.length;t++){const e=r[t],o=4*(e[0]-n);i[o]=e[1],i[o+1]=e[2],i[o+2]=e[3],i[o+3]=a?e[4]:255}return{indexedColormap:i,offset:n,alphaSpecified:a}}function h(t,e){if(!l(t))return t;if(!e||!e.indexedColormap&&!e.indexed2DColormap)return t;const r=t.clone(),n=r.pixels;let o=r.mask;const i=r.width*r.height;if(1!==n.length)return t;const{indexedColormap:s,indexed2DColormap:a,offset:c,alphaSpecified:u}=e,h=n[0],f=new Uint8Array(h.length),d=new Uint8Array(h.length),p=new Uint8Array(h.length);let m,g=0;if(s){const t=s.length-1;if(null!=o)for(let e=0;e<i;e++)o[e]&&(g=4*(h[e]-c),g<c||g>t?o[e]=0:(f[e]=s[g],d[e]=s[g+1],p[e]=s[g+2],o[e]=s[g+3]));else{o=new Uint8Array(i);for(let e=0;e<i;e++)g=4*(h[e]-c),g<c||g>t?o[e]=0:(f[e]=s[g],d[e]=s[g+1],p[e]=s[g+2],o[e]=s[g+3]);r.mask=o}}else if(a)if(null!=o)for(let t=0;t<i;t++)o[t]&&(m=a[h[t]],f[t]=m[0],d[t]=m[1],p[t]=m[2],o[t]=m[3]);else{o=new Uint8Array(i);for(let t=0;t<i;t++)m=a[h[t]],f[t]=m[0],d[t]=m[1],p[t]=m[2],o[t]=m[3];r.mask=o}return r.pixels=[f,d,p],r.statistics=null,r.pixelType="u8",r.maskIsAlpha=u,r}function f(t,e){if(!l(t))return null;const{pixels:r,mask:n}=t,o=r.length;let s=e.lut;const{offset:a}=e;s&&1===s[0].length&&(s=r.map(()=>s));const c=[],u=e.outputPixelType||"u8";for(let t=0;t<o;t++){const e=d(r[t],n,s[t],a||0,u);c.push(e)}const h=new i.A({width:t.width,height:t.height,pixels:c,mask:n,pixelType:u});return h.updateStatistics(),h}function d(t,e,r,n,o){const s=t.length,a=i.A.createEmptyBand(o,s);if(e)for(let o=0;o<s;o++)e[o]&&(a[o]=r[t[o]-n]);else for(let e=0;e<s;e++)a[e]=r[t[e]-n];return a}function p(t,e,r,n){const{width:o,height:i,pixels:s,mask:a}=t,l=o*i,{bandId:c,ranges:u}=r,h=s[c];if(!h)return;const f=1===u.length,[d,p]=u[0];for(let t=0;t<l;t++)if(!a||a[t]){const r=h[t];if(f)r>=d&&r<=p&&(e[t]=n);else for(let o=0;o<u.length;o++){const[i,s]=u[o];if(r>=i&&r<=s){e[t]=n;break}}}}function m(t,e,r,n){const{width:o,height:i,xyMask:s,xBandId:a,yBandId:l,xBandRange:c,yBandRange:u}=r,{pixels:h,mask:f}=t,d=h[a],p=h[l],[m,g]=c,[y,w]=u,C=(g-m)/o,b=(w-y)/i;for(let t=0;t<d.length;t++)if(!f||f[t]){let r=d[t],a=p[t];if(r<m||r>g||a<y||a>w)continue;s?(r=(r-m)*C,r=r>o-1?o-1:r<0?0:255&r,a=(w-a)*b,a=a>i-1?i-1:a<0?0:255&a,s[a*o+r]&&(e[t]=n)):e[t]=n}}function g(t){const{pixelBlock:e,renderedPixelBlock:r,highlightOptions:n}=t;if(!l(e))return;const{width:o,height:i}=e,s=o*i,a=new Uint8Array(s);for(let t=1;t<=n.length;t++){const r=n[t-1];"bandId"in r?p(e,a,r,t):m(e,a,r,t)}const{pixels:c}=r;1===c.length&&(c[1]=c[0].slice(),c[2]=c[0].slice());const u=n.map(t=>t.color),[h,f,d]=c;if(r.mask){const t=r.mask;for(let e=0;e<s;e++)if(t[e]){t[e]=255;const r=a[e];if(r){const n=u[r-1];h[e]=n[0],f[e]=n[1],d[e]=n[2],t[e]=n[3]}}}else{const t=new Uint8Array(s).fill(255);for(let e=0;e<s;e++){const r=a[e];if(r){const n=u[r-1];h[e]=n[0],f[e]=n[1],d[e]=n[2],t[e]=n[3]}}r.mask=t}r.maskIsAlpha=!0}function y(t,e){if(!l(t))return null;const r=t.clone(),{pixels:n}=r,o=r.width*r.height,i=e.length,s=Math.floor(i/2),a=e[Math.floor(s)],c=n[0],u=new Uint8Array(o),h=new Uint8Array(o),f=new Uint8Array(o);let d=r.mask;const p=4===e[0].mappedColor.length;d||(d=new Uint8Array(o),d.fill(p?255:1),r.mask=d);for(let t=0;t<o;t++)if(d[t]){const r=c[t];let n=!1,o=s,l=a,p=0,m=i-1;for(;m-p>1;){if(r===l.value){n=!0;break}r>l.value?p=o:m=o,o=Math.floor((p+m)/2),l=e[Math.floor(o)]}n||(r===e[p].value?(l=e[p],n=!0):r===e[m].value?(l=e[m],n=!0):r<e[p].value?n=!1:r>e[p].value&&(r<e[m].value?(l=e[p],n=!0):m===i-1?n=!1:(l=e[m],n=!0))),n?(u[t]=l.mappedColor[0],h[t]=l.mappedColor[1],f[t]=l.mappedColor[2],d[t]=l.mappedColor[3]):u[t]=h[t]=f[t]=d[t]=0}return r.pixels=[u,h,f],r.mask=d,r.pixelType="u8",r.maskIsAlpha=p,r}function w(t,e,r=!1){const o=1e-5,i=new Float32Array(3*s),a=e.length;for(let l=0;l<s;l++)i[3*l]=t[2*l]??n.pq-1,i[3*l+1]=t[2*l+1]??n.pq,i[3*l+2]=e[l]??0,l<a&&(l>0&&(i[3*l]-=o),t[2*l+1]!==t[2*l]&&(l<a-1||!r)&&(i[3*l+1]-=o));return i}function C(t,e){if(!l(t))return null;const{width:r,height:n}=t,{inputRanges:s,outputValues:a,outputPixelType:c,noDataRanges:u,allowUnmatched:h,replacementValue:f,isLastInputRangeInclusive:d}=e,p=t.pixels[0],m=i.A.createEmptyBand(c,p.length),g=t.mask,y=new Uint8Array(r*n);g?y.set(g):y.fill(255);const w=t.pixelType.startsWith("f")?1e-6:0,C=s.map(t=>t-w);C[0]=s[0],C[C.length-1]=s[s.length-1]+(d?1e-6:0);const b=s.length/2,[x,v]=(0,o.hP)(c);for(let t=0;t<n;t++)for(let e=0;e<r;e++){const n=t*r+e;if(y[n]){const t=p[n];let e=!1;for(let r=b-1;r>=0;r--)if(t===s[2*r]||t>C[2*r]&&t<C[2*r+1]){m[n]=a[r],e=!0;break}e||(h?m[n]=t>v?v:t<x?x:f??t:y[n]=0)}}const A=u?.length;if(A)for(let t=0;t<n;t++)for(let e=0;e<r;e++){const n=t*r+e;if(!g||g[n]){const t=p[n];for(let e=0;e<A;e+=2)if(t>=u[e]&&t<=u[e+1]){m[n]=0,y[n]=0;break}}}return new i.A({width:r,height:n,pixelType:c,pixels:[m],mask:y})}function b(t,e,r,n){const o=null!=r&&r.length>=2?new Set(r):null,i=1===r?.length?r[0]:null,s=!!e?.length;for(let r=0;r<t.length;r++)if(n[r]){const a=t[r];if(s){let t=!1;for(let r=0;r<e.length;r+=2)if(a>=e[r]&&a<=e[r+1]){t=!0;break}t||(n[r]=0)}n[r]&&(a===i||o?.has(a))&&(n[r]=0)}}function x(t,e){const r=t[0].length;e??=new Uint8Array(r).fill(255);for(let n=0;n<r;n++)if(e[n]){let r=!1;for(let e=0;e<t.length;e++)if(t[e][n]){r=!0;break}r||(e[n]=0)}return e}function v(t,e){const r=t[0].length;e??=new Uint8Array(r).fill(255);for(let n=0;n<r;n++)if(e[n]){let r=!1;for(let e=0;e<t.length;e++)if(0===t[e][n]){r=!0;break}r&&(e[n]=0)}return e}function A(t,e){if(!l(t))return null;const{width:r,height:n,pixels:o}=t,s=r*n,a=new Uint8Array(s);t.mask?a.set(t.mask):a.fill(255);const c=o.length,{includedRanges:u,noDataValues:h,outputPixelType:f,matchAll:p,lookups:m}=e;if(m){const t=[];for(let e=0;e<c;e++){const r=m[e],n=d(o[e],a,r.lut,r.offset||0,"u8");t.push(n)}1===t.length?a.set(t[0]):p?x(t,a):v(t,a)}else if(p){const t=[];for(let e=0;e<c;e++){const r=new Uint8Array(s);r.set(a),b(o[e],u?.slice(2*e,2*e+2),h?.[e],r),t.push(r)}1===t.length?a.set(t[0]):x(t,a)}else for(let t=0;t<c;t++)b(o[t],u?.slice(2*t,2*t+2),h?.[t],a);return new i.A({width:r,height:n,pixelType:f,pixels:o,mask:a})}function k(t){const{srcPixelType:e,inputRanges:r,outputValues:n,allowUnmatched:s,noDataRanges:a,isLastInputRangeInclusive:l,outputPixelType:c}=t;if("u8"!==e&&"s8"!==e&&"u16"!==e&&"s16"!==e)return null;const u=e.includes("16")?65536:256,h=e.includes("s")?-u/2:0,f=i.A.createEmptyBand(c,u),d=new Uint8Array(u);s&&d.fill(255);const[p,m]=(0,o.hP)(c);if(r?.length&&n?.length){const t=1e-6,e=r.map(e=>e-t);e[0]=r[0],l&&(e[e.length-1]=r[r.length-1]);for(let t=0;t<e.length;t++){const o=n[t]>m?m:n[t]<p?p:n[t],i=Math.ceil(e[2*t]-h),s=r[2*t+1]===r[2*t]?i:Math.floor(e[2*t+1]-h);for(let t=i;t<=s;t++)f[t]=o,d[t]=255}}if(a?.length)for(let t=0;t<a.length;t++){const e=Math.ceil(a[2*t]-h),r=Math.floor(a[2*t+1]-h);for(let t=e;t<=r;t++)d[t]=0}return{lut:f,offset:h,mask:d}}function M(t,e,r){if("u8"!==t&&"s8"!==t&&"u16"!==t&&"s16"!==t)return null;const n=t.includes("16")?65536:256,o=t.includes("s")?-n/2:0,i=new Uint8Array(n);if(e)for(let t=0;t<e.length;t++){const r=Math.ceil(e[2*t]-o),n=Math.floor(e[2*t+1]-o);for(let t=r;t<=n;t++)i[t]=255}else i.fill(255);if(r)for(let t=0;t<r.length;t++)i[r[t]-o]=0;return{lut:i,offset:o}}function T(t,e,r,n,o,i){const{width:s,height:a}=r.block,{x:l,y:c}=r.offset,{width:u,height:h}=r.mosaic,f=function(t,e,r,n,o,i,s,a){return{xmin:o<=r*t?0:o<r*t+t?o-r*t:t,ymin:i<=n*e?0:i<n*e+e?i-n*e:e,xmax:o+s<=r*t?0:o+s<r*t+t?o+s-r*t:t,ymax:i+a<=n*e?0:i+a<n*e+e?i+a-n*e:e}}(s,a,n,o,l,c,u,h);let d=0,p=0;if(i){const t=i.hasGCSSShiftTransform?360:i.halfWorldWidth??0,e=s*i.resolutionX,r=i.startX+n*e;r<t&&r+e>t?p=i.rightPadding:r>=t&&(d=i.leftMargin-i.rightPadding,p=0)}if(f.xmax-=p,"number"!=typeof e)for(let r=f.ymin;r<f.ymax;r++){const i=(o*a+r-c)*u+(n*s-l)+d,h=r*s;for(let r=f.xmin;r<f.xmax;r++)t[i+r]=e[h+r]}else for(let r=f.ymin;r<f.ymax;r++){const i=(o*a+r-c)*u+(n*s-l)+d;for(let r=f.xmin;r<f.xmax;r++)t[i+r]=e}}function S(t,e,r={}){const{clipOffset:n,clipSize:o,alignmentInfo:s,blockWidths:a}=r;if(a)return function(t,e,r){const n=t.find(t=>null!=t);if(null==n)return null;const o=t.some(t=>null==t||!!t.mask),{width:s,height:a}=e,c=o?new Uint8Array(s*a):null,{blockWidths:u}=r,h=[],f=n.getPlaneCount(),d=i.A.getPixelArrayConstructor(n.pixelType);if(o)for(let e=0,r=0;e<t.length;r+=u[e],e++){const n=t[e];if(!l(n))continue;const o=n.mask;for(let t=0;t<a;t++)for(let i=0;i<u[e];i++)c[t*s+i+r]=null==o?255:o[t*n.width+i]}const p=t.some(t=>t?.bandMasks&&t.bandMasks.length>1),m=p?[]:void 0,g=s*a;for(let e=0;e<f;e++){const r=new d(g),n=p?new Uint8Array(g):void 0;for(let o=0,i=0;o<t.length;i+=u[o],o++){const c=t[o];if(!l(c))continue;const h=c.pixels[e];if(null!=h){for(let t=0;t<a;t++)for(let e=0;e<u[o];e++)r[t*s+e+i]=h[t*c.width+e];if(n){const t=c.bandMasks?.[e]??c.mask;for(let e=0;e<a;e++)for(let r=0;r<u[o];r++)n[e*s+r+i]=t?t[e*c.width+r]:255}}}h.push(r),m&&n&&m.push(n)}const y=new i.A({width:s,height:a,mask:c,bandMasks:m,pixels:h,pixelType:n.pixelType});return y.updateStatistics(),y}(t,e,{blockWidths:a});const c=t.find(t=>l(t));if(null==c)return null;const u=o?o.width:e.width,h=o?o.height:e.height,f=c.width,d=c.height,p=e.width/f,m=e.height/d,g={offset:n||{x:0,y:0},mosaic:o||e,block:{width:f,height:d}},y=c.pixelType,w=i.A.getPixelArrayConstructor(y),C=c.pixels.length,b=[];let x,v;for(let e=0;e<C;e++){v=new w(u*h);for(let r=0;r<m;r++)for(let n=0;n<p;n++){const o=t[r*p+n];l(o)&&(x=o.pixels[e],T(v,x,g,n,r,s))}b.push(v)}const A=t.some(t=>null==t||null!=t.mask&&t.mask.length>0),k=t.some(t=>t?.bandMasks&&t.bandMasks.length>1),M=A?new Uint8Array(u*h):void 0,S=k?[]:void 0;if(M){for(let e=0;e<m;e++)for(let r=0;r<p;r++){const n=t[e*p+r],o=null!=n?n.mask:null;T(M,null!=o?o:n?255:0,g,r,e,s)}if(S)for(let e=0;e<C;e++){const r=new Uint8Array(u*h);for(let n=0;n<m;n++)for(let o=0;o<p;o++){const i=t[n*p+o],a=i?.bandMasks?.[e]??i?.mask;T(r,null!=a?a:i?255:0,g,o,n,s)}S.push(r)}}const I=new i.A({width:u,height:h,pixels:b,pixelType:y,bandMasks:S,mask:M});return I.updateStatistics(),I}function I(t,e,r){if(!l(t))return null;const{width:n,height:o}=t,i=e.x,s=e.y,a=r.width+i,c=r.height+s;if(i<0||s<0||a>n||c>o)return t;if(0===i&&0===s&&a===n&&c===o)return t;t.mask||(t.mask=new Uint8Array(n*o));const u=t.mask;for(let t=0;t<o;t++){const e=t*n;for(let r=0;r<n;r++)u[e+r]=t<s||t>=c||r<i||r>=a?0:1}return t.updateStatistics(),t}function P(t){if(0===t.size)return 0;let e=0,r=-1,n=0;const o=t.keys();let i=o.next();for(;!i.done;)n=t.get(i.value),n>e&&(r=i.value,e=n),i=o.next();return r}function E(t,e,r){if(0===r)return;const n=t.get(e);1===n?t.delete(e):t.set(e,n-1)}function R(t,e,r){0!==r&&t.set(e,t.has(e)?t.get(e)+1:1)}function L(t,e,r){let{x:n,y:o}=e;const{width:s,height:a}=r;if(0===n&&0===o&&a===t.height&&s===t.width)return t;const{width:c,height:u}=t,h=Math.max(0,o),f=Math.max(0,n),d=Math.min(n+s,c),p=Math.min(o+a,u);if(d<0||p<0||!l(t))return null;n=Math.max(0,-n),o=Math.max(0,-o);const{pixels:m}=t,g=s*a,y=m.length,w=[];for(let e=0;e<y;e++){const r=m[e],a=i.A.createEmptyBand(t.pixelType,g);for(let t=h;t<p;t++){const e=t*c;let i=(t+o-h)*s+n;for(let t=f;t<d;t++)a[i++]=r[e+t]}w.push(a)}const C=new Uint8Array(g),b=t.mask;for(let t=h;t<p;t++){const e=t*c;let r=(t+o-h)*s+n;for(let t=f;t<d;t++)C[r++]=b?b[e+t]:1}const x=new i.A({width:r.width,height:r.height,pixelType:t.pixelType,pixels:w,mask:C});return x.updateStatistics(),x}function U(t,e=!0){if(!l(t))return null;const{pixels:r,width:n,height:o,mask:s,pixelType:a}=t,c=[],u=Math.round(n/2),h=Math.round(o/2),f=o-1,d=n-1;for(let t=0;t<r.length;t++){const s=r[t],l=i.A.createEmptyBand(a,u*h);let p=0;for(let t=0;t<o;t+=2)for(let r=0;r<n