@arcgis/core 5.0.0-next.8 → 5.0.0-next.9

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.
Files changed (123) hide show
  1. package/assets/esri/core/workers/RemoteClient.js +1 -1
  2. package/assets/esri/core/workers/chunks/02e7359162cf974b41b6.js +1 -0
  3. package/assets/esri/core/workers/chunks/0f735b0dec173142f3b6.js +2 -0
  4. package/assets/esri/core/workers/chunks/{a8f998b8ec8c56150479.js.LICENSE.txt → 0f735b0dec173142f3b6.js.LICENSE.txt} +1 -1
  5. package/assets/esri/core/workers/chunks/{b708792c84620b73c847.js → 21293b0c6405a10ec7b6.js} +1 -1
  6. package/assets/esri/core/workers/chunks/{a876d6159ca120c1567e.js → 28d1f2cf6aae547615c3.js} +1 -1
  7. package/assets/esri/core/workers/chunks/292daac70bb828e4923f.js +1 -0
  8. package/assets/esri/core/workers/chunks/31b6406960261da21dd4.js +1 -0
  9. package/assets/esri/core/workers/chunks/31dbe07047dc61303d7d.js +1 -0
  10. package/assets/esri/core/workers/chunks/{59d3cac32ad6dad941dc.js → 35c9b24e4430bd6c2b6b.js} +1 -1
  11. package/assets/esri/core/workers/chunks/3a457e718a901a45902e.js.LICENSE.txt +1 -1
  12. package/assets/esri/core/workers/chunks/4fb5f1c671892001a4fd.js +1 -0
  13. package/assets/esri/core/workers/chunks/{d88f2fe680b8d5603ef8.js → 5350d50b47b6a4e0e169.js} +1 -1
  14. package/assets/esri/core/workers/chunks/58e59ead33368ce38c8f.js +1 -0
  15. package/assets/esri/core/workers/chunks/{aff8e40a641c6822af1d.js → 5db37547963857295273.js} +1 -1
  16. package/assets/esri/core/workers/chunks/{3afb83f5de033dda89ec.js → 604777417722d4effe06.js} +1 -1
  17. package/assets/esri/core/workers/chunks/67f03d042455cd0f7009.js +1 -0
  18. package/assets/esri/core/workers/chunks/7565b382f6b3d2cb46a3.js +2 -0
  19. package/assets/esri/core/workers/chunks/{b96eb0ea506379182d62.js.LICENSE.txt → 7565b382f6b3d2cb46a3.js.LICENSE.txt} +1 -1
  20. package/assets/esri/core/workers/chunks/7d641f2f5edd95b9bc18.js +1 -0
  21. package/assets/esri/core/workers/chunks/812f2ccc01f44e3cfd41.js +1 -0
  22. package/assets/esri/core/workers/chunks/826fa0dfb63df77bfd95.js +1 -0
  23. package/assets/esri/core/workers/chunks/87921f3fa9001f5801ed.js +1 -0
  24. package/assets/esri/core/workers/chunks/{2a8dff8521e1e6a10cf6.js → 89b748e064ca90b4f76a.js} +1 -1
  25. package/assets/esri/core/workers/chunks/{fef45bc59c71f88c60b5.js → 8d9d3797c6d62fdfff9d.js} +1 -1
  26. package/assets/esri/core/workers/chunks/{e5a06ce0ef6a9a90e100.js → 9f21436016ff7a899e79.js} +1 -1
  27. package/assets/esri/core/workers/chunks/{67d9cfe02613cb73ee37.js → 9ff8ee6ed6b98c03ae7e.js} +2 -2
  28. package/assets/esri/core/workers/chunks/{67d9cfe02613cb73ee37.js.LICENSE.txt → 9ff8ee6ed6b98c03ae7e.js.LICENSE.txt} +1 -1
  29. package/assets/esri/core/workers/chunks/aa78b69219d9a0ef1c54.js.LICENSE.txt +1 -1
  30. package/assets/esri/core/workers/chunks/b05208d56a724a8f1661.js +1 -0
  31. package/assets/esri/core/workers/chunks/{b0365cbc3d2a41969e3b.js → b7eb486354994dc70855.js} +1 -1
  32. package/assets/esri/core/workers/chunks/bc19a232076d98825eef.js +1 -0
  33. package/assets/esri/core/workers/chunks/c715fd32f814a0f14f40.js +1 -0
  34. package/assets/esri/core/workers/chunks/ce16489cf7eb0d78c741.js.LICENSE.txt +1 -1
  35. package/assets/esri/core/workers/chunks/cf971e7b1b98d9c502d3.js +1 -0
  36. package/assets/esri/core/workers/chunks/{20975513be0a3a1da286.js → d1ca7c3a32ce00ed8b81.js} +1 -1
  37. package/assets/esri/core/workers/chunks/{b017bac40dc8328013e3.js → d391bfbaf0e790cd10d6.js} +2 -2
  38. package/assets/esri/core/workers/chunks/{b017bac40dc8328013e3.js.LICENSE.txt → d391bfbaf0e790cd10d6.js.LICENSE.txt} +1 -1
  39. package/assets/esri/core/workers/chunks/d6e0528eacee7ea4c1ce.js.LICENSE.txt +1 -1
  40. package/assets/esri/core/workers/chunks/db678a6e352275e507a9.js +1 -0
  41. package/assets/esri/core/workers/chunks/de2ebd9cc3d9e68d435b.js +1 -0
  42. package/assets/esri/core/workers/chunks/e599125e746c27de106e.js +1 -0
  43. package/assets/esri/core/workers/chunks/{05429f9d292a7a714309.js → ebcc94234d9d4be1941f.js} +1 -1
  44. package/assets/esri/core/workers/chunks/ee5f0fd5384caa11c986.js +1 -0
  45. package/assets/esri/core/workers/chunks/f651c05604eab83aef5f.js.LICENSE.txt +1 -1
  46. package/assets/esri/core/workers/chunks/f80f5dbf96c343ac4df6.js +1 -0
  47. package/assets/esri/core/workers/chunks/fccd931f95d81ecc57b2.js +1 -0
  48. package/assets/esri/themes/base/widgets/_NavigationToggle.scss +1 -1
  49. package/assets/esri/themes/base/widgets/_OrientedImageryViewer.scss +4 -4
  50. package/assets/esri/themes/base/widgets/_Widget.scss +1 -1
  51. package/assets/esri/themes/dark/main.css +1 -1
  52. package/assets/esri/themes/light/main.css +1 -1
  53. package/assets/esri/themes/light/view.css +1 -1
  54. package/config.js +1 -1
  55. package/form/FormTemplate.js +1 -1
  56. package/form/elements/Element.js +1 -1
  57. package/form/elements/FieldElement.js +1 -1
  58. package/form/elements/GroupElement.js +1 -1
  59. package/interfaces.d.ts +25 -23
  60. package/kernel.js +1 -1
  61. package/layers/knowledgeGraph/KnowledgeGraphSublayer.js +1 -1
  62. package/layers/knowledgeGraph/layerUtils.js +1 -1
  63. package/layers/orientedImagery/transformations/imageToWorld.js +1 -1
  64. package/layers/support/RasterJobHandler.js +1 -1
  65. package/layers/support/RasterWorker.js +1 -1
  66. package/layers/support/rasterDatasets/pixelReader.js +1 -1
  67. package/layers/support/rasterFunctions/pixelTransformUtils.js +5 -0
  68. package/layers/support/rasterFunctions/pixelUtils.js +1 -1
  69. package/package.json +2 -2
  70. package/smartMapping/renderers/size.js +1 -1
  71. package/smartMapping/support/adapters/FeatureLayerAdapter.js +1 -1
  72. package/smartMapping/support/adapters/InMemoryLayerAdapter.js +1 -1
  73. package/smartMapping/support/adapters/support/histogramUtils.js +1 -1
  74. package/smartMapping/support/adapters/support/utils.js +1 -1
  75. package/support/revision.js +1 -1
  76. package/symbols/support/utils.js +1 -1
  77. package/views/3d/GroundView3D.js +1 -1
  78. package/views/3d/analysis/VolumeMeasurement/VolumeMeasurementCutFillController.js +1 -1
  79. package/views/3d/layers/graphics/Graphics3DExtrudeSymbolLayer.js +1 -1
  80. package/views/support/PromiseQueue.js +1 -1
  81. package/views/support/Scheduler.js +1 -1
  82. package/widgets/Editor/AddAssociationWorkflow.js +1 -1
  83. package/widgets/Editor/CreateFeaturesWorkflow.js +1 -1
  84. package/widgets/Editor/EditorViewModel.js +1 -1
  85. package/widgets/Editor/MergeFeaturesWorkflow.js +1 -1
  86. package/widgets/Editor/SplitFeatureWorkflow.js +1 -1
  87. package/widgets/Editor/UpdateFeatureWorkflow.js +1 -1
  88. package/widgets/Editor/UpdateFeaturesWorkflow.js +1 -1
  89. package/widgets/Editor/UpdateRecordWorkflow.js +1 -1
  90. package/widgets/Editor/UpdateRecordWorkflowData.js +1 -1
  91. package/widgets/Editor/UpdateWorkflow.js +1 -1
  92. package/widgets/Editor/UpdateWorkflowData.js +1 -1
  93. package/widgets/Editor/support/SketchController.js +1 -1
  94. package/widgets/Editor/support/errors.js +5 -0
  95. package/widgets/Editor/workflowUtils.js +1 -1
  96. package/widgets/Editor.js +1 -1
  97. package/widgets/Legend/LegendViewModel.js +1 -1
  98. package/widgets/Legend/support/ActiveLayerInfo.js +1 -1
  99. package/widgets/OrientedImageryViewer/adapters/sketch/TriangulatedMeasurementAdapter.js +1 -1
  100. package/widgets/OrientedImageryViewer/adapters/view/SceneViewAdapter.js +1 -1
  101. package/widgets/OrientedImageryViewer/services/DepthImageService.js +1 -1
  102. package/assets/esri/core/workers/chunks/06ba43843e9c4988049b.js +0 -1
  103. package/assets/esri/core/workers/chunks/1d15d1b20dc10fde6def.js +0 -1
  104. package/assets/esri/core/workers/chunks/28020063048e644f17a5.js +0 -1
  105. package/assets/esri/core/workers/chunks/36d067c8d03d7a894f5f.js +0 -1
  106. package/assets/esri/core/workers/chunks/38cc18fd93c18815ded0.js +0 -1
  107. package/assets/esri/core/workers/chunks/4eebd74ebc20579dade8.js +0 -1
  108. package/assets/esri/core/workers/chunks/5f402b3c00bc4afc77b2.js +0 -1
  109. package/assets/esri/core/workers/chunks/63a6f3e70d2b6ea57e40.js +0 -1
  110. package/assets/esri/core/workers/chunks/695cdef5057e5461078a.js +0 -1
  111. package/assets/esri/core/workers/chunks/6bb7dbc46787b8e34bd9.js +0 -1
  112. package/assets/esri/core/workers/chunks/6ee2f0f708494102a493.js +0 -1
  113. package/assets/esri/core/workers/chunks/78694ad8229347903f41.js +0 -1
  114. package/assets/esri/core/workers/chunks/90cbd627d4113db3b686.js +0 -1
  115. package/assets/esri/core/workers/chunks/a31635a6366347dcef0f.js +0 -1
  116. package/assets/esri/core/workers/chunks/a8f998b8ec8c56150479.js +0 -2
  117. package/assets/esri/core/workers/chunks/afc13d5b842275db7dbc.js +0 -1
  118. package/assets/esri/core/workers/chunks/b548910e820d731ffe8a.js +0 -1
  119. package/assets/esri/core/workers/chunks/b96eb0ea506379182d62.js +0 -2
  120. package/assets/esri/core/workers/chunks/c476643002387f60ea42.js +0 -1
  121. package/assets/esri/core/workers/chunks/ce98416437cc1a89d8ea.js +0 -1
  122. package/assets/esri/core/workers/chunks/e0bbfbe1ed39c82f1bd4.js +0 -1
  123. package/assets/esri/core/workers/chunks/ebf23b46db56aaa88841.js +0 -1
