1"use strict";(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[4999],{72096:(e,t,r)=>{let n,i,a,s,o,l,u,h,c,p,f,d,y,m,g,x,v,b,w,_,A;r.d(t,{$:()=>uI,$n:()=>eR,$r:()=>ed,$t:()=>aW,A:()=>hT,Ai:()=>H,Ar:()=>t_,At:()=>ob,B:()=>u8,Bn:()=>e5,Br:()=>ez,Bt:()=>ot,C:()=>hJ,Ci:()=>q,Cn:()=>tX,Cr:()=>eW,Ct:()=>lu,Di:()=>J,Dn:()=>tZ,Dr:()=>tk,Dt:()=>oG,E:()=>hU,Ei:()=>Q,En:()=>tG,Er:()=>tS,Et:()=>o9,F:()=>hd,Fi:()=>L,Fr:()=>e8,Ft:()=>oE,G:()=>uM,Gn:()=>eq,Gr:()=>eC,Gt:()=>sQ,H:()=>uJ,Hn:()=>tl,Hr:()=>eL,Ht:()=>sJ,I:()=>hp,Ii:()=>V,In:()=>tT,Ir:()=>tn,It:()=>oF,J:()=>uB,Jn:()=>function e(t,r){if(Array.isArray(t)){if(!Array.isArray(r)||t.length!==r.length)return!1;for(let n=0;n<t.length;n++)if(!e(t[n],r[n]))return!1;return!0}if("object"==typeof t&&t&&null!==r){if("object"!=typeof r||Object.keys(t).length!==Object.keys(r).length)return!1;for(let n in t)if(!e(t[n],r[n]))return!1;return!0}return t===r},Jr:()=>eE,Jt:()=>sl,K:()=>uz,Kn:()=>eU,Kr:()=>ek,Kt:()=>oi,L:()=>hf,Li:()=>z,Ln:()=>eH,Lr:()=>eO,Lt:()=>oT,M:()=>hw,Mi:()=>X,Mn:()=>tV,Mr:()=>eX,Mt:()=>oA,Ni:()=>$,Nn:()=>tL,Nr:()=>tt,Nt:()=>oD,O:()=>hP,Oi:()=>Z,Or:()=>ti,Ot:()=>oq,P:()=>hy,Pi:()=>O,Pn:()=>t$,Pr:()=>th,Pt:()=>oS,Q:()=>uk,Qn:()=>eJ,Qr:()=>en,Qt:()=>a0,R:()=>hc,Ri:()=>P,Rn:()=>tb,Rr:()=>e$,Rt:()=>ou,S:()=>h1,Si:()=>K,Sn:()=>tY,Sr:()=>tD,St:()=>lc,T:()=>hX,Ti:()=>G,Tn:()=>tW,Tr:()=>e0,Tt:()=>lo,Un:()=>eG,Ur:()=>eV,Ut:()=>sK,V:()=>u5,Vn:()=>e4,Vr:()=>eP,Vt:()=>os,W:()=>uR,Wn:()=>ej,Wr:()=>eI,Wt:()=>on,X:()=>uF,Xn:()=>tA,Xr:()=>eS,Xt:()=>sn,Y:()=>uC,Yn:()=>e6,Yr:()=>eD,Yt:()=>a7,Z:()=>uT,Zn:()=>eK,Zr:()=>es,Zt:()=>aK,_:()=>cr,_i:()=>N,_n:()=>tQ,_r:()=>eQ,_t:()=>lb,a:()=>cm,ai:()=>ep,an:()=>aE,ar:()=>tF,at:()=>uw,b:()=>h8,bi:()=>et,br:()=>e9,bt:()=>ld,ci:()=>eb,cn:()=>aS,cr:()=>tE,ct:()=>um,d:()=>cu,di:()=>e_,dn:()=>r8,dr:()=>tg,dt:()=>ul,ei:()=>eh,er:()=>ta,et:()=>uE,f:()=>cl,fi:()=>eo,fn:()=>rZ,fr:()=>tM,ft:()=>un,g:()=>ca,gi:()=>ew,gn:()=>t2,gr:()=>ts,gt:()=>l3,h:()=>cs,hi:()=>eg,hn:()=>t3,hr:()=>e1,ht:()=>l2,ii:()=>ec,in:()=>aD,ir:()=>e2,it:()=>ub,ji:()=>Y,jn:()=>tO,jr:()=>eZ,jt:()=>o_,k:()=>hk,ki:()=>W,kn:()=>tR,kr:()=>tf,kt:()=>ow,li:()=>el,ln:()=>iX,lr:()=>tx,m:()=>cf,mi:()=>ey,mn:()=>t5,mr:()=>td,mt:()=>l6,n:()=>fu,ni:()=>eA,nn:()=>aV,nr:()=>to,nt:()=>uD,oi:()=>ex,on:()=>aF,or:()=>e3,ot:()=>u_,p:()=>ch,pi:()=>em,pn:()=>rL,pr:()=>tP,pt:()=>l5,q:()=>uP,qn:()=>eN,qr:()=>eT,qt:()=>sf,ri:()=>ei,rr:()=>tp,rt:()=>uA,s:()=>cd,si:()=>ev,sn:()=>aA,st:()=>ug,ti:()=>ef,tn:()=>aL,tr:()=>e7,tt:()=>uS,u:()=>co,ui:()=>eu,ur:()=>tB,ut:()=>uu,v:()=>ce,vi:()=>U,vn:()=>tJ,vr:()=>tr,w:()=>hW,wi:()=>j,wn:()=>tq,wr:()=>tw,wt:()=>ls,x:()=>h5,xi:()=>ee,xn:()=>tN,xr:()=>eY,xt:()=>lh,y:()=>h9,yi:()=>R,yn:()=>t0,yr:()=>ty,yt:()=>lx,zn:()=>tv,zr:()=>eM,zt:()=>sR});var D,S,E,F=Object.create,k=Object.defineProperty,T=Object.getOwnPropertyDescriptor,I=Object.getOwnPropertyNames,C=Object.getPrototypeOf,M=Object.prototype.hasOwnProperty,B=(e,t)=>()=>(t||(e((t={exports:{}}).exports,t),e=null),t.exports);function P(e,t){this.x=e,this.y=t}function z(){return n??="u">typeof OffscreenCanvas&&new OffscreenCanvas(1,1).getContext("2d")&&"function"==typeof createImageBitmap}function V(){if(null==i&&(i=!1,z())){let e=new OffscreenCanvas(5,5).getContext("2d",{willReadFrequently:!0});if(e){for(let t=0;t<25;t++){let r=4*t;e.fillStyle=`rgb(${r},${r+1},${r+2})`,e.fillRect(t%5,Math.floor(t/5),1,1)}let t=e.getImageData(0,0,5,5).data;for(let e=0;e<100;e++)if(e%4!=3&&t[e]!==e){i=!0;break}}}return i||!1}P.prototype={clone(){return new P(this.x,this.y)},add(e){return this.clone()._add(e)},sub(e){return this.clone()._sub(e)},multByPoint(e){return this.clone()._multByPoint(e)},divByPoint(e){return this.clone()._divByPoint(e)},mult(e){return this.clone()._mult(e)},div(e){return this.clone()._div(e)},rotate(e){return this.clone()._rotate(e)},rotateAround(e,t){return this.clone()._rotateAround(e,t)},matMult(e){return this.clone()._matMult(e)},unit(){return this.clone()._unit()},perp(){return this.clone()._perp()},round(){return this.clone()._round()},mag(){return Math.sqrt(this.x*this.x+this.y*this.y)},equals(e){return this.x===e.x&&this.y===e.y},dist(e){return Math.sqrt(this.distSqr(e))},distSqr(e){let t=e.x-this.x,r=e.y-this.y;return t*t+r*r},angle(){return Math.atan2(this.y,this.x)},angleTo(e){return Math.atan2(this.y-e.y,this.x-e.x)},angleWith(e){return this.angleWithSep(e.x,e.y)},angleWithSep(e,t){return Math.atan2(this.x*t-this.y*e,this.x*e+this.y*t)},_matMult(e){let t=e[0]*this.x+e[1]*this.y,r=e[2]*this.x+e[3]*this.y;return this.x=t,this.y=r,this},_add(e){return this.x+=e.x,this.y+=e.y,this}
vendor: 4,198 bytes, line 1
1,_sub(e){return this.x-=e.x,this.y-=e.y,this},_mult(e){return this.x*=e,this.y*=e,this},_div(e){return this.x/=e,this.y/=e,this},_multByPoint(e){return this.x*=e.x,this.y*=e.y,this},_divByPoint(e){return this.x/=e.x,this.y/=e.y,this},_unit(){return this._div(this.mag()),this},_perp(){let e=this.y;return this.y=this.x,this.x=-e,this},_rotate(e){let t=Math.cos(e),r=Math.sin(e),n=t*this.x-r*this.y,i=r*this.x+t*this.y;return this.x=n,this.y=i,this},_rotateAround(e,t){let r=Math.cos(e),n=Math.sin(e),i=t.x+r*(this.x-t.x)-n*(this.y-t.y),a=t.y+n*(this.x-t.x)+r*(this.y-t.y);return this.x=i,this.y=a,this},_round(){return this.x=Math.round(this.x),this.y=Math.round(this.y),this},constructor:P},P.convert=function(e){if(e instanceof P)return e;if(Array.isArray(e))return new P(+e[0],+e[1]);if(void 0!==e.x&&void 0!==e.y)return new P(+e.x,+e.y);throw Error("Expected [x, y] or {x, y} point format")};var L="u">typeof Float32Array?Float32Array:Array;function $(){var e=new L(9);return L!=Float32Array&&(e[1]=0,e[2]=0,e[3]=0,e[5]=0,e[6]=0,e[7]=0),e[0]=1,e[4]=1,e[8]=1,e}function O(e,t){var r=Math.sin(t),n=Math.cos(t);return e[0]=n,e[1]=r,e[2]=0,e[3]=-r,e[4]=n,e[5]=0,e[6]=0,e[7]=0,e[8]=1,e}function R(){var e=new L(16);return L!=Float32Array&&(e[1]=0,e[2]=0,e[3]=0,e[4]=0,e[6]=0,e[7]=0,e[8]=0,e[9]=0,e[11]=0,e[12]=0,e[13]=0,e[14]=0),e[0]=1,e[5]=1,e[10]=1,e[15]=1,e}function N(e){var t=new L(16);return t[0]=e[0],t[1]=e[1],t[2]=e[2],t[3]=e[3],t[4]=e[4],t[5]=e[5],t[6]=e[6],t[7]=e[7],t[8]=e[8],t[9]=e[9],t[10]=e[10],t[11]=e[11],t[12]=e[12],t[13]=e[13],t[14]=e[14],t[15]=e[15],t}function U(e,t){return e[0]=t[0],e[1]=t[1],e[2]=t[2],e[3]=t[3],e[4]=t[4],e[5]=t[5],e[6]=t[6],e[7]=t[7],e[8]=t[8],e[9]=t[9],e[10]=t[10],e[11]=t[11],e[12]=t[12],e[13]=t[13],e[14]=t[14],e[15]=t[15],e}function q(e){return e[0]=1,e[1]=0,e[2]=0,e[3]=0,e[4]=0,e[5]=1,e[6]=0,e[7]=0,e[8]=0,e[9]=0,e[10]=1,e[11]=0,e[12]=0,e[13]=0,e[14]=0,e[15]=1,e}function j(e,t){var r=t[0],n=t[1],i=t[2],a=t[3],s=t[4],o=t[5],l=t[6],u=t[7],h=t[8],c=t[9],p=t[10],f=t[11],d=t[12],y=t[13],m=t[14],g=t[15],x=r*o-n*s,v=r*l-i*s,b=r*u-a*s,w=n*l-i*o,_=n*u-a*o,A=i*u-a*l,D=h*y-c*d,S=h*m-p*d,E=h*g-f*d,F=c*m-p*y,k=c*g-f*y,T=p*g-f*m,I=x*T-v*k+b*F+w*E-_*S+A*D;return I?(I=1/I,e[0]=(o*T-l*k+u*F)*I,e[1]=(i*k-n*T-a*F)*I,e[2]=(y*A-m*_+g*w)*I,e[3]=(p*_-c*A-f*w)*I,e[4]=(l*E-s*T-u*S)*I,e[5]=(r*T-i*E+a*S)*I,e[6]=(m*b-d*A-g*v)*I,e[7]=(h*A-p*b+f*v)*I,e[8]=(s*k-o*E+u*D)*I,e[9]=(n*E-r*k-a*D)*I,e[10]=(d*_-y*b+g*x)*I,e[11]=(c*b-h*_-f*x)*I,e[12]=(o*S-s*F-l*D)*I,e[13]=(r*F-n*S+i*D)*I,e[14]=(y*v-d*w-m*x)*I,e[15]=(h*w-c*v+p*x)*I,e):null}function G(e,t,r){var n=t[0],i=t[1],a=t[2],s=t[3],o=t[4],l=t[5],u=t[6],h=t[7],c=t[8],p=t[9],f=t[10],d=t[11],y=t[12],m=t[13],g=t[14],x=t[15],v=r[0],b=r[1],w=r[2],_=r[3];return e[0]=v*n+b*o+w*c+_*y,e[1]=v*i+b*l+w*p+_*m,e[2]=v*a+b*u+w*f+_*g,e[3]=v*s+b*h+w*d+_*x,v=r[4],b=r[5],w=r[6],_=r[7],e[4]=v*n+b*o+w*c+_*y,e[5]=v*i+b*l+w*p+_*m,e[6]=v*a+b*u+w*f+_*g,e[7]=v*s+b*h+w*d+_*x,v=r[8],b=r[9],w=r[10],_=r[11],e[8]=v*n+b*o+w*c+_*y,e[9]=v*i+b*l+w*p+_*m,e[10]=v*a+b*u+w*f+_*g,e[11]=v*s+b*h+w*d+_*x,v=r[12],b=r[13],w=r[14],_=r[15],e[12]=v*n+b*o+w*c+_*y,e[13]=v*i+b*l+w*p+_*m,e[14]=v*a+b*u+w*f+_*g,e[15]=v*s+b*h+w*d+_*x,e}function X(e,t,r){var n,i,a,s,o,l,u,h,c,p,f,d,y=r[0],m=r[1],g=r[2];return t===e?(e[12]=t[0]*y+t[4]*m+t[8]*g+t[12],e[13]=t[1]*y+t[5]*m+t[9]*g+t[13],e[14]=t[2]*y+t[6]*m+t[10]*g+t[14],e[15]=t[3]*y+t[7]*m+t[11]*g+t[15]):(n=t[0],i=t[1],a=t[2],s=t[3],o=t[4],l=t[5],u=t[6],h=t[7],c=t[8],p=t[9],f=t[10],d=t[11],e[0]=n,e[1]=i,e[2]=a,e[3]=s,e[4]=o,e[5]=l,e[6]=u,e[7]=h,e[8]=c,e[9]=p,e[10]=f,e[11]=d,e[12]=n*y+o*m+c*g+t[12],e[13]=i*y+l*m+p*g+t[13],e[14]=a*y+u*m+f*g+t[14],e[15]=s*y+h*m+d*g+t[15]),e}function Y(e,t,r){var n=r[0],i=r[1],a=r[2];return e[0]=t[0]*n,e[1]=t[1]*n,e[2]=t[2]*n,e[3]=t[3]*n,e[4]=t[4]*i,e[5]=t[5]*i,e[6]=t[6]*i,e[7]=t[7]*i,e[8]=t[8]*a,e[9]=t[9]*a,e[10]=t[10]*a,e[11]=t[11]*a,e[12]=t[12],e[13]=t[13],e[14]=t[14],e[15]=t[15],e}function Z(e,t,r){var n=Math.sin(r),i=Math.cos(r),a=t[4],s=t[5],o=t[6],l=t[7],u=t[8],h=t[9],c=t[10],p=t[11];return t!==e&&(e[0]=t[0],e[1]=t[1],e[2]=t[2],e[3]=t[3],e[12]=t[12],e[13]=t[13],e[14]=t[14],e[15]=t[15]),e[4]=a*i+u*n,e[5]=s*i+h*n,e[6]=o*i+c*n,e[7]=l*i+p*n,e[8]=u*i-a*n,e[9]=h*i-s*n,e[10
vendor: 4,117 bytes, line 1
1]=c*i-o*n,e[11]=p*i-l*n,e}function W(e,t,r){var n=Math.sin(r),i=Math.cos(r),a=t[0],s=t[1],o=t[2],l=t[3],u=t[8],h=t[9],c=t[10],p=t[11];return t!==e&&(e[4]=t[4],e[5]=t[5],e[6]=t[6],e[7]=t[7],e[12]=t[12],e[13]=t[13],e[14]=t[14],e[15]=t[15]),e[0]=a*i-u*n,e[1]=s*i-h*n,e[2]=o*i-c*n,e[3]=l*i-p*n,e[8]=a*n+u*i,e[9]=s*n+h*i,e[10]=o*n+c*i,e[11]=l*n+p*i,e}function H(e,t,r){var n=Math.sin(r),i=Math.cos(r),a=t[0],s=t[1],o=t[2],l=t[3],u=t[4],h=t[5],c=t[6],p=t[7];return t!==e&&(e[8]=t[8],e[9]=t[9],e[10]=t[10],e[11]=t[11],e[12]=t[12],e[13]=t[13],e[14]=t[14],e[15]=t[15]),e[0]=a*i+u*n,e[1]=s*i+h*n,e[2]=o*i+c*n,e[3]=l*i+p*n,e[4]=u*i-a*n,e[5]=h*i-s*n,e[6]=c*i-o*n,e[7]=p*i-l*n,e}function K(e,t){return e[0]=t[0],e[1]=0,e[2]=0,e[3]=0,e[4]=0,e[5]=t[1],e[6]=0,e[7]=0,e[8]=0,e[9]=0,e[10]=t[2],e[11]=0,e[12]=0,e[13]=0,e[14]=0,e[15]=1,e}var J=function(e,t,r,n,i){var a=1/Math.tan(t/2);if(e[0]=a/r,e[1]=0,e[2]=0,e[3]=0,e[4]=0,e[5]=a,e[6]=0,e[7]=0,e[8]=0,e[9]=0,e[11]=-1,e[12]=0,e[13]=0,e[15]=0,null!=i&&i!==1/0){var s=1/(n-i);e[10]=(i+n)*s,e[14]=2*i*n*s}else e[10]=-1,e[14]=-2*n;return e},Q=function(e,t,r,n,i,a,s){var o=1/(t-r),l=1/(n-i),u=1/(a-s);return e[0]=-2*o,e[1]=0,e[2]=0,e[3]=0,e[4]=0,e[5]=-2*l,e[6]=0,e[7]=0,e[8]=0,e[9]=0,e[10]=2*u,e[11]=0,e[12]=(t+r)*o,e[13]=(i+n)*l,e[14]=(s+a)*u,e[15]=1,e};function ee(e,t){return e[0]===t[0]&&e[1]===t[1]&&e[2]===t[2]&&e[3]===t[3]&&e[4]===t[4]&&e[5]===t[5]&&e[6]===t[6]&&e[7]===t[7]&&e[8]===t[8]&&e[9]===t[9]&&e[10]===t[10]&&e[11]===t[11]&&e[12]===t[12]&&e[13]===t[13]&&e[14]===t[14]&&e[15]===t[15]}function et(e,t){var r=e[0],n=e[1],i=e[2],a=e[3],s=e[4],o=e[5],l=e[6],u=e[7],h=e[8],c=e[9],p=e[10],f=e[11],d=e[12],y=e[13],m=e[14],g=e[15],x=t[0],v=t[1],b=t[2],w=t[3],_=t[4],A=t[5],D=t[6],S=t[7],E=t[8],F=t[9],k=t[10],T=t[11],I=t[12],C=t[13],M=t[14],B=t[15];return Math.abs(r-x)<=1e-6*Math.max(1,Math.abs(r),Math.abs(x))&&Math.abs(n-v)<=1e-6*Math.max(1,Math.abs(n),Math.abs(v))&&Math.abs(i-b)<=1e-6*Math.max(1,Math.abs(i),Math.abs(b))&&Math.abs(a-w)<=1e-6*Math.max(1,Math.abs(a),Math.abs(w))&&Math.abs(s-_)<=1e-6*Math.max(1,Math.abs(s),Math.abs(_))&&Math.abs(o-A)<=1e-6*Math.max(1,Math.abs(o),Math.abs(A))&&Math.abs(l-D)<=1e-6*Math.max(1,Math.abs(l),Math.abs(D))&&Math.abs(u-S)<=1e-6*Math.max(1,Math.abs(u),Math.abs(S))&&Math.abs(h-E)<=1e-6*Math.max(1,Math.abs(h),Math.abs(E))&&Math.abs(c-F)<=1e-6*Math.max(1,Math.abs(c),Math.abs(F))&&Math.abs(p-k)<=1e-6*Math.max(1,Math.abs(p),Math.abs(k))&&Math.abs(f-T)<=1e-6*Math.max(1,Math.abs(f),Math.abs(T))&&Math.abs(d-I)<=1e-6*Math.max(1,Math.abs(d),Math.abs(I))&&Math.abs(y-C)<=1e-6*Math.max(1,Math.abs(y),Math.abs(C))&&Math.abs(m-M)<=1e-6*Math.max(1,Math.abs(m),Math.abs(M))&&Math.abs(g-B)<=1e-6*Math.max(1,Math.abs(g),Math.abs(B))}function er(){var e=new L(3);return L!=Float32Array&&(e[0]=0,e[1]=0,e[2]=0),e}function en(e){var t=new L(3);return t[0]=e[0],t[1]=e[1],t[2]=e[2],t}function ei(e){var t=e[0],r=e[1],n=e[2];return Math.sqrt(t*t+r*r+n*n)}function ea(e,t,r){var n=new L(3);return n[0]=e,n[1]=t,n[2]=r,n}function es(e,t,r){return e[0]=t[0]+r[0],e[1]=t[1]+r[1],e[2]=t[2]+r[2],e}function eo(e,t,r){return e[0]=t[0]-r[0],e[1]=t[1]-r[1],e[2]=t[2]-r[2],e}function el(e,t,r){return e[0]=t[0]*r,e[1]=t[1]*r,e[2]=t[2]*r,e}function eu(e,t,r,n){return e[0]=t[0]+r[0]*n,e[1]=t[1]+r[1]*n,e[2]=t[2]+r[2]*n,e}function eh(e,t){var r=t[0]-e[0],n=t[1]-e[1],i=t[2]-e[2];return Math.sqrt(r*r+n*n+i*i)}function ec(e,t){return e[0]=-t[0],e[1]=-t[1],e[2]=-t[2],e}function ep(e,t){var r=t[0],n=t[1],i=t[2],a=r*r+n*n+i*i;return a>0&&(a=1/Math.sqrt(a)),e[0]=t[0]*a,e[1]=t[1]*a,e[2]=t[2]*a,e}function ef(e,t){return e[0]*t[0]+e[1]*t[1]+e[2]*t[2]}function ed(e,t,r){var n=t[0],i=t[1],a=t[2],s=r[0],o=r[1],l=r[2];return e[0]=i*l-a*o,e[1]=a*s-n*l,e[2]=n*o-i*s,e}function ey(e,t,r){var n=t[0],i=t[1],a=t[2],s=r[3]*n+r[7]*i+r[11]*a+r[15];return s||=1,e[0]=(r[0]*n+r[4]*i+r[8]*a+r[12])/s,e[1]=(r[1]*n+r[5]*i+r[9]*a+r[13])/s,e[2]=(r[2]*n+r[6]*i+r[10]*a+r[14])/s,e}function em(e,t,r){var n=t[0],i=t[1],a=t[2];return e[0]=n*r[0]+i*r[3]+a*r[6],e[1]=n*r[1]+i*r[4]+a*r[7],e[2]=n*r[2]+i*r[5]+a*r[8],e}function eg(e,t,r){var n=r[0],i=r[1],a=r[2],s=r[3],o=t[0],l=t[1],u=t[2],h=i*u
1-a*l,c=a*o-n*u,p=n*l-i*o;return h+=h,c+=c,p+=p,e[0]=o+s*h+i*p-a*c,e[1]=l+s*c+a*h-n*p,e[2]=u+s*p+n*c-i*h,e}function ex(e,t,r,n){var i=[],a=[];return i[0]=t[0]-r[0],i[1]=t[1]-r[1],i[2]=t[2]-r[2],a[0]=i[0],a[1]=i[1]*Math.cos(n)-i[2]*Math.sin(n),a[2]=i[1]*Math.sin(n)+i[2]*Math.cos(n),e[0]=a[0]+r[0],e[1]=a[1]+r[1],e[2]=a[2]+r[2],e}function ev(e,t,r,n){var i=[],a=[];return i[0]=t[0]-r[0],i[1]=t[1]-r[1],i[2]=t[2]-r[2],a[0]=i[2]*Math.sin(n)+i[0]*Math.cos(n),a[1]=i[1],a[2]=i[2]*Math.cos(n)-i[0]*Math.sin(n),e[0]=a[0]+r[0],e[1]=a[1]+r[1],e[2]=a[2]+r[2],e}function eb(e,t,r,n){var i=[],a=[];return i[0]=t[0]-r[0],i[1]=t[1]-r[1],i[2]=t[2]-r[2],a[0]=i[0]*Math.cos(n)-i[1]*Math.sin(n),a[1]=i[0]*Math.sin(n)+i[1]*Math.cos(n),a[2]=i[2],e[0]=a[0]+r[0],e[1]=a[1]+r[1],e[2]=a[2]+r[2],e}function ew(e){return e[0]=0,e[1]=0,e[2]=0,e}var e_=eo,eA=ei;function eD(e,t,r){return e[0]=t[0]*r,e[1]=t[1]*r,e[2]=t[2]*r,e[3]=t[3]*r,e}function eS(e,t,r){var n=t[0],i=t[1],a=t[2],s=t[3];return e[0]=r[0]*n+r[4]*i+r[8]*a+r[12]*s,e[1]=r[1]*n+r[5]*i+r[9]*a+r[13]*s,e[2]=r[2]*n+r[6]*i+r[10]*a+r[14]*s,e[3]=r[3]*n+r[7]*i+r[11]*a+r[15]*s,e}er();var eE=function(e,t,r){return e[0]=t[0]*r[0],e[1]=t[1]*r[1],e[2]=t[2]*r[2],e[3]=t[3]*r[3],e};function eF(){var e=new L(4);return L!=Float32Array&&(e[0]=0,e[1]=0,e[2]=0),e[3]=1,e}function ek(e,t,r){var n=t[0],i=t[1],a=t[2],s=t[3],o=r[0],l=r[1],u=r[2],h=r[3];return e[0]=n*h+s*o+i*u-a*l,e[1]=i*h+s*l+a*o-n*u,e[2]=a*h+s*u+n*l-i*o,e[3]=s*h-n*o-i*l-a*u,e}function eT(e,t,r,n){var i,a,s,o,l=t[0],u=t[1],h=t[2],c=t[3],p=r[0],f=r[1],d=r[2],y=r[3],m=l*p+u*f+h*d+c*y;return m<0&&(m=-m,p=-p,f=-f,d=-d,y=-y),1-m>1e-6?(a=Math.sin(i=Math.acos(m)),s=Math.sin((1-n)*i)/a,o=Math.sin(n*i)/a):(s=1-n,o=n),e[0]=s*l+o*p,e[1]=s*u+o*f,e[2]=s*h+o*d,e[3]=s*c+o*y,e}function eI(e,t,r,n){var i=arguments.length>4&&void 0!==arguments[4]?arguments[4]:"zyx",a=Math.PI/360;t*=a,n*=a,r*=a;var s=Math.sin(t),o=Math.cos(t),l=Math.sin(r),u=Math.cos(r),h=Math.sin(n),c=Math.cos(n);switch(i){case"xyz":e[0]=s*u*c+o*l*h,e[1]=o*l*c-s*u*h,e[2]=o*u*h+s*l*c,e[3]=o*u*c-s*l*h;break;case"xzy":e[0]=s*u*c-o*l*h,e[1]=o*l*c-s*u*h,e[2]=o*u*h+s*l*c,e[3]=o*u*c+s*l*h;break;case"yxz":e[0]=s*u*c+o*l*h,e[1]=o*l*c-s*u*h,e[2]=o*u*h-s*l*c,e[3]=o*u*c+s*l*h;break;case"yzx":e[0]=s*u*c+o*l*h,e[1]=o*l*c+s*u*h,e[2]=o*u*h-s*l*c,e[3]=o*u*c-s*l*h;break;case"zxy":e[0]=s*u*c-o*l*h,e[1]=o*l*c+s*u*h,e[2]=o*u*h+s*l*c,e[3]=o*u*c-s*l*h;break;case"zyx":e[0]=s*u*c-o*l*h,e[1]=o*l*c+s*u*h,e[2]=o*u*h-s*l*c,e[3]=o*u*c+s*l*h;break;default:throw Error("Unknown angle order "+i)}return e}cS=new L(4),L!=Float32Array&&(cS[0]=0,cS[1]=0,cS[2]=0,cS[3]=0);var eC=function(e,t,r,n){var i=new L(4);return i[0]=e,i[1]=t,i[2]=r,i[3]=n,i};function eM(){var e=new L(2);return L!=Float32Array&&(e[0]=0,e[1]=0),e}function eB(e,t){var r=new L(2);return r[0]=e,r[1]=t,r}function eP(e,t,r){return e[0]=t[0]*r,e[1]=t[1]*r,e}function ez(e){var t=e[0],r=e[1];return Math.sqrt(t*t+r*r)}function eV(e){return e[0]=0,e[1]=0,e}er(),ea(1,0,0),ea(0,1,0),eF(),eF(),$();var eL=function(e){var t=e[0],r=e[1];return t*t+r*r};eM();let e$=8192;function eO(e,t,r){return t*(e$/(e.tileSize*2**(r-e.tileID.overscaledZ)))}function eR(e){return e instanceof Error?e:Error("string"==typeof e?e:String(e))}function eN(){return new Float64Array(4)}function eU(){return new Float64Array(3)}function eq(){return new Float64Array(16)}function ej(){let e=new Float64Array(16);return q(e),e}function eG(){let e=new Float32Array(16);return q(e),e}function eX(e,t,r,n,i=!1){if(!r[0]&&!r[1])return[0,0];let a=i?"map"===n?-e.bearingInRadians:0:"viewport"===n?e.bearingInRadians:0;if(a){let e=Math.sin(a),t=Math.cos(a);r=[r[0]*t-r[1]*e,r[0]*e+r[1]*t]}return[i?r[0]:eO(t,r[0],e.zoom),i?r[1]:eO(t,r[1],e.zoom)]}function eY(e,t){return e[0]*t[0]+e[1]*t[1]+e[2]*t[2]+e[3]}function eZ(e,t,r){var n,i,a,s,o,l,u,h,c,p;let f=(i=(n=[e[0],e[1],e[2],t[0],t[1],t[2],r[0],r[1],r[2]])[0],a=n[1],s=n[2],o=n[3],l=n[4],u=n[5],h=n[6],c=n[7],i*((p=n[8])*l-u*c)+a*(-p*o+u*h)+s*(c*o-l*h));if(0===f)return null;let d=ed([],[t[0],t[1],t[2]],[r[0],r[1],r[2]]),y=ed([],[r[0],r[1],r[2]],[e[0],e[1],e[2]]),m=ed([],[e[0],e[1],e[2]],[t[0],t[1],t[2]]),g=el([],d,-e[3]);return es(g,g,el([],y,-t[3])),es(g,g,el([],m,-r[3])),el(g,g,1/f),g}function eW(e,t,r){let n=e[0]*r[0]+e[1]*r[1]+e[2]*r[2],i=t[0]*r[0]+t[1]*r[1]+t[2]*r[2];return 0===i?null:(-n-r[3])/i}function eH(e,t,r,n){let i=Math.sqrt(e*e+t*t),a=Math.sqrt(r*r+n*n);e/=i,t/=i;let s=Math.acos(e*(r/=a)+t*(n/=a));return-t*r+e*n>0?s:-s}function eK(e,t){let r=eQ(e,360),n=eQ(t,360),i=n-r,a=n>r?i-360:i+360;return Math.abs(i)<Math.abs(a)?i:a}function eJ(e,t){let r=eQ(e,2*Math.PI),n=eQ(t,2*Math.PI);return Math.min(Math.abs(r-n),Math.abs(r-n+2*Math.PI),Math.abs(r-n-2*Math.PI))}function eQ(e,t){return(e%t+t)%t}
1function e0(e,t,r,n,i){return e1(n,i,e4((e-t)/(r-t),0,1))}function e1(e,t,r){return e*(1-r)+t*r}function e2(e){let t=1/0,r=1/0,n=-1/0,i=-1/0;for(let a of e)t=Math.min(t,a.x),r=Math.min(r,a.y),n=Math.max(n,a.x),i=Math.max(i,a.y);return[t,r,n,i]}function e3(e){if(!e.length)return new Set;let t=Math.max(...e.map(e=>e.canonical.z)),r=1/0,n=-1/0,i=1/0,a=-1/0,s=[];for(let o of e){let{x:e,y:l,z:u}=o.canonical,h=2**(t-u),c=e*h,p=l*h;s.push({id:o,x:c,y:p}),c<r&&(r=c),c>n&&(n=c),p<i&&(i=p),p>a&&(a=p)}let o=new Set;for(let e of s)(e.x===r||e.x===n||e.y===i||e.y===a)&&o.add(e.id);return o}function e5(e,t,r,n){let i,a,s,o,l,u;return i=3*e,a=3*(r-e)-i,s=1-i-a,o=3*t,l=3*(n-t)-o,u=1-o-l,function(e,t=1e-6){if(e<=0)return 0;if(e>=1)return 1;let r=e;for(let n=0;n<8;n++){let n=((s*r+a)*r+i)*r-e;if(Math.abs(n)<t)return((u*r+l)*r+o)*r;let h=(3*s*r+2*a)*r+i;if(1e-6>Math.abs(h))break;r-=n/h}let n=0,h=1;r=e;for(let o=0;o<20;o++){let o=((s*r+a)*r+i)*r;if(Math.abs(o-e)<t)break;e>o?n=r:h=r,r=(n+h)*.5}return((u*r+l)*r+o)*r}}let e6=e5(.25,.1,.25,1);function e4(e,t,r){return Math.min(r,Math.max(t,e))}function e8(e,t,r){let n=r-t,i=((e-t)%n+n)%n+t;return i===t?r:i}function e7(e,...t){for(let r of t)for(let t in r)e[t]=r[t];return e}function e9(e,t){let r={};for(let n of t)n in e&&(r[n]=e[n]);return r}let te=1;function tt(){return te++}function tr(e){return e<=1?1:2**Math.ceil(Math.log(e)/Math.LN2)}function tn(e){return 2**e}function ti(e){return Math.log(e)/Math.LN2}function ta(e,t,r){if(t<=0)return e;let n=1/t;return void 0===r||1e-10>Math.abs(r)?Math.round(e*n)/n:(r>0?Math.ceil(e*n-1e-9):Math.floor(e*n+1e-10))/n}function ts(e,t,r){let n={};for(let i in e)n[i]=t.call(r||this,e[i],i,e);return n}function to(e,t,r){let n={};for(let i in e)t.call(r||this,e[i],i,e)&&(n[i]=e[i]);return n}function tl(e){return Array.isArray(e)?e.map(tl):"object"==typeof e&&e?ts(e,tl):e}let tu={};function th(e){tu[e]||("u">typeof console&&console.warn(e),tu[e]=!0)}function tc(e,t,r){return(r.y-e.y)*(t.x-e.x)>(t.y-e.y)*(r.x-e.x)}function tp(e,t,r,n){let i=t.y-e.y,a=t.x-e.x,s=n.y-r.y,o=n.x-r.x,l=s*a-o*i;if(0===l)return null;let u=(o*(e.y-r.y)-s*(e.x-r.x))/l;return new P(e.x+u*a,e.y+u*i)}function tf([e,t,r]){return t+=90,[e*Math.cos(t*=Math.PI/180)*Math.sin(r*=Math.PI/180),e*Math.sin(t)*Math.sin(r),e*Math.cos(r)]}function td(e){return"u">typeof WorkerGlobalScope&&void 0!==e&&e instanceof WorkerGlobalScope}function ty(e){let t={};if(e.replace(/(?:^|(?:\s*\,\s*))([^\x00-\x20\(\)<>@\,;\:\\"\/\[\]\?\=\{\}\x7F]+)(?:\=(?:([^\x00-\x20\(\)<>@\,;\:\\"\/\[\]\?\=\{\}\x7F]+)|(?:\"((?:[^"\\]|\\.)*)\")))?/g,(e,r,n,i)=>{let a=n||i;return t[r]=!a||a.toLowerCase(),""}),t["max-age"]){let e=parseInt(t["max-age"],10);isNaN(e)?delete t["max-age"]:t["max-age"]=e}return t}let tm=null;function tg(e){if(null==tm){let t=e.navigator?e.navigator.userAgent:null;tm=!!e.safari||!!(t&&(/\b(iPad|iPhone|iPod)\b/.test(t)||t.match("Safari")&&!t.match("Chrome")))}return tm}function tx(e){return"u">typeof ImageBitmap&&e instanceof ImageBitmap}let tv=async(e,t)=>{let r=new Blob([new Uint8Array(e)],{type:"image/png"});try{return createImageBitmap(r,t)}catch(e){throw Error(`Could not load image because of ${eR(e).message}. Please make sure to use a supported image type such as PNG or JPEG. Note that SVGs are not supported.`)}},tb=e=>new Promise((t,r)=>{let n=new Image;n.onload=()=>{t(n),URL.revokeObjectURL(n.src),n.onload=null,window.requestAnimationFrame(()=>n.src="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAEAAAABCAYAAAAfFcSJAAAAC0lEQVQYV2NgAAIAAAUAAarVyFEAAAAASUVORK5CYII=")},n.onerror=()=>r(Error("Could not load image. Please make sure to use a supported image type such as PNG or JPEG. Note that SVGs are not supported."));let i=new Blob([new Uint8Array(e)],{type:"image/png"});n.src=URL.createObjectURL(i)});async function tw(e,t,r,n,i){if(typeof VideoFrame>"u")throw Error("VideoFrame not supported");let a=new VideoFrame(e,{timestamp:0});try{let s,o,l,u=a?.format;if(!u||!(u.startsWith("BGR")||u.startsWith("RGB")))throw Error(`Unrecognized format ${u}`);let h=u.startsWith("BGR"),c=new Uint8ClampedArray(n*i*4);if(await a.copyTo(c,(s=(Math.max(0,r)-r)*n*4+4*Math.max(-t,0),o=Math.max(0,t),l=
1Math.max(0,r),{rect:{x:o,y:l,width:Math.min(e.width,t+n)-o,height:Math.min(e.height,r+i)-l},layout:[{offset:s,stride:4*n}]})),h)for(let e=0;e<c.length;e+=4){let t=c[e];c[e]=c[e+2],c[e+2]=t}return c}finally{a.close()}}function t_(e,t,r,n){return e.addEventListener(t,r,n),{unsubscribe:()=>{e.removeEventListener(t,r,n)}}}function tA(e){return e*Math.PI/180}function tD(e){return e/Math.PI*180}function tS(e,t){return e.roll==t.roll&&e.pitch==t.pitch&&e.bearing==t.bearing}function tE(e){var t,r,n,i,a,s,o,l,u,h,c,p,f,d,y,m;let g=new Float64Array(9);t=e[0],r=e[1],n=e[2],i=e[3],a=t+t,s=r+r,o=n+n,l=t*a,u=r*a,h=r*s,c=n*a,p=n*s,f=n*o,d=i*a,y=i*s,m=i*o,g[0]=1-h-f,g[3]=u-m,g[6]=c+y,g[1]=u+m,g[4]=1-l-f,g[7]=p-d,g[2]=c-y,g[5]=p+d,g[8]=1-l-h;let x=tD(-Math.asin(e4(g[2],-1,1))),v,b;return .001>Math.hypot(g[5],g[8])?(v=0,b=-tD(Math.atan2(g[3],g[4]))):(v=tD(0===g[5]&&0===g[8]?0:Math.atan2(g[5],g[8])),b=tD(0===g[1]&&0===g[0]?0:Math.atan2(g[1],g[0]))),{roll:v,pitch:x+90,bearing:b}}function tF(e,t,r){let n=eB(t.x-r.x,t.y-r.y),i=eB(e.x-r.x,e.y-r.y);return tD(Math.atan2(n[0]*i[1]-n[1]*i[0],n[0]*i[0]+n[1]*i[1]))}function tk(e,t,r){let n=new Float64Array(4);return eI(n,e,t-90,r),n}let tT=85.051129,tI={touchstart:!0,touchmove:!0,touchmoveWindow:!0,touchend:!0,touchcancel:!0},tC={dblclick:!0,click:!0,mouseover:!0,mouseout:!0,mousedown:!0,mousemove:!0,mousemoveWindow:!0,mouseup:!0,mouseupWindow:!0,contextmenu:!0,wheel:!0};function tM(e,t){return tI[t]&&"touches"in e}function tB(e,t){if(!tC[t])return!1;let r=e?.target?.ownerDocument?.defaultView||window;return e instanceof r.MouseEvent||e instanceof r.WheelEvent}function tP(e){return tI[e]||tC[e]}let tz="AbortError";var tV=class extends Error{constructor(e=tz){super(e instanceof Error?e.message:e),this.name=tz,e instanceof Error&&e.stack&&(this.stack=e.stack)}};function tL(e){return e instanceof Error&&"AbortError"===e.name}function t$(e){if(e.aborted)throw new tV(e.reason)}let tO={MAX_PARALLEL_IMAGE_REQUESTS:16,MAX_PARALLEL_IMAGE_REQUESTS_PER_FRAME:8,MAX_TILE_CACHE_ZOOM_LEVELS:5,REGISTERED_PROTOCOLS:{},WORKER_URL:""};function tR(e){return tO.REGISTERED_PROTOCOLS[e.substring(0,e.indexOf("://"))]}let tN="global-dispatcher";var tU=class extends Error{constructor(e,t,r,n){super(`AJAXError: ${t} (${e}): ${r}`),this.status=e,this.statusText=t,this.url=r,this.body=n}};function tq(){if(td(self))return self.worker?.referrer;if("blob:"===window.location.protocol)try{return window.parent.location.href}catch{}return window.location.href}async function tj(e,t){let r,n,i=new Request(e.url,{method:e.method||"GET",body:e.body,credentials:e.credentials,headers:e.headers,cache:e.cache,referrer:tq(),referrerPolicy:e.referrerPolicy,signal:t.signal});"json"!==e.type||i.headers.has("Accept")||i.headers.set("Accept","application/json");try{r=await fetch(i)}catch(t){throw tL(t)?t:new tU(0,eR(t).message,e.url,new Blob)}if(!r.ok){let t=await r.blob();throw new tU(r.status,r.statusText,e.url,t)}n="arrayBuffer"===e.type||"image"===e.type?r.arrayBuffer():"json"===e.type?r.json():r.text();let a=await n;return t$(t.signal),{data:a,cacheControl:r.headers.get("Cache-Control"),expires:r.headers.get("Expires"),etag:r.headers.get("ETag")}}let tG=async function(e,t){let r;if(e.url.includes("://")&&!/^https?:|^file:/.test(e.url)){let r=tR(e.url);if(r){let n=await r(e,t);return n.data||"arrayBuffer"!==e.type?n:e7(n,{data:new ArrayBuffer(0)})}if(td(self)&&self.worker?.actor)return self.worker.actor.sendAsync({type:"GR",data:e,targetMapId:tN},t)}if(!((r=e.url).startsWith("file:")||tq()?.startsWith("file:")&&!/^\w+:/.test(r))){if(fetch&&Request&&AbortController&&Object.hasOwn(Request.prototype,"signal"))return tj(e,t);if(td(self)&&self.worker?.actor)return self.worker.actor.sendAsync({type:"GR",data:e,mustQueue:!0,targetMapId:tN},t)}return new Promise((r,n)=>{let i=new XMLHttpRequest;for(let t in i.open(e.method||"GET",e.url,!0),("arrayBuffer"===e.type||"image"===e.type)&&(i.responseType="arraybuffer"),e.headers)i.setRequestHeader(t,e.headers[t]);"json"===e.type&&(i.responseType="text",e.headers?.Accept||i.setRequestHeader("Accept","application/json")),i.withCredentials="include"===e.credentials,i.onerror=()=>{n(Error(i.statusText))},i.onload=()=>
1{if(!t.signal.aborted)if((i.status>=200&&i.status<300||0===i.status)&&null!==i.response){let t=i.response;if("json"===e.type)try{t=JSON.parse(i.response)}catch(e){n(e);return}r({data:t,cacheControl:i.getResponseHeader("Cache-Control"),expires:i.getResponseHeader("Expires"),etag:i.getResponseHeader("ETag")})}else{let t=new Blob([i.response],{type:i.getResponseHeader("Content-Type")});n(new tU(i.status,i.statusText,e.url,t))}},t.signal.addEventListener("abort",()=>{i.abort(),n(new tV(t.signal.reason))}),i.send(e.body)})},tX=(e,t)=>tG(e7(e,{type:"json"}),t),tY=(e,t)=>tG(e7(e,{type:"arrayBuffer"}),t);function tZ(e){if(!e||e.startsWith("data:image/"))return!0;if(e.startsWith("blob:")&&(e=e.slice(5)).startsWith("null"))return!1;if(0>=e.indexOf("://"))return!0;let t=new URL(e),r=window.location;return t.protocol===r.protocol&&t.host===r.host}let tW=e=>{let t=window.document.createElement("video");return t.muted=!0,new Promise(r=>{for(let n of(t.onloadstart=()=>{r(t)},e)){let e=window.document.createElement("source");tZ(n)||(t.crossOrigin="Anonymous"),e.src=n,t.appendChild(e)}})};function tH(e,t,r){r[e]?.includes(t)||(r[e]||=[],r[e].push(t))}function tK(e,t,r){if(r?.[e]){let n=r[e].indexOf(t);-1!==n&&r[e].splice(n,1)}}var tJ=class{constructor(e,t={}){e7(this,t),this.type=e}},tQ=class extends tJ{constructor(e,t={}){super("error",e7({error:e},t))}},t0=class{on(e,t){return this._listeners||={},tH(e,t,this._listeners),{unsubscribe:()=>{this.off(e,t)}}}off(e,t){return tK(e,t,this._listeners),tK(e,t,this._oneTimeListeners),this}once(e,t){return t?(this._oneTimeListeners||={},tH(e,t,this._oneTimeListeners),this):new Promise(t=>this.once(e,t))}fire(e,t){let r="string"==typeof e?new tJ(e,t||{}):e,n=r.type;if(this.listens(n)){for(let e of(r.target=this,this._listeners?.[n]?.slice()??[]))e.call(this,r);for(let e of this._oneTimeListeners?.[n]?.slice()??[])tK(n,e,this._oneTimeListeners),e.call(this,r);let e=this._eventedParent;e&&(e7(r,"function"==typeof this._eventedParentData?this._eventedParentData():this._eventedParentData),e.fire(r))}else r instanceof tQ&&console.error(r.error);return this}listens(e){return!!(this._listeners?.[e]?.length||this._oneTimeListeners?.[e]?.length||this._eventedParent?.listens(e))}setEventedParent(e,t){return this._eventedParent=e,this._eventedParentData=t,this}},t1={$version:8,$root:{version:{required:!0,type:"enum",values:[8]},name:{type:"string"},metadata:{type:"*"},center:{type:"array",value:"number",length:2},centerAltitude:{type:"number"},zoom:{type:"number"},bearing:{type:"number",default:0,period:360,units:"degrees"},pitch:{type:"number",default:0,units:"degrees"},roll:{type:"number",default:0,units:"degrees"},state:{type:"state",default:{}},light:{type:"light"},sky:{type:"sky"},projection:{type:"projection"},terrain:{type:"terrain"},sources:{required:!0,type:"sources"},sprite:{type:"sprite"},glyphs:{type:"string"},"font-faces":{type:"fontFaces"},transition:{type:"transition"},layers:{required:!0,type:"array",value:"layer"}},sources:{"*":{type:"source"}},source:["source_vector","source_raster","source_raster_dem","source_geojson","source_video","source_image"],source_vector:{type:{required:!0,type:"enum",values:{vector:{}}},url:{type:"string"},tiles:{type:"array",value:"string"},bounds:{type:"array",value:"number",length:4,default:[-180,-85.051129,180,85.051129]},scheme:{type:"enum",values:{xyz:{},tms:{}},default:"xyz"},minzoom:{type:"number",default:0},maxzoom:{type:"number",default:22},attribution:{type:"string"},promoteId:{type:"promoteId"},volatile:{type:"boolean",default:!1},encoding:{type:"enum",values:{mvt:{},mlt:{}},default:"mvt"},"*":{type:"*"}},source_raster:{type:{required:!0,type:"enum",values:{raster:{}}},url:{type:"string"},tiles:{type:"array",value:"string"},bounds:{type:"array",value:"number",length:4,default:[-180,-85.051129,180,85.051129]},minzoom:{type:"number",default:0},maxzoom:{type:"number",default:22},tileSize:{type:"number",default:512,units:"pixels"},scheme:{type:"enum",values:{xyz:{},tms:{}},default:"xyz"},attribution:{type:"string"},volatile:{type:"boolean",default:!1},"*":{type:"*"}},source_raster_dem:{type:{required:!0,type:"enum",values:{"raster-dem":{}}},url:{type:"string"},tiles:{type:"array",value:"string"},bounds:{type:"array",value:"number",length:4,default:[-180,-85.051129,180,85.051129]},minzoom:{type:"number",default:0},maxzoom:{type:"number",default:22},tileSize:{type:"number",default:512,units:"pixels"},attribution:{type:"string"},encoding:{type:"enum",values:{terrarium:{},mapbox:{},custom:{}},default:"mapbox"},redFactor:{type:"number",default:1},blueFactor:{type:"number",default:1},greenFactor:{type:"number",default:1},baseShift:{type:"number",default:0},volatile:{type:"boolean",default:!1},"*":{type:"*"}},source_geojson:{type:{required:!0,type:"enum",values:{geojson:{}}},data:{required:!0,type:"*"},maxzoom:{type:"number",default:18},attribution:{type:"string"},buffer:{type:"number",default:128,maximum:512,minimum:0},filter:{type:"filter"},tolerance:{type:"number",default:.375},cluster:{type:"boolean",default:!1},clusterRadius:{type:"number",default:50,minimum:0}
vendor: 5,096 bytes, line 1
1,clusterMaxZoom:{type:"number"},clusterMinPoints:{type:"number"},clusterProperties:{type:"*"},lineMetrics:{type:"boolean",default:!1},generateId:{type:"boolean",default:!1},promoteId:{type:"promoteId"}},source_video:{type:{required:!0,type:"enum",values:{video:{}}},urls:{required:!0,type:"array",value:"string"},coordinates:{required:!0,type:"array",length:4,value:{type:"array",length:2,value:"number"}}},source_image:{type:{required:!0,type:"enum",values:{image:{}}},url:{type:"string"},coordinates:{required:!0,type:"array",length:4,value:{type:"array",length:2,value:"number"}}},layer:{id:{type:"string",required:!0},type:{type:"enum",values:{fill:{},line:{},symbol:{},circle:{},heatmap:{},"fill-extrusion":{},raster:{},hillshade:{},"color-relief":{},background:{}},required:!0},metadata:{type:"*"},source:{type:"string"},"source-layer":{type:"string"},minzoom:{type:"number",minimum:0,maximum:24},maxzoom:{type:"number",minimum:0,maximum:24},filter:{type:"filter"},layout:{type:"layout"},paint:{type:"paint"}},layout:["layout_fill","layout_line","layout_circle","layout_heatmap","layout_fill-extrusion","layout_symbol","layout_raster","layout_hillshade","layout_color-relief","layout_background"],layout_background:{visibility:{type:"enum",values:{visible:{},none:{}},default:"visible",expression:{interpolated:!1,parameters:["global-state"]},"property-type":"data-constant"}},layout_fill:{"fill-sort-key":{type:"number",expression:{interpolated:!1,parameters:["zoom","feature"]},"property-type":"data-driven"},visibility:{type:"enum",values:{visible:{},none:{}},default:"visible",expression:{interpolated:!1,parameters:["global-state"]},"property-type":"data-constant"}},layout_circle:{"circle-sort-key":{type:"number",expression:{interpolated:!1,parameters:["zoom","feature"]},"property-type":"data-driven"},visibility:{type:"enum",values:{visible:{},none:{}},default:"visible",expression:{interpolated:!1,parameters:["global-state"]},"property-type":"data-constant"}},layout_heatmap:{visibility:{type:"enum",values:{visible:{},none:{}},default:"visible",expression:{interpolated:!1,parameters:["global-state"]},"property-type":"data-constant"}},"layout_fill-extrusion":{visibility:{type:"enum",values:{visible:{},none:{}},default:"visible",expression:{interpolated:!1,parameters:["global-state"]},"property-type":"data-constant"},"fill-extrusion-rounded-corner-distance":{type:"number",default:0,minimum:0,units:"meters","property-type":"constant"}},layout_line:{"line-cap":{type:"enum",values:{butt:{},round:{},square:{}},default:"butt",expression:{interpolated:!1,parameters:["zoom","feature"]},"property-type":"data-driven"},"line-join":{type:"enum",values:{bevel:{},round:{},miter:{}},default:"miter",expression:{interpolated:!1,parameters:["zoom","feature"]},"property-type":"data-driven"},"line-miter-limit":{type:"number",default:2,requires:[{"line-join":"miter"}],expression:{interpolated:!0,parameters:["zoom","feature"]},"property-type":"data-driven"},"line-round-limit":{type:"number",default:1.05,requires:[{"line-join":"round"}],expression:{interpolated:!0,parameters:["zoom","feature"]},"property-type":"data-driven"},"line-sort-key":{type:"number",expression:{interpolated:!1,parameters:["zoom","feature"]},"property-type":"data-driven"},visibility:{type:"enum",values:{visible:{},none:{}},default:"visible",expression:{interpolated:!1,parameters:["global-state"]},"property-type":"data-constant"}},layout_symbol:{"symbol-placement":{type:"enum",values:{point:{},line:{},"line-center":{}},default:"point",expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"symbol-spacing":{type:"number",default:250,minimum:1,units:"pixels",requires:[{"symbol-placement":"line"}],expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"symbol-avoid-edges":{type:"boolean",default:!1,expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"symbol-sort-key":{type:"number",expression:{interpolated:!1,parameters:["zoom","feature"]},"property-type":"data-driven"},"symbol-z-order":{type:"enum",values:{auto:{},"viewport-y":{},source:{}},default:"auto",expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"icon-allow-overlap":{type:"boolean",default:!1,requires:["icon-image",{"!":"icon-overlap"}],expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"icon-overlap":{type:"enum",values:{never:{},always:{},cooperative:{}},requires:["icon-image"],expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"icon-ignore-placement":{type:"boolean",default:!1,requires:["icon-image"],expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"icon-optional":{type:"boolean",default:!1,requires:["icon-image","text-field"],expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"icon-rotation-alignment":{type:"enum",values:{map:{},viewport:{},auto:{}},default:"auto",requires:["icon-image"],expression:{interpolated:!1,parameters:["zoom","feature"]},"property-type":"data-driven
vendor: 5,116 bytes, line 1
1"},"icon-size":{type:"number",default:1,minimum:0,units:"factor of the original icon size",requires:["icon-image"],expression:{interpolated:!0,parameters:["zoom","feature"]},"property-type":"data-driven"},"icon-text-fit":{type:"enum",values:{none:{},width:{},height:{},both:{}},default:"none",requires:["icon-image","text-field"],expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"icon-text-fit-padding":{type:"array",value:"number",length:4,default:[0,0,0,0],units:"pixels",requires:["icon-image","text-field",{"icon-text-fit":["both","width","height"]}],expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"icon-image":{type:"resolvedImage",tokens:!0,expression:{interpolated:!1,parameters:["zoom","feature"]},"property-type":"data-driven"},"icon-rotate":{type:"number",default:0,period:360,units:"degrees",requires:["icon-image"],expression:{interpolated:!0,parameters:["zoom","feature"]},"property-type":"data-driven"},"icon-padding":{type:"padding",default:[2],units:"pixels",requires:["icon-image"],expression:{interpolated:!0,parameters:["zoom","feature"]},"property-type":"data-driven"},"icon-keep-upright":{type:"boolean",default:!1,requires:["icon-image",{"icon-rotation-alignment":"map"},{"symbol-placement":["line","line-center"]}],expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"icon-offset":{type:"array",value:"number",length:2,default:[0,0],requires:["icon-image"],expression:{interpolated:!0,parameters:["zoom","feature"]},"property-type":"data-driven"},"icon-anchor":{type:"enum",values:{center:{},left:{},right:{},top:{},bottom:{},"top-left":{},"top-right":{},"bottom-left":{},"bottom-right":{}},default:"center",requires:["icon-image"],expression:{interpolated:!1,parameters:["zoom","feature"]},"property-type":"data-driven"},"icon-pitch-alignment":{type:"enum",values:{map:{},viewport:{},auto:{}},default:"auto",requires:["icon-image"],expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"text-pitch-alignment":{type:"enum",values:{map:{},viewport:{},auto:{}},default:"auto",requires:["text-field"],expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"text-rotation-alignment":{type:"enum",values:{map:{},viewport:{},"viewport-glyph":{},auto:{}},default:"auto",requires:["text-field"],expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"text-field":{type:"formatted",default:"",tokens:!0,expression:{interpolated:!1,parameters:["zoom","feature"]},"property-type":"data-driven"},"text-font":{type:"array",value:"string",default:["Open Sans Regular","Arial Unicode MS Regular"],requires:["text-field"],expression:{interpolated:!1,parameters:["zoom","feature"]},"property-type":"data-driven"},"text-size":{type:"number",default:16,minimum:0,units:"pixels",requires:["text-field"],expression:{interpolated:!0,parameters:["zoom","feature"]},"property-type":"data-driven"},"text-max-width":{type:"number",default:10,minimum:0,units:"ems",requires:["text-field"],expression:{interpolated:!0,parameters:["zoom","feature"]},"property-type":"data-driven"},"text-line-height":{type:"number",default:1.2,units:"ems",requires:["text-field"],expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"text-letter-spacing":{type:"number",default:0,units:"ems",requires:["text-field"],expression:{interpolated:!0,parameters:["zoom","feature"]},"property-type":"data-driven"},"text-justify":{type:"enum",values:{auto:{},left:{},center:{},right:{}},default:"center",requires:["text-field"],expression:{interpolated:!1,parameters:["zoom","feature"]},"property-type":"data-driven"},"text-radial-offset":{type:"number",units:"ems",default:0,requires:["text-field"],"property-type":"data-driven",expression:{interpolated:!0,parameters:["zoom","feature"]}},"text-variable-anchor":{type:"array",value:"enum",values:{center:{},left:{},right:{},top:{},bottom:{},"top-left":{},"top-right":{},"bottom-left":{},"bottom-right":{}},requires:["text-field",{"symbol-placement":["point"]}],expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"text-variable-anchor-offset":{type:"variableAnchorOffsetCollection",requires:["text-field",{"symbol-placement":["point"]}],expression:{interpolated:!0,parameters:["zoom","feature"]},"property-type":"data-driven"},"text-anchor":{type:"enum",values:{center:{},left:{},right:{},top:{},bottom:{},"top-left":{},"top-right":{},"bottom-left":{},"bottom-right":{}},default:"center",requires:["text-field",{"!":"text-variable-anchor"}],expression:{interpolated:!1,parameters:["zoom","feature"]},"property-type":"data-driven"},"text-max-angle":{type:"number",default:45,units:"degrees",requires:["text-field",{"symbol-placement":["line","line-center"]}],expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"text-writing-mode":{type:"array",value:"enum",values:{horizontal:{},vertical:{}},requires:["text-field",{"symbol-placement":["point"]}],expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"}
vendor: 6,055 bytes, line 1
1,"text-rotate":{type:"number",default:0,period:360,units:"degrees",requires:["text-field"],expression:{interpolated:!0,parameters:["zoom","feature"]},"property-type":"data-driven"},"text-padding":{type:"number",default:2,minimum:0,units:"pixels",requires:["text-field"],expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"text-keep-upright":{type:"boolean",default:!0,requires:["text-field",{"text-rotation-alignment":"map"},{"symbol-placement":["line","line-center"]}],expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"text-transform":{type:"enum",values:{none:{},uppercase:{},lowercase:{}},default:"none",requires:["text-field"],expression:{interpolated:!1,parameters:["zoom","feature"]},"property-type":"data-driven"},"text-offset":{type:"array",value:"number",units:"ems",length:2,default:[0,0],requires:["text-field",{"!":"text-radial-offset"}],expression:{interpolated:!0,parameters:["zoom","feature"]},"property-type":"data-driven"},"text-allow-overlap":{type:"boolean",default:!1,requires:["text-field",{"!":"text-overlap"}],expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"text-overlap":{type:"enum",values:{never:{},always:{},cooperative:{}},requires:["text-field"],expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"text-ignore-placement":{type:"boolean",default:!1,requires:["text-field"],expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"text-optional":{type:"boolean",default:!1,requires:["text-field","icon-image"],expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"symbol-height-offset":{type:"number",default:0,units:"meters",requires:[{"symbol-placement":["point"]}],expression:{interpolated:!0,parameters:["zoom","feature"]},"property-type":"data-driven"},"symbol-height-anchor":{type:"enum",values:{ground:{},absolute:{}},default:"ground",requires:["symbol-height-offset"],expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},visibility:{type:"enum",values:{visible:{},none:{}},default:"visible",expression:{interpolated:!1,parameters:["global-state"]},"property-type":"data-constant"}},layout_raster:{visibility:{type:"enum",values:{visible:{},none:{}},default:"visible",expression:{interpolated:!1,parameters:["global-state"]},"property-type":"data-constant"}},layout_hillshade:{visibility:{type:"enum",values:{visible:{},none:{}},default:"visible",expression:{interpolated:!1,parameters:["global-state"]},"property-type":"data-constant"}},"layout_color-relief":{visibility:{type:"enum",values:{visible:{},none:{}},default:"visible",expression:{interpolated:!1,parameters:["global-state"]},"property-type":"data-constant"}},filter:{type:"boolean",expression:{interpolated:!1,parameters:["zoom","feature"]},"property-type":"data-driven"},filter_operator:{type:"enum",values:{"==":{},"!=":{},">":{},">=":{},"<":{},"<=":{},in:{},"!in":{},all:{},any:{},none:{},has:{},"!has":{}}},geometry_type:{type:"enum",values:{Point:{},LineString:{},Polygon:{}}},function:{expression:{type:"expression"},stops:{type:"array",value:"function_stop"},base:{type:"number",default:1,minimum:0},property:{type:"string",default:"$zoom"},type:{type:"enum",values:{identity:{},exponential:{},interval:{},categorical:{}},default:"exponential"},colorSpace:{type:"enum",values:{rgb:{},lab:{},hcl:{}},default:"rgb"},default:{type:"*",required:!1}},function_stop:{type:"array",minimum:0,maximum:24,value:["number","color"],length:2},expression:{type:"array",value:"expression_name",minimum:1},light:{anchor:{type:"enum",default:"viewport",values:{map:{},viewport:{}},"property-type":"data-constant",transition:!1,expression:{interpolated:!1,parameters:["zoom"]}},position:{type:"array",default:[1.15,210,30],length:3,value:"number","property-type":"data-constant",transition:!0,expression:{interpolated:!0,parameters:["zoom"]}},color:{type:"color","property-type":"data-constant",default:"#ffffff",expression:{interpolated:!0,parameters:["zoom"]},transition:!0},intensity:{type:"number","property-type":"data-constant",default:.5,minimum:0,maximum:1,expression:{interpolated:!0,parameters:["zoom"]},transition:!0}},sky:{"sky-color":{type:"color","property-type":"data-constant",default:"#88C6FC",expression:{interpolated:!0,parameters:["zoom"]},transition:!0},"horizon-color":{type:"color","property-type":"data-constant",default:"#ffffff",expression:{interpolated:!0,parameters:["zoom"]},transition:!0},"fog-color":{type:"color","property-type":"data-constant",default:"#ffffff",expression:{interpolated:!0,parameters:["zoom"]},transition:!0},"fog-ground-blend":{type:"number","property-type":"data-constant",default:.5,minimum:0,maximum:1,expression:{interpolated:!0,parameters:["zoom"]},transition:!0},"horizon-fog-blend":{type:"number","property-type":"data-constant",default:.8,minimum:0,maximum:1,expression:{interpolated:!0,parameters:["zoom"]},transition:!0},"sky-horizon-blend":{type:"number","property-type":"data-constant",default:.8,minimum:0,maximum:1,expression:{interpolated:!0,parameters:["zoom"]},transition:!0},"atmosphere-blend":{type:"number","property-type":"data-constant",default:.8,minimum:0,maximum:1,expression:{interpolated:!0,parameters:["zoom"]},transition:!0}},terrain:{source:{type:"string",required:!0},exaggeration:{type:"number",minimum:0,default:1}},projection:{type:{type:"projectionDefinition",default:"mercator","property-type":"data-constant",transition:!1,expression:{interpolated:!0,parameters:["zoom"]}}},paint:["paint_fill","paint_line","paint_circle","paint_heatmap","paint_fill-extrusion","paint_symbol","paint_raster","paint_hillshade","paint_color-relief","paint_background"],paint_fill:{"fill-antialias":{type:"boolean",default:!0,expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"fill-opacity":{type:"number",default:1,minimum:0,maximum:1,transition:!0,expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"}
vendor: 15,712 bytes, line 1
1,"fill-layer-opacity":{type:"number",default:1,minimum:0,maximum:1,transition:!0,expression:{interpolated:!0,parameters:["zoom","global-state"]},"property-type":"data-constant"},"fill-color":{type:"color",default:"#000000",transition:!0,expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"fill-outline-color":{type:"color",transition:!0,requires:[{"!":"fill-pattern"},{"fill-antialias":!0}],expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"fill-translate":{type:"array",value:"number",length:2,default:[0,0],transition:!0,units:"pixels",expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"fill-translate-anchor":{type:"enum",values:{map:{},viewport:{}},default:"map",requires:["fill-translate"],expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"fill-pattern":{type:"resolvedImage",transition:!0,expression:{interpolated:!1,parameters:["zoom","feature"]},"property-type":"cross-faded-data-driven"}},"paint_fill-extrusion":{"fill-extrusion-opacity":{type:"number",default:1,minimum:0,maximum:1,transition:!0,expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"fill-extrusion-color":{type:"color",default:"#000000",transition:!0,requires:[{"!":"fill-extrusion-pattern"}],expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"fill-extrusion-translate":{type:"array",value:"number",length:2,default:[0,0],transition:!0,units:"pixels",expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"fill-extrusion-translate-anchor":{type:"enum",values:{map:{},viewport:{}},default:"map",requires:["fill-extrusion-translate"],expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"fill-extrusion-pattern":{type:"resolvedImage",transition:!0,expression:{interpolated:!1,parameters:["zoom","feature"]},"property-type":"cross-faded-data-driven"},"fill-extrusion-height":{type:"number",default:0,minimum:0,units:"meters",transition:!0,expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"fill-extrusion-base":{type:"number",default:0,minimum:0,units:"meters",transition:!0,requires:["fill-extrusion-height"],expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"fill-extrusion-vertical-gradient":{type:"boolean",default:!0,transition:!1,expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"}},paint_line:{"line-opacity":{type:"number",default:1,minimum:0,maximum:1,transition:!0,expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"line-layer-opacity":{type:"number",default:1,minimum:0,maximum:1,transition:!0,expression:{interpolated:!0,parameters:["zoom","global-state"]},"property-type":"data-constant"},"line-color":{type:"color",default:"#000000",transition:!0,requires:[{"!":"line-pattern"}],expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"line-translate":{type:"array",value:"number",length:2,default:[0,0],transition:!0,units:"pixels",expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"line-translate-anchor":{type:"enum",values:{map:{},viewport:{}},default:"map",requires:["line-translate"],expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"line-width":{type:"number",default:1,minimum:0,transition:!0,units:"pixels",expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"line-gap-width":{type:"number",default:0,minimum:0,transition:!0,units:"pixels",expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"line-offset":{type:"number",default:0,transition:!0,units:"pixels",expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"line-blur":{type:"number",default:0,minimum:0,transition:!0,units:"pixels",expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"line-dasharray":{type:"array",value:"number",minimum:0,transition:!0,units:"line widths",requires:[{"!":"line-pattern"}],expression:{interpolated:!1,parameters:["zoom","feature"]},"property-type":"cross-faded-data-driven"},"line-pattern":{type:"resolvedImage",transition:!0,expression:{interpolated:!1,parameters:["zoom","feature"]},"property-type":"cross-faded-data-driven"},"line-gradient":{type:"color",transition:!1,requires:[{"!":"line-dasharray"},{"!":"line-pattern"},{source:"geojson",has:{lineMetrics:!0}}],expression:{interpolated:!0,parameters:["line-progress"]},"property-type":"color-ramp"}},paint_circle:{"circle-radius":{type:"number",default:5,minimum:0,transition:!0,units:"pixels",expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"circle-color":{type:"color",default:"#000000",transition:!0,expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"circle-blur":{type:"number",default:0,transition:!0,expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"circle-opacity":{type:"number",default:1,minimum:0,maximum:1,transition:!0,expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"circle-translate":{type:"array",value:"number",length:2,default:[0,0],transition:!0,units:"pixels",expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"circle-translate-anchor":{type:"enum",values:{map:{},viewport:{}},default:"map",requires:["circle-translate"],expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"circle-pitch-scale":{type:"enum",values:{map:{},viewport:{}},default:"map",expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"circle-pitch-alignment":{type:"enum",values:{map:{},viewport:{}},default:"viewport",expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"circle-stroke-width":{type:"number",default:0,minimum:0,transition:!0,units:"pixels",expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"circle-stroke-color":{type:"color",default:"#000000",transition:!0,expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"circle-stroke-opacity":{type:"number",default:1,minimum:0,maximum:1,transition:!0,expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"}},paint_heatmap:{"heatmap-radius":{type:"number",default:30,minimum:1,transition:!0,units:"pixels",expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"heatmap-weight":{type:"number",default:1,minimum:0,transition:!1,expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"heatmap-intensity":{type:"number",default:1,minimum:0,transition:!0,expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"heatmap-color":{type:"color",default:["interpolate",["linear"],["heatmap-density"],0,"rgba(0, 0, 255, 0)",.1,"royalblue",.3,"cyan",.5,"lime",.7,"yellow",1,"red"],transition:!1,expression:{interpolated:!0,parameters:["heatmap-density"]},"property-type":"color-ramp"},"heatmap-opacity":{type:"number",default:1,minimum:0,maximum:1,transition:!0,expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"}},paint_symbol:{"icon-opacity":{type:"number",default:1,minimum:0,maximum:1,transition:!0,requires:["icon-image"],expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"icon-color":{type:"color",default:"#000000",transition:!0,requires:["icon-image"],expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"icon-halo-color":{type:"color",default:"rgba(0, 0, 0, 0)",transition:!0,requires:["icon-image"],expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"icon-halo-width":{type:"number",default:0,minimum:0,transition:!0,units:"pixels",requires:["icon-image"],expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"icon-halo-blur":{type:"number",default:0,minimum:0,transition:!0,units:"pixels",requires:["icon-image"],expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"icon-translate":{type:"array",value:"number",length:2,default:[0,0],transition:!0,units:"pixels",requires:["icon-image"],expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"icon-translate-anchor":{type:"enum",values:{map:{},viewport:{}},default:"map",requires:["icon-image","icon-translate"],expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"text-opacity":{type:"number",default:1,minimum:0,maximum:1,transition:!0,requires:["text-field"],expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"text-color":{type:"color",default:"#000000",transition:!0,overridable:!0,requires:["text-field"],expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"text-halo-color":{type:"color",default:"rgba(0, 0, 0, 0)",transition:!0,requires:["text-field"],expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"text-halo-width":{type:"number",default:0,minimum:0,transition:!0,units:"pixels",requires:["text-field"],expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"text-halo-blur":{type:"number",default:0,minimum:0,transition:!0,units:"pixels",requires:["text-field"],expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"text-translate":{type:"array",value:"number",length:2,default:[0,0],transition:!0,units:"pixels",requires:["text-field"],expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"text-translate-anchor":{type:"enum",values:{map:{},viewport:{}},default:"map",requires:["text-field","text-translate"],expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"}},paint_raster:{"raster-opacity":{type:"number",default:1,minimum:0,maximum:1,transition:!0,expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"raster-hue-rotate":{type:"number",default:0,period:360,transition:!0,units:"degrees",expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"raster-brightness-min":{type:"number",default:0,minimum:0,maximum:1,transition:!0,expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"raster-brightness-max":{type:"number",default:1,minimum:0,maximum:1,transition:!0,expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"raster-saturation":{type:"number",default:0,minimum:-1,maximum:1,transition:!0,expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"raster-contrast":{type:"number",default:0,minimum:-1,maximum:1,transition:!0,expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},resampling:{type:"enum",values:{linear:{},nearest:{}},default:"linear",expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"raster-resampling":{type:"enum",values:{linear:{},nearest:{}},default:"linear",expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"raster-fade-duration":{type:"number",default:300,minimum:0,transition:!1,units:"milliseconds",expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"}},paint_hillshade:{"hillshade-illumination-direction":{type:"numberArray",default:335,minimum:0,maximum:359,transition:!1,expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"hillshade-illumination-altitude":{type:"numberArray",default:45,minimum:0,maximum:90,transition:!1,expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"hillshade-illumination-anchor":{type:"enum",values:{map:{},viewport:{}},default:"viewport",expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"hillshade-exaggeration":{type:"number",default:.5,minimum:0,maximum:1,transition:!0,expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"hillshade-shadow-color":{type:"colorArray",default:"#000000",transition:!0,expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"hillshade-highlight-color":{type:"colorArray",default:"#FFFFFF",transition:!0,expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"hillshade-accent-color":{type:"color",default:"#000000",transition:!0,expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"hillshade-method":{type:"enum",values:{standard:{},basic:{},combined:{},igor:{},multidirectional:{}},default:"standard",expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},resampling:{type:"enum",values:{linear:{},nearest:{}},default:"linear",expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"}},"paint_color-relief":{"color-relief-opacity":{type:"number",default:1,minimum:0,maximum:1,transition:!0,expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"color-relief-color":{type:"color",transition:!1,expression:{interpolated:!0,parameters:["elevation"]},"property-type":"color-ramp"},resampling:{type:"enum",values:{linear:{},nearest:{}},default:"linear",expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"}},paint_background:{"background-color":{type:"color",default:"#000000",transition:!0,requires:[{"!":"background-pattern"}],expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"background-pattern":{type:"resolvedImage",transition:!0,expression:{interpolated:!1,parameters:["zoom"]},"property-type":"cross-faded"},"background-opacity":{type:"number",default:1,minimum:0,maximum:1,transition:!0,expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"}},transition:{duration:{type:"number",default:300,minimum:0,units:"milliseconds"},delay:{type:"number",default:0,minimum:0,units:"milliseconds"}},"property-type":{"data-driven":{type:"property-type"},"cross-faded":{type:"property-type"},"cross-faded-data-driven":{type:"property-type"},"color-ramp":{type:"property-type"},"data-constant":{type:"property-type"},constant:{type:"property-type"}},promoteId:{"*":{type:"string"}},interpolation:{type:"array",value:"interpolation_name",minimum:1},interpolation_name:{type:"enum",values:{linear:{syntax:{overloads:[{parameters:[],"output-type":"interpolation"}],parameters:[]}},exponential:{syntax:{overloads:[{parameters:["base"],"output-type":"interpolation"}],parameters:[{name:"base",type:"number literal"}]}},"cubic-bezier":{syntax:{overloads:[{parameters:["x1","y1","x2","y2"],"output-type":"interpolation"}],parameters:[{name:"x1",type:"number literal"},{name:"y1",type:"number literal"},{name:"x2",type:"number literal"},{name:"y2",type:"number literal"}]}}}}}
1;let t2=t1,t3=["type","source","source-layer","minzoom","maxzoom","filter","layout"];var t5=class{constructor(e,t,r,n,i="error"){this.message=(e?`${e}: `:"")+r,n&&(this.identifier=n),this.severity=i,null!=t&&t.__line__&&(this.line=t.__line__)}};let t6={kind:"null"},t4={kind:"number"},t8={kind:"string"},t7={kind:"boolean"},t9={kind:"color"},re={kind:"projectionDefinition"},rt={kind:"object"},rr={kind:"value"},rn={kind:"collator"},ri={kind:"formatted"},ra={kind:"padding"},rs={kind:"colorArray"},ro={kind:"numberArray"},rl={kind:"resolvedImage"},ru={kind:"variableAnchorOffsetCollection"};function rh(e,t){return{kind:"array",itemType:e,N:t}}function rc(e){if("array"===e.kind){let t=rc(e.itemType);return"number"==typeof e.N?`array<${t}, ${e.N}>`:"value"===e.itemType.kind?"array":`array<${t}>`}return e.kind}let rp=[t6,t4,t8,t7,t9,re,ri,rt,rh(rr),ra,ro,rs,rl,ru];function rf(e,t){if("error"===t.kind)return null;if("array"===e.kind){if("array"===t.kind&&(0===t.N&&"value"===t.itemType.kind||!rf(e.itemType,t.itemType))&&("number"!=typeof e.N||e.N===t.N))return null}else if(e.kind===t.kind)return null;else if("value"===e.kind){for(let e of rp)if(!rf(e,t))return null}return`Expected ${rc(e)} but found ${rc(t)} instead.`}function rd(e,t){return t.some(t=>t.kind===e.kind)}function ry(e,t){return t.some(t=>"null"===t?null===e:"array"===t?Array.isArray(e):"object"===t?e&&!Array.isArray(e)&&"object"==typeof e:t===typeof e)}function rm(e,t){return"array"===e.kind&&"array"===t.kind?e.itemType.kind===t.itemType.kind&&"number"==typeof e.N:e.kind===t.kind}let rg=4/29,rx=6/29,rv=6/29*3*(6/29),rb=Math.PI/180,rw=180/Math.PI;function r_(e){return(e%=360)<0&&(e+=360),e}function rA([e,t,r,n]){e=rD(e);let i,a,s=rS((.2225045*e+.7168786*(t=rD(t))+.0606169*(r=rD(r)))/1);
1e===t&&t===r?i=a=s:(i=rS((.4360747*e+.3850649*t+.1430804*r)/.96422),a=rS((.0139322*e+.0971045*t+.7141733*r)/.82521));let o=116*s-16;return[o<0?0:o,500*(i-s),200*(s-a),n]}function rD(e){return e<=.04045?e/12.92:((e+.055)/1.055)**2.4}function rS(e){return e>.008856451679035631?e**(1/3):e/rv+rg}function rE([e,t,r,n]){let i=(e+16)/116,a=isNaN(t)?i:i+t/500,s=isNaN(r)?i:i-r/200;return i=+rk(i),[rF(3.1338561*(a=.96422*rk(a))-1.6168667*i-.4906146*(s=.82521*rk(s))),rF(-.9787684*a+1.9161415*i+.033454*s),rF(.0719453*a-.2289914*i+1.4052427*s),n]}function rF(e){return(e=e<=.00304?12.92*e:1.055*e**(1/2.4)-.055)<0?0:e>1?1:e}function rk(e){return e>rx?e*e*e:rv*(e-rg)}let rT=Object.hasOwn||function(e,t){return Object.prototype.hasOwnProperty.call(e,t)};function rI(e,t){return rT(e,t)?e[t]:void 0}function rC(e){return parseInt(e.padEnd(2,e),16)/255}function rM(e,t){return rB(t?e/100:e,0,1)}function rB(e,t,r){return Math.min(Math.max(t,e),r)}function rP(e){return!e.some(Number.isNaN)}let rz={aliceblue:[240,248,255],antiquewhite:[250,235,215],aqua:[0,255,255],aquamarine:[127,255,212],azure:[240,255,255],beige:[245,245,220],bisque:[255,228,196],black:[0,0,0],blanchedalmond:[255,235,205],blue:[0,0,255],blueviolet:[138,43,226],brown:[165,42,42],burlywood:[222,184,135],cadetblue:[95,158,160],chartreuse:[127,255,0],chocolate:[210,105,30],coral:[255,127,80],cornflowerblue:[100,149,237],cornsilk:[255,248,220],crimson:[220,20,60],cyan:[0,255,255],darkblue:[0,0,139],darkcyan:[0,139,139],darkgoldenrod:[184,134,11],darkgray:[169,169,169],darkgreen:[0,100,0],darkgrey:[169,169,169],darkkhaki:[189,183,107],darkmagenta:[139,0,139],darkolivegreen:[85,107,47],darkorange:[255,140,0],darkorchid:[153,50,204],darkred:[139,0,0],darksalmon:[233,150,122],darkseagreen:[143,188,143],darkslateblue:[72,61,139],darkslategray:[47,79,79],darkslategrey:[47,79,79],darkturquoise:[0,206,209],darkviolet:[148,0,211],deeppink:[255,20,147],deepskyblue:[0,191,255],dimgray:[105,105,105],dimgrey:[105,105,105],dodgerblue:[30,144,255],firebrick:[178,34,34],floralwhite:[255,250,240],forestgreen:[34,139,34],fuchsia:[255,0,255],gainsboro:[220,220,220],ghostwhite:[248,248,255],gold:[255,215,0],goldenrod:[218,165,32],gray:[128,128,128],green:[0,128,0],greenyellow:[173,255,47],grey:[128,128,128],honeydew:[240,255,240],hotpink:[255,105,180],indianred:[205,92,92],indigo:[75,0,130],ivory:[255,255,240],khaki:[240,230,140],lavender:[230,230,250],lavenderblush:[255,240,245],lawngreen:[124,252,0],lemonchiffon:[255,250,205],lightblue:[173,216,230],lightcoral:[240,128,128],lightcyan:[224,255,255],lightgoldenrodyellow:[250,250,210],lightgray:[211,211,211],lightgreen:[144,238,144],lightgrey:[211,211,211],lightpink:[255,182,193],lightsalmon:[255,160,122],lightseagreen:[32,178,170],lightskyblue:[135,206,250],lightslategray:[119,136,153],lightslategrey:[119,136,153],lightsteelblue:[176,196,222],lightyellow:[255,255,224],lime:[0,255,0],limegreen:[50,205,50],linen:[250,240,230],magenta:[255,0,255],maroon:[128,0,0],mediumaquamarine:[102,205,170],mediumblue:[0,0,205],mediumorchid:[186,85,211],mediumpurple:[147,112,219],mediumseagreen:[60,179,113],mediumslateblue:[123,104,238],mediumspringgreen:[0,250,154],mediumturquoise:[72,209,204],mediumvioletred:[199,21,133],midnightblue:[25,25,112],mintcream:[245,255,250],mistyrose:[255,228,225],moccasin:[255,228,181],navajowhite:[255,222,173],navy:[0,0,128],oldlace:[253,245,230],olive:[128,128,0],olivedrab:[107,142,35],orange:[255,165,0],orangered:[255,69,0],orchid:[218,112,214],palegoldenrod:[238,232,170],palegreen:[152,251,152],paleturquoise:[175,238,238],palevioletred:[219,112,147],papayawhip:[255,239,213],peachpuff:[255,218,185],peru:[205,133,63],pink:[255,192,203],plum:[221,160,221],powderblue:[176,224,230],purple:[128,0,128],rebeccapurple:[102,51,153],red:[255,0,0],rosybrown:[188,143,143],royalblue:[65,105,225],saddlebrown:[139,69,19],salmon:[250,128,114],sandybrown:[244,164,96],seagreen:[46,139,87],seashell:[255,245,238],sienna:[160,82,45],silver:[192,192,192],skyblue:[135,206,235],slateblue:[106,90,205],slategray:[112,128,144],slategrey:[112,128,144],snow:[255,250,250],springgreen:[0,255,127],steelblue:[70,130,180],tan:[210,180,140],teal:[0,128,128],thistle:[216,191,216],tomato:[255,99,71],turquoise:[64,224,208],violet:[238,130,238],wheat:[245,222,179],white:[255,255,255],whitesmoke:[245,245,245],yellow:[255,255,0],yellowgreen:[154,205,50]};function rV(e,t,r){return e.map((e,n)=>e+r*(t[n]-e))}var rL=class e{constructor(e,t,r,n=1,i=!0){this.r=e,this.g=t,this.b=r,this.a=n,i||(this.r*=n,this.g*=n,this.b*=n,n||this.overwriteGetter("rgb",[e,t,r,n]))}static{this.black=new e(0,0,0,1)}static{this.white=new e(1,1,1,1)}static{this.transparent=new e(0,0,0,0)}static{this.red=new e(1,0,0,1)}static parse(t){if(t instanceof e)return t;if("string"!=typeof t)return;let r=function(e){if("transparent"===(e=e.toLowerCase().trim()))return[0,0,0,0];let t=rI(rz,e);if(t){let[e,r,n]=t;return[e/255,r/255,n/255,1]}if(e.startsWith("#")&&/^#(?:[0-9a-f]{3,4}|[0-9a-f]{6}|[0-9a-f]{8})$/.test(e)){let t=e.length<6?1:2,r=1;return[rC(e.slice(r,r+=t)),rC(e.slice(r,r+=t)),rC(e.slice(r,r+=t)),rC(e.slice(r,r+t)||"ff")]}if(e.startsWith("rgb")){let t=e.match(/^rgba?\(\s*([\de.+-]+)(%)?(?:\s+|\s*(,)\s*)([\de.+-]+)(%)?(?:\s+|\s*(,)\s*)([\de.+-]+)(%)?(?:\s*([,\/])\s*([\de.+-]+)(%)?)?\s*\)$/);if(t){let[e,r,n,i,a,s,o,l,u,h,c,p]=t,f=[i||" ",o||" ",h].join("");if(" "===f||" /"===f||",,"===f||",,,"===f){let e=[n,s,u].join(""),t="%%%"===e?100:255*(""===e);if(t){let e=[rB(r/t,0,1),rB(a/t,0,1),rB(l/t,0,1),c?rM(+c,p):1];if(rP(e))return e}}return}}let r=e.match(/^hsla?\(\s*([\de.+-]+)(?:deg)?(?:\s+|\s*(,)\s*)([\de.+-]+)%(?:\s+|\s*(,)\s*)([\de.+-]+)%(?:\s*([,\/])\s*([\de.+-]+)(%)?)?\s*\)$/);if(r){let[e,t,n,i,a,s,o,l,u]=r,h=[n||" ",a||" ",o].join("");if(" "===h||" /"===h||",,"===h||",,,"===h){let e=[+t,rB(+i,0,100),rB(+s,0,100),l?rM(+l,u):1];if(rP(e))return function([e,t,r,n]){function i(n){let i=(n+e/30)%12,a=t*Math.min(r,1-r);return r-a*Math.max(-1,Math.min(i-3,9-i,1))}return e=r_(e),t/=100,r/=100,[i(0),i(8),i(4),n]}(e)}}}(t);if(r)return new e(...r,!1)}get rgb(){let{r:e,g:t,b:r,a:n}=this,i=n||1/0;return this.overwriteGetter("rgb",[e/i,t/i,r/i,n])}get hcl(){return this.overwriteGetter("hcl",function(e){let[t,r,n,i]=rA(e),a=Math.sqrt(r*r+n*n);return[Math.round(1e4*a)?r_(Math.atan2(n,r)*rw):NaN,a,t,i]}(this.rgb))}
vendor: 5,538 bytes, line 1
1get lab(){return this.overwriteGetter("lab",rA(this.rgb))}overwriteGetter(e,t){return Object.defineProperty(this,e,{value:t}),t}toString(){let[e,t,r,n]=this.rgb;return`rgba(${[e,t,r].map(e=>Math.round(255*e)).join(",")},${n})`}static interpolate(t,r,n,i="rgb"){switch(i){case"rgb":{let[i,a,s,o]=rV(t.rgb,r.rgb,n);return new e(i,a,s,o,!1)}case"hcl":{let[i,a,s,o]=t.hcl,[l,u,h,c]=r.hcl,p,f;if(isNaN(i)||isNaN(l))isNaN(i)?isNaN(l)?p=NaN:(p=l,(1===s||0===s)&&(f=u)):(p=i,(1===h||0===h)&&(f=a));else{let e=l-i;l>i&&e>180?e-=360:l<i&&i-l>180&&(e+=360),p=i+n*e}let[d,y,m,g]=function([e,t,r,n]){return rE([r,Math.cos(e=isNaN(e)?0:e*rb)*t,Math.sin(e)*t,n])}([p,f??a+n*(u-a),s+n*(h-s),o+n*(c-o)]);return new e(d,y,m,g,!1)}case"lab":{let[i,a,s,o]=rE(rV(t.lab,r.lab,n));return new e(i,a,s,o,!1)}}}};let r$=["bottom","center","top"];var rO=class{constructor(e,t,r,n,i,a){this.text=e,this.image=t,this.scale=r,this.fontStack=n,this.textColor=i,this.verticalAlign=a}},rR=class e{constructor(e){this.sections=e}static fromString(t){return new e([new rO(t,null,null,null,null,null)])}isEmpty(){return 0===this.sections.length||!this.sections.some(e=>0!==e.text.length||e.image&&0!==e.image.name.length)}static factory(t){return t instanceof e?t:e.fromString(t)}toString(){return 0===this.sections.length?"":this.sections.map(e=>e.text).join("")}},rN=class e{constructor(e){this.values=e.slice()}static parse(t){if(t instanceof e)return t;if("number"==typeof t)return new e([t,t,t,t]);if(Array.isArray(t)&&!(t.length<1||t.length>4)){for(let e of t)if("number"!=typeof e)return;switch(t.length){case 1:t=[t[0],t[0],t[0],t[0]];break;case 2:t=[t[0],t[1],t[0],t[1]];break;case 3:t=[t[0],t[1],t[2],t[1]]}return new e(t)}}toString(){return JSON.stringify(this.values)}static interpolate(t,r,n){return new e(rV(t.values,r.values,n))}},rU=class e{constructor(e){this.values=e.slice()}static parse(t){if(t instanceof e)return t;if("number"==typeof t)return new e([t]);if(Array.isArray(t)){for(let e of t)if("number"!=typeof e)return;return new e(t)}}toString(){return JSON.stringify(this.values)}static interpolate(t,r,n){return new e(rV(t.values,r.values,n))}},rq=class e{constructor(e){this.values=e.slice()}static parse(t){if(t instanceof e)return t;if("string"==typeof t){let r=rL.parse(t);return r?new e([r]):void 0}if(!Array.isArray(t))return;let r=[];for(let e of t){if("string"!=typeof e)return;let t=rL.parse(e);if(!t)return;r.push(t)}return new e(r)}toString(){return JSON.stringify(this.values)}static interpolate(t,r,n,i="rgb"){let a=[];if(t.values.length!=r.values.length)throw Error(`colorArray: Arrays have mismatched length (${t.values.length} vs. ${r.values.length}), cannot interpolate.`);for(let e=0;e<t.values.length;e++)a.push(rL.interpolate(t.values[e],r.values[e],n,i));return new e(a)}},rj=class extends Error{constructor(e,t){super(e),this.name="RuntimeError",this.path=t}toJSON(){return this.message}};let rG=new Set(["center","left","right","top","bottom","top-left","top-right","bottom-left","bottom-right"]);var rX=class e{constructor(e){this.values=e.slice()}static parse(t){if(t instanceof e)return t;if(!(!Array.isArray(t)||t.length<1||t.length%2!=0)){for(let e=0;e<t.length;e+=2){let r=t[e],n=t[e+1];if("string"!=typeof r||!rG.has(r)||!Array.isArray(n)||2!==n.length||"number"!=typeof n[0]||"number"!=typeof n[1])return}return new e(t)}}toString(){return JSON.stringify(this.values)}static interpolate(t,r,n,i){let a=t.values,s=r.values;if(a.length!==s.length)throw new rj(`Cannot interpolate values of different length. from: ${t.toString()}, to: ${r.toString()}`,i);let o=[];for(let e=0;e<a.length;e+=2){if(a[e]!==s[e])throw new rj(`Cannot interpolate values containing mismatched anchors. from[${e}]: ${a[e]}, to[${e}]: ${s[e]}`,i);o.push(a[e]);let[t,r]=a[e+1],[l,u]=s[e+1];o.push([t+n*(l-t),r+n*(u-r)])}return new e(o)}},rY=class e{constructor(e){this.name=e.name,this.available=e.available}toString(){return this.name}static fromString(t){return t?new e({name:t,available:!1}):null}},rZ=class e{constructor(e,t,r){this.from=e,this.to=t,this.transition=r}toString(){return this.from===this.to&&1===this.transition?this.from:JSON.stringify([this.from,this.to,this.transition])}static interpolate(t,r,n){return new e(t,r,n)}static parse(t){return t instanceof e?t:Array.isArray(t)&&3===t.length&&"string"==typeof t[0]&&"string"==typeof t[1]&&"number"==typeof t[2]?new e(t[0],t[1],t[2]):"object"==typeof t&&"string"==typeof t.from&&"string"==typeof t.to&&"number"==typeof t.transition?new e(t.from,t.to,t.transition):"string"==typeof t?new e(t,t,1):void 0}},rW=class{constructor(e,t,r){this.sensitivity=e?t?"variant":"case":t?"accent":"base",this.locale=r,this.collator=new Intl.Collator(this.locale?this.locale:[],{sensitivity:this.sensitivity,usage:"search"})}compare(e,t){return this.collator.compare(e,t)}resolvedLocale(){return new Intl.Collator(this.locale?this.locale:[]).resolvedOptions().locale}};function rH(e,t,r,n){return"number"==typeof e&&e>=0&&e<=255&&"number"==typeof t&&t>=0&&t<=255&&"number"==typeof r&&r>=0&&r<=255?void 0===n||"number"==typeof n&&n>=0&&n<=1?null:`Invalid rgba value [${[e,t,r,n].join(", ")}]: 'a' must be between 0 and 1.`:`Invalid rgba value [${("number"==typeof n?[e,t,r,n]:[e,t,r]).join(", ")}]: 'r', 'g', and 'b' must be between 0 and 255.`}function rK(e){if(null===e||"string"==typeof e||"boolean"==typeof e||"number"==typeof e||e instanceof rZ||e instanceof rL||e instanceof rW||e instanceof rR||e instanceof rN||e instanceof rU||e instanceof rq||e instanceof rX||e instanceof rY)return!0;
1if(Array.isArray(e)){for(let t of e)if(!rK(t))return!1;return!0}if("object"==typeof e){for(let t in e)if(!rK(e[t]))return!1;return!0}return!1}function rJ(e){if(null===e)return t6;if("string"==typeof e)return t8;if("boolean"==typeof e)return t7;if("number"==typeof e)return t4;if(e instanceof rL)return t9;if(e instanceof rZ)return re;if(e instanceof rW)return rn;if(e instanceof rR)return ri;if(e instanceof rN)return ra;if(e instanceof rU)return ro;if(e instanceof rq)return rs;if(e instanceof rX)return ru;if(e instanceof rY)return rl;if(Array.isArray(e)){let t=e.length,r;for(let t of e){let e=rJ(t);if(r){if(r===e)continue;r=rr;break}r=e}return rh(r||rr,t)}return rt}function rQ(e){let t=typeof e;return null===e?"":"string"===t||"number"===t||"boolean"===t?String(e):e instanceof rL||e instanceof rZ||e instanceof rR||e instanceof rN||e instanceof rU||e instanceof rq||e instanceof rX||e instanceof rY?e.toString():JSON.stringify(e)}var r0=class e{constructor(e,t){this.type=e,this.value=t}static parse(t,r){if(2!==t.length)return r.error(`'literal' expression requires exactly one argument, but found ${t.length-1} instead.`);if(!rK(t[1]))return r.error(`invalid value of type "${typeof t[1]}"`);let n=t[1],i=rJ(n),a=r.expectedType;return"array"===i.kind&&0===i.N&&a&&"array"===a.kind&&("number"!=typeof a.N||0===a.N)&&(i=a),new e(i,n)}evaluate(){return this.value}eachChild(){}outputDefined(){return!0}};let r1=["Unknown","Point","LineString","Polygon"];var r2=class{constructor(){this.globals=null,this.feature=null,this.featureState=null,this.formattedSection=null,this._parseColorCache=new Map,this.availableImages=null,this.canonical=null}id(){return this.feature&&"id"in this.feature?this.feature.id:null}geometryType(){return this.feature?"number"==typeof this.feature.type?r1[this.feature.type]:this.feature.type:null}geometry(){return this.feature&&"geometry"in this.feature?this.feature.geometry:null}canonicalID(){return this.canonical}properties(){return this.feature&&this.feature.properties||{}}parseColor(e){let t=this._parseColorCache.get(e);return t||(t=rL.parse(e),this._parseColorCache.set(e,t)),t}};function r3(e,t,r){let n=e.length-1,i=0,a=n,s=0,o,l;for(;i<=a;)if(o=e[s=Math.floor((i+a)/2)],l=e[s+1],o<=t){if(s===n||t<l)return s;i=s+1}else if(o>t)a=s-1;else throw new rj("Input is not a number.",r);return 0}var r5=class e{constructor(e,t,r,n){for(let[i,a]of(this.type=e,this.input=t,this.key=n,this.labels=[],this.outputs=[],r))this.labels.push(i),this.outputs.push(a)}static parse(t,r){if(t.length-1<4)return r.error(`Expected at least 4 arguments, but found only ${t.length-1}.`);if((t.length-1)%2!=0)return r.error("Expected an even number of arguments.");let n=r.parse(t[1],1,t4);if(!n)return null;let i=[],a=null;r.expectedType&&"value"!==r.expectedType.kind&&(a=r.expectedType);for(let e=1;e<t.length;e+=2){let n=1===e?-1/0:t[e],s=t[e+1],o=e,l=e+1;if("number"!=typeof n)return r.error('Input/output pairs for "step" expressions must be defined using literal numeric values (not computed expressions) for the input values.',o);if(i.length&&i[i.length-1][0]>=n)return r.error('Input/output pairs for "step" expressions must be arranged with input values in strictly ascending order.',o);let u=r.parse(s,l,a);if(!u)return null;a||=u.type,i.push([n,u])}return new e(a,n,i,r.key)}evaluate(e){let t=this.labels,r=this.outputs;if(1===t.length)return r[0].evaluate(e);let n=this.input.evaluate(e);if(n<=t[0])return r[0].evaluate(e);let i=t.length;return n>=t[i-1]?r[i-1].evaluate(e):r[r3(t,n,this.key)].evaluate(e)}eachChild(e){for(let t of(e(this.input),this.outputs))e(t)}outputDefined(){return this.outputs.every(e=>e.outputDefined())}},r6=class e{constructor(e,t,r,n,i,a){for(let[s,o]of(this.type=e,this.operator=t,this.interpolation=r,this.input=n,this.key=a,this.labels=[],this.outputs=[],i))this.labels.push(s),this.outputs.push(o)}static interpolationFactor(e,t,r,n){let i=0;if("exponential"===e.name)i=r4(t,e.base,r,n);else if("linear"===e.name)i=r4(t,1,r,n);else if("cubic-bezier"===e.name){var a,s,o,l;let u,h,c,p,f,d,y=e.controlPoints;i=(a=y[0],s=y[1],o=y[2],l=y[3],u=3*a,h=3*(o-a)-u,c=1-u-h,p=3*s,f=3*(l-s)-p,d=1-p-f,function(e,t=1e-6){if(e<=0)return 0;if(e>=1)return 1;let r=e;for(let n=0;n<8;n++){let n=((c*r+h)*r+u)*r-e;if(Math.abs(n)<t)return((d*r+f)*r+p)*r;let i=(3*c*r+2*h)*r+u;if(1e-6>Math.abs(i))break;r-=n/i}let n=0,i=1;r=e;for(let a=0;a<20;a++){let a=((c*r+h)*r+u)*r;if(Math.abs(a-e)<t)break;e>a?n=r:i=r,r=(n+i)*.5}return((d*r+f)*r+p)*r})(r4(t,1,r,n))}return i}static parse(t,r){let[n,i,a,...s]=t;if(!Array.isArray(i)||0===i.length)return r.error("Expected an interpolation type expression.",1);if("linear"===i[0])i={name:"linear"};else if("exponential"===i[0]){let e=i[1];if("number"!=typeof e)return r.error("Exponential interpolation requires a numeric base.",1,1);i={name:"exponential",base:e}}else{if("cubic-bezier"!==i[0])return r.error(`Unknown interpolation type ${String(i[0])}`,1,0);let e=i.slice(1);if(4!==e.length||e.some(e=>"number"!=typeof e||e<0||e>1))return r.error("Cubic bezier interpolation requires four numeric arguments with values between 0 and 1.",1);i={name:"cubic-bezier",controlPoints:e}}if(t.length-1<4)return r.error(`Expected at least 4 arguments, but found only ${t.length-1}.`);if((t.length-1)%2!=0)return r.error("Expected an even number of arguments.");if(!(a=r.parse(a,2,t4)))return null;let o=[],l=null;("interpolate-hcl"===n||"interpolate-lab"===n)&&r.expectedType!=rs?l=t9:r.expectedType&&"value"!==r.expectedType.kind&&(l=r.expectedType);for(let e=0;e<s.length;e+=2){let t=s[e],n=s[e+1],i=e+3,a=e+4;if("number"!=typeof t)return r.error('Input/output pairs for "interpolate" expressions must be defined using literal numeric values (not c
1omputed expressions) for the input values.',i);if(o.length&&o[o.length-1][0]>=t)return r.error('Input/output pairs for "interpolate" expressions must be arranged with input values in strictly ascending order.',i);let u=r.parse(n,a,l);if(!u)return null;l||=u.type,o.push([t,u])}return rm(l,t4)||rm(l,re)||rm(l,t9)||rm(l,ra)||rm(l,ro)||rm(l,rs)||rm(l,ru)||rm(l,rh(t4))?new e(l,n,i,a,o,r.key):r.error(`Type ${rc(l)} is not interpolatable.`)}evaluate(t){let r=this.labels,n=this.outputs;if(1===r.length)return n[0].evaluate(t);let i=this.input.evaluate(t);if(i<=r[0])return n[0].evaluate(t);let a=r.length;if(i>=r[a-1])return n[a-1].evaluate(t);let s=r3(r,i,this.key),o=r[s],l=r[s+1],u=e.interpolationFactor(this.interpolation,i,o,l),h=n[s].evaluate(t),c=n[s+1].evaluate(t);switch(this.operator){case"interpolate":switch(this.type.kind){case"number":return h+u*(c-h);case"color":return rL.interpolate(h,c,u);case"padding":return rN.interpolate(h,c,u);case"colorArray":return rq.interpolate(h,c,u);case"numberArray":return rU.interpolate(h,c,u);case"variableAnchorOffsetCollection":return rX.interpolate(h,c,u,this.key);case"array":return rV(h,c,u);case"projectionDefinition":return rZ.interpolate(h,c,u)}case"interpolate-hcl":switch(this.type.kind){case"color":return rL.interpolate(h,c,u,"hcl");case"colorArray":return rq.interpolate(h,c,u,"hcl")}case"interpolate-lab":switch(this.type.kind){case"color":return rL.interpolate(h,c,u,"lab");case"colorArray":return rq.interpolate(h,c,u,"lab")}}}eachChild(e){for(let t of(e(this.input),this.outputs))e(t)}outputDefined(){return this.outputs.every(e=>e.outputDefined())}};function r4(e,t,r,n){let i=n-r,a=e-r;return 0===i?0:1===t?a/i:(t**a-1)/(t**i-1)}let r8={color:rL.interpolate,number:function(e,t,r){return e+r*(t-e)},padding:rN.interpolate,numberArray:rU.interpolate,colorArray:rq.interpolate,variableAnchorOffsetCollection:rX.interpolate,array:rV};var r7=class e{constructor(e){this.type=ri,this.sections=e}static parse(t,r){if(t.length<2)return r.error("Expected at least one argument.");let n=t[1];if(!Array.isArray(n)&&"object"==typeof n)return r.error("First argument must be an image or text section.");let i=[],a=!1;for(let e=1;e<=t.length-1;++e){let n=t[e];if(a&&"object"==typeof n&&!Array.isArray(n)){a=!1;let e=null;if(n["font-scale"]&&!(e=r.parse(n["font-scale"],1,t4)))return null;let t=null;if(n["text-font"]&&!(t=r.parse(n["text-font"],1,rh(t8))))return null;let s=null;if(n["text-color"]&&!(s=r.parse(n["text-color"],1,t9)))return null;let o=null;if(n["vertical-align"]){if("string"==typeof n["vertical-align"]&&!r$.includes(n["vertical-align"]))return r.error(`'vertical-align' must be one of: 'bottom', 'center', 'top' but found '${n["vertical-align"]}' instead.`);if(!(o=r.parse(n["vertical-align"],1,t8)))return null}let l=i[i.length-1];l.scale=e,l.font=t,l.textColor=s,l.verticalAlign=o}else{let n=r.parse(t[e],1,rr);if(!n)return null;let s=n.type.kind;if("string"!==s&&"value"!==s&&"null"!==s&&"resolvedImage"!==s)return r.error("Formatted text type must be 'string', 'value', 'image' or 'null'.");a=!0,i.push({content:n,scale:null,font:null,textColor:null,verticalAlign:null})}}return new e(i)}evaluate(e){return new rR(this.sections.map(t=>{let r=t.content.evaluate(e);return rJ(r)===rl?new rO("",r,null,null,null,t.verticalAlign?t.verticalAlign.evaluate(e):null):new rO(rQ(r),null,t.scale?t.scale.evaluate(e):null,t.font?t.font.evaluate(e).join(","):null,t.textColor?t.textColor.evaluate(e):null,t.verticalAlign?t.verticalAlign.evaluate(e):null)}))}eachChild(e){for(let t of this.sections)e(t.content),t.scale&&e(t.scale),t.font&&e(t.font),t.textColor&&e(t.textColor),t.verticalAlign&&e(t.verticalAlign)}outputDefined(){return!1}};function r9(e,t,r){let n=e[t];e[t]=e[r],e[r]=n}function ne(e,t){if(e.length<=1)return[e];let r=[],n,i;for(let t of e){let e=function(e){let t=0;for(let r=0,n=e.length,i=n-1,a,s;r<n;i=r++)a=e[r],t+=((s=e[i]).x-a.x)*(a.y+s.y);return t}(t);0!==e&&(t.area=Math.abs(e),void 0===i&&(i=e<0),i===e<0?(n&&r.push(n),n=[t]):n.push(t))}if(n&&r.push(n),t>1)for(let e=0;e<r.length;e++)r[e].length<=t||(function e(t,r,n=0,i=t.length-1,a=function(e,t){return e<t?-1:+(e>t)}){for(;i>n;){if(i-n>600){let s=i-n+1,o=r-n+1,l=Math.log(s),u=.5*Math.exp(2*l/3),h=.5*Math.sqrt(l*u*(s-u)/s)*(o-s/2<0?-1:1);e(t,r,Math.max(n,Math.floor(r-o*u/s+h)),Math.min(i,Math.floor(r+(s-o)*u/s+h)),a)}let s=t[r],o=n,l=i;for(r9(t,n,r),a(t[i],s)>0&&r9(t,n,i);o<l;){for(r9(t,o,l),o++,l--;0>a(t[o],s);)o++;for(;a(t[l],s)>0;)l--}0===a(t[n],s)?r9(t,n,l):r9(t,++l,i),l<=r&&(n=l+1),r<=l&&(i=l-1)}}(r[e],t,1,r[e].length-1,nt),r[e]=r[e].slice(0,t));return r}function nt(e,t){return t.area-e.area}let nr={string:t8,number:t4,boolean:t7,object:rt};var nn=class e{constructor(e,t,r){this.type=e,this.args=t,this.key=r}static parse(t,r){if(t.length<2)return r.error("Expected at least one argument.");let n=1,i,a=t[0];if("array"===a){let e,a;if(t.length>2){let i=t[1];if("string"!=typeof i||!(i in nr)||"object"===i)return r.error('The item type argument of "array" must be one of string, number, boolean',1);e=nr[i],n++}else e=rr;if(t.length>3){if(null!==t[2]&&("number"!=typeof t[2]||t[2]<0||t[2]!==Math.floor(t[2])))return r.error('The length argument to "array" must be a positive integer literal',2);a=t[2],n++}
vendor: 7,705 bytes, line 1
1i=rh(e,a)}else{if(!nr[a])throw Error(`Types doesn't contain name = ${a}`);i=nr[a]}let s=[];for(;n<t.length;n++){let e=r.parse(t[n],n,rr);if(!e)return null;s.push(e)}return new e(i,s,r.key)}evaluate(e){for(let t=0;t<this.args.length;t++){let r=this.args[t].evaluate(e);if(!rf(this.type,rJ(r)))return r;if(t===this.args.length-1)throw new rj(`Expected value to be of type ${rc(this.type)}, but found ${rc(rJ(r))} instead.`,this.key)}throw Error()}eachChild(e){this.args.forEach(e)}outputDefined(){return this.args.every(e=>e.outputDefined())}};let ni={"to-boolean":t7,"to-color":t9,"to-number":t4,"to-string":t8};var na=class e{constructor(e,t,r){this.type=e,this.args=t,this.key=r}static parse(t,r){if(t.length<2)return r.error("Expected at least one argument.");let n=t[0];if(!ni[n])throw Error(`Can't parse ${n} as it is not part of the known types`);if(("to-boolean"===n||"to-string"===n)&&2!==t.length)return r.error("Expected one argument.");let i=ni[n],a=[];for(let e=1;e<t.length;e++){let n=r.parse(t[e],e,rr);if(!n)return null;a.push(n)}return new e(i,a,r.key)}evaluate(e){switch(this.type.kind){case"boolean":return!!this.args[0].evaluate(e);case"color":{let t,r;for(let n of this.args){if(t=n.evaluate(e),r=null,t instanceof rL)return t;if("string"==typeof t){let r=e.parseColor(t);if(r)return r}else if(Array.isArray(t)&&!(r=t.length<3||t.length>4?`Invalid rgba value ${JSON.stringify(t)}: expected an array containing either three or four numeric values.`:rH(t[0],t[1],t[2],t[3])))return new rL(t[0]/255,t[1]/255,t[2]/255,t[3])}throw new rj(r||`Could not parse color from value '${"string"==typeof t?t:JSON.stringify(t)}'`,this.key)}case"padding":{let t;for(let r of this.args){t=r.evaluate(e);let n=rN.parse(t);if(n)return n}throw new rj(`Could not parse padding from value '${"string"==typeof t?t:JSON.stringify(t)}'`,this.key)}case"numberArray":{let t;for(let r of this.args){t=r.evaluate(e);let n=rU.parse(t);if(n)return n}throw new rj(`Could not parse numberArray from value '${"string"==typeof t?t:JSON.stringify(t)}'`,this.key)}case"colorArray":{let t;for(let r of this.args){t=r.evaluate(e);let n=rq.parse(t);if(n)return n}throw new rj(`Could not parse colorArray from value '${"string"==typeof t?t:JSON.stringify(t)}'`,this.key)}case"variableAnchorOffsetCollection":{let t;for(let r of this.args){t=r.evaluate(e);let n=rX.parse(t);if(n)return n}throw new rj(`Could not parse variableAnchorOffsetCollection from value '${"string"==typeof t?t:JSON.stringify(t)}'`,this.key)}case"number":{let t=null;for(let r of this.args){if(null===(t=r.evaluate(e)))return 0;let n=Number(t);if(!isNaN(n))return n}throw new rj(`Could not convert ${JSON.stringify(t)} to number.`,this.key)}case"formatted":return rR.fromString(rQ(this.args[0].evaluate(e)));case"resolvedImage":return rY.fromString(rQ(this.args[0].evaluate(e)));case"projectionDefinition":{let t=this.args[0].evaluate(e);if(rZ.parse(t))return t;throw new rj(`Could not parse projectionDefinition from value '${"string"==typeof t?t:JSON.stringify(t)}'`,this.key)}default:return rQ(this.args[0].evaluate(e))}}eachChild(e){this.args.forEach(e)}outputDefined(){return this.args.every(e=>e.outputDefined())}},ns=class e{constructor(e,t){this.type=t.type,this.bindings=[].concat(e),this.result=t}evaluate(e){return this.result.evaluate(e)}eachChild(e){for(let t of this.bindings)e(t[1]);e(this.result)}static parse(t,r){if(t.length<4)return r.error(`Expected at least 3 arguments, but found ${t.length-1} instead.`);let n=[];for(let e=1;e<t.length-1;e+=2){let i=t[e];if("string"!=typeof i)return r.error(`Expected string, but found ${typeof i} instead.`,e);if(/[^a-zA-Z0-9_]/.test(i))return r.error("Variable names must contain only alphanumeric characters or '_'.",e);let a=r.parse(t[e+1],e+1);if(!a)return null;n.push([i,a])}let i=r.parse(t[t.length-1],t.length-1,r.expectedType,n);return i?new e(n,i):null}outputDefined(){return this.result.outputDefined()}},no=class e{constructor(e,t){this.type=t.type,this.name=e,this.boundExpression=t}static parse(t,r){if(2!==t.length||"string"!=typeof t[1])return r.error("'var' expression requires exactly one string literal argument.");let n=t[1];return r.scope.has(n)?new e(n,r.scope.get(n)):r.error(`Unknown variable "${n}". Make sure "${n}" has been bound in an enclosing "let" expression before using it.`,1)}evaluate(e){return this.boundExpression.evaluate(e)}eachChild(){}outputDefined(){return!1}},nl=class e{constructor(e,t,r,n){this.type=e,this.index=t,this.input=r,this.key=n}static parse(t,r){if(3!==t.length)return r.error(`Expected 2 arguments, but found ${t.length-1} instead.`);let n=r.parse(t[1],1,t4),i=r.parse(t[2],2,rh(r.expectedType||rr));return n&&i?new e(i.type.itemType,n,i,r.key):null}evaluate(e){let t=this.index.evaluate(e),r=this.input.evaluate(e);if(t<0)throw new rj(`Array index out of bounds: ${t} < 0.`,this.key);if(t>=r.length)throw new rj(`Array index out of bounds: ${t} > ${r.length-1}.`,this.key);if(t!==Math.floor(t))throw new rj(`Array index must be an integer, but found ${t} instead.`,this.key);return r[t]}eachChild(e){e(this.index),e(this.input)}outputDefined(){return!1}},nu=class e{constructor(e,t,r){this.needle=e,this.haystack=t,this.key=r,this.type=t7}static parse(t,r){if(3!==t.length)return r.error(`Expected 2 arguments, but found ${t.length-1} instead.`);let n=r.parse(t[1],1,rr),i=r.parse(t[2],2,rr);return n&&i?rd(n.type,[t7,t8,t4,t6,rr])?new e(n,i,r.key):r.error(`Expected first argument to be of type boolean, string, number or null, but found ${rc(n.type)} instead`):null}evaluate(e){let t=this.needle.evaluate(e),r=this.haystack.evaluate(e);if(!r)return!1;if(!ry(t,["boolean","string","number","null"]))throw new rj(`Expected first argument to be of type boolean, string, number or null, but found ${rc(rJ(t))} instead.`,this.key);if(!ry(r,["string","array"]))throw new rj(`Expected second argument to be of type array or string, but found ${rc(rJ(r))} instead.`,this.key);return r.indexOf(t)>=0}eachChild(e){e(this.needle),e(this.haystack)}outputDefined(){return!0}},nh=class e{constructor(e,t,r,n){this.needle=e,this.haystack=t,this.key=r,this.fromIndex=n,this.type=t4}static parse(t,r){if(t.length<=2||t.length>=5)return r.error(`Expected 2 or 3 arguments, but found ${t.length-1} instead.`);let n=r.parse(t[1],1,rr),i=r.parse(t[2],2,rr);if(!n||!i)return null;if(!rd(n.type,[t7,t8,t4,t6,rr]))return r.error(`Expected first argument to be of type boolean, string, number or null, but found ${rc(n.type)} instead`);if(4===t.length){let a=r.parse(t[3],3,t4);return a?new e(n,i,r.key,a):null}return new e(n,i,r.key)}evaluate(e){let t,r=this.needle.evaluate(e),n=this.haystack.evaluate(e);if(!ry(r,["boolean","string","number","null"]))throw new rj(`Expected first argument to be of type boolean, string, number or null, but found ${rc(rJ(r))} instead.`,this.key);if(this.fromIndex&&(t=this.fromIndex.evaluate(e)),ry(n,["string"])){let e=n.indexOf(r,t);return -1===e?-1:[...n.slice(0,e)].length}if(ry(n,["array"]))return n.indexOf(r,t);throw new rj(`Expected second argument to be of type array or string, but found ${rc(rJ(n))} instead.`,this.key)}eachChild(e){e(this.needle),e(this.haystack),this.fromIndex&&e(this.fromIndex)}outputDefined(){return!1}},nc=class e{constructor(e,t,r,n,i,a){this.inputType=e,this.type=t,this.input=r,this.cases=n,this.outputs=i,this.otherwise=a}static parse(t,r){let n,i;if(t.length<5)return r.error(`Expected at least 4 arguments, but found only ${t.length-1}.`);if(t.length%2!=1)return r.error("Expected an even number of arguments.");r.expectedType&&"value"!==r.expectedType.kind&&(i=r.expectedType);let a={},s=[];for(let e=2;e<t.length-1;e+=2){let o=t[e],l=t[e+1];Array.isArray(o)||(o=[o]);let u=r.concat(e);
vendor: 9,720 bytes, line 1
1if(0===o.length)return u.error("Expected at least one branch label.");for(let e of o){if("number"!=typeof e&&"string"!=typeof e)return u.error("Branch labels must be numbers or strings.");if("number"==typeof e&&Math.abs(e)>0x20000000000000-1)return u.error(`Branch labels must be integers no larger than ${0x20000000000000-1}.`);if("number"==typeof e&&Math.floor(e)!==e)return u.error("Numeric branch labels must be integer values.");if(n){if(u.checkSubtype(n,rJ(e)))return null}else n=rJ(e);if(void 0!==a[String(e)])return u.error("Branch labels must be unique.");a[String(e)]=s.length}let h=r.parse(l,e,i);if(!h)return null;i||=h.type,s.push(h)}let o=r.parse(t[1],1,rr);if(!o)return null;let l=r.parse(t[t.length-1],t.length-1,i);return!l||"value"!==o.type.kind&&r.concat(1).checkSubtype(n,o.type)?null:new e(n,i,o,a,s,l)}evaluate(e){let t=this.input.evaluate(e);return(rJ(t)===this.inputType&&this.outputs[this.cases[t]]||this.otherwise).evaluate(e)}eachChild(e){e(this.input),this.outputs.forEach(e),e(this.otherwise)}outputDefined(){return this.outputs.every(e=>e.outputDefined())&&this.otherwise.outputDefined()}},np=class e{constructor(e,t,r){this.type=e,this.branches=t,this.otherwise=r}static parse(t,r){let n;if(t.length<4)return r.error(`Expected at least 3 arguments, but found only ${t.length-1}.`);if(t.length%2!=0)return r.error("Expected an odd number of arguments.");r.expectedType&&"value"!==r.expectedType.kind&&(n=r.expectedType);let i=[];for(let e=1;e<t.length-1;e+=2){let a=r.parse(t[e],e,t7);if(!a)return null;let s=r.parse(t[e+1],e+1,n);if(!s)return null;i.push([a,s]),n||=s.type}let a=r.parse(t[t.length-1],t.length-1,n);if(!a)return null;if(!n)throw Error("Can't infer output type");return new e(n,i,a)}evaluate(e){for(let[t,r]of this.branches)if(t.evaluate(e))return r.evaluate(e);return this.otherwise.evaluate(e)}eachChild(e){for(let[t,r]of this.branches)e(t),e(r);e(this.otherwise)}outputDefined(){return this.branches.every(([e,t])=>t.outputDefined())&&this.otherwise.outputDefined()}},nf=class e{constructor(e,t,r,n,i){this.type=e,this.input=t,this.beginIndex=r,this.key=n,this.endIndex=i}static parse(t,r){if(t.length<=2||t.length>=5)return r.error(`Expected 2 or 3 arguments, but found ${t.length-1} instead.`);let n=r.parse(t[1],1,rr),i=r.parse(t[2],2,t4);if(!n||!i)return null;if(!rd(n.type,[rh(rr),t8,rr]))return r.error(`Expected first argument to be of type array or string, but found ${rc(n.type)} instead`);if(4===t.length){let a=r.parse(t[3],3,t4);return a?new e(n.type,n,i,r.key,a):null}return new e(n.type,n,i,r.key)}evaluate(e){let t=this.input.evaluate(e),r=this.beginIndex.evaluate(e),n;if(this.endIndex&&(n=this.endIndex.evaluate(e)),ry(t,["string"]))return[...t].slice(r,n).join("");if(ry(t,["array"]))return t.slice(r,n);throw new rj(`Expected first argument to be of type array or string, but found ${rc(rJ(t))} instead.`,this.key)}eachChild(e){e(this.input),e(this.beginIndex),this.endIndex&&e(this.endIndex)}outputDefined(){return!1}},nd=class e{constructor(e,t){this.type=e,this.args=t}static parse(t,r){if(t.length<2)return r.error("Expected at least one argument.");let n=null,i=r.expectedType;i&&"value"!==i.kind&&(n=i);let a=[];for(let e of t.slice(1)){let t=r.parse(e,1+a.length,n,void 0,{typeAnnotation:"omit"});if(!t)return null;n||=t.type,a.push(t)}if(!n)throw Error("No output type");return i&&a.some(e=>rf(i,e.type))?new e(rr,a):new e(n,a)}evaluate(e){let t=null,r=0,n;for(let i of this.args)if(r++,(t=i.evaluate(e))&&t instanceof rY&&!t.available&&(n||=t.name,t=null,r===this.args.length&&(t=n)),null!==t)break;return t}eachChild(e){this.args.forEach(e)}outputDefined(){return this.args.every(e=>e.outputDefined())}};function ny(e,t){return"=="===e||"!="===e?"boolean"===t.kind||"string"===t.kind||"number"===t.kind||"null"===t.kind||"value"===t.kind:"string"===t.kind||"number"===t.kind||"value"===t.kind}function nm(e,t,r,n){return 0===n.compare(t,r)}function ng(e,t,r){let n="=="!==e&&"!="!==e;return class i{constructor(e,t,r,n){this.lhs=e,this.rhs=t,this.key=r,this.collator=n,this.type=t7,this.hasUntypedArgument="value"===e.type.kind||"value"===t.type.kind}static parse(e,t){if(3!==e.length&&4!==e.length)return t.error("Expected two or three arguments.");let r=e[0],a=t.parse(e[1],1,rr);if(!a)return null;if(!ny(r,a.type))return t.concat(1).error(`"${r}" comparisons are not supported for type '${rc(a.type)}'.`);let s=t.parse(e[2],2,rr);if(!s)return null;if(!ny(r,s.type))return t.concat(2).error(`"${r}" comparisons are not supported for type '${rc(s.type)}'.`);if(a.type.kind!==s.type.kind&&"value"!==a.type.kind&&"value"!==s.type.kind)return t.error(`Cannot compare types '${rc(a.type)}' and '${rc(s.type)}'.`);n&&("value"===a.type.kind&&"value"!==s.type.kind?a=new nn(s.type,[a],t.key):"value"!==a.type.kind&&"value"===s.type.kind&&(s=new nn(a.type,[s],t.key)));let o=null;if(4===e.length){if("string"!==a.type.kind&&"string"!==s.type.kind&&"value"!==a.type.kind&&"value"!==s.type.kind)return t.error("Cannot use collator to compare non-string types.");if(!(o=t.parse(e[3],3,rn)))return null}return new i(a,s,t.key,o)}evaluate(i){let a=this.lhs.evaluate(i),s=this.rhs.evaluate(i);if(n&&this.hasUntypedArgument){let t=rJ(a),r=rJ(s);if(t.kind!==r.kind||"string"!==t.kind&&"number"!==t.kind)throw new rj(`Expected arguments for "${e}" to be (string, string) or (number, number), but found (${t.kind}, ${r.kind}) instead.`,this.key)}if(this.collator&&!n&&this.hasUntypedArgument){let e=rJ(a),r=rJ(s);if("string"!==e.kind||"string"!==r.kind)return t(i,a,s)}return this.collator?r(i,a,s,this.collator.evaluate(i)):t(i,a,s)}eachChild(e){e(this.lhs),e(this.rhs),this.collator&&e(this.collator)}outputDefined(){return!0}}}let nx=ng("==",function(e,t,r){return t===r},nm),nv=ng("!=",function(e,t,r){return t!==r},function(e,t,r,n){return!nm(e,t,r,n)}),nb=ng("<",function(e,t,r){return t<r},function(e,t,r,n){return 0>n.compare(t,r)}),nw=ng(">",function(e,t,r){return t>r},function(e,t,r,n){return n.compare(t,r)>0}),n_=ng("<=",function(e,t,r){return t<=r},function(e,t,r,n){return 0>=n.compare(t,r)}),nA=ng(">=",function(e,t,r){return t>=r},function(e,t,r,n){return n.compare(t,r)>=0});var nD=class e{constructor(e,t,r){this.type=rn,this.locale=r,this.caseSensitive=e,this.diacriticSensitive=t}static parse(t,r){if(2!==t.length)return r.error("Expected one argument.");let n=t[1];if("object"!=typeof n||Array.isArray(n))return r.error("Collator options argument must be an object.");let i=r.parse(void 0!==n["case-sensitive"]&&n["case-sensitive"],1,t7);if(!i)return null;let a=r.parse(void 0!==n["diacritic-sensitive"]&&n["diacritic-sensitive"],1,t7);if(!a)return null;let s=null;return!n.locale||(s=r.parse(n.locale,1,t8))?new e(i,a,s):null}evaluate(e){return new rW(this.caseSensitive.evaluate(e),this.diacriticSensitive.evaluate(e),this.locale?this.locale.evaluate(e):null)}eachChild(e){e(this.caseSensitive),e(this.diacriticSensitive),this.locale&&e(this.locale)}outputDefined(){return!1}},nS=class e{constructor(e,t,r,n,i,a){this.type=t8,this.number=e,this.locale=t,this.currency=r,this.unit=n,this.minFractionDigits=i,this.maxFractionDigits=a}static parse(t,r){if(3!==t.length)return r.error("Expected two arguments.");let n=r.parse(t[1],1,t4);if(!n)return null;let i=t[2];if("object"!=typeof i||Array.isArray(i))return r.error("NumberFormat options argument must be an object.");let a=null;if(i.locale&&!(a=r.parse(i.locale,1,t8)))return null;let s=null;if(i.currency&&!(s=r.parse(i.currency,1,t8)))return null;let o=null;if(i.unit&&!(o=r.parse(i.unit,1,t8)))return null;if(s&&o)return r.error("NumberFormat options `currency` and `unit` are mutually exclusive");let l=null;if(i["min-fraction-digits"]&&!(l=r.parse(i["min-fraction-digits"],1,t4)))return null;let u=null;return!i["max-fraction-digits"]||(u=r.parse(i["max-fraction-digits"],1,t4))?new e(n,a,s,o,l,u):null}evaluate(e){return new Intl.NumberFormat(this.locale?this.locale.evaluate(e):[],{style:this.currency?"currency":this.unit?"unit":"decimal",currency:this.currency?this.currency.evaluate(e):void 0,unit:this.unit?this.unit.evaluate(e):void 0,minimumFractionDigits:this.minFractionDigits?this.minFractionDigits.evaluate(e):void 0,maximumFractionDigits:this.maxFractionDigits?this.maxFractionDigits.evaluate(e):void 0}).format(this.number.evaluate(e))}eachChild(e){e(this.number),this.locale&&e(this.locale),this.currency&&e(this.currency),this.unit&&e(this.unit),this.minFractionDigits&&e(this.minFractionDigits),this.maxFractionDigits&&e(this.maxFractionDigits)}outputDefined(){return!1}},nE=class e{constructor(e){this.type=rl,this.input=e}static parse(t,r){if(2!==t.length)return r.error("Expected two arguments.");let n=r.parse(t[1],1,t8);return n?new e(n):r.error("No image name provided.")}evaluate(e){let t=this.input.evaluate(e),r=rY.fromString(t);return r&&e.availableImages&&(r.available=e.availableImages.indexOf(t)>-1),r}eachChild(e){e(this.input)}outputDefined(){return!1}},nF=class e{constructor(e,t){this.input=e,this.key=t,this.type=t4}static parse(t,r){if(2!==t.length)return r.error(`Expected 1 argument, but found ${t.length-1} instead.`);let n=r.parse(t[1],1);return n?"array"!==n.type.kind&&"string"!==n.type.kind&&"value"!==n.type.kind?r.error(`Expected argument of type string or array, but found ${rc(n.type)} instead.`):new e(n,r.key):null}evaluate(e){let t=this.input.evaluate(e);if("string"==typeof t)return[...t].length;if(Array.isArray(t))return t.length;throw new rj(`Expected value to be of type string or array, but found ${rc(rJ(t))} instead.`,this.key)}eachChild(e){e(this.input)}outputDefined(){return!1}};function nk(e,t){let r=2**t.z;return[360*((e[0]/8192+t.x)/r)-180,360/Math.PI*Math.atan(Math.exp((180-360*((e[1]/8192+t.y)/r))*Math.PI/180)
1)-90]}function nT(e,t){e[0]=Math.min(e[0],t[0]),e[1]=Math.min(e[1],t[1]),e[2]=Math.max(e[2],t[0]),e[3]=Math.max(e[3],t[1])}function nI(e,t){return!(e[0]<=t[0]||e[2]>=t[2]||e[1]<=t[1]||e[3]>=t[3])}function nC(e,t,r,n){var i,a;let s=[t[0]-e[0],t[1]-e[1]];return 0!=(i=[n[0]-r[0],n[1]-r[1]],i[0]*(a=s)[1]-i[1]*a[0])&&!!(nP(e,t,r,n)&&nP(r,n,e,t))}function nM(e,t,r=!1){let n=!1;for(let s of t)for(let t=0;t<s.length-1;t++){var i,a;if(function(e,t,r){let n=e[0]-t[0],i=e[1]-t[1],a=e[0]-r[0],s=e[1]-r[1];return n*s-a*i==0&&n*a<=0&&i*s<=0}(e,s[t],s[t+1]))return r;i=s[t],a=s[t+1],i[1]>e[1]!=a[1]>e[1]&&e[0]<(a[0]-i[0])*(e[1]-i[1])/(a[1]-i[1])+i[0]&&(n=!n)}return n}function nB(e,t){for(let r of e)if(!nM(r,t))return!1;for(let r=0;r<e.length-1;++r)if(function(e,t,r){for(let n of r)for(let r=0;r<n.length-1;++r)if(nC(e,t,n[r],n[r+1]))return!0;return!1}(e[r],e[r+1],t))return!1;return!0}function nP(e,t,r,n){let i=e[0]-r[0],a=e[1]-r[1],s=t[0]-r[0],o=t[1]-r[1],l=n[0]-r[0],u=n[1]-r[1],h=i*u-l*a,c=s*u-l*o;return h>0&&c<0||h<0&&c>0}function nz(e,t,r){let n=[];for(let i=0;i<e.length;i++){let a=[];for(let n=0;n<e[i].length;n++){let s=function(e,t){let r=(180+e[0])/360,n=(180-180/Math.PI*Math.log(Math.tan(Math.PI/4+e[1]*Math.PI/360)))/360,i=2**t.z;return[Math.round(r*i*8192),Math.round(n*i*8192)]}(e[i][n],r);nT(t,s),a.push(s)}n.push(a)}return n}function nV(e,t,r){let n=[];for(let i=0;i<e.length;i++){let a=nz(e[i],t,r);n.push(a)}return n}function nL(e,t,r,n){if(e[0]<r[0]||e[0]>r[2]){let t=.5*n,i=e[0]-r[0]>t?-n:r[0]-e[0]>t?n:0;0===i&&(i=e[0]-r[2]>t?-n:r[2]-e[0]>t?n:0),e[0]+=i}nT(t,e)}function n$(e,t,r,n){let i=2**n.z*8192,a=[8192*n.x,8192*n.y],s=[];for(let n of e)for(let e of n){let n=[e.x+a[0],e.y+a[1]];nL(n,t,r,i),s.push(n)}return s}function nO(e,t,r,n){let i=2**n.z*8192,a=[8192*n.x,8192*n.y],s=[];for(let r of e){let e=[];for(let n of r){let r=[n.x+a[0],n.y+a[1]];nT(t,r),e.push(r)}s.push(e)}if(t[2]-t[0]<=i/2){for(let e of(t[0]=t[1]=1/0,t[2]=t[3]=-1/0,s))for(let n of e)nL(n,t,r,i)}return s}var nR=class e{constructor(e,t){this.type=t7,this.geojson=e,this.geometries=t}static parse(t,r){if(2!==t.length)return r.error(`'within' expression requires exactly one argument, but found ${t.length-1} instead.`);if(rK(t[1])){let r=t[1];if("FeatureCollection"===r.type){let t=[];for(let e of r.features){let{type:r,coordinates:n}=e.geometry;"Polygon"===r&&t.push(n),"MultiPolygon"===r&&t.push(...n)}if(t.length)return new e(r,{type:"MultiPolygon",coordinates:t})}else if("Feature"===r.type){let t=r.geometry.type;if("Polygon"===t||"MultiPolygon"===t)return new e(r,r.geometry)}else if("Polygon"===r.type||"MultiPolygon"===r.type)return new e(r,r)}return r.error("'within' expression requires valid geojson object that contains polygon geometry type.")}evaluate(e){if(null!=e.geometry()&&null!=e.canonicalID()){if("Point"===e.geometryType())return function(e,t){let r=[1/0,1/0,-1/0,-1/0],n=[1/0,1/0,-1/0,-1/0],i=e.canonicalID();if("Polygon"===t.type){let a=nz(t.coordinates,n,i),s=n$(e.geometry(),r,n,i);if(!nI(r,n))return!1;for(let e of s)if(!nM(e,a))return!1}if("MultiPolygon"===t.type){let a=nV(t.coordinates,n,i),s=n$(e.geometry(),r,n,i);if(!nI(r,n))return!1;for(let e of s)if(!function(e,t){for(let r of t)if(nM(e,r))return!0;return!1}(e,a))return!1}return!0}(e,this.geometries);if("LineString"===e.geometryType())return function(e,t){let r=[1/0,1/0,-1/0,-1/0],n=[1/0,1/0,-1/0,-1/0],i=e.canonicalID();if("Polygon"===t.type){let a=nz(t.coordinates,n,i),s=nO(e.geometry(),r,n,i);if(!nI(r,n))return!1;for(let e of s)if(!nB(e,a))return!1}if("MultiPolygon"===t.type){let a=nV(t.coordinates,n,i),s=nO(e.geometry(),r,n,i);if(!nI(r,n))return!1;for(let e of s)if(!function(e,t){for(let r of t)if(nB(e,r))return!0;return!1}(e,a))return!1}return!0}(e,this.geometries)}return!1}eachChild(){}outputDefined(){return!0}},nN=class{constructor(e=[],t=(e,t)=>e<t?-1:+(e>t)){if(this.data=e,this.length=this.data.length,this.compare=t,this.length>0)for(let e=(this.length>>1)-1;e>=0;e--)this._down(e)}push(e){this.data.push(e),this._up(this.length++)}pop(){if(0===this.length)return;let e=this.data[0],t=this.data.pop();return--this.length>0&&(this.data[0]=t,this._down(0)),e}peek(){return this.data[0]}_up(e){let{data:t,compare:r}=this,n=t[e];for(;e>0;){let i=e-1>>1,a=t[i];if(r(n,a)>=0)break;t[e]=a,e=i}t[e]=n}_down(e){let{data:t,compare:r}=this,n=this.length>>1,i=t[e];for(;e<n;){let n=(e<<1)+1,a=n+1;if(a<this.length&&0>r(t[a],t[n])&&(n=a),r(t[n],i)>=0)break;t[e]=t[n],e=n}t[e]=i}};let nU=Math.PI/180;var nq=class{constructor(e){let t=6378.137*nU*1e3,r=Math.cos(e*nU),n=1/(1-.0066943799901413165*(1-r*r)),i=Math.sqrt(n);this.kx=t*i*r,this.ky=t*i*n*.9933056200098587}distance(e,t){let r=this.wrap(e[0]-t[0])*this.kx,n=(e[1]-t[1])*this.ky;return Math.sqrt(r*r+n*n)}pointOnLine(e,t){let r=1/0,n,i,a,s;for(let o=0;o<e.length-1;o++){let l=e[o][0],u=e[o][1],h=this.wrap(e[o+1][0]-l)*this.kx,c=(e[o+1][1]-u)*this.ky,p=0;
1(0!==h||0!==c)&&((p=(this.wrap(t[0]-l)*this.kx*h+(t[1]-u)*this.ky*c)/(h*h+c*c))>1?(l=e[o+1][0],u=e[o+1][1]):p>0&&(l+=h/this.kx*p,u+=c/this.ky*p));let f=(h=this.wrap(t[0]-l)*this.kx)*h+(c=(t[1]-u)*this.ky)*c;f<r&&(r=f,n=l,i=u,a=o,s=p)}return{point:[n,i],index:a,t:Math.max(0,Math.min(1,s))}}wrap(e){for(;e<-180;)e+=360;for(;e>180;)e-=360;return e}};function nj(e,t){return t[0]-e[0]}function nG(e){return e[1]-e[0]+1}function nX(e,t){return e[1]>=e[0]&&e[1]<t}function nY(e,t){if(e[0]>e[1])return[null,null];let r=nG(e);if(t){if(2===r)return[e,null];let t=Math.floor(r/2);return[[e[0],e[0]+t],[e[0]+t,e[1]]]}if(1===r)return[e,null];let n=Math.floor(r/2)-1;return[[e[0],e[0]+n],[e[0]+n+1,e[1]]]}function nZ(e,t){if(!nX(t,e.length))return[1/0,1/0,-1/0,-1/0];let r=[1/0,1/0,-1/0,-1/0];for(let n=t[0];n<=t[1];++n)nT(r,e[n]);return r}function nW(e){let t=[1/0,1/0,-1/0,-1/0];for(let r of e)for(let e of r)nT(t,e);return t}function nH(e){return e[0]!==-1/0&&e[1]!==-1/0&&e[2]!==1/0&&e[3]!==1/0}function nK(e,t,r){if(!nH(e)||!nH(t))return NaN;let n=0,i=0;return e[2]<t[0]&&(n=t[0]-e[2]),e[0]>t[2]&&(n=e[0]-t[2]),e[1]>t[3]&&(i=e[1]-t[3]),e[3]<t[1]&&(i=t[1]-e[3]),r.distance([0,0],[n,i])}function nJ(e,t,r){let n=r.pointOnLine(t,e);return r.distance(e,n.point)}function nQ(e,t,r,n,i){return Math.min(Math.min(nJ(e,[r,n],i),nJ(t,[r,n],i)),Math.min(nJ(r,[e,t],i),nJ(n,[e,t],i)))}function n0(e,t){for(let r of e)for(let e of r)if(nM(e,t,!0))return!0;return!1}function n1(e,t,r,n,i,a){if(!a)return;let s=nK(nZ(n,a),i,r);s<t&&e.push([s,a,[0,0]])}function n2(e,t,r,n,i,a,s){if(!a||!s)return;let o=nK(nZ(n,a),nZ(i,s),r);o<t&&e.push([o,a,s])}function n3(e,t,r,n,i=1/0){let a=Math.min(n.distance(e[0],r[0][0]),i);if(0===a)return a;let s=new nN([[0,[0,e.length-1],[0,0]]],nj),o=nW(r);for(;s.length>0;){let i=s.pop();if(i[0]>=a)continue;let l=i[1],u=t?50:100;if(nG(l)<=u){if(!nX(l,e.length))return NaN;if(t){let t=function(e,t,r,n){if(!nX(t,e.length))return NaN;for(let n=t[0];n<=t[1];++n)if(nM(e[n],r,!0))return 0;let i=1/0;for(let a=t[0];a<t[1];++a){let t=e[a],s=e[a+1];for(let e of r)for(let r=0,a=e.length,o=a-1;r<a;o=r++){let a=e[o],l=e[r];if(nC(t,s,a,l))return 0;i=Math.min(i,nQ(t,s,a,l,n))}}return i}(e,l,r,n);if(isNaN(t)||0===t)return t;a=Math.min(a,t)}else for(let t=l[0];t<=l[1];++t)if(0===(a=Math.min(a,function(e,t,r){if(nM(e,t,!0))return 0;let n=1/0;for(let i of t){let t=i[0],a=i[i.length-1];if(t!==a&&0===(n=Math.min(n,nJ(e,[a,t],r))))break;let s=r.pointOnLine(i,e);if(0===(n=Math.min(n,r.distance(e,s.point))))break}return n}(e[t],r,n))))return 0}else{let r=nY(l,t);n1(s,a,n,e,o,r[0]),n1(s,a,n,e,o,r[1])}}return a}function n5(e,t,r,n,i,a=1/0){let s=Math.min(a,i.distance(e[0],r[0]));if(0===s)return s;let o=new nN([[0,[0,e.length-1],[0,r.length-1]]],nj);for(;o.length>0;){let a=o.pop();if(a[0]>=s)continue;let l=a[1],u=a[2],h=t?50:100,c=n?50:100;if(nG(l)<=h&&nG(u)<=c){if(!nX(l,e.length)&&nX(u,r.length))return NaN;if(t&&n)s=Math.min(s,function(e,t,r,n,i){if(!(nX(t,e.length)&&nX(n,r.length)))return 1/0;let a=1/0;for(let s=t[0];s<t[1];++s){let t=e[s],o=e[s+1];for(let e=n[0];e<n[1];++e){let n=r[e],s=r[e+1];if(nC(t,o,n,s))return 0;a=Math.min(a,nQ(t,o,n,s,i))}}return a}(e,l,r,u,i));else if(t&&!n){let t=e.slice(l[0],l[1]+1);for(let e=u[0];e<=u[1];++e)if(0===(s=Math.min(s,nJ(r[e],t,i))))return s}else if(!t&&n){let t=r.slice(u[0],u[1]+1);for(let r=l[0];r<=l[1];++r)if(0===(s=Math.min(s,nJ(e[r],t,i))))return s}else s=Math.min(s,function(e,t,r,n,i){if(!(nX(t,e.length)&&nX(n,r.length)))return NaN;let a=1/0;for(let s=t[0];s<=t[1];++s)for(let t=n[0];t<=n[1];++t)if(0===(a=Math.min(a,i.distance(e[s],r[t]))))return a;return a}(e,l,r,u,i))}else{let a=nY(l,t),h=nY(u,n);n2(o,s,i,e,r,a[0],h[0]),n2(o,s,i,e,r,a[0],h[1]),n2(o,s,i,e,r,a[1],h[0]),n2(o,s,i,e,r,a[1],h[1])}}return s}function n6(e){return"MultiPolygon"===e.type?e.coordinates.map(e=>({type:"Polygon",coordinates:e})):"MultiLineString"===e.type?e.coordinates.map(e=>({type:"LineString",coordinates:e})):"MultiPoint"===e.type?e.coordinates.map(e=>({type:"Point",coordinates:e})):[e]}var n4=class e{constructor(e,t){this.type=t4,this.geojson=e,this.geometries=t}static parse(t,r){if(2!==t.length)return r.error(`'distance' expression requires exactly one argument, but found ${t.length-1} instead.`);if(rK(t[1])){let r=t[1];if("FeatureCollection"===r.type)return new e(r,r.features.map(e=>n6(e.geometry)).flat());if("Feature"===r.type)return new e(r,n6(r.geometry));if("type"in r&&"coordinates"in r)return new e(r,n6(r))}return r.error("'distance' expression requires valid geojson object that contains polygon geometry type.")}evaluate(e){if(null!=e.geometry()&&null!=e.canonicalID()){if("Point"===e.geometryType())return function(e,t){let r=e.geometry(),n=r.flat().map(t=>nk([t.x,t.y],e.canonical));if(0===r.length)return NaN;let i=new nq(n[0][1]),a=1/0;for(let e of t){switch(e.type){case"Point":a=Math.min(a,n5(n,!1,[e.coordinates],!1,i,a));break;case"LineString":a=Math.min(a,n5(n,!1,e.coordinates,!0,i,a));break;case"Polygon":a=Math.min(a,n3(n,!1,e.coordinates,i,a))}if(0===a)break}return a}(e,this.geometries);if("LineString"===e.geometryType())return function(e,t){let r=e.geometry(),n=r.flat().map(t=>nk([t.x,t.y],e.canonical));if(0===r.length)return NaN;let i=new nq(n[0][1]),a=1/0;for(let e of t){switch(e.type){case"Point":a=Math.min(a,n5(n,!0,[e.coordinates],!1,i,a));break;case"LineString":a=Math.min(a,n5(n,!0,e.coordinates,!0,i,a));break;case"Polygon":a=Math.min(a,n3(n,!0,e.coordinates,i,a))}if(0===a)break}return a}(e,this.geometries);if("Polygon"===e.geometryType())return function(e,t){let r=e.geometry();if(0===r.length||0===r[0].length)return NaN;let n=ne(r,0).map(t=>t.map(t=>t.map(t=>nk([t.x,t.y],e.canonical)))),i=new nq(n[0][0][0][1]),a=1/0;for(let e of t)for(let t of n){switch(e.type){case"Point":a=Math.min(a,n3([e.coordinates],!1,t,i,a));break;case"LineString":a=Math.min(a,n3(e.coordinates,!0,t,i,a));break;case"Polygon":a=Math.min(a,function(e,t,r,n=1/0){let i=nW(e),a=nW(t);if(n!==1/0&&nK(i,a,r)>=n)return n;
1if(nI(i,a)){if(n0(e,t))return 0}else if(n0(t,e))return 0;let s=1/0;for(let n of e)for(let e=0,i=n.length,a=i-1;e<i;a=e++){let i=n[a],o=n[e];for(let e of t)for(let t=0,n=e.length,a=n-1;t<n;a=t++){let n=e[a],l=e[t];if(nC(i,o,n,l))return 0;s=Math.min(s,nQ(i,o,n,l,r))}}return s}(t,e.coordinates,i,a))}if(0===a)return a}return a}(e,this.geometries)}return NaN}eachChild(){}outputDefined(){return!0}},n8=class e{constructor(e){let t=null;for(let r of e)if(t){if(t===r.type)continue;t=rr;break}else t=r.type;this.type=rh(t??rr,e.length),this.arr=e}static parse(t,r){if(2!==t.length)return r.error(`'semiliteral' expression requires exactly one argument, but found ${t.length-1} instead.`);if(!rK(t[1]))return r.error(`invalid value of type "${typeof t[1]}"`);let n=t[1],i=rJ(n);return"array"===i.kind?new e(n.map(e=>r.parse(e,null,rr))):new r0(i,n)}evaluate(e){return this.arr.map(t=>t.evaluate(e))}eachChild(e){this.arr.forEach(e)}outputDefined(){return this.arr.every(e=>e.outputDefined())}},n7=class e{constructor(e){this.key=e,this.type=rr}static parse(t,r){if(2!==t.length)return r.error(`Expected 1 argument, but found ${t.length-1} instead.`);let n=t[1];return null==n?r.error("Global state property must be defined."):"string"==typeof n?new e(n):r.error(`Global state property must be string, but found ${typeof t[1]} instead.`)}evaluate(e){let t=e.globals?.globalState;return t&&0!==Object.keys(t).length?rI(t,this.key)??null:null}eachChild(){}outputDefined(){return!1}};let n9={"==":nx,"!=":nv,">":nw,"<":nb,">=":nA,"<=":n_,array:nn,at:nl,boolean:nn,case:np,coalesce:nd,collator:nD,format:r7,image:nE,in:nu,"index-of":nh,interpolate:r6,"interpolate-hcl":r6,"interpolate-lab":r6,length:nF,let:ns,literal:r0,match:nc,number:nn,"number-format":nS,object:nn,semiliteral:n8,slice:nf,step:r5,string:nn,"to-boolean":na,"to-color":na,"to-number":na,"to-string":na,var:no,within:nR,distance:n4,"global-state":n7};var ie=class extends Error{constructor(e,t){super(t),this.message=t,this.key=e}},it=class e{constructor(e,t=[]){for(let[r,n]of(this.parent=e,this.bindings={},t))this.bindings[r]=n}concat(t){return new e(this,t)}get(e){if(this.bindings[e])return this.bindings[e];if(this.parent)return this.parent.get(e);throw Error(`${e} not found in scope.`)}has(e){return!!this.bindings[e]||!!this.parent&&this.parent.has(e)}},ir=class e{constructor(e,t,r=[],n,i=new it,a=[]){this.registry=e,this.path=r,this.key=r.map(e=>`[${e}]`).join(""),this.scope=i,this.errors=a,this.expectedType=n,this._isConstant=t}parse(e,t,r,n,i={}){return t?this.concat(t,r,n)._parse(e,i):this._parse(e,i)}_parse(e,t){(null===e||"string"==typeof e||"boolean"==typeof e||"number"==typeof e)&&(e=["literal",e]);let r=this.key;function n(e,t,n){return"assert"===n?new nn(t,[e],r):"coerce"===n?new na(t,[e],r):e}if(Array.isArray(e)){if(0===e.length)return this.error('Expected an array with at least one element. If you wanted a literal array, use ["literal", []].');let r=e[0];if("string"!=typeof r)return this.error(`Expression name must be a string, but found ${typeof r} instead. If you wanted a literal array, use ["literal", [...]].`,0),null;let i=this.registry[r];if(i){let r=i.parse(e,this);if(!r)return null;if(this.expectedType){let e=this.expectedType,i=r.type;if(("string"===e.kind||"number"===e.kind||"boolean"===e.kind||"object"===e.kind||"array"===e.kind)&&"value"===i.kind)r=n(r,e,t.typeAnnotation||"assert");else if("projectionDefinition"===e.kind&&["string","array","value"].includes(i.kind)||["color","formatted","resolvedImage"].includes(e.kind)&&["value","string"].includes(i.kind)||["padding","numberArray"].includes(e.kind)&&["value","number","array"].includes(i.kind)||"colorArray"===e.kind&&["value","string","array"].includes(i.kind)||"variableAnchorOffsetCollection"===e.kind&&["value","array"].includes(i.kind))r=n(r,e,t.typeAnnotation||"coerce");else if(this.checkSubtype(e,i))return null}if(!(r instanceof r0)&&"resolvedImage"!==r.type.kind&&this._isConstant(r)){let e=new r2;try{r=new r0(r.type,r.evaluate(e))}catch(e){return this.error(e.message),null}}return r}return this.error(`Unknown expression "${r}". If you wanted a literal array, use ["literal", [...]].`,0)}return void 0===e?this.error("'undefined' value invalid. Use null instead."):"object"==typeof e?this.error('Bare objects invalid. Use ["literal", {...}] instead.'):this.error(`Expected an array, but found ${typeof e} instead.`)}concat(t,r,n){let i="number"==typeof t?this.path.concat(t):this.path,a=n?this.scope.concat(n):this.scope;return new e(this.registry,this._isConstant,i,r||null,a,this.errors)}error(e,...t){let r=`${this.key}${t.map(e=>`[${e}]`).join("")}`;this.errors.push(new ie(r,e))}checkSubtype(e,t){let r=rf(e,t);return r&&this.error(r),r}},ii=class e{constructor(e,t,r,n,i){this.name=e,this.type=t,this._evaluate=r,this.args=n,this.key=i}evaluate(e){return this._evaluate(e,this.args,this.key)}
vendor: 20,128 bytes, line 1
1eachChild(e){this.args.forEach(e)}outputDefined(){return!1}static parse(t,r){let n=t[0],i=e.definitions[n];if(!i)return r.error(`Unknown expression "${n}". If you wanted a literal array, use ["literal", [...]].`,0);let a=Array.isArray(i)?i[0]:i.type,s=Array.isArray(i)?[[i[1],i[2]]]:i.overloads,o=s.filter(([e])=>!Array.isArray(e)||e.length===t.length-1),l=null;for(let[i,s]of o){l=new ir(r.registry,iu,r.path,null,r.scope);let o=[],u=!1;for(let e=1;e<t.length;e++){let r=t[e],n=Array.isArray(i)?i[e-1]:i.type,a=l.parse(r,1+o.length,n);if(!a){u=!0;break}o.push(a)}if(!u){if(Array.isArray(i)&&i.length!==o.length){l.error(`Expected ${i.length} arguments, but found ${o.length} instead.`);continue}for(let e=0;e<o.length;e++){let t=Array.isArray(i)?i[e]:i.type,r=o[e];l.concat(e+1).checkSubtype(t,r.type)}if(0===l.errors.length)return new e(n,a,s,o,r.key)}}if(1===o.length)r.errors.push(...l.errors);else{let e=(o.length?o:s).map(([e])=>{var t;return Array.isArray(t=e)?`(${t.map(rc).join(", ")})`:`(${rc(t.type)}...)`}).join(" | "),n=[];for(let e=1;e<t.length;e++){let i=r.parse(t[e],1+n.length);if(!i)return null;n.push(rc(i.type))}r.error(`Expected arguments of type ${e}, but found (${n.join(", ")}) instead.`)}return null}static register(t,r){for(let n in e.definitions=r,r)t[n]=e}};function ia(e,[t,r,n,i],a){t=t.evaluate(e),r=r.evaluate(e),n=n.evaluate(e);let s=i?i.evaluate(e):1,o=rH(t,r,n,s);if(o)throw new rj(o,a);return new rL(t/255,r/255,n/255,s,!1)}function is(e,t){return e in t&&void 0!==t[e]}function io(e,t){let r=t[e];return void 0===r?null:r}function il(e){return{type:e}}function iu(e){if(e instanceof no)return iu(e.boundExpression);if(e instanceof ii&&"error"===e.name||e instanceof nD||e instanceof nR||e instanceof n4||e instanceof n7)return!1;let t=e instanceof na||e instanceof nn,r=!0;return e.eachChild(e=>{r&&=t?iu(e):e instanceof r0}),!!r&&ih(e)&&ip(e,["zoom","heatmap-density","elevation","line-progress","accumulated","is-supported-script"])}function ih(e){if(e instanceof ii&&("get"===e.name&&1===e.args.length||"feature-state"===e.name||"has"===e.name&&1===e.args.length||"properties"===e.name||"geometry-type"===e.name||"id"===e.name||/^filter-/.test(e.name))||e instanceof nR||e instanceof n4)return!1;let t=!0;return e.eachChild(e=>{t&&!ih(e)&&(t=!1)}),t}function ic(e){if(e instanceof ii&&"feature-state"===e.name)return!1;let t=!0;return e.eachChild(e=>{t&&!ic(e)&&(t=!1)}),t}function ip(e,t){if(e instanceof ii&&t.indexOf(e.name)>=0)return!1;let r=!0;return e.eachChild(e=>{r&&!ip(e,t)&&(r=!1)}),r}function id(e){return"data-driven"===e["property-type"]||"cross-faded-data-driven"===e["property-type"]}function iy(e){return!!e.expression&&e.expression.parameters.indexOf("zoom")>-1}function im(e){return!!e.expression&&e.expression.interpolated}function ig(e,...t){for(let r of t)for(let t in r)e[t]=r[t];return e}function ix(e){return e instanceof Number?"number":e instanceof String?"string":e instanceof Boolean?"boolean":Array.isArray(e)?"array":null===e?"null":typeof e}function iv(e){return"object"==typeof e&&!!e&&!Array.isArray(e)&&rJ(e)===rt}function ib(e){return e}function iw(e,t,r){return void 0!==e?e:void 0!==t?t:void 0!==r?r:void 0}function i_(e,t,r,n,i){return iw(typeof r===i?n[r]:void 0,e.default,t.default)}function iA(e,t,r){if("number"!==ix(r))return iw(e.default,t.default);let n=e.stops.length;if(1===n||r<=e.stops[0][0])return e.stops[0][1];if(r>=e.stops[n-1][0])return e.stops[n-1][1];let i=r3(e.stops.map(e=>e[0]),r,"");return e.stops[i][1]}function iD(e,t,r){var n,i,a;let s,o,l=void 0===e.base?1:e.base;if("number"!==ix(r))return iw(e.default,t.default);let u=e.stops.length;if(1===u||r<=e.stops[0][0])return e.stops[0][1];if(r>=e.stops[u-1][0])return e.stops[u-1][1];let h=r3(e.stops.map(e=>e[0]),r,""),c=(n=r,i=l,a=e.stops[h][0],s=e.stops[h+1][0]-a,o=n-a,0===s?0:1===i?o/s:(i**o-1)/(i**s-1)),p=e.stops[h][1],f=e.stops[h+1][1],d=r8[t.type]||ib;return"function"==typeof p.evaluate?{evaluate(...t){let r=p.evaluate.apply(void 0,t),n=f.evaluate.apply(void 0,t);if(void 0!==r&&void 0!==n)return d(r,n,c,e.colorSpace)}}:d(p,f,c,e.colorSpace)}function iS(e,t,r){switch(t.type){case"color":r=rL.parse(r);break;case"formatted":r=rR.fromString(r.toString());break;case"resolvedImage":r=rY.fromString(r.toString());break;case"padding":r=rN.parse(r);break;case"colorArray":r=rq.parse(r);break;case"numberArray":r=rU.parse(r);break;default:ix(r)===t.type||"enum"===t.type&&t.values[r]||(r=void 0)}return iw(r,e.default,t.default)}function iE(e){return{result:"success",value:e}}function iF(e){return{result:"error",value:e}}ii.register(n9,{error:[{kind:"error"},[t8],(e,[t],r)=>{throw new rj(t.evaluate(e),r)}],typeof:[t8,[rr],(e,[t])=>rc(rJ(t.evaluate(e)))],"to-rgba":[rh(t4,4),[t9],(e,[t])=>{let[r,n,i,a]=t.evaluate(e).rgb;return[255*r,255*n,255*i,a]}],rgb:[t9,[t4,t4,t4],ia],rgba:[t9,[t4,t4,t4,t4],ia],has:{type:t7,overloads:[[[t8],(e,[t])=>is(t.evaluate(e),e.properties())],[[t8,rt],(e,[t,r])=>is(t.evaluate(e),r.evaluate(e))]]},get:{type:rr,overloads:[[[t8],(e,[t])=>io(t.evaluate(e),e.properties())],[[t8,rt],(e,[t,r])=>io(t.evaluate(e),r.evaluate(e))]]},"feature-state":[rr,[t8],(e,[t])=>io(t.evaluate(e),e.featureState||{})],properties:[rt,[],e=>e.properties()],"geometry-type":[t8,[],e=>e.geometryType()],id:[rr,[],e=>e.id()],zoom:[t4,[],e=>e.globals.zoom],"heatmap-density":[t4,[],e=>e.globals.heatmapDensity||0],elevation:[t4,[],e=>e.globals.elevation||0],"line-progress":[t4,[],e=>e.globals.lineProgress||0],accumulated:[rr,[],e=>void 0===e.globals.accumulated?null:e.globals.accumulated],"+":[t4,il(t4),(e,t)=>{let r=0;for(let n of t)r+=n.evaluate(e);return r}],"*":[t4,il(t4),(e,t)=>{let r=1;for(let n of t)r*=n.evaluate(e);return r}],"-":{type:t4,overloads:[[[t4,t4],(e,[t,r])=>t.evaluate(e)-r.evaluate(e)],[[t4],(e,[t])=>-t.evaluate(e)]]},"/":[t4,[t4,t4],(e,[t,r])=>t.evaluate(e)/r.evaluate(e)],"%":[t4,[t4,t4],(e,[t,r])=>t.evaluate(e)%r.evaluate(e)],ln2:[t4,[],()=>Math.LN2],pi:[t4,[],()=>Math.PI],e:[t4,[],()=>Math.E],"^":[t4,[t4,t4],(e,[t,r])=>t.evaluate(e)**r.evaluate(e)],sqrt:[t4,[t4],(e,[t])=>Math.sqrt(t.evaluate(e))],log10:[t4,[t4],(e,[t])=>Math.log(t.evaluate(e))/Math.LN10],ln:[t4,[t4],(e,[t])=>Math.log(t.evaluate(e))],log2:[t4,[t4],(e,[t])=>Math.log(t.evaluate(e))/Math.LN2],sin:[t4,[t4],(e,[t])=>Math.sin(t.evaluate(e))],cos:[t4,[t4],(e,[t])=>Math.cos(t.evaluate(e))],tan:[t4,[t4],(e,[t])=>Math.tan(t.evaluate(e))],asin:[t4,[t4],(e,[t])=>Math.asin(t.evaluate(e))],acos:[t4,[t4],(e,[t])=>Math.acos(t.evaluate(e))],atan:[t4,[t4],(e,[t])=>Math.atan(t.evaluate(e))],min:[t4,il(t4),(e,t)=>Math.min(...t.map(t=>t.evaluate(e)))],max:[t4,il(t4),(e,t)=>Math.max(...t.map(t=>t.evaluate(e)))],abs:[t4,[t4],(e,[t])=>Math.abs(t.evaluate(e))],round:[t4,[t4],(e,[t])=>{let r=t.evaluate(e);return r<0?-Math.round(-r):Math.round(r)}],floor:[t4,[t4],(e,[t])=>Math.floor(t.evaluate(e))],ceil:[t4,[t4],(e,[t])=>Math.ceil(t.evaluate(e))],"filter-==":[t7,[t8,rr],(e,[t,r])=>e.properties()[t.value]===r.value],"filter-id-==":[t7,[rr],(e,[t])=>e.id()===t.value],"filter-type-==":[t7,[t8],(e,[t])=>e.geometryType()===t.value],"filter-<":[t7,[t8,rr],(e,[t,r])=>{let n=e.properties()[t.value],i=r.value;return typeof n==typeof i&&n<i}],"filter-id-<":[t7,[rr],(e,[t])=>{let r=e.id(),n=t.value;return typeof r==typeof n&&r<n}],"filter->":[t7,[t8,rr],(e,[t,r])=>{let n=e.properties()[t.value],i=r.value;return typeof n==typeof i&&n>i}],"filter-id->":[t7,[rr],(e,[t])=>{let r=e.id(),n=t.value;return typeof r==typeof n&&r>n}],"filter-<=":[t7,[t8,rr],(e,[t,r])=>{let n=e.properties()[t.value],i=r.value;return typeof n==typeof i&&n<=i}],"filter-id-<=":[t7,[rr],(e,[t])=>{let r=e.id(),n=t.value;return typeof r==typeof n&&r<=n}],"filter->=":[t7,[t8,rr],(e,[t,r])=>{let n=e.properties()[t.value],i=r.value;return typeof n==typeof i&&n>=i}],"filter-id->=":[t7,[rr],(e,[t])=>{let r=e.id(),n=t.value;return typeof r==typeof n&&r>=n}],"filter-has":[t7,[rr],(e,[t])=>{let r=t.value,n=e.properties();return r in n&&void 0!==n[r]}],"filter-has-id":[t7,[],e=>null!==e.id()&&void 0!==e.id()],"filter-type-in":[t7,[rh(t8)],(e,[t])=>t.value.indexOf(e.geometryType())>=0],"filter-id-in":[t7,[rh(rr)],(e,[t])=>t.value.indexOf(e.id())>=0],"filter-in-small":[t7,[t8,rh(rr)],(e,[t,r])=>r.value.indexOf(e.properties()[t.value])>=0],"filter-in-large":[t7,[t8,rh(rr)],(e,[t,r])=>(function(e,t,r,n){for(;r<=n;){let i=r+n>>1;if(t[i]===e)return!0;t[i]>e?n=i-1:r=i+1}return!1})(e.properties()[t.value],r.value,0,r.value.length-1)],all:{type:t7,overloads:[[[t7,t7],(e,[t,r])=>t.evaluate(e)&&r.evaluate(e)],[il(t7),(e,t)=>{for(let r of t)if(!r.evaluate(e))return!1;return!0}]]},any:{type:t7,overloads:[[[t7,t7],(e,[t,r])=>t.evaluate(e)||r.evaluate(e)],[il(t7),(e,t)=>{for(let r of t)if(r.evaluate(e))return!0;return!1}]]},"!":[t7,[t7],(e,[t])=>!t.evaluate(e)],"is-supported-script":[t7,[t8],(e,[t])=>{let r=e.globals&&e.globals.isSupportedScript;return!r||r(t.evaluate(e))}],upcase:[t8,[t8],(e,[t])=>t.evaluate(e).toUpperCase()],downcase:[t8,[t8],(e,[t])=>t.evaluate(e).toLowerCase()],concat:[t8,il(rr),(e,t)=>t.map(t=>rQ(t.evaluate(e))).join("")],split:[rh(t8),[t8,t8],(e,[t,r])=>t.evaluate(e).split(r.evaluate(e))],join:[t8,[rh(t8),t8],(e,[t,r])=>t.evaluate(e).join(r.evaluate(e))],"resolved-locale":[t8,[rn],(e,[t])=>t.evaluate(e).resolvedLocale()]});var ik=class{constructor(e,t,r,n){this.expression=e,this._warningHistory={},this._evaluator=new r2,this._defaultValue=r?i$(r):null,this._enumValues=r&&"enum"===r.type?r.values:null,this._globalState=n,this._rootKey=t}evaluateWithoutErrorHandling(e,t,r,n,i,a){return this._globalState&&(e=iO(e,this._globalState)),this._evaluator.globals=e,this._evaluator.feature=t,this._evaluator.featureState=r,this._evaluator.canonical=n,this._evaluator.availableImages=i||null,this._evaluator.formattedSection=a,this.expression.evaluate(this._evaluator)}evaluate(e,t,r,n,i,a){this._globalState&&(e=iO(e,this._globalState)),this._evaluator.globals=e,this._evaluator.feature=t||null,this._evaluator.featureState=r||null,this._evaluator.canonical=n,this._evaluator.availableImages=i||null,this._evaluator.formattedSection=a||null;try{let e=this.expression.evaluate(this._evaluator);if(null==e||"number"==typeof e&&e!=e)return this._defaultValue;if(this._enumValues&&!(e in this._enumValues))throw new rj(`Expected value to be one of ${Object.keys(this._enumValues).map(e=>JSON.stringify(e)).join(", ")}, but found ${JSON.stringify(e)} instead.`,"");return e}catch(r){let e=r instanceof rj?r.path:"",t=`${e}|${r.message}`;return this._warningHistory[t]||(this._warningHistory[t]=!0,"u">typeof console&&console.warn(iT(this._rootKey,e,r.message,this._defaultValue))),this._defaultValue}}};function iT(e,t,r,n){return`${e}${t}: ${r}${null==n?"":` Falling back to ${String(n)}.`}`}function iI(e){if(!e)throw Error('rootKey must identify the location of the expression in the style JSON, e.g. "layers[3].paint.line-width".')}function iC(e){return Array.isArray(e)&&e.length>0&&"string"==typeof e[0]&&e[0]in n9}function iM(e,t,r,n){var i;let a;iI(t);let s=new ir(n9,iu,[],r?(i=r,a={color:t9,string:t8,number:t4,enum:t8,boolean:t7,formatted:ri,padding:ra,numberArray:ro,colorArray:rs,projectionDefinition:re,resolvedImage:rl,variableAnchorOffsetCollection:ru},"array"===i.type?rh(a[i.value]||rr,i.length):a[i.type]):void 0),o=s.parse(e,void 0,void 0,void 0,r&&"string"===r.type?{typeAnnotation:"coerce"}:void 0);return o?iE(new ik(o,t,r,n)):iF(s.errors)}var iB=class{constructor(e,t,r){this.kind=e,this._styleExpression=t,this.isStateDependent="constant"!==e&&!ic(t.expression),this.globalStateRefs=iL(t.expression),this._globalState=r}evaluateWithoutErrorHandling(e,t,r,n,i,a){return this._globalState&&(e=iO(e,this._globalState)),this._styleExpression.evaluateWithoutErrorHandling(e,t,r,n,i,a)}evaluate(e,t,r,n,i,a){return this._globalState&&(e=iO(e,this._globalState)),this._styleExpression.evaluate(e,t,r,n,i,a)}},iP=class{constructor(e,t,r,n,i){this.kind=e,this.zoomStops=r,this._styleExpression=t,this.isStateDependent="camera"!==e&&!ic(t.expression),this.globalStateRefs=iL(t.expression),this.interpolationType=n,this._globalState=i}evaluateWithoutErrorHandling(e,t,r,n,i,a){return this._globalState&&(e=iO(e,this._globalState)),this._styleExpression.evaluateWithoutErrorHandling(e,t,r,n,i,a)}evaluate(e,t,r,n,i,a){return this._globalState&&(e=iO(e,this._globalState)),this._styleExpression.evaluate(e,t,r,n,i,a)}interpolationFactor(e,t,r){return this.interpolationType?r6.interpolationFactor(this.interpolationType,e,t,r):0}};function iz(e,t,r,n){let i=iM(e,t,r,n);if("error"===i.result)return i;let a=i.value.expression,s=ih(a);if(!s&&!id(r))return iF([new ie("","data expressions not supported")]);let o=ip(a,["zoom"]);if(!o&&!iy(r))return iF([new ie("","zoom expressions not supported")]);let l=function e(t){let r=null;if(t instanceof ns)r=e(t.result);else if(t instanceof nd){for(let n of t.args)if(r=e(n))break}else(t instanceof r5||t instanceof r6)&&t.input instanceof ii&&"zoom"===t.input.name&&(r=t);return r instanceof ie||t.eachChild(t=>{let n=e(t);n instanceof ie?r=n:!r&&n?r=new ie("",'"zoom" expression may only be used as input to a top-level "step" or "interpolate" expression.'):r&&n&&r!==n&&(r=new ie("",'Only one zoom-based "step" or "interpolate" subexpression may be used in an expression.'))}),r}(a);if(!l&&!o)return iF([new ie("",'"zoom" expression may only be used as input to a top-level "step" or "interpolate" expression.')]);if(l instanceof ie)return iF([l]);if(l instanceof r6&&!im(r))return iF([new ie("",'"interpolate" expressions cannot be used with this property')]);if(!l)return iE(s?new iB("constant",i.value,n):new iB("source",i.value,n));let u=l instanceof r6?l.interpolation:void 0;return iE(s?new iP("camera",i.value,l.labels,u,n):new iP("composite",i.value,l.labels,u,n))}var iV=class e{constructor(e,t,r){this.isStateDependent=!1,this.globalStateRefs=new Set,this._globalState=null,iI(t),this._parameters=e,this._specification=r,this._rootKey=t,this._defaultValue=i$(r),this._warningHistory={};let n=function e(t,r){var n;let i=t.stops&&"object"==typeof t.stops[0][0],a=i||void 0!==t.property,s=t.type||(im(r)?"exponential":"interval"),o=function(e){switch(e.type){case"color":return rL.parse;case"padding":return rN.parse;case"numberArray":return rU.parse;case"colorArray":return rq.parse;default:return null}}(r);if(o&&((t=ig({},t)).stops&&(t.stops=t.stops.map(e=>[e[0],o(e[1])])),t.default?t.default=o(t.default):t.default=o(r.default)),t.colorSpace&&"rgb"!==(n=t.colorSpace)&&"hcl"!==n&&"lab"!==n)throw Error(`Unknown color space: "${t.colorSpace}"`);let l=function(e){switch(e){case"exponential":return iD;case"interval":return iA;case"categorical":return i_;case"identity":return iS;default:throw Error(`Unknown function type "${e}"`)}}(s),u,h;if("categorical"===s){for(let e of(u=Object.create(null),t.stops))u[e[0]]=e[1];h=typeof t.stops[0][0]}if(i){let n={},i=[];for(let e=0;e<t.stops.length;e++){let r=t.stops[e],a=r[0].zoom;void 0===n[a]&&(n[a]={zoom:a,type:t.type,property:t.property,default:t.default,stops:[]},i.push(a)),n[a].stops.push([r[0].value,r[1]])}let a=[];for(let t of i)a.push([n[t].zoom,e(n[t],r)]);let s={name:"linear"};return{kind:"composite",interpolationType:s,interpolationFactor:r6.interpolationFactor.bind(void 0,s),zoomStops:a.map(e=>e[0]),evaluate:({zoom:e},n)=>iD({stops:a,base:t.base},r,e).evaluate(e,n)}}if(i||!a){let e="exponential"===s?{name:"exponential",base:void 0===t.base?1:t.base}:null;return{kind:"camera",interpolationType:e,interpolationFactor:r6.interpolationFactor.bind(void 0,e),zoomStops:t.stops.map(e=>e[0]),evaluate:({zoom:e})=>l(t,r,e,u,h)}}return{kind:"source",evaluate(e,n){let i=n&&n.properties?n.properties[t.property]:void 0;return void 0===i?iw(t.default,r.default):l(t,r,i,u,h)}}}(this._parameters,this._specification);this.kind=n.kind,this.interpolationFactor=n.interpolationFactor,this.zoomStops=n.zoomStops,this.interpolationType=n.interpolationType,this._innerEvaluate=n.evaluate}evaluate(e,t){try{return this._innerEvaluate(e,t)}catch(r){let e=r instanceof Error?r.message:String(r),t=`|${e}`;return this._warningHistory[t]||(this._warningHistory[t]=!0,"u">typeof console&&console.warn(iT(this._rootKey,"",e,this._defaultValue))),this._defaultValue}}static deserialize(t){return new e(t._parameters,t._rootKey,t._specification)}static serialize(e){return{_parameters:e._parameters,_specification:e._specification,_rootKey:e._rootKey}}};function iL(e,t=new Set){return e instanceof n7&&t.add(e.key),e.eachChild(e=>{iL(e,t)}),t}function i$(e){if("color"===e.type&&iv(e.default))return new rL(0,0,0,0);switch(e.type){case"color":return rL.parse(e.default)||null;case"padding":return rN.parse(e.default)||null;case"numberArray":return rU.parse(e.default)||null;case"colorArray":return rq.parse(e.default)||null;case"variableAnchorOffsetCollection":return rX.parse(e.default)||null;case"projectionDefinition":return rZ.parse(e.default)||null;default:return void 0===e.default?null:e.default}}function iO(e,t){let{zoom:r,heatmapDensity:n,elevation:i,lineProgress:a,isSupportedScript:s,accumulated:o}=e??{};return{zoom:r,heatmapDensity:n,elevation:i,lineProgress:a,isSupportedScript:s,accumulated:o,globalState:t}}function iR(e){return"legacy"!==function e(t){if("boolean"==typeof t)return"neutral";if(!Array.isArray(t)||0===t.length)return"legacy";switch(t[0]){case"has":return t.length<2||"$id"===t[1]||"$type"===t[1]?"legacy":2===t.length?"neutral":"expression";case"in":return t.length>=3&&("string"!=typeof t[1]||Array.isArray(t[2]))?"expression":"legacy";case"!in":case"!has":case"none":return"legacy";case"==":case"!=":case">":case">=":case"<":case"<=":return 3!==t.length||Array.isArray(t[1])||Array.isArray(t[2])?"expression":"legacy";case"any":case"all":var r=t.slice(1);let n=!1;for(let t of r){let r=e(t);if("expression"===r)return"expression";"legacy"===r&&(n=!0)}return n?"legacy":"neutral";default:return"expression"}}(e)}function iN(e){return"$type"===e?["geometry-type"]:"$id"===e?["id"]:["get",e]}function iU(e){if(("<"===e[0]||"<="===e[0]||">"===e[0]||">="===e[0])&&"$type"===e[1])return`"$type" cannot be use with operator "${e[0]}"`;let t=function(e){switch(e[0]){case"==":case"!=":case"<":case"<=":case">":case">=":return 3!==e.length||"string"!=typeof e[1]?null:[e[0],iN(e[1]),e[2]];case"in":case"!in":{if(e.length<2||"string"!=typeof e[1])return null;let t=["in",iN(e[1]),["literal",e.slice(2)]];return"!in"===e[0]?["!",t]:t}case"has":case"!has":{if(2!==e.length||"string"!=typeof e[1]||"$type"===e[1]||"$id"===e[1])return null;let t=["has",e[1]];return"!has"===e[0]?["!",t]:t}default:return null}}(e);return t?`Mixing deprecated filter syntax with expression syntax is not supported. Replace ${JSON.stringify(e)} with ${JSON.stringify(t)}.`:`Mixing deprecated filter syntax with expression syntax is not supported. Convert ${JSON.stringify(e)} to expression syntax.`}function iq(e,t,r){let n=r[e];return Array.isArray(n)?iR(n)?ij(n,t.concat(e)):{path:t.concat(e),legacyFilter:n}:null}function ij(e,t=[]){if(!Array.isArray(e)||e.length<1)return null;switch(e[0]){case"all":case"any":case"none":for(let r=1;r<e.length;r++){let n=iq(r,t,e);if(n)return n}break;case"!":{let r=iq(1,t,e);if(r)return r;break}case"case":for(let r=1;r<e.length-1;r+=2){let n=iq(r,t,e);if(n)return n}}return null}let iG={type:"boolean",default:!1,transition:!1,"property-type":"data-driven",expression:{interpolated:!1,parameters:["zoom","feature"]}};function iX(e,t,r){if(null==e)return{filter:()=>!0,needGeometry:!1,getGlobalStateRefs:()=>new Set};iR(e)?function(e,t){let r=ij(e);if(!r||typeof console>"u")return;let n=r.path.map(e=>`[${e}]`).join("");console.warn(`${t}${n}: ${iU(r.legacyFilter)}`)}(e,t):e=function e(t){if(!t)return!0;let r=t[0];return t.length<=1?"any"!==r:"=="===r?iZ(t[1],t[2],"=="):"!="===r?iK(iZ(t[1],t[2],"==")):"<"===r||">"===r||"<="===r||">="===r?iZ(t[1],t[2],r):"any"===r?["any"].concat(t.slice(1).map(e)):"all"===r?["all"].concat(t.slice(1).map(e)):"none"===r?["all"].concat(t.slice(1).map(e).map(iK)):"in"===r?iW(t[1],t.slice(2)):"!in"===r?iK(iW(t[1],t.slice(2))):"has"===r?iH(t[1]):"!has"!==r||iK(iH(t[1]))}(e);let n=iM(e,t,iG,r);
1if("error"===n.result)throw Error(n.value.map(e=>`${e.key}: ${e.message}`).join(", "));return{filter:(e,t,r)=>n.value.evaluate(e,t,{},r),needGeometry:function e(t){if(!Array.isArray(t))return!1;if("within"===t[0]||"distance"===t[0])return!0;for(let r=1;r<t.length;r++)if(e(t[r]))return!0;return!1}(e),getGlobalStateRefs:()=>iL(n.value.expression)}}function iY(e,t){return e<t?-1:+(e>t)}function iZ(e,t,r){switch(e){case"$type":return[`filter-type-${r}`,t];case"$id":return[`filter-id-${r}`,t];default:return[`filter-${r}`,e,t]}}function iW(e,t){if(0===t.length)return!1;switch(e){case"$type":return["filter-type-in",["literal",t]];case"$id":return["filter-id-in",["literal",t]];default:return t.length>200&&!t.some(e=>typeof e!=typeof t[0])?["filter-in-large",e,["literal",t.sort(iY)]]:["filter-in-small",e,["literal",t]]}}function iH(e){switch(e){case"$type":return!0;case"$id":return["filter-has-id"];default:return["filter-has",e]}}function iK(e){return["!",e]}function iJ(e){let t=e.key,r=e.value;return r?[new t5(t,r,"constants have been deprecated as of v8")]:[]}function iQ(e){return e instanceof Number||e instanceof String||e instanceof Boolean?e.valueOf():e}function i0(e){if(Array.isArray(e))return e.map(i0);if(e instanceof Object&&!(e instanceof Number||e instanceof String||e instanceof Boolean)){let t={};for(let r in e)t[r]=i0(e[r]);return t}return iQ(e)}function i1(e){let t=e.key,r=e.value,n=e.valueSpec||{},i=e.objectElementValidators||{},a=e.style,s=e.styleSpec,o=e.validateSpec,l=[],u=ix(r);if("object"!==u)return[new t5(t,r,`object expected, ${u} found`)];for(let e in r){let u=e.split(".")[0],h=rI(n,u)||n["*"],c;if(rI(i,u))c=i[u];else if(rI(n,u)){if(void 0===r[e])continue;c=o}else if(i["*"])c=i["*"];else if(n["*"])c=o;else{l.push(new t5(t,r[e],`unknown property "${e}"`));continue}l=l.concat(c({key:(t&&`${t}.`)+e,value:r[e],valueSpec:h,style:a,styleSpec:s,object:r,objectKey:e,validateSpec:o},r))}for(let e in n)i[e]||n[e].required&&void 0===n[e].default&&void 0===r[e]&&l.push(new t5(t,r,`missing required property "${e}"`));return l}function i2(e){let t=e.value,r=e.valueSpec,n=e.validateSpec,i=e.style,a=e.styleSpec,s=e.key,o=e.arrayElementValidator||n;if("array"!==ix(t))return[new t5(s,t,`array expected, ${ix(t)} found`)];if(r.length&&t.length!==r.length)return[new t5(s,t,`array length ${r.length} expected, length ${t.length} found`)];let l={type:r.value,values:r.values};a.$version<7&&(l.function=r.function),"object"===ix(r.value)&&(l=r.value);let u=[];for(let r=0;r<t.length;r++)u=u.concat(o({array:t,arrayIndex:r,value:t[r],valueSpec:l,validateSpec:e.validateSpec,style:i,styleSpec:a,key:`${s}[${r}]`}));return u}function i3(e){let t=e.key,r=e.value,n=e.valueSpec,i=ix(r);return"number"===i&&r!=r&&(i="NaN"),"number"===i?"minimum"in n&&r<n.minimum?[new t5(t,r,`${r} is less than the minimum value ${n.minimum}`)]:"maximum"in n&&r>n.maximum?[new t5(t,r,`${r} is greater than the maximum value ${n.maximum}`)]:[]:[new t5(t,r,`number expected, ${i} found`)]}function i5(e){let t=e.valueSpec,r=iQ(e.value.type),n,i={},a,s,o="categorical"!==r&&void 0===e.value.property,l="array"===ix(e.value.stops)&&"array"===ix(e.value.stops[0])&&"object"===ix(e.value.stops[0][0]),u=i1({key:e.key,value:e.value,valueSpec:e.styleSpec.function,validateSpec:e.validateSpec,style:e.style,styleSpec:e.styleSpec,objectElementValidators:{stops:function(e){if("identity"===r)return[new t5(e.key,e.value,'identity function may not have a "stops" property')];let t=[],n=e.value;return t=t.concat(i2({key:e.key,value:n,valueSpec:e.valueSpec,validateSpec:e.validateSpec,style:e.style,styleSpec:e.styleSpec,arrayElementValidator:h})),"array"===ix(n)&&0===n.length&&t.push(new t5(e.key,n,"array must have at least one stop")),t},default:function(e){return e.validateSpec({key:e.key,value:e.value,valueSpec:t,validateSpec:e.validateSpec,style:e.style,styleSpec:e.styleSpec})}}});return"identity"===r&&o&&u.push(new t5(e.key,e.value,'missing required property "property"')),"identity"===r||e.value.stops||u.push(new t5(e.key,e.value,'missing required property "stops"')),"exponential"===r&&e.valueSpec.expression&&!im(e.valueSpec)&&u.push(new t5(e.key,e.value,"exponential functions not supported")),e.styleSpec.$version>=8&&(o||id(e.valueSpec)?o&&!iy(e.valueSpec)&&u.push(new t5(e.key,e.value,"zoom functions not supported")):u.push(new t5(e.key,e.value,"property functions not supported"))),("categorical"===r||l)&&void 0===e.value.property&&u.push(new t5(e.key,e.value,'"property" property is required')),u;
1function h(e){let r=[],n=e.value,o=e.key;if("array"!==ix(n))return[new t5(o,n,`array expected, ${ix(n)} found`)];if(2!==n.length)return[new t5(o,n,`array length 2 expected, length ${n.length} found`)];if(l){if("object"!==ix(n[0]))return[new t5(o,n,`object expected, ${ix(n[0])} found`)];if(void 0===n[0].zoom)return[new t5(o,n,"object stop key must have zoom")];if(void 0===n[0].value)return[new t5(o,n,"object stop key must have value")];if(s&&s>iQ(n[0].zoom))return[new t5(o,n[0].zoom,"stop zoom values must appear in ascending order")];iQ(n[0].zoom)!==s&&(s=iQ(n[0].zoom),a=void 0,i={}),r=r.concat(i1({key:`${o}[0]`,value:n[0],valueSpec:{zoom:{}},validateSpec:e.validateSpec,style:e.style,styleSpec:e.styleSpec,objectElementValidators:{zoom:i3,value:c}}))}else r=r.concat(c({key:`${o}[0]`,value:n[0],valueSpec:{},validateSpec:e.validateSpec,style:e.style,styleSpec:e.styleSpec},n));return iC(i0(n[1]))?r.concat([new t5(`${o}[1]`,n[1],"expressions are not allowed in function stops.")]):r.concat(e.validateSpec({key:`${o}[1]`,value:n[1],valueSpec:t,validateSpec:e.validateSpec,style:e.style,styleSpec:e.styleSpec}))}function c(e,s){let o=ix(e.value),l=iQ(e.value),u=null===e.value?s:e.value;if(n){if(o!==n)return[new t5(e.key,u,`${o} stop domain type must match previous stop domain type ${n}`)]}else n=o;if("number"!==o&&"string"!==o&&"boolean"!==o)return[new t5(e.key,u,"stop domain value must be a number, string, or boolean")];if("number"!==o&&"categorical"!==r){let n=`number expected, ${o} found`;return id(t)&&void 0===r&&(n+='\nIf you intended to use a categorical function, specify `"type": "categorical"`.'),[new t5(e.key,u,n)]}return"categorical"!==r||"number"!==o||isFinite(l)&&Math.floor(l)===l?"categorical"!==r&&"number"===o&&void 0!==a&&l<a?[new t5(e.key,u,"stop domain values must appear in ascending order")]:(a=l,"categorical"===r&&l in i?[new t5(e.key,u,"stop domain values must be unique")]:(i[l]=!0,[])):[new t5(e.key,u,`integer expected, found ${l}`)]}}function i6(e){let t=("property"===e.expressionContext?iz:iM)(i0(e.value),e.key,e.valueSpec);if("error"===t.result)return t.value.map(t=>new t5(`${e.key}${t.key}`,e.value,t.message));let r=t.value.expression||t.value._styleExpression.expression;if("property"===e.expressionContext&&"text-font"===e.propertyKey&&!r.outputDefined())return[new t5(e.key,e.value,`Invalid data expression for "${e.propertyKey}". Output values must be contained as literals within the expression.`)];if("property"===e.expressionContext&&"layout"===e.propertyType&&!ic(r))return[new t5(e.key,e.value,'"feature-state" data expressions are not supported with layout properties.')];if("filter"===e.expressionContext&&!ic(r))return[new t5(e.key,e.value,'"feature-state" data expressions are not supported with filters.')];if(e.expressionContext&&0===e.expressionContext.indexOf("cluster")){if(!ip(r,["zoom","feature-state"]))return[new t5(e.key,e.value,'"zoom" and "feature-state" expressions are not supported with cluster properties.')];if("cluster-initial"===e.expressionContext&&!ih(r))return[new t5(e.key,e.value,"Feature data expressions are not supported with initial expression part of cluster properties.")]}return[]}function i4(e){let t=e.key,r=e.value,n=ix(r);return"string"===n?rL.parse(String(r))?[]:[new t5(t,r,`color expected, "${r}" found`)]:[new t5(t,r,`color expected, ${n} found`)]}function i8(e){let t=e.key,r=e.value,n=e.valueSpec,i=[];return Array.isArray(n.values)?-1===n.values.indexOf(iQ(r))&&i.push(new t5(t,r,`expected one of [${n.values.join(", ")}], ${JSON.stringify(r)} found`)):-1===Object.keys(n.values).indexOf(iQ(r))&&i.push(new t5(t,r,`expected one of [${Object.keys(n.values).join(", ")}], ${JSON.stringify(r)} found`)),i}function i7(e){let t,r=i0(e.value);return iR(r)?[...(t=ij(r))?[new t5(`${e.key}${t.path.map(e=>`[${e}]`).join("")}`,function(e,t){let r=e;for(let e of t)r=r[e];return r}(e.value,t.path),iU(t.legacyFilter),null,"warning")]:[],...i6(ig({},e,{expressionContext:"filter",valueSpec:{value:"boolean"}}))]:function e(t){let r=t.value,n=t.key;if("array"!==ix(r))return[new t5(n,r,`array expected, ${ix(r)} found`)];let i=t.styleSpec,a,s=[];if(r.length<1)return[new t5(n,r,"filter array must have at least 1 element")];switch(s=s.concat(i8({key:`${n}[0]`,value:r[0],valueSpec:i.filter_operator,style:t.style,styleSpec:t.styleSpec})),iQ(r[0])){case"<":case"<=":case">":case">=":r.length>=2&&"$type"===iQ(r[1])&&s.push(new t5(n,r,`"$type" cannot be use with operator "${r[0]}"`));case"==":case"!=":3!==r.length&&s.push(new t5(n,r,`filter array for operator "${r[0]}" must have 3 elements`));case"in":case"!in":r.length>=2&&"string"!==(a=ix(r[1]))&&s.push(new t5(`${n}[1]`,r[1],`string expected, ${a} found`));for(let e=2;e<r.length;e++)a=ix(r[e]),"$type"===iQ(r[1])?s=s.concat(i8({key:`${n}[${e}]`,value:r[e],valueSpec:i.geometry_type,style:t.style,styleSpec:t.styleSpec})):"string"!==a&&"number"!==a&&"boolean"!==a&&s.push(new t5(`${n}[${e}]`,r[e],`string, number, or boolean expected, ${a} found`));break;case"any":case"all":case"none":for(let i=1;i<r.length;i++)s=s.concat(e({key:`${n}[${i}]`,value:r[i],style:t.style,styleSpec:t.styleSpec}));break;case"has":case"!has":a=ix(r[1]),2===r.length?"string"!==a&&s.push(new t5(`${n}[1]`,r[1],`string expected, ${a} found`)):s.push(new t5(n,r,`filter array for "${r[0]}" operator must have 2 elements`))}return s}(e)}function i9(e,t){let r,n=e.key,i=e.validateSpec,a=e.style,s=e.styleSpec,o=e.value,l=e.objectKey,u=s[`${t}_${e.layerType}`];if(!u)return[];let h=l.match(/^(.*)-transition$/);if("paint"===t&&h&&u[h[1]]&&u[h[1]].transition)return i({key:n,value:o,valueSpec:s.transition,style:a,styleSpec:s}
vendor: 4,888 bytes, lines 1-2
1);let c=e.valueSpec||u[l];if(!c)return[new t5(n,o,`unknown property "${l}"`)];if("string"===ix(o)&&id(c)&&!c.tokens&&(r=/^{([^}]+)}$/.exec(o)))return[new t5(n,o,`"${l}" does not support interpolation syntax 2Use an identity property function instead: \`{ "type": "identity", "property": ${JSON.stringify(r[1])} }\`.`)];let p=[];return"symbol"===e.layerType&&"text-font"===l&&iv(i0(o))&&"identity"===iQ(o.type)&&p.push(new t5(n,o,'"text-font" does not support identity functions')),p.concat(i({key:e.key,value:o,valueSpec:c,style:a,styleSpec:s,expressionContext:"property",propertyType:t,propertyKey:l}))}function ae(e){return i9(e,"paint")}function at(e){return i9(e,"layout")}function ar(e){let t=[],r=e.value,n=e.key,i=e.style,a=e.styleSpec;if("object"!==ix(r))return[new t5(n,r,`object expected, ${ix(r)} found`)];r.type||r.ref||t.push(new t5(n,r,'either "type" or "ref" is required'));let s=iQ(r.type),o=iQ(r.ref);if(r.id){let a=iQ(r.id);for(let s=0;s<e.arrayIndex;s++){let e=i.layers[s];iQ(e.id)===a&&t.push(new t5(n,r.id,`duplicate layer id "${r.id}", previously used at line ${e.id.__line__}`))}}if("ref"in r){let e;["type","source","source-layer","filter","layout"].forEach(e=>{e in r&&t.push(new t5(n,r[e],`"${e}" is prohibited for ref layers`))}),i.layers.forEach(t=>{iQ(t.id)===o&&(e=t)}),e?e.ref?t.push(new t5(n,r.ref,"ref cannot reference another ref layer")):s=iQ(e.type):t.push(new t5(n,r.ref,`ref layer "${o}" not found`))}else if("background"!==s)if(r.source){let e=i.sources&&i.sources[r.source],a=e&&iQ(e.type);e?"vector"===a&&"raster"===s?t.push(new t5(n,r.source,`layer "${r.id}" requires a raster source`)):"raster-dem"!==a&&"hillshade"===s||"raster-dem"!==a&&"color-relief"===s?t.push(new t5(n,r.source,`layer "${r.id}" requires a raster-dem source`)):"raster"===a&&"raster"!==s?t.push(new t5(n,r.source,`layer "${r.id}" requires a vector source`)):"vector"!==a||r["source-layer"]?"raster-dem"===a&&"hillshade"!==s&&"color-relief"!==s?t.push(new t5(n,r.source,"raster-dem source can only be used with layer type 'hillshade' or 'color-relief'.")):"line"===s&&r.paint&&r.paint["line-gradient"]&&("geojson"!==a||!e.lineMetrics)&&t.push(new t5(n,r,`layer "${r.id}" specifies a line-gradient, which requires a GeoJSON source with \`lineMetrics\` enabled.`)):t.push(new t5(n,r,`layer "${r.id}" must specify a "source-layer"`)):t.push(new t5(n,r.source,`source "${r.source}" not found`))}else t.push(new t5(n,r,'missing required property "source"'));return"raster"===s&&r.paint?.resampling&&r.paint?.["raster-resampling"]&&t.push(new t5(n,r.paint,`layer "${r.id}" redundantly specifies "resampling" and "raster-resampling" paint properties, but only one is allowed. It is advised to use "resampling".`)),t=t.concat(i1({key:n,value:r,valueSpec:a.layer,style:e.style,styleSpec:e.styleSpec,validateSpec:e.validateSpec,objectElementValidators:{"*":()=>[],type:()=>e.validateSpec({key:`${n}.type`,value:r.type,valueSpec:a.layer.type,style:e.style,styleSpec:e.styleSpec,validateSpec:e.validateSpec,object:r,objectKey:"type"}),filter:i7,layout:e=>i1({layer:r,key:e.key,value:e.value,style:e.style,styleSpec:e.styleSpec,validateSpec:e.validateSpec,objectElementValidators:{"*":e=>at(ig({layerType:s},e))}}),paint:e=>i1({layer:r,key:e.key,value:e.value,style:e.style,styleSpec:e.styleSpec,validateSpec:e.validateSpec,objectElementValidators:{"*":e=>ae(ig({layerType:s},e))}})}}))}function an(e){let t=e.value,r=e.key,n=ix(t);return"string"===n?[]:[new t5(r,t,`string expected, ${n} found`)]}let ai={promoteId:function({key:e,value:t}){if("string"===ix(t))return an({key:e,value:t});{let r=[];for(let n in t)r.push(...an({key:`${e}.${n}`,value:t[n]}));return r}}};function aa(e){let t=e.value,r=e.key,n=e.styleSpec,i=e.style,a=e.validateSpec;if(!t.type)return[new t5(r,t,'"type" is required')];let s=iQ(t.type),o;switch(s){case"vector":case"raster":return i1({key:r,value:t,valueSpec:n[`source_${s.replace("-","_")}`],style:e.style,styleSpec:n,objectElementValidators:ai,validateSpec:a});case"raster-dem":return function(e){let t=e.sourceName??"",r=e.value,n=e.styleSpec,i=n.source_raster_dem,a=e.style,s=[],o=ix(r);if(void 0===r)return s;if("object"!==o)return s.push(new t5("source_raster_dem",r,`object expected, ${o} found`)),s;let l="custom"===iQ(r.encoding),u=["redFactor","greenFactor","blueFactor","baseShift"],h=e.value.encoding?`"${e.value.encoding}"`:"Default";for(let o in r)!l&&u.includes(o)?s.push(new t5(o,r[o],`In "${t}": "${o}" is only valid when "encoding" is set to "custom". ${h} encoding found`)):i[o]?s=s.concat(e.validateSpec({key:o,value:r[o],valueSpec:i[o],validateSpec:e.validateSpec,style:a,styleSpec:n})):s.push(new t5(o,r[o],`unknown property "${o}"`));return s}({sourceName:r,value:t,style:e.style,styleSpec:n,validateSpec:a});case"geojson":if(o=i1({key:r,value:t,valueSpec:n.source_geojson,style:i,styleSpec:n,validateSpec:a,objectElementValidators:ai}
2),t.cluster)for(let e in t.clusterProperties){let[n,i]=t.clusterProperties[e],s="string"==typeof n?[n,["accumulated"],["get",e]]:n;o.push(...i6({key:`${r}.${e}.map`,value:i,validateSpec:a,expressionContext:"cluster-map"})),o.push(...i6({key:`${r}.${e}.reduce`,value:s,validateSpec:a,expressionContext:"cluster-reduce"}))}return o;case"video":return i1({key:r,value:t,valueSpec:n.source_video,style:i,validateSpec:a,styleSpec:n});case"image":return i1({key:r,value:t,valueSpec:n.source_image,style:i,validateSpec:a,styleSpec:n});case"canvas":return[new t5(r,null,"Please use runtime APIs to add canvas sources, rather than including them in stylesheets.","source.canvas")];default:return i8({key:`${r}.type`,value:t.type,valueSpec:{values:["vector","raster","raster-dem","geojson","video","image"]},style:i,validateSpec:a,styleSpec:n})}}function as(e){let t=e.value,r=e.styleSpec,n=r.light,i=e.style,a=[],s=ix(t);if(void 0===t)return a;if("object"!==s)return a.concat([new t5("light",t,`object expected, ${s} found`)]);for(let s in t){let o=s.match(/^(.*)-transition$/);a=o&&n[o[1]]&&n[o[1]].transition?a.concat(e.validateSpec({key:s,value:t[s],valueSpec:r.transition,validateSpec:e.validateSpec,style:i,styleSpec:r})):n[s]?a.concat(e.validateSpec({key:s,value:t[s],valueSpec:n[s],validateSpec:e.validateSpec,style:i,styleSpec:r})):a.concat([new t5(s,t[s],`unknown property "${s}"`)])}return a}function ao(e){let t=e.value,r=e.styleSpec,n=r.sky,i=e.style,a=ix(t);if(void 0===t)return[];if("object"!==a)return[new t5("sky",t,`object expected, ${a} found`)];let s=[];for(let a in t)s=n[a]?s.concat(e.validateSpec({key:a,value:t[a],valueSpec:n[a],style:i,styleSpec:r})):s.concat([new t5(a,t[a],`unknown property "${a}"`)]);return s}function al(e){let t=e.value,r=e.styleSpec,n=r.terrain,i=e.style,a=[],s=ix(t);if(void 0===t)return a;
2if("object"!==s)return a.concat([new t5("terrain",t,`object expected, ${s} found`)]);for(let s in t)a=n[s]?a.concat(e.validateSpec({key:s,value:t[s],valueSpec:n[s],validateSpec:e.validateSpec,style:i,styleSpec:r})):a.concat([new t5(s,t[s],`unknown property "${s}"`)]);return a}function au(e){let t=[],r=e.value,n=e.key;if(Array.isArray(r)){let i=[],a=[];for(let s in r)r[s].id&&i.includes(r[s].id)&&t.push(new t5(n,r,`all the sprites' ids must be unique, but ${r[s].id} is duplicated`)),i.push(r[s].id),r[s].url&&a.includes(r[s].url)&&t.push(new t5(n,r,`all the sprites' URLs must be unique, but ${r[s].url} is duplicated`)),a.push(r[s].url),t=t.concat(i1({key:`${n}[${s}]`,value:r[s],valueSpec:{id:{type:"string",required:!0},url:{type:"string",required:!0}},validateSpec:e.validateSpec}));return t}return an({key:n,value:r})}function ah(e){return!!e&&e.constructor===Object}function ac(e){return ah(e.value)?[]:[new t5(e.key,e.value,`object expected, ${ix(e.value)} found`)]}let ap=/^u\+(?:([0-9a-f]{1,6})(?:-([0-9a-f]{1,6}))?|([0-9a-f]{0,5}\?{1,6}))$/i;function af(e){let t=e.key??"font-faces",r=e.value,n=e.validateSpec,i=e.styleSpec??t1,a=e.style;if(!ah(r))return[new t5(t,r,`object expected, ${ix(r)} found`)];let s=[];for(let e in r){let o=r[e],l=ix(o);if("string"===l)s.push(...an({key:`${t}.${e}`,value:o}));else if("array"===l){let r={url:{type:"string",required:!0},"unicode-range":{type:"array",value:"string"}};for(let[l,u]of o.entries()){let o=`${t}.${e}[${l}]`;s.push(...i1({key:o,value:u,valueSpec:r,styleSpec:i,style:a,validateSpec:n}));let h=ah(u)?u["unicode-range"]:void 0;if("array"===ix(h))for(let[e,t]of h.entries())s.push(...function(e,t){if("string"!==ix(t))return[];let r=`${t}`,n=()=>[new t5(e,t,'invalid unicode range, expected a value such as "U+26", "U+0-10FFFF" or "U+4??"')],i=r.match(ap);if(!i)return n();let[,a,s,o]=i;if(void 0!==o)return o.length>6?n():[];let l=parseInt(a,16),u=void 0===s?l:parseInt(s,16);return l>1114111||u>1114111?[new t5(e,t,"unicode range is out of bounds, the maximum code point is U+10FFFF")]:l>u?[new t5(e,t,`unicode range start must not be greater than its end, but ${r} is`)]:[]}(`${o}.unicode-range[${e}]`,t))}}else s.push(new t5(`${t}.${e}`,o,`string or array expected, ${l} found`))}return s}let ad={"*":()=>[],array:i2,boolean:function(e){let t=e.value,r=e.key,n=ix(t);return"boolean"===n?[]:[new t5(r,t,`boolean expected, ${n} found`)]},number:i3,color:i4,constants:iJ,enum:i8,filter:i7,function:i5,layer:ar,object:i1,source:aa,light:as,sky:ao,terrain:al,projection:function(e){let t=e.value,r=e.styleSpec,n=r.projection,i=e.style,a=ix(t);if(void 0===t)return[];if("object"!==a)return[new t5("projection",t,`object expected, ${a} found`)];let s=[];for(let a in t)s=n[a]?s.concat(e.validateSpec({key:a,value:t[a],valueSpec:n[a],style:i,styleSpec:r})):s.concat([new t5(a,t[a],`unknown property "${a}"`)]);return s},projectionDefinition:function(e){var t;let r=e.key,n=e.value,i=ix(n=n instanceof String?n.valueOf():n);return"array"!==i||Array.isArray(t=n)&&3===t.length&&"string"==typeof t[0]&&"string"==typeof t[1]&&"number"==typeof t[2]||["interpolate","step","literal"].includes(n[0])?["array","string"].includes(i)?[]:[new t5(r,n,`projection expected, invalid type "${i}" found`)]:[new t5(r,n,`projection expected, invalid array ${JSON.stringify(n)} found`)]},string:an,formatted:function(e){return 0===an(e).length?[]:i6(e)},resolvedImage:function(e){return 0===an(e).length?[]:i6(e)},padding:function(e){let t=e.key,r=e.value;if("array"===ix(r)){if(r.length<1||r.length>4)return[new t5(t,r,`padding requires 1 to 4 values; ${r.length} values found`)];let n={type:"number"},i=[];for(let a=0;a<r.length;a++)i=i.concat(e.validateSpec({key:`${t}[${a}]`,value:r[a],validateSpec:e.validateSpec,valueSpec:n}));return i}return i3({key:t,value:r,valueSpec:{}})},numberArray:function(e){let t=e.key,r=e.value;if("array"===ix(r)){let n={type:"number"};if(r.length<1)return[new t5(t,r,"array length at least 1 expected, length 0 found")];let i=[];for(let a=0;a<r.length;a++)i=i.concat(e.validateSpec({key:`${t}[${a}]`,value:r[a],validateSpec:e.validateSpec,valueSpec:n}));return i}return i3({key:t,value:r,valueSpec:{}}
2)},colorArray:function(e){let t=e.key,r=e.value;if("array"===ix(r)){if(r.length<1)return[new t5(t,r,"array length at least 1 expected, length 0 found")];let e=[];for(let n=0;n<r.length;n++)e=e.concat(i4({key:`${t}[${n}]`,value:r[n],valueSpec:{}}));return e}return i4({key:t,value:r,valueSpec:{}})},variableAnchorOffsetCollection:function(e){let t=e.key,r=e.value,n=ix(r),i=e.styleSpec;if("array"!==n||r.length<1||r.length%2!=0)return[new t5(t,r,"variableAnchorOffsetCollection requires a non-empty array of even length")];let a=[];for(let n=0;n<r.length;n+=2)a=(a=a.concat(i8({key:`${t}[${n}]`,value:r[n],valueSpec:i.layout_symbol["text-anchor"]}))).concat(i2({key:`${t}[${n+1}]`,value:r[n+1],valueSpec:{length:2,value:"number"},validateSpec:e.validateSpec,style:e.style,styleSpec:i}));return a},sprite:au,state:ac,fontFaces:af};function ay(e){let t=e.value,r=e.valueSpec,n=e.styleSpec;return e.validateSpec=ay,r.expression&&iv(iQ(t))?i5(e):r.expression&&iC(i0(t))?i6(e):r.type&&ad[r.type]?ad[r.type](e):i1(ig({},e,{valueSpec:r.type?n[r.type]:r}))}function am(e){let t=e.value,r=e.key,n=an(e);return n.length||(-1===t.indexOf("{fontstack}")&&n.push(new t5(r,t,'"glyphs" url must include a "{fontstack}" token')),-1===t.indexOf("{range}")&&n.push(new t5(r,t,'"glyphs" url must include a "{range}" token'))),n}function ag(e,t=t2){let r=[];return r=r.concat(ay({key:"",value:e,valueSpec:t.$root,styleSpec:t,style:e,validateSpec:ay,objectElementValidators:{glyphs:am,"*":()=>[]}})),e.constants&&(r=r.concat(iJ({key:"constants",value:e.constants,style:e,styleSpec:t,validateSpec:ay}))),av(r)}function ax(e){return function(t){return e(Object.assign({},t,{validateSpec:ay}))}}function av(e){return[].concat(e).sort((e,t)=>e.line-t.line)}function ab(e){return function(...t){return av(e.apply(this,t))}}ag.source=ab(ax(aa)),ag.sprite=ab(ax(au)),ag.glyphs=ab(ax(am)),ag.fontFaces=ab(ax(af)),ag.light=ab(ax(as)),ag.sky=ab(ax(ao)),ag.terrain=ab(ax(al)),ag.state=ab(ax(ac)),ag.layer=ab(ax(ar)),ag.filter=ab(ax(i7)),ag.paintProperty=ab(ax(ae)),ag.layoutProperty=ab(ax(at));let aw={type:"enum","property-type":"data-constant",expression:{interpolated:!1,parameters:["global-state"]},values:{visible:{},none:{}},transition:!1,default:"visible"};var a_=class{constructor(e,t,r){this._rootKey=t,this._globalState=r,this.setValue(e)}evaluate(){return this._literalValue??this._compiledValue.evaluate({})}setValue(e){if(null==e||"visible"===e||"none"===e){this._literalValue="none"===e?"none":"visible",this._compiledValue=void 0,this._globalStateRefs=new Set;return}let t=iM(e,this._rootKey,aw,this._globalState);if("error"===t.result)throw this._literalValue="visible",this._compiledValue=void 0,Error(t.value.map(e=>`${e.key}: ${e.message}`).join(", "));this._literalValue=void 0,this._compiledValue=t.value,this._globalStateRefs=iL(t.value.expression)}getGlobalStateRefs(){return this._globalStateRefs}};let aA=ag,aD=new Set(Object.keys(t2).filter(e=>e.startsWith("source_")).map(e=>e.slice(7).replaceAll("_","-")));function aS(e,t){let r=Object.entries(t.sources??{}).filter(([,e])=>!aD.has(e.type)).map(([e])=>`sources.${e}`);return aE(e,aA(t).filter(({message:e})=>!r.some(t=>e.startsWith(`${t}:`)||e.startsWith(`${t}.`))))}function aE(e,t){let r=!1;for(let n of t){if("warning"===n.severity){th(n.message);continue}e.fire(new tQ(Error(n.message))),r=!0}return r}function aF(e,t,r,n){return n?.validate!==!1&&aE(e,t({styleSpec:t2,...r}))}var ak=class e{constructor(e,t,r){let n=this.cells=[];if(e instanceof ArrayBuffer){this.arrayBuffer=e;let i=new Int32Array(this.arrayBuffer);e=i[0],t=i[1],r=i[2],this.d=t+2*r;for(let e=0;e<this.d*this.d;e++){let t=i[3+e],r=i[3+e+1];n.push(t===r?null:i.subarray(t,r))}let a=i[3+n.length],s=i[3+n.length+1];this.keys=i.subarray(a,s),this.bboxes=i.subarray(s),this.insert=this._insertReadonly}else{this.d=t+2*r;for(let e=0;e<this.d*this.d;e++)n.push([]);this.keys=[],this.bboxes=[]}this.n=t,this.extent=e,this.padding=r,this.scale=t/e,this.uid=0;let i=r/t*e;this.min=-i,this.max=e+i}insert(e,t,r,n,i){this._forEachCell(t,r,n,i,this._insertCell,this.uid++,void 0,void 0),this.keys.push(e),this.bboxes.push(t),this.bboxes.push(r),this.bboxes.push(n),this.bboxes.push(i)}_insertReadonly(){throw Error("Cannot insert into a GridIndex created from an ArrayBuffer.")}_insertCell(e,t,r,n,i,a){this.cells[i].push(a)}query(e,t,r,n,i){let a=this.min,s=this.max;if(e<=a&&t<=a&&s<=r&&s<=n&&!i)return[...this.keys];{let a=[];
vendor: 16,561 bytes, line 2
2return this._forEachCell(e,t,r,n,this._queryCell,a,{},i),a}}_queryCell(e,t,r,n,i,a,s,o){let l=this.cells[i];if(null!==l){let i=this.keys,u=this.bboxes;for(let h of l)if(void 0===s[h]){let l=4*h;(o?o(u[l+0],u[l+1],u[l+2],u[l+3]):e<=u[l+2]&&t<=u[l+3]&&r>=u[l+0]&&n>=u[l+1])?(s[h]=!0,a.push(i[h])):s[h]=!1}}}_forEachCell(e,t,r,n,i,a,s,o){let l=this._convertToCellCoord(e),u=this._convertToCellCoord(t),h=this._convertToCellCoord(r),c=this._convertToCellCoord(n);for(let p=l;p<=h;p++)for(let l=u;l<=c;l++){let u=this.d*l+p;if((!o||o(this._convertFromCellCoord(p),this._convertFromCellCoord(l),this._convertFromCellCoord(p+1),this._convertFromCellCoord(l+1)))&&i.call(this,e,t,r,n,u,a,s,o))return}}_convertFromCellCoord(e){return(e-this.padding)/this.scale}_convertToCellCoord(e){return Math.max(0,Math.min(this.d-1,Math.floor(e*this.scale)+this.padding))}toArrayBuffer(){if(this.arrayBuffer)return this.arrayBuffer;let e=this.cells,t=3+this.cells.length+1+1,r=0;for(let e of this.cells)r+=e.length;let n=new Int32Array(t+r+this.keys.length+this.bboxes.length);n[0]=this.extent,n[1]=this.n,n[2]=this.padding;let i=t;for(let t=0;t<e.length;t++){let r=e[t];n[3+t]=i,n.set(r,i),i+=r.length}return n[3+e.length]=i,n.set(this.keys,i),i+=this.keys.length,n[3+e.length+1]=i,n.set(this.bboxes,i),i+=this.bboxes.length,n.buffer}static serialize(e,t){let r=e.toArrayBuffer();return t&&t.push(r),{buffer:r}}static deserialize(t){return new e(t.buffer)}};let aT={};function aI(e,t,r={}){if(aT[e])throw Error(`${e} is already registered.`);Object.defineProperty(t,"_classRegistryKey",{value:e,writeable:!1}),aT[e]={klass:t,omit:r.omit||[],shallow:r.shallow||[]}}for(let e in aI("Object",Object),aI("Set",Set),aI("TransferableGridIndex",ak),aI("Color",rL),aI("Error",Error),aI("AJAXError",tU),aI("ResolvedImage",rY),aI("StylePropertyFunction",iV),aI("StyleExpression",ik,{omit:["_evaluator"]}),aI("ZoomDependentExpression",iP),aI("ZoomConstantExpression",iB),aI("CompoundExpression",ii,{omit:["_evaluate"]}),n9)n9[e]._classRegistryKey||aI(`Expression_${e}`,n9[e]);function aC(e){return e&&"u">typeof ArrayBuffer&&(e instanceof ArrayBuffer||e.constructor?.name==="ArrayBuffer")}function aM(e){let t=e.constructor;return e.$name||t._classRegistryKey}function aB(e){return!function(e){if("object"!=typeof e||!e)return!1;let t=aM(e);return t&&"Object"!==t}(e)&&(null==e||"boolean"==typeof e||"number"==typeof e||"string"==typeof e||e instanceof Boolean||e instanceof Number||e instanceof String||e instanceof Date||e instanceof RegExp||e instanceof Blob||e instanceof Error||aC(e)||tx(e)||ArrayBuffer.isView(e)||e instanceof ImageData)}function aP(e,t){if(aB(e))return(aC(e)||tx(e))&&t&&t.push(e),ArrayBuffer.isView(e)&&t&&t.push(e.buffer),e instanceof ImageData&&t&&t.push(e.data.buffer),e;if(Array.isArray(e)){let r=[];for(let n of e)r.push(aP(n,t));return r}if("object"!=typeof e)throw Error(`can't serialize object of type ${typeof e}`);let r=aM(e);if(!r)throw Error(`can't serialize object of unregistered class ${e.constructor.name}`);if(!aT[r])throw Error(`${r} is not registered.`);let{klass:n}=aT[r],i=n.serialize?n.serialize(e,t):{};if(n.serialize){if(i===t?.[t.length-1])throw Error("statically serialized object won't survive transfer of $name property")}else{for(let n in e){if(!e.hasOwnProperty(n)||aT[r].omit.includes(n))continue;let a=e[n];void 0!==a&&(i[n]=aT[r].shallow.includes(n)?a:aP(a,t))}e instanceof Error&&(i.message=e.message)}if(i.$name)throw Error("$name property is reserved for worker serialization logic.");return"Object"!==r&&(i.$name=r),i}function az(e){if(aB(e))return e;if(Array.isArray(e))return e.map(az);if("object"!=typeof e)throw Error(`can't deserialize object of type ${typeof e}`);let t=aM(e)||"Object";if(!aT[t])throw Error(`can't deserialize unregistered class ${t}`);let{klass:r}=aT[t];if(!r)throw Error(`can't deserialize unregistered class ${t}`);if(r.deserialize)return r.deserialize(e);let n=Object.create(r.prototype);for(let r of Object.keys(e)){if("$name"===r)continue;let i=e[r];n[r]=aT[t].shallow.includes(r)?i:az(i)}return n}var aV=class{constructor(){this.first=!0}update(e,t){let r=Math.floor(e);return this.first?(this.first=!1,this.lastIntegerZoom=r,this.lastIntegerZoomTime=0,this.lastZoom=e,this.lastFloorZoom=r,!0):(this.lastFloorZoom>r?(this.lastIntegerZoom=r+1,this.lastIntegerZoomTime=t):this.lastFloorZoom<r&&(this.lastIntegerZoom=r,this.lastIntegerZoomTime=t),e!==this.lastZoom&&(this.lastZoom=e,this.lastFloorZoom=r,!0))}};function aL(e){return/[\u02EA\u02EB\u1100-\u11FF\u2E80-\u2FDF\u3000-\u30FF\u3105-\u312F\u3131-\u318E\u31A0-\u4DBF\u4E00-\uA48C\uA490-\uA4C6\uA960-\uA97C\uAC00-\uD7C6\uD7CB-\uD7FB\uF900-\uFA6D\uFA70-\uFAD9\uFE10-\uFE1F\uFE30-\uFE4F\uFF00-\uFFEF]|\uD81B[\uDFE0-\uDFFF]|[\uD81C-\uD822\uD840-\uD868\uD86A-\uD86D\uD86F-\uD872\uD874-\uD879\uD880-\uD883\uD885-\uD88C][\uDC00-\uDFFF]|\uD823[\uDC00-\uDCD5\uDCFF-\uDD1E\uDD80-\uDDF2]|\uD82B[\uDFF0-\uDFFF]|\uD82C[\uDC00-\uDEFB]|\uD83C[\uDE00-\uDEFF]|\uD869[\uDC00-\uDEDF\uDF00-\uDFFF]|\uD86E[\uDC00-\uDC1D\uDC20-\uDFFF]|\uD873[\uDC00-\uDEAD\uDEB0-\uDFFF]|\uD87A[\uDC00-\uDFE0\uDFF0-\uDFFF]|\uD87B[\uDC00-\uDE5D]|\uD87E[\uDC00-\uDE1D]|\uD884[\uDC00-\uDF4A\uDF50-\uDFFF]|\uD88D[\uDC00-\uDC79]/gim.test(String.fromCodePoint(e))}function a$(e){return/[\u02EA\u02EB\u1100-\u11FF\u1400-\u167F\u18B0-\u18F5\u2E80-\u2E99\u2E9B-\u2EF3\u2F00-\u2FD5\u2FF0-\u3007\u3012\u3013\u3020-\u302F\u3031-\u303F\u3041-\u3096\u309D-\u30FB\u30FD-\u30FF\u3105-\u312F\u3131-\u318E\u3190-\uA48C\uA490-\uA4C6\uA960-\uA97C\uAC00-\uD7A3\uD7B0-\uD7C6\uD7CB-\uD7FB\uF900-\uFA6D\uFA70-\uFAD9\uFE10-\uFE1F\uFE30-\uFE48\uFE50-\uFE57\uFE5F-\uFE62\uFE67-\uFE6F\uFF00-\uFF07\uFF0A-\uFF0C\uFF0E-\uFF19\uFF1F-\uFF3A\uFF3C\uFF3E\uFF40-\uFF5A\uFFE0-\uFFE2\uFFE4-\uFFE7]|\uD802[\uDD80-\uDD9F]|\uD805[\uDD80-\uDDFF]|\uD806[\uDE00-\uDEBF]|\uD811[\uDC00-\uDE7F]|\uD81B[\uDFE0-\uDFE4\uDFF0-\uDFF6]|[\uD81C-\uD822\uD83D\uD840-\uD868\uD86A-\uD86D\uD86F-\uD872\uD874-\uD879\uD880-\uD883\uD885-\uD88C][\uDC00-\uDFFF]|\uD823[\uDC00-\uDCD5\uDCFF-\uDD1E\uDD80-\uDDF2]|\uD82B[\uDFF0-\uDFF3\uDFF5-\uDFFB\uDFFD\uDFFE]|\uD82C[\uDC00-\uDD22\uDD30-\uDEFB]|\uD833[\uDEC0-\uDFCF]|\uD834[\uDC00-\uDDFF\uDEE0-\uDF7F]|\uD836[\uDC00-\uDEAF]|\uD83C[\uDC00-\uDE00\uDF00-\uDFFF]|\uD83E[\uDD00-\uDEFF]|\uD869[\uDC00-\uDEDF\uDF00-\uDFFF]|\uD86E[\uDC00-\uDC1D\uDC20-\uDFFF]|\uD873[\uDC00-\uDEAD\uDEB0-\uDFFF]|\uD87A[\uDC00-\uDFE0\uDFF0-\uDFFF]|\uD87B[\uDC00-\uDE5D]|\uD87E[\uDC00-\uDE1D]|\uD884[\uDC00-\uDF4A\uDF50-\uDFFF]|\uD88D[\uDC00-\uDC79]/gim.test(String.fromCodePoint(e))}function aO(e){return/[\u0E01-\u0E3A\u0E40-\u0E5B\u0E81\u0E82\u0E84\u0E86-\u0E8A\u0E8C-\u0EA3\u0EA5\u0EA7-\u0EBD\u0EC0-\u0EC4\u0EC6\u0EC8-\u0ECE\u0ED0-\u0ED9\u0EDC-\u0EDF\u0F00-\u0F47\u0F49-\u0F6C\u0F71-\u0F97\u0F99-\u0FBC\u0FBE-\u0FCC\u0FCE-\u0FD4\u0FD9\u0FDA\u1000-\u109F\u1780-\u17DD\u17E0-\u17E9\u17F0-\u17F9\u19E0-\u19FF\u1B00-\u1B4C\u1B4E-\u1B7F\uA980-\uA9CD\uA9D0-\uA9D9\uA9DE-\uA9FE\uAA60-\uAA7F]|\uD805[\uDED0-\uDEE3]/gim.test(String.fromCodePoint(e))}function aR(e){return/\s/u.test(String.fromCodePoint(e))}function aN(e){for(let t of e)if(a$(t.codePointAt(0)))return!0;return!1}function aU(e){return RegExp(e.map(e=>{try{return RegExp(`\\p{sc=${e}}`,"u").source}catch{return null}}).filter(e=>e).join("|"),"u")}let aq=aU(["Arab","Dupl","Mong","Ougr","Syrc"]);function aj(e){return!(a$(e)||/[\xA7\xA9\xAE\xB1\xBC-\xBE\xD7\xF7\u2016\u2020\u2021\u2030\u2031\u203B\u203C\u2042\u2047-\u2049\u2051\u2100-\u218F\u221E\u2234\u2235\u2300-\u2307\u230C-\u231F\u2324-\u2328\u232B\u237D-\u239A\u23BE-\u23CD\u23CF\u23D1-\u23DB\u23E2-\u2422\u2424-\u24FF\u25A0-\u2619\u2620-\u2767\u2776-\u2793\u2B12-\u2B2F\u2B50-\u2B59\u2BB8-\u2BEB\u3000-\u303F\u30A0-\u30FF\uE000-\uF8FF\uFE30-\uFE6F\uFF00-\uFFEF\uFFFC\uFFFD]|[\uDB80-\uDBFF][\uDC00-\uDFFF]/gim.test(String.fromCodePoint(e)))}function aG(e){return/\p{sc=Arab}/u.test(String.fromCodePoint(e))}let aX=aU("Adlm.Arab.Armi.Avst.Chrs.Cprt.Egyp.Elym.Gara.Hatr.Hebr.Hung.Khar.Lydi.Mand.Mani.Mend.Merc.Mero.Narb.Nbat.Nkoo.Orkh.Palm.Phli.Phlp.Phnx.Prti.Rohg.Samr.Sarb.Sogo.Syrc.Thaa.Todr.Yezi".split("."));function aY(e){return aX.test(String.fromCodePoint(e))}let aZ=new class{constructor(){this.TIMEOUT=5e3,this.applyArabicShaping=null,this.processBidirectionalText=null,this.processStyledBidirectionalText=null,this.pluginStatus="unavailable",this.pluginURL=null,this.loadScriptResolve=()=>{}}setState(e){this.pluginStatus=e.pluginStatus,this.pluginURL=e.pluginURL}getState(){return{pluginStatus:this.pluginStatus,pluginURL:this.pluginURL}}setMethods(e){if(aZ.isParsed())throw Error("RTL text plugin already registered.");this.applyArabicShaping=e.applyArabicShaping,this.processBidirectionalText=e.processBidirectionalText,this.processStyledBidirectionalText=e.processStyledBidirectionalText,this.loadScriptResolve()}isParsed(){return null!=this.applyArabicShaping&&null!=this.processBidirectionalText&&null!=this.processStyledBidirectionalText}getRTLTextPluginStatus(){return this.pluginStatus}async syncState(e,t){if(this.isParsed())return this.getState();if("loading"!==e.pluginStatus)return this.setState(e),e;let r=e.pluginURL,n=new Promise(e=>{this.loadScriptResolve=e}),i=new Promise(e=>setTimeout(()=>e(),this.TIMEOUT));if(await t(r),await Promise.race([n,i]),this.isParsed()){let e={pluginStatus:"loaded",pluginURL:r};return this.setState(e),e}throw this.setState({pluginStatus:"error",pluginURL:""}),Error(`RTL Text Plugin failed to import scripts from ${r}`)}};var aW=class{constructor(e,t){this.isSupportedScript=aH,this.zoom=e,t?(this.now=t.now||0,this.fadeDuration=t.fadeDuration||0,this.zoomHistory=t.zoomHistory||new aV,this.transition=t.transition||{}):(this.now=0,this.fadeDuration=0,this.zoomHistory=new aV,this.transition={})}crossFadingFactor(){return 0===this.fadeDuration?1:Math.min((this.now-this.zoomHistory.lastIntegerZoomTime)/this.fadeDuration,1)}getCrossfadeParameters(){let e=this.zoom,t=e-Math.floor(e),r=this.crossFadingFactor();return e>this.zoomHistory.lastIntegerZoom?{fromScale:2,toScale:1,t:t+(1-t)*r}:{fromScale:.5,toScale:1,t:1-(1-r)*t}}};function aH(e){var t="loaded"===aZ.getRTLTextPluginStatus();for(let r of e)if(!function(e,t){return!(!t&&aY(e))&&!/[\u0900-\u0DFF\u0F00-\u109F\u1780-\u17FF]/gim.test(String.fromCodePoint(e))}(r.codePointAt(0),t))return!1;return!0}let aK="-transition";var aJ=class{constructor(e,t,r,n){this.property=e,this.value=t,this.expression=function(e,t,r,n){if(iv(e))return new iV(e,t,r);if(iC(e)){let i=iz(e,t,r,n);if("error"===i.result)throw Error(i.value.map(e=>`${e.key}: ${e.message}`).join(", "));return i.value}{let t=e;return"color"===r.type&&"string"==typeof e?t=rL.parse(e):"padding"===r.type&&("number"==typeof e||Array.isArray(e))?t=rN.parse(e):"numberArray"===r.type&&("number"==typeof e||Array.isArray(e))?t=rU.parse(e):"colorArray"===r.type&&("string"==typeof e||Array.isArray(e))?t=rq.parse(e):"variableAnchorOffsetCollection"===r.type&&Array.isArray(e)?t=rX.parse(e):"projectionDefinition"===r.type&&"string"==typeof e&&(t=rZ.parse(e)),{globalStateRefs:new Set,_globalState:null,kind:"constant",evaluate:()=>t}}}(void 0===t?e.specification.default:t,r,e.specification,n)}isDataDriven(){return"source"===this.expression.kind||"composite"===this.expression.kind}getGlobalStateRefs(){return this.expression.globalStateRefs||new Set}possiblyEvaluate(e,t,r){return this.property.possiblyEvaluate(this,e,t,r)}},aQ=class{constructor(e,t,r){this.property=e,this.value=new aJ(e,void 0,t,r)}transitioned(e,t){return new a1(this.property,this.value,t,e7({},e.transition,this.transition),e.now)}untransitioned(){return new a1(this.property,this.value,null,{},0)}},a0=class{constructor(e,t,r){this._properties=e,this._values=Object.create(e.defaultTransitionablePropertyValues),this._globalState=r,this._rootKey=t}_propertyRootKey(e){return`${this._rootKey}.${String(e)}`}hasProperty(e){return e in this._properties.defaultTransitionablePropertyValues}getValue(e){return tl(this._values[e].value.value)}setValue(e,t){Object.hasOwn(this._values,e)||(this._values[e]=new aQ(this._values[e].property,this._propertyRootKey(e),this._globalState)),this._values[e].value=new aJ(this._values[e].property,null===t?void 0:tl(t),this._propertyRootKey(e),this._globalState)}getTransition(e){return tl(this._values[e].transition)}setTransition(e,t){Object.hasOwn(this._values,e)||(this._values[e]=new aQ(this._values[e].property,this._propertyRootKey(e),this._globalState)),this._values[e].transition=tl(t)||void 0}serialize(){let e={};for(let t of Object.keys(this._values)){let r=this.getValue(t);void 0!==r&&(e[t]=r);let n=this.getTransition(t);void 0!==n&&(e[`${t}${aK}`]=n)}return e}transitioned(e,t){let r=new a2(this._properties);for(let n of Object.keys(this._values))r._values[n]=this._values[n].transitioned(e,t._values[n]);return r}untransitioned(){let e=new a2(this._properties);for(let t of Object.keys(this._values))e._values[t]=this._values[t].untransitioned();return e}},a1=class{constructor(e,t,r,n,i){this.property=e,this.value=t,this.begin=i+n.delay||0,this.end=this.begin+n.duration||0,e.specification.transition&&(n.delay||n.duration)&&(this.prior=r)}possiblyEvaluate(e,t,r){let n=e.now||0,i=this.value.possiblyEvaluate(e,t,r),a=this.prior;if(!a)return i;if(n>this.end||this.value.isDataDriven())return this.prior=null,i;if(n<this.begin)return a.possiblyEvaluate(e,t,r);{let s=(n-this.begin)/(this.end-this.begin);return this.property.interpolate(a.possiblyEvaluate(e,t,r),i,function(e){if(e<=0)return 0;if(e>=1)return 1;let t=e*e,r=t*e;return 4*(e<.5?r:3*(e-t)+r-.75)}(s))}}},a2=class{constructor(e){this._properties=e,this._values=Object.create(e.defaultTransitioningPropertyValues)}possiblyEvaluate(e,t,r){let n=new a6(this._properties);for(let i of Object.keys(this._values))n._values[i]=this._values[i].possiblyEvaluate(e,t,r);return n}hasTransition(){for(let e of Object.keys(this._values))if(this._values[e].prior)return!0;return!1}},a3=class{constructor(e,t,r){this._properties=e,this._values=Object.create(e.defaultPropertyValues),this._globalState=r,this._rootKey=t}_propertyRootKey(e){return`${this._rootKey}.${String(e)}`}hasValue(e){return void 0!==this._values[e].value}hasProperty(e){return e in this._properties.defaultPropertyValues}getValue(e){return tl(this._values[e].value)}setValue(e,t){this._values[e]=new aJ(this._values[e].property,null===t?void 0:tl(t),this._propertyRootKey(e),this._globalState)}serialize(){let e={};for(let t of Object.keys(this._values)){let r=this.getValue(t);void 0!==r&&(e[t]=r)}return e}possiblyEvaluate(e,t,r){let n=new a6(this._properties);for(let i of Object.keys(this._values))n._values[i]=this._values[i].possiblyEvaluate(e,t,r);return n}},a5=class{constructor(e,t,r){this.property=e,this.value=t,this.parameters=r}isConstant(){return"constant"===this.value.kind}constantOr(e){return"constant"===this.value.kind?this.value.value:e}evaluate(e,t,r,n){return this.property.evaluate(this.value,this.parameters,e,t,r,n)}},a6=class{constructor(e){this._properties=e,this._values=Object.create(e.defaultPossiblyEvaluatedValues)}get(e){return this._values[e]}};function a4(e){if(Array.isArray(e))return e.length;let t=e?.values;return Array.isArray(t)?t.length:void 0}function a8(e,t){let r=a4(e),n=a4(t);return void 0!==r&&void 0!==n&&r!==n}var a7=class{constructor(e,t){this.specification=e,this.name=t}possiblyEvaluate(e,t){if(e.isDataDriven())throw Error("Value should not be data driven");return e.expression.evaluate(t)}interpolate(e,t,r){if(a8(e,t))return th(`Property "${this.name}" is trying to interpolate arrays of different lengths. Rendering may 'jump'.`),t;let n=r8[this.specification.type];return n?n(e,t,r):e}},a9=class{constructor(e,t,r){this.specification=e,this.name=t,this.overrides=r}possiblyEvaluate(e,t,r,n){return"constant"===e.expression.kind||"camera"===e.expression.kind?new a5(this,{kind:"constant",value:e.expression.evaluate(t,null,{},r,n)},t):new a5(this,e.expression,t)}interpolate(e,t,r){if("constant"!==e.value.kind||"constant"!==t.value.kind)return e;if(void 0===e.value.value||void 0===t.value.value)return new a5(this,{kind:"constant",value:void 0},e.parameters);if(a8(e.value.value,t.value.value))return th(`Property "${this.name}" is trying to interpolate arrays of different lengths. Rendering may 'jump'.`),t;let n=r8[this.specification.type];return n?new a5(this,{kind:"constant",value:n(e.value.value,t.value.value,r)},e.parameters):e}evaluate(e,t,r,n,i,a){return"constant"===e.kind?e.value:e.evaluate(t,r,n,i,a)}},se=class extends a9{possiblyEvaluate(e,t,r,n){if(void 0===e.value)return new a5(this,{kind:"constant",value:void 0},t);
2if("constant"===e.expression.kind){let i=e.expression.evaluate(t,null,{},r,n),a="resolvedImage"===e.property.specification.type&&"string"!=typeof i?i.name:i;return new a5(this,{kind:"constant",value:this._calculate(a,a,a,t)},t)}return"camera"===e.expression.kind?new a5(this,{kind:"constant",value:this._calculate(e.expression.evaluate({zoom:t.zoom-1}),e.expression.evaluate({zoom:t.zoom}),e.expression.evaluate({zoom:t.zoom+1}),t)},t):new a5(this,e.expression,t)}evaluate(e,t,r,n,i,a){if("source"===e.kind){let s=e.evaluate(t,r,n,i,a);return this._calculate(s,s,s,t)}return"composite"===e.kind?this._calculate(e.evaluate({zoom:Math.floor(t.zoom)-1},r,n),e.evaluate({zoom:Math.floor(t.zoom)},r,n),e.evaluate({zoom:Math.floor(t.zoom)+1},r,n),t):e.value}_calculate(e,t,r,n){return n.zoom>n.zoomHistory.lastIntegerZoom?{from:e,to:t}:{from:r,to:t}}interpolate(e){return e}},st=class{constructor(e,t){this.specification=e,this.name=t}possiblyEvaluate(e,t,r,n){if(void 0!==e.value){if("constant"===e.expression.kind){let i=e.expression.evaluate(t,null,{},r,n);return this._calculate(i,i,i,t)}return this._calculate(e.expression.evaluate(new aW(Math.floor(t.zoom-1),t)),e.expression.evaluate(new aW(Math.floor(t.zoom),t)),e.expression.evaluate(new aW(Math.floor(t.zoom+1),t)),t)}}_calculate(e,t,r,n){return n.zoom>n.zoomHistory.lastIntegerZoom?{from:e,to:t}:{from:r,to:t}}interpolate(e){return e}},sr=class{constructor(e,t){this.specification=e,this.name=t}possiblyEvaluate(e,t,r,n){return!!e.expression.evaluate(t,null,{},r,n)}interpolate(){return!1}},sn=class{constructor(e){for(let t in this.properties=e,this.defaultPropertyValues={},this.defaultTransitionablePropertyValues={},this.defaultTransitioningPropertyValues={},this.defaultPossiblyEvaluatedValues={},this.overridableProperties=[],e){let r=e[t];r.specification.overridable&&this.overridableProperties.push(t);let n=this.defaultPropertyValues[t]=new aJ(r,void 0,r.name,void 0),i=this.defaultTransitionablePropertyValues[t]=new aQ(r,r.name,void 0);this.defaultTransitioningPropertyValues[t]=i.untransitioned(),this.defaultPossiblyEvaluatedValues[t]=n.possiblyEvaluate({})}}};aI("DataDrivenProperty",a9),aI("DataConstantProperty",a7),aI("CrossFadedDataDrivenProperty",se),aI("CrossFadedProperty",st),aI("ColorRampProperty",sr);let si=" is a PAINT property not a LAYOUT property. Use get/setPaintProperty instead?",sa=" is a LAYOUT property not a PAINT property. Use get/setLayoutProperty instead?";var ss=class extends t0{constructor(e,t,r){if(super(),this.id=e.id,this.type=e.type,this._globalState=r,this._featureFilter={filter:()=>!0,needGeometry:!1,getGlobalStateRefs:()=>new Set},this._visibilityExpression=function(e,t,r){return new a_(e,t,r)}(this.visibility,`layers[${this.id}].layout.visibility`,r),"custom"!==e.type&&(this.metadata=e.metadata,this.minzoom=e.minzoom,this.maxzoom=e.maxzoom,"background"!==e.type&&(this.source=e.source,this.sourceLayer=e["source-layer"],this.filter=e.filter,this._featureFilter=iX(e.filter,`layers[${this.id}].filter`,r)),t.layout&&(this._unevaluatedLayout=new a3(t.layout,`layers[${this.id}].layout`,r)),t.paint)){for(let n in this._transitionablePaint=new a0(t.paint,`layers[${this.id}].paint`,r),e.paint)this.setPaintProperty(n,e.paint[n],{validate:!1});for(let t in e.layout)this.setLayoutProperty(t,e.layout[t],{validate:!1});this._transitioningPaint=this._transitionablePaint.untransitioned(),this.paint=new a6(t.paint)}}setFilter(e){this.filter=e,this._featureFilter=iX(e,`layers[${this.id}].filter`,this._globalState)}getCrossfadeParameters(){return this._crossfadeParameters}getLayoutProperty(e){if("visibility"===e)return this.visibility;if(this._transitionablePaint?.hasProperty(e))throw Error(e+si);if(!this._unevaluatedLayout)throw Error(`Cannot get layout property "${e}" on layer type "${this.type}" which has no layout properties.`);return this._unevaluatedLayout.getValue(e)}getLayoutAffectingGlobalStateRefs(){let e=new Set;for(let t of this._visibilityExpression.getGlobalStateRefs())e.add(t);if(this._unevaluatedLayout)for(let t in this._unevaluatedLayout._values)for(let r of this._unevaluatedLayout._values[t].getGlobalStateRefs())e.add(r);for(let t of this._featureFilter.getGlobalStateRefs())e.add(t);return e}getPaintAffectingGlobalStateRefs(){let e=new globalThis.Map;if(this._transitionablePaint)for(let t in this._transitionablePaint._values){let r=this._transitionablePaint._values[t].value;for(let n of r.getGlobalStateRefs()){let i=e.get(n)??[];i.push({name:t,value:r.value}),e.set(n,i)}}return e}getVisibilityAffectingGlobalStateRefs(){return this._visibilityExpression.getGlobalStateRefs()}setLayoutProperty(e,t,r={}){if("visibility"===e){this.visibility=t,this._visibilityExpression.setValue(t),this.recalculateVisibility();return}this._transitionablePaint?.hasProperty(e)?this.fire(new tQ(Error(e+si))):null!=t&&this._val
vendor: 1,894 bytes, line 2
2idate(aA.layoutProperty,`layers.${this.id}.layout.${e}`,e,t,r)||this._unevaluatedLayout.setValue(e,t)}getPaintProperty(e){if(e.endsWith("-transition")){let t=e.slice(0,-11);if("visibility"===t||this._unevaluatedLayout?.hasProperty(t))throw Error(e+sa);return this._transitionablePaint.getTransition(t)}if("visibility"===e||this._unevaluatedLayout?.hasProperty(e))throw Error(e+sa);return this._transitionablePaint.getValue(e)}setPaintProperty(e,t,r={}){if("visibility"===e||this._unevaluatedLayout?.hasProperty(e))return this.fire(new tQ(Error(e+sa))),!1;if(null!=t&&this._validate(aA.paintProperty,`layers.${this.id}.paint.${e}`,e,t,r))return!1;if(e.endsWith("-transition"))return this._transitionablePaint.setTransition(e.slice(0,-11),t||void 0),!1;{let r=this._transitionablePaint._values[e],n="cross-faded-data-driven"===r.property.specification["property-type"],i=r.value.isDataDriven(),a=r.value;this._transitionablePaint.setValue(e,t),this._handleSpecialPaintPropertyUpdate(e);let s=this._transitionablePaint._values[e].value;return s.isDataDriven()||i||n||this._handleOverridablePaintPropertyUpdate(e,a,s)}}_handleSpecialPaintPropertyUpdate(e){}_handleOverridablePaintPropertyUpdate(e,t,r){return!1}isHidden(e=this.minzoom,t=!1){return!!(this.minzoom&&e<(t?Math.floor(this.minzoom):this.minzoom))||!!this.maxzoom&&e>=this.maxzoom||"none"===this._evaluatedVisibility}updateTransitions(e){this._transitioningPaint=this._transitionablePaint.transitioned(e,this._transitioningPaint)}hasTransition(){return this._transitioningPaint.hasTransition()}recalculateVisibility(){this._evaluatedVisibility=this._visibilityExpression.evaluate()}recalculate(e,t){e.getCrossfadeParameters&&(this._crossfadeParameters=e.getCrossfadeParameters()),this._unevaluatedLayout&&(this.layout=this._unevaluatedLayout.possiblyEvaluate(e,void 0,t)),this.paint=this._transitioningPaint.possiblyEvaluate(e,void 0,t)}
vendor: 15,414 bytes, line 2
2serialize(){let e={id:this.id,type:this.type,source:this.source,"source-layer":this.sourceLayer,metadata:this.metadata,minzoom:this.minzoom,maxzoom:this.maxzoom,filter:this.filter,layout:this._unevaluatedLayout?.serialize(),paint:this._transitionablePaint?.serialize()};return this.visibility&&(e.layout||={},e.layout.visibility=this.visibility),to(e,(e,t)=>void 0!==e&&!("layout"===t&&!Object.keys(e).length)&&!("paint"===t&&!Object.keys(e).length))}_validate(e,t,r,n,i={}){return aF(this,e,{key:t,layerType:this.type,objectKey:r,value:n},i)}is3D(){return!1}isTileClipped(){return!1}hasOffscreenPass(){return!1}resize(){}isStateDependent(){for(let e in this.paint._values){let t=this.paint.get(e);if(t instanceof a5&&id(t.property.specification)&&("source"===t.value.kind||"composite"===t.value.kind)&&t.value.isStateDependent)return!0}return!1}},so={get paint(){return a||=new sn({"raster-opacity":new a7(t2.paint_raster["raster-opacity"],"raster-opacity"),"raster-hue-rotate":new a7(t2.paint_raster["raster-hue-rotate"],"raster-hue-rotate"),"raster-brightness-min":new a7(t2.paint_raster["raster-brightness-min"],"raster-brightness-min"),"raster-brightness-max":new a7(t2.paint_raster["raster-brightness-max"],"raster-brightness-max"),"raster-saturation":new a7(t2.paint_raster["raster-saturation"],"raster-saturation"),"raster-contrast":new a7(t2.paint_raster["raster-contrast"],"raster-contrast"),resampling:new a7(t2.paint_raster.resampling,"resampling"),"raster-resampling":new a7(t2.paint_raster["raster-resampling"],"raster-resampling"),"raster-fade-duration":new a7(t2.paint_raster["raster-fade-duration"],"raster-fade-duration")})}};let sl=e=>"raster"===e.type;var su=class extends ss{constructor(e,t){super(e,so,t)}};let sh={Int8:Int8Array,Uint8:Uint8Array,Int16:Int16Array,Uint16:Uint16Array,Int32:Int32Array,Uint32:Uint32Array,Float32:Float32Array};var sc=class{constructor(e,t){this._structArray=e,this._pos1=t*this.size,this._pos2=this._pos1/2,this._pos4=this._pos1/4,this._pos8=this._pos1/8}},sp=class{constructor(){this.isTransferred=!1,this.capacity=-1,this.resize(0)}static serialize(e,t){return e._trim(),t&&(e.isTransferred=!0,t.push(e.arrayBuffer)),{length:e.length,arrayBuffer:e.arrayBuffer}}static deserialize(e){let t=Object.create(this.prototype);return t.arrayBuffer=e.arrayBuffer,t.length=e.length,t.capacity=e.arrayBuffer.byteLength/t.bytesPerElement,t._refreshViews(),t}_trim(){this.length!==this.capacity&&(this.capacity=this.length,this.arrayBuffer=this.arrayBuffer.slice(0,this.length*this.bytesPerElement),this._refreshViews())}clear(){this.length=0}resize(e){this.reserve(e),this.length=e}reserve(e){if(e>this.capacity){this.capacity=Math.max(e,Math.floor(5*this.capacity),128),this.arrayBuffer=new ArrayBuffer(this.capacity*this.bytesPerElement);let t=this.uint8;this._refreshViews(),t&&this.uint8.set(t)}}_refreshViews(){throw Error("_refreshViews() must be implemented by each concrete StructArray layout")}freeBufferAfterUpload(){this.arrayBuffer=new ArrayBuffer(0),this._refreshViews()}};function sf(e,t=1){let r=0,n=0;return{members:e.map(e=>{let i=sh[e.type].BYTES_PER_ELEMENT,a=r=sd(r,Math.max(t,i)),s=e.components||1;return n=Math.max(n,i),r+=i*s,{name:e.name,type:e.type,components:s,offset:a}}),size:sd(r,Math.max(n,t)),alignment:t}}function sd(e,t){return Math.ceil(e/t)*t}var sy=class extends sp{_refreshViews(){this.uint8=new Uint8Array(this.arrayBuffer),this.int16=new Int16Array(this.arrayBuffer)}emplaceBack(e,t){let r=this.length;return this.resize(r+1),this.emplace(r,e,t)}emplace(e,t,r){let n=2*e;return this.int16[n+0]=t,this.int16[n+1]=r,e}};sy.prototype.bytesPerElement=4,aI("StructArrayLayout2i4",sy);var sm=class extends sp{_refreshViews(){this.uint8=new Uint8Array(this.arrayBuffer),this.int16=new Int16Array(this.arrayBuffer)}emplaceBack(e,t,r){let n=this.length;return this.resize(n+1),this.emplace(n,e,t,r)}emplace(e,t,r,n){let i=3*e;return this.int16[i+0]=t,this.int16[i+1]=r,this.int16[i+2]=n,e}};sm.prototype.bytesPerElement=6,aI("StructArrayLayout3i6",sm);var sg=class extends sp{_refreshViews(){this.uint8=new Uint8Array(this.arrayBuffer),this.int16=new Int16Array(this.arrayBuffer)}emplaceBack(e,t,r,n){let i=this.length;return this.resize(i+1),this.emplace(i,e,t,r,n)}emplace(e,t,r,n,i){let a=4*e;return this.int16[a+0]=t,this.int16[a+1]=r,this.int16[a+2]=n,this.int16[a+3]=i,e}};sg.prototype.bytesPerElement=8,aI("StructArrayLayout4i8",sg);var sx=class extends sp{_refreshViews(){this.uint8=new Uint8Array(this.arrayBuffer),this.int16=new Int16Array(this.arrayBuffer)}emplaceBack(e,t,r,n,i,a){let s=this.length;return this.resize(s+1),this.emplace(s,e,t,r,n,i,a)}emplace(e,t,r,n,i,a,s){let o=6*e;return this.int16[o+0]=t,this.int16[o+1]=r,this.int16[o+2]=n,this.int16[o+3]=i,this.int16[o+4]=a,this.int16[o+5]=s,e}};sx.prototype.bytesPerElement=12,aI("StructArrayLayout2i4i12",sx);var sv=class extends sp{_refreshViews(){this.uint8=new Uint8Array(this.arrayBuffer),this.int16=new Int16Array(this.arrayBuffer)}emplaceBack(e,t,r,n,i,a){let s=this.length;return this.resize(s+1),this.emplace(s,e,t,r,n,i,a)}emplace(e,t,r,n,i,a,s){let o=4*e,l=8*e;return this.int16[o+0]=t,this.int16[o+1]=r,this.uint8[l+4]=n,this.uint8[l+5]=i,this.uint8[l+6]=a,this.uint8[l+7]=s,e}};sv.prototype.bytesPerElement=8,aI("StructArrayLayout2i4ub8",sv);var sb=class extends sp{_refreshViews(){this.uint8=new Uint8Array(this.arrayBuffer),this.float32=new Float32Array(this.arrayBuffer)}emplaceBack(e,t){let r=this.length;return this.resize(r+1),this.emplace(r,e,t)}emplace(e,t,r){let n=2*e;return this.float32[n+0]=t,this.float32[n+1]=r,e}};sb.prototype.bytesPerElement=8,aI("StructArrayLayout2f8",sb);var sw=class extends sp{_refreshViews(){this.uint8=new Uint8Array(this.arrayBuffer),this.uint16=new Uint16Array(this.arrayBuffer)}emplaceBack(e,t,r,n,i,a,s,o,l,u){let h=this.length;return this.resize(h+1),this.emplace(h,e,t,r,n,i,a,s,o,l,u)}emplace(e,t,r,n,i,a,s,o,l,u,h){let c=10*e;return this.uint16[c+0]=t,this.uint16[c+1]=r,this.uint16[c+2]=n,this.uint16[c+3]=i,this.uint16[c+4]=a,this.uint16[c+5]=s,this.uint16[c+6]=o,this.uint16[c+7]=l,this.uint16[c+8]=u,this.uint16[c+9]=h,e}};sw.prototype.bytesPerElement=20,aI("StructArrayLayout10ui20",sw);var s_=class extends sp{_refreshViews(){this.uint8=new Uint8Array(this.arrayBuffer),this.uint16=new Uint16Array(this.arrayBuffer)}emplaceBack(e,t,r,n,i,a,s,o){let l=this.length;return this.resize(l+1),this.emplace(l,e,t,r,n,i,a,s,o)}emplace(e,t,r,n,i,a,s,o,l){let u=8*e;return this.uint16[u+0]=t,this.uint16[u+1]=r,this.uint16[u+2]=n,this.uint16[u+3]=i,this.uint16[u+4]=a,this.uint16[u+5]=s,this.uint16[u+6]=o,this.uint16[u+7]=l,e}};s_.prototype.bytesPerElement=16,aI("StructArrayLayout8ui16",s_);var sA=class extends sp{_refreshViews(){this.uint8=new Uint8Array(this.arrayBuffer),this.int16=new Int16Array(this.arrayBuffer),this.uint16=new Uint16Array(this.arrayBuffer),this.float32=new Float32Array(this.arrayBuffer)}emplaceBack(e,t,r,n,i,a,s,o,l,u,h,c,p){let f=this.length;return this.resize(f+1),this.emplace(f,e,t,r,n,i,a,s,o,l,u,h,c,p)}emplace(e,t,r,n,i,a,s,o,l,u,h,c,p,f){let d=14*e;return this.int16[d+0]=t,this.int16[d+1]=r,this.int16[d+2]=n,this.int16[d+3]=i,this.uint16[d+4]=a,this.uint16[d+5]=s,this.uint16[d+6]=o,this.uint16[d+7]=l,this.int16[d+8]=u,this.int16[d+9]=h,this.int16[d+10]=c,this.int16[d+11]=p,this.float32[7*e+6]=f,e}};sA.prototype.bytesPerElement=28,aI("StructArrayLayout4i4ui4i1f28",sA);var sD=class extends sp{_refreshViews(){this.uint8=new Uint8Array(this.arrayBuffer),this.float32=new Float32Array(this.arrayBuffer)}emplaceBack(e,t,r){let n=this.length;return this.resize(n+1),this.emplace(n,e,t,r)}emplace(e,t,r,n){let i=3*e;return this.float32[i+0]=t,this.float32[i+1]=r,this.float32[i+2]=n,e}};sD.prototype.bytesPerElement=12,aI("StructArrayLayout3f12",sD);var sS=class extends sp{_refreshViews(){this.uint8=new Uint8Array(this.arrayBuffer),this.uint32=new Uint32Array(this.arrayBuffer)}emplaceBack(e){let t=this.length;return this.resize(t+1),this.emplace(t,e)}emplace(e,t){return this.uint32[+e+0]=t,e}};sS.prototype.bytesPerElement=4,aI("StructArrayLayout1ul4",sS);var sE=class extends sp{_refreshViews(){this.uint8=new Uint8Array(this.arrayBuffer),this.int16=new Int16Array(this.arrayBuffer),this.uint32=new Uint32Array(this.arrayBuffer),this.uint16=new Uint16Array(this.arrayBuffer)}emplaceBack(e,t,r,n,i,a,s,o,l){let u=this.length;return this.resize(u+1),this.emplace(u,e,t,r,n,i,a,s,o,l)}emplace(e,t,r,n,i,a,s,o,l,u){let h=10*e;return this.int16[h+0]=t,this.int16[h+1]=r,this.int16[h+2]=n,this.int16[h+3]=i,this.int16[h+4]=a,this.int16[h+5]=s,this.uint32[5*e+3]=o,this.uint16[h+8]=l,this.uint16[h+9]=u,e}};sE.prototype.bytesPerElement=20,aI("StructArrayLayout6i1ul2ui20",sE);var sF=class extends sp{_refreshViews(){this.uint8=new Uint8Array(this.arrayBuffer),this.int16=new Int16Array(this.arrayBuffer)}emplaceBack(e,t,r,n,i,a){let s=this.length;return this.resize(s+1),this.emplace(s,e,t,r,n,i,a)}emplace(e,t,r,n,i,a,s){let o=6*e;return this.int16[o+0]=t,this.int16[o+1]=r,this.int16[o+2]=n,this.int16[o+3]=i,this.int16[o+4]=a,this.int16[o+5]=s,e}};sF.prototype.bytesPerElement=12,aI("StructArrayLayout2i2i2i12",sF);var sk=class extends sp{_refreshViews(){this.uint8=new Uint8Array(this.arrayBuffer),this.float32=new Float32Array(this.arrayBuffer),this.int16=new Int16Array(this.arrayBuffer)}emplaceBack(e,t,r,n,i){let a=this.length;return this.resize(a+1),this.emplace(a,e,t,r,n,i)}emplace(e,t,r,n,i,a){let s=4*e,o=8*e;return this.float32[s+0]=t,this.float32[s+1]=r,this.float32[s+2]=n,this.int16[o+6]=i,this.int16[o+7]=a,e}};sk.prototype.bytesPerElement=16,aI("StructArrayLayout2f1f2i16",sk);var sT=class extends sp{_refreshViews(){this.uint8=new Uint8Array(this.arrayBuffer),this.float32=new Float32Array(this.arrayBuffer),this.int16=new Int16Array(this.arrayBuffer)}emplaceBack(e,t,r,n,i,a){let s=this.length;return this.resize(s+1),this.emplace(s,e,t,r,n,i,a)}emplace(e,t,r,n,i,a,s){let o=16*e,l=4*e,u=8*e;return this.uint8[o+0]=t,this.uint8[o+1]=r,this.float32[l+1]=n,this.float32[l+2]=i,this.int16[u+6]=a,this.int16[u+7]=s,e}};sT.prototype.bytesPerElement=16,aI("StructArrayLayout2ub2f2i16",sT);var sI=class extends sp{_refreshViews(){this.uint8=new Uint8Array(this.arrayBuffer),this.uint16=new Uint16Array(this.arrayBuffer)}emplaceBack(e,t,r){let n=this.length;return this.resize(n+1),this.emplace(n,e,t,r)}emplace(e,t,r,n){let i=3*e;return this.uint16[i+0]=t,this.uint16[i+1]=r,this.uint16[i+2]=n,e}};sI.prototype.bytesPerElement=6,aI("StructArrayLayout3ui6",sI);var sC=class extends sp{_refreshViews(){this.uint8=new Uint8Array(this.arrayBuffer),this.int16=new Int16Array(this.arrayBuffer),this.uint16=new Uint16Array(this.arrayBuffer),this.uint32=new Uint32Array(this.arrayBuffer),this.float32=new Float32Array(this.arrayBuffer)}emplaceBack(e,t,r,n,i,a,s,o,l,u,h,c,p,f,d,y,m,g){let x=this.length;return this.resize(x+1),this.emplace(x,e,t,r,n,i,a,s,o,l,u,h,c,p,f,d,y,m,g)}emplace(e,t,r,n,i,a,s,o,l,u,h,c,p,f,d,y,m,g,x){let v=26*e,b=13*e,w=52*e;return this.int16[v+0]=t,this.int16[v+1]=r,this.uint16[v+2]=n,this.uint16[v+3]=i,this.uint32[b+2]=a,this.uint32[b+3]=s,this.uint32[b+4]=o,this.uint16[v+10]=l,this.uint16[v+11]=u,this.uint16[v+12]=h,this.float32[b+7]=c,this.float32[b+8]=p,this.uint8[w+36]=f,this.uint8[w+37]=d,this.uint8[w+38]=y,this.uint32[b+10]=m,this.int16[v+22]=g,this.float32[b+12]=x,e}};sC.prototype.bytesPerElement=52,aI("StructArrayLayout2i2ui3ul3ui2f3ub1ul1i1f52",sC);var sM=class extends sp{_refreshViews(){this.uint8=new Uint8Array(this.arrayBuffer),this.int16=new Int16Array(this.arrayBuffer),this.uint16=new Uint16Array(this.arrayBuffer),this.uint32=new Uint32Array(this.arrayBuffer),this.float32=new Float32Array(this.arrayBuffer)}emplaceBack(e,t,r,n,i,a,s,o,l,u,h,c,p,f,d,y,m,g,x,v,b,w,_,A,D,S,E,F,k){let T=this.length;return this.resize(T+1),this.emplace(T,e,t,r,n,i,a,s,o,l,u,h,c,p,f,d,y,m,g,x,v,b,w,_,A,D,S,E,F,k)}emplace(e,t,r,n,i,a,s,o,l,u,h,c,p,f,d,y,m,g,x,v,b,w,_,A,D,S,E,F,k,T){let I=34*e,C=17*e;return this.int16[I+0]=t,this.int16[I+1]=r,this.int16[I+2]=n,this.int16[I+3]=i,this.int16[I+4]=a,this.int16[I+5]=s,this.int16[I+6]=o,this.int16[I+7]=l,this.uint16[I+8]=u,this.uint16[I+9]=h,this.uint16[I+10]=c,this.uint16[I+11]=p,this.uint16[I+12]=f,this.uint16[I+13]=d,this.uint16[I+14]=y,this.uint16[I+15]=m,this.uint16[I+16]=g,this.uint16[I+17]=x,this.uint16[I+18]=v,this.uint16[I+19]=b,this.uint16[I+20]=w,this.uint16[I+21]=_,this.uint16[I+22]=A,this.uint32[C+12]=D,this.float32[C+13]=S,this.float32[C+14]=E,this.uint16[I+30]=F,this.uint16[I+31]=k,this.float32[C+16]=T,e}};sM.prototype.bytesPerElement=68,aI("StructArrayLayout8i15ui1ul2f2ui1f68",sM);var sB=class extends sp{_refreshViews(){this.uint8=new Uint8Array(this.arrayBuffer),this.float32=new Float32Array(this.arrayBuffer)}emplaceBack(e){let t=this.length;return this.resize(t+1),this.emplace(t,e)}emplace(e,t){return this.float32[+e+0]=t,e}};sB.prototype.bytesPerElement=4,aI("StructArrayLayout1f4",sB);var sP=class extends sp{_refreshViews(){this.uint8=new Uint8Array(this.arrayBuffer),this.uint16=new Uint16Array(this.arrayBuffer),this.float32=new Float32Array(this.arrayBuffer)}emplaceBack(e,t,r){let n=this.length;return this.resize(n+1),this.emplace(n,e,t,r)}emplace(e,t,r,n){let i=3*e;return this.uint16[6*e+0]=t,this.float32[i+1]=r,this.float32[i+2]=n,e}};sP.prototype.bytesPerElement=12,aI("StructArrayLayout1ui2f12",sP);var sz=class extends sp{_refreshViews(){this.uint8=new Uint8Array(this.arrayBuffer),this.uint32=new Uint32Array(this.arrayBuffer),this.uint16=new Uint16Array(this.arrayBuffer)}emplaceBack(e,t,r){let n=this.length;return this.resize(n+1),this.emplace(n,e,t,r)}emplace(e,t,r,n){let i=4*e;return this.uint32[2*e+0]=t,this.uint16[i+2]=r,this.uint16[i+3]=n,e}};sz.prototype.bytesPerElement=8,aI("StructArrayLayout1ul2ui8",sz);var sV=class extends sp{_refreshViews(){this.uint8=new Uint8Array(this.arrayBuffer),this.uint16=new Uint16Array(this.arrayBuffer)}emplaceBack(e,t){let r=this.length;return this.resize(r+1),this.emplace(r,e,t)}emplace(e,t,r){let n=2*e;return this.uint16[n+0]=t,this.uint16[n+1]=r,e}};sV.prototype.bytesPerElement=4,aI("StructArrayLayout2ui4",sV);var sL=class extends sp{_refreshViews(){this.uint8=new Uint8Array(this.arrayBuffer),this.uint16=new Uint16Array(this.arrayBuffer)}emplaceBack(e){let t=this.length;return this.resize(t+1),this.emplace(t,e)}emplace(e,t){return this.uint16[+e+0]=t,e}};sL.prototype.bytesPerElement=2,aI("StructArrayLayout1ui2",sL);var s$=class extends sp{_refreshViews(){this.uint8=new Uint8Array(this.arrayBuffer),this.float32=new Float32Array(this.arrayBuffer)}emplaceBack(e,t,r,n){let i=this.length;return this.resize(i+1),this.emplace(i,e,t,r,n)}emplace(e,t,r,n,i){let a=4*e;return this.float32[a+0]=t,this.float32[a+1]=r,this.float32[a+2]=n,this.float32[a+3]=i,e}};s$.prototype.bytesPerElement=16,aI("StructArrayLayout4f16",s$);var sO=class extends sc{get anchorPointX(){return this._structArray.int16[this._pos2+0]}get anchorPointY(){return this._structArray.int16[this._pos2+1]}get x1(){return this._structArray.int16[this._pos2+2]}get y1(){return this._structArray.int16[this._pos2+3]}get x2(){return this._structArray.int16[this._pos2+4]}get y2(){return this._structArray.int16[this._pos2+5]}get featureIndex(){return this._structArray.uint32[this._pos4+3]}get sourceLayerIndex(){return this._structArray.uint16[this._pos2+8]}get bucketIndex(){return this._structArray.uint16[this._pos2+9]}
2get anchorPoint(){return new P(this.anchorPointX,this.anchorPointY)}};sO.prototype.size=20;var sR=class extends sE{get(e){return new sO(this,e)}};aI("CollisionBoxArray",sR);var sN=class extends sc{get anchorX(){return this._structArray.int16[this._pos2+0]}get anchorY(){return this._structArray.int16[this._pos2+1]}get glyphStartIndex(){return this._structArray.uint16[this._pos2+2]}get numGlyphs(){return this._structArray.uint16[this._pos2+3]}get vertexStartIndex(){return this._structArray.uint32[this._pos4+2]}get lineStartIndex(){return this._structArray.uint32[this._pos4+3]}get lineLength(){return this._structArray.uint32[this._pos4+4]}get segment(){return this._structArray.uint16[this._pos2+10]}get lowerSize(){return this._structArray.uint16[this._pos2+11]}get upperSize(){return this._structArray.uint16[this._pos2+12]}get lineOffsetX(){return this._structArray.float32[this._pos4+7]}get lineOffsetY(){return this._structArray.float32[this._pos4+8]}get writingMode(){return this._structArray.uint8[this._pos1+36]}get placedOrientation(){return this._structArray.uint8[this._pos1+37]}set placedOrientation(e){this._structArray.uint8[this._pos1+37]=e}get hidden(){return this._structArray.uint8[this._pos1+38]}set hidden(e){this._structArray.uint8[this._pos1+38]=e}get crossTileID(){return this._structArray.uint32[this._pos4+10]}set crossTileID(e){this._structArray.uint32[this._pos4+10]=e}get associatedIconIndex(){return this._structArray.int16[this._pos2+22]}get heightOffset(){return this._structArray.float32[this._pos4+12]}};sN.prototype.size=52;var sU=class extends sC{get(e){return new sN(this,e)}};aI("PlacedSymbolArray",sU);var sq=class extends sc{get anchorX(){return this._structArray.int16[this._pos2+0]}get anchorY(){return this._structArray.int16[this._pos2+1]}get rightJustifiedTextSymbolIndex(){return this._structArray.int16[this._pos2+2]}get centerJustifiedTextSymbolIndex(){return this._structArray.int16[this._pos2+3]}get leftJustifiedTextSymbolIndex(){return this._structArray.int16[this._pos2+4]}get verticalPlacedTextSymbolIndex(){return this._structArray.int16[this._pos2+5]}get placedIconSymbolIndex(){return this._structArray.int16[this._pos2+6]}get verticalPlacedIconSymbolIndex(){return this._structArray.int16[this._pos2+7]}get key(){return this._structArray.uint16[this._pos2+8]}get textBoxStartIndex(){return this._structArray.uint16[this._pos2+9]}get textBoxEndIndex(){return this._structArray.uint16[this._pos2+10]}get verticalTextBoxStartIndex(){return this._structArray.uint16[this._pos2+11]}get verticalTextBoxEndIndex(){return this._structArray.uint16[this._pos2+12]}get iconBoxStartIndex(){return this._structArray.uint16[this._pos2+13]}get iconBoxEndIndex(){return this._structArray.uint16[this._pos2+14]}get verticalIconBoxStartIndex(){return this._structArray.uint16[this._pos2+15]}get verticalIconBoxEndIndex(){return this._structArray.uint16[this._pos2+16]}get featureIndex(){return this._structArray.uint16[this._pos2+17]}get numHorizontalGlyphVertices(){return this._structArray.uint16[this._pos2+18]}get numVerticalGlyphVertices(){return this._structArray.uint16[this._pos2+19]}get numIconVertices(){return this._structArray.uint16[this._pos2+20]}get numVerticalIconVertices(){return this._structArray.uint16[this._pos2+21]}get useRuntimeCollisionCircles(){return this._structArray.uint16[this._pos2+22]}get crossTileID(){return this._structArray.uint32[this._pos4+12]}set crossTileID(e){this._structArray.uint32[this._pos4+12]=e}get textBoxScale(){return this._structArray.float32[this._pos4+13]}get collisionCircleDiameter(){return this._structArray.float32[this._pos4+14]}get textAnchorOffsetStartIndex(){return this._structArray.uint16[this._pos2+30]}get textAnchorOffsetEndIndex(){return this._structArray.uint16[this._pos2+31]}get heightOffset(){return this._structArray.float32[this._pos4+16]}};sq.prototype.size=68;var sj=class extends sM{get(e){return new sq(this,e)}};aI("SymbolInstanceArray",sj);var sG=class extends sB{getoffsetX(e){return this.float32[+e+0]}};aI("GlyphOffsetArray",sG);var sX=class extends sm{getx(e){return this.int16[3*e+0]}gety(e){return this.int16[3*e+1]}gettileUnitDistanceFromAnchor(e){return this.int16[3*e+2]}};aI("SymbolLineVertexArray",sX);var sY=class extends sc{get textAnchor(){return this._structArray.uint16[this._pos2+0]}get textOffset0(){return this._structArray.float32[this._pos4+1]}get textOffset1(){return this._structArray.float32[this._pos4+2]}};sY.prototype.size=12;var sZ=class extends sP{get(e){return new sY(this,e)}};aI("TextAnchorOffsetArray",sZ);var sW=class extends sc{get featureIndex(){return this._structArray.uint32[this._pos4+0]}get sourceLayerIndex(){return this._structArray.uint16[this._pos2+2]}get bucketIndex(){return this._structArray.uint16[this._pos2+3]}};sW.prototype.size=8;var sH=class extends sz{get(e){return new sW(this,e)}};aI("FeatureIndexArray",sH);var sK=class extends sy{},sJ=class extends sm{},sQ=class extends sg{},s0=class extends sy{},s1=class extends sy{},s2=class extends sx{},s3=class extends sv{},s5=class extends sb{},s6=class extends sw{},s4=class extends s_{},s8=class extends sA{},s7=class extends sD{},s9=class extends sS{},oe=class extends sF{},ot=class extends sk{},or=class extends sT{},on=class extends sI{},oi=class extends sI{},oa=class extends sV{},os=class extends sL{};let oo=sf([{name:"a_pos",components:2,type:"Int16"}],4),ol=oo.members;oo.size,oo.alignment;var ou=class e{constructor(e=[]){this._forceNewSegmentOnNextPrepare=!1,this.segments=e}prepareSegment(t,r,n,i){let a=this.segments[this.segments.length-1];return t>e.MAX_VERTEX_ARRAY_LENGTH&&th(`Max vertices per segment is ${e.MAX_VERTEX_ARRAY_LENGTH}: bucket requested ${t}. Consider using the \`fillLargeMeshArrays\` function if you require meshes with more than ${e.MAX_VERTEX_ARRAY_LENGTH} vertices.`),this._forceNewSegmentOnNextPrepare||!a||a.vertexLength+t>e.MAX_VERTEX_ARRAY_LENGTH||a.sortKey!==i?this.createNewSegment(r,n,i):a}createNewSegment(e,t,r){let n={vertexOffset:e.length,primitiveOffset:t.length,vertexLength:0,primitiveLength:0,vaos:{}};return void 0!==r&&(n.sortKey=r),this._forceNewSegmentOnNextPrepare=!1,this.segments.push(n),n}getOrCreateLatestSegment(e,t,r){return this.prepareSegment(0,e,t,r)}forceNewSegmentOnNextPrepare(){this._forceNewSegmentOnNextPrepare=!0}get(){return this.segments}destroy(){for(let e of this.segments)for(let t in e.vaos)e.vaos[t].destroy()}static simpleSegment(t,r,n,i){return new e([{vertexOffset:t,primitiveOffset:r,vertexLength:n,primitiveLength:i,vaos:{},sortKey:0}])}};function oh(e,t){return 256*(e=e4(Math.floor(e),0,255))+(t=e4(Math.floor(t),0,255))}ou.MAX_VERTEX_ARRAY_LENGTH=65535,aI("SegmentVector",ou);let oc=sf([{name:"a_pattern_from",components:4,type:"Uint16"},{name:"a_pattern_to",components:4,type:"Uint16"},{name:"a_pixel_ratio_from",components:1,type:"Uint16"},{name:"a_pixel_ratio_to",components:1,type:"Uint16"}]),op=sf([{name:"a_dasharray_from",components:4,type:"Uint16"},{name:"a_dasharray_to",components:4,type:"Uint16"}]);var of=B((e,t)=>{void 0!==t&&(t.exports=function(e,t){for(var r,n,i=3&e.length,a=e.length-i,s=t,o=0;o<a;)n=255&e.charCodeAt(o)|(255&e.charCodeAt(++o))<<8|(255&e.charCodeAt(++o))<<16|(255&e.charCodeAt(++o))<<24,++o,s^=n=(65535&(n=(n=(65535&n)*0xcc9e2d51+(((n>>>16)*0xcc9e2d51&65535)<<16)|0)<<15|n>>>17))*0x1b873593+(((n>>>16)*0x1b873593&65535)<<16)|0,s=(65535&(r=(65535&(s=s<<13|s>>>19))*5+(((s>>>16)*5&65535)<<16)|0))+27492+(((r>>>16)+58964&65535)<<16);switch(n=0,i){case 3:n^=(255&e.charCodeAt(o+2))<<16;case 2:n^=(255&e.charCodeAt(o+1))<<8;case 1:n^=255&e.charCodeAt(o),s^=n=(65535&(n=(n=(65535&n)*0xcc9e2d51+(((n>>>16)*0xcc9e2d51&65535)<<16)|0)<<15|n>>>17))*0x1b873593+(((n>>>16)*0x1b873593&65535)<<16)|0}return s^=e.length,s^=s>>>16,s=(65535&s)*0x85ebca6b+(((s>>>16)*0x85ebca6b&65535)<<16)|0,s^=s>>>13,s=(65535&s)*0xc2b2ae35+(((s>>>16)*0xc2b2ae35&65535)<<16)|0,(s^=s>>>16)>>>0})}),od=B((e,t)=>{t.exports=function(e,t){for(var r,n=e.length,i=t^n,a=0;n>=4;)r=(65535&(r=255&e.charCodeAt(a)|(255&e.charCodeAt(++a))<<8|(255&e.charCodeAt(++a))<<16|(255&e.charCodeAt(++a))<<24))*0x5bd1e995+(((r>>>16)*0x5bd1e995&65535)<<16),r^=r>>
vendor: 9,899 bytes, line 2
2>24,i=(65535&i)*0x5bd1e995+(((i>>>16)*0x5bd1e995&65535)<<16)^(r=(65535&r)*0x5bd1e995+(((r>>>16)*0x5bd1e995&65535)<<16)),n-=4,++a;switch(n){case 3:i^=(255&e.charCodeAt(a+2))<<16;case 2:i^=(255&e.charCodeAt(a+1))<<8;case 1:i^=255&e.charCodeAt(a),i=(65535&i)*0x5bd1e995+(((i>>>16)*0x5bd1e995&65535)<<16)}return i^=i>>>13,i=(65535&i)*0x5bd1e995+(((i>>>16)*0x5bd1e995&65535)<<16),(i^=i>>>15)>>>0}}),oy=((e,t,r)=>{if(t&&"object"==typeof t||"function"==typeof t)for(var n,i=I(t),a=0,s=i.length;a<s;a++)n=i[a],M.call(e,n)||void 0===n||k(e,n,{get:(e=>t[e]).bind(null,n),enumerable:!(r=T(t,n))||r.enumerable});return e})(k(null==(A=B((e,t)=>{var r=of(),n=od();t.exports=r,t.exports.murmur3=r,t.exports.murmur2=n})())?{}:F(C(A)),"default",{value:A,enumerable:!0}),A),om=class e{constructor(){this.ids=[],this.positions=[],this.indexed=!1}add(e,t,r,n){this.ids.push(og(e)),this.positions.push(t,r,n)}getPositions(e){if(!this.indexed)throw Error("Trying to get index, but feature positions are not indexed");let t=og(e),r=0,n=this.ids.length-1;for(;r<n;){let e=r+n>>1;this.ids[e]>=t?n=e:r=e+1}let i=[];for(;this.ids[r]===t;){let e=this.positions[3*r],t=this.positions[3*r+1],n=this.positions[3*r+2];i.push({index:e,start:t,end:n}),r++}return i}static serialize(e,t){let r=new Float64Array(e.ids),n=new Uint32Array(e.positions);return function e(t,r,n,i){for(;n<i;){let a=t[n+i>>1],s=n-1,o=i+1;for(;;){do s++;while(t[s]<a);do o--;while(t[o]>a);if(s>=o)break;ox(t,s,o),ox(r,3*s,3*o),ox(r,3*s+1,3*o+1),ox(r,3*s+2,3*o+2)}o-n<i-o?(e(t,r,n,o),n=o+1):(e(t,r,o+1,i),i=o)}}(r,n,0,r.length-1),t&&t.push(r.buffer,n.buffer),{ids:r,positions:n}}static deserialize(t){let r=new e;return r.ids=t.ids,r.positions=t.positions,r.indexed=!0,r}};function og(e){let t=+e;return!isNaN(t)&&t<=0x20000000000000-1?t:(0,oy.default)(String(e))}function ox(e,t,r){let n=e[t];e[t]=e[r],e[r]=n}aI("FeaturePositionMap",om);var ov=class{constructor(e,t){this.gl=e.gl,this.location=t}},ob=class extends ov{constructor(e,t){super(e,t),this.current=0}set(e){this.current!==e&&(this.current=e,this.gl.uniform1i(this.location,e))}},ow=class extends ov{constructor(e,t){super(e,t),this.current=0}set(e){this.current!==e&&(this.current=e,this.gl.uniform1f(this.location,e))}},o_=class extends ov{constructor(e,t){super(e,t),this.current=[0,0]}set(e){(e[0]!==this.current[0]||e[1]!==this.current[1])&&(this.current=e,this.gl.uniform2f(this.location,e[0],e[1]))}},oA=class extends ov{constructor(e,t){super(e,t),this.current=[0,0,0]}set(e){(e[0]!==this.current[0]||e[1]!==this.current[1]||e[2]!==this.current[2])&&(this.current=e,this.gl.uniform3f(this.location,e[0],e[1],e[2]))}},oD=class extends ov{constructor(e,t){super(e,t),this.current=[0,0,0,0]}set(e){(e[0]!==this.current[0]||e[1]!==this.current[1]||e[2]!==this.current[2]||e[3]!==this.current[3])&&(this.current=e,this.gl.uniform4f(this.location,e[0],e[1],e[2],e[3]))}},oS=class extends ov{constructor(e,t){super(e,t),this.current=rL.transparent}set(e){(e.r!==this.current.r||e.g!==this.current.g||e.b!==this.current.b||e.a!==this.current.a)&&(this.current=e,this.gl.uniform4f(this.location,e.r,e.g,e.b,e.a))}},oE=class extends ov{constructor(e,t){super(e,t),this.current=[]}set(e){if(e!=this.current){this.current=e;let t=new Float32Array(4*e.length);for(let r=0;r<e.length;r++)t[4*r]=e[r].r,t[4*r+1]=e[r].g,t[4*r+2]=e[r].b,t[4*r+3]=e[r].a;this.gl.uniform4fv(this.location,t)}}},oF=class extends ov{constructor(e,t){super(e,t),this.current=[]}set(e){if(e!=this.current){this.current=e;let t=new Float32Array(e);this.gl.uniform1fv(this.location,t)}}};let ok=new Float32Array(16);var oT=class extends ov{constructor(e,t){super(e,t),this.current=ok}set(e){if(e[12]!==this.current[12]||e[0]!==this.current[0]){this.current=e,this.gl.uniformMatrix4fv(this.location,!1,e);return}for(let t=1;t<16;t++)if(e[t]!==this.current[t]){this.current=e,this.gl.uniformMatrix4fv(this.location,!1,e);break}}};function oI(e){return[oh(255*e.r,255*e.g),oh(255*e.b,255*e.a)]}var oC=class{constructor(e,t,r){this.value=e,this.uniformNames=t.map(e=>`u_${e}`),this.type=r}setUniform(e,t,r){e.set(r.constantOr(this.value))}getBinding(e,t,r){return"color"===this.type?new oS(e,t):new ow(e,t)}},oM=class{constructor(e,t){this.uniformNames=t.map(e=>`u_${e}`),this.patternFrom=null,this.patternTo=null,this.pixelRatioFrom=1,this.pixelRatioTo=1}setConstantPatternPositions(e,t){this.pixelRatioFrom=t.pixelRatio,this.pixelRatioTo=e.pixelRatio,this.patternFrom=t.tlbr,this.patternTo=e.tlbr}setConstantDashPositions(e,t){this.dashTo=[0,e.y,e.height,e.width],this.dashFrom=[0,t.y,t.height,t.width]}setUniform(e,t,r,n){let i=null;"u_pattern_to"===n?i=this.patternTo:"u_pattern_from"===n?i=this.patternFrom:"u_dasharray_to"===n?i=this.dashTo:"u_dasharray_from"===n?i=this.dashFrom:"u_pixel_ratio_to"===n?i=this.pixelRatioTo:"u_pixel_ratio_from"===n&&(i=this.pixelRatioFrom),null!==i&&e.set(i)}getBinding(e,t,r){return r.startsWith("u_pattern")||r.startsWith("u_dasharray_")?new oD(e,t):new ow(e,t)}},oB=class{constructor(e,t,r,n){this.expression=e,this.type=r,this.maxValue=0,this.paintVertexAttributes=t.map(e=>({name:`a_${e}`,type:"Float32",components:"color"===r?2:1,offset:0})),this.paintVertexArray=new n}populatePaintArray(e,t,r){let n=this.paintVertexArray.length,i=this.expression.evaluate(new aW(0,r),t,{},r.canonical,[],r.formattedSection);this.paintVertexArray.resize(e),this._setPaintValue(n,e,i)}updatePaintArray(e,t,r,n,i){let a=this.expression.evaluate(new aW(0,i),r,n);this._setPaintValue(e,t,a)}_setPaintValue(e,t,r){if("color"===this.type){let n=oI(r);for(let r=e;r<t;r++)this.paintVertexArray.emplace(r,n[0],n[1])}else{for(let n=e;n<t;n++)this.paintVertexArray.emplace(n,r);this.maxValue=Math.max(this.maxValue,Math.abs(r))}}upload(e){this.paintVertexArray?.arrayBuffer.byteLength&&(this.paintVertexBuffer?.buffer?this.paintVertexBuffer.updateData(this.paintVertexArray):this.paintVertexBuffer=e.createVertexBuffer(this.paintVertexArray,this.paintVertexAttributes,this.expression.isStateDependent))}destroy(){this.paintVertexBuffer&&this.paintVertexBuffer.destroy()}},oP=class{constructor(e,t,r,n,i,a){this.expression=e,this.uniformNames=t.map(e=>`u_${e}_t`),this.type=r,this.useIntegerZoom=n,this.zoom=i,this.maxValue=0,this.paintVertexAttributes=t.map(e=>({name:`a_${e}`,type:"Float32",components:"color"===r?4:2,offset:0})),this.paintVertexArray=new a}populatePaintArray(e,t,r){let n=this.expression.evaluate(new aW(this.zoom,r),t,{},r.canonical,[],r.formattedSection),i=this.expression.evaluate(new aW(this.zoom+1,r),t,{},r.canonical,[],r.formattedSection),a=this.paintVertexArray.length;this.paintVertexArray.resize(e),this._setPaintValue(a,e,n,i)}updatePaintArray(e,t,r,n,i){let a=this.expression.evaluate(new aW(this.zoom,i),r,n),s=this.expression.evaluate(new aW(this.zoom+1,i),r,n);this._setPaintValue(e,t,a,s)}_setPaintValue(e,t,r,n){if("color"===this.type){let i=oI(r),a=oI(n);for(let r=e;r<t;r++)this.paintVertexArray.emplace(r,i[0],i[1],a[0],a[1])}else{for(let i=e;i<t;i++)this.paintVertexArray.emplace(i,r,n);this.maxValue=Math.max(this.maxValue,Math.abs(r),Math.abs(n))}}upload(e){this.paintVertexArray?.arrayBuffer.byteLength&&(this.paintVertexBuffer?.buffer?this.paintVertexBuffer.updateData(this.paintVertexArray):this.paintVertexBuffer=e.createVertexBuffer(this.paintVertexArray,this.paintVertexAttributes,this.expression.isStateDependent))}destroy(){this.paintVertexBuffer&&this.paintVertexBuffer.destroy()}setUniform(e,t){let r=this.useIntegerZoom?Math.floor(t.zoom):t.zoom,n=e4(this.expression.interpolationFactor(r,this.zoom,this.zoom+1),0,1);e.set(n)}getBinding(e,t,r){return new ow(e,t)}},oz=class{constructor(e,t,r,n,i,a){this.expression=e,this.type=t,this.useIntegerZoom=r,this.zoom=n,this.layerId=a,this.zoomInPaintVertexArray=new i,this.zoomOutPaintVertexArray=new i}populatePaintArray(e,t,r){let n=this.zoomInPaintVertexArray.length;this.zoomInPaintVertexArray.resize(e),this.zoomOutPaintVertexArray.resize(e),this._setPaintValues(n,e,this.getPositionIds(t),r)}updatePaintArray(e,t,r,n,i){this._setPaintValues(e,t,this.getPositionIds(r),i)}_setPaintValues(e,t,r,n){let i=this.getPositions(n);if(!i||!r)return;let a=i[r.min],s=i[r.mid],o=i[r.max];if(a&&s&&o)for(let r=e;r<t;r++)this.emplace(this.zoomInPaintVertexArray,r,a,s),this.emplace(this.zoomOutPaintVertexArray,r,o,s)}upload(e){if(this.zoomInPaintVertexArray?.arrayBuffer.byteLength&&this.zoomOutPaintVertexArray?.arrayBuffer.byteLength){let t=this.getVertexAttributes();this.zoomInPaintVertexBuffer=e.createVertexBuffer(this.zoomInPaintVertexArray,t,this.expression.isStateDependent),this.zoomOutPaintVertexBuffer=e.createVertexBuffer(this.zoomOutPaintVertexArray,t,this.expression.isStateDependent)}}destroy(){this.zoomOutPaintVertexBuffer&&this.zoomOutPaintVertexBuffer.destroy(),this.zoomInPaintVertexBuffer&&this.zoomInPaintVertexBuffer.destroy()}},oV=class extends oz{getPositions(e){return e.imagePositions}getPositionIds(e){return e.patterns?.[this.layerId]}getVertexAttributes(){return oc.members}emplace(e,t,r,n){e.emplace(t,r.tlbr[0],r.tlbr[1],r.tlbr[2],r.tlbr[3],n.tlbr[0],n.tlbr[1],n.tlbr[2],n.tlbr[3],r.pixelRatio,n.pixelRatio)}},oL=class extends oz{getPositions(e){return e.dashPositions}getPositionIds(e){return e.dashes?.[this.layerId]}getVertexAttributes(){return op.members}emplace(e,t,r,n){e.emplace(t,0,r.y,r.height,r.width,0,n.y,n.height,n.width)}},o$=class{constructor(e,t,r){this.binders={},this._buffers=[];let n=[];for(let i in e.paint._values){if(!r(i))continue;let a=e.paint.get(i);if(!(a instanceof a5)||!id(a.property.specification))continue;let s=function(e,t){return({"text-opacity":["opacity"],"icon-opacity":["opacity"],"text-color":["fill_color"],"icon-color":["fill_color"],"text-halo-color":["halo_color"],"icon-halo-color":["halo_color"],"text-halo-blur":["halo_blur"],"icon-halo-blur":["halo_blur"],"text-halo-width":["halo_width"],"icon-halo-width":["halo_width"],"line-gap-width":["ga
2pwidth"],"line-dasharray":["dasharray_to","dasharray_from"],"line-pattern":["pattern_to","pattern_from","pixel_ratio_to","pixel_ratio_from"],"fill-pattern":["pattern_to","pattern_from","pixel_ratio_to","pixel_ratio_from"],"fill-extrusion-pattern":["pattern_to","pattern_from","pixel_ratio_to","pixel_ratio_from"]})[e]||[e.replace(`${t}-`,"").replace(/-/g,"_")]}(i,e.type),o=a.value,l=a.property.specification.type,u=a.property.useIntegerZoom,h=a.property.specification["property-type"],c="cross-faded"===h||"cross-faded-data-driven"===h;if("constant"===o.kind)this.binders[i]=c?new oM(o.value,s):new oC(o.value,s,l),n.push(`/u_${i}`);else if("source"===o.kind||c){let r=oR(i,l,"source");this.binders[i]=c?"line-dasharray"===i?new oL(o,l,u,t,r,e.id):new oV(o,l,u,t,r,e.id):new oB(o,s,l,r),n.push(`/a_${i}`)}else{let e=oR(i,l,"composite");this.binders[i]=new oP(o,s,l,u,t,e),n.push(`/z_${i}`)}}this.cacheKey=n.sort().join("")}getMaxValue(e){let t=this.binders[e];return t instanceof oB||t instanceof oP?t.maxValue:0}populatePaintArrays(e,t,r){for(let n in this.binders){let i=this.binders[n];(i instanceof oB||i instanceof oP||i instanceof oz)&&i.populatePaintArray(e,t,r)}}setConstantPatternPositions(e,t){for(let r in this.binders){let n=this.binders[r];n instanceof oM&&n.setConstantPatternPositions(e,t)}}setConstantDashPositions(e,t){for(let r in this.binders){let n=this.binders[r];n instanceof oM&&n.setConstantDashPositions(e,t)}}updatePaintArrays(e,t,r,n,i){let a=!1;for(let s of e)for(let e of t.getPositions(s.id)){let t=r.feature(e.index);for(let r in this.binders){let o=this.binders[r];(o instanceof oB||o instanceof oP||o instanceof oz)&&!0===o.expression.isStateDependent&&(o.expression=n.paint.get(r).value,o.updatePaintArray(e.start,e.end,t,s.state,i),a=!0)}}return a}defines(){let e=[];for(let t in this.binders){let r=this.binders[t];(r instanceof oC||r instanceof oM)&&e.push(...r.uniformNames.map(e=>`#define HAS_UNIFORM_${e}`))}return e}getBinderAttributes(){let e=[];for(let t in this.binders){let r=this.binders[t];if(r instanceof oB||r instanceof oP)for(let t of r.paintVertexAttributes)e.push(t.name);else if(r instanceof oz)for(let t of r.getVertexAttributes())e.push(t.name)}return e}getBinderUniforms(){let e=[];for(let t in this.binders){let r=this.binders[t];if(r instanceof oC||r instanceof oM||r instanceof oP)for(let t of r.uniformNames)e.push(t)}return e}getPaintVertexBuffers(){return this._buffers}getUniforms(e,t){let r=[];for(let n in this.binders){let i=this.binders[n];if(i instanceof oC||i instanceof oM||i instanceof oP){for(let a of i.uniformNames)if(t[a]){let s=i.getBinding(e,t[a],a);
2r.push({name:a,property:n,binding:s})}}}return r}setUniforms(e,t,r,n){for(let{name:e,property:i,binding:a}of t)this.binders[i].setUniform(a,n,r.get(i),e)}updatePaintBuffers(e){for(let t in this._buffers=[],this.binders){let r=this.binders[t];if(e&&r instanceof oz){let t=2===e.fromScale?r.zoomInPaintVertexBuffer:r.zoomOutPaintVertexBuffer;t&&this._buffers.push(t)}else(r instanceof oB||r instanceof oP)&&r.paintVertexBuffer&&this._buffers.push(r.paintVertexBuffer)}}upload(e){for(let t in this.binders){let r=this.binders[t];(r instanceof oB||r instanceof oP||r instanceof oz)&&r.upload(e)}this.updatePaintBuffers()}destroy(){for(let e in this.binders){let t=this.binders[e];(t instanceof oB||t instanceof oP||t instanceof oz)&&t.destroy()}}},oO=class{constructor(e,t,r=()=>!0){for(let n of(this.programConfigurations={},e))this.programConfigurations[n.id]=new o$(n,t,r);this.needsUpload=!1,this._featureMap=new om,this._bufferOffset=0}populatePaintArrays(e,t,r,n){for(let r in this.programConfigurations)this.programConfigurations[r].populatePaintArrays(e,t,n);void 0!==t.id&&this._featureMap.add(t.id,r,this._bufferOffset,e),this._bufferOffset=e,this.needsUpload=!0}updatePaintArrays(e,t,r,n){for(let i of r)this.needsUpload=this.programConfigurations[i.id].updatePaintArrays(e,this._featureMap,t,i,n)||this.needsUpload}get(e){return this.programConfigurations[e]}upload(e){if(this.needsUpload){for(let t in this.programConfigurations)this.programConfigurations[t].upload(e);this.needsUpload=!1}}destroy(){for(let e in this.programConfigurations)this.programConfigurations[e].destroy()}};function oR(e,t,r){return({"line-pattern":{source:s6,composite:s6},"fill-pattern":{source:s6,composite:s6},"fill-extrusion-pattern":{source:s6,composite:s6},"line-dasharray":{source:s4,composite:s4}})[e]?.[r]||({color:{source:sb,composite:s$},number:{source:sB,composite:sb}})[t][r]}aI("ConstantBinder",oC),aI("CrossFadedConstantBinder",oM),aI("SourceExpressionBinder",oB),aI("CrossFadedPatternBinder",oV),aI("CrossFadedDasharrayBinder",oL),aI("CompositeExpressionBinder",oP),aI("ProgramConfiguration",o$,{omit:["_buffers"]}),aI("ProgramConfigurationSet",oO);let oN=-16383-1;function oU(e){let t=e$/e.extent,r=e.loadGeometry();for(let e of r)for(let r of e){let e=Math.round(r.x*t),n=Math.round(r.y*t);r.x=e4(e,oN,16383),r.y=e4(n,oN,16383),(e<r.x||e>r.x+1||n<r.y||n>r.y+1)&&th("Geometry exceeds allowed extent, reduce your vector tile buffer size")}return r}function oq(e,t){return{type:e.type,id:e.id,properties:e.properties,geometry:t?oU(e):[]}}var oj=class{constructor(e){this.zoom=e.zoom,this.overscaling=e.overscaling,this.layers=e.layers,this.layerIds=this.layers.map(e=>e.id),this.index=e.index,this.hasDependencies=!1,this.layoutVertexArray=new s0,this.indexArray=new oi,this.segments=new ou,this.programConfigurations=new oO(e.layers,e.zoom),this.stateDependentLayerIds=this.layers.filter(e=>e.isStateDependent()).map(e=>e.id)}populate(e,t,r){let n=this.layers[0],i=[],a=null,s=!1,o="heatmap"===n.type;"circle"===n.type&&(s=!(a=n.layout.get("circle-sort-key")).isConstant(),o||="map"===n.paint.get("circle-pitch-alignment"));let l=o?t.subdivisionGranularity.circle:1,u=new aW(this.zoom),h=this.layers[0]._featureFilter.needGeometry;for(let{feature:t,id:n,index:o,sourceLayerIndex:l}of e){let e=oq(t,h);if(!this.layers[0]._featureFilter.filter(u,e,r))continue;let c=s?a.evaluate(e,{},r):void 0,p={id:n,properties:t.properties,type:t.type,sourceLayerIndex:l,index:o,geometry:h?e.geometry:oU(t),patterns:{},sortKey:c};i.push(p)}for(let n of(s&&i.sort((e,t)=>
2e.sortKey-t.sortKey),i)){let{geometry:i,index:a,sourceLayerIndex:s}=n,o=e[a].feature;this.addFeature(n,i,a,r,l),t.featureIndex.insert(o,i,a,s,this.index)}}update(e,t,r){this.stateDependentLayers.length&&this.programConfigurations.updatePaintArrays(e,t,this.stateDependentLayers,{imagePositions:r})}addFeatures(e){}isEmpty(){return 0===this.layoutVertexArray.length}uploadPending(){return!this.uploaded||this.programConfigurations.needsUpload}upload(e){this.uploaded||(this.layoutVertexBuffer=e.createVertexBuffer(this.layoutVertexArray,ol),this.indexBuffer=e.createIndexBuffer(this.indexArray)),this.programConfigurations.upload(e),this.uploaded=!0}destroy(){this.layoutVertexBuffer&&(this.layoutVertexBuffer.destroy(),this.indexBuffer.destroy(),this.programConfigurations.destroy(),this.segments.destroy())}addFeature(e,t,r,n,i=1){let a;switch(i){case 1:a=[0,7];break;case 3:a=[0,2,5,7];break;case 5:a=[0,1,3,4,6,7];break;case 7:a=[0,1,2,3,4,5,6,7];break;default:throw Error(`Invalid circle bucket granularity: ${i}; valid values are 1, 3, 5, 7.`)}let s=a.length;for(let r of t)for(let t of r){let r=t.x,n=t.y;if(r<0||r>=8192||n<0||n>=8192)continue;let i=this.segments.prepareSegment(s*s,this.layoutVertexArray,this.indexArray,e.sortKey),h=i.vertexLength;for(let e=0;e<s;e++)for(let t=0;t<s;t++){var o,l,u;o=this.layoutVertexArray,l=a[t],u=a[e],o.emplaceBack(-32768+8*r+l,-32768+8*n+u)}for(let e=0;e<s-1;e++)for(let t=0;t<s-1;t++){let r=h+e*s+t,n=h+(e+1)*s+t;this.indexArray.emplaceBack(r,n+1,r+1),this.indexArray.emplaceBack(r,n,n+1)}i.vertexLength+=s*s,i.primitiveLength+=(s-1)*(s-1)*2}this.programConfigurations.populatePaintArrays(this.layoutVertexArray.length,e,r,{imagePositions:{},canonical:n})}};function oG(e,t){for(let r of e)if(oJ(t,r))return!0;for(let r of t)if(oJ(e,r))return!0;return oZ(e,t)}function oX(e,t,r){return!!oJ(e,t)||oW(t,e,r)}function oY(e,t){if(1===e.length)return oK(t,e[0]);for(let r of t)for(let t of r)if(oJ(e,t))return!0;for(let r of e)if(oK(t,r))return!0;for(let r of t)if(oZ(e,r))return!0;return!1}function oZ(e,t){if(0===e.length||0===t.length)return!1;for(let s=0;s<e.length-1;s++){let o=e[s],l=e[s+1];for(let e=0;e<t.length-1;e++){var r,n,i,a;if(r=o,n=l,i=t[e],tc(r,i,a=t[e+1])!==tc(n,i,a)&&tc(r,n,i)!==tc(r,n,a))return!0}}return!1}function oW(e,t,r){let n=r*r;if(1===t.length)return e.distSqr(t[0])<n;for(let r=1;r<t.length;r++)if(oH(e,t[r-1],t[r])<n)return!0;return!1}function oH(e,t,r){let n=t.distSqr(r);if(0===n)return e.distSqr(t);let i=((e.x-t.x)*(r.x-t.x)+(e.y-t.y)*(r.y-t.y))/n;return i<0?e.distSqr(t):i>1?e.distSqr(r):e.distSqr(r.sub(t)._mult(i)._add(t))}function oK(e,t){let r=!1,n,i;for(let a of e)for(let e=0,s=a.length-1;e<a.length;s=e++)n=a[e],i=a[s],n.y>t.y!=i.y>t.y&&t.x<(i.x-n.x)*(t.y-n.y)/(i.y-n.y)+n.x&&(r=!r);return r}function oJ(e,t){let r=!1;for(let n=0,i=e.length-1;n<e.length;i=n++){let a=e[n],s=e[i];a.y>t.y!=s.y>t.y&&t.x<(s.x-a.x)*(t.y-a.y)/(s.y-a.y)+a.x&&(r=!r)}return r}function oQ(e,t,r){let n=t.paint.get(e).value;return"constant"===n.kind?n.value:r.programConfigurations.get(t.id).getMaxValue(e)}function o0(e){return Math.sqrt(e[0]*e[0]+e[1]*e[1])}function o1(e,t,r,n,i){if(!t[0]&&!t[1])return e;let a=P.convert(t)._mult(i);"viewport"===r&&a._rotate(-n);let s=[];for(let t of e)s.push(t.sub(a));return s}function o2({queryGeometry:e,size:t},r){return oX(e,r,t)}function o3({queryGeometry:e,size:t,transform:r,unwrappedTileID:n,getElevation:i},a){return oX(e,a,t*(r.projectTileCoordinates(a.x,a.y,n,i?.(a.x,a.y)).signedDistanceFromCamera/r.cameraToCenterDistance))}function o5({queryGeometry:e,size:t,transform:r,unwrappedTileID:n,getElevation:i},a){let s=r.projectTileCoordinates(a.x,a.y,n,i?.(a.x,a.y)).signedDistanceFromCamera,o=t*(r.cameraToCenterDistance/s);return oX(e,o8(a,r,n,i),o)}function o6({queryGeometry:e,size:t,transform:r,unwrappedTileID:n,getElevation:i},a){return oX(e,o8(a,r,n,i),t)}function o4({queryGeometry:e,size:t,transform:r,unwrappedTileID:n,getElevation:i,pitchAlignment:a="map",pitchScale:s="map"},o){let l="map"===a?"map"===s?o2:o3:"map"===s?o5:o6,u={queryGeometry:e,size:t,transform:r,unwrappedTileID:n,getElevation:i};for(let e of o)for(let t of e)if(l(u,t))return!0;return!1}function o8(e,t,r,n){let i=t.projectTileCoordinates(e.x,e.y,r,n?.(e.x,e.y)).point;return new P((.5*i.x+.5)*t.width,(-(.5*i.y)+.5)*t.height)}aI("CircleBucket",oj,{omit:["layers"]});var o7={get paint(){return o||=new sn({"circle-radius":new a9(t2.paint_circle["circle-radius"],"cir
2cle-radius"),"circle-color":new a9(t2.paint_circle["circle-color"],"circle-color"),"circle-blur":new a9(t2.paint_circle["circle-blur"],"circle-blur"),"circle-opacity":new a9(t2.paint_circle["circle-opacity"],"circle-opacity"),"circle-translate":new a7(t2.paint_circle["circle-translate"],"circle-translate"),"circle-translate-anchor":new a7(t2.paint_circle["circle-translate-anchor"],"circle-translate-anchor"),"circle-pitch-scale":new a7(t2.paint_circle["circle-pitch-scale"],"circle-pitch-scale"),"circle-pitch-alignment":new a7(t2.paint_circle["circle-pitch-alignment"],"circle-pitch-alignment"),"circle-stroke-width":new a9(t2.paint_circle["circle-stroke-width"],"circle-stroke-width"),"circle-stroke-color":new a9(t2.paint_circle["circle-stroke-color"],"circle-stroke-color"),"circle-stroke-opacity":new a9(t2.paint_circle["circle-stroke-opacity"],"circle-stroke-opacity")})},get layout(){return s||=new sn({"circle-sort-key":new a9(t2.layout_circle["circle-sort-key"],"circle-sort-key")})}};let o9=e=>"circle"===e.type;var le=class extends ss{constructor(e,t){super(e,o7,t)}createBucket(e){return new oj(e)}queryRadius(e){return oQ("circle-radius",this,e)+oQ("circle-stroke-width",this,e)+o0(this.paint.get("circle-translate"))}queryIntersectsFeature({queryGeometry:e,feature:t,featureState:r,geometry:n,transform:i,pixelsToTileUnits:a,unwrappedTileID:s,getElevation:o}){let l=o1(e,this.paint.get("circle-translate"),this.paint.get("circle-translate-anchor"),-i.bearingInRadians,a),u=this.paint.get("circle-radius").evaluate(t,r)+this.paint.get("circle-stroke-width").evaluate(t,r),h=this.paint.get("circle-pitch-scale"),c=this.paint.get("circle-pitch-alignment"),p,f;return"map"===c?(p=l,f=u*a):(p=l.map(e=>o8(e,i,s,o)),f=u),o4({queryGeometry:p,size:f,transform:i,unwrappedTileID:s,getElevation:o,pitchAlignment:c,pitchScale:h},n)}},lt=class extends oj{};aI("HeatmapBucket",lt,{omit:["layers"]});var lr={get paint(){return l||=new sn({"heatmap-radius":new a9(t2.paint_heatmap["heatmap-radius"],"heatmap-radius"),"heatmap-weight":new a9(t2.paint_heatmap["heatmap-weight"],"heatmap-weight"),"heatmap-intensity":new a7(t2.paint_heatmap["heatmap-intensity"],"heatmap-intensity"),"heatmap-color":new sr(t2.paint_heatmap["heatmap-color"],"heatmap-color"),"heatmap-opacity":new a7(t2.paint_heatmap["heatmap-opacity"],"heatmap-opacity")})}};function ln(e,{width:t,height:r},n,i){if(i){if(i instanceof Uint8ClampedArray)i=new Uint8Array(i.buffer);else if(i.length!==t*r*n)throw RangeError(`mismatched image size. expected: ${i.length} but got: ${t*r*n}`)}else i=new Uint8Array(t*r*n);return e.width=t,e.height=r,e.data=i,e}function li(e,{width:t,height:r},n){if(t===e.width&&r===e.height)return;let i=ln({},{width:t,height:r},n);la(e,i,{x:0,y:0},{x:0,y:0},{width:Math.min(e.width,t),height:Math.min(e.height,r)},n),e.width=t,e.height=r,e.data=i.data}function la(e,t,r,n,i,a){if(0===i.width||0===i.height)return t;if(i.width>e.width||i.height>e.height||r.x>e.width-i.width||r.y>e.height-i.height)throw RangeError("out of range source coordinates for image copy");if(i.width>t.width||i.height>t.height||n.x>t.width-i.width||n.y>t.height-i.height)throw RangeError("out of range destination coordinates for image copy");let s=e.data,o=t.data;if(s===o)throw Error("srcData equals dstData, so image is already copied");for(let l=0;l<i.height;l++){let u=((r.y+l)*e.width+r.x)*a,h=((n.y+l)*t.width+n.x)*a;for(let e=0;e<i.width*a;e++)o[h+e]=s[u+e]}return t}var ls=class e{constructor(e,t){ln(this,e,1,t)}resize(e){li(this,e,1)}clone(){return new e({width:this.width,height:this.height},new Uint8Array(this.data))}static copy(e,t,r,n,i){la(e,t,r,n,i,1)}},lo=class e{constructor(e,t){ln(this,e,4,t)}resize(e){li(this,e,4)}replace(e,t){t?this.data.set(e):this.data=e instanceof Uint8ClampedArray?new Uint8Array(e.buffer):e}clone(){return new e({width:this.width,height:this.height},new Uint8Array(this.data))}static copy(e,t,r,n,i){la(e,t,r,n,i,4)}setPixel(e,t,r){let n=(e*this.width+t)*4;this.data[n+0]=Math.round(255*r.r/r.a),this.data[n+1]=Math.round(255*r.g/r.a),this.data[n+2]=Math.round(255*r.b/r.a),this.data[n+3]=Math.round(255*r.a)}};function ll(e){let t=new Uint8Array(e.length);for(let r=0;r<e.length;r+=4){let n=e[r+3];t[r+0]=Math.round(e[r+0]*n/255),t[r+1]=Math.round(e[r+1]*n/255),t[r+2]=Math.round(e[r+2]*n/255),t[r+3]=n}return t}function lu(e){let t={},r=e.resolution||256,n=e.clips?e.clips.length:1,i=e.image||new lo({width:r,height:n});if(Math.log(r)/Math.LN2%1!=0)throw Error(`width is not a power of 2 - ${r}`);let a=(n,a,s)=>{t[e.evaluationKey]=s;let o=e.expression.evaluate(t);i.setPixel(n/4/r,a/4,o)};if(e.clips)for(let t=0,i=0;t<n;++t,i+=4*r)for(let n=0,s=0;n<r;n++,s+=4){let o=n/(r-1),{start:l,end:u}=e.clips[t];a(i,s,l*(1-o)+u*o)}else for(let e=0,t=0;e<r;e++,t+=4)a(0,t,e/(r-1));return i}aI("AlphaImage",ls),aI("RGBAImage",lo);let lh="big-fb",lc=e=>"heatmap"===e.type;var lp=class extends ss{createBucket(e){return new lt(e)}constructor(e,t){super(e,lr,t),this.heatmapFbos=new Map,this._updateColorRamp()}_handleSpecialPaintPropertyUpdate(e){"heatmap-color"===e&&this._updateColorRamp()}_updateColorRamp(){let e=this._transitionablePaint._values["heatmap-color"].value.expression;this.colorRamp=lu({expression:e,evaluationKey:"heatmapDensity",image:this.colorRamp}),this.colorRampTexture=null}resize(){this.heatmapFbos.has("big-fb")&&this.heatmapFbos.delete(lh)}queryRadius(e){return oQ("heatmap-radius",this,e)}queryIntersectsFeature({queryGeometry:e,feature:t,featureState:r,geometry:n,transform:i,pixelsToTileUnits:a,unwrappedTileID:s,getElevation:o}){return o4({queryGeometry:e,size:this.paint.get("heatmap-radius").evaluate(t,r)*a,transform:i,unwrappedTileID:s,getElevation:o},n)}hasOffscreenPass(){return 0!==this.paint.get("heatmap-opacity")&&!this.isHidden()}},lf={get paint(){return u||=new sn({"hillshade-illumination-direction":new a7(t2.paint_hillshade["hillshade-illumination-direction"],"hillshade-illumination-direction"),"hillshade-illumination-altitude":new a7(t2.paint_hillshade["hillshade-illumination-altitude"],"hillshade-illumination-altitude"),"hillshade-illumination-anchor":new a7(t2.paint_hillshade["hillshade-illumination-anchor"],"hillshade-illumination-anchor"),"hillshade-exaggeration":new a7(t2.paint_hillshade["hillshade-exaggeration"],"hillshade-exaggeration"),"hillshade-shadow-color":new a7(t2.paint_hillshade["hillshade-shadow-color"],"hillshade-shadow-color"),"hillshade-highlight-color":new a7(t2.paint_hillshade["hillshade-highlight-color"],"hillshade-highlight-color"),"hillshade-accent-color":new a7(t2.paint_hillshade["hillshade-accent-color"],"hillshade-accent-color"),"hillshade-method":new a7(t2.paint_hillshade["hillshade-method"],"hillshade-method"),resampling:new a7(t2.paint_hillshade.resampling,"resampling")})}};let ld=e=>"hillshade"===e.type;var ly=class extends ss{constructor(e,t){super(e,lf,t),this.recalculate({zoom:0,zoomHistory:{}},void 0)}getIlluminationProperties(){let e=this.paint.get("hillshade-illumination-direction").values,t=this.paint.get("hillshade-illumination-altitude").values,r=this.paint.get("hillshade-highlight-color").values,n=this.paint.get("hillshade-shadow-color").values,i=Math.max(e.length,t.length,r.length,n.length);e=e.concat(Array(i-e.length).fill(e.at(-1))),t=t.concat(Array(i-t.length).fill(t.at(-1))),r=r.concat(Array(i-r.length).fill(r.at(-1))),n=n.concat(Array(i-n.length).fill(n.at(-1)));let a=t.map(tA);return{directionRadians:e.map(tA),altitudeRadians:a,shadowColor:n,highlightColor:r}}hasOffscreenPass(){return 0!==this.paint.get("hillshade-exaggeration")&&!this.isHidden()}},lm={get paint(){return h||=new sn({"color-relief-opacity":new a7(t2["paint_color-relief"]["color-relief-opacity"],"color-relief-opacity"),"color-relief-color":new sr(t2["paint_color-relief"]["color-relief-color"],"color-relief-color"),resampling:new a7(t2["paint_color-relief"].resampling,"resampling")})}};function lg(e){return"data"in e}var lx=class{constructor(e,t,r,n){this.context=e,this.format=r,this.texture=e.gl.createTexture(),this._ownedHandle=this.texture,this.update(t,n)}update(e,t,r){let{width:n,height:i}=e,a=(this.size?.[0]!==n||this.size[1]!==i)&&!r,{context:s}=this,{gl:o}=s;this.useMipmap=!!t?.useMipmap,a&&this.size&&this.format===o.RGBA&&(o.deleteTexture(this.texture),this.texture=o.createTexture(),this._ownedHandle=this.texture,this.magFilter=void 0,this.minFilter=void 0,this.wrap=void 0),o.bindTexture(o.TEXTURE_2D,this.texture),s.pixelStoreUnpackFlipY.set(!1),s.pixelStoreUnpack.set(1);let l=this.format===o.RGBA&&t?.premultiply!==!1;if(a)if(this.size=[n,i],this.format===o.RGBA&&n>0&&i>0){let t=this.useMipmap?Math.floor(Math.log2(Math.max(n,i)))+1:1;if(o.texStorage2D(o.TEXTURE_2D,t,o.RGBA8,n,i),lg(e)){s.pixelStoreUnpackPremultiplyAlpha.set(!1);let{data:t}=e;l&&t&&(t=ll(t)),t&&o.texSubImage2D(o.TEXTURE_2D,0,0,0,n,i,o.RGBA,o.UNSIGNED_BYTE,t)}else s.pixelStoreUnpackPremultiplyAlpha.set(l),o.texSubImage2D(o.TEXTURE_2D,0,0,0,o.RGBA,o.UNSIGNED_BYTE,e)}else lg(e)?(s.pixelStoreUnpackPremultiplyAlpha.set(!1),this._uploadRawData(e,l,n,i,o)):(s.pixelStoreUnpackPremultiplyAlpha.set(l),this._uploadDomImage(e,o));else{let{x:t,y:a}=r||{x:0,y:0};lg(e)?(s.pixelStoreUnpackPremultiplyAlpha.set(!1),this._updateRawData(e,l,t,a,n,i,o)):(s.pixelStoreUnpackPremultiplyAlpha.set(l),this._updateDomImage(e,t,a,o))}this.useMipmap&&!(lg(e)&&null===e.data)&&o.generateMipmap(o.TEXTURE_2D),s.pixelStoreUnpackFlipY.setDefault(),s.pixelStoreUnpack.setDefault(),s.pixelStoreUnpackPremultiplyAlpha.setDefault()}_uploadDomImage(e,t){t.texImage2D(t.TEXTURE_2D,0,this.format,this.format,t.UNSIGNED_BYTE,e)}_uploadRawData(e,t,r,n,i){let{data:a}=e;t&&a&&(a=ll(a)),i.texImage2D(i.TEXTURE_2D,0,this.format,r,n,0,this.format,i.UNSIGNED_BYTE,a)}_updateDomImage(e,t,r,n){n.texSubImage2D(n.TEXTURE_2D,0,t,r,n.RGBA,n.UNSIGNED_BYTE,e)}_updateRawData(e,t,r,n,i,a,s){let{data:o}=e;t&&o&&(o=ll(o)),s.texSubImage2D(s.TEXTURE_2D,0,r,n,i,a,s.RGBA,s.UNSIGNED_BYTE,o)}
vendor: 4,798 bytes, line 2
2bind(e,t,r){let{context:n}=this,{gl:i}=n;this.texture!==this._ownedHandle&&(this.texture=this._ownedHandle),i.bindTexture(i.TEXTURE_2D,this.texture),r!==i.LINEAR_MIPMAP_NEAREST&&r!==i.LINEAR_MIPMAP_LINEAR||this.useMipmap||(r=i.LINEAR);let a=r||e;e!==this.magFilter&&(i.texParameteri(i.TEXTURE_2D,i.TEXTURE_MAG_FILTER,e),this.magFilter=e),a!==this.minFilter&&(i.texParameteri(i.TEXTURE_2D,i.TEXTURE_MIN_FILTER,a),this.minFilter=a),t!==this.wrap&&(i.texParameteri(i.TEXTURE_2D,i.TEXTURE_WRAP_S,t),i.texParameteri(i.TEXTURE_2D,i.TEXTURE_WRAP_T,t),this.wrap=t)}generateMipmap(){if(!this.useMipmap)return;let{gl:e}=this.context;e.bindTexture(e.TEXTURE_2D,this.texture),e.generateMipmap(e.TEXTURE_2D)}destroy(){let{gl:e}=this.context;e.deleteTexture(this.texture),this.texture=null,this._ownedHandle=null}};function lv(e,t){let r=t[0],n=t[1],i=t[2],a=t[3],s=Math.min(r,n,i),o=Math.round((e+a)/s);return{r:Math.floor(o*s/r)%256,g:Math.floor(o*s/n)%256,b:Math.floor(o*s/i)%256}}aI("DEMData",class e{static{this.byteViewCache=new WeakMap}constructor(t,r,n,i=1,a=1,s=1,o=0){if(this.uid=t,r.height!==r.width)throw RangeError("DEM tiles must be square");if(n&&!["mapbox","terrarium","custom"].includes(n))return void th(`"${n}" is not a valid encoding type. Valid types include "mapbox", "terrarium" and "custom".`);this.stride=r.height;let l=this.dim=r.height-4;switch(this.data=new Uint32Array(r.data.buffer),e.byteViewCache.set(this,new Uint8Array(this.data.buffer)),n){case"terrarium":this.redFactor=256,this.greenFactor=1,this.blueFactor=1/256,this.baseShift=32768;break;case"custom":this.redFactor=i,this.greenFactor=a,this.blueFactor=s,this.baseShift=o;break;default:this.redFactor=6553.6,this.greenFactor=25.6,this.blueFactor=.1,this.baseShift=1e4}for(let e=-2;e<l+2;e++){let t=this._idx(0,Math.max(0,Math.min(l-1,e)));(e<0||e>=l)&&this.data.copyWithin(this._idx(0,e),t,t+l),this.data.fill(this.data[t],this._idx(-2,e),this._idx(0,e)),this.data.fill(this.data[t+l-1],this._idx(l,e),this._idx(l+1,e)+1)}let u=this._getByteView();this.min=0x20000000000000-1,this.max=-(0x20000000000000-1);for(let e=0;e<l;e++)for(let t=0;t<l;t++){let r=4*this._idx(e,t),n=this._unpackAtIndex(u,r);n>this.max&&(this.max=n),n<this.min&&(this.min=n)}}get(e,t){let r=this._getByteView(),n=4*this._idx(e,t);return this._unpackAtIndex(r,n)}sampleBilinear(e,t){let r=Math.floor(e),n=Math.floor(t);if(r<-1||r>=this.dim||n<-1||n>=this.dim)throw RangeError(`Out of range source coordinates for DEM data. x: ${e}, y: ${t}, dim: ${this.dim}`);let i=this._getByteView(),a=((n+2)*this.stride+r+2)*4,s=4*this.stride,o=e-r,l=t-n;return this._unpackAtIndex(i,a)*(1-o)*(1-l)+this._unpackAtIndex(i,a+4)*o*(1-l)+this._unpackAtIndex(i,a+s)*(1-o)*l+this._unpackAtIndex(i,a+s+4)*o*l}getUnpackVector(){return[this.redFactor,this.greenFactor,this.blueFactor,this.baseShift]}_idx(e,t){if(e<-2||e>=this.dim+2||t<-2||t>=this.dim+2)throw RangeError(`Out of range source coordinates for DEM data. x: ${e}, y: ${t}, dim: ${this.dim}`);return(t+2)*this.stride+(e+2)}unpack(e,t,r){return e*this.redFactor+t*this.greenFactor+r*this.blueFactor-this.baseShift}pack(e){return lv(e,this.getUnpackVector())}getPixels(){return new lo({width:this.stride,height:this.stride},this._getByteView())}backfillBorder(e,t,r){if(this.dim!==e.dim)throw Error("dem dimension mismatch");let n=t*this.dim,i=t*this.dim+this.dim,a=r*this.dim,s=r*this.dim+this.dim;switch(t){case -1:n=i-2;break;case 1:i=n+2}switch(r){case -1:a=s-2;break;case 1:s=a+2}let o=-t*this.dim,l=-r*this.dim;for(let t=a;t<s;t++)for(let r=n;r<i;r++)this.data[this._idx(r,t)]=e.data[this._idx(r+o,t+l)]}_getByteView(){let t=e.byteViewCache.get(this);return t?.buffer!==this.data.buffer&&(t=new Uint8Array(this.data.buffer),e.byteViewCache.set(this,t)),t}_unpackAtIndex(e,t){return this.unpack(e[t],e[t+1],e[t+2])}});let lb=e=>"color-relief"===e.type;var lw=class extends ss{constructor(e,t){super(e,lm,t)}_createColorRamp(e){let t={elevationStops:[],colorStops:[]},r=this._transitionablePaint._values["color-relief-color"].value.expression;if(r instanceof iB&&r._styleExpression.expression instanceof r6){this.colorRampExpression=r;let e=r._styleExpression.expression;for(let r of(t.elevationStops=e.labels,t.colorStops=[],t.elevationStops))t.colorStops.push(e.evaluate({globals:{elevation:r}}))}if(t.elevationStops.length<1&&(t.elevationStops=[0],t.colorStops=[rL.transparent]),t.elevationStops.length<2&&(t.elevationStops.push(t.elevationStops[0]+1),t.colorStops.push(t.colorStops[0])),t.elevationStops.length<=e)return t;let n={elevationStops:[],colorStops:[]},i=(t.elevationStops.length-1)/(e-1);for(let e=0;e<t.elevationStops.length-.5;e+=i)n.elevationStops.push(t.elevationStops[Math.round(e)]),n.colorStops.push(t.colorStops[Math.round(e)]);return th(`Too many colors in specification of ${this.id}
2 color-relief layer, may not render properly. Max possible colors: ${e}, provided: ${t.elevationStops.length}`),n}_colorRampChanged(){return this.colorRampExpression!=this._transitionablePaint._values["color-relief-color"].value.expression}getColorRampTextures(e,t,r){if(this.colorRampTextures&&!this._colorRampChanged())return this.colorRampTextures;let n=this._createColorRamp(t),i=new lo({width:n.colorStops.length,height:1}),a=new lo({width:n.colorStops.length,height:1});for(let e=0;e<n.elevationStops.length;e++){let t=lv(n.elevationStops[e],r);a.setPixel(0,e,new rL(t.r/255,t.g/255,t.b/255,1)),i.setPixel(0,e,n.colorStops[e])}return this.colorRampTextures={elevationTexture:new lx(e,a,e.gl.RGBA),colorTexture:new lx(e,i,e.gl.RGBA)},this.colorRampTextures}hasOffscreenPass(){return!this.isHidden()&&!!this.colorRampTextures}};let l_=sf([{name:"a_pos",components:2,type:"Int16"}],4),lA=l_.members;function lD(e,t,r){let n=r.patternDependencies,i=!1;for(let r of t){let t=r.paint.get(`${e}-pattern`);t.isConstant()||(i=!0);let a=t.constantOr(null);a&&(i=!0,n[a.to]=!0,n[a.from]=!0)}return i}function lS(e,t,r,n,i){let{zoom:a}=n,s=i.patternDependencies;for(let n of t){let t=n.paint.get(`${e}-pattern`).value;if("constant"!==t.kind){let e=t.evaluate({zoom:a-1},r,{},i.availableImages),o=t.evaluate({zoom:a},r,{},i.availableImages),l=t.evaluate({zoom:a+1},r,{},i.availableImages);e=e?.name?e.name:e,o=o?.name?o.name:o,l=l?.name?l.name:l,s[e]=!0,s[o]=!0,s[l]=!0,r.patterns[n.id]={min:e,mid:o,max:l}}}return r}l_.size,l_.alignment;let lE=new Set,lF=!1;function lk(e,t,r,n,i){let a=null;if(i===function(e,t,r,n){let i=0;for(let a=t,s=r-n;a<r;a+=n)i+=(e[s]-e[a])*(e[a+1]+e[s+1]),s=a;return i}(e,t,r,n)>0)for(let i=t;i<r;i+=n)a=lQ(i/n|0,e[i],e[i+1],a);else for(let i=r-n;i>=t;i-=n)a=lQ(i/n|0,e[i],e[i+1],a);return a&&lZ(a,a.next)&&(l0(a),a=a.next),a}function lT(e,t=e){let r=t===e,n=e,i;do i=!1,n!==n.next&&(0===lE.size||!lE.has(n))&&(lZ(n,n.next)||0===lY(n.prev,n,n.next))?((r||n===t)&&(t=n.prev),lF=!0,l0(n),n=n.prev,i=!0):(r||n!==t)&&(n=n.next,i=!r);while(i||n!==t);return t}let lI=!1;function lC(e,t){return e.x-t.x||e.y-t.y||(e.next.y-e.y)/(e.next.x-e.x)-(t.next.y-t.y)/(t.next.x-t.x)}let lM=new Float64Array,lB=0,lP=[],lz=[];function lV(e,t){let r=e;do{let e=lB++;lP[e]=r;let n=1/0,i=1/0,a=-1/0,s=-1/0,o=0;do{let t=r.next;r.z=e,r.x<n&&(n=r.x),r.x>a&&(a=r.x),r.y<i&&(i=r.y),r.y>s&&(s=r.y),t.x<n&&(n=t.x),t.x>a&&(a=t.x),t.y<i&&(i=t.y),t.y>s&&(s=t.y),r=t}while(++o<16&&r!==t);lz[e]=r;let l=4*e;lM[l]=n,lM[l+1]=i,lM[l+2]=a,lM[l+3]=s}while(r!==t)}function lL(e){let t=lz[e];for(;t.prev.next!==t;)t=t.next;return lz[e]=t,t}function l$(e){let t=lP[e];for(;t.prev.next!==t;)t=t.next;return lP[e]=t,t}let lO=[],lR=[],lN=new Uint32Array,lU=new Uint32Array,lq=new Uint32Array(256);function lj(e,t,r,n,i,a){lq.fill(0);for(let t=0;t<e;t++)lq[r[t]>>>a&255]++;let s=0;for(let e=0;e<256;e++){let t=lq[e];lq[e]=s,s+=t}for(let s=0;s<e;s++){let e=r[s],o=lq[e>>>a&255]++;n[o]=t[s],i[o]=e}}function lG(e,t,r,n,i){return(e=((e=((e=((e=((e=(e-r)*i|0)|e<<8)&0xff00ff)|e<<4)&0xf0f0f0f)|e<<2)&0x33333333)|e<<1)&0x55555555)|(t=((t=((t=((t=((t=(t-n)*i|0)|t<<8)&0xff00ff)|t<<4)&0xf0f0f0f)|t<<2)&0x33333333)|t<<1)&0x55555555)<<1}function lX(e,t,r,n,i,a,s,o){return(i-s)*(t-o)>=(e-s)*(a-o)&&(e-s)*(n-o)>=(r-s)*(t-o)&&(r-s)*(a-o)>=(i-s)*(n-o)}function lY(e,t,r){return(t.y-e.y)*(r.x-t.x)-(t.x-e.x)*(r.y-t.y)}function lZ(e,t){return e.x===t.x&&e.y===t.y}function lW(e,t,r,n,i=!0){let a=lY(e,t,r),s=lY(e,t,n),o=lY(r,n,e),l=lY(r,n,t);return(a>0&&s<0||a<0&&s>0)&&(o>0&&l<0||o<0&&l>0)||!!i&&!!(0===a&&lH(e,r,t)||0===s&&lH(e,n,t)||0===o&&lH(r,e,n)||0===l&&lH(r,t,n))}function lH(e,t,r){return t.x<=Math.max(e.x,r.x)&&t.x>=Math.min(e.x,r.x)&&t.y<=Math.max(e.y,r.y)&&t.y>=Math.min(e.y,r.y)}function lK(e,t){return 0>lY(e.prev,e,e.next)?lY(e,t,e.next)>=0&&lY(e,e.prev,t)>=0:0>lY(e,t,e.prev)||0>lY(e,e.next,t)}function lJ(e,t){let r=l1(e.i,e.x,e.y),n=l1(t.i,t.x,t.y),i=e.next,a=t.prev;return e.next=t,t.prev=e,r.next=i,i.prev=r,n.next=r,r.prev=n,a.next=n,n.prev=a,n}function lQ(e,t,r,n){let i=l1(e,t,r);return n?(i.next=n.next,i.prev=n,n.next.prev=i,n.next=i):(i.prev=i,i.next=i),i}function l0(e){var t,r;let n;e.next.prev=e.prev,e.prev.next=e.next,e.prevZ&&(e.prevZ.nextZ=e.nextZ),e.nextZ&&(e.nextZ.prevZ=e.prevZ),lI&&(t=e.prev,r=e.next,n=4*t.z,r.x<lM[n]&&(lM[n]=r.x),r.y<lM[n+1]&&(lM[n+1]=r.y),r.x>lM[n+2]&&(lM[n+2]=r.x),r.y>lM[n+3]&&(lM[n+3]=r.y))}function l1(e,t,r){return{i:e,x:t,y:r,prev:null,next:null,z:0,prevZ:null,nextZ:null}}var l2=class{constructor(e,t){if(t>e)throw Error("Min granularity must not be greater than base granularity.");this._baseZoomGranularity=e,this._minGranularity=t}getGranularityForZoomLevel(e){return Math.max(Math.floor(this._baseZoomGranularity/(1<<e)),this._minGranularity,1)}},l3=class e{constructor(e){this.fill=e.fill,this.line=e.line,this.tile=e.tile,this.stencil=e.stencil,this.circle=e.circle}static{this.noSubdivision=new e({fill:new l2(0,0),line:new l2(0,0),tile:new l2(0,0),stencil:new l2(0,0),circle:1})}};aI("SubdivisionGranularityExpression",l2),aI("SubdivisionGranularitySetting",l3);let l5=-32768,l6=32767;var l4=class{constructor(e,t){this._vertexBuffer=[],this._vertexDictionary=new Map,this._used=!1,this._granularity=e,this._granularityCellSize=e$/e,this._canonical=t}_getKey(e,t){return e+=32768,(t+=32768)|e<<16}_vertexToIndex(e,t){if(e<-32768||t<-32768||e>32767||t>32767)throw Error("Vertex coordinates are out of signed 16 bit integer range.");let r=0|Math.round(e),n=0|Math.round(t),i=this._getKey(r,n);if(this._vertexDictionary.has(i))return this._vertexDictionary.get(i);let a=this._vertexBuffer.length/2;return this._vertexDictionary.set(i,a),this._vertexBuffer.push(r,n),a}_subdivideTrianglesScanline(e){if(this._granularity<2)return function(e,t){let r=[];for(let n=0;n<t.length;n+=3){let i=t[n],a=t[n+1],s=t[n+2],o=e[2*i],l=e[2*i+1],u=e[2*a],h=e[2*a+1],c=e[2*s],p=e[2*s+1],f=h-l;(u-o)*(p-l)-f*(c-o)>0?(r.push(i),r.push(s),r.push(a)):(r.push(i),r.push(a),r.push(s))}return r}(this._vertexBuffer,e);let t=[],r=e.length;for(let n=0;n<r;n+=3){let r=[e[n+0],e[n+1],e[n+2]],i=[this._vertexBuffer[2*e[n+0]+0],this._vertexBuffer[2*e[n+0]+1],this._vertexBuffer[2*e[n+1]+0],this._vertexBuffer[2*e[n+1]+1],this._vertexBuffer[2*e[n+2]+0],this._vertexBuffer[2*e[n+2]+1]],a=1/0,s=1/0,o=-1/0,l=-1/0;for(let e=0;e<3;e++){let t=i[2*e],r=i[2*e+1];a=Math.min(a,t),o=Math.max(o,t),s=Math.min(s,r),l=Math.max(l,r)}if(a===o||s===l)continue;let u=Math.floor(a/this._granularityCellSize),h=Math.ceil(o/this._granularityCellSize),c=Math.floor(s/this._granularityCellSize),p=Math.ceil(l/this._granularityCellSize);if(u===h&&c===p){t.push(...r);continue}for(let e=c;e<p;e++){let n=this._scanlineGenerateVertexRingForCellRow(e,i,r);!function(e,t,r){if(0===t.length)throw Error("Subdivision vertex ring is empty.");let n=0,i=e[2*t[0]];for(let r=1;r<t.length;r++){let a=e[2*t[r]];a<i&&(i=a,n=r)}let a=t.length,s=n,o=(s+1)%a;for(;;){let n=s-1>=0?s-1:a-1,i=(o+1)%a,l=e[2*t[n]],u=e[2*t[n]+1],h=e[2*t[i]],c=e[2*t[i]+1],p=e[2*t[s]],f=e[2*t[s]+1],d=e[2*t[o]],y=e[2*t[o]+1],m=!1;if(l<h)m=!0;else if(l>h)m=!1;else{let e=y-f,t=-(d-p),r=f<y?1:-1;((l-p)*e+(u-f)*t)*r>((h-p)*e+(c-f)*t)*r&&(m=!0)}if(m){let e=t[n],i=t[s],l=t[o];e!==i&&e!==l&&i!==l&&r.push(l,i,e),--s<0&&(s=a-1)}else{let e=t[i],n=t[s],l=t[o];e!==n&&e!==l&&n!==l&&r.push(l,n,e),++o>=a&&(o=0)}if(n===i)break}}(this._vertexBuffer,n,t)}}return t}_scanlineGenerateVertexRingForCellRow(e,t,r){let n=e*this._granularityCellSize,i=n+this._granularityCellSize,a=[];for(let e=0;e<3;e++){let s=t[2*e],o=t[2*e+1],l=t[(e+1)*2%6],u=t[((e+1)*2+1)%6],h=t[(e+2)*2%6],c=t[((e+2)*2+1)%6],p=l-s,f=u-o,d=0===p,y=0===f,m=(n-o)/f,g=(i-o)/f,x=Math.min(m,g),v=Math.max(m,g);if(!y&&(x>=1||v<=0)||y&&(o<n||o>i)){u>=n&&u<=i&&a.push(r[(e+1)%3]);continue}if(!y&&x>0){let e=s+p*x,t=o+f*x;a.push(this._vertexToIndex(e,t))}let b=s+p*Math.max(x,0),w=s+p*Math.min(v,1);if(d||this._generateIntraEdgeVertices(a,s,o,l,u,b,w),!y&&v<1){let e=s+p*v,t=o+f*v;a.push(this._vertexToIndex(e,t))}(y||u>=n&&u<=i)&&a.push(r[(e+1)%3]),!y&&(u<=n||u>=i)&&this._generateInterEdgeVertices(a,s,o,l,u,h,c,w,n,i)}return a}_generateIntraEdgeVertices(e,t,r,n,i,a,s){let o=n-t,l=i-r,u=0===l,h=u?Math.min(t,n):Math.min(a,s),c=u?Math.max(t,n):Math.max(a,s),p=Math.floor(h/this._granularityCellSize)+1,f=Math.ceil(c/this._granularityCellSize)-1;
2if(u?t<n:a<s)for(let n=p;n<=f;n++){let i=n*this._granularityCellSize,a=r+l*(i-t)/o;e.push(this._vertexToIndex(i,a))}else for(let n=f;n>=p;n--){let i=n*this._granularityCellSize,a=r+l*(i-t)/o;e.push(this._vertexToIndex(i,a))}}_generateInterEdgeVertices(e,t,r,n,i,a,s,o,l,u){let h=s-i,c=(l-i)/h,p=(u-i)/h,f=Math.min(c,p),d=Math.max(c,p),y=n+(a-n)*f,m=Math.floor(Math.min(y,o)/this._granularityCellSize)+1,g=Math.ceil(Math.max(y,o)/this._granularityCellSize)-1,x=o<y,v=0===h;if(v&&(s===l||s===u))return;if(v||f>=1||d<=0){let e=r-s,n=a+(t-a)*Math.min((l-s)/e,(u-s)/e);m=Math.floor(Math.min(n,o)/this._granularityCellSize)+1,g=Math.ceil(Math.max(n,o)/this._granularityCellSize)-1,x=o<n}let b=i-r>0?u:l;if(x)for(let t=m;t<=g;t++){let r=t*this._granularityCellSize;e.push(this._vertexToIndex(r,b))}else for(let t=g;t>=m;t--){let r=t*this._granularityCellSize;e.push(this._vertexToIndex(r,b))}}_generateOutline(e){let t=[];for(let r of e){let e=l7(r,this._granularity,!0),n=this._pointArrayToIndices(e),i=[];for(let e=1;e<n.length;e++)i.push(n[e-1]),i.push(n[e]);t.push(i)}return t}_handlePoles(e){let t=!1,r=!1;this._canonical&&(0===this._canonical.y&&(t=!0),this._canonical.y===(1<<this._canonical.z)-1&&(r=!0)),(t||r)&&this._fillPoles(e,t,r)}_ensureNoPoleVertices(){let e=this._vertexBuffer;for(let t=0;t<e.length;t+=2){let r=e[t+1];-32768===r&&(e[t+1]=-32767),32767===r&&(e[t+1]=32766)}}_generatePoleQuad(e,t,r,n,i,a){n>i==(-32768===a)?(e.push(r),e.push(t),e.push(this._vertexToIndex(n,a)),e.push(this._vertexToIndex(i,a)),e.push(r)):(e.push(t),e.push(r),e.push(this._vertexToIndex(n,a)),e.push(r),e.push(this._vertexToIndex(i,a))),e.push(this._vertexToIndex(n,a))}_fillPoles(e,t,r){let n=this._vertexBuffer,i=e.length;for(let a=2;a<i;a+=3){let i=e[a-2],s=e[a-1],o=e[a],l=n[2*i],u=n[2*i+1],h=n[2*s],c=n[2*s+1],p=n[2*o],f=n[2*o+1];t&&(0===u&&0===c&&this._generatePoleQuad(e,i,s,l,h,l5),0===c&&0===f&&this._generatePoleQuad(e,s,o,h,p,l5),0===f&&0===u&&this._generatePoleQuad(e,o,i,p,l,l5)),r&&(u===e$&&c===e$&&this._generatePoleQuad(e,i,s,l,h,l6),c===e$&&f===e$&&this._generatePoleQuad(e,s,o,h,p,l6),f===e$&&u===e$&&this._generatePoleQuad(e,o,i,p,l,l6))}}_initializeVertices(e){for(let t=0;t<e.length;t+=2)this._vertexToIndex(e[t],e[t+1])}subdividePolygonInternal(e,t){let r;if(this._used)throw Error("Subdivision: multiple use not allowed.");this._used=!0;let{flattened:n,holeIndices:i}=function(e){let t=[],r=[];for(let n of e)if(0!==n.length)for(let i of(n!==e[0]&&t.push(r.length/2),n))r.push(i.x),r.push(i.y);return{flattened:r,holeIndices:t}}(e);this._initializeVertices(n);try{let e=function(e,t,r=2){let n=t&&t.length,i=n?t[0]*r:e.length;lE.size&&lE.clear();let a=lk(e,0,i,r,!0),s=[];if(!a||a.next===a.prev)return s;let o=0,l=0,u=0;if(n&&(a=function(e,t,r,n){var i,a;let s,o=[];for(let r=0,i=t.length;r<i;r++){let a=lk(e,t[r]*n,r<i-1?t[r+1]*n:e.length,n,!1);a===a.next&&lE.add(a),o.push(function(e){let t=e,r=e;do(t.x<r.x||t.x===r.x&&t.y<r.y)&&(r=t),t=t.next;while(t!==e);return r}(a))}o.sort(lC),i=e.length/n,a=t.length,s=Math.ceil((i+2*a)/16)+a+2,lM.length<4*s&&(lM=new Float64Array(4*s)),lB=0,lV(r,r),lI=!0;for(let e=0;e<o.length;e++)r=function(e,t){let r=function(e,t){let r=t,n=e.x,i=e.y,a=-1/0,s;if(lZ(e,r))return r;for(let t=0,o=0;t<lB;t++,o+=4){if(i<lM[o+1]||i>lM[o+3]||lM[o]>n||lM[o+2]<=a)continue;let l=lL(t);r=l$(t);do{if(r.prev.next===r){if(lZ(e,r.next))return r.next;if(i<=r.y&&i>=r.next.y&&r.next.y!==r.y){let e=r.x+(i-r.y)*(r.next.x-r.x)/(r.next.y-r.y
2);if(e<=n&&e>a&&(a=e,s=r.x<r.next.x?r:r.next,e===n))return s}}r=r.next}while(r!==l)}if(!s)return null;let o=s.x,l=s.y,u=Math.min(i,l),h=Math.max(i,l),c=1/0;for(let t=0,d=0;t<lB;t++,d+=4){if(lM[d+2]<o||lM[d]>n||lM[d+3]<u||lM[d+1]>h)continue;let y=lL(t);r=l$(t);do{if(r.prev.next===r&&n>=r.x&&r.x>=o&&n!==r.x&&lX(i<l?n:a,i,o,l,i<l?a:n,i,r.x,r.y)){var p,f;let t=Math.abs(i-r.y)/(n-r.x);(lK(r,e)||r.y===i&&r.next.y===i&&r.next.x>n)&&(t<c||t===c&&(r.x>s.x||r.x===s.x&&(p=s,f=r,0>lY(p.prev,p,f.prev)&&0>lY(f.next,p,p.next))))&&(s=r,c=t)}r=r.next}while(r!==y)}return s}(e,t);if(!r)return t;let n=lJ(r,e);return lV(r,n.next.next),lT(n,n.next),lT(r,r.next)}(o[e],r);return lI=!1,lT(r)}(e,t,a,r)),e.length>80*r){o=e[0],l=e[1];let t=o,n=l;for(let a=r;a<i;a+=r){let r=e[a],i=e[a+1];r<o&&(o=r),i<l&&(l=i),r>t&&(t=r),i>n&&(n=i)}u=0===(u=Math.max(t-o,n-l))?0:32767/u}return function e(t,r,n,i,a){a&&function(e,t,r,n){let i=e,a=0;do i.z=lG(i.x,i.y,t,r,n),lO[a++]=i,i=i.next;while(i!==e);!function(e){if(e<=32){for(let t=1;t<e;t++){let e=lO[t],r=e.z,n=t-1;for(;n>=0&&lO[n].z>r;)lO[n+1]=lO[n],n--;lO[n+1]=e}return}lN.length<e&&(lN=new Uint32Array(e),lU=new Uint32Array(e),lR=Array(e));for(let t=0;t<e;t++)lN[t]=lO[t].z;lj(e,lO,lN,lR,lU,0),lj(e,lR,lU,lO,lN,8),lj(e,lO,lN,lR,lU,16),lj(e,lR,lU,lO,lN,24)}(a);let s=null;for(let e=0;e<a;e++){let t=lO[e];t.prevZ=s,s&&(s.nextZ=t),s=t}s.nextZ=null}(t,n,i,a);let s=t,o=!1;for(;t.prev!==t.next;){let l=t.prev,u=t.next;if(0>lY(l,t,u)&&(a?function(e,t,r,n){let i=e.prev,a=e.next,s=i.x,o=e.x,l=a.x,u=i.y,h=e.y,c=a.y,p=Math.min(s,o,l),f=Math.min(u,h,c),d=Math.max(s,o,l),y=Math.max(u,h,c),m=lG(p,f,t,r,n),g=lG(d,y,t,r,n),x=e.prevZ;for(;x&&x.z>=m;){if(x.x>=p&&x.x<=d&&x.y>=f&&x.y<=y&&x!==a&&(s!==x.x||u!==x.y)&&lX(s,u,o,h,l,c,x.x,x.y)&&lY(x.prev,x,x.next)>=0)return!1;x=x.prevZ}let v=e.nextZ;for(;v&&v.z<=g;){if(v.x>=p&&v.x<=d&&v.y>=f&&v.y<=y&&v!==a&&(s!==v.x||u!==v.y)&&lX(s,u,o,h,l,c,v.x,v.y)&&lY(v.prev,v,v.next)>=0)return!1;v=v.nextZ}return!0}(t,n,i,a):function(e){let t=e.prev,r=e.next,n=t.x,i=e.x,a=r.x,s=t.y,o=e.y,l=r.y,u=Math.min(n,i,a),h=Math.min(s,o,l),c=Math.max(n,i,a),p=Math.max(s,o,l),f=r.next;for(;f!==t;){if(f.x>=u&&f.x<=c&&f.y>=h&&f.y<=p&&(n!==f.x||s!==f.y)&&lX(n,s,i,o,a,l,f.x,f.y)&&lY(f.prev,f,f.next)>=0)return!1;f=f.next}return!0}(t))){r.push(l.i,t.i,u.i),l0(t),t=u,s=u;continue}if((t=u)===s){if(lF=!1,t=lT(t),lF){s=t;continue}if(!o){s=t=function(e,t){let r=e,n=!1;do{let i=r.prev,a=r.next.next;lW(i,r,r.next,a,!1)&&lK(i,a)&&lK(a,i)&&(t.push(i.i,r.i,a.i),l0(r),l0(r.next),r=e=a,n=!0),r=r.next}while(r!==e);return n?lT(r):r}(t,r),o=!0;continue}!function(t,r,n,i,a){let s=t;do{let t=s.next.next;for(;t!==s.prev;){if(s.i!==t.i&&function(e,t){let r=lZ(e,t)&&lY(e.prev,e,e.next)>0&&lY(t.prev,t,t.next)>0;return e.next.i!==t.i&&(r||lK(e,t)&&lK(t,e)&&(0!==lY(e.prev,e,t.prev)||0!==lY(e,t.prev,t)))&&!function(e,t){let r=Math.min(e.x,t.x),n=Math.max(e.x,t.x),i=Math.min(e.y,t.y),a=Math.max(e.y,t.y),s=e;do{let o=s.next;if(s.x>n&&o.x>n||s.x<r&&o.x<r||s.y>a&&o.y>a||s.y<i&&o.y<i){s=o;continue}if(s.i!==e.i&&o.i!==e.i&&s.i!==t.i&&o.i!==t.i&&lW(s,o,e,t))return!0;s=o}while(s!==e);return!1}(e,t)&&(r||function(e,t){let r=e,n=!1,i=(e.x+t.x)/2,a=(e.y+t.y)/2;do{let e=r.next;r.y>a!=e.y>a&&i<(e.x-r.x)*(a-r.y)/(e.y-r.y)+r.x&&(n=!n),r=e}while(r!==e);return n}(e,t))}(s,t)){let o=lJ(s,t);s=lT(s,s.next),o=lT(o,o.next),e(s,r,n,i,a),e(o,r,n,i,a);return}t=t.next}s=s.next}while(s!==t)}(t,r,n,i,a);break}}}(a,s,o,l,u),s}(n,i),t=this._convertIndices(n,e);r=this._subdivideTrianglesScanline(t)}catch(e){console.error(e)}let a=[];return t&&(a=this._generateOutline(e)),this._ensureNoPoleVertices(),this._handlePoles(r),this._granularity>=2&&this._canonical?.z===0&&(r=this._removeTrianglesOutsideTileX(r),a=a.map(e=>this._removeLinesOutsideTileX(e))),{verticesFlattened:this._vertexBuffer,indicesTriangles:r,indicesLineList:a}}_vertexOutsideTileX(e){let t=this._vertexBuffer[2*e];return t<0||t>8192}_removeTrianglesOutsideTileX(e){let t=[];for(let r=0;r<e.length;r+=3)this._vertexOutsideTileX(e[r])||this._vertexOutsideTileX(e[r+1])||this._vertexOutsideTileX(e[r+2])||t.push(e[r],e[r+1],e[r+2]);return t}_removeLinesOutsideTileX(e){let t=[];for(let r=0;r<e.length;r+=2)this._vertexOutsideTileX(e[r])||this._vertexOutsideTileX(e[r+1])||t.pu
vendor: 3,841 bytes, line 2
2sh(e[r],e[r+1]);return t}_convertIndices(e,t){let r=[];for(let n of t){let t=e[2*n],i=e[2*n+1];r.push(this._vertexToIndex(t,i))}return r}_pointArrayToIndices(e){let t=[];for(let r of e)t.push(this._vertexToIndex(r.x,r.y));return t}};function l8(e,t,r,n=!0){return new l4(r,t).subdividePolygonInternal(e,n)}function l7(e,t,r=!1){if(!e||e.length<1||e.length<2)return[];let n=e[0],i=e[e.length-1],a=r&&(n.x!==i.x||n.y!==i.y);if(t<2)return a?[...e,e[0]]:[...e];let s=Math.floor(e$/t),o=[];o.push(new P(e[0].x,e[0].y));let l=e.length,u=a?l:l-1;for(let t=0;t<u;t++){let r=e[t],n=t<l-1?e[t+1]:e[0],i=r.x,a=r.y,u=n.x,h=n.y,c=i!==u,p=a!==h;if(!c&&!p)continue;let f=u-i,d=h-a,y=Math.abs(f),m=Math.abs(d),g=i,x=a;for(;;){let e=f>0?(Math.floor(g/s)+1)*s:(Math.ceil(g/s)-1)*s,t=d>0?(Math.floor(x/s)+1)*s:(Math.ceil(x/s)-1)*s,r=Math.abs(g-e),n=Math.abs(x-t),i=Math.abs(x-h),a=c?r/y:1/0,l=p?n/m:1/0;if((Math.abs(g-u)<=r||!c)&&(i<=n||!p))break;if(a<l&&c||!p){let t=new P(g=e,Math.round(x+=d*a));(o[o.length-1].x!==t.x||o[o.length-1].y!==t.y)&&o.push(t)}else{let e=new P(Math.round(g+=f*l),x=t);(o[o.length-1].x!==e.x||o[o.length-1].y!==e.y)&&o.push(e)}}let v=new P(u,h);(o[o.length-1].x!==v.x||o[o.length-1].y!==v.y)&&o.push(v)}return o}function l9(e,t,r,n,i,a,s,o,l){let u=i.length/2,h=s&&o&&l;if(u<ou.MAX_VERTEX_ARRAY_LENGTH){let c,p,f=t.prepareSegment(u,r,n),d=f.vertexLength;for(let e=0;e<a.length;e+=3)n.emplaceBack(d+a[e],d+a[e+1],d+a[e+2]);f.vertexLength+=u,f.primitiveLength+=a.length/3,h&&(c=(p=s.prepareSegment(u,r,o)).vertexLength,p.vertexLength+=u);for(let t=0;t<i.length;t+=2)e(i[t],i[t+1]);if(h)for(let e of l){for(let t=1;t<e.length;t+=2)o.emplaceBack(c+e[t-1],c+e[t]);p.primitiveLength+=e.length/2}}else(function(e,t,r,n,i,a){let s=[];for(let e=0;e<n.length/2;e++)s.push(-1);let o={count:0},l=0,u=e.getOrCreateLatestSegment(t,r),h=u.vertexLength;for(let c=2;c<i.length;c+=3){let p=i[c-2],f=i[c-1],d=i[c],y=s[p]<l,m=s[f]<l,g=s[d]<l,x=+!!y+ +!!m+ +!!g;u.vertexLength+x>ou.MAX_VERTEX_ARRAY_LENGTH&&(u=e.createNewSegment(t,r),l=o.count,y=!0,m=!0,g=!0,h=0);let v=ue(s,n,a,o,p,y,u),b=ue(s,n,a,o,f,m,u),w=ue(s,n,a,o,d,g,u);r.emplaceBack(h+v-l,h+b-l,h+w-l),u.primitiveLength++}})(t,r,n,i,a,e),h&&function(e,t,r,n,i,a){let s=[];for(let e=0;e<n.length/2;e++)s.push(-1);let o={count:0},l=0,u=e.getOrCreateLatestSegment(t,r),h=u.vertexLength;for(let c of i)for(let i=1;i<c.length;i+=2){let p=c[i-1],f=c[i],d=s[p]<l,y=s[f]<l,m=+!!d+ +!!y;u.vertexLength+m>ou.MAX_VERTEX_ARRAY_LENGTH&&(u=e.createNewSegment(t,r),l=o.count,d=!0,y=!0,h=0);let g=ue(s,n,a,o,p,d,u),x=ue(s,n,a,o,f,y,u);r.emplaceBack(h+g-l,h+x-l),u.primitiveLength++}}(s,r,o,i,l,e),t.forceNewSegmentOnNextPrepare(),s?.forceNewSegmentOnNextPrepare()}function ue(e,t,r,n,i,a,s){if(a){let a=n.count;return r(t[2*i],t[2*i+1]),e[i]=n.count,n.count++,s.vertexLength++,a}return e[i]}var ut=class{constructor(e){this.zoom=e.zoom,this.overscaling=e.overscaling,this.layers=e.layers,this.layerIds=this.layers.map(e=>e.id),this.index=e.index,this.hasDependencies=!1,this.sdfPatterns={},this.patternFeatures=[],this.layoutVertexArray=new s1,this.indexArray=new oi,this.indexArray2=new oa,this.programConfigurations=new oO(e.layers,e.zoom),this.segments=new ou,this.segments2=new ou,this.stateDependentLayerIds=this.layers.filter(e=>e.isStateDependent()).map(e=>e.id)}populate(e,t,r){this.hasDependencies=lD("fill",this.layers,t);let n=this.layers[0].layout.get("fill-sort-key"),i=!n.isConstant(),a=[],s=new aW(this.zoom),o=this.layers[0]._featureFilter.needGeometry;for(let{feature:l,id:u,index:h,sourceLayerIndex:c}of e){let e=oq(l,o);if(!this.layers[0]._featureFilter.filter(s,e,r))continue;let p=i?n.evaluate(e,{},r,t.availableImages):void 0,f={id:u,properties:l.properties,type:l.type,sourceLayerIndex:c,index:h,geometry:o?e.geometry:oU(l),patterns:{},sortKey:p};a.push(f)}for(let n of(i&&a.sort((e,t)=>
2e.sortKey-t.sortKey),a)){let{geometry:i,index:a,sourceLayerIndex:s}=n;if(this.hasDependencies){let e=lS("fill",this.layers,n,{zoom:this.zoom},t);this.patternFeatures.push(e)}else this.addFeature(n,i,a,r,{},t.subdivisionGranularity);let o=e[a].feature;t.featureIndex.insert(o,i,a,s,this.index)}}update(e,t,r){this.stateDependentLayers.length&&this.programConfigurations.updatePaintArrays(e,t,this.stateDependentLayers,{imagePositions:r})}addFeatures({options:e,canonical:t,patternPositions:r,patternMap:n}){for(let i of(this.detectSdfPatterns(n),this.patternFeatures))this.addFeature(i,i.geometry,i.index,t,r,e.subdivisionGranularity)}detectSdfPatterns(e){for(let t of this.patternFeatures)for(let r in t.patterns){let n=t.patterns[r];this.recordSdfPattern(r,e[n.min]),this.recordSdfPattern(r,e[n.mid]),this.recordSdfPattern(r,e[n.max])}for(let t of this.layers){let r=t.paint.get("fill-pattern").constantOr(null);r&&(this.recordSdfPattern(t.id,e[r.from.toString()]),this.recordSdfPattern(t.id,e[r.to.toString()]))}}recordSdfPattern(e,t){if(!t)return;let r=!0===t.sdf,n=this.sdfPatterns[e];void 0===n?this.sdfPatterns[e]=r:n!==r&&th(`Style sheet warning: Cannot mix SDF and non-SDF fill patterns in layer "${e}"`)}isEmpty(){return 0===this.layoutVertexArray.length}uploadPending(){return!this.uploaded||this.programConfigurations.needsUpload}upload(e){this.uploaded||(this.layoutVertexBuffer=e.createVertexBuffer(this.layoutVertexArray,lA),this.indexBuffer=e.createIndexBuffer(this.indexArray),this.indexBuffer2=e.createIndexBuffer(this.indexArray2)),this.programConfigurations.upload(e),this.uploaded=!0}destroy(){this.layoutVertexBuffer&&(this.layoutVertexBuffer.destroy(),this.indexBuffer.destroy(),this.indexBuffer2.destroy(),this.programConfigurations.destroy(),this.segments.destroy(),this.segments2.destroy())}addFeature(e,t,r,n,i,a){for(let e of ne(t,500)){let t=l8(e,n,a.fill.getGranularityForZoomLevel(n.z)),r=this.layoutVertexArray;l9((e,t)=>{r.emplaceBack(e,t)},this.segments,this.layoutVertexArray,this.indexArray,t.verticesFlattened,t.indicesTriangles,this.segments2,this.indexArray2,t.indicesLineList)}this.programConfigurations.populatePaintArrays(this.layoutVertexArray.length,e,r,{imagePositions:i,canonical:n})}};aI("FillBucket",ut,{omit:["layers","patternFeatures"]});var ur={get paint(){return p||=new sn({"fill-antialias":new a7(t2.paint_fill["fill-antialias"],"fill-antialias"),"fill-opacity":new a9(t2.paint_fill["fill-opacity"],"fill-opacity"),"fill-layer-opacity":new a7(t2.paint_fill["fill-layer-opacity"],"fill-layer-opacity"),"fill-color":new a9(t2.paint_fill["fill-color"],"fill-color"),"fill-outline-color":new a9(t2.paint_fill["fill-outline-color"],"fill-outline-color"),"fill-translate":new a7(t2.paint_fill["fill-translate"],"fill-translate"),"fill-translate-anchor":new a7(t2.paint_fill["fill-translate-anchor"],"fill-translate-anchor"),"fill-pattern":new se(t2.paint_fill["fill-pattern"],"fill-pattern")})},get layout(){return c||=new sn({"fill-sort-key":new a9(t2.layout_fill["fill-sort-key"],"fill-sort-key")})}};let un=e=>"fill"===e.type;var ui=class extends ss{constructor(e,t){super(e,ur,t)}recalculate(e,t){super.recalculate(e,t);let r=this.paint._values["fill-outline-color"];"constant"===r.value.kind&&void 0===r.value.value&&(this.paint._values["fill-outline-color"]=this.paint._values["fill-color"])}createBucket(e){return new ut(e)}queryRadius(){return o0(this.paint.get("fill-translate"))}queryIntersectsFeature({queryGeometry:e,geometry:t,transform:r,pixelsToTileUnits:n}){return oY(o1(e,this.paint.get("fill-translate"),this.paint.get("fill-translate-anchor"),-r.bearingInRadians,n),t)}isTileClipped(){return!0}};let ua=sf([{name:"a_pos",components:2,type:"Int16"},{name:"a_normal_ed",components:4,type:"Int16"}],4),us=sf([{name:"a_centroid",components:2,type:"Int16"}],4),uo=ua.members;ua.size,ua.alignment;var ul=class e{constructor(){this.minX=1/0,this.maxX=-1/0,this.minY=1/0,this.maxY=-1/0}extend(e){return this.minX=Math.min(this.minX,e.x),this.minY=Math.min(this.minY,e.y),this.maxX=Math.max(this.maxX,e.x),this.maxY=Math.max(this.maxY,e.y),this}expandBy(e){return this.minX-=e,this.minY-=e,this.maxX+=e,this.maxY+=e,(this.minX>this.maxX||this.minY>this.maxY)&&(this.minX=1/0,this.maxX=-1/0,this.minY=1/0,this.maxY=-1/0),this}shrinkBy(e){return this.expandBy(-e)}map(t){let r=new e;return r.extend(t(new P(this.minX,this.minY))),r.extend(t(new P(this.maxX,this.minY))),r.extend(t(new P(this.minX,this.maxY))),r.extend(t(new P(this.maxX,this.maxY))),r}static fromPoints(t){let r=new e;for(let e of t)r.extend(e);return r}contains(e){return e.x>=this.minX&&e.x<=this.maxX&&e.y>=this.minY&&e.y<=this.maxY}empty(){return this.minX>this.maxX}width(){return this.maxX-this.minX}height(){return this.maxY-this.minY}covers(e){return!this.empty()&&!e.empty()&&e.minX>=this.minX&&e.maxX<=this.maxX&&e.minY>=this.minY&&e.maxY<=this.maxY}intersects(e){return!this.empty()&&!e.empty()&&e.minX<=this.maxX&&e.maxX>=this.minX&&e.minY<=this.maxY&&e.maxY>=this.minY}};let uu=ul.fromPoints([new P(0,0),new P(e$,e$)]);function uh(e,t){return e.x===t.x&&(e.x<0||e.x>8192)||e.y===t.y&&(e.y<0||e.y>8192)}function uc(e){return e.every(e=>e.x<0)||e.every(e=>e.x>8192)||e.every(e=>e.y<0)||e.every(e=>e.y>8192)}var up=class{constructor(e,t,r,n,i){for(this.properties=Object.create(null),this.extent=r,this.type=0,this.id=void 0,this._pbf=e,this._geometry=-1,this._keys=n,this._values=i;e.pos<t;){let t=e.readVarint();if(8===t)this.id=e.readVarint();else if(18===t){let t=e.readVarint()+e.pos;for(;e.pos<t;){let t=n[e.readVarint()],r=i[e.readVarint()];this.properties[t]=r}}else 24===t?this.type=e.readVarint():(34===t&&(this._geometry=e.pos),e.skip(t))}}loadGeometry(){if(this._geometry<0)throw Error("feature has no geometry");let e=this._pbf;e.pos=this._geometry;let t=e.readVarint()+e.pos,r=[],n,i=1,a=0,s=0,o=0;for(;e.pos<t;){if(a<=0){let t=e.readVarint();if(i=7&t,0==(a=t>>3))continue}if(a--,1===i)s+=e.readSVarint(),o+=e.readSVarint(),n&&r.push(n),n=[new P(s,o)];else if(2===i)s+=e.readSVarint(),o+=e.readSVarint(),n&&n.push(new P(s,o));else if(7===i)n&&n.push(n[0].clone());else throw Error(`unknown command ${i}`)}return n&&r.push(n),r}bbox(){if(this._geometry<0)throw Error("feature has no geometry");let e=this._pbf;e.pos=this._geometry;let t=e.readVarint()+e.pos,r=1,n=0,i=0,a=0,s=1/0,o=-1/0,l=1/0,u=-1/0;for(;e.pos<t;){if(n<=0){let t=e.readVarint();if(r=7&t,0==(n=t>>3))continue}if(n--,1===r||2===r)i+=e.readSVarint(),a+=e.readSVarint(),i<s&&(s=i),i>o&&(o=i),a<l&&(l=a),a>u&&(u=a);else if(7!==r)throw Error(`unknown command ${r}`)}return[s,l,o,u]}toGeoJSON(e,t,r){let n,i=this.extent*2**r,a=this.extent*e,s=this.extent*t,o=this.loadGeometry();function l(e){return[(e.x+a)*360/i-180,360/Math.PI*Math.atan(Math.exp((1-(e.y+s)*2/i)*Math.PI))-90]}function u(e){return e.map(l)}if(1===this.type){let e=[];
2for(let t of o)e.push(t[0]);let t=u(e);n=1===e.length?{type:"Point",coordinates:t[0]}:{type:"MultiPoint",coordinates:t}}else if(2===this.type){let e=o.map(u);n=1===e.length?{type:"LineString",coordinates:e[0]}:{type:"MultiLineString",coordinates:e}}else if(3===this.type){let e=uf(o),t=[];for(let r of e)t.push(r.map(u));n=1===t.length?{type:"Polygon",coordinates:t[0]}:{type:"MultiPolygon",coordinates:t}}else throw Error("unknown feature type");let h={type:"Feature",geometry:n,properties:this.properties};return null!=this.id&&(h.id=this.id),h}};function uf(e){let t=e.length;if(t<=1)return[e];let r=[],n,i;for(let a=0;a<t;a++){let t=function(e){let t=0;for(let r=0,n=e.length,i=n-1,a,s;r<n;i=r++)a=e[r],t+=((s=e[i]).x-a.x)*(a.y+s.y);return t}(e[a]);0!==t&&(void 0===i&&(i=t<0),i===t<0?(n&&r.push(n),n=[e[a]]):n&&n.push(e[a]))}return n&&r.push(n),r}up.types=["Unknown","Point","LineString","Polygon"];var ud=class{constructor(e,t){for(this.version=1,this.name="",this.extent=4096,this.length=0,this._pbf=e,this._keys=[],this._values=[],this._features=[],void 0===t&&(t=e.length);e.pos<t;){let t=e.readVarint();10===t?this.name=e.readString():18===t?(this._features.push(e.pos),e.skip(t)):26===t?this._keys.push(e.readString()):34===t?this._values.push(function(e){let t=null,r=e.readVarint()+e.pos;for(;e.pos<r;){let r=e.readVarint();t=10===r?e.readString():21===r?e.readFloat():25===r?e.readDouble():32===r?e.readVarint(!0):40===r?e.readVarint():48===r?e.readSVarint():56===r?e.readBoolean():(e.skip(r),null)}if(null==t)throw Error("unknown feature value");return t}(e)):40===t?this.extent=e.readVarint():120===t?this.version=e.readVarint():e.skip(t)}this.length=this._features.length}feature(e){if(e<0||e>=this._features.length)throw Error("feature index out of bounds");this._pbf.pos=this._features[e];let t=this._pbf.readVarint()+this._pbf.pos;return new up(this._pbf,t,this.extent,this._keys,this._values)}},uy=class{constructor(e,t=e.length){let r=Object.create(null);for(;e.pos<t;){let t=e.readVarint();if(26===t){let t=new ud(e,e.readVarint()+e.pos);t.length&&(r[t.name]=t)}else e.skip(t)}this.layers=r}};let um=6371008.8;var ug=class e{constructor(e,t){if(isNaN(e)||isNaN(t))throw Error(`Invalid LngLat object: (${e}, ${t})`);if(this.lng=+e,this.lat=+t,this.lat>90||this.lat<-90)throw Error("Invalid LngLat latitude value: must be between -90 and 90")}wrap(){return new e(e8(this.lng,-180,180),this.lat)}toArray(){return[this.lng,this.lat]}toString(){return`LngLat(${this.lng}, ${this.lat})`}distanceTo(e){let t=Math.PI/180,r=this.lat*t,n=e.lat*t;return um*Math.acos(Math.min(Math.sin(r)*Math.sin(n)+Math.cos(r)*Math.cos(n)*Math.cos((e.lng-this.lng)*t),1))}static convert(t){if(t instanceof e)return t;if(Array.isArray(t)&&(2===t.length||3===t.length))return new e(Number(t[0]),Number(t[1]));if(!Array.isArray(t)&&"object"==typeof t&&t)return new e(Number("lng"in t?t.lng:t.lon),Number(t.lat));throw Error("`LngLatLike` argument must be specified as a LngLat instance, an object {lng: <lng>, lat: <lat>}, an object {lon: <lng>, lat: <lat>}, or an array of [<lng>, <lat>]")}};let ux=2*Math.PI*um;function uv(e){return ux*Math.cos(e*Math.PI/180)}function ub(e){return(180+e)/360}function uw(e){return(180-180/Math.PI*Math.log(Math.tan(Math.PI/4+e*Math.PI/360)))/360}function u_(e,t){return e/uv(t)}function uA(e){return 360*e-180}function uD(e){return 360/Math.PI*Math.atan(Math.exp((180-360*e)*Math.PI/180))-90}function uS(e,t){return e*uv(uD(t))}var uE=class e{constructor(e,t,r=0){this.x=+e,this.y=+t,this.z=+r}static fromLngLat(t,r=0){let n=ug.convert(t);return new e(ub(n.lng),uw(n.lat),r/uv(n.lat))}toLngLat(){return new ug(uA(this.x),uD(this.y))}toAltitude(){return uS(this.z,this.y)}meterInMercatorCoordinateUnits(){return 1/ux*(1/Math.cos(uD(this.y)*Math.PI/180))}};let uF=89.25;function uk(e,t,r){let n=1/(1<<r.z);return new uE(e/e$*n+r.x*n,t/e$*n+r.y*n)}function uT(e,t){let r=e4(t.lat,-85.051129,tT);return new P(ub(t.lng)*e,uw(r)*e)}function uI(e,t){return new uE(t.x/e,t.y/e).toLngLat()}function uC(e){return e.cameraToCenterDistance*Math.min(.85*Math.tan(tA(90-e.pitch)),Math.tan(tA(uF-e.pitch)))}function uM(e,t){let r=e.canonical,n=t/tn(r.z),i=r.x+2**r.z*e.wrap,a=new Float64Array(16);return q(a),X(a,a,[i*n,r.y*n,0]),Y(a,a,[n/e$,n/e$,1]),a}function uB(e,t,r,n,i){let a=uE.fromLngLat(e,t),s=i*(1/uv(e.lat)),{x:o,y:l,z:u}=uz(r,n);return new uE(a.x+-(s*o),a.y+-(s*l),a.z+s*u)}function uP(e){let t=1/uv(e.center.lat)*e.worldSize;return uB(e.center,e.elevation,e.pitch,e.bearing,e.cameraToCenterDistance/t)}function uz(e,t){let r=tA(e),n=tA(t),i=Math.cos(-r),a=Math.sin(r);return{x:a*Math.sin(n),y:-a*Math.cos(n),z:i}}function uV(e,t,r){var n,i;let a;if(t<=0||!e||0===e.length)return e;let s=(n=t,a=uk(e$/2,e$/2,i=r).toLngLat(),n*uE.fromLngLat(a).meterInMercatorCoordinateUnits()*((1<<i.z)*e$));return e.map(e=>(function(e,t){if(!e||e.length<3)return e;let r=e[0].x===e[e.length-1].x&&e[0].y===e[e.length-1].y,n=r?e.length-1:e.length;if(n<3)return e;let i=[];for(let r=0;r<n;r++){let a=e[(r-1+n)%n],s=e[r],o=e[(r+1)%n];if(uh(a,s)||uh(s,o)){i.push(s.clone());continue}
vendor: 9,338 bytes, line 2
2!function(e,t,r,n,i){let a=t.sub(r),s=n.sub(r),o=a.mag(),l=s.mag();if(o<1e-6||l<1e-6)return e.push(r.clone());a._div(o),s._div(l);let u=a.x*s.x+a.y*s.y;if(Math.abs(u)>Math.cos(5*Math.PI/180))return e.push(r.clone());let h=Math.min(i,.2*o,.2*l),c=r.add(a.mult(h)),p=r.add(s.mult(h)),f=Math.sqrt((1+u)/2),d=r.add(a.add(s)._unit()._mult(h/f)),y=c.sub(d).angleWith(p.sub(d)),m=Math.max(2,Math.ceil(Math.abs(y)/(Math.PI/6)-1e-6));for(let t=0;t<=m;t++)e.push(c.rotateAround(t/m*y,d))}(i,a,s,o,t)}let a=function(e){let t=[];for(let r of e){let e=r.round(),n=t[t.length-1];(n?.x!==e.x||n?.y!==e.y)&&t.push(e)}for(;t.length>1&&t[0].x===t[t.length-1].x&&t[0].y===t[t.length-1].y;)t.pop();return t}(i);return a.length<3?e:(r&&a.push(a[0].clone()),a)})(e,s))}function uL(e,t,r,n,i,a,s,o){e.emplaceBack(t,r,2*Math.floor(8192*n)+s,8192*i*2,8192*a*2,Math.round(o))}var u$=class{constructor(e){this.zoom=e.zoom,this.overscaling=e.overscaling,this.layers=e.layers,this.layerIds=this.layers.map(e=>e.id),this.index=e.index,this.hasDependencies=!1,this.layoutVertexArray=new s2,this.centroidVertexArray=new sK,this.indexArray=new oi,this.programConfigurations=new oO(e.layers,e.zoom),this.segments=new ou,this.stateDependentLayerIds=this.layers.filter(e=>e.isStateDependent()).map(e=>e.id)}populate(e,t,r){this.features=[],this.hasDependencies=lD("fill-extrusion",this.layers,t);let n=new aW(this.zoom),i=this.layers[0],a=i.layout.get("fill-extrusion-rounded-corner-distance"),s=i._featureFilter.needGeometry;for(let{feature:o,id:l,index:u,sourceLayerIndex:h}of e){let e=oq(o,s);if(!i._featureFilter.filter(n,e,r))continue;let c=s?e.geometry:oU(o),p={id:l,sourceLayerIndex:h,index:u,geometry:a>0?uV(c,a,r):c,properties:o.properties,type:o.type,patterns:{}};this.hasDependencies?this.features.push(lS("fill-extrusion",this.layers,p,{zoom:this.zoom},t)):this.addFeature(p,p.geometry,u,r,{},t.subdivisionGranularity),t.featureIndex.insert(o,p.geometry,u,h,this.index,!0)}}addFeatures({options:e,canonical:t,patternPositions:r}){for(let n of this.features){let{geometry:i}=n;this.addFeature(n,i,n.index,t,r,e.subdivisionGranularity)}}update(e,t,r){this.stateDependentLayers.length&&this.programConfigurations.updatePaintArrays(e,t,this.stateDependentLayers,{imagePositions:r})}isEmpty(){return 0===this.layoutVertexArray.length&&0===this.centroidVertexArray.length}uploadPending(){return!this.uploaded||this.programConfigurations.needsUpload}upload(e){this.uploaded||(this.layoutVertexBuffer=e.createVertexBuffer(this.layoutVertexArray,uo),this.centroidVertexBuffer=e.createVertexBuffer(this.centroidVertexArray,us.members,!0),this.indexBuffer=e.createIndexBuffer(this.indexArray)),this.programConfigurations.upload(e),this.uploaded=!0}destroy(){this.layoutVertexBuffer&&(this.layoutVertexBuffer.destroy(),this.indexBuffer.destroy(),this.programConfigurations.destroy(),this.segments.destroy(),this.centroidVertexBuffer.destroy())}addFeature(e,t,r,n,i,a){let s=this.layers[0],o=s.layout?s.layout.get("fill-extrusion-rounded-corner-distance"):0;for(let r of ne(o>0?uV(t,o,n):t,500)){let t={x:0,y:0,sampleCount:0},i=this.layoutVertexArray.length;this.processPolygon(t,n,e,r,a);let s=this.layoutVertexArray.length-i,o=Math.floor(t.x/t.sampleCount),l=Math.floor(t.y/t.sampleCount);for(let e=0;e<s;e++)this.centroidVertexArray.emplaceBack(o,l)}this.programConfigurations.populatePaintArrays(this.layoutVertexArray.length,e,r,{imagePositions:i,canonical:n})}processPolygon(e,t,r,n,i){if(n.length<1||uc(n[0]))return;for(let t of n)0!==t.length&&function(e,t){for(let r=0;r<t.length;r++){let n=t[r];(r!==t.length-1||t[0].x!==n.x||t[0].y!==n.y)&&(e.x+=n.x,e.y+=n.y,e.sampleCount++)}}(e,t);let a={segment:this.segments.prepareSegment(4,this.layoutVertexArray,this.indexArray)},s=i.fill.getGranularityForZoomLevel(t.z),o="Polygon"===up.types[r.type];for(let e of n){if(0===e.length||uc(e))continue;let t=l7(e,s,o);this._generateSideFaces(t,a)}if(!o)return;let l=l8(n,t,s,!1),u=this.layoutVertexArray;l9((e,t)=>{uL(u,e,t,0,0,1,1,0)},this.segments,this.layoutVertexArray,this.indexArray,l.verticesFlattened,l.indicesTriangles)}_generateSideFaces(e,t){let r=0;for(let n=1;n<e.length;n++){let i=e[n],a=e[n-1];if(uh(i,a))continue;t.segment.vertexLength+4>ou.MAX_VERTEX_ARRAY_LENGTH&&(t.segment=this.segments.prepareSegment(4,this.layoutVertexArray,this.indexArray));let s=i.sub(a)._perp()._unit(),o=a.dist(i);r+o>32768&&(r=0),uL(this.layoutVertexArray,i.x,i.y,s.x,s.y,0,0,r),uL(this.layoutVertexArray,i.x,i.y,s.x,s.y,0,1,r),r+=o,uL(this.layoutVertexArray,a.x,a.y,s.x,s.y,0,0,r),uL(this.layoutVertexArray,a.x,a.y,s.x,s.y,0,1,r);let l=t.segment.vertexLength;this.indexArray.emplaceBack(l,l+2,l+1),this.indexArray.emplaceBack(l+1,l+2,l+3),t.segment.vertexLength+=4,t.segment.primitiveLength+=2}}};aI("FillExtrusionBucket",u$,{omit:["layers","features"]});var uO={get paint(){return d||=new sn({"fill-extrusion-opacity":new a7(t2["paint_fill-extrusion"]["fill-extrusion-opacity"],"fill-extrusion-opacity"),"fill-extrusion-color":new a9(t2["paint_fill-extrusion"]["fill-extrusion-color"],"fill-extrusion-color"),"fill-extrusion-translate":new a7(t2["paint_fill-extrusion"]["fill-extrusion-translate"],"fill-extrusion-translate"),"fill-extrusion-translate-anchor":new a7(t2["paint_fill-extrusion"]["fill-extrusion-translate-anchor"],"fill-extrusion-translate-anchor"),"fill-extrusion-pattern":new se(t2["paint_fill-extrusion"]["fill-extrusion-pattern"],"fill-extrusion-pattern"),"fill-extrusion-height":new a9(t2["paint_fill-extrusion"]["fill-extrusion-height"],"fill-extrusion-height"),"fill-extrusion-base":new a9(t2["paint_fill-extrusion"]["fill-extrusion-base"],"fill-extrusion-base"),"fill-extrusion-vertical-gradient":new a7(t2["paint_fill-extrusion"]["fill-extrusion-vertical-gradient"],"fill-extrusion-vertical-gradient")})},get layout(){return f||=new sn({"fill-extrusion-rounded-corner-distance":new a7(t2["layout_fill-extrusion"]["fill-extrusion-rounded-corner-distance"],"fill-extrusion-rounded-corner-distance")})}};let uR=e=>"fill-extrusion"===e.type;var uN=class extends ss{constructor(e,t){super(e,uO,t)}createBucket(e){return new u$(e)}queryRadius(){return o0(this.paint.get("fill-extrusion-translate"))}is3D(){return!0}queryIntersectsFeature({queryGeometry:e,feature:t,featureState:r,geometry:n,transform:i,pixelsToTileUnits:a,pixelPosMatrix:s}){let o=o1(e,this.paint.get("fill-extrusion-translate"),this.paint.get("fill-extrusion-translate-anchor"),-i.bearingInRadians,a),l=this.paint.get("fill-extrusion-height").evaluate(t,r),u=this.paint.get("fill-extrusion-base").evaluate(t,r),h=function(e,t){let r=[];for(let n of e){let e=[n.x,n.y,0,1];eS(e,e,t),r.push(new P(e[0]/e[3],e[1]/e[3]))}return r}(o,s),c=function(e,t,r,n){let i=[],a=[],s=n[8]*t,o=n[9]*t,l=n[10]*t,u=n[11]*t,h=n[8]*r,c=n[9]*r,p=n[10]*r,f=n[11]*r;for(let t of e){let e=[],r=[];for(let i of t){let t=i.x,a=i.y,d=n[0]*t+n[4]*a+n[12],y=n[1]*t+n[5]*a+n[13],m=n[2]*t+n[6]*a+n[14],g=n[3]*t+n[7]*a+n[15],x=d+s,v=y+o,b=m+l,w=g+u,_=d+h,A=y+c,D=m+p,S=g+f,E=new P(x/w,v/w);E.z=b/w,e.push(E);let F=new P(_/S,A/S);F.z=D/S,r.push(F)}i.push(e),a.push(r)}return[i,a]}(n,u,l,s);return function(e,t,r){let n=1/0;oY(r,t)&&(n=uq(r,t[0]));for(let i=0;i<t.length;i++){let a=t[i],s=e[i];for(let e=0;e<a.length-1;e++){let t=a[e],i=a[e+1],o=s[e],l=[t,i,s[e+1],o,t];oG(r,l)&&(n=Math.min(n,uq(r,l)))}}return n!==1/0&&n}(c[0],c[1],h)}};function uU(e,t){return e.x*t.x+e.y*t.y}function uq(e,t){if(1===e.length){let r=0,n=t[r++],i;for(;!i||n.equals(i);)if(!(i=t[r++]))return 1/0;for(;r<t.length;r++){let a=t[r],s=e[0],o=i.sub(n),l=a.sub(n),u=s.sub(n),h=uU(o,o),c=uU(o,l),p=uU(l,l),f=uU(u,o),d=uU(u,l),y=h*p-c*c,m=(p*f-c*d)/y,g=(h*d-c*f)/y,x=1-m-g,v=n.z*x+i.z*m+a.z*g;if(isFinite(v))return v}return 1/0}{let e=1/0;for(let r of t)e=Math.min(e,r.z);return e}}Int8Array,Uint8Array,Uint8ClampedArray,Int16Array,Uint16Array,Int32Array,Uint32Array,Float32Array,Float64Array,new Uint32Array(96);let uj=sf([{name:"a_pos_normal",components:2,type:"Int16"},{name:"a_data",components:4,type:"Uint8"}],4),uG=uj.members;uj.size,uj.alignment;let uX=sf([{name:"a_uv_x",components:1,type:"Float32"},{name:"a_split_index",components:1,type:"Float32"}]),uY=uX.members;uX.size,uX.alignment;let uZ=Math.cos(Math.PI/180*37.5);var uW=class{constructor(e){for(let t of(this.zoom=e.zoom,this.overscaling=e.overscaling,this.layers=e.layers,this.layerIds=this.layers.map(e=>e.id),this.index=e.index,this.hasDependencies=!1,this.patternFeatures=[],this.lineClipsArray=[],this.gradients={},this.layers))this.gradients[t.id]={};this.layoutVertexArray=new s3,this.layoutVertexArray2=new s5,this.indexArray=new oi,this.programConfigurations=new oO(e.layers,e.zoom),this.segments=new ou,this.maxLineLength=0,this.stateDependentLayerIds=this.layers.filter(e=>e.isStateDependent()).map(e=>e.id)}populate(e,t,r){this.hasDependencies=lD("line",this.layers,t)||this.hasLineDasharray(this.layers);let n=this.layers[0].layout.get("line-sort-key"),i=!n.isConstant(),a=[],s=new aW(this.zoom),o=this.layers[0]._featureFilter.needGeometry;for(let{feature:t,id:l,index:u,sourceLayerIndex:h}of e){let e=oq(t,o);if(!this.layers[0]._featureFilter.filter(s,e,r))continue;let c=i?n.evaluate(e,{},r):void 0,p={id:l,properties:t.properties,type:t.type,sourceLayerIndex:h,index:u,geometry:o?e.geometry:oU(t),patterns:{},dashes:{},sortKey:c};a.push(p)}for(let n of(i&&a.sort((e,t)=>
2e.sortKey-t.sortKey),a)){let{geometry:i,index:a,sourceLayerIndex:s}=n;this.hasDependencies?(lD("line",this.layers,t)?lS("line",this.layers,n,{zoom:this.zoom},t):this.hasLineDasharray(this.layers)&&this.addLineDashDependencies(this.layers,n,this.zoom,t),this.patternFeatures.push(n)):this.addFeature(n,i,a,r,{},{},t.subdivisionGranularity);let o=e[a].feature;t.featureIndex.insert(o,i,a,s,this.index)}}update(e,t,r,n){this.stateDependentLayers.length&&this.programConfigurations.updatePaintArrays(e,t,this.stateDependentLayers,{imagePositions:r,dashPositions:n})}addFeatures({options:e,canonical:t,patternPositions:r,dashPositions:n}){for(let i of this.patternFeatures)this.addFeature(i,i.geometry,i.index,t,r,n,e.subdivisionGranularity)}isEmpty(){return 0===this.layoutVertexArray.length}uploadPending(){return!this.uploaded||this.programConfigurations.needsUpload}upload(e){this.uploaded||(0!==this.layoutVertexArray2.length&&(this.layoutVertexBuffer2=e.createVertexBuffer(this.layoutVertexArray2,uY)),this.layoutVertexBuffer=e.createVertexBuffer(this.layoutVertexArray,uG),this.indexBuffer=e.createIndexBuffer(this.indexArray)),this.programConfigurations.upload(e),this.uploaded=!0}destroy(){this.layoutVertexBuffer&&(this.layoutVertexBuffer.destroy(),this.indexBuffer.destroy(),this.programConfigurations.destroy(),this.segments.destroy())}lineFeatureClips(e){if(e.properties&&Object.hasOwn(e.properties,"geojsonvt_clip_start")&&Object.hasOwn(e.properties,"geojsonvt_clip_end"))return{start:+e.properties.geojsonvt_clip_start,end:+e.properties.geojsonvt_clip_end}}addFeature(e,t,r,n,i,a,s){let o=this.layers[0].layout,l=o.get("line-join").evaluate(e,{}),u=o.get("line-cap").evaluate(e,{}),h=o.get("line-miter-limit").evaluate(e,{}),c=o.get("line-round-limit").evaluate(e,{});for(let r of(this.lineClips=this.lineFeatureClips(e),t))this.addLine(r,e,l,u,h,c,n,s);this.programConfigurations.populatePaintArrays(this.layoutVertexArray.length,e,r,{imagePositions:i,dashPositions:a,canonical:n})}addLine(e,t,r,n,i,a,s,o){this.distance=0,this.scaledDistance=0,this.totalDistance=0;let l=s?o.line.getGranularityForZoomLevel(s.z):1;if(e=l7(e,l),this.lineClips){this.lineClipsArray.push(this.lineClips);for(let t=0;t<e.length-1;t++)this.totalDistance+=e[t].dist(e[t+1]);this.updateScaledDistance(),this.maxLineLength=Math.max(this.maxLineLength,this.totalDistance)}let u="Polygon"===up.types[t.type],h=e.length;for(;h>=2&&e[h-1].equals(e[h-2]);)h--;let c=0;for(;c<h-1&&e[c].equals(e[c+1]);)c++;if(h-c<(u?3:2))return;"bevel"===r&&(i=1.05);let p=this.overscaling<=16?15*e$/(512*this.overscaling):0,f=this.segments.prepareSegment(10*h,this.layoutVertexArray,this.indexArray),d,y,m,g,x;this.e1=this.e2=-1,u&&(d=e[h-2],x=e[c].sub(d)._unit()._perp());for(let t=c;t<h;t++){if((m=t===h-1?u?e[c+1]:void 0:e[t+1])&&e[t].equals(m))continue;x&&(g=x),d&&(y=d),d=e[t],x=m?m.sub(d)._unit()._perp():g;let s=(g||=x).add(x);(0!==s.x||0!==s.y)&&s._unit();let o=g.x*x.x+g.y*x.y,l=s.x*x.x+s.y*x.y,v=0===l?1/0:1/l,b=2*Math.sqrt(2-2*l),w=l<uZ&&y&&m,_=g.x*x.y-g.y*x.x>0;if(w&&t>c){let e=d.dist(y);if(e>2*p){let t=d.sub(d.sub(y)._mult(p/e)._round());this.updateDistance(y,t),this.addCurrentVertex(t,g,0,0,f),y=t}}let A=y&&m,D=A?r:u?"butt":n;if(A&&"round"===D&&(v<a?D="miter":v<=2&&(D="fakeround")),"miter"===D&&v>i&&(D="bevel"),"bevel"===D&&(v>2&&(D="flipbevel"),v<i&&(D="miter")),y&&this.updateDistance(y,d),"miter"===D)s._mult(v),this.addCurrentVertex(d,s,0,0,f);else if("flipbevel"===D){if(v>100)s=x.mult(-1);else{let e=v*g.add(x).mag()/g.sub(x).mag();s._perp()._mult(e*(_?-1:1))}this.addCurrentVertex(d,s,0,0,f),this.addCurrentVertex(d,s.mult(-1),0,0,f)}else if("bevel"===D||"fakeround"===D){let e=-Math.sqrt(v*v-1),t=_?e:0,r=_?0:e;if(y&&this.addCurrentVertex(d,g,t,r,f),"fakeround"===D){let e=Math.round(180*b/Math.PI/20);for(let t=1;t<e;t++){let r=t/e;
2if(.5!==r){let e=r-.5,t=1.0904+o*(-3.2452+o*(3.55645-1.43519*o)),n=.848013+o*(-1.06021+.215638*o);r+=r*e*(r-1)*(t*e*e+n)}let n=x.sub(g)._mult(r)._add(g)._unit()._mult(_?-1:1);this.addHalfVertex(d,n.x,n.y,!1,_,0,f)}}m&&this.addCurrentVertex(d,x,-t,-r,f)}else if("butt"===D)this.addCurrentVertex(d,s,0,0,f);else if("square"===D){let e=y?1:-1;this.addCurrentVertex(d,s,e,e,f)}else"round"===D&&(y&&(this.addCurrentVertex(d,g,0,0,f),this.addCurrentVertex(d,g,1,1,f,!0)),m&&(this.addCurrentVertex(d,x,-1,-1,f,!0),this.addCurrentVertex(d,x,0,0,f)));if(w&&t<h-1){let e=d.dist(m);if(e>2*p){let t=d.add(m.sub(d)._mult(p/e)._round());this.updateDistance(d,t),this.addCurrentVertex(t,x,0,0,f),d=t}}}}addCurrentVertex(e,t,r,n,i,a=!1){let s=t.x+t.y*r,o=t.y-t.x*r,l=-t.x+t.y*n,u=-t.y-t.x*n;this.addHalfVertex(e,s,o,a,!1,r,i),this.addHalfVertex(e,l,u,a,!0,-n,i),this.distance>16384&&0===this.totalDistance&&(this.distance=0,this.updateScaledDistance(),this.addCurrentVertex(e,t,r,n,i,a))}addHalfVertex({x:e,y:t},r,n,i,a,s,o){let l=(this.lineClips?32767*this.scaledDistance:this.scaledDistance)*.5;if(this.layoutVertexArray.emplaceBack((e<<1)+ +!!i,(t<<1)+ +!!a,Math.round(63*r)+128,Math.round(63*n)+128,(0===s?0:s<0?-1:1)+1|(63&l)<<2,l>>6),this.lineClips){let e=(this.scaledDistance-this.lineClips.start)/(this.lineClips.end-this.lineClips.start);this.layoutVertexArray2.emplaceBack(e,this.lineClipsArray.length)}let u=o.vertexLength++;this.e1>=0&&this.e2>=0&&(this.indexArray.emplaceBack(this.e1,u,this.e2),o.primitiveLength++),a?this.e2=u:this.e1=u}updateScaledDistance(){this.scaledDistance=this.lineClips?this.lineClips.start+(this.lineClips.end-this.lineClips.start)*this.distance/this.totalDistance:this.distance}updateDistance(e,t){this.distance+=e.dist(t),this.updateScaledDistance()}hasLineDasharray(e){for(let t of e){let e=t.paint.get("line-dasharray");if(e&&!e.isConstant())return!0}return!1}addLineDashDependencies(e,t,r,n){for(let i of e){let e=i.paint.get("line-dasharray");if(!e||"constant"===e.value.kind)continue;let a="round"===i.layout.get("line-cap").evaluate(t,{}),s={dasharray:e.value.evaluate({zoom:r-1},t,{}),round:a},o={dasharray:e.value.evaluate({zoom:r},t,{}),round:a},l={dasharray:e.value.evaluate({zoom:r+1},t,{}),round:a},u=`${s.dasharray.join(",")},${s.round}`,h=`${o.dasharray.join(",")},${o.round}`,c=`${l.dasharray.join(",")},${l.round}`;n.dashDependencies[u]=s,n.dashDependencies[h]=o,n.dashDependencies[c]=l,t.dashes[i.id]={min:u,mid:h,max:c}}}};aI("LineBucket",uW,{omit:["layers","patternFeatures"]});var uH={get paint(){return m||=new sn({"line-opacity":new a9(t2.paint_line["line-opacity"],"line-opacity"),"line-layer-opacity":new a7(t2.paint_line["line-layer-opacity"],"line-layer-opacity"),"line-color":new a9(t2.paint_line["line-color"],"line-color"),"line-translate":new a7(t2.paint_line["line-translate"],"line-translate"),"line-translate-anchor":new a7(t2.paint_line["line-translate-anchor"],"line-translate-anchor"),"line-width":new a9(t2.paint_line["line-width"],"line-width"),"line-gap-width":new a9(t2.paint_line["line-gap-width"],"line-gap-width"),"line-offset":new a9(t2.paint_line["line-offset"],"line-offset"),"line-blur":new a9(t2.paint_line["line-blur"],"line-blur"),"line-dasharray":new se(t2.paint_line["line-dasharray"],"line-dasharray"),"line-pattern":new se(t2.paint_line["line-pattern"],"line-pattern"),"line-gradient":new sr(t2.paint_line["line-gradient"],"line-gradient")})},get layout(){return y||=new sn({"line-cap":new a9(t2.layout_line["line-cap"],"line-cap"),"line-join":new a9(t2.layout_line["line-join"],"line-join"),"line-miter-limit":new a9(t2.layout_line["line-miter-limit"],"line-miter-limit"),"line-round-limit":new a9(t2.layout_line["line-round-limit"],"line-round-limit"),"line-sort-key":new a9(t2.layout_line["line-sort-key"],"line-sort-key")})}},uK=class extends a9{possiblyEvaluate(e,t){return t=new aW(Math.floor(t.zoom),{now:t.now,fadeDuration:t.fadeDuration,zoomHistory:t.zoomHistory,transition:t.transition}),super.possiblyEvaluate(e,t)}evaluate(e,t,r,n){return t=e7({},t,{zoom:Math.floor(t.zoom)}),super.evaluate(e,t,r,n)}};let uJ=e=>"line"===e.type;var uQ=class extends ss{constructor(e,t){super(e,uH,t),this.gradientVersion=0,g||((g=new uK(uH.paint.properties["line-width"].specification,"line-floorwidth")).useIntegerZoom=!0)}_handleSpecialPaintPropertyUpdate(e){if("line-gradient"===e){let e=this.gradientExpression();this.stepInterpolant=void 0!==e._styleExpression&&e._styleExpression.expression instanceof r5,this.gradientVersion=(this.gradientVersion+1)%(0x20000000000000-1)}}gradientExpression(){return this._transitionablePaint._values["line-gradient"].value.expression}recalculate(e,t){super.recalculate(e,t),this.paint._values["line-floorwidth"]=g.possiblyEvaluate(this._transitioningPaint._values["line-width"].value,e)}createBucket(e){return new uW(e)}queryRadius(e){var t,r;return t=oQ("line-width",this,e),((r=oQ("line-gap-width",this,e))>0?r+2*t:t)/2+Math.abs(oQ("line-offset",this,e))+o0(this.paint.get("line-translate"))}queryIntersectsFeature({queryGeometry:e,feature:t,featureState:r,geometry:n,transform:i,pixelsToTileUnits:a}){var s,o;let l=o1(e,this.paint.get("line-translate"),this.paint.get("line-translate-anchor"),-i.bearingInRadians,a),u=a/2*(s=this.paint.get("line-width").evaluate(t,r),(o=this.paint.get("line-gap-width").evaluate(t,r))>0?o+2*s:s),h=this.paint.get("line-offset").evaluate(t,r);return h&&(n=function(e,t){let r=[];for(let n of e){let e=function(e){let t=[];for(let r=0;r<e.length;r++){let n=e[r],i=t.at(-1);
2(0===r||i&&!n.equals(i))&&t.push(n)}return t}(n),i=[];for(let r=0;r<e.length;r++){let n=e[r],a=e[r-1],s=e[r+1],o=0===r?new P(0,0):n.sub(a)._unit()._perp(),l=r===e.length-1?new P(0,0):s.sub(n)._unit()._perp(),u=o._add(l)._unit(),h=u.x*l.x+u.y*l.y;0!==h&&u._mult(1/h),i.push(u._mult(t)._add(n))}r.push(i)}return r}(n,h*a)),function(e,t,r){for(let n of t){if(e.length>=3){for(let t of n)if(oJ(e,t))return!0}if(function(e,t,r){if(e.length>1){if(oZ(e,t))return!0;for(let n of t)if(oW(n,e,r))return!0}for(let n of e)if(oW(n,t,r))return!0;return!1}(e,n,r))return!0}return!1}(l,n,u)}isTileClipped(){return!0}};let u0=sf([{name:"a_pos_offset",components:4,type:"Int16"},{name:"a_data",components:4,type:"Uint16"},{name:"a_pixeloffset",components:4,type:"Int16"},{name:"a_height_offset",components:1,type:"Float32"}],4),u1=sf([{name:"a_projected_pos",components:3,type:"Float32"}],4);sf([{name:"a_fade_opacity",components:1,type:"Uint32"}],4);let u2=sf([{name:"a_placed",components:2,type:"Uint8"},{name:"a_shift",components:2,type:"Float32"},{name:"a_box_real",components:2,type:"Int16"}]);sf([{type:"Int16",name:"anchorPointX"},{type:"Int16",name:"anchorPointY"},{type:"Int16",name:"x1"},{type:"Int16",name:"y1"},{type:"Int16",name:"x2"},{type:"Int16",name:"y2"},{type:"Uint32",name:"featureIndex"},{type:"Uint16",name:"sourceLayerIndex"},{type:"Uint16",name:"bucketIndex"}]);let u3=sf([{name:"a_pos",components:2,type:"Int16"},{name:"a_anchor_pos",components:2,type:"Int16"},{name:"a_extrude",components:2,type:"Int16"}],4),u5=sf([{name:"a_pos",components:2,type:"Float32"},{name:"a_radius",components:1,type:"Float32"},{name:"a_flags",components:2,type:"Int16"}],4);sf([{name:"triangle",components:3,type:"Uint16"}]),sf([{type:"Int16",name:"anchorX"},{type:"Int16",name:"anchorY"},{type:"Uint16",name:"glyphStartIndex"},{type:"Uint16",name:"numGlyphs"},{type:"Uint32",name:"vertexStartIndex"},{type:"Uint32",name:"lineStartIndex"},{type:"Uint32",name:"lineLength"},{type:"Uint16",name:"segment"},{type:"Uint16",name:"lowerSize"},{type:"Uint16",name:"upperSize"},{type:"Float32",name:"lineOffsetX"},{type:"Float32",name:"lineOffsetY"},{type:"Uint8",name:"writingMode"},{type:"Uint8",name:"placedOrientation"},{type:"Uint8",name:"hidden"},{type:"Uint32",name:"crossTileID"},{type:"Int16",name:"associatedIconIndex"},{type:"Float32",name:"heightOffset"}]),sf([{type:"Int16",name:"anchorX"},{type:"Int16",name:"anchorY"},{type:"Int16",name:"rightJustifiedTextSymbolIndex"},{type:"Int16",name:"centerJustifiedTextSymbolIndex"},{type:"Int16",name:"leftJustifiedTextSymbolIndex"},{type:"Int16",name:"verticalPlacedTextSymbolIndex"},{type:"Int16",name:"placedIconSymbolIndex"},{type:"Int16",name:"verticalPlacedIconSymbolIndex"},{type:"Uint16",name:"key"},{type:"Uint16",name:"textBoxStartIndex"},{type:"Uint16",name:"textBoxEndIndex"},{type:"Uint16",name:"verticalTextBoxStartIndex"},{type:"Uint16",name:"verticalTextBoxEndIndex"},{type:"Uint16",name:"iconBoxStartIndex"},{type:"Uint16",name:"iconBoxEndIndex"},{type:"Uint16",name:"verticalIconBoxStartIndex"},{type:"Uint16",name:"verticalIconBoxEndIndex"},{type:"Uint16",name:"featureIndex"},{type:"Uint16",name:"numHorizontalGlyphVertices"},{type:"Uint16",name:"numVerticalGlyphVertices"},{type:"Uint16",name:"numIconVertices"},{type:"Uint16",name:"numVerticalIconVertices"},{type:"Uint16",name:"useRuntimeCollisionCircles"},{type:"Uint32",name:"crossTileID"},{type:"Float32",name:"textBoxScale"},{type:"Float32",name:"collisionCircleDiameter"},{type:"Uint16",name:"textAnchorOffsetStartIndex"},{type:"Uint16",name:"textAnchorOffsetEndIndex"},{type:"Float32",name:"heightOffset"}]),sf([{type:"Float32",name:"offsetX"}]),sf([{type:"Int16",name:"x"},{type:"Int16",name:"y"},{type:"Int16",name:"tileUnitDistanceFromAnchor"}]),sf([{type:"Uint16",name:"textAnchor"},{type:"Float32",components:2,name:"textOffset"}]);let u6="u">typeof Intl&&"Segmenter"in Intl;function u4(e){var t;if(!u6||!
vendor: 4,022 bytes, line 2
2/[\r\u0300-\u036F\u0483-\u0489\u0591-\u05BD\u05BF\u05C1\u05C2\u05C4\u05C5\u05C7\u0600-\u0605\u0610-\u061A\u064B-\u065F\u0670\u06D6-\u06DD\u06DF-\u06E4\u06E7\u06E8\u06EA-\u06ED\u070F\u0711\u0730-\u074A\u07A6-\u07B0\u07EB-\u07F3\u07FD\u0816-\u0819\u081B-\u0823\u0825-\u0827\u0829-\u082D\u0859-\u085B\u0890\u0891\u0897-\u089F\u08CA-\u0903\u093A-\u093C\u093E-\u094F\u0951-\u0957\u0962\u0963\u0981-\u0983\u09BC\u09BE-\u09C4\u09C7\u09C8\u09CB-\u09CD\u09D7\u09E2\u09E3\u09FE\u0A01-\u0A03\u0A3C\u0A3E-\u0A42\u0A47\u0A48\u0A4B-\u0A4D\u0A51\u0A70\u0A71\u0A75\u0A81-\u0A83\u0ABC\u0ABE-\u0AC5\u0AC7-\u0AC9\u0ACB-\u0ACD\u0AE2\u0AE3\u0AFA-\u0AFF\u0B01-\u0B03\u0B3C\u0B3E-\u0B44\u0B47\u0B48\u0B4B-\u0B4D\u0B55-\u0B57\u0B62\u0B63\u0B82\u0BBE-\u0BC2\u0BC6-\u0BC8\u0BCA-\u0BCD\u0BD7\u0C00-\u0C04\u0C3C\u0C3E-\u0C44\u0C46-\u0C48\u0C4A-\u0C4D\u0C55\u0C56\u0C62\u0C63\u0C81-\u0C83\u0CBC\u0CBE-\u0CC4\u0CC6-\u0CC8\u0CCA-\u0CCD\u0CD5\u0CD6\u0CE2\u0CE3\u0CF3\u0D00-\u0D03\u0D3B\u0D3C\u0D3E-\u0D44\u0D46-\u0D48\u0D4A-\u0D4E\u0D57\u0D62\u0D63\u0D81-\u0D83\u0DCA\u0DCF-\u0DD4\u0DD6\u0DD8-\u0DDF\u0DF2\u0DF3\u0E31\u0E33-\u0E3A\u0E47-\u0E4E\u0EB1\u0EB3-\u0EBC\u0EC8-\u0ECE\u0F18\u0F19\u0F35\u0F37\u0F39\u0F3E\u0F3F\u0F71-\u0F84\u0F86\u0F87\u0F8D-\u0F97\u0F99-\u0FBC\u0FC6\u102D-\u1037\u1039-\u103E\u1056-\u1059\u105E-\u1060\u1071-\u1074\u1082\u1084-\u1086\u108D\u109D\u1100-\u11FF\u135D-\u135F\u1712-\u1715\u1732-\u1734\u1752\u1753\u1772\u1773\u17B4-\u17D3\u17DD\u180B-\u180D\u180F\u1885\u1886\u18A9\u1920-\u192B\u1930-\u193B\u1A17-\u1A1B\u1A55-\u1A5E\u1A60\u1A62\u1A65-\u1A7C\u1A7F\u1AB0-\u1ADD\u1AE0-\u1AEB\u1B00-\u1B04\u1B34-\u1B44\u1B6B-\u1B73\u1B80-\u1B82\u1BA1-\u1BAD\u1BE6-\u1BF3\u1C24-\u1C37\u1CD0-\u1CD2\u1CD4-\u1CE8\u1CED\u1CF4\u1CF7-\u1CF9\u1DC0-\u1DFF\u200C\u200D\u20D0-\u20F0\u2CEF-\u2CF1\u2D7F\u2DE0-\u2DFF\u302A-\u302F\u3099\u309A\uA66F-\uA672\uA674-\uA67D\uA69E\uA69F\uA6F0\uA6F1\uA802\uA806\uA80B\uA823-\uA827\uA82C\uA880\uA881\uA8B4-\uA8C5\uA8E0-\uA8F1\uA8FF\uA926-\uA92D\uA947-\uA953\uA960-\uA97C\uA980-\uA983\uA9B3-\uA9C0\uA9E5\uAA29-\uAA36\uAA43\uAA4C\uAA4D\uAA7C\uAAB0\uAAB2-\uAAB4\uAAB7\uAAB8\uAABE\uAABF\uAAC1\uAAEB-\uAAEF\uAAF5\uAAF6\uABE3-\uABEA\uABEC\uABED\uAC00-\uD7A3\uD7B0-\uD7C6\uD7CB-\uD7FB\uFB1E\uFE00-\uFE0F\uFE20-\uFE2F\uFF9E\uFF9F]|\uD800[\uDDFD\uDEE0\uDF76-\uDF7A]|\uD802[\uDE01-\uDE03\uDE05\uDE06\uDE0C-\uDE0F\uDE38-\uDE3A\uDE3F\uDEE5\uDEE6]|\uD803[\uDD24-\uDD27\uDD69-\uDD6D\uDEAB\uDEAC\uDEFA-\uDEFF\uDF46-\uDF50\uDF82-\uDF85]|\uD804[\uDC00-\uDC02\uDC38-\uDC46\uDC70\uDC73\uDC74\uDC7F-\uDC82\uDCB0-\uDCBA\uDCBD\uDCC2\uDCCD\uDD00-\uDD02\uDD27-\uDD34\uDD45\uDD46\uDD73\uDD80-\uDD82\uDDB3-\uDDC0\uDDC2\uDDC3\uDDC9-\uDDCC\uDDCE\uDDCF\uDE2C-\uDE37\uDE3E\uDE41\uDEDF-\uDEEA\uDF00-\uDF03\uDF3B\uDF3C\uDF3E-\uDF44\uDF47\uDF48\uDF4B-\uDF4D\uDF57\uDF62\uDF63\uDF66-\uDF6C\uDF70-\uDF74\uDFB8-\uDFC0\uDFC2\uDFC5\uDFC7-\uDFCA\uDFCC-\uDFD2\uDFE1\uDFE2]|\uD805[\uDC35-\uDC46\uDC5E\uDCB0-\uDCC3\uDDAF-\uDDB5\uDDB8-\uDDC0\uDDDC\uDDDD\uDE30-\uDE40\uDEAB-\uDEB7\uDF1D-\uDF1F\uDF22-\uDF2B]|\uD806[\uDC2C-\uDC3A\uDD30-\uDD35\uDD37\uDD38\uDD3B-\uDD43\uDDD1-\uDDD7\uDDDA-\uDDE0\uDDE4\uDE01-\uDE0A\uDE33-\uDE39\uDE3B-\uDE3E\uDE47\uDE51-\uDE5B\uDE84-\uDE99\uDF60-\uDF67]|\uD807[\uDC2F-\uDC36\uDC38-\uDC3F\uDC92-\uDCA7\uDCA9-\uDCB6\uDD31-\uDD36\uDD3A\uDD3C\uDD3D\uDD3F-\uDD47\uDD8A-\uDD8E\uDD90\uDD91\uDD93-\uDD97\uDEF3-\uDEF6\uDF00-\uDF03\uDF34-\uDF3A\uDF3E-\uDF42\uDF5A]|\uD80D[\uDC40\uDC47-\uDC55]|\uD818[\uDD1E-\uDD2F]|\uD81A[\uDEF0-\uDEF4\uDF30-\uDF36]|\uD81B[\uDD63\uDD67-\uDD6A\uDF4F\uDF51-\uDF87\uDF8F-\uDF92\uDFE4\uDFF0\uDFF1]|\uD82F[\uDC9D\uDC9E]|\uD833[\uDF00-\uDF2D\uDF30-\uDF46]|\uD834[\uDD65-\uDD69\uDD6D-\uDD72\uDD7B-\uDD82\uDD85-\uDD8B\uDDAA-\uDDAD\uDE42-\uDE44]|\uD836[\uDE00-\uDE36\uDE3B-\uDE6C\uDE75\uDE84\uDE9B-\uDE9F\uDEA1-\uDEAF]|\uD838[\uDC00-\uDC06\uDC08-\uDC18\uDC1B-\uDC21\uDC23\uDC24\uDC26-\uDC2A\uDC8F\uDD30-\uDD36\uDEAE\uDEEC-\uDEEF]|\uD839[\uDCEC-\uDCEF\uDDEE\uDDEF\uDEE3\uDEE6\uDEEE\uDEEF\uDEF5]|\uD83A[\uDCD0-\uDCD6\uDD44-\uDD4A]|\uD83C[\uDDE6-\uDDFF\uDFFB-\uDFFF]|\uDB40[\uDC20-\uDC7F\uDD00-\uDDEF]/.test(
2e))return[...e];x??=new Intl.Segmenter(void 0,{granularity:"grapheme"});let r=[];for(let{segment:n}of x.segment(e)){let e=r.length-1;e>=0&&(t=r[e],/(?:[\u1039\u17D2\u1A60\u1BAB\u200D\uAAF6]|\uD802\uDE3F|\uD804[\uDD33\uDFD0]|\uD806[\uDD3E\uDE47\uDE99]|\uD807[\uDD45\uDD97\uDF42])$/.test(t)||/^\p{gc=Mc}/u.test(n))?r[e]+=n:r.push(n)}return r}function u8(e){let t=e.codePointAt(0);return e.length>(t>65535?2:1)}let u7={"!":"ï¸","#":"ï¼",$:"ï¼","%":"ï¼
","&":"ï¼","(":"︵",")":"︶","*":"ï¼","+":"ï¼",",":"ï¸","-":"︲",".":"ã»","/":"ï¼",":":"ï¸",";":"ï¸","<":"︿","=":"ï¼",">":"ï¹","?":"ï¸","@":"ï¼ ","[":"ï¹","\\":"ï¼¼","]":"ï¹","^":"ï¼¾",_:"︳","`":"ï½","{":"︷","|":"â","}":"︸","~":"ï½","\xa2":"ï¿ ","\xa3":"ï¿¡","\xa5":"ï¿¥","\xa6":"¦","\xac":"ï¿¢","\xaf":"ï¿£","â":"︲","â":"︱","â":"ï¹","â":"ï¹","â":"ï¹","â":"ï¹","â¦":"ï¸","â¯":"ï¸","â§":"ã»","â©":"₩","ã":"ï¸","ã":"ï¸","ã":"︿","ã":"ï¹","ã":"︽","ã":"︾","ã":"ï¹","ã":"ï¹","ã":"ï¹","ã":"ï¹","ã":"︻","ã":"︼","ã":"︹","ã":"︺","ã":"ï¸","ã":"ï¸","ï¼":"ï¸","ï¼":"︵","ï¼":"︶","ï¼":"ï¸","ï¼":"︲","ï¼":"ã»","ï¼":"ï¸","ï¼":"ï¸","ï¼":"︿","ï¼":"ï¹","ï¼":"ï¸","ï¼»":"ï¹","ï¼½":"ï¹","_":"︳","ï½":"︷","ï½":"â","ï½":"︸","ï½":"︵","ï½ ":"︶","。":"ï¸","ï½¢":"ï¹","ï½£":"ï¹"},u9={10:!0,13:!0,32:!0,38:!0,41:!0,43:!0,45:!0,47:!0,173:!0,183:!0,8203:!0,8208:!0,8211:!0,8231:!0},he={40:!0};function ht(e,t,r,n,i,a){if("fontStack"in t){let n=r[t.fontStack],a=n?.[e];if(a)return a.metrics.advance*t.scale+i;let s=0;for(let r of e){let e=n?.[r];e&&(s+=e.metrics.advance*t.scale+i)}return s}{let e=n[t.imageName];return e?e.displaySize[0]*t.scale*24/a+i:0}}function hr(e,t,r,n){let i=(e-t)**2;return n?e<t?i/2:2*i:i+Math.abs(r)*r}function hn(e){return/^\s+$/u.test(e)}function hi(e,t,r,n,i,a){let s=null,o=hr(t,r,i,a);for(let e of n){let n=hr(t-e.x,r,i,a)+e.badness;n<=o&&(s=e,o=n)}return{index:e,x:t,priorBreak:s,badness:o}}var ha=class e{constructor(e="",t=[],r=[]){this.text=e,this.sections=t,this.sectionIndex=r,this.imageSectionID=null,this._graphemes=null}graphemes(){return this._graphemes??=u4(this.text),this._graphemes}static fromFeature(t,r){let n=new e;for(let e of t.sections)e.image?n.addImageSection(e):n.addTextSection(e,r);return n}length(){return this.graphemes().length}getSection(e){return this.sections[this.sectionIndex[e]]}getSectionIndex(e){return this.sectionIndex[e]}verticalizePunctuation(){this.text=function(e){let t="",r={premature:!0,value:void 0},n=e[Symbol.iterator](),i=n.next(),a=e[Symbol.iterator]();a.next();let s=a.next();for(;!i.done;)(s.done||!aj(s.value.codePointAt(0))||u7[s.value])&&(r.premature||!aj(r.value.codePointAt(0))||u7[r.value])&&u7[i.value]?t+=u7[i.value]:t+=i.value,r={value:i.value,premature:!1},i=n.next(),s=a.next();return t}(this.text),this._graphemes=null}hasZeroWidthSpaces(){return this.text.includes("â")}trim(){let e=this.graphemes(),t=0;for(;t<e.length&&hn(e[t]);)t++;let r=e.length;for(;r>t&&hn(e[r-1]);)r--;this.text=e.slice(t,r).join(""),this.sectionIndex=this.sectionIndex.slice(t,r),this._graphemes=null}substring(t,r){let n=this.graphemes().slice(t,r).join(""),i=this.sectionIndex.slice(t,r);return new e(n,this.sections,i)}toCodeUnitIndex(e){return this.graphemes().slice(0,e).join("").length}toString(){return this.text}getMaxScale(){return this.sectionIndex.reduce((e,t)=>Math.max(e,this.sections[t].scale),0)}getMaxImageSize(e){let t=0,r=0;for(let n=0;n<this.length();n++){let i=this.getSection(n);if("imageName"in i){let n=e[i.imageName];if(!n)continue;let a=n.displaySize;t=Math.max(t,a[0]),r=Math.max(r,a[1])}}return{maxImageWidth:t,maxImageHeight:r}}_appendSection(e,t){let r=this.graphemes(),n=r.length>0?r[r.length-1]:"",i=u4(n+e);this.text+=e,this._graphemes=r.slice(0,n?-1:void 0).concat(i);let a=i.length-!!n;for(let e=0;e<a;e++)this.sectionIndex.push(t)}addTextSection(e,t){this.sections.push({scale:e.scale||1,verticalAlign:e.verticalAlign||"bottom",fontStack:e.fontStack||t}),this._appendSection(e.text,this.sections.length-1)}
2addImageSection(e){let t=e.image?e.image.name:"";if(0===t.length)return void th("Can't add FormattedSection with an empty image.");let r=this.getNextImageSectionCharCode();r?(this.sections.push({scale:1,verticalAlign:e.verticalAlign||"bottom",imageName:t}),this._appendSection(String.fromCharCode(r),this.sections.length-1)):th("Reached maximum number of images 6401")}getNextImageSectionCharCode(){return this.imageSectionID?this.imageSectionID>=63743?null:++this.imageSectionID:(this.imageSectionID=57344,this.imageSectionID)}determineLineBreaks(e,t,r,n,i){let a=[],s=this.determineAverageLineWidth(e,t,r,n,i),o=this.hasZeroWidthSpaces(),l=this.graphemes(),u=null,h=0,c=0;for(let t=0;t<l.length;t++){let p=l[t];if(t>0){let e=l[t-1].codePointAt(0),r=p.codePointAt(0),n=/[\u02EA\u02EB\u2E80-\u2FDF\u2FF0-\u303F\u3041-\u3096\u309D-\u309F\u30A1-\u30FA\u30FD-\u30FF\u3105-\u312F\u31A0-\u4DBF\u4E00-\uA48C\uA490-\uA4C6\uF900-\uFA6D\uFA70-\uFAD9\uFE10-\uFE1F\uFE30-\uFE4F\uFF00-\uFFEF]|\uD81B[\uDFE0-\uDFFF]|[\uD81C-\uD822\uD840-\uD868\uD86A-\uD86D\uD86F-\uD872\uD874-\uD879\uD880-\uD883\uD885-\uD88C][\uDC00-\uDFFF]|\uD823[\uDC00-\uDCD5\uDCFF-\uDD1E\uDD80-\uDDF2]|\uD82B[\uDFF0-\uDFFF]|\uD82C[\uDC00-\uDEFB]|\uD83C[\uDE00-\uDEFF]|\uD869[\uDC00-\uDEDF\uDF00-\uDFFF]|\uD86E[\uDC00-\uDC1D\uDC20-\uDFFF]|\uD873[\uDC00-\uDEAD\uDEB0-\uDFFF]|\uD87A[\uDC00-\uDFE0\uDFF0-\uDFFF]|\uD87B[\uDC00-\uDE5D]|\uD87E[\uDC00-\uDE1D]|\uD884[\uDC00-\uDF4A\uDF50-\uDFFF]|\uD88D[\uDC00-\uDC79]/gim.test(String.fromCodePoint(e)),i=aO(e)&&aO(r);(u9[e]||n||"imageName"in this.getSection(t-1)||void 0!==l[t+1]&&he[r]||i&&(u??=function(e){let t=new Set;if(u6){for(let{index:r}of(v??=new Intl.Segmenter(void 0,{granularity:"word"})).segment(e))t.add(r);return t}let r=0;for(let n of e.split(/\b|(?=\p{Ideo})/u))t.add(r),r+=n.length;return t}(this.text)).has(c))&&a.push(hi(t,h,s,a,function(e,t,r){let n=0;return(10===e||13===e)&&(n-=1e4),r&&(n+=150),(40===e||65288===e)&&(n+=50),(41===t||65289===t)&&(n+=50),n}(e,r,n&&o),!1))}
2aR(p.codePointAt(0))||(h+=ht(p,this.getSection(t),r,n,e,i)),c+=p.length}return function e(t){return t?e(t.priorBreak).concat(t.index):[]}(hi(this.length(),h,s,a,0,!0))}determineAverageLineWidth(e,t,r,n,i){let a=0,s=0;for(let t of this.graphemes())a+=ht(t,this.getSection(s),r,n,e,i),s++;let o=Math.max(1,Math.ceil(a/t));return a/o}};let hs=typeof TextDecoder>"u"?null:new TextDecoder("utf-8");var ho=class{constructor(e){this.buf=ArrayBuffer.isView(e)?e:new Uint8Array(e),this.dataView=new DataView(this.buf.buffer,this.buf.byteOffset,this.buf.byteLength),this.pos=0,this.type=0,this._valueStart=-1,this.length=this.buf.length}readFields(e,t,r=this.length){let n;for(;n=this.nextField(r);)e(n,t,this);return t}readMessage(e,t){return this.readFields(e,t,this.readVarint()+this.pos)}readFixed32(){let e=this.dataView.getUint32(this.pos,!0);return this.pos+=4,e}readSFixed32(){let e=this.dataView.getInt32(this.pos,!0);return this.pos+=4,e}readFixed64(){let e=this.dataView.getUint32(this.pos,!0)+0x100000000*this.dataView.getUint32(this.pos+4,!0);return this.pos+=8,e}readSFixed64(){let e=this.dataView.getUint32(this.pos,!0)+0x100000000*this.dataView.getInt32(this.pos+4,!0);return this.pos+=8,e}readFloat(){let e=this.dataView.getFloat32(this.pos,!0);return this.pos+=4,e}readDouble(){let e=this.dataView.getFloat64(this.pos,!0);return this.pos+=8,e}readVarint(e){let t=this.buf,r=t[this.pos++];if(r<128)return r;let n=127&r,i;return n|=(127&(i=t[this.pos++]))<<7,i<128||(n|=(127&(i=t[this.pos++]))<<14,i<128)||(n|=(127&(i=t[this.pos++]))<<21,i<128)?n:function(e,t,r){let n=r.buf,i,a;if(i=(112&(a=n[r.pos++]))>>4,a<128||(i|=(127&(a=n[r.pos++]))<<3,a<128)||(i|=(127&(a=n[r.pos++]))<<10,a<128)||(i|=(127&(a=n[r.pos++]))<<17,a<128)||(i|=(127&(a=n[r.pos++]))<<24,a<128)||(i|=(1&(a=n[r.pos++]))<<31,a<128)){var s,o;return s=e,o=i,t?0x100000000*o+(s>>>0):(o>>>0)*0x100000000+(s>>>0)}throw Error("Expected varint not more than 10 bytes")}(n|=(15&(i=t[this.pos]))<<28,e,this)}readSVarint(){let e=this.readVarint();return e%2==1?-((e+1)/2):e/2}readBoolean(){return!!this.readVarint()}readString(){let e=this.readVarint()+this.pos,t=this.pos;return this.pos=e,e-t>=12&&hs?hs.decode(this.buf.subarray(t,e)):function(e,t,r){let n="",i=t;for(;i<r;){let t,a,s,o=e[i],l=null,u=o>239?4:o>223?3:o>191?2:1;if(i+u>r)break;1===u?o<128&&(l=o):2===u?(192&(t=e[i+1]))==128&&(l=(31&o)<<6|63&t)<=127&&(l=null):3===u?(t=e[i+1],a=e[i+2],(192&t)==128&&(192&a)==128&&((l=(15&o)<<12|(63&t)<<6|63&a)<=2047||l>=55296&&l<=57343)&&(l=null)):4===u&&(t=e[i+1],a=e[i+2],s=e[i+3],(192&t)==128&&(192&a)==128&&(192&s)==128&&((l=(15&o)<<18|(63&t)<<12|(63&a)<<6|63&s)<=65535||l>=1114112)&&(l=null)),null===l?(l=65533,u=1):l>65535&&(l-=65536,n+=String.fromCharCode(l>>>10&1023|55296),l=56320|1023&l),n+=String.fromCharCode(l),i+=u}return n}(this.buf,t,e)}readBytes(){let e=this.readVarint()+this.pos,t=this.buf.subarray(this.pos,e);return this.pos=e,t}readPackedVarint(e=[],t){let r=this.readPackedEnd();for(;this.pos<r;)e.push(this.readVarint(t));return e}readPackedSVarint(e=[]){let t=this.readPackedEnd();for(;this.pos<t;)e.push(this.readSVarint());return e}readPackedBoolean(e=[]){let t=this.readPackedEnd();for(;this.pos<t;)e.push(this.readBoolean());return e}readPackedFloat(e=[]){let t=this.readPackedEnd();for(;this.pos<t;)e.push(this.readFloat());return e}readPackedDouble(e=[]){let t=this.readPackedEnd();for(;this.pos<t;)e.push(this.readDouble());return e}readPackedFixed32(e=[]){let t=this.readPackedEnd();for(;this.pos<t;)e.push(this.readFixed32());return e}readPackedSFixed32(e=[]){let t=this.readPackedEnd();for(;this.pos<t;)e.push(this.readSFixed32());return e}readPackedFixed64(e=[]){let t=this.readPackedEnd();for(;this.pos<t;)e.push(this.readFixed64());return e}readPackedSFixed64(e=[]){let t=this.readPackedEnd();for(;this.pos<t;)e.push(this.readSFixed64());return e}readPackedEnd(){return 2===this.type?this.readVarint()+this.pos:this.pos+1}nextField(e=this.length){if(this.pos===this._valueStart&&this.skip(this.type),this.pos>=e)return 0;let t=this.readVarint();return this.type=7&t,this._valueStart=this.pos,t>>>3}skip(e){let t=7&e;if(0===t)for(;this.buf[this.pos++]>127;);else if(2===t)this.pos=this.readVarint()+this.pos;else if(5===t)this.pos+=4;else if(1===t)this.pos+=8;else throw Error(`Unimplemented type: ${t}`)}};function hl(e,t,r){1===e&&r.readMessage(hu,t)}function hu(e,t,r){if(3===e){let{id:e,bitmap:n,width:i,height:a,left:s,top:o,advance:l}=r.readMessage(hh,{});t.push({id:e,bitmap:new ls({width:i+6,height:a+6},n),metrics:{width:i,height:a,left:s,top:o,advance:l}})}}function hh(e,t,r){1===e?t.id=r.readVarint():2===e?t.bitmap=r.readBytes():3===e?t.width=r.readVarint():4===e?t.height=r.readVarint():5===e?t.left=r.readSVarint():6===e?t.top=r.readSVarint():7===e&&(t.advance=r.readVarint())}function hc(e){return new ho(e).readFields(hl,[])}function hp(e){return"function"==typeof e?.renderWithWebGL}function hf(e){let{userImage:t}=e;return!!t?.render&&!!t.render()&&(hp(t.data)||e.data.replace(new Uint8Array(t.data.buffer)),!0)}function hd(e){let t=0,r=0;for(let n of e)t+=n.w*n.h,r=Math.max(r,n.w);e.sort((e,t)=>
2t.h-e.h);let n=[{x:0,y:0,w:Math.max(Math.ceil(Math.sqrt(t/.95)),r),h:1/0}],i=0,a=0;for(let t of e)for(let e=n.length-1;e>=0;e--){let r=n[e];if(!(t.w>r.w||t.h>r.h)){if(t.x=r.x,t.y=r.y,a=Math.max(a,t.y+t.h),i=Math.max(i,t.x+t.w),t.w===r.w&&t.h===r.h){let t=n.pop();t&&e<n.length&&(n[e]=t)}else t.h===r.h?(r.x+=t.w,r.w-=t.w):(t.w===r.w||n.push({x:r.x+t.w,y:r.y,w:r.w-t.w,h:t.h}),r.y+=t.h,r.h-=t.h);break}}return{w:i,h:a,fill:t/(i*a)||0}}var hy=class{constructor(e,{pixelRatio:t,version:r,isWebGLImage:n=!1,stretchX:i,stretchY:a,content:s,textFitWidth:o,textFitHeight:l}){this.paddedRect=e,this.pixelRatio=t,this.stretchX=i,this.stretchY=a,this.content=s,this.version=r,this.needsFirstWebGLRender=n,this.textFitWidth=o,this.textFitHeight=l}get tl(){return[this.paddedRect.x+1,this.paddedRect.y+1]}get br(){return[this.paddedRect.x+this.paddedRect.w-1,this.paddedRect.y+this.paddedRect.h-1]}get tlbr(){return this.tl.concat(this.br)}get displaySize(){return[(this.paddedRect.w-2)/this.pixelRatio,(this.paddedRect.h-2)/this.pixelRatio]}},hm=class{constructor(e,t){let r={},n={};this.haveRenderCallbacks=[],this.patchedUpdateVersion=-1;let i=[];this.addImages(e,r,i),this.addImages(t,n,i);let{w:a,h:s}=hd(i),o=new lo({width:a||1,height:s||1});for(let t in e){let n=e[t];if(n.isWebGLImage)continue;let i=r[t].paddedRect;lo.copy(n.data,o,{x:0,y:0},{x:i.x+1,y:i.y+1},n.data)}for(let e in t){let r=t[e],i=n[e].paddedRect,a=i.x+1,s=i.y+1,l=r.data.width,u=r.data.height;lo.copy(r.data,o,{x:0,y:0},{x:a,y:s},r.data),lo.copy(r.data,o,{x:0,y:u-1},{x:a,y:s-1},{width:l,height:1}),lo.copy(r.data,o,{x:0,y:0},{x:a,y:s+u},{width:l,height:1}),lo.copy(r.data,o,{x:l-1,y:0},{x:a-1,y:s},{width:1,height:u}),lo.copy(r.data,o,{x:0,y:0},{x:a+l,y:s},{width:1,height:u})}this.image=o,this.iconPositions=r,this.patternPositions=n}addImages(e,t,r){for(let n in e){let i=e[n],a={x:0,y:0,w:i.data.width+2,h:i.data.height+2};r.push(a),t[n]=new hy(a,i),i.hasRenderCallback&&this.haveRenderCallbacks.push(n)}}patchUpdatedImages(e,t){if(e.dispatchRenderCallbacks(this.haveRenderCallbacks),this.patchedUpdateVersion!==e.updateVersion){for(let r in this.patchedUpdateVersion=e.updateVersion,this.iconPositions)this.patchUpdatedImage(this.iconPositions[r],e.getImage(r),t);for(let r in this.patternPositions)this.patchUpdatedImage(this.patternPositions[r],e.getImage(r),t)}}patchUpdatedImage(e,t,r){if(!e||!t||!e.needsFirstWebGLRender&&e.version===t.version)return;e.needsFirstWebGLRender=!1,e.version=t.version;let[n,i]=e.tl,a=t.userImage?.data;if(!hp(a))return void r.update(t.data,void 0,{x:n,y:i});let{width:s,height:o}=t.data;r.context.setCustomLayerDefaults(),a.renderWithWebGL({gl:r.context.gl,texture:r.texture,x:n,y:i,width:s,height:o}),r.context.setDirty()}};aI("ImagePosition",hy),aI("ImageAtlas",hm);var hg=((cE=hg||{})[cE.none=0]="none",cE[cE.horizontal=1]="horizontal",cE[cE.vertical=2]="vertical",cE[cE.horizontalOnly=3]="horizontalOnly",cE);let hx=/^\p{gc=M}$/u;function hv(e,t,r){let n=[...e],i=[],a=0;for(let e of n)i.push(a),a+=e.length;let s=function(e){let t=[],r=0;for(;r<e.length;){if(!hx.test(e[r])){t.push(r),r++;continue}let n=r;for(;n<e.length&&hx.test(e[n]);)n++;let i=e[n];if(void 0!==i&&aY(i.codePointAt(0))){t.push(n);for(let e=n-1;e>=r;e--)t.push(e);r=n+1}else{for(let e=r;e<n;e++)t.push(e);r=n}}return t}(n),o=new ha(s.map(e=>n[e]).join(""),t,[]),l=s.map(e=>r[i[e]]??0),u=0;for(let e of o.graphemes())o.sectionIndex.push(l[u]??0),u+=[...e].length;return o}function hb(e,t,r,n,i,a,s,o,l,u,h,c,p,f,d){let y=ha.fromFeature(e,i);2===c&&y.verticalizePunctuation();let m,g=y.determineLineBreaks(u,a,t,n,f),{processBidirectionalText:x,processStyledBidirectionalText:v}=aZ;if(x&&1===y.sections.length)for(let e of(m=[],g=g.map(e=>y.toCodeUnitIndex(e)),x(y.toString(),g)))m.push(hv(e,y.sections,[...e].map(()=>0)));else if(v){m=[],g=g.map(e=>y.toCodeUnitIndex(e));let e=function(e){let t=[],r=0;for(let n of e.graphemes())t.push(...Array(n.length).fill(e.sectionIndex[r])),r++;return t}(y);for(let t of v(y.text,e,g))m.push(hv(t[0],y.sections,t[1]))}else m=function(e,t){let r=[],n=0;for(let i of t)r.push(e.substring(n,i)),n=i;return n<e.length()&&r.push(e.substring(n,e.length())),r}(y,g);let b=[],w={positionedLines:b,text:y.toString(),top:h[1],bottom:h[1],left:h[0],right:h[0],writingMode:c,iconsInText:!1,verticalizable:!1};return function(e,t,r,n,i,a,s,o,l,u,h,c){let p=0,f=0,d=0,y=0,m="right"===o?1:.5*("left"!==o),g=24/c,x=0;for(let s of i){s.trim();let i=s.getMaxScale(),o={positionedGlyphs:[],lineOffset:0};e.positionedLines[x]=o;let c=o.positionedGlyphs,v=0;if(!s.length()){f+=a,++x;continue}let b=function(e,t,r){let n=24*t.getMaxScale(),{maxImageWidth:i,maxImageHeight:a}=t.getMaxImageSize(e),s=Math.max(n,a*r);return{verticalLineContentWidth:Math.max(n,i*r),horizontalLineContentHeight:s}}(n,s,g),w=2!==l||h?null:function(e){let t=e.graphemes().slice(),r=t.map(e=>e.codePointAt(0)),n=r.map(a$),i=t=>!n[t]&&!aR(r[t])&&!("imageName"in e.getSection(t));for(let e=0;e<r.length;e++){if(!i(e))continue;let t=e;for(;t+1<r.length&&i(t+1);)t++;if(function(e){let t=e.some(hA)&&e.every(e=>hA(e)||/[\p{P}\p{S}]/u.test(String.fromCodePoint(e))),r=e.length<=3&&e.every(e=>hD(e)||hA(e));return t||r}(r.slice(e,t+1)))for(let i=e;i<=t;i++){var a;n[i]=(hA(a=r[i])||hD(a))&&!aG(a)}e=t}return function(e,t){let r=!1;for(let n=0;n<e.length;n++){if(t[n])continue;let i=u7[e[n]];i&&(0===n||t[n-1])&&(n===e.length-1||t[n+1])&&(e[n]=i,t[n]=!0,r=!0)}return r}(t,n)&&(e.text=t.join(""),e._graphemes=null),n}(s),_=s.graphemes();for(let a=0;a<_.length;
2a++){let o=s.getSection(a),d=_[a],y=d.codePointAt(0),m=w?w[a]:!(1===l||!h&&!a$(y)||h&&(aR(y)||aG(y)));for(let l of"fontStack"in o&&u8(d)&&!t[o.fontStack]?.[d]?[...d]:[d]){let h={glyph:l.codePointAt(0),grapheme:l,imageName:null,x:p,y:f+-17,vertical:m,scale:1,fontStack:"",sectionIndex:s.getSectionIndex(a),metrics:null,rect:null},d;if("fontStack"in o){if(!(d=function(e,t,r,n,i,a){let s,o=function(e,t,r,n){if(e?.rect)return e;let i=t[r.fontStack]?.[n];return i?{rect:null,metrics:i.metrics}:null}(a[e.fontStack]?.[t],i,e,t);if(null===o)return null;if(r)s=n.verticalLineContentWidth-24*e.scale;else{let t=h_(e.verticalAlign);s=(n.horizontalLineContentHeight-24*e.scale)*t}return{rect:o.rect,metrics:o.metrics,baselineOffset:s}}(o,l,m,b,t,r)))continue;h.fontStack=o.fontStack}else{if(e.iconsInText=!0,o.scale*=g,!(d=function(e,t,r,n,i){let a=i[e.imageName];if(!a)return null;let s=a.paddedRect,o=a.displaySize,l={width:o[0],height:o[1],left:1,top:-3,advance:t?o[1]:o[0]},u;if(t)u=n.verticalLineContentWidth-o[1]*e.scale;else{let t=h_(e.verticalAlign);u=(n.horizontalLineContentHeight-o[1]*e.scale)*t}return{rect:s,metrics:l,baselineOffset:u,imageOffset:(t?o[0]:o[1])*e.scale-24*r}}(o,m,i,b,n)))continue;v=Math.max(v,d.imageOffset),h.imageName=o.imageName}let{rect:y,metrics:x,baselineOffset:w}=d;(h.y+=w,h.scale=o.scale,h.metrics=x,h.rect=y,c.push(h),m)?(e.verticalizable=!0,p+=("imageName"in o?x.advance:24)*o.scale+u):p+=x.advance*o.scale+u}}0!==c.length&&(d=Math.max(p-u,d),function(e,t,r){if(0===r)return;let n=e[t],i=n.metrics.advance*n.scale,a=(e[t].x+i)*r;for(let r=0;r<=t;r++)e[r].x-=a}(c,c.length-1,m)),p=0,o.lineOffset=Math.max(v,(i-1)*24);let A=a*i+v;f+=A,y=Math.max(A,y),++x}let{horizontalAlign:v,verticalAlign:b}=hw(s);(function(e,t,r,n,i,a,s,o,l){let u=(t-r)*i,h=0;for(let t of(h=a===s?-n*l*s+.5*s:-o*n- -17,e))for(let e of t.positionedGlyphs)e.x+=u,e.y+=h})(e.positionedLines,m,v,b,d,y,a,f,i.length),e.top+=-b*f,e.bottom=e.top+f,e.left+=-v*d,e.right=e.left+d}(w,t,r,n,m,s,o,l,c,u,p,d),!function(e){for(let t of e)if(0!==t.positionedGlyphs.length)return!1;return!0}(b)&&w}function hw(e){let t=.5,r=.5;switch(e){case"right":case"top-right":case"bottom-right":t=1;break;case"left":case"top-left":case"bottom-left":t=0}switch(e){case"bottom":case"bottom-right":case"bottom-left":r=1;break;case"top":case"top-right":case"top-left":r=0}return{horizontalAlign:t,verticalAlign:r}}function h_(e){switch(e){case"top":return 0;case"center":return .5;default:return 1}}function hA(e){return/\p{Nd}/u.test(String.fromCodePoint(e))}function hD(e){return/\p{Lu}/u.test(String.fromCodePoint(e))}function hS(e){let t=e.left,r=e.top,n=e.right-t,i=e.bottom-r,a=e.image.content[2]-e.image.content[0],s=e.image.content[3]-e.image.content[1],o=e.image.textFitWidth??"stretchOrShrink",l=e.image.textFitHeight??"stretchOrShrink",u=a/s;if("proportional"===l){if("stretchOnly"===o&&n/i<u||"proportional"===o){let e=Math.ceil(i*u);t*=e/n,n=e}}else if("proportional"===o&&"stretchOnly"===l&&0!==u&&n/i>u){let e=Math.ceil(n/u);r*=e/i,i=e}return{x1:t,y1:r,x2:t+n,y2:r+i}}function hE(e,t,r,n,i,a){let s=e.image,o;if(s.content){let e=s.content,t=s.pixelRatio||1;o=[e[0]/t,e[1]/t,s.displaySize[0]-e[2]/t,s.displaySize[1]-e[3]/t]}let l=t.left*a,u=t.right*a,h,c,p,f;"width"===r||"both"===r?(f=i[0]+l-n[3],c=i[0]+u+n[1]):c=(f=i[0]+(l+u-s.displaySize[0])/2)+s.displaySize[0];let d=t.top*a,y=t.bottom*a;return"height"===r||"both"===r?(h=i[1]+d-n[0],p=i[1]+y+n[2]):p=(h=i[1]+(d+y-s.displaySize[1])/2)+s.displaySize[1],{image:s,top:h,right:c,bottom:p,left:f,collisionPadding:o}}function hF(e,t){let{expression:r}=t;if("constant"===r.kind)return{kind:"constant",layoutSize:r.evaluate(new aW(e+1))};if("source"===r.kind)return{kind:"source"};if("composite"===r.kind){let{minZoom:t,maxZoom:n}=function(e,t){let r=0;for(;r<e.length&&e[r]<=t;)r++;let n=r=Math.max(0,r-1);for(;n<e.length&&e[n]<t+1;)n++;return n=Math.min(e.length-1,n),{minZoom:e[r],maxZoom:e[n]}}(r.zoomStops,e);return{kind:"composite",minZoom:t,maxZoom:n,interpolationType:r.interpolationType}}{var n;let t=(n=r).zoomStops.map(e=>n.evaluate(new aW(e===-1/0?n.zoomStops[1]-1:e))),i=r.evaluate(new aW(e+1));return{kind:"camera",zoomStops:r.zoomStops,sizes:t,layoutSize:i,interpolationType:r.interpolationType}}}function hk(e,{uSize:t,uSizeT:r},{lowerSize:n,upperSize:i}){return"source"===e.kind?n/128:"composite"===e.kind?r8.number(n/128,i/128,r):t}function hT(e,t){let r=0,n=0;return"constant"===e.kind?n=e.layoutSize:"camera"===e.kind?n=function({zoomStops:e,sizes:t,layoutSize:r,interpolationType:n},i){let a=e.length-1;for(;a>0&&e[a]>i;)a--;let s=Math.min(a+1,e.length-1),o=n?e4(r6.interpolationFactor(n,i,e[a],e[s]),0,1):0;return Math.min(r8.number(t[a],t[s],o),r)}(e,t):"composite"===e.kind&&(r=function({interpolationType:e,minZoom:t,maxZoom:r},n){return e?e4(r6.interpolationFactor(e,n,t,r),0,1):0}(e,t)),{uSizeT:r,uSize:n}}var hI=class e extends P{constructor(e,t,r,n){super(e,t),this.angle=r,void 0!==n&&(this.segment=n)}clone(){return new e(this.x,this.y,this.angle,this.segment)}};function hC(e,t,r,n,i){if(void 0===t.segment||0===r)return!0;let a=t,s=t.segment+1,o=0;for(;o>-r/2;){if(--s<0)return!1;o-=e[s].dist(a),a=e[s]}o+=e[s].dist(e[s+1]),s++;let l=[],u=0;for(;o<r/2;
vendor: 1,710 bytes, line 2
2){let t=e[s-1],r=e[s],a=e[s+1];if(!a)return!1;let h=t.angleTo(r)-r.angleTo(a);for(h=Math.abs((h+3*Math.PI)%(2*Math.PI)-Math.PI),l.push({distance:o,angleDelta:h}),u+=h;o-l[0].distance>n;)u-=l.shift().angleDelta;if(u>i)return!1;s++,o+=r.dist(a)}return!0}function hM(e){let t=0;for(let r=0;r<e.length-1;r++)t+=e[r].dist(e[r+1]);return t}function hB(e,t){return Math.max(e?e.right-e.left:0,t?t.right-t.left:0)}function hP(e,t,r,n,i){let a=[];for(let s of e){let e;for(let o=0;o<s.length-1;o++){let l=s[o],u=s[o+1];l.x<t&&u.x<t||(l.x<t?l=new P(t,l.y+(u.y-l.y)*((t-l.x)/(u.x-l.x)))._round():u.x<t&&(u=new P(t,l.y+(u.y-l.y)*((t-l.x)/(u.x-l.x)))._round()),!(l.y<r&&u.y<r)&&(l.y<r?l=new P(l.x+(u.x-l.x)*((r-l.y)/(u.y-l.y)),r)._round():u.y<r&&(u=new P(l.x+(u.x-l.x)*((r-l.y)/(u.y-l.y)),r)._round()),!(l.x>=n&&u.x>=n)&&(l.x>=n?l=new P(n,l.y+(u.y-l.y)*((n-l.x)/(u.x-l.x)))._round():u.x>=n&&(u=new P(n,l.y+(u.y-l.y)*((n-l.x)/(u.x-l.x)))._round()),l.y>=i&&u.y>=i||(l.y>=i?l=new P(l.x+(u.x-l.x)*((i-l.y)/(u.y-l.y)),i)._round():u.y>=i&&(u=new P(l.x+(u.x-l.x)*((i-l.y)/(u.y-l.y)),i)._round()),e&&l.equals(e[e.length-1])||(e=[l],a.push(e)),e.push(u)))))}}return a}function hz(e,t,r,n){let i=[],a=e.image,s=a.pixelRatio,o=a.paddedRect.w-2,l=a.paddedRect.h-2,u={x1:e.left,y1:e.top,x2:e.right,y2:e.bottom},h=a.stretchX||[[0,o]],c=a.stretchY||[[0,l]],p=(e,t)=>e+t[1]-t[0],f=h.reduce(p,0),d=c.reduce(p,0),y=o-f,m=l-d,g=0,x=f,v=0,b=d,w=0,_=y,A=0,D=m;if(a.content&&n){let t=a.content,r=t[2]-t[0],n=t[3]-t[1];(a.textFitWidth||a.textFitHeight)&&(u=hS(e)),g=hV(h,0,t[0]),v=hV(c,0,t[1]),x=hV(h,t[0],t[2]),b=hV(c,t[1],t[3]),w=t[0]-g,A=t[1]-v,_=r-x,D=n-b}let S=u.x1,E=u.y1,F=u.x2-S,k=u.y2-E,T=(e,n,i,o)=>{var l,u,h,c,p,y,m,T,I,C,M,B,z,V,L,$;
2let O=(l=e.stretch-g,l/x*F+S),R=(u=e.fixed-w,h=_,c=e.stretch,u-h*c/f),N=(p=n.stretch-v,p/b*k+E),U=(y=n.fixed-A,m=D,T=n.stretch,y-m*T/d),q=(I=i.stretch-g,I/x*F+S),j=(C=i.fixed-w,M=_,B=i.stretch,C-M*B/f),G=(z=o.stretch-v,z/b*k+E),X=(V=o.fixed-A,L=D,$=o.stretch,V-L*$/d),Y=new P(O,N),Z=new P(q,N),W=new P(q,G),H=new P(O,G),K=new P(R/s,U/s),J=new P(j/s,X/s),Q=t*Math.PI/180;if(Q){let e=Math.sin(Q),t=Math.cos(Q),r=[t,-e,e,t];Y._matMult(r),Z._matMult(r),H._matMult(r),W._matMult(r)}let ee=e.stretch+e.fixed,et=i.stretch+i.fixed,er=n.stretch+n.fixed,en=o.stretch+o.fixed;return{tl:Y,tr:Z,bl:H,br:W,tex:{x:a.paddedRect.x+1+ee,y:a.paddedRect.y+1+er,w:et-ee,h:en-er},writingMode:void 0,glyphOffset:[0,0],sectionIndex:0,pixelOffsetTL:K,pixelOffsetBR:J,minFontScaleX:_/s/F,minFontScaleY:D/s/k,isSDF:r}};if(n&&(a.stretchX||a.stretchY)){let e=hL(h,y,f),t=hL(c,m,d);for(let r=0;r<e.length-1;r++){let n=e[r],a=e[r+1];for(let e=0;e<t.length-1;e++){let r=t[e],s=t[e+1];i.push(T(n,r,a,s))}}}else i.push(T({fixed:0,stretch:-1},{fixed:0,stretch:-1},{fixed:0,stretch:o+1},{fixed:0,stretch:l+1}));return i}function hV(e,t,r){let n=0;for(let i of e)n+=Math.max(t,Math.min(r,i[1]))-Math.max(t,Math.min(r,i[0]));return n}function hL(e,t,r){let n=[{fixed:-1,stretch:0}];for(let[t,r]of e){let e=n[n.length-1];n.push({fixed:t-e.stretch,stretch:e.stretch}),n.push({fixed:t-e.stretch,stretch:e.stretch+(r-t)})}return n.push({fixed:t+1,stretch:r}),n}aI("Anchor",hI);var h$=class{constructor(e,t,r,n,i,a,s,o,l,u){if(this.boxStartIndex=e.length,l){let e=a.top,t=a.bottom,r=a.collisionPadding;r&&(e-=r[1],t+=r[3]);let n=t-e;n>0&&(n=Math.max(10,n),this.circleDiameter=n)}else{let l=a.image?.content&&(a.image.textFitWidth||a.image.textFitHeight)?hS(a):{x1:a.left,y1:a.top,x2:a.right,y2:a.bottom};l.y1=l.y1*s-o[0],l.y2=l.y2*s+o[2],l.x1=l.x1*s-o[3],l.x2=l.x2*s+o[1];let h=a.collisionPadding;if(h&&(l.x1-=h[0]*s,l.y1-=h[1]*s,l.x2+=h[2]*s,l.y2+=h[3]*s),u){let e=new P(l.x1,l.y1),t=new P(l.x2,l.y1),r=new P(l.x1,l.y2),n=new P(l.x2,l.y2),i=u*Math.PI/180;e._rotate(i),t._rotate(i),r._rotate(i),n._rotate(i),l.x1=Math.min(e.x,t.x,r.x,n.x),l.x2=Math.max(e.x,t.x,r.x,n.x),l.y1=Math.min(e.y,t.y,r.y,n.y),l.y2=Math.max(e.y,t.y,r.y,n.y)}e.emplaceBack(t.x,t.y,l.x1,l.y1,l.x2,l.y2,r,n,i)}this.boxEndIndex=e.length}},hO=class{constructor(e=[],t=(e,t)=>e<t?-1:+(e>t)){if(this.data=e,this.length=this.data.length,this.compare=t,this.length>0)for(let e=(this.length>>1)-1;e>=0;e--)this._down(e)}push(e){this.data.push(e),this._up(this.length++)}pop(){if(0===this.length)return;let e=this.data[0],t=this.data.pop();return--this.length>0&&(this.data[0]=t,this._down(0)),e}peek(){return this.data[0]}_up(e){let{data:t,compare:r}=this,n=t[e];for(;e>0;){let i=e-1>>1,a=t[i];if(r(n,a)>=0)break;t[e]=a,e=i}t[e]=n}_down(e){let{data:t,compare:r}=this,n=this.length>>1,i=t[e];for(;e<n;){let n=(e<<1)+1,a=n+1;if(a<this.length&&0>r(t[a],t[n])&&(n=a),r(t[n],i)>=0)break;t[e]=t[n],e=n}t[e]=i}};function hR(e,t){return t.max-e.max}var hN=class{constructor(e,t,r,n){this.p=new P(e,t),this.h=r,this.d=function(e,t){let r=!1,n=1/0;for(let i of t)for(let t=0,a=i.length,s=a-1;t<a;s=t++){let a=i[t],o=i[s];a.y>e.y!=o.y>e.y&&e.x<(o.x-a.x)*(e.y-a.y)/(o.y-a.y)+a.x&&(r=!r),n=Math.min(n,oH(e,a,o))}return(r?1:-1)*Math.sqrt(n)}(this.p,n),this.max=this.d+this.h*Math.SQRT2}};let hU=((cF={})[cF.center=1]="center",cF[cF.left=2]="left",cF[cF.right=3]="right",cF[cF.top=4]="top",cF[cF.bottom=5]="bottom",cF[cF["top-left"]=6]="top-left",cF[cF["top-right"]=7]="top-right",cF[cF["bottom-left"]=8]="bottom-left",cF[cF["bottom-right"]=9]="bottom-right",cF),hq=1/0;function hj(e,t){return t[1]===hq?function(e,t){let r=0,n=0;t<0&&(t=0);let i=t/Math.SQRT2;switch(e){case"top-right":case"top-left":n=i-7;break;case"bottom-right":case"bottom-left":n=-i+7;break;case"bottom":n=-t+7;break;case"top":n=t-7}switch(e){case"top-right":case"bottom-right":r=-i;break;case"top-left":case"bottom-left":r=i;break;case"left":r=t;break;case"right":r=-t}return[r,n]}(e,t[0]):function(e,t,r){let n=0,i=0;switch(t=Math.abs(t),r=Math.abs(r),e){case"top-right":case"top-left":case"top":i=r-7;break;case"bottom-right":case"bottom-left":case"bottom":i=-r+7}switch(e){case"top-right":case"bottom-right":case"right":n=-t;break;case"top-left":case"bottom-left":case"left":n=t}return[n,i]}(e,t[0],t[1])}function hG(e,t,r){let n=e.layout,i=n.get("text-variable-anchor-offset")?.evaluate(t,{},r);if(i){let e=i.values,t=[];for(let r=0;r<e.length;r+=2){let n=t[r]=e[r],i=e[r+1].map(e=>24*e);n.startsWith("top")?i[1]-=7:n.startsWith("bottom")&&(i[1]+=7),t[r+1]=i}return new rX(t)}let a=n.get("text-variable-anchor");if(a){let i;i=void 0===e._unevaluatedLayout.getValue("text-radial-offset")?n.get("text-offset").evaluate(t,{},r).map(e=>24*e):[24*n.get("text-radial-offset").evaluate(t,{},r),hq];let s=[];for(let e of a)s.push(e,hj(e,i));return new rX(s)}return null}function hX(e){switch(e){case"right":case"top-right":case"bottom-right":return"right";case"left":case"top-left":case"bottom-left":return"left"}return"center"}function hY(e,t,r,n,i,a,s,o,l,u,h,c,p,f,d,y){let m=function(e,t,r,n,i,a,s){let o=r.layout.get("text-rotate").evaluate(i,{})*Math.PI/180,l=[];for(let r of e.positionedLines)for(let i of r.positionedGlyphs){if(!i.rect)continue;let u=i.rect||{},h=4,c=!0,p=1,f=0,d=(n||s)&&i.vertical,y=i.metrics.advance*i.scale/2;if(s&&e.verticalizable){let e=(i.scale-1)*24,t=(24-i.metrics.width*i.scale)/2;f=r.lineOffset/2-(i.imageName?-t:e)}if(i.imageName){let e=a[i.imageName];c=e.sdf,h=1/(p=e.pixelRatio)}let m=n?[i.x+y,i.y]:[0,0],g=n?[0,0]:[i.x+y+t[0],i.y+t[1]-f],x=[0,0];d&&(x=g,g=[0,0]);let v=i.metrics.isDoubleResolution?2:1,b=(i.metrics.left-h)*i.scale-y+g[0],w=(-i.metrics.top-h)*i.scale+g[1],_=b+u.w/v*i.scale/p,A=w+u.h/v*i.scale/p,D=new P(b,w),S=new P(_,w),E=new P(b,A),F=new P(_,A);if(d){let e=new P(-y,y- -17),t=-Math.PI/2,r=12-y,n=i.imageName?r:0,a=new P(22-r,-n),s=new P(...x);
2D._rotateAround(t,e)._add(a)._add(s),S._rotateAround(t,e)._add(a)._add(s),E._rotateAround(t,e)._add(a)._add(s),F._rotateAround(t,e)._add(a)._add(s)}if(o){let e=Math.sin(o),t=Math.cos(o),r=[t,-e,e,t];D._matMult(r),S._matMult(r),E._matMult(r),F._matMult(r)}let k=new P(0,0),T=new P(0,0);l.push({tl:D,tr:S,bl:E,br:F,tex:u,writingMode:e.writingMode,glyphOffset:m,sectionIndex:i.sectionIndex,isSDF:c,pixelOffsetTL:k,pixelOffsetBR:T,minFontScaleX:0,minFontScaleY:0})}return l}(r,o,i,a,s,n,e.allowVerticalPlacement),g=e.textSizeData,x=null;for(let r of("source"===g.kind?(x=[128*i.layout.get("text-size").evaluate(s,{})])[0]>32640&&th(`${e.layerIds[0]}: Value for "text-size" is >= 255. Reduce your "text-size".`):"composite"===g.kind&&((x=[128*d.compositeTextSizes[0].evaluate(s,{},y),128*d.compositeTextSizes[1].evaluate(s,{},y)])[0]>32640||x[1]>32640)&&th(`${e.layerIds[0]}: Value for "text-size" is >= 255. Reduce your "text-size".`),e.addSymbols(e.text,m,x,o,a,s,h,t,u.lineStartIndex,u.lineLength,f,y,l),c))p[r]=e.text.placedSymbolArray.length-1;return 4*m.length}function hZ(e){for(let t in e)return e[t];return null}function hW(e,t,r){let n="never",i=e.get(t);return i?n=i:e.get(r)&&(n="always"),n}let hH=[{name:"a_fade_opacity",components:1,type:"Uint8",offset:0}];function hK(e,t,r,n,i,a,s,o,l,u,h,c,p,f){let d=o?Math.min(32640,Math.round(o[0])):0,y=o?Math.min(32640,Math.round(o[1])):0;e.emplaceBack(t,r,Math.round(32*n),Math.round(32*i),a,s,(d<<1)+ +!!l,y,16*u,16*h,256*c,256*p,f)}function hJ(e,t,r){e.emplaceBack(t.x,t.y,r),e.emplaceBack(t.x,t.y,r),e.emplaceBack(t.x,t.y,r),e.emplaceBack(t.x,t.y,r)}var hQ=class{constructor(e){this.layoutVertexArray=new s8,this.indexArray=new oi,this.programConfigurations=e,this.segments=new ou,this.dynamicLayoutVertexArray=new s7,this.opacityVertexArray=new s9,this.hasVisibleVertices=!1,this.placedSymbolArray=new sU}isEmpty(){return 0===this.layoutVertexArray.length&&0===this.indexArray.length&&0===this.dynamicLayoutVertexArray.length&&0===this.opacityVertexArray.length}upload(e,t,r,n){this.isEmpty()||(r&&(this.layoutVertexBuffer=e.createVertexBuffer(this.layoutVertexArray,u0.members),this.indexBuffer=e.createIndexBuffer(this.indexArray,t),this.dynamicLayoutVertexBuffer=e.createVertexBuffer(this.dynamicLayoutVertexArray,u1.members,!0),this.opacityVertexBuffer=e.createVertexBuffer(this.opacityVertexArray,hH,!0),this.opacityVertexBuffer.itemSize=1),(r||n)&&this.programConfigurations.upload(e))}destroy(){this.layoutVertexBuffer&&(this.layoutVertexBuffer.destroy(),this.indexBuffer.destroy(),this.programConfigurations.destroy(),this.segments.destroy(),this.dynamicLayoutVertexBuffer.destroy(),this.opacityVertexBuffer.destroy())}};aI("SymbolBuffers",hQ);var h0=class{constructor(e,t,r){this.layoutVertexArray=new e,this.layoutAttributes=t,this.indexArray=new r,this.segments=new ou,this.collisionVertexArray=new or}upload(e){this.layoutVertexBuffer=e.createVertexBuffer(this.layoutVertexArray,this.layoutAttributes),this.indexBuffer=e.createIndexBuffer(this.indexArray),this.collisionVertexBuffer=e.createVertexBuffer(this.collisionVertexArray,u2.members,!0)}destroy(){this.layoutVertexBuffer&&(this.layoutVertexBuffer.destroy(),this.indexBuffer.destroy(),this.segments.destroy(),this.collisionVertexBuffer.destroy())}};aI("CollisionBuffers",h0);var h1=class{constructor(e){this.collisionBoxArray=e.collisionBoxArray,this.zoom=e.zoom,this.overscaling=e.overscaling,this.layers=e.layers,this.layerIds=this.layers.map(e=>e.id),this.index=e.index,this.pixelRatio=e.pixelRatio,this.sourceLayerIndex=e.sourceLayerIndex,this.hasDependencies=!0,this.hasRTLText=!1,this.maxHeightOffset=0,this.sortKeyRanges=[],this.collisionCircleArray=[],this.maxGlyphs=65535;let t=this.layers[0]._unevaluatedLayout._values;this.textSizeData=hF(this.zoom,t["text-size"]),this.iconSizeData=hF(this.zoom,t["icon-size"]);let r=this.layers[0].layout,n=r.get("symbol-sort-key"),i=r.get("symbol-z-order");this.canOverlap="never"!==hW(r,"text-overlap","text-allow-overlap")||"never"!==hW(r,"icon-overlap","icon-allow-overlap")||r.get("text-ignore-placement")||r.get("icon-ignore-placement"),this.sortFeaturesByKey="viewport-y"!==i&&!n.isConstant();let a="viewport-y"===i||"auto"===i&&!this.sortFeaturesByKey;this.sortFeaturesByY=a&&this.canOverlap,"point"===r.get("symbol-placement")&&(this.writingModes=r.get("text-writing-mode").map(e=>hg[e])),this.stateDependentLayerIds=this.layers.filter(e=>e.isStateDependent()).map(e=>e.id),this.sourceID=e.sourceID}createArrays(){this.text=new hQ(new oO(this.layers,this.zoom,e=>e.startsWith("text"))),this.icon=new hQ(new oO(this.layers,this.zoom,e=>e.startsWith("icon"))),this.glyphOffsetArray=new sG,this.lineVertexArray=new sX,this.symbolInstances=new sj,this.textAnchorOffsets=new sZ}calculateGlyphDependencies(e,t,r,n,i){let a=(n||this.allowVerticalPlacement)&&i,s=ha.fromFeature(e,r),o=s.graphemes();for(let e=0;e<o.length;e++){let r=s.getSection(e);if("imageName"in r)continue;let n=t[r.fontStack]||={},i=o[e];for(let e of(u8(i)&&(n[i]=!0),i)){if(n[e]=!0,!a)continue;let t=u7[e];t&&(n[t]=!0)}}}populate(e,t,r){let n=this.layers[0],i=n.layout,a=i.get("text-font"),s=i.get("text-field"),o=i.get("icon-image"),l=("constant"!==s.value.kind||s.value.value instanceof rR&&!s.value.value.isEmpty()||s.value.value.toString().length>0)&&("constant"!==a.value.kind||a.value.value.length>0),u="constant"!==o.value.kind||!!o.value.value||Object.keys(o.parameters).length>0,h=i.get("symbol-sort-key");if(this.features=[],!l&&!u)return;let c=t.iconDependencies,p=t.glyphDependencies,f=t.availableImages,d=new aW(this.zoom);for(let{feature:t,id:s,index:o,sourceLayerIndex:y}of e){let e,m,g=n._featureFilter.needGeometry,x=oq(t,g);if(!n._featureFilter.filter(d,x,r))continue;if(g||(x.geometry=oU(t)),l){let t=n.getValueAndResolveTokens("text-field",x,r,f),i=rR.factory(t);this.hasRTLText||=function(e){for(let t of e.sections)if(function(e){for(let t of e)if(aY(t.codePointAt(0)))return!0;return!1}(t.text))return!0;return!1}(i),(!this.hasRTLText||"unavailable"===aZ.getRTLTextPluginStatus()||this.hasRTLText&&aZ.isParsed())&&(e=function(e,t,r){for(let n of e.sections)n.text=function(e,t,r){let n=t.layout.get("text-transform").evaluate(r,{});return"uppercase"===n?e=e.toLocaleUpperCase():"lowercase"===n&&(e=e.toLocaleLowerCase()),aZ.applyArabicShaping&&(e=aZ.applyArabicShaping(e)),e}(n.text,t,r);return e}(i,n,x))}if(u){let e=n.getValueAndResolveTokens("icon-image",x,r,f);m=e instanceof rY?e:rY.fromString(e)}if(!e&&!m)continue;let v=this.sortFeaturesByKey?h.evaluate(x,{},r):void 0,b={id:s,text:e,icon:m,index:o,sourceLayerIndex:y,geometry:x.geometry,properties:t.properties,type:up.types[t.type],sortKey:v};if(this.features.push(b),m&&(c[m.name]=!0),e){let t=a.evaluate(x,{},r).join(","),n="viewport"!==i.get("text-rotation-alignment")&&"point"!==i.get("symbol-placement");this.allowVerticalPlacement=this.writingModes?.includes(2);let s=aN(e.toString());for(let r of(this.calculateGlyphDependencies(e,p,t,n,s),e.sections))r.image&&(c[r.image.name]=!0)}}"line"===i.get("symbol-placement")&&(this.features=function(e){let t={},r={},n=[],i=0;function a(t){n.push(e[t]),i++}function s(e,t,i){let a=r[e];return delete r[e],r[t]=a,n[a].geometry[0].pop(),n[a].geometry[0]=n[a].geometry[0].concat(i[0]),a}function o(e,r,i){let a=t[r];return delete t[r],t[e]=a,n[a].geometry[0].shift(),n[a].geometry[0]=i[0].concat(n[a].geometry[0]),a}function l(e,t,r){let n=r?t[0][t[0].length-1]:t[0][0];return`${e}:${n.x}:${n.y}`}for(let u=0;u<e.length;
vendor: 16,143 bytes, line 2
2u++){let h=e[u],c=h.geometry,p=h.text?h.text.toString():null;if(!p){a(u);continue}let f=l(p,c),d=l(p,c,!0);if(f in r&&d in t&&r[f]!==t[d]){let e=o(f,d,c),i=s(f,d,n[e].geometry);delete t[f],delete r[d],r[l(p,n[i].geometry,!0)]=i,n[e].geometry=null}else f in r?s(f,d,c):d in t?o(f,d,c):(a(u),t[f]=i-1,r[d]=i-1)}return n.filter(e=>e.geometry)}(this.features)),this.sortFeaturesByKey&&this.features.sort((e,t)=>e.sortKey-t.sortKey)}update(e,t,r){this.stateDependentLayers.length&&(this.text.programConfigurations.updatePaintArrays(e,t,this.layers,{imagePositions:r}),this.icon.programConfigurations.updatePaintArrays(e,t,this.layers,{imagePositions:r}))}addFeatures({options:e,canonical:t,glyphMap:r,glyphPositions:n,iconMap:i,iconPositions:a,showCollisionBoxes:s}){!function(e){e.bucket.createArrays();let t=512*e.bucket.overscaling;e.bucket.tilePixelRatio=e$/t,e.bucket.compareText={},e.bucket.iconsNeedLinear=!1;let r=e.bucket.layers[0],n=r.layout,i=r._unevaluatedLayout._values,a={layoutIconSize:i["icon-size"].possiblyEvaluate(new aW(e.bucket.zoom+1),e.canonical),layoutTextSize:i["text-size"].possiblyEvaluate(new aW(e.bucket.zoom+1),e.canonical),textMaxSize:i["text-size"].possiblyEvaluate(new aW(18))};if("composite"===e.bucket.textSizeData.kind){let{minZoom:t,maxZoom:r}=e.bucket.textSizeData;a.compositeTextSizes=[i["text-size"].possiblyEvaluate(new aW(t),e.canonical),i["text-size"].possiblyEvaluate(new aW(r),e.canonical)]}if("composite"===e.bucket.iconSizeData.kind){let{minZoom:t,maxZoom:r}=e.bucket.iconSizeData;a.compositeIconSizes=[i["icon-size"].possiblyEvaluate(new aW(t),e.canonical),i["icon-size"].possiblyEvaluate(new aW(r),e.canonical)]}let s=24*n.get("text-line-height"),o="viewport"!==n.get("text-rotation-alignment")&&"point"!==n.get("symbol-placement"),l=n.get("text-keep-upright"),u=n.get("text-size");for(let t of e.bucket.features){let i=n.get("text-font").evaluate(t,{},e.canonical).join(","),h=u.evaluate(t,{},e.canonical),c=a.layoutTextSize.evaluate(t,{},e.canonical),p=a.layoutIconSize.evaluate(t,{},e.canonical),f={horizontal:{},vertical:void 0},d=t.text,y=[0,0];if(d){let a=d.toString(),u=24*n.get("text-letter-spacing").evaluate(t,{},e.canonical),p=!function(e){for(let r of e){var t;if(t=r.codePointAt(0),aq.test(String.fromCodePoint(t)))return!1}return!0}(a)?0:u,m=n.get("text-anchor").evaluate(t,{},e.canonical),g=hG(r,t,e.canonical);if(!g){let r=n.get("text-radial-offset").evaluate(t,{},e.canonical);y=r?hj(m,[24*r,hq]):n.get("text-offset").evaluate(t,{},e.canonical).map(e=>24*e)}let x=o?"center":n.get("text-justify").evaluate(t,{},e.canonical),v="point"===n.get("symbol-placement")?24*n.get("text-max-width").evaluate(t,{},e.canonical):1/0,b=()=>{e.bucket.allowVerticalPlacement&&aN(a)&&(f.vertical=hb(d,e.glyphMap,e.glyphPositions,e.imagePositions,i,v,s,m,"left",p,y,2,!0,c,h))};if(!o&&g){let t=new Set;if("auto"===x)for(let e=0;e<g.values.length;e+=2)t.add(hX(g.values[e]));else t.add(x);let r=!1;for(let n of t)if(!f.horizontal[n])if(r)f.horizontal[n]=f.horizontal[0];else{let t=hb(d,e.glyphMap,e.glyphPositions,e.imagePositions,i,v,s,"center",n,p,y,1,!1,c,h);t&&(f.horizontal[n]=t,r=1===t.positionedLines.length)}b()}else{"auto"===x&&(x=hX(m));let t=hb(d,e.glyphMap,e.glyphPositions,e.imagePositions,i,v,s,m,x,p,y,1,!1,c,h);t&&(f.horizontal[x]=t),b(),aN(a)&&o&&l&&(f.vertical=hb(d,e.glyphMap,e.glyphPositions,e.imagePositions,i,v,s,m,x,p,y,2,!1,c,h))}}let m,g=!1;if(t.icon?.name){let r=e.imageMap[t.icon.name];r&&(m=function(e,t,r){let{horizontalAlign:n,verticalAlign:i}=hw(r),a=t[0],s=t[1],o=a-e.displaySize[0]*n,l=o+e.displaySize[0],u=s-e.displaySize[1]*i;return{image:e,top:u,bottom:u+e.displaySize[1],left:o,right:l}}(e.imagePositions[t.icon.name],n.get("icon-offset").evaluate(t,{},e.canonical),n.get("icon-anchor").evaluate(t,{},e.canonical)),g=!!r.sdf,void 0===e.bucket.sdfIcons?e.bucket.sdfIcons=g:e.bucket.sdfIcons!==g&&th("Style sheet warning: Cannot mix SDF and non-SDF icons in one buffer"),r.pixelRatio===e.bucket.pixelRatio?0!==n.get("icon-rotate").constantOr(1)&&(e.bucket.iconsNeedLinear=!0):e.bucket.iconsNeedLinear=!0)}let x=hZ(f.horizontal)||f.vertical;e.bucket.iconsInText||=!!x&&x.iconsInText,(x||m)&&function(e,t,r,n,i,a,s,o,l,u,h,c){let p=a.textMaxSize.evaluate(t,{});void 0===p&&(p=s);let f=e.layers[0].layout,d=f.get("icon-offset").evaluate(t,{},h),y=hZ(r.horizontal),m=s/24,g=e.tilePixelRatio*m,x=e.tilePixelRatio*p/24,v=e.tilePixelRatio*o,b=e.tilePixelRatio*f.get("symbol-spacing"),w=f.get("text-padding")*e.tilePixelRatio,_=function(e,t,r,n=1){let i=e.get("icon-padding").evaluate(t,{},r)?.values;return[i[0]*n,i[1]*n,i[2]*n,i[3]*n]}(f,t,h,e.tilePixelRatio),A=f.get("text-max-angle")/180*Math.PI,D="viewport"!==f.get("text-rotation-alignment")&&"point"!==f.get("symbol-placement"),S="map"===f.get("icon-rotation-alignment").constantOr("viewport")&&"point"!==f.get("symbol-placement"),E=f.get("symbol-placement"),F=b/2,k=f.get("icon-text-fit"),T;n&&"none"!==k&&(e.allowVerticalPlacement&&r.vertical&&(T=hE(n,r.vertical,k,f.get("icon-text-fit-padding"),d,m)),y&&(n=hE(n,y,k,f.get("icon-text-fit-padding"),d,m)));let I=h?c.line.getGranularityForZoomLevel(h.z):1,C=(o,c)=>{c.x<0||c.x>=8192||c.y<0||c.y>=8192||function(e,t,r,n,i,a,s,o,l,u,h,c,p,f,d,y,m,g,x,v,b,w,_,A,D){let S=e.addToLineVertexArray(t,r),E=o.layout.get("symbol-height-offset").evaluate(b,{},A);E>e.maxHeightOffset&&(e.maxHeightOffset=E);let F,k,T,I,C=0,M=0,B=0,P=0,z=-1,V=-1,L={},$=(0,oy.default)("");if(e.allowVerticalPlacement&&n.vertical){let e=o.layout.get("text-rotate").evaluate(b,{},A)+90;T=new h$(l,t,u,h,c,n.vertical,p,f,d,e),s&&(I=new h$(l,t,u,h,c,s,m,g,d,e))}if(i){let r=o.layout.get("icon-rotate").evaluate(b,{}),n="none"!==o.layout.get("icon-text-fit"),a=hz(i,r,_,n),p=s?hz(s,r,_,n):void 0;k=new h$(l,t,u,h,c,i,m,g,!1,r),C=4*a.length;let f=e.iconSizeData,d=null;"source"===f.kind?(d=[128*o.layout.get("icon-size").evaluate(b,{})])[0]>32640&&th(`${e.layerIds[0]}: Value for "icon-size" is >= 255. Reduce your "icon-size".`):"composite"===f.kind&&((d=[128*w.compositeIconSizes[0].evaluate(b,{},A),128*w.compositeIconSizes[1].evaluate(b,{},A)])[0]>32640||d[1]>32640)&&th(`${e.layerIds[0]}: Value for "icon-size" is >= 255. Reduce your "icon-size".`),e.addSymbols(e.icon,a,d,v,x,b,0,t,S.lineStartIndex,S.lineLength,-1,A,E),z=e.icon.placedSymbolArray.length-1,p&&(M=4*p.length,e.addSymbols(e.icon,p,d,v,x,b,2,t,S.lineStartIndex,S.lineLength,-1,A,E),V=e.icon.placedSymbolArray.length-1)}let O=Object.keys(n.horizontal);for(let r of O){let i=n.horizontal[r];F||=($=(0,oy.default)(i.text),new h$(l,t,u,h,c,i,p,f,d,o.layout.get("text-rotate").evaluate(b,{},A)));let s=1===i.positionedLines.length;if(B+=hY(e,t,i,a,o,d,b,y,E,S,n.vertical?1:3,s?O:[r],L,z,w,A),s)break}n.vertical&&(P+=hY(e,t,n.vertical,a,o,d,b,y,E,S,2,["vertical"],L,V,w,A));let R=F?F.boxStartIndex:e.collisionBoxArray.length,N=F?F.boxEndIndex:e.collisionBoxArray.length,U=T?T.boxStartIndex:e.collisionBoxArray.length,q=T?T.boxEndIndex:e.collisionBoxArray.length,j=k?k.boxStartIndex:e.collisionBoxArray.length,G=k?k.boxEndIndex:e.collisionBoxArray.length,X=I?I.boxStartIndex:e.collisionBoxArray.length,Y=I?I.boxEndIndex:e.collisionBoxArray.length,Z=-1,W=(e,t)=>e?.circleDiameter?Math.max(e.circleDiameter,t):t;Z=W(F,-1),Z=W(T,Z),Z=W(k,Z);let H=+((Z=W(I,Z))>-1);H&&(Z*=D/24),e.glyphOffsetArray.length>=e.maxGlyphs&&th("Too many glyphs being rendered in a tile. See https://github.com/mapbox/mapbox-gl-js/issues/2907"),void 0!==b.sortKey&&e.addToSortKeyRanges(e.symbolInstances.length,b.sortKey);let K=hG(o,b,A),[J,Q]=function(e,t){let r=e.length,n=t?.values;if(n?.length>0)for(let t=0;t<n.length;t+=2){let r=hU[n[t]],i=n[t+1];e.emplaceBack(r,i[0],i[1])}return[r,e.length]}(e.textAnchorOffsets,K);e.symbolInstances.emplaceBack(t.x,t.y,L.right>=0?L.right:-1,L.center>=0?L.center:-1,L.left>=0?L.left:-1,L.vertical||-1,z,V,$,R,N,U,q,j,G,X,Y,u,B,P,C,M,H,0,p,Z,J,Q,E)}(e,c,o,r,n,i,T,e.layers[0],e.collisionBoxArray,t.index,t.sourceLayerIndex,e.index,g,[w,w,w,w],D,l,v,_,S,d,t,a,u,h,s)};if("line"===E)for(let i of hP(t.geometry,0,0,e$,e$)){let t=l7(i,I);for(let i of function(e,t,r,n,i,a,s,o){let l=n?.6*24*a:0,u=hB(n,i),h=u*a,c=0===e[0].x||e[0].x===o||0===e[0].y||e[0].y===o;return t-h<t/4&&(t=h+t/4),function e(t,r,n,i,a,s,o,l,u){let h=s/2,c=hM(t),p=0,f=r-n,d=[];for(let e=0;e<t.length-1;e++){let r=t[e],o=t[e+1],l=r.dist(o),y=o.angleTo(r);for(;f+n<p+l;){let m=((f+=n)-p)/l,g=r8.number(r.x,o.x,m),x=r8.number(r.y,o.y,m);if(g>=0&&g<u&&x>=0&&x<u&&f-h>=0&&f+h<=c){let r=new hI(g,x,y,e);r._round(),(!i||hC(t,r,s,i,a))&&d.push(r)}}p+=l}return l||d.length||o||(d=e(t,p/2,n,i,a,s,o,!0,u)),d}(e,c?t/2*s%t:(u/2+48)*a*s%t,t,l,r,h,c,!1,o)}(t,b,A,r.vertical||y,n,x,e.overscaling,e$))y&&function(e,t,r,n){let i=e.compareText;if(t in i){let e=i[t];for(let t=e.length-1;t>=0;t--)if(n.dist(e[t])<r)return!0}else i[t]=[];return i[t].push(n),!1}(e,y.text,F,i)||C(t,i)}else if("line-center"===E){for(let e of t.geometry)if(e.length>1){let t=l7(e,I),i=function(e,t,r,n,i){let a=r?.6*24*i:0,s=hB(r,n)*i,o=0,l=hM(e)/2;for(let r=0;r<e.length-1;r++){let n=e[r],i=e[r+1],u=n.dist(i);if(o+u>l){let h=(l-o)/u,c=new hI(r8.number(n.x,i.x,h),r8.number(n.y,i.y,h),i.angleTo(n),r);return c._round(),!a||hC(e,c,s,a,t)?c:void 0}o+=u}}(t,A,r.vertical||y,n,x);i&&C(t,i)}}else if("Polygon"===t.type)for(let e of ne(t.geometry,0)){let t=function(e,t=1){let r=ul.fromPoints(e[0]),n=Math.min(r.width(),r.height()),i=n/2,a=new hO([],hR),{minX:s,minY:o,maxX:l,maxY:u}=r;if(0===n)return new P(s,o);for(let t=s;t<l;t+=n)for(let r=o;r<u;r+=n)a.push(new hN(t+i,r+i,i,e));let h=function(e){let t=0,r=0,n=0,i=e[0];for(let e=0,a=i.length,s=a-1;e<a;s=e++){let a=i[e],o=i[s],l=a.x*o.y-o.x*a.y;r+=(a.x+o.x)*l,n+=(a.y+o.y)*l,t+=3*l}return new hN(r/t,n/t,0,e)}(e),c=h;for(;a.length;){let r=a.pop();(r.d>c.d||!c.d)&&(c=r),r.max-c.d<=t||(i=r.h/2,a.push(new hN(r.p.x-i,r.p.y-i,i,e)),a.push(new hN(r.p.x+i,r.p.y-i,i,e)),a.push(new hN(r.p.x-i,r.p.y+i,i,e)),a.push(new hN(r.p.x+i,r.p.y+i,i,e)))}return h.d>0&&c.d-h.d<=t?h.p:c.p}(e,16);C(l7(e[0],I,!0),new hI(t.x,t.y,0))}else if("LineString"===t.type)for(let e of t.geometry){let t=l7(e,I);C(t,new hI(t[0].x,t[0].y,0))}else if("Point"===t.type)for(let e of t.geometry)for(let t of e)C([t],new hI(t.x,t.y,0))}(e.bucket,t,f,m,e.imageMap,a,c,p,y,g,e.canonical,e.subdivisionGranularity)}e.showCollisionBoxes&&e.bucket.generateCollisionDebugBuffers()}({bucket:this,glyphMap:r,glyphPositions:n,imageMap:i,imagePositions:a,showCollisionBoxes:s,canonical:t,subdivisionGranularity:e.subdivisionGranularity})}isEmpty(){return 0===this.symbolInstances.length&&!this.hasRTLText}uploadPending(){return!this.uploaded||this.text.programConfigurations.needsUpload||this.icon.programConfigurations.needsUpload}upload(e){!this.uploaded&&this.hasDebugData()&&(this.textCollisionBox.upload(e),this.iconCollisionBox.upload(e)),this.text.upload(e,this.sortFeaturesByY,!this.uploaded,this.text.programConfigurations.needsUpload),this.icon.upload(e,this.sortFeaturesByY,!this.uploaded,this.icon.programConfigurations.needsUpload),this.uploaded=!0}destroyDebugData(){this.textCollisionBox.destroy(),this.iconCollisionBox.destroy()}destroy(){this.text.destroy(),this.icon.destroy(),this.hasDebugData()&&this.destroyDebugData()}addToLineVertexArray(e,t){let r=this.lineVertexArray.length;if(void 0!==e.segment){let r=e.dist(t[e.segment+1]),n=e.dist(t[e.segment]),i={};for(let n=e.segment+1;n<t.length;n++)i[n]={x:t[n].x,y:t[n].y,tileUnitDistanceFromAnchor:r},n<t.length-1&&(r+=t[n+1].dist(t[n]));for(let r=e.segment||0;r>=0;r--)i[r]={x:t[r].x,y:t[r].y,tileUnitDistanceFromAnchor:n},r>0&&(n+=t[r-1].dist(t[r]));for(let e=0;e<t.length;e++){let t=i[e];this.lineVertexArray.emplaceBack(t.x,t.y,t.tileUnitDistanceFromAnchor)}}return{lineStartIndex:r,lineLength:this.lineVertexArray.length-r}}addSymbols(e,t,r,n,i,a,s,o,l,u,h,c,p){let f=e.indexArray,d=e.layoutVertexArray,y=e.segments.prepareSegment(4*t.length,d,f,this.canOverlap?a.sortKey:void 0),m=this.glyphOffsetArray.length,g=y.vertexLength,x=this.allowVerticalPlacement&&2===s?Math.PI/2:0,v=a.text&&a.text.sections;for(let n=0;n<t.length;n++){let{tl:i,tr:s,bl:l,br:u,tex:h,pixelOffsetTL:m,pixelOffsetBR:g,minFontScaleX:b,minFontScaleY:w,glyphOffset:_,isSDF:A,sectionIndex:D}=t[n],S=y.vertexLength,E=_[1];hK(d,o.x,o.y,i.x,E+i.y,h.x,h.y,r,A,m.x,m.y,b,w,p),hK(d,o.x,o.y,s.x,E+s.y,h.x+h.w,h.y,r,A,g.x,m.y,b,w,p),hK(d,o.x,o.y,l.x,E+l.y,h.x,h.y+h.h,r,A,m.x,g.y,b,w,p),hK(d,o.x,o.y,u.x,E+u.y,h.x+h.w,h.y+h.h,r,A,g.x,g.y,b,w,p),hJ(e.dynamicLayoutVertexArray,o,x),f.emplaceBack(S,S+2,S+1),f.emplaceBack(S+1,S+2,S+3),y.vertexLength+=4,y.primitiveLength+=2,this.glyphOffsetArray.emplaceBack(_[0]),(n===t.length-1||D!==t[n+1].sectionIndex)&&e.programConfigurations.populatePaintArrays(d.length,a,a.index,{imagePositions:{},canonical:c,formattedSection:v?.[D]})}e.placedSymbolArray.emplaceBack(o.x,o.y,m,this.glyphOffsetArray.length-m,g,l,u,o.segment,r?r[0]:0,r?r[1]:0,n[0],n[1],s,0,!1,0,h,p)}_addCollisionDebugVertex(e,t,r,n,i,a){return t.emplaceBack(0,0),e.emplaceBack(r.x,r.y,n,i,Math.round(a.x),Math.round(a.y))}addCollisionDebugVertices(e,t,r,n,i,a,s){let o=i.segments.prepareSegment(4,i.layoutVertexArray,i.indexArray),l=o.vertexLength,u=i.layoutVertexArray,h=i.collisionVertexArray,c=s.anchorX,p=s.anchorY;this._addCollisionDebugVertex(u,h,a,c,p,new P(e,t)),this._addCollisionDebugVertex(u,h,a,c,p,new P(r,t)),this._addCollisionDebugVertex(u,h,a,c,p,new P(r,n)),this._addCollisionDebugVertex(u,h,a,c,p,new P(e,n)),o.vertexLength+=4;let f=i.indexArray;f.emplaceBack(l,l+1),f.emplaceBack(l+1,l+2),f.emplaceBack(l+2,l+3),f.emplaceBack(l+3,l),o.primitiveLength+=4}addDebugCollisionBoxes(e,t,r,n){for(let i=e;i<t;i++){let e=this.collisionBoxArray.get(i),t=e.x1,a=e.y1,s=e.x2,o=e.y2;this.addCollisionDebugVertices(t,a,s,o,n?this.textCollisionBox:this.iconCollisionBox,e.anchorPoint,r)}}generateCollisionDebugBuffers(){this.hasDebugData()&&this.destroyDebugData(),this.textCollisionBox=new h0(oe,u3.members,oa),this.iconCollisionBox=new h0(oe,u3.members,oa);for(let e=0;e<this.symbolInstances.length;e++){let t=this.symbolInstances.get(e);this.addDebugCollisionBoxes(t.textBoxStartIndex,t.textBoxEndIndex,t,!0),this.addDebugCollisionBoxes(t.verticalTextBoxStartIndex,t.verticalTextBoxEndIndex,t,!0),this.addDebugCollisionBoxes(t.iconBoxStartIndex,t.iconBoxEndIndex,t,!1),this.addDebugCollisionBoxes(t.verticalIconBoxStartIndex,t.verticalIconBoxEndIndex,t,!1)}}_deserializeCollisionBoxesForSymbol(e,t,r,n,i,a,s,o,l){let u={};for(let n=t;n<r;n++){let t=e.get(n);u.textBox={x1:t.x1,y1:t.y1,x2:t.x2,y2:t.y2,anchorPointX:t.anchorPointX,anchorPointY:t.anchorPointY},u.textFeatureIndex=t.featureIndex;break}for(let t=n;t<i;t++){let r=e.get(t);u.verticalTextBox={x1:r.x1,y1:r.y1,x2:r.x2,y2:r.y2,anchorPointX:r.anchorPointX,anchorPointY:r.anchorPointY},u.verticalTextFeatureIndex=r.featureIndex;break}for(let t=a;t<s;t++){let r=e.get(t);u.iconBox={x1:r.x1,y1:r.y1,x2:r.x2,y2:r.y2,anchorPointX:r.anchorPointX,anchorPointY:r.anchorPointY},u.iconFeatureIndex=r.featureIndex;break}for(let t=o;t<l;t++){let r=e.get(t);u.verticalIconBox={x1:r.x1,y1:r.y1,x2:r.x2,y2:r.y2,anchorPointX:r.anchorPointX,anchorPointY:r.anchorPointY},u.verticalIconFeatureIndex=r.featureIndex;break}return u}deserializeCollisionBoxes(e){this.collisionArrays=[];for(let t=0;t<this.symbolInstances.length;t++){let r=this.symbolInstances.get(t);this.collisionArrays.push(this._deserializeCollisionBoxesForSymbol(e,r.textBoxStartIndex,r.textBoxEndIndex,r.verticalTextBoxStartIndex,r.verticalTextBoxEndIndex,r.iconBoxStartIndex,r.iconBoxEndIndex,r.verticalIconBoxStartIndex,r.verticalIconBoxEndIndex))}}hasTextData(){return this.text.segments.get().length>0}hasIconData(){return this.icon.segments.get().length>0}hasDebugData(){return this.textCollisionBox&&this.iconCollisionBox}hasTextCollisionBoxData(){return this.hasDebugData()&&this.textCollisionBox.segments.get().length>0}hasIconCollisionBoxData(){return this.hasDebugData()&&this.iconCollisionBox.segments.get().length>0}addIndicesForPlacedSymbol(e,t){let r=e.placedSymbolArray.get(t),n=r.vertexStartIndex+4*r.numGlyphs;for(let t=r.vertexStartIndex;t<n;t+=4)e.indexArray.emplaceBack(t,t+2,t+1),e.indexArray.emplaceBack(t+1,t+2,t+3)}
vendor: 7,620 bytes, line 2
2getSortedSymbolIndexes(e){if(this.sortedAngle===e&&void 0!==this.symbolInstanceIndexes)return this.symbolInstanceIndexes;let t=Math.sin(e),r=Math.cos(e),n=[],i=[],a=[];for(let e=0;e<this.symbolInstances.length;++e){a.push(e);let s=this.symbolInstances.get(e);n.push(0|Math.round(t*s.anchorX+r*s.anchorY)),i.push(s.featureIndex)}return a.sort((e,t)=>n[e]-n[t]||i[t]-i[e]),a}addToSortKeyRanges(e,t){let r=this.sortKeyRanges[this.sortKeyRanges.length-1];r?.sortKey===t?r.symbolInstanceEnd=e+1:this.sortKeyRanges.push({sortKey:t,symbolInstanceStart:e,symbolInstanceEnd:e+1})}sortFeatures(e){if(this.sortFeaturesByY&&this.sortedAngle!==e&&!(this.text.segments.get().length>1||this.icon.segments.get().length>1)){for(let t of(this.symbolInstanceIndexes=this.getSortedSymbolIndexes(e),this.sortedAngle=e,this.text.indexArray.clear(),this.icon.indexArray.clear(),this.featureSortOrder=[],this.symbolInstanceIndexes)){let e=this.symbolInstances.get(t);this.featureSortOrder.push(e.featureIndex);let r=[e.rightJustifiedTextSymbolIndex,e.centerJustifiedTextSymbolIndex,e.leftJustifiedTextSymbolIndex];for(let e=0;e<r.length;e++){let t=r[e];t>=0&&r.indexOf(t)===e&&this.addIndicesForPlacedSymbol(this.text,t)}e.verticalPlacedTextSymbolIndex>=0&&this.addIndicesForPlacedSymbol(this.text,e.verticalPlacedTextSymbolIndex),e.placedIconSymbolIndex>=0&&this.addIndicesForPlacedSymbol(this.icon,e.placedIconSymbolIndex),e.verticalPlacedIconSymbolIndex>=0&&this.addIndicesForPlacedSymbol(this.icon,e.verticalPlacedIconSymbolIndex)}this.text.indexBuffer&&this.text.indexBuffer.updateData(this.text.indexArray),this.icon.indexBuffer&&this.icon.indexBuffer.updateData(this.icon.indexArray)}}};aI("SymbolBucket",h1,{omit:["layers","collisionBoxArray","features","compareText"]});var h2={get paint(){return w||=new sn({"icon-opacity":new a9(t2.paint_symbol["icon-opacity"],"icon-opacity"),"icon-color":new a9(t2.paint_symbol["icon-color"],"icon-color"),"icon-halo-color":new a9(t2.paint_symbol["icon-halo-color"],"icon-halo-color"),"icon-halo-width":new a9(t2.paint_symbol["icon-halo-width"],"icon-halo-width"),"icon-halo-blur":new a9(t2.paint_symbol["icon-halo-blur"],"icon-halo-blur"),"icon-translate":new a7(t2.paint_symbol["icon-translate"],"icon-translate"),"icon-translate-anchor":new a7(t2.paint_symbol["icon-translate-anchor"],"icon-translate-anchor"),"text-opacity":new a9(t2.paint_symbol["text-opacity"],"text-opacity"),"text-color":new a9(t2.paint_symbol["text-color"],"text-color",{runtimeType:t9,getOverride:e=>e.textColor,hasOverride:e=>!!e.textColor}),"text-halo-color":new a9(t2.paint_symbol["text-halo-color"],"text-halo-color"),"text-halo-width":new a9(t2.paint_symbol["text-halo-width"],"text-halo-width"),"text-halo-blur":new a9(t2.paint_symbol["text-halo-blur"],"text-halo-blur"),"text-translate":new a7(t2.paint_symbol["text-translate"],"text-translate"),"text-translate-anchor":new a7(t2.paint_symbol["text-translate-anchor"],"text-translate-anchor")})},get layout(){return b||=new sn({"symbol-placement":new a7(t2.layout_symbol["symbol-placement"],"symbol-placement"),"symbol-spacing":new a7(t2.layout_symbol["symbol-spacing"],"symbol-spacing"),"symbol-avoid-edges":new a7(t2.layout_symbol["symbol-avoid-edges"],"symbol-avoid-edges"),"symbol-sort-key":new a9(t2.layout_symbol["symbol-sort-key"],"symbol-sort-key"),"symbol-z-order":new a7(t2.layout_symbol["symbol-z-order"],"symbol-z-order"),"icon-allow-overlap":new a7(t2.layout_symbol["icon-allow-overlap"],"icon-allow-overlap"),"icon-overlap":new a7(t2.layout_symbol["icon-overlap"],"icon-overlap"),"icon-ignore-placement":new a7(t2.layout_symbol["icon-ignore-placement"],"icon-ignore-placement"),"icon-optional":new a7(t2.layout_symbol["icon-optional"],"icon-optional"),"icon-rotation-alignment":new a9(t2.layout_symbol["icon-rotation-alignment"],"icon-rotation-alignment"),"icon-size":new a9(t2.layout_symbol["icon-size"],"icon-size"),"icon-text-fit":new a7(t2.layout_symbol["icon-text-fit"],"icon-text-fit"),"icon-text-fit-padding":new a7(t2.layout_symbol["icon-text-fit-padding"],"icon-text-fit-padding"),"icon-image":new a9(t2.layout_symbol["icon-image"],"icon-image"),"icon-rotate":new a9(t2.layout_symbol["icon-rotate"],"icon-rotate"),"icon-padding":new a9(t2.layout_symbol["icon-padding"],"icon-padding"),"icon-keep-upright":new a7(t2.layout_symbol["icon-keep-upright"],"icon-keep-upright"),"icon-offset":new a9(t2.layout_symbol["icon-offset"],"icon-offset"),"icon-anchor":new a9(t2.layout_symbol["icon-anchor"],"icon-anchor"),"icon-pitch-alignment":new a7(t2.layout_symbol["icon-pitch-alignment"],"icon-pitch-alignment"),"text-pitch-alignment":new a7(t2.layout_symbol["text-pitch-alignment"],"text-pitch-alignment"),"text-rotation-alignment":new a7(t2.layout_symbol["text-rotation-alignment"],"text-rotation-alignment"),"text-field":new a9(t2.layout_symbol["text-field"],"text-field"),"text-font":new a9(t2.layout_symbol["text-font"],"text-font"),"text-size":new a9(t2.layout_symbol["text-size"],"text-size"),"text-max-width":new a9(t2.layout_symbol["text-max-width"],"text-max-width"),"text-line-height":new a7(t2.layout_symbol["text-line-height"],"text-line-height"),"text-letter-spacing":new a9(t2.layout_symbol["text-letter-spacing"],"text-letter-spacing"),"text-justify":new a9(t2.layout_symbol["text-justify"],"text-justify"),"text-radial-offset":new a9(t2.layout_symbol["text-radial-offset"],"text-radial-offset"),"text-variable-anchor":new a7(t2.layout_symbol["text-variable-anchor"],"text-variable-anchor"),"text-variable-anchor-offset":new a9(t2.layout_symbol["text-variable-anchor-offset"],"text-variable-anchor-offset"),"text-anchor":new a9(t2.layout_symbol["text-anchor"],"text-anchor"),"text-max-angle":new a7(t2.layout_symbol["text-max-angle"],"text-max-angle"),"text-writing-mode":new a7(t2.layout_symbol["text-writing-mode"],"text-writing-mode"),"text-rotate":new a9(t2.layout_symbol["text-rotate"],"text-rotate"),"text-padding":new a7(t2.layout_symbol["text-padding"],"text-padding"),"text-keep-upright":new a7(t2.layout_symbol["text-keep-upright"],"text-keep-upright"),"text-transform":new a9(t2.layout_symbol["text-transform"],"text-transform"),"text-offset":new a9(t2.layout_symbol["text-offset"],"text-offset"),"text-allow-overlap":new a7(t2.layout_symbol["text-allow-overlap"],"text-allow-overlap"),"text-overlap":new a7(t2.layout_symbol["text-overlap"],"text-overlap"),"text-ignore-placement":new a7(t2.layout_symbol["text-ignore-placement"],"text-ignore-placement"),"text-optional":new a7(t2.layout_symbol["text-optional"],"text-optional"),"symbol-height-offset":new a9(t2.layout_symbol["symbol-height-offset"],"symbol-height-offset"),"symbol-height-anchor":new a7(t2.layout_symbol["symbol-height-anchor"],"symbol-height-anchor")})}},h3=class{constructor(e){if(void 0===e.property.overrides)throw Error("overrides must be provided to instantiate FormatSectionOverride class");this.type=e.property.overrides?e.property.overrides.runtimeType:t6,this.defaultValue=e}evaluate(e){if(e.formattedSection){let t=this.defaultValue.property.overrides;if(t?.hasOverride(e.formattedSection))return t.getOverride(e.formattedSection)}return e.feature&&e.featureState?this.defaultValue.evaluate(e.feature,e.featureState):this.defaultValue.property.specification.default}eachChild(e){this.defaultValue.isConstant()||e(this.defaultValue.value._styleExpression.expression)}outputDefined(){return!1}serialize(){return null}};aI("FormatSectionOverride",h3,{omit:["defaultValue"]});let h5=e=>"symbol"===e.type;var h6=class e extends ss{constructor(e,t){super(e,h2,t)}recalculate(e,t){super.recalculate(e,t);let r=this.layout.get("icon-rotation-alignment");
2if(("constant"!==r.value.kind||"auto"===r.value.value)&&(this.layout._values["icon-rotation-alignment"]=new a5(r.property,{kind:"constant",value:"point"===this.layout.get("symbol-placement")?"viewport":"map"},r.parameters)),"auto"===this.layout.get("text-rotation-alignment")&&("point"===this.layout.get("symbol-placement")?this.layout._values["text-rotation-alignment"]="viewport":this.layout._values["text-rotation-alignment"]="map"),"auto"===this.layout.get("text-pitch-alignment")&&(this.layout._values["text-pitch-alignment"]="map"===this.layout.get("text-rotation-alignment")?"map":"viewport"),"auto"===this.layout.get("icon-pitch-alignment")&&(this.layout._values["icon-pitch-alignment"]=this.layout.get("icon-rotation-alignment").constantOr("viewport")),"point"===this.layout.get("symbol-placement")){let e=this.layout.get("text-writing-mode");if(e){let t=[];for(let r of e)t.includes(r)||t.push(r);this.layout._values["text-writing-mode"]=t}else this.layout._values["text-writing-mode"]=["horizontal"]}this._setPaintOverrides()}getValueAndResolveTokens(e,t,r,n){var i;let a=this.layout.get(e).evaluate(t,{},r,n),s=this._unevaluatedLayout._values[e];return s.isDataDriven()||iC(s.value)||!a?a:(i=t.properties,a.replace(/{([^{}]+)}/g,(e,t)=>i&&t in i?String(i[t]):""))}createBucket(e){return new h1(e)}queryRadius(){return 0}queryIntersectsFeature(){throw Error("Should take a different path in FeatureIndex")}_setPaintOverrides(){for(let t of h2.paint.overridableProperties){if(!e.hasPaintOverride(this.layout,t))continue;let r=this.paint.get(t),n=new ik(new h3(r),`layers[${this.id}].paint.${r.property.name}`,r.property.specification),i=null;i="constant"===r.value.kind||"source"===r.value.kind?new iB("source",n):new iP("composite",n,r.value.zoomStops),this.paint._values[t]=new a5(r.property,i,r.parameters)}}_handleOverridablePaintPropertyUpdate(t,r,n){return!(!this.layout||r.isDataDriven()||n.isDataDriven())&&e.hasPaintOverride(this.layout,t)}static hasPaintOverride(e,t){let r=e.get("text-field"),n=h2.paint.properties[t],i=!1,a=e=>{for(let t of e)if(n.overrides?.hasOverride(t)){i=!0;return}};if("constant"===r.value.kind&&r.value.value instanceof rR)a(r.value.value.sections);else if("source"===r.value.kind||"composite"===r.value.kind){let e=t=>{i||(t instanceof r0&&rJ(t.value)===ri?a(t.value.sections):t instanceof r7?a(t.sections):t.eachChild(e))},t=r.value;t._styleExpression&&e(t._styleExpression.expression)}return i}},h4={get paint(){return _||=new sn({"background-color":new a7(t2.paint_background["background-color"],"background-color"),"background-pattern":new st(t2.paint_background["background-pattern"],"background-pattern"),"background-opacity":new a7(t2.paint_background["background-opacity"],"background-opacity")})}};let h8=e=>"background"===e.type;var h7=class extends ss{constructor(e,t){super(e,h4,t)}};function h9(e){let t=[],r=e.id;return void 0===r&&t.push(new t5(`layers.${r}`,null,'missing required property "id"')),void 0===e.render&&t.push(new t5(`layers.${r}`,null,'missing required method "render"')),e.renderingMode&&"2d"!==e.renderingMode&&"3d"!==e.renderingMode&&t.push(new t5(`layers.${r}`,null,'property "renderingMode" must be either "2d" or "3d"')),t}let ce=e=>"custom"===e.type;var ct=class extends ss{constructor(e,t){super(e,{},t),this.onAdd=e=>{this.implementation.onAdd&&this.implementation.onAdd(e,e.painter.context.gl)},this.onRemove=e=>{this.implementation.onRemove&&this.implementation.onRemove(e,e.painter.context.gl)},this.implementation=e}is3D(){return"3d"===this.implementation.renderingMode}hasOffscreenPass(){return void 0!==this.implementation.prerender}recalculate(){}updateTransitions(){}hasTransition(){return!1}serialize(){throw Error("Custom layers cannot be serialized")}};function cr(e,t){if("custom"===e.type)return new ct(e,t);switch(e.type){case"background":return new h7(e,t);case"circle":return new le(e,t);case"color-relief":return new lw(e,t);case"fill":return new ui(e,t);case"fill-extrusion":return new uN(e,t);case"heatmap":return new lp(e,t);case"hillshade":return new ly(e,t);case"line":return new uQ(e,t);case"raster":return new su(e,t);case"symbol":return new h6(e,t)}}var cn=class{constructor(e){this._methodToThrottle=e,this._triggered=!1,this._channel=new MessageChannel,this._channel.port2.onmessage=()=>{this._triggered=!1,this._methodToThrottle()}}trigger(){this._triggered||(this._triggered=!0,this._channel?.port1.postMessage(!0))}remove(){delete this._channel,this._methodToThrottle=()=>{}}};let ci={once:!0};var ca=class{constructor(e,t){this.target=e,this.mapId=t,this.resolveRejects={},this.tasks={},this.taskQueue=[],this.abortControllers={},this.messageHandlers={},this.invoker=new cn(()=>this.process()),this.subscription=t_(this.target,"message",e=>this.receive(e),!1),this.globalScope=td(self)?e:window}registerMessageHandler(e,t){this.messageHandlers[e]=t}unregisterMessageHandler(e){delete this.messageHandlers[e]}sendAsync(e,t){return new Promise((r,n)=>{let i=Math.round(1e18*Math.random()).toString(36).substring(0,10),a=t?t_(t.signal,"abort",()=>{a?.unsubscribe(),delete this.resolveRejects[i];let r={id:i,type:"<cancel>",origin:location.origin,targetMapId:e.targetMapId,sourceMapId:this.mapId};this.target.postMessage(r),n(new tV(t.signal.reason))},ci):null;this.resolveRejects[i]={resolve:e=>{a?.unsubscribe(),r(e)},reject:e=>{a?.unsubscribe(),n(e)}};let s=[],o={...e,id:i,sourceMapId:this.mapId,origin:location.origin,data:aP(e.data,s)};this.target.postMessage(o,{transfer:s})})}receive(e){let t=e.data,r=t.id,n=["file://","resource://android","null"],i=[t.origin,location.origin],a=t.origin===location.origin,s=i.some(e=>n.includes(e));if((a||s)&&!(t.targetMapId&&this.mapId!==t.targetMapId)){if("<cancel>"===t.type){delete this.tasks[r];let e=this.abortControllers[r];delete this.abortControllers[r],e&&e.abort();return}if(td(self)||t.mustQueue){this.tasks[r]=t,this.taskQueue.push(r),this.invoker.trigger();return}this.processTask(r,t)}}process(){if(0===this.taskQueue.length)return;let e=this.taskQueue.shift(),t=this.tasks[e];delete this.tasks[e],this.taskQueue.length>0&&this.invoker.trigger(),t&&this.processTask(e,t)}async processTask(e,t){if("<response>"===t.type){let r=this.resolveRejects[e];if(delete this.resolveRejects[e],!r)return;t.error?r.reject(eR(az(t.error))):r.resolve(az(t.data));return}if(!this.messageHandlers[t.type])return void this.completeTask(e,null,null);let r=az(t.data),n=new AbortController;this.abortControllers[e]=n;try{let i=await this.messageHandlers[t.type](t.sourceMapId,r,n);this.completeTask(e,null,i)}catch(t){this.completeTask(e,eR(t))}}completeTask(e,t,r){let n=[];delete this.abortControllers[e];let i={id:e,type:"<response>",sourceMapId:this.mapId,origin:location.origin,error:t?aP(t):null,data:aP(r,n)};this.target.postMessage(i,{transfer:n})}remove(){this.invoker.remove(),this.subscription.unsubscribe()}};function cs(e,t){let{x:r,y:n}=uE.fromLngLat(t);return!(e<0||e>25||n<0||n>=1||r<0||r>=1)}var co=class{constructor(e,t,r){if(!function(e,t,r){return!(e<0||e>25||r<0||r>=2**e||t<0||t>=2**e)}(e,t,r))throw Error(`x=${t}, y=${r}, z=${e} outside of bounds. 0<=x<${2**e}, 0<=y<${2**e} 0<=z<=25 `);this.z=e,this.x=t,this.y=r,this.key=ch(0,e,e,t,r)}equals(e){return this.z===e.z&&this.x===e.x&&this.y===e.y}url(e,t,r){var n,i,a;let s,o,l=(n=this.x,i=this.y,a=this.z,s=cp(256*n,256*(i=2**a-i-1),a),o=cp((n+1)*256,(i+1)*256,a),`${s[0]},${s[1]},${o[0]},${o[1]}`),u=function(e,t,r){let n="";for(let i=e;i>0;i--){let e=1<<i-1;n+=(t&e?1:0)+(r&e?2:0)}return n}(this.z,this.x,this.y);return e[(this.x+this.y)%e.length].replace(/{prefix}/g,(this.x%16).toString(16)+(this.y%16).toString(16)).replace(/{z}/g,String(this.z)).replace(/{x}/g,String(this.x)).replace(/{y}
2/g,String("tms"===r?2**this.z-this.y-1:this.y)).replace(/{ratio}/g,t>1?"@2x":"").replace(/{quadkey}/g,u).replace(/{bbox-epsg-3857}/g,l)}isChildOf(e){let t=this.z-e.z;return t>0&&e.x===this.x>>t&&e.y===this.y>>t}getTilePoint(e){let t=2**this.z;return new P((e.x*t-this.x)*e$,(e.y*t-this.y)*e$)}toString(){return`${this.z}/${this.x}/${this.y}`}},cl=class{constructor(e,t){this.wrap=e,this.canonical=t,this.key=ch(e,t.z,t.z,t.x,t.y)}},cu=class e{constructor(e,t,r,n,i){if(this.terrainRttPosMatrix32f=null,e<r)throw Error(`overscaledZ should be >= z; overscaledZ = ${e}; z = ${r}`);this.overscaledZ=e,this.wrap=t,this.canonical=new co(r,+n,+i),this.key=ch(t,e,r,n,i)}clone(){return new e(this.overscaledZ,this.wrap,this.canonical.z,this.canonical.x,this.canonical.y)}equals(e){return this.overscaledZ===e.overscaledZ&&this.wrap===e.wrap&&this.canonical.equals(e.canonical)}scaledTo(t){if(t>this.overscaledZ)throw Error(`targetZ > this.overscaledZ; targetZ = ${t}; overscaledZ = ${this.overscaledZ}`);let r=this.canonical.z-t;return t>this.canonical.z?new e(t,this.wrap,this.canonical.z,this.canonical.x,this.canonical.y):new e(t,this.wrap,t,this.canonical.x>>r,this.canonical.y>>r)}isOverscaled(){return this.overscaledZ>this.canonical.z}calculateScaledKey(e,t){if(e>this.overscaledZ)throw Error(`targetZ > this.overscaledZ; targetZ = ${e}; overscaledZ = ${this.overscaledZ}`);let r=this.canonical.z-e;return e>this.canonical.z?ch(this.wrap*t,e,this.canonical.z,this.canonical.x,this.canonical.y):ch(this.wrap*t,e,e,this.canonical.x>>r,this.canonical.y>>r)}isChildOf(e){if(e.wrap!==this.wrap||this.overscaledZ-e.overscaledZ<=0)return!1;if(0===e.overscaledZ)return this.overscaledZ>0;let t=this.canonical.z-e.canonical.z;return!(t<0)&&e.canonical.x===this.canonical.x>>t&&e.canonical.y===this.canonical.y>>t}children(t){if(this.overscaledZ>=t)return[new e(this.overscaledZ+1,this.wrap,this.canonical.z,this.canonical.x,this.canonical.y)];let r=this.canonical.z+1,n=2*this.canonical.x,i=2*this.canonical.y;return[new e(r,this.wrap,r,n,i),new e(r,this.wrap,r,n+1,i),new e(r,this.wrap,r,n,i+1),new e(r,this.wrap,r,n+1,i+1)]}isLessThan(e){return this.wrap<e.wrap||!(this.wrap>e.wrap)&&(this.overscaledZ<e.overscaledZ||!(this.overscaledZ>e.overscaledZ)&&(this.canonical.x<e.canonical.x||!(this.canonical.x>e.canonical.x)&&this.canonical.y<e.canonical.y))}wrapped(){return new e(this.overscaledZ,0,this.canonical.z,this.canonical.x,this.canonical.y)}unwrapTo(t){return new e(this.overscaledZ,t,this.canonical.z,this.canonical.x,this.canonical.y)}overscaleFactor(){return 2**(this.overscaledZ-this.canonical.z)}toUnwrapped(){return new cl(this.wrap,this.canonical)}toString(){return`${this.overscaledZ}/${this.canonical.x}/${this.canonical.y}`}getTilePoint(e){return this.canonical.getTilePoint(new uE(e.x-this.wrap,e.y))}normalizeCoordinates(t,r,n=e$){if(t>=0&&t<n&&r>=0&&r<n)return{tileID:this,x:t,y:r};let i=Math.floor(t/n),a=Math.floor(r/n),s=this.canonical.z,o=1<<s,l=this.canonical.y+a;if(l<0||l>=o)return null;let u=this.canonical.x+i,h=this.wrap;return u<0?(h-=Math.ceil(-u/o),u=(u%o+o)%o):u>=o&&(h+=Math.floor(u/o),u%=o),{tileID:new e(this.overscaledZ,h,s,u,l),x:t-i*n,y:r-a*n}}};function ch(e,t,r,n,i){(e*=2)<0&&(e=-1*e-1);let a=1<<r;return(a*a*e+a*i+n).toString(36)+r.toString(36)+t.toString(36)}let cc=6378137*Math.PI;function cp(e,t,r){let n=2*cc/256/2**r;return[e*n-cc,t*n-cc]}function cf(e,t){let r=Math.abs(2*e.wrap)-(e.wrap<0),n=Math.abs(2*t.wrap)-(t.wrap<0);return e.overscaledZ-t.overscaledZ||n-r||t.canonical.y-e.canonical.y||t.canonical.x-e.canonical.x}aI("CanonicalTileID",co),aI("OverscaledTileID",cu,{omit:["terrainRttPosMatrix32f"]});let cd="_geojsonTileLayer";var cy=class{constructor(e){this._stringToNumber={},this._numberToString=[];for(let t=0;t<e.length;t++){let r=e[t];this._stringToNumber[r]=t,this._numberToString[t]=r}}encode(e){return this._stringToNumber[e]}decode(e){if(e>=this._numberToString.length)throw Error(`Out of bounds. Index requested n=${e} can't be >= this._numberToString.length ${this._numberToString.length}`);return this._numberToString[e]}},cm=class{constructor(e,t,r,n,i){for(let i in this.type="Feature",this._vectorTileFeature=e,this._x=r,this._y=n,this._z=t,e.properties)"string"==typeof e.properties[i]&&e.properties[i].startsWith("__$json__:")&&(e.properties[i]=JSON.parse(e.properties[i].slice(10)));this.properties=e.properties,this.id=i}projectPoint(e,t,r,n){return[(e.x+t)*360/n-180,360/Math.PI*Math.atan(Math.exp((1-(e.y+r)*2/n)*Math.PI))-90]}projectLine(e,t,r,n){return e.map(e=>this.projectPoint(e,t,r,n))}get geometry(){if(this._geometry)return this._geometry;let e=this._vectorTileFeature,t=e.extent*2**this._z,r=e.extent*this._x,n=e.extent*this._y,i=e.loadGeometry();switch(e.type){case 1:{let e=[];for(let t of i)e.push(t[0]);let a=this.projectLine(e,r,n,t);this._geometry=1===e.length?{type:"Point",coordinates:a[0]}:{type:"MultiPoint",coordinates:a};break}case 2:{let e=i.map(e=>this.projectLine(e,r,n,t));this._geometry=1===e.length?{type:"LineString",coordinates:e[0]}:{type:"MultiLineString",coordinates:e};break}case 3:{let e=uf(i),a=[];for(let i of e)a.push(i.map(e=>this.projectLine(e,r,n,t)));this._geometry=1===a.length?{type:"Polygon",coordinates:a[0]}:{type:"MultiPolygon",coordinates:a};break}default:throw Error(`unknown feature type: ${e.type}`)}return this._geometry}set geometry(e){this._geometry=e}toJSON(){let e={geometry:this.geometry};for(let t in this)"_geometry"!==t&&"_vectorTileFeature"!==t&&"_x"!==t&&"_y"!==t&&"_z"!==t&&(e[t]=this[t]);return e}},cg=class{constructor(e,t,r){this._name=e,this.dataBuffer=t,"number"==typeof r?this._size=r:(this.nullabilityBuffer=r,this._size=r.size())}getValue(e){return this.nullabilityBuffer&&!this.nullabilityBuffer.get(e)?null:this.getValueFromBuffer(e)}has(e){return this.nullabilityBuffer?.get(e)||!this.nullabilityBuffer}get name(){return this._name}get size(){return this._size}},cx=class extends cg{},cv=class extends cx{getValueFromBuffer(e){return this.dataBuffer[e]}},cb=class extends cx{getValueFromBuffer(e){return this.dataBuffer[e]}},cw=class extends cg{constructor(e,t,r,n){super(e,t,n),this.delta=r}},c_=class extends cw{constructor(e,t,r,n,i){super(e,i?Int32Array.of(t):Uint32Array.of(t),r,n)}getValueFromBuffer(e){return this.dataBuffer[0]+e*this.delta}},cA=class extends cg{constructor(e,t,r,n){super(e,n?Int32Array.of(t):Uint32Array.of(t),r)}getValueFromBuffer(e){return this.dataBuffer[0]}},cD=class{constructor(e,t,r,n,i=4096){if(this._name=e,this._geometryVector=t,this._idVector=r,this._propertyVectors=n,this._extent=i,0===e.length)throw Error("Missing layer name")}get name(){return this._name}get idVector(){return this._idVector}get geometryVector(){return this._geometryVector}get propertyVectors(){return this._propertyVectors??[]}
2getPropertyVector(e){return this.propertyVectorsMap||=new Map(this.propertyVectors.map(e=>[e.name,e])),this.propertyVectorsMap.get(e)}get numFeatures(){return this.geometryVector.numGeometries}get extent(){return this._extent}getFeatures(){let e=[],t=this.geometryVector.getGeometries();for(let r=0;r<this.numFeatures;r++){let n;if(this.idVector){let e=this.idVector.getValue(r);null!==e&&(n=this.containsMaxSafeIntegerValues(this.idVector)?Number(e):e)}let i={coordinates:t[r],type:this.geometryVector.geometryType(r)},a={};for(let e of this.propertyVectors){if(!e)continue;let t=e.name,n=e.getValue(r);null!==n&&(a[t]=n)}e.push({id:n,geometry:i,properties:a})}return e}containsMaxSafeIntegerValues(e){return e instanceof cv||e instanceof cA||e instanceof c_||e instanceof cb}},cS,cE,cF,ck,cT=class{constructor(e){this.value=e}get(){return this.value}set(e){this.value=e}increment(){return this.value++}add(e){this.value+=e}};(pV=ck||={}).NONE="NONE",pV.DELTA="DELTA",pV.COMPONENTWISE_DELTA="COMPONENTWISE_DELTA",pV.RLE="RLE",pV.MORTON="MORTON",(pL=pX||={}).NONE="NONE",pL.FAST_PFOR="FAST_PFOR",pL.VARINT="VARINT";let cI=new Uint32Array(33);cI[0]=0;for(let e=1;e<=32;e++)cI[e]=32===e?0xffffffff:0xffffffff>>>32-e;let cC=function(){var e;if(!Number.isFinite(65536))return 65536;let t=(e=Math.floor(65536))-e%256;return 0===t?256:t}(),cM=3*cC/256+cC|0;function cB(){let e=new Uint8Array(cM);return{dataToBePacked:Array(33),dataPointers:new Int32Array(33),byteContainer:e,byteContainerI32:new Int32Array(e.buffer,e.byteOffset,e.byteLength>>>2),exceptionSizes:new Int32Array(33)}}function cP(e,t,r){let n=new Uint32Array(r),i=0,a=t.get();for(let t=0;t<n.length;t++){let t=e[a++],r=127&t;if(t<128||(r|=(127&(t=e[a++]))<<7,t<128)||(r|=(127&(t=e[a++]))<<14,t<128)||(r|=(127&(t=e[a++]))<<21,t<128)){n[i++]=r;continue}r|=(15&(t=e[a++]))<<28,n[i++]=r}return t.set(a),n}function cz(e,t,r){let n=new BigUint64Array(r);for(let r=0;r<n.length;r++)n[r]=function(e,t){let r=0n,n=0,i=t.get();for(;i<e.length;){let t=e[i++];if(r|=BigInt(127&t)<<BigInt(n),!(128&t))break;if((n+=7)>=64)throw Error("Varint too long")}return t.set(i),r}(e,t);return n}function cV(e){return e>>>1^-(1&e)}function cL(e){return e>>1n^-(1n&e)}function c$(e){return e%2==1?-((e+1)/2):e/2}function cO(e,t,r){if(void 0===r){r=0;for(let n=0;n<t;n++)r+=e[n]}let n=new Uint32Array(r),i=0;for(let r=0;r<t;r++){let a=e[r],s=e[r+t];n.fill(s,i,i+a),i+=a}return n}function cR(e,t,r){if(void 0===r){r=0;for(let n=0;n<t;n++)r+=Number(e[n])}let n=new BigUint64Array(r),i=0;for(let r=0;r<t;r++){let a=Number(e[r]),s=e[r+t];n.fill(s,i,i+a),i+=a}return n}function cN(e,t,r){let n=new Float64Array(r),i=0;for(let r=0;r<t;r++){let a=e[r],s=e[r+t];n.fill(s,i,i+a),i+=a}return n}function cU(e){let t=new Int32Array(e.length);t[0]=cV(e[0]);let r=e.length/4*4,n=1;if(r>=4)for(;n<r-4;n+=4){let r=e[n],i=e[n+1],a=e[n+2],s=e[n+3];t[n]=cV(r)+t[n-1],t[n+1]=cV(i)+t[n],t[n+2]=cV(a)+t[n+1],t[n+3]=cV(s)+t[n+2]}for(;n!==e.length;++n)t[n]=cV(e[n])+t[n-1];return t}function cq(e){let t=new BigInt64Array(e.length);t[0]=cL(e[0]);let r=e.length/4*4,n=1;if(r>=4)for(;n<r-4;n+=4){let r=e[n],i=e[n+1],a=e[n+2],s=e[n+3];t[n]=cL(r)+t[n-1],t[n+1]=cL(i)+t[n],t[n+2]=cL(a)+t[n+1],t[n+3]=cL(s)+t[n+2]}for(;n!==t.length;++n)t[n]=cL(e[n])+t[n-1];return t}function cj(e){let t=e.length/4*4,r=1;if(t>=4)for(let n=e[0];r<t-4;r+=4)n=e[r]+=n,n=e[r+1]+=n,n=e[r+2]+=n,n=e[r+3]+=n;for(;r!==e.length;)e[r]+=e[r-1],++r}function cG(e,t,r,n){if(e.length<2)return new Int32Array(e);let i=new Int32Array(e.length),a=cV(e[0]),s=cV(e[1]);i[0]=cX(Math.round(a*t),r,n),i[1]=cX(Math.round(s*t),r,n);let o=e.length/16,l=2;if(o>=4)for(;l<o-4;l+=4){let o=e[l],u=e[l+1],h=cV(o)+a,c=cV(u)+s;i[l]=cX(Math.round(h*t),r,n),i[l+1]=cX(Math.round(c*t),r,n);let p=e[l+2],f=e[l+3];a=cV(p)+h,s=cV(f)+c,i[l+2]=cX(Math.round(a*t),r,n),i[l+3]=cX(Math.round(s*t),r,n)}for(;l!==e.length;l+=2)a+=cV(e[l]),s+=cV(e[l+1]),i[l]=cX(Math.round(a*t),r,n),i[l+1]=cX(Math.round(s*t),r,n);return i}function cX(e,t,r){return Math.min(r,Math.max(t,e))}function cY(e){let t=new Uint32Array(e.length);t[0]=cV(e[0])>>>0;for(let r=1;r<e.length;r++)t[r]=t[r-1]+cV(e[r])>>>0;return t}function cZ(e){let t=new BigUint64Array(e.length);t[0]=BigInt.asUintN(64,cL(e[0]));for(let r=1;r<e.length;r++)t[r]=BigInt.asUintN(64,t[r-1]+cL(e[r]));return t}(p$=pY||={}).PRESENT="PRESENT",p$.DATA="DATA",p$.OFFSET="OFFSET",p$.LENGTH="LENGTH",(pO=pZ||={}).NONE="NONE",pO.SINGLE="SINGLE",pO.SHARED="SHARED",pO.VERTEX="VERTEX",pO.MORTON="MORTON",pO.FSST="FSST",(pR=pW||={}).VERTEX="VERTEX",pR.INDEX="INDEX",pR.STRING="STRING",pR.KEY="KEY",(pN=pH||={}).VAR_BINARY="VAR_BINARY",pN.GEOMETRIES="GEOMETRIES",pN.PARTS="PARTS",pN.RINGS="RINGS",pN.TRIANGLES="TRIANGLES",pN.SYMBOL="SYMBOL",pN.DICTIONARY="DICTIONARY";let cW=[pY.PRESENT,pY.DATA,pY.OFFSET,pY.LENGTH],cH=[ck.NONE,ck.DELTA,ck.COMPONENTWISE_DELTA,ck.RLE,ck.MORTON],cK=[pX.NONE,pX.FAST_PFOR,pX.VARINT],cJ=[pZ.NONE,pZ.SINGLE,pZ.SHARED,pZ.VERTEX,pZ.MORTON,pZ.FSST],cQ=[pW.VERTEX,pW.INDEX,pW.STRING,pW.KEY],c0=[pH.VAR_BINARY,pH.GEOMETRIES,pH.PARTS,pH.RINGS,pH.TRIANGLES,p
2H.SYMBOL,pH.DICTIONARY];function c1(e,t){var r,n;let i,a,s=function(e,t){let r=e[t.get()],n=cW[r>>4],i={};switch(n){case pY.DATA:i={dictionaryType:cJ[15&r]};break;case pY.OFFSET:i={offsetType:cQ[15&r]};break;case pY.LENGTH:i={lengthType:c0[15&r]}}t.increment();let a=e[t.get()],s=cH[a>>5],o=cH[a>>2&7],l=cK[3&a];t.increment();let u=cP(e,t,2),h=u[0];return{physicalStreamType:n,logicalStreamType:i,logicalLevelTechnique1:s,logicalLevelTechnique2:o,physicalLevelTechnique:l,numValues:h,byteLength:u[1],decompressedCount:h}}(e,t);return s.logicalLevelTechnique1===ck.MORTON?(r=s,i=cP(e,t,2),{physicalStreamType:r.physicalStreamType,logicalStreamType:r.logicalStreamType,logicalLevelTechnique1:r.logicalLevelTechnique1,logicalLevelTechnique2:r.logicalLevelTechnique2,physicalLevelTechnique:r.physicalLevelTechnique,numValues:r.numValues,byteLength:r.byteLength,decompressedCount:r.decompressedCount,numBits:i[0],coordinateShift:i[1]}):(ck.RLE===s.logicalLevelTechnique1||ck.RLE===s.logicalLevelTechnique2)&&pX.NONE!==s.physicalLevelTechnique?(n=s,a=cP(e,t,2),{physicalStreamType:n.physicalStreamType,logicalStreamType:n.logicalStreamType,logicalLevelTechnique1:n.logicalLevelTechnique1,logicalLevelTechnique2:n.logicalLevelTechnique2,physicalLevelTechnique:n.physicalLevelTechnique,numValues:n.numValues,byteLength:n.byteLength,decompressedCount:a[1],runs:a[0],numRleValues:a[1]}):s}(pU=pK||={})[pU.FLAT=0]="FLAT",pU[pU.CONST=1]="CONST",pU[pU.SEQUENCE=2]="SEQUENCE",pU[pU.DICTIONARY=3]="DICTIONARY",pU[pU.FSST_DICTIONARY=4]="FSST_DICTIONARY";var c2=class{constructor(e,t){this.values=e,this._size=t}get(e){let t=Math.floor(e/8);return(this.values[t]>>e%8&1)==1}set(e,t){let r=Math.floor(e/8);this.values[r]=this.values[r]|!!t<<e%8}getInt(e){let t=Math.floor(e/8);return this.values[t]>>e%8&1}size(){return this._size}getBuffer(){return this.values}};function c3(e,t,r){if(!t)return e;let n=t.size(),i=new e.constructor(n),a=0;for(let s=0;s<n;s++)i[s]=t.get(s)?e[a++]:r;return i}function c5(e,t,r){for(let n=0;n<e;n++){let e=c1(t,r);r.add(e.byteLength)}}function c6(e,t,r,n,i){let a=function(e,t,r,n){let i=new Uint8Array(t),a=0,s=n.get()+r;for(;a<t&&!(n.get()>=s);){let r=e[n.increment()];if(r<=127){let s=r+3,o=e[n.increment()],l=Math.min(a+s,t);i.fill(o,a,l),a=l}else{let s=256-r;for(let r=0;r<s&&a<t;r++)i[a++]=e[n.increment()]}}return n.set(s),i}(e,Math.ceil(t/8),r,n);return i?function(e,t,r){if(!r)return e;let n=r.size(),i=new c2(e,t),a=new c2(new Uint8Array(Math.ceil(n/8)),n),s=0;for(let e=0;e<n;e++){let t=!!r.get(e)&&i.get(s++);a.set(e,t)}return a.getBuffer()}(a,t,i):a}function c4(e,t,r,n){let i=t.get(),a=i+r*Float32Array.BYTES_PER_ELEMENT,s=new Float32Array(new Uint8Array(e.subarray(i,a)).buffer);return t.set(a),n?c3(s,n,0):s}function c8(e,t,r,n){let i=t.get(),a=i+r*Float64Array.BYTES_PER_ELEMENT,s=new Float64Array(new Uint8Array(e.subarray(i,a)).buffer);return t.set(a),n?c3(s,n,0):s}let c7=new TextDecoder;function c9(e,t,r){return r-t>=12?c7.decode(e.subarray(t,r)):function(e,t,r){let n="",i=t;for(;i<r;){let t,a,s,o=e[i],l=null,u=o>239?4:o>223?3:o>191?2:1;if(i+u>r)break;1===u?o<128&&(l=o):2===u?(192&(t=e[i+1]))==128&&(l=(31&o)<<6|63&t)<=127&&(l=null):3===u?(t=e[i+1],a=e[i+2],(192&t)==128&&(192&a)==128&&((l=(15&o)<<12|(63&t)<<6|63&a)<=2047||l>=55296&&l<=57343)&&(l=null)):4===u&&(t=e[i+1],a=e[i+2],s=e[i+3],(192&t)==128&&(192&a)==128&&(192&s)==128&&((l=(15&o)<<18|(63&t)<<12|(63&a)<<6|63&s)<=65535||l>=1114112)&&(l=null)),null===l?(l=65533,u=1):l>65535&&(l-=65536,n+=String.fromCharCode(l>>>10&1023|55296),l=56320|1023&l),n+=String.fromCharCode(l),i+=u}return n}(e,t,r)}function pe(e,t,r,n,i){let a;var s=pn(e,t,r),o=r,l=n,u=i;switch(o.logicalLevelTechnique1){case ck.DELTA:if(o.logicalLevelTechnique2===ck.RLE){if(!u)return function(e,t,r){let n=new Int32Array(r),i=0,a=0;for(let r=0;r<t;r++){let s=e[r],o=cV(e[r+t]);for(let e=0;e<s;e++)a+=o,n[i++]=a}return n}(s,o.runs,o.numRleValues);a=cU(s=cO(s,o.runs,o.numRleValues))}else a=cU(s);break;case ck.RLE:a=function(e,t,r){if(void 0===r){r=0;for(let n=0;n<t;n++)r+=e[n]}let n=new Int32Array(r),i=0;for(let r=0;r<t;r++){let a=e[r],s=e[r+t];s=cV(s),n.fill(s,i,i+a),i+=a}return n}(s,o.runs,o.numRleValues);break;case ck.MORTON:cj(s),a=new Int32Array(s);break;case ck.COMPONENTWISE_DELTA:if(l&&!u)return cG(s,l.scale,l.min,l.max);a=function(e){if(e.length<2)return new Int32Array(e);let t=new Int32Array(e.length);t[0]=cV(e[0]),t[1]=cV(e[1]);let r=e.length/4*4,n=2;if(r>=4)for(;n<r-4;n+=4){let r=e[n],i=e[n+1],a=e[n+2],s=e[n+3];t[n]=cV(r)+t[n-2],t[n+1]=cV(i)+t[n-1],t[n+2]=cV(a)+t[n],t[n+3]=cV(s)+t[n+1]}for(;n!==e.length;n+=2)t[n]=cV(e[n])+t[n-2],t[n+1]=cV(e[n+1])+t[n-1];return t}(s);break;case ck.NONE:a=function(e){let t=new Int32Array(e.length);for(let r=0;r<e.length;r++)t[r]=cV(e[r]);return t}(s);break;default:throw Error(`The specified Logical level technique is not supported: ${o.logicalLevelTechnique1}`)}return u?c3(a,u,0):a}function pt(e,t,r,n,i){return function(e,t,r,n){let i;switch(t.logicalLevelTechnique1){case ck.DELTA:i=t.logicalLevelTechnique2===ck.RLE?cY(cO(e,t.runs,t.numRleValues)):cY(e);break;case ck.RLE:i=cO(e,t.runs,t.numRleValues);break;case ck.MORTON:cj(e),i=e;break;case ck.COMPONENTWISE_DELTA:var a;i=r&&!n?(a=r.scale,new Uint32Array(cG(e,a,r.min,r.max))):function(e){if(e.length<2)return new Uint32Array(e);let t=new Uint32Array(e.length);t[0]=cV(e[0])>>>0,t[1]=cV(e[1])>>>0;for(let r=2;r<e.length;r+=2)t[r]=t[r-2]+cV(e[r])>>>0,t[r+1]=t[r-1]+cV(e[r+1])>>>0;return t}(e);break;case ck.NONE:i=e;break;default:throw Error(`The specified Logical level technique is not supported: ${t.logicalLevelTechnique1}`)}return n?c3(i,n,0):i}(pn(e,t,r),r,n,i)}function pr(e,t,r){return function(e,t){if(t.logicalLevelTechnique1===ck.DELTA&&t.logicalLevelTechnique2===ck.NONE){let t=new Int32Array(e.length+1);t[0]=0,t[1]=cV(e[0]);let r=t[1];for(let n=2;n!==t.length;++n)r+=cV(e[n-1]),t[n]=t[n-1]+r;return new Uint32Array(t)}if(t.logicalLevelTechnique1===ck.RLE&&t.logicalLevelTechnique2===ck.NONE)return function(e,t,r){let n=new Uint32Array(r+1);n[0]=0;let i=1,a=n[0];for(let r=0;r<t;r++){let s=e[r],o=e[r+t];for(let e=i;e<i+s;e++)n[e]=o+a,a=n[e];i+=s}return n}(e,t.runs,t.numRleValues);if(t.logicalLevelTechnique1===ck.NONE&&t.logicalLevelTechnique2===ck.NONE){let r=0;for(let t=0;t<e.length;t++)e[t]+=r,r=e[t];let n=new Uint32Array(t.numValues+1);return n[0]=0,n.set(e,1),n}if(t.logicalLevelTechnique1===ck.DELTA&&t.logicalLevelTechnique2===ck.RLE){let r=function(e,t,r){let n=new Int32Array(r+1);n[0]=0;let i=1,a=n[0];for(let r=0;r<t;r++){let s=e[r],o=e[r+t];o=cV(o);for(let e=i;e<i+s;e++)n[e]=o+a,a=n[e];i+=s}return n}(e,t.runs,t.numRleValues);return cj(r),new Uint32Array(r)}throw Error("Only delta encoding is supported for transforming length to offset streams yet.")}(pn(e,t,r),r)}function pn(e,t,r){let n=r.physicalLevelTechnique;switch(n){case pX.FAST_PFOR:var i,a;return i=r.numValues,function(e,t,r,n,i){let a=n.get();
2if(3&r)throw Error(`FastPFOR: invalid encodedByteLength=${r} at offset=${a} (encodedBytes.length=${e.length}; expected a multiple of 4 bytes for an int32 big-endian word stream)`);let s=r>>>2,o=function(e,t){if(t<=e.encodedWords.length)return e.encodedWords;let r=new Uint32Array(Math.max(16,2*t));return e.encodedWords=r,r}(i,s);!function(e,t,r,n){if(t<0||r<0||t+r>e.length)throw RangeError(`decodeBigEndianInt32sInto: out of bounds (offset=${t}, byteLength=${r}, bytes.length=${e.length})`);let i=Math.floor(r/4),a=r%4!=0,s=a?i+1:i;if(n.length<s)throw RangeError(`decodeBigEndianInt32sInto: out.length=${n.length} < ${s}`);if(i>0){let r=e.byteOffset+t;if(3&r)for(let r=0;r<i;r++){let i=t+4*r;n[r]=e[i]<<24|e[i+1]<<16|e[i+2]<<8|e[i+3]}else{let t=new Uint32Array(e.buffer,r,i);for(let e=0;e<i;e++)n[e]=0|function(e){let t=e>>>0;return((255&t)<<24|(65280&t)<<8|t>>>8&65280|t>>>24&255)>>>0}(t[e])}}if(a){let a=t+4*i,s=r-4*i,o=0;for(let t=0;t<s;t++)o|=e[a+t]<<24-8*t;n[i]=0|o}}(e,a,r,o);let l=function(e,t,r){let n=0,i=0,a=new Uint32Array(t),s=r??cB();if(e.length>0){let t=0|e[n];if(n=n+1|0,255&t)throw Error(`FastPFOR decode: invalid alignedLength=${t} (expected multiple of 256)`);if(i+t>a.length)throw Error(`FastPFOR decode: output buffer too small (outPos=${i}, alignedLength=${t}, out.length=${a.length})`);n=function(e,t,r,n,i,a){let s=n+(i-i%256),o=n,l=r;for(;o!==s;){let r=Math.min(cC,s-o);l=function(e,t,r,n,i,a){let s=0|r,o=0|e[s];if(o<=0||s+o>e.length-1)throw Error(`FastPFOR decode: invalid whereMeta=${o} at pageStart=${s} (expected > 0 and pageStart+whereMeta < encoded.length=${e.length})`);let l=s+o|0,u=e[l]>>>0,h=u+3>>>2,c=l+1,p=c+h;if(p>=e.length)throw Error(`FastPFOR decode: invalid byteSize=${u} (metaInts=${h}, pageStart=${s}, packedEnd=${l}, byteContainerStart=${c}) causes bitmapPos=${p} out of bounds (encoded.length=${e.length})`);let f=function(e,t,r,n){n.byteContainer.length<r&&(n.byteContainer=new Uint8Array(2*r),n.byteContainerI32=void 0);let i=n.byteContainer,a=r>>>2;if(3&i.byteOffset)for(let r=0;r<a;r=r+1|0){let n=0|e[t+r|0],a=r<<2;i[a]=255&n,i[a+1|0]=n>>>8&255,i[a+2|0]=n>>>16&255,i[a+3|0]=n>>>24&255}else{let r=n.byteContainerI32;(!r||r.buffer!==i.buffer||r.byteOffset!==i.byteOffset||r.length<a)&&(r=n.byteContainerI32=new Int32Array(i.buffer,i.byteOffset,i.byteLength>>>2)),r.set(e.subarray(t,t+a))}let s=3&r;if(s>0){let r=0|e[t+a|0],n=a<<2;for(let e=0;e<s;e=e+1|0)i[n+e|0]=r>>>(e<<3)&255}return i}(e,c,u,a),d=function(e,t,r){let n=0|e[t++],i=r.dataToBePacked;for(let a=2;a<=32;a=a+1|0){if(!(n>>>a-1&1))continue;if(t>=e.length)throw Error(`FastPFOR decode: truncated exception stream header (bitWidth=${a}, streamWordIndex=${t}, needWords=1, availableWords=${e.length-t}, encodedWords=${e.length})`);let s=e[t++]>>>0,o=function(e){var t;return(t=e+31)-t%32}(s),l=s*a+31>>>5;if(t+l>e.length)throw Error(`FastPFOR decode: truncated exception stream (bitWidth=${a}, size=${s}, streamWordIndex=${t}, needWords=${l}, availableWords=${e.length-t}, encodedWords=${e.length})`);let u=i[a];(!u||u.length<o)&&(u=i[a]=new Uint32Array(o));let h=0;for(;h<s;h=h+32|0)(function(e,t,r,n,i){switch(i){case 2:let a,s,o;a=n,s=e[t]>>>0,o=e[t+1]>>>0,r[a++]=s>>>0&3,r[a++]=s>>>2&3,r[a++]=s>>>4&3,r[a++]=s>>>6&3,r[a++]=s>>>8&3,r[a++]=s>>>10&3,r[a++]=s>>>12&3,r[a++]=s>>>14&3,r[a++]=s>>>16&3,r[a++]=s>>>18&3,r[a++]=s>>>20&3,r[a++]=s>>>22&3,r[a++]=s>>>24&3,r[a++]=s>>>26&3,r[a++]=s>>>28&3,r[a++]=s>>>30&3,r[a++]=o>>>0&3,r[a++]=o>>>2&3,r[a++]=o>>>4&3,r[a++]=o>>>6&3,r[a++]=o>>>8&3,r[a++]=o>>>10&3,r[a++]=o>>>12&3,r[a++]=o>>>14&3,r[a++]=o>>>16&3,r[a++]=o>>>18&3,r[a++]=o>>>20&3,r[a++]=o>>>22&3,r[a++]=o>>>24&3,r[a++]=o>>>26&3,r[a++]=o>>>28&3,r[a]=o>>>30&3;return;case 3:let l,u,h,c;l=n,u=e[t]>>>0,h=e[t+1]>>>0,c=e[t+2]>>>0,r[l++]=u>>>0&7,r[l++]=u>>>3&7,r[l++]=u>>>6&7,r[l++]=u>>>9&7,r[l++]=u>>>12&7,r[l++]=u>>>15&7,r[l++]=u>>>18&7,r[l++]=u>>>21&7,r[l++]=u>>>24&7,r[l++]=u>>>27&7,r[l++]=(u>>>30|(1&h)<<2)&7,r[l++]=h>>>1&7,r[l++]=h>>>4&7,r[l++]=h>>>7&7,r[l++]=h>>>10&7,r[l++]=h>>>13&7,r[l++]=h>>>16&7,r[l++]=h>>>19&7,r[l++]=h>>>22&7,r[l++]=h>>>25&7,r[l++]=h>>>28&7,r[l++]=(h>>>31|(3&c)<<1)&7,r[l++]=c>>>2&7,r[l++]=c>>>5&7,r[l++]=c>>>8&7,r[l++]=c>>>11&7,r[l++]=c>>>14&7,r[l++]=c>>>17&7,r[l++]=c>>>20&7,r[l++]=c>>>23&7,r[l++]=c>>>26&7,r[l]=c>>>29&7;return;case 4:let p,f,d,y,m;p=n,f=e[t]>>>0,d=e[t+1]>>>0,y=e[t+2]>>>0,m=e[t+3]>>>0,r[p++]=f>>>0&15,r[p++]=f>>>4&15,r[p++]=f>>>8&15,r[p++]=f>>>12&15,r[p++]=f>>>16&15,r[p++]=f>>>20&15,r[p++]=f>>>24&15,r[p++]=f>>>28&15,r[p++]=d>>>0&15,r[p++]=d>>>4&15,r[p++]=d>>>8&15,r[p++]=d>>>12&15,r[p++]=d>>>16&15,r[p++]=d>>>20&15,r[p++]=d>>>24&15,r[p++]=d>>>28&15,r[p++]=y>>>0&15,r[p++]=y>>>4&15,r[p++]=y>>>8&15,r[p++]=y>>>12&15,r[p++]=y>>>16&15,r[p++]=y>>>20&15,r[p++]=y>>>24&15,r[p++]=y>>>28&15,r[p++]=m>>>0&15,r[p++]=m>>>4&15,r[p++]=m>>>8&15,r[p++]=m>>>12&15,r[p++]=m>>>16&15,r[p++]=m>>>20&15,r[p++]=m>>>
224&15,r[p]=m>>>28&15;return;case 5:let g,x,v,b,w,_;g=n,x=e[t]>>>0,v=e[t+1]>>>0,b=e[t+2]>>>0,w=e[t+3]>>>0,_=e[t+4]>>>0,r[g++]=x>>>0&31,r[g++]=x>>>5&31,r[g++]=x>>>10&31,r[g++]=x>>>15&31,r[g++]=x>>>20&31,r[g++]=x>>>25&31,r[g++]=(x>>>30|(7&v)<<2)&31,r[g++]=v>>>3&31,r[g++]=v>>>8&31,r[g++]=v>>>13&31,r[g++]=v>>>18&31,r[g++]=v>>>23&31,r[g++]=(v>>>28|(1&b)<<4)&31,r[g++]=b>>>1&31,r[g++]=b>>>6&31,r[g++]=b>>>11&31,r[g++]=b>>>16&31,r[g++]=b>>>21&31,r[g++]=b>>>26&31,r[g++]=(b>>>31|(15&w)<<1)&31,r[g++]=w>>>4&31,r[g++]=w>>>9&31,r[g++]=w>>>14&31,r[g++]=w>>>19&31,r[g++]=w>>>24&31,r[g++]=(w>>>29|(3&_)<<3)&31,r[g++]=_>>>2&31,r[g++]=_>>>7&31,r[g++]=_>>>12&31,r[g++]=_>>>17&31,r[g++]=_>>>22&31,r[g]=_>>>27&31;return;case 6:let A,D,S,E,F,k,T;A=n,D=e[t]>>>0,S=e[t+1]>>>0,E=e[t+2]>>>0,F=e[t+3]>>>0,k=e[t+4]>>>0,T=e[t+5]>>>0,r[A++]=D>>>0&63,r[A++]=D>>>6&63,r[A++]=D>>>12&63,r[A++]=D>>>18&63,r[A++]=D>>>24&63,r[A++]=(D>>>30|(15&S)<<2)&63,r[A++]=S>>>4&63,r[A++]=S>>>10&63,r[A++]=S>>>16&63,r[A++]=S>>>22&63,r[A++]=(S>>>28|(3&E)<<4)&63,r[A++]=E>>>2&63,r[A++]=E>>>8&63,r[A++]=E>>>14&63,r[A++]=E>>>20&63,r[A++]=E>>>26&63,r[A++]=F>>>0&63,r[A++]=F>>>6&63,r[A++]=F>>>12&63,r[A++]=F>>>18&63,r[A++]=F>>>24&63,r[A++]=(F>>>30|(15&k)<<2)&63,r[A++]=k>>>4&63,r[A++]=k>>>10&63,r[A++]=k>>>16&63,r[A++]=k>>>22&63,r[A++]=(k>>>28|(3&T)<<4)&63,r[A++]=T>>>2&63,r[A++]=T>>>8&63,r[A++]=T>>>14&63,r[A++]=T>>>20&63,r[A]=T>>>26&63;return;case 7:let I,C,M,B,P,z,V,L;I=n,C=e[t]>>>0,M=e[t+1]>>>0,B=e[t+2]>>>0,P=e[t+3]>>>0,z=e[t+4]>>>0,V=e[t+5]>>>0,L=e[t+6]>>>0,r[I++]=C>>>0&127,r[I++]=C>>>7&127,r[I++]=C>>>14&127,r[I++]=C>>>21&127,r[I++]=(C>>>28|(7&M)<<4)&127,r[I++]=M>>>3&127,r[I++]=M>>>10&127,r[I++]=M>>>17&127,r[I++]=M>>>24&127,r[I++]=(M>>>31|(63&B)<<1)&127,r[I++]=B>>>6&127,r[I++]=B>>>13&127,r[I++]=B>>>20&127,r[I++]=(B>>>27|(3&P)<<5)&127,r[I++]=P>>>2&127,r[I++]=P>>>9&127,r[I++]=P>>>16&127,r[I++]=P>>>23&127,r[I++]=(P>>>30|(31&z)<<2)&127,r[I++]=z>>>5&127,r[I++]=z>>>12&127,r[I++]=z>>>19&127,r[I++]=(z>>>26|(1&V)<<6)&127,r[I++]=V>>>1&127,r[I++]=V>>>8&127,r[I++]=V>>>15&127,r[I++]=V>>>22&127,r[I++]=(V>>>29|(15&L)<<3)&127,r[I++]=L>>>4&127,r[I++]=L>>>11&127,r[I++]=L>>>18&127,r[I]=L>>>25&127;return;case 8:let $,O,R,N,U,q,j,G,X;$=n,O=e[t]>>>0,R=e[t+1]>>>0,N=e[t+2]>>>0,U=e[t+3]>>>0,q=e[t+4]>>>0,j=e[t+5]>>>0,G=e[t+6]>>>0,X=e[t+7]>>>0,r[$++]=O>>>0&255,r[$++]=O>>>8&255,r[$++]=O>>>16&255,r[$++]=O>>>24&255,r[$++]=R>>>0&255,r[$++]=R>>>8&255,r[$++]=R>>>16&255,r[$++]=R>>>24&255,r[$++]=N>>>0&255,r[$++]=N>>>8&255,r[$++]=N>>>16&255,r[$++]=N>>>24&255,r[$++]=U>>>0&255,r[$++]=U>>>8&255,r[$++]=U>>>16&255,r[$++]=U>>>24&255,r[$++]=q>>>0&255,r[$++]=q>>>8&255,r[$++]=q>>>16&255,r[$++]=q>>>24&255,r[$++]=j>>>0&255,r[$++]=j>>>8&255,r[$++]=j>>>16&255,r[$++]=j>>>24&255,r[$++]=G>>>0&255,r[$++]=G>>>8&255,r[$++]=G>>>16&255,r[$++]=G>>>24&255,r[$++]=X>>>0&255,r[$++]=X>>>8&255,r[$++]=X>>>16&255,r[$]=X>>>24&255;return;case 9:let Y,Z,W,H,K,J,Q,ee,et,er;Y=n,Z=e[t]>>>0,W=e[t+1]>>>0,H=e[t+2]>>>0,K=e[t+3]>>>0,J=e[t+4]>>>0,Q=e[t+5]>>>0,ee=e[t+6]>>>0,et=e[t+7]>>>0,er=e[t+8]>>>0,r[Y++]=Z>>>0&511,r[Y++]=Z>>>9&511,r[Y++]=Z>>>18&511,r[Y++]=(Z>>>27|(15&W)<<5)&511,r[Y++]=W>>>4&511,r[Y++]=W>>>13&511,r[Y++]=W>>>22&511,r[Y++]=(W>>>31|(255&H)<<1)&511,r[Y++]=H>>>8&511,r[Y++]=H>>>17&511,r[Y++]=(H>>>26|(7&K)<<6)&511,r[Y++]=K>>>3&511,r[Y++]=K>>>12&511,r[Y++]=K>>>21&511,r[Y++]=(K>>>30|(127&J)<<2)&511,r[Y++]=J>>>7&511,r[Y++]=J>>>16&511,r[Y++]=(J>>>25|(3&Q)<<7)&511,r[Y++]=Q>>>2&511,r[Y++]=Q>>>11&511,r[Y++]=Q>>>20&511,r[Y++]=(Q>>>29|(63&ee)<<3)&511,r[Y++]=ee>>>6&511,r[Y++]=ee>>>15&511,r[Y++]=(ee>>>24|(1&et)<<8)&511,r[Y++]=et>>>1&511,r[Y++]=et>>>10&511,r[Y++]=et>>>19&511,r[Y++]=(et>>>28|(31&er)<<4)&511,r[Y++]=er>>>5&511,r[Y++]=er>>>14&511,r[Y]=er>>>23&511;return;case 10:let en,ei,ea,es,eo,el,eu,eh,ec,ep,ef;en=n,ei=e[t]>>>0,ea=e[t+1]>>>0,es=e[t+2]>>>0,eo=e[t+3]>>>0,el=e[t+4]>>>0,eu=e[t+5]>>>0,eh=e[t+6]>>>0,ec=e[t+7]>>>0,ep=e[t+8]>>>0,ef=e[t+9]>>>0,r[en++]=ei>>>0&1023,r[en++]=ei>>>10&1023,r[en++]=ei>>>20&1023,r[en++]=(ei>>>30|(255&ea)<<2)&1023,r[en++]=ea>>>8&1023,r[en++]=ea>>>18&1023,r[en++]=(ea>>>28|(63&es)<<4)&1023,r[en++]=es>>>6&1023,r[en++]=es>>>16&1023,r[en++]=(es>>>26|(15&eo)<<6)&1023,r[en++]=eo>>>4&1023,r[en++]=eo>>>14&1023,r[en++]=(eo>
2>>24|(3&el)<<8)&1023,r[en++]=el>>>2&1023,r[en++]=el>>>12&1023,r[en++]=el>>>22&1023,r[en++]=eu>>>0&1023,r[en++]=eu>>>10&1023,r[en++]=eu>>>20&1023,r[en++]=(eu>>>30|(255&eh)<<2)&1023,r[en++]=eh>>>8&1023,r[en++]=eh>>>18&1023,r[en++]=(eh>>>28|(63&ec)<<4)&1023,r[en++]=ec>>>6&1023,r[en++]=ec>>>16&1023,r[en++]=(ec>>>26|(15&ep)<<6)&1023,r[en++]=ep>>>4&1023,r[en++]=ep>>>14&1023,r[en++]=(ep>>>24|(3&ef)<<8)&1023,r[en++]=ef>>>2&1023,r[en++]=ef>>>12&1023,r[en]=ef>>>22&1023;return;case 11:let ed,ey,em,eg,ex,ev,eb,ew,e_,eA,eD,eS;ed=n,ey=e[t]>>>0,em=e[t+1]>>>0,eg=e[t+2]>>>0,ex=e[t+3]>>>0,ev=e[t+4]>>>0,eb=e[t+5]>>>0,ew=e[t+6]>>>0,e_=e[t+7]>>>0,eA=e[t+8]>>>0,eD=e[t+9]>>>0,eS=e[t+10]>>>0,r[ed++]=ey>>>0&2047,r[ed++]=ey>>>11&2047,r[ed++]=(ey>>>22|(1&em)<<10)&2047,r[ed++]=em>>>1&2047,r[ed++]=em>>>12&2047,r[ed++]=(em>>>23|(3&eg)<<9)&2047,r[ed++]=eg>>>2&2047,r[ed++]=eg>>>13&2047,r[ed++]=(eg>>>24|(7&ex)<<8)&2047,r[ed++]=ex>>>3&2047,r[ed++]=ex>>>14&2047,r[ed++]=(ex>>>25|(15&ev)<<7)&2047,r[ed++]=ev>>>4&2047,r[ed++]=ev>>>15&2047,r[ed++]=(ev>>>26|(31&eb)<<6)&2047,r[ed++]=eb>>>5&2047,r[ed++]=eb>>>16&2047,r[ed++]=(eb>>>27|(63&ew)<<5)&2047,r[ed++]=ew>>>6&2047,r[ed++]=ew>>>17&2047,r[ed++]=(ew>>>28|(127&e_)<<4)&2047,r[ed++]=e_>>>7&2047,r[ed++]=e_>>>18&2047,r[ed++]=(e_>>>29|(255&eA)<<3)&2047,r[ed++]=eA>>>8&2047,r[ed++]=eA>>>19&2047,r[ed++]=(eA>>>30|(511&eD)<<2)&2047,r[ed++]=eD>>>9&2047,r[ed++]=eD>>>20&2047,r[ed++]=(eD>>>31|(1023&eS)<<1)&2047,r[ed++]=eS>>>10&2047,r[ed]=eS>>>21&2047;return;case 12:let eE,eF,ek,eT,eI,eC,eM,eB,eP,ez,eV,eL,e$;eE=n,eF=e[t]>>>0,ek=e[t+1]>>>0,eT=e[t+2]>>>0,eI=e[t+3]>>>0,eC=e[t+4]>>>0,eM=e[t+5]>>>0,eB=e[t+6]>>>0,eP=e[t+7]>>>0,ez=e[t+8]>>>0,eV=e[t+9]>>>0,eL=e[t+10]>>>0,e$=e[t+11]>>>0,r[eE++]=eF>>>0&4095,r[eE++]=eF>>>12&4095,r[eE++]=(eF>>>24|(15&ek)<<8)&4095,r[eE++]=ek>>>4&4095,r[eE++]=ek>>>16&4095,r[eE++]=(ek>>>28|(255&eT)<<4)&4095,r[eE++]=eT>>>8&4095,r[eE++]=eT>>>20&4095,r[eE++]=eI>>>0&4095,r[eE++]=eI>>>12&4095,r[eE++]=(eI>>>24|(15&eC)<<8)&4095,r[eE++]=eC>>>4&4095,r[eE++]=eC>>>16&4095,r[eE++]=(eC>>>28|(255&eM)<<4)&4095,r[eE++]=eM>>>8&4095,r[eE++]=eM>>>20&4095,r[eE++]=eB>>>0&4095,r[eE++]=eB>>>12&4095,r[eE++]=(eB>>>24|(15&eP)<<8)&4095,r[eE++]=eP>>>4&4095,r[eE++]=eP>>>16&4095,r[eE++]=(eP>>>28|(255&ez)<<4)&4095,r[eE++]=ez>>>8&4095,r[eE++]=ez>>>20&4095,r[eE++]=eV>>>0&4095,r[eE++]=eV>>>12&4095,r[eE++]=(eV>>>24|(15&eL)<<8)&4095,r[eE++]=eL>>>4&4095,r[eE++]=eL>>>16&4095,r[eE++]=(eL>>>28|(255&e$)<<4)&4095,r[eE++]=e$>>>8&4095,r[eE]=e$>>>20&4095;return;case 16:let eO,eR,eN,eU,eq,ej,eG,eX,eY,eZ,eW,eH,eK,eJ,eQ,e0,e1;eO=n,eR=e[t]>>>0,eN=e[t+1]>>>0,eU=e[t+2]>>>0,eq=e[t+3]>>>0,ej=e[t+4]>>>0,eG=e[t+5]>>>0,eX=e[t+6]>>>0,eY=e[t+7]>>>0,eZ=e[t+8]>>>0,eW=e[t+9]>>>0,eH=e[t+10]>>>0,eK=e[t+11]>>>0,eJ=e[t+12]>>>0,eQ=e[t+13]>>>0,e0=e[t+14]>>>0,e1=e[t+15]>>>0,r[eO++]=eR>>>0&65535,r[eO++]=eR>>>16&65535,r[eO++]=eN>>>0&65535,r[eO++]=eN>>>16&65535,r[eO++]=eU>>>0&65535,r[eO++]=eU>>>16&65535,r[eO++]=eq>>>0&65535,r[eO++]=eq>>>16&65535,r[eO++]=ej>>>0&65535,r[eO++]=ej>>>16&65535,r[eO++]=eG>>>0&65535,r[eO++]=eG>>>16&65535,r[eO++]=eX>>>0&65535,r[eO++]=eX>>>16&65535,r[eO++]=eY>>>0&65535,r[eO++]=eY>>>16&65535,r[eO++]=eZ>>>0&65535,r[eO++]=eZ>>>16&65535,r[eO++]=eW>>>0&65535,r[eO++]=eW>>>16&65535,r[eO++]=eH>>>0&65535,r[eO++]=eH>>>16&65535,r[eO++]=eK>>>0&65535,r[eO++]=eK>>>16&65535,r[eO++]=eJ>>>0&65535,r[eO++]=eJ>>>16&65535,r[eO++]=eQ>>>0&65535,r[eO++]=eQ>>>16&65535,r[eO++]=e0>>>0&65535,r[eO++]=e0>>>16&65535,r[eO++]=e1>>>0&65535,r[eO]=e1>>>16&65535;return;case 32:for(let i=0;i<32;i=i+1|0)r[n+i|0]=0|e[t+i|0];return}let e2=cI[i]>>>0,e3=t,e5=0,e6=e[e3]>>>0;for(let t=0;t<32;t++)if(e5+i<=32){let a=e6>>>e5&e2;r[n+t]=0|a,32===(e5+=i)&&(e5=0,e3++,31!==t&&(e6=e[e3]>>>0))}else{let a=32-e5,s=(e6>>>e5|((e6=e[++e3]>>>0)&cI[i-a]>>>0)<<a)&e2;r[n+t]=0|s,e5=i-a}})(e,t,u,h,a),t=t+a|0;t=t-((h-s|0)*a>>>5)|0,r.exceptionSizes[a]=s}return t}(e,p,a);return a.dataPointers.fill(0),function(e,t,r,n,i,a,s,o,l,u){let h=0|r,c=0;for(let t=0;t<s;t=t+1|0){let r=function(e,t,r,n){if(r+2>t)throw Error(`FastPFOR decode: byteContainer underflow at block=${n} (need 2 bytes for [bitWidth, exceptionCount], bytePos=${r}, byteSize=${t})`);let i=e[r++],a=e[r++];if(i>32)throw Error(`FastPFOR decode: invalid bitWidth=${i} at block=${n} (expected 0..32). This likely indicates corrupted or truncated input.`);return{bitWidth:i,exceptionCount:a,bytePosIn:r}}(o,l,c,t);c=r.bytePosIn;let n=r.bitWidth,s=r.exceptionCount,p=a+256*t|0;switch(n){case 0:i.fill(0,p,p+256);break;case 32:for(let t=0;t<256;t=t+1|0)i[p+t|0]=0|e[h+t|0];h=h+256|0;break;default:h=function(e,t,r,n,i){switch(i){case 1:let a=n,s=t;for(let t=0;t<8;t++){let t=e[s++]>>>0;r[a++]=t>>
2>0&1,r[a++]=t>>>1&1,r[a++]=t>>>2&1,r[a++]=t>>>3&1,r[a++]=t>>>4&1,r[a++]=t>>>5&1,r[a++]=t>>>6&1,r[a++]=t>>>7&1,r[a++]=t>>>8&1,r[a++]=t>>>9&1,r[a++]=t>>>10&1,r[a++]=t>>>11&1,r[a++]=t>>>12&1,r[a++]=t>>>13&1,r[a++]=t>>>14&1,r[a++]=t>>>15&1,r[a++]=t>>>16&1,r[a++]=t>>>17&1,r[a++]=t>>>18&1,r[a++]=t>>>19&1,r[a++]=t>>>20&1,r[a++]=t>>>21&1,r[a++]=t>>>22&1,r[a++]=t>>>23&1,r[a++]=t>>>24&1,r[a++]=t>>>25&1,r[a++]=t>>>26&1,r[a++]=t>>>27&1,r[a++]=t>>>28&1,r[a++]=t>>>29&1,r[a++]=t>>>30&1,r[a++]=t>>>31&1}break;case 2:!function(e,t,r,n){let i=n,a=t;for(let t=0;t<8;t++){let t=e[a++]>>>0,n=e[a++]>>>0;r[i++]=t>>>0&3,r[i++]=t>>>2&3,r[i++]=t>>>4&3,r[i++]=t>>>6&3,r[i++]=t>>>8&3,r[i++]=t>>>10&3,r[i++]=t>>>12&3,r[i++]=t>>>14&3,r[i++]=t>>>16&3,r[i++]=t>>>18&3,r[i++]=t>>>20&3,r[i++]=t>>>22&3,r[i++]=t>>>24&3,r[i++]=t>>>26&3,r[i++]=t>>>28&3,r[i++]=t>>>30&3,r[i++]=n>>>0&3,r[i++]=n>>>2&3,r[i++]=n>>>4&3,r[i++]=n>>>6&3,r[i++]=n>>>8&3,r[i++]=n>>>10&3,r[i++]=n>>>12&3,r[i++]=n>>>14&3,r[i++]=n>>>16&3,r[i++]=n>>>18&3,r[i++]=n>>>20&3,r[i++]=n>>>22&3,r[i++]=n>>>24&3,r[i++]=n>>>26&3,r[i++]=n>>>28&3,r[i++]=n>>>30&3}}(e,t,r,n);break;case 3:!function(e,t,r,n){let i=n,a=t;for(let t=0;t<8;t++){let t=e[a++]>>>0,n=e[a++]>>>0,s=e[a++]>>>0;r[i++]=t>>>0&7,r[i++]=t>>>3&7,r[i++]=t>>>6&7,r[i++]=t>>>9&7,r[i++]=t>>>12&7,r[i++]=t>>>15&7,r[i++]=t>>>18&7,r[i++]=t>>>21&7,r[i++]=t>>>24&7,r[i++]=t>>>27&7,r[i++]=(t>>>30|(1&n)<<2)&7,r[i++]=n>>>1&7,r[i++]=n>>>4&7,r[i++]=n>>>7&7,r[i++]=n>>>10&7,r[i++]=n>>>13&7,r[i++]=n>>>16&7,r[i++]=n>>>19&7,r[i++]=n>>>22&7,r[i++]=n>>>25&7,r[i++]=n>>>28&7,r[i++]=(n>>>31|(3&s)<<1)&7,r[i++]=s>>>2&7,r[i++]=s>>>5&7,r[i++]=s>>>8&7,r[i++]=s>>>11&7,r[i++]=s>>>14&7,r[i++]=s>>>17&7,r[i++]=s>>>20&7,r[i++]=s>>>23&7,r[i++]=s>>>26&7,r[i++]=s>>>29&7}}(e,t,r,n);break;case 4:!function(e,t,r,n){let i=n,a=t;for(let t=0;t<8;t++){let t=e[a++]>>>0,n=e[a++]>>>0,s=e[a++]>>>0,o=e[a++]>>>0;r[i++]=t>>>0&15,r[i++]=t>>>4&15,r[i++]=t>>>8&15,r[i++]=t>>>12&15,r[i++]=t>>>16&15,r[i++]=t>>>20&15,r[i++]=t>>>24&15,r[i++]=t>>>28&15,r[i++]=n>>>0&15,r[i++]=n>>>4&15,r[i++]=n>>>8&15,r[i++]=n>>>12&15,r[i++]=n>>>16&15,r[i++]=n>>>20&15,r[i++]=n>>>24&15,r[i++]=n>>>28&15,r[i++]=s>>>0&15,r[i++]=s>>>4&15,r[i++]=s>>>8&15,r[i++]=s>>>12&15,r[i++]=s>>>16&15,r[i++]=s>>>20&15,r[i++]=s>>>24&15,r[i++]=s>>>28&15,r[i++]=o>>>0&15,r[i++]=o>>>4&15,r[i++]=o>>>8&15,r[i++]=o>>>12&15,r[i++]=o>>>16&15,r[i++]=o>>>20&15,r[i++]=o>>>24&15,r[i++]=o>>>28&15}}(e,t,r,n);break;case 5:!function(e,t,r,n){let i=n,a=t;for(let t=0;t<8;t++){let t=e[a++]>>>0,n=e[a++]>>>0,s=e[a++]>>>0,o=e[a++]>>>0,l=e[a++]>>>0;r[i++]=t>>>0&31,r[i++]=t>>>5&31,r[i++]=t>>>10&31,r[i++]=t>>>15&31,r[i++]=t>>>20&31,r[i++]=t>>>25&31,r[i++]=(t>>>30|(7&n)<<2)&31,r[i++]=n>>>3&31,r[i++]=n>>>8&31,r[i++]=n>>>13&31,r[i++]=n>>>18&31,r[i++]=n>>>23&31,r[i++]=(n>>>28|(1&s)<<4)&31,r[i++]=s>>>1&31,r[i++]=s>>>6&31,r[i++]=s>>>11&31,r[i++]=s>>>16&31,r[i++]=s>>>21&31,r[i++]=s>>>26&31,r[i++]=(s>>>31|(15&o)<<1)&31,r[i++]=o>>>4&31,r[i++]=o>>>9&31,r[i++]=o>>>14&31,r[i++]=o>>>19&31,r[i++]=o>>>24&31,r[i++]=(o>>>29|(3&l)<<3)&31,r[i++]=l>>>2&31,r[i++]=l>>>7&31,r[i++]=l>>>12&31,r[i++]=l>>>17&31,r[i++]=l>>>22&31,r[i++]=l>>>27&31}}(e,t,r,n);break;case 6:!function(e,t,r,n){let i=n,a=t;for(let t=0;t<8;t++){let t=e[a++]>>>0,n=e[a++]>>>0,s=e[a++]>>>0,o=e[a++]>>>0,l=e[a++]>>>0,u=e[a++]>>>0;r[i++]=t>>>0&63,r[i++]=t>>>6&63,r[i++]=t>>>12&63,r[i++]=t>>>18&63,r[i++]=t>>>24&63,r[i++]=(t>>>30|(15&n)<<2)&63,r[i++]=n>>>4&63,r[i++]=n>>>10&63,r[i++]=n>>>16&63,r[i++]=n>>>22&63,r[i++]=(n>>>28|(3&s)<<4)&63,r[i++]=s>>>2&63,r[i++]=s>>>8&63,r[i++]=s>>>14&63,r[i++]=s>>>20&63,r[i++]=s>>>26&63,r[i++]=o>>>0&63,r[i++]=o>>>6&63,r[i++]=o>>>12&63,r[i++]=o>>>18&63,r[i++]=o>>>24&63,r[i++]=(o>>>30|(15&l)<<2)&63,r[i++]=l>>>4&63,r[i++]=l>>>10&63,r[i++]=l>>>16&63,r[i++]=l>>>22&63,r[i++]=(l>>>28|(3&u)<<4)&63,r[i++]=u>>>2&63,r[i++]=u>>>8&63,r[i++]=u>>>14&63,r[i++]=u>>>20&63,r[i++]=u>>>26&63}}(e,t,r,n);break;case 7:!function(e,t,r,n){let i=n,a=t;for(let t=0;t<8;t++){let t=e[a++]>>>0,n=e[a++]>>>0,s=e[a++]>>>0,o=e[a++]>>>0,l=e[a++]>>>0,u=e[a++]>>>0,h=e[a++]>>>0;r[i++]=t>>>0&127,r[i++]=t>>>7&127,r[i++]=t>>>14&127,r[i++]=t>>>21&127,r[i++]=(t>>>28|(7&n)<<4)&127,r[i++]=n>>>3&127,r[i++]=n>>>10&127,r[i++]=n>>>17&127,r[i++]=n>>>24&127,r[i++]=(n>>>31|(63&s)<<1)&127,r[i++]=s>>>6&127,r[i++]=s>>>13&127,r[i++]=s>>>20&127,r[i++]=(s>>>27|(3&o)<<5)&127,r[i++]=o>>>2&127,r[i++]=o>>>9&127,r[i++]=o>>>16&127,r[i++]=o>>>23&127,r[i++]=(o>>>30|(31&l)<<2)&127,r[i++]=l>>>5&127,r[i++]=l>>>12&127,r[i++]=l>>>19&127,r[i++]=(l>>>26|(1&u)<<6)&127,r[i++]=u>>>1&127,r[i++]=u>>>8&127,r[i++]=u>>>15&127,r[i++]=u>>>22&127,r[i++]=(u>>>29|(15&h)<<3)&127,r[i++]=h>>>4&127,r[i++]=h>>>11&127,r[i++]=h>>>18&127,r[i++]=h>>>25&127}}(e,t,r,n);break;case 8:!function(e,t,r,n){let i=n,a=t;for(let t=0;t<8;t++){let t=e[a++]>>>0,n=e[a++]>>>0,s=e[a++]>>>0,o=e[a++]>>>0,l=e[a++]>>>0,u=e[a++]>>>0,h=e[a++]>>>0,c=e[a++]>>>0;r[i++]=t>>>0&255,r[i++]=t>>>8&255,r[i++]=t>>>16&255,r[i++]=t>>>24&255,r[i++]=n>>>0&255,r[i++]=n>>>8&255,r[i++]=n>>>16&255,r[i++]=n>>>24&255,r[i++]=s>>>0&255,r[i++]=s>>>8&255,r[i++]=s>>>16&255,r[i++]=s>>>24&255,r[i++]=o>>>0&255,r[i++]=o>>>8&255,r[i++]=o>>>16&255,r[i++]=o>>>24&255,r[i++]=l>>>0&255,r[i++]=l>>>8&255,r[i++]=l>>>16&255,r[i++]=l>>>24&255,r[i++]=u>>>0&255,r[i++]=u>>>8&255,r[i++]=u>>>16&255,r[i++]=u>>>24&255,r[i++]=h>>>0&255,r[i++]=h>>>8&255,r[i++]=h>>>16&255,r[i++]=h>>>24&255,r[i++]=c>>>0&255,r[i++]=c>>>8&255,r[i++]=c>>>16&255,r[i++]=c>>>24&255}}(e,t,r,n);break;case 16:let o=n,l=t;for(let t=0;t<128;t++){let t=e[l++]>>>0;r[o++]=65535&t,r[o++]=t>>
2>16&65535}break;default:!function(e,t,r,n,i){let a=cI[i]>>>0,s=t,o=0,l=e[s]>>>0,u=n;for(let t=0;t<8;t++){for(let t=0;t<32;t++)if(o+i<=32){let n=l>>>o&a;r[u+t]=0|n,32===(o+=i)&&(o=0,s++,31!==t&&(l=e[s]>>>0))}else{let n=32-o,h=l>>>o;l=e[++s]>>>0;let c=i-n,p=(h|(l&-1>>>32-c>>>0)<<n)&a;r[u+t]=0|p,o=c}u+=32,o=0,t<7&&(l=e[s]>>>0)}}(e,t,r,n,i)}return t+(i<<3)|0}(e,h,i,p,n)}s>0&&(c=function(e,t,r,n,i,a,s,o,l){let{maxBits:u,exceptionBitWidth:h,bytePosIn:c}=function(e,t,r,n,i,a){if(r+1>t)throw Error(`FastPFOR decode: exception header underflow at block=${a} (need 1 byte for maxBits, bytePos=${r}, byteSize=${t})`);let s=e[r++];if(s<n||s>32)throw Error(`FastPFOR decode: invalid maxBits=${s} at block=${a} (bitWidth=${n}, expected ${n}..32)`);let o=s-n|0;if(o<1||o>32)throw Error(`FastPFOR decode: invalid exceptionBitWidth=${o} at block=${a} (bitWidth=${n}, maxBits=${s})`);if(r+i>t)throw Error(`FastPFOR decode: exception positions underflow at block=${a} (need=${i}, have=${t-r})`);return{maxBits:s,exceptionBitWidth:o,bytePosIn:r}}(i,a,s,r,n,l);if(s=c,1===h){let a=1<<r;for(let r=0;r<n;r=r+1|0){let r=i[s++];e[r+t|0]|=a}return s}let p=o.dataToBePacked[h];if(!p)throw Error(`FastPFOR decode: missing exception stream for exceptionBitWidth=${h} (bitWidth=${r}, maxBits=${u}) at block ${l}`);let f=o.dataPointers,d=0|f[h],y=0|o.exceptionSizes[h];if(d+n>y)throw Error(`FastPFOR decode: exception stream overflow for exceptionBitWidth=${h} (ptr=${d}, need ${n}, size=${y}) at block ${l}`);for(let a=0;a<n;a=a+1|0){let n=i[s++],a=0|p[d++];e[n+t|0]|=a<<r}return f[h]=d,s}(i,p,n,s,o,l,c,u,t))}if(h!==n)throw Error(`FastPFOR decode: packed region mismatch (pageStart=${t}, packedStart=${r}, consumedPackedEnd=${h}, expectedPackedEnd=${n}, packedWords=${n-r}, encoded.length=${e.length})`)}(e,s,s+1|0,l,t,0|n,i/256|0,f,u,a),d}(e,t,l,o,r,a),o=o+r|0}return l}(e,a,n,i,t,s),i=i+t|0}let o=e.length-n|0,l=t-i|0;return function(e,t,r,n,i,a){if(0===a)return;let s=0,o=t,l=t+r,u=i,h=i+a,c=0,p=0;for(;o<l&&u<h;){let t=e[o]>>>s&255;if(s+=8,o+=s>>>5,s&=31,c|=(127&t)<<p,128&t)n[u++]=0|c,c=0,p=0;else if((p+=7)>28)throw Error(`FastPFOR VByte: unterminated value (expected MSB=1 terminator within 5 bytes; shift=${p}, partial=${c}, decoded=${u-i}/${a}, inPos=${o}, inEnd=${l})`)}if(u!==h)throw Error(`FastPFOR VByte: truncated stream (decoded=${u-i}, expected=${a}, consumedWords=${o-t}/${r}, vbyteStart=${t}, vbyteEnd=${l})`)}(e,n,o,a,i,l),a}(o.subarray(0,s),t,i.decoderWorkspace);return n.add(r),l}(e,i,a=r.byteLength,t,function(e=16){if(e<0)throw RangeError(`initialEncodedWordCapacity must be >= 0, got ${e}`);return{encodedWords:new Uint32Array(Math.max(16,0|e)),decoderWorkspace:cB()}}(a>>>2));case pX.VARINT:return cP(e,t,r.numValues);case pX.NONE:return function(e,t,r){let n=t.get(),i=r*Uint32Array.BYTES_PER_ELEMENT,a=new DataView(e.buffer,e.byteOffset,e.byteLength),s=new Uint32Array(r);for(let e=0;e<r;e++)s[e]=a.getUint32(n+e*Uint32Array.BYTES_PER_ELEMENT,!0);return t.add(i),s}(e,t,r.numValues);default:throw Error(`Specified physicalLevelTechnique ${n} is not supported (yet).`)}}function pi(e,t,r){let n=r.physicalLevelTechnique;switch(n){case pX.VARINT:return cz(e,t,r.numValues);case pX.NONE:return function(e,t,r){let n=t.get(),i=r*BigUint64Array.BYTES_PER_ELEMENT,a=new DataView(e.buffer,e.byteOffset,e.byteLength),s=new BigUint64Array(r);for(let e=0;e<r;e++)s[e]=a.getBigUint64(n+e*BigUint64Array.BYTES_PER_ELEMENT,!0);return t.add(i),s}(e,t,r.numValues);default:throw Error(`Specified physicalLevelTechnique ${n} is not supported (yet).`)}}function pa(e,t,r){let n=pn(e,t,r);return 1===n.length?r.logicalLevelTechnique1===ck.DELTA?cV(n[0]):n[0]:n[1]}function ps(e,t,r){var n=pn(e,t,r);if(2===n.length){let e=cV(n[1]);return[e,e]}return[cV(n[2]),cV(n[3])]}function po(e,t,r){var n=cz(e,t,r.numValues);if(2===n.length){let e=cL(n[1]);return[e,e]}return[cL(n[2]),cL(n[3])]}function pl(e,t,r,n){return pc(pi(e,t,r),r,n)}function pu(e,t,r){let n=pi(e,t,r);return 1===n.length?r.logicalLevelTechnique1===ck.DELTA?cL(n[0]):n[0]:n[1]}function ph(e,t,r){let n;switch(t.logicalLevelTechnique1){case ck.DELTA:if(t.logicalLevelTechnique2===ck.RLE){
vendor: 9,567 bytes, line 2
2if(!r)return function(e,t,r){let n=new BigInt64Array(r),i=0,a=0n;for(let r=0;r<t;r++){let s=Number(e[r]),o=cL(e[r+t]);for(let e=0;e<s;e++)a+=o,n[i++]=a}return n}(e,t.runs,t.numRleValues);n=cq(e=cR(e,t.runs,t.numRleValues))}else n=cq(e);break;case ck.RLE:n=function(e,t,r){if(void 0===r){r=0;for(let n=0;n<t;n++)r+=Number(e[n])}let n=new BigInt64Array(r),i=0;for(let r=0;r<t;r++){let a=Number(e[r]),s=e[r+t];s=cL(s),n.fill(s,i,i+a),i+=a}return n}(e,t.runs,t.numRleValues);break;case ck.NONE:n=function(e){let t=new BigInt64Array(e.length);for(let r=0;r<e.length;r++)t[r]=cL(e[r]);return t}(e);break;default:throw Error(`The specified Logical level technique is not supported: ${t.logicalLevelTechnique1}`)}return r?c3(n,r,0n):n}function pc(e,t,r){let n;switch(t.logicalLevelTechnique1){case ck.DELTA:n=t.logicalLevelTechnique2===ck.RLE?cZ(cR(e,t.runs,t.numRleValues)):cZ(e);break;case ck.RLE:n=cR(e,t.runs,t.numRleValues);break;case ck.NONE:n=e;break;default:throw Error(`The specified Logical level technique is not supported: ${t.logicalLevelTechnique1}`)}return r?c3(n,r,0n):n}function pp(e,t,r,n,i="int32"){let a=e.logicalLevelTechnique1;if(a===ck.RLE)return 1===e.runs?pK.CONST:pK.FLAT;if(a!==ck.DELTA||e.logicalLevelTechnique2!==ck.RLE)return 1===e.numValues?pK.CONST:pK.FLAT;let s=t instanceof c2?t.size():t;if(e.numRleValues!==s)return pK.FLAT;if(1===e.runs)return pK.SEQUENCE;if(2!==e.runs)return 1===e.numValues?pK.CONST:pK.FLAT;let o=n.get();if(e.physicalLevelTechnique===pX.VARINT)return!function(e,t,r){let n=new cT(t.get());if("int64"===r){let t=cz(e,n,4);return 2n===t[2]&&2n===t[3]}let i=cP(e,n,4);return 2===i[2]&&2===i[3]}(r,n,i)?1===e.numValues?pK.CONST:pK.FLAT:pK.SEQUENCE;let l=n.get(),u=new Int32Array(r.buffer,r.byteOffset+l,4);return n.set(o),2===u[2]&&2===u[3]?pK.SEQUENCE:1===e.numValues?pK.CONST:pK.FLAT}var pf=class extends cx{getValueFromBuffer(e){return this.dataBuffer[e]}},pd=class extends cw{constructor(e,t,r,n,i){super(e,i?BigInt64Array.of(t):BigUint64Array.of(t),r,n)}getValueFromBuffer(e){return this.dataBuffer[0]+BigInt(e)*this.delta}};function py(e,t,r){return{x:pm(e,t)-r,y:pm(e>>1,t)-r}}function pm(e,t){let r=0;for(let n=0;n<t;n++)r|=(e&1<<2*n)>>n;return r}function pg(e,t,r,n,i,a,s){return e===p0.MORTON?function(e,t,r,n,i,a){let s=Array(i?n+1:n);for(let i=0;i<n;i++){let n=py(e[t[r+i]],a.numBits,a.coordinateShift);s[i]=new P(n.x,n.y)}return i&&(s[s.length-1]=s[0]),s}(t,r,n,i,a,s):function(e,t,r,n,i){let a=Array(i?n+1:n);for(let i=0;i<2*n;i+=2){let n=2*t[r+i/2],s=e[n],o=e[n+1];a[i/2]=new P(s,o)}return i&&(a[a.length-1]=a[0]),a}(t,r,n,i,a)}function px(e,t,r,n){let i=Array(n?r+1:r);for(let n=0;n<2*r;n+=2){let r=e[t+n],a=e[t+n+1];i[n/2]=new P(r,a)}return n&&(i[i.length-1]=i[0]),i}(pq=pJ||={})[pq.POINT=0]="POINT",pq[pq.LINESTRING=1]="LINESTRING",pq[pq.POLYGON=2]="POLYGON",pq[pq.MULTIPOINT=3]="MULTIPOINT",pq[pq.MULTILINESTRING=4]="MULTILINESTRING",pq[pq.MULTIPOLYGON=5]="MULTIPOLYGON",(pj=pQ||={})[pj.POINT=0]="POINT",pj[pj.LINESTRING=1]="LINESTRING",pj[pj.POLYGON=2]="POLYGON",(pG=p0||={})[pG.MORTON=0]="MORTON",pG[pG.VEC_2=1]="VEC_2",pG[pG.VEC_3=2]="VEC_3";var pv=class{constructor(e,t,r,n,i){this._vertexBufferType=e,this._topologyVector=t,this._vertexOffsets=r,this._vertexBuffer=n,this._mortonSettings=i}get vertexBufferType(){return this._vertexBufferType}get topologyVector(){return this._topologyVector}get vertexOffsets(){return this._vertexOffsets}get vertexBuffer(){return this._vertexBuffer}getSimpleEncodedVertex(e){let t=this.vertexOffsets?2*this.vertexOffsets[e]:2*e;return[this.vertexBuffer[t],this.vertexBuffer[t+1]]}getVertex(e){if(this.vertexOffsets&&this.mortonSettings){let t=this.vertexOffsets[e],r=py(this.vertexBuffer[t],this.mortonSettings.numBits,this.mortonSettings.coordinateShift);return[r.x,r.y]}let t=this.vertexOffsets?2*this.vertexOffsets[e]:2*e;return[this.vertexBuffer[t],this.vertexBuffer[t+1]]}getGeometries(){return function(e){let t=Array(e.numGeometries),r=1,n=1,i=1,a=0,s=0,o=0,l=e.mortonSettings,u=e.topologyVector,h=u.geometryOffsets,c=u.partOffsets,p=u.ringOffsets,f=e.vertexOffsets,d=!f||0===f.length,y=e.containsPolygonGeometry(),m=e.vertexBuffer;for(let u=0;u<e.numGeometries;u++){let g=e.geometryType(u);switch(g){case pJ.POINT:{let u,y;if(d)u=m[s++],y=m[s++];else if(e.vertexBufferType===p0.MORTON){let e=py(m[f[o++]],l.numBits,l.coordinateShift);u=e.x,y=e.y}else{let e=2*f[o++];u=m[e],y=m[e+1]}t[a++]=[[new P(u,y)]],h&&i++,c&&r++,p&&n++}break;case pJ.MULTIPOINT:{let u,c=h[i]-h[i-1];if(i++,d){u=Array(c);for(let e=0;e<c;e++){let t=m[s++],r=m[s++];u[e]=new P(t,r)}}else u=pg(e.vertexBufferType,m,f,o,c,!1,l),o+=c;t[a++]=u.map(e=>[e]),r+=c,n+=c}break;case pJ.LINESTRING:{let u,g;y?(u=p[n]-p[n-1],n++):u=c[r]-c[r-1],r++,d?(g=px(m,s,u,!1),s+=2*u):(g=pg(e.vertexBufferType,m,f,o,u,!1,l),o+=u),t[a++]=[g],h&&i++}break;case pJ.POLYGON:{let u=c[r]-c[r-1];r++;let y=Array(u-1),g,x=p[n]-p[n-1];if(n++,d){g=px(m,s,x,!0),s+=2*x;for(let e=0;e<y.length;e++)x=p[n]-p[n-1],n++,y[e]=px(m,s,x,!0),s+=2*x}else{g=pg(e.vertexBufferType,m,f,o,x,!0,l),o+=x;for(let t=0;t<y.length;t++)x=p[n]-p[n-1],n++,y[t]=pg(e.vertexBufferType,m,f,o,x,!0,l),o+=x}t[a++]=[g].concat(y),h&&i++}break;case pJ.MULTILINESTRING:{let u=h[i]-h[i-1];i++;let g=Array(u);for(let t=0;t<u;t++){let i;if(y?(i=p[n]-p[n-1],n++):i=c[r]-c[r-1],r++,d)g[t]=px(m,s,i,!1),s+=2*i;else{let r=pg(e.vertexBufferType,m,f,o,i,!1,l);g[t]=r,o+=i}}t[a++]=g}break;case pJ.MULTIPOLYGON:{let u=h[i]-h[i-1];i++;let y=Array(u);for(let t=0;t<u;t++){let i=c[r]-c[r-1];r++;let a,u=Array(i-1),h=p[n]-p[n-1];n++,d?(a=px(m,s,h,!0),s+=2*h):(a=pg(e.vertexBufferType,m,f,o,h,!0,l),o+=h);for(let t=0;t<u.length;t++){let r=p[n]-p[n-1];n++,d?(u[t]=px(m,s,r,!0),s+=2*r):(u[t]=pg(e.vertexBufferType,m,f,o,r,!0,l),o+=r)}y[t]=[a].concat(u)}t[a++]=y.flat()}break;default:throw Error(`The specified geometry type (${g}) is currently not supported.`)}}return t}(this)}get mortonSettings(){return this._mortonSettings}},pb=class extends pv{constructor(e,t,r,n,i,a,s){super(r,n,i,a,s),this._numGeometries=e,this._geometryType=t}geometryType(e){return this._geometryType}get numGeometries(){return this._numGeometries}containsPolygonGeometry(){return this._geometryType===pJ.POLYGON||this._geometryType===pJ.MULTIPOLYGON}containsSingleGeometryType(){return!0}};function pw(e,t,r,n){return new p_(p0.VEC_2,e,t,r,n)}var p_=class extends pv{constructor(e,t,r,n,i,a){super(e,r,n,i,a),this._geometryTypes=t}geometryType(e){return this._geometryTypes[e]}get numGeometries(){return this._geometryTypes.length}containsPolygonGeometry(){for(let e=0;e<this.numGeometries;e++)if(this.geometryType(e)===pJ.POLYGON||this.geometryType(e)===pJ.MULTIPOLYGON)return!0;return!1}containsSingleGeometryType(){return!1}},pA=class{constructor(e,t,r,n){this._triangleOffsets=e,this._indexBuffer=t,this._vertexBuffer=r,this._topologyVector=n}get triangleOffsets(){return this._triangleOffsets}get indexBuffer(){return this._indexBuffer}get vertexBuffer(){return this._vertexBuffer}get topologyVector(){return this._topologyVector}getGeometries(){if(!this._topologyVector)throw Error("Cannot convert GpuVector to coordinates without topology information");let e=new Uint32Array(this.numGeometries);for(let t=0;t<this.numGeometries;t++)e[t]=this.geometryType(t);return pw(e,this._topologyVector,void 0,this._vertexBuffer).getGeometries()}[Symbol.iterator](){return null}},pD=class extends pA{constructor(e,t,r,n,i,a){super(r,n,i,a),this._numGeometries=e,this._geometryType=t}geometryType(e){return this._geometryType}get numGeometries(){return this._numGeometries}containsSingleGeometryType(){return!0}},pS=class extends pA{constructor(e,t,r,n,i){super(t,r,n,i),this._geometryTypes=e}geometryType(e){return this._geometryTypes[e]}get numGeometries(){return this._geometryTypes.length}containsSingleGeometryType(){return!1}};function pE(e,t,r){let n=new Uint32Array(e.length+1),i=0;n[0]=i;let a=0;for(let s=0;s<e.length;s++)i=n[s+1]=i+(e[s]>r?t[a++]:1);return n}function pF(e,t,r,n){let i=new Uint32Array(t[t.length-1]+1),a=0;i[0]=a;let s=1,o=0;for(let l=0;l<e.length;l++){let u=e[l],h=t[l+1]-t[l];if(5===u||2===u||n&&(4===u||1===u))for(let e=0;e<h;e++)a=i[s++]=a+r[o++];else for(let e=0;e<h;e++)i[s++]=++a}return i}var pk=class extends cg{constructor(e,t,r){super(e,t.getBuffer(),r),this.dataVector=t}getValueFromBuffer(e){return this.dataVector.get(e)}},pT=class extends cx{getValueFromBuffer(e){return this.dataBuffer[e]}},pI=class extends cg{constructor(e,t,r,n){super(e,n?BigInt64Array.of(t):BigUint64Array.of(t),r)}getValueFromBuffer(e){return this.dataBuffer[0]}},pC=class extends cg{constructor(e,t,r,n){super(e,r,n),this.offsetBuffer=t}},pM=class extends pC{constructor(e,t,r,n){super(e,t,r,n??t.length-1)}getValueFromBuffer(e){let t=this.offsetBuffer[e],r=this.offsetBuffer[e+1];return c9(this.dataBuffer,t,r)}},pB=class extends pC{constructor(e,t,r,n,i){super(e,r,n,i??t.length),this.indexBuffer=t,this.indexBuffer=t}getValueFromBuffer(e){let t=this.indexBuffer[e],r=this.offsetBuffer[t],n=this.offsetBuffer[t+1];return c9(this.dataBuffer,r,n)}},pP=class extends pC{constructor(e,t,r,n,i,a,s,o){super(e,r,n,s??t.length),this.indexBuffer=t,this.symbolOffsetBuffer=i,this.symbolTableBuffer=a,this.sharedDictionaryCache=o}getValueFromBuffer(e){this.decodedDictionary??(this.decodedDictionary=this.sharedDictionaryCache?.decodedDictionary,this.decodedDictionary??(this.decodedDictionary=this.decodeDictionary(),this.sharedDictionaryCache&&(this.sharedDictionaryCache.decodedDictionary=this.decodedDictionary)));let t=this.indexBuffer[e],r=this.offsetBuffer[t],n=this.offsetBuffer[t+1];
2return c9(this.decodedDictionary,r,n)}decodeDictionary(){return this.symbolLengthBuffer??=this.offsetToLengthBuffer(this.symbolOffsetBuffer),function(e,t,r){let n=new Uint32Array(t.length);for(let e=1;e<t.length;e++)n[e]=n[e-1]+t[e-1];let i=new Uint8Array(function(e,t){let r=0;for(let n=0;n<t.length;n++){let i=t[n];255===i?(r++,n++):r+=e[i]}return r}(t,r)),a=0;for(let s=0;s<r.length;s++){let o=r[s];if(255===o)s++,i[a++]=r[s];else{let r=t[o],s=n[o];for(;r-- >0;)i[a++]=e[s++]}}return i}(this.symbolTableBuffer,this.symbolLengthBuffer,this.dataBuffer)}offsetToLengthBuffer(e){let t=new Uint32Array(e.length-1),r=e[0];for(let n=1;n<e.length;n++){let i=e[n];t[n-1]=i-r,r=i}return t}};function pz(e,t,r,n,i){let a,s,o,l,u,h=i,c,p;for(let e=0;e<n;e++){let e=c1(t,r);switch(e.physicalStreamType){case pY.PRESENT:{let n=new c2(c6(t,e.numValues,e.byteLength,r),e.numValues);h=i??n;break}case pY.OFFSET:s=pt(t,r,e,void 0,h);break;case pY.LENGTH:{let n=pr(t,r,e);pH.DICTIONARY===e.logicalStreamType.lengthType?a=n:pH.SYMBOL===e.logicalStreamType.lengthType?l=n:c=n;break}case pY.DATA:{let n=t.subarray(r.get(),r.get()+e.byteLength);r.add(e.byteLength);let i=e.logicalStreamType.dictionaryType;pZ.FSST===i?u=n:pZ.SINGLE===i||pZ.SHARED===i?o=n:pZ.NONE===i&&(p=n)}}}return function(e,t,r,n,i,a,s){if(t){if(!r||!n||!i||!a)throw Error(`Incomplete FSST dictionary string column "${e}"`);return new pP(e,r,n,i,a,t,s)}}(e,u,s,a,o,l,h)??function(e,t,r,n,i){if(t){if(!r||!n)throw Error(`Incomplete dictionary string column "${e}"`);return i?new pB(e,r,n,t,i):new pB(e,r,n,t)}}(e,o,s,a,h)??function(e,t,r,n,i){if(t&&r){if(n)return i?new pB(e,n,t,r,i):new pB(e,n,t,r);if(i&&i.size()!==t.length-1){let n=new Uint32Array(i.size()),a=0;for(let e=0;e<i.size();e++)i.get(e)?n[e]=a++:n[e]=0;return new pB(e,n,t,r,i)}return i?new pM(e,t,r,i):new pM(e,t,r)}}(e,c,p,s,h)}var pV,pL,p$,pO,pR,pN,pU,pq,pj,pG,pX,pY,pZ,pW,pH,pK,pJ,pQ,p0,p1,p2=class extends cg{constructor(e,t,r){super(e,new Uint8Array,r??t.length),this.values=t}getValueFromBuffer(e){return this.values[e]}};function p3(e,t,r,n){let i=Object.create(null),a=t;for(;a<r;){let t=p4(e[a++],n);if("string"!=typeof t)throw Error(`Map key dictionary index does not resolve to a string: ${t}`);let s=p5(e,a,r,n);i[t]=s.value,a=s.nextIndex}return{value:i,nextIndex:a}}function p5(e,t,r,n){if(t>=r)throw Error("Unexpected end of map value stream");let i=e[t];if(i===E.FALSE)return{value:!1,nextIndex:t+1};if(i===E.TRUE)return{value:!0,nextIndex:t+1};if(i===E.START_MAP){let i=p6(e,t,r);return{value:p3(e,t+2,i,n).value,nextIndex:i}}if(i===E.START_LIST){let i=p6(e,t,r),a=[],s=t+2;for(;s<i;){let t=p5(e,s,i,n);a.push(t.value),s=t.nextIndex}return{value:a,nextIndex:i}}return{value:p4(i,n),nextIndex:t+1}}function p6(e,t,r){if(t+1>=r)throw Error("Missing length for nested map/list payload");let n=e[t+1];if(n<2)throw Error(`Invalid nested payload length: ${n}`);let i=t+n;if(i>r)throw Error("Nested payload exceeds containing payload bounds");return i}function p4(e,t){let r=e-E.COUNT;if(r<0||r>=t.length)throw Error(`Scalar dictionary index out of range: ${e}`);return t[r]}function p8(e,t){for(let r of t)e.push(r)}function p7(e){return e instanceof c2}(D=p1||={})[D.STRING=1]="STRING",D[D.INT32=2]="INT32",D[D.UINT32=4]="UINT32",D[D.INT64=8]="INT64",D[D.UINT64=16]="UINT64",D[D.FLOAT=32]="FLOAT",D[D.DOUBLE=64]="DOUBLE",D[D.PRESENCE=128]="PRESENCE",(S=E||={})[S.FALSE=0]="FALSE",S[S.TRUE=1]="TRUE",S[S.START_MAP=2]="START_MAP",S[S.START_LIST=3]="START_LIST",S[S.COUNT=4]="COUNT";function p9(e){switch(e){case 0:case 1:case 2:case 3:return{nullable:(1&e)!=0,columnScope:0,type:"scalarType",scalarType:{longID:(2&e)!=0,type:"logicalType",logicalType:0}};case 4:return{nullable:!1,columnScope:0,type:"complexType",complexType:{type:"physicalType",physicalType:0,children:[]}};case 30:return{nullable:!1,columnScope:0,type:"complexType",complexType:{type:"physicalType",physicalType:1,children:[]}};case 31:return{nullable:!0,columnScope:0,type:"complexType",complexType:{type:"physicalType",physicalType:2,children:[]}};default:let t;var r=e;switch(r){case 10:case 11:t=0;break;case 12:case 13:t=1;break;case 14:case 15:t=2;break;case 16:case 17:t=3;break;case 18:case 19:t=4;break;case 20:case 21:t=5;break;case 22:case 23:t=6;break;case 24:case 25:t=7;break;case 26:case 27:t=8;break;case 28:case 29:t=9;break;default:return null}return{nullable:!!(1&r),columnScope:0,type:"scalarType",scalarType:{longID:!1,t
2ype:"physicalType",physicalType:t}}}}function fe(e){return 30===e||31===e}let ft=new TextDecoder,fr="0-3(ID), 4(GEOMETRY), 10-29(scalars), 30(STRUCT), 31(MAP)";function fn(e,t){let r=cP(e,t,1)[0];if(0===r)return"";let n=t.get(),i=e.subarray(n,n+r);return t.add(r),ft.decode(i)}var fi=class{constructor(e,t){switch(this._featureData=e,this.properties=this._featureData.properties||{},this._featureData.geometry?.type){case pJ.POINT:case pJ.MULTIPOINT:this.type=1;break;case pJ.LINESTRING:case pJ.MULTILINESTRING:this.type=2;break;case pJ.POLYGON:case pJ.MULTIPOLYGON:this.type=3;break;default:this.type=0}this.extent=t,this.id=Number(this._featureData.id)}loadGeometry(){let e=[];for(let t of this._featureData.geometry.coordinates){let r=[];for(let e of t)r.push(new P(e.x,e.y));e.push(r)}return e}},fa=class{constructor(e){this.features=[],this.featureTable=e,this.name=e.name,this.extent=e.extent,this.version=2,this.features=e.getFeatures(),this.length=this.features.length}feature(e){return new fi(this.features[e],this.extent)}},fs=class{constructor(e){this.layers={};let t=function(e,t=!0){let r=new cT(0),n=[];for(;r.get()<e.length;){let s=cP(e,r,1)[0]>>>0,o=r.get()+s;if(o>e.length)throw Error(`Block overruns tile: ${o} > ${e.length}`);let l=cP(e,r,1)[0]>>>0;if(1!==l&&2!==l){r.set(o);continue}let[u,h]=function(e,t){let r={};r.featureTables=[];let n={};if(n.name=fn(e,t),0===n.name.length)throw Error("Missing layer name");let i=cP(e,t,1)[0]>>>0,a=cP(e,t,1)[0]>>>0;n.columns=Array(a);for(let r=0;r<a;r++)n.columns[r]=function(e,t){let r,n=cP(e,t,1)[0]>>>0,i=p9(n);if(!i)throw Error(`Unsupported column type code ${n}. Supported: ${fr}`);if(n>=10)r=fn(e,t);else if(n<4)r="id";else if(4===n)r="geometry";else throw Error(`Unsupported column type code ${n}. Supported: ${fr}`);let a={...i,name:r};if("complexType"===a.type&&fe(n)){let r=cP(e,t,1)[0]>>>0,n=a.complexType;n.children=Array(r);for(let i=0;i<r;i++)n.children[i]=function e(t,r){let n,i,a=cP(t,r,1)[0]>>>0,s=a>=10?p9(a):null;if(!s)throw Error(`Unsupported field type code ${a}. Supported: 10-29(scalars), 30(STRUCT), 31(MAP)`);let o={...s,name:fn(t,r)};if("complexType"===o.type&&fe(a)){let n=o.complexType,i=cP(t,r,1)[0]>>>0;n.children=Array(i);for(let a=0;a<i;a++)n.children[a]=e(t,r)}return n=o.name,i=o.nullable,"scalarType"===o.type?{type:"scalarField",scalarField:o.scalarType,name:n,nullable:i}:{type:"complexField",complexField:o.complexType,name:n,nullable:i}}(e,t)}return a}(e,t);return r.featureTables.push(n),[r,i]}(e,r),c=u.featureTables[0],p=null,f=null,d=[],y=0;for(let n of c.columns){var i,a;let s=n.name;if("scalarType"===n.type&&n.scalarType?.type==="logicalType"&&0===n.scalarType.logicalType){let i=null;if(n.nullable){let t=c1(e,r),n=r.get(),a=c6(e,t.numValues,t.byteLength,r);r.set(n+t.byteLength),i=new c2(a,t.numValues)}let a=c1(e,r);y=i?i.size():a.decompressedCount,p=function(e,t,r,n,i,a,s=!1){let o=t.scalarType?.longID?6:4,l="number"==typeof a?void 0:a,u=pp(i,a,e,r,6===o?"int64":"int32");if(4===o)switch(u){case pK.FLAT:return new cv(n,pt(e,r,i,void 0,l),a);case pK.SEQUENCE:{let t=ps(e,r,i);return new c_(n,t[0],t[1],i.numRleValues,!1)}case pK.CONST:return new cA(n,pa(e,r,i),a,!1)}switch(u){case pK.FLAT:let h;return s?new cb(n,(h=function(e,t,r,n){if(r.physicalLevelTechnique===pX.VARINT)return function(e,t,r){switch(t.logicalLevelTechnique1){case ck.DELTA:return t.logicalLevelTechnique2===ck.RLE&&(e=cN(e,t.runs,t.numRleValues)),function(e){e[0]=c$(e[0]);let t=e.length/4*4,r=1;if(t>=4)for(;r<t-4;r+=4){let t=e[r],n=e[r+1],i=e[r+2],a=e[r+3];e[r]=c$(t)+e[r-1],e[r+1]=c$(n)+e[r],e[r+2]=c$(i)+e[r+1],e[r+3]=c$(a)+e[r+2]}for(;r!==e.length;++r)e[r]=c$(e[r])+e[r-1]}(e),e;case ck.RLE:var n,i;return n=e,i=t,r?function(e,t,r){let n=new Float64Array(r),i=0;for(let r=0;r<t;r++){let a=e[r],s=e[r+t];s=c$(s),n.fill(s,i,i+a),i+=a}return n}(n,i.runs,i.numRleValues):cN(n,i.runs,i.numRleValues);case ck.NONE:return r&&function(e){for(let t=0;t<e.length;t++)e[t]=c$(e[t])}(e),e;default:throw Error(`The specified Logical level technique is not supported: ${t.logicalLevelTechnique1}`)}}(function(e,t,r){let n=new Float64Array(r);for(let i=0;i<r;i++)n[i]=function(e,t){let r,n;return n=e[t.get()],t.increment(),r=127&n,n<128||(n=e[t.get()],t.increment(),r|=(127&n)<<7,n<128)||(n=e[t.get()],t.increment(),r|=(127&n)<<14,n<128)||(n=e[t.get()],t.increment(),r|=(127&n)<<21,n<128)?r:function(e,t,r){let n,i;if(i=t[r.get()],r.increment(),n=(112&i)>>4,i<128||(i=t[r.get()],r.increment(),n|=(127&i)<<3,i<128)||(i=t[r.get()],r.increment(),n|=(127&i)<<10,i<128)||(i=t[r.get()],r.increment(),n|=(127&i)<<17,i<128)||(i=t[r.get()],r.increment(),n|=(127&i)<<24,i<128)||(i=t[r.get()],r.increment(),n|=(1&i)<<31,i<128))return 0x100000000*n+(e>>>0);throw Error("Expected varint not more than 10 bytes")}(r|=(15&(n=e[t.get()]))<<28,e,t)}(e,t);return n}(e,t,r.numValues),r,n);let i=pi(e,t,r),a=n?ph(i,r):pc(i,r);return Float64Array.from(a,Number)}(e,r,i,!1),l?c3(h,l,0):h),a):new pf(n,pl(e,r,i,l),a);
2case pK.SEQUENCE:{let t=po(e,r,i);return new pd(n,t[0],t[1],i.numRleValues,!1)}case pK.CONST:return new pI(n,pu(e,r,i),a,!1)}throw Error("Vector type not supported for id column.")}(e,n,r,s,a,i??y,t)}else if("complexType"===n.type&&n.complexType?.type==="physicalType"&&0===n.complexType.physicalType){let t=cP(e,r,1)[0];if(0===y){let t=r.get();y=c1(e,r).decompressedCount,r.set(t)}f=function(e,t,r,n,i){var a,s,o,l,u,h,c,p,f,d,y;let m,g,x,v=c1(e,r),b,w,_,A;if(pp(v,n,e,r)===pK.CONST){let p=pa(e,r,v),f,d,y,m;for(let n=0;n<t-1;n++){let t=c1(e,r);switch(t.physicalStreamType){case pY.LENGTH:switch(t.logicalStreamType.lengthType){case pH.GEOMETRIES:f=pr(e,r,t);break;case pH.PARTS:d=pr(e,r,t);break;case pH.RINGS:y=pr(e,r,t);break;case pH.TRIANGLES:m=pr(e,r,t)}break;case pY.OFFSET:switch(t.logicalStreamType.offsetType){case pW.VERTEX:b=pt(e,r,t);break;case pW.INDEX:A=pt(e,r,t)}break;case pY.DATA:pZ.VERTEX===t.logicalStreamType.dictionaryType?w=pe(e,r,t,i):(_={numBits:t.numBits,coordinateShift:t.coordinateShift},w=pt(e,r,t,i))}}return A?void 0!==f||void 0!==d?new pD(n,p,m,A,w,{geometryOffsets:f,partOffsets:d,ringOffsets:y}):new pD(n,p,m,A,w,void 0):void 0===_?(a={geometryOffsets:f,partOffsets:d,ringOffsets:y},s=b,o=w,new pb(n,p,p0.VEC_2,a,s,o)):(l={geometryOffsets:f,partOffsets:d,ringOffsets:y},u=b,h=w,c=_,new pb(n,p,p0.MORTON,l,u,h,c))}let D=pt(e,r,v),S,E,F,k;for(let n=0;n<t-1;n++){let t=c1(e,r);switch(t.physicalStreamType){case pY.LENGTH:switch(t.logicalStreamType.lengthType){case pH.GEOMETRIES:S=pt(e,r,t);break;case pH.PARTS:E=pt(e,r,t);break;case pH.RINGS:F=pt(e,r,t);break;case pH.TRIANGLES:k=pr(e,r,t)}break;case pY.OFFSET:switch(t.logicalStreamType.offsetType){case pW.VERTEX:b=pt(e,r,t);break;case pW.INDEX:A=pt(e,r,t)}break;case pY.DATA:pZ.VERTEX===t.logicalStreamType.dictionaryType?w=pe(e,r,t,i):(_={numBits:t.numBits,coordinateShift:t.coordinateShift},w=pt(e,r,t,i))}}return S?(m=pE(D,S,2),E&&F?(g=pF(D,m,E,!1),x=function(e,t,r,n){let i=new Uint32Array(r[r.length-1]+1),a=0;i[0]=a;let s=1,o=1,l=0;for(let u=0;u<e.length;u++){let h=e[u],c=t[u+1]-t[u];if(0!==h&&3!==h)for(let e=0;e<c;e++){let e=r[s]-r[s-1];s++;for(let t=0;t<e;t++)a=i[o++]=a+n[l++]}else for(let e=0;e<c;e++)i[o++]=++a,s++}return i}(D,m,g,F)):E&&(g=function(e,t,r){let n=new Uint32Array(t[t.length-1]+1),i=0;n[0]=i;let a=1,s=0;for(let o=0;o<e.length;o++){let l=e[o],u=t[o+1]-t[o];if(4===l||1===l)for(let e=0;e<u;e++)i=n[a++]=i+r[s++];else for(let e=0;e<u;e++)n[a++]=++i}return n}(D,m,E))):E&&F?(g=pE(D,E,1),x=pF(D,g,F,!0)):E&&(g=pE(D,E,0)),A&&!g?new pS(D,k,A,w,void 0):A?new pS(D,k,A,w,{geometryOffsets:m,partOffsets:g,ringOffsets:x}):void 0===_?pw(D,{geometryOffsets:m,partOffsets:g,ringOffsets:x},b,w):(p={geometryOffsets:m,partOffsets:g,ringOffsets:x},f=b,d=w,y=_,new p_(p0.MORTON,D,p,f,d,y))}(e,t,r,y,void 0)}else{let t=!function(e){if("scalarType"===e.type){let t=e.scalarType;if("physicalType"===t.type)switch(t.physicalType){case 0:case 1:case 2:case 3:case 4:case 5:case 6:case 7:case 8:default:return!1;case 9:return!0}if("logicalType"===t.type)return!1}else if("complexType"===e.type){let t=e.complexType;if("physicalType"===t.type)switch(t.physicalType){case 0:case 1:case 2:return!0;default:return!1}}return console.warn("Unexpected column type in hasStreamCount",e),!1}(n)?1:cP(e,r,1)[0];if(0===t)continue;let s=(i=y,a=void 0,"scalarType"===n.type?a&&!a.has(n.name)?(c5(t,e,r),null):function(e,t,r,n,i,a){let s;if(0===e)return null;if(a.nullable){let e=c1(t,r),n=e.numValues,i=r.get(),a=c6(t,n,e.byteLength,r);r.set(i+e.byteLength),s=new c2(a,e.numValues)}let o=s??n;switch(i.physicalType){case 4:case 3:return function(e,t,r,n,i){let a=c1(e,t),s=pp(a,i,e,t),o=3===n.physicalType;if(s===pK.FLAT){let n=p7(i)?i:void 0,s=o?pe(e,t,a,void 0,n):pt(e,t,a,void 0,n);return new cv(r.name,s,i)}if(s===pK.SEQUENCE){let n=ps(e,t,a);return new c_(r.name,n[0],n[1],a.numRleValues,o)}let l=o?function(e,t,r){let n=pn(e,t,r);return 1===n.length?cV(n[0]):cV(n[1])}(e,t,a):pa(e,t,a);return new cA(r.name,l,i,o)}(t,r,a,i,o);case 9:{let n=a.nullable?e-1:e;return pz(a.name,t,r,n,s)??null}case 0:return function(e,t,r,n){let i=c1(e,t),a=i.numValues,s=t.get(),o=p7(n)?n:void 0,l=c6(e,a,i.byteLength,t,o);t.set(s+i.byteLength);let u=new c2(l,a);return new pk(r.name,u,n)}(t,r,a,o);case 6:case 5:return function(e,t,r,n,i){let a=c1(e,t),s=pp(a,n,e,t,"int64"),o=5===i.physicalType;if(s===pK.FLAT){let i=p7(n)?n:void 0,s=o?ph(pi(e,t,a),a,i):pl(e,t,a,i);return new pf(r.name,s,n)}if(s===pK.SEQUENCE){let n=po(e,t,a);return new pd(r.name,n[0],n[1],a.numRleValues,o)}let l=o?function(e,t,r){let n=pi(e,t,r);return 1===n.length?cL(n[0]):cL(n[1])}(e,t,a):pu(e,t,a);return new pI(r.name,l,n,o)}(t,r,a,o,i);case 7:return function(e,t,r,n){let i=c1(e,t),a=p7(n)?n:void 0,s=c4(e,t,i.numValues,a);return new pT(r.name,s,n)}(t,r,a,o);case 8:return function(e,t,r,n){let i=c1(e,t),a=p7(n)?n:void 0,s=c8(e,t,i.numValues,a);return new cb(r.name,s,n)}(t,r,a,o);default:throw Error(`The specified data type for the field is currently not supported: ${i}`)}}(t,e,r,i,n.scalarType,n):n.complexType?.physicalType===2?function(e,t,r,n){let i=function(e){let t="complexType"===e.type?e.complexType.children:void 0;return t&&0!==t.length?t.map(t=>e.name+(t.name??"")):[e.name]}(r);if(0===n)return i.map(e=>new p2(e,[]));let a=function(e,t,r){let n=e[t.get()];t.add(1);let i=pt(e,t,c1(e,t)),a=r-1,s=[];n&p1.STRING&&(a-=function(e,t,r){let n=e[t.get()];t.add(1);let i=pz("",e,t,n);if(i)for(let e=0;e<i.size;e++)r.push(i.getValue(e));return n}(e,t,s)),a-=function(e,t,r,n){var i;let a=0;return r&p1.INT32?(p8(n,pe(e,t,c1(e,t))),a++):r&p1.INT64&&(p8(n,ph(pi(e,t,i=c1(e,t)),i,void 0)),a++),r&p1.UINT32?(p8(n,pt(e,t,c1(e,t))),a++):r&p1.UINT64&&(p8(n,pl(e,t,c1(e,t))),a++),a}(e,t,n,s),a-=function(e,t,r,n){let i=0;return r&p1.FLOAT&&(p8(n,c4(e,t,c1(e,t).numValues)),i++),r&p1.DOUBLE&&(p8(n,c8(e,t,c1(e,t).numValues)),i++),i}(e,t,n,s);let o,l=0;if(n&p1.PRESENCE){let r=function(e,t){let r=c1(e,t);if(r.physicalStreamType!==pY.PRESENT)throw Error(`Expected PRESENT stream for map column but found: ${r.physicalStreamType}`);
2let n=r.numValues,i=t.get(),a=new c2(c6(e,n,r.byteLength,t),n);return t.set(i+r.byteLength),{value:a,count:n}}(e,t);o=r.value,l=r.count,a--}let u=new Uint32Array;if(a>0&&(u=pt(e,t,c1(e,t)),a--),0!==a)throw Error(`Unexpected number of remaining streams while decoding map column: ${a}`);return{lengthStream:i,dictionary:s,presentStream:o,presentCount:l,flattenedValues:u}}(e,t,n),s=(a.presentStream?a.presentCount:a.lengthStream.length)/i.length,o=[],l=0,u=0;for(let e=0;e<i.length;e++){let t=function(e,t,r,n,i){let{lengthStream:a,flattenedValues:s,presentStream:o,dictionary:l}=e,u=t*r,h=r,c;if(o){c=new c2(new Uint8Array(Math.ceil(r/8)),r),h=0;for(let e=0;e<r;e++)o.get(u+e)&&(c.set(e,!0),h++)}let p=n+h;if(p>a.length)throw Error("Merged map counts underflow while decoding child streams");let f=Array(r),d=n,y=i;for(let e=0;e<r;e++){var m,g,x,v;if(o&&!o.get(u+e)){f[e]=null;continue}let t=y+a[d++];if(t>s.length)throw Error("Map value stream underflow while decoding feature payload");let r=(m=s,g=y,x=t,v=l,x-g==1||m[g]===E.START_LIST?p5(m,g,x,v):p3(m,g,x,v));f[e]=r.value,y=r.nextIndex}let b=0;for(let e=n;e<p;e++)b+=a[e];let w=i+b;if(y!==w)throw Error("Unused flattened map values remain after decode");return{value:f,nullabilityBuffer:c,countsEnd:p,valuesEnd:w}}(a,e,s,l,u);o.push(new p2(i[e],t.value,t.nullabilityBuffer)),l=t.countsEnd,u=t.valuesEnd}return o}(e,r,n,t):0===t?null:function(e,t,r,n){let i,a,s,o,l=!1;for(;!l;){let r=c1(e,t);switch(r.physicalStreamType){case pY.LENGTH:pH.DICTIONARY===r.logicalStreamType.lengthType?i=pr(e,t,r):s=pr(e,t,r);break;case pY.DATA:pZ.SINGLE===r.logicalStreamType.dictionaryType||pZ.SHARED===r.logicalStreamType.dictionaryType?(a=e.subarray(t.get(),t.get()+r.byteLength),l=!0):o=e.subarray(t.get(),t.get()+r.byteLength),t.add(r.byteLength)}}if("complexType"!==r.type)throw Error(`Shared dictionary column ${r.name} must be a complex (struct) column.`);if(!i||!a)throw Error(`Incomplete shared dictionary for column "${r.name}"`);let u=r.complexType.children,h=[],c=o?{}:void 0,p=0;for(let l of u){let u,f=cP(e,t,1)[0];if(0===f)continue;let d=l.name?`${r.name}${l.name}`:r.name;if(n&&!n.has(d)){c5(f,e,t);continue}if("scalarField"!==l.type||9!==l.scalarField.physicalType)throw Error("Currently only scalar string fields are implemented for a struct.");if(f>1&&!l.nullable||1===f&&l.nullable)throw Error(`The number of streams for the child field ${l.name} does not match its nullability. nullibilty: ${l.nullable}, numStreams: ${f}`);if(l.nullable){let r=c1(e,t);u=new c2(c6(e,r.numValues,r.byteLength,t),r.numValues)}let y=pt(e,t,c1(e,t),void 0,u);if(o){if(!s)throw Error(`Incomplete shared FSST dictionary for column "${d}"`);h[p++]=new pP(d,y,i,a,s,o,u,c)}else h[p++]=new pB(d,y,i,a,u)}return h}(e,r,n,a));if(s)if(Array.isArray(s))for(let e of s)d.push(e);else d.push(s)}}let m=new cD(c.name,f,p,d,h);n.push(m),r.set(o)}return n}(new Uint8Array(e));this.layers=t.reduce((e,t)=>({...e,[t.name]:new fa(t)}),{})}};function fo(e,t,r,n,i){return ts(e,(e,a)=>{let s=t instanceof a6?t.get(a):null;return"object"==typeof s&&s&&"evaluate"in s?s.evaluate(r,n,void 0,i):s})}function fl(e,t){return t-e}aI("FeatureIndex",class{constructor(e,t){this.tileID=e,this.x=e.canonical.x,this.y=e.canonical.y,this.z=e.canonical.z,this.grid=new ak(e$,16,0),this.grid3D=new ak(e$,16,0),this.featureIndexArray=new sH,this.promoteId=t}insert(e,t,r,n,i,a){let s=this.featureIndexArray.length;this.featureIndexArray.emplaceBack(r,n,i);let o=a?this.grid3D:this.grid;for(let e of t){let t=[1/0,1/0,-1/0,-1/0];for(let r of e)t[0]=Math.min(t[0],r.x),t[1]=Math.min(t[1],r.y),t[2]=Math.max(t[2],r.x),t[3]=Math.max(t[3],r.y);t[0]<8192&&t[1]<8192&&t[2]>=0&&t[3]>=0&&o.insert(s,t[0],t[1],t[2],t[3])}}loadVTLayers(){return this.vtLayers||("mlt"===this.encoding?this.vtLayers=new fs(this.rawTileData).layers:this.vtLayers=new uy(new ho(this.rawTileData)).layers,this.sourceLayerCoder=new cy(this.vtLayers?Object.keys(this.vtLayers).sort():[cd])),this.vtLayers}query(e,t,r,n){this.loadVTLayers();let i=e.params,a=e$/e.tileSize/e.scale,s=iX(i.filter,"queryRenderedFeatures filter",i.globalState),o=e.queryGeometry,l=e.queryPadding*a,u=ul.fromPoints(o),h=this.grid.query(u.minX-l,u.minY-l,u.maxX+l,u.maxY+l),c=ul.fromPoints(e.cameraQueryGeometry).expandBy(l);for(let t of this.grid3D.query(c.minX,c.minY,c.maxX,c.maxY,(t,r,n,i)=>(function(e,t,r,n,i){for(let a of e)if(t<=a.x&&r<=a.y&&n>=a.x&&i>=a.y)return!0;let a=[new P(t,r),new P(t,i),new P(n,i),new P(n,r)];if(e.length>2){for(let t of a)if(oJ(e,t))return!0}for(let t=0;t<e.length-1;t++)if(function(e,t,r){let n=r[0],i=r[2];if(e.x<n.x&&t.x<n.x||e.x>i.x&&t.x>i.x||e.y<n.y&&t.y<n.y||e.y>i.y&&t.y>i.y)return!1;let a=tc(e,t,r[0]);return a!==tc(e,t,r[1])||a!==tc(e,t,r[2])||a!==tc(e,t,r[3])}(e[t],e[t+1],a))return!0;return!1})(e.cameraQueryGeometry,t-l,r-l,n+l,i+l)))h.push(t);h.sort(fl);let p={},f;for(let l of h){if(l===f)continue;f=l;let u=this.featureIndexArray.get(l),h=null;
vendor: 3,290 bytes, line 2
2this.loadMatchingFeature(p,u.bucketIndex,u.sourceLayerIndex,u.featureIndex,s,i.layers,i.availableImages,t,r,n,(t,r,n)=>(h||=oU(t),r.queryIntersectsFeature({queryGeometry:o,feature:t,featureState:n,geometry:h,zoom:this.z,transform:e.transform,pixelsToTileUnits:a,pixelPosMatrix:e.pixelPosMatrix,unwrappedTileID:this.tileID.toUnwrapped(),getElevation:e.getElevation})))}return p}loadMatchingFeature(e,t,r,n,i,a,s,o,l,u,h){let c=this.bucketLayerIDs[t];if(a&&!c.some(e=>a.has(e)))return;let p=this.sourceLayerCoder.decode(r),f=this.vtLayers[p].feature(n);if(i.needGeometry){let e=oq(f,!0);if(!i.filter(new aW(this.tileID.overscaledZ),e,this.tileID.canonical))return}else if(!i.filter(new aW(this.tileID.overscaledZ),f))return;let d=this.getId(f,p);for(let t of c){if(a&&!a.has(t))continue;let r=o[t];if(!r)continue;let i={};d&&u&&(i=u.getState(r.sourceLayer||"_geojsonTileLayer",d));let c=e7({},l[t]);c.paint=fo(c.paint,r.paint,f,i,s),c.layout=fo(c.layout,r.layout,f,i,s);let p=!h||h(f,r,i);if(!p)continue;let y=new cm(f,this.z,this.x,this.y,d);y.layer=c;let m=e[t];void 0===m&&(m=e[t]=[]),m.push({featureIndex:n,feature:y,intersectionZ:p})}}lookupSymbolFeatures(e,t,r,n,i,a,s,o){let l={};this.loadVTLayers();let u=iX(i.filterSpec,"queryRenderedFeatures symbol filter",i.globalState);for(let i of e)this.loadMatchingFeature(l,r,n,i,u,a,s,o,t);return l}hasLayer(e){for(let t of this.bucketLayerIDs)for(let r of t)if(e===r)return!0;return!1}getId(e,t){let r=e.id;if(this.promoteId){let n="string"==typeof this.promoteId?this.promoteId:this.promoteId[t];"boolean"==typeof(r=e.properties[n])&&(r=Number(r)),void 0===r&&e.properties?.cluster&&this.promoteId&&(r=Number(e.properties.cluster_id))}return r}},{omit:["rawTileData","sourceLayerCoder"]});var fu=class{constructor(e,t){this.max=e,this.onRemove=t,this.reset()}reset(){for(let e in this.data)for(let t of this.data[e])t.timeout&&clearTimeout(t.timeout),this.onRemove(t.value);return this.data={},this.order=[],this}add(e,t,r){let n=e.wrapped().key;void 0===this.data[n]&&(this.data[n]=[]);let i={value:t,timeout:void 0};if(void 0!==r&&(i.timeout=setTimeout(()=>{this.remove(e,i)},r)),this.data[n].push(i),this.order.push(n),this.order.length>this.max){let e=this._getAndRemoveByKey(this.order[0]);e&&this.onRemove(e)}return this}has(e){return e.wrapped().key in this.data}getAndRemove(e){return this.has(e)?this._getAndRemoveByKey(e.wrapped().key):null}_getAndRemoveByKey(e){let t=this.data[e].shift();return t.timeout&&clearTimeout(t.timeout),0===this.data[e].length&&delete this.data[e],this.order.splice(this.order.indexOf(e),1),t.value}getByKey(e){let t=this.data[e];return t?t[0].value:null}get(e){return this.has(e)?this.data[e.wrapped().key][0].value:null}remove(e,t){if(!this.has(e))return this;let r=e.wrapped().key,n=void 0===t?0:this.data[r].indexOf(t),i=this.data[r][n];return this.data[r].splice(n,1),i.timeout&&clearTimeout(i.timeout),0===this.data[r].length&&delete this.data[r],this.onRemove(i.value),this.order.splice(this.order.indexOf(r),1),this}setMaxSize(e){for(this.max=e;this.order.length>this.max;){let e=this._getAndRemoveByKey(this.order[0]);e&&this.onRemove(e)}return this}filter(e){let t=[];for(let r in this.data)for(let n of this.data[r])e(n.value)||t.push(n);for(let e of t)this.remove(e.value.tileID,e)}}}}]);
Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.