@arcgis/core 4.30.0-next.20240312 → 4.30.0-next.20240313

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 (58) hide show
  1. package/assets/esri/core/workers/RemoteClient.js +1 -1
  2. package/assets/esri/core/workers/chunks/{182f94904b6eb611b886.js → 052005514ce006ce0027.js} +1 -1
  3. package/assets/esri/core/workers/chunks/129ea550bf7ad7ad24f9.js +1 -0
  4. package/assets/esri/core/workers/chunks/{c3d619f978136f740a42.js → 1f5b7880ccf47ef9229d.js} +5 -5
  5. package/assets/esri/core/workers/chunks/{523903a812624d0d6d06.js → 2427699e34e1895ed024.js} +1 -1
  6. package/assets/esri/core/workers/chunks/{86fe8077986a991f0462.js → 500f39a5f74fa289df25.js} +1 -1
  7. package/assets/esri/core/workers/chunks/67ab6af927ea04c01a40.js +1 -0
  8. package/assets/esri/core/workers/chunks/c76e155332aa0491de3d.js +1 -0
  9. package/assets/esri/core/workers/chunks/dd5a078b7919f749ba3e.js +1 -0
  10. package/assets/esri/core/workers/chunks/f7cfdba77cb614fd3725.js +1 -0
  11. package/assets/esri/core/workers/chunks/f9427ac73435d1726d6c.js +1 -0
  12. package/assets/esri/core/workers/chunks/ff4151d794ec73064fac.js +1 -0
  13. package/layers/graphics/data/QueryEngine.js +1 -1
  14. package/layers/mixins/SceneService.js +1 -1
  15. package/layers/support/ExportImageServiceParameters.js +1 -1
  16. package/layers/support/LayerContingentValuesCache.js +1 -1
  17. package/layers/support/PixelBlock.js +1 -1
  18. package/layers/support/Tilemap.js +1 -1
  19. package/layers/support/rasterDatasets/BaseRaster.js +1 -1
  20. package/layers/support/rasterDatasets/CloudRaster.js +1 -1
  21. package/layers/support/rasterDatasets/FunctionRaster.js +1 -1
  22. package/layers/support/rasterDatasets/ImageServerRaster.js +1 -1
  23. package/layers/support/rasterDatasets/MRFRaster.js +1 -1
  24. package/layers/support/rasterDatasets/TIFFRaster.js +1 -1
  25. package/layers/support/rasterDatasets/WCSRaster.js +1 -1
  26. package/layers/support/rasterFunctions/ExtractBandFunction.js +1 -1
  27. package/package.json +1 -1
  28. package/request.js +1 -1
  29. package/rest/symbolService.js +1 -1
  30. package/support/revision.js +1 -1
  31. package/views/3d/layers/MediaLayerView3D.js +1 -1
  32. package/views/3d/state/ConstraintsManager.js +1 -1
  33. package/views/3d/state/ViewState.js +1 -1
  34. package/views/3d/support/LaserlinePathData.js +1 -1
  35. package/views/3d/terrain/TileRenderer.js +1 -1
  36. package/views/3d/webgl-engine/lib/MagnifierHelper.js +1 -1
  37. package/views/3d/webgl-engine/lib/Object3DStateSet.js +1 -1
  38. package/views/3d/webgl-engine/lib/Octree.js +1 -1
  39. package/views/3d/webgl-engine/lib/RayIntersections.js +1 -1
  40. package/views/3d/webgl-engine/lib/ShadowMap.js +1 -1
  41. package/views/3d/webgl-engine/lib/TextRenderParameters.js +1 -1
  42. package/views/3d/webgl-engine/lib/depthRangeUtils.js +1 -1
  43. package/views/3d/webgl-engine/lib/edgeRendering/EdgeView.js +1 -1
  44. package/views/3d/webgl-engine/lib/edgeRendering/EdgeWorkerHandle.js +1 -1
  45. package/views/3d/webgl-engine/materials/HUDMaterial.js +1 -1
  46. package/views/3d/webgl-engine/materials/PathMaterial.js +1 -1
  47. package/views/3d/webgl-engine/materials/PatternMaterial.js +1 -1
  48. package/views/3d/webgl-engine/parts/RenderView.js +1 -1
  49. package/views/3d/webgl-engine/shaders/DefaultMaterialTechnique.js +1 -1
  50. package/widgets/UtilityNetworkTrace/UtilityNetworkTraceViewModel.js +1 -1
  51. package/widgets/UtilityNetworkTrace/support/ResultAreaHandler.js +1 -1
  52. package/assets/esri/core/workers/chunks/0272af5adbbd4482f50d.js +0 -1
  53. package/assets/esri/core/workers/chunks/16f1ede633a712a555a6.js +0 -1
  54. package/assets/esri/core/workers/chunks/52fa794d75ab8841e808.js +0 -1
  55. package/assets/esri/core/workers/chunks/771b95d28e1c9a14df64.js +0 -1
  56. package/assets/esri/core/workers/chunks/79f36c3a2026c2f35fb0.js +0 -1
  57. package/assets/esri/core/workers/chunks/899b4539e516f44c51af.js +0 -1
  58. package/assets/esri/core/workers/chunks/bbedc4ff3d0aadbde16a.js +0 -1