@@ -0,0 +1 @@
1
+ "use strict";(self.webpackChunkRemoteClient=self.webpackChunkRemoteClient||[]).push([[3356],{4095:(t,e,r)=>{r.d(e,{CW:()=>c,DE:()=>h,S1:()=>d});var n=r(44208),o=r(53966),i=r(34727),s=r(74887),a=r(87811);r(5443),r(21325);const l=()=>o.A.getLogger("esri.views.2d.engine.flow.dataUtils"),u=10;async function c(t,e,r,o){const i=performance.now(),c=h(e,r),f=performance.now(),p=d(e,c,r.width,r.height),m=performance.now(),g=function(t){const e=new a.A,r=t.reduce((t,e)=>t+e.vertices.length,0),n=new Float32Array(4*r),o=new Array(t.length);let i=0,s=0;for(const{vertices: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[s++]={startVertex:t,numberOfVertices:r.length,totalTime:r[r.length-1].t,timeSeed:e.getFloat()}}return{lineVertices:n,lineDescriptors:o}}(p),y=performance.now(),w="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,C=null,b=null,x=null;if(p>0){w=d-i,C=m-s;const t=Math.sqrt(w*w+C*C);if(w/=t,C/=t,p>1){let t=w+u,r=C+f;const n=Math.sqrt(t*t+r*r);t/=n,r/=n;const o=Math.min(1/(t*w+r*C),e);t*=o,r*=o,b=-r,x=t}else b=-C,x=w;null!==b&&null!==x&&(h(i,s,a,b,x,n,o,y),c())}i=d,s=m,a=g,u=w,f=C,l=y}h(i,s,a,-f,u,n,o,l)}return{vertexData:s,indexData:a}}(g,u):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,C,b,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+C,x=w+b;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=C,w=b,null==m&&null==g&&(m=y,g=w),null!=h&&null!=f){C=t-h,b=e-f;const r=Math.sqrt(C*C+b*b);C/=r,b/=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=C,w=b,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,C=null,b=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}}(g),C=performance.now();return(0,n.A)("esri-2d-profiler")&&(l().info("I.1","_createFlowFieldFromData (ms)",Math.round(f-i)),l().info("I.2","_getStreamlines (ms)",Math.round(m-f)),l().info("I.3","createAnimatedLinesData (ms)",Math.round(y-m)),l().info("I.4","create{Streamlines|Particles}Mesh (ms)",Math.round(C-y)),l().info("I.5","createFlowMesh (ms)",Math.round(C-i)),l().info("I.6","Mesh size (bytes)",w.vertexData.buffer.byteLength+w.indexData.buffer.byteLength)),await Promise.resolve(),(0,s.Te)(o),w}function h(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]]}}function f(t,e,r,n,o,s,a,l){const u=[],{raster:c,width:h,height:f,resolutionFactor:p}=l;let d=n,m=o,g=0,[y,w]=r(d,m);y*=e.velocityScale,w*=e.velocityScale;const C=Math.sqrt(y*y+w*w);let b,x;u.push({x:d,y:m,t:g,speed:C});for(let n=0;n<e.verticesPerLine;n++){let[n,o]=r(d,m);n*=e.velocityScale,o*=e.velocityScale;const l=Math.sqrt(n*n+o*o);if(l<e.minSpeedThreshold)return u;const y=t*n/l,w=t*o/l;if(d+=y*e.segmentLength,m+=w*e.segmentLength,e.wrapAround&&(d=(0,i.OS)(d,s[0])),g+=t*e.segmentLength/l,Math.acos(y*b+w*x)>e.maxTurnAngle)return u;if(e.collisions){let t=Math.round(d*p);const r=Math.round(m*p);if(e.wrapAround&&(t=(0,i.OS)(t,h)),t<0||t>h-1||r<0||r>f-1)return u;const n=c[r*h+t];if(-1!==n&&n!==a)return u;c[r*h+t]=a}u.push({x:d,y:m,t:g,speed:l}),b=y,x=w}return u}function p(t,e,r,n,o,i,s,a){const l=Math.round((.2+.6*s.getFloat())*t.verticesPerLine),u=t.verticesPerLine-l,c=f(-1,{...t,verticesPerLine:u},e,r,n,o,i,a),h=f(1,{...t,verticesPerLine:l},e,r,n,o,i,a),p=c.reverse();return p.splice(-1,1),p.concat(h)}function d(t,e,r,n,o={positions:[]}){if(t.density<=0)return[];const{positions:i}=o,s=[],l=new a.A,u=1/Math.max(t.lineCollisionWidth,1),c=Math.round(r*u),h=Math.round(n*u),d=new Int32Array(c*h);for(let t=0;t<d.length;t++)d[t]=-1;const m={raster:d,width:c,height:h,resolutionFactor:u},g={},y=t.lineSpacing/Math.sqrt(t.density),w=Math.floor(n/y),C=Math.floor(r/y);for(let t=0;t<w;t++){const e=t*y;for(let r=0;r<C;r++){const n=r*y;g[`${r}-${t}`]={x:n,y:e,positions:[]}}}for(const{x:t,y:e}of i){const r=g[`${Math.floor(t/y)}-${Math.floor(e/y)}`];r&&r.positions.push([t,e])}const b=[];for(const t in g){const e=g[t];if(0===e.positions.length)b.push({x:e.x,y:e.y,sort:.66+.33*l.getFloat(),stage:0});else{const[t]=e.positions.splice(0,1);b.push({x:t[0],y:t[1],sort:.33*l.getFloat(),stage:1});for(const[t,r]of e.positions)b.push({x:t,y:r,sort:.33+.33*l.getFloat(),stage:2})}}b.sort((t,e)=>t.sort-e.sort);for(const{x:o,y:i,stage:a}of b){const u=t.onlyForwardTracing?f(1,t,e,o,i,[r,n],s.length,m):p(t,e,o,i,[r,n],s.length,l,m);u.length<2||s.push({stage:a,vertices:u})}return s}},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:()=>b,Nh:()=>x,Pg:()=>C,RP:()=>h,WF:()=>c,_N:()=>v,eH:()=>y,f4:()=>w,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=x(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,e,r){let{min:n,max:o,count:i,avg:s,mode:a,median:l}=function(t,e,r=!1,n=!1){let o=1/0,i=-1/0,s=0,a=0,l=0,u=0;const c=t.length,h=new Map;for(let r=0;r<c;r++){const n=t[r];if(!e||e[r]){const t=(h.get(n)??0)+1;h.set(n,t),t>u&&(u=t,l=n),o=n<o?n:o,i=n>i?n:i,s+=n,a++}}const f=a>0?s/a:0;let p=o===i?o:void 0,d=o===i?o:void 0,m=o===i?o:void 0;if(r&&a>0&&a<2**24){let r=t.slice();if(e){let n=0;for(let o=0;o<c;o++){const i=t[o];e[o]&&(r[n++]=i)}}r=r.slice(0,a),r.sort((t,e)=>t-e);const o=a>>>1;p=a%2?r[Math.floor(o)]:(r[o-1]+r[o])/2,n&&(d=r[Math.floor(.25*a)],m=r[Math.floor(.75*a)])}return{min:o,max:i,count:a,avg:f,mode:l,median:p,quartile1:d,quartile3:m}}(t,e,!0);if(0===i)return{statistics:{min:0,max:0,avg:0,stddev:0,count:i,mode:0,median:0},histogram:null};const u={min:n,max:o,avg:s,mode:a,count:i,median:l},c=function(t,e,r,n=!1,o=!1){let i=0,s=0,a=0,l=0;for(let o=0;o<t.length;o++)if(!e||e[o]){const e=t[o]-r,u=e*e;if(i+=u,!n){const t=u*e;s+=t,a+=t*e}l++}if(l<2)return null;i/=l-1;const u=Math.sqrt(i);return n?{stddev:u}:(a/=l,{stddev:u,skewness:o?s*(l/((l-1)*(l-2)))/i**1.5:s/l/i**1.5,kurtosis:a/(i*i)})}(t,e,s,!r.includeSkewnessKurtosis);c&&(u.stddev=c.stddev,r.includeSkewnessKurtosis&&(u.skewness=c.skewness,u.kurtosis=c.kurtosis));const h=r?.histogramSize??256,f=!!r?.pixelType&&["u8","s8","u4","u2","u1"].includes(r.pixelType),p=!r?.skipHistograms;if(null==l){const r=g({band:t,mask:e,min:n,max:o,size:1e4,use8BitHistogram:f});if(l=function(t,e,r,n=50){const{counts:o,min:i,max:s,size:a}=r,l=o.reduce((t,e)=>t+e)*(n/=100);let u=0,c=0;for(;c<o.length&&(u+=o[c],!(u>=l+1));c++);const h=(s-i)/a,f=i+h*c,p=i+h*(c+1);if(1===h&&.5===Math.abs(i%1))return f+.5;const d=t.slice(0,o[c]).fill(0);for(let r=0,n=0;r<t.length;r++)if(!e||e[r]){const e=t[r];e>=f&&e<p&&(d[n++]=e)}d.sort((t,e)=>t-e);const m=u-Math.floor(l)-1;return d[Math.max(0,d.length-1-m)]}(t,e,r,50),p&&f&&256===h)return{statistics:u,histogram:r}}return p?{statistics:u,histogram:g({band:t,mask:e,min:n,max:o,size:h,use8BitHistogram:f&&256===h})}:{statistics:u,histogram:null}}function g(t){const{band:e,mask:r,min:n,max:o,use8BitHistogram:i}=t;if(i){const t=o-n+1,i=new Uint32Array(t);for(let t=0;t<e.length;t++)r&&!r[t]||i[e[t]-n]++;return{min:n-.5,max:o+.5,size:t,counts:i}}const s=t.size??256,a=new Uint32Array(s),l=(o-n)/s;if(0===l){const t=r?r.reduce((t,e)=>t+(e?1:0),0):e.length;return{min:n,max:o,size:1,counts:new Uint32Array(1).fill(t)}}const u=new Uint32Array(s+1),c=1/l;for(let t=0;t<e.length;t++)r&&!r[t]||u[Math.floor((e[t]-n)*c)]++;for(let t=0;t<s-1;t++)a[t]=u[t];return a[s-1]=u[s-1]+u[s],{min:n,max:o,size:s,counts:a}}function y(t,e){const{pixels:r,mask:n,pixelType:o,bandMasks:i}=t,s=r.map((t,r)=>m(t,i?.[r]??n,{pixelType:o,...e}));return{statistics:s.map(({statistics:t})=>t),histograms:s.map(({histogram:t})=>t)}}function w(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,C=0;for(let t=0;t<s.length;t++)y+=s[t],w+=t*s[t];const b=w/y;for(let t=0;t<s.length;t++)C+=s[t]*(t-b)**2;const x=Math.sqrt(C/(y-1)),v=(g-m)/s.length,A=(b+("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 C(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 b(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=w(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[g,y]=(0,i.hP)(l.pixelType);if(!u?.length){u=[];for(let t=0;t<p;t++)u.push([g,y,1,1]);"standardDeviation"===f&&(f="minMax")}switch(f){case"none":for(let t=0;t<p;t++)d[t]=g,m[t]=y;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 C,b,x;return"histogramEqualization"===f?((0,n.Lw)(h),b=h[0].size||256,C=0,a&&(x=h.map(t=>c(t)))):(b=t.max||255,C=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:b,minOutput:C,histogramLut:x},o)}function x(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 v(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 b=d.startsWith("u")||d.startsWith("s"),v=f&&f.length>=g,A=!!e.isRenderer;if(v){const t=x(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):b?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):b?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(31635),i=r(49186),s=r(25482),a=r(4718),l=r(53966),u=r(10107),c=r(79901),h=r(64108),f=r(4151),p=r(16019);let d=class extends s.o{static{n=this}static createEmptyBand(t,e){return new(n.getPixelArrayConstructor(t))(e)}static combineBandMasks(t){if(t.length<2)return t[0];const e=t[0].length,r=new Uint8Array(e).fill(255);for(let n=0;n<t.length;n++){const o=t[n];for(let t=0;t<e;t++)o[t]||(r[t]=0)}return r}static getPixelArrayConstructor(t){let e;switch(t){case"u1":case"u2":case"u4":case"u8":e=Uint8Array;break;case"u16":e=Uint16Array;break;case"u32":e=Uint32Array;break;case"s8":e=Int8Array;break;case"s16":e=Int16Array;break;case"s32":e=Int32Array;break;case"f32":case"c64":case"c128":case"unknown":e=Float32Array;break;case"f64":e=Float64Array}return e}constructor(t){super(t),this.width=null,this.height=null,this.pixelType="f32",this.validPixelCount=null,this.mask=null,this.maskIsAlpha=!1,this.premultiplyAlpha=!1,this.statistics=null,this.depthCount=1}castPixelType(t){if(!t)return"f32";let e=t.toLowerCase();return["u1","u2","u4"].includes(e)?e="u8":["unknown","u8","s8","u16","s16","u32","s32","f32","f64"].includes(e)||(e="f32"),e}getPlaneCount(){return this.pixels?.length}addData(t){if(!t.pixels||t.pixels.length!==this.width*this.height)throw new i.A("pixelblock:invalid-or-missing-pixels","add data requires valid pixels array that has same length defined by pixel block width * height");this.pixels||(this.pixels=[]),this.statistics||(this.statistics=[]),this.pixels.push(t.pixels),this.statistics.push(t.statistics??new 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.Cg)([(0,u.MZ)({json:{write:!0}})],d.prototype,"width",void 0),(0,o.Cg)([(0,u.MZ)({json:{write:!0}})],d.prototype,"height",void 0),(0,o.Cg)([(0,u.MZ)({json:{write:!0}})],d.prototype,"pixelType",void 0),(0,o.Cg)([(0,c.w)("pixelType")],d.prototype,"castPixelType",null),(0,o.Cg)([(0,u.MZ)({json:{write:!0}})],d.prototype,"validPixelCount",void 0),(0,o.Cg)([(0,u.MZ)({json:{write:!0}})],d.prototype,"mask",void 0),(0,o.Cg)([(0,u.MZ)({json:{write:!0}})],d.prototype,"maskIsAlpha",void 0),(0,o.Cg)([(0,u.MZ)({json:{write:!0}})],d.prototype,"pixels",void 0),(0,o.Cg)([(0,u.MZ)()],d.prototype,"premultiplyAlpha",void 0),(0,o.Cg)([(0,u.MZ)({json:{write:!0}})],d.prototype,"statistics",void 0),(0,o.Cg)([(0,u.MZ)({json:{write:!0}})],d.prototype,"depthCount",void 0),(0,o.Cg)([(0,u.MZ)({json:{write:!0}})],d.prototype,"noDataValues",void 0),(0,o.Cg)([(0,u.MZ)({json:{write:!0}})],d.prototype,"bandMasks",void 0),d=n=(0,o.Cg)([(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),[C,b]=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(31635),i=r(25482),s=r(4718),a=r(10107),l=(r(44208),r(53966),r(64108)),u=r(86738);let c=class extends i.o{constructor(){super(...arguments),this.blockWidth=void 0,this.blockHeight=void 0,this.compression=null,this.origin=null,this.firstPyramidLevel=null,this.maximumPyramidLevel=null,this.pyramidScalingFactor=2,this.pyramidBlockWidth=null,this.pyramidBlockHeight=null,this.isBsqTile=!1,this.isVirtualTileInfo=!1,this.tileInfo=null,this.transposeInfo=null,this.blockBoundary=null}static{n=this}clone(){return new n({blockWidth:this.blockWidth,blockHeight:this.blockHeight,compression:this.compression,origin:(0,s.o8)(this.origin),firstPyramidLevel:this.firstPyramidLevel,maximumPyramidLevel:this.maximumPyramidLevel,pyramidResolutions:(0,s.o8)(this.pyramidResolutions),pyramidScalingFactor:this.pyramidScalingFactor,pyramidBlockWidth:this.pyramidBlockWidth,pyramidBlockHeight:this.pyramidBlockHeight,isBsqTile:this.isBsqTile,isVirtualTileInfo:this.isVirtualTileInfo,tileInfo:(0,s.o8)(this.tileInfo),transposeInfo:(0,s.o8)(this.transposeInfo),blockBoundary:(0,s.o8)(this.blockBoundary)})}};(0,o.Cg)([(0,a.MZ)({type:Number,json:{write:!0}})],c.prototype,"blockWidth",void 0),(0,o.Cg)([(0,a.MZ)({type:Number,json:{write:!0}})],c.prototype,"blockHeight",void 0),(0,o.Cg)([(0,a.MZ)({type:String,json:{write:!0}})],c.prototype,"compression",void 0),(0,o.Cg)([(0,a.MZ)({type:u.A,json:{write:!0}})],c.prototype,"origin",void 0),(0,o.Cg)([(0,a.MZ)({type:Number,json:{write:!0}})],c.prototype,"firstPyramidLevel",void 0),(0,o.Cg)([(0,a.MZ)({type:Number,json:{write:!0}})],c.prototype,"maximumPyramidLevel",void 0),(0,o.Cg)([(0,a.MZ)({json:{write:!0}})],c.prototype,"pyramidResolutions",void 0),(0,o.Cg)([(0,a.MZ)({type:Number,json:{write:!0}})],c.prototype,"pyramidScalingFactor",void 0),(0,o.Cg)([(0,a.MZ)({type:Number,json:{write:!0}})],c.prototype,"pyramidBlockWidth",void 0),(0,o.Cg)([(0,a.MZ)({type:Number,json:{write:!0}})],c.prototype,"pyramidBlockHeight",void 0),(0,o.Cg)([(0,a.MZ)({json:{write:!0}})],c.prototype,"isBsqTile",void 0),(0,o.Cg)([(0,a.MZ)({type:Boolean,json:{write:!0}})],c.prototype,"isVirtualTileInfo",void 0),(0,o.Cg)([(0,a.MZ)({json:{write:!0}})],c.prototype,"tileInfo",void 0),(0,o.Cg)([(0,a.MZ)()],c.prototype,"transposeInfo",void 0),(0,o.Cg)([(0,a.MZ)({json:{write:!0}})],c.prototype,"blockBoundary",void 0),c=n=(0,o.Cg)([(0,l.$)("esri.layers.support.RasterStorageInfo")],c)},28435:(t,e,r)=>{r.d(e,{$Q:()=>R,$i:()=>G,AB:()=>l,Ew:()=>y,Hx:()=>m,J$:()=>D,L:()=>N,QF:()=>B,UK:()=>p,Wt:()=>A,Wy:()=>u,XU:()=>v,YD:()=>b,_F:()=>d,bL:()=>g,dK:()=>x,eH:()=>f,et:()=>s,lD:()=>L,qL:()=>h,z$:()=>S,z7:()=>M,zg:()=>c});var n=r(34727),o=r(14140),i=r(16019);const s=9,a="PixelID";function l(t){return null!=t&&t.pixels?.length>0}function u(t){if(!t?.length||t.some(t=>!l(t)))return null;if(1===t.length)return t[0]?.clone()??null;const e=t,{width:r,height:n,pixelType:i}=e[0];if(e.some(t=>t.width!==r||t.height!==n))return null;const s=e.map(({mask:t})=>t).filter(t=>null!=t);let a=null;s.length&&(a=new Uint8Array(r*n),a.set(s[0]),s.length>1&&b(s.slice(1),a));const u=[];e.forEach(({pixels:t})=>u.push(...t));const c=null!=a&&u.length===e.length?e.map(({width:t,height:e,mask:r})=>r??new Uint8Array(t*e).fill(255)):null,h=e.map(({statistics:t})=>t).filter(t=>t?.length),f=[];return h.forEach(t=>f.push(...t)),new o.A({pixelType:i,width:r,height:n,mask:a,bandMasks:c,pixels:u,statistics:f.length?f:null})}function c(t){if(!t)return;const e=t.colormap;if(!e||0===e.length)return;const r=e.sort((t,e)=>t[0]-e[0]),n=r[0][0]<0?r[0][0]:0,o=Math.max(256,r[r.length-1][0]-n+1),i=new Uint8Array(4*o),s=[],a=5===r[0].length;if(o>65536)return r.forEach(t=>{s[t[0]-n]=a?t.slice(1):t.slice(1).concat([255])}),{indexed2DColormap:s,offset:n,alphaSpecified:a};if(t.fillUnspecified){let t=r[0];for(let e=t[0]-n,s=0;e<o;e++)i[4*e]=t[1],i[4*e+1]=t[2],i[4*e+2]=t[3],i[4*e+3]=a?t[4]:255,e===t[0]-n&&(t=s===r.length-1?t:r[++s])}else for(let t=0;t<r.length;t++){const e=r[t],o=4*(e[0]-n);i[o]=e[1],i[o+1]=e[2],i[o+2]=e[3],i[o+3]=a?e[4]:255}return{indexedColormap:i,offset:n,alphaSpecified:a}}function h(t,e){if(!l(t))return t;if(!e||!e.indexedColormap&&!e.indexed2DColormap)return t;const r=t.clone(),n=r.pixels;let o=r.mask;const i=r.width*r.height;if(1!==n.length)return t;const{indexedColormap:s,indexed2DColormap:a,offset:u,alphaSpecified:c}=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]-u),g<u||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]-u),g<u||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=c,r}function f(t,e){if(!l(t))return null;const{pixels:r,mask:n}=t,i=r.length;let s=e.lut;const{offset:a}=e;s&&1===s[0].length&&(s=r.map(()=>s));const u=[],c=e.outputPixelType||"u8";for(let t=0;t<i;t++){const e=p(r[t],n,s[t],a||0,c);u.push(e)}const h=new o.A({width:t.width,height:t.height,pixels:u,mask:n,pixelType:c});return h.updateStatistics(),h}function p(t,e,r,n,i){const s=t.length,a=o.A.createEmptyBand(i,s);if(e)for(let o=0;o<s;o++)e[o]&&(a[o]=r[t[o]-n]);else for(let e=0;e<s;e++)a[e]=r[t[e]-n];return a}function d(t,e,r){if(!l(t))return;const{width:n,height:o,pixels:i,mask:s}=t,a=n*o,u=new Uint8Array(a);for(let t=1;t<=r.length;t++){const{bandId:e,ranges:n}=r[t-1],o=i[e];if(!o)continue;const l=1===n.length,[c,h]=n[0];for(let e=0;e<a;e++)if(!s||s[e]){const r=o[e];if(l)r>=c&&r<=h&&(u[e]=t);else for(let o=0;o<n.length;o++){const[i,s]=n[o];if(r>=i&&r<=s){u[e]=t;break}}}}const{pixels:c}=e;1===c.length&&(c[1]=c[0].slice(),c[2]=c[0].slice());const h=r.map(t=>t.color);if(e.mask){const t=e.mask;for(let e=0;e<a;e++)if(t[e]){t[e]=255;const r=u[e];if(r){const n=h[r-1];c[0][e]=n[0],c[1][e]=n[1],c[2][e]=n[2],t[e]=n[3]}}}else{const t=new Uint8Array(a).fill(255);for(let e=0;e<a;e++){const r=u[e];if(r){const n=h[r-1];c[0][e]=n[0],c[1][e]=n[1],c[2][e]=n[2],t[e]=n[3]}}e.mask=t}e.maskIsAlpha=!0}function m(t,e){if(!l(t))return null;const r=t.clone(),{pixels:n}=r,o=r.width*r.height,i=e.length,s=Math.floor(i/2),a=e[Math.floor(s)],u=n[0],c=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=u[t];let n=!1,o=s,l=a,d=0,m=i-1;for(;m-d>1;){if(r===l.value){n=!0;break}r>l.value?d=o:m=o,o=Math.floor((d+m)/2),l=e[Math.floor(o)]}n||(r===e[d].value?(l=e[d],n=!0):r===e[m].value?(l=e[m],n=!0):r<e[d].value?n=!1:r>e[d].value&&(r<e[m].value?(l=e[d],n=!0):m===i-1?n=!1:(l=e[m],n=!0))),n?(c[t]=l.mappedColor[0],h[t]=l.mappedColor[1],f[t]=l.mappedColor[2],p[t]=l.mappedColor[3]):c[t]=h[t]=f[t]=p[t]=0}return r.pixels=[c,h,f],r.mask=p,r.pixelType="u8",r.maskIsAlpha=d,r}function g(t,e,r=!1){const o=1e-5,i=new Float32Array(3*s),a=e.length;for(let l=0;l<s;l++)i[3*l]=t[2*l]??n.pq-1,i[3*l+1]=t[2*l+1]??n.pq,i[3*l+2]=e[l]??0,l<a&&(l>0&&(i[3*l]-=o),t[2*l+1]!==t[2*l]&&(l<a-1||!r)&&(i[3*l+1]-=o));return i}function y(t,e){if(!l(t))return null;const{width:r,height:n}=t,{inputRanges:s,outputValues:a,outputPixelType:u,noDataRanges:c,allowUnmatched:h,replacementValue:f,isLastInputRangeInclusive:p}=e,d=t.pixels[0],m=o.A.createEmptyBand(u,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,C=s.map(t=>t-w);C[0]=s[0],C[C.length-1]=s[s.length-1]+(p?1e-6:0);const b=s.length/2,[x,v]=(0,i.hP)(u);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=b-1;r>=0;r--)if(t===s[2*r]||t>C[2*r]&&t<C[2*r+1]){m[n]=a[r],e=!0;break}e||(h?m[n]=t>v?v:t<x?x:f??t:y[n]=0)}}const A=c?.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>=c[e]&&t<=c[e+1]){m[n]=0,y[n]=0;break}}}return new o.A({width:r,height:n,pixelType:u,pixels:[m],mask:y})}function w(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;e??=new Uint8Array(r).fill(255);for(let n=0;n<r;n++)if(e[n]){let r=!1;for(let e=0;e<t.length;e++)if(t[e][n]){r=!0;break}r||(e[n]=0)}return e}function b(t,e){const r=t[0].length;e??=new Uint8Array(r).fill(255);for(let n=0;n<r;n++)if(e[n]){let r=!1;for(let e=0;e<t.length;e++)if(0===t[e][n]){r=!0;break}r&&(e[n]=0)}return e}function x(t,e){if(!l(t))return null;const{width:r,height:n,pixels:i}=t,s=r*n,a=new Uint8Array(s);t.mask?a.set(t.mask):a.fill(255);const u=i.length,{includedRanges:c,noDataValues:h,outputPixelType:f,matchAll:d,lookups:m}=e;if(m){const t=[];for(let e=0;e<u;e++){const r=m[e],n=p(i[e],a,r.lut,r.offset||0,"u8");t.push(n)}1===t.length?a.set(t[0]):d?C(t,a):b(t,a)}else if(d){const t=[];for(let e=0;e<u;e++){const r=new Uint8Array(s);r.set(a),w(i[e],c?.slice(2*e,2*e+2),h?.[e],r),t.push(r)}1===t.length?a.set(t[0]):C(t,a)}else for(let t=0;t<u;t++)w(i[t],c?.slice(2*t,2*t+2),h?.[t],a);return new o.A({width:r,height:n,pixelType:f,pixels:i,mask:a})}function v(t){const{srcPixelType:e,inputRanges:r,outputValues:n,allowUnmatched:s,noDataRanges:a,isLastInputRangeInclusive:l,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=o.A.createEmptyBand(u,c),p=new Uint8Array(c);s&&p.fill(255);const[d,m]=(0,i.hP)(u);if(r?.length&&n?.length){const t=1e-6,e=r.map(e=>e-t);e[0]=r[0],l&&(e[e.length-1]=r[r.length-1]);for(let t=0;t<e.length;t++){const o=n[t]>m?m:n[t]<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(a?.length)for(let t=0;t<a.length;t++){const e=Math.ceil(a[2*t]-h),r=Math.floor(a[2*t+1]-h);for(let t=e;t<=r;t++)p[t]=0}return{lut:f,offset:h,mask:p}}function A(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 k(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 M(t,e,r={}){const{clipOffset:n,clipSize:i,alignmentInfo:s,blockWidths:a}=r;if(a)return function(t,e,r){const n=t.find(t=>null!=t);if(null==n)return null;const i=t.some(t=>null==t||!!t.mask),{width:s,height:a}=e,u=i?new Uint8Array(s*a):null,{blockWidths:c}=r,h=[],f=n.getPlaneCount(),p=o.A.getPixelArrayConstructor(n.pixelType);if(i)for(let e=0,r=0;e<t.length;r+=c[e],e++){const n=t[e];if(!l(n))continue;const o=n.mask;for(let t=0;t<a;t++)for(let i=0;i<c[e];i++)u[t*s+i+r]=null==o?255:o[t*n.width+i]}const d=t.some(t=>t?.bandMasks&&t.bandMasks.length>1),m=d?[]:void 0,g=s*a;for(let e=0;e<f;e++){const r=new p(g),n=d?new Uint8Array(g):void 0;for(let o=0,i=0;o<t.length;i+=c[o],o++){const u=t[o];if(!l(u))continue;const h=u.pixels[e];if(null!=h){for(let t=0;t<a;t++)for(let e=0;e<c[o];e++)r[t*s+e+i]=h[t*u.width+e];if(n){const t=u.bandMasks?.[e]??u.mask;for(let e=0;e<a;e++)for(let r=0;r<c[o];r++)n[e*s+r+i]=t?t[e*u.width+r]:255}}}h.push(r),m&&n&&m.push(n)}const y=new o.A({width:s,height:a,mask:u,bandMasks:m,pixels:h,pixelType:n.pixelType});return y.updateStatistics(),y}(t,e,{blockWidths:a});const u=t.find(t=>l(t));if(null==u)return null;const c=i?i.width:e.width,h=i?i.height:e.height,f=u.width,p=u.height,d=e.width/f,m=e.height/p,g={offset:n||{x:0,y:0},mosaic:i||e,block:{width:f,height:p}},y=u.pixelType,w=o.A.getPixelArrayConstructor(y),C=u.pixels.length,b=[];let x,v;for(let e=0;e<C;e++){v=new w(c*h);for(let r=0;r<m;r++)for(let n=0;n<d;n++){const o=t[r*d+n];l(o)&&(x=o.pixels[e],k(v,x,g,n,r,s))}b.push(v)}const A=t.some(t=>null==t||null!=t.mask&&t.mask.length>0),M=t.some(t=>t?.bandMasks&&t.bandMasks.length>1),S=A?new Uint8Array(c*h):void 0,T=M?[]: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;k(S,null!=o?o:n?255:0,g,r,e,s)}if(T)for(let e=0;e<C;e++){const r=new Uint8Array(c*h);for(let n=0;n<m;n++)for(let o=0;o<d;o++){const i=t[n*d+o],a=i?.bandMasks?.[e]??i?.mask;k(r,null!=a?a:i?255:0,g,o,n,s)}T.push(r)}}const I=new o.A({width:c,height:h,pixels:b,pixelType:y,bandMasks:T,mask:S});return I.updateStatistics(),I}function S(t,e,r){if(!l(t))return null;const{width:n,height:o}=t,i=e.x,s=e.y,a=r.width+i,u=r.height+s;if(i<0||s<0||a>n||u>o)return t;if(0===i&&0===s&&a===n&&u===o)return t;t.mask||(t.mask=new Uint8Array(n*o));const c=t.mask;for(let t=0;t<o;t++){const e=t*n;for(let r=0;r<n;r++)c[e+r]=t<s||t>=u||r<i||r>=a?0:1}return t.updateStatistics(),t}function T(t){if(!l(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;E(e,i[o],a?a[o]:1)}s[t*r]=I(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;E(e,i[o],a?a[o]:1),o=(t-1)*r+n+1,E(e,i[o],a?a[o]:1),o=t*r+n+1,E(e,i[o],a?a[o]:1),o=(t+1)*r+n+1,E(e,i[o],a?a[o]:1),o=(t-2)*r+n-3,P(e,i[o],a?a[o]:1),o=(t-1)*r+n-3,P(e,i[o],a?a[o]:1),o=t*r+n-3,P(e,i[o],a?a[o]:1),o=(t+1)*r+n-3,P(e,i[o],a?a[o]:1),s[t*r+n]=I(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 I(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 P(t,e,r){if(0===r)return;const n=t.get(e);1===n?t.delete(e):t.set(e,n-1)}function E(t,e,r){0!==r&&t.set(e,t.has(e)?t.get(e)+1:1)}function R(t,e,r){let{x:n,y:i}=e;const{width:s,height:a}=r;if(0===n&&0===i&&a===t.height&&s===t.width)return t;const{width:u,height:c}=t,h=Math.max(0,i),f=Math.max(0,n),p=Math.min(n+s,u),d=Math.min(i+a,c);if(p<0||d<0||!l(t))return null;n=Math.max(0,-n),i=Math.max(0,-i);const{pixels:m}=t,g=s*a,y=m.length,w=[];for(let e=0;e<y;e++){const r=m[e],a=o.A.createEmptyBand(t.pixelType,g);for(let t=h;t<d;t++){const e=t*u;let o=(t+i-h)*s+n;for(let t=f;t<p;t++)a[o++]=r[e+t]}w.push(a)}const C=new Uint8Array(g),b=t.mask;for(let t=h;t<d;t++){const e=t*u;let r=(t+i-h)*s+n;for(let t=f;t<p;t++)C[r++]=b?b[e+t]:1}const x=new o.A({width:r.width,height:r.height,pixelType:t.pixelType,pixels:w,mask:C});return x.updateStatistics(),x}function U(t,e=!0){if(!l(t))return null;const{pixels:r,width:n,height:i,mask:s,pixelType:a}=t,u=[],c=Math.round(n/2),h=Math.round(i/2),f=i-1,p=n-1;for(let t=0;t<r.length;t++){const s=r[t],l=o.A.createEmptyBand(a,c*h);let d=0;for(let t=0;t<i;t+=2)for(let r=0;r<n;r+=2){const o=s[t*n+r];if(e){const e=r===p?o:s[t*n+r+1],i=t===f?o:s[t*n+r+n],a=r===p?i:t===f?e:s[t*n+r+n+1];l[d++]=(o+e+i+a)/4}else l[d++]=o}u.push(l)}let d=null;if(null!=s){d=new Uint8Array(c*h);let t=0;for(let r=0;r<i;r+=2)for(let o=0;o<n;o+=2){const i=s[r*n+o];if(e){const e=o===p?i:s[r*n+o+1],a=r===f?i:s[r*n+o+n],l=o===p?a:r===f?e:s[r*n+o+n+1];d[t++]=i*e*a*l?1:0}else d[t++]=i}}return new o.A({width:c,height:h,pixelType:a,pixels:u,mask:d})}function L(t,e,r=0,n=!0){if(!l(t))return null;const{width:o,height:i}=e;let{width:s,height:a}=t;const u=new Map,c={x:0,y:0},h=1+r;let f=t;for(let t=0;t<h;t++){const r=Math.ceil(s/o),l=Math.ceil(a/i);for(let n=0;n<l;n++){c.y=n*i;for(let i=0;i<r;i++){c.x=i*o;const r=R(f,c,e);u.set(`${t}/${n}/${i}`,r)}}t<h-1&&(f=U(f,n)),s=Math.round(s/2),a=Math.round(a/2)}return u}function D(t){const{pixelBlock:e,tileSize:r,level:n,row:o,col:i,useBilinear:s}=t;if(!l(e))return null;const{width:a,height:u}=r,c=2**n,h=c*a,f=c*u;let p=R(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 O(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,C;const b=h*u,x=b*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],C=r[p+5];for(let r=0;r<c;r++){I=(t*c+r)*b+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+C)*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],C=r[p+5];for(let r=0;r<c;r++){I=(t*c+r)*b+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+C)*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:b}}function B(t,e){const{coefficients:r,spacing:n}=e,{offsets_x:o,offsets_y:i,gridWidth:s}=O(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 G(t,e,r,n,i="nearest"){if(!l(t))return null;"majority"===i&&(t=T(t));const{pixels:s,mask:a,bandMasks:u,pixelType:c}=t,h=t.width,f=t.height,p=o.A.getPixelArrayConstructor(c),d=s.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:C,offsets_xi:b,offsets_yi:x,gridWidth:v}=O({width:h,height:f},e,r,n,"majority"===i?.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||C[A]<0)t[i*m+s]=0;else if(n)t[i*m+s]=e[b[A]+x[A]*h];else{const n=Math.floor(w[A]),a=Math.floor(C[A]),l=Math.ceil(w[A]),u=Math.ceil(C[A]),c=w[A]-n,f=C[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[b[A]+x[A]*h]}A++}}},M=[];let S;const I=u?.length===d,P=[];for(let t=0;t<d;t++){if(I){const e=new Uint8Array(m*g);k(e,u[t],u[t],!0),P.push(e)}S=new p(m*g),k(S,s[t],I?u[t]:a,"nearest"===i||"majority"===i),M.push(S)}const E=new o.A({width:m,height:g,pixelType:c,pixels:M,bandMasks:I?P:void 0});if(null!=a)E.mask=new Uint8Array(m*g),k(E.mask,a,a,!0);else if(y){E.mask=new Uint8Array(m*g);for(let t=0;t<m*g;t++)E.mask[t]=w[t]<0||C[t]<0?0:1}return E.updateStatistics(),E}function N(t){const{pixelBlock:e,extent:r,fieldNames:n,skipFactor:o,skipSpatialReference:i=!1,pixelIdOffset:s=0}=t,l=[],{width:u,height:c,pixels:h,mask:f}=e,p=t.imageRowSize??u,d=r.width/u,m=r.height/c,g=h.length,y=Math.floor(o/2),{xmin:w,ymax:C}=r,b=i?void 0:r.spatialReference.toJSON();for(let t=y;t<c;t+=o)for(let e=y;e<u;e+=o){const r=t*u+e;if(!f||f[r]){const o={x:w+(e+.5)*d,y:C-(t+.5)*m,spatialReference:b},i={[a]:s+t*p+e};for(let t=0;t<g;t++)i[n[t+1]]=h[t][r];l.push({geometry:o,attributes:i})}}return l}},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),C=Math.sin(m)*Math.sin(y);const b=[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?b.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=b[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),C=Math.sin(m)*Math.sin(y),S[t]=g,T[t]=w,I[t]=C;else S.fill(g),T.fill(w),I.fill(C);return{resolution:u,factor:[p,d],sinZcosA:w,sinZsinA:C,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,C,b,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],C=l[n+1]?u[n+1]:u[n],b=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],C=u[n+1],b=u[n+r-1],x=u[n+r],v=u[n+r+1];if(c[n]=y+C+C+v-(m+w+w+b),h[n]=b+x+x+v-(m+g+g+y),null!=f){const t=u[n],e=.5*(w+C)-t,r=.5*(g+x)-t;if("standard"===d)f[n]=-p*(e+r);else{const t=(-m+y+b-v)/4,o=(-w+C)/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,C="traditional"===e.hillshadeType,{width:b,height:x}=t,v=new Uint8Array(b*x),{dzxs:A,dzys:k,outMask:M}=u(t);for(let t=s;t<x-s;t++){const e=t*b;for(let t=s;t<b-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(C){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,b,x),new n.A({width:b,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:C}=u(t),{width:b,height:x}=t,v=new Float32Array(b*x);for(let t=s;t<x-s;t++){const e=t*b;for(let t=s;t<b-s;t++){const r=e+t;if(!C||C[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,b,x);const A=new n.A({width:b,height:x,pixels:[v],mask:C,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:()=>V,XO:()=>L,r9:()=>O,s$:()=>_,uT:()=>F,uc:()=>U,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 C(t,e){return t.get(e)?.values?.[0]}function b(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,C,b,x=0,v=0;for(let r=0;r<a;r++){y=new DataView(t,d+u*r,u),w=y.getUint16(0,e),b=y.getUint16(2,e),C=(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:b,valueCount:x,valueOffset:v,valueOffsets:s,values:null},R(t,e,g,n,!1,i),m.set(C,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=b(r,"BITSPERSAMPLE"),c=b(r,"SAMPLESPERPIXEL")??1,h=b(r,"PHOTOMETRICINTERPRETATION"),f=b(r,"SAMPLEFORMAT")??1,p=d(f,l),g=b(r,"COMPRESSION")??1,y=m(p);let w,C,x;if(34887===g)return await(0,i.Hh)(),v(t,n);if(1===g)w=t.slice(n,n+o),C=new Uint8Array(w);else if(8===g||32946===g)C=new Uint8Array(t,n,o),C=M(C),w=C.buffer;else if(6===g)C=new Uint8Array(t,n,o),C=k(C,c,h),w=C.buffer;else if(7===g){const e=r.get("JPEGTABLES").values,i=e.length-2;C=new Uint8Array(i+o-2);for(let t=0;t<i;t++)C[t]=e[t];const s=new Uint8Array(t,n+2,o-2);for(let t=0;t<s.length;t++)C[i+t]=s[t];C=k(C,c,h),w=C.buffer}else{if(5!==g)throw new Error("tiff-decode: unsupport compression "+g);C=(0,s.D)(t,n,o,e),w=C.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(C.buffer,t))}const T=b(r,"PREDICTOR")??1,I=b(r,"TILEWIDTH"),P=b(r,"TILELENGTH");if(T>1&&(5===g||8===g||32946===g)&&I&&P){const t=L(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}=U([r]),c=b(r,"SAMPLESPERPIXEL")||e.planes,h=b(r,"PHOTOMETRICINTERPRETATION"),f=i*a,p=b(r,"BITSPERSAMPLE"),d=m(l),g=new d(f*c),y=w(r,"STRIPBYTECOUNTS"),C=b(r,"ROWSPERSTRIP"),x=b(r,"COMPRESSION")??1;let v,S,T,I,P,E,R,L,D;if(p%8==0)for(v=0;v<o.length;v++){if(P=v*(C*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]),L=M(R),E=L.buffer):(E=new ArrayBuffer(y[v]),R=new Uint8Array(t,o[v],y[v]),L=new Uint8Array(E)),l){case"u16":case"s16":for(T=0;T<R.length;T+=2)L[T]=R[T+1],L[T+1]=R[T];break;case"u32":case"s32":case"f32":for(T=0;T<R.length;T+=4)L[T]=R[T+3],L[T+1]=R[T+2],L[T+2]=R[T+1],L[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,C=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=C?.length?C[0]:l>>>0,e=C?.length?C[1]:Math.round((l-t)/f);m<=32?(l=t>>>32-m,C[0]=l):(l=t*2**(32-m)+(e>>>32-m),C[0]=t,C[1]=e>>>32-m)}if(1===a&&p===w)u=[l];else if(64===w){const t=C?.length?C[0]:l>>>0,e=C?.length?C[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 U(t){const e=t[0],r=b(e,"TILEWIDTH"),n=b(e,"TILELENGTH"),o=b(e,"IMAGEWIDTH"),i=b(e,"IMAGELENGTH"),s=b(e,"BITSPERSAMPLE"),a=b(e,"SAMPLESPERPIXEL"),l=b(e,"SAMPLEFORMAT")??1,u=d(l,s),c=L(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=b(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=C(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,U,B=!1,G=!1;if(P){B=2===b(P,"GTRasterTypeGeoKey");const t=b(P,"GTModelTypeGeoKey");if(2===t){const t=b(P,"GeographicTypeGeoKey");t>=1024&&t<=32766&&(M={wkid:t}),M||32767!==t||(G=!0,M={wkid:4326})}else if(1===t){const t=b(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;U={xmin:r,xmax:s,ymin:n,ymax:a,spatialReference:M}}else U={xmin:-.5,ymin:.5-i,xmax:o-.5,ymax:.5,spatialReference:M};G&&(U.xmax-U.xmin>400||Math.max(Math.abs(U.xmin),Math.abs(U.xmax))>361)&&(M=null,U.spatialReference=null);const N=D(t);let F,V,_,j,W;if(N.length>0){_=Math.round(Math.log(o/b(N[0],"IMAGEWIDTH"))/Math.LN2);const t=N[N.length-1];j=N.length,F=b(t,"TILEWIDTH"),V=b(t,"TILELENGTH")}F=null!=j&&j>0?F||r:null,V=null!=j&&j>0?V||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(b(t,"IMAGEWIDTH")/b(t,"TILEWIDTH"))-1,maxRow:Math.ceil(b(t,"IMAGELENGTH")/b(t,"TILELENGTH"))-1,minRow:0,minCol:0})}));const Z=C(t[0],"GDAL_METADATA"),H=E(Z);A+=" "+z({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/b(t,"IMAGEWIDTH"),y:i/b(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:U,isPseudoGeographic:G,affine:T?null:R,firstPyramidLevel:_,maximumPyramidLevel:j,pyramidBlockWidth:F,pyramidBlockHeight:V,tileBoundary:W,metadata:H}}function L(t,e){const r=y(t,"PLANARCONFIGURATION");return r?2===r[0]:!!e&&e.isBSQ}function D(t){return t.filter(t=>1===b(t,"NEWSUBFILETYPE"))}function O(t){return t.filter(t=>{const e=!(4&~(b(t,"NEWSUBFILETYPE")??0)),r=4===b(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 F(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 V(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 z(t){const{width:e,height:r,tileHeight:n,tileWidth:o}=t,i=t.planes,s=o?o*n:e*r,a=b(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 _(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=L(n,r),u=b(n,"BITSPERSAMPLE"),c=d(b(n,"SAMPLEFORMAT")??1,u),h=b(n,"SAMPLESPERPIXEL")||r.planes,f=m(c),p=b(n,"TILEWIDTH"),g=b(n,"TILELENGTH"),y=b(n,"COMPRESSION")??1,w=p*g;let C;const x=[];let v=s[0];const A=34887===y;for(let t=0;t<h;t++){if(C=new f(w),s.length===h)v=s[t],v.length===w&&(C=v);else if(v.length)if(l||A)C=v.length===w?v:v.slice(w*t,w*(t+1));else for(let e=0;e<w;e++)C[e]=v[e*h+t];x.push(C)}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}=F(t);let o=n;const i=[];do{const n=V(t,e,o,0,l.NB,r?8:4);if(!n.success)break;i.push(n.ifd),o=n.nextIFD}while(o>0);return{...U(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=z(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}=U([r]),c=L(r,e),h=b(r,"SAMPLESPERPIXEL")||e.planes,f=i*s,p=b(r,"BITSPERSAMPLE"),d=34887===(b(r,"COMPRESSION")??1),g=m(a),y=[];for(let t=0;t<h;t++)y.push(new g(f));let C,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(C=0;C<a;C++){M=Math.floor(C/B)*u,S=C%B*l,I=M*i+S;for(let a=0;a<h;a++){const c=C*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(C=0;C<n.length;C++)for(M=Math.floor(C/B)*u,S=C%B*l,I=M*i+S,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),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,C,b,x,v,A,k,M]=d,S={version:g,depthCount:k,width:w,height:C,validPixelCount:x,bandCount:b,blobSize:v,maskCount:A,dataType:y,minValue:m[0],maxValue:m[1],maxZerror:m[2],statistics:[],bandCountWithNoData:M};if(M&&k>1)return r(s),S;if(1===k&&1===b)return r(s),S.statistics.push({minValue:m[0],maxValue:m[1]}),S;const T=k*b*8,I=new Uint8Array(T),P=new Uint8Array(T);let E=s,R=0,U=0,L=!1;if(c.byteLength<s+2*T?(r(s),L=!0,[E,R,U]=f([t.length,T,T]),c.set(t,E)):[R,U]=f([T,T]),c.set(I,R),c.set(P,U),p=i(E,t.length,k,b,R,U),p)throw r(E),L||r(R),new Error(`lerc-getDataRanges: error code is ${p}`);c=new Uint8Array(h.buffer),l(c,R,I),l(c,U,P);const D=new Float64Array(I.buffer),O=new Float64Array(P.buffer),B=S.statistics;for(let t=0;t<b;t++)if(k>1){const e=D.slice(t*k,(t+1)*k),r=O.slice(t*k,(t+1)*k),n=Math.min.apply(null,e),o=Math.max.apply(null,r);B.push({minValue:n,maxValue:o,depthStats:{minValues:e,maxValues:r}})}else B.push({minValue:D[t],maxValue:O[t]});return r(E),L||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),C=y*i*a*g.size,b=new Uint8Array(C),x=new Uint8Array(a),v=new Uint8Array(8*a),[A,k,M,S,T]=f([t.length,w.length,b.length,x.length,v.length]);c.set(t,A),c.set(w,k),c.set(b,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,b),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:b,maskData:w,noDataValues:P}}}(t)}),i)}const a={getBlobInfo:null,decode:null};function l(t,e,r){r.set(t.slice(e,e+r.length))}function 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],C=new w.ctor(s.buffer),b=[],x=[],v=h*f,A=v*d;for(let t=0;t<p;t++){const r=C.subarray(t*A,(t+1)*A);if(e.returnInterleaved)b.push(r);else{const t=u(r,v,d,w.ctor);b.push(t)}x.push(l.subarray(t*A,(t+1)*A))}const k=0===g?null:1===g?x[0]:new Uint8Array(v);if(g>1){k.set(x[0]);for(let t=1;t<x.length;t++){const e=x[t];for(let t=0;t<v;t++)k[t]=k[t]&e[t]}}const{noDataValue:M}=e,S=null!=M&&w.range[0]<=M&&w.range[1]>=M;if(g>0&&S)for(let t=0;t<p;t++){const e=b[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:b,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}}},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 C(e){for(var r=e;;){if("number"==typeof(r=r[w()]))return r;if("object"!=typeof r)throw new t("invalid huffman sequence")}}function b(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=b(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,U,L=i.length;U=p?0===a?0===u?function(t,e){var r=C(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=C(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=b(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=C(r.huffmanTableAC))>>4,0==(o=15&i))h<15?(A=b(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=C(t.huffmanTableDC),o=0===n?0:x(n);t.blockData[r]=t.pred+=o;for(var i=1;i<64;){var s=C(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===L?i[0].blocksPerLine*i[0].blocksPerColumn:h*o.mcusPerColumn;N<O;){var F=s?Math.min(O-N,s):O;for(I=0;I<L;I++)i[I].pred=0;if(A=0,1===L)for(T=i[0],R=0;R<F;R++)S(T,U,N),N++;else for(R=0;R<F;R++){for(I=0;I<L;I++)for(B=(T=i[I]).h,G=T.v,P=0;P<G;P++)for(E=0;E<B;E++)M(T,U,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 V=D&&D.marker;if(!V||V<=65280)throw new t("marker was not found");if(!(V>=65488&&V<=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,C,b,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)b=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],b*=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*b+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=(C=(C=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+C*o+2048>>12,g=g*o-C*i+2048>>12,C=I,I=y*n+w*r+2048>>12,y=y*r-w*n+2048>>12,w=I,h[R]=f+C,h[R+7]=f-C,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*b+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 U=0;U<8;++U)b=h[U],0!==((x=h[U+8])|(v=h[U+16])|(A=h[U+24])|(k=h[U+32])|(M=h[U+40])|(S=h[U+48])|(T=h[U+56]))?(p=(f=4112+((f=l*b+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=(C=(C=u*(x+T)+2048>>12)+(y=A)+1>>1)-y,I=g*i+C*o+2048>>12,g=g*o-C*i+2048>>12,C=I,I=y*n+w*r+2048>>12,y=y*r-w*n+2048>>12,b=(b=(f=f+m+1>>1)+C)<16?0:b>=4080?255:b>>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-C)<16?0:T>=4080?255:T>>4,E[c+U]=b,E[c+U+8]=x,E[c+U+16]=v,E[c+U+24]=A,E[c+U+32]=k,E[c+U+40]=M,E[c+U+48]=S,E[c+U+56]=T):(I=(I=l*b+8192>>14)<-2040?0:I>=2024?255:I+2056>>4,E[c+U]=I,E[c+U+8]=I,E[c+U+16]=I,E[c+U+24]=I,E[c+U+32]=I,E[c+U+40]=I,E[c+U+48]=I,E[c+U+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 C,b,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(b=0;b<64;b++)M[e[b]]=n()}else for(b=0;b<64;b++)M[e[b]]=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(C=0;C<T;C++){S=r[l];var E=r[l+1]>>4,R=15&r[l+1];I<E&&(I=E),P<R&&(P=R);var U=r[l+2];x=s.components.push({h:E,v:R,quantizationId:U,quantizationTable:null}),s.componentIds[S]=x-1,l+=3}s.maxH=I,s.maxV=P,i(s);break;case 65476:var L=n();for(C=2;C<L;){var D=r[l++],O=new Uint8Array(16),B=0;for(b=0;b<16;b++,l++)B+=O[b]=r[l];var G=new Uint8Array(B);for(b=0;b<B;b++,l++)G[b]=r[l];C+=17+B,(D>>4?d:y)[15&D]=h(O,G)}break;case 65501:n(),a=n();break;case 65498:n();var N,F=r[l++],V=[];for(C=0;C<F;C++){var z=s.componentIds[r[l++]];N=s.components[z];var _=r[l++];N.huffmanTableDC=y[_>>4],N.huffmanTableAC=d[15&_],V.push(N)}var j=r[l++],W=r[l++],Z=r[l++],H=p(r,l,s,V,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=[],C=0;C<s.components.length;C++){var q=f[(N=s.components[C]).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),C=new Uint32Array(t),b=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,C[s]=(u&b)<<3|7&u;for(a=0;a<e;a++)for(h=i*((u=0|a*o)&b)|(7&u)<<3,s=0;s<t;s++)w[m]=f[h+C[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}if(t.weights?.length)return;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 C=[];for(let t=0;t<n-1;t++)C.push({h:w,s:g,v:y}),w=(w+f+p)%p,g+=d,y+=m;return C.push(s?{h:w,s:g,v:y}:e),C}((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,C=((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+C*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??=r.map(({start:t,stop:e})=>null==t||null==e?-1:e-t),e.length!==r.length||e.some(t=>t<0))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 C(t){const e=(0,n.N2)(t);return{type:"HsvColor",Hue:e.h,Saturation:e.s,Value:e.v,AlphaValue:255}}function b(t){const e=t.toJSON();return{Algorithm:e?.Algorithm||"esriHSVAlgorithm",type:"AlgorithmicColorRamp",FromColor:C(t.fromColor),ToColor:C(t.toColor)}}function x(t){const e=f(t);if(!e)return null;if("algorithmic"===t.type)return{...b(t),Name:e};if(t.colorRamps){const r=t.colorRamps.map(b);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 C=this.getCode(m);16==C?t(this,w,2,3,g):17==C?t(this,w,3,3,g=0):18==C?t(this,w,7,11,g=0):w[d++]=g=C}l=this.generateHuffmanTable(w.slice(0,c)),u=this.generateHuffmanTable(w.slice(c,y))}else s("Unknown block type in flate stream");for(var b=(U=this.buffer)?U.length:0,x=this.bufferLength;;){var v=this.getCode(l);if(v<256)x+1>=b&&(b=(U=this.ensureBuffer(x+1)).length),U[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>=b&&(b=(U=this.ensureBuffer(x+g)).length);for(var M=0;M<g;++M,++x)U[x]=U[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,U=this.ensureBuffer(R+P),L=R+P;this.bufferLength=L;for(var D=R;D<L;++D){if(void 0===(S=T[I++])){this.eof=!0;break}U[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"}},77649:(t,e,r)=>{r.d(e,{D:()=>V,g:()=>F});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),m=r(2741);const g=new Set(["uint8","int8","uint16","int16","uint32","int32","int64","uint64"]),y=new Map([["uint8",{byteCount:1,ctor:Uint8Array}],["int8",{byteCount:1,ctor:Int8Array}],["uint16",{byteCount:2,ctor:Uint16Array}],["int16",{byteCount:2,ctor:Int16Array}],["uint32",{byteCount:4,ctor:Uint32Array}],["int32",{byteCount:4,ctor:Int32Array}],["uint64",{byteCount:8,ctor:BigUint64Array}],["int64",{byteCount:8,ctor:BigInt64Array}]]);let w;function C(){return w??=r.e(6154).then(r.bind(r,56154)).then(({default:t})=>t({locateFile:t=>(0,m.s)(`esri/layers/support/rasterFormats/${t}`)})).then(t=>{!function(t){const{_GetInfo:e,_decode:r,_malloc:n,_free:o,writeArrayToMemory:i,UTF8ToString:s}=t;b.getBlobInfo=t=>{t.length>1e3&&(t=t.slice(0,1e3));const r=n(t.length);i(t,r);const a=e(r,t.length);if(o(r),!a)return null;const l=s(a);o(a);try{const t=JSON.parse(l);return{width:t.xsize,height:t.ysize,bandCount:t.nbands,dataType:t.dtype,mode:t.mode,bandMap:t.bandmap}}catch{return null}},b.decode=(e,n)=>{const{dataType:o,width:i,height:s,bandCount:a}=n;if(!g.has(o))throw new Error("Unsupported data type: "+o);const{_malloc:l,_free:u}=t,c=l(e.length);t.writeArrayToMemory(e,c);const{ctor:h,byteCount:f}=x(o),p=i*s*a*f,d=l(p),m=l(1024);if(0===r(c,e.length,d,m))throw u(c),u(d),u(m),new Error("Decoding failed: "+t.UTF8ToString(m));const y=new h(t.HEAPU8.slice(d,d+p).buffer);if(u(c),u(d),u(m),y instanceof BigInt64Array||y instanceof BigUint64Array){const t=new Float64Array(y.length);for(let e=0;e<y.length;e++)t[e]=Number(y[e]);return t}return y}}(t)}),w}const b={getBlobInfo:null,decode:null};function x(t){if(!y.has(t))throw new Error("Unsupported data type: "+t);return y.get(t)}function v(t){const e=new Uint8Array(t),r=b.getBlobInfo(e);if(!r)return null;const n=b.decode(e,r);if(!n)return null;const{width:o,height:i,bandCount:s,dataType:a}=r,{ctor:l}=x(a),u=l===BigInt64Array||l===BigUint64Array?Float64Array:l,c=Array.from({length:s},()=>new u(o*i));for(let t=0,e=0;t<o*i;t++)for(let r=0;r<s;r++)c[r][t]=n[e++];return{width:o,height:i,pixels:c}}const A=(t,e)=>{const r=e.width*e.height,n=e.pixelType;return Math.floor(t.byteLength/(r*k(n)))},k=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 M{static decode(t,e){const r=e.pixelType,n=[],o=e.width*e.height,i=A(t,e),{bandIds:s,format:a}=e,l=s?.length||A(t,e),u=t.byteLength-t.byteLength%(o*k(r)),c=new r(t,0,o*i);let h,f,p,d,m=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&&(m=((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:m}}}var S=r(45664),T=r(47124),I=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,C,b,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=b=0;b<y;o=b+=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=C=0:(w=d[(g-1)*y+n*p+o%p],C=n&&d[(g-1)*y+(n-1)*p+o%p]),a=i+w-C,u=Math.abs(a-i),h=Math.abs(a-w),f=Math.abs(a-C),c=u<=h&&u<=f?i:h<=f?w:C,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 P=new Set(["jpg","png","bmp","gif"]);async function E(t,e){if(!T.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 R(t,e){await C();const r=v(t);if(!r)throw new n.A("rasterCodec:decode","failed to decode the input data.");const{width:o,height:s,pixels:a}=r,l=new i.A({width:o,height:s,pixelType:"u16",pixels:a});return l.updateStatistics(),l}async function U(t,e){const r=await(0,S.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 L(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 D(t,e){return L(new l.Z(new Uint8Array(t)).getBytes(),e)}function O(t,e){return L((0,p.D)(t,e.offset,e.eof,!e.isInputBigEndian),e)}function B(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 G(t,e){const r=new Uint8Array(t),n=new I(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 N(t){if(null==t)throw new n.A("rasterCodec:decode","parameter encodeddata is required.");const e=new Uint8Array(t,0,10);let r="";return 255===e[0]&&216===e[1]?r="jpg":137===e[0]&&80===e[1]&&78===e[2]&&71===e[3]?r="png":67===e[0]&&110===e[1]&&116===e[2]&&90===e[3]&&73===e[4]&&109===e[5]&&97===e[6]&&103===e[7]&&101===e[8]&&32===e[9]?r="lerc":76===e[0]&&101===e[1]&&114===e[2]&&99===e[3]&&50===e[4]&&32===e[5]?r="lerc2":73===e[0]&&73===e[1]&&42===e[2]&&0===e[3]||77===e[0]&&77===e[1]&&0===e[2]&&42===e[3]||73===e[0]&&73===e[1]&&43===e[2]&&0===e[3]||77===e[0]&&77===e[1]&&0===e[2]&&43===e[3]?r="tiff":71===e[0]&&73===e[1]&&70===e[2]?r="gif":66===e[0]&&77===e[1]?r="bmp":81===e[0]&&66===e[1]&&51===e[2]?r="qb3":String.fromCharCode.apply(null,e).toLowerCase().includes("error")&&(r="error"),r}function F(t){let e=N(t);return"lerc2"===e?e="lerc":"error"===e&&(e=""),e}async function V(t,e={},r){if(null==t)throw new n.A("rasterCodec:decode","missing encodeddata parameter.");let o=e.format?.toLowerCase();if(!("bsq"!==o&&"bip"!==o||null!=e.width&&null!=e.height))throw new n.A("rasterCodec:decode","requires width and height in options parameter.");if("tiff"===o&&e.customOptions)return async function(t,e){const r=await(0,S.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=N(t)),e.useCanvas&&P.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=E;break;case"jpg":e=B;break;case"png":e=G;break;case"bsq":case"bip":e=(e,r)=>function(t,e,r){const{pixelTypeCtor:n}=function(t){let e=null,r=null;switch(t?t.toLowerCase():"f32"){case"u1":case"u2":case"u4":case"u8":r=255,e=Uint8Array;break;case"u16":r=r||65535,e=Uint16Array;break;case"u32":r=r||2**32-1,e=Uint32Array;break;case"s8":r=r||-128,e=Int8Array;break;case"s16":r=r||-32768,e=Int16Array;break;case"s32":r=r||0-2**31,e=Int32Array;break;default:e=Float32Array}return{pixelTypeCtor:e,noDataValue:r}}(e.pixelType),o=(0,M.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}(e,r,t);break;case"tiff":e=U;break;case"deflate":e=D;break;case"lzw":e=O;break;case"qb3":e=R;break;case"error":e=()=>{throw new n.A("rasterCodec:decode","input data contains error")};break;default:e=()=>{throw new n.A("rasterCodec:decode","unsupported raster format")}}return e}(o);let 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}},85334:(t,e,r)=>{r.d(e,{$:()=>y,IB:()=>s,Iy:()=>x,N2:()=>w,RH:()=>b,ZD:()=>C});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 C(t){return l(t)?t:function(t){return m(p(t))}(y(t))}function b(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))}function x(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(A(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)}const v=(t,e)=>{const r=Math.floor(10*e())-5;return Math.min(255,Math.max(0,t+r))};function A(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([v(f,m),v(p,m),v(d,m)])}},85676:(t,e,r)=>{r.d(e,{A:()=>m});var n=r(31635),o=(r(44208),r(25482)),i=r(53966),s=r(10107),a=(r(87811),r(64108)),l=r(87186),u=r(16019),c=r(28435),h=r(6952),f=r(39062),p=r(67369),d=r(88178);let m=class extends o.o{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(!g(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(!g(t))return t;try{return t.pixels.length>3&&(t=t.extractBands([0,1,2])),(0,h._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,c.qL)(t,this.lookup.colormapLut)}_symbolizeClassBreaks(t){const{canUseIndexedLUT:e}=this._analyzeClassBreaks(this.rendererJSON);return this._isLUTChanged()&&!this.bind().success?t:e?(0,c.qL)(t,this.lookup.colormapLut):(0,c.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:u}=s,{gamma:f}=n;if(u&&(e=null),"histogramEqualization"===s.stretchType){const o=u?null:n.histogramLut,i=(0,h.DP)(s,{rasterInfo:r,pixelBlock:t,bandIds:e,returnHistogramLut:!o}),a="u8"===r.pixelType&&!u&&(0,h.zt)(r.histograms?.[0])?t:(0,h._N)(t,{...i,gamma:f,isRenderer:!0});l=(0,c.eH)(a,{lut:u?i.histogramLut:e?.length?e.map(t=>o[t]):o,offset:0})}else if(a){let a;if(u){const n=(0,h.DP)(s,{rasterInfo:r,pixelBlock:t,bandIds:e});a=(0,h.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,c.eH)(t,a)}else{const n=(0,h.DP)(s,{rasterInfo:r,pixelBlock:t,bandIds:e});l=(0,h._N)(t,{...n,gamma:f,isRenderer:!0})}if(s.colorRamp){if(this._isLUTChanged(!0)&&!this.bind().success)return t;l=(0,c.qL)(l,n.colormapLut)}return l}_symbolizeShadedRelief(t,e){const r=this.rendererJSON,n={...r,...e},o=(0,f.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,f.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,d.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,c.zg)({colormap:a});return this.lookup={rendererJSON:t,colormapLut:l},this.canRenderInWebGL=(0,d.WN)(l?.indexedColormap),{success:!0}}_updateColormapRenderer(t){if(!(0,d.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,c.zg)({colormap:e});return this.lookup={rendererJSON:t,colormapLut:r},this.canRenderInWebGL=(0,d.WN)(r?.indexedColormap),{success:!0}}_updateShadedReliefRenderer(t){if(!(0,d.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,p.R8)(t.colorRamp,{interpolateAlpha:!0}),r=(0,c.zg)({colormap:e}),n=(0,p.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 h=[];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&&h.push([e].concat(o.symbol.color))}}else{const[e,r]=(0,u.hP)(this.rasterInfo.pixelType);l=Math.max(e,Math.floor(t.minValue));for(let t=0;t<s.length;t++){const e=s[t],n=Math.min(r,Math.ceil(e.classMaxValue));for(let t=l;t<n;t++)h.push([t].concat(e.symbol.color));l=n}a.classMaxValue!==l&&l!==r||h.push([l].concat(a.symbol.color))}const f=(0,c.zg)({colormap:h,fillUnspecified:!1});return this.lookup={rendererJSON:t,colormapLut:f},this.canRenderInWebGL=(0,d.WN)(f?.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,h.fP)(this.rasterInfo.pixelType,e)}const l=this.rasterInfo.pixelType,u=!r&&["u8","u16","s8","s16"].includes(l);if("histogramEqualization"===e){const e=n.map(t=>(0,h.WF)(t));this.lookup={rendererJSON:t,histogramLut:e}}else if(u){const e=(0,h.DP)(t,{rasterInfo:this.rasterInfo}),r=(0,h.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,p.R8)(s,{interpolateAlpha:!0});this.lookup.colormapLut=(0,c.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));let l=0;null!=t&&(l=t.getPlaneCount(),2===l&&((t=t.clone()).statistics=[t.statistics[0]],t.pixels=[t.pixels[0]]));const{bandCount:u}=this.rasterInfo,c=Math.min(3,r?.length||l||u,u),f=o||a?1:255,p=new Float32Array(c);if(a&&s)for(let t=0;t<c;t++)s[t]>1?s[t]>2?p[t]=6.5+(s[t]-2)**2.5:p[t]=6.5+100*(2-s[t])**4:p[t]=1;const d=a&&s?[s[0],s[1]??s[0],s[2]??s[0]]:[1,1,1],m=a?[p[0],p[1]??p[0],p[2]??p[0]]:[1,1,1];if(e.dra&&null==t&&("minMax"===e.stretchType||"standardDeviation"===e.stretchType))return{bandCount:c,minOutput:(e.min??0)/f,maxOutput:(e.max??255)/f,minCutOff:[0,0,0],maxCutOff:[1,1,1],factor:[1,1,1],useGamma:!1,gamma:d,gammaCorrection:m,colormap:o,colormapOffset:i,stretchType:e.stretchType,dynamicRangeAdjustment:e.dra,numberOfStandardDeviations:e.numberOfStandardDeviations??2,type:"stretch"};const{minCutOff:g,maxCutOff:y,minOutput:w,maxOutput:C}=(0,h.DP)(e,{rasterInfo:this.rasterInfo,pixelBlock:t,bandIds:r});1===g.length&&(g[2]=g[1]=g[0]),1===y.length&&(y[2]=y[1]=y[0]);const b=y.map((t,e)=>y[e]===g[e]?0:(C-w)/(y[e]-g[e])/f);return{bandCount:c,minOutput:w/f,maxOutput:C/f,minCutOff:g,maxCutOff:y,factor:b,useGamma:a,gamma:d,gammaCorrection:m,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,f.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 g(t){return(0,c.AB)(t)&&0!==t.validPixelCount}(0,n.Cg)([(0,s.MZ)({json:{write:!0}})],m.prototype,"rendererJSON",void 0),(0,n.Cg)([(0,s.MZ)({type:l.A,json:{write:!0}})],m.prototype,"rasterInfo",void 0),(0,n.Cg)([(0,s.MZ)({json:{write:!0}})],m.prototype,"lookup",void 0),(0,n.Cg)([(0,s.MZ)()],m.prototype,"canRenderInWebGL",void 0),m=(0,n.Cg)([(0,a.$)("esri.renderers.support.RasterSymbolizer")],m)},87186:(t,e,r)=>{r.d(e,{A:()=>x});var n,o=r(31635),i=r(25482),s=r(4718),a=r(10107),l=(r(44208),r(53966),r(64108)),u=r(5443),c=r(16930);function h(t){return t=Number(t),isNaN(t)?void 0:t}r(87811);let f=class extends i.o{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}static{n=this}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.Cg)([(0,a.MZ)({json:{name:"BandName",write:!0}})],f.prototype,"name",void 0),(0,o.Cg)([(0,a.MZ)({json:{read:{source:["WavelengthMin","Wavelength"],reader:(t,e)=>h(e.WavelengthMin??e.Wavelength)},write:{target:"WavelengthMin"}}})],f.prototype,"minWavelength",void 0),(0,o.Cg)([(0,a.MZ)({json:{name:"WavelengthMax",read:{reader:h},write:!0}})],f.prototype,"maxWavelength",void 0),(0,o.Cg)([(0,a.MZ)({json:{name:"RadianceBias",read:{reader:h},write:!0}})],f.prototype,"radianceBias",void 0),(0,o.Cg)([(0,a.MZ)({json:{name:"RadianceGain",read:{reader:h},write:!0}})],f.prototype,"radianceGain",void 0),(0,o.Cg)([(0,a.MZ)({json:{name:"ReflectanceBias",read:{reader:h},write:!0}})],f.prototype,"reflectanceBias",void 0),(0,o.Cg)([(0,a.MZ)({json:{name:"ReflectanceGain",read:{reader:h},write:!0}})],f.prototype,"reflectanceGain",void 0),(0,o.Cg)([(0,a.MZ)({json:{name:"SolarIrradiance",read:{reader:h},write:!0}})],f.prototype,"solarIrradiance",void 0),f=n=(0,o.Cg)([(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=class extends i.o{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}static{p=this}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.Cg)([(0,a.MZ)({type:Date,json:{name:"AcquisitionDate",write:!0}})],w.prototype,"acquisitionDate",void 0),(0,o.Cg)([(0,m.w)("acquisitionDate")],w.prototype,"readAcquisitionDate",null),(0,o.Cg)([(0,g.K)("acquisitionDate")],w.prototype,"writeAcquisitionDate",null),(0,o.Cg)([(0,a.MZ)({json:{name:"CloudCover",read:{reader:y},write:!0}})],w.prototype,"cloudCover",void 0),(0,o.Cg)([(0,a.MZ)({json:{name:"ProductName",write:!0}})],w.prototype,"productName",void 0),(0,o.Cg)([(0,a.MZ)({json:{name:"SensorName",write:!0}})],w.prototype,"sensorName",void 0),(0,o.Cg)([(0,a.MZ)({json:{name:"SensorAzimuth",read:{reader:y},write:!0}})],w.prototype,"sensorAzimuth",void 0),(0,o.Cg)([(0,a.MZ)({json:{name:"SensorElevation",read:{reader:y},write:!0}})],w.prototype,"sensorElevation",void 0),(0,o.Cg)([(0,a.MZ)({json:{name:"SunAzimuth",read:{reader:y},write:!0}})],w.prototype,"sunAzimuth",void 0),(0,o.Cg)([(0,a.MZ)({json:{name:"SunElevation",read:{reader:y},write:!0}})],w.prototype,"sunElevation",void 0),w=p=(0,o.Cg)([(0,l.$)("esri.layers.support.RasterSensorInfo")],w);var C,b=r(20223);let x=class extends i.o{static{C=this}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 C({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.Cg)([(0,a.MZ)({json:{write:!0}})],x.prototype,"attributeTable",void 0),(0,o.Cg)([(0,a.MZ)({json:{write:!0}})],x.prototype,"bandCount",void 0),(0,o.Cg)([(0,a.MZ)({readOnly:!0})],x.prototype,"bandInfos",null),(0,o.Cg)([(0,a.MZ)({json:{write:!0}})],x.prototype,"colormap",void 0),(0,o.Cg)([(0,a.MZ)({type:String,readOnly:!0})],x.prototype,"dataType",null),(0,o.Cg)([(0,a.MZ)({type:u.A,json:{write:!0}})],x.prototype,"extent",void 0),(0,o.Cg)([(0,a.MZ)({type:u.A,json:{write:!0}})],x.prototype,"nativeExtent",null),(0,o.Cg)([(0,a.MZ)({json:{write:!0}})],x.prototype,"nativePixelSize",null),(0,o.Cg)([(0,a.MZ)({json:{write:!0}})],x.prototype,"format",void 0),(0,o.Cg)([(0,a.MZ)({json:{write:!0}})],x.prototype,"height",void 0),(0,o.Cg)([(0,a.MZ)({json:{write:!0}})],x.prototype,"width",void 0),(0,o.Cg)([(0,a.MZ)({json:{write:!0}})],x.prototype,"hasMultidimensionalTranspose",null),(0,o.Cg)([(0,a.MZ)({json:{write:!0}})],x.prototype,"histograms",void 0),(0,o.Cg)([(0,a.MZ)({json:{write:!0}})],x.prototype,"keyProperties",void 0),(0,o.Cg)([(0,a.MZ)({json:{write:!0}})],x.prototype,"multidimensionalInfo",void 0),(0,o.Cg)([(0,a.MZ)({json:{write:!0}})],x.prototype,"noDataValue",void 0),(0,o.Cg)([(0,a.MZ)({json:{write:!0}})],x.prototype,"pixelSize",void 0),(0,o.Cg)([(0,a.MZ)({type:d.e8.apiValues,json:{write:!0}})],x.prototype,"pixelType",void 0),(0,o.Cg)([(0,a.MZ)()],x.prototype,"isPseudoSpatialReference",void 0),(0,o.Cg)([(0,a.MZ)({readOnly:!0})],x.prototype,"sensorInfo",null),(0,o.Cg)([(0,a.MZ)({type:c.A,json:{write:!0}})],x.prototype,"spatialReference",void 0),(0,o.Cg)([(0,a.MZ)({json:{write:!0}})],x.prototype,"statistics",void 0),(0,o.Cg)([(0,a.MZ)({type:b.A,json:{write:!0}})],x.prototype,"storageInfo",void 0),(0,o.Cg)([(0,a.MZ)({json:{write:!0}})],x.prototype,"transform",void 0),x=C=(0,o.Cg)([(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})}}]);
@@ -0,0 +1 @@
1
+ "use strict";(self.webpackChunkRemoteClient=self.webpackChunkRemoteClient||[]).push([[5710,7982],{4513:(e,a,r)=>{r.d(a,{S:()=>t});const t={BingMapsLayer:async()=>(await Promise.all([r.e(3508),r.e(6554),r.e(9036)]).then(r.bind(r,17029))).default,BuildingSceneLayer:async()=>(await Promise.all([r.e(7330),r.e(3508),r.e(6554),r.e(2869),r.e(3910),r.e(5323),r.e(8303),r.e(4903),r.e(1214),r.e(9953),r.e(1956),r.e(8399),r.e(1017),r.e(957),r.e(9708),r.e(8654),r.e(6647),r.e(6673),r.e(7005),r.e(9240),r.e(3474),r.e(5971),r.e(61),r.e(1437)]).then(r.bind(r,82411))).default,CSVLayer:async()=>(await Promise.all([r.e(7330),r.e(3508),r.e(6554),r.e(2869),r.e(3910),r.e(5323),r.e(8303),r.e(4903),r.e(1214),r.e(9953),r.e(1956),r.e(8399),r.e(1017),r.e(957),r.e(9708),r.e(8654),r.e(6647),r.e(1197)]).then(r.bind(r,68695))).default,CatalogLayer:async()=>(await Promise.all([r.e(3508),r.e(6554),r.e(2869),r.e(3910),r.e(5323),r.e(8303),r.e(4903),r.e(1214),r.e(1956),r.e(8399),r.e(708),r.e(957),r.e(9708),r.e(6647),r.e(893),r.e(8628),r.e(2593),r.e(9279),r.e(1874)]).then(r.bind(r,83508))).default,DimensionLayer:async()=>(await Promise.all([r.e(3508),r.e(3813)]).then(r.bind(r,71493))).default,ElevationLayer:async()=>(await Promise.all([r.e(3508),r.e(9953),r.e(4802),r.e(8207)]).then(r.bind(r,68611))).default,FeatureLayer:async()=>(await Promise.all([r.e(7330),r.e(3508),r.e(6554),r.e(2869),r.e(3910),r.e(5323),r.e(8303),r.e(4903),r.e(1214),r.e(9953),r.e(1956),r.e(8399),r.e(1017),r.e(957),r.e(9708),r.e(8654),r.e(6647),r.e(9247)]).then(r.bind(r,68654))).default,GaussianSplatLayer:async()=>(await Promise.all([r.e(3508),r.e(6673),r.e(6730)]).then(r.bind(r,36475))).default,GeoJSONLayer:async()=>(await Promise.all([r.e(3508),r.e(6554),r.e(2869),r.e(3910),r.e(5323),r.e(8303),r.e(4903),r.e(1214),r.e(9953),r.e(1956),r.e(8399),r.e(1017),r.e(8766)]).then(r.bind(r,15481))).default,GeoRSSLayer:async()=>(await Promise.all([r.e(3508),r.e(6554),r.e(5890)]).then(r.bind(r,85582))).default,GroupLayer:async()=>(await Promise.all([r.e(3508),r.e(5613),r.e(3562)]).then(r.bind(r,85989))).default,ImageryLayer:async()=>(await Promise.all([r.e(3508),r.e(6554),r.e(2869),r.e(3910),r.e(5323),r.e(8303),r.e(4903),r.e(9953),r.e(1956),r.e(893),r.e(6673),r.e(3356),r.e(6699),r.e(4971)]).then(r.bind(r,84123))).default,ImageryTileLayer:async()=>(await Promise.all([r.e(3508),r.e(6554),r.e(2869),r.e(3910),r.e(5323),r.e(8303),r.e(4903),r.e(9953),r.e(6673),r.e(3356),r.e(6049),r.e(6699),r.e(7677),r.e(9718)]).then(r.bind(r,19718))).default,IntegratedMesh3DTilesLayer:async()=>(await Promise.all([r.e(3508),r.e(6673),r.e(2515),r.e(132)]).then(r.bind(r,61528))).default,IntegratedMeshLayer:async()=>(await Promise.all([r.e(3508),r.e(6673),r.e(9240),r.e(2515),r.e(7464)]).then(r.bind(r,74660))).default,KMLLayer:async()=>(await Promise.all([r.e(3508),r.e(6554),r.e(2869),r.e(3910),r.e(5323),r.e(8303),r.e(4903),r.e(1214),r.e(1863)]).then(r.bind(r,162))).default,KnowledgeGraphLayer:async()=>(await Promise.all([r.e(3508),r.e(6554),r.e(2869),r.e(3910),r.e(5323),r.e(8303),r.e(4903),r.e(1214),r.e(9953),r.e(1956),r.e(8399),r.e(708),r.e(1017),r.e(9708),r.e(8368),r.e(4649),r.e(217),r.e(2568),r.e(3463),r.e(8948),r.e(8692)]).then(r.bind(r,28692))).default,LineOfSightLayer:async()=>(await Promise.all([r.e(3508),r.e(6673),r.e(1224),r.e(9695)]).then(r.bind(r,49695))).default,LinkChartLayer:async()=>(await Promise.all([r.e(3508),r.e(6554),r.e(2869),r.e(3910),r.e(5323),r.e(8303),r.e(4903),r.e(1214),r.e(9953),r.e(1956),r.e(8399),r.e(708),r.e(1017),r.e(9708),r.e(8368),r.e(4649),r.e(217),r.e(2568),r.e(3463),r.e(8948),r.e(1728)]).then(r.bind(r,71728))).default,MapImageLayer:async()=>(await Promise.all([r.e(3508),r.e(6554),r.e(2869),r.e(3910),r.e(5323),r.e(8303),r.e(4903),r.e(1214),r.e(1956),r.e(8399),r.e(708),r.e(957),r.e(893),r.e(7048),r.e(7656),r.e(8999)]).then(r.bind(r,7656))).default,MapNotesLayer:async()=>(await Promise.all([r.e(7330),r.e(3508),r.e(6554),r.e(2869),r.e(3910),r.e(5323),r.e(8303),r.e(4903),r.e(1214),r.e(9953),r.e(1956),r.e(8399),r.e(1017),r.e(957),r.e(9708),r.e(8654),r.e(6647),r.e(3463),r.e(744)]).then(r.bind(r,96299))).default,MediaLayer:async()=>(await Promise.all([r.e(7330),r.e(3508),r.e(3444),r.e(9203)]).then(r.bind(r,29203))).default,OGCFeatureLayer:async()=>(await Promise.all([r.e(3508),r.e(6554),r.e(2869),r.e(3910),r.e(5323),r.e(8303),r.e(4903),r.e(1214),r.e(1956),r.e(8399),r.e(708),r.e(1017),r.e(5971),r.e(3549),r.e(3106)]).then(r.bind(r,65977))).default,OpenStreetMapLayer:async()=>(await Promise.all([r.e(3508),r.e(6554),r.e(9573),r.e(2712)]).then(r.bind(r,40349))).default,OrientedImageryLayer:async()=>(await Promise.all([r.e(7330),r.e(3508),r.e(6554),r.e(2869),r.e(3910),r.e(5323),r.e(8303),r.e(4903),r.e(1214),r.e(9953),r.e(1956),r.e(8399),r.e(1017),r.e(957),r.e(9708),r.e(8654),r.e(6647),r.e(9361),r.e(9644)]).then(r.bind(r,9352))).default,PointCloudLayer:async()=>(await Promise.all([r.e(3508),r.e(2869),r.e(6673),r.e(9240),r.e(7984),r.e(873)]).then(r.bind(r,77885))).default,RouteLayer:async()=>(await Promise.all([r.e(3508),r.e(2869),r.e(3910),r.e(5323),r.e(8303),r.e(4903),r.e(1214),r.e(217),r.e(979)]).then(r.bind(r,64185))).default,SceneLayer:async()=>(await Promise.all([r.e(3508),r.e(2869),r.e(3910),r.e(5323),r.e(8303),r.e(4903),r.e(1214),r.e(1956),r.e(8399),r.e(6673),r.e(7005),r.e(9240),r.e(3474),r.e(5971),r.e(61),r.e(1713)]).then(r.bind(r,36969))).default,StreamLayer:async()=>(await Promise.all([r.e(3508),r.e(6554),r.e(2869),r.e(3910),r.e(5323),r.e(8303),r.e(4903),r.e(1214),r.e(1956),r.e(8399),r.e(1017),r.e(73)]).then(r.bind(r,79457))).default,SubtypeGroupLayer:async()=>(await Promise.all([r.e(7330),r.e(3508),r.e(6554),r.e(2869),r.e(3910),r.e(5323),r.e(8303),r.e(4903),r.e(1956),r.e(8399),r.e(957),r.e(9708),r.e(6647),r.e(9645)]).then(r.bind(r,97483))).default,TileLayer:async()=>(await Promise.all([r.e(3508),r.e(6554),r.e(2869),r.e(3910),r.e(5323),r.e(8303),r.e(4903),r.e(1214),r.e(1956),r.e(8399),r.e(708),r.e(957),r.e(893),r.e(4802),r.e(7048),r.e(573)]).then(r.bind(r,71756))).default,UnknownLayer:async()=>(await r.e(146).then(r.bind(r,146))).default,UnsupportedLayer:async()=>(await r.e(5165).then(r.bind(r,45165))).default,VectorTileLayer:async()=>(await Promise.all([r.e(3508),r.e(6554),r.e(4802),r.e(5897),r.e(1776)]).then(r.bind(r,48757))).default,VideoLayer:async()=>(await Promise.all([r.e(3508),r.e(3910),r.e(5323),r.e(8303),r.e(957),r.e(3444),r.e(2274)]).then(r.bind(r,86875))).default,ViewshedLayer:async()=>(await Promise.all([r.e(3508),r.e(1224),r.e(6650)]).then(r.bind(r,96650))).default,VoxelLayer:async()=>(await Promise.all([r.e(3508),r.e(2869),r.e(9240),r.e(3081)]).then(r.bind(r,21005))).default,WCSLayer:async()=>(await Promise.all([r.e(3508),r.e(6554),r.e(2869),r.e(3910),r.e(5323),r.e(8303),r.e(4903),r.e(9953),r.e(3356),r.e(6049),r.e(6699),r.e(7677),r.e(5369)]).then(r.bind(r,88854))).default,WFSLayer:async()=>(await Promise.all([r.e(3508),r.e(6554),r.e(2869),r.e(3910),r.e(5323),r.e(8303),r.e(4903),r.e(1214),r.e(9953),r.e(1956),r.e(8399),r.e(708),r.e(1017),r.e(9110)]).then(r.bind(r,21901))).default,WMSLayer:async()=>(await Promise.all([r.e(7330),r.e(3508),r.e(6554),r.e(2869),r.e(3910),r.e(5323),r.e(5181)]).then(r.bind(r,51904))).default,WMTSLayer:async()=>(await Promise.all([r.e(3508),r.e(6554),r.e(4802),r.e(9573),r.e(309)]).then(r.bind(r,20309))).default,WebTileLayer:async()=>(await Promise.all([r.e(3508),r.e(6554),r.e(9573),r.e(2848)]).then(r.bind(r,47314))).default}},23154:(e,a,r)=>{r.d(a,{K:()=>f,Q:()=>s});var t=r(77548),n=r(24183);const l=new Set(["Catalog Layer","Feature Layer","Oriented Imagery Layer"]);async function s(e,a){const{loadContext:r,...l}=a||{},s=r?await r.fetchServiceMetadata(e,l):await(0,n.V)(e,l),i=(0,t.G$)();d(s),c(s);const o={serviceJSON:s,preferredHost:i};if((s.currentVersion??0)<10.5)return o;const u=`${(0,t.$x)()??e}/layers`,y=r?await r.fetchServiceMetadata(u,l):await(0,n.V)(u,l);return d(y),c(y),o.layersJSON={layers:y.layers,tables:y.tables},o}function i(e){const{type:a}=e;return!!a&&l.has(a)}function o(e){return"Table"===e.type}function c(e){e.layers=e.layers?.filter(i),e.tables=e.tables?.filter(o)}function u(e){e.type||="Feature Layer"}function y(e){e.type||="Table"}function d(e){e.layers?.forEach(u),e.tables?.forEach(y)}function f(e){switch(e){case"Feature Layer":case"Table":return"FeatureLayer";case"Oriented Imagery Layer":return"OrientedImageryLayer";case"Catalog Layer":return"CatalogLayer"}return"FeatureLayer"}},24183:(e,a,r)=>{r.d(a,{V:()=>n});var t=r(43773);async function n(e,a){const{data:r}=await(0,t.A)(e,{responseType:"json",query:{f:"json",...a?.customParameters,token:a?.apiKey}});return r}},27982:(e,a,r)=>{r.r(a),r.d(a,{fromUrl:()=>d});var t=r(49186),n=r(84952),l=r(60694),s=r(92009),i=r(23154),o=r(77548),c=r(4513),u=r(24183);const y={FeatureLayer:!0,SceneLayer:!0,VideoLayer:!0};async function d(e){const{properties:a,url:c}=e,d={...a,url:c},p=await async function(e,a){let r=(0,l.qg)(e);if(null==r&&(r=await async function(e,a){const r=await(0,u.V)(e,{customParameters:a});let t=null,s=null;const i=r.type;if("Feature Layer"===i||"Table"===i?(t="FeatureServer",s=r.id??null):"indexedVector"===i?t="VectorTileServer":r.hasOwnProperty("mapName")?t="MapServer":r.hasOwnProperty("bandCount")&&r.hasOwnProperty("pixelSizeX")?t="ImageServer":r.hasOwnProperty("maxRecordCount")&&r.hasOwnProperty("allowGeometryUpdates")?t="FeatureServer":r.hasOwnProperty("streamUrls")?t="StreamServer":m(r)?(t="SceneServer",s=r.id):r.hasOwnProperty("layers")&&m(r.layers?.[0])&&(t="SceneServer"),!t)return null;const o=null!=s?(0,l.iz)(e):null;return{title:null!=o&&r.name||(0,n.e7)(e),serverType:t,sublayer:s,url:{path:null!=o?o.serviceUrl:(0,n.An)(e).path}}}(e,a)),null==r)throw new t.A("arcgis-layers:url-mismatch","The url '${url}' is not a valid arcgis resource",{url:e});const{serverType:c,sublayer:d}=r;let f;const w={FeatureServer:"FeatureLayer",KnowledgeGraphServer:"KnowledgeGraphLayer",StreamServer:"StreamLayer",VectorTileServer:"VectorTileLayer",VideoServer:"VideoLayer"},p="FeatureServer"===c,b="SceneServer"===c,L={parsedUrl:r,Constructor:null,layerId:p||b?d??void 0:void 0,layers:[],tables:[]};switch(c){case"MapServer":if(null!=d){const{type:r}=await(0,u.V)(e,{customParameters:a});switch(f="FeatureLayer",r){case"Catalog Layer":f="CatalogLayer";break;case"Catalog Dynamic Group Layer":throw new t.A("arcgis-layers:unsupported",`fromUrl() not supported for "${r}" layers`)}}else f=await async function(e,a){return(await(0,u.V)(e,{customParameters:a})).tileInfo}(e,a)?"TileLayer":"MapImageLayer";break;case"ImageServer":{const r=await(0,u.V)(e,{customParameters:a}),{tileInfo:t,cacheType:n}=r;f=t?"LERC"!==t?.format?.toUpperCase()||n&&"elevation"!==n.toLowerCase()?"ImageryTileLayer":"ElevationLayer":"ImageryLayer";break}case"SceneServer":{const e=await(0,u.V)(r.url.path,{customParameters:a});if(f="SceneLayer",e){const a=e?.layers;if("Voxel"===e?.layerType)f="VoxelLayer";else if(a?.length){const e=a[0]?.layerType;null!=e&&null!=o.XX[e]&&(f=o.XX[e])}}break}case"3DTilesServer":throw new t.A("arcgis-layers:unsupported","fromUrl() not supported for 3DTiles layers");case"FeatureServer":if(f="FeatureLayer",null!=d){const r=await(0,u.V)(e,{customParameters:a});L.sourceJSON=r,L.preferredUrl=(0,o.$x)(),f=(0,i.K)(r.type)}break;default:f=w[c]}if(y[f]&&null==d){const r=await async function(e,a,r){let t,n,l,c=!1;switch(a){case"FeatureServer":{const a=await(0,i.Q)(e,{customParameters:r});l=(0,o.$x)(e,{preferredHost:a.preferredHost}),c=!!a.layersJSON,t=a.layersJSON||a.serviceJSON;break}case"SceneServer":{const a=await async function(e,a){const r=await(0,u.V)(e,{customParameters:a}),t=r.layers?.[0];if(!t)return{serviceInfo:r};try{const{serverUrl:t}=await(0,s.L)(e),n=await(0,u.V)(t,{customParameters:a}).catch(()=>null);return n&&(r.tables=n.tables),{serviceInfo:r,tableServerUrl:t}}catch{return{serviceInfo:r}}}(e,r);t=a.serviceInfo,n=a.tableServerUrl;break}default:t=await(0,u.V)(e,{customParameters:r})}const y=t?.layers,d=t?.tables;return{preferredUrl:l,layers:y?.map(e=>({id:e.id})).reverse()||[],tables:d?.map(e=>({serverUrl:n,id:e.id})).reverse()||[],layerInfos:c?y:[],tableInfos:c?d:[]}}(e,c,a);if(p&&(L.preferredUrl=r.preferredUrl,L.sublayerInfos=r.layerInfos,L.tableInfos=r.tableInfos),1!==r.layers.length+r.tables.length)L.layers=r.layers,L.tables=r.tables,p&&r.layerInfos?.length&&(L.sublayerConstructorProvider=await async function(e){if(!e.length)return;const a=new Set,r=[];for(const{type:t}of e)a.has(t)||(a.add(t),r.push(h((0,i.K)(t))));const t=await Promise.all(r),n=new Map;return Array.from(a).forEach((e,a)=>{n.set(e,t[a])}),e=>n.get(e.type)}(r.layerInfos));else if(p||b){const e=r.layerInfos?.[0]??r.tableInfos?.[0];if(L.layerId=r.layers[0]?.id??r.tables[0]?.id,L.sourceJSON=e,p){const a=e?.type;f=(0,i.K)(a)}}}return L.Constructor=await h(f),L}(c,a?.customParameters),{Constructor:b,layerId:L,sourceJSON:S,parsedUrl:v,layers:P,tables:g}=p;if(P.length+g.length===0)return null!=L&&(d.layerId=L),null!=S&&(d.sourceJSON=S),new b(d);const I=new(0,(await Promise.all([r.e(3508),r.e(5613),r.e(3562)]).then(r.bind(r,85989))).default)({title:v.title});return await async function(e,a,r){const t=a.sublayerConstructorProvider;for(const{id:n,serverUrl:l}of a.layers){const s=f(a.sublayerInfos,n),i=w(l,n,s,(s&&t?.(s))??a.Constructor,r);e.add(i)}if(a.tables.length){const t=await h("FeatureLayer");a.tables.forEach(({id:n,serverUrl:l})=>{const s=w(l,n,f(a.tableInfos,n),t,r);e.tables.add(s)})}}(I,p,d),I}function f(e,a){return e?e.find(({id:e})=>e===a):null}function w(e,a,r,t,n){const l={...n,layerId:a};return null!=e&&(l.url=e),null!=r&&(l.sourceJSON=r),"sublayerTitleMode"in t.prototype&&(l.sublayerTitleMode="service-name"),new t(l)}function m(e){return null!=e&&e.hasOwnProperty("store")&&e.hasOwnProperty("id")&&"number"==typeof e.id}async function h(e){return(0,c.S[e])()}},92009:(e,a,r)=>{r.d(a,{L:()=>u});var t=r(70333),n=r(43773),l=r(49186),s=r(74887),i=r(60694),o=r(20655),c=r(80812);async function u(e,a){const r=(0,i.qg)(e);if(!r)throw new l.A("invalid-url","Invalid scene service url");const u={...a,sceneServerUrl:r.url.path,layerId:r.sublayer??void 0};if(u.sceneLayerItem??=await async function(e){const a=(await y(e)).serviceItemId;if(!a)return null;const r=new c.default({id:a,apiKey:e.apiKey}),l=await async function(e){const a=t.id?.findServerInfo(e.sceneServerUrl);if(a?.owningSystemUrl)return a.owningSystemUrl;const r=e.sceneServerUrl.replace(/(.*\/rest)\/.*/i,"$1")+"/info";try{const a=(await(0,n.A)(r,{query:{f:"json"},responseType:"json",signal:e.signal})).data.owningSystemUrl;if(a)return a}catch(e){(0,s.QP)(e)}return null}(e);null!=l&&(r.portal=new o.A({url:l}));try{return await r.load({signal:e.signal})}catch(e){return(0,s.QP)(e),null}}(u),null==u.sceneLayerItem)return d(u.sceneServerUrl.replace("/SceneServer","/FeatureServer"),u);const f=await async function({sceneLayerItem:e,signal:a}){if(!e)return null;try{const r=(await e.fetchRelatedItems({relationshipType:"Service2Service",direction:"reverse"},{signal:a})).find(e=>"Feature Service"===e.type)||null;if(!r)return null;const t=new c.default({portal:r.portal,id:r.id});return await t.load(),t}catch(e){return(0,s.QP)(e),null}}(u);if(!f?.url)throw new l.A("related-service-not-found","Could not find feature service through portal item relationship");u.featureServiceItem=f;const w=await d(f.url,u);return w.portalItem=f,w}async function y(e){if(e.rootDocument)return e.rootDocument;const a={query:{f:"json",...e.customParameters,token:e.apiKey},responseType:"json",signal:e.signal};try{const r=await(0,n.A)(e.sceneServerUrl,a);e.rootDocument=r.data}catch{e.rootDocument={}}return e.rootDocument}async function d(e,a){const r=(0,i.qg)(e);if(!r)throw new l.A("invalid-feature-service-url","Invalid feature service url");const t=r.url.path,s=a.layerId;if(null==s)return{serverUrl:t};const o=y(a),c=a.featureServiceItem?await a.featureServiceItem.fetchData("json"):null,u=(c?.layers?.[0]||c?.tables?.[0])?.customParameters,d=e=>{const r={query:{f:"json",...u},responseType:"json",authMode:e,signal:a.signal};return(0,n.A)(t,r)},f=d("anonymous").catch(()=>d("no-prompt")),[w,m]=await Promise.all([f,o]),h=m?.layers,p=w.data&&w.data.layers;if(!Array.isArray(p))throw new Error("expected layers array");if(Array.isArray(h)){for(let e=0;e<Math.min(h.length,p.length);e++)if(h[e].id===s)return{serverUrl:t,layerId:p[e].id}}else if(null!=s&&s<p.length)return{serverUrl:t,layerId:p[s].id};throw new Error("could not find matching associated sublayer")}}}]);
@@ -1,6 +1,6 @@
1
1
  /*! All material copyright ESRI, All Rights Reserved, unless otherwise specified.
2
2
  See https://github.com/Esri/calcite-design-system/blob/dev/LICENSE.md for details.
3
- v3.3.1 */
3
+ v3.3.2 */
4
4
 
5
5
  /**
6
6
  * @license