UNPKG

weatherlayers-gl

Version:

WeatherLayers GL - Weather Visualization Layers for deck.gl

14 lines (13 loc) 153 kB
/*! * Copyright (c) 2021-2026 WeatherLayers.com * * WeatherLayers GL 2026.5.1 * * Package and source code is dual-licensed, the choice of license is MPL-2.0 or our License Terms of Use. Contact support@weatherlayers.com for details. * * Homepage - https://weatherlayers.com/ * Demo - https://demo.weatherlayers.com/ * Docs - https://docs.weatherlayers.com/ * WeatherLayers GL License Terms of Use - https://weatherlayers.com/license-terms-of-use.html */ import{colorRampCanvas as e,parsePalette as t}from"cpt2js";export{colorRampCanvas,parsePalette}from"cpt2js";import{COORDINATE_SYSTEM as n,CompositeLayer as a}from"@deck.gl/core";import{BitmapLayer as i,TextLayer as r,PathLayer as o,IconLayer as A,LineLayer as s}from"@deck.gl/layers";import{CollisionFilterExtension as l,PathStyleExtension as c}from"@deck.gl/extensions";import{distance as g,destinationPoint as u,initialBearing as p}from"geodesy-fn";import{wrap as d,transfer as m}from"comlink";import{transform as h,factory as C}from"rollup-plugin-worker-factory/src/browser.js";import{SphericalMercator as I}from"@mapbox/sphericalmercator";import v from"icomesh";import f from"kdbush";import*as E from"geokdbush";import{BufferTransform as B}from"@luma.gl/engine";const Q="2026.5.1",y="2026-05-11T19:53:53.179Z",b=new Map;function w(e,t){b.set(e,t)}const x={INWARD:"INWARD",OUTWARD:"OUTWARD"},T={VALUE:"VALUE",CARDINAL:"CARDINAL",CARDINAL2:"CARDINAL2",CARDINAL3:"CARDINAL3"},M={[T.CARDINAL]:["N","E","S","W"],[T.CARDINAL2]:["N","NE","E","SE","S","SW","W","NW"],[T.CARDINAL3]:["N","NNE","NE","ENE","E","ESE","SE","SSE","S","SSW","SW","WSW","W","WNW","NW","NNW"]};function O(e,t){if(!t)return`${Math.round(e)}`;const{scale:n=1,offset:a=0,decimals:i=0}=t,r=n*e+a;return`${i?Math.round(r*10**i)/10**i:Math.round(r)}`}function S(e){return e.unit.replace("^2","²").replace("^3","³")}function P(e,t){return`${O(e,t)} ${S(t)}`}function V(e,t,n){if(t===x.OUTWARD&&(e+=180),n===T.VALUE)return`${Math.round(e%360)}°`;if(n===T.CARDINAL||n===T.CARDINAL2||n===T.CARDINAL3){const t=M[n],a=360/t.length;return t[Math.floor((e%360+a/2)/a)%t.length]}throw new Error("Invalid state")}const N=1,U=[255,255,255],D='"Helvetica Neue", Arial, Helvetica, sans-serif',J=12,L=[255,255,255],F=1,Z=[13,13,13],W=O,k=40,q=[255,255,255];function R(e,t){const n={};for(const a in e)if(void 0===e[a]&&a in t){const e=t[a];e&&("value"in e?e.value&&(n[a]=e.value):n[a]=e)}return Object.freeze({...e,...n})}class G{constructor(e){this._running=!1,this._raf=void 0,this._lastFrameTime=0,this._config=e}getConfig(){return{...this._config}}setConfig(e){this._config=e}updateConfig(e){this.setConfig({...this._config,...e})}get running(){return this._running}toggle(e=!this._running){e?this.start():this.stop()}start(){this._running||(this._running=!0,this._raf=window.requestAnimationFrame((()=>this.step())))}stop(){this._running&&(this._running=!1,this._raf&&(window.cancelAnimationFrame(this._raf),this._raf=void 0))}step(){const e=1e3/(this._config.fps??30),t=Date.now(),n=t-this._lastFrameTime;n>e&&(this._lastFrameTime=t-n%e,this._config.onUpdate()),this._running&&(this._raf=window.requestAnimationFrame((()=>this.step())))}}const K=new Map;const z=new class{constructor(){this.queue=Promise.resolve()}async run(e){const t=this.queue;let n;this.queue=new Promise((e=>{n=e}));try{return await t,await e()}finally{n()}}};async function j(e,t){const n=await async function(e){if(b.has(e))return b.get(e);try{if("geotiff"===e)return await import("geotiff")}catch(t){throw new Error(`Optional dependency '${e}' is missing, install it with a package manager or provide with \`setLibrary('${e}', library)\``,{cause:t})}}("geotiff");let a;try{a=await n.fromUrl(e,{allowFullFile:!0,blockSize:Number.MAX_SAFE_INTEGER,fetch:(e,n)=>fetch(e,{...n,headers:{...n?.headers,...t?.headers}})},t?.signal)}catch(t){throw new Error(`Image ${e} can't be decoded.`,{cause:t})}const i=await a.getImage(0),r=await i.readRasters({interleave:!0,signal:t?.signal});if(!(r instanceof Uint8Array||r instanceof Uint8ClampedArray||r instanceof Float32Array))throw new Error("Unsupported data format");const o=function(e,t){if(null==t)return e;const n=e.slice(0);for(let e=0;e<n.length;e++)Math.abs(n[e]-t)<2*Number.EPSILON&&(n[e]=NaN);return n}(r,i.getGDALNoData());return{data:o,width:i.getWidth(),height:i.getHeight()}}function X(e){return async(t,n)=>{if(!1===n?.cache)return e(t);const a=n?.cache??K,i=t+(n?.headers?":"+JSON.stringify(n?.headers):""),r=a.get(i);if(r)return r;const o={...n,cache:void 0},A=e(t,o);return a.set(i,A),A.then((e=>{a.set(i,e)})),A}}const H=X((async(e,t)=>{if(e.includes(".png")||e.includes(".webp")||e.includes("image/png")||e.includes("image/webp"))return async function(e,t){let n;if(t?.headers||t?.signal){const a=await fetch(e,{headers:t.headers,signal:t.signal});if(!a.ok)throw new Error(`URL ${e} can't be loaded. Status: ${a.status}`);const i=await a.blob();n=URL.createObjectURL(i)}const a=new Image;try{await new Promise(((t,i)=>{a.addEventListener("load",t),a.addEventListener("error",i),a.crossOrigin="anonymous",a.src=n??e}))}catch(t){throw new Error(`URL ${e} can't be loaded.`,{cause:t})}finally{n&&URL.revokeObjectURL(n)}try{await z.run((()=>a.decode()))}catch(t){throw new Error(`Image ${e} can't be decoded.`,{cause:t})}const i=document.createElement("canvas");i.width=a.width,i.height=a.height;const r=i.getContext("2d");r.drawImage(a,0,0);const o=r.getImageData(0,0,i.width,i.height),{data:A,width:s,height:l}=o;return{data:A,width:s,height:l}}(e,t);if(e.includes(".tif")||e.includes("image/tif"))return j(e,t);throw new Error("Unsupported data format")})),Y=X((async(e,t)=>{const n=await fetch(e,{headers:t?.headers});if(!n.ok)throw new Error(`URL ${e} can't be loaded. Status: ${n.status}`);return n.json()}));function _(e,t,n){if(!t){if(0===n)return e;throw new Error("Invalid state")}if(n<=0)return e;if(n>=1)return t;{const a=new Date(e),i=new Date(t);return new Date(a.getTime()+(i.getTime()-a.getTime())*n).toISOString()}}function $(e,t,n){if(!t){if(e===n)return 0;throw new Error("Invalid state")}if(n<=e)return 0;if(n>=t)return 1;{const a=new Date(e),i=new Date(t);return(new Date(n).getTime()-a.getTime())/(i.getTime()-a.getTime())}}function ee(e,t){return[...e].reverse().find((e=>e<=t))}function te(e,t){return e.find((e=>e>=t))}function ne(e,t){const n=new Date(e);return new Date(n.getTime()+1e3*t*60*60).toISOString()}function ae(e,t,n){return[ne(e,t),ne(e,n)]}function ie(e){if(!e)return e;const t=new Date(e);if(!t.getDate())return e;return`${t.getUTCFullYear()}/${`${t.getUTCMonth()+1}`.padStart(2,"0")}/${`${t.getUTCDate()}`.padStart(2,"0")} ${`${t.getUTCHours()}`.padStart(2,"0")}:${`${t.getUTCMinutes()}`.padStart(2,"0")} UTC`}const re={NEAREST:"NEAREST",LINEAR:"LINEAR",CUBIC:"CUBIC"},oe={SCALAR:"SCALAR",VECTOR:"VECTOR"},Ae={METRIC:"METRIC",METRIC_KILOMETERS:"METRIC_KILOMETERS",IMPERIAL:"IMPERIAL",NAUTICAL:"NAUTICAL"},se={BOTTOM:"BOTTOM",TOP:"TOP",RIGHT:"RIGHT",LEFT:"LEFT"};function le(e){return e%1}function ce(e,t){return e.map(((n,a)=>e[a]+t[a]))}function ge(e,t){return e.map(((n,a)=>e[a]*t))}function ue(e,t){return e.map(((n,a)=>e[a]*t[a])).reduce(((e,t)=>e+t))}function pe(e,t,n){return e===t?e:e*(1-n)+t*n}function de(e,t,n){return e.map(((a,i)=>pe(e[i],t[i],n)))}function me(e,t){return t?e[3]>=255:!isNaN(e[0])}function he(e,t,n){return t===oe.VECTOR?n?[pe(n[0],n[1],e[0]/255),pe(n[0],n[1],e[1]/255)]:[e[0],e[1]]:[NaN,NaN]}function Ce(e,t,n){if(t===oe.VECTOR){const a=he(e,t,n);return Math.hypot(a[0],a[1])}return function(e,t,n){return t===oe.VECTOR?0:n?pe(n[0],n[1],e[0]/255):e[0]}(e,t,n)}function Ie(e,t,n,a,i,r){const{data:o,width:A,height:s}=e,l=o.length/(A*s),c=(n+i+.5)/t[0],g=(a+r+.5)/t[1],u=Math.max(0,Math.min(A-1,Math.floor(c*A))),p=Math.max(0,Math.min(s-1,Math.floor(g*s)));return new Array(l).fill(void 0).map(((e,t)=>o[(u+p*A)*l+t]))}const ve=[3,-6,0,4].map((e=>e/6)),fe=[-1,6,-12,8].map((e=>e/6));function Ee(e){return[e*e*e,e*e,e,1]}function Be(e,t,n,a,i){const r=ce(ce(ce(ge(e,ue(fe,Ee(i+1))),ge(t,ue(ve,Ee(i)))),ge(n,ue(ve,Ee(1-i)))),ge(a,ue(fe,Ee(2-i))));return r[3]=e[3]>0&&t[3]>0&&n[3]>0&&a[3]>0?Math.max(Math.max(Math.max(e[3],t[3]),n[3]),a[3]):0,r}function Qe(e,t,n,a,i){return n===re.CUBIC?function(e,t,n,a){const i=n*t[0]-.5,r=a*t[1]-.5,o=Math.floor(i),A=Math.floor(r),s=le(i),l=le(r);return Be(Be(Ie(e,t,o,A,-1,-1),Ie(e,t,o,A,0,-1),Ie(e,t,o,A,1,-1),Ie(e,t,o,A,2,-1),s),Be(Ie(e,t,o,A,-1,0),Ie(e,t,o,A,0,0),Ie(e,t,o,A,1,0),Ie(e,t,o,A,2,0),s),Be(Ie(e,t,o,A,-1,1),Ie(e,t,o,A,0,1),Ie(e,t,o,A,1,1),Ie(e,t,o,A,2,1),s),Be(Ie(e,t,o,A,-1,2),Ie(e,t,o,A,0,2),Ie(e,t,o,A,1,2),Ie(e,t,o,A,2,2),s),l)}(e,t,a,i):n===re.LINEAR?function(e,t,n,a){const i=n*t[0]-.5,r=a*t[1]-.5,o=Math.floor(i),A=Math.floor(r),s=le(i),l=le(r);return de(de(Ie(e,t,o,A,0,0),Ie(e,t,o,A,1,0),s),de(Ie(e,t,o,A,0,1),Ie(e,t,o,A,1,1),s),l)}(e,t,a,i):function(e,t,n,a){const i=n*t[0]-.5,r=a*t[1]-.5;return Ie(e,t,Math.round(i),Math.round(r),0,0)}(e,t,a,i)}function ye(e,t,n,a,i,r,o,A){const s=r?o+.5/n[0]:pe(0+.5/n[0],1-.5/n[0],o),l=pe(0+.5/n[1],1-.5/n[1],A);if(t&&i>0){return de(Qe(e,n,a,s,l),Qe(t,n,a,s,l),i)}return Qe(e,n,a,s,l)}function be(e,t,n){const a=1+Math.max(0,n);return[e/a,t/a]}const we=-180,xe=180,Te=-85.051129,Me=85.051129;function Oe(e,t){let n=((e+180)%(a=360)+a)%a-180;var a;return"number"==typeof t&&n<t&&(n+=360),n}function Se(e){return e[2]-e[0]==360}function Pe(e,t){return{type:"Feature",geometry:{type:"Point",coordinates:e},properties:t}}function Ve(e,t,n){const{image:a,image2:i,imageSmoothing:r,imageInterpolation:o,imageWeight:A,imageType:s,imageUnscale:l,imageMinValue:c,imageMaxValue:g}=e,{width:u,height:p}=a,d=function(e,t,n){const a=[n[0],n[3]],i=(n[2]-n[0])/e,r=(n[3]-n[1])/t;return e=>{const[t,n]=e;return[(t-a[0])/i,(a[1]-n)/r]}}(u,p,t),m=be(u,p,r),h=Se(t),C=n.map((e=>{if(!function(e,t){return e[0]>=t[0]&&e[0]<=t[2]&&e[1]>=t[1]&&e[1]<=t[3]}(e,t))return Pe(e,{value:NaN});const n=d(e),r=n[0]/u,C=n[1]/p,I=ye(a,i,m,o,A,h,r,C);if(!me(I,l))return Pe(e,{value:NaN});const v=Ce(I,s,l);if("number"==typeof c&&!isNaN(c)&&v<c||"number"==typeof g&&!isNaN(g)&&v>g)return Pe(e,{value:NaN});if(s===oe.VECTOR){const t=function(e,t,n){if(t===oe.VECTOR){const a=he(e,t,n);return(360-(Math.atan2(a[1],a[0])/Math.PI*180+180)-270)%360}return NaN}(I,s,l);return Pe(e,{value:v,direction:t})}return Pe(e,{value:v})}));return{type:"FeatureCollection",features:C}}function Ne(e,t){const{image:n,image2:a,imageSmoothing:i,imageInterpolation:r,imageWeight:o,imageType:A,imageUnscale:s,imageMinValue:l,imageMaxValue:c}=e,{width:g,height:u}=n,p=r!==re.NEAREST?re.NEAREST:r,d=be(g,u,i),m=Se(t),h=new Float32Array(g*u);for(let e=0;e<u;e++)for(let t=0;t<g;t++){const i=t+e*g,r=ye(n,a,d,p,o,m,t/g,e/u);if(!me(r,s)){h[i]=NaN;continue}const C=Ce(r,A,s);"number"==typeof l&&!isNaN(l)&&C<l||"number"==typeof c&&!isNaN(c)&&C>c?h[i]=NaN:h[i]=C}return{data:h,width:g,height:u}}const Ue=new WeakMap,De=new WeakMap;function Je(e,t){const{data:n,width:a,height:i}=t,r=n.length/(a*i);if(n instanceof Uint8Array||n instanceof Uint8ClampedArray){if(4===r)return"rgba8unorm";if(2===r)return"rg8unorm";if(1===r)return"r8unorm";throw new Error("Unsupported data format")}if(n instanceof Float32Array){if(!e.features.has("float32-renderable-webgl"))throw new Error("Float textures are required");if(2===r)return"rg32float";if(1===r)return"r32float";throw new Error("Unsupported data format")}throw new Error("Unsupported data format")}function Le(e,t,n=!1){const a=n?Ue:De,i=a.get(e)??(()=>{const t=new WeakMap;return a.set(e,t),t})();return i.get(t)??(()=>{const a=e.createTexture({format:Je(e,t),width:t.width,height:t.height,mipLevels:1,sampler:{magFilter:"nearest",minFilter:"nearest",addressModeU:n?"repeat":"clamp-to-edge",addressModeV:"clamp-to-edge",lodMaxClamp:0}});return a.copyImageData({data:t.data}),i.set(t,a),a})()}let Fe=null;function Ze(e){return Fe||(Fe=e.createTexture({width:1,height:1,mipLevels:1}),Fe.copyImageData({data:new Uint8Array([0,0,0,0])})),Fe}const We=6370972;function ke(e,t){return g(e,t,We)}function qe(e,t,n){return u(e,t,n,We)}function Re(e){return!!e.resolution}function Ge(e){return!Re(e)}function Ke(e,t,n){return!(null!=t&&e.zoom<t)&&!(null!=n&&e.zoom>n)}function ze(e){return[e.longitude,e.latitude]}function je(e){const t=ze(e);return Math.max(ke(t,e.unproject([e.width/2,0])),ke(t,e.unproject([0,e.height/2])),...e.width>e.height?[ke(t,e.unproject([e.width/2-e.height/4*1,e.height/2])),ke(t,e.unproject([e.width/2-e.height/2*1,e.height/2])),ke(t,e.unproject([e.width/2-e.height/4*3,e.height/2])),ke(t,e.unproject([e.width/2-e.height,e.height/2]))]:[ke(t,e.unproject([e.width/2,e.height/2-e.width/4*1])),ke(t,e.unproject([e.width/2,e.height/2-e.width/2*1])),ke(t,e.unproject([e.width/2,e.height/2-e.width/4*3])),ke(t,e.unproject([e.width/2,e.height/2-e.width]))])}function Xe(e){return function(e){const t=e[2]-e[0]<360?Oe(e[0]):we,n=e[2]-e[0]<360?Oe(e[2],t):xe;return[t,Math.max(e[1],Te),n,Math.min(e[3],Me)]}(e.getBounds())}function He(e){return Re(e)?Math.log2(e.scale):e.zoom}function Ye(e,t){return t*(Re(e)?-1:1)}function _e(e,t){return t+(Re(e)?180:0)}function $e(t,n){const a=n.domain(),i=[a[0],a[a.length-1]],r=e(n),o=t.createTexture({width:r.width,height:r.height,mipLevels:1,sampler:{magFilter:"linear",minFilter:"linear",addressModeU:"clamp-to-edge",addressModeV:"clamp-to-edge"}});return o.copyExternalImage({image:r}),{paletteBounds:i,paletteTexture:o}}function et(e){return[e[0]/255,e[1]/255,e[2]/255,(e[3]??255)/255]}function tt(e){return[e[0],e[1],e[2],255*e[3]]}const nt="layout(std140)uniform bitmap2Uniforms{\nvec4 A;\nbool B;\nfloat C;\nvec4 D;\n}\nbitmap2;\nconst float E=512.;\nconst float F=3.1415926536;\nconst float G=E/F/2.;\nvec2 H(vec2 I){\nfloat J=I.x;\nfloat K=clamp(I.y,-89.9,89.9);\nreturn vec2(radians(J)+F,F+log(tan(F*0.25+radians(K)*0.5)))*G;\n}\nvec2 L(vec2 M){\nM/=G;\nreturn degrees(vec2(M.x-F,atan(exp(M.y-F))*2.-F*0.5));\n}\nvec4 N(vec3 O,float P){\nreturn mix(bitmap2.D,vec4(O,1.),P);\n}\nvec2 Q(vec2 R){\nreturn vec2((R.x-bitmap2.A[0])/(bitmap2.A[2]-bitmap2.A[0]),(R.y-bitmap2.A[3])/(bitmap2.A[1]-bitmap2.A[3]));\n}\nvec2 S(vec2 T,vec2 U){\nvec2 uv=T;\nif(bitmap2.C<-0.5){\nvec2 I=L(U);\nuv=Q(I);\n}\nelse if(bitmap2.C>0.5){\nvec2 V=H(U);\nuv=Q(V);\n}\nreturn uv;\n}\n",at="A",it="B",rt="C",ot="D";const At=Math.PI,st=At/4,lt=At/180,ct=512;function gt(e){const[t,n]=e,a=n*lt;return[ct*(t*lt+At)/(2*At),ct*(At+Math.log(Math.tan(st+.5*a)))/(2*At)]}function ut(e={}){const{LNGLAT:t,CARTESIAN:a,DEFAULT:i}=n;let{viewportGlobe:r,bounds:o,_imageCoordinateSystem:A}=e;if(!function(e){return Number.isFinite(e[0])}(o))throw new Error("_imageCoordinateSystem only supports rectangular bounds");if(A!==i){const e=r?t:a;if(A=A===t?t:a,A===t&&e===a)return{coordinateConversion:-1,bounds:o};if(A===a&&e===t){const e=gt([o[0],o[1]]),t=gt([o[2],o[3]]);return{coordinateConversion:1,bounds:[e[0],e[1],t[0],t[1]]}}}return{coordinateConversion:0,bounds:o}}const pt={name:"bitmap2",vs:nt,fs:nt,uniformTypes:{[at]:"vec4<f32>",[it]:"f32",[rt]:"f32",[ot]:"vec4<f32>"},getUniforms:function(e={}){const{bounds:t,coordinateConversion:n}=ut(e);return{[at]:t,[it]:Se(t)?1:0,[rt]:n,[ot]:e.transparentColor?et(e.transparentColor):[0,0,0,0]}}},dt=rt,mt="uniform sampler2D W;\nuniform sampler2D X;\nlayout(std140)uniform rasterUniforms{\nvec2 Y;\nfloat Z;\nfloat a;\nfloat b;\nfloat c;\nvec2 d;\nfloat e;\nfloat f;\nfloat g;\nfloat h;\nvec4 i;\nfloat j;\nfloat k;\nvec4 l;\n}\nraster;\n",ht="W",Ct="X",It="Y",vt="Z",ft="a",Et="b",Bt="c",Qt="d",yt="e",bt="f",wt="g",xt="h",Tt="i",Mt="j",Ot="k",St="l";const Pt={name:"raster",vs:mt,fs:mt,uniformTypes:{[It]:"vec2<f32>",[vt]:"f32",[ft]:"f32",[Et]:"f32",[Bt]:"f32",[Qt]:"vec2<f32>",[yt]:"f32",[bt]:"f32",[wt]:"f32",[xt]:"f32",[Tt]:"vec4<f32>",[Mt]:"f32",[Ot]:"f32",[St]:"vec4<f32>"},getUniforms:function(e={}){return{[ht]:e.imageTexture,[Ct]:e.imageTexture2,[It]:e.imageTexture?[e.imageTexture.width,e.imageTexture.height]:[0,0],[vt]:e.imageSmoothing??0,[ft]:Object.values(re).indexOf(e.imageInterpolation??re.NEAREST),[Et]:e.imageTexture2!==e.imageTexture&&e.imageWeight?e.imageWeight:0,[Bt]:Object.values(oe).indexOf(e.imageType??oe.SCALAR),[Qt]:e.imageUnscale??[0,0],[yt]:e.imageMinValue??Number.MIN_SAFE_INTEGER,[bt]:e.imageMaxValue??Number.MAX_SAFE_INTEGER,[wt]:e.borderEnabled?1:0,[xt]:e.borderWidth??0,[Tt]:e.borderColor?et(e.borderColor):[0,0,0,0],[Mt]:e.gridEnabled?1:0,[Ot]:e.gridSize??0,[St]:e.gridColor?et(e.gridColor):[0,0,0,0]}}},Vt="uniform sampler2D m;\nlayout(std140)uniform paletteUniforms{\nvec2 n;\nvec4 o;\n}\npalette;\nfloat p(float min,float max,float q){\nreturn(q-min)/(max-min);\n}\nvec4 r(sampler2D m,vec2 n,vec4 o,float q){\nif(n[0]<n[1]){\nfloat s=p(n[0],n[1],q);\nreturn texture(m,vec2(s,0.));\n}\nelse{\nreturn o;\n}\n}\n",Nt="m",Ut="n",Dt="o";const Jt={name:"palette",vs:Vt,fs:Vt,uniformTypes:{[Ut]:"vec2<f32>",[Dt]:"vec4<f32>"},getUniforms:function(e={}){return{[Nt]:e.paletteTexture,[Ut]:e.paletteBounds??[0,0],[Dt]:e.paletteColor?et(e.paletteColor):[0,0,0,0]}}},Lt={imageTexture:{type:"object",value:null},imageTexture2:{type:"object",value:null},imageSmoothing:{type:"number",value:0},imageInterpolation:{type:"object",value:re.CUBIC},imageWeight:{type:"number",value:0},imageType:{type:"object",value:oe.SCALAR},imageUnscale:{type:"array",value:null},imageMinValue:{type:"object",value:null},imageMaxValue:{type:"object",value:null},bounds:{type:"array",value:[-180,-90,180,90],compare:!0},minZoom:{type:"object",value:null},maxZoom:{type:"object",value:null},palette:{type:"object",value:null},borderEnabled:{type:"boolean",value:!1},borderWidth:{type:"number",value:1},borderColor:{type:"color",value:U},gridEnabled:{type:"boolean",value:!1},gridSize:{type:"number",value:1},gridColor:{type:"color",value:U}};class Ft extends i{getShaders(){const e=super.getShaders();return{...e,vs:e.vs.replaceAll("bitmap.coordinateConversion",`bitmap2.${dt}`),fs:"#version 300 es\n#define SHADER_NAME raster-bitmap-layer-fragment-shader\n#ifdef GL_ES\nprecision highp float;\n#endif\nvec4 AG(sampler2D AH,vec2 AI,vec2 AJ,vec2 AK){\nvec2 uv=(AJ+AK+0.5)/AI;\nreturn texture(AH,uv);\n}\nconst vec4 AL=vec4(3.,-6.,0.,4.)/6.;\nconst vec4 AM=vec4(-1.,6.,-12.,8.)/6.;\nvec4 AN(float J){\nreturn vec4(J*J*J,J*J,J,1.);\n}\nvec4 AO(vec4 AP,vec4 AQ,vec4 AR,vec4 AS,float AT){\nvec4 O=AP*dot(AM,AN(AT+1.))+AQ*dot(AL,AN(AT))+AR*dot(AL,AN(1.-AT))+AS*dot(AM,AN(2.-AT));\nO.a=(AP.a>0.&&AQ.a>0.&&AR.a>0.&&AS.a>0.)?max(max(max(AP.a,AQ.a),AR.a),AS.a):0.;\nreturn O;\n}\nvec4 AU(sampler2D AH,vec2 AI,vec2 uv){\nvec2 AV=uv*AI-0.5;\nvec2 AJ=floor(AV);\nvec2 AW=fract(AV);\nreturn AO(AO(AG(AH,AI,AJ,vec2(-1,-1)),AG(AH,AI,AJ,vec2(0,-1)),AG(AH,AI,AJ,vec2(1,-1)),AG(AH,AI,AJ,vec2(2,-1)),AW.x),AO(AG(AH,AI,AJ,vec2(-1,0)),AG(AH,AI,AJ,vec2(0,0)),AG(AH,AI,AJ,vec2(1,0)),AG(AH,AI,AJ,vec2(2,0)),AW.x),AO(AG(AH,AI,AJ,vec2(-1,1)),AG(AH,AI,AJ,vec2(0,1)),AG(AH,AI,AJ,vec2(1,1)),AG(AH,AI,AJ,vec2(2,1)),AW.x),AO(AG(AH,AI,AJ,vec2(-1,2)),AG(AH,AI,AJ,vec2(0,2)),AG(AH,AI,AJ,vec2(1,2)),AG(AH,AI,AJ,vec2(2,2)),AW.x),AW.y);\n}\nvec4 AX(sampler2D AH,vec2 AI,vec2 uv){\nvec2 AV=uv*AI-0.5;\nvec2 AJ=floor(AV);\nvec2 AW=fract(AV);\nreturn mix(mix(AG(AH,AI,AJ,vec2(0,0)),AG(AH,AI,AJ,vec2(1,0)),AW.x),mix(AG(AH,AI,AJ,vec2(0,1)),AG(AH,AI,AJ,vec2(1,1)),AW.x),AW.y);\n}\nvec4 AY(sampler2D AH,vec2 AI,vec2 uv){\nvec2 AV=uv*AI-0.5;\nvec2 AJ=floor(AV+0.5);\nreturn AG(AH,AI,AJ,vec2(0,0));\n}\nvec4 AZ(sampler2D AH,vec2 AI,float a,vec2 uv){\nif(a==2.){\nreturn AU(AH,AI,uv);\n}\nif(a==1.){\nreturn AX(AH,AI,uv);\n}\nelse{\nreturn AY(AH,AI,uv);\n}\n}\nvec4 Aa(sampler2D AH,sampler2D Ab,vec2 AI,float a,float b,bool B,vec2 uv){\nvec2 Ac;\nAc.x=B?uv.x+0.5/AI.x:mix(0.+0.5/AI.x,1.-0.5/AI.x,uv.x);\nAc.y=mix(0.+0.5/AI.y,1.-0.5/AI.y,uv.y);\nif(b>0.){\nvec4 Ad=AZ(AH,AI,a,Ac);\nvec4 Ae=AZ(Ab,AI,a,Ac);\nreturn mix(Ad,Ae,b);\n}\nelse{\nreturn AZ(AH,AI,a,Ac);\n}\n}\nvec4 Af(sampler2D AH,sampler2D Ab,vec2 Y,float Z,float a,float b,bool B,vec2 uv){\nfloat Ag=1.+max(0.,Z);\nvec2 AI=Y/Ag;\nreturn Aa(AH,Ab,AI,a,b,B,uv);\n}\nconst float Ah=3.1415926536;\nfloat Ai(float K,float J){\nreturn J==0.?sign(K)*Ah/2.:atan(K,J);\n}\nbool Aj(float q){\nuint Ak=floatBitsToUint(q);\nreturn(Ak&0x7fffffffu)>0x7f800000u;\n}\nbool Al(vec4 Ad,vec2 d){\nif(d[0]<d[1]){\nreturn Ad.a>=1.;\n}\nelse{\nreturn!Aj(Ad.x);\n}\n}\nfloat Am(vec4 Ad,float c,vec2 d){\nif(c==1.){\nreturn 0.;\n}\nelse{\nif(d[0]<d[1]){\nreturn mix(d[0],d[1],Ad.x);\n}\nelse{\nreturn Ad.x;\n}\n}\n}\nvec2 An(vec4 Ad,float c,vec2 d){\nif(c==1.){\nif(d[0]<d[1]){\nreturn mix(vec2(d[0]),vec2(d[1]),Ad.xy);\n}\nelse{\nreturn Ad.xy;\n}\n}\nelse{\nreturn vec2(0.);\n}\n}\nfloat Ao(vec4 Ad,float c,vec2 d){\nif(c==1.){\nvec2 q=An(Ad,c,d);\nreturn length(q);\n}\nelse{\nreturn Am(Ad,c,d);\n}\n}\nfloat Ap(vec4 Ad,float c,vec2 d){\nif(c==1.){\nvec2 q=An(Ad,c,d);\nreturn mod((360.-(Ai(q.y,q.x)/Ah*180.+180.))-270.,360.)/360.;\n}\nelse{\nreturn 0.;\n}\n}\nin vec2 vTexCoord;\nin vec2 vTexPos;\nout vec4 fragColor;\nvoid main(void){\nvec2 uv=S(vTexCoord,vTexPos);\nvec4 Ad=Af(W,X,raster.Y,raster.Z,raster.a,raster.b,bitmap2.B,uv);\nif(!Al(Ad,raster.d)){\ndiscard;\n}\nfloat q=Ao(Ad,raster.c,raster.d);\nif((!Aj(raster.e)&&q<raster.e)||(!Aj(raster.f)&&q>raster.f)){\ndiscard;\n}\nvec4 Aq=r(m,palette.n,palette.o,q);\nfragColor=N(Aq.rgb,Aq.a*layer.opacity);\nif(bool(raster.g)){\nvec2 Ar=vec2(length(dFdx(uv)),length(dFdy(uv)));\nvec2 h=raster.h/2.*Ar;\nif((uv.x<h.x||uv.x>1.-h.x)||(uv.y<h.y||uv.y>1.-h.y)){\nfragColor=N(raster.i.rgb,raster.i.a*layer.opacity*2.);\n}\n}\nif(bool(raster.j)){\nfloat Ag=1.+max(0.,raster.Z);\nvec2 AI=raster.Y/Ag;\nvec2 Ac;\nAc.x=bitmap2.B?uv.x+0.5/AI.x:mix(0.+0.5/AI.x,1.-0.5/AI.x,uv.x);\nAc.y=mix(0.+0.5/AI.y,1.-0.5/AI.y,uv.y);\nvec2 AV=Ac*AI-0.5;\nvec2 AW=fract(AV);\nvec2 Ar=vec2(length(dFdx(uv)),length(dFdy(uv)));\nvec2 k=raster.k/2.*Ar*raster.Y;\nif((AW.x<k.x||AW.x>1.-k.x)&&(AW.y<k.y||AW.y>1.-k.y)){\nfragColor=N(raster.l.rgb,raster.l.a*layer.opacity*2.);\n}\n}\ngeometry.uv=uv;\nDECKGL_FILTER_COLOR(fragColor,geometry);\nif(bool(picking.isActive)&&!bool(picking.isAttribute)){\nfloat s=p(palette.n[0],palette.n[1],q);\nfloat As=Ap(Ad,raster.c,raster.d);\nfragColor=vec4(s,As,0,1);\n}\n}\n",modules:[...e.modules.filter((e=>"bitmap"!==e.name)),pt,Pt,Jt]}}updateState(e){const{palette:t}=e.props;super.updateState(e),t!==e.oldProps.palette&&this._updatePalette()}draw(e){const{device:t,viewport:n}=this.context,{model:a}=this.state,{imageTexture:i,imageTexture2:r,imageSmoothing:o,imageInterpolation:A,imageWeight:s,imageType:l,imageUnscale:c,imageMinValue:g,imageMaxValue:u,bounds:p,_imageCoordinateSystem:d,transparentColor:m,minZoom:h,maxZoom:C,borderEnabled:I,borderWidth:v,borderColor:f,gridEnabled:E,gridSize:B,gridColor:Q}=R(this.props,Lt),{paletteTexture:y,paletteBounds:b}=this.state;if(!i)return;const w=Re(n);a&&Ke(n,h,C)&&(a.shaderInputs.setProps({[pt.name]:{viewportGlobe:w,bounds:p,_imageCoordinateSystem:d,transparentColor:m},[Pt.name]:{imageTexture:i??Ze(t),imageTexture2:r??Ze(t),imageSmoothing:o,imageInterpolation:A,imageWeight:s,imageType:l,imageUnscale:c,imageMinValue:g,imageMaxValue:u,borderEnabled:I,borderWidth:v,borderColor:f,gridEnabled:E,gridSize:B,gridColor:Q},[Jt.name]:{paletteTexture:y??Ze(t),paletteBounds:b}}),this.props.image=i,super.draw(e),this.props.image=null)}_updatePalette(){const{device:e}=this.context,{palette:n}=R(this.props,Lt);if(!n)return void this.setState({paletteTexture:void 0,paletteBounds:void 0});const a=t(n),{paletteBounds:i,paletteTexture:r}=$e(e,a);this.setState({paletteTexture:r,paletteBounds:i})}_getRasterMagnitudeValue(e,t){return t[0]+e[0]/255*(t[1]-t[0])}_getRasterDirectionValue(e){const{imageType:t}=R(this.props,Lt);return t===oe.VECTOR?e[1]/255*360:NaN}getPickingInfo(e){const t=super.getPickingInfo(e),{imageType:n}=R(this.props,Lt),{paletteBounds:a}=this.state;if(!t.color)return t;let i;const r=this._getRasterMagnitudeValue(t.color,a??[0,0]);if(n===oe.VECTOR){i={value:r,direction:this._getRasterDirectionValue(t.color)}}else i={value:r};return t.raster=i,t}}Ft.layerName="RasterBitmapLayer",Ft.defaultProps=Lt;const Zt={...Ft.defaultProps,imageTexture:void 0,imageTexture2:void 0,image:{type:"object",value:null},image2:{type:"object",value:null},bounds:{type:"array",value:[-180,-90,180,90],compare:!0}};class Wt extends a{renderLayers(){const{device:e}=this.context,{props:t,imageTexture:a,imageTexture2:i}=this.state;return t&&a?[new Ft(this.props,this.getSubLayerProps({id:"bitmap",imageTexture:a,imageTexture2:i,_imageCoordinateSystem:n.LNGLAT,parameters:{cullMode:"back",depthCompare:"always",...this.props.parameters},image:Ze(e),image2:Ze(e)}))]:[]}updateState(e){const{image:t,image2:n,imageUnscale:a,bounds:i}=e.props;if(super.updateState(e),t&&a&&!(t.data instanceof Uint8Array||t.data instanceof Uint8ClampedArray))throw new Error("imageUnscale can be applied to Uint8 data only");if(t!==e.oldProps.image||n!==e.oldProps.image2){const{device:e}=this.context,{image:t,image2:n}=this.props,a=t?Le(e,t,Se(i)):null,r=n?Le(e,n,Se(i)):null;this.setState({imageTexture:a,imageTexture2:r})}this.setState({props:e.props})}}Wt.layerName="RasterLayer",Wt.defaultProps=Zt;const kt="layout(std140)uniform contourUniforms{\nfloat t;\nfloat u;\nfloat v;\n}\ncontour;\n",qt="t",Rt="u",Gt="v";const Kt={name:"contour",vs:kt,fs:kt,uniformTypes:{[qt]:"f32",[Rt]:"f32",[Gt]:"f32"},getUniforms:function(e={}){return{[qt]:e.interval,[Rt]:e.majorInterval,[Gt]:e.width}}},zt={imageTexture:{type:"object",value:null},imageTexture2:{type:"object",value:null},imageSmoothing:{type:"number",value:0},imageInterpolation:{type:"object",value:re.CUBIC},imageWeight:{type:"number",value:0},imageType:{type:"object",value:oe.SCALAR},imageUnscale:{type:"object",value:null},imageMinValue:{type:"object",value:null},imageMaxValue:{type:"object",value:null},bounds:{type:"array",value:[-180,-90,180,90],compare:!0},minZoom:{type:"object",value:null},maxZoom:{type:"object",value:10},palette:{type:"object",value:null},color:{type:"color",value:U},interval:{type:"number",value:0},majorInterval:{type:"number",value:0},width:{type:"number",value:1}};class jt extends i{getShaders(){const e=super.getShaders();return{...e,vs:e.vs.replaceAll("bitmap.coordinateConversion",`bitmap2.${dt}`),fs:"#version 300 es\n#define SHADER_NAME contour-bitmap-layer-fragment-shader\n#ifdef GL_ES\nprecision highp float;\n#endif\nvec4 AG(sampler2D AH,vec2 AI,vec2 AJ,vec2 AK){\nvec2 uv=(AJ+AK+0.5)/AI;\nreturn texture(AH,uv);\n}\nconst vec4 AL=vec4(3.,-6.,0.,4.)/6.;\nconst vec4 AM=vec4(-1.,6.,-12.,8.)/6.;\nvec4 AN(float J){\nreturn vec4(J*J*J,J*J,J,1.);\n}\nvec4 AO(vec4 AP,vec4 AQ,vec4 AR,vec4 AS,float AT){\nvec4 O=AP*dot(AM,AN(AT+1.))+AQ*dot(AL,AN(AT))+AR*dot(AL,AN(1.-AT))+AS*dot(AM,AN(2.-AT));\nO.a=(AP.a>0.&&AQ.a>0.&&AR.a>0.&&AS.a>0.)?max(max(max(AP.a,AQ.a),AR.a),AS.a):0.;\nreturn O;\n}\nvec4 AU(sampler2D AH,vec2 AI,vec2 uv){\nvec2 AV=uv*AI-0.5;\nvec2 AJ=floor(AV);\nvec2 AW=fract(AV);\nreturn AO(AO(AG(AH,AI,AJ,vec2(-1,-1)),AG(AH,AI,AJ,vec2(0,-1)),AG(AH,AI,AJ,vec2(1,-1)),AG(AH,AI,AJ,vec2(2,-1)),AW.x),AO(AG(AH,AI,AJ,vec2(-1,0)),AG(AH,AI,AJ,vec2(0,0)),AG(AH,AI,AJ,vec2(1,0)),AG(AH,AI,AJ,vec2(2,0)),AW.x),AO(AG(AH,AI,AJ,vec2(-1,1)),AG(AH,AI,AJ,vec2(0,1)),AG(AH,AI,AJ,vec2(1,1)),AG(AH,AI,AJ,vec2(2,1)),AW.x),AO(AG(AH,AI,AJ,vec2(-1,2)),AG(AH,AI,AJ,vec2(0,2)),AG(AH,AI,AJ,vec2(1,2)),AG(AH,AI,AJ,vec2(2,2)),AW.x),AW.y);\n}\nvec4 AX(sampler2D AH,vec2 AI,vec2 uv){\nvec2 AV=uv*AI-0.5;\nvec2 AJ=floor(AV);\nvec2 AW=fract(AV);\nreturn mix(mix(AG(AH,AI,AJ,vec2(0,0)),AG(AH,AI,AJ,vec2(1,0)),AW.x),mix(AG(AH,AI,AJ,vec2(0,1)),AG(AH,AI,AJ,vec2(1,1)),AW.x),AW.y);\n}\nvec4 AY(sampler2D AH,vec2 AI,vec2 uv){\nvec2 AV=uv*AI-0.5;\nvec2 AJ=floor(AV+0.5);\nreturn AG(AH,AI,AJ,vec2(0,0));\n}\nvec4 AZ(sampler2D AH,vec2 AI,float a,vec2 uv){\nif(a==2.){\nreturn AU(AH,AI,uv);\n}\nif(a==1.){\nreturn AX(AH,AI,uv);\n}\nelse{\nreturn AY(AH,AI,uv);\n}\n}\nvec4 Aa(sampler2D AH,sampler2D Ab,vec2 AI,float a,float b,bool B,vec2 uv){\nvec2 Ac;\nAc.x=B?uv.x+0.5/AI.x:mix(0.+0.5/AI.x,1.-0.5/AI.x,uv.x);\nAc.y=mix(0.+0.5/AI.y,1.-0.5/AI.y,uv.y);\nif(b>0.){\nvec4 Ad=AZ(AH,AI,a,Ac);\nvec4 Ae=AZ(Ab,AI,a,Ac);\nreturn mix(Ad,Ae,b);\n}\nelse{\nreturn AZ(AH,AI,a,Ac);\n}\n}\nvec4 Af(sampler2D AH,sampler2D Ab,vec2 Y,float Z,float a,float b,bool B,vec2 uv){\nfloat Ag=1.+max(0.,Z);\nvec2 AI=Y/Ag;\nreturn Aa(AH,Ab,AI,a,b,B,uv);\n}\nconst float Ah=3.1415926536;\nfloat Ai(float K,float J){\nreturn J==0.?sign(K)*Ah/2.:atan(K,J);\n}\nbool Aj(float q){\nuint Ak=floatBitsToUint(q);\nreturn(Ak&0x7fffffffu)>0x7f800000u;\n}\nbool Al(vec4 Ad,vec2 d){\nif(d[0]<d[1]){\nreturn Ad.a>=1.;\n}\nelse{\nreturn!Aj(Ad.x);\n}\n}\nfloat Am(vec4 Ad,float c,vec2 d){\nif(c==1.){\nreturn 0.;\n}\nelse{\nif(d[0]<d[1]){\nreturn mix(d[0],d[1],Ad.x);\n}\nelse{\nreturn Ad.x;\n}\n}\n}\nvec2 An(vec4 Ad,float c,vec2 d){\nif(c==1.){\nif(d[0]<d[1]){\nreturn mix(vec2(d[0]),vec2(d[1]),Ad.xy);\n}\nelse{\nreturn Ad.xy;\n}\n}\nelse{\nreturn vec2(0.);\n}\n}\nfloat Ao(vec4 Ad,float c,vec2 d){\nif(c==1.){\nvec2 q=An(Ad,c,d);\nreturn length(q);\n}\nelse{\nreturn Am(Ad,c,d);\n}\n}\nfloat Ap(vec4 Ad,float c,vec2 d){\nif(c==1.){\nvec2 q=An(Ad,c,d);\nreturn mod((360.-(Ai(q.y,q.x)/Ah*180.+180.))-270.,360.)/360.;\n}\nelse{\nreturn 0.;\n}\n}\nin vec2 vTexCoord;\nin vec2 vTexPos;\nout vec4 fragColor;\nvoid main(void){\nvec2 uv=S(vTexCoord,vTexPos);\nvec4 Ad=Af(W,X,raster.Y,raster.Z,raster.a,raster.b,bitmap2.B,uv);\nif(!Al(Ad,raster.d)){\ndiscard;\n}\nfloat q=Ao(Ad,raster.c,raster.d);\nif((!Aj(raster.e)&&q<raster.e)||(!Aj(raster.f)&&q>raster.f)){\ndiscard;\n}\nfloat Aq=contour.u>contour.t?floor(contour.u/contour.t):1.;\nfloat Ar=q/contour.t;\nfloat As=(step(fract(Ar/Aq),0.1)+1.)/2.;\nfloat At=contour.v*As;\nfloat Au=abs(fract(Ar+0.5)-0.5);\nfloat Av=length(vec2(dFdx(Ar),dFdy(Ar)));\nfloat Aw=1.-clamp((Au/Av)+0.5-At,0.,1.);\nif(Av==0.){\nAw=0.;\n}\nfloat Ax=Aw*As;\nvec4 Ay=r(m,palette.n,palette.o,q);\nfragColor=vec4(Ay.rgb,Ay.a*Ax*layer.opacity);\ngeometry.uv=uv;\nDECKGL_FILTER_COLOR(fragColor,geometry);\n}\n",modules:[...e.modules.filter((e=>"bitmap"!==e.name)),pt,Pt,Jt,Kt]}}updateState(e){const{palette:t}=e.props;super.updateState(e),t!==e.oldProps.palette&&this._updatePalette()}draw(e){const{device:t,viewport:n}=this.context,{model:a}=this.state,{imageTexture:i,imageTexture2:r,imageSmoothing:o,imageInterpolation:A,imageWeight:s,imageType:l,imageUnscale:c,imageMinValue:g,imageMaxValue:u,bounds:p,_imageCoordinateSystem:d,transparentColor:m,minZoom:h,maxZoom:C,color:I,interval:v,majorInterval:f,width:E}=R(this.props,zt),{paletteTexture:B,paletteBounds:Q}=this.state;if(!i)return;const y=Re(n);a&&Ke(n,h,C)&&(a.shaderInputs.setProps({[pt.name]:{viewportGlobe:y,bounds:p,_imageCoordinateSystem:d,transparentColor:m},[Pt.name]:{imageTexture:i??Ze(t),imageTexture2:r??Ze(t),imageSmoothing:o,imageInterpolation:A,imageWeight:s,imageType:l,imageUnscale:c,imageMinValue:g,imageMaxValue:u},[Jt.name]:{paletteTexture:B??Ze(t),paletteBounds:Q,paletteColor:I},[Kt.name]:{interval:v,majorInterval:f,width:E}}),this.props.image=i,super.draw(e),this.props.image=null)}_updatePalette(){const{device:e}=this.context,{palette:n}=R(this.props,zt);if(!n)return void this.setState({paletteTexture:void 0,paletteBounds:void 0});const a=t(n),{paletteBounds:i,paletteTexture:r}=$e(e,a);this.setState({paletteTexture:r,paletteBounds:i})}}jt.layerName="ContourBitmapLayer",jt.defaultProps=zt;const Xt={...jt.defaultProps,imageTexture:void 0,imageTexture2:void 0,image:{type:"object",value:null},image2:{type:"object",value:null}};class Ht extends a{renderLayers(){const{device:e}=this.context,{props:t,imageTexture:a,imageTexture2:i}=this.state;return t&&a?[new jt(this.props,this.getSubLayerProps({id:"bitmap",imageTexture:a,imageTexture2:i,_imageCoordinateSystem:n.LNGLAT,parameters:{cullMode:"back",depthCompare:"always",...this.props.parameters},image:Ze(e),image2:Ze(e)}))]:[]}updateState(e){const{image:t,image2:n,imageUnscale:a,bounds:i}=e.props;if(super.updateState(e),t&&a&&!(t.data instanceof Uint8Array||t.data instanceof Uint8ClampedArray))throw new Error("imageUnscale can be applied to Uint8 data only");if(t!==e.oldProps.image||n!==e.oldProps.image2){const{device:e}=this.context,{image:t,image2:n}=this.props,a=t?Le(e,t,Se(i)):null,r=n?Le(e,n,Se(i)):null;this.setState({imageTexture:a,imageTexture2:r})}this.setState({props:e.props})}}Ht.layerName="ContourLayer",Ht.defaultProps=Xt;const Yt="abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789";function _t(e=20){return new Array(e).fill(void 0).map((()=>Yt.charAt(Math.floor(62*Math.random())))).join("")}const $t=h((en=function(){const e=Symbol("Comlink.proxy"),t=Symbol("Comlink.endpoint"),n=Symbol("Comlink.releaseProxy"),a=Symbol("Comlink.finalizer"),i=Symbol("Comlink.thrown"),r=e=>"object"==typeof e&&null!==e||"function"==typeof e,o={canHandle:t=>r(t)&&t[e],serialize(e){const{port1:t,port2:n}=new MessageChannel;return s(e,t),[n,[n]]},deserialize:e=>(e.start(),function(e,t){const n=new Map;return e.addEventListener("message",(function(e){const{data:t}=e;if(!t||!t.id)return;const a=n.get(t.id);if(a)try{a(t)}finally{n.delete(t.id)}})),d(e,n,[],t)}(e))},A=new Map([["proxy",o],["throw",{canHandle:e=>r(e)&&i in e,serialize({value:e}){let t;return t=e instanceof Error?{isError:!0,value:{message:e.message,name:e.name,stack:e.stack}}:{isError:!1,value:e},[t,[]]},deserialize(e){if(e.isError)throw Object.assign(new Error(e.value.message),e.value);throw e.value}}]]);function s(t,n=globalThis,r=["*"]){n.addEventListener("message",(function o(A){if(!A||!A.data)return;if(!function(e,t){for(const n of e){if(t===n||"*"===n)return!0;if(n instanceof RegExp&&n.test(t))return!0}return!1}(r,A.origin))return void console.warn(`Invalid origin '${A.origin}' for comlink proxy`);const{id:c,type:g,path:u}=Object.assign({path:[]},A.data),p=(A.data.argumentList||[]).map(v);let d;try{const n=u.slice(0,-1).reduce(((e,t)=>e[t]),t),a=u.reduce(((e,t)=>e[t]),t);switch(g){case"GET":d=a;break;case"SET":n[u.slice(-1)[0]]=v(A.data.value),d=!0;break;case"APPLY":d=a.apply(n,p);break;case"CONSTRUCT":d=function(t){return Object.assign(t,{[e]:!0})}(new a(...p));break;case"ENDPOINT":{const{port1:e,port2:n}=new MessageChannel;s(t,n),d=C(e,[e])}break;case"RELEASE":d=void 0;break;default:return}}catch(e){d={value:e,[i]:0}}Promise.resolve(d).catch((e=>({value:e,[i]:0}))).then((e=>{const[i,r]=I(e);n.postMessage(Object.assign(Object.assign({},i),{id:c}),r),"RELEASE"===g&&(n.removeEventListener("message",o),l(n),a in t&&"function"==typeof t[a]&&t[a]())})).catch((e=>{const[t,a]=I({value:new TypeError("Unserializable return value"),[i]:0});n.postMessage(Object.assign(Object.assign({},t),{id:c}),a)}))})),n.start&&n.start()}function l(e){(function(e){return"MessagePort"===e.constructor.name})(e)&&e.close()}function c(e){if(e)throw new Error("Proxy has been released and is not useable")}function g(e){return f(e,new Map,{type:"RELEASE"}).then((()=>{l(e)}))}const u=new WeakMap,p="FinalizationRegistry"in globalThis&&new FinalizationRegistry((e=>{const t=(u.get(e)||0)-1;u.set(e,t),0===t&&g(e)}));function d(e,a,i=[],r=function(){}){let o=!1;const A=new Proxy(r,{get(t,r){if(c(o),r===n)return()=>{!function(e){p&&p.unregister(e)}(A),g(e),a.clear(),o=!0};if("then"===r){if(0===i.length)return{then:()=>A};const t=f(e,a,{type:"GET",path:i.map((e=>e.toString()))}).then(v);return t.then.bind(t)}return d(e,a,[...i,r])},set(t,n,r){c(o);const[A,s]=I(r);return f(e,a,{type:"SET",path:[...i,n].map((e=>e.toString())),value:A},s).then(v)},apply(n,r,A){c(o);const s=i[i.length-1];if(s===t)return f(e,a,{type:"ENDPOINT"}).then(v);if("bind"===s)return d(e,a,i.slice(0,-1));const[l,g]=m(A);return f(e,a,{type:"APPLY",path:i.map((e=>e.toString())),argumentList:l},g).then(v)},construct(t,n){c(o);const[r,A]=m(n);return f(e,a,{type:"CONSTRUCT",path:i.map((e=>e.toString())),argumentList:r},A).then(v)}});return function(e,t){const n=(u.get(t)||0)+1;u.set(t,n),p&&p.register(e,t,e)}(A,e),A}function m(e){const t=e.map(I);return[t.map((e=>e[0])),(n=t.map((e=>e[1])),Array.prototype.concat.apply([],n))];var n}const h=new WeakMap;function C(e,t){return h.set(e,t),e}function I(e){for(const[t,n]of A)if(n.canHandle(e)){const[a,i]=n.serialize(e);return[{type:"HANDLER",name:t,value:a},i]}return[{type:"RAW",value:e},h.get(e)||[]]}function v(e){switch(e.type){case"HANDLER":return A.get(e.name).deserialize(e.value);case"RAW":return e.value}}function f(e,t,n,a){return new Promise((i=>{const r=new Array(4).fill(0).map((()=>Math.floor(Math.random()*Number.MAX_SAFE_INTEGER).toString(16))).join("-");t.set(r,i),e.start&&e.start(),e.postMessage(Object.assign({id:r},n),a)}))}const E=6371e3;function B(e){return e/180*Math.PI}const Q=6370972;function y(e,t){return function(e,t,n=E){const a=n,i=B(e[1]),r=B(e[0]),o=B(t[1]),A=o-i,s=B(t[0])-r,l=Math.sin(A/2)*Math.sin(A/2)+Math.cos(i)*Math.cos(o)*Math.sin(s/2)*Math.sin(s/2);return a*(2*Math.atan2(Math.sqrt(l),Math.sqrt(1-l)))}(e,t,Q)}const b={NEAREST:"NEAREST",LINEAR:"LINEAR",CUBIC:"CUBIC"},w={VECTOR:"VECTOR"};function x(e){return e%1}function T(e,t){return e.map(((n,a)=>e[a]+t[a]))}function M(e,t){return e.map(((n,a)=>e[a]*t))}function O(e,t){return e.map(((n,a)=>e[a]*t[a])).reduce(((e,t)=>e+t))}function S(e,t,n){return e===t?e:e*(1-n)+t*n}function P(e,t,n){return e.map(((a,i)=>S(e[i],t[i],n)))}function V(e,t){return t?e[3]>=255:!isNaN(e[0])}function N(e,t,n){if(t===w.VECTOR){const a=function(e,t,n){return t===w.VECTOR?n?[S(n[0],n[1],e[0]/255),S(n[0],n[1],e[1]/255)]:[e[0],e[1]]:[NaN,NaN]}(e,t,n);return Math.hypot(a[0],a[1])}return function(e,t,n){return t===w.VECTOR?0:n?S(n[0],n[1],e[0]/255):e[0]}(e,t,n)}function U(e,t,n,a,i,r){const{data:o,width:A,height:s}=e,l=o.length/(A*s),c=(n+i+.5)/t[0],g=(a+r+.5)/t[1],u=Math.max(0,Math.min(A-1,Math.floor(c*A))),p=Math.max(0,Math.min(s-1,Math.floor(g*s)));return new Array(l).fill(void 0).map(((e,t)=>o[(u+p*A)*l+t]))}const D=[3,-6,0,4].map((e=>e/6)),J=[-1,6,-12,8].map((e=>e/6));function L(e){return[e*e*e,e*e,e,1]}function F(e,t,n,a,i){const r=T(T(T(M(e,O(J,L(i+1))),M(t,O(D,L(i)))),M(n,O(D,L(1-i)))),M(a,O(J,L(2-i))));return r[3]=e[3]>0&&t[3]>0&&n[3]>0&&a[3]>0?Math.max(Math.max(Math.max(e[3],t[3]),n[3]),a[3]):0,r}function Z(e,t,n,a,i){return n===b.CUBIC?function(e,t,n,a){const i=n*t[0]-.5,r=a*t[1]-.5,o=Math.floor(i),A=Math.floor(r),s=x(i),l=x(r);return F(F(U(e,t,o,A,-1,-1),U(e,t,o,A,0,-1),U(e,t,o,A,1,-1),U(e,t,o,A,2,-1),s),F(U(e,t,o,A,-1,0),U(e,t,o,A,0,0),U(e,t,o,A,1,0),U(e,t,o,A,2,0),s),F(U(e,t,o,A,-1,1),U(e,t,o,A,0,1),U(e,t,o,A,1,1),U(e,t,o,A,2,1),s),F(U(e,t,o,A,-1,2),U(e,t,o,A,0,2),U(e,t,o,A,1,2),U(e,t,o,A,2,2),s),l)}(e,t,a,i):n===b.LINEAR?function(e,t,n,a){const i=n*t[0]-.5,r=a*t[1]-.5,o=Math.floor(i),A=Math.floor(r),s=x(i),l=x(r);return P(P(U(e,t,o,A,0,0),U(e,t,o,A,1,0),s),P(U(e,t,o,A,0,1),U(e,t,o,A,1,1),s),l)}(e,t,a,i):function(e,t,n,a){const i=n*t[0]-.5,r=a*t[1]-.5;return U(e,t,Math.round(i),Math.round(r),0,0)}(e,t,a,i)}function W(e,t,n,a,i,r,o,A){const s=r?o+.5/n[0]:S(0+.5/n[0],1-.5/n[0],o),l=S(0+.5/n[1],1-.5/n[1],A);return t&&i>0?P(Z(e,n,a,s,l),Z(t,n,a,s,l),i):Z(e,n,a,s,l)}function k(e,t){const{image:n,image2:a,imageSmoothing:i,imageInterpolation:r,imageWeight:o,imageType:A,imageUnscale:s,imageMinValue:l,imageMaxValue:c}=e,{width:g,height:u}=n,p=r!==b.NEAREST?b.NEAREST:r,d=function(e,t,n){const a=1+Math.max(0,n);return[e/a,t/a]}(g,u,i),m=function(e){return e[2]-e[0]==360}(t),h=new Float32Array(g*u);for(let e=0;e<u;e++)for(let t=0;t<g;t++){const i=t+e*g,r=W(n,a,d,p,o,m,t/g,e/u);if(!V(r,s)){h[i]=NaN;continue}const C=N(r,A,s);"number"==typeof l&&!isNaN(l)&&C<l||"number"==typeof c&&!isNaN(c)&&C>c?h[i]=NaN:h[i]=C}return{data:h,width:g,height:u}}function q(e,t,n){let{data:a,width:i,height:r}=e;const o=1e3*n,A=function(e,t,n){const a=[n[0],n[3]],i=(n[2]-n[0])/e,r=(n[3]-n[1])/t;return e=>{const[t,n]=e;return[a[0]+t*i,a[1]-n*r]}}(i,r,t);a=function(e,t,n){const a=new Float32Array(e.length);for(let i=0;i<n;i++)for(let r=0;r<t;r++){const o=r+i*t;if(r>=1&&r<=t-2&&i>=1&&i<=n-2){const n=[e[r-1+(i-1)*t],e[r+(i-1)*t],e[r+1+(i-1)*t],e[r-1+i*t],e[r+i*t],e[r+1+i*t],e[r-1+(i+1)*t],e[r+(i+1)*t],e[r+1+(i-1)*t]];a[o]=n.reduce(((e,t)=>e+t),0)/n.length}else a[o]=e[o]}return a}(a,i,r);let s=[],l=[];for(let e=1;e<r-1;e++)for(let t=1;t<i-1;t++){const n=a[t+e*i];if(!isNaN(n)&&n>=a[t+1+e*i]&&n>=a[t+1+(e+1)*i]&&n>=a[t+(e+1)*i]&&n>=a[t-1+(e+1)*i]&&n>a[t-1+e*i]&&n>a[t-1+(e-1)*i]&&n>a[t+(e-1)*i]&&n>a[t+1+(e-1)*i]){const a=A([t,e]);s.push({position:a,value:n})}if(!isNaN(n)&&n<=a[t+1+e*i]&&n<=a[t+1+(e+1)*i]&&n<=a[t+(e+1)*i]&&n<=a[t-1+(e+1)*i]&&n<a[t-1+e*i]&&n<a[t-1+(e-1)*i]&&n<a[t+(e-1)*i]&&n<a[t+1+(e-1)*i]){const a=A([t,e]);l.push({position:a,value:n})}}s=s.sort(((e,t)=>t.value-e.value)),l=l.sort(((e,t)=>e.value-t.value));const c=[...s];for(let e=0;e<c.length;e++){const t=c[e];if(t)for(let n=e+1;n<c.length;n++){const e=c[n];e&&y(t.position,e.position)<o&&(c[n]=void 0)}}s=c.filter((e=>!!e));const g=[...l];for(let e=0;e<g.length;e++){const t=g[e];if(t)for(let n=e+1;n<g.length;n++){const e=g[n];e&&y(t.position,e.position)<o&&(g[n]=void 0)}}return l=g.filter((e=>!!e)),new Float32Array([s.length,...s.map((e=>[...e.position,e.value])).flat(),l.length,...l.map((e=>[...e.position,e.value])).flat()])}s({getHighLowPointData(e,t,n,a,i,r,o,A,s,l,c,g,u,p,d){const m=function(e,t,n){return q(k(e,t),t,n)}({image:{data:e,width:t,height:n},image2:a?{data:a,width:i,height:r}:null,imageSmoothing:o,imageInterpolation:A,imageWeight:s,imageType:l,imageUnscale:c,imageMinValue:g,imageMaxValue:u},p,d);return C(m,[m.buffer])}})},en.toString().replace(/^function.+?{/,"").slice(0,-1)));var en,tn=C($t);const nn={LOW:"L",HIGH:"H"},an=d(tn());function rn(e,t){return{type:"Feature",geometry:{type:"Point",coordinates:e},properties:t}}async function on(e,t,n){const{image:a,image2:i,imageSmoothing:r,imageInterpolation:o,imageWeight:A,imageType:s,imageUnscale:l,imageMinValue:c,imageMaxValue:g}=e,{data:u,width:p,height:d}=a,{data:h=null,width:C=null,height:I=null}=i||{},v=u.slice(0),f=h?h.slice(0):null,E=function(e){let t=0;const n=[],a=e[t++];for(let i=0;i<a;i++){const a=[e[t++],e[t++]],i=e[t++];n.push(rn(a,{type:nn.HIGH,value:i}))}const i=e[t++];for(let a=0;a<i;a++){const a=[e[t++],e[t++]],i=e[t++];n.push(rn(a,{type:nn.LOW,value:i}))}return n}(await an.getHighLowPointData(m(v,[v.buffer]),p,d,f?m(f,[f.buffer]):null,C,I,r,o,A,s,l,c,g,t,n));return{type:"FeatureCollection",features:E}}const An="high-low-label";function sn(e,t,n){return e.properties.type===nn.HIGH?Math.round((e.properties.value-n)/n*100):Math.round((t-e.properties.value)/t*100)}const ln={image:{type:"object",value:null},image2:{type:"object",value:null},imageSmoothing:{type:"number",value:0},imageInterpolation:{type:"object",value:re.CUBIC},imageWeight:{type:"number",value:0},imageType:{type:"object",value:oe.SCALAR},imageUnscale:{type:"array",value:null},imageMinValue:{type:"object",value:null},imageMaxValue:{type:"object",value:null},bounds:{type:"array",value:[-180,-90,180,90],compare:!0},minZoom:{type:"object",value:null},maxZoom:{type:"object",value:null},radius:{type:"number",value:0},unitFormat:{type:"object",value:null},textFormatFunction:{type:"function",value:W},textFontFamily:{type:"object",value:D},textSize:{type:"number",value:12},textColor:{type:"color",value:L},textOutlineWidth:{type:"number",value:1},textOutlineColor:{type:"color",value:Z},palette:{type:"object",value:null}};class cn extends a{renderLayers(){const{viewport:e}=this.context,{props:t,points:n,minValue:a,maxValue:i}=this.state;if(!t||!n||"number"!=typeof a||"number"!=typeof i)return[];const{unitFormat:o,textFormatFunction:A,textFontFamily:s,textSize:c,textColor:g,textOutlineWidth:u,textOutlineColor:p}=R(t,ln),{paletteScale:d}=this.state;return[new r(this.getSubLayerProps({id:"type",data:n,getPixelOffset:[0,-Ye(e,1.2*c/2)],getPosition:e=>e.geometry.coordinates,getText:e=>e.properties.type,getSize:1.2*c,getColor:e=>d?tt(d(e.properties.value).rgba()):g,getAngle:_e(e,0),outlineWidth:u,outlineColor:p,fontFamily:s,fontSettings:{sdf:!0},billboard:!1,extensions:[new l],collisionEnabled:!0,collisionGroup:An,collisionTestProps:{sizeScale:5},getCollisionPriority:e=>sn(e,a,i),parameters:{cullMode:"front",depthCompare:"always",...this.props.parameters}})),new r(this.getSubLayerProps({id:"value",data:n,getPixelOffset:[0,Ye(e,1.2*c/2)],getPosition:e=>e.geometry.coordinates,getText:e=>A(e.properties.value,o),getSize:c,getColor:e=>d?tt(d(e.properties.value).rgba()):g,getAngle:_e(e,0),outlineWidth:u,outlineColor:p,fontFamily:s,fontSettings:{sdf:!0},billboard:!1,extensions:[new l],collisionEnabled:!0,collisionGroup:An,collisionTestProps:{sizeScale:5},getCollisionPriority:e=>sn(e,a,i),parameters:{cullMode:"front",depthCompare:"always",...this.props.parameters}}))]}filterSubLayer(e){const{viewport:t}=e,{minZoom:n,maxZoom:a}=R(this.props,ln);return Ke(t,n,a)}updateState(e){const{image:t,image2:n,imageSmoothing:a,imageInterpolation:i,imageWeight:r,imageType:o,imageUnscale:A,imageMinValue:s,imageMaxValue:l,radius:c,unitFormat:g,textFormatFunction:u,textFontFamily:p,textSize:d,textColor:m,textOutlineWidth:h,textOutlineColor:C,palette:I,visible:v}=e.props;super.updateState(e),c&&v?(t===e.oldProps.image&&n===e.oldProps.image2&&a===e.oldProps.imageSmoothing&&i===e.oldProps.imageInterpolation&&r===e.oldProps.imageWeight&&o===e.oldProps.imageType&&A===e.oldProps.imageUnscale&&s===e.oldProps.imageMinValue&&l===e.oldProps.imageMaxValue&&c===e.oldProps.radius&&v===e.oldProps.visible||this._updateFeatures(),I!==e.oldProps.palette&&this._updatePalette(),g===e.oldProps.unitFormat&&u===e.oldProps.textFormatFunction&&p===e.oldProps.textFontFamily&&d===e.oldProps.textSize&&m===e.oldProps.textColor&&h===e.oldProps.textOutlineWidth&&C===e.oldProps.textOutlineColor||this._redrawVisibleFeatures(),this.setState({props:e.props})):this.setState({points:void 0,minValue:void 0,maxValue:void 0})}async _updateFeatures(){const{image:e,image2:t,imageSmoothing:n,imageInterpolation:a,imageType:i,imageUnscale:r,imageMinValue:o,imageMaxValue:A,imageWeight:s,bounds:l,radius:c}=R(this.props,ln);if(!e)return;const g=_t();this.state.requestId=g;const u={image:e,image2:t,imageSmoothing:n,imageInterpolation:a,imageWeight:s,imageType:i,imageUnscale:r,imageMinValue:o,imageMaxValue:A},p=(await on(u,l,c)).features;if(this.state.requestId!==g)return;const d=p.map((e=>e.properties.value)),m=Math.min(...d),h=Math.max(...d);this.setState({points:p,minValue:m,maxValue:h})}_updatePalette(){const{palette:e}=R(this.props,ln);if(!e)return this.setState({paletteScale:void 0}),void this._redrawVisibleFeatures();const n=t(e);this.setState({paletteScale:n}),this._redrawVisibleFeatures()}_redrawVisibleFeatures(){this.setState({points:Array.isArray(this.state.points)?Array.from(this.state.points):this.state.points})}}cn.layerName="HighLowCompositeLayer",cn.defaultProps=ln;const gn={...cn.defaultProps};class un extends a{renderLayers(){const{props:e}=this.state;return e?[new cn(this.props,this.getSubLayerProps({id:"composite"}))]:[]}updateState(e){const{image:t,imageUnscale:n}=e.props;if(super.updateState(e),t&&n&&!(t.data instanceof Uint8Array||t.data instanceof Uint8ClampedArray))throw new Error("imageUnscale can be applied to Uint8 data only");this.setState({props:e.props})}}un.layerName="HighLowLayer",un.defaultProps=gn;const pn={COLD:"COLD",WARM:"WARM",OCCLUDED:"OCCLUDED",STATIONARY:"STATIONARY"},dn={iconAtlas:"data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAGoAAAAqCAYAAABbec77AAAFsmlUWHRYTUw6Y29tLmFkb2JlLnhtcAAAAAAAPD94cGFja2V0IGJlZ2luPSLvu78iIGlkPSJXNU0wTXBDZWhpSHpyZVN6TlRjemtjOWQiPz4KPHg6eG1wbWV0YSB4bWxuczp4PSJhZG9iZTpuczptZXRhLyIgeDp4bXB0az0iWE1QIENvcmUgNS41LjAiPgogPHJkZjpSREYgeG1sbnM6cmRmPSJodHRwOi8vd3d3LnczLm9yZy8xOTk5LzAyLzIyLXJkZi1zeW50YXgtbnMjIj4KICA8cmRmOkRlc2NyaXB0aW9uIHJkZjphYm91dD0iIgogICAgeG1sbnM6eG1wPSJodHRwOi8vbnMuYWRvYmUuY29tL3hhcC8xLjAvIgogICAgeG1sbnM6cGhvdG9zaG9wPSJodHRwOi8vbnMuYWRvYmUuY29tL3Bob3Rvc2hvcC8xLjAvIgogICAgeG1sbnM6ZGM9Imh0dHA6Ly9wdXJsLm9yZy9kYy9lbGVtZW50cy8xLjEvIgogICAgeG1sbnM6ZXhpZj0iaHR0cDovL25zLmFkb2JlLmNvbS9leGlmLzEuMC8iCiAgICB4bWxuczp0aWZmPSJodHRwOi8vbnMuYWRvYmUuY29tL3RpZmYvMS4wLyIKICAgIHhtbG5zOnhtcE1NPSJodHRwOi8vbnMuYWRvYmUuY29tL3hhcC8xLjAvbW0vIgogICAgeG1sbnM6c3RFdnQ9Imh0dHA6Ly9ucy5hZG9iZS5jb20veGFwLzEuMC9zVHlwZS9SZXNvdXJjZUV2ZW50IyIKICAgeG1wOkNyZWF0ZURhdGU9IjIwMjMtMDMtMTBUMTQ6NDI6NTYrMDEwMCIKICAgeG1wOk1vZGlmeURhdGU9IjIwMjMtMDMtMjVUMDk6MDY6NTgrMDE6MDAiCiAgIHhtcDpNZXRhZGF0YURhdGU9IjIwMjMtMDMtMjVUMDk6MDY6NTgrMDE6MDAiCiAgIHBob3Rvc2hvcDpEYXRlQ3JlYXRlZD0iMjAyMy0wMy0xMFQxNDo0Mjo1NiswMTAwIgogICBwaG90b3Nob3A6Q29sb3JNb2RlPSIzIgogICBwaG90b3Nob3A6SUNDUHJvZmlsZT0ic1JHQiBJRUM2MTk2Ni0yLjEiCiAgIGV4aWY6UGl4ZWxYRGltZW5zaW9uPSIxMDYiCiAgIGV4aWY6UGl4ZWxZRGltZW5zaW9uPSI0MiIKICAgZXhpZjpDb2xvclNwYWNlPSIxIgogICB0aWZmOkltYWdlV2lkdGg9IjEwNiIKICAgdGlmZjpJbWFnZUxlbmd0aD0iNDIiCiAgIHRpZmY6UmVzb2x1dGlvblVuaXQ9IjIiCiAgIHRpZmY6WFJlc29sdXRpb249IjcyLzEiCiAgIHRpZmY6WVJlc29sdXRpb249IjcyLzEiPgogICA8ZGM6dGl0bGU+CiAgICA8cmRmOkFsdD4KICAgICA8cmRmOmxpIHhtbDpsYW5nPSJ4LWRlZmF1bHQiPmZyb250PC9yZGY6bGk+CiAgICA8L3JkZjpBbHQ+CiAgIDwvZGM6dGl0bGU+CiAgIDx4bXBNTTpIaXN0b3J5PgogICAgPHJkZjpTZXE+CiAgICAgPHJkZjpsaQogICAgICBzdEV2dDphY3Rpb249InByb2R1Y2VkIgogICAgICBzdEV2dDpzb2Z0d2FyZUFnZW50PSJBZmZpbml0eSBEZXNpZ25lciAyIDIuMC40IgogICAgICBzdEV2dDp3aGVuPSIyMDIzLTAzLTI1VDA5OjA2OjU4KzAxOjAwIi8+CiAgICA8L3JkZjpTZXE+CiAgIDwveG1wTU06SGlzdG9yeT4KICA8L3JkZjpEZXNjcmlwdGlvbj4KIDwvcmRmOlJERj4KPC94OnhtcG1ldGE+Cjw/eHBhY2tldCBlbmQ9InIiPz6ldAqQAAABgWlDQ1BzUkdCIElFQzYxOTY2LTIuMQAAKJF1kd8rg1EYxz/baGKiuKBcLOFqNNTiRtnSKGnNlOFme/dL7cfb+25puVVuV5S48euCv4Bb5VopIiW3XBM3rNfzbmqSPafnPJ/zPed5Ouc5YA2llYze4IZMNq8F/V7nYnjJaX/GRjd2BrFEFF2dDARmqWsfd1jMeDNo1qp/7l9ricV1BSxNwhOKquWFp4Vn1/KqydvCnUoqEhM+FXZpckHhW1OPVvnF5GSVv0zWQkEfWNuFnclfHP3FSkrLCMvL6cukC8rPfcyXOOLZhXmJveI96ATx48XJDFP48DDMuMwe6c4IQ7KiTr67kj9HTnIVmVWKaKySJEUel6gFqR6XmBA9LiNN0ez/377qidGRanWHFxqfDOOtH+xbUC4ZxuehYZSPwPYIF9lafu4Axt5FL9W0vn1o24Czy5oW3YHzTeh6UCNapCLZxK2JBLyeQGsYOq6hebnas599ju8htC5fdQW7ezAg59tWvgEshmfLrsJJUgAAAAlwSFlzAAALEwAACxMBAJqcGAAAAohJREFUeJztmj1uE1EURo8J0BBMmSgV7IE0oUzDCtJQ44JsgcRmEQksAJZARBqoUrGCVNPhGpzGwlIo/J4x9hv7vv/n8D7pSJYlz3xX1x4djQdqamo2M68UNQXnGfBT8TRvlZq2bAFXwK3iSr1XU1gG/F2Spp+zUM1yXgATlhc1AQ4y9qqZyxOgYXlJmgboZmtXM8sn2