@arcgis/core 4.34.0-next.25 → 4.34.0-next.26
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/applications/Components/imageryUtils.d.ts +3 -0
- package/applications/Components/imageryUtils.js +1 -1
- package/assets/esri/core/workers/RemoteClient.js +1 -1
- package/assets/esri/core/workers/chunks/03ee4d63aa8de44958ab.js +1 -0
- package/assets/esri/core/workers/chunks/{453e536f566d80a9863b.js → 21a8ae88cfa644a30058.js} +1 -1
- package/assets/esri/core/workers/chunks/2c2128201c80a1b1aeb6.js +1 -0
- package/assets/esri/core/workers/chunks/{5a9b27f2b343cd5b0852.js → 2d3679289b34b7da6bf4.js} +1 -1
- package/assets/esri/core/workers/chunks/{07613c89255bdab6b7c6.js → 4de6c479df609398dee0.js} +1 -1
- package/assets/esri/core/workers/chunks/6b6ab092f578b20c8e56.js +1 -0
- package/assets/esri/core/workers/chunks/7359652de3d7f969a712.js +1 -0
- package/assets/esri/core/workers/chunks/{d81260303a11d3fbe940.js → 7b736885278af9676f3a.js} +1 -1
- package/assets/esri/core/workers/chunks/8161b0a674ef9bf536a2.js +1 -0
- package/assets/esri/core/workers/chunks/908ec8165d567f052155.js +1 -0
- package/assets/esri/core/workers/chunks/{97324f030738fc0d456b.js → 9182fe69b9863e1de714.js} +1 -1
- package/assets/esri/core/workers/chunks/91e6030a2845f5404e82.js +1 -0
- package/assets/esri/core/workers/chunks/9d85e20a3d6ca1161c26.js +1 -0
- package/assets/esri/core/workers/chunks/a19689f8d1ef48fd2159.js +1 -0
- package/assets/esri/core/workers/chunks/a8f37681f8f6feebbd50.js +1 -0
- package/assets/esri/core/workers/chunks/{92737419b66894799a34.js → aeedc543320ee307d14a.js} +1 -1
- package/assets/esri/core/workers/chunks/{29ae5723fa35aa73ff9b.js → b3794c513a13facc98d3.js} +1 -1
- package/assets/esri/core/workers/chunks/{9a78cb291c966f8ddda6.js → c6c0263fbcf2ca245c1b.js} +2 -2
- package/assets/esri/core/workers/chunks/c6c3e703b18e1bb7113a.js +1 -0
- package/assets/esri/core/workers/chunks/f5ee10a8afb7f70833bb.js +346 -0
- package/assets/esri/core/workers/chunks/{4f14e78d0560050c1a81.js → fa7243f080bcf6444929.js} +1 -1
- package/config.js +1 -1
- package/core/PooledArray.js +1 -1
- package/core/heapSort.js +5 -0
- package/core/mathUtils.js +1 -1
- package/interfaces.d.ts +55 -0
- package/kernel.js +1 -1
- package/layers/support/RasterJobHandler.js +1 -1
- package/layers/support/RasterWorker.js +1 -1
- package/layers/support/rasterDatasets/pixelReader.js +1 -1
- package/layers/support/rasterFunctions/pixelUtils.js +1 -1
- package/layers/support/rasterFunctions/stretchUtils.js +1 -1
- package/package.json +1 -1
- package/smartMapping/renderers/size.js +1 -1
- package/smartMapping/renderers/support/spikeUtils.js +1 -1
- package/support/revision.js +1 -1
- package/views/2d/engine/ParentChildStage.js +1 -1
- package/views/2d/engine/webgl/FeatureTile.js +1 -1
- package/views/2d/layers/FeatureLayerView2D.js +1 -1
- package/views/2d/tiling/FeatureTileSubscriptionManager.js +1 -1
- package/views/3d/layers/graphics/DeconflictAABR.js +1 -1
- package/views/3d/layers/graphics/Graphics3DWaterSymbolLayer.js +1 -1
- package/views/3d/terrain/OverlayRenderer.js +1 -1
- package/views/3d/terrain/TerrainRenderer.js +1 -1
- package/views/3d/webgl-engine/collections/Component/Material/ComponentMaterial.js +1 -1
- package/views/3d/webgl-engine/core/shaderLibrary/terrain/Overlay.glsl.js +1 -1
- package/views/3d/webgl-engine/lib/SortedRenderGeometryRenderer.js +1 -1
- package/views/3d/webgl-engine/materials/renderers/MergedRenderer.js +1 -1
- package/assets/esri/core/workers/chunks/4b68b6985430c42316b7.js +0 -1
- package/assets/esri/core/workers/chunks/60aeb7a5ccd8bc71be02.js +0 -1
- package/assets/esri/core/workers/chunks/6a1cf6b0ffdf6080b5c4.js +0 -1
- package/assets/esri/core/workers/chunks/7d0c4e1518a6a63a3f87.js +0 -1
- package/assets/esri/core/workers/chunks/c19421707257fc93acb9.js +0 -1
- package/assets/esri/core/workers/chunks/c56b05a8be498b6f3ee7.js +0 -1
- package/assets/esri/core/workers/chunks/cafcb46d723d38b377a9.js +0 -1
- package/assets/esri/core/workers/chunks/cb81d448ed6bad205346.js +0 -1
- package/assets/esri/core/workers/chunks/d08a523b548e892e1222.js +0 -1
- package/assets/esri/core/workers/chunks/d9a23fb0c6c936d5e8ec.js +0 -1
- package/assets/esri/core/workers/chunks/e8e993fb8697b8f3e0c7.js +0 -346
- package/assets/esri/core/workers/chunks/fb785bc38323cce6e549.js +0 -1
- package/core/HeapSort.js +0 -5
|
@@ -1 +0,0 @@
|
|
|
1
|
-
"use strict";(self.webpackChunkRemoteClient=self.webpackChunkRemoteClient||[]).push([[1427],{4095:(t,e,r)=>{r.d(e,{CW:()=>u});var n=r(44208),o=r(53966),i=(r(34727),r(74887)),s=r(87811);r(5443),r(21325);const a=()=>o.A.getLogger("esri.views.2d.engine.flow.dataUtils"),l=10;async function u(t,e,r,o){const u=performance.now(),c=function(t,e){const r=function(t,e,r,n){if(0===n)return t;const o=Math.round(3*n),i=new Array(2*o+1);let s=0;for(let t=-o;t<=o;t++){const e=Math.exp(-t*t/(n*n));i[t+o]=e,s+=e}for(let t=-o;t<=o;t++)i[t+o]/=s;const a=new Float32Array(t.length);for(let n=0;n<r;n++)for(let r=0;r<e;r++){let s=0,l=0;for(let a=-o;a<=o;a++){if(r+a<0||r+a>=e)continue;const u=i[a+o];s+=u*t[2*(n*e+(r+a))],l+=u*t[2*(n*e+(r+a))+1]}a[2*(n*e+r)]=s,a[2*(n*e+r)+1]=l}const l=new Float32Array(t.length);for(let t=0;t<e;t++)for(let n=0;n<r;n++){let s=0,u=0;for(let l=-o;l<=o;l++){if(n+l<0||n+l>=r)continue;const c=i[l+o];s+=c*a[2*((n+l)*e+t)],u+=c*a[2*((n+l)*e+t)+1]}l[2*(n*e+t)]=s,l[2*(n*e+t)+1]=u}return l}(e.data,e.width,e.height,t.smoothing);return t.interpolate?(t,n)=>{const o=Math.floor(t),i=Math.floor(n);if(o<0||o>=e.width)return[0,0];if(i<0||i>=e.height)return[0,0];const s=t-o,a=n-i,l=o,u=i,c=o<e.width-1?o+1:o,h=i<e.height-1?i+1:i,f=r[2*(u*e.width+l)],p=r[2*(u*e.width+c)],d=r[2*(h*e.width+l)],m=r[2*(h*e.width+c)],g=r[2*(u*e.width+l)+1],y=r[2*(u*e.width+c)+1];return[(f*(1-a)+d*a)*(1-s)+(p*(1-a)+m*a)*s,(g*(1-a)+r[2*(h*e.width+l)+1]*a)*(1-s)+(y*(1-a)+r[2*(h*e.width+c)+1]*a)*s]}:(t,n)=>{const o=Math.round(t),i=Math.round(n);return o<0||o>=e.width||i<0||i>=e.height?[0,0]:[r[2*(i*e.width+o)],r[2*(i*e.width+o)+1]]}}(e,r),f=performance.now(),p=h(e,c,r.width,r.height),d=performance.now(),m=function(t){const e=new s.A,r=t.reduce((t,e)=>t+e.length,0),n=new Float32Array(4*r),o=new Array(t.length);let i=0,a=0;for(const r of t){const t=i;for(const t of r)n[4*i]=t.x,n[4*i+1]=t.y,n[4*i+2]=t.t,n[4*i+3]=t.speed,i++;o[a++]={startVertex:t,numberOfVertices:r.length,totalTime:r[r.length-1].t,timeSeed:e.getFloat()}}return{lineVertices:n,lineDescriptors:o}}(p),g=performance.now(),y="Streamlines"===t?function(t,e){const{lineVertices:r,lineDescriptors:n}=t;let o=0,i=0;for(const t of n)o+=2*t.numberOfVertices,i+=6*(t.numberOfVertices-1);const s=new Float32Array(9*o),a=new Uint32Array(i);let l=0,u=0;function c(){a[u++]=l-2,a[u++]=l,a[u++]=l-1,a[u++]=l,a[u++]=l+1,a[u++]=l-1}function h(t,e,r,n,o,i,a,u){const c=9*l;let h=0;s[c+h++]=t,s[c+h++]=e,s[c+h++]=1,s[c+h++]=r,s[c+h++]=i,s[c+h++]=a,s[c+h++]=n/2,s[c+h++]=o/2,s[c+h++]=u,l++,s[c+h++]=t,s[c+h++]=e,s[c+h++]=-1,s[c+h++]=r,s[c+h++]=i,s[c+h++]=a,s[c+h++]=-n/2,s[c+h++]=-o/2,s[c+h++]=u,l++}for(const t of n){const{totalTime:n,timeSeed:o}=t;let i=null,s=null,a=null,l=null,u=null,f=null;for(let p=0;p<t.numberOfVertices;p++){const d=r[4*(t.startVertex+p)],m=r[4*(t.startVertex+p)+1],g=r[4*(t.startVertex+p)+2],y=r[4*(t.startVertex+p)+3];let w=null,b=null,C=null,x=null;if(p>0){w=d-i,b=m-s;const t=Math.sqrt(w*w+b*b);if(w/=t,b/=t,p>1){let t=w+u,r=b+f;const n=Math.sqrt(t*t+r*r);t/=n,r/=n;const o=Math.min(1/(t*w+r*b),e);t*=o,r*=o,C=-r,x=t}else C=-b,x=w;null!==C&&null!==x&&(h(i,s,a,C,x,n,o,y),c())}i=d,s=m,a=g,u=w,f=b,l=y}h(i,s,a,-f,u,n,o,l)}return{vertexData:s,indexData:a}}(m,l):function(t){const{lineVertices:e,lineDescriptors:r}=t;let n=0,o=0;for(const t of r){const e=t.numberOfVertices-1;n+=4*e*2,o+=6*e*2}const i=new Float32Array(16*n),s=new Uint32Array(o);let a,l,u,c,h,f,p,d,m,g,y,w,b,C,x=0,v=0;function A(){s[v++]=x-8,s[v++]=x-7,s[v++]=x-6,s[v++]=x-7,s[v++]=x-5,s[v++]=x-6,s[v++]=x-4,s[v++]=x-3,s[v++]=x-2,s[v++]=x-3,s[v++]=x-1,s[v++]=x-2}function k(t,e,r,n,o,s,a,l,u,c,h,f,p,d){const m=16*x;let g=0;for(const y of[1,2])for(const w of[1,2,3,4])i[m+g++]=t,i[m+g++]=e,i[m+g++]=r,i[m+g++]=n,i[m+g++]=a,i[m+g++]=l,i[m+g++]=u,i[m+g++]=c,i[m+g++]=y,i[m+g++]=w,i[m+g++]=p,i[m+g++]=d,i[m+g++]=o/2,i[m+g++]=s/2,i[m+g++]=h/2,i[m+g++]=f/2,x++}function M(t,e){let r=m+y,n=g+w;const o=Math.sqrt(r*r+n*n);r/=o,n/=o;const i=m*r+g*n;r/=i,n/=i;let s=y+b,x=w+C;const v=Math.sqrt(s*s+x*x);s/=v,x/=v;const M=y*s+w*x;s/=M,x/=M,k(a,l,u,c,-n,r,h,f,p,d,-x,s,t,e),A()}function S(t,e,r,n,o,i){if(m=y,g=w,y=b,w=C,null==m&&null==g&&(m=y,g=w),null!=h&&null!=f){b=t-h,C=e-f;const r=Math.sqrt(b*b+C*C);b/=r,C/=r}null!=m&&null!=g&&M(o,i),a=h,l=f,u=p,c=d,h=t,f=e,p=r,d=n}function T(t,e){m=y,g=w,y=b,w=C,null==m&&null==g&&(m=y,g=w),null!=m&&null!=g&&M(t,e)}for(const t of r){a=null,l=null,u=null,c=null,h=null,f=null,p=null,d=null,m=null,g=null,y=null,w=null,b=null,C=null;const{totalTime:r,timeSeed:n}=t;for(let o=0;o<t.numberOfVertices;o++)S(e[4*(t.startVertex+o)],e[4*(t.startVertex+o)+1],e[4*(t.startVertex+o)+2],e[4*(t.startVertex+o)+3],r,n);T(r,n)}return{vertexData:i,indexData:s}}(m),w=performance.now();return(0,n.A)("esri-2d-profiler")&&(a().info("I.1","_createFlowFieldFromData (ms)",Math.round(f-u)),a().info("I.2","_getStreamlines (ms)",Math.round(d-f)),a().info("I.3","createAnimatedLinesData (ms)",Math.round(g-d)),a().info("I.4","create{Streamlines|Particles}Mesh (ms)",Math.round(w-g)),a().info("I.5","createFlowMesh (ms)",Math.round(w-u)),a().info("I.6","Mesh size (bytes)",y.vertexData.buffer.byteLength+y.indexData.buffer.byteLength)),await Promise.resolve(),(0,i.Te)(o),y}function c(t,e,r,n,o,i,s,a,l){const u=[];let c=r,h=n,f=0,[p,d]=e(c,h);p*=t.velocityScale,d*=t.velocityScale;const m=Math.sqrt(p*p+d*d);let g,y;u.push({x:c,y:h,t:f,speed:m});for(let r=0;r<t.verticesPerLine;r++){let[r,n]=e(c,h);r*=t.velocityScale,n*=t.velocityScale;const p=Math.sqrt(r*r+n*n);if(p<t.minSpeedThreshold)return u;const d=r/p,m=n/p;if(c+=d*t.segmentLength,h+=m*t.segmentLength,f+=t.segmentLength/p,Math.acos(d*g+m*y)>t.maxTurnAngle)return u;if(t.collisions){const t=Math.round(c*l),e=Math.round(h*l);if(t<0||t>s-1||e<0||e>a-1)return u;const r=i[e*s+t];if(-1!==r&&r!==o)return u;i[e*s+t]=o}u.push({x:c,y:h,t:f,speed:p}),g=d,y=m}return u}function h(t,e,r,n){const o=[],i=new s.A,a=1/Math.max(t.lineCollisionWidth,1),l=Math.round(r*a),u=Math.round(n*a),h=new Int32Array(l*u);for(let t=0;t<h.length;t++)h[t]=-1;const f=[];for(let e=0;e<n;e+=t.lineSpacing)for(let n=0;n<r;n+=t.lineSpacing)f.push({x:n,y:e,sort:i.getFloat()});f.sort((t,e)=>t.sort-e.sort);for(const{x:r,y:n}of f)if(i.getFloat()<t.density){const i=c(t,e,r,n,o.length,h,l,u,a);if(i.length<2)continue;o.push(i)}return o}},4151:(t,e,r)=>{r.d(e,{z:()=>n});class n{constructor(t=null,e=null,r=null){this.minValue=t,this.maxValue=e,this.noDataValue=r}}},6952:(t,e,r)=>{r.d(e,{DP:()=>w,Nh:()=>b,Pg:()=>y,RP:()=>h,WF:()=>c,_N:()=>C,eH:()=>m,f4:()=>g,fP:()=>p,zj:()=>f,zt:()=>u});var n=r(97768),o=r(14140),i=r(16019),s=r(70274);const a=1,l=[.299,.587,.114];function u(t){if(null==t)return!1;const{max:e,min:r,size:n}=t;return(e-r)/n===1&&r>=-.5&&.5===Math.abs(r%1)&&e<=255.5}function c(t,e=256){e=Math.min(e,256);const{size:r,counts:n}=t,o=new Float64Array(r);o[0]=n[0]/e;for(let t=1;t<r;t++)o[t]=o[t-1]+n[t]/e;const i=new Uint8Array(e),s=e/o[o.length-1];if(r<=e){const n=u(t)?Math.max(0,Math.round(t.min+.5)):0;for(let t=n;t<e;t++)i[t]=t>=r+n?255:Math.min(255,Math.trunc(o[t-n]*s))}else{const t=o.map(t=>Math.min(255,Math.trunc(t*s)));for(let n=0;n<e;n++)i[n]=t[Math.round(r/e)];i[e-1]=255}return i}function h(t){const{minCutOff:e,maxCutOff:r,gamma:n,pixelType:o,rounding:i}=t;if(!["u8","u16","s8","s16"].includes(o))return null;const s=e.length,a="s8"===o?-127:"s16"===o?-32767:0,l=["u16","s16"].includes(o)?65536:256,u=[],c=[],{minOutput:h=0,maxOutput:p=255}=t,d=p-h;for(let t=0;t<s;t++)c[t]=r[t]-e[t],u[t]=0===c[t]?0:d/c[t];const m=[];if(n&&n.length>=s){const t=b(s,n);for(let o=0;o<s;o++){const s=[];for(let u=0;u<l;u++){if(0===c[o]){s[u]=h;continue}const l=u+a,f=(l-e[o])/c[o];let m=1;if(n[o]>1&&(m-=(1/d)**(f*t[o])),l<r[o]&&l>e[o]){const t=m*d*f**(1/n[o])+h;s[u]="floor"===i?Math.floor(t):"round"===i?Math.round(t):t}else l>=r[o]?s[u]=p:s[u]=h}m[o]=s}}else for(let t=0;t<s;t++){const n=[];for(let o=0;o<l;o++){const s=o+a;if(s<=e[t])n[o]=h;else if(s>=r[t])n[o]=p;else{const r=(s-e[t])*u[t]+h;n[o]="floor"===i?Math.floor(r):"round"===i?Math.round(r):r}}m[t]=n}if(null!=t.contrastOffset){const e=f(t.contrastOffset,t.brightnessOffset);for(let t=0;t<s;t++){const r=m[t];for(let t=0;t<l;t++)r[t]=e[r[t]]}}return{lut:m,offset:a}}function f(t,e){const r=Math.min(Math.max(t,-100),100),n=Math.min(Math.max(e??0,-100),100),o=new Uint8Array(256);for(let t=0;t<256;t++){let e=0;r>0&&r<100?e=(200*t-25500+510*n)/(2*(100-r))+128:r<=0&&r>-100?e=(200*t-25500+510*n)*(100+r)/2e4+128:100===r?(e=200*t-25500+256*(100-r)+510*n,e=e>0?255:0):-100===r&&(e=128),o[t]=e>255?255:e<0?0:e}return o}function p(t,e,r){const n=[];for(let o=0;o<e.length;o++){let i=0,s=0,a=0;"min"in e[o]?({min:i,max:s,avg:a}=e[o]):[i,s,a]=e[o];let u=a??0;"u8"!==t&&(u=255*(u-i)/(s-i)),r&&(u*=l[o]),n.push(d(u))}return n}function d(t){if(t<=0||t>=255)return a;const e=t+(150===t?0:t<150?45*Math.cos(.01047*t):17*Math.sin(.021*t)),r=Math.log(t/255),n=Math.log(e/255);if(0===n)return a;const o=r/n;return isNaN(o)?a:Math.min(9.9,Math.max(.01,o))}function m(t){const{pixels:e,mask:r,pixelType:n,bandMasks:o}=t,i=e.map((t,e)=>function(t,e,r){let n=1/0,o=-1/0,i=0,s=0,a=0,l=0;const u=t.length,c=new Map,h=[];for(let r=0;r<u;r++){const u=t[r];if(!e||e[r]){h.push(u);const t=(c.get(u)??0)+1;c.set(u,t),t>l&&(l=t,a=u),n=u<n?u:n,o=u>o?u:o,i+=u,s++}}if(0===s)return{statistics:{min:0,max:0,avg:0,stddev:0,mode:0,median:0},histogram:null};const f=i/s;let p=0;for(let r=0;r<u;r++)e&&!e[r]||(p+=(t[r]-f)**2);const d=e?e.filter(t=>t).length:u,m=d<=1?0:Math.sqrt(p/(d-1));h.sort((t,e)=>t-e);const g=s>>>1,y={min:n,max:o,avg:f,stddev:m,mode:a,median:s%2?h[Math.floor(g)]:(h[g-1]+h[g])/2};if(["u8","s8","u4","u2","u1"].includes(r)){const r=o-n+1,i=new Uint32Array(r);for(let r=0;r<u;r++)e&&!e[r]||i[t[r]-n]++;return{statistics:y,histogram:{min:n-.5,max:o+.5,size:r,counts:i}}}const w=256,b=new Uint32Array(w),C=(o-n)/w;if(0===C)return{statistics:y,histogram:{min:n,max:o,size:1,counts:new Uint32Array(1).fill(s)}};const x=new Uint32Array(257);for(let r=0;r<u;r++)e&&!e[r]||x[Math.floor((t[r]-n)/C)]++;for(let t=0;t<255;t++)b[t]=x[t];return b[255]=x[255]+x[w],{statistics:y,histogram:{min:n,max:o,size:w,counts:b}}}(t,o?.[e]??r,n));return{statistics:i.map(({statistics:t})=>t),histograms:i.map(({histogram:t})=>t)}}function g(t){if(!t?.pixels?.length)return null;const{pixels:e,mask:r,bandMasks:n,pixelType:o}=t,i=t.width*t.height,s=e.length,a=[],l=[],u=256;let c,h;for(let f=0;f<s;f++){let s=new Uint32Array(u);const p=e[f],d=n?.[f]??r;if("u8"===o){if(c=255,h=0,d){for(let t=0;t<i;t++)if(d[t]){const e=p[t];c=e<c?e:c,h=e>h?e:h,s[e]++}}else for(let t=0;t<i;t++){const e=p[t];c=e<c?e:c,h=e>h?e:h,s[e]++}s=s.slice(c,h+1)}else{let e=!1;t.statistics||(t.updateStatistics(),e=!0);const r=t.statistics;c=r[f].minValue,h=r[f].maxValue;const n=(h-c)/u;if(0===n){!r||t.validPixelCount||e||t.updateStatistics();const n=(t.validPixelCount||t.width*t.height)/u;for(let t=0;t<u;t++)s[t]=Math.round(n*(t+1))-Math.round(n*t)}else{const t=new Uint32Array(257);for(let e=0;e<i;e++)d&&!d[e]||t[Math.floor((p[e]-c)/n)]++;for(let e=0;e<255;e++)s[e]=t[e];s[255]=t[255]+t[u]}}const m="u8"===o?c-.5:c,g="u8"===o?h+.5:h;a.push({min:m,max:g,size:s.length,counts:s});let y=0,w=0,b=0;for(let t=0;t<s.length;t++)y+=s[t],w+=t*s[t];const C=w/y;for(let t=0;t<s.length;t++)b+=s[t]*(t-C)**2;const x=Math.sqrt(b/(y-1)),v=(g-m)/s.length,A=(C+("u8"===o?0:.5))*v+c,k=x*v;l.push({min:c,max:h,avg:A,stddev:k})}return{statistics:l,histograms:a}}function y(t){const e=[];for(let r=0;r<t.length;r++){const{min:n,max:o,size:i,counts:s}=t[r];let a=0,l=0;for(let t=0;t<i;t++)a+=s[t],l+=t*s[t];const u=l/a;let c=0;for(let t=0;t<i;t++)c+=s[t]*(t-u)**2;const h=(o-n)/i,f=(u+.5)*h+n,p=Math.sqrt(c/(a-1))*h;e.push({min:n,max:o,avg:f,stddev:p})}return e}function w(t,e){const{pixelBlock:r,bandIds:o,returnHistogramLut:a,rasterInfo:l}=e;let u=null,h=null,f=t.stretchType;if("number"==typeof f&&(f=s.x[f]),t.dra)if("minMax"===f&&r?.statistics)u=r.statistics.map(t=>[t.minValue,t.maxValue,0,0]);else{const t=g(r);u=null!=t?t.statistics:null,h=null!=t?t.histograms:null}else u=t.statistics?.length?t.statistics:l.statistics,h="histograms"in t?t.histograms:void 0,h||(h=l.histograms);"percentClip"!==f&&"histogramEqualization"!==f||h?.length||(f="minMax");const p=u?.length||h?.length||l.bandCount,d=[],m=[];u&&!Array.isArray(u[0])&&(u=u.map(t=>[t.min,t.max,t.avg,t.stddev]));const[y,w]=(0,i.hP)(l.pixelType);if(!u?.length){u=[];for(let t=0;t<p;t++)u.push([y,w,1,1]);"standardDeviation"===f&&(f="minMax")}switch(f){case"none":for(let t=0;t<p;t++)d[t]=y,m[t]=w;break;case"minMax":for(let t=0;t<p;t++){const e=u[t];d[t]=e[0],m[t]=e[1]}break;case"standardDeviation":{const{numberOfStandardDeviations:e=2}=t;for(let t=0;t<p;t++){const r=u[t];d[t]=r[2]-e*r[3],m[t]=r[2]+e*r[3],d[t]<r[0]&&(d[t]=r[0]),m[t]>r[1]&&(m[t]=r[1])}}break;case"histogramEqualization":(0,n.Lw)(h);for(let t=0;t<p;t++)d[t]=h[t].min,m[t]=h[t].max;break;case"percentClip":(0,n.Lw)(h);for(let e=0;e<h.length;e++){const r=h[e],n=new Uint32Array(r.size),o=[...r.counts];o.length>=20&&(o[0]=o[1]=o[2]=o[o.length-1]=o[o.length-2]=0);let i=0;const s=(r.max-r.min)/r.size,a=-.5===r.min&&1===s?.5:0;for(let t=0;t<r.size;t++)i+=o[t],n[t]=i;let l=(t.minPercent||0)*i/100;d[e]=r.min+a;for(let t=0;t<r.size;t++)if(n[t]>l){d[e]=r.min+s*(t+a);break}l=(1-(t.maxPercent||0)/100)*i,m[e]=r.max+a;for(let t=r.size-2;t>=0;t--)if(n[t]<l){m[e]=r.min+s*(t+2-a);break}if(m[e]<d[e]){const t=d[e];d[e]=m[e],m[e]=t}}break;default:for(let t=0;t<p;t++){const e=u[t];d[t]=e[0],m[t]=e[1]}}let b,C,x;return"histogramEqualization"===f?((0,n.Lw)(h),C=h[0].size||256,b=0,a&&(x=h.map(t=>c(t)))):(C=t.max||255,b=t.min||0),function(t,e){if(null==e||0===e.length)return t;const r=Math.max.apply(null,e),{minCutOff:n,maxCutOff:o,minOutput:i,maxOutput:s,histogramLut:a}=t;return n.length===e.length||n.length<=r?t:{minCutOff:e.map(t=>n[t]),maxCutOff:e.map(t=>o[t]),histogramLut:a?e.map(t=>a[t]):null,minOutput:i,maxOutput:s}}({minCutOff:d,maxCutOff:m,maxOutput:C,minOutput:b,histogramLut:x},o)}function b(t,e){const r=new Float32Array(t);for(let n=0;n<t;n++)e[n]>1?e[n]>2?r[n]=6.5+(e[n]-2)**2.5:r[n]=6.5+100*(2-e[n])**4:r[n]=1;return r}function C(t,e){if(!t?.pixels?.length)return t;const{mask:r,bandMasks:n,width:i,height:s,pixels:a}=t,{minCutOff:l,maxCutOff:u,minOutput:c,maxOutput:h,gamma:f}=e,p=i*s,d=e.outputPixelType||"u8",m=t.pixels.map(()=>o.A.createEmptyBand(d,p)),g=m.length,y=h-c,w=[],C=[];for(let t=0;t<g;t++)C[t]=u[t]-l[t],w[t]=0===C[t]?0:y/C[t];const x=d.startsWith("u")||d.startsWith("s"),v=f&&f.length>=g,A=!!e.isRenderer;if(v){const t=b(g,f);for(let e=0;e<g;e++){const o=n?.[e]??r;for(let r=0;r<p;r++)if(null==o||o[r]){if(0===C[e]){m[e][r]=c;continue}const n=a[e][r],o=(n-l[e])/C[e];let i=1;if(f[e]>1&&(i-=(1/y)**(o*t[e])),n<u[e]&&n>l[e]){const t=i*y*o**(1/f[e])+c;m[e][r]=A?Math.floor(t):x?Math.round(t):t}else n>=u[e]?m[e][r]=h:m[e][r]=c}}}else for(let t=0;t<g;t++){const e=n?.[t]??r;for(let r=0;r<p;r++)if(null==e||e[r]){const e=a[t][r];if(e<u[t]&&e>l[t]){const n=(e-l[t])*w[t]+c;m[t][r]=A?Math.floor(n):x?Math.round(n):n}else e>=u[t]?m[t][r]=h:m[t][r]=c}}const k=new o.A({width:i,height:s,mask:r,bandMasks:n,pixels:m,pixelType:d});return k.updateStatistics(),k}},11053:(t,e,r)=>{r.d(e,{c:()=>n,g:()=>o});var n="undefined"!=typeof globalThis?globalThis:"undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof self?self:{};function o(t){return t&&t.__esModule&&Object.prototype.hasOwnProperty.call(t,"default")?t.default:t}},12196:(t,e,r)=>{r.d(e,{NB:()=>n,RR:()=>a,YC:()=>i,kq:()=>s});const n=(()=>{const t=[];return t[254]="NEWSUBFILETYPE",t[255]="SUBFILETYPE",t[256]="IMAGEWIDTH",t[257]="IMAGELENGTH",t[258]="BITSPERSAMPLE",t[259]="COMPRESSION",t[262]="PHOTOMETRICINTERPRETATION",t[263]="THRESHHOLDING",t[264]="CELLWIDTH",t[265]="CELLLENGTH",t[266]="FILLORDER",t[269]="DOCUMENTNAME",t[270]="IMAGEDESCRIPTION",t[271]="MAKE",t[272]="MODEL",t[273]="STRIPOFFSETS",t[274]="ORIENTATION",t[277]="SAMPLESPERPIXEL",t[278]="ROWSPERSTRIP",t[279]="STRIPBYTECOUNTS",t[280]="MINSAMPLEVALUE",t[281]="MAXSAMPLEVALUE",t[282]="XRESOLUTION",t[283]="YRESOLUTION",t[284]="PLANARCONFIGURATION",t[285]="PAGENAME",t[286]="XPOSITION",t[287]="YPOSITION",t[288]="FREEOFFSETS",t[289]="FREEBYTECOUNTS",t[290]="GRAYRESPONSEUNIT",t[291]="GRAYRESPONSECURVE",t[292]="T4OPTIONS",t[293]="T6OPTIONS",t[296]="RESOLUTIONUNIT",t[297]="PAGENUMBER",t[300]="COLORRESPONSEUNIT",t[301]="TRANSFERFUNCTION",t[305]="SOFTWARE",t[306]="DATETIME",t[315]="ARTIST",t[316]="HOSTCOMPUTER",t[317]="PREDICTOR",t[318]="WHITEPOINT",t[319]="PRIMARYCHROMATICITIES",t[320]="COLORMAP",t[321]="HALFTONEHINTS",t[322]="TILEWIDTH",t[323]="TILELENGTH",t[324]="TILEOFFSETS",t[325]="TILEBYTECOUNTS",t[326]="BADFAXLINES",t[327]="CLEANFAXDATA",t[328]="CONSECUTIVEBADFAXLINES",t[330]="SUBIFD",t[332]="INKSET",t[333]="INKNAMES",t[334]="NUMBEROFINKS",t[336]="DOTRANGE",t[337]="TARGETPRINTER",t[338]="EXTRASAMPLES",t[339]="SAMPLEFORMAT",t[340]="SMINSAMPLEVALUE",t[341]="SMAXSAMPLEVALUE",t[342]="TRANSFERRANGE",t[347]="JPEGTABLES",t[512]="JPEGPROC",t[513]="JPEGIFOFFSET",t[514]="JPEGIFBYTECOUNT",t[515]="JPEGRESTARTINTERVAL",t[517]="JPEGLOSSLESSPREDICTORS",t[518]="JPEGPOINTTRANSFORM",t[519]="JPEGQTABLES",t[520]="JPEGDCTABLES",t[521]="JPEGACTABLES",t[529]="YCBCRCOEFFICIENTS",t[530]="YCBCRSUBSAMPLING",t[531]="YCBCRPOSITIONING",t[532]="REFERENCEBLACKWHITE",t[700]="XMP",t[33550]="GEOPIXELSCALE",t[33922]="GEOTIEPOINTS",t[33432]="COPYRIGHT",t[42112]="GDAL_METADATA",t[42113]="GDAL_NODATA",t[50844]="RPCCOEFFICIENT",t[34264]="GEOTRANSMATRIX",t[34735]="GEOKEYDIRECTORY",t[34736]="GEODOUBLEPARAMS",t[34737]="GEOASCIIPARAMS",t[34665]="EXIFIFD",t[34853]="GPSIFD",t[40965]="INTEROPERABILITYIFD",t})(),o=(()=>{const t=n.slice();return t[36864]="ExifVersion",t[40960]="FlashpixVersion",t[40961]="ColorSpace",t[42240]="Gamma",t[37121]="ComponentsConfiguration",t[37122]="CompressedBitsPerPixel",t[40962]="PixelXDimension",t[40963]="PixelYDimension",t[37500]="MakerNote",t[37510]="UserComment",t[40964]="RelatedSoundFile",t[36867]="DateTimeOriginal",t[36868]="DateTimeDigitized",t[36880]="OffsetTime",t[36881]="OffsetTimeOriginal",t[36882]="OffsetTimeDigitized",t[37520]="SubSecTime",t[37521]="SubSecTimeOriginal",t[37522]="SubSecTimeDigitized",t[37888]="Temperature",t[37889]="Humidity",t[37890]="Pressure",t[37891]="WaterDepth",t[37892]="Acceleration",t[37893]="CameraElevationAngle",t[42016]="ImageUniqueID",t[42032]="CameraOwnerName",t[42033]="BodySerialNumber",t[42034]="LensSpecification",t[42035]="LensMake",t[42036]="LensModel",t[42037]="LensSerialNumber",t[33434]="ExposureTime",t[33437]="FNumber",t[34850]="ExposureProgram",t[34852]="SpectralSensitivity",t[34855]="PhotographicSensitivity",t[34856]="OECF",t[34864]="SensitivityType",t[34865]="StandardOutputSensitivity",t[34866]="RecommendedExposureIndex",t[34867]="ISOSpeed",t[34868]="ISOSpeedLatitudeyyy",t[34869]="ISOSpeedLatitudezzz",t[37377]="ShutterSpeedValue",t[37378]="ApertureValue",t[37379]="BrightnessValue",t[37380]="ExposureBiasValue",t[37381]="MaxApertureValue",t[37382]="SubjectDistance",t[37383]="MeteringMode",t[37384]="LightSource",t[37385]="Flash",t[37386]="FocalLength",t[37396]="SubjectArea",t[41483]="FlashEnergy",t[41484]="SpatialFrequencyResponse",t[41486]="FocalPlaneXResolution",t[41487]="FocalPlaneYResolution",t[41488]="FocalPlaneResolutionUnit",t[41492]="SubjectLocation",t[41493]="ExposureIndex",t[41495]="SensingMethod",t[41728]="FileSource",t[41729]="SceneType",t[41730]="CFAPattern",t[41985]="CustomRendered",t[41986]="ExposureMode",t[41987]="WhiteBalance",t[41988]="DigitalZoomRatio",t[41989]="FocalLengthIn35mmFilm",t[41990]="SceneCaptureType",t[41991]="GainControl",t[41992]="Contrast",t[41993]="Saturation",t[41994]="Sharpness",t[41995]="DeviceSettingDescription",t[41996]="SubjectDistanceRange",t})(),i=(()=>{const t=[];return t[1024]="GTModelTypeGeoKey",t[1025]="GTRasterTypeGeoKey",t[1026]="GTCitationGeoKey",t[2048]="GeographicTypeGeoKey",t[2049]="GeogCitationGeoKey",t[2050]="GeogGeodeticDatumGeoKey",t[2051]="GeogPrimeMeridianGeoKey",t[2052]="GeogLinearUnitsGeoKey",t[2053]="GeogLinearUnitSizeGeoKey",t[2054]="GeogAngularUnitsGeoKey",t[2055]="GeogAngularUnitSizeGeoKey",t[2056]="GeogEllipsoidGeoKey",t[2057]="GeogSemiMajorAxisGeoKey",t[2058]="GeogSemiMinorAxisGeoKey",t[2059]="GeogInvFlatteningGeoKey",t[2061]="GeogPrimeMeridianLongGeoKey",t[2060]="GeogAzimuthUnitsGeoKey",t[3072]="ProjectedCSTypeGeoKey",t[3073]="PCSCitationGeoKey",t[3074]="ProjectionGeoKey",t[3075]="ProjCoordTransGeoKey",t[3076]="ProjLinearUnitsGeoKey",t[3077]="ProjLinearUnitSizeGeoKey",t[3078]="ProjStdParallel1GeoKey",t[3079]="ProjStdParallel2GeoKey",t[3080]="ProjNatOriginLongGeoKey",t[3081]="ProjNatOriginLatGeoKey",t[3082]="ProjFalseEastingGeoKey",t[3083]="ProjFalseNorthingGeoKey",t[3084]="ProjFalseOriginLongGeoKey",t[3085]="ProjFalseOriginLatGeoKey",t[3086]="ProjFalseOriginEastingGeoKey",t[3087]="ProjFalseOriginNorthingGeoKey",t[3088]="ProjCenterLongGeoKey",t[3090]="ProjCenterEastingGeoKey",t[3091]="ProjCenterNorthingGeoKey",t[3092]="ProjScaleAtNatOriginGeoKey",t[3093]="ProjScaleAtCenterGeoKey",t[3094]="ProjAzimuthAngleGeoKey",t[3095]="ProjStraightVertPoleLongGeoKey",t[4096]="VerticalCSTypeGeoKey",t[4097]="VerticalCitationGeoKey",t[4098]="VerticalDatumGeoKey",t[4099]="VerticalUnitsGeoKey",t})(),s=(t,e)=>{let r=(e||n)[t];return void 0===r&&(r="unknown"+String(t)),r},a=new Map([["EXIFIFD",o],["GPSIFD",["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"]]])},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:()=>d});var n,o=r(90237),i=r(49186),s=r(25482),a=r(4718),l=r(53966),u=r(10107),c=r(79901),h=r(40608),f=r(4151),p=r(16019);let d=n=class extends s.A{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 f.z)}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 f.z(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,p.hP)(t),o=this.pixels,i=this.width*this.height,s=o.length;let a,l,u;const c=[];for(let h=0;h<s;h++){u=n.createEmptyBand(t,i),a=o[h];for(let t=0;t<i;t++)l=a[t],u[t]=l>r?r:l<e?e:l;c.push(u)}this.pixels=c,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:u}=this;const{width:c,height:h}=this;return a?.length&&(l=n.combineBandMasks(a),u=l.filter(t=>!!t).length),new n({pixelType:this.pixelType,width:c,height:h,mask:l,bandMasks:a,validPixelCount:u,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,u;i=s=a=o[0],o.length>=3?(s=o[1],a=o[2]):2===o.length&&(s=o[1]);const c=new Uint32Array(t),h=this.width*this.height;if(i.length===h)if(null!=e&&e.length===h)if(r)for(u=0;u<h;u++){const t=e[u];if(t){const e=t/255;c[u]=n?t<<24|a[u]*e<<16|s[u]*e<<8|i[u]*e:t<<24|a[u]<<16|s[u]<<8|i[u]}}else for(u=0;u<h;u++)e[u]&&(c[u]=255<<24|a[u]<<16|s[u]<<8|i[u]);else for(u=0;u<h;u++)c[u]=255<<24|a[u]<<16|s[u]<<8|i[u];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 u=new Uint32Array(t),c=this.width*this.height;let h,f,p,d,m;if(h=f=p=e[0],h.length!==c)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&&(p=e[2]),null!=r&&r.length===c)for(d=0;d<c;d++)r[d]&&(u[d]=255<<24|(p[d]-s)*i<<16|(f[d]-s)*i<<8|(h[d]-s)*i);else for(d=0;d<c;d++)u[d]=255<<24|(p[d]-s)*i<<16|(f[d]-s)*i<<8|(h[d]-s)*i;else if(null!=r&&r.length===c)for(d=0;d<c;d++)m=(h[d]-s)*i,r[d]&&(u[d]=255<<24|m<<16|m<<8|m);else for(d=0;d<c;d++)m=(h[d]-s)*i,u[d]=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 u=0;if(null!=r&&r.length===a)for(s=0;s<a;s++)t[u++]=n[s],t[u++]=o[s],t[u++]=i[s],t[u++]=1&r[s];else for(s=0;s<a;s++)t[u++]=n[s],t[u++]=o[s],t[u++]=i[s],t[u++]=1}};(0,o._)([(0,u.MZ)({json:{write:!0}})],d.prototype,"width",void 0),(0,o._)([(0,u.MZ)({json:{write:!0}})],d.prototype,"height",void 0),(0,o._)([(0,u.MZ)({json:{write:!0}})],d.prototype,"pixelType",void 0),(0,o._)([(0,c.w)("pixelType")],d.prototype,"castPixelType",null),(0,o._)([(0,u.MZ)({json:{write:!0}})],d.prototype,"validPixelCount",void 0),(0,o._)([(0,u.MZ)({json:{write:!0}})],d.prototype,"mask",void 0),(0,o._)([(0,u.MZ)({json:{write:!0}})],d.prototype,"maskIsAlpha",void 0),(0,o._)([(0,u.MZ)({json:{write:!0}})],d.prototype,"pixels",void 0),(0,o._)([(0,u.MZ)()],d.prototype,"premultiplyAlpha",void 0),(0,o._)([(0,u.MZ)({json:{write:!0}})],d.prototype,"statistics",void 0),(0,o._)([(0,u.MZ)({json:{write:!0}})],d.prototype,"depthCount",void 0),(0,o._)([(0,u.MZ)({json:{write:!0}})],d.prototype,"noDataValues",void 0),(0,o._)([(0,u.MZ)({json:{write:!0}})],d.prototype,"bandMasks",void 0),d=n=(0,o._)([(0,h.$)("esri.layers.support.PixelBlock")],d)},14636:(t,e,r)=>{r.d(e,{FI:()=>d,KL:()=>u,Lu:()=>h,MD:()=>l,Rn:()=>m,Y2:()=>p});var n=r(66552),o=r(14140),i=r(28435);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 u(t,e){return s.get(t)/s.get(e)||1}function c(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=c(i)),[o,i]}function f(t,e="geographic"){let r=t[1];"geographic"===e&&(r=c(r)),r%=360;const n=t[0];return[n*Math.cos(r/a),n*Math.sin(r/a)]}function p(t,e,r,n="geographic"){if(!(0,i.AB)(t)||null==r)return t;const o="vector-magdir"===e?t.clone():d(t,e),s=o.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?o:d(o,"vector-magdir")}function d(t,e,r="geographic",n=1){if(!(0,i.AB)(t))return t;const{pixels:s,width:a,height:l}=t,u=a*l,c=s[0],p=s[1],d=t.pixelType.startsWith("f")?t.pixelType:"f32",m=o.A.createEmptyBand(d,u),g=o.A.createEmptyBand(d,u);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([c[y],p[y]],r),m[y]*=n):([m[y],g[y]]=f([c[y],p[y]],r),m[y]*=n,g[y]*=n),y++;const w=new o.A({pixelType:d,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,i.AB)(t))return t;const n=t.clone(),{pixels:o,width:s,height:a}=n,l=o[0],u=o[1];let c=0;for(let t=0;t<a;t++)for(let t=0;t<s;t++)"vector-uv"===e?(l[c]*=r,u[c]*=r):l[c]*=r,c++;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,u=21.75,[c,h]=g(0,e+i,r,u),[f,p]=g(t-5.5,e+s,r,u),[d,m]=g(t+5.5,e+s,r,u),[y,w]=g(t-1.5,e+a,r,u),[b,C]=g(t+1.5,e+a,r,u),[x,v]=g(t-1.5,e+l,r,u),[A,k]=g(t+1.5,e+l,r,u)}(0,0,0)},15265:(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})},16019:(t,e,r)=>{r.d(e,{$p:()=>c,Sp:()=>h,X1:()=>a,hP:()=>s,yM:()=>u,zw:()=>l});const n=9999999e31,o=2e-7,i={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:[-34028234663852886e22,34028234663852886e22],f64:[-Number.MAX_VALUE,Number.MAX_VALUE],unknown:void 0,c64:void 0,c128:void 0};function s(t){return i[t]??[-34028234663852886e22,34028234663852886e22]}function a(t,e){return null==t||null==e?"s32":t<0?t>=-128&&e<128?"s8":t>=-32768&&e<32768?"s16":"s32":e<256?"u8":e<65536?"u16":"u32"}function l(t){return(t?.startsWith("s")||t?.startsWith("u"))??!1}function u(t,e,r,n){let[o,i]=s(r);const a=l(r);return a&&(o-=1e-5,i+=1e-5),a?r.startsWith("u")?function(t,e,r,n){const[o,i]=n;for(let n=0;n<e.length;n++)if(e[n]){const s=t[n];s<o||s>i?e[n]=0:r[n]=s+.5|0}}(t,e,n,[o,i]):function(t,e,r,n){const[o,i]=n;for(let n=0;n<e.length;n++)if(e[n]){const s=t[n];s<o||s>i?e[n]=0:r[n]=s+(s>0?.5:-.5)|0}}(t,e,n,[o,i]):function(t,e,r,n){const[o,i]=n;for(let n=0;n<e.length;n++)if(e[n]){const s=t[n];s<o||s>i?e[n]=0:r[n]=s}}(t,e,n,[o,i])}function c(t,e){for(let r=0;r<e.length;r++)e[r]&&isNaN(t[r])&&(e[r]=0,t[r]=0)}function h(t,e,r){if(t.depthCount&&t.depthCount>1)return;const{pixels:i,statistics:a,pixelType:l}=t,u=i[0].length,c=t.bandMasks??[],h=t.mask??new Uint8Array(u).fill(255),f="f32"===l||"f64"===l,p=s(l);let d=!1;for(let t=0;t<i.length;t++){const s="number"==typeof e?e:e[t];if(null==s)continue;const u=a?.[t]?.minValue??p[0],m=a?.[t]?.maxValue??p[1];if(u>s+Number.EPSILON||m<s-Number.EPSILON)continue;const g=c[t]||h.slice(),y=i[t],w=r?.customFloatTolerance;if(f&&0!==w){let t=w;t||(t=Math.abs(s)>=n?o*Math.abs(s):"f32"===l?2**-23:Number.EPSILON);for(let e=0;e<y.length;e++)g[e]&&Math.abs(y[e]-s)<t&&(y[e]=0,g[e]=0,h[e]=0,d=!0)}else for(let t=0;t<y.length;t++)g[t]&&y[t]===s&&(y[t]=0,g[t]=0,h[t]=0,d=!0);c[t]=g}if(d){const e=t.bandMasks||t.pixels.length>1?c:null;r?.matchAllNoData?t.mask=e&&e.length>1?function(t){if(t.length<2)return t[0];const e=t[0].length,r=new Uint8Array(e).fill(0);for(let n=0;n<t.length;n++){const o=t[n];for(let t=0;t<e;t++)o[t]&&(r[t]=255)}return r}(e):h:(t.bandMasks=e,t.mask=h)}d&&"updateStatistics"in t&&t.updateStatistics()}},20223:(t,e,r)=>{r.d(e,{A:()=>c});var n,o=r(90237),i=r(25482),s=r(4718),a=r(10107),l=(r(44208),r(53966),r(40608)),u=r(86738);let c=n=class extends i.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.isBsqTile=!1,this.isVirtualTileInfo=!1,this.tileInfo=null,this.transposeInfo=null,this.blockBoundary=null}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,isVirtualTileInfo:this.isVirtualTileInfo,tileInfo:(0,s.o8)(this.tileInfo),transposeInfo:(0,s.o8)(this.transposeInfo),blockBoundary:(0,s.o8)(this.blockBoundary)})}};(0,o._)([(0,a.MZ)({type:Number,json:{write:!0}})],c.prototype,"blockWidth",void 0),(0,o._)([(0,a.MZ)({type:Number,json:{write:!0}})],c.prototype,"blockHeight",void 0),(0,o._)([(0,a.MZ)({type:String,json:{write:!0}})],c.prototype,"compression",void 0),(0,o._)([(0,a.MZ)({type:u.A,json:{write:!0}})],c.prototype,"origin",void 0),(0,o._)([(0,a.MZ)({type:Number,json:{write:!0}})],c.prototype,"firstPyramidLevel",void 0),(0,o._)([(0,a.MZ)({type:Number,json:{write:!0}})],c.prototype,"maximumPyramidLevel",void 0),(0,o._)([(0,a.MZ)({json:{write:!0}})],c.prototype,"pyramidResolutions",void 0),(0,o._)([(0,a.MZ)({type:Number,json:{write:!0}})],c.prototype,"pyramidScalingFactor",void 0),(0,o._)([(0,a.MZ)({type:Number,json:{write:!0}})],c.prototype,"pyramidBlockWidth",void 0),(0,o._)([(0,a.MZ)({type:Number,json:{write:!0}})],c.prototype,"pyramidBlockHeight",void 0),(0,o._)([(0,a.MZ)({json:{write:!0}})],c.prototype,"isBsqTile",void 0),(0,o._)([(0,a.MZ)({type:Boolean,json:{write:!0}})],c.prototype,"isVirtualTileInfo",void 0),(0,o._)([(0,a.MZ)({json:{write:!0}})],c.prototype,"tileInfo",void 0),(0,o._)([(0,a.MZ)()],c.prototype,"transposeInfo",void 0),(0,o._)([(0,a.MZ)({json:{write:!0}})],c.prototype,"blockBoundary",void 0),c=n=(0,o._)([(0,l.$)("esri.layers.support.RasterStorageInfo")],c)},28435:(t,e,r)=>{r.d(e,{$Q:()=>L,$i:()=>N,AB:()=>c,Ew:()=>w,Hx:()=>g,IB:()=>n,J$:()=>O,L:()=>_,QF:()=>G,UK:()=>m,Wb:()=>o,Wt:()=>k,Wy:()=>h,XU:()=>A,bL:()=>y,dK:()=>v,eH:()=>d,et:()=>u,lD:()=>D,qL:()=>p,z$:()=>T,z7:()=>S,zg:()=>f});var n,o,i,s=r(34727),a=r(14140),l=r(16019);(i=n||(n={}))[i.matchAny=0]="matchAny",i[i.matchAll=1]="matchAll",function(t){t[t.bestMatch=0]="bestMatch",t[t.fail=1]="fail"}(o||(o={}));const u=9;function c(t){return null!=t&&t.pixels?.length>0}function h(t){if(!t?.length||t.some(t=>!c(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 i=e.map(({mask:t})=>t).filter(t=>null!=t);let s=null;i.length&&(s=new Uint8Array(r*n),s.set(i[0]),i.length>1&&x(i.slice(1),s));const l=[];e.forEach(({pixels:t})=>l.push(...t));const u=e.map(({statistics:t})=>t).filter(t=>t?.length),h=[];return u.forEach(t=>h.push(...t)),new a.A({pixelType:o,width:r,height:n,mask:s,pixels:l,statistics:h.length?h:null})}function f(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 p(t,e){if(!c(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:l,alphaSpecified:u}=e,h=n[0],f=new Uint8Array(h.length),p=new Uint8Array(h.length),d=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]-l),g<l||g>t?o[e]=0:(f[e]=s[g],p[e]=s[g+1],d[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]-l),g<l||g>t?o[e]=0:(f[e]=s[g],p[e]=s[g+1],d[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],p[t]=m[1],d[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],p[t]=m[1],d[t]=m[2],o[t]=m[3];r.mask=o}return r.pixels=[f,p,d],r.statistics=null,r.pixelType="u8",r.maskIsAlpha=u,r}function d(t,e){if(!c(t))return null;const{pixels:r,mask:n}=t,o=r.length;let i=e.lut;const{offset:s}=e;i&&1===i[0].length&&(i=r.map(()=>i));const l=[],u=e.outputPixelType||"u8";for(let t=0;t<o;t++){const e=m(r[t],n,i[t],s||0,u);l.push(e)}const h=new a.A({width:t.width,height:t.height,pixels:l,mask:n,pixelType:u});return h.updateStatistics(),h}function m(t,e,r,n,o){const i=t.length,s=a.A.createEmptyBand(o,i);if(e)for(let o=0;o<i;o++)e[o]&&(s[o]=r[t[o]-n]);else for(let e=0;e<i;e++)s[e]=r[t[e]-n];return s}function g(t,e){if(!c(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)],l=n[0],u=new Uint8Array(o),h=new Uint8Array(o),f=new Uint8Array(o);let p=r.mask;const d=4===e[0].mappedColor.length;p||(p=new Uint8Array(o),p.fill(d?255:1),r.mask=p);for(let t=0;t<o;t++)if(p[t]){const r=l[t];let n=!1,o=s,c=a,d=0,m=i-1;for(;m-d>1;){if(r===c.value){n=!0;break}r>c.value?d=o:m=o,o=Math.floor((d+m)/2),c=e[Math.floor(o)]}n||(r===e[d].value?(c=e[d],n=!0):r===e[m].value?(c=e[m],n=!0):r<e[d].value?n=!1:r>e[d].value&&(r<e[m].value?(c=e[d],n=!0):m===i-1?n=!1:(c=e[m],n=!0))),n?(u[t]=c.mappedColor[0],h[t]=c.mappedColor[1],f[t]=c.mappedColor[2],p[t]=c.mappedColor[3]):u[t]=h[t]=f[t]=p[t]=0}return r.pixels=[u,h,f],r.mask=p,r.pixelType="u8",r.maskIsAlpha=d,r}function y(t,e,r=!1){const n=1e-5,o=new Float32Array(3*u),i=e.length;for(let a=0;a<u;a++)o[3*a]=t[2*a]??s.pq-1,o[3*a+1]=t[2*a+1]??s.pq,o[3*a+2]=e[a]??0,a<i&&(a>0&&(o[3*a]-=n),t[2*a+1]!==t[2*a]&&(a<i-1||!r)&&(o[3*a+1]-=n));return o}function w(t,e){if(!c(t))return null;const{width:r,height:n}=t,{inputRanges:o,outputValues:i,outputPixelType:s,noDataRanges:u,allowUnmatched:h,replacementValue:f,isLastInputRangeInclusive:p}=e,d=t.pixels[0],m=a.A.createEmptyBand(s,d.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,b=o.map(t=>t-w);b[0]=o[0],b[b.length-1]=o[o.length-1]+(p?1e-6:0);const C=o.length/2,[x,v]=(0,l.hP)(s);for(let t=0;t<n;t++)for(let e=0;e<r;e++){const n=t*r+e;if(y[n]){const t=d[n];let e=!1;for(let r=C-1;r>=0;r--)if(t===o[2*r]||t>b[2*r]&&t<b[2*r+1]){m[n]=i[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=d[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 a.A({width:r,height:n,pixelType:s,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 C(t,e){const r=t[0].length;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)}}function x(t,e){const r=t[0].length;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)}}function v(t,e){if(!c(t))return null;const{width:r,height:n,pixels:o}=t,i=r*n,s=new Uint8Array(i);t.mask?s.set(t.mask):s.fill(255);const l=o.length,{includedRanges:u,noDataValues:h,outputPixelType:f,matchAll:p,lookups:d}=e;if(d){const t=[];for(let e=0;e<l;e++){const r=d[e],n=m(o[e],s,r.lut,r.offset||0,"u8");t.push(n)}1===t.length?s.set(t[0]):p?C(t,s):x(t,s)}else if(p){const t=[];for(let e=0;e<l;e++){const r=new Uint8Array(i);r.set(s),b(o[e],u?.slice(2*e,2*e+2),h?.[e],r),t.push(r)}1===t.length?s.set(t[0]):C(t,s)}else for(let t=0;t<l;t++)b(o[t],u?.slice(2*t,2*t+2),h?.[t],s);return new a.A({width:r,height:n,pixelType:f,pixels:o,mask:s})}function A(t){const{srcPixelType:e,inputRanges:r,outputValues:n,allowUnmatched:o,noDataRanges:i,isLastInputRangeInclusive:s,outputPixelType:u}=t;if("u8"!==e&&"s8"!==e&&"u16"!==e&&"s16"!==e)return null;const c=e.includes("16")?65536:256,h=e.includes("s")?-c/2:0,f=a.A.createEmptyBand(u,c),p=new Uint8Array(c);o&&p.fill(255);const[d,m]=(0,l.hP)(u);if(r?.length&&n?.length){const t=1e-6,e=r.map(e=>e-t);e[0]=r[0],s&&(e[e.length-1]=r[r.length-1]);for(let t=0;t<e.length;t++){const o=n[t]>m?m:n[t]<d?d: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,p[t]=255}}if(i?.length)for(let t=0;t<i.length;t++){const e=Math.ceil(i[2*t]-h),r=Math.floor(i[2*t+1]-h);for(let t=e;t<=r;t++)p[t]=0}return{lut:f,offset:h,mask:p}}function k(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 M(t,e,r,n,o,i){const{width:s,height:a}=r.block,{x:l,y:u}=r.offset,{width:c,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,u,c,h);let p=0,d=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?d=i.rightPadding:r>=t&&(p=i.leftMargin-i.rightPadding,d=0)}if(f.xmax-=d,"number"!=typeof e)for(let r=f.ymin;r<f.ymax;r++){const i=(o*a+r-u)*c+(n*s-l)+p,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-u)*c+(n*s-l)+p;for(let r=f.xmin;r<f.xmax;r++)t[i+r]=e}}function S(t,e,r={}){const{clipOffset:n,clipSize:o,alignmentInfo:i,blockWidths:s}=r;if(s)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:i,height:s}=e,l=o?new Uint8Array(i*s):null,{blockWidths:u}=r,h=[],f=n.getPlaneCount(),p=a.A.getPixelArrayConstructor(n.pixelType);if(o)for(let e=0,r=0;e<t.length;r+=u[e],e++){const n=t[e];if(!c(n))continue;const o=n.mask;for(let t=0;t<s;t++)for(let s=0;s<u[e];s++)l[t*i+s+r]=null==o?255:o[t*n.width+s]}const d=t.some(t=>t?.bandMasks&&t.bandMasks.length>1),m=d?[]:void 0,g=i*s;for(let e=0;e<f;e++){const r=new p(g),n=d?new Uint8Array(g):void 0;for(let o=0,a=0;o<t.length;a+=u[o],o++){const l=t[o];if(!c(l))continue;const h=l.pixels[e];if(null!=h){for(let t=0;t<s;t++)for(let e=0;e<u[o];e++)r[t*i+e+a]=h[t*l.width+e];if(n){const t=l.bandMasks?.[e]??l.mask;for(let e=0;e<s;e++)for(let r=0;r<u[o];r++)n[e*i+r+a]=t?t[e*l.width+r]:255}}}h.push(r),m&&n&&m.push(n)}const y=new a.A({width:i,height:s,mask:l,bandMasks:m,pixels:h,pixelType:n.pixelType});return y.updateStatistics(),y}(t,e,{blockWidths:s});const l=t.find(t=>c(t));if(null==l)return null;const u=o?o.width:e.width,h=o?o.height:e.height,f=l.width,p=l.height,d=e.width/f,m=e.height/p,g={offset:n||{x:0,y:0},mosaic:o||e,block:{width:f,height:p}},y=l.pixelType,w=a.A.getPixelArrayConstructor(y),b=l.pixels.length,C=[];let x,v;for(let e=0;e<b;e++){v=new w(u*h);for(let r=0;r<m;r++)for(let n=0;n<d;n++){const o=t[r*d+n];c(o)&&(x=o.pixels[e],M(v,x,g,n,r,i))}C.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),S=A?new Uint8Array(u*h):void 0,T=k?[]:void 0;if(S){for(let e=0;e<m;e++)for(let r=0;r<d;r++){const n=t[e*d+r],o=null!=n?n.mask:null;M(S,null!=o?o:n?255:0,g,r,e,i)}if(T)for(let e=0;e<b;e++){const r=new Uint8Array(u*h);for(let n=0;n<m;n++)for(let o=0;o<d;o++){const s=t[n*d+o],a=s?.bandMasks?.[e]??s?.mask;M(r,null!=a?a:s?255:0,g,o,n,i)}T.push(r)}}const I=new a.A({width:u,height:h,pixels:C,pixelType:y,bandMasks:T,mask:S});return I.updateStatistics(),I}function T(t,e,r){if(!c(t))return null;const{width:n,height:o}=t,i=e.x,s=e.y,a=r.width+i,l=r.height+s;if(i<0||s<0||a>n||l>o)return t;if(0===i&&0===s&&a===n&&l===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>=l||r<i||r>=a?0:1}return t.updateStatistics(),t}function I(t){if(!c(t))return null;const e=t.clone(),{width:r,height:n,pixels:o}=t,i=o[0],s=e.pixels[0],a=t.mask;for(let t=2;t<n-1;t++){const e=new Map;for(let n=t-2;n<t+2;n++)for(let t=0;t<4;t++){const o=n*r+t;R(e,i[o],a?a[o]:1)}s[t*r]=P(e),s[t*r+1]=s[t*r+2]=s[t*r];let n=3;for(;n<r-1;n++){let o=(t-2)*r+n+1;R(e,i[o],a?a[o]:1),o=(t-1)*r+n+1,R(e,i[o],a?a[o]:1),o=t*r+n+1,R(e,i[o],a?a[o]:1),o=(t+1)*r+n+1,R(e,i[o],a?a[o]:1),o=(t-2)*r+n-3,E(e,i[o],a?a[o]:1),o=(t-1)*r+n-3,E(e,i[o],a?a[o]:1),o=t*r+n-3,E(e,i[o],a?a[o]:1),o=(t+1)*r+n-3,E(e,i[o],a?a[o]:1),s[t*r+n]=P(e)}s[t*r+n+1]=s[t*r+n]}for(let t=0;t<r;t++)s[t]=s[r+t]=s[2*r+t],s[(n-1)*r+t]=s[(n-2)*r+t];return e.updateStatistics(),e}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:i,height:s}=r;if(0===n&&0===o&&s===t.height&&i===t.width)return t;const{width:l,height:u}=t,h=Math.max(0,o),f=Math.max(0,n),p=Math.min(n+i,l),d=Math.min(o+s,u);if(p<0||d<0||!c(t))return null;n=Math.max(0,-n),o=Math.max(0,-o);const{pixels:m}=t,g=i*s,y=m.length,w=[];for(let e=0;e<y;e++){const r=m[e],s=a.A.createEmptyBand(t.pixelType,g);for(let t=h;t<d;t++){const e=t*l;let a=(t+o-h)*i+n;for(let t=f;t<p;t++)s[a++]=r[e+t]}w.push(s)}const b=new Uint8Array(g),C=t.mask;for(let t=h;t<d;t++){const e=t*l;let r=(t+o-h)*i+n;for(let t=f;t<p;t++)b[r++]=C?C[e+t]:1}const x=new a.A({width:r.width,height:r.height,pixelType:t.pixelType,pixels:w,mask:b});return x.updateStatistics(),x}function U(t,e=!0){if(!c(t))return null;const{pixels:r,width:n,height:o,mask:i,pixelType:s}=t,l=[],u=Math.round(n/2),h=Math.round(o/2),f=o-1,p=n-1;for(let t=0;t<r.length;t++){const i=r[t],c=a.A.createEmptyBand(s,u*h);let d=0;for(let t=0;t<o;t+=2)for(let r=0;r<n;r+=2){const o=i[t*n+r];if(e){const e=r===p?o:i[t*n+r+1],s=t===f?o:i[t*n+r+n],a=r===p?s:t===f?e:i[t*n+r+n+1];c[d++]=(o+e+s+a)/4}else c[d++]=o}l.push(c)}let d=null;if(null!=i){d=new Uint8Array(u*h);let t=0;for(let r=0;r<o;r+=2)for(let o=0;o<n;o+=2){const s=i[r*n+o];if(e){const e=o===p?s:i[r*n+o+1],a=r===f?s:i[r*n+o+n],l=o===p?a:r===f?e:i[r*n+o+n+1];d[t++]=s*e*a*l?1:0}else d[t++]=s}}return new a.A({width:u,height:h,pixelType:s,pixels:l,mask:d})}function D(t,e,r=0,n=!0){if(!c(t))return null;const{width:o,height:i}=e;let{width:s,height:a}=t;const l=new Map,u={x:0,y:0},h=1+r;let f=t;for(let t=0;t<h;t++){const r=Math.ceil(s/o),c=Math.ceil(a/i);for(let n=0;n<c;n++){u.y=n*i;for(let i=0;i<r;i++){u.x=i*o;const r=L(f,u,e);l.set(`${t}/${n}/${i}`,r)}}t<h-1&&(f=U(f,n)),s=Math.round(s/2),a=Math.round(a/2)}return l}function O(t){const{pixelBlock:e,tileSize:r,level:n,row:o,col:i,useBilinear:s}=t;if(!c(e))return null;const{width:a,height:l}=r,u=2**n,h=u*a,f=u*l;let p=L(e,{y:o*f,x:i*h},{width:h,height:f});if(!p)return null;for(let t=n;t>0;t--)p=U(p,s);return p}function B(t,e,r,n,o=0){const{width:i,height:s}=t,{width:a,height:l}=e,u=n.cols,c=n.rows,h=Math.ceil(a/u-.1/u),f=Math.ceil(l/c-.1/c);let p,d,m,g,y,w,b;const C=h*u,x=C*f*c,v=new Float32Array(x),A=new Float32Array(x),k=new Uint32Array(x),M=new Uint32Array(x);let S,T,I=0;for(let t=0;t<f;t++)for(let e=0;e<h;e++){p=12*(t*h+e),d=r[p],m=r[p+1],g=r[p+2],y=r[p+3],w=r[p+4],b=r[p+5];for(let r=0;r<c;r++){I=(t*c+r)*C+e*u,T=(r+.5)/c;for(let t=0;t<r;t++)S=(t+.5)/u,v[I+t]=(d*S+m*T+g)*i+o,A[I+t]=(y*S+w*T+b)*s+o,k[I+t]=Math.floor(v[I+t]),M[I+t]=Math.floor(A[I+t])}p+=6,d=r[p],m=r[p+1],g=r[p+2],y=r[p+3],w=r[p+4],b=r[p+5];for(let r=0;r<c;r++){I=(t*c+r)*C+e*u,T=(r+.5)/c;for(let t=r;t<u;t++)S=(t+.5)/u,v[I+t]=(d*S+m*T+g)*i+o,A[I+t]=(y*S+w*T+b)*s+o,k[I+t]=Math.floor(v[I+t]),M[I+t]=Math.floor(A[I+t])}}return{offsets_x:v,offsets_y:A,offsets_xi:k,offsets_yi:M,gridWidth:C}}function G(t,e){const{coefficients:r,spacing:n}=e,{offsets_x:o,offsets_y:i,gridWidth:s}=B(t,t,r,{rows:n[0],cols:n[1]}),{width:a,height:l}=t,u=new Float32Array(a*l),c=180/Math.PI;for(let t=0;t<l;t++)for(let e=0;e<a;e++){const r=t*s+e,n=0===t?r:r-s,h=t===l-1?r:r+s,f=o[n]-o[h],p=i[h]-i[n];if(isNaN(f)||isNaN(p))u[t*a+e]=90;else{let r=Math.atan2(p,f)*c;r=(360+r)%360,u[t*a+e]=r}}return u}function N(t,e,r,n,o="nearest"){if(!c(t))return null;"majority"===o&&(t=I(t));const{pixels:i,mask:s,bandMasks:l,pixelType:u}=t,h=t.width,f=t.height,p=a.A.getPixelArrayConstructor(u),d=i.length,{width:m,height:g}=e;let y=!1;for(let t=0;t<r.length;t+=3)-1===r[t]&&-1===r[t+1]&&-1===r[t+2]&&(y=!0);const{offsets_x:w,offsets_y:b,offsets_xi:C,offsets_yi:x,gridWidth:v}=B({width:h,height:f},e,r,n,"majority"===o?.5:0);let A;const k=(t,e,r,n)=>{const o=t instanceof Float32Array||t instanceof Float64Array?0:.5;for(let i=0;i<g;i++){A=i*v;for(let s=0;s<m;s++){if(w[A]<0||b[A]<0)t[i*m+s]=0;else if(n)t[i*m+s]=e[C[A]+x[A]*h];else{const n=Math.floor(w[A]),a=Math.floor(b[A]),l=Math.ceil(w[A]),u=Math.ceil(b[A]),c=w[A]-n,f=b[A]-a;if(!r||r[n+a*h]&&r[l+a*h]&&r[n+u*h]&&r[l+u*h]){const r=(1-c)*e[n+a*h]+c*e[l+a*h],p=(1-c)*e[n+u*h]+c*e[l+u*h];t[i*m+s]=(1-f)*r+f*p+o}else t[i*m+s]=e[C[A]+x[A]*h]}A++}}},M=[];let S;const T=l?.length===d,P=[];for(let t=0;t<d;t++){if(T){const e=new Uint8Array(m*g);k(e,l[t],l[t],!0),P.push(e)}S=new p(m*g),k(S,i[t],T?l[t]:s,"nearest"===o||"majority"===o),M.push(S)}const E=new a.A({width:m,height:g,pixelType:u,pixels:M,bandMasks:T?P:void 0});if(null!=s)E.mask=new Uint8Array(m*g),k(E.mask,s,s,!0);else if(y){E.mask=new Uint8Array(m*g);for(let t=0;t<m*g;t++)E.mask[t]=w[t]<0||b[t]<0?0:1}return E.updateStatistics(),E}function _(t){const{pixelBlock:e,extent:r,fieldNames:n,skipFactor:o,skipSpatialReference:i=!1,pixelIdOffset:s=0}=t,a=[],{width:l,height:u,pixels:c,mask:h}=e,f=t.imageRowSize??l,p=r.width/l,d=r.height/u,m=c.length,g=Math.floor(o/2),{xmin:y,ymax:w}=r,b=i?void 0:r.spatialReference.toJSON();for(let t=g;t<u;t+=o)for(let e=g;e<l;e+=o){const r=t*l+e;if(!h||h[r]){const o={x:y+(e+.5)*p,y:w-(t+.5)*d,spatialReference:b},i={objectId:s+t*f+e};for(let t=0;t<m;t++)i[n[t+1]]=c[t][r];a.push({geometry:o,attributes:i})}}return a}},39062:(t,e,r)=>{r.d(e,{E0:()=>m,PP:()=>g,SC:()=>f,di:()=>d,fw:()=>h,ng:()=>l,rk:()=>a,yy:()=>p});var n=r(14140),o=r(4151),i=r(28435);const s=1,a=1/111e3;function l(t){let{altitude:e,azimuth:r}=t;const{hillshadeType:n,pixelSizePower:o=1,pixelSizeFactor:i=1,scalingType:s,isGCS:l,resolution:u}=t,c="multi-directional"===n?2*t.zFactor:t.zFactor,{x:h,y:f}=u;let p=c/(8*h),d=c/(8*f);if(l&&c>.001&&(p/=a,d/=a),"adjusted"===s)if(l){const t=h*a,e=f*a;p=(c+t**o*i)/(8*t),d=(c+e**o*i)/(8*e)}else p=(c+h**o*i)/(8*h),d=(c+f**o*i)/(8*f);let m=(90-e)*Math.PI/180,g=Math.cos(m),y=(360-r+90)*Math.PI/180,w=Math.sin(m)*Math.cos(y),b=Math.sin(m)*Math.sin(y);const C=[315,270,225,360,180,0],x=[60,60,60,60,60,90],v=new Float32Array([3,5,3,2,1,4]),A=v.reduce((t,e)=>t+e),k=v.map(t=>t/A),M="multi-directional"===n?C.length:1,S=new Float32Array(6),T=new Float32Array(6),I=new Float32Array(6);if("multi-directional"===n)for(let t=0;t<M;t++)e=x[t],r=C[t],m=(90-e)*Math.PI/180,g=Math.cos(m),y=(360-r+90)*Math.PI/180,w=Math.sin(m)*Math.cos(y),b=Math.sin(m)*Math.sin(y),S[t]=g,T[t]=w,I[t]=b;else S.fill(g),T.fill(w),I.fill(b);return{resolution:u,factor:[p,d],sinZcosA:w,sinZsinA:b,cosZ:g,sinZcosAs:[...T],sinZsinAs:[...I],cosZs:[...S],weights:[...k],hillshadeType:["traditional","multi-directional"].indexOf(n)}}function u(t,e){const{width:r,height:n}=t,o=r*n,i=new Uint8Array(o),a=null!=t.mask;let l;if(a){l=new Uint8Array(t.mask);for(let t=0;t<l.length;t++)l[t]&&(i[t]=1,l[t]=1)}const u=t.pixels[0],c=new Float32Array(o),h=new Float32Array(o);let f,p=0;if(e){const{resolution:t}=e,r=t?(t.x+t.y)/2:1;p=200*e.zFactor/(r*r),f=new Float32Array(o)}const d=e?.curvatureType;let m,g,y,w,b,C,x,v;for(let t=s;t<n-s;t++){const e=t*r;for(let t=s;t<r-s;t++){const n=e+t;if(!l||0!==l[n]){if(l){if(l[n-r-1]+l[n-r]+l[n-r+1]+l[n-1]+l[n+1]+l[n+r-1]+l[n+r]+l[n+r+1]<7){i[n]=0;continue}m=l[n-r-1]?u[n-r-1]:u[n],g=l[n-r]?u[n-r]:u[n],y=l[n-r+1]?u[n-r+1]:u[n],w=l[n-1]?u[n-1]:u[n],b=l[n+1]?u[n+1]:u[n],C=l[n+r-1]?u[n+r-1]:u[n],x=l[n+r]?u[n+r]:u[n],v=l[n+r+1]?u[n+r+1]:u[n]}else m=u[n-r-1],g=u[n-r],y=u[n-r+1],w=u[n-1],b=u[n+1],C=u[n+r-1],x=u[n+r],v=u[n+r+1];if(c[n]=y+b+b+v-(m+w+w+C),h[n]=C+x+x+v-(m+g+g+y),null!=f){const t=u[n],e=.5*(w+b)-t,r=.5*(g+x)-t;if("standard"===d)f[n]=-p*(e+r);else{const t=(-m+y+C-v)/4,o=(-w+b)/2,i=(g-x)/2,s=o*o,a=i*i,l=s+a;l&&(f[n]="profile"===d?p*(e*s+r*a+t*o*i)/l:-p*(e*a+r*s-t*o*i)/l)}}}}}return{outMask:a?i:null,dzxs:c,dzys:h,curvatures:f}}function c(t,e,r){for(let n=0;n<r;n++)t[n*e]=t[n*e+1],t[(n+1)*e-1]=t[(n+1)*e-2];for(let n=1;n<e-1;n++)t[n]=t[n+e],t[n+(r-1)*e]=t[n+(r-2)*e]}function h(t,e){if(!(0,i.AB)(t))return t;const{factor:r,sinZcosA:a,sinZsinA:h,cosZ:f,sinZcosAs:p,sinZsinAs:d,cosZs:m,weights:g}=l(e),[y,w]=r,b="traditional"===e.hillshadeType,{width:C,height:x}=t,v=new Uint8Array(C*x),{dzxs:A,dzys:k,outMask:M}=u(t);for(let t=s;t<x-s;t++){const e=t*C;for(let t=s;t<C-s;t++){const r=e+t;if(!M||M[r]){const t=A[r]*y,e=k[r]*w,n=Math.sqrt(1+t*t+e*e);let o=0;if(b){let r=255*(f+h*e-a*t)/n;r<0&&(r=0),o=r}else{const r=d.length;for(let i=0;i<r;i++){let r=255*(m[i]+d[i]*e-p[i]*t)/n;r<0&&(r=0),o+=r*g[i]}}v[r]=255&o}}}return c(v,C,x),new n.A({width:C,height:x,pixels:[v],mask:M,pixelType:"u8",validPixelCount:t.validPixelCount,statistics:[new o.z(0,255)]})}function f(t,e,r,n){if(!(0,i.AB)(t)||!(0,i.AB)(e))return;const{min:o,max:s}=n,a=t.pixels[0],{pixels:l,mask:u}=e,c=l[0],h=255.00001/(s-o),f=new Uint8ClampedArray(c.length),p=new Uint8ClampedArray(c.length),d=new Uint8ClampedArray(c.length),m=r.length-1;for(let t=0;t<c.length;t++){if(u&&0===u[t])continue;const e=Math.floor((c[t]-o)*h),[n,i]=r[e<0?0:e>m?m:e],s=a[t],l=s*i,g=l*(1-Math.abs(n%2-1)),y=s-l;switch(Math.floor(n)){case 0:f[t]=l+y,p[t]=g+y,d[t]=y;break;case 1:f[t]=g+y,p[t]=l+y,d[t]=y;break;case 2:f[t]=y,p[t]=l+y,d[t]=g+y;break;case 3:f[t]=y,p[t]=g+y,d[t]=l+y;break;case 4:f[t]=g+y,p[t]=y,d[t]=l+y;break;case 5:case 6:f[t]=l+y,p[t]=y,d[t]=g+y}}t.pixels=[f,p,d],t.updateStatistics()}function p(t,e){if(!(0,i.AB)(t))return t;const r=e.zFactor,o=e.pixelSizePower??1,l=e.pixelSizeFactor??1,h=e.slopeType,f=e.isGCS,{x:p,y:d}=e.resolution;let m=r/(8*p),g=r/(8*d);f&&Math.abs(r-1)<1e-4&&(m/=a,g/=a),"adjusted"===h&&(m=(r+p**o*l)/(8*p),g=(r+d**o*l)/(8*d));const{dzxs:y,dzys:w,outMask:b}=u(t),{width:C,height:x}=t,v=new Float32Array(C*x);for(let t=s;t<x-s;t++){const e=t*C;for(let t=s;t<C-s;t++){const r=e+t;if(!b||b[r]){const n=y[r]*m,o=w[r]*g,i=Math.sqrt(n*n+o*o);v[e+t]="percent-rise"===h?100*i:57.2957795*Math.atan(i)}}}c(v,C,x);const A=new n.A({width:C,height:x,pixels:[v],mask:b,pixelType:"f32",validPixelCount:t.validPixelCount});return A.updateStatistics(),A}function d(t,e={}){if(!(0,i.AB)(t))return t;const{resolution:r}=e,a=r?1/r.x:1,l=r?1/r.y:1,{dzxs:h,dzys:f,outMask:p}=u(t),{width:d,height:m}=t,g=new Float32Array(d*m);for(let t=s;t<m-s;t++){const e=t*d;for(let t=s;t<d-s;t++){const r=e+t;if(!p||p[r]){const n=h[r]*a,o=f[r]*l;let i=-1;0===n&&0===o||(i=90-57.29578*Math.atan2(o,-n),i<0&&(i+=360),360===i?i=0:i>360&&(i%=360)),g[e+t]=i}}}return c(g,d,m),new n.A({width:d,height:m,pixels:[g],mask:p,pixelType:"f32",validPixelCount:t.validPixelCount,statistics:[new o.z(-1,360)]})}function m(t,e){if(!(0,i.AB)(t))return t;const{curvatures:r,outMask:o}=u(t,e),{width:s,height:a}=t;c(r,s,a);const l=new n.A({width:s,height:a,pixels:[r],mask:o,pixelType:"f32",validPixelCount:t.validPixelCount});return l.updateStatistics(),l}function g(t,e,r){const{hillshadeType:n,altitude:o,azimuth:i,zFactor:s,pixelSizeFactor:a,pixelSizePower:l,slopeType:u}=t;return{hillshadeType:n,altitude:o,azimuth:i,zFactor:s,pixelSizePower:l,pixelSizeFactor:a,scalingType:"scaled"===u?"adjusted":"none",resolution:e,isGCS:r}}},45664:(t,e,r)=>{r.d(e,{Cr:()=>R,D4:()=>j,JM:()=>F,XO:()=>U,r9:()=>O,s$:()=>z,uT:()=>_,uc:()=>L,zS:()=>D}),r(44208);var n=r(15265),o=r(61294),i=r(49589),s=r(56582),a=r(16019),l=r(12196),u=r(47124),c=r(68060);const h=[0,1,1,2,4,8,1,1,2,4,8,4,8,-1,-1,-1,8,8,8],f=4294967296,p=new Set([1,5,6,7,8,34712,34887]);function d(t,e){let r="unknown";return 3===t?r=64===e?"f64":"f32":1===t?1===e?r="u1":2===e?r="u2":4===e?r="u4":e<=8?r="u8":e<=16?r="u16":e<=32&&(r="u32"):2===t&&(e<=8?r="s8":e<=16?r="s16":e<=32&&(r="s32")),r}function m(t){let e=null;switch(t?t.toLowerCase():"f32"){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"f64":e=Float64Array;break;default:e=Float32Array}return e}function g(t,e){return{x:e[0]*t.x+e[1]*t.y+e[2],y:e[3]*t.x+e[4]*t.y+e[5]}}function y(t,e){return t.get(e)?.values}function w(t,e){return t.get(e)?.values}function b(t,e){return t.get(e)?.values?.[0]}function C(t,e){return t.get(e)?.values?.[0]}function x(t,e,r,n=0,o=l.NB,i=4){const s=8===i,a=s?B(new DataView(t,r,8),0,e):new DataView(t,r,2).getUint16(0,e),u=4+2*i,c=s?8:2,h=c+a*u;if(r+h>t.byteLength)return{success:!1,ifd:null,nextIFD:null,requiredBufferSize:h};const f=8===i?8:4,p=r+h+f<=t.byteLength?N(new DataView(t,r+h,f),0,e,8===i):null,d=r+c,m=new Map;let g,y,w,b,C,x=0,v=0;for(let r=0;r<a;r++){y=new DataView(t,d+u*r,u),w=y.getUint16(0,e),C=y.getUint16(2,e),b=(0,l.kq)(w,o);const s=[];2===i?(x=y.getUint16(4,e),v=y.getUint16(6,e)):4===i?(x=y.getUint32(4,e),v=y.getUint32(8,e)):8===i&&(x=N(y,4,e,!0),v=N(y,12,e,!0),s.push(y.getUint32(12,e)),s.push(y.getUint32(16,e))),g={id:w,type:C,valueCount:x,valueOffset:v,valueOffsets:s,values:null},R(t,e,g,n,!1,i),m.set(b,g)}return{success:!0,ifd:m,nextIFD:p,requiredBufferSize:h}}const v=(t,e)=>(0,i.D4)(t,{inputOffset:e}).pixels[0];function A(t,e){if(e%8==0)return t;const r=e>16?32:e>8?16:8;r>8&&(t=S(t,32===r?4:2));const n=32===r?Uint32Array:16===r?Uint16Array:Uint8Array,o=new n(t),i=Math.floor(8*t.byteLength/e+1e-6),s=new n(i),a=(1<<e)-1;let l=0,u=0,c=0;for(let t=0;t<i;t++)if(0===u&&(c=o[l++],u=r),u>=e)s[t]=c>>>u-e&a,u-=e;else{const n=e-u;let i=(c&a)<<n&a;c=o[l++],u=r-n,i+=c>>>u,s[t]=i}return s.buffer}function k(t,e,r){const n=new o.J;n.parse(t),n.colorTransform=6===r?-1:0;const i=n.getData(n.width,n.height,1!==e&&4!==e);return new Uint8Array(i.buffer)}function M(t){const e=new c.Z(t).getBytes(),r=new ArrayBuffer(e.length),n=new Uint8Array(r);return n.set(e),n}function S(t,e){const r=new Uint8Array(t),n=new Uint8Array(r.length);if(2===e)for(let t=0;t<r.length;t+=2)n[t]=r[t+1],n[t+1]=r[t];else if(4===e)for(let t=0;t<r.length;t+=4)n[t]=r[t+3],n[t+1]=r[t+2],n[t+2]=r[t+1],n[t+3]=r[t];else for(let t=0;t<r.length;t+=8)n[t]=r[t+7],n[t+1]=r[t+6],n[t+2]=r[t+5],n[t+3]=r[t+4],n[t+4]=r[t+3],n[t+5]=r[t+2],n[t+6]=r[t+1],n[t+7]=r[t];return n.buffer}async function T(t,e,r,n,o){const a=u.Z===e,l=C(r,"BITSPERSAMPLE"),c=C(r,"SAMPLESPERPIXEL")??1,h=C(r,"PHOTOMETRICINTERPRETATION"),f=C(r,"SAMPLEFORMAT")??1,p=d(f,l),g=C(r,"COMPRESSION")??1,y=m(p);let w,b,x;if(34887===g)return await(0,i.Hh)(),v(t,n);if(1===g)w=t.slice(n,n+o),b=new Uint8Array(w);else if(8===g||32946===g)b=new Uint8Array(t,n,o),b=M(b),w=b.buffer;else if(6===g)b=new Uint8Array(t,n,o),b=k(b,c,h),w=b.buffer;else if(7===g){const e=r.get("JPEGTABLES").values,i=e.length-2;b=new Uint8Array(i+o-2);for(let t=0;t<i;t++)b[t]=e[t];const s=new Uint8Array(t,n+2,o-2);for(let t=0;t<s.length;t++)b[i+t]=s[t];b=k(b,c,h),w=b.buffer}else{if(5!==g)throw new Error("tiff-decode: unsupport compression "+g);b=(0,s.D)(t,n,o,e),w=b.buffer}if(w=A(w,l),a||l<=8)x=new y(w);else{const t=l>32?8:l>16?4:2;x=new y(S(b.buffer,t))}const T=C(r,"PREDICTOR")??1,I=C(r,"TILEWIDTH"),P=C(r,"TILELENGTH");if(T>1&&(5===g||8===g||32946===g)&&I&&P){const t=U(r),e=new y(x.length);e.set(x),x=function(t,e,r,n,o){const i=n?4:1,s=r*i*o;n&&(t=new Uint8Array(t.buffer));for(let r=0;r<e;r++){const e=r*s;for(let r=o;r<s;r++)t[e+r]+=t[e+r-o]}if(!n)return t;const a=new Uint8Array(t.length),l=r*o;for(let r=0;r<e;r++){const e=r*s;for(let r=0;r<l;r++)for(let n=0;n<i;n++)a[e+r*i+n]=t[e+r+(i-n-1)*l]}return new Float32Array(a.buffer)}(e,P,I,3===f&&3===T,t?1:c)}return x}const I=(t,e,r)=>{const n=u.Z===e.littleEndian,o=w(r,"STRIPOFFSETS");if(void 0===o)return null;const{width:i,height:a,pixelType:l}=L([r]),c=C(r,"SAMPLESPERPIXEL")||e.planes,h=C(r,"PHOTOMETRICINTERPRETATION"),f=i*a,p=C(r,"BITSPERSAMPLE"),d=m(l),g=new d(f*c),y=w(r,"STRIPBYTECOUNTS"),b=C(r,"ROWSPERSTRIP"),x=C(r,"COMPRESSION")??1;let v,S,T,I,P,E,R,U,D;if(p%8==0)for(v=0;v<o.length;v++){if(P=v*(b*i)*c,"u8"===l||"s8"===l||n)8===x||32946===x?(R=new Uint8Array(t,o[v],y[v]),R=M(R),E=R.buffer):6===x?(R=new Uint8Array(t,o[v],y[v]),R=k(R,c,h),E=R.buffer):5===x?(R=(0,s.D)(t,o[v],y[v],e.littleEndian),E=R.buffer):E=t.slice(o[v],o[v]+y[v]),E=A(E,p),I=new d(E);else{switch(6===x||8===x||32946===x?(R=new Uint8Array(t,o[v],y[v]),U=M(R),E=U.buffer):(E=new ArrayBuffer(y[v]),R=new Uint8Array(t,o[v],y[v]),U=new Uint8Array(E)),l){case"u16":case"s16":for(T=0;T<R.length;T+=2)U[T]=R[T+1],U[T+1]=R[T];break;case"u32":case"s32":case"f32":for(T=0;T<R.length;T+=4)U[T]=R[T+3],U[T+1]=R[T+2],U[T+2]=R[T+1],U[T+3]=R[T]}E=A(E,p),I=new d(E)}g.set(I,P)}const O=[];if(1===c)O.push(g);else for(v=0;v<c;v++){for(D=new d(f),S=0;S<f;S++)D[S]=g[S*c+v];O.push(D)}return{width:i,height:a,pixelType:l,pixels:O}},P=(t,e,r)=>{if(!(t&&t.length>0&&e&&r))return null;let n,o,i;const s=t[0].length,a=t.length,l=new Uint8Array(s);for(let u=0;u<a;u++)if(n=t[u],o=e[u],i=r[u],0===u)for(let t=0;t<s;t++)l[t]=n[t]<o||n[t]>i?0:1;else for(let t=0;t<s;t++)l[t]&&(l[t]=n[t]<o||n[t]>i?0:1);return l},E=t=>{if(!t)return null;const e=t.match(/<Item(.*?)Item>/gi);if(!e||0===e.length)return null;const r=new Map;let n,o,i,s,a;for(let t=0;t<e.length;t++)n=e[t],o=n.slice(6,n.indexOf(">")),s=n.indexOf("sample="),s>-1&&(a=n.slice(s+8,n.indexOf('"',s+8))),s=n.indexOf("name="),s>-1&&(o=n.slice(s+6,n.indexOf('"',s+6))),o&&(i=n.slice(n.indexOf(">")+1,n.indexOf("</Item>")).trim(),null!=a?r.has(o)?r.get(o)[a]=i:r.set(o,[i]):r.set(o,i)),a=null;const l=r.get("STATISTICS_MINIMUM"),u=r.get("STATISTICS_MAXIMUM"),c=r.get("STATISTICS_MEAN"),h=r.get("STATISTICS_STDDEV");let f=null;if(l&&u){f=[];for(let t=0;t<l.length;t++)f.push({min:parseFloat(l[t]),max:parseFloat(u[t]),avg:c&&parseFloat(c[t]),stddev:h&&parseFloat(h[t])})}const p=r.get("BandName"),d=r.get("WavelengthMin"),m=r.get("WavelengthMax");let g=null;if(p){g=[];for(let t=0;t<p.length;t++)g.push({BandName:p[t],WavelengthMin:d&&parseFloat(d[t]),WavelengthMax:m&&parseFloat(m[t])})}return{statistics:f,bandProperties:g,dataType:r.get("DataType"),rawMetadata:r}};function R(t,e,r,n=0,o=!1,i=4){if(r.values)return!0;const s=r.type,a=r.valueCount;let l=r.valueOffset,u=[];const c=h[s],p=8*c,d=a*c,m=a*h[s]*8;let g,y;const w=8===i?64:32,b=r.valueOffsets;if(m>w&&d>(o?t.byteLength:t?t.byteLength-l+n:0))return r.offlineOffsetSize=[l,d],r.values=null,!1;if(m<=w){if(!e)if(w<=32)l>>>=32-m;else{const t=b?.length?b[0]:l>>>0,e=b?.length?b[1]:Math.round((l-t)/f);m<=32?(l=t>>>32-m,b[0]=l):(l=t*2**(32-m)+(e>>>32-m),b[0]=t,b[1]=e>>>32-m)}if(1===a&&p===w)u=[l];else if(64===w){const t=b?.length?b[0]:l>>>0,e=b?.length?b[1]:Math.round((l-t)/f);let r=t,n=32;for(y=1;y<=a;y++){const t=32-p*y%32;if(n<p){const o=r<<t>>>32-n,i=e<<32-n>>>32-n;r=e,u.push(o+i*2**(p-n)),n-=32-(p-n)}else u.push(r<<t>>>32-p),n-=p;0===n&&(n=32,r=e)}}else for(y=1;y<=a;y++){const t=32-p*y;u.push(l<<t>>>32-p)}}else{l-=n,o&&(l=0);for(let r=l;r<l+d;r+=c){switch(s){case 1:case 2:case 7:g=new DataView(t,r,1).getUint8(0);break;case 3:g=new DataView(t,r,2).getUint16(0,e);break;case 4:case 13:g=new DataView(t,r,4).getUint32(0,e);break;case 5:g=new DataView(t,r,4).getUint32(0,e)/new DataView(t,r+4,4).getUint32(0,e);break;case 6:g=new DataView(t,r,1).getInt8(0);break;case 8:g=new DataView(t,r,2).getInt16(0,e);break;case 9:g=new DataView(t,r,4).getInt32(0,e);break;case 10:g=new DataView(t,r,4).getInt32(0,e)/new DataView(t,r+4,4).getInt32(0,e);break;case 11:g=new DataView(t,r,4).getFloat32(0,e);break;case 12:g=new DataView(t,r,8).getFloat64(0,e);break;case 16:case 18:g=B(new DataView(t,r,8),0,e);break;case 17:g=G(new DataView(t,r,8),0,e);break;default:g=null}u.push(g)}}if(2===s){let t="";const e=u;for(u=[],y=0;y<e.length;y++)0===e[y]&&""!==t?(u.push(t),t=""):t+=String.fromCharCode(e[y]);""===t&&0!==u.length||u.push(t)}return r.values=u,!0}function L(t){const e=t[0],r=C(e,"TILEWIDTH"),n=C(e,"TILELENGTH"),o=C(e,"IMAGEWIDTH"),i=C(e,"IMAGELENGTH"),s=C(e,"BITSPERSAMPLE"),a=C(e,"SAMPLESPERPIXEL"),l=C(e,"SAMPLEFORMAT")??1,u=d(l,s),c=U(e),h=y(e,"GDAL_NODATA");let f=null;h?.length&&(f=h.map(t=>parseFloat(t)),f.some(t=>isNaN(t))&&(f=null));const m=C(e,"COMPRESSION")??1;let x;switch(m){case 1:x="NONE";break;case 2:case 3:case 4:case 32771:x="CCITT";break;case 5:x="LZW";break;case 6:case 7:x="JPEG";break;case 32773:x="PACKBITS";break;case 8:case 32946:x="DEFLATE";break;case 34712:x="JPEG2000";break;case 34887:x="LERC";break;default:x=String(m)}let v=!0,A="";p.has(m)||(v=!1,A+="unsupported tag compression "+m),l>3&&(v=!1,A+="unsupported tag sampleFormat "+l),s>32&&64!==s&&(v=!1,A+="unsupported tag bitsPerSample "+s);const k=b(e,"GEOASCIIPARAMS");let M;if(k){const t=k.split("|").find(t=>t.includes("ESRI PE String = ")),e=t?t.replace("ESRI PE String = ",""):"";M=e.startsWith("COMPD_CS")||e.startsWith("PROJCS")||e.startsWith("GEOGCS")?{wkid:null,wkt:e}:null}const S=w(e,"GEOTIEPOINTS"),T=w(e,"GEOPIXELSCALE"),I=w(e,"GEOTRANSMATRIX"),P=e.has("GEOKEYDIRECTORY")?e.get("GEOKEYDIRECTORY").data:null;let R,L,B=!1,G=!1;if(P){B=2===C(P,"GTRasterTypeGeoKey");const t=C(P,"GTModelTypeGeoKey");if(2===t){const t=C(P,"GeographicTypeGeoKey");t>=1024&&t<=32766&&(M={wkid:t}),M||32767!==t||(G=!0,M={wkid:4326})}else if(1===t){const t=C(P,"ProjectedCSTypeGeoKey");t>=1024&&t<=32766&&(M={wkid:t})}}if(T&&S&&S.length>=6?(R=[T[0],0,S[3]-S[0]*T[0],0,-Math.abs(T[1]),S[4]-S[1]*T[1]],B&&(R[2]-=.5*R[0]+.5*R[1],R[5]-=.5*R[3]+.5*R[4])):I&&16===I.length&&(R=B?[I[0],I[1],I[3]-.5*I[0],I[4],I[5],I[7]-.5*I[5]]:[I[0],I[1],I[3],I[4],I[5],I[7]]),R){const t=[{x:0,y:i},{x:0,y:0},{x:o,y:i},{x:o,y:0}];let e,r=Number.POSITIVE_INFINITY,n=Number.POSITIVE_INFINITY,s=Number.NEGATIVE_INFINITY,a=Number.NEGATIVE_INFINITY;for(let o=0;o<t.length;o++)e=g(t[o],R),r=e.x>r?r:e.x,s=e.x<s?s:e.x,n=e.y>n?n:e.y,a=e.y<a?a:e.y;L={xmin:r,xmax:s,ymin:n,ymax:a,spatialReference:M}}else L={xmin:-.5,ymin:.5-i,xmax:o-.5,ymax:.5,spatialReference:M};G&&(L.xmax-L.xmin>400||Math.max(Math.abs(L.xmin),Math.abs(L.xmax))>361)&&(M=null,L.spatialReference=null);const N=D(t);let _,F,z,j,W;if(N.length>0){z=Math.round(Math.log(o/C(N[0],"IMAGEWIDTH"))/Math.LN2);const t=N[N.length-1];j=N.length,_=C(t,"TILEWIDTH"),F=C(t,"TILELENGTH")}_=null!=j&&j>0?_||r:null,F=null!=j&&j>0?F||n:null,r&&(W=[{maxCol:Math.ceil(o/r)-1,maxRow:Math.ceil(i/n)-1,minRow:0,minCol:0}],N.forEach(t=>{W.push({maxCol:Math.ceil(C(t,"IMAGEWIDTH")/C(t,"TILEWIDTH"))-1,maxRow:Math.ceil(C(t,"IMAGELENGTH")/C(t,"TILELENGTH"))-1,minRow:0,minCol:0})}));const Z=b(t[0],"GDAL_METADATA"),H=E(Z);A+=" "+V({width:o,height:i,tileWidth:r,tileHeight:n,planes:a,ifds:t});const q=O(t).length===N.length+1,K=N?.length?N.map(t=>({x:o/C(t,"IMAGEWIDTH"),y:i/C(t,"IMAGELENGTH")})):void 0;return{width:o,height:i,tileWidth:r,tileHeight:n,planes:a,isBSQ:c,pixelType:u,compression:x,noData:f,hasMaskBand:q,isSupported:v,pyramidResolutions:K,message:A,extent:L,isPseudoGeographic:G,affine:T?null:R,firstPyramidLevel:z,maximumPyramidLevel:j,pyramidBlockWidth:_,pyramidBlockHeight:F,tileBoundary:W,metadata:H}}function U(t,e){const r=y(t,"PLANARCONFIGURATION");return r?2===r[0]:!!e&&e.isBSQ}function D(t){return t.filter(t=>1===C(t,"NEWSUBFILETYPE"))}function O(t){return t.filter(t=>{const e=!(4&~(C(t,"NEWSUBFILETYPE")??0)),r=4===C(t,"PHOTOMETRICINTERPRETATION");return e&&r})}function B(t,e,r){const n=t.getUint32(e,r),o=t.getUint32(e+4,r);return r?o*f+n:n*f+o}function G(t,e,r){let n=r?t.getInt32(e,r):t.getUint32(e,r),o=r?t.getUint32(e+4,r):t.getInt32(e+4,r);const i=(r?n:o)>=0?1:-1;return r?n*=i:o*=i,i*(r?o*f+n:n*f+o)}function N(t,e,r,n){return n?B(t,e,r):t.getUint32(e,r)}function _(t){const e=new DataView(t,0,16),r=e.getUint16(0,!1);let n=null;if(18761===r)n=!0;else{if(19789!==r)throw new Error("unexpected endianess byte");n=!1}const o=e.getUint16(2,n);if(42!==o&&43!==o)throw new Error("unexpected tiff identifier");let i=4;const s=43===o;if(s){const t=e.getUint16(i,n);if(i+=2,8!==t)throw new Error("unsupported bigtiff version");if(0!==e.getUint16(i,n))throw new Error("unsupported bigtiff version");i+=2}return{littleEndian:n,isBigTiff:s,firstIFDPos:N(e,i,n,s)}}function F(t,e,r,o=0,i=l.NB,s=4){const a=x(t,e,r,o,i,s);let u;const c=a.ifd;if(c){if(l.RR.forEach((r,n)=>{c.has(n)&&(u=c.get(n),u.data=x(t,e,u.valueOffset-o,o,r).ifd)}),c.has("GEOKEYDIRECTORY")){u=c.get("GEOKEYDIRECTORY");const r=u.values;if(r&&r.length>4){const n=r[0]+"."+r[1]+"."+r[2];u.data=x(t,e,u.valueOffset+6-o,o,l.YC,2).ifd,u.data&&u.data.set("GEOTIFFVersion",{id:0,type:2,valueCount:1,valueOffset:null,values:[n]})}}if(c.has("XMP")){u=c.get("XMP");const t=u.values;"number"==typeof t[0]&&7===u.type&&(u.values=[(0,n.w)(new Uint8Array(t))])}}return a}function V(t){const{width:e,height:r,tileHeight:n,tileWidth:o}=t,i=t.planes,s=o?o*n:e*r,a=C(t.ifds[0],"BITSPERSAMPLE");let l="";return s*i>2**30/(a>8?a/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 z(t,e){const{headerInfo:r,ifd:n,offsets:o,sizes:i}=e,s=[];for(let e=0;e<o.length;e++){i[e];const a=await T(t,r.littleEndian,n,o[e],i[e]||t.byteLength);s.push(a)}const l=U(n,r),u=C(n,"BITSPERSAMPLE"),c=d(C(n,"SAMPLEFORMAT")??1,u),h=C(n,"SAMPLESPERPIXEL")||r.planes,f=m(c),p=C(n,"TILEWIDTH"),g=C(n,"TILELENGTH"),y=C(n,"COMPRESSION")??1,w=p*g;let b;const x=[];let v=s[0];const A=34887===y;for(let t=0;t<h;t++){if(b=new f(w),s.length===h)v=s[t],v.length===w&&(b=v);else if(v.length)if(l||A)b=v.length===w?v:v.slice(w*t,w*(t+1));else for(let e=0;e<w;e++)b[e]=v[e*h+t];x.push(b)}const k=r.noData?r.noData[0]:e.noDataValue,M=r.metadata?r.metadata.statistics:null,S=M?M.map(t=>t.min):null,I=M?M.map(t=>t.max):null,E={pixelType:c,width:p,height:g,pixels:x,noDataValue:k};return null!=k?(0,a.Sp)(E,k,{matchAllNoData:e?.matchAllNoData}):S&&I&&e.applyMinMaxConstraint&&(E.mask=P(x,S,I)),E}async function j(t,e={}){const r=e.pyramidLevel||0,n=e.headerInfo||function(t){const{littleEndian:e,isBigTiff:r,firstIFDPos:n}=_(t);let o=n;const i=[];do{const n=F(t,e,o,0,l.NB,r?8:4);if(!n.success)break;i.push(n.ifd),o=n.nextIFD}while(o>0);return{...L(i),littleEndian:e,isBigTiff:r,ifds:i,pyramidIFDs:D(i),maskIFDs:O(i)}}(t),{ifds:o,noData:i}=n;if(0===o.length)throw new Error("no valid image file directory");const s=V(n);if(s)throw s;let u=null;const c=-1===r?o[o.length-1]:o[r],h=i??e.noDataValue;return u=n.tileWidth?await async function(t,e,r){const n=w(r,"TILEOFFSETS");if(void 0===n)return null;const o=w(r,"TILEBYTECOUNTS"),{width:i,height:s,pixelType:a,tileWidth:l,tileHeight:u}=L([r]),c=U(r,e),h=C(r,"SAMPLESPERPIXEL")||e.planes,f=i*s,p=C(r,"BITSPERSAMPLE"),d=34887===(C(r,"COMPRESSION")??1),g=m(a),y=[];for(let t=0;t<h;t++)y.push(new g(f));let b,x,v,A,k,M,S,I,P,E,R,D,O;const B=Math.ceil(i/l),G=new Uint8Array(f).fill(255);let N=!1;if(p%8==0)if(d&&c&&h>1){const a=Math.round(n.length/h);for(b=0;b<a;b++){M=Math.floor(b/B)*u,S=b%B*l,I=M*i+S;for(let a=0;a<h;a++){const c=b*h+a;for(0===o[c]?(v=null,N=!0):v=await T(t,e.littleEndian,r,n[c],o[c]),E=0,P=I,D=Math.min(l,i-S),R=Math.min(u,s-M),O=y[a],A=0;A<R;A++)for(P=I+A*i,E=A*l,k=0;k<D;k++,P++,E++)v?O[P]=v[E]:G[P]=0}}}else for(b=0;b<n.length;b++)for(M=Math.floor(b/B)*u,S=b%B*l,I=M*i+S,0===o[b]?(v=null,N=!0):v=await T(t,e.littleEndian,r,n[b],o[b]),E=0,P=I,D=Math.min(l,i-S),R=Math.min(u,s-M),x=0;x<h;x++)if(O=y[x],c||d)for(A=0;A<R;A++)for(P=I+A*i,E=l*u*x+A*l,k=0;k<D;k++,P++,E++)v?O[P]=v[E]:G[P]=0;else for(A=0;A<R;A++)for(P=I+A*i,E=A*l*h+x,k=0;k<D;k++,P++,E+=h)v?O[P]=v[E]:G[P]=0;return{width:i,height:s,pixelType:a,pixels:y,mask:N?G:void 0}}(t,n,c):I(t,n,c),u?(null!=h&&(0,a.Sp)(u,h,{matchAllNoData:null==i&&e?.matchAllNoData}),u):u}},47124:(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]})()},49589:(t,e,r)=>{r.d(e,{D4:()=>c,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(t=>t.l).then(({default:t})=>t({locateFile:t=>(0,n.s)(`esri/layers/support/rasterFormats/${t}`)})).then(t=>{!function(t){const{_malloc:e,_free:r,_lerc_getBlobInfo:n,_lerc_getDataRanges:i,_lerc_decode_4D:s,asm:u}=t;let c;const h=Object.values(u).find(e=>e&&"buffer"in e&&e.buffer===t.HEAPU8.buffer),f=t=>{const r=t.map(t=>function(t){return 16+(t>>3<<3)}(t)),n=r.reduce((t,e)=>t+e),o=e(n);c=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};a.getBlobInfo=t=>{const e=new Uint8Array(48),o=new Uint8Array(24),[s,a,u]=f([t.length,e.length,o.length]);c.set(t,s),c.set(e,a),c.set(o,u);let p=n(s,t.length,a,u,12,3);if(p)throw r(s),new Error(`lerc-getBlobInfo: error code is ${p}`);c=new Uint8Array(h.buffer),l(c,a,e),l(c,u,o);const d=new Uint32Array(e.buffer),m=new Float64Array(o.buffer),[g,y,,w,b,C,x,v,A,k,M]=d,S={version:g,depthCount:k,width:w,height:b,validPixelCount:x,bandCount:C,blobSize:v,maskCount:A,dataType:y,minValue:m[0],maxValue:m[1],maxZerror:m[2],statistics:[],bandCountWithNoData:M};if(M&&k>1)return r(s),S;if(1===k&&1===C)return r(s),S.statistics.push({minValue:m[0],maxValue:m[1]}),S;const T=k*C*8,I=new Uint8Array(T),P=new Uint8Array(T);let E=s,R=0,L=0,U=!1;if(c.byteLength<s+2*T?(r(s),U=!0,[E,R,L]=f([t.length,T,T]),c.set(t,E)):[R,L]=f([T,T]),c.set(I,R),c.set(P,L),p=i(E,t.length,k,C,R,L),p)throw r(E),U||r(R),new Error(`lerc-getDataRanges: error code is ${p}`);c=new Uint8Array(h.buffer),l(c,R,I),l(c,L,P);const D=new Float64Array(I.buffer),O=new Float64Array(P.buffer),B=S.statistics;for(let t=0;t<C;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),S},a.decode=(t,e)=>{const{maskCount:n,depthCount:i,bandCount:a,width:u,height:p,dataType:d,bandCountWithNoData:m}=e,g=o[d],y=u*p,w=new Uint8Array(y*a),b=y*i*a*g.size,C=new Uint8Array(b),x=new Uint8Array(a),v=new Uint8Array(8*a),[A,k,M,S,T]=f([t.length,w.length,C.length,x.length,v.length]);c.set(t,A),c.set(w,k),c.set(C,M),c.set(x,S),c.set(v,T);const I=s(A,t.length,n,k,i,u,p,a,d,M,S,T);if(I)throw r(A),new Error(`lerc-decode: error code is ${I}`);c=new Uint8Array(h.buffer),l(c,M,C),l(c,k,w);let P=null;if(m){l(c,S,x),l(c,T,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:C,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 u(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 c(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:c}=a.decode(n,i),{width:h,height:f,bandCount:p,depthCount:d,dataType:m,maskCount:g,statistics:y}=i,w=o[m],b=new w.ctor(s.buffer),C=[],x=[],v=h*f,A=v*d;for(let t=0;t<p;t++){const r=b.subarray(t*A,(t+1)*A);if(e.returnInterleaved)C.push(r);else{const t=u(r,v,d,w.ctor);C.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,S=null!=M&&w.range[0]<=M&&w.range[1]>=M;if(g>0&&S)for(let t=0;t<p;t++){const e=C[t],r=x[t]||k;for(let t=0;t<v;t++)0===r[t]&&(e[t]=M)}const T=g===p&&p>1?x:null,{pixelType:I}=w;return{width:h,height:f,bandCount:p,pixelType:I,depthCount:d,statistics:y,pixels:C,mask:k,bandMasks:T,noDataValues:c}}},50498:(t,e,r)=>{r.d(e,{Ye:()=>h,gy:()=>c,yR:()=>f});var n=r(66552),o=r(5443),i=r(91075),s=r(48526),a=r(86738),l=r(39829),u=r(82799);const c=(0,n.O)()({esriGeometryPoint:"point",esriGeometryMultipoint:"multipoint",esriGeometryPolyline:"polyline",esriGeometryPolygon:"polygon"}),h=(0,n.O)()({esriGeometryPoint:"point",esriGeometryMultipoint:"multipoint",esriGeometryPolyline:"polyline",esriGeometryPolygon:"polygon",esriGeometryEnvelope:"extent",mesh:"mesh"}),f={base:i.A,key:"type",typeMap:{extent:o.A,multipoint:s.A,point:a.A,polyline:u.A,polygon:l.A}}},51244:(t,e,r)=>{r.d(e,{D:()=>L,g:()=>R});var n=r(49186),o=r(97768),i=r(14140),s=r(4151),a=r(74887),l=r(68060);class u{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:i=0,format:s}=e;const{applyJpegMask:l}=e;if(l&&(!o||!i))throw new n.A("imagecanvasdecoder: decode","image width and height are needed to apply jpeg mask directly to canvas");return new Promise((n,c)=>{let h=null;"jpg"===s&&l&&(h=u._getMask(t,{width:o,height:i}));const f=new Blob([new Uint8Array(t)],{type:"image/"+s=="jpg"?"jpeg":s}),p=URL.createObjectURL(f),d=new Image;let m;d.src=p,d.onload=()=>{if(URL.revokeObjectURL(p),(0,a.G4)(r))return void c((0,a.NK)());o=d.width,i=d.height,this._canvas&&this._ctx?(this._canvas.width===o&&this._canvas.height===i||(this._canvas.width=o,this._canvas.height=i),this._ctx.clearRect(0,0,o,i)):(this._canvas=document.createElement("canvas"),this._canvas.width=o,this._canvas.height=i,this._ctx=this._canvas.getContext("2d")),this._ctx.drawImage(d,0,0);const t=this._ctx.getImageData(0,0,o,i);let s;if(m=t.data,e.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(t,0,0),void n(null)}const l=o*i,u=new Uint8Array(l),f=new Uint8Array(l),g=new Uint8Array(l);if(h)for(s=0;s<l;s++)u[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++)u[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:i,pixels:[u,f,g],mask:h,pixelType:"u8"})},d.onerror=()=>{URL.revokeObjectURL(p),c("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 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 t=new l.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 c=r(61294);class h{static decode(t,e=!1){const r=new Uint8Array(t),n=new c.J;n.parse(r);const{width:o,height:i,numComponents:s,eof:a}=n,u=n.getData(o,i,!0),h=o*i;let f,p=null,d=0,m=0,g=0;if(!e&&a<r.length-1)try{const t=new l.Z(r.subarray(a)).getBytes();p=new Uint8Array(h);let e=0;for(d=0;d<t.length;d++)for(g=7;g>=0;g--)p[e++]=t[d]>>g&1}catch{}if(1===s&&u.length===o*i){const t=new Uint8Array(u.buffer);f=[t,t,t]}else{for(f=[],d=0;d<3;d++)f.push(new Uint8Array(h));for(g=0,m=0;m<h;m++)for(d=0;d<3;d++)f[d][m]=u[g++]}return{width:o,height:i,pixels:f,mask:p}}}var f=r(49589),p=r(56582),d=r(16019);const m=(t,e)=>{const r=e.width*e.height,n=e.pixelType;return Math.floor(t.byteLength/(r*g(n)))},g=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 y{static decode(t,e){const r=e.pixelType,n=[],o=e.width*e.height,i=m(t,e),{bandIds:s,format:a}=e,l=s?.length||m(t,e),u=t.byteLength-t.byteLength%(o*g(r)),c=new r(t,0,o*i);let h,f,p,d,y=null;if("bip"===a)for(h=0;h<l;h++){for(p=new r(o),d=s?s[h]:h,f=0;f<o;f++)p[f]=c[f*i+d];n.push(p)}else if("bsq"===a)for(h=0;h<l;h++)d=s?s[h]:h,n.push(c.subarray(d*o,(d+1)*o));return u<t.byteLength-1&&(y=((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,s=0,a=0;for(s=0;s<r.length-1;s++)for(i=r[s],a=7;a>=0;a--)n[o++]=i>>a&1;for(a=7;o<e-1;)i=r[r.length-1],n[o++]=i>>a&1,a--;return n})(t.slice(u),o)),{pixels:n,mask:y}}}var w=r(45664),b=r(47124),C=function(t){var e,r,n;function o(t){var e,r,n,o,i,s,a,l,u,c,h,f,p;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),(u=255-this.transparency.indexed.length)>0)for(f=0;0<=u?f<u:f>u;0<=u?++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=(c=this.read(e)).indexOf(0),a=String.fromCharCode.apply(String,c.slice(0,s)),this.text[a]=String.fromCharCode.apply(String,c.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===(p=this.colorType)||6===p,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,s,a,u,c,h,f,p,d,m,g,y,w,b,C,x,v,A,k;if(null==t&&(t=this.imgData),0===t.length)return new Uint8Array(0);for(t=(t=new l.Z(t)).getBytes(),y=(p=this.pixelBitlength/8)*this.width,d=new Uint8Array(y*this.height),s=t.length,g=0,m=0,r=0;m<s;){switch(t[m++]){case 0:for(o=C=0;C<y;o=C+=1)d[r++]=t[m++];break;case 1:for(o=x=0;x<y;o=x+=1)e=t[m++],i=o<p?0:d[r-p],d[r++]=(e+i)%256;break;case 2:for(o=v=0;v<y;o=v+=1)e=t[m++],n=(o-o%p)/p,w=g&&d[(g-1)*y+n*p+o%p],d[r++]=(w+e)%256;break;case 3:for(o=A=0;A<y;o=A+=1)e=t[m++],n=(o-o%p)/p,i=o<p?0:d[r-p],w=g&&d[(g-1)*y+n*p+o%p],d[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%p)/p,i=o<p?0:d[r-p],0===g?w=b=0:(w=d[(g-1)*y+n*p+o%p],b=n&&d[(g-1)*y+(n-1)*p+o%p]),a=i+w-b,u=Math.abs(a-i),h=Math.abs(a-w),f=Math.abs(a-b),c=u<=h&&u<=f?i:h<=f?w:b,d[r++]=(e+c)%256;break;default:throw new Error("Invalid filter algorithm: "+t[m-1])}g++}return d},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,u,c,h,f;if(n=this.colors,c=null,r=this.hasAlphaChannel,this.palette.length&&(c=null!=(f=this._decodedPalette)?f:this._decodedPalette=this.decodePalette(),n=4,r=!0),u=(o=t.data||t).length,s=c||e,i=a=0,1===n)for(;i<u;)l=c?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<u;)l=c?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,u;if(this.animation){for(u=[],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,u.push(r.image=e(o));return u}},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 x=new Set(["jpg","png","bmp","gif"]);async function v(t,e){if(!b.Z)throw new n.A("rasterCoded:decode","lerc decoder is not supported on big endian platform");await(0,f.Hh)();const{offset:r}=e,{width:o,height:a,pixelType:l,statistics:u,depthCount:c,noDataValues:h,bandMasks:p,pixels:d,mask:m}=(0,f.D4)(t,{inputOffset:r,returnInterleaved:e.returnInterleaved}),g=new i.A({width:o,height:a,pixelType:l.toLowerCase(),pixels:d,mask:m,statistics:u.map(({minValue:t,maxValue:e})=>new s.z(t,e)),bandMasks:p,depthCount:c,noDataValues:h});return u?.length||g.updateStatistics(),g}async function A(t,e){const r=await(0,w.D4)(t,{...e,noDataValue:e.tiffNoDataValue,matchAllNoData:e.matchAllNoData});(0,o.Lw)(r);const n=new i.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 k(t,e){const r=e.pixelType||"u8",n=i.A.getPixelArrayConstructor(r),o="u8"===r?t:new n(t.buffer),s=[],a=e.planes||1;if(1===a)s.push(o);else for(let r=0;r<a;r++){const i=(e.width||1)*(e.height||t.length),l=new n(i);for(let t=0;t<i;t++)l[t]=o[t*a+r];s.push(l)}const l=new i.A({width:e.width||1,height:e.height||t.length,pixels:s,pixelType:r,statistics:null});return l.updateStatistics(),l}function M(t,e){return k(new l.Z(new Uint8Array(t)).getBytes(),e)}function S(t,e){return k((0,p.D)(t,e.offset,e.eof,!e.isInputBigEndian),e)}function T(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,y.decode)(t,{width:e.width,height:e.height,pixelType:n,format:r}),s=new i.A({width:e.width,height:e.height,pixels:o.pixels,pixelType:e.pixelType,mask:o.mask,statistics:null});return s.updateStatistics(),s}function I(t,e){const r=h.decode(t,e.hasNoZlibMask??void 0),n=new i.A({width:r.width,height:r.height,pixels:r.pixels,pixelType:"u8",mask:r.mask,statistics:null});return n.updateStatistics(),n}function P(t,e){const r=new Uint8Array(t),n=new C(r),{width:o,height:s}=e,a=o*s,l=n.decode();let u,c=0,h=0;const f=new Uint8Array(a);for(c=0;c<a;c++)f[c]=l[4*c+3];const p=new i.A({width:o,height:s,pixels:[],pixelType:"u8",mask:f,statistics:[]});for(c=0;c<3;c++){for(u=new Uint8Array(a),h=0;h<a;h++)u[h]=l[4*h+c];p.addData({pixels:u})}return p.updateStatistics(),p}function E(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":String.fromCharCode.apply(null,e).toLowerCase().includes("error")&&(r="error"),r}function R(t){let e=E(t);return"lerc2"===e?e="lerc":"error"===e&&(e=""),e}async function L(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,w.s$)(t,e.customOptions),n=new i.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=E(t)),e.useCanvas&&x.has(o))return async function(t,e,r,n){const o=new u,s={applyJpegMask:!1,format:e,...r},a=await o.decode(t,s,n),l=new i.A(a);return l.updateStatistics(),l}(t,o,e,r);const s=function(t){let e=null;switch(t){case"lerc":case"lerc2":e=v;break;case"jpg":e=I;break;case"png":e=P;break;case"bsq":case"bip":e=(e,r)=>T(e,r,t);break;case"tiff":e=A;break;case"deflate":e=M;break;case"lzw":e=S;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 a;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)=>s(t.slice(r,l[n+1]),e)),n=await Promise.all(r);a=n[0],a.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(a.width*a.height).fill(255))}),a.bandMasks=o,a.mask=i.A.combineBandMasks(o)),a.updateStatistics()}else a=await s(t,{...e,offset:l?.[0]??e.offset});return"jpg"!==o&&null!=e.noDataValue&&1===a.depthCount&&(0,d.Sp)(a,e.noDataValue,{customFloatTolerance:e.tolerance}),e.isPoint&&function(t,e=1){if(!t)return;const{pixels:r,width:n,height:o,mask:s}=t;if(!r||0===r.length)return;const a=r.length,l=n-1,u=o-1,c=[];let h,f,p,d,m,g,y=null;const w=i.A.getPixelArrayConstructor(t.pixelType);if(0===e){for(h=0;h<a;h++){for(m=r[h],g=new w(l*u),f=0;f<u;f++)for(d=f*n,p=0;p<l;p++)g[f*l+p]=m[d+p];c.push(g)}if(null!=s)for(y=new Uint8Array(l*u),f=0;f<u;f++)for(d=f*n,p=0;p<l;p++)y[f*l+p]=s[d+p]}else{for(h=0;h<a;h++){for(m=r[h],g=new w(l*u),f=0;f<u;f++)for(d=f*n,p=0;p<l;p++)g[f*l+p]=(m[d+p]+m[d+p+1]+m[d+n+p]+m[d+n+p+1])/4;c.push(g)}if(s)for(y=new Uint8Array(l*u),f=0;f<u;f++)for(d=f*n,p=0;p<l;p++)y[f*l+p]=Math.min.apply(null,[s[d+p],s[d+p+1],s[d+n+p],s[d+n+p+1]])}t.width=l,t.height=u,t.mask=y,t.pixels=c}(a),a}},56582:(t,e,r)=>{function n(){const t=[];for(let e=0;e<=257;e++)t[e]=[e];return t}function o(t,e){for(let r=0;r<e.length;r++)t.push(e[r])}r.d(e,{D:()=>s});const i=new Set;function s(t,e,r,s=!0){const a=function(t,e,r,n=!0){if(e%4!=0||r%4!=0){const o=new ArrayBuffer(4*Math.ceil(r/4)),i=new Uint8Array(o),s=new Uint8Array(t,e,r);if(n)for(let t=0;t<i.length;t+=4)i[t]=s[t+3],i[t+1]=s[t+2],i[t+2]=s[t+1],i[t+3]=s[t];else i.set(s);return new Uint32Array(i.buffer)}if(n){const n=new Uint8Array(t,e,r),o=new Uint8Array(n.length);for(let t=0;t<o.length;t+=4)o[t]=n[t+3],o[t+1]=n[t+2],o[t+2]=n[t+1],o[t+3]=n[t];return new Uint32Array(o.buffer)}return new Uint32Array(t,e,r/4)}(t,e,r,s);let l=9,u=n(),c=32,h=u.length,f=[],p=1,d=a[0],m=0;const g=a.length,y=8*(4*g-r),w=[];for(;null!=d;){if(c>=l)c-=l,m=d>>>32-l,d<<=l;else{m=d>>>32-c,d=a[p++];const t=l-c;c=32-t,m=(m<<t)+(d>>>c),d<<=t}if(257===m)break;if(256===m){l=9,u=n(),h=u.length,f=[];continue}const t=u[m];if(null==t){if(m>u.length)throw new Error("data integrity issue: code does not exist on code page");f.push(f[0]),u[h++]=f.slice(),o(w,f)}else o(w,t),f.push(t[0]),f.length>1&&(u[h++]=f.slice()),f=t.slice();if(i.has(h)&&l++,0===c&&(d=a[p++],c=32),p>g||p===g&&c<=y)break}return new Uint8Array(w)}i.add(511),i.add(1023),i.add(2047),i.add(4095),i.add(8191)},61294:(t,e,r)=>{r.d(e,{J:()=>s});var n,o=r(11053),i={exports:{}};const s=(0,o.g)(function(){return n||(n=1,t=i,e=function(){var t=function(){function t(t){this.message="JPEG error: "+t}return t.prototype=new Error,t.prototype.name="JpegError",t.constructor=t,t}();return function(){if(!self||!self.Uint8ClampedArray)return null;var e=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,s=1567,a=3784,l=5793,u=2896;function c(){this.decodeTransform=null,this.colorTransform=-1}function h(t,e){for(var r,n,o=0,i=[],s=16;s>0&&!t[s-1];)s--;i.push({children:[],index:0});var a,l=i[0];for(r=0;r<s;r++){for(n=0;n<t[r];n++){for((l=i.pop()).children[l.index]=e[o];l.index>0;)l=i.pop();for(l.index++,i.push(l);i.length<=r;)i.push(a={children:[],index:0}),l.children[l.index]=a.children,l=a;o++}r+1<s&&(i.push(a={children:[],index:0}),l.children[l.index]=a.children,l=a)}return i[0].children}function f(t,e,r){return 64*((t.blocksPerLine+1)*e+r)}function p(r,n,o,i,s,a,l,u,c){var h=o.mcusPerLine,p=o.progressive,d=n,m=0,y=0;function w(){if(y>0)return y--,m>>y&1;if(255===(m=r[n++])){var e=r[n++];if(e)throw new t("unexpected marker "+(m<<8|e).toString(16))}return y=7,m>>>7}function b(e){for(var r=e;;){if("number"==typeof(r=r[w()]))return r;if("object"!=typeof r)throw new t("invalid huffman sequence")}}function C(t){for(var e=0;t>0;)e=e<<1|w(),t--;return e}function x(t){if(1===t)return 1===w()?1:-1;var e=C(t);return e>=1<<t-1?e:e+(-1<<t)+1}var v,A=0,k=0;function M(t,e,r,n,o){var i=r%h;e(t,f(t,(r/h|0)*t.v+n,i*t.h+o))}function S(t,e,r){e(t,f(t,r/t.blocksPerLine|0,r%t.blocksPerLine))}var T,I,P,E,R,L,U=i.length;L=p?0===a?0===u?function(t,e){var r=b(t.huffmanTableDC),n=0===r?0:x(r)<<c;t.blockData[e]=t.pred+=n}:function(t,e){t.blockData[e]|=w()<<c}:0===u?function(t,r){if(A>0)A--;else for(var n=a,o=l;n<=o;){var i=b(t.huffmanTableAC),s=15&i,u=i>>4;if(0!==s){var h=e[n+=u];t.blockData[r+h]=x(s)*(1<<c),n++}else{if(u<15){A=C(u)+(1<<u)-1;break}n+=16}}}:function(r,n){for(var o,i,s=a,u=l,h=0;s<=u;){var f=e[s];switch(k){case 0:if(h=(i=b(r.huffmanTableAC))>>4,0==(o=15&i))h<15?(A=C(h)+(1<<h),k=4):(h=16,k=1);else{if(1!==o)throw new t("invalid ACn encoding");v=x(o),k=h?2:3}continue;case 1:case 2:r.blockData[n+f]?r.blockData[n+f]+=w()<<c:0===--h&&(k=2===k?3:0);break;case 3:r.blockData[n+f]?r.blockData[n+f]+=w()<<c:(r.blockData[n+f]=v<<c,k=0);break;case 4:r.blockData[n+f]&&(r.blockData[n+f]+=w()<<c)}s++}4===k&&0===--A&&(k=0)}:function(t,r){var n=b(t.huffmanTableDC),o=0===n?0:x(n);t.blockData[r]=t.pred+=o;for(var i=1;i<64;){var s=b(t.huffmanTableAC),a=15&s,l=s>>4;if(0!==a){var u=e[i+=l];t.blockData[r+u]=x(a),i++}else{if(l<15)break;i+=16}}};var D,O,B,G,N=0;for(O=1===U?i[0].blocksPerLine*i[0].blocksPerColumn:h*o.mcusPerColumn;N<O;){var _=s?Math.min(O-N,s):O;for(I=0;I<U;I++)i[I].pred=0;if(A=0,1===U)for(T=i[0],R=0;R<_;R++)S(T,L,N),N++;else for(R=0;R<_;R++){for(I=0;I<U;I++)for(B=(T=i[I]).h,G=T.v,P=0;P<G;P++)for(E=0;E<B;E++)M(T,L,N,P,E);N++}y=0,(D=g(r,n))&&D.invalid&&(console.log("decodeScan - unexpected MCU data, next marker is: "+D.invalid),n=D.offset);var F=D&&D.marker;if(!F||F<=65280)throw new t("marker was not found");if(!(F>=65488&&F<=65495))break;n+=2}return(D=g(r,n))&&D.invalid&&(console.log("decodeScan - unexpected Scan data, next marker is: "+D.invalid),n=D.offset),n-d}function d(e,c,h){var f,p,d,m,g,y,w,b,C,x,v,A,k,M,S,T,I,P=e.quantizationTable,E=e.blockData;if(!P)throw new t("missing required Quantization Table.");for(var R=0;R<64;R+=8)C=E[c+R],x=E[c+R+1],v=E[c+R+2],A=E[c+R+3],k=E[c+R+4],M=E[c+R+5],S=E[c+R+6],T=E[c+R+7],C*=P[R],0!==(x|v|A|k|M|S|T)?(x*=P[R+1],v*=P[R+2],A*=P[R+3],k*=P[R+4],M*=P[R+5],S*=P[R+6],T*=P[R+7],p=(f=(f=l*C+128>>8)+(p=l*k+128>>8)+1>>1)-p,I=(d=v)*a+(m=S)*s+128>>8,d=d*s-m*a+128>>8,w=(g=(g=u*(x-T)+128>>8)+(w=M<<4)+1>>1)-w,y=(b=(b=u*(x+T)+128>>8)+(y=A<<4)+1>>1)-y,m=(f=f+(m=I)+1>>1)-m,d=(p=p+d+1>>1)-d,I=g*i+b*o+2048>>12,g=g*o-b*i+2048>>12,b=I,I=y*n+w*r+2048>>12,y=y*r-w*n+2048>>12,w=I,h[R]=f+b,h[R+7]=f-b,h[R+1]=p+w,h[R+6]=p-w,h[R+2]=d+y,h[R+5]=d-y,h[R+3]=m+g,h[R+4]=m-g):(I=l*C+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 L=0;L<8;++L)C=h[L],0!==((x=h[L+8])|(v=h[L+16])|(A=h[L+24])|(k=h[L+32])|(M=h[L+40])|(S=h[L+48])|(T=h[L+56]))?(p=(f=4112+((f=l*C+2048>>12)+(p=l*k+2048>>12)+1>>1))-p,I=(d=v)*a+(m=S)*s+2048>>12,d=d*s-m*a+2048>>12,m=I,w=(g=(g=u*(x-T)+2048>>12)+(w=M)+1>>1)-w,y=(b=(b=u*(x+T)+2048>>12)+(y=A)+1>>1)-y,I=g*i+b*o+2048>>12,g=g*o-b*i+2048>>12,b=I,I=y*n+w*r+2048>>12,y=y*r-w*n+2048>>12,C=(C=(f=f+m+1>>1)+b)<16?0:C>=4080?255:C>>4,x=(x=(p=p+d+1>>1)+(w=I))<16?0:x>=4080?255:x>>4,v=(v=(d=p-d)+y)<16?0:v>=4080?255:v>>4,A=(A=(m=f-m)+g)<16?0:A>=4080?255:A>>4,k=(k=m-g)<16?0:k>=4080?255:k>>4,M=(M=d-y)<16?0:M>=4080?255:M>>4,S=(S=p-w)<16?0:S>=4080?255:S>>4,T=(T=f-b)<16?0:T>=4080?255:T>>4,E[c+L]=C,E[c+L+8]=x,E[c+L+16]=v,E[c+L+24]=A,E[c+L+32]=k,E[c+L+40]=M,E[c+L+48]=S,E[c+L+56]=T):(I=(I=l*C+8192>>14)<-2040?0:I>=2024?255:I+2056>>4,E[c+L]=I,E[c+L+8]=I,E[c+L+16]=I,E[c+L+24]=I,E[c+L+32]=I,E[c+L+40]=I,E[c+L+48]=I,E[c+L+56]=I)}function m(t,e){for(var r=e.blocksPerLine,n=e.blocksPerColumn,o=new Int16Array(64),i=0;i<n;i++)for(var s=0;s<r;s++)d(e,f(e,i,s),o);return e.blockData}function g(t,e,r){function n(e){return t[e]<<8|t[e+1]}var o=t.length-1,i=r<e?r:e;if(e>=o)return null;var s=n(e);if(s>=65472&&s<=65534)return{invalid:null,marker:s,offset:e};for(var a=n(i);!(a>=65472&&a<=65534);){if(++i>=o)return null;a=n(i)}return{invalid:s.toString(16),marker:a,offset:i}}return c.prototype={parse:function(r){function n(){var t=r[l]<<8|r[l+1];return l+=2,t}function o(){var t=n(),e=l+t-2,o=g(r,e,l);o&&o.invalid&&(console.log("readDataBlock - incorrect length, next marker is: "+o.invalid),e=o.offset);var i=r.subarray(l,e);return l+=i.length,i}function i(t){for(var e=Math.ceil(t.samplesPerLine/8/t.maxH),r=Math.ceil(t.scanLines/8/t.maxV),n=0;n<t.components.length;n++){N=t.components[n];var o=Math.ceil(Math.ceil(t.samplesPerLine/8)*N.h/t.maxH),i=Math.ceil(Math.ceil(t.scanLines/8)*N.v/t.maxV),s=e*N.h,a=r*N.v*64*(s+1);N.blockData=new Int16Array(a),N.blocksPerLine=o,N.blocksPerColumn=i}t.mcusPerLine=e,t.mcusPerColumn=r}var s,a,l=0,u=null,c=null,f=[],d=[],y=[],w=n();if(65496!==w)throw new t("SOI not found");for(w=n();65497!==w;){var b,C,x;switch(w){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===w&&74===v[0]&&70===v[1]&&73===v[2]&&70===v[3]&&0===v[4]&&(u={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===w&&65===v[0]&&100===v[1]&&111===v[2]&&98===v[3]&&101===v[4]&&(c={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 A=n()+l-2;l<A;){var k=r[l++],M=new Uint16Array(64);if(k>>4){if(k>>4!=1)throw new t("DQT - invalid table spec");for(C=0;C<64;C++)M[e[C]]=n()}else for(C=0;C<64;C++)M[e[C]]=r[l++];f[15&k]=M}break;case 65472:case 65473:case 65474:if(s)throw new t("Only single frame JPEGs supported");n(),(s={}).extended=65473===w,s.progressive=65474===w,s.precision=r[l++],s.scanLines=n(),s.samplesPerLine=n(),s.components=[],s.componentIds={};var S,T=r[l++],I=0,P=0;for(b=0;b<T;b++){S=r[l];var E=r[l+1]>>4,R=15&r[l+1];I<E&&(I=E),P<R&&(P=R);var L=r[l+2];x=s.components.push({h:E,v:R,quantizationId:L,quantizationTable:null}),s.componentIds[S]=x-1,l+=3}s.maxH=I,s.maxV=P,i(s);break;case 65476:var U=n();for(b=2;b<U;){var D=r[l++],O=new Uint8Array(16),B=0;for(C=0;C<16;C++,l++)B+=O[C]=r[l];var G=new Uint8Array(B);for(C=0;C<B;C++,l++)G[C]=r[l];b+=17+B,(D>>4?d:y)[15&D]=h(O,G)}break;case 65501:n(),a=n();break;case 65498:n();var N,_=r[l++],F=[];for(b=0;b<_;b++){var V=s.componentIds[r[l++]];N=s.components[V];var z=r[l++];N.huffmanTableDC=y[z>>4],N.huffmanTableAC=d[15&z],F.push(N)}var j=r[l++],W=r[l++],Z=r[l++],H=p(r,l,s,F,a,j,W,Z>>4,15&Z);l+=H;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 t("unknown marker "+w.toString(16))}w=n()}for(this.width=s.samplesPerLine,this.height=s.scanLines,this.jfif=u,this.eof=l,this.adobe=c,this.components=[],b=0;b<s.components.length;b++){var q=f[(N=s.components[b]).quantizationId];q&&(N.quantizationTable=q),this.components.push({output:m(0,N),scaleX:N.h/s.maxH,scaleY:N.v/s.maxV,blocksPerLine:N.blocksPerLine,blocksPerColumn:N.blocksPerColumn})}this.numComponents=this.components.length},_getLinearizedBlockData:function(t,e){var r,n,o,i,s,a,l,u,c,h,f,p=this.width/t,d=this.height/e,m=0,g=this.components.length,y=t*e*g,w=new Uint8ClampedArray(y),b=new Uint32Array(t),C=4294967288;for(l=0;l<g;l++){for(n=(r=this.components[l]).scaleX*p,o=r.scaleY*d,m=l,f=r.output,i=r.blocksPerLine+1<<3,s=0;s<t;s++)u=0|s*n,b[s]=(u&C)<<3|7&u;for(a=0;a<e;a++)for(h=i*((u=0|a*o)&C)|(7&u)<<3,s=0;s<t;s++)w[m]=f[h+b[s]],m+=g}var x=this.decodeTransform;if(x)for(l=0;l<y;)for(u=0,c=0;u<g;u++,l++,c+=2)w[l]=(w[l]*x[c]>>8)+x[c+1];return w},_isColorConversionNeeded:function(){return this.adobe?!!this.adobe.transformCode:3===this.numComponents?0!==this.colorTransform:1===this.colorTransform},_convertYccToRgb:function(t){for(var e,r,n,o=0,i=t.length;o<i;o+=3)e=t[o],r=t[o+1],n=t[o+2],t[o]=e-179.456+1.402*n,t[o+1]=e+135.459-.344*r-.714*n,t[o+2]=e-226.816+1.772*r;return t},_convertYcckToRgb:function(t){for(var e,r,n,o,i=0,s=0,a=t.length;s<a;s+=4)e=t[s],r=t[s+1],n=t[s+2],o=t[s+3],t[i++]=r*(-660635669420364e-19*r+.000437130475926232*n-54080610064599e-18*e+.00048449797120281*o-.154362151871126)-122.67195406894+n*(-.000957964378445773*n+.000817076911346625*e-.00477271405408747*o+1.53380253221734)+e*(.000961250184130688*e-.00266257332283933*o+.48357088451265)+o*(-.000336197177618394*o+.484791561490776),t[i++]=107.268039397724+r*(219927104525741e-19*r-.000640992018297945*n+.000659397001245577*e+.000426105652938837*o-.176491792462875)+n*(-.000778269941513683*n+.00130872261408275*e+.000770482631801132*o-.151051492775562)+e*(.00126935368114843*e-.00265090189010898*o+.25802910206845)+o*(-.000318913117588328*o-.213742400323665),t[i++]=r*(-.000570115196973677*r-263409051004589e-19*n+.0020741088115012*e-.00288260236853442*o+.814272968359295)-20.810012546947+n*(-153496057440975e-19*n-.000132689043961446*e+.000560833691242812*o-.195152027534049)+e*(.00174418132927582*e-.00255243321439347*o+.116935020465145)+o*(-.000343531996510555*o+.24165260232407);return t},_convertYcckToCmyk:function(t){for(var e,r,n,o=0,i=t.length;o<i;o+=4)e=t[o],r=t[o+1],n=t[o+2],t[o]=434.456-e-1.402*n,t[o+1]=119.541-e+.344*r+.714*n,t[o+2]=481.816-e-1.772*r;return t},_convertCmykToRgb:function(t){for(var e,r,n,o,i=0,s=1/255,a=0,l=t.length;a<l;a+=4)e=t[a]*s,r=t[a+1]*s,n=t[a+2]*s,o=t[a+3]*s,t[i++]=255+e*(-4.387332384609988*e+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),t[i++]=255+e*(8.841041422036149*e+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),t[i++]=255+e*(.8842522430003296*e+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 t},getData:function(e,r,n){if(this.numComponents>4)throw new t("Unsupported color mode");var o=this._getLinearizedBlockData(e,r);if(1===this.numComponents&&n){for(var i=o.length,s=new Uint8ClampedArray(3*i),a=0,l=0;l<i;l++){var u=o[l];s[a++]=u,s[a++]=u,s[a++]=u}return s}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}},c}()},void 0!==(r=e())&&(t.exports=r)),i.exports;var t,e,r}())},67369:(t,e,r)=>{r.d(e,{L7:()=>s,M5:()=>p,R8:()=>y,S2:()=>w,hf:()=>x,hs:()=>f,iv:()=>g,kH:()=>l,vL:()=>v,vj:()=>a});var n=r(85334),o=r(66552),i=r(12195);const s=["random","ndvi","ndvi2","ndvi3","elevation","gray","hillshade"],a=[{id:"aspect",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:"black-to-white",fromColor:[0,0,0],toColor:[255,255,255]},{id:"blue-bright",fromColor:[204,204,255],toColor:[0,0,224]},{id:"blue-light-to-dark",fromColor:[211,229,232],toColor:[46,100,140]},{id:"blue-green-bright",fromColor:[203,245,234],toColor:[48,207,146]},{id:"blue-green-light-to-dark",fromColor:[216,242,237],toColor:[21,79,74]},{id:"brown-light-to-dark",fromColor:[240,236,170],toColor:[102,72,48]},{id:"brown-to-blue-green-diverging-right",type:"multipart",colorRamps:[{fromColor:[156,85,31],toColor:[255,255,191]},{fromColor:[255,255,191],toColor:[33,130,145]}]},{id:"brown-to-blue-green-diverging-dark",type:"multipart",colorRamps:[{fromColor:[110,70,45],toColor:[204,204,102]},{fromColor:[204,204,102],toColor:[48,100,102]}]},{id:"coefficient-bias",fromColor:[214,214,255],toColor:[0,57,148]},{id:"cold-to-hot-diverging",type:"multipart",colorRamps:[{fromColor:[69,117,181],toColor:[255,255,191]},{fromColor:[255,255,191],toColor:[214,47,39]}]},{id:"condition-number",type:"multipart",colorRamps:[{fromColor:[0,97,0],toColor:[255,255,0]},{fromColor:[255,255,0],toColor:[255,34,0]}]},{id:"cyan-to-purple",type:"multipart",colorRamps:[{fromColor:[0,245,245],toColor:[0,0,245]},{fromColor:[0,0,245],toColor:[245,0,245]}]},{id:"cyan-light-to-blue-dark",type:"multipart",colorRamps:[{fromColor:[182,237,240],toColor:[31,131,224]},{fromColor:[31,131,224],toColor:[9,9,145]}]},{id:"distance",fromColor:[255,200,0],toColor:[0,0,255]},{id:"elevation1",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",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",fromColor:[255,235,214],toColor:[196,10,10]},{id:"gray-light-to-dark",fromColor:[219,219,219],toColor:[69,69,69]},{id:"green-bright",fromColor:[204,255,204],toColor:[14,204,14]},{id:"green-light-to-dark",fromColor:[220,245,233],toColor:[34,102,51]},{id:"green-to-blue",type:"multipart",colorRamps:[{fromColor:[32,204,16],toColor:[0,242,242]},{fromColor:[0,242,242],toColor:[2,33,227]}]},{id:"orange-bright",fromColor:[255,235,204],toColor:[240,118,5]},{id:"orange-light-to-dark",fromColor:[250,233,212],toColor:[171,65,36]},{id:"partial-spectrum",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:"partial-spectrum-1-diverging",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:"partial-spectrum-2-diverging",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:"pink-to-yellow-green-diverging-bright",type:"multipart",colorRamps:[{fromColor:[158,30,113],toColor:[255,255,191]},{fromColor:[255,255,191],toColor:[99,110,45]}]},{id:"pink-to-yellow-green-diverging-dark",type:"multipart",colorRamps:[{fromColor:[97,47,73],toColor:[204,204,102]},{fromColor:[204,204,102],toColor:[22,59,15]}]},{id:"precipitation",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",type:"multipart",colorRamps:[{fromColor:[40,146,199],toColor:[250,250,100]},{fromColor:[250,250,100],toColor:[232,16,20]}]},{id:"purple-bright",fromColor:[255,204,255],toColor:[199,0,199]},{id:"purple-to-green-diverging-bright",type:"multipart",colorRamps:[{fromColor:[77,32,150],toColor:[255,255,191]},{fromColor:[255,255,191],toColor:[20,122,11]}]},{id:"purple-to-green-diverging-dark",type:"multipart",colorRamps:[{fromColor:[67,14,89],toColor:[204,204,102]},{fromColor:[204,204,102],toColor:[24,79,15]}]},{id:"purple-blue-bright",fromColor:[223,184,230],toColor:[112,12,242]},{id:"purple-blue-light-to-dark",fromColor:[229,213,242],toColor:[93,44,112]},{id:"purple-red-bright",fromColor:[255,204,225],toColor:[199,0,99]},{id:"purple-red-light-to-dark",fromColor:[250,215,246],toColor:[143,17,57]},{id:"red-bright",fromColor:[255,204,204],toColor:[219,0,0]},{id:"red-light-to-dark",fromColor:[255,224,224],toColor:[143,10,10]},{id:"red-to-blue-diverging-bright",type:"multipart",colorRamps:[{fromColor:[196,69,57],toColor:[255,255,191]},{fromColor:[255,255,191],toColor:[48,95,207]}]},{id:"red-to-blue-diverging-dark",type:"multipart",colorRamps:[{fromColor:[107,13,13],toColor:[204,204,102]},{fromColor:[204,204,102],toColor:[13,53,97]}]},{id:"red-to-green",type:"multipart",colorRamps:[{fromColor:[245,0,0],toColor:[245,245,0]},{fromColor:[245,245,0],toColor:[0,245,0]}]},{id:"red-to-green-diverging-bright",type:"multipart",colorRamps:[{fromColor:[186,20,20],toColor:[255,255,191]},{fromColor:[255,255,191],toColor:[54,145,33]}]},{id:"red-to-green-diverging-dark",type:"multipart",colorRamps:[{fromColor:[97,21,13],toColor:[204,204,102]},{fromColor:[204,204,102],toColor:[16,69,16]}]},{id:"slope",type:"multipart",colorRamps:[{fromColor:[56,168,0],toColor:[255,255,0]},{fromColor:[255,255,0],toColor:[255,0,0]}]},{id:"spectrum-full-bright",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:"spectrum-full-dark",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:"spectrum-full-light",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",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",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:"white-to-black",fromColor:[255,255,255],toColor:[0,0,0]},{id:"yellow-to-dark-red",type:"multipart",colorRamps:[{fromColor:[255,255,128],toColor:[242,167,46]},{fromColor:[242,167,46],toColor:[107,0,0]}]},{id:"yellow-to-green-to-dark-blue",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:"yellow-to-red",fromColor:[245,245,0],toColor:[255,0,0]},{id:"yellow-green-bright",fromColor:[236,252,204],toColor:[157,204,16]},{id:"yellow-green-light-to-dark",fromColor:[215,240,175],toColor:[96,107,45]}],l=new o.J({Aspect:"aspect","Black to White":"black-to-white","Blue Bright":"blue-bright","Blue Light to Dark":"blue-light-to-dark","Blue-Green Bright":"blue-green-bright","Blue-Green Light to Dark":"blue-green-light-to-dark","Brown Light to Dark":"brown-light-to-dark","Brown to Blue Green Diverging, Bright":"brown-to-blue-green-diverging-right","Brown to Blue Green Diverging, Dark":"brown-to-blue-green-diverging-dark","Coefficient Bias":"coefficient-bias","Cold to Hot Diverging":"cold-to-hot-diverging","Condition Number":"condition-number","Cyan to Purple":"cyan-to-purple","Cyan-Light to Blue-Dark":"cyan-light-to-blue-dark",Distance:"distance","Elevation #1":"elevation1","Elevation #2":"elevation2",Errors:"errors","Gray Light to Dark":"gray-light-to-dark","Green Bright":"green-bright","Green Light to Dark":"green-light-to-dark","Green to Blue":"green-to-blue","Orange Bright":"orange-bright","Orange Light to Dark":"orange-light-to-dark","Partial Spectrum":"partial-spectrum","Partial Spectrum 1 Diverging":"partial-spectrum-1-diverging","Partial Spectrum 2 Diverging":"partial-spectrum-2-diverging","Pink to YellowGreen Diverging, Bright":"pink-to-yellow-green-diverging-bright","Pink to YellowGreen Diverging, Dark":"pink-to-yellow-green-diverging-dark",Precipitation:"precipitation",Prediction:"prediction","Purple Bright":"purple-bright","Purple to Green Diverging, Bright":"purple-to-green-diverging-bright","Purple to Green Diverging, Dark":"purple-to-green-diverging-dark","Purple-Blue Bright":"purple-blue-bright","Purple-Blue Light to Dark":"purple-blue-light-to-dark","Purple-Red Bright":"purple-red-bright","Purple-Red Light to Dark":"purple-red-light-to-dark","Red Bright":"red-bright","Red Light to Dark":"red-light-to-dark","Red to Blue Diverging, Bright":"red-to-blue-diverging-bright","Red to Blue Diverging, Dark":"red-to-blue-diverging-dark","Red to Green":"red-to-green","Red to Green Diverging, Bright":"red-to-green-diverging-bright","Red to Green Diverging, Dark":"red-to-green-diverging-dark",Slope:"slope","Spectrum-Full Bright":"spectrum-full-bright","Spectrum-Full Dark":"spectrum-full-dark","Spectrum-Full Light":"spectrum-full-light",Surface:"surface",Temperature:"temperature","White to Black":"white-to-black","Yellow to Dark Red":"yellow-to-dark-red","Yellow to Green to Dark Blue":"yellow-to-green-to-dark-blue","Yellow to Red":"yellow-to-red","Yellow-Green Bright":"yellow-green-bright","Yellow-Green Light to Dark":"yellow-green-light-to-dark"});function u(t,e){if(!t||!e||t.length!==e.length)return!1;for(let r=0;r<t.length;r++)if(t[r]>e[r]+2||t[r]<e[r]-2)return!1;return!0}function c(t){const e=t.clone();return e.fromColor=t.toColor,e.toColor=t.fromColor,e}function h(t,e){const r=e??a;if("algorithmic"===t.type){const e=t.fromColor.toRgb(),n=t.toColor.toRgb();return r.find(t=>u(e,t.fromColor)&&u(n,t.toColor))?.id}const n=t.colorRamps?.map(t=>({fromColor:t.fromColor.toRgb(),toColor:t.toColor.toRgb()}));return r.find(t=>{const e=t.colorRamps;return!(!n||!e||n.length!==e.length)&&e.every((t,e)=>u(n[e].fromColor,t.fromColor)&&u(n[e].toColor,t.toColor))})?.id}function f(t,e=!1){const r="string"==typeof t?t:function(t,e,r=!1){if(!t)return;let n=!1,o=h(t,e);return null!=o||r||(n=!0,o=h(t=function(t){if("multipart"===t.type){const e=t.clone();return e.colorRamps?.length?(e.colorRamps=e.colorRamps.reverse().map(t=>c(t)),e):e}return c(t)}(t),e)),o?{id:o,inverted:n}:void 0}(t,void 0,e)?.id;return r?l.toJSON(r):null}function p(t,e="esriCIELabAlgorithm"){const r=a.find(({id:e})=>e===t);return r?r.colorRamps?{type:"multipart",colorRamps:r.colorRamps.map(t=>({type:"algorithmic",algorithm:e,fromColor:[...t.fromColor],toColor:[...t.toColor]}))}:{type:"algorithmic",algorithm:e,fromColor:[...r.fromColor],toColor:[...r.toColor]}:null}function d(t){t??={};const e=t.numColors||256,r=t.distanceOffset||0,n=null!=t.isCustomInterval?t.isCustomInterval:null!==t.distanceInterval&&t.distanceInterval!==1/(e-1),o=t.distanceInterval||1/(e-1);return{...t,numColors:e,distanceOffset:r,interpolateAlpha:!!t.interpolateAlpha,distanceInterval:o,isCustomInterval:n,weights:t.weights}}function m(t,e){const{fromColor:r,toColor:o}=t,i=3===r.length?[...r,255]:[...r],s=3===o.length?[...o,255]:[...o],a=t.algorithm||"esriCIELabAlgorithm",l=d(e),{numColors:u,distanceOffset:c,isCustomInterval:h,interpolateAlpha:f}=l;if(1===u&&0===c)return[i];if(2===u&&0===c&&!h)return[i,s];const p={r:i[0],g:i[1],b:i[2]},m={r:s[0],g:s[1],b:s[2]},g="esriCIELabAlgorithm"===a?function(t,e,r){const{numColors:n,distanceOffset:o,distanceInterval:i,isCustomInterval:s}=r;let{l:a,a:l,b:u}=t;const c=(e.l-a)*i,h=(e.a-l)*i,f=(e.b-u)*i,p=[];if(o){const t=o/i;a+=t*c,l+=t*h,u+=t*f}for(let t=0;t<n-1;t++)p.push({l:a,a:l,b:u}),a+=c,l+=h,u+=f;return p.push(s?{l:a,a:l,b:u}:e),p}((0,n.ZD)(p),(0,n.ZD)(m),l):"esriHSVAlgorithm"===a?function(t,e,r){const{numColors:n,distanceOffset:o,distanceInterval:i,isCustomInterval:s}=r,a=0===t.s,l=0===e.s;let u=t.h,c=e.h;a&&!l?u=c:l&&!a&&(e={...e,h:u},c=u);let h=Math.abs(c-u),f=0;const p=360;h<180?f=(c-u)*i:(h=p-h,f=u>c?h*i:-h*i);const d=(e.s-t.s)*i,m=(e.v-t.v)*i;let{s:g,v:y}=t,w=u;if(o){const t=o/i;w=(w+t*f+p)%p,g+=t*d,y+=t*m}const b=[];for(let t=0;t<n-1;t++)b.push({h:w,s:g,v:y}),w=(w+f+p)%p,g+=d,y+=m;return b.push(s?{h:w,s:g,v:y}:e),b}((0,n.N2)(p),(0,n.N2)(m),l):function(t,e,r){const{numColors:n,distanceOffset:o,distanceInterval:i,isCustomInterval:s}=r,a=t.h,l=e.h,u=2*Math.PI;let c=0;if(a<=l){const t=l-a,e=l-a-u;c=Math.abs(e)<Math.abs(t)?e:t}else{const t=l+u-a,e=l-a;c=Math.abs(e)<Math.abs(t)?e:t}const h=c*i,f=(e.l-t.l)*i,p=(e.c-t.c)*i;let{l:d,c:m,h:g}=t;if(o){const t=o/i;d+=t*f,m+=t*p,g=(g+t*h+u)%u}const y=[];for(let t=0;t<n-1;t++)y.push({l:d,c:m,h:g}),d+=f,m+=p,g=(g+h+u)%u;return y.push(s?{l:d,c:m,h:g}:e),y}((0,n.RH)(p),(0,n.RH)(m),l),y=[],w=i[3]??255,b=((s[3]??255)-w)/(u-1);for(let t=0;t<u;t++){const{r:e,g:r,b:o}=(0,n.$)(g[t]),i=f?Math.round(w+b*t):255;y.push([e,r,o,i])}return y}function g(t,e){const r=(0,i.W)(t)?t.toJSON():t;return"multipart"===r.type?function(t,e){const{numColors:r,interpolateAlpha:n}=d(e),o=function(t,e){const{colorRamps:r}=t;if(!e?.length)return Array.from({length:r.length},()=>1/r.length);const n=e.reduce((t,e)=>t+e);return e.map(t=>t/n)}(t,e?.weights),{colorRamps:i}=t,s=[],a=1/(r-1);let l=0,u=!1;for(let t=0;t<i.length;t++){const e=s.length,c=u?0:e*a-l;l+=o[t];let h=t===i.length-1?r-1-e:(o[t]-c)/a;if(u=Math.ceil(h)===h,h=Math.ceil(h),0===h)continue;const f=m(i[t],{numColors:h,interpolateAlpha:n,distanceOffset:c/o[t],distanceInterval:a/o[t]});s.push(...f)}const c=[...i[i.length-1].toColor];return 3===c.length&&c.push(255),s.push(c),s}(r,e):m(r,e)}function y(t,e){const r=g(t,e),n=e?.interpolateAlpha;return r.forEach((t,e)=>{t.unshift(e),n||t.pop()}),r}function w(t){const e=[];for(let r=0;r<t.length;r+=4){const o=(0,n.N2)({r:t[r],g:t[r+1],b:t[r+2]});e.push([o.h/60,o.s/100,255*o.v/100])}return e}function b(t){const e=(0,n.N2)(t);return{type:"HsvColor",Hue:e.h,Saturation:e.s,Value:e.v,AlphaValue:255}}function C(t){const e=t.toJSON();return{Algorithm:e?.Algorithm||"esriHSVAlgorithm",type:"AlgorithmicColorRamp",FromColor:b(t.fromColor),ToColor:b(t.toColor)}}function x(t){const e=f(t);if(!e)return null;if("algorithmic"===t.type)return{...C(t),Name:e};if(t.colorRamps){const r=t.colorRamps.map(C);return{type:"MultiPartColorRamp",NumColorRamps:r.length,ArrayOfColorRamp:r,Name:e}}return null}function v(t){const e=[...t].reverse().map(t=>{const e=t.toString(16);return e.length<2?"0"+e:e});return 4294967295&Number.parseInt(e.join(""),16)}},68060:(t,e,r)=>{r.d(e,{Z:()=>s});var n,o=r(11053),i={exports:{}};const s=(0,o.g)(function(){return n||(n=1,e=i,void 0!==(t=function(){function t(){this.pos=0,this.bufferLength=0,this.eof=!1,this.buffer=null}return t.prototype={ensureBuffer:function(t){var e=this.buffer,r=e?e.byteLength:0;if(t<r)return e;for(var n=512;n<t;)n<<=1;for(var o=new Uint8Array(n),i=0;i<r;++i)o[i]=e[i];return this.buffer=o},getByte:function(){for(var t=this.pos;this.bufferLength<=t;){if(this.eof)return null;this.readBlock()}return this.buffer[this.pos++]},getBytes:function(t){var e=this.pos;if(t){this.ensureBuffer(e+t);for(var r=e+t;!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(e,r)},lookChar:function(){for(var t=this.pos;this.bufferLength<=t;){if(this.eof)return null;this.readBlock()}return String.fromCharCode(this.buffer[this.pos])},getChar:function(){for(var t=this.pos;this.bufferLength<=t;){if(this.eof)return null;this.readBlock()}return String.fromCharCode(this.buffer[this.pos++])},makeSubStream:function(t,e,r){for(var n=t+e;this.bufferLength<=n&&!this.eof;)this.readBlock();return new Stream(this.buffer,t,e,r)},skip:function(t){t||(t=1),this.pos+=t},reset:function(){this.pos=0}},t}(),r=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]),r=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]),n=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 s(t){throw new Error(t)}function a(e){var r=0,n=e[r++],o=e[r++];-1!=n&&-1!=o||s("Invalid header in flate stream"),8!=(15&n)&&s("Unknown compression method in flate stream"),((n<<8)+o)%31!=0&&s("Bad FCHECK in flate stream"),32&o&&s("FDICT bit set in flate stream"),this.bytes=e,this.bytesPos=2,this.codeSize=0,this.codeBuf=0,t.call(this)}return a.prototype=Object.create(t.prototype),a.prototype.getBits=function(t){for(var e,r=this.codeSize,n=this.codeBuf,o=this.bytes,i=this.bytesPos;r<t;)void 0===(e=o[i++])&&s("Bad encoding in flate stream"),n|=e<<r,r+=8;return e=n&(1<<t)-1,this.codeBuf=n>>t,this.codeSize=r-=t,this.bytesPos=i,e},a.prototype.getCode=function(t){for(var e=t[0],r=t[1],n=this.codeSize,o=this.codeBuf,i=this.bytes,a=this.bytesPos;n<r;){var l;void 0===(l=i[a++])&&s("Bad encoding in flate stream"),o|=l<<n,n+=8}var u=e[o&(1<<r)-1],c=u>>16,h=65535&u;return(0==n||n<c||0==c)&&s("Bad encoding in flate stream"),this.codeBuf=o>>c,this.codeSize=n-c,this.bytesPos=a,h},a.prototype.generateHuffmanTable=function(t){for(var e=t.length,r=0,n=0;n<e;++n)t[n]>r&&(r=t[n]);for(var o=1<<r,i=new Uint32Array(o),s=1,a=0,l=2;s<=r;++s,a<<=1,l<<=1)for(var u=0;u<e;++u)if(t[u]==s){var c=0,h=a;for(n=0;n<s;++n)c=c<<1|1&h,h>>=1;for(n=c;n<o;n+=l)i[n]=s<<16|u;++a}return[i,r]},a.prototype.readBlock=function(){function t(t,e,r,n,o){for(var i=t.getBits(r)+n;i-- >0;)e[d++]=o}var a=this.getBits(3);if(1&a&&(this.eof=!0),0!=(a>>=1)){var l,u;if(1==a)l=o,u=i;else if(2==a){for(var c=this.getBits(5)+257,h=this.getBits(5)+1,f=this.getBits(4)+4,p=Array(e.length),d=0;d<f;)p[e[d++]]=this.getBits(3);for(var m=this.generateHuffmanTable(p),g=0,y=(d=0,c+h),w=new Array(y);d<y;){var b=this.getCode(m);16==b?t(this,w,2,3,g):17==b?t(this,w,3,3,g=0):18==b?t(this,w,7,11,g=0):w[d++]=g=b}l=this.generateHuffmanTable(w.slice(0,c)),u=this.generateHuffmanTable(w.slice(c,y))}else s("Unknown block type in flate stream");for(var C=(L=this.buffer)?L.length:0,x=this.bufferLength;;){var v=this.getCode(l);if(v<256)x+1>=C&&(C=(L=this.ensureBuffer(x+1)).length),L[x++]=v;else{if(256==v)return void(this.bufferLength=x);var A=(v=r[v-=257])>>16;A>0&&(A=this.getBits(A)),g=(65535&v)+A,v=this.getCode(u),(A=(v=n[v])>>16)>0&&(A=this.getBits(A));var k=(65535&v)+A;x+g>=C&&(C=(L=this.ensureBuffer(x+g)).length);for(var M=0;M<g;++M,++x)L[x]=L[x-k]}}}else{var S,T=this.bytes,I=this.bytesPos;void 0===(S=T[I++])&&s("Bad block header in flate stream");var P=S;void 0===(S=T[I++])&&s("Bad block header in flate stream"),P|=S<<8,void 0===(S=T[I++])&&s("Bad block header in flate stream");var E=S;void 0===(S=T[I++])&&s("Bad block header in flate stream"),(E|=S<<8)!=(65535&~P)&&s("Bad uncompressed block length in flate stream"),this.codeBuf=0,this.codeSize=0;var R=this.bufferLength,L=this.ensureBuffer(R+P),U=R+P;this.bufferLength=U;for(var D=R;D<U;++D){if(void 0===(S=T[I++])){this.eof=!0;break}L[D]=S}this.bytesPos=I}},a}())&&(e.exports=r)),i.exports;var t,e,r}())},70274:(t,e,r)=>{r.d(e,{u:()=>n,x:()=>o});const n=new(r(66552).J)({none:"none",standardDeviation:"standard-deviation",histogramEqualization:"histogram-equalization",minMax:"min-max",percentClip:"percent-clip",sigmoid:"sigmoid"}),o={0:"none",3:"standardDeviation",4:"histogramEqualization",5:"minMax",6:"percentClip",9:"sigmoid"}},85334:(t,e,r)=>{r.d(e,{$:()=>y,IB:()=>s,Iy:()=>A,N2:()=>w,RH:()=>C,ZD:()=>b});var n=r(68197),o=r(4576),i=r(4718);function s(t){return"r"in t&&"g"in t&&"b"in t}function a(t){return"h"in t&&"s"in t&&"v"in t}function l(t){return"l"in t&&"a"in t&&"b"in t}function u(t){return"l"in t&&"c"in t&&"h"in t}r(34727),r(87317),r(91829);const c=[[.4124,.3576,.1805],[.2126,.7152,.0722],[.0193,.1192,.9505]],h=[[3.2406,-1.5372,-.4986],[-.9689,1.8758,.0415],[.0557,-.204,1.057]];function f(t,e){const r=[];let n,o;if(t[0].length!==e.length)throw new Error("dimensions do not match");const i=t.length,s=t[0].length;let a=0;for(n=0;n<i;n++){for(a=0,o=0;o<s;o++)a+=t[n][o]*e[o];r.push(a)}return r}function p(t){const e=[t.r/255,t.g/255,t.b/255].map(t=>t<=.04045?t/12.92:((t+.055)/1.055)**2.4),r=f(c,e);return{x:100*r[0],y:100*r[1],z:100*r[2]}}function d(t){const e=f(h,[t.x/100,t.y/100,t.z/100]).map(t=>{const e=t<=.0031308?12.92*t:1.055*t**(1/2.4)-.055;return Math.min(1,Math.max(e,0))});return{r:Math.round(255*e[0]),g:Math.round(255*e[1]),b:Math.round(255*e[2])}}function m(t){const e=[t.x/95.047,t.y/100,t.z/108.883].map(t=>t>(6/29)**3?t**(1/3):1/3*(29/6)**2*t+4/29);return{l:116*e[1]-16,a:500*(e[0]-e[1]),b:200*(e[1]-e[2])}}function g(t){const e=t.l,r=[(e+16)/116+t.a/500,(e+16)/116,(e+16)/116-t.b/200].map(t=>t>6/29?t**3:3*(6/29)**2*(t-4/29));return{x:95.047*r[0],y:100*r[1],z:108.883*r[2]}}function y(t){return s(t)?t:u(t)?function(t){return d(g(function(t){const e=t.l,r=t.c,n=t.h;return{l:e,a:r*Math.cos(n),b:r*Math.sin(n)}}(t)))}(t):l(t)?function(t){return d(g(t))}(t):function(t){return"x"in t&&"y"in t&&"z"in t}(t)?d(t):a(t)?function(t){const e=(t.h+360)%360/60,r=t.s/100,n=t.v/100*255,o=n*r,i=o*(1-Math.abs(e%2-1));let s;switch(Math.floor(e)){case 0:s={r:o,g:i,b:0};break;case 1:s={r:i,g:o,b:0};break;case 2:s={r:0,g:o,b:i};break;case 3:s={r:0,g:i,b:o};break;case 4:s={r:i,g:0,b:o};break;case 5:case 6:s={r:o,g:0,b:i};break;default:s={r:0,g:0,b:0}}return s.r=Math.round(s.r+n-o),s.g=Math.round(s.g+n-o),s.b=Math.round(s.b+n-o),s}(t):t}function w(t){return a(t)?t:function(t){const e=t.r,r=t.g,n=t.b,o=Math.max(e,r,n),i=o-Math.min(e,r,n);let s=o,a=0===i?0:o===e?(r-n)/i%6:o===r?(n-e)/i+2:(e-r)/i+4,l=0===i?0:i/s;return a<0&&(a+=6),a*=60,l*=100,s*=100/255,{h:a,s:l,v:s}}(y(t))}function b(t){return l(t)?t:function(t){return m(p(t))}(y(t))}function C(t){return u(t)?t:function(t){return function(t){const e=t.l,r=t.a,n=t.b,o=Math.sqrt(r*r+n*n);let i=Math.atan2(n,r);return i=i>0?i:i+2*Math.PI,{l:e,c:o,h:i}}(m(p(t)))}(y(t))}var x,v;function A(t,e,r={}){if(0===t.length||e<=0)return[];if(1===(t=t.map(t=>"string"==typeof t?new n.A(t):t)).length||1===e){const r=[],n=t[0];for(let t=0;t<e;t++)r.push(n.clone());return r}if(r.shuffle&&(t=(0,o.k4)((0,i.o8)(t),r.seed)),t.length>=e){const r=[],n=(t.length-1)/(e-1);for(let o=0;o<e;o++){const e=Math.round(o*n);r.push(t[e].clone())}return r}return function(t,e,r={}){const n=[],i=t.length-1,s=Math.ceil((e-t.length)/i);t:for(let o=0;o<i;o++){const i=t[o],a=t[o+1];for(let o=1;o<=s;o++){const l=o/(s+1);if(n.push(M(i,a,l,r)),n.length+t.length===e)break t}}return[...t.map(t=>t.clone()),...(0,o.k4)(n,r.seed??1)]}(t,e,r)}(v=x||(x={}))[v.Low=160]="Low",v[v.High=225]="High";const k=(t,e)=>{const r=Math.floor(10*e())-5;return Math.min(255,Math.max(0,t+r))};function M(t,e,r,i={}){const s=t.r,a=t.g,l=t.b,u=e.r,c=e.g,h=e.b,f=Math.round(s+(u-s)*r),p=Math.round(a+(c-a)*r),d=Math.round(l+(h-l)*r);if(!i.offset)return new n.A([f,p,d]);const m=(0,o.Mo)(i.seed);return new n.A([k(f,m),k(p,m),k(d,m)])}},85676:(t,e,r)=>{r.d(e,{A:()=>d});var n=r(90237),o=(r(44208),r(25482)),i=r(53966),s=r(10107),a=(r(87811),r(40608)),l=r(87186),u=r(28435),c=r(6952),h=r(39062),f=r(67369),p=r(88178);let d=class extends o.A{constructor(t){super(t),this.lookup={rendererJSON:{}},this.canRenderInWebGL=!1}bind(){const{rendererJSON:t}=this;if(!t)return{success:!1};let e;switch(this.lookup={rendererJSON:{}},t.type){case"uniqueValue":e=this._updateUVRenderer(t);break;case"rasterColormap":e=this._updateColormapRenderer(t);break;case"rasterStretch":e=this._updateStretchRenderer(t);break;case"classBreaks":e=this._updateClassBreaksRenderer(t);break;case"rasterShadedRelief":e=this._updateShadedReliefRenderer(t);break;case"vectorField":e=this._updateVectorFieldRenderer();break;case"flowRenderer":e=this._updateFlowRenderer()}return e}symbolize(t){let e=t?.pixelBlock;if(!m(e))return e;if(t.simpleStretchParams&&"rasterStretch"===this.rendererJSON.type)return this.simpleStretch(e,t.simpleStretchParams);try{let r;switch(e.pixels.length>3&&(e=e.extractBands(t.bandIds??[0,1,2])),this.rendererJSON.type){case"uniqueValue":case"rasterColormap":r=this._symbolizeColormap(e);break;case"classBreaks":r=this._symbolizeClassBreaks(e);break;case"rasterStretch":r=this._symbolizeStretch(e,t.bandIds);break;case"rasterShadedRelief":{const n=t.extent,o=n.spatialReference.isGeographic,i={x:(n.xmax-n.xmin)/e.width,y:(n.ymax-n.ymin)/e.height};r=this._symbolizeShadedRelief(e,{isGCS:o,resolution:i});break}}return r}catch(t){return i.A.getLogger(this).error("symbolize",t.message),e}}simpleStretch(t,e){if(!m(t))return t;try{return t.pixels.length>3&&(t=t.extractBands([0,1,2])),(0,c._N)(t,{...e,isRenderer:!0})}catch(e){return i.A.getLogger(this).error("symbolize",e.message),t}}generateWebGLParameters(t){const{rendererJSON:e}=this;switch(e.type){case"uniqueValue":case"rasterColormap":case"classBreaks":return this._generateColormapWebGLParams("classBreaks"===e.type);case"rasterStretch":return this._generateStretchWebGLParams(t.pixelBlock,e,t.bandIds);case"rasterShadedRelief":return this._generateShadedReliefWebGLParams(e,t.isGCS,t.resolution??void 0);case"vectorField":return this._generateVectorFieldWebGLParams(e);default:return null}}_isLUTChanged(t){const e=this.lookup.rendererJSON;if(!e)return!0;const{rendererJSON:r}=this;if("colorRamp"in r&&r.colorRamp){const n=r.colorRamp;if(t)return JSON.stringify(n)!==JSON.stringify(e.colorRamp)}return JSON.stringify(r)!==JSON.stringify(e)}_symbolizeColormap(t){return this._isLUTChanged()&&!this.bind().success?t:(0,u.qL)(t,this.lookup.colormapLut)}_symbolizeClassBreaks(t){const{canUseIndexedLUT:e}=this._analyzeClassBreaks(this.rendererJSON);return this._isLUTChanged()&&!this.bind().success?t:e?(0,u.qL)(t,this.lookup.colormapLut):(0,u.Hx)(t,this.lookup.remapLut??[])}_symbolizeStretch(t,e){if(!t)return null;const{rasterInfo:r,lookup:n}=this,{pixelType:o,bandCount:i}=r,s=this.rendererJSON,a=["u8","u16","s8","s16"].includes(o);let l;const{dra:h}=s,{gamma:f}=n;if("histogramEqualization"===s.stretchType){const o=h?null:n.histogramLut,i=(0,c.DP)(s,{rasterInfo:r,pixelBlock:t,bandIds:e,returnHistogramLut:!o}),a="u8"===r.pixelType&&!h&&(0,c.zt)(r.histograms?.[0])?t:(0,c._N)(t,{...i,gamma:f,isRenderer:!0});l=(0,u.eH)(a,{lut:h?i.histogramLut:e?.length?e.map(t=>o[t]):o,offset:0})}else if(a){let a;if(h){const n=(0,c.DP)(s,{rasterInfo:r,pixelBlock:t,bandIds:e});a=(0,c.RP)({pixelType:o,...n,gamma:f,rounding:"floor"})}else{if(this._isLUTChanged()&&!this.bind().success)return t;a=n.stretchLut}if(!a)return t;i>1&&null!=e&&e.length===t?.pixels.length&&a.lut.length===i&&(a={lut:e.map(t=>a.lut[t]),offset:a.offset}),l=(0,u.eH)(t,a)}else{const n=(0,c.DP)(s,{rasterInfo:r,pixelBlock:t,bandIds:e});l=(0,c._N)(t,{...n,gamma:f,isRenderer:!0})}if(s.colorRamp){if(this._isLUTChanged(!0)&&!this.bind().success)return t;l=(0,u.qL)(l,n.colormapLut)}return l}_symbolizeShadedRelief(t,e){const r=this.rendererJSON,n={...r,...e},o=(0,h.fw)(t,n);if(!r.colorRamp)return o;if(this._isLUTChanged(!0)&&!this.bind().success)return o;const{hsvMap:i}=this.lookup;if(!i)return o;const s=this.rasterInfo.statistics?.[0]??{min:0,max:8e3};return(0,h.SC)(o,t,i,s),o}_isVectorFieldData(){const{bandCount:t,dataType:e}=this.rasterInfo;return 2===t&&("vector-magdir"===e||"vector-uv"===e)}_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(t){const{bandCount:e,attributeTable:r,pixelType:n}=this.rasterInfo,o=t.field1;if(!o)return{success:!1,error:"Unsupported renderer; missing UniqueValueRenderer.field."};const i=t.defaultSymbol,s=1===e&&["u8","s8"].includes(n);if(!(0,p.hu)(this.rasterInfo,o)&&!s)return{success:!1,error:"Unsupported data; UniqueValueRenderer is only supported on single band data with a valid raster attribute table."};const a=[];if(null!=r){const e=r.fields.find(t=>"value"===t.name.toLowerCase());if(!e)return{success:!1,error:"Unsupported data; the data's raster attribute table does not have a value field."};r.features.forEach(r=>{const n=t.uniqueValueInfos?.find(t=>String(t.value)===String(r.attributes[o])),s=n?.symbol?.color;s?a.push([r.attributes[e.name]].concat(s)):i&&a.push([r.attributes[e.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 available.'};t.uniqueValueInfos?.forEach(t=>{const e=t?.symbol?.color;e?a.push([parseInt(""+t.value,10)].concat(e)):i&&a.push([parseInt(""+t.value,10)].concat(i?.color))})}if(0===a.length)return{success:!1,error:"Invalid UniqueValueRenderer. Cannot find matching records in the raster attribute table."};const l=(0,u.zg)({colormap:a});return this.lookup={rendererJSON:t,colormapLut:l},this.canRenderInWebGL=(0,p.WN)(l?.indexedColormap),{success:!0}}_updateColormapRenderer(t){if(!(0,p.FA)(this.rasterInfo))return{success:!1,error:"Unsupported data; the data source does not have a colormap."};const e=t.colormapInfos.map(t=>[t.value].concat(t.color)).sort((t,e)=>t[0]-e[0]);if(!e||0===e.length)return{success:!1,error:"Unsupported renderer; ColormapRenderer must have meaningful colormapInfos."};const r=(0,u.zg)({colormap:e});return this.lookup={rendererJSON:t,colormapLut:r},this.canRenderInWebGL=(0,p.WN)(r?.indexedColormap),{success:!0}}_updateShadedReliefRenderer(t){if(!(0,p.iL)(this.rasterInfo))return{success:!1,error:`Unsupported data type "${this.rasterInfo.dataType}"; ShadedReliefRenderer only supports "elevation", or single band float/s16 data.`};if(t.colorRamp){const e=(0,f.R8)(t.colorRamp,{interpolateAlpha:!0}),r=(0,u.zg)({colormap:e}),n=(0,f.S2)(r.indexedColormap);this.lookup={rendererJSON:t,colormapLut:r,hsvMap:n}}else this.lookup={rendererJSON:t};return this.canRenderInWebGL=!0,{success:!0}}_analyzeClassBreaks(t){const{attributeTable:e,pixelType:r}=this.rasterInfo,n=e?.fields.find(t=>"value"===t.name.toLowerCase()),o=e?.fields.find(e=>e.name.toLowerCase()===t.field.toLowerCase()),i=null!=n&&null!==o;return{canUseIndexedLUT:["u8","u16","s8","s16"].includes(r)||i,tableValueField:n,tableBreakField:o}}_updateClassBreaksRenderer(t){const{attributeTable:e}=this.rasterInfo,{canUseIndexedLUT:r,tableValueField:n,tableBreakField:o}=this._analyzeClassBreaks(t),i=t.classBreakInfos;if(!i?.length)return{success:!1,error:"Unsupported renderer; missing or invalid ClassBreaksRenderer.classBreakInfos."};const s=i.sort((t,e)=>t.classMaxValue-e.classMaxValue),a=s[s.length-1];let l=t.minValue;if(!r){const e=[];for(let t=0;t<s.length;t++)e.push({value:s[t].classMinValue??l,mappedColor:s[t].symbol.color}),l=s[t].classMaxValue;return e.push({value:a.classMaxValue,mappedColor:a.symbol.color}),this.lookup={rendererJSON:t,remapLut:e},this.canRenderInWebGL=!1,{success:!0}}const c=[];if(null!=e&&null!=n&&null!==o&&n!==o){const r=n.name,i=o.name,a=s[s.length-1],{classMaxValue:u}=a;l=t.minValue;for(const t of e.features){const e=t.attributes[r],n=t.attributes[i],o=n===u?a:n<l?null:s.find(({classMaxValue:t})=>t>n);o&&c.push([e].concat(o.symbol.color))}}else{l=Math.floor(t.minValue);for(let t=0;t<s.length;t++){const e=s[t];for(let t=l;t<e.classMaxValue;t++)c.push([t].concat(e.symbol.color));l=Math.ceil(e.classMaxValue)}a.classMaxValue===l&&c.push([a.classMaxValue].concat(a.symbol.color))}const h=(0,u.zg)({colormap:c,fillUnspecified:!1});return this.lookup={rendererJSON:t,colormapLut:h},this.canRenderInWebGL=(0,p.WN)(h?.indexedColormap),{success:!0}}_updateStretchRenderer(t){let{stretchType:e,dra:r}=t;if(!("none"===e||t.statistics?.length||function(t){return null!=t&&t.length>0&&null!=t[0].min&&null!=t[0].max}(this.rasterInfo.statistics)||r))return{success:!1,error:"Unsupported renderer; StretchRenderer.customStatistics is required when dynamic range adjustment is not used."};const n=t.histograms||this.rasterInfo.histograms;!function(t){return"percentClip"===t||"histogramEqualization"===t}(t.stretchType)||n?.length||r||(e="minMax");const{computeGamma:o,useGamma:i,colorRamp:s}=t;let{gamma:a}=t;if(i&&o&&!a?.length){const e=t.statistics?.length?t.statistics:this.rasterInfo.statistics;a=(0,c.fP)(this.rasterInfo.pixelType,e)}const l=this.rasterInfo.pixelType,h=!r&&["u8","u16","s8","s16"].includes(l);if("histogramEqualization"===e){const e=n.map(t=>(0,c.WF)(t));this.lookup={rendererJSON:t,histogramLut:e}}else if(h){const e=(0,c.DP)(t,{rasterInfo:this.rasterInfo}),r=(0,c.RP)({pixelType:l,...e,gamma:i?a:null,rounding:"floor"});this.lookup={rendererJSON:t,stretchLut:r}}else this.lookup={rendererJSON:t};if(s&&!function(t){return"algorithmic"===t.type&&["0,0,0,255","0,0,0"].includes(t.fromColor.join(","))&&["255,255,255,255","255,255,255"].includes(t.toColor.join(","))}(s)){const e=(0,f.R8)(s,{interpolateAlpha:!0});this.lookup.colormapLut=(0,u.zg)({colormap:e}),this.lookup.rendererJSON=t}return this.lookup.gamma=i&&a?.length?a:null,this.canRenderInWebGL="histogramEqualization"!==e,{success:!0}}_generateColormapWebGLParams(t){const{indexedColormap:e,offset:r}=this.lookup.colormapLut||{};return{colormap:e,colormapOffset:r,isClassBreaks:t,type:"lut"}}_generateStretchWebGLParams(t,e,r){const{colormapLut:n}=this.lookup,o=e.colorRamp?n?.indexedColormap:null,i=e.colorRamp?n?.offset:null;"histogramEqualization"===e.stretchType&&(e={...e,stretchType:"minMax"});const{gamma:s}=this.lookup,a=!(!e.useGamma||!s?.some(t=>1!==t)),{minCutOff:l,maxCutOff:u,minOutput:h,maxOutput:f}=(0,c.DP)(e,{rasterInfo:this.rasterInfo,pixelBlock:t,bandIds:r});let p=0;null!=t&&(p=t.getPlaneCount(),2===p&&((t=t.clone()).statistics=[t.statistics[0]],t.pixels=[t.pixels[0]]));const{bandCount:d}=this.rasterInfo,m=Math.min(3,r?.length||p||d,d),g=o||a?1:255,y=new Float32Array(m);if(a&&s)for(let t=0;t<m;t++)s[t]>1?s[t]>2?y[t]=6.5+(s[t]-2)**2.5:y[t]=6.5+100*(2-s[t])**4:y[t]=1;1===l.length&&(l[2]=l[1]=l[0]),1===u.length&&(u[2]=u[1]=u[0]);const w=a&&s?[s[0],s[1]??s[0],s[2]??s[0]]:[1,1,1],b=a?[y[0],y[1]??y[0],y[2]??y[0]]:[1,1,1],C=u.map((t,e)=>u[e]===l[e]?0:(f-h)/(u[e]-l[e])/g);return{bandCount:m,minOutput:h/g,maxOutput:f/g,minCutOff:l,maxCutOff:u,factor:C,useGamma:a,gamma:w,gammaCorrection:b,colormap:o,colormapOffset:i,stretchType:e.stretchType,type:"stretch"}}_generateShadedReliefWebGLParams(t,e=!1,r={x:0,y:0}){const{colormapLut:n}=this.lookup,o=t.colorRamp?n?.indexedColormap:null,i=t.colorRamp?n?.offset:null,s={...t,isGCS:e,resolution:r},a=(0,h.ng)(s),l=this.rasterInfo.statistics?.[0];return{...a,minValue:l?.min??0,maxValue:l?.max??8e3,hillshadeType:"traditional"===t.hillshadeType?0:1,type:"hillshade",colormap:o,colormapOffset:i}}_generateVectorFieldWebGLParams(t){const{style:e,inputUnit:r,outputUnit:n,visualVariables:o,symbolTileSize:i,flowRepresentation:s}=t,a=this.rasterInfo.statistics?.[0].min??0,l=this.rasterInfo.statistics?.[0].max??50,u=o?.find(t=>"sizeInfo"===t.type)??{maxDataValue:l,maxSize:.8*i,minDataValue:a,minSize:.2*i},c=u.minDataValue??a,h=u.maxDataValue??l,f=null!=u.maxSize&&null!=u.minSize?[u.minSize/i,u.maxSize/i]:[.2,.8];if("wind_speed"===e){const t=(f[0]+f[1])/2;f[0]=f[1]=t}const p=null!=c&&null!=h?[c,h]:null;let d=null;if("classified_arrow"===e)if(null!=c&&null!=h&&null!=u){d=[];const t=(u.maxDataValue-u.minDataValue)/5;for(let e=0;e<6;e++)d.push(u.minDataValue+t*e)}else d=[0,1e-6,3.5,7,10.5,14];const m="flow_to"===s==("ocean_current_kn"===e||"ocean_current_m"===e)?0:Math.PI,g=o?.find(t=>"rotationInfo"===t.type);return{breakValues:d,dataRange:p,inputUnit:r,outputUnit:n,symbolTileSize:i,symbolPercentRange:f,style:e||"single_arrow",rotation:m,rotationType:this.rasterInfo.storageInfo?.tileInfo&&"vector-uv"===this.rasterInfo.dataType?"geographic":g?.rotationType||t.rotationType,type:"vectorField"}}};function m(t){return(0,u.AB)(t)&&0!==t.validPixelCount}(0,n._)([(0,s.MZ)({json:{write:!0}})],d.prototype,"rendererJSON",void 0),(0,n._)([(0,s.MZ)({type:l.A,json:{write:!0}})],d.prototype,"rasterInfo",void 0),(0,n._)([(0,s.MZ)({json:{write:!0}})],d.prototype,"lookup",void 0),(0,n._)([(0,s.MZ)()],d.prototype,"canRenderInWebGL",void 0),d=(0,n._)([(0,a.$)("esri.renderers.support.RasterSymbolizer")],d)},87186:(t,e,r)=>{r.d(e,{A:()=>x});var n,o=r(90237),i=r(25482),s=r(4718),a=r(10107),l=(r(44208),r(53966),r(40608)),u=r(5443),c=r(16930);function h(t){return t=Number(t),isNaN(t)?void 0:t}r(87811);let f=n=class extends i.A{constructor(){super(...arguments),this.name=null,this.minWavelength=void 0,this.maxWavelength=void 0,this.radianceBias=void 0,this.radianceGain=void 0,this.reflectanceBias=void 0,this.reflectanceGain=void 0,this.solarIrradiance=void 0}clone(){return new n({name:this.name,minWavelength:this.minWavelength,maxWavelength:this.maxWavelength,radianceBias:this.radianceBias,radianceGain:this.radianceGain,reflectanceBias:this.reflectanceBias,reflectanceGain:this.reflectanceGain,solarIrradiance:this.solarIrradiance})}};(0,o._)([(0,a.MZ)({json:{name:"BandName",write:!0}})],f.prototype,"name",void 0),(0,o._)([(0,a.MZ)({json:{name:"WavelengthMin",read:{reader:h},write:!0}})],f.prototype,"minWavelength",void 0),(0,o._)([(0,a.MZ)({json:{name:"WavelengthMax",read:{reader:h},write:!0}})],f.prototype,"maxWavelength",void 0),(0,o._)([(0,a.MZ)({json:{name:"RadianceBias",read:{reader:h},write:!0}})],f.prototype,"radianceBias",void 0),(0,o._)([(0,a.MZ)({json:{name:"RadianceGain",read:{reader:h},write:!0}})],f.prototype,"radianceGain",void 0),(0,o._)([(0,a.MZ)({json:{name:"ReflectanceBias",read:{reader:h},write:!0}})],f.prototype,"reflectanceBias",void 0),(0,o._)([(0,a.MZ)({json:{name:"ReflectanceGain",read:{reader:h},write:!0}})],f.prototype,"reflectanceGain",void 0),(0,o._)([(0,a.MZ)({json:{name:"SolarIrradiance",read:{reader:h},write:!0}})],f.prototype,"solarIrradiance",void 0),f=n=(0,o._)([(0,l.$)("esri.layers.support.RasterBandInfo")],f);var p,d=r(13868),m=r(36005),g=r(43937);function y(t){return t=Number(t),isNaN(t)?void 0:t}let w=p=class extends i.A{constructor(){super(...arguments),this.acquisitionDate=void 0,this.cloudCover=void 0,this.productName=void 0,this.sensorName=null,this.sensorAzimuth=void 0,this.sensorElevation=void 0,this.sunAzimuth=void 0,this.sunElevation=void 0}readAcquisitionDate(t){return new Date(t)}writeAcquisitionDate(t,e){e.AcquisitionDate=t.getTime()}clone(){return new p({acquisitionDate:this.acquisitionDate,cloudCover:this.cloudCover,productName:this.productName,sensorName:this.sensorName,sensorAzimuth:this.sensorAzimuth,sensorElevation:this.sensorElevation,sunAzimuth:this.sunAzimuth,sunElevation:this.sunElevation})}};(0,o._)([(0,a.MZ)({type:Date,json:{name:"AcquisitionDate",write:!0}})],w.prototype,"acquisitionDate",void 0),(0,o._)([(0,m.w)("acquisitionDate")],w.prototype,"readAcquisitionDate",null),(0,o._)([(0,g.K)("acquisitionDate")],w.prototype,"writeAcquisitionDate",null),(0,o._)([(0,a.MZ)({json:{name:"CloudCover",read:{reader:y},write:!0}})],w.prototype,"cloudCover",void 0),(0,o._)([(0,a.MZ)({json:{name:"ProductName",write:!0}})],w.prototype,"productName",void 0),(0,o._)([(0,a.MZ)({json:{name:"SensorName",write:!0}})],w.prototype,"sensorName",void 0),(0,o._)([(0,a.MZ)({json:{name:"SensorAzimuth",read:{reader:y},write:!0}})],w.prototype,"sensorAzimuth",void 0),(0,o._)([(0,a.MZ)({json:{name:"SensorElevation",read:{reader:y},write:!0}})],w.prototype,"sensorElevation",void 0),(0,o._)([(0,a.MZ)({json:{name:"SunAzimuth",read:{reader:y},write:!0}})],w.prototype,"sunAzimuth",void 0),(0,o._)([(0,a.MZ)({json:{name:"SunElevation",read:{reader:y},write:!0}})],w.prototype,"sunElevation",void 0),w=p=(0,o._)([(0,l.$)("esri.layers.support.RasterSensorInfo")],w);var b,C=r(20223);let x=b=class extends i.A{constructor(t){super(t),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 bandInfos(){const t=this.keyProperties.BandProperties,{bandCount:e}=this;if(!t?.length||t.length<e){const t=[];for(let r=1;r<=e;r++)t.push(new f({name:"band_"+r}));return t}const r=t.map(t=>f.fromJSON(t));for(let t=0;t<r.length;t++)r[t].name=r[t].name||"band_"+(t+1);return r}get dataType(){const t=this.keyProperties?.DataType?.toLowerCase()??"generic";return"stdtime"===t?"standard-time":t}get nativeExtent(){return this._get("nativeExtent")||this.extent}set nativeExtent(t){t&&this._set("nativeExtent",t)}get nativePixelSize(){if(null==this.transform||!this.transform.affectsPixelSize)return this.pixelSize;const t=this.nativeExtent;return{x:t.width/this.width,y:t.height/this.height}}get hasMultidimensionalTranspose(){return!!this.storageInfo?.transposeInfo}get sensorInfo(){if(this.keyProperties?.SensorName)return w.fromJSON(this.keyProperties)}clone(){return new b({attributeTable:(0,s.o8)(this.attributeTable),bandCount:this.bandCount,colormap:(0,s.o8)(this.colormap),extent:(0,s.o8)(this.extent),format:this.format,height:this.height,width:this.width,histograms:(0,s.o8)(this.histograms),keyProperties:(0,s.o8)(this.keyProperties),multidimensionalInfo:(0,s.o8)(this.multidimensionalInfo),noDataValue:this.noDataValue,pixelSize:(0,s.o8)(this.pixelSize),pixelType:this.pixelType,isPseudoSpatialReference:this.isPseudoSpatialReference,spatialReference:(0,s.o8)(this.spatialReference),statistics:(0,s.o8)(this.statistics),storageInfo:(0,s.o8)(this.storageInfo),transform:(0,s.o8)(this.transform)})}};(0,o._)([(0,a.MZ)({json:{write:!0}})],x.prototype,"attributeTable",void 0),(0,o._)([(0,a.MZ)({json:{write:!0}})],x.prototype,"bandCount",void 0),(0,o._)([(0,a.MZ)({readOnly:!0})],x.prototype,"bandInfos",null),(0,o._)([(0,a.MZ)({json:{write:!0}})],x.prototype,"colormap",void 0),(0,o._)([(0,a.MZ)({type:String,readOnly:!0})],x.prototype,"dataType",null),(0,o._)([(0,a.MZ)({type:u.A,json:{write:!0}})],x.prototype,"extent",void 0),(0,o._)([(0,a.MZ)({type:u.A,json:{write:!0}})],x.prototype,"nativeExtent",null),(0,o._)([(0,a.MZ)({json:{write:!0}})],x.prototype,"nativePixelSize",null),(0,o._)([(0,a.MZ)({json:{write:!0}})],x.prototype,"format",void 0),(0,o._)([(0,a.MZ)({json:{write:!0}})],x.prototype,"height",void 0),(0,o._)([(0,a.MZ)({json:{write:!0}})],x.prototype,"width",void 0),(0,o._)([(0,a.MZ)({json:{write:!0}})],x.prototype,"hasMultidimensionalTranspose",null),(0,o._)([(0,a.MZ)({json:{write:!0}})],x.prototype,"histograms",void 0),(0,o._)([(0,a.MZ)({json:{write:!0}})],x.prototype,"keyProperties",void 0),(0,o._)([(0,a.MZ)({json:{write:!0}})],x.prototype,"multidimensionalInfo",void 0),(0,o._)([(0,a.MZ)({json:{write:!0}})],x.prototype,"noDataValue",void 0),(0,o._)([(0,a.MZ)({json:{write:!0}})],x.prototype,"pixelSize",void 0),(0,o._)([(0,a.MZ)({type:d.e8.apiValues,json:{write:!0}})],x.prototype,"pixelType",void 0),(0,o._)([(0,a.MZ)()],x.prototype,"isPseudoSpatialReference",void 0),(0,o._)([(0,a.MZ)({readOnly:!0})],x.prototype,"sensorInfo",null),(0,o._)([(0,a.MZ)({type:c.A,json:{write:!0}})],x.prototype,"spatialReference",void 0),(0,o._)([(0,a.MZ)({json:{write:!0}})],x.prototype,"statistics",void 0),(0,o._)([(0,a.MZ)({type:C.A,json:{write:!0}})],x.prototype,"storageInfo",void 0),(0,o._)([(0,a.MZ)({json:{write:!0}})],x.prototype,"transform",void 0),x=b=(0,o._)([(0,l.$)("esri.layers.support.RasterInfo")],x)},88178:(t,e,r)=>{function n(t,e){const{attributeTable:r,bandCount:n}=t;return!((null!=r||(o=t,!["u8","s8"].includes(o.pixelType)||null==o.statistics?.[0]?.min||null==o.statistics[0]?.max||1!==o.bandCount))&&(null==r||n>1||e&&null==r.fields.find(t=>t.name.toLowerCase()===e.toLowerCase())));var o}function o(t){const{bandCount:e,dataType:r,pixelType:n}=t;return"elevation"===r||"generic"===r&&1===e&&("s16"===n||"s32"===n||"f32"===n||"f64"===n)}function i(t,e=!1){const{bandCount:r,colormap:n,pixelType:o}=t;return 1===r&&(!!n?.length||!e&&"u8"===o)}function s(t,e=!1){const{attributeTable:r,bandCount:n}=t;return 1===n&&(!e||null!=r||null!=t.histograms)}function a(t){const{dataType:e}=t;return"vector-uv"===e||"vector-magdir"===e}function l(t){const{dataType:e}=t;return"vector-uv"===e||"vector-magdir"===e}function u(t){return!!t?.length&&t.length<=16384}r.d(e,{FA:()=>i,QJ:()=>l,WN:()=>u,hu:()=>n,iL:()=>o,rd:()=>a,xX:()=>s})}}]);
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
"use strict";(self.webpackChunkRemoteClient=self.webpackChunkRemoteClient||[]).push([[8263],{431:(t,e,n)=>{n.d(e,{o6:()=>v,HY:()=>D,hx:()=>F,Jb:()=>B});var o=n(9318);function r(t,e,n){const o=e/3,r=new Uint32Array(n+1),i=new Uint32Array(n+1),s=(t,e)=>{t<e?r[t+1]++:i[e+1]++};for(let e=0;e<o;e++){const n=t[3*e],o=t[3*e+1],r=t[3*e+2];s(n,o),s(o,r),s(r,n)}let a=0,c=0;for(let t=0;t<n;t++){const e=r[t+1],n=i[t+1];r[t+1]=a,i[t+1]=c,a+=e,c+=n}const u=new Uint32Array(6*o),l=r[n],h=(t,e,n)=>{if(t<e){const o=r[t+1]++;u[2*o]=e,u[2*o+1]=n}else{const o=i[e+1]++;u[2*l+2*o]=t,u[2*l+2*o+1]=n}};for(let e=0;e<o;e++){const n=t[3*e],o=t[3*e+1],r=t[3*e+2];h(n,o,e),h(o,r,e),h(r,n,e)}const d=(t,e)=>{const n=2*t,o=e-t;for(let t=1;t<o;t++){const e=u[n+2*t],o=u[n+2*t+1];let r=t-1;for(;r>=0&&u[n+2*r]>e;r--)u[n+2*r+2]=u[n+2*r],u[n+2*r+3]=u[n+2*r+1];u[n+2*r+2]=e,u[n+2*r+3]=o}};for(let t=0;t<n;t++)d(r[t],r[t+1]),d(l+i[t],l+i[t+1]);const f=new Int32Array(3*o),T=(e,n)=>e===t[3*n]?0:e===t[3*n+1]?1:e===t[3*n+2]?2:-1,_=(t,e)=>{const n=T(t,e);f[3*e+n]=-1},O=(t,e,n,o)=>{const r=T(t,e);f[3*e+r]=o;const i=T(n,o);f[3*o+i]=e};for(let t=0;t<n;t++){let e=r[t];const n=r[t+1];let o=i[t];const s=i[t+1];for(;e<n&&o<s;){const n=u[2*e],r=u[2*l+2*o];n===r?(O(t,u[2*e+1],r,u[2*l+2*o+1]),e++,o++):n<r?(_(t,u[2*e+1]),e++):(_(r,u[2*l+2*o+1]),o++)}for(;e<n;)_(t,u[2*e+1]),e++;for(;o<s;)_(u[2*l+2*o],u[2*l+2*o+1]),o++}return f}var i=n(1843),s=n(46540),a=n(3055),c=n(87811),u=n(38954),l=n(51850),h=n(4431),d=n(34727);function f(t,e,n,o,r,i=2){const s=1/(Math.abs(n)+Math.abs(o)+Math.abs(r)),a=n*s,c=o*s,u=r<=0?(a>=0?1:-1)*(1-Math.abs(c)):a,l=r<=0?(c>=0?1:-1)*(1-Math.abs(a)):c,h=e*i;t[h]=T(u),t[h+1]=T(l)}function T(t){return(0,d.qE)(Math.round(32767*t),-32767,32767)}n(11868),n(34275);class _{updateSettings(t){this.settings=t,this._edgeHashFunction=t.reducedPrecision?N:A}write(t,e,n){M.seed=this._edgeHashFunction(n);const o=M.getIntRange(0,255),r=M.getIntRange(0,this.settings.variants-1),i=M.getFloat(),s=255*(.5*function(t){return Math.abs(t)**1.2*Math.sign(t)}(-(1-Math.min(i/.7,1))+Math.max(0,i-.7)/(1-.7))+.5);t.position0.setVec(e,n.position0),t.position1.setVec(e,n.position1),t.componentIndex.set(e,n.componentIndex),t.variantOffset.set(e,o),t.variantStroke.set(e,r),t.variantExtension.set(e,s)}}const O=new Float32Array(6),E=new Uint32Array(O.buffer),m=new Uint32Array(1);function A(t){return O[0]=t.position0[0],O[1]=t.position0[1],O[2]=t.position0[2],O[3]=t.position1[0],O[4]=t.position1[1],O[5]=t.position1[2],m[0]=31*(31*(31*(31*(31*(166811+E[0])+E[1])+E[2])+E[3])+E[4])+E[5],m[0]}function N(t){const e=O;e[0]=g(t.position0[0]),e[1]=g(t.position0[1]),e[2]=g(t.position0[2]),e[3]=g(t.position1[0]),e[4]=g(t.position1[1]),e[5]=g(t.position1[2]),m[0]=5381;for(let t=0;t<E.length;t++)m[0]=31*m[0]+E[t];return m[0]}const I=1e4;function g(t){return Math.round(t*I)/I}class p{constructor(){this._commonWriter=new _}updateSettings(t){this._commonWriter.updateSettings(t)}allocate(t){return a.gr.createBuffer(t)}write(t,e,n){this._commonWriter.write(t,e,n),(0,u.f)(S,n.faceNormal0,n.faceNormal1),(0,u.n)(S,S);const{typedBuffer:o,typedBufferStride:r}=t.normalCompressed;f(o,e,S[0],S[1],S[2],r)}static{this.Layout=a.gr}static{this.glLayout=(0,h.U)(a.gr,1)}}class R{constructor(){this._commonWriter=new _}updateSettings(t){this._commonWriter.updateSettings(t)}allocate(t){return a.In.createBuffer(t)}write(t,e,n){this._commonWriter.write(t,e,n);{const{typedBuffer:o,typedBufferStride:r}=t.normalCompressed;f(o,e,n.faceNormal0[0],n.faceNormal0[1],n.faceNormal0[2],r)}{const{typedBuffer:o,typedBufferStride:r}=t.normal2Compressed;f(o,e,n.faceNormal1[0],n.faceNormal1[1],n.faceNormal1[2],r)}}static{this.Layout=a.In}static{this.glLayout=(0,h.U)(a.In,1)}}const S=(0,l.vt)(),M=new c.A;var b=n(93406);function v(t){const e=F(t.data,t.skipDeduplicate,t.indices,t.indicesLength);return P.updateSettings(t.writerSettings),C.updateSettings(t.writerSettings),(0,b.K)(e,P,C)}function F(t,e,n,i){if(e){const e=r(n,i,t.count);return new L(n,i,e,t)}const s=(0,o.b)(t.buffer,t.stride/4,{originalIndices:n}),c=r(s.indices,i,s.uniqueCount);return{faces:s.indices,facesLength:s.indices.length,neighbors:c,vertices:a.I$.createView(s.buffer)}}class L{constructor(t,e,n,o){this.faces=t,this.facesLength=e,this.neighbors=n,this.vertices=o}}const P=new p,C=new R,B=(0,i.BP)().vec3f(s.r.POSITION0).vec3f(s.r.POSITION1),D=(0,i.BP)().vec3f(s.r.POSITION0).vec3f(s.r.POSITION1).u16(s.r.COMPONENTINDEX)},3055:(t,e,n)=>{n.d(e,{I$:()=>s,In:()=>u,gr:()=>c});var o=n(4431),r=n(1843),i=n(46540);const s=(0,r.BP)().vec3f(i.r.POSITION).u16(i.r.COMPONENTINDEX).freeze(),a=(0,r.BP)().vec2u8(i.r.SIDENESS).freeze(),c=((0,o.U)(a),(0,r.BP)().vec3f(i.r.POSITION0).vec3f(i.r.POSITION1).vec2i16(i.r.NORMALCOMPRESSED).u16(i.r.COMPONENTINDEX).u8(i.r.VARIANTOFFSET,{glNormalized:!0}).u8(i.r.VARIANTSTROKE).u8(i.r.VARIANTEXTENSION,{glNormalized:!0}).freeze()),u=(0,r.BP)().vec3f(i.r.POSITION0).vec3f(i.r.POSITION1).vec2i16(i.r.NORMALCOMPRESSED).vec2i16(i.r.NORMAL2COMPRESSED).u16(i.r.COMPONENTINDEX).u8(i.r.VARIANTOFFSET,{glNormalized:!0}).u8(i.r.VARIANTSTROKE).u8(i.r.VARIANTEXTENSION,{glNormalized:!0}).freeze();new Map([[i.r.POSITION0,0],[i.r.POSITION1,1],[i.r.COMPONENTINDEX,2],[i.r.VARIANTOFFSET,3],[i.r.VARIANTSTROKE,4],[i.r.VARIANTEXTENSION,5],[i.r.NORMALCOMPRESSED,6],[i.r.NORMAL2COMPRESSED,7],[i.r.SIDENESS,8]])},4431:(t,e,n)=>{n.d(e,{U:()=>i});var o=n(63907),r=n(74038);function i(t,e=0){const n=t.stride;return Array.from(t.fields.keys()).map(o=>{const i=t.fields.get(o),a=i.constructor.ElementCount,c=s(i.constructor.ElementType),u=i.offset,l=i.optional?.glNormalized??!1;return new r._(o,a,c,u,n,l,e)})}function s(t){const e=a[t];if(e)return e;throw new Error("BufferType not supported in WebGL")}const a={u8:o.pe.UNSIGNED_BYTE,u16:o.pe.UNSIGNED_SHORT,u32:o.pe.UNSIGNED_INT,i8:o.pe.BYTE,i16:o.pe.SHORT,i32:o.pe.INT,f16:o.pe.HALF_FLOAT,f32:o.pe.FLOAT}},9318:(t,e,n)=>{n.d(e,{b:()=>i});var o=n(34727),r=n(97146);function i(t,e,n){const i=Array.isArray(t),l=i?t.length/e:t.byteLength/(4*e),h=i?t:new Uint32Array(t,0,l*e),d=n?.minReduction??0,f=n?.originalIndices||null,T=f?f.length:0,_=n?.componentOffsets||null;let O=0;if(_)for(let t=0;t<_.length-1;t++){const e=_[t+1]-_[t];e>O&&(O=e)}else O=l;const E=Math.floor(1.1*O)+1;(null==u||u.length<2*E)&&(u=new Uint32Array((0,o.cU)(2*E)));for(let t=0;t<2*E;t++)u[t]=0;let m=0;const A=!!_&&!!f,N=A?T:l;let I=(0,r.my)(l);const g=new Uint32Array(T),p=1.96;let R=0!==d?Math.ceil(4*p*p/(d*d)*d*(1-d)):N,S=1,M=_?_[1]:N;for(let t=0;t<N;t++){if(t===R){const e=1-m/t;if(e+p*Math.sqrt(e*(1-e)/t)<d)return null;R*=2}if(t===M){for(let t=0;t<2*E;t++)u[t]=0;if(f)for(let t=_[S-1];t<_[S];t++)g[t]=I[f[t]];M=_[++S]}const n=A?f[t]:t,o=n*e,r=c(h,o,e);let i=r%E,a=m;for(;0!==u[2*i+1];){if(u[2*i]===r){const t=u[2*i+1]-1;if(s(h,o,t*e,e)){a=I[t];break}}i++,i>=E&&(i-=E)}a===m&&(u[2*i]=r,u[2*i+1]=n+1,m++),I[n]=a}if(0!==d&&1-m/l<d)return null;if(A){for(let t=_[S-1];t<g.length;t++)g[t]=I[f[t]];I=(0,r.uW)(g)}const b=i?new Array(m):new Uint32Array(m*e);m=0;for(let t=0;t<N;t++)I[t]===m&&(a(h,(A?f[t]:t)*e,b,m*e,e),m++);if(f&&!A){const t=new Uint32Array(T);for(let e=0;e<t.length;e++)t[e]=I[f[e]];I=(0,r.uW)(t)}return{buffer:Array.isArray(b)?b:b.buffer,indices:I,uniqueCount:m}}function s(t,e,n,o){for(let r=0;r<o;r++)if(t[e+r]!==t[n+r])return!1;return!0}function a(t,e,n,o,r){for(let i=0;i<r;i++)n[o+i]=t[e+i]}function c(t,e,n){let o=0;for(let r=0;r<n;r++)o=t[e+r]+o|0,o=o+(o<<11)+(o>>>2)|0;return o>>>0}let u=null},11964:(t,e,n)=>{n.d(e,{Cr:()=>l,H6:()=>f,LV:()=>u,_I:()=>d,kb:()=>h,vt:()=>c});var o=n(34727),r=n(4341),i=n(38954),s=n(51850),a=n(32114);function c(t){return t?{origin:(0,s.o8)(t.origin),vector:(0,s.o8)(t.vector)}:{origin:(0,s.vt)(),vector:(0,s.vt)()}}function u(t,e){const n=T.get();return n.origin=t,n.vector=e,n}function l(t,e,n=c()){return(0,i.c)(n.origin,t),(0,i.d)(n.vector,e,t),n}function h(t,e){const n=(0,i.d)(a.rq.get(),e,t.origin),r=(0,i.e)(t.vector,n),s=(0,i.e)(t.vector,t.vector),c=(0,o.qE)(r/s,0,1),u=(0,i.d)(a.rq.get(),(0,i.g)(a.rq.get(),t.vector,c),n);return(0,i.e)(u,u)}function d(t,e,n){return f(t,e,0,1,n)}function f(t,e,n,r,s){const{vector:c,origin:u}=t,l=(0,i.d)(a.rq.get(),e,u),h=(0,i.e)(c,l)/(0,i.k)(c);return(0,i.g)(s,c,(0,o.qE)(h,n,r)),(0,i.f)(s,s,t.origin)}(0,s.vt)(),(0,s.vt)();const T=new r.I(()=>c())},27444:(t,e,n)=>{n.r(e),n.d(e,{default:()=>J});var o,r,i=n(90237),s=n(74887),a=(n(53966),n(44208),n(87811),n(49186),n(40608)),c=n(38954),u=n(51850),l=n(11964),h=n(97937),d=n(93687),f=n(3694),T=n(82919),_=n(71351),O=n(620);class E{get bounds(){return this._root.bounds}get halfSize(){return this._root.halfSize}get root(){return this._root.node}get maximumObjectsPerNode(){return this._maximumObjectsPerNode}get maximumDepth(){return this._maximumDepth}get objectCount(){return this._objectCount}constructor(t,e){this.objectToBoundingSphere=t,this._maximumObjectsPerNode=10,this._maximumDepth=20,this._degenerateObjects=new Set,this._root=new m,this._objectCount=0,e&&(void 0!==e.maximumObjectsPerNode&&(this._maximumObjectsPerNode=e.maximumObjectsPerNode),void 0!==e.maximumDepth&&(this._maximumDepth=e.maximumDepth))}destroy(){this._degenerateObjects.clear(),m.clearPool(),D[0]=null,j.prune(),k.prune()}add(t){const e=Array.from(t);this._grow(e);const n=m.acquire();for(const t of e)++this._objectCount,this._isDegenerate(t)?this._degenerateObjects.add(t):(n.init(this._root),this._add(t,n));m.release(n)}remove(t,e=null){this._objectCount-=t.length;const n=m.acquire();for(const o of t){const t=e??(0,h.h)(this.objectToBoundingSphere(o),H);L(t[3])?(n.init(this._root),I(o,t,n)):this._degenerateObjects.delete(o)}m.release(n),this._shrink()}update(t,e){if(!L(e[3])&&this._isDegenerate(t))return;const n=function(t){return D[0]=t,D}(t);this.remove(n,e),this.add(n)}forEachAlongRay(t,e,n){const o=(0,_.LV)(t,e);A(this._root,t=>{if(!function(t,e){return M((0,h.a)(e.bounds),2*-e.halfSize,y),M((0,h.a)(e.bounds),2*e.halfSize,U),(0,O.O_)(t.origin,t.direction,y,U)}(o,t))return!1;const e=t.node;return e.terminals.forAll(t=>{this._intersectsObject(o,t)&&n(t)}),null!==e.residents&&e.residents.forAll(t=>{this._intersectsObject(o,t)&&n(t)}),!0})}forEachAlongRayWithVerticalOffset(t,e,n,o){const r=(0,_.LV)(t,e);A(this._root,t=>{if(!function(t,e,n){return M((0,h.a)(e.bounds),2*-e.halfSize,y),M((0,h.a)(e.bounds),2*e.halfSize,U),n.applyToMinMax(y,U),(0,O.O_)(t.origin,t.direction,y,U)}(r,t,o))return!1;const e=t.node;return e.terminals.forAll(t=>{this._intersectsObjectWithOffset(r,t,o)&&n(t)}),null!==e.residents&&e.residents.forAll(t=>{this._intersectsObjectWithOffset(r,t,o)&&n(t)}),!0})}forEach(t){A(this._root,e=>{const n=e.node;return n.terminals.forAll(t),null!==n.residents&&n.residents.forAll(t),!0}),this._degenerateObjects.forEach(t)}forEachDegenerateObject(t){this._degenerateObjects.forEach(t)}findClosest(t,e,n,o=()=>!0,r=1/0){let i=1/0,s=1/0,a=null;const u=v(t,e),l=c=>{if(--r,!o(c))return;const u=this.objectToBoundingSphere(c);if(!(0,T.m7)(n,u))return;const l=F(t,e,(0,h.a)(u)),d=l-u[3],f=l+u[3];d<i&&(i=d,s=f,a=c)};return N(this._root,o=>{if(r<=0||!(0,T.m7)(n,o.bounds))return!1;if((0,c.g)(x,u,o.halfSize),(0,c.f)(x,x,(0,h.a)(o.bounds)),F(t,e,x)>s)return!1;const i=o.node;return i.terminals.forAll(t=>l(t)),null!==i.residents&&i.residents.forAll(t=>l(t)),!0},t,e),a}forEachInDepthRange(t,e,n,o,r,i,s){let a=-1/0,u=1/0;const l={setRange:t=>{n===E.DepthOrder.FRONT_TO_BACK?(a=Math.max(a,t.near),u=Math.min(u,t.far)):(a=Math.max(a,-t.far),u=Math.min(u,-t.near))}};l.setRange(o);const d=F(e,n,t),f=v(e,n),_=v(e,-n),O=t=>{if(!s(t))return;const o=this.objectToBoundingSphere(t),c=(0,h.a)(o),f=F(e,n,c)-d,_=f-o[3],O=f+o[3];_>u||O<a||!(0,T.m7)(i,o)||r(t,l)};N(this._root,t=>{if(!(0,T.m7)(i,t.bounds))return!1;if((0,c.g)(x,f,t.halfSize),(0,c.f)(x,x,(0,h.a)(t.bounds)),F(e,n,x)-d>u)return!1;if((0,c.g)(x,_,t.halfSize),(0,c.f)(x,x,(0,h.a)(t.bounds)),F(e,n,x)-d<a)return!1;const o=t.node;return o.terminals.forAll(t=>O(t)),null!==o.residents&&o.residents.forAll(t=>O(t)),!0},e,n)}forEachNode(t){A(this._root,e=>t(e.node,e.bounds,e.halfSize,e.depth))}forEachNeighbor(t,e){const n=(0,h.g)(e),o=(0,h.a)(e),r=e=>{const r=this.objectToBoundingSphere(e),i=(0,h.g)(r),s=n+i;return!((0,c.s)((0,h.a)(r),o)-s*s<=0)||t(e)};let i=!0;const s=t=>{i&&(i=r(t))};A(this._root,t=>{const e=(0,h.g)(t.bounds),r=n+e;if((0,c.s)((0,h.a)(t.bounds),o)-r*r>0)return!1;const a=t.node;return a.terminals.forAll(s),i&&null!==a.residents&&a.residents.forAll(s),i}),i&&this.forEachDegenerateObject(s)}_intersectsObject(t,e){const n=this.objectToBoundingSphere(e);return!(n[3]>0)||(0,h.k)(n,t)}_intersectsObjectWithOffset(t,e,n){const o=this.objectToBoundingSphere(e);return!(o[3]>0)||(0,h.k)(n.applyToBoundingSphere(o),t)}_add(t,e){e.advanceTo(this.objectToBoundingSphere(t))?e.node.terminals.push(t):(e.node.residents.push(t),e.node.residents.length>this._maximumObjectsPerNode&&e.depth<this._maximumDepth&&this._split(e))}_split(t){const e=t.node.residents;t.node.residents=null;for(let n=0;n<e.length;n++){const o=m.acquire().init(t);this._add(e.at(n),o),m.release(o)}}_grow(t){if(b(t,t=>this.objectToBoundingSphere(t),G),L(G[3])&&!this._fitsInsideTree(G))if(p(this._root.node))(0,h.h)(G,this._root.bounds),this._root.halfSize=1.25*this._root.bounds[3],this._root.updateBoundsRadiusFromHalfSize();else{const t=this._rootBoundsForRootAsSubNode(G);this._placingRootViolatesMaxDepth(t)?this._rebuildTree(G,t):this._growRootAsSubNode(t),m.release(t)}}_rebuildTree(t,e){(0,c.c)((0,h.a)(V),(0,h.a)(e.bounds)),V[3]=e.halfSize,b([t,V],t=>t,z);const n=m.acquire().init(this._root);this._root.initFrom(null,z,z[3]),this._root.increaseHalfSize(1.25),A(n,t=>(this.add(t.node.terminals.data),null!==t.node.residents&&this.add(t.node.residents.data),!0)),m.release(n)}_placingRootViolatesMaxDepth(t){const e=Math.log(t.halfSize/this._root.halfSize)*Math.LOG2E;let n=0;return A(this._root,t=>(n=Math.max(n,t.depth),n+e<=this._maximumDepth)),n+e>this._maximumDepth}_rootBoundsForRootAsSubNode(t){const e=t[3],n=t;let o=-1/0;const r=this._root.bounds,i=this._root.halfSize;for(let t=0;t<3;t++){const s=r[t]-i-(n[t]-e),a=n[t]+e-(r[t]+i),c=Math.max(0,Math.ceil(s/(2*i))),u=Math.max(0,Math.ceil(a/(2*i)))+1,l=2**Math.ceil(Math.log(c+u)*Math.LOG2E);o=Math.max(o,l),q[t].min=c,q[t].max=u}for(let t=0;t<3;t++){let e=q[t].min,n=q[t].max;const s=(o-(e+n))/2;e+=Math.ceil(s),n+=Math.floor(s);const a=r[t]-i-e*i*2;w[t]=a+(n+e)*i}const s=o*i;return w[3]=s*B,m.acquire().initFrom(null,w,s,0)}_growRootAsSubNode(t){const e=this._root.node;(0,c.c)((0,h.a)(G),(0,h.a)(this._root.bounds)),G[3]=this._root.halfSize,this._root.init(t),t.advanceTo(G,null,!0),t.node.children=e.children,t.node.residents=e.residents,t.node.terminals=e.terminals}_shrink(){for(;;){const t=this._findShrinkIndex();if(-1===t)break;this._root.advance(t),this._root.depth=0}}_findShrinkIndex(){if(0!==this._root.node.terminals.length||this._root.isLeaf())return-1;let t=null;const e=this._root.node.children;let n=0,o=0;for(;o<e.length&&null==t;)n=o++,t=e[n];for(;o<e.length;)if(e[o++])return-1;return n}_isDegenerate(t){return!L(this.objectToBoundingSphere(t)[3])}_fitsInsideTree(t){const e=this._root.bounds,n=this._root.halfSize;return t[3]<=n&&t[0]>=e[0]-n&&t[0]<=e[0]+n&&t[1]>=e[1]-n&&t[1]<=e[1]+n&&t[2]>=e[2]-n&&t[2]<=e[2]+n}toJSON(){const{maximumDepth:t,maximumObjectsPerNode:e,_objectCount:n}=this,o=this._nodeToJSON(this._root.node);return{maximumDepth:t,maximumObjectsPerNode:e,objectCount:n,root:{bounds:this._root.bounds,halfSize:this._root.halfSize,depth:this._root.depth,node:o}}}_nodeToJSON(t){const e=t.children.map(t=>t?this._nodeToJSON(t):null),n=t.residents?.map(t=>this.objectToBoundingSphere(t)),o=t.terminals?.map(t=>this.objectToBoundingSphere(t));return{children:e,residents:n,terminals:o}}static fromJSON(t){const e=new E(t=>t,{maximumDepth:t.maximumDepth,maximumObjectsPerNode:t.maximumObjectsPerNode});return e._objectCount=t.objectCount,e._root.initFrom(t.root.node,t.root.bounds,t.root.halfSize,t.root.depth),e}}class m{constructor(){this.bounds=(0,h.c)(),this.halfSize=0,this.initFrom(null,null,0,0)}init(t){return this.initFrom(t.node,t.bounds,t.halfSize,t.depth)}initFrom(t,e,n,o=this.depth){return this.node=null!=t?t:m.createEmptyNode(),e&&(0,h.h)(e,this.bounds),this.halfSize=n,this.depth=o,this}increaseHalfSize(t){this.halfSize*=t,this.updateBoundsRadiusFromHalfSize()}updateBoundsRadiusFromHalfSize(){this.bounds[3]=this.halfSize*B}advance(t){let e=this.node.children[t];e||(e=m.createEmptyNode(),this.node.children[t]=e),this.node=e,this.halfSize/=2,this.depth++;const n=P[t];return this.bounds[0]+=n[0]*this.halfSize,this.bounds[1]+=n[1]*this.halfSize,this.bounds[2]+=n[2]*this.halfSize,this.updateBoundsRadiusFromHalfSize(),this}advanceTo(t,e,n=!1){for(;;){if(this.isTerminalFor(t))return e&&e(this,-1),!0;if(this.isLeaf()){if(!n)return e&&e(this,-1),!1;this.node.residents=null}const o=this._childIndex(t);e&&e(this,o),this.advance(o)}}isLeaf(){return null!=this.node.residents}isTerminalFor(t){return t[3]>this.halfSize/2}_childIndex(t){const e=this.bounds;return(e[0]<t[0]?1:0)+(e[1]<t[1]?2:0)+(e[2]<t[2]?4:0)}static createEmptyNode(){return{children:[null,null,null,null,null,null,null,null],terminals:new f.A({shrink:!0}),residents:new f.A({shrink:!0})}}static{this._pool=new d.A(m)}static acquire(){return m._pool.acquire()}static release(t){m._pool.release(t)}static clearPool(){m._pool.prune()}}function A(t,e){let n=m.acquire().init(t);const o=[n];for(;0!==o.length;){if(n=o.pop(),e(n)&&!n.isLeaf())for(let t=0;t<n.node.children.length;t++)n.node.children[t]&&o.push(m.acquire().init(n).advance(t));m.release(n)}}function N(t,e,n,o=E.DepthOrder.FRONT_TO_BACK){let r=m.acquire().init(t);const i=[r];for(function(t,e,n){if(!k.length)for(let t=0;t<8;++t)k.push({index:0,distance:0});for(let n=0;n<8;++n){const o=P[n];k.data[n].index=n,k.data[n].distance=F(t,e,o)}k.sort((t,e)=>t.distance-e.distance);for(let t=0;t<8;++t)n[t]=k.data[t].index}(n,o,X);0!==i.length;){if(r=i.pop(),e(r)&&!r.isLeaf())for(let t=7;t>=0;--t){const e=X[t];r.node.children[e]&&i.push(m.acquire().init(r).advance(e))}m.release(r)}}function I(t,e,n){j.clear();const o=n.advanceTo(e,(t,e)=>{j.push(t.node),j.push(e)})?n.node.terminals:n.node.residents;if(o.removeUnordered(t),0===o.length)for(let t=j.length-2;t>=0&&g(j.data[t],j.data[t+1]);t-=2);}function g(t,e){return e>=0&&(t.children[e]=null),!!p(t)&&(null===t.residents&&(t.residents=new f.A({shrink:!0})),!0)}function p(t){if(0!==t.terminals.length)return!1;if(null!==t.residents)return 0===t.residents.length;for(let e=0;e<t.children.length;e++)if(t.children[e])return!1;return!0}function R(t,e){t[0]=Math.min(t[0],e[0]-e[3]),t[1]=Math.min(t[1],e[1]-e[3]),t[2]=Math.min(t[2],e[2]-e[3])}function S(t,e){t[0]=Math.max(t[0],e[0]+e[3]),t[1]=Math.max(t[1],e[1]+e[3]),t[2]=Math.max(t[2],e[2]+e[3])}function M(t,e,n){n[0]=t[0]+e,n[1]=t[1]+e,n[2]=t[2]+e}function b(t,e,n){y[0]=1/0,y[1]=1/0,y[2]=1/0,U[0]=-1/0,U[1]=-1/0,U[2]=-1/0;for(const n of t){const t=e(n);L(t[3])&&(R(y,t),S(U,t))}(0,c.m)((0,h.a)(n),y,U,.5),n[3]=Math.max(U[0]-y[0],U[1]-y[1],U[2]-y[2])/2}function v(t,e){let n,o=1/0;for(let r=0;r<8;++r){const i=F(t,e,C[r]);i<o&&(o=i,n=C[r])}return n}function F(t,e,n){return e*(t[0]*n[0]+t[1]*n[1]+t[2]*n[2])}function L(t){return!isNaN(t)&&t!==-1/0&&t!==1/0&&t>0}o=E||(E={}),(r=o.DepthOrder||(o.DepthOrder={}))[r.FRONT_TO_BACK=1]="FRONT_TO_BACK",r[r.BACK_TO_FRONT=-1]="BACK_TO_FRONT";const P=[(0,u.fA)(-1,-1,-1),(0,u.fA)(1,-1,-1),(0,u.fA)(-1,1,-1),(0,u.fA)(1,1,-1),(0,u.fA)(-1,-1,1),(0,u.fA)(1,-1,1),(0,u.fA)(-1,1,1),(0,u.fA)(1,1,1)],C=[(0,u.fA)(-1,-1,-1),(0,u.fA)(-1,-1,1),(0,u.fA)(-1,1,-1),(0,u.fA)(-1,1,1),(0,u.fA)(1,-1,-1),(0,u.fA)(1,-1,1),(0,u.fA)(1,1,-1),(0,u.fA)(1,1,1)],B=Math.sqrt(3),D=[null],w=(0,h.c)(),x=(0,u.vt)(),y=(0,u.vt)(),U=(0,u.vt)(),j=new f.A,H=(0,h.c)(),G=(0,h.c)(),V=(0,h.c)(),z=(0,h.c)(),q=[{min:0,max:0},{min:0,max:0},{min:0,max:0}],k=new f.A,X=[0,0,0,0,0,0,0,0];var K=n(431);function W(t,e,n){const o=(0,h.c)(),r=(0,h.a)(o);return(0,c.b)(r,r,t,.5),(0,c.b)(r,r,e,.5),o[3]=(0,c.j)(r,t),(0,c.f)(r,r,n),o}let Y=class{constructor(){this._idToComponent=new Map,this._components=new E(t=>t.bounds),this._edges=new E(t=>t.bounds),this._tmpLineSegment=(0,l.vt)(),this._tmpP1=(0,u.vt)(),this._tmpP2=(0,u.vt)(),this._tmpP3=(0,u.vt)(),this.remoteClient=null}async fetchCandidates(t,e){await Promise.resolve(),(0,s.Te)(e),await this._ensureEdgeLocations(t,e);const n=[];return this._edges.forEachNeighbor(e=>(this._addCandidates(t,e,n),n.length<1e3),t.bounds),{result:{candidates:n}}}async _ensureEdgeLocations(t,e){const n=[];if(this._components.forEachNeighbor(t=>{if(null==t.info){const{id:e,uid:o}=t;n.push({id:e,uid:o})}return!0},t.bounds),!n.length)return;const o={components:n},r=await this.remoteClient.invoke("fetchAllEdgeLocations",o,e??{});for(const t of r.components)this._setFetchEdgeLocations(t)}async add(t){const e=new Z(t.id,t.bounds);return this._idToComponent.set(e.id,e),this._components.add([e]),{result:{}}}async remove(t){const e=this._idToComponent.get(t.id);if(e){const t=[];this._edges.forEachNeighbor(n=>(n.component===e&&t.push(n),!0),e.bounds),this._edges.remove(t),this._components.remove([e]),this._idToComponent.delete(e.id)}return{result:{}}}_setFetchEdgeLocations(t){const e=this._idToComponent.get(t.id);if(null==e||t.uid!==e.uid)return;const n=K.HY.createView(t.locations),o=new Array(n.count),r=(0,u.vt)(),i=(0,u.vt)();for(let s=0;s<n.count;s++){n.position0.getVec(s,r),n.position1.getVec(s,i);const a=W(r,i,t.origin),c=new Q(e,s,a);o[s]=c}this._edges.add(o);const{objectIds:s,origin:a}=t;e.info={locations:n,objectIds:s,origin:a}}_addCandidates(t,e,n){const{info:o}=e.component,{origin:r,objectIds:i}=o,s=o.locations,a=s.position0.getVec(e.index,this._tmpP1),u=s.position1.getVec(e.index,this._tmpP2);(0,c.f)(a,a,r),(0,c.f)(u,u,r);const l=i[s.componentIndex.get(e.index)];this._addEdgeCandidate(t,l,a,u,n),$(t,l,a,n),$(t,l,u,n)}_addEdgeCandidate(t,e,n,o,r){if(!t.returnEdge)return;const i=(0,h.a)(t.bounds),s=(0,l.Cr)(n,o,this._tmpLineSegment),a=(0,l._I)(s,i,this._tmpP3);(0,h.o)(t.bounds,a)&&r.push({type:"edge",objectId:e,target:(0,u.o8)(a),distance:(0,c.j)(i,a),start:(0,u.o8)(n),end:(0,u.o8)(o)})}};Y=(0,i._)([(0,a.$)("esri.views.interactive.snapping.featureSources.sceneLayerSource.SceneLayerSnappingSourceWorker")],Y);const J=Y;function $(t,e,n,o){if(!t.returnVertex||!(0,h.o)(t.bounds,n))return;const r=(0,h.a)(t.bounds);o.push({type:"vertex",objectId:e,target:(0,u.o8)(n),distance:(0,c.j)(r,n)})}class Z{constructor(t,e){this.id=t,this.bounds=e,this.info=null,this.uid=++Z.uid}static{this.uid=0}}class Q{constructor(t,e,n){this.component=t,this.index=e,this.bounds=n}}},27921:(t,e,n)=>{n.d(e,{$Q:()=>b,C:()=>u,Cr:()=>f,LV:()=>c,Nj:()=>L,O_:()=>d,Qj:()=>l,T7:()=>R,Tj:()=>M,Ui:()=>p,_I:()=>v,fA:()=>h,gv:()=>S,lU:()=>T,mN:()=>F,mP:()=>I,mR:()=>g,v1:()=>w,vE:()=>B,vt:()=>a});var o=n(34727),r=n(38954),i=n(51850),s=(n(87317),n(44280),n(32114));function a(t=D){return[t[0],t[1],t[2],t[3]]}function c(t=D[0],e=D[1],n=D[2],o=D[3]){return h(t,e,n,o,s.Km.get())}function u(t,e){return h(e[0],e[1],e[2],e[3],t)}function l(t){return t}function h(t,e,n,o,r=a()){return r[0]=t,r[1]=e,r[2]=n,r[3]=o,r}function d(t,e,n){const o=e[0]*e[0]+e[1]*e[1]+e[2]*e[2],r=Math.abs(o-1)>1e-5&&o>1e-12?1/Math.sqrt(o):1;return n[0]=e[0]*r,n[1]=e[1]*r,n[2]=e[2]*r,n[3]=-(n[0]*t[0]+n[1]*t[1]+n[2]*t[2]),n}function f(t,e,n,o=a()){const r=n[0]-e[0],i=n[1]-e[1],s=n[2]-e[2],c=t[0]-e[0],u=t[1]-e[1],l=t[2]-e[2],h=i*l-s*u,d=s*c-r*l,f=r*u-i*c,T=h*h+d*d+f*f,_=Math.abs(T-1)>1e-5&&T>1e-12?1/Math.sqrt(T):1;return o[0]=h*_,o[1]=d*_,o[2]=f*_,o[3]=-(o[0]*t[0]+o[1]*t[1]+o[2]*t[2]),o}function T(t,e,n,o=0,i=Math.floor(n*(1/3)),s=Math.floor(n*(2/3))){if(n<3)return!1;e(O,o);let a=i,c=!1;for(;a<n-1&&!c;)e(E,a),a++,c=!(0,r.q)(O,E);if(!c)return!1;for(a=Math.max(a,s),c=!1;a<n&&!c;)e(m,a),a++,(0,r.d)(A,O,E),(0,r.n)(A,A),(0,r.d)(N,E,m),(0,r.n)(N,N),c=!(0,r.q)(O,m)&&!(0,r.q)(E,m)&&Math.abs((0,r.e)(A,N))<_;return c?(f(O,E,m,t),!0):(0!==o||1!==i||2!==s)&&T(t,e,n,0,1,2)}n(32728);const _=.99619469809,O=(0,i.vt)(),E=(0,i.vt)(),m=(0,i.vt)(),A=(0,i.vt)(),N=(0,i.vt)();function I(t,e,n){return e!==t&&u(t,e),t[3]=-(0,r.e)(t,n),t}function g(t,e,n,o){return(0,r.h)(m,e,t),d(n,m,o)}function p(t,e,n){return null!=e&&C(B(t,e.origin,e.direction,x,n))}function R(t,e,n){return C(B(t,e.origin,e.vector,w.NONE,n))}function S(t,e,n){return C(B(t,e.origin,e.vector,w.CLAMP,n))}function M(t,e){return F(t,e)>=0}function b(t,e){const n=(0,r.e)(t,e.ray.direction),o=-F(t,e.ray.origin);if(o<0&&n>=0)return!1;if(n>-1e-6&&n<1e-6)return o>0;if((o<0||n<0)&&!(o<0&&n<0))return!0;const i=o/n;return n>0?i<e.c1&&(e.c1=i):i>e.c0&&(e.c0=i),e.c0<=e.c1}function v(t,e,n){const o=(0,r.g)(s.rq.get(),t,-t[3]),i=function(t,e,n){const o=(0,r.g)(s.rq.get(),t,(0,r.e)(t,e));return(0,r.d)(n,e,o),n}(t,(0,r.d)(s.rq.get(),e,o),s.rq.get());return(0,r.f)(n,i,o),n}function F(t,e){return(0,r.e)(t,e)+t[3]}var L,P;function C(t){return t===L.INTERSECTS_INSIDE_OUT||t===L.INTERSECTS_OUTSIDE_IN}function B(t,e,n,i,s){const a=(0,r.e)(t,n),c=F(t,e);if(0===a)return c>=0?L.INSIDE:L.OUTSIDE;let u=-c/a;return i&w.CLAMP&&(u=(0,o.qE)(u,0,1)),!(i&w.INFINITE_MIN)&&u<0||!(i&w.INFINITE_MAX)&&u>1?c>=0?L.INSIDE:L.OUTSIDE:((0,r.f)(s,e,(0,r.g)(s,n,u)),c>=0?L.INTERSECTS_INSIDE_OUT:L.INTERSECTS_OUTSIDE_IN)}(P=L||(L={}))[P.INTERSECTS_INSIDE_OUT=0]="INTERSECTS_INSIDE_OUT",P[P.INTERSECTS_OUTSIDE_IN=1]="INTERSECTS_OUTSIDE_IN",P[P.INSIDE=2]="INSIDE",P[P.OUTSIDE=3]="OUTSIDE";const D=[0,0,1,0];var w;!function(t){t[t.NONE=0]="NONE",t[t.CLAMP=1]="CLAMP",t[t.INFINITE_MIN=4]="INFINITE_MIN",t[t.INFINITE_MAX=8]="INFINITE_MAX"}(w||(w={})),w.INFINITE_MIN,w.INFINITE_MAX;const x=w.INFINITE_MAX},32728:(t,e,n)=>{n.d(e,{nu:()=>i}),n(34727);var o=n(38954),r=n(51850);function i(t,e,n,i=(0,r.vt)()){const c=(0,o.l)(t),u=(0,o.l)(e),l=(0,o.e)(t,e)/(c*u);if(l<.9999999999999999){const r=Math.acos(l),h=((1-n)*c+n*u)/Math.sin(r),d=h/c*Math.sin((1-n)*r),f=h/u*Math.sin(n*r);return(0,o.g)(s,t,d),(0,o.g)(a,e,f),(0,o.f)(i,s,a)}return(0,o.m)(i,t,e,n)}(0,r.vt)(),(0,r.vt)(),(0,r.vt)();const s=(0,r.vt)(),a=(0,r.vt)()},34727:(t,e,n)=>{n.d(e,{$8:()=>g,Cc:()=>s,Hx:()=>_,Io:()=>I,KJ:()=>u,Sp:()=>d,XM:()=>l,YN:()=>h,ZH:()=>T,cU:()=>r,gg:()=>f,hs:()=>a,kU:()=>c,or:()=>R,pF:()=>M,pq:()=>S,qE:()=>i});const o=new Float32Array(1);function r(t){--t;for(let e=1;e<32;e<<=1)t|=t>>e;return t+1}function i(t,e,n){return Math.min(Math.max(t,e),n)}function s(t,e,n){return t+(e-t)*n}function a(t,e,n,o,r){return s(o,r,(t-e)/(n-e))}function c(t){return t*Math.PI/180}function u(t){return 180*t/Math.PI}function l(t){return Math.acos(i(t,-1,1))}function h(t){return Math.asin(i(t,-1,1))}function d(t,e,n=1e-6){return t===e||!(!Number.isFinite(t)||!Number.isFinite(e))&&(t>e?t-e:e-t)<=n}function f(t,e,n=1e-6){return!d(t,e,n)&&t>e}function T(t,e,n=1e-6){return!d(t,e,n)&&t<e}function _(t,e,n=1e-6){return d(t,e,n)||t>e}const O=new DataView(new ArrayBuffer(Float64Array.BYTES_PER_ELEMENT));function E(t){return O.setFloat64(0,t),O.getBigInt64(0)}const m=BigInt("1000000"),A=N(1);function N(t){const e=E(t=Math.abs(t)),n=function(t){return O.setBigInt64(0,t),O.getFloat64(0)}(e<=m?m:e-m);return Math.abs(t-n)}function I(t,e,n=A){if(t===e)return!0;if(!Number.isFinite(t)||!Number.isFinite(e))return!1;if(null!=n&&N(Math.min(Math.abs(t),Math.abs(e)))<n)return Math.abs(t-e)<=n;const o=E(t),r=E(e);return o<0==r<0&&!((o<r?r-o:o-r)>m)}function g(t){return p(Math.max(-S,Math.min(t,S)))}function p(t){return o[0]=t,o[0]}function R(t){const e=t[0]*t[0]+t[1]*t[1]+t[2]*t[2],n=t[3]*t[3]+t[4]*t[4]+t[5]*t[5],o=t[6]*t[6]+t[7]*t[7]+t[8]*t[8];return!(d(e,1)&&d(n,1)&&d(o,1))}const S=p(34028234663852886e22);function M(t,e,n){if(void 0===n||0===+n)return Math[t](e);if(e=+e,n=+n,isNaN(e)||"number"!=typeof n||n%1!=0)return NaN;let o=e.toString().split("e");return o=(e=Math[t](+(o[0]+"e"+(o[1]?+o[1]-n:-n)))).toString().split("e"),+(o[0]+"e"+(o[1]?+o[1]+n:n))}},46540:(t,e,n)=>{var o;n.d(e,{r:()=>o}),function(t){t.POSITION="position",t.NORMAL="normal",t.NORMALCOMPRESSED="normalCompressed",t.UV0="uv0",t.UVI="uvi",t.COLOR="color",t.SYMBOLCOLOR="symbolColor",t.SIZE="size",t.ROTATION="rotation",t.TANGENT="tangent",t.OFFSET="offset",t.PERSPECTIVEDIVIDE="perspectiveDivide",t.CENTEROFFSETANDDISTANCE="centerOffsetAndDistance",t.LENGTH="length",t.NEXTDELTA="nextDelta",t.PREVIOUSDELTA="previousDelta",t.U0="u0",t.LINEPARAMETERS="lineParameters",t.COLORFEATUREATTRIBUTE="colorFeatureAttribute",t.SIZEFEATUREATTRIBUTE="sizeFeatureAttribute",t.OPACITYFEATUREATTRIBUTE="opacityFeatureAttribute",t.DISTANCETOSTART="distanceToStart",t.TIMESTAMPS="timeStamps",t.UVMAPSPACE="uvMapSpace",t.BOUNDINGRECT="boundingRect",t.UVREGION="uvRegion",t.PROFILERIGHT="profileRight",t.PROFILEUP="profileUp",t.PROFILEVERTEXANDNORMAL="profileVertexAndNormal",t.PROFILEAUXDATA="profileAuxData",t.INSTANCEMODELORIGINHI="instanceModelOriginHi",t.INSTANCEMODELORIGINLO="instanceModelOriginLo",t.INSTANCEMODEL="instanceModel",t.INSTANCEMODELNORMAL="instanceModelNormal",t.INSTANCECOLOR="instanceColor",t.INSTANCEFEATUREATTRIBUTE="instanceFeatureAttribute",t.LOCALTRANSFORM="localTransform",t.GLOBALTRANSFORM="globalTransform",t.BOUNDINGSPHERE="boundingSphere",t.MODELORIGIN="modelOrigin",t.MODELSCALEFACTORS="modelScaleFactors",t.FEATUREATTRIBUTE="featureAttribute",t.STATE="state",t.LODLEVEL="lodLevel",t.POSITION0="position0",t.POSITION1="position1",t.NORMAL2COMPRESSED="normal2Compressed",t.COMPONENTINDEX="componentIndex",t.VARIANTOFFSET="variantOffset",t.VARIANTSTROKE="variantStroke",t.VARIANTEXTENSION="variantExtension",t.SIDENESS="sideness",t.START="start",t.END="end",t.UP="up",t.START_UP="startUp",t.END_UP="endUp",t.EXTRUDE="extrude",t.OLIDCOLOR="objectAndLayerIdColor",t.INSTANCEOBJECTANDLAYERIDCOLOR="instanceObjectAndLayerIdColor"}(o||(o={}))},74038:(t,e,n)=>{n.d(e,{_:()=>o});class o{constructor(t,e,n,o,r,i=!1,s=0){this.name=t,this.count=e,this.type=n,this.offset=o,this.stride=r,this.normalized=i,this.divisor=s}}},82919:(t,e,n)=>{n.d(e,{FB:()=>h,J7:()=>d,DV:()=>N,C:()=>m,vt:()=>O,Qy:()=>E,ui:()=>A,ST:()=>p,bU:()=>R,pw:()=>g,m7:()=>I,c8:()=>M});var o=n(4341),r=n(58083),i=n(38954),s=n(51850),a=n(87317),c=n(91829),u=n(71351);function l(t){return t?{ray:(0,u.vt)(t.ray),c0:t.c0,c1:t.c1}:{ray:(0,u.vt)(),c0:0,c1:Number.MAX_VALUE}}new o.I(()=>l());var h,d,f,T=n(27921),_=n(32114);function O(t){return t?[(0,T.vt)(t[0]),(0,T.vt)(t[1]),(0,T.vt)(t[2]),(0,T.vt)(t[3]),(0,T.vt)(t[4]),(0,T.vt)(t[5])]:[(0,T.vt)(),(0,T.vt)(),(0,T.vt)(),(0,T.vt)(),(0,T.vt)(),(0,T.vt)()]}function E(){return[(0,s.vt)(),(0,s.vt)(),(0,s.vt)(),(0,s.vt)(),(0,s.vt)(),(0,s.vt)(),(0,s.vt)(),(0,s.vt)()]}function m(t,e){for(let n=0;n<b;n++)(0,T.C)(t[n],e[n]);return t}function A(t,e,n,o=P){const s=(0,r.lw)(_.Rc.get(),e,t);(0,r.B8)(s,s);for(let t=0;t<v;++t){const e=(0,a.t)(_.Km.get(),F[t],s);(0,i.i)(o[t],e[0]/e[3],e[1]/e[3],e[2]/e[3])}N(n,o)}function N(t,e){(0,T.Cr)(e[d.FAR_BOTTOM_LEFT],e[d.NEAR_BOTTOM_LEFT],e[d.NEAR_TOP_LEFT],t[h.LEFT]),(0,T.Cr)(e[d.NEAR_BOTTOM_RIGHT],e[d.FAR_BOTTOM_RIGHT],e[d.FAR_TOP_RIGHT],t[h.RIGHT]),(0,T.Cr)(e[d.FAR_BOTTOM_LEFT],e[d.FAR_BOTTOM_RIGHT],e[d.NEAR_BOTTOM_RIGHT],t[h.BOTTOM]),(0,T.Cr)(e[d.NEAR_TOP_LEFT],e[d.NEAR_TOP_RIGHT],e[d.FAR_TOP_RIGHT],t[h.TOP]),(0,T.Cr)(e[d.NEAR_BOTTOM_LEFT],e[d.NEAR_BOTTOM_RIGHT],e[d.NEAR_TOP_RIGHT],t[h.NEAR]),(0,T.Cr)(e[d.FAR_BOTTOM_RIGHT],e[d.FAR_BOTTOM_LEFT],e[d.FAR_TOP_LEFT],t[h.FAR])}function I(t,e){for(let n=0;n<b;n++){const o=t[n];if(o[0]*e[0]+o[1]*e[1]+o[2]*e[2]+o[3]>=e[3])return!1}return!0}function g(t,e){return S(t,function(t,e=l()){return(0,u.C)(t,e.ray),e.c0=0,e.c1=Number.MAX_VALUE,e}(e,L.get()))}function p(t,e,n){return S(t,function(t,e,n=l()){const o=(0,i.l)(t.vector);return(0,u.fA)(t.origin,e,n.ray),n.c0=0,n.c1=o,n}(e,n,L.get()))}function R(t,e){for(let n=0;n<b;n++)if((0,T.mN)(t[n],e)>0)return!1;return!0}function S(t,e){for(let n=0;n<b;n++)if(!(0,T.$Q)(t[n],e))return!1;return!0}(f=h||(h={}))[f.LEFT=0]="LEFT",f[f.RIGHT=1]="RIGHT",f[f.BOTTOM=2]="BOTTOM",f[f.TOP=3]="TOP",f[f.NEAR=4]="NEAR",f[f.FAR=5]="FAR",function(t){t[t.NEAR_BOTTOM_LEFT=0]="NEAR_BOTTOM_LEFT",t[t.NEAR_BOTTOM_RIGHT=1]="NEAR_BOTTOM_RIGHT",t[t.NEAR_TOP_RIGHT=2]="NEAR_TOP_RIGHT",t[t.NEAR_TOP_LEFT=3]="NEAR_TOP_LEFT",t[t.FAR_BOTTOM_LEFT=4]="FAR_BOTTOM_LEFT",t[t.FAR_BOTTOM_RIGHT=5]="FAR_BOTTOM_RIGHT",t[t.FAR_TOP_RIGHT=6]="FAR_TOP_RIGHT",t[t.FAR_TOP_LEFT=7]="FAR_TOP_LEFT"}(d||(d={}));const M={bottom:[d.FAR_BOTTOM_RIGHT,d.NEAR_BOTTOM_RIGHT,d.NEAR_BOTTOM_LEFT,d.FAR_BOTTOM_LEFT],near:[d.NEAR_BOTTOM_LEFT,d.NEAR_BOTTOM_RIGHT,d.NEAR_TOP_RIGHT,d.NEAR_TOP_LEFT],far:[d.FAR_BOTTOM_RIGHT,d.FAR_BOTTOM_LEFT,d.FAR_TOP_LEFT,d.FAR_TOP_RIGHT],right:[d.NEAR_BOTTOM_RIGHT,d.FAR_BOTTOM_RIGHT,d.FAR_TOP_RIGHT,d.NEAR_TOP_RIGHT],left:[d.FAR_BOTTOM_LEFT,d.NEAR_BOTTOM_LEFT,d.NEAR_TOP_LEFT,d.FAR_TOP_LEFT],top:[d.FAR_TOP_LEFT,d.NEAR_TOP_LEFT,d.NEAR_TOP_RIGHT,d.FAR_TOP_RIGHT]},b=6,v=8,F=[(0,c.fA)(-1,-1,-1,1),(0,c.fA)(1,-1,-1,1),(0,c.fA)(1,1,-1,1),(0,c.fA)(-1,1,-1,1),(0,c.fA)(-1,-1,1,1),(0,c.fA)(1,-1,1,1),(0,c.fA)(1,1,1,1),(0,c.fA)(-1,1,1,1)],L=new o.I(l),P=E()},88582:(t,e,n)=>{var o;n.d(e,{_:()=>o}),function(t){t[t.X=0]="X",t[t.Y=1]="Y",t[t.Z=2]="Z"}(o||(o={}))},91869:(t,e,n)=>{function o(t,e){for(const n of t.values())if(e(n))return!0;return!1}function r(t,e,n){const o=t.get(e);if(void 0!==o)return o;const r=n();return t.set(e,r),r}function i(t){const e=new Map;return n=>(e.has(n)||e.set(n,t(n)),e.get(n))}n.d(e,{Bj:()=>i,Bs:()=>o,tE:()=>r})},93406:(t,e,n)=>{n.d(e,{K:()=>c});var o=n(34727),r=n(3694),i=n(38954),s=n(51850);const a=-1;function c(t,e,n){const o=t.vertices.position,r=t.vertices.componentIndex,s=_.position0,c=_.position1,h=_.faceNormal0,f=_.faceNormal1,{edges:T,normals:O}=l(t),E=T.length/4,m=e.allocate(E);let A=0;const N=E,p=n?.allocate(N);let S=0,M=0,b=0;d.length=0;for(let t=0;t<E;++t){const e=4*t;o.getVec(T.data[e],s),o.getVec(T.data[e+1],c);const n=d.pushNew();n.index=4*t,n.length=(0,i.j)(s,c)}d.sort((t,e)=>e.length-t.length);const v=new Array,F=new Array;d.forAll(({length:t,index:l})=>{const d=T.data[l],E=T.data[l+1],N=T.data[l+2],L=T.data[l+3],P=L===a;if(o.getVec(d,s),o.getVec(E,c),P){const t=3*N;(0,i.i)(h,O.data[t],O.data[t+1],O.data[t+2]),(0,i.c)(f,h),_.componentIndex=r.get(d),_.cosAngle=(0,i.e)(h,f)}else{let t=3*N;if((0,i.i)(h,O.data[t],O.data[t+1],O.data[t+2]),t=3*L,(0,i.i)(f,O.data[t],O.data[t+1],O.data[t+2]),_.componentIndex=r.get(d),_.cosAngle=(0,i.e)(h,f),function(t,e){return t.cosAngle>e}(_,g))return;_.cosAngle<-.9999&&(0,i.c)(f,h)}M+=t,b++,P||function(t,e){return t.cosAngle<e}(_,R)?(e.write(m,A++,_),v.push(t)):u(_,I)&&(p&&n&&n.write(p,S++,_),F.push(t))});const L=new Float32Array(v.reverse()),P=new Float32Array(F.reverse()),C=p&&n?{instancesData:p.slice(0,S),lodInfo:{lengths:P}}:void 0;return{regular:{instancesData:m.slice(0,A),lodInfo:{lengths:L}},silhouette:C,averageEdgeLength:M/b}}function u(t,e){const n=(0,o.XM)(t.cosAngle);return(0,i.E)(E,t.position1,t.position0),n*((0,i.e)((0,i.h)(O,t.faceNormal0,t.faceNormal1),E)>0?-1:1)>e}function l(t){const e=t.faces.length/3,n=t.faces,o=t.neighbors,r=t.vertices.position;f.length=T.length=0;for(let t=0;t<e;t++){const e=3*t,s=o[e],c=o[e+1],u=o[e+2],l=n[e],h=n[e+1],d=n[e+2];r.getVec(l,m),r.getVec(h,A),r.getVec(d,N),(0,i.d)(A,A,m),(0,i.d)(N,N,m),(0,i.h)(m,A,N),(0,i.n)(m,m),T.pushArray(m),(s===a||l<h)&&(f.push(l),f.push(h),f.push(t),f.push(s)),(c===a||h<d)&&(f.push(h),f.push(d),f.push(t),f.push(c)),(u===a||d<l)&&(f.push(d),f.push(l),f.push(t),f.push(u))}return{edges:f,normals:T}}class h{constructor(){this.index=0,this.length=0}}const d=new r.A({allocator:t=>t||new h,deallocator:null}),f=new r.A({deallocator:null}),T=new r.A({deallocator:null}),_=new class{constructor(){this.position0=(0,s.vt)(),this.position1=(0,s.vt)(),this.faceNormal0=(0,s.vt)(),this.faceNormal1=(0,s.vt)(),this.componentIndex=0,this.cosAngle=0}},O=(0,s.vt)(),E=(0,s.vt)(),m=(0,s.vt)(),A=(0,s.vt)(),N=(0,s.vt)(),I=(0,o.kU)(4),g=Math.cos(I),p=(0,o.kU)(35),R=Math.cos(p)}}]);
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
"use strict";(self.webpackChunkRemoteClient=self.webpackChunkRemoteClient||[]).push([[7346],{431:(t,n,e)=>{e.d(n,{o6:()=>R,HY:()=>P,hx:()=>y,Jb:()=>U});var r=e(9318);function o(t,n,e){const r=n/3,o=new Uint32Array(e+1),i=new Uint32Array(e+1),a=(t,n)=>{t<n?o[t+1]++:i[n+1]++};for(let n=0;n<r;n++){const e=t[3*n],r=t[3*n+1],o=t[3*n+2];a(e,r),a(r,o),a(o,e)}let s=0,c=0;for(let t=0;t<e;t++){const n=o[t+1],e=i[t+1];o[t+1]=s,i[t+1]=c,s+=n,c+=e}const u=new Uint32Array(6*r),l=o[e],h=(t,n,e)=>{if(t<n){const r=o[t+1]++;u[2*r]=n,u[2*r+1]=e}else{const r=i[n+1]++;u[2*l+2*r]=t,u[2*l+2*r+1]=e}};for(let n=0;n<r;n++){const e=t[3*n],r=t[3*n+1],o=t[3*n+2];h(e,r,n),h(r,o,n),h(o,e,n)}const f=(t,n)=>{const e=2*t,r=n-t;for(let t=1;t<r;t++){const n=u[e+2*t],r=u[e+2*t+1];let o=t-1;for(;o>=0&&u[e+2*o]>n;o--)u[e+2*o+2]=u[e+2*o],u[e+2*o+3]=u[e+2*o+1];u[e+2*o+2]=n,u[e+2*o+3]=r}};for(let t=0;t<e;t++)f(o[t],o[t+1]),f(l+i[t],l+i[t+1]);const d=new Int32Array(3*r),g=(n,e)=>n===t[3*e]?0:n===t[3*e+1]?1:n===t[3*e+2]?2:-1,M=(t,n)=>{const e=g(t,n);d[3*n+e]=-1},p=(t,n,e,r)=>{const o=g(t,n);d[3*n+o]=r;const i=g(e,r);d[3*r+i]=n};for(let t=0;t<e;t++){let n=o[t];const e=o[t+1];let r=i[t];const a=i[t+1];for(;n<e&&r<a;){const e=u[2*n],o=u[2*l+2*r];e===o?(p(t,u[2*n+1],o,u[2*l+2*r+1]),n++,r++):e<o?(M(t,u[2*n+1]),n++):(M(o,u[2*l+2*r+1]),r++)}for(;n<e;)M(t,u[2*n+1]),n++;for(;r<a;)M(u[2*l+2*r],u[2*l+2*r+1]),r++}return d}var i=e(1843),a=e(46540),s=e(3055),c=e(87811),u=e(38954),l=e(51850),h=e(4431),f=e(34727);function d(t,n,e,r,o,i=2){const a=1/(Math.abs(e)+Math.abs(r)+Math.abs(o)),s=e*a,c=r*a,u=o<=0?(s>=0?1:-1)*(1-Math.abs(c)):s,l=o<=0?(c>=0?1:-1)*(1-Math.abs(s)):c,h=n*i;t[h]=g(u),t[h+1]=g(l)}function g(t){return(0,f.qE)(Math.round(32767*t),-32767,32767)}e(11868),e(34275);class M{updateSettings(t){this.settings=t,this._edgeHashFunction=t.reducedPrecision?A:E}write(t,n,e){v.seed=this._edgeHashFunction(e);const r=v.getIntRange(0,255),o=v.getIntRange(0,this.settings.variants-1),i=v.getFloat(),a=255*(.5*function(t){return Math.abs(t)**1.2*Math.sign(t)}(-(1-Math.min(i/.7,1))+Math.max(0,i-.7)/(1-.7))+.5);t.position0.setVec(n,e.position0),t.position1.setVec(n,e.position1),t.componentIndex.set(n,e.componentIndex),t.variantOffset.set(n,r),t.variantStroke.set(n,o),t.variantExtension.set(n,a)}}const p=new Float32Array(6),m=new Uint32Array(p.buffer),N=new Uint32Array(1);function E(t){return p[0]=t.position0[0],p[1]=t.position0[1],p[2]=t.position0[2],p[3]=t.position1[0],p[4]=t.position1[1],p[5]=t.position1[2],N[0]=31*(31*(31*(31*(31*(166811+m[0])+m[1])+m[2])+m[3])+m[4])+m[5],N[0]}function A(t){const n=p;n[0]=O(t.position0[0]),n[1]=O(t.position0[1]),n[2]=O(t.position0[2]),n[3]=O(t.position1[0]),n[4]=O(t.position1[1]),n[5]=O(t.position1[2]),N[0]=5381;for(let t=0;t<m.length;t++)N[0]=31*N[0]+m[t];return N[0]}const I=1e4;function O(t){return Math.round(t*I)/I}class T{constructor(){this._commonWriter=new M}updateSettings(t){this._commonWriter.updateSettings(t)}allocate(t){return s.gr.createBuffer(t)}write(t,n,e){this._commonWriter.write(t,n,e),(0,u.f)(b,e.faceNormal0,e.faceNormal1),(0,u.n)(b,b);const{typedBuffer:r,typedBufferStride:o}=t.normalCompressed;d(r,n,b[0],b[1],b[2],o)}static{this.Layout=s.gr}static{this.glLayout=(0,h.U)(s.gr,1)}}class S{constructor(){this._commonWriter=new M}updateSettings(t){this._commonWriter.updateSettings(t)}allocate(t){return s.In.createBuffer(t)}write(t,n,e){this._commonWriter.write(t,n,e);{const{typedBuffer:r,typedBufferStride:o}=t.normalCompressed;d(r,n,e.faceNormal0[0],e.faceNormal0[1],e.faceNormal0[2],o)}{const{typedBuffer:r,typedBufferStride:o}=t.normal2Compressed;d(r,n,e.faceNormal1[0],e.faceNormal1[1],e.faceNormal1[2],o)}}static{this.Layout=s.In}static{this.glLayout=(0,h.U)(s.In,1)}}const b=(0,l.vt)(),v=new c.A;var _=e(93406);function R(t){const n=y(t.data,t.skipDeduplicate,t.indices,t.indicesLength);return D.updateSettings(t.writerSettings),w.updateSettings(t.writerSettings),(0,_.K)(n,D,w)}function y(t,n,e,i){if(n){const n=o(e,i,t.count);return new L(e,i,n,t)}const a=(0,r.b)(t.buffer,t.stride/4,{originalIndices:e}),c=o(a.indices,i,a.uniqueCount);return{faces:a.indices,facesLength:a.indices.length,neighbors:c,vertices:s.I$.createView(a.buffer)}}class L{constructor(t,n,e,r){this.faces=t,this.facesLength=n,this.neighbors=e,this.vertices=r}}const D=new T,w=new S,U=(0,i.BP)().vec3f(a.r.POSITION0).vec3f(a.r.POSITION1),P=(0,i.BP)().vec3f(a.r.POSITION0).vec3f(a.r.POSITION1).u16(a.r.COMPONENTINDEX)},3055:(t,n,e)=>{e.d(n,{I$:()=>a,In:()=>u,gr:()=>c});var r=e(4431),o=e(1843),i=e(46540);const a=(0,o.BP)().vec3f(i.r.POSITION).u16(i.r.COMPONENTINDEX).freeze(),s=(0,o.BP)().vec2u8(i.r.SIDENESS).freeze(),c=((0,r.U)(s),(0,o.BP)().vec3f(i.r.POSITION0).vec3f(i.r.POSITION1).vec2i16(i.r.NORMALCOMPRESSED).u16(i.r.COMPONENTINDEX).u8(i.r.VARIANTOFFSET,{glNormalized:!0}).u8(i.r.VARIANTSTROKE).u8(i.r.VARIANTEXTENSION,{glNormalized:!0}).freeze()),u=(0,o.BP)().vec3f(i.r.POSITION0).vec3f(i.r.POSITION1).vec2i16(i.r.NORMALCOMPRESSED).vec2i16(i.r.NORMAL2COMPRESSED).u16(i.r.COMPONENTINDEX).u8(i.r.VARIANTOFFSET,{glNormalized:!0}).u8(i.r.VARIANTSTROKE).u8(i.r.VARIANTEXTENSION,{glNormalized:!0}).freeze();new Map([[i.r.POSITION0,0],[i.r.POSITION1,1],[i.r.COMPONENTINDEX,2],[i.r.VARIANTOFFSET,3],[i.r.VARIANTSTROKE,4],[i.r.VARIANTEXTENSION,5],[i.r.NORMALCOMPRESSED,6],[i.r.NORMAL2COMPRESSED,7],[i.r.SIDENESS,8]])},3694:(t,n,e)=>{e.d(n,{A:()=>s});var r,o=e(4576),i=e(21818);!function(t){const n=(t,n,e,r)=>{let o=n,i=n;const a=e>>>1,s=t[o-1];for(;i<=a;){i=o<<1,i<e&&r(t[i-1],t[i])<0&&++i;const n=t[i-1];if(r(n,s)<=0)break;t[o-1]=n,o=i}t[o-1]=s},e=(t,n)=>t<n?-1:t>n?1:0;t.sort=function(t,r,o,i){void 0===r&&(r=0),void 0===o&&(o=t.length),void 0===i&&(i=e);for(let e=o>>>1;e>r;e--)n(t,e,o,i);const a=r+1;for(let e=o-1;e>r;e--){const o=t[r];t[r]=t[e],t[e]=o,n(t,a,e,i)}},t.iterableSort=function*(t,r,o,i){void 0===r&&(r=0),void 0===o&&(o=t.length),void 0===i&&(i=e);for(let e=o>>>1;e>r;e--)n(t,e,o,i),yield;const a=r+1;for(let e=o-1;e>r;e--){const o=t[r];t[r]=t[e],t[e]=o,n(t,a,e,i),yield}}}(r||(r={}));const a=r;class s{constructor(t){this.data=[],this._length=0,this._allocator=void 0,this._deallocator=()=>null,this._shrink=()=>{},this._hint=new o.vW,t&&(t.initialSize&&(this.data=new Array(t.initialSize)),t.allocator&&(this._allocator=t.allocator),void 0!==t.deallocator&&(this._deallocator=t.deallocator),t.shrink&&(this._shrink=()=>c(this)))}toArray(){return this.data.slice(0,this.length)}filter(t){const n=new Array;for(let e=0;e<this._length;e++){const r=this.data[e];t(r)&&n.push(r)}return n}at(t){if((t=Math.trunc(t)||0)<0&&(t+=this._length),!(t<0||t>=this._length))return this.data[t]}includes(t,n){const e=this.data.indexOf(t,n);return-1!==e&&e<this.length}get length(){return this._length}set length(t){if(t>this._length){if(this._allocator){for(;this._length<t;)this.data[this._length++]=this._allocator(this.data[this._length]);return}this._length=t}else{if(this._deallocator)for(let n=t;n<this._length;++n)this.data[n]=this._deallocator(this.data[n]);this._length=t,this._shrink()}}clear(){this.length=0}prune(){this.clear(),this.data=[]}push(t){this.data[this._length++]=t}pushArray(t,n=t.length){for(let e=0;e<n;e++)this.data[this._length++]=t[e]}fill(t,n){for(let e=0;e<n;e++)this.data[this._length++]=t}pushNew(){this._allocator&&(this.data[this.length]=this._allocator(this.data[this.length]));const t=this.data[this._length];return++this._length,t}unshift(t){this.data.unshift(t),this._length++,c(this)}pop(){if(0===this.length)return;const t=this.data[this.length-1];return this.length=this.length-1,this._shrink(),t}remove(t){const n=(0,o.qh)(this.data,(0,i.zI)(t),this.length,this._hint);if(-1!==n)return this.data.splice(n,1),this.length=this.length-1,t}removeUnordered(t){return this.removeUnorderedIndex((0,o.qh)(this.data,(0,i.zI)(t),this.length,this._hint))}removeUnorderedIndex(t){if(!(t>=this.length||t<0))return this.swapElements(t,this.length-1),this.pop()}removeUnorderedMany(t,n=t.length,e){this.length=(0,o.mW)(this.data,t,this.length,n,this._hint,e),this._shrink()}front(){if(0!==this.length)return this.data[0]}back(){if(0!==this.length)return this.data[this.length-1]}swapElements(t,n){if(t>=this.length||n>=this.length||t===n)return;const e=this.data[t];this.data[t]=this.data[n],this.data[n]=e}sort(t){a.sort(this.data,0,this.length,t)}iterableSort(t){return a.iterableSort(this.data,0,this.length,t)}some(t,n){for(let e=0;e<this.length;++e)if(t.call(n,this.data[e],e,this.data))return!0;return!1}find(t,n){const{data:e,length:r}=this;for(let o=0;o<r;++o)if(t.call(n,e[o]))return e[o]}filterInPlace(t,n){let e=0;for(let r=0;r<this._length;++r){const o=this.data[r];t.call(n,o,r,this.data)&&(this.data[r]=this.data[e],this.data[e]=o,e++)}if(this._deallocator)for(let t=e;t<this._length;t++)this.data[t]=this._deallocator(this.data[t]);return this._length=e,this._shrink(),this}forAll(t,n){const{data:e,length:r}=this;for(let o=0;o<r;++o)t.call(n,e[o],o,e)}forEach(t,n){this.data.slice(0,this.length).forEach(t,n)}map(t,n){const e=new Array(this.length);for(let r=0;r<this.length;++r)e[r]=t.call(n,this.data[r],r,this.data);return e}reduce(t,n){let e=n;for(let n=0;n<this.length;++n)e=t(e,this.data[n],n,this.data);return e}has(t){const n=this.length,e=this.data;for(let r=0;r<n;++r)if(e[r]===t)return!0;return!1}*[Symbol.iterator](){for(let t=0;t<this.length;t++)yield this.data[t]}}function c(t){t.data.length>1.5*t.length&&(t.data.length=Math.floor(1.1*t.length))}},4431:(t,n,e)=>{e.d(n,{U:()=>i});var r=e(63907),o=e(74038);function i(t,n=0){const e=t.stride;return Array.from(t.fields.keys()).map(r=>{const i=t.fields.get(r),s=i.constructor.ElementCount,c=a(i.constructor.ElementType),u=i.offset,l=i.optional?.glNormalized??!1;return new o._(r,s,c,u,e,l,n)})}function a(t){const n=s[t];if(n)return n;throw new Error("BufferType not supported in WebGL")}const s={u8:r.pe.UNSIGNED_BYTE,u16:r.pe.UNSIGNED_SHORT,u32:r.pe.UNSIGNED_INT,i8:r.pe.BYTE,i16:r.pe.SHORT,i32:r.pe.INT,f16:r.pe.HALF_FLOAT,f32:r.pe.FLOAT}},9318:(t,n,e)=>{e.d(n,{b:()=>i});var r=e(34727),o=e(97146);function i(t,n,e){const i=Array.isArray(t),l=i?t.length/n:t.byteLength/(4*n),h=i?t:new Uint32Array(t,0,l*n),f=e?.minReduction??0,d=e?.originalIndices||null,g=d?d.length:0,M=e?.componentOffsets||null;let p=0;if(M)for(let t=0;t<M.length-1;t++){const n=M[t+1]-M[t];n>p&&(p=n)}else p=l;const m=Math.floor(1.1*p)+1;(null==u||u.length<2*m)&&(u=new Uint32Array((0,r.cU)(2*m)));for(let t=0;t<2*m;t++)u[t]=0;let N=0;const E=!!M&&!!d,A=E?g:l;let I=(0,o.my)(l);const O=new Uint32Array(g),T=1.96;let S=0!==f?Math.ceil(4*T*T/(f*f)*f*(1-f)):A,b=1,v=M?M[1]:A;for(let t=0;t<A;t++){if(t===S){const n=1-N/t;if(n+T*Math.sqrt(n*(1-n)/t)<f)return null;S*=2}if(t===v){for(let t=0;t<2*m;t++)u[t]=0;if(d)for(let t=M[b-1];t<M[b];t++)O[t]=I[d[t]];v=M[++b]}const e=E?d[t]:t,r=e*n,o=c(h,r,n);let i=o%m,s=N;for(;0!==u[2*i+1];){if(u[2*i]===o){const t=u[2*i+1]-1;if(a(h,r,t*n,n)){s=I[t];break}}i++,i>=m&&(i-=m)}s===N&&(u[2*i]=o,u[2*i+1]=e+1,N++),I[e]=s}if(0!==f&&1-N/l<f)return null;if(E){for(let t=M[b-1];t<O.length;t++)O[t]=I[d[t]];I=(0,o.uW)(O)}const _=i?new Array(N):new Uint32Array(N*n);N=0;for(let t=0;t<A;t++)I[t]===N&&(s(h,(E?d[t]:t)*n,_,N*n,n),N++);if(d&&!E){const t=new Uint32Array(g);for(let n=0;n<t.length;n++)t[n]=I[d[n]];I=(0,o.uW)(t)}return{buffer:Array.isArray(_)?_:_.buffer,indices:I,uniqueCount:N}}function a(t,n,e,r){for(let o=0;o<r;o++)if(t[n+o]!==t[e+o])return!1;return!0}function s(t,n,e,r,o){for(let i=0;i<o;i++)e[r+i]=t[n+i]}function c(t,n,e){let r=0;for(let o=0;o<e;o++)r=t[n+o]+r|0,r=r+(r<<11)+(r>>>2)|0;return r>>>0}let u=null},34304:(t,n,e)=>{e.d(n,{DF:()=>c,FD:()=>o,Ov:()=>i,ct:()=>u});let r=1e-6;function o(){return r}const i=Math.random,a=Math.PI/180,s=180/Math.PI;function c(t){return t*a}function u(t){return t*s}Object.freeze(Object.defineProperty({__proto__:null,RANDOM:i,equals:function(t,n){return Math.abs(t-n)<=r*Math.max(1,Math.abs(t),Math.abs(n))},getEpsilon:o,setEpsilon:function(t){r=t},toDegree:u,toRadian:c},Symbol.toStringTag,{value:"Module"}))},34727:(t,n,e)=>{e.d(n,{$8:()=>O,Cc:()=>a,Hx:()=>M,Io:()=>I,KJ:()=>u,Sp:()=>f,XM:()=>l,YN:()=>h,ZH:()=>g,cU:()=>o,gg:()=>d,hs:()=>s,kU:()=>c,or:()=>S,pF:()=>v,pq:()=>b,qE:()=>i});const r=new Float32Array(1);function o(t){--t;for(let n=1;n<32;n<<=1)t|=t>>n;return t+1}function i(t,n,e){return Math.min(Math.max(t,n),e)}function a(t,n,e){return t+(n-t)*e}function s(t,n,e,r,o){return a(r,o,(t-n)/(e-n))}function c(t){return t*Math.PI/180}function u(t){return 180*t/Math.PI}function l(t){return Math.acos(i(t,-1,1))}function h(t){return Math.asin(i(t,-1,1))}function f(t,n,e=1e-6){return t===n||!(!Number.isFinite(t)||!Number.isFinite(n))&&(t>n?t-n:n-t)<=e}function d(t,n,e=1e-6){return!f(t,n,e)&&t>n}function g(t,n,e=1e-6){return!f(t,n,e)&&t<n}function M(t,n,e=1e-6){return f(t,n,e)||t>n}const p=new DataView(new ArrayBuffer(Float64Array.BYTES_PER_ELEMENT));function m(t){return p.setFloat64(0,t),p.getBigInt64(0)}const N=BigInt("1000000"),E=A(1);function A(t){const n=m(t=Math.abs(t)),e=function(t){return p.setBigInt64(0,t),p.getFloat64(0)}(n<=N?N:n-N);return Math.abs(t-e)}function I(t,n,e=E){if(t===n)return!0;if(!Number.isFinite(t)||!Number.isFinite(n))return!1;if(null!=e&&A(Math.min(Math.abs(t),Math.abs(n)))<e)return Math.abs(t-n)<=e;const r=m(t),o=m(n);return r<0==o<0&&!((r<o?o-r:r-o)>N)}function O(t){return T(Math.max(-b,Math.min(t,b)))}function T(t){return r[0]=t,r[0]}function S(t){const n=t[0]*t[0]+t[1]*t[1]+t[2]*t[2],e=t[3]*t[3]+t[4]*t[4]+t[5]*t[5],r=t[6]*t[6]+t[7]*t[7]+t[8]*t[8];return!(f(n,1)&&f(e,1)&&f(r,1))}const b=T(34028234663852886e22);function v(t,n,e){if(void 0===e||0===+e)return Math[t](n);if(n=+n,e=+e,isNaN(n)||"number"!=typeof e||e%1!=0)return NaN;let r=n.toString().split("e");return r=(n=Math[t](+(r[0]+"e"+(r[1]?+r[1]-e:-e)))).toString().split("e"),+(r[0]+"e"+(r[1]?+r[1]+e:e))}},38954:(t,n,e)=>{e.d(n,{A:()=>g,B:()=>d,C:()=>l,D:()=>h,E:()=>U,F:()=>F,H:()=>B,a:()=>P,b:()=>m,c:()=>a,d:()=>u,e:()=>S,f:()=>c,g:()=>p,h:()=>b,i:()=>s,j:()=>N,k:()=>A,l:()=>i,m:()=>v,n:()=>T,o:()=>R,q:()=>w,r:()=>O,s:()=>E,t:()=>_,u:()=>I,v:()=>y,w:()=>f,x:()=>V,y:()=>z,z:()=>M});var r=e(51850),o=e(34304);function i(t){const n=t[0],e=t[1],r=t[2];return Math.sqrt(n*n+e*e+r*r)}function a(t,n){return t[0]=n[0],t[1]=n[1],t[2]=n[2],t}function s(t,n,e,r){return t[0]=n,t[1]=e,t[2]=r,t}function c(t,n,e){return t[0]=n[0]+e[0],t[1]=n[1]+e[1],t[2]=n[2]+e[2],t}function u(t,n,e){return t[0]=n[0]-e[0],t[1]=n[1]-e[1],t[2]=n[2]-e[2],t}function l(t,n,e){return t[0]=n[0]*e[0],t[1]=n[1]*e[1],t[2]=n[2]*e[2],t}function h(t,n,e){return t[0]=n[0]/e[0],t[1]=n[1]/e[1],t[2]=n[2]/e[2],t}function f(t,n){return t[0]=Math.abs(n[0]),t[1]=Math.abs(n[1]),t[2]=Math.abs(n[2]),t}function d(t,n){return t[0]=Math.sign(n[0]),t[1]=Math.sign(n[1]),t[2]=Math.sign(n[2]),t}function g(t,n,e){return t[0]=Math.min(n[0],e[0]),t[1]=Math.min(n[1],e[1]),t[2]=Math.min(n[2],e[2]),t}function M(t,n,e){return t[0]=Math.max(n[0],e[0]),t[1]=Math.max(n[1],e[1]),t[2]=Math.max(n[2],e[2]),t}function p(t,n,e){return t[0]=n[0]*e,t[1]=n[1]*e,t[2]=n[2]*e,t}function m(t,n,e,r){return t[0]=n[0]+e[0]*r,t[1]=n[1]+e[1]*r,t[2]=n[2]+e[2]*r,t}function N(t,n){const e=n[0]-t[0],r=n[1]-t[1],o=n[2]-t[2];return Math.sqrt(e*e+r*r+o*o)}function E(t,n){const e=n[0]-t[0],r=n[1]-t[1],o=n[2]-t[2];return e*e+r*r+o*o}function A(t){const n=t[0],e=t[1],r=t[2];return n*n+e*e+r*r}function I(t,n){return t[0]=-n[0],t[1]=-n[1],t[2]=-n[2],t}function O(t,n){return t[0]=1/n[0],t[1]=1/n[1],t[2]=1/n[2],t}function T(t,n){const e=n[0],r=n[1],o=n[2];let i=e*e+r*r+o*o;return i>0&&(i=1/Math.sqrt(i),t[0]=n[0]*i,t[1]=n[1]*i,t[2]=n[2]*i),t}function S(t,n){return t[0]*n[0]+t[1]*n[1]+t[2]*n[2]}function b(t,n,e){const r=n[0],o=n[1],i=n[2],a=e[0],s=e[1],c=e[2];return t[0]=o*c-i*s,t[1]=i*a-r*c,t[2]=r*s-o*a,t}function v(t,n,e,r){const o=n[0],i=n[1],a=n[2];return t[0]=o+r*(e[0]-o),t[1]=i+r*(e[1]-i),t[2]=a+r*(e[2]-a),t}function _(t,n,e){const r=n[0],o=n[1],i=n[2];return t[0]=e[0]*r+e[4]*o+e[8]*i+e[12],t[1]=e[1]*r+e[5]*o+e[9]*i+e[13],t[2]=e[2]*r+e[6]*o+e[10]*i+e[14],t}function R(t,n,e){const r=n[0],o=n[1],i=n[2];return t[0]=r*e[0]+o*e[3]+i*e[6],t[1]=r*e[1]+o*e[4]+i*e[7],t[2]=r*e[2]+o*e[5]+i*e[8],t}function y(t,n,e){const r=e[0],o=e[1],i=e[2],a=e[3],s=n[0],c=n[1],u=n[2],l=o*u-i*c,h=i*s-r*u,f=r*c-o*s,d=o*f-i*h,g=i*l-r*f,M=r*h-o*l,p=2*a;return t[0]=s+l*p+2*d,t[1]=c+h*p+2*g,t[2]=u+f*p+2*M,t}const L=(0,r.vt)(),D=(0,r.vt)();function w(t,n){return t[0]===n[0]&&t[1]===n[1]&&t[2]===n[2]}function U(t,n,e){const r=e[0]-n[0],o=e[1]-n[1],i=e[2]-n[2];let a=r*r+o*o+i*i;return a>0?(a=1/Math.sqrt(a),t[0]=r*a,t[1]=o*a,t[2]=i*a,t):(t[0]=0,t[1]=0,t[2]=0,t)}const P=u,C=l,x=h,F=N,V=E,B=i,z=A;Object.freeze(Object.defineProperty({__proto__:null,abs:f,add:c,angle:function(t,n){T(L,t),T(D,n);const e=S(L,D);return e>1?0:e<-1?Math.PI:Math.acos(e)},bezier:function(t,n,e,r,o,i){const a=1-i,s=a*a,c=i*i,u=s*a,l=3*i*s,h=3*c*a,f=c*i;return t[0]=n[0]*u+e[0]*l+r[0]*h+o[0]*f,t[1]=n[1]*u+e[1]*l+r[1]*h+o[1]*f,t[2]=n[2]*u+e[2]*l+r[2]*h+o[2]*f,t},ceil:function(t,n){return t[0]=Math.ceil(n[0]),t[1]=Math.ceil(n[1]),t[2]=Math.ceil(n[2]),t},clamp:function(t,n=0,e=1){return t[0]=Math.min(Math.max(t[0],n),e),t[1]=Math.min(Math.max(t[1],n),e),t[2]=Math.min(Math.max(t[2],n),e),t},copy:a,cross:b,crossAndNormalize:function(t,n,e){const r=n[0],o=n[1],i=n[2],a=e[0],s=e[1],c=e[2],u=o*c-i*s,l=i*a-r*c,h=r*s-o*a,f=Math.sqrt(u*u+l*l+h*h);return t[0]=u/f,t[1]=l/f,t[2]=h/f,t},direction:U,dist:F,distance:N,div:x,divide:h,dot:S,equals:function(t,n){if(t===n)return!0;const e=t[0],r=t[1],i=t[2],a=n[0],s=n[1],c=n[2],u=(0,o.FD)();return Math.abs(e-a)<=u*Math.max(1,Math.abs(e),Math.abs(a))&&Math.abs(r-s)<=u*Math.max(1,Math.abs(r),Math.abs(s))&&Math.abs(i-c)<=u*Math.max(1,Math.abs(i),Math.abs(c))},exactEquals:w,floor:function(t,n){return t[0]=Math.floor(n[0]),t[1]=Math.floor(n[1]),t[2]=Math.floor(n[2]),t},hermite:function(t,n,e,r,o,i){const a=i*i,s=a*(2*i-3)+1,c=a*(i-2)+i,u=a*(i-1),l=a*(3-2*i);return t[0]=n[0]*s+e[0]*c+r[0]*u+o[0]*l,t[1]=n[1]*s+e[1]*c+r[1]*u+o[1]*l,t[2]=n[2]*s+e[2]*c+r[2]*u+o[2]*l,t},inverse:O,len:B,length:i,lerp:v,max:M,min:g,mul:C,multiply:l,negate:I,normalize:T,random:function(t,n=1){const e=o.Ov,r=2*e()*Math.PI,i=2*e()-1,a=Math.sqrt(1-i*i)*n;return t[0]=Math.cos(r)*a,t[1]=Math.sin(r)*a,t[2]=i*n,t},rotateX:function(t,n,e,r){const o=[],i=[];return o[0]=n[0]-e[0],o[1]=n[1]-e[1],o[2]=n[2]-e[2],i[0]=o[0],i[1]=o[1]*Math.cos(r)-o[2]*Math.sin(r),i[2]=o[1]*Math.sin(r)+o[2]*Math.cos(r),t[0]=i[0]+e[0],t[1]=i[1]+e[1],t[2]=i[2]+e[2],t},rotateY:function(t,n,e,r){const o=[],i=[];return o[0]=n[0]-e[0],o[1]=n[1]-e[1],o[2]=n[2]-e[2],i[0]=o[2]*Math.sin(r)+o[0]*Math.cos(r),i[1]=o[1],i[2]=o[2]*Math.cos(r)-o[0]*Math.sin(r),t[0]=i[0]+e[0],t[1]=i[1]+e[1],t[2]=i[2]+e[2],t},rotateZ:function(t,n,e,r){const o=[],i=[];return o[0]=n[0]-e[0],o[1]=n[1]-e[1],o[2]=n[2]-e[2],i[0]=o[0]*Math.cos(r)-o[1]*Math.sin(r),i[1]=o[0]*Math.sin(r)+o[1]*Math.cos(r),i[2]=o[2],t[0]=i[0]+e[0],t[1]=i[1]+e[1],t[2]=i[2]+e[2],t},round:function(t,n){return t[0]=Math.round(n[0]),t[1]=Math.round(n[1]),t[2]=Math.round(n[2]),t},scale:p,scaleAndAdd:m,set:s,sign:d,sqrDist:V,sqrLen:z,squaredDistance:E,squaredLength:A,str:function(t){return"vec3("+t[0]+", "+t[1]+", "+t[2]+")"},sub:P,subtract:u,transformMat3:R,transformMat4:_,transformQuat:y},Symbol.toStringTag,{value:"Module"}))},46540:(t,n,e)=>{var r;e.d(n,{r:()=>r}),function(t){t.POSITION="position",t.NORMAL="normal",t.NORMALCOMPRESSED="normalCompressed",t.UV0="uv0",t.UVI="uvi",t.COLOR="color",t.SYMBOLCOLOR="symbolColor",t.SIZE="size",t.ROTATION="rotation",t.TANGENT="tangent",t.OFFSET="offset",t.PERSPECTIVEDIVIDE="perspectiveDivide",t.CENTEROFFSETANDDISTANCE="centerOffsetAndDistance",t.LENGTH="length",t.NEXTDELTA="nextDelta",t.PREVIOUSDELTA="previousDelta",t.U0="u0",t.LINEPARAMETERS="lineParameters",t.COLORFEATUREATTRIBUTE="colorFeatureAttribute",t.SIZEFEATUREATTRIBUTE="sizeFeatureAttribute",t.OPACITYFEATUREATTRIBUTE="opacityFeatureAttribute",t.DISTANCETOSTART="distanceToStart",t.TIMESTAMPS="timeStamps",t.UVMAPSPACE="uvMapSpace",t.BOUNDINGRECT="boundingRect",t.UVREGION="uvRegion",t.PROFILERIGHT="profileRight",t.PROFILEUP="profileUp",t.PROFILEVERTEXANDNORMAL="profileVertexAndNormal",t.PROFILEAUXDATA="profileAuxData",t.INSTANCEMODELORIGINHI="instanceModelOriginHi",t.INSTANCEMODELORIGINLO="instanceModelOriginLo",t.INSTANCEMODEL="instanceModel",t.INSTANCEMODELNORMAL="instanceModelNormal",t.INSTANCECOLOR="instanceColor",t.INSTANCEFEATUREATTRIBUTE="instanceFeatureAttribute",t.LOCALTRANSFORM="localTransform",t.GLOBALTRANSFORM="globalTransform",t.BOUNDINGSPHERE="boundingSphere",t.MODELORIGIN="modelOrigin",t.MODELSCALEFACTORS="modelScaleFactors",t.FEATUREATTRIBUTE="featureAttribute",t.STATE="state",t.LODLEVEL="lodLevel",t.POSITION0="position0",t.POSITION1="position1",t.NORMAL2COMPRESSED="normal2Compressed",t.COMPONENTINDEX="componentIndex",t.VARIANTOFFSET="variantOffset",t.VARIANTSTROKE="variantStroke",t.VARIANTEXTENSION="variantExtension",t.SIDENESS="sideness",t.START="start",t.END="end",t.UP="up",t.START_UP="startUp",t.END_UP="endUp",t.EXTRUDE="extrude",t.OLIDCOLOR="objectAndLayerIdColor",t.INSTANCEOBJECTANDLAYERIDCOLOR="instanceObjectAndLayerIdColor"}(r||(r={}))},48163:(t,n,e)=>{function r(){return[0,0]}function o(t){return[t[0],t[1]]}function i(t,n){return[t,n]}function a(){return i(1,1)}function s(){return i(1,0)}function c(){return i(0,1)}e.d(n,{Un:()=>u,fA:()=>i,o8:()=>o,vt:()=>r});const u=a(),l=s(),h=c();Object.freeze(Object.defineProperty({__proto__:null,ONES:u,UNIT_X:l,UNIT_Y:h,ZEROS:[0,0],clone:o,create:r,freeze:function(t,n){return[t,n]},fromArray:function(t,n=[0,0]){const e=Math.min(2,t.length);for(let r=0;r<e;++r)n[r]=t[r];return n},fromValues:i,ones:a,unitX:s,unitY:c,zeros:function(){return[0,0]}},Symbol.toStringTag,{value:"Module"}))},51850:(t,n,e)=>{function r(){return[0,0,0]}function o(t){return[t[0],t[1],t[2]]}function i(t,n,e){return[t,n,e]}function a(t,n,e){return[t,n,e]}function s(t,n=[0,0,0]){const e=Math.min(3,t.length);for(let r=0;r<e;++r)n[r]=t[r];return n}function c(){return i(1,1,1)}function u(){return i(1,0,0)}function l(){return i(0,1,0)}function h(){return i(0,0,1)}e.d(n,{CN:()=>a,Cb:()=>p,Cw:()=>g,JP:()=>M,Un:()=>d,ci:()=>s,fA:()=>i,o8:()=>o,uY:()=>f,vt:()=>r});const f=[0,0,0],d=c(),g=u(),M=l(),p=h();Object.freeze(Object.defineProperty({__proto__:null,ONES:d,UNIT_X:g,UNIT_Y:M,UNIT_Z:p,ZEROS:f,clone:o,create:r,freeze:a,fromArray:s,fromValues:i,ones:c,unitX:u,unitY:l,unitZ:h,zeros:function(){return[0,0,0]}},Symbol.toStringTag,{value:"Module"}))},71936:(t,n,e)=>{e.r(n),e.d(n,{default:()=>c});var r=e(1843);function o(t,n){return n.push(t.buffer),{buffer:t.buffer,layout:new r.l5(t.layout)}}var i=e(3055),a=e(93406),s=e(431);class c{async extract(t){const n=u(t),e=(0,s.o6)(n),r=[n.data.buffer];return{result:l(e,r),transferList:r}}async extractComponentsEdgeLocations(t){const n=u(t),e=(0,s.hx)(n.data,n.skipDeduplicate,n.indices,n.indicesLength),r=[];return{result:o((0,a.K)(e,f).regular.instancesData,r),transferList:r}}async extractEdgeLocations(t){const n=u(t),e=(0,s.hx)(n.data,n.skipDeduplicate,n.indices,n.indicesLength),r=[];return{result:o((0,a.K)(e,h).regular.instancesData,r),transferList:r}}}function u(t){return{data:i.I$.createView(t.dataBuffer),indices:"Uint32Array"===t.indicesType?new Uint32Array(t.indices):"Uint16Array"===t.indicesType?new Uint16Array(t.indices):t.indices,indicesLength:t.indicesLength,writerSettings:t.writerSettings,skipDeduplicate:t.skipDeduplicate}}function l(t,n){return n.push(t.regular.lodInfo.lengths.buffer),n.push(t.silhouette.lodInfo.lengths.buffer),{regular:{instancesData:o(t.regular.instancesData,n),lodInfo:{lengths:t.regular.lodInfo.lengths.buffer}},silhouette:{instancesData:o(t.silhouette.instancesData,n),lodInfo:{lengths:t.silhouette.lodInfo.lengths.buffer}},averageEdgeLength:t.averageEdgeLength}}const h=new class{allocate(t){return s.Jb.createBuffer(t)}trim(t,n){return t.slice(0,n)}write(t,n,e){t.position0.setVec(n,e.position0),t.position1.setVec(n,e.position1)}},f=new class{allocate(t){return s.HY.createBuffer(t)}trim(t,n){return t.slice(0,n)}write(t,n,e){t.position0.setVec(n,e.position0),t.position1.setVec(n,e.position1),t.componentIndex.set(n,e.componentIndex)}}},74038:(t,n,e)=>{e.d(n,{_:()=>r});class r{constructor(t,n,e,r,o,i=!1,a=0){this.name=t,this.count=n,this.type=e,this.offset=r,this.stride=o,this.normalized=i,this.divisor=a}}},87317:(t,n,e)=>{e.d(n,{a:()=>E,b:()=>g,c:()=>o,d:()=>l,e:()=>A,f:()=>f,g:()=>a,h:()=>p,j:()=>d,l:()=>m,n:()=>M,s:()=>i,t:()=>N});var r=e(34304);function o(t,n){return t[0]=n[0],t[1]=n[1],t[2]=n[2],t[3]=n[3],t}function i(t,n,e,r,o){return t[0]=n,t[1]=e,t[2]=r,t[3]=o,t}function a(t,n,e){return t[0]=n[0]+e[0],t[1]=n[1]+e[1],t[2]=n[2]+e[2],t[3]=n[3]+e[3],t}function s(t,n,e){return t[0]=n[0]-e[0],t[1]=n[1]-e[1],t[2]=n[2]-e[2],t[3]=n[3]-e[3],t}function c(t,n,e){return t[0]=n[0]*e[0],t[1]=n[1]*e[1],t[2]=n[2]*e[2],t[3]=n[3]*e[3],t}function u(t,n,e){return t[0]=n[0]/e[0],t[1]=n[1]/e[1],t[2]=n[2]/e[2],t[3]=n[3]/e[3],t}function l(t,n,e){return t[0]=n[0]*e,t[1]=n[1]*e,t[2]=n[2]*e,t[3]=n[3]*e,t}function h(t,n){const e=n[0]-t[0],r=n[1]-t[1],o=n[2]-t[2],i=n[3]-t[3];return Math.sqrt(e*e+r*r+o*o+i*i)}function f(t,n){const e=n[0]-t[0],r=n[1]-t[1],o=n[2]-t[2],i=n[3]-t[3];return e*e+r*r+o*o+i*i}function d(t){const n=t[0],e=t[1],r=t[2],o=t[3];return Math.sqrt(n*n+e*e+r*r+o*o)}function g(t){const n=t[0],e=t[1],r=t[2],o=t[3];return n*n+e*e+r*r+o*o}function M(t,n){const e=n[0],r=n[1],o=n[2],i=n[3];let a=e*e+r*r+o*o+i*i;return a>0&&(a=1/Math.sqrt(a),t[0]=e*a,t[1]=r*a,t[2]=o*a,t[3]=i*a),t}function p(t,n){return t[0]*n[0]+t[1]*n[1]+t[2]*n[2]+t[3]*n[3]}function m(t,n,e,r){const o=n[0],i=n[1],a=n[2],s=n[3];return t[0]=o+r*(e[0]-o),t[1]=i+r*(e[1]-i),t[2]=a+r*(e[2]-a),t[3]=s+r*(e[3]-s),t}function N(t,n,e){const r=n[0],o=n[1],i=n[2],a=n[3];return t[0]=e[0]*r+e[4]*o+e[8]*i+e[12]*a,t[1]=e[1]*r+e[5]*o+e[9]*i+e[13]*a,t[2]=e[2]*r+e[6]*o+e[10]*i+e[14]*a,t[3]=e[3]*r+e[7]*o+e[11]*i+e[15]*a,t}function E(t,n){return t[0]===n[0]&&t[1]===n[1]&&t[2]===n[2]&&t[3]===n[3]}function A(t,n){const e=t[0],o=t[1],i=t[2],a=t[3],s=n[0],c=n[1],u=n[2],l=n[3],h=(0,r.FD)();return Math.abs(e-s)<=h*Math.max(1,Math.abs(e),Math.abs(s))&&Math.abs(o-c)<=h*Math.max(1,Math.abs(o),Math.abs(c))&&Math.abs(i-u)<=h*Math.max(1,Math.abs(i),Math.abs(u))&&Math.abs(a-l)<=h*Math.max(1,Math.abs(a),Math.abs(l))}const I=s,O=c,T=u,S=h,b=f,v=d,_=g;Object.freeze(Object.defineProperty({__proto__:null,add:a,ceil:function(t,n){return t[0]=Math.ceil(n[0]),t[1]=Math.ceil(n[1]),t[2]=Math.ceil(n[2]),t[3]=Math.ceil(n[3]),t},copy:o,copyVec3:function(t,n){return t[0]=n[0],t[1]=n[1],t[2]=n[2],t},dist:S,distance:h,div:T,divide:u,dot:p,equals:A,exactEquals:E,floor:function(t,n){return t[0]=Math.floor(n[0]),t[1]=Math.floor(n[1]),t[2]=Math.floor(n[2]),t[3]=Math.floor(n[3]),t},inverse:function(t,n){return t[0]=1/n[0],t[1]=1/n[1],t[2]=1/n[2],t[3]=1/n[3],t},len:v,length:d,lerp:m,max:function(t,n,e){return t[0]=Math.max(n[0],e[0]),t[1]=Math.max(n[1],e[1]),t[2]=Math.max(n[2],e[2]),t[3]=Math.max(n[3],e[3]),t},min:function(t,n,e){return t[0]=Math.min(n[0],e[0]),t[1]=Math.min(n[1],e[1]),t[2]=Math.min(n[2],e[2]),t[3]=Math.min(n[3],e[3]),t},mul:O,multiply:c,negate:function(t,n){return t[0]=-n[0],t[1]=-n[1],t[2]=-n[2],t[3]=-n[3],t},normalize:M,random:function(t,n=1){const e=r.Ov;let o,i,a,s,c,u;do{o=2*e()-1,i=2*e()-1,c=o*o+i*i}while(c>=1);do{a=2*e()-1,s=2*e()-1,u=a*a+s*s}while(u>=1);const l=Math.sqrt((1-c)/u);return t[0]=n*o,t[1]=n*i,t[2]=n*a*l,t[3]=n*s*l,t},round:function(t,n){return t[0]=Math.round(n[0]),t[1]=Math.round(n[1]),t[2]=Math.round(n[2]),t[3]=Math.round(n[3]),t},scale:l,scaleAndAdd:function(t,n,e,r){return t[0]=n[0]+e[0]*r,t[1]=n[1]+e[1]*r,t[2]=n[2]+e[2]*r,t[3]=n[3]+e[3]*r,t},set:i,sqrDist:b,sqrLen:_,squaredDistance:f,squaredLength:g,str:function(t){return"vec4("+t[0]+", "+t[1]+", "+t[2]+", "+t[3]+")"},sub:I,subtract:s,transformMat4:N,transformQuat:function(t,n,e){const r=n[0],o=n[1],i=n[2],a=e[0],s=e[1],c=e[2],u=e[3],l=u*r+s*i-c*o,h=u*o+c*r-a*i,f=u*i+a*o-s*r,d=-a*r-s*o-c*i;return t[0]=l*u+d*-a+h*-c-f*-s,t[1]=h*u+d*-s+f*-a-l*-c,t[2]=f*u+d*-c+l*-s-h*-a,t[3]=n[3],t}},Symbol.toStringTag,{value:"Module"}))},91829:(t,n,e)=>{function r(){return[0,0,0,0]}function o(t){return[t[0],t[1],t[2],t[3]]}function i(t,n,e,r){return[t,n,e,r]}function a(t,n,e,r){return[t,n,e,r]}function s(t,n=[0,0,0,0]){const e=Math.min(4,t.length);for(let r=0;r<e;++r)n[r]=t[r];return n}function c(){return i(1,1,1,1)}function u(){return i(1,0,0,0)}function l(){return i(0,1,0,0)}function h(){return i(0,0,1,0)}function f(){return i(0,0,0,1)}e.d(n,{CN:()=>a,Un:()=>g,ci:()=>s,fA:()=>i,o8:()=>o,uY:()=>d,vt:()=>r});const d=[0,0,0,0],g=c(),M=u(),p=l(),m=h(),N=f();Object.freeze(Object.defineProperty({__proto__:null,ONES:g,UNIT_W:N,UNIT_X:M,UNIT_Y:p,UNIT_Z:m,ZEROS:d,clone:o,create:r,freeze:a,fromArray:s,fromValues:i,ones:c,unitW:f,unitX:u,unitY:l,unitZ:h,zeros:function(){return[0,0,0,0]}},Symbol.toStringTag,{value:"Module"}))},93406:(t,n,e)=>{e.d(n,{K:()=>c});var r=e(34727),o=e(3694),i=e(38954),a=e(51850);const s=-1;function c(t,n,e){const r=t.vertices.position,o=t.vertices.componentIndex,a=M.position0,c=M.position1,h=M.faceNormal0,d=M.faceNormal1,{edges:g,normals:p}=l(t),m=g.length/4,N=n.allocate(m);let E=0;const A=m,T=e?.allocate(A);let b=0,v=0,_=0;f.length=0;for(let t=0;t<m;++t){const n=4*t;r.getVec(g.data[n],a),r.getVec(g.data[n+1],c);const e=f.pushNew();e.index=4*t,e.length=(0,i.j)(a,c)}f.sort((t,n)=>n.length-t.length);const R=new Array,y=new Array;f.forAll(({length:t,index:l})=>{const f=g.data[l],m=g.data[l+1],A=g.data[l+2],L=g.data[l+3],D=L===s;if(r.getVec(f,a),r.getVec(m,c),D){const t=3*A;(0,i.i)(h,p.data[t],p.data[t+1],p.data[t+2]),(0,i.c)(d,h),M.componentIndex=o.get(f),M.cosAngle=(0,i.e)(h,d)}else{let t=3*A;if((0,i.i)(h,p.data[t],p.data[t+1],p.data[t+2]),t=3*L,(0,i.i)(d,p.data[t],p.data[t+1],p.data[t+2]),M.componentIndex=o.get(f),M.cosAngle=(0,i.e)(h,d),function(t,n){return t.cosAngle>n}(M,O))return;M.cosAngle<-.9999&&(0,i.c)(d,h)}v+=t,_++,D||function(t,n){return t.cosAngle<n}(M,S)?(n.write(N,E++,M),R.push(t)):u(M,I)&&(T&&e&&e.write(T,b++,M),y.push(t))});const L=new Float32Array(R.reverse()),D=new Float32Array(y.reverse()),w=T&&e?{instancesData:T.slice(0,b),lodInfo:{lengths:D}}:void 0;return{regular:{instancesData:N.slice(0,E),lodInfo:{lengths:L}},silhouette:w,averageEdgeLength:v/_}}function u(t,n){const e=(0,r.XM)(t.cosAngle);return(0,i.E)(m,t.position1,t.position0),e*((0,i.e)((0,i.h)(p,t.faceNormal0,t.faceNormal1),m)>0?-1:1)>n}function l(t){const n=t.faces.length/3,e=t.faces,r=t.neighbors,o=t.vertices.position;d.length=g.length=0;for(let t=0;t<n;t++){const n=3*t,a=r[n],c=r[n+1],u=r[n+2],l=e[n],h=e[n+1],f=e[n+2];o.getVec(l,N),o.getVec(h,E),o.getVec(f,A),(0,i.d)(E,E,N),(0,i.d)(A,A,N),(0,i.h)(N,E,A),(0,i.n)(N,N),g.pushArray(N),(a===s||l<h)&&(d.push(l),d.push(h),d.push(t),d.push(a)),(c===s||h<f)&&(d.push(h),d.push(f),d.push(t),d.push(c)),(u===s||f<l)&&(d.push(f),d.push(l),d.push(t),d.push(u))}return{edges:d,normals:g}}class h{constructor(){this.index=0,this.length=0}}const f=new o.A({allocator:t=>t||new h,deallocator:null}),d=new o.A({deallocator:null}),g=new o.A({deallocator:null}),M=new class{constructor(){this.position0=(0,a.vt)(),this.position1=(0,a.vt)(),this.faceNormal0=(0,a.vt)(),this.faceNormal1=(0,a.vt)(),this.componentIndex=0,this.cosAngle=0}},p=(0,a.vt)(),m=(0,a.vt)(),N=(0,a.vt)(),E=(0,a.vt)(),A=(0,a.vt)(),I=(0,r.kU)(4),O=Math.cos(I),T=(0,r.kU)(35),S=Math.cos(T)}}]);
|