@@ -0,0 +1 @@
1
+ "use strict";(self.webpackChunkRemoteClient=self.webpackChunkRemoteClient||[]).push([[984],{61294:(t,e,r)=>{r.d(e,{J:()=>l});var o,n,i,s=r(11053),a={exports:{}};o=a,n=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,o=799,n=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,o,n=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(o=0;o<t[r];o++){for((l=i.pop()).children[l.index]=e[n];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;n++}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,o,n,i,s,a,l,u,c){var h=n.mcusPerLine,p=n.progressive,d=o,m=0,y=0;function w(){if(y>0)return y--,m>>y&1;if(255===(m=r[o++])){var e=r[o++];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 v(t){if(1===t)return 1===w()?1:-1;var e=b(t);return e>=1<<t-1?e:e+(-1<<t)+1}var x,A=0,k=0;function S(t,e,r,o,n){var i=r%h;e(t,f(t,(r/h|0)*t.v+o,i*t.h+n))}function T(t,e,r){e(t,f(t,r/t.blocksPerLine|0,r%t.blocksPerLine))}var M,I,P,E,R,L,U=i.length;L=p?0===a?0===u?function(t,e){var r=C(t.huffmanTableDC),o=0===r?0:v(r)<<c;t.blockData[e]=t.pred+=o}:function(t,e){t.blockData[e]|=w()<<c}:0===u?function(t,r){if(A>0)A--;else for(var o=a,n=l;o<=n;){var i=C(t.huffmanTableAC),s=15&i,u=i>>4;if(0!==s){var h=e[o+=u];t.blockData[r+h]=v(s)*(1<<c),o++}else{if(u<15){A=b(u)+(1<<u)-1;break}o+=16}}}:function(r,o){for(var n,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==(n=15&i))h<15?(A=b(h)+(1<<h),k=4):(h=16,k=1);else{if(1!==n)throw new t("invalid ACn encoding");x=v(n),k=h?2:3}continue;case 1:case 2:r.blockData[o+f]?r.blockData[o+f]+=w()<<c:0==--h&&(k=2===k?3:0);break;case 3:r.blockData[o+f]?r.blockData[o+f]+=w()<<c:(r.blockData[o+f]=x<<c,k=0);break;case 4:r.blockData[o+f]&&(r.blockData[o+f]+=w()<<c)}s++}4===k&&0==--A&&(k=0)}:function(t,r){var o=C(t.huffmanTableDC),n=0===o?0:v(o);t.blockData[r]=t.pred+=n;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]=v(a),i++}else{if(l<15)break;i+=16}}};var D,O,B,G,N=0;for(O=1===U?i[0].blocksPerLine*i[0].blocksPerColumn:h*n.mcusPerColumn;N<O;){var _=s?Math.min(O-N,s):O;for(I=0;I<U;I++)i[I].pred=0;if(A=0,1===U)for(M=i[0],R=0;R<_;R++)T(M,L,N),N++;else for(R=0;R<_;R++){for(I=0;I<U;I++)for(B=(M=i[I]).h,G=M.v,P=0;P<G;P++)for(E=0;E<B;E++)S(M,L,N,P,E);N++}y=0,(D=g(r,o))&&D.invalid&&(console.log("decodeScan - unexpected MCU data, next marker is: "+D.invalid),o=D.offset);var F=D&&D.marker;if(!F||F<=65280)throw new t("marker was not found");if(!(F>=65488&&F<=65495))break;o+=2}return(D=g(r,o))&&D.invalid&&(console.log("decodeScan - unexpected Scan data, next marker is: "+D.invalid),o=D.offset),o-d}function d(e,c,h){var f,p,d,m,g,y,w,C,b,v,x,A,k,S,T,M,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],v=E[c+R+1],x=E[c+R+2],A=E[c+R+3],k=E[c+R+4],S=E[c+R+5],T=E[c+R+6],M=E[c+R+7],b*=P[R],v|x|A|k|S|T|M?(v*=P[R+1],x*=P[R+2],A*=P[R+3],k*=P[R+4],S*=P[R+5],T*=P[R+6],M*=P[R+7],p=(f=(f=l*b+128>>8)+(p=l*k+128>>8)+1>>1)-p,I=(d=x)*a+(m=T)*s+128>>8,d=d*s-m*a+128>>8,w=(g=(g=u*(v-M)+128>>8)+(w=S<<4)+1>>1)-w,y=(C=(C=u*(v+M)+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*n+2048>>12,g=g*n-C*i+2048>>12,C=I,I=y*o+w*r+2048>>12,y=y*r-w*o+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 L=0;L<8;++L)b=h[L],(v=h[L+8])|(x=h[L+16])|(A=h[L+24])|(k=h[L+32])|(S=h[L+40])|(T=h[L+48])|(M=h[L+56])?(p=(f=4112+((f=l*b+2048>>12)+(p=l*k+2048>>12)+1>>1))-p,I=(d=x)*a+(m=T)*s+2048>>12,d=d*s-m*a+2048>>12,m=I,w=(g=(g=u*(v-M)+2048>>12)+(w=S)+1>>1)-w,y=(C=(C=u*(v+M)+2048>>12)+(y=A)+1>>1)-y,I=g*i+C*n+2048>>12,g=g*n-C*i+2048>>12,C=I,I=y*o+w*r+2048>>12,y=y*r-w*o+2048>>12,b=(b=(f=f+m+1>>1)+C)<16?0:b>=4080?255:b>>4,v=(v=(p=p+d+1>>1)+(w=I))<16?0:v>=4080?255:v>>4,x=(x=(d=p-d)+y)<16?0:x>=4080?255:x>>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,S=(S=d-y)<16?0:S>=4080?255:S>>4,T=(T=p-w)<16?0:T>=4080?255:T>>4,M=(M=f-C)<16?0:M>=4080?255:M>>4,E[c+L]=b,E[c+L+8]=v,E[c+L+16]=x,E[c+L+24]=A,E[c+L+32]=k,E[c+L+40]=S,E[c+L+48]=T,E[c+L+56]=M):(I=(I=l*b+8192>>14)<-2040?0:I>=2024?255:I+2056>>4,E[c+L]=I,E[c+L+8]=I,E[c+L+16]=I,E[c+L+24]=I,E[c+L+32]=I,E[c+L+40]=I,E[c+L+48]=I,E[c+L+56]=I)}function m(t,e){for(var r=e.blocksPerLine,o=e.blocksPerColumn,n=new Int16Array(64),i=0;i<o;i++)for(var s=0;s<r;s++)d(e,f(e,i,s),n);return e.blockData}function g(t,e,r){function o(e){return t[e]<<8|t[e+1]}var n=t.length-1,i=r<e?r:e;if(e>=n)return null;var s=o(e);if(s>=65472&&s<=65534)return{invalid:null,marker:s,offset:e};for(var a=o(i);!(a>=65472&&a<=65534);){if(++i>=n)return null;a=o(i)}return{invalid:s.toString(16),marker:a,offset:i}}return c.prototype={parse:function(r){function o(){var t=r[l]<<8|r[l+1];return l+=2,t}function n(){var t=o(),e=l+t-2,n=g(r,e,l);n&&n.invalid&&(console.log("readDataBlock - incorrect length, next marker is: "+n.invalid),e=n.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),o=0;o<t.components.length;o++){N=t.components[o];var n=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=n,N.blocksPerColumn=i}t.mcusPerLine=e,t.mcusPerColumn=r}var s,a,l=0,u=null,c=null,f=[],d=[],y=[],w=o();if(65496!==w)throw new t("SOI not found");for(w=o();65497!==w;){var C,b,v;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 x=n();65504===w&&74===x[0]&&70===x[1]&&73===x[2]&&70===x[3]&&0===x[4]&&(u={version:{major:x[5],minor:x[6]},densityUnits:x[7],xDensity:x[8]<<8|x[9],yDensity:x[10]<<8|x[11],thumbWidth:x[12],thumbHeight:x[13],thumbData:x.subarray(14,14+3*x[12]*x[13])}),65518===w&&65===x[0]&&100===x[1]&&111===x[2]&&98===x[3]&&101===x[4]&&(c={version:x[5]<<8|x[6],flags0:x[7]<<8|x[8],flags1:x[9]<<8|x[10],transformCode:x[11]});break;case 65499:for(var A=o()+l-2;l<A;){var k=r[l++],S=new Uint16Array(64);if(k>>4){if(k>>4!=1)throw new t("DQT - invalid table spec");for(b=0;b<64;b++)S[e[b]]=o()}else for(b=0;b<64;b++)S[e[b]]=r[l++];f[15&k]=S}break;case 65472:case 65473:case 65474:if(s)throw new t("Only single frame JPEGs supported");o(),(s={}).extended=65473===w,s.progressive=65474===w,s.precision=r[l++],s.scanLines=o(),s.samplesPerLine=o(),s.components=[],s.componentIds={};var T,M=r[l++],I=0,P=0;for(C=0;C<M;C++){T=r[l];var E=r[l+1]>>4,R=15&r[l+1];I<E&&(I=E),P<R&&(P=R);var L=r[l+2];v=s.components.push({h:E,v:R,quantizationId:L,quantizationTable:null}),s.componentIds[T]=v-1,l+=3}s.maxH=I,s.maxV=P,i(s);break;case 65476:var U=o();for(C=2;C<U;){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:o(),a=o();break;case 65498:o();var N,_=r[l++],F=[];for(C=0;C<_;C++){var V=s.componentIds[r[l++]];N=s.components[V];var z=r[l++];N.huffmanTableDC=y[z>>4],N.huffmanTableAC=d[15&z],F.push(N)}var j=r[l++],W=r[l++],Z=r[l++],H=p(r,l,s,F,a,j,W,Z>>4,15&Z);l+=H;break;case 65535:255!==r[l]&&l--;break;default:if(255===r[l-3]&&r[l-2]>=192&&r[l-2]<=254){l-=3;break}throw new t("unknown marker "+w.toString(16))}w=o()}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,o,n,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(o=(r=this.components[l]).scaleX*p,n=r.scaleY*d,m=l,f=r.output,i=r.blocksPerLine+1<<3,s=0;s<t;s++)u=0|s*o,C[s]=(u&b)<<3|7&u;for(a=0;a<e;a++)for(h=i*((u=0|a*n)&b)|(7&u)<<3,s=0;s<t;s++)w[m]=f[h+C[s]],m+=g}var v=this.decodeTransform;if(v)for(l=0;l<y;)for(u=0,c=0;u<g;u++,l++,c+=2)w[l]=(w[l]*v[c]>>8)+v[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,o,n=0,i=t.length;n<i;n+=3)e=t[n],r=t[n+1],o=t[n+2],t[n]=e-179.456+1.402*o,t[n+1]=e+135.459-.344*r-.714*o,t[n+2]=e-226.816+1.772*r;return t},_convertYcckToRgb:function(t){for(var e,r,o,n,i=0,s=0,a=t.length;s<a;s+=4)e=t[s],r=t[s+1],o=t[s+2],n=t[s+3],t[i++]=r*(-660635669420364e-19*r+.000437130475926232*o-54080610064599e-18*e+.00048449797120281*n-.154362151871126)-122.67195406894+o*(-.000957964378445773*o+.000817076911346625*e-.00477271405408747*n+1.53380253221734)+e*(.000961250184130688*e-.00266257332283933*n+.48357088451265)+n*(-.000336197177618394*n+.484791561490776),t[i++]=107.268039397724+r*(219927104525741e-19*r-.000640992018297945*o+.000659397001245577*e+.000426105652938837*n-.176491792462875)+o*(-.000778269941513683*o+.00130872261408275*e+.000770482631801132*n-.151051492775562)+e*(.00126935368114843*e-.00265090189010898*n+.25802910206845)+n*(-.000318913117588328*n-.213742400323665),t[i++]=r*(-.000570115196973677*r-263409051004589e-19*o+.0020741088115012*e-.00288260236853442*n+.814272968359295)-20.810012546947+o*(-153496057440975e-19*o-.000132689043961446*e+.000560833691242812*n-.195152027534049)+e*(.00174418132927582*e-.00255243321439347*n+.116935020465145)+n*(-.000343531996510555*n+.24165260232407);return t},_convertYcckToCmyk:function(t){for(var e,r,o,n=0,i=t.length;n<i;n+=4)e=t[n],r=t[n+1],o=t[n+2],t[n]=434.456-e-1.402*o,t[n+1]=119.541-e+.344*r+.714*o,t[n+2]=481.816-e-1.772*r;return t},_convertCmykToRgb:function(t){for(var e,r,o,n,i=0,s=1/255,a=0,l=t.length;a<l;a+=4)e=t[a]*s,r=t[a+1]*s,o=t[a+2]*s,n=t[a+3]*s,t[i++]=255+e*(-4.387332384609988*e+54.48615194189176*r+18.82290502165302*o+212.25662451639585*n-285.2331026137004)+r*(1.7149763477362134*r-5.6096736904047315*o-17.873870861415444*n-5.497006427196366)+o*(-2.5217340131683033*o-21.248923337353073*n+17.5119270841813)-n*(21.86122147463605*n+189.48180835922747),t[i++]=255+e*(8.841041422036149*e+60.118027045597366*r+6.871425592049007*o+31.159100130055922*n-79.2970844816548)+r*(-15.310361306967817*r+17.575251261109482*o+131.35250912493976*n-190.9453302588951)+o*(4.444339102852739*o+9.8632861493405*n-24.86741582555878)-n*(20.737325471181034*n+187.80453709719578),t[i++]=255+e*(.8842522430003296*e+8.078677503112928*r+30.89978309703729*o-.23883238689178934*n-14.183576799673286)+r*(10.49593273432072*r+63.02378494754052*o+50.606957656360734*n-112.23884253719248)+o*(.03296041114873217*o+115.60384449646641*n-193.58209356861505)-n*(22.33816807309886*n+180.12613974708367);return t},getData:function(e,r,o){if(this.numComponents>4)throw new t("Unsupported color mode");var n=this._getLinearizedBlockData(e,r);if(1===this.numComponents&&o){for(var i=n.length,s=new Uint8ClampedArray(3*i),a=0,l=0;l<i;l++){var u=n[l];s[a++]=u,s[a++]=u,s[a++]=u}return s}if(3===this.numComponents&&this._isColorConversionNeeded())return this._convertYccToRgb(n);if(4===this.numComponents){if(this._isColorConversionNeeded())return o?this._convertYcckToRgb(n):this._convertYcckToCmyk(n);if(o)return this._convertCmykToRgb(n)}return n}},c}()},void 0!==(i=n())&&(o.exports=i);const l=(0,s.g)(a.exports)},68060:(t,e,r)=>{r.d(e,{Z:()=>l});var o,n,i,s=r(11053),a={exports:{}};n=a,void 0!==(o=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 o=512;o<t;)o<<=1;for(var n=new Uint8Array(o),i=0;i<r;++i)n[i]=e[i];return this.buffer=n},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 o=this.bufferLength;r>o&&(r=o)}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 o=t+e;this.bufferLength<=o&&!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}(),i=function(){if(!self||!self.Uint32Array)return null;var t=new Uint32Array([16,17,18,0,8,7,9,6,10,5,11,4,12,3,13,2,14,1,15]),e=new Uint32Array([3,4,5,6,7,8,9,10,65547,65549,65551,65553,131091,131095,131099,131103,196643,196651,196659,196667,262211,262227,262243,262259,327811,327843,327875,327907,258,258,258]),r=new Uint32Array([1,2,3,4,65541,65543,131081,131085,196625,196633,262177,262193,327745,327777,393345,393409,459009,459137,524801,525057,590849,591361,657409,658433,724993,727041,794625,798721,868353,876545]),n=[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(t){var e=0,r=t[e++],n=t[e++];-1!=r&&-1!=n||s("Invalid header in flate stream"),8!=(15&r)&&s("Unknown compression method in flate stream"),((r<<8)+n)%31!=0&&s("Bad FCHECK in flate stream"),32&n&&s("FDICT bit set in flate stream"),this.bytes=t,this.bytesPos=2,this.codeSize=0,this.codeBuf=0,o.call(this)}return a.prototype=Object.create(o.prototype),a.prototype.getBits=function(t){for(var e,r=this.codeSize,o=this.codeBuf,n=this.bytes,i=this.bytesPos;r<t;)void 0===(e=n[i++])&&s("Bad encoding in flate stream"),o|=e<<r,r+=8;return e=o&(1<<t)-1,this.codeBuf=o>>t,this.codeSize=r-=t,this.bytesPos=i,e},a.prototype.getCode=function(t){for(var e=t[0],r=t[1],o=this.codeSize,n=this.codeBuf,i=this.bytes,a=this.bytesPos;o<r;){var l;void 0===(l=i[a++])&&s("Bad encoding in flate stream"),n|=l<<o,o+=8}var u=e[n&(1<<r)-1],c=u>>16,h=65535&u;return(0==o||o<c||0==c)&&s("Bad encoding in flate stream"),this.codeBuf=n>>c,this.codeSize=o-c,this.bytesPos=a,h},a.prototype.generateHuffmanTable=function(t){for(var e=t.length,r=0,o=0;o<e;++o)t[o]>r&&(r=t[o]);for(var n=1<<r,i=new Uint32Array(n),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(o=0;o<s;++o)c=c<<1|1&h,h>>=1;for(o=c;o<n;o+=l)i[o]=s<<16|u;++a}return[i,r]},a.prototype.readBlock=function(){function o(t,e,r,o,n){for(var i=t.getBits(r)+o;i-- >0;)e[d++]=n}var a=this.getBits(3);if(1&a&&(this.eof=!0),0!=(a>>=1)){var l,u;if(1==a)l=n,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(t.length),d=0;d<f;)p[t[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?o(this,w,2,3,g):17==C?o(this,w,3,3,g=0):18==C?o(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=(L=this.buffer)?L.length:0,v=this.bufferLength;;){var x=this.getCode(l);if(x<256)v+1>=b&&(b=(L=this.ensureBuffer(v+1)).length),L[v++]=x;else{if(256==x)return void(this.bufferLength=v);var A=(x=e[x-=257])>>16;A>0&&(A=this.getBits(A)),g=(65535&x)+A,x=this.getCode(u),(A=(x=r[x])>>16)>0&&(A=this.getBits(A));var k=(65535&x)+A;v+g>=b&&(b=(L=this.ensureBuffer(v+g)).length);for(var S=0;S<g;++S,++v)L[v]=L[v-k]}}}else{var T,M=this.bytes,I=this.bytesPos;void 0===(T=M[I++])&&s("Bad block header in flate stream");var P=T;void 0===(T=M[I++])&&s("Bad block header in flate stream"),P|=T<<8,void 0===(T=M[I++])&&s("Bad block header in flate stream");var E=T;void 0===(T=M[I++])&&s("Bad block header in flate stream"),(E|=T<<8)!=(65535&~P)&&s("Bad uncompressed block length in flate stream"),this.codeBuf=0,this.codeSize=0;var R=this.bufferLength,L=this.ensureBuffer(R+P),U=R+P;this.bufferLength=U;for(var D=R;D<U;++D){if(void 0===(T=M[I++])){this.eof=!0;break}L[D]=T}this.bytesPos=I}},a}())&&(n.exports=i);const l=(0,s.g)(a.exports)},14140:(t,e,r)=>{r.d(e,{A:()=>m});var o,n=r(90237),i=r(49186),s=r(25482),a=r(4718),l=r(53966),u=r(10107),c=r(79901),h=r(40608),f=r(4151),p=r(16019);let d=o=class extends s.oY{static createEmptyBand(t,e){return new(o.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 o=0;o<t.length;o++){const n=t[o];for(let t=0;t<e;t++)n[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,o=-1/0;const n=t.length;let i,s=0;if(null!=e)for(i=0;i<n;i++)e[i]&&(s=t[i],r=s<r?s:r,o=s>o?s:o);else for(i=0;i<n;i++)s=t[i],r=s<r?s:r,o=s>o?s:o;return new f.z(r,o)}(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),n=this.pixels,i=this.width*this.height,s=n.length;let a,l,u;const c=[];for(let h=0;h<s;h++){u=o.createEmptyBand(t,i),a=n[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 n=e.length,i=t.some((t=>t>=e.length)),s=n===t.length&&!t.some(((t,e)=>t!==e));if(i||s)return this;const a=this.bandMasks?.length===n?t.map((t=>this.bandMasks[t])):void 0;let{mask:l,validPixelCount:u}=this;const{width:c,height:h}=this;return a?.length&&(l=o.combineBandMasks(a),u=l.filter((t=>!!t)).length),new o({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 o({width:this.width,height:this.height,pixelType:this.pixelType,maskIsAlpha:this.maskIsAlpha,validPixelCount:this.validPixelCount});let e;null!=this.mask&&(t.mask=new Uint8Array(this.mask)),this.bandMasks&&(t.bandMasks=this.bandMasks.map((t=>new Uint8Array(t))));const r=o.getPixelArrayConstructor(this.pixelType);if(this.pixels&&this.pixels.length>0){t.pixels=[];const o=!!this.pixels[0].slice;for(e=0;e<this.pixels.length;e++)t.pixels[e]=o?this.pixels[e].slice(0,this.pixels[e].length):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.premultiplyAlpha=this.premultiplyAlpha,t}_fillFrom8Bit(t){const{mask:e,maskIsAlpha:r,premultiplyAlpha:o,pixels:n}=this;if(!t||!n?.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=n[0],n.length>=3?(s=n[1],a=n[2]):2===n.length&&(s=n[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]=o?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:o}=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 n=this.pixelType;let i=1,s=0,a=1;if(o&&o.length>0){for(const t of o)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"===n?(s=-128,t=127):"u16"===n?t=65535:"s16"===n?(s=-32768,t=32767):"u32"===n?t=4294967295:"s32"===n?(s=-2147483648,t=2147483647):"f32"===n?(s=-34e38,t=34e38):"f64"===n&&(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 o,n,i,s;o=n=i=e[0],e.length>=3?(n=e[1],i=e[2]):2===e.length&&(n=e[1]);const a=this.width*this.height;if(o.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++]=o[s],t[u++]=n[s],t[u++]=i[s],t[u++]=1&r[s];else for(s=0;s<a;s++)t[u++]=o[s],t[u++]=n[s],t[u++]=i[s],t[u++]=1}};(0,n._)([(0,u.MZ)({json:{write:!0}})],d.prototype,"width",void 0),(0,n._)([(0,u.MZ)({json:{write:!0}})],d.prototype,"height",void 0),(0,n._)([(0,u.MZ)({json:{write:!0}})],d.prototype,"pixelType",void 0),(0,n._)([(0,c.w)("pixelType")],d.prototype,"castPixelType",null),(0,n._)([(0,u.MZ)({json:{write:!0}})],d.prototype,"validPixelCount",void 0),(0,n._)([(0,u.MZ)({json:{write:!0}})],d.prototype,"mask",void 0),(0,n._)([(0,u.MZ)({json:{write:!0}})],d.prototype,"maskIsAlpha",void 0),(0,n._)([(0,u.MZ)({json:{write:!0}})],d.prototype,"pixels",void 0),(0,n._)([(0,u.MZ)()],d.prototype,"premultiplyAlpha",void 0),(0,n._)([(0,u.MZ)({json:{write:!0}})],d.prototype,"statistics",void 0),(0,n._)([(0,u.MZ)({json:{write:!0}})],d.prototype,"depthCount",void 0),(0,n._)([(0,u.MZ)({json:{write:!0}})],d.prototype,"noDataValues",void 0),(0,n._)([(0,u.MZ)({json:{write:!0}})],d.prototype,"bandMasks",void 0),d=o=(0,n._)([(0,h.$)("esri.layers.support.PixelBlock")],d);const m=d},87186:(t,e,r)=>{r.d(e,{A:()=>A});var o,n=r(90237),i=r(25482),s=r(4718),a=r(10107),l=(r(44208),r(53966),r(40608)),u=r(5443),c=r(16930);function h(t){return t=Number(t),isNaN(t)?void 0:t}r(87811);let f=o=class extends i.oY{constructor(){super(...arguments),this.name=null,this.minWavelength=void 0,this.maxWavelength=void 0,this.radianceBias=void 0,this.radianceGain=void 0,this.reflectanceBias=void 0,this.reflectanceGain=void 0,this.solarIrradiance=void 0}clone(){return new o({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,n._)([(0,a.MZ)({json:{name:"BandName",write:!0}})],f.prototype,"name",void 0),(0,n._)([(0,a.MZ)({json:{name:"WavelengthMin",read:{reader:h},write:!0}})],f.prototype,"minWavelength",void 0),(0,n._)([(0,a.MZ)({json:{name:"WavelengthMax",read:{reader:h},write:!0}})],f.prototype,"maxWavelength",void 0),(0,n._)([(0,a.MZ)({json:{name:"RadianceBias",read:{reader:h},write:!0}})],f.prototype,"radianceBias",void 0),(0,n._)([(0,a.MZ)({json:{name:"RadianceGain",read:{reader:h},write:!0}})],f.prototype,"radianceGain",void 0),(0,n._)([(0,a.MZ)({json:{name:"ReflectanceBias",read:{reader:h},write:!0}})],f.prototype,"reflectanceBias",void 0),(0,n._)([(0,a.MZ)({json:{name:"ReflectanceGain",read:{reader:h},write:!0}})],f.prototype,"reflectanceGain",void 0),(0,n._)([(0,a.MZ)({json:{name:"SolarIrradiance",read:{reader:h},write:!0}})],f.prototype,"solarIrradiance",void 0),f=o=(0,n._)([(0,l.$)("esri.layers.support.RasterBandInfo")],f);const p=f;var d,m=r(36005),g=r(43937);function y(t){return t=Number(t),isNaN(t)?void 0:t}let w=d=class extends i.oY{constructor(){super(...arguments),this.acquisitionDate=void 0,this.cloudCover=void 0,this.productName=void 0,this.sensorName=null,this.sensorAzimuth=void 0,this.sensorElevation=void 0,this.sunAzimuth=void 0,this.sunElevation=void 0}readAcquisitionDate(t){return new Date(t)}writeAcquisitionDate(t,e){e.AcquisitionDate=t.getTime()}clone(){return new d({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,n._)([(0,a.MZ)({json:{name:"AcquisitionDate",write:!0}})],w.prototype,"acquisitionDate",void 0),(0,n._)([(0,m.w)("acquisitionDate")],w.prototype,"readAcquisitionDate",null),(0,n._)([(0,g.K)("acquisitionDate")],w.prototype,"writeAcquisitionDate",null),(0,n._)([(0,a.MZ)({json:{name:"CloudCover",read:{reader:y},write:!0}})],w.prototype,"cloudCover",void 0),(0,n._)([(0,a.MZ)({json:{name:"ProductName",write:!0}})],w.prototype,"productName",void 0),(0,n._)([(0,a.MZ)({json:{name:"SensorName",write:!0}})],w.prototype,"sensorName",void 0),(0,n._)([(0,a.MZ)({json:{name:"SensorAzimuth",read:{reader:y},write:!0}})],w.prototype,"sensorAzimuth",void 0),(0,n._)([(0,a.MZ)({json:{name:"SensorElevation",read:{reader:y},write:!0}})],w.prototype,"sensorElevation",void 0),(0,n._)([(0,a.MZ)({json:{name:"SunAzimuth",read:{reader:y},write:!0}})],w.prototype,"sunAzimuth",void 0),(0,n._)([(0,a.MZ)({json:{name:"SunElevation",read:{reader:y},write:!0}})],w.prototype,"sunElevation",void 0),w=d=(0,n._)([(0,l.$)("esri.layers.support.RasterSensorInfo")],w);const C=w;var b,v=r(20223);let x=b=class extends i.oY{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 p({name:"band_"+r}));return t}const r=t.map((t=>p.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 C.fromJSON(this.keyProperties)}clone(){return new b({attributeTable:(0,s.o8)(this.attributeTable),bandCount:this.bandCount,colormap:(0,s.o8)(this.colormap),extent:(0,s.o8)(this.extent),nativePixelSize:(0,s.o8)(this.nativePixelSize),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,n._)([(0,a.MZ)({json:{write:!0}})],x.prototype,"attributeTable",void 0),(0,n._)([(0,a.MZ)({json:{write:!0}})],x.prototype,"bandCount",void 0),(0,n._)([(0,a.MZ)({readOnly:!0})],x.prototype,"bandInfos",null),(0,n._)([(0,a.MZ)({json:{write:!0}})],x.prototype,"colormap",void 0),(0,n._)([(0,a.MZ)({type:String,readOnly:!0})],x.prototype,"dataType",null),(0,n._)([(0,a.MZ)({type:u.A,json:{write:!0}})],x.prototype,"extent",void 0),(0,n._)([(0,a.MZ)({type:u.A,json:{write:!0}})],x.prototype,"nativeExtent",null),(0,n._)([(0,a.MZ)({json:{write:!0}})],x.prototype,"nativePixelSize",null),(0,n._)([(0,a.MZ)({json:{write:!0}})],x.prototype,"format",void 0),(0,n._)([(0,a.MZ)({json:{write:!0}})],x.prototype,"height",void 0),(0,n._)([(0,a.MZ)({json:{write:!0}})],x.prototype,"width",void 0),(0,n._)([(0,a.MZ)({json:{write:!0}})],x.prototype,"hasMultidimensionalTranspose",null),(0,n._)([(0,a.MZ)({json:{write:!0}})],x.prototype,"histograms",void 0),(0,n._)([(0,a.MZ)({json:{write:!0}})],x.prototype,"keyProperties",void 0),(0,n._)([(0,a.MZ)({json:{write:!0}})],x.prototype,"multidimensionalInfo",void 0),(0,n._)([(0,a.MZ)({json:{write:!0}})],x.prototype,"noDataValue",void 0),(0,n._)([(0,a.MZ)({json:{write:!0}})],x.prototype,"pixelSize",void 0),(0,n._)([(0,a.MZ)({json:{write:!0}})],x.prototype,"pixelType",void 0),(0,n._)([(0,a.MZ)()],x.prototype,"isPseudoSpatialReference",void 0),(0,n._)([(0,a.MZ)({readOnly:!0})],x.prototype,"sensorInfo",null),(0,n._)([(0,a.MZ)({type:c.A,json:{write:!0}})],x.prototype,"spatialReference",void 0),(0,n._)([(0,a.MZ)({json:{write:!0}})],x.prototype,"statistics",void 0),(0,n._)([(0,a.MZ)({type:v.A,json:{write:!0}})],x.prototype,"storageInfo",void 0),(0,n._)([(0,a.MZ)({json:{write:!0}})],x.prototype,"transform",void 0),x=b=(0,n._)([(0,l.$)("esri.layers.support.RasterInfo")],x);const A=x},20223:(t,e,r)=>{r.d(e,{A:()=>h});var o,n=r(90237),i=r(25482),s=r(4718),a=r(10107),l=(r(44208),r(53966),r(40608)),u=r(86738);let c=o=class extends i.oY{constructor(){super(...arguments),this.blockWidth=void 0,this.blockHeight=void 0,this.compression=null,this.origin=null,this.firstPyramidLevel=null,this.maximumPyramidLevel=null,this.pyramidScalingFactor=2,this.pyramidBlockWidth=null,this.pyramidBlockHeight=null,this.isVirtualTileInfo=!1,this.tileInfo=null,this.transposeInfo=null,this.blockBoundary=null}clone(){return new o({blockWidth:this.blockWidth,blockHeight:this.blockHeight,compression:this.compression,origin:(0,s.o8)(this.origin),firstPyramidLevel:this.firstPyramidLevel,maximumPyramidLevel:this.maximumPyramidLevel,pyramidResolutions:(0,s.o8)(this.pyramidResolutions),pyramidScalingFactor:this.pyramidScalingFactor,pyramidBlockWidth:this.pyramidBlockWidth,pyramidBlockHeight:this.pyramidBlockHeight,isVirtualTileInfo:this.isVirtualTileInfo,tileInfo:(0,s.o8)(this.tileInfo),transposeInfo:(0,s.o8)(this.transposeInfo),blockBoundary:(0,s.o8)(this.blockBoundary)})}};(0,n._)([(0,a.MZ)({type:Number,json:{write:!0}})],c.prototype,"blockWidth",void 0),(0,n._)([(0,a.MZ)({type:Number,json:{write:!0}})],c.prototype,"blockHeight",void 0),(0,n._)([(0,a.MZ)({type:String,json:{write:!0}})],c.prototype,"compression",void 0),(0,n._)([(0,a.MZ)({type:u.A,json:{write:!0}})],c.prototype,"origin",void 0),(0,n._)([(0,a.MZ)({type:Number,json:{write:!0}})],c.prototype,"firstPyramidLevel",void 0),(0,n._)([(0,a.MZ)({type:Number,json:{write:!0}})],c.prototype,"maximumPyramidLevel",void 0),(0,n._)([(0,a.MZ)({json:{write:!0}})],c.prototype,"pyramidResolutions",void 0),(0,n._)([(0,a.MZ)({type:Number,json:{write:!0}})],c.prototype,"pyramidScalingFactor",void 0),(0,n._)([(0,a.MZ)({type:Number,json:{write:!0}})],c.prototype,"pyramidBlockWidth",void 0),(0,n._)([(0,a.MZ)({type:Number,json:{write:!0}})],c.prototype,"pyramidBlockHeight",void 0),(0,n._)([(0,a.MZ)({type:Boolean,json:{write:!0}})],c.prototype,"isVirtualTileInfo",void 0),(0,n._)([(0,a.MZ)({json:{write:!0}})],c.prototype,"tileInfo",void 0),(0,n._)([(0,a.MZ)()],c.prototype,"transposeInfo",void 0),(0,n._)([(0,a.MZ)()],c.prototype,"blockBoundary",void 0),c=o=(0,n._)([(0,l.$)("esri.layers.support.RasterStorageInfo")],c);const h=c},4151:(t,e,r)=>{r.d(e,{z:()=>o});class o{constructor(t=null,e=null,r=null){this.minValue=t,this.maxValue=e,this.noDataValue=r}}},15265:(t,e,r)=>{function o(t,e){let r=0,o="",n=0,i=0;const s=t.length;for(;r<s;)i=t[r++],n=i>>4,n<8?n=1:15===n?(n=4,i=(7&i)<<18|(63&t[r++])<<12|(63&t[r++])<<6|63&t[r++]):14===n?(n=3,i=(15&i)<<12|(63&t[r++])<<6|63&t[r++]):(n=2,i=(31&i)<<6|63&t[r++]),(0!==i||e)&&(o+=String.fromCharCode(i));return o}r.d(e,{w:()=>o})},49589:(t,e,r)=>{r.d(e,{D4:()=>c,Hh:()=>s});var o=r(2741);const n=[{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,o.s)(`esri/layers/support/rasterFormats/${t}`)}))).then((t=>{!function(t){const{_malloc:e,_free:r,_lerc_getBlobInfo:o,_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))),o=r.reduce(((t,e)=>t+e)),n=e(o);c=new Uint8Array(h.buffer);let i=r[0];r[0]=n;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),n=new Uint8Array(24),[s,a,u]=f([t.length,e.length,n.length]);c.set(t,s),c.set(e,a),c.set(n,u);let p=o(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,n);const d=new Uint32Array(e.buffer),m=new Float64Array(n.buffer),[g,y,,w,C,b,v,x,A,k,S]=d,T={version:g,depthCount:k,width:w,height:C,validPixelCount:v,bandCount:b,blobSize:x,maskCount:A,dataType:y,minValue:m[0],maxValue:m[1],maxZerror:m[2],statistics:[],bandCountWithNoData:S};if(S&&k>1)return r(s),T;if(1===k&&1===b)return r(s),T.statistics.push({minValue:m[0],maxValue:m[1]}),T;const M=k*b*8,I=new Uint8Array(M),P=new Uint8Array(M);let E=s,R=0,L=0,U=!1;if(c.byteLength<s+2*M?(r(s),U=!0,[E,R,L]=f([t.length,M,M]),c.set(t,E)):[R,L]=f([M,M]),c.set(I,R),c.set(P,L),p=i(E,t.length,k,b,R,L),p)throw r(E),U||r(R),new Error(`lerc-getDataRanges: error code is ${p}`);c=new Uint8Array(h.buffer),l(c,R,I),l(c,L,P);const D=new Float64Array(I.buffer),O=new Float64Array(P.buffer),B=T.statistics;for(let t=0;t<b;t++)if(k>1){const e=D.slice(t*k,(t+1)*k),r=O.slice(t*k,(t+1)*k),o=Math.min.apply(null,e),n=Math.max.apply(null,r);B.push({minValue:o,maxValue:n,depthStats:{minValues:e,maxValues:r}})}else B.push({minValue:D[t],maxValue:O[t]});return r(E),U||r(R),T},a.decode=(t,e)=>{const{maskCount:o,depthCount:i,bandCount:a,width:u,height:p,dataType:d,bandCountWithNoData:m}=e,g=n[d],y=u*p,w=new Uint8Array(y*a),C=y*i*a*g.size,b=new Uint8Array(C),v=new Uint8Array(a),x=new Uint8Array(8*a),[A,k,S,T,M]=f([t.length,w.length,b.length,v.length,x.length]);c.set(t,A),c.set(w,k),c.set(b,S),c.set(v,T),c.set(x,M);const I=s(A,t.length,o,k,i,u,p,a,d,S,T,M);if(I)throw r(A),new Error(`lerc-decode: error code is ${I}`);c=new Uint8Array(h.buffer),l(c,S,b),l(c,k,w);let P=null;if(m){l(c,T,v),l(c,M,x),P=[];const t=new Float64Array(x.buffer);for(let e=0;e<v.length;e++)P.push(v[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,o,n){if(r<2)return t;const i=new o(e*r);if(n)for(let o=0,n=0;o<e;o++)for(let s=0,a=o;s<r;s++,a+=e)i[a]=t[n++];else for(let o=0,n=0;o<e;o++)for(let s=0,a=o;s<r;s++,a+=e)i[n++]=t[a];return i}function c(t,e={}){const r=e.inputOffset??0,o=t instanceof Uint8Array?t.subarray(r):new Uint8Array(t,r),i=a.getBlobInfo(o),{data:s,maskData:l,noDataValues:c}=a.decode(o,i),{width:h,height:f,bandCount:p,depthCount:d,dataType:m,maskCount:g,statistics:y}=i,w=n[m],C=new w.ctor(s.buffer),b=[],v=[],x=h*f,A=x*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,x,d,w.ctor,!0);b.push(t)}v.push(l.subarray(t*A,(t+1)*A))}const k=0===g?null:1===g?v[0]:new Uint8Array(x);if(g>1){k.set(v[0]);for(let t=1;t<v.length;t++){const e=v[t];for(let t=0;t<x;t++)k[t]=k[t]&e[t]}}const{noDataValue:S}=e,T=null!=S&&w.range[0]<=S&&w.range[1]>=S;if(g>0&&T)for(let t=0;t<p;t++){const e=b[t],r=v[t]||k;for(let t=0;t<x;t++)0===r[t]&&(e[t]=S)}const M=g===p&&p>1?v:null,{pixelType:I}=w;return{width:h,height:f,bandCount:p,pixelType:I,depthCount:d,statistics:y,pixels:b,mask:k,bandMasks:M,noDataValues:c}}},56582:(t,e,r)=>{function o(){const t=[];for(let e=0;e<=257;e++)t[e]=[e];return t}function n(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,o=!0){if(e%4!=0||r%4!=0){const n=new ArrayBuffer(4*Math.ceil(r/4)),i=new Uint8Array(n),s=new Uint8Array(t,e,r);if(o)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(o){const o=new Uint8Array(t,e,r),n=new Uint8Array(o.length);for(let t=0;t<n.length;t+=4)n[t]=o[t+3],n[t+1]=o[t+2],n[t+2]=o[t+1],n[t+3]=o[t];return new Uint32Array(n.buffer)}return new Uint32Array(t,e,r/4)}(t,e,r,s);let l=9,u=o(),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=o(),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(),n(w,f)}else n(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)},51244:(t,e,r)=>{r.d(e,{D:()=>L,g:()=>R});var o=r(49186),n=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 o.A("imagecanvasdecoder: decode","required a valid encoded data as input.");let{width:n=0,height:i=0,format:s}=e;const{applyJpegMask:l}=e;if(l&&(!n||!i))throw new o.A("imagecanvasdecoder: decode","image width and height are needed to apply jpeg mask directly to canvas");return new Promise(((o,c)=>{let h=null;"jpg"===s&&l&&(h=u._getMask(t,{width:n,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)());n=d.width,i=d.height,this._canvas&&this._ctx?(this._canvas.width===n&&this._canvas.height===i||(this._canvas.width=n,this._canvas.height=i),this._ctx.clearRect(0,0,n,i)):(this._canvas=document.createElement("canvas"),this._canvas.width=n,this._canvas.height=i,this._ctx=this._canvas.getContext("2d")),this._ctx.drawImage(d,0,0);const t=this._ctx.getImageData(0,0,n,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 o(null)}const l=n*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];o({width:n,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 o=new Uint8Array(t),n=Math.ceil(o.length/2);let i=0;const s=o.length-2;for(i=n;i<s&&(255!==o[i]||217!==o[i+1]);i++);if(i+=2,i<o.length-1){const t=new l.Z(o.subarray(i)).getBytes();r=new Uint8Array(e.width*e.height);let n=0;for(let e=0;e<t.length;e++)for(let o=7;o>=0;o--)r[n++]=t[e]>>o&1}}catch(t){}return r}}var c=r(61294);class h{static decode(t,e=!1){const r=new Uint8Array(t),o=new c.J;o.parse(r);const{width:n,height:i,numComponents:s,eof:a}=o,u=o.getData(n,i,!0),h=n*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===n*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:n,height:i,pixels:f,mask:p}}}var f=r(49589),p=r(56582),d=r(16019);const m=(t,e)=>{const r=e.width*e.height,o=e.pixelType;return Math.floor(t.byteLength/(r*g(o)))},g=t=>{let e=1;switch(t){case Uint8Array:case Int8Array:e=1;break;case Uint16Array:case Int16Array:e=2;break;case Uint32Array:case Int32Array:case Float32Array:e=4;break;case Float64Array:e=8}return e};class y{static decode(t,e){const r=e.pixelType,o=[],n=e.width*e.height,i=m(t,e),{bandIds:s,format:a}=e,l=s?.length||m(t,e),u=t.byteLength-t.byteLength%(n*g(r)),c=new r(t,0,n*i);let h,f,p,d,y=null;if("bip"===a)for(h=0;h<l;h++){for(p=new r(n),d=s?s[h]:h,f=0;f<n;f++)p[f]=c[f*i+d];o.push(p)}else if("bsq"===a)for(h=0;h<l;h++)d=s?s[h]:h,o.push(c.subarray(d*n,(d+1)*n));return u<t.byteLength-1&&(y=((t,e)=>{if(8*t.byteLength<e)return null;const r=new Uint8Array(t,0,Math.ceil(e/8)),o=new Uint8Array(e);let n=0,i=0,s=0,a=0;for(s=0;s<r.length-1;s++)for(i=r[s],a=7;a>=0;a--)o[n++]=i>>a&1;for(a=7;n<e-1;)i=r[r.length-1],o[n++]=i>>a&1,a--;return o})(t.slice(u),n)),{pixels:o,mask:y}}}var w=r(45664),C=r(47124),b=function(t){var e,r,o;function n(t){var e,r,o,n,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()},n=this.readUInt16(),o=this.readUInt16()||100,i.delay=1e3*n/o,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 n.load=function(t,e,r){var o;return"function"==typeof e&&(r=e),(o=new XMLHttpRequest).open("GET",t,!0),o.responseType="arraybuffer",o.onload=function(){var t;return t=new n(new Uint8Array(o.response||o.mozResponseArrayBuffer)),"function"==typeof(null!=e?e.getContext:void 0)&&t.render(e),"function"==typeof r?r(t):void 0},o.send(null)},n.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},n.prototype.readUInt32=function(){return this.data[this.pos++]<<24|this.data[this.pos++]<<16|this.data[this.pos++]<<8|this.data[this.pos++]},n.prototype.readUInt16=function(){return this.data[this.pos++]<<8|this.data[this.pos++]},n.prototype.decodePixels=function(t){var e,r,o,n,i,s,a,u,c,h,f,p,d,m,g,y,w,C,b,v,x,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(n=b=0;b<y;n=b+=1)d[r++]=t[m++];break;case 1:for(n=v=0;v<y;n=v+=1)e=t[m++],i=n<p?0:d[r-p],d[r++]=(e+i)%256;break;case 2:for(n=x=0;x<y;n=x+=1)e=t[m++],o=(n-n%p)/p,w=g&&d[(g-1)*y+o*p+n%p],d[r++]=(w+e)%256;break;case 3:for(n=A=0;A<y;n=A+=1)e=t[m++],o=(n-n%p)/p,i=n<p?0:d[r-p],w=g&&d[(g-1)*y+o*p+n%p],d[r++]=(e+Math.floor((i+w)/2))%256;break;case 4:for(n=k=0;k<y;n=k+=1)e=t[m++],o=(n-n%p)/p,i=n<p?0:d[r-p],0===g?w=C=0:(w=d[(g-1)*y+o*p+n%p],C=o&&d[(g-1)*y+(o-1)*p+n%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},n.prototype.decodePalette=function(){var t,e,r,o,n,i,s,a,l;for(r=this.palette,i=this.transparency.indexed||[],n=new Uint8Array((i.length||0)+r.length),o=0,r.length,t=0,e=s=0,a=r.length;s<a;e=s+=3)n[o++]=r[e],n[o++]=r[e+1],n[o++]=r[e+2],n[o++]=null!=(l=i[t++])?l:255;return n},n.prototype.copyToImageData=function(t,e){var r,o,n,i,s,a,l,u,c,h,f;if(o=this.colors,c=null,r=this.hasAlphaChannel,this.palette.length&&(c=null!=(f=this._decodedPalette)?f:this._decodedPalette=this.decodePalette(),o=4,r=!0),u=(n=t.data||t).length,s=c||e,i=a=0,1===o)for(;i<u;)l=c?4*e[i/4]:a,h=s[l++],n[i++]=h,n[i++]=h,n[i++]=h,n[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,n[i++]=s[l++],n[i++]=s[l++],n[i++]=s[l++],n[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},n.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"),o=r&&r.getContext("2d"),e=function(t){var e;return o.width=t.width,o.height=t.height,o.clearRect(0,0,t.width,t.height),o.putImageData(t,0,0),(e=new Image).src=r.toDataURL(),e},n.prototype.decodeFrames=function(t){var r,o,n,i,s,a,l,u;if(this.animation){for(u=[],o=s=0,a=(l=this.animation.frames).length;s<a;o=++s)r=l[o],n=t.createImageData(r.width,r.height),i=this.decodePixels(new Uint8Array(r.data)),this.copyToImageData(n,i),r.imageData=n,u.push(r.image=e(n));return u}},n.prototype.renderFrame=function(t,e){var r,o,n;return r=(o=this.animation.frames)[e],n=o[e-1],0===e&&t.clearRect(0,0,this.width,this.height),1===(null!=n?n.disposeOp:void 0)?t.clearRect(n.xOffset,n.yOffset,n.width,n.height):2===(null!=n?n.disposeOp:void 0)&&t.putImageData(n.imageData,n.xOffset,n.yOffset),0===r.blendOp&&t.clearRect(r.xOffset,r.yOffset,r.width,r.height),t.drawImage(r.image,r.xOffset,r.yOffset)},n.prototype.animate=function(t){var e,r,o,n,i,s,a=this;return r=0,s=this.animation,n=s.numFrames,o=s.frames,i=s.numPlays,(e=function(){var s,l;if(s=r++%n,l=o[s],a.renderFrame(t,s),n>1&&r/n<i)return a.animation._timeout=setTimeout(e,l.delay)})()},n.prototype.stopAnimation=function(){var t;return clearTimeout(null!=(t=this.animation)?t._timeout:void 0)},n.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))},n}(self);const v=new Set(["jpg","png","bmp","gif"]);async function x(t,e){if(!C.Z)throw new o.A("rasterCoded:decode","lerc decoder is not supported on big endian platform");await(0,f.Hh)();const{offset:r}=e,{width:n,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:n,height:a,pixelType:l.toLowerCase(),pixels:d,mask:m,statistics:u.map((({minValue:t,maxValue:e})=>new s.z(t,e))),bandMasks:p,depthCount:c,noDataValues:h});return u?.length||g.updateStatistics(),g}async function A(t,e){const r=await(0,w.D4)(t,{...e,noDataValue:null});(0,n.Lw)(r);const o=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 o.updateStatistics(),o}function k(t,e){const r=e.pixelType||"u8",o=i.A.getPixelArrayConstructor(r),n="u8"===r?t:new o(t.buffer),s=[],a=e.planes||1;if(1===a)s.push(n);else for(let r=0;r<a;r++){const i=(e.width||1)*(e.height||t.length),l=new o(i);for(let t=0;t<i;t++)l[t]=n[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 S(t,e){return k(new l.Z(new Uint8Array(t)).getBytes(),e)}function T(t,e){return k((0,p.D)(t,e.offset,e.eof,!e.isInputBigEndian),e)}function M(t,e,r){const{pixelTypeCtor:o}=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),n=(0,y.decode)(t,{width:e.width,height:e.height,pixelType:o,format:r}),s=new i.A({width:e.width,height:e.height,pixels:n.pixels,pixelType:e.pixelType,mask:n.mask,statistics:null});return s.updateStatistics(),s}function I(t,e){const r=h.decode(t,e.hasNoZlibMask??void 0),o=new i.A({width:r.width,height:r.height,pixels:r.pixels,pixelType:"u8",mask:r.mask,statistics:null});return o.updateStatistics(),o}function P(t,e){const r=new Uint8Array(t),o=new b(r),{width:n,height:s}=e,a=n*s,l=o.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:n,height:s,pixels:[],pixelType:"u8",mask:f,statistics:[]});for(c=0;c<3;c++){for(u=new Uint8Array(a),h=0;h<a;h++)u[h]=l[4*h+c];p.addData({pixels:u})}return p.updateStatistics(),p}function E(t){if(null==t)throw new o.A("rasterCodec:decode","parameter encodeddata is required.");const e=new Uint8Array(t,0,10);let r="";return 255===e[0]&&216===e[1]?r="jpg":137===e[0]&&80===e[1]&&78===e[2]&&71===e[3]?r="png":67===e[0]&&110===e[1]&&116===e[2]&&90===e[3]&&73===e[4]&&109===e[5]&&97===e[6]&&103===e[7]&&101===e[8]&&32===e[9]?r="lerc":76===e[0]&&101===e[1]&&114===e[2]&&99===e[3]&&50===e[4]&&32===e[5]?r="lerc2":73===e[0]&&73===e[1]&&42===e[2]&&0===e[3]||77===e[0]&&77===e[1]&&0===e[2]&&42===e[3]||73===e[0]&&73===e[1]&&43===e[2]&&0===e[3]||77===e[0]&&77===e[1]&&0===e[2]&&43===e[3]?r="tiff":71===e[0]&&73===e[1]&&70===e[2]?r="gif":66===e[0]&&77===e[1]?r="bmp":String.fromCharCode.apply(null,e).toLowerCase().includes("error")&&(r="error"),r}function R(t){let e=E(t);return"lerc2"===e?e="lerc":"error"===e&&(e=""),e}async function L(t,e={},r){if(null==t)throw new o.A("rasterCodec:decode","missing encodeddata parameter.");let n=e.format?.toLowerCase();if(!("bsq"!==n&&"bip"!==n||null!=e.width&&null!=e.height))throw new o.A("rasterCodec:decode","requires width and height in options parameter.");if("tiff"===n&&e.customOptions)return async function(t,e){const r=await(0,w.s$)(t,e.customOptions),o=new i.A({width:r.width,height:r.height,pixels:r.pixels,pixelType:r.pixelType.toLowerCase(),mask:r.mask,statistics:null});return o.updateStatistics(),o}(t,e);if((!n||"bsq"!==n&&"bip"!==n&&"deflate"!==n&&"lzw"!==n)&&(n=E(t)),e.useCanvas&&v.has(n))return async function(t,e,r,o){const n=new u,s={applyJpegMask:!1,format:e,...r},a=await n.decode(t,s,o),l=new i.A(a);return l.updateStatistics(),l}(t,n,e,r);const s=function(t){let e=null;switch(t){case"lerc":case"lerc2":e=x;break;case"jpg":e=I;break;case"png":e=P;break;case"bsq":case"bip":e=(e,r)=>M(e,r,t);break;case"tiff":e=A;break;case"deflate":e=S;break;case"lzw":e=T;break;case"error":e=()=>{throw new o.A("rasterCodec:decode","input data contains error")};break;default:e=()=>{throw new o.A("rasterCodec:decode","unsupported raster format")}}return e}(n);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,o)=>s(t.slice(r,l[o+1]),e))),o=await Promise.all(r);a=o[0],a.pixels=o.map((t=>t.pixels[0]));const n=o.map((t=>t.mask));o.some((t=>null!=t))&&(n.forEach(((t,e)=>{null==t&&(n[e]=new Uint8Array(a.width*a.height).fill(255))})),a.bandMasks=n,a.mask=i.A.combineBandMasks(n)),a.updateStatistics()}else a=await s(t,{...e,offset:l?.[0]??e.offset});return"jpg"!==n&&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:o,height:n,mask:s}=t;if(!r||0===r.length)return;const a=r.length,l=o-1,u=n-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*o,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*o,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*o,p=0;p<l;p++)g[f*l+p]=(m[d+p]+m[d+p+1]+m[d+o+p]+m[d+o+p+1])/4;c.push(g)}if(s)for(y=new Uint8Array(l*u),f=0;f<u;f++)for(d=f*o,p=0;p<l;p++)y[f*l+p]=Math.min.apply(null,[s[d+p],s[d+p+1],s[d+o+p],s[d+o+p+1]])}t.width=l,t.height=u,t.mask=y,t.pixels=c}(a),a}},45664:(t,e,r)=>{r.d(e,{Cr:()=>E,D4:()=>z,JM:()=>_,XO:()=>L,r9:()=>D,s$:()=>V,uT:()=>N,uc:()=>R,zS:()=>U});var o=r(15265),n=r(61294),i=r(49589),s=r(56582),a=r(16019),l=r(47915),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 v(t,e,r,o=0,n=l.A.tiffTags,i=4){const s=8===i,a=s?O(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=r+h+4<=t.byteLength?G(new DataView(t,r+h,8===i?8:4),0,e,8===i):null,p=r+c,d=new Map;let m,g,y,w,C,b=0,v=0;for(let r=0;r<a;r++){g=new DataView(t,p+u*r,u),y=g.getUint16(0,e),C=g.getUint16(2,e),w=l.A.getTagName(y,n);const s=[];2===i?(b=g.getUint16(4,e),v=g.getUint16(6,e)):4===i?(b=g.getUint32(4,e),v=g.getUint32(8,e)):8===i&&(b=G(g,4,e,!0),v=G(g,12,e,!0),s.push(g.getUint32(12,e)),s.push(g.getUint32(16,e))),m={id:y,type:C,valueCount:b,valueOffset:v,valueOffsets:s,values:null},E(t,e,m,o,!1,i),d.set(w,m)}return{success:!0,ifd:d,nextIFD:f,requiredBufferSize:h}}const x=(t,e)=>(0,i.D4)(t,{inputOffset:e}).pixels[0];function A(t,e){if(1!==e&&2!==e&&4!==e)return t;const r=new Uint8Array(t),o=8/e,n=new Uint8Array(t.byteLength*o);let i=0;const s=2**e-1;for(let t=0;t<r.length;t++){const a=r[t];for(let t=0;t<o;t++)n[i++]=a<<e*t>>>8-e&s}return n.buffer}function k(t,e,r){const o=new n.J;o.parse(t),o.colorTransform=6===r?-1:0;const i=o.getData(o.width,o.height,1!==e&&4!==e);return new Uint8Array(i.buffer)}function S(t){const e=new c.Z(t).getBytes(),r=new ArrayBuffer(e.length),o=new Uint8Array(r);return o.set(e),o}async function T(t,e,r,o,n){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,v;if(34887===g)return await(0,i.Hh)(),x(t,o);if(1===g)w=t.slice(o,o+n),C=new Uint8Array(w);else if(8===g||32946===g)C=new Uint8Array(t,o,n),C=S(C),w=C.buffer;else if(6===g)C=new Uint8Array(t,o,n),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+n-2);for(let t=0;t<i;t++)C[t]=e[t];const s=new Uint8Array(t,o+2,n-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,o,n,e),w=C.buffer}if(w=A(w,l),"u8"===p||"s8"===p||a)v=new y(w);else{w=new ArrayBuffer(C.length);const t=new Uint8Array(w);switch(p){case"u16":case"s16":for(let e=0;e<C.length;e+=2)t[e]=C[e+1],t[e+1]=C[e];break;case"u32":case"s32":case"f32":for(let e=0;e<C.length;e+=4)t[e]=C[e+3],t[e+1]=C[e+2],t[e+2]=C[e+1],t[e+3]=C[e]}v=new y(w)}const T=b(r,"PREDICTOR")??1,M=b(r,"TILEWIDTH"),I=b(r,"TILELENGTH");if(T>1&&(5===g||8===g||32946===g)&&M&&I){const t=L(r),e=new y(v.length);e.set(v),v=function(t,e,r,o,n){const i=o?4:1,s=r*i*n;o&&(t=new Uint8Array(t.buffer));for(let r=0;r<e;r++){const e=r*s;for(let r=n;r<s;r++)t[e+r]+=t[e+r-n]}if(!o)return t;const a=new Uint8Array(t.length),l=r*n;for(let r=0;r<e;r++){const e=r*s;for(let r=0;r<l;r++)for(let o=0;o<i;o++)a[e+r*i+o]=t[e+r+(i-o-1)*l]}return new Float32Array(a.buffer)}(e,I,M,3===f&&3===T,t?1:c)}return v}const M=(t,e,r)=>{const o=u.Z===e.littleEndian,n=w(r,"STRIPOFFSETS");if(void 0===n)return null;const{width:i,height:a,pixelType:l}=R([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"),v=b(r,"COMPRESSION")??1;let x,T,M,I,P,E,L,U,D,O=C;if(p%8==0)for(x=0;x<n.length;x++){if(P=x*(C*i)*c,O=(x+1)*C>a?a-x*C:C,"u8"===l||"s8"===l||o)8===v||32946===v?(L=new Uint8Array(t,n[x],y[x]),L=S(L),E=L.buffer):6===v?(L=new Uint8Array(t,n[x],y[x]),L=k(L,c,h),E=L.buffer):5===v?(L=(0,s.D)(t,n[x],y[x],e.littleEndian),E=L.buffer):(y[x]!==O*i*c*p/8&&console.log("strip byte counts is different than expected"),E=t.slice(n[x],n[x]+y[x])),E=A(E,p),I=new d(E);else{switch(6===v||8===v||32946===v?(L=new Uint8Array(t,n[x],y[x]),U=S(L),E=U.buffer):(y[x]!==O*i*c*p/8&&console.log("strip byte counts is different than expected"),E=new ArrayBuffer(y[x]),L=new Uint8Array(t,n[x],y[x]),U=new Uint8Array(E)),l){case"u16":case"s16":for(M=0;M<L.length;M+=2)U[M]=L[M+1],U[M+1]=L[M];break;case"u32":case"s32":case"f32":for(M=0;M<L.length;M+=4)U[M]=L[M+3],U[M+1]=L[M+2],U[M+2]=L[M+1],U[M+3]=L[M]}E=A(E,p),I=new d(E)}g.set(I,P)}const B=[];if(1===c)B.push(g);else for(x=0;x<c;x++){for(D=new d(f),T=0;T<f;T++)D[T]=g[T*c+x];B.push(D)}return{width:i,height:a,pixelType:l,pixels:B}},I=(t,e,r)=>{if(!(t&&t.length>0&&e&&r))return null;let o,n,i;const s=t[0].length,a=t.length,l=new Uint8Array(s);for(let u=0;u<a;u++)if(o=t[u],n=e[u],i=r[u],0===u)for(let t=0;t<s;t++)l[t]=o[t]<n||o[t]>i?0:1;else for(let t=0;t<s;t++)l[t]&&(l[t]=o[t]<n||o[t]>i?0:1);return l},P=t=>{if(!t)return null;const e=t.match(/<Item(.*?)Item>/gi);if(!e||0===e.length)return null;const r=new Map;let o,n,i,s,a;for(let t=0;t<e.length;t++)o=e[t],n=o.slice(6,o.indexOf(">")),s=o.indexOf("sample="),s>-1&&(a=o.slice(s+8,o.indexOf('"',s+8))),s=o.indexOf("name="),s>-1&&(n=o.slice(s+6,o.indexOf('"',s+6))),n&&(i=o.slice(o.indexOf(">")+1,o.indexOf("</Item>")).trim(),null!=a?r.has(n)?r.get(n)[a]=i:r.set(n,[i]):r.set(n,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 E(t,e,r,o=0,n=!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>(n?t.byteLength:t?t.byteLength-l+o: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,o=32;for(y=1;y<=a;y++){const t=32-p*y%32;if(o<p){const n=r<<t>>>32-o,i=e<<32-o>>>32-o;r=e,u.push(n+i*2**(p-o)),o-=32-(p-o)}else u.push(r<<t>>>32-p),o-=p;0===o&&(o=32,r=e)}}else for(y=1;y<=a;y++){const t=32-p*y;u.push(l<<t>>>32-p)}}else{l-=o,n&&(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=O(new DataView(t,r,8),0,e);break;case 17:g=B(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 R(t){const e=t[0],r=b(e,"TILEWIDTH"),o=b(e,"TILELENGTH"),n=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 v;switch(m){case 1:v="NONE";break;case 2:case 3:case 4:case 32771:v="CCITT";break;case 5:v="LZW";break;case 6:case 7:v="JPEG";break;case 32773:v="PACKBITS";break;case 8:case 32946:v="DEFLATE";break;case 34712:v="JPEG2000";break;case 34887:v="LERC";break;default:v=String(m)}let x=!0,A="";p.has(m)||(x=!1,A+="unsupported tag compression "+m),l>3&&(x=!1,A+="unsupported tag sampleFormat "+l),1!==s&&2!==s&&4!==s&&s%8!=0&&(x=!1,A+="unsupported tag bitsPerSample "+s);const k=C(e,"GEOASCIIPARAMS");let S;if(k){const t=k.split("|").find((t=>t.includes("ESRI PE String = "))),e=t?t.replace("ESRI PE String = ",""):"";S=e.startsWith("COMPD_CS")||e.startsWith("PROJCS")||e.startsWith("GEOGCS")?{wkid:null,wkt:e}:null}const T=w(e,"GEOTIEPOINTS"),M=w(e,"GEOPIXELSCALE"),I=w(e,"GEOTRANSMATRIX"),E=e.has("GEOKEYDIRECTORY")?e.get("GEOKEYDIRECTORY").data:null;let R,O,B=!1,G=!1;if(E){B=2===b(E,"GTRasterTypeGeoKey");const t=b(E,"GTModelTypeGeoKey");if(2===t){const t=b(E,"GeographicTypeGeoKey");t>=1024&&t<=32766&&(S={wkid:t}),S||32767!==t||(G=!0,S={wkid:4326})}else if(1===t){const t=b(E,"ProjectedCSTypeGeoKey");t>=1024&&t<=32766&&(S={wkid:t})}}if(M&&T&&T.length>=6?(R=[M[0],0,T[3]-T[0]*M[0],0,-Math.abs(M[1]),T[4]-T[1]*M[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:n,y:i},{x:n,y:0}];let e,r=Number.POSITIVE_INFINITY,o=Number.POSITIVE_INFINITY,s=Number.NEGATIVE_INFINITY,a=Number.NEGATIVE_INFINITY;for(let n=0;n<t.length;n++)e=g(t[n],R),r=e.x>r?r:e.x,s=e.x<s?s:e.x,o=e.y>o?o:e.y,a=e.y<a?a:e.y;O={xmin:r,xmax:s,ymin:o,ymax:a,spatialReference:S}}else O={xmin:-.5,ymin:.5-i,xmax:n-.5,ymax:.5,spatialReference:S};G&&(O.xmax-O.xmin>400||Math.max(Math.abs(O.xmin),Math.abs(O.xmax))>361)&&(S=null,O.spatialReference=null);const N=U(t);let _,V,z,j,W;if(N.length>0){z=Math.round(Math.log(n/b(N[0],"IMAGEWIDTH"))/Math.LN2);const t=N[N.length-1];j=Math.round(Math.log(n/b(t,"IMAGEWIDTH"))/Math.LN2),_=b(t,"TILEWIDTH"),V=b(t,"TILELENGTH")}_=null!=j&&j>0?_||r:null,V=null!=j&&j>0?V||o:null,r&&(W=[{maxCol:Math.ceil(n/r)-1,maxRow:Math.ceil(i/o)-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=P(Z);return A+=" "+F({width:n,height:i,tileWidth:r,tileHeight:o,planes:a,ifds:t}),{width:n,height:i,tileWidth:r,tileHeight:o,planes:a,isBSQ:c,pixelType:u,compression:v,noData:f,hasMaskBand:D(t).length===N.length+1,isSupported:x,message:A,extent:O,isPseudoGeographic:G,affine:M?null:R,firstPyramidLevel:z,maximumPyramidLevel:j,pyramidBlockWidth:_,pyramidBlockHeight:V,tileBoundary:W,metadata:H}}function L(t,e){const r=y(t,"PLANARCONFIGURATION");return r?2===r[0]:!!e&&e.isBSQ}function U(t){return t.filter((t=>1===b(t,"NEWSUBFILETYPE")))}function D(t){return t.filter((t=>{const e=!(4&~(b(t,"NEWSUBFILETYPE")??0)),r=4===b(t,"PHOTOMETRICINTERPRETATION");return e&&r}))}function O(t,e,r){const o=t.getUint32(e,r),n=t.getUint32(e+4,r);return r?n*f+o:o*f+n}function B(t,e,r){let o=r?t.getInt32(e,r):t.getUint32(e,r),n=r?t.getUint32(e+4,r):t.getInt32(e+4,r);const i=(r?o:n)>=0?1:-1;return r?o*=i:n*=i,i*(r?n*f+o:o*f+n)}function G(t,e,r,o){return o?O(t,e,r):t.getUint32(e,r)}function N(t){const e=new DataView(t,0,16),r=e.getUint16(0,!1);let o=null;if(18761===r)o=!0;else{if(19789!==r)throw new Error("unexpected endianess byte");o=!1}const n=e.getUint16(2,o);if(42!==n&&43!==n)throw new Error("unexpected tiff identifier");let i=4;const s=43===n;if(s){const t=e.getUint16(i,o);if(i+=2,8!==t)throw new Error("unsupported bigtiff version");if(0!==e.getUint16(i,o))throw new Error("unsupported bigtiff version");i+=2}return{littleEndian:o,isBigTiff:s,firstIFDPos:G(e,i,o,s)}}function _(t,e,r,n=0,i=l.A.tiffTags,s=4){const a=v(t,e,r,n,i,s);let u;const c=a.ifd;if(c){if(l.A.ifdTags.forEach(((r,o)=>{c.has(o)&&(u=c.get(o),u.data=v(t,e,u.valueOffset-n,n,r).ifd)})),c.has("GEOKEYDIRECTORY")){u=c.get("GEOKEYDIRECTORY");const r=u.values;if(r&&r.length>4){const o=r[0]+"."+r[1]+"."+r[2];u.data=v(t,e,u.valueOffset+6-n,n,l.A.geoKeys,2).ifd,u.data&&u.data.set("GEOTIFFVersion",{id:0,type:2,valueCount:1,valueOffset:null,values:[o]})}}if(c.has("XMP")){u=c.get("XMP");const t=u.values;"number"==typeof t[0]&&7===u.type&&(u.values=[(0,o.w)(new Uint8Array(t))])}}return a}function F(t){const{width:e,height:r,tileHeight:o,tileWidth:n}=t,i=t.planes,s=n?n*o:e*r,a=b(t.ifds[0],"BITSPERSAMPLE");let l="";return s*i>2**30/(a>8?a/8:1)&&(l=n?"tiled tiff exceeding 1 gigabits per tile is not supported":"scanline tiff exceeding 1 gigabits is not supported"),l}async function V(t,e){const{headerInfo:r,ifd:o,offsets:n,sizes:i}=e,s=[];for(let e=0;e<n.length;e++){i[e];const a=await T(t,r.littleEndian,o,n[e],i[e]||t.byteLength);s.push(a)}const l=L(o,r),u=b(o,"BITSPERSAMPLE"),c=d(b(o,"SAMPLEFORMAT")??1,u),h=b(o,"SAMPLESPERPIXEL")||r.planes,f=m(c),p=b(o,"TILEWIDTH"),g=b(o,"TILELENGTH"),y=b(o,"COMPRESSION")??1,w=p*g;let C;const v=[];let x=s[0];const A=34887===y;for(let t=0;t<h;t++){if(C=new f(w),s.length===h)x=s[t],x.length===w&&(C=x);else if(x.length)if(l||A)C=x.length===w?x:x.slice(w*t,w*(t+1));else for(let e=0;e<w;e++)C[e]=x[e*h+t];v.push(C)}const k=r.noData?r.noData[0]:e.noDataValue,S=r.metadata?r.metadata.statistics:null,M=S?S.map((t=>t.min)):null,P=S?S.map((t=>t.max)):null,E={pixelType:c,width:p,height:g,pixels:v,noDataValue:k};return null!=k?(0,a.Sp)(E,k):M&&P&&e.applyMinMaxConstraint&&(E.mask=I(v,M,P)),E}async function z(t,e={}){const r=e.pyramidLevel||0,o=e.headerInfo||function(t){const{littleEndian:e,isBigTiff:r,firstIFDPos:o}=N(t);let n=o;const i=[];do{const o=_(t,e,n,0,l.A.tiffTags,r?8:4);if(!o.success)break;i.push(o.ifd),n=o.nextIFD}while(n>0);return{...R(i),littleEndian:e,isBigTiff:r,ifds:i,pyramidIFDs:U(i),maskIFDs:D(i)}}(t),{ifds:n,noData:i}=o;if(0===n.length)throw new Error("no valid image file directory");const s=F(o);if(s)throw s;let u=null;const c=-1===r?n[n.length-1]:n[r],h=i??e.noDataValue;return u=o.tileWidth?await async function(t,e,r){const o=w(r,"TILEOFFSETS");if(void 0===o)return null;const n=w(r,"TILEBYTECOUNTS"),{width:i,height:s,pixelType:a,tileWidth:l,tileHeight:u}=R([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,v,x,A,k,S,M,I,P,E,U,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(o.length/h);for(C=0;C<a;C++){S=Math.floor(C/B)*u,M=C%B*l,I=S*i+M;for(let a=0;a<h;a++){const c=C*h+a;for(0===n[c]?(x=null,N=!0):x=await T(t,e.littleEndian,r,o[c],n[c]),E=0,P=I,D=Math.min(l,i-M),U=Math.min(u,s-S),O=y[a],A=0;A<U;A++)for(P=I+A*i,E=A*l,k=0;k<D;k++,P++,E++)x?O[P]=x[E]:G[P]=0}}}else for(C=0;C<o.length;C++)for(S=Math.floor(C/B)*u,M=C%B*l,I=S*i+M,0===n[C]?(x=null,N=!0):x=await T(t,e.littleEndian,r,o[C],n[C]),E=0,P=I,D=Math.min(l,i-M),U=Math.min(u,s-S),v=0;v<h;v++)if(O=y[v],c||d)for(A=0;A<U;A++)for(P=I+A*i,E=l*u*v+A*l,k=0;k<D;k++,P++,E++)x?O[P]=x[E]:G[P]=0;else for(A=0;A<U;A++)for(P=I+A*i,E=A*l*h+v,k=0;k<D;k++,P++,E+=h)x?O[P]=x[E]:G[P]=0;return{width:i,height:s,pixelType:a,pixels:y,mask:N?G:void 0}}(t,o,c):M(t,o,c),u?(null!=h&&(0,a.Sp)(u,h),u):u}},47915:(t,e,r)=>{r.d(e,{A:()=>a});const o=(()=>{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})(),n=(()=>{const t=o.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=new Map;s.set("EXIFIFD",n),s.set("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"]);const a={tiffTags:o,ifdTags:s,geoKeys:i,getTagName:(t,e)=>{let r=(e||o)[t];return void 0===r&&(r="unknown"+String(t)),r}}},16019:(t,e,r)=>{r.d(e,{Sp:()=>u,X1:()=>a,hP:()=>s,zw:()=>l});const o=9999999e31,n=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){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)>=o?n*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}d&&(t.bandMasks=t.bandMasks||t.pixels.length>1?c:null,t.mask=h),d&&"updateStatistics"in t&&t.updateStatistics()}},47124:(t,e,r)=>{r.d(e,{Z:()=>o});const o=(()=>{const t=new ArrayBuffer(4),e=new Uint8Array(t);return new Uint32Array(t)[0]=1,1===e[0]})()},28435:(t,e,r)=>{r.d(e,{$i:()=>B,AB:()=>u,Ew:()=>g,Hx:()=>m,IB:()=>o,J$:()=>U,QF:()=>O,UK:()=>d,Wb:()=>n,Wt:()=>x,Wy:()=>c,XU:()=>v,dK:()=>b,eH:()=>p,et:()=>l,lD:()=>L,qL:()=>f,z$:()=>S,z7:()=>k,zg:()=>h});var o,n,i,s=r(14140),a=r(16019);(i=o||(o={}))[i.matchAny=0]="matchAny",i[i.matchAll=1]="matchAll",function(t){t[t.bestMatch=0]="bestMatch",t[t.fail=1]="fail"}(n||(n={}));const l=6;function u(t){return null!=t&&"esri.layers.support.PixelBlock"===t.declaredClass&&t.pixels&&t.pixels.length>0}function c(t){if(!t?.length||t.some((t=>!u(t))))return null;if(1===t.length)return t[0]?.clone()??null;const e=t,{width:r,height:o,pixelType:n}=e[0];if(e.some((t=>t.width!==r||t.height!==o)))return null;const i=e.map((({mask:t})=>t)).filter((t=>null!=t));let a=null;i.length&&(a=new Uint8Array(r*o),a.set(i[0]),i.length>1&&C(i.slice(1),a));const l=[];e.forEach((({pixels:t})=>l.push(...t)));const c=e.map((({statistics:t})=>t)).filter((t=>t?.length)),h=[];return c.forEach((t=>h.push(...t))),new s.A({pixelType:n,width:r,height:o,mask:a,pixels:l,statistics:h.length?h:null})}function h(t){if(!t)return;const e=t.colormap;if(!e||0===e.length)return;const r=e.sort(((t,e)=>t[0]-e[0]));let o=0;r[0][0]<0&&(o=r[0][0]);const n=Math.max(256,r[r.length-1][0]-o+1),i=new Uint8Array(4*n),s=[];let a,l=0,u=0;const c=5===r[0].length;if(n>65536)return r.forEach((t=>{s[t[0]-o]=c?t.slice(1):t.slice(1).concat([255])})),{indexed2DColormap:s,offset:o,alphaSpecified:c};if(t.fillUnspecified)for(a=r[u],l=a[0]-o;l<n;l++)i[4*l]=a[1],i[4*l+1]=a[2],i[4*l+2]=a[3],i[4*l+3]=c?a[4]:255,l===a[0]-o&&(a=u===r.length-1?a:r[++u]);else for(l=0;l<r.length;l++)a=r[l],u=4*(a[0]-o),i[u]=a[1],i[u+1]=a[2],i[u+2]=a[3],i[u+3]=c?a[4]:255;return{indexedColormap:i,offset:o,alphaSpecified:c}}function f(t,e){if(!u(t))return t;if(!e||!e.indexedColormap&&!e.indexed2DColormap)return t;const r=t.clone(),o=r.pixels;let n=r.mask;const i=r.width*r.height;if(1!==o.length)return t;const{indexedColormap:s,indexed2DColormap:a,offset:l,alphaSpecified:c}=e;let h=0;const f=o[0],p=new Uint8Array(f.length),d=new Uint8Array(f.length),m=new Uint8Array(f.length);let g,y=0;if(s){const t=s.length-1;if(null!=n)for(h=0;h<i;h++)n[h]&&(y=4*(f[h]-l),y<l||y>t?n[h]=0:(p[h]=s[y],d[h]=s[y+1],m[h]=s[y+2],n[h]=s[y+3]));else{for(n=new Uint8Array(i),h=0;h<i;h++)y=4*(f[h]-l),y<l||y>t?n[h]=0:(p[h]=s[y],d[h]=s[y+1],m[h]=s[y+2],n[h]=s[y+3]);r.mask=n}}else if(a)if(null!=n)for(h=0;h<i;h++)n[h]&&(g=a[f[h]],p[h]=g[0],d[h]=g[1],m[h]=g[2],n[h]=g[3]);else{for(n=new Uint8Array(i),h=0;h<i;h++)g=a[f[h]],p[h]=g[0],d[h]=g[1],m[h]=g[2],n[h]=g[3];r.mask=n}return r.pixels=[p,d,m],r.statistics=null,r.pixelType="u8",r.maskIsAlpha=c,r}function p(t,e){if(!u(t))return null;const{pixels:r,mask:o}=t,n=r.length;let i=e.lut;const{offset:a}=e;i&&1===i[0].length&&(i=r.map((()=>i)));const l=[],c=e.outputPixelType||"u8";for(let t=0;t<n;t++){const e=d(r[t],o,i[t],a||0,c);l.push(e)}const h=new s.A({width:t.width,height:t.height,pixels:l,mask:o,pixelType:c});return h.updateStatistics(),h}function d(t,e,r,o,n){const i=t.length,a=s.A.createEmptyBand(n,i);if(e)for(let n=0;n<i;n++)e[n]&&(a[n]=r[t[n]-o]);else for(let e=0;e<i;e++)a[e]=r[t[e]-o];return a}function m(t,e){if(!u(t))return null;const r=t.clone(),{pixels:o}=r,n=r.width*r.height,i=e.length,s=Math.floor(i/2),a=e[Math.floor(s)],l=o[0];let c,h,f,p,d,m,g=!1;const y=new Uint8Array(n),w=new Uint8Array(n),C=new Uint8Array(n);let b=r.mask;const v=4===e[0].mappedColor.length;for(b||(b=new Uint8Array(n),b.fill(v?255:1),r.mask=b),d=0;d<n;d++)if(b[d]){for(c=l[d],g=!1,m=s,h=a,f=0,p=i-1;p-f>1;){if(c===h.value){g=!0;break}c>h.value?f=m:p=m,m=Math.floor((f+p)/2),h=e[Math.floor(m)]}g||(c===e[f].value?(h=e[f],g=!0):c===e[p].value?(h=e[p],g=!0):c<e[f].value?(g=!1,h=null):c>e[f].value&&(c<e[p].value?(h=e[f],g=!0):p===i-1?(g=!1,h=null):(h=e[p],g=!0))),g?(y[d]=h.mappedColor[0],w[d]=h.mappedColor[1],C[d]=h.mappedColor[2],b[d]=h.mappedColor[3]):y[d]=w[d]=C[d]=b[d]=0}return r.pixels=[y,w,C],r.mask=b,r.pixelType="u8",r.maskIsAlpha=v,r}function g(t,e){if(!u(t))return null;const{width:r,height:o}=t,{inputRanges:n,outputValues:i,outputPixelType:l,noDataRanges:c,allowUnmatched:h,isLastInputRangeInclusive:f}=e,p=t.pixels[0],d=s.A.createEmptyBand(l,p.length),m=t.mask,g=new Uint8Array(r*o);m?g.set(m):g.fill(255);const y=t.pixelType.startsWith("f")?1e-6:0,w=n.map((t=>t-y));w[0]=n[0],w[w.length-1]=n[n.length-1]+(f?1e-6:0);const C=n.length/2,[b,v]=(0,a.hP)(l);for(let t=0;t<o;t++)for(let e=0;e<r;e++){const o=t*r+e;if(g[o]){const t=p[o];let e=!1;for(let r=C-1;r>=0;r--)if(t===w[2*r]||t>w[2*r]&&t<w[2*r+1]){d[o]=i[r],e=!0;break}e||(h?d[o]=t>v?v:t<b?b:t:g[o]=0)}}const x=c?.length;if(x)for(let t=0;t<o;t++)for(let e=0;e<r;e++){const o=t*r+e;if(!m||m[o]){const t=p[o];for(let e=0;e<x;e+=2)if(t>=c[e]&&t<=c[e+1]){d[o]=0,g[o]=0;break}}}return new s.A({width:r,height:o,pixelType:l,pixels:[d],mask:g})}function y(t,e,r,o){const n=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(o[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||(o[r]=0)}o[r]&&(a===i||n?.has(a))&&(o[r]=0)}}function w(t,e){const r=t[0].length;for(let o=0;o<r;o++)if(e[o]){let r=!1;for(let e=0;e<t.length;e++)if(t[e][o]){r=!0;break}r||(e[o]=0)}}function C(t,e){const r=t[0].length;for(let o=0;o<r;o++)if(e[o]){let r=!1;for(let e=0;e<t.length;e++)if(0===t[e][o]){r=!0;break}r&&(e[o]=0)}}function b(t,e){if(!u(t))return null;const{width:r,height:o,pixels:n}=t,i=r*o,a=new Uint8Array(i);t.mask?a.set(t.mask):a.fill(255);const l=n.length,{includedRanges:c,noDataValues:h,outputPixelType:f,matchAll:p,lookups:m}=e;if(m){const t=[];for(let e=0;e<l;e++){const r=m[e],o=d(n[e],a,r.lut,r.offset||0,"u8");t.push(o)}1===t.length?a.set(t[0]):p?w(t,a):C(t,a)}else if(p){const t=[];for(let e=0;e<l;e++){const r=new Uint8Array(i);r.set(a),y(n[e],c?.slice(2*e,2*e+2),h?.[e],r),t.push(r)}1===t.length?a.set(t[0]):w(t,a)}else for(let t=0;t<l;t++)y(n[t],c?.slice(2*t,2*t+2),h?.[t],a);return new s.A({width:r,height:o,pixelType:f,pixels:n,mask:a})}function v(t){const{srcPixelType:e,inputRanges:r,outputValues:o,allowUnmatched:n,noDataRanges:i,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=s.A.createEmptyBand(u,c),p=new Uint8Array(c);n&&p.fill(255);const[d,m]=(0,a.hP)(u);if(r?.length&&o?.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 r=o[t]>m?m:o[t]<d?d:o[t],n=Math.ceil(e[2*t]-h),i=Math.floor(e[2*t+1]-h);for(let t=n;t<=i;t++)f[t]=r,p[t]=255}}if(i?.length)for(let t=0;t<i.length;t++){const e=Math.ceil(i[2*t]-h),r=Math.floor(i[2*t+1]-h);for(let t=e;t<=r;t++)p[t]=0}return{lut:f,offset:h,mask:p}}function x(t,e,r){if("u8"!==t&&"s8"!==t&&"u16"!==t&&"s16"!==t)return null;const o=t.includes("16")?65536:256,n=t.includes("s")?-o/2:0,i=new Uint8Array(o);if(e)for(let t=0;t<e.length;t++){const r=Math.ceil(e[2*t]-n),o=Math.floor(e[2*t+1]-n);for(let t=r;t<=o;t++)i[t]=255}else i.fill(255);if(r)for(let t=0;t<r.length;t++)i[r[t]-n]=0;return{lut:i,offset:n}}function A(t,e,r,o,n,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,o,n,i,s,a){return{xmin:n<=r*t?0:n<r*t+t?n-r*t:t,ymin:i<=o*e?0:i<o*e+e?i-o*e:e,xmax:n+s<=r*t?0:n+s<r*t+t?n+s-r*t:t,ymax:i+a<=o*e?0:i+a<o*e+e?i+a-o*e:e}}(s,a,o,n,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+o*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=(n*a+r-u)*c+(o*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=(n*a+r-u)*c+(o*s-l)+p;for(let r=f.xmin;r<f.xmax;r++)t[i+r]=e}}function k(t,e,r={}){const{clipOffset:o,clipSize:n,alignmentInfo:i,blockWidths:a}=r;if(a)return function(t,e,r){const o=t.find((t=>null!=t));if(null==o)return null;const n=t.some((t=>null==t||!!t.mask)),{width:i,height:a}=e,l=n?new Uint8Array(i*a):null,{blockWidths:c}=r,h=[],f=o.getPlaneCount(),p=s.A.getPixelArrayConstructor(o.pixelType);if(n)for(let e=0,r=0;e<t.length;r+=c[e],e++){const o=t[e];if(!u(o))continue;const n=o.mask;for(let t=0;t<a;t++)for(let s=0;s<c[e];s++)l[t*i+s+r]=null==n?255:n[t*o.width+s]}const d=t.some((t=>t?.bandMasks&&t.bandMasks.length>1)),m=d?[]:void 0,g=i*a;for(let e=0;e<f;e++){const r=new p(g),o=d?new Uint8Array(g):void 0;for(let n=0,s=0;n<t.length;s+=c[n],n++){const l=t[n];if(!u(l))continue;const h=l.pixels[e];if(null!=h){for(let t=0;t<a;t++)for(let e=0;e<c[n];e++)r[t*i+e+s]=h[t*l.width+e];if(o){const t=l.bandMasks?.[e]??l.mask;for(let e=0;e<a;e++)for(let r=0;r<c[n];r++)o[e*i+r+s]=t?t[e*l.width+r]:255}}}h.push(r),m&&o&&m.push(o)}const y=new s.A({width:i,height:a,mask:l,bandMasks:m,pixels:h,pixelType:o.pixelType});return y.updateStatistics(),y}(t,e,{blockWidths:a});const l=t.find((t=>u(t)));if(null==l)return null;const c=n?n.width:e.width,h=n?n.height:e.height,f=l.width,p=l.height,d=e.width/f,m=e.height/p,g={offset:o||{x:0,y:0},mosaic:n||e,block:{width:f,height:p}},y=l.pixelType,w=s.A.getPixelArrayConstructor(y),C=l.pixels.length,b=[];let v,x;for(let e=0;e<C;e++){x=new w(c*h);for(let r=0;r<m;r++)for(let o=0;o<d;o++){const n=t[r*d+o];u(n)&&(v=n.pixels[e],A(x,v,g,o,r,i))}b.push(x)}const k=t.some((t=>null==t||null!=t.mask&&t.mask.length>0)),S=t.some((t=>t?.bandMasks&&t.bandMasks.length>1)),T=k?new Uint8Array(c*h):void 0,M=S?[]:void 0;if(T){for(let e=0;e<m;e++)for(let r=0;r<d;r++){const o=t[e*d+r],n=null!=o?o.mask:null;A(T,null!=n?n:o?255:0,g,r,e,i)}if(M)for(let e=0;e<C;e++){const r=new Uint8Array(c*h);for(let o=0;o<m;o++)for(let n=0;n<d;n++){const s=t[o*d+n],a=s?.bandMasks?.[e]??s?.mask;A(r,null!=a?a:s?255:0,g,n,o,i)}M.push(r)}}const I=new s.A({width:c,height:h,pixels:b,pixelType:y,bandMasks:M,mask:T});return I.updateStatistics(),I}function S(t,e,r){if(!u(t))return null;const{width:o,height:n}=t,i=e.x,s=e.y,a=r.width+i,l=r.height+s;if(i<0||s<0||a>o||l>n)return t;if(0===i&&0===s&&a===o&&l===n)return t;t.mask||(t.mask=new Uint8Array(o*n));const c=t.mask;for(let t=0;t<n;t++){const e=t*o;for(let r=0;r<o;r++)c[e+r]=t<s||t>=l||r<i||r>=a?0:1}return t.updateStatistics(),t}function T(t){if(!u(t))return null;const e=t.clone(),{width:r,height:o,pixels:n}=t,i=n[0],s=e.pixels[0],a=t.mask;for(let t=2;t<o-1;t++){const e=new Map;for(let o=t-2;o<t+2;o++)for(let t=0;t<4;t++){const n=o*r+t;P(e,i[n],a?a[n]:1)}s[t*r]=M(e),s[t*r+1]=s[t*r+2]=s[t*r];let o=3;for(;o<r-1;o++){let n=(t-2)*r+o+1;P(e,i[n],a?a[n]:1),n=(t-1)*r+o+1,P(e,i[n],a?a[n]:1),n=t*r+o+1,P(e,i[n],a?a[n]:1),n=(t+1)*r+o+1,P(e,i[n],a?a[n]:1),n=(t-2)*r+o-3,I(e,i[n],a?a[n]:1),n=(t-1)*r+o-3,I(e,i[n],a?a[n]:1),n=t*r+o-3,I(e,i[n],a?a[n]:1),n=(t+1)*r+o-3,I(e,i[n],a?a[n]:1),s[t*r+o]=M(e)}s[t*r+o+1]=s[t*r+o]}for(let t=0;t<r;t++)s[t]=s[r+t]=s[2*r+t],s[(o-1)*r+t]=s[(o-2)*r+t];return e.updateStatistics(),e}function M(t){if(0===t.size)return 0;let e=0,r=-1,o=0;const n=t.keys();let i=n.next();for(;!i.done;)o=t.get(i.value),o>e&&(r=i.value,e=o),i=n.next();return r}function I(t,e,r){if(0===r)return;const o=t.get(e);1===o?t.delete(e):t.set(e,o-1)}function P(t,e,r){0!==r&&t.set(e,t.has(e)?t.get(e)+1:1)}function E(t,e,r){let{x:o,y:n}=e;const{width:i,height:a}=r;if(0===o&&0===n&&a===t.height&&i===t.width)return t;const{width:l,height:c}=t,h=Math.max(0,n),f=Math.max(0,o),p=Math.min(o+i,l),d=Math.min(n+a,c);if(p<0||d<0||!u(t))return null;o=Math.max(0,-o),n=Math.max(0,-n);const{pixels:m}=t,g=i*a,y=m.length,w=[];for(let e=0;e<y;e++){const r=m[e],a=s.A.createEmptyBand(t.pixelType,g);for(let t=h;t<d;t++){const e=t*l;let s=(t+n-h)*i+o;for(let t=f;t<p;t++)a[s++]=r[e+t]}w.push(a)}const C=new Uint8Array(g),b=t.mask;for(let t=h;t<d;t++){const e=t*l;let r=(t+n-h)*i+o;for(let t=f;t<p;t++)C[r++]=b?b[e+t]:1}const v=new s.A({width:r.width,height:r.height,pixelType:t.pixelType,pixels:w,mask:C});return v.updateStatistics(),v}function R(t,e=!0){if(!u(t))return null;const{pixels:r,width:o,height:n,mask:i,pixelType:a}=t,l=[],c=Math.round(o/2),h=Math.round(n/2),f=n-1,p=o-1;for(let t=0;t<r.length;t++){const i=r[t],u=s.A.createEmptyBand(a,c*h);let d=0;for(let t=0;t<n;t+=2)for(let r=0;r<o;r+=2){const n=i[t*o+r];if(e){const e=r===p?n:i[t*o+r+1],s=t===f?n:i[t*o+r+o],a=r===p?s:t===f?e:i[t*o+r+o+1];u[d++]=(n+e+s+a)/4}else u[d++]=n}l.push(u)}let d=null;if(null!=i){d=new Uint8Array(c*h);let t=0;for(let r=0;r<n;r+=2)for(let n=0;n<o;n+=2){const s=i[r*o+n];if(e){const e=n===p?s:i[r*o+n+1],a=r===f?s:i[r*o+n+o],l=n===p?a:r===f?e:i[r*o+n+o+1];d[t++]=s*e*a*l?1:0}else d[t++]=s}}return new s.A({width:c,height:h,pixelType:a,pixels:l,mask:d})}function L(t,e,r=0,o=!0){if(!u(t))return null;const{width:n,height:i}=e;let{width:s,height:a}=t;const l=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/n),u=Math.ceil(a/i);for(let o=0;o<u;o++){c.y=o*i;for(let i=0;i<r;i++){c.x=i*n;const r=E(f,c,e);l.set(`${t}/${o}/${i}`,r)}}t<h-1&&(f=R(f,o)),s=Math.round(s/2),a=Math.round(a/2)}return l}function U(t){const{pixelBlock:e,tileSize:r,level:o,row:n,col:i,useBilinear:s}=t;if(!u(e))return null;const{width:a,height:l}=r,c=2**o,h=c*a,f=c*l;let p=E(e,{y:n*f,x:i*h},{width:h,height:f});if(!p)return null;for(let t=o;t>0;t--)p=R(p,s);return p}function D(t,e,r,o,n=0){const{width:i,height:s}=t,{width:a,height:l}=e,u=o.cols,c=o.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,v=b*f*c,x=new Float32Array(v),A=new Float32Array(v),k=new Uint32Array(v),S=new Uint32Array(v);let T,M,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,M=(r+.5)/c;for(let t=0;t<r;t++)T=(t+.5)/u,x[I+t]=(d*T+m*M+g)*i+n,A[I+t]=(y*T+w*M+C)*s+n,k[I+t]=Math.floor(x[I+t]),S[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,M=(r+.5)/c;for(let t=r;t<u;t++)T=(t+.5)/u,x[I+t]=(d*T+m*M+g)*i+n,A[I+t]=(y*T+w*M+C)*s+n,k[I+t]=Math.floor(x[I+t]),S[I+t]=Math.floor(A[I+t])}}return{offsets_x:x,offsets_y:A,offsets_xi:k,offsets_yi:S,gridWidth:b}}function O(t,e){const{coefficients:r,spacing:o}=e,{offsets_x:n,offsets_y:i,gridWidth:s}=D(t,t,r,{rows:o[0],cols:o[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,o=0===t?r:r-s,h=t===l-1?r:r+s,f=n[o]-n[h],p=i[h]-i[o];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 B(t,e,r,o,n="nearest"){if(!u(t))return null;"majority"===n&&(t=T(t));const{pixels:i,mask:a,bandMasks:l,pixelType:c}=t,h=t.width,f=t.height,p=s.A.getPixelArrayConstructor(c),d=i.length,{width:m,height:g}=e;let y=!1;for(let t=0;t<r.length;t+=3)-1===r[t]&&-1===r[t+1]&&-1===r[t+2]&&(y=!0);const{offsets_x:w,offsets_y:C,offsets_xi:b,offsets_yi:v,gridWidth:x}=D({width:h,height:f},e,r,o,"majority"===n?.5:0);let A;const k=(t,e,r,o)=>{const n=t instanceof Float32Array||t instanceof Float64Array?0:.5;for(let i=0;i<g;i++){A=i*x;for(let s=0;s<m;s++){if(w[A]<0||C[A]<0)t[i*m+s]=0;else if(o)t[i*m+s]=e[b[A]+v[A]*h];else{const o=Math.floor(w[A]),a=Math.floor(C[A]),l=Math.ceil(w[A]),u=Math.ceil(C[A]),c=w[A]-o,f=C[A]-a;if(!r||r[o+a*h]&&r[l+a*h]&&r[o+u*h]&&r[l+u*h]){const r=(1-c)*e[o+a*h]+c*e[l+a*h],p=(1-c)*e[o+u*h]+c*e[l+u*h];t[i*m+s]=(1-f)*r+f*p+n}else t[i*m+s]=e[b[A]+v[A]*h]}A++}}},S=[];let M;const I=l?.length===d,P=[];for(let t=0;t<d;t++){if(I){const e=new Uint8Array(m*g);k(e,l[t],l[t],!0),P.push(e)}M=new p(m*g),k(M,i[t],I?l[t]:a,"nearest"===n||"majority"===n),S.push(M)}const E=new s.A({width:m,height:g,pixelType:c,pixels:S,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}},6952:(t,e,r)=>{r.d(e,{DP:()=>y,Nh:()=>w,Pg:()=>g,RP:()=>c,WF:()=>u,_N:()=>C,eH:()=>d,f4:()=>m,fP:()=>f,zj:()=>h});var o=r(97768),n=r(14140),i=r(16019),s=r(70274);const a=1,l=[.299,.587,.114];function u(t,e=256){e=Math.min(e,256);const{size:r,counts:o}=t,n=new Uint8Array(r),i=o.reduce(((t,r)=>t+r/e),0);let s=0,a=0,l=0,u=i;for(let t=0;t<r;t++)if(l+=o[t],!(t<r-1&&l+o[t+1]<u)){for(;s<e-1&&u<l;)s++,u+=i;for(let e=a;e<=t;e++)n[e]=s;a=t+1}for(let t=a;t<r;t++)n[t]=e-1;return n}function c(t){const{minCutOff:e,maxCutOff:r,gamma:o,pixelType:n,rounding:i}=t,s=t.outMin||0,a=t.outMax||255;if(!["u8","u16","s8","s16"].includes(n))return null;const l=e.length;let u,c,f=0;"s8"===n?f=-127:"s16"===n&&(f=-32767);let p=256;["u16","s16"].includes(n)&&(p=65536);const d=[],m=[],g=a-s;for(u=0;u<l;u++)m[u]=r[u]-e[u],d[u]=0===m[u]?0:g/m[u];let y;const C=[];let b,v,x;if(o&&o.length>=l){const t=w(l,o);for(u=0;u<l;u++){for(x=[],c=0;c<p;c++)if(0!==m[u])if(b=c+f,y=(b-e[u])/m[u],v=1,o[u]>1&&(v-=(1/g)**(y*t[u])),b<r[u]&&b>e[u]){const t=v*g*y**(1/o[u])+s;x[c]="floor"===i?Math.floor(t):"round"===i?Math.round(t):t}else b>=r[u]?x[c]=a:x[c]=s;else x[c]=s;C[u]=x}}else for(u=0;u<l;u++){for(x=[],c=0;c<p;c++)if(b=c+f,b<=e[u])x[c]=s;else if(b>=r[u])x[c]=a;else{const t=(b-e[u])*d[u]+s;x[c]="floor"===i?Math.floor(t):"round"===i?Math.round(t):t}C[u]=x}if(null!=t.contrastOffset){const e=h(t.contrastOffset,t.brightnessOffset);for(u=0;u<l;u++)for(x=C[u],c=0;c<p;c++)x[c]=e[x[c]]}return{lut:C,offset:f}}function h(t,e){const r=Math.min(Math.max(t,-100),100),o=Math.min(Math.max(e??0,-100),100);let n=0,i=0;const s=new Uint8Array(256);for(n=0;n<256;n++)r>0&&r<100?i=(200*n-25500+510*o)/(2*(100-r))+128:r<=0&&r>-100?i=(200*n-25500+510*o)*(100+r)/2e4+128:100===r?(i=200*n-25500+256*(100-r)+510*o,i=i>0?255:0):-100===r&&(i=128),s[n]=i>255?255:i<0?0:i;return s}function f(t,e,r){const o=[];for(let n=0;n<e.length;n++){let i=0,s=0,a=0;"min"in e[n]?({min:i,max:s,avg:a}=e[n]):[i,s,a]=e[n];let u=a??0;"u8"!==t&&(u=255*(u-i)/(s-i)),r&&(u*=l[n]),o.push(p(u))}return o}function p(t){if(t<=0||t>=255)return a;let e=0;150!==t&&(e=t<=150?45*Math.cos(.01047*t):17*Math.sin(.021*t));const r=t+e,o=Math.log(t/255),n=Math.log(r/255);if(0===n)return a;const i=o/n;return isNaN(i)?a:Math.min(9.9,Math.max(.01,i))}function d(t){const{pixels:e,mask:r,pixelType:o,bandMasks:n}=t,i=e.map(((t,e)=>function(t,e,r,o){let n=1/0,i=-1/0,s=0,a=0,l=0,u=0;const c=t.length,h=new Map,f=[];for(let r=0;r<c;r++){const o=t[r];if(!e||e[r]){f.push(o);const t=(h.get(o)??0)+1;h.set(o,t),t>u&&(u=t,l=o),n=o<n?o:n,i=o>i?o:i,s+=o,a++}}if(0===a)return{statistics:{min:0,max:0,avg:0,stddev:0,mode:0,median:0},histogram:null};const p=s/a;let d=0;for(let r=0;r<c;r++)e&&!e[r]||(d+=(t[r]-p)**2);const m=e?e.filter((t=>t)).length:c,g=m<=1?0:Math.sqrt(d/(m-1));f.sort(((t,e)=>t-e));const y=a>>>1,w={min:n,max:i,avg:p,stddev:g,mode:l,median:a%2?f[Math.floor(y)]:(f[y-1]+f[y])/2};if(["u8","s8","u4","u2","u1"].includes(r)){const r=i-n+1,o=new Uint32Array(r);for(let r=0;r<c;r++)e&&!e[r]||o[t[r]-n]++;return{statistics:w,histogram:{min:n-.5,max:i+.5,size:r,counts:o}}}const C=256,b=new Uint32Array(C),v=(i-n)/C;if(0===v)return{statistics:w,histogram:{min:n,max:i,size:1,counts:new Uint32Array(1).fill(a)}};const x=new Uint32Array(257);for(let r=0;r<c;r++)e&&!e[r]||x[Math.floor((t[r]-n)/v)]++;for(let t=0;t<255;t++)b[t]=x[t];return b[255]=x[255]+x[C],{statistics:w,histogram:{min:n,max:i,size:C,counts:b}}}(t,n?.[e]??r,o)));return{statistics:i.map((({statistics:t})=>t)),histograms:i.map((({histogram:t})=>t))}}function m(t){if(!t?.pixels?.length)return null;const{pixels:e,mask:r,bandMasks:o,pixelType:n}=t,i=t.width*t.height,s=e.length,a=[],l=[],u=256;let c,h,f,p;for(let d=0;d<s;d++){f=new Uint32Array(u);const s=e[d],m=o?.[d]??r;if("u8"===n){if(c=255,h=0,m){for(let t=0;t<i;t++)if(m[t]){const e=s[t];c=e<c?e:c,h=e>h?e:h,f[e]++}}else for(let t=0;t<i;t++){const e=s[t];c=e<c?e:c,h=e>h?e:h,f[e]++}f=f.slice(c,h+1)}else{let e=!1;t.statistics||(t.updateStatistics(),e=!0);const r=t.statistics;c=r[d].minValue,h=r[d].maxValue;const o=(h-c)/u;if(0===o){!r||t.validPixelCount||e||t.updateStatistics();const o=(t.validPixelCount||t.width*t.height)/u;for(let t=0;t<u;t++)f[t]=Math.round(o*(t+1))-Math.round(o*t)}else{p=new Uint32Array(257);for(let t=0;t<i;t++)m&&!m[t]||p[Math.floor((s[t]-c)/o)]++;for(let t=0;t<255;t++)f[t]=p[t];f[255]=p[255]+p[u]}}const g="u8"===n?c-.5:c,y="u8"===n?h+.5:h;a.push({min:g,max:y,size:f.length,counts:f});let w=0,C=0,b=0;for(let t=0;t<f.length;t++)w+=f[t],C+=t*f[t];const v=C/w;for(let t=0;t<f.length;t++)b+=f[t]*(t-v)**2;const x=Math.sqrt(b/(w-1)),A=(y-g)/f.length,k=(v+("u8"===n?0:.5))*A+c,S=x*A;l.push({min:c,max:h,avg:k,stddev:S})}return{statistics:l,histograms:a}}function g(t){const e=[];for(let r=0;r<t.length;r++){const{min:o,max:n,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=(n-o)/i,f=(u+.5)*h+o,p=Math.sqrt(c/(a-1))*h;e.push({min:o,max:n,avg:f,stddev:p})}return e}function y(t,e){const{pixelBlock:r,bandIds:n,returnHistogramLut:a,rasterInfo:l}=e;let c=null,h=null,f=t.stretchType;if("number"==typeof f&&(f=s.x[f]),t.dra)if("minMax"===f&&r?.statistics)c=r.statistics.map((t=>[t.minValue,t.maxValue,0,0]));else{const t=m(r);c=null!=t?t.statistics:null,h=null!=t?t.histograms:null}else c=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=c?.length||h?.length||l.bandCount,d=[],g=[];let y,w,C,b,v,x,A,k,S;c&&!Array.isArray(c[0])&&(c=c.map((t=>[t.min,t.max,t.avg,t.stddev])));const[T,M]=(0,i.hP)(l.pixelType);if(!c?.length){for(c=[],k=0;k<p;k++)c.push([T,M,1,1]);"standardDeviation"===f&&(f="minMax")}switch(f){case"none":for(k=0;k<p;k++)d[k]=T,g[k]=M;break;case"minMax":for(k=0;k<p;k++){const t=c[k];d[k]=t[0],g[k]=t[1]}break;case"standardDeviation":{const{numberOfStandardDeviations:e=2}=t;for(k=0;k<p;k++){const t=c[k];d[k]=t[2]-e*t[3],g[k]=t[2]+e*t[3],d[k]<t[0]&&(d[k]=t[0]),g[k]>t[1]&&(g[k]=t[1])}}break;case"histogramEqualization":for((0,o.Lw)(h),k=0;k<p;k++)d[k]=h[k].min,g[k]=h[k].max;break;case"percentClip":for((0,o.Lw)(h),k=0;k<h.length;k++){for(y=h[k],v=new Uint32Array(y.size),b=[...y.counts],b.length>=20&&(b[0]=b[1]=b[2]=b[b.length-1]=b[b.length-2]=0),C=0,w=(y.max-y.min)/y.size,A=-.5===y.min&&1===w?.5:0,S=0;S<y.size;S++)C+=b[S],v[S]=C;for(x=(t.minPercent||0)*C/100,d[k]=y.min+A,S=0;S<y.size;S++)if(v[S]>x){d[k]=y.min+w*(S+A);break}for(x=(1-(t.maxPercent||0)/100)*C,g[k]=y.max+A,S=y.size-2;S>=0;S--)if(v[S]<x){g[k]=y.min+w*(S+2-A);break}if(g[k]<d[k]){const t=d[k];d[k]=g[k],g[k]=t}}break;default:for(k=0;k<p;k++){const t=c[k];d[k]=t[0],g[k]=t[1]}}let I,P,E;return"histogramEqualization"===f?((0,o.Lw)(h),P=h[0].size||256,I=0,a&&(E=h.map((t=>u(t))))):(P=t.max||255,I=t.min||0),function(t,e){if(null==e||0===e.length)return t;const r=Math.max.apply(null,e),{minCutOff:o,maxCutOff:n,outMin:i,outMax:s,histogramLut:a}=t;return o.length===e.length||o.length<=r?t:{minCutOff:e.map((t=>o[t])),maxCutOff:e.map((t=>n[t])),histogramLut:a?e.map((t=>a[t])):null,outMin:i,outMax:s}}({minCutOff:d,maxCutOff:g,outMax:P,outMin:I,histogramLut:E},n)}function w(t,e){const r=new Float32Array(t);for(let o=0;o<t;o++)e[o]>1?e[o]>2?r[o]=6.5+(e[o]-2)**2.5:r[o]=6.5+100*(2-e[o])**4:r[o]=1;return r}function C(t,e){if(!t?.pixels?.length)return t;const{mask:r,bandMasks:o,width:i,height:s,pixels:a}=t,{minCutOff:l,maxCutOff:u,gamma:c}=e,h=e.outMin||0,f=e.outMax||255,p=i*s,d=e.outputPixelType||"u8",m=t.pixels.map((()=>n.A.createEmptyBand(d,p))),g=m.length,y=f-h,C=[],b=[];for(let t=0;t<g;t++)b[t]=u[t]-l[t],C[t]=0===b[t]?0:y/b[t];const v=d.startsWith("u")||d.startsWith("s"),x=c&&c.length>=g,A=!!e.isRenderer;if(x){const t=w(g,c);for(let e=0;e<g;e++){const n=o?.[e]??r;for(let r=0;r<p;r++)if(null==n||n[r]){if(0===b[e]){m[e][r]=h;continue}const o=a[e][r],n=(o-l[e])/b[e];let i=1;if(c[e]>1&&(i-=(1/y)**(n*t[e])),o<u[e]&&o>l[e]){const t=i*y*n**(1/c[e])+h;m[e][r]=A?Math.floor(t):v?Math.round(t):t}else o>=u[e]?m[e][r]=f:m[e][r]=h}}}else for(let t=0;t<g;t++){const e=o?.[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 o=(e-l[t])*C[t]+h;m[t][r]=A?Math.floor(o):v?Math.round(o):o}else e>=u[t]?m[t][r]=f:m[t][r]=h}}const k=new n.A({width:i,height:s,mask:r,bandMasks:o,pixels:m,pixelType:d});return k.updateStatistics(),k}},39062:(t,e,r)=>{r.d(e,{E0:()=>m,SC:()=>f,di:()=>d,fw:()=>h,ng:()=>l,rk:()=>a,yy:()=>p});var o=r(14140),n=r(4151),i=r(28435);const s=1,a=1/111e3;function l(t){let{altitude:e,azimuth:r}=t;const{hillshadeType:o,pixelSizePower:n=1,pixelSizeFactor:i=1,scalingType:s,isGCS:l,resolution:u}=t,c="multi-directional"===o?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**n*i)/(8*t),d=(c+e**n*i)/(8*e)}else p=(c+h**n*i)/(8*h),d=(c+f**n*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],v=[60,60,60,60,60,90],x=new Float32Array([3,5,3,2,1,4]),A=x.reduce(((t,e)=>t+e)),k=x.map((t=>t/A)),S="multi-directional"===o?b.length:1,T=new Float32Array(6),M=new Float32Array(6),I=new Float32Array(6);if("multi-directional"===o)for(let t=0;t<S;t++)e=v[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),T[t]=g,M[t]=w,I[t]=C;else T.fill(g),M.fill(w),I.fill(C);return{resolution:u,factor:[p,d],sinZcosA:w,sinZsinA:C,cosZ:g,sinZcosAs:M,sinZsinAs:I,cosZs:T,weights:k,hillshadeType:["traditional","multi-directional"].indexOf(o)}}function u(t,e){const{width:r,height:o}=t,n=r*o,i=new Uint8Array(n),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(n),h=new Float32Array(n);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(n)}const d=e?.curvatureType;let m,g,y,w,C,b,v,x;for(let t=s;t<o-s;t++){const e=t*r;for(let t=s;t<r-s;t++){const o=e+t;if(!l||0!==l[o]){if(l){if(l[o-r-1]+l[o-r]+l[o-r+1]+l[o-1]+l[o+1]+l[o+r-1]+l[o+r]+l[o+r+1]<7){i[o]=0;continue}m=l[o-r-1]?u[o-r-1]:u[o],g=l[o-r]?u[o-r]:u[o],y=l[o-r+1]?u[o-r+1]:u[o],w=l[o-1]?u[o-1]:u[o],C=l[o+1]?u[o+1]:u[o],b=l[o+r-1]?u[o+r-1]:u[o],v=l[o+r]?u[o+r]:u[o],x=l[o+r+1]?u[o+r+1]:u[o]}else m=u[o-r-1],g=u[o-r],y=u[o-r+1],w=u[o-1],C=u[o+1],b=u[o+r-1],v=u[o+r],x=u[o+r+1];if(c[o]=y+C+C+x-(m+w+w+b),h[o]=b+v+v+x-(m+g+g+y),null!=f){const t=u[o],e=.5*(w+C)-t,r=.5*(g+v)-t;if("standard"===d)f[o]=-p*(e+r);else{const t=(-m+y+b-x)/4,n=(-w+C)/2,i=(g-v)/2,s=n*n,a=i*i,l=s+a;l&&(f[o]="profile"===d?p*(e*s+r*a+t*n*i)/l:-p*(e*a+r*s-t*n*i)/l)}}}}}return{outMask:a?i:null,dzxs:c,dzys:h,curvatures:f}}function c(t,e,r){for(let o=0;o<r;o++)t[o*e]=t[o*e+1],t[(o+1)*e-1]=t[(o+1)*e-2];for(let o=1;o<e-1;o++)t[o]=t[o+e],t[o+(r-1)*e]=t[o+(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:v}=t,x=new Uint8Array(b*v),{dzxs:A,dzys:k,outMask:S}=u(t);for(let t=s;t<v-s;t++){const e=t*b;for(let t=s;t<b-s;t++){const r=e+t;if(!S||S[r]){const t=A[r]*y,e=k[r]*w,o=Math.sqrt(1+t*t+e*e);let n=0;if(C){let r=255*(f+h*e-a*t)/o;r<0&&(r=0),n=r}else{const r=d.length;for(let i=0;i<r;i++){let r=255*(m[i]+d[i]*e-p[i]*t)/o;r<0&&(r=0),n+=r*g[i]}}x[r]=255&n}}}return c(x,b,v),new o.A({width:b,height:v,pixels:[x],mask:S,pixelType:"u8",validPixelCount:t.validPixelCount,statistics:[new n.z(0,255)]})}function f(t,e,r,o){if(!(0,i.AB)(t)||!(0,i.AB)(e))return;const{min:n,max:s}=o,a=t.pixels[0],{pixels:l,mask:u}=e,c=l[0],h=255.00001/(s-n),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]-n)*h),[o,i]=r[e<0?0:e>m?m:e],s=a[t],l=s*i,g=l*(1-Math.abs(o%2-1)),y=s-l;switch(Math.floor(o)){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,n=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**n*l)/(8*p),g=(r+d**n*l)/(8*d));const{dzxs:y,dzys:w,outMask:C}=u(t),{width:b,height:v}=t,x=new Float32Array(b*v);for(let t=s;t<v-s;t++){const e=t*b;for(let t=s;t<b-s;t++){const r=e+t;if(!C||C[r]){const o=y[r]*m,n=w[r]*g,i=Math.sqrt(o*o+n*n);x[e+t]="percent-rise"===h?100*i:57.2957795*Math.atan(i)}}}c(x,b,v);const A=new o.A({width:b,height:v,pixels:[x],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 o=h[r]*a,n=f[r]*l;let i=-1;0===o&&0===n||(i=90-57.29578*Math.atan2(n,-o),i<0&&(i+=360),360===i?i=0:i>360&&(i%=360)),g[e+t]=i}}}return c(g,d,m),new o.A({width:d,height:m,pixels:[g],mask:p,pixelType:"f32",validPixelCount:t.validPixelCount,statistics:[new n.z(-1,360)]})}function m(t,e){if(!(0,i.AB)(t))return t;const{curvatures:r,outMask:n}=u(t,e),{width:s,height:a}=t;c(r,s,a);const l=new o.A({width:s,height:a,pixels:[r],mask:n,pixelType:"f32",validPixelCount:t.validPixelCount});return l.updateStatistics(),l}},14636:(t,e,r)=>{r.d(e,{FI:()=>d,KL:()=>u,Lu:()=>h,MD:()=>l,Rn:()=>m,Y2:()=>p});var o=r(66552),n=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 o.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,o]=t,n=Math.sqrt(r*r+o*o);let i=Math.atan2(o,r)*a;return i=(360+i)%360,"geographic"===e&&(i=c(i)),[n,i]}function f(t,e="geographic"){let r=t[1];"geographic"===e&&(r=c(r)),r%=360;const o=t[0];return[o*Math.cos(r/a),o*Math.sin(r/a)]}function p(t,e,r,o="geographic"){if(!(0,i.AB)(t)||null==r)return t;const n="vector-magdir"===e?t.clone():d(t,e),s=n.pixels[1];for(let t=0;t<s.length;t++)s[t]="geographic"===o?(s[t]+r[t]+270)%360:(s[t]+360-r[t])%360;return"vector-magdir"===e?n:d(n,"vector-magdir")}function d(t,e,r="geographic",o=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=n.A.createEmptyBand(d,u),g=n.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]*=o):([m[y],g[y]]=f([c[y],p[y]],r),m[y]*=o,g[y]*=o),y++;const w=new n.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 o=t.clone(),{pixels:n,width:s,height:a}=o,l=n[0],u=n[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 o.updateStatistics(),o}function g(t,e,r,o=1){const n=Math.sqrt(t*t+e*e)/o,i=(2*Math.PI+Math.atan2(e,t))%(2*Math.PI);return[n,(2*Math.PI+i-r)%(2*Math.PI)]}!function(t=0,e=0,r=Math.PI,o=!0){o&&(r=(2*Math.PI-r)%(2*Math.PI));const n=o?-1:1,i=13*n,s=-7*n,a=-2*n,l=-16*n,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),[v,x]=g(t-1.5,e+l,r,u),[A,k]=g(t+1.5,e+l,r,u)}(0,0,0)},85676:(t,e,r)=>{r.d(e,{A:()=>y});var o=r(90237),n=r(85334),i=r(25482),s=r(53966),a=r(10107),l=(r(44208),r(87811),r(40608)),u=r(87186),c=r(28435),h=r(6952),f=r(39062),p=r(67369),d=r(88178);let m=class extends i.oY{constructor(t){super(t)}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 o=t.extent,n=o.spatialReference.isGeographic,i={x:(o.xmax-o.xmin)/e.width,y:(o.ymax-o.ymin)/e.height};r=this._symbolizeShadedRelief(e,{isGCS:n,resolution:i});break}}return r}catch(t){return s.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 s.A.getLogger(this).error("symbolize",e.message),t}}generateWebGLParameters(t){if(["uniqueValue","rasterColormap","classBreaks"].includes(this.rendererJSON.type)){const{indexedColormap:t,offset:e}=this.lookup.colormapLut||{};return{colormap:t,colormapOffset:e,type:"lut"}}const{pixelBlock:e,isGCS:r,resolution:o,bandIds:n}=t,{rendererJSON:i}=this;return"rasterStretch"===i.type?this._generateStretchWebGLParams(e,i,n):"rasterShadedRelief"===i.type?this._generateShadedReliefWebGLParams(i,r,o??void 0):"vectorField"===i.type?this._generateVectorFieldWebGLParams(i):null}_isLUTChanged(t){if(!this.lookup||!this.lookup.rendererJSON)return!0;if("colorRamp"in this.rendererJSON){const e=this.rendererJSON.colorRamp;return t?JSON.stringify(e)!==JSON.stringify(this.lookup.rendererJSON.colorRamp):(this.rendererJSON,this.lookup.rendererJSON,JSON.stringify(this.rendererJSON)!==JSON.stringify(this.lookup.rendererJSON))}return JSON.stringify(this.rendererJSON)!==JSON.stringify(this.lookup.rendererJSON)}_symbolizeColormap(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){const{rasterInfo:r}=this,{pixelType:o,bandCount:n}=r,i=this.rendererJSON,s=["u8","u16","s8","s16"].includes(o);let a,l;const{dra:u}=i,{gamma:f}=this.lookup;if("histogramEqualization"===i.stretchType){const o=u?null:this.lookup?.histogramLut,n=(0,h.DP)(i,{rasterInfo:r,pixelBlock:t,bandIds:e,returnHistogramLut:!o}),s=(0,h._N)(t,{...n,gamma:f,isRenderer:!0});l=(0,c.eH)(s,{lut:u?n.histogramLut:o,offset:0})}else if(s){if(u){const n=(0,h.DP)(i,{rasterInfo:r,pixelBlock:t,bandIds:e});a=(0,h.RP)({pixelType:o,...n,gamma:f,rounding:"floor"})}else if(this._isLUTChanged()){if(!this.bind().success)return t;a=this.lookup?this.lookup.stretchLut:null}else a=this.lookup?this.lookup.stretchLut:null;if(!a)return t;n>1&&null!=e&&e.length===t?.pixels.length&&a?.lut.length===n&&(a={lut:e.map((t=>a.lut[t])),offset:a.offset}),l=(0,c.eH)(t,a)}else{const o=(0,h.DP)(i,{rasterInfo:r,pixelBlock:t,bandIds:e});l=(0,h._N)(t,{...o,gamma:f,isRenderer:!0})}if(i.colorRamp){if(this._isLUTChanged(!0)&&!this.bind().success)return t;l=(0,c.qL)(l,this.lookup?.colormapLut)}return l}_symbolizeShadedRelief(t,e){const r=this.rendererJSON,o={...r,...e},n=(0,f.fw)(t,o);if(!r.colorRamp)return n;let i;if(this._isLUTChanged(!0)){if(!this.bind().success)return n;i=this.lookup?this.lookup.hsvMap:null}else i=this.lookup?this.lookup.hsvMap:null;if(!i)return n;const s=this.rasterInfo.statistics?.[0]??{min:0,max:8e3};return(0,f.SC)(n,t,i,s),n}_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:o}=this.rasterInfo,n=t.field1;if(!n)return{success:!1,error:"Unsupported renderer; missing UniqueValueRenderer.field."};const i=t.defaultSymbol,s=1===e&&["u8","s8"].includes(o);if(!(0,d.hu)(this.rasterInfo,n)&&!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 o=t.uniqueValueInfos?.find((t=>String(t.value)===String(r.attributes[n]))),s=o?.symbol?.color;s?a.push([r.attributes[e.name]].concat(s)):i&&a.push([r.attributes[e.name]].concat(i.color))}))}else{if("value"!==n.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=this._isColormapSupportedByWebGL(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=this._isColormapSupportedByWebGL(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}),o=[],i=r.indexedColormap;for(let t=0;t<i.length;t+=4){const e=(0,n.N2)({r:i[t],g:i[t+1],b:i[t+2]});o.push([e.h/60,e.s/100,255*e.v/100])}this.lookup={rendererJSON:t,colormapLut:r,hsvMap:o}}else this.lookup=null;return this.canRenderInWebGL=!0,{success:!0}}_analyzeClassBreaks(t){const{attributeTable:e,pixelType:r}=this.rasterInfo,o=null!=e?e.fields.find((t=>"value"===t.name.toLowerCase())):null,n=null!=e?e.fields.find((e=>e.name.toLowerCase()===t.field.toLowerCase())):null,i=null!=o&&null!==n;return{canUseIndexedLUT:["u8","u16","s8","s16"].includes(r)||i,tableValueField:o,tableBreakField:n}}_updateClassBreaksRenderer(t){const{attributeTable:e}=this.rasterInfo,{canUseIndexedLUT:r,tableValueField:o,tableBreakField:n}=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 u=[];if(null!=e&&null!=o&&null!==n&&o!==n){const r=o.name,i=n.name,a=s[s.length-1],{classMaxValue:c}=a;l=t.minValue;for(const t of e.features){const e=t.attributes[r],o=t.attributes[i],n=o===c?a:o<l?null:s.find((({classMaxValue:t})=>t>o));n&&u.push([e].concat(n.symbol.color))}}else{l=Math.floor(t.minValue);for(let t=0;t<s.length;t++){const e=s[t];for(let t=l;t<e.classMaxValue;t++)u.push([t].concat(e.symbol.color));l=Math.ceil(e.classMaxValue)}a.classMaxValue===l&&u.push([a.classMaxValue].concat(a.symbol.color))}const h=(0,c.zg)({colormap:u,fillUnspecified:!1});return this.lookup={rendererJSON:t,colormapLut:h},this.canRenderInWebGL=this._isColormapSupportedByWebGL(h?.indexedColormap),{success:!0}}_isColormapSupportedByWebGL(t){return!!t?.length&&t.length<=16384}_isHistogramRequired(t){return"percentClip"===t||"histogramEqualization"===t}_isValidRasterStatistics(t){return null!=t&&t.length>0&&null!=t[0].min&&null!=t[0].max}_updateStretchRenderer(t){let{stretchType:e,dra:r}=t;if(!("none"===e||t.statistics?.length||this._isValidRasterStatistics(this.rasterInfo.statistics)||r))return{success:!1,error:"Unsupported renderer; StretchRenderer.statistics is required when dynamic range adjustment is not used."};const o=t.histograms||this.rasterInfo.histograms;!this._isHistogramRequired(t.stretchType)||o?.length||r||(e="minMax");const{computeGamma:n,useGamma:i,colorRamp:s}=t;let{gamma:a}=t;if(i&&n&&!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=o.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}}if(s&&!this._isStretchColorRampNoop(s)){const e=(0,p.R8)(s,{interpolateAlpha:!0});this.lookup||(this.lookup={rendererJSON:t}),this.lookup.colormapLut=(0,c.zg)({colormap:e}),this.lookup.rendererJSON=t}return this.lookup.gamma=i&&a?.length?a:null,this.canRenderInWebGL=!0,{success:!0}}_isStretchColorRampNoop(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(","))}_generateStretchWebGLParams(t,e,r){let o=null,n=null;const i=this.lookup?.colormapLut;e.colorRamp&&i&&(o=i.indexedColormap,n=i.offset),"histogramEqualization"===e.stretchType&&(e={...e,stretchType:"minMax"});const{gamma:s}=this.lookup,a=!!(e.useGamma&&s&&s.some((t=>1!==t))),{minCutOff:l,maxCutOff:u,outMin:c,outMax:f}=(0,h.DP)(e,{rasterInfo:this.rasterInfo,pixelBlock:t,bandIds:r});let p=0;null!=t&&(p=t.getPlaneCount(),2===p&&((t=t.clone()).statistics=[t.statistics[0]],t.pixels=[t.pixels[0]]));const{bandCount:d}=this.rasterInfo,m=Math.min(3,r?.length||p||d,d),g=new Float32Array(m),y=o||a?1:255;let w;for(w=0;w<l.length;w++)g[w]=u[w]===l[w]?0:(f-c)/(u[w]-l[w])/y;const C=new Float32Array(m);if(a&&s)for(w=0;w<m;w++)s[w]>1?s[w]>2?C[w]=6.5+(s[w]-2)**2.5:C[w]=6.5+100*(2-s[w])**4:C[w]=1;return{bandCount:m,outMin:c/y,outMax:f/y,minCutOff:l,maxCutOff:u,factor:g,useGamma:a,gamma:a?s:[1,1,1],gammaCorrection:a?C:[1,1,1],colormap:o,colormapOffset:n,stretchType:e.stretchType,type:"stretch"}}_generateShadedReliefWebGLParams(t,e=!1,r={x:0,y:0}){let o=null,n=null;const i=this.lookup?.colormapLut;t.colorRamp&&i&&(o=i.indexedColormap,n=i.offset);const 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:n}}_generateVectorFieldWebGLParams(t){const{style:e,inputUnit:r,outputUnit:o,visualVariables:n,symbolTileSize:i,flowRepresentation:s}=t;let a;const l=this.rasterInfo.statistics?.[0].min??0,u=this.rasterInfo.statistics?.[0].max??50,c=n?.find((t=>"sizeInfo"===t.type))??{type:"sizeInfo",field:"Magnitude",maxDataValue:u,maxSize:.8*i,minDataValue:l,minSize:.2*i},h=c.minDataValue??l,f=c.maxDataValue??u,p=null!=c.maxSize&&null!=c.minSize?[c.minSize/i,c.maxSize/i]:[.2,.8];if("wind_speed"===e){const t=(p[0]+p[1])/2;p[0]=p[1]=t}const d=null!=h&&null!=f?[h,f]:null;if("classified_arrow"===e)if(null!=h&&null!=f&&null!=c){a=[];const t=(c.maxDataValue-c.minDataValue)/5;for(let e=0;e<6;e++)a.push(c.minDataValue+t*e)}else a=[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=n?.find((t=>"rotationInfo"===t.type));return{breakValues:a,dataRange:d,inputUnit:r,outputUnit:o,symbolTileSize:i,symbolPercentRange:p,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,o._)([(0,a.MZ)({json:{write:!0}})],m.prototype,"rendererJSON",void 0),(0,o._)([(0,a.MZ)({type:u.A,json:{write:!0}})],m.prototype,"rasterInfo",void 0),(0,o._)([(0,a.MZ)({json:{write:!0}})],m.prototype,"lookup",void 0),(0,o._)([(0,a.MZ)()],m.prototype,"canRenderInWebGL",void 0),m=(0,o._)([(0,l.$)("esri.renderers.support.RasterSymbolizer")],m);const y=m},67369:(t,e,r)=>{r.d(e,{L7:()=>a,M5:()=>d,R8:()=>w,hf:()=>v,hs:()=>p,iv:()=>y,kH:()=>u,vL:()=>x,vj:()=>l});var o=r(68197),n=r(85334),i=r(66552),s=r(25482);const a=["random","ndvi","ndvi2","ndvi3","elevation","gray","hillshade"],l=[{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]}],u=new i.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 c(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 h(t){const e=t.clone();return e.fromColor=t.toColor,e.toColor=t.fromColor,e.algorithm=t.algorithm,e}function f(t,e){if(!t)return;const r=e??l;let n=null;return"algorithmic"===t.type?r.some((e=>{if(c(t.fromColor.toRgb(),e.fromColor)&&c(t.toColor.toRgb(),e.toColor))return n=e.id,!0})):"multipart"===t.type&&r.some((e=>{const r=t.colorRamps,i=e.colorRamps;if(r&&i&&r.length===i.length&&!i.some(((t,e)=>{if(!c(r[e].fromColor.toRgb(),new o.A(t.fromColor).toRgb())||!c(r[e].toColor.toRgb(),new o.A(t.toColor).toRgb()))return!0}))){if(n)return!0;n=e.id}})),n}function p(t,e=!1){const r="string"==typeof t?t:function(t,e,r=!1){if(!t)return;let o=!1,n=f(t,e);return null!=n||r||(o=!0,n=f(t=function(t){if("multipart"===t.type){const e=t.clone();return e.colorRamps?.length?(e.colorRamps=e.colorRamps.reverse().map((t=>h(t))),e):e}return h(t)}(t),e)),n?{id:n,inverted:o}:void 0}(t,void 0,e)?.id;return r?u.toJSON(r):null}function d(t,e="esriCIELabAlgorithm"){const r=l.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 m(t){const e=(t=t||{}).numColors||256,r=t.distanceOffset||0,o=null!=t.isCustomInterval?t.isCustomInterval:null!==t.distanceInterval&&t.distanceInterval!==1/(e-1),n=t.distanceInterval||1/(e-1);return{...t,numColors:e,distanceOffset:r,interpolateAlpha:!!t.interpolateAlpha,distanceInterval:n,isCustomInterval:o,weights:t.weights}}function g(t,e){let{fromColor:r,toColor:o}=t;r=[...r],o=[...o],3===r.length&&(r=r.concat([255])),3===o.length&&(o=o.concat([255]));const i=t.algorithm||"esriCIELabAlgorithm",s=m(e),{numColors:a,distanceOffset:l,isCustomInterval:u,interpolateAlpha:c}=s;if(1===a&&0===l)return[r];if(2===a&&0===l&&!u)return[r,o];const h={r:r[0],g:r[1],b:r[2]},f={r:o[0],g:o[1],b:o[2]},p="esriCIELabAlgorithm"===i?function(t,e,r){const{numColors:o,distanceOffset:n,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(n){const t=n/i;a+=t*c,l+=t*h,u+=t*f}for(let t=0;t<o-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)(h),(0,n.ZD)(f),s):"esriHSVAlgorithm"===i?function(t,e,r){const{numColors:o,distanceOffset:n,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,f=Math.abs(c-u);const p=360;f<180?h=(c-u)*i:(f=p-f,h=u>c?f*i:-f*i);const d=(e.s-t.s)*i,m=(e.v-t.v)*i;let{s:g,v:y}=t,w=u;if(n){const t=n/i;w=(w+t*h+p)%p,g+=t*d,y+=t*m}const C=[];for(let t=0;t<o-1;t++)C.push({h:w,s:g,v:y}),w=(w+h+p)%p,g+=d,y+=m;return C.push(s?{h:w,s:g,v:y}:e),C}((0,n.N2)(h),(0,n.N2)(f),s):function(t,e,r){const{numColors:o,distanceOffset:n,distanceInterval:i,isCustomInterval:s}=r,a=t.h,l=e.h,u=2*Math.PI;let c;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(n){const t=n/i;d+=t*f,m+=t*p,g=(g+t*h+u)%u}const y=[];for(let t=0;t<o-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)(h),(0,n.RH)(f),s),d=[],g=r[3]??255,y=((o[3]??255)-g)/(a-1);for(let t=0;t<a;t++){const{r:e,g:r,b:o}=(0,n.$)(p[t]),i=c?Math.round(g+y*t):255;d.push([e,r,o,i])}return d}function y(t,e){const r=(0,s.Wj)(t)?t.toJSON():t;return"multipart"===r.type?function(t,e){const{numColors:r,interpolateAlpha:o}=m(e);let n=e?.weights;const{colorRamps:i}=t;if(n){const t=n.reduce(((t,e)=>t+e));n=n.map((e=>e/t))}else{n=[];for(let t=0;t<i.length;t++)n[t]=1/i.length}const 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+=n[t];let h=t===i.length-1?r-1-e:(n[t]-c)/a;if(u=Math.ceil(h)===h,h=Math.ceil(h),0===h)continue;const f=g(i[t],{numColors:h,interpolateAlpha:o,distanceOffset:c/n[t],distanceInterval:a/n[t]});s.push(...f)}const c=[...i[i.length-1].toColor];return 3===c.length&&c.push(255),s.push(c),s}(r,e):g(r,e)}function w(t,e){const r=y(t,e),o=e?.interpolateAlpha;return r.forEach(((t,e)=>{t.unshift(e),o||t.pop()})),r}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 v(t){const e=p(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 x(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)}},88178:(t,e,r)=>{function o(t,e){const{attributeTable:r,bandCount:o}=t;return!((null!=r||(n=t,!["u8","s8"].includes(n.pixelType)||null==n.statistics?.[0]?.min||null==n.statistics[0]?.max||1!==n.bandCount))&&(null==r||o>1||e&&null==r.fields.find((t=>t.name.toLowerCase()===e.toLowerCase()))));var n}function n(t){const{bandCount:e,dataType:r,pixelType:o}=t;return"elevation"===r||"generic"===r&&1===e&&("s16"===o||"s32"===o||"f32"===o||"f64"===o)}function i(t,e=!1){const{bandCount:r,colormap:o,pixelType:n}=t;return 1===r&&(!!o?.length||!e&&"u8"===n)}function s(t,e=!1){const{attributeTable:r,bandCount:o}=t;return 1===o&&(!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}r.d(e,{FA:()=>i,QJ:()=>l,hu:()=>o,iL:()=>n,rd:()=>a,xX:()=>s})},70274:(t,e,r)=>{r.d(e,{u:()=>o,x:()=>n});const o=new(r(66552).J)({none:"none",standardDeviation:"standard-deviation",histogramEqualization:"histogram-equalization",minMax:"min-max",percentClip:"percent-clip",sigmoid:"sigmoid"}),n={0:"none",3:"standardDeviation",4:"histogramEqualization",5:"minMax",6:"percentClip",9:"sigmoid"}},4095:(t,e,r)=>{r.d(e,{CW:()=>u}),r(59456);var o=r(44208),n=r(53966),i=(r(34727),r(74887)),s=r(87811);r(21325),r(5443);const a=()=>n.A.getLogger("esri.views.2d.engine.flow.dataUtils"),l=10;async function u(t,e,r,n){const u=performance.now(),c=function(t,e){const r=function(t,e,r,o){if(0===o)return t;const n=Math.round(3*o),i=new Array(2*n+1);let s=0;for(let t=-n;t<=n;t++){const e=Math.exp(-t*t/(o*o));i[t+n]=e,s+=e}for(let t=-n;t<=n;t++)i[t+n]/=s;const a=new Float32Array(t.length);for(let o=0;o<r;o++)for(let r=0;r<e;r++){let s=0,l=0;for(let a=-n;a<=n;a++){if(r+a<0||r+a>=e)continue;const u=i[a+n];s+=u*t[2*(o*e+(r+a))],l+=u*t[2*(o*e+(r+a))+1]}a[2*(o*e+r)]=s,a[2*(o*e+r)+1]=l}const l=new Float32Array(t.length);for(let t=0;t<e;t++)for(let o=0;o<r;o++){let s=0,u=0;for(let l=-n;l<=n;l++){if(o+l<0||o+l>=r)continue;const c=i[l+n];s+=c*a[2*((o+l)*e+t)],u+=c*a[2*((o+l)*e+t)+1]}l[2*(o*e+t)]=s,l[2*(o*e+t)+1]=u}return l}(e.data,e.width,e.height,t.smoothing);return t.interpolate?(t,o)=>{const n=Math.floor(t),i=Math.floor(o);if(n<0||n>=e.width)return[0,0];if(i<0||i>=e.height)return[0,0];const s=t-n,a=o-i,l=n,u=i,c=n<e.width-1?n+1:n,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,o)=>{const n=Math.round(t),i=Math.round(o);return n<0||n>=e.width||i<0||i>=e.height?[0,0]:[r[2*(i*e.width+n)],r[2*(i*e.width+n)+1]]}}(e,r),f=performance.now(),p=h(e,c,r.width,r.height),d=performance.now(),m=function(t,e){const r=new s.A,o=t.reduce(((t,e)=>t+e.length),0),n=new Float32Array(4*o),i=new Array(t.length);let a=0,l=0;for(const e of t){const t=a;for(const t of e)n[4*a]=t.x,n[4*a+1]=t.y,n[4*a+2]=t.t,n[4*a+3]=t.speed,a++;i[l++]={startVertex:t,numberOfVertices:e.length,totalTime:e[e.length-1].t,timeSeed:r.getFloat()}}return{lineVertices:n,lineDescriptors:i}}(p),g=performance.now(),y="Streamlines"===t?function(t,e){const{lineVertices:r,lineDescriptors:o}=t;let n=0,i=0;for(const t of o)n+=2*t.numberOfVertices,i+=6*(t.numberOfVertices-1);const s=new Float32Array(9*n),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,o,n,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++]=o/2,s[c+h++]=n/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++]=-o/2,s[c+h++]=-n/2,s[c+h++]=u,l++}for(const t of o){const{totalTime:o,timeSeed:n}=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,v=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 o=Math.sqrt(t*t+r*r);t/=o,r/=o;const n=Math.min(1/(t*w+r*C),e);t*=n,r*=n,b=-r,v=t}else b=-C,v=w;null!==b&&null!==v&&(h(i,s,a,b,v,o,n,y),c())}i=d,s=m,a=g,u=w,f=C,l=y}h(i,s,a,-f,u,o,n,l)}return{vertexData:s,indexData:a}}(m,l):function(t){const e=16,r=1,o=2,{lineVertices:n,lineDescriptors:i}=t;let s=0,a=0;for(const t of i){const e=t.numberOfVertices-1;s+=4*e*2,a+=6*e*2}const l=new Float32Array(s*e),u=new Uint32Array(a);let c,h,f,p,d,m,g,y,w,C,b,v,x,A,k=0,S=0;function T(){u[S++]=k-8,u[S++]=k-7,u[S++]=k-6,u[S++]=k-7,u[S++]=k-5,u[S++]=k-6,u[S++]=k-4,u[S++]=k-3,u[S++]=k-2,u[S++]=k-3,u[S++]=k-1,u[S++]=k-2}function M(t,n,i,s,a,u,c,h,f,p,d,m,g,y){const w=k*e;let C=0;for(const e of[r,o])for(const r of[1,2,3,4])l[w+C++]=t,l[w+C++]=n,l[w+C++]=i,l[w+C++]=s,l[w+C++]=c,l[w+C++]=h,l[w+C++]=f,l[w+C++]=p,l[w+C++]=e,l[w+C++]=r,l[w+C++]=g,l[w+C++]=y,l[w+C++]=a/2,l[w+C++]=u/2,l[w+C++]=d/2,l[w+C++]=m/2,k++}function I(t,e){let r=w+b,o=C+v;const n=Math.sqrt(r*r+o*o);r/=n,o/=n;const i=w*r+C*o;r/=i,o/=i;let s=b+x,a=v+A;const l=Math.sqrt(s*s+a*a);s/=l,a/=l;const u=b*s+v*a;s/=u,a/=u,M(c,h,f,p,-o,r,d,m,g,y,-a,s,t,e),T()}function P(t,e,r,o,n,i){if(w=b,C=v,b=x,v=A,null==w&&null==C&&(w=b,C=v),null!=d&&null!=m){x=t-d,A=e-m;const r=Math.sqrt(x*x+A*A);x/=r,A/=r}null!=w&&null!=C&&I(n,i),c=d,h=m,f=g,p=y,d=t,m=e,g=r,y=o}function E(t,e){w=b,C=v,b=x,v=A,null==w&&null==C&&(w=b,C=v),null!=w&&null!=C&&I(t,e)}for(const t of i){c=null,h=null,f=null,p=null,d=null,m=null,g=null,y=null,w=null,C=null,b=null,v=null,x=null,A=null;const{totalTime:e,timeSeed:r}=t;for(let o=0;o<t.numberOfVertices;o++)P(n[4*(t.startVertex+o)],n[4*(t.startVertex+o)+1],n[4*(t.startVertex+o)+2],n[4*(t.startVertex+o)+3],e,r);E(e,r)}return{vertexData:l,indexData:u}}(m),w=performance.now();return(0,o.A)("esri-2d-profiler")&&(a().info("I.1","_createFlowFieldFromData (ms)",Math.round(f-u)),a().info("I.2","_getStreamlines (ms)",Math.round(d-f)),a().info("I.3","createAnimatedLinesData (ms)",Math.round(g-d)),a().info("I.4","create{Streamlines|Particles}Mesh (ms)",Math.round(w-g)),a().info("I.5","createFlowMesh (ms)",Math.round(w-u)),a().info("I.6","Mesh size (bytes)",y.vertexData.buffer.byteLength+y.indexData.buffer.byteLength)),await Promise.resolve(),(0,i.Te)(n),y}function c(t,e,r,o,n,i,s,a,l){const u=[];let c=r,h=o,f=0,[p,d]=e(c,h);p*=t.velocityScale,d*=t.velocityScale;const m=Math.sqrt(p*p+d*d);let g,y;u.push({x:c,y:h,t:f,speed:m});for(let r=0;r<t.verticesPerLine;r++){let[r,o]=e(c,h);r*=t.velocityScale,o*=t.velocityScale;const p=Math.sqrt(r*r+o*o);if(p<t.minSpeedThreshold)return u;const d=r/p,m=o/p;if(c+=d*t.segmentLength,h+=m*t.segmentLength,f+=t.segmentLength/p,Math.acos(d*g+m*y)>t.maxTurnAngle)return u;if(t.collisions){const t=Math.round(c*l),e=Math.round(h*l);if(t<0||t>s-1||e<0||e>a-1)return u;const r=i[e*s+t];if(-1!==r&&r!==n)return u;i[e*s+t]=n}u.push({x:c,y:h,t:f,speed:p}),g=d,y=m}return u}function h(t,e,r,o){const n=[],i=new s.A,a=1/Math.max(t.lineCollisionWidth,1),l=Math.round(r*a),u=Math.round(o*a),h=new Int32Array(l*u);for(let t=0;t<h.length;t++)h[t]=-1;const f=[];for(let e=0;e<o;e+=t.lineSpacing)for(let o=0;o<r;o+=t.lineSpacing)f.push({x:o,y:e,sort:i.getFloat()});f.sort(((t,e)=>t.sort-e.sort));for(const{x:r,y:o}of f)if(i.getFloat()<t.density){const i=c(t,e,r,o,n.length,h,l,u,a);if(i.length<2)continue;n.push(i)}return n}}}]);
@@ -0,0 +1 @@
1
+ "use strict";(self.webpackChunkRemoteClient=self.webpackChunkRemoteClient||[]).push([[9345,5804,3069],{46130:(e,t,r)=>{r.d(t,{v:()=>o});var s=r(76553);function o(e){e?.writtenProperties&&e.writtenProperties.forEach((({target:e,propName:t,newOrigin:r})=>{(0,s.H)(e)&&r&&e.originOf(t)!==r&&e.updateOrigin(t,r)}))}},76553:(e,t,r)=>{function s(e){return e&&"getAtOrigin"in e&&"originOf"in e}r.d(t,{H:()=>s})},13069:(e,t,r)=>{r.d(t,{lk:()=>o,vD:()=>a,yS:()=>n});const s="randomUUID"in crypto;function o(){if(s)return crypto.randomUUID();const e=crypto.getRandomValues(new Uint16Array(8));e[3]=4095&e[3]|16384,e[4]=16383&e[4]|32768;const t=t=>e[t].toString(16).padStart(4,"0");return t(0)+t(1)+"-"+t(2)+"-"+t(3)+"-"+t(4)+"-"+t(5)+t(6)+t(7)}function n(){return`{${o().toUpperCase()}}`}function a(){return`{${o()}}`}},52136:(e,t,r)=>{r.d(t,{p:()=>a});var s=r(90237),o=r(10107),n=(r(44208),r(53966),r(87811),r(40608));const a=e=>{let t=class extends e{get apiKey(){return this._isOverridden("apiKey")?this._get("apiKey"):"portalItem"in this?this.portalItem?.apiKey:null}set apiKey(e){null!=e?this._override("apiKey",e):(this._clearOverride("apiKey"),this.clear("apiKey","user"))}};return(0,s._)([(0,o.MZ)({type:String})],t.prototype,"apiKey",null),t=(0,s._)([(0,n.$)("esri.layers.mixins.APIKeyMixin")],t),t}},18768:(e,t,r)=>{r.d(t,{b:()=>l});var s=r(90237),o=r(53966),n=r(10107),a=(r(44208),r(87811),r(40608)),i=r(60694);const l=e=>{let t=class extends e{get title(){if(this._get("title")&&"defaults"!==this.originOf("title"))return this._get("title");if(this.url){const e=(0,i.qg)(this.url);if(null!=e&&e.title)return e.title}return this._get("title")||""}set title(e){this._set("title",e)}set url(e){this._set("url",(0,i.Jf)(e,o.A.getLogger(this)))}};return(0,s._)([(0,n.MZ)()],t.prototype,"title",null),(0,s._)([(0,n.MZ)({type:String})],t.prototype,"url",null),t=(0,s._)([(0,a.$)("esri.layers.mixins.ArcGISService")],t),t}},58947:(e,t,r)=>{r.d(t,{Xh:()=>K,w6:()=>R});var s=r(90237),o=r(78888),n=r(49186),a=r(53966),i=r(74887),l=r(84952),p=r(10107),c=(r(44208),r(87811),r(36005)),u=r(40608),d=r(43937),h=r(46130),y=r(5443),f=r(76620),m=r(16930),g=r(60694),v=r(55785),w=r(83898);var S=r(20655),I=r(80812),x=r(88788),A=r(91682),_=r(49864),b=r(26121);const R=e=>{let t=class extends e{constructor(){super(...arguments),this.spatialReference=null,this.fullExtent=null,this.heightModelInfo=null,this.minScale=0,this.maxScale=0,this.version={major:Number.NaN,minor:Number.NaN,versionString:""},this.copyright=null,this.sublayerTitleMode="item-title",this.title=null,this.layerId=null,this.indexInfo=null,this._debouncedSaveOperations=(0,i.sg)((async(e,t,r)=>{switch(e){case K.SAVE:return this._save(t);case K.SAVE_AS:return this._saveAs(r,t)}}))}readSpatialReference(e,t){return P(t)}readFullExtent(e,t,r){if(null!=e&&"object"==typeof e){const s=null==e.spatialReference?{...e,spatialReference:P(t)}:e;return y.A.fromJSON(s,r)}const s=t.store,o=P(t);return null==o||null==s?.extent||!Array.isArray(s.extent)||s.extent.some((e=>e<U))?null:new y.A({xmin:s.extent[0],ymin:s.extent[1],xmax:s.extent[2],ymax:s.extent[3],spatialReference:o})}parseVersionString(e){const t={major:Number.NaN,minor:Number.NaN,versionString:e},r=e.split(".");return r.length>=2&&(t.major=parseInt(r[0],10),t.minor=parseInt(r[1],10)),t}readVersion(e,t){const r=t.store,s=null!=r.version?r.version.toString():"";return this.parseVersionString(s)}readTitlePortalItem(e){return"item-title"!==this.sublayerTitleMode?void 0:e}readTitleService(e,t){const r=this.portalItem?.title;if("item-title"===this.sublayerTitleMode)return(0,g.yG)(this.url,t.name);let s=t.name;if(!s&&this.url){const e=(0,g.qg)(this.url);null!=e&&(s=e.title)}return"item-title-and-service-name"===this.sublayerTitleMode&&r&&(s=r+" - "+s),(0,g.cr)(s)}set url(e){const t=(0,g.HZ)({layer:this,url:e,nonStandardUrlAllowed:!1,logger:a.A.getLogger(this)});this._set("url",t.url),null!=t.layerId&&this._set("layerId",t.layerId)}writeUrl(e,t,r,s){(0,g.LS)(this,e,"layers",t,s)}get parsedUrl(){const e=this._get("url"),t=(0,l.An)(e);return null!=this.layerId&&(t.path=`${t.path}/layers/${this.layerId}`),t}async _fetchIndexAndUpdateExtent(e,t){this.indexInfo=(0,w.F)(this.parsedUrl.path,this.rootNode,e,this.customParameters,this.apiKey,a.A.getLogger(this),t),null==this.fullExtent||this.fullExtent.hasZ||this._updateExtent(await this.indexInfo)}_updateExtent(e){if("page"===e?.type){const t=e.rootIndex%e.pageSize,r=e.rootPage?.nodes?.[t];if(null==r?.obb?.center||null==r.obb.halfSize)throw new n.A("sceneservice:invalid-node-page","Invalid node page.");if(r.obb.center[0]<U||null==this.fullExtent||this.fullExtent.hasZ)return;const s=r.obb.halfSize,o=r.obb.center[2],a=Math.sqrt(s[0]*s[0]+s[1]*s[1]+s[2]*s[2]);this.fullExtent.zmin=o-a,this.fullExtent.zmax=o+a}else if("node"===e?.type){const t=e.rootNode?.mbs;if(!Array.isArray(t)||4!==t.length||t[0]<U)return;const r=t[2],s=t[3],{fullExtent:o}=this;o&&(o.zmin=r-s,o.zmax=r+s)}}async _fetchService(e){if(null==this.url)throw new n.A("sceneservice:url-not-set","Scene service can not be loaded without valid portal item or url");if(null==this.layerId&&/SceneServer\/*$/i.test(this.url)){const t=await this._fetchFirstLayerId(e);null!=t&&(this.layerId=t)}return this._fetchServiceLayer(e)}async _fetchFirstLayerId(e){const t=await(0,o.A)(this.url,{query:{f:"json",...this.customParameters,token:this.apiKey},responseType:"json",signal:e});if(t.data&&Array.isArray(t.data.layers)&&t.data.layers.length>0)return t.data.layers[0].id}async _fetchServiceLayer(e){const t=await(0,o.A)(this.parsedUrl?.path??"",{query:{f:"json",...this.customParameters,token:this.apiKey},responseType:"json",signal:e});t.ssl&&(this.url=this.url.replace(/^http:/i,"https:"));let r=!1;if(t.data.layerType&&"Voxel"===t.data.layerType&&(r=!0),r)return this._fetchVoxelServiceLayer();const s=t.data;this.read(s,this._getServiceContext()),this.validateLayer(s)}async _fetchVoxelServiceLayer(e){const t=(await(0,o.A)(this.parsedUrl?.path+"/layer",{query:{f:"json",...this.customParameters,token:this.apiKey},responseType:"json",signal:e})).data;this.read(t,this._getServiceContext()),this.validateLayer(t)}_getServiceContext(){return{origin:"service",portalItem:this.portalItem,portal:this.portalItem?.portal,url:this.parsedUrl}}async _ensureLoadBeforeSave(){await this.load(),"beforeSave"in this&&"function"==typeof this.beforeSave&&await this.beforeSave()}validateLayer(e){}async _saveAs(e,t){const r={...E,...t};let s=I.default.from(e);if(!s)throw new n.A("sceneservice:portal-item-required","_saveAs() requires a portal item to save to");(0,_.X)(s),s.id&&(s=s.clone(),s.id=null);const o=s.portal||S.A.getDefault();await this._ensureLoadBeforeSave(),s.type=j,s.portal=o;const a=(0,x.m)(s,"portal-item",!0),i={layers:[this.write({},a)]};return await Promise.all(a.resources.pendingOperations??[]),await this._validateAgainstJSONSchema(i,a,r),s.url=this.url,s.title||(s.title=this.title),O(s,r,M.newItem),await o.signIn(),await(o.user?.addItem({item:s,folder:r?.folder,data:i})),await(0,A.r)(this.resourceReferences,a),this.portalItem=s,(0,h.v)(a),a.portalItem=s,s}async _save(e){const t={...E,...e};if(!this.portalItem)throw new n.A("sceneservice:portal-item-not-set","Portal item to save to has not been set on this SceneService");if((0,_.X)(this.portalItem),this.portalItem.type!==j)throw new n.A("sceneservice:portal-item-wrong-type",`Portal item needs to have type "${j}"`);await this._ensureLoadBeforeSave();const r=(0,x.m)(this.portalItem,"portal-item",!0),s={layers:[this.write({},r)]};return await Promise.all(r.resources.pendingOperations??[]),await this._validateAgainstJSONSchema(s,r,t),this.portalItem.url=this.url,this.portalItem.title||(this.portalItem.title=this.title),O(this.portalItem,t,M.existingItem),await(0,A.S)(this.portalItem,s,this.resourceReferences,r),(0,h.v)(r),this.portalItem}async _validateAgainstJSONSchema(e,t,r){const s=r?.validationOptions;(0,b.c)(t,{errorName:"sceneservice:save"},{ignoreUnsupported:s?.ignoreUnsupported,supplementalUnsupportedErrors:["scenemodification:unsupported"]});const o=s?.enabled,i=null;if(o&&i){const t=(await i()).validate(e,r.portalItemLayerType);if(!t.length)return;const o=`Layer item did not validate:\n${t.join("\n")}`;if(a.A.getLogger(this).error(`_validateAgainstJSONSchema(): ${o}`),"throw"===s.failPolicy){const e=t.map((e=>new n.A("sceneservice:schema-validation",e)));throw new n.A("sceneservice-validate:error","Failed to save layer item due to schema validation, see `details.errors`.",{validationErrors:e})}}}};return(0,s._)([(0,p.MZ)(v.id)],t.prototype,"id",void 0),(0,s._)([(0,p.MZ)({type:m.A})],t.prototype,"spatialReference",void 0),(0,s._)([(0,c.w)("spatialReference",["spatialReference","store.indexCRS","store.geographicCRS"])],t.prototype,"readSpatialReference",null),(0,s._)([(0,p.MZ)({type:y.A})],t.prototype,"fullExtent",void 0),(0,s._)([(0,c.w)("fullExtent",["fullExtent","store.extent","spatialReference","store.indexCRS","store.geographicCRS"])],t.prototype,"readFullExtent",null),(0,s._)([(0,p.MZ)({readOnly:!0,type:f.A})],t.prototype,"heightModelInfo",void 0),(0,s._)([(0,p.MZ)({type:Number,json:{name:"layerDefinition.minScale",write:!0,origins:{service:{read:{source:"minScale"},write:!1}}}})],t.prototype,"minScale",void 0),(0,s._)([(0,p.MZ)({type:Number,json:{name:"layerDefinition.maxScale",write:!0,origins:{service:{read:{source:"maxScale"},write:!1}}}})],t.prototype,"maxScale",void 0),(0,s._)([(0,p.MZ)({readOnly:!0})],t.prototype,"version",void 0),(0,s._)([(0,c.w)("version",["store.version"])],t.prototype,"readVersion",null),(0,s._)([(0,p.MZ)({type:String,json:{read:{source:"copyrightText"}}})],t.prototype,"copyright",void 0),(0,s._)([(0,p.MZ)({type:String,json:{read:!1}})],t.prototype,"sublayerTitleMode",void 0),(0,s._)([(0,p.MZ)({type:String})],t.prototype,"title",void 0),(0,s._)([(0,c.w)("portal-item","title")],t.prototype,"readTitlePortalItem",null),(0,s._)([(0,c.w)("service","title",["name"])],t.prototype,"readTitleService",null),(0,s._)([(0,p.MZ)({type:Number,json:{origins:{service:{read:{source:"id"}},"portal-item":{write:{target:"id",isRequired:!0,ignoreOrigin:!0},read:!1}}}})],t.prototype,"layerId",void 0),(0,s._)([(0,p.MZ)(v.OZ)],t.prototype,"url",null),(0,s._)([(0,d.K)("url")],t.prototype,"writeUrl",null),(0,s._)([(0,p.MZ)()],t.prototype,"parsedUrl",null),(0,s._)([(0,p.MZ)({readOnly:!0})],t.prototype,"store",void 0),(0,s._)([(0,p.MZ)({type:String,readOnly:!0,json:{read:{source:"store.rootNode"}}})],t.prototype,"rootNode",void 0),t=(0,s._)([(0,u.$)("esri.layers.mixins.SceneService")],t),t},U=-1e38;function P(e){if(null!=e.spatialReference)return m.A.fromJSON(e.spatialReference);const t=e.store,r=t.indexCRS||t.geographicCRS,s=r&&parseInt(r.substring(r.lastIndexOf("/")+1,r.length),10);return null!=s?new m.A(s):null}function O(e,t,r){e.typeKeywords||(e.typeKeywords=[]);const s=t.getTypeKeywords();for(const t of s)e.typeKeywords.push(t);e.typeKeywords&&(e.typeKeywords=e.typeKeywords.filter(((e,t,r)=>r.indexOf(e)===t)),r===M.newItem&&(e.typeKeywords=e.typeKeywords.filter((e=>"Hosted Service"!==e))))}var M,N;(N=M||(M={}))[N.existingItem=0]="existingItem",N[N.newItem=1]="newItem";const j="Scene Service",E={getTypeKeywords:()=>[],portalItemLayerType:"unknown",validationOptions:{enabled:!0,ignoreUnsupported:!1,failPolicy:"throw"}};var K;!function(e){e[e.SAVE=0]="SAVE",e[e.SAVE_AS=1]="SAVE_AS"}(K||(K={}))},83898:(e,t,r)=>{r.d(t,{F:()=>n});var s=r(78888),o=r(49186);async function n(e,t,r,n,a,i,l){let p=null;if(null!=r){const t=`${e}/nodepages/`,o=t+Math.floor(r.rootIndex/r.nodesPerPage);try{return{type:"page",rootPage:(await(0,s.A)(o,{query:{f:"json",...n,token:a},responseType:"json",signal:l})).data,rootIndex:r.rootIndex,pageSize:r.nodesPerPage,lodMetric:r.lodSelectionMetricType,urlPrefix:t}}catch(e){null!=i&&i.warn("#fetchIndexInfo()","Failed to load root node page. Falling back to node documents.",o,e),p=e}}if(!t)return null;const c=t?.split("/").pop(),u=`${e}/nodes/`,d=u+c;try{return{type:"node",rootNode:(await(0,s.A)(d,{query:{f:"json",...n,token:a},responseType:"json",signal:l})).data,urlPrefix:u}}catch(e){throw new o.A("sceneservice:root-node-missing","Root node missing.",{pageError:p,nodeError:e,url:d})}}},88788:(e,t,r)=>{r.d(t,{m:()=>a,v:()=>n});var s=r(84952),o=r(20655);function n(e,t){return{...i(e,t),readResourcePaths:[]}}function a(e,t,r){const o=(0,s.An)(e.itemUrl);return{...i(e,t),messages:[],writtenProperties:[],blockedRelativeUrls:[],verifyItemRelativeUrls:o?{rootPath:o.path,writtenUrls:[]}:null,resources:r?{toAdd:[],toUpdate:[],toKeep:[],pendingOperations:[]}:null}}function i(e,t){return{origin:t,url:(0,s.An)(e.itemUrl),portal:e.portal||o.A.getDefault(),portalItem:e}}},15804:(e,t,r)=>{r.d(t,{addOrUpdateResources:()=>i,bg:()=>d,cL:()=>u,fetchResources:()=>a,removeAllResources:()=>p,removeResource:()=>l});var s=r(78888),o=r(49186),n=r(84952);async function a(e,t={},r){await e.load(r);const s=(0,n.fj)(e.itemUrl,"resources"),{start:o=1,num:a=10,sortOrder:i="asc",sortField:l="resource"}=t,p={query:{start:o,num:a,sortOrder:i,sortField:l,token:e.apiKey},signal:r?.signal},c=await e.portal.request(s,p);return{total:c.total,nextStart:c.nextStart,resources:c.resources.map((({created:t,size:r,resource:s})=>({created:new Date(t),size:r,resource:e.resourceFromPath(s)})))}}async function i(e,t,r,s){const a=new Map;for(const{resource:e,content:s,compress:n,access:i}of t){if(!e.hasPath())throw new o.A(`portal-item-resource-${r}:invalid-path`,"Resource does not have a valid path");const[t,l]=c(e.path),p=`${t}/${n??""}/${i??""}`;a.has(p)||a.set(p,{prefix:t,compress:n,access:i,files:[]}),a.get(p).files.push({fileName:l,content:s})}await e.load(s);const i=(0,n.fj)(e.userItemUrl,"add"===r?"addResources":"updateResources");for(const{prefix:t,compress:r,access:o,files:n}of a.values()){const a=25;for(let l=0;l<n.length;l+=a){const p=n.slice(l,l+a),c=new FormData;t&&"."!==t&&c.append("resourcesPrefix",t),r&&c.append("compress","true"),o&&c.append("access",o);let u=0;for(const{fileName:e,content:t}of p)c.append("file"+ ++u,t,e);c.append("f","json"),await e.portal.request(i,{method:"post",body:c,signal:s?.signal})}}}async function l(e,t,r){if(!t.hasPath())throw new o.A("portal-item-resources-remove:invalid-path","Resource does not have a valid path");await e.load(r);const s=(0,n.fj)(e.userItemUrl,"removeResources");await e.portal.request(s,{method:"post",query:{resource:t.path},signal:r?.signal}),t.portalItem=null}async function p(e,t){await e.load(t);const r=(0,n.fj)(e.userItemUrl,"removeResources");return e.portal.request(r,{method:"post",query:{deleteAll:!0},signal:t?.signal})}function c(e){const t=e.lastIndexOf("/");return-1===t?[".",e]:[e.slice(0,t),e.slice(t+1)]}async function u(e){return"blob"===e.type?e.blob:"json"===e.type?new Blob([e.jsonString],{type:"application/json"}):(await(0,s.A)(e.url,{responseType:"blob"})).data}function d(e,t){if(!e.hasPath())return null;const[r,,s]=function(e){const[t,r]=function(e){const t=(0,n.Zo)(e);return null==t?[e,""]:[e.slice(0,e.length-t.length-1),`.${t}`]}(e),[s,o]=c(t);return[s,o,r]}(e.path);return e.portalItem.resourceFromPath((0,n.fj)(r,t+s))}},91682:(e,t,r)=>{r.d(t,{S:()=>l,r:()=>i});var s=r(49186),o=r(74887),n=r(13069),a=r(15804);async function i(e,t,r){const s=await p(e,t,r);await c(s,t,r)}async function l(e,t,r,s,o){const n=await p(r,s,o);await e.update({data:t}),await c(n,s,o)}async function p(e,t,i){if(!t?.resources)return;const l=t.portalItem===e.portalItem?new Set(e.paths):new Set;e.paths.length=0,e.portalItem=t.portalItem;const p=new Set(t.resources.toKeep.map((e=>e.resource.path))),c=new Set,u=[];p.forEach((t=>{l.delete(t),e.paths.push(t)}));const d=[],h=[],y=[];for(const r of t.resources.toUpdate)if(l.delete(r.resource.path),p.has(r.resource.path)||c.has(r.resource.path)){const{resource:t,content:s,finish:o}=r,i=(0,a.bg)(t,(0,n.lk)());e.paths.push(i.path),d.push({resource:i,content:await(0,a.cL)(s),compress:r.compress}),o&&y.push((()=>o(i)))}else{e.paths.push(r.resource.path),h.push({resource:r.resource,content:await(0,a.cL)(r.content),compress:r.compress});const t=r.finish;t&&y.push((()=>t(r.resource))),c.add(r.resource.path)}for(const r of t.resources.toAdd)if(e.paths.push(r.resource.path),l.has(r.resource.path))l.delete(r.resource.path);else{d.push({resource:r.resource,content:await(0,a.cL)(r.content),compress:r.compress});const e=r.finish;e&&y.push((()=>e(r.resource)))}if(d.length||h.length){const{addOrUpdateResources:e}=await Promise.resolve().then(r.bind(r,15804));await e(t.portalItem,d,"add",i),await e(t.portalItem,h,"update",i)}if(y.forEach((e=>e())),0===u.length)return l;const f=await(0,o.Ol)(u);if((0,o.Te)(i),f.length>0)throw new s.A("save:resources","Failed to save one or more resources",{errors:f});return l}async function c(e,t,r){if(!e||!t.portalItem)return;const s=[];for(const o of e){const e=t.portalItem.resourceFromPath(o);s.push(e.portalItem.removeResource(e,r))}await(0,o.Lx)(s)}},49864:(e,t,r)=>{r.d(t,{X:()=>a});var s=r(92602),o=r(49186),n=r(926);function a(e){if(s.A.apiKey&&(0,n.Q)(e.portal.url))throw new o.A("save-api-key-utils:api-key-not-supported",`Saving is not supported on ${e.portal.url} when using an api key`)}},26121:(e,t,r)=>{r.d(t,{c:()=>a,d:()=>o});var s=r(49186);async function o(e){const t=[];for(const r of e.allLayers)if("beforeSave"in r&&"function"==typeof r.beforeSave){const e=r.beforeSave();e&&t.push(e)}await Promise.allSettled(t)}const n=new Set(["layer:unsupported","property:unsupported","symbol:unsupported","symbol-layer:unsupported","url:unsupported"]);function a(e,t,r){let o=(e.messages??[]).filter((({type:e})=>"error"===e)).map((({name:e,message:t,details:r})=>new s.A(e,t,r)));if(e.blockedRelativeUrls&&(o=o.concat(e.blockedRelativeUrls.map((e=>new s.A("url:unsupported",`Relative url '${e}' is not supported`))))),r){const{ignoreUnsupported:e,supplementalUnsupportedErrors:t=[],requiredPropertyChecksDisabled:s}=r;e&&(o=o.filter((({name:e})=>!(n.has(e)||t.includes(e))))),s&&(o=o.filter((e=>"web-document-write:property-required"!==e.name)))}if(o.length>0)throw new s.A(t.errorName,"Failed to save due to unsupported or invalid content. See 'details.errors' for more detailed information",{errors:o})}}}]);