@opengis/gis 0.0.12 → 0.0.15
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/{index.js.js → index.js} +11019 -12077
- package/dist/index.umd.cjs +845 -0
- package/package.json +4 -3
- package/dist/index.js.umd.cjs +0 -845
- /package/dist/{index.js.css → index.css} +0 -0
package/dist/index.js.umd.cjs
DELETED
|
@@ -1,845 +0,0 @@
|
|
|
1
|
-
(function(on,S){typeof exports=="object"&&typeof module<"u"?S(exports,require("vue")):typeof define=="function"&&define.amd?define(["exports","vue"],S):(on=typeof globalThis<"u"?globalThis:on||self,S(on.MapCustom={},on.Vue))})(this,function(on,S){"use strict";var qS=Object.defineProperty;var US=(on,S,ts)=>S in on?qS(on,S,{enumerable:!0,configurable:!0,writable:!0,value:ts}):on[S]=ts;var Lr=(on,S,ts)=>US(on,typeof S!="symbol"?S+"":S,ts);var rp;function ts(p){return p&&p.__esModule&&Object.prototype.hasOwnProperty.call(p,"default")?p.default:p}var bc={exports:{}};/**
|
|
2
|
-
* MapLibre GL JS
|
|
3
|
-
* @license 3-Clause BSD. Full text of license: https://github.com/maplibre/maplibre-gl-js/blob/v5.5.0/LICENSE.txt
|
|
4
|
-
*/var ky=bc.exports,xd;function Ty(){return xd||(xd=1,function(p,f){(function(_,v){p.exports=v()})(ky,function(){var _={},v={};function k(x,o,B){if(v[x]=B,x==="index"){var D="var sharedModule = {}; ("+v.shared+")(sharedModule); ("+v.worker+")(sharedModule);",L={};return v.shared(L),v.index(_,L),typeof window<"u"&&_.setWorkerUrl(window.URL.createObjectURL(new Blob([D],{type:"text/javascript"}))),_}}k("shared",["exports"],function(x){function o(n,t,i,s){return new(i||(i=Promise))(function(c,d){function m(E){try{w(s.next(E))}catch(R){d(R)}}function y(E){try{w(s.throw(E))}catch(R){d(R)}}function w(E){var R;E.done?c(E.value):(R=E.value,R instanceof i?R:new i(function(V){V(R)})).then(m,y)}w((s=s.apply(n,t||[])).next())})}function B(n){return n&&n.__esModule&&Object.prototype.hasOwnProperty.call(n,"default")?n.default:n}var D,L;function H(){if(L)return D;function n(t,i){this.x=t,this.y=i}return L=1,D=n,n.prototype={clone:function(){return new n(this.x,this.y)},add:function(t){return this.clone()._add(t)},sub:function(t){return this.clone()._sub(t)},multByPoint:function(t){return this.clone()._multByPoint(t)},divByPoint:function(t){return this.clone()._divByPoint(t)},mult:function(t){return this.clone()._mult(t)},div:function(t){return this.clone()._div(t)},rotate:function(t){return this.clone()._rotate(t)},rotateAround:function(t,i){return this.clone()._rotateAround(t,i)},matMult:function(t){return this.clone()._matMult(t)},unit:function(){return this.clone()._unit()},perp:function(){return this.clone()._perp()},round:function(){return this.clone()._round()},mag:function(){return Math.sqrt(this.x*this.x+this.y*this.y)},equals:function(t){return this.x===t.x&&this.y===t.y},dist:function(t){return Math.sqrt(this.distSqr(t))},distSqr:function(t){var i=t.x-this.x,s=t.y-this.y;return i*i+s*s},angle:function(){return Math.atan2(this.y,this.x)},angleTo:function(t){return Math.atan2(this.y-t.y,this.x-t.x)},angleWith:function(t){return this.angleWithSep(t.x,t.y)},angleWithSep:function(t,i){return Math.atan2(this.x*i-this.y*t,this.x*t+this.y*i)},_matMult:function(t){var i=t[2]*this.x+t[3]*this.y;return this.x=t[0]*this.x+t[1]*this.y,this.y=i,this},_add:function(t){return this.x+=t.x,this.y+=t.y,this},_sub:function(t){return this.x-=t.x,this.y-=t.y,this},_mult:function(t){return this.x*=t,this.y*=t,this},_div:function(t){return this.x/=t,this.y/=t,this},_multByPoint:function(t){return this.x*=t.x,this.y*=t.y,this},_divByPoint:function(t){return this.x/=t.x,this.y/=t.y,this},_unit:function(){return this._div(this.mag()),this},_perp:function(){var t=this.y;return this.y=this.x,this.x=-t,this},_rotate:function(t){var i=Math.cos(t),s=Math.sin(t),c=s*this.x+i*this.y;return this.x=i*this.x-s*this.y,this.y=c,this},_rotateAround:function(t,i){var s=Math.cos(t),c=Math.sin(t),d=i.y+c*(this.x-i.x)+s*(this.y-i.y);return this.x=i.x+s*(this.x-i.x)-c*(this.y-i.y),this.y=d,this},_round:function(){return this.x=Math.round(this.x),this.y=Math.round(this.y),this}},n.convert=function(t){return t instanceof n?t:Array.isArray(t)?new n(t[0],t[1]):t},D}typeof SuppressedError=="function"&&SuppressedError;var M,C,T=B(H()),N=function(){if(C)return M;function n(t,i,s,c){this.cx=3*t,this.bx=3*(s-t)-this.cx,this.ax=1-this.cx-this.bx,this.cy=3*i,this.by=3*(c-i)-this.cy,this.ay=1-this.cy-this.by,this.p1x=t,this.p1y=i,this.p2x=s,this.p2y=c}return C=1,M=n,n.prototype={sampleCurveX:function(t){return((this.ax*t+this.bx)*t+this.cx)*t},sampleCurveY:function(t){return((this.ay*t+this.by)*t+this.cy)*t},sampleCurveDerivativeX:function(t){return(3*this.ax*t+2*this.bx)*t+this.cx},solveCurveX:function(t,i){if(i===void 0&&(i=1e-6),t<0)return 0;if(t>1)return 1;for(var s=t,c=0;c<8;c++){var d=this.sampleCurveX(s)-t;if(Math.abs(d)<i)return s;var m=this.sampleCurveDerivativeX(s);if(Math.abs(m)<1e-6)break;s-=d/m}var y=0,w=1;for(s=t,c=0;c<20&&(d=this.sampleCurveX(s),!(Math.abs(d-t)<i));c++)t>d?y=s:w=s,s=.5*(w-y)+y;return s},solve:function(t,i){return this.sampleCurveY(this.solveCurveX(t,i))}},M}(),G=B(N);let ie,le;function Ee(){return ie==null&&(ie=typeof OffscreenCanvas<"u"&&new OffscreenCanvas(1,1).getContext("2d")&&typeof createImageBitmap=="function"),ie}function te(){if(le==null&&(le=!1,Ee())){const t=new OffscreenCanvas(5,5).getContext("2d",{willReadFrequently:!0});if(t){for(let s=0;s<5*5;s++){const c=4*s;t.fillStyle=`rgb(${c},${c+1},${c+2})`,t.fillRect(s%5,Math.floor(s/5),1,1)}const i=t.getImageData(0,0,5,5).data;for(let s=0;s<5*5*4;s++)if(s%4!=3&&i[s]!==s){le=!0;break}}}return le||!1}var me=1e-6,De=typeof Float32Array<"u"?Float32Array:Array;function qe(){var n=new De(9);return De!=Float32Array&&(n[1]=0,n[2]=0,n[3]=0,n[5]=0,n[6]=0,n[7]=0),n[0]=1,n[4]=1,n[8]=1,n}function rt(n){return n[0]=1,n[1]=0,n[2]=0,n[3]=0,n[4]=0,n[5]=1,n[6]=0,n[7]=0,n[8]=0,n[9]=0,n[10]=1,n[11]=0,n[12]=0,n[13]=0,n[14]=0,n[15]=1,n}function At(){var n=new De(3);return De!=Float32Array&&(n[0]=0,n[1]=0,n[2]=0),n}function _t(n){return Math.hypot(n[0],n[1],n[2])}function lt(n,t,i){var s=new De(3);return s[0]=n,s[1]=t,s[2]=i,s}Math.hypot||(Math.hypot=function(){for(var n=0,t=arguments.length;t--;)n+=arguments[t]*arguments[t];return Math.sqrt(n)});var xt,qt=_t;function Xt(n,t,i){var s=t[0],c=t[1],d=t[2],m=t[3];return n[0]=i[0]*s+i[4]*c+i[8]*d+i[12]*m,n[1]=i[1]*s+i[5]*c+i[9]*d+i[13]*m,n[2]=i[2]*s+i[6]*c+i[10]*d+i[14]*m,n[3]=i[3]*s+i[7]*c+i[11]*d+i[15]*m,n}function kr(){var n=new De(4);return De!=Float32Array&&(n[0]=0,n[1]=0,n[2]=0),n[3]=1,n}function vr(){var n=new De(2);return De!=Float32Array&&(n[0]=0,n[1]=0),n}function ni(n,t){var i=new De(2);return i[0]=n,i[1]=t,i}At(),xt=new De(4),De!=Float32Array&&(xt[0]=0,xt[1]=0,xt[2]=0,xt[3]=0),At(),lt(1,0,0),lt(0,1,0),kr(),kr(),qe(),vr();const ir=8192;function Ji(n,t,i){return t*(ir/(n.tileSize*Math.pow(2,i-n.tileID.overscaledZ)))}function Rr(n,t){return(n%t+t)%t}function Xi(n,t,i){return n*(1-i)+t*i}function Dr(n){if(n<=0)return 0;if(n>=1)return 1;const t=n*n,i=t*n;return 4*(n<.5?i:3*(n-t)+i-.75)}function ln(n,t,i,s){const c=new G(n,t,i,s);return d=>c.solve(d)}const Si=ln(.25,.1,.25,1);function Zr(n,t,i){return Math.min(i,Math.max(t,n))}function Qi(n,t,i){const s=i-t,c=((n-t)%s+s)%s+t;return c===t?i:c}function Yr(n,...t){for(const i of t)for(const s in i)n[s]=i[s];return n}let Yi=1;function Li(n,t,i){const s={};for(const c in n)s[c]=t.call(this,n[c],c,n);return s}function In(n,t,i){const s={};for(const c in n)t.call(this,n[c],c,n)&&(s[c]=n[c]);return s}function fi(n){return Array.isArray(n)?n.map(fi):typeof n=="object"&&n?Li(n,fi):n}const gt={};function bt(n){gt[n]||(typeof console<"u"&&console.warn(n),gt[n]=!0)}function ct(n,t,i){return(i.y-n.y)*(t.x-n.x)>(t.y-n.y)*(i.x-n.x)}function Bt(n){return typeof WorkerGlobalScope<"u"&&n!==void 0&&n instanceof WorkerGlobalScope}let Ht=null;function Ot(n){return typeof ImageBitmap<"u"&&n instanceof ImageBitmap}const pr="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAEAAAABCAYAAAAfFcSJAAAAC0lEQVQYV2NgAAIAAAUAAarVyFEAAAAASUVORK5CYII=";function Nt(n,t,i,s,c){return o(this,void 0,void 0,function*(){if(typeof VideoFrame>"u")throw new Error("VideoFrame not supported");const d=new VideoFrame(n,{timestamp:0});try{const m=d==null?void 0:d.format;if(!m||!m.startsWith("BGR")&&!m.startsWith("RGB"))throw new Error(`Unrecognized format ${m}`);const y=m.startsWith("BGR"),w=new Uint8ClampedArray(s*c*4);if(yield d.copyTo(w,function(E,R,V,q,j){const W=4*Math.max(1,0),X=(Math.max(0,V)-V)*q*4+W,re=4*q,ae=Math.max(0,R),Se=Math.max(0,V);return{rect:{x:ae,y:Se,width:Math.min(E.width,R+q)-ae,height:Math.min(E.height,V+j)-Se},layout:[{offset:X,stride:re}]}}(n,t,i,s,c)),y)for(let E=0;E<w.length;E+=4){const R=w[E];w[E]=w[E+2],w[E+2]=R}return w}finally{d.close()}})}let mr,jr;function mi(n,t,i,s){return n.addEventListener(t,i,s),{unsubscribe:()=>{n.removeEventListener(t,i,s)}}}function Ir(n){return n*Math.PI/180}function gi(n){return n/Math.PI*180}const Vi={touchstart:!0,touchmove:!0,touchmoveWindow:!0,touchend:!0,touchcancel:!0},hr={dblclick:!0,click:!0,mouseover:!0,mouseout:!0,mousedown:!0,mousemove:!0,mousemoveWindow:!0,mouseup:!0,mouseupWindow:!0,contextmenu:!0,wheel:!0},lr="AbortError";function Ft(){return new Error(lr)}const wr={MAX_PARALLEL_IMAGE_REQUESTS:16,MAX_PARALLEL_IMAGE_REQUESTS_PER_FRAME:8,MAX_TILE_CACHE_ZOOM_LEVELS:5,REGISTERED_PROTOCOLS:{},WORKER_URL:""};function dr(n){return wr.REGISTERED_PROTOCOLS[n.substring(0,n.indexOf("://"))]}const Jt="global-dispatcher";class fr extends Error{constructor(t,i,s,c){super(`AJAXError: ${i} (${t}): ${s}`),this.status=t,this.statusText=i,this.url=s,this.body=c}}const It=()=>Bt(self)?self.worker&&self.worker.referrer:(window.location.protocol==="blob:"?window.parent:window).location.href,wt=function(n,t){if(/:\/\//.test(n.url)&&!/^https?:|^file:/.test(n.url)){const s=dr(n.url);if(s)return s(n,t);if(Bt(self)&&self.worker&&self.worker.actor)return self.worker.actor.sendAsync({type:"GR",data:n,targetMapId:Jt},t)}if(!(/^file:/.test(i=n.url)||/^file:/.test(It())&&!/^\w+:/.test(i))){if(fetch&&Request&&AbortController&&Object.prototype.hasOwnProperty.call(Request.prototype,"signal"))return function(s,c){return o(this,void 0,void 0,function*(){const d=new Request(s.url,{method:s.method||"GET",body:s.body,credentials:s.credentials,headers:s.headers,cache:s.cache,referrer:It(),signal:c.signal});let m,y;s.type!=="json"||d.headers.has("Accept")||d.headers.set("Accept","application/json");try{m=yield fetch(d)}catch(E){throw new fr(0,E.message,s.url,new Blob)}if(!m.ok){const E=yield m.blob();throw new fr(m.status,m.statusText,s.url,E)}y=s.type==="arrayBuffer"||s.type==="image"?m.arrayBuffer():s.type==="json"?m.json():m.text();const w=yield y;if(c.signal.aborted)throw Ft();return{data:w,cacheControl:m.headers.get("Cache-Control"),expires:m.headers.get("Expires")}})}(n,t);if(Bt(self)&&self.worker&&self.worker.actor)return self.worker.actor.sendAsync({type:"GR",data:n,mustQueue:!0,targetMapId:Jt},t)}var i;return function(s,c){return new Promise((d,m)=>{var y;const w=new XMLHttpRequest;w.open(s.method||"GET",s.url,!0),s.type!=="arrayBuffer"&&s.type!=="image"||(w.responseType="arraybuffer");for(const E in s.headers)w.setRequestHeader(E,s.headers[E]);s.type==="json"&&(w.responseType="text",!((y=s.headers)===null||y===void 0)&&y.Accept||w.setRequestHeader("Accept","application/json")),w.withCredentials=s.credentials==="include",w.onerror=()=>{m(new Error(w.statusText))},w.onload=()=>{if(!c.signal.aborted)if((w.status>=200&&w.status<300||w.status===0)&&w.response!==null){let E=w.response;if(s.type==="json")try{E=JSON.parse(w.response)}catch(R){return void m(R)}d({data:E,cacheControl:w.getResponseHeader("Cache-Control"),expires:w.getResponseHeader("Expires")})}else{const E=new Blob([w.response],{type:w.getResponseHeader("Content-Type")});m(new fr(w.status,w.statusText,s.url,E))}},c.signal.addEventListener("abort",()=>{w.abort(),m(Ft())}),w.send(s.body)})}(n,t)};function Ae(n){if(!n||n.indexOf("://")<=0||n.indexOf("data:image/")===0||n.indexOf("blob:")===0)return!0;const t=new URL(n),i=window.location;return t.protocol===i.protocol&&t.host===i.host}function K(n,t,i){i[n]&&i[n].indexOf(t)!==-1||(i[n]=i[n]||[],i[n].push(t))}function Q(n,t,i){if(i&&i[n]){const s=i[n].indexOf(t);s!==-1&&i[n].splice(s,1)}}class ee{constructor(t,i={}){Yr(this,i),this.type=t}}class he extends ee{constructor(t,i={}){super("error",Yr({error:t},i))}}class ve{on(t,i){return this._listeners=this._listeners||{},K(t,i,this._listeners),{unsubscribe:()=>{this.off(t,i)}}}off(t,i){return Q(t,i,this._listeners),Q(t,i,this._oneTimeListeners),this}once(t,i){return i?(this._oneTimeListeners=this._oneTimeListeners||{},K(t,i,this._oneTimeListeners),this):new Promise(s=>this.once(t,s))}fire(t,i){typeof t=="string"&&(t=new ee(t,i||{}));const s=t.type;if(this.listens(s)){t.target=this;const c=this._listeners&&this._listeners[s]?this._listeners[s].slice():[];for(const y of c)y.call(this,t);const d=this._oneTimeListeners&&this._oneTimeListeners[s]?this._oneTimeListeners[s].slice():[];for(const y of d)Q(s,y,this._oneTimeListeners),y.call(this,t);const m=this._eventedParent;m&&(Yr(t,typeof this._eventedParentData=="function"?this._eventedParentData():this._eventedParentData),m.fire(t))}else t instanceof he&&console.error(t.error);return this}listens(t){return this._listeners&&this._listeners[t]&&this._listeners[t].length>0||this._oneTimeListeners&&this._oneTimeListeners[t]&&this._oneTimeListeners[t].length>0||this._eventedParent&&this._eventedParent.listens(t)}setEventedParent(t,i){return this._eventedParent=t,this._eventedParentData=i,this}}var $={$version:8,$root:{version:{required:!0,type:"enum",values:[8]},name:{type:"string"},metadata:{type:"*"},center:{type:"array",value:"number"},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"},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},"*":{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:"*"},tolerance:{type:"number",default:.375},cluster:{type:"boolean",default:!1},clusterRadius:{type:"number",default:50,minimum:0},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:{required:!0,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:{},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_background"],layout_background:{visibility:{type:"enum",values:{visible:{},none:{}},default:"visible","property-type":"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","property-type":"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","property-type":"constant"}},layout_heatmap:{visibility:{type:"enum",values:{visible:{},none:{}},default:"visible","property-type":"constant"}},"layout_fill-extrusion":{visibility:{type:"enum",values:{visible:{},none:{}},default:"visible","property-type":"constant"}},layout_line:{"line-cap":{type:"enum",values:{butt:{},round:{},square:{}},default:"butt",expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"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"]},"property-type":"data-constant"},"line-round-limit":{type:"number",default:1.05,requires:[{"line-join":"round"}],expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"line-sort-key":{type:"number",expression:{interpolated:!1,parameters:["zoom","feature"]},"property-type":"data-driven"},visibility:{type:"enum",values:{visible:{},none:{}},default:"visible","property-type":"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"]},"property-type":"data-constant"},"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"},"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"},visibility:{type:"enum",values:{visible:{},none:{}},default:"visible","property-type":"constant"}},layout_raster:{visibility:{type:"enum",values:{visible:{},none:{}},default:"visible","property-type":"constant"}},layout_hillshade:{visibility:{type:"enum",values:{visible:{},none:{}},default:"visible","property-type":"constant"}},filter:{type:"array",value:"*"},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:"*",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_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"},"fill-color":{type:"color",default:"#000000",transition:!0,requires:[{"!":"fill-pattern"}],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-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"]},"property-type":"cross-faded"},"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"},"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"}},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"}}};const Me=["type","source","source-layer","minzoom","maxzoom","filter","layout"];function Te(n,t){const i={};for(const s in n)s!=="ref"&&(i[s]=n[s]);return Me.forEach(s=>{s in t&&(i[s]=t[s])}),i}function Ie(n,t){if(Array.isArray(n)){if(!Array.isArray(t)||n.length!==t.length)return!1;for(let i=0;i<n.length;i++)if(!Ie(n[i],t[i]))return!1;return!0}if(typeof n=="object"&&n!==null&&t!==null){if(typeof t!="object"||Object.keys(n).length!==Object.keys(t).length)return!1;for(const i in n)if(!Ie(n[i],t[i]))return!1;return!0}return n===t}function Ve(n,t){n.push(t)}function Pe(n,t,i){Ve(i,{command:"addSource",args:[n,t[n]]})}function Qe(n,t,i){Ve(t,{command:"removeSource",args:[n]}),i[n]=!0}function ut(n,t,i,s){Qe(n,i,s),Pe(n,t,i)}function yt(n,t,i){let s;for(s in n[i])if(Object.prototype.hasOwnProperty.call(n[i],s)&&s!=="data"&&!Ie(n[i][s],t[i][s]))return!1;for(s in t[i])if(Object.prototype.hasOwnProperty.call(t[i],s)&&s!=="data"&&!Ie(n[i][s],t[i][s]))return!1;return!0}function Et(n,t,i,s,c,d){n=n||{},t=t||{};for(const m in n)Object.prototype.hasOwnProperty.call(n,m)&&(Ie(n[m],t[m])||i.push({command:d,args:[s,m,t[m],c]}));for(const m in t)Object.prototype.hasOwnProperty.call(t,m)&&!Object.prototype.hasOwnProperty.call(n,m)&&(Ie(n[m],t[m])||i.push({command:d,args:[s,m,t[m],c]}))}function jt(n){return n.id}function Rt(n,t){return n[t.id]=t,n}class Ue{constructor(t,i,s,c){this.message=(t?`${t}: `:"")+s,c&&(this.identifier=c),i!=null&&i.__line__&&(this.line=i.__line__)}}function ar(n,...t){for(const i of t)for(const s in i)n[s]=i[s];return n}class Qt extends Error{constructor(t,i){super(i),this.message=i,this.key=t}}class or{constructor(t,i=[]){this.parent=t,this.bindings={};for(const[s,c]of i)this.bindings[s]=c}concat(t){return new or(this,t)}get(t){if(this.bindings[t])return this.bindings[t];if(this.parent)return this.parent.get(t);throw new Error(`${t} not found in scope.`)}has(t){return!!this.bindings[t]||!!this.parent&&this.parent.has(t)}}const Dt={kind:"null"},Xe={kind:"number"},Mt={kind:"string"},Wt={kind:"boolean"},Tr={kind:"color"},gr={kind:"projectionDefinition"},yi={kind:"object"},Kt={kind:"value"},Oi={kind:"collator"},mo={kind:"formatted"},_n={kind:"padding"},Mn={kind:"colorArray"},Ri={kind:"numberArray"},xn={kind:"resolvedImage"},Mr={kind:"variableAnchorOffsetCollection"};function _i(n,t){return{kind:"array",itemType:n,N:t}}function _r(n){if(n.kind==="array"){const t=_r(n.itemType);return typeof n.N=="number"?`array<${t}, ${n.N}>`:n.itemType.kind==="value"?"array":`array<${t}>`}return n.kind}const Jn=[Dt,Xe,Mt,Wt,Tr,gr,mo,yi,_i(Kt),_n,Ri,Mn,xn,Mr];function cn(n,t){if(t.kind==="error")return null;if(n.kind==="array"){if(t.kind==="array"&&(t.N===0&&t.itemType.kind==="value"||!cn(n.itemType,t.itemType))&&(typeof n.N!="number"||n.N===t.N))return null}else{if(n.kind===t.kind)return null;if(n.kind==="value"){for(const i of Jn)if(!cn(i,t))return null}}return`Expected ${_r(n)} but found ${_r(t)} instead.`}function go(n,t){return t.some(i=>i.kind===n.kind)}function Ln(n,t){return t.some(i=>i==="null"?n===null:i==="array"?Array.isArray(n):i==="object"?n&&!Array.isArray(n)&&typeof n=="object":i===typeof n)}function Di(n,t){return n.kind==="array"&&t.kind==="array"?n.itemType.kind===t.itemType.kind&&typeof n.N=="number":n.kind===t.kind}const as=.96422,Ro=.82521,ta=4/29,Xn=6/29,ls=3*Xn*Xn,ra=Xn*Xn*Xn,ia=Math.PI/180,na=180/Math.PI;function cs(n){return(n%=360)<0&&(n+=360),n}function us([n,t,i,s]){let c,d;const m=hs((.2225045*(n=Rn(n))+.7168786*(t=Rn(t))+.0606169*(i=Rn(i)))/1);n===t&&t===i?c=d=m:(c=hs((.4360747*n+.3850649*t+.1430804*i)/as),d=hs((.0139322*n+.0971045*t+.7141733*i)/Ro));const y=116*m-16;return[y<0?0:y,500*(c-m),200*(m-d),s]}function Rn(n){return n<=.04045?n/12.92:Math.pow((n+.055)/1.055,2.4)}function hs(n){return n>ra?Math.pow(n,1/3):n/ls+ta}function oa([n,t,i,s]){let c=(n+16)/116,d=isNaN(t)?c:c+t/500,m=isNaN(i)?c:c-i/200;return c=1*ps(c),d=as*ps(d),m=Ro*ps(m),[Dn(3.1338561*d-1.6168667*c-.4906146*m),Dn(-.9787684*d+1.9161415*c+.033454*m),Dn(.0719453*d-.2289914*c+1.4052427*m),s]}function Dn(n){return(n=n<=.00304?12.92*n:1.055*Math.pow(n,1/2.4)-.055)<0?0:n>1?1:n}function ps(n){return n>Xn?n*n*n:ls*(n-ta)}const _l=Object.hasOwn||function(n,t){return Object.prototype.hasOwnProperty.call(n,t)};function Qn(n,t){return _l(n,t)?n[t]:void 0}function Yn(n){return parseInt(n.padEnd(2,n),16)/255}function ds(n,t){return oi(t?n/100:n,0,1)}function oi(n,t,i){return Math.min(Math.max(t,n),i)}function tr(n){return!n.some(Number.isNaN)}const zn={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 si(n,t,i){return n+i*(t-n)}function Bn(n,t,i){return n.map((s,c)=>si(s,t[c],i))}class Vt{constructor(t,i,s,c=1,d=!0){this.r=t,this.g=i,this.b=s,this.a=c,d||(this.r*=c,this.g*=c,this.b*=c,c||this.overwriteGetter("rgb",[t,i,s,c]))}static parse(t){if(t instanceof Vt)return t;if(typeof t!="string")return;const i=function(s){if((s=s.toLowerCase().trim())==="transparent")return[0,0,0,0];const c=Qn(zn,s);if(c){const[m,y,w]=c;return[m/255,y/255,w/255,1]}if(s.startsWith("#")&&/^#(?:[0-9a-f]{3,4}|[0-9a-f]{6}|[0-9a-f]{8})$/.test(s)){const m=s.length<6?1:2;let y=1;return[Yn(s.slice(y,y+=m)),Yn(s.slice(y,y+=m)),Yn(s.slice(y,y+=m)),Yn(s.slice(y,y+m)||"ff")]}if(s.startsWith("rgb")){const m=s.match(/^rgba?\(\s*([\de.+-]+)(%)?(?:\s+|\s*(,)\s*)([\de.+-]+)(%)?(?:\s+|\s*(,)\s*)([\de.+-]+)(%)?(?:\s*([,\/])\s*([\de.+-]+)(%)?)?\s*\)$/);if(m){const[y,w,E,R,V,q,j,W,X,re,ae,Se]=m,fe=[R||" ",j||" ",re].join("");if(fe===" "||fe===" /"||fe===",,"||fe===",,,"){const U=[E,q,X].join(""),Y=U==="%%%"?100:U===""?255:0;if(Y){const ge=[oi(+w/Y,0,1),oi(+V/Y,0,1),oi(+W/Y,0,1),ae?ds(+ae,Se):1];if(tr(ge))return ge}}return}}const d=s.match(/^hsla?\(\s*([\de.+-]+)(?:deg)?(?:\s+|\s*(,)\s*)([\de.+-]+)%(?:\s+|\s*(,)\s*)([\de.+-]+)%(?:\s*([,\/])\s*([\de.+-]+)(%)?)?\s*\)$/);if(d){const[m,y,w,E,R,V,q,j,W]=d,X=[w||" ",R||" ",q].join("");if(X===" "||X===" /"||X===",,"||X===",,,"){const re=[+y,oi(+E,0,100),oi(+V,0,100),j?ds(+j,W):1];if(tr(re))return function([ae,Se,fe,U]){function Y(ge){const Re=(ge+ae/30)%12,$e=Se*Math.min(fe,1-fe);return fe-$e*Math.max(-1,Math.min(Re-3,9-Re,1))}return ae=cs(ae),Se/=100,fe/=100,[Y(0),Y(8),Y(4),U]}(re)}}}(t);return i?new Vt(...i,!1):void 0}get rgb(){const{r:t,g:i,b:s,a:c}=this,d=c||1/0;return this.overwriteGetter("rgb",[t/d,i/d,s/d,c])}get hcl(){return this.overwriteGetter("hcl",function(t){const[i,s,c,d]=us(t),m=Math.sqrt(s*s+c*c);return[Math.round(1e4*m)?cs(Math.atan2(c,s)*na):NaN,m,i,d]}(this.rgb))}get lab(){return this.overwriteGetter("lab",us(this.rgb))}overwriteGetter(t,i){return Object.defineProperty(this,t,{value:i}),i}toString(){const[t,i,s,c]=this.rgb;return`rgba(${[t,i,s].map(d=>Math.round(255*d)).join(",")},${c})`}static interpolate(t,i,s,c="rgb"){switch(c){case"rgb":{const[d,m,y,w]=Bn(t.rgb,i.rgb,s);return new Vt(d,m,y,w,!1)}case"hcl":{const[d,m,y,w]=t.hcl,[E,R,V,q]=i.hcl;let j,W;if(isNaN(d)||isNaN(E))isNaN(d)?isNaN(E)?j=NaN:(j=E,y!==1&&y!==0||(W=R)):(j=d,V!==1&&V!==0||(W=m));else{let fe=E-d;E>d&&fe>180?fe-=360:E<d&&d-E>180&&(fe+=360),j=d+s*fe}const[X,re,ae,Se]=function([fe,U,Y,ge]){return fe=isNaN(fe)?0:fe*ia,oa([Y,Math.cos(fe)*U,Math.sin(fe)*U,ge])}([j,W??si(m,R,s),si(y,V,s),si(w,q,s)]);return new Vt(X,re,ae,Se,!1)}case"lab":{const[d,m,y,w]=oa(Bn(t.lab,i.lab,s));return new Vt(d,m,y,w,!1)}}}}Vt.black=new Vt(0,0,0,1),Vt.white=new Vt(1,1,1,1),Vt.transparent=new Vt(0,0,0,0),Vt.red=new Vt(1,0,0,1);class bn{constructor(t,i,s){this.sensitivity=t?i?"variant":"case":i?"accent":"base",this.locale=s,this.collator=new Intl.Collator(this.locale?this.locale:[],{sensitivity:this.sensitivity,usage:"search"})}compare(t,i){return this.collator.compare(t,i)}resolvedLocale(){return new Intl.Collator(this.locale?this.locale:[]).resolvedOptions().locale}}const Fi=["bottom","center","top"];class ce{constructor(t,i,s,c,d,m){this.text=t,this.image=i,this.scale=s,this.fontStack=c,this.textColor=d,this.verticalAlign=m}}class ue{constructor(t){this.sections=t}static fromString(t){return new ue([new ce(t,null,null,null,null,null)])}isEmpty(){return this.sections.length===0||!this.sections.some(t=>t.text.length!==0||t.image&&t.image.name.length!==0)}static factory(t){return t instanceof ue?t:ue.fromString(t)}toString(){return this.sections.length===0?"":this.sections.map(t=>t.text).join("")}}class pe{constructor(t){this.values=t.slice()}static parse(t){if(t instanceof pe)return t;if(typeof t=="number")return new pe([t,t,t,t]);if(Array.isArray(t)&&!(t.length<1||t.length>4)){for(const i of t)if(typeof i!="number")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 pe(t)}}toString(){return JSON.stringify(this.values)}static interpolate(t,i,s){return new pe(Bn(t.values,i.values,s))}}class xe{constructor(t){this.values=t.slice()}static parse(t){if(t instanceof xe)return t;if(typeof t=="number")return new xe([t]);if(Array.isArray(t)){for(const i of t)if(typeof i!="number")return;return new xe(t)}}toString(){return JSON.stringify(this.values)}static interpolate(t,i,s){return new xe(Bn(t.values,i.values,s))}}class Ce{constructor(t){this.values=t.slice()}static parse(t){if(t instanceof Ce)return t;if(typeof t=="string"){const s=Vt.parse(t);return s?new Ce([s]):void 0}if(!Array.isArray(t))return;const i=[];for(const s of t){if(typeof s!="string")return;const c=Vt.parse(s);if(!c)return;i.push(c)}return new Ce(i)}toString(){return JSON.stringify(this.values)}static interpolate(t,i,s,c="rgb"){const d=[];if(t.values.length!=i.values.length)throw new Error(`colorArray: Arrays have mismatched length (${t.values.length} vs. ${i.values.length}), cannot interpolate.`);for(let m=0;m<t.values.length;m++)d.push(Vt.interpolate(t.values[m],i.values[m],s,c));return new Ce(d)}}class Be extends Error{constructor(t){super(t),this.name="RuntimeError"}toJSON(){return this.message}}const st=new Set(["center","left","right","top","bottom","top-left","top-right","bottom-left","bottom-right"]);class Je{constructor(t){this.values=t.slice()}static parse(t){if(t instanceof Je)return t;if(Array.isArray(t)&&!(t.length<1)&&t.length%2==0){for(let i=0;i<t.length;i+=2){const s=t[i],c=t[i+1];if(typeof s!="string"||!st.has(s)||!Array.isArray(c)||c.length!==2||typeof c[0]!="number"||typeof c[1]!="number")return}return new Je(t)}}toString(){return JSON.stringify(this.values)}static interpolate(t,i,s){const c=t.values,d=i.values;if(c.length!==d.length)throw new Be(`Cannot interpolate values of different length. from: ${t.toString()}, to: ${i.toString()}`);const m=[];for(let y=0;y<c.length;y+=2){if(c[y]!==d[y])throw new Be(`Cannot interpolate values containing mismatched anchors. from[${y}]: ${c[y]}, to[${y}]: ${d[y]}`);m.push(c[y]);const[w,E]=c[y+1],[R,V]=d[y+1];m.push([si(w,R,s),si(E,V,s)])}return new Je(m)}}class it{constructor(t){this.name=t.name,this.available=t.available}toString(){return this.name}static fromString(t){return t?new it({name:t,available:!1}):null}}class ze{constructor(t,i,s){this.from=t,this.to=i,this.transition=s}static interpolate(t,i,s){return new ze(t,i,s)}static parse(t){return t instanceof ze?t:Array.isArray(t)&&t.length===3&&typeof t[0]=="string"&&typeof t[1]=="string"&&typeof t[2]=="number"?new ze(t[0],t[1],t[2]):typeof t=="object"&&typeof t.from=="string"&&typeof t.to=="string"&&typeof t.transition=="number"?new ze(t.from,t.to,t.transition):typeof t=="string"?new ze(t,t,1):void 0}}function Ge(n,t,i,s){return typeof n=="number"&&n>=0&&n<=255&&typeof t=="number"&&t>=0&&t<=255&&typeof i=="number"&&i>=0&&i<=255?s===void 0||typeof s=="number"&&s>=0&&s<=1?null:`Invalid rgba value [${[n,t,i,s].join(", ")}]: 'a' must be between 0 and 1.`:`Invalid rgba value [${(typeof s=="number"?[n,t,i,s]:[n,t,i]).join(", ")}]: 'r', 'g', and 'b' must be between 0 and 255.`}function Ye(n){if(n===null||typeof n=="string"||typeof n=="boolean"||typeof n=="number"||n instanceof ze||n instanceof Vt||n instanceof bn||n instanceof ue||n instanceof pe||n instanceof xe||n instanceof Ce||n instanceof Je||n instanceof it)return!0;if(Array.isArray(n)){for(const t of n)if(!Ye(t))return!1;return!0}if(typeof n=="object"){for(const t in n)if(!Ye(n[t]))return!1;return!0}return!1}function ft(n){if(n===null)return Dt;if(typeof n=="string")return Mt;if(typeof n=="boolean")return Wt;if(typeof n=="number")return Xe;if(n instanceof Vt)return Tr;if(n instanceof ze)return gr;if(n instanceof bn)return Oi;if(n instanceof ue)return mo;if(n instanceof pe)return _n;if(n instanceof xe)return Ri;if(n instanceof Ce)return Mn;if(n instanceof Je)return Mr;if(n instanceof it)return xn;if(Array.isArray(n)){const t=n.length;let i;for(const s of n){const c=ft(s);if(i){if(i===c)continue;i=Kt;break}i=c}return _i(i||Kt,t)}return yi}function ht(n){const t=typeof n;return n===null?"":t==="string"||t==="number"||t==="boolean"?String(n):n instanceof Vt||n instanceof ze||n instanceof ue||n instanceof pe||n instanceof xe||n instanceof Ce||n instanceof Je||n instanceof it?n.toString():JSON.stringify(n)}class nt{constructor(t,i){this.type=t,this.value=i}static parse(t,i){if(t.length!==2)return i.error(`'literal' expression requires exactly one argument, but found ${t.length-1} instead.`);if(!Ye(t[1]))return i.error("invalid value");const s=t[1];let c=ft(s);const d=i.expectedType;return c.kind!=="array"||c.N!==0||!d||d.kind!=="array"||typeof d.N=="number"&&d.N!==0||(c=d),new nt(c,s)}evaluate(){return this.value}eachChild(){}outputDefined(){return!0}}const Zt={string:Mt,number:Xe,boolean:Wt,object:yi};class dt{constructor(t,i){this.type=t,this.args=i}static parse(t,i){if(t.length<2)return i.error("Expected at least one argument.");let s,c=1;const d=t[0];if(d==="array"){let y,w;if(t.length>2){const E=t[1];if(typeof E!="string"||!(E in Zt)||E==="object")return i.error('The item type argument of "array" must be one of string, number, boolean',1);y=Zt[E],c++}else y=Kt;if(t.length>3){if(t[2]!==null&&(typeof t[2]!="number"||t[2]<0||t[2]!==Math.floor(t[2])))return i.error('The length argument to "array" must be a positive integer literal',2);w=t[2],c++}s=_i(y,w)}else{if(!Zt[d])throw new Error(`Types doesn't contain name = ${d}`);s=Zt[d]}const m=[];for(;c<t.length;c++){const y=i.parse(t[c],c,Kt);if(!y)return null;m.push(y)}return new dt(s,m)}evaluate(t){for(let i=0;i<this.args.length;i++){const s=this.args[i].evaluate(t);if(!cn(this.type,ft(s)))return s;if(i===this.args.length-1)throw new Be(`Expected value to be of type ${_r(this.type)}, but found ${_r(ft(s))} instead.`)}throw new Error}eachChild(t){this.args.forEach(t)}outputDefined(){return this.args.every(t=>t.outputDefined())}}const Ut={"to-boolean":Wt,"to-color":Tr,"to-number":Xe,"to-string":Mt};class Sr{constructor(t,i){this.type=t,this.args=i}static parse(t,i){if(t.length<2)return i.error("Expected at least one argument.");const s=t[0];if(!Ut[s])throw new Error(`Can't parse ${s} as it is not part of the known types`);if((s==="to-boolean"||s==="to-string")&&t.length!==2)return i.error("Expected one argument.");const c=Ut[s],d=[];for(let m=1;m<t.length;m++){const y=i.parse(t[m],m,Kt);if(!y)return null;d.push(y)}return new Sr(c,d)}evaluate(t){switch(this.type.kind){case"boolean":return!!this.args[0].evaluate(t);case"color":{let i,s;for(const c of this.args){if(i=c.evaluate(t),s=null,i instanceof Vt)return i;if(typeof i=="string"){const d=t.parseColor(i);if(d)return d}else if(Array.isArray(i)&&(s=i.length<3||i.length>4?`Invalid rgba value ${JSON.stringify(i)}: expected an array containing either three or four numeric values.`:Ge(i[0],i[1],i[2],i[3]),!s))return new Vt(i[0]/255,i[1]/255,i[2]/255,i[3])}throw new Be(s||`Could not parse color from value '${typeof i=="string"?i:JSON.stringify(i)}'`)}case"padding":{let i;for(const s of this.args){i=s.evaluate(t);const c=pe.parse(i);if(c)return c}throw new Be(`Could not parse padding from value '${typeof i=="string"?i:JSON.stringify(i)}'`)}case"numberArray":{let i;for(const s of this.args){i=s.evaluate(t);const c=xe.parse(i);if(c)return c}throw new Be(`Could not parse numberArray from value '${typeof i=="string"?i:JSON.stringify(i)}'`)}case"colorArray":{let i;for(const s of this.args){i=s.evaluate(t);const c=Ce.parse(i);if(c)return c}throw new Be(`Could not parse colorArray from value '${typeof i=="string"?i:JSON.stringify(i)}'`)}case"variableAnchorOffsetCollection":{let i;for(const s of this.args){i=s.evaluate(t);const c=Je.parse(i);if(c)return c}throw new Be(`Could not parse variableAnchorOffsetCollection from value '${typeof i=="string"?i:JSON.stringify(i)}'`)}case"number":{let i=null;for(const s of this.args){if(i=s.evaluate(t),i===null)return 0;const c=Number(i);if(!isNaN(c))return c}throw new Be(`Could not convert ${JSON.stringify(i)} to number.`)}case"formatted":return ue.fromString(ht(this.args[0].evaluate(t)));case"resolvedImage":return it.fromString(ht(this.args[0].evaluate(t)));case"projectionDefinition":return this.args[0].evaluate(t);default:return ht(this.args[0].evaluate(t))}}eachChild(t){this.args.forEach(t)}outputDefined(){return this.args.every(t=>t.outputDefined())}}const yo=["Unknown","Point","LineString","Polygon"];class Vn{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?typeof this.feature.type=="number"?yo[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(t){let i=this._parseColorCache.get(t);return i||(i=Vt.parse(t),this._parseColorCache.set(t,i)),i}}class un{constructor(t,i,s=[],c,d=new or,m=[]){this.registry=t,this.path=s,this.key=s.map(y=>`[${y}]`).join(""),this.scope=d,this.errors=m,this.expectedType=c,this._isConstant=i}parse(t,i,s,c,d={}){return i?this.concat(i,s,c)._parse(t,d):this._parse(t,d)}_parse(t,i){function s(c,d,m){return m==="assert"?new dt(d,[c]):m==="coerce"?new Sr(d,[c]):c}if(t!==null&&typeof t!="string"&&typeof t!="boolean"&&typeof t!="number"||(t=["literal",t]),Array.isArray(t)){if(t.length===0)return this.error('Expected an array with at least one element. If you wanted a literal array, use ["literal", []].');const c=t[0];if(typeof c!="string")return this.error(`Expression name must be a string, but found ${typeof c} instead. If you wanted a literal array, use ["literal", [...]].`,0),null;const d=this.registry[c];if(d){let m=d.parse(t,this);if(!m)return null;if(this.expectedType){const y=this.expectedType,w=m.type;if(y.kind!=="string"&&y.kind!=="number"&&y.kind!=="boolean"&&y.kind!=="object"&&y.kind!=="array"||w.kind!=="value"){if(y.kind==="projectionDefinition"&&["string","array"].includes(w.kind)||["color","formatted","resolvedImage"].includes(y.kind)&&["value","string"].includes(w.kind)||["padding","numberArray"].includes(y.kind)&&["value","number","array"].includes(w.kind)||y.kind==="colorArray"&&["value","string","array"].includes(w.kind)||y.kind==="variableAnchorOffsetCollection"&&["value","array"].includes(w.kind))m=s(m,y,i.typeAnnotation||"coerce");else if(this.checkSubtype(y,w))return null}else m=s(m,y,i.typeAnnotation||"assert")}if(!(m instanceof nt)&&m.type.kind!=="resolvedImage"&&this._isConstant(m)){const y=new Vn;try{m=new nt(m.type,m.evaluate(y))}catch(w){return this.error(w.message),null}}return m}return this.error(`Unknown expression "${c}". If you wanted a literal array, use ["literal", [...]].`,0)}return this.error(t===void 0?"'undefined' value invalid. Use null instead.":typeof t=="object"?'Bare objects invalid. Use ["literal", {...}] instead.':`Expected an array, but found ${typeof t} instead.`)}concat(t,i,s){const c=typeof t=="number"?this.path.concat(t):this.path,d=s?this.scope.concat(s):this.scope;return new un(this.registry,this._isConstant,c,i||null,d,this.errors)}error(t,...i){const s=`${this.key}${i.map(c=>`[${c}]`).join("")}`;this.errors.push(new Qt(s,t))}checkSubtype(t,i){const s=cn(t,i);return s&&this.error(s),s}}class On{constructor(t,i){this.type=i.type,this.bindings=[].concat(t),this.result=i}evaluate(t){return this.result.evaluate(t)}eachChild(t){for(const i of this.bindings)t(i[1]);t(this.result)}static parse(t,i){if(t.length<4)return i.error(`Expected at least 3 arguments, but found ${t.length-1} instead.`);const s=[];for(let d=1;d<t.length-1;d+=2){const m=t[d];if(typeof m!="string")return i.error(`Expected string, but found ${typeof m} instead.`,d);if(/[^a-zA-Z0-9_]/.test(m))return i.error("Variable names must contain only alphanumeric characters or '_'.",d);const y=i.parse(t[d+1],d+1);if(!y)return null;s.push([m,y])}const c=i.parse(t[t.length-1],t.length-1,i.expectedType,s);return c?new On(s,c):null}outputDefined(){return this.result.outputDefined()}}class _o{constructor(t,i){this.type=i.type,this.name=t,this.boundExpression=i}static parse(t,i){if(t.length!==2||typeof t[1]!="string")return i.error("'var' expression requires exactly one string literal argument.");const s=t[1];return i.scope.has(s)?new _o(s,i.scope.get(s)):i.error(`Unknown variable "${s}". Make sure "${s}" has been bound in an enclosing "let" expression before using it.`,1)}evaluate(t){return this.boundExpression.evaluate(t)}eachChild(){}outputDefined(){return!1}}class fs{constructor(t,i,s){this.type=t,this.index=i,this.input=s}static parse(t,i){if(t.length!==3)return i.error(`Expected 2 arguments, but found ${t.length-1} instead.`);const s=i.parse(t[1],1,Xe),c=i.parse(t[2],2,_i(i.expectedType||Kt));return s&&c?new fs(c.type.itemType,s,c):null}evaluate(t){const i=this.index.evaluate(t),s=this.input.evaluate(t);if(i<0)throw new Be(`Array index out of bounds: ${i} < 0.`);if(i>=s.length)throw new Be(`Array index out of bounds: ${i} > ${s.length-1}.`);if(i!==Math.floor(i))throw new Be(`Array index must be an integer, but found ${i} instead.`);return s[i]}eachChild(t){t(this.index),t(this.input)}outputDefined(){return!1}}class sa{constructor(t,i){this.type=Wt,this.needle=t,this.haystack=i}static parse(t,i){if(t.length!==3)return i.error(`Expected 2 arguments, but found ${t.length-1} instead.`);const s=i.parse(t[1],1,Kt),c=i.parse(t[2],2,Kt);return s&&c?go(s.type,[Wt,Mt,Xe,Dt,Kt])?new sa(s,c):i.error(`Expected first argument to be of type boolean, string, number or null, but found ${_r(s.type)} instead`):null}evaluate(t){const i=this.needle.evaluate(t),s=this.haystack.evaluate(t);if(!s)return!1;if(!Ln(i,["boolean","string","number","null"]))throw new Be(`Expected first argument to be of type boolean, string, number or null, but found ${_r(ft(i))} instead.`);if(!Ln(s,["string","array"]))throw new Be(`Expected second argument to be of type array or string, but found ${_r(ft(s))} instead.`);return s.indexOf(i)>=0}eachChild(t){t(this.needle),t(this.haystack)}outputDefined(){return!0}}class ms{constructor(t,i,s){this.type=Xe,this.needle=t,this.haystack=i,this.fromIndex=s}static parse(t,i){if(t.length<=2||t.length>=5)return i.error(`Expected 3 or 4 arguments, but found ${t.length-1} instead.`);const s=i.parse(t[1],1,Kt),c=i.parse(t[2],2,Kt);if(!s||!c)return null;if(!go(s.type,[Wt,Mt,Xe,Dt,Kt]))return i.error(`Expected first argument to be of type boolean, string, number or null, but found ${_r(s.type)} instead`);if(t.length===4){const d=i.parse(t[3],3,Xe);return d?new ms(s,c,d):null}return new ms(s,c)}evaluate(t){const i=this.needle.evaluate(t),s=this.haystack.evaluate(t);if(!Ln(i,["boolean","string","number","null"]))throw new Be(`Expected first argument to be of type boolean, string, number or null, but found ${_r(ft(i))} instead.`);let c;if(this.fromIndex&&(c=this.fromIndex.evaluate(t)),Ln(s,["string"])){const d=s.indexOf(i,c);return d===-1?-1:[...s.slice(0,d)].length}if(Ln(s,["array"]))return s.indexOf(i,c);throw new Be(`Expected second argument to be of type array or string, but found ${_r(ft(s))} instead.`)}eachChild(t){t(this.needle),t(this.haystack),this.fromIndex&&t(this.fromIndex)}outputDefined(){return!1}}class xo{constructor(t,i,s,c,d,m){this.inputType=t,this.type=i,this.input=s,this.cases=c,this.outputs=d,this.otherwise=m}static parse(t,i){if(t.length<5)return i.error(`Expected at least 4 arguments, but found only ${t.length-1}.`);if(t.length%2!=1)return i.error("Expected an even number of arguments.");let s,c;i.expectedType&&i.expectedType.kind!=="value"&&(c=i.expectedType);const d={},m=[];for(let E=2;E<t.length-1;E+=2){let R=t[E];const V=t[E+1];Array.isArray(R)||(R=[R]);const q=i.concat(E);if(R.length===0)return q.error("Expected at least one branch label.");for(const W of R){if(typeof W!="number"&&typeof W!="string")return q.error("Branch labels must be numbers or strings.");if(typeof W=="number"&&Math.abs(W)>Number.MAX_SAFE_INTEGER)return q.error(`Branch labels must be integers no larger than ${Number.MAX_SAFE_INTEGER}.`);if(typeof W=="number"&&Math.floor(W)!==W)return q.error("Numeric branch labels must be integer values.");if(s){if(q.checkSubtype(s,ft(W)))return null}else s=ft(W);if(d[String(W)]!==void 0)return q.error("Branch labels must be unique.");d[String(W)]=m.length}const j=i.parse(V,E,c);if(!j)return null;c=c||j.type,m.push(j)}const y=i.parse(t[1],1,Kt);if(!y)return null;const w=i.parse(t[t.length-1],t.length-1,c);return w?y.type.kind!=="value"&&i.concat(1).checkSubtype(s,y.type)?null:new xo(s,c,y,d,m,w):null}evaluate(t){const i=this.input.evaluate(t);return(ft(i)===this.inputType&&this.outputs[this.cases[i]]||this.otherwise).evaluate(t)}eachChild(t){t(this.input),this.outputs.forEach(t),t(this.otherwise)}outputDefined(){return this.outputs.every(t=>t.outputDefined())&&this.otherwise.outputDefined()}}class ai{constructor(t,i,s){this.type=t,this.branches=i,this.otherwise=s}static parse(t,i){if(t.length<4)return i.error(`Expected at least 3 arguments, but found only ${t.length-1}.`);if(t.length%2!=0)return i.error("Expected an odd number of arguments.");let s;i.expectedType&&i.expectedType.kind!=="value"&&(s=i.expectedType);const c=[];for(let m=1;m<t.length-1;m+=2){const y=i.parse(t[m],m,Wt);if(!y)return null;const w=i.parse(t[m+1],m+1,s);if(!w)return null;c.push([y,w]),s=s||w.type}const d=i.parse(t[t.length-1],t.length-1,s);if(!d)return null;if(!s)throw new Error("Can't infer output type");return new ai(s,c,d)}evaluate(t){for(const[i,s]of this.branches)if(i.evaluate(t))return s.evaluate(t);return this.otherwise.evaluate(t)}eachChild(t){for(const[i,s]of this.branches)t(i),t(s);t(this.otherwise)}outputDefined(){return this.branches.every(([t,i])=>i.outputDefined())&&this.otherwise.outputDefined()}}class bo{constructor(t,i,s,c){this.type=t,this.input=i,this.beginIndex=s,this.endIndex=c}static parse(t,i){if(t.length<=2||t.length>=5)return i.error(`Expected 3 or 4 arguments, but found ${t.length-1} instead.`);const s=i.parse(t[1],1,Kt),c=i.parse(t[2],2,Xe);if(!s||!c)return null;if(!go(s.type,[_i(Kt),Mt,Kt]))return i.error(`Expected first argument to be of type array or string, but found ${_r(s.type)} instead`);if(t.length===4){const d=i.parse(t[3],3,Xe);return d?new bo(s.type,s,c,d):null}return new bo(s.type,s,c)}evaluate(t){const i=this.input.evaluate(t),s=this.beginIndex.evaluate(t);let c;if(this.endIndex&&(c=this.endIndex.evaluate(t)),Ln(i,["string"]))return[...i].slice(s,c).join("");if(Ln(i,["array"]))return i.slice(s,c);throw new Be(`Expected first argument to be of type array or string, but found ${_r(ft(i))} instead.`)}eachChild(t){t(this.input),t(this.beginIndex),this.endIndex&&t(this.endIndex)}outputDefined(){return!1}}function gs(n,t){const i=n.length-1;let s,c,d=0,m=i,y=0;for(;d<=m;)if(y=Math.floor((d+m)/2),s=n[y],c=n[y+1],s<=t){if(y===i||t<c)return y;d=y+1}else{if(!(s>t))throw new Be("Input is not a number.");m=y-1}return 0}class $n{constructor(t,i,s){this.type=t,this.input=i,this.labels=[],this.outputs=[];for(const[c,d]of s)this.labels.push(c),this.outputs.push(d)}static parse(t,i){if(t.length-1<4)return i.error(`Expected at least 4 arguments, but found only ${t.length-1}.`);if((t.length-1)%2!=0)return i.error("Expected an even number of arguments.");const s=i.parse(t[1],1,Xe);if(!s)return null;const c=[];let d=null;i.expectedType&&i.expectedType.kind!=="value"&&(d=i.expectedType);for(let m=1;m<t.length;m+=2){const y=m===1?-1/0:t[m],w=t[m+1],E=m,R=m+1;if(typeof y!="number")return i.error('Input/output pairs for "step" expressions must be defined using literal numeric values (not computed expressions) for the input values.',E);if(c.length&&c[c.length-1][0]>=y)return i.error('Input/output pairs for "step" expressions must be arranged with input values in strictly ascending order.',E);const V=i.parse(w,R,d);if(!V)return null;d=d||V.type,c.push([y,V])}return new $n(d,s,c)}evaluate(t){const i=this.labels,s=this.outputs;if(i.length===1)return s[0].evaluate(t);const c=this.input.evaluate(t);if(c<=i[0])return s[0].evaluate(t);const d=i.length;return c>=i[d-1]?s[d-1].evaluate(t):s[gs(i,c)].evaluate(t)}eachChild(t){t(this.input);for(const i of this.outputs)t(i)}outputDefined(){return this.outputs.every(t=>t.outputDefined())}}function li(n){return n&&n.__esModule&&Object.prototype.hasOwnProperty.call(n,"default")?n.default:n}var aa,la,gu=function(){if(la)return aa;function n(t,i,s,c){this.cx=3*t,this.bx=3*(s-t)-this.cx,this.ax=1-this.cx-this.bx,this.cy=3*i,this.by=3*(c-i)-this.cy,this.ay=1-this.cy-this.by,this.p1x=t,this.p1y=i,this.p2x=s,this.p2y=c}return la=1,aa=n,n.prototype={sampleCurveX:function(t){return((this.ax*t+this.bx)*t+this.cx)*t},sampleCurveY:function(t){return((this.ay*t+this.by)*t+this.cy)*t},sampleCurveDerivativeX:function(t){return(3*this.ax*t+2*this.bx)*t+this.cx},solveCurveX:function(t,i){if(i===void 0&&(i=1e-6),t<0)return 0;if(t>1)return 1;for(var s=t,c=0;c<8;c++){var d=this.sampleCurveX(s)-t;if(Math.abs(d)<i)return s;var m=this.sampleCurveDerivativeX(s);if(Math.abs(m)<1e-6)break;s-=d/m}var y=0,w=1;for(s=t,c=0;c<20&&(d=this.sampleCurveX(s),!(Math.abs(d-t)<i));c++)t>d?y=s:w=s,s=.5*(w-y)+y;return s},solve:function(t,i){return this.sampleCurveY(this.solveCurveX(t,i))}},aa}(),ip=li(gu);class Ai{constructor(t,i,s,c,d){this.type=t,this.operator=i,this.interpolation=s,this.input=c,this.labels=[],this.outputs=[];for(const[m,y]of d)this.labels.push(m),this.outputs.push(y)}static interpolationFactor(t,i,s,c){let d=0;if(t.name==="exponential")d=ys(i,t.base,s,c);else if(t.name==="linear")d=ys(i,1,s,c);else if(t.name==="cubic-bezier"){const m=t.controlPoints;d=new ip(m[0],m[1],m[2],m[3]).solve(ys(i,1,s,c))}return d}static parse(t,i){let[s,c,d,...m]=t;if(!Array.isArray(c)||c.length===0)return i.error("Expected an interpolation type expression.",1);if(c[0]==="linear")c={name:"linear"};else if(c[0]==="exponential"){const E=c[1];if(typeof E!="number")return i.error("Exponential interpolation requires a numeric base.",1,1);c={name:"exponential",base:E}}else{if(c[0]!=="cubic-bezier")return i.error(`Unknown interpolation type ${String(c[0])}`,1,0);{const E=c.slice(1);if(E.length!==4||E.some(R=>typeof R!="number"||R<0||R>1))return i.error("Cubic bezier interpolation requires four numeric arguments with values between 0 and 1.",1);c={name:"cubic-bezier",controlPoints:E}}}if(t.length-1<4)return i.error(`Expected at least 4 arguments, but found only ${t.length-1}.`);if((t.length-1)%2!=0)return i.error("Expected an even number of arguments.");if(d=i.parse(d,2,Xe),!d)return null;const y=[];let w=null;s!=="interpolate-hcl"&&s!=="interpolate-lab"||i.expectedType==Mn?i.expectedType&&i.expectedType.kind!=="value"&&(w=i.expectedType):w=Tr;for(let E=0;E<m.length;E+=2){const R=m[E],V=m[E+1],q=E+3,j=E+4;if(typeof R!="number")return i.error('Input/output pairs for "interpolate" expressions must be defined using literal numeric values (not computed expressions) for the input values.',q);if(y.length&&y[y.length-1][0]>=R)return i.error('Input/output pairs for "interpolate" expressions must be arranged with input values in strictly ascending order.',q);const W=i.parse(V,j,w);if(!W)return null;w=w||W.type,y.push([R,W])}return Di(w,Xe)||Di(w,gr)||Di(w,Tr)||Di(w,_n)||Di(w,Ri)||Di(w,Mn)||Di(w,Mr)||Di(w,_i(Xe))?new Ai(w,s,c,d,y):i.error(`Type ${_r(w)} is not interpolatable.`)}evaluate(t){const i=this.labels,s=this.outputs;if(i.length===1)return s[0].evaluate(t);const c=this.input.evaluate(t);if(c<=i[0])return s[0].evaluate(t);const d=i.length;if(c>=i[d-1])return s[d-1].evaluate(t);const m=gs(i,c),y=Ai.interpolationFactor(this.interpolation,c,i[m],i[m+1]),w=s[m].evaluate(t),E=s[m+1].evaluate(t);switch(this.operator){case"interpolate":switch(this.type.kind){case"number":return si(w,E,y);case"color":return Vt.interpolate(w,E,y);case"padding":return pe.interpolate(w,E,y);case"colorArray":return Ce.interpolate(w,E,y);case"numberArray":return xe.interpolate(w,E,y);case"variableAnchorOffsetCollection":return Je.interpolate(w,E,y);case"array":return Bn(w,E,y);case"projectionDefinition":return ze.interpolate(w,E,y)}case"interpolate-hcl":switch(this.type.kind){case"color":return Vt.interpolate(w,E,y,"hcl");case"colorArray":return Ce.interpolate(w,E,y,"hcl")}case"interpolate-lab":switch(this.type.kind){case"color":return Vt.interpolate(w,E,y,"lab");case"colorArray":return Ce.interpolate(w,E,y,"lab")}}}eachChild(t){t(this.input);for(const i of this.outputs)t(i)}outputDefined(){return this.outputs.every(t=>t.outputDefined())}}function ys(n,t,i,s){const c=s-i,d=n-i;return c===0?0:t===1?d/c:(Math.pow(t,d)-1)/(Math.pow(t,c)-1)}const vn={color:Vt.interpolate,number:si,padding:pe.interpolate,numberArray:xe.interpolate,colorArray:Ce.interpolate,variableAnchorOffsetCollection:Je.interpolate,array:Bn};class vo{constructor(t,i){this.type=t,this.args=i}static parse(t,i){if(t.length<2)return i.error("Expected at least one argument.");let s=null;const c=i.expectedType;c&&c.kind!=="value"&&(s=c);const d=[];for(const y of t.slice(1)){const w=i.parse(y,1+d.length,s,void 0,{typeAnnotation:"omit"});if(!w)return null;s=s||w.type,d.push(w)}if(!s)throw new Error("No output type");const m=c&&d.some(y=>cn(c,y.type));return new vo(m?Kt:s,d)}evaluate(t){let i,s=null,c=0;for(const d of this.args)if(c++,s=d.evaluate(t),s&&s instanceof it&&!s.available&&(i||(i=s.name),s=null,c===this.args.length&&(s=i)),s!==null)break;return s}eachChild(t){this.args.forEach(t)}outputDefined(){return this.args.every(t=>t.outputDefined())}}function _s(n,t){return n==="=="||n==="!="?t.kind==="boolean"||t.kind==="string"||t.kind==="number"||t.kind==="null"||t.kind==="value":t.kind==="string"||t.kind==="number"||t.kind==="value"}function $i(n,t,i,s){return s.compare(t,i)===0}function wo(n,t,i){const s=n!=="=="&&n!=="!=";return class Sy{constructor(d,m,y){this.type=Wt,this.lhs=d,this.rhs=m,this.collator=y,this.hasUntypedArgument=d.type.kind==="value"||m.type.kind==="value"}static parse(d,m){if(d.length!==3&&d.length!==4)return m.error("Expected two or three arguments.");const y=d[0];let w=m.parse(d[1],1,Kt);if(!w)return null;if(!_s(y,w.type))return m.concat(1).error(`"${y}" comparisons are not supported for type '${_r(w.type)}'.`);let E=m.parse(d[2],2,Kt);if(!E)return null;if(!_s(y,E.type))return m.concat(2).error(`"${y}" comparisons are not supported for type '${_r(E.type)}'.`);if(w.type.kind!==E.type.kind&&w.type.kind!=="value"&&E.type.kind!=="value")return m.error(`Cannot compare types '${_r(w.type)}' and '${_r(E.type)}'.`);s&&(w.type.kind==="value"&&E.type.kind!=="value"?w=new dt(E.type,[w]):w.type.kind!=="value"&&E.type.kind==="value"&&(E=new dt(w.type,[E])));let R=null;if(d.length===4){if(w.type.kind!=="string"&&E.type.kind!=="string"&&w.type.kind!=="value"&&E.type.kind!=="value")return m.error("Cannot use collator to compare non-string types.");if(R=m.parse(d[3],3,Oi),!R)return null}return new Sy(w,E,R)}evaluate(d){const m=this.lhs.evaluate(d),y=this.rhs.evaluate(d);if(s&&this.hasUntypedArgument){const w=ft(m),E=ft(y);if(w.kind!==E.kind||w.kind!=="string"&&w.kind!=="number")throw new Be(`Expected arguments for "${n}" to be (string, string) or (number, number), but found (${w.kind}, ${E.kind}) instead.`)}if(this.collator&&!s&&this.hasUntypedArgument){const w=ft(m),E=ft(y);if(w.kind!=="string"||E.kind!=="string")return t(d,m,y)}return this.collator?i(d,m,y,this.collator.evaluate(d)):t(d,m,y)}eachChild(d){d(this.lhs),d(this.rhs),this.collator&&d(this.collator)}outputDefined(){return!0}}}const ca=wo("==",function(n,t,i){return t===i},$i),np=wo("!=",function(n,t,i){return t!==i},function(n,t,i,s){return!$i(0,t,i,s)}),xl=wo("<",function(n,t,i){return t<i},function(n,t,i,s){return s.compare(t,i)<0}),op=wo(">",function(n,t,i){return t>i},function(n,t,i,s){return s.compare(t,i)>0}),sp=wo("<=",function(n,t,i){return t<=i},function(n,t,i,s){return s.compare(t,i)<=0}),ap=wo(">=",function(n,t,i){return t>=i},function(n,t,i,s){return s.compare(t,i)>=0});class ua{constructor(t,i,s){this.type=Oi,this.locale=s,this.caseSensitive=t,this.diacriticSensitive=i}static parse(t,i){if(t.length!==2)return i.error("Expected one argument.");const s=t[1];if(typeof s!="object"||Array.isArray(s))return i.error("Collator options argument must be an object.");const c=i.parse(s["case-sensitive"]!==void 0&&s["case-sensitive"],1,Wt);if(!c)return null;const d=i.parse(s["diacritic-sensitive"]!==void 0&&s["diacritic-sensitive"],1,Wt);if(!d)return null;let m=null;return s.locale&&(m=i.parse(s.locale,1,Mt),!m)?null:new ua(c,d,m)}evaluate(t){return new bn(this.caseSensitive.evaluate(t),this.diacriticSensitive.evaluate(t),this.locale?this.locale.evaluate(t):null)}eachChild(t){t(this.caseSensitive),t(this.diacriticSensitive),this.locale&&t(this.locale)}outputDefined(){return!1}}class Do{constructor(t,i,s,c,d){this.type=Mt,this.number=t,this.locale=i,this.currency=s,this.minFractionDigits=c,this.maxFractionDigits=d}static parse(t,i){if(t.length!==3)return i.error("Expected two arguments.");const s=i.parse(t[1],1,Xe);if(!s)return null;const c=t[2];if(typeof c!="object"||Array.isArray(c))return i.error("NumberFormat options argument must be an object.");let d=null;if(c.locale&&(d=i.parse(c.locale,1,Mt),!d))return null;let m=null;if(c.currency&&(m=i.parse(c.currency,1,Mt),!m))return null;let y=null;if(c["min-fraction-digits"]&&(y=i.parse(c["min-fraction-digits"],1,Xe),!y))return null;let w=null;return c["max-fraction-digits"]&&(w=i.parse(c["max-fraction-digits"],1,Xe),!w)?null:new Do(s,d,m,y,w)}evaluate(t){return new Intl.NumberFormat(this.locale?this.locale.evaluate(t):[],{style:this.currency?"currency":"decimal",currency:this.currency?this.currency.evaluate(t):void 0,minimumFractionDigits:this.minFractionDigits?this.minFractionDigits.evaluate(t):void 0,maximumFractionDigits:this.maxFractionDigits?this.maxFractionDigits.evaluate(t):void 0}).format(this.number.evaluate(t))}eachChild(t){t(this.number),this.locale&&t(this.locale),this.currency&&t(this.currency),this.minFractionDigits&&t(this.minFractionDigits),this.maxFractionDigits&&t(this.maxFractionDigits)}outputDefined(){return!1}}class ha{constructor(t){this.type=mo,this.sections=t}static parse(t,i){if(t.length<2)return i.error("Expected at least one argument.");const s=t[1];if(!Array.isArray(s)&&typeof s=="object")return i.error("First argument must be an image or text section.");const c=[];let d=!1;for(let m=1;m<=t.length-1;++m){const y=t[m];if(d&&typeof y=="object"&&!Array.isArray(y)){d=!1;let w=null;if(y["font-scale"]&&(w=i.parse(y["font-scale"],1,Xe),!w))return null;let E=null;if(y["text-font"]&&(E=i.parse(y["text-font"],1,_i(Mt)),!E))return null;let R=null;if(y["text-color"]&&(R=i.parse(y["text-color"],1,Tr),!R))return null;let V=null;if(y["vertical-align"]){if(typeof y["vertical-align"]=="string"&&!Fi.includes(y["vertical-align"]))return i.error(`'vertical-align' must be one of: 'bottom', 'center', 'top' but found '${y["vertical-align"]}' instead.`);if(V=i.parse(y["vertical-align"],1,Mt),!V)return null}const q=c[c.length-1];q.scale=w,q.font=E,q.textColor=R,q.verticalAlign=V}else{const w=i.parse(t[m],1,Kt);if(!w)return null;const E=w.type.kind;if(E!=="string"&&E!=="value"&&E!=="null"&&E!=="resolvedImage")return i.error("Formatted text type must be 'string', 'value', 'image' or 'null'.");d=!0,c.push({content:w,scale:null,font:null,textColor:null,verticalAlign:null})}}return new ha(c)}evaluate(t){return new ue(this.sections.map(i=>{const s=i.content.evaluate(t);return ft(s)===xn?new ce("",s,null,null,null,i.verticalAlign?i.verticalAlign.evaluate(t):null):new ce(ht(s),null,i.scale?i.scale.evaluate(t):null,i.font?i.font.evaluate(t).join(","):null,i.textColor?i.textColor.evaluate(t):null,i.verticalAlign?i.verticalAlign.evaluate(t):null)}))}eachChild(t){for(const i of this.sections)t(i.content),i.scale&&t(i.scale),i.font&&t(i.font),i.textColor&&t(i.textColor),i.verticalAlign&&t(i.verticalAlign)}outputDefined(){return!1}}class pa{constructor(t){this.type=xn,this.input=t}static parse(t,i){if(t.length!==2)return i.error("Expected two arguments.");const s=i.parse(t[1],1,Mt);return s?new pa(s):i.error("No image name provided.")}evaluate(t){const i=this.input.evaluate(t),s=it.fromString(i);return s&&t.availableImages&&(s.available=t.availableImages.indexOf(i)>-1),s}eachChild(t){t(this.input)}outputDefined(){return!1}}class da{constructor(t){this.type=Xe,this.input=t}static parse(t,i){if(t.length!==2)return i.error(`Expected 1 argument, but found ${t.length-1} instead.`);const s=i.parse(t[1],1);return s?s.type.kind!=="array"&&s.type.kind!=="string"&&s.type.kind!=="value"?i.error(`Expected argument of type string or array, but found ${_r(s.type)} instead.`):new da(s):null}evaluate(t){const i=this.input.evaluate(t);if(typeof i=="string")return[...i].length;if(Array.isArray(i))return i.length;throw new Be(`Expected value to be of type string or array, but found ${_r(ft(i))} instead.`)}eachChild(t){t(this.input)}outputDefined(){return!1}}const wn=8192;function yu(n,t){const i=(180+n[0])/360,s=(180-180/Math.PI*Math.log(Math.tan(Math.PI/4+n[1]*Math.PI/360)))/360,c=Math.pow(2,t.z);return[Math.round(i*c*wn),Math.round(s*c*wn)]}function bl(n,t){const i=Math.pow(2,t.z);return[(c=(n[0]/wn+t.x)/i,360*c-180),(s=(n[1]/wn+t.y)/i,360/Math.PI*Math.atan(Math.exp((180-360*s)*Math.PI/180))-90)];var s,c}function xs(n,t){n[0]=Math.min(n[0],t[0]),n[1]=Math.min(n[1],t[1]),n[2]=Math.max(n[2],t[0]),n[3]=Math.max(n[3],t[1])}function bs(n,t){return!(n[0]<=t[0]||n[2]>=t[2]||n[1]<=t[1]||n[3]>=t[3])}function lp(n,t,i){const s=n[0]-t[0],c=n[1]-t[1],d=n[0]-i[0],m=n[1]-i[1];return s*m-d*c==0&&s*d<=0&&c*m<=0}function fa(n,t,i,s){return(c=[s[0]-i[0],s[1]-i[1]])[0]*(d=[t[0]-n[0],t[1]-n[1]])[1]-c[1]*d[0]!=0&&!(!vu(n,t,i,s)||!vu(i,s,n,t));var c,d}function _u(n,t,i){for(const s of i)for(let c=0;c<s.length-1;++c)if(fa(n,t,s[c],s[c+1]))return!0;return!1}function So(n,t,i=!1){let s=!1;for(const y of t)for(let w=0;w<y.length-1;w++){if(lp(n,y[w],y[w+1]))return i;(d=y[w])[1]>(c=n)[1]!=(m=y[w+1])[1]>c[1]&&c[0]<(m[0]-d[0])*(c[1]-d[1])/(m[1]-d[1])+d[0]&&(s=!s)}var c,d,m;return s}function xu(n,t){for(const i of t)if(So(n,i))return!0;return!1}function bu(n,t){for(const i of n)if(!So(i,t))return!1;for(let i=0;i<n.length-1;++i)if(_u(n[i],n[i+1],t))return!1;return!0}function cp(n,t){for(const i of t)if(bu(n,i))return!0;return!1}function vu(n,t,i,s){const c=s[0]-i[0],d=s[1]-i[1],m=(n[0]-i[0])*d-c*(n[1]-i[1]),y=(t[0]-i[0])*d-c*(t[1]-i[1]);return m>0&&y<0||m<0&&y>0}function vs(n,t,i){const s=[];for(let c=0;c<n.length;c++){const d=[];for(let m=0;m<n[c].length;m++){const y=yu(n[c][m],i);xs(t,y),d.push(y)}s.push(d)}return s}function wu(n,t,i){const s=[];for(let c=0;c<n.length;c++){const d=vs(n[c],t,i);s.push(d)}return s}function Su(n,t,i,s){if(n[0]<i[0]||n[0]>i[2]){const c=.5*s;let d=n[0]-i[0]>c?-s:i[0]-n[0]>c?s:0;d===0&&(d=n[0]-i[2]>c?-s:i[2]-n[0]>c?s:0),n[0]+=d}xs(t,n)}function Au(n,t,i,s){const c=Math.pow(2,s.z)*wn,d=[s.x*wn,s.y*wn],m=[];for(const y of n)for(const w of y){const E=[w.x+d[0],w.y+d[1]];Su(E,t,i,c),m.push(E)}return m}function vl(n,t,i,s){const c=Math.pow(2,s.z)*wn,d=[s.x*wn,s.y*wn],m=[];for(const w of n){const E=[];for(const R of w){const V=[R.x+d[0],R.y+d[1]];xs(t,V),E.push(V)}m.push(E)}if(t[2]-t[0]<=c/2){(y=t)[0]=y[1]=1/0,y[2]=y[3]=-1/0;for(const w of m)for(const E of w)Su(E,t,i,c)}var y;return m}class eo{constructor(t,i){this.type=Wt,this.geojson=t,this.geometries=i}static parse(t,i){if(t.length!==2)return i.error(`'within' expression requires exactly one argument, but found ${t.length-1} instead.`);if(Ye(t[1])){const s=t[1];if(s.type==="FeatureCollection"){const c=[];for(const d of s.features){const{type:m,coordinates:y}=d.geometry;m==="Polygon"&&c.push(y),m==="MultiPolygon"&&c.push(...y)}if(c.length)return new eo(s,{type:"MultiPolygon",coordinates:c})}else if(s.type==="Feature"){const c=s.geometry.type;if(c==="Polygon"||c==="MultiPolygon")return new eo(s,s.geometry)}else if(s.type==="Polygon"||s.type==="MultiPolygon")return new eo(s,s)}return i.error("'within' expression requires valid geojson object that contains polygon geometry type.")}evaluate(t){if(t.geometry()!=null&&t.canonicalID()!=null){if(t.geometryType()==="Point")return function(i,s){const c=[1/0,1/0,-1/0,-1/0],d=[1/0,1/0,-1/0,-1/0],m=i.canonicalID();if(s.type==="Polygon"){const y=vs(s.coordinates,d,m),w=Au(i.geometry(),c,d,m);if(!bs(c,d))return!1;for(const E of w)if(!So(E,y))return!1}if(s.type==="MultiPolygon"){const y=wu(s.coordinates,d,m),w=Au(i.geometry(),c,d,m);if(!bs(c,d))return!1;for(const E of w)if(!xu(E,y))return!1}return!0}(t,this.geometries);if(t.geometryType()==="LineString")return function(i,s){const c=[1/0,1/0,-1/0,-1/0],d=[1/0,1/0,-1/0,-1/0],m=i.canonicalID();if(s.type==="Polygon"){const y=vs(s.coordinates,d,m),w=vl(i.geometry(),c,d,m);if(!bs(c,d))return!1;for(const E of w)if(!bu(E,y))return!1}if(s.type==="MultiPolygon"){const y=wu(s.coordinates,d,m),w=vl(i.geometry(),c,d,m);if(!bs(c,d))return!1;for(const E of w)if(!cp(E,y))return!1}return!0}(t,this.geometries)}return!1}eachChild(){}outputDefined(){return!0}}let ku=class{constructor(n=[],t=(i,s)=>i<s?-1:i>s?1:0){if(this.data=n,this.length=this.data.length,this.compare=t,this.length>0)for(let i=(this.length>>1)-1;i>=0;i--)this._down(i)}push(n){this.data.push(n),this._up(this.length++)}pop(){if(this.length===0)return;const n=this.data[0],t=this.data.pop();return--this.length>0&&(this.data[0]=t,this._down(0)),n}peek(){return this.data[0]}_up(n){const{data:t,compare:i}=this,s=t[n];for(;n>0;){const c=n-1>>1,d=t[c];if(i(s,d)>=0)break;t[n]=d,n=c}t[n]=s}_down(n){const{data:t,compare:i}=this,s=this.length>>1,c=t[n];for(;n<s;){let d=1+(n<<1);const m=d+1;if(m<this.length&&i(t[m],t[d])<0&&(d=m),i(t[d],c)>=0)break;t[n]=t[d],n=d}t[n]=c}};function Tu(n,t,i=0,s=n.length-1,c=Cu){for(;s>i;){if(s-i>600){const w=s-i+1,E=t-i+1,R=Math.log(w),V=.5*Math.exp(2*R/3),q=.5*Math.sqrt(R*V*(w-V)/w)*(E-w/2<0?-1:1);Tu(n,t,Math.max(i,Math.floor(t-E*V/w+q)),Math.min(s,Math.floor(t+(w-E)*V/w+q)),c)}const d=n[t];let m=i,y=s;for(zo(n,i,t),c(n[s],d)>0&&zo(n,i,s);m<y;){for(zo(n,m,y),m++,y--;c(n[m],d)<0;)m++;for(;c(n[y],d)>0;)y--}c(n[i],d)===0?zo(n,i,y):(y++,zo(n,y,s)),y<=t&&(i=y+1),t<=y&&(s=y-1)}}function zo(n,t,i){const s=n[t];n[t]=n[i],n[i]=s}function Cu(n,t){return n<t?-1:n>t?1:0}function ma(n,t){if(n.length<=1)return[n];const i=[];let s,c;for(const d of n){const m=hp(d);m!==0&&(d.area=Math.abs(m),c===void 0&&(c=m<0),c===m<0?(s&&i.push(s),s=[d]):s.push(d))}if(s&&i.push(s),t>1)for(let d=0;d<i.length;d++)i[d].length<=t||(Tu(i[d],t,1,i[d].length-1,up),i[d]=i[d].slice(0,t));return i}function up(n,t){return t.area-n.area}function hp(n){let t=0;for(let i,s,c=0,d=n.length,m=d-1;c<d;m=c++)i=n[c],s=n[m],t+=(s.x-i.x)*(i.y+s.y);return t}const wl=1/298.257223563,Eu=wl*(2-wl),Pu=Math.PI/180;class Sl{constructor(t){const i=6378.137*Pu*1e3,s=Math.cos(t*Pu),c=1/(1-Eu*(1-s*s)),d=Math.sqrt(c);this.kx=i*d*s,this.ky=i*d*c*(1-Eu)}distance(t,i){const s=this.wrap(t[0]-i[0])*this.kx,c=(t[1]-i[1])*this.ky;return Math.sqrt(s*s+c*c)}pointOnLine(t,i){let s,c,d,m,y=1/0;for(let w=0;w<t.length-1;w++){let E=t[w][0],R=t[w][1],V=this.wrap(t[w+1][0]-E)*this.kx,q=(t[w+1][1]-R)*this.ky,j=0;V===0&&q===0||(j=(this.wrap(i[0]-E)*this.kx*V+(i[1]-R)*this.ky*q)/(V*V+q*q),j>1?(E=t[w+1][0],R=t[w+1][1]):j>0&&(E+=V/this.kx*j,R+=q/this.ky*j)),V=this.wrap(i[0]-E)*this.kx,q=(i[1]-R)*this.ky;const W=V*V+q*q;W<y&&(y=W,s=E,c=R,d=w,m=j)}return{point:[s,c],index:d,t:Math.max(0,Math.min(1,m))}}wrap(t){for(;t<-180;)t+=360;for(;t>180;)t-=360;return t}}function Iu(n,t){return t[0]-n[0]}function sr(n){return n[1]-n[0]+1}function Fn(n,t){return n[1]>=n[0]&&n[1]<t}function Al(n,t){if(n[0]>n[1])return[null,null];const i=sr(n);if(t){if(i===2)return[n,null];const c=Math.floor(i/2);return[[n[0],n[0]+c],[n[0]+c,n[1]]]}if(i===1)return[n,null];const s=Math.floor(i/2)-1;return[[n[0],n[0]+s],[n[0]+s+1,n[1]]]}function kl(n,t){if(!Fn(t,n.length))return[1/0,1/0,-1/0,-1/0];const i=[1/0,1/0,-1/0,-1/0];for(let s=t[0];s<=t[1];++s)xs(i,n[s]);return i}function Tl(n){const t=[1/0,1/0,-1/0,-1/0];for(const i of n)for(const s of i)xs(t,s);return t}function Mu(n){return n[0]!==-1/0&&n[1]!==-1/0&&n[2]!==1/0&&n[3]!==1/0}function Cl(n,t,i){if(!Mu(n)||!Mu(t))return NaN;let s=0,c=0;return n[2]<t[0]&&(s=t[0]-n[2]),n[0]>t[2]&&(s=n[0]-t[2]),n[1]>t[3]&&(c=n[1]-t[3]),n[3]<t[1]&&(c=t[1]-n[3]),i.distance([0,0],[s,c])}function Ao(n,t,i){const s=i.pointOnLine(t,n);return i.distance(n,s.point)}function El(n,t,i,s,c){const d=Math.min(Ao(n,[i,s],c),Ao(t,[i,s],c)),m=Math.min(Ao(i,[n,t],c),Ao(s,[n,t],c));return Math.min(d,m)}function pp(n,t,i,s,c){if(!Fn(t,n.length)||!Fn(s,i.length))return 1/0;let d=1/0;for(let m=t[0];m<t[1];++m){const y=n[m],w=n[m+1];for(let E=s[0];E<s[1];++E){const R=i[E],V=i[E+1];if(fa(y,w,R,V))return 0;d=Math.min(d,El(y,w,R,V,c))}}return d}function dp(n,t,i,s,c){if(!Fn(t,n.length)||!Fn(s,i.length))return NaN;let d=1/0;for(let m=t[0];m<=t[1];++m)for(let y=s[0];y<=s[1];++y)if(d=Math.min(d,c.distance(n[m],i[y])),d===0)return d;return d}function fp(n,t,i){if(So(n,t,!0))return 0;let s=1/0;for(const c of t){const d=c[0],m=c[c.length-1];if(d!==m&&(s=Math.min(s,Ao(n,[m,d],i)),s===0))return s;const y=i.pointOnLine(c,n);if(s=Math.min(s,i.distance(n,y.point)),s===0)return s}return s}function mp(n,t,i,s){if(!Fn(t,n.length))return NaN;for(let d=t[0];d<=t[1];++d)if(So(n[d],i,!0))return 0;let c=1/0;for(let d=t[0];d<t[1];++d){const m=n[d],y=n[d+1];for(const w of i)for(let E=0,R=w.length,V=R-1;E<R;V=E++){const q=w[V],j=w[E];if(fa(m,y,q,j))return 0;c=Math.min(c,El(m,y,q,j,s))}}return c}function Lu(n,t){for(const i of n)for(const s of i)if(So(s,t,!0))return!0;return!1}function gp(n,t,i,s=1/0){const c=Tl(n),d=Tl(t);if(s!==1/0&&Cl(c,d,i)>=s)return s;if(bs(c,d)){if(Lu(n,t))return 0}else if(Lu(t,n))return 0;let m=1/0;for(const y of n)for(let w=0,E=y.length,R=E-1;w<E;R=w++){const V=y[R],q=y[w];for(const j of t)for(let W=0,X=j.length,re=X-1;W<X;re=W++){const ae=j[re],Se=j[W];if(fa(V,q,ae,Se))return 0;m=Math.min(m,El(V,q,ae,Se,i))}}return m}function Ru(n,t,i,s,c,d){if(!d)return;const m=Cl(kl(s,d),c,i);m<t&&n.push([m,d,[0,0]])}function ga(n,t,i,s,c,d,m){if(!d||!m)return;const y=Cl(kl(s,d),kl(c,m),i);y<t&&n.push([y,d,m])}function ya(n,t,i,s,c=1/0){let d=Math.min(s.distance(n[0],i[0][0]),c);if(d===0)return d;const m=new ku([[0,[0,n.length-1],[0,0]]],Iu),y=Tl(i);for(;m.length>0;){const w=m.pop();if(w[0]>=d)continue;const E=w[1],R=t?50:100;if(sr(E)<=R){if(!Fn(E,n.length))return NaN;if(t){const V=mp(n,E,i,s);if(isNaN(V)||V===0)return V;d=Math.min(d,V)}else for(let V=E[0];V<=E[1];++V){const q=fp(n[V],i,s);if(d=Math.min(d,q),d===0)return 0}}else{const V=Al(E,t);Ru(m,d,s,n,y,V[0]),Ru(m,d,s,n,y,V[1])}}return d}function _a(n,t,i,s,c,d=1/0){let m=Math.min(d,c.distance(n[0],i[0]));if(m===0)return m;const y=new ku([[0,[0,n.length-1],[0,i.length-1]]],Iu);for(;y.length>0;){const w=y.pop();if(w[0]>=m)continue;const E=w[1],R=w[2],V=t?50:100,q=s?50:100;if(sr(E)<=V&&sr(R)<=q){if(!Fn(E,n.length)&&Fn(R,i.length))return NaN;let j;if(t&&s)j=pp(n,E,i,R,c),m=Math.min(m,j);else if(t&&!s){const W=n.slice(E[0],E[1]+1);for(let X=R[0];X<=R[1];++X)if(j=Ao(i[X],W,c),m=Math.min(m,j),m===0)return m}else if(!t&&s){const W=i.slice(R[0],R[1]+1);for(let X=E[0];X<=E[1];++X)if(j=Ao(n[X],W,c),m=Math.min(m,j),m===0)return m}else j=dp(n,E,i,R,c),m=Math.min(m,j)}else{const j=Al(E,t),W=Al(R,s);ga(y,m,c,n,i,j[0],W[0]),ga(y,m,c,n,i,j[0],W[1]),ga(y,m,c,n,i,j[1],W[0]),ga(y,m,c,n,i,j[1],W[1])}}return m}function Pl(n){return n.type==="MultiPolygon"?n.coordinates.map(t=>({type:"Polygon",coordinates:t})):n.type==="MultiLineString"?n.coordinates.map(t=>({type:"LineString",coordinates:t})):n.type==="MultiPoint"?n.coordinates.map(t=>({type:"Point",coordinates:t})):[n]}class ko{constructor(t,i){this.type=Xe,this.geojson=t,this.geometries=i}static parse(t,i){if(t.length!==2)return i.error(`'distance' expression requires exactly one argument, but found ${t.length-1} instead.`);if(Ye(t[1])){const s=t[1];if(s.type==="FeatureCollection")return new ko(s,s.features.map(c=>Pl(c.geometry)).flat());if(s.type==="Feature")return new ko(s,Pl(s.geometry));if("type"in s&&"coordinates"in s)return new ko(s,Pl(s))}return i.error("'distance' expression requires valid geojson object that contains polygon geometry type.")}evaluate(t){if(t.geometry()!=null&&t.canonicalID()!=null){if(t.geometryType()==="Point")return function(i,s){const c=i.geometry(),d=c.flat().map(w=>bl([w.x,w.y],i.canonical));if(c.length===0)return NaN;const m=new Sl(d[0][1]);let y=1/0;for(const w of s){switch(w.type){case"Point":y=Math.min(y,_a(d,!1,[w.coordinates],!1,m,y));break;case"LineString":y=Math.min(y,_a(d,!1,w.coordinates,!0,m,y));break;case"Polygon":y=Math.min(y,ya(d,!1,w.coordinates,m,y))}if(y===0)return y}return y}(t,this.geometries);if(t.geometryType()==="LineString")return function(i,s){const c=i.geometry(),d=c.flat().map(w=>bl([w.x,w.y],i.canonical));if(c.length===0)return NaN;const m=new Sl(d[0][1]);let y=1/0;for(const w of s){switch(w.type){case"Point":y=Math.min(y,_a(d,!0,[w.coordinates],!1,m,y));break;case"LineString":y=Math.min(y,_a(d,!0,w.coordinates,!0,m,y));break;case"Polygon":y=Math.min(y,ya(d,!0,w.coordinates,m,y))}if(y===0)return y}return y}(t,this.geometries);if(t.geometryType()==="Polygon")return function(i,s){const c=i.geometry();if(c.length===0||c[0].length===0)return NaN;const d=ma(c,0).map(w=>w.map(E=>E.map(R=>bl([R.x,R.y],i.canonical)))),m=new Sl(d[0][0][0][1]);let y=1/0;for(const w of s)for(const E of d){switch(w.type){case"Point":y=Math.min(y,ya([w.coordinates],!1,E,m,y));break;case"LineString":y=Math.min(y,ya(w.coordinates,!0,E,m,y));break;case"Polygon":y=Math.min(y,gp(E,w.coordinates,m,y))}if(y===0)return y}return y}(t,this.geometries)}return NaN}eachChild(){}outputDefined(){return!0}}class xa{constructor(t){this.type=Kt,this.key=t}static parse(t,i){if(t.length!==2)return i.error(`Expected 1 argument, but found ${t.length-1} instead.`);const s=t[1];return s==null?i.error("Global state property must be defined."):typeof s!="string"?i.error(`Global state property must be string, but found ${typeof t[1]} instead.`):new xa(s)}evaluate(t){var i;const s=(i=t.globals)===null||i===void 0?void 0:i.globalState;return s&&Object.keys(s).length!==0?Qn(s,this.key):null}eachChild(){}outputDefined(){return!1}}const Bo={"==":ca,"!=":np,">":op,"<":xl,">=":ap,"<=":sp,array:dt,at:fs,boolean:dt,case:ai,coalesce:vo,collator:ua,format:ha,image:pa,in:sa,"index-of":ms,interpolate:Ai,"interpolate-hcl":Ai,"interpolate-lab":Ai,length:da,let:On,literal:nt,match:xo,number:dt,"number-format":Do,object:dt,slice:bo,step:$n,string:dt,"to-boolean":Sr,"to-color":Sr,"to-number":Sr,"to-string":Sr,var:_o,within:eo,distance:ko,"global-state":xa};class en{constructor(t,i,s,c){this.name=t,this.type=i,this._evaluate=s,this.args=c}evaluate(t){return this._evaluate(t,this.args)}eachChild(t){this.args.forEach(t)}outputDefined(){return!1}static parse(t,i){const s=t[0],c=en.definitions[s];if(!c)return i.error(`Unknown expression "${s}". If you wanted a literal array, use ["literal", [...]].`,0);const d=Array.isArray(c)?c[0]:c.type,m=Array.isArray(c)?[[c[1],c[2]]]:c.overloads,y=m.filter(([E])=>!Array.isArray(E)||E.length===t.length-1);let w=null;for(const[E,R]of y){w=new un(i.registry,ba,i.path,null,i.scope);const V=[];let q=!1;for(let j=1;j<t.length;j++){const W=t[j],X=Array.isArray(E)?E[j-1]:E.type,re=w.parse(W,1+V.length,X);if(!re){q=!0;break}V.push(re)}if(!q)if(Array.isArray(E)&&E.length!==V.length)w.error(`Expected ${E.length} arguments, but found ${V.length} instead.`);else{for(let j=0;j<V.length;j++){const W=Array.isArray(E)?E[j]:E.type,X=V[j];w.concat(j+1).checkSubtype(W,X.type)}if(w.errors.length===0)return new en(s,d,R,V)}}if(y.length===1)i.errors.push(...w.errors);else{const E=(y.length?y:m).map(([V])=>{return q=V,Array.isArray(q)?`(${q.map(_r).join(", ")})`:`(${_r(q.type)}...)`;var q}).join(" | "),R=[];for(let V=1;V<t.length;V++){const q=i.parse(t[V],1+R.length);if(!q)return null;R.push(_r(q.type))}i.error(`Expected arguments of type ${E}, but found (${R.join(", ")}) instead.`)}return null}static register(t,i){en.definitions=i;for(const s in i)t[s]=en}}function Du(n,[t,i,s,c]){t=t.evaluate(n),i=i.evaluate(n),s=s.evaluate(n);const d=c?c.evaluate(n):1,m=Ge(t,i,s,d);if(m)throw new Be(m);return new Vt(t/255,i/255,s/255,d,!1)}function zu(n,t){return n in t}function Il(n,t){const i=t[n];return i===void 0?null:i}function To(n){return{type:n}}function ba(n){if(n instanceof _o)return ba(n.boundExpression);if(n instanceof en&&n.name==="error"||n instanceof ua||n instanceof eo||n instanceof ko||n instanceof xa)return!1;const t=n instanceof Sr||n instanceof dt;let i=!0;return n.eachChild(s=>{i=t?i&&ba(s):i&&s instanceof nt}),!!i&&va(n)&&wa(n,["zoom","heatmap-density","line-progress","accumulated","is-supported-script"])}function va(n){if(n instanceof en&&(n.name==="get"&&n.args.length===1||n.name==="feature-state"||n.name==="has"&&n.args.length===1||n.name==="properties"||n.name==="geometry-type"||n.name==="id"||/^filter-/.test(n.name))||n instanceof eo||n instanceof ko)return!1;let t=!0;return n.eachChild(i=>{t&&!va(i)&&(t=!1)}),t}function ws(n){if(n instanceof en&&n.name==="feature-state")return!1;let t=!0;return n.eachChild(i=>{t&&!ws(i)&&(t=!1)}),t}function wa(n,t){if(n instanceof en&&t.indexOf(n.name)>=0)return!1;let i=!0;return n.eachChild(s=>{i&&!wa(s,t)&&(i=!1)}),i}function Sa(n){return{result:"success",value:n}}function Vo(n){return{result:"error",value:n}}function Oo(n){return n["property-type"]==="data-driven"||n["property-type"]==="cross-faded-data-driven"}function Bu(n){return!!n.expression&&n.expression.parameters.indexOf("zoom")>-1}function Aa(n){return!!n.expression&&n.expression.interpolated}function $t(n){return n instanceof Number?"number":n instanceof String?"string":n instanceof Boolean?"boolean":Array.isArray(n)?"array":n===null?"null":typeof n}function ka(n){return typeof n=="object"&&n!==null&&!Array.isArray(n)&&ft(n)===yi}function Ta(n){return n}function Ml(n,t){const i=n.stops&&typeof n.stops[0][0]=="object",s=i||!(i||n.property!==void 0),c=n.type||(Aa(t)?"exponential":"interval"),d=function(R){switch(R.type){case"color":return Vt.parse;case"padding":return pe.parse;case"numberArray":return xe.parse;case"colorArray":return Ce.parse;default:return null}}(t);if(d&&((n=ar({},n)).stops&&(n.stops=n.stops.map(R=>[R[0],d(R[1])])),n.default=d(n.default?n.default:t.default)),n.colorSpace&&(m=n.colorSpace)!=="rgb"&&m!=="hcl"&&m!=="lab")throw new Error(`Unknown color space: "${n.colorSpace}"`);var m;const y=function(R){switch(R){case"exponential":return Vu;case"interval":return _p;case"categorical":return yp;case"identity":return xp;default:throw new Error(`Unknown function type "${R}"`)}}(c);let w,E;if(c==="categorical"){w=Object.create(null);for(const R of n.stops)w[R[0]]=R[1];E=typeof n.stops[0][0]}if(i){const R={},V=[];for(let W=0;W<n.stops.length;W++){const X=n.stops[W],re=X[0].zoom;R[re]===void 0&&(R[re]={zoom:re,type:n.type,property:n.property,default:n.default,stops:[]},V.push(re)),R[re].stops.push([X[0].value,X[1]])}const q=[];for(const W of V)q.push([R[W].zoom,Ml(R[W],t)]);const j={name:"linear"};return{kind:"composite",interpolationType:j,interpolationFactor:Ai.interpolationFactor.bind(void 0,j),zoomStops:q.map(W=>W[0]),evaluate:({zoom:W},X)=>Vu({stops:q,base:n.base},t,W).evaluate(W,X)}}if(s){const R=c==="exponential"?{name:"exponential",base:n.base!==void 0?n.base:1}:null;return{kind:"camera",interpolationType:R,interpolationFactor:Ai.interpolationFactor.bind(void 0,R),zoomStops:n.stops.map(V=>V[0]),evaluate:({zoom:V})=>y(n,t,V,w,E)}}return{kind:"source",evaluate(R,V){const q=V&&V.properties?V.properties[n.property]:void 0;return q===void 0?Ss(n.default,t.default):y(n,t,q,w,E)}}}function Ss(n,t,i){return n!==void 0?n:t!==void 0?t:i!==void 0?i:void 0}function yp(n,t,i,s,c){return Ss(typeof i===c?s[i]:void 0,n.default,t.default)}function _p(n,t,i){if($t(i)!=="number")return Ss(n.default,t.default);const s=n.stops.length;if(s===1||i<=n.stops[0][0])return n.stops[0][1];if(i>=n.stops[s-1][0])return n.stops[s-1][1];const c=gs(n.stops.map(d=>d[0]),i);return n.stops[c][1]}function Vu(n,t,i){const s=n.base!==void 0?n.base:1;if($t(i)!=="number")return Ss(n.default,t.default);const c=n.stops.length;if(c===1||i<=n.stops[0][0])return n.stops[0][1];if(i>=n.stops[c-1][0])return n.stops[c-1][1];const d=gs(n.stops.map(R=>R[0]),i),m=function(R,V,q,j){const W=j-q,X=R-q;return W===0?0:V===1?X/W:(Math.pow(V,X)-1)/(Math.pow(V,W)-1)}(i,s,n.stops[d][0],n.stops[d+1][0]),y=n.stops[d][1],w=n.stops[d+1][1],E=vn[t.type]||Ta;return typeof y.evaluate=="function"?{evaluate(...R){const V=y.evaluate.apply(void 0,R),q=w.evaluate.apply(void 0,R);if(V!==void 0&&q!==void 0)return E(V,q,m,n.colorSpace)}}:E(y,w,m,n.colorSpace)}function xp(n,t,i){switch(t.type){case"color":i=Vt.parse(i);break;case"formatted":i=ue.fromString(i.toString());break;case"resolvedImage":i=it.fromString(i.toString());break;case"padding":i=pe.parse(i);break;case"colorArray":i=Ce.parse(i);break;case"numberArray":i=xe.parse(i);break;default:$t(i)===t.type||t.type==="enum"&&t.values[i]||(i=void 0)}return Ss(i,n.default,t.default)}en.register(Bo,{error:[{kind:"error"},[Mt],(n,[t])=>{throw new Be(t.evaluate(n))}],typeof:[Mt,[Kt],(n,[t])=>_r(ft(t.evaluate(n)))],"to-rgba":[_i(Xe,4),[Tr],(n,[t])=>{const[i,s,c,d]=t.evaluate(n).rgb;return[255*i,255*s,255*c,d]}],rgb:[Tr,[Xe,Xe,Xe],Du],rgba:[Tr,[Xe,Xe,Xe,Xe],Du],has:{type:Wt,overloads:[[[Mt],(n,[t])=>zu(t.evaluate(n),n.properties())],[[Mt,yi],(n,[t,i])=>zu(t.evaluate(n),i.evaluate(n))]]},get:{type:Kt,overloads:[[[Mt],(n,[t])=>Il(t.evaluate(n),n.properties())],[[Mt,yi],(n,[t,i])=>Il(t.evaluate(n),i.evaluate(n))]]},"feature-state":[Kt,[Mt],(n,[t])=>Il(t.evaluate(n),n.featureState||{})],properties:[yi,[],n=>n.properties()],"geometry-type":[Mt,[],n=>n.geometryType()],id:[Kt,[],n=>n.id()],zoom:[Xe,[],n=>n.globals.zoom],"heatmap-density":[Xe,[],n=>n.globals.heatmapDensity||0],"line-progress":[Xe,[],n=>n.globals.lineProgress||0],accumulated:[Kt,[],n=>n.globals.accumulated===void 0?null:n.globals.accumulated],"+":[Xe,To(Xe),(n,t)=>{let i=0;for(const s of t)i+=s.evaluate(n);return i}],"*":[Xe,To(Xe),(n,t)=>{let i=1;for(const s of t)i*=s.evaluate(n);return i}],"-":{type:Xe,overloads:[[[Xe,Xe],(n,[t,i])=>t.evaluate(n)-i.evaluate(n)],[[Xe],(n,[t])=>-t.evaluate(n)]]},"/":[Xe,[Xe,Xe],(n,[t,i])=>t.evaluate(n)/i.evaluate(n)],"%":[Xe,[Xe,Xe],(n,[t,i])=>t.evaluate(n)%i.evaluate(n)],ln2:[Xe,[],()=>Math.LN2],pi:[Xe,[],()=>Math.PI],e:[Xe,[],()=>Math.E],"^":[Xe,[Xe,Xe],(n,[t,i])=>Math.pow(t.evaluate(n),i.evaluate(n))],sqrt:[Xe,[Xe],(n,[t])=>Math.sqrt(t.evaluate(n))],log10:[Xe,[Xe],(n,[t])=>Math.log(t.evaluate(n))/Math.LN10],ln:[Xe,[Xe],(n,[t])=>Math.log(t.evaluate(n))],log2:[Xe,[Xe],(n,[t])=>Math.log(t.evaluate(n))/Math.LN2],sin:[Xe,[Xe],(n,[t])=>Math.sin(t.evaluate(n))],cos:[Xe,[Xe],(n,[t])=>Math.cos(t.evaluate(n))],tan:[Xe,[Xe],(n,[t])=>Math.tan(t.evaluate(n))],asin:[Xe,[Xe],(n,[t])=>Math.asin(t.evaluate(n))],acos:[Xe,[Xe],(n,[t])=>Math.acos(t.evaluate(n))],atan:[Xe,[Xe],(n,[t])=>Math.atan(t.evaluate(n))],min:[Xe,To(Xe),(n,t)=>Math.min(...t.map(i=>i.evaluate(n)))],max:[Xe,To(Xe),(n,t)=>Math.max(...t.map(i=>i.evaluate(n)))],abs:[Xe,[Xe],(n,[t])=>Math.abs(t.evaluate(n))],round:[Xe,[Xe],(n,[t])=>{const i=t.evaluate(n);return i<0?-Math.round(-i):Math.round(i)}],floor:[Xe,[Xe],(n,[t])=>Math.floor(t.evaluate(n))],ceil:[Xe,[Xe],(n,[t])=>Math.ceil(t.evaluate(n))],"filter-==":[Wt,[Mt,Kt],(n,[t,i])=>n.properties()[t.value]===i.value],"filter-id-==":[Wt,[Kt],(n,[t])=>n.id()===t.value],"filter-type-==":[Wt,[Mt],(n,[t])=>n.geometryType()===t.value],"filter-<":[Wt,[Mt,Kt],(n,[t,i])=>{const s=n.properties()[t.value],c=i.value;return typeof s==typeof c&&s<c}],"filter-id-<":[Wt,[Kt],(n,[t])=>{const i=n.id(),s=t.value;return typeof i==typeof s&&i<s}],"filter->":[Wt,[Mt,Kt],(n,[t,i])=>{const s=n.properties()[t.value],c=i.value;return typeof s==typeof c&&s>c}],"filter-id->":[Wt,[Kt],(n,[t])=>{const i=n.id(),s=t.value;return typeof i==typeof s&&i>s}],"filter-<=":[Wt,[Mt,Kt],(n,[t,i])=>{const s=n.properties()[t.value],c=i.value;return typeof s==typeof c&&s<=c}],"filter-id-<=":[Wt,[Kt],(n,[t])=>{const i=n.id(),s=t.value;return typeof i==typeof s&&i<=s}],"filter->=":[Wt,[Mt,Kt],(n,[t,i])=>{const s=n.properties()[t.value],c=i.value;return typeof s==typeof c&&s>=c}],"filter-id->=":[Wt,[Kt],(n,[t])=>{const i=n.id(),s=t.value;return typeof i==typeof s&&i>=s}],"filter-has":[Wt,[Kt],(n,[t])=>t.value in n.properties()],"filter-has-id":[Wt,[],n=>n.id()!==null&&n.id()!==void 0],"filter-type-in":[Wt,[_i(Mt)],(n,[t])=>t.value.indexOf(n.geometryType())>=0],"filter-id-in":[Wt,[_i(Kt)],(n,[t])=>t.value.indexOf(n.id())>=0],"filter-in-small":[Wt,[Mt,_i(Kt)],(n,[t,i])=>i.value.indexOf(n.properties()[t.value])>=0],"filter-in-large":[Wt,[Mt,_i(Kt)],(n,[t,i])=>function(s,c,d,m){for(;d<=m;){const y=d+m>>1;if(c[y]===s)return!0;c[y]>s?m=y-1:d=y+1}return!1}(n.properties()[t.value],i.value,0,i.value.length-1)],all:{type:Wt,overloads:[[[Wt,Wt],(n,[t,i])=>t.evaluate(n)&&i.evaluate(n)],[To(Wt),(n,t)=>{for(const i of t)if(!i.evaluate(n))return!1;return!0}]]},any:{type:Wt,overloads:[[[Wt,Wt],(n,[t,i])=>t.evaluate(n)||i.evaluate(n)],[To(Wt),(n,t)=>{for(const i of t)if(i.evaluate(n))return!0;return!1}]]},"!":[Wt,[Wt],(n,[t])=>!t.evaluate(n)],"is-supported-script":[Wt,[Mt],(n,[t])=>{const i=n.globals&&n.globals.isSupportedScript;return!i||i(t.evaluate(n))}],upcase:[Mt,[Mt],(n,[t])=>t.evaluate(n).toUpperCase()],downcase:[Mt,[Mt],(n,[t])=>t.evaluate(n).toLowerCase()],concat:[Mt,To(Kt),(n,t)=>t.map(i=>ht(i.evaluate(n))).join("")],"resolved-locale":[Mt,[Oi],(n,[t])=>t.evaluate(n).resolvedLocale()]});class Ca{constructor(t,i){this.expression=t,this._warningHistory={},this._evaluator=new Vn,this._defaultValue=i?function(s){if(s.type==="color"&&ka(s.default))return new Vt(0,0,0,0);switch(s.type){case"color":return Vt.parse(s.default)||null;case"padding":return pe.parse(s.default)||null;case"numberArray":return xe.parse(s.default)||null;case"colorArray":return Ce.parse(s.default)||null;case"variableAnchorOffsetCollection":return Je.parse(s.default)||null;case"projectionDefinition":return ze.parse(s.default)||null;default:return s.default===void 0?null:s.default}}(i):null,this._enumValues=i&&i.type==="enum"?i.values:null}evaluateWithoutErrorHandling(t,i,s,c,d,m){return this._evaluator.globals=t,this._evaluator.feature=i,this._evaluator.featureState=s,this._evaluator.canonical=c,this._evaluator.availableImages=d||null,this._evaluator.formattedSection=m,this.expression.evaluate(this._evaluator)}evaluate(t,i,s,c,d,m){this._evaluator.globals=t,this._evaluator.feature=i||null,this._evaluator.featureState=s||null,this._evaluator.canonical=c,this._evaluator.availableImages=d||null,this._evaluator.formattedSection=m||null;try{const y=this.expression.evaluate(this._evaluator);if(y==null||typeof y=="number"&&y!=y)return this._defaultValue;if(this._enumValues&&!(y in this._enumValues))throw new Be(`Expected value to be one of ${Object.keys(this._enumValues).map(w=>JSON.stringify(w)).join(", ")}, but found ${JSON.stringify(y)} instead.`);return y}catch(y){return this._warningHistory[y.message]||(this._warningHistory[y.message]=!0,typeof console<"u"&&console.warn(y.message)),this._defaultValue}}}function As(n){return Array.isArray(n)&&n.length>0&&typeof n[0]=="string"&&n[0]in Bo}function Ea(n,t){const i=new un(Bo,ba,[],t?function(c){const d={color:Tr,string:Mt,number:Xe,enum:Mt,boolean:Wt,formatted:mo,padding:_n,numberArray:Ri,colorArray:Mn,projectionDefinition:gr,resolvedImage:xn,variableAnchorOffsetCollection:Mr};return c.type==="array"?_i(d[c.value]||Kt,c.length):d[c.type]}(t):void 0),s=i.parse(n,void 0,void 0,void 0,t&&t.type==="string"?{typeAnnotation:"coerce"}:void 0);return s?Sa(new Ca(s,t)):Vo(i.errors)}class Ll{constructor(t,i){this.kind=t,this._styleExpression=i,this.isStateDependent=t!=="constant"&&!ws(i.expression)}evaluateWithoutErrorHandling(t,i,s,c,d,m){return this._styleExpression.evaluateWithoutErrorHandling(t,i,s,c,d,m)}evaluate(t,i,s,c,d,m){return this._styleExpression.evaluate(t,i,s,c,d,m)}}class Pa{constructor(t,i,s,c){this.kind=t,this.zoomStops=s,this._styleExpression=i,this.isStateDependent=t!=="camera"&&!ws(i.expression),this.interpolationType=c}evaluateWithoutErrorHandling(t,i,s,c,d,m){return this._styleExpression.evaluateWithoutErrorHandling(t,i,s,c,d,m)}evaluate(t,i,s,c,d,m){return this._styleExpression.evaluate(t,i,s,c,d,m)}interpolationFactor(t,i,s){return this.interpolationType?Ai.interpolationFactor(this.interpolationType,t,i,s):0}}function Rl(n,t){const i=Ea(n,t);if(i.result==="error")return i;const s=i.value.expression,c=va(s);if(!c&&!Oo(t))return Vo([new Qt("","data expressions not supported")]);const d=wa(s,["zoom"]);if(!d&&!Bu(t))return Vo([new Qt("","zoom expressions not supported")]);const m=Ts(s);return m||d?m instanceof Qt?Vo([m]):m instanceof Ai&&!Aa(t)?Vo([new Qt("",'"interpolate" expressions cannot be used with this property')]):Sa(m?new Pa(c?"camera":"composite",i.value,m.labels,m instanceof Ai?m.interpolation:void 0):new Ll(c?"constant":"source",i.value)):Vo([new Qt("",'"zoom" expression may only be used as input to a top-level "step" or "interpolate" expression.')])}class ks{constructor(t,i){this._parameters=t,this._specification=i,ar(this,Ml(this._parameters,this._specification))}static deserialize(t){return new ks(t._parameters,t._specification)}static serialize(t){return{_parameters:t._parameters,_specification:t._specification}}}function Ts(n){let t=null;if(n instanceof On)t=Ts(n.result);else if(n instanceof vo){for(const i of n.args)if(t=Ts(i),t)break}else(n instanceof $n||n instanceof Ai)&&n.input instanceof en&&n.input.name==="zoom"&&(t=n);return t instanceof Qt||n.eachChild(i=>{const s=Ts(i);s instanceof Qt?t=s:!t&&s?t=new Qt("",'"zoom" expression may only be used as input to a top-level "step" or "interpolate" expression.'):t&&s&&t!==s&&(t=new Qt("",'Only one zoom-based "step" or "interpolate" subexpression may be used in an expression.'))}),t}function Cs(n){if(n===!0||n===!1)return!0;if(!Array.isArray(n)||n.length===0)return!1;switch(n[0]){case"has":return n.length>=2&&n[1]!=="$id"&&n[1]!=="$type";case"in":return n.length>=3&&(typeof n[1]!="string"||Array.isArray(n[2]));case"!in":case"!has":case"none":return!1;case"==":case"!=":case">":case">=":case"<":case"<=":return n.length!==3||Array.isArray(n[1])||Array.isArray(n[2]);case"any":case"all":for(const t of n.slice(1))if(!Cs(t)&&typeof t!="boolean")return!1;return!0;default:return!0}}const Dl={type:"boolean",default:!1,transition:!1,"property-type":"data-driven",expression:{interpolated:!1,parameters:["zoom","feature"]}};function Es(n){if(n==null)return{filter:()=>!0,needGeometry:!1};Cs(n)||(n=Ma(n));const t=Ea(n,Dl);if(t.result==="error")throw new Error(t.value.map(i=>`${i.key}: ${i.message}`).join(", "));return{filter:(i,s,c)=>t.value.evaluate(i,s,{},c),needGeometry:Ou(n)}}function Ia(n,t){return n<t?-1:n>t?1:0}function Ou(n){if(!Array.isArray(n))return!1;if(n[0]==="within"||n[0]==="distance")return!0;for(let t=1;t<n.length;t++)if(Ou(n[t]))return!0;return!1}function Ma(n){if(!n)return!0;const t=n[0];return n.length<=1?t!=="any":t==="=="?zl(n[1],n[2],"=="):t==="!="?La(zl(n[1],n[2],"==")):t==="<"||t===">"||t==="<="||t===">="?zl(n[1],n[2],t):t==="any"?(i=n.slice(1),["any"].concat(i.map(Ma))):t==="all"?["all"].concat(n.slice(1).map(Ma)):t==="none"?["all"].concat(n.slice(1).map(Ma).map(La)):t==="in"?Fu(n[1],n.slice(2)):t==="!in"?La(Fu(n[1],n.slice(2))):t==="has"?Nu(n[1]):t!=="!has"||La(Nu(n[1]));var i}function zl(n,t,i){switch(n){case"$type":return[`filter-type-${i}`,t];case"$id":return[`filter-id-${i}`,t];default:return[`filter-${i}`,n,t]}}function Fu(n,t){if(t.length===0)return!1;switch(n){case"$type":return["filter-type-in",["literal",t]];case"$id":return["filter-id-in",["literal",t]];default:return t.length>200&&!t.some(i=>typeof i!=typeof t[0])?["filter-in-large",n,["literal",t.sort(Ia)]]:["filter-in-small",n,["literal",t]]}}function Nu(n){switch(n){case"$type":return!0;case"$id":return["filter-has-id"];default:return["filter-has",n]}}function La(n){return["!",n]}function Ra(n){const t=typeof n;if(t==="number"||t==="boolean"||t==="string"||n==null)return JSON.stringify(n);if(Array.isArray(n)){let c="[";for(const d of n)c+=`${Ra(d)},`;return`${c}]`}const i=Object.keys(n).sort();let s="{";for(let c=0;c<i.length;c++)s+=`${JSON.stringify(i[c])}:${Ra(n[i[c]])},`;return`${s}}`}function qu(n){let t="";for(const i of Me)t+=`/${Ra(n[i])}`;return t}function Ps(n){const t=n.value;return t?[new Ue(n.key,t,"constants have been deprecated as of v8")]:[]}function Hr(n){return n instanceof Number||n instanceof String||n instanceof Boolean?n.valueOf():n}function to(n){if(Array.isArray(n))return n.map(to);if(n instanceof Object&&!(n instanceof Number||n instanceof String||n instanceof Boolean)){const t={};for(const i in n)t[i]=to(n[i]);return t}return Hr(n)}function Ni(n){const t=n.key,i=n.value,s=n.valueSpec||{},c=n.objectElementValidators||{},d=n.style,m=n.styleSpec,y=n.validateSpec;let w=[];const E=$t(i);if(E!=="object")return[new Ue(t,i,`object expected, ${E} found`)];for(const R in i){const V=R.split(".")[0],q=Qn(s,V)||s["*"];let j;if(Qn(c,V))j=c[V];else if(Qn(s,V))j=y;else if(c["*"])j=c["*"];else{if(!s["*"]){w.push(new Ue(t,i[R],`unknown property "${R}"`));continue}j=y}w=w.concat(j({key:(t&&`${t}.`)+R,value:i[R],valueSpec:q,style:d,styleSpec:m,object:i,objectKey:R,validateSpec:y},i))}for(const R in s)c[R]||s[R].required&&s[R].default===void 0&&i[R]===void 0&&w.push(new Ue(t,i,`missing required property "${R}"`));return w}function Bl(n){const t=n.value,i=n.valueSpec,s=n.style,c=n.styleSpec,d=n.key,m=n.arrayElementValidator||n.validateSpec;if($t(t)!=="array")return[new Ue(d,t,`array expected, ${$t(t)} found`)];if(i.length&&t.length!==i.length)return[new Ue(d,t,`array length ${i.length} expected, length ${t.length} found`)];if(i["min-length"]&&t.length<i["min-length"])return[new Ue(d,t,`array length at least ${i["min-length"]} expected, length ${t.length} found`)];let y={type:i.value,values:i.values};c.$version<7&&(y.function=i.function),$t(i.value)==="object"&&(y=i.value);let w=[];for(let E=0;E<t.length;E++)w=w.concat(m({array:t,arrayIndex:E,value:t[E],valueSpec:y,validateSpec:n.validateSpec,style:s,styleSpec:c,key:`${d}[${E}]`}));return w}function Is(n){const t=n.key,i=n.value,s=n.valueSpec;let c=$t(i);return c==="number"&&i!=i&&(c="NaN"),c!=="number"?[new Ue(t,i,`number expected, ${c} found`)]:"minimum"in s&&i<s.minimum?[new Ue(t,i,`${i} is less than the minimum value ${s.minimum}`)]:"maximum"in s&&i>s.maximum?[new Ue(t,i,`${i} is greater than the maximum value ${s.maximum}`)]:[]}function Vl(n){const t=n.valueSpec,i=Hr(n.value.type);let s,c,d,m={};const y=i!=="categorical"&&n.value.property===void 0,w=!y,E=$t(n.value.stops)==="array"&&$t(n.value.stops[0])==="array"&&$t(n.value.stops[0][0])==="object",R=Ni({key:n.key,value:n.value,valueSpec:n.styleSpec.function,validateSpec:n.validateSpec,style:n.style,styleSpec:n.styleSpec,objectElementValidators:{stops:function(j){if(i==="identity")return[new Ue(j.key,j.value,'identity function may not have a "stops" property')];let W=[];const X=j.value;return W=W.concat(Bl({key:j.key,value:X,valueSpec:j.valueSpec,validateSpec:j.validateSpec,style:j.style,styleSpec:j.styleSpec,arrayElementValidator:V})),$t(X)==="array"&&X.length===0&&W.push(new Ue(j.key,X,"array must have at least one stop")),W},default:function(j){return j.validateSpec({key:j.key,value:j.value,valueSpec:t,validateSpec:j.validateSpec,style:j.style,styleSpec:j.styleSpec})}}});return i==="identity"&&y&&R.push(new Ue(n.key,n.value,'missing required property "property"')),i==="identity"||n.value.stops||R.push(new Ue(n.key,n.value,'missing required property "stops"')),i==="exponential"&&n.valueSpec.expression&&!Aa(n.valueSpec)&&R.push(new Ue(n.key,n.value,"exponential functions not supported")),n.styleSpec.$version>=8&&(w&&!Oo(n.valueSpec)?R.push(new Ue(n.key,n.value,"property functions not supported")):y&&!Bu(n.valueSpec)&&R.push(new Ue(n.key,n.value,"zoom functions not supported"))),i!=="categorical"&&!E||n.value.property!==void 0||R.push(new Ue(n.key,n.value,'"property" property is required')),R;function V(j){let W=[];const X=j.value,re=j.key;if($t(X)!=="array")return[new Ue(re,X,`array expected, ${$t(X)} found`)];if(X.length!==2)return[new Ue(re,X,`array length 2 expected, length ${X.length} found`)];if(E){if($t(X[0])!=="object")return[new Ue(re,X,`object expected, ${$t(X[0])} found`)];if(X[0].zoom===void 0)return[new Ue(re,X,"object stop key must have zoom")];if(X[0].value===void 0)return[new Ue(re,X,"object stop key must have value")];if(d&&d>Hr(X[0].zoom))return[new Ue(re,X[0].zoom,"stop zoom values must appear in ascending order")];Hr(X[0].zoom)!==d&&(d=Hr(X[0].zoom),c=void 0,m={}),W=W.concat(Ni({key:`${re}[0]`,value:X[0],valueSpec:{zoom:{}},validateSpec:j.validateSpec,style:j.style,styleSpec:j.styleSpec,objectElementValidators:{zoom:Is,value:q}}))}else W=W.concat(q({key:`${re}[0]`,value:X[0],validateSpec:j.validateSpec,style:j.style,styleSpec:j.styleSpec},X));return As(to(X[1]))?W.concat([new Ue(`${re}[1]`,X[1],"expressions are not allowed in function stops.")]):W.concat(j.validateSpec({key:`${re}[1]`,value:X[1],valueSpec:t,validateSpec:j.validateSpec,style:j.style,styleSpec:j.styleSpec}))}function q(j,W){const X=$t(j.value),re=Hr(j.value),ae=j.value!==null?j.value:W;if(s){if(X!==s)return[new Ue(j.key,ae,`${X} stop domain type must match previous stop domain type ${s}`)]}else s=X;if(X!=="number"&&X!=="string"&&X!=="boolean")return[new Ue(j.key,ae,"stop domain value must be a number, string, or boolean")];if(X!=="number"&&i!=="categorical"){let Se=`number expected, ${X} found`;return Oo(t)&&i===void 0&&(Se+='\nIf you intended to use a categorical function, specify `"type": "categorical"`.'),[new Ue(j.key,ae,Se)]}return i!=="categorical"||X!=="number"||isFinite(re)&&Math.floor(re)===re?i!=="categorical"&&X==="number"&&c!==void 0&&re<c?[new Ue(j.key,ae,"stop domain values must appear in ascending order")]:(c=re,i==="categorical"&&re in m?[new Ue(j.key,ae,"stop domain values must be unique")]:(m[re]=!0,[])):[new Ue(j.key,ae,`integer expected, found ${re}`)]}}function Sn(n){const t=(n.expressionContext==="property"?Rl:Ea)(to(n.value),n.valueSpec);if(t.result==="error")return t.value.map(s=>new Ue(`${n.key}${s.key}`,n.value,s.message));const i=t.value.expression||t.value._styleExpression.expression;if(n.expressionContext==="property"&&n.propertyKey==="text-font"&&!i.outputDefined())return[new Ue(n.key,n.value,`Invalid data expression for "${n.propertyKey}". Output values must be contained as literals within the expression.`)];if(n.expressionContext==="property"&&n.propertyType==="layout"&&!ws(i))return[new Ue(n.key,n.value,'"feature-state" data expressions are not supported with layout properties.')];if(n.expressionContext==="filter"&&!ws(i))return[new Ue(n.key,n.value,'"feature-state" data expressions are not supported with filters.')];if(n.expressionContext&&n.expressionContext.indexOf("cluster")===0){if(!wa(i,["zoom","feature-state"]))return[new Ue(n.key,n.value,'"zoom" and "feature-state" expressions are not supported with cluster properties.')];if(n.expressionContext==="cluster-initial"&&!va(i))return[new Ue(n.key,n.value,"Feature data expressions are not supported with initial expression part of cluster properties.")]}return[]}function Ol(n){const t=n.key,i=n.value,s=$t(i);return s!=="string"?[new Ue(t,i,`color expected, ${s} found`)]:Vt.parse(String(i))?[]:[new Ue(t,i,`color expected, "${i}" found`)]}function Ms(n){const t=n.key,i=n.value,s=n.valueSpec,c=[];return Array.isArray(s.values)?s.values.indexOf(Hr(i))===-1&&c.push(new Ue(t,i,`expected one of [${s.values.join(", ")}], ${JSON.stringify(i)} found`)):Object.keys(s.values).indexOf(Hr(i))===-1&&c.push(new Ue(t,i,`expected one of [${Object.keys(s.values).join(", ")}], ${JSON.stringify(i)} found`)),c}function Fl(n){return Cs(to(n.value))?Sn(ar({},n,{expressionContext:"filter",valueSpec:{value:"boolean"}})):Uu(n)}function Uu(n){const t=n.value,i=n.key;if($t(t)!=="array")return[new Ue(i,t,`array expected, ${$t(t)} found`)];const s=n.styleSpec;let c,d=[];if(t.length<1)return[new Ue(i,t,"filter array must have at least 1 element")];switch(d=d.concat(Ms({key:`${i}[0]`,value:t[0],valueSpec:s.filter_operator,style:n.style,styleSpec:n.styleSpec})),Hr(t[0])){case"<":case"<=":case">":case">=":t.length>=2&&Hr(t[1])==="$type"&&d.push(new Ue(i,t,`"$type" cannot be use with operator "${t[0]}"`));case"==":case"!=":t.length!==3&&d.push(new Ue(i,t,`filter array for operator "${t[0]}" must have 3 elements`));case"in":case"!in":t.length>=2&&(c=$t(t[1]),c!=="string"&&d.push(new Ue(`${i}[1]`,t[1],`string expected, ${c} found`)));for(let m=2;m<t.length;m++)c=$t(t[m]),Hr(t[1])==="$type"?d=d.concat(Ms({key:`${i}[${m}]`,value:t[m],valueSpec:s.geometry_type,style:n.style,styleSpec:n.styleSpec})):c!=="string"&&c!=="number"&&c!=="boolean"&&d.push(new Ue(`${i}[${m}]`,t[m],`string, number, or boolean expected, ${c} found`));break;case"any":case"all":case"none":for(let m=1;m<t.length;m++)d=d.concat(Uu({key:`${i}[${m}]`,value:t[m],style:n.style,styleSpec:n.styleSpec}));break;case"has":case"!has":c=$t(t[1]),t.length!==2?d.push(new Ue(i,t,`filter array for "${t[0]}" operator must have 2 elements`)):c!=="string"&&d.push(new Ue(`${i}[1]`,t[1],`string expected, ${c} found`))}return d}function ju(n,t){const i=n.key,s=n.validateSpec,c=n.style,d=n.styleSpec,m=n.value,y=n.objectKey,w=d[`${t}_${n.layerType}`];if(!w)return[];const E=y.match(/^(.*)-transition$/);if(t==="paint"&&E&&w[E[1]]&&w[E[1]].transition)return s({key:i,value:m,valueSpec:d.transition,style:c,styleSpec:d});const R=n.valueSpec||w[y];if(!R)return[new Ue(i,m,`unknown property "${y}"`)];let V;if($t(m)==="string"&&Oo(R)&&!R.tokens&&(V=/^{([^}]+)}$/.exec(m)))return[new Ue(i,m,`"${y}" does not support interpolation syntax
|
|
5
|
-
Use an identity property function instead: \`{ "type": "identity", "property": ${JSON.stringify(V[1])} }\`.`)];const q=[];return n.layerType==="symbol"&&(y==="text-field"&&c&&!c.glyphs&&q.push(new Ue(i,m,'use of "text-field" requires a style "glyphs" property')),y==="text-font"&&ka(to(m))&&Hr(m.type)==="identity"&&q.push(new Ue(i,m,'"text-font" does not support identity functions'))),q.concat(s({key:n.key,value:m,valueSpec:R,style:c,styleSpec:d,expressionContext:"property",propertyType:t,propertyKey:y}))}function Hu(n){return ju(n,"paint")}function Fo(n){return ju(n,"layout")}function No(n){let t=[];const i=n.value,s=n.key,c=n.style,d=n.styleSpec;if($t(i)!=="object")return[new Ue(s,i,`object expected, ${$t(i)} found`)];i.type||i.ref||t.push(new Ue(s,i,'either "type" or "ref" is required'));let m=Hr(i.type);const y=Hr(i.ref);if(i.id){const w=Hr(i.id);for(let E=0;E<n.arrayIndex;E++){const R=c.layers[E];Hr(R.id)===w&&t.push(new Ue(s,i.id,`duplicate layer id "${i.id}", previously used at line ${R.id.__line__}`))}}if("ref"in i){let w;["type","source","source-layer","filter","layout"].forEach(E=>{E in i&&t.push(new Ue(s,i[E],`"${E}" is prohibited for ref layers`))}),c.layers.forEach(E=>{Hr(E.id)===y&&(w=E)}),w?w.ref?t.push(new Ue(s,i.ref,"ref cannot reference another ref layer")):m=Hr(w.type):t.push(new Ue(s,i.ref,`ref layer "${y}" not found`))}else if(m!=="background")if(i.source){const w=c.sources&&c.sources[i.source],E=w&&Hr(w.type);w?E==="vector"&&m==="raster"?t.push(new Ue(s,i.source,`layer "${i.id}" requires a raster source`)):E!=="raster-dem"&&m==="hillshade"?t.push(new Ue(s,i.source,`layer "${i.id}" requires a raster-dem source`)):E==="raster"&&m!=="raster"?t.push(new Ue(s,i.source,`layer "${i.id}" requires a vector source`)):E!=="vector"||i["source-layer"]?E==="raster-dem"&&m!=="hillshade"?t.push(new Ue(s,i.source,"raster-dem source can only be used with layer type 'hillshade'.")):m!=="line"||!i.paint||!i.paint["line-gradient"]||E==="geojson"&&w.lineMetrics||t.push(new Ue(s,i,`layer "${i.id}" specifies a line-gradient, which requires a GeoJSON source with \`lineMetrics\` enabled.`)):t.push(new Ue(s,i,`layer "${i.id}" must specify a "source-layer"`)):t.push(new Ue(s,i.source,`source "${i.source}" not found`))}else t.push(new Ue(s,i,'missing required property "source"'));return t=t.concat(Ni({key:s,value:i,valueSpec:d.layer,style:n.style,styleSpec:n.styleSpec,validateSpec:n.validateSpec,objectElementValidators:{"*":()=>[],type:()=>n.validateSpec({key:`${s}.type`,value:i.type,valueSpec:d.layer.type,style:n.style,styleSpec:n.styleSpec,validateSpec:n.validateSpec,object:i,objectKey:"type"}),filter:Fl,layout:w=>Ni({layer:i,key:w.key,value:w.value,style:w.style,styleSpec:w.styleSpec,validateSpec:w.validateSpec,objectElementValidators:{"*":E=>Fo(ar({layerType:m},E))}}),paint:w=>Ni({layer:i,key:w.key,value:w.value,style:w.style,styleSpec:w.styleSpec,validateSpec:w.validateSpec,objectElementValidators:{"*":E=>Hu(ar({layerType:m},E))}})}})),t}function $r(n){const t=n.value,i=n.key,s=$t(t);return s!=="string"?[new Ue(i,t,`string expected, ${s} found`)]:[]}const qo={promoteId:function({key:n,value:t}){if($t(t)==="string")return $r({key:n,value:t});{const i=[];for(const s in t)i.push(...$r({key:`${n}.${s}`,value:t[s]}));return i}}};function Nl(n){const t=n.value,i=n.key,s=n.styleSpec,c=n.style,d=n.validateSpec;if(!t.type)return[new Ue(i,t,'"type" is required')];const m=Hr(t.type);let y;switch(m){case"vector":case"raster":return y=Ni({key:i,value:t,valueSpec:s[`source_${m.replace("-","_")}`],style:n.style,styleSpec:s,objectElementValidators:qo,validateSpec:d}),y;case"raster-dem":return y=function(w){var E;const R=(E=w.sourceName)!==null&&E!==void 0?E:"",V=w.value,q=w.styleSpec,j=q.source_raster_dem,W=w.style;let X=[];const re=$t(V);if(V===void 0)return X;if(re!=="object")return X.push(new Ue("source_raster_dem",V,`object expected, ${re} found`)),X;const ae=Hr(V.encoding)==="custom",Se=["redFactor","greenFactor","blueFactor","baseShift"],fe=w.value.encoding?`"${w.value.encoding}"`:"Default";for(const U in V)!ae&&Se.includes(U)?X.push(new Ue(U,V[U],`In "${R}": "${U}" is only valid when "encoding" is set to "custom". ${fe} encoding found`)):j[U]?X=X.concat(w.validateSpec({key:U,value:V[U],valueSpec:j[U],validateSpec:w.validateSpec,style:W,styleSpec:q})):X.push(new Ue(U,V[U],`unknown property "${U}"`));return X}({sourceName:i,value:t,style:n.style,styleSpec:s,validateSpec:d}),y;case"geojson":if(y=Ni({key:i,value:t,valueSpec:s.source_geojson,style:c,styleSpec:s,validateSpec:d,objectElementValidators:qo}),t.cluster)for(const w in t.clusterProperties){const[E,R]=t.clusterProperties[w],V=typeof E=="string"?[E,["accumulated"],["get",w]]:E;y.push(...Sn({key:`${i}.${w}.map`,value:R,expressionContext:"cluster-map"})),y.push(...Sn({key:`${i}.${w}.reduce`,value:V,expressionContext:"cluster-reduce"}))}return y;case"video":return Ni({key:i,value:t,valueSpec:s.source_video,style:c,validateSpec:d,styleSpec:s});case"image":return Ni({key:i,value:t,valueSpec:s.source_image,style:c,validateSpec:d,styleSpec:s});case"canvas":return[new Ue(i,null,"Please use runtime APIs to add canvas sources, rather than including them in stylesheets.","source.canvas")];default:return Ms({key:`${i}.type`,value:t.type,valueSpec:{values:["vector","raster","raster-dem","geojson","video","image"]}})}}function Wu(n){const t=n.value,i=n.styleSpec,s=i.light,c=n.style;let d=[];const m=$t(t);if(t===void 0)return d;if(m!=="object")return d=d.concat([new Ue("light",t,`object expected, ${m} found`)]),d;for(const y in t){const w=y.match(/^(.*)-transition$/);d=d.concat(w&&s[w[1]]&&s[w[1]].transition?n.validateSpec({key:y,value:t[y],valueSpec:i.transition,validateSpec:n.validateSpec,style:c,styleSpec:i}):s[y]?n.validateSpec({key:y,value:t[y],valueSpec:s[y],validateSpec:n.validateSpec,style:c,styleSpec:i}):[new Ue(y,t[y],`unknown property "${y}"`)])}return d}function Zu(n){const t=n.value,i=n.styleSpec,s=i.sky,c=n.style,d=$t(t);if(t===void 0)return[];if(d!=="object")return[new Ue("sky",t,`object expected, ${d} found`)];let m=[];for(const y in t)m=m.concat(s[y]?n.validateSpec({key:y,value:t[y],valueSpec:s[y],style:c,styleSpec:i}):[new Ue(y,t[y],`unknown property "${y}"`)]);return m}function Uo(n){const t=n.value,i=n.styleSpec,s=i.terrain,c=n.style;let d=[];const m=$t(t);if(t===void 0)return d;if(m!=="object")return d=d.concat([new Ue("terrain",t,`object expected, ${m} found`)]),d;for(const y in t)d=d.concat(s[y]?n.validateSpec({key:y,value:t[y],valueSpec:s[y],validateSpec:n.validateSpec,style:c,styleSpec:i}):[new Ue(y,t[y],`unknown property "${y}"`)]);return d}function ql(n){let t=[];const i=n.value,s=n.key;if(Array.isArray(i)){const c=[],d=[];for(const m in i)i[m].id&&c.includes(i[m].id)&&t.push(new Ue(s,i,`all the sprites' ids must be unique, but ${i[m].id} is duplicated`)),c.push(i[m].id),i[m].url&&d.includes(i[m].url)&&t.push(new Ue(s,i,`all the sprites' URLs must be unique, but ${i[m].url} is duplicated`)),d.push(i[m].url),t=t.concat(Ni({key:`${s}[${m}]`,value:i[m],valueSpec:{id:{type:"string",required:!0},url:{type:"string",required:!0}},validateSpec:n.validateSpec}));return t}return $r({key:s,value:i})}function Da(n){return t=n.value,t&&t.constructor===Object?[]:[new Ue(n.key,n.value,`object expected, ${$t(n.value)} found`)];var t}const Ku={"*":()=>[],array:Bl,boolean:function(n){const t=n.value,i=n.key,s=$t(t);return s!=="boolean"?[new Ue(i,t,`boolean expected, ${s} found`)]:[]},number:Is,color:Ol,constants:Ps,enum:Ms,filter:Fl,function:Vl,layer:No,object:Ni,source:Nl,light:Wu,sky:Zu,terrain:Uo,projection:function(n){const t=n.value,i=n.styleSpec,s=i.projection,c=n.style,d=$t(t);if(t===void 0)return[];if(d!=="object")return[new Ue("projection",t,`object expected, ${d} found`)];let m=[];for(const y in t)m=m.concat(s[y]?n.validateSpec({key:y,value:t[y],valueSpec:s[y],style:c,styleSpec:i}):[new Ue(y,t[y],`unknown property "${y}"`)]);return m},projectionDefinition:function(n){const t=n.key;let i=n.value;i=i instanceof String?i.valueOf():i;const s=$t(i);return s!=="array"||function(c){return Array.isArray(c)&&c.length===3&&typeof c[0]=="string"&&typeof c[1]=="string"&&typeof c[2]=="number"}(i)||function(c){return!!["interpolate","step","literal"].includes(c[0])}(i)?["array","string"].includes(s)?[]:[new Ue(t,i,`projection expected, invalid type "${s}" found`)]:[new Ue(t,i,`projection expected, invalid array ${JSON.stringify(i)} found`)]},string:$r,formatted:function(n){return $r(n).length===0?[]:Sn(n)},resolvedImage:function(n){return $r(n).length===0?[]:Sn(n)},padding:function(n){const t=n.key,i=n.value;if($t(i)==="array"){if(i.length<1||i.length>4)return[new Ue(t,i,`padding requires 1 to 4 values; ${i.length} values found`)];const s={type:"number"};let c=[];for(let d=0;d<i.length;d++)c=c.concat(n.validateSpec({key:`${t}[${d}]`,value:i[d],validateSpec:n.validateSpec,valueSpec:s}));return c}return Is({key:t,value:i,valueSpec:{}})},numberArray:function(n){const t=n.key,i=n.value;if($t(i)==="array"){const s={type:"number"};if(i.length<1)return[new Ue(t,i,"array length at least 1 expected, length 0 found")];let c=[];for(let d=0;d<i.length;d++)c=c.concat(n.validateSpec({key:`${t}[${d}]`,value:i[d],validateSpec:n.validateSpec,valueSpec:s}));return c}return Is({key:t,value:i,valueSpec:{}})},colorArray:function(n){const t=n.key,i=n.value;if($t(i)==="array"){if(i.length<1)return[new Ue(t,i,"array length at least 1 expected, length 0 found")];let s=[];for(let c=0;c<i.length;c++)s=s.concat(Ol({key:`${t}[${c}]`,value:i[c]}));return s}return Ol({key:t,value:i})},variableAnchorOffsetCollection:function(n){const t=n.key,i=n.value,s=$t(i),c=n.styleSpec;if(s!=="array"||i.length<1||i.length%2!=0)return[new Ue(t,i,"variableAnchorOffsetCollection requires a non-empty array of even length")];let d=[];for(let m=0;m<i.length;m+=2)d=d.concat(Ms({key:`${t}[${m}]`,value:i[m],valueSpec:c.layout_symbol["text-anchor"]})),d=d.concat(Bl({key:`${t}[${m+1}]`,value:i[m+1],valueSpec:{length:2,value:"number"},validateSpec:n.validateSpec,style:n.style,styleSpec:c}));return d},sprite:ql,state:Da};function jo(n){const t=n.value,i=n.valueSpec,s=n.styleSpec;return n.validateSpec=jo,i.expression&&ka(Hr(t))?Vl(n):i.expression&&As(to(t))?Sn(n):i.type&&Ku[i.type]?Ku[i.type](n):Ni(ar({},n,{valueSpec:i.type?s[i.type]:i}))}function Gu(n){const t=n.value,i=n.key,s=$r(n);return s.length||(t.indexOf("{fontstack}")===-1&&s.push(new Ue(i,t,'"glyphs" url must include a "{fontstack}" token')),t.indexOf("{range}")===-1&&s.push(new Ue(i,t,'"glyphs" url must include a "{range}" token'))),s}function ki(n,t=$){let i=[];return i=i.concat(jo({key:"",value:n,valueSpec:t.$root,styleSpec:t,style:n,validateSpec:jo,objectElementValidators:{glyphs:Gu,"*":()=>[]}})),n.constants&&(i=i.concat(Ps({key:"constants",value:n.constants}))),Ho(i)}function hn(n){return function(t){return n({...t,validateSpec:jo})}}function Ho(n){return[].concat(n).sort((t,i)=>t.line-i.line)}function pn(n){return function(...t){return Ho(n.apply(this,t))}}ki.source=pn(hn(Nl)),ki.sprite=pn(hn(ql)),ki.glyphs=pn(hn(Gu)),ki.light=pn(hn(Wu)),ki.sky=pn(hn(Zu)),ki.terrain=pn(hn(Uo)),ki.state=pn(hn(Da)),ki.layer=pn(hn(No)),ki.filter=pn(hn(Fl)),ki.paintProperty=pn(hn(Hu)),ki.layoutProperty=pn(hn(Fo));const Wo=ki,za=Wo.light,bp=Wo.sky,Ul=Wo.paintProperty,Ba=Wo.layoutProperty;function jl(n,t){let i=!1;if(t&&t.length)for(const s of t)n.fire(new he(new Error(s.message))),i=!0;return i}class Zo{constructor(t,i,s){const c=this.cells=[];if(t instanceof ArrayBuffer){this.arrayBuffer=t;const m=new Int32Array(this.arrayBuffer);t=m[0],this.d=(i=m[1])+2*(s=m[2]);for(let w=0;w<this.d*this.d;w++){const E=m[3+w],R=m[3+w+1];c.push(E===R?null:m.subarray(E,R))}const y=m[3+c.length+1];this.keys=m.subarray(m[3+c.length],y),this.bboxes=m.subarray(y),this.insert=this._insertReadonly}else{this.d=i+2*s;for(let m=0;m<this.d*this.d;m++)c.push([]);this.keys=[],this.bboxes=[]}this.n=i,this.extent=t,this.padding=s,this.scale=i/t,this.uid=0;const d=s/i*t;this.min=-d,this.max=t+d}insert(t,i,s,c,d){this._forEachCell(i,s,c,d,this._insertCell,this.uid++,void 0,void 0),this.keys.push(t),this.bboxes.push(i),this.bboxes.push(s),this.bboxes.push(c),this.bboxes.push(d)}_insertReadonly(){throw new Error("Cannot insert into a GridIndex created from an ArrayBuffer.")}_insertCell(t,i,s,c,d,m){this.cells[d].push(m)}query(t,i,s,c,d){const m=this.min,y=this.max;if(t<=m&&i<=m&&y<=s&&y<=c&&!d)return Array.prototype.slice.call(this.keys);{const w=[];return this._forEachCell(t,i,s,c,this._queryCell,w,{},d),w}}_queryCell(t,i,s,c,d,m,y,w){const E=this.cells[d];if(E!==null){const R=this.keys,V=this.bboxes;for(let q=0;q<E.length;q++){const j=E[q];if(y[j]===void 0){const W=4*j;(w?w(V[W+0],V[W+1],V[W+2],V[W+3]):t<=V[W+2]&&i<=V[W+3]&&s>=V[W+0]&&c>=V[W+1])?(y[j]=!0,m.push(R[j])):y[j]=!1}}}}_forEachCell(t,i,s,c,d,m,y,w){const E=this._convertToCellCoord(t),R=this._convertToCellCoord(i),V=this._convertToCellCoord(s),q=this._convertToCellCoord(c);for(let j=E;j<=V;j++)for(let W=R;W<=q;W++){const X=this.d*W+j;if((!w||w(this._convertFromCellCoord(j),this._convertFromCellCoord(W),this._convertFromCellCoord(j+1),this._convertFromCellCoord(W+1)))&&d.call(this,t,i,s,c,X,m,y,w))return}}_convertFromCellCoord(t){return(t-this.padding)/this.scale}_convertToCellCoord(t){return Math.max(0,Math.min(this.d-1,Math.floor(t*this.scale)+this.padding))}toArrayBuffer(){if(this.arrayBuffer)return this.arrayBuffer;const t=this.cells,i=3+this.cells.length+1+1;let s=0;for(let m=0;m<this.cells.length;m++)s+=this.cells[m].length;const c=new Int32Array(i+s+this.keys.length+this.bboxes.length);c[0]=this.extent,c[1]=this.n,c[2]=this.padding;let d=i;for(let m=0;m<t.length;m++){const y=t[m];c[3+m]=d,c.set(y,d),d+=y.length}return c[3+t.length]=d,c.set(this.keys,d),d+=this.keys.length,c[3+t.length+1]=d,c.set(this.bboxes,d),d+=this.bboxes.length,c.buffer}static serialize(t,i){const s=t.toArrayBuffer();return i&&i.push(s),{buffer:s}}static deserialize(t){return new Zo(t.buffer)}}const An={};function vt(n,t,i={}){if(An[n])throw new Error(`${n} is already registered.`);Object.defineProperty(t,"_classRegistryKey",{value:n,writeable:!1}),An[n]={klass:t,omit:i.omit||[],shallow:i.shallow||[]}}vt("Object",Object),vt("TransferableGridIndex",Zo),vt("Color",Vt),vt("Error",Error),vt("AJAXError",fr),vt("ResolvedImage",it),vt("StylePropertyFunction",ks),vt("StyleExpression",Ca,{omit:["_evaluator"]}),vt("ZoomDependentExpression",Pa),vt("ZoomConstantExpression",Ll),vt("CompoundExpression",en,{omit:["_evaluate"]});for(const n in Bo)Bo[n]._classRegistryKey||vt(`Expression_${n}`,Bo[n]);function Va(n){return n&&typeof ArrayBuffer<"u"&&(n instanceof ArrayBuffer||n.constructor&&n.constructor.name==="ArrayBuffer")}function Oa(n){return n.$name||n.constructor._classRegistryKey}function Ju(n){return!function(t){if(t===null||typeof t!="object")return!1;const i=Oa(t);return!(!i||i==="Object")}(n)&&(n==null||typeof n=="boolean"||typeof n=="number"||typeof n=="string"||n instanceof Boolean||n instanceof Number||n instanceof String||n instanceof Date||n instanceof RegExp||n instanceof Blob||n instanceof Error||Va(n)||Ot(n)||ArrayBuffer.isView(n)||n instanceof ImageData)}function Ko(n,t){if(Ju(n))return(Va(n)||Ot(n))&&t&&t.push(n),ArrayBuffer.isView(n)&&t&&t.push(n.buffer),n instanceof ImageData&&t&&t.push(n.data.buffer),n;if(Array.isArray(n)){const d=[];for(const m of n)d.push(Ko(m,t));return d}if(typeof n!="object")throw new Error("can't serialize object of type "+typeof n);const i=Oa(n);if(!i)throw new Error(`can't serialize object of unregistered class ${n.constructor.name}`);if(!An[i])throw new Error(`${i} is not registered.`);const{klass:s}=An[i],c=s.serialize?s.serialize(n,t):{};if(s.serialize){if(t&&c===t[t.length-1])throw new Error("statically serialized object won't survive transfer of $name property")}else{for(const d in n){if(!n.hasOwnProperty(d)||An[i].omit.indexOf(d)>=0)continue;const m=n[d];c[d]=An[i].shallow.indexOf(d)>=0?m:Ko(m,t)}n instanceof Error&&(c.message=n.message)}if(c.$name)throw new Error("$name property is reserved for worker serialization logic.");return i!=="Object"&&(c.$name=i),c}function Ls(n){if(Ju(n))return n;if(Array.isArray(n))return n.map(Ls);if(typeof n!="object")throw new Error("can't deserialize object of type "+typeof n);const t=Oa(n)||"Object";if(!An[t])throw new Error(`can't deserialize unregistered class ${t}`);const{klass:i}=An[t];if(!i)throw new Error(`can't deserialize unregistered class ${t}`);if(i.deserialize)return i.deserialize(n);const s=Object.create(i.prototype);for(const c of Object.keys(n)){if(c==="$name")continue;const d=n[c];s[c]=An[t].shallow.indexOf(c)>=0?d:Ls(d)}return s}class Hl{constructor(){this.first=!0}update(t,i){const s=Math.floor(t);return this.first?(this.first=!1,this.lastIntegerZoom=s,this.lastIntegerZoomTime=0,this.lastZoom=t,this.lastFloorZoom=s,!0):(this.lastFloorZoom>s?(this.lastIntegerZoom=s+1,this.lastIntegerZoomTime=i):this.lastFloorZoom<s&&(this.lastIntegerZoom=s,this.lastIntegerZoomTime=i),t!==this.lastZoom&&(this.lastZoom=t,this.lastFloorZoom=s,!0))}}const er={"Latin-1 Supplement":n=>n>=128&&n<=255,"Hangul Jamo":n=>n>=4352&&n<=4607,Khmer:n=>n>=6016&&n<=6143,"General Punctuation":n=>n>=8192&&n<=8303,"Letterlike Symbols":n=>n>=8448&&n<=8527,"Number Forms":n=>n>=8528&&n<=8591,"Miscellaneous Technical":n=>n>=8960&&n<=9215,"Control Pictures":n=>n>=9216&&n<=9279,"Optical Character Recognition":n=>n>=9280&&n<=9311,"Enclosed Alphanumerics":n=>n>=9312&&n<=9471,"Geometric Shapes":n=>n>=9632&&n<=9727,"Miscellaneous Symbols":n=>n>=9728&&n<=9983,"Miscellaneous Symbols and Arrows":n=>n>=11008&&n<=11263,"Ideographic Description Characters":n=>n>=12272&&n<=12287,"CJK Symbols and Punctuation":n=>n>=12288&&n<=12351,Hiragana:n=>n>=12352&&n<=12447,Katakana:n=>n>=12448&&n<=12543,Kanbun:n=>n>=12688&&n<=12703,"CJK Strokes":n=>n>=12736&&n<=12783,"Enclosed CJK Letters and Months":n=>n>=12800&&n<=13055,"CJK Compatibility":n=>n>=13056&&n<=13311,"Yijing Hexagram Symbols":n=>n>=19904&&n<=19967,"CJK Unified Ideographs":n=>n>=19968&&n<=40959,"Hangul Syllables":n=>n>=44032&&n<=55215,"Private Use Area":n=>n>=57344&&n<=63743,"Vertical Forms":n=>n>=65040&&n<=65055,"CJK Compatibility Forms":n=>n>=65072&&n<=65103,"Small Form Variants":n=>n>=65104&&n<=65135,"Halfwidth and Fullwidth Forms":n=>n>=65280&&n<=65519};function Fa(n){for(const t of n)if(Na(t.charCodeAt(0)))return!0;return!1}function vp(n){for(const t of n)if(!Qu(t.charCodeAt(0)))return!1;return!0}function Wl(n){const t=n.map(i=>{try{return new RegExp(`\\p{sc=${i}}`,"u").source}catch{return null}}).filter(i=>i);return new RegExp(t.join("|"),"u")}const Xu=Wl(["Arab","Dupl","Mong","Ougr","Syrc"]);function Qu(n){return!Xu.test(String.fromCodePoint(n))}const Zl=Wl(["Bopo","Hani","Hira","Kana","Kits","Nshu","Tang","Yiii"]);function Na(n){return!(n!==746&&n!==747&&(n<4352||!(er["CJK Compatibility Forms"](n)&&!(n>=65097&&n<=65103)||er["CJK Compatibility"](n)||er["CJK Strokes"](n)||!(!er["CJK Symbols and Punctuation"](n)||n>=12296&&n<=12305||n>=12308&&n<=12319||n===12336)||er["Enclosed CJK Letters and Months"](n)||er["Ideographic Description Characters"](n)||er.Kanbun(n)||er.Katakana(n)&&n!==12540||!(!er["Halfwidth and Fullwidth Forms"](n)||n===65288||n===65289||n===65293||n>=65306&&n<=65310||n===65339||n===65341||n===65343||n>=65371&&n<=65503||n===65507||n>=65512&&n<=65519)||!(!er["Small Form Variants"](n)||n>=65112&&n<=65118||n>=65123&&n<=65126)||er["Vertical Forms"](n)||er["Yijing Hexagram Symbols"](n)||new RegExp("\\p{sc=Cans}","u").test(String.fromCodePoint(n))||new RegExp("\\p{sc=Hang}","u").test(String.fromCodePoint(n))||Zl.test(String.fromCodePoint(n)))))}function Rs(n){return!(Na(n)||function(t){return!!(er["Latin-1 Supplement"](t)&&(t===167||t===169||t===174||t===177||t===188||t===189||t===190||t===215||t===247)||er["General Punctuation"](t)&&(t===8214||t===8224||t===8225||t===8240||t===8241||t===8251||t===8252||t===8258||t===8263||t===8264||t===8265||t===8273)||er["Letterlike Symbols"](t)||er["Number Forms"](t)||er["Miscellaneous Technical"](t)&&(t>=8960&&t<=8967||t>=8972&&t<=8991||t>=8996&&t<=9e3||t===9003||t>=9085&&t<=9114||t>=9150&&t<=9165||t===9167||t>=9169&&t<=9179||t>=9186&&t<=9215)||er["Control Pictures"](t)&&t!==9251||er["Optical Character Recognition"](t)||er["Enclosed Alphanumerics"](t)||er["Geometric Shapes"](t)||er["Miscellaneous Symbols"](t)&&!(t>=9754&&t<=9759)||er["Miscellaneous Symbols and Arrows"](t)&&(t>=11026&&t<=11055||t>=11088&&t<=11097||t>=11192&&t<=11243)||er["CJK Symbols and Punctuation"](t)||er.Katakana(t)||er["Private Use Area"](t)||er["CJK Compatibility Forms"](t)||er["Small Form Variants"](t)||er["Halfwidth and Fullwidth Forms"](t)||t===8734||t===8756||t===8757||t>=9984&&t<=10087||t>=10102&&t<=10131||t===65532||t===65533)}(n))}const wp=Wl(["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"]);function qa(n){return wp.test(String.fromCodePoint(n))}function Sp(n,t){return!(!t&&qa(n)||n>=2304&&n<=3583||n>=3840&&n<=4255||er.Khmer(n))}function Ap(n){for(const t of n)if(qa(t.charCodeAt(0)))return!0;return!1}const Nn=new class{constructor(){this.TIMEOUT=5e3,this.applyArabicShaping=null,this.processBidirectionalText=null,this.processStyledBidirectionalText=null,this.pluginStatus="unavailable",this.pluginURL=null,this.loadScriptResolve=()=>{}}setState(n){this.pluginStatus=n.pluginStatus,this.pluginURL=n.pluginURL}getState(){return{pluginStatus:this.pluginStatus,pluginURL:this.pluginURL}}setMethods(n){if(Nn.isParsed())throw new Error("RTL text plugin already registered.");this.applyArabicShaping=n.applyArabicShaping,this.processBidirectionalText=n.processBidirectionalText,this.processStyledBidirectionalText=n.processStyledBidirectionalText,this.loadScriptResolve()}isParsed(){return this.applyArabicShaping!=null&&this.processBidirectionalText!=null&&this.processStyledBidirectionalText!=null}getRTLTextPluginStatus(){return this.pluginStatus}syncState(n,t){return o(this,void 0,void 0,function*(){if(this.isParsed())return this.getState();if(n.pluginStatus!=="loading")return this.setState(n),n;const i=n.pluginURL,s=new Promise(d=>{this.loadScriptResolve=d});t(i);const c=new Promise(d=>setTimeout(()=>d(),this.TIMEOUT));if(yield Promise.race([s,c]),this.isParsed()){const d={pluginStatus:"loaded",pluginURL:i};return this.setState(d),d}throw this.setState({pluginStatus:"error",pluginURL:""}),new Error(`RTL Text Plugin failed to import scripts from ${i}`)})}};class Cr{constructor(t,i){this.zoom=t,i?(this.now=i.now,this.fadeDuration=i.fadeDuration,this.zoomHistory=i.zoomHistory,this.transition=i.transition):(this.now=0,this.fadeDuration=0,this.zoomHistory=new Hl,this.transition={})}isSupportedScript(t){return function(i,s){for(const c of i)if(!Sp(c.charCodeAt(0),s))return!1;return!0}(t,Nn.getRTLTextPluginStatus()==="loaded")}crossFadingFactor(){return this.fadeDuration===0?1:Math.min((this.now-this.zoomHistory.lastIntegerZoomTime)/this.fadeDuration,1)}getCrossfadeParameters(){const t=this.zoom,i=t-Math.floor(t),s=this.crossFadingFactor();return t>this.zoomHistory.lastIntegerZoom?{fromScale:2,toScale:1,t:i+(1-i)*s}:{fromScale:.5,toScale:1,t:1-(1-s)*i}}}class Ds{constructor(t,i){this.property=t,this.value=i,this.expression=function(s,c){if(ka(s))return new ks(s,c);if(As(s)){const d=Rl(s,c);if(d.result==="error")throw new Error(d.value.map(m=>`${m.key}: ${m.message}`).join(", "));return d.value}{let d=s;return c.type==="color"&&typeof s=="string"?d=Vt.parse(s):c.type!=="padding"||typeof s!="number"&&!Array.isArray(s)?c.type!=="numberArray"||typeof s!="number"&&!Array.isArray(s)?c.type!=="colorArray"||typeof s!="string"&&!Array.isArray(s)?c.type==="variableAnchorOffsetCollection"&&Array.isArray(s)?d=Je.parse(s):c.type==="projectionDefinition"&&typeof s=="string"&&(d=ze.parse(s)):d=Ce.parse(s):d=xe.parse(s):d=pe.parse(s),{kind:"constant",evaluate:()=>d}}}(i===void 0?t.specification.default:i,t.specification)}isDataDriven(){return this.expression.kind==="source"||this.expression.kind==="composite"}possiblyEvaluate(t,i,s){return this.property.possiblyEvaluate(this,t,i,s)}}class Kl{constructor(t){this.property=t,this.value=new Ds(t,void 0)}transitioned(t,i){return new $u(this.property,this.value,i,Yr({},t.transition,this.transition),t.now)}untransitioned(){return new $u(this.property,this.value,null,{},0)}}class Yu{constructor(t){this._properties=t,this._values=Object.create(t.defaultTransitionablePropertyValues)}getValue(t){return fi(this._values[t].value.value)}setValue(t,i){Object.prototype.hasOwnProperty.call(this._values,t)||(this._values[t]=new Kl(this._values[t].property)),this._values[t].value=new Ds(this._values[t].property,i===null?void 0:fi(i))}getTransition(t){return fi(this._values[t].transition)}setTransition(t,i){Object.prototype.hasOwnProperty.call(this._values,t)||(this._values[t]=new Kl(this._values[t].property)),this._values[t].transition=fi(i)||void 0}serialize(){const t={};for(const i of Object.keys(this._values)){const s=this.getValue(i);s!==void 0&&(t[i]=s);const c=this.getTransition(i);c!==void 0&&(t[`${i}-transition`]=c)}return t}transitioned(t,i){const s=new eh(this._properties);for(const c of Object.keys(this._values))s._values[c]=this._values[c].transitioned(t,i._values[c]);return s}untransitioned(){const t=new eh(this._properties);for(const i of Object.keys(this._values))t._values[i]=this._values[i].untransitioned();return t}}class $u{constructor(t,i,s,c,d){this.property=t,this.value=i,this.begin=d+c.delay||0,this.end=this.begin+c.duration||0,t.specification.transition&&(c.delay||c.duration)&&(this.prior=s)}possiblyEvaluate(t,i,s){const c=t.now||0,d=this.value.possiblyEvaluate(t,i,s),m=this.prior;if(m){if(c>this.end)return this.prior=null,d;if(this.value.isDataDriven())return this.prior=null,d;if(c<this.begin)return m.possiblyEvaluate(t,i,s);{const y=(c-this.begin)/(this.end-this.begin);return this.property.interpolate(m.possiblyEvaluate(t,i,s),d,Dr(y))}}return d}}class eh{constructor(t){this._properties=t,this._values=Object.create(t.defaultTransitioningPropertyValues)}possiblyEvaluate(t,i,s){const c=new Ua(this._properties);for(const d of Object.keys(this._values))c._values[d]=this._values[d].possiblyEvaluate(t,i,s);return c}hasTransition(){for(const t of Object.keys(this._values))if(this._values[t].prior)return!0;return!1}}class kp{constructor(t){this._properties=t,this._values=Object.create(t.defaultPropertyValues)}hasValue(t){return this._values[t].value!==void 0}getValue(t){return fi(this._values[t].value)}setValue(t,i){this._values[t]=new Ds(this._values[t].property,i===null?void 0:fi(i))}serialize(){const t={};for(const i of Object.keys(this._values)){const s=this.getValue(i);s!==void 0&&(t[i]=s)}return t}possiblyEvaluate(t,i,s){const c=new Ua(this._properties);for(const d of Object.keys(this._values))c._values[d]=this._values[d].possiblyEvaluate(t,i,s);return c}}class Ei{constructor(t,i,s){this.property=t,this.value=i,this.parameters=s}isConstant(){return this.value.kind==="constant"}constantOr(t){return this.value.kind==="constant"?this.value.value:t}evaluate(t,i,s,c){return this.property.evaluate(this.value,this.parameters,t,i,s,c)}}class Ua{constructor(t){this._properties=t,this._values=Object.create(t.defaultPossiblyEvaluatedValues)}get(t){return this._values[t]}}class Ct{constructor(t){this.specification=t}possiblyEvaluate(t,i){if(t.isDataDriven())throw new Error("Value should not be data driven");return t.expression.evaluate(i)}interpolate(t,i,s){const c=vn[this.specification.type];return c?c(t,i,s):t}}class zt{constructor(t,i){this.specification=t,this.overrides=i}possiblyEvaluate(t,i,s,c){return new Ei(this,t.expression.kind==="constant"||t.expression.kind==="camera"?{kind:"constant",value:t.expression.evaluate(i,null,{},s,c)}:t.expression,i)}interpolate(t,i,s){if(t.value.kind!=="constant"||i.value.kind!=="constant")return t;if(t.value.value===void 0||i.value.value===void 0)return new Ei(this,{kind:"constant",value:void 0},t.parameters);const c=vn[this.specification.type];if(c){const d=c(t.value.value,i.value.value,s);return new Ei(this,{kind:"constant",value:d},t.parameters)}return t}evaluate(t,i,s,c,d,m){return t.kind==="constant"?t.value:t.evaluate(i,s,c,d,m)}}class zs extends zt{possiblyEvaluate(t,i,s,c){if(t.value===void 0)return new Ei(this,{kind:"constant",value:void 0},i);if(t.expression.kind==="constant"){const d=t.expression.evaluate(i,null,{},s,c),m=t.property.specification.type==="resolvedImage"&&typeof d!="string"?d.name:d,y=this._calculate(m,m,m,i);return new Ei(this,{kind:"constant",value:y},i)}if(t.expression.kind==="camera"){const d=this._calculate(t.expression.evaluate({zoom:i.zoom-1}),t.expression.evaluate({zoom:i.zoom}),t.expression.evaluate({zoom:i.zoom+1}),i);return new Ei(this,{kind:"constant",value:d},i)}return new Ei(this,t.expression,i)}evaluate(t,i,s,c,d,m){if(t.kind==="source"){const y=t.evaluate(i,s,c,d,m);return this._calculate(y,y,y,i)}return t.kind==="composite"?this._calculate(t.evaluate({zoom:Math.floor(i.zoom)-1},s,c),t.evaluate({zoom:Math.floor(i.zoom)},s,c),t.evaluate({zoom:Math.floor(i.zoom)+1},s,c),i):t.value}_calculate(t,i,s,c){return c.zoom>c.zoomHistory.lastIntegerZoom?{from:t,to:i}:{from:s,to:i}}interpolate(t){return t}}class Gl{constructor(t){this.specification=t}possiblyEvaluate(t,i,s,c){if(t.value!==void 0){if(t.expression.kind==="constant"){const d=t.expression.evaluate(i,null,{},s,c);return this._calculate(d,d,d,i)}return this._calculate(t.expression.evaluate(new Cr(Math.floor(i.zoom-1),i)),t.expression.evaluate(new Cr(Math.floor(i.zoom),i)),t.expression.evaluate(new Cr(Math.floor(i.zoom+1),i)),i)}}_calculate(t,i,s,c){return c.zoom>c.zoomHistory.lastIntegerZoom?{from:t,to:i}:{from:s,to:i}}interpolate(t){return t}}class Jl{constructor(t){this.specification=t}possiblyEvaluate(t,i,s,c){return!!t.expression.evaluate(i,null,{},s,c)}interpolate(){return!1}}class Gr{constructor(t){this.properties=t,this.defaultPropertyValues={},this.defaultTransitionablePropertyValues={},this.defaultTransitioningPropertyValues={},this.defaultPossiblyEvaluatedValues={},this.overridableProperties=[];for(const i in t){const s=t[i];s.specification.overridable&&this.overridableProperties.push(i);const c=this.defaultPropertyValues[i]=new Ds(s,void 0),d=this.defaultTransitionablePropertyValues[i]=new Kl(s);this.defaultTransitioningPropertyValues[i]=d.untransitioned(),this.defaultPossiblyEvaluatedValues[i]=c.possiblyEvaluate({})}}}vt("DataDrivenProperty",zt),vt("DataConstantProperty",Ct),vt("CrossFadedDataDrivenProperty",zs),vt("CrossFadedProperty",Gl),vt("ColorRampProperty",Jl);const Xl="-transition";class tn extends ve{constructor(t,i){if(super(),this.id=t.id,this.type=t.type,this._featureFilter={filter:()=>!0,needGeometry:!1},t.type!=="custom"&&(this.metadata=t.metadata,this.minzoom=t.minzoom,this.maxzoom=t.maxzoom,t.type!=="background"&&(this.source=t.source,this.sourceLayer=t["source-layer"],this.filter=t.filter),i.layout&&(this._unevaluatedLayout=new kp(i.layout)),i.paint)){this._transitionablePaint=new Yu(i.paint);for(const s in t.paint)this.setPaintProperty(s,t.paint[s],{validate:!1});for(const s in t.layout)this.setLayoutProperty(s,t.layout[s],{validate:!1});this._transitioningPaint=this._transitionablePaint.untransitioned(),this.paint=new Ua(i.paint)}}getCrossfadeParameters(){return this._crossfadeParameters}getLayoutProperty(t){return t==="visibility"?this.visibility:this._unevaluatedLayout.getValue(t)}setLayoutProperty(t,i,s={}){i!=null&&this._validate(Ba,`layers.${this.id}.layout.${t}`,t,i,s)||(t!=="visibility"?this._unevaluatedLayout.setValue(t,i):this.visibility=i)}getPaintProperty(t){return t.endsWith(Xl)?this._transitionablePaint.getTransition(t.slice(0,-11)):this._transitionablePaint.getValue(t)}setPaintProperty(t,i,s={}){if(i!=null&&this._validate(Ul,`layers.${this.id}.paint.${t}`,t,i,s))return!1;if(t.endsWith(Xl))return this._transitionablePaint.setTransition(t.slice(0,-11),i||void 0),!1;{const c=this._transitionablePaint._values[t],d=c.property.specification["property-type"]==="cross-faded-data-driven",m=c.value.isDataDriven(),y=c.value;this._transitionablePaint.setValue(t,i),this._handleSpecialPaintPropertyUpdate(t);const w=this._transitionablePaint._values[t].value;return w.isDataDriven()||m||d||this._handleOverridablePaintPropertyUpdate(t,y,w)}}_handleSpecialPaintPropertyUpdate(t){}_handleOverridablePaintPropertyUpdate(t,i,s){return!1}isHidden(t){return!!(this.minzoom&&t<this.minzoom)||!!(this.maxzoom&&t>=this.maxzoom)||this.visibility==="none"}updateTransitions(t){this._transitioningPaint=this._transitionablePaint.transitioned(t,this._transitioningPaint)}hasTransition(){return this._transitioningPaint.hasTransition()}recalculate(t,i){t.getCrossfadeParameters&&(this._crossfadeParameters=t.getCrossfadeParameters()),this._unevaluatedLayout&&(this.layout=this._unevaluatedLayout.possiblyEvaluate(t,void 0,i)),this.paint=this._transitioningPaint.possiblyEvaluate(t,void 0,i)}serialize(){const t={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&&this._unevaluatedLayout.serialize(),paint:this._transitionablePaint&&this._transitionablePaint.serialize()};return this.visibility&&(t.layout=t.layout||{},t.layout.visibility=this.visibility),In(t,(i,s)=>!(i===void 0||s==="layout"&&!Object.keys(i).length||s==="paint"&&!Object.keys(i).length))}_validate(t,i,s,c,d={}){return(!d||d.validate!==!1)&&jl(this,t.call(Wo,{key:i,layerType:this.type,objectKey:s,value:c,styleSpec:$,style:{glyphs:!0,sprite:!0}}))}is3D(){return!1}isTileClipped(){return!1}hasOffscreenPass(){return!1}resize(){}isStateDependent(){for(const t in this.paint._values){const i=this.paint.get(t);if(i instanceof Ei&&Oo(i.property.specification)&&(i.value.kind==="source"||i.value.kind==="composite")&&i.value.isStateDependent)return!0}return!1}}const th={Int8:Int8Array,Uint8:Uint8Array,Int16:Int16Array,Uint16:Uint16Array,Int32:Int32Array,Uint32:Uint32Array,Float32:Float32Array};class Co{constructor(t,i){this._structArray=t,this._pos1=i*this.size,this._pos2=this._pos1/2,this._pos4=this._pos1/4,this._pos8=this._pos1/8}}class qr{constructor(){this.isTransferred=!1,this.capacity=-1,this.resize(0)}static serialize(t,i){return t._trim(),i&&(t.isTransferred=!0,i.push(t.arrayBuffer)),{length:t.length,arrayBuffer:t.arrayBuffer}}static deserialize(t){const i=Object.create(this.prototype);return i.arrayBuffer=t.arrayBuffer,i.length=t.length,i.capacity=t.arrayBuffer.byteLength/i.bytesPerElement,i._refreshViews(),i}_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(t){this.reserve(t),this.length=t}reserve(t){if(t>this.capacity){this.capacity=Math.max(t,Math.floor(5*this.capacity),128),this.arrayBuffer=new ArrayBuffer(this.capacity*this.bytesPerElement);const i=this.uint8;this._refreshViews(),i&&this.uint8.set(i)}}_refreshViews(){throw new Error("_refreshViews() must be implemented by each concrete StructArray layout")}}function zr(n,t=1){let i=0,s=0;return{members:n.map(c=>{const d=th[c.type].BYTES_PER_ELEMENT,m=i=Go(i,Math.max(t,d)),y=c.components||1;return s=Math.max(s,d),i+=d*y,{name:c.name,type:c.type,components:y,offset:m}}),size:Go(i,Math.max(s,t)),alignment:t}}function Go(n,t){return Math.ceil(n/t)*t}class Bs extends qr{_refreshViews(){this.uint8=new Uint8Array(this.arrayBuffer),this.int16=new Int16Array(this.arrayBuffer)}emplaceBack(t,i){const s=this.length;return this.resize(s+1),this.emplace(s,t,i)}emplace(t,i,s){const c=2*t;return this.int16[c+0]=i,this.int16[c+1]=s,t}}Bs.prototype.bytesPerElement=4,vt("StructArrayLayout2i4",Bs);class Vs extends qr{_refreshViews(){this.uint8=new Uint8Array(this.arrayBuffer),this.int16=new Int16Array(this.arrayBuffer)}emplaceBack(t,i,s){const c=this.length;return this.resize(c+1),this.emplace(c,t,i,s)}emplace(t,i,s,c){const d=3*t;return this.int16[d+0]=i,this.int16[d+1]=s,this.int16[d+2]=c,t}}Vs.prototype.bytesPerElement=6,vt("StructArrayLayout3i6",Vs);class Eo extends qr{_refreshViews(){this.uint8=new Uint8Array(this.arrayBuffer),this.int16=new Int16Array(this.arrayBuffer)}emplaceBack(t,i,s,c){const d=this.length;return this.resize(d+1),this.emplace(d,t,i,s,c)}emplace(t,i,s,c,d){const m=4*t;return this.int16[m+0]=i,this.int16[m+1]=s,this.int16[m+2]=c,this.int16[m+3]=d,t}}Eo.prototype.bytesPerElement=8,vt("StructArrayLayout4i8",Eo);class Ql extends qr{_refreshViews(){this.uint8=new Uint8Array(this.arrayBuffer),this.int16=new Int16Array(this.arrayBuffer)}emplaceBack(t,i,s,c,d,m){const y=this.length;return this.resize(y+1),this.emplace(y,t,i,s,c,d,m)}emplace(t,i,s,c,d,m,y){const w=6*t;return this.int16[w+0]=i,this.int16[w+1]=s,this.int16[w+2]=c,this.int16[w+3]=d,this.int16[w+4]=m,this.int16[w+5]=y,t}}Ql.prototype.bytesPerElement=12,vt("StructArrayLayout2i4i12",Ql);class Yl extends qr{_refreshViews(){this.uint8=new Uint8Array(this.arrayBuffer),this.int16=new Int16Array(this.arrayBuffer)}emplaceBack(t,i,s,c,d,m){const y=this.length;return this.resize(y+1),this.emplace(y,t,i,s,c,d,m)}emplace(t,i,s,c,d,m,y){const w=4*t,E=8*t;return this.int16[w+0]=i,this.int16[w+1]=s,this.uint8[E+4]=c,this.uint8[E+5]=d,this.uint8[E+6]=m,this.uint8[E+7]=y,t}}Yl.prototype.bytesPerElement=8,vt("StructArrayLayout2i4ub8",Yl);class Jo extends qr{_refreshViews(){this.uint8=new Uint8Array(this.arrayBuffer),this.float32=new Float32Array(this.arrayBuffer)}emplaceBack(t,i){const s=this.length;return this.resize(s+1),this.emplace(s,t,i)}emplace(t,i,s){const c=2*t;return this.float32[c+0]=i,this.float32[c+1]=s,t}}Jo.prototype.bytesPerElement=8,vt("StructArrayLayout2f8",Jo);class $l extends qr{_refreshViews(){this.uint8=new Uint8Array(this.arrayBuffer),this.uint16=new Uint16Array(this.arrayBuffer)}emplaceBack(t,i,s,c,d,m,y,w,E,R){const V=this.length;return this.resize(V+1),this.emplace(V,t,i,s,c,d,m,y,w,E,R)}emplace(t,i,s,c,d,m,y,w,E,R,V){const q=10*t;return this.uint16[q+0]=i,this.uint16[q+1]=s,this.uint16[q+2]=c,this.uint16[q+3]=d,this.uint16[q+4]=m,this.uint16[q+5]=y,this.uint16[q+6]=w,this.uint16[q+7]=E,this.uint16[q+8]=R,this.uint16[q+9]=V,t}}$l.prototype.bytesPerElement=20,vt("StructArrayLayout10ui20",$l);class u extends qr{_refreshViews(){this.uint8=new Uint8Array(this.arrayBuffer),this.int16=new Int16Array(this.arrayBuffer),this.uint16=new Uint16Array(this.arrayBuffer)}emplaceBack(t,i,s,c,d,m,y,w,E,R,V,q){const j=this.length;return this.resize(j+1),this.emplace(j,t,i,s,c,d,m,y,w,E,R,V,q)}emplace(t,i,s,c,d,m,y,w,E,R,V,q,j){const W=12*t;return this.int16[W+0]=i,this.int16[W+1]=s,this.int16[W+2]=c,this.int16[W+3]=d,this.uint16[W+4]=m,this.uint16[W+5]=y,this.uint16[W+6]=w,this.uint16[W+7]=E,this.int16[W+8]=R,this.int16[W+9]=V,this.int16[W+10]=q,this.int16[W+11]=j,t}}u.prototype.bytesPerElement=24,vt("StructArrayLayout4i4ui4i24",u);class e extends qr{_refreshViews(){this.uint8=new Uint8Array(this.arrayBuffer),this.float32=new Float32Array(this.arrayBuffer)}emplaceBack(t,i,s){const c=this.length;return this.resize(c+1),this.emplace(c,t,i,s)}emplace(t,i,s,c){const d=3*t;return this.float32[d+0]=i,this.float32[d+1]=s,this.float32[d+2]=c,t}}e.prototype.bytesPerElement=12,vt("StructArrayLayout3f12",e);class r extends qr{_refreshViews(){this.uint8=new Uint8Array(this.arrayBuffer),this.uint32=new Uint32Array(this.arrayBuffer)}emplaceBack(t){const i=this.length;return this.resize(i+1),this.emplace(i,t)}emplace(t,i){return this.uint32[1*t+0]=i,t}}r.prototype.bytesPerElement=4,vt("StructArrayLayout1ul4",r);class a extends qr{_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(t,i,s,c,d,m,y,w,E){const R=this.length;return this.resize(R+1),this.emplace(R,t,i,s,c,d,m,y,w,E)}emplace(t,i,s,c,d,m,y,w,E,R){const V=10*t,q=5*t;return this.int16[V+0]=i,this.int16[V+1]=s,this.int16[V+2]=c,this.int16[V+3]=d,this.int16[V+4]=m,this.int16[V+5]=y,this.uint32[q+3]=w,this.uint16[V+8]=E,this.uint16[V+9]=R,t}}a.prototype.bytesPerElement=20,vt("StructArrayLayout6i1ul2ui20",a);class l extends qr{_refreshViews(){this.uint8=new Uint8Array(this.arrayBuffer),this.int16=new Int16Array(this.arrayBuffer)}emplaceBack(t,i,s,c,d,m){const y=this.length;return this.resize(y+1),this.emplace(y,t,i,s,c,d,m)}emplace(t,i,s,c,d,m,y){const w=6*t;return this.int16[w+0]=i,this.int16[w+1]=s,this.int16[w+2]=c,this.int16[w+3]=d,this.int16[w+4]=m,this.int16[w+5]=y,t}}l.prototype.bytesPerElement=12,vt("StructArrayLayout2i2i2i12",l);class h extends qr{_refreshViews(){this.uint8=new Uint8Array(this.arrayBuffer),this.float32=new Float32Array(this.arrayBuffer),this.int16=new Int16Array(this.arrayBuffer)}emplaceBack(t,i,s,c,d){const m=this.length;return this.resize(m+1),this.emplace(m,t,i,s,c,d)}emplace(t,i,s,c,d,m){const y=4*t,w=8*t;return this.float32[y+0]=i,this.float32[y+1]=s,this.float32[y+2]=c,this.int16[w+6]=d,this.int16[w+7]=m,t}}h.prototype.bytesPerElement=16,vt("StructArrayLayout2f1f2i16",h);class g extends qr{_refreshViews(){this.uint8=new Uint8Array(this.arrayBuffer),this.float32=new Float32Array(this.arrayBuffer),this.int16=new Int16Array(this.arrayBuffer)}emplaceBack(t,i,s,c,d,m){const y=this.length;return this.resize(y+1),this.emplace(y,t,i,s,c,d,m)}emplace(t,i,s,c,d,m,y){const w=16*t,E=4*t,R=8*t;return this.uint8[w+0]=i,this.uint8[w+1]=s,this.float32[E+1]=c,this.float32[E+2]=d,this.int16[R+6]=m,this.int16[R+7]=y,t}}g.prototype.bytesPerElement=16,vt("StructArrayLayout2ub2f2i16",g);class b extends qr{_refreshViews(){this.uint8=new Uint8Array(this.arrayBuffer),this.uint16=new Uint16Array(this.arrayBuffer)}emplaceBack(t,i,s){const c=this.length;return this.resize(c+1),this.emplace(c,t,i,s)}emplace(t,i,s,c){const d=3*t;return this.uint16[d+0]=i,this.uint16[d+1]=s,this.uint16[d+2]=c,t}}b.prototype.bytesPerElement=6,vt("StructArrayLayout3ui6",b);class A extends qr{_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(t,i,s,c,d,m,y,w,E,R,V,q,j,W,X,re,ae){const Se=this.length;return this.resize(Se+1),this.emplace(Se,t,i,s,c,d,m,y,w,E,R,V,q,j,W,X,re,ae)}emplace(t,i,s,c,d,m,y,w,E,R,V,q,j,W,X,re,ae,Se){const fe=24*t,U=12*t,Y=48*t;return this.int16[fe+0]=i,this.int16[fe+1]=s,this.uint16[fe+2]=c,this.uint16[fe+3]=d,this.uint32[U+2]=m,this.uint32[U+3]=y,this.uint32[U+4]=w,this.uint16[fe+10]=E,this.uint16[fe+11]=R,this.uint16[fe+12]=V,this.float32[U+7]=q,this.float32[U+8]=j,this.uint8[Y+36]=W,this.uint8[Y+37]=X,this.uint8[Y+38]=re,this.uint32[U+10]=ae,this.int16[fe+22]=Se,t}}A.prototype.bytesPerElement=48,vt("StructArrayLayout2i2ui3ul3ui2f3ub1ul1i48",A);class I extends qr{_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(t,i,s,c,d,m,y,w,E,R,V,q,j,W,X,re,ae,Se,fe,U,Y,ge,Re,$e,Oe,He,ot,et){const at=this.length;return this.resize(at+1),this.emplace(at,t,i,s,c,d,m,y,w,E,R,V,q,j,W,X,re,ae,Se,fe,U,Y,ge,Re,$e,Oe,He,ot,et)}emplace(t,i,s,c,d,m,y,w,E,R,V,q,j,W,X,re,ae,Se,fe,U,Y,ge,Re,$e,Oe,He,ot,et,at){const Ze=32*t,St=16*t;return this.int16[Ze+0]=i,this.int16[Ze+1]=s,this.int16[Ze+2]=c,this.int16[Ze+3]=d,this.int16[Ze+4]=m,this.int16[Ze+5]=y,this.int16[Ze+6]=w,this.int16[Ze+7]=E,this.uint16[Ze+8]=R,this.uint16[Ze+9]=V,this.uint16[Ze+10]=q,this.uint16[Ze+11]=j,this.uint16[Ze+12]=W,this.uint16[Ze+13]=X,this.uint16[Ze+14]=re,this.uint16[Ze+15]=ae,this.uint16[Ze+16]=Se,this.uint16[Ze+17]=fe,this.uint16[Ze+18]=U,this.uint16[Ze+19]=Y,this.uint16[Ze+20]=ge,this.uint16[Ze+21]=Re,this.uint16[Ze+22]=$e,this.uint32[St+12]=Oe,this.float32[St+13]=He,this.float32[St+14]=ot,this.uint16[Ze+30]=et,this.uint16[Ze+31]=at,t}}I.prototype.bytesPerElement=64,vt("StructArrayLayout8i15ui1ul2f2ui64",I);class z extends qr{_refreshViews(){this.uint8=new Uint8Array(this.arrayBuffer),this.float32=new Float32Array(this.arrayBuffer)}emplaceBack(t){const i=this.length;return this.resize(i+1),this.emplace(i,t)}emplace(t,i){return this.float32[1*t+0]=i,t}}z.prototype.bytesPerElement=4,vt("StructArrayLayout1f4",z);class F extends qr{_refreshViews(){this.uint8=new Uint8Array(this.arrayBuffer),this.uint16=new Uint16Array(this.arrayBuffer),this.float32=new Float32Array(this.arrayBuffer)}emplaceBack(t,i,s){const c=this.length;return this.resize(c+1),this.emplace(c,t,i,s)}emplace(t,i,s,c){const d=3*t;return this.uint16[6*t+0]=i,this.float32[d+1]=s,this.float32[d+2]=c,t}}F.prototype.bytesPerElement=12,vt("StructArrayLayout1ui2f12",F);class O extends qr{_refreshViews(){this.uint8=new Uint8Array(this.arrayBuffer),this.uint32=new Uint32Array(this.arrayBuffer),this.uint16=new Uint16Array(this.arrayBuffer)}emplaceBack(t,i,s){const c=this.length;return this.resize(c+1),this.emplace(c,t,i,s)}emplace(t,i,s,c){const d=4*t;return this.uint32[2*t+0]=i,this.uint16[d+2]=s,this.uint16[d+3]=c,t}}O.prototype.bytesPerElement=8,vt("StructArrayLayout1ul2ui8",O);class Z extends qr{_refreshViews(){this.uint8=new Uint8Array(this.arrayBuffer),this.uint16=new Uint16Array(this.arrayBuffer)}emplaceBack(t,i){const s=this.length;return this.resize(s+1),this.emplace(s,t,i)}emplace(t,i,s){const c=2*t;return this.uint16[c+0]=i,this.uint16[c+1]=s,t}}Z.prototype.bytesPerElement=4,vt("StructArrayLayout2ui4",Z);class J extends qr{_refreshViews(){this.uint8=new Uint8Array(this.arrayBuffer),this.uint16=new Uint16Array(this.arrayBuffer)}emplaceBack(t){const i=this.length;return this.resize(i+1),this.emplace(i,t)}emplace(t,i){return this.uint16[1*t+0]=i,t}}J.prototype.bytesPerElement=2,vt("StructArrayLayout1ui2",J);class oe extends qr{_refreshViews(){this.uint8=new Uint8Array(this.arrayBuffer),this.float32=new Float32Array(this.arrayBuffer)}emplaceBack(t,i,s,c){const d=this.length;return this.resize(d+1),this.emplace(d,t,i,s,c)}emplace(t,i,s,c,d){const m=4*t;return this.float32[m+0]=i,this.float32[m+1]=s,this.float32[m+2]=c,this.float32[m+3]=d,t}}oe.prototype.bytesPerElement=16,vt("StructArrayLayout4f16",oe);class ne extends Co{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]}get anchorPoint(){return new T(this.anchorPointX,this.anchorPointY)}}ne.prototype.size=20;class se extends a{get(t){return new ne(this,t)}}vt("CollisionBoxArray",se);class de extends Co{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(t){this._structArray.uint8[this._pos1+37]=t}get hidden(){return this._structArray.uint8[this._pos1+38]}set hidden(t){this._structArray.uint8[this._pos1+38]=t}get crossTileID(){return this._structArray.uint32[this._pos4+10]}set crossTileID(t){this._structArray.uint32[this._pos4+10]=t}get associatedIconIndex(){return this._structArray.int16[this._pos2+22]}}de.prototype.size=48;class _e extends A{get(t){return new de(this,t)}}vt("PlacedSymbolArray",_e);class ye extends Co{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(t){this._structArray.uint32[this._pos4+12]=t}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]}}ye.prototype.size=64;class be extends I{get(t){return new ye(this,t)}}vt("SymbolInstanceArray",be);class ke extends z{getoffsetX(t){return this.float32[1*t+0]}}vt("GlyphOffsetArray",ke);class we extends Vs{getx(t){return this.int16[3*t+0]}gety(t){return this.int16[3*t+1]}gettileUnitDistanceFromAnchor(t){return this.int16[3*t+2]}}vt("SymbolLineVertexArray",we);class Le extends Co{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]}}Le.prototype.size=12;class We extends F{get(t){return new Le(this,t)}}vt("TextAnchorOffsetArray",We);class Fe extends Co{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]}}Fe.prototype.size=8;class Ne extends O{get(t){return new Fe(this,t)}}vt("FeatureIndexArray",Ne);class je extends Bs{}class mt extends Bs{}class pt extends Bs{}class tt extends Ql{}class kt extends Yl{}class Gt extends Jo{}class nr extends $l{}class Br extends u{}class xr extends e{}class Vr extends r{}class Or extends l{}class Ar extends g{}class cr extends b{}class ei extends Z{}const ci=zr([{name:"a_pos",components:2,type:"Int16"}],4),{members:xi}=ci;class ur{constructor(t=[]){this._forceNewSegmentOnNextPrepare=!1,this.segments=t}prepareSegment(t,i,s,c){const d=this.segments[this.segments.length-1];return t>ur.MAX_VERTEX_ARRAY_LENGTH&&bt(`Max vertices per segment is ${ur.MAX_VERTEX_ARRAY_LENGTH}: bucket requested ${t}. Consider using the \`fillLargeMeshArrays\` function if you require meshes with more than ${ur.MAX_VERTEX_ARRAY_LENGTH} vertices.`),this._forceNewSegmentOnNextPrepare||!d||d.vertexLength+t>ur.MAX_VERTEX_ARRAY_LENGTH||d.sortKey!==c?this.createNewSegment(i,s,c):d}createNewSegment(t,i,s){const c={vertexOffset:t.length,primitiveOffset:i.length,vertexLength:0,primitiveLength:0,vaos:{}};return s!==void 0&&(c.sortKey=s),this._forceNewSegmentOnNextPrepare=!1,this.segments.push(c),c}getOrCreateLatestSegment(t,i,s){return this.prepareSegment(0,t,i,s)}forceNewSegmentOnNextPrepare(){this._forceNewSegmentOnNextPrepare=!0}get(){return this.segments}destroy(){for(const t of this.segments)for(const i in t.vaos)t.vaos[i].destroy()}static simpleSegment(t,i,s,c){return new ur([{vertexOffset:t,primitiveOffset:i,vertexLength:s,primitiveLength:c,vaos:{},sortKey:0}])}}function ro(n,t){return 256*(n=Zr(Math.floor(n),0,255))+Zr(Math.floor(t),0,255)}ur.MAX_VERTEX_ARRAY_LENGTH=Math.pow(2,16)-1,vt("SegmentVector",ur);const kn=zr([{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"}]);var io,Po,Os,no={exports:{}},Io={exports:{}},qi={exports:{}},oo=function(){if(Os)return no.exports;Os=1;var n=(io||(io=1,Io.exports=function(i,s){var c,d,m,y,w,E,R,V;for(d=i.length-(c=3&i.length),m=s,w=3432918353,E=461845907,V=0;V<d;)R=255&i.charCodeAt(V)|(255&i.charCodeAt(++V))<<8|(255&i.charCodeAt(++V))<<16|(255&i.charCodeAt(++V))<<24,++V,m=27492+(65535&(y=5*(65535&(m=(m^=R=(65535&(R=(R=(65535&R)*w+(((R>>>16)*w&65535)<<16)&4294967295)<<15|R>>>17))*E+(((R>>>16)*E&65535)<<16)&4294967295)<<13|m>>>19))+((5*(m>>>16)&65535)<<16)&4294967295))+((58964+(y>>>16)&65535)<<16);switch(R=0,c){case 3:R^=(255&i.charCodeAt(V+2))<<16;case 2:R^=(255&i.charCodeAt(V+1))<<8;case 1:m^=R=(65535&(R=(R=(65535&(R^=255&i.charCodeAt(V)))*w+(((R>>>16)*w&65535)<<16)&4294967295)<<15|R>>>17))*E+(((R>>>16)*E&65535)<<16)&4294967295}return m^=i.length,m=2246822507*(65535&(m^=m>>>16))+((2246822507*(m>>>16)&65535)<<16)&4294967295,m=3266489909*(65535&(m^=m>>>13))+((3266489909*(m>>>16)&65535)<<16)&4294967295,(m^=m>>>16)>>>0}),Io.exports),t=(Po||(Po=1,qi.exports=function(i,s){for(var c,d=i.length,m=s^d,y=0;d>=4;)c=1540483477*(65535&(c=255&i.charCodeAt(y)|(255&i.charCodeAt(++y))<<8|(255&i.charCodeAt(++y))<<16|(255&i.charCodeAt(++y))<<24))+((1540483477*(c>>>16)&65535)<<16),m=1540483477*(65535&m)+((1540483477*(m>>>16)&65535)<<16)^(c=1540483477*(65535&(c^=c>>>24))+((1540483477*(c>>>16)&65535)<<16)),d-=4,++y;switch(d){case 3:m^=(255&i.charCodeAt(y+2))<<16;case 2:m^=(255&i.charCodeAt(y+1))<<8;case 1:m=1540483477*(65535&(m^=255&i.charCodeAt(y)))+((1540483477*(m>>>16)&65535)<<16)}return m=1540483477*(65535&(m^=m>>>13))+((1540483477*(m>>>16)&65535)<<16),(m^=m>>>15)>>>0}),qi.exports);return no.exports=n,no.exports.murmur3=n,no.exports.murmur2=t,no.exports}(),qn=B(oo);class so{constructor(){this.ids=[],this.positions=[],this.indexed=!1}add(t,i,s,c){this.ids.push(Jr(t)),this.positions.push(i,s,c)}getPositions(t){if(!this.indexed)throw new Error("Trying to get index, but feature positions are not indexed");const i=Jr(t);let s=0,c=this.ids.length-1;for(;s<c;){const m=s+c>>1;this.ids[m]>=i?c=m:s=m+1}const d=[];for(;this.ids[s]===i;)d.push({index:this.positions[3*s],start:this.positions[3*s+1],end:this.positions[3*s+2]}),s++;return d}static serialize(t,i){const s=new Float64Array(t.ids),c=new Uint32Array(t.positions);return Xr(s,c,0,s.length-1),i&&i.push(s.buffer,c.buffer),{ids:s,positions:c}}static deserialize(t){const i=new so;return i.ids=t.ids,i.positions=t.positions,i.indexed=!0,i}}function Jr(n){const t=+n;return!isNaN(t)&&t<=Number.MAX_SAFE_INTEGER?t:qn(String(n))}function Xr(n,t,i,s){for(;i<s;){const c=n[i+s>>1];let d=i-1,m=s+1;for(;;){do d++;while(n[d]<c);do m--;while(n[m]>c);if(d>=m)break;Pi(n,d,m),Pi(t,3*d,3*m),Pi(t,3*d+1,3*m+1),Pi(t,3*d+2,3*m+2)}m-i<s-m?(Xr(n,t,i,m),i=m+1):(Xr(n,t,m+1,s),s=m)}}function Pi(n,t,i){const s=n[t];n[t]=n[i],n[i]=s}vt("FeaturePositionMap",so);class Er{constructor(t,i){this.gl=t.gl,this.location=i}}class ja extends Er{constructor(t,i){super(t,i),this.current=0}set(t){this.current!==t&&(this.current=t,this.gl.uniform1f(this.location,t))}}class rh extends Er{constructor(t,i){super(t,i),this.current=[0,0,0,0]}set(t){t[0]===this.current[0]&&t[1]===this.current[1]&&t[2]===this.current[2]&&t[3]===this.current[3]||(this.current=t,this.gl.uniform4f(this.location,t[0],t[1],t[2],t[3]))}}class ih extends Er{constructor(t,i){super(t,i),this.current=Vt.transparent}set(t){t.r===this.current.r&&t.g===this.current.g&&t.b===this.current.b&&t.a===this.current.a||(this.current=t,this.gl.uniform4f(this.location,t.r,t.g,t.b,t.a))}}const Tp=new Float32Array(16);function ec(n){return[ro(255*n.r,255*n.g),ro(255*n.b,255*n.a)]}class Fs{constructor(t,i,s){this.value=t,this.uniformNames=i.map(c=>`u_${c}`),this.type=s}setUniform(t,i,s){t.set(s.constantOr(this.value))}getBinding(t,i,s){return this.type==="color"?new ih(t,i):new ja(t,i)}}class rn{constructor(t,i){this.uniformNames=i.map(s=>`u_${s}`),this.patternFrom=null,this.patternTo=null,this.pixelRatioFrom=1,this.pixelRatioTo=1}setConstantPatternPositions(t,i){this.pixelRatioFrom=i.pixelRatio,this.pixelRatioTo=t.pixelRatio,this.patternFrom=i.tlbr,this.patternTo=t.tlbr}setUniform(t,i,s,c){const d=c==="u_pattern_to"?this.patternTo:c==="u_pattern_from"?this.patternFrom:c==="u_pixel_ratio_to"?this.pixelRatioTo:c==="u_pixel_ratio_from"?this.pixelRatioFrom:null;d&&t.set(d)}getBinding(t,i,s){return s.substr(0,9)==="u_pattern"?new rh(t,i):new ja(t,i)}}class Tn{constructor(t,i,s,c){this.expression=t,this.type=s,this.maxValue=0,this.paintVertexAttributes=i.map(d=>({name:`a_${d}`,type:"Float32",components:s==="color"?2:1,offset:0})),this.paintVertexArray=new c}populatePaintArray(t,i,s,c,d){const m=this.paintVertexArray.length,y=this.expression.evaluate(new Cr(0),i,{},c,[],d);this.paintVertexArray.resize(t),this._setPaintValue(m,t,y)}updatePaintArray(t,i,s,c){const d=this.expression.evaluate({zoom:0},s,c);this._setPaintValue(t,i,d)}_setPaintValue(t,i,s){if(this.type==="color"){const c=ec(s);for(let d=t;d<i;d++)this.paintVertexArray.emplace(d,c[0],c[1])}else{for(let c=t;c<i;c++)this.paintVertexArray.emplace(c,s);this.maxValue=Math.max(this.maxValue,Math.abs(s))}}upload(t){this.paintVertexArray&&this.paintVertexArray.arrayBuffer&&(this.paintVertexBuffer&&this.paintVertexBuffer.buffer?this.paintVertexBuffer.updateData(this.paintVertexArray):this.paintVertexBuffer=t.createVertexBuffer(this.paintVertexArray,this.paintVertexAttributes,this.expression.isStateDependent))}destroy(){this.paintVertexBuffer&&this.paintVertexBuffer.destroy()}}class nn{constructor(t,i,s,c,d,m){this.expression=t,this.uniformNames=i.map(y=>`u_${y}_t`),this.type=s,this.useIntegerZoom=c,this.zoom=d,this.maxValue=0,this.paintVertexAttributes=i.map(y=>({name:`a_${y}`,type:"Float32",components:s==="color"?4:2,offset:0})),this.paintVertexArray=new m}populatePaintArray(t,i,s,c,d){const m=this.expression.evaluate(new Cr(this.zoom),i,{},c,[],d),y=this.expression.evaluate(new Cr(this.zoom+1),i,{},c,[],d),w=this.paintVertexArray.length;this.paintVertexArray.resize(t),this._setPaintValue(w,t,m,y)}updatePaintArray(t,i,s,c){const d=this.expression.evaluate({zoom:this.zoom},s,c),m=this.expression.evaluate({zoom:this.zoom+1},s,c);this._setPaintValue(t,i,d,m)}_setPaintValue(t,i,s,c){if(this.type==="color"){const d=ec(s),m=ec(c);for(let y=t;y<i;y++)this.paintVertexArray.emplace(y,d[0],d[1],m[0],m[1])}else{for(let d=t;d<i;d++)this.paintVertexArray.emplace(d,s,c);this.maxValue=Math.max(this.maxValue,Math.abs(s),Math.abs(c))}}upload(t){this.paintVertexArray&&this.paintVertexArray.arrayBuffer&&(this.paintVertexBuffer&&this.paintVertexBuffer.buffer?this.paintVertexBuffer.updateData(this.paintVertexArray):this.paintVertexBuffer=t.createVertexBuffer(this.paintVertexArray,this.paintVertexAttributes,this.expression.isStateDependent))}destroy(){this.paintVertexBuffer&&this.paintVertexBuffer.destroy()}setUniform(t,i){const s=this.useIntegerZoom?Math.floor(i.zoom):i.zoom,c=Zr(this.expression.interpolationFactor(s,this.zoom,this.zoom+1),0,1);t.set(c)}getBinding(t,i,s){return new ja(t,i)}}class Un{constructor(t,i,s,c,d,m){this.expression=t,this.type=i,this.useIntegerZoom=s,this.zoom=c,this.layerId=m,this.zoomInPaintVertexArray=new d,this.zoomOutPaintVertexArray=new d}populatePaintArray(t,i,s){const c=this.zoomInPaintVertexArray.length;this.zoomInPaintVertexArray.resize(t),this.zoomOutPaintVertexArray.resize(t),this._setPaintValues(c,t,i.patterns&&i.patterns[this.layerId],s)}updatePaintArray(t,i,s,c,d){this._setPaintValues(t,i,s.patterns&&s.patterns[this.layerId],d)}_setPaintValues(t,i,s,c){if(!c||!s)return;const{min:d,mid:m,max:y}=s,w=c[d],E=c[m],R=c[y];if(w&&E&&R)for(let V=t;V<i;V++)this.zoomInPaintVertexArray.emplace(V,E.tl[0],E.tl[1],E.br[0],E.br[1],w.tl[0],w.tl[1],w.br[0],w.br[1],E.pixelRatio,w.pixelRatio),this.zoomOutPaintVertexArray.emplace(V,E.tl[0],E.tl[1],E.br[0],E.br[1],R.tl[0],R.tl[1],R.br[0],R.br[1],E.pixelRatio,R.pixelRatio)}upload(t){this.zoomInPaintVertexArray&&this.zoomInPaintVertexArray.arrayBuffer&&this.zoomOutPaintVertexArray&&this.zoomOutPaintVertexArray.arrayBuffer&&(this.zoomInPaintVertexBuffer=t.createVertexBuffer(this.zoomInPaintVertexArray,kn.members,this.expression.isStateDependent),this.zoomOutPaintVertexBuffer=t.createVertexBuffer(this.zoomOutPaintVertexArray,kn.members,this.expression.isStateDependent))}destroy(){this.zoomOutPaintVertexBuffer&&this.zoomOutPaintVertexBuffer.destroy(),this.zoomInPaintVertexBuffer&&this.zoomInPaintVertexBuffer.destroy()}}class Ha{constructor(t,i,s){this.binders={},this._buffers=[];const c=[];for(const d in t.paint._values){if(!s(d))continue;const m=t.paint.get(d);if(!(m instanceof Ei&&Oo(m.property.specification)))continue;const y=tc(d,t.type),w=m.value,E=m.property.specification.type,R=m.property.useIntegerZoom,V=m.property.specification["property-type"],q=V==="cross-faded"||V==="cross-faded-data-driven";if(w.kind==="constant")this.binders[d]=q?new rn(w.value,y):new Fs(w.value,y,E),c.push(`/u_${d}`);else if(w.kind==="source"||q){const j=Vm(d,E,"source");this.binders[d]=q?new Un(w,E,R,i,j,t.id):new Tn(w,y,E,j),c.push(`/a_${d}`)}else{const j=Vm(d,E,"composite");this.binders[d]=new nn(w,y,E,R,i,j),c.push(`/z_${d}`)}}this.cacheKey=c.sort().join("")}getMaxValue(t){const i=this.binders[t];return i instanceof Tn||i instanceof nn?i.maxValue:0}populatePaintArrays(t,i,s,c,d){for(const m in this.binders){const y=this.binders[m];(y instanceof Tn||y instanceof nn||y instanceof Un)&&y.populatePaintArray(t,i,s,c,d)}}setConstantPatternPositions(t,i){for(const s in this.binders){const c=this.binders[s];c instanceof rn&&c.setConstantPatternPositions(t,i)}}updatePaintArrays(t,i,s,c,d){let m=!1;for(const y in t){const w=i.getPositions(y);for(const E of w){const R=s.feature(E.index);for(const V in this.binders){const q=this.binders[V];if((q instanceof Tn||q instanceof nn||q instanceof Un)&&q.expression.isStateDependent===!0){const j=c.paint.get(V);q.expression=j.value,q.updatePaintArray(E.start,E.end,R,t[y],d),m=!0}}}}return m}defines(){const t=[];for(const i in this.binders){const s=this.binders[i];(s instanceof Fs||s instanceof rn)&&t.push(...s.uniformNames.map(c=>`#define HAS_UNIFORM_${c}`))}return t}getBinderAttributes(){const t=[];for(const i in this.binders){const s=this.binders[i];if(s instanceof Tn||s instanceof nn)for(let c=0;c<s.paintVertexAttributes.length;c++)t.push(s.paintVertexAttributes[c].name);else if(s instanceof Un)for(let c=0;c<kn.members.length;c++)t.push(kn.members[c].name)}return t}getBinderUniforms(){const t=[];for(const i in this.binders){const s=this.binders[i];if(s instanceof Fs||s instanceof rn||s instanceof nn)for(const c of s.uniformNames)t.push(c)}return t}getPaintVertexBuffers(){return this._buffers}getUniforms(t,i){const s=[];for(const c in this.binders){const d=this.binders[c];if(d instanceof Fs||d instanceof rn||d instanceof nn){for(const m of d.uniformNames)if(i[m]){const y=d.getBinding(t,i[m],m);s.push({name:m,property:c,binding:y})}}}return s}setUniforms(t,i,s,c){for(const{name:d,property:m,binding:y}of i)this.binders[m].setUniform(y,c,s.get(m),d)}updatePaintBuffers(t){this._buffers=[];for(const i in this.binders){const s=this.binders[i];if(t&&s instanceof Un){const c=t.fromScale===2?s.zoomInPaintVertexBuffer:s.zoomOutPaintVertexBuffer;c&&this._buffers.push(c)}else(s instanceof Tn||s instanceof nn)&&s.paintVertexBuffer&&this._buffers.push(s.paintVertexBuffer)}}upload(t){for(const i in this.binders){const s=this.binders[i];(s instanceof Tn||s instanceof nn||s instanceof Un)&&s.upload(t)}this.updatePaintBuffers()}destroy(){for(const t in this.binders){const i=this.binders[t];(i instanceof Tn||i instanceof nn||i instanceof Un)&&i.destroy()}}}class ao{constructor(t,i,s=()=>!0){this.programConfigurations={};for(const c of t)this.programConfigurations[c.id]=new Ha(c,i,s);this.needsUpload=!1,this._featureMap=new so,this._bufferOffset=0}populatePaintArrays(t,i,s,c,d,m){for(const y in this.programConfigurations)this.programConfigurations[y].populatePaintArrays(t,i,c,d,m);i.id!==void 0&&this._featureMap.add(i.id,s,this._bufferOffset,t),this._bufferOffset=t,this.needsUpload=!0}updatePaintArrays(t,i,s,c){for(const d of s)this.needsUpload=this.programConfigurations[d.id].updatePaintArrays(t,this._featureMap,i,d,c)||this.needsUpload}get(t){return this.programConfigurations[t]}upload(t){if(this.needsUpload){for(const i in this.programConfigurations)this.programConfigurations[i].upload(t);this.needsUpload=!1}}destroy(){for(const t in this.programConfigurations)this.programConfigurations[t].destroy()}}function tc(n,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":["gapwidth"],"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"]}[n]||[n.replace(`${t}-`,"").replace(/-/g,"_")]}function Vm(n,t,i){const s={color:{source:Jo,composite:oe},number:{source:z,composite:Jo}},c=function(d){return{"line-pattern":{source:nr,composite:nr},"fill-pattern":{source:nr,composite:nr},"fill-extrusion-pattern":{source:nr,composite:nr}}[d]}(n);return c&&c[i]||s[t][i]}vt("ConstantBinder",Fs),vt("CrossFadedConstantBinder",rn),vt("SourceExpressionBinder",Tn),vt("CrossFadedCompositeBinder",Un),vt("CompositeExpressionBinder",nn),vt("ProgramConfiguration",Ha,{omit:["_buffers"]}),vt("ProgramConfigurationSet",ao);const Cp=Math.pow(2,14)-1,Om=-Cp-1;function Ns(n){const t=ir/n.extent,i=n.loadGeometry();for(let s=0;s<i.length;s++){const c=i[s];for(let d=0;d<c.length;d++){const m=c[d],y=Math.round(m.x*t),w=Math.round(m.y*t);m.x=Zr(y,Om,Cp),m.y=Zr(w,Om,Cp),(y<m.x||y>m.x+1||w<m.y||w>m.y+1)&&bt("Geometry exceeds allowed extent, reduce your vector tile buffer size")}}return i}function qs(n,t){return{type:n.type,id:n.id,properties:n.properties,geometry:t?Ns(n):[]}}const Fm=-32768;function i2(n,t,i,s,c){n.emplaceBack(Fm+8*t+s,Fm+8*i+c)}class Ep{constructor(t){this.zoom=t.zoom,this.overscaling=t.overscaling,this.layers=t.layers,this.layerIds=this.layers.map(i=>i.id),this.index=t.index,this.hasPattern=!1,this.layoutVertexArray=new mt,this.indexArray=new cr,this.segments=new ur,this.programConfigurations=new ao(t.layers,t.zoom),this.stateDependentLayerIds=this.layers.filter(i=>i.isStateDependent()).map(i=>i.id)}populate(t,i,s){const c=this.layers[0],d=[];let m=null,y=!1,w=c.type==="heatmap";if(c.type==="circle"){const R=c;m=R.layout.get("circle-sort-key"),y=!m.isConstant(),w=w||R.paint.get("circle-pitch-alignment")==="map"}const E=w?i.subdivisionGranularity.circle:1;for(const{feature:R,id:V,index:q,sourceLayerIndex:j}of t){const W=this.layers[0]._featureFilter.needGeometry,X=qs(R,W);if(!this.layers[0]._featureFilter.filter(new Cr(this.zoom),X,s))continue;const re=y?m.evaluate(X,{},s):void 0,ae={id:V,properties:R.properties,type:R.type,sourceLayerIndex:j,index:q,geometry:W?X.geometry:Ns(R),patterns:{},sortKey:re};d.push(ae)}y&&d.sort((R,V)=>R.sortKey-V.sortKey);for(const R of d){const{geometry:V,index:q,sourceLayerIndex:j}=R,W=t[q].feature;this.addFeature(R,V,q,s,E),i.featureIndex.insert(W,V,q,j,this.index)}}update(t,i,s){this.stateDependentLayers.length&&this.programConfigurations.updatePaintArrays(t,i,this.stateDependentLayers,s)}isEmpty(){return this.layoutVertexArray.length===0}uploadPending(){return!this.uploaded||this.programConfigurations.needsUpload}upload(t){this.uploaded||(this.layoutVertexBuffer=t.createVertexBuffer(this.layoutVertexArray,xi),this.indexBuffer=t.createIndexBuffer(this.indexArray)),this.programConfigurations.upload(t),this.uploaded=!0}destroy(){this.layoutVertexBuffer&&(this.layoutVertexBuffer.destroy(),this.indexBuffer.destroy(),this.programConfigurations.destroy(),this.segments.destroy())}addFeature(t,i,s,c,d=1){let m;switch(d){case 1:m=[0,7];break;case 3:m=[0,2,5,7];break;case 5:m=[0,1,3,4,6,7];break;case 7:m=[0,1,2,3,4,5,6,7];break;default:throw new Error(`Invalid circle bucket granularity: ${d}; valid values are 1, 3, 5, 7.`)}const y=m.length;for(const w of i)for(const E of w){const R=E.x,V=E.y;if(R<0||R>=ir||V<0||V>=ir)continue;const q=this.segments.prepareSegment(y*y,this.layoutVertexArray,this.indexArray,t.sortKey),j=q.vertexLength;for(let W=0;W<y;W++)for(let X=0;X<y;X++)i2(this.layoutVertexArray,R,V,m[X],m[W]);for(let W=0;W<y-1;W++)for(let X=0;X<y-1;X++){const re=j+W*y+X,ae=j+(W+1)*y+X;this.indexArray.emplaceBack(re,ae+1,re+1),this.indexArray.emplaceBack(re,ae,ae+1)}q.vertexLength+=y*y,q.primitiveLength+=(y-1)*(y-1)*2}this.programConfigurations.populatePaintArrays(this.layoutVertexArray.length,t,s,{},c)}}function Nm(n,t){for(let i=0;i<n.length;i++)if(Us(t,n[i]))return!0;for(let i=0;i<t.length;i++)if(Us(n,t[i]))return!0;return!!Pp(n,t)}function n2(n,t,i){return!!Us(n,t)||!!Ip(t,n,i)}function qm(n,t){if(n.length===1)return jm(t,n[0]);for(let i=0;i<t.length;i++){const s=t[i];for(let c=0;c<s.length;c++)if(Us(n,s[c]))return!0}for(let i=0;i<n.length;i++)if(jm(t,n[i]))return!0;for(let i=0;i<t.length;i++)if(Pp(n,t[i]))return!0;return!1}function o2(n,t,i){if(n.length>1){if(Pp(n,t))return!0;for(let s=0;s<t.length;s++)if(Ip(t[s],n,i))return!0}for(let s=0;s<n.length;s++)if(Ip(n[s],t,i))return!0;return!1}function Pp(n,t){if(n.length===0||t.length===0)return!1;for(let i=0;i<n.length-1;i++){const s=n[i],c=n[i+1];for(let d=0;d<t.length-1;d++)if(s2(s,c,t[d],t[d+1]))return!0}return!1}function s2(n,t,i,s){return ct(n,i,s)!==ct(t,i,s)&&ct(n,t,i)!==ct(n,t,s)}function Ip(n,t,i){const s=i*i;if(t.length===1)return n.distSqr(t[0])<s;for(let c=1;c<t.length;c++)if(Um(n,t[c-1],t[c])<s)return!0;return!1}function Um(n,t,i){const s=t.distSqr(i);if(s===0)return n.distSqr(t);const c=((n.x-t.x)*(i.x-t.x)+(n.y-t.y)*(i.y-t.y))/s;return n.distSqr(c<0?t:c>1?i:i.sub(t)._mult(c)._add(t))}function jm(n,t){for(let i=0;i<n.length;i++)if(Us(n[i],t))return!0;return!1}function Us(n,t){let i=!1;for(let s=0,c=n.length-1;s<n.length;c=s++){const d=n[s],m=n[c];d.y>t.y!=m.y>t.y&&t.x<(m.x-d.x)*(t.y-d.y)/(m.y-d.y)+d.x&&(i=!i)}return i}function a2(n,t,i){const s=i[0],c=i[2];if(n.x<s.x&&t.x<s.x||n.x>c.x&&t.x>c.x||n.y<s.y&&t.y<s.y||n.y>c.y&&t.y>c.y)return!1;const d=ct(n,t,i[0]);return d!==ct(n,t,i[1])||d!==ct(n,t,i[2])||d!==ct(n,t,i[3])}function rc(n,t,i){const s=t.paint.get(n).value;return s.kind==="constant"?s.value:i.programConfigurations.get(t.id).getMaxValue(n)}function nh(n){return Math.sqrt(n[0]*n[0]+n[1]*n[1])}function oh(n,t,i,s,c){if(!t[0]&&!t[1])return n;const d=T.convert(t)._mult(c);i==="viewport"&&d._rotate(-s);const m=[];for(let y=0;y<n.length;y++)m.push(n[y].sub(d));return m}let Hm,Wm;vt("CircleBucket",Ep,{omit:["layers"]});var l2={get paint(){return Wm=Wm||new Gr({"circle-radius":new zt($.paint_circle["circle-radius"]),"circle-color":new zt($.paint_circle["circle-color"]),"circle-blur":new zt($.paint_circle["circle-blur"]),"circle-opacity":new zt($.paint_circle["circle-opacity"]),"circle-translate":new Ct($.paint_circle["circle-translate"]),"circle-translate-anchor":new Ct($.paint_circle["circle-translate-anchor"]),"circle-pitch-scale":new Ct($.paint_circle["circle-pitch-scale"]),"circle-pitch-alignment":new Ct($.paint_circle["circle-pitch-alignment"]),"circle-stroke-width":new zt($.paint_circle["circle-stroke-width"]),"circle-stroke-color":new zt($.paint_circle["circle-stroke-color"]),"circle-stroke-opacity":new zt($.paint_circle["circle-stroke-opacity"])})},get layout(){return Hm=Hm||new Gr({"circle-sort-key":new zt($.layout_circle["circle-sort-key"])})}};class c2 extends tn{constructor(t){super(t,l2)}createBucket(t){return new Ep(t)}queryRadius(t){const i=t;return rc("circle-radius",this,i)+rc("circle-stroke-width",this,i)+nh(this.paint.get("circle-translate"))}queryIntersectsFeature({queryGeometry:t,feature:i,featureState:s,geometry:c,transform:d,pixelsToTileUnits:m,unwrappedTileID:y,getElevation:w}){const E=oh(t,this.paint.get("circle-translate"),this.paint.get("circle-translate-anchor"),-d.bearingInRadians,m),R=this.paint.get("circle-radius").evaluate(i,s)+this.paint.get("circle-stroke-width").evaluate(i,s),V=this.paint.get("circle-pitch-alignment")==="map",q=V?E:function(W,X,re,ae){return W.map(Se=>Zm(Se,X,re,ae))}(E,d,y,w),j=V?R*m:R;for(const W of c)for(const X of W){const re=V?X:Zm(X,d,y,w);let ae=j;const Se=d.projectTileCoordinates(X.x,X.y,y,w).signedDistanceFromCamera;if(this.paint.get("circle-pitch-scale")==="viewport"&&this.paint.get("circle-pitch-alignment")==="map"?ae*=Se/d.cameraToCenterDistance:this.paint.get("circle-pitch-scale")==="map"&&this.paint.get("circle-pitch-alignment")==="viewport"&&(ae*=d.cameraToCenterDistance/Se),n2(q,re,ae))return!0}return!1}}function Zm(n,t,i,s){const c=t.projectTileCoordinates(n.x,n.y,i,s).point;return new T((.5*c.x+.5)*t.width,(.5*-c.y+.5)*t.height)}class Km extends Ep{}let Gm;vt("HeatmapBucket",Km,{omit:["layers"]});var u2={get paint(){return Gm=Gm||new Gr({"heatmap-radius":new zt($.paint_heatmap["heatmap-radius"]),"heatmap-weight":new zt($.paint_heatmap["heatmap-weight"]),"heatmap-intensity":new Ct($.paint_heatmap["heatmap-intensity"]),"heatmap-color":new Jl($.paint_heatmap["heatmap-color"]),"heatmap-opacity":new Ct($.paint_heatmap["heatmap-opacity"])})}};function Mp(n,{width:t,height:i},s,c){if(c){if(c instanceof Uint8ClampedArray)c=new Uint8Array(c.buffer);else if(c.length!==t*i*s)throw new RangeError(`mismatched image size. expected: ${c.length} but got: ${t*i*s}`)}else c=new Uint8Array(t*i*s);return n.width=t,n.height=i,n.data=c,n}function Jm(n,{width:t,height:i},s){if(t===n.width&&i===n.height)return;const c=Mp({},{width:t,height:i},s);Lp(n,c,{x:0,y:0},{x:0,y:0},{width:Math.min(n.width,t),height:Math.min(n.height,i)},s),n.width=t,n.height=i,n.data=c.data}function Lp(n,t,i,s,c,d){if(c.width===0||c.height===0)return t;if(c.width>n.width||c.height>n.height||i.x>n.width-c.width||i.y>n.height-c.height)throw new RangeError("out of range source coordinates for image copy");if(c.width>t.width||c.height>t.height||s.x>t.width-c.width||s.y>t.height-c.height)throw new RangeError("out of range destination coordinates for image copy");const m=n.data,y=t.data;if(m===y)throw new Error("srcData equals dstData, so image is already copied");for(let w=0;w<c.height;w++){const E=((i.y+w)*n.width+i.x)*d,R=((s.y+w)*t.width+s.x)*d;for(let V=0;V<c.width*d;V++)y[R+V]=m[E+V]}return t}class ic{constructor(t,i){Mp(this,t,1,i)}resize(t){Jm(this,t,1)}clone(){return new ic({width:this.width,height:this.height},new Uint8Array(this.data))}static copy(t,i,s,c,d){Lp(t,i,s,c,d,1)}}class dn{constructor(t,i){Mp(this,t,4,i)}resize(t){Jm(this,t,4)}replace(t,i){i?this.data.set(t):this.data=t instanceof Uint8ClampedArray?new Uint8Array(t.buffer):t}clone(){return new dn({width:this.width,height:this.height},new Uint8Array(this.data))}static copy(t,i,s,c,d){Lp(t,i,s,c,d,4)}}function Xm(n){const t={},i=n.resolution||256,s=n.clips?n.clips.length:1,c=n.image||new dn({width:i,height:s});if(Math.log(i)/Math.LN2%1!=0)throw new Error(`width is not a power of 2 - ${i}`);const d=(m,y,w)=>{t[n.evaluationKey]=w;const E=n.expression.evaluate(t);c.data[m+y+0]=Math.floor(255*E.r/E.a),c.data[m+y+1]=Math.floor(255*E.g/E.a),c.data[m+y+2]=Math.floor(255*E.b/E.a),c.data[m+y+3]=Math.floor(255*E.a)};if(n.clips)for(let m=0,y=0;m<s;++m,y+=4*i)for(let w=0,E=0;w<i;w++,E+=4){const R=w/(i-1),{start:V,end:q}=n.clips[m];d(y,E,V*(1-R)+q*R)}else for(let m=0,y=0;m<i;m++,y+=4)d(0,y,m/(i-1));return c}vt("AlphaImage",ic),vt("RGBAImage",dn);const Rp="big-fb";class h2 extends tn{createBucket(t){return new Km(t)}constructor(t){super(t,u2),this.heatmapFbos=new Map,this._updateColorRamp()}_handleSpecialPaintPropertyUpdate(t){t==="heatmap-color"&&this._updateColorRamp()}_updateColorRamp(){this.colorRamp=Xm({expression:this._transitionablePaint._values["heatmap-color"].value.expression,evaluationKey:"heatmapDensity",image:this.colorRamp}),this.colorRampTexture=null}resize(){this.heatmapFbos.has(Rp)&&this.heatmapFbos.delete(Rp)}queryRadius(){return 0}queryIntersectsFeature(){return!1}hasOffscreenPass(){return this.paint.get("heatmap-opacity")!==0&&this.visibility!=="none"}}let Qm;var p2={get paint(){return Qm=Qm||new Gr({"hillshade-illumination-direction":new Ct($.paint_hillshade["hillshade-illumination-direction"]),"hillshade-illumination-altitude":new Ct($.paint_hillshade["hillshade-illumination-altitude"]),"hillshade-illumination-anchor":new Ct($.paint_hillshade["hillshade-illumination-anchor"]),"hillshade-exaggeration":new Ct($.paint_hillshade["hillshade-exaggeration"]),"hillshade-shadow-color":new Ct($.paint_hillshade["hillshade-shadow-color"]),"hillshade-highlight-color":new Ct($.paint_hillshade["hillshade-highlight-color"]),"hillshade-accent-color":new Ct($.paint_hillshade["hillshade-accent-color"]),"hillshade-method":new Ct($.paint_hillshade["hillshade-method"])})}};class d2 extends tn{constructor(t){super(t,p2),this.recalculate({zoom:0,zoomHistory:{}},void 0)}getIlluminationProperties(){let t=this.paint.get("hillshade-illumination-direction").values,i=this.paint.get("hillshade-illumination-altitude").values,s=this.paint.get("hillshade-highlight-color").values,c=this.paint.get("hillshade-shadow-color").values;const d=Math.max(t.length,i.length,s.length,c.length);t=t.concat(Array(d-t.length).fill(t.at(-1))),i=i.concat(Array(d-i.length).fill(i.at(-1))),s=s.concat(Array(d-s.length).fill(s.at(-1))),c=c.concat(Array(d-c.length).fill(c.at(-1)));const m=i.map(Ir);return{directionRadians:t.map(Ir),altitudeRadians:m,shadowColor:c,highlightColor:s}}hasOffscreenPass(){return this.paint.get("hillshade-exaggeration")!==0&&this.visibility!=="none"}}const f2=zr([{name:"a_pos",components:2,type:"Int16"}],4),{members:m2}=f2;function Dp(n,t,i){const s=i.patternDependencies;let c=!1;for(const d of t){const m=d.paint.get(`${n}-pattern`);m.isConstant()||(c=!0);const y=m.constantOr(null);y&&(c=!0,s[y.to]=!0,s[y.from]=!0)}return c}function zp(n,t,i,s,c){const d=c.patternDependencies;for(const m of t){const y=m.paint.get(`${n}-pattern`).value;if(y.kind!=="constant"){let w=y.evaluate({zoom:s-1},i,{},c.availableImages),E=y.evaluate({zoom:s},i,{},c.availableImages),R=y.evaluate({zoom:s+1},i,{},c.availableImages);w=w&&w.name?w.name:w,E=E&&E.name?E.name:E,R=R&&R.name?R.name:R,d[w]=!0,d[E]=!0,d[R]=!0,i.patterns[m.id]={min:w,mid:E,max:R}}}return i}function Ym(n,t,i,s,c){let d;if(c===function(m,y,w,E){let R=0;for(let V=y,q=w-E;V<w;V+=E)R+=(m[q]-m[V])*(m[V+1]+m[q+1]),q=V;return R}(n,t,i,s)>0)for(let m=t;m<i;m+=s)d=rg(m/s|0,n[m],n[m+1],d);else for(let m=i-s;m>=t;m-=s)d=rg(m/s|0,n[m],n[m+1],d);return d&&Wa(d,d.next)&&(ac(d),d=d.next),d}function js(n,t){if(!n)return n;t||(t=n);let i,s=n;do if(i=!1,s.steiner||!Wa(s,s.next)&&Kr(s.prev,s,s.next)!==0)s=s.next;else{if(ac(s),s=t=s.prev,s===s.next)break;i=!0}while(i||s!==t);return t}function nc(n,t,i,s,c,d,m){if(!n)return;!m&&d&&function(w,E,R,V){let q=w;do q.z===0&&(q.z=Bp(q.x,q.y,E,R,V)),q.prevZ=q.prev,q.nextZ=q.next,q=q.next;while(q!==w);q.prevZ.nextZ=null,q.prevZ=null,function(j){let W,X=1;do{let re,ae=j;j=null;let Se=null;for(W=0;ae;){W++;let fe=ae,U=0;for(let ge=0;ge<X&&(U++,fe=fe.nextZ,fe);ge++);let Y=X;for(;U>0||Y>0&&fe;)U!==0&&(Y===0||!fe||ae.z<=fe.z)?(re=ae,ae=ae.nextZ,U--):(re=fe,fe=fe.nextZ,Y--),Se?Se.nextZ=re:j=re,re.prevZ=Se,Se=re;ae=fe}Se.nextZ=null,X*=2}while(W>1)}(q)}(n,s,c,d);let y=n;for(;n.prev!==n.next;){const w=n.prev,E=n.next;if(d?y2(n,s,c,d):g2(n))t.push(w.i,n.i,E.i),ac(n),n=E.next,y=E.next;else if((n=E)===y){m?m===1?nc(n=_2(js(n),t),t,i,s,c,d,2):m===2&&x2(n,t,i,s,c,d):nc(js(n),t,i,s,c,d,1);break}}}function g2(n){const t=n.prev,i=n,s=n.next;if(Kr(t,i,s)>=0)return!1;const c=t.x,d=i.x,m=s.x,y=t.y,w=i.y,E=s.y,R=Math.min(c,d,m),V=Math.min(y,w,E),q=Math.max(c,d,m),j=Math.max(y,w,E);let W=s.next;for(;W!==t;){if(W.x>=R&&W.x<=q&&W.y>=V&&W.y<=j&&oc(c,y,d,w,m,E,W.x,W.y)&&Kr(W.prev,W,W.next)>=0)return!1;W=W.next}return!0}function y2(n,t,i,s){const c=n.prev,d=n,m=n.next;if(Kr(c,d,m)>=0)return!1;const y=c.x,w=d.x,E=m.x,R=c.y,V=d.y,q=m.y,j=Math.min(y,w,E),W=Math.min(R,V,q),X=Math.max(y,w,E),re=Math.max(R,V,q),ae=Bp(j,W,t,i,s),Se=Bp(X,re,t,i,s);let fe=n.prevZ,U=n.nextZ;for(;fe&&fe.z>=ae&&U&&U.z<=Se;){if(fe.x>=j&&fe.x<=X&&fe.y>=W&&fe.y<=re&&fe!==c&&fe!==m&&oc(y,R,w,V,E,q,fe.x,fe.y)&&Kr(fe.prev,fe,fe.next)>=0||(fe=fe.prevZ,U.x>=j&&U.x<=X&&U.y>=W&&U.y<=re&&U!==c&&U!==m&&oc(y,R,w,V,E,q,U.x,U.y)&&Kr(U.prev,U,U.next)>=0))return!1;U=U.nextZ}for(;fe&&fe.z>=ae;){if(fe.x>=j&&fe.x<=X&&fe.y>=W&&fe.y<=re&&fe!==c&&fe!==m&&oc(y,R,w,V,E,q,fe.x,fe.y)&&Kr(fe.prev,fe,fe.next)>=0)return!1;fe=fe.prevZ}for(;U&&U.z<=Se;){if(U.x>=j&&U.x<=X&&U.y>=W&&U.y<=re&&U!==c&&U!==m&&oc(y,R,w,V,E,q,U.x,U.y)&&Kr(U.prev,U,U.next)>=0)return!1;U=U.nextZ}return!0}function _2(n,t){let i=n;do{const s=i.prev,c=i.next.next;!Wa(s,c)&&eg(s,i,i.next,c)&&sc(s,c)&&sc(c,s)&&(t.push(s.i,i.i,c.i),ac(i),ac(i.next),i=n=c),i=i.next}while(i!==n);return js(i)}function x2(n,t,i,s,c,d){let m=n;do{let y=m.next.next;for(;y!==m.prev;){if(m.i!==y.i&&A2(m,y)){let w=tg(m,y);return m=js(m,m.next),w=js(w,w.next),nc(m,t,i,s,c,d,0),void nc(w,t,i,s,c,d,0)}y=y.next}m=m.next}while(m!==n)}function b2(n,t){let i=n.x-t.x;return i===0&&(i=n.y-t.y,i===0)&&(i=(n.next.y-n.y)/(n.next.x-n.x)-(t.next.y-t.y)/(t.next.x-t.x)),i}function v2(n,t){const i=function(c,d){let m=d;const y=c.x,w=c.y;let E,R=-1/0;if(Wa(c,m))return m;do{if(Wa(c,m.next))return m.next;if(w<=m.y&&w>=m.next.y&&m.next.y!==m.y){const X=m.x+(w-m.y)*(m.next.x-m.x)/(m.next.y-m.y);if(X<=y&&X>R&&(R=X,E=m.x<m.next.x?m:m.next,X===y))return E}m=m.next}while(m!==d);if(!E)return null;const V=E,q=E.x,j=E.y;let W=1/0;m=E;do{if(y>=m.x&&m.x>=q&&y!==m.x&&$m(w<j?y:R,w,q,j,w<j?R:y,w,m.x,m.y)){const X=Math.abs(w-m.y)/(y-m.x);sc(m,c)&&(X<W||X===W&&(m.x>E.x||m.x===E.x&&w2(E,m)))&&(E=m,W=X)}m=m.next}while(m!==V);return E}(n,t);if(!i)return t;const s=tg(i,n);return js(s,s.next),js(i,i.next)}function w2(n,t){return Kr(n.prev,n,t.prev)<0&&Kr(t.next,n,n.next)<0}function Bp(n,t,i,s,c){return(n=1431655765&((n=858993459&((n=252645135&((n=16711935&((n=(n-i)*c|0)|n<<8))|n<<4))|n<<2))|n<<1))|(t=1431655765&((t=858993459&((t=252645135&((t=16711935&((t=(t-s)*c|0)|t<<8))|t<<4))|t<<2))|t<<1))<<1}function S2(n){let t=n,i=n;do(t.x<i.x||t.x===i.x&&t.y<i.y)&&(i=t),t=t.next;while(t!==n);return i}function $m(n,t,i,s,c,d,m,y){return(c-m)*(t-y)>=(n-m)*(d-y)&&(n-m)*(s-y)>=(i-m)*(t-y)&&(i-m)*(d-y)>=(c-m)*(s-y)}function oc(n,t,i,s,c,d,m,y){return!(n===m&&t===y)&&$m(n,t,i,s,c,d,m,y)}function A2(n,t){return n.next.i!==t.i&&n.prev.i!==t.i&&!function(i,s){let c=i;do{if(c.i!==i.i&&c.next.i!==i.i&&c.i!==s.i&&c.next.i!==s.i&&eg(c,c.next,i,s))return!0;c=c.next}while(c!==i);return!1}(n,t)&&(sc(n,t)&&sc(t,n)&&function(i,s){let c=i,d=!1;const m=(i.x+s.x)/2,y=(i.y+s.y)/2;do c.y>y!=c.next.y>y&&c.next.y!==c.y&&m<(c.next.x-c.x)*(y-c.y)/(c.next.y-c.y)+c.x&&(d=!d),c=c.next;while(c!==i);return d}(n,t)&&(Kr(n.prev,n,t.prev)||Kr(n,t.prev,t))||Wa(n,t)&&Kr(n.prev,n,n.next)>0&&Kr(t.prev,t,t.next)>0)}function Kr(n,t,i){return(t.y-n.y)*(i.x-t.x)-(t.x-n.x)*(i.y-t.y)}function Wa(n,t){return n.x===t.x&&n.y===t.y}function eg(n,t,i,s){const c=ah(Kr(n,t,i)),d=ah(Kr(n,t,s)),m=ah(Kr(i,s,n)),y=ah(Kr(i,s,t));return c!==d&&m!==y||!(c!==0||!sh(n,i,t))||!(d!==0||!sh(n,s,t))||!(m!==0||!sh(i,n,s))||!(y!==0||!sh(i,t,s))}function sh(n,t,i){return t.x<=Math.max(n.x,i.x)&&t.x>=Math.min(n.x,i.x)&&t.y<=Math.max(n.y,i.y)&&t.y>=Math.min(n.y,i.y)}function ah(n){return n>0?1:n<0?-1:0}function sc(n,t){return Kr(n.prev,n,n.next)<0?Kr(n,t,n.next)>=0&&Kr(n,n.prev,t)>=0:Kr(n,t,n.prev)<0||Kr(n,n.next,t)<0}function tg(n,t){const i=Vp(n.i,n.x,n.y),s=Vp(t.i,t.x,t.y),c=n.next,d=t.prev;return n.next=t,t.prev=n,i.next=c,c.prev=i,s.next=i,i.prev=s,d.next=s,s.prev=d,s}function rg(n,t,i,s){const c=Vp(n,t,i);return s?(c.next=s.next,c.prev=s,s.next.prev=c,s.next=c):(c.prev=c,c.next=c),c}function ac(n){n.next.prev=n.prev,n.prev.next=n.next,n.prevZ&&(n.prevZ.nextZ=n.nextZ),n.nextZ&&(n.nextZ.prevZ=n.prevZ)}function Vp(n,t,i){return{i:n,x:t,y:i,prev:null,next:null,z:0,prevZ:null,nextZ:null,steiner:!1}}class Za{constructor(t,i){if(i>t)throw new Error("Min granularity must not be greater than base granularity.");this._baseZoomGranularity=t,this._minGranularity=i}getGranularityForZoomLevel(t){return Math.max(Math.floor(this._baseZoomGranularity/(1<<t)),this._minGranularity,1)}}class lh{constructor(t){this.fill=t.fill,this.line=t.line,this.tile=t.tile,this.stencil=t.stencil,this.circle=t.circle}}lh.noSubdivision=new lh({fill:new Za(0,0),line:new Za(0,0),tile:new Za(0,0),stencil:new Za(0,0),circle:1}),vt("SubdivisionGranularityExpression",Za),vt("SubdivisionGranularitySetting",lh);const Ka=-32768,lc=32767;class k2{constructor(t,i){this._vertexBuffer=[],this._vertexDictionary=new Map,this._used=!1,this._granularity=t,this._granularityCellSize=ir/t,this._canonical=i}_getKey(t,i){return(t+=32768)<<16|(i+=32768)<<0}_vertexToIndex(t,i){if(t<-32768||i<-32768||t>32767||i>32767)throw new Error("Vertex coordinates are out of signed 16 bit integer range.");const s=0|Math.round(t),c=0|Math.round(i),d=this._getKey(s,c);if(this._vertexDictionary.has(d))return this._vertexDictionary.get(d);const m=this._vertexBuffer.length/2;return this._vertexDictionary.set(d,m),this._vertexBuffer.push(s,c),m}_subdivideTrianglesScanline(t){if(this._granularity<2)return function(c,d){const m=[];for(let y=0;y<d.length;y+=3){const w=d[y],E=d[y+1],R=d[y+2],V=c[2*w],q=c[2*w+1];(c[2*E]-V)*(c[2*R+1]-q)-(c[2*E+1]-q)*(c[2*R]-V)>0?(m.push(w),m.push(R),m.push(E)):(m.push(w),m.push(E),m.push(R))}return m}(this._vertexBuffer,t);const i=[],s=t.length;for(let c=0;c<s;c+=3){const d=[t[c+0],t[c+1],t[c+2]],m=[this._vertexBuffer[2*t[c+0]+0],this._vertexBuffer[2*t[c+0]+1],this._vertexBuffer[2*t[c+1]+0],this._vertexBuffer[2*t[c+1]+1],this._vertexBuffer[2*t[c+2]+0],this._vertexBuffer[2*t[c+2]+1]];let y=1/0,w=1/0,E=-1/0,R=-1/0;for(let X=0;X<3;X++){const re=m[2*X],ae=m[2*X+1];y=Math.min(y,re),E=Math.max(E,re),w=Math.min(w,ae),R=Math.max(R,ae)}if(y===E||w===R)continue;const V=Math.floor(y/this._granularityCellSize),q=Math.ceil(E/this._granularityCellSize),j=Math.floor(w/this._granularityCellSize),W=Math.ceil(R/this._granularityCellSize);if(V!==q||j!==W)for(let X=j;X<W;X++){const re=this._scanlineGenerateVertexRingForCellRow(X,m,d);T2(this._vertexBuffer,re,i)}else i.push(...d)}return i}_scanlineGenerateVertexRingForCellRow(t,i,s){const c=t*this._granularityCellSize,d=c+this._granularityCellSize,m=[];for(let y=0;y<3;y++){const w=i[2*y],E=i[2*y+1],R=i[2*(y+1)%6],V=i[(2*(y+1)+1)%6],q=i[2*(y+2)%6],j=i[(2*(y+2)+1)%6],W=R-w,X=V-E,re=W===0,ae=X===0,Se=(c-E)/X,fe=(d-E)/X,U=Math.min(Se,fe),Y=Math.max(Se,fe);if(!ae&&(U>=1||Y<=0)||ae&&(E<c||E>d)){V>=c&&V<=d&&m.push(s[(y+1)%3]);continue}!ae&&U>0&&m.push(this._vertexToIndex(w+W*U,E+X*U));const ge=w+W*Math.max(U,0),Re=w+W*Math.min(Y,1);re||this._generateIntraEdgeVertices(m,w,E,R,V,ge,Re),!ae&&Y<1&&m.push(this._vertexToIndex(w+W*Y,E+X*Y)),(ae||V>=c&&V<=d)&&m.push(s[(y+1)%3]),!ae&&(V<=c||V>=d)&&this._generateInterEdgeVertices(m,w,E,R,V,q,j,Re,c,d)}return m}_generateIntraEdgeVertices(t,i,s,c,d,m,y){const w=c-i,E=d-s,R=E===0,V=R?Math.min(i,c):Math.min(m,y),q=R?Math.max(i,c):Math.max(m,y),j=Math.floor(V/this._granularityCellSize)+1,W=Math.ceil(q/this._granularityCellSize)-1;if(R?i<c:m<y)for(let X=j;X<=W;X++){const re=X*this._granularityCellSize;t.push(this._vertexToIndex(re,s+E*(re-i)/w))}else for(let X=W;X>=j;X--){const re=X*this._granularityCellSize;t.push(this._vertexToIndex(re,s+E*(re-i)/w))}}_generateInterEdgeVertices(t,i,s,c,d,m,y,w,E,R){const V=d-s,q=m-c,j=y-d,W=(E-d)/j,X=(R-d)/j,re=Math.min(W,X),ae=Math.max(W,X),Se=c+q*re;let fe=Math.floor(Math.min(Se,w)/this._granularityCellSize)+1,U=Math.ceil(Math.max(Se,w)/this._granularityCellSize)-1,Y=w<Se;const ge=j===0;if(ge&&(y===E||y===R))return;if(ge||re>=1||ae<=0){const $e=s-y,Oe=m+(i-m)*Math.min((E-y)/$e,(R-y)/$e);fe=Math.floor(Math.min(Oe,w)/this._granularityCellSize)+1,U=Math.ceil(Math.max(Oe,w)/this._granularityCellSize)-1,Y=w<Oe}const Re=V>0?R:E;if(Y)for(let $e=fe;$e<=U;$e++)t.push(this._vertexToIndex($e*this._granularityCellSize,Re));else for(let $e=U;$e>=fe;$e--)t.push(this._vertexToIndex($e*this._granularityCellSize,Re))}_generateOutline(t){const i=[];for(const s of t){const c=Hs(s,this._granularity,!0),d=this._pointArrayToIndices(c),m=[];for(let y=1;y<d.length;y++)m.push(d[y-1]),m.push(d[y]);i.push(m)}return i}_handlePoles(t){let i=!1,s=!1;this._canonical&&(this._canonical.y===0&&(i=!0),this._canonical.y===(1<<this._canonical.z)-1&&(s=!0)),(i||s)&&this._fillPoles(t,i,s)}_ensureNoPoleVertices(){const t=this._vertexBuffer;for(let i=0;i<t.length;i+=2){const s=t[i+1];s===Ka&&(t[i+1]=-32767),s===lc&&(t[i+1]=32766)}}_generatePoleQuad(t,i,s,c,d,m){c>d!=(m===Ka)?(t.push(i),t.push(s),t.push(this._vertexToIndex(c,m)),t.push(s),t.push(this._vertexToIndex(d,m)),t.push(this._vertexToIndex(c,m))):(t.push(s),t.push(i),t.push(this._vertexToIndex(c,m)),t.push(this._vertexToIndex(d,m)),t.push(s),t.push(this._vertexToIndex(c,m)))}_fillPoles(t,i,s){const c=this._vertexBuffer,d=ir,m=t.length;for(let y=2;y<m;y+=3){const w=t[y-2],E=t[y-1],R=t[y],V=c[2*w],q=c[2*w+1],j=c[2*E],W=c[2*E+1],X=c[2*R],re=c[2*R+1];i&&(q===0&&W===0&&this._generatePoleQuad(t,w,E,V,j,Ka),W===0&&re===0&&this._generatePoleQuad(t,E,R,j,X,Ka),re===0&&q===0&&this._generatePoleQuad(t,R,w,X,V,Ka)),s&&(q===d&&W===d&&this._generatePoleQuad(t,w,E,V,j,lc),W===d&&re===d&&this._generatePoleQuad(t,E,R,j,X,lc),re===d&&q===d&&this._generatePoleQuad(t,R,w,X,V,lc))}}_initializeVertices(t){for(let i=0;i<t.length;i+=2)this._vertexToIndex(t[i],t[i+1])}subdividePolygonInternal(t,i){if(this._used)throw new Error("Subdivision: multiple use not allowed.");this._used=!0;const{flattened:s,holeIndices:c}=function(y){const w=[],E=[];for(const R of y)if(R.length!==0){R!==y[0]&&w.push(E.length/2);for(let V=0;V<R.length;V++)E.push(R[V].x),E.push(R[V].y)}return{flattened:E,holeIndices:w}}(t);let d;this._initializeVertices(s);try{const y=function(E,R,V=2){const q=R&&R.length,j=q?R[0]*V:E.length;let W=Ym(E,0,j,V,!0);const X=[];if(!W||W.next===W.prev)return X;let re,ae,Se;if(q&&(W=function(fe,U,Y,ge){const Re=[];for(let $e=0,Oe=U.length;$e<Oe;$e++){const He=Ym(fe,U[$e]*ge,$e<Oe-1?U[$e+1]*ge:fe.length,ge,!1);He===He.next&&(He.steiner=!0),Re.push(S2(He))}Re.sort(b2);for(let $e=0;$e<Re.length;$e++)Y=v2(Re[$e],Y);return Y}(E,R,W,V)),E.length>80*V){re=1/0,ae=1/0;let fe=-1/0,U=-1/0;for(let Y=V;Y<j;Y+=V){const ge=E[Y],Re=E[Y+1];ge<re&&(re=ge),Re<ae&&(ae=Re),ge>fe&&(fe=ge),Re>U&&(U=Re)}Se=Math.max(fe-re,U-ae),Se=Se!==0?32767/Se:0}return nc(W,X,V,re,ae,Se,0),X}(s,c),w=this._convertIndices(s,y);d=this._subdivideTrianglesScanline(w)}catch(y){console.error(y)}let m=[];return i&&(m=this._generateOutline(t)),this._ensureNoPoleVertices(),this._handlePoles(d),{verticesFlattened:this._vertexBuffer,indicesTriangles:d,indicesLineList:m}}_convertIndices(t,i){const s=[];for(let c=0;c<i.length;c++)s.push(this._vertexToIndex(t[2*i[c]],t[2*i[c]+1]));return s}_pointArrayToIndices(t){const i=[];for(let s=0;s<t.length;s++){const c=t[s];i.push(this._vertexToIndex(c.x,c.y))}return i}}function ig(n,t,i,s=!0){return new k2(i,t).subdividePolygonInternal(n,s)}function Hs(n,t,i=!1){if(!n||n.length<1)return[];if(n.length<2)return[];const s=n[0],c=n[n.length-1],d=i&&(s.x!==c.x||s.y!==c.y);if(t<2)return d?[...n,n[0]]:[...n];const m=Math.floor(ir/t),y=[];y.push(new T(n[0].x,n[0].y));const w=n.length,E=d?w:w-1;for(let R=0;R<E;R++){const V=n[R],q=R<w-1?n[R+1]:n[0],j=V.x,W=V.y,X=q.x,re=q.y,ae=j!==X,Se=W!==re;if(!ae&&!Se)continue;const fe=X-j,U=re-W,Y=Math.abs(fe),ge=Math.abs(U);let Re=j,$e=W;for(;;){const He=fe>0?(Math.floor(Re/m)+1)*m:(Math.ceil(Re/m)-1)*m,ot=U>0?(Math.floor($e/m)+1)*m:(Math.ceil($e/m)-1)*m,et=Math.abs(Re-He),at=Math.abs($e-ot),Ze=Math.abs(Re-X),St=Math.abs($e-re),Lt=ae?et/Y:Number.POSITIVE_INFINITY,Pt=Se?at/ge:Number.POSITIVE_INFINITY;if((Ze<=et||!ae)&&(St<=at||!Se))break;if(Lt<Pt&&ae||!Se){Re=He,$e+=U*Lt;const Tt=new T(Re,Math.round($e));y[y.length-1].x===Tt.x&&y[y.length-1].y===Tt.y||y.push(Tt)}else{Re+=fe*Pt,$e=ot;const Tt=new T(Math.round(Re),$e);y[y.length-1].x===Tt.x&&y[y.length-1].y===Tt.y||y.push(Tt)}}const Oe=new T(X,re);y[y.length-1].x===Oe.x&&y[y.length-1].y===Oe.y||y.push(Oe)}return y}function T2(n,t,i){if(t.length===0)throw new Error("Subdivision vertex ring is empty.");let s=0,c=n[2*t[0]];for(let w=1;w<t.length;w++){const E=n[2*t[w]];E<c&&(c=E,s=w)}const d=t.length;let m=s,y=(m+1)%d;for(;;){const w=m-1>=0?m-1:d-1,E=(y+1)%d,R=n[2*t[w]],V=n[2*t[E]],q=n[2*t[m]],j=n[2*t[m]+1],W=n[2*t[y]+1];let X=!1;if(R<V)X=!0;else if(R>V)X=!1;else{const re=W-j,ae=-(n[2*t[y]]-q),Se=j<W?1:-1;((R-q)*re+(n[2*t[w]+1]-j)*ae)*Se>((V-q)*re+(n[2*t[E]+1]-j)*ae)*Se&&(X=!0)}if(X){const re=t[w],ae=t[m],Se=t[y];re!==ae&&re!==Se&&ae!==Se&&i.push(Se,ae,re),m--,m<0&&(m=d-1)}else{const re=t[E],ae=t[m],Se=t[y];re!==ae&&re!==Se&&ae!==Se&&i.push(Se,ae,re),y++,y>=d&&(y=0)}if(w===E)break}}function ng(n,t,i,s,c,d,m,y,w){const E=c.length/2,R=m&&y&&w;if(E<ur.MAX_VERTEX_ARRAY_LENGTH){const V=t.prepareSegment(E,i,s),q=V.vertexLength;for(let X=0;X<d.length;X+=3)s.emplaceBack(q+d[X],q+d[X+1],q+d[X+2]);let j,W;V.vertexLength+=E,V.primitiveLength+=d.length/3,R&&(W=m.prepareSegment(E,i,y),j=W.vertexLength,W.vertexLength+=E);for(let X=0;X<c.length;X+=2)n(c[X],c[X+1]);if(R)for(let X=0;X<w.length;X++){const re=w[X];for(let ae=1;ae<re.length;ae+=2)y.emplaceBack(j+re[ae-1],j+re[ae]);W.primitiveLength+=re.length/2}}else(function(V,q,j,W,X,re){const ae=[];for(let ge=0;ge<W.length/2;ge++)ae.push(-1);const Se={count:0};let fe=0,U=V.getOrCreateLatestSegment(q,j),Y=U.vertexLength;for(let ge=2;ge<X.length;ge+=3){const Re=X[ge-2],$e=X[ge-1],Oe=X[ge];let He=ae[Re]<fe,ot=ae[$e]<fe,et=ae[Oe]<fe;U.vertexLength+((He?1:0)+(ot?1:0)+(et?1:0))>ur.MAX_VERTEX_ARRAY_LENGTH&&(U=V.createNewSegment(q,j),fe=Se.count,He=!0,ot=!0,et=!0,Y=0);const at=cc(ae,W,re,Se,Re,He,U),Ze=cc(ae,W,re,Se,$e,ot,U),St=cc(ae,W,re,Se,Oe,et,U);j.emplaceBack(Y+at-fe,Y+Ze-fe,Y+St-fe),U.primitiveLength++}})(t,i,s,c,d,n),R&&function(V,q,j,W,X,re){const ae=[];for(let ge=0;ge<W.length/2;ge++)ae.push(-1);const Se={count:0};let fe=0,U=V.getOrCreateLatestSegment(q,j),Y=U.vertexLength;for(let ge=0;ge<X.length;ge++){const Re=X[ge];for(let $e=1;$e<X[ge].length;$e+=2){const Oe=Re[$e-1],He=Re[$e];let ot=ae[Oe]<fe,et=ae[He]<fe;U.vertexLength+((ot?1:0)+(et?1:0))>ur.MAX_VERTEX_ARRAY_LENGTH&&(U=V.createNewSegment(q,j),fe=Se.count,ot=!0,et=!0,Y=0);const at=cc(ae,W,re,Se,Oe,ot,U),Ze=cc(ae,W,re,Se,He,et,U);j.emplaceBack(Y+at-fe,Y+Ze-fe),U.primitiveLength++}}}(m,i,y,c,w,n),t.forceNewSegmentOnNextPrepare(),m==null||m.forceNewSegmentOnNextPrepare()}function cc(n,t,i,s,c,d,m){if(d){const y=s.count;return i(t[2*c],t[2*c+1]),n[c]=s.count,s.count++,m.vertexLength++,y}return n[c]}class Op{constructor(t){this.zoom=t.zoom,this.overscaling=t.overscaling,this.layers=t.layers,this.layerIds=this.layers.map(i=>i.id),this.index=t.index,this.hasPattern=!1,this.patternFeatures=[],this.layoutVertexArray=new pt,this.indexArray=new cr,this.indexArray2=new ei,this.programConfigurations=new ao(t.layers,t.zoom),this.segments=new ur,this.segments2=new ur,this.stateDependentLayerIds=this.layers.filter(i=>i.isStateDependent()).map(i=>i.id)}populate(t,i,s){this.hasPattern=Dp("fill",this.layers,i);const c=this.layers[0].layout.get("fill-sort-key"),d=!c.isConstant(),m=[];for(const{feature:y,id:w,index:E,sourceLayerIndex:R}of t){const V=this.layers[0]._featureFilter.needGeometry,q=qs(y,V);if(!this.layers[0]._featureFilter.filter(new Cr(this.zoom),q,s))continue;const j=d?c.evaluate(q,{},s,i.availableImages):void 0,W={id:w,properties:y.properties,type:y.type,sourceLayerIndex:R,index:E,geometry:V?q.geometry:Ns(y),patterns:{},sortKey:j};m.push(W)}d&&m.sort((y,w)=>y.sortKey-w.sortKey);for(const y of m){const{geometry:w,index:E,sourceLayerIndex:R}=y;if(this.hasPattern){const V=zp("fill",this.layers,y,this.zoom,i);this.patternFeatures.push(V)}else this.addFeature(y,w,E,s,{},i.subdivisionGranularity);i.featureIndex.insert(t[E].feature,w,E,R,this.index)}}update(t,i,s){this.stateDependentLayers.length&&this.programConfigurations.updatePaintArrays(t,i,this.stateDependentLayers,s)}addFeatures(t,i,s){for(const c of this.patternFeatures)this.addFeature(c,c.geometry,c.index,i,s,t.subdivisionGranularity)}isEmpty(){return this.layoutVertexArray.length===0}uploadPending(){return!this.uploaded||this.programConfigurations.needsUpload}upload(t){this.uploaded||(this.layoutVertexBuffer=t.createVertexBuffer(this.layoutVertexArray,m2),this.indexBuffer=t.createIndexBuffer(this.indexArray),this.indexBuffer2=t.createIndexBuffer(this.indexArray2)),this.programConfigurations.upload(t),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(t,i,s,c,d,m){for(const y of ma(i,500)){const w=ig(y,c,m.fill.getGranularityForZoomLevel(c.z)),E=this.layoutVertexArray;ng((R,V)=>{E.emplaceBack(R,V)},this.segments,this.layoutVertexArray,this.indexArray,w.verticesFlattened,w.indicesTriangles,this.segments2,this.indexArray2,w.indicesLineList)}this.programConfigurations.populatePaintArrays(this.layoutVertexArray.length,t,s,d,c)}}let og,sg;vt("FillBucket",Op,{omit:["layers","patternFeatures"]});var C2={get paint(){return sg=sg||new Gr({"fill-antialias":new Ct($.paint_fill["fill-antialias"]),"fill-opacity":new zt($.paint_fill["fill-opacity"]),"fill-color":new zt($.paint_fill["fill-color"]),"fill-outline-color":new zt($.paint_fill["fill-outline-color"]),"fill-translate":new Ct($.paint_fill["fill-translate"]),"fill-translate-anchor":new Ct($.paint_fill["fill-translate-anchor"]),"fill-pattern":new zs($.paint_fill["fill-pattern"])})},get layout(){return og=og||new Gr({"fill-sort-key":new zt($.layout_fill["fill-sort-key"])})}};class E2 extends tn{constructor(t){super(t,C2)}recalculate(t,i){super.recalculate(t,i);const s=this.paint._values["fill-outline-color"];s.value.kind==="constant"&&s.value.value===void 0&&(this.paint._values["fill-outline-color"]=this.paint._values["fill-color"])}createBucket(t){return new Op(t)}queryRadius(){return nh(this.paint.get("fill-translate"))}queryIntersectsFeature({queryGeometry:t,geometry:i,transform:s,pixelsToTileUnits:c}){return qm(oh(t,this.paint.get("fill-translate"),this.paint.get("fill-translate-anchor"),-s.bearingInRadians,c),i)}isTileClipped(){return!0}}const P2=zr([{name:"a_pos",components:2,type:"Int16"},{name:"a_normal_ed",components:4,type:"Int16"}],4),I2=zr([{name:"a_centroid",components:2,type:"Int16"}],4),{members:M2}=P2;var Fp,ag,Np,lg,qp,cg,ug,ch={};function hg(){if(ag)return Fp;ag=1;var n=H();function t(c,d,m,y,w){this.properties={},this.extent=m,this.type=0,this._pbf=c,this._geometry=-1,this._keys=y,this._values=w,c.readFields(i,this,d)}function i(c,d,m){c==1?d.id=m.readVarint():c==2?function(y,w){for(var E=y.readVarint()+y.pos;y.pos<E;){var R=w._keys[y.readVarint()],V=w._values[y.readVarint()];w.properties[R]=V}}(m,d):c==3?d.type=m.readVarint():c==4&&(d._geometry=m.pos)}function s(c){for(var d,m,y=0,w=0,E=c.length,R=E-1;w<E;R=w++)y+=((m=c[R]).x-(d=c[w]).x)*(d.y+m.y);return y}return Fp=t,t.types=["Unknown","Point","LineString","Polygon"],t.prototype.loadGeometry=function(){var c=this._pbf;c.pos=this._geometry;for(var d,m=c.readVarint()+c.pos,y=1,w=0,E=0,R=0,V=[];c.pos<m;){if(w<=0){var q=c.readVarint();y=7&q,w=q>>3}if(w--,y===1||y===2)E+=c.readSVarint(),R+=c.readSVarint(),y===1&&(d&&V.push(d),d=[]),d.push(new n(E,R));else{if(y!==7)throw new Error("unknown command "+y);d&&d.push(d[0].clone())}}return d&&V.push(d),V},t.prototype.bbox=function(){var c=this._pbf;c.pos=this._geometry;for(var d=c.readVarint()+c.pos,m=1,y=0,w=0,E=0,R=1/0,V=-1/0,q=1/0,j=-1/0;c.pos<d;){if(y<=0){var W=c.readVarint();m=7&W,y=W>>3}if(y--,m===1||m===2)(w+=c.readSVarint())<R&&(R=w),w>V&&(V=w),(E+=c.readSVarint())<q&&(q=E),E>j&&(j=E);else if(m!==7)throw new Error("unknown command "+m)}return[R,q,V,j]},t.prototype.toGeoJSON=function(c,d,m){var y,w,E=this.extent*Math.pow(2,m),R=this.extent*c,V=this.extent*d,q=this.loadGeometry(),j=t.types[this.type];function W(ae){for(var Se=0;Se<ae.length;Se++){var fe=ae[Se];ae[Se]=[360*(fe.x+R)/E-180,360/Math.PI*Math.atan(Math.exp((180-360*(fe.y+V)/E)*Math.PI/180))-90]}}switch(this.type){case 1:var X=[];for(y=0;y<q.length;y++)X[y]=q[y][0];W(q=X);break;case 2:for(y=0;y<q.length;y++)W(q[y]);break;case 3:for(q=function(ae){var Se=ae.length;if(Se<=1)return[ae];for(var fe,U,Y=[],ge=0;ge<Se;ge++){var Re=s(ae[ge]);Re!==0&&(U===void 0&&(U=Re<0),U===Re<0?(fe&&Y.push(fe),fe=[ae[ge]]):fe.push(ae[ge]))}return fe&&Y.push(fe),Y}(q),y=0;y<q.length;y++)for(w=0;w<q[y].length;w++)W(q[y][w])}q.length===1?q=q[0]:j="Multi"+j;var re={type:"Feature",geometry:{type:j,coordinates:q},properties:this.properties};return"id"in this&&(re.id=this.id),re},Fp}function pg(){if(lg)return Np;lg=1;var n=hg();function t(s,c){this.version=1,this.name=null,this.extent=4096,this.length=0,this._pbf=s,this._keys=[],this._values=[],this._features=[],s.readFields(i,this,c),this.length=this._features.length}function i(s,c,d){s===15?c.version=d.readVarint():s===1?c.name=d.readString():s===5?c.extent=d.readVarint():s===2?c._features.push(d.pos):s===3?c._keys.push(d.readString()):s===4&&c._values.push(function(m){for(var y=null,w=m.readVarint()+m.pos;m.pos<w;){var E=m.readVarint()>>3;y=E===1?m.readString():E===2?m.readFloat():E===3?m.readDouble():E===4?m.readVarint64():E===5?m.readVarint():E===6?m.readSVarint():E===7?m.readBoolean():null}return y}(d))}return Np=t,t.prototype.feature=function(s){if(s<0||s>=this._features.length)throw new Error("feature index out of bounds");this._pbf.pos=this._features[s];var c=this._pbf.readVarint()+this._pbf.pos;return new n(this._pbf,c,this.extent,this._keys,this._values)},Np}function dg(){return ug||(ug=1,ch.VectorTile=function(){if(cg)return qp;cg=1;var n=pg();function t(i,s,c){if(i===3){var d=new n(c,c.readVarint()+c.pos);d.length&&(s[d.name]=d)}}return qp=function(i,s){this.layers=i.readFields(t,{},s)},qp}(),ch.VectorTileFeature=hg(),ch.VectorTileLayer=pg()),ch}var uc=B(dg());const L2=uc.VectorTileFeature.types,Up=Math.pow(2,13);function hc(n,t,i,s,c,d,m,y){n.emplaceBack(t,i,2*Math.floor(s*Up)+m,c*Up*2,d*Up*2,Math.round(y))}class jp{constructor(t){this.zoom=t.zoom,this.overscaling=t.overscaling,this.layers=t.layers,this.layerIds=this.layers.map(i=>i.id),this.index=t.index,this.hasPattern=!1,this.layoutVertexArray=new tt,this.centroidVertexArray=new je,this.indexArray=new cr,this.programConfigurations=new ao(t.layers,t.zoom),this.segments=new ur,this.stateDependentLayerIds=this.layers.filter(i=>i.isStateDependent()).map(i=>i.id)}populate(t,i,s){this.features=[],this.hasPattern=Dp("fill-extrusion",this.layers,i);for(const{feature:c,id:d,index:m,sourceLayerIndex:y}of t){const w=this.layers[0]._featureFilter.needGeometry,E=qs(c,w);if(!this.layers[0]._featureFilter.filter(new Cr(this.zoom),E,s))continue;const R={id:d,sourceLayerIndex:y,index:m,geometry:w?E.geometry:Ns(c),properties:c.properties,type:c.type,patterns:{}};this.hasPattern?this.features.push(zp("fill-extrusion",this.layers,R,this.zoom,i)):this.addFeature(R,R.geometry,m,s,{},i.subdivisionGranularity),i.featureIndex.insert(c,R.geometry,m,y,this.index,!0)}}addFeatures(t,i,s){for(const c of this.features){const{geometry:d}=c;this.addFeature(c,d,c.index,i,s,t.subdivisionGranularity)}}update(t,i,s){this.stateDependentLayers.length&&this.programConfigurations.updatePaintArrays(t,i,this.stateDependentLayers,s)}isEmpty(){return this.layoutVertexArray.length===0&&this.centroidVertexArray.length===0}uploadPending(){return!this.uploaded||this.programConfigurations.needsUpload}upload(t){this.uploaded||(this.layoutVertexBuffer=t.createVertexBuffer(this.layoutVertexArray,M2),this.centroidVertexBuffer=t.createVertexBuffer(this.centroidVertexArray,I2.members,!0),this.indexBuffer=t.createIndexBuffer(this.indexArray)),this.programConfigurations.upload(t),this.uploaded=!0}destroy(){this.layoutVertexBuffer&&(this.layoutVertexBuffer.destroy(),this.indexBuffer.destroy(),this.programConfigurations.destroy(),this.segments.destroy(),this.centroidVertexBuffer.destroy())}addFeature(t,i,s,c,d,m){for(const y of ma(i,500)){const w={x:0,y:0,sampleCount:0},E=this.layoutVertexArray.length;this.processPolygon(w,c,t,y,m);const R=this.layoutVertexArray.length-E,V=Math.floor(w.x/w.sampleCount),q=Math.floor(w.y/w.sampleCount);for(let j=0;j<R;j++)this.centroidVertexArray.emplaceBack(V,q)}this.programConfigurations.populatePaintArrays(this.layoutVertexArray.length,t,s,d,c)}processPolygon(t,i,s,c,d){if(c.length<1||fg(c[0]))return;for(const V of c)V.length!==0&&R2(t,V);const m={segment:this.segments.prepareSegment(4,this.layoutVertexArray,this.indexArray)},y=d.fill.getGranularityForZoomLevel(i.z),w=L2[s.type]==="Polygon";for(const V of c){if(V.length===0||fg(V))continue;const q=Hs(V,y,w);this._generateSideFaces(q,m)}if(!w)return;const E=ig(c,i,y,!1),R=this.layoutVertexArray;ng((V,q)=>{hc(R,V,q,0,0,1,1,0)},this.segments,this.layoutVertexArray,this.indexArray,E.verticesFlattened,E.indicesTriangles)}_generateSideFaces(t,i){let s=0;for(let c=1;c<t.length;c++){const d=t[c],m=t[c-1];if(D2(d,m))continue;i.segment.vertexLength+4>ur.MAX_VERTEX_ARRAY_LENGTH&&(i.segment=this.segments.prepareSegment(4,this.layoutVertexArray,this.indexArray));const y=d.sub(m)._perp()._unit(),w=m.dist(d);s+w>32768&&(s=0),hc(this.layoutVertexArray,d.x,d.y,y.x,y.y,0,0,s),hc(this.layoutVertexArray,d.x,d.y,y.x,y.y,0,1,s),s+=w,hc(this.layoutVertexArray,m.x,m.y,y.x,y.y,0,0,s),hc(this.layoutVertexArray,m.x,m.y,y.x,y.y,0,1,s);const E=i.segment.vertexLength;this.indexArray.emplaceBack(E,E+2,E+1),this.indexArray.emplaceBack(E+1,E+2,E+3),i.segment.vertexLength+=4,i.segment.primitiveLength+=2}}}function R2(n,t){for(let i=0;i<t.length;i++){const s=t[i];i===t.length-1&&t[0].x===s.x&&t[0].y===s.y||(n.x+=s.x,n.y+=s.y,n.sampleCount++)}}function D2(n,t){return n.x===t.x&&(n.x<0||n.x>ir)||n.y===t.y&&(n.y<0||n.y>ir)}function fg(n){return n.every(t=>t.x<0)||n.every(t=>t.x>ir)||n.every(t=>t.y<0)||n.every(t=>t.y>ir)}let mg;vt("FillExtrusionBucket",jp,{omit:["layers","features"]});var z2={get paint(){return mg=mg||new Gr({"fill-extrusion-opacity":new Ct($["paint_fill-extrusion"]["fill-extrusion-opacity"]),"fill-extrusion-color":new zt($["paint_fill-extrusion"]["fill-extrusion-color"]),"fill-extrusion-translate":new Ct($["paint_fill-extrusion"]["fill-extrusion-translate"]),"fill-extrusion-translate-anchor":new Ct($["paint_fill-extrusion"]["fill-extrusion-translate-anchor"]),"fill-extrusion-pattern":new zs($["paint_fill-extrusion"]["fill-extrusion-pattern"]),"fill-extrusion-height":new zt($["paint_fill-extrusion"]["fill-extrusion-height"]),"fill-extrusion-base":new zt($["paint_fill-extrusion"]["fill-extrusion-base"]),"fill-extrusion-vertical-gradient":new Ct($["paint_fill-extrusion"]["fill-extrusion-vertical-gradient"])})}};class B2 extends tn{constructor(t){super(t,z2)}createBucket(t){return new jp(t)}queryRadius(){return nh(this.paint.get("fill-extrusion-translate"))}is3D(){return!0}queryIntersectsFeature({queryGeometry:t,feature:i,featureState:s,geometry:c,transform:d,pixelsToTileUnits:m,pixelPosMatrix:y}){const w=oh(t,this.paint.get("fill-extrusion-translate"),this.paint.get("fill-extrusion-translate-anchor"),-d.bearingInRadians,m),E=this.paint.get("fill-extrusion-height").evaluate(i,s),R=this.paint.get("fill-extrusion-base").evaluate(i,s),V=function(j,W,X){const re=[];for(const ae of j){const Se=[ae.x,ae.y,0,1];Xt(Se,Se,W),re.push(new T(Se[0]/Se[3],Se[1]/Se[3]))}return re}(w,y),q=function(j,W,X,re){const ae=[],Se=[],fe=re[8]*W,U=re[9]*W,Y=re[10]*W,ge=re[11]*W,Re=re[8]*X,$e=re[9]*X,Oe=re[10]*X,He=re[11]*X;for(const ot of j){const et=[],at=[];for(const Ze of ot){const St=Ze.x,Lt=Ze.y,Pt=re[0]*St+re[4]*Lt+re[12],Tt=re[1]*St+re[5]*Lt+re[13],rr=re[2]*St+re[6]*Lt+re[14],Ur=re[3]*St+re[7]*Lt+re[15],ri=rr+Y,Ci=Ur+ge,mn=Pt+Re,ji=Tt+$e,bi=rr+Oe,Fr=Ur+He,ui=new T((Pt+fe)/Ci,(Tt+U)/Ci);ui.z=ri/Ci,et.push(ui);const vi=new T(mn/Fr,ji/Fr);vi.z=bi/Fr,at.push(vi)}ae.push(et),Se.push(at)}return[ae,Se]}(c,R,E,y);return function(j,W,X){let re=1/0;qm(X,W)&&(re=gg(X,W[0]));for(let ae=0;ae<W.length;ae++){const Se=W[ae],fe=j[ae];for(let U=0;U<Se.length-1;U++){const Y=Se[U],ge=[Y,Se[U+1],fe[U+1],fe[U],Y];Nm(X,ge)&&(re=Math.min(re,gg(X,ge)))}}return re!==1/0&&re}(q[0],q[1],V)}}function pc(n,t){return n.x*t.x+n.y*t.y}function gg(n,t){if(n.length===1){let i=0;const s=t[i++];let c;for(;!c||s.equals(c);)if(c=t[i++],!c)return 1/0;for(;i<t.length;i++){const d=t[i],m=n[0],y=c.sub(s),w=d.sub(s),E=m.sub(s),R=pc(y,y),V=pc(y,w),q=pc(w,w),j=pc(E,y),W=pc(E,w),X=R*q-V*V,re=(q*j-V*W)/X,ae=(R*W-V*j)/X,Se=s.z*(1-re-ae)+c.z*re+d.z*ae;if(isFinite(Se))return Se}return 1/0}{let i=1/0;for(const s of t)i=Math.min(i,s.z);return i}}const V2=zr([{name:"a_pos_normal",components:2,type:"Int16"},{name:"a_data",components:4,type:"Uint8"}],4),{members:O2}=V2,F2=zr([{name:"a_uv_x",components:1,type:"Float32"},{name:"a_split_index",components:1,type:"Float32"}]),{members:N2}=F2,q2=uc.VectorTileFeature.types,U2=Math.cos(Math.PI/180*37.5),yg=Math.pow(2,14)/.5;class Hp{constructor(t){this.zoom=t.zoom,this.overscaling=t.overscaling,this.layers=t.layers,this.layerIds=this.layers.map(i=>i.id),this.index=t.index,this.hasPattern=!1,this.patternFeatures=[],this.lineClipsArray=[],this.gradients={},this.layers.forEach(i=>{this.gradients[i.id]={}}),this.layoutVertexArray=new kt,this.layoutVertexArray2=new Gt,this.indexArray=new cr,this.programConfigurations=new ao(t.layers,t.zoom),this.segments=new ur,this.maxLineLength=0,this.stateDependentLayerIds=this.layers.filter(i=>i.isStateDependent()).map(i=>i.id)}populate(t,i,s){this.hasPattern=Dp("line",this.layers,i);const c=this.layers[0].layout.get("line-sort-key"),d=!c.isConstant(),m=[];for(const{feature:y,id:w,index:E,sourceLayerIndex:R}of t){const V=this.layers[0]._featureFilter.needGeometry,q=qs(y,V);if(!this.layers[0]._featureFilter.filter(new Cr(this.zoom),q,s))continue;const j=d?c.evaluate(q,{},s):void 0,W={id:w,properties:y.properties,type:y.type,sourceLayerIndex:R,index:E,geometry:V?q.geometry:Ns(y),patterns:{},sortKey:j};m.push(W)}d&&m.sort((y,w)=>y.sortKey-w.sortKey);for(const y of m){const{geometry:w,index:E,sourceLayerIndex:R}=y;if(this.hasPattern){const V=zp("line",this.layers,y,this.zoom,i);this.patternFeatures.push(V)}else this.addFeature(y,w,E,s,{},i.subdivisionGranularity);i.featureIndex.insert(t[E].feature,w,E,R,this.index)}}update(t,i,s){this.stateDependentLayers.length&&this.programConfigurations.updatePaintArrays(t,i,this.stateDependentLayers,s)}addFeatures(t,i,s){for(const c of this.patternFeatures)this.addFeature(c,c.geometry,c.index,i,s,t.subdivisionGranularity)}isEmpty(){return this.layoutVertexArray.length===0}uploadPending(){return!this.uploaded||this.programConfigurations.needsUpload}upload(t){this.uploaded||(this.layoutVertexArray2.length!==0&&(this.layoutVertexBuffer2=t.createVertexBuffer(this.layoutVertexArray2,N2)),this.layoutVertexBuffer=t.createVertexBuffer(this.layoutVertexArray,O2),this.indexBuffer=t.createIndexBuffer(this.indexArray)),this.programConfigurations.upload(t),this.uploaded=!0}destroy(){this.layoutVertexBuffer&&(this.layoutVertexBuffer.destroy(),this.indexBuffer.destroy(),this.programConfigurations.destroy(),this.segments.destroy())}lineFeatureClips(t){if(t.properties&&Object.prototype.hasOwnProperty.call(t.properties,"mapbox_clip_start")&&Object.prototype.hasOwnProperty.call(t.properties,"mapbox_clip_end"))return{start:+t.properties.mapbox_clip_start,end:+t.properties.mapbox_clip_end}}addFeature(t,i,s,c,d,m){const y=this.layers[0].layout,w=y.get("line-join").evaluate(t,{}),E=y.get("line-cap"),R=y.get("line-miter-limit"),V=y.get("line-round-limit");this.lineClips=this.lineFeatureClips(t);for(const q of i)this.addLine(q,t,w,E,R,V,c,m);this.programConfigurations.populatePaintArrays(this.layoutVertexArray.length,t,s,d,c)}addLine(t,i,s,c,d,m,y,w){if(this.distance=0,this.scaledDistance=0,this.totalDistance=0,t=Hs(t,y?w.line.getGranularityForZoomLevel(y.z):1),this.lineClips){this.lineClipsArray.push(this.lineClips);for(let fe=0;fe<t.length-1;fe++)this.totalDistance+=t[fe].dist(t[fe+1]);this.updateScaledDistance(),this.maxLineLength=Math.max(this.maxLineLength,this.totalDistance)}const E=q2[i.type]==="Polygon";let R=t.length;for(;R>=2&&t[R-1].equals(t[R-2]);)R--;let V=0;for(;V<R-1&&t[V].equals(t[V+1]);)V++;if(R<(E?3:2))return;s==="bevel"&&(d=1.05);const q=this.overscaling<=16?15*ir/(512*this.overscaling):0,j=this.segments.prepareSegment(10*R,this.layoutVertexArray,this.indexArray);let W,X,re,ae,Se;this.e1=this.e2=-1,E&&(W=t[R-2],Se=t[V].sub(W)._unit()._perp());for(let fe=V;fe<R;fe++){if(re=fe===R-1?E?t[V+1]:void 0:t[fe+1],re&&t[fe].equals(re))continue;Se&&(ae=Se),W&&(X=W),W=t[fe],Se=re?re.sub(W)._unit()._perp():ae,ae=ae||Se;let U=ae.add(Se);U.x===0&&U.y===0||U._unit();const Y=ae.x*Se.x+ae.y*Se.y,ge=U.x*Se.x+U.y*Se.y,Re=ge!==0?1/ge:1/0,$e=2*Math.sqrt(2-2*ge),Oe=ge<U2&&X&&re,He=ae.x*Se.y-ae.y*Se.x>0;if(Oe&&fe>V){const at=W.dist(X);if(at>2*q){const Ze=W.sub(W.sub(X)._mult(q/at)._round());this.updateDistance(X,Ze),this.addCurrentVertex(Ze,ae,0,0,j),X=Ze}}const ot=X&&re;let et=ot?s:E?"butt":c;if(ot&&et==="round"&&(Re<m?et="miter":Re<=2&&(et="fakeround")),et==="miter"&&Re>d&&(et="bevel"),et==="bevel"&&(Re>2&&(et="flipbevel"),Re<d&&(et="miter")),X&&this.updateDistance(X,W),et==="miter")U._mult(Re),this.addCurrentVertex(W,U,0,0,j);else if(et==="flipbevel"){if(Re>100)U=Se.mult(-1);else{const at=Re*ae.add(Se).mag()/ae.sub(Se).mag();U._perp()._mult(at*(He?-1:1))}this.addCurrentVertex(W,U,0,0,j),this.addCurrentVertex(W,U.mult(-1),0,0,j)}else if(et==="bevel"||et==="fakeround"){const at=-Math.sqrt(Re*Re-1),Ze=He?at:0,St=He?0:at;if(X&&this.addCurrentVertex(W,ae,Ze,St,j),et==="fakeround"){const Lt=Math.round(180*$e/Math.PI/20);for(let Pt=1;Pt<Lt;Pt++){let Tt=Pt/Lt;if(Tt!==.5){const Ur=Tt-.5;Tt+=Tt*Ur*(Tt-1)*((1.0904+Y*(Y*(3.55645-1.43519*Y)-3.2452))*Ur*Ur+(.848013+Y*(.215638*Y-1.06021)))}const rr=Se.sub(ae)._mult(Tt)._add(ae)._unit()._mult(He?-1:1);this.addHalfVertex(W,rr.x,rr.y,!1,He,0,j)}}re&&this.addCurrentVertex(W,Se,-Ze,-St,j)}else if(et==="butt")this.addCurrentVertex(W,U,0,0,j);else if(et==="square"){const at=X?1:-1;this.addCurrentVertex(W,U,at,at,j)}else et==="round"&&(X&&(this.addCurrentVertex(W,ae,0,0,j),this.addCurrentVertex(W,ae,1,1,j,!0)),re&&(this.addCurrentVertex(W,Se,-1,-1,j,!0),this.addCurrentVertex(W,Se,0,0,j)));if(Oe&&fe<R-1){const at=W.dist(re);if(at>2*q){const Ze=W.add(re.sub(W)._mult(q/at)._round());this.updateDistance(W,Ze),this.addCurrentVertex(Ze,Se,0,0,j),W=Ze}}}}addCurrentVertex(t,i,s,c,d,m=!1){const y=i.y*c-i.x,w=-i.y-i.x*c;this.addHalfVertex(t,i.x+i.y*s,i.y-i.x*s,m,!1,s,d),this.addHalfVertex(t,y,w,m,!0,-c,d),this.distance>yg/2&&this.totalDistance===0&&(this.distance=0,this.updateScaledDistance(),this.addCurrentVertex(t,i,s,c,d,m))}addHalfVertex({x:t,y:i},s,c,d,m,y,w){const E=.5*(this.lineClips?this.scaledDistance*(yg-1):this.scaledDistance);this.layoutVertexArray.emplaceBack((t<<1)+(d?1:0),(i<<1)+(m?1:0),Math.round(63*s)+128,Math.round(63*c)+128,1+(y===0?0:y<0?-1:1)|(63&E)<<2,E>>6),this.lineClips&&this.layoutVertexArray2.emplaceBack((this.scaledDistance-this.lineClips.start)/(this.lineClips.end-this.lineClips.start),this.lineClipsArray.length);const R=w.vertexLength++;this.e1>=0&&this.e2>=0&&(this.indexArray.emplaceBack(this.e1,R,this.e2),w.primitiveLength++),m?this.e2=R:this.e1=R}updateScaledDistance(){this.scaledDistance=this.lineClips?this.lineClips.start+(this.lineClips.end-this.lineClips.start)*this.distance/this.totalDistance:this.distance}updateDistance(t,i){this.distance+=t.dist(i),this.updateScaledDistance()}}let _g,xg;vt("LineBucket",Hp,{omit:["layers","patternFeatures"]});var bg={get paint(){return xg=xg||new Gr({"line-opacity":new zt($.paint_line["line-opacity"]),"line-color":new zt($.paint_line["line-color"]),"line-translate":new Ct($.paint_line["line-translate"]),"line-translate-anchor":new Ct($.paint_line["line-translate-anchor"]),"line-width":new zt($.paint_line["line-width"]),"line-gap-width":new zt($.paint_line["line-gap-width"]),"line-offset":new zt($.paint_line["line-offset"]),"line-blur":new zt($.paint_line["line-blur"]),"line-dasharray":new Gl($.paint_line["line-dasharray"]),"line-pattern":new zs($.paint_line["line-pattern"]),"line-gradient":new Jl($.paint_line["line-gradient"])})},get layout(){return _g=_g||new Gr({"line-cap":new Ct($.layout_line["line-cap"]),"line-join":new zt($.layout_line["line-join"]),"line-miter-limit":new Ct($.layout_line["line-miter-limit"]),"line-round-limit":new Ct($.layout_line["line-round-limit"]),"line-sort-key":new zt($.layout_line["line-sort-key"])})}};class j2 extends zt{possiblyEvaluate(t,i){return i=new Cr(Math.floor(i.zoom),{now:i.now,fadeDuration:i.fadeDuration,zoomHistory:i.zoomHistory,transition:i.transition}),super.possiblyEvaluate(t,i)}evaluate(t,i,s,c){return i=Yr({},i,{zoom:Math.floor(i.zoom)}),super.evaluate(t,i,s,c)}}let uh;class H2 extends tn{constructor(t){super(t,bg),this.gradientVersion=0,uh||(uh=new j2(bg.paint.properties["line-width"].specification),uh.useIntegerZoom=!0)}_handleSpecialPaintPropertyUpdate(t){if(t==="line-gradient"){const i=this.gradientExpression();this.stepInterpolant=!!function(s){return s._styleExpression!==void 0}(i)&&i._styleExpression.expression instanceof $n,this.gradientVersion=(this.gradientVersion+1)%Number.MAX_SAFE_INTEGER}}gradientExpression(){return this._transitionablePaint._values["line-gradient"].value.expression}recalculate(t,i){super.recalculate(t,i),this.paint._values["line-floorwidth"]=uh.possiblyEvaluate(this._transitioningPaint._values["line-width"].value,t)}createBucket(t){return new Hp(t)}queryRadius(t){const i=t,s=vg(rc("line-width",this,i),rc("line-gap-width",this,i)),c=rc("line-offset",this,i);return s/2+Math.abs(c)+nh(this.paint.get("line-translate"))}queryIntersectsFeature({queryGeometry:t,feature:i,featureState:s,geometry:c,transform:d,pixelsToTileUnits:m}){const y=oh(t,this.paint.get("line-translate"),this.paint.get("line-translate-anchor"),-d.bearingInRadians,m),w=m/2*vg(this.paint.get("line-width").evaluate(i,s),this.paint.get("line-gap-width").evaluate(i,s)),E=this.paint.get("line-offset").evaluate(i,s);return E&&(c=function(R,V){const q=[];for(let j=0;j<R.length;j++){const W=R[j],X=[];for(let re=0;re<W.length;re++){const ae=W[re-1],Se=W[re],fe=W[re+1],U=re===0?new T(0,0):Se.sub(ae)._unit()._perp(),Y=re===W.length-1?new T(0,0):fe.sub(Se)._unit()._perp(),ge=U._add(Y)._unit(),Re=ge.x*Y.x+ge.y*Y.y;Re!==0&&ge._mult(1/Re),X.push(ge._mult(V)._add(Se))}q.push(X)}return q}(c,E*m)),function(R,V,q){for(let j=0;j<V.length;j++){const W=V[j];if(R.length>=3){for(let X=0;X<W.length;X++)if(Us(R,W[X]))return!0}if(o2(R,W,q))return!0}return!1}(y,c,w)}isTileClipped(){return!0}}function vg(n,t){return t>0?t+2*n:n}const W2=zr([{name:"a_pos_offset",components:4,type:"Int16"},{name:"a_data",components:4,type:"Uint16"},{name:"a_pixeloffset",components:4,type:"Int16"}],4),Z2=zr([{name:"a_projected_pos",components:3,type:"Float32"}],4);zr([{name:"a_fade_opacity",components:1,type:"Uint32"}],4);const K2=zr([{name:"a_placed",components:2,type:"Uint8"},{name:"a_shift",components:2,type:"Float32"},{name:"a_box_real",components:2,type:"Int16"}]);zr([{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"}]);const wg=zr([{name:"a_pos",components:2,type:"Int16"},{name:"a_anchor_pos",components:2,type:"Int16"},{name:"a_extrude",components:2,type:"Int16"}],4),G2=zr([{name:"a_pos",components:2,type:"Float32"},{name:"a_radius",components:1,type:"Float32"},{name:"a_flags",components:2,type:"Int16"}],4);function J2(n,t,i){return n.sections.forEach(s=>{s.text=function(c,d,m){const y=d.layout.get("text-transform").evaluate(m,{});return y==="uppercase"?c=c.toLocaleUpperCase():y==="lowercase"&&(c=c.toLocaleLowerCase()),Nn.applyArabicShaping&&(c=Nn.applyArabicShaping(c)),c}(s.text,t,i)}),n}zr([{name:"triangle",components:3,type:"Uint16"}]),zr([{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"}]),zr([{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"}]),zr([{type:"Float32",name:"offsetX"}]),zr([{type:"Int16",name:"x"},{type:"Int16",name:"y"},{type:"Int16",name:"tileUnitDistanceFromAnchor"}]),zr([{type:"Uint16",name:"textAnchor"},{type:"Float32",components:2,name:"textOffset"}]);const dc={"!":"︕","#":"#",$:"$","%":"%","&":"&","(":"︵",")":"︶","*":"*","+":"+",",":"︐","-":"︲",".":"・","/":"/",":":"︓",";":"︔","<":"︿","=":"=",">":"﹀","?":"︖","@":"@","[":"﹇","\\":"\","]":"﹈","^":"^",_:"︳","`":"`","{":"︷","|":"―","}":"︸","~":"~","¢":"¢","£":"£","¥":"¥","¦":"¦","¬":"¬","¯":" ̄","–":"︲","—":"︱","‘":"﹃","’":"﹄","“":"﹁","”":"﹂","…":"︙","‧":"・","₩":"₩","、":"︑","。":"︒","〈":"︿","〉":"﹀","《":"︽","》":"︾","「":"﹁","」":"﹂","『":"﹃","』":"﹄","【":"︻","】":"︼","〔":"︹","〕":"︺","〖":"︗","〗":"︘","!":"︕","(":"︵",")":"︶",",":"︐","-":"︲",".":"・",":":"︓",";":"︔","<":"︿",">":"﹀","?":"︖","[":"﹇","]":"﹈","_":"︳","{":"︷","|":"―","}":"︸","⦅":"︵","⦆":"︶","。":"︒","「":"﹁","」":"﹂"};var Sg,Wp,Ag,ti=24,Zp={};function X2(){return Sg||(Sg=1,Zp.read=function(n,t,i,s,c){var d,m,y=8*c-s-1,w=(1<<y)-1,E=w>>1,R=-7,V=i?c-1:0,q=i?-1:1,j=n[t+V];for(V+=q,d=j&(1<<-R)-1,j>>=-R,R+=y;R>0;d=256*d+n[t+V],V+=q,R-=8);for(m=d&(1<<-R)-1,d>>=-R,R+=s;R>0;m=256*m+n[t+V],V+=q,R-=8);if(d===0)d=1-E;else{if(d===w)return m?NaN:1/0*(j?-1:1);m+=Math.pow(2,s),d-=E}return(j?-1:1)*m*Math.pow(2,d-s)},Zp.write=function(n,t,i,s,c,d){var m,y,w,E=8*d-c-1,R=(1<<E)-1,V=R>>1,q=c===23?Math.pow(2,-24)-Math.pow(2,-77):0,j=s?0:d-1,W=s?1:-1,X=t<0||t===0&&1/t<0?1:0;for(t=Math.abs(t),isNaN(t)||t===1/0?(y=isNaN(t)?1:0,m=R):(m=Math.floor(Math.log(t)/Math.LN2),t*(w=Math.pow(2,-m))<1&&(m--,w*=2),(t+=m+V>=1?q/w:q*Math.pow(2,1-V))*w>=2&&(m++,w/=2),m+V>=R?(y=0,m=R):m+V>=1?(y=(t*w-1)*Math.pow(2,c),m+=V):(y=t*Math.pow(2,V-1)*Math.pow(2,c),m=0));c>=8;n[i+j]=255&y,j+=W,y/=256,c-=8);for(m=m<<c|y,E+=c;E>0;n[i+j]=255&m,j+=W,m/=256,E-=8);n[i+j-W]|=128*X}),Zp}function kg(){if(Ag)return Wp;Ag=1,Wp=t;var n=X2();function t(U){this.buf=ArrayBuffer.isView&&ArrayBuffer.isView(U)?U:new Uint8Array(U||0),this.pos=0,this.type=0,this.length=this.buf.length}t.Varint=0,t.Fixed64=1,t.Bytes=2,t.Fixed32=5;var i=4294967296,s=1/i,c=typeof TextDecoder>"u"?null:new TextDecoder("utf-8");function d(U){return U.type===t.Bytes?U.readVarint()+U.pos:U.pos+1}function m(U,Y,ge){return ge?4294967296*Y+(U>>>0):4294967296*(Y>>>0)+(U>>>0)}function y(U,Y,ge){var Re=Y<=16383?1:Y<=2097151?2:Y<=268435455?3:Math.floor(Math.log(Y)/(7*Math.LN2));ge.realloc(Re);for(var $e=ge.pos-1;$e>=U;$e--)ge.buf[$e+Re]=ge.buf[$e]}function w(U,Y){for(var ge=0;ge<U.length;ge++)Y.writeVarint(U[ge])}function E(U,Y){for(var ge=0;ge<U.length;ge++)Y.writeSVarint(U[ge])}function R(U,Y){for(var ge=0;ge<U.length;ge++)Y.writeFloat(U[ge])}function V(U,Y){for(var ge=0;ge<U.length;ge++)Y.writeDouble(U[ge])}function q(U,Y){for(var ge=0;ge<U.length;ge++)Y.writeBoolean(U[ge])}function j(U,Y){for(var ge=0;ge<U.length;ge++)Y.writeFixed32(U[ge])}function W(U,Y){for(var ge=0;ge<U.length;ge++)Y.writeSFixed32(U[ge])}function X(U,Y){for(var ge=0;ge<U.length;ge++)Y.writeFixed64(U[ge])}function re(U,Y){for(var ge=0;ge<U.length;ge++)Y.writeSFixed64(U[ge])}function ae(U,Y){return(U[Y]|U[Y+1]<<8|U[Y+2]<<16)+16777216*U[Y+3]}function Se(U,Y,ge){U[ge]=Y,U[ge+1]=Y>>>8,U[ge+2]=Y>>>16,U[ge+3]=Y>>>24}function fe(U,Y){return(U[Y]|U[Y+1]<<8|U[Y+2]<<16)+(U[Y+3]<<24)}return t.prototype={destroy:function(){this.buf=null},readFields:function(U,Y,ge){for(ge=ge||this.length;this.pos<ge;){var Re=this.readVarint(),$e=Re>>3,Oe=this.pos;this.type=7&Re,U($e,Y,this),this.pos===Oe&&this.skip(Re)}return Y},readMessage:function(U,Y){return this.readFields(U,Y,this.readVarint()+this.pos)},readFixed32:function(){var U=ae(this.buf,this.pos);return this.pos+=4,U},readSFixed32:function(){var U=fe(this.buf,this.pos);return this.pos+=4,U},readFixed64:function(){var U=ae(this.buf,this.pos)+ae(this.buf,this.pos+4)*i;return this.pos+=8,U},readSFixed64:function(){var U=ae(this.buf,this.pos)+fe(this.buf,this.pos+4)*i;return this.pos+=8,U},readFloat:function(){var U=n.read(this.buf,this.pos,!0,23,4);return this.pos+=4,U},readDouble:function(){var U=n.read(this.buf,this.pos,!0,52,8);return this.pos+=8,U},readVarint:function(U){var Y,ge,Re=this.buf;return Y=127&(ge=Re[this.pos++]),ge<128?Y:(Y|=(127&(ge=Re[this.pos++]))<<7,ge<128?Y:(Y|=(127&(ge=Re[this.pos++]))<<14,ge<128?Y:(Y|=(127&(ge=Re[this.pos++]))<<21,ge<128?Y:function($e,Oe,He){var ot,et,at=He.buf;if(ot=(112&(et=at[He.pos++]))>>4,et<128||(ot|=(127&(et=at[He.pos++]))<<3,et<128)||(ot|=(127&(et=at[He.pos++]))<<10,et<128)||(ot|=(127&(et=at[He.pos++]))<<17,et<128)||(ot|=(127&(et=at[He.pos++]))<<24,et<128)||(ot|=(1&(et=at[He.pos++]))<<31,et<128))return m($e,ot,Oe);throw new Error("Expected varint not more than 10 bytes")}(Y|=(15&(ge=Re[this.pos]))<<28,U,this))))},readVarint64:function(){return this.readVarint(!0)},readSVarint:function(){var U=this.readVarint();return U%2==1?(U+1)/-2:U/2},readBoolean:function(){return!!this.readVarint()},readString:function(){var U=this.readVarint()+this.pos,Y=this.pos;return this.pos=U,U-Y>=12&&c?function(ge,Re,$e){return c.decode(ge.subarray(Re,$e))}(this.buf,Y,U):function(ge,Re,$e){for(var Oe="",He=Re;He<$e;){var ot,et,at,Ze=ge[He],St=null,Lt=Ze>239?4:Ze>223?3:Ze>191?2:1;if(He+Lt>$e)break;Lt===1?Ze<128&&(St=Ze):Lt===2?(192&(ot=ge[He+1]))==128&&(St=(31&Ze)<<6|63&ot)<=127&&(St=null):Lt===3?(et=ge[He+2],(192&(ot=ge[He+1]))==128&&(192&et)==128&&((St=(15&Ze)<<12|(63&ot)<<6|63&et)<=2047||St>=55296&&St<=57343)&&(St=null)):Lt===4&&(et=ge[He+2],at=ge[He+3],(192&(ot=ge[He+1]))==128&&(192&et)==128&&(192&at)==128&&((St=(15&Ze)<<18|(63&ot)<<12|(63&et)<<6|63&at)<=65535||St>=1114112)&&(St=null)),St===null?(St=65533,Lt=1):St>65535&&(St-=65536,Oe+=String.fromCharCode(St>>>10&1023|55296),St=56320|1023&St),Oe+=String.fromCharCode(St),He+=Lt}return Oe}(this.buf,Y,U)},readBytes:function(){var U=this.readVarint()+this.pos,Y=this.buf.subarray(this.pos,U);return this.pos=U,Y},readPackedVarint:function(U,Y){if(this.type!==t.Bytes)return U.push(this.readVarint(Y));var ge=d(this);for(U=U||[];this.pos<ge;)U.push(this.readVarint(Y));return U},readPackedSVarint:function(U){if(this.type!==t.Bytes)return U.push(this.readSVarint());var Y=d(this);for(U=U||[];this.pos<Y;)U.push(this.readSVarint());return U},readPackedBoolean:function(U){if(this.type!==t.Bytes)return U.push(this.readBoolean());var Y=d(this);for(U=U||[];this.pos<Y;)U.push(this.readBoolean());return U},readPackedFloat:function(U){if(this.type!==t.Bytes)return U.push(this.readFloat());var Y=d(this);for(U=U||[];this.pos<Y;)U.push(this.readFloat());return U},readPackedDouble:function(U){if(this.type!==t.Bytes)return U.push(this.readDouble());var Y=d(this);for(U=U||[];this.pos<Y;)U.push(this.readDouble());return U},readPackedFixed32:function(U){if(this.type!==t.Bytes)return U.push(this.readFixed32());var Y=d(this);for(U=U||[];this.pos<Y;)U.push(this.readFixed32());return U},readPackedSFixed32:function(U){if(this.type!==t.Bytes)return U.push(this.readSFixed32());var Y=d(this);for(U=U||[];this.pos<Y;)U.push(this.readSFixed32());return U},readPackedFixed64:function(U){if(this.type!==t.Bytes)return U.push(this.readFixed64());var Y=d(this);for(U=U||[];this.pos<Y;)U.push(this.readFixed64());return U},readPackedSFixed64:function(U){if(this.type!==t.Bytes)return U.push(this.readSFixed64());var Y=d(this);for(U=U||[];this.pos<Y;)U.push(this.readSFixed64());return U},skip:function(U){var Y=7&U;if(Y===t.Varint)for(;this.buf[this.pos++]>127;);else if(Y===t.Bytes)this.pos=this.readVarint()+this.pos;else if(Y===t.Fixed32)this.pos+=4;else{if(Y!==t.Fixed64)throw new Error("Unimplemented type: "+Y);this.pos+=8}},writeTag:function(U,Y){this.writeVarint(U<<3|Y)},realloc:function(U){for(var Y=this.length||16;Y<this.pos+U;)Y*=2;if(Y!==this.length){var ge=new Uint8Array(Y);ge.set(this.buf),this.buf=ge,this.length=Y}},finish:function(){return this.length=this.pos,this.pos=0,this.buf.subarray(0,this.length)},writeFixed32:function(U){this.realloc(4),Se(this.buf,U,this.pos),this.pos+=4},writeSFixed32:function(U){this.realloc(4),Se(this.buf,U,this.pos),this.pos+=4},writeFixed64:function(U){this.realloc(8),Se(this.buf,-1&U,this.pos),Se(this.buf,Math.floor(U*s),this.pos+4),this.pos+=8},writeSFixed64:function(U){this.realloc(8),Se(this.buf,-1&U,this.pos),Se(this.buf,Math.floor(U*s),this.pos+4),this.pos+=8},writeVarint:function(U){(U=+U||0)>268435455||U<0?function(Y,ge){var Re,$e;if(Y>=0?(Re=Y%4294967296|0,$e=Y/4294967296|0):($e=~(-Y/4294967296),4294967295^(Re=~(-Y%4294967296))?Re=Re+1|0:(Re=0,$e=$e+1|0)),Y>=18446744073709552e3||Y<-18446744073709552e3)throw new Error("Given varint doesn't fit into 10 bytes");ge.realloc(10),function(Oe,He,ot){ot.buf[ot.pos++]=127&Oe|128,Oe>>>=7,ot.buf[ot.pos++]=127&Oe|128,Oe>>>=7,ot.buf[ot.pos++]=127&Oe|128,Oe>>>=7,ot.buf[ot.pos++]=127&Oe|128,ot.buf[ot.pos]=127&(Oe>>>=7)}(Re,0,ge),function(Oe,He){var ot=(7&Oe)<<4;He.buf[He.pos++]|=ot|((Oe>>>=3)?128:0),Oe&&(He.buf[He.pos++]=127&Oe|((Oe>>>=7)?128:0),Oe&&(He.buf[He.pos++]=127&Oe|((Oe>>>=7)?128:0),Oe&&(He.buf[He.pos++]=127&Oe|((Oe>>>=7)?128:0),Oe&&(He.buf[He.pos++]=127&Oe|((Oe>>>=7)?128:0),Oe&&(He.buf[He.pos++]=127&Oe)))))}($e,ge)}(U,this):(this.realloc(4),this.buf[this.pos++]=127&U|(U>127?128:0),U<=127||(this.buf[this.pos++]=127&(U>>>=7)|(U>127?128:0),U<=127||(this.buf[this.pos++]=127&(U>>>=7)|(U>127?128:0),U<=127||(this.buf[this.pos++]=U>>>7&127))))},writeSVarint:function(U){this.writeVarint(U<0?2*-U-1:2*U)},writeBoolean:function(U){this.writeVarint(!!U)},writeString:function(U){U=String(U),this.realloc(4*U.length),this.pos++;var Y=this.pos;this.pos=function(Re,$e,Oe){for(var He,ot,et=0;et<$e.length;et++){if((He=$e.charCodeAt(et))>55295&&He<57344){if(!ot){He>56319||et+1===$e.length?(Re[Oe++]=239,Re[Oe++]=191,Re[Oe++]=189):ot=He;continue}if(He<56320){Re[Oe++]=239,Re[Oe++]=191,Re[Oe++]=189,ot=He;continue}He=ot-55296<<10|He-56320|65536,ot=null}else ot&&(Re[Oe++]=239,Re[Oe++]=191,Re[Oe++]=189,ot=null);He<128?Re[Oe++]=He:(He<2048?Re[Oe++]=He>>6|192:(He<65536?Re[Oe++]=He>>12|224:(Re[Oe++]=He>>18|240,Re[Oe++]=He>>12&63|128),Re[Oe++]=He>>6&63|128),Re[Oe++]=63&He|128)}return Oe}(this.buf,U,this.pos);var ge=this.pos-Y;ge>=128&&y(Y,ge,this),this.pos=Y-1,this.writeVarint(ge),this.pos+=ge},writeFloat:function(U){this.realloc(4),n.write(this.buf,U,this.pos,!0,23,4),this.pos+=4},writeDouble:function(U){this.realloc(8),n.write(this.buf,U,this.pos,!0,52,8),this.pos+=8},writeBytes:function(U){var Y=U.length;this.writeVarint(Y),this.realloc(Y);for(var ge=0;ge<Y;ge++)this.buf[this.pos++]=U[ge]},writeRawMessage:function(U,Y){this.pos++;var ge=this.pos;U(Y,this);var Re=this.pos-ge;Re>=128&&y(ge,Re,this),this.pos=ge-1,this.writeVarint(Re),this.pos+=Re},writeMessage:function(U,Y,ge){this.writeTag(U,t.Bytes),this.writeRawMessage(Y,ge)},writePackedVarint:function(U,Y){Y.length&&this.writeMessage(U,w,Y)},writePackedSVarint:function(U,Y){Y.length&&this.writeMessage(U,E,Y)},writePackedBoolean:function(U,Y){Y.length&&this.writeMessage(U,q,Y)},writePackedFloat:function(U,Y){Y.length&&this.writeMessage(U,R,Y)},writePackedDouble:function(U,Y){Y.length&&this.writeMessage(U,V,Y)},writePackedFixed32:function(U,Y){Y.length&&this.writeMessage(U,j,Y)},writePackedSFixed32:function(U,Y){Y.length&&this.writeMessage(U,W,Y)},writePackedFixed64:function(U,Y){Y.length&&this.writeMessage(U,X,Y)},writePackedSFixed64:function(U,Y){Y.length&&this.writeMessage(U,re,Y)},writeBytesField:function(U,Y){this.writeTag(U,t.Bytes),this.writeBytes(Y)},writeFixed32Field:function(U,Y){this.writeTag(U,t.Fixed32),this.writeFixed32(Y)},writeSFixed32Field:function(U,Y){this.writeTag(U,t.Fixed32),this.writeSFixed32(Y)},writeFixed64Field:function(U,Y){this.writeTag(U,t.Fixed64),this.writeFixed64(Y)},writeSFixed64Field:function(U,Y){this.writeTag(U,t.Fixed64),this.writeSFixed64(Y)},writeVarintField:function(U,Y){this.writeTag(U,t.Varint),this.writeVarint(Y)},writeSVarintField:function(U,Y){this.writeTag(U,t.Varint),this.writeSVarint(Y)},writeStringField:function(U,Y){this.writeTag(U,t.Bytes),this.writeString(Y)},writeFloatField:function(U,Y){this.writeTag(U,t.Fixed32),this.writeFloat(Y)},writeDoubleField:function(U,Y){this.writeTag(U,t.Fixed64),this.writeDouble(Y)},writeBooleanField:function(U,Y){this.writeVarintField(U,!!Y)}},Wp}var Kp=B(kg());const Gp=3;function Q2(n,t,i){n===1&&i.readMessage(Y2,t)}function Y2(n,t,i){if(n===3){const{id:s,bitmap:c,width:d,height:m,left:y,top:w,advance:E}=i.readMessage($2,{});t.push({id:s,bitmap:new ic({width:d+2*Gp,height:m+2*Gp},c),metrics:{width:d,height:m,left:y,top:w,advance:E}})}}function $2(n,t,i){n===1?t.id=i.readVarint():n===2?t.bitmap=i.readBytes():n===3?t.width=i.readVarint():n===4?t.height=i.readVarint():n===5?t.left=i.readSVarint():n===6?t.top=i.readSVarint():n===7&&(t.advance=i.readVarint())}const eS=Gp;function Tg(n){let t=0,i=0;for(const m of n)t+=m.w*m.h,i=Math.max(i,m.w);n.sort((m,y)=>y.h-m.h);const s=[{x:0,y:0,w:Math.max(Math.ceil(Math.sqrt(t/.95)),i),h:1/0}];let c=0,d=0;for(const m of n)for(let y=s.length-1;y>=0;y--){const w=s[y];if(!(m.w>w.w||m.h>w.h)){if(m.x=w.x,m.y=w.y,d=Math.max(d,m.y+m.h),c=Math.max(c,m.x+m.w),m.w===w.w&&m.h===w.h){const E=s.pop();y<s.length&&(s[y]=E)}else m.h===w.h?(w.x+=m.w,w.w-=m.w):m.w===w.w?(w.y+=m.h,w.h-=m.h):(s.push({x:w.x+m.w,y:w.y,w:w.w-m.w,h:m.h}),w.y+=m.h,w.h-=m.h);break}}return{w:c,h:d,fill:t/(c*d)||0}}const Ui=1;class Jp{constructor(t,{pixelRatio:i,version:s,stretchX:c,stretchY:d,content:m,textFitWidth:y,textFitHeight:w}){this.paddedRect=t,this.pixelRatio=i,this.stretchX=c,this.stretchY=d,this.content=m,this.version=s,this.textFitWidth=y,this.textFitHeight=w}get tl(){return[this.paddedRect.x+Ui,this.paddedRect.y+Ui]}get br(){return[this.paddedRect.x+this.paddedRect.w-Ui,this.paddedRect.y+this.paddedRect.h-Ui]}get tlbr(){return this.tl.concat(this.br)}get displaySize(){return[(this.paddedRect.w-2*Ui)/this.pixelRatio,(this.paddedRect.h-2*Ui)/this.pixelRatio]}}class Cg{constructor(t,i){const s={},c={};this.haveRenderCallbacks=[];const d=[];this.addImages(t,s,d),this.addImages(i,c,d);const{w:m,h:y}=Tg(d),w=new dn({width:m||1,height:y||1});for(const E in t){const R=t[E],V=s[E].paddedRect;dn.copy(R.data,w,{x:0,y:0},{x:V.x+Ui,y:V.y+Ui},R.data)}for(const E in i){const R=i[E],V=c[E].paddedRect,q=V.x+Ui,j=V.y+Ui,W=R.data.width,X=R.data.height;dn.copy(R.data,w,{x:0,y:0},{x:q,y:j},R.data),dn.copy(R.data,w,{x:0,y:X-1},{x:q,y:j-1},{width:W,height:1}),dn.copy(R.data,w,{x:0,y:0},{x:q,y:j+X},{width:W,height:1}),dn.copy(R.data,w,{x:W-1,y:0},{x:q-1,y:j},{width:1,height:X}),dn.copy(R.data,w,{x:0,y:0},{x:q+W,y:j},{width:1,height:X})}this.image=w,this.iconPositions=s,this.patternPositions=c}addImages(t,i,s){for(const c in t){const d=t[c],m={x:0,y:0,w:d.data.width+2*Ui,h:d.data.height+2*Ui};s.push(m),i[c]=new Jp(m,d),d.hasRenderCallback&&this.haveRenderCallbacks.push(c)}}patchUpdatedImages(t,i){t.dispatchRenderCallbacks(this.haveRenderCallbacks);for(const s in t.updatedImages)this.patchUpdatedImage(this.iconPositions[s],t.getImage(s),i),this.patchUpdatedImage(this.patternPositions[s],t.getImage(s),i)}patchUpdatedImage(t,i,s){if(!t||!i||t.version===i.version)return;t.version=i.version;const[c,d]=t.tl;s.update(i.data,void 0,{x:c,y:d})}}var Xo;vt("ImagePosition",Jp),vt("ImageAtlas",Cg),x.al=void 0,(Xo=x.al||(x.al={}))[Xo.none=0]="none",Xo[Xo.horizontal=1]="horizontal",Xo[Xo.vertical=2]="vertical",Xo[Xo.horizontalOnly=3]="horizontalOnly";const hh=-17;class fc{constructor(){this.scale=1,this.fontStack="",this.imageName=null,this.verticalAlign="bottom"}static forText(t,i,s){const c=new fc;return c.scale=t||1,c.fontStack=i,c.verticalAlign=s||"bottom",c}static forImage(t,i){const s=new fc;return s.imageName=t,s.verticalAlign=i||"bottom",s}}class Ga{constructor(){this.text="",this.sectionIndex=[],this.sections=[],this.imageSectionID=null}static fromFeature(t,i){const s=new Ga;for(let c=0;c<t.sections.length;c++){const d=t.sections[c];d.image?s.addImageSection(d):s.addTextSection(d,i)}return s}length(){return this.text.length}getSection(t){return this.sections[this.sectionIndex[t]]}getSectionIndex(t){return this.sectionIndex[t]}getCharCode(t){return this.text.charCodeAt(t)}verticalizePunctuation(){this.text=function(t){let i="";for(let s=0;s<t.length;s++){const c=t.charCodeAt(s+1)||null,d=t.charCodeAt(s-1)||null;i+=c&&Rs(c)&&!dc[t[s+1]]||d&&Rs(d)&&!dc[t[s-1]]||!dc[t[s]]?t[s]:dc[t[s]]}return i}(this.text)}trim(){let t=0;for(let s=0;s<this.text.length&&dh[this.text.charCodeAt(s)];s++)t++;let i=this.text.length;for(let s=this.text.length-1;s>=0&&s>=t&&dh[this.text.charCodeAt(s)];s--)i--;this.text=this.text.substring(t,i),this.sectionIndex=this.sectionIndex.slice(t,i)}substring(t,i){const s=new Ga;return s.text=this.text.substring(t,i),s.sectionIndex=this.sectionIndex.slice(t,i),s.sections=this.sections,s}toString(){return this.text}getMaxScale(){return this.sectionIndex.reduce((t,i)=>Math.max(t,this.sections[i].scale),0)}getMaxImageSize(t){let i=0,s=0;for(let c=0;c<this.length();c++){const d=this.getSection(c);if(d.imageName){const m=t[d.imageName];if(!m)continue;const y=m.displaySize;i=Math.max(i,y[0]),s=Math.max(s,y[1])}}return{maxImageWidth:i,maxImageHeight:s}}addTextSection(t,i){this.text+=t.text,this.sections.push(fc.forText(t.scale,t.fontStack||i,t.verticalAlign));const s=this.sections.length-1;for(let c=0;c<t.text.length;++c)this.sectionIndex.push(s)}addImageSection(t){const i=t.image?t.image.name:"";if(i.length===0)return void bt("Can't add FormattedSection with an empty image.");const s=this.getNextImageSectionCharCode();s?(this.text+=String.fromCharCode(s),this.sections.push(fc.forImage(i,t.verticalAlign)),this.sectionIndex.push(this.sections.length-1)):bt("Reached maximum number of images 6401")}getNextImageSectionCharCode(){return this.imageSectionID?this.imageSectionID>=63743?null:++this.imageSectionID:(this.imageSectionID=57344,this.imageSectionID)}}function ph(n,t,i,s,c,d,m,y,w,E,R,V,q,j,W){const X=Ga.fromFeature(n,c);let re;V===x.al.vertical&&X.verticalizePunctuation();const{processBidirectionalText:ae,processStyledBidirectionalText:Se}=Nn;if(ae&&X.sections.length===1){re=[];const Y=ae(X.toString(),Xp(X,E,d,t,s,j));for(const ge of Y){const Re=new Ga;Re.text=ge,Re.sections=X.sections;for(let $e=0;$e<ge.length;$e++)Re.sectionIndex.push(0);re.push(Re)}}else if(Se){re=[];const Y=Se(X.text,X.sectionIndex,Xp(X,E,d,t,s,j));for(const ge of Y){const Re=new Ga;Re.text=ge[0],Re.sectionIndex=ge[1],Re.sections=X.sections,re.push(Re)}}else re=function(Y,ge){const Re=[],$e=Y.text;let Oe=0;for(const He of ge)Re.push(Y.substring(Oe,He)),Oe=He;return Oe<$e.length&&Re.push(Y.substring(Oe,$e.length)),Re}(X,Xp(X,E,d,t,s,j));const fe=[],U={positionedLines:fe,text:X.toString(),top:R[1],bottom:R[1],left:R[0],right:R[0],writingMode:V,iconsInText:!1,verticalizable:!1};return function(Y,ge,Re,$e,Oe,He,ot,et,at,Ze,St,Lt){let Pt=0,Tt=0,rr=0,Ur=0;const ri=et==="right"?1:et==="left"?0:.5,Ci=ti/Lt;let mn=0;for(const Fr of Oe){Fr.trim();const ui=Fr.getMaxScale(),vi={positionedGlyphs:[],lineOffset:0};Y.positionedLines[mn]=vi;const wi=vi.positionedGlyphs;let zi=0;if(!Fr.length()){Tt+=He,++mn;continue}const gn=nS($e,Fr,Ci);for(let Hi=0;Hi<Fr.length();Hi++){const ii=Fr.getSection(Hi),pi=Fr.getSectionIndex(Hi),di=Fr.getCharCode(Hi),Qr=oS(at,St,di);let Pr;if(ii.imageName){if(Y.iconsInText=!0,ii.scale=ii.scale*Ci,Pr=aS(ii,Qr,ui,gn,$e),!Pr)continue;zi=Math.max(zi,Pr.imageOffset)}else if(Pr=sS(ii,di,Qr,gn,ge,Re),!Pr)continue;const{rect:jn,metrics:Ya,baselineOffset:Hn}=Pr;wi.push({glyph:di,imageName:ii.imageName,x:Pt,y:Tt+Hn+hh,vertical:Qr,scale:ii.scale,fontStack:ii.fontStack,sectionIndex:pi,metrics:Ya,rect:jn}),Qr?(Y.verticalizable=!0,Pt+=(ii.imageName?Ya.advance:ti)*ii.scale+Ze):Pt+=Ya.advance*ii.scale+Ze}wi.length!==0&&(rr=Math.max(Pt-Ze,rr),lS(wi,0,wi.length-1,ri)),Pt=0,vi.lineOffset=Math.max(zi,(ui-1)*ti);const hi=He*ui+zi;Tt+=hi,Ur=Math.max(hi,Ur),++mn}const{horizontalAlign:ji,verticalAlign:bi}=Qp(ot);(function(Fr,ui,vi,wi,zi,gn,hi,Hi,ii){const pi=(ui-vi)*zi;let di=0;di=gn!==hi?-Hi*wi-hh:-wi*ii*hi+.5*hi;for(const Qr of Fr)for(const Pr of Qr.positionedGlyphs)Pr.x+=pi,Pr.y+=di})(Y.positionedLines,ri,ji,bi,rr,Ur,He,Tt,Oe.length),Y.top+=-bi*Tt,Y.bottom=Y.top+Tt,Y.left+=-ji*rr,Y.right=Y.left+rr}(U,t,i,s,re,m,y,w,V,E,q,W),!function(Y){for(const ge of Y)if(ge.positionedGlyphs.length!==0)return!1;return!0}(fe)&&U}const dh={9:!0,10:!0,11:!0,12:!0,13:!0,32:!0},tS={10:!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},rS={40:!0};function Eg(n,t,i,s,c,d){if(t.imageName){const m=s[t.imageName];return m?m.displaySize[0]*t.scale*ti/d+c:0}{const m=i[t.fontStack],y=m&&m[n];return y?y.metrics.advance*t.scale+c:0}}function Pg(n,t,i,s){const c=Math.pow(n-t,2);return s?n<t?c/2:2*c:c+Math.abs(i)*i}function iS(n,t,i){let s=0;return n===10&&(s-=1e4),i&&(s+=150),n!==40&&n!==65288||(s+=50),t!==41&&t!==65289||(s+=50),s}function Ig(n,t,i,s,c,d){let m=null,y=Pg(t,i,c,d);for(const w of s){const E=Pg(t-w.x,i,c,d)+w.badness;E<=y&&(m=w,y=E)}return{index:n,x:t,priorBreak:m,badness:y}}function Mg(n){return n?Mg(n.priorBreak).concat(n.index):[]}function Xp(n,t,i,s,c,d){if(!n)return[];const m=[],y=function(V,q,j,W,X,re){let ae=0;for(let Se=0;Se<V.length();Se++){const fe=V.getSection(Se);ae+=Eg(V.getCharCode(Se),fe,W,X,q,re)}return ae/Math.max(1,Math.ceil(ae/j))}(n,t,i,s,c,d),w=n.text.indexOf("")>=0;let E=0;for(let V=0;V<n.length();V++){const q=n.getSection(V),j=n.getCharCode(V);if(dh[j]||(E+=Eg(j,q,s,c,t,d)),V<n.length()-1){const W=!((R=j)<11904)&&(!!er["CJK Compatibility Forms"](R)||!!er["CJK Compatibility"](R)||!!er["CJK Strokes"](R)||!!er["CJK Symbols and Punctuation"](R)||!!er["Enclosed CJK Letters and Months"](R)||!!er["Halfwidth and Fullwidth Forms"](R)||!!er["Ideographic Description Characters"](R)||!!er["Vertical Forms"](R)||Zl.test(String.fromCodePoint(R)));(tS[j]||W||q.imageName||V!==n.length()-2&&rS[n.getCharCode(V+1)])&&m.push(Ig(V+1,E,y,m,iS(j,n.getCharCode(V+1),W&&w),!1))}}var R;return Mg(Ig(n.length(),E,y,m,0,!0))}function Qp(n){let t=.5,i=.5;switch(n){case"right":case"top-right":case"bottom-right":t=1;break;case"left":case"top-left":case"bottom-left":t=0}switch(n){case"bottom":case"bottom-right":case"bottom-left":i=1;break;case"top":case"top-right":case"top-left":i=0}return{horizontalAlign:t,verticalAlign:i}}function nS(n,t,i){const s=t.getMaxScale()*ti,{maxImageWidth:c,maxImageHeight:d}=t.getMaxImageSize(n),m=Math.max(s,d*i);return{verticalLineContentWidth:Math.max(s,c*i),horizontalLineContentHeight:m}}function Lg(n){switch(n){case"top":return 0;case"center":return .5;default:return 1}}function oS(n,t,i){return!(n===x.al.horizontal||!t&&!Na(i)||t&&(dh[i]||(s=i,new RegExp("\\p{sc=Arab}","u").test(String.fromCodePoint(s)))));var s}function sS(n,t,i,s,c,d){const m=d[n.fontStack],y=function(E,R,V,q){if(E&&E.rect)return E;const j=R[V.fontStack],W=j&&j[q];return W?{rect:null,metrics:W.metrics}:null}(m&&m[t],c,n,t);if(y===null)return null;let w;if(i)w=s.verticalLineContentWidth-n.scale*ti;else{const E=Lg(n.verticalAlign);w=(s.horizontalLineContentHeight-n.scale*ti)*E}return{rect:y.rect,metrics:y.metrics,baselineOffset:w}}function aS(n,t,i,s,c){const d=c[n.imageName];if(!d)return null;const m=d.paddedRect,y=d.displaySize,w={width:y[0],height:y[1],left:Ui,top:-3,advance:t?y[1]:y[0]};let E;if(t)E=s.verticalLineContentWidth-y[1]*n.scale;else{const R=Lg(n.verticalAlign);E=(s.horizontalLineContentHeight-y[1]*n.scale)*R}return{rect:m,metrics:w,baselineOffset:E,imageOffset:(t?y[0]:y[1])*n.scale-ti*i}}function lS(n,t,i,s){if(s===0)return;const c=n[i],d=(n[i].x+c.metrics.advance*c.scale)*s;for(let m=t;m<=i;m++)n[m].x-=d}function cS(n,t,i){const{horizontalAlign:s,verticalAlign:c}=Qp(i),d=t[0]-n.displaySize[0]*s,m=t[1]-n.displaySize[1]*c;return{image:n,top:m,bottom:m+n.displaySize[1],left:d,right:d+n.displaySize[0]}}function Rg(n){var t,i;let s=n.left,c=n.top,d=n.right-s,m=n.bottom-c;const y=(t=n.image.textFitWidth)!==null&&t!==void 0?t:"stretchOrShrink",w=(i=n.image.textFitHeight)!==null&&i!==void 0?i:"stretchOrShrink",E=(n.image.content[2]-n.image.content[0])/(n.image.content[3]-n.image.content[1]);if(w==="proportional"){if(y==="stretchOnly"&&d/m<E||y==="proportional"){const R=Math.ceil(m*E);s*=R/d,d=R}}else if(y==="proportional"&&w==="stretchOnly"&&E!==0&&d/m>E){const R=Math.ceil(d/E);c*=R/m,m=R}return{x1:s,y1:c,x2:s+d,y2:c+m}}function Dg(n,t,i,s,c,d){const m=n.image;let y;if(m.content){const re=m.content,ae=m.pixelRatio||1;y=[re[0]/ae,re[1]/ae,m.displaySize[0]-re[2]/ae,m.displaySize[1]-re[3]/ae]}const w=t.left*d,E=t.right*d;let R,V,q,j;i==="width"||i==="both"?(j=c[0]+w-s[3],V=c[0]+E+s[1]):(j=c[0]+(w+E-m.displaySize[0])/2,V=j+m.displaySize[0]);const W=t.top*d,X=t.bottom*d;return i==="height"||i==="both"?(R=c[1]+W-s[0],q=c[1]+X+s[2]):(R=c[1]+(W+X-m.displaySize[1])/2,q=R+m.displaySize[1]),{image:m,top:R,right:V,bottom:q,left:j,collisionPadding:y}}const mc=255,lo=128,Qo=mc*lo;function zg(n,t){const{expression:i}=t;if(i.kind==="constant")return{kind:"constant",layoutSize:i.evaluate(new Cr(n+1))};if(i.kind==="source")return{kind:"source"};{const{zoomStops:s,interpolationType:c}=i;let d=0;for(;d<s.length&&s[d]<=n;)d++;d=Math.max(0,d-1);let m=d;for(;m<s.length&&s[m]<n+1;)m++;m=Math.min(s.length-1,m);const y=s[d],w=s[m];return i.kind==="composite"?{kind:"composite",minZoom:y,maxZoom:w,interpolationType:c}:{kind:"camera",minZoom:y,maxZoom:w,minSize:i.evaluate(new Cr(y)),maxSize:i.evaluate(new Cr(w)),interpolationType:c}}}function Yp(n,t,i){let s="never";const c=n.get(t);return c?s=c:n.get(i)&&(s="always"),s}const uS=uc.VectorTileFeature.types,hS=[{name:"a_fade_opacity",components:1,type:"Uint8",offset:0}];function fh(n,t,i,s,c,d,m,y,w,E,R,V,q){const j=y?Math.min(Qo,Math.round(y[0])):0,W=y?Math.min(Qo,Math.round(y[1])):0;n.emplaceBack(t,i,Math.round(32*s),Math.round(32*c),d,m,(j<<1)+(w?1:0),W,16*E,16*R,256*V,256*q)}function $p(n,t,i){n.emplaceBack(t.x,t.y,i),n.emplaceBack(t.x,t.y,i),n.emplaceBack(t.x,t.y,i),n.emplaceBack(t.x,t.y,i)}function pS(n){for(const t of n.sections)if(Ap(t.text))return!0;return!1}class ed{constructor(t){this.layoutVertexArray=new Br,this.indexArray=new cr,this.programConfigurations=t,this.segments=new ur,this.dynamicLayoutVertexArray=new xr,this.opacityVertexArray=new Vr,this.hasVisibleVertices=!1,this.placedSymbolArray=new _e}isEmpty(){return this.layoutVertexArray.length===0&&this.indexArray.length===0&&this.dynamicLayoutVertexArray.length===0&&this.opacityVertexArray.length===0}upload(t,i,s,c){this.isEmpty()||(s&&(this.layoutVertexBuffer=t.createVertexBuffer(this.layoutVertexArray,W2.members),this.indexBuffer=t.createIndexBuffer(this.indexArray,i),this.dynamicLayoutVertexBuffer=t.createVertexBuffer(this.dynamicLayoutVertexArray,Z2.members,!0),this.opacityVertexBuffer=t.createVertexBuffer(this.opacityVertexArray,hS,!0),this.opacityVertexBuffer.itemSize=1),(s||c)&&this.programConfigurations.upload(t))}destroy(){this.layoutVertexBuffer&&(this.layoutVertexBuffer.destroy(),this.indexBuffer.destroy(),this.programConfigurations.destroy(),this.segments.destroy(),this.dynamicLayoutVertexBuffer.destroy(),this.opacityVertexBuffer.destroy())}}vt("SymbolBuffers",ed);class td{constructor(t,i,s){this.layoutVertexArray=new t,this.layoutAttributes=i,this.indexArray=new s,this.segments=new ur,this.collisionVertexArray=new Ar}upload(t){this.layoutVertexBuffer=t.createVertexBuffer(this.layoutVertexArray,this.layoutAttributes),this.indexBuffer=t.createIndexBuffer(this.indexArray),this.collisionVertexBuffer=t.createVertexBuffer(this.collisionVertexArray,K2.members,!0)}destroy(){this.layoutVertexBuffer&&(this.layoutVertexBuffer.destroy(),this.indexBuffer.destroy(),this.segments.destroy(),this.collisionVertexBuffer.destroy())}}vt("CollisionBuffers",td);class Ja{constructor(t){this.collisionBoxArray=t.collisionBoxArray,this.zoom=t.zoom,this.overscaling=t.overscaling,this.layers=t.layers,this.layerIds=this.layers.map(m=>m.id),this.index=t.index,this.pixelRatio=t.pixelRatio,this.sourceLayerIndex=t.sourceLayerIndex,this.hasPattern=!1,this.hasRTLText=!1,this.sortKeyRanges=[],this.collisionCircleArray=[];const i=this.layers[0]._unevaluatedLayout._values;this.textSizeData=zg(this.zoom,i["text-size"]),this.iconSizeData=zg(this.zoom,i["icon-size"]);const s=this.layers[0].layout,c=s.get("symbol-sort-key"),d=s.get("symbol-z-order");this.canOverlap=Yp(s,"text-overlap","text-allow-overlap")!=="never"||Yp(s,"icon-overlap","icon-allow-overlap")!=="never"||s.get("text-ignore-placement")||s.get("icon-ignore-placement"),this.sortFeaturesByKey=d!=="viewport-y"&&!c.isConstant(),this.sortFeaturesByY=(d==="viewport-y"||d==="auto"&&!this.sortFeaturesByKey)&&this.canOverlap,s.get("symbol-placement")==="point"&&(this.writingModes=s.get("text-writing-mode").map(m=>x.al[m])),this.stateDependentLayerIds=this.layers.filter(m=>m.isStateDependent()).map(m=>m.id),this.sourceID=t.sourceID}createArrays(){this.text=new ed(new ao(this.layers,this.zoom,t=>/^text/.test(t))),this.icon=new ed(new ao(this.layers,this.zoom,t=>/^icon/.test(t))),this.glyphOffsetArray=new ke,this.lineVertexArray=new we,this.symbolInstances=new be,this.textAnchorOffsets=new We}calculateGlyphDependencies(t,i,s,c,d){for(let m=0;m<t.length;m++)if(i[t.charCodeAt(m)]=!0,(s||c)&&d){const y=dc[t.charAt(m)];y&&(i[y.charCodeAt(0)]=!0)}}populate(t,i,s){const c=this.layers[0],d=c.layout,m=d.get("text-font"),y=d.get("text-field"),w=d.get("icon-image"),E=(y.value.kind!=="constant"||y.value.value instanceof ue&&!y.value.value.isEmpty()||y.value.value.toString().length>0)&&(m.value.kind!=="constant"||m.value.value.length>0),R=w.value.kind!=="constant"||!!w.value.value||Object.keys(w.parameters).length>0,V=d.get("symbol-sort-key");if(this.features=[],!E&&!R)return;const q=i.iconDependencies,j=i.glyphDependencies,W=i.availableImages,X=new Cr(this.zoom);for(const{feature:re,id:ae,index:Se,sourceLayerIndex:fe}of t){const U=c._featureFilter.needGeometry,Y=qs(re,U);if(!c._featureFilter.filter(X,Y,s))continue;let ge,Re;if(U||(Y.geometry=Ns(re)),E){const Oe=c.getValueAndResolveTokens("text-field",Y,s,W),He=ue.factory(Oe),ot=this.hasRTLText=this.hasRTLText||pS(He);(!ot||Nn.getRTLTextPluginStatus()==="unavailable"||ot&&Nn.isParsed())&&(ge=J2(He,c,Y))}if(R){const Oe=c.getValueAndResolveTokens("icon-image",Y,s,W);Re=Oe instanceof it?Oe:it.fromString(Oe)}if(!ge&&!Re)continue;const $e=this.sortFeaturesByKey?V.evaluate(Y,{},s):void 0;if(this.features.push({id:ae,text:ge,icon:Re,index:Se,sourceLayerIndex:fe,geometry:Y.geometry,properties:re.properties,type:uS[re.type],sortKey:$e}),Re&&(q[Re.name]=!0),ge){const Oe=m.evaluate(Y,{},s).join(","),He=d.get("text-rotation-alignment")!=="viewport"&&d.get("symbol-placement")!=="point";this.allowVerticalPlacement=this.writingModes&&this.writingModes.indexOf(x.al.vertical)>=0;for(const ot of ge.sections)if(ot.image)q[ot.image.name]=!0;else{const et=Fa(ge.toString()),at=ot.fontStack||Oe,Ze=j[at]=j[at]||{};this.calculateGlyphDependencies(ot.text,Ze,He,this.allowVerticalPlacement,et)}}}d.get("symbol-placement")==="line"&&(this.features=function(re){const ae={},Se={},fe=[];let U=0;function Y(Oe){fe.push(re[Oe]),U++}function ge(Oe,He,ot){const et=Se[Oe];return delete Se[Oe],Se[He]=et,fe[et].geometry[0].pop(),fe[et].geometry[0]=fe[et].geometry[0].concat(ot[0]),et}function Re(Oe,He,ot){const et=ae[He];return delete ae[He],ae[Oe]=et,fe[et].geometry[0].shift(),fe[et].geometry[0]=ot[0].concat(fe[et].geometry[0]),et}function $e(Oe,He,ot){const et=ot?He[0][He[0].length-1]:He[0][0];return`${Oe}:${et.x}:${et.y}`}for(let Oe=0;Oe<re.length;Oe++){const He=re[Oe],ot=He.geometry,et=He.text?He.text.toString():null;if(!et){Y(Oe);continue}const at=$e(et,ot),Ze=$e(et,ot,!0);if(at in Se&&Ze in ae&&Se[at]!==ae[Ze]){const St=Re(at,Ze,ot),Lt=ge(at,Ze,fe[St].geometry);delete ae[at],delete Se[Ze],Se[$e(et,fe[Lt].geometry,!0)]=Lt,fe[St].geometry=null}else at in Se?ge(at,Ze,ot):Ze in ae?Re(at,Ze,ot):(Y(Oe),ae[at]=U-1,Se[Ze]=U-1)}return fe.filter(Oe=>Oe.geometry)}(this.features)),this.sortFeaturesByKey&&this.features.sort((re,ae)=>re.sortKey-ae.sortKey)}update(t,i,s){this.stateDependentLayers.length&&(this.text.programConfigurations.updatePaintArrays(t,i,this.layers,s),this.icon.programConfigurations.updatePaintArrays(t,i,this.layers,s))}isEmpty(){return this.symbolInstances.length===0&&!this.hasRTLText}uploadPending(){return!this.uploaded||this.text.programConfigurations.needsUpload||this.icon.programConfigurations.needsUpload}upload(t){!this.uploaded&&this.hasDebugData()&&(this.textCollisionBox.upload(t),this.iconCollisionBox.upload(t)),this.text.upload(t,this.sortFeaturesByY,!this.uploaded,this.text.programConfigurations.needsUpload),this.icon.upload(t,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(t,i){const s=this.lineVertexArray.length;if(t.segment!==void 0){let c=t.dist(i[t.segment+1]),d=t.dist(i[t.segment]);const m={};for(let y=t.segment+1;y<i.length;y++)m[y]={x:i[y].x,y:i[y].y,tileUnitDistanceFromAnchor:c},y<i.length-1&&(c+=i[y+1].dist(i[y]));for(let y=t.segment||0;y>=0;y--)m[y]={x:i[y].x,y:i[y].y,tileUnitDistanceFromAnchor:d},y>0&&(d+=i[y-1].dist(i[y]));for(let y=0;y<i.length;y++){const w=m[y];this.lineVertexArray.emplaceBack(w.x,w.y,w.tileUnitDistanceFromAnchor)}}return{lineStartIndex:s,lineLength:this.lineVertexArray.length-s}}addSymbols(t,i,s,c,d,m,y,w,E,R,V,q){const j=t.indexArray,W=t.layoutVertexArray,X=t.segments.prepareSegment(4*i.length,W,j,this.canOverlap?m.sortKey:void 0),re=this.glyphOffsetArray.length,ae=X.vertexLength,Se=this.allowVerticalPlacement&&y===x.al.vertical?Math.PI/2:0,fe=m.text&&m.text.sections;for(let U=0;U<i.length;U++){const{tl:Y,tr:ge,bl:Re,br:$e,tex:Oe,pixelOffsetTL:He,pixelOffsetBR:ot,minFontScaleX:et,minFontScaleY:at,glyphOffset:Ze,isSDF:St,sectionIndex:Lt}=i[U],Pt=X.vertexLength,Tt=Ze[1];fh(W,w.x,w.y,Y.x,Tt+Y.y,Oe.x,Oe.y,s,St,He.x,He.y,et,at),fh(W,w.x,w.y,ge.x,Tt+ge.y,Oe.x+Oe.w,Oe.y,s,St,ot.x,He.y,et,at),fh(W,w.x,w.y,Re.x,Tt+Re.y,Oe.x,Oe.y+Oe.h,s,St,He.x,ot.y,et,at),fh(W,w.x,w.y,$e.x,Tt+$e.y,Oe.x+Oe.w,Oe.y+Oe.h,s,St,ot.x,ot.y,et,at),$p(t.dynamicLayoutVertexArray,w,Se),j.emplaceBack(Pt,Pt+2,Pt+1),j.emplaceBack(Pt+1,Pt+2,Pt+3),X.vertexLength+=4,X.primitiveLength+=2,this.glyphOffsetArray.emplaceBack(Ze[0]),U!==i.length-1&&Lt===i[U+1].sectionIndex||t.programConfigurations.populatePaintArrays(W.length,m,m.index,{},q,fe&&fe[Lt])}t.placedSymbolArray.emplaceBack(w.x,w.y,re,this.glyphOffsetArray.length-re,ae,E,R,w.segment,s?s[0]:0,s?s[1]:0,c[0],c[1],y,0,!1,0,V)}_addCollisionDebugVertex(t,i,s,c,d,m){return i.emplaceBack(0,0),t.emplaceBack(s.x,s.y,c,d,Math.round(m.x),Math.round(m.y))}addCollisionDebugVertices(t,i,s,c,d,m,y){const w=d.segments.prepareSegment(4,d.layoutVertexArray,d.indexArray),E=w.vertexLength,R=d.layoutVertexArray,V=d.collisionVertexArray,q=y.anchorX,j=y.anchorY;this._addCollisionDebugVertex(R,V,m,q,j,new T(t,i)),this._addCollisionDebugVertex(R,V,m,q,j,new T(s,i)),this._addCollisionDebugVertex(R,V,m,q,j,new T(s,c)),this._addCollisionDebugVertex(R,V,m,q,j,new T(t,c)),w.vertexLength+=4;const W=d.indexArray;W.emplaceBack(E,E+1),W.emplaceBack(E+1,E+2),W.emplaceBack(E+2,E+3),W.emplaceBack(E+3,E),w.primitiveLength+=4}addDebugCollisionBoxes(t,i,s,c){for(let d=t;d<i;d++){const m=this.collisionBoxArray.get(d);this.addCollisionDebugVertices(m.x1,m.y1,m.x2,m.y2,c?this.textCollisionBox:this.iconCollisionBox,m.anchorPoint,s)}}generateCollisionDebugBuffers(){this.hasDebugData()&&this.destroyDebugData(),this.textCollisionBox=new td(Or,wg.members,ei),this.iconCollisionBox=new td(Or,wg.members,ei);for(let t=0;t<this.symbolInstances.length;t++){const i=this.symbolInstances.get(t);this.addDebugCollisionBoxes(i.textBoxStartIndex,i.textBoxEndIndex,i,!0),this.addDebugCollisionBoxes(i.verticalTextBoxStartIndex,i.verticalTextBoxEndIndex,i,!0),this.addDebugCollisionBoxes(i.iconBoxStartIndex,i.iconBoxEndIndex,i,!1),this.addDebugCollisionBoxes(i.verticalIconBoxStartIndex,i.verticalIconBoxEndIndex,i,!1)}}_deserializeCollisionBoxesForSymbol(t,i,s,c,d,m,y,w,E){const R={};for(let V=i;V<s;V++){const q=t.get(V);R.textBox={x1:q.x1,y1:q.y1,x2:q.x2,y2:q.y2,anchorPointX:q.anchorPointX,anchorPointY:q.anchorPointY},R.textFeatureIndex=q.featureIndex;break}for(let V=c;V<d;V++){const q=t.get(V);R.verticalTextBox={x1:q.x1,y1:q.y1,x2:q.x2,y2:q.y2,anchorPointX:q.anchorPointX,anchorPointY:q.anchorPointY},R.verticalTextFeatureIndex=q.featureIndex;break}for(let V=m;V<y;V++){const q=t.get(V);R.iconBox={x1:q.x1,y1:q.y1,x2:q.x2,y2:q.y2,anchorPointX:q.anchorPointX,anchorPointY:q.anchorPointY},R.iconFeatureIndex=q.featureIndex;break}for(let V=w;V<E;V++){const q=t.get(V);R.verticalIconBox={x1:q.x1,y1:q.y1,x2:q.x2,y2:q.y2,anchorPointX:q.anchorPointX,anchorPointY:q.anchorPointY},R.verticalIconFeatureIndex=q.featureIndex;break}return R}deserializeCollisionBoxes(t){this.collisionArrays=[];for(let i=0;i<this.symbolInstances.length;i++){const s=this.symbolInstances.get(i);this.collisionArrays.push(this._deserializeCollisionBoxesForSymbol(t,s.textBoxStartIndex,s.textBoxEndIndex,s.verticalTextBoxStartIndex,s.verticalTextBoxEndIndex,s.iconBoxStartIndex,s.iconBoxEndIndex,s.verticalIconBoxStartIndex,s.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(t,i){const s=t.placedSymbolArray.get(i),c=s.vertexStartIndex+4*s.numGlyphs;for(let d=s.vertexStartIndex;d<c;d+=4)t.indexArray.emplaceBack(d,d+2,d+1),t.indexArray.emplaceBack(d+1,d+2,d+3)}getSortedSymbolIndexes(t){if(this.sortedAngle===t&&this.symbolInstanceIndexes!==void 0)return this.symbolInstanceIndexes;const i=Math.sin(t),s=Math.cos(t),c=[],d=[],m=[];for(let y=0;y<this.symbolInstances.length;++y){m.push(y);const w=this.symbolInstances.get(y);c.push(0|Math.round(i*w.anchorX+s*w.anchorY)),d.push(w.featureIndex)}return m.sort((y,w)=>c[y]-c[w]||d[w]-d[y]),m}addToSortKeyRanges(t,i){const s=this.sortKeyRanges[this.sortKeyRanges.length-1];s&&s.sortKey===i?s.symbolInstanceEnd=t+1:this.sortKeyRanges.push({sortKey:i,symbolInstanceStart:t,symbolInstanceEnd:t+1})}sortFeatures(t){if(this.sortFeaturesByY&&this.sortedAngle!==t&&!(this.text.segments.get().length>1||this.icon.segments.get().length>1)){this.symbolInstanceIndexes=this.getSortedSymbolIndexes(t),this.sortedAngle=t,this.text.indexArray.clear(),this.icon.indexArray.clear(),this.featureSortOrder=[];for(const i of this.symbolInstanceIndexes){const s=this.symbolInstances.get(i);this.featureSortOrder.push(s.featureIndex),[s.rightJustifiedTextSymbolIndex,s.centerJustifiedTextSymbolIndex,s.leftJustifiedTextSymbolIndex].forEach((c,d,m)=>{c>=0&&m.indexOf(c)===d&&this.addIndicesForPlacedSymbol(this.text,c)}),s.verticalPlacedTextSymbolIndex>=0&&this.addIndicesForPlacedSymbol(this.text,s.verticalPlacedTextSymbolIndex),s.placedIconSymbolIndex>=0&&this.addIndicesForPlacedSymbol(this.icon,s.placedIconSymbolIndex),s.verticalPlacedIconSymbolIndex>=0&&this.addIndicesForPlacedSymbol(this.icon,s.verticalPlacedIconSymbolIndex)}this.text.indexBuffer&&this.text.indexBuffer.updateData(this.text.indexArray),this.icon.indexBuffer&&this.icon.indexBuffer.updateData(this.icon.indexArray)}}}let Bg,Vg;vt("SymbolBucket",Ja,{omit:["layers","collisionBoxArray","features","compareText"]}),Ja.MAX_GLYPHS=65535,Ja.addDynamicAttributes=$p;var rd={get paint(){return Vg=Vg||new Gr({"icon-opacity":new zt($.paint_symbol["icon-opacity"]),"icon-color":new zt($.paint_symbol["icon-color"]),"icon-halo-color":new zt($.paint_symbol["icon-halo-color"]),"icon-halo-width":new zt($.paint_symbol["icon-halo-width"]),"icon-halo-blur":new zt($.paint_symbol["icon-halo-blur"]),"icon-translate":new Ct($.paint_symbol["icon-translate"]),"icon-translate-anchor":new Ct($.paint_symbol["icon-translate-anchor"]),"text-opacity":new zt($.paint_symbol["text-opacity"]),"text-color":new zt($.paint_symbol["text-color"],{runtimeType:Tr,getOverride:n=>n.textColor,hasOverride:n=>!!n.textColor}),"text-halo-color":new zt($.paint_symbol["text-halo-color"]),"text-halo-width":new zt($.paint_symbol["text-halo-width"]),"text-halo-blur":new zt($.paint_symbol["text-halo-blur"]),"text-translate":new Ct($.paint_symbol["text-translate"]),"text-translate-anchor":new Ct($.paint_symbol["text-translate-anchor"])})},get layout(){return Bg=Bg||new Gr({"symbol-placement":new Ct($.layout_symbol["symbol-placement"]),"symbol-spacing":new Ct($.layout_symbol["symbol-spacing"]),"symbol-avoid-edges":new Ct($.layout_symbol["symbol-avoid-edges"]),"symbol-sort-key":new zt($.layout_symbol["symbol-sort-key"]),"symbol-z-order":new Ct($.layout_symbol["symbol-z-order"]),"icon-allow-overlap":new Ct($.layout_symbol["icon-allow-overlap"]),"icon-overlap":new Ct($.layout_symbol["icon-overlap"]),"icon-ignore-placement":new Ct($.layout_symbol["icon-ignore-placement"]),"icon-optional":new Ct($.layout_symbol["icon-optional"]),"icon-rotation-alignment":new Ct($.layout_symbol["icon-rotation-alignment"]),"icon-size":new zt($.layout_symbol["icon-size"]),"icon-text-fit":new Ct($.layout_symbol["icon-text-fit"]),"icon-text-fit-padding":new Ct($.layout_symbol["icon-text-fit-padding"]),"icon-image":new zt($.layout_symbol["icon-image"]),"icon-rotate":new zt($.layout_symbol["icon-rotate"]),"icon-padding":new zt($.layout_symbol["icon-padding"]),"icon-keep-upright":new Ct($.layout_symbol["icon-keep-upright"]),"icon-offset":new zt($.layout_symbol["icon-offset"]),"icon-anchor":new zt($.layout_symbol["icon-anchor"]),"icon-pitch-alignment":new Ct($.layout_symbol["icon-pitch-alignment"]),"text-pitch-alignment":new Ct($.layout_symbol["text-pitch-alignment"]),"text-rotation-alignment":new Ct($.layout_symbol["text-rotation-alignment"]),"text-field":new zt($.layout_symbol["text-field"]),"text-font":new zt($.layout_symbol["text-font"]),"text-size":new zt($.layout_symbol["text-size"]),"text-max-width":new zt($.layout_symbol["text-max-width"]),"text-line-height":new Ct($.layout_symbol["text-line-height"]),"text-letter-spacing":new zt($.layout_symbol["text-letter-spacing"]),"text-justify":new zt($.layout_symbol["text-justify"]),"text-radial-offset":new zt($.layout_symbol["text-radial-offset"]),"text-variable-anchor":new Ct($.layout_symbol["text-variable-anchor"]),"text-variable-anchor-offset":new zt($.layout_symbol["text-variable-anchor-offset"]),"text-anchor":new zt($.layout_symbol["text-anchor"]),"text-max-angle":new Ct($.layout_symbol["text-max-angle"]),"text-writing-mode":new Ct($.layout_symbol["text-writing-mode"]),"text-rotate":new zt($.layout_symbol["text-rotate"]),"text-padding":new Ct($.layout_symbol["text-padding"]),"text-keep-upright":new Ct($.layout_symbol["text-keep-upright"]),"text-transform":new zt($.layout_symbol["text-transform"]),"text-offset":new zt($.layout_symbol["text-offset"]),"text-allow-overlap":new Ct($.layout_symbol["text-allow-overlap"]),"text-overlap":new Ct($.layout_symbol["text-overlap"]),"text-ignore-placement":new Ct($.layout_symbol["text-ignore-placement"]),"text-optional":new Ct($.layout_symbol["text-optional"])})}};class Og{constructor(t){if(t.property.overrides===void 0)throw new Error("overrides must be provided to instantiate FormatSectionOverride class");this.type=t.property.overrides?t.property.overrides.runtimeType:Dt,this.defaultValue=t}evaluate(t){if(t.formattedSection){const i=this.defaultValue.property.overrides;if(i&&i.hasOverride(t.formattedSection))return i.getOverride(t.formattedSection)}return t.feature&&t.featureState?this.defaultValue.evaluate(t.feature,t.featureState):this.defaultValue.property.specification.default}eachChild(t){this.defaultValue.isConstant()||t(this.defaultValue.value._styleExpression.expression)}outputDefined(){return!1}serialize(){return null}}vt("FormatSectionOverride",Og,{omit:["defaultValue"]});class mh extends tn{constructor(t){super(t,rd)}recalculate(t,i){if(super.recalculate(t,i),this.layout.get("icon-rotation-alignment")==="auto"&&(this.layout._values["icon-rotation-alignment"]=this.layout.get("symbol-placement")!=="point"?"map":"viewport"),this.layout.get("text-rotation-alignment")==="auto"&&(this.layout._values["text-rotation-alignment"]=this.layout.get("symbol-placement")!=="point"?"map":"viewport"),this.layout.get("text-pitch-alignment")==="auto"&&(this.layout._values["text-pitch-alignment"]=this.layout.get("text-rotation-alignment")==="map"?"map":"viewport"),this.layout.get("icon-pitch-alignment")==="auto"&&(this.layout._values["icon-pitch-alignment"]=this.layout.get("icon-rotation-alignment")),this.layout.get("symbol-placement")==="point"){const s=this.layout.get("text-writing-mode");if(s){const c=[];for(const d of s)c.indexOf(d)<0&&c.push(d);this.layout._values["text-writing-mode"]=c}else this.layout._values["text-writing-mode"]=["horizontal"]}this._setPaintOverrides()}getValueAndResolveTokens(t,i,s,c){const d=this.layout.get(t).evaluate(i,{},s,c),m=this._unevaluatedLayout._values[t];return m.isDataDriven()||As(m.value)||!d?d:function(y,w){return w.replace(/{([^{}]+)}/g,(E,R)=>y&&R in y?String(y[R]):"")}(i.properties,d)}createBucket(t){return new Ja(t)}queryRadius(){return 0}queryIntersectsFeature(){throw new Error("Should take a different path in FeatureIndex")}_setPaintOverrides(){for(const t of rd.paint.overridableProperties){if(!mh.hasPaintOverride(this.layout,t))continue;const i=this.paint.get(t),s=new Og(i),c=new Ca(s,i.property.specification);let d=null;d=i.value.kind==="constant"||i.value.kind==="source"?new Ll("source",c):new Pa("composite",c,i.value.zoomStops),this.paint._values[t]=new Ei(i.property,d,i.parameters)}}_handleOverridablePaintPropertyUpdate(t,i,s){return!(!this.layout||i.isDataDriven()||s.isDataDriven())&&mh.hasPaintOverride(this.layout,t)}static hasPaintOverride(t,i){const s=t.get("text-field"),c=rd.paint.properties[i];let d=!1;const m=y=>{for(const w of y)if(c.overrides&&c.overrides.hasOverride(w))return void(d=!0)};if(s.value.kind==="constant"&&s.value.value instanceof ue)m(s.value.value.sections);else if(s.value.kind==="source"){const y=E=>{d||(E instanceof nt&&ft(E.value)===mo?m(E.value.sections):E instanceof ha?m(E.sections):E.eachChild(y))},w=s.value;w._styleExpression&&y(w._styleExpression.expression)}return d}}let Fg;var dS={get paint(){return Fg=Fg||new Gr({"background-color":new Ct($.paint_background["background-color"]),"background-pattern":new Gl($.paint_background["background-pattern"]),"background-opacity":new Ct($.paint_background["background-opacity"])})}};class fS extends tn{constructor(t){super(t,dS)}}let Ng;var mS={get paint(){return Ng=Ng||new Gr({"raster-opacity":new Ct($.paint_raster["raster-opacity"]),"raster-hue-rotate":new Ct($.paint_raster["raster-hue-rotate"]),"raster-brightness-min":new Ct($.paint_raster["raster-brightness-min"]),"raster-brightness-max":new Ct($.paint_raster["raster-brightness-max"]),"raster-saturation":new Ct($.paint_raster["raster-saturation"]),"raster-contrast":new Ct($.paint_raster["raster-contrast"]),"raster-resampling":new Ct($.paint_raster["raster-resampling"]),"raster-fade-duration":new Ct($.paint_raster["raster-fade-duration"])})}};class gS extends tn{constructor(t){super(t,mS)}}class yS extends tn{constructor(t){super(t,{}),this.onAdd=i=>{this.implementation.onAdd&&this.implementation.onAdd(i,i.painter.context.gl)},this.onRemove=i=>{this.implementation.onRemove&&this.implementation.onRemove(i,i.painter.context.gl)},this.implementation=t}is3D(){return this.implementation.renderingMode==="3d"}hasOffscreenPass(){return this.implementation.prerender!==void 0}recalculate(){}updateTransitions(){}hasTransition(){return!1}serialize(){throw new Error("Custom layers cannot be serialized")}}class _S{constructor(t){this._methodToThrottle=t,this._triggered=!1,typeof MessageChannel<"u"&&(this._channel=new MessageChannel,this._channel.port2.onmessage=()=>{this._triggered=!1,this._methodToThrottle()})}trigger(){this._triggered||(this._triggered=!0,this._channel?this._channel.port1.postMessage(!0):setTimeout(()=>{this._triggered=!1,this._methodToThrottle()},0))}remove(){delete this._channel,this._methodToThrottle=()=>{}}}const xS={once:!0},id=63710088e-1;class Yo{constructor(t,i){if(isNaN(t)||isNaN(i))throw new Error(`Invalid LngLat object: (${t}, ${i})`);if(this.lng=+t,this.lat=+i,this.lat>90||this.lat<-90)throw new Error("Invalid LngLat latitude value: must be between -90 and 90")}wrap(){return new Yo(Qi(this.lng,-180,180),this.lat)}toArray(){return[this.lng,this.lat]}toString(){return`LngLat(${this.lng}, ${this.lat})`}distanceTo(t){const i=Math.PI/180,s=this.lat*i,c=t.lat*i,d=Math.sin(s)*Math.sin(c)+Math.cos(s)*Math.cos(c)*Math.cos((t.lng-this.lng)*i);return id*Math.acos(Math.min(d,1))}static convert(t){if(t instanceof Yo)return t;if(Array.isArray(t)&&(t.length===2||t.length===3))return new Yo(Number(t[0]),Number(t[1]));if(!Array.isArray(t)&&typeof t=="object"&&t!==null)return new Yo(Number("lng"in t?t.lng:t.lon),Number(t.lat));throw new 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>]")}}const qg=2*Math.PI*id;function Ug(n){return qg*Math.cos(n*Math.PI/180)}function jg(n){return(180+n)/360}function Hg(n){return(180-180/Math.PI*Math.log(Math.tan(Math.PI/4+n*Math.PI/360)))/360}function Wg(n,t){return n/Ug(t)}function nd(n){return 360/Math.PI*Math.atan(Math.exp((180-360*n)*Math.PI/180))-90}function Zg(n,t){return n*Ug(nd(t))}class gc{constructor(t,i,s=0){this.x=+t,this.y=+i,this.z=+s}static fromLngLat(t,i=0){const s=Yo.convert(t);return new gc(jg(s.lng),Hg(s.lat),Wg(i,s.lat))}toLngLat(){return new Yo(360*this.x-180,nd(this.y))}toAltitude(){return Zg(this.z,this.y)}meterInMercatorCoordinateUnits(){return 1/qg*(t=nd(this.y),1/Math.cos(t*Math.PI/180));var t}}function Kg(n,t,i){var s=2*Math.PI*6378137/256/Math.pow(2,i);return[n*s-2*Math.PI*6378137/2,t*s-2*Math.PI*6378137/2]}class od{constructor(t,i,s){if(!function(c,d,m){return!(c<0||c>25||m<0||m>=Math.pow(2,c)||d<0||d>=Math.pow(2,c))}(t,i,s))throw new Error(`x=${i}, y=${s}, z=${t} outside of bounds. 0<=x<${Math.pow(2,t)}, 0<=y<${Math.pow(2,t)} 0<=z<=25 `);this.z=t,this.x=i,this.y=s,this.key=Xa(0,t,t,i,s)}equals(t){return this.z===t.z&&this.x===t.x&&this.y===t.y}url(t,i,s){const c=(m=this.y,y=this.z,w=Kg(256*(d=this.x),256*(m=Math.pow(2,y)-m-1),y),E=Kg(256*(d+1),256*(m+1),y),w[0]+","+w[1]+","+E[0]+","+E[1]);var d,m,y,w,E;const R=function(V,q,j){let W,X="";for(let re=V;re>0;re--)W=1<<re-1,X+=(q&W?1:0)+(j&W?2:0);return X}(this.z,this.x,this.y);return t[(this.x+this.y)%t.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}/g,String(s==="tms"?Math.pow(2,this.z)-this.y-1:this.y)).replace(/{ratio}/g,i>1?"@2x":"").replace(/{quadkey}/g,R).replace(/{bbox-epsg-3857}/g,c)}isChildOf(t){const i=this.z-t.z;return i>0&&t.x===this.x>>i&&t.y===this.y>>i}getTilePoint(t){const i=Math.pow(2,this.z);return new T((t.x*i-this.x)*ir,(t.y*i-this.y)*ir)}toString(){return`${this.z}/${this.x}/${this.y}`}}class Gg{constructor(t,i){this.wrap=t,this.canonical=i,this.key=Xa(t,i.z,i.z,i.x,i.y)}}class fn{constructor(t,i,s,c,d){if(this.terrainRttPosMatrix32f=null,t<s)throw new Error(`overscaledZ should be >= z; overscaledZ = ${t}; z = ${s}`);this.overscaledZ=t,this.wrap=i,this.canonical=new od(s,+c,+d),this.key=Xa(i,t,s,c,d)}clone(){return new fn(this.overscaledZ,this.wrap,this.canonical.z,this.canonical.x,this.canonical.y)}equals(t){return this.overscaledZ===t.overscaledZ&&this.wrap===t.wrap&&this.canonical.equals(t.canonical)}scaledTo(t){if(t>this.overscaledZ)throw new Error(`targetZ > this.overscaledZ; targetZ = ${t}; overscaledZ = ${this.overscaledZ}`);const i=this.canonical.z-t;return t>this.canonical.z?new fn(t,this.wrap,this.canonical.z,this.canonical.x,this.canonical.y):new fn(t,this.wrap,t,this.canonical.x>>i,this.canonical.y>>i)}calculateScaledKey(t,i){if(t>this.overscaledZ)throw new Error(`targetZ > this.overscaledZ; targetZ = ${t}; overscaledZ = ${this.overscaledZ}`);const s=this.canonical.z-t;return t>this.canonical.z?Xa(this.wrap*+i,t,this.canonical.z,this.canonical.x,this.canonical.y):Xa(this.wrap*+i,t,t,this.canonical.x>>s,this.canonical.y>>s)}isChildOf(t){if(t.wrap!==this.wrap)return!1;const i=this.canonical.z-t.canonical.z;return t.overscaledZ===0||t.overscaledZ<this.overscaledZ&&t.canonical.x===this.canonical.x>>i&&t.canonical.y===this.canonical.y>>i}children(t){if(this.overscaledZ>=t)return[new fn(this.overscaledZ+1,this.wrap,this.canonical.z,this.canonical.x,this.canonical.y)];const i=this.canonical.z+1,s=2*this.canonical.x,c=2*this.canonical.y;return[new fn(i,this.wrap,i,s,c),new fn(i,this.wrap,i,s+1,c),new fn(i,this.wrap,i,s,c+1),new fn(i,this.wrap,i,s+1,c+1)]}isLessThan(t){return this.wrap<t.wrap||!(this.wrap>t.wrap)&&(this.overscaledZ<t.overscaledZ||!(this.overscaledZ>t.overscaledZ)&&(this.canonical.x<t.canonical.x||!(this.canonical.x>t.canonical.x)&&this.canonical.y<t.canonical.y))}wrapped(){return new fn(this.overscaledZ,0,this.canonical.z,this.canonical.x,this.canonical.y)}unwrapTo(t){return new fn(this.overscaledZ,t,this.canonical.z,this.canonical.x,this.canonical.y)}overscaleFactor(){return Math.pow(2,this.overscaledZ-this.canonical.z)}toUnwrapped(){return new Gg(this.wrap,this.canonical)}toString(){return`${this.overscaledZ}/${this.canonical.x}/${this.canonical.y}`}getTilePoint(t){return this.canonical.getTilePoint(new gc(t.x-this.wrap,t.y))}}function Xa(n,t,i,s,c){(n*=2)<0&&(n=-1*n-1);const d=1<<i;return(d*d*n+d*c+s).toString(36)+i.toString(36)+t.toString(36)}vt("CanonicalTileID",od),vt("OverscaledTileID",fn,{omit:["terrainRttPosMatrix32f"]});class Jg{constructor(t,i,s,c=1,d=1,m=1,y=0){if(this.uid=t,i.height!==i.width)throw new RangeError("DEM tiles must be square");if(s&&!["mapbox","terrarium","custom"].includes(s))return void bt(`"${s}" is not a valid encoding type. Valid types include "mapbox", "terrarium" and "custom".`);this.stride=i.height;const w=this.dim=i.height-2;switch(this.data=new Uint32Array(i.data.buffer),s){case"terrarium":this.redFactor=256,this.greenFactor=1,this.blueFactor=1/256,this.baseShift=32768;break;case"custom":this.redFactor=c,this.greenFactor=d,this.blueFactor=m,this.baseShift=y;break;default:this.redFactor=6553.6,this.greenFactor=25.6,this.blueFactor=.1,this.baseShift=1e4}for(let E=0;E<w;E++)this.data[this._idx(-1,E)]=this.data[this._idx(0,E)],this.data[this._idx(w,E)]=this.data[this._idx(w-1,E)],this.data[this._idx(E,-1)]=this.data[this._idx(E,0)],this.data[this._idx(E,w)]=this.data[this._idx(E,w-1)];this.data[this._idx(-1,-1)]=this.data[this._idx(0,0)],this.data[this._idx(w,-1)]=this.data[this._idx(w-1,0)],this.data[this._idx(-1,w)]=this.data[this._idx(0,w-1)],this.data[this._idx(w,w)]=this.data[this._idx(w-1,w-1)],this.min=Number.MAX_SAFE_INTEGER,this.max=Number.MIN_SAFE_INTEGER;for(let E=0;E<w;E++)for(let R=0;R<w;R++){const V=this.get(E,R);V>this.max&&(this.max=V),V<this.min&&(this.min=V)}}get(t,i){const s=new Uint8Array(this.data.buffer),c=4*this._idx(t,i);return this.unpack(s[c],s[c+1],s[c+2])}getUnpackVector(){return[this.redFactor,this.greenFactor,this.blueFactor,this.baseShift]}_idx(t,i){if(t<-1||t>=this.dim+1||i<-1||i>=this.dim+1)throw new RangeError("out of range source coordinates for DEM data");return(i+1)*this.stride+(t+1)}unpack(t,i,s){return t*this.redFactor+i*this.greenFactor+s*this.blueFactor-this.baseShift}getPixels(){return new dn({width:this.stride,height:this.stride},new Uint8Array(this.data.buffer))}backfillBorder(t,i,s){if(this.dim!==t.dim)throw new Error("dem dimension mismatch");let c=i*this.dim,d=i*this.dim+this.dim,m=s*this.dim,y=s*this.dim+this.dim;switch(i){case-1:c=d-1;break;case 1:d=c+1}switch(s){case-1:m=y-1;break;case 1:y=m+1}const w=-i*this.dim,E=-s*this.dim;for(let R=m;R<y;R++)for(let V=c;V<d;V++)this.data[this._idx(V,R)]=t.data[this._idx(V+w,R+E)]}}vt("DEMData",Jg);class Xg{constructor(t){this._stringToNumber={},this._numberToString=[];for(let i=0;i<t.length;i++){const s=t[i];this._stringToNumber[s]=i,this._numberToString[i]=s}}encode(t){return this._stringToNumber[t]}decode(t){if(t>=this._numberToString.length)throw new Error(`Out of bounds. Index requested n=${t} can't be >= this._numberToString.length ${this._numberToString.length}`);return this._numberToString[t]}}class Qg{constructor(t,i,s,c,d){this.type="Feature",this._vectorTileFeature=t,t._z=i,t._x=s,t._y=c,this.properties=t.properties,this.id=d}get geometry(){return this._geometry===void 0&&(this._geometry=this._vectorTileFeature.toGeoJSON(this._vectorTileFeature._x,this._vectorTileFeature._y,this._vectorTileFeature._z).geometry),this._geometry}set geometry(t){this._geometry=t}toJSON(){const t={geometry:this.geometry};for(const i in this)i!=="_geometry"&&i!=="_vectorTileFeature"&&(t[i]=this[i]);return t}}class Yg{constructor(t,i){this.tileID=t,this.x=t.canonical.x,this.y=t.canonical.y,this.z=t.canonical.z,this.grid=new Zo(ir,16,0),this.grid3D=new Zo(ir,16,0),this.featureIndexArray=new Ne,this.promoteId=i}insert(t,i,s,c,d,m){const y=this.featureIndexArray.length;this.featureIndexArray.emplaceBack(s,c,d);const w=m?this.grid3D:this.grid;for(let E=0;E<i.length;E++){const R=i[E],V=[1/0,1/0,-1/0,-1/0];for(let q=0;q<R.length;q++){const j=R[q];V[0]=Math.min(V[0],j.x),V[1]=Math.min(V[1],j.y),V[2]=Math.max(V[2],j.x),V[3]=Math.max(V[3],j.y)}V[0]<ir&&V[1]<ir&&V[2]>=0&&V[3]>=0&&w.insert(y,V[0],V[1],V[2],V[3])}}loadVTLayers(){return this.vtLayers||(this.vtLayers=new uc.VectorTile(new Kp(this.rawTileData)).layers,this.sourceLayerCoder=new Xg(this.vtLayers?Object.keys(this.vtLayers).sort():["_geojsonTileLayer"])),this.vtLayers}query(t,i,s,c){this.loadVTLayers();const d=t.params,m=ir/t.tileSize/t.scale,y=Es(d.filter),w=t.queryGeometry,E=t.queryPadding*m,R=ey(w),V=this.grid.query(R.minX-E,R.minY-E,R.maxX+E,R.maxY+E),q=ey(t.cameraQueryGeometry),j=this.grid3D.query(q.minX-E,q.minY-E,q.maxX+E,q.maxY+E,(re,ae,Se,fe)=>function(U,Y,ge,Re,$e){for(const He of U)if(Y<=He.x&&ge<=He.y&&Re>=He.x&&$e>=He.y)return!0;const Oe=[new T(Y,ge),new T(Y,$e),new T(Re,$e),new T(Re,ge)];if(U.length>2){for(const He of Oe)if(Us(U,He))return!0}for(let He=0;He<U.length-1;He++)if(a2(U[He],U[He+1],Oe))return!0;return!1}(t.cameraQueryGeometry,re-E,ae-E,Se+E,fe+E));for(const re of j)V.push(re);V.sort(bS);const W={};let X;for(let re=0;re<V.length;re++){const ae=V[re];if(ae===X)continue;X=ae;const Se=this.featureIndexArray.get(ae);let fe=null;this.loadMatchingFeature(W,Se.bucketIndex,Se.sourceLayerIndex,Se.featureIndex,y,d.layers,d.availableImages,i,s,c,(U,Y,ge)=>(fe||(fe=Ns(U)),Y.queryIntersectsFeature({queryGeometry:w,feature:U,featureState:ge,geometry:fe,zoom:this.z,transform:t.transform,pixelsToTileUnits:m,pixelPosMatrix:t.pixelPosMatrix,unwrappedTileID:this.tileID.toUnwrapped(),getElevation:t.getElevation})))}return W}loadMatchingFeature(t,i,s,c,d,m,y,w,E,R,V){const q=this.bucketLayerIDs[i];if(m&&!q.some(re=>m.has(re)))return;const j=this.sourceLayerCoder.decode(s),W=this.vtLayers[j].feature(c);if(d.needGeometry){const re=qs(W,!0);if(!d.filter(new Cr(this.tileID.overscaledZ),re,this.tileID.canonical))return}else if(!d.filter(new Cr(this.tileID.overscaledZ),W))return;const X=this.getId(W,j);for(let re=0;re<q.length;re++){const ae=q[re];if(m&&!m.has(ae))continue;const Se=w[ae];if(!Se)continue;let fe={};X&&R&&(fe=R.getState(Se.sourceLayer||"_geojsonTileLayer",X));const U=Yr({},E[ae]);U.paint=$g(U.paint,Se.paint,W,fe,y),U.layout=$g(U.layout,Se.layout,W,fe,y);const Y=!V||V(W,Se,fe);if(!Y)continue;const ge=new Qg(W,this.z,this.x,this.y,X);ge.layer=U;let Re=t[ae];Re===void 0&&(Re=t[ae]=[]),Re.push({featureIndex:c,feature:ge,intersectionZ:Y})}}lookupSymbolFeatures(t,i,s,c,d,m,y,w){const E={};this.loadVTLayers();const R=Es(d);for(const V of t)this.loadMatchingFeature(E,s,c,V,R,m,y,w,i);return E}hasLayer(t){for(const i of this.bucketLayerIDs)for(const s of i)if(t===s)return!0;return!1}getId(t,i){var s;let c=t.id;return this.promoteId&&(c=t.properties[typeof this.promoteId=="string"?this.promoteId:this.promoteId[i]],typeof c=="boolean"&&(c=Number(c)),c===void 0&&(!((s=t.properties)===null||s===void 0)&&s.cluster)&&this.promoteId&&(c=Number(t.properties.cluster_id))),c}}function $g(n,t,i,s,c){return Li(n,(d,m)=>{const y=t instanceof Ua?t.get(m):null;return y&&y.evaluate?y.evaluate(i,s,c):y})}function ey(n){let t=1/0,i=1/0,s=-1/0,c=-1/0;for(const d of n)t=Math.min(t,d.x),i=Math.min(i,d.y),s=Math.max(s,d.x),c=Math.max(c,d.y);return{minX:t,minY:i,maxX:s,maxY:c}}function bS(n,t){return t-n}function ty(n,t,i,s,c){const d=[];for(let m=0;m<n.length;m++){const y=n[m];let w;for(let E=0;E<y.length-1;E++){let R=y[E],V=y[E+1];R.x<t&&V.x<t||(R.x<t?R=new T(t,R.y+(t-R.x)/(V.x-R.x)*(V.y-R.y))._round():V.x<t&&(V=new T(t,R.y+(t-R.x)/(V.x-R.x)*(V.y-R.y))._round()),R.y<i&&V.y<i||(R.y<i?R=new T(R.x+(i-R.y)/(V.y-R.y)*(V.x-R.x),i)._round():V.y<i&&(V=new T(R.x+(i-R.y)/(V.y-R.y)*(V.x-R.x),i)._round()),R.x>=s&&V.x>=s||(R.x>=s?R=new T(s,R.y+(s-R.x)/(V.x-R.x)*(V.y-R.y))._round():V.x>=s&&(V=new T(s,R.y+(s-R.x)/(V.x-R.x)*(V.y-R.y))._round()),R.y>=c&&V.y>=c||(R.y>=c?R=new T(R.x+(c-R.y)/(V.y-R.y)*(V.x-R.x),c)._round():V.y>=c&&(V=new T(R.x+(c-R.y)/(V.y-R.y)*(V.x-R.x),c)._round()),w&&R.equals(w[w.length-1])||(w=[R],d.push(w)),w.push(V)))))}}return d}vt("FeatureIndex",Yg,{omit:["rawTileData","sourceLayerCoder"]});class $o extends T{constructor(t,i,s,c){super(t,i),this.angle=s,c!==void 0&&(this.segment=c)}clone(){return new $o(this.x,this.y,this.angle,this.segment)}}function ry(n,t,i,s,c){if(t.segment===void 0||i===0)return!0;let d=t,m=t.segment+1,y=0;for(;y>-i/2;){if(m--,m<0)return!1;y-=n[m].dist(d),d=n[m]}y+=n[m].dist(n[m+1]),m++;const w=[];let E=0;for(;y<i/2;){const R=n[m],V=n[m+1];if(!V)return!1;let q=n[m-1].angleTo(R)-R.angleTo(V);for(q=Math.abs((q+3*Math.PI)%(2*Math.PI)-Math.PI),w.push({distance:y,angleDelta:q}),E+=q;y-w[0].distance>s;)E-=w.shift().angleDelta;if(E>c)return!1;m++,y+=R.dist(V)}return!0}function iy(n){let t=0;for(let i=0;i<n.length-1;i++)t+=n[i].dist(n[i+1]);return t}function ny(n,t,i){return n?.6*t*i:0}function oy(n,t){return Math.max(n?n.right-n.left:0,t?t.right-t.left:0)}function vS(n,t,i,s,c,d){const m=ny(i,c,d),y=oy(i,s)*d;let w=0;const E=iy(n)/2;for(let R=0;R<n.length-1;R++){const V=n[R],q=n[R+1],j=V.dist(q);if(w+j>E){const W=(E-w)/j,X=vn.number(V.x,q.x,W),re=vn.number(V.y,q.y,W),ae=new $o(X,re,q.angleTo(V),R);return ae._round(),!m||ry(n,ae,y,m,t)?ae:void 0}w+=j}}function wS(n,t,i,s,c,d,m,y,w){const E=ny(s,d,m),R=oy(s,c),V=R*m,q=n[0].x===0||n[0].x===w||n[0].y===0||n[0].y===w;return t-V<t/4&&(t=V+t/4),sy(n,q?t/2*y%t:(R/2+2*d)*m*y%t,t,E,i,V,q,!1,w)}function sy(n,t,i,s,c,d,m,y,w){const E=d/2,R=iy(n);let V=0,q=t-i,j=[];for(let W=0;W<n.length-1;W++){const X=n[W],re=n[W+1],ae=X.dist(re),Se=re.angleTo(X);for(;q+i<V+ae;){q+=i;const fe=(q-V)/ae,U=vn.number(X.x,re.x,fe),Y=vn.number(X.y,re.y,fe);if(U>=0&&U<w&&Y>=0&&Y<w&&q-E>=0&&q+E<=R){const ge=new $o(U,Y,Se,W);ge._round(),s&&!ry(n,ge,d,s,c)||j.push(ge)}}V+=ae}return y||j.length||m||(j=sy(n,V/2,i,s,c,d,m,!0,w)),j}vt("Anchor",$o);const yc=Ui;function ay(n,t,i,s){const c=[],d=n.image,m=d.pixelRatio,y=d.paddedRect.w-2*yc,w=d.paddedRect.h-2*yc;let E={x1:n.left,y1:n.top,x2:n.right,y2:n.bottom};const R=d.stretchX||[[0,y]],V=d.stretchY||[[0,w]],q=(Ze,St)=>Ze+St[1]-St[0],j=R.reduce(q,0),W=V.reduce(q,0),X=y-j,re=w-W;let ae=0,Se=j,fe=0,U=W,Y=0,ge=X,Re=0,$e=re;if(d.content&&s){const Ze=d.content,St=Ze[2]-Ze[0],Lt=Ze[3]-Ze[1];(d.textFitWidth||d.textFitHeight)&&(E=Rg(n)),ae=gh(R,0,Ze[0]),fe=gh(V,0,Ze[1]),Se=gh(R,Ze[0],Ze[2]),U=gh(V,Ze[1],Ze[3]),Y=Ze[0]-ae,Re=Ze[1]-fe,ge=St-Se,$e=Lt-U}const Oe=E.x1,He=E.y1,ot=E.x2-Oe,et=E.y2-He,at=(Ze,St,Lt,Pt)=>{const Tt=yh(Ze.stretch-ae,Se,ot,Oe),rr=_h(Ze.fixed-Y,ge,Ze.stretch,j),Ur=yh(St.stretch-fe,U,et,He),ri=_h(St.fixed-Re,$e,St.stretch,W),Ci=yh(Lt.stretch-ae,Se,ot,Oe),mn=_h(Lt.fixed-Y,ge,Lt.stretch,j),ji=yh(Pt.stretch-fe,U,et,He),bi=_h(Pt.fixed-Re,$e,Pt.stretch,W),Fr=new T(Tt,Ur),ui=new T(Ci,Ur),vi=new T(Ci,ji),wi=new T(Tt,ji),zi=new T(rr/m,ri/m),gn=new T(mn/m,bi/m),hi=t*Math.PI/180;if(hi){const pi=Math.sin(hi),di=Math.cos(hi),Qr=[di,-pi,pi,di];Fr._matMult(Qr),ui._matMult(Qr),wi._matMult(Qr),vi._matMult(Qr)}const Hi=Ze.stretch+Ze.fixed,ii=St.stretch+St.fixed;return{tl:Fr,tr:ui,bl:wi,br:vi,tex:{x:d.paddedRect.x+yc+Hi,y:d.paddedRect.y+yc+ii,w:Lt.stretch+Lt.fixed-Hi,h:Pt.stretch+Pt.fixed-ii},writingMode:void 0,glyphOffset:[0,0],sectionIndex:0,pixelOffsetTL:zi,pixelOffsetBR:gn,minFontScaleX:ge/m/ot,minFontScaleY:$e/m/et,isSDF:i}};if(s&&(d.stretchX||d.stretchY)){const Ze=ly(R,X,j),St=ly(V,re,W);for(let Lt=0;Lt<Ze.length-1;Lt++){const Pt=Ze[Lt],Tt=Ze[Lt+1];for(let rr=0;rr<St.length-1;rr++)c.push(at(Pt,St[rr],Tt,St[rr+1]))}}else c.push(at({fixed:0,stretch:-1},{fixed:0,stretch:-1},{fixed:0,stretch:y+1},{fixed:0,stretch:w+1}));return c}function gh(n,t,i){let s=0;for(const c of n)s+=Math.max(t,Math.min(i,c[1]))-Math.max(t,Math.min(i,c[0]));return s}function ly(n,t,i){const s=[{fixed:-1,stretch:0}];for(const[c,d]of n){const m=s[s.length-1];s.push({fixed:c-m.stretch,stretch:m.stretch}),s.push({fixed:c-m.stretch,stretch:m.stretch+(d-c)})}return s.push({fixed:t+yc,stretch:i}),s}function yh(n,t,i,s){return n/t*i+s}function _h(n,t,i,s){return n-t*i/s}class xh{constructor(t,i,s,c,d,m,y,w,E,R){var V;if(this.boxStartIndex=t.length,E){let q=m.top,j=m.bottom;const W=m.collisionPadding;W&&(q-=W[1],j+=W[3]);let X=j-q;X>0&&(X=Math.max(10,X),this.circleDiameter=X)}else{const q=!((V=m.image)===null||V===void 0)&&V.content&&(m.image.textFitWidth||m.image.textFitHeight)?Rg(m):{x1:m.left,y1:m.top,x2:m.right,y2:m.bottom};q.y1=q.y1*y-w[0],q.y2=q.y2*y+w[2],q.x1=q.x1*y-w[3],q.x2=q.x2*y+w[1];const j=m.collisionPadding;if(j&&(q.x1-=j[0]*y,q.y1-=j[1]*y,q.x2+=j[2]*y,q.y2+=j[3]*y),R){const W=new T(q.x1,q.y1),X=new T(q.x2,q.y1),re=new T(q.x1,q.y2),ae=new T(q.x2,q.y2),Se=R*Math.PI/180;W._rotate(Se),X._rotate(Se),re._rotate(Se),ae._rotate(Se),q.x1=Math.min(W.x,X.x,re.x,ae.x),q.x2=Math.max(W.x,X.x,re.x,ae.x),q.y1=Math.min(W.y,X.y,re.y,ae.y),q.y2=Math.max(W.y,X.y,re.y,ae.y)}t.emplaceBack(i.x,i.y,q.x1,q.y1,q.x2,q.y2,s,c,d)}this.boxEndIndex=t.length}}class SS{constructor(t=[],i=(s,c)=>s<c?-1:s>c?1:0){if(this.data=t,this.length=this.data.length,this.compare=i,this.length>0)for(let s=(this.length>>1)-1;s>=0;s--)this._down(s)}push(t){this.data.push(t),this._up(this.length++)}pop(){if(this.length===0)return;const t=this.data[0],i=this.data.pop();return--this.length>0&&(this.data[0]=i,this._down(0)),t}peek(){return this.data[0]}_up(t){const{data:i,compare:s}=this,c=i[t];for(;t>0;){const d=t-1>>1,m=i[d];if(s(c,m)>=0)break;i[t]=m,t=d}i[t]=c}_down(t){const{data:i,compare:s}=this,c=this.length>>1,d=i[t];for(;t<c;){let m=1+(t<<1);const y=m+1;if(y<this.length&&s(i[y],i[m])<0&&(m=y),s(i[m],d)>=0)break;i[t]=i[m],t=m}i[t]=d}}function AS(n,t=1,i=!1){let s=1/0,c=1/0,d=-1/0,m=-1/0;const y=n[0];for(let j=0;j<y.length;j++){const W=y[j];(!j||W.x<s)&&(s=W.x),(!j||W.y<c)&&(c=W.y),(!j||W.x>d)&&(d=W.x),(!j||W.y>m)&&(m=W.y)}const w=Math.min(d-s,m-c);let E=w/2;const R=new SS([],kS);if(w===0)return new T(s,c);for(let j=s;j<d;j+=w)for(let W=c;W<m;W+=w)R.push(new Qa(j+E,W+E,E,n));let V=function(j){let W=0,X=0,re=0;const ae=j[0];for(let Se=0,fe=ae.length,U=fe-1;Se<fe;U=Se++){const Y=ae[Se],ge=ae[U],Re=Y.x*ge.y-ge.x*Y.y;X+=(Y.x+ge.x)*Re,re+=(Y.y+ge.y)*Re,W+=3*Re}return new Qa(X/W,re/W,0,j)}(n),q=R.length;for(;R.length;){const j=R.pop();(j.d>V.d||!V.d)&&(V=j,i&&console.log("found best %d after %d probes",Math.round(1e4*j.d)/1e4,q)),j.max-V.d<=t||(E=j.h/2,R.push(new Qa(j.p.x-E,j.p.y-E,E,n)),R.push(new Qa(j.p.x+E,j.p.y-E,E,n)),R.push(new Qa(j.p.x-E,j.p.y+E,E,n)),R.push(new Qa(j.p.x+E,j.p.y+E,E,n)),q+=4)}return i&&(console.log(`num probes: ${q}`),console.log(`best distance: ${V.d}`)),V.p}function kS(n,t){return t.max-n.max}function Qa(n,t,i,s){this.p=new T(n,t),this.h=i,this.d=function(c,d){let m=!1,y=1/0;for(let w=0;w<d.length;w++){const E=d[w];for(let R=0,V=E.length,q=V-1;R<V;q=R++){const j=E[R],W=E[q];j.y>c.y!=W.y>c.y&&c.x<(W.x-j.x)*(c.y-j.y)/(W.y-j.y)+j.x&&(m=!m),y=Math.min(y,Um(c,j,W))}}return(m?1:-1)*Math.sqrt(y)}(this.p,s),this.max=this.d+this.h*Math.SQRT2}var Ti;x.aB=void 0,(Ti=x.aB||(x.aB={}))[Ti.center=1]="center",Ti[Ti.left=2]="left",Ti[Ti.right=3]="right",Ti[Ti.top=4]="top",Ti[Ti.bottom=5]="bottom",Ti[Ti["top-left"]=6]="top-left",Ti[Ti["top-right"]=7]="top-right",Ti[Ti["bottom-left"]=8]="bottom-left",Ti[Ti["bottom-right"]=9]="bottom-right";const es=7,sd=Number.POSITIVE_INFINITY;function cy(n,t){return t[1]!==sd?function(i,s,c){let d=0,m=0;switch(s=Math.abs(s),c=Math.abs(c),i){case"top-right":case"top-left":case"top":m=c-es;break;case"bottom-right":case"bottom-left":case"bottom":m=-c+es}switch(i){case"top-right":case"bottom-right":case"right":d=-s;break;case"top-left":case"bottom-left":case"left":d=s}return[d,m]}(n,t[0],t[1]):function(i,s){let c=0,d=0;s<0&&(s=0);const m=s/Math.SQRT2;switch(i){case"top-right":case"top-left":d=m-es;break;case"bottom-right":case"bottom-left":d=-m+es;break;case"bottom":d=-s+es;break;case"top":d=s-es}switch(i){case"top-right":case"bottom-right":c=-m;break;case"top-left":case"bottom-left":c=m;break;case"left":c=s;break;case"right":c=-s}return[c,d]}(n,t[0])}function uy(n,t,i){var s;const c=n.layout,d=(s=c.get("text-variable-anchor-offset"))===null||s===void 0?void 0:s.evaluate(t,{},i);if(d){const y=d.values,w=[];for(let E=0;E<y.length;E+=2){const R=w[E]=y[E],V=y[E+1].map(q=>q*ti);R.startsWith("top")?V[1]-=es:R.startsWith("bottom")&&(V[1]+=es),w[E+1]=V}return new Je(w)}const m=c.get("text-variable-anchor");if(m){let y;y=n._unevaluatedLayout.getValue("text-radial-offset")!==void 0?[c.get("text-radial-offset").evaluate(t,{},i)*ti,sd]:c.get("text-offset").evaluate(t,{},i).map(E=>E*ti);const w=[];for(const E of m)w.push(E,cy(E,y));return new Je(w)}return null}function ad(n){switch(n){case"right":case"top-right":case"bottom-right":return"right";case"left":case"top-left":case"bottom-left":return"left"}return"center"}function TS(n,t,i,s,c,d,m,y,w,E,R,V){let q=d.textMaxSize.evaluate(t,{});q===void 0&&(q=m);const j=n.layers[0].layout,W=j.get("icon-offset").evaluate(t,{},R),X=py(i.horizontal),re=m/24,ae=n.tilePixelRatio*re,Se=n.tilePixelRatio*q/24,fe=n.tilePixelRatio*y,U=n.tilePixelRatio*j.get("symbol-spacing"),Y=j.get("text-padding")*n.tilePixelRatio,ge=function(Lt,Pt,Tt,rr=1){const Ur=Lt.get("icon-padding").evaluate(Pt,{},Tt),ri=Ur&&Ur.values;return[ri[0]*rr,ri[1]*rr,ri[2]*rr,ri[3]*rr]}(j,t,R,n.tilePixelRatio),Re=j.get("text-max-angle")/180*Math.PI,$e=j.get("text-rotation-alignment")!=="viewport"&&j.get("symbol-placement")!=="point",Oe=j.get("icon-rotation-alignment")==="map"&&j.get("symbol-placement")!=="point",He=j.get("symbol-placement"),ot=U/2,et=j.get("icon-text-fit");let at;s&&et!=="none"&&(n.allowVerticalPlacement&&i.vertical&&(at=Dg(s,i.vertical,et,j.get("icon-text-fit-padding"),W,re)),X&&(s=Dg(s,X,et,j.get("icon-text-fit-padding"),W,re)));const Ze=R?V.line.getGranularityForZoomLevel(R.z):1,St=(Lt,Pt)=>{Pt.x<0||Pt.x>=ir||Pt.y<0||Pt.y>=ir||function(Tt,rr,Ur,ri,Ci,mn,ji,bi,Fr,ui,vi,wi,zi,gn,hi,Hi,ii,pi,di,Qr,Pr,jn,Ya,Hn,PS){const $a=Tt.addToLineVertexArray(rr,Ur);let Ws,el,tl,rl,gy=0,yy=0,_y=0,xy=0,md=-1,gd=-1;const Mo={};let by=qn("");if(Tt.allowVerticalPlacement&&ri.vertical){const Ii=bi.layout.get("text-rotate").evaluate(Pr,{},Hn)+90;tl=new xh(Fr,rr,ui,vi,wi,ri.vertical,zi,gn,hi,Ii),ji&&(rl=new xh(Fr,rr,ui,vi,wi,ji,ii,pi,hi,Ii))}if(Ci){const Ii=bi.layout.get("icon-rotate").evaluate(Pr,{}),yn=bi.layout.get("icon-text-fit")!=="none",Zs=ay(Ci,Ii,Ya,yn),Zn=ji?ay(ji,Ii,Ya,yn):void 0;el=new xh(Fr,rr,ui,vi,wi,Ci,ii,pi,!1,Ii),gy=4*Zs.length;const Ks=Tt.iconSizeData;let co=null;Ks.kind==="source"?(co=[lo*bi.layout.get("icon-size").evaluate(Pr,{})],co[0]>Qo&&bt(`${Tt.layerIds[0]}: Value for "icon-size" is >= ${mc}. Reduce your "icon-size".`)):Ks.kind==="composite"&&(co=[lo*jn.compositeIconSizes[0].evaluate(Pr,{},Hn),lo*jn.compositeIconSizes[1].evaluate(Pr,{},Hn)],(co[0]>Qo||co[1]>Qo)&&bt(`${Tt.layerIds[0]}: Value for "icon-size" is >= ${mc}. Reduce your "icon-size".`)),Tt.addSymbols(Tt.icon,Zs,co,Qr,di,Pr,x.al.none,rr,$a.lineStartIndex,$a.lineLength,-1,Hn),md=Tt.icon.placedSymbolArray.length-1,Zn&&(yy=4*Zn.length,Tt.addSymbols(Tt.icon,Zn,co,Qr,di,Pr,x.al.vertical,rr,$a.lineStartIndex,$a.lineLength,-1,Hn),gd=Tt.icon.placedSymbolArray.length-1)}const vy=Object.keys(ri.horizontal);for(const Ii of vy){const yn=ri.horizontal[Ii];if(!Ws){by=qn(yn.text);const Zn=bi.layout.get("text-rotate").evaluate(Pr,{},Hn);Ws=new xh(Fr,rr,ui,vi,wi,yn,zi,gn,hi,Zn)}const Zs=yn.positionedLines.length===1;if(_y+=hy(Tt,rr,yn,mn,bi,hi,Pr,Hi,$a,ri.vertical?x.al.horizontal:x.al.horizontalOnly,Zs?vy:[Ii],Mo,md,jn,Hn),Zs)break}ri.vertical&&(xy+=hy(Tt,rr,ri.vertical,mn,bi,hi,Pr,Hi,$a,x.al.vertical,["vertical"],Mo,gd,jn,Hn));const IS=Ws?Ws.boxStartIndex:Tt.collisionBoxArray.length,MS=Ws?Ws.boxEndIndex:Tt.collisionBoxArray.length,LS=tl?tl.boxStartIndex:Tt.collisionBoxArray.length,RS=tl?tl.boxEndIndex:Tt.collisionBoxArray.length,DS=el?el.boxStartIndex:Tt.collisionBoxArray.length,zS=el?el.boxEndIndex:Tt.collisionBoxArray.length,BS=rl?rl.boxStartIndex:Tt.collisionBoxArray.length,VS=rl?rl.boxEndIndex:Tt.collisionBoxArray.length;let Wn=-1;const vh=(Ii,yn)=>Ii&&Ii.circleDiameter?Math.max(Ii.circleDiameter,yn):yn;Wn=vh(Ws,Wn),Wn=vh(tl,Wn),Wn=vh(el,Wn),Wn=vh(rl,Wn);const wy=Wn>-1?1:0;wy&&(Wn*=PS/ti),Tt.glyphOffsetArray.length>=Ja.MAX_GLYPHS&&bt("Too many glyphs being rendered in a tile. See https://github.com/mapbox/mapbox-gl-js/issues/2907"),Pr.sortKey!==void 0&&Tt.addToSortKeyRanges(Tt.symbolInstances.length,Pr.sortKey);const OS=uy(bi,Pr,Hn),[FS,NS]=function(Ii,yn){const Zs=Ii.length,Zn=yn==null?void 0:yn.values;if((Zn==null?void 0:Zn.length)>0)for(let Ks=0;Ks<Zn.length;Ks+=2){const co=Zn[Ks+1];Ii.emplaceBack(x.aB[Zn[Ks]],co[0],co[1])}return[Zs,Ii.length]}(Tt.textAnchorOffsets,OS);Tt.symbolInstances.emplaceBack(rr.x,rr.y,Mo.right>=0?Mo.right:-1,Mo.center>=0?Mo.center:-1,Mo.left>=0?Mo.left:-1,Mo.vertical||-1,md,gd,by,IS,MS,LS,RS,DS,zS,BS,VS,ui,_y,xy,gy,yy,wy,0,zi,Wn,FS,NS)}(n,Pt,Lt,i,s,c,at,n.layers[0],n.collisionBoxArray,t.index,t.sourceLayerIndex,n.index,ae,[Y,Y,Y,Y],$e,w,fe,ge,Oe,W,t,d,E,R,m)};if(He==="line")for(const Lt of ty(t.geometry,0,0,ir,ir)){const Pt=Hs(Lt,Ze),Tt=wS(Pt,U,Re,i.vertical||X,s,24,Se,n.overscaling,ir);for(const rr of Tt)X&&CS(n,X.text,ot,rr)||St(Pt,rr)}else if(He==="line-center"){for(const Lt of t.geometry)if(Lt.length>1){const Pt=Hs(Lt,Ze),Tt=vS(Pt,Re,i.vertical||X,s,24,Se);Tt&&St(Pt,Tt)}}else if(t.type==="Polygon")for(const Lt of ma(t.geometry,0)){const Pt=AS(Lt,16);St(Hs(Lt[0],Ze,!0),new $o(Pt.x,Pt.y,0))}else if(t.type==="LineString")for(const Lt of t.geometry){const Pt=Hs(Lt,Ze);St(Pt,new $o(Pt[0].x,Pt[0].y,0))}else if(t.type==="Point")for(const Lt of t.geometry)for(const Pt of Lt)St([Pt],new $o(Pt.x,Pt.y,0))}function hy(n,t,i,s,c,d,m,y,w,E,R,V,q,j,W){const X=function(Se,fe,U,Y,ge,Re,$e,Oe){const He=Y.layout.get("text-rotate").evaluate(Re,{})*Math.PI/180,ot=[];for(const et of fe.positionedLines)for(const at of et.positionedGlyphs){if(!at.rect)continue;const Ze=at.rect||{};let St=eS+1,Lt=!0,Pt=1,Tt=0;const rr=(ge||Oe)&&at.vertical,Ur=at.metrics.advance*at.scale/2;if(Oe&&fe.verticalizable&&(Tt=et.lineOffset/2-(at.imageName?-(ti-at.metrics.width*at.scale)/2:(at.scale-1)*ti)),at.imageName){const pi=$e[at.imageName];Lt=pi.sdf,Pt=pi.pixelRatio,St=Ui/Pt}const ri=ge?[at.x+Ur,at.y]:[0,0];let Ci=ge?[0,0]:[at.x+Ur+U[0],at.y+U[1]-Tt],mn=[0,0];rr&&(mn=Ci,Ci=[0,0]);const ji=at.metrics.isDoubleResolution?2:1,bi=(at.metrics.left-St)*at.scale-Ur+Ci[0],Fr=(-at.metrics.top-St)*at.scale+Ci[1],ui=bi+Ze.w/ji*at.scale/Pt,vi=Fr+Ze.h/ji*at.scale/Pt,wi=new T(bi,Fr),zi=new T(ui,Fr),gn=new T(bi,vi),hi=new T(ui,vi);if(rr){const pi=new T(-Ur,Ur-hh),di=-Math.PI/2,Qr=ti/2-Ur,Pr=new T(5-hh-Qr,-(at.imageName?Qr:0)),jn=new T(...mn);wi._rotateAround(di,pi)._add(Pr)._add(jn),zi._rotateAround(di,pi)._add(Pr)._add(jn),gn._rotateAround(di,pi)._add(Pr)._add(jn),hi._rotateAround(di,pi)._add(Pr)._add(jn)}if(He){const pi=Math.sin(He),di=Math.cos(He),Qr=[di,-pi,pi,di];wi._matMult(Qr),zi._matMult(Qr),gn._matMult(Qr),hi._matMult(Qr)}const Hi=new T(0,0),ii=new T(0,0);ot.push({tl:wi,tr:zi,bl:gn,br:hi,tex:Ze,writingMode:fe.writingMode,glyphOffset:ri,sectionIndex:at.sectionIndex,isSDF:Lt,pixelOffsetTL:Hi,pixelOffsetBR:ii,minFontScaleX:0,minFontScaleY:0})}return ot}(0,i,y,c,d,m,s,n.allowVerticalPlacement),re=n.textSizeData;let ae=null;re.kind==="source"?(ae=[lo*c.layout.get("text-size").evaluate(m,{})],ae[0]>Qo&&bt(`${n.layerIds[0]}: Value for "text-size" is >= ${mc}. Reduce your "text-size".`)):re.kind==="composite"&&(ae=[lo*j.compositeTextSizes[0].evaluate(m,{},W),lo*j.compositeTextSizes[1].evaluate(m,{},W)],(ae[0]>Qo||ae[1]>Qo)&&bt(`${n.layerIds[0]}: Value for "text-size" is >= ${mc}. Reduce your "text-size".`)),n.addSymbols(n.text,X,ae,y,d,m,E,t,w.lineStartIndex,w.lineLength,q,W);for(const Se of R)V[Se]=n.text.placedSymbolArray.length-1;return 4*X.length}function py(n){for(const t in n)return n[t];return null}function CS(n,t,i,s){const c=n.compareText;if(t in c){const d=c[t];for(let m=d.length-1;m>=0;m--)if(s.dist(d[m])<i)return!0}else c[t]=[];return c[t].push(s),!1}const dy=[Int8Array,Uint8Array,Uint8ClampedArray,Int16Array,Uint16Array,Int32Array,Uint32Array,Float32Array,Float64Array];class ld{static from(t){if(!(t instanceof ArrayBuffer))throw new Error("Data must be an instance of ArrayBuffer.");const[i,s]=new Uint8Array(t,0,2);if(i!==219)throw new Error("Data does not appear to be in a KDBush format.");const c=s>>4;if(c!==1)throw new Error(`Got v${c} data when expected v1.`);const d=dy[15&s];if(!d)throw new Error("Unrecognized array type.");const[m]=new Uint16Array(t,2,1),[y]=new Uint32Array(t,4,1);return new ld(y,m,d,t)}constructor(t,i=64,s=Float64Array,c){if(isNaN(t)||t<0)throw new Error(`Unpexpected numItems value: ${t}.`);this.numItems=+t,this.nodeSize=Math.min(Math.max(+i,2),65535),this.ArrayType=s,this.IndexArrayType=t<65536?Uint16Array:Uint32Array;const d=dy.indexOf(this.ArrayType),m=2*t*this.ArrayType.BYTES_PER_ELEMENT,y=t*this.IndexArrayType.BYTES_PER_ELEMENT,w=(8-y%8)%8;if(d<0)throw new Error(`Unexpected typed array class: ${s}.`);c&&c instanceof ArrayBuffer?(this.data=c,this.ids=new this.IndexArrayType(this.data,8,t),this.coords=new this.ArrayType(this.data,8+y+w,2*t),this._pos=2*t,this._finished=!0):(this.data=new ArrayBuffer(8+m+y+w),this.ids=new this.IndexArrayType(this.data,8,t),this.coords=new this.ArrayType(this.data,8+y+w,2*t),this._pos=0,this._finished=!1,new Uint8Array(this.data,0,2).set([219,16+d]),new Uint16Array(this.data,2,1)[0]=i,new Uint32Array(this.data,4,1)[0]=t)}add(t,i){const s=this._pos>>1;return this.ids[s]=s,this.coords[this._pos++]=t,this.coords[this._pos++]=i,s}finish(){const t=this._pos>>1;if(t!==this.numItems)throw new Error(`Added ${t} items when expected ${this.numItems}.`);return cd(this.ids,this.coords,this.nodeSize,0,this.numItems-1,0),this._finished=!0,this}range(t,i,s,c){if(!this._finished)throw new Error("Data not yet indexed - call index.finish().");const{ids:d,coords:m,nodeSize:y}=this,w=[0,d.length-1,0],E=[];for(;w.length;){const R=w.pop()||0,V=w.pop()||0,q=w.pop()||0;if(V-q<=y){for(let re=q;re<=V;re++){const ae=m[2*re],Se=m[2*re+1];ae>=t&&ae<=s&&Se>=i&&Se<=c&&E.push(d[re])}continue}const j=q+V>>1,W=m[2*j],X=m[2*j+1];W>=t&&W<=s&&X>=i&&X<=c&&E.push(d[j]),(R===0?t<=W:i<=X)&&(w.push(q),w.push(j-1),w.push(1-R)),(R===0?s>=W:c>=X)&&(w.push(j+1),w.push(V),w.push(1-R))}return E}within(t,i,s){if(!this._finished)throw new Error("Data not yet indexed - call index.finish().");const{ids:c,coords:d,nodeSize:m}=this,y=[0,c.length-1,0],w=[],E=s*s;for(;y.length;){const R=y.pop()||0,V=y.pop()||0,q=y.pop()||0;if(V-q<=m){for(let re=q;re<=V;re++)my(d[2*re],d[2*re+1],t,i)<=E&&w.push(c[re]);continue}const j=q+V>>1,W=d[2*j],X=d[2*j+1];my(W,X,t,i)<=E&&w.push(c[j]),(R===0?t-s<=W:i-s<=X)&&(y.push(q),y.push(j-1),y.push(1-R)),(R===0?t+s>=W:i+s>=X)&&(y.push(j+1),y.push(V),y.push(1-R))}return w}}function cd(n,t,i,s,c,d){if(c-s<=i)return;const m=s+c>>1;fy(n,t,m,s,c,d),cd(n,t,i,s,m-1,1-d),cd(n,t,i,m+1,c,1-d)}function fy(n,t,i,s,c,d){for(;c>s;){if(c-s>600){const E=c-s+1,R=i-s+1,V=Math.log(E),q=.5*Math.exp(2*V/3),j=.5*Math.sqrt(V*q*(E-q)/E)*(R-E/2<0?-1:1);fy(n,t,i,Math.max(s,Math.floor(i-R*q/E+j)),Math.min(c,Math.floor(i+(E-R)*q/E+j)),d)}const m=t[2*i+d];let y=s,w=c;for(_c(n,t,s,i),t[2*c+d]>m&&_c(n,t,s,c);y<w;){for(_c(n,t,y,w),y++,w--;t[2*y+d]<m;)y++;for(;t[2*w+d]>m;)w--}t[2*s+d]===m?_c(n,t,s,w):(w++,_c(n,t,w,c)),w<=i&&(s=w+1),i<=w&&(c=w-1)}}function _c(n,t,i,s){ud(n,i,s),ud(t,2*i,2*s),ud(t,2*i+1,2*s+1)}function ud(n,t,i){const s=n[t];n[t]=n[i],n[i]=s}function my(n,t,i,s){const c=n-i,d=t-s;return c*c+d*d}var hd;x.co=void 0,(hd=x.co||(x.co={})).create="create",hd.load="load",hd.fullLoad="fullLoad";let bh=null,xc=[];const pd=1e3/60,dd="loadTime",fd="fullLoadTime",ES={mark(n){performance.mark(n)},frame(n){const t=n;bh!=null&&xc.push(t-bh),bh=t},clearMetrics(){bh=null,xc=[],performance.clearMeasures(dd),performance.clearMeasures(fd);for(const n in x.co)performance.clearMarks(x.co[n])},getPerformanceMetrics(){performance.measure(dd,x.co.create,x.co.load),performance.measure(fd,x.co.create,x.co.fullLoad);const n=performance.getEntriesByName(dd)[0].duration,t=performance.getEntriesByName(fd)[0].duration,i=xc.length,s=1/(xc.reduce((d,m)=>d+m,0)/i/1e3),c=xc.filter(d=>d>pd).reduce((d,m)=>d+(m-pd)/pd,0);return{loadTime:n,fullLoadTime:t,fps:s,percentDroppedFrames:c/(i+c)*100,totalFrames:i}}};x.$=gc,x.A=De,x.B=vn,x.C=Cr,x.D=Ct,x.E=ve,x.F=bp,x.G=function(n){if(Ht==null){const t=n.navigator?n.navigator.userAgent:null;Ht=!!n.safari||!(!t||!(/\b(iPad|iPhone|iPod)\b/.test(t)||t.match("Safari")&&!t.match("Chrome")))}return Ht},x.H=class{constructor(n,t){this.target=n,this.mapId=t,this.resolveRejects={},this.tasks={},this.taskQueue=[],this.abortControllers={},this.messageHandlers={},this.invoker=new _S(()=>this.process()),this.subscription=mi(this.target,"message",i=>this.receive(i),!1),this.globalScope=Bt(self)?n:window}registerMessageHandler(n,t){this.messageHandlers[n]=t}sendAsync(n,t){return new Promise((i,s)=>{const c=Math.round(1e18*Math.random()).toString(36).substring(0,10),d=t?mi(t.signal,"abort",()=>{d==null||d.unsubscribe(),delete this.resolveRejects[c];const w={id:c,type:"<cancel>",origin:location.origin,targetMapId:n.targetMapId,sourceMapId:this.mapId};this.target.postMessage(w)},xS):null;this.resolveRejects[c]={resolve:w=>{d==null||d.unsubscribe(),i(w)},reject:w=>{d==null||d.unsubscribe(),s(w)}};const m=[],y=Object.assign(Object.assign({},n),{id:c,sourceMapId:this.mapId,origin:location.origin,data:Ko(n.data,m)});this.target.postMessage(y,{transfer:m})})}receive(n){const t=n.data,i=t.id;if(!(t.origin!=="file://"&&location.origin!=="file://"&&t.origin!=="resource://android"&&location.origin!=="resource://android"&&t.origin!==location.origin||t.targetMapId&&this.mapId!==t.targetMapId)){if(t.type==="<cancel>"){delete this.tasks[i];const s=this.abortControllers[i];return delete this.abortControllers[i],void(s&&s.abort())}if(Bt(self)||t.mustQueue)return this.tasks[i]=t,this.taskQueue.push(i),void this.invoker.trigger();this.processTask(i,t)}}process(){if(this.taskQueue.length===0)return;const n=this.taskQueue.shift(),t=this.tasks[n];delete this.tasks[n],this.taskQueue.length>0&&this.invoker.trigger(),t&&this.processTask(n,t)}processTask(n,t){return o(this,void 0,void 0,function*(){if(t.type==="<response>"){const c=this.resolveRejects[n];return delete this.resolveRejects[n],c?void(t.error?c.reject(Ls(t.error)):c.resolve(Ls(t.data))):void 0}if(!this.messageHandlers[t.type])return void this.completeTask(n,new Error(`Could not find a registered handler for ${t.type}, map ID: ${this.mapId}, available handlers: ${Object.keys(this.messageHandlers).join(", ")}`));const i=Ls(t.data),s=new AbortController;this.abortControllers[n]=s;try{const c=yield this.messageHandlers[t.type](t.sourceMapId,i,s);this.completeTask(n,null,c)}catch(c){this.completeTask(n,c)}})}completeTask(n,t,i){const s=[];delete this.abortControllers[n];const c={id:n,type:"<response>",sourceMapId:this.mapId,origin:location.origin,error:t?Ko(t):null,data:Ko(i,s)};this.target.postMessage(c,{transfer:s})}remove(){this.invoker.remove(),this.subscription.unsubscribe()}},x.I=Jp,x.J=Jt,x.K=function(){var n=new De(16);return De!=Float32Array&&(n[1]=0,n[2]=0,n[3]=0,n[4]=0,n[6]=0,n[7]=0,n[8]=0,n[9]=0,n[11]=0,n[12]=0,n[13]=0,n[14]=0),n[0]=1,n[5]=1,n[10]=1,n[15]=1,n},x.L=function(n,t,i){var s,c,d,m,y,w,E,R,V,q,j,W,X=i[0],re=i[1],ae=i[2];return t===n?(n[12]=t[0]*X+t[4]*re+t[8]*ae+t[12],n[13]=t[1]*X+t[5]*re+t[9]*ae+t[13],n[14]=t[2]*X+t[6]*re+t[10]*ae+t[14],n[15]=t[3]*X+t[7]*re+t[11]*ae+t[15]):(c=t[1],d=t[2],m=t[3],y=t[4],w=t[5],E=t[6],R=t[7],V=t[8],q=t[9],j=t[10],W=t[11],n[0]=s=t[0],n[1]=c,n[2]=d,n[3]=m,n[4]=y,n[5]=w,n[6]=E,n[7]=R,n[8]=V,n[9]=q,n[10]=j,n[11]=W,n[12]=s*X+y*re+V*ae+t[12],n[13]=c*X+w*re+q*ae+t[13],n[14]=d*X+E*re+j*ae+t[14],n[15]=m*X+R*re+W*ae+t[15]),n},x.M=function(n,t,i){var s=i[0],c=i[1],d=i[2];return n[0]=t[0]*s,n[1]=t[1]*s,n[2]=t[2]*s,n[3]=t[3]*s,n[4]=t[4]*c,n[5]=t[5]*c,n[6]=t[6]*c,n[7]=t[7]*c,n[8]=t[8]*d,n[9]=t[9]*d,n[10]=t[10]*d,n[11]=t[11]*d,n[12]=t[12],n[13]=t[13],n[14]=t[14],n[15]=t[15],n},x.N=function(n,t,i){var s=t[0],c=t[1],d=t[2],m=t[3],y=t[4],w=t[5],E=t[6],R=t[7],V=t[8],q=t[9],j=t[10],W=t[11],X=t[12],re=t[13],ae=t[14],Se=t[15],fe=i[0],U=i[1],Y=i[2],ge=i[3];return n[0]=fe*s+U*y+Y*V+ge*X,n[1]=fe*c+U*w+Y*q+ge*re,n[2]=fe*d+U*E+Y*j+ge*ae,n[3]=fe*m+U*R+Y*W+ge*Se,n[4]=(fe=i[4])*s+(U=i[5])*y+(Y=i[6])*V+(ge=i[7])*X,n[5]=fe*c+U*w+Y*q+ge*re,n[6]=fe*d+U*E+Y*j+ge*ae,n[7]=fe*m+U*R+Y*W+ge*Se,n[8]=(fe=i[8])*s+(U=i[9])*y+(Y=i[10])*V+(ge=i[11])*X,n[9]=fe*c+U*w+Y*q+ge*re,n[10]=fe*d+U*E+Y*j+ge*ae,n[11]=fe*m+U*R+Y*W+ge*Se,n[12]=(fe=i[12])*s+(U=i[13])*y+(Y=i[14])*V+(ge=i[15])*X,n[13]=fe*c+U*w+Y*q+ge*re,n[14]=fe*d+U*E+Y*j+ge*ae,n[15]=fe*m+U*R+Y*W+ge*Se,n},x.O=function(n,t){const i={};for(let s=0;s<t.length;s++){const c=t[s];c in n&&(i[c]=n[c])}return i},x.P=T,x.Q=Yo,x.R=dn,x.S=Hg,x.T=Yu,x.U=jg,x.V=Ee,x.W=te,x.X=Nt,x.Y=fn,x.Z=ir,x._=o,x.a=wr,x.a$=function(n,t,i){var s=Math.sin(i),c=Math.cos(i),d=t[4],m=t[5],y=t[6],w=t[7],E=t[8],R=t[9],V=t[10],q=t[11];return t!==n&&(n[0]=t[0],n[1]=t[1],n[2]=t[2],n[3]=t[3],n[12]=t[12],n[13]=t[13],n[14]=t[14],n[15]=t[15]),n[4]=d*c+E*s,n[5]=m*c+R*s,n[6]=y*c+V*s,n[7]=w*c+q*s,n[8]=E*c-d*s,n[9]=R*c-m*s,n[10]=V*c-y*s,n[11]=q*c-w*s,n},x.a0=25,x.a1=od,x.a2=n=>{const t=window.document.createElement("video");return t.muted=!0,new Promise(i=>{t.onloadstart=()=>{i(t)};for(const s of n){const c=window.document.createElement("source");Ae(s)||(t.crossOrigin="Anonymous"),c.src=s,t.appendChild(c)}})},x.a3=Ue,x.a4=function(){return Yi++},x.a5=se,x.a6=Ja,x.a7=Es,x.a8=qs,x.a9=Qg,x.aA=function(n,t,i,s,c=!1){if(!i[0]&&!i[1])return[0,0];const d=c?s==="map"?-n.bearingInRadians:0:s==="viewport"?n.bearingInRadians:0;if(d){const m=Math.sin(d),y=Math.cos(d);i=[i[0]*y-i[1]*m,i[0]*m+i[1]*y]}return[c?i[0]:Ji(t,i[0],n.zoom),c?i[1]:Ji(t,i[1],n.zoom)]},x.aC=Yp,x.aD=ad,x.aE=Qp,x.aF=ld,x.aG=zr,x.aH=lh,x.aI=je,x.aJ=ur,x.aK=cr,x.aL=Qi,x.aM=gi,x.aN=Zg,x.aO=function(n,t,i){return n[0]=t[0]*i,n[1]=t[1]*i,n[2]=t[2]*i,n},x.aP=function(n,t,i){return n[0]=t[0]+i[0],n[1]=t[1]+i[1],n[2]=t[2]+i[2],n},x.aQ=function(n){var t=new De(3);return t[0]=n[0],t[1]=n[1],t[2]=n[2],t},x.aR=function(n,t,i){return n[0]=t[0]*i[0],n[1]=t[1]*i[1],n[2]=t[2]*i[2],n[3]=t[3]*i[3],n},x.aS=function(n,t,i){return n[0]=t[0]-i[0],n[1]=t[1]-i[1],n[2]=t[2]-i[2],n},x.aT=function(n,t){var i=t[0],s=t[1],c=t[2],d=i*i+s*s+c*c;return d>0&&(d=1/Math.sqrt(d)),n[0]=t[0]*d,n[1]=t[1]*d,n[2]=t[2]*d,n},x.aU=function(n,t,i){var s=t[0],c=t[1],d=t[2],m=i[0],y=i[1],w=i[2];return n[0]=c*w-d*y,n[1]=d*m-s*w,n[2]=s*y-c*m,n},x.aV=function(n,t){return n[0]*t[0]+n[1]*t[1]+n[2]*t[2]},x.aW=Gg,x.aX=Xa,x.aY=function(n,t,i,s,c){var d,m=1/Math.tan(t/2);return n[0]=m/i,n[1]=0,n[2]=0,n[3]=0,n[4]=0,n[5]=m,n[6]=0,n[7]=0,n[8]=0,n[9]=0,n[11]=-1,n[12]=0,n[13]=0,n[15]=0,c!=null&&c!==1/0?(n[10]=(c+s)*(d=1/(s-c)),n[14]=2*c*s*d):(n[10]=-1,n[14]=-2*s),n},x.aZ=function(n){var t=new De(16);return t[0]=n[0],t[1]=n[1],t[2]=n[2],t[3]=n[3],t[4]=n[4],t[5]=n[5],t[6]=n[6],t[7]=n[7],t[8]=n[8],t[9]=n[9],t[10]=n[10],t[11]=n[11],t[12]=n[12],t[13]=n[13],t[14]=n[14],t[15]=n[15],t},x.a_=function(n,t,i){var s=Math.sin(i),c=Math.cos(i),d=t[0],m=t[1],y=t[2],w=t[3],E=t[4],R=t[5],V=t[6],q=t[7];return t!==n&&(n[8]=t[8],n[9]=t[9],n[10]=t[10],n[11]=t[11],n[12]=t[12],n[13]=t[13],n[14]=t[14],n[15]=t[15]),n[0]=d*c+E*s,n[1]=m*c+R*s,n[2]=y*c+V*s,n[3]=w*c+q*s,n[4]=E*c-d*s,n[5]=R*c-m*s,n[6]=V*c-y*s,n[7]=q*c-w*s,n},x.aa=function(n){const t={};if(n.replace(/(?:^|(?:\s*\,\s*))([^\x00-\x20\(\)<>@\,;\:\\"\/\[\]\?\=\{\}\x7F]+)(?:\=(?:([^\x00-\x20\(\)<>@\,;\:\\"\/\[\]\?\=\{\}\x7F]+)|(?:\"((?:[^"\\]|\\.)*)\")))?/g,(i,s,c,d)=>{const m=c||d;return t[s]=!m||m.toLowerCase(),""}),t["max-age"]){const i=parseInt(t["max-age"],10);isNaN(i)?delete t["max-age"]:t["max-age"]=i}return t},x.ab=Ir,x.ac=function(n){return Math.pow(2,n)},x.ad=rt,x.ae=Zr,x.af=85.051129,x.ag=Wg,x.ah=function(n){return Math.log(n)/Math.LN2},x.ai=function(n){var t=n[0],i=n[1];return t*t+i*i},x.aj=function(n,t){const i=[];for(const s in n)s in t||i.push(s);return i},x.ak=function(n,t){let i=0,s=0;if(n.kind==="constant")s=n.layoutSize;else if(n.kind!=="source"){const{interpolationType:c,minZoom:d,maxZoom:m}=n,y=c?Zr(Ai.interpolationFactor(c,t,d,m),0,1):0;n.kind==="camera"?s=vn.number(n.minSize,n.maxSize,y):i=y}return{uSizeT:i,uSize:s}},x.am=function(n,{uSize:t,uSizeT:i},{lowerSize:s,upperSize:c}){return n.kind==="source"?s/lo:n.kind==="composite"?vn.number(s/lo,c/lo,i):t},x.an=function(n,t){var i=t[0],s=t[1],c=t[2],d=t[3],m=t[4],y=t[5],w=t[6],E=t[7],R=t[8],V=t[9],q=t[10],j=t[11],W=t[12],X=t[13],re=t[14],ae=t[15],Se=i*y-s*m,fe=i*w-c*m,U=i*E-d*m,Y=s*w-c*y,ge=s*E-d*y,Re=c*E-d*w,$e=R*X-V*W,Oe=R*re-q*W,He=R*ae-j*W,ot=V*re-q*X,et=V*ae-j*X,at=q*ae-j*re,Ze=Se*at-fe*et+U*ot+Y*He-ge*Oe+Re*$e;return Ze?(n[0]=(y*at-w*et+E*ot)*(Ze=1/Ze),n[1]=(c*et-s*at-d*ot)*Ze,n[2]=(X*Re-re*ge+ae*Y)*Ze,n[3]=(q*ge-V*Re-j*Y)*Ze,n[4]=(w*He-m*at-E*Oe)*Ze,n[5]=(i*at-c*He+d*Oe)*Ze,n[6]=(re*U-W*Re-ae*fe)*Ze,n[7]=(R*Re-q*U+j*fe)*Ze,n[8]=(m*et-y*He+E*$e)*Ze,n[9]=(s*He-i*et-d*$e)*Ze,n[10]=(W*ge-X*U+ae*Se)*Ze,n[11]=(V*U-R*ge-j*Se)*Ze,n[12]=(y*Oe-m*ot-w*$e)*Ze,n[13]=(i*ot-s*Oe+c*$e)*Ze,n[14]=(X*fe-W*Y-re*Se)*Ze,n[15]=(R*Y-V*fe+q*Se)*Ze,n):null},x.ao=vr,x.ap=function(n){return Math.hypot(n[0],n[1])},x.aq=function(n){return n[0]=0,n[1]=0,n},x.ar=function(n,t,i){return n[0]=t[0]*i,n[1]=t[1]*i,n},x.as=$p,x.at=Xt,x.au=function(n,t,i,s){const c=t.y-n.y,d=t.x-n.x,m=s.y-i.y,y=s.x-i.x,w=m*d-y*c;if(w===0)return null;const E=(y*(n.y-i.y)-m*(n.x-i.x))/w;return new T(n.x+E*d,n.y+E*c)},x.av=ty,x.aw=Nm,x.ax=function(n){let t=1/0,i=1/0,s=-1/0,c=-1/0;for(const d of n)t=Math.min(t,d.x),i=Math.min(i,d.y),s=Math.max(s,d.x),c=Math.max(c,d.y);return[t,i,s,c]},x.ay=ti,x.az=Ji,x.b=Ot,x.b$=class extends J{},x.b0=function(){const n=new Float32Array(16);return rt(n),n},x.b1=function(){const n=new Float64Array(16);return rt(n),n},x.b2=function(){return new Float64Array(16)},x.b3=function(n,t,i){const s=new Float64Array(4);return function(c,d,m,y){var w=.5*Math.PI/180;d*=w,m*=w,y*=w;var E=Math.sin(d),R=Math.cos(d),V=Math.sin(m),q=Math.cos(m),j=Math.sin(y),W=Math.cos(y);c[0]=E*q*W-R*V*j,c[1]=R*V*W+E*q*j,c[2]=R*q*j-E*V*W,c[3]=R*q*W+E*V*j}(s,n,t-90,i),s},x.b4=function(n,t,i,s){var c,d,m,y,w,E=t[0],R=t[1],V=t[2],q=t[3],j=i[0],W=i[1],X=i[2],re=i[3];return(d=E*j+R*W+V*X+q*re)<0&&(d=-d,j=-j,W=-W,X=-X,re=-re),1-d>me?(c=Math.acos(d),m=Math.sin(c),y=Math.sin((1-s)*c)/m,w=Math.sin(s*c)/m):(y=1-s,w=s),n[0]=y*E+w*j,n[1]=y*R+w*W,n[2]=y*V+w*X,n[3]=y*q+w*re,n},x.b5=function(n){const t=new Float64Array(9);var i,s,c,d,m,y,w,E,R,V,q,j,W,X,re,ae,Se,fe;V=(c=(s=n)[0])*(w=c+c),q=(d=s[1])*w,W=(m=s[2])*w,X=m*(E=d+d),ae=(y=s[3])*w,Se=y*E,fe=y*(R=m+m),(i=t)[0]=1-(j=d*E)-(re=m*R),i[3]=q-fe,i[6]=W+Se,i[1]=q+fe,i[4]=1-V-re,i[7]=X-ae,i[2]=W-Se,i[5]=X+ae,i[8]=1-V-j;const U=gi(-Math.asin(Zr(t[2],-1,1)));let Y,ge;return Math.hypot(t[5],t[8])<.001?(Y=0,ge=-gi(Math.atan2(t[3],t[4]))):(Y=gi(t[5]===0&&t[8]===0?0:Math.atan2(t[5],t[8])),ge=gi(t[1]===0&&t[0]===0?0:Math.atan2(t[1],t[0]))),{roll:Y,pitch:U+90,bearing:ge}},x.b6=function(n,t){return n.roll==t.roll&&n.pitch==t.pitch&&n.bearing==t.bearing},x.b7=Vt,x.b8=ja,x.b9=Ka,x.bA=function(n){if(n.type==="custom")return new yS(n);switch(n.type){case"background":return new fS(n);case"circle":return new c2(n);case"fill":return new E2(n);case"fill-extrusion":return new B2(n);case"heatmap":return new h2(n);case"hillshade":return new d2(n);case"line":return new H2(n);case"raster":return new gS(n);case"symbol":return new mh(n)}},x.bB=fi,x.bC=function(n,t){if(!n)return[{command:"setStyle",args:[t]}];let i=[];try{if(!Ie(n.version,t.version))return[{command:"setStyle",args:[t]}];Ie(n.center,t.center)||i.push({command:"setCenter",args:[t.center]}),Ie(n.state,t.state)||i.push({command:"setGlobalState",args:[t.state]}),Ie(n.centerAltitude,t.centerAltitude)||i.push({command:"setCenterAltitude",args:[t.centerAltitude]}),Ie(n.zoom,t.zoom)||i.push({command:"setZoom",args:[t.zoom]}),Ie(n.bearing,t.bearing)||i.push({command:"setBearing",args:[t.bearing]}),Ie(n.pitch,t.pitch)||i.push({command:"setPitch",args:[t.pitch]}),Ie(n.roll,t.roll)||i.push({command:"setRoll",args:[t.roll]}),Ie(n.sprite,t.sprite)||i.push({command:"setSprite",args:[t.sprite]}),Ie(n.glyphs,t.glyphs)||i.push({command:"setGlyphs",args:[t.glyphs]}),Ie(n.transition,t.transition)||i.push({command:"setTransition",args:[t.transition]}),Ie(n.light,t.light)||i.push({command:"setLight",args:[t.light]}),Ie(n.terrain,t.terrain)||i.push({command:"setTerrain",args:[t.terrain]}),Ie(n.sky,t.sky)||i.push({command:"setSky",args:[t.sky]}),Ie(n.projection,t.projection)||i.push({command:"setProjection",args:[t.projection]});const s={},c=[];(function(m,y,w,E){let R;for(R in y=y||{},m=m||{})Object.prototype.hasOwnProperty.call(m,R)&&(Object.prototype.hasOwnProperty.call(y,R)||Qe(R,w,E));for(R in y)Object.prototype.hasOwnProperty.call(y,R)&&(Object.prototype.hasOwnProperty.call(m,R)?Ie(m[R],y[R])||(m[R].type==="geojson"&&y[R].type==="geojson"&&yt(m,y,R)?Ve(w,{command:"setGeoJSONSourceData",args:[R,y[R].data]}):ut(R,y,w,E)):Pe(R,y,w))})(n.sources,t.sources,c,s);const d=[];n.layers&&n.layers.forEach(m=>{"source"in m&&s[m.source]?i.push({command:"removeLayer",args:[m.id]}):d.push(m)}),i=i.concat(c),function(m,y,w){y=y||[];const E=(m=m||[]).map(jt),R=y.map(jt),V=m.reduce(Rt,{}),q=y.reduce(Rt,{}),j=E.slice(),W=Object.create(null);let X,re,ae,Se,fe;for(let U=0,Y=0;U<E.length;U++)X=E[U],Object.prototype.hasOwnProperty.call(q,X)?Y++:(Ve(w,{command:"removeLayer",args:[X]}),j.splice(j.indexOf(X,Y),1));for(let U=0,Y=0;U<R.length;U++)X=R[R.length-1-U],j[j.length-1-U]!==X&&(Object.prototype.hasOwnProperty.call(V,X)?(Ve(w,{command:"removeLayer",args:[X]}),j.splice(j.lastIndexOf(X,j.length-Y),1)):Y++,Se=j[j.length-U],Ve(w,{command:"addLayer",args:[q[X],Se]}),j.splice(j.length-U,0,X),W[X]=!0);for(let U=0;U<R.length;U++)if(X=R[U],re=V[X],ae=q[X],!W[X]&&!Ie(re,ae))if(Ie(re.source,ae.source)&&Ie(re["source-layer"],ae["source-layer"])&&Ie(re.type,ae.type)){for(fe in Et(re.layout,ae.layout,w,X,null,"setLayoutProperty"),Et(re.paint,ae.paint,w,X,null,"setPaintProperty"),Ie(re.filter,ae.filter)||Ve(w,{command:"setFilter",args:[X,ae.filter]}),Ie(re.minzoom,ae.minzoom)&&Ie(re.maxzoom,ae.maxzoom)||Ve(w,{command:"setLayerZoomRange",args:[X,ae.minzoom,ae.maxzoom]}),re)Object.prototype.hasOwnProperty.call(re,fe)&&fe!=="layout"&&fe!=="paint"&&fe!=="filter"&&fe!=="metadata"&&fe!=="minzoom"&&fe!=="maxzoom"&&(fe.indexOf("paint.")===0?Et(re[fe],ae[fe],w,X,fe.slice(6),"setPaintProperty"):Ie(re[fe],ae[fe])||Ve(w,{command:"setLayerProperty",args:[X,fe,ae[fe]]}));for(fe in ae)Object.prototype.hasOwnProperty.call(ae,fe)&&!Object.prototype.hasOwnProperty.call(re,fe)&&fe!=="layout"&&fe!=="paint"&&fe!=="filter"&&fe!=="metadata"&&fe!=="minzoom"&&fe!=="maxzoom"&&(fe.indexOf("paint.")===0?Et(re[fe],ae[fe],w,X,fe.slice(6),"setPaintProperty"):Ie(re[fe],ae[fe])||Ve(w,{command:"setLayerProperty",args:[X,fe,ae[fe]]}))}else Ve(w,{command:"removeLayer",args:[X]}),Se=j[j.lastIndexOf(X)+1],Ve(w,{command:"addLayer",args:[ae,Se]})}(d,t.layers,i)}catch(s){console.warn("Unable to compute style diff:",s),i=[{command:"setStyle",args:[t]}]}return i},x.bD=function(n){const t=[],i=n.id;return i===void 0&&t.push({message:`layers.${i}: missing required property "id"`}),n.render===void 0&&t.push({message:`layers.${i}: missing required method "render"`}),n.renderingMode&&n.renderingMode!=="2d"&&n.renderingMode!=="3d"&&t.push({message:`layers.${i}: property "renderingMode" must be either "2d" or "3d"`}),t},x.bE=function n(t,i){if(Array.isArray(t)){if(!Array.isArray(i)||t.length!==i.length)return!1;for(let s=0;s<t.length;s++)if(!n(t[s],i[s]))return!1;return!0}if(typeof t=="object"&&t!==null&&i!==null){if(typeof i!="object"||Object.keys(t).length!==Object.keys(i).length)return!1;for(const s in t)if(!n(t[s],i[s]))return!1;return!0}return t===i},x.bF=Li,x.bG=In,x.bH=class extends Er{constructor(n,t){super(n,t),this.current=0}set(n){this.current!==n&&(this.current=n,this.gl.uniform1i(this.location,n))}},x.bI=ih,x.bJ=class extends Er{constructor(n,t){super(n,t),this.current=Tp}set(n){if(n[12]!==this.current[12]||n[0]!==this.current[0])return this.current=n,void this.gl.uniformMatrix4fv(this.location,!1,n);for(let t=1;t<16;t++)if(n[t]!==this.current[t]){this.current=n,this.gl.uniformMatrix4fv(this.location,!1,n);break}}},x.bK=rh,x.bL=class extends Er{constructor(n,t){super(n,t),this.current=[0,0,0]}set(n){n[0]===this.current[0]&&n[1]===this.current[1]&&n[2]===this.current[2]||(this.current=n,this.gl.uniform3f(this.location,n[0],n[1],n[2]))}},x.bM=class extends Er{constructor(n,t){super(n,t),this.current=[0,0]}set(n){n[0]===this.current[0]&&n[1]===this.current[1]||(this.current=n,this.gl.uniform2f(this.location,n[0],n[1]))}},x.bN=qe,x.bO=function(n,t){var i=Math.sin(t),s=Math.cos(t);return n[0]=s,n[1]=i,n[2]=0,n[3]=-i,n[4]=s,n[5]=0,n[6]=0,n[7]=0,n[8]=1,n},x.bP=function(n,t,i){var s=t[0],c=t[1],d=t[2];return n[0]=s*i[0]+c*i[3]+d*i[6],n[1]=s*i[1]+c*i[4]+d*i[7],n[2]=s*i[2]+c*i[5]+d*i[8],n},x.bQ=function(n,t,i,s,c,d,m){var y=1/(t-i),w=1/(s-c),E=1/(d-m);return n[0]=-2*y,n[1]=0,n[2]=0,n[3]=0,n[4]=0,n[5]=-2*w,n[6]=0,n[7]=0,n[8]=0,n[9]=0,n[10]=2*E,n[11]=0,n[12]=(t+i)*y,n[13]=(c+s)*w,n[14]=(m+d)*E,n[15]=1,n},x.bR=class extends Er{constructor(n,t){super(n,t),this.current=new Array}set(n){if(n!=this.current){this.current=n;const t=new Float32Array(4*n.length);for(let i=0;i<n.length;i++)t[4*i]=n[i].r,t[4*i+1]=n[i].g,t[4*i+2]=n[i].b,t[4*i+3]=n[i].a;this.gl.uniform4fv(this.location,t)}}},x.bS=class extends Er{constructor(n,t){super(n,t),this.current=new Array}set(n){if(n!=this.current){this.current=n;const t=new Float32Array(n);this.gl.uniform1fv(this.location,t)}}},x.bT=class extends h{},x.bU=G2,x.bV=class extends b{},x.bW=Rp,x.bX=function(n){return n<=1?1:Math.pow(2,Math.ceil(Math.log(n)/Math.LN2))},x.bY=Xm,x.bZ=function(n,t,i){var s=t[0],c=t[1],d=t[2],m=i[3]*s+i[7]*c+i[11]*d+i[15];return n[0]=(i[0]*s+i[4]*c+i[8]*d+i[12])/(m=m||1),n[1]=(i[1]*s+i[5]*c+i[9]*d+i[13])/m,n[2]=(i[2]*s+i[6]*c+i[10]*d+i[14])/m,n},x.b_=class extends Eo{},x.ba=lc,x.bb=Za,x.bc=Xi,x.bd=Dr,x.be=ze,x.bf=function(n,t,i,s,c){return Xi(s,c,Zr((n-t)/(i-t),0,1))},x.bg=Rr,x.bh=function(){return new Float64Array(3)},x.bi=function(n,t,i,s){return n[0]=t[0]+i[0]*s,n[1]=t[1]+i[1]*s,n[2]=t[2]+i[2]*s,n},x.bj=qt,x.bk=function(){return new Float64Array(4)},x.bl=function(n,t,i,s){var c=[],d=[];return c[0]=t[0]-i[0],c[1]=t[1]-i[1],c[2]=t[2]-i[2],d[0]=c[0]*Math.cos(s)-c[1]*Math.sin(s),d[1]=c[0]*Math.sin(s)+c[1]*Math.cos(s),d[2]=c[2],n[0]=d[0]+i[0],n[1]=d[1]+i[1],n[2]=d[2]+i[2],n},x.bm=function(n,t,i,s){var c=[],d=[];return c[0]=t[0]-i[0],c[1]=t[1]-i[1],c[2]=t[2]-i[2],d[0]=c[0],d[1]=c[1]*Math.cos(s)-c[2]*Math.sin(s),d[2]=c[1]*Math.sin(s)+c[2]*Math.cos(s),n[0]=d[0]+i[0],n[1]=d[1]+i[1],n[2]=d[2]+i[2],n},x.bn=function(n,t,i,s){var c=[],d=[];return c[0]=t[0]-i[0],c[1]=t[1]-i[1],c[2]=t[2]-i[2],d[0]=c[2]*Math.sin(s)+c[0]*Math.cos(s),d[1]=c[1],d[2]=c[2]*Math.cos(s)-c[0]*Math.sin(s),n[0]=d[0]+i[0],n[1]=d[1]+i[1],n[2]=d[2]+i[2],n},x.bo=_t,x.bp=function(n,t,i){var s=Math.sin(i),c=Math.cos(i),d=t[0],m=t[1],y=t[2],w=t[3],E=t[8],R=t[9],V=t[10],q=t[11];return t!==n&&(n[4]=t[4],n[5]=t[5],n[6]=t[6],n[7]=t[7],n[12]=t[12],n[13]=t[13],n[14]=t[14],n[15]=t[15]),n[0]=d*c-E*s,n[1]=m*c-R*s,n[2]=y*c-V*s,n[3]=w*c-q*s,n[8]=d*s+E*c,n[9]=m*s+R*c,n[10]=y*s+V*c,n[11]=w*s+q*c,n},x.bq=function(n,t){const i=Rr(n,360),s=Rr(t,360),c=s-i,d=s>i?c-360:c+360;return Math.abs(c)<Math.abs(d)?c:d},x.br=function(n){return n[0]=0,n[1]=0,n[2]=0,n},x.bs=function(n,t,i,s){const c=Math.sqrt(n*n+t*t),d=Math.sqrt(i*i+s*s);n/=c,t/=c,i/=d,s/=d;const m=Math.acos(n*i+t*s);return-t*i+n*s>0?m:-m},x.bt=function(n,t){return n[0]*t[0]+n[1]*t[1]+n[2]*t[2]+n[3]},x.bu=id,x.bv=function(n,t){const i=Rr(n,2*Math.PI),s=Rr(t,2*Math.PI);return Math.min(Math.abs(i-s),Math.abs(i-s+2*Math.PI),Math.abs(i-s-2*Math.PI))},x.bw=function(){const n={},t=$.$version;for(const i in $.$root){const s=$.$root[i];if(s.required){let c=null;c=i==="version"?t:s.type==="array"?[]:{},c!=null&&(n[i]=c)}}return n},x.bx=Hl,x.by=It,x.bz=function(n){n=n.slice();const t=Object.create(null);for(let i=0;i<n.length;i++)t[n[i].id]=n[i];for(let i=0;i<n.length;i++)"ref"in n[i]&&(n[i]=Te(n[i],t[n[i].ref]));return n},x.c=Ft,x.c0=function(n,t){return n[0]===t[0]&&n[1]===t[1]&&n[2]===t[2]&&n[3]===t[3]&&n[4]===t[4]&&n[5]===t[5]&&n[6]===t[6]&&n[7]===t[7]&&n[8]===t[8]&&n[9]===t[9]&&n[10]===t[10]&&n[11]===t[11]&&n[12]===t[12]&&n[13]===t[13]&&n[14]===t[14]&&n[15]===t[15]},x.c1=function(n,t){var i=n[0],s=n[1],c=n[2],d=n[3],m=n[4],y=n[5],w=n[6],E=n[7],R=n[8],V=n[9],q=n[10],j=n[11],W=n[12],X=n[13],re=n[14],ae=n[15],Se=t[0],fe=t[1],U=t[2],Y=t[3],ge=t[4],Re=t[5],$e=t[6],Oe=t[7],He=t[8],ot=t[9],et=t[10],at=t[11],Ze=t[12],St=t[13],Lt=t[14],Pt=t[15];return Math.abs(i-Se)<=me*Math.max(1,Math.abs(i),Math.abs(Se))&&Math.abs(s-fe)<=me*Math.max(1,Math.abs(s),Math.abs(fe))&&Math.abs(c-U)<=me*Math.max(1,Math.abs(c),Math.abs(U))&&Math.abs(d-Y)<=me*Math.max(1,Math.abs(d),Math.abs(Y))&&Math.abs(m-ge)<=me*Math.max(1,Math.abs(m),Math.abs(ge))&&Math.abs(y-Re)<=me*Math.max(1,Math.abs(y),Math.abs(Re))&&Math.abs(w-$e)<=me*Math.max(1,Math.abs(w),Math.abs($e))&&Math.abs(E-Oe)<=me*Math.max(1,Math.abs(E),Math.abs(Oe))&&Math.abs(R-He)<=me*Math.max(1,Math.abs(R),Math.abs(He))&&Math.abs(V-ot)<=me*Math.max(1,Math.abs(V),Math.abs(ot))&&Math.abs(q-et)<=me*Math.max(1,Math.abs(q),Math.abs(et))&&Math.abs(j-at)<=me*Math.max(1,Math.abs(j),Math.abs(at))&&Math.abs(W-Ze)<=me*Math.max(1,Math.abs(W),Math.abs(Ze))&&Math.abs(X-St)<=me*Math.max(1,Math.abs(X),Math.abs(St))&&Math.abs(re-Lt)<=me*Math.max(1,Math.abs(re),Math.abs(Lt))&&Math.abs(ae-Pt)<=me*Math.max(1,Math.abs(ae),Math.abs(Pt))},x.c2=function(n,t){return n[0]=t[0],n[1]=t[1],n[2]=t[2],n[3]=t[3],n[4]=t[4],n[5]=t[5],n[6]=t[6],n[7]=t[7],n[8]=t[8],n[9]=t[9],n[10]=t[10],n[11]=t[11],n[12]=t[12],n[13]=t[13],n[14]=t[14],n[15]=t[15],n},x.c3=n=>n.type==="symbol",x.c4=n=>n.type==="circle",x.c5=n=>n.type==="heatmap",x.c6=n=>n.type==="line",x.c7=n=>n.type==="fill",x.c8=n=>n.type==="fill-extrusion",x.c9=n=>n.type==="hillshade",x.cA=Op,x.cB=jp,x.cC=uc,x.cD=Kp,x.cE=class{constructor(n){this._marks={start:[n.url,"start"].join("#"),end:[n.url,"end"].join("#"),measure:n.url.toString()},performance.mark(this._marks.start)}finish(){performance.mark(this._marks.end);let n=performance.getEntriesByName(this._marks.measure);return n.length===0&&(performance.measure(this._marks.measure,this._marks.start,this._marks.end),n=performance.getEntriesByName(this._marks.measure),performance.clearMarks(this._marks.start),performance.clearMarks(this._marks.end),performance.clearMeasures(this._marks.measure)),n}},x.cF=function(n,t,i,s,c){return o(this,void 0,void 0,function*(){if(te())try{return yield Nt(n,t,i,s,c)}catch{}return function(d,m,y,w,E){const R=d.width,V=d.height;mr&&jr||(mr=new OffscreenCanvas(R,V),jr=mr.getContext("2d",{willReadFrequently:!0})),mr.width=R,mr.height=V,jr.drawImage(d,0,0,R,V);const q=jr.getImageData(m,y,w,E);return jr.clearRect(0,0,R,V),q.data}(n,t,i,s,c)})},x.cG=Jg,x.cH=B,x.cI=H,x.cJ=dg,x.cK=kg,x.cL=Ea,x.cM=Nn,x.ca=n=>n.type==="raster",x.cb=n=>n.type==="background",x.cc=n=>n.type==="custom",x.cd=ln,x.ce=function(n,t,i){const s=ni(t.x-i.x,t.y-i.y),c=ni(n.x-i.x,n.y-i.y);var d,m;return gi(Math.atan2(s[0]*c[1]-s[1]*c[0],(d=s)[0]*(m=c)[0]+d[1]*m[1]))},x.cf=Si,x.cg=function(n,t){return hr[t]&&(n instanceof MouseEvent||n instanceof WheelEvent)},x.ch=function(n,t){return Vi[t]&&"touches"in n},x.ci=function(n){return Vi[n]||hr[n]},x.cj=function(n,t,i){var s=t[0],c=t[1];return n[0]=i[0]*s+i[4]*c+i[12],n[1]=i[1]*s+i[5]*c+i[13],n},x.ck=function(n,t){const{x:i,y:s}=gc.fromLngLat(t);return!(n<0||n>25||s<0||s>=1||i<0||i>=1)},x.cl=function(n,t){return n[0]=t[0],n[1]=0,n[2]=0,n[3]=0,n[4]=0,n[5]=t[1],n[6]=0,n[7]=0,n[8]=0,n[9]=0,n[10]=t[2],n[11]=0,n[12]=0,n[13]=0,n[14]=0,n[15]=1,n},x.cm=class extends Vs{},x.cn=ES,x.cp=function(n){return n.message===lr},x.cq=fr,x.cr=function(n,t){wr.REGISTERED_PROTOCOLS[n]=t},x.cs=function(n){delete wr.REGISTERED_PROTOCOLS[n]},x.ct=function(n,t){const i={};for(let c=0;c<n.length;c++){const d=t&&t[n[c].id]||qu(n[c]);t&&(t[n[c].id]=d);let m=i[d];m||(m=i[d]=[]),m.push(n[c])}const s=[];for(const c in i)s.push(i[c]);return s},x.cu=vt,x.cv=Xg,x.cw=Yg,x.cx=Cg,x.cy=function(n){n.bucket.createArrays(),n.bucket.tilePixelRatio=ir/(512*n.bucket.overscaling),n.bucket.compareText={},n.bucket.iconsNeedLinear=!1;const t=n.bucket.layers[0],i=t.layout,s=t._unevaluatedLayout._values,c={layoutIconSize:s["icon-size"].possiblyEvaluate(new Cr(n.bucket.zoom+1),n.canonical),layoutTextSize:s["text-size"].possiblyEvaluate(new Cr(n.bucket.zoom+1),n.canonical),textMaxSize:s["text-size"].possiblyEvaluate(new Cr(18))};if(n.bucket.textSizeData.kind==="composite"){const{minZoom:E,maxZoom:R}=n.bucket.textSizeData;c.compositeTextSizes=[s["text-size"].possiblyEvaluate(new Cr(E),n.canonical),s["text-size"].possiblyEvaluate(new Cr(R),n.canonical)]}if(n.bucket.iconSizeData.kind==="composite"){const{minZoom:E,maxZoom:R}=n.bucket.iconSizeData;c.compositeIconSizes=[s["icon-size"].possiblyEvaluate(new Cr(E),n.canonical),s["icon-size"].possiblyEvaluate(new Cr(R),n.canonical)]}const d=i.get("text-line-height")*ti,m=i.get("text-rotation-alignment")!=="viewport"&&i.get("symbol-placement")!=="point",y=i.get("text-keep-upright"),w=i.get("text-size");for(const E of n.bucket.features){const R=i.get("text-font").evaluate(E,{},n.canonical).join(","),V=w.evaluate(E,{},n.canonical),q=c.layoutTextSize.evaluate(E,{},n.canonical),j=c.layoutIconSize.evaluate(E,{},n.canonical),W={horizontal:{},vertical:void 0},X=E.text;let re,ae=[0,0];if(X){const U=X.toString(),Y=i.get("text-letter-spacing").evaluate(E,{},n.canonical)*ti,ge=vp(U)?Y:0,Re=i.get("text-anchor").evaluate(E,{},n.canonical),$e=uy(t,E,n.canonical);if(!$e){const et=i.get("text-radial-offset").evaluate(E,{},n.canonical);ae=et?cy(Re,[et*ti,sd]):i.get("text-offset").evaluate(E,{},n.canonical).map(at=>at*ti)}let Oe=m?"center":i.get("text-justify").evaluate(E,{},n.canonical);const He=i.get("symbol-placement")==="point"?i.get("text-max-width").evaluate(E,{},n.canonical)*ti:1/0,ot=()=>{n.bucket.allowVerticalPlacement&&Fa(U)&&(W.vertical=ph(X,n.glyphMap,n.glyphPositions,n.imagePositions,R,He,d,Re,"left",ge,ae,x.al.vertical,!0,q,V))};if(!m&&$e){const et=new Set;if(Oe==="auto")for(let Ze=0;Ze<$e.values.length;Ze+=2)et.add(ad($e.values[Ze]));else et.add(Oe);let at=!1;for(const Ze of et)if(!W.horizontal[Ze])if(at)W.horizontal[Ze]=W.horizontal[0];else{const St=ph(X,n.glyphMap,n.glyphPositions,n.imagePositions,R,He,d,"center",Ze,ge,ae,x.al.horizontal,!1,q,V);St&&(W.horizontal[Ze]=St,at=St.positionedLines.length===1)}ot()}else{Oe==="auto"&&(Oe=ad(Re));const et=ph(X,n.glyphMap,n.glyphPositions,n.imagePositions,R,He,d,Re,Oe,ge,ae,x.al.horizontal,!1,q,V);et&&(W.horizontal[Oe]=et),ot(),Fa(U)&&m&&y&&(W.vertical=ph(X,n.glyphMap,n.glyphPositions,n.imagePositions,R,He,d,Re,Oe,ge,ae,x.al.vertical,!1,q,V))}}let Se=!1;if(E.icon&&E.icon.name){const U=n.imageMap[E.icon.name];U&&(re=cS(n.imagePositions[E.icon.name],i.get("icon-offset").evaluate(E,{},n.canonical),i.get("icon-anchor").evaluate(E,{},n.canonical)),Se=!!U.sdf,n.bucket.sdfIcons===void 0?n.bucket.sdfIcons=Se:n.bucket.sdfIcons!==Se&&bt("Style sheet warning: Cannot mix SDF and non-SDF icons in one buffer"),(U.pixelRatio!==n.bucket.pixelRatio||i.get("icon-rotate").constantOr(1)!==0)&&(n.bucket.iconsNeedLinear=!0))}const fe=py(W.horizontal)||W.vertical;n.bucket.iconsInText=!!fe&&fe.iconsInText,(fe||re)&&TS(n.bucket,E,W,re,n.imageMap,c,q,j,ae,Se,n.canonical,n.subdivisionGranularity)}n.showCollisionBoxes&&n.bucket.generateCollisionDebugBuffers()},x.cz=Hp,x.d=Ae,x.e=Yr,x.f=n=>o(void 0,void 0,void 0,function*(){if(n.byteLength===0)return createImageBitmap(new ImageData(1,1));const t=new Blob([new Uint8Array(n)],{type:"image/png"});try{return createImageBitmap(t)}catch(i){throw new Error(`Could not load image because of ${i.message}. Please make sure to use a supported image type such as PNG or JPEG. Note that SVGs are not supported.`)}}),x.g=dr,x.h=n=>new Promise((t,i)=>{const s=new Image;s.onload=()=>{t(s),URL.revokeObjectURL(s.src),s.onload=null,window.requestAnimationFrame(()=>{s.src=pr})},s.onerror=()=>i(new 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."));const c=new Blob([new Uint8Array(n)],{type:"image/png"});s.src=n.byteLength?URL.createObjectURL(c):pr}),x.i=Bt,x.j=(n,t)=>wt(Yr(n,{type:"json"}),t),x.k=he,x.l=ee,x.m=wt,x.n=(n,t)=>wt(Yr(n,{type:"arrayBuffer"}),t),x.o=function(n){return new Kp(n).readFields(Q2,[])},x.p=Tg,x.q=ic,x.r=Gr,x.s=mi,x.t=za,x.u=er,x.v=$,x.w=bt,x.x=jl,x.y=Wo,x.z=function([n,t,i]){return t+=90,t*=Math.PI/180,i*=Math.PI/180,{x:n*Math.cos(t)*Math.sin(i),y:n*Math.sin(t)*Math.sin(i),z:n*Math.cos(i)}}}),k("worker",["./shared"],function(x){class o{constructor(K){this.keyCache={},K&&this.replace(K)}replace(K){this._layerConfigs={},this._layers={},this.update(K,[])}update(K,Q){for(const he of K){this._layerConfigs[he.id]=he;const ve=this._layers[he.id]=x.bA(he);ve._featureFilter=x.a7(ve.filter),this.keyCache[he.id]&&delete this.keyCache[he.id]}for(const he of Q)delete this.keyCache[he],delete this._layerConfigs[he],delete this._layers[he];this.familiesBySource={};const ee=x.ct(Object.values(this._layerConfigs),this.keyCache);for(const he of ee){const ve=he.map(Pe=>this._layers[Pe.id]),$=ve[0];if($.visibility==="none")continue;const Me=$.source||"";let Te=this.familiesBySource[Me];Te||(Te=this.familiesBySource[Me]={});const Ie=$.sourceLayer||"_geojsonTileLayer";let Ve=Te[Ie];Ve||(Ve=Te[Ie]=[]),Ve.push(ve)}}}class B{constructor(K){const Q={},ee=[];for(const Me in K){const Te=K[Me],Ie=Q[Me]={};for(const Ve in Te){const Pe=Te[+Ve];if(!Pe||Pe.bitmap.width===0||Pe.bitmap.height===0)continue;const Qe={x:0,y:0,w:Pe.bitmap.width+2,h:Pe.bitmap.height+2};ee.push(Qe),Ie[Ve]={rect:Qe,metrics:Pe.metrics}}}const{w:he,h:ve}=x.p(ee),$=new x.q({width:he||1,height:ve||1});for(const Me in K){const Te=K[Me];for(const Ie in Te){const Ve=Te[+Ie];if(!Ve||Ve.bitmap.width===0||Ve.bitmap.height===0)continue;const Pe=Q[Me][Ie].rect;x.q.copy(Ve.bitmap,$,{x:0,y:0},{x:Pe.x+1,y:Pe.y+1},Ve.bitmap)}}this.image=$,this.positions=Q}}x.cu("GlyphAtlas",B);class D{constructor(K){this.tileID=new x.Y(K.tileID.overscaledZ,K.tileID.wrap,K.tileID.canonical.z,K.tileID.canonical.x,K.tileID.canonical.y),this.uid=K.uid,this.zoom=K.zoom,this.pixelRatio=K.pixelRatio,this.tileSize=K.tileSize,this.source=K.source,this.overscaling=this.tileID.overscaleFactor(),this.showCollisionBoxes=K.showCollisionBoxes,this.collectResourceTiming=!!K.collectResourceTiming,this.returnDependencies=!!K.returnDependencies,this.promoteId=K.promoteId,this.inFlightDependencies=[]}parse(K,Q,ee,he,ve){return x._(this,void 0,void 0,function*(){this.status="parsing",this.data=K,this.collisionBoxArray=new x.a5;const $=new x.cv(Object.keys(K.layers).sort()),Me=new x.cw(this.tileID,this.promoteId);Me.bucketLayerIDs=[];const Te={},Ie={featureIndex:Me,iconDependencies:{},patternDependencies:{},glyphDependencies:{},availableImages:ee,subdivisionGranularity:ve},Ve=Q.familiesBySource[this.source];for(const Dt in Ve){const Xe=K.layers[Dt];if(!Xe)continue;Xe.version===1&&x.w(`Vector tile source "${this.source}" layer "${Dt}" does not use vector tile spec v2 and therefore may have some rendering errors.`);const Mt=$.encode(Dt),Wt=[];for(let Tr=0;Tr<Xe.length;Tr++){const gr=Xe.feature(Tr),yi=Me.getId(gr,Dt);Wt.push({feature:gr,id:yi,index:Tr,sourceLayerIndex:Mt})}for(const Tr of Ve[Dt]){const gr=Tr[0];gr.source!==this.source&&x.w(`layer.source = ${gr.source} does not equal this.source = ${this.source}`),gr.minzoom&&this.zoom<Math.floor(gr.minzoom)||gr.maxzoom&&this.zoom>=gr.maxzoom||gr.visibility!=="none"&&(L(Tr,this.zoom,ee),(Te[gr.id]=gr.createBucket({index:Me.bucketLayerIDs.length,layers:Tr,zoom:this.zoom,pixelRatio:this.pixelRatio,overscaling:this.overscaling,collisionBoxArray:this.collisionBoxArray,sourceLayerIndex:Mt,sourceID:this.source})).populate(Wt,Ie,this.tileID.canonical),Me.bucketLayerIDs.push(Tr.map(yi=>yi.id)))}}const Pe=x.bF(Ie.glyphDependencies,Dt=>Object.keys(Dt).map(Number));this.inFlightDependencies.forEach(Dt=>Dt==null?void 0:Dt.abort()),this.inFlightDependencies=[];let Qe=Promise.resolve({});if(Object.keys(Pe).length){const Dt=new AbortController;this.inFlightDependencies.push(Dt),Qe=he.sendAsync({type:"GG",data:{stacks:Pe,source:this.source,tileID:this.tileID,type:"glyphs"}},Dt)}const ut=Object.keys(Ie.iconDependencies);let yt=Promise.resolve({});if(ut.length){const Dt=new AbortController;this.inFlightDependencies.push(Dt),yt=he.sendAsync({type:"GI",data:{icons:ut,source:this.source,tileID:this.tileID,type:"icons"}},Dt)}const Et=Object.keys(Ie.patternDependencies);let jt=Promise.resolve({});if(Et.length){const Dt=new AbortController;this.inFlightDependencies.push(Dt),jt=he.sendAsync({type:"GI",data:{icons:Et,source:this.source,tileID:this.tileID,type:"patterns"}},Dt)}const[Rt,Ue,ar]=yield Promise.all([Qe,yt,jt]),Qt=new B(Rt),or=new x.cx(Ue,ar);for(const Dt in Te){const Xe=Te[Dt];Xe instanceof x.a6?(L(Xe.layers,this.zoom,ee),x.cy({bucket:Xe,glyphMap:Rt,glyphPositions:Qt.positions,imageMap:Ue,imagePositions:or.iconPositions,showCollisionBoxes:this.showCollisionBoxes,canonical:this.tileID.canonical,subdivisionGranularity:Ie.subdivisionGranularity})):Xe.hasPattern&&(Xe instanceof x.cz||Xe instanceof x.cA||Xe instanceof x.cB)&&(L(Xe.layers,this.zoom,ee),Xe.addFeatures(Ie,this.tileID.canonical,or.patternPositions))}return this.status="done",{buckets:Object.values(Te).filter(Dt=>!Dt.isEmpty()),featureIndex:Me,collisionBoxArray:this.collisionBoxArray,glyphAtlasImage:Qt.image,imageAtlas:or,glyphMap:this.returnDependencies?Rt:null,iconMap:this.returnDependencies?Ue:null,glyphPositions:this.returnDependencies?Qt.positions:null}})}}function L(Ae,K,Q){const ee=new x.C(K);for(const he of Ae)he.recalculate(ee,Q)}class H{constructor(K,Q,ee){this.actor=K,this.layerIndex=Q,this.availableImages=ee,this.fetching={},this.loading={},this.loaded={}}loadVectorTile(K,Q){return x._(this,void 0,void 0,function*(){const ee=yield x.n(K.request,Q);try{return{vectorTile:new x.cC.VectorTile(new x.cD(ee.data)),rawData:ee.data,cacheControl:ee.cacheControl,expires:ee.expires}}catch(he){const ve=new Uint8Array(ee.data);let $=`Unable to parse the tile at ${K.request.url}, `;throw $+=ve[0]===31&&ve[1]===139?"please make sure the data is not gzipped and that you have configured the relevant header in the server":`got error: ${he.message}`,new Error($)}})}loadTile(K){return x._(this,void 0,void 0,function*(){const Q=K.uid,ee=!!(K&&K.request&&K.request.collectResourceTiming)&&new x.cE(K.request),he=new D(K);this.loading[Q]=he;const ve=new AbortController;he.abort=ve;try{const $=yield this.loadVectorTile(K,ve);if(delete this.loading[Q],!$)return null;const Me=$.rawData,Te={};$.expires&&(Te.expires=$.expires),$.cacheControl&&(Te.cacheControl=$.cacheControl);const Ie={};if(ee){const Pe=ee.finish();Pe&&(Ie.resourceTiming=JSON.parse(JSON.stringify(Pe)))}he.vectorTile=$.vectorTile;const Ve=he.parse($.vectorTile,this.layerIndex,this.availableImages,this.actor,K.subdivisionGranularity);this.loaded[Q]=he,this.fetching[Q]={rawTileData:Me,cacheControl:Te,resourceTiming:Ie};try{const Pe=yield Ve;return x.e({rawTileData:Me.slice(0)},Pe,Te,Ie)}finally{delete this.fetching[Q]}}catch($){throw delete this.loading[Q],he.status="done",this.loaded[Q]=he,$}})}reloadTile(K){return x._(this,void 0,void 0,function*(){const Q=K.uid;if(!this.loaded||!this.loaded[Q])throw new Error("Should not be trying to reload a tile that was never loaded or has been removed");const ee=this.loaded[Q];if(ee.showCollisionBoxes=K.showCollisionBoxes,ee.status==="parsing"){const he=yield ee.parse(ee.vectorTile,this.layerIndex,this.availableImages,this.actor,K.subdivisionGranularity);let ve;if(this.fetching[Q]){const{rawTileData:$,cacheControl:Me,resourceTiming:Te}=this.fetching[Q];delete this.fetching[Q],ve=x.e({rawTileData:$.slice(0)},he,Me,Te)}else ve=he;return ve}if(ee.status==="done"&&ee.vectorTile)return ee.parse(ee.vectorTile,this.layerIndex,this.availableImages,this.actor,K.subdivisionGranularity)})}abortTile(K){return x._(this,void 0,void 0,function*(){const Q=this.loading,ee=K.uid;Q&&Q[ee]&&Q[ee].abort&&(Q[ee].abort.abort(),delete Q[ee])})}removeTile(K){return x._(this,void 0,void 0,function*(){this.loaded&&this.loaded[K.uid]&&delete this.loaded[K.uid]})}}class M{constructor(){this.loaded={}}loadTile(K){return x._(this,void 0,void 0,function*(){const{uid:Q,encoding:ee,rawImageData:he,redFactor:ve,greenFactor:$,blueFactor:Me,baseShift:Te}=K,Ie=he.width+2,Ve=he.height+2,Pe=x.b(he)?new x.R({width:Ie,height:Ve},yield x.cF(he,-1,-1,Ie,Ve)):he,Qe=new x.cG(Q,Pe,ee,ve,$,Me,Te);return this.loaded=this.loaded||{},this.loaded[Q]=Qe,Qe})}removeTile(K){const Q=this.loaded,ee=K.uid;Q&&Q[ee]&&delete Q[ee]}}var C,T,N=function(){if(T)return C;function Ae(Q,ee){if(Q.length!==0){K(Q[0],ee);for(var he=1;he<Q.length;he++)K(Q[he],!ee)}}function K(Q,ee){for(var he=0,ve=0,$=0,Me=Q.length,Te=Me-1;$<Me;Te=$++){var Ie=(Q[$][0]-Q[Te][0])*(Q[Te][1]+Q[$][1]),Ve=he+Ie;ve+=Math.abs(he)>=Math.abs(Ie)?he-Ve+Ie:Ie-Ve+he,he=Ve}he+ve>=0!=!!ee&&Q.reverse()}return T=1,C=function Q(ee,he){var ve,$=ee&&ee.type;if($==="FeatureCollection")for(ve=0;ve<ee.features.length;ve++)Q(ee.features[ve],he);else if($==="GeometryCollection")for(ve=0;ve<ee.geometries.length;ve++)Q(ee.geometries[ve],he);else if($==="Feature")Q(ee.geometry,he);else if($==="Polygon")Ae(ee.coordinates,he);else if($==="MultiPolygon")for(ve=0;ve<ee.coordinates.length;ve++)Ae(ee.coordinates[ve],he);return ee}}(),G=x.cH(N);const ie=x.cC.VectorTileFeature.prototype.toGeoJSON;class le{constructor(K){this._feature=K,this.extent=x.Z,this.type=K.type,this.properties=K.tags,"id"in K&&!isNaN(K.id)&&(this.id=parseInt(K.id,10))}loadGeometry(){if(this._feature.type===1){const K=[];for(const Q of this._feature.geometry)K.push([new x.P(Q[0],Q[1])]);return K}{const K=[];for(const Q of this._feature.geometry){const ee=[];for(const he of Q)ee.push(new x.P(he[0],he[1]));K.push(ee)}return K}}toGeoJSON(K,Q,ee){return ie.call(this,K,Q,ee)}}class Ee{constructor(K){this.layers={_geojsonTileLayer:this},this.name="_geojsonTileLayer",this.extent=x.Z,this.length=K.length,this._features=K}feature(K){return new le(this._features[K])}}var te,me,De,qe={exports:{}},rt=function(){if(De)return qe.exports;De=1;var Ae=x.cK(),K=function(){if(me)return te;me=1;var Ve=x.cI(),Pe=x.cJ().VectorTileFeature;function Qe(yt,Et){this.options=Et||{},this.features=yt,this.length=yt.length}function ut(yt,Et){this.id=typeof yt.id=="number"?yt.id:void 0,this.type=yt.type,this.rawGeometry=yt.type===1?[yt.geometry]:yt.geometry,this.properties=yt.tags,this.extent=Et||4096}return te=Qe,Qe.prototype.feature=function(yt){return new ut(this.features[yt],this.options.extent)},ut.prototype.loadGeometry=function(){var yt=this.rawGeometry;this.geometry=[];for(var Et=0;Et<yt.length;Et++){for(var jt=yt[Et],Rt=[],Ue=0;Ue<jt.length;Ue++)Rt.push(new Ve(jt[Ue][0],jt[Ue][1]));this.geometry.push(Rt)}return this.geometry},ut.prototype.bbox=function(){this.geometry||this.loadGeometry();for(var yt=this.geometry,Et=1/0,jt=-1/0,Rt=1/0,Ue=-1/0,ar=0;ar<yt.length;ar++)for(var Qt=yt[ar],or=0;or<Qt.length;or++){var Dt=Qt[or];Et=Math.min(Et,Dt.x),jt=Math.max(jt,Dt.x),Rt=Math.min(Rt,Dt.y),Ue=Math.max(Ue,Dt.y)}return[Et,Rt,jt,Ue]},ut.prototype.toGeoJSON=Pe.prototype.toGeoJSON,te}();function Q(Ve){var Pe=new Ae;return function(Qe,ut){for(var yt in Qe.layers)ut.writeMessage(3,ee,Qe.layers[yt])}(Ve,Pe),Pe.finish()}function ee(Ve,Pe){var Qe;Pe.writeVarintField(15,Ve.version||1),Pe.writeStringField(1,Ve.name||""),Pe.writeVarintField(5,Ve.extent||4096);var ut={keys:[],values:[],keycache:{},valuecache:{}};for(Qe=0;Qe<Ve.length;Qe++)ut.feature=Ve.feature(Qe),Pe.writeMessage(2,he,ut);var yt=ut.keys;for(Qe=0;Qe<yt.length;Qe++)Pe.writeStringField(3,yt[Qe]);var Et=ut.values;for(Qe=0;Qe<Et.length;Qe++)Pe.writeMessage(4,Ie,Et[Qe])}function he(Ve,Pe){var Qe=Ve.feature;Qe.id!==void 0&&Pe.writeVarintField(1,Qe.id),Pe.writeMessage(2,ve,Ve),Pe.writeVarintField(3,Qe.type),Pe.writeMessage(4,Te,Qe)}function ve(Ve,Pe){var Qe=Ve.feature,ut=Ve.keys,yt=Ve.values,Et=Ve.keycache,jt=Ve.valuecache;for(var Rt in Qe.properties){var Ue=Qe.properties[Rt],ar=Et[Rt];if(Ue!==null){ar===void 0&&(ut.push(Rt),Et[Rt]=ar=ut.length-1),Pe.writeVarint(ar);var Qt=typeof Ue;Qt!=="string"&&Qt!=="boolean"&&Qt!=="number"&&(Ue=JSON.stringify(Ue));var or=Qt+":"+Ue,Dt=jt[or];Dt===void 0&&(yt.push(Ue),jt[or]=Dt=yt.length-1),Pe.writeVarint(Dt)}}}function $(Ve,Pe){return(Pe<<3)+(7&Ve)}function Me(Ve){return Ve<<1^Ve>>31}function Te(Ve,Pe){for(var Qe=Ve.loadGeometry(),ut=Ve.type,yt=0,Et=0,jt=Qe.length,Rt=0;Rt<jt;Rt++){var Ue=Qe[Rt],ar=1;ut===1&&(ar=Ue.length),Pe.writeVarint($(1,ar));for(var Qt=ut===3?Ue.length-1:Ue.length,or=0;or<Qt;or++){or===1&&ut!==1&&Pe.writeVarint($(2,Qt-1));var Dt=Ue[or].x-yt,Xe=Ue[or].y-Et;Pe.writeVarint(Me(Dt)),Pe.writeVarint(Me(Xe)),yt+=Dt,Et+=Xe}ut===3&&Pe.writeVarint($(7,1))}}function Ie(Ve,Pe){var Qe=typeof Ve;Qe==="string"?Pe.writeStringField(1,Ve):Qe==="boolean"?Pe.writeBooleanField(7,Ve):Qe==="number"&&(Ve%1!=0?Pe.writeDoubleField(3,Ve):Ve<0?Pe.writeSVarintField(6,Ve):Pe.writeVarintField(5,Ve))}return qe.exports=Q,qe.exports.fromVectorTileJs=Q,qe.exports.fromGeojsonVt=function(Ve,Pe){Pe=Pe||{};var Qe={};for(var ut in Ve)Qe[ut]=new K(Ve[ut].features,Pe),Qe[ut].name=ut,Qe[ut].version=Pe.version,Qe[ut].extent=Pe.extent;return Q({layers:Qe})},qe.exports.GeoJSONWrapper=K,qe.exports}(),At=x.cH(rt);const _t={minZoom:0,maxZoom:16,minPoints:2,radius:40,extent:512,nodeSize:64,log:!1,generateId:!1,reduce:null,map:Ae=>Ae},lt=Math.fround||(xt=new Float32Array(1),Ae=>(xt[0]=+Ae,xt[0]));var xt;const qt=3,Xt=5,kr=6;class vr{constructor(K){this.options=Object.assign(Object.create(_t),K),this.trees=new Array(this.options.maxZoom+1),this.stride=this.options.reduce?7:6,this.clusterProps=[]}load(K){const{log:Q,minZoom:ee,maxZoom:he}=this.options;Q&&console.time("total time");const ve=`prepare ${K.length} points`;Q&&console.time(ve),this.points=K;const $=[];for(let Te=0;Te<K.length;Te++){const Ie=K[Te];if(!Ie.geometry)continue;const[Ve,Pe]=Ie.geometry.coordinates,Qe=lt(Ji(Ve)),ut=lt(Rr(Pe));$.push(Qe,ut,1/0,Te,-1,1),this.options.reduce&&$.push(0)}let Me=this.trees[he+1]=this._createTree($);Q&&console.timeEnd(ve);for(let Te=he;Te>=ee;Te--){const Ie=+Date.now();Me=this.trees[Te]=this._createTree(this._cluster(Me,Te)),Q&&console.log("z%d: %d clusters in %dms",Te,Me.numItems,+Date.now()-Ie)}return Q&&console.timeEnd("total time"),this}getClusters(K,Q){let ee=((K[0]+180)%360+360)%360-180;const he=Math.max(-90,Math.min(90,K[1]));let ve=K[2]===180?180:((K[2]+180)%360+360)%360-180;const $=Math.max(-90,Math.min(90,K[3]));if(K[2]-K[0]>=360)ee=-180,ve=180;else if(ee>ve){const Pe=this.getClusters([ee,he,180,$],Q),Qe=this.getClusters([-180,he,ve,$],Q);return Pe.concat(Qe)}const Me=this.trees[this._limitZoom(Q)],Te=Me.range(Ji(ee),Rr($),Ji(ve),Rr(he)),Ie=Me.data,Ve=[];for(const Pe of Te){const Qe=this.stride*Pe;Ve.push(Ie[Qe+Xt]>1?ni(Ie,Qe,this.clusterProps):this.points[Ie[Qe+qt]])}return Ve}getChildren(K){const Q=this._getOriginId(K),ee=this._getOriginZoom(K),he="No cluster with the specified id.",ve=this.trees[ee];if(!ve)throw new Error(he);const $=ve.data;if(Q*this.stride>=$.length)throw new Error(he);const Me=this.options.radius/(this.options.extent*Math.pow(2,ee-1)),Te=ve.within($[Q*this.stride],$[Q*this.stride+1],Me),Ie=[];for(const Ve of Te){const Pe=Ve*this.stride;$[Pe+4]===K&&Ie.push($[Pe+Xt]>1?ni($,Pe,this.clusterProps):this.points[$[Pe+qt]])}if(Ie.length===0)throw new Error(he);return Ie}getLeaves(K,Q,ee){const he=[];return this._appendLeaves(he,K,Q=Q||10,ee=ee||0,0),he}getTile(K,Q,ee){const he=this.trees[this._limitZoom(K)],ve=Math.pow(2,K),{extent:$,radius:Me}=this.options,Te=Me/$,Ie=(ee-Te)/ve,Ve=(ee+1+Te)/ve,Pe={features:[]};return this._addTileFeatures(he.range((Q-Te)/ve,Ie,(Q+1+Te)/ve,Ve),he.data,Q,ee,ve,Pe),Q===0&&this._addTileFeatures(he.range(1-Te/ve,Ie,1,Ve),he.data,ve,ee,ve,Pe),Q===ve-1&&this._addTileFeatures(he.range(0,Ie,Te/ve,Ve),he.data,-1,ee,ve,Pe),Pe.features.length?Pe:null}getClusterExpansionZoom(K){let Q=this._getOriginZoom(K)-1;for(;Q<=this.options.maxZoom;){const ee=this.getChildren(K);if(Q++,ee.length!==1)break;K=ee[0].properties.cluster_id}return Q}_appendLeaves(K,Q,ee,he,ve){const $=this.getChildren(Q);for(const Me of $){const Te=Me.properties;if(Te&&Te.cluster?ve+Te.point_count<=he?ve+=Te.point_count:ve=this._appendLeaves(K,Te.cluster_id,ee,he,ve):ve<he?ve++:K.push(Me),K.length===ee)break}return ve}_createTree(K){const Q=new x.aF(K.length/this.stride|0,this.options.nodeSize,Float32Array);for(let ee=0;ee<K.length;ee+=this.stride)Q.add(K[ee],K[ee+1]);return Q.finish(),Q.data=K,Q}_addTileFeatures(K,Q,ee,he,ve,$){for(const Me of K){const Te=Me*this.stride,Ie=Q[Te+Xt]>1;let Ve,Pe,Qe;if(Ie)Ve=ir(Q,Te,this.clusterProps),Pe=Q[Te],Qe=Q[Te+1];else{const Et=this.points[Q[Te+qt]];Ve=Et.properties;const[jt,Rt]=Et.geometry.coordinates;Pe=Ji(jt),Qe=Rr(Rt)}const ut={type:1,geometry:[[Math.round(this.options.extent*(Pe*ve-ee)),Math.round(this.options.extent*(Qe*ve-he))]],tags:Ve};let yt;yt=Ie||this.options.generateId?Q[Te+qt]:this.points[Q[Te+qt]].id,yt!==void 0&&(ut.id=yt),$.features.push(ut)}}_limitZoom(K){return Math.max(this.options.minZoom,Math.min(Math.floor(+K),this.options.maxZoom+1))}_cluster(K,Q){const{radius:ee,extent:he,reduce:ve,minPoints:$}=this.options,Me=ee/(he*Math.pow(2,Q)),Te=K.data,Ie=[],Ve=this.stride;for(let Pe=0;Pe<Te.length;Pe+=Ve){if(Te[Pe+2]<=Q)continue;Te[Pe+2]=Q;const Qe=Te[Pe],ut=Te[Pe+1],yt=K.within(Te[Pe],Te[Pe+1],Me),Et=Te[Pe+Xt];let jt=Et;for(const Rt of yt){const Ue=Rt*Ve;Te[Ue+2]>Q&&(jt+=Te[Ue+Xt])}if(jt>Et&&jt>=$){let Rt,Ue=Qe*Et,ar=ut*Et,Qt=-1;const or=((Pe/Ve|0)<<5)+(Q+1)+this.points.length;for(const Dt of yt){const Xe=Dt*Ve;if(Te[Xe+2]<=Q)continue;Te[Xe+2]=Q;const Mt=Te[Xe+Xt];Ue+=Te[Xe]*Mt,ar+=Te[Xe+1]*Mt,Te[Xe+4]=or,ve&&(Rt||(Rt=this._map(Te,Pe,!0),Qt=this.clusterProps.length,this.clusterProps.push(Rt)),ve(Rt,this._map(Te,Xe)))}Te[Pe+4]=or,Ie.push(Ue/jt,ar/jt,1/0,or,-1,jt),ve&&Ie.push(Qt)}else{for(let Rt=0;Rt<Ve;Rt++)Ie.push(Te[Pe+Rt]);if(jt>1)for(const Rt of yt){const Ue=Rt*Ve;if(!(Te[Ue+2]<=Q)){Te[Ue+2]=Q;for(let ar=0;ar<Ve;ar++)Ie.push(Te[Ue+ar])}}}}return Ie}_getOriginId(K){return K-this.points.length>>5}_getOriginZoom(K){return(K-this.points.length)%32}_map(K,Q,ee){if(K[Q+Xt]>1){const $=this.clusterProps[K[Q+kr]];return ee?Object.assign({},$):$}const he=this.points[K[Q+qt]].properties,ve=this.options.map(he);return ee&&ve===he?Object.assign({},ve):ve}}function ni(Ae,K,Q){return{type:"Feature",id:Ae[K+qt],properties:ir(Ae,K,Q),geometry:{type:"Point",coordinates:[(ee=Ae[K],360*(ee-.5)),Xi(Ae[K+1])]}};var ee}function ir(Ae,K,Q){const ee=Ae[K+Xt],he=ee>=1e4?`${Math.round(ee/1e3)}k`:ee>=1e3?Math.round(ee/100)/10+"k":ee,ve=Ae[K+kr],$=ve===-1?{}:Object.assign({},Q[ve]);return Object.assign($,{cluster:!0,cluster_id:Ae[K+qt],point_count:ee,point_count_abbreviated:he})}function Ji(Ae){return Ae/360+.5}function Rr(Ae){const K=Math.sin(Ae*Math.PI/180),Q=.5-.25*Math.log((1+K)/(1-K))/Math.PI;return Q<0?0:Q>1?1:Q}function Xi(Ae){const K=(180-360*Ae)*Math.PI/180;return 360*Math.atan(Math.exp(K))/Math.PI-90}function Dr(Ae,K,Q,ee){let he=ee;const ve=K+(Q-K>>1);let $,Me=Q-K;const Te=Ae[K],Ie=Ae[K+1],Ve=Ae[Q],Pe=Ae[Q+1];for(let Qe=K+3;Qe<Q;Qe+=3){const ut=ln(Ae[Qe],Ae[Qe+1],Te,Ie,Ve,Pe);if(ut>he)$=Qe,he=ut;else if(ut===he){const yt=Math.abs(Qe-ve);yt<Me&&($=Qe,Me=yt)}}he>ee&&($-K>3&&Dr(Ae,K,$,ee),Ae[$+2]=he,Q-$>3&&Dr(Ae,$,Q,ee))}function ln(Ae,K,Q,ee,he,ve){let $=he-Q,Me=ve-ee;if($!==0||Me!==0){const Te=((Ae-Q)*$+(K-ee)*Me)/($*$+Me*Me);Te>1?(Q=he,ee=ve):Te>0&&(Q+=$*Te,ee+=Me*Te)}return $=Ae-Q,Me=K-ee,$*$+Me*Me}function Si(Ae,K,Q,ee){const he={id:Ae??null,type:K,geometry:Q,tags:ee,minX:1/0,minY:1/0,maxX:-1/0,maxY:-1/0};if(K==="Point"||K==="MultiPoint"||K==="LineString")Zr(he,Q);else if(K==="Polygon")Zr(he,Q[0]);else if(K==="MultiLineString")for(const ve of Q)Zr(he,ve);else if(K==="MultiPolygon")for(const ve of Q)Zr(he,ve[0]);return he}function Zr(Ae,K){for(let Q=0;Q<K.length;Q+=3)Ae.minX=Math.min(Ae.minX,K[Q]),Ae.minY=Math.min(Ae.minY,K[Q+1]),Ae.maxX=Math.max(Ae.maxX,K[Q]),Ae.maxY=Math.max(Ae.maxY,K[Q+1])}function Qi(Ae,K,Q,ee){if(!K.geometry)return;const he=K.geometry.coordinates;if(he&&he.length===0)return;const ve=K.geometry.type,$=Math.pow(Q.tolerance/((1<<Q.maxZoom)*Q.extent),2);let Me=[],Te=K.id;if(Q.promoteId?Te=K.properties[Q.promoteId]:Q.generateId&&(Te=ee||0),ve==="Point")Yr(he,Me);else if(ve==="MultiPoint")for(const Ie of he)Yr(Ie,Me);else if(ve==="LineString")Yi(he,Me,$,!1);else if(ve==="MultiLineString"){if(Q.lineMetrics){for(const Ie of he)Me=[],Yi(Ie,Me,$,!1),Ae.push(Si(Te,"LineString",Me,K.properties));return}Li(he,Me,$,!1)}else if(ve==="Polygon")Li(he,Me,$,!0);else{if(ve!=="MultiPolygon"){if(ve==="GeometryCollection"){for(const Ie of K.geometry.geometries)Qi(Ae,{id:Te,geometry:Ie,properties:K.properties},Q,ee);return}throw new Error("Input data is not a valid GeoJSON object.")}for(const Ie of he){const Ve=[];Li(Ie,Ve,$,!0),Me.push(Ve)}}Ae.push(Si(Te,ve,Me,K.properties))}function Yr(Ae,K){K.push(In(Ae[0]),fi(Ae[1]),0)}function Yi(Ae,K,Q,ee){let he,ve,$=0;for(let Te=0;Te<Ae.length;Te++){const Ie=In(Ae[Te][0]),Ve=fi(Ae[Te][1]);K.push(Ie,Ve,0),Te>0&&($+=ee?(he*Ve-Ie*ve)/2:Math.sqrt(Math.pow(Ie-he,2)+Math.pow(Ve-ve,2))),he=Ie,ve=Ve}const Me=K.length-3;K[2]=1,Dr(K,0,Me,Q),K[Me+2]=1,K.size=Math.abs($),K.start=0,K.end=K.size}function Li(Ae,K,Q,ee){for(let he=0;he<Ae.length;he++){const ve=[];Yi(Ae[he],ve,Q,ee),K.push(ve)}}function In(Ae){return Ae/360+.5}function fi(Ae){const K=Math.sin(Ae*Math.PI/180),Q=.5-.25*Math.log((1+K)/(1-K))/Math.PI;return Q<0?0:Q>1?1:Q}function gt(Ae,K,Q,ee,he,ve,$,Me){if(ee/=K,ve>=(Q/=K)&&$<ee)return Ae;if($<Q||ve>=ee)return null;const Te=[];for(const Ie of Ae){const Ve=Ie.geometry;let Pe=Ie.type;const Qe=he===0?Ie.minX:Ie.minY,ut=he===0?Ie.maxX:Ie.maxY;if(Qe>=Q&&ut<ee){Te.push(Ie);continue}if(ut<Q||Qe>=ee)continue;let yt=[];if(Pe==="Point"||Pe==="MultiPoint")bt(Ve,yt,Q,ee,he);else if(Pe==="LineString")ct(Ve,yt,Q,ee,he,!1,Me.lineMetrics);else if(Pe==="MultiLineString")Ht(Ve,yt,Q,ee,he,!1);else if(Pe==="Polygon")Ht(Ve,yt,Q,ee,he,!0);else if(Pe==="MultiPolygon")for(const Et of Ve){const jt=[];Ht(Et,jt,Q,ee,he,!0),jt.length&&yt.push(jt)}if(yt.length){if(Me.lineMetrics&&Pe==="LineString"){for(const Et of yt)Te.push(Si(Ie.id,Pe,Et,Ie.tags));continue}Pe!=="LineString"&&Pe!=="MultiLineString"||(yt.length===1?(Pe="LineString",yt=yt[0]):Pe="MultiLineString"),Pe!=="Point"&&Pe!=="MultiPoint"||(Pe=yt.length===3?"Point":"MultiPoint"),Te.push(Si(Ie.id,Pe,yt,Ie.tags))}}return Te.length?Te:null}function bt(Ae,K,Q,ee,he){for(let ve=0;ve<Ae.length;ve+=3){const $=Ae[ve+he];$>=Q&&$<=ee&&Ot(K,Ae[ve],Ae[ve+1],Ae[ve+2])}}function ct(Ae,K,Q,ee,he,ve,$){let Me=Bt(Ae);const Te=he===0?pr:Nt;let Ie,Ve,Pe=Ae.start;for(let jt=0;jt<Ae.length-3;jt+=3){const Rt=Ae[jt],Ue=Ae[jt+1],ar=Ae[jt+2],Qt=Ae[jt+3],or=Ae[jt+4],Dt=he===0?Rt:Ue,Xe=he===0?Qt:or;let Mt=!1;$&&(Ie=Math.sqrt(Math.pow(Rt-Qt,2)+Math.pow(Ue-or,2))),Dt<Q?Xe>Q&&(Ve=Te(Me,Rt,Ue,Qt,or,Q),$&&(Me.start=Pe+Ie*Ve)):Dt>ee?Xe<ee&&(Ve=Te(Me,Rt,Ue,Qt,or,ee),$&&(Me.start=Pe+Ie*Ve)):Ot(Me,Rt,Ue,ar),Xe<Q&&Dt>=Q&&(Ve=Te(Me,Rt,Ue,Qt,or,Q),Mt=!0),Xe>ee&&Dt<=ee&&(Ve=Te(Me,Rt,Ue,Qt,or,ee),Mt=!0),!ve&&Mt&&($&&(Me.end=Pe+Ie*Ve),K.push(Me),Me=Bt(Ae)),$&&(Pe+=Ie)}let Qe=Ae.length-3;const ut=Ae[Qe],yt=Ae[Qe+1],Et=he===0?ut:yt;Et>=Q&&Et<=ee&&Ot(Me,ut,yt,Ae[Qe+2]),Qe=Me.length-3,ve&&Qe>=3&&(Me[Qe]!==Me[0]||Me[Qe+1]!==Me[1])&&Ot(Me,Me[0],Me[1],Me[2]),Me.length&&K.push(Me)}function Bt(Ae){const K=[];return K.size=Ae.size,K.start=Ae.start,K.end=Ae.end,K}function Ht(Ae,K,Q,ee,he,ve){for(const $ of Ae)ct($,K,Q,ee,he,ve,!1)}function Ot(Ae,K,Q,ee){Ae.push(K,Q,ee)}function pr(Ae,K,Q,ee,he,ve){const $=(ve-K)/(ee-K);return Ot(Ae,ve,Q+(he-Q)*$,1),$}function Nt(Ae,K,Q,ee,he,ve){const $=(ve-Q)/(he-Q);return Ot(Ae,K+(ee-K)*$,ve,1),$}function mr(Ae,K){const Q=[];for(let ee=0;ee<Ae.length;ee++){const he=Ae[ee],ve=he.type;let $;if(ve==="Point"||ve==="MultiPoint"||ve==="LineString")$=jr(he.geometry,K);else if(ve==="MultiLineString"||ve==="Polygon"){$=[];for(const Me of he.geometry)$.push(jr(Me,K))}else if(ve==="MultiPolygon"){$=[];for(const Me of he.geometry){const Te=[];for(const Ie of Me)Te.push(jr(Ie,K));$.push(Te)}}Q.push(Si(he.id,ve,$,he.tags))}return Q}function jr(Ae,K){const Q=[];Q.size=Ae.size,Ae.start!==void 0&&(Q.start=Ae.start,Q.end=Ae.end);for(let ee=0;ee<Ae.length;ee+=3)Q.push(Ae[ee]+K,Ae[ee+1],Ae[ee+2]);return Q}function mi(Ae,K){if(Ae.transformed)return Ae;const Q=1<<Ae.z,ee=Ae.x,he=Ae.y;for(const ve of Ae.features){const $=ve.geometry,Me=ve.type;if(ve.geometry=[],Me===1)for(let Te=0;Te<$.length;Te+=2)ve.geometry.push(Ir($[Te],$[Te+1],K,Q,ee,he));else for(let Te=0;Te<$.length;Te++){const Ie=[];for(let Ve=0;Ve<$[Te].length;Ve+=2)Ie.push(Ir($[Te][Ve],$[Te][Ve+1],K,Q,ee,he));ve.geometry.push(Ie)}}return Ae.transformed=!0,Ae}function Ir(Ae,K,Q,ee,he,ve){return[Math.round(Q*(Ae*ee-he)),Math.round(Q*(K*ee-ve))]}function gi(Ae,K,Q,ee,he){const ve=K===he.maxZoom?0:he.tolerance/((1<<K)*he.extent),$={features:[],numPoints:0,numSimplified:0,numFeatures:Ae.length,source:null,x:Q,y:ee,z:K,transformed:!1,minX:2,minY:1,maxX:-1,maxY:0};for(const Me of Ae)Vi($,Me,ve,he);return $}function Vi(Ae,K,Q,ee){const he=K.geometry,ve=K.type,$=[];if(Ae.minX=Math.min(Ae.minX,K.minX),Ae.minY=Math.min(Ae.minY,K.minY),Ae.maxX=Math.max(Ae.maxX,K.maxX),Ae.maxY=Math.max(Ae.maxY,K.maxY),ve==="Point"||ve==="MultiPoint")for(let Me=0;Me<he.length;Me+=3)$.push(he[Me],he[Me+1]),Ae.numPoints++,Ae.numSimplified++;else if(ve==="LineString")hr($,he,Ae,Q,!1,!1);else if(ve==="MultiLineString"||ve==="Polygon")for(let Me=0;Me<he.length;Me++)hr($,he[Me],Ae,Q,ve==="Polygon",Me===0);else if(ve==="MultiPolygon")for(let Me=0;Me<he.length;Me++){const Te=he[Me];for(let Ie=0;Ie<Te.length;Ie++)hr($,Te[Ie],Ae,Q,!0,Ie===0)}if($.length){let Me=K.tags||null;if(ve==="LineString"&&ee.lineMetrics){Me={};for(const Ie in K.tags)Me[Ie]=K.tags[Ie];Me.mapbox_clip_start=he.start/he.size,Me.mapbox_clip_end=he.end/he.size}const Te={geometry:$,type:ve==="Polygon"||ve==="MultiPolygon"?3:ve==="LineString"||ve==="MultiLineString"?2:1,tags:Me};K.id!==null&&(Te.id=K.id),Ae.features.push(Te)}}function hr(Ae,K,Q,ee,he,ve){const $=ee*ee;if(ee>0&&K.size<(he?$:ee))return void(Q.numPoints+=K.length/3);const Me=[];for(let Te=0;Te<K.length;Te+=3)(ee===0||K[Te+2]>$)&&(Q.numSimplified++,Me.push(K[Te],K[Te+1])),Q.numPoints++;he&&function(Te,Ie){let Ve=0;for(let Pe=0,Qe=Te.length,ut=Qe-2;Pe<Qe;ut=Pe,Pe+=2)Ve+=(Te[Pe]-Te[ut])*(Te[Pe+1]+Te[ut+1]);if(Ve>0===Ie)for(let Pe=0,Qe=Te.length;Pe<Qe/2;Pe+=2){const ut=Te[Pe],yt=Te[Pe+1];Te[Pe]=Te[Qe-2-Pe],Te[Pe+1]=Te[Qe-1-Pe],Te[Qe-2-Pe]=ut,Te[Qe-1-Pe]=yt}}(Me,ve),Ae.push(Me)}const lr={maxZoom:14,indexMaxZoom:5,indexMaxPoints:1e5,tolerance:3,extent:4096,buffer:64,lineMetrics:!1,promoteId:null,generateId:!1,debug:0};class Ft{constructor(K,Q){const ee=(Q=this.options=function(ve,$){for(const Me in $)ve[Me]=$[Me];return ve}(Object.create(lr),Q)).debug;if(ee&&console.time("preprocess data"),Q.maxZoom<0||Q.maxZoom>24)throw new Error("maxZoom should be in the 0-24 range");if(Q.promoteId&&Q.generateId)throw new Error("promoteId and generateId cannot be used together.");let he=function(ve,$){const Me=[];if(ve.type==="FeatureCollection")for(let Te=0;Te<ve.features.length;Te++)Qi(Me,ve.features[Te],$,Te);else Qi(Me,ve.type==="Feature"?ve:{geometry:ve},$);return Me}(K,Q);this.tiles={},this.tileCoords=[],ee&&(console.timeEnd("preprocess data"),console.log("index: maxZoom: %d, maxPoints: %d",Q.indexMaxZoom,Q.indexMaxPoints),console.time("generate tiles"),this.stats={},this.total=0),he=function(ve,$){const Me=$.buffer/$.extent;let Te=ve;const Ie=gt(ve,1,-1-Me,Me,0,-1,2,$),Ve=gt(ve,1,1-Me,2+Me,0,-1,2,$);return(Ie||Ve)&&(Te=gt(ve,1,-Me,1+Me,0,-1,2,$)||[],Ie&&(Te=mr(Ie,1).concat(Te)),Ve&&(Te=Te.concat(mr(Ve,-1)))),Te}(he,Q),he.length&&this.splitTile(he,0,0,0),ee&&(he.length&&console.log("features: %d, points: %d",this.tiles[0].numFeatures,this.tiles[0].numPoints),console.timeEnd("generate tiles"),console.log("tiles generated:",this.total,JSON.stringify(this.stats)))}splitTile(K,Q,ee,he,ve,$,Me){const Te=[K,Q,ee,he],Ie=this.options,Ve=Ie.debug;for(;Te.length;){he=Te.pop(),ee=Te.pop(),Q=Te.pop(),K=Te.pop();const Pe=1<<Q,Qe=wr(Q,ee,he);let ut=this.tiles[Qe];if(!ut&&(Ve>1&&console.time("creation"),ut=this.tiles[Qe]=gi(K,Q,ee,he,Ie),this.tileCoords.push({z:Q,x:ee,y:he}),Ve)){Ve>1&&(console.log("tile z%d-%d-%d (features: %d, points: %d, simplified: %d)",Q,ee,he,ut.numFeatures,ut.numPoints,ut.numSimplified),console.timeEnd("creation"));const Mt=`z${Q}`;this.stats[Mt]=(this.stats[Mt]||0)+1,this.total++}if(ut.source=K,ve==null){if(Q===Ie.indexMaxZoom||ut.numPoints<=Ie.indexMaxPoints)continue}else{if(Q===Ie.maxZoom||Q===ve)continue;if(ve!=null){const Mt=ve-Q;if(ee!==$>>Mt||he!==Me>>Mt)continue}}if(ut.source=null,K.length===0)continue;Ve>1&&console.time("clipping");const yt=.5*Ie.buffer/Ie.extent,Et=.5-yt,jt=.5+yt,Rt=1+yt;let Ue=null,ar=null,Qt=null,or=null,Dt=gt(K,Pe,ee-yt,ee+jt,0,ut.minX,ut.maxX,Ie),Xe=gt(K,Pe,ee+Et,ee+Rt,0,ut.minX,ut.maxX,Ie);K=null,Dt&&(Ue=gt(Dt,Pe,he-yt,he+jt,1,ut.minY,ut.maxY,Ie),ar=gt(Dt,Pe,he+Et,he+Rt,1,ut.minY,ut.maxY,Ie),Dt=null),Xe&&(Qt=gt(Xe,Pe,he-yt,he+jt,1,ut.minY,ut.maxY,Ie),or=gt(Xe,Pe,he+Et,he+Rt,1,ut.minY,ut.maxY,Ie),Xe=null),Ve>1&&console.timeEnd("clipping"),Te.push(Ue||[],Q+1,2*ee,2*he),Te.push(ar||[],Q+1,2*ee,2*he+1),Te.push(Qt||[],Q+1,2*ee+1,2*he),Te.push(or||[],Q+1,2*ee+1,2*he+1)}}getTile(K,Q,ee){K=+K,Q=+Q,ee=+ee;const he=this.options,{extent:ve,debug:$}=he;if(K<0||K>24)return null;const Me=1<<K,Te=wr(K,Q=Q+Me&Me-1,ee);if(this.tiles[Te])return mi(this.tiles[Te],ve);$>1&&console.log("drilling down to z%d-%d-%d",K,Q,ee);let Ie,Ve=K,Pe=Q,Qe=ee;for(;!Ie&&Ve>0;)Ve--,Pe>>=1,Qe>>=1,Ie=this.tiles[wr(Ve,Pe,Qe)];return Ie&&Ie.source?($>1&&(console.log("found parent tile z%d-%d-%d",Ve,Pe,Qe),console.time("drilling down")),this.splitTile(Ie.source,Ve,Pe,Qe,K,Q,ee),$>1&&console.timeEnd("drilling down"),this.tiles[Te]?mi(this.tiles[Te],ve):null):null}}function wr(Ae,K,Q){return 32*((1<<Ae)*Q+K)+Ae}function dr(Ae,K){return K?Ae.properties[K]:Ae.id}function Jt(Ae,K){if(Ae==null)return!0;if(Ae.type==="Feature")return dr(Ae,K)!=null;if(Ae.type==="FeatureCollection"){const Q=new Set;for(const ee of Ae.features){const he=dr(ee,K);if(he==null||Q.has(he))return!1;Q.add(he)}return!0}return!1}function fr(Ae,K){const Q=new Map;if(Ae!=null)if(Ae.type==="Feature")Q.set(dr(Ae,K),Ae);else for(const ee of Ae.features)Q.set(dr(ee,K),ee);return Q}class It extends H{constructor(){super(...arguments),this._dataUpdateable=new Map}loadVectorTile(K,Q){return x._(this,void 0,void 0,function*(){const ee=K.tileID.canonical;if(!this._geoJSONIndex)throw new Error("Unable to parse the data into a cluster or geojson");const he=this._geoJSONIndex.getTile(ee.z,ee.x,ee.y);if(!he)return null;const ve=new Ee(he.features);let $=At(ve);return $.byteOffset===0&&$.byteLength===$.buffer.byteLength||($=new Uint8Array($)),{vectorTile:ve,rawData:$.buffer}})}loadData(K){return x._(this,void 0,void 0,function*(){var Q;(Q=this._pendingRequest)===null||Q===void 0||Q.abort();const ee=!!(K&&K.request&&K.request.collectResourceTiming)&&new x.cE(K.request);this._pendingRequest=new AbortController;try{this._pendingData=this.loadAndProcessGeoJSON(K,this._pendingRequest),this._geoJSONIndex=K.cluster?new vr(function({superclusterOptions:$,clusterProperties:Me}){if(!Me||!$)return $;const Te={},Ie={},Ve={accumulated:null,zoom:0},Pe={properties:null},Qe=Object.keys(Me);for(const ut of Qe){const[yt,Et]=Me[ut],jt=x.cL(Et),Rt=x.cL(typeof yt=="string"?[yt,["accumulated"],["get",ut]]:yt);Te[ut]=jt.value,Ie[ut]=Rt.value}return $.map=ut=>{Pe.properties=ut;const yt={};for(const Et of Qe)yt[Et]=Te[Et].evaluate(Ve,Pe);return yt},$.reduce=(ut,yt)=>{Pe.properties=yt;for(const Et of Qe)Ve.accumulated=ut[Et],ut[Et]=Ie[Et].evaluate(Ve,Pe)},$}(K)).load((yield this._pendingData).features):(he=yield this._pendingData,new Ft(he,K.geojsonVtOptions)),this.loaded={};const ve={};if(ee){const $=ee.finish();$&&(ve.resourceTiming={},ve.resourceTiming[K.source]=JSON.parse(JSON.stringify($)))}return ve}catch(ve){if(delete this._pendingRequest,x.cp(ve))return{abandoned:!0};throw ve}var he})}getData(){return x._(this,void 0,void 0,function*(){return this._pendingData})}reloadTile(K){const Q=this.loaded;return Q&&Q[K.uid]?super.reloadTile(K):this.loadTile(K)}loadAndProcessGeoJSON(K,Q){return x._(this,void 0,void 0,function*(){let ee=yield this.loadGeoJSON(K,Q);if(delete this._pendingRequest,typeof ee!="object")throw new Error(`Input data given to '${K.source}' is not a valid GeoJSON object.`);if(G(ee,!0),K.filter){const he=x.cL(K.filter,{type:"boolean","property-type":"data-driven",overridable:!1,transition:!1});if(he.result==="error")throw new Error(he.value.map($=>`${$.key}: ${$.message}`).join(", "));ee={type:"FeatureCollection",features:ee.features.filter($=>he.value.evaluate({zoom:0},$))}}return ee})}loadGeoJSON(K,Q){return x._(this,void 0,void 0,function*(){const{promoteId:ee}=K;if(K.request){const he=yield x.j(K.request,Q);return this._dataUpdateable=Jt(he.data,ee)?fr(he.data,ee):void 0,he.data}if(typeof K.data=="string")try{const he=JSON.parse(K.data);return this._dataUpdateable=Jt(he,ee)?fr(he,ee):void 0,he}catch{throw new Error(`Input data given to '${K.source}' is not a valid GeoJSON object.`)}if(!K.dataDiff)throw new Error(`Input data given to '${K.source}' is not a valid GeoJSON object.`);if(!this._dataUpdateable)throw new Error(`Cannot update existing geojson data in ${K.source}`);return function(he,ve,$){var Me,Te,Ie,Ve;if(ve.removeAll&&he.clear(),ve.remove)for(const Pe of ve.remove)he.delete(Pe);if(ve.add)for(const Pe of ve.add){const Qe=dr(Pe,$);Qe!=null&&he.set(Qe,Pe)}if(ve.update)for(const Pe of ve.update){let Qe=he.get(Pe.id);if(Qe==null)continue;const ut=!Pe.removeAllProperties&&(((Me=Pe.removeProperties)===null||Me===void 0?void 0:Me.length)>0||((Te=Pe.addOrUpdateProperties)===null||Te===void 0?void 0:Te.length)>0);if((Pe.newGeometry||Pe.removeAllProperties||ut)&&(Qe=Object.assign({},Qe),he.set(Pe.id,Qe),ut&&(Qe.properties=Object.assign({},Qe.properties))),Pe.newGeometry&&(Qe.geometry=Pe.newGeometry),Pe.removeAllProperties)Qe.properties={};else if(((Ie=Pe.removeProperties)===null||Ie===void 0?void 0:Ie.length)>0)for(const yt of Pe.removeProperties)Object.prototype.hasOwnProperty.call(Qe.properties,yt)&&delete Qe.properties[yt];if(((Ve=Pe.addOrUpdateProperties)===null||Ve===void 0?void 0:Ve.length)>0)for(const{key:yt,value:Et}of Pe.addOrUpdateProperties)Qe.properties[yt]=Et}}(this._dataUpdateable,K.dataDiff,ee),{type:"FeatureCollection",features:Array.from(this._dataUpdateable.values())}})}removeSource(K){return x._(this,void 0,void 0,function*(){this._pendingRequest&&this._pendingRequest.abort()})}getClusterExpansionZoom(K){return this._geoJSONIndex.getClusterExpansionZoom(K.clusterId)}getClusterChildren(K){return this._geoJSONIndex.getChildren(K.clusterId)}getClusterLeaves(K){return this._geoJSONIndex.getLeaves(K.clusterId,K.limit,K.offset)}}class wt{constructor(K){this.self=K,this.actor=new x.H(K),this.layerIndexes={},this.availableImages={},this.workerSources={},this.demWorkerSources={},this.externalWorkerSourceTypes={},this.self.registerWorkerSource=(Q,ee)=>{if(this.externalWorkerSourceTypes[Q])throw new Error(`Worker source with name "${Q}" already registered.`);this.externalWorkerSourceTypes[Q]=ee},this.self.addProtocol=x.cr,this.self.removeProtocol=x.cs,this.self.registerRTLTextPlugin=Q=>{x.cM.setMethods(Q)},this.actor.registerMessageHandler("LDT",(Q,ee)=>this._getDEMWorkerSource(Q,ee.source).loadTile(ee)),this.actor.registerMessageHandler("RDT",(Q,ee)=>x._(this,void 0,void 0,function*(){this._getDEMWorkerSource(Q,ee.source).removeTile(ee)})),this.actor.registerMessageHandler("GCEZ",(Q,ee)=>x._(this,void 0,void 0,function*(){return this._getWorkerSource(Q,ee.type,ee.source).getClusterExpansionZoom(ee)})),this.actor.registerMessageHandler("GCC",(Q,ee)=>x._(this,void 0,void 0,function*(){return this._getWorkerSource(Q,ee.type,ee.source).getClusterChildren(ee)})),this.actor.registerMessageHandler("GCL",(Q,ee)=>x._(this,void 0,void 0,function*(){return this._getWorkerSource(Q,ee.type,ee.source).getClusterLeaves(ee)})),this.actor.registerMessageHandler("LD",(Q,ee)=>this._getWorkerSource(Q,ee.type,ee.source).loadData(ee)),this.actor.registerMessageHandler("GD",(Q,ee)=>this._getWorkerSource(Q,ee.type,ee.source).getData()),this.actor.registerMessageHandler("LT",(Q,ee)=>this._getWorkerSource(Q,ee.type,ee.source).loadTile(ee)),this.actor.registerMessageHandler("RT",(Q,ee)=>this._getWorkerSource(Q,ee.type,ee.source).reloadTile(ee)),this.actor.registerMessageHandler("AT",(Q,ee)=>this._getWorkerSource(Q,ee.type,ee.source).abortTile(ee)),this.actor.registerMessageHandler("RMT",(Q,ee)=>this._getWorkerSource(Q,ee.type,ee.source).removeTile(ee)),this.actor.registerMessageHandler("RS",(Q,ee)=>x._(this,void 0,void 0,function*(){if(!this.workerSources[Q]||!this.workerSources[Q][ee.type]||!this.workerSources[Q][ee.type][ee.source])return;const he=this.workerSources[Q][ee.type][ee.source];delete this.workerSources[Q][ee.type][ee.source],he.removeSource!==void 0&&he.removeSource(ee)})),this.actor.registerMessageHandler("RM",Q=>x._(this,void 0,void 0,function*(){delete this.layerIndexes[Q],delete this.availableImages[Q],delete this.workerSources[Q],delete this.demWorkerSources[Q]})),this.actor.registerMessageHandler("SR",(Q,ee)=>x._(this,void 0,void 0,function*(){this.referrer=ee})),this.actor.registerMessageHandler("SRPS",(Q,ee)=>this._syncRTLPluginState(Q,ee)),this.actor.registerMessageHandler("IS",(Q,ee)=>x._(this,void 0,void 0,function*(){this.self.importScripts(ee)})),this.actor.registerMessageHandler("SI",(Q,ee)=>this._setImages(Q,ee)),this.actor.registerMessageHandler("UL",(Q,ee)=>x._(this,void 0,void 0,function*(){this._getLayerIndex(Q).update(ee.layers,ee.removedIds)})),this.actor.registerMessageHandler("SL",(Q,ee)=>x._(this,void 0,void 0,function*(){this._getLayerIndex(Q).replace(ee)}))}_setImages(K,Q){return x._(this,void 0,void 0,function*(){this.availableImages[K]=Q;for(const ee in this.workerSources[K]){const he=this.workerSources[K][ee];for(const ve in he)he[ve].availableImages=Q}})}_syncRTLPluginState(K,Q){return x._(this,void 0,void 0,function*(){return yield x.cM.syncState(Q,this.self.importScripts)})}_getAvailableImages(K){let Q=this.availableImages[K];return Q||(Q=[]),Q}_getLayerIndex(K){let Q=this.layerIndexes[K];return Q||(Q=this.layerIndexes[K]=new o),Q}_getWorkerSource(K,Q,ee){if(this.workerSources[K]||(this.workerSources[K]={}),this.workerSources[K][Q]||(this.workerSources[K][Q]={}),!this.workerSources[K][Q][ee]){const he={sendAsync:(ve,$)=>(ve.targetMapId=K,this.actor.sendAsync(ve,$))};switch(Q){case"vector":this.workerSources[K][Q][ee]=new H(he,this._getLayerIndex(K),this._getAvailableImages(K));break;case"geojson":this.workerSources[K][Q][ee]=new It(he,this._getLayerIndex(K),this._getAvailableImages(K));break;default:this.workerSources[K][Q][ee]=new this.externalWorkerSourceTypes[Q](he,this._getLayerIndex(K),this._getAvailableImages(K))}}return this.workerSources[K][Q][ee]}_getDEMWorkerSource(K,Q){return this.demWorkerSources[K]||(this.demWorkerSources[K]={}),this.demWorkerSources[K][Q]||(this.demWorkerSources[K][Q]=new M),this.demWorkerSources[K][Q]}}return x.i(self)&&(self.worker=new wt(self)),wt}),k("index",["exports","./shared"],function(x,o){var B="5.5.0";function D(){var u=new o.A(4);return o.A!=Float32Array&&(u[1]=0,u[2]=0),u[0]=1,u[3]=1,u}let L,H;const M={now:typeof performance<"u"&&performance&&performance.now?performance.now.bind(performance):Date.now.bind(Date),frame(u,e,r){const a=requestAnimationFrame(h=>{l(),e(h)}),{unsubscribe:l}=o.s(u.signal,"abort",()=>{l(),cancelAnimationFrame(a),r(o.c())},!1)},frameAsync(u){return new Promise((e,r)=>{this.frame(u,e,r)})},getImageData(u,e=0){return this.getImageCanvasContext(u).getImageData(-e,-e,u.width+2*e,u.height+2*e)},getImageCanvasContext(u){const e=window.document.createElement("canvas"),r=e.getContext("2d",{willReadFrequently:!0});if(!r)throw new Error("failed to create canvas 2d context");return e.width=u.width,e.height=u.height,r.drawImage(u,0,0,u.width,u.height),r},resolveURL:u=>(L||(L=document.createElement("a")),L.href=u,L.href),hardwareConcurrency:typeof navigator<"u"&&navigator.hardwareConcurrency||4,get prefersReducedMotion(){return!!matchMedia&&(H==null&&(H=matchMedia("(prefers-reduced-motion: reduce)")),H.matches)}};class C{static testProp(e){if(!C.docStyle)return e[0];for(let r=0;r<e.length;r++)if(e[r]in C.docStyle)return e[r];return e[0]}static create(e,r,a){const l=window.document.createElement(e);return r!==void 0&&(l.className=r),a&&a.appendChild(l),l}static createNS(e,r){return window.document.createElementNS(e,r)}static disableDrag(){C.docStyle&&C.selectProp&&(C.userSelect=C.docStyle[C.selectProp],C.docStyle[C.selectProp]="none")}static enableDrag(){C.docStyle&&C.selectProp&&(C.docStyle[C.selectProp]=C.userSelect)}static setTransform(e,r){e.style[C.transformProp]=r}static addEventListener(e,r,a,l={}){e.addEventListener(r,a,"passive"in l?l:l.capture)}static removeEventListener(e,r,a,l={}){e.removeEventListener(r,a,"passive"in l?l:l.capture)}static suppressClickInternal(e){e.preventDefault(),e.stopPropagation(),window.removeEventListener("click",C.suppressClickInternal,!0)}static suppressClick(){window.addEventListener("click",C.suppressClickInternal,!0),window.setTimeout(()=>{window.removeEventListener("click",C.suppressClickInternal,!0)},0)}static getScale(e){const r=e.getBoundingClientRect();return{x:r.width/e.offsetWidth||1,y:r.height/e.offsetHeight||1,boundingClientRect:r}}static getPoint(e,r,a){const l=r.boundingClientRect;return new o.P((a.clientX-l.left)/r.x-e.clientLeft,(a.clientY-l.top)/r.y-e.clientTop)}static mousePos(e,r){const a=C.getScale(e);return C.getPoint(e,a,r)}static touchPos(e,r){const a=[],l=C.getScale(e);for(let h=0;h<r.length;h++)a.push(C.getPoint(e,l,r[h]));return a}static mouseButton(e){return e.button}static remove(e){e.parentNode&&e.parentNode.removeChild(e)}static sanitize(e){const r=new DOMParser().parseFromString(e,"text/html").body||document.createElement("body"),a=r.querySelectorAll("script");for(const l of a)l.remove();return C.clean(r),r.innerHTML}static isPossiblyDangerous(e,r){const a=r.replace(/\s+/g,"").toLowerCase();return!(!["src","href","xlink:href"].includes(e)||!a.includes("javascript:")&&!a.includes("data:"))||!!e.startsWith("on")||void 0}static clean(e){const r=e.children;for(const a of r)C.removeAttributes(a),C.clean(a)}static removeAttributes(e){for(const{name:r,value:a}of e.attributes)C.isPossiblyDangerous(r,a)&&e.removeAttribute(r)}}C.docStyle=typeof window<"u"&&window.document&&window.document.documentElement.style,C.selectProp=C.testProp(["userSelect","MozUserSelect","WebkitUserSelect","msUserSelect"]),C.transformProp=C.testProp(["transform","WebkitTransform"]);const T={supported:!1,testSupport:function(u){!ie&&G&&(le?Ee(u):N=u)}};let N,G,ie=!1,le=!1;function Ee(u){const e=u.createTexture();u.bindTexture(u.TEXTURE_2D,e);try{if(u.texImage2D(u.TEXTURE_2D,0,u.RGBA,u.RGBA,u.UNSIGNED_BYTE,G),u.isContextLost())return;T.supported=!0}catch{}u.deleteTexture(e),ie=!0}var te;typeof document<"u"&&(G=document.createElement("img"),G.onload=()=>{N&&Ee(N),N=null,le=!0},G.onerror=()=>{ie=!0,N=null},G.src="data:image/webp;base64,UklGRh4AAABXRUJQVlA4TBEAAAAvAQAAAAfQ//73v/+BiOh/AAA="),function(u){let e,r,a,l;u.resetRequestQueue=()=>{e=[],r=0,a=0,l={}},u.addThrottleControl=A=>{const I=a++;return l[I]=A,I},u.removeThrottleControl=A=>{delete l[A],g()},u.getImage=(A,I,z=!0)=>new Promise((F,O)=>{T.supported&&(A.headers||(A.headers={}),A.headers.accept="image/webp,*/*"),o.e(A,{type:"image"}),e.push({abortController:I,requestParameters:A,supportImageRefresh:z,state:"queued",onError:Z=>{O(Z)},onSuccess:Z=>{F(Z)}}),g()});const h=A=>o._(this,void 0,void 0,function*(){A.state="running";const{requestParameters:I,supportImageRefresh:z,onError:F,onSuccess:O,abortController:Z}=A,J=z===!1&&!o.i(self)&&!o.g(I.url)&&(!I.headers||Object.keys(I.headers).reduce((se,de)=>se&&de==="accept",!0));r++;const oe=J?b(I,Z):o.m(I,Z);try{const se=yield oe;delete A.abortController,A.state="completed",se.data instanceof HTMLImageElement||o.b(se.data)?O(se):se.data&&O({data:yield(ne=se.data,typeof createImageBitmap=="function"?o.f(ne):o.h(ne)),cacheControl:se.cacheControl,expires:se.expires})}catch(se){delete A.abortController,F(se)}finally{r--,g()}var ne}),g=()=>{const A=(()=>{for(const I of Object.keys(l))if(l[I]())return!0;return!1})()?o.a.MAX_PARALLEL_IMAGE_REQUESTS_PER_FRAME:o.a.MAX_PARALLEL_IMAGE_REQUESTS;for(let I=r;I<A&&e.length>0;I++){const z=e.shift();z.abortController.signal.aborted?I--:h(z)}},b=(A,I)=>new Promise((z,F)=>{const O=new Image,Z=A.url,J=A.credentials;J&&J==="include"?O.crossOrigin="use-credentials":(J&&J==="same-origin"||!o.d(Z))&&(O.crossOrigin="anonymous"),I.signal.addEventListener("abort",()=>{O.src="",F(o.c())}),O.fetchPriority="high",O.onload=()=>{O.onerror=O.onload=null,z({data:O})},O.onerror=()=>{O.onerror=O.onload=null,I.signal.aborted||F(new 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."))},O.src=Z})}(te||(te={})),te.resetRequestQueue();class me{constructor(e){this._transformRequestFn=e}transformRequest(e,r){return this._transformRequestFn&&this._transformRequestFn(e,r)||{url:e}}setTransformRequest(e){this._transformRequestFn=e}}function De(u){const e=[];if(typeof u=="string")e.push({id:"default",url:u});else if(u&&u.length>0){const r=[];for(const{id:a,url:l}of u){const h=`${a}${l}`;r.indexOf(h)===-1&&(r.push(h),e.push({id:a,url:l}))}}return e}function qe(u,e,r){try{const a=new URL(u);return a.pathname+=`${e}${r}`,a.toString()}catch{throw new Error(`Invalid sprite URL "${u}", must be absolute. Modify style specification directly or use TransformStyleFunction to correct the issue dynamically`)}}class rt{constructor(e,r,a,l){this.context=e,this.format=a,this.texture=e.gl.createTexture(),this.update(r,l)}update(e,r,a){const{width:l,height:h}=e,g=!(this.size&&this.size[0]===l&&this.size[1]===h||a),{context:b}=this,{gl:A}=b;if(this.useMipmap=!!(r&&r.useMipmap),A.bindTexture(A.TEXTURE_2D,this.texture),b.pixelStoreUnpackFlipY.set(!1),b.pixelStoreUnpack.set(1),b.pixelStoreUnpackPremultiplyAlpha.set(this.format===A.RGBA&&(!r||r.premultiply!==!1)),g)this.size=[l,h],e instanceof HTMLImageElement||e instanceof HTMLCanvasElement||e instanceof HTMLVideoElement||e instanceof ImageData||o.b(e)?A.texImage2D(A.TEXTURE_2D,0,this.format,this.format,A.UNSIGNED_BYTE,e):A.texImage2D(A.TEXTURE_2D,0,this.format,l,h,0,this.format,A.UNSIGNED_BYTE,e.data);else{const{x:I,y:z}=a||{x:0,y:0};e instanceof HTMLImageElement||e instanceof HTMLCanvasElement||e instanceof HTMLVideoElement||e instanceof ImageData||o.b(e)?A.texSubImage2D(A.TEXTURE_2D,0,I,z,A.RGBA,A.UNSIGNED_BYTE,e):A.texSubImage2D(A.TEXTURE_2D,0,I,z,l,h,A.RGBA,A.UNSIGNED_BYTE,e.data)}this.useMipmap&&this.isSizePowerOfTwo()&&A.generateMipmap(A.TEXTURE_2D),b.pixelStoreUnpackFlipY.setDefault(),b.pixelStoreUnpack.setDefault(),b.pixelStoreUnpackPremultiplyAlpha.setDefault()}bind(e,r,a){const{context:l}=this,{gl:h}=l;h.bindTexture(h.TEXTURE_2D,this.texture),a!==h.LINEAR_MIPMAP_NEAREST||this.isSizePowerOfTwo()||(a=h.LINEAR),e!==this.filter&&(h.texParameteri(h.TEXTURE_2D,h.TEXTURE_MAG_FILTER,e),h.texParameteri(h.TEXTURE_2D,h.TEXTURE_MIN_FILTER,a||e),this.filter=e),r!==this.wrap&&(h.texParameteri(h.TEXTURE_2D,h.TEXTURE_WRAP_S,r),h.texParameteri(h.TEXTURE_2D,h.TEXTURE_WRAP_T,r),this.wrap=r)}isSizePowerOfTwo(){return this.size[0]===this.size[1]&&Math.log(this.size[0])/Math.LN2%1==0}destroy(){const{gl:e}=this.context;e.deleteTexture(this.texture),this.texture=null}}function At(u){const{userImage:e}=u;return!!(e&&e.render&&e.render())&&(u.data.replace(new Uint8Array(e.data.buffer)),!0)}class _t extends o.E{constructor(){super(),this.images={},this.updatedImages={},this.callbackDispatchedThisFrame={},this.loaded=!1,this.requestors=[],this.patterns={},this.atlasImage=new o.R({width:1,height:1}),this.dirty=!0}isLoaded(){return this.loaded}setLoaded(e){if(this.loaded!==e&&(this.loaded=e,e)){for(const{ids:r,promiseResolve:a}of this.requestors)a(this._getImagesForIds(r));this.requestors=[]}}getImage(e){const r=this.images[e];if(r&&!r.data&&r.spriteData){const a=r.spriteData;r.data=new o.R({width:a.width,height:a.height},a.context.getImageData(a.x,a.y,a.width,a.height).data),r.spriteData=null}return r}addImage(e,r){if(this.images[e])throw new Error(`Image id ${e} already exist, use updateImage instead`);this._validate(e,r)&&(this.images[e]=r)}_validate(e,r){let a=!0;const l=r.data||r.spriteData;return this._validateStretch(r.stretchX,l&&l.width)||(this.fire(new o.k(new Error(`Image "${e}" has invalid "stretchX" value`))),a=!1),this._validateStretch(r.stretchY,l&&l.height)||(this.fire(new o.k(new Error(`Image "${e}" has invalid "stretchY" value`))),a=!1),this._validateContent(r.content,r)||(this.fire(new o.k(new Error(`Image "${e}" has invalid "content" value`))),a=!1),a}_validateStretch(e,r){if(!e)return!0;let a=0;for(const l of e){if(l[0]<a||l[1]<l[0]||r<l[1])return!1;a=l[1]}return!0}_validateContent(e,r){if(!e)return!0;if(e.length!==4)return!1;const a=r.spriteData,l=a&&a.width||r.data.width,h=a&&a.height||r.data.height;return!(e[0]<0||l<e[0]||e[1]<0||h<e[1]||e[2]<0||l<e[2]||e[3]<0||h<e[3]||e[2]<e[0]||e[3]<e[1])}updateImage(e,r,a=!0){const l=this.getImage(e);if(a&&(l.data.width!==r.data.width||l.data.height!==r.data.height))throw new Error(`size mismatch between old image (${l.data.width}x${l.data.height}) and new image (${r.data.width}x${r.data.height}).`);r.version=l.version+1,this.images[e]=r,this.updatedImages[e]=!0}removeImage(e){const r=this.images[e];delete this.images[e],delete this.patterns[e],r.userImage&&r.userImage.onRemove&&r.userImage.onRemove()}listImages(){return Object.keys(this.images)}getImages(e){return new Promise((r,a)=>{let l=!0;if(!this.isLoaded())for(const h of e)this.images[h]||(l=!1);this.isLoaded()||l?r(this._getImagesForIds(e)):this.requestors.push({ids:e,promiseResolve:r})})}_getImagesForIds(e){const r={};for(const a of e){let l=this.getImage(a);l||(this.fire(new o.l("styleimagemissing",{id:a})),l=this.getImage(a)),l?r[a]={data:l.data.clone(),pixelRatio:l.pixelRatio,sdf:l.sdf,version:l.version,stretchX:l.stretchX,stretchY:l.stretchY,content:l.content,textFitWidth:l.textFitWidth,textFitHeight:l.textFitHeight,hasRenderCallback:!!(l.userImage&&l.userImage.render)}:o.w(`Image "${a}" could not be loaded. Please make sure you have added the image with map.addImage() or a "sprite" property in your style. You can provide missing images by listening for the "styleimagemissing" map event.`)}return r}getPixelSize(){const{width:e,height:r}=this.atlasImage;return{width:e,height:r}}getPattern(e){const r=this.patterns[e],a=this.getImage(e);if(!a)return null;if(r&&r.position.version===a.version)return r.position;if(r)r.position.version=a.version;else{const l={w:a.data.width+2,h:a.data.height+2,x:0,y:0},h=new o.I(l,a);this.patterns[e]={bin:l,position:h}}return this._updatePatternAtlas(),this.patterns[e].position}bind(e){const r=e.gl;this.atlasTexture?this.dirty&&(this.atlasTexture.update(this.atlasImage),this.dirty=!1):this.atlasTexture=new rt(e,this.atlasImage,r.RGBA),this.atlasTexture.bind(r.LINEAR,r.CLAMP_TO_EDGE)}_updatePatternAtlas(){const e=[];for(const h in this.patterns)e.push(this.patterns[h].bin);const{w:r,h:a}=o.p(e),l=this.atlasImage;l.resize({width:r||1,height:a||1});for(const h in this.patterns){const{bin:g}=this.patterns[h],b=g.x+1,A=g.y+1,I=this.getImage(h).data,z=I.width,F=I.height;o.R.copy(I,l,{x:0,y:0},{x:b,y:A},{width:z,height:F}),o.R.copy(I,l,{x:0,y:F-1},{x:b,y:A-1},{width:z,height:1}),o.R.copy(I,l,{x:0,y:0},{x:b,y:A+F},{width:z,height:1}),o.R.copy(I,l,{x:z-1,y:0},{x:b-1,y:A},{width:1,height:F}),o.R.copy(I,l,{x:0,y:0},{x:b+z,y:A},{width:1,height:F})}this.dirty=!0}beginFrame(){this.callbackDispatchedThisFrame={}}dispatchRenderCallbacks(e){for(const r of e){if(this.callbackDispatchedThisFrame[r])continue;this.callbackDispatchedThisFrame[r]=!0;const a=this.getImage(r);a||o.w(`Image with ID: "${r}" was not found`),At(a)&&this.updateImage(r,a)}}}const lt=1e20;function xt(u,e,r,a,l,h,g,b,A){for(let I=e;I<e+a;I++)qt(u,r*h+I,h,l,g,b,A);for(let I=r;I<r+l;I++)qt(u,I*h+e,1,a,g,b,A)}function qt(u,e,r,a,l,h,g){h[0]=0,g[0]=-1e20,g[1]=lt,l[0]=u[e];for(let b=1,A=0,I=0;b<a;b++){l[b]=u[e+b*r];const z=b*b;do{const F=h[A];I=(l[b]-l[F]+z-F*F)/(b-F)/2}while(I<=g[A]&&--A>-1);A++,h[A]=b,g[A]=I,g[A+1]=lt}for(let b=0,A=0;b<a;b++){for(;g[A+1]<b;)A++;const I=h[A],z=b-I;u[e+b*r]=l[I]+z*z}}class Xt{constructor(e,r){this.requestManager=e,this.localIdeographFontFamily=r,this.entries={}}setURL(e){this.url=e}getGlyphs(e){return o._(this,void 0,void 0,function*(){const r=[];for(const h in e)for(const g of e[h])r.push(this._getAndCacheGlyphsPromise(h,g));const a=yield Promise.all(r),l={};for(const{stack:h,id:g,glyph:b}of a)l[h]||(l[h]={}),l[h][g]=b&&{id:b.id,bitmap:b.bitmap.clone(),metrics:b.metrics};return l})}_getAndCacheGlyphsPromise(e,r){return o._(this,void 0,void 0,function*(){let a=this.entries[e];a||(a=this.entries[e]={glyphs:{},requests:{},ranges:{}});let l=a.glyphs[r];if(l!==void 0)return{stack:e,id:r,glyph:l};if(l=this._tinySDF(a,e,r),l)return a.glyphs[r]=l,{stack:e,id:r,glyph:l};const h=Math.floor(r/256);if(256*h>65535)throw new Error("glyphs > 65535 not supported");if(a.ranges[h])return{stack:e,id:r,glyph:l};if(!this.url)throw new Error("glyphsUrl is not set");if(!a.requests[h]){const b=Xt.loadGlyphRange(e,h,this.url,this.requestManager);a.requests[h]=b}const g=yield a.requests[h];for(const b in g)this._doesCharSupportLocalGlyph(+b)||(a.glyphs[+b]=g[+b]);return a.ranges[h]=!0,{stack:e,id:r,glyph:g[r]||null}})}_doesCharSupportLocalGlyph(e){return!!this.localIdeographFontFamily&&(new RegExp("\\p{Ideo}|\\p{sc=Hang}|\\p{sc=Hira}|\\p{sc=Kana}","u").test(String.fromCodePoint(e))||o.u["CJK Unified Ideographs"](e)||o.u["Hangul Syllables"](e)||o.u.Hiragana(e)||o.u.Katakana(e)||o.u["CJK Symbols and Punctuation"](e)||o.u["Halfwidth and Fullwidth Forms"](e))}_tinySDF(e,r,a){const l=this.localIdeographFontFamily;if(!l||!this._doesCharSupportLocalGlyph(a))return;let h=e.tinySDF;if(!h){let b="400";/bold/i.test(r)?b="900":/medium/i.test(r)?b="500":/light/i.test(r)&&(b="200"),h=e.tinySDF=new Xt.TinySDF({fontSize:48,buffer:6,radius:16,cutoff:.25,fontFamily:l,fontWeight:b})}const g=h.draw(String.fromCharCode(a));return{id:a,bitmap:new o.q({width:g.width||60,height:g.height||60},g.data),metrics:{width:g.glyphWidth/2||24,height:g.glyphHeight/2||24,left:g.glyphLeft/2+.5||0,top:g.glyphTop/2-27.5||-8,advance:g.glyphAdvance/2||24,isDoubleResolution:!0}}}}Xt.loadGlyphRange=function(u,e,r,a){return o._(this,void 0,void 0,function*(){const l=256*e,h=l+255,g=a.transformRequest(r.replace("{fontstack}",u).replace("{range}",`${l}-${h}`),"Glyphs"),b=yield o.n(g,new AbortController);if(!b||!b.data)throw new Error(`Could not load glyph range. range: ${e}, ${l}-${h}`);const A={};for(const I of o.o(b.data))A[I.id]=I;return A})},Xt.TinySDF=class{constructor({fontSize:u=24,buffer:e=3,radius:r=8,cutoff:a=.25,fontFamily:l="sans-serif",fontWeight:h="normal",fontStyle:g="normal"}={}){this.buffer=e,this.cutoff=a,this.radius=r;const b=this.size=u+4*e,A=this._createCanvas(b),I=this.ctx=A.getContext("2d",{willReadFrequently:!0});I.font=`${g} ${h} ${u}px ${l}`,I.textBaseline="alphabetic",I.textAlign="left",I.fillStyle="black",this.gridOuter=new Float64Array(b*b),this.gridInner=new Float64Array(b*b),this.f=new Float64Array(b),this.z=new Float64Array(b+1),this.v=new Uint16Array(b)}_createCanvas(u){const e=document.createElement("canvas");return e.width=e.height=u,e}draw(u){const{width:e,actualBoundingBoxAscent:r,actualBoundingBoxDescent:a,actualBoundingBoxLeft:l,actualBoundingBoxRight:h}=this.ctx.measureText(u),g=Math.ceil(r),b=Math.max(0,Math.min(this.size-this.buffer,Math.ceil(h-l))),A=Math.min(this.size-this.buffer,g+Math.ceil(a)),I=b+2*this.buffer,z=A+2*this.buffer,F=Math.max(I*z,0),O=new Uint8ClampedArray(F),Z={data:O,width:I,height:z,glyphWidth:b,glyphHeight:A,glyphTop:g,glyphLeft:0,glyphAdvance:e};if(b===0||A===0)return Z;const{ctx:J,buffer:oe,gridInner:ne,gridOuter:se}=this;J.clearRect(oe,oe,b,A),J.fillText(u,oe,oe+g);const de=J.getImageData(oe,oe,b,A);se.fill(lt,0,F),ne.fill(0,0,F);for(let _e=0;_e<A;_e++)for(let ye=0;ye<b;ye++){const be=de.data[4*(_e*b+ye)+3]/255;if(be===0)continue;const ke=(_e+oe)*I+ye+oe;if(be===1)se[ke]=0,ne[ke]=lt;else{const we=.5-be;se[ke]=we>0?we*we:0,ne[ke]=we<0?we*we:0}}xt(se,0,0,I,z,I,this.f,this.v,this.z),xt(ne,oe,oe,b,A,I,this.f,this.v,this.z);for(let _e=0;_e<F;_e++){const ye=Math.sqrt(se[_e])-Math.sqrt(ne[_e]);O[_e]=Math.round(255-255*(ye/this.radius+this.cutoff))}return Z}};class kr{constructor(){this.specification=o.v.light.position}possiblyEvaluate(e,r){return o.z(e.expression.evaluate(r))}interpolate(e,r,a){return{x:o.B.number(e.x,r.x,a),y:o.B.number(e.y,r.y,a),z:o.B.number(e.z,r.z,a)}}}let vr;class ni extends o.E{constructor(e){super(),vr=vr||new o.r({anchor:new o.D(o.v.light.anchor),position:new kr,color:new o.D(o.v.light.color),intensity:new o.D(o.v.light.intensity)}),this._transitionable=new o.T(vr),this.setLight(e),this._transitioning=this._transitionable.untransitioned()}getLight(){return this._transitionable.serialize()}setLight(e,r={}){if(!this._validate(o.t,e,r))for(const a in e){const l=e[a];a.endsWith("-transition")?this._transitionable.setTransition(a.slice(0,-11),l):this._transitionable.setValue(a,l)}}updateTransitions(e){this._transitioning=this._transitionable.transitioned(e,this._transitioning)}hasTransition(){return this._transitioning.hasTransition()}recalculate(e){this.properties=this._transitioning.possiblyEvaluate(e)}_validate(e,r,a){return(!a||a.validate!==!1)&&o.x(this,e.call(o.y,{value:r,style:{glyphs:!0,sprite:!0},styleSpec:o.v}))}}const ir=new o.r({"sky-color":new o.D(o.v.sky["sky-color"]),"horizon-color":new o.D(o.v.sky["horizon-color"]),"fog-color":new o.D(o.v.sky["fog-color"]),"fog-ground-blend":new o.D(o.v.sky["fog-ground-blend"]),"horizon-fog-blend":new o.D(o.v.sky["horizon-fog-blend"]),"sky-horizon-blend":new o.D(o.v.sky["sky-horizon-blend"]),"atmosphere-blend":new o.D(o.v.sky["atmosphere-blend"])});class Ji extends o.E{constructor(e){super(),this._transitionable=new o.T(ir),this.setSky(e),this._transitioning=this._transitionable.untransitioned(),this.recalculate(new o.C(0))}setSky(e,r={}){if(!this._validate(o.F,e,r)){e||(e={"sky-color":"transparent","horizon-color":"transparent","fog-color":"transparent","fog-ground-blend":1,"atmosphere-blend":0});for(const a in e){const l=e[a];a.endsWith("-transition")?this._transitionable.setTransition(a.slice(0,-11),l):this._transitionable.setValue(a,l)}}}getSky(){return this._transitionable.serialize()}updateTransitions(e){this._transitioning=this._transitionable.transitioned(e,this._transitioning)}hasTransition(){return this._transitioning.hasTransition()}recalculate(e){this.properties=this._transitioning.possiblyEvaluate(e)}_validate(e,r,a={}){return(a==null?void 0:a.validate)!==!1&&o.x(this,e.call(o.y,o.e({value:r,style:{glyphs:!0,sprite:!0},styleSpec:o.v})))}calculateFogBlendOpacity(e){return e<60?0:e<70?(e-60)/10:1}}class Rr{constructor(e,r){this.width=e,this.height=r,this.nextRow=0,this.data=new Uint8Array(this.width*this.height),this.dashEntry={}}getDash(e,r){const a=e.join(",")+String(r);return this.dashEntry[a]||(this.dashEntry[a]=this.addDash(e,r)),this.dashEntry[a]}getDashRanges(e,r,a){const l=[];let h=e.length%2==1?-e[e.length-1]*a:0,g=e[0]*a,b=!0;l.push({left:h,right:g,isDash:b,zeroLength:e[0]===0});let A=e[0];for(let I=1;I<e.length;I++){b=!b;const z=e[I];h=A*a,A+=z,g=A*a,l.push({left:h,right:g,isDash:b,zeroLength:z===0})}return l}addRoundDash(e,r,a){const l=r/2;for(let h=-a;h<=a;h++){const g=this.width*(this.nextRow+a+h);let b=0,A=e[b];for(let I=0;I<this.width;I++){I/A.right>1&&(A=e[++b]);const z=Math.abs(I-A.left),F=Math.abs(I-A.right),O=Math.min(z,F);let Z;const J=h/a*(l+1);if(A.isDash){const oe=l-Math.abs(J);Z=Math.sqrt(O*O+oe*oe)}else Z=l-Math.sqrt(O*O+J*J);this.data[g+I]=Math.max(0,Math.min(255,Z+128))}}}addRegularDash(e){for(let b=e.length-1;b>=0;--b){const A=e[b],I=e[b+1];A.zeroLength?e.splice(b,1):I&&I.isDash===A.isDash&&(I.left=A.left,e.splice(b,1))}const r=e[0],a=e[e.length-1];r.isDash===a.isDash&&(r.left=a.left-this.width,a.right=r.right+this.width);const l=this.width*this.nextRow;let h=0,g=e[h];for(let b=0;b<this.width;b++){b/g.right>1&&(g=e[++h]);const A=Math.abs(b-g.left),I=Math.abs(b-g.right),z=Math.min(A,I);this.data[l+b]=Math.max(0,Math.min(255,(g.isDash?z:-z)+128))}}addDash(e,r){const a=r?7:0,l=2*a+1;if(this.nextRow+l>this.height)return o.w("LineAtlas out of space"),null;let h=0;for(let b=0;b<e.length;b++)h+=e[b];if(h!==0){const b=this.width/h,A=this.getDashRanges(e,this.width,b);r?this.addRoundDash(A,b,a):this.addRegularDash(A)}const g={y:(this.nextRow+a+.5)/this.height,height:2*a/this.height,width:h};return this.nextRow+=l,this.dirty=!0,g}bind(e){const r=e.gl;this.texture?(r.bindTexture(r.TEXTURE_2D,this.texture),this.dirty&&(this.dirty=!1,r.texSubImage2D(r.TEXTURE_2D,0,0,0,this.width,this.height,r.ALPHA,r.UNSIGNED_BYTE,this.data))):(this.texture=r.createTexture(),r.bindTexture(r.TEXTURE_2D,this.texture),r.texParameteri(r.TEXTURE_2D,r.TEXTURE_WRAP_S,r.REPEAT),r.texParameteri(r.TEXTURE_2D,r.TEXTURE_WRAP_T,r.REPEAT),r.texParameteri(r.TEXTURE_2D,r.TEXTURE_MIN_FILTER,r.LINEAR),r.texParameteri(r.TEXTURE_2D,r.TEXTURE_MAG_FILTER,r.LINEAR),r.texImage2D(r.TEXTURE_2D,0,r.ALPHA,this.width,this.height,0,r.ALPHA,r.UNSIGNED_BYTE,this.data))}}const Xi="maplibre_preloaded_worker_pool";class Dr{constructor(){this.active={}}acquire(e){if(!this.workers)for(this.workers=[];this.workers.length<Dr.workerCount;)this.workers.push(new Worker(o.a.WORKER_URL));return this.active[e]=!0,this.workers.slice()}release(e){delete this.active[e],this.numActive()===0&&(this.workers.forEach(r=>{r.terminate()}),this.workers=null)}isPreloaded(){return!!this.active[Xi]}numActive(){return Object.keys(this.active).length}}const ln=Math.floor(M.hardwareConcurrency/2);let Si,Zr;function Qi(){return Si||(Si=new Dr),Si}Dr.workerCount=o.G(globalThis)?Math.max(Math.min(ln,3),1):1;class Yr{constructor(e,r){this.workerPool=e,this.actors=[],this.currentActor=0,this.id=r;const a=this.workerPool.acquire(r);for(let l=0;l<a.length;l++){const h=new o.H(a[l],r);h.name=`Worker ${l}`,this.actors.push(h)}if(!this.actors.length)throw new Error("No actors found")}broadcast(e,r){const a=[];for(const l of this.actors)a.push(l.sendAsync({type:e,data:r}));return Promise.all(a)}getActor(){return this.currentActor=(this.currentActor+1)%this.actors.length,this.actors[this.currentActor]}remove(e=!0){this.actors.forEach(r=>{r.remove()}),this.actors=[],e&&this.workerPool.release(this.id)}registerMessageHandler(e,r){for(const a of this.actors)a.registerMessageHandler(e,r)}}function Yi(){return Zr||(Zr=new Yr(Qi(),o.J),Zr.registerMessageHandler("GR",(u,e,r)=>o.m(e,r))),Zr}function Li(u,e){const r=o.K();return o.L(r,r,[1,1,0]),o.M(r,r,[.5*u.width,.5*u.height,1]),u.calculatePosMatrix?o.N(r,r,u.calculatePosMatrix(e.toUnwrapped())):r}function In(u,e,r,a,l,h,g){var b;const A=function(O,Z,J){if(O)for(const oe of O){const ne=Z[oe];if(ne&&ne.source===J&&ne.type==="fill-extrusion")return!0}else for(const oe in Z){const ne=Z[oe];if(ne.source===J&&ne.type==="fill-extrusion")return!0}return!1}((b=l==null?void 0:l.layers)!==null&&b!==void 0?b:null,e,u.id),I=h.maxPitchScaleFactor(),z=u.tilesIn(a,I,A);z.sort(fi);const F=[];for(const O of z)F.push({wrappedTileID:O.tileID.wrapped().key,queryResults:O.tile.queryRenderedFeatures(e,r,u._state,O.queryGeometry,O.cameraQueryGeometry,O.scale,l,h,I,Li(u.transform,O.tileID),g?(Z,J)=>g(O.tileID,Z,J):void 0)});return function(O,Z){for(const J in O)for(const oe of O[J])gt(oe,Z);return O}(function(O){const Z={},J={};for(const oe of O){const ne=oe.queryResults,se=oe.wrappedTileID,de=J[se]=J[se]||{};for(const _e in ne){const ye=ne[_e],be=de[_e]=de[_e]||{},ke=Z[_e]=Z[_e]||[];for(const we of ye)be[we.featureIndex]||(be[we.featureIndex]=!0,ke.push(we))}}return Z}(F),u)}function fi(u,e){const r=u.tileID,a=e.tileID;return r.overscaledZ-a.overscaledZ||r.canonical.y-a.canonical.y||r.wrap-a.wrap||r.canonical.x-a.canonical.x}function gt(u,e){const r=u.feature,a=e.getFeatureState(r.layer["source-layer"],r.id);r.source=r.layer.source,r.layer["source-layer"]&&(r.sourceLayer=r.layer["source-layer"]),r.state=a}function bt(u,e,r){return o._(this,void 0,void 0,function*(){let a=u;if(u.url?a=(yield o.j(e.transformRequest(u.url,"Source"),r)).data:yield M.frameAsync(r),!a)return null;const l=o.O(o.e(a,u),["tiles","minzoom","maxzoom","attribution","bounds","scheme","tileSize","encoding"]);return"vector_layers"in a&&a.vector_layers&&(l.vectorLayerIds=a.vector_layers.map(h=>h.id)),l})}class ct{constructor(e,r){e&&(r?this.setSouthWest(e).setNorthEast(r):Array.isArray(e)&&(e.length===4?this.setSouthWest([e[0],e[1]]).setNorthEast([e[2],e[3]]):this.setSouthWest(e[0]).setNorthEast(e[1])))}setNorthEast(e){return this._ne=e instanceof o.Q?new o.Q(e.lng,e.lat):o.Q.convert(e),this}setSouthWest(e){return this._sw=e instanceof o.Q?new o.Q(e.lng,e.lat):o.Q.convert(e),this}extend(e){const r=this._sw,a=this._ne;let l,h;if(e instanceof o.Q)l=e,h=e;else{if(!(e instanceof ct))return Array.isArray(e)?e.length===4||e.every(Array.isArray)?this.extend(ct.convert(e)):this.extend(o.Q.convert(e)):e&&("lng"in e||"lon"in e)&&"lat"in e?this.extend(o.Q.convert(e)):this;if(l=e._sw,h=e._ne,!l||!h)return this}return r||a?(r.lng=Math.min(l.lng,r.lng),r.lat=Math.min(l.lat,r.lat),a.lng=Math.max(h.lng,a.lng),a.lat=Math.max(h.lat,a.lat)):(this._sw=new o.Q(l.lng,l.lat),this._ne=new o.Q(h.lng,h.lat)),this}getCenter(){return new o.Q((this._sw.lng+this._ne.lng)/2,(this._sw.lat+this._ne.lat)/2)}getSouthWest(){return this._sw}getNorthEast(){return this._ne}getNorthWest(){return new o.Q(this.getWest(),this.getNorth())}getSouthEast(){return new o.Q(this.getEast(),this.getSouth())}getWest(){return this._sw.lng}getSouth(){return this._sw.lat}getEast(){return this._ne.lng}getNorth(){return this._ne.lat}toArray(){return[this._sw.toArray(),this._ne.toArray()]}toString(){return`LngLatBounds(${this._sw.toString()}, ${this._ne.toString()})`}isEmpty(){return!(this._sw&&this._ne)}contains(e){const{lng:r,lat:a}=o.Q.convert(e);let l=this._sw.lng<=r&&r<=this._ne.lng;return this._sw.lng>this._ne.lng&&(l=this._sw.lng>=r&&r>=this._ne.lng),this._sw.lat<=a&&a<=this._ne.lat&&l}static convert(e){return e instanceof ct?e:e&&new ct(e)}static fromLngLat(e,r=0){const a=360*r/40075017,l=a/Math.cos(Math.PI/180*e.lat);return new ct(new o.Q(e.lng-l,e.lat-a),new o.Q(e.lng+l,e.lat+a))}adjustAntiMeridian(){const e=new o.Q(this._sw.lng,this._sw.lat),r=new o.Q(this._ne.lng,this._ne.lat);return new ct(e,e.lng>r.lng?new o.Q(r.lng+360,r.lat):r)}}class Bt{constructor(e,r,a){this.bounds=ct.convert(this.validateBounds(e)),this.minzoom=r||0,this.maxzoom=a||24}validateBounds(e){return Array.isArray(e)&&e.length===4?[Math.max(-180,e[0]),Math.max(-90,e[1]),Math.min(180,e[2]),Math.min(90,e[3])]:[-180,-90,180,90]}contains(e){const r=Math.pow(2,e.z),a=Math.floor(o.U(this.bounds.getWest())*r),l=Math.floor(o.S(this.bounds.getNorth())*r),h=Math.ceil(o.U(this.bounds.getEast())*r),g=Math.ceil(o.S(this.bounds.getSouth())*r);return e.x>=a&&e.x<h&&e.y>=l&&e.y<g}}class Ht extends o.E{constructor(e,r,a,l){if(super(),this.id=e,this.dispatcher=a,this.type="vector",this.minzoom=0,this.maxzoom=22,this.scheme="xyz",this.tileSize=512,this.reparseOverscaled=!0,this.isTileClipped=!0,this._loaded=!1,o.e(this,o.O(r,["url","scheme","tileSize","promoteId"])),this._options=o.e({type:"vector"},r),this._collectResourceTiming=r.collectResourceTiming,this.tileSize!==512)throw new Error("vector tile sources must have a tileSize of 512");this.setEventedParent(l)}load(){return o._(this,void 0,void 0,function*(){this._loaded=!1,this.fire(new o.l("dataloading",{dataType:"source"})),this._tileJSONRequest=new AbortController;try{const e=yield bt(this._options,this.map._requestManager,this._tileJSONRequest);this._tileJSONRequest=null,this._loaded=!0,this.map.style.sourceCaches[this.id].clearTiles(),e&&(o.e(this,e),e.bounds&&(this.tileBounds=new Bt(e.bounds,this.minzoom,this.maxzoom)),this.fire(new o.l("data",{dataType:"source",sourceDataType:"metadata"})),this.fire(new o.l("data",{dataType:"source",sourceDataType:"content"})))}catch(e){this._tileJSONRequest=null,this.fire(new o.k(e))}})}loaded(){return this._loaded}hasTile(e){return!this.tileBounds||this.tileBounds.contains(e.canonical)}onAdd(e){this.map=e,this.load()}setSourceProperty(e){this._tileJSONRequest&&this._tileJSONRequest.abort(),e(),this.load()}setTiles(e){return this.setSourceProperty(()=>{this._options.tiles=e}),this}setUrl(e){return this.setSourceProperty(()=>{this.url=e,this._options.url=e}),this}onRemove(){this._tileJSONRequest&&(this._tileJSONRequest.abort(),this._tileJSONRequest=null)}serialize(){return o.e({},this._options)}loadTile(e){return o._(this,void 0,void 0,function*(){const r=e.tileID.canonical.url(this.tiles,this.map.getPixelRatio(),this.scheme),a={request:this.map._requestManager.transformRequest(r,"Tile"),uid:e.uid,tileID:e.tileID,zoom:e.tileID.overscaledZ,tileSize:this.tileSize*e.tileID.overscaleFactor(),type:this.type,source:this.id,pixelRatio:this.map.getPixelRatio(),showCollisionBoxes:this.map.showCollisionBoxes,promoteId:this.promoteId,subdivisionGranularity:this.map.style.projection.subdivisionGranularity};a.request.collectResourceTiming=this._collectResourceTiming;let l="RT";if(e.actor&&e.state!=="expired"){if(e.state==="loading")return new Promise((h,g)=>{e.reloadPromise={resolve:h,reject:g}})}else e.actor=this.dispatcher.getActor(),l="LT";e.abortController=new AbortController;try{const h=yield e.actor.sendAsync({type:l,data:a},e.abortController);if(delete e.abortController,e.aborted)return;this._afterTileLoadWorkerResponse(e,h)}catch(h){if(delete e.abortController,e.aborted)return;if(h&&h.status!==404)throw h;this._afterTileLoadWorkerResponse(e,null)}})}_afterTileLoadWorkerResponse(e,r){if(r&&r.resourceTiming&&(e.resourceTiming=r.resourceTiming),r&&this.map._refreshExpiredTiles&&e.setExpiryData(r),e.loadVectorData(r,this.map.painter),e.reloadPromise){const a=e.reloadPromise;e.reloadPromise=null,this.loadTile(e).then(a.resolve).catch(a.reject)}}abortTile(e){return o._(this,void 0,void 0,function*(){e.abortController&&(e.abortController.abort(),delete e.abortController),e.actor&&(yield e.actor.sendAsync({type:"AT",data:{uid:e.uid,type:this.type,source:this.id}}))})}unloadTile(e){return o._(this,void 0,void 0,function*(){e.unloadVectorData(),e.actor&&(yield e.actor.sendAsync({type:"RMT",data:{uid:e.uid,type:this.type,source:this.id}}))})}hasTransition(){return!1}}class Ot extends o.E{constructor(e,r,a,l){super(),this.id=e,this.dispatcher=a,this.setEventedParent(l),this.type="raster",this.minzoom=0,this.maxzoom=22,this.roundZoom=!0,this.scheme="xyz",this.tileSize=512,this._loaded=!1,this._options=o.e({type:"raster"},r),o.e(this,o.O(r,["url","scheme","tileSize"]))}load(){return o._(this,arguments,void 0,function*(e=!1){this._loaded=!1,this.fire(new o.l("dataloading",{dataType:"source"})),this._tileJSONRequest=new AbortController;try{const r=yield bt(this._options,this.map._requestManager,this._tileJSONRequest);this._tileJSONRequest=null,this._loaded=!0,r&&(o.e(this,r),r.bounds&&(this.tileBounds=new Bt(r.bounds,this.minzoom,this.maxzoom)),this.fire(new o.l("data",{dataType:"source",sourceDataType:"metadata"})),this.fire(new o.l("data",{dataType:"source",sourceDataType:"content",sourceDataChanged:e})))}catch(r){this._tileJSONRequest=null,this.fire(new o.k(r))}})}loaded(){return this._loaded}onAdd(e){this.map=e,this.load()}onRemove(){this._tileJSONRequest&&(this._tileJSONRequest.abort(),this._tileJSONRequest=null)}setSourceProperty(e){this._tileJSONRequest&&(this._tileJSONRequest.abort(),this._tileJSONRequest=null),e(),this.load(!0)}setTiles(e){return this.setSourceProperty(()=>{this._options.tiles=e}),this}setUrl(e){return this.setSourceProperty(()=>{this.url=e,this._options.url=e}),this}serialize(){return o.e({},this._options)}hasTile(e){return!this.tileBounds||this.tileBounds.contains(e.canonical)}loadTile(e){return o._(this,void 0,void 0,function*(){const r=e.tileID.canonical.url(this.tiles,this.map.getPixelRatio(),this.scheme);e.abortController=new AbortController;try{const a=yield te.getImage(this.map._requestManager.transformRequest(r,"Tile"),e.abortController,this.map._refreshExpiredTiles);if(delete e.abortController,e.aborted)return void(e.state="unloaded");if(a&&a.data){this.map._refreshExpiredTiles&&(a.cacheControl||a.expires)&&e.setExpiryData({cacheControl:a.cacheControl,expires:a.expires});const l=this.map.painter.context,h=l.gl,g=a.data;e.texture=this.map.painter.getTileTexture(g.width),e.texture?e.texture.update(g,{useMipmap:!0}):(e.texture=new rt(l,g,h.RGBA,{useMipmap:!0}),e.texture.bind(h.LINEAR,h.CLAMP_TO_EDGE,h.LINEAR_MIPMAP_NEAREST)),e.state="loaded"}}catch(a){if(delete e.abortController,e.aborted)e.state="unloaded";else if(a)throw e.state="errored",a}})}abortTile(e){return o._(this,void 0,void 0,function*(){e.abortController&&(e.abortController.abort(),delete e.abortController)})}unloadTile(e){return o._(this,void 0,void 0,function*(){e.texture&&this.map.painter.saveTileTexture(e.texture)})}hasTransition(){return!1}}class pr extends Ot{constructor(e,r,a,l){super(e,r,a,l),this.type="raster-dem",this.maxzoom=22,this._options=o.e({type:"raster-dem"},r),this.encoding=r.encoding||"mapbox",this.redFactor=r.redFactor,this.greenFactor=r.greenFactor,this.blueFactor=r.blueFactor,this.baseShift=r.baseShift}loadTile(e){return o._(this,void 0,void 0,function*(){const r=e.tileID.canonical.url(this.tiles,this.map.getPixelRatio(),this.scheme),a=this.map._requestManager.transformRequest(r,"Tile");e.neighboringTiles=this._getNeighboringTiles(e.tileID),e.abortController=new AbortController;try{const l=yield te.getImage(a,e.abortController,this.map._refreshExpiredTiles);if(delete e.abortController,e.aborted)return void(e.state="unloaded");if(l&&l.data){const h=l.data;this.map._refreshExpiredTiles&&(l.cacheControl||l.expires)&&e.setExpiryData({cacheControl:l.cacheControl,expires:l.expires});const g=o.b(h)&&o.V()?h:yield this.readImageNow(h),b={type:this.type,uid:e.uid,source:this.id,rawImageData:g,encoding:this.encoding,redFactor:this.redFactor,greenFactor:this.greenFactor,blueFactor:this.blueFactor,baseShift:this.baseShift};if(!e.actor||e.state==="expired"){e.actor=this.dispatcher.getActor();const A=yield e.actor.sendAsync({type:"LDT",data:b});e.dem=A,e.needsHillshadePrepare=!0,e.needsTerrainPrepare=!0,e.state="loaded"}}}catch(l){if(delete e.abortController,e.aborted)e.state="unloaded";else if(l)throw e.state="errored",l}})}readImageNow(e){return o._(this,void 0,void 0,function*(){if(typeof VideoFrame<"u"&&o.W()){const r=e.width+2,a=e.height+2;try{return new o.R({width:r,height:a},yield o.X(e,-1,-1,r,a))}catch{}}return M.getImageData(e,1)})}_getNeighboringTiles(e){const r=e.canonical,a=Math.pow(2,r.z),l=(r.x-1+a)%a,h=r.x===0?e.wrap-1:e.wrap,g=(r.x+1+a)%a,b=r.x+1===a?e.wrap+1:e.wrap,A={};return A[new o.Y(e.overscaledZ,h,r.z,l,r.y).key]={backfilled:!1},A[new o.Y(e.overscaledZ,b,r.z,g,r.y).key]={backfilled:!1},r.y>0&&(A[new o.Y(e.overscaledZ,h,r.z,l,r.y-1).key]={backfilled:!1},A[new o.Y(e.overscaledZ,e.wrap,r.z,r.x,r.y-1).key]={backfilled:!1},A[new o.Y(e.overscaledZ,b,r.z,g,r.y-1).key]={backfilled:!1}),r.y+1<a&&(A[new o.Y(e.overscaledZ,h,r.z,l,r.y+1).key]={backfilled:!1},A[new o.Y(e.overscaledZ,e.wrap,r.z,r.x,r.y+1).key]={backfilled:!1},A[new o.Y(e.overscaledZ,b,r.z,g,r.y+1).key]={backfilled:!1}),A}unloadTile(e){return o._(this,void 0,void 0,function*(){e.demTexture&&this.map.painter.saveTileTexture(e.demTexture),e.fbo&&(e.fbo.destroy(),delete e.fbo),e.dem&&delete e.dem,delete e.neighboringTiles,e.state="unloaded",e.actor&&(yield e.actor.sendAsync({type:"RDT",data:{type:this.type,uid:e.uid,source:this.id}}))})}}class Nt extends o.E{constructor(e,r,a,l){super(),this.id=e,this.type="geojson",this.minzoom=0,this.maxzoom=18,this.tileSize=512,this.isTileClipped=!0,this.reparseOverscaled=!0,this._removed=!1,this._pendingLoads=0,this.actor=a.getActor(),this.setEventedParent(l),this._data=r.data,this._options=o.e({},r),this._collectResourceTiming=r.collectResourceTiming,r.maxzoom!==void 0&&(this.maxzoom=r.maxzoom),r.type&&(this.type=r.type),r.attribution&&(this.attribution=r.attribution),this.promoteId=r.promoteId,r.clusterMaxZoom!==void 0&&this.maxzoom<=r.clusterMaxZoom&&o.w(`The maxzoom value "${this.maxzoom}" is expected to be greater than the clusterMaxZoom value "${r.clusterMaxZoom}".`),this.workerOptions=o.e({source:this.id,cluster:r.cluster||!1,geojsonVtOptions:{buffer:this._pixelsToTileUnits(r.buffer!==void 0?r.buffer:128),tolerance:this._pixelsToTileUnits(r.tolerance!==void 0?r.tolerance:.375),extent:o.Z,maxZoom:this.maxzoom,lineMetrics:r.lineMetrics||!1,generateId:r.generateId||!1},superclusterOptions:{maxZoom:r.clusterMaxZoom!==void 0?r.clusterMaxZoom:this.maxzoom-1,minPoints:Math.max(2,r.clusterMinPoints||2),extent:o.Z,radius:this._pixelsToTileUnits(r.clusterRadius||50),log:!1,generateId:r.generateId||!1},clusterProperties:r.clusterProperties,filter:r.filter},r.workerOptions),typeof this.promoteId=="string"&&(this.workerOptions.promoteId=this.promoteId)}_pixelsToTileUnits(e){return e*(o.Z/this.tileSize)}load(){return o._(this,void 0,void 0,function*(){yield this._updateWorkerData()})}onAdd(e){this.map=e,this.load()}setData(e){return this._data=e,this._updateWorkerData(),this}updateData(e){return this._updateWorkerData(e),this}getData(){return o._(this,void 0,void 0,function*(){const e=o.e({type:this.type},this.workerOptions);return this.actor.sendAsync({type:"GD",data:e})})}getCoordinatesFromGeometry(e){return e.type==="GeometryCollection"?e.geometries.map(r=>r.coordinates).flat(1/0):e.coordinates.flat(1/0)}getBounds(){return o._(this,void 0,void 0,function*(){const e=new ct,r=yield this.getData();let a;switch(r.type){case"FeatureCollection":a=r.features.map(l=>this.getCoordinatesFromGeometry(l.geometry)).flat(1/0);break;case"Feature":a=this.getCoordinatesFromGeometry(r.geometry);break;default:a=this.getCoordinatesFromGeometry(r)}if(a.length==0)return e;for(let l=0;l<a.length-1;l+=2)e.extend([a[l],a[l+1]]);return e})}setClusterOptions(e){return this.workerOptions.cluster=e.cluster,e&&(e.clusterRadius!==void 0&&(this.workerOptions.superclusterOptions.radius=this._pixelsToTileUnits(e.clusterRadius)),e.clusterMaxZoom!==void 0&&(this.workerOptions.superclusterOptions.maxZoom=e.clusterMaxZoom)),this._updateWorkerData(),this}getClusterExpansionZoom(e){return this.actor.sendAsync({type:"GCEZ",data:{type:this.type,clusterId:e,source:this.id}})}getClusterChildren(e){return this.actor.sendAsync({type:"GCC",data:{type:this.type,clusterId:e,source:this.id}})}getClusterLeaves(e,r,a){return this.actor.sendAsync({type:"GCL",data:{type:this.type,source:this.id,clusterId:e,limit:r,offset:a}})}_updateWorkerData(e){return o._(this,void 0,void 0,function*(){const r=o.e({type:this.type},this.workerOptions);e?r.dataDiff=e:typeof this._data=="string"?(r.request=this.map._requestManager.transformRequest(M.resolveURL(this._data),"Source"),r.request.collectResourceTiming=this._collectResourceTiming):r.data=JSON.stringify(this._data),this._pendingLoads++,this.fire(new o.l("dataloading",{dataType:"source"}));try{const a=yield this.actor.sendAsync({type:"LD",data:r});if(this._pendingLoads--,this._removed||a.abandoned)return void this.fire(new o.l("dataabort",{dataType:"source"}));let l=null;a.resourceTiming&&a.resourceTiming[this.id]&&(l=a.resourceTiming[this.id].slice(0));const h={dataType:"source"};this._collectResourceTiming&&l&&l.length>0&&o.e(h,{resourceTiming:l}),this.fire(new o.l("data",Object.assign(Object.assign({},h),{sourceDataType:"metadata"}))),this.fire(new o.l("data",Object.assign(Object.assign({},h),{sourceDataType:"content"})))}catch(a){if(this._pendingLoads--,this._removed)return void this.fire(new o.l("dataabort",{dataType:"source"}));this.fire(new o.k(a))}})}loaded(){return this._pendingLoads===0}loadTile(e){return o._(this,void 0,void 0,function*(){const r=e.actor?"RT":"LT";e.actor=this.actor;const a={type:this.type,uid:e.uid,tileID:e.tileID,zoom:e.tileID.overscaledZ,maxZoom:this.maxzoom,tileSize:this.tileSize,source:this.id,pixelRatio:this.map.getPixelRatio(),showCollisionBoxes:this.map.showCollisionBoxes,promoteId:this.promoteId,subdivisionGranularity:this.map.style.projection.subdivisionGranularity};e.abortController=new AbortController;const l=yield this.actor.sendAsync({type:r,data:a},e.abortController);delete e.abortController,e.unloadVectorData(),e.aborted||e.loadVectorData(l,this.map.painter,r==="RT")})}abortTile(e){return o._(this,void 0,void 0,function*(){e.abortController&&(e.abortController.abort(),delete e.abortController),e.aborted=!0})}unloadTile(e){return o._(this,void 0,void 0,function*(){e.unloadVectorData(),yield this.actor.sendAsync({type:"RMT",data:{uid:e.uid,type:this.type,source:this.id}})})}onRemove(){this._removed=!0,this.actor.sendAsync({type:"RS",data:{type:this.type,source:this.id}})}serialize(){return o.e({},this._options,{type:this.type,data:this._data})}hasTransition(){return!1}}class mr extends o.E{constructor(e,r,a,l){super(),this.flippedWindingOrder=!1,this.id=e,this.dispatcher=a,this.coordinates=r.coordinates,this.type="image",this.minzoom=0,this.maxzoom=22,this.tileSize=512,this.tiles={},this._loaded=!1,this.setEventedParent(l),this.options=r}load(e){return o._(this,void 0,void 0,function*(){this._loaded=!1,this.fire(new o.l("dataloading",{dataType:"source"})),this.url=this.options.url,this._request=new AbortController;try{const r=yield te.getImage(this.map._requestManager.transformRequest(this.url,"Image"),this._request);this._request=null,this._loaded=!0,r&&r.data&&(this.image=r.data,e&&(this.coordinates=e),this._finishLoading())}catch(r){this._request=null,this._loaded=!0,this.fire(new o.k(r))}})}loaded(){return this._loaded}updateImage(e){return e.url?(this._request&&(this._request.abort(),this._request=null),this.options.url=e.url,this.load(e.coordinates).finally(()=>{this.texture=null}),this):this}_finishLoading(){this.map&&(this.setCoordinates(this.coordinates),this.fire(new o.l("data",{dataType:"source",sourceDataType:"metadata"})))}onAdd(e){this.map=e,this.load()}onRemove(){this._request&&(this._request.abort(),this._request=null)}setCoordinates(e){this.coordinates=e;const r=e.map(o.$.fromLngLat);var a;return this.tileID=function(l){let h=1/0,g=1/0,b=-1/0,A=-1/0;for(const O of l)h=Math.min(h,O.x),g=Math.min(g,O.y),b=Math.max(b,O.x),A=Math.max(A,O.y);const I=Math.max(b-h,A-g),z=Math.max(0,Math.floor(-Math.log(I)/Math.LN2)),F=Math.pow(2,z);return new o.a1(z,Math.floor((h+b)/2*F),Math.floor((g+A)/2*F))}(r),this.terrainTileRanges=this._getOverlappingTileRanges(r),this.minzoom=this.maxzoom=this.tileID.z,this.tileCoords=r.map(l=>this.tileID.getTilePoint(l)._round()),this.flippedWindingOrder=((a=this.tileCoords)[1].x-a[0].x)*(a[2].y-a[0].y)-(a[1].y-a[0].y)*(a[2].x-a[0].x)<0,this.fire(new o.l("data",{dataType:"source",sourceDataType:"content"})),this}prepare(){if(Object.keys(this.tiles).length===0||!this.image)return;const e=this.map.painter.context,r=e.gl;this.texture||(this.texture=new rt(e,this.image,r.RGBA),this.texture.bind(r.LINEAR,r.CLAMP_TO_EDGE));let a=!1;for(const l in this.tiles){const h=this.tiles[l];h.state!=="loaded"&&(h.state="loaded",h.texture=this.texture,a=!0)}a&&this.fire(new o.l("data",{dataType:"source",sourceDataType:"idle",sourceId:this.id}))}loadTile(e){return o._(this,void 0,void 0,function*(){this.tileID&&this.tileID.equals(e.tileID.canonical)?(this.tiles[String(e.tileID.wrap)]=e,e.buckets={}):e.state="errored"})}serialize(){return{type:"image",url:this.options.url,coordinates:this.coordinates}}hasTransition(){return!1}_getOverlappingTileRanges(e){let r=1/0,a=1/0,l=-1/0,h=-1/0;for(const b of e)r=Math.min(r,b.x),a=Math.min(a,b.y),l=Math.max(l,b.x),h=Math.max(h,b.y);const g={};for(let b=0;b<=o.a0;b++){const A=Math.pow(2,b),I=Math.floor(r*A),z=Math.floor(a*A),F=Math.floor(l*A),O=Math.floor(h*A);g[b]={minTileX:I,minTileY:z,maxTileX:F,maxTileY:O}}return g}}class jr extends mr{constructor(e,r,a,l){super(e,r,a,l),this.roundZoom=!0,this.type="video",this.options=r}load(){return o._(this,void 0,void 0,function*(){this._loaded=!1;const e=this.options;this.urls=[];for(const r of e.urls)this.urls.push(this.map._requestManager.transformRequest(r,"Source").url);try{const r=yield o.a2(this.urls);if(this._loaded=!0,!r)return;this.video=r,this.video.loop=!0,this.video.addEventListener("playing",()=>{this.map.triggerRepaint()}),this.map&&this.video.play(),this._finishLoading()}catch(r){this.fire(new o.k(r))}})}pause(){this.video&&this.video.pause()}play(){this.video&&this.video.play()}seek(e){if(this.video){const r=this.video.seekable;e<r.start(0)||e>r.end(0)?this.fire(new o.k(new o.a3(`sources.${this.id}`,null,`Playback for this video can be set only between the ${r.start(0)} and ${r.end(0)}-second mark.`))):this.video.currentTime=e}}getVideo(){return this.video}onAdd(e){this.map||(this.map=e,this.load(),this.video&&(this.video.play(),this.setCoordinates(this.coordinates)))}prepare(){if(Object.keys(this.tiles).length===0||this.video.readyState<2)return;const e=this.map.painter.context,r=e.gl;this.texture?this.video.paused||(this.texture.bind(r.LINEAR,r.CLAMP_TO_EDGE),r.texSubImage2D(r.TEXTURE_2D,0,0,0,r.RGBA,r.UNSIGNED_BYTE,this.video)):(this.texture=new rt(e,this.video,r.RGBA),this.texture.bind(r.LINEAR,r.CLAMP_TO_EDGE));let a=!1;for(const l in this.tiles){const h=this.tiles[l];h.state!=="loaded"&&(h.state="loaded",h.texture=this.texture,a=!0)}a&&this.fire(new o.l("data",{dataType:"source",sourceDataType:"idle",sourceId:this.id}))}serialize(){return{type:"video",urls:this.urls,coordinates:this.coordinates}}hasTransition(){return this.video&&!this.video.paused}}class mi extends mr{constructor(e,r,a,l){super(e,r,a,l),r.coordinates?Array.isArray(r.coordinates)&&r.coordinates.length===4&&!r.coordinates.some(h=>!Array.isArray(h)||h.length!==2||h.some(g=>typeof g!="number"))||this.fire(new o.k(new o.a3(`sources.${e}`,null,'"coordinates" property must be an array of 4 longitude/latitude array pairs'))):this.fire(new o.k(new o.a3(`sources.${e}`,null,'missing required property "coordinates"'))),r.animate&&typeof r.animate!="boolean"&&this.fire(new o.k(new o.a3(`sources.${e}`,null,'optional "animate" property must be a boolean value'))),r.canvas?typeof r.canvas=="string"||r.canvas instanceof HTMLCanvasElement||this.fire(new o.k(new o.a3(`sources.${e}`,null,'"canvas" must be either a string representing the ID of the canvas element from which to read, or an HTMLCanvasElement instance'))):this.fire(new o.k(new o.a3(`sources.${e}`,null,'missing required property "canvas"'))),this.options=r,this.animate=r.animate===void 0||r.animate}load(){return o._(this,void 0,void 0,function*(){this._loaded=!0,this.canvas||(this.canvas=this.options.canvas instanceof HTMLCanvasElement?this.options.canvas:document.getElementById(this.options.canvas)),this.width=this.canvas.width,this.height=this.canvas.height,this._hasInvalidDimensions()?this.fire(new o.k(new Error("Canvas dimensions cannot be less than or equal to zero."))):(this.play=function(){this._playing=!0,this.map.triggerRepaint()},this.pause=function(){this._playing&&(this.prepare(),this._playing=!1)},this._finishLoading())})}getCanvas(){return this.canvas}onAdd(e){this.map=e,this.load(),this.canvas&&this.animate&&this.play()}onRemove(){this.pause()}prepare(){let e=!1;if(this.canvas.width!==this.width&&(this.width=this.canvas.width,e=!0),this.canvas.height!==this.height&&(this.height=this.canvas.height,e=!0),this._hasInvalidDimensions()||Object.keys(this.tiles).length===0)return;const r=this.map.painter.context,a=r.gl;this.texture?(e||this._playing)&&this.texture.update(this.canvas,{premultiply:!0}):this.texture=new rt(r,this.canvas,a.RGBA,{premultiply:!0});let l=!1;for(const h in this.tiles){const g=this.tiles[h];g.state!=="loaded"&&(g.state="loaded",g.texture=this.texture,l=!0)}l&&this.fire(new o.l("data",{dataType:"source",sourceDataType:"idle",sourceId:this.id}))}serialize(){return{type:"canvas",coordinates:this.coordinates}}hasTransition(){return this._playing}_hasInvalidDimensions(){for(const e of[this.canvas.width,this.canvas.height])if(isNaN(e)||e<=0)return!0;return!1}}const Ir={},gi=u=>{switch(u){case"geojson":return Nt;case"image":return mr;case"raster":return Ot;case"raster-dem":return pr;case"vector":return Ht;case"video":return jr;case"canvas":return mi}return Ir[u]},Vi="RTLPluginLoaded";class hr extends o.E{constructor(){super(...arguments),this.status="unavailable",this.url=null,this.dispatcher=Yi()}_syncState(e){return this.status=e,this.dispatcher.broadcast("SRPS",{pluginStatus:e,pluginURL:this.url}).catch(r=>{throw this.status="error",r})}getRTLTextPluginStatus(){return this.status}clearRTLTextPlugin(){this.status="unavailable",this.url=null}setRTLTextPlugin(e){return o._(this,arguments,void 0,function*(r,a=!1){if(this.url)throw new Error("setRTLTextPlugin cannot be called multiple times.");if(this.url=M.resolveURL(r),!this.url)throw new Error(`requested url ${r} is invalid`);if(this.status==="unavailable"){if(!a)return this._requestImport();this.status="deferred",this._syncState(this.status)}else if(this.status==="requested")return this._requestImport()})}_requestImport(){return o._(this,void 0,void 0,function*(){yield this._syncState("loading"),this.status="loaded",this.fire(new o.l(Vi))})}lazyLoad(){this.status==="unavailable"?this.status="requested":this.status==="deferred"&&this._requestImport()}}let lr=null;function Ft(){return lr||(lr=new hr),lr}class wr{constructor(e,r){this.timeAdded=0,this.fadeEndTime=0,this.tileID=e,this.uid=o.a4(),this.uses=0,this.tileSize=r,this.buckets={},this.expirationTime=null,this.queryPadding=0,this.hasSymbolBuckets=!1,this.hasRTLText=!1,this.dependencies={},this.rtt=[],this.rttCoords={},this.expiredRequestCount=0,this.state="loading"}registerFadeDuration(e){const r=e+this.timeAdded;r<this.fadeEndTime||(this.fadeEndTime=r)}wasRequested(){return this.state==="errored"||this.state==="loaded"||this.state==="reloading"}clearTextures(e){this.demTexture&&e.saveTileTexture(this.demTexture),this.demTexture=null}loadVectorData(e,r,a){if(this.hasData()&&this.unloadVectorData(),this.state="loaded",e){e.featureIndex&&(this.latestFeatureIndex=e.featureIndex,e.rawTileData?(this.latestRawTileData=e.rawTileData,this.latestFeatureIndex.rawTileData=e.rawTileData):this.latestRawTileData&&(this.latestFeatureIndex.rawTileData=this.latestRawTileData)),this.collisionBoxArray=e.collisionBoxArray,this.buckets=function(l,h){const g={};if(!h)return g;for(const b of l){const A=b.layerIds.map(I=>h.getLayer(I)).filter(Boolean);if(A.length!==0){b.layers=A,b.stateDependentLayerIds&&(b.stateDependentLayers=b.stateDependentLayerIds.map(I=>A.filter(z=>z.id===I)[0]));for(const I of A)g[I.id]=b}}return g}(e.buckets,r==null?void 0:r.style),this.hasSymbolBuckets=!1;for(const l in this.buckets){const h=this.buckets[l];if(h instanceof o.a6){if(this.hasSymbolBuckets=!0,!a)break;h.justReloaded=!0}}if(this.hasRTLText=!1,this.hasSymbolBuckets)for(const l in this.buckets){const h=this.buckets[l];if(h instanceof o.a6&&h.hasRTLText){this.hasRTLText=!0,Ft().lazyLoad();break}}this.queryPadding=0;for(const l in this.buckets){const h=this.buckets[l];this.queryPadding=Math.max(this.queryPadding,r.style.getLayer(l).queryRadius(h))}e.imageAtlas&&(this.imageAtlas=e.imageAtlas),e.glyphAtlasImage&&(this.glyphAtlasImage=e.glyphAtlasImage)}else this.collisionBoxArray=new o.a5}unloadVectorData(){for(const e in this.buckets)this.buckets[e].destroy();this.buckets={},this.imageAtlasTexture&&this.imageAtlasTexture.destroy(),this.imageAtlas&&(this.imageAtlas=null),this.glyphAtlasTexture&&this.glyphAtlasTexture.destroy(),this.latestFeatureIndex=null,this.state="unloaded"}getBucket(e){return this.buckets[e.id]}upload(e){for(const a in this.buckets){const l=this.buckets[a];l.uploadPending()&&l.upload(e)}const r=e.gl;this.imageAtlas&&!this.imageAtlas.uploaded&&(this.imageAtlasTexture=new rt(e,this.imageAtlas.image,r.RGBA),this.imageAtlas.uploaded=!0),this.glyphAtlasImage&&(this.glyphAtlasTexture=new rt(e,this.glyphAtlasImage,r.ALPHA),this.glyphAtlasImage=null)}prepare(e){this.imageAtlas&&this.imageAtlas.patchUpdatedImages(e,this.imageAtlasTexture)}queryRenderedFeatures(e,r,a,l,h,g,b,A,I,z,F){return this.latestFeatureIndex&&this.latestFeatureIndex.rawTileData?this.latestFeatureIndex.query({queryGeometry:l,cameraQueryGeometry:h,scale:g,tileSize:this.tileSize,pixelPosMatrix:z,transform:A,params:b,queryPadding:this.queryPadding*I,getElevation:F},e,r,a):{}}querySourceFeatures(e,r){const a=this.latestFeatureIndex;if(!a||!a.rawTileData)return;const l=a.loadVTLayers(),h=r&&r.sourceLayer?r.sourceLayer:"",g=l._geojsonTileLayer||l[h];if(!g)return;const b=o.a7(r&&r.filter),{z:A,x:I,y:z}=this.tileID.canonical,F={z:A,x:I,y:z};for(let O=0;O<g.length;O++){const Z=g.feature(O);if(b.needGeometry){const ne=o.a8(Z,!0);if(!b.filter(new o.C(this.tileID.overscaledZ),ne,this.tileID.canonical))continue}else if(!b.filter(new o.C(this.tileID.overscaledZ),Z))continue;const J=a.getId(Z,h),oe=new o.a9(Z,A,I,z,J);oe.tile=F,e.push(oe)}}hasData(){return this.state==="loaded"||this.state==="reloading"||this.state==="expired"}patternsLoaded(){return this.imageAtlas&&!!Object.keys(this.imageAtlas.patternPositions).length}setExpiryData(e){const r=this.expirationTime;if(e.cacheControl){const a=o.aa(e.cacheControl);a["max-age"]&&(this.expirationTime=Date.now()+1e3*a["max-age"])}else e.expires&&(this.expirationTime=new Date(e.expires).getTime());if(this.expirationTime){const a=Date.now();let l=!1;if(this.expirationTime>a)l=!1;else if(r)if(this.expirationTime<r)l=!0;else{const h=this.expirationTime-r;h?this.expirationTime=a+Math.max(h,3e4):l=!0}else l=!0;l?(this.expiredRequestCount++,this.state="expired"):this.expiredRequestCount=0}}getExpiryTimeout(){if(this.expirationTime)return this.expiredRequestCount?1e3*(1<<Math.min(this.expiredRequestCount-1,31)):Math.min(this.expirationTime-new Date().getTime(),Math.pow(2,31)-1)}setFeatureState(e,r){if(!this.latestFeatureIndex||!this.latestFeatureIndex.rawTileData||Object.keys(e).length===0)return;const a=this.latestFeatureIndex.loadVTLayers();for(const l in this.buckets){if(!r.style.hasLayer(l))continue;const h=this.buckets[l],g=h.layers[0].sourceLayer||"_geojsonTileLayer",b=a[g],A=e[g];if(!b||!A||Object.keys(A).length===0)continue;h.update(A,b,this.imageAtlas&&this.imageAtlas.patternPositions||{});const I=r&&r.style&&r.style.getLayer(l);I&&(this.queryPadding=Math.max(this.queryPadding,I.queryRadius(h)))}}holdingForFade(){return this.symbolFadeHoldUntil!==void 0}symbolFadeFinished(){return!this.symbolFadeHoldUntil||this.symbolFadeHoldUntil<M.now()}clearFadeHold(){this.symbolFadeHoldUntil=void 0}setHoldDuration(e){this.symbolFadeHoldUntil=M.now()+e}setDependencies(e,r){const a={};for(const l of r)a[l]=!0;this.dependencies[e]=a}hasDependency(e,r){for(const a of e){const l=this.dependencies[a];if(l){for(const h of r)if(l[h])return!0}}return!1}}class dr{constructor(e,r){this.max=e,this.onRemove=r,this.reset()}reset(){for(const e in this.data)for(const r of this.data[e])r.timeout&&clearTimeout(r.timeout),this.onRemove(r.value);return this.data={},this.order=[],this}add(e,r,a){const l=e.wrapped().key;this.data[l]===void 0&&(this.data[l]=[]);const h={value:r,timeout:void 0};if(a!==void 0&&(h.timeout=setTimeout(()=>{this.remove(e,h)},a)),this.data[l].push(h),this.order.push(l),this.order.length>this.max){const g=this._getAndRemoveByKey(this.order[0]);g&&this.onRemove(g)}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){const r=this.data[e].shift();return r.timeout&&clearTimeout(r.timeout),this.data[e].length===0&&delete this.data[e],this.order.splice(this.order.indexOf(e),1),r.value}getByKey(e){const r=this.data[e];return r?r[0].value:null}get(e){return this.has(e)?this.data[e.wrapped().key][0].value:null}remove(e,r){if(!this.has(e))return this;const a=e.wrapped().key,l=r===void 0?0:this.data[a].indexOf(r),h=this.data[a][l];return this.data[a].splice(l,1),h.timeout&&clearTimeout(h.timeout),this.data[a].length===0&&delete this.data[a],this.onRemove(h.value),this.order.splice(this.order.indexOf(a),1),this}setMaxSize(e){for(this.max=e;this.order.length>this.max;){const r=this._getAndRemoveByKey(this.order[0]);r&&this.onRemove(r)}return this}filter(e){const r=[];for(const a in this.data)for(const l of this.data[a])e(l.value)||r.push(l);for(const a of r)this.remove(a.value.tileID,a)}}class Jt{constructor(){this.state={},this.stateChanges={},this.deletedStates={}}updateState(e,r,a){const l=String(r);if(this.stateChanges[e]=this.stateChanges[e]||{},this.stateChanges[e][l]=this.stateChanges[e][l]||{},o.e(this.stateChanges[e][l],a),this.deletedStates[e]===null){this.deletedStates[e]={};for(const h in this.state[e])h!==l&&(this.deletedStates[e][h]=null)}else if(this.deletedStates[e]&&this.deletedStates[e][l]===null){this.deletedStates[e][l]={};for(const h in this.state[e][l])a[h]||(this.deletedStates[e][l][h]=null)}else for(const h in a)this.deletedStates[e]&&this.deletedStates[e][l]&&this.deletedStates[e][l][h]===null&&delete this.deletedStates[e][l][h]}removeFeatureState(e,r,a){if(this.deletedStates[e]===null)return;const l=String(r);if(this.deletedStates[e]=this.deletedStates[e]||{},a&&r!==void 0)this.deletedStates[e][l]!==null&&(this.deletedStates[e][l]=this.deletedStates[e][l]||{},this.deletedStates[e][l][a]=null);else if(r!==void 0)if(this.stateChanges[e]&&this.stateChanges[e][l])for(a in this.deletedStates[e][l]={},this.stateChanges[e][l])this.deletedStates[e][l][a]=null;else this.deletedStates[e][l]=null;else this.deletedStates[e]=null}getState(e,r){const a=String(r),l=o.e({},(this.state[e]||{})[a],(this.stateChanges[e]||{})[a]);if(this.deletedStates[e]===null)return{};if(this.deletedStates[e]){const h=this.deletedStates[e][r];if(h===null)return{};for(const g in h)delete l[g]}return l}initializeTileState(e,r){e.setFeatureState(this.state,r)}coalesceChanges(e,r){const a={};for(const l in this.stateChanges){this.state[l]=this.state[l]||{};const h={};for(const g in this.stateChanges[l])this.state[l][g]||(this.state[l][g]={}),o.e(this.state[l][g],this.stateChanges[l][g]),h[g]=this.state[l][g];a[l]=h}for(const l in this.deletedStates){this.state[l]=this.state[l]||{};const h={};if(this.deletedStates[l]===null)for(const g in this.state[l])h[g]={},this.state[l][g]={};else for(const g in this.deletedStates[l]){if(this.deletedStates[l][g]===null)this.state[l][g]={};else for(const b of Object.keys(this.deletedStates[l][g]))delete this.state[l][g][b];h[g]=this.state[l][g]}a[l]=a[l]||{},o.e(a[l],h)}if(this.stateChanges={},this.deletedStates={},Object.keys(a).length!==0)for(const l in e)e[l].setFeatureState(a,r)}}const fr=89.25;function It(u,e){const r=o.ae(e.lat,-85.051129,o.af);return new o.P(o.U(e.lng)*u,o.S(r)*u)}function wt(u,e){return new o.$(e.x/u,e.y/u).toLngLat()}function Ae(u){return u.cameraToCenterDistance*Math.min(.85*Math.tan(o.ab(90-u.pitch)),Math.tan(o.ab(fr-u.pitch)))}function K(u,e){const r=u.canonical,a=e/o.ac(r.z),l=r.x+Math.pow(2,r.z)*u.wrap,h=o.ad(new Float64Array(16));return o.L(h,h,[l*a,r.y*a,0]),o.M(h,h,[a/o.Z,a/o.Z,1]),h}function Q(u,e,r,a,l){const h=o.$.fromLngLat(u,e),g=l*o.ag(1,u.lat),b=g*Math.cos(o.ab(r)),A=Math.sqrt(g*g-b*b),I=A*Math.sin(o.ab(-a)),z=A*Math.cos(o.ab(-a));return new o.$(h.x+I,h.y+z,h.z+b)}function ee(u,e,r){const a=e.intersectsFrustum(u);if(!r)return a;const l=e.intersectsPlane(r);return a===0||l===0?0:a===2&&l===2?2:1}function he(u,e,r){let a=0;const l=(r-e)/10;for(let h=0;h<10;h++)a+=l*Math.pow(Math.cos(e+(h+.5)/10*(r-e)),u);return a}function ve(u,e){return function(r,a,l,h,g){const b=2*((u-1)/o.ah(Math.cos(o.ab(fr-g))/Math.cos(o.ab(fr)))-1),A=Math.acos(l/h),I=2*he(b-1,0,o.ab(g/2)),z=Math.min(o.ab(fr),A+o.ab(g/2)),F=he(b-1,Math.min(z,A-o.ab(g/2)),z),O=Math.atan(a/l),Z=Math.hypot(a,l);let J=r;return J+=o.ah(h/Z/Math.max(.5,Math.cos(o.ab(g/2)))),J+=b*o.ah(Math.cos(O))/2,J-=o.ah(Math.max(1,F/I/e))/2,J}}const $=ve(9.314,3);function Me(u,e){const r=(e.roundZoom?Math.round:Math.floor)(u.zoom+o.ah(u.tileSize/e.tileSize));return Math.max(0,r)}function Te(u,e){const r=u.getCameraFrustum(),a=u.getClippingPlane(),l=u.screenPointToMercatorCoordinate(u.getCameraPoint()),h=o.$.fromLngLat(u.center,u.elevation);l.z=h.z+Math.cos(u.pitchInRadians)*u.cameraToCenterDistance/u.worldSize;const g=u.getCoveringTilesDetailsProvider(),b=g.allowVariableZoom(u,e),A=Me(u,e),I=e.minzoom||0,z=e.maxzoom!==void 0?e.maxzoom:u.maxZoom,F=Math.min(Math.max(0,A),z),O=Math.pow(2,F),Z=[O*l.x,O*l.y,0],J=[O*h.x,O*h.y,0],oe=Math.hypot(h.x-l.x,h.y-l.y),ne=Math.abs(h.z-l.z),se=Math.hypot(oe,ne),de=be=>({zoom:0,x:0,y:0,wrap:be,fullyVisible:!1}),_e=[],ye=[];if(u.renderWorldCopies&&g.allowWorldCopies())for(let be=1;be<=3;be++)_e.push(de(-be)),_e.push(de(be));for(_e.push(de(0));_e.length>0;){const be=_e.pop(),ke=be.x,we=be.y;let Le=be.fullyVisible;const We={x:ke,y:we,z:be.zoom},Fe=g.getTileAABB(We,be.wrap,u.elevation,e);if(!Le){const pt=ee(r,Fe,a);if(pt===0)continue;Le=pt===2}const Ne=g.distanceToTile2d(l.x,l.y,We,Fe);let je=A;b&&(je=(e.calculateTileZoom||$)(u.zoom+o.ah(u.tileSize/e.tileSize),Ne,ne,se,u.fov)),je=(e.roundZoom?Math.round:Math.floor)(je),je=Math.max(0,je);const mt=Math.min(je,z);if(be.wrap=g.getWrap(h,We,be.wrap),be.zoom>=mt){if(be.zoom<I)continue;const pt=F-be.zoom,tt=Z[0]-.5-(ke<<pt),kt=Z[1]-.5-(we<<pt),Gt=e.reparseOverscaled?Math.max(be.zoom,je):be.zoom;ye.push({tileID:new o.Y(be.zoom===z?Gt:be.zoom,be.wrap,be.zoom,ke,we),distanceSq:o.ai([J[0]-.5-ke,J[1]-.5-we]),tileDistanceToCamera:Math.sqrt(tt*tt+kt*kt)})}else for(let pt=0;pt<4;pt++)_e.push({zoom:be.zoom+1,x:(ke<<1)+pt%2,y:(we<<1)+(pt>>1),wrap:be.wrap,fullyVisible:Le})}return ye.sort((be,ke)=>be.distanceSq-ke.distanceSq).map(be=>be.tileID)}class Ie extends o.E{constructor(e,r,a){super(),this.id=e,this.dispatcher=a,this.on("data",l=>this._dataHandler(l)),this.on("dataloading",()=>{this._sourceErrored=!1}),this.on("error",()=>{this._sourceErrored=this._source.loaded()}),this._source=((l,h,g,b)=>{const A=new(gi(h.type))(l,h,g,b);if(A.id!==l)throw new Error(`Expected Source id to be ${l} instead of ${A.id}`);return A})(e,r,a,this),this._tiles={},this._cache=new dr(0,l=>this._unloadTile(l)),this._timers={},this._cacheTimers={},this._maxTileCacheSize=null,this._maxTileCacheZoomLevels=null,this._loadedParentTiles={},this._coveredTiles={},this._state=new Jt,this._didEmitContent=!1,this._updated=!1}onAdd(e){this.map=e,this._maxTileCacheSize=e?e._maxTileCacheSize:null,this._maxTileCacheZoomLevels=e?e._maxTileCacheZoomLevels:null,this._source&&this._source.onAdd&&this._source.onAdd(e)}onRemove(e){this.clearTiles(),this._source&&this._source.onRemove&&this._source.onRemove(e)}loaded(){if(this._sourceErrored)return!0;if(!this._sourceLoaded||!this._source.loaded())return!1;if(!(this.used===void 0&&this.usedForTerrain===void 0||this.used||this.usedForTerrain))return!0;if(!this._updated)return!1;for(const e in this._tiles){const r=this._tiles[e];if(r.state!=="loaded"&&r.state!=="errored")return!1}return!0}getSource(){return this._source}pause(){this._paused=!0}resume(){if(!this._paused)return;const e=this._shouldReloadOnResume;this._paused=!1,this._shouldReloadOnResume=!1,e&&this.reload(),this.transform&&this.update(this.transform,this.terrain)}_loadTile(e,r,a){return o._(this,void 0,void 0,function*(){try{yield this._source.loadTile(e),this._tileLoaded(e,r,a)}catch(l){e.state="errored",l.status!==404?this._source.fire(new o.k(l,{tile:e})):this.update(this.transform,this.terrain)}})}_unloadTile(e){this._source.unloadTile&&this._source.unloadTile(e)}_abortTile(e){this._source.abortTile&&this._source.abortTile(e),this._source.fire(new o.l("dataabort",{tile:e,coord:e.tileID,dataType:"source"}))}serialize(){return this._source.serialize()}prepare(e){this._source.prepare&&this._source.prepare(),this._state.coalesceChanges(this._tiles,this.map?this.map.painter:null);for(const r in this._tiles){const a=this._tiles[r];a.upload(e),a.prepare(this.map.style.imageManager)}}getIds(){return Object.values(this._tiles).map(e=>e.tileID).sort(Ve).map(e=>e.key)}getRenderableIds(e){const r=[];for(const a in this._tiles)this._isIdRenderable(a,e)&&r.push(this._tiles[a]);return e?r.sort((a,l)=>{const h=a.tileID,g=l.tileID,b=new o.P(h.canonical.x,h.canonical.y)._rotate(-this.transform.bearingInRadians),A=new o.P(g.canonical.x,g.canonical.y)._rotate(-this.transform.bearingInRadians);return h.overscaledZ-g.overscaledZ||A.y-b.y||A.x-b.x}).map(a=>a.tileID.key):r.map(a=>a.tileID).sort(Ve).map(a=>a.key)}hasRenderableParent(e){const r=this.findLoadedParent(e,0);return!!r&&this._isIdRenderable(r.tileID.key)}_isIdRenderable(e,r){return this._tiles[e]&&this._tiles[e].hasData()&&!this._coveredTiles[e]&&(r||!this._tiles[e].holdingForFade())}reload(e){if(this._paused)this._shouldReloadOnResume=!0;else{this._cache.reset();for(const r in this._tiles)(e||this._tiles[r].state!=="errored")&&this._reloadTile(r,"reloading")}}_reloadTile(e,r){return o._(this,void 0,void 0,function*(){const a=this._tiles[e];a&&(a.state!=="loading"&&(a.state=r),yield this._loadTile(a,e,r))})}_tileLoaded(e,r,a){e.timeAdded=M.now(),a==="expired"&&(e.refreshedUponExpiration=!0),this._setTileReloadTimer(r,e),this.getSource().type==="raster-dem"&&e.dem&&this._backfillDEM(e),this._state.initializeTileState(e,this.map?this.map.painter:null),e.aborted||this._source.fire(new o.l("data",{dataType:"source",tile:e,coord:e.tileID}))}_backfillDEM(e){const r=this.getRenderableIds();for(let l=0;l<r.length;l++){const h=r[l];if(e.neighboringTiles&&e.neighboringTiles[h]){const g=this.getTileByID(h);a(e,g),a(g,e)}}function a(l,h){l.needsHillshadePrepare=!0,l.needsTerrainPrepare=!0;let g=h.tileID.canonical.x-l.tileID.canonical.x;const b=h.tileID.canonical.y-l.tileID.canonical.y,A=Math.pow(2,l.tileID.canonical.z),I=h.tileID.key;g===0&&b===0||Math.abs(b)>1||(Math.abs(g)>1&&(Math.abs(g+A)===1?g+=A:Math.abs(g-A)===1&&(g-=A)),h.dem&&l.dem&&(l.dem.backfillBorder(h.dem,g,b),l.neighboringTiles&&l.neighboringTiles[I]&&(l.neighboringTiles[I].backfilled=!0)))}}getTile(e){return this.getTileByID(e.key)}getTileByID(e){return this._tiles[e]}_retainLoadedChildren(e,r,a,l){for(const h in this._tiles){let g=this._tiles[h];if(l[h]||!g.hasData()||g.tileID.overscaledZ<=r||g.tileID.overscaledZ>a)continue;let b=g.tileID;for(;g&&g.tileID.overscaledZ>r+1;){const I=g.tileID.scaledTo(g.tileID.overscaledZ-1);g=this._tiles[I.key],g&&g.hasData()&&(b=I)}let A=b;for(;A.overscaledZ>r;)if(A=A.scaledTo(A.overscaledZ-1),e[A.key]||e[A.canonical.key]){l[b.key]=b;break}}}findLoadedParent(e,r){if(e.key in this._loadedParentTiles){const a=this._loadedParentTiles[e.key];return a&&a.tileID.overscaledZ>=r?a:null}for(let a=e.overscaledZ-1;a>=r;a--){const l=e.scaledTo(a),h=this._getLoadedTile(l);if(h)return h}}findLoadedSibling(e){return this._getLoadedTile(e)}_getLoadedTile(e){const r=this._tiles[e.key];return r&&r.hasData()?r:this._cache.getByKey(e.wrapped().key)}updateCacheSize(e){const r=Math.ceil(e.width/this._source.tileSize)+1,a=Math.ceil(e.height/this._source.tileSize)+1,l=Math.floor(r*a*(this._maxTileCacheZoomLevels===null?o.a.MAX_TILE_CACHE_ZOOM_LEVELS:this._maxTileCacheZoomLevels)),h=typeof this._maxTileCacheSize=="number"?Math.min(this._maxTileCacheSize,l):l;this._cache.setMaxSize(h)}handleWrapJump(e){const r=Math.round((e-(this._prevLng===void 0?e:this._prevLng))/360);if(this._prevLng=e,r){const a={};for(const l in this._tiles){const h=this._tiles[l];h.tileID=h.tileID.unwrapTo(h.tileID.wrap+r),a[h.tileID.key]=h}this._tiles=a;for(const l in this._timers)clearTimeout(this._timers[l]),delete this._timers[l];for(const l in this._tiles)this._setTileReloadTimer(l,this._tiles[l])}}_updateCoveredAndRetainedTiles(e,r,a,l,h,g){const b={},A={},I=Object.keys(e),z=M.now();for(const F of I){const O=e[F],Z=this._tiles[F];if(!Z||Z.fadeEndTime!==0&&Z.fadeEndTime<=z)continue;const J=this.findLoadedParent(O,r),oe=this.findLoadedSibling(O),ne=J||oe||null;ne&&(this._addTile(ne.tileID),b[ne.tileID.key]=ne.tileID),A[F]=O}this._retainLoadedChildren(A,l,a,e);for(const F in b)e[F]||(this._coveredTiles[F]=!0,e[F]=b[F]);if(g){const F={},O={};for(const Z of h)this._tiles[Z.key].hasData()?F[Z.key]=Z:O[Z.key]=Z;for(const Z in O){const J=O[Z].children(this._source.maxzoom);this._tiles[J[0].key]&&this._tiles[J[1].key]&&this._tiles[J[2].key]&&this._tiles[J[3].key]&&(F[J[0].key]=e[J[0].key]=J[0],F[J[1].key]=e[J[1].key]=J[1],F[J[2].key]=e[J[2].key]=J[2],F[J[3].key]=e[J[3].key]=J[3],delete O[Z])}for(const Z in O){const J=O[Z],oe=this.findLoadedParent(J,this._source.minzoom),ne=this.findLoadedSibling(J),se=oe||ne||null;if(se){F[se.tileID.key]=e[se.tileID.key]=se.tileID;for(const de in F)F[de].isChildOf(se.tileID)&&delete F[de]}}for(const Z in this._tiles)F[Z]||(this._coveredTiles[Z]=!0)}}update(e,r){if(!this._sourceLoaded||this._paused)return;let a;this.transform=e,this.terrain=r,this.updateCacheSize(e),this.handleWrapJump(this.transform.center.lng),this._coveredTiles={},this.used||this.usedForTerrain?this._source.tileID?a=e.getVisibleUnwrappedCoordinates(this._source.tileID).map(z=>new o.Y(z.canonical.z,z.wrap,z.canonical.z,z.canonical.x,z.canonical.y)):(a=Te(e,{tileSize:this.usedForTerrain?this.tileSize:this._source.tileSize,minzoom:this._source.minzoom,maxzoom:this._source.maxzoom,roundZoom:!this.usedForTerrain&&this._source.roundZoom,reparseOverscaled:this._source.reparseOverscaled,terrain:r,calculateTileZoom:this._source.calculateTileZoom}),this._source.hasTile&&(a=a.filter(z=>this._source.hasTile(z)))):a=[];const l=Me(e,this._source),h=Math.max(l-Ie.maxOverzooming,this._source.minzoom),g=Math.max(l+Ie.maxUnderzooming,this._source.minzoom);if(this.usedForTerrain){const z={};for(const F of a)if(F.canonical.z>this._source.minzoom){const O=F.scaledTo(F.canonical.z-1);z[O.key]=O;const Z=F.scaledTo(Math.max(this._source.minzoom,Math.min(F.canonical.z,5)));z[Z.key]=Z}a=a.concat(Object.values(z))}const b=a.length===0&&!this._updated&&this._didEmitContent;this._updated=!0,b&&this.fire(new o.l("data",{sourceDataType:"idle",dataType:"source",sourceId:this.id}));const A=this._updateRetainedTiles(a,l);Pe(this._source.type)&&this._updateCoveredAndRetainedTiles(A,h,g,l,a,r);for(const z in A)this._tiles[z].clearFadeHold();const I=o.aj(this._tiles,A);for(const z of I){const F=this._tiles[z];F.hasSymbolBuckets&&!F.holdingForFade()?F.setHoldDuration(this.map._fadeDuration):F.hasSymbolBuckets&&!F.symbolFadeFinished()||this._removeTile(z)}this._updateLoadedParentTileCache(),this._updateLoadedSiblingTileCache()}releaseSymbolFadeTiles(){for(const e in this._tiles)this._tiles[e].holdingForFade()&&this._removeTile(e)}_updateRetainedTiles(e,r){var a;const l={},h={},g=Math.max(r-Ie.maxOverzooming,this._source.minzoom),b=Math.max(r+Ie.maxUnderzooming,this._source.minzoom),A={};for(const I of e){const z=this._addTile(I);l[I.key]=I,z.hasData()||r<this._source.maxzoom&&(A[I.key]=I)}this._retainLoadedChildren(A,r,b,l);for(const I of e){let z=this._tiles[I.key];if(z.hasData())continue;if(r+1>this._source.maxzoom){const O=I.children(this._source.maxzoom)[0],Z=this.getTile(O);if(Z&&Z.hasData()){l[O.key]=O;continue}}else{const O=I.children(this._source.maxzoom);if(l[O[0].key]&&l[O[1].key]&&l[O[2].key]&&l[O[3].key])continue}let F=z.wasRequested();for(let O=I.overscaledZ-1;O>=g;--O){const Z=I.scaledTo(O);if(h[Z.key])break;if(h[Z.key]=!0,z=this.getTile(Z),!z&&F&&(z=this._addTile(Z)),z){const J=z.hasData();if((J||!(!((a=this.map)===null||a===void 0)&&a.cancelPendingTileRequestsWhileZooming)||F)&&(l[Z.key]=Z),F=z.wasRequested(),J)break}}}return l}_updateLoadedParentTileCache(){this._loadedParentTiles={};for(const e in this._tiles){const r=[];let a,l=this._tiles[e].tileID;for(;l.overscaledZ>0;){if(l.key in this._loadedParentTiles){a=this._loadedParentTiles[l.key];break}r.push(l.key);const h=l.scaledTo(l.overscaledZ-1);if(a=this._getLoadedTile(h),a)break;l=h}for(const h of r)this._loadedParentTiles[h]=a}}_updateLoadedSiblingTileCache(){this._loadedSiblingTiles={};for(const e in this._tiles){const r=this._tiles[e].tileID,a=this._getLoadedTile(r);this._loadedSiblingTiles[r.key]=a}}_addTile(e){let r=this._tiles[e.key];if(r)return r;r=this._cache.getAndRemove(e),r&&(this._setTileReloadTimer(e.key,r),r.tileID=e,this._state.initializeTileState(r,this.map?this.map.painter:null),this._cacheTimers[e.key]&&(clearTimeout(this._cacheTimers[e.key]),delete this._cacheTimers[e.key],this._setTileReloadTimer(e.key,r)));const a=r;return r||(r=new wr(e,this._source.tileSize*e.overscaleFactor()),this._loadTile(r,e.key,r.state)),r.uses++,this._tiles[e.key]=r,a||this._source.fire(new o.l("dataloading",{tile:r,coord:r.tileID,dataType:"source"})),r}_setTileReloadTimer(e,r){e in this._timers&&(clearTimeout(this._timers[e]),delete this._timers[e]);const a=r.getExpiryTimeout();a&&(this._timers[e]=setTimeout(()=>{this._reloadTile(e,"expired"),delete this._timers[e]},a))}refreshTiles(e){for(const r in this._tiles)this._isIdRenderable(r)&&e.some(a=>a.equals(this._tiles[r].tileID.canonical))&&this._reloadTile(r,"expired")}_removeTile(e){const r=this._tiles[e];r&&(r.uses--,delete this._tiles[e],this._timers[e]&&(clearTimeout(this._timers[e]),delete this._timers[e]),r.uses>0||(r.hasData()&&r.state!=="reloading"?this._cache.add(r.tileID,r,r.getExpiryTimeout()):(r.aborted=!0,this._abortTile(r),this._unloadTile(r))))}_dataHandler(e){const r=e.sourceDataType;e.dataType==="source"&&r==="metadata"&&(this._sourceLoaded=!0),this._sourceLoaded&&!this._paused&&e.dataType==="source"&&r==="content"&&(this.reload(e.sourceDataChanged),this.transform&&this.update(this.transform,this.terrain),this._didEmitContent=!0)}clearTiles(){this._shouldReloadOnResume=!1,this._paused=!1;for(const e in this._tiles)this._removeTile(e);this._cache.reset()}tilesIn(e,r,a){const l=[],h=this.transform;if(!h)return l;const g=a?h.getCameraQueryGeometry(e):e,b=e.map(J=>h.screenPointToMercatorCoordinate(J,this.terrain)),A=g.map(J=>h.screenPointToMercatorCoordinate(J,this.terrain)),I=this.getIds();let z=1/0,F=1/0,O=-1/0,Z=-1/0;for(const J of A)z=Math.min(z,J.x),F=Math.min(F,J.y),O=Math.max(O,J.x),Z=Math.max(Z,J.y);for(let J=0;J<I.length;J++){const oe=this._tiles[I[J]];if(oe.holdingForFade())continue;const ne=h.getCoveringTilesDetailsProvider().allowWorldCopies()?oe.tileID:oe.tileID.unwrapTo(0),se=Math.pow(2,h.zoom-oe.tileID.overscaledZ),de=r*oe.queryPadding*o.Z/oe.tileSize/se,_e=[ne.getTilePoint(new o.$(z,F)),ne.getTilePoint(new o.$(O,Z))];if(_e[0].x-de<o.Z&&_e[0].y-de<o.Z&&_e[1].x+de>=0&&_e[1].y+de>=0){const ye=b.map(ke=>ne.getTilePoint(ke)),be=A.map(ke=>ne.getTilePoint(ke));l.push({tile:oe,tileID:ne,queryGeometry:ye,cameraQueryGeometry:be,scale:se})}}return l}getVisibleCoordinates(e){const r=this.getRenderableIds(e).map(a=>this._tiles[a].tileID);return this.transform&&this.transform.populateCache(r),r}hasTransition(){if(this._source.hasTransition())return!0;if(Pe(this._source.type)){const e=M.now();for(const r in this._tiles)if(this._tiles[r].fadeEndTime>=e)return!0}return!1}setFeatureState(e,r,a){this._state.updateState(e=e||"_geojsonTileLayer",r,a)}removeFeatureState(e,r,a){this._state.removeFeatureState(e=e||"_geojsonTileLayer",r,a)}getFeatureState(e,r){return this._state.getState(e=e||"_geojsonTileLayer",r)}setDependencies(e,r,a){const l=this._tiles[e];l&&l.setDependencies(r,a)}reloadTilesForDependencies(e,r){for(const a in this._tiles)this._tiles[a].hasDependency(e,r)&&this._reloadTile(a,"reloading");this._cache.filter(a=>!a.hasDependency(e,r))}}function Ve(u,e){const r=Math.abs(2*u.wrap)-+(u.wrap<0),a=Math.abs(2*e.wrap)-+(e.wrap<0);return u.overscaledZ-e.overscaledZ||a-r||e.canonical.y-u.canonical.y||e.canonical.x-u.canonical.x}function Pe(u){return u==="raster"||u==="image"||u==="video"}Ie.maxOverzooming=10,Ie.maxUnderzooming=3;class Qe{constructor(e,r){this.reset(e,r)}reset(e,r){this.points=e||[],this._distances=[0];for(let a=1;a<this.points.length;a++)this._distances[a]=this._distances[a-1]+this.points[a].dist(this.points[a-1]);this.length=this._distances[this._distances.length-1],this.padding=Math.min(r||0,.5*this.length),this.paddedLength=this.length-2*this.padding}lerp(e){if(this.points.length===1)return this.points[0];e=o.ae(e,0,1);let r=1,a=this._distances[r];const l=e*this.paddedLength+this.padding;for(;a<l&&r<this._distances.length;)a=this._distances[++r];const h=r-1,g=this._distances[h],b=a-g,A=b>0?(l-g)/b:0;return this.points[h].mult(1-A).add(this.points[r].mult(A))}}function ut(u,e){let r=!0;return u==="always"||u!=="never"&&e!=="never"||(r=!1),r}class yt{constructor(e,r,a){const l=this.boxCells=[],h=this.circleCells=[];this.xCellCount=Math.ceil(e/a),this.yCellCount=Math.ceil(r/a);for(let g=0;g<this.xCellCount*this.yCellCount;g++)l.push([]),h.push([]);this.circleKeys=[],this.boxKeys=[],this.bboxes=[],this.circles=[],this.width=e,this.height=r,this.xScale=this.xCellCount/e,this.yScale=this.yCellCount/r,this.boxUid=0,this.circleUid=0}keysLength(){return this.boxKeys.length+this.circleKeys.length}insert(e,r,a,l,h){this._forEachCell(r,a,l,h,this._insertBoxCell,this.boxUid++),this.boxKeys.push(e),this.bboxes.push(r),this.bboxes.push(a),this.bboxes.push(l),this.bboxes.push(h)}insertCircle(e,r,a,l){this._forEachCell(r-l,a-l,r+l,a+l,this._insertCircleCell,this.circleUid++),this.circleKeys.push(e),this.circles.push(r),this.circles.push(a),this.circles.push(l)}_insertBoxCell(e,r,a,l,h,g){this.boxCells[h].push(g)}_insertCircleCell(e,r,a,l,h,g){this.circleCells[h].push(g)}_query(e,r,a,l,h,g,b){if(a<0||e>this.width||l<0||r>this.height)return[];const A=[];if(e<=0&&r<=0&&this.width<=a&&this.height<=l){if(h)return[{key:null,x1:e,y1:r,x2:a,y2:l}];for(let I=0;I<this.boxKeys.length;I++)A.push({key:this.boxKeys[I],x1:this.bboxes[4*I],y1:this.bboxes[4*I+1],x2:this.bboxes[4*I+2],y2:this.bboxes[4*I+3]});for(let I=0;I<this.circleKeys.length;I++){const z=this.circles[3*I],F=this.circles[3*I+1],O=this.circles[3*I+2];A.push({key:this.circleKeys[I],x1:z-O,y1:F-O,x2:z+O,y2:F+O})}}else this._forEachCell(e,r,a,l,this._queryCell,A,{hitTest:h,overlapMode:g,seenUids:{box:{},circle:{}}},b);return A}query(e,r,a,l){return this._query(e,r,a,l,!1,null)}hitTest(e,r,a,l,h,g){return this._query(e,r,a,l,!0,h,g).length>0}hitTestCircle(e,r,a,l,h){const g=e-a,b=e+a,A=r-a,I=r+a;if(b<0||g>this.width||I<0||A>this.height)return!1;const z=[];return this._forEachCell(g,A,b,I,this._queryCellCircle,z,{hitTest:!0,overlapMode:l,circle:{x:e,y:r,radius:a},seenUids:{box:{},circle:{}}},h),z.length>0}_queryCell(e,r,a,l,h,g,b,A){const{seenUids:I,hitTest:z,overlapMode:F}=b,O=this.boxCells[h];if(O!==null){const J=this.bboxes;for(const oe of O)if(!I.box[oe]){I.box[oe]=!0;const ne=4*oe,se=this.boxKeys[oe];if(e<=J[ne+2]&&r<=J[ne+3]&&a>=J[ne+0]&&l>=J[ne+1]&&(!A||A(se))&&(!z||!ut(F,se.overlapMode))&&(g.push({key:se,x1:J[ne],y1:J[ne+1],x2:J[ne+2],y2:J[ne+3]}),z))return!0}}const Z=this.circleCells[h];if(Z!==null){const J=this.circles;for(const oe of Z)if(!I.circle[oe]){I.circle[oe]=!0;const ne=3*oe,se=this.circleKeys[oe];if(this._circleAndRectCollide(J[ne],J[ne+1],J[ne+2],e,r,a,l)&&(!A||A(se))&&(!z||!ut(F,se.overlapMode))){const de=J[ne],_e=J[ne+1],ye=J[ne+2];if(g.push({key:se,x1:de-ye,y1:_e-ye,x2:de+ye,y2:_e+ye}),z)return!0}}}return!1}_queryCellCircle(e,r,a,l,h,g,b,A){const{circle:I,seenUids:z,overlapMode:F}=b,O=this.boxCells[h];if(O!==null){const J=this.bboxes;for(const oe of O)if(!z.box[oe]){z.box[oe]=!0;const ne=4*oe,se=this.boxKeys[oe];if(this._circleAndRectCollide(I.x,I.y,I.radius,J[ne+0],J[ne+1],J[ne+2],J[ne+3])&&(!A||A(se))&&!ut(F,se.overlapMode))return g.push(!0),!0}}const Z=this.circleCells[h];if(Z!==null){const J=this.circles;for(const oe of Z)if(!z.circle[oe]){z.circle[oe]=!0;const ne=3*oe,se=this.circleKeys[oe];if(this._circlesCollide(J[ne],J[ne+1],J[ne+2],I.x,I.y,I.radius)&&(!A||A(se))&&!ut(F,se.overlapMode))return g.push(!0),!0}}}_forEachCell(e,r,a,l,h,g,b,A){const I=this._convertToXCellCoord(e),z=this._convertToYCellCoord(r),F=this._convertToXCellCoord(a),O=this._convertToYCellCoord(l);for(let Z=I;Z<=F;Z++)for(let J=z;J<=O;J++)if(h.call(this,e,r,a,l,this.xCellCount*J+Z,g,b,A))return}_convertToXCellCoord(e){return Math.max(0,Math.min(this.xCellCount-1,Math.floor(e*this.xScale)))}_convertToYCellCoord(e){return Math.max(0,Math.min(this.yCellCount-1,Math.floor(e*this.yScale)))}_circlesCollide(e,r,a,l,h,g){const b=l-e,A=h-r,I=a+g;return I*I>b*b+A*A}_circleAndRectCollide(e,r,a,l,h,g,b){const A=(g-l)/2,I=Math.abs(e-(l+A));if(I>A+a)return!1;const z=(b-h)/2,F=Math.abs(r-(h+z));if(F>z+a)return!1;if(I<=A||F<=z)return!0;const O=I-A,Z=F-z;return O*O+Z*Z<=a*a}}function Et(u,e,r){const a=o.K();if(!u){const{vecSouth:F,vecEast:O}=Rt(e),Z=D();Z[0]=O[0],Z[1]=O[1],Z[2]=F[0],Z[3]=F[1],l=Z,(z=(g=(h=Z)[0])*(I=h[3])-(A=h[2])*(b=h[1]))&&(l[0]=I*(z=1/z),l[1]=-b*z,l[2]=-A*z,l[3]=g*z),a[0]=Z[0],a[1]=Z[1],a[4]=Z[2],a[5]=Z[3]}var l,h,g,b,A,I,z;return o.M(a,a,[1/r,1/r,1]),a}function jt(u,e,r,a){if(u){const l=o.K();if(!e){const{vecSouth:h,vecEast:g}=Rt(r);l[0]=g[0],l[1]=g[1],l[4]=h[0],l[5]=h[1]}return o.M(l,l,[a,a,1]),l}return r.pixelsToClipSpaceMatrix}function Rt(u){const e=Math.cos(u.rollInRadians),r=Math.sin(u.rollInRadians),a=Math.cos(u.pitchInRadians),l=Math.cos(u.bearingInRadians),h=Math.sin(u.bearingInRadians),g=o.ao();g[0]=-l*a*r-h*e,g[1]=-h*a*r+l*e;const b=o.ap(g);b<1e-9?o.aq(g):o.ar(g,g,1/b);const A=o.ao();A[0]=l*a*e-h*r,A[1]=h*a*e+l*r;const I=o.ap(A);return I<1e-9?o.aq(A):o.ar(A,A,1/I),{vecEast:A,vecSouth:g}}function Ue(u,e,r,a){let l;a?(l=[u,e,a(u,e),1],o.at(l,l,r)):(l=[u,e,0,1],xn(l,l,r));const h=l[3];return{point:new o.P(l[0]/h,l[1]/h),signedDistanceFromCamera:h,isOccluded:!1}}function ar(u,e){return .5+u/e*.5}function Qt(u,e){return u.x>=-e[0]&&u.x<=e[0]&&u.y>=-e[1]&&u.y<=e[1]}function or(u,e,r,a,l,h,g,b,A,I,z,F,O){const Z=r?u.textSizeData:u.iconSizeData,J=o.ak(Z,e.transform.zoom),oe=[256/e.width*2+1,256/e.height*2+1],ne=r?u.text.dynamicLayoutVertexArray:u.icon.dynamicLayoutVertexArray;ne.clear();const se=u.lineVertexArray,de=r?u.text.placedSymbolArray:u.icon.placedSymbolArray,_e=e.transform.width/e.transform.height;let ye=!1;for(let be=0;be<de.length;be++){const ke=de.get(be);if(ke.hidden||ke.writingMode===o.al.vertical&&!ye){Ri(ke.numGlyphs,ne);continue}ye=!1;const we=new o.P(ke.anchorX,ke.anchorY),Le={getElevation:O,pitchedLabelPlaneMatrix:a,lineVertexArray:se,pitchWithMap:h,projectionCache:{projections:{},offsets:{},cachedAnchorPoint:void 0,anyProjectionOccluded:!1},transform:e.transform,tileAnchorPoint:we,unwrappedTileID:A,width:I,height:z,translation:F},We=Kt(ke.anchorX,ke.anchorY,Le);if(!Qt(We.point,oe)){Ri(ke.numGlyphs,ne);continue}const Fe=ar(e.transform.cameraToCenterDistance,We.signedDistanceFromCamera),Ne=o.am(Z,J,ke),je=h?Ne*e.transform.getPitchedTextCorrection(ke.anchorX,ke.anchorY,A)/Fe:Ne*Fe,mt=Mt({projectionContext:Le,pitchedLabelPlaneMatrixInverse:l,symbol:ke,fontSize:je,flip:!1,keepUpright:g,glyphOffsetArray:u.glyphOffsetArray,dynamicLayoutVertexArray:ne,aspectRatio:_e,rotateToLine:b});ye=mt.useVertical,(mt.notEnoughRoom||ye||mt.needsFlipping&&Mt({projectionContext:Le,pitchedLabelPlaneMatrixInverse:l,symbol:ke,fontSize:je,flip:!0,keepUpright:g,glyphOffsetArray:u.glyphOffsetArray,dynamicLayoutVertexArray:ne,aspectRatio:_e,rotateToLine:b}).notEnoughRoom)&&Ri(ke.numGlyphs,ne)}r?u.text.dynamicLayoutVertexBuffer.updateData(ne):u.icon.dynamicLayoutVertexBuffer.updateData(ne)}function Dt(u,e,r,a,l,h,g,b){const A=h.glyphStartIndex+h.numGlyphs,I=h.lineStartIndex,z=h.lineStartIndex+h.lineLength,F=e.getoffsetX(h.glyphStartIndex),O=e.getoffsetX(A-1),Z=_n(u*F,r,a,l,h.segment,I,z,b,g);if(!Z)return null;const J=_n(u*O,r,a,l,h.segment,I,z,b,g);return J?b.projectionCache.anyProjectionOccluded?null:{first:Z,last:J}:null}function Xe(u,e,r,a){return u===o.al.horizontal&&Math.abs(r.y-e.y)>Math.abs(r.x-e.x)*a?{useVertical:!0}:(u===o.al.vertical?e.y<r.y:e.x>r.x)?{needsFlipping:!0}:null}function Mt(u){const{projectionContext:e,pitchedLabelPlaneMatrixInverse:r,symbol:a,fontSize:l,flip:h,keepUpright:g,glyphOffsetArray:b,dynamicLayoutVertexArray:A,aspectRatio:I,rotateToLine:z}=u,F=l/24,O=a.lineOffsetX*F,Z=a.lineOffsetY*F;let J;if(a.numGlyphs>1){const oe=a.glyphStartIndex+a.numGlyphs,ne=a.lineStartIndex,se=a.lineStartIndex+a.lineLength,de=Dt(F,b,O,Z,h,a,z,e);if(!de)return{notEnoughRoom:!0};const _e=yi(de.first.point.x,de.first.point.y,e,r),ye=yi(de.last.point.x,de.last.point.y,e,r);if(g&&!h){const be=Xe(a.writingMode,_e,ye,I);if(be)return be}J=[de.first];for(let be=a.glyphStartIndex+1;be<oe-1;be++)J.push(_n(F*b.getoffsetX(be),O,Z,h,a.segment,ne,se,e,z));J.push(de.last)}else{if(g&&!h){const ne=gr(e.tileAnchorPoint.x,e.tileAnchorPoint.y,e).point,se=a.lineStartIndex+a.segment+1,de=new o.P(e.lineVertexArray.getx(se),e.lineVertexArray.gety(se)),_e=gr(de.x,de.y,e),ye=_e.signedDistanceFromCamera>0?_e.point:Wt(e.tileAnchorPoint,de,ne,1,e),be=yi(ne.x,ne.y,e,r),ke=yi(ye.x,ye.y,e,r),we=Xe(a.writingMode,be,ke,I);if(we)return we}const oe=_n(F*b.getoffsetX(a.glyphStartIndex),O,Z,h,a.segment,a.lineStartIndex,a.lineStartIndex+a.lineLength,e,z);if(!oe||e.projectionCache.anyProjectionOccluded)return{notEnoughRoom:!0};J=[oe]}for(const oe of J)o.as(A,oe.point,oe.angle);return{}}function Wt(u,e,r,a,l){const h=u.add(u.sub(e)._unit()),g=gr(h.x,h.y,l).point,b=r.sub(g);return r.add(b._mult(a/b.mag()))}function Tr(u,e,r){const a=e.projectionCache;if(a.projections[u])return a.projections[u];const l=new o.P(e.lineVertexArray.getx(u),e.lineVertexArray.gety(u)),h=gr(l.x,l.y,e);if(h.signedDistanceFromCamera>0)return a.projections[u]=h.point,a.anyProjectionOccluded=a.anyProjectionOccluded||h.isOccluded,h.point;const g=u-r.direction;return Wt(r.distanceFromAnchor===0?e.tileAnchorPoint:new o.P(e.lineVertexArray.getx(g),e.lineVertexArray.gety(g)),l,r.previousVertex,r.absOffsetX-r.distanceFromAnchor+1,e)}function gr(u,e,r){const a=u+r.translation[0],l=e+r.translation[1];let h;return r.pitchWithMap?(h=Ue(a,l,r.pitchedLabelPlaneMatrix,r.getElevation),h.isOccluded=!1):(h=r.transform.projectTileCoordinates(a,l,r.unwrappedTileID,r.getElevation),h.point.x=(.5*h.point.x+.5)*r.width,h.point.y=(.5*-h.point.y+.5)*r.height),h}function yi(u,e,r,a){if(r.pitchWithMap){const l=[u,e,0,1];return o.at(l,l,a),r.transform.projectTileCoordinates(l[0]/l[3],l[1]/l[3],r.unwrappedTileID,r.getElevation).point}return{x:u/r.width*2-1,y:e/r.height*2-1}}function Kt(u,e,r){return r.transform.projectTileCoordinates(u,e,r.unwrappedTileID,r.getElevation)}function Oi(u,e,r){return u._unit()._perp()._mult(e*r)}function mo(u,e,r,a,l,h,g,b,A){if(b.projectionCache.offsets[u])return b.projectionCache.offsets[u];const I=r.add(e);if(u+A.direction<a||u+A.direction>=l)return b.projectionCache.offsets[u]=I,I;const z=Tr(u+A.direction,b,A),F=Oi(z.sub(r),g,A.direction),O=r.add(F),Z=z.add(F);return b.projectionCache.offsets[u]=o.au(h,I,O,Z)||I,b.projectionCache.offsets[u]}function _n(u,e,r,a,l,h,g,b,A){const I=a?u-e:u+e;let z=I>0?1:-1,F=0;a&&(z*=-1,F=Math.PI),z<0&&(F+=Math.PI);let O,Z=z>0?h+l:h+l+1;b.projectionCache.cachedAnchorPoint?O=b.projectionCache.cachedAnchorPoint:(O=gr(b.tileAnchorPoint.x,b.tileAnchorPoint.y,b).point,b.projectionCache.cachedAnchorPoint=O);let J,oe,ne=O,se=O,de=0,_e=0;const ye=Math.abs(I),be=[];let ke;for(;de+_e<=ye;){if(Z+=z,Z<h||Z>=g)return null;de+=_e,se=ne,oe=J;const We={absOffsetX:ye,direction:z,distanceFromAnchor:de,previousVertex:se};if(ne=Tr(Z,b,We),r===0)be.push(se),ke=ne.sub(se);else{let Fe;const Ne=ne.sub(se);Fe=Ne.mag()===0?Oi(Tr(Z+z,b,We).sub(ne),r,z):Oi(Ne,r,z),oe||(oe=se.add(Fe)),J=mo(Z,Fe,ne,h,g,oe,r,b,We),be.push(oe),ke=J.sub(oe)}_e=ke.mag()}const we=ke._mult((ye-de)/_e)._add(oe||se),Le=F+Math.atan2(ne.y-se.y,ne.x-se.x);return be.push(we),{point:we,angle:A?Le:0,path:be}}const Mn=new Float32Array([-1/0,-1/0,0,-1/0,-1/0,0,-1/0,-1/0,0,-1/0,-1/0,0]);function Ri(u,e){for(let r=0;r<u;r++){const a=e.length;e.resize(a+4),e.float32.set(Mn,3*a)}}function xn(u,e,r){const a=e[0],l=e[1];return u[0]=r[0]*a+r[4]*l+r[12],u[1]=r[1]*a+r[5]*l+r[13],u[3]=r[3]*a+r[7]*l+r[15],u}const Mr=100;class _i{constructor(e,r=new yt(e.width+200,e.height+200,25),a=new yt(e.width+200,e.height+200,25)){this.transform=e,this.grid=r,this.ignoredGrid=a,this.pitchFactor=Math.cos(e.pitch*Math.PI/180)*e.cameraToCenterDistance,this.screenRightBoundary=e.width+Mr,this.screenBottomBoundary=e.height+Mr,this.gridRightBoundary=e.width+200,this.gridBottomBoundary=e.height+200,this.perspectiveRatioCutoff=.6}placeCollisionBox(e,r,a,l,h,g,b,A,I,z,F,O){const Z=this.projectAndGetPerspectiveRatio(e.anchorPointX+A[0],e.anchorPointY+A[1],h,z,O),J=a*Z.perspectiveRatio;let oe;if(g||b)oe=this._projectCollisionBox(e,J,l,h,g,b,A,Z,z,F,O);else{const ke=Z.x+(F?F.x*J:0),we=Z.y+(F?F.y*J:0);oe={allPointsOccluded:!1,box:[ke+e.x1*J,we+e.y1*J,ke+e.x2*J,we+e.y2*J]}}const[ne,se,de,_e]=oe.box,ye=g?oe.allPointsOccluded:Z.isOccluded;let be=ye;return be||(be=Z.perspectiveRatio<this.perspectiveRatioCutoff),be||(be=!this.isInsideGrid(ne,se,de,_e)),be||r!=="always"&&this.grid.hitTest(ne,se,de,_e,r,I)?{box:[ne,se,de,_e],placeable:!1,offscreen:!1,occluded:ye}:{box:[ne,se,de,_e],placeable:!0,offscreen:this.isOffscreen(ne,se,de,_e),occluded:ye}}placeCollisionCircles(e,r,a,l,h,g,b,A,I,z,F,O,Z,J){const oe=[],ne=new o.P(r.anchorX,r.anchorY),se=this.getPerspectiveRatio(ne.x,ne.y,g,J),de=(I?h*this.transform.getPitchedTextCorrection(r.anchorX,r.anchorY,g)/se:h*se)/o.ay,_e={getElevation:J,pitchedLabelPlaneMatrix:b,lineVertexArray:a,pitchWithMap:I,projectionCache:{projections:{},offsets:{},cachedAnchorPoint:void 0,anyProjectionOccluded:!1},transform:this.transform,tileAnchorPoint:ne,unwrappedTileID:g,width:this.transform.width,height:this.transform.height,translation:Z},ye=Dt(de,l,r.lineOffsetX*de,r.lineOffsetY*de,!1,r,!1,_e);let be=!1,ke=!1,we=!0;if(ye){const Le=.5*F*se+O,We=new o.P(-100,-100),Fe=new o.P(this.screenRightBoundary,this.screenBottomBoundary),Ne=new Qe,je=ye.first,mt=ye.last;let pt=[];for(let Gt=je.path.length-1;Gt>=1;Gt--)pt.push(je.path[Gt]);for(let Gt=1;Gt<mt.path.length;Gt++)pt.push(mt.path[Gt]);const tt=2.5*Le;if(I){const Gt=this.projectPathToScreenSpace(pt,_e);pt=Gt.some(nr=>nr.signedDistanceFromCamera<=0)?[]:Gt.map(nr=>nr.point)}let kt=[];if(pt.length>0){const Gt=pt[0].clone(),nr=pt[0].clone();for(let Br=1;Br<pt.length;Br++)Gt.x=Math.min(Gt.x,pt[Br].x),Gt.y=Math.min(Gt.y,pt[Br].y),nr.x=Math.max(nr.x,pt[Br].x),nr.y=Math.max(nr.y,pt[Br].y);kt=Gt.x>=We.x&&nr.x<=Fe.x&&Gt.y>=We.y&&nr.y<=Fe.y?[pt]:nr.x<We.x||Gt.x>Fe.x||nr.y<We.y||Gt.y>Fe.y?[]:o.av([pt],We.x,We.y,Fe.x,Fe.y)}for(const Gt of kt){Ne.reset(Gt,.25*Le);let nr=0;nr=Ne.length<=.5*Le?1:Math.ceil(Ne.paddedLength/tt)+1;for(let Br=0;Br<nr;Br++){const xr=Br/Math.max(nr-1,1),Vr=Ne.lerp(xr),Or=Vr.x+Mr,Ar=Vr.y+Mr;oe.push(Or,Ar,Le,0);const cr=Or-Le,ei=Ar-Le,ci=Or+Le,xi=Ar+Le;if(we=we&&this.isOffscreen(cr,ei,ci,xi),ke=ke||this.isInsideGrid(cr,ei,ci,xi),e!=="always"&&this.grid.hitTestCircle(Or,Ar,Le,e,z)&&(be=!0,!A))return{circles:[],offscreen:!1,collisionDetected:be}}}}return{circles:!A&&be||!ke||se<this.perspectiveRatioCutoff?[]:oe,offscreen:we,collisionDetected:be}}projectPathToScreenSpace(e,r){const a=function(l,h){const g=o.K();return o.an(g,h.pitchedLabelPlaneMatrix),l.map(b=>{const A=Ue(b.x,b.y,g,h.getElevation),I=h.transform.projectTileCoordinates(A.point.x,A.point.y,h.unwrappedTileID,h.getElevation);return I.point.x=(.5*I.point.x+.5)*h.width,I.point.y=(.5*-I.point.y+.5)*h.height,I})}(e,r);return function(l){let h=0,g=0,b=0,A=0;for(let I=0;I<l.length;I++)l[I].isOccluded?(b=I+1,A=0):(A++,A>g&&(g=A,h=b));return l.slice(h,h+g)}(a)}queryRenderedSymbols(e){if(e.length===0||this.grid.keysLength()===0&&this.ignoredGrid.keysLength()===0)return{};const r=[];let a=1/0,l=1/0,h=-1/0,g=-1/0;for(const z of e){const F=new o.P(z.x+Mr,z.y+Mr);a=Math.min(a,F.x),l=Math.min(l,F.y),h=Math.max(h,F.x),g=Math.max(g,F.y),r.push(F)}const b=this.grid.query(a,l,h,g).concat(this.ignoredGrid.query(a,l,h,g)),A={},I={};for(const z of b){const F=z.key;if(A[F.bucketInstanceId]===void 0&&(A[F.bucketInstanceId]={}),A[F.bucketInstanceId][F.featureIndex])continue;const O=[new o.P(z.x1,z.y1),new o.P(z.x2,z.y1),new o.P(z.x2,z.y2),new o.P(z.x1,z.y2)];o.aw(r,O)&&(A[F.bucketInstanceId][F.featureIndex]=!0,I[F.bucketInstanceId]===void 0&&(I[F.bucketInstanceId]=[]),I[F.bucketInstanceId].push(F.featureIndex))}return I}insertCollisionBox(e,r,a,l,h,g){(a?this.ignoredGrid:this.grid).insert({bucketInstanceId:l,featureIndex:h,collisionGroupID:g,overlapMode:r},e[0],e[1],e[2],e[3])}insertCollisionCircles(e,r,a,l,h,g){const b=a?this.ignoredGrid:this.grid,A={bucketInstanceId:l,featureIndex:h,collisionGroupID:g,overlapMode:r};for(let I=0;I<e.length;I+=4)b.insertCircle(A,e[I],e[I+1],e[I+2])}projectAndGetPerspectiveRatio(e,r,a,l,h){if(h){let g;l?(g=[e,r,l(e,r),1],o.at(g,g,h)):(g=[e,r,0,1],xn(g,g,h));const b=g[3];return{x:(g[0]/b+1)/2*this.transform.width+Mr,y:(-g[1]/b+1)/2*this.transform.height+Mr,perspectiveRatio:.5+this.transform.cameraToCenterDistance/b*.5,isOccluded:!1,signedDistanceFromCamera:b}}{const g=this.transform.projectTileCoordinates(e,r,a,l);return{x:(g.point.x+1)/2*this.transform.width+Mr,y:(1-g.point.y)/2*this.transform.height+Mr,perspectiveRatio:.5+this.transform.cameraToCenterDistance/g.signedDistanceFromCamera*.5,isOccluded:g.isOccluded,signedDistanceFromCamera:g.signedDistanceFromCamera}}}getPerspectiveRatio(e,r,a,l){const h=this.transform.projectTileCoordinates(e,r,a,l);return .5+this.transform.cameraToCenterDistance/h.signedDistanceFromCamera*.5}isOffscreen(e,r,a,l){return a<Mr||e>=this.screenRightBoundary||l<Mr||r>this.screenBottomBoundary}isInsideGrid(e,r,a,l){return a>=0&&e<this.gridRightBoundary&&l>=0&&r<this.gridBottomBoundary}getViewportMatrix(){const e=o.ad([]);return o.L(e,e,[-100,-100,0]),e}_projectCollisionBox(e,r,a,l,h,g,b,A,I,z,F){let O=1,Z=0,J=0,oe=1;const ne=e.anchorPointX+b[0],se=e.anchorPointY+b[1];if(g&&!h){const pt=this.projectAndGetPerspectiveRatio(ne+1,se,l,I,F),tt=pt.x-A.x,kt=Math.atan((pt.y-A.y)/tt)+(tt<0?Math.PI:0),Gt=Math.sin(kt),nr=Math.cos(kt);O=nr,Z=Gt,J=-Gt,oe=nr}else if(!g&&h){const pt=Rt(this.transform);O=pt.vecEast[0],Z=pt.vecEast[1],J=pt.vecSouth[0],oe=pt.vecSouth[1]}let de=A.x,_e=A.y,ye=r;h&&(de=ne,_e=se,ye=Math.pow(2,-(this.transform.zoom-a.overscaledZ)),ye*=this.transform.getPitchedTextCorrection(ne,se,l),z||(ye*=o.ae(.5+A.signedDistanceFromCamera/this.transform.cameraToCenterDistance*.5,0,4))),z&&(de+=O*z.x*ye+J*z.y*ye,_e+=Z*z.x*ye+oe*z.y*ye);const be=e.x1*ye,ke=e.x2*ye,we=(be+ke)/2,Le=e.y1*ye,We=e.y2*ye,Fe=(Le+We)/2,Ne=[{offsetX:be,offsetY:Le},{offsetX:we,offsetY:Le},{offsetX:ke,offsetY:Le},{offsetX:ke,offsetY:Fe},{offsetX:ke,offsetY:We},{offsetX:we,offsetY:We},{offsetX:be,offsetY:We},{offsetX:be,offsetY:Fe}];let je=[];for(const{offsetX:pt,offsetY:tt}of Ne)je.push(new o.P(de+O*pt+J*tt,_e+Z*pt+oe*tt));let mt=!1;if(h){const pt=je.map(tt=>this.projectAndGetPerspectiveRatio(tt.x,tt.y,l,I,F));mt=pt.some(tt=>!tt.isOccluded),je=pt.map(tt=>new o.P(tt.x,tt.y))}else mt=!0;return{box:o.ax(je),allPointsOccluded:!mt}}}class _r{constructor(e,r,a,l){this.opacity=e?Math.max(0,Math.min(1,e.opacity+(e.placed?r:-r))):l&&a?1:0,this.placed=a}isHidden(){return this.opacity===0&&!this.placed}}class Jn{constructor(e,r,a,l,h){this.text=new _r(e?e.text:null,r,a,h),this.icon=new _r(e?e.icon:null,r,l,h)}isHidden(){return this.text.isHidden()&&this.icon.isHidden()}}class cn{constructor(e,r,a){this.text=e,this.icon=r,this.skipFade=a}}class go{constructor(e,r,a,l,h){this.bucketInstanceId=e,this.featureIndex=r,this.sourceLayerIndex=a,this.bucketIndex=l,this.tileID=h}}class Ln{constructor(e){this.crossSourceCollisions=e,this.maxGroupID=0,this.collisionGroups={}}get(e){if(this.crossSourceCollisions)return{ID:0,predicate:null};if(!this.collisionGroups[e]){const r=++this.maxGroupID;this.collisionGroups[e]={ID:r,predicate:a=>a.collisionGroupID===r}}return this.collisionGroups[e]}}function Di(u,e,r,a,l){const{horizontalAlign:h,verticalAlign:g}=o.aE(u);return new o.P(-(h-.5)*e+a[0]*l,-(g-.5)*r+a[1]*l)}class as{constructor(e,r,a,l,h){this.transform=e.clone(),this.terrain=r,this.collisionIndex=new _i(this.transform),this.placements={},this.opacities={},this.variableOffsets={},this.stale=!1,this.commitTime=0,this.fadeDuration=a,this.retainedQueryData={},this.collisionGroups=new Ln(l),this.collisionCircleArrays={},this.collisionBoxArrays=new Map,this.prevPlacement=h,h&&(h.prevPlacement=void 0),this.placedOrientations={}}_getTerrainElevationFunc(e){const r=this.terrain;return r?(a,l)=>r.getElevation(e,a,l):null}getBucketParts(e,r,a,l){const h=a.getBucket(r),g=a.latestFeatureIndex;if(!h||!g||r.id!==h.layerIds[0])return;const b=a.collisionBoxArray,A=h.layers[0].layout,I=h.layers[0].paint,z=Math.pow(2,this.transform.zoom-a.tileID.overscaledZ),F=a.tileSize/o.Z,O=a.tileID.toUnwrapped(),Z=A.get("text-rotation-alignment")==="map",J=o.az(a,1,this.transform.zoom),oe=o.aA(this.collisionIndex.transform,a,I.get("text-translate"),I.get("text-translate-anchor")),ne=o.aA(this.collisionIndex.transform,a,I.get("icon-translate"),I.get("icon-translate-anchor")),se=Et(Z,this.transform,J);this.retainedQueryData[h.bucketInstanceId]=new go(h.bucketInstanceId,g,h.sourceLayerIndex,h.index,a.tileID);const de={bucket:h,layout:A,translationText:oe,translationIcon:ne,unwrappedTileID:O,pitchedLabelPlaneMatrix:se,scale:z,textPixelRatio:F,holdingForFade:a.holdingForFade(),collisionBoxArray:b,partiallyEvaluatedTextSize:o.ak(h.textSizeData,this.transform.zoom),collisionGroup:this.collisionGroups.get(h.sourceID)};if(l)for(const _e of h.sortKeyRanges){const{sortKey:ye,symbolInstanceStart:be,symbolInstanceEnd:ke}=_e;e.push({sortKey:ye,symbolInstanceStart:be,symbolInstanceEnd:ke,parameters:de})}else e.push({symbolInstanceStart:0,symbolInstanceEnd:h.symbolInstances.length,parameters:de})}attemptAnchorPlacement(e,r,a,l,h,g,b,A,I,z,F,O,Z,J,oe,ne,se,de,_e,ye){const be=o.aB[e.textAnchor],ke=[e.textOffset0,e.textOffset1],we=Di(be,a,l,ke,h),Le=this.collisionIndex.placeCollisionBox(r,O,A,I,z,b,g,ne,F.predicate,_e,we,ye);if((!de||this.collisionIndex.placeCollisionBox(de,O,A,I,z,b,g,se,F.predicate,_e,we,ye).placeable)&&Le.placeable){let We;if(this.prevPlacement&&this.prevPlacement.variableOffsets[Z.crossTileID]&&this.prevPlacement.placements[Z.crossTileID]&&this.prevPlacement.placements[Z.crossTileID].text&&(We=this.prevPlacement.variableOffsets[Z.crossTileID].anchor),Z.crossTileID===0)throw new Error("symbolInstance.crossTileID can't be 0");return this.variableOffsets[Z.crossTileID]={textOffset:ke,width:a,height:l,anchor:be,textBoxScale:h,prevAnchor:We},this.markUsedJustification(J,be,Z,oe),J.allowVerticalPlacement&&(this.markUsedOrientation(J,oe,Z),this.placedOrientations[Z.crossTileID]=oe),{shift:we,placedGlyphBoxes:Le}}}placeLayerBucketPart(e,r,a){const{bucket:l,layout:h,translationText:g,translationIcon:b,unwrappedTileID:A,pitchedLabelPlaneMatrix:I,textPixelRatio:z,holdingForFade:F,collisionBoxArray:O,partiallyEvaluatedTextSize:Z,collisionGroup:J}=e.parameters,oe=h.get("text-optional"),ne=h.get("icon-optional"),se=o.aC(h,"text-overlap","text-allow-overlap"),de=se==="always",_e=o.aC(h,"icon-overlap","icon-allow-overlap"),ye=_e==="always",be=h.get("text-rotation-alignment")==="map",ke=h.get("text-pitch-alignment")==="map",we=h.get("icon-text-fit")!=="none",Le=h.get("symbol-z-order")==="viewport-y",We=de&&(ye||!l.hasIconData()||ne),Fe=ye&&(de||!l.hasTextData()||oe);!l.collisionArrays&&O&&l.deserializeCollisionBoxes(O);const Ne=this.retainedQueryData[l.bucketInstanceId].tileID,je=this._getTerrainElevationFunc(Ne),mt=this.transform.getFastPathSimpleProjectionMatrix(Ne),pt=(tt,kt,Gt)=>{var nr,Br;if(r[tt.crossTileID])return;if(F)return void(this.placements[tt.crossTileID]=new cn(!1,!1,!1));let xr=!1,Vr=!1,Or=!0,Ar=null,cr={box:null,placeable:!1,offscreen:null,occluded:!1},ei={placeable:!1},ci=null,xi=null,ur=null,ro=0,kn=0,io=0;kt.textFeatureIndex?ro=kt.textFeatureIndex:tt.useRuntimeCollisionCircles&&(ro=tt.featureIndex),kt.verticalTextFeatureIndex&&(kn=kt.verticalTextFeatureIndex);const Po=kt.textBox;if(Po){const qi=Jr=>{let Xr=o.al.horizontal;if(l.allowVerticalPlacement&&!Jr&&this.prevPlacement){const Pi=this.prevPlacement.placedOrientations[tt.crossTileID];Pi&&(this.placedOrientations[tt.crossTileID]=Pi,Xr=Pi,this.markUsedOrientation(l,Xr,tt))}return Xr},oo=(Jr,Xr)=>{if(l.allowVerticalPlacement&&tt.numVerticalGlyphVertices>0&&kt.verticalTextBox){for(const Pi of l.writingModes)if(Pi===o.al.vertical?(cr=Xr(),ei=cr):cr=Jr(),cr&&cr.placeable)break}else cr=Jr()},qn=tt.textAnchorOffsetStartIndex,so=tt.textAnchorOffsetEndIndex;if(so===qn){const Jr=(Xr,Pi)=>{const Er=this.collisionIndex.placeCollisionBox(Xr,se,z,Ne,A,ke,be,g,J.predicate,je,void 0,mt);return Er&&Er.placeable&&(this.markUsedOrientation(l,Pi,tt),this.placedOrientations[tt.crossTileID]=Pi),Er};oo(()=>Jr(Po,o.al.horizontal),()=>{const Xr=kt.verticalTextBox;return l.allowVerticalPlacement&&tt.numVerticalGlyphVertices>0&&Xr?Jr(Xr,o.al.vertical):{box:null,offscreen:null}}),qi(cr&&cr.placeable)}else{let Jr=o.aB[(Br=(nr=this.prevPlacement)===null||nr===void 0?void 0:nr.variableOffsets[tt.crossTileID])===null||Br===void 0?void 0:Br.anchor];const Xr=(Er,ja,rh)=>{const ih=Er.x2-Er.x1,Tp=Er.y2-Er.y1,ec=tt.textBoxScale,Fs=we&&_e==="never"?ja:null;let rn=null,Tn=se==="never"?1:2,nn="never";Jr&&Tn++;for(let Un=0;Un<Tn;Un++){for(let Ha=qn;Ha<so;Ha++){const ao=l.textAnchorOffsets.get(Ha);if(Jr&&ao.textAnchor!==Jr)continue;const tc=this.attemptAnchorPlacement(ao,Er,ih,Tp,ec,be,ke,z,Ne,A,J,nn,tt,l,rh,g,b,Fs,je);if(tc&&(rn=tc.placedGlyphBoxes,rn&&rn.placeable))return xr=!0,Ar=tc.shift,rn}Jr?Jr=null:nn=se}return a&&!rn&&(rn={box:this.collisionIndex.placeCollisionBox(Po,"always",z,Ne,A,ke,be,g,J.predicate,je,void 0,mt).box,offscreen:!1,placeable:!1,occluded:!1}),rn};oo(()=>Xr(Po,kt.iconBox,o.al.horizontal),()=>{const Er=kt.verticalTextBox;return l.allowVerticalPlacement&&(!cr||!cr.placeable)&&tt.numVerticalGlyphVertices>0&&Er?Xr(Er,kt.verticalIconBox,o.al.vertical):{box:null,occluded:!0,offscreen:null}}),cr&&(xr=cr.placeable,Or=cr.offscreen);const Pi=qi(cr&&cr.placeable);if(!xr&&this.prevPlacement){const Er=this.prevPlacement.variableOffsets[tt.crossTileID];Er&&(this.variableOffsets[tt.crossTileID]=Er,this.markUsedJustification(l,Er.anchor,tt,Pi))}}}if(ci=cr,xr=ci&&ci.placeable,Or=ci&&ci.offscreen,tt.useRuntimeCollisionCircles){const qi=l.text.placedSymbolArray.get(tt.centerJustifiedTextSymbolIndex),oo=o.am(l.textSizeData,Z,qi),qn=h.get("text-padding");xi=this.collisionIndex.placeCollisionCircles(se,qi,l.lineVertexArray,l.glyphOffsetArray,oo,A,I,a,ke,J.predicate,tt.collisionCircleDiameter,qn,g,je),xi.circles.length&&xi.collisionDetected&&!a&&o.w("Collisions detected, but collision boxes are not shown"),xr=de||xi.circles.length>0&&!xi.collisionDetected,Or=Or&&xi.offscreen}if(kt.iconFeatureIndex&&(io=kt.iconFeatureIndex),kt.iconBox){const qi=oo=>this.collisionIndex.placeCollisionBox(oo,_e,z,Ne,A,ke,be,b,J.predicate,je,we&&Ar?Ar:void 0,mt);ei&&ei.placeable&&kt.verticalIconBox?(ur=qi(kt.verticalIconBox),Vr=ur.placeable):(ur=qi(kt.iconBox),Vr=ur.placeable),Or=Or&&ur.offscreen}const Os=oe||tt.numHorizontalGlyphVertices===0&&tt.numVerticalGlyphVertices===0,no=ne||tt.numIconVertices===0;Os||no?no?Os||(Vr=Vr&&xr):xr=Vr&&xr:Vr=xr=Vr&&xr;const Io=Vr&&ur.placeable;if(xr&&ci.placeable&&this.collisionIndex.insertCollisionBox(ci.box,se,h.get("text-ignore-placement"),l.bucketInstanceId,ei&&ei.placeable&&kn?kn:ro,J.ID),Io&&this.collisionIndex.insertCollisionBox(ur.box,_e,h.get("icon-ignore-placement"),l.bucketInstanceId,io,J.ID),xi&&xr&&this.collisionIndex.insertCollisionCircles(xi.circles,se,h.get("text-ignore-placement"),l.bucketInstanceId,ro,J.ID),a&&this.storeCollisionData(l.bucketInstanceId,Gt,kt,ci,ur,xi),tt.crossTileID===0)throw new Error("symbolInstance.crossTileID can't be 0");if(l.bucketInstanceId===0)throw new Error("bucket.bucketInstanceId can't be 0");this.placements[tt.crossTileID]=new cn((xr||We)&&!(ci!=null&&ci.occluded),(Vr||Fe)&&!(ur!=null&&ur.occluded),Or||l.justReloaded),r[tt.crossTileID]=!0};if(Le){if(e.symbolInstanceStart!==0)throw new Error("bucket.bucketInstanceId should be 0");const tt=l.getSortedSymbolIndexes(-this.transform.bearingInRadians);for(let kt=tt.length-1;kt>=0;--kt){const Gt=tt[kt];pt(l.symbolInstances.get(Gt),l.collisionArrays[Gt],Gt)}}else for(let tt=e.symbolInstanceStart;tt<e.symbolInstanceEnd;tt++)pt(l.symbolInstances.get(tt),l.collisionArrays[tt],tt);l.justReloaded=!1}storeCollisionData(e,r,a,l,h,g){if(a.textBox||a.iconBox){let b,A;this.collisionBoxArrays.has(e)?b=this.collisionBoxArrays.get(e):(b=new Map,this.collisionBoxArrays.set(e,b)),b.has(r)?A=b.get(r):(A={text:null,icon:null},b.set(r,A)),a.textBox&&(A.text=l.box),a.iconBox&&(A.icon=h.box)}if(g){let b=this.collisionCircleArrays[e];b===void 0&&(b=this.collisionCircleArrays[e]=[]);for(let A=0;A<g.circles.length;A+=4)b.push(g.circles[A+0]-Mr),b.push(g.circles[A+1]-Mr),b.push(g.circles[A+2]),b.push(g.collisionDetected?1:0)}}markUsedJustification(e,r,a,l){let h;h=l===o.al.vertical?a.verticalPlacedTextSymbolIndex:{left:a.leftJustifiedTextSymbolIndex,center:a.centerJustifiedTextSymbolIndex,right:a.rightJustifiedTextSymbolIndex}[o.aD(r)];const g=[a.leftJustifiedTextSymbolIndex,a.centerJustifiedTextSymbolIndex,a.rightJustifiedTextSymbolIndex,a.verticalPlacedTextSymbolIndex];for(const b of g)b>=0&&(e.text.placedSymbolArray.get(b).crossTileID=h>=0&&b!==h?0:a.crossTileID)}markUsedOrientation(e,r,a){const l=r===o.al.horizontal||r===o.al.horizontalOnly?r:0,h=r===o.al.vertical?r:0,g=[a.leftJustifiedTextSymbolIndex,a.centerJustifiedTextSymbolIndex,a.rightJustifiedTextSymbolIndex];for(const b of g)e.text.placedSymbolArray.get(b).placedOrientation=l;a.verticalPlacedTextSymbolIndex&&(e.text.placedSymbolArray.get(a.verticalPlacedTextSymbolIndex).placedOrientation=h)}commit(e){this.commitTime=e,this.zoomAtLastRecencyCheck=this.transform.zoom;const r=this.prevPlacement;let a=!1;this.prevZoomAdjustment=r?r.zoomAdjustment(this.transform.zoom):0;const l=r?r.symbolFadeChange(e):1,h=r?r.opacities:{},g=r?r.variableOffsets:{},b=r?r.placedOrientations:{};for(const A in this.placements){const I=this.placements[A],z=h[A];z?(this.opacities[A]=new Jn(z,l,I.text,I.icon),a=a||I.text!==z.text.placed||I.icon!==z.icon.placed):(this.opacities[A]=new Jn(null,l,I.text,I.icon,I.skipFade),a=a||I.text||I.icon)}for(const A in h){const I=h[A];if(!this.opacities[A]){const z=new Jn(I,l,!1,!1);z.isHidden()||(this.opacities[A]=z,a=a||I.text.placed||I.icon.placed)}}for(const A in g)this.variableOffsets[A]||!this.opacities[A]||this.opacities[A].isHidden()||(this.variableOffsets[A]=g[A]);for(const A in b)this.placedOrientations[A]||!this.opacities[A]||this.opacities[A].isHidden()||(this.placedOrientations[A]=b[A]);if(r&&r.lastPlacementChangeTime===void 0)throw new Error("Last placement time for previous placement is not defined");a?this.lastPlacementChangeTime=e:typeof this.lastPlacementChangeTime!="number"&&(this.lastPlacementChangeTime=r?r.lastPlacementChangeTime:e)}updateLayerOpacities(e,r){const a={};for(const l of r){const h=l.getBucket(e);h&&l.latestFeatureIndex&&e.id===h.layerIds[0]&&this.updateBucketOpacities(h,l.tileID,a,l.collisionBoxArray)}}updateBucketOpacities(e,r,a,l){e.hasTextData()&&(e.text.opacityVertexArray.clear(),e.text.hasVisibleVertices=!1),e.hasIconData()&&(e.icon.opacityVertexArray.clear(),e.icon.hasVisibleVertices=!1),e.hasIconCollisionBoxData()&&e.iconCollisionBox.collisionVertexArray.clear(),e.hasTextCollisionBoxData()&&e.textCollisionBox.collisionVertexArray.clear();const h=e.layers[0],g=h.layout,b=new Jn(null,0,!1,!1,!0),A=g.get("text-allow-overlap"),I=g.get("icon-allow-overlap"),z=h._unevaluatedLayout.hasValue("text-variable-anchor")||h._unevaluatedLayout.hasValue("text-variable-anchor-offset"),F=g.get("text-rotation-alignment")==="map",O=g.get("text-pitch-alignment")==="map",Z=g.get("icon-text-fit")!=="none",J=new Jn(null,0,A&&(I||!e.hasIconData()||g.get("icon-optional")),I&&(A||!e.hasTextData()||g.get("text-optional")),!0);!e.collisionArrays&&l&&(e.hasIconCollisionBoxData()||e.hasTextCollisionBoxData())&&e.deserializeCollisionBoxes(l);const oe=(se,de,_e)=>{for(let ye=0;ye<de/4;ye++)se.opacityVertexArray.emplaceBack(_e);se.hasVisibleVertices=se.hasVisibleVertices||_e!==Rn},ne=this.collisionBoxArrays.get(e.bucketInstanceId);for(let se=0;se<e.symbolInstances.length;se++){const de=e.symbolInstances.get(se),{numHorizontalGlyphVertices:_e,numVerticalGlyphVertices:ye,crossTileID:be}=de;let ke=this.opacities[be];a[be]?ke=b:ke||(ke=J,this.opacities[be]=ke),a[be]=!0;const we=de.numIconVertices>0,Le=this.placedOrientations[de.crossTileID],We=Le===o.al.vertical,Fe=Le===o.al.horizontal||Le===o.al.horizontalOnly;if(_e>0||ye>0){const je=us(ke.text);oe(e.text,_e,We?Rn:je),oe(e.text,ye,Fe?Rn:je);const mt=ke.text.isHidden();[de.rightJustifiedTextSymbolIndex,de.centerJustifiedTextSymbolIndex,de.leftJustifiedTextSymbolIndex].forEach(kt=>{kt>=0&&(e.text.placedSymbolArray.get(kt).hidden=mt||We?1:0)}),de.verticalPlacedTextSymbolIndex>=0&&(e.text.placedSymbolArray.get(de.verticalPlacedTextSymbolIndex).hidden=mt||Fe?1:0);const pt=this.variableOffsets[de.crossTileID];pt&&this.markUsedJustification(e,pt.anchor,de,Le);const tt=this.placedOrientations[de.crossTileID];tt&&(this.markUsedJustification(e,"left",de,tt),this.markUsedOrientation(e,tt,de))}if(we){const je=us(ke.icon),mt=!(Z&&de.verticalPlacedIconSymbolIndex&&We);de.placedIconSymbolIndex>=0&&(oe(e.icon,de.numIconVertices,mt?je:Rn),e.icon.placedSymbolArray.get(de.placedIconSymbolIndex).hidden=ke.icon.isHidden()),de.verticalPlacedIconSymbolIndex>=0&&(oe(e.icon,de.numVerticalIconVertices,mt?Rn:je),e.icon.placedSymbolArray.get(de.verticalPlacedIconSymbolIndex).hidden=ke.icon.isHidden())}const Ne=ne&&ne.has(se)?ne.get(se):{text:null,icon:null};if(e.hasIconCollisionBoxData()||e.hasTextCollisionBoxData()){const je=e.collisionArrays[se];if(je){let mt=new o.P(0,0);if(je.textBox||je.verticalTextBox){let pt=!0;if(z){const tt=this.variableOffsets[be];tt?(mt=Di(tt.anchor,tt.width,tt.height,tt.textOffset,tt.textBoxScale),F&&mt._rotate(O?-this.transform.bearingInRadians:this.transform.bearingInRadians)):pt=!1}if(je.textBox||je.verticalTextBox){let tt;je.textBox&&(tt=We),je.verticalTextBox&&(tt=Fe),Ro(e.textCollisionBox.collisionVertexArray,ke.text.placed,!pt||tt,Ne.text,mt.x,mt.y)}}if(je.iconBox||je.verticalIconBox){const pt=!!(!Fe&&je.verticalIconBox);let tt;je.iconBox&&(tt=pt),je.verticalIconBox&&(tt=!pt),Ro(e.iconCollisionBox.collisionVertexArray,ke.icon.placed,tt,Ne.icon,Z?mt.x:0,Z?mt.y:0)}}}}if(e.sortFeatures(-this.transform.bearingInRadians),this.retainedQueryData[e.bucketInstanceId]&&(this.retainedQueryData[e.bucketInstanceId].featureSortOrder=e.featureSortOrder),e.hasTextData()&&e.text.opacityVertexBuffer&&e.text.opacityVertexBuffer.updateData(e.text.opacityVertexArray),e.hasIconData()&&e.icon.opacityVertexBuffer&&e.icon.opacityVertexBuffer.updateData(e.icon.opacityVertexArray),e.hasIconCollisionBoxData()&&e.iconCollisionBox.collisionVertexBuffer&&e.iconCollisionBox.collisionVertexBuffer.updateData(e.iconCollisionBox.collisionVertexArray),e.hasTextCollisionBoxData()&&e.textCollisionBox.collisionVertexBuffer&&e.textCollisionBox.collisionVertexBuffer.updateData(e.textCollisionBox.collisionVertexArray),e.text.opacityVertexArray.length!==e.text.layoutVertexArray.length/4)throw new Error(`bucket.text.opacityVertexArray.length (= ${e.text.opacityVertexArray.length}) !== bucket.text.layoutVertexArray.length (= ${e.text.layoutVertexArray.length}) / 4`);if(e.icon.opacityVertexArray.length!==e.icon.layoutVertexArray.length/4)throw new Error(`bucket.icon.opacityVertexArray.length (= ${e.icon.opacityVertexArray.length}) !== bucket.icon.layoutVertexArray.length (= ${e.icon.layoutVertexArray.length}) / 4`);e.bucketInstanceId in this.collisionCircleArrays&&(e.collisionCircleArray=this.collisionCircleArrays[e.bucketInstanceId],delete this.collisionCircleArrays[e.bucketInstanceId])}symbolFadeChange(e){return this.fadeDuration===0?1:(e-this.commitTime)/this.fadeDuration+this.prevZoomAdjustment}zoomAdjustment(e){return Math.max(0,(this.transform.zoom-e)/1.5)}hasTransitions(e){return this.stale||e-this.lastPlacementChangeTime<this.fadeDuration}stillRecent(e,r){const a=this.zoomAtLastRecencyCheck===r?1-this.zoomAdjustment(r):1;return this.zoomAtLastRecencyCheck=r,this.commitTime+this.fadeDuration*a>e}setStale(){this.stale=!0}}function Ro(u,e,r,a,l,h){a&&a.length!==0||(a=[0,0,0,0]);const g=a[0]-Mr,b=a[1]-Mr,A=a[2]-Mr,I=a[3]-Mr;u.emplaceBack(e?1:0,r?1:0,l||0,h||0,g,b),u.emplaceBack(e?1:0,r?1:0,l||0,h||0,A,b),u.emplaceBack(e?1:0,r?1:0,l||0,h||0,A,I),u.emplaceBack(e?1:0,r?1:0,l||0,h||0,g,I)}const ta=Math.pow(2,25),Xn=Math.pow(2,24),ls=Math.pow(2,17),ra=Math.pow(2,16),ia=Math.pow(2,9),na=Math.pow(2,8),cs=Math.pow(2,1);function us(u){if(u.opacity===0&&!u.placed)return 0;if(u.opacity===1&&u.placed)return 4294967295;const e=u.placed?1:0,r=Math.floor(127*u.opacity);return r*ta+e*Xn+r*ls+e*ra+r*ia+e*na+r*cs+e}const Rn=0;class hs{constructor(e){this._sortAcrossTiles=e.layout.get("symbol-z-order")!=="viewport-y"&&!e.layout.get("symbol-sort-key").isConstant(),this._currentTileIndex=0,this._currentPartIndex=0,this._seenCrossTileIDs={},this._bucketParts=[]}continuePlacement(e,r,a,l,h){const g=this._bucketParts;for(;this._currentTileIndex<e.length;)if(r.getBucketParts(g,l,e[this._currentTileIndex],this._sortAcrossTiles),this._currentTileIndex++,h())return!0;for(this._sortAcrossTiles&&(this._sortAcrossTiles=!1,g.sort((b,A)=>b.sortKey-A.sortKey));this._currentPartIndex<g.length;)if(r.placeLayerBucketPart(g[this._currentPartIndex],this._seenCrossTileIDs,a),this._currentPartIndex++,h())return!0;return!1}}class oa{constructor(e,r,a,l,h,g,b,A){this.placement=new as(e,r,g,b,A),this._currentPlacementIndex=a.length-1,this._forceFullPlacement=l,this._showCollisionBoxes=h,this._done=!1}isDone(){return this._done}continuePlacement(e,r,a){const l=M.now(),h=()=>!this._forceFullPlacement&&M.now()-l>2;for(;this._currentPlacementIndex>=0;){const g=r[e[this._currentPlacementIndex]],b=this.placement.collisionIndex.transform.zoom;if(g.type==="symbol"&&(!g.minzoom||g.minzoom<=b)&&(!g.maxzoom||g.maxzoom>b)){if(this._inProgressLayer||(this._inProgressLayer=new hs(g)),this._inProgressLayer.continuePlacement(a[g.source],this.placement,this._showCollisionBoxes,g,h))return;delete this._inProgressLayer}this._currentPlacementIndex--}this._done=!0}commit(e){return this.placement.commit(e),this.placement}}const Dn=512/o.Z/2;class ps{constructor(e,r,a){this.tileID=e,this.bucketInstanceId=a,this._symbolsByKey={};const l=new Map;for(let h=0;h<r.length;h++){const g=r.get(h),b=g.key,A=l.get(b);A?A.push(g):l.set(b,[g])}for(const[h,g]of l){const b={positions:g.map(A=>({x:Math.floor(A.anchorX*Dn),y:Math.floor(A.anchorY*Dn)})),crossTileIDs:g.map(A=>A.crossTileID)};if(b.positions.length>128){const A=new o.aF(b.positions.length,16,Uint16Array);for(const{x:I,y:z}of b.positions)A.add(I,z);A.finish(),delete b.positions,b.index=A}this._symbolsByKey[h]=b}}getScaledCoordinates(e,r){const{x:a,y:l,z:h}=this.tileID.canonical,{x:g,y:b,z:A}=r.canonical,I=Dn/Math.pow(2,A-h),z=(b*o.Z+e.anchorY)*I,F=l*o.Z*Dn;return{x:Math.floor((g*o.Z+e.anchorX)*I-a*o.Z*Dn),y:Math.floor(z-F)}}findMatches(e,r,a){const l=this.tileID.canonical.z<r.canonical.z?1:Math.pow(2,this.tileID.canonical.z-r.canonical.z);for(let h=0;h<e.length;h++){const g=e.get(h);if(g.crossTileID)continue;const b=this._symbolsByKey[g.key];if(!b)continue;const A=this.getScaledCoordinates(g,r);if(b.index){const I=b.index.range(A.x-l,A.y-l,A.x+l,A.y+l).sort();for(const z of I){const F=b.crossTileIDs[z];if(!a[F]){a[F]=!0,g.crossTileID=F;break}}}else if(b.positions)for(let I=0;I<b.positions.length;I++){const z=b.positions[I],F=b.crossTileIDs[I];if(Math.abs(z.x-A.x)<=l&&Math.abs(z.y-A.y)<=l&&!a[F]){a[F]=!0,g.crossTileID=F;break}}}}getCrossTileIDsLists(){return Object.values(this._symbolsByKey).map(({crossTileIDs:e})=>e)}}class _l{constructor(){this.maxCrossTileID=0}generate(){return++this.maxCrossTileID}}class Qn{constructor(){this.indexes={},this.usedCrossTileIDs={},this.lng=0}handleWrapJump(e){const r=Math.round((e-this.lng)/360);if(r!==0)for(const a in this.indexes){const l=this.indexes[a],h={};for(const g in l){const b=l[g];b.tileID=b.tileID.unwrapTo(b.tileID.wrap+r),h[b.tileID.key]=b}this.indexes[a]=h}this.lng=e}addBucket(e,r,a){if(this.indexes[e.overscaledZ]&&this.indexes[e.overscaledZ][e.key]){if(this.indexes[e.overscaledZ][e.key].bucketInstanceId===r.bucketInstanceId)return!1;this.removeBucketCrossTileIDs(e.overscaledZ,this.indexes[e.overscaledZ][e.key])}for(let h=0;h<r.symbolInstances.length;h++)r.symbolInstances.get(h).crossTileID=0;this.usedCrossTileIDs[e.overscaledZ]||(this.usedCrossTileIDs[e.overscaledZ]={});const l=this.usedCrossTileIDs[e.overscaledZ];for(const h in this.indexes){const g=this.indexes[h];if(Number(h)>e.overscaledZ)for(const b in g){const A=g[b];A.tileID.isChildOf(e)&&A.findMatches(r.symbolInstances,e,l)}else{const b=g[e.scaledTo(Number(h)).key];b&&b.findMatches(r.symbolInstances,e,l)}}for(let h=0;h<r.symbolInstances.length;h++){const g=r.symbolInstances.get(h);g.crossTileID||(g.crossTileID=a.generate(),l[g.crossTileID]=!0)}return this.indexes[e.overscaledZ]===void 0&&(this.indexes[e.overscaledZ]={}),this.indexes[e.overscaledZ][e.key]=new ps(e,r.symbolInstances,r.bucketInstanceId),!0}removeBucketCrossTileIDs(e,r){for(const a of r.getCrossTileIDsLists())for(const l of a)delete this.usedCrossTileIDs[e][l]}removeStaleBuckets(e){let r=!1;for(const a in this.indexes){const l=this.indexes[a];for(const h in l)e[l[h].bucketInstanceId]||(this.removeBucketCrossTileIDs(a,l[h]),delete l[h],r=!0)}return r}}class Yn{constructor(){this.layerIndexes={},this.crossTileIDs=new _l,this.maxBucketInstanceId=0,this.bucketsInCurrentPlacement={}}addLayer(e,r,a){let l=this.layerIndexes[e.id];l===void 0&&(l=this.layerIndexes[e.id]=new Qn);let h=!1;const g={};l.handleWrapJump(a);for(const b of r){const A=b.getBucket(e);A&&e.id===A.layerIds[0]&&(A.bucketInstanceId||(A.bucketInstanceId=++this.maxBucketInstanceId),l.addBucket(b.tileID,A,this.crossTileIDs)&&(h=!0),g[A.bucketInstanceId]=!0)}return l.removeStaleBuckets(g)&&(h=!0),h}pruneUnusedLayers(e){const r={};e.forEach(a=>{r[a]=!0});for(const a in this.layerIndexes)r[a]||delete this.layerIndexes[a]}}var ds="void main() {fragColor=vec4(1.0);}";const oi={prelude:tr(`#ifdef GL_ES
|
|
6
|
-
precision mediump float;
|
|
7
|
-
#else
|
|
8
|
-
#if !defined(lowp)
|
|
9
|
-
#define lowp
|
|
10
|
-
#endif
|
|
11
|
-
#if !defined(mediump)
|
|
12
|
-
#define mediump
|
|
13
|
-
#endif
|
|
14
|
-
#if !defined(highp)
|
|
15
|
-
#define highp
|
|
16
|
-
#endif
|
|
17
|
-
#endif
|
|
18
|
-
out highp vec4 fragColor;`,`#ifdef GL_ES
|
|
19
|
-
precision highp float;
|
|
20
|
-
#else
|
|
21
|
-
#if !defined(lowp)
|
|
22
|
-
#define lowp
|
|
23
|
-
#endif
|
|
24
|
-
#if !defined(mediump)
|
|
25
|
-
#define mediump
|
|
26
|
-
#endif
|
|
27
|
-
#if !defined(highp)
|
|
28
|
-
#define highp
|
|
29
|
-
#endif
|
|
30
|
-
#endif
|
|
31
|
-
vec2 unpack_float(const float packedValue) {int packedIntValue=int(packedValue);int v0=packedIntValue/256;return vec2(v0,packedIntValue-v0*256);}vec2 unpack_opacity(const float packedOpacity) {int intOpacity=int(packedOpacity)/2;return vec2(float(intOpacity)/127.0,mod(packedOpacity,2.0));}vec4 decode_color(const vec2 encodedColor) {return vec4(unpack_float(encodedColor[0])/255.0,unpack_float(encodedColor[1])/255.0
|
|
32
|
-
);}float unpack_mix_vec2(const vec2 packedValue,const float t) {return mix(packedValue[0],packedValue[1],t);}vec4 unpack_mix_color(const vec4 packedColors,const float t) {vec4 minColor=decode_color(vec2(packedColors[0],packedColors[1]));vec4 maxColor=decode_color(vec2(packedColors[2],packedColors[3]));return mix(minColor,maxColor,t);}vec2 get_pattern_pos(const vec2 pixel_coord_upper,const vec2 pixel_coord_lower,const vec2 pattern_size,const float tile_units_to_pixels,const vec2 pos) {vec2 offset=mod(mod(mod(pixel_coord_upper,pattern_size)*256.0,pattern_size)*256.0+pixel_coord_lower,pattern_size);return (tile_units_to_pixels*pos+offset)/pattern_size;}mat3 rotationMatrixFromAxisAngle(vec3 u,float angle) {float c=cos(angle);float s=sin(angle);float c2=1.0-c;return mat3(u.x*u.x*c2+ c,u.x*u.y*c2-u.z*s,u.x*u.z*c2+u.y*s,u.y*u.x*c2+u.z*s,u.y*u.y*c2+ c,u.y*u.z*c2-u.x*s,u.z*u.x*c2-u.y*s,u.z*u.y*c2+u.x*s,u.z*u.z*c2+ c
|
|
33
|
-
);}
|
|
34
|
-
#ifdef TERRAIN3D
|
|
35
|
-
uniform sampler2D u_terrain;uniform float u_terrain_dim;uniform mat4 u_terrain_matrix;uniform vec4 u_terrain_unpack;uniform float u_terrain_exaggeration;uniform highp sampler2D u_depth;
|
|
36
|
-
#endif
|
|
37
|
-
const highp vec4 bitSh=vec4(256.*256.*256.,256.*256.,256.,1.);const highp vec4 bitShifts=vec4(1.)/bitSh;highp float unpack(highp vec4 color) {return dot(color,bitShifts);}highp float depthOpacity(vec3 frag) {
|
|
38
|
-
#ifdef TERRAIN3D
|
|
39
|
-
highp float d=unpack(texture(u_depth,frag.xy*0.5+0.5))+0.0001-frag.z;return 1.0-max(0.0,min(1.0,-d*500.0));
|
|
40
|
-
#else
|
|
41
|
-
return 1.0;
|
|
42
|
-
#endif
|
|
43
|
-
}float calculate_visibility(vec4 pos) {
|
|
44
|
-
#ifdef TERRAIN3D
|
|
45
|
-
vec3 frag=pos.xyz/pos.w;highp float d=depthOpacity(frag);if (d > 0.95) return 1.0;return (d+depthOpacity(frag+vec3(0.0,0.01,0.0)))/2.0;
|
|
46
|
-
#else
|
|
47
|
-
return 1.0;
|
|
48
|
-
#endif
|
|
49
|
-
}float ele(vec2 pos) {
|
|
50
|
-
#ifdef TERRAIN3D
|
|
51
|
-
vec4 rgb=(texture(u_terrain,pos)*255.0)*u_terrain_unpack;return rgb.r+rgb.g+rgb.b-u_terrain_unpack.a;
|
|
52
|
-
#else
|
|
53
|
-
return 0.0;
|
|
54
|
-
#endif
|
|
55
|
-
}float get_elevation(vec2 pos) {
|
|
56
|
-
#ifdef TERRAIN3D
|
|
57
|
-
#ifdef GLOBE
|
|
58
|
-
if ((pos.y <-32767.5) || (pos.y > 32766.5)) {return 0.0;}
|
|
59
|
-
#endif
|
|
60
|
-
vec2 coord=(u_terrain_matrix*vec4(pos,0.0,1.0)).xy*u_terrain_dim+1.0;vec2 f=fract(coord);vec2 c=(floor(coord)+0.5)/(u_terrain_dim+2.0);float d=1.0/(u_terrain_dim+2.0);float tl=ele(c);float tr=ele(c+vec2(d,0.0));float bl=ele(c+vec2(0.0,d));float br=ele(c+vec2(d,d));float elevation=mix(mix(tl,tr,f.x),mix(bl,br,f.x),f.y);return elevation*u_terrain_exaggeration;
|
|
61
|
-
#else
|
|
62
|
-
return 0.0;
|
|
63
|
-
#endif
|
|
64
|
-
}const float PI=3.141592653589793;uniform mat4 u_projection_matrix;`),projectionMercator:tr("","float projectLineThickness(float tileY) {return 1.0;}float projectCircleRadius(float tileY) {return 1.0;}vec4 projectTile(vec2 p) {vec4 result=u_projection_matrix*vec4(p,0.0,1.0);return result;}vec4 projectTile(vec2 p,vec2 rawPos) {vec4 result=u_projection_matrix*vec4(p,0.0,1.0);if (rawPos.y <-32767.5 || rawPos.y > 32766.5) {result.z=-10000000.0;}return result;}vec4 projectTileWithElevation(vec2 posInTile,float elevation) {return u_projection_matrix*vec4(posInTile,elevation,1.0);}vec4 projectTileFor3D(vec2 posInTile,float elevation) {return projectTileWithElevation(posInTile,elevation);}"),projectionGlobe:tr("",`#define GLOBE_RADIUS 6371008.8
|
|
65
|
-
uniform highp vec4 u_projection_tile_mercator_coords;uniform highp vec4 u_projection_clipping_plane;uniform highp float u_projection_transition;uniform mat4 u_projection_fallback_matrix;vec3 globeRotateVector(vec3 vec,vec2 angles) {vec3 axisRight=vec3(vec.z,0.0,-vec.x);vec3 axisUp=cross(axisRight,vec);axisRight=normalize(axisRight);axisUp=normalize(axisUp);vec2 t=tan(angles);return normalize(vec+axisRight*t.x+axisUp*t.y);}mat3 globeGetRotationMatrix(vec3 spherePos) {vec3 axisRight=vec3(spherePos.z,0.0,-spherePos.x);vec3 axisDown=cross(axisRight,spherePos);axisRight=normalize(axisRight);axisDown=normalize(axisDown);return mat3(axisRight,axisDown,spherePos
|
|
66
|
-
);}float circumferenceRatioAtTileY(float tileY) {float mercator_pos_y=u_projection_tile_mercator_coords.y+u_projection_tile_mercator_coords.w*tileY;float spherical_y=2.0*atan(exp(PI-(mercator_pos_y*PI*2.0)))-PI*0.5;return cos(spherical_y);}float projectLineThickness(float tileY) {float thickness=1.0/circumferenceRatioAtTileY(tileY);
|
|
67
|
-
if (u_projection_transition < 0.999) {return mix(1.0,thickness,u_projection_transition);} else {return thickness;}}vec3 projectToSphere(vec2 translatedPos,vec2 rawPos) {vec2 mercator_pos=u_projection_tile_mercator_coords.xy+u_projection_tile_mercator_coords.zw*translatedPos;vec2 spherical;spherical.x=mercator_pos.x*PI*2.0+PI;spherical.y=2.0*atan(exp(PI-(mercator_pos.y*PI*2.0)))-PI*0.5;float len=cos(spherical.y);vec3 pos=vec3(sin(spherical.x)*len,sin(spherical.y),cos(spherical.x)*len
|
|
68
|
-
);if (rawPos.y <-32767.5) {pos=vec3(0.0,1.0,0.0);}if (rawPos.y > 32766.5) {pos=vec3(0.0,-1.0,0.0);}return pos;}vec3 projectToSphere(vec2 posInTile) {return projectToSphere(posInTile,vec2(0.0,0.0));}float globeComputeClippingZ(vec3 spherePos) {return (1.0-(dot(spherePos,u_projection_clipping_plane.xyz)+u_projection_clipping_plane.w));}vec4 interpolateProjection(vec2 posInTile,vec3 spherePos,float elevation) {vec3 elevatedPos=spherePos*(1.0+elevation/GLOBE_RADIUS);vec4 globePosition=u_projection_matrix*vec4(elevatedPos,1.0);globePosition.z=globeComputeClippingZ(elevatedPos)*globePosition.w;if (u_projection_transition > 0.999) {return globePosition;}vec4 flatPosition=u_projection_fallback_matrix*vec4(posInTile,elevation,1.0);const float z_globeness_threshold=0.2;vec4 result=globePosition;result.z=mix(0.0,globePosition.z,clamp((u_projection_transition-z_globeness_threshold)/(1.0-z_globeness_threshold),0.0,1.0));result.xyw=mix(flatPosition.xyw,globePosition.xyw,u_projection_transition);if ((posInTile.y <-32767.5) || (posInTile.y > 32766.5)) {result=globePosition;const float poles_hidden_anim_percentage=0.02;result.z=mix(globePosition.z,100.0,pow(max((1.0-u_projection_transition)/poles_hidden_anim_percentage,0.0),8.0));}return result;}vec4 interpolateProjectionFor3D(vec2 posInTile,vec3 spherePos,float elevation) {vec3 elevatedPos=spherePos*(1.0+elevation/GLOBE_RADIUS);vec4 globePosition=u_projection_matrix*vec4(elevatedPos,1.0);if (u_projection_transition > 0.999) {return globePosition;}vec4 fallbackPosition=u_projection_fallback_matrix*vec4(posInTile,elevation,1.0);return mix(fallbackPosition,globePosition,u_projection_transition);}vec4 projectTile(vec2 posInTile) {return interpolateProjection(posInTile,projectToSphere(posInTile),0.0);}vec4 projectTile(vec2 posInTile,vec2 rawPos) {return interpolateProjection(posInTile,projectToSphere(posInTile,rawPos),0.0);}vec4 projectTileWithElevation(vec2 posInTile,float elevation) {return interpolateProjection(posInTile,projectToSphere(posInTile),elevation);}vec4 projectTileFor3D(vec2 posInTile,float elevation) {vec3 spherePos=projectToSphere(posInTile,posInTile);return interpolateProjectionFor3D(posInTile,spherePos,elevation);}`),background:tr(`uniform vec4 u_color;uniform float u_opacity;void main() {fragColor=u_color*u_opacity;
|
|
69
|
-
#ifdef OVERDRAW_INSPECTOR
|
|
70
|
-
fragColor=vec4(1.0);
|
|
71
|
-
#endif
|
|
72
|
-
}`,"in vec2 a_pos;void main() {gl_Position=projectTile(a_pos);}"),backgroundPattern:tr(`uniform vec2 u_pattern_tl_a;uniform vec2 u_pattern_br_a;uniform vec2 u_pattern_tl_b;uniform vec2 u_pattern_br_b;uniform vec2 u_texsize;uniform float u_mix;uniform float u_opacity;uniform sampler2D u_image;in vec2 v_pos_a;in vec2 v_pos_b;void main() {vec2 imagecoord=mod(v_pos_a,1.0);vec2 pos=mix(u_pattern_tl_a/u_texsize,u_pattern_br_a/u_texsize,imagecoord);vec4 color1=texture(u_image,pos);vec2 imagecoord_b=mod(v_pos_b,1.0);vec2 pos2=mix(u_pattern_tl_b/u_texsize,u_pattern_br_b/u_texsize,imagecoord_b);vec4 color2=texture(u_image,pos2);fragColor=mix(color1,color2,u_mix)*u_opacity;
|
|
73
|
-
#ifdef OVERDRAW_INSPECTOR
|
|
74
|
-
fragColor=vec4(1.0);
|
|
75
|
-
#endif
|
|
76
|
-
}`,"uniform vec2 u_pattern_size_a;uniform vec2 u_pattern_size_b;uniform vec2 u_pixel_coord_upper;uniform vec2 u_pixel_coord_lower;uniform float u_scale_a;uniform float u_scale_b;uniform float u_tile_units_to_pixels;in vec2 a_pos;out vec2 v_pos_a;out vec2 v_pos_b;void main() {gl_Position=projectTile(a_pos);v_pos_a=get_pattern_pos(u_pixel_coord_upper,u_pixel_coord_lower,u_scale_a*u_pattern_size_a,u_tile_units_to_pixels,a_pos);v_pos_b=get_pattern_pos(u_pixel_coord_upper,u_pixel_coord_lower,u_scale_b*u_pattern_size_b,u_tile_units_to_pixels,a_pos);}"),circle:tr(`in vec3 v_data;in float v_visibility;
|
|
77
|
-
#pragma mapbox: define highp vec4 color
|
|
78
|
-
#pragma mapbox: define mediump float radius
|
|
79
|
-
#pragma mapbox: define lowp float blur
|
|
80
|
-
#pragma mapbox: define lowp float opacity
|
|
81
|
-
#pragma mapbox: define highp vec4 stroke_color
|
|
82
|
-
#pragma mapbox: define mediump float stroke_width
|
|
83
|
-
#pragma mapbox: define lowp float stroke_opacity
|
|
84
|
-
void main() {
|
|
85
|
-
#pragma mapbox: initialize highp vec4 color
|
|
86
|
-
#pragma mapbox: initialize mediump float radius
|
|
87
|
-
#pragma mapbox: initialize lowp float blur
|
|
88
|
-
#pragma mapbox: initialize lowp float opacity
|
|
89
|
-
#pragma mapbox: initialize highp vec4 stroke_color
|
|
90
|
-
#pragma mapbox: initialize mediump float stroke_width
|
|
91
|
-
#pragma mapbox: initialize lowp float stroke_opacity
|
|
92
|
-
vec2 extrude=v_data.xy;float extrude_length=length(extrude);float antialiased_blur=v_data.z;float opacity_t=smoothstep(0.0,antialiased_blur,extrude_length-1.0);float color_t=stroke_width < 0.01 ? 0.0 : smoothstep(antialiased_blur,0.0,extrude_length-radius/(radius+stroke_width));fragColor=v_visibility*opacity_t*mix(color*opacity,stroke_color*stroke_opacity,color_t);const float epsilon=0.5/255.0;if (fragColor.r < epsilon && fragColor.g < epsilon && fragColor.b < epsilon && fragColor.a < epsilon) {discard;}
|
|
93
|
-
#ifdef OVERDRAW_INSPECTOR
|
|
94
|
-
fragColor=vec4(1.0);
|
|
95
|
-
#endif
|
|
96
|
-
}`,`uniform bool u_scale_with_map;uniform bool u_pitch_with_map;uniform vec2 u_extrude_scale;uniform highp float u_globe_extrude_scale;uniform lowp float u_device_pixel_ratio;uniform highp float u_camera_to_center_distance;uniform vec2 u_translate;in vec2 a_pos;out vec3 v_data;out float v_visibility;
|
|
97
|
-
#pragma mapbox: define highp vec4 color
|
|
98
|
-
#pragma mapbox: define mediump float radius
|
|
99
|
-
#pragma mapbox: define lowp float blur
|
|
100
|
-
#pragma mapbox: define lowp float opacity
|
|
101
|
-
#pragma mapbox: define highp vec4 stroke_color
|
|
102
|
-
#pragma mapbox: define mediump float stroke_width
|
|
103
|
-
#pragma mapbox: define lowp float stroke_opacity
|
|
104
|
-
void main(void) {
|
|
105
|
-
#pragma mapbox: initialize highp vec4 color
|
|
106
|
-
#pragma mapbox: initialize mediump float radius
|
|
107
|
-
#pragma mapbox: initialize lowp float blur
|
|
108
|
-
#pragma mapbox: initialize lowp float opacity
|
|
109
|
-
#pragma mapbox: initialize highp vec4 stroke_color
|
|
110
|
-
#pragma mapbox: initialize mediump float stroke_width
|
|
111
|
-
#pragma mapbox: initialize lowp float stroke_opacity
|
|
112
|
-
vec2 pos_raw=a_pos+32768.0;vec2 extrude=vec2(mod(pos_raw,8.0)/7.0*2.0-1.0);vec2 circle_center=floor(pos_raw/8.0)+u_translate;float ele=get_elevation(circle_center);v_visibility=calculate_visibility(projectTileWithElevation(circle_center,ele));if (u_pitch_with_map) {
|
|
113
|
-
#ifdef GLOBE
|
|
114
|
-
vec3 center_vector=projectToSphere(circle_center);
|
|
115
|
-
#endif
|
|
116
|
-
float angle_scale=u_globe_extrude_scale;vec2 corner_position=circle_center;if (u_scale_with_map) {angle_scale*=(radius+stroke_width);corner_position+=extrude*u_extrude_scale*(radius+stroke_width);} else {
|
|
117
|
-
#ifdef GLOBE
|
|
118
|
-
vec4 projected_center=interpolateProjection(circle_center,center_vector,ele);
|
|
119
|
-
#else
|
|
120
|
-
vec4 projected_center=projectTileWithElevation(circle_center,ele);
|
|
121
|
-
#endif
|
|
122
|
-
corner_position+=extrude*u_extrude_scale*(radius+stroke_width)*(projected_center.w/u_camera_to_center_distance);angle_scale*=(radius+stroke_width)*(projected_center.w/u_camera_to_center_distance);}
|
|
123
|
-
#ifdef GLOBE
|
|
124
|
-
vec2 angles=extrude*angle_scale;vec3 corner_vector=globeRotateVector(center_vector,angles);gl_Position=interpolateProjection(corner_position,corner_vector,ele);
|
|
125
|
-
#else
|
|
126
|
-
gl_Position=projectTileWithElevation(corner_position,ele);
|
|
127
|
-
#endif
|
|
128
|
-
} else {gl_Position=projectTileWithElevation(circle_center,ele);if (gl_Position.z/gl_Position.w > 1.0) {gl_Position.xy=vec2(10000.0);}if (u_scale_with_map) {gl_Position.xy+=extrude*(radius+stroke_width)*u_extrude_scale*u_camera_to_center_distance;} else {gl_Position.xy+=extrude*(radius+stroke_width)*u_extrude_scale*gl_Position.w;}}float antialiasblur=-max(1.0/u_device_pixel_ratio/(radius+stroke_width),blur);v_data=vec3(extrude.x,extrude.y,antialiasblur);}`),clippingMask:tr(ds,"in vec2 a_pos;void main() {gl_Position=projectTile(a_pos);}"),heatmap:tr(`uniform highp float u_intensity;in vec2 v_extrude;
|
|
129
|
-
#pragma mapbox: define highp float weight
|
|
130
|
-
#define GAUSS_COEF 0.3989422804014327
|
|
131
|
-
void main() {
|
|
132
|
-
#pragma mapbox: initialize highp float weight
|
|
133
|
-
float d=-0.5*3.0*3.0*dot(v_extrude,v_extrude);float val=weight*u_intensity*GAUSS_COEF*exp(d);fragColor=vec4(val,1.0,1.0,1.0);
|
|
134
|
-
#ifdef OVERDRAW_INSPECTOR
|
|
135
|
-
fragColor=vec4(1.0);
|
|
136
|
-
#endif
|
|
137
|
-
}`,`uniform float u_extrude_scale;uniform float u_opacity;uniform float u_intensity;uniform highp float u_globe_extrude_scale;in vec2 a_pos;out vec2 v_extrude;
|
|
138
|
-
#pragma mapbox: define highp float weight
|
|
139
|
-
#pragma mapbox: define mediump float radius
|
|
140
|
-
const highp float ZERO=1.0/255.0/16.0;
|
|
141
|
-
#define GAUSS_COEF 0.3989422804014327
|
|
142
|
-
void main(void) {
|
|
143
|
-
#pragma mapbox: initialize highp float weight
|
|
144
|
-
#pragma mapbox: initialize mediump float radius
|
|
145
|
-
vec2 pos_raw=a_pos+32768.0;vec2 unscaled_extrude=vec2(mod(pos_raw,8.0)/7.0*2.0-1.0);float S=sqrt(-2.0*log(ZERO/weight/u_intensity/GAUSS_COEF))/3.0;v_extrude=S*unscaled_extrude;vec2 extrude=v_extrude*radius*u_extrude_scale;vec2 circle_center=floor(pos_raw/8.0);
|
|
146
|
-
#ifdef GLOBE
|
|
147
|
-
vec2 angles=v_extrude*radius*u_globe_extrude_scale;vec3 center_vector=projectToSphere(circle_center);vec3 corner_vector=globeRotateVector(center_vector,angles);gl_Position=interpolateProjection(circle_center+extrude,corner_vector,0.0);
|
|
148
|
-
#else
|
|
149
|
-
gl_Position=projectTileFor3D(circle_center+extrude,get_elevation(circle_center));
|
|
150
|
-
#endif
|
|
151
|
-
}`),heatmapTexture:tr(`uniform sampler2D u_image;uniform sampler2D u_color_ramp;uniform float u_opacity;in vec2 v_pos;void main() {float t=texture(u_image,v_pos).r;vec4 color=texture(u_color_ramp,vec2(t,0.5));fragColor=color*u_opacity;
|
|
152
|
-
#ifdef OVERDRAW_INSPECTOR
|
|
153
|
-
fragColor=vec4(0.0);
|
|
154
|
-
#endif
|
|
155
|
-
}`,"uniform mat4 u_matrix;uniform vec2 u_world;in vec2 a_pos;out vec2 v_pos;void main() {gl_Position=u_matrix*vec4(a_pos*u_world,0,1);v_pos.x=a_pos.x;v_pos.y=1.0-a_pos.y;}"),collisionBox:tr("in float v_placed;in float v_notUsed;void main() {float alpha=0.5;fragColor=vec4(1.0,0.0,0.0,1.0)*alpha;if (v_placed > 0.5) {fragColor=vec4(0.0,0.0,1.0,0.5)*alpha;}if (v_notUsed > 0.5) {fragColor*=.1;}}","in vec2 a_anchor_pos;in vec2 a_placed;in vec2 a_box_real;uniform vec2 u_pixel_extrude_scale;out float v_placed;out float v_notUsed;void main() {gl_Position=projectTileWithElevation(a_anchor_pos,get_elevation(a_anchor_pos));gl_Position.xy=((a_box_real+0.5)*u_pixel_extrude_scale*2.0-1.0)*vec2(1.0,-1.0)*gl_Position.w;if (gl_Position.z/gl_Position.w < 1.1) {gl_Position.z=0.5;}v_placed=a_placed.x;v_notUsed=a_placed.y;}"),collisionCircle:tr("in float v_radius;in vec2 v_extrude;in float v_collision;void main() {float alpha=0.5;float stroke_radius=0.9;float distance_to_center=length(v_extrude);float distance_to_edge=abs(distance_to_center-v_radius);float opacity_t=smoothstep(-stroke_radius,0.0,-distance_to_edge);vec4 color=mix(vec4(0.0,0.0,1.0,0.5),vec4(1.0,0.0,0.0,1.0),v_collision);fragColor=color*alpha*opacity_t;}","in vec2 a_pos;in float a_radius;in vec2 a_flags;uniform vec2 u_viewport_size;out float v_radius;out vec2 v_extrude;out float v_collision;void main() {float radius=a_radius;float collision=a_flags.x;float vertexIdx=a_flags.y;vec2 quadVertexOffset=vec2(mix(-1.0,1.0,float(vertexIdx >=2.0)),mix(-1.0,1.0,float(vertexIdx >=1.0 && vertexIdx <=2.0)));vec2 quadVertexExtent=quadVertexOffset*radius;float padding_factor=1.2;v_radius=radius;v_extrude=quadVertexExtent*padding_factor;v_collision=collision;gl_Position=vec4((a_pos/u_viewport_size*2.0-1.0)*vec2(1.0,-1.0),0.0,1.0)+vec4(quadVertexExtent*padding_factor/u_viewport_size*2.0,0.0,0.0);}"),debug:tr("uniform highp vec4 u_color;uniform sampler2D u_overlay;in vec2 v_uv;void main() {vec4 overlay_color=texture(u_overlay,v_uv);fragColor=mix(u_color,overlay_color,overlay_color.a);}","in vec2 a_pos;out vec2 v_uv;uniform float u_overlay_scale;void main() {v_uv=a_pos/8192.0;gl_Position=projectTileWithElevation(a_pos*u_overlay_scale,get_elevation(a_pos));}"),depth:tr(ds,`in vec2 a_pos;void main() {
|
|
156
|
-
#ifdef GLOBE
|
|
157
|
-
gl_Position=projectTileFor3D(a_pos,0.0);
|
|
158
|
-
#else
|
|
159
|
-
gl_Position=u_projection_matrix*vec4(a_pos,0.0,1.0);
|
|
160
|
-
#endif
|
|
161
|
-
}`),fill:tr(`#pragma mapbox: define highp vec4 color
|
|
162
|
-
#pragma mapbox: define lowp float opacity
|
|
163
|
-
void main() {
|
|
164
|
-
#pragma mapbox: initialize highp vec4 color
|
|
165
|
-
#pragma mapbox: initialize lowp float opacity
|
|
166
|
-
fragColor=color*opacity;
|
|
167
|
-
#ifdef OVERDRAW_INSPECTOR
|
|
168
|
-
fragColor=vec4(1.0);
|
|
169
|
-
#endif
|
|
170
|
-
}`,`uniform vec2 u_fill_translate;in vec2 a_pos;
|
|
171
|
-
#pragma mapbox: define highp vec4 color
|
|
172
|
-
#pragma mapbox: define lowp float opacity
|
|
173
|
-
void main() {
|
|
174
|
-
#pragma mapbox: initialize highp vec4 color
|
|
175
|
-
#pragma mapbox: initialize lowp float opacity
|
|
176
|
-
gl_Position=projectTile(a_pos+u_fill_translate,a_pos);}`),fillOutline:tr(`in vec2 v_pos;
|
|
177
|
-
#ifdef GLOBE
|
|
178
|
-
in float v_depth;
|
|
179
|
-
#endif
|
|
180
|
-
#pragma mapbox: define highp vec4 outline_color
|
|
181
|
-
#pragma mapbox: define lowp float opacity
|
|
182
|
-
void main() {
|
|
183
|
-
#pragma mapbox: initialize highp vec4 outline_color
|
|
184
|
-
#pragma mapbox: initialize lowp float opacity
|
|
185
|
-
float dist=length(v_pos-gl_FragCoord.xy);float alpha=1.0-smoothstep(0.0,1.0,dist);fragColor=outline_color*(alpha*opacity);
|
|
186
|
-
#ifdef GLOBE
|
|
187
|
-
if (v_depth > 1.0) {discard;}
|
|
188
|
-
#endif
|
|
189
|
-
#ifdef OVERDRAW_INSPECTOR
|
|
190
|
-
fragColor=vec4(1.0);
|
|
191
|
-
#endif
|
|
192
|
-
}`,`uniform vec2 u_world;uniform vec2 u_fill_translate;in vec2 a_pos;out vec2 v_pos;
|
|
193
|
-
#ifdef GLOBE
|
|
194
|
-
out float v_depth;
|
|
195
|
-
#endif
|
|
196
|
-
#pragma mapbox: define highp vec4 outline_color
|
|
197
|
-
#pragma mapbox: define lowp float opacity
|
|
198
|
-
void main() {
|
|
199
|
-
#pragma mapbox: initialize highp vec4 outline_color
|
|
200
|
-
#pragma mapbox: initialize lowp float opacity
|
|
201
|
-
gl_Position=projectTile(a_pos+u_fill_translate,a_pos);v_pos=(gl_Position.xy/gl_Position.w+1.0)/2.0*u_world;
|
|
202
|
-
#ifdef GLOBE
|
|
203
|
-
v_depth=gl_Position.z/gl_Position.w;
|
|
204
|
-
#endif
|
|
205
|
-
}`),fillOutlinePattern:tr(`uniform vec2 u_texsize;uniform sampler2D u_image;uniform float u_fade;in vec2 v_pos_a;in vec2 v_pos_b;in vec2 v_pos;
|
|
206
|
-
#ifdef GLOBE
|
|
207
|
-
in float v_depth;
|
|
208
|
-
#endif
|
|
209
|
-
#pragma mapbox: define lowp float opacity
|
|
210
|
-
#pragma mapbox: define lowp vec4 pattern_from
|
|
211
|
-
#pragma mapbox: define lowp vec4 pattern_to
|
|
212
|
-
void main() {
|
|
213
|
-
#pragma mapbox: initialize lowp float opacity
|
|
214
|
-
#pragma mapbox: initialize mediump vec4 pattern_from
|
|
215
|
-
#pragma mapbox: initialize mediump vec4 pattern_to
|
|
216
|
-
vec2 pattern_tl_a=pattern_from.xy;vec2 pattern_br_a=pattern_from.zw;vec2 pattern_tl_b=pattern_to.xy;vec2 pattern_br_b=pattern_to.zw;vec2 imagecoord=mod(v_pos_a,1.0);vec2 pos=mix(pattern_tl_a/u_texsize,pattern_br_a/u_texsize,imagecoord);vec4 color1=texture(u_image,pos);vec2 imagecoord_b=mod(v_pos_b,1.0);vec2 pos2=mix(pattern_tl_b/u_texsize,pattern_br_b/u_texsize,imagecoord_b);vec4 color2=texture(u_image,pos2);float dist=length(v_pos-gl_FragCoord.xy);float alpha=1.0-smoothstep(0.0,1.0,dist);fragColor=mix(color1,color2,u_fade)*alpha*opacity;
|
|
217
|
-
#ifdef GLOBE
|
|
218
|
-
if (v_depth > 1.0) {discard;}
|
|
219
|
-
#endif
|
|
220
|
-
#ifdef OVERDRAW_INSPECTOR
|
|
221
|
-
fragColor=vec4(1.0);
|
|
222
|
-
#endif
|
|
223
|
-
}`,`uniform vec2 u_world;uniform vec2 u_pixel_coord_upper;uniform vec2 u_pixel_coord_lower;uniform vec3 u_scale;uniform vec2 u_fill_translate;in vec2 a_pos;out vec2 v_pos_a;out vec2 v_pos_b;out vec2 v_pos;
|
|
224
|
-
#ifdef GLOBE
|
|
225
|
-
out float v_depth;
|
|
226
|
-
#endif
|
|
227
|
-
#pragma mapbox: define lowp float opacity
|
|
228
|
-
#pragma mapbox: define lowp vec4 pattern_from
|
|
229
|
-
#pragma mapbox: define lowp vec4 pattern_to
|
|
230
|
-
#pragma mapbox: define lowp float pixel_ratio_from
|
|
231
|
-
#pragma mapbox: define lowp float pixel_ratio_to
|
|
232
|
-
void main() {
|
|
233
|
-
#pragma mapbox: initialize lowp float opacity
|
|
234
|
-
#pragma mapbox: initialize mediump vec4 pattern_from
|
|
235
|
-
#pragma mapbox: initialize mediump vec4 pattern_to
|
|
236
|
-
#pragma mapbox: initialize lowp float pixel_ratio_from
|
|
237
|
-
#pragma mapbox: initialize lowp float pixel_ratio_to
|
|
238
|
-
vec2 pattern_tl_a=pattern_from.xy;vec2 pattern_br_a=pattern_from.zw;vec2 pattern_tl_b=pattern_to.xy;vec2 pattern_br_b=pattern_to.zw;float tileRatio=u_scale.x;float fromScale=u_scale.y;float toScale=u_scale.z;gl_Position=projectTile(a_pos+u_fill_translate,a_pos);vec2 display_size_a=(pattern_br_a-pattern_tl_a)/pixel_ratio_from;vec2 display_size_b=(pattern_br_b-pattern_tl_b)/pixel_ratio_to;v_pos_a=get_pattern_pos(u_pixel_coord_upper,u_pixel_coord_lower,fromScale*display_size_a,tileRatio,a_pos);v_pos_b=get_pattern_pos(u_pixel_coord_upper,u_pixel_coord_lower,toScale*display_size_b,tileRatio,a_pos);v_pos=(gl_Position.xy/gl_Position.w+1.0)/2.0*u_world;
|
|
239
|
-
#ifdef GLOBE
|
|
240
|
-
v_depth=gl_Position.z/gl_Position.w;
|
|
241
|
-
#endif
|
|
242
|
-
}`),fillPattern:tr(`#ifdef GL_ES
|
|
243
|
-
precision highp float;
|
|
244
|
-
#endif
|
|
245
|
-
uniform vec2 u_texsize;uniform float u_fade;uniform sampler2D u_image;in vec2 v_pos_a;in vec2 v_pos_b;
|
|
246
|
-
#pragma mapbox: define lowp float opacity
|
|
247
|
-
#pragma mapbox: define lowp vec4 pattern_from
|
|
248
|
-
#pragma mapbox: define lowp vec4 pattern_to
|
|
249
|
-
void main() {
|
|
250
|
-
#pragma mapbox: initialize lowp float opacity
|
|
251
|
-
#pragma mapbox: initialize mediump vec4 pattern_from
|
|
252
|
-
#pragma mapbox: initialize mediump vec4 pattern_to
|
|
253
|
-
vec2 pattern_tl_a=pattern_from.xy;vec2 pattern_br_a=pattern_from.zw;vec2 pattern_tl_b=pattern_to.xy;vec2 pattern_br_b=pattern_to.zw;vec2 imagecoord=mod(v_pos_a,1.0);vec2 pos=mix(pattern_tl_a/u_texsize,pattern_br_a/u_texsize,imagecoord);vec4 color1=texture(u_image,pos);vec2 imagecoord_b=mod(v_pos_b,1.0);vec2 pos2=mix(pattern_tl_b/u_texsize,pattern_br_b/u_texsize,imagecoord_b);vec4 color2=texture(u_image,pos2);fragColor=mix(color1,color2,u_fade)*opacity;
|
|
254
|
-
#ifdef OVERDRAW_INSPECTOR
|
|
255
|
-
fragColor=vec4(1.0);
|
|
256
|
-
#endif
|
|
257
|
-
}`,`uniform vec2 u_pixel_coord_upper;uniform vec2 u_pixel_coord_lower;uniform vec3 u_scale;uniform vec2 u_fill_translate;in vec2 a_pos;out vec2 v_pos_a;out vec2 v_pos_b;
|
|
258
|
-
#pragma mapbox: define lowp float opacity
|
|
259
|
-
#pragma mapbox: define lowp vec4 pattern_from
|
|
260
|
-
#pragma mapbox: define lowp vec4 pattern_to
|
|
261
|
-
#pragma mapbox: define lowp float pixel_ratio_from
|
|
262
|
-
#pragma mapbox: define lowp float pixel_ratio_to
|
|
263
|
-
void main() {
|
|
264
|
-
#pragma mapbox: initialize lowp float opacity
|
|
265
|
-
#pragma mapbox: initialize mediump vec4 pattern_from
|
|
266
|
-
#pragma mapbox: initialize mediump vec4 pattern_to
|
|
267
|
-
#pragma mapbox: initialize lowp float pixel_ratio_from
|
|
268
|
-
#pragma mapbox: initialize lowp float pixel_ratio_to
|
|
269
|
-
vec2 pattern_tl_a=pattern_from.xy;vec2 pattern_br_a=pattern_from.zw;vec2 pattern_tl_b=pattern_to.xy;vec2 pattern_br_b=pattern_to.zw;float tileZoomRatio=u_scale.x;float fromScale=u_scale.y;float toScale=u_scale.z;vec2 display_size_a=(pattern_br_a-pattern_tl_a)/pixel_ratio_from;vec2 display_size_b=(pattern_br_b-pattern_tl_b)/pixel_ratio_to;gl_Position=projectTile(a_pos+u_fill_translate,a_pos);v_pos_a=get_pattern_pos(u_pixel_coord_upper,u_pixel_coord_lower,fromScale*display_size_a,tileZoomRatio,a_pos);v_pos_b=get_pattern_pos(u_pixel_coord_upper,u_pixel_coord_lower,toScale*display_size_b,tileZoomRatio,a_pos);}`),fillExtrusion:tr(`in vec4 v_color;void main() {fragColor=v_color;
|
|
270
|
-
#ifdef OVERDRAW_INSPECTOR
|
|
271
|
-
fragColor=vec4(1.0);
|
|
272
|
-
#endif
|
|
273
|
-
}`,`uniform vec3 u_lightcolor;uniform lowp vec3 u_lightpos;uniform lowp vec3 u_lightpos_globe;uniform lowp float u_lightintensity;uniform float u_vertical_gradient;uniform lowp float u_opacity;uniform vec2 u_fill_translate;in vec2 a_pos;in vec4 a_normal_ed;
|
|
274
|
-
#ifdef TERRAIN3D
|
|
275
|
-
in vec2 a_centroid;
|
|
276
|
-
#endif
|
|
277
|
-
out vec4 v_color;
|
|
278
|
-
#pragma mapbox: define highp float base
|
|
279
|
-
#pragma mapbox: define highp float height
|
|
280
|
-
#pragma mapbox: define highp vec4 color
|
|
281
|
-
void main() {
|
|
282
|
-
#pragma mapbox: initialize highp float base
|
|
283
|
-
#pragma mapbox: initialize highp float height
|
|
284
|
-
#pragma mapbox: initialize highp vec4 color
|
|
285
|
-
vec3 normal=a_normal_ed.xyz;
|
|
286
|
-
#ifdef TERRAIN3D
|
|
287
|
-
float height_terrain3d_offset=get_elevation(a_centroid);float base_terrain3d_offset=height_terrain3d_offset-(base > 0.0 ? 0.0 : 10.0);
|
|
288
|
-
#else
|
|
289
|
-
float height_terrain3d_offset=0.0;float base_terrain3d_offset=0.0;
|
|
290
|
-
#endif
|
|
291
|
-
base=max(0.0,base)+base_terrain3d_offset;height=max(0.0,height)+height_terrain3d_offset;float t=mod(normal.x,2.0);float elevation=t > 0.0 ? height : base;vec2 posInTile=a_pos+u_fill_translate;
|
|
292
|
-
#ifdef GLOBE
|
|
293
|
-
vec3 spherePos=projectToSphere(posInTile,a_pos);gl_Position=interpolateProjectionFor3D(posInTile,spherePos,elevation);
|
|
294
|
-
#else
|
|
295
|
-
gl_Position=u_projection_matrix*vec4(posInTile,elevation,1.0);
|
|
296
|
-
#endif
|
|
297
|
-
float colorvalue=color.r*0.2126+color.g*0.7152+color.b*0.0722;v_color=vec4(0.0,0.0,0.0,1.0);vec4 ambientlight=vec4(0.03,0.03,0.03,1.0);color+=ambientlight;vec3 normalForLighting=normal/16384.0;float directional=clamp(dot(normalForLighting,u_lightpos),0.0,1.0);
|
|
298
|
-
#ifdef GLOBE
|
|
299
|
-
mat3 rotMatrix=globeGetRotationMatrix(spherePos);normalForLighting=rotMatrix*normalForLighting;directional=mix(directional,clamp(dot(normalForLighting,u_lightpos_globe),0.0,1.0),u_projection_transition);
|
|
300
|
-
#endif
|
|
301
|
-
directional=mix((1.0-u_lightintensity),max((1.0-colorvalue+u_lightintensity),1.0),directional);if (normal.y !=0.0) {directional*=((1.0-u_vertical_gradient)+(u_vertical_gradient*clamp((t+base)*pow(height/150.0,0.5),mix(0.7,0.98,1.0-u_lightintensity),1.0)));}v_color.r+=clamp(color.r*directional*u_lightcolor.r,mix(0.0,0.3,1.0-u_lightcolor.r),1.0);v_color.g+=clamp(color.g*directional*u_lightcolor.g,mix(0.0,0.3,1.0-u_lightcolor.g),1.0);v_color.b+=clamp(color.b*directional*u_lightcolor.b,mix(0.0,0.3,1.0-u_lightcolor.b),1.0);v_color*=u_opacity;}`),fillExtrusionPattern:tr(`uniform vec2 u_texsize;uniform float u_fade;uniform sampler2D u_image;in vec2 v_pos_a;in vec2 v_pos_b;in vec4 v_lighting;
|
|
302
|
-
#pragma mapbox: define lowp float base
|
|
303
|
-
#pragma mapbox: define lowp float height
|
|
304
|
-
#pragma mapbox: define lowp vec4 pattern_from
|
|
305
|
-
#pragma mapbox: define lowp vec4 pattern_to
|
|
306
|
-
#pragma mapbox: define lowp float pixel_ratio_from
|
|
307
|
-
#pragma mapbox: define lowp float pixel_ratio_to
|
|
308
|
-
void main() {
|
|
309
|
-
#pragma mapbox: initialize lowp float base
|
|
310
|
-
#pragma mapbox: initialize lowp float height
|
|
311
|
-
#pragma mapbox: initialize mediump vec4 pattern_from
|
|
312
|
-
#pragma mapbox: initialize mediump vec4 pattern_to
|
|
313
|
-
#pragma mapbox: initialize lowp float pixel_ratio_from
|
|
314
|
-
#pragma mapbox: initialize lowp float pixel_ratio_to
|
|
315
|
-
vec2 pattern_tl_a=pattern_from.xy;vec2 pattern_br_a=pattern_from.zw;vec2 pattern_tl_b=pattern_to.xy;vec2 pattern_br_b=pattern_to.zw;vec2 imagecoord=mod(v_pos_a,1.0);vec2 pos=mix(pattern_tl_a/u_texsize,pattern_br_a/u_texsize,imagecoord);vec4 color1=texture(u_image,pos);vec2 imagecoord_b=mod(v_pos_b,1.0);vec2 pos2=mix(pattern_tl_b/u_texsize,pattern_br_b/u_texsize,imagecoord_b);vec4 color2=texture(u_image,pos2);vec4 mixedColor=mix(color1,color2,u_fade);fragColor=mixedColor*v_lighting;
|
|
316
|
-
#ifdef OVERDRAW_INSPECTOR
|
|
317
|
-
fragColor=vec4(1.0);
|
|
318
|
-
#endif
|
|
319
|
-
}`,`uniform vec2 u_pixel_coord_upper;uniform vec2 u_pixel_coord_lower;uniform float u_height_factor;uniform vec3 u_scale;uniform float u_vertical_gradient;uniform lowp float u_opacity;uniform vec2 u_fill_translate;uniform vec3 u_lightcolor;uniform lowp vec3 u_lightpos;uniform lowp vec3 u_lightpos_globe;uniform lowp float u_lightintensity;in vec2 a_pos;in vec4 a_normal_ed;
|
|
320
|
-
#ifdef TERRAIN3D
|
|
321
|
-
in vec2 a_centroid;
|
|
322
|
-
#endif
|
|
323
|
-
#ifdef GLOBE
|
|
324
|
-
out vec3 v_sphere_pos;
|
|
325
|
-
#endif
|
|
326
|
-
out vec2 v_pos_a;out vec2 v_pos_b;out vec4 v_lighting;
|
|
327
|
-
#pragma mapbox: define lowp float base
|
|
328
|
-
#pragma mapbox: define lowp float height
|
|
329
|
-
#pragma mapbox: define lowp vec4 pattern_from
|
|
330
|
-
#pragma mapbox: define lowp vec4 pattern_to
|
|
331
|
-
#pragma mapbox: define lowp float pixel_ratio_from
|
|
332
|
-
#pragma mapbox: define lowp float pixel_ratio_to
|
|
333
|
-
void main() {
|
|
334
|
-
#pragma mapbox: initialize lowp float base
|
|
335
|
-
#pragma mapbox: initialize lowp float height
|
|
336
|
-
#pragma mapbox: initialize mediump vec4 pattern_from
|
|
337
|
-
#pragma mapbox: initialize mediump vec4 pattern_to
|
|
338
|
-
#pragma mapbox: initialize lowp float pixel_ratio_from
|
|
339
|
-
#pragma mapbox: initialize lowp float pixel_ratio_to
|
|
340
|
-
vec2 pattern_tl_a=pattern_from.xy;vec2 pattern_br_a=pattern_from.zw;vec2 pattern_tl_b=pattern_to.xy;vec2 pattern_br_b=pattern_to.zw;float tileRatio=u_scale.x;float fromScale=u_scale.y;float toScale=u_scale.z;vec3 normal=a_normal_ed.xyz;float edgedistance=a_normal_ed.w;vec2 display_size_a=(pattern_br_a-pattern_tl_a)/pixel_ratio_from;vec2 display_size_b=(pattern_br_b-pattern_tl_b)/pixel_ratio_to;
|
|
341
|
-
#ifdef TERRAIN3D
|
|
342
|
-
float height_terrain3d_offset=get_elevation(a_centroid);float base_terrain3d_offset=height_terrain3d_offset-(base > 0.0 ? 0.0 : 10.0);
|
|
343
|
-
#else
|
|
344
|
-
float height_terrain3d_offset=0.0;float base_terrain3d_offset=0.0;
|
|
345
|
-
#endif
|
|
346
|
-
base=max(0.0,base)+base_terrain3d_offset;height=max(0.0,height)+height_terrain3d_offset;float t=mod(normal.x,2.0);float elevation=t > 0.0 ? height : base;vec2 posInTile=a_pos+u_fill_translate;
|
|
347
|
-
#ifdef GLOBE
|
|
348
|
-
vec3 spherePos=projectToSphere(posInTile,a_pos);vec3 elevatedPos=spherePos*(1.0+elevation/GLOBE_RADIUS);v_sphere_pos=elevatedPos;gl_Position=interpolateProjectionFor3D(posInTile,spherePos,elevation);
|
|
349
|
-
#else
|
|
350
|
-
gl_Position=u_projection_matrix*vec4(posInTile,elevation,1.0);
|
|
351
|
-
#endif
|
|
352
|
-
vec2 pos=normal.x==1.0 && normal.y==0.0 && normal.z==16384.0
|
|
353
|
-
? a_pos
|
|
354
|
-
: vec2(edgedistance,elevation*u_height_factor);v_pos_a=get_pattern_pos(u_pixel_coord_upper,u_pixel_coord_lower,fromScale*display_size_a,tileRatio,pos);v_pos_b=get_pattern_pos(u_pixel_coord_upper,u_pixel_coord_lower,toScale*display_size_b,tileRatio,pos);v_lighting=vec4(0.0,0.0,0.0,1.0);float directional=clamp(dot(normal/16383.0,u_lightpos),0.0,1.0);directional=mix((1.0-u_lightintensity),max((0.5+u_lightintensity),1.0),directional);if (normal.y !=0.0) {directional*=((1.0-u_vertical_gradient)+(u_vertical_gradient*clamp((t+base)*pow(height/150.0,0.5),mix(0.7,0.98,1.0-u_lightintensity),1.0)));}v_lighting.rgb+=clamp(directional*u_lightcolor,mix(vec3(0.0),vec3(0.3),1.0-u_lightcolor),vec3(1.0));v_lighting*=u_opacity;}`),hillshadePrepare:tr(`#ifdef GL_ES
|
|
355
|
-
precision highp float;
|
|
356
|
-
#endif
|
|
357
|
-
uniform sampler2D u_image;in vec2 v_pos;uniform vec2 u_dimension;uniform float u_zoom;uniform vec4 u_unpack;float getElevation(vec2 coord,float bias) {vec4 data=texture(u_image,coord)*255.0;data.a=-1.0;return dot(data,u_unpack);}void main() {vec2 epsilon=1.0/u_dimension;float tileSize=u_dimension.x-2.0;float a=getElevation(v_pos+vec2(-epsilon.x,-epsilon.y),0.0);float b=getElevation(v_pos+vec2(0,-epsilon.y),0.0);float c=getElevation(v_pos+vec2(epsilon.x,-epsilon.y),0.0);float d=getElevation(v_pos+vec2(-epsilon.x,0),0.0);float e=getElevation(v_pos,0.0);float f=getElevation(v_pos+vec2(epsilon.x,0),0.0);float g=getElevation(v_pos+vec2(-epsilon.x,epsilon.y),0.0);float h=getElevation(v_pos+vec2(0,epsilon.y),0.0);float i=getElevation(v_pos+vec2(epsilon.x,epsilon.y),0.0);float exaggerationFactor=u_zoom < 2.0 ? 0.4 : u_zoom < 4.5 ? 0.35 : 0.3;float exaggeration=u_zoom < 15.0 ? (u_zoom-15.0)*exaggerationFactor : 0.0;vec2 deriv=vec2((c+f+f+i)-(a+d+d+g),(g+h+h+i)-(a+b+b+c))*tileSize/pow(2.0,exaggeration+(28.2562-u_zoom));fragColor=clamp(vec4(deriv.x/8.0+0.5,deriv.y/8.0+0.5,1.0,1.0),0.0,1.0);
|
|
358
|
-
#ifdef OVERDRAW_INSPECTOR
|
|
359
|
-
fragColor=vec4(1.0);
|
|
360
|
-
#endif
|
|
361
|
-
}`,"uniform mat4 u_matrix;uniform vec2 u_dimension;in vec2 a_pos;in vec2 a_texture_pos;out vec2 v_pos;void main() {gl_Position=u_matrix*vec4(a_pos,0,1);highp vec2 epsilon=1.0/u_dimension;float scale=(u_dimension.x-2.0)/u_dimension.x;v_pos=(a_texture_pos/8192.0)*scale+epsilon;}"),hillshade:tr(`uniform sampler2D u_image;in vec2 v_pos;uniform vec2 u_latrange;uniform float u_exaggeration;uniform vec4 u_accent;uniform int u_method;uniform float u_altitudes[NUM_ILLUMINATION_SOURCES];uniform float u_azimuths[NUM_ILLUMINATION_SOURCES];uniform vec4 u_shadows[NUM_ILLUMINATION_SOURCES];uniform vec4 u_highlights[NUM_ILLUMINATION_SOURCES];
|
|
362
|
-
#define PI 3.141592653589793
|
|
363
|
-
#define STANDARD 0
|
|
364
|
-
#define COMBINED 1
|
|
365
|
-
#define IGOR 2
|
|
366
|
-
#define MULTIDIRECTIONAL 3
|
|
367
|
-
#define BASIC 4
|
|
368
|
-
float get_aspect(vec2 deriv){return deriv.x !=0.0 ? atan(deriv.y,-deriv.x) : PI/2.0*(deriv.y > 0.0 ? 1.0 :-1.0);}void igor_hillshade(vec2 deriv){deriv=deriv*u_exaggeration*2.0;float aspect=get_aspect(deriv);float azimuth=u_azimuths[0]+PI;float slope_stength=atan(length(deriv))*2.0/PI;float aspect_strength=1.0-abs(mod((aspect+azimuth)/PI+0.5,2.0)-1.0);float shadow_strength=slope_stength*aspect_strength;float highlight_strength=slope_stength*(1.0-aspect_strength);fragColor=u_shadows[0]*shadow_strength+u_highlights[0]*highlight_strength;}void standard_hillshade(vec2 deriv){float azimuth=u_azimuths[0]+PI;float slope=atan(0.625*length(deriv));float aspect=get_aspect(deriv);float intensity=u_exaggeration;float base=1.875-intensity*1.75;float maxValue=0.5*PI;float scaledSlope=intensity !=0.5 ? ((pow(base,slope)-1.0)/(pow(base,maxValue)-1.0))*maxValue : slope;float accent=cos(scaledSlope);vec4 accent_color=(1.0-accent)*u_accent*clamp(intensity*2.0,0.0,1.0);float shade=abs(mod((aspect+azimuth)/PI+0.5,2.0)-1.0);vec4 shade_color=mix(u_shadows[0],u_highlights[0],shade)*sin(scaledSlope)*clamp(intensity*2.0,0.0,1.0);fragColor=accent_color*(1.0-shade_color.a)+shade_color;}void basic_hillshade(vec2 deriv){deriv=deriv*u_exaggeration*2.0;float azimuth=u_azimuths[0]+PI;float cos_az=cos(azimuth);float sin_az=sin(azimuth);float cos_alt=cos(u_altitudes[0]);float sin_alt=sin(u_altitudes[0]);float cang=(sin_alt-(deriv.y*cos_az*cos_alt-deriv.x*sin_az*cos_alt))/sqrt(1.0+dot(deriv,deriv));float shade=clamp(cang,0.0,1.0);if(shade > 0.5){fragColor=u_highlights[0]*(2.0*shade-1.0);}else
|
|
369
|
-
{fragColor=u_shadows[0]*(1.0-2.0*shade);}}void multidirectional_hillshade(vec2 deriv){deriv=deriv*u_exaggeration*2.0;fragColor=vec4(0,0,0,0);for(int i=0; i < NUM_ILLUMINATION_SOURCES; i++){float cos_alt=cos(u_altitudes[i]);float sin_alt=sin(u_altitudes[i]);float cos_az=-cos(u_azimuths[i]);float sin_az=-sin(u_azimuths[i]);float cang=(sin_alt-(deriv.y*cos_az*cos_alt-deriv.x*sin_az*cos_alt))/sqrt(1.0+dot(deriv,deriv));float shade=clamp(cang,0.0,1.0);if(shade > 0.5){fragColor+=u_highlights[i]*(2.0*shade-1.0)/float(NUM_ILLUMINATION_SOURCES);}else
|
|
370
|
-
{fragColor+=u_shadows[i]*(1.0-2.0*shade)/float(NUM_ILLUMINATION_SOURCES);}}}void combined_hillshade(vec2 deriv){deriv=deriv*u_exaggeration*2.0;float azimuth=u_azimuths[0]+PI;float cos_az=cos(azimuth);float sin_az=sin(azimuth);float cos_alt=cos(u_altitudes[0]);float sin_alt=sin(u_altitudes[0]);float cang=acos((sin_alt-(deriv.y*cos_az*cos_alt-deriv.x*sin_az*cos_alt))/sqrt(1.0+dot(deriv,deriv)));cang=clamp(cang,0.0,PI/2.0);float shade=cang*atan(length(deriv))*4.0/PI/PI;float highlight=(PI/2.0-cang)*atan(length(deriv))*4.0/PI/PI;fragColor=u_shadows[0]*shade+u_highlights[0]*highlight;}void main() {vec4 pixel=texture(u_image,v_pos);float scaleFactor=cos(radians((u_latrange[0]-u_latrange[1])*(1.0-v_pos.y)+u_latrange[1]));vec2 deriv=((pixel.rg*8.0)-4.0)/scaleFactor;switch(u_method){case BASIC:
|
|
371
|
-
basic_hillshade(deriv);break;case COMBINED:
|
|
372
|
-
combined_hillshade(deriv);break;case IGOR:
|
|
373
|
-
igor_hillshade(deriv);break;case MULTIDIRECTIONAL:
|
|
374
|
-
multidirectional_hillshade(deriv);break;case STANDARD:
|
|
375
|
-
default:
|
|
376
|
-
standard_hillshade(deriv);break;}
|
|
377
|
-
#ifdef OVERDRAW_INSPECTOR
|
|
378
|
-
fragColor=vec4(1.0);
|
|
379
|
-
#endif
|
|
380
|
-
}`,"uniform mat4 u_matrix;in vec2 a_pos;out vec2 v_pos;void main() {gl_Position=projectTile(a_pos,a_pos);v_pos=a_pos/8192.0;if (a_pos.y <-32767.5) {v_pos.y=0.0;}if (a_pos.y > 32766.5) {v_pos.y=1.0;}}"),line:tr(`uniform lowp float u_device_pixel_ratio;in vec2 v_width2;in vec2 v_normal;in float v_gamma_scale;
|
|
381
|
-
#ifdef GLOBE
|
|
382
|
-
in float v_depth;
|
|
383
|
-
#endif
|
|
384
|
-
#pragma mapbox: define highp vec4 color
|
|
385
|
-
#pragma mapbox: define lowp float blur
|
|
386
|
-
#pragma mapbox: define lowp float opacity
|
|
387
|
-
void main() {
|
|
388
|
-
#pragma mapbox: initialize highp vec4 color
|
|
389
|
-
#pragma mapbox: initialize lowp float blur
|
|
390
|
-
#pragma mapbox: initialize lowp float opacity
|
|
391
|
-
float dist=length(v_normal)*v_width2.s;float blur2=(blur+1.0/u_device_pixel_ratio)*v_gamma_scale;float alpha=clamp(min(dist-(v_width2.t-blur2),v_width2.s-dist)/blur2,0.0,1.0);fragColor=color*(alpha*opacity);
|
|
392
|
-
#ifdef GLOBE
|
|
393
|
-
if (v_depth > 1.0) {discard;}
|
|
394
|
-
#endif
|
|
395
|
-
#ifdef OVERDRAW_INSPECTOR
|
|
396
|
-
fragColor=vec4(1.0);
|
|
397
|
-
#endif
|
|
398
|
-
}`,`
|
|
399
|
-
#define scale 0.015873016
|
|
400
|
-
in vec2 a_pos_normal;in vec4 a_data;uniform vec2 u_translation;uniform mediump float u_ratio;uniform vec2 u_units_to_pixels;uniform lowp float u_device_pixel_ratio;out vec2 v_normal;out vec2 v_width2;out float v_gamma_scale;out highp float v_linesofar;
|
|
401
|
-
#ifdef GLOBE
|
|
402
|
-
out float v_depth;
|
|
403
|
-
#endif
|
|
404
|
-
#pragma mapbox: define highp vec4 color
|
|
405
|
-
#pragma mapbox: define lowp float blur
|
|
406
|
-
#pragma mapbox: define lowp float opacity
|
|
407
|
-
#pragma mapbox: define mediump float gapwidth
|
|
408
|
-
#pragma mapbox: define lowp float offset
|
|
409
|
-
#pragma mapbox: define mediump float width
|
|
410
|
-
void main() {
|
|
411
|
-
#pragma mapbox: initialize highp vec4 color
|
|
412
|
-
#pragma mapbox: initialize lowp float blur
|
|
413
|
-
#pragma mapbox: initialize lowp float opacity
|
|
414
|
-
#pragma mapbox: initialize mediump float gapwidth
|
|
415
|
-
#pragma mapbox: initialize lowp float offset
|
|
416
|
-
#pragma mapbox: initialize mediump float width
|
|
417
|
-
float ANTIALIASING=1.0/u_device_pixel_ratio/2.0;vec2 a_extrude=a_data.xy-128.0;float a_direction=mod(a_data.z,4.0)-1.0;v_linesofar=(floor(a_data.z/4.0)+a_data.w*64.0)*2.0;vec2 pos=floor(a_pos_normal*0.5);mediump vec2 normal=a_pos_normal-2.0*pos;normal.y=normal.y*2.0-1.0;v_normal=normal;gapwidth=gapwidth/2.0;float halfwidth=width/2.0;offset=-1.0*offset;float inset=gapwidth+(gapwidth > 0.0 ? ANTIALIASING : 0.0);float outset=gapwidth+halfwidth*(gapwidth > 0.0 ? 2.0 : 1.0)+(halfwidth==0.0 ? 0.0 : ANTIALIASING);mediump vec2 dist=outset*a_extrude*scale;mediump float u=0.5*a_direction;mediump float t=1.0-abs(u);mediump vec2 offset2=offset*a_extrude*scale*normal.y*mat2(t,-u,u,t);float adjustedThickness=projectLineThickness(pos.y);vec4 projected_no_extrude=projectTile(pos+offset2/u_ratio*adjustedThickness+u_translation);vec4 projected_with_extrude=projectTile(pos+offset2/u_ratio*adjustedThickness+u_translation+dist/u_ratio*adjustedThickness);gl_Position=projected_with_extrude;
|
|
418
|
-
#ifdef GLOBE
|
|
419
|
-
v_depth=gl_Position.z/gl_Position.w;
|
|
420
|
-
#endif
|
|
421
|
-
#ifdef TERRAIN3D
|
|
422
|
-
v_gamma_scale=1.0;
|
|
423
|
-
#else
|
|
424
|
-
float extrude_length_without_perspective=length(dist);float extrude_length_with_perspective=length((projected_with_extrude.xy-projected_no_extrude.xy)/projected_with_extrude.w*u_units_to_pixels);v_gamma_scale=extrude_length_without_perspective/extrude_length_with_perspective;
|
|
425
|
-
#endif
|
|
426
|
-
v_width2=vec2(outset,inset);}`),lineGradient:tr(`uniform lowp float u_device_pixel_ratio;uniform sampler2D u_image;in vec2 v_width2;in vec2 v_normal;in float v_gamma_scale;in highp vec2 v_uv;
|
|
427
|
-
#ifdef GLOBE
|
|
428
|
-
in float v_depth;
|
|
429
|
-
#endif
|
|
430
|
-
#pragma mapbox: define lowp float blur
|
|
431
|
-
#pragma mapbox: define lowp float opacity
|
|
432
|
-
void main() {
|
|
433
|
-
#pragma mapbox: initialize lowp float blur
|
|
434
|
-
#pragma mapbox: initialize lowp float opacity
|
|
435
|
-
float dist=length(v_normal)*v_width2.s;float blur2=(blur+1.0/u_device_pixel_ratio)*v_gamma_scale;float alpha=clamp(min(dist-(v_width2.t-blur2),v_width2.s-dist)/blur2,0.0,1.0);vec4 color=texture(u_image,v_uv);fragColor=color*(alpha*opacity);
|
|
436
|
-
#ifdef GLOBE
|
|
437
|
-
if (v_depth > 1.0) {discard;}
|
|
438
|
-
#endif
|
|
439
|
-
#ifdef OVERDRAW_INSPECTOR
|
|
440
|
-
fragColor=vec4(1.0);
|
|
441
|
-
#endif
|
|
442
|
-
}`,`
|
|
443
|
-
#define scale 0.015873016
|
|
444
|
-
in vec2 a_pos_normal;in vec4 a_data;in float a_uv_x;in float a_split_index;uniform vec2 u_translation;uniform mediump float u_ratio;uniform lowp float u_device_pixel_ratio;uniform vec2 u_units_to_pixels;uniform float u_image_height;out vec2 v_normal;out vec2 v_width2;out float v_gamma_scale;out highp vec2 v_uv;
|
|
445
|
-
#ifdef GLOBE
|
|
446
|
-
out float v_depth;
|
|
447
|
-
#endif
|
|
448
|
-
#pragma mapbox: define lowp float blur
|
|
449
|
-
#pragma mapbox: define lowp float opacity
|
|
450
|
-
#pragma mapbox: define mediump float gapwidth
|
|
451
|
-
#pragma mapbox: define lowp float offset
|
|
452
|
-
#pragma mapbox: define mediump float width
|
|
453
|
-
void main() {
|
|
454
|
-
#pragma mapbox: initialize lowp float blur
|
|
455
|
-
#pragma mapbox: initialize lowp float opacity
|
|
456
|
-
#pragma mapbox: initialize mediump float gapwidth
|
|
457
|
-
#pragma mapbox: initialize lowp float offset
|
|
458
|
-
#pragma mapbox: initialize mediump float width
|
|
459
|
-
float ANTIALIASING=1.0/u_device_pixel_ratio/2.0;vec2 a_extrude=a_data.xy-128.0;float a_direction=mod(a_data.z,4.0)-1.0;highp float texel_height=1.0/u_image_height;highp float half_texel_height=0.5*texel_height;v_uv=vec2(a_uv_x,a_split_index*texel_height-half_texel_height);vec2 pos=floor(a_pos_normal*0.5);mediump vec2 normal=a_pos_normal-2.0*pos;normal.y=normal.y*2.0-1.0;v_normal=normal;gapwidth=gapwidth/2.0;float halfwidth=width/2.0;offset=-1.0*offset;float inset=gapwidth+(gapwidth > 0.0 ? ANTIALIASING : 0.0);float outset=gapwidth+halfwidth*(gapwidth > 0.0 ? 2.0 : 1.0)+(halfwidth==0.0 ? 0.0 : ANTIALIASING);mediump vec2 dist=outset*a_extrude*scale;mediump float u=0.5*a_direction;mediump float t=1.0-abs(u);mediump vec2 offset2=offset*a_extrude*scale*normal.y*mat2(t,-u,u,t);float adjustedThickness=projectLineThickness(pos.y);vec4 projected_no_extrude=projectTile(pos+offset2/u_ratio*adjustedThickness+u_translation);vec4 projected_with_extrude=projectTile(pos+offset2/u_ratio*adjustedThickness+u_translation+dist/u_ratio*adjustedThickness);gl_Position=projected_with_extrude;
|
|
460
|
-
#ifdef GLOBE
|
|
461
|
-
v_depth=gl_Position.z/gl_Position.w;
|
|
462
|
-
#endif
|
|
463
|
-
#ifdef TERRAIN3D
|
|
464
|
-
v_gamma_scale=1.0;
|
|
465
|
-
#else
|
|
466
|
-
float extrude_length_without_perspective=length(dist);float extrude_length_with_perspective=length((projected_with_extrude.xy-projected_no_extrude.xy)/projected_with_extrude.w*u_units_to_pixels);v_gamma_scale=extrude_length_without_perspective/extrude_length_with_perspective;
|
|
467
|
-
#endif
|
|
468
|
-
v_width2=vec2(outset,inset);}`),linePattern:tr(`#ifdef GL_ES
|
|
469
|
-
precision highp float;
|
|
470
|
-
#endif
|
|
471
|
-
uniform lowp float u_device_pixel_ratio;uniform vec2 u_texsize;uniform float u_fade;uniform mediump vec3 u_scale;uniform sampler2D u_image;in vec2 v_normal;in vec2 v_width2;in float v_linesofar;in float v_gamma_scale;in float v_width;
|
|
472
|
-
#ifdef GLOBE
|
|
473
|
-
in float v_depth;
|
|
474
|
-
#endif
|
|
475
|
-
#pragma mapbox: define lowp vec4 pattern_from
|
|
476
|
-
#pragma mapbox: define lowp vec4 pattern_to
|
|
477
|
-
#pragma mapbox: define lowp float pixel_ratio_from
|
|
478
|
-
#pragma mapbox: define lowp float pixel_ratio_to
|
|
479
|
-
#pragma mapbox: define lowp float blur
|
|
480
|
-
#pragma mapbox: define lowp float opacity
|
|
481
|
-
void main() {
|
|
482
|
-
#pragma mapbox: initialize mediump vec4 pattern_from
|
|
483
|
-
#pragma mapbox: initialize mediump vec4 pattern_to
|
|
484
|
-
#pragma mapbox: initialize lowp float pixel_ratio_from
|
|
485
|
-
#pragma mapbox: initialize lowp float pixel_ratio_to
|
|
486
|
-
#pragma mapbox: initialize lowp float blur
|
|
487
|
-
#pragma mapbox: initialize lowp float opacity
|
|
488
|
-
vec2 pattern_tl_a=pattern_from.xy;vec2 pattern_br_a=pattern_from.zw;vec2 pattern_tl_b=pattern_to.xy;vec2 pattern_br_b=pattern_to.zw;float tileZoomRatio=u_scale.x;float fromScale=u_scale.y;float toScale=u_scale.z;vec2 display_size_a=(pattern_br_a-pattern_tl_a)/pixel_ratio_from;vec2 display_size_b=(pattern_br_b-pattern_tl_b)/pixel_ratio_to;vec2 pattern_size_a=vec2(display_size_a.x*fromScale/tileZoomRatio,display_size_a.y);vec2 pattern_size_b=vec2(display_size_b.x*toScale/tileZoomRatio,display_size_b.y);float aspect_a=display_size_a.y/v_width;float aspect_b=display_size_b.y/v_width;float dist=length(v_normal)*v_width2.s;float blur2=(blur+1.0/u_device_pixel_ratio)*v_gamma_scale;float alpha=clamp(min(dist-(v_width2.t-blur2),v_width2.s-dist)/blur2,0.0,1.0);float x_a=mod(v_linesofar/pattern_size_a.x*aspect_a,1.0);float x_b=mod(v_linesofar/pattern_size_b.x*aspect_b,1.0);float y=0.5*v_normal.y+0.5;vec2 texel_size=1.0/u_texsize;vec2 pos_a=mix(pattern_tl_a*texel_size-texel_size,pattern_br_a*texel_size+texel_size,vec2(x_a,y));vec2 pos_b=mix(pattern_tl_b*texel_size-texel_size,pattern_br_b*texel_size+texel_size,vec2(x_b,y));vec4 color=mix(texture(u_image,pos_a),texture(u_image,pos_b),u_fade);fragColor=color*alpha*opacity;
|
|
489
|
-
#ifdef GLOBE
|
|
490
|
-
if (v_depth > 1.0) {discard;}
|
|
491
|
-
#endif
|
|
492
|
-
#ifdef OVERDRAW_INSPECTOR
|
|
493
|
-
fragColor=vec4(1.0);
|
|
494
|
-
#endif
|
|
495
|
-
}`,`
|
|
496
|
-
#define scale 0.015873016
|
|
497
|
-
#define LINE_DISTANCE_SCALE 2.0
|
|
498
|
-
in vec2 a_pos_normal;in vec4 a_data;uniform vec2 u_translation;uniform vec2 u_units_to_pixels;uniform mediump float u_ratio;uniform lowp float u_device_pixel_ratio;out vec2 v_normal;out vec2 v_width2;out float v_linesofar;out float v_gamma_scale;out float v_width;
|
|
499
|
-
#ifdef GLOBE
|
|
500
|
-
out float v_depth;
|
|
501
|
-
#endif
|
|
502
|
-
#pragma mapbox: define lowp float blur
|
|
503
|
-
#pragma mapbox: define lowp float opacity
|
|
504
|
-
#pragma mapbox: define lowp float offset
|
|
505
|
-
#pragma mapbox: define mediump float gapwidth
|
|
506
|
-
#pragma mapbox: define mediump float width
|
|
507
|
-
#pragma mapbox: define lowp float floorwidth
|
|
508
|
-
#pragma mapbox: define lowp vec4 pattern_from
|
|
509
|
-
#pragma mapbox: define lowp vec4 pattern_to
|
|
510
|
-
#pragma mapbox: define lowp float pixel_ratio_from
|
|
511
|
-
#pragma mapbox: define lowp float pixel_ratio_to
|
|
512
|
-
void main() {
|
|
513
|
-
#pragma mapbox: initialize lowp float blur
|
|
514
|
-
#pragma mapbox: initialize lowp float opacity
|
|
515
|
-
#pragma mapbox: initialize lowp float offset
|
|
516
|
-
#pragma mapbox: initialize mediump float gapwidth
|
|
517
|
-
#pragma mapbox: initialize mediump float width
|
|
518
|
-
#pragma mapbox: initialize lowp float floorwidth
|
|
519
|
-
#pragma mapbox: initialize mediump vec4 pattern_from
|
|
520
|
-
#pragma mapbox: initialize mediump vec4 pattern_to
|
|
521
|
-
#pragma mapbox: initialize lowp float pixel_ratio_from
|
|
522
|
-
#pragma mapbox: initialize lowp float pixel_ratio_to
|
|
523
|
-
float ANTIALIASING=1.0/u_device_pixel_ratio/2.0;vec2 a_extrude=a_data.xy-128.0;float a_direction=mod(a_data.z,4.0)-1.0;float a_linesofar=(floor(a_data.z/4.0)+a_data.w*64.0)*LINE_DISTANCE_SCALE;vec2 pos=floor(a_pos_normal*0.5);mediump vec2 normal=a_pos_normal-2.0*pos;normal.y=normal.y*2.0-1.0;v_normal=normal;gapwidth=gapwidth/2.0;float halfwidth=width/2.0;offset=-1.0*offset;float inset=gapwidth+(gapwidth > 0.0 ? ANTIALIASING : 0.0);float outset=gapwidth+halfwidth*(gapwidth > 0.0 ? 2.0 : 1.0)+(halfwidth==0.0 ? 0.0 : ANTIALIASING);mediump vec2 dist=outset*a_extrude*scale;mediump float u=0.5*a_direction;mediump float t=1.0-abs(u);mediump vec2 offset2=offset*a_extrude*scale*normal.y*mat2(t,-u,u,t);float adjustedThickness=projectLineThickness(pos.y);vec4 projected_no_extrude=projectTile(pos+offset2/u_ratio*adjustedThickness+u_translation);vec4 projected_with_extrude=projectTile(pos+offset2/u_ratio*adjustedThickness+u_translation+dist/u_ratio*adjustedThickness);gl_Position=projected_with_extrude;
|
|
524
|
-
#ifdef GLOBE
|
|
525
|
-
v_depth=gl_Position.z/gl_Position.w;
|
|
526
|
-
#endif
|
|
527
|
-
#ifdef TERRAIN3D
|
|
528
|
-
v_gamma_scale=1.0;
|
|
529
|
-
#else
|
|
530
|
-
float extrude_length_without_perspective=length(dist);float extrude_length_with_perspective=length((projected_with_extrude.xy-projected_no_extrude.xy)/projected_with_extrude.w*u_units_to_pixels);v_gamma_scale=extrude_length_without_perspective/extrude_length_with_perspective;
|
|
531
|
-
#endif
|
|
532
|
-
v_linesofar=a_linesofar;v_width2=vec2(outset,inset);v_width=floorwidth;}`),lineSDF:tr(`uniform lowp float u_device_pixel_ratio;uniform sampler2D u_image;uniform float u_sdfgamma;uniform float u_mix;in vec2 v_normal;in vec2 v_width2;in vec2 v_tex_a;in vec2 v_tex_b;in float v_gamma_scale;
|
|
533
|
-
#ifdef GLOBE
|
|
534
|
-
in float v_depth;
|
|
535
|
-
#endif
|
|
536
|
-
#pragma mapbox: define highp vec4 color
|
|
537
|
-
#pragma mapbox: define lowp float blur
|
|
538
|
-
#pragma mapbox: define lowp float opacity
|
|
539
|
-
#pragma mapbox: define mediump float width
|
|
540
|
-
#pragma mapbox: define lowp float floorwidth
|
|
541
|
-
void main() {
|
|
542
|
-
#pragma mapbox: initialize highp vec4 color
|
|
543
|
-
#pragma mapbox: initialize lowp float blur
|
|
544
|
-
#pragma mapbox: initialize lowp float opacity
|
|
545
|
-
#pragma mapbox: initialize mediump float width
|
|
546
|
-
#pragma mapbox: initialize lowp float floorwidth
|
|
547
|
-
float dist=length(v_normal)*v_width2.s;float blur2=(blur+1.0/u_device_pixel_ratio)*v_gamma_scale;float alpha=clamp(min(dist-(v_width2.t-blur2),v_width2.s-dist)/blur2,0.0,1.0);float sdfdist_a=texture(u_image,v_tex_a).a;float sdfdist_b=texture(u_image,v_tex_b).a;float sdfdist=mix(sdfdist_a,sdfdist_b,u_mix);alpha*=smoothstep(0.5-u_sdfgamma/floorwidth,0.5+u_sdfgamma/floorwidth,sdfdist);fragColor=color*(alpha*opacity);
|
|
548
|
-
#ifdef GLOBE
|
|
549
|
-
if (v_depth > 1.0) {discard;}
|
|
550
|
-
#endif
|
|
551
|
-
#ifdef OVERDRAW_INSPECTOR
|
|
552
|
-
fragColor=vec4(1.0);
|
|
553
|
-
#endif
|
|
554
|
-
}`,`
|
|
555
|
-
#define scale 0.015873016
|
|
556
|
-
#define LINE_DISTANCE_SCALE 2.0
|
|
557
|
-
in vec2 a_pos_normal;in vec4 a_data;uniform vec2 u_translation;uniform mediump float u_ratio;uniform lowp float u_device_pixel_ratio;uniform vec2 u_patternscale_a;uniform float u_tex_y_a;uniform vec2 u_patternscale_b;uniform float u_tex_y_b;uniform vec2 u_units_to_pixels;out vec2 v_normal;out vec2 v_width2;out vec2 v_tex_a;out vec2 v_tex_b;out float v_gamma_scale;
|
|
558
|
-
#ifdef GLOBE
|
|
559
|
-
out float v_depth;
|
|
560
|
-
#endif
|
|
561
|
-
#pragma mapbox: define highp vec4 color
|
|
562
|
-
#pragma mapbox: define lowp float blur
|
|
563
|
-
#pragma mapbox: define lowp float opacity
|
|
564
|
-
#pragma mapbox: define mediump float gapwidth
|
|
565
|
-
#pragma mapbox: define lowp float offset
|
|
566
|
-
#pragma mapbox: define mediump float width
|
|
567
|
-
#pragma mapbox: define lowp float floorwidth
|
|
568
|
-
void main() {
|
|
569
|
-
#pragma mapbox: initialize highp vec4 color
|
|
570
|
-
#pragma mapbox: initialize lowp float blur
|
|
571
|
-
#pragma mapbox: initialize lowp float opacity
|
|
572
|
-
#pragma mapbox: initialize mediump float gapwidth
|
|
573
|
-
#pragma mapbox: initialize lowp float offset
|
|
574
|
-
#pragma mapbox: initialize mediump float width
|
|
575
|
-
#pragma mapbox: initialize lowp float floorwidth
|
|
576
|
-
float ANTIALIASING=1.0/u_device_pixel_ratio/2.0;vec2 a_extrude=a_data.xy-128.0;float a_direction=mod(a_data.z,4.0)-1.0;float a_linesofar=(floor(a_data.z/4.0)+a_data.w*64.0)*LINE_DISTANCE_SCALE;vec2 pos=floor(a_pos_normal*0.5);mediump vec2 normal=a_pos_normal-2.0*pos;normal.y=normal.y*2.0-1.0;v_normal=normal;gapwidth=gapwidth/2.0;float halfwidth=width/2.0;offset=-1.0*offset;float inset=gapwidth+(gapwidth > 0.0 ? ANTIALIASING : 0.0);float outset=gapwidth+halfwidth*(gapwidth > 0.0 ? 2.0 : 1.0)+(halfwidth==0.0 ? 0.0 : ANTIALIASING);mediump vec2 dist=outset*a_extrude*scale;mediump float u=0.5*a_direction;mediump float t=1.0-abs(u);mediump vec2 offset2=offset*a_extrude*scale*normal.y*mat2(t,-u,u,t);float adjustedThickness=projectLineThickness(pos.y);vec4 projected_no_extrude=projectTile(pos+offset2/u_ratio*adjustedThickness+u_translation);vec4 projected_with_extrude=projectTile(pos+offset2/u_ratio*adjustedThickness+u_translation+dist/u_ratio*adjustedThickness);gl_Position=projected_with_extrude;
|
|
577
|
-
#ifdef GLOBE
|
|
578
|
-
v_depth=gl_Position.z/gl_Position.w;
|
|
579
|
-
#endif
|
|
580
|
-
#ifdef TERRAIN3D
|
|
581
|
-
v_gamma_scale=1.0;
|
|
582
|
-
#else
|
|
583
|
-
float extrude_length_without_perspective=length(dist);float extrude_length_with_perspective=length((projected_with_extrude.xy-projected_no_extrude.xy)/projected_with_extrude.w*u_units_to_pixels);v_gamma_scale=extrude_length_without_perspective/extrude_length_with_perspective;
|
|
584
|
-
#endif
|
|
585
|
-
v_tex_a=vec2(a_linesofar*u_patternscale_a.x/floorwidth,normal.y*u_patternscale_a.y+u_tex_y_a);v_tex_b=vec2(a_linesofar*u_patternscale_b.x/floorwidth,normal.y*u_patternscale_b.y+u_tex_y_b);v_width2=vec2(outset,inset);}`),raster:tr(`uniform float u_fade_t;uniform float u_opacity;uniform sampler2D u_image0;uniform sampler2D u_image1;in vec2 v_pos0;in vec2 v_pos1;uniform float u_brightness_low;uniform float u_brightness_high;uniform float u_saturation_factor;uniform float u_contrast_factor;uniform vec3 u_spin_weights;void main() {vec4 color0=texture(u_image0,v_pos0);vec4 color1=texture(u_image1,v_pos1);if (color0.a > 0.0) {color0.rgb=color0.rgb/color0.a;}if (color1.a > 0.0) {color1.rgb=color1.rgb/color1.a;}vec4 color=mix(color0,color1,u_fade_t);color.a*=u_opacity;vec3 rgb=color.rgb;rgb=vec3(dot(rgb,u_spin_weights.xyz),dot(rgb,u_spin_weights.zxy),dot(rgb,u_spin_weights.yzx));float average=(color.r+color.g+color.b)/3.0;rgb+=(average-rgb)*u_saturation_factor;rgb=(rgb-0.5)*u_contrast_factor+0.5;vec3 u_high_vec=vec3(u_brightness_low,u_brightness_low,u_brightness_low);vec3 u_low_vec=vec3(u_brightness_high,u_brightness_high,u_brightness_high);fragColor=vec4(mix(u_high_vec,u_low_vec,rgb)*color.a,color.a);
|
|
586
|
-
#ifdef OVERDRAW_INSPECTOR
|
|
587
|
-
fragColor=vec4(1.0);
|
|
588
|
-
#endif
|
|
589
|
-
}`,`uniform vec2 u_tl_parent;uniform float u_scale_parent;uniform float u_buffer_scale;uniform vec4 u_coords_top;uniform vec4 u_coords_bottom;in vec2 a_pos;out vec2 v_pos0;out vec2 v_pos1;void main() {vec2 fractionalPos=a_pos/8192.0;vec2 position=mix(mix(u_coords_top.xy,u_coords_top.zw,fractionalPos.x),mix(u_coords_bottom.xy,u_coords_bottom.zw,fractionalPos.x),fractionalPos.y);gl_Position=projectTile(position,position);v_pos0=((fractionalPos-0.5)/u_buffer_scale)+0.5;
|
|
590
|
-
#ifdef GLOBE
|
|
591
|
-
if (a_pos.y <-32767.5) {v_pos0.y=0.0;}if (a_pos.y > 32766.5) {v_pos0.y=1.0;}
|
|
592
|
-
#endif
|
|
593
|
-
v_pos1=(v_pos0*u_scale_parent)+u_tl_parent;}`),symbolIcon:tr(`uniform sampler2D u_texture;in vec2 v_tex;in float v_fade_opacity;
|
|
594
|
-
#pragma mapbox: define lowp float opacity
|
|
595
|
-
void main() {
|
|
596
|
-
#pragma mapbox: initialize lowp float opacity
|
|
597
|
-
lowp float alpha=opacity*v_fade_opacity;fragColor=texture(u_texture,v_tex)*alpha;
|
|
598
|
-
#ifdef OVERDRAW_INSPECTOR
|
|
599
|
-
fragColor=vec4(1.0);
|
|
600
|
-
#endif
|
|
601
|
-
}`,`in vec4 a_pos_offset;in vec4 a_data;in vec4 a_pixeloffset;in vec3 a_projected_pos;in float a_fade_opacity;uniform bool u_is_size_zoom_constant;uniform bool u_is_size_feature_constant;uniform highp float u_size_t;uniform highp float u_size;uniform highp float u_camera_to_center_distance;uniform highp float u_pitch;uniform bool u_rotate_symbol;uniform highp float u_aspect_ratio;uniform float u_fade_change;uniform mat4 u_label_plane_matrix;uniform mat4 u_coord_matrix;uniform bool u_is_text;uniform bool u_pitch_with_map;uniform vec2 u_texsize;uniform bool u_is_along_line;uniform bool u_is_variable_anchor;uniform vec2 u_translation;uniform float u_pitched_scale;out vec2 v_tex;out float v_fade_opacity;
|
|
602
|
-
#pragma mapbox: define lowp float opacity
|
|
603
|
-
void main() {
|
|
604
|
-
#pragma mapbox: initialize lowp float opacity
|
|
605
|
-
vec2 a_pos=a_pos_offset.xy;vec2 a_offset=a_pos_offset.zw;vec2 a_tex=a_data.xy;vec2 a_size=a_data.zw;float a_size_min=floor(a_size[0]*0.5);vec2 a_pxoffset=a_pixeloffset.xy;vec2 a_minFontScale=a_pixeloffset.zw/256.0;float ele=get_elevation(a_pos);highp float segment_angle=-a_projected_pos[2];float size;if (!u_is_size_zoom_constant && !u_is_size_feature_constant) {size=mix(a_size_min,a_size[1],u_size_t)/128.0;} else if (u_is_size_zoom_constant && !u_is_size_feature_constant) {size=a_size_min/128.0;} else {size=u_size;}vec2 translated_a_pos=a_pos+u_translation;vec4 projectedPoint=projectTileWithElevation(translated_a_pos,ele);highp float camera_to_anchor_distance=projectedPoint.w;highp float distance_ratio=u_pitch_with_map ?
|
|
606
|
-
camera_to_anchor_distance/u_camera_to_center_distance :
|
|
607
|
-
u_camera_to_center_distance/camera_to_anchor_distance;highp float perspective_ratio=clamp(0.5+0.5*distance_ratio,0.0,4.0);size*=perspective_ratio;float fontScale=u_is_text ? size/24.0 : size;highp float symbol_rotation=0.0;if (u_rotate_symbol) {vec4 offsetProjectedPoint=projectTileWithElevation(translated_a_pos+vec2(1,0),ele);vec2 a=projectedPoint.xy/projectedPoint.w;vec2 b=offsetProjectedPoint.xy/offsetProjectedPoint.w;symbol_rotation=atan((b.y-a.y)/u_aspect_ratio,b.x-a.x);}highp float angle_sin=sin(segment_angle+symbol_rotation);highp float angle_cos=cos(segment_angle+symbol_rotation);mat2 rotation_matrix=mat2(angle_cos,-1.0*angle_sin,angle_sin,angle_cos);vec4 projected_pos;if (u_is_along_line || u_is_variable_anchor) {projected_pos=vec4(a_projected_pos.xy,ele,1.0);} else if (u_pitch_with_map) {projected_pos=u_label_plane_matrix*vec4(a_projected_pos.xy+u_translation,ele,1.0);} else {projected_pos=u_label_plane_matrix*projectTileWithElevation(a_projected_pos.xy+u_translation,ele);}float z=float(u_pitch_with_map)*projected_pos.z/projected_pos.w;float projectionScaling=1.0;
|
|
608
|
-
#ifdef GLOBE
|
|
609
|
-
if(u_pitch_with_map) {float anchor_pos_tile_y=(u_coord_matrix*vec4(projected_pos.xy/projected_pos.w,z,1.0)).y;projectionScaling=mix(projectionScaling,1.0/circumferenceRatioAtTileY(anchor_pos_tile_y)*u_pitched_scale,u_projection_transition);}
|
|
610
|
-
#endif
|
|
611
|
-
vec4 finalPos=u_coord_matrix*vec4(projected_pos.xy/projected_pos.w+rotation_matrix*(a_offset/32.0*max(a_minFontScale,fontScale)+a_pxoffset/16.0)*projectionScaling,z,1.0);if(u_pitch_with_map) {finalPos=projectTileWithElevation(finalPos.xy,finalPos.z);}gl_Position=finalPos;v_tex=a_tex/u_texsize;vec2 fade_opacity=unpack_opacity(a_fade_opacity);float fade_change=fade_opacity[1] > 0.5 ? u_fade_change :-u_fade_change;float visibility=calculate_visibility(projectedPoint);v_fade_opacity=max(0.0,min(visibility,fade_opacity[0]+fade_change));}`),symbolSDF:tr(`#define SDF_PX 8.0
|
|
612
|
-
uniform bool u_is_halo;uniform sampler2D u_texture;uniform highp float u_gamma_scale;uniform lowp float u_device_pixel_ratio;uniform bool u_is_text;in vec2 v_data0;in vec3 v_data1;
|
|
613
|
-
#pragma mapbox: define highp vec4 fill_color
|
|
614
|
-
#pragma mapbox: define highp vec4 halo_color
|
|
615
|
-
#pragma mapbox: define lowp float opacity
|
|
616
|
-
#pragma mapbox: define lowp float halo_width
|
|
617
|
-
#pragma mapbox: define lowp float halo_blur
|
|
618
|
-
void main() {
|
|
619
|
-
#pragma mapbox: initialize highp vec4 fill_color
|
|
620
|
-
#pragma mapbox: initialize highp vec4 halo_color
|
|
621
|
-
#pragma mapbox: initialize lowp float opacity
|
|
622
|
-
#pragma mapbox: initialize lowp float halo_width
|
|
623
|
-
#pragma mapbox: initialize lowp float halo_blur
|
|
624
|
-
float EDGE_GAMMA=0.105/u_device_pixel_ratio;vec2 tex=v_data0.xy;float gamma_scale=v_data1.x;float size=v_data1.y;float fade_opacity=v_data1[2];float fontScale=u_is_text ? size/24.0 : size;lowp vec4 color=fill_color;highp float gamma=EDGE_GAMMA/(fontScale*u_gamma_scale);lowp float inner_edge=(256.0-64.0)/256.0;if (u_is_halo) {color=halo_color;gamma=(halo_blur*1.19/SDF_PX+EDGE_GAMMA)/(fontScale*u_gamma_scale);inner_edge=inner_edge+gamma*gamma_scale;}lowp float dist=texture(u_texture,tex).a;highp float gamma_scaled=gamma*gamma_scale;highp float alpha=smoothstep(inner_edge-gamma_scaled,inner_edge+gamma_scaled,dist);if (u_is_halo) {lowp float halo_edge=(6.0-halo_width/fontScale)/SDF_PX;alpha=min(smoothstep(halo_edge-gamma_scaled,halo_edge+gamma_scaled,dist),1.0-alpha);}fragColor=color*(alpha*opacity*fade_opacity);
|
|
625
|
-
#ifdef OVERDRAW_INSPECTOR
|
|
626
|
-
fragColor=vec4(1.0);
|
|
627
|
-
#endif
|
|
628
|
-
}`,`in vec4 a_pos_offset;in vec4 a_data;in vec4 a_pixeloffset;in vec3 a_projected_pos;in float a_fade_opacity;uniform bool u_is_size_zoom_constant;uniform bool u_is_size_feature_constant;uniform highp float u_size_t;uniform highp float u_size;uniform mat4 u_label_plane_matrix;uniform mat4 u_coord_matrix;uniform bool u_is_text;uniform bool u_pitch_with_map;uniform bool u_is_along_line;uniform bool u_is_variable_anchor;uniform highp float u_pitch;uniform bool u_rotate_symbol;uniform highp float u_aspect_ratio;uniform highp float u_camera_to_center_distance;uniform float u_fade_change;uniform vec2 u_texsize;uniform vec2 u_translation;uniform float u_pitched_scale;out vec2 v_data0;out vec3 v_data1;
|
|
629
|
-
#pragma mapbox: define highp vec4 fill_color
|
|
630
|
-
#pragma mapbox: define highp vec4 halo_color
|
|
631
|
-
#pragma mapbox: define lowp float opacity
|
|
632
|
-
#pragma mapbox: define lowp float halo_width
|
|
633
|
-
#pragma mapbox: define lowp float halo_blur
|
|
634
|
-
void main() {
|
|
635
|
-
#pragma mapbox: initialize highp vec4 fill_color
|
|
636
|
-
#pragma mapbox: initialize highp vec4 halo_color
|
|
637
|
-
#pragma mapbox: initialize lowp float opacity
|
|
638
|
-
#pragma mapbox: initialize lowp float halo_width
|
|
639
|
-
#pragma mapbox: initialize lowp float halo_blur
|
|
640
|
-
vec2 a_pos=a_pos_offset.xy;vec2 a_offset=a_pos_offset.zw;vec2 a_tex=a_data.xy;vec2 a_size=a_data.zw;float a_size_min=floor(a_size[0]*0.5);vec2 a_pxoffset=a_pixeloffset.xy;float ele=get_elevation(a_pos);highp float segment_angle=-a_projected_pos[2];float size;if (!u_is_size_zoom_constant && !u_is_size_feature_constant) {size=mix(a_size_min,a_size[1],u_size_t)/128.0;} else if (u_is_size_zoom_constant && !u_is_size_feature_constant) {size=a_size_min/128.0;} else {size=u_size;}vec2 translated_a_pos=a_pos+u_translation;vec4 projectedPoint=projectTileWithElevation(translated_a_pos,ele);highp float camera_to_anchor_distance=projectedPoint.w;highp float distance_ratio=u_pitch_with_map ?
|
|
641
|
-
camera_to_anchor_distance/u_camera_to_center_distance :
|
|
642
|
-
u_camera_to_center_distance/camera_to_anchor_distance;highp float perspective_ratio=clamp(0.5+0.5*distance_ratio,0.0,4.0);size*=perspective_ratio;float fontScale=u_is_text ? size/24.0 : size;highp float symbol_rotation=0.0;if (u_rotate_symbol) {vec4 offsetProjectedPoint=projectTileWithElevation(translated_a_pos+vec2(1,0),ele);vec2 a=projectedPoint.xy/projectedPoint.w;vec2 b=offsetProjectedPoint.xy/offsetProjectedPoint.w;symbol_rotation=atan((b.y-a.y)/u_aspect_ratio,b.x-a.x);}highp float angle_sin=sin(segment_angle+symbol_rotation);highp float angle_cos=cos(segment_angle+symbol_rotation);mat2 rotation_matrix=mat2(angle_cos,-1.0*angle_sin,angle_sin,angle_cos);vec4 projected_pos;if (u_is_along_line || u_is_variable_anchor) {projected_pos=vec4(a_projected_pos.xy,ele,1.0);} else if (u_pitch_with_map) {projected_pos=u_label_plane_matrix*vec4(a_projected_pos.xy+u_translation,ele,1.0);} else {projected_pos=u_label_plane_matrix*projectTileWithElevation(a_projected_pos.xy+u_translation,ele);}float z=float(u_pitch_with_map)*projected_pos.z/projected_pos.w;float projectionScaling=1.0;
|
|
643
|
-
#ifdef GLOBE
|
|
644
|
-
if(u_pitch_with_map) {float anchor_pos_tile_y=(u_coord_matrix*vec4(projected_pos.xy/projected_pos.w,z,1.0)).y;projectionScaling=mix(projectionScaling,1.0/circumferenceRatioAtTileY(anchor_pos_tile_y)*u_pitched_scale,u_projection_transition);}
|
|
645
|
-
#endif
|
|
646
|
-
vec4 finalPos=u_coord_matrix*vec4(projected_pos.xy/projected_pos.w+rotation_matrix*(a_offset/32.0*fontScale+a_pxoffset)*projectionScaling,z,1.0);if(u_pitch_with_map) {finalPos=projectTileWithElevation(finalPos.xy,finalPos.z);}float gamma_scale=finalPos.w;gl_Position=finalPos;vec2 fade_opacity=unpack_opacity(a_fade_opacity);float visibility=calculate_visibility(projectedPoint);float fade_change=fade_opacity[1] > 0.5 ? u_fade_change :-u_fade_change;float interpolated_fade_opacity=max(0.0,min(visibility,fade_opacity[0]+fade_change));v_data0=a_tex/u_texsize;v_data1=vec3(gamma_scale,size,interpolated_fade_opacity);}`),symbolTextAndIcon:tr(`#define SDF_PX 8.0
|
|
647
|
-
#define SDF 1.0
|
|
648
|
-
#define ICON 0.0
|
|
649
|
-
uniform bool u_is_halo;uniform sampler2D u_texture;uniform sampler2D u_texture_icon;uniform highp float u_gamma_scale;uniform lowp float u_device_pixel_ratio;in vec4 v_data0;in vec4 v_data1;
|
|
650
|
-
#pragma mapbox: define highp vec4 fill_color
|
|
651
|
-
#pragma mapbox: define highp vec4 halo_color
|
|
652
|
-
#pragma mapbox: define lowp float opacity
|
|
653
|
-
#pragma mapbox: define lowp float halo_width
|
|
654
|
-
#pragma mapbox: define lowp float halo_blur
|
|
655
|
-
void main() {
|
|
656
|
-
#pragma mapbox: initialize highp vec4 fill_color
|
|
657
|
-
#pragma mapbox: initialize highp vec4 halo_color
|
|
658
|
-
#pragma mapbox: initialize lowp float opacity
|
|
659
|
-
#pragma mapbox: initialize lowp float halo_width
|
|
660
|
-
#pragma mapbox: initialize lowp float halo_blur
|
|
661
|
-
float fade_opacity=v_data1[2];if (v_data1.w==ICON) {vec2 tex_icon=v_data0.zw;lowp float alpha=opacity*fade_opacity;fragColor=texture(u_texture_icon,tex_icon)*alpha;
|
|
662
|
-
#ifdef OVERDRAW_INSPECTOR
|
|
663
|
-
fragColor=vec4(1.0);
|
|
664
|
-
#endif
|
|
665
|
-
return;}vec2 tex=v_data0.xy;float EDGE_GAMMA=0.105/u_device_pixel_ratio;float gamma_scale=v_data1.x;float size=v_data1.y;float fontScale=size/24.0;lowp vec4 color=fill_color;highp float gamma=EDGE_GAMMA/(fontScale*u_gamma_scale);lowp float buff=(256.0-64.0)/256.0;if (u_is_halo) {color=halo_color;gamma=(halo_blur*1.19/SDF_PX+EDGE_GAMMA)/(fontScale*u_gamma_scale);buff=(6.0-halo_width/fontScale)/SDF_PX;}lowp float dist=texture(u_texture,tex).a;highp float gamma_scaled=gamma*gamma_scale;highp float alpha=smoothstep(buff-gamma_scaled,buff+gamma_scaled,dist);fragColor=color*(alpha*opacity*fade_opacity);
|
|
666
|
-
#ifdef OVERDRAW_INSPECTOR
|
|
667
|
-
fragColor=vec4(1.0);
|
|
668
|
-
#endif
|
|
669
|
-
}`,`in vec4 a_pos_offset;in vec4 a_data;in vec3 a_projected_pos;in float a_fade_opacity;uniform bool u_is_size_zoom_constant;uniform bool u_is_size_feature_constant;uniform highp float u_size_t;uniform highp float u_size;uniform mat4 u_label_plane_matrix;uniform mat4 u_coord_matrix;uniform bool u_is_text;uniform bool u_pitch_with_map;uniform highp float u_pitch;uniform bool u_rotate_symbol;uniform highp float u_aspect_ratio;uniform highp float u_camera_to_center_distance;uniform float u_fade_change;uniform vec2 u_texsize;uniform vec2 u_texsize_icon;uniform bool u_is_along_line;uniform bool u_is_variable_anchor;uniform vec2 u_translation;uniform float u_pitched_scale;out vec4 v_data0;out vec4 v_data1;
|
|
670
|
-
#pragma mapbox: define highp vec4 fill_color
|
|
671
|
-
#pragma mapbox: define highp vec4 halo_color
|
|
672
|
-
#pragma mapbox: define lowp float opacity
|
|
673
|
-
#pragma mapbox: define lowp float halo_width
|
|
674
|
-
#pragma mapbox: define lowp float halo_blur
|
|
675
|
-
void main() {
|
|
676
|
-
#pragma mapbox: initialize highp vec4 fill_color
|
|
677
|
-
#pragma mapbox: initialize highp vec4 halo_color
|
|
678
|
-
#pragma mapbox: initialize lowp float opacity
|
|
679
|
-
#pragma mapbox: initialize lowp float halo_width
|
|
680
|
-
#pragma mapbox: initialize lowp float halo_blur
|
|
681
|
-
vec2 a_pos=a_pos_offset.xy;vec2 a_offset=a_pos_offset.zw;vec2 a_tex=a_data.xy;vec2 a_size=a_data.zw;float a_size_min=floor(a_size[0]*0.5);float is_sdf=a_size[0]-2.0*a_size_min;float ele=get_elevation(a_pos);highp float segment_angle=-a_projected_pos[2];float size;if (!u_is_size_zoom_constant && !u_is_size_feature_constant) {size=mix(a_size_min,a_size[1],u_size_t)/128.0;} else if (u_is_size_zoom_constant && !u_is_size_feature_constant) {size=a_size_min/128.0;} else {size=u_size;}vec2 translated_a_pos=a_pos+u_translation;vec4 projectedPoint=projectTileWithElevation(translated_a_pos,ele);highp float camera_to_anchor_distance=projectedPoint.w;highp float distance_ratio=u_pitch_with_map ?
|
|
682
|
-
camera_to_anchor_distance/u_camera_to_center_distance :
|
|
683
|
-
u_camera_to_center_distance/camera_to_anchor_distance;highp float perspective_ratio=clamp(0.5+0.5*distance_ratio,0.0,4.0);size*=perspective_ratio;float fontScale=size/24.0;highp float symbol_rotation=0.0;if (u_rotate_symbol) {vec4 offsetProjectedPoint=projectTileWithElevation(translated_a_pos+vec2(1,0),ele);vec2 a=projectedPoint.xy/projectedPoint.w;vec2 b=offsetProjectedPoint.xy/offsetProjectedPoint.w;symbol_rotation=atan((b.y-a.y)/u_aspect_ratio,b.x-a.x);}highp float angle_sin=sin(segment_angle+symbol_rotation);highp float angle_cos=cos(segment_angle+symbol_rotation);mat2 rotation_matrix=mat2(angle_cos,-1.0*angle_sin,angle_sin,angle_cos);vec4 projected_pos;if (u_is_along_line || u_is_variable_anchor) {projected_pos=vec4(a_projected_pos.xy,ele,1.0);} else if (u_pitch_with_map) {projected_pos=u_label_plane_matrix*vec4(a_projected_pos.xy+u_translation,ele,1.0);} else {projected_pos=u_label_plane_matrix*projectTileWithElevation(a_projected_pos.xy+u_translation,ele);}float z=float(u_pitch_with_map)*projected_pos.z/projected_pos.w;float projectionScaling=1.0;
|
|
684
|
-
#ifdef GLOBE
|
|
685
|
-
if(u_pitch_with_map && !u_is_along_line) {float anchor_pos_tile_y=(u_coord_matrix*vec4(projected_pos.xy/projected_pos.w,z,1.0)).y;projectionScaling=mix(projectionScaling,1.0/circumferenceRatioAtTileY(anchor_pos_tile_y)*u_pitched_scale,u_projection_transition);}
|
|
686
|
-
#endif
|
|
687
|
-
vec4 finalPos=u_coord_matrix*vec4(projected_pos.xy/projected_pos.w+rotation_matrix*(a_offset/32.0*fontScale)*projectionScaling,z,1.0);if(u_pitch_with_map) {finalPos=projectTileWithElevation(finalPos.xy,finalPos.z);}float gamma_scale=finalPos.w;gl_Position=finalPos;vec2 fade_opacity=unpack_opacity(a_fade_opacity);float visibility=calculate_visibility(projectedPoint);float fade_change=fade_opacity[1] > 0.5 ? u_fade_change :-u_fade_change;float interpolated_fade_opacity=max(0.0,min(visibility,fade_opacity[0]+fade_change));v_data0.xy=a_tex/u_texsize;v_data0.zw=a_tex/u_texsize_icon;v_data1=vec4(gamma_scale,size,interpolated_fade_opacity,is_sdf);}`),terrain:tr("uniform sampler2D u_texture;uniform vec4 u_fog_color;uniform vec4 u_horizon_color;uniform float u_fog_ground_blend;uniform float u_fog_ground_blend_opacity;uniform float u_horizon_fog_blend;uniform bool u_is_globe_mode;in vec2 v_texture_pos;in float v_fog_depth;const float gamma=2.2;vec4 gammaToLinear(vec4 color) {return pow(color,vec4(gamma));}vec4 linearToGamma(vec4 color) {return pow(color,vec4(1.0/gamma));}void main() {vec4 surface_color=texture(u_texture,vec2(v_texture_pos.x,1.0-v_texture_pos.y));if (!u_is_globe_mode && v_fog_depth > u_fog_ground_blend) {vec4 surface_color_linear=gammaToLinear(surface_color);float blend_color=smoothstep(0.0,1.0,max((v_fog_depth-u_horizon_fog_blend)/(1.0-u_horizon_fog_blend),0.0));vec4 fog_horizon_color_linear=mix(gammaToLinear(u_fog_color),gammaToLinear(u_horizon_color),blend_color);float factor_fog=max(v_fog_depth-u_fog_ground_blend,0.0)/(1.0-u_fog_ground_blend);fragColor=linearToGamma(mix(surface_color_linear,fog_horizon_color_linear,pow(factor_fog,2.0)*u_fog_ground_blend_opacity));} else {fragColor=surface_color;}}","in vec3 a_pos3d;uniform mat4 u_fog_matrix;uniform float u_ele_delta;out vec2 v_texture_pos;out float v_fog_depth;void main() {float ele=get_elevation(a_pos3d.xy);float ele_delta=a_pos3d.z==1.0 ? u_ele_delta : 0.0;v_texture_pos=a_pos3d.xy/8192.0;gl_Position=projectTileFor3D(a_pos3d.xy,get_elevation(a_pos3d.xy)-ele_delta);vec4 pos=u_fog_matrix*vec4(a_pos3d.xy,ele,1.0);v_fog_depth=pos.z/pos.w*0.5+0.5;}"),terrainDepth:tr("in float v_depth;const highp vec4 bitSh=vec4(256.*256.*256.,256.*256.,256.,1.);const highp vec4 bitMsk=vec4(0.,vec3(1./256.0));highp vec4 pack(highp float value) {highp vec4 comp=fract(value*bitSh);comp-=comp.xxyz*bitMsk;return comp;}void main() {fragColor=pack(v_depth);}","in vec3 a_pos3d;uniform float u_ele_delta;out float v_depth;void main() {float ele=get_elevation(a_pos3d.xy);float ele_delta=a_pos3d.z==1.0 ? u_ele_delta : 0.0;gl_Position=projectTileFor3D(a_pos3d.xy,ele-ele_delta);v_depth=gl_Position.z/gl_Position.w;}"),terrainCoords:tr("precision mediump float;uniform sampler2D u_texture;uniform float u_terrain_coords_id;in vec2 v_texture_pos;void main() {vec4 rgba=texture(u_texture,v_texture_pos);fragColor=vec4(rgba.r,rgba.g,rgba.b,u_terrain_coords_id);}","in vec3 a_pos3d;uniform float u_ele_delta;out vec2 v_texture_pos;void main() {float ele=get_elevation(a_pos3d.xy);float ele_delta=a_pos3d.z==1.0 ? u_ele_delta : 0.0;v_texture_pos=a_pos3d.xy/8192.0;gl_Position=projectTileFor3D(a_pos3d.xy,ele-ele_delta);}"),projectionErrorMeasurement:tr("in vec4 v_output_error_encoded;void main() {fragColor=v_output_error_encoded;}","in vec2 a_pos;uniform highp float u_input;uniform highp float u_output_expected;out vec4 v_output_error_encoded;void main() {float real_output=2.0*atan(exp(PI-(u_input*PI*2.0)))-PI*0.5;float error=real_output-u_output_expected;float abs_error=abs(error)*128.0;v_output_error_encoded.x=min(floor(abs_error*256.0),255.0)/255.0;abs_error-=v_output_error_encoded.x;v_output_error_encoded.y=min(floor(abs_error*65536.0),255.0)/255.0;abs_error-=v_output_error_encoded.x/255.0;v_output_error_encoded.z=min(floor(abs_error*16777216.0),255.0)/255.0;v_output_error_encoded.w=error >=0.0 ? 1.0 : 0.0;gl_Position=vec4(a_pos,0.0,1.0);}"),atmosphere:tr(`in vec3 view_direction;uniform vec3 u_sun_pos;uniform vec3 u_globe_position;uniform float u_globe_radius;uniform float u_atmosphere_blend;/**Shader use from https:*Made some change to adapt to MapLibre Globe geometry*/const float PI=3.141592653589793;const int iSteps=5;const int jSteps=3;/*radius of the planet*/const float EARTH_RADIUS=6371e3;/*radius of the atmosphere*/const float ATMOS_RADIUS=6471e3;vec2 rsi(vec3 r0,vec3 rd,float sr) {float a=dot(rd,rd);float b=2.0*dot(rd,r0);float c=dot(r0,r0)-(sr*sr);float d=(b*b)-4.0*a*c;if (d < 0.0) return vec2(1e5,-1e5);return vec2((-b-sqrt(d))/(2.0*a),(-b+sqrt(d))/(2.0*a));}vec4 atmosphere(vec3 r,vec3 r0,vec3 pSun,float iSun,float rPlanet,float rAtmos,vec3 kRlh,float kMie,float shRlh,float shMie,float g) {pSun=normalize(pSun);r=normalize(r);vec2 p=rsi(r0,r,rAtmos);if (p.x > p.y) {return vec4(0.0,0.0,0.0,1.0);}if (p.x < 0.0) {p.x=0.0;}vec3 pos=r0+r*p.x;vec2 p2=rsi(r0,r,rPlanet);if (p2.x <=p2.y && p2.x > 0.0) {p.y=min(p.y,p2.x);}float iStepSize=(p.y-p.x)/float(iSteps);float iTime=p.x+iStepSize*0.5;vec3 totalRlh=vec3(0,0,0);vec3 totalMie=vec3(0,0,0);float iOdRlh=0.0;float iOdMie=0.0;float mu=dot(r,pSun);float mumu=mu*mu;float gg=g*g;float pRlh=3.0/(16.0*PI)*(1.0+mumu);float pMie=3.0/(8.0*PI)*((1.0-gg)*(mumu+1.0))/(pow(1.0+gg-2.0*mu*g,1.5)*(2.0+gg));for (int i=0; i < iSteps; i++) {vec3 iPos=r0+r*iTime;float iHeight=length(iPos)-rPlanet;float odStepRlh=exp(-iHeight/shRlh)*iStepSize;float odStepMie=exp(-iHeight/shMie)*iStepSize;iOdRlh+=odStepRlh;iOdMie+=odStepMie;float jStepSize=rsi(iPos,pSun,rAtmos).y/float(jSteps);float jTime=jStepSize*0.5;float jOdRlh=0.0;float jOdMie=0.0;for (int j=0; j < jSteps; j++) {vec3 jPos=iPos+pSun*jTime;float jHeight=length(jPos)-rPlanet;jOdRlh+=exp(-jHeight/shRlh)*jStepSize;jOdMie+=exp(-jHeight/shMie)*jStepSize;jTime+=jStepSize;}vec3 attn=exp(-(kMie*(iOdMie+jOdMie)+kRlh*(iOdRlh+jOdRlh)));totalRlh+=odStepRlh*attn;totalMie+=odStepMie*attn;iTime+=iStepSize;}float opacity=exp(-(length(kRlh)*length(totalRlh)+kMie*length(totalMie)));vec3 color=iSun*(pRlh*kRlh*totalRlh+pMie*kMie*totalMie);return vec4(color,opacity);}void main() {vec3 scale_camera_pos=-u_globe_position*EARTH_RADIUS/u_globe_radius;vec4 color=atmosphere(normalize(view_direction),scale_camera_pos,u_sun_pos,22.0,EARTH_RADIUS,ATMOS_RADIUS,vec3(5.5e-6,13.0e-6,22.4e-6),21e-6,8e3,1.2e3,0.758
|
|
688
|
-
);color.rgb=1.0-exp(-1.0*color.rgb);color=pow(color,vec4(1.0/2.2));fragColor=vec4(color.rgb,1.0-color.a)*u_atmosphere_blend;}`,"in vec2 a_pos;uniform mat4 u_inv_proj_matrix;out vec3 view_direction;void main() {view_direction=(u_inv_proj_matrix*vec4(a_pos,0.0,1.0)).xyz;gl_Position=vec4(a_pos,0.0,1.0);}"),sky:tr("uniform vec4 u_sky_color;uniform vec4 u_horizon_color;uniform vec2 u_horizon;uniform vec2 u_horizon_normal;uniform float u_sky_horizon_blend;uniform float u_sky_blend;void main() {float x=gl_FragCoord.x;float y=gl_FragCoord.y;float blend=(y-u_horizon.y)*u_horizon_normal.y+(x-u_horizon.x)*u_horizon_normal.x;if (blend > 0.0) {if (blend < u_sky_horizon_blend) {fragColor=mix(u_sky_color,u_horizon_color,pow(1.0-blend/u_sky_horizon_blend,2.0));} else {fragColor=u_sky_color;}}fragColor=mix(fragColor,vec4(vec3(0.0),0.0),u_sky_blend);}","in vec2 a_pos;void main() {gl_Position=vec4(a_pos,1.0,1.0);}")};function tr(u,e){const r=/#pragma mapbox: ([\w]+) ([\w]+) ([\w]+) ([\w]+)/g,a=e.match(/in ([\w]+) ([\w]+)/g),l=u.match(/uniform ([\w]+) ([\w]+)([\s]*)([\w]*)/g),h=e.match(/uniform ([\w]+) ([\w]+)([\s]*)([\w]*)/g),g=h?h.concat(l):l,b={};return{fragmentSource:u=u.replace(r,(A,I,z,F,O)=>(b[O]=!0,I==="define"?`
|
|
689
|
-
#ifndef HAS_UNIFORM_u_${O}
|
|
690
|
-
in ${z} ${F} ${O};
|
|
691
|
-
#else
|
|
692
|
-
uniform ${z} ${F} u_${O};
|
|
693
|
-
#endif
|
|
694
|
-
`:`
|
|
695
|
-
#ifdef HAS_UNIFORM_u_${O}
|
|
696
|
-
${z} ${F} ${O} = u_${O};
|
|
697
|
-
#endif
|
|
698
|
-
`)),vertexSource:e=e.replace(r,(A,I,z,F,O)=>{const Z=F==="float"?"vec2":"vec4",J=O.match(/color/)?"color":Z;return b[O]?I==="define"?`
|
|
699
|
-
#ifndef HAS_UNIFORM_u_${O}
|
|
700
|
-
uniform lowp float u_${O}_t;
|
|
701
|
-
in ${z} ${Z} a_${O};
|
|
702
|
-
out ${z} ${F} ${O};
|
|
703
|
-
#else
|
|
704
|
-
uniform ${z} ${F} u_${O};
|
|
705
|
-
#endif
|
|
706
|
-
`:J==="vec4"?`
|
|
707
|
-
#ifndef HAS_UNIFORM_u_${O}
|
|
708
|
-
${O} = a_${O};
|
|
709
|
-
#else
|
|
710
|
-
${z} ${F} ${O} = u_${O};
|
|
711
|
-
#endif
|
|
712
|
-
`:`
|
|
713
|
-
#ifndef HAS_UNIFORM_u_${O}
|
|
714
|
-
${O} = unpack_mix_${J}(a_${O}, u_${O}_t);
|
|
715
|
-
#else
|
|
716
|
-
${z} ${F} ${O} = u_${O};
|
|
717
|
-
#endif
|
|
718
|
-
`:I==="define"?`
|
|
719
|
-
#ifndef HAS_UNIFORM_u_${O}
|
|
720
|
-
uniform lowp float u_${O}_t;
|
|
721
|
-
in ${z} ${Z} a_${O};
|
|
722
|
-
#else
|
|
723
|
-
uniform ${z} ${F} u_${O};
|
|
724
|
-
#endif
|
|
725
|
-
`:J==="vec4"?`
|
|
726
|
-
#ifndef HAS_UNIFORM_u_${O}
|
|
727
|
-
${z} ${F} ${O} = a_${O};
|
|
728
|
-
#else
|
|
729
|
-
${z} ${F} ${O} = u_${O};
|
|
730
|
-
#endif
|
|
731
|
-
`:`
|
|
732
|
-
#ifndef HAS_UNIFORM_u_${O}
|
|
733
|
-
${z} ${F} ${O} = unpack_mix_${J}(a_${O}, u_${O}_t);
|
|
734
|
-
#else
|
|
735
|
-
${z} ${F} ${O} = u_${O};
|
|
736
|
-
#endif
|
|
737
|
-
`}),staticAttributes:a,staticUniforms:g}}class zn{constructor(e,r,a){this.vertexBuffer=e,this.indexBuffer=r,this.segments=a}destroy(){this.vertexBuffer.destroy(),this.indexBuffer.destroy(),this.segments.destroy(),this.vertexBuffer=null,this.indexBuffer=null,this.segments=null}}var si=o.aG([{name:"a_pos",type:"Int16",components:2}]);const Bn="#define PROJECTION_MERCATOR",Vt="mercator";class bn{constructor(){this._cachedMesh=null}get name(){return"mercator"}get useSubdivision(){return!1}get shaderVariantName(){return Vt}get shaderDefine(){return Bn}get shaderPreludeCode(){return oi.projectionMercator}get vertexShaderPreludeCode(){return oi.projectionMercator.vertexSource}get subdivisionGranularity(){return o.aH.noSubdivision}get useGlobeControls(){return!1}get transitionState(){return 0}get latitudeErrorCorrectionRadians(){return 0}destroy(){}updateGPUdependent(e){}getMeshFromTileID(e,r,a,l,h){if(this._cachedMesh)return this._cachedMesh;const g=new o.aI;g.emplaceBack(0,0),g.emplaceBack(o.Z,0),g.emplaceBack(0,o.Z),g.emplaceBack(o.Z,o.Z);const b=e.createVertexBuffer(g,si.members),A=o.aJ.simpleSegment(0,0,4,2),I=new o.aK;I.emplaceBack(1,0,2),I.emplaceBack(1,2,3);const z=e.createIndexBuffer(I);return this._cachedMesh=new zn(b,z,A),this._cachedMesh}recalculate(){}hasTransition(){return!1}setErrorQueryLatitudeDegrees(e){}}class Fi{constructor(e=0,r=0,a=0,l=0){if(isNaN(e)||e<0||isNaN(r)||r<0||isNaN(a)||a<0||isNaN(l)||l<0)throw new Error("Invalid value for edge-insets, top, bottom, left and right must all be numbers");this.top=e,this.bottom=r,this.left=a,this.right=l}interpolate(e,r,a){return r.top!=null&&e.top!=null&&(this.top=o.B.number(e.top,r.top,a)),r.bottom!=null&&e.bottom!=null&&(this.bottom=o.B.number(e.bottom,r.bottom,a)),r.left!=null&&e.left!=null&&(this.left=o.B.number(e.left,r.left,a)),r.right!=null&&e.right!=null&&(this.right=o.B.number(e.right,r.right,a)),this}getCenter(e,r){const a=o.ae((this.left+e-this.right)/2,0,e),l=o.ae((this.top+r-this.bottom)/2,0,r);return new o.P(a,l)}equals(e){return this.top===e.top&&this.bottom===e.bottom&&this.left===e.left&&this.right===e.right}clone(){return new Fi(this.top,this.bottom,this.left,this.right)}toJSON(){return{top:this.top,bottom:this.bottom,left:this.left,right:this.right}}}function ce(u,e){if(!u.renderWorldCopies||u.lngRange)return;const r=e.lng-u.center.lng;e.lng+=r>180?-360:r<-180?360:0}function ue(u){return Math.max(0,Math.floor(u))}class pe{constructor(e,r,a,l,h,g){this._callbacks=e,this._tileSize=512,this._renderWorldCopies=g===void 0||!!g,this._minZoom=r||0,this._maxZoom=a||22,this._minPitch=l??0,this._maxPitch=h??60,this.setMaxBounds(),this._width=0,this._height=0,this._center=new o.Q(0,0),this._elevation=0,this._zoom=0,this._tileZoom=ue(this._zoom),this._scale=o.ac(this._zoom),this._bearingInRadians=0,this._fovInRadians=.6435011087932844,this._pitchInRadians=0,this._rollInRadians=0,this._unmodified=!0,this._edgeInsets=new Fi,this._minElevationForCurrentTile=0,this._autoCalculateNearFarZ=!0}apply(e,r,a){this._latRange=e.latRange,this._lngRange=e.lngRange,this._width=e.width,this._height=e.height,this._center=e.center,this._elevation=e.elevation,this._minElevationForCurrentTile=e.minElevationForCurrentTile,this._zoom=e.zoom,this._tileZoom=ue(this._zoom),this._scale=o.ac(this._zoom),this._bearingInRadians=e.bearingInRadians,this._fovInRadians=e.fovInRadians,this._pitchInRadians=e.pitchInRadians,this._rollInRadians=e.rollInRadians,this._unmodified=e.unmodified,this._edgeInsets=new Fi(e.padding.top,e.padding.bottom,e.padding.left,e.padding.right),this._minZoom=e.minZoom,this._maxZoom=e.maxZoom,this._minPitch=e.minPitch,this._maxPitch=e.maxPitch,this._renderWorldCopies=e.renderWorldCopies,this._cameraToCenterDistance=e.cameraToCenterDistance,this._nearZ=e.nearZ,this._farZ=e.farZ,this._autoCalculateNearFarZ=!a&&e.autoCalculateNearFarZ,r&&this._constrain(),this._calcMatrices()}get pixelsToClipSpaceMatrix(){return this._pixelsToClipSpaceMatrix}get clipSpaceToPixelsMatrix(){return this._clipSpaceToPixelsMatrix}get minElevationForCurrentTile(){return this._minElevationForCurrentTile}setMinElevationForCurrentTile(e){this._minElevationForCurrentTile=e}get tileSize(){return this._tileSize}get tileZoom(){return this._tileZoom}get scale(){return this._scale}get width(){return this._width}get height(){return this._height}get bearingInRadians(){return this._bearingInRadians}get lngRange(){return this._lngRange}get latRange(){return this._latRange}get pixelsToGLUnits(){return this._pixelsToGLUnits}get minZoom(){return this._minZoom}setMinZoom(e){this._minZoom!==e&&(this._minZoom=e,this.setZoom(this.getConstrained(this._center,this.zoom).zoom))}get maxZoom(){return this._maxZoom}setMaxZoom(e){this._maxZoom!==e&&(this._maxZoom=e,this.setZoom(this.getConstrained(this._center,this.zoom).zoom))}get minPitch(){return this._minPitch}setMinPitch(e){this._minPitch!==e&&(this._minPitch=e,this.setPitch(Math.max(this.pitch,e)))}get maxPitch(){return this._maxPitch}setMaxPitch(e){this._maxPitch!==e&&(this._maxPitch=e,this.setPitch(Math.min(this.pitch,e)))}get renderWorldCopies(){return this._renderWorldCopies}setRenderWorldCopies(e){e===void 0?e=!0:e===null&&(e=!1),this._renderWorldCopies=e}get worldSize(){return this._tileSize*this._scale}get centerOffset(){return this.centerPoint._sub(this.size._div(2))}get size(){return new o.P(this._width,this._height)}get bearing(){return this._bearingInRadians/Math.PI*180}setBearing(e){const r=o.aL(e,-180,180)*Math.PI/180;var a,l,h,g,b,A,I,z,F;this._bearingInRadians!==r&&(this._unmodified=!1,this._bearingInRadians=r,this._calcMatrices(),this._rotationMatrix=D(),a=this._rotationMatrix,h=-this._bearingInRadians,g=(l=this._rotationMatrix)[0],b=l[1],A=l[2],I=l[3],z=Math.sin(h),F=Math.cos(h),a[0]=g*F+A*z,a[1]=b*F+I*z,a[2]=g*-z+A*F,a[3]=b*-z+I*F)}get rotationMatrix(){return this._rotationMatrix}get pitchInRadians(){return this._pitchInRadians}get pitch(){return this._pitchInRadians/Math.PI*180}setPitch(e){const r=o.ae(e,this.minPitch,this.maxPitch)/180*Math.PI;this._pitchInRadians!==r&&(this._unmodified=!1,this._pitchInRadians=r,this._calcMatrices())}get rollInRadians(){return this._rollInRadians}get roll(){return this._rollInRadians/Math.PI*180}setRoll(e){const r=e/180*Math.PI;this._rollInRadians!==r&&(this._unmodified=!1,this._rollInRadians=r,this._calcMatrices())}get fovInRadians(){return this._fovInRadians}get fov(){return o.aM(this._fovInRadians)}setFov(e){e=o.ae(e,.1,150),this.fov!==e&&(this._unmodified=!1,this._fovInRadians=o.ab(e),this._calcMatrices())}get zoom(){return this._zoom}setZoom(e){const r=this.getConstrained(this._center,e).zoom;this._zoom!==r&&(this._unmodified=!1,this._zoom=r,this._tileZoom=Math.max(0,Math.floor(r)),this._scale=o.ac(r),this._constrain(),this._calcMatrices())}get center(){return this._center}setCenter(e){e.lat===this._center.lat&&e.lng===this._center.lng||(this._unmodified=!1,this._center=e,this._constrain(),this._calcMatrices())}get elevation(){return this._elevation}setElevation(e){e!==this._elevation&&(this._elevation=e,this._constrain(),this._calcMatrices())}get padding(){return this._edgeInsets.toJSON()}setPadding(e){this._edgeInsets.equals(e)||(this._unmodified=!1,this._edgeInsets.interpolate(this._edgeInsets,e,1),this._calcMatrices())}get centerPoint(){return this._edgeInsets.getCenter(this._width,this._height)}get pixelsPerMeter(){return this._pixelPerMeter}get unmodified(){return this._unmodified}get cameraToCenterDistance(){return this._cameraToCenterDistance}get nearZ(){return this._nearZ}get farZ(){return this._farZ}get autoCalculateNearFarZ(){return this._autoCalculateNearFarZ}overrideNearFarZ(e,r){this._autoCalculateNearFarZ=!1,this._nearZ=e,this._farZ=r,this._calcMatrices()}clearNearFarZOverride(){this._autoCalculateNearFarZ=!0,this._calcMatrices()}isPaddingEqual(e){return this._edgeInsets.equals(e)}interpolatePadding(e,r,a){this._unmodified=!1,this._edgeInsets.interpolate(e,r,a),this._constrain(),this._calcMatrices()}resize(e,r,a=!0){this._width=e,this._height=r,a&&this._constrain(),this._calcMatrices()}getMaxBounds(){return this._latRange&&this._latRange.length===2&&this._lngRange&&this._lngRange.length===2?new ct([this._lngRange[0],this._latRange[0]],[this._lngRange[1],this._latRange[1]]):null}setMaxBounds(e){e?(this._lngRange=[e.getWest(),e.getEast()],this._latRange=[e.getSouth(),e.getNorth()],this._constrain()):(this._lngRange=null,this._latRange=[-85.051129,o.af])}getConstrained(e,r){return this._callbacks.getConstrained(e,r)}getCameraQueryGeometry(e,r){if(r.length===1)return[r[0],e];{let a=e.x,l=e.y,h=e.x,g=e.y;for(const b of r)a=Math.min(a,b.x),l=Math.min(l,b.y),h=Math.max(h,b.x),g=Math.max(g,b.y);return[new o.P(a,l),new o.P(h,l),new o.P(h,g),new o.P(a,g),new o.P(a,l)]}}_constrain(){if(!this.center||!this._width||!this._height||this._constraining)return;this._constraining=!0;const e=this._unmodified,{center:r,zoom:a}=this.getConstrained(this.center,this.zoom);this.setCenter(r),this.setZoom(a),this._unmodified=e,this._constraining=!1}_calcMatrices(){if(this._width&&this._height){this._pixelsToGLUnits=[2/this._width,-2/this._height];let e=o.ad(new Float64Array(16));o.M(e,e,[this._width/2,-this._height/2,1]),o.L(e,e,[1,-1,0]),this._clipSpaceToPixelsMatrix=e,e=o.ad(new Float64Array(16)),o.M(e,e,[1,-1,1]),o.L(e,e,[-1,-1,0]),o.M(e,e,[2/this._width,2/this._height,1]),this._pixelsToClipSpaceMatrix=e,this._cameraToCenterDistance=.5/Math.tan(this.fovInRadians/2)*this._height}this._callbacks.calcMatrices()}calculateCenterFromCameraLngLatAlt(e,r,a,l){const h=a!==void 0?a:this.bearing,g=l=l!==void 0?l:this.pitch,b=o.$.fromLngLat(e,r),A=-Math.cos(o.ab(g)),I=Math.sin(o.ab(g)),z=I*Math.sin(o.ab(h)),F=-I*Math.cos(o.ab(h));let O=this.elevation;const Z=r-O;let J;A*Z>=0||Math.abs(A)<.1?(J=1e4,O=r+J*A):J=-Z/A;let oe,ne,se=o.aN(1,b.y),de=0;do{if(de+=1,de>10)break;ne=J/se,oe=new o.$(b.x+z*ne,b.y+F*ne),se=1/oe.meterInMercatorCoordinateUnits()}while(Math.abs(J-ne*se)>1e-12);return{center:oe.toLngLat(),elevation:O,zoom:o.ah(this.height/2/Math.tan(this.fovInRadians/2)/ne/this.tileSize)}}recalculateZoomAndCenter(e){if(this.elevation-e==0)return;const r=o.ag(1,this.center.lat)*this.worldSize,a=this.cameraToCenterDistance/r,l=o.$.fromLngLat(this.center,this.elevation),h=Q(this.center,this.elevation,this.pitch,this.bearing,a);this._elevation=e;const g=this.calculateCenterFromCameraLngLatAlt(h.toLngLat(),o.aN(h.z,l.y),this.bearing,this.pitch);this._elevation=g.elevation,this._center=g.center,this.setZoom(g.zoom)}getCameraPoint(){const e=Math.tan(this.pitchInRadians)*(this.cameraToCenterDistance||1);return this.centerPoint.add(new o.P(e*Math.sin(this.rollInRadians),e*Math.cos(this.rollInRadians)))}getCameraAltitude(){return Math.cos(this.pitchInRadians)*this._cameraToCenterDistance/this._pixelPerMeter+this.elevation}getCameraLngLat(){const e=o.ag(1,this.center.lat)*this.worldSize;return Q(this.center,this.elevation,this.pitch,this.bearing,this.cameraToCenterDistance/e).toLngLat()}getMercatorTileCoordinates(e){if(!e)return[0,0,1,1];const r=e.canonical.z>=0?1<<e.canonical.z:Math.pow(2,e.canonical.z);return[e.canonical.x/r,e.canonical.y/r,1/r/o.Z,1/r/o.Z]}}class xe{constructor(e,r){this.min=e,this.max=r,this.center=o.aO([],o.aP([],this.min,this.max),.5)}quadrant(e){const r=[e%2==0,e<2],a=o.aQ(this.min),l=o.aQ(this.max);for(let h=0;h<r.length;h++)a[h]=r[h]?this.min[h]:this.center[h],l[h]=r[h]?this.center[h]:this.max[h];return l[2]=this.max[2],new xe(a,l)}distanceX(e){return Math.max(Math.min(this.max[0],e[0]),this.min[0])-e[0]}distanceY(e){return Math.max(Math.min(this.max[1],e[1]),this.min[1])-e[1]}intersectsFrustum(e){let r=!0;for(let a=0;a<e.planes.length;a++){const l=this.intersectsPlane(e.planes[a]);if(l===0)return 0;l===1&&(r=!1)}return r?2:e.aabb.min[0]>this.max[0]||e.aabb.min[1]>this.max[1]||e.aabb.min[2]>this.max[2]||e.aabb.max[0]<this.min[0]||e.aabb.max[1]<this.min[1]||e.aabb.max[2]<this.min[2]?0:1}intersectsPlane(e){let r=e[3],a=e[3];for(let l=0;l<3;l++)e[l]>0?(r+=e[l]*this.min[l],a+=e[l]*this.max[l]):(a+=e[l]*this.min[l],r+=e[l]*this.max[l]);return r>=0?2:a<0?0:1}}class Ce{distanceToTile2d(e,r,a,l){const h=l.distanceX([e,r]),g=l.distanceY([e,r]);return Math.hypot(h,g)}getWrap(e,r,a){return a}getTileAABB(e,r,a,l){var h,g;let b=a,A=a;if(l.terrain){const z=new o.Y(e.z,r,e.z,e.x,e.y),F=l.terrain.getMinMaxElevation(z);b=(h=F.minElevation)!==null&&h!==void 0?h:a,A=(g=F.maxElevation)!==null&&g!==void 0?g:a}const I=1<<e.z;return new xe([r+e.x/I,e.y/I,b],[r+(e.x+1)/I,(e.y+1)/I,A])}allowVariableZoom(e,r){const a=e.fov*(Math.abs(Math.cos(e.rollInRadians))*e.height+Math.abs(Math.sin(e.rollInRadians))*e.width)/e.height,l=o.ae(78.5-a/2,0,60);return!!r.terrain||e.pitch>l}allowWorldCopies(){return!0}recalculateCache(){}}class Be{constructor(e,r,a){this.points=e,this.planes=r,this.aabb=a}static fromInvProjectionMatrix(e,r=1,a=0){const l=Math.pow(2,a),h=[[-1,1,-1,1],[1,1,-1,1],[1,-1,-1,1],[-1,-1,-1,1],[-1,1,1,1],[1,1,1,1],[1,-1,1,1],[-1,-1,1,1]].map(I=>{const z=1/(I=o.at([],I,e))[3]/r*l;return o.aR(I,I,[z,z,1/I[3],z])}),g=[[0,1,2],[6,5,4],[0,3,7],[2,1,5],[3,2,6],[0,4,5]].map(I=>{const z=o.aS([],h[I[0]],h[I[1]]),F=o.aS([],h[I[2]],h[I[1]]),O=o.aT([],o.aU([],z,F)),Z=-o.aV(O,h[I[1]]);return O.concat(Z)}),b=[Number.POSITIVE_INFINITY,Number.POSITIVE_INFINITY,Number.POSITIVE_INFINITY],A=[Number.NEGATIVE_INFINITY,Number.NEGATIVE_INFINITY,Number.NEGATIVE_INFINITY];for(const I of h)for(let z=0;z<3;z++)b[z]=Math.min(b[z],I[z]),A[z]=Math.max(A[z],I[z]);return new Be(h,g,new xe(b,A))}}class st{get pixelsToClipSpaceMatrix(){return this._helper.pixelsToClipSpaceMatrix}get clipSpaceToPixelsMatrix(){return this._helper.clipSpaceToPixelsMatrix}get pixelsToGLUnits(){return this._helper.pixelsToGLUnits}get centerOffset(){return this._helper.centerOffset}get size(){return this._helper.size}get rotationMatrix(){return this._helper.rotationMatrix}get centerPoint(){return this._helper.centerPoint}get pixelsPerMeter(){return this._helper.pixelsPerMeter}setMinZoom(e){this._helper.setMinZoom(e)}setMaxZoom(e){this._helper.setMaxZoom(e)}setMinPitch(e){this._helper.setMinPitch(e)}setMaxPitch(e){this._helper.setMaxPitch(e)}setRenderWorldCopies(e){this._helper.setRenderWorldCopies(e)}setBearing(e){this._helper.setBearing(e)}setPitch(e){this._helper.setPitch(e)}setRoll(e){this._helper.setRoll(e)}setFov(e){this._helper.setFov(e)}setZoom(e){this._helper.setZoom(e)}setCenter(e){this._helper.setCenter(e)}setElevation(e){this._helper.setElevation(e)}setMinElevationForCurrentTile(e){this._helper.setMinElevationForCurrentTile(e)}setPadding(e){this._helper.setPadding(e)}interpolatePadding(e,r,a){return this._helper.interpolatePadding(e,r,a)}isPaddingEqual(e){return this._helper.isPaddingEqual(e)}resize(e,r,a=!0){this._helper.resize(e,r,a)}getMaxBounds(){return this._helper.getMaxBounds()}setMaxBounds(e){this._helper.setMaxBounds(e)}overrideNearFarZ(e,r){this._helper.overrideNearFarZ(e,r)}clearNearFarZOverride(){this._helper.clearNearFarZOverride()}getCameraQueryGeometry(e){return this._helper.getCameraQueryGeometry(this.getCameraPoint(),e)}get tileSize(){return this._helper.tileSize}get tileZoom(){return this._helper.tileZoom}get scale(){return this._helper.scale}get worldSize(){return this._helper.worldSize}get width(){return this._helper.width}get height(){return this._helper.height}get lngRange(){return this._helper.lngRange}get latRange(){return this._helper.latRange}get minZoom(){return this._helper.minZoom}get maxZoom(){return this._helper.maxZoom}get zoom(){return this._helper.zoom}get center(){return this._helper.center}get minPitch(){return this._helper.minPitch}get maxPitch(){return this._helper.maxPitch}get pitch(){return this._helper.pitch}get pitchInRadians(){return this._helper.pitchInRadians}get roll(){return this._helper.roll}get rollInRadians(){return this._helper.rollInRadians}get bearing(){return this._helper.bearing}get bearingInRadians(){return this._helper.bearingInRadians}get fov(){return this._helper.fov}get fovInRadians(){return this._helper.fovInRadians}get elevation(){return this._helper.elevation}get minElevationForCurrentTile(){return this._helper.minElevationForCurrentTile}get padding(){return this._helper.padding}get unmodified(){return this._helper.unmodified}get renderWorldCopies(){return this._helper.renderWorldCopies}get cameraToCenterDistance(){return this._helper.cameraToCenterDistance}get nearZ(){return this._helper.nearZ}get farZ(){return this._helper.farZ}get autoCalculateNearFarZ(){return this._helper.autoCalculateNearFarZ}setTransitionState(e,r){}constructor(e,r,a,l,h){this._posMatrixCache=new Map,this._alignedPosMatrixCache=new Map,this._fogMatrixCacheF32=new Map,this._helper=new pe({calcMatrices:()=>{this._calcMatrices()},getConstrained:(g,b)=>this.getConstrained(g,b)},e,r,a,l,h),this._coveringTilesDetailsProvider=new Ce}clone(){const e=new st;return e.apply(this),e}apply(e,r,a){this._helper.apply(e,r,a)}get cameraPosition(){return this._cameraPosition}get projectionMatrix(){return this._projectionMatrix}get modelViewProjectionMatrix(){return this._viewProjMatrix}get inverseProjectionMatrix(){return this._invProjMatrix}get mercatorMatrix(){return this._mercatorMatrix}getVisibleUnwrappedCoordinates(e){const r=[new o.aW(0,e)];if(this._helper._renderWorldCopies){const a=this.screenPointToMercatorCoordinate(new o.P(0,0)),l=this.screenPointToMercatorCoordinate(new o.P(this._helper._width,0)),h=this.screenPointToMercatorCoordinate(new o.P(this._helper._width,this._helper._height)),g=this.screenPointToMercatorCoordinate(new o.P(0,this._helper._height)),b=Math.floor(Math.min(a.x,l.x,h.x,g.x)),A=Math.floor(Math.max(a.x,l.x,h.x,g.x)),I=1;for(let z=b-I;z<=A+I;z++)z!==0&&r.push(new o.aW(z,e))}return r}getCameraFrustum(){return Be.fromInvProjectionMatrix(this._invViewProjMatrix,this.worldSize)}getClippingPlane(){return null}getCoveringTilesDetailsProvider(){return this._coveringTilesDetailsProvider}recalculateZoomAndCenter(e){const r=this.screenPointToLocation(this.centerPoint,e),a=e?e.getElevationForLngLatZoom(r,this._helper._tileZoom):0;this._helper.recalculateZoomAndCenter(a)}setLocationAtPoint(e,r){const a=o.ag(this.elevation,this.center.lat),l=this.screenPointToMercatorCoordinateAtZ(r,a),h=this.screenPointToMercatorCoordinateAtZ(this.centerPoint,a),g=o.$.fromLngLat(e),b=new o.$(g.x-(l.x-h.x),g.y-(l.y-h.y));this.setCenter(b==null?void 0:b.toLngLat()),this._helper._renderWorldCopies&&this.setCenter(this.center.wrap())}locationToScreenPoint(e,r){return r?this.coordinatePoint(o.$.fromLngLat(e),r.getElevationForLngLatZoom(e,this._helper._tileZoom),this._pixelMatrix3D):this.coordinatePoint(o.$.fromLngLat(e))}screenPointToLocation(e,r){var a;return(a=this.screenPointToMercatorCoordinate(e,r))===null||a===void 0?void 0:a.toLngLat()}screenPointToMercatorCoordinate(e,r){if(r){const a=r.pointCoordinate(e);if(a!=null)return a}return this.screenPointToMercatorCoordinateAtZ(e)}screenPointToMercatorCoordinateAtZ(e,r){const a=r||0,l=[e.x,e.y,0,1],h=[e.x,e.y,1,1];o.at(l,l,this._pixelMatrixInverse),o.at(h,h,this._pixelMatrixInverse);const g=l[3],b=h[3],A=l[1]/g,I=h[1]/b,z=l[2]/g,F=h[2]/b,O=z===F?0:(a-z)/(F-z);return new o.$(o.B.number(l[0]/g,h[0]/b,O)/this.worldSize,o.B.number(A,I,O)/this.worldSize,a)}coordinatePoint(e,r=0,a=this._pixelMatrix){const l=[e.x*this.worldSize,e.y*this.worldSize,r,1];return o.at(l,l,a),new o.P(l[0]/l[3],l[1]/l[3])}getBounds(){const e=Math.max(0,this._helper._height/2-Ae(this));return new ct().extend(this.screenPointToLocation(new o.P(0,e))).extend(this.screenPointToLocation(new o.P(this._helper._width,e))).extend(this.screenPointToLocation(new o.P(this._helper._width,this._helper._height))).extend(this.screenPointToLocation(new o.P(0,this._helper._height)))}isPointOnMapSurface(e,r){return r?r.pointCoordinate(e)!=null:e.y>this.height/2-Ae(this)}calculatePosMatrix(e,r=!1,a){var l;const h=(l=e.key)!==null&&l!==void 0?l:o.aX(e.wrap,e.canonical.z,e.canonical.z,e.canonical.x,e.canonical.y),g=r?this._alignedPosMatrixCache:this._posMatrixCache;if(g.has(h)){const I=g.get(h);return a?I.f32:I.f64}const b=K(e,this.worldSize);o.N(b,r?this._alignedProjMatrix:this._viewProjMatrix,b);const A={f64:b,f32:new Float32Array(b)};return g.set(h,A),a?A.f32:A.f64}calculateFogMatrix(e){const r=e.key,a=this._fogMatrixCacheF32;if(a.has(r))return a.get(r);const l=K(e,this.worldSize);return o.N(l,this._fogMatrix,l),a.set(r,new Float32Array(l)),a.get(r)}getConstrained(e,r){r=o.ae(+r,this.minZoom,this.maxZoom);const a={center:new o.Q(e.lng,e.lat),zoom:r};let l=this._helper._lngRange;this._helper._renderWorldCopies||l!==null||(l=[-179.9999999999,180-1e-10]);const h=this.tileSize*o.ac(a.zoom);let g=0,b=h,A=0,I=h,z=0,F=0;const{x:O,y:Z}=this.size;if(this._helper._latRange){const _e=this._helper._latRange;g=o.S(_e[1])*h,b=o.S(_e[0])*h,b-g<Z&&(z=Z/(b-g))}l&&(A=o.aL(o.U(l[0])*h,0,h),I=o.aL(o.U(l[1])*h,0,h),I<A&&(I+=h),I-A<O&&(F=O/(I-A)));const{x:J,y:oe}=It(h,e);let ne,se;const de=Math.max(F||0,z||0);if(de){const _e=new o.P(F?(I+A)/2:J,z?(b+g)/2:oe);return a.center=wt(h,_e).wrap(),a.zoom+=o.ah(de),a}if(this._helper._latRange){const _e=Z/2;oe-_e<g&&(se=g+_e),oe+_e>b&&(se=b-_e)}if(l){const _e=(A+I)/2;let ye=J;this._helper._renderWorldCopies&&(ye=o.aL(J,_e-h/2,_e+h/2));const be=O/2;ye-be<A&&(ne=A+be),ye+be>I&&(ne=I-be)}if(ne!==void 0||se!==void 0){const _e=new o.P(ne??J,se??oe);a.center=wt(h,_e).wrap()}return a}calculateCenterFromCameraLngLatAlt(e,r,a,l){return this._helper.calculateCenterFromCameraLngLatAlt(e,r,a,l)}_calculateNearFarZIfNeeded(e,r,a){if(!this._helper.autoCalculateNearFarZ)return;const l=Math.min(this.elevation,this.minElevationForCurrentTile,this.getCameraAltitude()-100),h=e-l*this._helper._pixelPerMeter/Math.cos(r),g=l<0?h:e,b=Math.PI/2+this.pitchInRadians,A=o.ab(this.fov)*(Math.abs(Math.cos(o.ab(this.roll)))*this.height+Math.abs(Math.sin(o.ab(this.roll)))*this.width)/this.height*(.5+a.y/this.height),I=Math.sin(A)*g/Math.sin(o.ae(Math.PI-b-A,.01,Math.PI-.01)),z=Ae(this),F=Math.atan(z/this._helper.cameraToCenterDistance),O=o.ab(.75),Z=F>O?2*F*(.5+a.y/(2*z)):O,J=Math.sin(Z)*g/Math.sin(o.ae(Math.PI-b-Z,.01,Math.PI-.01)),oe=Math.min(I,J);this._helper._farZ=1.01*(Math.cos(Math.PI/2-r)*oe+g),this._helper._nearZ=this._helper._height/50}_calcMatrices(){if(!this._helper._height)return;const e=this.centerOffset,r=It(this.worldSize,this.center),a=r.x,l=r.y;this._helper._pixelPerMeter=o.ag(1,this.center.lat)*this.worldSize;const h=o.ab(Math.min(this.pitch,fr)),g=Math.max(this._helper.cameraToCenterDistance/2,this._helper.cameraToCenterDistance+this._helper._elevation*this._helper._pixelPerMeter/Math.cos(h));let b;this._calculateNearFarZIfNeeded(g,h,e),b=new Float64Array(16),o.aY(b,this.fovInRadians,this._helper._width/this._helper._height,this._helper._nearZ,this._helper._farZ),this._invProjMatrix=new Float64Array(16),o.an(this._invProjMatrix,b),b[8]=2*-e.x/this._helper._width,b[9]=2*e.y/this._helper._height,this._projectionMatrix=o.aZ(b),o.M(b,b,[1,-1,1]),o.L(b,b,[0,0,-this._helper.cameraToCenterDistance]),o.a_(b,b,-this.rollInRadians),o.a$(b,b,this.pitchInRadians),o.a_(b,b,-this.bearingInRadians),o.L(b,b,[-a,-l,0]),this._mercatorMatrix=o.M([],b,[this.worldSize,this.worldSize,this.worldSize]),o.M(b,b,[1,1,this._helper._pixelPerMeter]),this._pixelMatrix=o.N(new Float64Array(16),this.clipSpaceToPixelsMatrix,b),o.L(b,b,[0,0,-this.elevation]),this._viewProjMatrix=b,this._invViewProjMatrix=o.an([],b);const A=[0,0,-1,1];o.at(A,A,this._invViewProjMatrix),this._cameraPosition=[A[0]/A[3],A[1]/A[3],A[2]/A[3]],this._fogMatrix=new Float64Array(16),o.aY(this._fogMatrix,this.fovInRadians,this.width/this.height,g,this._helper._farZ),this._fogMatrix[8]=2*-e.x/this.width,this._fogMatrix[9]=2*e.y/this.height,o.M(this._fogMatrix,this._fogMatrix,[1,-1,1]),o.L(this._fogMatrix,this._fogMatrix,[0,0,-this.cameraToCenterDistance]),o.a_(this._fogMatrix,this._fogMatrix,-this.rollInRadians),o.a$(this._fogMatrix,this._fogMatrix,this.pitchInRadians),o.a_(this._fogMatrix,this._fogMatrix,-this.bearingInRadians),o.L(this._fogMatrix,this._fogMatrix,[-a,-l,0]),o.M(this._fogMatrix,this._fogMatrix,[1,1,this._helper._pixelPerMeter]),o.L(this._fogMatrix,this._fogMatrix,[0,0,-this.elevation]),this._pixelMatrix3D=o.N(new Float64Array(16),this.clipSpaceToPixelsMatrix,b);const I=this._helper._width%2/2,z=this._helper._height%2/2,F=Math.cos(this.bearingInRadians),O=Math.sin(-this.bearingInRadians),Z=a-Math.round(a)+F*I+O*z,J=l-Math.round(l)+F*z+O*I,oe=new Float64Array(b);if(o.L(oe,oe,[Z>.5?Z-1:Z,J>.5?J-1:J,0]),this._alignedProjMatrix=oe,b=o.an(new Float64Array(16),this._pixelMatrix),!b)throw new Error("failed to invert matrix");this._pixelMatrixInverse=b,this._clearMatrixCaches()}_clearMatrixCaches(){this._posMatrixCache.clear(),this._alignedPosMatrixCache.clear(),this._fogMatrixCacheF32.clear()}maxPitchScaleFactor(){if(!this._pixelMatrixInverse)return 1;const e=this.screenPointToMercatorCoordinate(new o.P(0,0)),r=[e.x*this.worldSize,e.y*this.worldSize,0,1];return o.at(r,r,this._pixelMatrix)[3]/this._helper.cameraToCenterDistance}getCameraPoint(){return this._helper.getCameraPoint()}getCameraAltitude(){return this._helper.getCameraAltitude()}getCameraLngLat(){const e=o.ag(1,this.center.lat)*this.worldSize;return Q(this.center,this.elevation,this.pitch,this.bearing,this._helper.cameraToCenterDistance/e).toLngLat()}lngLatToCameraDepth(e,r){const a=o.$.fromLngLat(e),l=[a.x*this.worldSize,a.y*this.worldSize,r,1];return o.at(l,l,this._viewProjMatrix),l[2]/l[3]}getProjectionData(e){const{overscaledTileID:r,aligned:a,applyTerrainMatrix:l}=e,h=this._helper.getMercatorTileCoordinates(r),g=r?this.calculatePosMatrix(r,a,!0):null;let b;return b=r&&r.terrainRttPosMatrix32f&&l?r.terrainRttPosMatrix32f:g||o.b0(),{mainMatrix:b,tileMercatorCoords:h,clippingPlane:[0,0,0,0],projectionTransition:0,fallbackMatrix:b}}isLocationOccluded(e){return!1}getPixelScale(){return 1}getCircleRadiusCorrection(){return 1}getPitchedTextCorrection(e,r,a){return 1}transformLightDirection(e){return o.aQ(e)}getRayDirectionFromPixel(e){throw new Error("Not implemented.")}projectTileCoordinates(e,r,a,l){const h=this.calculatePosMatrix(a);let g;l?(g=[e,r,l(e,r),1],o.at(g,g,h)):(g=[e,r,0,1],xn(g,g,h));const b=g[3];return{point:new o.P(g[0]/b,g[1]/b),signedDistanceFromCamera:b,isOccluded:!1}}populateCache(e){for(const r of e)this.calculatePosMatrix(r)}getMatrixForModel(e,r){const a=o.$.fromLngLat(e,r),l=a.meterInMercatorCoordinateUnits(),h=o.b1();return o.L(h,h,[a.x,a.y,a.z]),o.a_(h,h,Math.PI),o.a$(h,h,Math.PI/2),o.M(h,h,[-l,l,l]),h}getProjectionDataForCustomLayer(e=!0){const r=new o.Y(0,0,0,0,0),a=this.getProjectionData({overscaledTileID:r,applyGlobeMatrix:e}),l=K(r,this.worldSize);o.N(l,this._viewProjMatrix,l),a.tileMercatorCoords=[0,0,1,1];const h=[o.Z,o.Z,this.worldSize/this._helper.pixelsPerMeter],g=o.b2();return o.M(g,l,h),a.fallbackMatrix=g,a.mainMatrix=g,a}getFastPathSimpleProjectionMatrix(e){return this.calculatePosMatrix(e)}}function Je(){o.w("Map cannot fit within canvas with the given bounds, padding, and/or offset.")}function it(u){if(u.useSlerp)if(u.k<1){const e=o.b3(u.startEulerAngles.roll,u.startEulerAngles.pitch,u.startEulerAngles.bearing),r=o.b3(u.endEulerAngles.roll,u.endEulerAngles.pitch,u.endEulerAngles.bearing),a=new Float64Array(4);o.b4(a,e,r,u.k);const l=o.b5(a);u.tr.setRoll(l.roll),u.tr.setPitch(l.pitch),u.tr.setBearing(l.bearing)}else u.tr.setRoll(u.endEulerAngles.roll),u.tr.setPitch(u.endEulerAngles.pitch),u.tr.setBearing(u.endEulerAngles.bearing);else u.tr.setRoll(o.B.number(u.startEulerAngles.roll,u.endEulerAngles.roll,u.k)),u.tr.setPitch(o.B.number(u.startEulerAngles.pitch,u.endEulerAngles.pitch,u.k)),u.tr.setBearing(o.B.number(u.startEulerAngles.bearing,u.endEulerAngles.bearing,u.k))}function ze(u,e,r,a,l){const h=l.padding,g=It(l.worldSize,r.getNorthWest()),b=It(l.worldSize,r.getNorthEast()),A=It(l.worldSize,r.getSouthEast()),I=It(l.worldSize,r.getSouthWest()),z=o.ab(-a),F=g.rotate(z),O=b.rotate(z),Z=A.rotate(z),J=I.rotate(z),oe=new o.P(Math.max(F.x,O.x,J.x,Z.x),Math.max(F.y,O.y,J.y,Z.y)),ne=new o.P(Math.min(F.x,O.x,J.x,Z.x),Math.min(F.y,O.y,J.y,Z.y)),se=oe.sub(ne),de=(l.width-(h.left+h.right+e.left+e.right))/se.x,_e=(l.height-(h.top+h.bottom+e.top+e.bottom))/se.y;if(_e<0||de<0)return void Je();const ye=Math.min(o.ah(l.scale*Math.min(de,_e)),u.maxZoom),be=o.P.convert(u.offset),ke=new o.P((e.left-e.right)/2,(e.top-e.bottom)/2).rotate(o.ab(a)),we=be.add(ke).mult(l.scale/o.ac(ye));return{center:wt(l.worldSize,g.add(A).div(2).sub(we)),zoom:ye,bearing:a}}class Ge{get useGlobeControls(){return!1}handlePanInertia(e,r){return{easingOffset:e,easingCenter:r.center}}handleMapControlsRollPitchBearingZoom(e,r){e.bearingDelta&&r.setBearing(r.bearing+e.bearingDelta),e.pitchDelta&&r.setPitch(r.pitch+e.pitchDelta),e.rollDelta&&r.setRoll(r.roll+e.rollDelta),e.zoomDelta&&r.setZoom(r.zoom+e.zoomDelta)}handleMapControlsPan(e,r,a){e.around.distSqr(r.centerPoint)<.01||r.setLocationAtPoint(a,e.around)}cameraForBoxAndBearing(e,r,a,l,h){return ze(e,r,a,l,h)}handleJumpToCenterZoom(e,r){e.zoom!==(r.zoom!==void 0?+r.zoom:e.zoom)&&e.setZoom(+r.zoom),r.center!==void 0&&e.setCenter(o.Q.convert(r.center))}handleEaseTo(e,r){const a=e.zoom,l=e.padding,h={roll:e.roll,pitch:e.pitch,bearing:e.bearing},g={roll:r.roll===void 0?e.roll:r.roll,pitch:r.pitch===void 0?e.pitch:r.pitch,bearing:r.bearing===void 0?e.bearing:r.bearing},b=r.zoom!==void 0,A=!e.isPaddingEqual(r.padding);let I=!1;const z=b?+r.zoom:e.zoom;let F=e.centerPoint.add(r.offsetAsPoint);const O=e.screenPointToLocation(F),{center:Z,zoom:J}=e.getConstrained(o.Q.convert(r.center||O),z??a);ce(e,Z);const oe=It(e.worldSize,O),ne=It(e.worldSize,Z).sub(oe),se=o.ac(J-a);return I=J!==a,{easeFunc:de=>{if(I&&e.setZoom(o.B.number(a,J,de)),o.b6(h,g)||it({startEulerAngles:h,endEulerAngles:g,tr:e,k:de,useSlerp:h.roll!=g.roll}),A&&(e.interpolatePadding(l,r.padding,de),F=e.centerPoint.add(r.offsetAsPoint)),r.around)e.setLocationAtPoint(r.around,r.aroundPoint);else{const _e=o.ac(e.zoom-a),ye=J>a?Math.min(2,se):Math.max(.5,se),be=Math.pow(ye,1-de),ke=wt(e.worldSize,oe.add(ne.mult(de*be)).mult(_e));e.setLocationAtPoint(e.renderWorldCopies?ke.wrap():ke,F)}},isZooming:I,elevationCenter:Z}}handleFlyTo(e,r){const a=r.zoom!==void 0,l=e.zoom,h=e.getConstrained(o.Q.convert(r.center||r.locationAtOffset),a?+r.zoom:l),g=h.center,b=h.zoom;ce(e,g);const A=It(e.worldSize,r.locationAtOffset),I=It(e.worldSize,g).sub(A),z=I.mag(),F=o.ac(b-l);let O;if(r.minZoom!==void 0){const Z=Math.min(+r.minZoom,l,b),J=e.getConstrained(g,Z).zoom;O=o.ac(J-l)}return{easeFunc:(Z,J,oe,ne)=>{e.setZoom(Z===1?b:l+o.ah(J));const se=Z===1?g:wt(e.worldSize,A.add(I.mult(oe)).mult(J));e.setLocationAtPoint(e.renderWorldCopies?se.wrap():se,ne)},scaleOfZoom:F,targetCenter:g,scaleOfMinZoom:O,pixelPathLength:z}}}class Ye{constructor(e,r,a){this.blendFunction=e,this.blendColor=r,this.mask=a}}Ye.Replace=[1,0],Ye.disabled=new Ye(Ye.Replace,o.b7.transparent,[!1,!1,!1,!1]),Ye.unblended=new Ye(Ye.Replace,o.b7.transparent,[!0,!0,!0,!0]),Ye.alphaBlended=new Ye([1,771],o.b7.transparent,[!0,!0,!0,!0]);const ft=2305;class ht{constructor(e,r,a){this.enable=e,this.mode=r,this.frontFace=a}}ht.disabled=new ht(!1,1029,ft),ht.backCCW=new ht(!0,1029,ft),ht.frontCCW=new ht(!0,1028,ft);class nt{constructor(e,r,a){this.func=e,this.mask=r,this.range=a}}nt.ReadOnly=!1,nt.ReadWrite=!0,nt.disabled=new nt(519,nt.ReadOnly,[0,1]);const Zt=7680;class dt{constructor(e,r,a,l,h,g){this.test=e,this.ref=r,this.mask=a,this.fail=l,this.depthFail=h,this.pass=g}}dt.disabled=new dt({func:519,mask:0},0,0,Zt,Zt,Zt);const Ut=new WeakMap;function Sr(u){var e;if(Ut.has(u))return Ut.get(u);{const r=(e=u.getParameter(u.VERSION))===null||e===void 0?void 0:e.startsWith("WebGL 2.0");return Ut.set(u,r),r}}class yo{get awaitingQuery(){return!!this._readbackQueue}constructor(e){this._readbackWaitFrames=4,this._measureWaitFrames=6,this._texWidth=1,this._texHeight=1,this._measuredError=0,this._updateCount=0,this._lastReadbackFrame=-1e3,this._readbackQueue=null,this._cachedRenderContext=e;const r=e.context,a=r.gl;this._texFormat=a.RGBA,this._texType=a.UNSIGNED_BYTE;const l=new o.aI;l.emplaceBack(-1,-1),l.emplaceBack(2,-1),l.emplaceBack(-1,2);const h=new o.aK;h.emplaceBack(0,1,2),this._fullscreenTriangle=new zn(r.createVertexBuffer(l,si.members),r.createIndexBuffer(h),o.aJ.simpleSegment(0,0,l.length,h.length)),this._resultBuffer=new Uint8Array(4),r.activeTexture.set(a.TEXTURE1);const g=a.createTexture();a.bindTexture(a.TEXTURE_2D,g),a.texParameteri(a.TEXTURE_2D,a.TEXTURE_WRAP_S,a.CLAMP_TO_EDGE),a.texParameteri(a.TEXTURE_2D,a.TEXTURE_WRAP_T,a.CLAMP_TO_EDGE),a.texParameteri(a.TEXTURE_2D,a.TEXTURE_MIN_FILTER,a.NEAREST),a.texParameteri(a.TEXTURE_2D,a.TEXTURE_MAG_FILTER,a.NEAREST),a.texImage2D(a.TEXTURE_2D,0,this._texFormat,this._texWidth,this._texHeight,0,this._texFormat,this._texType,null),this._fbo=r.createFramebuffer(this._texWidth,this._texHeight,!1,!1),this._fbo.colorAttachment.set(g),Sr(a)&&(this._pbo=a.createBuffer(),a.bindBuffer(a.PIXEL_PACK_BUFFER,this._pbo),a.bufferData(a.PIXEL_PACK_BUFFER,4,a.STREAM_READ),a.bindBuffer(a.PIXEL_PACK_BUFFER,null))}destroy(){const e=this._cachedRenderContext.context.gl;this._fullscreenTriangle.destroy(),this._fbo.destroy(),e.deleteBuffer(this._pbo),this._fullscreenTriangle=null,this._fbo=null,this._pbo=null,this._resultBuffer=null}updateErrorLoop(e,r){const a=this._updateCount;return this._readbackQueue?a>=this._readbackQueue.frameNumberIssued+this._readbackWaitFrames&&this._tryReadback():a>=this._lastReadbackFrame+this._measureWaitFrames&&this._renderErrorTexture(e,r),this._updateCount++,this._measuredError}_bindFramebuffer(){const e=this._cachedRenderContext.context,r=e.gl;e.activeTexture.set(r.TEXTURE1),r.bindTexture(r.TEXTURE_2D,this._fbo.colorAttachment.get()),e.bindFramebuffer.set(this._fbo.framebuffer)}_renderErrorTexture(e,r){const a=this._cachedRenderContext.context,l=a.gl;if(this._bindFramebuffer(),a.viewport.set([0,0,this._texWidth,this._texHeight]),a.clear({color:o.b7.transparent}),this._cachedRenderContext.useProgram("projectionErrorMeasurement").draw(a,l.TRIANGLES,nt.disabled,dt.disabled,Ye.unblended,ht.disabled,((h,g)=>({u_input:h,u_output_expected:g}))(e,r),null,null,"$clipping",this._fullscreenTriangle.vertexBuffer,this._fullscreenTriangle.indexBuffer,this._fullscreenTriangle.segments),this._pbo&&Sr(l)){l.bindBuffer(l.PIXEL_PACK_BUFFER,this._pbo),l.readBuffer(l.COLOR_ATTACHMENT0),l.readPixels(0,0,this._texWidth,this._texHeight,this._texFormat,this._texType,0),l.bindBuffer(l.PIXEL_PACK_BUFFER,null);const h=l.fenceSync(l.SYNC_GPU_COMMANDS_COMPLETE,0);l.flush(),this._readbackQueue={frameNumberIssued:this._updateCount,sync:h}}else this._readbackQueue={frameNumberIssued:this._updateCount,sync:null}}_tryReadback(){const e=this._cachedRenderContext.context.gl;if(this._pbo&&this._readbackQueue&&Sr(e)){const r=e.clientWaitSync(this._readbackQueue.sync,0,0);if(r===e.WAIT_FAILED)return o.w("WebGL2 clientWaitSync failed."),this._readbackQueue=null,void(this._lastReadbackFrame=this._updateCount);if(r===e.TIMEOUT_EXPIRED)return;e.bindBuffer(e.PIXEL_PACK_BUFFER,this._pbo),e.getBufferSubData(e.PIXEL_PACK_BUFFER,0,this._resultBuffer,0,4),e.bindBuffer(e.PIXEL_PACK_BUFFER,null)}else this._bindFramebuffer(),e.readPixels(0,0,this._texWidth,this._texHeight,this._texFormat,this._texType,this._resultBuffer);this._readbackQueue=null,this._measuredError=yo._parseRGBA8float(this._resultBuffer),this._lastReadbackFrame=this._updateCount}static _parseRGBA8float(e){let r=0;return r+=e[0]/256,r+=e[1]/65536,r+=e[2]/16777216,e[3]<127&&(r=-r),r/128}}const Vn=o.Z/128;function un(u,e){const r=u.granularity!==void 0?Math.max(u.granularity,1):1,a=r+(u.generateBorders?2:0),l=r+(u.extendToNorthPole||u.generateBorders?1:0)+(u.extendToSouthPole||u.generateBorders?1:0),h=a+1,g=l+1,b=u.generateBorders?-1:0,A=u.generateBorders||u.extendToNorthPole?-1:0,I=r+(u.generateBorders?1:0),z=r+(u.generateBorders||u.extendToSouthPole?1:0),F=h*g,O=a*l*6,Z=h*g>65536;if(Z&&e==="16bit")throw new Error("Granularity is too large and meshes would not fit inside 16 bit vertex indices.");const J=Z||e==="32bit",oe=new Int16Array(2*F);let ne=0;for(let _e=A;_e<=z;_e++)for(let ye=b;ye<=I;ye++){let be=ye/r*o.Z;ye===-1&&(be=-64),ye===r+1&&(be=o.Z+Vn);let ke=_e/r*o.Z;_e===-1&&(ke=u.extendToNorthPole?o.b9:-64),_e===r+1&&(ke=u.extendToSouthPole?o.ba:o.Z+Vn),oe[ne++]=be,oe[ne++]=ke}const se=J?new Uint32Array(O):new Uint16Array(O);let de=0;for(let _e=0;_e<l;_e++)for(let ye=0;ye<a;ye++){const be=ye+1+_e*h,ke=ye+(_e+1)*h,we=ye+1+(_e+1)*h;se[de++]=ye+_e*h,se[de++]=ke,se[de++]=be,se[de++]=be,se[de++]=ke,se[de++]=we}return{vertices:oe.buffer.slice(0),indices:se.buffer.slice(0),uses32bitIndices:J}}const On=new o.aH({fill:new o.bb(128,2),line:new o.bb(512,0),tile:new o.bb(128,32),stencil:new o.bb(128,1),circle:3});class _o{constructor(){this._tileMeshCache={},this._errorCorrectionUsable=0,this._errorMeasurementLastValue=0,this._errorCorrectionPreviousValue=0,this._errorMeasurementLastChangeTime=-1e3}get name(){return"vertical-perspective"}get transitionState(){return 1}get useSubdivision(){return!0}get shaderVariantName(){return"globe"}get shaderDefine(){return"#define GLOBE"}get shaderPreludeCode(){return oi.projectionGlobe}get vertexShaderPreludeCode(){return oi.projectionMercator.vertexSource}get subdivisionGranularity(){return On}get useGlobeControls(){return!0}get latitudeErrorCorrectionRadians(){return this._errorCorrectionUsable}destroy(){this._errorMeasurement&&this._errorMeasurement.destroy()}updateGPUdependent(e){this._errorMeasurement||(this._errorMeasurement=new yo(e));const r=o.S(this._errorQueryLatitudeDegrees),a=2*Math.atan(Math.exp(Math.PI-r*Math.PI*2))-.5*Math.PI,l=this._errorMeasurement.updateErrorLoop(r,a),h=M.now();l!==this._errorMeasurementLastValue&&(this._errorCorrectionPreviousValue=this._errorCorrectionUsable,this._errorMeasurementLastValue=l,this._errorMeasurementLastChangeTime=h);const g=Math.min(Math.max((h-this._errorMeasurementLastChangeTime)/1e3/.5,0),1);this._errorCorrectionUsable=o.bc(this._errorCorrectionPreviousValue,-this._errorMeasurementLastValue,o.bd(g))}_getMeshKey(e){return`${e.granularity.toString(36)}_${e.generateBorders?"b":""}${e.extendToNorthPole?"n":""}${e.extendToSouthPole?"s":""}`}getMeshFromTileID(e,r,a,l,h){const g=(h==="stencil"?On.stencil:On.tile).getGranularityForZoomLevel(r.z);return this._getMesh(e,{granularity:g,generateBorders:a,extendToNorthPole:r.y===0&&l,extendToSouthPole:r.y===(1<<r.z)-1&&l})}_getMesh(e,r){const a=this._getMeshKey(r);if(a in this._tileMeshCache)return this._tileMeshCache[a];const l=function(h,g){const b=un(g,"16bit"),A=o.aI.deserialize({arrayBuffer:b.vertices,length:b.vertices.byteLength/2/2}),I=o.aK.deserialize({arrayBuffer:b.indices,length:b.indices.byteLength/2/3});return new zn(h.createVertexBuffer(A,si.members),h.createIndexBuffer(I),o.aJ.simpleSegment(0,0,A.length,I.length))}(e,r);return this._tileMeshCache[a]=l,l}recalculate(e){}hasTransition(){const e=M.now();let r=!1;return r=r||(e-this._errorMeasurementLastChangeTime)/1e3<.7,r=r||this._errorMeasurement&&this._errorMeasurement.awaitingQuery,r}setErrorQueryLatitudeDegrees(e){this._errorQueryLatitudeDegrees=e}}const fs=new o.r({type:new o.D(o.v.projection.type)});class sa extends o.E{constructor(e){super(),this._transitionable=new o.T(fs),this.setProjection(e),this._transitioning=this._transitionable.untransitioned(),this.recalculate(new o.C(0)),this._mercatorProjection=new bn,this._verticalPerspectiveProjection=new _o}get transitionState(){const e=this.properties.get("type");if(typeof e=="string"&&e==="mercator")return 0;if(typeof e=="string"&&e==="vertical-perspective")return 1;if(e instanceof o.be){if(e.from==="vertical-perspective"&&e.to==="mercator")return 1-e.transition;if(e.from==="mercator"&&e.to==="vertical-perspective")return e.transition}return 1}get useGlobeRendering(){return this.transitionState>0}get latitudeErrorCorrectionRadians(){return this._verticalPerspectiveProjection.latitudeErrorCorrectionRadians}get currentProjection(){return this.useGlobeRendering?this._verticalPerspectiveProjection:this._mercatorProjection}get name(){return"globe"}get useSubdivision(){return this.currentProjection.useSubdivision}get shaderVariantName(){return this.currentProjection.shaderVariantName}get shaderDefine(){return this.currentProjection.shaderDefine}get shaderPreludeCode(){return this.currentProjection.shaderPreludeCode}get vertexShaderPreludeCode(){return this.currentProjection.vertexShaderPreludeCode}get subdivisionGranularity(){return this.currentProjection.subdivisionGranularity}get useGlobeControls(){return this.transitionState>0}destroy(){this._mercatorProjection.destroy(),this._verticalPerspectiveProjection.destroy()}updateGPUdependent(e){this._mercatorProjection.updateGPUdependent(e),this._verticalPerspectiveProjection.updateGPUdependent(e)}getMeshFromTileID(e,r,a,l,h){return this.currentProjection.getMeshFromTileID(e,r,a,l,h)}setProjection(e){this._transitionable.setValue("type",(e==null?void 0:e.type)||"mercator")}updateTransitions(e){this._transitioning=this._transitionable.transitioned(e,this._transitioning)}hasTransition(){return this._transitioning.hasTransition()||this.currentProjection.hasTransition()}recalculate(e){this.properties=this._transitioning.possiblyEvaluate(e)}setErrorQueryLatitudeDegrees(e){this._verticalPerspectiveProjection.setErrorQueryLatitudeDegrees(e),this._mercatorProjection.setErrorQueryLatitudeDegrees(e)}}function ms(u){const e=bo(u.worldSize,u.center.lat);return 2*Math.PI*e}function xo(u,e,r,a,l){const h=1/(1<<l),g=e/o.Z*h+a*h,b=o.bg((u/o.Z*h+r*h)*Math.PI*2+Math.PI,2*Math.PI),A=2*Math.atan(Math.exp(Math.PI-g*Math.PI*2))-.5*Math.PI,I=Math.cos(A),z=new Float64Array(3);return z[0]=Math.sin(b)*I,z[1]=Math.sin(A),z[2]=Math.cos(b)*I,z}function ai(u){return function(e,r){const a=Math.cos(r),l=new Float64Array(3);return l[0]=Math.sin(e)*a,l[1]=Math.sin(r),l[2]=Math.cos(e)*a,l}(u.lng*Math.PI/180,u.lat*Math.PI/180)}function bo(u,e){return u/(2*Math.PI)/Math.cos(e*Math.PI/180)}function gs(u){const e=Math.asin(u[1])/Math.PI*180,r=Math.sqrt(u[0]*u[0]+u[2]*u[2]);if(r>1e-6){const a=u[0]/r,l=Math.acos(u[2]/r),h=(a>0?l:-l)/Math.PI*180;return new o.Q(o.aL(h,-180,180),e)}return new o.Q(0,e)}function $n(u){return Math.cos(u*Math.PI/180)}function li(u,e){const r=$n(u),a=$n(e);return o.ah(a/r)}function aa(u,e){const r=u.rotate(e.bearingInRadians),a=e.zoom+li(e.center.lat,0),l=o.bc(1/$n(e.center.lat),1/$n(Math.min(Math.abs(e.center.lat),60)),o.bf(a,7,3,0,1)),h=360/ms({worldSize:e.worldSize,center:{lat:e.center.lat}});return new o.Q(e.center.lng-r.x*h*l,o.ae(e.center.lat+r.y*h,-85.051129,o.af))}function la(u){const e=.5*u,r=Math.sin(e),a=Math.cos(e);return Math.log(r+a)-Math.log(a-r)}function gu(u,e,r,a){const l=u.lat+r*a;if(Math.abs(r)>1){const h=(Math.sign(u.lat+r)!==Math.sign(u.lat)?-Math.abs(u.lat):Math.abs(u.lat))*Math.PI/180,g=Math.abs(u.lat+r)*Math.PI/180,b=la(h+a*(g-h)),A=la(h),I=la(g);return new o.Q(u.lng+e*((b-A)/(I-A)),l)}return new o.Q(u.lng+e*a,l)}class ip{constructor(e){this._cachePrevious=new Map,this._cache=new Map,this._hadAnyChanges=!1,this._aabbFactory=e}recalculateCache(){if(!this._hadAnyChanges)return;const e=this._cachePrevious;this._cachePrevious=this._cache,this._cache=e,this._cache.clear(),this._hadAnyChanges=!1}getTileAABB(e,r,a,l){const h=`${e.z}_${e.x}_${e.y}`,g=this._cache.get(h);if(g)return g;const b=this._cachePrevious.get(h);if(b)return this._cache.set(h,b),b;const A=this._aabbFactory(e,r,a,l);return this._cache.set(h,A),this._hadAnyChanges=!0,A}}function Ai(u,e,r){const a=u-e;return a<0?-a:Math.max(0,a-r)}function ys(u,e,r,a,l){const h=u-r;let g;return g=h<0?Math.min(-h,1+h-l):h>1?Math.min(Math.max(h-l,0),1-h):0,Math.max(g,Ai(e,a,l))}class vn{constructor(){this._aabbCache=new ip(this._computeTileAABB)}recalculateCache(){this._aabbCache.recalculateCache()}distanceToTile2d(e,r,a,l){const h=1<<a.z,g=1/h,b=a.x/h,A=a.y/h;let I=2;return I=Math.min(I,ys(e,r,b,A,g)),I=Math.min(I,ys(e,r,b+.5,-A-g,g)),I=Math.min(I,ys(e,r,b+.5,2-A-g,g)),I}getWrap(e,r,a){const l=1<<r.z,h=1/l,g=r.x/l,b=Ai(e.x,g,h),A=Ai(e.x,g-1,h),I=Ai(e.x,g+1,h),z=Math.min(b,A,I);return z===I?1:z===A?-1:0}allowVariableZoom(e,r){return Me(e,r)>4}allowWorldCopies(){return!1}getTileAABB(e,r,a,l){return this._aabbCache.getTileAABB(e,r,a,l)}_computeTileAABB(e,r,a,l){if(e.z<=0)return new xe([-1,-1,-1],[1,1,1]);if(e.z===1)return new xe([e.x===0?-1:0,e.y===0?0:-1,-1],[e.x===0?0:1,e.y===0?1:0,1]);{const h=[xo(0,0,e.x,e.y,e.z),xo(o.Z,0,e.x,e.y,e.z),xo(o.Z,o.Z,e.x,e.y,e.z),xo(0,o.Z,e.x,e.y,e.z)],g=[1,1,1],b=[-1,-1,-1];for(const A of h)for(let I=0;I<3;I++)g[I]=Math.min(g[I],A[I]),b[I]=Math.max(b[I],A[I]);if(e.y===0||e.y===(1<<e.z)-1){const A=[0,e.y===0?1:-1,0];for(let I=0;I<3;I++)g[I]=Math.min(g[I],A[I]),b[I]=Math.max(b[I],A[I])}return new xe(g,b)}}}class vo{get pixelsToClipSpaceMatrix(){return this._helper.pixelsToClipSpaceMatrix}get clipSpaceToPixelsMatrix(){return this._helper.clipSpaceToPixelsMatrix}get pixelsToGLUnits(){return this._helper.pixelsToGLUnits}get centerOffset(){return this._helper.centerOffset}get size(){return this._helper.size}get rotationMatrix(){return this._helper.rotationMatrix}get centerPoint(){return this._helper.centerPoint}get pixelsPerMeter(){return this._helper.pixelsPerMeter}setMinZoom(e){this._helper.setMinZoom(e)}setMaxZoom(e){this._helper.setMaxZoom(e)}setMinPitch(e){this._helper.setMinPitch(e)}setMaxPitch(e){this._helper.setMaxPitch(e)}setRenderWorldCopies(e){this._helper.setRenderWorldCopies(e)}setBearing(e){this._helper.setBearing(e)}setPitch(e){this._helper.setPitch(e)}setRoll(e){this._helper.setRoll(e)}setFov(e){this._helper.setFov(e)}setZoom(e){this._helper.setZoom(e)}setCenter(e){this._helper.setCenter(e)}setElevation(e){this._helper.setElevation(e)}setMinElevationForCurrentTile(e){this._helper.setMinElevationForCurrentTile(e)}setPadding(e){this._helper.setPadding(e)}interpolatePadding(e,r,a){return this._helper.interpolatePadding(e,r,a)}isPaddingEqual(e){return this._helper.isPaddingEqual(e)}resize(e,r){this._helper.resize(e,r)}getMaxBounds(){return this._helper.getMaxBounds()}setMaxBounds(e){this._helper.setMaxBounds(e)}overrideNearFarZ(e,r){this._helper.overrideNearFarZ(e,r)}clearNearFarZOverride(){this._helper.clearNearFarZOverride()}getCameraQueryGeometry(e){return this._helper.getCameraQueryGeometry(this.getCameraPoint(),e)}get tileSize(){return this._helper.tileSize}get tileZoom(){return this._helper.tileZoom}get scale(){return this._helper.scale}get worldSize(){return this._helper.worldSize}get width(){return this._helper.width}get height(){return this._helper.height}get lngRange(){return this._helper.lngRange}get latRange(){return this._helper.latRange}get minZoom(){return this._helper.minZoom}get maxZoom(){return this._helper.maxZoom}get zoom(){return this._helper.zoom}get center(){return this._helper.center}get minPitch(){return this._helper.minPitch}get maxPitch(){return this._helper.maxPitch}get pitch(){return this._helper.pitch}get pitchInRadians(){return this._helper.pitchInRadians}get roll(){return this._helper.roll}get rollInRadians(){return this._helper.rollInRadians}get bearing(){return this._helper.bearing}get bearingInRadians(){return this._helper.bearingInRadians}get fov(){return this._helper.fov}get fovInRadians(){return this._helper.fovInRadians}get elevation(){return this._helper.elevation}get minElevationForCurrentTile(){return this._helper.minElevationForCurrentTile}get padding(){return this._helper.padding}get unmodified(){return this._helper.unmodified}get renderWorldCopies(){return this._helper.renderWorldCopies}get nearZ(){return this._helper.nearZ}get farZ(){return this._helper.farZ}get autoCalculateNearFarZ(){return this._helper.autoCalculateNearFarZ}setTransitionState(e){}constructor(){this._cachedClippingPlane=o.bk(),this._projectionMatrix=o.b1(),this._globeViewProjMatrix32f=o.b0(),this._globeViewProjMatrixNoCorrection=o.b1(),this._globeViewProjMatrixNoCorrectionInverted=o.b1(),this._globeProjMatrixInverted=o.b1(),this._cameraPosition=o.bh(),this._globeLatitudeErrorCorrectionRadians=0,this._helper=new pe({calcMatrices:()=>{this._calcMatrices()},getConstrained:(e,r)=>this.getConstrained(e,r)}),this._coveringTilesDetailsProvider=new vn}clone(){const e=new vo;return e.apply(this),e}apply(e,r){this._globeLatitudeErrorCorrectionRadians=r||0,this._helper.apply(e)}get projectionMatrix(){return this._projectionMatrix}get modelViewProjectionMatrix(){return this._globeViewProjMatrixNoCorrection}get inverseProjectionMatrix(){return this._globeProjMatrixInverted}get cameraPosition(){const e=o.bh();return e[0]=this._cameraPosition[0],e[1]=this._cameraPosition[1],e[2]=this._cameraPosition[2],e}get cameraToCenterDistance(){return this._helper.cameraToCenterDistance}getProjectionData(e){const{overscaledTileID:r,applyGlobeMatrix:a}=e,l=this._helper.getMercatorTileCoordinates(r);return{mainMatrix:this._globeViewProjMatrix32f,tileMercatorCoords:l,clippingPlane:this._cachedClippingPlane,projectionTransition:a?1:0,fallbackMatrix:this._globeViewProjMatrix32f}}_computeClippingPlane(e){const r=this.pitchInRadians,a=this.cameraToCenterDistance/e,l=Math.sin(r)*a,h=Math.cos(r)*a+1,g=1/Math.sqrt(l*l+h*h)*1;let b=-l,A=h;const I=Math.sqrt(b*b+A*A);b/=I,A/=I;const z=[0,b,A];o.bl(z,z,[0,0,0],-this.bearingInRadians),o.bm(z,z,[0,0,0],-1*this.center.lat*Math.PI/180),o.bn(z,z,[0,0,0],this.center.lng*Math.PI/180);const F=1/o.bo(z);return o.aO(z,z,F),[...z,-g*F]}isLocationOccluded(e){return!this.isSurfacePointVisible(ai(e))}transformLightDirection(e){const r=this._helper._center.lng*Math.PI/180,a=this._helper._center.lat*Math.PI/180,l=Math.cos(a),h=[Math.sin(r)*l,Math.sin(a),Math.cos(r)*l],g=[h[2],0,-h[0]],b=[0,0,0];o.aU(b,g,h),o.aT(g,g),o.aT(b,b);const A=[0,0,0];return o.aT(A,[g[0]*e[0]+b[0]*e[1]+h[0]*e[2],g[1]*e[0]+b[1]*e[1]+h[1]*e[2],g[2]*e[0]+b[2]*e[1]+h[2]*e[2]]),A}getPixelScale(){return 1/Math.cos(this._helper._center.lat*Math.PI/180)}getCircleRadiusCorrection(){return Math.cos(this._helper._center.lat*Math.PI/180)}getPitchedTextCorrection(e,r,a){const l=function(b,A,I){const z=1/(1<<I.z);return new o.$(b/o.Z*z+I.x*z,A/o.Z*z+I.y*z)}(e,r,a.canonical),h=(g=l.y,[o.bg(l.x*Math.PI*2+Math.PI,2*Math.PI),2*Math.atan(Math.exp(Math.PI-g*Math.PI*2))-.5*Math.PI]);var g;return this.getCircleRadiusCorrection()/Math.cos(h[1])}projectTileCoordinates(e,r,a,l){const h=a.canonical,g=xo(e,r,h.x,h.y,h.z),b=1+(l?l(e,r):0)/o.bu,A=[g[0]*b,g[1]*b,g[2]*b,1];o.at(A,A,this._globeViewProjMatrixNoCorrection);const I=this._cachedClippingPlane,z=I[0]*g[0]+I[1]*g[1]+I[2]*g[2]+I[3]<0;return{point:new o.P(A[0]/A[3],A[1]/A[3]),signedDistanceFromCamera:A[3],isOccluded:z}}_calcMatrices(){if(!this._helper._width||!this._helper._height)return;const e=bo(this.worldSize,this.center.lat),r=o.b2(),a=o.b2();this._helper.autoCalculateNearFarZ&&(this._helper._nearZ=.5,this._helper._farZ=this.cameraToCenterDistance+2*e),o.aY(r,this.fovInRadians,this.width/this.height,this._helper._nearZ,this._helper._farZ);const l=this.centerOffset;r[8]=2*-l.x/this._helper._width,r[9]=2*l.y/this._helper._height,this._projectionMatrix=o.aZ(r),this._globeProjMatrixInverted=o.b2(),o.an(this._globeProjMatrixInverted,r),o.L(r,r,[0,0,-this.cameraToCenterDistance]),o.a_(r,r,this.rollInRadians),o.a$(r,r,-this.pitchInRadians),o.a_(r,r,this.bearingInRadians),o.L(r,r,[0,0,-e]);const h=o.bh();h[0]=e,h[1]=e,h[2]=e,o.a$(a,r,this.center.lat*Math.PI/180),o.bp(a,a,-this.center.lng*Math.PI/180),o.M(a,a,h),this._globeViewProjMatrixNoCorrection=a,o.a$(r,r,this.center.lat*Math.PI/180-this._globeLatitudeErrorCorrectionRadians),o.bp(r,r,-this.center.lng*Math.PI/180),o.M(r,r,h),this._globeViewProjMatrix32f=new Float32Array(r),this._globeViewProjMatrixNoCorrectionInverted=o.b2(),o.an(this._globeViewProjMatrixNoCorrectionInverted,a);const g=o.bh();this._cameraPosition=o.bh(),this._cameraPosition[2]=this.cameraToCenterDistance/e,o.bl(this._cameraPosition,this._cameraPosition,g,-this.rollInRadians),o.bm(this._cameraPosition,this._cameraPosition,g,this.pitchInRadians),o.bl(this._cameraPosition,this._cameraPosition,g,-this.bearingInRadians),o.aP(this._cameraPosition,this._cameraPosition,[0,0,1]),o.bm(this._cameraPosition,this._cameraPosition,g,-this.center.lat*Math.PI/180),o.bn(this._cameraPosition,this._cameraPosition,g,this.center.lng*Math.PI/180),this._cachedClippingPlane=this._computeClippingPlane(e);const b=o.aZ(this._globeViewProjMatrixNoCorrectionInverted);o.M(b,b,[1,1,-1]),this._cachedFrustum=Be.fromInvProjectionMatrix(b)}calculateFogMatrix(e){o.w("calculateFogMatrix is not supported on globe projection.");const r=o.b2();return o.ad(r),r}getVisibleUnwrappedCoordinates(e){return[new o.aW(0,e)]}getCameraFrustum(){return this._cachedFrustum}getClippingPlane(){return this._cachedClippingPlane}getCoveringTilesDetailsProvider(){return this._coveringTilesDetailsProvider}recalculateZoomAndCenter(e){e&&o.w("terrain is not fully supported on vertical perspective projection."),this._helper.recalculateZoomAndCenter(0)}maxPitchScaleFactor(){return 1}getCameraPoint(){return this._helper.getCameraPoint()}getCameraAltitude(){return this._helper.getCameraAltitude()}getCameraLngLat(){return this._helper.getCameraLngLat()}lngLatToCameraDepth(e,r){if(!this._globeViewProjMatrixNoCorrection)return 1;const a=ai(e);o.aO(a,a,1+r/o.bu);const l=o.bk();return o.at(l,[a[0],a[1],a[2],1],this._globeViewProjMatrixNoCorrection),l[2]/l[3]}populateCache(e){}getBounds(){const e=.5*this.width,r=.5*this.height,a=[new o.P(0,0),new o.P(e,0),new o.P(this.width,0),new o.P(this.width,r),new o.P(this.width,this.height),new o.P(e,this.height),new o.P(0,this.height),new o.P(0,r)],l=[];for(const F of a)l.push(this.unprojectScreenPoint(F));let h=0,g=0,b=0,A=0;const I=this.center;for(const F of l){const O=o.bq(I.lng,F.lng),Z=o.bq(I.lat,F.lat);O<g&&(g=O),O>h&&(h=O),Z<A&&(A=Z),Z>b&&(b=Z)}const z=[I.lng+g,I.lat+A,I.lng+h,I.lat+b];return this.isSurfacePointOnScreen([0,1,0])&&(z[3]=90,z[0]=-180,z[2]=180),this.isSurfacePointOnScreen([0,-1,0])&&(z[1]=-90,z[0]=-180,z[2]=180),new ct(z)}getConstrained(e,r){const a=o.ae(e.lat,-85.051129,o.af),l=o.ae(+r,this.minZoom+li(0,a),this.maxZoom);return{center:new o.Q(e.lng,a),zoom:l}}calculateCenterFromCameraLngLatAlt(e,r,a,l){return this._helper.calculateCenterFromCameraLngLatAlt(e,r,a,l)}setLocationAtPoint(e,r){const a=ai(this.unprojectScreenPoint(r)),l=ai(e),h=o.bh();o.br(h);const g=o.bh();o.bn(g,a,h,-this.center.lng*Math.PI/180),o.bm(g,g,h,this.center.lat*Math.PI/180);const b=l[0]*l[0]+l[2]*l[2],A=g[0]*g[0];if(b<A)return;const I=Math.sqrt(b-A),z=-I,F=o.bs(l[0],l[2],g[0],I),O=o.bs(l[0],l[2],g[0],z),Z=o.bh();o.bn(Z,l,h,-F);const J=o.bs(Z[1],Z[2],g[1],g[2]),oe=o.bh();o.bn(oe,l,h,-O);const ne=o.bs(oe[1],oe[2],g[1],g[2]),se=.5*Math.PI,de=J>=-se&&J<=se,_e=ne>=-se&&ne<=se;let ye,be;if(de&&_e){const We=this.center.lng*Math.PI/180,Fe=this.center.lat*Math.PI/180;o.bv(F,We)+o.bv(J,Fe)<o.bv(O,We)+o.bv(ne,Fe)?(ye=F,be=J):(ye=O,be=ne)}else if(de)ye=F,be=J;else{if(!_e)return;ye=O,be=ne}const ke=ye/Math.PI*180,we=be/Math.PI*180,Le=this.center.lat;this.setCenter(new o.Q(ke,o.ae(we,-90,90))),this.setZoom(this.zoom+li(Le,this.center.lat))}locationToScreenPoint(e,r){const a=ai(e);if(r){const l=r.getElevationForLngLatZoom(e,this._helper._tileZoom);o.aO(a,a,1+l/o.bu)}return this._projectSurfacePointToScreen(a)}_projectSurfacePointToScreen(e){const r=o.bk();return o.at(r,[...e,1],this._globeViewProjMatrixNoCorrection),r[0]/=r[3],r[1]/=r[3],new o.P((.5*r[0]+.5)*this.width,(.5*-r[1]+.5)*this.height)}screenPointToMercatorCoordinate(e,r){if(r){const a=r.pointCoordinate(e);if(a)return a}return o.$.fromLngLat(this.unprojectScreenPoint(e))}screenPointToLocation(e,r){var a;return(a=this.screenPointToMercatorCoordinate(e,r))===null||a===void 0?void 0:a.toLngLat()}isPointOnMapSurface(e,r){const a=this._cameraPosition,l=this.getRayDirectionFromPixel(e);return!!this.rayPlanetIntersection(a,l)}getRayDirectionFromPixel(e){const r=o.bk();r[0]=e.x/this.width*2-1,r[1]=-1*(e.y/this.height*2-1),r[2]=1,r[3]=1,o.at(r,r,this._globeViewProjMatrixNoCorrectionInverted),r[0]/=r[3],r[1]/=r[3],r[2]/=r[3];const a=o.bh();a[0]=r[0]-this._cameraPosition[0],a[1]=r[1]-this._cameraPosition[1],a[2]=r[2]-this._cameraPosition[2];const l=o.bh();return o.aT(l,a),l}isSurfacePointVisible(e){const r=this._cachedClippingPlane;return r[0]*e[0]+r[1]*e[1]+r[2]*e[2]+r[3]>=0}isSurfacePointOnScreen(e){if(!this.isSurfacePointVisible(e))return!1;const r=o.bk();return o.at(r,[...e,1],this._globeViewProjMatrixNoCorrection),r[0]/=r[3],r[1]/=r[3],r[2]/=r[3],r[0]>-1&&r[0]<1&&r[1]>-1&&r[1]<1&&r[2]>-1&&r[2]<1}rayPlanetIntersection(e,r){const a=o.aV(e,r),l=o.bh(),h=o.bh();o.aO(h,r,a),o.aS(l,e,h);const g=1-o.aV(l,l);if(g<0)return null;const b=o.aV(e,e)-1,A=-a+(a<0?1:-1)*Math.sqrt(g),I=b/A,z=A;return{tMin:Math.min(I,z),tMax:Math.max(I,z)}}unprojectScreenPoint(e){const r=this._cameraPosition,a=this.getRayDirectionFromPixel(e),l=this.rayPlanetIntersection(r,a);if(l){const z=o.bh();o.aP(z,r,[a[0]*l.tMin,a[1]*l.tMin,a[2]*l.tMin]);const F=o.bh();return o.aT(F,z),gs(F)}const h=this._cachedClippingPlane,g=h[0]*a[0]+h[1]*a[1]+h[2]*a[2],b=-o.bt(h,r)/g,A=o.bh();if(b>0)o.aP(A,r,[a[0]*b,a[1]*b,a[2]*b]);else{const z=o.bh();o.aP(z,r,[2*a[0],2*a[1],2*a[2]]);const F=o.bt(this._cachedClippingPlane,z);o.aS(A,z,[this._cachedClippingPlane[0]*F,this._cachedClippingPlane[1]*F,this._cachedClippingPlane[2]*F])}const I=function(z){const F=o.bh();return F[0]=z[0]*-z[3],F[1]=z[1]*-z[3],F[2]=z[2]*-z[3],{center:F,radius:Math.sqrt(1-z[3]*z[3])}}(h);return gs(function(z,F,O){const Z=o.bh();o.aS(Z,O,z);const J=o.bh();return o.bi(J,z,Z,F/o.bj(Z)),J}(I.center,I.radius,A))}getMatrixForModel(e,r){const a=o.Q.convert(e),l=1/o.bu,h=o.b1();return o.bp(h,h,a.lng/180*Math.PI),o.a$(h,h,-a.lat/180*Math.PI),o.L(h,h,[0,0,1+r/o.bu]),o.a$(h,h,.5*Math.PI),o.M(h,h,[l,l,l]),h}getProjectionDataForCustomLayer(e=!0){const r=this.getProjectionData({overscaledTileID:new o.Y(0,0,0,0,0),applyGlobeMatrix:e});return r.tileMercatorCoords=[0,0,1,1],r}getFastPathSimpleProjectionMatrix(e){}}class _s{get pixelsToClipSpaceMatrix(){return this._helper.pixelsToClipSpaceMatrix}get clipSpaceToPixelsMatrix(){return this._helper.clipSpaceToPixelsMatrix}get pixelsToGLUnits(){return this._helper.pixelsToGLUnits}get centerOffset(){return this._helper.centerOffset}get size(){return this._helper.size}get rotationMatrix(){return this._helper.rotationMatrix}get centerPoint(){return this._helper.centerPoint}get pixelsPerMeter(){return this._helper.pixelsPerMeter}setMinZoom(e){this._helper.setMinZoom(e)}setMaxZoom(e){this._helper.setMaxZoom(e)}setMinPitch(e){this._helper.setMinPitch(e)}setMaxPitch(e){this._helper.setMaxPitch(e)}setRenderWorldCopies(e){this._helper.setRenderWorldCopies(e)}setBearing(e){this._helper.setBearing(e)}setPitch(e){this._helper.setPitch(e)}setRoll(e){this._helper.setRoll(e)}setFov(e){this._helper.setFov(e)}setZoom(e){this._helper.setZoom(e)}setCenter(e){this._helper.setCenter(e)}setElevation(e){this._helper.setElevation(e)}setMinElevationForCurrentTile(e){this._helper.setMinElevationForCurrentTile(e)}setPadding(e){this._helper.setPadding(e)}interpolatePadding(e,r,a){return this._helper.interpolatePadding(e,r,a)}isPaddingEqual(e){return this._helper.isPaddingEqual(e)}resize(e,r,a=!0){this._helper.resize(e,r,a)}getMaxBounds(){return this._helper.getMaxBounds()}setMaxBounds(e){this._helper.setMaxBounds(e)}overrideNearFarZ(e,r){this._helper.overrideNearFarZ(e,r)}clearNearFarZOverride(){this._helper.clearNearFarZOverride()}getCameraQueryGeometry(e){return this._helper.getCameraQueryGeometry(this.getCameraPoint(),e)}get tileSize(){return this._helper.tileSize}get tileZoom(){return this._helper.tileZoom}get scale(){return this._helper.scale}get worldSize(){return this._helper.worldSize}get width(){return this._helper.width}get height(){return this._helper.height}get lngRange(){return this._helper.lngRange}get latRange(){return this._helper.latRange}get minZoom(){return this._helper.minZoom}get maxZoom(){return this._helper.maxZoom}get zoom(){return this._helper.zoom}get center(){return this._helper.center}get minPitch(){return this._helper.minPitch}get maxPitch(){return this._helper.maxPitch}get pitch(){return this._helper.pitch}get pitchInRadians(){return this._helper.pitchInRadians}get roll(){return this._helper.roll}get rollInRadians(){return this._helper.rollInRadians}get bearing(){return this._helper.bearing}get bearingInRadians(){return this._helper.bearingInRadians}get fov(){return this._helper.fov}get fovInRadians(){return this._helper.fovInRadians}get elevation(){return this._helper.elevation}get minElevationForCurrentTile(){return this._helper.minElevationForCurrentTile}get padding(){return this._helper.padding}get unmodified(){return this._helper.unmodified}get renderWorldCopies(){return this._helper.renderWorldCopies}get cameraToCenterDistance(){return this._helper.cameraToCenterDistance}get nearZ(){return this._helper.nearZ}get farZ(){return this._helper.farZ}get autoCalculateNearFarZ(){return this._helper.autoCalculateNearFarZ}get isGlobeRendering(){return this._globeness>0}setTransitionState(e,r){this._globeness=e,this._globeLatitudeErrorCorrectionRadians=r,this._calcMatrices(),this._verticalPerspectiveTransform.getCoveringTilesDetailsProvider().recalculateCache(),this._mercatorTransform.getCoveringTilesDetailsProvider().recalculateCache()}get currentTransform(){return this.isGlobeRendering?this._verticalPerspectiveTransform:this._mercatorTransform}constructor(){this._globeLatitudeErrorCorrectionRadians=0,this._globeness=1,this._helper=new pe({calcMatrices:()=>{this._calcMatrices()},getConstrained:(e,r)=>this.getConstrained(e,r)}),this._globeness=1,this._mercatorTransform=new st,this._verticalPerspectiveTransform=new vo}clone(){const e=new _s;return e._globeness=this._globeness,e._globeLatitudeErrorCorrectionRadians=this._globeLatitudeErrorCorrectionRadians,e.apply(this),e}apply(e){this._helper.apply(e),this._mercatorTransform.apply(this),this._verticalPerspectiveTransform.apply(this,this._globeLatitudeErrorCorrectionRadians)}get projectionMatrix(){return this.currentTransform.projectionMatrix}get modelViewProjectionMatrix(){return this.currentTransform.modelViewProjectionMatrix}get inverseProjectionMatrix(){return this.currentTransform.inverseProjectionMatrix}get cameraPosition(){return this.currentTransform.cameraPosition}getProjectionData(e){const r=this._mercatorTransform.getProjectionData(e),a=this._verticalPerspectiveTransform.getProjectionData(e);return{mainMatrix:this.isGlobeRendering?a.mainMatrix:r.mainMatrix,clippingPlane:a.clippingPlane,tileMercatorCoords:a.tileMercatorCoords,projectionTransition:e.applyGlobeMatrix?this._globeness:0,fallbackMatrix:r.fallbackMatrix}}isLocationOccluded(e){return this.currentTransform.isLocationOccluded(e)}transformLightDirection(e){return this.currentTransform.transformLightDirection(e)}getPixelScale(){return o.bc(this._mercatorTransform.getPixelScale(),this._verticalPerspectiveTransform.getPixelScale(),this._globeness)}getCircleRadiusCorrection(){return o.bc(this._mercatorTransform.getCircleRadiusCorrection(),this._verticalPerspectiveTransform.getCircleRadiusCorrection(),this._globeness)}getPitchedTextCorrection(e,r,a){const l=this._mercatorTransform.getPitchedTextCorrection(e,r,a),h=this._verticalPerspectiveTransform.getPitchedTextCorrection(e,r,a);return o.bc(l,h,this._globeness)}projectTileCoordinates(e,r,a,l){return this.currentTransform.projectTileCoordinates(e,r,a,l)}_calcMatrices(){this._helper._width&&this._helper._height&&(this._verticalPerspectiveTransform.apply(this,this._globeLatitudeErrorCorrectionRadians),this._helper._nearZ=this._verticalPerspectiveTransform.nearZ,this._helper._farZ=this._verticalPerspectiveTransform.farZ,this._mercatorTransform.apply(this,!0,this.isGlobeRendering),this._helper._nearZ=this._mercatorTransform.nearZ,this._helper._farZ=this._mercatorTransform.farZ)}calculateFogMatrix(e){return this.currentTransform.calculateFogMatrix(e)}getVisibleUnwrappedCoordinates(e){return this.currentTransform.getVisibleUnwrappedCoordinates(e)}getCameraFrustum(){return this.currentTransform.getCameraFrustum()}getClippingPlane(){return this.currentTransform.getClippingPlane()}getCoveringTilesDetailsProvider(){return this.currentTransform.getCoveringTilesDetailsProvider()}recalculateZoomAndCenter(e){this._mercatorTransform.recalculateZoomAndCenter(e),this._verticalPerspectiveTransform.recalculateZoomAndCenter(e)}maxPitchScaleFactor(){return this._mercatorTransform.maxPitchScaleFactor()}getCameraPoint(){return this._helper.getCameraPoint()}getCameraAltitude(){return this._helper.getCameraAltitude()}getCameraLngLat(){return this._helper.getCameraLngLat()}lngLatToCameraDepth(e,r){return this.currentTransform.lngLatToCameraDepth(e,r)}populateCache(e){this._mercatorTransform.populateCache(e),this._verticalPerspectiveTransform.populateCache(e)}getBounds(){return this.currentTransform.getBounds()}getConstrained(e,r){return this.currentTransform.getConstrained(e,r)}calculateCenterFromCameraLngLatAlt(e,r,a,l){return this._helper.calculateCenterFromCameraLngLatAlt(e,r,a,l)}setLocationAtPoint(e,r){if(!this.isGlobeRendering)return this._mercatorTransform.setLocationAtPoint(e,r),void this.apply(this._mercatorTransform);this._verticalPerspectiveTransform.setLocationAtPoint(e,r),this.apply(this._verticalPerspectiveTransform)}locationToScreenPoint(e,r){return this.currentTransform.locationToScreenPoint(e,r)}screenPointToMercatorCoordinate(e,r){return this.currentTransform.screenPointToMercatorCoordinate(e,r)}screenPointToLocation(e,r){return this.currentTransform.screenPointToLocation(e,r)}isPointOnMapSurface(e,r){return this.currentTransform.isPointOnMapSurface(e,r)}getRayDirectionFromPixel(e){return this._verticalPerspectiveTransform.getRayDirectionFromPixel(e)}getMatrixForModel(e,r){return this.currentTransform.getMatrixForModel(e,r)}getProjectionDataForCustomLayer(e=!0){const r=this._mercatorTransform.getProjectionDataForCustomLayer(e);if(!this.isGlobeRendering)return r;const a=this._verticalPerspectiveTransform.getProjectionDataForCustomLayer(e);return a.fallbackMatrix=r.mainMatrix,a}getFastPathSimpleProjectionMatrix(e){return this.currentTransform.getFastPathSimpleProjectionMatrix(e)}}class $i{get useGlobeControls(){return!0}handlePanInertia(e,r){const a=aa(e,r);return Math.abs(a.lng-r.center.lng)>180&&(a.lng=r.center.lng+179.5*Math.sign(a.lng-r.center.lng)),{easingCenter:a,easingOffset:new o.P(0,0)}}handleMapControlsRollPitchBearingZoom(e,r){const a=e.around,l=r.screenPointToLocation(a);e.bearingDelta&&r.setBearing(r.bearing+e.bearingDelta),e.pitchDelta&&r.setPitch(r.pitch+e.pitchDelta),e.rollDelta&&r.setRoll(r.roll+e.rollDelta);const h=r.zoom;e.zoomDelta&&r.setZoom(r.zoom+e.zoomDelta);const g=r.zoom-h;if(g===0)return;const b=o.bq(r.center.lng,l.lng),A=b/(Math.abs(b/180)+1),I=o.bq(r.center.lat,l.lat),z=r.getRayDirectionFromPixel(a),F=r.cameraPosition,O=-1*o.aV(F,z),Z=o.bh();o.aP(Z,F,[z[0]*O,z[1]*O,z[2]*O]);const J=o.bo(Z)-1,oe=Math.exp(.5*-Math.max(J-.3,0)),ne=bo(r.worldSize,r.center.lat)/Math.min(r.width,r.height),se=o.bf(ne,.9,.5,1,.25),de=(1-o.ac(-g))*Math.min(oe,se),_e=r.center.lat,ye=r.zoom,be=new o.Q(r.center.lng+A*de,o.ae(r.center.lat+I*de,-85.051129,o.af));r.setLocationAtPoint(l,a);const ke=r.center,we=o.bf(Math.abs(b),45,85,0,1),Le=o.bf(ne,.75,.35,0,1),We=Math.pow(Math.max(we,Le),.25),Fe=o.bq(ke.lng,be.lng),Ne=o.bq(ke.lat,be.lat);r.setCenter(new o.Q(ke.lng+Fe*We,ke.lat+Ne*We).wrap()),r.setZoom(ye+li(_e,r.center.lat))}handleMapControlsPan(e,r,a){if(!e.panDelta)return;const l=r.center.lat,h=r.zoom;r.setCenter(aa(e.panDelta,r).wrap()),r.setZoom(h+li(l,r.center.lat))}cameraForBoxAndBearing(e,r,a,l,h){const g=ze(e,r,a,l,h),b=r.left/h.width*2-1,A=(h.width-r.right)/h.width*2-1,I=r.top/h.height*-2+1,z=(h.height-r.bottom)/h.height*-2+1,F=o.bq(a.getWest(),a.getEast())<0,O=F?a.getEast():a.getWest(),Z=F?a.getWest():a.getEast(),J=Math.max(a.getNorth(),a.getSouth()),oe=Math.min(a.getNorth(),a.getSouth()),ne=O+.5*o.bq(O,Z),se=J+.5*o.bq(J,oe),de=h.clone();de.setCenter(g.center),de.setBearing(g.bearing),de.setPitch(0),de.setRoll(0),de.setZoom(g.zoom);const _e=de.modelViewProjectionMatrix,ye=[ai(a.getNorthWest()),ai(a.getNorthEast()),ai(a.getSouthWest()),ai(a.getSouthEast()),ai(new o.Q(Z,se)),ai(new o.Q(O,se)),ai(new o.Q(ne,J)),ai(new o.Q(ne,oe))],be=ai(g.center);let ke=Number.POSITIVE_INFINITY;for(const we of ye)b<0&&(ke=$i.getLesserNonNegativeNonNull(ke,$i.solveVectorScale(we,be,_e,"x",b))),A>0&&(ke=$i.getLesserNonNegativeNonNull(ke,$i.solveVectorScale(we,be,_e,"x",A))),I>0&&(ke=$i.getLesserNonNegativeNonNull(ke,$i.solveVectorScale(we,be,_e,"y",I))),z<0&&(ke=$i.getLesserNonNegativeNonNull(ke,$i.solveVectorScale(we,be,_e,"y",z)));if(Number.isFinite(ke)&&ke!==0)return g.zoom=de.zoom+o.ah(ke),g;Je()}handleJumpToCenterZoom(e,r){const a=e.center.lat,l=e.getConstrained(r.center?o.Q.convert(r.center):e.center,e.zoom).center;e.setCenter(l.wrap());const h=r.zoom!==void 0?+r.zoom:e.zoom+li(a,l.lat);e.zoom!==h&&e.setZoom(h)}handleEaseTo(e,r){const a=e.zoom,l=e.center,h=e.padding,g={roll:e.roll,pitch:e.pitch,bearing:e.bearing},b={roll:r.roll===void 0?e.roll:r.roll,pitch:r.pitch===void 0?e.pitch:r.pitch,bearing:r.bearing===void 0?e.bearing:r.bearing},A=r.zoom!==void 0,I=!e.isPaddingEqual(r.padding);let z=!1;const F=r.center?o.Q.convert(r.center):l,O=e.getConstrained(F,a).center;ce(e,O);const Z=e.clone();Z.setCenter(O),Z.setZoom(A?+r.zoom:a+li(l.lat,F.lat)),Z.setBearing(r.bearing);const J=new o.P(o.ae(e.centerPoint.x+r.offsetAsPoint.x,0,e.width),o.ae(e.centerPoint.y+r.offsetAsPoint.y,0,e.height));Z.setLocationAtPoint(O,J);const oe=(r.offset&&r.offsetAsPoint.mag())>0?Z.center:O,ne=A?+r.zoom:a+li(l.lat,oe.lat),se=a+li(l.lat,0),de=ne+li(oe.lat,0),_e=o.bq(l.lng,oe.lng),ye=o.bq(l.lat,oe.lat),be=o.ac(de-se);return z=ne!==a,{easeFunc:ke=>{if(o.b6(g,b)||it({startEulerAngles:g,endEulerAngles:b,tr:e,k:ke,useSlerp:g.roll!=b.roll}),I&&e.interpolatePadding(h,r.padding,ke),r.around)o.w("Easing around a point is not supported under globe projection."),e.setLocationAtPoint(r.around,r.aroundPoint);else{const we=de>se?Math.min(2,be):Math.max(.5,be),Le=Math.pow(we,1-ke),We=gu(l,_e,ye,ke*Le);e.setCenter(We.wrap())}if(z){const we=o.B.number(se,de,ke)+li(0,e.center.lat);e.setZoom(we)}},isZooming:z,elevationCenter:oe}}handleFlyTo(e,r){const a=r.zoom!==void 0,l=e.center,h=e.zoom,g=e.padding,b=!e.isPaddingEqual(r.padding),A=e.getConstrained(o.Q.convert(r.center||r.locationAtOffset),h).center,I=a?+r.zoom:e.zoom+li(e.center.lat,A.lat),z=e.clone();z.setCenter(A),z.setZoom(I),z.setBearing(r.bearing);const F=new o.P(o.ae(e.centerPoint.x+r.offsetAsPoint.x,0,e.width),o.ae(e.centerPoint.y+r.offsetAsPoint.y,0,e.height));z.setLocationAtPoint(A,F);const O=z.center;ce(e,O);const Z=function(ye,be,ke){const we=ai(be),Le=ai(ke),We=o.aV(we,Le),Fe=Math.acos(We),Ne=ms(ye);return Fe/(2*Math.PI)*Ne}(e,l,O),J=h+li(l.lat,0),oe=I+li(O.lat,0),ne=o.ac(oe-J);let se;if(typeof r.minZoom=="number"){const ye=+r.minZoom+li(O.lat,0),be=Math.min(ye,J,oe)+li(0,O.lat),ke=e.getConstrained(O,be).zoom+li(O.lat,0);se=o.ac(ke-J)}const de=o.bq(l.lng,O.lng),_e=o.bq(l.lat,O.lat);return{easeFunc:(ye,be,ke,we)=>{const Le=gu(l,de,_e,ke);b&&e.interpolatePadding(g,r.padding,ye);const We=ye===1?O:Le;e.setCenter(We.wrap());const Fe=J+o.ah(be);e.setZoom(ye===1?I:Fe+li(0,We.lat))},scaleOfZoom:ne,targetCenter:O,scaleOfMinZoom:se,pixelPathLength:Z}}static solveVectorScale(e,r,a,l,h){const g=l==="x"?[a[0],a[4],a[8],a[12]]:[a[1],a[5],a[9],a[13]],b=[a[3],a[7],a[11],a[15]],A=e[0]*g[0]+e[1]*g[1]+e[2]*g[2],I=e[0]*b[0]+e[1]*b[1]+e[2]*b[2],z=r[0]*g[0]+r[1]*g[1]+r[2]*g[2],F=r[0]*b[0]+r[1]*b[1]+r[2]*b[2];return z+h*I===A+h*F||b[3]*(A-z)+g[3]*(F-I)+A*F==z*I?null:(z+g[3]-h*F-h*b[3])/(z-A-h*F+h*I)}static getLesserNonNegativeNonNull(e,r){return r!==null&&r>=0&&r<e?r:e}}class wo{constructor(e){this._globe=e,this._mercatorCameraHelper=new Ge,this._verticalPerspectiveCameraHelper=new $i}get useGlobeControls(){return this._globe.useGlobeRendering}get currentHelper(){return this.useGlobeControls?this._verticalPerspectiveCameraHelper:this._mercatorCameraHelper}handlePanInertia(e,r){return this.currentHelper.handlePanInertia(e,r)}handleMapControlsRollPitchBearingZoom(e,r){return this.currentHelper.handleMapControlsRollPitchBearingZoom(e,r)}handleMapControlsPan(e,r,a){this.currentHelper.handleMapControlsPan(e,r,a)}cameraForBoxAndBearing(e,r,a,l,h){return this.currentHelper.cameraForBoxAndBearing(e,r,a,l,h)}handleJumpToCenterZoom(e,r){this.currentHelper.handleJumpToCenterZoom(e,r)}handleEaseTo(e,r){return this.currentHelper.handleEaseTo(e,r)}handleFlyTo(e,r){return this.currentHelper.handleFlyTo(e,r)}}const ca=(u,e)=>o.x(u,e&&e.filter(r=>r.identifier!=="source.canvas")),np=o.bw();class xl extends o.E{constructor(e,r={}){super(),this._rtlPluginLoaded=()=>{for(const a in this.sourceCaches){const l=this.sourceCaches[a].getSource().type;l!=="vector"&&l!=="geojson"||this.sourceCaches[a].reload()}},this.map=e,this.dispatcher=new Yr(Qi(),e._getMapId()),this.dispatcher.registerMessageHandler("GG",(a,l)=>this.getGlyphs(a,l)),this.dispatcher.registerMessageHandler("GI",(a,l)=>this.getImages(a,l)),this.imageManager=new _t,this.imageManager.setEventedParent(this),this.glyphManager=new Xt(e._requestManager,r.localIdeographFontFamily),this.lineAtlas=new Rr(256,512),this.crossTileSymbolIndex=new Yn,this._spritesImagesIds={},this._layers={},this._order=[],this.sourceCaches={},this.zoomHistory=new o.bx,this._loaded=!1,this._availableImages=[],this._resetUpdates(),this.dispatcher.broadcast("SR",o.by()),Ft().on(Vi,this._rtlPluginLoaded),this.on("data",a=>{if(a.dataType!=="source"||a.sourceDataType!=="metadata")return;const l=this.sourceCaches[a.sourceId];if(!l)return;const h=l.getSource();if(h&&h.vectorLayerIds)for(const g in this._layers){const b=this._layers[g];b.source===h.id&&this._validateLayer(b)}})}loadURL(e,r={},a){this.fire(new o.l("dataloading",{dataType:"style"})),r.validate=typeof r.validate!="boolean"||r.validate;const l=this.map._requestManager.transformRequest(e,"Style");this._loadStyleRequest=new AbortController;const h=this._loadStyleRequest;o.j(l,this._loadStyleRequest).then(g=>{this._loadStyleRequest=null,this._load(g.data,r,a)}).catch(g=>{this._loadStyleRequest=null,g&&!h.signal.aborted&&this.fire(new o.k(g))})}loadJSON(e,r={},a){this.fire(new o.l("dataloading",{dataType:"style"})),this._frameRequest=new AbortController,M.frameAsync(this._frameRequest).then(()=>{this._frameRequest=null,r.validate=r.validate!==!1,this._load(e,r,a)}).catch(()=>{})}loadEmpty(){this.fire(new o.l("dataloading",{dataType:"style"})),this._load(np,{validate:!1})}_load(e,r,a){var l,h;const g=r.transformStyle?r.transformStyle(a,e):e;if(!r.validate||!ca(this,o.y(g))){this._loaded=!0,this.stylesheet=g;for(const b in g.sources)this.addSource(b,g.sources[b],{validate:!1});g.sprite?this._loadSprite(g.sprite):this.imageManager.setLoaded(!0),this.glyphManager.setURL(g.glyphs),this._createLayers(),this.light=new ni(this.stylesheet.light),this._setProjectionInternal(((l=this.stylesheet.projection)===null||l===void 0?void 0:l.type)||"mercator"),this.sky=new Ji(this.stylesheet.sky),this.map.setTerrain((h=this.stylesheet.terrain)!==null&&h!==void 0?h:null),this.fire(new o.l("data",{dataType:"style"})),this.fire(new o.l("style.load"))}}_createLayers(){const e=o.bz(this.stylesheet.layers);this.dispatcher.broadcast("SL",e),this._order=e.map(r=>r.id),this._layers={},this._serializedLayers=null;for(const r of e){const a=o.bA(r);a.setEventedParent(this,{layer:{id:r.id}}),this._layers[r.id]=a}}_loadSprite(e,r=!1,a=void 0){let l;this.imageManager.setLoaded(!1),this._spriteRequest=new AbortController,function(h,g,b,A){return o._(this,void 0,void 0,function*(){const I=De(h),z=b>1?"@2x":"",F={},O={};for(const{id:Z,url:J}of I){const oe=g.transformRequest(qe(J,z,".json"),"SpriteJSON");F[Z]=o.j(oe,A);const ne=g.transformRequest(qe(J,z,".png"),"SpriteImage");O[Z]=te.getImage(ne,A)}return yield Promise.all([...Object.values(F),...Object.values(O)]),function(Z,J){return o._(this,void 0,void 0,function*(){const oe={};for(const ne in Z){oe[ne]={};const se=M.getImageCanvasContext((yield J[ne]).data),de=(yield Z[ne]).data;for(const _e in de){const{width:ye,height:be,x:ke,y:we,sdf:Le,pixelRatio:We,stretchX:Fe,stretchY:Ne,content:je,textFitWidth:mt,textFitHeight:pt}=de[_e];oe[ne][_e]={data:null,pixelRatio:We,sdf:Le,stretchX:Fe,stretchY:Ne,content:je,textFitWidth:mt,textFitHeight:pt,spriteData:{width:ye,height:be,x:ke,y:we,context:se}}}}return oe})}(F,O)})}(e,this.map._requestManager,this.map.getPixelRatio(),this._spriteRequest).then(h=>{if(this._spriteRequest=null,h)for(const g in h){this._spritesImagesIds[g]=[];const b=this._spritesImagesIds[g]?this._spritesImagesIds[g].filter(A=>!(A in h)):[];for(const A of b)this.imageManager.removeImage(A),this._changedImages[A]=!0;for(const A in h[g]){const I=g==="default"?A:`${g}:${A}`;this._spritesImagesIds[g].push(I),I in this.imageManager.images?this.imageManager.updateImage(I,h[g][A],!1):this.imageManager.addImage(I,h[g][A]),r&&(this._changedImages[I]=!0)}}}).catch(h=>{this._spriteRequest=null,l=h,this.fire(new o.k(l))}).finally(()=>{this.imageManager.setLoaded(!0),this._availableImages=this.imageManager.listImages(),r&&(this._changed=!0),this.dispatcher.broadcast("SI",this._availableImages),this.fire(new o.l("data",{dataType:"style"})),a&&a(l)})}_unloadSprite(){for(const e of Object.values(this._spritesImagesIds).flat())this.imageManager.removeImage(e),this._changedImages[e]=!0;this._spritesImagesIds={},this._availableImages=this.imageManager.listImages(),this._changed=!0,this.dispatcher.broadcast("SI",this._availableImages),this.fire(new o.l("data",{dataType:"style"}))}_validateLayer(e){const r=this.sourceCaches[e.source];if(!r)return;const a=e.sourceLayer;if(!a)return;const l=r.getSource();(l.type==="geojson"||l.vectorLayerIds&&l.vectorLayerIds.indexOf(a)===-1)&&this.fire(new o.k(new Error(`Source layer "${a}" does not exist on source "${l.id}" as specified by style layer "${e.id}".`)))}loaded(){if(!this._loaded||Object.keys(this._updatedSources).length)return!1;for(const e in this.sourceCaches)if(!this.sourceCaches[e].loaded())return!1;return!!this.imageManager.isLoaded()}_serializeByIds(e,r=!1){const a=this._serializedAllLayers();if(!e||e.length===0)return Object.values(r?o.bB(a):a);const l=[];for(const h of e)if(a[h]){const g=r?o.bB(a[h]):a[h];l.push(g)}return l}_serializedAllLayers(){let e=this._serializedLayers;if(e)return e;e=this._serializedLayers={};const r=Object.keys(this._layers);for(const a of r){const l=this._layers[a];l.type!=="custom"&&(e[a]=l.serialize())}return e}hasTransitions(){var e,r,a;if(!((e=this.light)===null||e===void 0)&&e.hasTransition()||!((r=this.sky)===null||r===void 0)&&r.hasTransition()||!((a=this.projection)===null||a===void 0)&&a.hasTransition())return!0;for(const l in this.sourceCaches)if(this.sourceCaches[l].hasTransition())return!0;for(const l in this._layers)if(this._layers[l].hasTransition())return!0;return!1}_checkLoaded(){if(!this._loaded)throw new Error("Style is not done loading.")}update(e){if(!this._loaded)return;const r=this._changed;if(r){const l=Object.keys(this._updatedLayers),h=Object.keys(this._removedLayers);(l.length||h.length)&&this._updateWorkerLayers(l,h);for(const g in this._updatedSources){const b=this._updatedSources[g];if(b==="reload")this._reloadSource(g);else{if(b!=="clear")throw new Error(`Invalid action ${b}`);this._clearSource(g)}}this._updateTilesForChangedImages(),this._updateTilesForChangedGlyphs();for(const g in this._updatedPaintProps)this._layers[g].updateTransitions(e);this.light.updateTransitions(e),this.sky.updateTransitions(e),this._resetUpdates()}const a={};for(const l in this.sourceCaches){const h=this.sourceCaches[l];a[l]=h.used,h.used=!1}for(const l of this._order){const h=this._layers[l];h.recalculate(e,this._availableImages),!h.isHidden(e.zoom)&&h.source&&(this.sourceCaches[h.source].used=!0)}for(const l in a){const h=this.sourceCaches[l];!!a[l]!=!!h.used&&h.fire(new o.l("data",{sourceDataType:"visibility",dataType:"source",sourceId:l}))}this.light.recalculate(e),this.sky.recalculate(e),this.projection.recalculate(e),this.z=e.zoom,r&&this.fire(new o.l("data",{dataType:"style"}))}_updateTilesForChangedImages(){const e=Object.keys(this._changedImages);if(e.length){for(const r in this.sourceCaches)this.sourceCaches[r].reloadTilesForDependencies(["icons","patterns"],e);this._changedImages={}}}_updateTilesForChangedGlyphs(){if(this._glyphsDidChange){for(const e in this.sourceCaches)this.sourceCaches[e].reloadTilesForDependencies(["glyphs"],[""]);this._glyphsDidChange=!1}}_updateWorkerLayers(e,r){this.dispatcher.broadcast("UL",{layers:this._serializeByIds(e,!1),removedIds:r})}_resetUpdates(){this._changed=!1,this._updatedLayers={},this._removedLayers={},this._updatedSources={},this._updatedPaintProps={},this._changedImages={},this._glyphsDidChange=!1}setState(e,r={}){var a;this._checkLoaded();const l=this.serialize();if(e=r.transformStyle?r.transformStyle(l,e):e,((a=r.validate)===null||a===void 0||a)&&ca(this,o.y(e)))return!1;(e=o.bB(e)).layers=o.bz(e.layers);const h=o.bC(l,e),g=this._getOperationsToPerform(h);if(g.unimplemented.length>0)throw new Error(`Unimplemented: ${g.unimplemented.join(", ")}.`);if(g.operations.length===0)return!1;for(const b of g.operations)b();return this.stylesheet=e,this._serializedLayers=null,!0}_getOperationsToPerform(e){const r=[],a=[];for(const l of e)switch(l.command){case"setCenter":case"setZoom":case"setBearing":case"setPitch":case"setRoll":continue;case"addLayer":r.push(()=>this.addLayer.apply(this,l.args));break;case"removeLayer":r.push(()=>this.removeLayer.apply(this,l.args));break;case"setPaintProperty":r.push(()=>this.setPaintProperty.apply(this,l.args));break;case"setLayoutProperty":r.push(()=>this.setLayoutProperty.apply(this,l.args));break;case"setFilter":r.push(()=>this.setFilter.apply(this,l.args));break;case"addSource":r.push(()=>this.addSource.apply(this,l.args));break;case"removeSource":r.push(()=>this.removeSource.apply(this,l.args));break;case"setLayerZoomRange":r.push(()=>this.setLayerZoomRange.apply(this,l.args));break;case"setLight":r.push(()=>this.setLight.apply(this,l.args));break;case"setGeoJSONSourceData":r.push(()=>this.setGeoJSONSourceData.apply(this,l.args));break;case"setGlyphs":r.push(()=>this.setGlyphs.apply(this,l.args));break;case"setSprite":r.push(()=>this.setSprite.apply(this,l.args));break;case"setTerrain":r.push(()=>this.map.setTerrain.apply(this,l.args));break;case"setSky":r.push(()=>this.setSky.apply(this,l.args));break;case"setProjection":this.setProjection.apply(this,l.args);break;case"setTransition":r.push(()=>{});break;default:a.push(l.command)}return{operations:r,unimplemented:a}}addImage(e,r){if(this.getImage(e))return this.fire(new o.k(new Error(`An image named "${e}" already exists.`)));this.imageManager.addImage(e,r),this._afterImageUpdated(e)}updateImage(e,r){this.imageManager.updateImage(e,r)}getImage(e){return this.imageManager.getImage(e)}removeImage(e){if(!this.getImage(e))return this.fire(new o.k(new Error(`An image named "${e}" does not exist.`)));this.imageManager.removeImage(e),this._afterImageUpdated(e)}_afterImageUpdated(e){this._availableImages=this.imageManager.listImages(),this._changedImages[e]=!0,this._changed=!0,this.dispatcher.broadcast("SI",this._availableImages),this.fire(new o.l("data",{dataType:"style"}))}listImages(){return this._checkLoaded(),this.imageManager.listImages()}addSource(e,r,a={}){if(this._checkLoaded(),this.sourceCaches[e]!==void 0)throw new Error(`Source "${e}" already exists.`);if(!r.type)throw new Error(`The type property must be defined, but only the following properties were given: ${Object.keys(r).join(", ")}.`);if(["vector","raster","geojson","video","image"].indexOf(r.type)>=0&&this._validate(o.y.source,`sources.${e}`,r,null,a))return;this.map&&this.map._collectResourceTiming&&(r.collectResourceTiming=!0);const l=this.sourceCaches[e]=new Ie(e,r,this.dispatcher);l.style=this,l.setEventedParent(this,()=>({isSourceLoaded:l.loaded(),source:l.serialize(),sourceId:e})),l.onAdd(this.map),this._changed=!0}removeSource(e){if(this._checkLoaded(),this.sourceCaches[e]===void 0)throw new Error("There is no source with this ID");for(const a in this._layers)if(this._layers[a].source===e)return this.fire(new o.k(new Error(`Source "${e}" cannot be removed while layer "${a}" is using it.`)));const r=this.sourceCaches[e];delete this.sourceCaches[e],delete this._updatedSources[e],r.fire(new o.l("data",{sourceDataType:"metadata",dataType:"source",sourceId:e})),r.setEventedParent(null),r.onRemove(this.map),this._changed=!0}setGeoJSONSourceData(e,r){if(this._checkLoaded(),this.sourceCaches[e]===void 0)throw new Error(`There is no source with this ID=${e}`);const a=this.sourceCaches[e].getSource();if(a.type!=="geojson")throw new Error(`geojsonSource.type is ${a.type}, which is !== 'geojson`);a.setData(r),this._changed=!0}getSource(e){return this.sourceCaches[e]&&this.sourceCaches[e].getSource()}addLayer(e,r,a={}){this._checkLoaded();const l=e.id;if(this.getLayer(l))return void this.fire(new o.k(new Error(`Layer "${l}" already exists on this map.`)));let h;if(e.type==="custom"){if(ca(this,o.bD(e)))return;h=o.bA(e)}else{if("source"in e&&typeof e.source=="object"&&(this.addSource(l,e.source),e=o.bB(e),e=o.e(e,{source:l})),this._validate(o.y.layer,`layers.${l}`,e,{arrayIndex:-1},a))return;h=o.bA(e),this._validateLayer(h),h.setEventedParent(this,{layer:{id:l}})}const g=r?this._order.indexOf(r):this._order.length;if(r&&g===-1)this.fire(new o.k(new Error(`Cannot add layer "${l}" before non-existing layer "${r}".`)));else{if(this._order.splice(g,0,l),this._layerOrderChanged=!0,this._layers[l]=h,this._removedLayers[l]&&h.source&&h.type!=="custom"){const b=this._removedLayers[l];delete this._removedLayers[l],b.type!==h.type?this._updatedSources[h.source]="clear":(this._updatedSources[h.source]="reload",this.sourceCaches[h.source].pause())}this._updateLayer(h),h.onAdd&&h.onAdd(this.map)}}moveLayer(e,r){if(this._checkLoaded(),this._changed=!0,!this._layers[e])return void this.fire(new o.k(new Error(`The layer '${e}' does not exist in the map's style and cannot be moved.`)));if(e===r)return;const a=this._order.indexOf(e);this._order.splice(a,1);const l=r?this._order.indexOf(r):this._order.length;r&&l===-1?this.fire(new o.k(new Error(`Cannot move layer "${e}" before non-existing layer "${r}".`))):(this._order.splice(l,0,e),this._layerOrderChanged=!0)}removeLayer(e){this._checkLoaded();const r=this._layers[e];if(!r)return void this.fire(new o.k(new Error(`Cannot remove non-existing layer "${e}".`)));r.setEventedParent(null);const a=this._order.indexOf(e);this._order.splice(a,1),this._layerOrderChanged=!0,this._changed=!0,this._removedLayers[e]=r,delete this._layers[e],this._serializedLayers&&delete this._serializedLayers[e],delete this._updatedLayers[e],delete this._updatedPaintProps[e],r.onRemove&&r.onRemove(this.map)}getLayer(e){return this._layers[e]}getLayersOrder(){return[...this._order]}hasLayer(e){return e in this._layers}setLayerZoomRange(e,r,a){this._checkLoaded();const l=this.getLayer(e);l?l.minzoom===r&&l.maxzoom===a||(r!=null&&(l.minzoom=r),a!=null&&(l.maxzoom=a),this._updateLayer(l)):this.fire(new o.k(new Error(`Cannot set the zoom range of non-existing layer "${e}".`)))}setFilter(e,r,a={}){this._checkLoaded();const l=this.getLayer(e);if(l){if(!o.bE(l.filter,r))return r==null?(l.filter=void 0,void this._updateLayer(l)):void(this._validate(o.y.filter,`layers.${l.id}.filter`,r,null,a)||(l.filter=o.bB(r),this._updateLayer(l)))}else this.fire(new o.k(new Error(`Cannot filter non-existing layer "${e}".`)))}getFilter(e){return o.bB(this.getLayer(e).filter)}setLayoutProperty(e,r,a,l={}){this._checkLoaded();const h=this.getLayer(e);h?o.bE(h.getLayoutProperty(r),a)||(h.setLayoutProperty(r,a,l),this._updateLayer(h)):this.fire(new o.k(new Error(`Cannot style non-existing layer "${e}".`)))}getLayoutProperty(e,r){const a=this.getLayer(e);if(a)return a.getLayoutProperty(r);this.fire(new o.k(new Error(`Cannot get style of non-existing layer "${e}".`)))}setPaintProperty(e,r,a,l={}){this._checkLoaded();const h=this.getLayer(e);h?o.bE(h.getPaintProperty(r),a)||(h.setPaintProperty(r,a,l)&&this._updateLayer(h),this._changed=!0,this._updatedPaintProps[e]=!0,this._serializedLayers=null):this.fire(new o.k(new Error(`Cannot style non-existing layer "${e}".`)))}getPaintProperty(e,r){return this.getLayer(e).getPaintProperty(r)}setFeatureState(e,r){this._checkLoaded();const a=e.source,l=e.sourceLayer,h=this.sourceCaches[a];if(h===void 0)return void this.fire(new o.k(new Error(`The source '${a}' does not exist in the map's style.`)));const g=h.getSource().type;g==="geojson"&&l?this.fire(new o.k(new Error("GeoJSON sources cannot have a sourceLayer parameter."))):g!=="vector"||l?(e.id===void 0&&this.fire(new o.k(new Error("The feature id parameter must be provided."))),h.setFeatureState(l,e.id,r)):this.fire(new o.k(new Error("The sourceLayer parameter must be provided for vector source types.")))}removeFeatureState(e,r){this._checkLoaded();const a=e.source,l=this.sourceCaches[a];if(l===void 0)return void this.fire(new o.k(new Error(`The source '${a}' does not exist in the map's style.`)));const h=l.getSource().type,g=h==="vector"?e.sourceLayer:void 0;h!=="vector"||g?r&&typeof e.id!="string"&&typeof e.id!="number"?this.fire(new o.k(new Error("A feature id is required to remove its specific state property."))):l.removeFeatureState(g,e.id,r):this.fire(new o.k(new Error("The sourceLayer parameter must be provided for vector source types.")))}getFeatureState(e){this._checkLoaded();const r=e.source,a=e.sourceLayer,l=this.sourceCaches[r];if(l!==void 0)return l.getSource().type!=="vector"||a?(e.id===void 0&&this.fire(new o.k(new Error("The feature id parameter must be provided."))),l.getFeatureState(a,e.id)):void this.fire(new o.k(new Error("The sourceLayer parameter must be provided for vector source types.")));this.fire(new o.k(new Error(`The source '${r}' does not exist in the map's style.`)))}getTransition(){return o.e({duration:300,delay:0},this.stylesheet&&this.stylesheet.transition)}serialize(){if(!this._loaded)return;const e=o.bF(this.sourceCaches,h=>h.serialize()),r=this._serializeByIds(this._order,!0),a=this.map.getTerrain()||void 0,l=this.stylesheet;return o.bG({version:l.version,name:l.name,metadata:l.metadata,light:l.light,sky:l.sky,center:l.center,zoom:l.zoom,bearing:l.bearing,pitch:l.pitch,sprite:l.sprite,glyphs:l.glyphs,transition:l.transition,projection:l.projection,sources:e,layers:r,terrain:a},h=>h!==void 0)}_updateLayer(e){this._updatedLayers[e.id]=!0,e.source&&!this._updatedSources[e.source]&&this.sourceCaches[e.source].getSource().type!=="raster"&&(this._updatedSources[e.source]="reload",this.sourceCaches[e.source].pause()),this._serializedLayers=null,this._changed=!0}_flattenAndSortRenderedFeatures(e){const r=g=>this._layers[g].type==="fill-extrusion",a={},l=[];for(let g=this._order.length-1;g>=0;g--){const b=this._order[g];if(r(b)){a[b]=g;for(const A of e){const I=A[b];if(I)for(const z of I)l.push(z)}}}l.sort((g,b)=>b.intersectionZ-g.intersectionZ);const h=[];for(let g=this._order.length-1;g>=0;g--){const b=this._order[g];if(r(b))for(let A=l.length-1;A>=0;A--){const I=l[A].feature;if(a[I.layer.id]<g)break;h.push(I),l.pop()}else for(const A of e){const I=A[b];if(I)for(const z of I)h.push(z.feature)}}return h}queryRenderedFeatures(e,r,a){r&&r.filter&&this._validate(o.y.filter,"queryRenderedFeatures.filter",r.filter,null,r);const l={};if(r&&r.layers){if(!(Array.isArray(r.layers)||r.layers instanceof Set))return this.fire(new o.k(new Error("parameters.layers must be an Array or a Set of strings"))),[];for(const I of r.layers){const z=this._layers[I];if(!z)return this.fire(new o.k(new Error(`The layer '${I}' does not exist in the map's style and cannot be queried for features.`))),[];l[z.source]=!0}}const h=[];r.availableImages=this._availableImages;const g=this._serializedAllLayers(),b=r.layers instanceof Set?r.layers:Array.isArray(r.layers)?new Set(r.layers):null,A=Object.assign(Object.assign({},r),{layers:b});for(const I in this.sourceCaches)r.layers&&!l[I]||h.push(In(this.sourceCaches[I],this._layers,g,e,A,a,this.map.terrain?(z,F,O)=>this.map.terrain.getElevation(z,F,O):void 0));return this.placement&&h.push(function(I,z,F,O,Z,J,oe){const ne={},se=J.queryRenderedSymbols(O),de=[];for(const _e of Object.keys(se).map(Number))de.push(oe[_e]);de.sort(fi);for(const _e of de){const ye=_e.featureIndex.lookupSymbolFeatures(se[_e.bucketInstanceId],z,_e.bucketIndex,_e.sourceLayerIndex,Z.filter,Z.layers,Z.availableImages,I);for(const be in ye){const ke=ne[be]=ne[be]||[],we=ye[be];we.sort((Le,We)=>{const Fe=_e.featureSortOrder;if(Fe){const Ne=Fe.indexOf(Le.featureIndex);return Fe.indexOf(We.featureIndex)-Ne}return We.featureIndex-Le.featureIndex});for(const Le of we)ke.push(Le)}}return function(_e,ye,be){for(const ke in _e)for(const we of _e[ke])gt(we,be[ye[ke].source]);return _e}(ne,I,F)}(this._layers,g,this.sourceCaches,e,A,this.placement.collisionIndex,this.placement.retainedQueryData)),this._flattenAndSortRenderedFeatures(h)}querySourceFeatures(e,r){r&&r.filter&&this._validate(o.y.filter,"querySourceFeatures.filter",r.filter,null,r);const a=this.sourceCaches[e];return a?function(l,h){const g=l.getRenderableIds().map(I=>l.getTileByID(I)),b=[],A={};for(let I=0;I<g.length;I++){const z=g[I],F=z.tileID.canonical.key;A[F]||(A[F]=!0,z.querySourceFeatures(b,h))}return b}(a,r):[]}getLight(){return this.light.getLight()}setLight(e,r={}){this._checkLoaded();const a=this.light.getLight();let l=!1;for(const g in e)if(!o.bE(e[g],a[g])){l=!0;break}if(!l)return;const h={now:M.now(),transition:o.e({duration:300,delay:0},this.stylesheet.transition)};this.light.setLight(e,r),this.light.updateTransitions(h)}getProjection(){var e;return(e=this.stylesheet)===null||e===void 0?void 0:e.projection}setProjection(e){if(this._checkLoaded(),this.projection){if(this.projection.name===e.type)return;this.projection.destroy(),delete this.projection}this.stylesheet.projection=e,this._setProjectionInternal(e.type)}getSky(){var e;return(e=this.stylesheet)===null||e===void 0?void 0:e.sky}setSky(e,r={}){this._checkLoaded();const a=this.getSky();let l=!1;if(!e&&!a)return;if(e&&!a)l=!0;else if(!e&&a)l=!0;else for(const g in e)if(!o.bE(e[g],a[g])){l=!0;break}if(!l)return;const h={now:M.now(),transition:o.e({duration:300,delay:0},this.stylesheet.transition)};this.stylesheet.sky=e,this.sky.setSky(e,r),this.sky.updateTransitions(h)}_setProjectionInternal(e){const r=function(a){if(Array.isArray(a)){const l=new sa({type:a});return{projection:l,transform:new _s,cameraHelper:new wo(l)}}switch(a){case"mercator":return{projection:new bn,transform:new st,cameraHelper:new Ge};case"globe":{const l=new sa({type:["interpolate",["linear"],["zoom"],11,"vertical-perspective",12,"mercator"]});return{projection:l,transform:new _s,cameraHelper:new wo(l)}}case"vertical-perspective":return{projection:new _o,transform:new vo,cameraHelper:new $i};default:return o.w(`Unknown projection name: ${a}. Falling back to mercator projection.`),{projection:new bn,transform:new st,cameraHelper:new Ge}}}(e);this.projection=r.projection,this.map.migrateProjection(r.transform,r.cameraHelper);for(const a in this.sourceCaches)this.sourceCaches[a].reload()}_validate(e,r,a,l,h={}){return(!h||h.validate!==!1)&&ca(this,e.call(o.y,o.e({key:r,style:this.serialize(),value:a,styleSpec:o.v},l)))}_remove(e=!0){this._frameRequest&&(this._frameRequest.abort(),this._frameRequest=null),this._loadStyleRequest&&(this._loadStyleRequest.abort(),this._loadStyleRequest=null),this._spriteRequest&&(this._spriteRequest.abort(),this._spriteRequest=null),Ft().off(Vi,this._rtlPluginLoaded);for(const r in this._layers)this._layers[r].setEventedParent(null);for(const r in this.sourceCaches){const a=this.sourceCaches[r];a.setEventedParent(null),a.onRemove(this.map)}this.imageManager.setEventedParent(null),this.setEventedParent(null),e&&this.dispatcher.broadcast("RM",void 0),this.dispatcher.remove(e)}_clearSource(e){this.sourceCaches[e].clearTiles()}_reloadSource(e){this.sourceCaches[e].resume(),this.sourceCaches[e].reload()}_updateSources(e){for(const r in this.sourceCaches)this.sourceCaches[r].update(e,this.map.terrain)}_generateCollisionBoxes(){for(const e in this.sourceCaches)this._reloadSource(e)}_updatePlacement(e,r,a,l,h=!1){let g=!1,b=!1;const A={};for(const I of this._order){const z=this._layers[I];if(z.type!=="symbol")continue;if(!A[z.source]){const O=this.sourceCaches[z.source];A[z.source]=O.getRenderableIds(!0).map(Z=>O.getTileByID(Z)).sort((Z,J)=>J.tileID.overscaledZ-Z.tileID.overscaledZ||(Z.tileID.isLessThan(J.tileID)?-1:1))}const F=this.crossTileSymbolIndex.addLayer(z,A[z.source],e.center.lng);g=g||F}if(this.crossTileSymbolIndex.pruneUnusedLayers(this._order),((h=h||this._layerOrderChanged||a===0)||!this.pauseablePlacement||this.pauseablePlacement.isDone()&&!this.placement.stillRecent(M.now(),e.zoom))&&(this.pauseablePlacement=new oa(e,this.map.terrain,this._order,h,r,a,l,this.placement),this._layerOrderChanged=!1),this.pauseablePlacement.isDone()?this.placement.setStale():(this.pauseablePlacement.continuePlacement(this._order,this._layers,A),this.pauseablePlacement.isDone()&&(this.placement=this.pauseablePlacement.commit(M.now()),b=!0),g&&this.pauseablePlacement.placement.setStale()),b||g)for(const I of this._order){const z=this._layers[I];z.type==="symbol"&&this.placement.updateLayerOpacities(z,A[z.source])}return!this.pauseablePlacement.isDone()||this.placement.hasTransitions(M.now())}_releaseSymbolFadeTiles(){for(const e in this.sourceCaches)this.sourceCaches[e].releaseSymbolFadeTiles()}getImages(e,r){return o._(this,void 0,void 0,function*(){const a=yield this.imageManager.getImages(r.icons);this._updateTilesForChangedImages();const l=this.sourceCaches[r.source];return l&&l.setDependencies(r.tileID.key,r.type,r.icons),a})}getGlyphs(e,r){return o._(this,void 0,void 0,function*(){const a=yield this.glyphManager.getGlyphs(r.stacks),l=this.sourceCaches[r.source];return l&&l.setDependencies(r.tileID.key,r.type,[""]),a})}getGlyphsUrl(){return this.stylesheet.glyphs||null}setGlyphs(e,r={}){this._checkLoaded(),e&&this._validate(o.y.glyphs,"glyphs",e,null,r)||(this._glyphsDidChange=!0,this.stylesheet.glyphs=e,this.glyphManager.entries={},this.glyphManager.setURL(e))}addSprite(e,r,a={},l){this._checkLoaded();const h=[{id:e,url:r}],g=[...De(this.stylesheet.sprite),...h];this._validate(o.y.sprite,"sprite",g,null,a)||(this.stylesheet.sprite=g,this._loadSprite(h,!0,l))}removeSprite(e){this._checkLoaded();const r=De(this.stylesheet.sprite);if(r.find(a=>a.id===e)){if(this._spritesImagesIds[e])for(const a of this._spritesImagesIds[e])this.imageManager.removeImage(a),this._changedImages[a]=!0;r.splice(r.findIndex(a=>a.id===e),1),this.stylesheet.sprite=r.length>0?r:void 0,delete this._spritesImagesIds[e],this._availableImages=this.imageManager.listImages(),this._changed=!0,this.dispatcher.broadcast("SI",this._availableImages),this.fire(new o.l("data",{dataType:"style"}))}else this.fire(new o.k(new Error(`Sprite "${e}" doesn't exists on this map.`)))}getSprite(){return De(this.stylesheet.sprite)}setSprite(e,r={},a){this._checkLoaded(),e&&this._validate(o.y.sprite,"sprite",e,null,r)||(this.stylesheet.sprite=e,e?this._loadSprite(e,!0,a):(this._unloadSprite(),a&&a(null)))}}var op=o.aG([{name:"a_pos",type:"Int16",components:2},{name:"a_texture_pos",type:"Int16",components:2}]);class sp{constructor(){this.boundProgram=null,this.boundLayoutVertexBuffer=null,this.boundPaintVertexBuffers=[],this.boundIndexBuffer=null,this.boundVertexOffset=null,this.boundDynamicVertexBuffer=null,this.vao=null}bind(e,r,a,l,h,g,b,A,I){this.context=e;let z=this.boundPaintVertexBuffers.length!==l.length;for(let F=0;!z&&F<l.length;F++)this.boundPaintVertexBuffers[F]!==l[F]&&(z=!0);!this.vao||this.boundProgram!==r||this.boundLayoutVertexBuffer!==a||z||this.boundIndexBuffer!==h||this.boundVertexOffset!==g||this.boundDynamicVertexBuffer!==b||this.boundDynamicVertexBuffer2!==A||this.boundDynamicVertexBuffer3!==I?this.freshBind(r,a,l,h,g,b,A,I):(e.bindVertexArray.set(this.vao),b&&b.bind(),h&&h.dynamicDraw&&h.bind(),A&&A.bind(),I&&I.bind())}freshBind(e,r,a,l,h,g,b,A){const I=e.numAttributes,z=this.context,F=z.gl;this.vao&&this.destroy(),this.vao=z.createVertexArray(),z.bindVertexArray.set(this.vao),this.boundProgram=e,this.boundLayoutVertexBuffer=r,this.boundPaintVertexBuffers=a,this.boundIndexBuffer=l,this.boundVertexOffset=h,this.boundDynamicVertexBuffer=g,this.boundDynamicVertexBuffer2=b,this.boundDynamicVertexBuffer3=A,r.enableAttributes(F,e);for(const O of a)O.enableAttributes(F,e);g&&g.enableAttributes(F,e),b&&b.enableAttributes(F,e),A&&A.enableAttributes(F,e),r.bind(),r.setVertexAttribPointers(F,e,h);for(const O of a)O.bind(),O.setVertexAttribPointers(F,e,h);g&&(g.bind(),g.setVertexAttribPointers(F,e,h)),l&&l.bind(),b&&(b.bind(),b.setVertexAttribPointers(F,e,h)),A&&(A.bind(),A.setVertexAttribPointers(F,e,h)),z.currentNumAttributes=I}destroy(){this.vao&&(this.context.deleteVertexArray(this.vao),this.vao=null)}}const ap=(u,e,r,a,l)=>({u_texture:0,u_ele_delta:u,u_fog_matrix:e,u_fog_color:r?r.properties.get("fog-color"):o.b7.white,u_fog_ground_blend:r?r.properties.get("fog-ground-blend"):1,u_fog_ground_blend_opacity:l?0:r?r.calculateFogBlendOpacity(a):0,u_horizon_color:r?r.properties.get("horizon-color"):o.b7.white,u_horizon_fog_blend:r?r.properties.get("horizon-fog-blend"):1,u_is_globe_mode:l?1:0}),ua={mainMatrix:"u_projection_matrix",tileMercatorCoords:"u_projection_tile_mercator_coords",clippingPlane:"u_projection_clipping_plane",projectionTransition:"u_projection_transition",fallbackMatrix:"u_projection_fallback_matrix"};function Do(u){const e=[];for(let r=0;r<u.length;r++){if(u[r]===null)continue;const a=u[r].split(" ");e.push(a.pop())}return e}class ha{constructor(e,r,a,l,h,g,b,A,I=[]){const z=e.gl;this.program=z.createProgram();const F=Do(r.staticAttributes),O=a?a.getBinderAttributes():[],Z=F.concat(O),J=oi.prelude.staticUniforms?Do(oi.prelude.staticUniforms):[],oe=b.staticUniforms?Do(b.staticUniforms):[],ne=r.staticUniforms?Do(r.staticUniforms):[],se=a?a.getBinderUniforms():[],de=J.concat(oe).concat(ne).concat(se),_e=[];for(const Fe of de)_e.indexOf(Fe)<0&&_e.push(Fe);const ye=a?a.defines():[];Sr(z)&&ye.unshift("#version 300 es"),h&&ye.push("#define OVERDRAW_INSPECTOR;"),g&&ye.push("#define TERRAIN3D;"),A&&ye.push(A),I&&ye.push(...I);let be=ye.concat(oi.prelude.fragmentSource,b.fragmentSource,r.fragmentSource).join(`
|
|
738
|
-
`),ke=ye.concat(oi.prelude.vertexSource,b.vertexSource,r.vertexSource).join(`
|
|
739
|
-
`);Sr(z)||(be=function(Fe){return Fe.replace(/\bin\s/g,"varying ").replace("out highp vec4 fragColor;","").replace(/fragColor/g,"gl_FragColor").replace(/texture\(/g,"texture2D(")}(be),ke=function(Fe){return Fe.replace(/\bin\s/g,"attribute ").replace(/\bout\s/g,"varying ").replace(/texture\(/g,"texture2D(")}(ke));const we=z.createShader(z.FRAGMENT_SHADER);if(z.isContextLost())return void(this.failedToCreate=!0);if(z.shaderSource(we,be),z.compileShader(we),!z.getShaderParameter(we,z.COMPILE_STATUS))throw new Error(`Could not compile fragment shader: ${z.getShaderInfoLog(we)}`);z.attachShader(this.program,we);const Le=z.createShader(z.VERTEX_SHADER);if(z.isContextLost())return void(this.failedToCreate=!0);if(z.shaderSource(Le,ke),z.compileShader(Le),!z.getShaderParameter(Le,z.COMPILE_STATUS))throw new Error(`Could not compile vertex shader: ${z.getShaderInfoLog(Le)}`);z.attachShader(this.program,Le),this.attributes={};const We={};this.numAttributes=Z.length;for(let Fe=0;Fe<this.numAttributes;Fe++)Z[Fe]&&(z.bindAttribLocation(this.program,Fe,Z[Fe]),this.attributes[Z[Fe]]=Fe);if(z.linkProgram(this.program),!z.getProgramParameter(this.program,z.LINK_STATUS))throw new Error(`Program failed to link: ${z.getProgramInfoLog(this.program)}`);z.deleteShader(Le),z.deleteShader(we);for(let Fe=0;Fe<_e.length;Fe++){const Ne=_e[Fe];if(Ne&&!We[Ne]){const je=z.getUniformLocation(this.program,Ne);je&&(We[Ne]=je)}}this.fixedUniforms=l(e,We),this.terrainUniforms=((Fe,Ne)=>({u_depth:new o.bH(Fe,Ne.u_depth),u_terrain:new o.bH(Fe,Ne.u_terrain),u_terrain_dim:new o.b8(Fe,Ne.u_terrain_dim),u_terrain_matrix:new o.bJ(Fe,Ne.u_terrain_matrix),u_terrain_unpack:new o.bK(Fe,Ne.u_terrain_unpack),u_terrain_exaggeration:new o.b8(Fe,Ne.u_terrain_exaggeration)}))(e,We),this.projectionUniforms=((Fe,Ne)=>({u_projection_matrix:new o.bJ(Fe,Ne.u_projection_matrix),u_projection_tile_mercator_coords:new o.bK(Fe,Ne.u_projection_tile_mercator_coords),u_projection_clipping_plane:new o.bK(Fe,Ne.u_projection_clipping_plane),u_projection_transition:new o.b8(Fe,Ne.u_projection_transition),u_projection_fallback_matrix:new o.bJ(Fe,Ne.u_projection_fallback_matrix)}))(e,We),this.binderUniforms=a?a.getUniforms(e,We):[]}draw(e,r,a,l,h,g,b,A,I,z,F,O,Z,J,oe,ne,se,de,_e){const ye=e.gl;if(this.failedToCreate)return;if(e.program.set(this.program),e.setDepthMode(a),e.setStencilMode(l),e.setColorMode(h),e.setCullFace(g),A){e.activeTexture.set(ye.TEXTURE2),ye.bindTexture(ye.TEXTURE_2D,A.depthTexture),e.activeTexture.set(ye.TEXTURE3),ye.bindTexture(ye.TEXTURE_2D,A.texture);for(const ke in this.terrainUniforms)this.terrainUniforms[ke].set(A[ke])}if(I)for(const ke in I)this.projectionUniforms[ua[ke]].set(I[ke]);if(b)for(const ke in this.fixedUniforms)this.fixedUniforms[ke].set(b[ke]);ne&&ne.setUniforms(e,this.binderUniforms,J,{zoom:oe});let be=0;switch(r){case ye.LINES:be=2;break;case ye.TRIANGLES:be=3;break;case ye.LINE_STRIP:be=1}for(const ke of Z.get()){const we=ke.vaos||(ke.vaos={});(we[z]||(we[z]=new sp)).bind(e,this,F,ne?ne.getPaintVertexBuffers():[],O,ke.vertexOffset,se,de,_e),ye.drawElements(r,ke.primitiveLength*be,ye.UNSIGNED_SHORT,ke.primitiveOffset*be*2)}}}function pa(u,e,r){const a=1/o.az(r,1,e.transform.tileZoom),l=Math.pow(2,r.tileID.overscaledZ),h=r.tileSize*Math.pow(2,e.transform.tileZoom)/l,g=h*(r.tileID.canonical.x+r.tileID.wrap*l),b=h*r.tileID.canonical.y;return{u_image:0,u_texsize:r.imageAtlasTexture.size,u_scale:[a,u.fromScale,u.toScale],u_fade:u.t,u_pixel_coord_upper:[g>>16,b>>16],u_pixel_coord_lower:[65535&g,65535&b]}}const da=(u,e,r,a)=>{const l=u.style.light,h=l.properties.get("position"),g=[h.x,h.y,h.z],b=o.bN();l.properties.get("anchor")==="viewport"&&o.bO(b,u.transform.bearingInRadians),o.bP(g,g,b);const A=u.transform.transformLightDirection(g),I=l.properties.get("color");return{u_lightpos:g,u_lightpos_globe:A,u_lightintensity:l.properties.get("intensity"),u_lightcolor:[I.r,I.g,I.b],u_vertical_gradient:+e,u_opacity:r,u_fill_translate:a}},wn=(u,e,r,a,l,h,g)=>o.e(da(u,e,r,a),pa(h,u,g),{u_height_factor:-Math.pow(2,l.overscaledZ)/g.tileSize/8}),yu=(u,e,r,a)=>o.e(pa(e,u,r),{u_fill_translate:a}),bl=(u,e)=>({u_world:u,u_fill_translate:e}),xs=(u,e,r,a,l)=>o.e(yu(u,e,r,l),{u_world:a}),bs=(u,e,r,a,l)=>{const h=u.transform;let g,b,A=0;if(r.paint.get("circle-pitch-alignment")==="map"){const I=o.az(e,1,h.zoom);g=!0,b=[I,I],A=I/(o.Z*Math.pow(2,e.tileID.overscaledZ))*2*Math.PI*l}else g=!1,b=h.pixelsToGLUnits;return{u_camera_to_center_distance:h.cameraToCenterDistance,u_scale_with_map:+(r.paint.get("circle-pitch-scale")==="map"),u_pitch_with_map:+g,u_device_pixel_ratio:u.pixelRatio,u_extrude_scale:b,u_globe_extrude_scale:A,u_translate:a}},lp=u=>({u_pixel_extrude_scale:[1/u.width,1/u.height]}),fa=u=>({u_viewport_size:[u.width,u.height]}),_u=(u,e=1)=>({u_color:u,u_overlay:0,u_overlay_scale:e}),So=(u,e,r,a)=>{const l=o.az(u,1,e)/(o.Z*Math.pow(2,u.tileID.overscaledZ))*2*Math.PI*a;return{u_extrude_scale:o.az(u,1,e),u_intensity:r,u_globe_extrude_scale:l}},xu=(u,e,r,a)=>{const l=o.K();o.bQ(l,0,u.width,u.height,0,0,1);const h=u.context.gl;return{u_matrix:l,u_world:[h.drawingBufferWidth,h.drawingBufferHeight],u_image:r,u_color_ramp:a,u_opacity:e.paint.get("heatmap-opacity")}},bu=(u,e,r)=>{const a=r.paint.get("hillshade-accent-color");let l;switch(r.paint.get("hillshade-method")){case"basic":l=4;break;case"combined":l=1;break;case"igor":l=2;break;case"multidirectional":l=3;break;default:l=0}const h=r.getIlluminationProperties();for(let g=0;g<h.directionRadians.length;g++)r.paint.get("hillshade-illumination-anchor")==="viewport"&&(h.directionRadians[g]+=u.transform.bearingInRadians);return{u_image:0,u_latrange:vu(0,e.tileID),u_exaggeration:r.paint.get("hillshade-exaggeration"),u_altitudes:h.altitudeRadians,u_azimuths:h.directionRadians,u_accent:a,u_method:l,u_highlights:h.highlightColor,u_shadows:h.shadowColor}},cp=(u,e)=>{const r=e.stride,a=o.K();return o.bQ(a,0,o.Z,-8192,0,0,1),o.L(a,a,[0,-8192,0]),{u_matrix:a,u_image:1,u_dimension:[r,r],u_zoom:u.overscaledZ,u_unpack:e.getUnpackVector()}};function vu(u,e){const r=Math.pow(2,e.canonical.z),a=e.canonical.y;return[new o.$(0,a/r).toLngLat().lat,new o.$(0,(a+1)/r).toLngLat().lat]}const vs=(u,e,r,a)=>{const l=u.transform;return{u_translation:eo(u,e,r),u_ratio:a/o.az(e,1,l.zoom),u_device_pixel_ratio:u.pixelRatio,u_units_to_pixels:[1/l.pixelsToGLUnits[0],1/l.pixelsToGLUnits[1]]}},wu=(u,e,r,a,l)=>o.e(vs(u,e,r,a),{u_image:0,u_image_height:l}),Su=(u,e,r,a,l)=>{const h=u.transform,g=vl(e,h);return{u_translation:eo(u,e,r),u_texsize:e.imageAtlasTexture.size,u_ratio:a/o.az(e,1,h.zoom),u_device_pixel_ratio:u.pixelRatio,u_image:0,u_scale:[g,l.fromScale,l.toScale],u_fade:l.t,u_units_to_pixels:[1/h.pixelsToGLUnits[0],1/h.pixelsToGLUnits[1]]}},Au=(u,e,r,a,l,h)=>{const g=u.lineAtlas,b=vl(e,u.transform),A=r.layout.get("line-cap")==="round",I=g.getDash(l.from,A),z=g.getDash(l.to,A),F=I.width*h.fromScale,O=z.width*h.toScale;return o.e(vs(u,e,r,a),{u_patternscale_a:[b/F,-I.height/2],u_patternscale_b:[b/O,-z.height/2],u_sdfgamma:g.width/(256*Math.min(F,O)*u.pixelRatio)/2,u_image:0,u_tex_y_a:I.y,u_tex_y_b:z.y,u_mix:h.t})};function vl(u,e){return 1/o.az(u,1,e.tileZoom)}function eo(u,e,r){return o.aA(u.transform,e,r.paint.get("line-translate"),r.paint.get("line-translate-anchor"))}const ku=(u,e,r,a,l)=>{return{u_tl_parent:u,u_scale_parent:e,u_buffer_scale:1,u_fade_t:r.mix,u_opacity:r.opacity*a.paint.get("raster-opacity"),u_image0:0,u_image1:1,u_brightness_low:a.paint.get("raster-brightness-min"),u_brightness_high:a.paint.get("raster-brightness-max"),u_saturation_factor:(g=a.paint.get("raster-saturation"),g>0?1-1/(1.001-g):-g),u_contrast_factor:(h=a.paint.get("raster-contrast"),h>0?1/(1-h):1+h),u_spin_weights:Tu(a.paint.get("raster-hue-rotate")),u_coords_top:[l[0].x,l[0].y,l[1].x,l[1].y],u_coords_bottom:[l[3].x,l[3].y,l[2].x,l[2].y]};var h,g};function Tu(u){u*=Math.PI/180;const e=Math.sin(u),r=Math.cos(u);return[(2*r+1)/3,(-Math.sqrt(3)*e-r+1)/3,(Math.sqrt(3)*e-r+1)/3]}const zo=(u,e,r,a,l,h,g,b,A,I,z,F,O)=>{const Z=g.transform;return{u_is_size_zoom_constant:+(u==="constant"||u==="source"),u_is_size_feature_constant:+(u==="constant"||u==="camera"),u_size_t:e?e.uSizeT:0,u_size:e?e.uSize:0,u_camera_to_center_distance:Z.cameraToCenterDistance,u_pitch:Z.pitch/360*2*Math.PI,u_rotate_symbol:+r,u_aspect_ratio:Z.width/Z.height,u_fade_change:g.options.fadeDuration?g.symbolFadeChange:1,u_label_plane_matrix:b,u_coord_matrix:A,u_is_text:+z,u_pitch_with_map:+a,u_is_along_line:l,u_is_variable_anchor:h,u_texsize:F,u_texture:0,u_translation:I,u_pitched_scale:O}},Cu=(u,e,r,a,l,h,g,b,A,I,z,F,O,Z)=>{const J=g.transform;return o.e(zo(u,e,r,a,l,h,g,b,A,I,z,F,Z),{u_gamma_scale:a?Math.cos(J.pitch*Math.PI/180)*J.cameraToCenterDistance:1,u_device_pixel_ratio:g.pixelRatio,u_is_halo:1})},ma=(u,e,r,a,l,h,g,b,A,I,z,F,O)=>o.e(Cu(u,e,r,a,l,h,g,b,A,I,!0,z,0,O),{u_texsize_icon:F,u_texture_icon:1}),up=(u,e)=>({u_opacity:u,u_color:e}),hp=(u,e,r,a,l)=>o.e(function(h,g,b,A){const I=b.imageManager.getPattern(h.from.toString()),z=b.imageManager.getPattern(h.to.toString()),{width:F,height:O}=b.imageManager.getPixelSize(),Z=Math.pow(2,A.tileID.overscaledZ),J=A.tileSize*Math.pow(2,b.transform.tileZoom)/Z,oe=J*(A.tileID.canonical.x+A.tileID.wrap*Z),ne=J*A.tileID.canonical.y;return{u_image:0,u_pattern_tl_a:I.tl,u_pattern_br_a:I.br,u_pattern_tl_b:z.tl,u_pattern_br_b:z.br,u_texsize:[F,O],u_mix:g.t,u_pattern_size_a:I.displaySize,u_pattern_size_b:z.displaySize,u_scale_a:g.fromScale,u_scale_b:g.toScale,u_tile_units_to_pixels:1/o.az(A,1,b.transform.tileZoom),u_pixel_coord_upper:[oe>>16,ne>>16],u_pixel_coord_lower:[65535&oe,65535&ne]}}(r,l,e,a),{u_opacity:u}),wl=(u,e)=>{},Eu={fillExtrusion:(u,e)=>({u_lightpos:new o.bL(u,e.u_lightpos),u_lightpos_globe:new o.bL(u,e.u_lightpos_globe),u_lightintensity:new o.b8(u,e.u_lightintensity),u_lightcolor:new o.bL(u,e.u_lightcolor),u_vertical_gradient:new o.b8(u,e.u_vertical_gradient),u_opacity:new o.b8(u,e.u_opacity),u_fill_translate:new o.bM(u,e.u_fill_translate)}),fillExtrusionPattern:(u,e)=>({u_lightpos:new o.bL(u,e.u_lightpos),u_lightpos_globe:new o.bL(u,e.u_lightpos_globe),u_lightintensity:new o.b8(u,e.u_lightintensity),u_lightcolor:new o.bL(u,e.u_lightcolor),u_vertical_gradient:new o.b8(u,e.u_vertical_gradient),u_height_factor:new o.b8(u,e.u_height_factor),u_opacity:new o.b8(u,e.u_opacity),u_fill_translate:new o.bM(u,e.u_fill_translate),u_image:new o.bH(u,e.u_image),u_texsize:new o.bM(u,e.u_texsize),u_pixel_coord_upper:new o.bM(u,e.u_pixel_coord_upper),u_pixel_coord_lower:new o.bM(u,e.u_pixel_coord_lower),u_scale:new o.bL(u,e.u_scale),u_fade:new o.b8(u,e.u_fade)}),fill:(u,e)=>({u_fill_translate:new o.bM(u,e.u_fill_translate)}),fillPattern:(u,e)=>({u_image:new o.bH(u,e.u_image),u_texsize:new o.bM(u,e.u_texsize),u_pixel_coord_upper:new o.bM(u,e.u_pixel_coord_upper),u_pixel_coord_lower:new o.bM(u,e.u_pixel_coord_lower),u_scale:new o.bL(u,e.u_scale),u_fade:new o.b8(u,e.u_fade),u_fill_translate:new o.bM(u,e.u_fill_translate)}),fillOutline:(u,e)=>({u_world:new o.bM(u,e.u_world),u_fill_translate:new o.bM(u,e.u_fill_translate)}),fillOutlinePattern:(u,e)=>({u_world:new o.bM(u,e.u_world),u_image:new o.bH(u,e.u_image),u_texsize:new o.bM(u,e.u_texsize),u_pixel_coord_upper:new o.bM(u,e.u_pixel_coord_upper),u_pixel_coord_lower:new o.bM(u,e.u_pixel_coord_lower),u_scale:new o.bL(u,e.u_scale),u_fade:new o.b8(u,e.u_fade),u_fill_translate:new o.bM(u,e.u_fill_translate)}),circle:(u,e)=>({u_camera_to_center_distance:new o.b8(u,e.u_camera_to_center_distance),u_scale_with_map:new o.bH(u,e.u_scale_with_map),u_pitch_with_map:new o.bH(u,e.u_pitch_with_map),u_extrude_scale:new o.bM(u,e.u_extrude_scale),u_device_pixel_ratio:new o.b8(u,e.u_device_pixel_ratio),u_globe_extrude_scale:new o.b8(u,e.u_globe_extrude_scale),u_translate:new o.bM(u,e.u_translate)}),collisionBox:(u,e)=>({u_pixel_extrude_scale:new o.bM(u,e.u_pixel_extrude_scale)}),collisionCircle:(u,e)=>({u_viewport_size:new o.bM(u,e.u_viewport_size)}),debug:(u,e)=>({u_color:new o.bI(u,e.u_color),u_overlay:new o.bH(u,e.u_overlay),u_overlay_scale:new o.b8(u,e.u_overlay_scale)}),depth:wl,clippingMask:wl,heatmap:(u,e)=>({u_extrude_scale:new o.b8(u,e.u_extrude_scale),u_intensity:new o.b8(u,e.u_intensity),u_globe_extrude_scale:new o.b8(u,e.u_globe_extrude_scale)}),heatmapTexture:(u,e)=>({u_matrix:new o.bJ(u,e.u_matrix),u_world:new o.bM(u,e.u_world),u_image:new o.bH(u,e.u_image),u_color_ramp:new o.bH(u,e.u_color_ramp),u_opacity:new o.b8(u,e.u_opacity)}),hillshade:(u,e)=>({u_image:new o.bH(u,e.u_image),u_latrange:new o.bM(u,e.u_latrange),u_exaggeration:new o.b8(u,e.u_exaggeration),u_altitudes:new o.bS(u,e.u_altitudes),u_azimuths:new o.bS(u,e.u_azimuths),u_accent:new o.bI(u,e.u_accent),u_method:new o.bH(u,e.u_method),u_shadows:new o.bR(u,e.u_shadows),u_highlights:new o.bR(u,e.u_highlights)}),hillshadePrepare:(u,e)=>({u_matrix:new o.bJ(u,e.u_matrix),u_image:new o.bH(u,e.u_image),u_dimension:new o.bM(u,e.u_dimension),u_zoom:new o.b8(u,e.u_zoom),u_unpack:new o.bK(u,e.u_unpack)}),line:(u,e)=>({u_translation:new o.bM(u,e.u_translation),u_ratio:new o.b8(u,e.u_ratio),u_device_pixel_ratio:new o.b8(u,e.u_device_pixel_ratio),u_units_to_pixels:new o.bM(u,e.u_units_to_pixels)}),lineGradient:(u,e)=>({u_translation:new o.bM(u,e.u_translation),u_ratio:new o.b8(u,e.u_ratio),u_device_pixel_ratio:new o.b8(u,e.u_device_pixel_ratio),u_units_to_pixels:new o.bM(u,e.u_units_to_pixels),u_image:new o.bH(u,e.u_image),u_image_height:new o.b8(u,e.u_image_height)}),linePattern:(u,e)=>({u_translation:new o.bM(u,e.u_translation),u_texsize:new o.bM(u,e.u_texsize),u_ratio:new o.b8(u,e.u_ratio),u_device_pixel_ratio:new o.b8(u,e.u_device_pixel_ratio),u_image:new o.bH(u,e.u_image),u_units_to_pixels:new o.bM(u,e.u_units_to_pixels),u_scale:new o.bL(u,e.u_scale),u_fade:new o.b8(u,e.u_fade)}),lineSDF:(u,e)=>({u_translation:new o.bM(u,e.u_translation),u_ratio:new o.b8(u,e.u_ratio),u_device_pixel_ratio:new o.b8(u,e.u_device_pixel_ratio),u_units_to_pixels:new o.bM(u,e.u_units_to_pixels),u_patternscale_a:new o.bM(u,e.u_patternscale_a),u_patternscale_b:new o.bM(u,e.u_patternscale_b),u_sdfgamma:new o.b8(u,e.u_sdfgamma),u_image:new o.bH(u,e.u_image),u_tex_y_a:new o.b8(u,e.u_tex_y_a),u_tex_y_b:new o.b8(u,e.u_tex_y_b),u_mix:new o.b8(u,e.u_mix)}),raster:(u,e)=>({u_tl_parent:new o.bM(u,e.u_tl_parent),u_scale_parent:new o.b8(u,e.u_scale_parent),u_buffer_scale:new o.b8(u,e.u_buffer_scale),u_fade_t:new o.b8(u,e.u_fade_t),u_opacity:new o.b8(u,e.u_opacity),u_image0:new o.bH(u,e.u_image0),u_image1:new o.bH(u,e.u_image1),u_brightness_low:new o.b8(u,e.u_brightness_low),u_brightness_high:new o.b8(u,e.u_brightness_high),u_saturation_factor:new o.b8(u,e.u_saturation_factor),u_contrast_factor:new o.b8(u,e.u_contrast_factor),u_spin_weights:new o.bL(u,e.u_spin_weights),u_coords_top:new o.bK(u,e.u_coords_top),u_coords_bottom:new o.bK(u,e.u_coords_bottom)}),symbolIcon:(u,e)=>({u_is_size_zoom_constant:new o.bH(u,e.u_is_size_zoom_constant),u_is_size_feature_constant:new o.bH(u,e.u_is_size_feature_constant),u_size_t:new o.b8(u,e.u_size_t),u_size:new o.b8(u,e.u_size),u_camera_to_center_distance:new o.b8(u,e.u_camera_to_center_distance),u_pitch:new o.b8(u,e.u_pitch),u_rotate_symbol:new o.bH(u,e.u_rotate_symbol),u_aspect_ratio:new o.b8(u,e.u_aspect_ratio),u_fade_change:new o.b8(u,e.u_fade_change),u_label_plane_matrix:new o.bJ(u,e.u_label_plane_matrix),u_coord_matrix:new o.bJ(u,e.u_coord_matrix),u_is_text:new o.bH(u,e.u_is_text),u_pitch_with_map:new o.bH(u,e.u_pitch_with_map),u_is_along_line:new o.bH(u,e.u_is_along_line),u_is_variable_anchor:new o.bH(u,e.u_is_variable_anchor),u_texsize:new o.bM(u,e.u_texsize),u_texture:new o.bH(u,e.u_texture),u_translation:new o.bM(u,e.u_translation),u_pitched_scale:new o.b8(u,e.u_pitched_scale)}),symbolSDF:(u,e)=>({u_is_size_zoom_constant:new o.bH(u,e.u_is_size_zoom_constant),u_is_size_feature_constant:new o.bH(u,e.u_is_size_feature_constant),u_size_t:new o.b8(u,e.u_size_t),u_size:new o.b8(u,e.u_size),u_camera_to_center_distance:new o.b8(u,e.u_camera_to_center_distance),u_pitch:new o.b8(u,e.u_pitch),u_rotate_symbol:new o.bH(u,e.u_rotate_symbol),u_aspect_ratio:new o.b8(u,e.u_aspect_ratio),u_fade_change:new o.b8(u,e.u_fade_change),u_label_plane_matrix:new o.bJ(u,e.u_label_plane_matrix),u_coord_matrix:new o.bJ(u,e.u_coord_matrix),u_is_text:new o.bH(u,e.u_is_text),u_pitch_with_map:new o.bH(u,e.u_pitch_with_map),u_is_along_line:new o.bH(u,e.u_is_along_line),u_is_variable_anchor:new o.bH(u,e.u_is_variable_anchor),u_texsize:new o.bM(u,e.u_texsize),u_texture:new o.bH(u,e.u_texture),u_gamma_scale:new o.b8(u,e.u_gamma_scale),u_device_pixel_ratio:new o.b8(u,e.u_device_pixel_ratio),u_is_halo:new o.bH(u,e.u_is_halo),u_translation:new o.bM(u,e.u_translation),u_pitched_scale:new o.b8(u,e.u_pitched_scale)}),symbolTextAndIcon:(u,e)=>({u_is_size_zoom_constant:new o.bH(u,e.u_is_size_zoom_constant),u_is_size_feature_constant:new o.bH(u,e.u_is_size_feature_constant),u_size_t:new o.b8(u,e.u_size_t),u_size:new o.b8(u,e.u_size),u_camera_to_center_distance:new o.b8(u,e.u_camera_to_center_distance),u_pitch:new o.b8(u,e.u_pitch),u_rotate_symbol:new o.bH(u,e.u_rotate_symbol),u_aspect_ratio:new o.b8(u,e.u_aspect_ratio),u_fade_change:new o.b8(u,e.u_fade_change),u_label_plane_matrix:new o.bJ(u,e.u_label_plane_matrix),u_coord_matrix:new o.bJ(u,e.u_coord_matrix),u_is_text:new o.bH(u,e.u_is_text),u_pitch_with_map:new o.bH(u,e.u_pitch_with_map),u_is_along_line:new o.bH(u,e.u_is_along_line),u_is_variable_anchor:new o.bH(u,e.u_is_variable_anchor),u_texsize:new o.bM(u,e.u_texsize),u_texsize_icon:new o.bM(u,e.u_texsize_icon),u_texture:new o.bH(u,e.u_texture),u_texture_icon:new o.bH(u,e.u_texture_icon),u_gamma_scale:new o.b8(u,e.u_gamma_scale),u_device_pixel_ratio:new o.b8(u,e.u_device_pixel_ratio),u_is_halo:new o.bH(u,e.u_is_halo),u_translation:new o.bM(u,e.u_translation),u_pitched_scale:new o.b8(u,e.u_pitched_scale)}),background:(u,e)=>({u_opacity:new o.b8(u,e.u_opacity),u_color:new o.bI(u,e.u_color)}),backgroundPattern:(u,e)=>({u_opacity:new o.b8(u,e.u_opacity),u_image:new o.bH(u,e.u_image),u_pattern_tl_a:new o.bM(u,e.u_pattern_tl_a),u_pattern_br_a:new o.bM(u,e.u_pattern_br_a),u_pattern_tl_b:new o.bM(u,e.u_pattern_tl_b),u_pattern_br_b:new o.bM(u,e.u_pattern_br_b),u_texsize:new o.bM(u,e.u_texsize),u_mix:new o.b8(u,e.u_mix),u_pattern_size_a:new o.bM(u,e.u_pattern_size_a),u_pattern_size_b:new o.bM(u,e.u_pattern_size_b),u_scale_a:new o.b8(u,e.u_scale_a),u_scale_b:new o.b8(u,e.u_scale_b),u_pixel_coord_upper:new o.bM(u,e.u_pixel_coord_upper),u_pixel_coord_lower:new o.bM(u,e.u_pixel_coord_lower),u_tile_units_to_pixels:new o.b8(u,e.u_tile_units_to_pixels)}),terrain:(u,e)=>({u_texture:new o.bH(u,e.u_texture),u_ele_delta:new o.b8(u,e.u_ele_delta),u_fog_matrix:new o.bJ(u,e.u_fog_matrix),u_fog_color:new o.bI(u,e.u_fog_color),u_fog_ground_blend:new o.b8(u,e.u_fog_ground_blend),u_fog_ground_blend_opacity:new o.b8(u,e.u_fog_ground_blend_opacity),u_horizon_color:new o.bI(u,e.u_horizon_color),u_horizon_fog_blend:new o.b8(u,e.u_horizon_fog_blend),u_is_globe_mode:new o.b8(u,e.u_is_globe_mode)}),terrainDepth:(u,e)=>({u_ele_delta:new o.b8(u,e.u_ele_delta)}),terrainCoords:(u,e)=>({u_texture:new o.bH(u,e.u_texture),u_terrain_coords_id:new o.b8(u,e.u_terrain_coords_id),u_ele_delta:new o.b8(u,e.u_ele_delta)}),projectionErrorMeasurement:(u,e)=>({u_input:new o.b8(u,e.u_input),u_output_expected:new o.b8(u,e.u_output_expected)}),atmosphere:(u,e)=>({u_sun_pos:new o.bL(u,e.u_sun_pos),u_atmosphere_blend:new o.b8(u,e.u_atmosphere_blend),u_globe_position:new o.bL(u,e.u_globe_position),u_globe_radius:new o.b8(u,e.u_globe_radius),u_inv_proj_matrix:new o.bJ(u,e.u_inv_proj_matrix)}),sky:(u,e)=>({u_sky_color:new o.bI(u,e.u_sky_color),u_horizon_color:new o.bI(u,e.u_horizon_color),u_horizon:new o.bM(u,e.u_horizon),u_horizon_normal:new o.bM(u,e.u_horizon_normal),u_sky_horizon_blend:new o.b8(u,e.u_sky_horizon_blend),u_sky_blend:new o.b8(u,e.u_sky_blend)})};class Pu{constructor(e,r,a){this.context=e;const l=e.gl;this.buffer=l.createBuffer(),this.dynamicDraw=!!a,this.context.unbindVAO(),e.bindElementBuffer.set(this.buffer),l.bufferData(l.ELEMENT_ARRAY_BUFFER,r.arrayBuffer,this.dynamicDraw?l.DYNAMIC_DRAW:l.STATIC_DRAW),this.dynamicDraw||delete r.arrayBuffer}bind(){this.context.bindElementBuffer.set(this.buffer)}updateData(e){const r=this.context.gl;if(!this.dynamicDraw)throw new Error("Attempted to update data while not in dynamic mode.");this.context.unbindVAO(),this.bind(),r.bufferSubData(r.ELEMENT_ARRAY_BUFFER,0,e.arrayBuffer)}destroy(){this.buffer&&(this.context.gl.deleteBuffer(this.buffer),delete this.buffer)}}const Sl={Int8:"BYTE",Uint8:"UNSIGNED_BYTE",Int16:"SHORT",Uint16:"UNSIGNED_SHORT",Int32:"INT",Uint32:"UNSIGNED_INT",Float32:"FLOAT"};class Iu{constructor(e,r,a,l){this.length=r.length,this.attributes=a,this.itemSize=r.bytesPerElement,this.dynamicDraw=l,this.context=e;const h=e.gl;this.buffer=h.createBuffer(),e.bindVertexBuffer.set(this.buffer),h.bufferData(h.ARRAY_BUFFER,r.arrayBuffer,this.dynamicDraw?h.DYNAMIC_DRAW:h.STATIC_DRAW),this.dynamicDraw||delete r.arrayBuffer}bind(){this.context.bindVertexBuffer.set(this.buffer)}updateData(e){if(e.length!==this.length)throw new Error(`Length of new data is ${e.length}, which doesn't match current length of ${this.length}`);const r=this.context.gl;this.bind(),r.bufferSubData(r.ARRAY_BUFFER,0,e.arrayBuffer)}enableAttributes(e,r){for(let a=0;a<this.attributes.length;a++){const l=r.attributes[this.attributes[a].name];l!==void 0&&e.enableVertexAttribArray(l)}}setVertexAttribPointers(e,r,a){for(let l=0;l<this.attributes.length;l++){const h=this.attributes[l],g=r.attributes[h.name];g!==void 0&&e.vertexAttribPointer(g,h.components,e[Sl[h.type]],!1,this.itemSize,h.offset+this.itemSize*(a||0))}}destroy(){this.buffer&&(this.context.gl.deleteBuffer(this.buffer),delete this.buffer)}}class sr{constructor(e){this.gl=e.gl,this.default=this.getDefault(),this.current=this.default,this.dirty=!1}get(){return this.current}set(e){}getDefault(){return this.default}setDefault(){this.set(this.default)}}class Fn extends sr{getDefault(){return o.b7.transparent}set(e){const r=this.current;(e.r!==r.r||e.g!==r.g||e.b!==r.b||e.a!==r.a||this.dirty)&&(this.gl.clearColor(e.r,e.g,e.b,e.a),this.current=e,this.dirty=!1)}}class Al extends sr{getDefault(){return 1}set(e){(e!==this.current||this.dirty)&&(this.gl.clearDepth(e),this.current=e,this.dirty=!1)}}class kl extends sr{getDefault(){return 0}set(e){(e!==this.current||this.dirty)&&(this.gl.clearStencil(e),this.current=e,this.dirty=!1)}}class Tl extends sr{getDefault(){return[!0,!0,!0,!0]}set(e){const r=this.current;(e[0]!==r[0]||e[1]!==r[1]||e[2]!==r[2]||e[3]!==r[3]||this.dirty)&&(this.gl.colorMask(e[0],e[1],e[2],e[3]),this.current=e,this.dirty=!1)}}class Mu extends sr{getDefault(){return!0}set(e){(e!==this.current||this.dirty)&&(this.gl.depthMask(e),this.current=e,this.dirty=!1)}}class Cl extends sr{getDefault(){return 255}set(e){(e!==this.current||this.dirty)&&(this.gl.stencilMask(e),this.current=e,this.dirty=!1)}}class Ao extends sr{getDefault(){return{func:this.gl.ALWAYS,ref:0,mask:255}}set(e){const r=this.current;(e.func!==r.func||e.ref!==r.ref||e.mask!==r.mask||this.dirty)&&(this.gl.stencilFunc(e.func,e.ref,e.mask),this.current=e,this.dirty=!1)}}class El extends sr{getDefault(){const e=this.gl;return[e.KEEP,e.KEEP,e.KEEP]}set(e){const r=this.current;(e[0]!==r[0]||e[1]!==r[1]||e[2]!==r[2]||this.dirty)&&(this.gl.stencilOp(e[0],e[1],e[2]),this.current=e,this.dirty=!1)}}class pp extends sr{getDefault(){return!1}set(e){if(e===this.current&&!this.dirty)return;const r=this.gl;e?r.enable(r.STENCIL_TEST):r.disable(r.STENCIL_TEST),this.current=e,this.dirty=!1}}class dp extends sr{getDefault(){return[0,1]}set(e){const r=this.current;(e[0]!==r[0]||e[1]!==r[1]||this.dirty)&&(this.gl.depthRange(e[0],e[1]),this.current=e,this.dirty=!1)}}class fp extends sr{getDefault(){return!1}set(e){if(e===this.current&&!this.dirty)return;const r=this.gl;e?r.enable(r.DEPTH_TEST):r.disable(r.DEPTH_TEST),this.current=e,this.dirty=!1}}class mp extends sr{getDefault(){return this.gl.LESS}set(e){(e!==this.current||this.dirty)&&(this.gl.depthFunc(e),this.current=e,this.dirty=!1)}}class Lu extends sr{getDefault(){return!1}set(e){if(e===this.current&&!this.dirty)return;const r=this.gl;e?r.enable(r.BLEND):r.disable(r.BLEND),this.current=e,this.dirty=!1}}class gp extends sr{getDefault(){const e=this.gl;return[e.ONE,e.ZERO]}set(e){const r=this.current;(e[0]!==r[0]||e[1]!==r[1]||this.dirty)&&(this.gl.blendFunc(e[0],e[1]),this.current=e,this.dirty=!1)}}class Ru extends sr{getDefault(){return o.b7.transparent}set(e){const r=this.current;(e.r!==r.r||e.g!==r.g||e.b!==r.b||e.a!==r.a||this.dirty)&&(this.gl.blendColor(e.r,e.g,e.b,e.a),this.current=e,this.dirty=!1)}}class ga extends sr{getDefault(){return this.gl.FUNC_ADD}set(e){(e!==this.current||this.dirty)&&(this.gl.blendEquation(e),this.current=e,this.dirty=!1)}}class ya extends sr{getDefault(){return!1}set(e){if(e===this.current&&!this.dirty)return;const r=this.gl;e?r.enable(r.CULL_FACE):r.disable(r.CULL_FACE),this.current=e,this.dirty=!1}}class _a extends sr{getDefault(){return this.gl.BACK}set(e){(e!==this.current||this.dirty)&&(this.gl.cullFace(e),this.current=e,this.dirty=!1)}}class Pl extends sr{getDefault(){return this.gl.CCW}set(e){(e!==this.current||this.dirty)&&(this.gl.frontFace(e),this.current=e,this.dirty=!1)}}class ko extends sr{getDefault(){return null}set(e){(e!==this.current||this.dirty)&&(this.gl.useProgram(e),this.current=e,this.dirty=!1)}}class xa extends sr{getDefault(){return this.gl.TEXTURE0}set(e){(e!==this.current||this.dirty)&&(this.gl.activeTexture(e),this.current=e,this.dirty=!1)}}class Bo extends sr{getDefault(){const e=this.gl;return[0,0,e.drawingBufferWidth,e.drawingBufferHeight]}set(e){const r=this.current;(e[0]!==r[0]||e[1]!==r[1]||e[2]!==r[2]||e[3]!==r[3]||this.dirty)&&(this.gl.viewport(e[0],e[1],e[2],e[3]),this.current=e,this.dirty=!1)}}class en extends sr{getDefault(){return null}set(e){if(e===this.current&&!this.dirty)return;const r=this.gl;r.bindFramebuffer(r.FRAMEBUFFER,e),this.current=e,this.dirty=!1}}class Du extends sr{getDefault(){return null}set(e){if(e===this.current&&!this.dirty)return;const r=this.gl;r.bindRenderbuffer(r.RENDERBUFFER,e),this.current=e,this.dirty=!1}}class zu extends sr{getDefault(){return null}set(e){if(e===this.current&&!this.dirty)return;const r=this.gl;r.bindTexture(r.TEXTURE_2D,e),this.current=e,this.dirty=!1}}class Il extends sr{getDefault(){return null}set(e){if(e===this.current&&!this.dirty)return;const r=this.gl;r.bindBuffer(r.ARRAY_BUFFER,e),this.current=e,this.dirty=!1}}class To extends sr{getDefault(){return null}set(e){const r=this.gl;r.bindBuffer(r.ELEMENT_ARRAY_BUFFER,e),this.current=e,this.dirty=!1}}class ba extends sr{getDefault(){return null}set(e){var r;if(e===this.current&&!this.dirty)return;const a=this.gl;Sr(a)?a.bindVertexArray(e):(r=a.getExtension("OES_vertex_array_object"))===null||r===void 0||r.bindVertexArrayOES(e),this.current=e,this.dirty=!1}}class va extends sr{getDefault(){return 4}set(e){if(e===this.current&&!this.dirty)return;const r=this.gl;r.pixelStorei(r.UNPACK_ALIGNMENT,e),this.current=e,this.dirty=!1}}class ws extends sr{getDefault(){return!1}set(e){if(e===this.current&&!this.dirty)return;const r=this.gl;r.pixelStorei(r.UNPACK_PREMULTIPLY_ALPHA_WEBGL,e),this.current=e,this.dirty=!1}}class wa extends sr{getDefault(){return!1}set(e){if(e===this.current&&!this.dirty)return;const r=this.gl;r.pixelStorei(r.UNPACK_FLIP_Y_WEBGL,e),this.current=e,this.dirty=!1}}class Sa extends sr{constructor(e,r){super(e),this.context=e,this.parent=r}getDefault(){return null}}class Vo extends Sa{setDirty(){this.dirty=!0}set(e){if(e===this.current&&!this.dirty)return;this.context.bindFramebuffer.set(this.parent);const r=this.gl;r.framebufferTexture2D(r.FRAMEBUFFER,r.COLOR_ATTACHMENT0,r.TEXTURE_2D,e,0),this.current=e,this.dirty=!1}}class Oo extends Sa{set(e){if(e===this.current&&!this.dirty)return;this.context.bindFramebuffer.set(this.parent);const r=this.gl;r.framebufferRenderbuffer(r.FRAMEBUFFER,r.DEPTH_ATTACHMENT,r.RENDERBUFFER,e),this.current=e,this.dirty=!1}}class Bu extends Sa{set(e){if(e===this.current&&!this.dirty)return;this.context.bindFramebuffer.set(this.parent);const r=this.gl;r.framebufferRenderbuffer(r.FRAMEBUFFER,r.DEPTH_STENCIL_ATTACHMENT,r.RENDERBUFFER,e),this.current=e,this.dirty=!1}}const Aa="Framebuffer is not complete";class $t{constructor(e,r,a,l,h){this.context=e,this.width=r,this.height=a;const g=e.gl,b=this.framebuffer=g.createFramebuffer();if(this.colorAttachment=new Vo(e,b),l)this.depthAttachment=h?new Bu(e,b):new Oo(e,b);else if(h)throw new Error("Stencil cannot be set without depth");if(g.checkFramebufferStatus(g.FRAMEBUFFER)!==g.FRAMEBUFFER_COMPLETE)throw new Error(Aa)}destroy(){const e=this.context.gl,r=this.colorAttachment.get();if(r&&e.deleteTexture(r),this.depthAttachment){const a=this.depthAttachment.get();a&&e.deleteRenderbuffer(a)}e.deleteFramebuffer(this.framebuffer)}}class ka{constructor(e){var r,a;if(this.gl=e,this.clearColor=new Fn(this),this.clearDepth=new Al(this),this.clearStencil=new kl(this),this.colorMask=new Tl(this),this.depthMask=new Mu(this),this.stencilMask=new Cl(this),this.stencilFunc=new Ao(this),this.stencilOp=new El(this),this.stencilTest=new pp(this),this.depthRange=new dp(this),this.depthTest=new fp(this),this.depthFunc=new mp(this),this.blend=new Lu(this),this.blendFunc=new gp(this),this.blendColor=new Ru(this),this.blendEquation=new ga(this),this.cullFace=new ya(this),this.cullFaceSide=new _a(this),this.frontFace=new Pl(this),this.program=new ko(this),this.activeTexture=new xa(this),this.viewport=new Bo(this),this.bindFramebuffer=new en(this),this.bindRenderbuffer=new Du(this),this.bindTexture=new zu(this),this.bindVertexBuffer=new Il(this),this.bindElementBuffer=new To(this),this.bindVertexArray=new ba(this),this.pixelStoreUnpack=new va(this),this.pixelStoreUnpackPremultiplyAlpha=new ws(this),this.pixelStoreUnpackFlipY=new wa(this),this.extTextureFilterAnisotropic=e.getExtension("EXT_texture_filter_anisotropic")||e.getExtension("MOZ_EXT_texture_filter_anisotropic")||e.getExtension("WEBKIT_EXT_texture_filter_anisotropic"),this.extTextureFilterAnisotropic&&(this.extTextureFilterAnisotropicMax=e.getParameter(this.extTextureFilterAnisotropic.MAX_TEXTURE_MAX_ANISOTROPY_EXT)),this.maxTextureSize=e.getParameter(e.MAX_TEXTURE_SIZE),Sr(e)){this.HALF_FLOAT=e.HALF_FLOAT;const l=e.getExtension("EXT_color_buffer_half_float");this.RGBA16F=(r=e.RGBA16F)!==null&&r!==void 0?r:l==null?void 0:l.RGBA16F_EXT,this.RGB16F=(a=e.RGB16F)!==null&&a!==void 0?a:l==null?void 0:l.RGB16F_EXT,e.getExtension("EXT_color_buffer_float")}else{e.getExtension("EXT_color_buffer_half_float"),e.getExtension("OES_texture_half_float_linear");const l=e.getExtension("OES_texture_half_float");this.HALF_FLOAT=l==null?void 0:l.HALF_FLOAT_OES}}setDefault(){this.unbindVAO(),this.clearColor.setDefault(),this.clearDepth.setDefault(),this.clearStencil.setDefault(),this.colorMask.setDefault(),this.depthMask.setDefault(),this.stencilMask.setDefault(),this.stencilFunc.setDefault(),this.stencilOp.setDefault(),this.stencilTest.setDefault(),this.depthRange.setDefault(),this.depthTest.setDefault(),this.depthFunc.setDefault(),this.blend.setDefault(),this.blendFunc.setDefault(),this.blendColor.setDefault(),this.blendEquation.setDefault(),this.cullFace.setDefault(),this.cullFaceSide.setDefault(),this.frontFace.setDefault(),this.program.setDefault(),this.activeTexture.setDefault(),this.bindFramebuffer.setDefault(),this.pixelStoreUnpack.setDefault(),this.pixelStoreUnpackPremultiplyAlpha.setDefault(),this.pixelStoreUnpackFlipY.setDefault()}setDirty(){this.clearColor.dirty=!0,this.clearDepth.dirty=!0,this.clearStencil.dirty=!0,this.colorMask.dirty=!0,this.depthMask.dirty=!0,this.stencilMask.dirty=!0,this.stencilFunc.dirty=!0,this.stencilOp.dirty=!0,this.stencilTest.dirty=!0,this.depthRange.dirty=!0,this.depthTest.dirty=!0,this.depthFunc.dirty=!0,this.blend.dirty=!0,this.blendFunc.dirty=!0,this.blendColor.dirty=!0,this.blendEquation.dirty=!0,this.cullFace.dirty=!0,this.cullFaceSide.dirty=!0,this.frontFace.dirty=!0,this.program.dirty=!0,this.activeTexture.dirty=!0,this.viewport.dirty=!0,this.bindFramebuffer.dirty=!0,this.bindRenderbuffer.dirty=!0,this.bindTexture.dirty=!0,this.bindVertexBuffer.dirty=!0,this.bindElementBuffer.dirty=!0,this.bindVertexArray.dirty=!0,this.pixelStoreUnpack.dirty=!0,this.pixelStoreUnpackPremultiplyAlpha.dirty=!0,this.pixelStoreUnpackFlipY.dirty=!0}createIndexBuffer(e,r){return new Pu(this,e,r)}createVertexBuffer(e,r,a){return new Iu(this,e,r,a)}createRenderbuffer(e,r,a){const l=this.gl,h=l.createRenderbuffer();return this.bindRenderbuffer.set(h),l.renderbufferStorage(l.RENDERBUFFER,e,r,a),this.bindRenderbuffer.set(null),h}createFramebuffer(e,r,a,l){return new $t(this,e,r,a,l)}clear({color:e,depth:r,stencil:a}){const l=this.gl;let h=0;e&&(h|=l.COLOR_BUFFER_BIT,this.clearColor.set(e),this.colorMask.set([!0,!0,!0,!0])),r!==void 0&&(h|=l.DEPTH_BUFFER_BIT,this.depthRange.set([0,1]),this.clearDepth.set(r),this.depthMask.set(!0)),a!==void 0&&(h|=l.STENCIL_BUFFER_BIT,this.clearStencil.set(a),this.stencilMask.set(255)),l.clear(h)}setCullFace(e){e.enable===!1?this.cullFace.set(!1):(this.cullFace.set(!0),this.cullFaceSide.set(e.mode),this.frontFace.set(e.frontFace))}setDepthMode(e){e.func!==this.gl.ALWAYS||e.mask?(this.depthTest.set(!0),this.depthFunc.set(e.func),this.depthMask.set(e.mask),this.depthRange.set(e.range)):this.depthTest.set(!1)}setStencilMode(e){e.test.func!==this.gl.ALWAYS||e.mask?(this.stencilTest.set(!0),this.stencilMask.set(e.mask),this.stencilOp.set([e.fail,e.depthFail,e.pass]),this.stencilFunc.set({func:e.test.func,ref:e.ref,mask:e.test.mask})):this.stencilTest.set(!1)}setColorMode(e){o.bE(e.blendFunction,Ye.Replace)?this.blend.set(!1):(this.blend.set(!0),this.blendFunc.set(e.blendFunction),this.blendColor.set(e.blendColor)),this.colorMask.set(e.mask)}createVertexArray(){var e;return Sr(this.gl)?this.gl.createVertexArray():(e=this.gl.getExtension("OES_vertex_array_object"))===null||e===void 0?void 0:e.createVertexArrayOES()}deleteVertexArray(e){var r;return Sr(this.gl)?this.gl.deleteVertexArray(e):(r=this.gl.getExtension("OES_vertex_array_object"))===null||r===void 0?void 0:r.deleteVertexArrayOES(e)}unbindVAO(){this.bindVertexArray.set(null)}}let Ta;function Ml(u,e,r,a,l){const h=u.context,g=u.transform,b=h.gl,A=u.useProgram("collisionBox"),I=[];let z=0,F=0;for(let se=0;se<a.length;se++){const de=a[se],_e=e.getTile(de).getBucket(r);if(!_e)continue;const ye=l?_e.textCollisionBox:_e.iconCollisionBox,be=_e.collisionCircleArray;be.length>0&&(I.push({circleArray:be,circleOffset:F,coord:de}),z+=be.length/4,F=z),ye&&A.draw(h,b.LINES,nt.disabled,dt.disabled,u.colorModeForRenderPass(),ht.disabled,lp(u.transform),u.style.map.terrain&&u.style.map.terrain.getTerrainData(de),g.getProjectionData({overscaledTileID:de,applyGlobeMatrix:!0,applyTerrainMatrix:!0}),r.id,ye.layoutVertexBuffer,ye.indexBuffer,ye.segments,null,u.transform.zoom,null,null,ye.collisionVertexBuffer)}if(!l||!I.length)return;const O=u.useProgram("collisionCircle"),Z=new o.bT;Z.resize(4*z),Z._trim();let J=0;for(const se of I)for(let de=0;de<se.circleArray.length/4;de++){const _e=4*de,ye=se.circleArray[_e+0],be=se.circleArray[_e+1],ke=se.circleArray[_e+2],we=se.circleArray[_e+3];Z.emplace(J++,ye,be,ke,we,0),Z.emplace(J++,ye,be,ke,we,1),Z.emplace(J++,ye,be,ke,we,2),Z.emplace(J++,ye,be,ke,we,3)}(!Ta||Ta.length<2*z)&&(Ta=function(se){const de=2*se,_e=new o.bV;_e.resize(de),_e._trim();for(let ye=0;ye<de;ye++){const be=6*ye;_e.uint16[be+0]=4*ye+0,_e.uint16[be+1]=4*ye+1,_e.uint16[be+2]=4*ye+2,_e.uint16[be+3]=4*ye+2,_e.uint16[be+4]=4*ye+3,_e.uint16[be+5]=4*ye+0}return _e}(z));const oe=h.createIndexBuffer(Ta,!0),ne=h.createVertexBuffer(Z,o.bU.members,!0);for(const se of I){const de=fa(u.transform);O.draw(h,b.TRIANGLES,nt.disabled,dt.disabled,u.colorModeForRenderPass(),ht.disabled,de,u.style.map.terrain&&u.style.map.terrain.getTerrainData(se.coord),null,r.id,ne,oe,o.aJ.simpleSegment(0,2*se.circleOffset,se.circleArray.length,se.circleArray.length/2),null,u.transform.zoom,null,null,null)}ne.destroy(),oe.destroy()}const Ss=o.ad(new Float32Array(16));function yp(u,e,r,a,l,h){const{horizontalAlign:g,verticalAlign:b}=o.aE(u);return new o.P((-(g-.5)*e/l+a[0])*h,(-(b-.5)*r/l+a[1])*h)}function _p(u,e,r,a,l,h){const g=e.tileAnchorPoint.add(new o.P(e.translation[0],e.translation[1]));if(e.pitchWithMap){let b=a.mult(h);r||(b=b.rotate(-l));const A=g.add(b);return Ue(A.x,A.y,e.pitchedLabelPlaneMatrix,e.getElevation).point}if(r){const b=gr(e.tileAnchorPoint.x+1,e.tileAnchorPoint.y,e).point.sub(u),A=Math.atan(b.y/b.x)+(b.x<0?Math.PI:0);return u.add(a.rotate(A))}return u.add(a)}function Vu(u,e,r,a,l,h,g,b,A,I,z,F){const O=u.text.placedSymbolArray,Z=u.text.dynamicLayoutVertexArray,J=u.icon.dynamicLayoutVertexArray,oe={};Z.clear();for(let ne=0;ne<O.length;ne++){const se=O.get(ne),de=se.hidden||!se.crossTileID||u.allowVerticalPlacement&&!se.placedOrientation?null:a[se.crossTileID];if(de){const _e=new o.P(se.anchorX,se.anchorY),ye={getElevation:F,width:l.width,height:l.height,pitchedLabelPlaneMatrix:h,pitchWithMap:r,transform:l,tileAnchorPoint:_e,translation:I,unwrappedTileID:z},be=r?Kt(_e.x,_e.y,ye):gr(_e.x,_e.y,ye),ke=ar(l.cameraToCenterDistance,be.signedDistanceFromCamera);let we=o.am(u.textSizeData,b,se)*ke/o.ay;r&&(we*=u.tilePixelRatio/g);const{width:Le,height:We,anchor:Fe,textOffset:Ne,textBoxScale:je}=de,mt=yp(Fe,Le,We,Ne,je,we),pt=l.getPitchedTextCorrection(_e.x+I[0],_e.y+I[1],z),tt=_p(be.point,ye,e,mt,-l.bearingInRadians,pt),kt=u.allowVerticalPlacement&&se.placedOrientation===o.al.vertical?Math.PI/2:0;for(let Gt=0;Gt<se.numGlyphs;Gt++)o.as(Z,tt,kt);A&&se.associatedIconIndex>=0&&(oe[se.associatedIconIndex]={shiftedAnchor:tt,angle:kt})}else Ri(se.numGlyphs,Z)}if(A){J.clear();const ne=u.icon.placedSymbolArray;for(let se=0;se<ne.length;se++){const de=ne.get(se);if(de.hidden)Ri(de.numGlyphs,J);else{const _e=oe[se];if(_e)for(let ye=0;ye<de.numGlyphs;ye++)o.as(J,_e.shiftedAnchor,_e.angle);else Ri(de.numGlyphs,J)}}u.icon.dynamicLayoutVertexBuffer.updateData(J)}u.text.dynamicLayoutVertexBuffer.updateData(Z)}function xp(u,e,r){return r.iconsInText&&e?"symbolTextAndIcon":u?"symbolSDF":"symbolIcon"}function Ca(u,e,r,a,l,h,g,b,A,I,z,F,O){const Z=u.context,J=Z.gl,oe=u.transform,ne=b==="map",se=A==="map",de=b!=="viewport"&&r.layout.get("symbol-placement")!=="point",_e=ne&&!se&&!de,ye=!r.layout.get("symbol-sort-key").isConstant();let be=!1;const ke=u.getDepthModeForSublayer(0,nt.ReadOnly),we=r._unevaluatedLayout.hasValue("text-variable-anchor")||r._unevaluatedLayout.hasValue("text-variable-anchor-offset"),Le=[],We=oe.getCircleRadiusCorrection();for(const Fe of a){const Ne=e.getTile(Fe),je=Ne.getBucket(r);if(!je)continue;const mt=l?je.text:je.icon;if(!mt||!mt.segments.get().length||!mt.hasVisibleVertices)continue;const pt=mt.programConfigurations.get(r.id),tt=l||je.sdfIcons,kt=l?je.textSizeData:je.iconSizeData,Gt=se||oe.pitch!==0,nr=u.useProgram(xp(tt,l,je),pt),Br=o.ak(kt,oe.zoom),xr=u.style.map.terrain&&u.style.map.terrain.getTerrainData(Fe);let Vr,Or,Ar,cr,ei=[0,0],ci=null;if(l)Or=Ne.glyphAtlasTexture,Ar=J.LINEAR,Vr=Ne.glyphAtlasTexture.size,je.iconsInText&&(ei=Ne.imageAtlasTexture.size,ci=Ne.imageAtlasTexture,cr=Gt||u.options.rotating||u.options.zooming||kt.kind==="composite"||kt.kind==="camera"?J.LINEAR:J.NEAREST);else{const Jr=r.layout.get("icon-size").constantOr(0)!==1||je.iconsNeedLinear;Or=Ne.imageAtlasTexture,Ar=tt||u.options.rotating||u.options.zooming||Jr||Gt?J.LINEAR:J.NEAREST,Vr=Ne.imageAtlasTexture.size}const xi=o.az(Ne,1,u.transform.zoom),ur=Et(ne,u.transform,xi),ro=o.K();o.an(ro,ur);const kn=jt(se,ne,u.transform,xi),io=o.aA(oe,Ne,h,g),Po=oe.getProjectionData({overscaledTileID:Fe,applyGlobeMatrix:!O,applyTerrainMatrix:!0}),Os=we&&je.hasTextData(),no=r.layout.get("icon-text-fit")!=="none"&&Os&&je.hasIconData();if(de){const Jr=u.style.map.terrain?(Pi,Er)=>u.style.map.terrain.getElevation(Fe,Pi,Er):null,Xr=r.layout.get("text-rotation-alignment")==="map";or(je,u,l,ur,ro,se,I,Xr,Fe.toUnwrapped(),oe.width,oe.height,io,Jr)}const Io=l&&we||no,qi=de||Io?Ss:se?ur:u.transform.clipSpaceToPixelsMatrix,oo=tt&&r.paint.get(l?"text-halo-width":"icon-halo-width").constantOr(1)!==0;let qn;qn=tt?je.iconsInText?ma(kt.kind,Br,_e,se,de,Io,u,qi,kn,io,Vr,ei,We):Cu(kt.kind,Br,_e,se,de,Io,u,qi,kn,io,l,Vr,0,We):zo(kt.kind,Br,_e,se,de,Io,u,qi,kn,io,l,Vr,We);const so={program:nr,buffers:mt,uniformValues:qn,projectionData:Po,atlasTexture:Or,atlasTextureIcon:ci,atlasInterpolation:Ar,atlasInterpolationIcon:cr,isSDF:tt,hasHalo:oo};if(ye&&je.canOverlap){be=!0;const Jr=mt.segments.get();for(const Xr of Jr)Le.push({segments:new o.aJ([Xr]),sortKey:Xr.sortKey,state:so,terrainData:xr})}else Le.push({segments:mt.segments,sortKey:0,state:so,terrainData:xr})}be&&Le.sort((Fe,Ne)=>Fe.sortKey-Ne.sortKey);for(const Fe of Le){const Ne=Fe.state;if(Z.activeTexture.set(J.TEXTURE0),Ne.atlasTexture.bind(Ne.atlasInterpolation,J.CLAMP_TO_EDGE),Ne.atlasTextureIcon&&(Z.activeTexture.set(J.TEXTURE1),Ne.atlasTextureIcon&&Ne.atlasTextureIcon.bind(Ne.atlasInterpolationIcon,J.CLAMP_TO_EDGE)),Ne.isSDF){const je=Ne.uniformValues;Ne.hasHalo&&(je.u_is_halo=1,As(Ne.buffers,Fe.segments,r,u,Ne.program,ke,z,F,je,Ne.projectionData,Fe.terrainData)),je.u_is_halo=0}As(Ne.buffers,Fe.segments,r,u,Ne.program,ke,z,F,Ne.uniformValues,Ne.projectionData,Fe.terrainData)}}function As(u,e,r,a,l,h,g,b,A,I,z){const F=a.context;l.draw(F,F.gl.TRIANGLES,h,g,b,ht.backCCW,A,z,I,r.id,u.layoutVertexBuffer,u.indexBuffer,e,r.paint,a.transform.zoom,u.programConfigurations.get(r.id),u.dynamicLayoutVertexBuffer,u.opacityVertexBuffer)}function Ea(u,e,r,a,l){const h=u.context,g=h.gl,b=dt.disabled,A=new Ye([g.ONE,g.ONE],o.b7.transparent,[!0,!0,!0,!0]),I=e.getBucket(r);if(!I)return;const z=a.key;let F=r.heatmapFbos.get(z);F||(F=Pa(h,e.tileSize,e.tileSize),r.heatmapFbos.set(z,F)),h.bindFramebuffer.set(F.framebuffer),h.viewport.set([0,0,e.tileSize,e.tileSize]),h.clear({color:o.b7.transparent});const O=I.programConfigurations.get(r.id),Z=u.useProgram("heatmap",O,!l),J=u.transform.getProjectionData({overscaledTileID:e.tileID,applyGlobeMatrix:!0,applyTerrainMatrix:!0}),oe=u.style.map.terrain.getTerrainData(a);Z.draw(h,g.TRIANGLES,nt.disabled,b,A,ht.disabled,So(e,u.transform.zoom,r.paint.get("heatmap-intensity"),1),oe,J,r.id,I.layoutVertexBuffer,I.indexBuffer,I.segments,r.paint,u.transform.zoom,O)}function Ll(u,e,r,a,l){const h=u.context,g=h.gl,b=u.transform;h.setColorMode(u.colorModeForRenderPass());const A=Rl(h,e),I=r.key,z=e.heatmapFbos.get(I);if(!z)return;h.activeTexture.set(g.TEXTURE0),g.bindTexture(g.TEXTURE_2D,z.colorAttachment.get()),h.activeTexture.set(g.TEXTURE1),A.bind(g.LINEAR,g.CLAMP_TO_EDGE);const F=b.getProjectionData({overscaledTileID:r,applyTerrainMatrix:l,applyGlobeMatrix:!a});u.useProgram("heatmapTexture").draw(h,g.TRIANGLES,nt.disabled,dt.disabled,u.colorModeForRenderPass(),ht.disabled,xu(u,e,0,1),null,F,e.id,u.rasterBoundsBuffer,u.quadTriangleIndexBuffer,u.rasterBoundsSegments,e.paint,b.zoom),z.destroy(),e.heatmapFbos.delete(I)}function Pa(u,e,r){var a,l;const h=u.gl,g=h.createTexture();h.bindTexture(h.TEXTURE_2D,g),h.texParameteri(h.TEXTURE_2D,h.TEXTURE_WRAP_S,h.CLAMP_TO_EDGE),h.texParameteri(h.TEXTURE_2D,h.TEXTURE_WRAP_T,h.CLAMP_TO_EDGE),h.texParameteri(h.TEXTURE_2D,h.TEXTURE_MIN_FILTER,h.LINEAR),h.texParameteri(h.TEXTURE_2D,h.TEXTURE_MAG_FILTER,h.LINEAR);const b=(a=u.HALF_FLOAT)!==null&&a!==void 0?a:h.UNSIGNED_BYTE,A=(l=u.RGBA16F)!==null&&l!==void 0?l:h.RGBA;h.texImage2D(h.TEXTURE_2D,0,A,e,r,0,h.RGBA,b,null);const I=u.createFramebuffer(e,r,!1,!1);return I.colorAttachment.set(g),I}function Rl(u,e){return e.colorRampTexture||(e.colorRampTexture=new rt(u,e.colorRamp,u.gl.RGBA)),e.colorRampTexture}function ks(u,e,r,a,l){if(!r||!a||!a.imageAtlas)return;const h=a.imageAtlas.patternPositions;let g=h[r.to.toString()],b=h[r.from.toString()];if(!g&&b&&(g=b),!b&&g&&(b=g),!g||!b){const A=l.getPaintProperty(e);g=h[A],b=h[A]}g&&b&&u.setConstantPatternPositions(g,b)}function Ts(u,e,r,a,l,h,g,b){const A=u.context.gl,I="fill-pattern",z=r.paint.get(I),F=z&&z.constantOr(1),O=r.getCrossfadeParameters();let Z,J,oe,ne,se;const de=u.transform,_e=r.paint.get("fill-translate"),ye=r.paint.get("fill-translate-anchor");g?(J=F&&!r.getPaintProperty("fill-outline-color")?"fillOutlinePattern":"fillOutline",Z=A.LINES):(J=F?"fillPattern":"fill",Z=A.TRIANGLES);const be=z.constantOr(null);for(const ke of a){const we=e.getTile(ke);if(F&&!we.patternsLoaded())continue;const Le=we.getBucket(r);if(!Le)continue;const We=Le.programConfigurations.get(r.id),Fe=u.useProgram(J,We),Ne=u.style.map.terrain&&u.style.map.terrain.getTerrainData(ke);F&&(u.context.activeTexture.set(A.TEXTURE0),we.imageAtlasTexture.bind(A.LINEAR,A.CLAMP_TO_EDGE),We.updatePaintBuffers(O)),ks(We,I,be,we,r);const je=de.getProjectionData({overscaledTileID:ke,applyGlobeMatrix:!b,applyTerrainMatrix:!0}),mt=o.aA(de,we,_e,ye);if(g){ne=Le.indexBuffer2,se=Le.segments2;const tt=[A.drawingBufferWidth,A.drawingBufferHeight];oe=J==="fillOutlinePattern"&&F?xs(u,O,we,tt,mt):bl(tt,mt)}else ne=Le.indexBuffer,se=Le.segments,oe=F?yu(u,O,we,mt):{u_fill_translate:mt};const pt=u.stencilModeForClipping(ke);Fe.draw(u.context,Z,l,pt,h,ht.backCCW,oe,Ne,je,r.id,Le.layoutVertexBuffer,ne,se,r.paint,u.transform.zoom,We)}}function Cs(u,e,r,a,l,h,g,b){const A=u.context,I=A.gl,z="fill-extrusion-pattern",F=r.paint.get(z),O=F.constantOr(1),Z=r.getCrossfadeParameters(),J=r.paint.get("fill-extrusion-opacity"),oe=F.constantOr(null),ne=u.transform;for(const se of a){const de=e.getTile(se),_e=de.getBucket(r);if(!_e)continue;const ye=u.style.map.terrain&&u.style.map.terrain.getTerrainData(se),be=_e.programConfigurations.get(r.id),ke=u.useProgram(O?"fillExtrusionPattern":"fillExtrusion",be);O&&(u.context.activeTexture.set(I.TEXTURE0),de.imageAtlasTexture.bind(I.LINEAR,I.CLAMP_TO_EDGE),be.updatePaintBuffers(Z));const we=ne.getProjectionData({overscaledTileID:se,applyGlobeMatrix:!b,applyTerrainMatrix:!0});ks(be,z,oe,de,r);const Le=o.aA(ne,de,r.paint.get("fill-extrusion-translate"),r.paint.get("fill-extrusion-translate-anchor")),We=r.paint.get("fill-extrusion-vertical-gradient"),Fe=O?wn(u,We,J,Le,se,Z,de):da(u,We,J,Le);ke.draw(A,A.gl.TRIANGLES,l,h,g,ht.backCCW,Fe,ye,we,r.id,_e.layoutVertexBuffer,_e.indexBuffer,_e.segments,r.paint,u.transform.zoom,be,u.style.map.terrain&&_e.centroidVertexBuffer)}}function Dl(u,e,r,a,l,h,g,b,A){var I;const z=u.style.projection,F=u.context,O=u.transform,Z=F.gl,J=[`#define NUM_ILLUMINATION_SOURCES ${r.paint.get("hillshade-highlight-color").values.length}`],oe=u.useProgram("hillshade",null,!1,J),ne=!u.options.moving;for(const se of a){const de=e.getTile(se),_e=de.fbo;if(!_e)continue;const ye=z.getMeshFromTileID(F,se.canonical,b,!0,"raster"),be=(I=u.style.map.terrain)===null||I===void 0?void 0:I.getTerrainData(se);F.activeTexture.set(Z.TEXTURE0),Z.bindTexture(Z.TEXTURE_2D,_e.colorAttachment.get());const ke=O.getProjectionData({overscaledTileID:se,aligned:ne,applyGlobeMatrix:!A,applyTerrainMatrix:!0});oe.draw(F,Z.TRIANGLES,h,l[se.overscaledZ],g,ht.backCCW,bu(u,de,r),be,ke,r.id,ye.vertexBuffer,ye.indexBuffer,ye.segments)}}const Es=[new o.P(0,0),new o.P(o.Z,0),new o.P(o.Z,o.Z),new o.P(0,o.Z)];function Ia(u,e,r,a,l,h,g,b,A=!1,I=!1){const z=a[a.length-1].overscaledZ,F=u.context,O=F.gl,Z=u.useProgram("raster"),J=u.transform,oe=u.style.projection,ne=u.colorModeForRenderPass(),se=!u.options.moving;for(const de of a){const _e=u.getDepthModeForSublayer(de.overscaledZ-z,r.paint.get("raster-opacity")===1?nt.ReadWrite:nt.ReadOnly,O.LESS),ye=e.getTile(de);ye.registerFadeDuration(r.paint.get("raster-fade-duration"));const be=e.findLoadedParent(de,0),ke=e.findLoadedSibling(de),we=Ou(ye,be||ke||null,e,r,u.transform,u.style.map.terrain);let Le,We;const Fe=r.paint.get("raster-resampling")==="nearest"?O.NEAREST:O.LINEAR;F.activeTexture.set(O.TEXTURE0),ye.texture.bind(Fe,O.CLAMP_TO_EDGE,O.LINEAR_MIPMAP_NEAREST),F.activeTexture.set(O.TEXTURE1),be?(be.texture.bind(Fe,O.CLAMP_TO_EDGE,O.LINEAR_MIPMAP_NEAREST),Le=Math.pow(2,be.tileID.overscaledZ-ye.tileID.overscaledZ),We=[ye.tileID.canonical.x*Le%1,ye.tileID.canonical.y*Le%1]):ye.texture.bind(Fe,O.CLAMP_TO_EDGE,O.LINEAR_MIPMAP_NEAREST),ye.texture.useMipmap&&F.extTextureFilterAnisotropic&&u.transform.pitch>20&&O.texParameterf(O.TEXTURE_2D,F.extTextureFilterAnisotropic.TEXTURE_MAX_ANISOTROPY_EXT,F.extTextureFilterAnisotropicMax);const Ne=u.style.map.terrain&&u.style.map.terrain.getTerrainData(de),je=J.getProjectionData({overscaledTileID:de,aligned:se,applyGlobeMatrix:!I,applyTerrainMatrix:!0}),mt=ku(We||[0,0],Le||1,we,r,b),pt=oe.getMeshFromTileID(F,de.canonical,h,g,"raster");Z.draw(F,O.TRIANGLES,_e,l?l[de.overscaledZ]:dt.disabled,ne,A?ht.frontCCW:ht.backCCW,mt,Ne,je,r.id,pt.vertexBuffer,pt.indexBuffer,pt.segments)}}function Ou(u,e,r,a,l,h){const g=a.paint.get("raster-fade-duration");if(!h&&g>0){const b=M.now(),A=(b-u.timeAdded)/g,I=e?(b-e.timeAdded)/g:-1,z=r.getSource(),F=Me(l,{tileSize:z.tileSize,roundZoom:z.roundZoom}),O=!e||Math.abs(e.tileID.overscaledZ-F)>Math.abs(u.tileID.overscaledZ-F),Z=O&&u.refreshedUponExpiration?1:o.ae(O?A:1-I,0,1);return u.refreshedUponExpiration&&A>=1&&(u.refreshedUponExpiration=!1),e?{opacity:1,mix:1-Z}:{opacity:Z,mix:0}}return{opacity:1,mix:0}}const Ma=new o.b7(1,0,0,1),zl=new o.b7(0,1,0,1),Fu=new o.b7(0,0,1,1),Nu=new o.b7(1,0,1,1),La=new o.b7(0,1,1,1);function Ra(u,e,r,a){Ps(u,0,e+r/2,u.transform.width,r,a)}function qu(u,e,r,a){Ps(u,e-r/2,0,r,u.transform.height,a)}function Ps(u,e,r,a,l,h){const g=u.context,b=g.gl;b.enable(b.SCISSOR_TEST),b.scissor(e*u.pixelRatio,r*u.pixelRatio,a*u.pixelRatio,l*u.pixelRatio),g.clear({color:h}),b.disable(b.SCISSOR_TEST)}function Hr(u,e,r){const a=u.context,l=a.gl,h=u.useProgram("debug"),g=nt.disabled,b=dt.disabled,A=u.colorModeForRenderPass(),I="$debug",z=u.style.map.terrain&&u.style.map.terrain.getTerrainData(r);a.activeTexture.set(l.TEXTURE0);const F=e.getTileByID(r.key).latestRawTileData,O=Math.floor((F&&F.byteLength||0)/1024),Z=e.getTile(r).tileSize,J=512/Math.min(Z,512)*(r.overscaledZ/u.transform.zoom)*.5;let oe=r.canonical.toString();r.overscaledZ!==r.canonical.z&&(oe+=` => ${r.overscaledZ}`),function(se,de){se.initDebugOverlayCanvas();const _e=se.debugOverlayCanvas,ye=se.context.gl,be=se.debugOverlayCanvas.getContext("2d");be.clearRect(0,0,_e.width,_e.height),be.shadowColor="white",be.shadowBlur=2,be.lineWidth=1.5,be.strokeStyle="white",be.textBaseline="top",be.font="bold 36px Open Sans, sans-serif",be.fillText(de,5,5),be.strokeText(de,5,5),se.debugOverlayTexture.update(_e),se.debugOverlayTexture.bind(ye.LINEAR,ye.CLAMP_TO_EDGE)}(u,`${oe} ${O}kB`);const ne=u.transform.getProjectionData({overscaledTileID:r,applyGlobeMatrix:!0,applyTerrainMatrix:!0});h.draw(a,l.TRIANGLES,g,b,Ye.alphaBlended,ht.disabled,_u(o.b7.transparent,J),null,ne,I,u.debugBuffer,u.quadTriangleIndexBuffer,u.debugSegments),h.draw(a,l.LINE_STRIP,g,b,A,ht.disabled,_u(o.b7.red),z,ne,I,u.debugBuffer,u.tileBorderIndexBuffer,u.debugSegments)}function to(u,e,r,a){const{isRenderingGlobe:l}=a,h=u.context,g=h.gl,b=u.transform,A=u.colorModeForRenderPass(),I=u.getDepthModeFor3D(),z=u.useProgram("terrain");h.bindFramebuffer.set(null),h.viewport.set([0,0,u.width,u.height]);for(const F of r){const O=e.getTerrainMesh(F.tileID),Z=u.renderToTexture.getTexture(F),J=e.getTerrainData(F.tileID);h.activeTexture.set(g.TEXTURE0),g.bindTexture(g.TEXTURE_2D,Z.texture);const oe=e.getMeshFrameDelta(b.zoom),ne=b.calculateFogMatrix(F.tileID.toUnwrapped()),se=ap(oe,ne,u.style.sky,b.pitch,l),de=b.getProjectionData({overscaledTileID:F.tileID,applyTerrainMatrix:!1,applyGlobeMatrix:!0});z.draw(h,g.TRIANGLES,I,dt.disabled,A,ht.backCCW,se,J,de,"terrain",O.vertexBuffer,O.indexBuffer,O.segments)}}function Ni(u,e){if(!e.mesh){const r=new o.aI;r.emplaceBack(-1,-1),r.emplaceBack(1,-1),r.emplaceBack(1,1),r.emplaceBack(-1,1);const a=new o.aK;a.emplaceBack(0,1,2),a.emplaceBack(0,2,3),e.mesh=new zn(u.createVertexBuffer(r,si.members),u.createIndexBuffer(a),o.aJ.simpleSegment(0,0,r.length,a.length))}return e.mesh}class Bl{constructor(e,r){this.context=new ka(e),this.transform=r,this._tileTextures={},this.terrainFacilitator={dirty:!0,matrix:o.ad(new Float64Array(16)),renderTime:0},this.setup(),this.numSublayers=Ie.maxUnderzooming+Ie.maxOverzooming+1,this.depthEpsilon=1/Math.pow(2,16),this.crossTileSymbolIndex=new Yn}resize(e,r,a){if(this.width=Math.floor(e*a),this.height=Math.floor(r*a),this.pixelRatio=a,this.context.viewport.set([0,0,this.width,this.height]),this.style)for(const l of this.style._order)this.style._layers[l].resize()}setup(){const e=this.context,r=new o.aI;r.emplaceBack(0,0),r.emplaceBack(o.Z,0),r.emplaceBack(0,o.Z),r.emplaceBack(o.Z,o.Z),this.tileExtentBuffer=e.createVertexBuffer(r,si.members),this.tileExtentSegments=o.aJ.simpleSegment(0,0,4,2);const a=new o.aI;a.emplaceBack(0,0),a.emplaceBack(o.Z,0),a.emplaceBack(0,o.Z),a.emplaceBack(o.Z,o.Z),this.debugBuffer=e.createVertexBuffer(a,si.members),this.debugSegments=o.aJ.simpleSegment(0,0,4,5);const l=new o.b_;l.emplaceBack(0,0,0,0),l.emplaceBack(o.Z,0,o.Z,0),l.emplaceBack(0,o.Z,0,o.Z),l.emplaceBack(o.Z,o.Z,o.Z,o.Z),this.rasterBoundsBuffer=e.createVertexBuffer(l,op.members),this.rasterBoundsSegments=o.aJ.simpleSegment(0,0,4,2);const h=new o.aI;h.emplaceBack(0,0),h.emplaceBack(o.Z,0),h.emplaceBack(0,o.Z),h.emplaceBack(o.Z,o.Z),this.rasterBoundsBufferPosOnly=e.createVertexBuffer(h,si.members),this.rasterBoundsSegmentsPosOnly=o.aJ.simpleSegment(0,0,4,5);const g=new o.aI;g.emplaceBack(0,0),g.emplaceBack(1,0),g.emplaceBack(0,1),g.emplaceBack(1,1),this.viewportBuffer=e.createVertexBuffer(g,si.members),this.viewportSegments=o.aJ.simpleSegment(0,0,4,2);const b=new o.b$;b.emplaceBack(0),b.emplaceBack(1),b.emplaceBack(3),b.emplaceBack(2),b.emplaceBack(0),this.tileBorderIndexBuffer=e.createIndexBuffer(b);const A=new o.aK;A.emplaceBack(1,0,2),A.emplaceBack(1,2,3),this.quadTriangleIndexBuffer=e.createIndexBuffer(A);const I=this.context.gl;this.stencilClearMode=new dt({func:I.ALWAYS,mask:0},0,255,I.ZERO,I.ZERO,I.ZERO),this.tileExtentMesh=new zn(this.tileExtentBuffer,this.quadTriangleIndexBuffer,this.tileExtentSegments)}clearStencil(){const e=this.context,r=e.gl;this.nextStencilID=1,this.currentStencilSource=void 0;const a=o.K();o.bQ(a,0,this.width,this.height,0,0,1),o.M(a,a,[r.drawingBufferWidth,r.drawingBufferHeight,0]);const l={mainMatrix:a,tileMercatorCoords:[0,0,1,1],clippingPlane:[0,0,0,0],projectionTransition:0,fallbackMatrix:a};this.useProgram("clippingMask",null,!0).draw(e,r.TRIANGLES,nt.disabled,this.stencilClearMode,Ye.disabled,ht.disabled,null,null,l,"$clipping",this.viewportBuffer,this.quadTriangleIndexBuffer,this.viewportSegments)}_renderTileClippingMasks(e,r,a){if(this.currentStencilSource===e.source||!e.isTileClipped()||!r||!r.length)return;this.currentStencilSource=e.source,this.nextStencilID+r.length>256&&this.clearStencil();const l=this.context;l.setColorMode(Ye.disabled),l.setDepthMode(nt.disabled);const h={};for(const g of r)h[g.key]=this.nextStencilID++;this._renderTileMasks(h,r,a,!0),this._renderTileMasks(h,r,a,!1),this._tileClippingMaskIDs=h}_renderTileMasks(e,r,a,l){const h=this.context,g=h.gl,b=this.style.projection,A=this.transform,I=this.useProgram("clippingMask");for(const z of r){const F=e[z.key],O=this.style.map.terrain&&this.style.map.terrain.getTerrainData(z),Z=b.getMeshFromTileID(this.context,z.canonical,l,!0,"stencil"),J=A.getProjectionData({overscaledTileID:z,applyGlobeMatrix:!a,applyTerrainMatrix:!0});I.draw(h,g.TRIANGLES,nt.disabled,new dt({func:g.ALWAYS,mask:0},F,255,g.KEEP,g.KEEP,g.REPLACE),Ye.disabled,a?ht.disabled:ht.backCCW,null,O,J,"$clipping",Z.vertexBuffer,Z.indexBuffer,Z.segments)}}_renderTilesDepthBuffer(){const e=this.context,r=e.gl,a=this.style.projection,l=this.transform,h=this.useProgram("depth"),g=this.getDepthModeFor3D(),b=Te(l,{tileSize:l.tileSize});for(const A of b){const I=this.style.map.terrain&&this.style.map.terrain.getTerrainData(A),z=a.getMeshFromTileID(this.context,A.canonical,!0,!0,"raster"),F=l.getProjectionData({overscaledTileID:A,applyGlobeMatrix:!0,applyTerrainMatrix:!0});h.draw(e,r.TRIANGLES,g,dt.disabled,Ye.disabled,ht.backCCW,null,I,F,"$clipping",z.vertexBuffer,z.indexBuffer,z.segments)}}stencilModeFor3D(){this.currentStencilSource=void 0,this.nextStencilID+1>256&&this.clearStencil();const e=this.nextStencilID++,r=this.context.gl;return new dt({func:r.NOTEQUAL,mask:255},e,255,r.KEEP,r.KEEP,r.REPLACE)}stencilModeForClipping(e){const r=this.context.gl;return new dt({func:r.EQUAL,mask:255},this._tileClippingMaskIDs[e.key],0,r.KEEP,r.KEEP,r.REPLACE)}getStencilConfigForOverlapAndUpdateStencilID(e){const r=this.context.gl,a=e.sort((g,b)=>b.overscaledZ-g.overscaledZ),l=a[a.length-1].overscaledZ,h=a[0].overscaledZ-l+1;if(h>1){this.currentStencilSource=void 0,this.nextStencilID+h>256&&this.clearStencil();const g={};for(let b=0;b<h;b++)g[b+l]=new dt({func:r.GEQUAL,mask:255},b+this.nextStencilID,255,r.KEEP,r.KEEP,r.REPLACE);return this.nextStencilID+=h,[g,a]}return[{[l]:dt.disabled},a]}stencilConfigForOverlapTwoPass(e){const r=this.context.gl,a=e.sort((g,b)=>b.overscaledZ-g.overscaledZ),l=a[a.length-1].overscaledZ,h=a[0].overscaledZ-l+1;if(this.clearStencil(),h>1){const g={},b={};for(let A=0;A<h;A++)g[A+l]=new dt({func:r.GREATER,mask:255},h+1+A,255,r.KEEP,r.KEEP,r.REPLACE),b[A+l]=new dt({func:r.GREATER,mask:255},1+A,255,r.KEEP,r.KEEP,r.REPLACE);return this.nextStencilID=2*h+1,[g,b,a]}return this.nextStencilID=3,[{[l]:new dt({func:r.GREATER,mask:255},2,255,r.KEEP,r.KEEP,r.REPLACE)},{[l]:new dt({func:r.GREATER,mask:255},1,255,r.KEEP,r.KEEP,r.REPLACE)},a]}colorModeForRenderPass(){const e=this.context.gl;return this._showOverdrawInspector?new Ye([e.CONSTANT_COLOR,e.ONE],new o.b7(.125,.125,.125,0),[!0,!0,!0,!0]):this.renderPass==="opaque"?Ye.unblended:Ye.alphaBlended}getDepthModeForSublayer(e,r,a){if(!this.opaquePassEnabledForLayer())return nt.disabled;const l=1-((1+this.currentLayer)*this.numSublayers+e)*this.depthEpsilon;return new nt(a||this.context.gl.LEQUAL,r,[l,l])}getDepthModeFor3D(){return new nt(this.context.gl.LEQUAL,nt.ReadWrite,this.depthRangeFor3D)}opaquePassEnabledForLayer(){return this.currentLayer<this.opaquePassCutoff}render(e,r){var a,l;this.style=e,this.options=r,this.lineAtlas=e.lineAtlas,this.imageManager=e.imageManager,this.glyphManager=e.glyphManager,this.symbolFadeChange=e.placement.symbolFadeChange(M.now()),this.imageManager.beginFrame();const h=this.style._order,g=this.style.sourceCaches,b={},A={},I={},z={isRenderingToTexture:!1,isRenderingGlobe:((a=e.projection)===null||a===void 0?void 0:a.transitionState)>0};for(const O in g){const Z=g[O];Z.used&&Z.prepare(this.context),b[O]=Z.getVisibleCoordinates(!1),A[O]=b[O].slice().reverse(),I[O]=Z.getVisibleCoordinates(!0).reverse()}this.opaquePassCutoff=1/0;for(let O=0;O<h.length;O++)if(this.style._layers[h[O]].is3D()){this.opaquePassCutoff=O;break}this.maybeDrawDepthAndCoords(!1),this.renderToTexture&&(this.renderToTexture.prepareForRender(this.style,this.transform.zoom),this.opaquePassCutoff=0),this.renderPass="offscreen";for(const O of h){const Z=this.style._layers[O];if(!Z.hasOffscreenPass()||Z.isHidden(this.transform.zoom))continue;const J=A[Z.source];(Z.type==="custom"||J.length)&&this.renderLayer(this,g[Z.source],Z,J,z)}if((l=this.style.projection)===null||l===void 0||l.updateGPUdependent({context:this.context,useProgram:O=>this.useProgram(O)}),this.context.viewport.set([0,0,this.width,this.height]),this.context.bindFramebuffer.set(null),this.context.clear({color:r.showOverdrawInspector?o.b7.black:o.b7.transparent,depth:1}),this.clearStencil(),this.style.sky&&function(O,Z){const J=O.context,oe=J.gl,ne=((ke,we,Le)=>{const We=Math.cos(we.rollInRadians),Fe=Math.sin(we.rollInRadians),Ne=Ae(we),je=we.getProjectionData({overscaledTileID:null,applyGlobeMatrix:!0,applyTerrainMatrix:!0}).projectionTransition;return{u_sky_color:ke.properties.get("sky-color"),u_horizon_color:ke.properties.get("horizon-color"),u_horizon:[(we.width/2-Ne*Fe)*Le,(we.height/2+Ne*We)*Le],u_horizon_normal:[-Fe,We],u_sky_horizon_blend:ke.properties.get("sky-horizon-blend")*we.height/2*Le,u_sky_blend:je}})(Z,O.style.map.transform,O.pixelRatio),se=new nt(oe.LEQUAL,nt.ReadWrite,[0,1]),de=dt.disabled,_e=O.colorModeForRenderPass(),ye=O.useProgram("sky"),be=Ni(J,Z);ye.draw(J,oe.TRIANGLES,se,de,_e,ht.disabled,ne,null,void 0,"sky",be.vertexBuffer,be.indexBuffer,be.segments)}(this,this.style.sky),this._showOverdrawInspector=r.showOverdrawInspector,this.depthRangeFor3D=[0,1-(e._order.length+2)*this.numSublayers*this.depthEpsilon],!this.renderToTexture)for(this.renderPass="opaque",this.currentLayer=h.length-1;this.currentLayer>=0;this.currentLayer--){const O=this.style._layers[h[this.currentLayer]],Z=g[O.source],J=b[O.source];this._renderTileClippingMasks(O,J,!1),this.renderLayer(this,Z,O,J,z)}this.renderPass="translucent";let F=!1;for(this.currentLayer=0;this.currentLayer<h.length;this.currentLayer++){const O=this.style._layers[h[this.currentLayer]],Z=g[O.source];if(this.renderToTexture&&this.renderToTexture.renderLayer(O,z))continue;this.opaquePassEnabledForLayer()||F||(F=!0,z.isRenderingGlobe&&!this.style.map.terrain&&this._renderTilesDepthBuffer());const J=(O.type==="symbol"?I:A)[O.source];this._renderTileClippingMasks(O,b[O.source],!!this.renderToTexture),this.renderLayer(this,Z,O,J,z)}if(z.isRenderingGlobe&&function(O,Z,J){const oe=O.context,ne=oe.gl,se=O.useProgram("atmosphere"),de=new nt(ne.LEQUAL,nt.ReadOnly,[0,1]),_e=O.transform,ye=function(je,mt){const pt=je.properties.get("position"),tt=[-pt.x,-pt.y,-pt.z],kt=o.ad(new Float64Array(16));return je.properties.get("anchor")==="map"&&(o.a_(kt,kt,mt.rollInRadians),o.a$(kt,kt,-mt.pitchInRadians),o.a_(kt,kt,mt.bearingInRadians),o.a$(kt,kt,mt.center.lat*Math.PI/180),o.bp(kt,kt,-mt.center.lng*Math.PI/180)),o.bZ(tt,tt,kt),tt}(J,O.transform),be=_e.getProjectionData({overscaledTileID:null,applyGlobeMatrix:!0,applyTerrainMatrix:!0}),ke=Z.properties.get("atmosphere-blend")*be.projectionTransition;if(ke===0)return;const we=bo(_e.worldSize,_e.center.lat),Le=_e.inverseProjectionMatrix,We=new Float64Array(4);We[3]=1,o.at(We,We,_e.modelViewProjectionMatrix),We[0]/=We[3],We[1]/=We[3],We[2]/=We[3],We[3]=1,o.at(We,We,Le),We[0]/=We[3],We[1]/=We[3],We[2]/=We[3],We[3]=1;const Fe=((je,mt,pt,tt,kt)=>({u_sun_pos:je,u_atmosphere_blend:mt,u_globe_position:pt,u_globe_radius:tt,u_inv_proj_matrix:kt}))(ye,ke,[We[0],We[1],We[2]],we,Le),Ne=Ni(oe,Z);se.draw(oe,ne.TRIANGLES,de,dt.disabled,Ye.alphaBlended,ht.disabled,Fe,null,null,"atmosphere",Ne.vertexBuffer,Ne.indexBuffer,Ne.segments)}(this,this.style.sky,this.style.light),this.options.showTileBoundaries){const O=function(Z,J){let oe=null;const ne=Object.values(Z._layers).flatMap(ye=>ye.source&&!ye.isHidden(J)?[Z.sourceCaches[ye.source]]:[]),se=ne.filter(ye=>ye.getSource().type==="vector"),de=ne.filter(ye=>ye.getSource().type!=="vector"),_e=ye=>{(!oe||oe.getSource().maxzoom<ye.getSource().maxzoom)&&(oe=ye)};return se.forEach(ye=>_e(ye)),oe||de.forEach(ye=>_e(ye)),oe}(this.style,this.transform.zoom);O&&function(Z,J,oe){for(let ne=0;ne<oe.length;ne++)Hr(Z,J,oe[ne])}(this,O,O.getVisibleCoordinates())}this.options.showPadding&&function(O){const Z=O.transform.padding;Ra(O,O.transform.height-(Z.top||0),3,Ma),Ra(O,Z.bottom||0,3,zl),qu(O,Z.left||0,3,Fu),qu(O,O.transform.width-(Z.right||0),3,Nu);const J=O.transform.centerPoint;(function(oe,ne,se,de){Ps(oe,ne-1,se-10,2,20,de),Ps(oe,ne-10,se-1,20,2,de)})(O,J.x,O.transform.height-J.y,La)}(this),this.context.setDefault()}maybeDrawDepthAndCoords(e){if(!this.style||!this.style.map||!this.style.map.terrain)return;const r=this.terrainFacilitator.matrix,a=this.transform.modelViewProjectionMatrix;let l=this.terrainFacilitator.dirty;l||(l=e?!o.c0(r,a):!o.c1(r,a)),l||(l=this.style.map.terrain.sourceCache.anyTilesAfterTime(this.terrainFacilitator.renderTime)),l&&(o.c2(r,a),this.terrainFacilitator.renderTime=Date.now(),this.terrainFacilitator.dirty=!1,function(h,g){const b=h.context,A=b.gl,I=h.transform,z=Ye.unblended,F=new nt(A.LEQUAL,nt.ReadWrite,[0,1]),O=g.sourceCache.getRenderableTiles(),Z=h.useProgram("terrainDepth");b.bindFramebuffer.set(g.getFramebuffer("depth").framebuffer),b.viewport.set([0,0,h.width/devicePixelRatio,h.height/devicePixelRatio]),b.clear({color:o.b7.transparent,depth:1});for(const J of O){const oe=g.getTerrainMesh(J.tileID),ne=g.getTerrainData(J.tileID),se=I.getProjectionData({overscaledTileID:J.tileID,applyTerrainMatrix:!1,applyGlobeMatrix:!0}),de={u_ele_delta:g.getMeshFrameDelta(I.zoom)};Z.draw(b,A.TRIANGLES,F,dt.disabled,z,ht.backCCW,de,ne,se,"terrain",oe.vertexBuffer,oe.indexBuffer,oe.segments)}b.bindFramebuffer.set(null),b.viewport.set([0,0,h.width,h.height])}(this,this.style.map.terrain),function(h,g){const b=h.context,A=b.gl,I=h.transform,z=Ye.unblended,F=new nt(A.LEQUAL,nt.ReadWrite,[0,1]),O=g.getCoordsTexture(),Z=g.sourceCache.getRenderableTiles(),J=h.useProgram("terrainCoords");b.bindFramebuffer.set(g.getFramebuffer("coords").framebuffer),b.viewport.set([0,0,h.width/devicePixelRatio,h.height/devicePixelRatio]),b.clear({color:o.b7.transparent,depth:1}),g.coordsIndex=[];for(const oe of Z){const ne=g.getTerrainMesh(oe.tileID),se=g.getTerrainData(oe.tileID);b.activeTexture.set(A.TEXTURE0),A.bindTexture(A.TEXTURE_2D,O.texture);const de={u_terrain_coords_id:(255-g.coordsIndex.length)/255,u_texture:0,u_ele_delta:g.getMeshFrameDelta(I.zoom)},_e=I.getProjectionData({overscaledTileID:oe.tileID,applyTerrainMatrix:!1,applyGlobeMatrix:!0});J.draw(b,A.TRIANGLES,F,dt.disabled,z,ht.backCCW,de,se,_e,"terrain",ne.vertexBuffer,ne.indexBuffer,ne.segments),g.coordsIndex.push(oe.tileID.key)}b.bindFramebuffer.set(null),b.viewport.set([0,0,h.width,h.height])}(this,this.style.map.terrain))}renderLayer(e,r,a,l,h){a.isHidden(this.transform.zoom)||(a.type==="background"||a.type==="custom"||(l||[]).length)&&(this.id=a.id,o.c3(a)?function(g,b,A,I,z,F){if(g.renderPass!=="translucent")return;const{isRenderingToTexture:O}=F,Z=dt.disabled,J=g.colorModeForRenderPass();(A._unevaluatedLayout.hasValue("text-variable-anchor")||A._unevaluatedLayout.hasValue("text-variable-anchor-offset"))&&function(oe,ne,se,de,_e,ye,be,ke,we){const Le=ne.transform,We=ne.style.map.terrain,Fe=_e==="map",Ne=ye==="map";for(const je of oe){const mt=de.getTile(je),pt=mt.getBucket(se);if(!pt||!pt.text||!pt.text.segments.get().length)continue;const tt=o.ak(pt.textSizeData,Le.zoom),kt=o.az(mt,1,ne.transform.zoom),Gt=Et(Fe,ne.transform,kt),nr=se.layout.get("icon-text-fit")!=="none"&&pt.hasIconData();if(tt){const Br=Math.pow(2,Le.zoom-mt.tileID.overscaledZ),xr=We?(Vr,Or)=>We.getElevation(je,Vr,Or):null;Vu(pt,Fe,Ne,we,Le,Gt,Br,tt,nr,o.aA(Le,mt,be,ke),je.toUnwrapped(),xr)}}}(I,g,A,b,A.layout.get("text-rotation-alignment"),A.layout.get("text-pitch-alignment"),A.paint.get("text-translate"),A.paint.get("text-translate-anchor"),z),A.paint.get("icon-opacity").constantOr(1)!==0&&Ca(g,b,A,I,!1,A.paint.get("icon-translate"),A.paint.get("icon-translate-anchor"),A.layout.get("icon-rotation-alignment"),A.layout.get("icon-pitch-alignment"),A.layout.get("icon-keep-upright"),Z,J,O),A.paint.get("text-opacity").constantOr(1)!==0&&Ca(g,b,A,I,!0,A.paint.get("text-translate"),A.paint.get("text-translate-anchor"),A.layout.get("text-rotation-alignment"),A.layout.get("text-pitch-alignment"),A.layout.get("text-keep-upright"),Z,J,O),b.map.showCollisionBoxes&&(Ml(g,b,A,I,!0),Ml(g,b,A,I,!1))}(e,r,a,l,this.style.placement.variableOffsets,h):o.c4(a)?function(g,b,A,I,z){if(g.renderPass!=="translucent")return;const{isRenderingToTexture:F}=z,O=A.paint.get("circle-opacity"),Z=A.paint.get("circle-stroke-width"),J=A.paint.get("circle-stroke-opacity"),oe=!A.layout.get("circle-sort-key").isConstant();if(O.constantOr(1)===0&&(Z.constantOr(1)===0||J.constantOr(1)===0))return;const ne=g.context,se=ne.gl,de=g.transform,_e=g.getDepthModeForSublayer(0,nt.ReadOnly),ye=dt.disabled,be=g.colorModeForRenderPass(),ke=[],we=de.getCircleRadiusCorrection();for(let Le=0;Le<I.length;Le++){const We=I[Le],Fe=b.getTile(We),Ne=Fe.getBucket(A);if(!Ne)continue;const je=A.paint.get("circle-translate"),mt=A.paint.get("circle-translate-anchor"),pt=o.aA(de,Fe,je,mt),tt=Ne.programConfigurations.get(A.id),kt=g.useProgram("circle",tt),Gt=Ne.layoutVertexBuffer,nr=Ne.indexBuffer,Br=g.style.map.terrain&&g.style.map.terrain.getTerrainData(We),xr={programConfiguration:tt,program:kt,layoutVertexBuffer:Gt,indexBuffer:nr,uniformValues:bs(g,Fe,A,pt,we),terrainData:Br,projectionData:de.getProjectionData({overscaledTileID:We,applyGlobeMatrix:!F,applyTerrainMatrix:!0})};if(oe){const Vr=Ne.segments.get();for(const Or of Vr)ke.push({segments:new o.aJ([Or]),sortKey:Or.sortKey,state:xr})}else ke.push({segments:Ne.segments,sortKey:0,state:xr})}oe&&ke.sort((Le,We)=>Le.sortKey-We.sortKey);for(const Le of ke){const{programConfiguration:We,program:Fe,layoutVertexBuffer:Ne,indexBuffer:je,uniformValues:mt,terrainData:pt,projectionData:tt}=Le.state;Fe.draw(ne,se.TRIANGLES,_e,ye,be,ht.backCCW,mt,pt,tt,A.id,Ne,je,Le.segments,A.paint,g.transform.zoom,We)}}(e,r,a,l,h):o.c5(a)?function(g,b,A,I,z){if(A.paint.get("heatmap-opacity")===0)return;const F=g.context,{isRenderingToTexture:O,isRenderingGlobe:Z}=z;if(g.style.map.terrain){for(const J of I){const oe=b.getTile(J);b.hasRenderableParent(J)||(g.renderPass==="offscreen"?Ea(g,oe,A,J,Z):g.renderPass==="translucent"&&Ll(g,A,J,O,Z))}F.viewport.set([0,0,g.width,g.height])}else g.renderPass==="offscreen"?function(J,oe,ne,se){const de=J.context,_e=de.gl,ye=J.transform,be=dt.disabled,ke=new Ye([_e.ONE,_e.ONE],o.b7.transparent,[!0,!0,!0,!0]);(function(we,Le,We){const Fe=we.gl;we.activeTexture.set(Fe.TEXTURE1),we.viewport.set([0,0,Le.width/4,Le.height/4]);let Ne=We.heatmapFbos.get(o.bW);Ne?(Fe.bindTexture(Fe.TEXTURE_2D,Ne.colorAttachment.get()),we.bindFramebuffer.set(Ne.framebuffer)):(Ne=Pa(we,Le.width/4,Le.height/4),We.heatmapFbos.set(o.bW,Ne))})(de,J,ne),de.clear({color:o.b7.transparent});for(let we=0;we<se.length;we++){const Le=se[we];if(oe.hasRenderableParent(Le))continue;const We=oe.getTile(Le),Fe=We.getBucket(ne);if(!Fe)continue;const Ne=Fe.programConfigurations.get(ne.id),je=J.useProgram("heatmap",Ne),mt=ye.getProjectionData({overscaledTileID:Le,applyGlobeMatrix:!0,applyTerrainMatrix:!1}),pt=ye.getCircleRadiusCorrection();je.draw(de,_e.TRIANGLES,nt.disabled,be,ke,ht.backCCW,So(We,ye.zoom,ne.paint.get("heatmap-intensity"),pt),null,mt,ne.id,Fe.layoutVertexBuffer,Fe.indexBuffer,Fe.segments,ne.paint,ye.zoom,Ne)}de.viewport.set([0,0,J.width,J.height])}(g,b,A,I):g.renderPass==="translucent"&&function(J,oe){const ne=J.context,se=ne.gl;ne.setColorMode(J.colorModeForRenderPass());const de=oe.heatmapFbos.get(o.bW);de&&(ne.activeTexture.set(se.TEXTURE0),se.bindTexture(se.TEXTURE_2D,de.colorAttachment.get()),ne.activeTexture.set(se.TEXTURE1),Rl(ne,oe).bind(se.LINEAR,se.CLAMP_TO_EDGE),J.useProgram("heatmapTexture").draw(ne,se.TRIANGLES,nt.disabled,dt.disabled,J.colorModeForRenderPass(),ht.disabled,xu(J,oe,0,1),null,null,oe.id,J.viewportBuffer,J.quadTriangleIndexBuffer,J.viewportSegments,oe.paint,J.transform.zoom))}(g,A)}(e,r,a,l,h):o.c6(a)?function(g,b,A,I,z){if(g.renderPass!=="translucent")return;const{isRenderingToTexture:F}=z,O=A.paint.get("line-opacity"),Z=A.paint.get("line-width");if(O.constantOr(1)===0||Z.constantOr(1)===0)return;const J=g.getDepthModeForSublayer(0,nt.ReadOnly),oe=g.colorModeForRenderPass(),ne=A.paint.get("line-dasharray"),se=A.paint.get("line-pattern"),de=se.constantOr(1),_e=A.paint.get("line-gradient"),ye=A.getCrossfadeParameters(),be=de?"linePattern":ne?"lineSDF":_e?"lineGradient":"line",ke=g.context,we=ke.gl,Le=g.transform;let We=!0;for(const Fe of I){const Ne=b.getTile(Fe);if(de&&!Ne.patternsLoaded())continue;const je=Ne.getBucket(A);if(!je)continue;const mt=je.programConfigurations.get(A.id),pt=g.context.program.get(),tt=g.useProgram(be,mt),kt=We||tt.program!==pt,Gt=g.style.map.terrain&&g.style.map.terrain.getTerrainData(Fe),nr=se.constantOr(null);if(nr&&Ne.imageAtlas){const Ar=Ne.imageAtlas,cr=Ar.patternPositions[nr.to.toString()],ei=Ar.patternPositions[nr.from.toString()];cr&&ei&&mt.setConstantPatternPositions(cr,ei)}const Br=Le.getProjectionData({overscaledTileID:Fe,applyGlobeMatrix:!F,applyTerrainMatrix:!0}),xr=Le.getPixelScale(),Vr=de?Su(g,Ne,A,xr,ye):ne?Au(g,Ne,A,xr,ne,ye):_e?wu(g,Ne,A,xr,je.lineClipsArray.length):vs(g,Ne,A,xr);if(de)ke.activeTexture.set(we.TEXTURE0),Ne.imageAtlasTexture.bind(we.LINEAR,we.CLAMP_TO_EDGE),mt.updatePaintBuffers(ye);else if(ne&&(kt||g.lineAtlas.dirty))ke.activeTexture.set(we.TEXTURE0),g.lineAtlas.bind(ke);else if(_e){const Ar=je.gradients[A.id];let cr=Ar.texture;if(A.gradientVersion!==Ar.version){let ei=256;if(A.stepInterpolant){const ci=b.getSource().maxzoom,xi=Fe.canonical.z===ci?Math.ceil(1<<g.transform.maxZoom-Fe.canonical.z):1;ei=o.ae(o.bX(je.maxLineLength/o.Z*1024*xi),256,ke.maxTextureSize)}Ar.gradient=o.bY({expression:A.gradientExpression(),evaluationKey:"lineProgress",resolution:ei,image:Ar.gradient||void 0,clips:je.lineClipsArray}),Ar.texture?Ar.texture.update(Ar.gradient):Ar.texture=new rt(ke,Ar.gradient,we.RGBA),Ar.version=A.gradientVersion,cr=Ar.texture}ke.activeTexture.set(we.TEXTURE0),cr.bind(A.stepInterpolant?we.NEAREST:we.LINEAR,we.CLAMP_TO_EDGE)}const Or=g.stencilModeForClipping(Fe);tt.draw(ke,we.TRIANGLES,J,Or,oe,ht.disabled,Vr,Gt,Br,A.id,je.layoutVertexBuffer,je.indexBuffer,je.segments,A.paint,g.transform.zoom,mt,je.layoutVertexBuffer2),We=!1}}(e,r,a,l,h):o.c7(a)?function(g,b,A,I,z){const F=A.paint.get("fill-color"),O=A.paint.get("fill-opacity");if(O.constantOr(1)===0)return;const{isRenderingToTexture:Z}=z,J=g.colorModeForRenderPass(),oe=A.paint.get("fill-pattern"),ne=g.opaquePassEnabledForLayer()&&!oe.constantOr(1)&&F.constantOr(o.b7.transparent).a===1&&O.constantOr(0)===1?"opaque":"translucent";if(g.renderPass===ne){const se=g.getDepthModeForSublayer(1,g.renderPass==="opaque"?nt.ReadWrite:nt.ReadOnly);Ts(g,b,A,I,se,J,!1,Z)}if(g.renderPass==="translucent"&&A.paint.get("fill-antialias")){const se=g.getDepthModeForSublayer(A.getPaintProperty("fill-outline-color")?2:0,nt.ReadOnly);Ts(g,b,A,I,se,J,!0,Z)}}(e,r,a,l,h):o.c8(a)?function(g,b,A,I,z){const F=A.paint.get("fill-extrusion-opacity");if(F===0)return;const{isRenderingToTexture:O}=z;if(g.renderPass==="translucent"){const Z=new nt(g.context.gl.LEQUAL,nt.ReadWrite,g.depthRangeFor3D);if(F!==1||A.paint.get("fill-extrusion-pattern").constantOr(1))Cs(g,b,A,I,Z,dt.disabled,Ye.disabled,O),Cs(g,b,A,I,Z,g.stencilModeFor3D(),g.colorModeForRenderPass(),O);else{const J=g.colorModeForRenderPass();Cs(g,b,A,I,Z,dt.disabled,J,O)}}}(e,r,a,l,h):o.c9(a)?function(g,b,A,I,z){if(g.renderPass!=="offscreen"&&g.renderPass!=="translucent")return;const{isRenderingToTexture:F}=z,O=g.context,Z=g.style.projection.useSubdivision,J=g.getDepthModeForSublayer(0,nt.ReadOnly),oe=g.colorModeForRenderPass();if(g.renderPass==="offscreen")(function(ne,se,de,_e,ye,be,ke){const we=ne.context,Le=we.gl;for(const We of de){const Fe=se.getTile(We),Ne=Fe.dem;if(!Ne||!Ne.data||!Fe.needsHillshadePrepare)continue;const je=Ne.dim,mt=Ne.stride,pt=Ne.getPixels();if(we.activeTexture.set(Le.TEXTURE1),we.pixelStoreUnpackPremultiplyAlpha.set(!1),Fe.demTexture=Fe.demTexture||ne.getTileTexture(mt),Fe.demTexture){const kt=Fe.demTexture;kt.update(pt,{premultiply:!1}),kt.bind(Le.NEAREST,Le.CLAMP_TO_EDGE)}else Fe.demTexture=new rt(we,pt,Le.RGBA,{premultiply:!1}),Fe.demTexture.bind(Le.NEAREST,Le.CLAMP_TO_EDGE);we.activeTexture.set(Le.TEXTURE0);let tt=Fe.fbo;if(!tt){const kt=new rt(we,{width:je,height:je,data:null},Le.RGBA);kt.bind(Le.LINEAR,Le.CLAMP_TO_EDGE),tt=Fe.fbo=we.createFramebuffer(je,je,!0,!1),tt.colorAttachment.set(kt.texture)}we.bindFramebuffer.set(tt.framebuffer),we.viewport.set([0,0,je,je]),ne.useProgram("hillshadePrepare").draw(we,Le.TRIANGLES,ye,be,ke,ht.disabled,cp(Fe.tileID,Ne),null,null,_e.id,ne.rasterBoundsBuffer,ne.quadTriangleIndexBuffer,ne.rasterBoundsSegments),Fe.needsHillshadePrepare=!1}})(g,b,I,A,J,dt.disabled,oe),O.viewport.set([0,0,g.width,g.height]);else if(g.renderPass==="translucent")if(Z){const[ne,se,de]=g.stencilConfigForOverlapTwoPass(I);Dl(g,b,A,de,ne,J,oe,!1,F),Dl(g,b,A,de,se,J,oe,!0,F)}else{const[ne,se]=g.getStencilConfigForOverlapAndUpdateStencilID(I);Dl(g,b,A,se,ne,J,oe,!1,F)}}(e,r,a,l,h):o.ca(a)?function(g,b,A,I,z){if(g.renderPass!=="translucent"||A.paint.get("raster-opacity")===0||!I.length)return;const{isRenderingToTexture:F}=z,O=b.getSource(),Z=g.style.projection.useSubdivision;if(O instanceof mr)Ia(g,b,A,I,null,!1,!1,O.tileCoords,O.flippedWindingOrder,F);else if(Z){const[J,oe,ne]=g.stencilConfigForOverlapTwoPass(I);Ia(g,b,A,ne,J,!1,!0,Es,!1,F),Ia(g,b,A,ne,oe,!0,!0,Es,!1,F)}else{const[J,oe]=g.getStencilConfigForOverlapAndUpdateStencilID(I);Ia(g,b,A,oe,J,!1,!0,Es,!1,F)}}(e,r,a,l,h):o.cb(a)?function(g,b,A,I,z){const F=A.paint.get("background-color"),O=A.paint.get("background-opacity");if(O===0)return;const{isRenderingToTexture:Z}=z,J=g.context,oe=J.gl,ne=g.style.projection,se=g.transform,de=se.tileSize,_e=A.paint.get("background-pattern");if(g.isPatternMissing(_e))return;const ye=!_e&&F.a===1&&O===1&&g.opaquePassEnabledForLayer()?"opaque":"translucent";if(g.renderPass!==ye)return;const be=dt.disabled,ke=g.getDepthModeForSublayer(0,ye==="opaque"?nt.ReadWrite:nt.ReadOnly),we=g.colorModeForRenderPass(),Le=g.useProgram(_e?"backgroundPattern":"background"),We=I||Te(se,{tileSize:de,terrain:g.style.map.terrain});_e&&(J.activeTexture.set(oe.TEXTURE0),g.imageManager.bind(g.context));const Fe=A.getCrossfadeParameters();for(const Ne of We){const je=se.getProjectionData({overscaledTileID:Ne,applyGlobeMatrix:!Z,applyTerrainMatrix:!0}),mt=_e?hp(O,g,_e,{tileID:Ne,tileSize:de},Fe):up(O,F),pt=g.style.map.terrain&&g.style.map.terrain.getTerrainData(Ne),tt=ne.getMeshFromTileID(J,Ne.canonical,!1,!0,"raster");Le.draw(J,oe.TRIANGLES,ke,be,we,ht.backCCW,mt,pt,je,A.id,tt.vertexBuffer,tt.indexBuffer,tt.segments)}}(e,0,a,l,h):o.cc(a)&&function(g,b,A,I){const{isRenderingGlobe:z}=I,F=g.context,O=A.implementation,Z=g.style.projection,J=g.transform,oe=J.getProjectionDataForCustomLayer(z),ne={farZ:J.farZ,nearZ:J.nearZ,fov:J.fov*Math.PI/180,modelViewProjectionMatrix:J.modelViewProjectionMatrix,projectionMatrix:J.projectionMatrix,shaderData:{variantName:Z.shaderVariantName,vertexShaderPrelude:`const float PI = 3.141592653589793;
|
|
740
|
-
uniform mat4 u_projection_matrix;
|
|
741
|
-
${Z.shaderPreludeCode.vertexSource}`,define:Z.shaderDefine},defaultProjectionData:oe},se=O.renderingMode?O.renderingMode:"2d";if(g.renderPass==="offscreen"){const de=O.prerender;de&&(g.setCustomLayerDefaults(),F.setColorMode(g.colorModeForRenderPass()),de.call(O,F.gl,ne),F.setDirty(),g.setBaseState())}else if(g.renderPass==="translucent"){g.setCustomLayerDefaults(),F.setColorMode(g.colorModeForRenderPass()),F.setStencilMode(dt.disabled);const de=se==="3d"?g.getDepthModeFor3D():g.getDepthModeForSublayer(0,nt.ReadOnly);F.setDepthMode(de),O.render(F.gl,ne),F.setDirty(),g.setBaseState(),F.bindFramebuffer.set(null)}}(e,0,a,h))}saveTileTexture(e){const r=this._tileTextures[e.size[0]];r?r.push(e):this._tileTextures[e.size[0]]=[e]}getTileTexture(e){const r=this._tileTextures[e];return r&&r.length>0?r.pop():null}isPatternMissing(e){if(!e)return!1;if(!e.from||!e.to)return!0;const r=this.imageManager.getPattern(e.from.toString()),a=this.imageManager.getPattern(e.to.toString());return!r||!a}useProgram(e,r,a=!1,l=[]){this.cache=this.cache||{};const h=!!this.style.map.terrain,g=this.style.projection,b=a?oi.projectionMercator:g.shaderPreludeCode,A=a?Bn:g.shaderDefine,I=e+(r?r.cacheKey:"")+`/${a?Vt:g.shaderVariantName}`+(this._showOverdrawInspector?"/overdraw":"")+(h?"/terrain":"")+(l?`/${l.join("/")}`:"");return this.cache[I]||(this.cache[I]=new ha(this.context,oi[e],r,Eu[e],this._showOverdrawInspector,h,b,A,l)),this.cache[I]}setCustomLayerDefaults(){this.context.unbindVAO(),this.context.cullFace.setDefault(),this.context.activeTexture.setDefault(),this.context.pixelStoreUnpack.setDefault(),this.context.pixelStoreUnpackPremultiplyAlpha.setDefault(),this.context.pixelStoreUnpackFlipY.setDefault()}setBaseState(){const e=this.context.gl;this.context.cullFace.set(!1),this.context.viewport.set([0,0,this.width,this.height]),this.context.blendEquation.set(e.FUNC_ADD)}initDebugOverlayCanvas(){this.debugOverlayCanvas==null&&(this.debugOverlayCanvas=document.createElement("canvas"),this.debugOverlayCanvas.width=512,this.debugOverlayCanvas.height=512,this.debugOverlayTexture=new rt(this.context,this.debugOverlayCanvas,this.context.gl.RGBA))}destroy(){this.debugOverlayTexture&&this.debugOverlayTexture.destroy()}overLimit(){const{drawingBufferWidth:e,drawingBufferHeight:r}=this.context.gl;return this.width!==e||this.height!==r}}function Is(u,e){let r,a=!1,l=null,h=null;const g=()=>{l=null,a&&(u.apply(h,r),l=setTimeout(g,e),a=!1)};return(...b)=>(a=!0,h=this,r=b,l||g(),l)}class Vl{constructor(e){this._getCurrentHash=()=>{const r=window.location.hash.replace("#","");if(this._hashName){let a;return r.split("&").map(l=>l.split("=")).forEach(l=>{l[0]===this._hashName&&(a=l)}),(a&&a[1]||"").split("/")}return r.split("/")},this._onHashChange=()=>{const r=this._getCurrentHash();if(!this._isValidHash(r))return!1;const a=this._map.dragRotate.isEnabled()&&this._map.touchZoomRotate.isEnabled()?+(r[3]||0):this._map.getBearing();return this._map.jumpTo({center:[+r[2],+r[1]],zoom:+r[0],bearing:a,pitch:+(r[4]||0)}),!0},this._updateHashUnthrottled=()=>{const r=window.location.href.replace(/(#.*)?$/,this.getHashString());window.history.replaceState(window.history.state,null,r)},this._removeHash=()=>{const r=this._getCurrentHash();if(r.length===0)return;const a=r.join("/");let l=a;l.split("&").length>0&&(l=l.split("&")[0]),this._hashName&&(l=`${this._hashName}=${a}`);let h=window.location.hash.replace(l,"");h.startsWith("#&")?h=h.slice(0,1)+h.slice(2):h==="#"&&(h="");let g=window.location.href.replace(/(#.+)?$/,h);g=g.replace("&&","&"),window.history.replaceState(window.history.state,null,g)},this._updateHash=Is(this._updateHashUnthrottled,300),this._hashName=e&&encodeURIComponent(e)}addTo(e){return this._map=e,addEventListener("hashchange",this._onHashChange,!1),this._map.on("moveend",this._updateHash),this}remove(){return removeEventListener("hashchange",this._onHashChange,!1),this._map.off("moveend",this._updateHash),clearTimeout(this._updateHash()),this._removeHash(),delete this._map,this}getHashString(e){const r=this._map.getCenter(),a=Math.round(100*this._map.getZoom())/100,l=Math.ceil((a*Math.LN2+Math.log(512/360/.5))/Math.LN10),h=Math.pow(10,l),g=Math.round(r.lng*h)/h,b=Math.round(r.lat*h)/h,A=this._map.getBearing(),I=this._map.getPitch();let z="";if(z+=e?`/${g}/${b}/${a}`:`${a}/${b}/${g}`,(A||I)&&(z+="/"+Math.round(10*A)/10),I&&(z+=`/${Math.round(I)}`),this._hashName){const F=this._hashName;let O=!1;const Z=window.location.hash.slice(1).split("&").map(J=>{const oe=J.split("=")[0];return oe===F?(O=!0,`${oe}=${z}`):J}).filter(J=>J);return O||Z.push(`${F}=${z}`),`#${Z.join("&")}`}return`#${z}`}_isValidHash(e){if(e.length<3||e.some(isNaN))return!1;try{new o.Q(+e[2],+e[1])}catch{return!1}const r=+e[0],a=+(e[3]||0),l=+(e[4]||0);return r>=this._map.getMinZoom()&&r<=this._map.getMaxZoom()&&a>=-180&&a<=180&&l>=this._map.getMinPitch()&&l<=this._map.getMaxPitch()}}const Sn={linearity:.3,easing:o.cd(0,0,.3,1)},Ol=o.e({deceleration:2500,maxSpeed:1400},Sn),Ms=o.e({deceleration:20,maxSpeed:1400},Sn),Fl=o.e({deceleration:1e3,maxSpeed:360},Sn),Uu=o.e({deceleration:1e3,maxSpeed:90},Sn),ju=o.e({deceleration:1e3,maxSpeed:360},Sn);class Hu{constructor(e){this._map=e,this.clear()}clear(){this._inertiaBuffer=[]}record(e){this._drainInertiaBuffer(),this._inertiaBuffer.push({time:M.now(),settings:e})}_drainInertiaBuffer(){const e=this._inertiaBuffer,r=M.now();for(;e.length>0&&r-e[0].time>160;)e.shift()}_onMoveEnd(e){if(this._drainInertiaBuffer(),this._inertiaBuffer.length<2)return;const r={zoom:0,bearing:0,pitch:0,roll:0,pan:new o.P(0,0),pinchAround:void 0,around:void 0};for(const{settings:h}of this._inertiaBuffer)r.zoom+=h.zoomDelta||0,r.bearing+=h.bearingDelta||0,r.pitch+=h.pitchDelta||0,r.roll+=h.rollDelta||0,h.panDelta&&r.pan._add(h.panDelta),h.around&&(r.around=h.around),h.pinchAround&&(r.pinchAround=h.pinchAround);const a=this._inertiaBuffer[this._inertiaBuffer.length-1].time-this._inertiaBuffer[0].time,l={};if(r.pan.mag()){const h=No(r.pan.mag(),a,o.e({},Ol,e||{})),g=r.pan.mult(h.amount/r.pan.mag()),b=this._map.cameraHelper.handlePanInertia(g,this._map.transform);l.center=b.easingCenter,l.offset=b.easingOffset,Fo(l,h)}if(r.zoom){const h=No(r.zoom,a,Ms);l.zoom=this._map.transform.zoom+h.amount,Fo(l,h)}if(r.bearing){const h=No(r.bearing,a,Fl);l.bearing=this._map.transform.bearing+o.ae(h.amount,-179,179),Fo(l,h)}if(r.pitch){const h=No(r.pitch,a,Uu);l.pitch=this._map.transform.pitch+h.amount,Fo(l,h)}if(r.roll){const h=No(r.roll,a,ju);l.roll=this._map.transform.roll+o.ae(h.amount,-179,179),Fo(l,h)}if(l.zoom||l.bearing){const h=r.pinchAround===void 0?r.around:r.pinchAround;l.around=h?this._map.unproject(h):this._map.getCenter()}return this.clear(),o.e(l,{noMoveStart:!0})}}function Fo(u,e){(!u.duration||u.duration<e.duration)&&(u.duration=e.duration,u.easing=e.easing)}function No(u,e,r){const{maxSpeed:a,linearity:l,deceleration:h}=r,g=o.ae(u*l/(e/1e3),-a,a),b=Math.abs(g)/(h*l);return{easing:r.easing,duration:1e3*b,amount:g*(b/2)}}class $r extends o.l{preventDefault(){this._defaultPrevented=!0}get defaultPrevented(){return this._defaultPrevented}constructor(e,r,a,l={}){a=a instanceof MouseEvent?a:new MouseEvent(e,a);const h=C.mousePos(r.getCanvas(),a),g=r.unproject(h);super(e,o.e({point:h,lngLat:g,originalEvent:a},l)),this._defaultPrevented=!1,this.target=r}}class qo extends o.l{preventDefault(){this._defaultPrevented=!0}get defaultPrevented(){return this._defaultPrevented}constructor(e,r,a){const l=e==="touchend"?a.changedTouches:a.touches,h=C.touchPos(r.getCanvasContainer(),l),g=h.map(A=>r.unproject(A)),b=h.reduce((A,I,z,F)=>A.add(I.div(F.length)),new o.P(0,0));super(e,{points:h,point:b,lngLats:g,lngLat:r.unproject(b),originalEvent:a}),this._defaultPrevented=!1}}class Nl extends o.l{preventDefault(){this._defaultPrevented=!0}get defaultPrevented(){return this._defaultPrevented}constructor(e,r,a){super(e,{originalEvent:a}),this._defaultPrevented=!1}}class Wu{constructor(e,r){this._map=e,this._clickTolerance=r.clickTolerance}reset(){delete this._mousedownPos}wheel(e){return this._firePreventable(new Nl(e.type,this._map,e))}mousedown(e,r){return this._mousedownPos=r,this._firePreventable(new $r(e.type,this._map,e))}mouseup(e){this._map.fire(new $r(e.type,this._map,e))}click(e,r){this._mousedownPos&&this._mousedownPos.dist(r)>=this._clickTolerance||this._map.fire(new $r(e.type,this._map,e))}dblclick(e){return this._firePreventable(new $r(e.type,this._map,e))}mouseover(e){this._map.fire(new $r(e.type,this._map,e))}mouseout(e){this._map.fire(new $r(e.type,this._map,e))}touchstart(e){return this._firePreventable(new qo(e.type,this._map,e))}touchmove(e){this._map.fire(new qo(e.type,this._map,e))}touchend(e){this._map.fire(new qo(e.type,this._map,e))}touchcancel(e){this._map.fire(new qo(e.type,this._map,e))}_firePreventable(e){if(this._map.fire(e),e.defaultPrevented)return{}}isEnabled(){return!0}isActive(){return!1}enable(){}disable(){}}class Zu{constructor(e){this._map=e}reset(){this._delayContextMenu=!1,this._ignoreContextMenu=!0,delete this._contextMenuEvent}mousemove(e){this._map.fire(new $r(e.type,this._map,e))}mousedown(){this._delayContextMenu=!0,this._ignoreContextMenu=!1}mouseup(){this._delayContextMenu=!1,this._contextMenuEvent&&(this._map.fire(new $r("contextmenu",this._map,this._contextMenuEvent)),delete this._contextMenuEvent)}contextmenu(e){this._delayContextMenu?this._contextMenuEvent=e:this._ignoreContextMenu||this._map.fire(new $r(e.type,this._map,e)),this._map.listens("contextmenu")&&e.preventDefault()}isEnabled(){return!0}isActive(){return!1}enable(){}disable(){}}class Uo{constructor(e){this._map=e}get transform(){return this._map._requestedCameraState||this._map.transform}get center(){return{lng:this.transform.center.lng,lat:this.transform.center.lat}}get zoom(){return this.transform.zoom}get pitch(){return this.transform.pitch}get bearing(){return this.transform.bearing}unproject(e){return this.transform.screenPointToLocation(o.P.convert(e),this._map.terrain)}}class ql{constructor(e,r){this._map=e,this._tr=new Uo(e),this._el=e.getCanvasContainer(),this._container=e.getContainer(),this._clickTolerance=r.clickTolerance||1}isEnabled(){return!!this._enabled}isActive(){return!!this._active}enable(){this.isEnabled()||(this._enabled=!0)}disable(){this.isEnabled()&&(this._enabled=!1)}mousedown(e,r){this.isEnabled()&&e.shiftKey&&e.button===0&&(C.disableDrag(),this._startPos=this._lastPos=r,this._active=!0)}mousemoveWindow(e,r){if(!this._active)return;const a=r;if(this._lastPos.equals(a)||!this._box&&a.dist(this._startPos)<this._clickTolerance)return;const l=this._startPos;this._lastPos=a,this._box||(this._box=C.create("div","maplibregl-boxzoom",this._container),this._container.classList.add("maplibregl-crosshair"),this._fireEvent("boxzoomstart",e));const h=Math.min(l.x,a.x),g=Math.max(l.x,a.x),b=Math.min(l.y,a.y),A=Math.max(l.y,a.y);C.setTransform(this._box,`translate(${h}px,${b}px)`),this._box.style.width=g-h+"px",this._box.style.height=A-b+"px"}mouseupWindow(e,r){if(!this._active||e.button!==0)return;const a=this._startPos,l=r;if(this.reset(),C.suppressClick(),a.x!==l.x||a.y!==l.y)return this._map.fire(new o.l("boxzoomend",{originalEvent:e})),{cameraAnimation:h=>h.fitScreenCoordinates(a,l,this._tr.bearing,{linear:!0})};this._fireEvent("boxzoomcancel",e)}keydown(e){this._active&&e.keyCode===27&&(this.reset(),this._fireEvent("boxzoomcancel",e))}reset(){this._active=!1,this._container.classList.remove("maplibregl-crosshair"),this._box&&(C.remove(this._box),this._box=null),C.enableDrag(),delete this._startPos,delete this._lastPos}_fireEvent(e,r){return this._map.fire(new o.l(e,{originalEvent:r}))}}function Da(u,e){if(u.length!==e.length)throw new Error(`The number of touches and points are not equal - touches ${u.length}, points ${e.length}`);const r={};for(let a=0;a<u.length;a++)r[u[a].identifier]=e[a];return r}class Ku{constructor(e){this.reset(),this.numTouches=e.numTouches}reset(){delete this.centroid,delete this.startTime,delete this.touches,this.aborted=!1}touchstart(e,r,a){(this.centroid||a.length>this.numTouches)&&(this.aborted=!0),this.aborted||(this.startTime===void 0&&(this.startTime=e.timeStamp),a.length===this.numTouches&&(this.centroid=function(l){const h=new o.P(0,0);for(const g of l)h._add(g);return h.div(l.length)}(r),this.touches=Da(a,r)))}touchmove(e,r,a){if(this.aborted||!this.centroid)return;const l=Da(a,r);for(const h in this.touches){const g=l[h];(!g||g.dist(this.touches[h])>30)&&(this.aborted=!0)}}touchend(e,r,a){if((!this.centroid||e.timeStamp-this.startTime>500)&&(this.aborted=!0),a.length===0){const l=!this.aborted&&this.centroid;if(this.reset(),l)return l}}}class jo{constructor(e){this.singleTap=new Ku(e),this.numTaps=e.numTaps,this.reset()}reset(){this.lastTime=1/0,delete this.lastTap,this.count=0,this.singleTap.reset()}touchstart(e,r,a){this.singleTap.touchstart(e,r,a)}touchmove(e,r,a){this.singleTap.touchmove(e,r,a)}touchend(e,r,a){const l=this.singleTap.touchend(e,r,a);if(l){const h=e.timeStamp-this.lastTime<500,g=!this.lastTap||this.lastTap.dist(l)<30;if(h&&g||this.reset(),this.count++,this.lastTime=e.timeStamp,this.lastTap=l,this.count===this.numTaps)return this.reset(),l}}}class Gu{constructor(e){this._tr=new Uo(e),this._zoomIn=new jo({numTouches:1,numTaps:2}),this._zoomOut=new jo({numTouches:2,numTaps:1}),this.reset()}reset(){this._active=!1,this._zoomIn.reset(),this._zoomOut.reset()}touchstart(e,r,a){this._zoomIn.touchstart(e,r,a),this._zoomOut.touchstart(e,r,a)}touchmove(e,r,a){this._zoomIn.touchmove(e,r,a),this._zoomOut.touchmove(e,r,a)}touchend(e,r,a){const l=this._zoomIn.touchend(e,r,a),h=this._zoomOut.touchend(e,r,a),g=this._tr;return l?(this._active=!0,e.preventDefault(),setTimeout(()=>this.reset(),0),{cameraAnimation:b=>b.easeTo({duration:300,zoom:g.zoom+1,around:g.unproject(l)},{originalEvent:e})}):h?(this._active=!0,e.preventDefault(),setTimeout(()=>this.reset(),0),{cameraAnimation:b=>b.easeTo({duration:300,zoom:g.zoom-1,around:g.unproject(h)},{originalEvent:e})}):void 0}touchcancel(){this.reset()}enable(){this._enabled=!0}disable(){this._enabled=!1,this.reset()}isEnabled(){return this._enabled}isActive(){return this._active}}class ki{constructor(e){this._enabled=!!e.enable,this._moveStateManager=e.moveStateManager,this._clickTolerance=e.clickTolerance||1,this._moveFunction=e.move,this._activateOnStart=!!e.activateOnStart,e.assignEvents(this),this.reset()}reset(e){this._active=!1,this._moved=!1,delete this._lastPoint,this._moveStateManager.endMove(e)}_move(...e){const r=this._moveFunction(...e);if(r.bearingDelta||r.pitchDelta||r.rollDelta||r.around||r.panDelta)return this._active=!0,r}dragStart(e,r){this.isEnabled()&&!this._lastPoint&&this._moveStateManager.isValidStartEvent(e)&&(this._moveStateManager.startMove(e),this._lastPoint=Array.isArray(r)?r[0]:r,this._activateOnStart&&this._lastPoint&&(this._active=!0))}dragMove(e,r){if(!this.isEnabled())return;const a=this._lastPoint;if(!a)return;if(e.preventDefault(),!this._moveStateManager.isValidMoveEvent(e))return void this.reset(e);const l=Array.isArray(r)?r[0]:r;return!this._moved&&l.dist(a)<this._clickTolerance?void 0:(this._moved=!0,this._lastPoint=l,this._move(a,l))}dragEnd(e){this.isEnabled()&&this._lastPoint&&this._moveStateManager.isValidEndEvent(e)&&(this._moved&&C.suppressClick(),this.reset(e))}enable(){this._enabled=!0}disable(){this._enabled=!1,this.reset()}isEnabled(){return this._enabled}isActive(){return this._active}getClickTolerance(){return this._clickTolerance}}const hn={0:1,2:2};class Ho{constructor(e){this._correctEvent=e.checkCorrectEvent}startMove(e){const r=C.mouseButton(e);this._eventButton=r}endMove(e){delete this._eventButton}isValidStartEvent(e){return this._correctEvent(e)}isValidMoveEvent(e){return!function(r,a){const l=hn[a];return r.buttons===void 0||(r.buttons&l)!==l}(e,this._eventButton)}isValidEndEvent(e){return C.mouseButton(e)===this._eventButton}}class pn{constructor(){this._firstTouch=void 0}_isOneFingerTouch(e){return e.targetTouches.length===1}_isSameTouchEvent(e){return e.targetTouches[0].identifier===this._firstTouch}startMove(e){this._firstTouch=e.targetTouches[0].identifier}endMove(e){delete this._firstTouch}isValidStartEvent(e){return this._isOneFingerTouch(e)}isValidMoveEvent(e){return this._isOneFingerTouch(e)&&this._isSameTouchEvent(e)}isValidEndEvent(e){return this._isOneFingerTouch(e)&&this._isSameTouchEvent(e)}}class Wo{constructor(e=new Ho({checkCorrectEvent:()=>!0}),r=new pn){this.mouseMoveStateManager=e,this.oneFingerTouchMoveStateManager=r}_executeRelevantHandler(e,r,a){return e instanceof MouseEvent?r(e):typeof TouchEvent<"u"&&e instanceof TouchEvent?a(e):void 0}startMove(e){this._executeRelevantHandler(e,r=>this.mouseMoveStateManager.startMove(r),r=>this.oneFingerTouchMoveStateManager.startMove(r))}endMove(e){this._executeRelevantHandler(e,r=>this.mouseMoveStateManager.endMove(r),r=>this.oneFingerTouchMoveStateManager.endMove(r))}isValidStartEvent(e){return this._executeRelevantHandler(e,r=>this.mouseMoveStateManager.isValidStartEvent(r),r=>this.oneFingerTouchMoveStateManager.isValidStartEvent(r))}isValidMoveEvent(e){return this._executeRelevantHandler(e,r=>this.mouseMoveStateManager.isValidMoveEvent(r),r=>this.oneFingerTouchMoveStateManager.isValidMoveEvent(r))}isValidEndEvent(e){return this._executeRelevantHandler(e,r=>this.mouseMoveStateManager.isValidEndEvent(r),r=>this.oneFingerTouchMoveStateManager.isValidEndEvent(r))}}const za=u=>{u.mousedown=u.dragStart,u.mousemoveWindow=u.dragMove,u.mouseup=u.dragEnd,u.contextmenu=e=>{e.preventDefault()}};class bp{constructor(e,r){this._clickTolerance=e.clickTolerance||1,this._map=r,this.reset()}reset(){this._active=!1,this._touches={},this._sum=new o.P(0,0)}_shouldBePrevented(e){return e<(this._map.cooperativeGestures.isEnabled()?2:1)}touchstart(e,r,a){return this._calculateTransform(e,r,a)}touchmove(e,r,a){if(this._active){if(!this._shouldBePrevented(a.length))return e.preventDefault(),this._calculateTransform(e,r,a);this._map.cooperativeGestures.notifyGestureBlocked("touch_pan",e)}}touchend(e,r,a){this._calculateTransform(e,r,a),this._active&&this._shouldBePrevented(a.length)&&this.reset()}touchcancel(){this.reset()}_calculateTransform(e,r,a){a.length>0&&(this._active=!0);const l=Da(a,r),h=new o.P(0,0),g=new o.P(0,0);let b=0;for(const I in l){const z=l[I],F=this._touches[I];F&&(h._add(z),g._add(z.sub(F)),b++,l[I]=z)}if(this._touches=l,this._shouldBePrevented(b)||!g.mag())return;const A=g.div(b);return this._sum._add(A),this._sum.mag()<this._clickTolerance?void 0:{around:h.div(b),panDelta:A}}enable(){this._enabled=!0}disable(){this._enabled=!1,this.reset()}isEnabled(){return this._enabled}isActive(){return this._active}}class Ul{constructor(){this.reset()}reset(){this._active=!1,delete this._firstTwoTouches}touchstart(e,r,a){this._firstTwoTouches||a.length<2||(this._firstTwoTouches=[a[0].identifier,a[1].identifier],this._start([r[0],r[1]]))}touchmove(e,r,a){if(!this._firstTwoTouches)return;e.preventDefault();const[l,h]=this._firstTwoTouches,g=Ba(a,r,l),b=Ba(a,r,h);if(!g||!b)return;const A=this._aroundCenter?null:g.add(b).div(2);return this._move([g,b],A,e)}touchend(e,r,a){if(!this._firstTwoTouches)return;const[l,h]=this._firstTwoTouches,g=Ba(a,r,l),b=Ba(a,r,h);g&&b||(this._active&&C.suppressClick(),this.reset())}touchcancel(){this.reset()}enable(e){this._enabled=!0,this._aroundCenter=!!e&&e.around==="center"}disable(){this._enabled=!1,this.reset()}isEnabled(){return!!this._enabled}isActive(){return!!this._active}}function Ba(u,e,r){for(let a=0;a<u.length;a++)if(u[a].identifier===r)return e[a]}function jl(u,e){return Math.log(u/e)/Math.LN2}class Zo extends Ul{reset(){super.reset(),delete this._distance,delete this._startDistance}_start(e){this._startDistance=this._distance=e[0].dist(e[1])}_move(e,r){const a=this._distance;if(this._distance=e[0].dist(e[1]),this._active||!(Math.abs(jl(this._distance,this._startDistance))<.1))return this._active=!0,{zoomDelta:jl(this._distance,a),pinchAround:r}}}function An(u,e){return 180*u.angleWith(e)/Math.PI}class vt extends Ul{reset(){super.reset(),delete this._minDiameter,delete this._startVector,delete this._vector}_start(e){this._startVector=this._vector=e[0].sub(e[1]),this._minDiameter=e[0].dist(e[1])}_move(e,r,a){const l=this._vector;if(this._vector=e[0].sub(e[1]),this._active||!this._isBelowThreshold(this._vector))return this._active=!0,{bearingDelta:An(this._vector,l),pinchAround:r}}_isBelowThreshold(e){this._minDiameter=Math.min(this._minDiameter,e.mag());const r=25/(Math.PI*this._minDiameter)*360,a=An(e,this._startVector);return Math.abs(a)<r}}function Va(u){return Math.abs(u.y)>Math.abs(u.x)}class Oa extends Ul{constructor(e){super(),this._currentTouchCount=0,this._map=e}reset(){super.reset(),this._valid=void 0,delete this._firstMove,delete this._lastPoints}touchstart(e,r,a){super.touchstart(e,r,a),this._currentTouchCount=a.length}_start(e){this._lastPoints=e,Va(e[0].sub(e[1]))&&(this._valid=!1)}_move(e,r,a){if(this._map.cooperativeGestures.isEnabled()&&this._currentTouchCount<3)return;const l=e[0].sub(this._lastPoints[0]),h=e[1].sub(this._lastPoints[1]);return this._valid=this.gestureBeginsVertically(l,h,a.timeStamp),this._valid?(this._lastPoints=e,this._active=!0,{pitchDelta:(l.y+h.y)/2*-.5}):void 0}gestureBeginsVertically(e,r,a){if(this._valid!==void 0)return this._valid;const l=e.mag()>=2,h=r.mag()>=2;if(!l&&!h)return;if(!l||!h)return this._firstMove===void 0&&(this._firstMove=a),a-this._firstMove<100&&void 0;const g=e.y>0==r.y>0;return Va(e)&&Va(r)&&g}}const Ju={panStep:100,bearingStep:15,pitchStep:10};class Ko{constructor(e){this._tr=new Uo(e);const r=Ju;this._panStep=r.panStep,this._bearingStep=r.bearingStep,this._pitchStep=r.pitchStep,this._rotationDisabled=!1}reset(){this._active=!1}keydown(e){if(e.altKey||e.ctrlKey||e.metaKey)return;let r=0,a=0,l=0,h=0,g=0;switch(e.keyCode){case 61:case 107:case 171:case 187:r=1;break;case 189:case 109:case 173:r=-1;break;case 37:e.shiftKey?a=-1:(e.preventDefault(),h=-1);break;case 39:e.shiftKey?a=1:(e.preventDefault(),h=1);break;case 38:e.shiftKey?l=1:(e.preventDefault(),g=-1);break;case 40:e.shiftKey?l=-1:(e.preventDefault(),g=1);break;default:return}return this._rotationDisabled&&(a=0,l=0),{cameraAnimation:b=>{const A=this._tr;b.easeTo({duration:300,easeId:"keyboardHandler",easing:Ls,zoom:r?Math.round(A.zoom)+r*(e.shiftKey?2:1):A.zoom,bearing:A.bearing+a*this._bearingStep,pitch:A.pitch+l*this._pitchStep,offset:[-h*this._panStep,-g*this._panStep],center:A.center},{originalEvent:e})}}}enable(){this._enabled=!0}disable(){this._enabled=!1,this.reset()}isEnabled(){return this._enabled}isActive(){return this._active}disableRotation(){this._rotationDisabled=!0}enableRotation(){this._rotationDisabled=!1}}function Ls(u){return u*(2-u)}const Hl=4.000244140625;class er{constructor(e,r){this._onTimeout=a=>{this._type="wheel",this._delta-=this._lastValue,this._active||this._start(a)},this._map=e,this._tr=new Uo(e),this._triggerRenderFrame=r,this._delta=0,this._defaultZoomRate=.01,this._wheelZoomRate=.0022222222222222222}setZoomRate(e){this._defaultZoomRate=e}setWheelZoomRate(e){this._wheelZoomRate=e}isEnabled(){return!!this._enabled}isActive(){return!!this._active||this._finishTimeout!==void 0}isZooming(){return!!this._zooming}enable(e){this.isEnabled()||(this._enabled=!0,this._aroundCenter=!!e&&e.around==="center")}disable(){this.isEnabled()&&(this._enabled=!1)}_shouldBePrevented(e){return!!this._map.cooperativeGestures.isEnabled()&&!(e.ctrlKey||this._map.cooperativeGestures.isBypassed(e))}wheel(e){if(!this.isEnabled())return;if(this._shouldBePrevented(e))return void this._map.cooperativeGestures.notifyGestureBlocked("wheel_zoom",e);let r=e.deltaMode===WheelEvent.DOM_DELTA_LINE?40*e.deltaY:e.deltaY;const a=M.now(),l=a-(this._lastWheelEventTime||0);this._lastWheelEventTime=a,r!==0&&r%Hl==0?this._type="wheel":r!==0&&Math.abs(r)<4?this._type="trackpad":l>400?(this._type=null,this._lastValue=r,this._timeout=setTimeout(this._onTimeout,40,e)):this._type||(this._type=Math.abs(l*r)<200?"trackpad":"wheel",this._timeout&&(clearTimeout(this._timeout),this._timeout=null,r+=this._lastValue)),e.shiftKey&&r&&(r/=4),this._type&&(this._lastWheelEvent=e,this._delta-=r,this._active||this._start(e)),e.preventDefault()}_start(e){if(!this._delta)return;this._frameId&&(this._frameId=null),this._active=!0,this.isZooming()||(this._zooming=!0),this._finishTimeout&&(clearTimeout(this._finishTimeout),delete this._finishTimeout);const r=C.mousePos(this._map.getCanvas(),e),a=this._tr;this._aroundPoint=this._aroundCenter?a.transform.locationToScreenPoint(o.Q.convert(a.center)):r,this._frameId||(this._frameId=!0,this._triggerRenderFrame())}renderFrame(){if(!this._frameId||(this._frameId=null,!this.isActive()))return;const e=this._tr.transform;if(typeof this._lastExpectedZoom=="number"){const b=e.zoom-this._lastExpectedZoom;typeof this._startZoom=="number"&&(this._startZoom+=b),typeof this._targetZoom=="number"&&(this._targetZoom+=b)}if(this._delta!==0){const b=this._type==="wheel"&&Math.abs(this._delta)>Hl?this._wheelZoomRate:this._defaultZoomRate;let A=2/(1+Math.exp(-Math.abs(this._delta*b)));this._delta<0&&A!==0&&(A=1/A);const I=typeof this._targetZoom!="number"?e.scale:o.ac(this._targetZoom);this._targetZoom=e.getConstrained(e.getCameraLngLat(),o.ah(I*A)).zoom,this._type==="wheel"&&(this._startZoom=e.zoom,this._easing=this._smoothOutEasing(200)),this._delta=0}const r=typeof this._targetZoom!="number"?e.zoom:this._targetZoom,a=this._startZoom,l=this._easing;let h,g=!1;if(this._type==="wheel"&&a&&l){const b=M.now()-this._lastWheelEventTime,A=Math.min((b+5)/200,1),I=l(A);h=o.B.number(a,r,I),A<1?this._frameId||(this._frameId=!0):g=!0}else h=r,g=!0;return this._active=!0,g&&(this._active=!1,this._finishTimeout=setTimeout(()=>{this._zooming=!1,this._triggerRenderFrame(),delete this._targetZoom,delete this._lastExpectedZoom,delete this._finishTimeout},200)),this._lastExpectedZoom=h,{noInertia:!0,needsRenderFrame:!g,zoomDelta:h-e.zoom,around:this._aroundPoint,originalEvent:this._lastWheelEvent}}_smoothOutEasing(e){let r=o.cf;if(this._prevEase){const a=this._prevEase,l=(M.now()-a.start)/a.duration,h=a.easing(l+.01)-a.easing(l),g=.27/Math.sqrt(h*h+1e-4)*.01,b=Math.sqrt(.0729-g*g);r=o.cd(g,b,.25,1)}return this._prevEase={start:M.now(),duration:e,easing:r},r}reset(){this._active=!1,this._zooming=!1,delete this._targetZoom,delete this._lastExpectedZoom,this._finishTimeout&&(clearTimeout(this._finishTimeout),delete this._finishTimeout)}}class Fa{constructor(e,r){this._clickZoom=e,this._tapZoom=r}enable(){this._clickZoom.enable(),this._tapZoom.enable()}disable(){this._clickZoom.disable(),this._tapZoom.disable()}isEnabled(){return this._clickZoom.isEnabled()&&this._tapZoom.isEnabled()}isActive(){return this._clickZoom.isActive()||this._tapZoom.isActive()}}class vp{constructor(e){this._tr=new Uo(e),this.reset()}reset(){this._active=!1}dblclick(e,r){return e.preventDefault(),{cameraAnimation:a=>{a.easeTo({duration:300,zoom:this._tr.zoom+(e.shiftKey?-1:1),around:this._tr.unproject(r)},{originalEvent:e})}}}enable(){this._enabled=!0}disable(){this._enabled=!1,this.reset()}isEnabled(){return this._enabled}isActive(){return this._active}}class Wl{constructor(){this._tap=new jo({numTouches:1,numTaps:1}),this.reset()}reset(){this._active=!1,delete this._swipePoint,delete this._swipeTouch,delete this._tapTime,delete this._tapPoint,this._tap.reset()}touchstart(e,r,a){if(!this._swipePoint)if(this._tapTime){const l=r[0],h=e.timeStamp-this._tapTime<500,g=this._tapPoint.dist(l)<30;h&&g?a.length>0&&(this._swipePoint=l,this._swipeTouch=a[0].identifier):this.reset()}else this._tap.touchstart(e,r,a)}touchmove(e,r,a){if(this._tapTime){if(this._swipePoint){if(a[0].identifier!==this._swipeTouch)return;const l=r[0],h=l.y-this._swipePoint.y;return this._swipePoint=l,e.preventDefault(),this._active=!0,{zoomDelta:h/128}}}else this._tap.touchmove(e,r,a)}touchend(e,r,a){if(this._tapTime)this._swipePoint&&a.length===0&&this.reset();else{const l=this._tap.touchend(e,r,a);l&&(this._tapTime=e.timeStamp,this._tapPoint=l)}}touchcancel(){this.reset()}enable(){this._enabled=!0}disable(){this._enabled=!1,this.reset()}isEnabled(){return this._enabled}isActive(){return this._active}}class Xu{constructor(e,r,a){this._el=e,this._mousePan=r,this._touchPan=a}enable(e){this._inertiaOptions=e||{},this._mousePan.enable(),this._touchPan.enable(),this._el.classList.add("maplibregl-touch-drag-pan")}disable(){this._mousePan.disable(),this._touchPan.disable(),this._el.classList.remove("maplibregl-touch-drag-pan")}isEnabled(){return this._mousePan.isEnabled()&&this._touchPan.isEnabled()}isActive(){return this._mousePan.isActive()||this._touchPan.isActive()}}class Qu{constructor(e,r,a,l){this._pitchWithRotate=e.pitchWithRotate,this._rollEnabled=e.rollEnabled,this._mouseRotate=r,this._mousePitch=a,this._mouseRoll=l}enable(){this._mouseRotate.enable(),this._pitchWithRotate&&this._mousePitch.enable(),this._rollEnabled&&this._mouseRoll.enable()}disable(){this._mouseRotate.disable(),this._mousePitch.disable(),this._mouseRoll.disable()}isEnabled(){return this._mouseRotate.isEnabled()&&(!this._pitchWithRotate||this._mousePitch.isEnabled())&&(!this._rollEnabled||this._mouseRoll.isEnabled())}isActive(){return this._mouseRotate.isActive()||this._mousePitch.isActive()||this._mouseRoll.isActive()}}class Zl{constructor(e,r,a,l){this._el=e,this._touchZoom=r,this._touchRotate=a,this._tapDragZoom=l,this._rotationDisabled=!1,this._enabled=!0}enable(e){this._touchZoom.enable(e),this._rotationDisabled||this._touchRotate.enable(e),this._tapDragZoom.enable(),this._el.classList.add("maplibregl-touch-zoom-rotate")}disable(){this._touchZoom.disable(),this._touchRotate.disable(),this._tapDragZoom.disable(),this._el.classList.remove("maplibregl-touch-zoom-rotate")}isEnabled(){return this._touchZoom.isEnabled()&&(this._rotationDisabled||this._touchRotate.isEnabled())&&this._tapDragZoom.isEnabled()}isActive(){return this._touchZoom.isActive()||this._touchRotate.isActive()||this._tapDragZoom.isActive()}disableRotation(){this._rotationDisabled=!0,this._touchRotate.disable()}enableRotation(){this._rotationDisabled=!1,this._touchZoom.isEnabled()&&this._touchRotate.enable()}}class Na{constructor(e,r){this._bypassKey=navigator.userAgent.indexOf("Mac")!==-1?"metaKey":"ctrlKey",this._map=e,this._options=r,this._enabled=!1}isActive(){return!1}reset(){}_setupUI(){if(this._container)return;const e=this._map.getCanvasContainer();e.classList.add("maplibregl-cooperative-gestures"),this._container=C.create("div","maplibregl-cooperative-gesture-screen",e);let r=this._map._getUIString("CooperativeGesturesHandler.WindowsHelpText");this._bypassKey==="metaKey"&&(r=this._map._getUIString("CooperativeGesturesHandler.MacHelpText"));const a=this._map._getUIString("CooperativeGesturesHandler.MobileHelpText"),l=document.createElement("div");l.className="maplibregl-desktop-message",l.textContent=r,this._container.appendChild(l);const h=document.createElement("div");h.className="maplibregl-mobile-message",h.textContent=a,this._container.appendChild(h),this._container.setAttribute("aria-hidden","true")}_destroyUI(){this._container&&(C.remove(this._container),this._map.getCanvasContainer().classList.remove("maplibregl-cooperative-gestures")),delete this._container}enable(){this._setupUI(),this._enabled=!0}disable(){this._enabled=!1,this._destroyUI()}isEnabled(){return this._enabled}isBypassed(e){return e[this._bypassKey]}notifyGestureBlocked(e,r){this._enabled&&(this._map.fire(new o.l("cooperativegestureprevented",{gestureType:e,originalEvent:r})),this._container.classList.add("maplibregl-show"),setTimeout(()=>{this._container.classList.remove("maplibregl-show")},100))}}const Rs=u=>u.zoom||u.drag||u.roll||u.pitch||u.rotate;class wp extends o.l{}function qa(u){return u.panDelta&&u.panDelta.mag()||u.zoomDelta||u.bearingDelta||u.pitchDelta||u.rollDelta}class Sp{constructor(e,r){this.handleWindowEvent=l=>{this.handleEvent(l,`${l.type}Window`)},this.handleEvent=(l,h)=>{if(l.type==="blur")return void this.stop(!0);this._updatingCamera=!0;const g=l.type==="renderFrame"?void 0:l,b={needsRenderFrame:!1},A={},I={};for(const{handlerName:O,handler:Z,allowed:J}of this._handlers){if(!Z.isEnabled())continue;let oe;if(this._blockedByActive(I,J,O))Z.reset();else if(Z[h||l.type]){if(o.cg(l,h||l.type)){const ne=C.mousePos(this._map.getCanvas(),l);oe=Z[h||l.type](l,ne)}else if(o.ch(l,h||l.type)){const ne=this._getMapTouches(l.touches),se=C.touchPos(this._map.getCanvas(),ne);oe=Z[h||l.type](l,se,ne)}else o.ci(h||l.type)||(oe=Z[h||l.type](l));this.mergeHandlerResult(b,A,oe,O,g),oe&&oe.needsRenderFrame&&this._triggerRenderFrame()}(oe||Z.isActive())&&(I[O]=Z)}const z={};for(const O in this._previousActiveHandlers)I[O]||(z[O]=g);this._previousActiveHandlers=I,(Object.keys(z).length||qa(b))&&(this._changes.push([b,A,z]),this._triggerRenderFrame()),(Object.keys(I).length||qa(b))&&this._map._stop(!0),this._updatingCamera=!1;const{cameraAnimation:F}=b;F&&(this._inertia.clear(),this._fireEvents({},{},!0),this._changes=[],F(this._map))},this._map=e,this._el=this._map.getCanvasContainer(),this._handlers=[],this._handlersById={},this._changes=[],this._inertia=new Hu(e),this._bearingSnap=r.bearingSnap,this._previousActiveHandlers={},this._eventsInProgress={},this._addDefaultHandlers(r);const a=this._el;this._listeners=[[a,"touchstart",{passive:!0}],[a,"touchmove",{passive:!1}],[a,"touchend",void 0],[a,"touchcancel",void 0],[a,"mousedown",void 0],[a,"mousemove",void 0],[a,"mouseup",void 0],[document,"mousemove",{capture:!0}],[document,"mouseup",void 0],[a,"mouseover",void 0],[a,"mouseout",void 0],[a,"dblclick",void 0],[a,"click",void 0],[a,"keydown",{capture:!1}],[a,"keyup",void 0],[a,"wheel",{passive:!1}],[a,"contextmenu",void 0],[window,"blur",void 0]];for(const[l,h,g]of this._listeners)C.addEventListener(l,h,l===document?this.handleWindowEvent:this.handleEvent,g)}destroy(){for(const[e,r,a]of this._listeners)C.removeEventListener(e,r,e===document?this.handleWindowEvent:this.handleEvent,a)}_addDefaultHandlers(e){const r=this._map,a=r.getCanvasContainer();this._add("mapEvent",new Wu(r,e));const l=r.boxZoom=new ql(r,e);this._add("boxZoom",l),e.interactive&&e.boxZoom&&l.enable();const h=r.cooperativeGestures=new Na(r,e.cooperativeGestures);this._add("cooperativeGestures",h),e.cooperativeGestures&&h.enable();const g=new Gu(r),b=new vp(r);r.doubleClickZoom=new Fa(b,g),this._add("tapZoom",g),this._add("clickZoom",b),e.interactive&&e.doubleClickZoom&&r.doubleClickZoom.enable();const A=new Wl;this._add("tapDragZoom",A);const I=r.touchPitch=new Oa(r);this._add("touchPitch",I),e.interactive&&e.touchPitch&&r.touchPitch.enable(e.touchPitch);const z=()=>r.project(r.getCenter()),F=function({enable:ye,clickTolerance:be,aroundCenter:ke=!0,minPixelCenterThreshold:we=100,rotateDegreesPerPixelMoved:Le=.8},We){const Fe=new Ho({checkCorrectEvent:Ne=>C.mouseButton(Ne)===0&&Ne.ctrlKey||C.mouseButton(Ne)===2&&!Ne.ctrlKey});return new ki({clickTolerance:be,move:(Ne,je)=>{const mt=We();if(ke&&Math.abs(mt.y-Ne.y)>we)return{bearingDelta:o.ce(new o.P(Ne.x,je.y),je,mt)};let pt=(je.x-Ne.x)*Le;return ke&&je.y<mt.y&&(pt=-pt),{bearingDelta:pt}},moveStateManager:Fe,enable:ye,assignEvents:za})}(e,z),O=function({enable:ye,clickTolerance:be,pitchDegreesPerPixelMoved:ke=-.5}){const we=new Ho({checkCorrectEvent:Le=>C.mouseButton(Le)===0&&Le.ctrlKey||C.mouseButton(Le)===2});return new ki({clickTolerance:be,move:(Le,We)=>({pitchDelta:(We.y-Le.y)*ke}),moveStateManager:we,enable:ye,assignEvents:za})}(e),Z=function({enable:ye,clickTolerance:be,rollDegreesPerPixelMoved:ke=.3},we){const Le=new Ho({checkCorrectEvent:We=>C.mouseButton(We)===2&&We.ctrlKey});return new ki({clickTolerance:be,move:(We,Fe)=>{const Ne=we();let je=(Fe.x-We.x)*ke;return Fe.y<Ne.y&&(je=-je),{rollDelta:je}},moveStateManager:Le,enable:ye,assignEvents:za})}(e,z);r.dragRotate=new Qu(e,F,O,Z),this._add("mouseRotate",F,["mousePitch"]),this._add("mousePitch",O,["mouseRotate","mouseRoll"]),this._add("mouseRoll",Z,["mousePitch"]),e.interactive&&e.dragRotate&&r.dragRotate.enable();const J=function({enable:ye,clickTolerance:be}){const ke=new Ho({checkCorrectEvent:we=>C.mouseButton(we)===0&&!we.ctrlKey});return new ki({clickTolerance:be,move:(we,Le)=>({around:Le,panDelta:Le.sub(we)}),activateOnStart:!0,moveStateManager:ke,enable:ye,assignEvents:za})}(e),oe=new bp(e,r);r.dragPan=new Xu(a,J,oe),this._add("mousePan",J),this._add("touchPan",oe,["touchZoom","touchRotate"]),e.interactive&&e.dragPan&&r.dragPan.enable(e.dragPan);const ne=new vt,se=new Zo;r.touchZoomRotate=new Zl(a,se,ne,A),this._add("touchRotate",ne,["touchPan","touchZoom"]),this._add("touchZoom",se,["touchPan","touchRotate"]),e.interactive&&e.touchZoomRotate&&r.touchZoomRotate.enable(e.touchZoomRotate);const de=r.scrollZoom=new er(r,()=>this._triggerRenderFrame());this._add("scrollZoom",de,["mousePan"]),e.interactive&&e.scrollZoom&&r.scrollZoom.enable(e.scrollZoom);const _e=r.keyboard=new Ko(r);this._add("keyboard",_e),e.interactive&&e.keyboard&&r.keyboard.enable(),this._add("blockableMapEvent",new Zu(r))}_add(e,r,a){this._handlers.push({handlerName:e,handler:r,allowed:a}),this._handlersById[e]=r}stop(e){if(!this._updatingCamera){for(const{handler:r}of this._handlers)r.reset();this._inertia.clear(),this._fireEvents({},{},e),this._changes=[]}}isActive(){for(const{handler:e}of this._handlers)if(e.isActive())return!0;return!1}isZooming(){return!!this._eventsInProgress.zoom||this._map.scrollZoom.isZooming()}isRotating(){return!!this._eventsInProgress.rotate}isMoving(){return!!Rs(this._eventsInProgress)||this.isZooming()}_blockedByActive(e,r,a){for(const l in e)if(l!==a&&(!r||r.indexOf(l)<0))return!0;return!1}_getMapTouches(e){const r=[];for(const a of e)this._el.contains(a.target)&&r.push(a);return r}mergeHandlerResult(e,r,a,l,h){if(!a)return;o.e(e,a);const g={handlerName:l,originalEvent:a.originalEvent||h};a.zoomDelta!==void 0&&(r.zoom=g),a.panDelta!==void 0&&(r.drag=g),a.rollDelta!==void 0&&(r.roll=g),a.pitchDelta!==void 0&&(r.pitch=g),a.bearingDelta!==void 0&&(r.rotate=g)}_applyChanges(){const e={},r={},a={};for(const[l,h,g]of this._changes)l.panDelta&&(e.panDelta=(e.panDelta||new o.P(0,0))._add(l.panDelta)),l.zoomDelta&&(e.zoomDelta=(e.zoomDelta||0)+l.zoomDelta),l.bearingDelta&&(e.bearingDelta=(e.bearingDelta||0)+l.bearingDelta),l.pitchDelta&&(e.pitchDelta=(e.pitchDelta||0)+l.pitchDelta),l.rollDelta&&(e.rollDelta=(e.rollDelta||0)+l.rollDelta),l.around!==void 0&&(e.around=l.around),l.pinchAround!==void 0&&(e.pinchAround=l.pinchAround),l.noInertia&&(e.noInertia=l.noInertia),o.e(r,h),o.e(a,g);this._updateMapTransform(e,r,a),this._changes=[]}_updateMapTransform(e,r,a){const l=this._map,h=l._getTransformForUpdate(),g=l.terrain;if(!(qa(e)||g&&this._terrainMovement))return this._fireEvents(r,a,!0);l._stop(!0);let{panDelta:b,zoomDelta:A,bearingDelta:I,pitchDelta:z,rollDelta:F,around:O,pinchAround:Z}=e;Z!==void 0&&(O=Z),O=O||l.transform.centerPoint,g&&!h.isPointOnMapSurface(O)&&(O=h.centerPoint);const J={panDelta:b,zoomDelta:A,rollDelta:F,pitchDelta:z,bearingDelta:I,around:O};this._map.cameraHelper.useGlobeControls&&!h.isPointOnMapSurface(O)&&(O=h.centerPoint);const oe=O.distSqr(h.centerPoint)<.01?h.center:h.screenPointToLocation(b?O.sub(b):O);g?(this._map.cameraHelper.handleMapControlsRollPitchBearingZoom(J,h),this._terrainMovement||!r.drag&&!r.zoom?r.drag&&this._terrainMovement?h.setCenter(h.screenPointToLocation(h.centerPoint.sub(b))):this._map.cameraHelper.handleMapControlsPan(J,h,oe):(this._terrainMovement=!0,this._map._elevationFreeze=!0,this._map.cameraHelper.handleMapControlsPan(J,h,oe))):(this._map.cameraHelper.handleMapControlsRollPitchBearingZoom(J,h),this._map.cameraHelper.handleMapControlsPan(J,h,oe)),l._applyUpdatedTransform(h),this._map._update(),e.noInertia||this._inertia.record(e),this._fireEvents(r,a,!0)}_fireEvents(e,r,a){const l=Rs(this._eventsInProgress),h=Rs(e),g={};for(const F in e){const{originalEvent:O}=e[F];this._eventsInProgress[F]||(g[`${F}start`]=O),this._eventsInProgress[F]=e[F]}!l&&h&&this._fireEvent("movestart",h.originalEvent);for(const F in g)this._fireEvent(F,g[F]);h&&this._fireEvent("move",h.originalEvent);for(const F in e){const{originalEvent:O}=e[F];this._fireEvent(F,O)}const b={};let A;for(const F in this._eventsInProgress){const{handlerName:O,originalEvent:Z}=this._eventsInProgress[F];this._handlersById[O].isActive()||(delete this._eventsInProgress[F],A=r[O]||Z,b[`${F}end`]=A)}for(const F in b)this._fireEvent(F,b[F]);const I=Rs(this._eventsInProgress),z=(l||h)&&!I;if(z&&this._terrainMovement){this._map._elevationFreeze=!1,this._terrainMovement=!1;const F=this._map._getTransformForUpdate();this._map.getCenterClampedToGround()&&F.recalculateZoomAndCenter(this._map.terrain),this._map._applyUpdatedTransform(F)}if(a&&z){this._updatingCamera=!0;const F=this._inertia._onMoveEnd(this._map.dragPan._inertiaOptions),O=Z=>Z!==0&&-this._bearingSnap<Z&&Z<this._bearingSnap;!F||!F.essential&&M.prefersReducedMotion?(this._map.fire(new o.l("moveend",{originalEvent:A})),O(this._map.getBearing())&&this._map.resetNorth()):(O(F.bearing||this._map.getBearing())&&(F.bearing=0),F.freezeElevation=!0,this._map.easeTo(F,{originalEvent:A})),this._updatingCamera=!1}}_fireEvent(e,r){this._map.fire(new o.l(e,r?{originalEvent:r}:{}))}_requestFrame(){return this._map.triggerRepaint(),this._map._renderTaskQueue.add(e=>{delete this._frameId,this.handleEvent(new wp("renderFrame",{timeStamp:e})),this._applyChanges()})}_triggerRenderFrame(){this._frameId===void 0&&(this._frameId=this._requestFrame())}}class Ap extends o.E{constructor(e,r,a){super(),this._renderFrameCallback=()=>{const l=Math.min((M.now()-this._easeStart)/this._easeOptions.duration,1);this._onEaseFrame(this._easeOptions.easing(l)),l<1&&this._easeFrameId?this._easeFrameId=this._requestRenderFrame(this._renderFrameCallback):this.stop()},this._moving=!1,this._zooming=!1,this.transform=e,this._bearingSnap=a.bearingSnap,this.cameraHelper=r,this.on("moveend",()=>{delete this._requestedCameraState})}migrateProjection(e,r){e.apply(this.transform),this.transform=e,this.cameraHelper=r}getCenter(){return new o.Q(this.transform.center.lng,this.transform.center.lat)}setCenter(e,r){return this.jumpTo({center:e},r)}getCenterElevation(){return this.transform.elevation}setCenterElevation(e,r){return this.jumpTo({elevation:e},r),this}getCenterClampedToGround(){return this._centerClampedToGround}setCenterClampedToGround(e){this._centerClampedToGround=e}panBy(e,r,a){return e=o.P.convert(e).mult(-1),this.panTo(this.transform.center,o.e({offset:e},r),a)}panTo(e,r,a){return this.easeTo(o.e({center:e},r),a)}getZoom(){return this.transform.zoom}setZoom(e,r){return this.jumpTo({zoom:e},r),this}zoomTo(e,r,a){return this.easeTo(o.e({zoom:e},r),a)}zoomIn(e,r){return this.zoomTo(this.getZoom()+1,e,r),this}zoomOut(e,r){return this.zoomTo(this.getZoom()-1,e,r),this}getVerticalFieldOfView(){return this.transform.fov}setVerticalFieldOfView(e,r){return e!=this.transform.fov&&(this.transform.setFov(e),this.fire(new o.l("movestart",r)).fire(new o.l("move",r)).fire(new o.l("moveend",r))),this}getBearing(){return this.transform.bearing}setBearing(e,r){return this.jumpTo({bearing:e},r),this}getPadding(){return this.transform.padding}setPadding(e,r){return this.jumpTo({padding:e},r),this}rotateTo(e,r,a){return this.easeTo(o.e({bearing:e},r),a)}resetNorth(e,r){return this.rotateTo(0,o.e({duration:1e3},e),r),this}resetNorthPitch(e,r){return this.easeTo(o.e({bearing:0,pitch:0,roll:0,duration:1e3},e),r),this}snapToNorth(e,r){return Math.abs(this.getBearing())<this._bearingSnap?this.resetNorth(e,r):this}getPitch(){return this.transform.pitch}setPitch(e,r){return this.jumpTo({pitch:e},r),this}getRoll(){return this.transform.roll}setRoll(e,r){return this.jumpTo({roll:e},r),this}cameraForBounds(e,r){e=ct.convert(e).adjustAntiMeridian();const a=r&&r.bearing||0;return this._cameraForBoxAndBearing(e.getNorthWest(),e.getSouthEast(),a,r)}_cameraForBoxAndBearing(e,r,a,l){const h={top:0,bottom:0,right:0,left:0};if(typeof(l=o.e({padding:h,offset:[0,0],maxZoom:this.transform.maxZoom},l)).padding=="number"){const I=l.padding;l.padding={top:I,bottom:I,right:I,left:I}}const g=o.e(h,l.padding);l.padding=g;const b=this.transform,A=new ct(e,r);return this.cameraHelper.cameraForBoxAndBearing(l,g,A,a,b)}fitBounds(e,r,a){return this._fitInternal(this.cameraForBounds(e,r),r,a)}fitScreenCoordinates(e,r,a,l,h){return this._fitInternal(this._cameraForBoxAndBearing(this.transform.screenPointToLocation(o.P.convert(e)),this.transform.screenPointToLocation(o.P.convert(r)),a,l),l,h)}_fitInternal(e,r,a){return e?(delete(r=o.e(e,r)).padding,r.linear?this.easeTo(r,a):this.flyTo(r,a)):this}jumpTo(e,r){this.stop();const a=this._getTransformForUpdate();let l=!1,h=!1,g=!1;const b=a.zoom;this.cameraHelper.handleJumpToCenterZoom(a,e);const A=a.zoom!==b;return"elevation"in e&&a.elevation!==+e.elevation&&a.setElevation(+e.elevation),"bearing"in e&&a.bearing!==+e.bearing&&(l=!0,a.setBearing(+e.bearing)),"pitch"in e&&a.pitch!==+e.pitch&&(h=!0,a.setPitch(+e.pitch)),"roll"in e&&a.roll!==+e.roll&&(g=!0,a.setRoll(+e.roll)),e.padding==null||a.isPaddingEqual(e.padding)||a.setPadding(e.padding),this._applyUpdatedTransform(a),this.fire(new o.l("movestart",r)).fire(new o.l("move",r)),A&&this.fire(new o.l("zoomstart",r)).fire(new o.l("zoom",r)).fire(new o.l("zoomend",r)),l&&this.fire(new o.l("rotatestart",r)).fire(new o.l("rotate",r)).fire(new o.l("rotateend",r)),h&&this.fire(new o.l("pitchstart",r)).fire(new o.l("pitch",r)).fire(new o.l("pitchend",r)),g&&this.fire(new o.l("rollstart",r)).fire(new o.l("roll",r)).fire(new o.l("rollend",r)),this.fire(new o.l("moveend",r))}calculateCameraOptionsFromTo(e,r,a,l=0){const h=o.$.fromLngLat(e,r),g=o.$.fromLngLat(a,l),b=g.x-h.x,A=g.y-h.y,I=g.z-h.z,z=Math.hypot(b,A,I);if(z===0)throw new Error("Can't calculate camera options with same From and To");const F=Math.hypot(b,A),O=o.ah(this.transform.cameraToCenterDistance/z/this.transform.tileSize),Z=180*Math.atan2(b,-A)/Math.PI;let J=180*Math.acos(F/z)/Math.PI;return J=I<0?90-J:90+J,{center:g.toLngLat(),elevation:l,zoom:O,pitch:J,bearing:Z}}calculateCameraOptionsFromCameraLngLatAltRotation(e,r,a,l,h){const g=this.transform.calculateCenterFromCameraLngLatAlt(e,r,a,l);return{center:g.center,elevation:g.elevation,zoom:g.zoom,bearing:a,pitch:l,roll:h}}easeTo(e,r){this._stop(!1,e.easeId),((e=o.e({offset:[0,0],duration:500,easing:o.cf},e)).animate===!1||!e.essential&&M.prefersReducedMotion)&&(e.duration=0);const a=this._getTransformForUpdate(),l=this.getBearing(),h=a.pitch,g=a.roll,b="bearing"in e?this._normalizeBearing(e.bearing,l):l,A="pitch"in e?+e.pitch:h,I="roll"in e?this._normalizeBearing(e.roll,g):g,z="padding"in e?e.padding:a.padding,F=o.P.convert(e.offset);let O,Z;e.around&&(O=o.Q.convert(e.around),Z=a.locationToScreenPoint(O));const J={moving:this._moving,zooming:this._zooming,rotating:this._rotating,pitching:this._pitching,rolling:this._rolling},oe=this.cameraHelper.handleEaseTo(a,{bearing:b,pitch:A,roll:I,padding:z,around:O,aroundPoint:Z,offsetAsPoint:F,offset:e.offset,zoom:e.zoom,center:e.center});return this._rotating=this._rotating||l!==b,this._pitching=this._pitching||A!==h,this._rolling=this._rolling||I!==g,this._padding=!a.isPaddingEqual(z),this._zooming=this._zooming||oe.isZooming,this._easeId=e.easeId,this._prepareEase(r,e.noMoveStart,J),this.terrain&&this._prepareElevation(oe.elevationCenter),this._ease(ne=>{oe.easeFunc(ne),this.terrain&&!e.freezeElevation&&this._updateElevation(ne),this._applyUpdatedTransform(a),this._fireMoveEvents(r)},ne=>{this.terrain&&e.freezeElevation&&this._finalizeElevation(),this._afterEase(r,ne)},e),this}_prepareEase(e,r,a={}){this._moving=!0,r||a.moving||this.fire(new o.l("movestart",e)),this._zooming&&!a.zooming&&this.fire(new o.l("zoomstart",e)),this._rotating&&!a.rotating&&this.fire(new o.l("rotatestart",e)),this._pitching&&!a.pitching&&this.fire(new o.l("pitchstart",e)),this._rolling&&!a.rolling&&this.fire(new o.l("rollstart",e))}_prepareElevation(e){this._elevationCenter=e,this._elevationStart=this.transform.elevation,this._elevationTarget=this.terrain.getElevationForLngLatZoom(e,this.transform.tileZoom),this._elevationFreeze=!0}_updateElevation(e){this.transform.setMinElevationForCurrentTile(this.terrain.getMinTileElevationForLngLatZoom(this._elevationCenter,this.transform.tileZoom));const r=this.terrain.getElevationForLngLatZoom(this._elevationCenter,this.transform.tileZoom);if(e<1&&r!==this._elevationTarget){const a=this._elevationTarget-this._elevationStart;this._elevationStart+=e*(a-(r-(a*e+this._elevationStart))/(1-e)),this._elevationTarget=r}this.transform.setElevation(o.B.number(this._elevationStart,this._elevationTarget,e))}_finalizeElevation(){this._elevationFreeze=!1,this.getCenterClampedToGround()&&this.transform.recalculateZoomAndCenter(this.terrain)}_getTransformForUpdate(){return this.transformCameraUpdate||this.terrain?(this._requestedCameraState||(this._requestedCameraState=this.transform.clone()),this._requestedCameraState):this.transform}_elevateCameraIfInsideTerrain(e){if(!this.terrain&&e.elevation>=0&&e.pitch<=90)return{};const r=e.getCameraLngLat(),a=e.getCameraAltitude(),l=this.terrain?this.terrain.getElevationForLngLatZoom(r,e.zoom):0;if(a<l){const h=this.calculateCameraOptionsFromTo(r,l,e.center,e.elevation);return{pitch:h.pitch,zoom:h.zoom}}return{}}_applyUpdatedTransform(e){const r=[];if(r.push(l=>this._elevateCameraIfInsideTerrain(l)),this.transformCameraUpdate&&r.push(l=>this.transformCameraUpdate(l)),!r.length)return;const a=e.clone();for(const l of r){const h=a.clone(),{center:g,zoom:b,roll:A,pitch:I,bearing:z,elevation:F}=l(h);g&&h.setCenter(g),F!==void 0&&h.setElevation(F),b!==void 0&&h.setZoom(b),A!==void 0&&h.setRoll(A),I!==void 0&&h.setPitch(I),z!==void 0&&h.setBearing(z),a.apply(h)}this.transform.apply(a)}_fireMoveEvents(e){this.fire(new o.l("move",e)),this._zooming&&this.fire(new o.l("zoom",e)),this._rotating&&this.fire(new o.l("rotate",e)),this._pitching&&this.fire(new o.l("pitch",e)),this._rolling&&this.fire(new o.l("roll",e))}_afterEase(e,r){if(this._easeId&&r&&this._easeId===r)return;delete this._easeId;const a=this._zooming,l=this._rotating,h=this._pitching,g=this._rolling;this._moving=!1,this._zooming=!1,this._rotating=!1,this._pitching=!1,this._rolling=!1,this._padding=!1,a&&this.fire(new o.l("zoomend",e)),l&&this.fire(new o.l("rotateend",e)),h&&this.fire(new o.l("pitchend",e)),g&&this.fire(new o.l("rollend",e)),this.fire(new o.l("moveend",e))}flyTo(e,r){if(!e.essential&&M.prefersReducedMotion){const je=o.O(e,["center","zoom","bearing","pitch","roll","elevation"]);return this.jumpTo(je,r)}this.stop(),e=o.e({offset:[0,0],speed:1.2,curve:1.42,easing:o.cf},e);const a=this._getTransformForUpdate(),l=a.bearing,h=a.pitch,g=a.roll,b=a.padding,A="bearing"in e?this._normalizeBearing(e.bearing,l):l,I="pitch"in e?+e.pitch:h,z="roll"in e?this._normalizeBearing(e.roll,g):g,F="padding"in e?e.padding:a.padding,O=o.P.convert(e.offset);let Z=a.centerPoint.add(O);const J=a.screenPointToLocation(Z),oe=this.cameraHelper.handleFlyTo(a,{bearing:A,pitch:I,roll:z,padding:F,locationAtOffset:J,offsetAsPoint:O,center:e.center,minZoom:e.minZoom,zoom:e.zoom});let ne=e.curve;const se=Math.max(a.width,a.height),de=se/oe.scaleOfZoom,_e=oe.pixelPathLength;typeof oe.scaleOfMinZoom=="number"&&(ne=Math.sqrt(se/oe.scaleOfMinZoom/_e*2));const ye=ne*ne;function be(je){const mt=(de*de-se*se+(je?-1:1)*ye*ye*_e*_e)/(2*(je?de:se)*ye*_e);return Math.log(Math.sqrt(mt*mt+1)-mt)}function ke(je){return(Math.exp(je)-Math.exp(-je))/2}function we(je){return(Math.exp(je)+Math.exp(-je))/2}const Le=be(!1);let We=function(je){return we(Le)/we(Le+ne*je)},Fe=function(je){return se*((we(Le)*(ke(mt=Le+ne*je)/we(mt))-ke(Le))/ye)/_e;var mt},Ne=(be(!0)-Le)/ne;if(Math.abs(_e)<2e-6||!isFinite(Ne)){if(Math.abs(se-de)<1e-6)return this.easeTo(e,r);const je=de<se?-1:1;Ne=Math.abs(Math.log(de/se))/ne,Fe=()=>0,We=mt=>Math.exp(je*ne*mt)}return e.duration="duration"in e?+e.duration:1e3*Ne/("screenSpeed"in e?+e.screenSpeed/ne:+e.speed),e.maxDuration&&e.duration>e.maxDuration&&(e.duration=0),this._zooming=!0,this._rotating=l!==A,this._pitching=I!==h,this._rolling=z!==g,this._padding=!a.isPaddingEqual(F),this._prepareEase(r,!1),this.terrain&&this._prepareElevation(oe.targetCenter),this._ease(je=>{const mt=je*Ne,pt=1/We(mt),tt=Fe(mt);this._rotating&&a.setBearing(o.B.number(l,A,je)),this._pitching&&a.setPitch(o.B.number(h,I,je)),this._rolling&&a.setRoll(o.B.number(g,z,je)),this._padding&&(a.interpolatePadding(b,F,je),Z=a.centerPoint.add(O)),oe.easeFunc(je,pt,tt,Z),this.terrain&&!e.freezeElevation&&this._updateElevation(je),this._applyUpdatedTransform(a),this._fireMoveEvents(r)},()=>{this.terrain&&e.freezeElevation&&this._finalizeElevation(),this._afterEase(r)},e),this}isEasing(){return!!this._easeFrameId}stop(){return this._stop()}_stop(e,r){var a;if(this._easeFrameId&&(this._cancelRenderFrame(this._easeFrameId),delete this._easeFrameId,delete this._onEaseFrame),this._onEaseEnd){const l=this._onEaseEnd;delete this._onEaseEnd,l.call(this,r)}return e||(a=this.handlers)===null||a===void 0||a.stop(!1),this}_ease(e,r,a){a.animate===!1||a.duration===0?(e(1),r()):(this._easeStart=M.now(),this._easeOptions=a,this._onEaseFrame=e,this._onEaseEnd=r,this._easeFrameId=this._requestRenderFrame(this._renderFrameCallback))}_normalizeBearing(e,r){e=o.aL(e,-180,180);const a=Math.abs(e-r);return Math.abs(e-360-r)<a&&(e-=360),Math.abs(e+360-r)<a&&(e+=360),e}queryTerrainElevation(e){return this.terrain?this.terrain.getElevationForLngLatZoom(o.Q.convert(e),this.transform.tileZoom):null}}const Nn={compact:!0,customAttribution:'<a href="https://maplibre.org/" target="_blank">MapLibre</a>'};class Cr{constructor(e=Nn){this._toggleAttribution=()=>{this._container.classList.contains("maplibregl-compact")&&(this._container.classList.contains("maplibregl-compact-show")?(this._container.setAttribute("open",""),this._container.classList.remove("maplibregl-compact-show")):(this._container.classList.add("maplibregl-compact-show"),this._container.removeAttribute("open")))},this._updateData=r=>{!r||r.sourceDataType!=="metadata"&&r.sourceDataType!=="visibility"&&r.dataType!=="style"&&r.type!=="terrain"||this._updateAttributions()},this._updateCompact=()=>{this._map.getCanvasContainer().offsetWidth<=640||this._compact?this._compact===!1?this._container.setAttribute("open",""):this._container.classList.contains("maplibregl-compact")||this._container.classList.contains("maplibregl-attrib-empty")||(this._container.setAttribute("open",""),this._container.classList.add("maplibregl-compact","maplibregl-compact-show")):(this._container.setAttribute("open",""),this._container.classList.contains("maplibregl-compact")&&this._container.classList.remove("maplibregl-compact","maplibregl-compact-show"))},this._updateCompactMinimize=()=>{this._container.classList.contains("maplibregl-compact")&&this._container.classList.contains("maplibregl-compact-show")&&this._container.classList.remove("maplibregl-compact-show")},this.options=e}getDefaultPosition(){return"bottom-right"}onAdd(e){return this._map=e,this._compact=this.options.compact,this._container=C.create("details","maplibregl-ctrl maplibregl-ctrl-attrib"),this._compactButton=C.create("summary","maplibregl-ctrl-attrib-button",this._container),this._compactButton.addEventListener("click",this._toggleAttribution),this._setElementTitle(this._compactButton,"ToggleAttribution"),this._innerContainer=C.create("div","maplibregl-ctrl-attrib-inner",this._container),this._updateAttributions(),this._updateCompact(),this._map.on("styledata",this._updateData),this._map.on("sourcedata",this._updateData),this._map.on("terrain",this._updateData),this._map.on("resize",this._updateCompact),this._map.on("drag",this._updateCompactMinimize),this._container}onRemove(){C.remove(this._container),this._map.off("styledata",this._updateData),this._map.off("sourcedata",this._updateData),this._map.off("terrain",this._updateData),this._map.off("resize",this._updateCompact),this._map.off("drag",this._updateCompactMinimize),this._map=void 0,this._compact=void 0,this._attribHTML=void 0}_setElementTitle(e,r){const a=this._map._getUIString(`AttributionControl.${r}`);e.title=a,e.setAttribute("aria-label",a)}_updateAttributions(){if(!this._map.style)return;let e=[];if(this.options.customAttribution&&(Array.isArray(this.options.customAttribution)?e=e.concat(this.options.customAttribution.map(l=>typeof l!="string"?"":l)):typeof this.options.customAttribution=="string"&&e.push(this.options.customAttribution)),this._map.style.stylesheet){const l=this._map.style.stylesheet;this.styleOwner=l.owner,this.styleId=l.id}const r=this._map.style.sourceCaches;for(const l in r){const h=r[l];if(h.used||h.usedForTerrain){const g=h.getSource();g.attribution&&e.indexOf(g.attribution)<0&&e.push(g.attribution)}}e=e.filter(l=>String(l).trim()),e.sort((l,h)=>l.length-h.length),e=e.filter((l,h)=>{for(let g=h+1;g<e.length;g++)if(e[g].indexOf(l)>=0)return!1;return!0});const a=e.join(" | ");a!==this._attribHTML&&(this._attribHTML=a,e.length?(this._innerContainer.innerHTML=C.sanitize(a),this._container.classList.remove("maplibregl-attrib-empty")):this._container.classList.add("maplibregl-attrib-empty"),this._updateCompact(),this._editLink=null)}}class Ds{constructor(e={}){this._updateCompact=()=>{const r=this._container.children;if(r.length){const a=r[0];this._map.getCanvasContainer().offsetWidth<=640||this._compact?this._compact!==!1&&a.classList.add("maplibregl-compact"):a.classList.remove("maplibregl-compact")}},this.options=e}getDefaultPosition(){return"bottom-left"}onAdd(e){this._map=e,this._compact=this.options&&this.options.compact,this._container=C.create("div","maplibregl-ctrl");const r=C.create("a","maplibregl-ctrl-logo");return r.target="_blank",r.rel="noopener nofollow",r.href="https://maplibre.org/",r.setAttribute("aria-label",this._map._getUIString("LogoControl.Title")),r.setAttribute("rel","noopener nofollow"),this._container.appendChild(r),this._container.style.display="block",this._map.on("resize",this._updateCompact),this._updateCompact(),this._container}onRemove(){C.remove(this._container),this._map.off("resize",this._updateCompact),this._map=void 0,this._compact=void 0}}class Kl{constructor(){this._queue=[],this._id=0,this._cleared=!1,this._currentlyRunning=!1}add(e){const r=++this._id;return this._queue.push({callback:e,id:r,cancelled:!1}),r}remove(e){const r=this._currentlyRunning,a=r?this._queue.concat(r):this._queue;for(const l of a)if(l.id===e)return void(l.cancelled=!0)}run(e=0){if(this._currentlyRunning)throw new Error("Attempting to run(), but is already running.");const r=this._currentlyRunning=this._queue;this._queue=[];for(const a of r)if(!a.cancelled&&(a.callback(e),this._cleared))break;this._cleared=!1,this._currentlyRunning=!1}clear(){this._currentlyRunning&&(this._cleared=!0),this._queue=[]}}var Yu=o.aG([{name:"a_pos3d",type:"Int16",components:3}]);class $u extends o.E{constructor(e){super(),this._lastTilesetChange=M.now(),this.sourceCache=e,this._tiles={},this._renderableTilesKeys=[],this._sourceTileCache={},this.minzoom=0,this.maxzoom=22,this.deltaZoom=1,this.tileSize=e._source.tileSize*2**this.deltaZoom,e.usedForTerrain=!0,e.tileSize=this.tileSize}destruct(){this.sourceCache.usedForTerrain=!1,this.sourceCache.tileSize=null}update(e,r){this.sourceCache.update(e,r),this._renderableTilesKeys=[];const a={};for(const l of Te(e,{tileSize:this.tileSize,minzoom:this.minzoom,maxzoom:this.maxzoom,reparseOverscaled:!1,terrain:r,calculateTileZoom:this.sourceCache._source.calculateTileZoom}))a[l.key]=!0,this._renderableTilesKeys.push(l.key),this._tiles[l.key]||(l.terrainRttPosMatrix32f=new Float64Array(16),o.bQ(l.terrainRttPosMatrix32f,0,o.Z,o.Z,0,0,1),this._tiles[l.key]=new wr(l,this.tileSize),this._lastTilesetChange=M.now());for(const l in this._tiles)a[l]||delete this._tiles[l]}freeRtt(e){for(const r in this._tiles){const a=this._tiles[r];(!e||a.tileID.equals(e)||a.tileID.isChildOf(e)||e.isChildOf(a.tileID))&&(a.rtt=[])}}getRenderableTiles(){return this._renderableTilesKeys.map(e=>this.getTileByID(e))}getTileByID(e){return this._tiles[e]}getTerrainCoords(e,r){return r?this._getTerrainCoordsForTileRanges(e,r):this._getTerrainCoordsForRegularTile(e)}_getTerrainCoordsForRegularTile(e){const r={};for(const a of this._renderableTilesKeys){const l=this._tiles[a].tileID,h=e.clone(),g=o.b2();if(l.canonical.equals(e.canonical))o.bQ(g,0,o.Z,o.Z,0,0,1);else if(l.canonical.isChildOf(e.canonical)){const b=l.canonical.z-e.canonical.z,A=l.canonical.x-(l.canonical.x>>b<<b),I=l.canonical.y-(l.canonical.y>>b<<b),z=o.Z>>b;o.bQ(g,0,z,z,0,0,1),o.L(g,g,[-A*z,-I*z,0])}else{if(!e.canonical.isChildOf(l.canonical))continue;{const b=e.canonical.z-l.canonical.z,A=e.canonical.x-(e.canonical.x>>b<<b),I=e.canonical.y-(e.canonical.y>>b<<b),z=o.Z>>b;o.bQ(g,0,o.Z,o.Z,0,0,1),o.L(g,g,[A*z,I*z,0]),o.M(g,g,[1/2**b,1/2**b,0])}}h.terrainRttPosMatrix32f=new Float32Array(g),r[a]=h}return r}_getTerrainCoordsForTileRanges(e,r){const a={};for(const l of this._renderableTilesKeys){const h=this._tiles[l].tileID;if(!this._isWithinTileRanges(h,r))continue;const g=e.clone(),b=o.b2();if(h.canonical.z===e.canonical.z){const A=e.canonical.x-h.canonical.x,I=e.canonical.y-h.canonical.y;o.bQ(b,0,o.Z,o.Z,0,0,1),o.L(b,b,[A*o.Z,I*o.Z,0])}else if(h.canonical.z>e.canonical.z){const A=h.canonical.z-e.canonical.z,I=h.canonical.x-(h.canonical.x>>A<<A),z=h.canonical.y-(h.canonical.y>>A<<A),F=e.canonical.x-(h.canonical.x>>A),O=e.canonical.y-(h.canonical.y>>A),Z=o.Z>>A;o.bQ(b,0,Z,Z,0,0,1),o.L(b,b,[-I*Z+F*o.Z,-z*Z+O*o.Z,0])}else{const A=e.canonical.z-h.canonical.z,I=e.canonical.x-(e.canonical.x>>A<<A),z=e.canonical.y-(e.canonical.y>>A<<A),F=(e.canonical.x>>A)-h.canonical.x,O=(e.canonical.y>>A)-h.canonical.y,Z=o.Z<<A;o.bQ(b,0,Z,Z,0,0,1),o.L(b,b,[I*o.Z+F*Z,z*o.Z+O*Z,0])}g.terrainRttPosMatrix32f=new Float32Array(b),a[l]=g}return a}getSourceTile(e,r){const a=this.sourceCache._source;let l=e.overscaledZ-this.deltaZoom;if(l>a.maxzoom&&(l=a.maxzoom),l<a.minzoom)return null;this._sourceTileCache[e.key]||(this._sourceTileCache[e.key]=e.scaledTo(l).key);let h=this.sourceCache.getTileByID(this._sourceTileCache[e.key]);if((!h||!h.dem)&&r)for(;l>=a.minzoom&&(!h||!h.dem);)h=this.sourceCache.getTileByID(e.scaledTo(l--).key);return h}anyTilesAfterTime(e=Date.now()){return this._lastTilesetChange>=e}_isWithinTileRanges(e,r){return r[e.canonical.z]&&e.canonical.x>=r[e.canonical.z].minTileX&&e.canonical.x<=r[e.canonical.z].maxTileX&&e.canonical.y>=r[e.canonical.z].minTileY&&e.canonical.y<=r[e.canonical.z].maxTileY}}class eh{constructor(e,r,a){this._meshCache={},this.painter=e,this.sourceCache=new $u(r),this.options=a,this.exaggeration=typeof a.exaggeration=="number"?a.exaggeration:1,this.qualityFactor=2,this.meshSize=128,this._demMatrixCache={},this.coordsIndex=[],this._coordsTextureSize=1024}getDEMElevation(e,r,a,l=o.Z){var h;if(!(r>=0&&r<l&&a>=0&&a<l))return 0;const g=this.getTerrainData(e),b=(h=g.tile)===null||h===void 0?void 0:h.dem;if(!b)return 0;const A=o.cj([],[r/l*o.Z,a/l*o.Z],g.u_terrain_matrix),I=[A[0]*b.dim,A[1]*b.dim],z=Math.floor(I[0]),F=Math.floor(I[1]),O=I[0]-z,Z=I[1]-F;return b.get(z,F)*(1-O)*(1-Z)+b.get(z+1,F)*O*(1-Z)+b.get(z,F+1)*(1-O)*Z+b.get(z+1,F+1)*O*Z}getElevationForLngLatZoom(e,r){if(!o.ck(r,e.wrap()))return 0;const{tileID:a,mercatorX:l,mercatorY:h}=this._getOverscaledTileIDFromLngLatZoom(e,r);return this.getElevation(a,l%o.Z,h%o.Z,o.Z)}getElevation(e,r,a,l=o.Z){return this.getDEMElevation(e,r,a,l)*this.exaggeration}getTerrainData(e){if(!this._emptyDemTexture){const l=this.painter.context,h=new o.R({width:1,height:1},new Uint8Array(4));this._emptyDepthTexture=new rt(l,h,l.gl.RGBA,{premultiply:!1}),this._emptyDemUnpack=[0,0,0,0],this._emptyDemTexture=new rt(l,new o.R({width:1,height:1}),l.gl.RGBA,{premultiply:!1}),this._emptyDemTexture.bind(l.gl.NEAREST,l.gl.CLAMP_TO_EDGE),this._emptyDemMatrix=o.ad([])}const r=this.sourceCache.getSourceTile(e,!0);if(r&&r.dem&&(!r.demTexture||r.needsTerrainPrepare)){const l=this.painter.context;r.demTexture=this.painter.getTileTexture(r.dem.stride),r.demTexture?r.demTexture.update(r.dem.getPixels(),{premultiply:!1}):r.demTexture=new rt(l,r.dem.getPixels(),l.gl.RGBA,{premultiply:!1}),r.demTexture.bind(l.gl.NEAREST,l.gl.CLAMP_TO_EDGE),r.needsTerrainPrepare=!1}const a=r&&r+r.tileID.key+e.key;if(a&&!this._demMatrixCache[a]){const l=this.sourceCache.sourceCache._source.maxzoom;let h=e.canonical.z-r.tileID.canonical.z;e.overscaledZ>e.canonical.z&&(e.canonical.z>=l?h=e.canonical.z-l:o.w("cannot calculate elevation if elevation maxzoom > source.maxzoom"));const g=e.canonical.x-(e.canonical.x>>h<<h),b=e.canonical.y-(e.canonical.y>>h<<h),A=o.cl(new Float64Array(16),[1/(o.Z<<h),1/(o.Z<<h),0]);o.L(A,A,[g*o.Z,b*o.Z,0]),this._demMatrixCache[e.key]={matrix:A,coord:e}}return{u_depth:2,u_terrain:3,u_terrain_dim:r&&r.dem&&r.dem.dim||1,u_terrain_matrix:a?this._demMatrixCache[e.key].matrix:this._emptyDemMatrix,u_terrain_unpack:r&&r.dem&&r.dem.getUnpackVector()||this._emptyDemUnpack,u_terrain_exaggeration:this.exaggeration,texture:(r&&r.demTexture||this._emptyDemTexture).texture,depthTexture:(this._fboDepthTexture||this._emptyDepthTexture).texture,tile:r}}getFramebuffer(e){const r=this.painter,a=r.width/devicePixelRatio,l=r.height/devicePixelRatio;return!this._fbo||this._fbo.width===a&&this._fbo.height===l||(this._fbo.destroy(),this._fboCoordsTexture.destroy(),this._fboDepthTexture.destroy(),delete this._fbo,delete this._fboDepthTexture,delete this._fboCoordsTexture),this._fboCoordsTexture||(this._fboCoordsTexture=new rt(r.context,{width:a,height:l,data:null},r.context.gl.RGBA,{premultiply:!1}),this._fboCoordsTexture.bind(r.context.gl.NEAREST,r.context.gl.CLAMP_TO_EDGE)),this._fboDepthTexture||(this._fboDepthTexture=new rt(r.context,{width:a,height:l,data:null},r.context.gl.RGBA,{premultiply:!1}),this._fboDepthTexture.bind(r.context.gl.NEAREST,r.context.gl.CLAMP_TO_EDGE)),this._fbo||(this._fbo=r.context.createFramebuffer(a,l,!0,!1),this._fbo.depthAttachment.set(r.context.createRenderbuffer(r.context.gl.DEPTH_COMPONENT16,a,l))),this._fbo.colorAttachment.set(e==="coords"?this._fboCoordsTexture.texture:this._fboDepthTexture.texture),this._fbo}getCoordsTexture(){const e=this.painter.context;if(this._coordsTexture)return this._coordsTexture;const r=new Uint8Array(this._coordsTextureSize*this._coordsTextureSize*4);for(let h=0,g=0;h<this._coordsTextureSize;h++)for(let b=0;b<this._coordsTextureSize;b++,g+=4)r[g+0]=255&b,r[g+1]=255&h,r[g+2]=b>>8<<4|h>>8,r[g+3]=0;const a=new o.R({width:this._coordsTextureSize,height:this._coordsTextureSize},new Uint8Array(r.buffer)),l=new rt(e,a,e.gl.RGBA,{premultiply:!1});return l.bind(e.gl.NEAREST,e.gl.CLAMP_TO_EDGE),this._coordsTexture=l,l}pointCoordinate(e){this.painter.maybeDrawDepthAndCoords(!0);const r=new Uint8Array(4),a=this.painter.context,l=a.gl,h=Math.round(e.x*this.painter.pixelRatio/devicePixelRatio),g=Math.round(e.y*this.painter.pixelRatio/devicePixelRatio),b=Math.round(this.painter.height/devicePixelRatio);a.bindFramebuffer.set(this.getFramebuffer("coords").framebuffer),l.readPixels(h,b-g-1,1,1,l.RGBA,l.UNSIGNED_BYTE,r),a.bindFramebuffer.set(null);const A=r[0]+(r[2]>>4<<8),I=r[1]+((15&r[2])<<8),z=this.coordsIndex[255-r[3]],F=z&&this.sourceCache.getTileByID(z);if(!F)return null;const O=this._coordsTextureSize,Z=(1<<F.tileID.canonical.z)*O;return new o.$((F.tileID.canonical.x*O+A)/Z+F.tileID.wrap,(F.tileID.canonical.y*O+I)/Z,this.getElevation(F.tileID,A,I,O))}depthAtPoint(e){const r=new Uint8Array(4),a=this.painter.context,l=a.gl;return a.bindFramebuffer.set(this.getFramebuffer("depth").framebuffer),l.readPixels(e.x,this.painter.height/devicePixelRatio-e.y-1,1,1,l.RGBA,l.UNSIGNED_BYTE,r),a.bindFramebuffer.set(null),(r[0]/16777216+r[1]/65536+r[2]/256+r[3])/256}getTerrainMesh(e){var r;const a=((r=this.painter.style.projection)===null||r===void 0?void 0:r.transitionState)>0,l=a&&e.canonical.y===0,h=a&&e.canonical.y===(1<<e.canonical.z)-1,g=`m_${l?"n":""}_${h?"s":""}`;if(this._meshCache[g])return this._meshCache[g];const b=this.painter.context,A=new o.cm,I=new o.aK,z=this.meshSize,F=o.Z/z,O=z*z;for(let we=0;we<=z;we++)for(let Le=0;Le<=z;Le++)A.emplaceBack(Le*F,we*F,0);for(let we=0;we<O;we+=z+1)for(let Le=0;Le<z;Le++)I.emplaceBack(Le+we,z+Le+we+1,z+Le+we+2),I.emplaceBack(Le+we,z+Le+we+2,Le+we+1);const Z=A.length,J=Z+(z+1),oe=(z+1)*z,ne=l?o.b9:0,se=l?0:1,de=h?o.ba:o.Z,_e=h?0:1;for(let we=0;we<=z;we++)A.emplaceBack(we*F,ne,se);for(let we=0;we<=z;we++)A.emplaceBack(we*F,de,_e);for(let we=0;we<z;we++)I.emplaceBack(oe+we,J+we,J+we+1),I.emplaceBack(oe+we,J+we+1,oe+we+1),I.emplaceBack(0+we,Z+we+1,Z+we),I.emplaceBack(0+we,0+we+1,Z+we+1);const ye=A.length,be=ye+2*(z+1);for(const we of[0,1])for(let Le=0;Le<=z;Le++)for(const We of[0,1])A.emplaceBack(we*o.Z,Le*F,We);for(let we=0;we<2*z;we+=2)I.emplaceBack(ye+we,ye+we+1,ye+we+3),I.emplaceBack(ye+we,ye+we+3,ye+we+2),I.emplaceBack(be+we,be+we+3,be+we+1),I.emplaceBack(be+we,be+we+2,be+we+3);const ke=new zn(b.createVertexBuffer(A,Yu.members),b.createIndexBuffer(I),o.aJ.simpleSegment(0,0,A.length,I.length));return this._meshCache[g]=ke,ke}getMeshFrameDelta(e){return 2*Math.PI*o.bu/Math.pow(2,Math.max(e,0))/5}getMinTileElevationForLngLatZoom(e,r){var a;const{tileID:l}=this._getOverscaledTileIDFromLngLatZoom(e,r);return(a=this.getMinMaxElevation(l).minElevation)!==null&&a!==void 0?a:0}getMinMaxElevation(e){const r=this.getTerrainData(e).tile,a={minElevation:null,maxElevation:null};return r&&r.dem&&(a.minElevation=r.dem.min*this.exaggeration,a.maxElevation=r.dem.max*this.exaggeration),a}_getOverscaledTileIDFromLngLatZoom(e,r){const a=o.$.fromLngLat(e.wrap()),l=(1<<r)*o.Z,h=a.x*l,g=a.y*l,b=Math.floor(h/o.Z),A=Math.floor(g/o.Z);return{tileID:new o.Y(r,0,r,b,A),mercatorX:h,mercatorY:g}}}class kp{constructor(e,r,a){this._context=e,this._size=r,this._tileSize=a,this._objects=[],this._recentlyUsed=[],this._stamp=0}destruct(){for(const e of this._objects)e.texture.destroy(),e.fbo.destroy()}_createObject(e){const r=this._context.createFramebuffer(this._tileSize,this._tileSize,!0,!0),a=new rt(this._context,{width:this._tileSize,height:this._tileSize,data:null},this._context.gl.RGBA);return a.bind(this._context.gl.LINEAR,this._context.gl.CLAMP_TO_EDGE),this._context.extTextureFilterAnisotropic&&this._context.gl.texParameterf(this._context.gl.TEXTURE_2D,this._context.extTextureFilterAnisotropic.TEXTURE_MAX_ANISOTROPY_EXT,this._context.extTextureFilterAnisotropicMax),r.depthAttachment.set(this._context.createRenderbuffer(this._context.gl.DEPTH_STENCIL,this._tileSize,this._tileSize)),r.colorAttachment.set(a.texture),{id:e,fbo:r,texture:a,stamp:-1,inUse:!1}}getObjectForId(e){return this._objects[e]}useObject(e){e.inUse=!0,this._recentlyUsed=this._recentlyUsed.filter(r=>e.id!==r),this._recentlyUsed.push(e.id)}stampObject(e){e.stamp=++this._stamp}getOrCreateFreeObject(){for(const r of this._recentlyUsed)if(!this._objects[r].inUse)return this._objects[r];if(this._objects.length>=this._size)throw new Error("No free RenderPool available, call freeAllObjects() required!");const e=this._createObject(this._objects.length);return this._objects.push(e),e}freeObject(e){e.inUse=!1}freeAllObjects(){for(const e of this._objects)this.freeObject(e)}isFull(){return!(this._objects.length<this._size)&&this._objects.some(e=>!e.inUse)===!1}}const Ei={background:!0,fill:!0,line:!0,raster:!0,hillshade:!0};class Ua{constructor(e,r){this.painter=e,this.terrain=r,this.pool=new kp(e.context,30,r.sourceCache.tileSize*r.qualityFactor)}destruct(){this.pool.destruct()}getTexture(e){return this.pool.getObjectForId(e.rtt[this._stacks.length-1].id).texture}prepareForRender(e,r){this._stacks=[],this._prevType=null,this._rttTiles=[],this._renderableTiles=this.terrain.sourceCache.getRenderableTiles(),this._renderableLayerIds=e._order.filter(a=>!e._layers[a].isHidden(r)),this._coordsAscending={};for(const a in e.sourceCaches){this._coordsAscending[a]={};const l=e.sourceCaches[a].getVisibleCoordinates(),h=e.sourceCaches[a].getSource(),g=h instanceof mr?h.terrainTileRanges:null;for(const b of l){const A=this.terrain.sourceCache.getTerrainCoords(b,g);for(const I in A)this._coordsAscending[a][I]||(this._coordsAscending[a][I]=[]),this._coordsAscending[a][I].push(A[I])}}this._coordsAscendingStr={};for(const a of e._order){const l=e._layers[a],h=l.source;if(Ei[l.type]&&!this._coordsAscendingStr[h]){this._coordsAscendingStr[h]={};for(const g in this._coordsAscending[h])this._coordsAscendingStr[h][g]=this._coordsAscending[h][g].map(b=>b.key).sort().join()}}for(const a of this._renderableTiles)for(const l in this._coordsAscendingStr){const h=this._coordsAscendingStr[l][a.tileID.key];h&&h!==a.rttCoords[l]&&(a.rtt=[])}}renderLayer(e,r){if(e.isHidden(this.painter.transform.zoom))return!1;const a=Object.assign(Object.assign({},r),{isRenderingToTexture:!0}),l=e.type,h=this.painter,g=this._renderableLayerIds[this._renderableLayerIds.length-1]===e.id;if(Ei[l]&&(this._prevType&&Ei[this._prevType]||this._stacks.push([]),this._prevType=l,this._stacks[this._stacks.length-1].push(e.id),!g))return!0;if(Ei[this._prevType]||Ei[l]&&g){this._prevType=l;const b=this._stacks.length-1,A=this._stacks[b]||[];for(const I of this._renderableTiles){if(this.pool.isFull()&&(to(this.painter,this.terrain,this._rttTiles,a),this._rttTiles=[],this.pool.freeAllObjects()),this._rttTiles.push(I),I.rtt[b]){const F=this.pool.getObjectForId(I.rtt[b].id);if(F.stamp===I.rtt[b].stamp){this.pool.useObject(F);continue}}const z=this.pool.getOrCreateFreeObject();this.pool.useObject(z),this.pool.stampObject(z),I.rtt[b]={id:z.id,stamp:z.stamp},h.context.bindFramebuffer.set(z.fbo.framebuffer),h.context.clear({color:o.b7.transparent,stencil:0}),h.currentStencilSource=void 0;for(let F=0;F<A.length;F++){const O=h.style._layers[A[F]],Z=O.source?this._coordsAscending[O.source][I.tileID.key]:[I.tileID];h.context.viewport.set([0,0,z.fbo.width,z.fbo.height]),h._renderTileClippingMasks(O,Z,!0),h.renderLayer(h,h.style.sourceCaches[O.source],O,Z,a),O.source&&(I.rttCoords[O.source]=this._coordsAscendingStr[O.source][I.tileID.key])}}return to(this.painter,this.terrain,this._rttTiles,a),this._rttTiles=[],this.pool.freeAllObjects(),Ei[l]}return!1}}const Ct={"AttributionControl.ToggleAttribution":"Toggle attribution","AttributionControl.MapFeedback":"Map feedback","FullscreenControl.Enter":"Enter fullscreen","FullscreenControl.Exit":"Exit fullscreen","GeolocateControl.FindMyLocation":"Find my location","GeolocateControl.LocationNotAvailable":"Location not available","LogoControl.Title":"MapLibre logo","Map.Title":"Map","Marker.Title":"Map marker","NavigationControl.ResetBearing":"Reset bearing to north","NavigationControl.ZoomIn":"Zoom in","NavigationControl.ZoomOut":"Zoom out","Popup.Close":"Close popup","ScaleControl.Feet":"ft","ScaleControl.Meters":"m","ScaleControl.Kilometers":"km","ScaleControl.Miles":"mi","ScaleControl.NauticalMiles":"nm","GlobeControl.Enable":"Enable globe","GlobeControl.Disable":"Disable globe","TerrainControl.Enable":"Enable terrain","TerrainControl.Disable":"Disable terrain","CooperativeGesturesHandler.WindowsHelpText":"Use Ctrl + scroll to zoom the map","CooperativeGesturesHandler.MacHelpText":"Use ⌘ + scroll to zoom the map","CooperativeGesturesHandler.MobileHelpText":"Use two fingers to move the map"},zt=B,zs={hash:!1,interactive:!0,bearingSnap:7,attributionControl:Nn,maplibreLogo:!1,refreshExpiredTiles:!0,canvasContextAttributes:{antialias:!1,preserveDrawingBuffer:!1,powerPreference:"high-performance",failIfMajorPerformanceCaveat:!1,desynchronized:!1,contextType:void 0},scrollZoom:!0,minZoom:-2,maxZoom:22,minPitch:0,maxPitch:60,boxZoom:!0,dragRotate:!0,dragPan:!0,keyboard:!0,doubleClickZoom:!0,touchZoomRotate:!0,touchPitch:!0,cooperativeGestures:!1,trackResize:!0,center:[0,0],elevation:0,zoom:0,bearing:0,pitch:0,roll:0,renderWorldCopies:!0,maxTileCacheSize:null,maxTileCacheZoomLevels:o.a.MAX_TILE_CACHE_ZOOM_LEVELS,transformRequest:null,transformCameraUpdate:null,fadeDuration:300,crossSourceCollisions:!0,clickTolerance:3,localIdeographFontFamily:"sans-serif",pitchWithRotate:!0,rollEnabled:!1,validateStyle:!0,maxCanvasSize:[4096,4096],cancelPendingTileRequestsWhileZooming:!0,centerClampedToGround:!0},Gl={showCompass:!0,showZoom:!0,visualizePitch:!1,visualizeRoll:!0};class Jl{constructor(e,r,a=!1){this.mousedown=h=>{this.startMove(h,C.mousePos(this.element,h)),C.addEventListener(window,"mousemove",this.mousemove),C.addEventListener(window,"mouseup",this.mouseup)},this.mousemove=h=>{this.move(h,C.mousePos(this.element,h))},this.mouseup=h=>{this._rotatePitchHanlder.dragEnd(h),this.offTemp()},this.touchstart=h=>{h.targetTouches.length!==1?this.reset():(this._startPos=this._lastPos=C.touchPos(this.element,h.targetTouches)[0],this.startMove(h,this._startPos),C.addEventListener(window,"touchmove",this.touchmove,{passive:!1}),C.addEventListener(window,"touchend",this.touchend))},this.touchmove=h=>{h.targetTouches.length!==1?this.reset():(this._lastPos=C.touchPos(this.element,h.targetTouches)[0],this.move(h,this._lastPos))},this.touchend=h=>{h.targetTouches.length===0&&this._startPos&&this._lastPos&&this._startPos.dist(this._lastPos)<this._clickTolerance&&this.element.click(),delete this._startPos,delete this._lastPos,this.offTemp()},this.reset=()=>{this._rotatePitchHanlder.reset(),delete this._startPos,delete this._lastPos,this.offTemp()},this._clickTolerance=10,this.element=r;const l=new Wo;this._rotatePitchHanlder=new ki({clickTolerance:3,move:(h,g)=>{const b=r.getBoundingClientRect(),A=new o.P((b.bottom-b.top)/2,(b.right-b.left)/2);return{bearingDelta:o.ce(new o.P(h.x,g.y),g,A),pitchDelta:a?-.5*(g.y-h.y):void 0}},moveStateManager:l,enable:!0,assignEvents:()=>{}}),this.map=e,C.addEventListener(r,"mousedown",this.mousedown),C.addEventListener(r,"touchstart",this.touchstart,{passive:!1}),C.addEventListener(r,"touchcancel",this.reset)}startMove(e,r){this._rotatePitchHanlder.dragStart(e,r),C.disableDrag()}move(e,r){const a=this.map,{bearingDelta:l,pitchDelta:h}=this._rotatePitchHanlder.dragMove(e,r)||{};l&&a.setBearing(a.getBearing()+l),h&&a.setPitch(a.getPitch()+h)}off(){const e=this.element;C.removeEventListener(e,"mousedown",this.mousedown),C.removeEventListener(e,"touchstart",this.touchstart,{passive:!1}),C.removeEventListener(window,"touchmove",this.touchmove,{passive:!1}),C.removeEventListener(window,"touchend",this.touchend),C.removeEventListener(e,"touchcancel",this.reset),this.offTemp()}offTemp(){C.enableDrag(),C.removeEventListener(window,"mousemove",this.mousemove),C.removeEventListener(window,"mouseup",this.mouseup),C.removeEventListener(window,"touchmove",this.touchmove,{passive:!1}),C.removeEventListener(window,"touchend",this.touchend)}}let Gr;function Xl(u,e,r,a=!1){if(a||!r.getCoveringTilesDetailsProvider().allowWorldCopies())return u==null?void 0:u.wrap();const l=new o.Q(u.lng,u.lat);if(u=new o.Q(u.lng,u.lat),e){const h=new o.Q(u.lng-360,u.lat),g=new o.Q(u.lng+360,u.lat),b=r.locationToScreenPoint(u).distSqr(e);r.locationToScreenPoint(h).distSqr(e)<b?u=h:r.locationToScreenPoint(g).distSqr(e)<b&&(u=g)}for(;Math.abs(u.lng-r.center.lng)>180;){const h=r.locationToScreenPoint(u);if(h.x>=0&&h.y>=0&&h.x<=r.width&&h.y<=r.height)break;u.lng>r.center.lng?u.lng-=360:u.lng+=360}return u.lng!==l.lng&&r.isPointOnMapSurface(r.locationToScreenPoint(u))?u:l}const tn={center:"translate(-50%,-50%)",top:"translate(-50%,0)","top-left":"translate(0,0)","top-right":"translate(-100%,0)",bottom:"translate(-50%,-100%)","bottom-left":"translate(0,-100%)","bottom-right":"translate(-100%,-100%)",left:"translate(0,-50%)",right:"translate(-100%,-50%)"};function th(u,e,r){const a=u.classList;for(const l in tn)a.remove(`maplibregl-${r}-anchor-${l}`);a.add(`maplibregl-${r}-anchor-${e}`)}class Co extends o.E{constructor(e){if(super(),this._onKeyPress=r=>{const a=r.code,l=r.charCode||r.keyCode;a!=="Space"&&a!=="Enter"&&l!==32&&l!==13||this.togglePopup()},this._onMapClick=r=>{const a=r.originalEvent.target,l=this._element;this._popup&&(a===l||l.contains(a))&&this.togglePopup()},this._update=r=>{if(!this._map)return;const a=this._map.loaded()&&!this._map.isMoving();((r==null?void 0:r.type)==="terrain"||(r==null?void 0:r.type)==="render"&&!a)&&this._map.once("render",this._update),this._lngLat=Xl(this._lngLat,this._flatPos,this._map.transform),this._flatPos=this._pos=this._map.project(this._lngLat)._add(this._offset),this._map.terrain&&(this._flatPos=this._map.transform.locationToScreenPoint(this._lngLat)._add(this._offset));let l="";this._rotationAlignment==="viewport"||this._rotationAlignment==="auto"?l=`rotateZ(${this._rotation}deg)`:this._rotationAlignment==="map"&&(l=`rotateZ(${this._rotation-this._map.getBearing()}deg)`);let h="";this._pitchAlignment==="viewport"||this._pitchAlignment==="auto"?h="rotateX(0deg)":this._pitchAlignment==="map"&&(h=`rotateX(${this._map.getPitch()}deg)`),this._subpixelPositioning||r&&r.type!=="moveend"||(this._pos=this._pos.round()),C.setTransform(this._element,`${tn[this._anchor]} translate(${this._pos.x}px, ${this._pos.y}px) ${h} ${l}`),M.frameAsync(new AbortController).then(()=>{this._updateOpacity(r&&r.type==="moveend")}).catch(()=>{})},this._onMove=r=>{if(!this._isDragging){const a=this._clickTolerance||this._map._clickTolerance;this._isDragging=r.point.dist(this._pointerdownPos)>=a}this._isDragging&&(this._pos=r.point.sub(this._positionDelta),this._lngLat=this._map.unproject(this._pos),this.setLngLat(this._lngLat),this._element.style.pointerEvents="none",this._state==="pending"&&(this._state="active",this.fire(new o.l("dragstart"))),this.fire(new o.l("drag")))},this._onUp=()=>{this._element.style.pointerEvents="auto",this._positionDelta=null,this._pointerdownPos=null,this._isDragging=!1,this._map.off("mousemove",this._onMove),this._map.off("touchmove",this._onMove),this._state==="active"&&this.fire(new o.l("dragend")),this._state="inactive"},this._addDragHandler=r=>{this._element.contains(r.originalEvent.target)&&(r.preventDefault(),this._positionDelta=r.point.sub(this._pos).add(this._offset),this._pointerdownPos=r.point,this._state="pending",this._map.on("mousemove",this._onMove),this._map.on("touchmove",this._onMove),this._map.once("mouseup",this._onUp),this._map.once("touchend",this._onUp))},this._anchor=e&&e.anchor||"center",this._color=e&&e.color||"#3FB1CE",this._scale=e&&e.scale||1,this._draggable=e&&e.draggable||!1,this._clickTolerance=e&&e.clickTolerance||0,this._subpixelPositioning=e&&e.subpixelPositioning||!1,this._isDragging=!1,this._state="inactive",this._rotation=e&&e.rotation||0,this._rotationAlignment=e&&e.rotationAlignment||"auto",this._pitchAlignment=e&&e.pitchAlignment&&e.pitchAlignment!=="auto"?e.pitchAlignment:this._rotationAlignment,this.setOpacity(e==null?void 0:e.opacity,e==null?void 0:e.opacityWhenCovered),e&&e.element)this._element=e.element,this._offset=o.P.convert(e&&e.offset||[0,0]);else{this._defaultMarker=!0,this._element=C.create("div");const r=C.createNS("http://www.w3.org/2000/svg","svg"),a=41,l=27;r.setAttributeNS(null,"display","block"),r.setAttributeNS(null,"height",`${a}px`),r.setAttributeNS(null,"width",`${l}px`),r.setAttributeNS(null,"viewBox",`0 0 ${l} ${a}`);const h=C.createNS("http://www.w3.org/2000/svg","g");h.setAttributeNS(null,"stroke","none"),h.setAttributeNS(null,"stroke-width","1"),h.setAttributeNS(null,"fill","none"),h.setAttributeNS(null,"fill-rule","evenodd");const g=C.createNS("http://www.w3.org/2000/svg","g");g.setAttributeNS(null,"fill-rule","nonzero");const b=C.createNS("http://www.w3.org/2000/svg","g");b.setAttributeNS(null,"transform","translate(3.0, 29.0)"),b.setAttributeNS(null,"fill","#000000");const A=[{rx:"10.5",ry:"5.25002273"},{rx:"10.5",ry:"5.25002273"},{rx:"9.5",ry:"4.77275007"},{rx:"8.5",ry:"4.29549936"},{rx:"7.5",ry:"3.81822308"},{rx:"6.5",ry:"3.34094679"},{rx:"5.5",ry:"2.86367051"},{rx:"4.5",ry:"2.38636864"}];for(const se of A){const de=C.createNS("http://www.w3.org/2000/svg","ellipse");de.setAttributeNS(null,"opacity","0.04"),de.setAttributeNS(null,"cx","10.5"),de.setAttributeNS(null,"cy","5.80029008"),de.setAttributeNS(null,"rx",se.rx),de.setAttributeNS(null,"ry",se.ry),b.appendChild(de)}const I=C.createNS("http://www.w3.org/2000/svg","g");I.setAttributeNS(null,"fill",this._color);const z=C.createNS("http://www.w3.org/2000/svg","path");z.setAttributeNS(null,"d","M27,13.5 C27,19.074644 20.250001,27.000002 14.75,34.500002 C14.016665,35.500004 12.983335,35.500004 12.25,34.500002 C6.7499993,27.000002 0,19.222562 0,13.5 C0,6.0441559 6.0441559,0 13.5,0 C20.955844,0 27,6.0441559 27,13.5 Z"),I.appendChild(z);const F=C.createNS("http://www.w3.org/2000/svg","g");F.setAttributeNS(null,"opacity","0.25"),F.setAttributeNS(null,"fill","#000000");const O=C.createNS("http://www.w3.org/2000/svg","path");O.setAttributeNS(null,"d","M13.5,0 C6.0441559,0 0,6.0441559 0,13.5 C0,19.222562 6.7499993,27 12.25,34.5 C13,35.522727 14.016664,35.500004 14.75,34.5 C20.250001,27 27,19.074644 27,13.5 C27,6.0441559 20.955844,0 13.5,0 Z M13.5,1 C20.415404,1 26,6.584596 26,13.5 C26,15.898657 24.495584,19.181431 22.220703,22.738281 C19.945823,26.295132 16.705119,30.142167 13.943359,33.908203 C13.743445,34.180814 13.612715,34.322738 13.5,34.441406 C13.387285,34.322738 13.256555,34.180814 13.056641,33.908203 C10.284481,30.127985 7.4148684,26.314159 5.015625,22.773438 C2.6163816,19.232715 1,15.953538 1,13.5 C1,6.584596 6.584596,1 13.5,1 Z"),F.appendChild(O);const Z=C.createNS("http://www.w3.org/2000/svg","g");Z.setAttributeNS(null,"transform","translate(6.0, 7.0)"),Z.setAttributeNS(null,"fill","#FFFFFF");const J=C.createNS("http://www.w3.org/2000/svg","g");J.setAttributeNS(null,"transform","translate(8.0, 8.0)");const oe=C.createNS("http://www.w3.org/2000/svg","circle");oe.setAttributeNS(null,"fill","#000000"),oe.setAttributeNS(null,"opacity","0.25"),oe.setAttributeNS(null,"cx","5.5"),oe.setAttributeNS(null,"cy","5.5"),oe.setAttributeNS(null,"r","5.4999962");const ne=C.createNS("http://www.w3.org/2000/svg","circle");ne.setAttributeNS(null,"fill","#FFFFFF"),ne.setAttributeNS(null,"cx","5.5"),ne.setAttributeNS(null,"cy","5.5"),ne.setAttributeNS(null,"r","5.4999962"),J.appendChild(oe),J.appendChild(ne),g.appendChild(b),g.appendChild(I),g.appendChild(F),g.appendChild(Z),g.appendChild(J),r.appendChild(g),r.setAttributeNS(null,"height",a*this._scale+"px"),r.setAttributeNS(null,"width",l*this._scale+"px"),this._element.appendChild(r),this._offset=o.P.convert(e&&e.offset||[0,-14])}if(this._element.classList.add("maplibregl-marker"),this._element.addEventListener("dragstart",r=>{r.preventDefault()}),this._element.addEventListener("mousedown",r=>{r.preventDefault()}),th(this._element,this._anchor,"marker"),e&&e.className)for(const r of e.className.split(" "))this._element.classList.add(r);this._popup=null}addTo(e){return this.remove(),this._map=e,this._element.hasAttribute("aria-label")||this._element.setAttribute("aria-label",e._getUIString("Marker.Title")),e.getCanvasContainer().appendChild(this._element),e.on("move",this._update),e.on("moveend",this._update),e.on("terrain",this._update),e.on("projectiontransition",this._update),this.setDraggable(this._draggable),this._update(),this._map.on("click",this._onMapClick),this}remove(){return this._opacityTimeout&&(clearTimeout(this._opacityTimeout),delete this._opacityTimeout),this._map&&(this._map.off("click",this._onMapClick),this._map.off("move",this._update),this._map.off("moveend",this._update),this._map.off("terrain",this._update),this._map.off("projectiontransition",this._update),this._map.off("mousedown",this._addDragHandler),this._map.off("touchstart",this._addDragHandler),this._map.off("mouseup",this._onUp),this._map.off("touchend",this._onUp),this._map.off("mousemove",this._onMove),this._map.off("touchmove",this._onMove),delete this._map),C.remove(this._element),this._popup&&this._popup.remove(),this}getLngLat(){return this._lngLat}setLngLat(e){return this._lngLat=o.Q.convert(e),this._pos=null,this._popup&&this._popup.setLngLat(this._lngLat),this._update(),this}getElement(){return this._element}setPopup(e){if(this._popup&&(this._popup.remove(),this._popup=null,this._element.removeEventListener("keypress",this._onKeyPress),this._originalTabIndex||this._element.removeAttribute("tabindex")),e){if(!("offset"in e.options)){const l=Math.abs(13.5)/Math.SQRT2;e.options.offset=this._defaultMarker?{top:[0,0],"top-left":[0,0],"top-right":[0,0],bottom:[0,-38.1],"bottom-left":[l,-1*(38.1-13.5+l)],"bottom-right":[-l,-1*(38.1-13.5+l)],left:[13.5,-1*(38.1-13.5)],right:[-13.5,-1*(38.1-13.5)]}:this._offset}this._popup=e,this._originalTabIndex=this._element.getAttribute("tabindex"),this._originalTabIndex||this._element.setAttribute("tabindex","0"),this._element.addEventListener("keypress",this._onKeyPress)}return this}setSubpixelPositioning(e){return this._subpixelPositioning=e,this}getPopup(){return this._popup}togglePopup(){const e=this._popup;return this._element.style.opacity===this._opacityWhenCovered?this:e?(e.isOpen()?e.remove():(e.setLngLat(this._lngLat),e.addTo(this._map)),this):this}_updateOpacity(e=!1){var r,a;const l=(r=this._map)===null||r===void 0?void 0:r.terrain,h=this._map.transform.isLocationOccluded(this._lngLat);if(!l||h){const Z=h?this._opacityWhenCovered:this._opacity;return void(this._element.style.opacity!==Z&&(this._element.style.opacity=Z))}if(e)this._opacityTimeout=null;else{if(this._opacityTimeout)return;this._opacityTimeout=setTimeout(()=>{this._opacityTimeout=null},100)}const g=this._map,b=g.terrain.depthAtPoint(this._pos),A=g.terrain.getElevationForLngLatZoom(this._lngLat,g.transform.tileZoom);if(g.transform.lngLatToCameraDepth(this._lngLat,A)-b<.006)return void(this._element.style.opacity=this._opacity);const I=-this._offset.y/g.transform.pixelsPerMeter,z=Math.sin(g.getPitch()*Math.PI/180)*I,F=g.terrain.depthAtPoint(new o.P(this._pos.x,this._pos.y-this._offset.y)),O=g.transform.lngLatToCameraDepth(this._lngLat,A+z)-F>.006;!((a=this._popup)===null||a===void 0)&&a.isOpen()&&O&&this._popup.remove(),this._element.style.opacity=O?this._opacityWhenCovered:this._opacity}getOffset(){return this._offset}setOffset(e){return this._offset=o.P.convert(e),this._update(),this}addClassName(e){this._element.classList.add(e)}removeClassName(e){this._element.classList.remove(e)}toggleClassName(e){return this._element.classList.toggle(e)}setDraggable(e){return this._draggable=!!e,this._map&&(e?(this._map.on("mousedown",this._addDragHandler),this._map.on("touchstart",this._addDragHandler)):(this._map.off("mousedown",this._addDragHandler),this._map.off("touchstart",this._addDragHandler))),this}isDraggable(){return this._draggable}setRotation(e){return this._rotation=e||0,this._update(),this}getRotation(){return this._rotation}setRotationAlignment(e){return this._rotationAlignment=e||"auto",this._update(),this}getRotationAlignment(){return this._rotationAlignment}setPitchAlignment(e){return this._pitchAlignment=e&&e!=="auto"?e:this._rotationAlignment,this._update(),this}getPitchAlignment(){return this._pitchAlignment}setOpacity(e,r){return(this._opacity===void 0||e===void 0&&r===void 0)&&(this._opacity="1",this._opacityWhenCovered="0.2"),e!==void 0&&(this._opacity=e),r!==void 0&&(this._opacityWhenCovered=r),this._map&&this._updateOpacity(!0),this}}const qr={positionOptions:{enableHighAccuracy:!1,maximumAge:0,timeout:6e3},fitBoundsOptions:{maxZoom:15},trackUserLocation:!1,showAccuracyCircle:!0,showUserLocation:!0};let zr=0,Go=!1;const Bs={maxWidth:100,unit:"metric"};function Vs(u,e,r){const a=r&&r.maxWidth||100,l=u._container.clientHeight/2,h=u._container.clientWidth/2,g=u.unproject([h-a/2,l]),b=u.unproject([h+a/2,l]),A=Math.round(u.project(b).x-u.project(g).x),I=Math.min(a,A,u._container.clientWidth),z=g.distanceTo(b);if(r&&r.unit==="imperial"){const F=3.2808*z;F>5280?Eo(e,I,F/5280,u._getUIString("ScaleControl.Miles")):Eo(e,I,F,u._getUIString("ScaleControl.Feet"))}else r&&r.unit==="nautical"?Eo(e,I,z/1852,u._getUIString("ScaleControl.NauticalMiles")):z>=1e3?Eo(e,I,z/1e3,u._getUIString("ScaleControl.Kilometers")):Eo(e,I,z,u._getUIString("ScaleControl.Meters"))}function Eo(u,e,r,a){const l=function(h){const g=Math.pow(10,`${Math.floor(h)}`.length-1);let b=h/g;return b=b>=10?10:b>=5?5:b>=3?3:b>=2?2:b>=1?1:function(A){const I=Math.pow(10,Math.ceil(-Math.log(A)/Math.LN10));return Math.round(A*I)/I}(b),g*b}(r);u.style.width=e*(l/r)+"px",u.innerHTML=`${l} ${a}`}const Ql={closeButton:!0,closeOnClick:!0,focusAfterOpen:!0,className:"",maxWidth:"240px",subpixelPositioning:!1,locationOccludedOpacity:void 0},Yl=["a[href]","[tabindex]:not([tabindex='-1'])","[contenteditable]:not([contenteditable='false'])","button:not([disabled])","input:not([disabled])","select:not([disabled])","textarea:not([disabled])"].join(", ");function Jo(u){if(u){if(typeof u=="number"){const e=Math.round(Math.abs(u)/Math.SQRT2);return{center:new o.P(0,0),top:new o.P(0,u),"top-left":new o.P(e,e),"top-right":new o.P(-e,e),bottom:new o.P(0,-u),"bottom-left":new o.P(e,-e),"bottom-right":new o.P(-e,-e),left:new o.P(u,0),right:new o.P(-u,0)}}if(u instanceof o.P||Array.isArray(u)){const e=o.P.convert(u);return{center:e,top:e,"top-left":e,"top-right":e,bottom:e,"bottom-left":e,"bottom-right":e,left:e,right:e}}return{center:o.P.convert(u.center||[0,0]),top:o.P.convert(u.top||[0,0]),"top-left":o.P.convert(u["top-left"]||[0,0]),"top-right":o.P.convert(u["top-right"]||[0,0]),bottom:o.P.convert(u.bottom||[0,0]),"bottom-left":o.P.convert(u["bottom-left"]||[0,0]),"bottom-right":o.P.convert(u["bottom-right"]||[0,0]),left:o.P.convert(u.left||[0,0]),right:o.P.convert(u.right||[0,0])}}return Jo(new o.P(0,0))}const $l=B;x.AJAXError=o.cq,x.Event=o.l,x.Evented=o.E,x.LngLat=o.Q,x.MercatorCoordinate=o.$,x.Point=o.P,x.addProtocol=o.cr,x.config=o.a,x.removeProtocol=o.cs,x.AttributionControl=Cr,x.BoxZoomHandler=ql,x.CanvasSource=mi,x.CooperativeGesturesHandler=Na,x.DoubleClickZoomHandler=Fa,x.DragPanHandler=Xu,x.DragRotateHandler=Qu,x.EdgeInsets=Fi,x.FullscreenControl=class extends o.E{constructor(u={}){super(),this._onFullscreenChange=()=>{var e;let r=window.document.fullscreenElement||window.document.mozFullScreenElement||window.document.webkitFullscreenElement||window.document.msFullscreenElement;for(;!((e=r==null?void 0:r.shadowRoot)===null||e===void 0)&&e.fullscreenElement;)r=r.shadowRoot.fullscreenElement;r===this._container!==this._fullscreen&&this._handleFullscreenChange()},this._onClickFullscreen=()=>{this._isFullscreen()?this._exitFullscreen():this._requestFullscreen()},this._fullscreen=!1,u&&u.container&&(u.container instanceof HTMLElement?this._container=u.container:o.w("Full screen control 'container' must be a DOM element.")),"onfullscreenchange"in document?this._fullscreenchange="fullscreenchange":"onmozfullscreenchange"in document?this._fullscreenchange="mozfullscreenchange":"onwebkitfullscreenchange"in document?this._fullscreenchange="webkitfullscreenchange":"onmsfullscreenchange"in document&&(this._fullscreenchange="MSFullscreenChange")}onAdd(u){return this._map=u,this._container||(this._container=this._map.getContainer()),this._controlContainer=C.create("div","maplibregl-ctrl maplibregl-ctrl-group"),this._setupUI(),this._controlContainer}onRemove(){C.remove(this._controlContainer),this._map=null,window.document.removeEventListener(this._fullscreenchange,this._onFullscreenChange)}_setupUI(){const u=this._fullscreenButton=C.create("button","maplibregl-ctrl-fullscreen",this._controlContainer);C.create("span","maplibregl-ctrl-icon",u).setAttribute("aria-hidden","true"),u.type="button",this._updateTitle(),this._fullscreenButton.addEventListener("click",this._onClickFullscreen),window.document.addEventListener(this._fullscreenchange,this._onFullscreenChange)}_updateTitle(){const u=this._getTitle();this._fullscreenButton.setAttribute("aria-label",u),this._fullscreenButton.title=u}_getTitle(){return this._map._getUIString(this._isFullscreen()?"FullscreenControl.Exit":"FullscreenControl.Enter")}_isFullscreen(){return this._fullscreen}_handleFullscreenChange(){this._fullscreen=!this._fullscreen,this._fullscreenButton.classList.toggle("maplibregl-ctrl-shrink"),this._fullscreenButton.classList.toggle("maplibregl-ctrl-fullscreen"),this._updateTitle(),this._fullscreen?(this.fire(new o.l("fullscreenstart")),this._prevCooperativeGesturesEnabled=this._map.cooperativeGestures.isEnabled(),this._map.cooperativeGestures.disable()):(this.fire(new o.l("fullscreenend")),this._prevCooperativeGesturesEnabled&&this._map.cooperativeGestures.enable())}_exitFullscreen(){window.document.exitFullscreen?window.document.exitFullscreen():window.document.mozCancelFullScreen?window.document.mozCancelFullScreen():window.document.msExitFullscreen?window.document.msExitFullscreen():window.document.webkitCancelFullScreen?window.document.webkitCancelFullScreen():this._togglePseudoFullScreen()}_requestFullscreen(){this._container.requestFullscreen?this._container.requestFullscreen():this._container.mozRequestFullScreen?this._container.mozRequestFullScreen():this._container.msRequestFullscreen?this._container.msRequestFullscreen():this._container.webkitRequestFullscreen?this._container.webkitRequestFullscreen():this._togglePseudoFullScreen()}_togglePseudoFullScreen(){this._container.classList.toggle("maplibregl-pseudo-fullscreen"),this._handleFullscreenChange(),this._map.resize()}},x.GeoJSONSource=Nt,x.GeolocateControl=class extends o.E{constructor(u){super(),this._onSuccess=e=>{if(this._map){if(this._isOutOfMapMaxBounds(e))return this._setErrorState(),this.fire(new o.l("outofmaxbounds",e)),this._updateMarker(),void this._finish();if(this.options.trackUserLocation)switch(this._lastKnownPosition=e,this._watchState){case"WAITING_ACTIVE":case"ACTIVE_LOCK":case"ACTIVE_ERROR":this._watchState="ACTIVE_LOCK",this._geolocateButton.classList.remove("maplibregl-ctrl-geolocate-waiting"),this._geolocateButton.classList.remove("maplibregl-ctrl-geolocate-active-error"),this._geolocateButton.classList.add("maplibregl-ctrl-geolocate-active");break;case"BACKGROUND":case"BACKGROUND_ERROR":this._watchState="BACKGROUND",this._geolocateButton.classList.remove("maplibregl-ctrl-geolocate-waiting"),this._geolocateButton.classList.remove("maplibregl-ctrl-geolocate-background-error"),this._geolocateButton.classList.add("maplibregl-ctrl-geolocate-background");break;default:throw new Error(`Unexpected watchState ${this._watchState}`)}this.options.showUserLocation&&this._watchState!=="OFF"&&this._updateMarker(e),this.options.trackUserLocation&&this._watchState!=="ACTIVE_LOCK"||this._updateCamera(e),this.options.showUserLocation&&this._dotElement.classList.remove("maplibregl-user-location-dot-stale"),this.fire(new o.l("geolocate",e)),this._finish()}},this._updateCamera=e=>{const r=new o.Q(e.coords.longitude,e.coords.latitude),a=e.coords.accuracy,l=this._map.getBearing(),h=o.e({bearing:l},this.options.fitBoundsOptions),g=ct.fromLngLat(r,a);this._map.fitBounds(g,h,{geolocateSource:!0})},this._updateMarker=e=>{if(e){const r=new o.Q(e.coords.longitude,e.coords.latitude);this._accuracyCircleMarker.setLngLat(r).addTo(this._map),this._userLocationDotMarker.setLngLat(r).addTo(this._map),this._accuracy=e.coords.accuracy,this.options.showUserLocation&&this.options.showAccuracyCircle&&this._updateCircleRadius()}else this._userLocationDotMarker.remove(),this._accuracyCircleMarker.remove()},this._onZoom=()=>{this.options.showUserLocation&&this.options.showAccuracyCircle&&this._updateCircleRadius()},this._onError=e=>{if(this._map){if(e.code===1){this._watchState="OFF",this._geolocateButton.classList.remove("maplibregl-ctrl-geolocate-waiting"),this._geolocateButton.classList.remove("maplibregl-ctrl-geolocate-active"),this._geolocateButton.classList.remove("maplibregl-ctrl-geolocate-active-error"),this._geolocateButton.classList.remove("maplibregl-ctrl-geolocate-background"),this._geolocateButton.classList.remove("maplibregl-ctrl-geolocate-background-error"),this._geolocateButton.disabled=!0;const r=this._map._getUIString("GeolocateControl.LocationNotAvailable");this._geolocateButton.title=r,this._geolocateButton.setAttribute("aria-label",r),this._geolocationWatchID!==void 0&&this._clearWatch()}else{if(e.code===3&&Go)return;this.options.trackUserLocation&&this._setErrorState()}this._watchState!=="OFF"&&this.options.showUserLocation&&this._dotElement.classList.add("maplibregl-user-location-dot-stale"),this.fire(new o.l("error",e)),this._finish()}},this._finish=()=>{this._timeoutId&&clearTimeout(this._timeoutId),this._timeoutId=void 0},this._setupUI=()=>{this._map&&(this._container.addEventListener("contextmenu",e=>e.preventDefault()),this._geolocateButton=C.create("button","maplibregl-ctrl-geolocate",this._container),C.create("span","maplibregl-ctrl-icon",this._geolocateButton).setAttribute("aria-hidden","true"),this._geolocateButton.type="button",this._geolocateButton.disabled=!0)},this._finishSetupUI=e=>{if(this._map){if(e===!1){o.w("Geolocation support is not available so the GeolocateControl will be disabled.");const r=this._map._getUIString("GeolocateControl.LocationNotAvailable");this._geolocateButton.disabled=!0,this._geolocateButton.title=r,this._geolocateButton.setAttribute("aria-label",r)}else{const r=this._map._getUIString("GeolocateControl.FindMyLocation");this._geolocateButton.disabled=!1,this._geolocateButton.title=r,this._geolocateButton.setAttribute("aria-label",r)}this.options.trackUserLocation&&(this._geolocateButton.setAttribute("aria-pressed","false"),this._watchState="OFF"),this.options.showUserLocation&&(this._dotElement=C.create("div","maplibregl-user-location-dot"),this._userLocationDotMarker=new Co({element:this._dotElement}),this._circleElement=C.create("div","maplibregl-user-location-accuracy-circle"),this._accuracyCircleMarker=new Co({element:this._circleElement,pitchAlignment:"map"}),this.options.trackUserLocation&&(this._watchState="OFF"),this._map.on("zoom",this._onZoom)),this._geolocateButton.addEventListener("click",()=>this.trigger()),this._setup=!0,this.options.trackUserLocation&&this._map.on("movestart",r=>{r.geolocateSource||this._watchState!=="ACTIVE_LOCK"||r.originalEvent&&r.originalEvent.type==="resize"||(this._watchState="BACKGROUND",this._geolocateButton.classList.add("maplibregl-ctrl-geolocate-background"),this._geolocateButton.classList.remove("maplibregl-ctrl-geolocate-active"),this.fire(new o.l("trackuserlocationend")),this.fire(new o.l("userlocationlostfocus")))})}},this.options=o.e({},qr,u)}onAdd(u){return this._map=u,this._container=C.create("div","maplibregl-ctrl maplibregl-ctrl-group"),this._setupUI(),function(){return o._(this,arguments,void 0,function*(e=!1){if(Gr!==void 0&&!e)return Gr;if(window.navigator.permissions===void 0)return Gr=!!window.navigator.geolocation,Gr;try{Gr=(yield window.navigator.permissions.query({name:"geolocation"})).state!=="denied"}catch{Gr=!!window.navigator.geolocation}return Gr})}().then(e=>this._finishSetupUI(e)),this._container}onRemove(){this._geolocationWatchID!==void 0&&(window.navigator.geolocation.clearWatch(this._geolocationWatchID),this._geolocationWatchID=void 0),this.options.showUserLocation&&this._userLocationDotMarker&&this._userLocationDotMarker.remove(),this.options.showAccuracyCircle&&this._accuracyCircleMarker&&this._accuracyCircleMarker.remove(),C.remove(this._container),this._map.off("zoom",this._onZoom),this._map=void 0,zr=0,Go=!1}_isOutOfMapMaxBounds(u){const e=this._map.getMaxBounds(),r=u.coords;return e&&(r.longitude<e.getWest()||r.longitude>e.getEast()||r.latitude<e.getSouth()||r.latitude>e.getNorth())}_setErrorState(){switch(this._watchState){case"WAITING_ACTIVE":this._watchState="ACTIVE_ERROR",this._geolocateButton.classList.remove("maplibregl-ctrl-geolocate-active"),this._geolocateButton.classList.add("maplibregl-ctrl-geolocate-active-error");break;case"ACTIVE_LOCK":this._watchState="ACTIVE_ERROR",this._geolocateButton.classList.remove("maplibregl-ctrl-geolocate-active"),this._geolocateButton.classList.add("maplibregl-ctrl-geolocate-active-error"),this._geolocateButton.classList.add("maplibregl-ctrl-geolocate-waiting");break;case"BACKGROUND":this._watchState="BACKGROUND_ERROR",this._geolocateButton.classList.remove("maplibregl-ctrl-geolocate-background"),this._geolocateButton.classList.add("maplibregl-ctrl-geolocate-background-error"),this._geolocateButton.classList.add("maplibregl-ctrl-geolocate-waiting");break;case"ACTIVE_ERROR":break;default:throw new Error(`Unexpected watchState ${this._watchState}`)}}_updateCircleRadius(){const u=this._map.getBounds(),e=u.getSouthEast(),r=u.getNorthEast(),a=e.distanceTo(r),l=Math.ceil(this._accuracy/(a/this._map._container.clientHeight)*2);this._circleElement.style.width=`${l}px`,this._circleElement.style.height=`${l}px`}trigger(){if(!this._setup)return o.w("Geolocate control triggered before added to a map"),!1;if(this.options.trackUserLocation){switch(this._watchState){case"OFF":this._watchState="WAITING_ACTIVE",this.fire(new o.l("trackuserlocationstart"));break;case"WAITING_ACTIVE":case"ACTIVE_LOCK":case"ACTIVE_ERROR":case"BACKGROUND_ERROR":zr--,Go=!1,this._watchState="OFF",this._geolocateButton.classList.remove("maplibregl-ctrl-geolocate-waiting"),this._geolocateButton.classList.remove("maplibregl-ctrl-geolocate-active"),this._geolocateButton.classList.remove("maplibregl-ctrl-geolocate-active-error"),this._geolocateButton.classList.remove("maplibregl-ctrl-geolocate-background"),this._geolocateButton.classList.remove("maplibregl-ctrl-geolocate-background-error"),this.fire(new o.l("trackuserlocationend"));break;case"BACKGROUND":this._watchState="ACTIVE_LOCK",this._geolocateButton.classList.remove("maplibregl-ctrl-geolocate-background"),this._lastKnownPosition&&this._updateCamera(this._lastKnownPosition),this.fire(new o.l("trackuserlocationstart")),this.fire(new o.l("userlocationfocus"));break;default:throw new Error(`Unexpected watchState ${this._watchState}`)}switch(this._watchState){case"WAITING_ACTIVE":this._geolocateButton.classList.add("maplibregl-ctrl-geolocate-waiting"),this._geolocateButton.classList.add("maplibregl-ctrl-geolocate-active");break;case"ACTIVE_LOCK":this._geolocateButton.classList.add("maplibregl-ctrl-geolocate-active");break;case"OFF":break;default:throw new Error(`Unexpected watchState ${this._watchState}`)}if(this._watchState==="OFF"&&this._geolocationWatchID!==void 0)this._clearWatch();else if(this._geolocationWatchID===void 0){let u;this._geolocateButton.classList.add("maplibregl-ctrl-geolocate-waiting"),this._geolocateButton.setAttribute("aria-pressed","true"),zr++,zr>1?(u={maximumAge:6e5,timeout:0},Go=!0):(u=this.options.positionOptions,Go=!1),this._geolocationWatchID=window.navigator.geolocation.watchPosition(this._onSuccess,this._onError,u)}}else window.navigator.geolocation.getCurrentPosition(this._onSuccess,this._onError,this.options.positionOptions),this._timeoutId=setTimeout(this._finish,1e4);return!0}_clearWatch(){window.navigator.geolocation.clearWatch(this._geolocationWatchID),this._geolocationWatchID=void 0,this._geolocateButton.classList.remove("maplibregl-ctrl-geolocate-waiting"),this._geolocateButton.setAttribute("aria-pressed","false"),this.options.showUserLocation&&this._updateMarker(null)}},x.GlobeControl=class{constructor(){this._toggleProjection=()=>{var u;const e=(u=this._map.getProjection())===null||u===void 0?void 0:u.type;this._map.setProjection(e!=="mercator"&&e?{type:"mercator"}:{type:"globe"}),this._updateGlobeIcon()},this._updateGlobeIcon=()=>{var u;this._globeButton.classList.remove("maplibregl-ctrl-globe"),this._globeButton.classList.remove("maplibregl-ctrl-globe-enabled"),((u=this._map.getProjection())===null||u===void 0?void 0:u.type)==="globe"?(this._globeButton.classList.add("maplibregl-ctrl-globe-enabled"),this._globeButton.title=this._map._getUIString("GlobeControl.Disable")):(this._globeButton.classList.add("maplibregl-ctrl-globe"),this._globeButton.title=this._map._getUIString("GlobeControl.Enable"))}}onAdd(u){return this._map=u,this._container=C.create("div","maplibregl-ctrl maplibregl-ctrl-group"),this._globeButton=C.create("button","maplibregl-ctrl-globe",this._container),C.create("span","maplibregl-ctrl-icon",this._globeButton).setAttribute("aria-hidden","true"),this._globeButton.type="button",this._globeButton.addEventListener("click",this._toggleProjection),this._updateGlobeIcon(),this._map.on("styledata",this._updateGlobeIcon),this._container}onRemove(){C.remove(this._container),this._map.off("styledata",this._updateGlobeIcon),this._globeButton.removeEventListener("click",this._toggleProjection),this._map=void 0}},x.Hash=Vl,x.ImageSource=mr,x.KeyboardHandler=Ko,x.LngLatBounds=ct,x.LogoControl=Ds,x.Map=class extends Ap{constructor(u){var e,r;o.cn.mark(o.co.create);const a=Object.assign(Object.assign(Object.assign({},zs),u),{canvasContextAttributes:Object.assign(Object.assign({},zs.canvasContextAttributes),u.canvasContextAttributes)});if(a.minZoom!=null&&a.maxZoom!=null&&a.minZoom>a.maxZoom)throw new Error("maxZoom must be greater than or equal to minZoom");if(a.minPitch!=null&&a.maxPitch!=null&&a.minPitch>a.maxPitch)throw new Error("maxPitch must be greater than or equal to minPitch");if(a.minPitch!=null&&a.minPitch<0)throw new Error("minPitch must be greater than or equal to 0");if(a.maxPitch!=null&&a.maxPitch>180)throw new Error("maxPitch must be less than or equal to 180");const l=new st,h=new Ge;if(a.minZoom!==void 0&&l.setMinZoom(a.minZoom),a.maxZoom!==void 0&&l.setMaxZoom(a.maxZoom),a.minPitch!==void 0&&l.setMinPitch(a.minPitch),a.maxPitch!==void 0&&l.setMaxPitch(a.maxPitch),a.renderWorldCopies!==void 0&&l.setRenderWorldCopies(a.renderWorldCopies),super(l,h,{bearingSnap:a.bearingSnap}),this._idleTriggered=!1,this._crossFadingFactor=1,this._renderTaskQueue=new Kl,this._controls=[],this._mapId=o.a4(),this._contextLost=b=>{b.preventDefault(),this._frameRequest&&(this._frameRequest.abort(),this._frameRequest=null),this.fire(new o.l("webglcontextlost",{originalEvent:b}))},this._contextRestored=b=>{this._setupPainter(),this.resize(),this._update(),this.fire(new o.l("webglcontextrestored",{originalEvent:b}))},this._onMapScroll=b=>{if(b.target===this._container)return this._container.scrollTop=0,this._container.scrollLeft=0,!1},this._onWindowOnline=()=>{this._update()},this._interactive=a.interactive,this._maxTileCacheSize=a.maxTileCacheSize,this._maxTileCacheZoomLevels=a.maxTileCacheZoomLevels,this._canvasContextAttributes=Object.assign({},a.canvasContextAttributes),this._trackResize=a.trackResize===!0,this._bearingSnap=a.bearingSnap,this._centerClampedToGround=a.centerClampedToGround,this._refreshExpiredTiles=a.refreshExpiredTiles===!0,this._fadeDuration=a.fadeDuration,this._crossSourceCollisions=a.crossSourceCollisions===!0,this._collectResourceTiming=a.collectResourceTiming===!0,this._locale=Object.assign(Object.assign({},Ct),a.locale),this._clickTolerance=a.clickTolerance,this._overridePixelRatio=a.pixelRatio,this._maxCanvasSize=a.maxCanvasSize,this.transformCameraUpdate=a.transformCameraUpdate,this.cancelPendingTileRequestsWhileZooming=a.cancelPendingTileRequestsWhileZooming===!0,this._imageQueueHandle=te.addThrottleControl(()=>this.isMoving()),this._requestManager=new me(a.transformRequest),typeof a.container=="string"){if(this._container=document.getElementById(a.container),!this._container)throw new Error(`Container '${a.container}' not found.`)}else{if(!(a.container instanceof HTMLElement))throw new Error("Invalid type: 'container' must be a String or HTMLElement.");this._container=a.container}if(a.maxBounds&&this.setMaxBounds(a.maxBounds),this._setupContainer(),this._setupPainter(),this.on("move",()=>this._update(!1)),this.on("moveend",()=>this._update(!1)),this.on("zoom",()=>this._update(!0)),this.on("terrain",()=>{this.painter.terrainFacilitator.dirty=!0,this._update(!0)}),this.once("idle",()=>{this._idleTriggered=!0}),typeof window<"u"){addEventListener("online",this._onWindowOnline,!1);let b=!1;const A=Is(I=>{this._trackResize&&!this._removed&&(this.resize(I),this.redraw())},50);this._resizeObserver=new ResizeObserver(I=>{b?A(I):b=!0}),this._resizeObserver.observe(this._container)}this.handlers=new Sp(this,a),this._hash=a.hash&&new Vl(typeof a.hash=="string"&&a.hash||void 0).addTo(this),this._hash&&this._hash._onHashChange()||(this.jumpTo({center:a.center,elevation:a.elevation,zoom:a.zoom,bearing:a.bearing,pitch:a.pitch,roll:a.roll}),a.bounds&&(this.resize(),this.fitBounds(a.bounds,o.e({},a.fitBoundsOptions,{duration:0}))));const g=typeof a.style=="string"||((r=(e=a.style)===null||e===void 0?void 0:e.projection)===null||r===void 0?void 0:r.type)!=="globe";this.resize(null,g),this._localIdeographFontFamily=a.localIdeographFontFamily,this._validateStyle=a.validateStyle,a.style&&this.setStyle(a.style,{localIdeographFontFamily:a.localIdeographFontFamily}),a.attributionControl&&this.addControl(new Cr(typeof a.attributionControl=="boolean"?void 0:a.attributionControl)),a.maplibreLogo&&this.addControl(new Ds,a.logoPosition),this.on("style.load",()=>{if(g||this._resizeTransform(),this.transform.unmodified){const b=o.O(this.style.stylesheet,["center","zoom","bearing","pitch","roll"]);this.jumpTo(b)}}),this.on("data",b=>{this._update(b.dataType==="style"),this.fire(new o.l(`${b.dataType}data`,b))}),this.on("dataloading",b=>{this.fire(new o.l(`${b.dataType}dataloading`,b))}),this.on("dataabort",b=>{this.fire(new o.l("sourcedataabort",b))})}_getMapId(){return this._mapId}addControl(u,e){if(e===void 0&&(e=u.getDefaultPosition?u.getDefaultPosition():"top-right"),!u||!u.onAdd)return this.fire(new o.k(new Error("Invalid argument to map.addControl(). Argument must be a control with onAdd and onRemove methods.")));const r=u.onAdd(this);this._controls.push(u);const a=this._controlPositions[e];return e.indexOf("bottom")!==-1?a.insertBefore(r,a.firstChild):a.appendChild(r),this}removeControl(u){if(!u||!u.onRemove)return this.fire(new o.k(new Error("Invalid argument to map.removeControl(). Argument must be a control with onAdd and onRemove methods.")));const e=this._controls.indexOf(u);return e>-1&&this._controls.splice(e,1),u.onRemove(this),this}hasControl(u){return this._controls.indexOf(u)>-1}calculateCameraOptionsFromTo(u,e,r,a){return a==null&&this.terrain&&(a=this.terrain.getElevationForLngLatZoom(r,this.transform.tileZoom)),super.calculateCameraOptionsFromTo(u,e,r,a)}resize(u,e=!0){const[r,a]=this._containerDimensions(),l=this._getClampedPixelRatio(r,a);if(this._resizeCanvas(r,a,l),this.painter.resize(r,a,l),this.painter.overLimit()){const g=this.painter.context.gl;this._maxCanvasSize=[g.drawingBufferWidth,g.drawingBufferHeight];const b=this._getClampedPixelRatio(r,a);this._resizeCanvas(r,a,b),this.painter.resize(r,a,b)}this._resizeTransform(e);const h=!this._moving;return h&&(this.stop(),this.fire(new o.l("movestart",u)).fire(new o.l("move",u))),this.fire(new o.l("resize",u)),h&&this.fire(new o.l("moveend",u)),this}_resizeTransform(u=!0){var e;const[r,a]=this._containerDimensions();this.transform.resize(r,a,u),(e=this._requestedCameraState)===null||e===void 0||e.resize(r,a,u)}_getClampedPixelRatio(u,e){const{0:r,1:a}=this._maxCanvasSize,l=this.getPixelRatio(),h=u*l,g=e*l;return Math.min(h>r?r/h:1,g>a?a/g:1)*l}getPixelRatio(){var u;return(u=this._overridePixelRatio)!==null&&u!==void 0?u:devicePixelRatio}setPixelRatio(u){this._overridePixelRatio=u,this.resize()}getBounds(){return this.transform.getBounds()}getMaxBounds(){return this.transform.getMaxBounds()}setMaxBounds(u){return this.transform.setMaxBounds(ct.convert(u)),this._update()}setMinZoom(u){if((u=u??-2)>=-2&&u<=this.transform.maxZoom)return this.transform.setMinZoom(u),this._update(),this.getZoom()<u&&this.setZoom(u),this;throw new Error("minZoom must be between -2 and the current maxZoom, inclusive")}getMinZoom(){return this.transform.minZoom}setMaxZoom(u){if((u=u??22)>=this.transform.minZoom)return this.transform.setMaxZoom(u),this._update(),this.getZoom()>u&&this.setZoom(u),this;throw new Error("maxZoom must be greater than the current minZoom")}getMaxZoom(){return this.transform.maxZoom}setMinPitch(u){if((u=u??0)<0)throw new Error("minPitch must be greater than or equal to 0");if(u>=0&&u<=this.transform.maxPitch)return this.transform.setMinPitch(u),this._update(),this.getPitch()<u&&this.setPitch(u),this;throw new Error("minPitch must be between 0 and the current maxPitch, inclusive")}getMinPitch(){return this.transform.minPitch}setMaxPitch(u){if((u=u??60)>180)throw new Error("maxPitch must be less than or equal to 180");if(u>=this.transform.minPitch)return this.transform.setMaxPitch(u),this._update(),this.getPitch()>u&&this.setPitch(u),this;throw new Error("maxPitch must be greater than the current minPitch")}getMaxPitch(){return this.transform.maxPitch}getRenderWorldCopies(){return this.transform.renderWorldCopies}setRenderWorldCopies(u){return this.transform.setRenderWorldCopies(u),this._update()}project(u){return this.transform.locationToScreenPoint(o.Q.convert(u),this.style&&this.terrain)}unproject(u){return this.transform.screenPointToLocation(o.P.convert(u),this.terrain)}isMoving(){var u;return this._moving||((u=this.handlers)===null||u===void 0?void 0:u.isMoving())}isZooming(){var u;return this._zooming||((u=this.handlers)===null||u===void 0?void 0:u.isZooming())}isRotating(){var u;return this._rotating||((u=this.handlers)===null||u===void 0?void 0:u.isRotating())}_createDelegatedListener(u,e,r){if(u==="mouseenter"||u==="mouseover"){let a=!1;return{layers:e,listener:r,delegates:{mousemove:h=>{const g=e.filter(A=>this.getLayer(A)),b=g.length!==0?this.queryRenderedFeatures(h.point,{layers:g}):[];b.length?a||(a=!0,r.call(this,new $r(u,this,h.originalEvent,{features:b}))):a=!1},mouseout:()=>{a=!1}}}}if(u==="mouseleave"||u==="mouseout"){let a=!1;return{layers:e,listener:r,delegates:{mousemove:g=>{const b=e.filter(A=>this.getLayer(A));(b.length!==0?this.queryRenderedFeatures(g.point,{layers:b}):[]).length?a=!0:a&&(a=!1,r.call(this,new $r(u,this,g.originalEvent)))},mouseout:g=>{a&&(a=!1,r.call(this,new $r(u,this,g.originalEvent)))}}}}{const a=l=>{const h=e.filter(b=>this.getLayer(b)),g=h.length!==0?this.queryRenderedFeatures(l.point,{layers:h}):[];g.length&&(l.features=g,r.call(this,l),delete l.features)};return{layers:e,listener:r,delegates:{[u]:a}}}}_saveDelegatedListener(u,e){this._delegatedListeners=this._delegatedListeners||{},this._delegatedListeners[u]=this._delegatedListeners[u]||[],this._delegatedListeners[u].push(e)}_removeDelegatedListener(u,e,r){if(!this._delegatedListeners||!this._delegatedListeners[u])return;const a=this._delegatedListeners[u];for(let l=0;l<a.length;l++){const h=a[l];if(h.listener===r&&h.layers.length===e.length&&h.layers.every(g=>e.includes(g))){for(const g in h.delegates)this.off(g,h.delegates[g]);return void a.splice(l,1)}}}on(u,e,r){if(r===void 0)return super.on(u,e);const a=typeof e=="string"?[e]:e,l=this._createDelegatedListener(u,a,r);this._saveDelegatedListener(u,l);for(const h in l.delegates)this.on(h,l.delegates[h]);return{unsubscribe:()=>{this._removeDelegatedListener(u,a,r)}}}once(u,e,r){if(r===void 0)return super.once(u,e);const a=typeof e=="string"?[e]:e,l=this._createDelegatedListener(u,a,r);for(const h in l.delegates){const g=l.delegates[h];l.delegates[h]=(...b)=>{this._removeDelegatedListener(u,a,r),g(...b)}}this._saveDelegatedListener(u,l);for(const h in l.delegates)this.once(h,l.delegates[h]);return this}off(u,e,r){return r===void 0?super.off(u,e):(this._removeDelegatedListener(u,typeof e=="string"?[e]:e,r),this)}queryRenderedFeatures(u,e){if(!this.style)return[];let r;const a=u instanceof o.P||Array.isArray(u),l=a?u:[[0,0],[this.transform.width,this.transform.height]];if(e=e||(a?{}:u)||{},l instanceof o.P||typeof l[0]=="number")r=[o.P.convert(l)];else{const h=o.P.convert(l[0]),g=o.P.convert(l[1]);r=[h,new o.P(g.x,h.y),g,new o.P(h.x,g.y),h]}return this.style.queryRenderedFeatures(r,e,this.transform)}querySourceFeatures(u,e){return this.style.querySourceFeatures(u,e)}setStyle(u,e){return(e=o.e({},{localIdeographFontFamily:this._localIdeographFontFamily,validate:this._validateStyle},e)).diff!==!1&&e.localIdeographFontFamily===this._localIdeographFontFamily&&this.style&&u?(this._diffStyle(u,e),this):(this._localIdeographFontFamily=e.localIdeographFontFamily,this._updateStyle(u,e))}setTransformRequest(u){return this._requestManager.setTransformRequest(u),this}_getUIString(u){const e=this._locale[u];if(e==null)throw new Error(`Missing UI string '${u}'`);return e}_updateStyle(u,e){var r,a;if(e.transformStyle&&this.style&&!this.style._loaded)return void this.style.once("style.load",()=>this._updateStyle(u,e));const l=this.style&&e.transformStyle?this.style.serialize():void 0;return this.style&&(this.style.setEventedParent(null),this.style._remove(!u)),u?(this.style=new xl(this,e||{}),this.style.setEventedParent(this,{style:this.style}),typeof u=="string"?this.style.loadURL(u,e,l):this.style.loadJSON(u,e,l),this):((a=(r=this.style)===null||r===void 0?void 0:r.projection)===null||a===void 0||a.destroy(),delete this.style,this)}_lazyInitEmptyStyle(){this.style||(this.style=new xl(this,{}),this.style.setEventedParent(this,{style:this.style}),this.style.loadEmpty())}_diffStyle(u,e){if(typeof u=="string"){const r=this._requestManager.transformRequest(u,"Style");o.j(r,new AbortController).then(a=>{this._updateDiff(a.data,e)}).catch(a=>{a&&this.fire(new o.k(a))})}else typeof u=="object"&&this._updateDiff(u,e)}_updateDiff(u,e){try{this.style.setState(u,e)&&this._update(!0)}catch(r){o.w(`Unable to perform style diff: ${r.message||r.error||r}. Rebuilding the style from scratch.`),this._updateStyle(u,e)}}getStyle(){if(this.style)return this.style.serialize()}isStyleLoaded(){return this.style?this.style.loaded():o.w("There is no style added to the map.")}addSource(u,e){return this._lazyInitEmptyStyle(),this.style.addSource(u,e),this._update(!0)}isSourceLoaded(u){const e=this.style&&this.style.sourceCaches[u];if(e!==void 0)return e.loaded();this.fire(new o.k(new Error(`There is no source with ID '${u}'`)))}setTerrain(u){if(this.style._checkLoaded(),this._terrainDataCallback&&this.style.off("data",this._terrainDataCallback),u){const e=this.style.sourceCaches[u.source];if(!e)throw new Error(`cannot load terrain, because there exists no source with ID: ${u.source}`);this.terrain===null&&e.reload();for(const r in this.style._layers){const a=this.style._layers[r];a.type==="hillshade"&&a.source===u.source&&o.w("You are using the same source for a hillshade layer and for 3D terrain. Please consider using two separate sources to improve rendering quality.")}this.terrain=new eh(this.painter,e,u),this.painter.renderToTexture=new Ua(this.painter,this.terrain),this.transform.setMinElevationForCurrentTile(this.terrain.getMinTileElevationForLngLatZoom(this.transform.center,this.transform.tileZoom)),this.transform.setElevation(this.terrain.getElevationForLngLatZoom(this.transform.center,this.transform.tileZoom)),this._terrainDataCallback=r=>{var a;r.dataType==="style"?this.terrain.sourceCache.freeRtt():r.dataType==="source"&&r.tile&&(r.sourceId!==u.source||this._elevationFreeze||(this.transform.setMinElevationForCurrentTile(this.terrain.getMinTileElevationForLngLatZoom(this.transform.center,this.transform.tileZoom)),this._centerClampedToGround&&this.transform.setElevation(this.terrain.getElevationForLngLatZoom(this.transform.center,this.transform.tileZoom))),((a=r.source)===null||a===void 0?void 0:a.type)==="image"?this.terrain.sourceCache.freeRtt():this.terrain.sourceCache.freeRtt(r.tile.tileID))},this.style.on("data",this._terrainDataCallback)}else this.terrain&&this.terrain.sourceCache.destruct(),this.terrain=null,this.painter.renderToTexture&&this.painter.renderToTexture.destruct(),this.painter.renderToTexture=null,this.transform.setMinElevationForCurrentTile(0),this._centerClampedToGround&&this.transform.setElevation(0);return this.fire(new o.l("terrain",{terrain:u})),this}getTerrain(){var u,e;return(e=(u=this.terrain)===null||u===void 0?void 0:u.options)!==null&&e!==void 0?e:null}areTilesLoaded(){const u=this.style&&this.style.sourceCaches;for(const e in u){const r=u[e]._tiles;for(const a in r){const l=r[a];if(l.state!=="loaded"&&l.state!=="errored")return!1}}return!0}removeSource(u){return this.style.removeSource(u),this._update(!0)}getSource(u){return this.style.getSource(u)}setSourceTileLodParams(u,e,r){if(r){const a=this.getSource(r);if(!a)throw new Error(`There is no source with ID "${r}", cannot set LOD parameters`);a.calculateTileZoom=ve(Math.max(1,u),Math.max(1,e))}else for(const a in this.style.sourceCaches)this.style.sourceCaches[a].getSource().calculateTileZoom=ve(Math.max(1,u),Math.max(1,e));return this._update(!0),this}refreshTiles(u,e){const r=this.style.sourceCaches[u];if(!r)throw new Error(`There is no source cache with ID "${u}", cannot refresh tile`);e===void 0?r.reload():r.refreshTiles(e.map(a=>new o.a1(a.z,a.x,a.y)))}addImage(u,e,r={}){const{pixelRatio:a=1,sdf:l=!1,stretchX:h,stretchY:g,content:b,textFitWidth:A,textFitHeight:I}=r;if(this._lazyInitEmptyStyle(),!(e instanceof HTMLImageElement||o.b(e))){if(e.width===void 0||e.height===void 0)return this.fire(new o.k(new Error("Invalid arguments to map.addImage(). The second argument must be an `HTMLImageElement`, `ImageData`, `ImageBitmap`, or object with `width`, `height`, and `data` properties with the same format as `ImageData`")));{const{width:z,height:F,data:O}=e,Z=e;return this.style.addImage(u,{data:new o.R({width:z,height:F},new Uint8Array(O)),pixelRatio:a,stretchX:h,stretchY:g,content:b,textFitWidth:A,textFitHeight:I,sdf:l,version:0,userImage:Z}),Z.onAdd&&Z.onAdd(this,u),this}}{const{width:z,height:F,data:O}=M.getImageData(e);this.style.addImage(u,{data:new o.R({width:z,height:F},O),pixelRatio:a,stretchX:h,stretchY:g,content:b,textFitWidth:A,textFitHeight:I,sdf:l,version:0})}}updateImage(u,e){const r=this.style.getImage(u);if(!r)return this.fire(new o.k(new Error("The map has no image with that id. If you are adding a new image use `map.addImage(...)` instead.")));const a=e instanceof HTMLImageElement||o.b(e)?M.getImageData(e):e,{width:l,height:h,data:g}=a;if(l===void 0||h===void 0)return this.fire(new o.k(new Error("Invalid arguments to map.updateImage(). The second argument must be an `HTMLImageElement`, `ImageData`, `ImageBitmap`, or object with `width`, `height`, and `data` properties with the same format as `ImageData`")));if(l!==r.data.width||h!==r.data.height)return this.fire(new o.k(new Error("The width and height of the updated image must be that same as the previous version of the image")));const b=!(e instanceof HTMLImageElement||o.b(e));return r.data.replace(g,b),this.style.updateImage(u,r),this}getImage(u){return this.style.getImage(u)}hasImage(u){return u?!!this.style.getImage(u):(this.fire(new o.k(new Error("Missing required image id"))),!1)}removeImage(u){this.style.removeImage(u)}loadImage(u){return te.getImage(this._requestManager.transformRequest(u,"Image"),new AbortController)}listImages(){return this.style.listImages()}addLayer(u,e){return this._lazyInitEmptyStyle(),this.style.addLayer(u,e),this._update(!0)}moveLayer(u,e){return this.style.moveLayer(u,e),this._update(!0)}removeLayer(u){return this.style.removeLayer(u),this._update(!0)}getLayer(u){return this.style.getLayer(u)}getLayersOrder(){return this.style.getLayersOrder()}setLayerZoomRange(u,e,r){return this.style.setLayerZoomRange(u,e,r),this._update(!0)}setFilter(u,e,r={}){return this.style.setFilter(u,e,r),this._update(!0)}getFilter(u){return this.style.getFilter(u)}setPaintProperty(u,e,r,a={}){return this.style.setPaintProperty(u,e,r,a),this._update(!0)}getPaintProperty(u,e){return this.style.getPaintProperty(u,e)}setLayoutProperty(u,e,r,a={}){return this.style.setLayoutProperty(u,e,r,a),this._update(!0)}getLayoutProperty(u,e){return this.style.getLayoutProperty(u,e)}setGlyphs(u,e={}){return this._lazyInitEmptyStyle(),this.style.setGlyphs(u,e),this._update(!0)}getGlyphs(){return this.style.getGlyphsUrl()}addSprite(u,e,r={}){return this._lazyInitEmptyStyle(),this.style.addSprite(u,e,r,a=>{a||this._update(!0)}),this}removeSprite(u){return this._lazyInitEmptyStyle(),this.style.removeSprite(u),this._update(!0)}getSprite(){return this.style.getSprite()}setSprite(u,e={}){return this._lazyInitEmptyStyle(),this.style.setSprite(u,e,r=>{r||this._update(!0)}),this}setLight(u,e={}){return this._lazyInitEmptyStyle(),this.style.setLight(u,e),this._update(!0)}getLight(){return this.style.getLight()}setSky(u,e={}){return this._lazyInitEmptyStyle(),this.style.setSky(u,e),this._update(!0)}getSky(){return this.style.getSky()}setFeatureState(u,e){return this.style.setFeatureState(u,e),this._update()}removeFeatureState(u,e){return this.style.removeFeatureState(u,e),this._update()}getFeatureState(u){return this.style.getFeatureState(u)}getContainer(){return this._container}getCanvasContainer(){return this._canvasContainer}getCanvas(){return this._canvas}_containerDimensions(){let u=0,e=0;return this._container&&(u=this._container.clientWidth||400,e=this._container.clientHeight||300),[u,e]}_setupContainer(){const u=this._container;u.classList.add("maplibregl-map");const e=this._canvasContainer=C.create("div","maplibregl-canvas-container",u);this._interactive&&e.classList.add("maplibregl-interactive"),this._canvas=C.create("canvas","maplibregl-canvas",e),this._canvas.addEventListener("webglcontextlost",this._contextLost,!1),this._canvas.addEventListener("webglcontextrestored",this._contextRestored,!1),this._canvas.setAttribute("tabindex",this._interactive?"0":"-1"),this._canvas.setAttribute("aria-label",this._getUIString("Map.Title")),this._canvas.setAttribute("role","region");const r=this._containerDimensions(),a=this._getClampedPixelRatio(r[0],r[1]);this._resizeCanvas(r[0],r[1],a);const l=this._controlContainer=C.create("div","maplibregl-control-container",u),h=this._controlPositions={};["top-left","top-right","bottom-left","bottom-right"].forEach(g=>{h[g]=C.create("div",`maplibregl-ctrl-${g} `,l)}),this._container.addEventListener("scroll",this._onMapScroll,!1)}_resizeCanvas(u,e,r){this._canvas.width=Math.floor(r*u),this._canvas.height=Math.floor(r*e),this._canvas.style.width=`${u}px`,this._canvas.style.height=`${e}px`}_setupPainter(){const u=Object.assign(Object.assign({},this._canvasContextAttributes),{alpha:!0,depth:!0,stencil:!0,premultipliedAlpha:!0});let e=null;this._canvas.addEventListener("webglcontextcreationerror",a=>{e={requestedAttributes:u},a&&(e.statusMessage=a.statusMessage,e.type=a.type)},{once:!0});let r=null;if(r=this._canvasContextAttributes.contextType?this._canvas.getContext(this._canvasContextAttributes.contextType,u):this._canvas.getContext("webgl2",u)||this._canvas.getContext("webgl",u),!r){const a="Failed to initialize WebGL";throw e?(e.message=a,new Error(JSON.stringify(e))):new Error(a)}this.painter=new Bl(r,this.transform),T.testSupport(r)}migrateProjection(u,e){super.migrateProjection(u,e),this.painter.transform=u,this.fire(new o.l("projectiontransition",{newProjection:this.style.projection.name}))}loaded(){return!this._styleDirty&&!this._sourcesDirty&&!!this.style&&this.style.loaded()}_update(u){return this.style&&this.style._loaded?(this._styleDirty=this._styleDirty||u,this._sourcesDirty=!0,this.triggerRepaint(),this):this}_requestRenderFrame(u){return this._update(),this._renderTaskQueue.add(u)}_cancelRenderFrame(u){this._renderTaskQueue.remove(u)}_render(u){var e,r,a,l,h;const g=this._idleTriggered?this._fadeDuration:0,b=((e=this.style.projection)===null||e===void 0?void 0:e.transitionState)>0;if(this.painter.context.setDirty(),this.painter.setBaseState(),this._renderTaskQueue.run(u),this._removed)return;let A=!1;if(this.style&&this._styleDirty){this._styleDirty=!1;const F=this.transform.zoom,O=M.now();this.style.zoomHistory.update(F,O);const Z=new o.C(F,{now:O,fadeDuration:g,zoomHistory:this.style.zoomHistory,transition:this.style.getTransition()}),J=Z.crossFadingFactor();J===1&&J===this._crossFadingFactor||(A=!0,this._crossFadingFactor=J),this.style.update(Z)}const I=((r=this.style.projection)===null||r===void 0?void 0:r.transitionState)>0!==b;(a=this.style.projection)===null||a===void 0||a.setErrorQueryLatitudeDegrees(this.transform.center.lat),this.transform.setTransitionState((l=this.style.projection)===null||l===void 0?void 0:l.transitionState,(h=this.style.projection)===null||h===void 0?void 0:h.latitudeErrorCorrectionRadians),this.style&&(this._sourcesDirty||I)&&(this._sourcesDirty=!1,this.style._updateSources(this.transform)),this.terrain?(this.terrain.sourceCache.update(this.transform,this.terrain),this.transform.setMinElevationForCurrentTile(this.terrain.getMinTileElevationForLngLatZoom(this.transform.center,this.transform.tileZoom)),!this._elevationFreeze&&this._centerClampedToGround&&this.transform.setElevation(this.terrain.getElevationForLngLatZoom(this.transform.center,this.transform.tileZoom))):(this.transform.setMinElevationForCurrentTile(0),this._centerClampedToGround&&this.transform.setElevation(0)),this._placementDirty=this.style&&this.style._updatePlacement(this.transform,this.showCollisionBoxes,g,this._crossSourceCollisions,I),this.painter.render(this.style,{showTileBoundaries:this.showTileBoundaries,showOverdrawInspector:this._showOverdrawInspector,rotating:this.isRotating(),zooming:this.isZooming(),moving:this.isMoving(),fadeDuration:g,showPadding:this.showPadding}),this.fire(new o.l("render")),this.loaded()&&!this._loaded&&(this._loaded=!0,o.cn.mark(o.co.load),this.fire(new o.l("load"))),this.style&&(this.style.hasTransitions()||A)&&(this._styleDirty=!0),this.style&&!this._placementDirty&&this.style._releaseSymbolFadeTiles();const z=this._sourcesDirty||this._styleDirty||this._placementDirty;return z||this._repaint?this.triggerRepaint():!this.isMoving()&&this.loaded()&&this.fire(new o.l("idle")),!this._loaded||this._fullyLoaded||z||(this._fullyLoaded=!0,o.cn.mark(o.co.fullLoad)),this}redraw(){return this.style&&(this._frameRequest&&(this._frameRequest.abort(),this._frameRequest=null),this._render(0)),this}remove(){var u;this._hash&&this._hash.remove();for(const r of this._controls)r.onRemove(this);this._controls=[],this._frameRequest&&(this._frameRequest.abort(),this._frameRequest=null),this._renderTaskQueue.clear(),this.painter.destroy(),this.handlers.destroy(),delete this.handlers,this.setStyle(null),typeof window<"u"&&removeEventListener("online",this._onWindowOnline,!1),te.removeThrottleControl(this._imageQueueHandle),(u=this._resizeObserver)===null||u===void 0||u.disconnect();const e=this.painter.context.gl.getExtension("WEBGL_lose_context");e!=null&&e.loseContext&&e.loseContext(),this._canvas.removeEventListener("webglcontextrestored",this._contextRestored,!1),this._canvas.removeEventListener("webglcontextlost",this._contextLost,!1),C.remove(this._canvasContainer),C.remove(this._controlContainer),this._container.removeEventListener("scroll",this._onMapScroll,!1),this._container.classList.remove("maplibregl-map"),o.cn.clearMetrics(),this._removed=!0,this.fire(new o.l("remove"))}triggerRepaint(){this.style&&!this._frameRequest&&(this._frameRequest=new AbortController,M.frame(this._frameRequest,u=>{o.cn.frame(u),this._frameRequest=null;try{this._render(u)}catch(e){if(!o.cp(e)&&!function(r){return r.message===Aa}(e))throw e}},()=>{}))}get showTileBoundaries(){return!!this._showTileBoundaries}set showTileBoundaries(u){this._showTileBoundaries!==u&&(this._showTileBoundaries=u,this._update())}get showPadding(){return!!this._showPadding}set showPadding(u){this._showPadding!==u&&(this._showPadding=u,this._update())}get showCollisionBoxes(){return!!this._showCollisionBoxes}set showCollisionBoxes(u){this._showCollisionBoxes!==u&&(this._showCollisionBoxes=u,u?this.style._generateCollisionBoxes():this._update())}get showOverdrawInspector(){return!!this._showOverdrawInspector}set showOverdrawInspector(u){this._showOverdrawInspector!==u&&(this._showOverdrawInspector=u,this._update())}get repaint(){return!!this._repaint}set repaint(u){this._repaint!==u&&(this._repaint=u,this.triggerRepaint())}get vertices(){return!!this._vertices}set vertices(u){this._vertices=u,this._update()}get version(){return zt}getCameraTargetElevation(){return this.transform.elevation}getProjection(){return this.style.getProjection()}setProjection(u){return this._lazyInitEmptyStyle(),this.style.setProjection(u),this._update(!0)}},x.MapMouseEvent=$r,x.MapTouchEvent=qo,x.MapWheelEvent=Nl,x.Marker=Co,x.NavigationControl=class{constructor(u){this._updateZoomButtons=()=>{const e=this._map.getZoom(),r=e===this._map.getMaxZoom(),a=e===this._map.getMinZoom();this._zoomInButton.disabled=r,this._zoomOutButton.disabled=a,this._zoomInButton.setAttribute("aria-disabled",r.toString()),this._zoomOutButton.setAttribute("aria-disabled",a.toString())},this._rotateCompassArrow=()=>{this._compassIcon.style.transform=this.options.visualizePitch&&this.options.visualizeRoll?`scale(${1/Math.pow(Math.cos(this._map.transform.pitchInRadians),.5)}) rotateZ(${-this._map.transform.roll}deg) rotateX(${this._map.transform.pitch}deg) rotateZ(${-this._map.transform.bearing}deg)`:this.options.visualizePitch?`scale(${1/Math.pow(Math.cos(this._map.transform.pitchInRadians),.5)}) rotateX(${this._map.transform.pitch}deg) rotateZ(${-this._map.transform.bearing}deg)`:this.options.visualizeRoll?`rotate(${-this._map.transform.bearing-this._map.transform.roll}deg)`:`rotate(${-this._map.transform.bearing}deg)`},this._setButtonTitle=(e,r)=>{const a=this._map._getUIString(`NavigationControl.${r}`);e.title=a,e.setAttribute("aria-label",a)},this.options=o.e({},Gl,u),this._container=C.create("div","maplibregl-ctrl maplibregl-ctrl-group"),this._container.addEventListener("contextmenu",e=>e.preventDefault()),this.options.showZoom&&(this._zoomInButton=this._createButton("maplibregl-ctrl-zoom-in",e=>this._map.zoomIn({},{originalEvent:e})),C.create("span","maplibregl-ctrl-icon",this._zoomInButton).setAttribute("aria-hidden","true"),this._zoomOutButton=this._createButton("maplibregl-ctrl-zoom-out",e=>this._map.zoomOut({},{originalEvent:e})),C.create("span","maplibregl-ctrl-icon",this._zoomOutButton).setAttribute("aria-hidden","true")),this.options.showCompass&&(this._compass=this._createButton("maplibregl-ctrl-compass",e=>{this.options.visualizePitch?this._map.resetNorthPitch({},{originalEvent:e}):this._map.resetNorth({},{originalEvent:e})}),this._compassIcon=C.create("span","maplibregl-ctrl-icon",this._compass),this._compassIcon.setAttribute("aria-hidden","true"))}onAdd(u){return this._map=u,this.options.showZoom&&(this._setButtonTitle(this._zoomInButton,"ZoomIn"),this._setButtonTitle(this._zoomOutButton,"ZoomOut"),this._map.on("zoom",this._updateZoomButtons),this._updateZoomButtons()),this.options.showCompass&&(this._setButtonTitle(this._compass,"ResetBearing"),this.options.visualizePitch&&this._map.on("pitch",this._rotateCompassArrow),this.options.visualizeRoll&&this._map.on("roll",this._rotateCompassArrow),this._map.on("rotate",this._rotateCompassArrow),this._rotateCompassArrow(),this._handler=new Jl(this._map,this._compass,this.options.visualizePitch)),this._container}onRemove(){C.remove(this._container),this.options.showZoom&&this._map.off("zoom",this._updateZoomButtons),this.options.showCompass&&(this.options.visualizePitch&&this._map.off("pitch",this._rotateCompassArrow),this.options.visualizeRoll&&this._map.off("roll",this._rotateCompassArrow),this._map.off("rotate",this._rotateCompassArrow),this._handler.off(),delete this._handler),delete this._map}_createButton(u,e){const r=C.create("button",u,this._container);return r.type="button",r.addEventListener("click",e),r}},x.Popup=class extends o.E{constructor(u){super(),this._updateOpacity=()=>{this.options.locationOccludedOpacity!==void 0&&(this._container.style.opacity=this._map.transform.isLocationOccluded(this.getLngLat())?`${this.options.locationOccludedOpacity}`:void 0)},this.remove=()=>(this._content&&C.remove(this._content),this._container&&(C.remove(this._container),delete this._container),this._map&&(this._map.off("move",this._update),this._map.off("move",this._onClose),this._map.off("click",this._onClose),this._map.off("remove",this.remove),this._map.off("mousemove",this._onMouseMove),this._map.off("mouseup",this._onMouseUp),this._map.off("drag",this._onDrag),this._map._canvasContainer.classList.remove("maplibregl-track-pointer"),delete this._map,this.fire(new o.l("close"))),this),this._onMouseUp=e=>{this._update(e.point)},this._onMouseMove=e=>{this._update(e.point)},this._onDrag=e=>{this._update(e.point)},this._update=e=>{if(!this._map||!this._lngLat&&!this._trackPointer||!this._content)return;if(!this._container){if(this._container=C.create("div","maplibregl-popup",this._map.getContainer()),this._tip=C.create("div","maplibregl-popup-tip",this._container),this._container.appendChild(this._content),this.options.className)for(const g of this.options.className.split(" "))this._container.classList.add(g);this._closeButton&&this._closeButton.setAttribute("aria-label",this._map._getUIString("Popup.Close")),this._trackPointer&&this._container.classList.add("maplibregl-popup-track-pointer")}if(this.options.maxWidth&&this._container.style.maxWidth!==this.options.maxWidth&&(this._container.style.maxWidth=this.options.maxWidth),this._lngLat=Xl(this._lngLat,this._flatPos,this._map.transform,this._trackPointer),this._trackPointer&&!e)return;const r=this._flatPos=this._pos=this._trackPointer&&e?e:this._map.project(this._lngLat);this._map.terrain&&(this._flatPos=this._trackPointer&&e?e:this._map.transform.locationToScreenPoint(this._lngLat));let a=this.options.anchor;const l=Jo(this.options.offset);if(!a){const g=this._container.offsetWidth,b=this._container.offsetHeight;let A;A=r.y+l.bottom.y<b?["top"]:r.y>this._map.transform.height-b?["bottom"]:[],r.x<g/2?A.push("left"):r.x>this._map.transform.width-g/2&&A.push("right"),a=A.length===0?"bottom":A.join("-")}let h=r.add(l[a]);this.options.subpixelPositioning||(h=h.round()),C.setTransform(this._container,`${tn[a]} translate(${h.x}px,${h.y}px)`),th(this._container,a,"popup"),this._updateOpacity()},this._onClose=()=>{this.remove()},this.options=o.e(Object.create(Ql),u)}addTo(u){return this._map&&this.remove(),this._map=u,this.options.closeOnClick&&this._map.on("click",this._onClose),this.options.closeOnMove&&this._map.on("move",this._onClose),this._map.on("remove",this.remove),this._update(),this._focusFirstElement(),this._trackPointer?(this._map.on("mousemove",this._onMouseMove),this._map.on("mouseup",this._onMouseUp),this._container&&this._container.classList.add("maplibregl-popup-track-pointer"),this._map._canvasContainer.classList.add("maplibregl-track-pointer")):this._map.on("move",this._update),this.fire(new o.l("open")),this}isOpen(){return!!this._map}getLngLat(){return this._lngLat}setLngLat(u){return this._lngLat=o.Q.convert(u),this._pos=null,this._flatPos=null,this._trackPointer=!1,this._update(),this._map&&(this._map.on("move",this._update),this._map.off("mousemove",this._onMouseMove),this._container&&this._container.classList.remove("maplibregl-popup-track-pointer"),this._map._canvasContainer.classList.remove("maplibregl-track-pointer")),this}trackPointer(){return this._trackPointer=!0,this._pos=null,this._flatPos=null,this._update(),this._map&&(this._map.off("move",this._update),this._map.on("mousemove",this._onMouseMove),this._map.on("drag",this._onDrag),this._container&&this._container.classList.add("maplibregl-popup-track-pointer"),this._map._canvasContainer.classList.add("maplibregl-track-pointer")),this}getElement(){return this._container}setText(u){return this.setDOMContent(document.createTextNode(u))}setHTML(u){const e=document.createDocumentFragment(),r=document.createElement("body");let a;for(r.innerHTML=u;a=r.firstChild,a;)e.appendChild(a);return this.setDOMContent(e)}getMaxWidth(){var u;return(u=this._container)===null||u===void 0?void 0:u.style.maxWidth}setMaxWidth(u){return this.options.maxWidth=u,this._update(),this}setDOMContent(u){if(this._content)for(;this._content.hasChildNodes();)this._content.firstChild&&this._content.removeChild(this._content.firstChild);else this._content=C.create("div","maplibregl-popup-content",this._container);return this._content.appendChild(u),this._createCloseButton(),this._update(),this._focusFirstElement(),this}addClassName(u){return this._container&&this._container.classList.add(u),this}removeClassName(u){return this._container&&this._container.classList.remove(u),this}setOffset(u){return this.options.offset=u,this._update(),this}toggleClassName(u){if(this._container)return this._container.classList.toggle(u)}setSubpixelPositioning(u){this.options.subpixelPositioning=u}_createCloseButton(){this.options.closeButton&&(this._closeButton=C.create("button","maplibregl-popup-close-button",this._content),this._closeButton.type="button",this._closeButton.innerHTML="×",this._closeButton.addEventListener("click",this._onClose))}_focusFirstElement(){if(!this.options.focusAfterOpen||!this._container)return;const u=this._container.querySelector(Yl);u&&u.focus()}},x.RasterDEMTileSource=pr,x.RasterTileSource=Ot,x.ScaleControl=class{constructor(u){this._onMove=()=>{Vs(this._map,this._container,this.options)},this.setUnit=e=>{this.options.unit=e,Vs(this._map,this._container,this.options)},this.options=Object.assign(Object.assign({},Bs),u)}getDefaultPosition(){return"bottom-left"}onAdd(u){return this._map=u,this._container=C.create("div","maplibregl-ctrl maplibregl-ctrl-scale",u.getContainer()),this._map.on("move",this._onMove),this._onMove(),this._container}onRemove(){C.remove(this._container),this._map.off("move",this._onMove),this._map=void 0}},x.ScrollZoomHandler=er,x.Style=xl,x.TerrainControl=class{constructor(u){this._toggleTerrain=()=>{this._map.getTerrain()?this._map.setTerrain(null):this._map.setTerrain(this.options),this._updateTerrainIcon()},this._updateTerrainIcon=()=>{this._terrainButton.classList.remove("maplibregl-ctrl-terrain"),this._terrainButton.classList.remove("maplibregl-ctrl-terrain-enabled"),this._map.terrain?(this._terrainButton.classList.add("maplibregl-ctrl-terrain-enabled"),this._terrainButton.title=this._map._getUIString("TerrainControl.Disable")):(this._terrainButton.classList.add("maplibregl-ctrl-terrain"),this._terrainButton.title=this._map._getUIString("TerrainControl.Enable"))},this.options=u}onAdd(u){return this._map=u,this._container=C.create("div","maplibregl-ctrl maplibregl-ctrl-group"),this._terrainButton=C.create("button","maplibregl-ctrl-terrain",this._container),C.create("span","maplibregl-ctrl-icon",this._terrainButton).setAttribute("aria-hidden","true"),this._terrainButton.type="button",this._terrainButton.addEventListener("click",this._toggleTerrain),this._updateTerrainIcon(),this._map.on("terrain",this._updateTerrainIcon),this._container}onRemove(){C.remove(this._container),this._map.off("terrain",this._updateTerrainIcon),this._map=void 0}},x.TwoFingersTouchPitchHandler=Oa,x.TwoFingersTouchRotateHandler=vt,x.TwoFingersTouchZoomHandler=Zo,x.TwoFingersTouchZoomRotateHandler=Zl,x.VectorTileSource=Ht,x.VideoSource=jr,x.addSourceType=(u,e)=>o._(void 0,void 0,void 0,function*(){if(gi(u))throw new Error(`A source type called "${u}" already exists.`);((r,a)=>{Ir[r]=a})(u,e)}),x.clearPrewarmedResources=function(){const u=Si;u&&(u.isPreloaded()&&u.numActive()===1?(u.release(Xi),Si=null):console.warn("Could not clear WebWorkers since there are active Map instances that still reference it. The pre-warmed WebWorker pool can only be cleared when all map instances have been removed with map.remove()"))},x.createTileMesh=un,x.getMaxParallelImageRequests=function(){return o.a.MAX_PARALLEL_IMAGE_REQUESTS},x.getRTLTextPluginStatus=function(){return Ft().getRTLTextPluginStatus()},x.getVersion=function(){return $l},x.getWorkerCount=function(){return Dr.workerCount},x.getWorkerUrl=function(){return o.a.WORKER_URL},x.importScriptInWorkers=function(u){return Yi().broadcast("IS",u)},x.prewarm=function(){Qi().acquire(Xi)},x.setMaxParallelImageRequests=function(u){o.a.MAX_PARALLEL_IMAGE_REQUESTS=u},x.setRTLTextPlugin=function(u,e){return Ft().setRTLTextPlugin(u,e)},x.setWorkerCount=function(u){Dr.workerCount=u},x.setWorkerUrl=function(u){o.a.WORKER_URL=u}});var P=_;return P})}(bc)),bc.exports}var Cy=Ty();const wh=ts(Cy);function bd(p){const f={"bottom-left":"bottom-[20px] left-[20px]","bottom-right":"bottom-[20px] right-[20px]","bottom-center":"bottom-[20px] left-1/2 -translate-x-1/2","top-left":"top-[20px] left-[20px]","top-right":"top-[20px] right-[20px]","top-center":"top-[20px] left-1/2 -translate-x-1/2",center:"top-1/2 left-1/2 -translate-x-1/2 -translate-y-1/2"};return f[p]||f["bottom-left"]}const Nr=(p,f)=>{const _=p.__vccOpts||p;for(const[v,k]of f)_[v]=k;return _},Ey={key:0,class:"p-5 pb-0 flex justify-between items-center"},Py={class:"inline-block font-semibold text-lg text-gray-800"},Iy={class:"flex flex-col gap-1 p-5"},My={class:"flex items-center justify-between w-full text-sm text-gray-800"},Ly={key:0,class:"ms-2 text-xs text-gray-500"},Ry=Nr({__name:"vs-legend-widget",props:{config:{type:Object,required:!0}},setup(p){const f=p,_=S.computed(()=>{var k;return((k=f.config)==null?void 0:k.items)||[]}),v=S.computed(()=>{var k;return((k=f.config)==null?void 0:k.title)||""});return(k,P)=>(S.openBlock(),S.createElementBlock("div",{class:"legend-widget flex flex-col bg-white border border-stone-200 shadow-2xs rounded-xl z-10 relative",style:S.normalizeStyle({width:p.config.width||"100%"})},[v.value?(S.openBlock(),S.createElementBlock("div",Ey,[S.createElementVNode("h2",Py,S.toDisplayString(v.value),1)])):S.createCommentVNode("",!0),S.createElementVNode("div",Iy,[(S.openBlock(!0),S.createElementBlock(S.Fragment,null,S.renderList(_.value,x=>(S.openBlock(),S.createElementBlock("div",{class:"flex items-center",key:x.label},[S.createElementVNode("span",{class:S.normalizeClass(["shrink-0 size-2.5 inline-block me-2.5",[x.shape==="square"?"rounded-sm":"",x.shape==="circle"?"rounded-full":"",x.shape==="line"?"w-6 h-0.5":"",x.shape==="dashed-line"?"w-6 h-0.5 dashed-line":""]]),style:S.normalizeStyle({backgroundColor:x.color})},null,6),S.createElementVNode("span",My,[S.createElementVNode("span",null,S.toDisplayString(x.label),1),x.count!==void 0?(S.openBlock(),S.createElementBlock("span",Ly," ("+S.toDisplayString(x.count)+") ",1)):S.createCommentVNode("",!0)])]))),128))])],4))}},[["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7X5l2c1AFDp2QaZBprVwLlFhGay9GOkt0aUGABEqcsGmwampQEDgGm9T3sa00CUBgwAotRlg00D09KAAcC03qc9jWkgSgMGAFHqssGmgWlpwABgWu/TnsY0EKUBA4Aoddlg08C0NPBnAT+diH1RP1wAAAAASUVORK5CYII=",zy={class:"flex flex-row gap-x-3 z-10 relative"},By=["onClick"],Vy=["src","alt"],Oy={__name:"vs-basemaps-widget",props:{map:{type:Object,required:!0},config:{type:Object,default:()=>({})},position:{type:String,default:"bottom-left"}},setup(p){const f=p,_=S.ref("voyager"),v=S.computed(()=>{var B;if(!((B=f.config)!=null&&B.layers))return[];const o=f.config.layers.map(D=>({id:D.id,title:D.label||D.title,url:D.url,service:D.type,category:"Базові карти",attribution:D.attribution,image:D.image,enabled:!0,owner:D.owner||"Unknown"}));return o.push({id:"__none__",title:"Без підложки",url:"",service:"",category:"Базові карти",attribution:"",image:Dy,enabled:!0,owner:""}),o});function k(o){return{version:8,sources:{[o.id]:{type:"raster",tiles:[o.url],tileSize:256,attribution:o.attribution||""}},layers:[{id:o.id,type:"raster",source:o.id}]}}const P=o=>{if(!f.map)return;const B=f.map.getStyle(),D=v.value.map(C=>C.id),L=B.layers.filter(C=>!D.includes(C.id)),H={};for(const C in B.sources)D.includes(C)||(H[C]=B.sources[C]);if(o.id==="__none__"){const C={version:8,sources:{...H},layers:[...L]};f.map.setStyle(C);return}const M=k(o);f.map.setStyle(M),f.map.once("styledata",()=>{for(const[C,T]of Object.entries(H))f.map.getSource(C)||f.map.addSource(C,T);for(const C of L)f.map.getLayer(C.id)||f.map.addLayer(C)})},x=o=>{_.value=o;const B=v.value.find(D=>D.id===o);B&&f.map&&P(B)};return S.onMounted(()=>{var o;(o=f.config)!=null&&o.default&&(_.value=f.config.default)}),(o,B)=>{const D=S.resolveComponent("VsPopover");return S.openBlock(),S.createElementBlock("div",zy,[(S.openBlock(!0),S.createElementBlock(S.Fragment,null,S.renderList(v.value,L=>(S.openBlock(),S.createBlock(D,{trigger:"hover",placement:"top",key:L.id},{reference:S.withCtx(()=>[S.createElementVNode("div",{class:S.normalizeClass(["w-14 h-14 flex items-center justify-center bg-white rounded-xl shadow-2xs cursor-pointer transition-all border-4",_.value===L.id?"border-blue-400":"border-transparent"]),onClick:H=>x(L.id)},[S.createElementVNode("img",{src:L.image,alt:L.title,class:S.normalizeClass(["object-cover rounded-lg",L.id==="__none__"?"w-10 h-10":"w-12 h-12"])},null,10,Vy)],10,By)]),default:S.withCtx(()=>[S.createTextVNode(S.toDisplayString(L.title)+" ",1)]),_:2},1024))),128))])}}};function Gs(p){if(!p.attrType||!p.attribute||!p.rules)return p.color||"#ccc";const f=p.rules.map(_=>[["==",["get",p.attribute],_.id||_.value],_.color]);return f.push(p.color||"#ccc"),["case",...f.flat()]}function Fy(p){if(!p.attrType||p.attrType!=="icon-by-attribute"||!p.attribute||!p.rules)return p.default_icon||null;const f=p.rules.map(_=>[["==",["get",p.attribute],_.value],_.icon]);return f.push(p.default_icon||"marker.svg"),["case",...f.flat()]}function vd(p){if(!p.attrType||p.attrType!=="attribute-pattern"||!p.attribute||!p.rules)return p.fillPattern||"";const f=p.rules.map(_=>[["==",["get",p.attribute],_.value],_.fillPattern||""]);return f.push(p.fillPattern||""),["case",...f.flat()]}function uo(p,f="stroke",_="#ccc"){return["case",["boolean",["feature-state","hovered"],!1],"#ff0000",["boolean",["feature-state","selected"],!1],"#ff0000",p[f]||_]}function Ny(p){const f=[{type:"fill",minzoom:p.pointZoom||0,paint:{"fill-color":Gs(p),"fill-outline-color":uo(p,"stroke","#ccc"),"fill-opacity":p.opacity||1,...p.attrType==="attribute-pattern"&&{"fill-pattern":vd(p)},...p.fillPattern&&!p.attrType&&{"fill-pattern":p.fillPattern}}},{type:"line",paint:{"line-color":uo(p,"stroke","#ccc"),"line-width":p.width||2,"line-opacity":p.lineOpacity||p.opacity||1}}];return p.pointZoom&&f.push({type:"circle",maxzoom:p.pointZoom,paint:{"circle-color":p.color||"#ccc","circle-stroke-color":uo(p,"stroke","#ccc"),"circle-stroke-width":p.width||2,"circle-opacity":p.opacity||1}}),f}function qy(p){return[{type:"line",paint:{"line-color":uo(p,"color",Gs(p)),"line-width":p.width||2,"line-opacity":p.opacity||1,...p.dashArray&&{"line-dasharray":p.dashArray}},layout:{...p.lineCap&&{"line-cap":p.lineCap},...p.lineJoin&&{"line-join":p.lineJoin}}}]}function Uy(p){const f=[{type:"circle",maxzoom:p.icon&&+p.iconZoom||22,paint:{"circle-radius":p.radius||6,"circle-stroke-color":uo(p,"stroke","#ccc"),"circle-stroke-width":p.width||2,"circle-color":Gs(p),"circle-opacity":p.opacity||1}}];return p!=null&&p.clusterZoom?(f.push({type:"circle",filter:["has","point_count"],paint:{"circle-color":["step",["get","point_count"],"#51bbd6",100,"#f1f075",750,"#f28cb1"],"circle-radius":["step",["get","point_count"],20,100,30,750,40]}}),f.push({type:"symbol",filter:["has","point_count"],layout:{"text-field":["get","point_count"],"text-font":["Open Sans Regular"],"text-size":12}})):p.icon&&f.push({type:"symbol",minzoom:+p.iconZoom||16,layout:{"icon-image":p.icon,"icon-allow-overlap":!0}}),f}function jy(p,f,_){const v=p.type||"point";return v==="polygon"?[{type:"fill",..._!==void 0?{maxzoom:_}:{},paint:{"fill-color":Gs(p),"fill-outline-color":uo(p,"stroke","#ccc"),"fill-opacity":p.opacity||1,...p.attrType==="attribute-pattern"&&{"fill-pattern":vd(p)},...p.fillPattern&&!p.attrType&&{"fill-pattern":p.fillPattern}}},{type:"line",..._!==void 0?{maxzoom:_}:{},paint:{"line-color":uo(p,"stroke","#ccc"),"line-width":p.width||2,"line-opacity":p.lineOpacity||p.opacity||1}}]:v==="line"?[{type:"line",..._!==void 0?{maxzoom:_}:{},paint:{"line-color":uo(p,"color",Gs(p)),"line-width":p.width||2,"line-opacity":p.opacity||1,...p.dashArray&&{"line-dasharray":p.dashArray}},layout:{...p.lineCap&&{"line-cap":p.lineCap},...p.lineJoin&&{"line-join":p.lineJoin}}}]:[{type:"circle",..._!==void 0?{maxzoom:_}:{},paint:{"circle-radius":p.radius||6,"circle-stroke-color":uo(p,"stroke","#ccc"),"circle-stroke-width":p.width||2,"circle-color":Gs(p),"circle-opacity":p.opacity||1}}]}function wd(p){var _,v;if(!p)return null;if(p.attrType==="icon-by-attribute"&&p.iconZoom){const k=Fy(p),P=Array.isArray(k)&&k[0]==="case"?k:["case",["==",["get",p.attribute],((v=(_=p.rules)==null?void 0:_[0])==null?void 0:v.value)||""],k,k],x=jy(p,void 0,+p.iconZoom),o={type:"symbol",minzoom:+p.iconZoom,layout:{"icon-image":P,"icon-size":(p==null?void 0:p.icon_size)||1,"icon-allow-overlap":!0,"icon-anchor":(p==null?void 0:p.icon_anchor)||"bottom"},paint:{"icon-opacity":p.opacity||1}};return[...x,o]}const f=p.type||"point";return f==="polygon"?Ny(p):f==="line"?qy(p):Uy(p)}function Hy(p){return p.startsWith("http")?p:`${window.location.origin}${p}`}function Wy(p){const{id:f,sourceLayer:_,url:v,bounds:k,title:P,style:x,service:o,service_type:B,source_type:D,data:L}=p,H=Hy(v),M=B||o||D||"vector";switch(M){case"vtile":case"vector":return Zy(f,_,H,k,P,x);case"raster":return Ky(f,H,k,P,x);case"geojson":return Gy(f,L||H,k,P,x);default:throw new Error(`Unsupported layer service type: ${M}`)}}function Sd(p){switch(p){case"polygon":return{type:"polygon",color:"#3388ff",opacity:.5};case"line":return{type:"line",color:"#3388ff",opacity:1};case"point":default:return{type:"point",color:"#3388ff",radius:6,opacity:1}}}function Zy(p,f,_,v,k,P){const x=f||(_.match(/\/vtile\/([^/]+)/)||[])[1],o={type:"vector",tiles:[_],...v&&{bounds:v}},B=P||Sd("polygon"),L=wd(B).map((H,M)=>({...H,id:`${p}-${M}`,"source-layer":x||p,source:p}));return{id:p,title:k,source:o,layers:L,visible:!0}}function Ky(p,f,_,v,k){const P={type:"raster",tiles:[f],tileSize:256,..._&&{bounds:_}},x=k||{},o={id:p,type:"raster",source:p,layout:{visibility:"visible"},...x&&{paint:x}};return{id:p,title:v,source:P,layers:[o],visible:!0}}function Gy(p,f,_,v,k){var L;const P={type:"geojson",data:f,..._&&{bounds:_}};let x="point";if(f&&f.features&&f.features.length>0){const H=(L=f.features[0].geometry)==null?void 0:L.type;H==="Polygon"||H==="MultiPolygon"?x="polygon":H==="LineString"||H==="MultiLineString"?x="line":x="point"}const o=k||Sd(x),D=wd(o).map((H,M)=>({...H,id:`${p}-${M}`,source:p}));return{id:p,title:v,source:P,layers:D,visible:!0}}function Jy(p){if(!p||p.attrType!=="icon-by-attribute")return[];const f=new Set;return p.default_icon&&f.add(p.default_icon),Array.isArray(p.rules)&&p.rules.forEach(_=>{_.icon&&f.add(_.icon)}),Array.from(f).map(_=>({name:_,url:(p.icon_base_url||"")+_}))}function Xy(p){const f=new Set;function _(v){typeof v=="string"?f.add(v):Array.isArray(v)&&v.forEach(_)}return p&&p["icon-image"]&&_(p["icon-image"]),Array.from(f)}async function Ad(p,f){const _=f.map(async({name:v,url:k})=>{const P=await p.loadImage(k);return{name:v,data:P.data}});try{const v=await Promise.all(_);for(const{name:k,data:P}of v)p.hasImage(k)||p.addImage(k,P)}catch(v){console.error("Failed to load icons:",v)}}function Qy(p,f,_="/icons/"){const k=Xy(f).map(P=>({name:P,url:_+P}));return Ad(p,k)}async function Lo(p,f){const _=Wy(f),v=Jy(f.style);v.length>0&&await Ad(p,v),f.layout&&f.layout["icon-image"]&&await Qy(p,f.layout),p.getSource(_.id)||p.addSource(_.id,_.source);for(const k of _.layers)f.visible!==void 0&&(k.layout={...k.layout,visibility:f.visible?"visible":"none"}),p.getLayer(k.id)?p.setLayoutProperty(k.id,"visibility",f.visible?"visible":"none"):await p.addLayer(k);return _}function Js(p,f){p.getStyle().layers.filter(k=>k.source===f).forEach(k=>{p.removeLayer(k.id)}),p.getSource(f)&&p.removeSource(f)}const Yy={class:"w-full flex flex-col bg-white border border-stone-200 shadow-2xs rounded-xl z-10 relative"},$y={class:"flex flex-col justify-between h-full pb-5 px-5"},e_={key:0,class:"relative mb-[10px]"},t_={width:"16",height:"17",viewBox:"0 0 16 17",fill:"none",xmlns:"http://www.w3.org/2000/svg",class:"absolute top-1/2 left-[8px] w-[16px] h-[16px]",style:{transform:"translate(0px, -50%)"}},r_={key:1,class:"mb-4"},i_={class:""},n_={class:"space-y-2"},o_={class:"flex items-center gap-[10px] text-gray-500"},s_={class:"dataset-checkbox-container flex"},a_=["onUpdate:modelValue","onChange"],l_={class:"text-sm"},c_={key:0,class:"text-sm text-gray-500 text-center py-2"},u_={__name:"vs-layers-widget",props:{map:{type:Object,required:!0},history:{type:Boolean,default:!1},config:{type:Object,default:()=>({layers:[],search:!1,allow_toggle_all:!1})},position:{type:String,default:"bottom-left"},hasFilters:{type:Boolean,default:!1}},emits:["set-filter-layer","update:enabledLayerIds"],setup(p,{emit:f}){const _=p,v=f,k=S.ref("");S.computed(()=>bd(_.position));const P=S.ref([]);function x(){const T=new URLSearchParams(window.location.search).get("layers");return T?T.split(","):[]}function o(C){const T=new URLSearchParams(window.location.search);C.length>0?T.set("layers",C.join(",")):T.delete("layers");const N=`${window.location.pathname}?${T.toString()}`;window.history.replaceState({},"",N)}S.onMounted(()=>{let C=[];_.history&&(C=x()),C.length>0?P.value=_.config.layers.map(T=>({...T,visible:C.includes(String(T.id))})):P.value=_.config.layers.map(T=>({...T,visible:T.visible??!1})),P.value.forEach(T=>{T.visible&&Lo(_.map,T)}),v("update:enabledLayerIds",L())});const B=S.computed(()=>{if(!k.value)return P.value;const C=k.value.toLowerCase();return P.value.filter(T=>(T.title||T.name||T.label||"").toLowerCase().includes(C))}),D=S.computed(()=>P.value.every(C=>C.visible)),L=()=>P.value.filter(C=>C.visible).map(C=>C.id),H=C=>{C.visible?Lo(_.map,C):(Js(_.map,C.id),v("set-filter-layer",null)),_.map.getStyle().layers.filter(G=>G.source===C.id).forEach(G=>{_.map.setLayoutProperty(G.id,"visibility",C.visible?"visible":"none")}),v("update:enabledLayerIds",L())},M=()=>{const C=!D.value;P.value.forEach(T=>{T.visible=C,C?Lo(_.map,T):Js(_.map,T.id)}),C||v("set-filter-layer",null),v("update:enabledLayerIds",L())};return S.watch(()=>L(),C=>{_.history&&o(C)},{deep:!0}),(C,T)=>(S.openBlock(),S.createElementBlock("div",Yy,[T[2]||(T[2]=S.createElementVNode("div",{class:"p-5 pb-3 flex justify-between items-center"},[S.createElementVNode("h2",{class:"inline-block font-semibold text-lg text-gray-800"},"Шари")],-1)),S.createElementVNode("div",$y,[p.config.search?(S.openBlock(),S.createElementBlock("div",e_,[S.withDirectives(S.createElementVNode("input",{type:"text","onUpdate:modelValue":T[0]||(T[0]=N=>k.value=N),placeholder:"Введіть назву шару...",class:"py-[7px] ps-8 pe-8 block w-full bg-gray-100 border-transparent rounded-lg text-sm focus:bg-white focus:border-blue-500 focus:ring-blue-500 disabled:opacity-50 disabled:pointer-events-none"},null,512),[[S.vModelText,k.value]]),(S.openBlock(),S.createElementBlock("svg",t_,T[1]||(T[1]=[S.createElementVNode("path",{d:"M7.33333 13.1667C10.2789 13.1667 12.6667 10.7789 12.6667 7.83333C12.6667 4.88781 10.2789 2.5 7.33333 2.5C4.38781 2.5 2 4.88781 2 7.83333C2 10.7789 4.38781 13.1667 7.33333 13.1667Z",stroke:"#6B7280","stroke-linecap":"round","stroke-linejoin":"round"},null,-1),S.createElementVNode("path",{d:"M13.9995 14.5L11.1328 11.6333",stroke:"#6B7280","stroke-linecap":"round","stroke-linejoin":"round"},null,-1)])))])):S.createCommentVNode("",!0),p.config.allow_toggle_all?(S.openBlock(),S.createElementBlock("div",r_,[S.createElementVNode("button",{onClick:M,class:"w-full py-[7px] bg-blue-500 text-white rounded-lg hover:bg-blue-600 transition-colors"},S.toDisplayString(D.value?"Вимкнути всі":"Увімкнути всі"),1)])):S.createCommentVNode("",!0),S.createElementVNode("div",i_,[S.createElementVNode("ul",n_,[(S.openBlock(!0),S.createElementBlock(S.Fragment,null,S.renderList(B.value,N=>(S.openBlock(),S.createElementBlock("li",{key:N.id,class:"flex flex-wrap justify-between items-center gap-x-2"},[S.createElementVNode("label",o_,[S.createElementVNode("span",s_,[S.withDirectives(S.createElementVNode("input",{class:"dataset-checkbox",type:"checkbox","onUpdate:modelValue":G=>N.visible=G,onChange:()=>H(N)},null,40,a_),[[S.vModelCheckbox,N.visible]])]),S.createElementVNode("span",l_,S.toDisplayString(N.title||N.name||N.label),1)])]))),128)),k.value&&B.value.length===0?(S.openBlock(),S.createElementBlock("li",c_," Шарів не знайдено ")):S.createCommentVNode("",!0)])])])]))}},h_={class:"legend-widget flex flex-col bg-white border border-stone-200 shadow-2xs rounded-xl z-10 relative"},p_={key:0,class:"p-5 pb-3 flex justify-between items-start gap-[30px]"},d_={class:"inline-block font-semibold text-lg text-gray-800 dark:text-neutral-200"},f_={class:"flex flex-col gap-1"},m_=["href"],g_={class:"flex flex-col gap-1 p-5 pt-0"},y_=["innerHTML"],__=Nr({__name:"vs-info-widget",props:{config:{type:Object,required:!0}},setup(p){const f=p,_=S.computed(()=>{var P;return((P=f.config)==null?void 0:P.title)||""}),v=S.computed(()=>{var P;return((P=f.config)==null?void 0:P.content)||""}),k=S.computed(()=>{var P;return((P=f.config)==null?void 0:P.goTo)||[]});return(P,x)=>{var B,D;const o=S.resolveComponent("VsPopover");return S.openBlock(),S.createElementBlock("div",h_,[_.value||(B=k.value)!=null&&B.length?(S.openBlock(),S.createElementBlock("div",p_,[S.createElementVNode("h2",d_,S.toDisplayString(_.value),1),(D=k.value)!=null&&D.length?(S.openBlock(),S.createBlock(o,{key:0,placement:"bottom"},{reference:S.withCtx(()=>[S.createVNode(o,{trigger:"hover",placement:"right"},{reference:S.withCtx(()=>x[0]||(x[0]=[S.createElementVNode("div",{class:"flex items-center justify-center h-8 w-8 transition-colors rounded-full hover:bg-gray-100 cursor-pointer"},[S.createElementVNode("svg",{width:"16",height:"16",viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg"},[S.createElementVNode("path",{d:"M4 12H20",stroke:"#000000","stroke-linecap":"round","stroke-linejoin":"round"}),S.createElementVNode("path",{d:"M4 6H20",stroke:"#000000","stroke-linecap":"round","stroke-linejoin":"round"}),S.createElementVNode("path",{d:"M4 18H20",stroke:"#000000","stroke-linecap":"round","stroke-linejoin":"round"})])],-1)])),default:S.withCtx(()=>[x[1]||(x[1]=S.createTextVNode(" Перейти на карту "))]),_:1,__:[1]})]),default:S.withCtx(()=>[S.createElementVNode("div",f_,[(S.openBlock(!0),S.createElementBlock(S.Fragment,null,S.renderList(k.value,L=>(S.openBlock(),S.createElementBlock("div",{key:L.label},[S.createElementVNode("a",{href:L.url,class:"text-sm text-gray-800 dark:text-neutral-200 hover:bg-gray-100 hover:text-blue-600 transition-colors rounded px-2 py-1 block"},S.toDisplayString(L.label),9,m_)]))),128))])]),_:1})):S.createCommentVNode("",!0)])):S.createCommentVNode("",!0),S.createElementVNode("div",g_,[S.createElementVNode("div",{innerHTML:v.value},null,8,y_)])])}}},[["__scopeId","data-v-81a03615"]]);function kd(p,f){return function(){return p.apply(f,arguments)}}const{toString:x_}=Object.prototype,{getPrototypeOf:Sh}=Object,{iterator:vc,toStringTag:Td}=Symbol,wc=(p=>f=>{const _=x_.call(f);return p[_]||(p[_]=_.slice(8,-1).toLowerCase())})(Object.create(null)),Cn=p=>(p=p.toLowerCase(),f=>wc(f)===p),Sc=p=>f=>typeof f===p,{isArray:Xs}=Array,il=Sc("undefined");function b_(p){return p!==null&&!il(p)&&p.constructor!==null&&!il(p.constructor)&&Wi(p.constructor.isBuffer)&&p.constructor.isBuffer(p)}const Cd=Cn("ArrayBuffer");function v_(p){let f;return typeof ArrayBuffer<"u"&&ArrayBuffer.isView?f=ArrayBuffer.isView(p):f=p&&p.buffer&&Cd(p.buffer),f}const w_=Sc("string"),Wi=Sc("function"),Ed=Sc("number"),Ac=p=>p!==null&&typeof p=="object",S_=p=>p===!0||p===!1,kc=p=>{if(wc(p)!=="object")return!1;const f=Sh(p);return(f===null||f===Object.prototype||Object.getPrototypeOf(f)===null)&&!(Td in p)&&!(vc in p)},A_=Cn("Date"),k_=Cn("File"),T_=Cn("Blob"),C_=Cn("FileList"),E_=p=>Ac(p)&&Wi(p.pipe),P_=p=>{let f;return p&&(typeof FormData=="function"&&p instanceof FormData||Wi(p.append)&&((f=wc(p))==="formdata"||f==="object"&&Wi(p.toString)&&p.toString()==="[object FormData]"))},I_=Cn("URLSearchParams"),[M_,L_,R_,D_]=["ReadableStream","Request","Response","Headers"].map(Cn),z_=p=>p.trim?p.trim():p.replace(/^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g,"");function nl(p,f,{allOwnKeys:_=!1}={}){if(p===null||typeof p>"u")return;let v,k;if(typeof p!="object"&&(p=[p]),Xs(p))for(v=0,k=p.length;v<k;v++)f.call(null,p[v],v,p);else{const P=_?Object.getOwnPropertyNames(p):Object.keys(p),x=P.length;let o;for(v=0;v<x;v++)o=P[v],f.call(null,p[o],o,p)}}function Pd(p,f){f=f.toLowerCase();const _=Object.keys(p);let v=_.length,k;for(;v-- >0;)if(k=_[v],f===k.toLowerCase())return k;return null}const rs=typeof globalThis<"u"?globalThis:typeof self<"u"?self:typeof window<"u"?window:global,Id=p=>!il(p)&&p!==rs;function Ah(){const{caseless:p}=Id(this)&&this||{},f={},_=(v,k)=>{const P=p&&Pd(f,k)||k;kc(f[P])&&kc(v)?f[P]=Ah(f[P],v):kc(v)?f[P]=Ah({},v):Xs(v)?f[P]=v.slice():f[P]=v};for(let v=0,k=arguments.length;v<k;v++)arguments[v]&&nl(arguments[v],_);return f}const B_=(p,f,_,{allOwnKeys:v}={})=>(nl(f,(k,P)=>{_&&Wi(k)?p[P]=kd(k,_):p[P]=k},{allOwnKeys:v}),p),V_=p=>(p.charCodeAt(0)===65279&&(p=p.slice(1)),p),O_=(p,f,_,v)=>{p.prototype=Object.create(f.prototype,v),p.prototype.constructor=p,Object.defineProperty(p,"super",{value:f.prototype}),_&&Object.assign(p.prototype,_)},F_=(p,f,_,v)=>{let k,P,x;const o={};if(f=f||{},p==null)return f;do{for(k=Object.getOwnPropertyNames(p),P=k.length;P-- >0;)x=k[P],(!v||v(x,p,f))&&!o[x]&&(f[x]=p[x],o[x]=!0);p=_!==!1&&Sh(p)}while(p&&(!_||_(p,f))&&p!==Object.prototype);return f},N_=(p,f,_)=>{p=String(p),(_===void 0||_>p.length)&&(_=p.length),_-=f.length;const v=p.indexOf(f,_);return v!==-1&&v===_},q_=p=>{if(!p)return null;if(Xs(p))return p;let f=p.length;if(!Ed(f))return null;const _=new Array(f);for(;f-- >0;)_[f]=p[f];return _},U_=(p=>f=>p&&f instanceof p)(typeof Uint8Array<"u"&&Sh(Uint8Array)),j_=(p,f)=>{const v=(p&&p[vc]).call(p);let k;for(;(k=v.next())&&!k.done;){const P=k.value;f.call(p,P[0],P[1])}},H_=(p,f)=>{let _;const v=[];for(;(_=p.exec(f))!==null;)v.push(_);return v},W_=Cn("HTMLFormElement"),Z_=p=>p.toLowerCase().replace(/[-_\s]([a-z\d])(\w*)/g,function(_,v,k){return v.toUpperCase()+k}),Md=(({hasOwnProperty:p})=>(f,_)=>p.call(f,_))(Object.prototype),K_=Cn("RegExp"),Ld=(p,f)=>{const _=Object.getOwnPropertyDescriptors(p),v={};nl(_,(k,P)=>{let x;(x=f(k,P,p))!==!1&&(v[P]=x||k)}),Object.defineProperties(p,v)},G_=p=>{Ld(p,(f,_)=>{if(Wi(p)&&["arguments","caller","callee"].indexOf(_)!==-1)return!1;const v=p[_];if(Wi(v)){if(f.enumerable=!1,"writable"in f){f.writable=!1;return}f.set||(f.set=()=>{throw Error("Can not rewrite read-only method '"+_+"'")})}})},J_=(p,f)=>{const _={},v=k=>{k.forEach(P=>{_[P]=!0})};return Xs(p)?v(p):v(String(p).split(f)),_},X_=()=>{},Q_=(p,f)=>p!=null&&Number.isFinite(p=+p)?p:f;function Y_(p){return!!(p&&Wi(p.append)&&p[Td]==="FormData"&&p[vc])}const $_=p=>{const f=new Array(10),_=(v,k)=>{if(Ac(v)){if(f.indexOf(v)>=0)return;if(!("toJSON"in v)){f[k]=v;const P=Xs(v)?[]:{};return nl(v,(x,o)=>{const B=_(x,k+1);!il(B)&&(P[o]=B)}),f[k]=void 0,P}}return v};return _(p,0)},e0=Cn("AsyncFunction"),t0=p=>p&&(Ac(p)||Wi(p))&&Wi(p.then)&&Wi(p.catch),Rd=((p,f)=>p?setImmediate:f?((_,v)=>(rs.addEventListener("message",({source:k,data:P})=>{k===rs&&P===_&&v.length&&v.shift()()},!1),k=>{v.push(k),rs.postMessage(_,"*")}))(`axios@${Math.random()}`,[]):_=>setTimeout(_))(typeof setImmediate=="function",Wi(rs.postMessage)),r0=typeof queueMicrotask<"u"?queueMicrotask.bind(rs):typeof process<"u"&&process.nextTick||Rd,Ke={isArray:Xs,isArrayBuffer:Cd,isBuffer:b_,isFormData:P_,isArrayBufferView:v_,isString:w_,isNumber:Ed,isBoolean:S_,isObject:Ac,isPlainObject:kc,isReadableStream:M_,isRequest:L_,isResponse:R_,isHeaders:D_,isUndefined:il,isDate:A_,isFile:k_,isBlob:T_,isRegExp:K_,isFunction:Wi,isStream:E_,isURLSearchParams:I_,isTypedArray:U_,isFileList:C_,forEach:nl,merge:Ah,extend:B_,trim:z_,stripBOM:V_,inherits:O_,toFlatObject:F_,kindOf:wc,kindOfTest:Cn,endsWith:N_,toArray:q_,forEachEntry:j_,matchAll:H_,isHTMLForm:W_,hasOwnProperty:Md,hasOwnProp:Md,reduceDescriptors:Ld,freezeMethods:G_,toObjectSet:J_,toCamelCase:Z_,noop:X_,toFiniteNumber:Q_,findKey:Pd,global:rs,isContextDefined:Id,isSpecCompliantForm:Y_,toJSONObject:$_,isAsyncFn:e0,isThenable:t0,setImmediate:Rd,asap:r0,isIterable:p=>p!=null&&Wi(p[vc])};function Yt(p,f,_,v,k){Error.call(this),Error.captureStackTrace?Error.captureStackTrace(this,this.constructor):this.stack=new Error().stack,this.message=p,this.name="AxiosError",f&&(this.code=f),_&&(this.config=_),v&&(this.request=v),k&&(this.response=k,this.status=k.status?k.status:null)}Ke.inherits(Yt,Error,{toJSON:function(){return{message:this.message,name:this.name,description:this.description,number:this.number,fileName:this.fileName,lineNumber:this.lineNumber,columnNumber:this.columnNumber,stack:this.stack,config:Ke.toJSONObject(this.config),code:this.code,status:this.status}}});const Dd=Yt.prototype,zd={};["ERR_BAD_OPTION_VALUE","ERR_BAD_OPTION","ECONNABORTED","ETIMEDOUT","ERR_NETWORK","ERR_FR_TOO_MANY_REDIRECTS","ERR_DEPRECATED","ERR_BAD_RESPONSE","ERR_BAD_REQUEST","ERR_CANCELED","ERR_NOT_SUPPORT","ERR_INVALID_URL"].forEach(p=>{zd[p]={value:p}}),Object.defineProperties(Yt,zd),Object.defineProperty(Dd,"isAxiosError",{value:!0}),Yt.from=(p,f,_,v,k,P)=>{const x=Object.create(Dd);return Ke.toFlatObject(p,x,function(B){return B!==Error.prototype},o=>o!=="isAxiosError"),Yt.call(x,p.message,f,_,v,k),x.cause=p,x.name=p.name,P&&Object.assign(x,P),x};const i0=null;function kh(p){return Ke.isPlainObject(p)||Ke.isArray(p)}function Bd(p){return Ke.endsWith(p,"[]")?p.slice(0,-2):p}function Vd(p,f,_){return p?p.concat(f).map(function(k,P){return k=Bd(k),!_&&P?"["+k+"]":k}).join(_?".":""):f}function n0(p){return Ke.isArray(p)&&!p.some(kh)}const o0=Ke.toFlatObject(Ke,{},null,function(f){return/^is[A-Z]/.test(f)});function Tc(p,f,_){if(!Ke.isObject(p))throw new TypeError("target must be an object");f=f||new FormData,_=Ke.toFlatObject(_,{metaTokens:!0,dots:!1,indexes:!1},!1,function(N,G){return!Ke.isUndefined(G[N])});const v=_.metaTokens,k=_.visitor||L,P=_.dots,x=_.indexes,B=(_.Blob||typeof Blob<"u"&&Blob)&&Ke.isSpecCompliantForm(f);if(!Ke.isFunction(k))throw new TypeError("visitor must be a function");function D(T){if(T===null)return"";if(Ke.isDate(T))return T.toISOString();if(!B&&Ke.isBlob(T))throw new Yt("Blob is not supported. Use a Buffer instead.");return Ke.isArrayBuffer(T)||Ke.isTypedArray(T)?B&&typeof Blob=="function"?new Blob([T]):Buffer.from(T):T}function L(T,N,G){let ie=T;if(T&&!G&&typeof T=="object"){if(Ke.endsWith(N,"{}"))N=v?N:N.slice(0,-2),T=JSON.stringify(T);else if(Ke.isArray(T)&&n0(T)||(Ke.isFileList(T)||Ke.endsWith(N,"[]"))&&(ie=Ke.toArray(T)))return N=Bd(N),ie.forEach(function(Ee,te){!(Ke.isUndefined(Ee)||Ee===null)&&f.append(x===!0?Vd([N],te,P):x===null?N:N+"[]",D(Ee))}),!1}return kh(T)?!0:(f.append(Vd(G,N,P),D(T)),!1)}const H=[],M=Object.assign(o0,{defaultVisitor:L,convertValue:D,isVisitable:kh});function C(T,N){if(!Ke.isUndefined(T)){if(H.indexOf(T)!==-1)throw Error("Circular reference detected in "+N.join("."));H.push(T),Ke.forEach(T,function(ie,le){(!(Ke.isUndefined(ie)||ie===null)&&k.call(f,ie,Ke.isString(le)?le.trim():le,N,M))===!0&&C(ie,N?N.concat(le):[le])}),H.pop()}}if(!Ke.isObject(p))throw new TypeError("data must be an object");return C(p),f}function Od(p){const f={"!":"%21","'":"%27","(":"%28",")":"%29","~":"%7E","%20":"+","%00":"\0"};return encodeURIComponent(p).replace(/[!'()~]|%20|%00/g,function(v){return f[v]})}function Th(p,f){this._pairs=[],p&&Tc(p,this,f)}const Fd=Th.prototype;Fd.append=function(f,_){this._pairs.push([f,_])},Fd.toString=function(f){const _=f?function(v){return f.call(this,v,Od)}:Od;return this._pairs.map(function(k){return _(k[0])+"="+_(k[1])},"").join("&")};function s0(p){return encodeURIComponent(p).replace(/%3A/gi,":").replace(/%24/g,"$").replace(/%2C/gi,",").replace(/%20/g,"+").replace(/%5B/gi,"[").replace(/%5D/gi,"]")}function Nd(p,f,_){if(!f)return p;const v=_&&_.encode||s0;Ke.isFunction(_)&&(_={serialize:_});const k=_&&_.serialize;let P;if(k?P=k(f,_):P=Ke.isURLSearchParams(f)?f.toString():new Th(f,_).toString(v),P){const x=p.indexOf("#");x!==-1&&(p=p.slice(0,x)),p+=(p.indexOf("?")===-1?"?":"&")+P}return p}class qd{constructor(){this.handlers=[]}use(f,_,v){return this.handlers.push({fulfilled:f,rejected:_,synchronous:v?v.synchronous:!1,runWhen:v?v.runWhen:null}),this.handlers.length-1}eject(f){this.handlers[f]&&(this.handlers[f]=null)}clear(){this.handlers&&(this.handlers=[])}forEach(f){Ke.forEach(this.handlers,function(v){v!==null&&f(v)})}}const Ud={silentJSONParsing:!0,forcedJSONParsing:!0,clarifyTimeoutError:!1},a0={isBrowser:!0,classes:{URLSearchParams:typeof URLSearchParams<"u"?URLSearchParams:Th,FormData:typeof FormData<"u"?FormData:null,Blob:typeof Blob<"u"?Blob:null},protocols:["http","https","file","blob","url","data"]},Ch=typeof window<"u"&&typeof document<"u",Eh=typeof navigator=="object"&&navigator||void 0,l0=Ch&&(!Eh||["ReactNative","NativeScript","NS"].indexOf(Eh.product)<0),c0=typeof WorkerGlobalScope<"u"&&self instanceof WorkerGlobalScope&&typeof self.importScripts=="function",u0=Ch&&window.location.href||"http://localhost",Mi={...Object.freeze(Object.defineProperty({__proto__:null,hasBrowserEnv:Ch,hasStandardBrowserEnv:l0,hasStandardBrowserWebWorkerEnv:c0,navigator:Eh,origin:u0},Symbol.toStringTag,{value:"Module"})),...a0};function h0(p,f){return Tc(p,new Mi.classes.URLSearchParams,Object.assign({visitor:function(_,v,k,P){return Mi.isNode&&Ke.isBuffer(_)?(this.append(v,_.toString("base64")),!1):P.defaultVisitor.apply(this,arguments)}},f))}function p0(p){return Ke.matchAll(/\w+|\[(\w*)]/g,p).map(f=>f[0]==="[]"?"":f[1]||f[0])}function d0(p){const f={},_=Object.keys(p);let v;const k=_.length;let P;for(v=0;v<k;v++)P=_[v],f[P]=p[P];return f}function jd(p){function f(_,v,k,P){let x=_[P++];if(x==="__proto__")return!0;const o=Number.isFinite(+x),B=P>=_.length;return x=!x&&Ke.isArray(k)?k.length:x,B?(Ke.hasOwnProp(k,x)?k[x]=[k[x],v]:k[x]=v,!o):((!k[x]||!Ke.isObject(k[x]))&&(k[x]=[]),f(_,v,k[x],P)&&Ke.isArray(k[x])&&(k[x]=d0(k[x])),!o)}if(Ke.isFormData(p)&&Ke.isFunction(p.entries)){const _={};return Ke.forEachEntry(p,(v,k)=>{f(p0(v),k,_,0)}),_}return null}function f0(p,f,_){if(Ke.isString(p))try{return(f||JSON.parse)(p),Ke.trim(p)}catch(v){if(v.name!=="SyntaxError")throw v}return(_||JSON.stringify)(p)}const ol={transitional:Ud,adapter:["xhr","http","fetch"],transformRequest:[function(f,_){const v=_.getContentType()||"",k=v.indexOf("application/json")>-1,P=Ke.isObject(f);if(P&&Ke.isHTMLForm(f)&&(f=new FormData(f)),Ke.isFormData(f))return k?JSON.stringify(jd(f)):f;if(Ke.isArrayBuffer(f)||Ke.isBuffer(f)||Ke.isStream(f)||Ke.isFile(f)||Ke.isBlob(f)||Ke.isReadableStream(f))return f;if(Ke.isArrayBufferView(f))return f.buffer;if(Ke.isURLSearchParams(f))return _.setContentType("application/x-www-form-urlencoded;charset=utf-8",!1),f.toString();let o;if(P){if(v.indexOf("application/x-www-form-urlencoded")>-1)return h0(f,this.formSerializer).toString();if((o=Ke.isFileList(f))||v.indexOf("multipart/form-data")>-1){const B=this.env&&this.env.FormData;return Tc(o?{"files[]":f}:f,B&&new B,this.formSerializer)}}return P||k?(_.setContentType("application/json",!1),f0(f)):f}],transformResponse:[function(f){const _=this.transitional||ol.transitional,v=_&&_.forcedJSONParsing,k=this.responseType==="json";if(Ke.isResponse(f)||Ke.isReadableStream(f))return f;if(f&&Ke.isString(f)&&(v&&!this.responseType||k)){const x=!(_&&_.silentJSONParsing)&&k;try{return JSON.parse(f)}catch(o){if(x)throw o.name==="SyntaxError"?Yt.from(o,Yt.ERR_BAD_RESPONSE,this,null,this.response):o}}return f}],timeout:0,xsrfCookieName:"XSRF-TOKEN",xsrfHeaderName:"X-XSRF-TOKEN",maxContentLength:-1,maxBodyLength:-1,env:{FormData:Mi.classes.FormData,Blob:Mi.classes.Blob},validateStatus:function(f){return f>=200&&f<300},headers:{common:{Accept:"application/json, text/plain, */*","Content-Type":void 0}}};Ke.forEach(["delete","get","head","post","put","patch"],p=>{ol.headers[p]={}});const m0=Ke.toObjectSet(["age","authorization","content-length","content-type","etag","expires","from","host","if-modified-since","if-unmodified-since","last-modified","location","max-forwards","proxy-authorization","referer","retry-after","user-agent"]),g0=p=>{const f={};let _,v,k;return p&&p.split(`
|
|
742
|
-
`).forEach(function(x){k=x.indexOf(":"),_=x.substring(0,k).trim().toLowerCase(),v=x.substring(k+1).trim(),!(!_||f[_]&&m0[_])&&(_==="set-cookie"?f[_]?f[_].push(v):f[_]=[v]:f[_]=f[_]?f[_]+", "+v:v)}),f},Hd=Symbol("internals");function sl(p){return p&&String(p).trim().toLowerCase()}function Cc(p){return p===!1||p==null?p:Ke.isArray(p)?p.map(Cc):String(p)}function y0(p){const f=Object.create(null),_=/([^\s,;=]+)\s*(?:=\s*([^,;]+))?/g;let v;for(;v=_.exec(p);)f[v[1]]=v[2];return f}const _0=p=>/^[-_a-zA-Z0-9^`|~,!#$%&'*+.]+$/.test(p.trim());function Ph(p,f,_,v,k){if(Ke.isFunction(v))return v.call(this,f,_);if(k&&(f=_),!!Ke.isString(f)){if(Ke.isString(v))return f.indexOf(v)!==-1;if(Ke.isRegExp(v))return v.test(f)}}function x0(p){return p.trim().toLowerCase().replace(/([a-z\d])(\w*)/g,(f,_,v)=>_.toUpperCase()+v)}function b0(p,f){const _=Ke.toCamelCase(" "+f);["get","set","has"].forEach(v=>{Object.defineProperty(p,v+_,{value:function(k,P,x){return this[v].call(this,f,k,P,x)},configurable:!0})})}let Zi=class{constructor(f){f&&this.set(f)}set(f,_,v){const k=this;function P(o,B,D){const L=sl(B);if(!L)throw new Error("header name must be a non-empty string");const H=Ke.findKey(k,L);(!H||k[H]===void 0||D===!0||D===void 0&&k[H]!==!1)&&(k[H||B]=Cc(o))}const x=(o,B)=>Ke.forEach(o,(D,L)=>P(D,L,B));if(Ke.isPlainObject(f)||f instanceof this.constructor)x(f,_);else if(Ke.isString(f)&&(f=f.trim())&&!_0(f))x(g0(f),_);else if(Ke.isObject(f)&&Ke.isIterable(f)){let o={},B,D;for(const L of f){if(!Ke.isArray(L))throw TypeError("Object iterator must return a key-value pair");o[D=L[0]]=(B=o[D])?Ke.isArray(B)?[...B,L[1]]:[B,L[1]]:L[1]}x(o,_)}else f!=null&&P(_,f,v);return this}get(f,_){if(f=sl(f),f){const v=Ke.findKey(this,f);if(v){const k=this[v];if(!_)return k;if(_===!0)return y0(k);if(Ke.isFunction(_))return _.call(this,k,v);if(Ke.isRegExp(_))return _.exec(k);throw new TypeError("parser must be boolean|regexp|function")}}}has(f,_){if(f=sl(f),f){const v=Ke.findKey(this,f);return!!(v&&this[v]!==void 0&&(!_||Ph(this,this[v],v,_)))}return!1}delete(f,_){const v=this;let k=!1;function P(x){if(x=sl(x),x){const o=Ke.findKey(v,x);o&&(!_||Ph(v,v[o],o,_))&&(delete v[o],k=!0)}}return Ke.isArray(f)?f.forEach(P):P(f),k}clear(f){const _=Object.keys(this);let v=_.length,k=!1;for(;v--;){const P=_[v];(!f||Ph(this,this[P],P,f,!0))&&(delete this[P],k=!0)}return k}normalize(f){const _=this,v={};return Ke.forEach(this,(k,P)=>{const x=Ke.findKey(v,P);if(x){_[x]=Cc(k),delete _[P];return}const o=f?x0(P):String(P).trim();o!==P&&delete _[P],_[o]=Cc(k),v[o]=!0}),this}concat(...f){return this.constructor.concat(this,...f)}toJSON(f){const _=Object.create(null);return Ke.forEach(this,(v,k)=>{v!=null&&v!==!1&&(_[k]=f&&Ke.isArray(v)?v.join(", "):v)}),_}[Symbol.iterator](){return Object.entries(this.toJSON())[Symbol.iterator]()}toString(){return Object.entries(this.toJSON()).map(([f,_])=>f+": "+_).join(`
|
|
743
|
-
`)}getSetCookie(){return this.get("set-cookie")||[]}get[Symbol.toStringTag](){return"AxiosHeaders"}static from(f){return f instanceof this?f:new this(f)}static concat(f,..._){const v=new this(f);return _.forEach(k=>v.set(k)),v}static accessor(f){const v=(this[Hd]=this[Hd]={accessors:{}}).accessors,k=this.prototype;function P(x){const o=sl(x);v[o]||(b0(k,x),v[o]=!0)}return Ke.isArray(f)?f.forEach(P):P(f),this}};Zi.accessor(["Content-Type","Content-Length","Accept","Accept-Encoding","User-Agent","Authorization"]),Ke.reduceDescriptors(Zi.prototype,({value:p},f)=>{let _=f[0].toUpperCase()+f.slice(1);return{get:()=>p,set(v){this[_]=v}}}),Ke.freezeMethods(Zi);function Ih(p,f){const _=this||ol,v=f||_,k=Zi.from(v.headers);let P=v.data;return Ke.forEach(p,function(o){P=o.call(_,P,k.normalize(),f?f.status:void 0)}),k.normalize(),P}function Wd(p){return!!(p&&p.__CANCEL__)}function Qs(p,f,_){Yt.call(this,p??"canceled",Yt.ERR_CANCELED,f,_),this.name="CanceledError"}Ke.inherits(Qs,Yt,{__CANCEL__:!0});function Zd(p,f,_){const v=_.config.validateStatus;!_.status||!v||v(_.status)?p(_):f(new Yt("Request failed with status code "+_.status,[Yt.ERR_BAD_REQUEST,Yt.ERR_BAD_RESPONSE][Math.floor(_.status/100)-4],_.config,_.request,_))}function v0(p){const f=/^([-+\w]{1,25})(:?\/\/|:)/.exec(p);return f&&f[1]||""}function w0(p,f){p=p||10;const _=new Array(p),v=new Array(p);let k=0,P=0,x;return f=f!==void 0?f:1e3,function(B){const D=Date.now(),L=v[P];x||(x=D),_[k]=B,v[k]=D;let H=P,M=0;for(;H!==k;)M+=_[H++],H=H%p;if(k=(k+1)%p,k===P&&(P=(P+1)%p),D-x<f)return;const C=L&&D-L;return C?Math.round(M*1e3/C):void 0}}function S0(p,f){let _=0,v=1e3/f,k,P;const x=(D,L=Date.now())=>{_=L,k=null,P&&(clearTimeout(P),P=null),p.apply(null,D)};return[(...D)=>{const L=Date.now(),H=L-_;H>=v?x(D,L):(k=D,P||(P=setTimeout(()=>{P=null,x(k)},v-H)))},()=>k&&x(k)]}const Ec=(p,f,_=3)=>{let v=0;const k=w0(50,250);return S0(P=>{const x=P.loaded,o=P.lengthComputable?P.total:void 0,B=x-v,D=k(B),L=x<=o;v=x;const H={loaded:x,total:o,progress:o?x/o:void 0,bytes:B,rate:D||void 0,estimated:D&&o&&L?(o-x)/D:void 0,event:P,lengthComputable:o!=null,[f?"download":"upload"]:!0};p(H)},_)},Kd=(p,f)=>{const _=p!=null;return[v=>f[0]({lengthComputable:_,total:p,loaded:v}),f[1]]},Gd=p=>(...f)=>Ke.asap(()=>p(...f)),A0=Mi.hasStandardBrowserEnv?((p,f)=>_=>(_=new URL(_,Mi.origin),p.protocol===_.protocol&&p.host===_.host&&(f||p.port===_.port)))(new URL(Mi.origin),Mi.navigator&&/(msie|trident)/i.test(Mi.navigator.userAgent)):()=>!0,k0=Mi.hasStandardBrowserEnv?{write(p,f,_,v,k,P){const x=[p+"="+encodeURIComponent(f)];Ke.isNumber(_)&&x.push("expires="+new Date(_).toGMTString()),Ke.isString(v)&&x.push("path="+v),Ke.isString(k)&&x.push("domain="+k),P===!0&&x.push("secure"),document.cookie=x.join("; ")},read(p){const f=document.cookie.match(new RegExp("(^|;\\s*)("+p+")=([^;]*)"));return f?decodeURIComponent(f[3]):null},remove(p){this.write(p,"",Date.now()-864e5)}}:{write(){},read(){return null},remove(){}};function T0(p){return/^([a-z][a-z\d+\-.]*:)?\/\//i.test(p)}function C0(p,f){return f?p.replace(/\/?\/$/,"")+"/"+f.replace(/^\/+/,""):p}function Jd(p,f,_){let v=!T0(f);return p&&(v||_==!1)?C0(p,f):f}const Xd=p=>p instanceof Zi?{...p}:p;function is(p,f){f=f||{};const _={};function v(D,L,H,M){return Ke.isPlainObject(D)&&Ke.isPlainObject(L)?Ke.merge.call({caseless:M},D,L):Ke.isPlainObject(L)?Ke.merge({},L):Ke.isArray(L)?L.slice():L}function k(D,L,H,M){if(Ke.isUndefined(L)){if(!Ke.isUndefined(D))return v(void 0,D,H,M)}else return v(D,L,H,M)}function P(D,L){if(!Ke.isUndefined(L))return v(void 0,L)}function x(D,L){if(Ke.isUndefined(L)){if(!Ke.isUndefined(D))return v(void 0,D)}else return v(void 0,L)}function o(D,L,H){if(H in f)return v(D,L);if(H in p)return v(void 0,D)}const B={url:P,method:P,data:P,baseURL:x,transformRequest:x,transformResponse:x,paramsSerializer:x,timeout:x,timeoutMessage:x,withCredentials:x,withXSRFToken:x,adapter:x,responseType:x,xsrfCookieName:x,xsrfHeaderName:x,onUploadProgress:x,onDownloadProgress:x,decompress:x,maxContentLength:x,maxBodyLength:x,beforeRedirect:x,transport:x,httpAgent:x,httpsAgent:x,cancelToken:x,socketPath:x,responseEncoding:x,validateStatus:o,headers:(D,L,H)=>k(Xd(D),Xd(L),H,!0)};return Ke.forEach(Object.keys(Object.assign({},p,f)),function(L){const H=B[L]||k,M=H(p[L],f[L],L);Ke.isUndefined(M)&&H!==o||(_[L]=M)}),_}const Qd=p=>{const f=is({},p);let{data:_,withXSRFToken:v,xsrfHeaderName:k,xsrfCookieName:P,headers:x,auth:o}=f;f.headers=x=Zi.from(x),f.url=Nd(Jd(f.baseURL,f.url,f.allowAbsoluteUrls),p.params,p.paramsSerializer),o&&x.set("Authorization","Basic "+btoa((o.username||"")+":"+(o.password?unescape(encodeURIComponent(o.password)):"")));let B;if(Ke.isFormData(_)){if(Mi.hasStandardBrowserEnv||Mi.hasStandardBrowserWebWorkerEnv)x.setContentType(void 0);else if((B=x.getContentType())!==!1){const[D,...L]=B?B.split(";").map(H=>H.trim()).filter(Boolean):[];x.setContentType([D||"multipart/form-data",...L].join("; "))}}if(Mi.hasStandardBrowserEnv&&(v&&Ke.isFunction(v)&&(v=v(f)),v||v!==!1&&A0(f.url))){const D=k&&P&&k0.read(P);D&&x.set(k,D)}return f},E0=typeof XMLHttpRequest<"u"&&function(p){return new Promise(function(_,v){const k=Qd(p);let P=k.data;const x=Zi.from(k.headers).normalize();let{responseType:o,onUploadProgress:B,onDownloadProgress:D}=k,L,H,M,C,T;function N(){C&&C(),T&&T(),k.cancelToken&&k.cancelToken.unsubscribe(L),k.signal&&k.signal.removeEventListener("abort",L)}let G=new XMLHttpRequest;G.open(k.method.toUpperCase(),k.url,!0),G.timeout=k.timeout;function ie(){if(!G)return;const Ee=Zi.from("getAllResponseHeaders"in G&&G.getAllResponseHeaders()),me={data:!o||o==="text"||o==="json"?G.responseText:G.response,status:G.status,statusText:G.statusText,headers:Ee,config:p,request:G};Zd(function(qe){_(qe),N()},function(qe){v(qe),N()},me),G=null}"onloadend"in G?G.onloadend=ie:G.onreadystatechange=function(){!G||G.readyState!==4||G.status===0&&!(G.responseURL&&G.responseURL.indexOf("file:")===0)||setTimeout(ie)},G.onabort=function(){G&&(v(new Yt("Request aborted",Yt.ECONNABORTED,p,G)),G=null)},G.onerror=function(){v(new Yt("Network Error",Yt.ERR_NETWORK,p,G)),G=null},G.ontimeout=function(){let te=k.timeout?"timeout of "+k.timeout+"ms exceeded":"timeout exceeded";const me=k.transitional||Ud;k.timeoutErrorMessage&&(te=k.timeoutErrorMessage),v(new Yt(te,me.clarifyTimeoutError?Yt.ETIMEDOUT:Yt.ECONNABORTED,p,G)),G=null},P===void 0&&x.setContentType(null),"setRequestHeader"in G&&Ke.forEach(x.toJSON(),function(te,me){G.setRequestHeader(me,te)}),Ke.isUndefined(k.withCredentials)||(G.withCredentials=!!k.withCredentials),o&&o!=="json"&&(G.responseType=k.responseType),D&&([M,T]=Ec(D,!0),G.addEventListener("progress",M)),B&&G.upload&&([H,C]=Ec(B),G.upload.addEventListener("progress",H),G.upload.addEventListener("loadend",C)),(k.cancelToken||k.signal)&&(L=Ee=>{G&&(v(!Ee||Ee.type?new Qs(null,p,G):Ee),G.abort(),G=null)},k.cancelToken&&k.cancelToken.subscribe(L),k.signal&&(k.signal.aborted?L():k.signal.addEventListener("abort",L)));const le=v0(k.url);if(le&&Mi.protocols.indexOf(le)===-1){v(new Yt("Unsupported protocol "+le+":",Yt.ERR_BAD_REQUEST,p));return}G.send(P||null)})},P0=(p,f)=>{const{length:_}=p=p?p.filter(Boolean):[];if(f||_){let v=new AbortController,k;const P=function(D){if(!k){k=!0,o();const L=D instanceof Error?D:this.reason;v.abort(L instanceof Yt?L:new Qs(L instanceof Error?L.message:L))}};let x=f&&setTimeout(()=>{x=null,P(new Yt(`timeout ${f} of ms exceeded`,Yt.ETIMEDOUT))},f);const o=()=>{p&&(x&&clearTimeout(x),x=null,p.forEach(D=>{D.unsubscribe?D.unsubscribe(P):D.removeEventListener("abort",P)}),p=null)};p.forEach(D=>D.addEventListener("abort",P));const{signal:B}=v;return B.unsubscribe=()=>Ke.asap(o),B}},I0=function*(p,f){let _=p.byteLength;if(_<f){yield p;return}let v=0,k;for(;v<_;)k=v+f,yield p.slice(v,k),v=k},M0=async function*(p,f){for await(const _ of L0(p))yield*I0(_,f)},L0=async function*(p){if(p[Symbol.asyncIterator]){yield*p;return}const f=p.getReader();try{for(;;){const{done:_,value:v}=await f.read();if(_)break;yield v}}finally{await f.cancel()}},Yd=(p,f,_,v)=>{const k=M0(p,f);let P=0,x,o=B=>{x||(x=!0,v&&v(B))};return new ReadableStream({async pull(B){try{const{done:D,value:L}=await k.next();if(D){o(),B.close();return}let H=L.byteLength;if(_){let M=P+=H;_(M)}B.enqueue(new Uint8Array(L))}catch(D){throw o(D),D}},cancel(B){return o(B),k.return()}},{highWaterMark:2})},Pc=typeof fetch=="function"&&typeof Request=="function"&&typeof Response=="function",$d=Pc&&typeof ReadableStream=="function",R0=Pc&&(typeof TextEncoder=="function"?(p=>f=>p.encode(f))(new TextEncoder):async p=>new Uint8Array(await new Response(p).arrayBuffer())),ef=(p,...f)=>{try{return!!p(...f)}catch{return!1}},D0=$d&&ef(()=>{let p=!1;const f=new Request(Mi.origin,{body:new ReadableStream,method:"POST",get duplex(){return p=!0,"half"}}).headers.has("Content-Type");return p&&!f}),tf=64*1024,Mh=$d&&ef(()=>Ke.isReadableStream(new Response("").body)),Ic={stream:Mh&&(p=>p.body)};Pc&&(p=>{["text","arrayBuffer","blob","formData","stream"].forEach(f=>{!Ic[f]&&(Ic[f]=Ke.isFunction(p[f])?_=>_[f]():(_,v)=>{throw new Yt(`Response type '${f}' is not supported`,Yt.ERR_NOT_SUPPORT,v)})})})(new Response);const z0=async p=>{if(p==null)return 0;if(Ke.isBlob(p))return p.size;if(Ke.isSpecCompliantForm(p))return(await new Request(Mi.origin,{method:"POST",body:p}).arrayBuffer()).byteLength;if(Ke.isArrayBufferView(p)||Ke.isArrayBuffer(p))return p.byteLength;if(Ke.isURLSearchParams(p)&&(p=p+""),Ke.isString(p))return(await R0(p)).byteLength},B0=async(p,f)=>{const _=Ke.toFiniteNumber(p.getContentLength());return _??z0(f)},Lh={http:i0,xhr:E0,fetch:Pc&&(async p=>{let{url:f,method:_,data:v,signal:k,cancelToken:P,timeout:x,onDownloadProgress:o,onUploadProgress:B,responseType:D,headers:L,withCredentials:H="same-origin",fetchOptions:M}=Qd(p);D=D?(D+"").toLowerCase():"text";let C=P0([k,P&&P.toAbortSignal()],x),T;const N=C&&C.unsubscribe&&(()=>{C.unsubscribe()});let G;try{if(B&&D0&&_!=="get"&&_!=="head"&&(G=await B0(L,v))!==0){let me=new Request(f,{method:"POST",body:v,duplex:"half"}),De;if(Ke.isFormData(v)&&(De=me.headers.get("content-type"))&&L.setContentType(De),me.body){const[qe,rt]=Kd(G,Ec(Gd(B)));v=Yd(me.body,tf,qe,rt)}}Ke.isString(H)||(H=H?"include":"omit");const ie="credentials"in Request.prototype;T=new Request(f,{...M,signal:C,method:_.toUpperCase(),headers:L.normalize().toJSON(),body:v,duplex:"half",credentials:ie?H:void 0});let le=await fetch(T);const Ee=Mh&&(D==="stream"||D==="response");if(Mh&&(o||Ee&&N)){const me={};["status","statusText","headers"].forEach(At=>{me[At]=le[At]});const De=Ke.toFiniteNumber(le.headers.get("content-length")),[qe,rt]=o&&Kd(De,Ec(Gd(o),!0))||[];le=new Response(Yd(le.body,tf,qe,()=>{rt&&rt(),N&&N()}),me)}D=D||"text";let te=await Ic[Ke.findKey(Ic,D)||"text"](le,p);return!Ee&&N&&N(),await new Promise((me,De)=>{Zd(me,De,{data:te,headers:Zi.from(le.headers),status:le.status,statusText:le.statusText,config:p,request:T})})}catch(ie){throw N&&N(),ie&&ie.name==="TypeError"&&/Load failed|fetch/i.test(ie.message)?Object.assign(new Yt("Network Error",Yt.ERR_NETWORK,p,T),{cause:ie.cause||ie}):Yt.from(ie,ie&&ie.code,p,T)}})};Ke.forEach(Lh,(p,f)=>{if(p){try{Object.defineProperty(p,"name",{value:f})}catch{}Object.defineProperty(p,"adapterName",{value:f})}});const rf=p=>`- ${p}`,V0=p=>Ke.isFunction(p)||p===null||p===!1,nf={getAdapter:p=>{p=Ke.isArray(p)?p:[p];const{length:f}=p;let _,v;const k={};for(let P=0;P<f;P++){_=p[P];let x;if(v=_,!V0(_)&&(v=Lh[(x=String(_)).toLowerCase()],v===void 0))throw new Yt(`Unknown adapter '${x}'`);if(v)break;k[x||"#"+P]=v}if(!v){const P=Object.entries(k).map(([o,B])=>`adapter ${o} `+(B===!1?"is not supported by the environment":"is not available in the build"));let x=f?P.length>1?`since :
|
|
744
|
-
`+P.map(rf).join(`
|
|
745
|
-
`):" "+rf(P[0]):"as no adapter specified";throw new Yt("There is no suitable adapter to dispatch the request "+x,"ERR_NOT_SUPPORT")}return v},adapters:Lh};function Rh(p){if(p.cancelToken&&p.cancelToken.throwIfRequested(),p.signal&&p.signal.aborted)throw new Qs(null,p)}function of(p){return Rh(p),p.headers=Zi.from(p.headers),p.data=Ih.call(p,p.transformRequest),["post","put","patch"].indexOf(p.method)!==-1&&p.headers.setContentType("application/x-www-form-urlencoded",!1),nf.getAdapter(p.adapter||ol.adapter)(p).then(function(v){return Rh(p),v.data=Ih.call(p,p.transformResponse,v),v.headers=Zi.from(v.headers),v},function(v){return Wd(v)||(Rh(p),v&&v.response&&(v.response.data=Ih.call(p,p.transformResponse,v.response),v.response.headers=Zi.from(v.response.headers))),Promise.reject(v)})}const sf="1.9.0",Mc={};["object","boolean","number","function","string","symbol"].forEach((p,f)=>{Mc[p]=function(v){return typeof v===p||"a"+(f<1?"n ":" ")+p}});const af={};Mc.transitional=function(f,_,v){function k(P,x){return"[Axios v"+sf+"] Transitional option '"+P+"'"+x+(v?". "+v:"")}return(P,x,o)=>{if(f===!1)throw new Yt(k(x," has been removed"+(_?" in "+_:"")),Yt.ERR_DEPRECATED);return _&&!af[x]&&(af[x]=!0,console.warn(k(x," has been deprecated since v"+_+" and will be removed in the near future"))),f?f(P,x,o):!0}},Mc.spelling=function(f){return(_,v)=>(console.warn(`${v} is likely a misspelling of ${f}`),!0)};function O0(p,f,_){if(typeof p!="object")throw new Yt("options must be an object",Yt.ERR_BAD_OPTION_VALUE);const v=Object.keys(p);let k=v.length;for(;k-- >0;){const P=v[k],x=f[P];if(x){const o=p[P],B=o===void 0||x(o,P,p);if(B!==!0)throw new Yt("option "+P+" must be "+B,Yt.ERR_BAD_OPTION_VALUE);continue}if(_!==!0)throw new Yt("Unknown option "+P,Yt.ERR_BAD_OPTION)}}const Lc={assertOptions:O0,validators:Mc},Kn=Lc.validators;let ns=class{constructor(f){this.defaults=f||{},this.interceptors={request:new qd,response:new qd}}async request(f,_){try{return await this._request(f,_)}catch(v){if(v instanceof Error){let k={};Error.captureStackTrace?Error.captureStackTrace(k):k=new Error;const P=k.stack?k.stack.replace(/^.+\n/,""):"";try{v.stack?P&&!String(v.stack).endsWith(P.replace(/^.+\n.+\n/,""))&&(v.stack+=`
|
|
746
|
-
`+P):v.stack=P}catch{}}throw v}}_request(f,_){typeof f=="string"?(_=_||{},_.url=f):_=f||{},_=is(this.defaults,_);const{transitional:v,paramsSerializer:k,headers:P}=_;v!==void 0&&Lc.assertOptions(v,{silentJSONParsing:Kn.transitional(Kn.boolean),forcedJSONParsing:Kn.transitional(Kn.boolean),clarifyTimeoutError:Kn.transitional(Kn.boolean)},!1),k!=null&&(Ke.isFunction(k)?_.paramsSerializer={serialize:k}:Lc.assertOptions(k,{encode:Kn.function,serialize:Kn.function},!0)),_.allowAbsoluteUrls!==void 0||(this.defaults.allowAbsoluteUrls!==void 0?_.allowAbsoluteUrls=this.defaults.allowAbsoluteUrls:_.allowAbsoluteUrls=!0),Lc.assertOptions(_,{baseUrl:Kn.spelling("baseURL"),withXsrfToken:Kn.spelling("withXSRFToken")},!0),_.method=(_.method||this.defaults.method||"get").toLowerCase();let x=P&&Ke.merge(P.common,P[_.method]);P&&Ke.forEach(["delete","get","head","post","put","patch","common"],T=>{delete P[T]}),_.headers=Zi.concat(x,P);const o=[];let B=!0;this.interceptors.request.forEach(function(N){typeof N.runWhen=="function"&&N.runWhen(_)===!1||(B=B&&N.synchronous,o.unshift(N.fulfilled,N.rejected))});const D=[];this.interceptors.response.forEach(function(N){D.push(N.fulfilled,N.rejected)});let L,H=0,M;if(!B){const T=[of.bind(this),void 0];for(T.unshift.apply(T,o),T.push.apply(T,D),M=T.length,L=Promise.resolve(_);H<M;)L=L.then(T[H++],T[H++]);return L}M=o.length;let C=_;for(H=0;H<M;){const T=o[H++],N=o[H++];try{C=T(C)}catch(G){N.call(this,G);break}}try{L=of.call(this,C)}catch(T){return Promise.reject(T)}for(H=0,M=D.length;H<M;)L=L.then(D[H++],D[H++]);return L}getUri(f){f=is(this.defaults,f);const _=Jd(f.baseURL,f.url,f.allowAbsoluteUrls);return Nd(_,f.params,f.paramsSerializer)}};Ke.forEach(["delete","get","head","options"],function(f){ns.prototype[f]=function(_,v){return this.request(is(v||{},{method:f,url:_,data:(v||{}).data}))}}),Ke.forEach(["post","put","patch"],function(f){function _(v){return function(P,x,o){return this.request(is(o||{},{method:f,headers:v?{"Content-Type":"multipart/form-data"}:{},url:P,data:x}))}}ns.prototype[f]=_(),ns.prototype[f+"Form"]=_(!0)});let F0=class Ay{constructor(f){if(typeof f!="function")throw new TypeError("executor must be a function.");let _;this.promise=new Promise(function(P){_=P});const v=this;this.promise.then(k=>{if(!v._listeners)return;let P=v._listeners.length;for(;P-- >0;)v._listeners[P](k);v._listeners=null}),this.promise.then=k=>{let P;const x=new Promise(o=>{v.subscribe(o),P=o}).then(k);return x.cancel=function(){v.unsubscribe(P)},x},f(function(P,x,o){v.reason||(v.reason=new Qs(P,x,o),_(v.reason))})}throwIfRequested(){if(this.reason)throw this.reason}subscribe(f){if(this.reason){f(this.reason);return}this._listeners?this._listeners.push(f):this._listeners=[f]}unsubscribe(f){if(!this._listeners)return;const _=this._listeners.indexOf(f);_!==-1&&this._listeners.splice(_,1)}toAbortSignal(){const f=new AbortController,_=v=>{f.abort(v)};return this.subscribe(_),f.signal.unsubscribe=()=>this.unsubscribe(_),f.signal}static source(){let f;return{token:new Ay(function(k){f=k}),cancel:f}}};function N0(p){return function(_){return p.apply(null,_)}}function q0(p){return Ke.isObject(p)&&p.isAxiosError===!0}const Dh={Continue:100,SwitchingProtocols:101,Processing:102,EarlyHints:103,Ok:200,Created:201,Accepted:202,NonAuthoritativeInformation:203,NoContent:204,ResetContent:205,PartialContent:206,MultiStatus:207,AlreadyReported:208,ImUsed:226,MultipleChoices:300,MovedPermanently:301,Found:302,SeeOther:303,NotModified:304,UseProxy:305,Unused:306,TemporaryRedirect:307,PermanentRedirect:308,BadRequest:400,Unauthorized:401,PaymentRequired:402,Forbidden:403,NotFound:404,MethodNotAllowed:405,NotAcceptable:406,ProxyAuthenticationRequired:407,RequestTimeout:408,Conflict:409,Gone:410,LengthRequired:411,PreconditionFailed:412,PayloadTooLarge:413,UriTooLong:414,UnsupportedMediaType:415,RangeNotSatisfiable:416,ExpectationFailed:417,ImATeapot:418,MisdirectedRequest:421,UnprocessableEntity:422,Locked:423,FailedDependency:424,TooEarly:425,UpgradeRequired:426,PreconditionRequired:428,TooManyRequests:429,RequestHeaderFieldsTooLarge:431,UnavailableForLegalReasons:451,InternalServerError:500,NotImplemented:501,BadGateway:502,ServiceUnavailable:503,GatewayTimeout:504,HttpVersionNotSupported:505,VariantAlsoNegotiates:506,InsufficientStorage:507,LoopDetected:508,NotExtended:510,NetworkAuthenticationRequired:511};Object.entries(Dh).forEach(([p,f])=>{Dh[f]=p});function lf(p){const f=new ns(p),_=kd(ns.prototype.request,f);return Ke.extend(_,ns.prototype,f,{allOwnKeys:!0}),Ke.extend(_,f,null,{allOwnKeys:!0}),_.create=function(k){return lf(is(p,k))},_}const Wr=lf(ol);Wr.Axios=ns,Wr.CanceledError=Qs,Wr.CancelToken=F0,Wr.isCancel=Wd,Wr.VERSION=sf,Wr.toFormData=Tc,Wr.AxiosError=Yt,Wr.Cancel=Wr.CanceledError,Wr.all=function(f){return Promise.all(f)},Wr.spread=N0,Wr.isAxiosError=q0,Wr.mergeConfig=is,Wr.AxiosHeaders=Zi,Wr.formToJSON=p=>jd(Ke.isHTMLForm(p)?new FormData(p):p),Wr.getAdapter=nf.getAdapter,Wr.HttpStatusCode=Dh,Wr.default=Wr;const{Axios:YS,AxiosError:$S,CanceledError:eA,isCancel:tA,CancelToken:rA,VERSION:iA,all:nA,Cancel:oA,isAxiosError:sA,spread:aA,toFormData:lA,AxiosHeaders:cA,HttpStatusCode:uA,formToJSON:hA,getAdapter:pA,mergeConfig:dA}=Wr,U0={class:"w-full flex flex-col bg-white border border-stone-200 shadow-2xs rounded-xl z-10 relative overflow-hidden"},j0={key:0,class:"p-5 pb-3 flex justify-between items-center"},H0={class:"inline-block font-semibold text-lg text-gray-800"},W0={key:1,class:"flex"},Z0={class:"flex items-center mx-[8px]"},K0={class:"min-h-[34px] max-h-[34px] overflow-hidden min-w-[34px] flex justify-center items-center bg-stone-100 text-stone-800 py-2 px-3 text-sm rounded-lg"},G0={class:"min-h-[34px] flex justify-center items-center text-stone-500 py-2 px-1.5 text-sm"},J0={class:"flex flex-col justify-between pb-5 px-5 h-full overflow-y-auto flex-1 [&::-webkit-scrollbar]:h-1.5 [&::-webkit-scrollbar]:w-1.5 [&::-webkit-scrollbar-thumb]:rounded-full [&::-webkit-scrollbar-thumb]:bg-gray-300 [&::-webkit-scrollbar-track]:bg-transparent"},X0={key:0,class:"text-center"},Q0={key:1,class:"text-red-500"},Y0={key:2},$0=["innerHTML"],ex={key:1,class:"flow-root"},tx={class:"-my-3 divide-y divide-gray-100 text-sm"},rx={class:"font-medium text-gray-900"},ix={class:"text-gray-700 sm:col-span-2"},nx={key:2,class:"vs-map-card-info__nodata"},cf={__name:"vs-card-widget",props:{config:{type:Object,required:!0},cardValues:{type:Object,required:!0}},emits:["close","content-resize"],setup(p,{emit:f}){const _=p,v=f,k=S.computed(()=>{var G;return((G=_.config)==null?void 0:G.title)||""}),P=S.ref([]),x=S.ref(!1),o=S.ref(null),B=S.ref(0),D=S.computed(()=>B.value+1),L=S.computed(()=>{var G;return((G=_.info)==null?void 0:G.length)||0}),H=S.computed(()=>P.value[B.value]),M=S.computed(()=>{if(!H.value)return{};const{rows:G,columns:ie}=H.value;return!G||!ie?{}:ie.reduce((le,Ee)=>(!Ee.hide&&!["geom","geodata","id"].includes(Ee.name)&&(le[Ee.ua]=G[Ee.name]??"-"),le),{})});async function C(){var G,ie,le;x.value=!0,o.value=null;try{const Ee={id:(G=_.cardValues)==null?void 0:G.id,layer:(ie=_.cardValues)==null?void 0:ie.layer,map:(le=_.cardValues)==null?void 0:le.map},te=await Wr.get("/api/map-format",{params:Ee});P.value[B.value]=te.data}catch(Ee){o.value=(Ee==null?void 0:Ee.message)||"Помилка запиту"}finally{x.value=!1,await S.nextTick(),v("content-resize")}}function T(){B.value<_.info.length-1&&(B.value+=1,P.value[B.value]||C())}function N(){B.value>0&&(B.value-=1,P.value[B.value]||C())}return S.onMounted(async()=>{await S.nextTick(),C()}),S.watch(()=>_.info,()=>{B.value=0,C(),v("content-resize")},{deep:!0}),S.watch([()=>_.cardValues,()=>_.config],async()=>{await S.nextTick(),C(),v("content-resize")}),(G,ie)=>{var le;return S.openBlock(),S.createElementBlock("div",U0,[k.value?(S.openBlock(),S.createElementBlock("div",j0,[S.createElementVNode("h2",H0,S.toDisplayString(k.value),1),S.createElementVNode("button",{type:"button",class:"size-8 inline-flex justify-center items-center gap-x-2 rounded-full border border-transparent bg-gray-100 text-gray-800 hover:bg-gray-200 focus:outline-none focus:bg-gray-200 disabled:opacity-50 disabled:pointer-events-none dark:bg-neutral-700 dark:hover:bg-neutral-600 dark:text-neutral-400 dark:focus:bg-neutral-600 ml-2",onClick:ie[0]||(ie[0]=Ee=>v("close"))},ie[1]||(ie[1]=[S.createElementVNode("svg",{class:"shrink-0 size-4 cursor-pointer",xmlns:"http://www.w3.org/2000/svg",width:"24",height:"24",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor","stroke-width":"2","stroke-linecap":"round","stroke-linejoin":"round"},[S.createElementVNode("path",{d:"M18 6 6 18"}),S.createElementVNode("path",{d:"m6 6 12 12"})],-1)]))])):S.createCommentVNode("",!0),L.value>1?(S.openBlock(),S.createElementBlock("div",W0,[S.createElementVNode("button",{type:"button",class:S.normalizeClass([{"opacity-flex items-center justify-between border-b px-[16px] py-[8px]50 pointer-events-none":D.value===1},"min-h-[34px] min-w-[34px] py-2 px-2.5 inline-flex justify-center items-center gap-x-2 text-sm rounded-lg text-stone-800 hover:bg-stone-100 disabled:opacity-50 disabled:pointer-events-none focus:outline-none focus:bg-stone-100"]),onClick:N}," ◀ ",2),S.createElementVNode("div",Z0,[S.createElementVNode("span",K0,S.toDisplayString(D.value),1),ie[2]||(ie[2]=S.createElementVNode("span",{class:"min-h-[34px] flex justify-center items-center text-stone-500 py-2 px-1.5 text-sm"},"з",-1)),S.createElementVNode("span",G0,S.toDisplayString(L.value),1)]),S.createElementVNode("button",{type:"button",onClick:T,class:S.normalizeClass([{"opacity-50 pointer-events-none":D.value===L.value},"min-h-[34px] min-w-[34px] py-2 px-2.5 inline-flex justify-center items-center gap-x-2 text-sm rounded-lg text-stone-800 hover:bg-stone-100 disabled:opacity-50 disabled:pointer-events-none focus:outline-none focus:bg-stone-100"])}," ▶ ",2)])):S.createCommentVNode("",!0),S.createElementVNode("div",J0,[x.value?(S.openBlock(),S.createElementBlock("div",X0,"Завантаження даних...")):o.value?(S.openBlock(),S.createElementBlock("div",Q0,"Помилка завантаження даних")):(S.openBlock(),S.createElementBlock("div",Y0,[(le=H.value)!=null&&le.html?(S.openBlock(),S.createElementBlock("div",{key:0,innerHTML:H.value.html,class:"custom-table-html border-b"},null,8,$0)):Object.keys(M.value).length?(S.openBlock(),S.createElementBlock("div",ex,[S.createElementVNode("dl",tx,[(S.openBlock(!0),S.createElementBlock(S.Fragment,null,S.renderList(M.value,(Ee,te)=>(S.openBlock(),S.createElementBlock("div",{key:te,class:"grid grid-cols-1 gap-1 py-3 even:bg-gray-50 sm:grid-cols-3 sm:gap-4"},[S.createElementVNode("dt",rx,S.toDisplayString(te),1),S.createElementVNode("dd",ix,S.toDisplayString(Ee),1)]))),128))])])):(S.openBlock(),S.createElementBlock("div",nx,"Даних не знайдено."))]))])])}}},ox={class:"size-full flex flex-col bg-white border border-gray-200 shadow-2xs rounded-xl dark:bg-neutral-800 dark:border-neutral-700"},sx={key:0,class:"p-5 pb-0 items-center"},ax={class:"inline-block font-semibold text-lg text-gray-800 dark:text-neutral-200"},lx={class:"h-full p-5"},cx={class:"h-full flex flex-col justify-between space-y-4"},ux={class:"space-y-4"},hx={key:0,class:"flex gap-x-1 w-full h-2.5 rounded-full overflow-hidden"},px=["aria-valuenow"],dx={class:"text-sm text-gray-500 px-2 w-full py-2 cursor-pointer !flex flex-row items-center rounded-lg group hover:bg-gray-100"},fx=["for"],mx={key:0,width:"16",height:"auto",src:"data:image/svg+xml;base64,PHN2ZyB2aWV3Qm94PScwIDAgMTYgMTYnIGZpbGw9J3doaXRlJyB4bWxucz0naHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmcnPjxwYXRoIGQ9J00xMi4yMDcgNC43OTNhMSAxIDAgMDEwIDEuNDE0bC01IDVhMSAxIDAgMDEtMS40MTQgMGwtMi0yYTEgMSAwIDAxMS40MTQtMS40MTRMNi41IDkuMDg2bDQuMjkzLTQuMjkzYTEgMSAwIDAxMS40MTQgMHonLz48L3N2Zz4="},gx=["id","onUpdate:modelValue"],yx={class:"ms-2 text-gray-800 dark:text-neutral-200"},_x={key:0,class:"ms-auto text-xs text-gray-500 dark:text-neutral-500"},xx={__name:"vs-attributre-widget",props:{config:{type:Object,required:!0},map:{type:Object,required:!0}},setup(p){const f=p,_=S.computed(()=>{var B;return((B=f.config)==null?void 0:B.title)||""}),v=S.ref([]),k=S.computed(()=>f.config.layer.style.rules.some(B=>B.count!==void 0)),P=S.computed(()=>f.config.layer.style.rules.reduce((B,D)=>B+(D.count||0),0)),x=B=>!B||P.value===0?0:Math.round(B/P.value*100),o=()=>{const D=f.config.layer.style.rules.filter((L,H)=>v.value[H]).map(L=>L.id||L.value).join(",");if(f.config.layer.id){const L=f.map.getSource(f.config.layer.id);if(L){const M=L.tiles[0].split("?filter=")[0],C=D?`${M}?filter=${f.config.layer.style.attribute}=${D}`:M;L.setTiles([C])}}};return S.onMounted(()=>{var B;(B=f.config)!=null&&B.layer&&(Lo(f.map,f.config.layer),v.value=new Array(f.config.layer.style.rules.length).fill(!1))}),(B,D)=>(S.openBlock(),S.createElementBlock("div",ox,[_.value?(S.openBlock(),S.createElementBlock("div",sx,[S.createElementVNode("div",null,[S.createElementVNode("h2",ax,S.toDisplayString(_.value),1)])])):S.createCommentVNode("",!0),S.createElementVNode("div",lx,[S.createElementVNode("div",cx,[S.createElementVNode("div",ux,[k.value?(S.openBlock(),S.createElementBlock("div",hx,[(S.openBlock(!0),S.createElementBlock(S.Fragment,null,S.renderList(p.config.layer.style.rules,(L,H)=>(S.openBlock(),S.createElementBlock("div",{key:H,class:"flex flex-col justify-center overflow-hidden text-xs text-white text-center whitespace-nowrap",style:S.normalizeStyle({width:`${x(L.count)}%`,backgroundColor:L.color}),role:"progressbar","aria-valuenow":x(L.count),"aria-valuemin":"0","aria-valuemax":"100"},null,12,px))),128))])):S.createCommentVNode("",!0),S.createElementVNode("ul",null,[(S.openBlock(!0),S.createElementBlock(S.Fragment,null,S.renderList(p.config.layer.style.rules,(L,H)=>(S.openBlock(),S.createElementBlock("li",{key:H},[S.createElementVNode("div",dx,[S.createElementVNode("label",{for:`filter-${H}`,class:"flex items-center w-full cursor-pointer"},[S.createElementVNode("div",{class:"w-[18px] h-[18px] border rounded-[4px] flex items-center justify-center",style:S.normalizeStyle({background:v.value[H]?L.color||"#2563eb":"#fff",borderColor:v.value[H]?L.color||"#2563eb":L.color||"#d9d9d9"})},[v.value[H]?(S.openBlock(),S.createElementBlock("img",mx)):S.createCommentVNode("",!0)],4),S.withDirectives(S.createElementVNode("input",{type:"checkbox",id:`filter-${H}`,"onUpdate:modelValue":M=>v.value[H]=M,onChange:o,class:"hidden",disabled:!1},null,40,gx),[[S.vModelCheckbox,v.value[H]]]),S.createElementVNode("span",yx,S.toDisplayString(L.label||L.text),1),k.value?(S.openBlock(),S.createElementBlock("span",_x,"("+S.toDisplayString(L.count)+")",1)):S.createCommentVNode("",!0)],8,fx)])]))),128))])])])])]))}},bx={class:"hover:bg-gray-100 rounded-lg flex items-center ml-[20px] py-[8px] px-[8px]"},vx=["for"],wx={class:"custom-checkbox-wrapper"},Sx=["id","checked"],Ax={class:"custom-checkbox"},kx={key:0,xmlns:"http://www.w3.org/2000/svg",width:"12",height:"8",viewBox:"0 0 12 8",fill:"none"},Tx={class:"flex items-center justify-between ml-2 w-full"},Cx=["title"],Ex={key:0,class:"text-xs opacity-60 text-[#4b5563]"},Px=Nr({__name:"vs-map-catalog-item",props:{layer:{type:Object,required:!0},map:{type:Object,default:()=>null},selectedLayers:{type:Array,default:()=>[]}},emits:["select","remove"],setup(p,{emit:f}){const _=p,v=f,k=S.computed(()=>_.selectedLayers.some(o=>o.id===_.layer.id)),P=o=>Intl.NumberFormat("uk",{notation:"compact"}).format(o),x=o=>{v(o?"select":"remove",_.layer)};return(o,B)=>{var D,L,H,M,C;return S.openBlock(),S.createElementBlock("div",bx,[S.createElementVNode("label",{class:"flex items-center w-full cursor-pointer",for:p.layer.id},[S.createElementVNode("div",wx,[S.createElementVNode("input",{id:p.layer.id,type:"checkbox",checked:k.value,onChange:B[0]||(B[0]=T=>x(T.target.checked)),class:"custom-checkbox-input"},null,40,Sx),S.createElementVNode("div",Ax,[k.value?(S.openBlock(),S.createElementBlock("svg",kx,B[1]||(B[1]=[S.createElementVNode("path",{d:"M10.6663 1L4.24967 7.41667L1.33301 4.5",stroke:"#fff","stroke-linecap":"round","stroke-linejoin":"round"},null,-1)]))):S.createCommentVNode("",!0)])]),S.createElementVNode("div",Tx,[S.createElementVNode("div",{class:"whitespace-nowrap text text-ellipsis max-w-[260px] overflow-hidden text-[13px] text-[#4b5563]",title:(D=p.layer)==null?void 0:D.name},S.toDisplayString(((L=p.layer)==null?void 0:L.name)||((H=p.layer)==null?void 0:H.title)),9,Cx),isNaN(P((M=p.layer)==null?void 0:M.count))?S.createCommentVNode("",!0):(S.openBlock(),S.createElementBlock("div",Ex,S.toDisplayString(P((C=p.layer)==null?void 0:C.count)),1))])],8,vx)])}}},[["__scopeId","data-v-b96f3537"]]),Ix={},Mx={xmlns:"http://www.w3.org/2000/svg",width:"16",height:"16",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor","stroke-width":"2","stroke-linecap":"round","stroke-linejoin":"round",class:"lucide lucide-zoom-in"};function Lx(p,f){return S.openBlock(),S.createElementBlock("svg",Mx,f[0]||(f[0]=[S.createElementVNode("circle",{cx:"11",cy:"11",r:"8"},null,-1),S.createElementVNode("line",{x1:"21",x2:"16.65",y1:"21",y2:"16.65"},null,-1),S.createElementVNode("line",{x1:"11",x2:"11",y1:"8",y2:"14"},null,-1),S.createElementVNode("line",{x1:"8",x2:"14",y1:"11",y2:"11"},null,-1)]))}const Rx=Nr(Ix,[["render",Lx]]),Dx={},zx={xmlns:"http://www.w3.org/2000/svg",width:"16",height:"16",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor","stroke-width":"2","stroke-linecap":"round","stroke-linejoin":"round",class:"lucide lucide-info"};function Bx(p,f){return S.openBlock(),S.createElementBlock("svg",zx,f[0]||(f[0]=[S.createElementVNode("circle",{cx:"12",cy:"12",r:"10"},null,-1),S.createElementVNode("path",{d:"M12 16v-4"},null,-1),S.createElementVNode("path",{d:"M12 8h.01"},null,-1)]))}const Vx=Nr(Dx,[["render",Bx]]),Ox={},Fx={xmlns:"http://www.w3.org/2000/svg",width:"16",height:"16",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor","stroke-width":"2","stroke-linecap":"round","stroke-linejoin":"round",class:"lucide lucide-table"};function Nx(p,f){return S.openBlock(),S.createElementBlock("svg",Fx,f[0]||(f[0]=[S.createElementVNode("path",{d:"M12 3v18"},null,-1),S.createElementVNode("rect",{width:"18",height:"18",x:"3",y:"3",rx:"2"},null,-1),S.createElementVNode("path",{d:"M3 9h18"},null,-1),S.createElementVNode("path",{d:"M3 15h18"},null,-1)]))}const qx=Nr(Ox,[["render",Nx]]),Ux={},jx={xmlns:"http://www.w3.org/2000/svg",width:"16",height:"16",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor","stroke-width":"2","stroke-linecap":"round","stroke-linejoin":"round",class:"lucide lucide-trash2"};function Hx(p,f){return S.openBlock(),S.createElementBlock("svg",jx,f[0]||(f[0]=[S.createStaticVNode('<path d="M3 6h18"></path><path d="M19 6v14c0 1-1 2-2 2H7c-1 0-2-1-2-2V6"></path><path d="M8 6V4c0-1 1-2 2-2h4c1 0 2 1 2 2v2"></path><line x1="10" x2="10" y1="11" y2="17"></line><line x1="14" x2="14" y1="11" y2="17"></line>',5)]))}const Wx=Nr(Ux,[["render",Hx]]),Zx={},Kx={xmlns:"http://www.w3.org/2000/svg",width:"18",height:"18",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor","stroke-width":"2","stroke-linecap":"round","stroke-linejoin":"round",class:"lucide lucide-more-vertical text-gray-600"};function Gx(p,f){return S.openBlock(),S.createElementBlock("svg",Kx,f[0]||(f[0]=[S.createElementVNode("circle",{cx:"12",cy:"12",r:"1"},null,-1),S.createElementVNode("circle",{cx:"12",cy:"5",r:"1"},null,-1),S.createElementVNode("circle",{cx:"12",cy:"19",r:"1"},null,-1)]))}const Jx=Nr(Zx,[["render",Gx]]),Xx={},Qx={width:"6",height:"10",viewBox:"0 0 6 10",fill:"none",xmlns:"http://www.w3.org/2000/svg"};function Yx(p,f){return S.openBlock(),S.createElementBlock("svg",Qx,f[0]||(f[0]=[S.createElementVNode("path",{d:"M1 9L5 5L1 1",stroke:"currentColor","stroke-linecap":"round","stroke-linejoin":"round"},null,-1)]))}const $x=Nr(Xx,[["render",Yx]]);var al={exports:{}},eb=al.exports,uf;function tb(){return uf||(uf=1,function(p,f){(function(_,v){v(f)})(eb,function(_){var v,k,P="smooth-dnd-container-instance",x="smooth-dnd-draggable-wrapper",o="animated",B="__smooth_dnd_draggable_translation_value",D="__smooth_dnd_draggable_visibility_value",L="smooth-dnd-ghost",H="smooth-dnd-container",M="smooth-dnd-extra-size-for-insertion",C="smooth-dnd-stretcher-element",T="smooth-dnd-stretcher-instance",N="smooth-dnd-disable-touch-action",G="smooth-dnd-no-user-select",ie="smooth-dnd-prevent-auto-scroll-class",le="smooth-dnd-drop-preview-default-class",Ee="smooth-dnd-drop-preview-inner-class",te="smooth-dnd-drop-preview-constant-class",me="smooth-dnd-drop-preview-flex-container-class",De=Object.freeze({containerInstance:P,defaultGroupName:"@@smooth-dnd-default-group@@",wrapperClass:x,defaultGrabHandleClass:"smooth-dnd-default-grap-handle",animationClass:o,translationValue:B,visibilityValue:D,ghostClass:L,containerClass:H,extraSizeForInsertion:M,stretcherElementClass:C,stretcherElementInstance:T,isDraggableDetached:"smoth-dnd-is-draggable-detached",disbaleTouchActions:N,noUserSelectClass:G,preventAutoScrollClass:ie,dropPlaceholderDefaultClass:le,dropPlaceholderInnerClass:Ee,dropPlaceholderWrapperClass:te,dropPlaceholderFlexContainerClass:me}),qe={groupName:void 0,behaviour:"move",orientation:"vertical",getChildPayload:void 0,animationDuration:250,autoScrollEnabled:!0,shouldAcceptDrop:void 0,shouldAnimateDrop:void 0};function rt(ce){return(rt=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(ue){return typeof ue}:function(ue){return ue&&typeof Symbol=="function"&&ue.constructor===Symbol&&ue!==Symbol.prototype?"symbol":typeof ue})(ce)}function At(ce,ue,pe){return ue in ce?Object.defineProperty(ce,ue,{value:pe,enumerable:!0,configurable:!0,writable:!0}):ce[ue]=pe,ce}function _t(ce){return function(ue){if(Array.isArray(ue)){for(var pe=0,xe=new Array(ue.length);pe<ue.length;pe++)xe[pe]=ue[pe];return xe}}(ce)||function(ue){if(Symbol.iterator in Object(ue)||Object.prototype.toString.call(ue)==="[object Arguments]")return Array.from(ue)}(ce)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance")}()}(k=v||(v={})).x="x",k.y="y",k.xy="xy";function lt(ce,ue,pe){return pe==="x"?{left:Math.max(ce.left,ue.left),top:ce.top,right:Math.min(ce.right,ue.right),bottom:ce.bottom}:{left:ce.left,top:Math.max(ce.top,ue.top),right:ce.right,bottom:Math.min(ce.bottom,ue.bottom)}}function xt(ce){var ue=window.getComputedStyle(ce),pe=ue.overflow;if(pe==="auto"||pe==="scroll")return v.xy;var xe=ue["overflow-x"],Ce=xe==="auto"||xe==="scroll",Be=ue["overflow-y"],st=Be==="auto"||Be==="scroll";return Ce&&st?v.xy:Ce?v.x:st?v.y:null}function qt(ce,ue){var pe=window.getComputedStyle(ce),xe=pe.overflow,Ce=pe["overflow-".concat(ue)];return xe==="auto"||xe==="scroll"||Ce==="auto"||Ce==="scroll"}var Xt=function(ce,ue){return{left:Math.max(ce.left,ue.left),top:Math.max(ce.top,ue.top),right:Math.min(ce.right,ue.right),bottom:Math.min(ce.bottom,ue.bottom)}},kr=function(ce){var ue=ce.getBoundingClientRect(),pe={left:ue.left,right:ue.right,top:ue.top,bottom:ue.bottom};if(ni(ce,"x")&&!vr(ce,"x")){var xe=pe.right-pe.left;pe.right=pe.right+ce.scrollWidth-xe}if(ni(ce,"y")&&!vr(ce,"y")){var Ce=pe.bottom-pe.top;pe.bottom=pe.bottom+ce.scrollHeight-Ce}return pe},vr=function(ce,ue){var pe=window.getComputedStyle(ce),xe=pe.overflow,Ce=pe["overflow-".concat(ue)];return xe==="auto"||xe==="scroll"||xe==="hidden"||Ce==="auto"||Ce==="scroll"||Ce==="hidden"},ni=function(ce,ue){return ue==="x"?ce.scrollWidth>ce.clientWidth:ce.scrollHeight>ce.clientHeight},ir=function(ce,ue){var pe=ce,xe=ue||kr(ce);for(pe=ce.parentElement;pe;)ni(pe,"x")&&vr(pe,"x")&&(xe=lt(xe,pe.getBoundingClientRect(),"x")),ni(pe,"y")&&vr(pe,"y")&&(xe=lt(xe,pe.getBoundingClientRect(),"y")),pe=pe.parentElement;return xe},Ji=function(ce,ue){for(var pe=ce;pe;){if(pe[P]){var xe=function(){var Ce=pe[P];if(ue.some(function(Be){return Be===Ce}))return{v:Ce}}();if(rt(xe)==="object")return xe.v}pe=pe.parentElement}return null},Rr=function(ce,ue){for(var pe=ce;pe;){if(pe.matches(ue))return pe;pe=pe.parentElement}return null},Xi=function(ce,ue){return-1<ce.className.split(" ").map(function(pe){return pe}).indexOf(ue)},Dr=function(ce,ue){if(ce){var pe=ce.className.split(" ").filter(function(xe){return xe});pe.indexOf(ue)===-1&&(pe.unshift(ue),ce.className=pe.join(" "))}},ln=function(ce,ue){if(ce){var pe=ce.className.split(" ").filter(function(xe){return xe&&xe!==ue});ce.className=pe.join(" ")}},Si=function(ce,ue){return ce.removeChild(ce.children[ue])},Zr=function(ce,ue,pe){pe>=ce.children.length?ce.appendChild(ue):ce.insertBefore(ue,ce.children[pe])},Qi=function(){window.getSelection?window.getSelection().empty?window.getSelection().empty():window.getSelection().removeAllRanges&&window.getSelection().removeAllRanges():window.document.selection&&window.document.selection.empty()},Yr=function(ce){if(ce){var ue=window.getComputedStyle(ce);if(ue)return ue.cursor}return null};function Yi(ce){return!(ce.bottom<=ce.top||ce.right<=ce.left)}function Li(ce){var ue=ce.element,pe=ce.draggables;return function(xe,Ce){var Be=xe,st=Be.removedIndex,Je=Be.addedIndex,it=Be.droppedElement,ze=null;if(st!==null&&(ze=Si(ue,st),pe.splice(st,1)),Je!==null){var Ge=window.document.createElement("div");Ge.className="".concat(x),Ge.appendChild(ze&&ze.firstElementChild?ze.firstElementChild:it),Zr(ue,Ge,Je),Je>=pe.length?pe.push(Ge):pe.splice(Je,0,Ge)}Ce&&Ce(xe)}}var In=Object.freeze({domDropHandler:Li,reactDropHandler:function(){return{handler:function(){return function(ce,ue){ue&&ue(ce)}}}}}),fi={size:"offsetWidth",distanceToParent:"offsetLeft",translate:"transform",begin:"left",end:"right",dragPosition:"x",scrollSize:"scrollWidth",offsetSize:"offsetWidth",scrollValue:"scrollLeft",scale:"scaleX",setSize:"width",setters:{translate:function(ce){return"translate3d(".concat(ce,"px, 0, 0)")}}},gt={size:"offsetHeight",distanceToParent:"offsetTop",translate:"transform",begin:"top",end:"bottom",dragPosition:"y",scrollSize:"scrollHeight",offsetSize:"offsetHeight",scrollValue:"scrollTop",scale:"scaleY",setSize:"height",setters:{translate:function(ce){return"translate3d(0,".concat(ce,"px, 0)")}}};function bt(ce,ue,pe){ce[M]=0;var xe=function(ze){return{get:function(Ge,Ye){return Ge[ze[Ye]||Ye]},set:function(Ge,Ye,ft){Ge[ze[Ye]]=ze.setters[Ye]?ze.setters[Ye](ft):ft}}}(ue==="horizontal"?fi:gt),Ce={translation:0};function Be(){st(ce),function(ze){var Ge=ze.getBoundingClientRect();Ce.scaleX=ze.offsetWidth?(Ge.right-Ge.left)/ze.offsetWidth:1,Ce.scaleY=ze.offsetHeight?(Ge.bottom-Ge.top)/ze.offsetHeight:1}(ce)}function st(ze){Ce.rect=kr(ze);var Ge=ir(ze,Ce.rect);Yi(Ge)&&(Ce.lastVisibleRect=Ce.visibleRect),Ce.visibleRect=Ge}function Je(ze){var Ge=ze;if(Ge.tagName){var Ye=Ge.getBoundingClientRect();return ue==="vertical"?Ye.bottom-Ye.top:Ye.right-Ye.left}return xe.get(ze,"size")*xe.get(Ce,"scale")}function it(ze){return xe.get(ze,"dragPosition")}return window.addEventListener("resize",function(){st(ce)}),setTimeout(function(){Be()},10),{getSize:Je,getContainerRectangles:function(){return{rect:Ce.rect,visibleRect:Ce.visibleRect,lastVisibleRect:Ce.lastVisibleRect}},getBeginEndOfDOMRect:function(ze){return{begin:xe.get(ze,"begin"),end:xe.get(ze,"end")}},getBeginEndOfContainer:function(){return{begin:xe.get(Ce.rect,"begin")+Ce.translation,end:xe.get(Ce.rect,"end")+Ce.translation}},getBeginEndOfContainerVisibleRect:function(){return{begin:xe.get(Ce.visibleRect,"begin")+Ce.translation,end:xe.get(Ce.visibleRect,"end")+Ce.translation}},getBeginEnd:function(ze){var Ge=function(Ye){return(xe.get(Ye,"distanceToParent")+(Ye[B]||0))*xe.get(Ce,"scale")}(ze)+(xe.get(Ce.rect,"begin")+Ce.translation)-xe.get(ce,"scrollValue");return{begin:Ge,end:Ge+Je(ze)*xe.get(Ce,"scale")}},getAxisValue:it,setTranslation:function(ze,Ge){Ge?xe.set(ze.style,"translate",Ge):ze.style.removeProperty("transform"),ze[B]=Ge},getTranslation:function(ze){return ze[B]},setVisibility:function(ze,Ge){ze[D]!==void 0&&ze[D]===Ge||(Ge?ze.style.removeProperty("visibility"):ze.style.visibility="hidden",ze[D]=Ge)},isVisible:function(ze){return ze[D]===void 0||ze[D]},isInVisibleRect:function(ze,Ge){var Ye=Ce.visibleRect,ft=Ye.left,ht=Ye.top,nt=Ye.right,Zt=Ye.bottom;Zt-ht<2&&(Zt=ht+30);var dt=Ce.rect;return ue==="vertical"?ze>dt.left&&ze<dt.right&&ht<Ge&&Ge<Zt:ft<ze&&ze<nt&&Ge>dt.top&&Ge<dt.bottom},setSize:function(ze,Ge){xe.set(ze,"setSize",Ge)},getTopLeftOfElementBegin:function(ze){var Ge=0;return{top:ue==="horizontal"?(Ge=ze,Ce.rect.top):(Ge=Ce.rect.left,ze),left:Ge}},getScrollSize:function(ze){return xe.get(ze,"scrollSize")},getScrollValue:function(ze){return xe.get(ze,"scrollValue")},setScrollValue:function(ze,Ge){return xe.set(ze,"scrollValue",Ge)},invalidate:Be,invalidateRects:function(){st(ce)},getPosition:function(ze){return it(ze)},setBegin:function(ze,Ge){xe.set(ze,"begin",Ge)}}}function ct(ce,ue,pe){var xe,Ce,Be,st=pe.left,Je=pe.right,it=pe.top,ze=pe.bottom,Ge=ce.x,Ye=ce.y;if(Ge<st||Je<Ge||Ye<it||ze<Ye)return null;Be=ue==="x"?(xe=st,Ce=Je,Ge):(xe=it,Ce=ze,Ye);var ft=Ce-xe,ht=400<ft?100:ft/4;return Ce-Be<ht?{direction:"end",speedFactor:(ht-(Ce-Be))/ht}:Be-xe<ht?{direction:"begin",speedFactor:(ht-(Be-xe))/ht}:null}function Bt(ce){var ue=1<arguments.length&&arguments[1]!==void 0?arguments[1]:"y",pe=null,xe=null,Ce=null,Be=null;return{animate:function(st,Je){Ce=st,Be=Je,function it(){pe===null&&(pe=requestAnimationFrame(function(ze){xe===null&&(xe=ze);var Ge=ze-xe;xe=ze;var Ye,ft,ht,nt=Ge/1e3*Be;ft=ue,ht=nt=Ce==="begin"?0-nt:nt,(Ye=ce)&&(Ye!==window?ft==="x"?Ye.scrollLeft+=ht:Ye.scrollTop+=ht:ft==="x"?Ye.scrollBy(ht,0):Ye.scrollBy(0,ht)),pe=null,it()}))}()},stop:function(){pe!==null&&(cancelAnimationFrame(pe),pe=null),xe=null}}}function Ht(ce){return function(){return ir(ce,ce.getBoundingClientRect())}}var Ot,pr,Nt,mr=function(ce){var ue=1<arguments.length&&arguments[1]!==void 0?arguments[1]:1500,pe=ce.reduce(function(xe,Ce){var Be=function(st){for(var Je=[],it=st.element;it;){var ze=xt(it);if(ze&&!Xi(it,ie)){var Ge={};switch(ze){case v.xy:Ge.x={animator:Bt(it,"x")},Ge.y={animator:Bt(it,"y")};break;case v.x:Ge.x={animator:Bt(it,"x")};break;case v.y:Ge.y={animator:Bt(it,"y")}}Je.push({axisAnimations:Ge,getRect:Ht(it),scrollerElement:it})}it=it.parentElement}return Je}(Ce).filter(function(st){return!xe.find(function(Je){return Je.scrollerElement===st.scrollerElement})});return[].concat(_t(xe),_t(Be))},[]);return function(xe){var Ce=xe.draggableInfo;if(xe.reset)pe.forEach(function(Je){Je.axisAnimations.x&&Je.axisAnimations.x.animator.stop(),Je.axisAnimations.y&&Je.axisAnimations.y.animator.stop()});else if(Ce){(function(Je,it){Je.forEach(function(ze){var Ge=ze.axisAnimations,Ye=(0,ze.getRect)();Ge.x&&(Ge.x.scrollParams=ct(it,"x",Ye),ze.cachedRect=Ye),Ge.y&&(Ge.y.scrollParams=ct(it,"y",Ye),ze.cachedRect=Ye)})})(pe,Ce.mousePosition),pe.forEach(function(Je){var it=Je.axisAnimations,ze=it.x,Ge=it.y;if(ze)if(ze.scrollParams){var Ye=ze.scrollParams,ft=Ye.direction,ht=Ye.speedFactor;ze.animator.animate(ft,ht*ue)}else ze.animator.stop();if(Ge)if(Ge.scrollParams){var nt=Ge.scrollParams,Zt=nt.direction,dt=nt.speedFactor;Ge.animator.animate(Zt,dt*ue)}else Ge.animator.stop()});var Be=pe.filter(function(Je){return Je.cachedRect});if(Be.length&&1<Be.length){var st=function(Je,it){for(var ze=document.elementFromPoint(it.x,it.y);ze;){var Ge=Je.find(function(Ye){return Ye.scrollerElement===ze});if(Ge)return Ge;ze=ze.parentElement}return null}(Be,Ce.mousePosition);st&&Be.forEach(function(Je){Je!==st&&(Je.axisAnimations.x&&Je.axisAnimations.x.animator.stop(),Je.axisAnimations.y&&Je.axisAnimations.y.animator.stop())})}}}};typeof window<"u"&&((Ot=Element)&&Ot.prototype&&!Ot.prototype.matches&&(Ot.prototype.matches=Ot.prototype.matchesSelector||Ot.prototype.mozMatchesSelector||Ot.prototype.msMatchesSelector||Ot.prototype.oMatchesSelector||Ot.prototype.webkitMatchesSelector||function(ce){for(var ue=(this.document||this.ownerDocument).querySelectorAll(ce),pe=ue.length;0<=--pe&&ue.item(pe)!==this;);return-1<pe}),(pr=Node||Element)&&pr.prototype&&pr.prototype.firstElementChild==null&&Object.defineProperty(pr.prototype,"firstElementChild",{get:function(){for(var ce,ue=this.childNodes,pe=0;ce=ue[pe++];)if(ce.nodeType===1)return ce;return null}}),Array.prototype.some||(Array.prototype.some=function(ce){if(this==null)throw new TypeError("Array.prototype.some called on null or undefined");if(typeof ce!="function")throw new TypeError;for(var ue=Object(this),pe=ue.length>>>0,xe=2<=arguments.length?arguments[1]:void 0,Ce=0;Ce<pe;Ce++)if(Ce in ue&&ce.call(xe,ue[Ce],Ce,ue))return!0;return!1}));var jr={overflow:"hidden",display:"block"},mi={height:"100%",display:"table-cell","vertical-align":"top"},Ir=(At(Nt={},".".concat(H),{position:"relative","min-height":"30px","min-width":"30px"}),At(Nt,".".concat(H,".horizontal"),{display:"table"}),At(Nt,".".concat(H,".horizontal > .").concat(C),{display:"inline-block"}),At(Nt,".".concat(H,".horizontal > .").concat(x),mi),At(Nt,".".concat(H,".vertical > .").concat(x),jr),At(Nt,".".concat(x),{"box-sizing":"border-box"}),At(Nt,".".concat(x,".horizontal"),mi),At(Nt,".".concat(x,".vertical"),jr),At(Nt,".".concat(x,".animated"),{transition:"transform ease"}),At(Nt,".".concat(L),{"box-sizing":"border-box"}),At(Nt,".".concat(L,".animated"),{transition:"all ease-in-out"}),At(Nt,".".concat(L," *"),{"pointer-events":"none"}),At(Nt,".".concat(N," *"),{"touch-action":"none","-ms-touch-action":"none"}),At(Nt,".".concat(G),{"-webkit-touch-callout":"none","-webkit-user-select":"none","-khtml-user-select":"none","-moz-user-select":"none","-ms-user-select":"none","user-select":"none"}),At(Nt,".".concat(Ee),{flex:"1"}),At(Nt,".".concat(H,".horizontal > .").concat(te),{height:"100%",overflow:"hidden",display:"table-cell","vertical-align":"top"}),At(Nt,".".concat(H,".vertical > .").concat(te),{overflow:"hidden",display:"block",width:"100%"}),At(Nt,".".concat(me),{width:"100%",height:"100%",display:"flex","justify-content":"stretch","align-items":"stretch"}),At(Nt,".".concat(le),{"background-color":"rgba(150, 150, 150, 0.1)",border:"1px solid #ccc"}),Nt);function gi(ce){return Object.keys(ce).reduce(function(ue,pe){var xe=ce[pe];return rt(xe)==="object"?"".concat(ue).concat(pe,"{").concat(gi(xe),"}"):"".concat(ue).concat(pe,":").concat(xe,";")},"")}function Vi(ce){if(ce&&typeof window<"u"){var ue=window.document.head||window.document.getElementsByTagName("head")[0],pe=window.document.createElement("style"),xe=gi({"body *":{cursor:"".concat(ce," !important")}});return pe.type="text/css",pe.styleSheet?pe.styleSheet.cssText=xe:pe.appendChild(window.document.createTextNode(xe)),ue.appendChild(pe),pe}return null}var hr,lr,Ft=["mousedown","touchstart"],wr=["mousemove","touchmove"],dr=["mouseup","touchend"],Jt=null,fr=null,It=null,wt=null,Ae=[],K=!1,Q=!1,ee=!1,he=!1,ve=null,$=null,Me=null,Te=null,Ie=(hr=null,lr=!1,{start:function(){lr||(lr=!0,function ce(){hr=requestAnimationFrame(function(){Jt.forEach(function(ue){return ue.layout.invalidateRects()}),setTimeout(function(){hr!==null&&ce()},50)})}())},stop:function(){hr!==null&&(cancelAnimationFrame(hr),hr=null),lr=!1}}),Ve=typeof window<"u"&&!!(window.navigator.userAgent.match(/Android/i)||window.navigator.userAgent.match(/webOS/i)||window.navigator.userAgent.match(/iPhone/i)||window.navigator.userAgent.match(/iPad/i)||window.navigator.userAgent.match(/iPod/i)||window.navigator.userAgent.match(/BlackBerry/i)||window.navigator.userAgent.match(/Windows Phone/i));function Pe(){typeof window<"u"&&Ft.forEach(function(ce){window.document.addEventListener(ce,Wt,{passive:!1})})}function Qe(){return wt&&wt.ghostParent?wt.ghostParent:fr&&fr.parentElement||window.document.body}var ut,yt,Et,jt,Rt,Ue,ar=(jt=null,Rt=1,Ue=5,function(ce,ue,pe){ut=Ri(ce),Et=pe,(yt=typeof ue=="number"?ue:Ve?200:0)&&(jt=setTimeout(Mt,yt)),wr.forEach(function(xe){return window.document.addEventListener(xe,Qt)},{passive:!1}),dr.forEach(function(xe){return window.document.addEventListener(xe,or)},{passive:!1}),window.document.addEventListener("drag",Dt,{passive:!1})});function Qt(ce){var ue=Ri(ce),pe=ue.clientX,xe=ue.clientY;if(yt)(Math.abs(ut.clientX-pe)>Ue||Math.abs(ut.clientY-xe)>Ue)&&Xe();else if(Math.abs(ut.clientX-pe)>Rt||Math.abs(ut.clientY-xe)>Rt)return Mt()}function or(){Xe()}function Dt(){Xe()}function Xe(){clearTimeout(jt),wr.forEach(function(ce){return window.document.removeEventListener(ce,Qt)},{passive:!1}),dr.forEach(function(ce){return window.document.removeEventListener(ce,or)},{passive:!1}),window.document.removeEventListener("drag",Dt,{passive:!1})}function Mt(){clearTimeout(jt),Xe(),Et()}function Wt(ce){var ue=Ri(ce);if(!K&&(ue.button===void 0||ue.button===0)&&(fr=Rr(ue.target,"."+x))){var pe=Rr(fr,"."+H),xe=Ae.filter(function(Je){return Je.element===pe})[0],Ce=xe.getOptions().dragHandleSelector,Be=xe.getOptions().nonDragAreaSelector,st=!0;Ce&&!Rr(ue.target,Ce)&&(st=!1),Be&&Rr(ue.target,Be)&&(st=!1),st&&(xe.layout.invalidate(),Dr(window.document.body,N),Dr(window.document.body,G),window.document.addEventListener("mouseup",function Je(){ln(window.document.body,N),ln(window.document.body,G),window.document.removeEventListener("mouseup",Je)})),st&&ar(ue,xe.getOptions().dragBeginDelay,function(){Qi(),Jn(ue,Yr(ce.target)),wr.forEach(function(Je){window.document.addEventListener(Je,Tr,{passive:!1})}),dr.forEach(function(Je){window.document.addEventListener(Je,Mn,{passive:!1})})})}}function Tr(ce){ce.preventDefault();var ue=Ri(ce);if(wt){var pe=wt.container.getOptions();pe.behaviour==="contain"?function(xe){var Ce,Be,st,Je,it=xe.clientX,ze=xe.clientY,Ge=1<arguments.length&&arguments[1]!==void 0?arguments[1]:"vertical",Ye=wt.container.layout.getBeginEndOfContainerVisibleRect();Je=Ge==="vertical"?(Ce=ze,Be="y",st="top",wt.size.offsetHeight):(Ce=it,Be="x",st="left",wt.size.offsetWidth);var ft=Ye.begin,ht=Ye.end-Je,nt=Math.max(ft,Math.min(ht,Ce+It.positionDelta[st]));It.topLeft[Be]=nt,wt.position[Be]=Math.max(Ye.begin,Math.min(Ye.end,Ce+It.centerDelta[Be])),wt.mousePosition[Be]=Math.max(Ye.begin,Math.min(Ye.end,Ce)),wt.position[Be]<Ye.begin+Je/2&&(wt.position[Be]=Ye.begin+2),wt.position[Be]>Ye.end-Je/2&&(wt.position[Be]=Ye.end-2)}(ue,pe.orientation):Me?Me==="y"?(It.topLeft.y=ue.clientY+It.positionDelta.top,wt.position.y=ue.clientY+It.centerDelta.y,wt.mousePosition.y=ue.clientY):Me==="x"&&(It.topLeft.x=ue.clientX+It.positionDelta.left,wt.position.x=ue.clientX+It.centerDelta.x,wt.mousePosition.x=ue.clientX):(It.topLeft.x=ue.clientX+It.positionDelta.left,It.topLeft.y=ue.clientY+It.positionDelta.top,wt.position.x=ue.clientX+It.centerDelta.x,wt.position.y=ue.clientY+It.centerDelta.y,wt.mousePosition.x=ue.clientX,wt.mousePosition.y=ue.clientY),go(),(he=!ve(wt))&&mo()}else Jn(ue,Yr(ce.target))}var gr,yi,Kt,Oi,mo=(gr=_n,Kt=!(yi=20),Oi=null,function(){for(var ce=arguments.length,ue=new Array(ce),pe=0;pe<ce;pe++)ue[pe]=arguments[pe];Oi&&clearTimeout(Oi),Kt&&!Oi?gr.call.apply(gr,[null].concat(ue)):Oi=setTimeout(function(){Oi=null,gr.call.apply(gr,[null].concat(ue))},yi)});function _n(){he&&(he=!1,xn(wt,Jt))}function Mn(){wr.forEach(function(ce){window.document.removeEventListener(ce,Tr,{passive:!1})}),dr.forEach(function(ce){window.document.removeEventListener(ce,Mn,{passive:!1})}),$({reset:!0}),Te&&(function(ce){ce&&typeof window<"u"&&(window.document.head||window.document.getElementsByTagName("head")[0]).removeChild(ce)}(Te),Te=null),wt&&(Ie.stop(),_n(),ee=!0,function(ce){function ue(){ln(It.ghost,"animated"),It.ghost.style.transitionDuration=null,Qe().removeChild(It.ghost),ce()}function pe(dt,Ut,Sr){var yo=dt.top,Vn=dt.left;Dr(It.ghost,"animated"),Sr&&Dr(It.ghost.firstElementChild,Sr),It.topLeft.x=Vn,It.topLeft.y=yo,go(Ut),setTimeout(function(){ue()},Ut+20)}function xe(dt,Ut){Dr(It.ghost,"animated"),go(dt,.9,!0),setTimeout(function(){Ut()},dt+20)}if(wt.targetElement){var Ce=Ae.filter(function(dt){return dt.element===wt.targetElement})[0];!(Zt=Ce.getOptions()).shouldAnimateDrop||Zt.shouldAnimateDrop(wt.container.getOptions(),wt.payload)?pe(Ce.getDragResult().shadowBeginEnd.rect,Math.max(150,Ce.getOptions().animationDuration/2),Ce.getOptions().dropClass):ue()}else{var Be=Ae.filter(function(dt){return dt===wt.container})[0];if(Be){var st=Be.getOptions(),Je=st.behaviour,it=st.removeOnDropOut;if(Je!=="move"&&Je!=="contain"||!Q&&it||!Be.getDragResult())xe(Be.getOptions().animationDuration,ue);else{var ze=Be.layout.getContainerRectangles();if(!Yi(ze.visibleRect)&&Yi(ze.lastVisibleRect))pe({top:ze.lastVisibleRect.top,left:ze.lastVisibleRect.left},Be.getOptions().animationDuration,Be.getOptions().dropClass);else{var Ge=Be.getDragResult(),Ye=Ge.removedIndex,ft=Ge.elementSize,ht=Be.layout;Be.getTranslateCalculator({dragResult:{removedIndex:Ye,addedIndex:Ye,elementSize:ft,pos:void 0,shadowBeginEnd:void 0}});var nt=0<Ye?ht.getBeginEnd(Be.draggables[Ye-1]).end:ht.getBeginEndOfContainer().begin;pe(ht.getTopLeftOfElementBegin(nt),Be.getOptions().animationDuration,Be.getOptions().dropClass)}}}else xe(qe.animationDuration,ue)}var Zt}(function(){_r(K=!1);for(var ce=Jt||[],ue=ce.shift();ue!==void 0;)ue.handleDrop(wt),ue=ce.shift();ve=Me=wt=It=fr=Jt=null,ee=!1}))}function Ri(ce){return ce.touches?ce.touches[0]:ce}function xn(ce,ue){var pe=!1;ue.forEach(function(xe){var Ce=xe.handleDrag(ce);pe=!!Ce.containerBoxChanged||!1,Ce.containerBoxChanged=!1}),pe&&(pe=!1,requestAnimationFrame(function(){Ae.forEach(function(xe){xe.layout.invalidateRects(),xe.onTranslated()})}))}function Mr(ce){var ue=ce,pe=null;return function(xe){return!(pe!==null||!K||ee)&&(pe=requestAnimationFrame(function(){K&&!ee&&(xn(xe,ue),$({draggableInfo:xe})),pe=null}),!0)}}function _i(ce,ue){return ce.getOptions().autoScrollEnabled?mr(ue,ce.getScrollMaxSpeed()):function(pe){return null}}function _r(ce){Ae.forEach(function(ue){var pe=ce?ue.getOptions().onDragStart:ue.getOptions().onDragEnd;if(pe){var xe={isSource:ue===wt.container,payload:wt.payload};ue.isDragRelevant(wt.container,wt.payload)?xe.willAcceptDrop=!0:xe.willAcceptDrop=!1,pe(xe)}})}function Jn(ce,ue){if(fr!==null){K=!0;var pe=Ae.filter(function(xe){return fr.parentElement===xe.element})[0];pe.setDraggables(),Me=pe.getOptions().lockAxis?pe.getOptions().lockAxis.toLowerCase():null,wt=function(xe){var Ce=Ae.filter(function(it){return xe.parentElement===it.element})[0],Be=Ce.draggables.indexOf(xe),st=Ce.getOptions().getGhostParent,Je=xe.getBoundingClientRect();return{container:Ce,element:xe,size:{offsetHeight:Je.bottom-Je.top,offsetWidth:Je.right-Je.left},elementIndex:Be,payload:Ce.getOptions().getChildPayload?Ce.getOptions().getChildPayload(Be):void 0,targetElement:null,position:{x:0,y:0},groupName:Ce.getOptions().groupName,ghostParent:st?st():null,invalidateShadow:null,mousePosition:null,relevantContainers:null}}(fr),It=function(xe,Ce,Be,st){var Je=Ce.x,it=Ce.y,ze=xe.getBoundingClientRect(),Ge=ze.left,Ye=ze.top,ft=ze.right,ht=ze.bottom,nt=Xt(Be.layout.getContainerRectangles().visibleRect,ze),Zt=nt.left+(nt.right-nt.left)/2,dt=nt.top+(nt.bottom-nt.top)/2,Ut=xe.cloneNode(!0);return Ut.style.zIndex="1000",Ut.style.boxSizing="border-box",Ut.style.position="fixed",Ut.style.top="0px",Ut.style.left="0px",Ut.style.transform=null,Ut.style.removeProperty("transform"),Be.shouldUseTransformForGhost()?Ut.style.transform="translate3d(".concat(Ge,"px, ").concat(Ye,"px, 0)"):(Ut.style.top="".concat(Ye,"px"),Ut.style.left="".concat(Ge,"px")),Ut.style.width=ft-Ge+"px",Ut.style.height=ht-Ye+"px",Ut.style.overflow="visible",Ut.style.transition=null,Ut.style.removeProperty("transition"),Ut.style.pointerEvents="none",Ut.style.userSelect="none",Be.getOptions().dragClass?setTimeout(function(){Dr(Ut.firstElementChild,Be.getOptions().dragClass);var Sr=window.getComputedStyle(Ut.firstElementChild).cursor;Te=Vi(Sr)}):Te=Vi(st),Dr(Ut,Be.getOptions().orientation||"vertical"),Dr(Ut,L),{ghost:Ut,centerDelta:{x:Zt-Je,y:dt-it},positionDelta:{left:Ge-Je,top:Ye-it},topLeft:{x:Ge,y:Ye}}}(fr,{x:ce.clientX,y:ce.clientY},wt.container,ue),wt.position={x:ce.clientX+It.centerDelta.x,y:ce.clientY+It.centerDelta.y},wt.mousePosition={x:ce.clientX,y:ce.clientY},Jt=Ae.filter(function(xe){return xe.isDragRelevant(pe,wt.payload)}),wt.relevantContainers=Jt,ve=Mr(Jt),$&&$({reset:!0,draggableInfo:void 0}),$=_i(pe,Jt),Jt.forEach(function(xe){return xe.prepareDrag(xe,Jt)}),_r(!0),ve(wt),Qe().appendChild(It.ghost),Ie.start()}}var cn=null;function go(){var ce=0<arguments.length&&arguments[0]!==void 0?arguments[0]:0,ue=1<arguments.length&&arguments[1]!==void 0?arguments[1]:1,pe=2<arguments.length&&arguments[2]!==void 0&&arguments[2],xe=It,Ce=xe.ghost,Be=xe.topLeft,st=Be.x,Je=Be.y,it=!wt.container||wt.container.shouldUseTransformForGhost(),ze=it?"translate3d(".concat(st,"px,").concat(Je,"px, 0)"):null;if(ue!==1&&(ze=ze?"".concat(ze," scale(").concat(ue,")"):"scale(".concat(ue,")")),0<ce)return It.ghost.style.transitionDuration=ce+"ms",void requestAnimationFrame(function(){ze&&(Ce.style.transform=ze),it||(Ce.style.left=st+"px",Ce.style.top=Je+"px"),cn=null,pe&&(Ce.style.opacity="0")});cn===null&&(cn=requestAnimationFrame(function(){ze&&(Ce.style.transform=ze),it||(Ce.style.left=st+"px",Ce.style.top=Je+"px"),cn=null,pe&&(Ce.style.opacity="0")}))}function Ln(){if(K&&!Q&&!ee){he=!(Q=!0);var ce=Object.assign({},wt,{targetElement:null,position:{x:Number.MAX_SAFE_INTEGER,y:Number.MAX_SAFE_INTEGER},mousePosition:{x:Number.MAX_SAFE_INTEGER,y:Number.MAX_SAFE_INTEGER}});Jt.forEach(function(ue){ue.handleDrag(ce)}),wt.targetElement=null,wt.cancelDrop=!0,Mn(),Q=!1}}typeof window<"u"&&function(){if(typeof window<"u"){var ce=window.document.head||window.document.getElementsByTagName("head")[0],ue=window.document.createElement("style");ue.id="smooth-dnd-style-definitions";var pe=gi(Ir);ue.type="text/css",ue.styleSheet?ue.styleSheet.cssText=pe:ue.appendChild(window.document.createTextNode(pe)),ce.appendChild(ue)}}();var Di=(Pe(),{register:function(ce){(function(ue){Ae.push(ue),K&&wt&&ue.isDragRelevant(wt.container,wt.payload)&&(Jt.push(ue),ue.prepareDrag(ue,Jt),$&&$({reset:!0,draggableInfo:void 0}),$=_i(ue,Jt),ve=Mr(Jt),ue.handleDrag(wt))})(ce)},unregister:function(ce){(function(ue){if(Ae.splice(Ae.indexOf(ue),1),K&&wt){wt.container===ue&&ue.fireRemoveElement(),wt.targetElement===ue.element&&(wt.targetElement=null);var pe=Jt.indexOf(ue);-1<pe&&(Jt.splice(pe,1),$&&$({reset:!0,draggableInfo:void 0}),$=_i(ue,Jt),ve=Mr(Jt))}})(ce)},isDragging:function(){return K},cancelDrag:Ln});function as(ce,ue){var pe=2<arguments.length&&arguments[2]!==void 0?arguments[2]:qe.animationDuration;ue?(Dr(ce,o),ce.style.transitionDuration=pe+"ms"):(ln(ce,o),ce.style.removeProperty("transition-duration"))}function Ro(ce){var ue=[];return Array.prototype.forEach.call(ce.children,function(pe){if(pe.nodeType===Node.ELEMENT_NODE){var xe=pe;Xi(pe,x)||(xe=function(Ce){if(Vt.wrapChild){var Be=window.document.createElement("div");return Be.className="".concat(x),Ce.parentElement.insertBefore(Be,Ce),Be.appendChild(Ce),Be}return Ce}(pe)),xe[B]=0,ue.push(xe)}else ce.removeChild(pe)}),ue}function ta(ce){var ue=ce.layout;return function(pe,xe){var Ce=2<arguments.length&&arguments[2]!==void 0&&arguments[2];return function Be(st,Je,it,ze){var Ge=4<arguments.length&&arguments[4]!==void 0&&arguments[4];if(ze<it)return it;if(it===ze){var Ye=ue.getBeginEnd(st[it]),ft=Ye.begin,ht=Ye.end;return Ge?Je<(ht+ft)/2?it:it+1:it}var nt=Math.floor((ze+it)/2),Zt=ue.getBeginEnd(st[nt]),dt=Zt.begin,Ut=Zt.end;return Je<dt?Be(st,Je,it,nt-1,Ge):Ut<Je?Be(st,Je,nt+1,ze,Ge):Ge?Je<(Ut+dt)/2?nt:nt+1:nt}(pe,xe,0,pe.length-1,Ce)}}function Xn(ce){var ue=ce.element,pe=ce.draggables,xe=ce.layout,Ce=ce.getOptions,Be=function(Je){var it=Je.element,ze=Je.draggables,Ge=Je.layout;return function(){ze.forEach(function(Ye){as(Ye,!1),Ge.setTranslation(Ye,0),Ge.setVisibility(Ye,!0)}),it[T]&&(it[T].parentNode.removeChild(it[T]),it[T]=null)}}({element:ue,draggables:pe,layout:xe}),st=(Vt.dropHandler||Li)({element:ue,draggables:pe,layout:xe,getOptions:Ce});return function(Je,it){var ze=it.addedIndex,Ge=it.removedIndex,Ye=2<arguments.length&&arguments[2]!==void 0&&arguments[2];if(Be(),!Je.cancelDrop&&(Je.targetElement||Ce().removeOnDropOut||Ye)){var ft={removedIndex:Ge,addedIndex:ze!==null?Ge!==null&&Ge<ze?ze-1:ze:null,payload:Je.payload};st(ft,Ce().onDrop)}}}function ls(ce){var ue=ce.element,pe=ce.getOptions,xe=null;return function(Ce){var Be=Ce.draggableInfo,st=xe;return xe==null&&Be.container.element===ue&&pe().behaviour!=="copy"&&(st=xe=Be.elementIndex),{removedIndex:st}}}function ra(ce){var ue=ce.draggables,pe=ce.layout;return function(xe){var Ce=xe.dragResult;Ce.removedIndex!==null&&pe.setVisibility(ue[Ce.removedIndex],!1)}}function ia(ce){var ue=ce.element,pe=ce.layout;return function(xe){var Ce=xe.draggableInfo,Be=document.elementFromPoint(Ce.position.x,Ce.position.y);if(Be){var st=Ji(Be,Ce.relevantContainers);if(st&&st.element===ue)return{pos:pe.getPosition(Ce.position)}}return{pos:null}}}function na(ce){var ue=ce.layout,pe=null;return function(xe){var Ce=xe.draggableInfo;return xe.dragResult.pos===null?pe=null:{elementSize:pe=pe||ue.getSize(Ce.size)}}}function cs(ce){var ue=ce.element;return function(pe){var xe=pe.draggableInfo,Ce=pe.dragResult;(function(Be,st){var Je=!(2<arguments.length&&arguments[2]!==void 0)||arguments[2];st&&Je?Be.targetElement=st:Be.targetElement===st&&(Be.targetElement=null)})(xe,ue,!!Ce.pos)}}function us(){return function(ce){return ce.dragResult.pos!==null?{addedIndex:0}:{addedIndex:null}}}function Rn(ce){var ue=ce.layout,pe=null;return function(xe){var Ce=xe.dragResult.addedIndex;if(Ce===pe)return null;pe=Ce;var Be=ue.getBeginEndOfContainer(),st=Be.begin;return Be.end,{shadowBeginEnd:{rect:ue.getTopLeftOfElementBegin(st)}}}}function hs(ce){var ue=ce.layout,pe=ce.element,xe=ce.getOptions,Ce=null;return function(Be){var st=Be.dragResult,Je=st.elementSize,it=st.shadowBeginEnd,ze=st.addedIndex,Ge=st.dropPlaceholderContainer,Ye=xe();if(Ye.dropPlaceholder){var ft=typeof Ye.dropPlaceholder=="boolean"?{}:Ye.dropPlaceholder,ht=ft.animationDuration,nt=ft.className,Zt=ft.showOnTop;if(ze===null)return Ge&&Ce!==null&&pe.removeChild(Ge),Ce=null,{dropPlaceholderContainer:void 0};if(!Ge){var dt=document.createElement("div"),Ut=document.createElement("div");Ut.className=me,dt.className="".concat(Ee," ").concat(nt||le),(Ge=document.createElement("div")).className="".concat(te),Ge.style.position="absolute",ht!==void 0&&(Ge.style.transition="all ".concat(ht,"ms ease")),Ge.appendChild(Ut),Ut.appendChild(dt),ue.setSize(Ge.style,Je+"px"),Ge.style.pointerEvents="none",Zt?pe.appendChild(Ge):pe.insertBefore(Ge,pe.firstElementChild)}return Ce!==ze&&it.dropArea&&ue.setBegin(Ge.style,it.dropArea.begin-ue.getBeginEndOfContainer().begin+"px"),Ce=ze,{dropPlaceholderContainer:Ge}}return null}}function oa(ce){var ue=Yn(ce);return function(pe){var xe=pe.draggableInfo,Ce=pe.dragResult;return xe.invalidateShadow?ue({draggableInfo:xe,dragResult:Ce}):null}}function Dn(ce){var ue=function(pe){var xe=pe.draggables,Ce=ta({layout:pe.layout});return function(Be){var st=Be.dragResult,Je=st.shadowBeginEnd,it=st.pos;if(Je)return Je.begin+Je.beginAdjustment<=it&&Je.end>=it?null:it<Je.begin+Je.beginAdjustment?Ce(xe,it):it>Je.end?Ce(xe,it)+1:xe.length;var ze=Ce(xe,it,!0);return ze!==null?ze:xe.length}}(ce);return function(pe){var xe=pe.dragResult,Ce=null;return xe.pos!==null&&(Ce=ue({dragResult:xe}))===null&&(Ce=xe.addedIndex),{addedIndex:Ce}}}function ps(){var ce=null;return function(ue){var pe=ue.dragResult,xe=pe.addedIndex,Ce=pe.shadowBeginEnd;xe!==ce&&ce!==null&&Ce&&(Ce.beginAdjustment=0),ce=xe}}function _l(ce){var ue=ce.element,pe=ce.draggables,xe=ce.layout,Ce=ce.getOptions,Be=null;return function(st){var Je=st.dragResult,it=Je.addedIndex,ze=Je.removedIndex,Ge=Je.elementSize;if(ze===null){if(it!==null){if(!Be){var Ye=xe.getBeginEndOfContainer();Ye.end=Ye.begin+xe.getSize(ue);var ft=xe.getScrollSize(ue)>xe.getSize(ue)?Ye.begin+xe.getScrollSize(ue)-xe.getScrollValue(ue):Ye.end,ht=0<pe.length?xe.getBeginEnd(pe[pe.length-1]).end-pe[pe.length-1][B]:Ye.begin;if(ft<ht+Ge){(Be=window.document.createElement("div")).className=C+" "+Ce().orientation;var nt=0<pe.length?Ge+ht-ft:Ge;return xe.setSize(Be.style,"".concat(nt,"px")),ue.appendChild(Be),ue[T]=Be,{containerBoxChanged:!0}}}}else if(Be){xe.setTranslation(Be,0);var Zt=Be;return Be=null,ue.removeChild(Zt),{containerBoxChanged:!(ue[T]=null)}}}}}function Qn(ce){var ue=ce.draggables,pe=ce.layout,xe=null,Ce=null;return function(Be){var st=Be.dragResult,Je=st.addedIndex,it=st.removedIndex,ze=st.elementSize;if(Je!==xe||it!==Ce){for(var Ge=0;Ge<ue.length;Ge++)if(Ge!==it){var Ye=ue[Ge],ft=0;it!==null&&it<Ge&&(ft-=ze),Je!==null&&Je<=Ge&&(ft+=ze),pe.setTranslation(Ye,ft)}return{addedIndex:xe=Je,removedIndex:Ce=it}}}}function Yn(ce){var ue=ce.draggables,pe=ce.layout,xe=null;return function(Ce){var Be=Ce.draggableInfo,st=Ce.dragResult,Je=st.addedIndex,it=st.removedIndex,ze=st.elementSize,Ge=st.pos,Ye=st.shadowBeginEnd;if(Ge===null)return{shadowBeginEnd:xe=null};if(Je===null||!Be.invalidateShadow&&Je===xe)return null;var ft=Je-1,ht=Number.MIN_SAFE_INTEGER,nt=0,Zt=0,dt=null,Ut=null;if(ft===it&&ft--,-1<ft){var Sr=pe.getSize(ue[ft]);if(Ut=pe.getBeginEnd(ue[ft]),ze<Sr){var yo=(Sr-ze)/2;ht=Ut.end-yo}else ht=Ut.end;nt=Ut.end}else Ut={end:pe.getBeginEndOfContainer().begin},nt=pe.getBeginEndOfContainer().begin;var Vn=Number.MAX_SAFE_INTEGER,un=Je;if(un===it&&un++,un<ue.length){var On=pe.getSize(ue[un]);if(dt=pe.getBeginEnd(ue[un]),ze<On){var _o=(On-ze)/2;Vn=dt.begin+_o}else Vn=dt.begin;Zt=dt.begin}else dt={begin:pe.getContainerRectangles().rect.end},Zt=pe.getContainerRectangles().rect.end-pe.getContainerRectangles().rect.begin;var fs=Ut&&dt?pe.getTopLeftOfElementBegin(Ut.end):null;return xe=Je,{shadowBeginEnd:{dropArea:{begin:nt,end:Zt},begin:ht,end:Vn,rect:fs,beginAdjustment:Ye?Ye.beginAdjustment:0}}}}function ds(){var ce=null;return function(ue){var pe=ue.dragResult,xe=pe.pos,Ce=pe.addedIndex,Be=pe.shadowBeginEnd;if(xe!==null){if(Ce!=null&&ce===null){if(xe<Be.begin){var st=xe-Be.begin-5;Be.beginAdjustment=st}ce=Ce}}else ce=null}}function oi(ce){var ue=ce.getOptions,pe=!1,xe=ue();return function(Ce){var Be=!!Ce.dragResult.pos;Be!==pe&&((pe=Be)?xe.onDragEnter&&xe.onDragEnter():xe.onDragLeave&&xe.onDragLeave())}}function tr(ce){var ue=ce.getOptions,pe=null,xe=ue();return function(Ce){var Be=Ce.dragResult,st=Be.addedIndex,Je=Be.removedIndex,it=Ce.draggableInfo,ze=it.payload,Ge=it.element;if(xe.onDropReady&&st!==null&&pe!==st){var Ye=pe=st;Je!==null&&Je<st&&Ye--,xe.onDropReady({addedIndex:Ye,removedIndex:Je,payload:ze,element:Ge?Ge.firstElementChild:void 0})}}}function zn(ce){return ce.getOptions().behaviour==="drop-zone"?si(ce)(ls,ra,ia,na,cs,us,Rn,oi,tr):si(ce)(ls,ra,ia,na,cs,oa,Dn,ps,_l,Qn,Yn,hs,ds,oi,tr)}function si(ce){return function(){for(var ue=arguments.length,pe=new Array(ue),xe=0;xe<ue;xe++)pe[xe]=arguments[xe];var Ce=pe.map(function(st){return st(ce)}),Be=null;return function(st){return Be=Ce.reduce(function(Je,it){return Object.assign(Je,it({draggableInfo:st,dragResult:Je}))},Be||{addedIndex:null,removedIndex:null,elementSize:null,pos:null,shadowBeginEnd:null})}}}function Bn(ce){return function(ue){var pe=Object.assign({},qe,ue),xe=null,Ce=null,Be=function(ft,ht){var nt=Ro(ft),Zt=ht();return Dr(ft,"".concat(H," ").concat(Zt.orientation)),{element:ft,draggables:nt,getOptions:ht,layout:bt(ft,Zt.orientation,Zt.animationDuration)}}(ce,Ye),st=zn(Be),Je=Xn(Be),it=function(ft,ht){var nt=[];function Zt(){nt&&(nt.forEach(function(dt){return dt.removeEventListener("scroll",ht)}),window.removeEventListener("scroll",ht))}return function(){for(var dt=ft;dt;)(qt(dt,"x")||qt(dt,"y"))&&nt.push(dt),dt=dt.parentElement}(),{dispose:function(){Zt(),nt=null},start:function(){nt&&(nt.forEach(function(dt){return dt.addEventListener("scroll",ht)}),window.addEventListener("scroll",ht))},stop:Zt}}(ce,function(){Be.layout.invalidateRects(),ze()});function ze(){Ce!==null&&(Ce.invalidateShadow=!0,xe=st(Ce),Ce.invalidateShadow=!1)}function Ge(ft,ht){for(var nt=Ro(ht),Zt=0;Zt<nt.length;Zt++)ft[Zt]=nt[Zt];for(var dt=0;dt<ft.length-nt.length;dt++)ft.pop()}function Ye(){return pe}return{element:ce,draggables:Be.draggables,isDragRelevant:function(ft){var ht=ft.element,nt=ft.getOptions;return function(Zt,dt){var Ut=nt();if(Ut.shouldAcceptDrop)return Ut.shouldAcceptDrop(Zt.getOptions(),dt);var Sr=Zt.getOptions();return Ut.behaviour!=="copy"&&Rr(ht,"."+x)!==Zt.element&&(Zt.element===ht||!(!Sr.groupName||Sr.groupName!==Ut.groupName))}}(Be),layout:Be.layout,dispose:function(ft){it.dispose(),function(ht){Vt.wrapChild&&Array.prototype.forEach.call(ht.children,function(nt){nt.nodeType===Node.ELEMENT_NODE&&Xi(nt,x)&&(ht.insertBefore(nt.firstElementChild,nt),ht.removeChild(nt))})}(ft.element)},prepareDrag:function(ft,ht){var nt=ft.element,Zt=Be.draggables;Ge(Zt,nt),ft.layout.invalidateRects(),Zt.forEach(function(dt){return as(dt,!0,Ye().animationDuration)}),it.start()},handleDrag:function(ft){return xe=st(Ce=ft)},handleDrop:function(ft){it.stop(),xe&&xe.dropPlaceholderContainer&&ce.removeChild(xe.dropPlaceholderContainer),Ce=null,st=zn(Be),Je(ft,xe),xe=null},fireRemoveElement:function(){Je(Ce,Object.assign({},xe,{addedIndex:null}),!0),xe=null},getDragResult:function(){return xe},getTranslateCalculator:function(ft){return Qn(Be)(ft)},onTranslated:function(){ze()},setDraggables:function(){Ge(Be.draggables,ce)},getScrollMaxSpeed:function(){return Vt.maxScrollSpeed},shouldUseTransformForGhost:function(){return Vt.useTransformForGhost===!0},getOptions:Ye,setOptions:function(ft){var ht=!(1<arguments.length&&arguments[1]!==void 0)||arguments[1];pe=ht===!1?Object.assign({},qe,ft):Object.assign({},qe,pe,ft)}}}}var Vt=function(ce,ue){var pe=Bn(ce)(ue);return ce[P]=pe,Di.register(pe),{dispose:function(){Di.unregister(pe),pe.dispose(pe)},setOptions:function(xe,Ce){pe.setOptions(xe,Ce)}}};function bn(ce,ue,pe){Object.defineProperty(ce,pe,{set:function(xe){ue[pe]=xe},get:function(){return ue[pe]}})}Vt.wrapChild=!0,Vt.cancelDrag=function(){Di.cancelDrag()},Vt.isDragging=function(){return Di.isDragging()};function Fi(ce,ue){return console.warn('default export is deprecated. please use named export "smoothDnD"'),Vt(ce,ue)}Fi.cancelDrag=function(){Vt.cancelDrag()},Fi.isDragging=function(){return Vt.isDragging()},bn(Fi,Vt,"useTransformForGhost"),bn(Fi,Vt,"maxScrollSpeed"),bn(Fi,Vt,"wrapChild"),bn(Fi,Vt,"dropHandler"),_.smoothDnD=Vt,_.constants=De,_.dropHandlers=In,_.default=Fi,Object.defineProperty(_,"__esModule",{value:!0})})}(al,al.exports)),al.exports}var ll=tb();function hf(p){return p?typeof p=="string"||typeof p=="object"&&(typeof p.value=="string"||typeof p.value=="function"||typeof p.value=="object"):!0}function pf(p,f){const _=p.$props.tag;if(_){if(typeof _=="string"){const v={value:_};return f&&(v.props={class:f}),v}else if(typeof _=="object"){const v={value:_.value||"div",props:_.props||{}};return f&&(v.props.class?Array.isArray(v.props.class)?v.props.class.push(f):v.props.class=[f,v.props.class]:v.props.class=f),v}}return{value:"div"}}ll.smoothDnD.dropHandler=ll.dropHandlers.reactDropHandler().handler,ll.smoothDnD.wrapChild=!1;const df={"drag-start":"onDragStart","drag-end":"onDragEnd",drop:"onDrop","drag-enter":"onDragEnter","drag-leave":"onDragLeave","drop-ready":"onDropReady"};var rb=S.defineComponent({name:"Container",mounted(){const p=Object.assign({},this.$props);for(const f in df)p[df[f]]=_=>{this.$emit(f,_)};this.containerElement=this.$refs.container||this.$el,this.container=ll.smoothDnD(this.containerElement,p)},unmounted(){if(this.container)try{this.container.dispose()}catch{}},emits:["drop","drag-start","drag-end","drag-enter","drag-leave","drop-ready"],props:{orientation:{type:String,default:"vertical"},removeOnDropOut:{type:Boolean,default:!1},autoScrollEnabled:{type:Boolean,default:!0},animationDuration:{type:Number,default:250},behaviour:String,groupName:String,dragHandleSelector:String,nonDragAreaSelector:String,lockAxis:String,dragClass:String,dropClass:String,dragBeginDelay:Number,getChildPayload:Function,shouldAnimateDrop:Function,shouldAcceptDrop:Function,getGhostParent:Function,dropPlaceholder:[Object,Boolean],tag:{validator:hf,default:"div"}},render(){const p=pf(this);return S.h(p.value,Object.assign({},{ref:"container"},p.props),this.$slots.default())}}),ib=S.defineComponent({name:"Draggable",props:{tag:{validator:hf,default:"div"}},render:function(){const p=pf(this,ll.constants.wrapperClass);return S.h(p.value,Object.assign({},p.props),this.$slots.default())}});function nb(){const f=new URLSearchParams(window.location.search).get("layers");return f?f.split(","):[]}function ob(p){const f=new URLSearchParams(window.location.search);p.length>0?f.set("layers",p.join(",")):f.delete("layers");const _=`${window.location.pathname}?${f.toString()}`;window.history.replaceState({},"",_)}const sb={components:{VsLayersItem:Px,ZoomInIcon:Rx,InfoIcon:Vx,TableIcon:qx,TrashIcon:Wx,DotsIcon:Jx,ChevronRightIcon:$x,Container:rb,Draggable:ib},props:{center:{type:Array,default:()=>[26.2516,50.6199]},zoom:{type:Number,default:12},map:{type:Object,default:()=>null},history:{type:Boolean,default:!1}},emits:["content-resize"],data(){return{layers:null,rawCatalog:null,categories:null,selectedCategory:"",search:"",activeView:"catalog",selectedLayers:[]}},computed:{searchedLayers(){return this.layers.filter(({name:p})=>p==null?void 0:p.toLowerCase().match(this.search.toLowerCase()))}},async mounted(){if(await this.getLayers(),this.categories=this.layersCategories(),this.history){const p=nb();p.length>0&&this.layers&&(p.forEach(f=>{const _=this.layers.find(v=>String(v.id)===f);if(_&&!this.selectedLayers.find(v=>v.id===_.id)){const v={..._,visible:!0,opacity:100};this.selectedLayers.push(v),Lo(this.map,v)}}),this.activeView="selected")}this._resizeObserver=new window.ResizeObserver(()=>{this.$emit("content-resize")}),this.$nextTick(()=>{const p=this.$el;p&&this._resizeObserver.observe(p)})},beforeUnmount(){this._resizeObserver&&this._resizeObserver.disconnect()},watch:{selectedLayers:{handler(p){this.history&&ob(p.map(f=>f.id))},deep:!0}},methods:{async getLayers(){try{const p=await Wr.get("/api/map-catalog"),f=(p.data.services||[]).filter(_=>_.service_type!=="other");this.layers=[...f,...p.data.rasters||[]],this.rawCatalog={...p.data,services:f}}catch(p){console.error("Помилка завантаження шарів:",p)}},layersCategories(){return this.rawCatalog?{Сервіси:this.rawCatalog.services||[],Растри:this.rawCatalog.rasters||[]}:{}},selectCategory(p){this.selectedCategory=this.selectedCategory===p?"":p},formatNumber(p){return Intl.NumberFormat("uk",{notation:"compact"}).format(p)},onEnter(){this.layers.filter(({name:p})=>p==null?void 0:p.toLowerCase().match(this.search.toLowerCase()))},clearSearch(){this.search=""},addToSelected(p){if(!this.selectedLayers.find(f=>f.id===p.id)){const f={...p,visible:!0,opacity:100};this.selectedLayers.unshift(f),Lo(this.map,f)}},deleteLayer(p){const f=this.selectedLayers.findIndex(_=>_.id===p.id);f!==-1&&this.selectedLayers.splice(f,1),Js(this.map,p.id)},async toggleLayerVisibility(p){try{p.visible?await Lo(this.map,p):await Js(this.map,p.id)}catch(f){console.error("Error toggling layer visibility:",f),p.visible=!p.visible}},onLayerOpacityChange(p){this.updateLayerOpacity(p)},updateLayerOpacity(p){if(this.map){const f=this.map.getStyle().layers.filter(v=>v.id.includes(p.id)),_=p.opacity/100;f.forEach(v=>{v.type==="fill"?(p.originalFillOpacity||(p.originalFillOpacity=this.map.getPaintProperty(v.id,"fill-opacity")||1),this.map.setPaintProperty(v.id,"fill-opacity",p.originalFillOpacity*_)):v.type==="raster"?this.map.setPaintProperty(v.id,"raster-opacity",_):v.type==="line"?this.map.setPaintProperty(v.id,"line-opacity",_):v.type==="circle"?(this.map.setPaintProperty(v.id,"circle-opacity",_),this.map.setPaintProperty(v.id,"circle-stroke-opacity",_)):v.type==="symbol"&&(this.map.setPaintProperty(v.id,"icon-opacity",_),this.map.setPaintProperty(v.id,"text-opacity",_))})}},async handleRemoveFromCatalog(p){const f=this.selectedLayers.find(_=>_.id===p.id);f!=null&&f.visible&&await Js(this.map,p.id),this.deleteLayer(p)},clearSelectedLayers(){this.selectedLayers.forEach(async p=>{p.visible&&await Js(this.map,p.id)}),this.selectedLayers=[]},zoomToLayer(p){this.fitBoundsByLayer(p)},showLayerInfo(p){},showLayerTable(p){},fitBoundsByLayer(p){p&&p.bbox&&Array.isArray(p.bbox)&&p.bbox.length===4&&this.map&&this.map.fitBounds([[p.bbox[0],p.bbox[1]],[p.bbox[2],p.bbox[3]]],{padding:50,duration:0})},popoverActions(p){return[{label:"Збільшити до шару",icon:"ZoomInIcon",class:p&&p.bbox&&Array.isArray(p.bbox)&&p.bbox.length===4?"text-gray-700 hover:bg-gray-100":"text-gray-700 hover:bg-gray-100 opacity-50 cursor-not-allowed",handler:"zoomToLayer",disabled:!(p&&p.bbox&&Array.isArray(p.bbox)&&p.bbox.length===4)},{label:"Інформація про шар",icon:"InfoIcon",class:"text-gray-700 hover:bg-gray-100 opacity-50 cursor-not-allowed",handler:"showLayerInfo",disabled:!0},{label:"Таблиця шару",icon:"TableIcon",class:"text-gray-700 hover:bg-gray-100 opacity-50 cursor-not-allowed",handler:"showLayerTable",disabled:!0},{divider:!0},{label:"Видалити шар",icon:"TrashIcon",class:"text-red-600 hover:bg-red-50",handler:"deleteLayer",disabled:!1}]},onDrop(p){const{removedIndex:f,addedIndex:_,payload:v}=p;if(f===null&&_===null)return;const k=[...this.selectedLayers];let P=v;if(f!==null&&(P=k.splice(f,1)[0]),_!==null&&k.splice(_,0,P),this.selectedLayers=k,this.map&&this.selectedLayers.length>1)for(let x=this.selectedLayers.length-1;x>=0;x--){const o=this.selectedLayers[x];o.visible&&this.map.getStyle().layers.find(B=>B.id.includes(o.id))&&this.map.getStyle().layers.forEach(B=>{B.id.includes(o.id)&&this.map.moveLayer(B.id)})}}}},ab={class:"w-full max-w-md mx-auto p-4 bg-white border border-gray-200 rounded-lg shadow-sm"},lb={class:"flex items-center justify-between mb-4"},cb={class:"flex items-center gap-2"},ub={class:"text-lg font-semibold text-gray-800"},hb={key:0},pb={key:1},db={class:"flex mb-4 border-b border-gray-200"},fb={key:0},mb={class:"mb-4"},gb={class:"border border-gray-200 rounded-md p-3 mb-2 bg-white shadow-sm"},yb={class:"flex items-center justify-between"},_b={class:"flex items-center gap-2 cursor-move"},xb=["onUpdate:modelValue","onChange"],bb={class:"text-gray-800 font-medium"},vb={class:"flex items-center gap-2"},wb={class:"relative"},Sb={class:"flex items-center gap-2"},Ab=["onUpdate:modelValue","onInput"],kb={class:"text-xs text-gray-600 whitespace-nowrap"},Tb=["onClick"],Cb={class:"relative"},Eb={class:"w-48"},Pb={key:0,class:"my-1 border-gray-200"},Ib=["disabled","onClick"],Mb={class:"p-1 rounded-full hover:bg-gray-100 transition-colors","aria-label":"Layer actions"},Lb={key:0,class:"text-center text-[14px] text-[#4b5563]"},Rb={class:"relative mt-[10px]"},Db={class:"absolute top-1/2 left-[8px] w-[16px] h-[16px]",style:{transform:"translate(0, -50%)"},width:"16",height:"17",viewBox:"0 0 16 17",fill:"none",xmlns:"http://www.w3.org/2000/svg"},zb={key:0,class:"vs-layers-catalog__list flex-1 scrollable-container overflow-auto mt-2 catalog-list"},Bb={key:0,class:"text-center text-[14px] text-[#4b5563]"},Vb={key:0,class:"text-center text-[14px] text-[#4b5563]"},Ob=["onClick"],Fb={class:"flex items-center gap-x-3"},Nb=["title"],qb={class:"text-xs opacity-60 text-[#4b5563]"};function Ub(p,f,_,v,k,P){var T;const x=S.resolveComponent("VsPopover"),o=S.resolveComponent("DotsIcon"),B=S.resolveComponent("Draggable"),D=S.resolveComponent("Container"),L=S.resolveComponent("searchIcon"),H=S.resolveComponent("closeIcon"),M=S.resolveComponent("VsLayersItem"),C=S.resolveComponent("chevronRightIcon");return S.openBlock(),S.createElementBlock("div",ab,[S.createElementVNode("div",lb,[S.createElementVNode("div",cb,[f[6]||(f[6]=S.createElementVNode("svg",{xmlns:"http://www.w3.org/2000/svg",width:"20",height:"20",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor","stroke-width":"2","stroke-linecap":"round","stroke-linejoin":"round",class:"lucide lucide-layers text-blue-600"},[S.createElementVNode("path",{d:"m12.83 2.18a2 2 0 0 0-1.66 0L2.6 6.08a1 1 0 0 0 0 1.83l8.58 3.91a2 2 0 0 0 1.66 0l8.58-3.9a1 1 0 0 0 0-1.83Z"}),S.createElementVNode("path",{d:"m22 17.65-9.17 4.16a2 2 0 0 1-1.66 0L2 17.65"}),S.createElementVNode("path",{d:"m22 12.65-9.17 4.16a2 2 0 0 1-1.66 0L2 12.65"})],-1)),S.createElementVNode("h2",ub,[S.createTextVNode(S.toDisplayString(k.activeView==="catalog"?"Каталог":"Вибрані шари")+" ",1),k.activeView==="catalog"?(S.openBlock(),S.createElementBlock("span",hb,"("+S.toDisplayString(((T=k.layers)==null?void 0:T.length)||0)+")",1)):(S.openBlock(),S.createElementBlock("span",pb,"("+S.toDisplayString(k.selectedLayers.length)+")",1))])]),S.createElementVNode("button",{class:"p-1 rounded-full hover:bg-gray-200 transition-colors","aria-label":"Reset layers",onClick:f[0]||(f[0]=(...N)=>P.clearSelectedLayers&&P.clearSelectedLayers(...N))},f[7]||(f[7]=[S.createStaticVNode('<svg xmlns="http://www.w3.org/2000/svg" width="16" height="16" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="lucide lucide-refresh-cw text-gray-600" data-v-40ac73af><path d="M3 12a9 9 0 0 1 9-9 9.75 9.75 0 0 1 6.74 2.74L21 8" data-v-40ac73af></path><path d="M21 3v5h-5" data-v-40ac73af></path><path d="M21 12a9 9 0 0 1-9 9 9.75 9.75 0 0 1-6.74-2.74L3 16" data-v-40ac73af></path><path d="M8 16H3v5" data-v-40ac73af></path></svg>',1)]))]),S.createElementVNode("div",db,[S.createElementVNode("button",{class:S.normalizeClass(["px-4 py-2 text-sm font-medium",k.activeView==="catalog"?"text-blue-600 border-b-2 border-blue-600":"text-gray-600 hover:text-gray-800"]),onClick:f[1]||(f[1]=N=>k.activeView="catalog")}," Каталог ",2),S.createElementVNode("button",{class:S.normalizeClass(["px-4 py-2 text-sm font-medium",k.activeView==="selected"?"text-blue-600 border-b-2 border-blue-600":"text-gray-600 hover:text-gray-800"]),onClick:f[2]||(f[2]=N=>k.activeView="selected")}," Вибрані шари ",2)]),k.activeView==="selected"?(S.openBlock(),S.createElementBlock("div",fb,[S.createElementVNode("div",mb,[S.createElementVNode("button",{class:"flex items-center gap-2 text-blue-600 hover:text-blue-700 transition-colors px-3 py-2 rounded-md bg-blue-50 hover:bg-blue-100 w-full justify-center",onClick:f[3]||(f[3]=N=>k.activeView="catalog")},f[8]||(f[8]=[S.createElementVNode("svg",{xmlns:"http://www.w3.org/2000/svg",width:"16",height:"16",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor","stroke-width":"2","stroke-linecap":"round","stroke-linejoin":"round",class:"lucide lucide-plus"},[S.createElementVNode("path",{d:"M5 12h14"}),S.createElementVNode("path",{d:"M12 5v14"})],-1),S.createElementVNode("span",null,"Вибрати шар",-1)]))]),(S.openBlock(),S.createBlock(D,{onDrop:P.onDrop,lockAxis:"y","drag-class":"dragging",key:k.selectedLayers.length,class:"space-y-2 max-h-[400px] overflow-y-auto pr-1 [&::-webkit-scrollbar]:h-1.5 [&::-webkit-scrollbar]:w-1.5 [&::-webkit-scrollbar-thumb]:rounded-full [&::-webkit-scrollbar-thumb]:bg-gray-300 [&::-webkit-scrollbar-track]:bg-transparent"},{default:S.withCtx(()=>[(S.openBlock(!0),S.createElementBlock(S.Fragment,null,S.renderList(k.selectedLayers,(N,G)=>(S.openBlock(),S.createBlock(B,{key:N.id||G,payload:N},{default:S.withCtx(()=>[S.createElementVNode("div",gb,[S.createElementVNode("div",yb,[S.createElementVNode("div",_b,[f[9]||(f[9]=S.createElementVNode("svg",{width:"16",height:"16",fill:"none",stroke:"#9ca3af","stroke-width":"2",viewBox:"0 0 24 24",class:"mr-1 shrink-0"},[S.createElementVNode("circle",{cx:"5",cy:"5",r:"1.5"}),S.createElementVNode("circle",{cx:"5",cy:"12",r:"1.5"}),S.createElementVNode("circle",{cx:"5",cy:"19",r:"1.5"}),S.createElementVNode("circle",{cx:"12",cy:"5",r:"1.5"}),S.createElementVNode("circle",{cx:"12",cy:"12",r:"1.5"}),S.createElementVNode("circle",{cx:"12",cy:"19",r:"1.5"}),S.createElementVNode("circle",{cx:"19",cy:"5",r:"1.5"}),S.createElementVNode("circle",{cx:"19",cy:"12",r:"1.5"}),S.createElementVNode("circle",{cx:"19",cy:"19",r:"1.5"})],-1)),S.withDirectives(S.createElementVNode("input",{type:"checkbox",class:"w-4 h-4 text-blue-600 rounded focus:ring-blue-500","onUpdate:modelValue":ie=>N.visible=ie,onChange:ie=>P.toggleLayerVisibility(N)},null,40,xb),[[S.vModelCheckbox,N.visible]]),S.createElementVNode("span",bb,S.toDisplayString(N.name||N.title||N.label),1)]),S.createElementVNode("div",vb,[S.createElementVNode("div",wb,[S.createVNode(x,{placement:"bottom"},{reference:S.withCtx(()=>[S.createElementVNode("div",{class:"text-sm text-gray-600 hover:text-gray-800 transition-colors px-2 py-1 rounded hover:bg-gray-100 cursor-pointer",onClick:ie=>P.updateLayerOpacity(N)},S.toDisplayString(N.opacity||100)+"% ",9,Tb)]),default:S.withCtx(()=>[S.createElementVNode("div",Sb,[f[10]||(f[10]=S.createElementVNode("label",{class:"text-gray-600 whitespace-nowrap"},"Прозорість:",-1)),S.withDirectives(S.createElementVNode("input",{type:"range",min:"0",max:"100",step:"1","onUpdate:modelValue":ie=>N.opacity=ie,onInput:ie=>P.onLayerOpacityChange(N),class:"h-2 w-full accent-blue-600 rounded-lg cursor-pointer bg-gray-200"},null,40,Ab),[[S.vModelText,N.opacity]]),S.createElementVNode("span",kb,S.toDisplayString(Math.round(N.opacity))+"% ",1)])]),_:2},1024)]),S.createElementVNode("div",Cb,[S.createVNode(x,{placement:"bottom"},{reference:S.withCtx(()=>[S.createElementVNode("div",Mb,[S.createVNode(o)])]),default:S.withCtx(()=>[S.createElementVNode("div",Eb,[(S.openBlock(!0),S.createElementBlock(S.Fragment,null,S.renderList(P.popoverActions(N),(ie,le)=>(S.openBlock(),S.createElementBlock(S.Fragment,{key:le},[ie.divider?(S.openBlock(),S.createElementBlock("hr",Pb)):(S.openBlock(),S.createElementBlock("button",{key:1,class:S.normalizeClass("w-full p-2 text-left text-sm flex items-center gap-2 "+(ie.class||"")),disabled:ie.disabled,onClick:Ee=>!ie.disabled&&p.$options.methods[ie.handler].call(this,N)},[(S.openBlock(),S.createBlock(S.resolveDynamicComponent(ie.icon),{class:"lucide"})),S.createTextVNode(" "+S.toDisplayString(ie.label),1)],10,Ib))],64))),128))])]),_:2},1024)])])])])]),_:2},1032,["payload"]))),128)),k.selectedLayers.length===0?(S.openBlock(),S.createElementBlock("div",Lb,f[11]||(f[11]=[S.createElementVNode("p",null,'Щоб додати шар, натисніть на кнопку "Вибрати шар".',-1)]))):S.createCommentVNode("",!0)]),_:1},8,["onDrop"]))])):(S.openBlock(),S.createElementBlock(S.Fragment,{key:1},[S.createElementVNode("div",Rb,[(S.openBlock(),S.createElementBlock("svg",Db,f[12]||(f[12]=[S.createElementVNode("path",{d:"M7.33333 13.1667C10.2789 13.1667 12.6667 10.7789 12.6667 7.83333C12.6667 4.88781 10.2789 2.5 7.33333 2.5C4.38781 2.5 2 4.88781 2 7.83333C2 10.7789 4.38781 13.1667 7.33333 13.1667Z",stroke:"#6B7280","stroke-linecap":"round","stroke-linejoin":"round"},null,-1),S.createElementVNode("path",{d:"M13.9995 14.5L11.1328 11.6333",stroke:"#6B7280","stroke-linecap":"round","stroke-linejoin":"round"},null,-1)]))),S.withDirectives(S.createElementVNode("input",{title:"value",placeholder:"Введіть назву шару...","onUpdate:modelValue":f[4]||(f[4]=N=>k.search=N),type:"text",class:"py-[7px] ps-8 pe-8 block w-full bg-gray-100 border-transparent rounded-lg text-sm focus:bg-white focus:border-blue-500 focus:ring-blue-500 disabled:opacity-50 disabled:pointer-events-none dark:bg-neutral-700 dark:border-transparent dark:text-neutral-400 dark:placeholder:text-neutral-400 dark:focus:bg-neutral-800 dark:focus:ring-neutral-600",onKeyup:f[5]||(f[5]=S.withKeys((...N)=>P.onEnter&&P.onEnter(...N),["enter"]))},null,544),[[S.vModelText,k.search]]),S.createVNode(L,{class:"absolute top-1/2 left-[8px] w-[16px] h-[16px]",style:{transform:"translate(0, -50%)"}}),k.search?(S.openBlock(),S.createBlock(H,{key:0,class:"absolute top-1/2 right-[10px] w-[16px] h-[16px] cursor-pointer",style:{transform:"translate(0, -50%)"},onClick:P.clearSearch},null,8,["onClick"])):S.createCommentVNode("",!0)]),k.categories?(S.openBlock(),S.createElementBlock("div",zb,[k.search?(S.openBlock(),S.createElementBlock(S.Fragment,{key:0},[(S.openBlock(!0),S.createElementBlock(S.Fragment,null,S.renderList(P.searchedLayers,(N,G)=>(S.openBlock(),S.createBlock(M,{key:G,layer:N,map:_.map,selectedLayers:k.selectedLayers,onSelect:P.addToSelected,onRemove:P.handleRemoveFromCatalog},null,8,["layer","map","selectedLayers","onSelect","onRemove"]))),128)),P.searchedLayers.length===0?(S.openBlock(),S.createElementBlock("div",Bb," Нічого не знайдено ")):S.createCommentVNode("",!0)],64)):(S.openBlock(),S.createElementBlock(S.Fragment,{key:1},[!k.categories||Object.keys(k.categories).length===0?(S.openBlock(),S.createElementBlock("div",Vb," Каталог порожній ")):(S.openBlock(!0),S.createElementBlock(S.Fragment,{key:1},S.renderList(Object.keys(k.categories),N=>(S.openBlock(),S.createElementBlock("div",{key:N},[S.createElementVNode("div",{class:"hover:bg-gray-100 focus:bg-gray-100 px-2.5 cursor-pointer p-[8px] rounded-lg flex justify-between items-center",onClick:G=>P.selectCategory(N)},[S.createElementVNode("div",Fb,[S.createVNode(C,{class:S.normalizeClass({"rotate-up":N===k.selectedCategory,"rotate-down":N!==k.selectedCategory})},null,8,["class"]),S.createElementVNode("div",{class:"max-w-[260px] text-[14px] text-[#4b5563]",title:N},S.toDisplayString(N),9,Nb)]),S.createElementVNode("div",qb,S.toDisplayString(P.formatNumber(k.categories[N].length)),1)],8,Ob),S.withDirectives(S.createElementVNode("div",null,[(S.openBlock(!0),S.createElementBlock(S.Fragment,null,S.renderList(k.categories[N],(G,ie)=>(S.openBlock(),S.createBlock(M,{key:ie,layer:G,map:_.map,selectedLayers:k.selectedLayers,onSelect:P.addToSelected,onRemove:P.handleRemoveFromCatalog},null,8,["layer","map","selectedLayers","onSelect","onRemove"]))),128))],512),[[S.vShow,N===k.selectedCategory]])]))),128))],64))])):S.createCommentVNode("",!0)],64))])}const jb=Nr(sb,[["render",Ub],["__scopeId","data-v-40ac73af"]]);function zh(){return{async:!1,breaks:!1,extensions:null,gfm:!0,hooks:null,pedantic:!1,renderer:null,silent:!1,tokenizer:null,walkTokens:null}}var os=zh();function ff(p){os=p}var cl={exec:()=>null};function yr(p,f=""){let _=typeof p=="string"?p:p.source;const v={replace:(k,P)=>{let x=typeof P=="string"?P:P.source;return x=x.replace(Bi.caret,"$1"),_=_.replace(k,x),v},getRegex:()=>new RegExp(_,f)};return v}var Bi={codeRemoveIndent:/^(?: {1,4}| {0,3}\t)/gm,outputLinkReplace:/\\([\[\]])/g,indentCodeCompensation:/^(\s+)(?:```)/,beginningSpace:/^\s+/,endingHash:/#$/,startingSpaceChar:/^ /,endingSpaceChar:/ $/,nonSpaceChar:/[^ ]/,newLineCharGlobal:/\n/g,tabCharGlobal:/\t/g,multipleSpaceGlobal:/\s+/g,blankLine:/^[ \t]*$/,doubleBlankLine:/\n[ \t]*\n[ \t]*$/,blockquoteStart:/^ {0,3}>/,blockquoteSetextReplace:/\n {0,3}((?:=+|-+) *)(?=\n|$)/g,blockquoteSetextReplace2:/^ {0,3}>[ \t]?/gm,listReplaceTabs:/^\t+/,listReplaceNesting:/^ {1,4}(?=( {4})*[^ ])/g,listIsTask:/^\[[ xX]\] /,listReplaceTask:/^\[[ xX]\] +/,anyLine:/\n.*\n/,hrefBrackets:/^<(.*)>$/,tableDelimiter:/[:|]/,tableAlignChars:/^\||\| *$/g,tableRowBlankLine:/\n[ \t]*$/,tableAlignRight:/^ *-+: *$/,tableAlignCenter:/^ *:-+: *$/,tableAlignLeft:/^ *:-+ *$/,startATag:/^<a /i,endATag:/^<\/a>/i,startPreScriptTag:/^<(pre|code|kbd|script)(\s|>)/i,endPreScriptTag:/^<\/(pre|code|kbd|script)(\s|>)/i,startAngleBracket:/^</,endAngleBracket:/>$/,pedanticHrefTitle:/^([^'"]*[^\s])\s+(['"])(.*)\2/,unicodeAlphaNumeric:/[\p{L}\p{N}]/u,escapeTest:/[&<>"']/,escapeReplace:/[&<>"']/g,escapeTestNoEncode:/[<>"']|&(?!(#\d{1,7}|#[Xx][a-fA-F0-9]{1,6}|\w+);)/,escapeReplaceNoEncode:/[<>"']|&(?!(#\d{1,7}|#[Xx][a-fA-F0-9]{1,6}|\w+);)/g,unescapeTest:/&(#(?:\d+)|(?:#x[0-9A-Fa-f]+)|(?:\w+));?/ig,caret:/(^|[^\[])\^/g,percentDecode:/%25/g,findPipe:/\|/g,splitPipe:/ \|/,slashPipe:/\\\|/g,carriageReturn:/\r\n|\r/g,spaceLine:/^ +$/gm,notSpaceStart:/^\S*/,endingNewline:/\n$/,listItemRegex:p=>new RegExp(`^( {0,3}${p})((?:[ ][^\\n]*)?(?:\\n|$))`),nextBulletRegex:p=>new RegExp(`^ {0,${Math.min(3,p-1)}}(?:[*+-]|\\d{1,9}[.)])((?:[ ][^\\n]*)?(?:\\n|$))`),hrRegex:p=>new RegExp(`^ {0,${Math.min(3,p-1)}}((?:- *){3,}|(?:_ *){3,}|(?:\\* *){3,})(?:\\n+|$)`),fencesBeginRegex:p=>new RegExp(`^ {0,${Math.min(3,p-1)}}(?:\`\`\`|~~~)`),headingBeginRegex:p=>new RegExp(`^ {0,${Math.min(3,p-1)}}#`),htmlBeginRegex:p=>new RegExp(`^ {0,${Math.min(3,p-1)}}<(?:[a-z].*>|!--)`,"i")},Hb=/^(?:[ \t]*(?:\n|$))+/,Wb=/^((?: {4}| {0,3}\t)[^\n]+(?:\n(?:[ \t]*(?:\n|$))*)?)+/,Zb=/^ {0,3}(`{3,}(?=[^`\n]*(?:\n|$))|~{3,})([^\n]*)(?:\n|$)(?:|([\s\S]*?)(?:\n|$))(?: {0,3}\1[~`]* *(?=\n|$)|$)/,ul=/^ {0,3}((?:-[\t ]*){3,}|(?:_[ \t]*){3,}|(?:\*[ \t]*){3,})(?:\n+|$)/,Kb=/^ {0,3}(#{1,6})(?=\s|$)(.*)(?:\n+|$)/,Bh=/(?:[*+-]|\d{1,9}[.)])/,mf=/^(?!bull |blockCode|fences|blockquote|heading|html|table)((?:.|\n(?!\s*?\n|bull |blockCode|fences|blockquote|heading|html|table))+?)\n {0,3}(=+|-+) *(?:\n+|$)/,gf=yr(mf).replace(/bull/g,Bh).replace(/blockCode/g,/(?: {4}| {0,3}\t)/).replace(/fences/g,/ {0,3}(?:`{3,}|~{3,})/).replace(/blockquote/g,/ {0,3}>/).replace(/heading/g,/ {0,3}#{1,6}/).replace(/html/g,/ {0,3}<[^\n>]+>\n/).replace(/\|table/g,"").getRegex(),Gb=yr(mf).replace(/bull/g,Bh).replace(/blockCode/g,/(?: {4}| {0,3}\t)/).replace(/fences/g,/ {0,3}(?:`{3,}|~{3,})/).replace(/blockquote/g,/ {0,3}>/).replace(/heading/g,/ {0,3}#{1,6}/).replace(/html/g,/ {0,3}<[^\n>]+>\n/).replace(/table/g,/ {0,3}\|?(?:[:\- ]*\|)+[\:\- ]*\n/).getRegex(),Vh=/^([^\n]+(?:\n(?!hr|heading|lheading|blockquote|fences|list|html|table| +\n)[^\n]+)*)/,Jb=/^[^\n]+/,Oh=/(?!\s*\])(?:\\.|[^\[\]\\])+/,Xb=yr(/^ {0,3}\[(label)\]: *(?:\n[ \t]*)?([^<\s][^\s]*|<.*?>)(?:(?: +(?:\n[ \t]*)?| *\n[ \t]*)(title))? *(?:\n+|$)/).replace("label",Oh).replace("title",/(?:"(?:\\"?|[^"\\])*"|'[^'\n]*(?:\n[^'\n]+)*\n?'|\([^()]*\))/).getRegex(),Qb=yr(/^( {0,3}bull)([ \t][^\n]+?)?(?:\n|$)/).replace(/bull/g,Bh).getRegex(),Rc="address|article|aside|base|basefont|blockquote|body|caption|center|col|colgroup|dd|details|dialog|dir|div|dl|dt|fieldset|figcaption|figure|footer|form|frame|frameset|h[1-6]|head|header|hr|html|iframe|legend|li|link|main|menu|menuitem|meta|nav|noframes|ol|optgroup|option|p|param|search|section|summary|table|tbody|td|tfoot|th|thead|title|tr|track|ul",Fh=/<!--(?:-?>|[\s\S]*?(?:-->|$))/,Yb=yr("^ {0,3}(?:<(script|pre|style|textarea)[\\s>][\\s\\S]*?(?:</\\1>[^\\n]*\\n+|$)|comment[^\\n]*(\\n+|$)|<\\?[\\s\\S]*?(?:\\?>\\n*|$)|<![A-Z][\\s\\S]*?(?:>\\n*|$)|<!\\[CDATA\\[[\\s\\S]*?(?:\\]\\]>\\n*|$)|</?(tag)(?: +|\\n|/?>)[\\s\\S]*?(?:(?:\\n[ ]*)+\\n|$)|<(?!script|pre|style|textarea)([a-z][\\w-]*)(?:attribute)*? */?>(?=[ \\t]*(?:\\n|$))[\\s\\S]*?(?:(?:\\n[ ]*)+\\n|$)|</(?!script|pre|style|textarea)[a-z][\\w-]*\\s*>(?=[ \\t]*(?:\\n|$))[\\s\\S]*?(?:(?:\\n[ ]*)+\\n|$))","i").replace("comment",Fh).replace("tag",Rc).replace("attribute",/ +[a-zA-Z:_][\w.:-]*(?: *= *"[^"\n]*"| *= *'[^'\n]*'| *= *[^\s"'=<>`]+)?/).getRegex(),yf=yr(Vh).replace("hr",ul).replace("heading"," {0,3}#{1,6}(?:\\s|$)").replace("|lheading","").replace("|table","").replace("blockquote"," {0,3}>").replace("fences"," {0,3}(?:`{3,}(?=[^`\\n]*\\n)|~{3,})[^\\n]*\\n").replace("list"," {0,3}(?:[*+-]|1[.)]) ").replace("html","</?(?:tag)(?: +|\\n|/?>)|<(?:script|pre|style|textarea|!--)").replace("tag",Rc).getRegex(),$b=yr(/^( {0,3}> ?(paragraph|[^\n]*)(?:\n|$))+/).replace("paragraph",yf).getRegex(),Nh={blockquote:$b,code:Wb,def:Xb,fences:Zb,heading:Kb,hr:ul,html:Yb,lheading:gf,list:Qb,newline:Hb,paragraph:yf,table:cl,text:Jb},_f=yr("^ *([^\\n ].*)\\n {0,3}((?:\\| *)?:?-+:? *(?:\\| *:?-+:? *)*(?:\\| *)?)(?:\\n((?:(?! *\\n|hr|heading|blockquote|code|fences|list|html).*(?:\\n|$))*)\\n*|$)").replace("hr",ul).replace("heading"," {0,3}#{1,6}(?:\\s|$)").replace("blockquote"," {0,3}>").replace("code","(?: {4}| {0,3} )[^\\n]").replace("fences"," {0,3}(?:`{3,}(?=[^`\\n]*\\n)|~{3,})[^\\n]*\\n").replace("list"," {0,3}(?:[*+-]|1[.)]) ").replace("html","</?(?:tag)(?: +|\\n|/?>)|<(?:script|pre|style|textarea|!--)").replace("tag",Rc).getRegex(),ev={...Nh,lheading:Gb,table:_f,paragraph:yr(Vh).replace("hr",ul).replace("heading"," {0,3}#{1,6}(?:\\s|$)").replace("|lheading","").replace("table",_f).replace("blockquote"," {0,3}>").replace("fences"," {0,3}(?:`{3,}(?=[^`\\n]*\\n)|~{3,})[^\\n]*\\n").replace("list"," {0,3}(?:[*+-]|1[.)]) ").replace("html","</?(?:tag)(?: +|\\n|/?>)|<(?:script|pre|style|textarea|!--)").replace("tag",Rc).getRegex()},tv={...Nh,html:yr(`^ *(?:comment *(?:\\n|\\s*$)|<(tag)[\\s\\S]+?</\\1> *(?:\\n{2,}|\\s*$)|<tag(?:"[^"]*"|'[^']*'|\\s[^'"/>\\s]*)*?/?> *(?:\\n{2,}|\\s*$))`).replace("comment",Fh).replace(/tag/g,"(?!(?:a|em|strong|small|s|cite|q|dfn|abbr|data|time|code|var|samp|kbd|sub|sup|i|b|u|mark|ruby|rt|rp|bdi|bdo|span|br|wbr|ins|del|img)\\b)\\w+(?!:|[^\\w\\s@]*@)\\b").getRegex(),def:/^ *\[([^\]]+)\]: *<?([^\s>]+)>?(?: +(["(][^\n]+[")]))? *(?:\n+|$)/,heading:/^(#{1,6})(.*)(?:\n+|$)/,fences:cl,lheading:/^(.+?)\n {0,3}(=+|-+) *(?:\n+|$)/,paragraph:yr(Vh).replace("hr",ul).replace("heading",` *#{1,6} *[^
|
|
747
|
-
]`).replace("lheading",gf).replace("|table","").replace("blockquote"," {0,3}>").replace("|fences","").replace("|list","").replace("|html","").replace("|tag","").getRegex()},rv=/^\\([!"#$%&'()*+,\-./:;<=>?@\[\]\\^_`{|}~])/,iv=/^(`+)([^`]|[^`][\s\S]*?[^`])\1(?!`)/,xf=/^( {2,}|\\)\n(?!\s*$)/,nv=/^(`+|[^`])(?:(?= {2,}\n)|[\s\S]*?(?:(?=[\\<!\[`*_]|\b_|$)|[^ ](?= {2,}\n)))/,Dc=/[\p{P}\p{S}]/u,qh=/[\s\p{P}\p{S}]/u,bf=/[^\s\p{P}\p{S}]/u,ov=yr(/^((?![*_])punctSpace)/,"u").replace(/punctSpace/g,qh).getRegex(),vf=/(?!~)[\p{P}\p{S}]/u,sv=/(?!~)[\s\p{P}\p{S}]/u,av=/(?:[^\s\p{P}\p{S}]|~)/u,lv=/\[[^[\]]*?\]\((?:\\.|[^\\\(\)]|\((?:\\.|[^\\\(\)])*\))*\)|`[^`]*?`|<[^<>]*?>/g,wf=/^(?:\*+(?:((?!\*)punct)|[^\s*]))|^_+(?:((?!_)punct)|([^\s_]))/,cv=yr(wf,"u").replace(/punct/g,Dc).getRegex(),uv=yr(wf,"u").replace(/punct/g,vf).getRegex(),Sf="^[^_*]*?__[^_*]*?\\*[^_*]*?(?=__)|[^*]+(?=[^*])|(?!\\*)punct(\\*+)(?=[\\s]|$)|notPunctSpace(\\*+)(?!\\*)(?=punctSpace|$)|(?!\\*)punctSpace(\\*+)(?=notPunctSpace)|[\\s](\\*+)(?!\\*)(?=punct)|(?!\\*)punct(\\*+)(?!\\*)(?=punct)|notPunctSpace(\\*+)(?=notPunctSpace)",hv=yr(Sf,"gu").replace(/notPunctSpace/g,bf).replace(/punctSpace/g,qh).replace(/punct/g,Dc).getRegex(),pv=yr(Sf,"gu").replace(/notPunctSpace/g,av).replace(/punctSpace/g,sv).replace(/punct/g,vf).getRegex(),dv=yr("^[^_*]*?\\*\\*[^_*]*?_[^_*]*?(?=\\*\\*)|[^_]+(?=[^_])|(?!_)punct(_+)(?=[\\s]|$)|notPunctSpace(_+)(?!_)(?=punctSpace|$)|(?!_)punctSpace(_+)(?=notPunctSpace)|[\\s](_+)(?!_)(?=punct)|(?!_)punct(_+)(?!_)(?=punct)","gu").replace(/notPunctSpace/g,bf).replace(/punctSpace/g,qh).replace(/punct/g,Dc).getRegex(),fv=yr(/\\(punct)/,"gu").replace(/punct/g,Dc).getRegex(),mv=yr(/^<(scheme:[^\s\x00-\x1f<>]*|email)>/).replace("scheme",/[a-zA-Z][a-zA-Z0-9+.-]{1,31}/).replace("email",/[a-zA-Z0-9.!#$%&'*+/=?^_`{|}~-]+(@)[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?(?:\.[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?)+(?![-_])/).getRegex(),gv=yr(Fh).replace("(?:-->|$)","-->").getRegex(),yv=yr("^comment|^</[a-zA-Z][\\w:-]*\\s*>|^<[a-zA-Z][\\w-]*(?:attribute)*?\\s*/?>|^<\\?[\\s\\S]*?\\?>|^<![a-zA-Z]+\\s[\\s\\S]*?>|^<!\\[CDATA\\[[\\s\\S]*?\\]\\]>").replace("comment",gv).replace("attribute",/\s+[a-zA-Z:_][\w.:-]*(?:\s*=\s*"[^"]*"|\s*=\s*'[^']*'|\s*=\s*[^\s"'=<>`]+)?/).getRegex(),zc=/(?:\[(?:\\.|[^\[\]\\])*\]|\\.|`[^`]*`|[^\[\]\\`])*?/,_v=yr(/^!?\[(label)\]\(\s*(href)(?:(?:[ \t]*(?:\n[ \t]*)?)(title))?\s*\)/).replace("label",zc).replace("href",/<(?:\\.|[^\n<>\\])+>|[^ \t\n\x00-\x1f]*/).replace("title",/"(?:\\"?|[^"\\])*"|'(?:\\'?|[^'\\])*'|\((?:\\\)?|[^)\\])*\)/).getRegex(),Af=yr(/^!?\[(label)\]\[(ref)\]/).replace("label",zc).replace("ref",Oh).getRegex(),kf=yr(/^!?\[(ref)\](?:\[\])?/).replace("ref",Oh).getRegex(),xv=yr("reflink|nolink(?!\\()","g").replace("reflink",Af).replace("nolink",kf).getRegex(),Uh={_backpedal:cl,anyPunctuation:fv,autolink:mv,blockSkip:lv,br:xf,code:iv,del:cl,emStrongLDelim:cv,emStrongRDelimAst:hv,emStrongRDelimUnd:dv,escape:rv,link:_v,nolink:kf,punctuation:ov,reflink:Af,reflinkSearch:xv,tag:yv,text:nv,url:cl},bv={...Uh,link:yr(/^!?\[(label)\]\((.*?)\)/).replace("label",zc).getRegex(),reflink:yr(/^!?\[(label)\]\s*\[([^\]]*)\]/).replace("label",zc).getRegex()},jh={...Uh,emStrongRDelimAst:pv,emStrongLDelim:uv,url:yr(/^((?:ftp|https?):\/\/|www\.)(?:[a-zA-Z0-9\-]+\.?)+[^\s<]*|^email/,"i").replace("email",/[A-Za-z0-9._+-]+(@)[a-zA-Z0-9-_]+(?:\.[a-zA-Z0-9-_]*[a-zA-Z0-9])+(?![-_])/).getRegex(),_backpedal:/(?:[^?!.,:;*_'"~()&]+|\([^)]*\)|&(?![a-zA-Z0-9]+;$)|[?!.,:;*_'"~)]+(?!$))+/,del:/^(~~?)(?=[^\s~])((?:\\.|[^\\])*?(?:\\.|[^\s~\\]))\1(?=[^~]|$)/,text:/^([`~]+|[^`~])(?:(?= {2,}\n)|(?=[a-zA-Z0-9.!#$%&'*+\/=?_`{\|}~-]+@)|[\s\S]*?(?:(?=[\\<!\[`*~_]|\b_|https?:\/\/|ftp:\/\/|www\.|$)|[^ ](?= {2,}\n)|[^a-zA-Z0-9.!#$%&'*+\/=?_`{\|}~-](?=[a-zA-Z0-9.!#$%&'*+\/=?_`{\|}~-]+@)))/},vv={...jh,br:yr(xf).replace("{2,}","*").getRegex(),text:yr(jh.text).replace("\\b_","\\b_| {2,}\\n").replace(/\{2,\}/g,"*").getRegex()},Bc={normal:Nh,gfm:ev,pedantic:tv},hl={normal:Uh,gfm:jh,breaks:vv,pedantic:bv},wv={"&":"&","<":"<",">":">",'"':""","'":"'"},Tf=p=>wv[p];function Gn(p,f){if(f){if(Bi.escapeTest.test(p))return p.replace(Bi.escapeReplace,Tf)}else if(Bi.escapeTestNoEncode.test(p))return p.replace(Bi.escapeReplaceNoEncode,Tf);return p}function Cf(p){try{p=encodeURI(p).replace(Bi.percentDecode,"%")}catch{return null}return p}function Ef(p,f){var P;const _=p.replace(Bi.findPipe,(x,o,B)=>{let D=!1,L=o;for(;--L>=0&&B[L]==="\\";)D=!D;return D?"|":" |"}),v=_.split(Bi.splitPipe);let k=0;if(v[0].trim()||v.shift(),v.length>0&&!((P=v.at(-1))!=null&&P.trim())&&v.pop(),f)if(v.length>f)v.splice(f);else for(;v.length<f;)v.push("");for(;k<v.length;k++)v[k]=v[k].trim().replace(Bi.slashPipe,"|");return v}function pl(p,f,_){const v=p.length;if(v===0)return"";let k=0;for(;k<v&&p.charAt(v-k-1)===f;)k++;return p.slice(0,v-k)}function Sv(p,f){if(p.indexOf(f[1])===-1)return-1;let _=0;for(let v=0;v<p.length;v++)if(p[v]==="\\")v++;else if(p[v]===f[0])_++;else if(p[v]===f[1]&&(_--,_<0))return v;return _>0?-2:-1}function Pf(p,f,_,v,k){const P=f.href,x=f.title||null,o=p[1].replace(k.other.outputLinkReplace,"$1");v.state.inLink=!0;const B={type:p[0].charAt(0)==="!"?"image":"link",raw:_,href:P,title:x,text:o,tokens:v.inlineTokens(o)};return v.state.inLink=!1,B}function Av(p,f,_){const v=p.match(_.other.indentCodeCompensation);if(v===null)return f;const k=v[1];return f.split(`
|
|
748
|
-
`).map(P=>{const x=P.match(_.other.beginningSpace);if(x===null)return P;const[o]=x;return o.length>=k.length?P.slice(k.length):P}).join(`
|
|
749
|
-
`)}var Vc=class{constructor(p){Lr(this,"options");Lr(this,"rules");Lr(this,"lexer");this.options=p||os}space(p){const f=this.rules.block.newline.exec(p);if(f&&f[0].length>0)return{type:"space",raw:f[0]}}code(p){const f=this.rules.block.code.exec(p);if(f){const _=f[0].replace(this.rules.other.codeRemoveIndent,"");return{type:"code",raw:f[0],codeBlockStyle:"indented",text:this.options.pedantic?_:pl(_,`
|
|
750
|
-
`)}}}fences(p){const f=this.rules.block.fences.exec(p);if(f){const _=f[0],v=Av(_,f[3]||"",this.rules);return{type:"code",raw:_,lang:f[2]?f[2].trim().replace(this.rules.inline.anyPunctuation,"$1"):f[2],text:v}}}heading(p){const f=this.rules.block.heading.exec(p);if(f){let _=f[2].trim();if(this.rules.other.endingHash.test(_)){const v=pl(_,"#");(this.options.pedantic||!v||this.rules.other.endingSpaceChar.test(v))&&(_=v.trim())}return{type:"heading",raw:f[0],depth:f[1].length,text:_,tokens:this.lexer.inline(_)}}}hr(p){const f=this.rules.block.hr.exec(p);if(f)return{type:"hr",raw:pl(f[0],`
|
|
751
|
-
`)}}blockquote(p){const f=this.rules.block.blockquote.exec(p);if(f){let _=pl(f[0],`
|
|
752
|
-
`).split(`
|
|
753
|
-
`),v="",k="";const P=[];for(;_.length>0;){let x=!1;const o=[];let B;for(B=0;B<_.length;B++)if(this.rules.other.blockquoteStart.test(_[B]))o.push(_[B]),x=!0;else if(!x)o.push(_[B]);else break;_=_.slice(B);const D=o.join(`
|
|
754
|
-
`),L=D.replace(this.rules.other.blockquoteSetextReplace,`
|
|
755
|
-
$1`).replace(this.rules.other.blockquoteSetextReplace2,"");v=v?`${v}
|
|
756
|
-
${D}`:D,k=k?`${k}
|
|
757
|
-
${L}`:L;const H=this.lexer.state.top;if(this.lexer.state.top=!0,this.lexer.blockTokens(L,P,!0),this.lexer.state.top=H,_.length===0)break;const M=P.at(-1);if((M==null?void 0:M.type)==="code")break;if((M==null?void 0:M.type)==="blockquote"){const C=M,T=C.raw+`
|
|
758
|
-
`+_.join(`
|
|
759
|
-
`),N=this.blockquote(T);P[P.length-1]=N,v=v.substring(0,v.length-C.raw.length)+N.raw,k=k.substring(0,k.length-C.text.length)+N.text;break}else if((M==null?void 0:M.type)==="list"){const C=M,T=C.raw+`
|
|
760
|
-
`+_.join(`
|
|
761
|
-
`),N=this.list(T);P[P.length-1]=N,v=v.substring(0,v.length-M.raw.length)+N.raw,k=k.substring(0,k.length-C.raw.length)+N.raw,_=T.substring(P.at(-1).raw.length).split(`
|
|
762
|
-
`);continue}}return{type:"blockquote",raw:v,tokens:P,text:k}}}list(p){let f=this.rules.block.list.exec(p);if(f){let _=f[1].trim();const v=_.length>1,k={type:"list",raw:"",ordered:v,start:v?+_.slice(0,-1):"",loose:!1,items:[]};_=v?`\\d{1,9}\\${_.slice(-1)}`:`\\${_}`,this.options.pedantic&&(_=v?_:"[*+-]");const P=this.rules.other.listItemRegex(_);let x=!1;for(;p;){let B=!1,D="",L="";if(!(f=P.exec(p))||this.rules.block.hr.test(p))break;D=f[0],p=p.substring(D.length);let H=f[2].split(`
|
|
763
|
-
`,1)[0].replace(this.rules.other.listReplaceTabs,ie=>" ".repeat(3*ie.length)),M=p.split(`
|
|
764
|
-
`,1)[0],C=!H.trim(),T=0;if(this.options.pedantic?(T=2,L=H.trimStart()):C?T=f[1].length+1:(T=f[2].search(this.rules.other.nonSpaceChar),T=T>4?1:T,L=H.slice(T),T+=f[1].length),C&&this.rules.other.blankLine.test(M)&&(D+=M+`
|
|
765
|
-
`,p=p.substring(M.length+1),B=!0),!B){const ie=this.rules.other.nextBulletRegex(T),le=this.rules.other.hrRegex(T),Ee=this.rules.other.fencesBeginRegex(T),te=this.rules.other.headingBeginRegex(T),me=this.rules.other.htmlBeginRegex(T);for(;p;){const De=p.split(`
|
|
766
|
-
`,1)[0];let qe;if(M=De,this.options.pedantic?(M=M.replace(this.rules.other.listReplaceNesting," "),qe=M):qe=M.replace(this.rules.other.tabCharGlobal," "),Ee.test(M)||te.test(M)||me.test(M)||ie.test(M)||le.test(M))break;if(qe.search(this.rules.other.nonSpaceChar)>=T||!M.trim())L+=`
|
|
767
|
-
`+qe.slice(T);else{if(C||H.replace(this.rules.other.tabCharGlobal," ").search(this.rules.other.nonSpaceChar)>=4||Ee.test(H)||te.test(H)||le.test(H))break;L+=`
|
|
768
|
-
`+M}!C&&!M.trim()&&(C=!0),D+=De+`
|
|
769
|
-
`,p=p.substring(De.length+1),H=qe.slice(T)}}k.loose||(x?k.loose=!0:this.rules.other.doubleBlankLine.test(D)&&(x=!0));let N=null,G;this.options.gfm&&(N=this.rules.other.listIsTask.exec(L),N&&(G=N[0]!=="[ ] ",L=L.replace(this.rules.other.listReplaceTask,""))),k.items.push({type:"list_item",raw:D,task:!!N,checked:G,loose:!1,text:L,tokens:[]}),k.raw+=D}const o=k.items.at(-1);if(o)o.raw=o.raw.trimEnd(),o.text=o.text.trimEnd();else return;k.raw=k.raw.trimEnd();for(let B=0;B<k.items.length;B++)if(this.lexer.state.top=!1,k.items[B].tokens=this.lexer.blockTokens(k.items[B].text,[]),!k.loose){const D=k.items[B].tokens.filter(H=>H.type==="space"),L=D.length>0&&D.some(H=>this.rules.other.anyLine.test(H.raw));k.loose=L}if(k.loose)for(let B=0;B<k.items.length;B++)k.items[B].loose=!0;return k}}html(p){const f=this.rules.block.html.exec(p);if(f)return{type:"html",block:!0,raw:f[0],pre:f[1]==="pre"||f[1]==="script"||f[1]==="style",text:f[0]}}def(p){const f=this.rules.block.def.exec(p);if(f){const _=f[1].toLowerCase().replace(this.rules.other.multipleSpaceGlobal," "),v=f[2]?f[2].replace(this.rules.other.hrefBrackets,"$1").replace(this.rules.inline.anyPunctuation,"$1"):"",k=f[3]?f[3].substring(1,f[3].length-1).replace(this.rules.inline.anyPunctuation,"$1"):f[3];return{type:"def",tag:_,raw:f[0],href:v,title:k}}}table(p){var x;const f=this.rules.block.table.exec(p);if(!f||!this.rules.other.tableDelimiter.test(f[2]))return;const _=Ef(f[1]),v=f[2].replace(this.rules.other.tableAlignChars,"").split("|"),k=(x=f[3])!=null&&x.trim()?f[3].replace(this.rules.other.tableRowBlankLine,"").split(`
|
|
770
|
-
`):[],P={type:"table",raw:f[0],header:[],align:[],rows:[]};if(_.length===v.length){for(const o of v)this.rules.other.tableAlignRight.test(o)?P.align.push("right"):this.rules.other.tableAlignCenter.test(o)?P.align.push("center"):this.rules.other.tableAlignLeft.test(o)?P.align.push("left"):P.align.push(null);for(let o=0;o<_.length;o++)P.header.push({text:_[o],tokens:this.lexer.inline(_[o]),header:!0,align:P.align[o]});for(const o of k)P.rows.push(Ef(o,P.header.length).map((B,D)=>({text:B,tokens:this.lexer.inline(B),header:!1,align:P.align[D]})));return P}}lheading(p){const f=this.rules.block.lheading.exec(p);if(f)return{type:"heading",raw:f[0],depth:f[2].charAt(0)==="="?1:2,text:f[1],tokens:this.lexer.inline(f[1])}}paragraph(p){const f=this.rules.block.paragraph.exec(p);if(f){const _=f[1].charAt(f[1].length-1)===`
|
|
771
|
-
`?f[1].slice(0,-1):f[1];return{type:"paragraph",raw:f[0],text:_,tokens:this.lexer.inline(_)}}}text(p){const f=this.rules.block.text.exec(p);if(f)return{type:"text",raw:f[0],text:f[0],tokens:this.lexer.inline(f[0])}}escape(p){const f=this.rules.inline.escape.exec(p);if(f)return{type:"escape",raw:f[0],text:f[1]}}tag(p){const f=this.rules.inline.tag.exec(p);if(f)return!this.lexer.state.inLink&&this.rules.other.startATag.test(f[0])?this.lexer.state.inLink=!0:this.lexer.state.inLink&&this.rules.other.endATag.test(f[0])&&(this.lexer.state.inLink=!1),!this.lexer.state.inRawBlock&&this.rules.other.startPreScriptTag.test(f[0])?this.lexer.state.inRawBlock=!0:this.lexer.state.inRawBlock&&this.rules.other.endPreScriptTag.test(f[0])&&(this.lexer.state.inRawBlock=!1),{type:"html",raw:f[0],inLink:this.lexer.state.inLink,inRawBlock:this.lexer.state.inRawBlock,block:!1,text:f[0]}}link(p){const f=this.rules.inline.link.exec(p);if(f){const _=f[2].trim();if(!this.options.pedantic&&this.rules.other.startAngleBracket.test(_)){if(!this.rules.other.endAngleBracket.test(_))return;const P=pl(_.slice(0,-1),"\\");if((_.length-P.length)%2===0)return}else{const P=Sv(f[2],"()");if(P===-2)return;if(P>-1){const o=(f[0].indexOf("!")===0?5:4)+f[1].length+P;f[2]=f[2].substring(0,P),f[0]=f[0].substring(0,o).trim(),f[3]=""}}let v=f[2],k="";if(this.options.pedantic){const P=this.rules.other.pedanticHrefTitle.exec(v);P&&(v=P[1],k=P[3])}else k=f[3]?f[3].slice(1,-1):"";return v=v.trim(),this.rules.other.startAngleBracket.test(v)&&(this.options.pedantic&&!this.rules.other.endAngleBracket.test(_)?v=v.slice(1):v=v.slice(1,-1)),Pf(f,{href:v&&v.replace(this.rules.inline.anyPunctuation,"$1"),title:k&&k.replace(this.rules.inline.anyPunctuation,"$1")},f[0],this.lexer,this.rules)}}reflink(p,f){let _;if((_=this.rules.inline.reflink.exec(p))||(_=this.rules.inline.nolink.exec(p))){const v=(_[2]||_[1]).replace(this.rules.other.multipleSpaceGlobal," "),k=f[v.toLowerCase()];if(!k){const P=_[0].charAt(0);return{type:"text",raw:P,text:P}}return Pf(_,k,_[0],this.lexer,this.rules)}}emStrong(p,f,_=""){let v=this.rules.inline.emStrongLDelim.exec(p);if(!v||v[3]&&_.match(this.rules.other.unicodeAlphaNumeric))return;if(!(v[1]||v[2]||"")||!_||this.rules.inline.punctuation.exec(_)){const P=[...v[0]].length-1;let x,o,B=P,D=0;const L=v[0][0]==="*"?this.rules.inline.emStrongRDelimAst:this.rules.inline.emStrongRDelimUnd;for(L.lastIndex=0,f=f.slice(-1*p.length+P);(v=L.exec(f))!=null;){if(x=v[1]||v[2]||v[3]||v[4]||v[5]||v[6],!x)continue;if(o=[...x].length,v[3]||v[4]){B+=o;continue}else if((v[5]||v[6])&&P%3&&!((P+o)%3)){D+=o;continue}if(B-=o,B>0)continue;o=Math.min(o,o+B+D);const H=[...v[0]][0].length,M=p.slice(0,P+v.index+H+o);if(Math.min(P,o)%2){const T=M.slice(1,-1);return{type:"em",raw:M,text:T,tokens:this.lexer.inlineTokens(T)}}const C=M.slice(2,-2);return{type:"strong",raw:M,text:C,tokens:this.lexer.inlineTokens(C)}}}}codespan(p){const f=this.rules.inline.code.exec(p);if(f){let _=f[2].replace(this.rules.other.newLineCharGlobal," ");const v=this.rules.other.nonSpaceChar.test(_),k=this.rules.other.startingSpaceChar.test(_)&&this.rules.other.endingSpaceChar.test(_);return v&&k&&(_=_.substring(1,_.length-1)),{type:"codespan",raw:f[0],text:_}}}br(p){const f=this.rules.inline.br.exec(p);if(f)return{type:"br",raw:f[0]}}del(p){const f=this.rules.inline.del.exec(p);if(f)return{type:"del",raw:f[0],text:f[2],tokens:this.lexer.inlineTokens(f[2])}}autolink(p){const f=this.rules.inline.autolink.exec(p);if(f){let _,v;return f[2]==="@"?(_=f[1],v="mailto:"+_):(_=f[1],v=_),{type:"link",raw:f[0],text:_,href:v,tokens:[{type:"text",raw:_,text:_}]}}}url(p){var _;let f;if(f=this.rules.inline.url.exec(p)){let v,k;if(f[2]==="@")v=f[0],k="mailto:"+v;else{let P;do P=f[0],f[0]=((_=this.rules.inline._backpedal.exec(f[0]))==null?void 0:_[0])??"";while(P!==f[0]);v=f[0],f[1]==="www."?k="http://"+f[0]:k=f[0]}return{type:"link",raw:f[0],text:v,href:k,tokens:[{type:"text",raw:v,text:v}]}}}inlineText(p){const f=this.rules.inline.text.exec(p);if(f){const _=this.lexer.state.inRawBlock;return{type:"text",raw:f[0],text:f[0],escaped:_}}}},ho=class yd{constructor(f){Lr(this,"tokens");Lr(this,"options");Lr(this,"state");Lr(this,"tokenizer");Lr(this,"inlineQueue");this.tokens=[],this.tokens.links=Object.create(null),this.options=f||os,this.options.tokenizer=this.options.tokenizer||new Vc,this.tokenizer=this.options.tokenizer,this.tokenizer.options=this.options,this.tokenizer.lexer=this,this.inlineQueue=[],this.state={inLink:!1,inRawBlock:!1,top:!0};const _={other:Bi,block:Bc.normal,inline:hl.normal};this.options.pedantic?(_.block=Bc.pedantic,_.inline=hl.pedantic):this.options.gfm&&(_.block=Bc.gfm,this.options.breaks?_.inline=hl.breaks:_.inline=hl.gfm),this.tokenizer.rules=_}static get rules(){return{block:Bc,inline:hl}}static lex(f,_){return new yd(_).lex(f)}static lexInline(f,_){return new yd(_).inlineTokens(f)}lex(f){f=f.replace(Bi.carriageReturn,`
|
|
772
|
-
`),this.blockTokens(f,this.tokens);for(let _=0;_<this.inlineQueue.length;_++){const v=this.inlineQueue[_];this.inlineTokens(v.src,v.tokens)}return this.inlineQueue=[],this.tokens}blockTokens(f,_=[],v=!1){var k,P,x;for(this.options.pedantic&&(f=f.replace(Bi.tabCharGlobal," ").replace(Bi.spaceLine,""));f;){let o;if((P=(k=this.options.extensions)==null?void 0:k.block)!=null&&P.some(D=>(o=D.call({lexer:this},f,_))?(f=f.substring(o.raw.length),_.push(o),!0):!1))continue;if(o=this.tokenizer.space(f)){f=f.substring(o.raw.length);const D=_.at(-1);o.raw.length===1&&D!==void 0?D.raw+=`
|
|
773
|
-
`:_.push(o);continue}if(o=this.tokenizer.code(f)){f=f.substring(o.raw.length);const D=_.at(-1);(D==null?void 0:D.type)==="paragraph"||(D==null?void 0:D.type)==="text"?(D.raw+=`
|
|
774
|
-
`+o.raw,D.text+=`
|
|
775
|
-
`+o.text,this.inlineQueue.at(-1).src=D.text):_.push(o);continue}if(o=this.tokenizer.fences(f)){f=f.substring(o.raw.length),_.push(o);continue}if(o=this.tokenizer.heading(f)){f=f.substring(o.raw.length),_.push(o);continue}if(o=this.tokenizer.hr(f)){f=f.substring(o.raw.length),_.push(o);continue}if(o=this.tokenizer.blockquote(f)){f=f.substring(o.raw.length),_.push(o);continue}if(o=this.tokenizer.list(f)){f=f.substring(o.raw.length),_.push(o);continue}if(o=this.tokenizer.html(f)){f=f.substring(o.raw.length),_.push(o);continue}if(o=this.tokenizer.def(f)){f=f.substring(o.raw.length);const D=_.at(-1);(D==null?void 0:D.type)==="paragraph"||(D==null?void 0:D.type)==="text"?(D.raw+=`
|
|
776
|
-
`+o.raw,D.text+=`
|
|
777
|
-
`+o.raw,this.inlineQueue.at(-1).src=D.text):this.tokens.links[o.tag]||(this.tokens.links[o.tag]={href:o.href,title:o.title});continue}if(o=this.tokenizer.table(f)){f=f.substring(o.raw.length),_.push(o);continue}if(o=this.tokenizer.lheading(f)){f=f.substring(o.raw.length),_.push(o);continue}let B=f;if((x=this.options.extensions)!=null&&x.startBlock){let D=1/0;const L=f.slice(1);let H;this.options.extensions.startBlock.forEach(M=>{H=M.call({lexer:this},L),typeof H=="number"&&H>=0&&(D=Math.min(D,H))}),D<1/0&&D>=0&&(B=f.substring(0,D+1))}if(this.state.top&&(o=this.tokenizer.paragraph(B))){const D=_.at(-1);v&&(D==null?void 0:D.type)==="paragraph"?(D.raw+=`
|
|
778
|
-
`+o.raw,D.text+=`
|
|
779
|
-
`+o.text,this.inlineQueue.pop(),this.inlineQueue.at(-1).src=D.text):_.push(o),v=B.length!==f.length,f=f.substring(o.raw.length);continue}if(o=this.tokenizer.text(f)){f=f.substring(o.raw.length);const D=_.at(-1);(D==null?void 0:D.type)==="text"?(D.raw+=`
|
|
780
|
-
`+o.raw,D.text+=`
|
|
781
|
-
`+o.text,this.inlineQueue.pop(),this.inlineQueue.at(-1).src=D.text):_.push(o);continue}if(f){const D="Infinite loop on byte: "+f.charCodeAt(0);if(this.options.silent){console.error(D);break}else throw new Error(D)}}return this.state.top=!0,_}inline(f,_=[]){return this.inlineQueue.push({src:f,tokens:_}),_}inlineTokens(f,_=[]){var o,B,D;let v=f,k=null;if(this.tokens.links){const L=Object.keys(this.tokens.links);if(L.length>0)for(;(k=this.tokenizer.rules.inline.reflinkSearch.exec(v))!=null;)L.includes(k[0].slice(k[0].lastIndexOf("[")+1,-1))&&(v=v.slice(0,k.index)+"["+"a".repeat(k[0].length-2)+"]"+v.slice(this.tokenizer.rules.inline.reflinkSearch.lastIndex))}for(;(k=this.tokenizer.rules.inline.anyPunctuation.exec(v))!=null;)v=v.slice(0,k.index)+"++"+v.slice(this.tokenizer.rules.inline.anyPunctuation.lastIndex);for(;(k=this.tokenizer.rules.inline.blockSkip.exec(v))!=null;)v=v.slice(0,k.index)+"["+"a".repeat(k[0].length-2)+"]"+v.slice(this.tokenizer.rules.inline.blockSkip.lastIndex);let P=!1,x="";for(;f;){P||(x=""),P=!1;let L;if((B=(o=this.options.extensions)==null?void 0:o.inline)!=null&&B.some(M=>(L=M.call({lexer:this},f,_))?(f=f.substring(L.raw.length),_.push(L),!0):!1))continue;if(L=this.tokenizer.escape(f)){f=f.substring(L.raw.length),_.push(L);continue}if(L=this.tokenizer.tag(f)){f=f.substring(L.raw.length),_.push(L);continue}if(L=this.tokenizer.link(f)){f=f.substring(L.raw.length),_.push(L);continue}if(L=this.tokenizer.reflink(f,this.tokens.links)){f=f.substring(L.raw.length);const M=_.at(-1);L.type==="text"&&(M==null?void 0:M.type)==="text"?(M.raw+=L.raw,M.text+=L.text):_.push(L);continue}if(L=this.tokenizer.emStrong(f,v,x)){f=f.substring(L.raw.length),_.push(L);continue}if(L=this.tokenizer.codespan(f)){f=f.substring(L.raw.length),_.push(L);continue}if(L=this.tokenizer.br(f)){f=f.substring(L.raw.length),_.push(L);continue}if(L=this.tokenizer.del(f)){f=f.substring(L.raw.length),_.push(L);continue}if(L=this.tokenizer.autolink(f)){f=f.substring(L.raw.length),_.push(L);continue}if(!this.state.inLink&&(L=this.tokenizer.url(f))){f=f.substring(L.raw.length),_.push(L);continue}let H=f;if((D=this.options.extensions)!=null&&D.startInline){let M=1/0;const C=f.slice(1);let T;this.options.extensions.startInline.forEach(N=>{T=N.call({lexer:this},C),typeof T=="number"&&T>=0&&(M=Math.min(M,T))}),M<1/0&&M>=0&&(H=f.substring(0,M+1))}if(L=this.tokenizer.inlineText(H)){f=f.substring(L.raw.length),L.raw.slice(-1)!=="_"&&(x=L.raw.slice(-1)),P=!0;const M=_.at(-1);(M==null?void 0:M.type)==="text"?(M.raw+=L.raw,M.text+=L.text):_.push(L);continue}if(f){const M="Infinite loop on byte: "+f.charCodeAt(0);if(this.options.silent){console.error(M);break}else throw new Error(M)}}return _}},Oc=class{constructor(p){Lr(this,"options");Lr(this,"parser");this.options=p||os}space(p){return""}code({text:p,lang:f,escaped:_}){var P;const v=(P=(f||"").match(Bi.notSpaceStart))==null?void 0:P[0],k=p.replace(Bi.endingNewline,"")+`
|
|
782
|
-
`;return v?'<pre><code class="language-'+Gn(v)+'">'+(_?k:Gn(k,!0))+`</code></pre>
|
|
783
|
-
`:"<pre><code>"+(_?k:Gn(k,!0))+`</code></pre>
|
|
784
|
-
`}blockquote({tokens:p}){return`<blockquote>
|
|
785
|
-
${this.parser.parse(p)}</blockquote>
|
|
786
|
-
`}html({text:p}){return p}heading({tokens:p,depth:f}){return`<h${f}>${this.parser.parseInline(p)}</h${f}>
|
|
787
|
-
`}hr(p){return`<hr>
|
|
788
|
-
`}list(p){const f=p.ordered,_=p.start;let v="";for(let x=0;x<p.items.length;x++){const o=p.items[x];v+=this.listitem(o)}const k=f?"ol":"ul",P=f&&_!==1?' start="'+_+'"':"";return"<"+k+P+`>
|
|
789
|
-
`+v+"</"+k+`>
|
|
790
|
-
`}listitem(p){var _;let f="";if(p.task){const v=this.checkbox({checked:!!p.checked});p.loose?((_=p.tokens[0])==null?void 0:_.type)==="paragraph"?(p.tokens[0].text=v+" "+p.tokens[0].text,p.tokens[0].tokens&&p.tokens[0].tokens.length>0&&p.tokens[0].tokens[0].type==="text"&&(p.tokens[0].tokens[0].text=v+" "+Gn(p.tokens[0].tokens[0].text),p.tokens[0].tokens[0].escaped=!0)):p.tokens.unshift({type:"text",raw:v+" ",text:v+" ",escaped:!0}):f+=v+" "}return f+=this.parser.parse(p.tokens,!!p.loose),`<li>${f}</li>
|
|
791
|
-
`}checkbox({checked:p}){return"<input "+(p?'checked="" ':"")+'disabled="" type="checkbox">'}paragraph({tokens:p}){return`<p>${this.parser.parseInline(p)}</p>
|
|
792
|
-
`}table(p){let f="",_="";for(let k=0;k<p.header.length;k++)_+=this.tablecell(p.header[k]);f+=this.tablerow({text:_});let v="";for(let k=0;k<p.rows.length;k++){const P=p.rows[k];_="";for(let x=0;x<P.length;x++)_+=this.tablecell(P[x]);v+=this.tablerow({text:_})}return v&&(v=`<tbody>${v}</tbody>`),`<table>
|
|
793
|
-
<thead>
|
|
794
|
-
`+f+`</thead>
|
|
795
|
-
`+v+`</table>
|
|
796
|
-
`}tablerow({text:p}){return`<tr>
|
|
797
|
-
${p}</tr>
|
|
798
|
-
`}tablecell(p){const f=this.parser.parseInline(p.tokens),_=p.header?"th":"td";return(p.align?`<${_} align="${p.align}">`:`<${_}>`)+f+`</${_}>
|
|
799
|
-
`}strong({tokens:p}){return`<strong>${this.parser.parseInline(p)}</strong>`}em({tokens:p}){return`<em>${this.parser.parseInline(p)}</em>`}codespan({text:p}){return`<code>${Gn(p,!0)}</code>`}br(p){return"<br>"}del({tokens:p}){return`<del>${this.parser.parseInline(p)}</del>`}link({href:p,title:f,tokens:_}){const v=this.parser.parseInline(_),k=Cf(p);if(k===null)return v;p=k;let P='<a href="'+p+'"';return f&&(P+=' title="'+Gn(f)+'"'),P+=">"+v+"</a>",P}image({href:p,title:f,text:_,tokens:v}){v&&(_=this.parser.parseInline(v,this.parser.textRenderer));const k=Cf(p);if(k===null)return Gn(_);p=k;let P=`<img src="${p}" alt="${_}"`;return f&&(P+=` title="${Gn(f)}"`),P+=">",P}text(p){return"tokens"in p&&p.tokens?this.parser.parseInline(p.tokens):"escaped"in p&&p.escaped?p.text:Gn(p.text)}},Hh=class{strong({text:p}){return p}em({text:p}){return p}codespan({text:p}){return p}del({text:p}){return p}html({text:p}){return p}text({text:p}){return p}link({text:p}){return""+p}image({text:p}){return""+p}br(){return""}},po=class _d{constructor(f){Lr(this,"options");Lr(this,"renderer");Lr(this,"textRenderer");this.options=f||os,this.options.renderer=this.options.renderer||new Oc,this.renderer=this.options.renderer,this.renderer.options=this.options,this.renderer.parser=this,this.textRenderer=new Hh}static parse(f,_){return new _d(_).parse(f)}static parseInline(f,_){return new _d(_).parseInline(f)}parse(f,_=!0){var k,P;let v="";for(let x=0;x<f.length;x++){const o=f[x];if((P=(k=this.options.extensions)==null?void 0:k.renderers)!=null&&P[o.type]){const D=o,L=this.options.extensions.renderers[D.type].call({parser:this},D);if(L!==!1||!["space","hr","heading","code","table","blockquote","list","html","paragraph","text"].includes(D.type)){v+=L||"";continue}}const B=o;switch(B.type){case"space":{v+=this.renderer.space(B);continue}case"hr":{v+=this.renderer.hr(B);continue}case"heading":{v+=this.renderer.heading(B);continue}case"code":{v+=this.renderer.code(B);continue}case"table":{v+=this.renderer.table(B);continue}case"blockquote":{v+=this.renderer.blockquote(B);continue}case"list":{v+=this.renderer.list(B);continue}case"html":{v+=this.renderer.html(B);continue}case"paragraph":{v+=this.renderer.paragraph(B);continue}case"text":{let D=B,L=this.renderer.text(D);for(;x+1<f.length&&f[x+1].type==="text";)D=f[++x],L+=`
|
|
800
|
-
`+this.renderer.text(D);_?v+=this.renderer.paragraph({type:"paragraph",raw:L,text:L,tokens:[{type:"text",raw:L,text:L,escaped:!0}]}):v+=L;continue}default:{const D='Token with "'+B.type+'" type was not found.';if(this.options.silent)return console.error(D),"";throw new Error(D)}}}return v}parseInline(f,_=this.renderer){var k,P;let v="";for(let x=0;x<f.length;x++){const o=f[x];if((P=(k=this.options.extensions)==null?void 0:k.renderers)!=null&&P[o.type]){const D=this.options.extensions.renderers[o.type].call({parser:this},o);if(D!==!1||!["escape","html","link","image","strong","em","codespan","br","del","text"].includes(o.type)){v+=D||"";continue}}const B=o;switch(B.type){case"escape":{v+=_.text(B);break}case"html":{v+=_.html(B);break}case"link":{v+=_.link(B);break}case"image":{v+=_.image(B);break}case"strong":{v+=_.strong(B);break}case"em":{v+=_.em(B);break}case"codespan":{v+=_.codespan(B);break}case"br":{v+=_.br(B);break}case"del":{v+=_.del(B);break}case"text":{v+=_.text(B);break}default:{const D='Token with "'+B.type+'" type was not found.';if(this.options.silent)return console.error(D),"";throw new Error(D)}}}return v}},Fc=(rp=class{constructor(p){Lr(this,"options");Lr(this,"block");this.options=p||os}preprocess(p){return p}postprocess(p){return p}processAllTokens(p){return p}provideLexer(){return this.block?ho.lex:ho.lexInline}provideParser(){return this.block?po.parse:po.parseInline}},Lr(rp,"passThroughHooks",new Set(["preprocess","postprocess","processAllTokens"])),rp),kv=class{constructor(...p){Lr(this,"defaults",zh());Lr(this,"options",this.setOptions);Lr(this,"parse",this.parseMarkdown(!0));Lr(this,"parseInline",this.parseMarkdown(!1));Lr(this,"Parser",po);Lr(this,"Renderer",Oc);Lr(this,"TextRenderer",Hh);Lr(this,"Lexer",ho);Lr(this,"Tokenizer",Vc);Lr(this,"Hooks",Fc);this.use(...p)}walkTokens(p,f){var v,k;let _=[];for(const P of p)switch(_=_.concat(f.call(this,P)),P.type){case"table":{const x=P;for(const o of x.header)_=_.concat(this.walkTokens(o.tokens,f));for(const o of x.rows)for(const B of o)_=_.concat(this.walkTokens(B.tokens,f));break}case"list":{const x=P;_=_.concat(this.walkTokens(x.items,f));break}default:{const x=P;(k=(v=this.defaults.extensions)==null?void 0:v.childTokens)!=null&&k[x.type]?this.defaults.extensions.childTokens[x.type].forEach(o=>{const B=x[o].flat(1/0);_=_.concat(this.walkTokens(B,f))}):x.tokens&&(_=_.concat(this.walkTokens(x.tokens,f)))}}return _}use(...p){const f=this.defaults.extensions||{renderers:{},childTokens:{}};return p.forEach(_=>{const v={..._};if(v.async=this.defaults.async||v.async||!1,_.extensions&&(_.extensions.forEach(k=>{if(!k.name)throw new Error("extension name required");if("renderer"in k){const P=f.renderers[k.name];P?f.renderers[k.name]=function(...x){let o=k.renderer.apply(this,x);return o===!1&&(o=P.apply(this,x)),o}:f.renderers[k.name]=k.renderer}if("tokenizer"in k){if(!k.level||k.level!=="block"&&k.level!=="inline")throw new Error("extension level must be 'block' or 'inline'");const P=f[k.level];P?P.unshift(k.tokenizer):f[k.level]=[k.tokenizer],k.start&&(k.level==="block"?f.startBlock?f.startBlock.push(k.start):f.startBlock=[k.start]:k.level==="inline"&&(f.startInline?f.startInline.push(k.start):f.startInline=[k.start]))}"childTokens"in k&&k.childTokens&&(f.childTokens[k.name]=k.childTokens)}),v.extensions=f),_.renderer){const k=this.defaults.renderer||new Oc(this.defaults);for(const P in _.renderer){if(!(P in k))throw new Error(`renderer '${P}' does not exist`);if(["options","parser"].includes(P))continue;const x=P,o=_.renderer[x],B=k[x];k[x]=(...D)=>{let L=o.apply(k,D);return L===!1&&(L=B.apply(k,D)),L||""}}v.renderer=k}if(_.tokenizer){const k=this.defaults.tokenizer||new Vc(this.defaults);for(const P in _.tokenizer){if(!(P in k))throw new Error(`tokenizer '${P}' does not exist`);if(["options","rules","lexer"].includes(P))continue;const x=P,o=_.tokenizer[x],B=k[x];k[x]=(...D)=>{let L=o.apply(k,D);return L===!1&&(L=B.apply(k,D)),L}}v.tokenizer=k}if(_.hooks){const k=this.defaults.hooks||new Fc;for(const P in _.hooks){if(!(P in k))throw new Error(`hook '${P}' does not exist`);if(["options","block"].includes(P))continue;const x=P,o=_.hooks[x],B=k[x];Fc.passThroughHooks.has(P)?k[x]=D=>{if(this.defaults.async)return Promise.resolve(o.call(k,D)).then(H=>B.call(k,H));const L=o.call(k,D);return B.call(k,L)}:k[x]=(...D)=>{let L=o.apply(k,D);return L===!1&&(L=B.apply(k,D)),L}}v.hooks=k}if(_.walkTokens){const k=this.defaults.walkTokens,P=_.walkTokens;v.walkTokens=function(x){let o=[];return o.push(P.call(this,x)),k&&(o=o.concat(k.call(this,x))),o}}this.defaults={...this.defaults,...v}}),this}setOptions(p){return this.defaults={...this.defaults,...p},this}lexer(p,f){return ho.lex(p,f??this.defaults)}parser(p,f){return po.parse(p,f??this.defaults)}parseMarkdown(p){return(_,v)=>{const k={...v},P={...this.defaults,...k},x=this.onError(!!P.silent,!!P.async);if(this.defaults.async===!0&&k.async===!1)return x(new Error("marked(): The async option was set to true by an extension. Remove async: false from the parse options object to return a Promise."));if(typeof _>"u"||_===null)return x(new Error("marked(): input parameter is undefined or null"));if(typeof _!="string")return x(new Error("marked(): input parameter is of type "+Object.prototype.toString.call(_)+", string expected"));P.hooks&&(P.hooks.options=P,P.hooks.block=p);const o=P.hooks?P.hooks.provideLexer():p?ho.lex:ho.lexInline,B=P.hooks?P.hooks.provideParser():p?po.parse:po.parseInline;if(P.async)return Promise.resolve(P.hooks?P.hooks.preprocess(_):_).then(D=>o(D,P)).then(D=>P.hooks?P.hooks.processAllTokens(D):D).then(D=>P.walkTokens?Promise.all(this.walkTokens(D,P.walkTokens)).then(()=>D):D).then(D=>B(D,P)).then(D=>P.hooks?P.hooks.postprocess(D):D).catch(x);try{P.hooks&&(_=P.hooks.preprocess(_));let D=o(_,P);P.hooks&&(D=P.hooks.processAllTokens(D)),P.walkTokens&&this.walkTokens(D,P.walkTokens);let L=B(D,P);return P.hooks&&(L=P.hooks.postprocess(L)),L}catch(D){return x(D)}}}onError(p,f){return _=>{if(_.message+=`
|
|
801
|
-
Please report this to https://github.com/markedjs/marked.`,p){const v="<p>An error occurred:</p><pre>"+Gn(_.message+"",!0)+"</pre>";return f?Promise.resolve(v):v}if(f)return Promise.reject(_);throw _}}},ss=new kv;function br(p,f){return ss.parse(p,f)}br.options=br.setOptions=function(p){return ss.setOptions(p),br.defaults=ss.defaults,ff(br.defaults),br},br.getDefaults=zh,br.defaults=os,br.use=function(...p){return ss.use(...p),br.defaults=ss.defaults,ff(br.defaults),br},br.walkTokens=function(p,f){return ss.walkTokens(p,f)},br.parseInline=ss.parseInline,br.Parser=po,br.parser=po.parse,br.Renderer=Oc,br.TextRenderer=Hh,br.Lexer=ho,br.lexer=ho.lex,br.Tokenizer=Vc,br.Hooks=Fc,br.parse=br,br.options,br.setOptions,br.use,br.walkTokens,br.parseInline,po.parse,ho.lex;var Nc={exports:{}},qc={exports:{}},En={},Ki={},If;function Gi(){if(If)return Ki;If=1,Ki.__esModule=!0,Ki.extend=k,Ki.indexOf=B,Ki.escapeExpression=D,Ki.isEmpty=L,Ki.createFrame=H,Ki.blockParams=M,Ki.appendContextPath=C;var p={"&":"&","<":"<",">":">",'"':""","'":"'","`":"`","=":"="},f=/[&<>"'`=]/g,_=/[&<>"'`=]/;function v(T){return p[T]}function k(T){for(var N=1;N<arguments.length;N++)for(var G in arguments[N])Object.prototype.hasOwnProperty.call(arguments[N],G)&&(T[G]=arguments[N][G]);return T}var P=Object.prototype.toString;Ki.toString=P;var x=function(N){return typeof N=="function"};x(/x/)&&(Ki.isFunction=x=function(T){return typeof T=="function"&&P.call(T)==="[object Function]"}),Ki.isFunction=x;var o=Array.isArray||function(T){return T&&typeof T=="object"?P.call(T)==="[object Array]":!1};Ki.isArray=o;function B(T,N){for(var G=0,ie=T.length;G<ie;G++)if(T[G]===N)return G;return-1}function D(T){if(typeof T!="string"){if(T&&T.toHTML)return T.toHTML();if(T==null)return"";if(!T)return T+"";T=""+T}return _.test(T)?T.replace(f,v):T}function L(T){return!T&&T!==0?!0:!!(o(T)&&T.length===0)}function H(T){var N=k({},T);return N._parent=T,N}function M(T,N){return T.path=N,T}function C(T,N){return(T?T+".":"")+N}return Ki}var Uc={exports:{}},Mf;function Pn(){return Mf||(Mf=1,function(p,f){f.__esModule=!0;var _=["description","fileName","lineNumber","endLineNumber","message","name","number","stack"];function v(k,P){var x=P&&P.loc,o=void 0,B=void 0,D=void 0,L=void 0;x&&(o=x.start.line,B=x.end.line,D=x.start.column,L=x.end.column,k+=" - "+o+":"+D);for(var H=Error.prototype.constructor.call(this,k),M=0;M<_.length;M++)this[_[M]]=H[_[M]];Error.captureStackTrace&&Error.captureStackTrace(this,v);try{x&&(this.lineNumber=o,this.endLineNumber=B,Object.defineProperty?(Object.defineProperty(this,"column",{value:D,enumerable:!0}),Object.defineProperty(this,"endColumn",{value:L,enumerable:!0})):(this.column=D,this.endColumn=L))}catch{}}v.prototype=new Error,f.default=v,p.exports=f.default}(Uc,Uc.exports)),Uc.exports}var dl={},jc={exports:{}},Lf;function Tv(){return Lf||(Lf=1,function(p,f){f.__esModule=!0;var _=Gi();f.default=function(v){v.registerHelper("blockHelperMissing",function(k,P){var x=P.inverse,o=P.fn;if(k===!0)return o(this);if(k===!1||k==null)return x(this);if(_.isArray(k))return k.length>0?(P.ids&&(P.ids=[P.name]),v.helpers.each(k,P)):x(this);if(P.data&&P.ids){var B=_.createFrame(P.data);B.contextPath=_.appendContextPath(P.data.contextPath,P.name),P={data:B}}return o(k,P)})},p.exports=f.default}(jc,jc.exports)),jc.exports}var Hc={exports:{}},Rf;function Cv(){return Rf||(Rf=1,function(p,f){f.__esModule=!0;function _(x){return x&&x.__esModule?x:{default:x}}var v=Gi(),k=Pn(),P=_(k);f.default=function(x){x.registerHelper("each",function(o,B){if(!B)throw new P.default("Must pass iterator to #each");var D=B.fn,L=B.inverse,H=0,M="",C=void 0,T=void 0;B.data&&B.ids&&(T=v.appendContextPath(B.data.contextPath,B.ids[0])+"."),v.isFunction(o)&&(o=o.call(this)),B.data&&(C=v.createFrame(B.data));function N(te,me,De){C&&(C.key=te,C.index=me,C.first=me===0,C.last=!!De,T&&(C.contextPath=T+te)),M=M+D(o[te],{data:C,blockParams:v.blockParams([o[te],te],[T+te,null])})}if(o&&typeof o=="object")if(v.isArray(o))for(var G=o.length;H<G;H++)H in o&&N(H,H,H===o.length-1);else if(typeof Symbol=="function"&&o[Symbol.iterator]){for(var ie=[],le=o[Symbol.iterator](),Ee=le.next();!Ee.done;Ee=le.next())ie.push(Ee.value);o=ie;for(var G=o.length;H<G;H++)N(H,H,H===o.length-1)}else(function(){var te=void 0;Object.keys(o).forEach(function(me){te!==void 0&&N(te,H-1),te=me,H++}),te!==void 0&&N(te,H-1,!0)})();return H===0&&(M=L(this)),M})},p.exports=f.default}(Hc,Hc.exports)),Hc.exports}var Wc={exports:{}},Df;function Ev(){return Df||(Df=1,function(p,f){f.__esModule=!0;function _(P){return P&&P.__esModule?P:{default:P}}var v=Pn(),k=_(v);f.default=function(P){P.registerHelper("helperMissing",function(){if(arguments.length!==1)throw new k.default('Missing helper: "'+arguments[arguments.length-1].name+'"')})},p.exports=f.default}(Wc,Wc.exports)),Wc.exports}var Zc={exports:{}},zf;function Pv(){return zf||(zf=1,function(p,f){f.__esModule=!0;function _(x){return x&&x.__esModule?x:{default:x}}var v=Gi(),k=Pn(),P=_(k);f.default=function(x){x.registerHelper("if",function(o,B){if(arguments.length!=2)throw new P.default("#if requires exactly one argument");return v.isFunction(o)&&(o=o.call(this)),!B.hash.includeZero&&!o||v.isEmpty(o)?B.inverse(this):B.fn(this)}),x.registerHelper("unless",function(o,B){if(arguments.length!=2)throw new P.default("#unless requires exactly one argument");return x.helpers.if.call(this,o,{fn:B.inverse,inverse:B.fn,hash:B.hash})})},p.exports=f.default}(Zc,Zc.exports)),Zc.exports}var Kc={exports:{}},Bf;function Iv(){return Bf||(Bf=1,function(p,f){f.__esModule=!0,f.default=function(_){_.registerHelper("log",function(){for(var v=[void 0],k=arguments[arguments.length-1],P=0;P<arguments.length-1;P++)v.push(arguments[P]);var x=1;k.hash.level!=null?x=k.hash.level:k.data&&k.data.level!=null&&(x=k.data.level),v[0]=x,_.log.apply(_,v)})},p.exports=f.default}(Kc,Kc.exports)),Kc.exports}var Gc={exports:{}},Vf;function Mv(){return Vf||(Vf=1,function(p,f){f.__esModule=!0,f.default=function(_){_.registerHelper("lookup",function(v,k,P){return v&&P.lookupProperty(v,k)})},p.exports=f.default}(Gc,Gc.exports)),Gc.exports}var Jc={exports:{}},Of;function Lv(){return Of||(Of=1,function(p,f){f.__esModule=!0;function _(x){return x&&x.__esModule?x:{default:x}}var v=Gi(),k=Pn(),P=_(k);f.default=function(x){x.registerHelper("with",function(o,B){if(arguments.length!=2)throw new P.default("#with requires exactly one argument");v.isFunction(o)&&(o=o.call(this));var D=B.fn;if(v.isEmpty(o))return B.inverse(this);var L=B.data;return B.data&&B.ids&&(L=v.createFrame(B.data),L.contextPath=v.appendContextPath(B.data.contextPath,B.ids[0])),D(o,{data:L,blockParams:v.blockParams([o],[L&&L.contextPath])})})},p.exports=f.default}(Jc,Jc.exports)),Jc.exports}var Ff;function Nf(){if(Ff)return dl;Ff=1,dl.__esModule=!0,dl.registerDefaultHelpers=N,dl.moveHelperToHooks=G;function p(ie){return ie&&ie.__esModule?ie:{default:ie}}var f=Tv(),_=p(f),v=Cv(),k=p(v),P=Ev(),x=p(P),o=Pv(),B=p(o),D=Iv(),L=p(D),H=Mv(),M=p(H),C=Lv(),T=p(C);function N(ie){_.default(ie),k.default(ie),x.default(ie),B.default(ie),L.default(ie),M.default(ie),T.default(ie)}function G(ie,le,Ee){ie.helpers[le]&&(ie.hooks[le]=ie.helpers[le],Ee||delete ie.helpers[le])}return dl}var Xc={},Qc={exports:{}},qf;function Rv(){return qf||(qf=1,function(p,f){f.__esModule=!0;var _=Gi();f.default=function(v){v.registerDecorator("inline",function(k,P,x,o){var B=k;return P.partials||(P.partials={},B=function(D,L){var H=x.partials;x.partials=_.extend({},H,P.partials);var M=k(D,L);return x.partials=H,M}),P.partials[o.args[0]]=o.fn,B})},p.exports=f.default}(Qc,Qc.exports)),Qc.exports}var Uf;function Dv(){if(Uf)return Xc;Uf=1,Xc.__esModule=!0,Xc.registerDefaultDecorators=v;function p(k){return k&&k.__esModule?k:{default:k}}var f=Rv(),_=p(f);function v(k){_.default(k)}return Xc}var Yc={exports:{}},jf;function Hf(){return jf||(jf=1,function(p,f){f.__esModule=!0;var _=Gi(),v={methodMap:["debug","info","warn","error"],level:"info",lookupLevel:function(P){if(typeof P=="string"){var x=_.indexOf(v.methodMap,P.toLowerCase());x>=0?P=x:P=parseInt(P,10)}return P},log:function(P){if(P=v.lookupLevel(P),typeof console<"u"&&v.lookupLevel(v.level)<=P){var x=v.methodMap[P];console[x]||(x="log");for(var o=arguments.length,B=Array(o>1?o-1:0),D=1;D<o;D++)B[D-1]=arguments[D];console[x].apply(console,B)}}};f.default=v,p.exports=f.default}(Yc,Yc.exports)),Yc.exports}var Ys={},$c={},Wf;function zv(){if(Wf)return $c;Wf=1,$c.__esModule=!0,$c.createNewLookupObject=f;var p=Gi();function f(){for(var _=arguments.length,v=Array(_),k=0;k<_;k++)v[k]=arguments[k];return p.extend.apply(void 0,[Object.create(null)].concat(v))}return $c}var Zf;function Kf(){if(Zf)return Ys;Zf=1,Ys.__esModule=!0,Ys.createProtoAccessControl=P,Ys.resultIsAllowed=x,Ys.resetLoggedProperties=D;function p(L){return L&&L.__esModule?L:{default:L}}var f=zv(),_=Hf(),v=p(_),k=Object.create(null);function P(L){var H=Object.create(null);H.constructor=!1,H.__defineGetter__=!1,H.__defineSetter__=!1,H.__lookupGetter__=!1;var M=Object.create(null);return M.__proto__=!1,{properties:{whitelist:f.createNewLookupObject(M,L.allowedProtoProperties),defaultValue:L.allowProtoPropertiesByDefault},methods:{whitelist:f.createNewLookupObject(H,L.allowedProtoMethods),defaultValue:L.allowProtoMethodsByDefault}}}function x(L,H,M){return o(typeof L=="function"?H.methods:H.properties,M)}function o(L,H){return L.whitelist[H]!==void 0?L.whitelist[H]===!0:L.defaultValue!==void 0?L.defaultValue:(B(H),!1)}function B(L){k[L]!==!0&&(k[L]=!0,v.default.log("error",'Handlebars: Access has been denied to resolve the property "'+L+`" because it is not an "own property" of its parent.
|
|
802
|
-
You can add a runtime option to disable the check or this warning:
|
|
803
|
-
See https://handlebarsjs.com/api-reference/runtime-options.html#options-to-control-prototype-access for details`))}function D(){Object.keys(k).forEach(function(L){delete k[L]})}return Ys}var Gf;function Wh(){if(Gf)return En;Gf=1,En.__esModule=!0,En.HandlebarsEnvironment=T;function p(G){return G&&G.__esModule?G:{default:G}}var f=Gi(),_=Pn(),v=p(_),k=Nf(),P=Dv(),x=Hf(),o=p(x),B=Kf(),D="4.7.8";En.VERSION=D;var L=8;En.COMPILER_REVISION=L;var H=7;En.LAST_COMPATIBLE_COMPILER_REVISION=H;var M={1:"<= 1.0.rc.2",2:"== 1.0.0-rc.3",3:"== 1.0.0-rc.4",4:"== 1.x.x",5:"== 2.0.0-alpha.x",6:">= 2.0.0-beta.1",7:">= 4.0.0 <4.3.0",8:">= 4.3.0"};En.REVISION_CHANGES=M;var C="[object Object]";function T(G,ie,le){this.helpers=G||{},this.partials=ie||{},this.decorators=le||{},k.registerDefaultHelpers(this),P.registerDefaultDecorators(this)}T.prototype={constructor:T,logger:o.default,log:o.default.log,registerHelper:function(ie,le){if(f.toString.call(ie)===C){if(le)throw new v.default("Arg not supported with multiple helpers");f.extend(this.helpers,ie)}else this.helpers[ie]=le},unregisterHelper:function(ie){delete this.helpers[ie]},registerPartial:function(ie,le){if(f.toString.call(ie)===C)f.extend(this.partials,ie);else{if(typeof le>"u")throw new v.default('Attempting to register a partial called "'+ie+'" as undefined');this.partials[ie]=le}},unregisterPartial:function(ie){delete this.partials[ie]},registerDecorator:function(ie,le){if(f.toString.call(ie)===C){if(le)throw new v.default("Arg not supported with multiple decorators");f.extend(this.decorators,ie)}else this.decorators[ie]=le},unregisterDecorator:function(ie){delete this.decorators[ie]},resetLoggedPropertyAccesses:function(){B.resetLoggedProperties()}};var N=o.default.log;return En.log=N,En.createFrame=f.createFrame,En.logger=o.default,En}var eu={exports:{}},Jf;function Bv(){return Jf||(Jf=1,function(p,f){f.__esModule=!0;function _(v){this.string=v}_.prototype.toString=_.prototype.toHTML=function(){return""+this.string},f.default=_,p.exports=f.default}(eu,eu.exports)),eu.exports}var fo={},tu={},Xf;function Vv(){if(Xf)return tu;Xf=1,tu.__esModule=!0,tu.wrapHelper=p;function p(f,_){if(typeof f!="function")return f;var v=function(){var P=arguments[arguments.length-1];return arguments[arguments.length-1]=_(P),f.apply(this,arguments)};return v}return tu}var Qf;function Ov(){if(Qf)return fo;Qf=1,fo.__esModule=!0,fo.checkRevision=L,fo.template=H,fo.wrapProgram=M,fo.resolvePartial=C,fo.invokePartial=T,fo.noop=N;function p(te){return te&&te.__esModule?te:{default:te}}function f(te){if(te&&te.__esModule)return te;var me={};if(te!=null)for(var De in te)Object.prototype.hasOwnProperty.call(te,De)&&(me[De]=te[De]);return me.default=te,me}var _=Gi(),v=f(_),k=Pn(),P=p(k),x=Wh(),o=Nf(),B=Vv(),D=Kf();function L(te){var me=te&&te[0]||1,De=x.COMPILER_REVISION;if(!(me>=x.LAST_COMPATIBLE_COMPILER_REVISION&&me<=x.COMPILER_REVISION))if(me<x.LAST_COMPATIBLE_COMPILER_REVISION){var qe=x.REVISION_CHANGES[De],rt=x.REVISION_CHANGES[me];throw new P.default("Template was precompiled with an older version of Handlebars than the current runtime. Please update your precompiler to a newer version ("+qe+") or downgrade your runtime to an older version ("+rt+").")}else throw new P.default("Template was precompiled with a newer version of Handlebars than the current runtime. Please update your runtime to a newer version ("+te[1]+").")}function H(te,me){if(!me)throw new P.default("No environment passed to template");if(!te||!te.main)throw new P.default("Unknown template object: "+typeof te);te.main.decorator=te.main_d,me.VM.checkRevision(te.compiler);var De=te.compiler&&te.compiler[0]===7;function qe(_t,lt,xt){xt.hash&&(lt=v.extend({},lt,xt.hash),xt.ids&&(xt.ids[0]=!0)),_t=me.VM.resolvePartial.call(this,_t,lt,xt);var qt=v.extend({},xt,{hooks:this.hooks,protoAccessControl:this.protoAccessControl}),Xt=me.VM.invokePartial.call(this,_t,lt,qt);if(Xt==null&&me.compile&&(xt.partials[xt.name]=me.compile(_t,te.compilerOptions,me),Xt=xt.partials[xt.name](lt,qt)),Xt!=null){if(xt.indent){for(var kr=Xt.split(`
|
|
804
|
-
`),vr=0,ni=kr.length;vr<ni&&!(!kr[vr]&&vr+1===ni);vr++)kr[vr]=xt.indent+kr[vr];Xt=kr.join(`
|
|
805
|
-
`)}return Xt}else throw new P.default("The partial "+xt.name+" could not be compiled when running in runtime-only mode")}var rt={strict:function(lt,xt,qt){if(!lt||!(xt in lt))throw new P.default('"'+xt+'" not defined in '+lt,{loc:qt});return rt.lookupProperty(lt,xt)},lookupProperty:function(lt,xt){var qt=lt[xt];if(qt==null||Object.prototype.hasOwnProperty.call(lt,xt)||D.resultIsAllowed(qt,rt.protoAccessControl,xt))return qt},lookup:function(lt,xt){for(var qt=lt.length,Xt=0;Xt<qt;Xt++){var kr=lt[Xt]&&rt.lookupProperty(lt[Xt],xt);if(kr!=null)return lt[Xt][xt]}},lambda:function(lt,xt){return typeof lt=="function"?lt.call(xt):lt},escapeExpression:v.escapeExpression,invokePartial:qe,fn:function(lt){var xt=te[lt];return xt.decorator=te[lt+"_d"],xt},programs:[],program:function(lt,xt,qt,Xt,kr){var vr=this.programs[lt],ni=this.fn(lt);return xt||kr||Xt||qt?vr=M(this,lt,ni,xt,qt,Xt,kr):vr||(vr=this.programs[lt]=M(this,lt,ni)),vr},data:function(lt,xt){for(;lt&&xt--;)lt=lt._parent;return lt},mergeIfNeeded:function(lt,xt){var qt=lt||xt;return lt&&xt&<!==xt&&(qt=v.extend({},xt,lt)),qt},nullContext:Object.seal({}),noop:me.VM.noop,compilerInfo:te.compiler};function At(_t){var lt=arguments.length<=1||arguments[1]===void 0?{}:arguments[1],xt=lt.data;At._setup(lt),!lt.partial&&te.useData&&(xt=G(_t,xt));var qt=void 0,Xt=te.useBlockParams?[]:void 0;te.useDepths&&(lt.depths?qt=_t!=lt.depths[0]?[_t].concat(lt.depths):lt.depths:qt=[_t]);function kr(vr){return""+te.main(rt,vr,rt.helpers,rt.partials,xt,Xt,qt)}return kr=ie(te.main,kr,rt,lt.depths||[],xt,Xt),kr(_t,lt)}return At.isTop=!0,At._setup=function(_t){if(_t.partial)rt.protoAccessControl=_t.protoAccessControl,rt.helpers=_t.helpers,rt.partials=_t.partials,rt.decorators=_t.decorators,rt.hooks=_t.hooks;else{var lt=v.extend({},me.helpers,_t.helpers);le(lt,rt),rt.helpers=lt,te.usePartial&&(rt.partials=rt.mergeIfNeeded(_t.partials,me.partials)),(te.usePartial||te.useDecorators)&&(rt.decorators=v.extend({},me.decorators,_t.decorators)),rt.hooks={},rt.protoAccessControl=D.createProtoAccessControl(_t);var xt=_t.allowCallsToHelperMissing||De;o.moveHelperToHooks(rt,"helperMissing",xt),o.moveHelperToHooks(rt,"blockHelperMissing",xt)}},At._child=function(_t,lt,xt,qt){if(te.useBlockParams&&!xt)throw new P.default("must pass block params");if(te.useDepths&&!qt)throw new P.default("must pass parent depths");return M(rt,_t,te[_t],lt,0,xt,qt)},At}function M(te,me,De,qe,rt,At,_t){function lt(xt){var qt=arguments.length<=1||arguments[1]===void 0?{}:arguments[1],Xt=_t;return _t&&xt!=_t[0]&&!(xt===te.nullContext&&_t[0]===null)&&(Xt=[xt].concat(_t)),De(te,xt,te.helpers,te.partials,qt.data||qe,At&&[qt.blockParams].concat(At),Xt)}return lt=ie(De,lt,te,_t,qe,At),lt.program=me,lt.depth=_t?_t.length:0,lt.blockParams=rt||0,lt}function C(te,me,De){return te?!te.call&&!De.name&&(De.name=te,te=De.partials[te]):De.name==="@partial-block"?te=De.data["partial-block"]:te=De.partials[De.name],te}function T(te,me,De){var qe=De.data&&De.data["partial-block"];De.partial=!0,De.ids&&(De.data.contextPath=De.ids[0]||De.data.contextPath);var rt=void 0;if(De.fn&&De.fn!==N&&function(){De.data=x.createFrame(De.data);var At=De.fn;rt=De.data["partial-block"]=function(lt){var xt=arguments.length<=1||arguments[1]===void 0?{}:arguments[1];return xt.data=x.createFrame(xt.data),xt.data["partial-block"]=qe,At(lt,xt)},At.partials&&(De.partials=v.extend({},De.partials,At.partials))}(),te===void 0&&rt&&(te=rt),te===void 0)throw new P.default("The partial "+De.name+" could not be found");if(te instanceof Function)return te(me,De)}function N(){return""}function G(te,me){return(!me||!("root"in me))&&(me=me?x.createFrame(me):{},me.root=te),me}function ie(te,me,De,qe,rt,At){if(te.decorator){var _t={};me=te.decorator(me,_t,De,qe&&qe[0],rt,At,qe),v.extend(me,_t)}return me}function le(te,me){Object.keys(te).forEach(function(De){var qe=te[De];te[De]=Ee(qe,me)})}function Ee(te,me){var De=me.lookupProperty;return B.wrapHelper(te,function(qe){return v.extend({lookupProperty:De},qe)})}return fo}var ru={exports:{}},Yf;function $f(){return Yf||(Yf=1,function(p,f){f.__esModule=!0,f.default=function(_){(function(){typeof globalThis!="object"&&(Object.prototype.__defineGetter__("__magic__",function(){return this}),__magic__.globalThis=__magic__,delete Object.prototype.__magic__)})();var v=globalThis.Handlebars;_.noConflict=function(){return globalThis.Handlebars===_&&(globalThis.Handlebars=v),_}},p.exports=f.default}(ru,ru.exports)),ru.exports}var em;function Fv(){return em||(em=1,function(p,f){f.__esModule=!0;function _(le){return le&&le.__esModule?le:{default:le}}function v(le){if(le&&le.__esModule)return le;var Ee={};if(le!=null)for(var te in le)Object.prototype.hasOwnProperty.call(le,te)&&(Ee[te]=le[te]);return Ee.default=le,Ee}var k=Wh(),P=v(k),x=Bv(),o=_(x),B=Pn(),D=_(B),L=Gi(),H=v(L),M=Ov(),C=v(M),T=$f(),N=_(T);function G(){var le=new P.HandlebarsEnvironment;return H.extend(le,P),le.SafeString=o.default,le.Exception=D.default,le.Utils=H,le.escapeExpression=H.escapeExpression,le.VM=C,le.template=function(Ee){return C.template(Ee,le)},le}var ie=G();ie.create=G,N.default(ie),ie.default=ie,f.default=ie,p.exports=f.default}(qc,qc.exports)),qc.exports}var iu={exports:{}},tm;function rm(){return tm||(tm=1,function(p,f){f.__esModule=!0;var _={helpers:{helperExpression:function(k){return k.type==="SubExpression"||(k.type==="MustacheStatement"||k.type==="BlockStatement")&&!!(k.params&&k.params.length||k.hash)},scopedId:function(k){return/^\.|this\b/.test(k.original)},simpleId:function(k){return k.parts.length===1&&!_.helpers.scopedId(k)&&!k.depth}}};f.default=_,p.exports=f.default}(iu,iu.exports)),iu.exports}var $s={},nu={exports:{}},im;function Nv(){return im||(im=1,function(p,f){f.__esModule=!0;var _=function(){var v={trace:function(){},yy:{},symbols_:{error:2,root:3,program:4,EOF:5,program_repetition0:6,statement:7,mustache:8,block:9,rawBlock:10,partial:11,partialBlock:12,content:13,COMMENT:14,CONTENT:15,openRawBlock:16,rawBlock_repetition0:17,END_RAW_BLOCK:18,OPEN_RAW_BLOCK:19,helperName:20,openRawBlock_repetition0:21,openRawBlock_option0:22,CLOSE_RAW_BLOCK:23,openBlock:24,block_option0:25,closeBlock:26,openInverse:27,block_option1:28,OPEN_BLOCK:29,openBlock_repetition0:30,openBlock_option0:31,openBlock_option1:32,CLOSE:33,OPEN_INVERSE:34,openInverse_repetition0:35,openInverse_option0:36,openInverse_option1:37,openInverseChain:38,OPEN_INVERSE_CHAIN:39,openInverseChain_repetition0:40,openInverseChain_option0:41,openInverseChain_option1:42,inverseAndProgram:43,INVERSE:44,inverseChain:45,inverseChain_option0:46,OPEN_ENDBLOCK:47,OPEN:48,mustache_repetition0:49,mustache_option0:50,OPEN_UNESCAPED:51,mustache_repetition1:52,mustache_option1:53,CLOSE_UNESCAPED:54,OPEN_PARTIAL:55,partialName:56,partial_repetition0:57,partial_option0:58,openPartialBlock:59,OPEN_PARTIAL_BLOCK:60,openPartialBlock_repetition0:61,openPartialBlock_option0:62,param:63,sexpr:64,OPEN_SEXPR:65,sexpr_repetition0:66,sexpr_option0:67,CLOSE_SEXPR:68,hash:69,hash_repetition_plus0:70,hashSegment:71,ID:72,EQUALS:73,blockParams:74,OPEN_BLOCK_PARAMS:75,blockParams_repetition_plus0:76,CLOSE_BLOCK_PARAMS:77,path:78,dataName:79,STRING:80,NUMBER:81,BOOLEAN:82,UNDEFINED:83,NULL:84,DATA:85,pathSegments:86,SEP:87,$accept:0,$end:1},terminals_:{2:"error",5:"EOF",14:"COMMENT",15:"CONTENT",18:"END_RAW_BLOCK",19:"OPEN_RAW_BLOCK",23:"CLOSE_RAW_BLOCK",29:"OPEN_BLOCK",33:"CLOSE",34:"OPEN_INVERSE",39:"OPEN_INVERSE_CHAIN",44:"INVERSE",47:"OPEN_ENDBLOCK",48:"OPEN",51:"OPEN_UNESCAPED",54:"CLOSE_UNESCAPED",55:"OPEN_PARTIAL",60:"OPEN_PARTIAL_BLOCK",65:"OPEN_SEXPR",68:"CLOSE_SEXPR",72:"ID",73:"EQUALS",75:"OPEN_BLOCK_PARAMS",77:"CLOSE_BLOCK_PARAMS",80:"STRING",81:"NUMBER",82:"BOOLEAN",83:"UNDEFINED",84:"NULL",85:"DATA",87:"SEP"},productions_:[0,[3,2],[4,1],[7,1],[7,1],[7,1],[7,1],[7,1],[7,1],[7,1],[13,1],[10,3],[16,5],[9,4],[9,4],[24,6],[27,6],[38,6],[43,2],[45,3],[45,1],[26,3],[8,5],[8,5],[11,5],[12,3],[59,5],[63,1],[63,1],[64,5],[69,1],[71,3],[74,3],[20,1],[20,1],[20,1],[20,1],[20,1],[20,1],[20,1],[56,1],[56,1],[79,2],[78,1],[86,3],[86,1],[6,0],[6,2],[17,0],[17,2],[21,0],[21,2],[22,0],[22,1],[25,0],[25,1],[28,0],[28,1],[30,0],[30,2],[31,0],[31,1],[32,0],[32,1],[35,0],[35,2],[36,0],[36,1],[37,0],[37,1],[40,0],[40,2],[41,0],[41,1],[42,0],[42,1],[46,0],[46,1],[49,0],[49,2],[50,0],[50,1],[52,0],[52,2],[53,0],[53,1],[57,0],[57,2],[58,0],[58,1],[61,0],[61,2],[62,0],[62,1],[66,0],[66,2],[67,0],[67,1],[70,1],[70,2],[76,1],[76,2]],performAction:function(o,B,D,L,H,M,C){var T=M.length-1;switch(H){case 1:return M[T-1];case 2:this.$=L.prepareProgram(M[T]);break;case 3:this.$=M[T];break;case 4:this.$=M[T];break;case 5:this.$=M[T];break;case 6:this.$=M[T];break;case 7:this.$=M[T];break;case 8:this.$=M[T];break;case 9:this.$={type:"CommentStatement",value:L.stripComment(M[T]),strip:L.stripFlags(M[T],M[T]),loc:L.locInfo(this._$)};break;case 10:this.$={type:"ContentStatement",original:M[T],value:M[T],loc:L.locInfo(this._$)};break;case 11:this.$=L.prepareRawBlock(M[T-2],M[T-1],M[T],this._$);break;case 12:this.$={path:M[T-3],params:M[T-2],hash:M[T-1]};break;case 13:this.$=L.prepareBlock(M[T-3],M[T-2],M[T-1],M[T],!1,this._$);break;case 14:this.$=L.prepareBlock(M[T-3],M[T-2],M[T-1],M[T],!0,this._$);break;case 15:this.$={open:M[T-5],path:M[T-4],params:M[T-3],hash:M[T-2],blockParams:M[T-1],strip:L.stripFlags(M[T-5],M[T])};break;case 16:this.$={path:M[T-4],params:M[T-3],hash:M[T-2],blockParams:M[T-1],strip:L.stripFlags(M[T-5],M[T])};break;case 17:this.$={path:M[T-4],params:M[T-3],hash:M[T-2],blockParams:M[T-1],strip:L.stripFlags(M[T-5],M[T])};break;case 18:this.$={strip:L.stripFlags(M[T-1],M[T-1]),program:M[T]};break;case 19:var N=L.prepareBlock(M[T-2],M[T-1],M[T],M[T],!1,this._$),G=L.prepareProgram([N],M[T-1].loc);G.chained=!0,this.$={strip:M[T-2].strip,program:G,chain:!0};break;case 20:this.$=M[T];break;case 21:this.$={path:M[T-1],strip:L.stripFlags(M[T-2],M[T])};break;case 22:this.$=L.prepareMustache(M[T-3],M[T-2],M[T-1],M[T-4],L.stripFlags(M[T-4],M[T]),this._$);break;case 23:this.$=L.prepareMustache(M[T-3],M[T-2],M[T-1],M[T-4],L.stripFlags(M[T-4],M[T]),this._$);break;case 24:this.$={type:"PartialStatement",name:M[T-3],params:M[T-2],hash:M[T-1],indent:"",strip:L.stripFlags(M[T-4],M[T]),loc:L.locInfo(this._$)};break;case 25:this.$=L.preparePartialBlock(M[T-2],M[T-1],M[T],this._$);break;case 26:this.$={path:M[T-3],params:M[T-2],hash:M[T-1],strip:L.stripFlags(M[T-4],M[T])};break;case 27:this.$=M[T];break;case 28:this.$=M[T];break;case 29:this.$={type:"SubExpression",path:M[T-3],params:M[T-2],hash:M[T-1],loc:L.locInfo(this._$)};break;case 30:this.$={type:"Hash",pairs:M[T],loc:L.locInfo(this._$)};break;case 31:this.$={type:"HashPair",key:L.id(M[T-2]),value:M[T],loc:L.locInfo(this._$)};break;case 32:this.$=L.id(M[T-1]);break;case 33:this.$=M[T];break;case 34:this.$=M[T];break;case 35:this.$={type:"StringLiteral",value:M[T],original:M[T],loc:L.locInfo(this._$)};break;case 36:this.$={type:"NumberLiteral",value:Number(M[T]),original:Number(M[T]),loc:L.locInfo(this._$)};break;case 37:this.$={type:"BooleanLiteral",value:M[T]==="true",original:M[T]==="true",loc:L.locInfo(this._$)};break;case 38:this.$={type:"UndefinedLiteral",original:void 0,value:void 0,loc:L.locInfo(this._$)};break;case 39:this.$={type:"NullLiteral",original:null,value:null,loc:L.locInfo(this._$)};break;case 40:this.$=M[T];break;case 41:this.$=M[T];break;case 42:this.$=L.preparePath(!0,M[T],this._$);break;case 43:this.$=L.preparePath(!1,M[T],this._$);break;case 44:M[T-2].push({part:L.id(M[T]),original:M[T],separator:M[T-1]}),this.$=M[T-2];break;case 45:this.$=[{part:L.id(M[T]),original:M[T]}];break;case 46:this.$=[];break;case 47:M[T-1].push(M[T]);break;case 48:this.$=[];break;case 49:M[T-1].push(M[T]);break;case 50:this.$=[];break;case 51:M[T-1].push(M[T]);break;case 58:this.$=[];break;case 59:M[T-1].push(M[T]);break;case 64:this.$=[];break;case 65:M[T-1].push(M[T]);break;case 70:this.$=[];break;case 71:M[T-1].push(M[T]);break;case 78:this.$=[];break;case 79:M[T-1].push(M[T]);break;case 82:this.$=[];break;case 83:M[T-1].push(M[T]);break;case 86:this.$=[];break;case 87:M[T-1].push(M[T]);break;case 90:this.$=[];break;case 91:M[T-1].push(M[T]);break;case 94:this.$=[];break;case 95:M[T-1].push(M[T]);break;case 98:this.$=[M[T]];break;case 99:M[T-1].push(M[T]);break;case 100:this.$=[M[T]];break;case 101:M[T-1].push(M[T]);break}},table:[{3:1,4:2,5:[2,46],6:3,14:[2,46],15:[2,46],19:[2,46],29:[2,46],34:[2,46],48:[2,46],51:[2,46],55:[2,46],60:[2,46]},{1:[3]},{5:[1,4]},{5:[2,2],7:5,8:6,9:7,10:8,11:9,12:10,13:11,14:[1,12],15:[1,20],16:17,19:[1,23],24:15,27:16,29:[1,21],34:[1,22],39:[2,2],44:[2,2],47:[2,2],48:[1,13],51:[1,14],55:[1,18],59:19,60:[1,24]},{1:[2,1]},{5:[2,47],14:[2,47],15:[2,47],19:[2,47],29:[2,47],34:[2,47],39:[2,47],44:[2,47],47:[2,47],48:[2,47],51:[2,47],55:[2,47],60:[2,47]},{5:[2,3],14:[2,3],15:[2,3],19:[2,3],29:[2,3],34:[2,3],39:[2,3],44:[2,3],47:[2,3],48:[2,3],51:[2,3],55:[2,3],60:[2,3]},{5:[2,4],14:[2,4],15:[2,4],19:[2,4],29:[2,4],34:[2,4],39:[2,4],44:[2,4],47:[2,4],48:[2,4],51:[2,4],55:[2,4],60:[2,4]},{5:[2,5],14:[2,5],15:[2,5],19:[2,5],29:[2,5],34:[2,5],39:[2,5],44:[2,5],47:[2,5],48:[2,5],51:[2,5],55:[2,5],60:[2,5]},{5:[2,6],14:[2,6],15:[2,6],19:[2,6],29:[2,6],34:[2,6],39:[2,6],44:[2,6],47:[2,6],48:[2,6],51:[2,6],55:[2,6],60:[2,6]},{5:[2,7],14:[2,7],15:[2,7],19:[2,7],29:[2,7],34:[2,7],39:[2,7],44:[2,7],47:[2,7],48:[2,7],51:[2,7],55:[2,7],60:[2,7]},{5:[2,8],14:[2,8],15:[2,8],19:[2,8],29:[2,8],34:[2,8],39:[2,8],44:[2,8],47:[2,8],48:[2,8],51:[2,8],55:[2,8],60:[2,8]},{5:[2,9],14:[2,9],15:[2,9],19:[2,9],29:[2,9],34:[2,9],39:[2,9],44:[2,9],47:[2,9],48:[2,9],51:[2,9],55:[2,9],60:[2,9]},{20:25,72:[1,35],78:26,79:27,80:[1,28],81:[1,29],82:[1,30],83:[1,31],84:[1,32],85:[1,34],86:33},{20:36,72:[1,35],78:26,79:27,80:[1,28],81:[1,29],82:[1,30],83:[1,31],84:[1,32],85:[1,34],86:33},{4:37,6:3,14:[2,46],15:[2,46],19:[2,46],29:[2,46],34:[2,46],39:[2,46],44:[2,46],47:[2,46],48:[2,46],51:[2,46],55:[2,46],60:[2,46]},{4:38,6:3,14:[2,46],15:[2,46],19:[2,46],29:[2,46],34:[2,46],44:[2,46],47:[2,46],48:[2,46],51:[2,46],55:[2,46],60:[2,46]},{15:[2,48],17:39,18:[2,48]},{20:41,56:40,64:42,65:[1,43],72:[1,35],78:26,79:27,80:[1,28],81:[1,29],82:[1,30],83:[1,31],84:[1,32],85:[1,34],86:33},{4:44,6:3,14:[2,46],15:[2,46],19:[2,46],29:[2,46],34:[2,46],47:[2,46],48:[2,46],51:[2,46],55:[2,46],60:[2,46]},{5:[2,10],14:[2,10],15:[2,10],18:[2,10],19:[2,10],29:[2,10],34:[2,10],39:[2,10],44:[2,10],47:[2,10],48:[2,10],51:[2,10],55:[2,10],60:[2,10]},{20:45,72:[1,35],78:26,79:27,80:[1,28],81:[1,29],82:[1,30],83:[1,31],84:[1,32],85:[1,34],86:33},{20:46,72:[1,35],78:26,79:27,80:[1,28],81:[1,29],82:[1,30],83:[1,31],84:[1,32],85:[1,34],86:33},{20:47,72:[1,35],78:26,79:27,80:[1,28],81:[1,29],82:[1,30],83:[1,31],84:[1,32],85:[1,34],86:33},{20:41,56:48,64:42,65:[1,43],72:[1,35],78:26,79:27,80:[1,28],81:[1,29],82:[1,30],83:[1,31],84:[1,32],85:[1,34],86:33},{33:[2,78],49:49,65:[2,78],72:[2,78],80:[2,78],81:[2,78],82:[2,78],83:[2,78],84:[2,78],85:[2,78]},{23:[2,33],33:[2,33],54:[2,33],65:[2,33],68:[2,33],72:[2,33],75:[2,33],80:[2,33],81:[2,33],82:[2,33],83:[2,33],84:[2,33],85:[2,33]},{23:[2,34],33:[2,34],54:[2,34],65:[2,34],68:[2,34],72:[2,34],75:[2,34],80:[2,34],81:[2,34],82:[2,34],83:[2,34],84:[2,34],85:[2,34]},{23:[2,35],33:[2,35],54:[2,35],65:[2,35],68:[2,35],72:[2,35],75:[2,35],80:[2,35],81:[2,35],82:[2,35],83:[2,35],84:[2,35],85:[2,35]},{23:[2,36],33:[2,36],54:[2,36],65:[2,36],68:[2,36],72:[2,36],75:[2,36],80:[2,36],81:[2,36],82:[2,36],83:[2,36],84:[2,36],85:[2,36]},{23:[2,37],33:[2,37],54:[2,37],65:[2,37],68:[2,37],72:[2,37],75:[2,37],80:[2,37],81:[2,37],82:[2,37],83:[2,37],84:[2,37],85:[2,37]},{23:[2,38],33:[2,38],54:[2,38],65:[2,38],68:[2,38],72:[2,38],75:[2,38],80:[2,38],81:[2,38],82:[2,38],83:[2,38],84:[2,38],85:[2,38]},{23:[2,39],33:[2,39],54:[2,39],65:[2,39],68:[2,39],72:[2,39],75:[2,39],80:[2,39],81:[2,39],82:[2,39],83:[2,39],84:[2,39],85:[2,39]},{23:[2,43],33:[2,43],54:[2,43],65:[2,43],68:[2,43],72:[2,43],75:[2,43],80:[2,43],81:[2,43],82:[2,43],83:[2,43],84:[2,43],85:[2,43],87:[1,50]},{72:[1,35],86:51},{23:[2,45],33:[2,45],54:[2,45],65:[2,45],68:[2,45],72:[2,45],75:[2,45],80:[2,45],81:[2,45],82:[2,45],83:[2,45],84:[2,45],85:[2,45],87:[2,45]},{52:52,54:[2,82],65:[2,82],72:[2,82],80:[2,82],81:[2,82],82:[2,82],83:[2,82],84:[2,82],85:[2,82]},{25:53,38:55,39:[1,57],43:56,44:[1,58],45:54,47:[2,54]},{28:59,43:60,44:[1,58],47:[2,56]},{13:62,15:[1,20],18:[1,61]},{33:[2,86],57:63,65:[2,86],72:[2,86],80:[2,86],81:[2,86],82:[2,86],83:[2,86],84:[2,86],85:[2,86]},{33:[2,40],65:[2,40],72:[2,40],80:[2,40],81:[2,40],82:[2,40],83:[2,40],84:[2,40],85:[2,40]},{33:[2,41],65:[2,41],72:[2,41],80:[2,41],81:[2,41],82:[2,41],83:[2,41],84:[2,41],85:[2,41]},{20:64,72:[1,35],78:26,79:27,80:[1,28],81:[1,29],82:[1,30],83:[1,31],84:[1,32],85:[1,34],86:33},{26:65,47:[1,66]},{30:67,33:[2,58],65:[2,58],72:[2,58],75:[2,58],80:[2,58],81:[2,58],82:[2,58],83:[2,58],84:[2,58],85:[2,58]},{33:[2,64],35:68,65:[2,64],72:[2,64],75:[2,64],80:[2,64],81:[2,64],82:[2,64],83:[2,64],84:[2,64],85:[2,64]},{21:69,23:[2,50],65:[2,50],72:[2,50],80:[2,50],81:[2,50],82:[2,50],83:[2,50],84:[2,50],85:[2,50]},{33:[2,90],61:70,65:[2,90],72:[2,90],80:[2,90],81:[2,90],82:[2,90],83:[2,90],84:[2,90],85:[2,90]},{20:74,33:[2,80],50:71,63:72,64:75,65:[1,43],69:73,70:76,71:77,72:[1,78],78:26,79:27,80:[1,28],81:[1,29],82:[1,30],83:[1,31],84:[1,32],85:[1,34],86:33},{72:[1,79]},{23:[2,42],33:[2,42],54:[2,42],65:[2,42],68:[2,42],72:[2,42],75:[2,42],80:[2,42],81:[2,42],82:[2,42],83:[2,42],84:[2,42],85:[2,42],87:[1,50]},{20:74,53:80,54:[2,84],63:81,64:75,65:[1,43],69:82,70:76,71:77,72:[1,78],78:26,79:27,80:[1,28],81:[1,29],82:[1,30],83:[1,31],84:[1,32],85:[1,34],86:33},{26:83,47:[1,66]},{47:[2,55]},{4:84,6:3,14:[2,46],15:[2,46],19:[2,46],29:[2,46],34:[2,46],39:[2,46],44:[2,46],47:[2,46],48:[2,46],51:[2,46],55:[2,46],60:[2,46]},{47:[2,20]},{20:85,72:[1,35],78:26,79:27,80:[1,28],81:[1,29],82:[1,30],83:[1,31],84:[1,32],85:[1,34],86:33},{4:86,6:3,14:[2,46],15:[2,46],19:[2,46],29:[2,46],34:[2,46],47:[2,46],48:[2,46],51:[2,46],55:[2,46],60:[2,46]},{26:87,47:[1,66]},{47:[2,57]},{5:[2,11],14:[2,11],15:[2,11],19:[2,11],29:[2,11],34:[2,11],39:[2,11],44:[2,11],47:[2,11],48:[2,11],51:[2,11],55:[2,11],60:[2,11]},{15:[2,49],18:[2,49]},{20:74,33:[2,88],58:88,63:89,64:75,65:[1,43],69:90,70:76,71:77,72:[1,78],78:26,79:27,80:[1,28],81:[1,29],82:[1,30],83:[1,31],84:[1,32],85:[1,34],86:33},{65:[2,94],66:91,68:[2,94],72:[2,94],80:[2,94],81:[2,94],82:[2,94],83:[2,94],84:[2,94],85:[2,94]},{5:[2,25],14:[2,25],15:[2,25],19:[2,25],29:[2,25],34:[2,25],39:[2,25],44:[2,25],47:[2,25],48:[2,25],51:[2,25],55:[2,25],60:[2,25]},{20:92,72:[1,35],78:26,79:27,80:[1,28],81:[1,29],82:[1,30],83:[1,31],84:[1,32],85:[1,34],86:33},{20:74,31:93,33:[2,60],63:94,64:75,65:[1,43],69:95,70:76,71:77,72:[1,78],75:[2,60],78:26,79:27,80:[1,28],81:[1,29],82:[1,30],83:[1,31],84:[1,32],85:[1,34],86:33},{20:74,33:[2,66],36:96,63:97,64:75,65:[1,43],69:98,70:76,71:77,72:[1,78],75:[2,66],78:26,79:27,80:[1,28],81:[1,29],82:[1,30],83:[1,31],84:[1,32],85:[1,34],86:33},{20:74,22:99,23:[2,52],63:100,64:75,65:[1,43],69:101,70:76,71:77,72:[1,78],78:26,79:27,80:[1,28],81:[1,29],82:[1,30],83:[1,31],84:[1,32],85:[1,34],86:33},{20:74,33:[2,92],62:102,63:103,64:75,65:[1,43],69:104,70:76,71:77,72:[1,78],78:26,79:27,80:[1,28],81:[1,29],82:[1,30],83:[1,31],84:[1,32],85:[1,34],86:33},{33:[1,105]},{33:[2,79],65:[2,79],72:[2,79],80:[2,79],81:[2,79],82:[2,79],83:[2,79],84:[2,79],85:[2,79]},{33:[2,81]},{23:[2,27],33:[2,27],54:[2,27],65:[2,27],68:[2,27],72:[2,27],75:[2,27],80:[2,27],81:[2,27],82:[2,27],83:[2,27],84:[2,27],85:[2,27]},{23:[2,28],33:[2,28],54:[2,28],65:[2,28],68:[2,28],72:[2,28],75:[2,28],80:[2,28],81:[2,28],82:[2,28],83:[2,28],84:[2,28],85:[2,28]},{23:[2,30],33:[2,30],54:[2,30],68:[2,30],71:106,72:[1,107],75:[2,30]},{23:[2,98],33:[2,98],54:[2,98],68:[2,98],72:[2,98],75:[2,98]},{23:[2,45],33:[2,45],54:[2,45],65:[2,45],68:[2,45],72:[2,45],73:[1,108],75:[2,45],80:[2,45],81:[2,45],82:[2,45],83:[2,45],84:[2,45],85:[2,45],87:[2,45]},{23:[2,44],33:[2,44],54:[2,44],65:[2,44],68:[2,44],72:[2,44],75:[2,44],80:[2,44],81:[2,44],82:[2,44],83:[2,44],84:[2,44],85:[2,44],87:[2,44]},{54:[1,109]},{54:[2,83],65:[2,83],72:[2,83],80:[2,83],81:[2,83],82:[2,83],83:[2,83],84:[2,83],85:[2,83]},{54:[2,85]},{5:[2,13],14:[2,13],15:[2,13],19:[2,13],29:[2,13],34:[2,13],39:[2,13],44:[2,13],47:[2,13],48:[2,13],51:[2,13],55:[2,13],60:[2,13]},{38:55,39:[1,57],43:56,44:[1,58],45:111,46:110,47:[2,76]},{33:[2,70],40:112,65:[2,70],72:[2,70],75:[2,70],80:[2,70],81:[2,70],82:[2,70],83:[2,70],84:[2,70],85:[2,70]},{47:[2,18]},{5:[2,14],14:[2,14],15:[2,14],19:[2,14],29:[2,14],34:[2,14],39:[2,14],44:[2,14],47:[2,14],48:[2,14],51:[2,14],55:[2,14],60:[2,14]},{33:[1,113]},{33:[2,87],65:[2,87],72:[2,87],80:[2,87],81:[2,87],82:[2,87],83:[2,87],84:[2,87],85:[2,87]},{33:[2,89]},{20:74,63:115,64:75,65:[1,43],67:114,68:[2,96],69:116,70:76,71:77,72:[1,78],78:26,79:27,80:[1,28],81:[1,29],82:[1,30],83:[1,31],84:[1,32],85:[1,34],86:33},{33:[1,117]},{32:118,33:[2,62],74:119,75:[1,120]},{33:[2,59],65:[2,59],72:[2,59],75:[2,59],80:[2,59],81:[2,59],82:[2,59],83:[2,59],84:[2,59],85:[2,59]},{33:[2,61],75:[2,61]},{33:[2,68],37:121,74:122,75:[1,120]},{33:[2,65],65:[2,65],72:[2,65],75:[2,65],80:[2,65],81:[2,65],82:[2,65],83:[2,65],84:[2,65],85:[2,65]},{33:[2,67],75:[2,67]},{23:[1,123]},{23:[2,51],65:[2,51],72:[2,51],80:[2,51],81:[2,51],82:[2,51],83:[2,51],84:[2,51],85:[2,51]},{23:[2,53]},{33:[1,124]},{33:[2,91],65:[2,91],72:[2,91],80:[2,91],81:[2,91],82:[2,91],83:[2,91],84:[2,91],85:[2,91]},{33:[2,93]},{5:[2,22],14:[2,22],15:[2,22],19:[2,22],29:[2,22],34:[2,22],39:[2,22],44:[2,22],47:[2,22],48:[2,22],51:[2,22],55:[2,22],60:[2,22]},{23:[2,99],33:[2,99],54:[2,99],68:[2,99],72:[2,99],75:[2,99]},{73:[1,108]},{20:74,63:125,64:75,65:[1,43],72:[1,35],78:26,79:27,80:[1,28],81:[1,29],82:[1,30],83:[1,31],84:[1,32],85:[1,34],86:33},{5:[2,23],14:[2,23],15:[2,23],19:[2,23],29:[2,23],34:[2,23],39:[2,23],44:[2,23],47:[2,23],48:[2,23],51:[2,23],55:[2,23],60:[2,23]},{47:[2,19]},{47:[2,77]},{20:74,33:[2,72],41:126,63:127,64:75,65:[1,43],69:128,70:76,71:77,72:[1,78],75:[2,72],78:26,79:27,80:[1,28],81:[1,29],82:[1,30],83:[1,31],84:[1,32],85:[1,34],86:33},{5:[2,24],14:[2,24],15:[2,24],19:[2,24],29:[2,24],34:[2,24],39:[2,24],44:[2,24],47:[2,24],48:[2,24],51:[2,24],55:[2,24],60:[2,24]},{68:[1,129]},{65:[2,95],68:[2,95],72:[2,95],80:[2,95],81:[2,95],82:[2,95],83:[2,95],84:[2,95],85:[2,95]},{68:[2,97]},{5:[2,21],14:[2,21],15:[2,21],19:[2,21],29:[2,21],34:[2,21],39:[2,21],44:[2,21],47:[2,21],48:[2,21],51:[2,21],55:[2,21],60:[2,21]},{33:[1,130]},{33:[2,63]},{72:[1,132],76:131},{33:[1,133]},{33:[2,69]},{15:[2,12],18:[2,12]},{14:[2,26],15:[2,26],19:[2,26],29:[2,26],34:[2,26],47:[2,26],48:[2,26],51:[2,26],55:[2,26],60:[2,26]},{23:[2,31],33:[2,31],54:[2,31],68:[2,31],72:[2,31],75:[2,31]},{33:[2,74],42:134,74:135,75:[1,120]},{33:[2,71],65:[2,71],72:[2,71],75:[2,71],80:[2,71],81:[2,71],82:[2,71],83:[2,71],84:[2,71],85:[2,71]},{33:[2,73],75:[2,73]},{23:[2,29],33:[2,29],54:[2,29],65:[2,29],68:[2,29],72:[2,29],75:[2,29],80:[2,29],81:[2,29],82:[2,29],83:[2,29],84:[2,29],85:[2,29]},{14:[2,15],15:[2,15],19:[2,15],29:[2,15],34:[2,15],39:[2,15],44:[2,15],47:[2,15],48:[2,15],51:[2,15],55:[2,15],60:[2,15]},{72:[1,137],77:[1,136]},{72:[2,100],77:[2,100]},{14:[2,16],15:[2,16],19:[2,16],29:[2,16],34:[2,16],44:[2,16],47:[2,16],48:[2,16],51:[2,16],55:[2,16],60:[2,16]},{33:[1,138]},{33:[2,75]},{33:[2,32]},{72:[2,101],77:[2,101]},{14:[2,17],15:[2,17],19:[2,17],29:[2,17],34:[2,17],39:[2,17],44:[2,17],47:[2,17],48:[2,17],51:[2,17],55:[2,17],60:[2,17]}],defaultActions:{4:[2,1],54:[2,55],56:[2,20],60:[2,57],73:[2,81],82:[2,85],86:[2,18],90:[2,89],101:[2,53],104:[2,93],110:[2,19],111:[2,77],116:[2,97],119:[2,63],122:[2,69],135:[2,75],136:[2,32]},parseError:function(o,B){throw new Error(o)},parse:function(o){var B=this,D=[0],L=[null],H=[],M=this.table,C="",T=0,N=0;this.lexer.setInput(o),this.lexer.yy=this.yy,this.yy.lexer=this.lexer,this.yy.parser=this,typeof this.lexer.yylloc>"u"&&(this.lexer.yylloc={});var G=this.lexer.yylloc;H.push(G);var ie=this.lexer.options&&this.lexer.options.ranges;typeof this.yy.parseError=="function"&&(this.parseError=this.yy.parseError);function le(){var qt;return qt=B.lexer.lex()||1,typeof qt!="number"&&(qt=B.symbols_[qt]||qt),qt}for(var Ee,te,me,De,qe={},rt,At,_t,lt;;){if(te=D[D.length-1],this.defaultActions[te]?me=this.defaultActions[te]:((Ee===null||typeof Ee>"u")&&(Ee=le()),me=M[te]&&M[te][Ee]),typeof me>"u"||!me.length||!me[0]){var xt="";{lt=[];for(rt in M[te])this.terminals_[rt]&&rt>2&<.push("'"+this.terminals_[rt]+"'");this.lexer.showPosition?xt="Parse error on line "+(T+1)+`:
|
|
806
|
-
`+this.lexer.showPosition()+`
|
|
807
|
-
Expecting `+lt.join(", ")+", got '"+(this.terminals_[Ee]||Ee)+"'":xt="Parse error on line "+(T+1)+": Unexpected "+(Ee==1?"end of input":"'"+(this.terminals_[Ee]||Ee)+"'"),this.parseError(xt,{text:this.lexer.match,token:this.terminals_[Ee]||Ee,line:this.lexer.yylineno,loc:G,expected:lt})}}if(me[0]instanceof Array&&me.length>1)throw new Error("Parse Error: multiple actions possible at state: "+te+", token: "+Ee);switch(me[0]){case 1:D.push(Ee),L.push(this.lexer.yytext),H.push(this.lexer.yylloc),D.push(me[1]),Ee=null,N=this.lexer.yyleng,C=this.lexer.yytext,T=this.lexer.yylineno,G=this.lexer.yylloc;break;case 2:if(At=this.productions_[me[1]][1],qe.$=L[L.length-At],qe._$={first_line:H[H.length-(At||1)].first_line,last_line:H[H.length-1].last_line,first_column:H[H.length-(At||1)].first_column,last_column:H[H.length-1].last_column},ie&&(qe._$.range=[H[H.length-(At||1)].range[0],H[H.length-1].range[1]]),De=this.performAction.call(qe,C,N,T,this.yy,me[1],L,H),typeof De<"u")return De;At&&(D=D.slice(0,-1*At*2),L=L.slice(0,-1*At),H=H.slice(0,-1*At)),D.push(this.productions_[me[1]][0]),L.push(qe.$),H.push(qe._$),_t=M[D[D.length-2]][D[D.length-1]],D.push(_t);break;case 3:return!0}}return!0}},k=function(){var x={EOF:1,parseError:function(B,D){if(this.yy.parser)this.yy.parser.parseError(B,D);else throw new Error(B)},setInput:function(B){return this._input=B,this._more=this._less=this.done=!1,this.yylineno=this.yyleng=0,this.yytext=this.matched=this.match="",this.conditionStack=["INITIAL"],this.yylloc={first_line:1,first_column:0,last_line:1,last_column:0},this.options.ranges&&(this.yylloc.range=[0,0]),this.offset=0,this},input:function(){var B=this._input[0];this.yytext+=B,this.yyleng++,this.offset++,this.match+=B,this.matched+=B;var D=B.match(/(?:\r\n?|\n).*/g);return D?(this.yylineno++,this.yylloc.last_line++):this.yylloc.last_column++,this.options.ranges&&this.yylloc.range[1]++,this._input=this._input.slice(1),B},unput:function(B){var D=B.length,L=B.split(/(?:\r\n?|\n)/g);this._input=B+this._input,this.yytext=this.yytext.substr(0,this.yytext.length-D-1),this.offset-=D;var H=this.match.split(/(?:\r\n?|\n)/g);this.match=this.match.substr(0,this.match.length-1),this.matched=this.matched.substr(0,this.matched.length-1),L.length-1&&(this.yylineno-=L.length-1);var M=this.yylloc.range;return this.yylloc={first_line:this.yylloc.first_line,last_line:this.yylineno+1,first_column:this.yylloc.first_column,last_column:L?(L.length===H.length?this.yylloc.first_column:0)+H[H.length-L.length].length-L[0].length:this.yylloc.first_column-D},this.options.ranges&&(this.yylloc.range=[M[0],M[0]+this.yyleng-D]),this},more:function(){return this._more=!0,this},less:function(B){this.unput(this.match.slice(B))},pastInput:function(){var B=this.matched.substr(0,this.matched.length-this.match.length);return(B.length>20?"...":"")+B.substr(-20).replace(/\n/g,"")},upcomingInput:function(){var B=this.match;return B.length<20&&(B+=this._input.substr(0,20-B.length)),(B.substr(0,20)+(B.length>20?"...":"")).replace(/\n/g,"")},showPosition:function(){var B=this.pastInput(),D=new Array(B.length+1).join("-");return B+this.upcomingInput()+`
|
|
808
|
-
`+D+"^"},next:function(){if(this.done)return this.EOF;this._input||(this.done=!0);var B,D,L,H,M;this._more||(this.yytext="",this.match="");for(var C=this._currentRules(),T=0;T<C.length&&(L=this._input.match(this.rules[C[T]]),!(L&&(!D||L[0].length>D[0].length)&&(D=L,H=T,!this.options.flex)));T++);return D?(M=D[0].match(/(?:\r\n?|\n).*/g),M&&(this.yylineno+=M.length),this.yylloc={first_line:this.yylloc.last_line,last_line:this.yylineno+1,first_column:this.yylloc.last_column,last_column:M?M[M.length-1].length-M[M.length-1].match(/\r?\n?/)[0].length:this.yylloc.last_column+D[0].length},this.yytext+=D[0],this.match+=D[0],this.matches=D,this.yyleng=this.yytext.length,this.options.ranges&&(this.yylloc.range=[this.offset,this.offset+=this.yyleng]),this._more=!1,this._input=this._input.slice(D[0].length),this.matched+=D[0],B=this.performAction.call(this,this.yy,this,C[H],this.conditionStack[this.conditionStack.length-1]),this.done&&this._input&&(this.done=!1),B||void 0):this._input===""?this.EOF:this.parseError("Lexical error on line "+(this.yylineno+1)+`. Unrecognized text.
|
|
809
|
-
`+this.showPosition(),{text:"",token:null,line:this.yylineno})},lex:function(){var B=this.next();return typeof B<"u"?B:this.lex()},begin:function(B){this.conditionStack.push(B)},popState:function(){return this.conditionStack.pop()},_currentRules:function(){return this.conditions[this.conditionStack[this.conditionStack.length-1]].rules},topState:function(){return this.conditionStack[this.conditionStack.length-2]},pushState:function(B){this.begin(B)}};return x.options={},x.performAction=function(B,D,L,H){function M(C,T){return D.yytext=D.yytext.substring(C,D.yyleng-T+C)}switch(L){case 0:if(D.yytext.slice(-2)==="\\\\"?(M(0,1),this.begin("mu")):D.yytext.slice(-1)==="\\"?(M(0,1),this.begin("emu")):this.begin("mu"),D.yytext)return 15;break;case 1:return 15;case 2:return this.popState(),15;case 3:return this.begin("raw"),15;case 4:return this.popState(),this.conditionStack[this.conditionStack.length-1]==="raw"?15:(M(5,9),"END_RAW_BLOCK");case 5:return 15;case 6:return this.popState(),14;case 7:return 65;case 8:return 68;case 9:return 19;case 10:return this.popState(),this.begin("raw"),23;case 11:return 55;case 12:return 60;case 13:return 29;case 14:return 47;case 15:return this.popState(),44;case 16:return this.popState(),44;case 17:return 34;case 18:return 39;case 19:return 51;case 20:return 48;case 21:this.unput(D.yytext),this.popState(),this.begin("com");break;case 22:return this.popState(),14;case 23:return 48;case 24:return 73;case 25:return 72;case 26:return 72;case 27:return 87;case 28:break;case 29:return this.popState(),54;case 30:return this.popState(),33;case 31:return D.yytext=M(1,2).replace(/\\"/g,'"'),80;case 32:return D.yytext=M(1,2).replace(/\\'/g,"'"),80;case 33:return 85;case 34:return 82;case 35:return 82;case 36:return 83;case 37:return 84;case 38:return 81;case 39:return 75;case 40:return 77;case 41:return 72;case 42:return D.yytext=D.yytext.replace(/\\([\\\]])/g,"$1"),72;case 43:return"INVALID";case 44:return 5}},x.rules=[/^(?:[^\x00]*?(?=(\{\{)))/,/^(?:[^\x00]+)/,/^(?:[^\x00]{2,}?(?=(\{\{|\\\{\{|\\\\\{\{|$)))/,/^(?:\{\{\{\{(?=[^/]))/,/^(?:\{\{\{\{\/[^\s!"#%-,\.\/;->@\[-\^`\{-~]+(?=[=}\s\/.])\}\}\}\})/,/^(?:[^\x00]+?(?=(\{\{\{\{)))/,/^(?:[\s\S]*?--(~)?\}\})/,/^(?:\()/,/^(?:\))/,/^(?:\{\{\{\{)/,/^(?:\}\}\}\})/,/^(?:\{\{(~)?>)/,/^(?:\{\{(~)?#>)/,/^(?:\{\{(~)?#\*?)/,/^(?:\{\{(~)?\/)/,/^(?:\{\{(~)?\^\s*(~)?\}\})/,/^(?:\{\{(~)?\s*else\s*(~)?\}\})/,/^(?:\{\{(~)?\^)/,/^(?:\{\{(~)?\s*else\b)/,/^(?:\{\{(~)?\{)/,/^(?:\{\{(~)?&)/,/^(?:\{\{(~)?!--)/,/^(?:\{\{(~)?![\s\S]*?\}\})/,/^(?:\{\{(~)?\*?)/,/^(?:=)/,/^(?:\.\.)/,/^(?:\.(?=([=~}\s\/.)|])))/,/^(?:[\/.])/,/^(?:\s+)/,/^(?:\}(~)?\}\})/,/^(?:(~)?\}\})/,/^(?:"(\\["]|[^"])*")/,/^(?:'(\\[']|[^'])*')/,/^(?:@)/,/^(?:true(?=([~}\s)])))/,/^(?:false(?=([~}\s)])))/,/^(?:undefined(?=([~}\s)])))/,/^(?:null(?=([~}\s)])))/,/^(?:-?[0-9]+(?:\.[0-9]+)?(?=([~}\s)])))/,/^(?:as\s+\|)/,/^(?:\|)/,/^(?:([^\s!"#%-,\.\/;->@\[-\^`\{-~]+(?=([=~}\s\/.)|]))))/,/^(?:\[(\\\]|[^\]])*\])/,/^(?:.)/,/^(?:$)/],x.conditions={mu:{rules:[7,8,9,10,11,12,13,14,15,16,17,18,19,20,21,22,23,24,25,26,27,28,29,30,31,32,33,34,35,36,37,38,39,40,41,42,43,44],inclusive:!1},emu:{rules:[2],inclusive:!1},com:{rules:[6],inclusive:!1},raw:{rules:[3,4,5],inclusive:!1},INITIAL:{rules:[0,1,44],inclusive:!0}},x}();v.lexer=k;function P(){this.yy={}}return P.prototype=v,v.Parser=P,new P}();f.default=_,p.exports=f.default}(nu,nu.exports)),nu.exports}var ou={exports:{}},su={exports:{}},nm;function om(){return nm||(nm=1,function(p,f){f.__esModule=!0;function _(D){return D&&D.__esModule?D:{default:D}}var v=Pn(),k=_(v);function P(){this.parents=[]}P.prototype={constructor:P,mutating:!1,acceptKey:function(L,H){var M=this.accept(L[H]);if(this.mutating){if(M&&!P.prototype[M.type])throw new k.default('Unexpected node type "'+M.type+'" found when accepting '+H+" on "+L.type);L[H]=M}},acceptRequired:function(L,H){if(this.acceptKey(L,H),!L[H])throw new k.default(L.type+" requires "+H)},acceptArray:function(L){for(var H=0,M=L.length;H<M;H++)this.acceptKey(L,H),L[H]||(L.splice(H,1),H--,M--)},accept:function(L){if(L){if(!this[L.type])throw new k.default("Unknown type: "+L.type,L);this.current&&this.parents.unshift(this.current),this.current=L;var H=this[L.type](L);if(this.current=this.parents.shift(),!this.mutating||H)return H;if(H!==!1)return L}},Program:function(L){this.acceptArray(L.body)},MustacheStatement:x,Decorator:x,BlockStatement:o,DecoratorBlock:o,PartialStatement:B,PartialBlockStatement:function(L){B.call(this,L),this.acceptKey(L,"program")},ContentStatement:function(){},CommentStatement:function(){},SubExpression:x,PathExpression:function(){},StringLiteral:function(){},NumberLiteral:function(){},BooleanLiteral:function(){},UndefinedLiteral:function(){},NullLiteral:function(){},Hash:function(L){this.acceptArray(L.pairs)},HashPair:function(L){this.acceptRequired(L,"value")}};function x(D){this.acceptRequired(D,"path"),this.acceptArray(D.params),this.acceptKey(D,"hash")}function o(D){x.call(this,D),this.acceptKey(D,"program"),this.acceptKey(D,"inverse")}function B(D){this.acceptRequired(D,"name"),this.acceptArray(D.params),this.acceptKey(D,"hash")}f.default=P,p.exports=f.default}(su,su.exports)),su.exports}var sm;function qv(){return sm||(sm=1,function(p,f){f.__esModule=!0;function _(L){return L&&L.__esModule?L:{default:L}}var v=om(),k=_(v);function P(){var L=arguments.length<=0||arguments[0]===void 0?{}:arguments[0];this.options=L}P.prototype=new k.default,P.prototype.Program=function(L){var H=!this.options.ignoreStandalone,M=!this.isRootSeen;this.isRootSeen=!0;for(var C=L.body,T=0,N=C.length;T<N;T++){var G=C[T],ie=this.accept(G);if(ie){var le=x(C,T,M),Ee=o(C,T,M),te=ie.openStandalone&&le,me=ie.closeStandalone&&Ee,De=ie.inlineStandalone&&le&&Ee;ie.close&&B(C,T,!0),ie.open&&D(C,T,!0),H&&De&&(B(C,T),D(C,T)&&G.type==="PartialStatement"&&(G.indent=/([ \t]+$)/.exec(C[T-1].original)[1])),H&&te&&(B((G.program||G.inverse).body),D(C,T)),H&&me&&(B(C,T),D((G.inverse||G.program).body))}}return L},P.prototype.BlockStatement=P.prototype.DecoratorBlock=P.prototype.PartialBlockStatement=function(L){this.accept(L.program),this.accept(L.inverse);var H=L.program||L.inverse,M=L.program&&L.inverse,C=M,T=M;if(M&&M.chained)for(C=M.body[0].program;T.chained;)T=T.body[T.body.length-1].program;var N={open:L.openStrip.open,close:L.closeStrip.close,openStandalone:o(H.body),closeStandalone:x((C||H).body)};if(L.openStrip.close&&B(H.body,null,!0),M){var G=L.inverseStrip;G.open&&D(H.body,null,!0),G.close&&B(C.body,null,!0),L.closeStrip.open&&D(T.body,null,!0),!this.options.ignoreStandalone&&x(H.body)&&o(C.body)&&(D(H.body),B(C.body))}else L.closeStrip.open&&D(H.body,null,!0);return N},P.prototype.Decorator=P.prototype.MustacheStatement=function(L){return L.strip},P.prototype.PartialStatement=P.prototype.CommentStatement=function(L){var H=L.strip||{};return{inlineStandalone:!0,open:H.open,close:H.close}};function x(L,H,M){H===void 0&&(H=L.length);var C=L[H-1],T=L[H-2];if(!C)return M;if(C.type==="ContentStatement")return(T||!M?/\r?\n\s*?$/:/(^|\r?\n)\s*?$/).test(C.original)}function o(L,H,M){H===void 0&&(H=-1);var C=L[H+1],T=L[H+2];if(!C)return M;if(C.type==="ContentStatement")return(T||!M?/^\s*?\r?\n/:/^\s*?(\r?\n|$)/).test(C.original)}function B(L,H,M){var C=L[H==null?0:H+1];if(!(!C||C.type!=="ContentStatement"||!M&&C.rightStripped)){var T=C.value;C.value=C.value.replace(M?/^\s+/:/^[ \t]*\r?\n?/,""),C.rightStripped=C.value!==T}}function D(L,H,M){var C=L[H==null?L.length-1:H-1];if(!(!C||C.type!=="ContentStatement"||!M&&C.leftStripped)){var T=C.value;return C.value=C.value.replace(M?/\s+$/:/[ \t]+$/,""),C.leftStripped=C.value!==T,C.leftStripped}}f.default=P,p.exports=f.default}(ou,ou.exports)),ou.exports}var sn={},am;function Uv(){if(am)return sn;am=1,sn.__esModule=!0,sn.SourceLocation=k,sn.id=P,sn.stripFlags=x,sn.stripComment=o,sn.preparePath=B,sn.prepareMustache=D,sn.prepareRawBlock=L,sn.prepareBlock=H,sn.prepareProgram=M,sn.preparePartialBlock=C;function p(T){return T&&T.__esModule?T:{default:T}}var f=Pn(),_=p(f);function v(T,N){if(N=N.path?N.path.original:N,T.path.original!==N){var G={loc:T.path.loc};throw new _.default(T.path.original+" doesn't match "+N,G)}}function k(T,N){this.source=T,this.start={line:N.first_line,column:N.first_column},this.end={line:N.last_line,column:N.last_column}}function P(T){return/^\[.*\]$/.test(T)?T.substring(1,T.length-1):T}function x(T,N){return{open:T.charAt(2)==="~",close:N.charAt(N.length-3)==="~"}}function o(T){return T.replace(/^\{\{~?!-?-?/,"").replace(/-?-?~?\}\}$/,"")}function B(T,N,G){G=this.locInfo(G);for(var ie=T?"@":"",le=[],Ee=0,te=0,me=N.length;te<me;te++){var De=N[te].part,qe=N[te].original!==De;if(ie+=(N[te].separator||"")+De,!qe&&(De===".."||De==="."||De==="this")){if(le.length>0)throw new _.default("Invalid path: "+ie,{loc:G});De===".."&&Ee++}else le.push(De)}return{type:"PathExpression",data:T,depth:Ee,parts:le,original:ie,loc:G}}function D(T,N,G,ie,le,Ee){var te=ie.charAt(3)||ie.charAt(2),me=te!=="{"&&te!=="&",De=/\*/.test(ie);return{type:De?"Decorator":"MustacheStatement",path:T,params:N,hash:G,escaped:me,strip:le,loc:this.locInfo(Ee)}}function L(T,N,G,ie){v(T,G),ie=this.locInfo(ie);var le={type:"Program",body:N,strip:{},loc:ie};return{type:"BlockStatement",path:T.path,params:T.params,hash:T.hash,program:le,openStrip:{},inverseStrip:{},closeStrip:{},loc:ie}}function H(T,N,G,ie,le,Ee){ie&&ie.path&&v(T,ie);var te=/\*/.test(T.open);N.blockParams=T.blockParams;var me=void 0,De=void 0;if(G){if(te)throw new _.default("Unexpected inverse block on decorator",G);G.chain&&(G.program.body[0].closeStrip=ie.strip),De=G.strip,me=G.program}return le&&(le=me,me=N,N=le),{type:te?"DecoratorBlock":"BlockStatement",path:T.path,params:T.params,hash:T.hash,program:N,inverse:me,openStrip:T.strip,inverseStrip:De,closeStrip:ie&&ie.strip,loc:this.locInfo(Ee)}}function M(T,N){if(!N&&T.length){var G=T[0].loc,ie=T[T.length-1].loc;G&&ie&&(N={source:G.source,start:{line:G.start.line,column:G.start.column},end:{line:ie.end.line,column:ie.end.column}})}return{type:"Program",body:T,strip:{},loc:N}}function C(T,N,G,ie){return v(T,G),{type:"PartialBlockStatement",name:T.path,params:T.params,hash:T.hash,program:N,openStrip:T.strip,closeStrip:G&&G.strip,loc:this.locInfo(ie)}}return sn}var lm;function jv(){if(lm)return $s;lm=1,$s.__esModule=!0,$s.parseWithoutProcessing=L,$s.parse=H;function p(M){if(M&&M.__esModule)return M;var C={};if(M!=null)for(var T in M)Object.prototype.hasOwnProperty.call(M,T)&&(C[T]=M[T]);return C.default=M,C}function f(M){return M&&M.__esModule?M:{default:M}}var _=Nv(),v=f(_),k=qv(),P=f(k),x=Uv(),o=p(x),B=Gi();$s.parser=v.default;var D={};B.extend(D,o);function L(M,C){if(M.type==="Program")return M;v.default.yy=D,D.locInfo=function(N){return new D.SourceLocation(C&&C.srcName,N)};var T=v.default.parse(M);return T}function H(M,C){var T=L(M,C),N=new P.default(C);return N.accept(T)}return $s}var ea={},cm;function Hv(){if(cm)return ea;cm=1,ea.__esModule=!0,ea.Compiler=o,ea.precompile=B,ea.compile=D;function p(M){return M&&M.__esModule?M:{default:M}}var f=Pn(),_=p(f),v=Gi(),k=rm(),P=p(k),x=[].slice;function o(){}o.prototype={compiler:o,equals:function(C){var T=this.opcodes.length;if(C.opcodes.length!==T)return!1;for(var N=0;N<T;N++){var G=this.opcodes[N],ie=C.opcodes[N];if(G.opcode!==ie.opcode||!L(G.args,ie.args))return!1}T=this.children.length;for(var N=0;N<T;N++)if(!this.children[N].equals(C.children[N]))return!1;return!0},guid:0,compile:function(C,T){return this.sourceNode=[],this.opcodes=[],this.children=[],this.options=T,this.stringParams=T.stringParams,this.trackIds=T.trackIds,T.blockParams=T.blockParams||[],T.knownHelpers=v.extend(Object.create(null),{helperMissing:!0,blockHelperMissing:!0,each:!0,if:!0,unless:!0,with:!0,log:!0,lookup:!0},T.knownHelpers),this.accept(C)},compileProgram:function(C){var T=new this.compiler,N=T.compile(C,this.options),G=this.guid++;return this.usePartial=this.usePartial||N.usePartial,this.children[G]=N,this.useDepths=this.useDepths||N.useDepths,G},accept:function(C){if(!this[C.type])throw new _.default("Unknown type: "+C.type,C);this.sourceNode.unshift(C);var T=this[C.type](C);return this.sourceNode.shift(),T},Program:function(C){this.options.blockParams.unshift(C.blockParams);for(var T=C.body,N=T.length,G=0;G<N;G++)this.accept(T[G]);return this.options.blockParams.shift(),this.isSimple=N===1,this.blockParams=C.blockParams?C.blockParams.length:0,this},BlockStatement:function(C){H(C);var T=C.program,N=C.inverse;T=T&&this.compileProgram(T),N=N&&this.compileProgram(N);var G=this.classifySexpr(C);G==="helper"?this.helperSexpr(C,T,N):G==="simple"?(this.simpleSexpr(C),this.opcode("pushProgram",T),this.opcode("pushProgram",N),this.opcode("emptyHash"),this.opcode("blockValue",C.path.original)):(this.ambiguousSexpr(C,T,N),this.opcode("pushProgram",T),this.opcode("pushProgram",N),this.opcode("emptyHash"),this.opcode("ambiguousBlockValue")),this.opcode("append")},DecoratorBlock:function(C){var T=C.program&&this.compileProgram(C.program),N=this.setupFullMustacheParams(C,T,void 0),G=C.path;this.useDecorators=!0,this.opcode("registerDecorator",N.length,G.original)},PartialStatement:function(C){this.usePartial=!0;var T=C.program;T&&(T=this.compileProgram(C.program));var N=C.params;if(N.length>1)throw new _.default("Unsupported number of partial arguments: "+N.length,C);N.length||(this.options.explicitPartialContext?this.opcode("pushLiteral","undefined"):N.push({type:"PathExpression",parts:[],depth:0}));var G=C.name.original,ie=C.name.type==="SubExpression";ie&&this.accept(C.name),this.setupFullMustacheParams(C,T,void 0,!0);var le=C.indent||"";this.options.preventIndent&&le&&(this.opcode("appendContent",le),le=""),this.opcode("invokePartial",ie,G,le),this.opcode("append")},PartialBlockStatement:function(C){this.PartialStatement(C)},MustacheStatement:function(C){this.SubExpression(C),C.escaped&&!this.options.noEscape?this.opcode("appendEscaped"):this.opcode("append")},Decorator:function(C){this.DecoratorBlock(C)},ContentStatement:function(C){C.value&&this.opcode("appendContent",C.value)},CommentStatement:function(){},SubExpression:function(C){H(C);var T=this.classifySexpr(C);T==="simple"?this.simpleSexpr(C):T==="helper"?this.helperSexpr(C):this.ambiguousSexpr(C)},ambiguousSexpr:function(C,T,N){var G=C.path,ie=G.parts[0],le=T!=null||N!=null;this.opcode("getContext",G.depth),this.opcode("pushProgram",T),this.opcode("pushProgram",N),G.strict=!0,this.accept(G),this.opcode("invokeAmbiguous",ie,le)},simpleSexpr:function(C){var T=C.path;T.strict=!0,this.accept(T),this.opcode("resolvePossibleLambda")},helperSexpr:function(C,T,N){var G=this.setupFullMustacheParams(C,T,N),ie=C.path,le=ie.parts[0];if(this.options.knownHelpers[le])this.opcode("invokeKnownHelper",G.length,le);else{if(this.options.knownHelpersOnly)throw new _.default("You specified knownHelpersOnly, but used the unknown helper "+le,C);ie.strict=!0,ie.falsy=!0,this.accept(ie),this.opcode("invokeHelper",G.length,ie.original,P.default.helpers.simpleId(ie))}},PathExpression:function(C){this.addDepth(C.depth),this.opcode("getContext",C.depth);var T=C.parts[0],N=P.default.helpers.scopedId(C),G=!C.depth&&!N&&this.blockParamIndex(T);G?this.opcode("lookupBlockParam",G,C.parts):T?C.data?(this.options.data=!0,this.opcode("lookupData",C.depth,C.parts,C.strict)):this.opcode("lookupOnContext",C.parts,C.falsy,C.strict,N):this.opcode("pushContext")},StringLiteral:function(C){this.opcode("pushString",C.value)},NumberLiteral:function(C){this.opcode("pushLiteral",C.value)},BooleanLiteral:function(C){this.opcode("pushLiteral",C.value)},UndefinedLiteral:function(){this.opcode("pushLiteral","undefined")},NullLiteral:function(){this.opcode("pushLiteral","null")},Hash:function(C){var T=C.pairs,N=0,G=T.length;for(this.opcode("pushHash");N<G;N++)this.pushParam(T[N].value);for(;N--;)this.opcode("assignToHash",T[N].key);this.opcode("popHash")},opcode:function(C){this.opcodes.push({opcode:C,args:x.call(arguments,1),loc:this.sourceNode[0].loc})},addDepth:function(C){C&&(this.useDepths=!0)},classifySexpr:function(C){var T=P.default.helpers.simpleId(C.path),N=T&&!!this.blockParamIndex(C.path.parts[0]),G=!N&&P.default.helpers.helperExpression(C),ie=!N&&(G||T);if(ie&&!G){var le=C.path.parts[0],Ee=this.options;Ee.knownHelpers[le]?G=!0:Ee.knownHelpersOnly&&(ie=!1)}return G?"helper":ie?"ambiguous":"simple"},pushParams:function(C){for(var T=0,N=C.length;T<N;T++)this.pushParam(C[T])},pushParam:function(C){var T=C.value!=null?C.value:C.original||"";if(this.stringParams)T.replace&&(T=T.replace(/^(\.?\.\/)*/g,"").replace(/\//g,".")),C.depth&&this.addDepth(C.depth),this.opcode("getContext",C.depth||0),this.opcode("pushStringParam",T,C.type),C.type==="SubExpression"&&this.accept(C);else{if(this.trackIds){var N=void 0;if(C.parts&&!P.default.helpers.scopedId(C)&&!C.depth&&(N=this.blockParamIndex(C.parts[0])),N){var G=C.parts.slice(1).join(".");this.opcode("pushId","BlockParam",N,G)}else T=C.original||T,T.replace&&(T=T.replace(/^this(?:\.|$)/,"").replace(/^\.\//,"").replace(/^\.$/,"")),this.opcode("pushId",C.type,T)}this.accept(C)}},setupFullMustacheParams:function(C,T,N,G){var ie=C.params;return this.pushParams(ie),this.opcode("pushProgram",T),this.opcode("pushProgram",N),C.hash?this.accept(C.hash):this.opcode("emptyHash",G),ie},blockParamIndex:function(C){for(var T=0,N=this.options.blockParams.length;T<N;T++){var G=this.options.blockParams[T],ie=G&&v.indexOf(G,C);if(G&&ie>=0)return[T,ie]}}};function B(M,C,T){if(M==null||typeof M!="string"&&M.type!=="Program")throw new _.default("You must pass a string or Handlebars AST to Handlebars.precompile. You passed "+M);C=C||{},"data"in C||(C.data=!0),C.compat&&(C.useDepths=!0);var N=T.parse(M,C),G=new T.Compiler().compile(N,C);return new T.JavaScriptCompiler().compile(G,C)}function D(M,C,T){if(C===void 0&&(C={}),M==null||typeof M!="string"&&M.type!=="Program")throw new _.default("You must pass a string or Handlebars AST to Handlebars.compile. You passed "+M);C=v.extend({},C),"data"in C||(C.data=!0),C.compat&&(C.useDepths=!0);var N=void 0;function G(){var le=T.parse(M,C),Ee=new T.Compiler().compile(le,C),te=new T.JavaScriptCompiler().compile(Ee,C,void 0,!0);return T.template(te)}function ie(le,Ee){return N||(N=G()),N.call(this,le,Ee)}return ie._setup=function(le){return N||(N=G()),N._setup(le)},ie._child=function(le,Ee,te,me){return N||(N=G()),N._child(le,Ee,te,me)},ie}function L(M,C){if(M===C)return!0;if(v.isArray(M)&&v.isArray(C)&&M.length===C.length){for(var T=0;T<M.length;T++)if(!L(M[T],C[T]))return!1;return!0}}function H(M){if(!M.path.parts){var C=M.path;M.path={type:"PathExpression",data:!1,depth:0,parts:[C.original+""],original:C.original+"",loc:C.loc}}}return ea}var au={exports:{}},lu={exports:{}},fl={},Zh={},cu={},uu={},um;function Wv(){if(um)return uu;um=1;var p="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/".split("");return uu.encode=function(f){if(0<=f&&f<p.length)return p[f];throw new TypeError("Must be between 0 and 63: "+f)},uu.decode=function(f){var _=65,v=90,k=97,P=122,x=48,o=57,B=43,D=47,L=26,H=52;return _<=f&&f<=v?f-_:k<=f&&f<=P?f-k+L:x<=f&&f<=o?f-x+H:f==B?62:f==D?63:-1},uu}var hm;function pm(){if(hm)return cu;hm=1;var p=Wv(),f=5,_=1<<f,v=_-1,k=_;function P(o){return o<0?(-o<<1)+1:(o<<1)+0}function x(o){var B=(o&1)===1,D=o>>1;return B?-D:D}return cu.encode=function(B){var D="",L,H=P(B);do L=H&v,H>>>=f,H>0&&(L|=k),D+=p.encode(L);while(H>0);return D},cu.decode=function(B,D,L){var H=B.length,M=0,C=0,T,N;do{if(D>=H)throw new Error("Expected more digits in base 64 VLQ value.");if(N=p.decode(B.charCodeAt(D++)),N===-1)throw new Error("Invalid base64 digit: "+B.charAt(D-1));T=!!(N&k),N&=v,M=M+(N<<C),C+=f}while(T);L.value=x(M),L.rest=D},cu}var Kh={},dm;function ml(){return dm||(dm=1,function(p){function f(te,me,De){if(me in te)return te[me];if(arguments.length===3)return De;throw new Error('"'+me+'" is a required argument.')}p.getArg=f;var _=/^(?:([\w+\-.]+):)?\/\/(?:(\w+:\w+)@)?([\w.-]*)(?::(\d+))?(.*)$/,v=/^data:.+\,.+$/;function k(te){var me=te.match(_);return me?{scheme:me[1],auth:me[2],host:me[3],port:me[4],path:me[5]}:null}p.urlParse=k;function P(te){var me="";return te.scheme&&(me+=te.scheme+":"),me+="//",te.auth&&(me+=te.auth+"@"),te.host&&(me+=te.host),te.port&&(me+=":"+te.port),te.path&&(me+=te.path),me}p.urlGenerate=P;function x(te){var me=te,De=k(te);if(De){if(!De.path)return te;me=De.path}for(var qe=p.isAbsolute(me),rt=me.split(/\/+/),At,_t=0,lt=rt.length-1;lt>=0;lt--)At=rt[lt],At==="."?rt.splice(lt,1):At===".."?_t++:_t>0&&(At===""?(rt.splice(lt+1,_t),_t=0):(rt.splice(lt,2),_t--));return me=rt.join("/"),me===""&&(me=qe?"/":"."),De?(De.path=me,P(De)):me}p.normalize=x;function o(te,me){te===""&&(te="."),me===""&&(me=".");var De=k(me),qe=k(te);if(qe&&(te=qe.path||"/"),De&&!De.scheme)return qe&&(De.scheme=qe.scheme),P(De);if(De||me.match(v))return me;if(qe&&!qe.host&&!qe.path)return qe.host=me,P(qe);var rt=me.charAt(0)==="/"?me:x(te.replace(/\/+$/,"")+"/"+me);return qe?(qe.path=rt,P(qe)):rt}p.join=o,p.isAbsolute=function(te){return te.charAt(0)==="/"||_.test(te)};function B(te,me){te===""&&(te="."),te=te.replace(/\/$/,"");for(var De=0;me.indexOf(te+"/")!==0;){var qe=te.lastIndexOf("/");if(qe<0||(te=te.slice(0,qe),te.match(/^([^\/]+:\/)?\/*$/)))return me;++De}return Array(De+1).join("../")+me.substr(te.length+1)}p.relative=B;var D=function(){var te=Object.create(null);return!("__proto__"in te)}();function L(te){return te}function H(te){return C(te)?"$"+te:te}p.toSetString=D?L:H;function M(te){return C(te)?te.slice(1):te}p.fromSetString=D?L:M;function C(te){if(!te)return!1;var me=te.length;if(me<9||te.charCodeAt(me-1)!==95||te.charCodeAt(me-2)!==95||te.charCodeAt(me-3)!==111||te.charCodeAt(me-4)!==116||te.charCodeAt(me-5)!==111||te.charCodeAt(me-6)!==114||te.charCodeAt(me-7)!==112||te.charCodeAt(me-8)!==95||te.charCodeAt(me-9)!==95)return!1;for(var De=me-10;De>=0;De--)if(te.charCodeAt(De)!==36)return!1;return!0}function T(te,me,De){var qe=G(te.source,me.source);return qe!==0||(qe=te.originalLine-me.originalLine,qe!==0)||(qe=te.originalColumn-me.originalColumn,qe!==0||De)||(qe=te.generatedColumn-me.generatedColumn,qe!==0)||(qe=te.generatedLine-me.generatedLine,qe!==0)?qe:G(te.name,me.name)}p.compareByOriginalPositions=T;function N(te,me,De){var qe=te.generatedLine-me.generatedLine;return qe!==0||(qe=te.generatedColumn-me.generatedColumn,qe!==0||De)||(qe=G(te.source,me.source),qe!==0)||(qe=te.originalLine-me.originalLine,qe!==0)||(qe=te.originalColumn-me.originalColumn,qe!==0)?qe:G(te.name,me.name)}p.compareByGeneratedPositionsDeflated=N;function G(te,me){return te===me?0:te===null?1:me===null?-1:te>me?1:-1}function ie(te,me){var De=te.generatedLine-me.generatedLine;return De!==0||(De=te.generatedColumn-me.generatedColumn,De!==0)||(De=G(te.source,me.source),De!==0)||(De=te.originalLine-me.originalLine,De!==0)||(De=te.originalColumn-me.originalColumn,De!==0)?De:G(te.name,me.name)}p.compareByGeneratedPositionsInflated=ie;function le(te){return JSON.parse(te.replace(/^\)]}'[^\n]*\n/,""))}p.parseSourceMapInput=le;function Ee(te,me,De){if(me=me||"",te&&(te[te.length-1]!=="/"&&me[0]!=="/"&&(te+="/"),me=te+me),De){var qe=k(De);if(!qe)throw new Error("sourceMapURL could not be parsed");if(qe.path){var rt=qe.path.lastIndexOf("/");rt>=0&&(qe.path=qe.path.substring(0,rt+1))}me=o(P(qe),me)}return x(me)}p.computeSourceURL=Ee}(Kh)),Kh}var Gh={},fm;function mm(){if(fm)return Gh;fm=1;var p=ml(),f=Object.prototype.hasOwnProperty,_=typeof Map<"u";function v(){this._array=[],this._set=_?new Map:Object.create(null)}return v.fromArray=function(P,x){for(var o=new v,B=0,D=P.length;B<D;B++)o.add(P[B],x);return o},v.prototype.size=function(){return _?this._set.size:Object.getOwnPropertyNames(this._set).length},v.prototype.add=function(P,x){var o=_?P:p.toSetString(P),B=_?this.has(P):f.call(this._set,o),D=this._array.length;(!B||x)&&this._array.push(P),B||(_?this._set.set(P,D):this._set[o]=D)},v.prototype.has=function(P){if(_)return this._set.has(P);var x=p.toSetString(P);return f.call(this._set,x)},v.prototype.indexOf=function(P){if(_){var x=this._set.get(P);if(x>=0)return x}else{var o=p.toSetString(P);if(f.call(this._set,o))return this._set[o]}throw new Error('"'+P+'" is not in the set.')},v.prototype.at=function(P){if(P>=0&&P<this._array.length)return this._array[P];throw new Error("No element indexed by "+P)},v.prototype.toArray=function(){return this._array.slice()},Gh.ArraySet=v,Gh}var Jh={},gm;function Zv(){if(gm)return Jh;gm=1;var p=ml();function f(v,k){var P=v.generatedLine,x=k.generatedLine,o=v.generatedColumn,B=k.generatedColumn;return x>P||x==P&&B>=o||p.compareByGeneratedPositionsInflated(v,k)<=0}function _(){this._array=[],this._sorted=!0,this._last={generatedLine:-1,generatedColumn:0}}return _.prototype.unsortedForEach=function(k,P){this._array.forEach(k,P)},_.prototype.add=function(k){f(this._last,k)?(this._last=k,this._array.push(k)):(this._sorted=!1,this._array.push(k))},_.prototype.toArray=function(){return this._sorted||(this._array.sort(p.compareByGeneratedPositionsInflated),this._sorted=!0),this._array},Jh.MappingList=_,Jh}var ym;function _m(){if(ym)return Zh;ym=1;var p=pm(),f=ml(),_=mm().ArraySet,v=Zv().MappingList;function k(P){P||(P={}),this._file=f.getArg(P,"file",null),this._sourceRoot=f.getArg(P,"sourceRoot",null),this._skipValidation=f.getArg(P,"skipValidation",!1),this._sources=new _,this._names=new _,this._mappings=new v,this._sourcesContents=null}return k.prototype._version=3,k.fromSourceMap=function(x){var o=x.sourceRoot,B=new k({file:x.file,sourceRoot:o});return x.eachMapping(function(D){var L={generated:{line:D.generatedLine,column:D.generatedColumn}};D.source!=null&&(L.source=D.source,o!=null&&(L.source=f.relative(o,L.source)),L.original={line:D.originalLine,column:D.originalColumn},D.name!=null&&(L.name=D.name)),B.addMapping(L)}),x.sources.forEach(function(D){var L=D;o!==null&&(L=f.relative(o,D)),B._sources.has(L)||B._sources.add(L);var H=x.sourceContentFor(D);H!=null&&B.setSourceContent(D,H)}),B},k.prototype.addMapping=function(x){var o=f.getArg(x,"generated"),B=f.getArg(x,"original",null),D=f.getArg(x,"source",null),L=f.getArg(x,"name",null);this._skipValidation||this._validateMapping(o,B,D,L),D!=null&&(D=String(D),this._sources.has(D)||this._sources.add(D)),L!=null&&(L=String(L),this._names.has(L)||this._names.add(L)),this._mappings.add({generatedLine:o.line,generatedColumn:o.column,originalLine:B!=null&&B.line,originalColumn:B!=null&&B.column,source:D,name:L})},k.prototype.setSourceContent=function(x,o){var B=x;this._sourceRoot!=null&&(B=f.relative(this._sourceRoot,B)),o!=null?(this._sourcesContents||(this._sourcesContents=Object.create(null)),this._sourcesContents[f.toSetString(B)]=o):this._sourcesContents&&(delete this._sourcesContents[f.toSetString(B)],Object.keys(this._sourcesContents).length===0&&(this._sourcesContents=null))},k.prototype.applySourceMap=function(x,o,B){var D=o;if(o==null){if(x.file==null)throw new Error(`SourceMapGenerator.prototype.applySourceMap requires either an explicit source file, or the source map's "file" property. Both were omitted.`);D=x.file}var L=this._sourceRoot;L!=null&&(D=f.relative(L,D));var H=new _,M=new _;this._mappings.unsortedForEach(function(C){if(C.source===D&&C.originalLine!=null){var T=x.originalPositionFor({line:C.originalLine,column:C.originalColumn});T.source!=null&&(C.source=T.source,B!=null&&(C.source=f.join(B,C.source)),L!=null&&(C.source=f.relative(L,C.source)),C.originalLine=T.line,C.originalColumn=T.column,T.name!=null&&(C.name=T.name))}var N=C.source;N!=null&&!H.has(N)&&H.add(N);var G=C.name;G!=null&&!M.has(G)&&M.add(G)},this),this._sources=H,this._names=M,x.sources.forEach(function(C){var T=x.sourceContentFor(C);T!=null&&(B!=null&&(C=f.join(B,C)),L!=null&&(C=f.relative(L,C)),this.setSourceContent(C,T))},this)},k.prototype._validateMapping=function(x,o,B,D){if(o&&typeof o.line!="number"&&typeof o.column!="number")throw new Error("original.line and original.column are not numbers -- you probably meant to omit the original mapping entirely and only map the generated position. If so, pass null for the original mapping instead of an object with empty or null values.");if(!(x&&"line"in x&&"column"in x&&x.line>0&&x.column>=0&&!o&&!B&&!D)){if(x&&"line"in x&&"column"in x&&o&&"line"in o&&"column"in o&&x.line>0&&x.column>=0&&o.line>0&&o.column>=0&&B)return;throw new Error("Invalid mapping: "+JSON.stringify({generated:x,source:B,original:o,name:D}))}},k.prototype._serializeMappings=function(){for(var x=0,o=1,B=0,D=0,L=0,H=0,M="",C,T,N,G,ie=this._mappings.toArray(),le=0,Ee=ie.length;le<Ee;le++){if(T=ie[le],C="",T.generatedLine!==o)for(x=0;T.generatedLine!==o;)C+=";",o++;else if(le>0){if(!f.compareByGeneratedPositionsInflated(T,ie[le-1]))continue;C+=","}C+=p.encode(T.generatedColumn-x),x=T.generatedColumn,T.source!=null&&(G=this._sources.indexOf(T.source),C+=p.encode(G-H),H=G,C+=p.encode(T.originalLine-1-D),D=T.originalLine-1,C+=p.encode(T.originalColumn-B),B=T.originalColumn,T.name!=null&&(N=this._names.indexOf(T.name),C+=p.encode(N-L),L=N)),M+=C}return M},k.prototype._generateSourcesContent=function(x,o){return x.map(function(B){if(!this._sourcesContents)return null;o!=null&&(B=f.relative(o,B));var D=f.toSetString(B);return Object.prototype.hasOwnProperty.call(this._sourcesContents,D)?this._sourcesContents[D]:null},this)},k.prototype.toJSON=function(){var x={version:this._version,sources:this._sources.toArray(),names:this._names.toArray(),mappings:this._serializeMappings()};return this._file!=null&&(x.file=this._file),this._sourceRoot!=null&&(x.sourceRoot=this._sourceRoot),this._sourcesContents&&(x.sourcesContent=this._generateSourcesContent(x.sources,x.sourceRoot)),x},k.prototype.toString=function(){return JSON.stringify(this.toJSON())},Zh.SourceMapGenerator=k,Zh}var gl={},Xh={},xm;function Kv(){return xm||(xm=1,function(p){p.GREATEST_LOWER_BOUND=1,p.LEAST_UPPER_BOUND=2;function f(_,v,k,P,x,o){var B=Math.floor((v-_)/2)+_,D=x(k,P[B],!0);return D===0?B:D>0?v-B>1?f(B,v,k,P,x,o):o==p.LEAST_UPPER_BOUND?v<P.length?v:-1:B:B-_>1?f(_,B,k,P,x,o):o==p.LEAST_UPPER_BOUND?B:_<0?-1:_}p.search=function(v,k,P,x){if(k.length===0)return-1;var o=f(-1,k.length,v,k,P,x||p.GREATEST_LOWER_BOUND);if(o<0)return-1;for(;o-1>=0&&P(k[o],k[o-1],!0)===0;)--o;return o}}(Xh)),Xh}var Qh={},bm;function Gv(){if(bm)return Qh;bm=1;function p(v,k,P){var x=v[k];v[k]=v[P],v[P]=x}function f(v,k){return Math.round(v+Math.random()*(k-v))}function _(v,k,P,x){if(P<x){var o=f(P,x),B=P-1;p(v,o,x);for(var D=v[x],L=P;L<x;L++)k(v[L],D)<=0&&(B+=1,p(v,B,L));p(v,B+1,L);var H=B+1;_(v,k,P,H-1),_(v,k,H+1,x)}}return Qh.quickSort=function(v,k){_(v,k,0,v.length-1)},Qh}var vm;function Jv(){if(vm)return gl;vm=1;var p=ml(),f=Kv(),_=mm().ArraySet,v=pm(),k=Gv().quickSort;function P(D,L){var H=D;return typeof D=="string"&&(H=p.parseSourceMapInput(D)),H.sections!=null?new B(H,L):new x(H,L)}P.fromSourceMap=function(D,L){return x.fromSourceMap(D,L)},P.prototype._version=3,P.prototype.__generatedMappings=null,Object.defineProperty(P.prototype,"_generatedMappings",{configurable:!0,enumerable:!0,get:function(){return this.__generatedMappings||this._parseMappings(this._mappings,this.sourceRoot),this.__generatedMappings}}),P.prototype.__originalMappings=null,Object.defineProperty(P.prototype,"_originalMappings",{configurable:!0,enumerable:!0,get:function(){return this.__originalMappings||this._parseMappings(this._mappings,this.sourceRoot),this.__originalMappings}}),P.prototype._charIsMappingSeparator=function(L,H){var M=L.charAt(H);return M===";"||M===","},P.prototype._parseMappings=function(L,H){throw new Error("Subclasses must implement _parseMappings")},P.GENERATED_ORDER=1,P.ORIGINAL_ORDER=2,P.GREATEST_LOWER_BOUND=1,P.LEAST_UPPER_BOUND=2,P.prototype.eachMapping=function(L,H,M){var C=H||null,T=M||P.GENERATED_ORDER,N;switch(T){case P.GENERATED_ORDER:N=this._generatedMappings;break;case P.ORIGINAL_ORDER:N=this._originalMappings;break;default:throw new Error("Unknown order of iteration.")}var G=this.sourceRoot;N.map(function(ie){var le=ie.source===null?null:this._sources.at(ie.source);return le=p.computeSourceURL(G,le,this._sourceMapURL),{source:le,generatedLine:ie.generatedLine,generatedColumn:ie.generatedColumn,originalLine:ie.originalLine,originalColumn:ie.originalColumn,name:ie.name===null?null:this._names.at(ie.name)}},this).forEach(L,C)},P.prototype.allGeneratedPositionsFor=function(L){var H=p.getArg(L,"line"),M={source:p.getArg(L,"source"),originalLine:H,originalColumn:p.getArg(L,"column",0)};if(M.source=this._findSourceIndex(M.source),M.source<0)return[];var C=[],T=this._findMapping(M,this._originalMappings,"originalLine","originalColumn",p.compareByOriginalPositions,f.LEAST_UPPER_BOUND);if(T>=0){var N=this._originalMappings[T];if(L.column===void 0)for(var G=N.originalLine;N&&N.originalLine===G;)C.push({line:p.getArg(N,"generatedLine",null),column:p.getArg(N,"generatedColumn",null),lastColumn:p.getArg(N,"lastGeneratedColumn",null)}),N=this._originalMappings[++T];else for(var ie=N.originalColumn;N&&N.originalLine===H&&N.originalColumn==ie;)C.push({line:p.getArg(N,"generatedLine",null),column:p.getArg(N,"generatedColumn",null),lastColumn:p.getArg(N,"lastGeneratedColumn",null)}),N=this._originalMappings[++T]}return C},gl.SourceMapConsumer=P;function x(D,L){var H=D;typeof D=="string"&&(H=p.parseSourceMapInput(D));var M=p.getArg(H,"version"),C=p.getArg(H,"sources"),T=p.getArg(H,"names",[]),N=p.getArg(H,"sourceRoot",null),G=p.getArg(H,"sourcesContent",null),ie=p.getArg(H,"mappings"),le=p.getArg(H,"file",null);if(M!=this._version)throw new Error("Unsupported version: "+M);N&&(N=p.normalize(N)),C=C.map(String).map(p.normalize).map(function(Ee){return N&&p.isAbsolute(N)&&p.isAbsolute(Ee)?p.relative(N,Ee):Ee}),this._names=_.fromArray(T.map(String),!0),this._sources=_.fromArray(C,!0),this._absoluteSources=this._sources.toArray().map(function(Ee){return p.computeSourceURL(N,Ee,L)}),this.sourceRoot=N,this.sourcesContent=G,this._mappings=ie,this._sourceMapURL=L,this.file=le}x.prototype=Object.create(P.prototype),x.prototype.consumer=P,x.prototype._findSourceIndex=function(D){var L=D;if(this.sourceRoot!=null&&(L=p.relative(this.sourceRoot,L)),this._sources.has(L))return this._sources.indexOf(L);var H;for(H=0;H<this._absoluteSources.length;++H)if(this._absoluteSources[H]==D)return H;return-1},x.fromSourceMap=function(L,H){var M=Object.create(x.prototype),C=M._names=_.fromArray(L._names.toArray(),!0),T=M._sources=_.fromArray(L._sources.toArray(),!0);M.sourceRoot=L._sourceRoot,M.sourcesContent=L._generateSourcesContent(M._sources.toArray(),M.sourceRoot),M.file=L._file,M._sourceMapURL=H,M._absoluteSources=M._sources.toArray().map(function(De){return p.computeSourceURL(M.sourceRoot,De,H)});for(var N=L._mappings.toArray().slice(),G=M.__generatedMappings=[],ie=M.__originalMappings=[],le=0,Ee=N.length;le<Ee;le++){var te=N[le],me=new o;me.generatedLine=te.generatedLine,me.generatedColumn=te.generatedColumn,te.source&&(me.source=T.indexOf(te.source),me.originalLine=te.originalLine,me.originalColumn=te.originalColumn,te.name&&(me.name=C.indexOf(te.name)),ie.push(me)),G.push(me)}return k(M.__originalMappings,p.compareByOriginalPositions),M},x.prototype._version=3,Object.defineProperty(x.prototype,"sources",{get:function(){return this._absoluteSources.slice()}});function o(){this.generatedLine=0,this.generatedColumn=0,this.source=null,this.originalLine=null,this.originalColumn=null,this.name=null}x.prototype._parseMappings=function(L,H){for(var M=1,C=0,T=0,N=0,G=0,ie=0,le=L.length,Ee=0,te={},me={},De=[],qe=[],rt,At,_t,lt,xt;Ee<le;)if(L.charAt(Ee)===";")M++,Ee++,C=0;else if(L.charAt(Ee)===",")Ee++;else{for(rt=new o,rt.generatedLine=M,lt=Ee;lt<le&&!this._charIsMappingSeparator(L,lt);lt++);if(At=L.slice(Ee,lt),_t=te[At],_t)Ee+=At.length;else{for(_t=[];Ee<lt;)v.decode(L,Ee,me),xt=me.value,Ee=me.rest,_t.push(xt);if(_t.length===2)throw new Error("Found a source, but no line and column");if(_t.length===3)throw new Error("Found a source and line, but no column");te[At]=_t}rt.generatedColumn=C+_t[0],C=rt.generatedColumn,_t.length>1&&(rt.source=G+_t[1],G+=_t[1],rt.originalLine=T+_t[2],T=rt.originalLine,rt.originalLine+=1,rt.originalColumn=N+_t[3],N=rt.originalColumn,_t.length>4&&(rt.name=ie+_t[4],ie+=_t[4])),qe.push(rt),typeof rt.originalLine=="number"&&De.push(rt)}k(qe,p.compareByGeneratedPositionsDeflated),this.__generatedMappings=qe,k(De,p.compareByOriginalPositions),this.__originalMappings=De},x.prototype._findMapping=function(L,H,M,C,T,N){if(L[M]<=0)throw new TypeError("Line must be greater than or equal to 1, got "+L[M]);if(L[C]<0)throw new TypeError("Column must be greater than or equal to 0, got "+L[C]);return f.search(L,H,T,N)},x.prototype.computeColumnSpans=function(){for(var L=0;L<this._generatedMappings.length;++L){var H=this._generatedMappings[L];if(L+1<this._generatedMappings.length){var M=this._generatedMappings[L+1];if(H.generatedLine===M.generatedLine){H.lastGeneratedColumn=M.generatedColumn-1;continue}}H.lastGeneratedColumn=1/0}},x.prototype.originalPositionFor=function(L){var H={generatedLine:p.getArg(L,"line"),generatedColumn:p.getArg(L,"column")},M=this._findMapping(H,this._generatedMappings,"generatedLine","generatedColumn",p.compareByGeneratedPositionsDeflated,p.getArg(L,"bias",P.GREATEST_LOWER_BOUND));if(M>=0){var C=this._generatedMappings[M];if(C.generatedLine===H.generatedLine){var T=p.getArg(C,"source",null);T!==null&&(T=this._sources.at(T),T=p.computeSourceURL(this.sourceRoot,T,this._sourceMapURL));var N=p.getArg(C,"name",null);return N!==null&&(N=this._names.at(N)),{source:T,line:p.getArg(C,"originalLine",null),column:p.getArg(C,"originalColumn",null),name:N}}}return{source:null,line:null,column:null,name:null}},x.prototype.hasContentsOfAllSources=function(){return this.sourcesContent?this.sourcesContent.length>=this._sources.size()&&!this.sourcesContent.some(function(L){return L==null}):!1},x.prototype.sourceContentFor=function(L,H){if(!this.sourcesContent)return null;var M=this._findSourceIndex(L);if(M>=0)return this.sourcesContent[M];var C=L;this.sourceRoot!=null&&(C=p.relative(this.sourceRoot,C));var T;if(this.sourceRoot!=null&&(T=p.urlParse(this.sourceRoot))){var N=C.replace(/^file:\/\//,"");if(T.scheme=="file"&&this._sources.has(N))return this.sourcesContent[this._sources.indexOf(N)];if((!T.path||T.path=="/")&&this._sources.has("/"+C))return this.sourcesContent[this._sources.indexOf("/"+C)]}if(H)return null;throw new Error('"'+C+'" is not in the SourceMap.')},x.prototype.generatedPositionFor=function(L){var H=p.getArg(L,"source");if(H=this._findSourceIndex(H),H<0)return{line:null,column:null,lastColumn:null};var M={source:H,originalLine:p.getArg(L,"line"),originalColumn:p.getArg(L,"column")},C=this._findMapping(M,this._originalMappings,"originalLine","originalColumn",p.compareByOriginalPositions,p.getArg(L,"bias",P.GREATEST_LOWER_BOUND));if(C>=0){var T=this._originalMappings[C];if(T.source===M.source)return{line:p.getArg(T,"generatedLine",null),column:p.getArg(T,"generatedColumn",null),lastColumn:p.getArg(T,"lastGeneratedColumn",null)}}return{line:null,column:null,lastColumn:null}},gl.BasicSourceMapConsumer=x;function B(D,L){var H=D;typeof D=="string"&&(H=p.parseSourceMapInput(D));var M=p.getArg(H,"version"),C=p.getArg(H,"sections");if(M!=this._version)throw new Error("Unsupported version: "+M);this._sources=new _,this._names=new _;var T={line:-1,column:0};this._sections=C.map(function(N){if(N.url)throw new Error("Support for url field in sections not implemented.");var G=p.getArg(N,"offset"),ie=p.getArg(G,"line"),le=p.getArg(G,"column");if(ie<T.line||ie===T.line&&le<T.column)throw new Error("Section offsets must be ordered and non-overlapping.");return T=G,{generatedOffset:{generatedLine:ie+1,generatedColumn:le+1},consumer:new P(p.getArg(N,"map"),L)}})}return B.prototype=Object.create(P.prototype),B.prototype.constructor=P,B.prototype._version=3,Object.defineProperty(B.prototype,"sources",{get:function(){for(var D=[],L=0;L<this._sections.length;L++)for(var H=0;H<this._sections[L].consumer.sources.length;H++)D.push(this._sections[L].consumer.sources[H]);return D}}),B.prototype.originalPositionFor=function(L){var H={generatedLine:p.getArg(L,"line"),generatedColumn:p.getArg(L,"column")},M=f.search(H,this._sections,function(T,N){var G=T.generatedLine-N.generatedOffset.generatedLine;return G||T.generatedColumn-N.generatedOffset.generatedColumn}),C=this._sections[M];return C?C.consumer.originalPositionFor({line:H.generatedLine-(C.generatedOffset.generatedLine-1),column:H.generatedColumn-(C.generatedOffset.generatedLine===H.generatedLine?C.generatedOffset.generatedColumn-1:0),bias:L.bias}):{source:null,line:null,column:null,name:null}},B.prototype.hasContentsOfAllSources=function(){return this._sections.every(function(L){return L.consumer.hasContentsOfAllSources()})},B.prototype.sourceContentFor=function(L,H){for(var M=0;M<this._sections.length;M++){var C=this._sections[M],T=C.consumer.sourceContentFor(L,!0);if(T)return T}if(H)return null;throw new Error('"'+L+'" is not in the SourceMap.')},B.prototype.generatedPositionFor=function(L){for(var H=0;H<this._sections.length;H++){var M=this._sections[H];if(M.consumer._findSourceIndex(p.getArg(L,"source"))!==-1){var C=M.consumer.generatedPositionFor(L);if(C){var T={line:C.line+(M.generatedOffset.generatedLine-1),column:C.column+(M.generatedOffset.generatedLine===C.line?M.generatedOffset.generatedColumn-1:0)};return T}}}return{line:null,column:null}},B.prototype._parseMappings=function(L,H){this.__generatedMappings=[],this.__originalMappings=[];for(var M=0;M<this._sections.length;M++)for(var C=this._sections[M],T=C.consumer._generatedMappings,N=0;N<T.length;N++){var G=T[N],ie=C.consumer._sources.at(G.source);ie=p.computeSourceURL(C.consumer.sourceRoot,ie,this._sourceMapURL),this._sources.add(ie),ie=this._sources.indexOf(ie);var le=null;G.name&&(le=C.consumer._names.at(G.name),this._names.add(le),le=this._names.indexOf(le));var Ee={source:ie,generatedLine:G.generatedLine+(C.generatedOffset.generatedLine-1),generatedColumn:G.generatedColumn+(C.generatedOffset.generatedLine===G.generatedLine?C.generatedOffset.generatedColumn-1:0),originalLine:G.originalLine,originalColumn:G.originalColumn,name:le};this.__generatedMappings.push(Ee),typeof Ee.originalLine=="number"&&this.__originalMappings.push(Ee)}k(this.__generatedMappings,p.compareByGeneratedPositionsDeflated),k(this.__originalMappings,p.compareByOriginalPositions)},gl.IndexedSourceMapConsumer=B,gl}var Yh={},wm;function Xv(){if(wm)return Yh;wm=1;var p=_m().SourceMapGenerator,f=ml(),_=/(\r?\n)/,v=10,k="$$$isSourceNode$$$";function P(x,o,B,D,L){this.children=[],this.sourceContents={},this.line=x??null,this.column=o??null,this.source=B??null,this.name=L??null,this[k]=!0,D!=null&&this.add(D)}return P.fromStringWithSourceMap=function(o,B,D){var L=new P,H=o.split(_),M=0,C=function(){var le=te(),Ee=te()||"";return le+Ee;function te(){return M<H.length?H[M++]:void 0}},T=1,N=0,G=null;return B.eachMapping(function(le){if(G!==null)if(T<le.generatedLine)ie(G,C()),T++,N=0;else{var Ee=H[M]||"",te=Ee.substr(0,le.generatedColumn-N);H[M]=Ee.substr(le.generatedColumn-N),N=le.generatedColumn,ie(G,te),G=le;return}for(;T<le.generatedLine;)L.add(C()),T++;if(N<le.generatedColumn){var Ee=H[M]||"";L.add(Ee.substr(0,le.generatedColumn)),H[M]=Ee.substr(le.generatedColumn),N=le.generatedColumn}G=le},this),M<H.length&&(G&&ie(G,C()),L.add(H.splice(M).join(""))),B.sources.forEach(function(le){var Ee=B.sourceContentFor(le);Ee!=null&&(D!=null&&(le=f.join(D,le)),L.setSourceContent(le,Ee))}),L;function ie(le,Ee){if(le===null||le.source===void 0)L.add(Ee);else{var te=D?f.join(D,le.source):le.source;L.add(new P(le.originalLine,le.originalColumn,te,Ee,le.name))}}},P.prototype.add=function(o){if(Array.isArray(o))o.forEach(function(B){this.add(B)},this);else if(o[k]||typeof o=="string")o&&this.children.push(o);else throw new TypeError("Expected a SourceNode, string, or an array of SourceNodes and strings. Got "+o);return this},P.prototype.prepend=function(o){if(Array.isArray(o))for(var B=o.length-1;B>=0;B--)this.prepend(o[B]);else if(o[k]||typeof o=="string")this.children.unshift(o);else throw new TypeError("Expected a SourceNode, string, or an array of SourceNodes and strings. Got "+o);return this},P.prototype.walk=function(o){for(var B,D=0,L=this.children.length;D<L;D++)B=this.children[D],B[k]?B.walk(o):B!==""&&o(B,{source:this.source,line:this.line,column:this.column,name:this.name})},P.prototype.join=function(o){var B,D,L=this.children.length;if(L>0){for(B=[],D=0;D<L-1;D++)B.push(this.children[D]),B.push(o);B.push(this.children[D]),this.children=B}return this},P.prototype.replaceRight=function(o,B){var D=this.children[this.children.length-1];return D[k]?D.replaceRight(o,B):typeof D=="string"?this.children[this.children.length-1]=D.replace(o,B):this.children.push("".replace(o,B)),this},P.prototype.setSourceContent=function(o,B){this.sourceContents[f.toSetString(o)]=B},P.prototype.walkSourceContents=function(o){for(var B=0,D=this.children.length;B<D;B++)this.children[B][k]&&this.children[B].walkSourceContents(o);for(var L=Object.keys(this.sourceContents),B=0,D=L.length;B<D;B++)o(f.fromSetString(L[B]),this.sourceContents[L[B]])},P.prototype.toString=function(){var o="";return this.walk(function(B){o+=B}),o},P.prototype.toStringWithSourceMap=function(o){var B={code:"",line:1,column:0},D=new p(o),L=!1,H=null,M=null,C=null,T=null;return this.walk(function(N,G){B.code+=N,G.source!==null&&G.line!==null&&G.column!==null?((H!==G.source||M!==G.line||C!==G.column||T!==G.name)&&D.addMapping({source:G.source,original:{line:G.line,column:G.column},generated:{line:B.line,column:B.column},name:G.name}),H=G.source,M=G.line,C=G.column,T=G.name,L=!0):L&&(D.addMapping({generated:{line:B.line,column:B.column}}),H=null,L=!1);for(var ie=0,le=N.length;ie<le;ie++)N.charCodeAt(ie)===v?(B.line++,B.column=0,ie+1===le?(H=null,L=!1):L&&D.addMapping({source:G.source,original:{line:G.line,column:G.column},generated:{line:B.line,column:B.column},name:G.name})):B.column++}),this.walkSourceContents(function(N,G){D.setSourceContent(N,G)}),{code:B.code,map:D}},Yh.SourceNode=P,Yh}var Sm;function Qv(){return Sm||(Sm=1,fl.SourceMapGenerator=_m().SourceMapGenerator,fl.SourceMapConsumer=Jv().SourceMapConsumer,fl.SourceNode=Xv().SourceNode),fl}var Am;function Yv(){return Am||(Am=1,function(p,f){f.__esModule=!0;var _=Gi(),v=void 0;try{var k=Qv();v=k.SourceNode}catch{}v||(v=function(o,B,D,L){this.src="",L&&this.add(L)},v.prototype={add:function(B){_.isArray(B)&&(B=B.join("")),this.src+=B},prepend:function(B){_.isArray(B)&&(B=B.join("")),this.src=B+this.src},toStringWithSourceMap:function(){return{code:this.toString()}},toString:function(){return this.src}});function P(o,B,D){if(_.isArray(o)){for(var L=[],H=0,M=o.length;H<M;H++)L.push(B.wrap(o[H],D));return L}else if(typeof o=="boolean"||typeof o=="number")return o+"";return o}function x(o){this.srcFile=o,this.source=[]}x.prototype={isEmpty:function(){return!this.source.length},prepend:function(B,D){this.source.unshift(this.wrap(B,D))},push:function(B,D){this.source.push(this.wrap(B,D))},merge:function(){var B=this.empty();return this.each(function(D){B.add([" ",D,`
|
|
810
|
-
`])}),B},each:function(B){for(var D=0,L=this.source.length;D<L;D++)B(this.source[D])},empty:function(){var B=this.currentLocation||{start:{}};return new v(B.start.line,B.start.column,this.srcFile)},wrap:function(B){var D=arguments.length<=1||arguments[1]===void 0?this.currentLocation||{start:{}}:arguments[1];return B instanceof v?B:(B=P(B,this,D),new v(D.start.line,D.start.column,this.srcFile,B))},functionCall:function(B,D,L){return L=this.generateList(L),this.wrap([B,D?"."+D+"(":"(",L,")"])},quotedString:function(B){return'"'+(B+"").replace(/\\/g,"\\\\").replace(/"/g,'\\"').replace(/\n/g,"\\n").replace(/\r/g,"\\r").replace(/\u2028/g,"\\u2028").replace(/\u2029/g,"\\u2029")+'"'},objectLiteral:function(B){var D=this,L=[];Object.keys(B).forEach(function(M){var C=P(B[M],D);C!=="undefined"&&L.push([D.quotedString(M),":",C])});var H=this.generateList(L);return H.prepend("{"),H.add("}"),H},generateList:function(B){for(var D=this.empty(),L=0,H=B.length;L<H;L++)L&&D.add(","),D.add(P(B[L],this));return D},generateArray:function(B){var D=this.generateList(B);return D.prepend("["),D.add("]"),D}},f.default=x,p.exports=f.default}(lu,lu.exports)),lu.exports}var km;function $v(){return km||(km=1,function(p,f){f.__esModule=!0;function _(M){return M&&M.__esModule?M:{default:M}}var v=Wh(),k=Pn(),P=_(k),x=Gi(),o=Yv(),B=_(o);function D(M){this.value=M}function L(){}L.prototype={nameLookup:function(C,T){return this.internalNameLookup(C,T)},depthedLookup:function(C){return[this.aliasable("container.lookup"),"(depths, ",JSON.stringify(C),")"]},compilerInfo:function(){var C=v.COMPILER_REVISION,T=v.REVISION_CHANGES[C];return[C,T]},appendToBuffer:function(C,T,N){return x.isArray(C)||(C=[C]),C=this.source.wrap(C,T),this.environment.isSimple?["return ",C,";"]:N?["buffer += ",C,";"]:(C.appendToBuffer=!0,C)},initializeBuffer:function(){return this.quotedString("")},internalNameLookup:function(C,T){return this.lookupPropertyFunctionIsUsed=!0,["lookupProperty(",C,",",JSON.stringify(T),")"]},lookupPropertyFunctionIsUsed:!1,compile:function(C,T,N,G){this.environment=C,this.options=T,this.stringParams=this.options.stringParams,this.trackIds=this.options.trackIds,this.precompile=!G,this.name=this.environment.name,this.isChild=!!N,this.context=N||{decorators:[],programs:[],environments:[]},this.preamble(),this.stackSlot=0,this.stackVars=[],this.aliases={},this.registers={list:[]},this.hashes=[],this.compileStack=[],this.inlineStack=[],this.blockParams=[],this.compileChildren(C,T),this.useDepths=this.useDepths||C.useDepths||C.useDecorators||this.options.compat,this.useBlockParams=this.useBlockParams||C.useBlockParams;var ie=C.opcodes,le=void 0,Ee=void 0,te=void 0,me=void 0;for(te=0,me=ie.length;te<me;te++)le=ie[te],this.source.currentLocation=le.loc,Ee=Ee||le.loc,this[le.opcode].apply(this,le.args);if(this.source.currentLocation=Ee,this.pushSource(""),this.stackSlot||this.inlineStack.length||this.compileStack.length)throw new P.default("Compile completed with content left on stack");this.decorators.isEmpty()?this.decorators=void 0:(this.useDecorators=!0,this.decorators.prepend(["var decorators = container.decorators, ",this.lookupPropertyFunctionVarDeclaration(),`;
|
|
811
|
-
`]),this.decorators.push("return fn;"),G?this.decorators=Function.apply(this,["fn","props","container","depth0","data","blockParams","depths",this.decorators.merge()]):(this.decorators.prepend(`function(fn, props, container, depth0, data, blockParams, depths) {
|
|
812
|
-
`),this.decorators.push(`}
|
|
813
|
-
`),this.decorators=this.decorators.merge()));var De=this.createFunctionContext(G);if(this.isChild)return De;var qe={compiler:this.compilerInfo(),main:De};this.decorators&&(qe.main_d=this.decorators,qe.useDecorators=!0);var rt=this.context,At=rt.programs,_t=rt.decorators;for(te=0,me=At.length;te<me;te++)At[te]&&(qe[te]=At[te],_t[te]&&(qe[te+"_d"]=_t[te],qe.useDecorators=!0));return this.environment.usePartial&&(qe.usePartial=!0),this.options.data&&(qe.useData=!0),this.useDepths&&(qe.useDepths=!0),this.useBlockParams&&(qe.useBlockParams=!0),this.options.compat&&(qe.compat=!0),G?qe.compilerOptions=this.options:(qe.compiler=JSON.stringify(qe.compiler),this.source.currentLocation={start:{line:1,column:0}},qe=this.objectLiteral(qe),T.srcName?(qe=qe.toStringWithSourceMap({file:T.destName}),qe.map=qe.map&&qe.map.toString()):qe=qe.toString()),qe},preamble:function(){this.lastContext=0,this.source=new B.default(this.options.srcName),this.decorators=new B.default(this.options.srcName)},createFunctionContext:function(C){var T=this,N="",G=this.stackVars.concat(this.registers.list);G.length>0&&(N+=", "+G.join(", "));var ie=0;Object.keys(this.aliases).forEach(function(te){var me=T.aliases[te];me.children&&me.referenceCount>1&&(N+=", alias"+ ++ie+"="+te,me.children[0]="alias"+ie)}),this.lookupPropertyFunctionIsUsed&&(N+=", "+this.lookupPropertyFunctionVarDeclaration());var le=["container","depth0","helpers","partials","data"];(this.useBlockParams||this.useDepths)&&le.push("blockParams"),this.useDepths&&le.push("depths");var Ee=this.mergeSource(N);return C?(le.push(Ee),Function.apply(this,le)):this.source.wrap(["function(",le.join(","),`) {
|
|
814
|
-
`,Ee,"}"])},mergeSource:function(C){var T=this.environment.isSimple,N=!this.forceBuffer,G=void 0,ie=void 0,le=void 0,Ee=void 0;return this.source.each(function(te){te.appendToBuffer?(le?te.prepend(" + "):le=te,Ee=te):(le&&(ie?le.prepend("buffer += "):G=!0,Ee.add(";"),le=Ee=void 0),ie=!0,T||(N=!1))}),N?le?(le.prepend("return "),Ee.add(";")):ie||this.source.push('return "";'):(C+=", buffer = "+(G?"":this.initializeBuffer()),le?(le.prepend("return buffer + "),Ee.add(";")):this.source.push("return buffer;")),C&&this.source.prepend("var "+C.substring(2)+(G?"":`;
|
|
815
|
-
`)),this.source.merge()},lookupPropertyFunctionVarDeclaration:function(){return`
|
|
816
|
-
lookupProperty = container.lookupProperty || function(parent, propertyName) {
|
|
817
|
-
if (Object.prototype.hasOwnProperty.call(parent, propertyName)) {
|
|
818
|
-
return parent[propertyName];
|
|
819
|
-
}
|
|
820
|
-
return undefined
|
|
821
|
-
}
|
|
822
|
-
`.trim()},blockValue:function(C){var T=this.aliasable("container.hooks.blockHelperMissing"),N=[this.contextName(0)];this.setupHelperArgs(C,0,N);var G=this.popStack();N.splice(1,0,G),this.push(this.source.functionCall(T,"call",N))},ambiguousBlockValue:function(){var C=this.aliasable("container.hooks.blockHelperMissing"),T=[this.contextName(0)];this.setupHelperArgs("",0,T,!0),this.flushInline();var N=this.topStack();T.splice(1,0,N),this.pushSource(["if (!",this.lastHelper,") { ",N," = ",this.source.functionCall(C,"call",T),"}"])},appendContent:function(C){this.pendingContent?C=this.pendingContent+C:this.pendingLocation=this.source.currentLocation,this.pendingContent=C},append:function(){if(this.isInline())this.replaceStack(function(T){return[" != null ? ",T,' : ""']}),this.pushSource(this.appendToBuffer(this.popStack()));else{var C=this.popStack();this.pushSource(["if (",C," != null) { ",this.appendToBuffer(C,void 0,!0)," }"]),this.environment.isSimple&&this.pushSource(["else { ",this.appendToBuffer("''",void 0,!0)," }"])}},appendEscaped:function(){this.pushSource(this.appendToBuffer([this.aliasable("container.escapeExpression"),"(",this.popStack(),")"]))},getContext:function(C){this.lastContext=C},pushContext:function(){this.pushStackLiteral(this.contextName(this.lastContext))},lookupOnContext:function(C,T,N,G){var ie=0;!G&&this.options.compat&&!this.lastContext?this.push(this.depthedLookup(C[ie++])):this.pushContext(),this.resolvePath("context",C,ie,T,N)},lookupBlockParam:function(C,T){this.useBlockParams=!0,this.push(["blockParams[",C[0],"][",C[1],"]"]),this.resolvePath("context",T,1)},lookupData:function(C,T,N){C?this.pushStackLiteral("container.data(data, "+C+")"):this.pushStackLiteral("data"),this.resolvePath("data",T,0,!0,N)},resolvePath:function(C,T,N,G,ie){var le=this;if(this.options.strict||this.options.assumeObjects){this.push(H(this.options.strict&&ie,this,T,N,C));return}for(var Ee=T.length;N<Ee;N++)this.replaceStack(function(te){var me=le.nameLookup(te,T[N],C);return G?[" && ",me]:[" != null ? ",me," : ",te]})},resolvePossibleLambda:function(){this.push([this.aliasable("container.lambda"),"(",this.popStack(),", ",this.contextName(0),")"])},pushStringParam:function(C,T){this.pushContext(),this.pushString(T),T!=="SubExpression"&&(typeof C=="string"?this.pushString(C):this.pushStackLiteral(C))},emptyHash:function(C){this.trackIds&&this.push("{}"),this.stringParams&&(this.push("{}"),this.push("{}")),this.pushStackLiteral(C?"undefined":"{}")},pushHash:function(){this.hash&&this.hashes.push(this.hash),this.hash={values:{},types:[],contexts:[],ids:[]}},popHash:function(){var C=this.hash;this.hash=this.hashes.pop(),this.trackIds&&this.push(this.objectLiteral(C.ids)),this.stringParams&&(this.push(this.objectLiteral(C.contexts)),this.push(this.objectLiteral(C.types))),this.push(this.objectLiteral(C.values))},pushString:function(C){this.pushStackLiteral(this.quotedString(C))},pushLiteral:function(C){this.pushStackLiteral(C)},pushProgram:function(C){C!=null?this.pushStackLiteral(this.programExpression(C)):this.pushStackLiteral(null)},registerDecorator:function(C,T){var N=this.nameLookup("decorators",T,"decorator"),G=this.setupHelperArgs(T,C);this.decorators.push(["fn = ",this.decorators.functionCall(N,"",["fn","props","container",G])," || fn;"])},invokeHelper:function(C,T,N){var G=this.popStack(),ie=this.setupHelper(C,T),le=[];N&&le.push(ie.name),le.push(G),this.options.strict||le.push(this.aliasable("container.hooks.helperMissing"));var Ee=["(",this.itemsSeparatedBy(le,"||"),")"],te=this.source.functionCall(Ee,"call",ie.callParams);this.push(te)},itemsSeparatedBy:function(C,T){var N=[];N.push(C[0]);for(var G=1;G<C.length;G++)N.push(T,C[G]);return N},invokeKnownHelper:function(C,T){var N=this.setupHelper(C,T);this.push(this.source.functionCall(N.name,"call",N.callParams))},invokeAmbiguous:function(C,T){this.useRegister("helper");var N=this.popStack();this.emptyHash();var G=this.setupHelper(0,C,T),ie=this.lastHelper=this.nameLookup("helpers",C,"helper"),le=["(","(helper = ",ie," || ",N,")"];this.options.strict||(le[0]="(helper = ",le.push(" != null ? helper : ",this.aliasable("container.hooks.helperMissing"))),this.push(["(",le,G.paramsInit?["),(",G.paramsInit]:[],"),","(typeof helper === ",this.aliasable('"function"')," ? ",this.source.functionCall("helper","call",G.callParams)," : helper))"])},invokePartial:function(C,T,N){var G=[],ie=this.setupParams(T,1,G);C&&(T=this.popStack(),delete ie.name),N&&(ie.indent=JSON.stringify(N)),ie.helpers="helpers",ie.partials="partials",ie.decorators="container.decorators",C?G.unshift(T):G.unshift(this.nameLookup("partials",T,"partial")),this.options.compat&&(ie.depths="depths"),ie=this.objectLiteral(ie),G.push(ie),this.push(this.source.functionCall("container.invokePartial","",G))},assignToHash:function(C){var T=this.popStack(),N=void 0,G=void 0,ie=void 0;this.trackIds&&(ie=this.popStack()),this.stringParams&&(G=this.popStack(),N=this.popStack());var le=this.hash;N&&(le.contexts[C]=N),G&&(le.types[C]=G),ie&&(le.ids[C]=ie),le.values[C]=T},pushId:function(C,T,N){C==="BlockParam"?this.pushStackLiteral("blockParams["+T[0]+"].path["+T[1]+"]"+(N?" + "+JSON.stringify("."+N):"")):C==="PathExpression"?this.pushString(T):C==="SubExpression"?this.pushStackLiteral("true"):this.pushStackLiteral("null")},compiler:L,compileChildren:function(C,T){for(var N=C.children,G=void 0,ie=void 0,le=0,Ee=N.length;le<Ee;le++){G=N[le],ie=new this.compiler;var te=this.matchExistingProgram(G);if(te==null){this.context.programs.push("");var me=this.context.programs.length;G.index=me,G.name="program"+me,this.context.programs[me]=ie.compile(G,T,this.context,!this.precompile),this.context.decorators[me]=ie.decorators,this.context.environments[me]=G,this.useDepths=this.useDepths||ie.useDepths,this.useBlockParams=this.useBlockParams||ie.useBlockParams,G.useDepths=this.useDepths,G.useBlockParams=this.useBlockParams}else G.index=te.index,G.name="program"+te.index,this.useDepths=this.useDepths||te.useDepths,this.useBlockParams=this.useBlockParams||te.useBlockParams}},matchExistingProgram:function(C){for(var T=0,N=this.context.environments.length;T<N;T++){var G=this.context.environments[T];if(G&&G.equals(C))return G}},programExpression:function(C){var T=this.environment.children[C],N=[T.index,"data",T.blockParams];return(this.useBlockParams||this.useDepths)&&N.push("blockParams"),this.useDepths&&N.push("depths"),"container.program("+N.join(", ")+")"},useRegister:function(C){this.registers[C]||(this.registers[C]=!0,this.registers.list.push(C))},push:function(C){return C instanceof D||(C=this.source.wrap(C)),this.inlineStack.push(C),C},pushStackLiteral:function(C){this.push(new D(C))},pushSource:function(C){this.pendingContent&&(this.source.push(this.appendToBuffer(this.source.quotedString(this.pendingContent),this.pendingLocation)),this.pendingContent=void 0),C&&this.source.push(C)},replaceStack:function(C){var T=["("],N=void 0,G=void 0,ie=void 0;if(!this.isInline())throw new P.default("replaceStack on non-inline");var le=this.popStack(!0);if(le instanceof D)N=[le.value],T=["(",N],ie=!0;else{G=!0;var Ee=this.incrStack();T=["((",this.push(Ee)," = ",le,")"],N=this.topStack()}var te=C.call(this,N);ie||this.popStack(),G&&this.stackSlot--,this.push(T.concat(te,")"))},incrStack:function(){return this.stackSlot++,this.stackSlot>this.stackVars.length&&this.stackVars.push("stack"+this.stackSlot),this.topStackName()},topStackName:function(){return"stack"+this.stackSlot},flushInline:function(){var C=this.inlineStack;this.inlineStack=[];for(var T=0,N=C.length;T<N;T++){var G=C[T];if(G instanceof D)this.compileStack.push(G);else{var ie=this.incrStack();this.pushSource([ie," = ",G,";"]),this.compileStack.push(ie)}}},isInline:function(){return this.inlineStack.length},popStack:function(C){var T=this.isInline(),N=(T?this.inlineStack:this.compileStack).pop();if(!C&&N instanceof D)return N.value;if(!T){if(!this.stackSlot)throw new P.default("Invalid stack pop");this.stackSlot--}return N},topStack:function(){var C=this.isInline()?this.inlineStack:this.compileStack,T=C[C.length-1];return T instanceof D?T.value:T},contextName:function(C){return this.useDepths&&C?"depths["+C+"]":"depth"+C},quotedString:function(C){return this.source.quotedString(C)},objectLiteral:function(C){return this.source.objectLiteral(C)},aliasable:function(C){var T=this.aliases[C];return T?(T.referenceCount++,T):(T=this.aliases[C]=this.source.wrap(C),T.aliasable=!0,T.referenceCount=1,T)},setupHelper:function(C,T,N){var G=[],ie=this.setupHelperArgs(T,C,G,N),le=this.nameLookup("helpers",T,"helper"),Ee=this.aliasable(this.contextName(0)+" != null ? "+this.contextName(0)+" : (container.nullContext || {})");return{params:G,paramsInit:ie,name:le,callParams:[Ee].concat(G)}},setupParams:function(C,T,N){var G={},ie=[],le=[],Ee=[],te=!N,me=void 0;te&&(N=[]),G.name=this.quotedString(C),G.hash=this.popStack(),this.trackIds&&(G.hashIds=this.popStack()),this.stringParams&&(G.hashTypes=this.popStack(),G.hashContexts=this.popStack());var De=this.popStack(),qe=this.popStack();(qe||De)&&(G.fn=qe||"container.noop",G.inverse=De||"container.noop");for(var rt=T;rt--;)me=this.popStack(),N[rt]=me,this.trackIds&&(Ee[rt]=this.popStack()),this.stringParams&&(le[rt]=this.popStack(),ie[rt]=this.popStack());return te&&(G.args=this.source.generateArray(N)),this.trackIds&&(G.ids=this.source.generateArray(Ee)),this.stringParams&&(G.types=this.source.generateArray(le),G.contexts=this.source.generateArray(ie)),this.options.data&&(G.data="data"),this.useBlockParams&&(G.blockParams="blockParams"),G},setupHelperArgs:function(C,T,N,G){var ie=this.setupParams(C,T,N);return ie.loc=JSON.stringify(this.source.currentLocation),ie=this.objectLiteral(ie),G?(this.useRegister("options"),N.push("options"),["options=",ie]):N?(N.push(ie),""):ie}},function(){for(var M="break else new var case finally return void catch for switch while continue function this with default if throw delete in try do instanceof typeof abstract enum int short boolean export interface static byte extends long super char final native synchronized class float package throws const goto private transient debugger implements protected volatile double import public let yield await null true false".split(" "),C=L.RESERVED_WORDS={},T=0,N=M.length;T<N;T++)C[M[T]]=!0}(),L.isValidJavaScriptVariableName=function(M){return!L.RESERVED_WORDS[M]&&/^[a-zA-Z_$][0-9a-zA-Z_$]*$/.test(M)};function H(M,C,T,N,G){var ie=C.popStack(),le=T.length;for(M&&le--;N<le;N++)ie=C.nameLookup(ie,T[N],G);return M?[C.aliasable("container.strict"),"(",ie,", ",C.quotedString(T[N]),", ",JSON.stringify(C.source.currentLocation)," )"]:ie}f.default=L,p.exports=f.default}(au,au.exports)),au.exports}var Tm;function e1(){return Tm||(Tm=1,function(p,f){f.__esModule=!0;function _(le){return le&&le.__esModule?le:{default:le}}var v=Fv(),k=_(v),P=rm(),x=_(P),o=jv(),B=Hv(),D=$v(),L=_(D),H=om(),M=_(H),C=$f(),T=_(C),N=k.default.create;function G(){var le=N();return le.compile=function(Ee,te){return B.compile(Ee,te,le)},le.precompile=function(Ee,te){return B.precompile(Ee,te,le)},le.AST=x.default,le.Compiler=B.Compiler,le.JavaScriptCompiler=L.default,le.Parser=o.parser,le.parse=o.parse,le.parseWithoutProcessing=o.parseWithoutProcessing,le}var ie=G();ie.create=G,T.default(ie),ie.Visitor=M.default,ie.default=ie,f.default=ie,p.exports=f.default}(Nc,Nc.exports)),Nc.exports}var t1=e1();const hu=ts(t1);function Cm(p,f,_,v){const k=p+f;let P=0,x=0;if(k<=_)P=p,x=f;else{const o=_/2;if(p>o&&f>o)P=o-v,x=o-v;else{const B=Math.min(p,f),D=_-B;p>f?(P=Math.max(D,100)-v,x=B):(P=B,x=Math.max(D,100)-v)}}return{topMaxHeight:P,bottomMaxHeight:x}}function pu(p,f,_,v){if(!p)return!1;const k=_-v*2-((f==null?void 0:f.scrollHeight)||0);return p.scrollHeight>k}function r1(p,f,_){const v=f-_*2;return Math.min(p,v)}function Em(p,f,_){const v=(f-_*3)/2;return Math.min(p,v)}function Pm(p,f){var Ee,te,me,De,qe,rt,At;const v=f-80,k=((Ee=p.topLeft)==null?void 0:Ee.scrollHeight)||0,P=((te=p.bottomLeft)==null?void 0:te.scrollHeight)||0,{topMaxHeight:x,bottomMaxHeight:o}=Cm(k,P,v,40),B=((me=p.topRight)==null?void 0:me.scrollHeight)||0,D=((De=p.bottomRight)==null?void 0:De.scrollHeight)||0,{topMaxHeight:L,bottomMaxHeight:H}=Cm(B,D,v,40),M=((qe=p.center)==null?void 0:qe.scrollHeight)||0,C=r1(M,f,40),T=((rt=p.topCenter)==null?void 0:rt.scrollHeight)||0,N=Em(T,f,40),G=((At=p.bottomCenter)==null?void 0:At.scrollHeight)||0,ie=Em(G,f,40),le={topLeft:pu(p.topLeft,p.bottomLeft,f,40),topRight:pu(p.topRight,p.bottomRight,f,40),topCenter:T>N,center:M>C,bottomLeft:pu(p.bottomLeft,p.topLeft,f,40),bottomRight:pu(p.bottomRight,p.topRight,f,40),bottomCenter:G>ie};return{heights:{topLeft:x,topRight:L,topCenter:N,center:C,bottomLeft:o,bottomRight:H,bottomCenter:ie},hasScroll:le}}const i1={"diagonal-stripes":"data:image/jpeg;base64,/9j/4AAQSkZJRgABAQACWAJYAAD/4gogSUNDX1BST0ZJTEUAAQEAAAoQAAAAAAIQAABtbnRyUkdCIFhZWiAAAAAAAAAAAAAAAABhY3NwQVBQTAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA9tYAAQAAAADTLQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAApkZXNjAAAA/AAAAHxjcHJ0AAABeAAAACh3dHB0AAABoAAAABRia3B0AAABtAAAABRyWFlaAAAByAAAABRnWFlaAAAB3AAAABRiWFlaAAAB8AAAABRyVFJDAAACBAAACAxnVFJDAAACBAAACAxiVFJDAAACBAAACAxkZXNjAAAAAAAAACJBcnRpZmV4IFNvZnR3YXJlIHNSR0IgSUNDIFByb2ZpbGUAAAAAAAAAAAAAACJBcnRpZmV4IFNvZnR3YXJlIHNSR0IgSUNDIFByb2ZpbGUAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAdGV4dAAAAABDb3B5cmlnaHQgQXJ0aWZleCBTb2Z0d2FyZSAyMDExAFhZWiAAAAAAAADzUQABAAAAARbMWFlaIAAAAAAAAAAAAAAAAAAAAABYWVogAAAAAAAAb6IAADj1AAADkFhZWiAAAAAAAABimQAAt4UAABjaWFlaIAAAAAAAACSgAAAPhAAAts9jdXJ2AAAAAAAABAAAAAAFAAoADwAUABkAHgAjACgALQAyADcAOwBA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QpuAvX1MbmyO63ThuyK1zeekwFls9pBxT05C2PJU2d7Nx24r4L8f//Z"};async function n1(p){for(const[f,_]of Object.entries(i1))if(!p.hasImage(f))try{const v=await p.loadImage(_);p.addImage(f,v.data)}catch(v){console.error(`Failed to load pattern image: ${f}`,v)}}const o1={key:0,class:"w-full flex flex-col bg-white border border-stone-200 shadow-2xs rounded-xl z-10 relative widget"},s1={key:0,class:"p-5 pb-3 flex justify-between items-center"},a1={class:"inline-block font-semibold text-lg text-gray-800 dark:text-neutral-200"},l1={class:"flex flex-col justify-between h-full"},c1={__name:"vs-filters-widget",props:{config:{type:Object,required:!0},map:{type:Object,required:!0},enabledLayerIds:{type:Array,default:()=>[]}},setup(p){const f=p,_=S.ref(0),v=S.ref(null),k=S.computed(()=>{var B;return((B=f.config)==null?void 0:B.filters)||[]}),P=S.computed(()=>k.value.map(B=>({...B,id:B.name}))),x=S.computed(()=>{var D;const B=(D=f.config)==null?void 0:D.conditions;return!B||!B.layers?!0:f.enabledLayerIds.some(L=>B.layers.includes(L))}),o=async({url:B})=>{var M;const D=(M=f.config)==null?void 0:M.conditions,L=(D==null?void 0:D.layers)||[],H=f.enabledLayerIds.filter(C=>L.includes(C));H.length&&H.forEach(C=>{const T=f.map.getSource(C);if(T){const G=T.tiles[0].split("?filter=")[0],ie=B?`${G}?filter=${B}`:G;T.setTiles([ie])}})};return S.watch(()=>f.enabledLayerIds,B=>{(!B||!B.length)&&v.value&&(v.value.activeFilters={},_.value=0)}),S.watch(()=>{var B;return(B=v.value)==null?void 0:B.activeFilters},B=>{_.value=Object.keys(B||{}).length},{deep:!0}),(B,D)=>{const L=S.resolveComponent("VsFilter");return x.value?(S.openBlock(),S.createElementBlock("div",o1,[p.config.title?(S.openBlock(),S.createElementBlock("div",s1,[S.createElementVNode("h2",a1,S.toDisplayString(p.config.title),1)])):S.createCommentVNode("",!0),S.createElementVNode("div",l1,[S.createVNode(L,{ref_key:"filter",ref:v,scheme:P.value,header:!1,urlSeparator:"true",view:"plain",name:"filter",onFilterChange:o},null,8,["scheme"])])])):S.createCommentVNode("",!0)}}},u1={type:"button",class:"py-2 px-2.5 inline-flex items-center gap-x-1.5 text-sm font-medium rounded-lg bg-white text-gray-800 hover:bg-gray-50 focus:outline-none focus:bg-gray-49 h-[38px] shadow-md"},h1={class:"flex gap-[5px] items-center"},p1={class:"text-gray-600"},d1={key:0,class:"w-[16px] h-[16px] font-medium bg-gray-800 text-white rounded-full flex items-center justify-center text-[10px]"},f1={__name:"vs-inline-filters-widget",props:{config:{type:Object,required:!0},map:{type:Object,required:!0},enabledLayerIds:{type:Array,default:()=>[]}},setup(p){const f=p,_=S.ref(0),v=S.ref(null),k=S.computed(()=>{var D;return((D=f.config)==null?void 0:D.filters)||[]}),P=S.computed(()=>k.value.map(D=>({...D,id:D.name}))),x=S.computed(()=>{var L;const D=(L=f.config)==null?void 0:L.conditions;return!D||!D.layers?!0:f.enabledLayerIds.some(H=>D.layers.includes(H))}),o=S.computed(()=>{var D;if(f.enabledLayerIds&&f.enabledLayerIds.length){const H=(((D=f.config)==null?void 0:D.layers)||[]).find(M=>M.id===f.enabledLayerIds[0]);return(H==null?void 0:H.title)||(H==null?void 0:H.name)||(H==null?void 0:H.label)||f.enabledLayerIds[0]}return""}),B=async({url:D})=>{var C,T;const L=(C=f.config)==null?void 0:C.conditions;if(!L){const N=(T=f.config)==null?void 0:T.layer_id;if(!N)return;const G=f.map.getSource(N);if(G){const le=G.tiles[0].split("?filter=")[0],Ee=D?`${le}?filter=${D}`:le;G.setTiles([Ee])}return}const H=(L==null?void 0:L.layers)||[],M=f.enabledLayerIds.filter(N=>H.includes(N));M.length&&M.forEach(N=>{const G=f.map.getSource(N);if(G){const le=G.tiles[0].split("?filter=")[0],Ee=D?`${le}?filter=${D}`:le;G.setTiles([Ee])}})};return S.watch(()=>f.enabledLayerIds,D=>{(!D||!D.length)&&v.value&&(v.value.activeFilters={},_.value=0)}),S.watch(()=>{var D;return(D=v.value)==null?void 0:D.activeFilters},D=>{_.value=Object.keys(D||{}).length},{deep:!0}),(D,L)=>{const H=S.resolveComponent("VsPopover"),M=S.resolveComponent("VsFilterList");return x.value&&P.value.length?(S.openBlock(),S.createBlock(M,{key:0,ref_key:"filter",ref:v,isDialog:p.config.dialog??!0,scheme:P.value,urlSeparator:"true",view:"plain",name:"filter",onFilterChange:B},{button:S.withCtx(({visible:C})=>[S.createVNode(H,{teleport:"body",trigger:"hover",placement:"bottom"},{reference:S.withCtx(()=>[S.createElementVNode("button",u1,[S.createElementVNode("div",h1,[L[0]||(L[0]=S.createElementVNode("svg",{width:"18",height:"18",viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg"},[S.createElementVNode("path",{d:"M12 20L9 21V12.5L4.52 7.572C4.18545 7.20393 4.00005 6.7244 4 6.227V4H20V6.172C19.9999 6.70239 19.7891 7.21101 19.414 7.586L15 12",stroke:"currentColor","stroke-linecap":"round","stroke-linejoin":"round"}),S.createElementVNode("path",{d:"M21.121 20.1209C21.5406 19.7014 21.8265 19.1668 21.9423 18.5849C22.0581 18.0029 21.9988 17.3997 21.7717 16.8514C21.5447 16.3032 21.1602 15.8346 20.6668 15.5049C20.1734 15.1752 19.5934 14.9993 19 14.9993C18.4066 14.9993 17.8266 15.1752 17.3332 15.5049C16.8398 15.8346 16.4553 16.3032 16.2283 16.8514C16.0012 17.3997 15.9419 18.0029 16.0577 18.5849C16.1735 19.1668 16.4594 19.7014 16.879 20.1209C17.297 20.5399 18.004 21.1659 19 21.9999C20.051 21.1099 20.759 20.4839 21.121 20.1209Z",stroke:"currentColor","stroke-linecap":"round","stroke-linejoin":"round"}),S.createElementVNode("path",{d:"M19 18V18.01",stroke:"currentColor","stroke-linecap":"round","stroke-linejoin":"round"})],-1)),S.createElementVNode("span",p1,S.toDisplayString(o.value),1),_.value?(S.openBlock(),S.createElementBlock("span",d1,S.toDisplayString(_.value),1)):S.createCommentVNode("",!0)])])]),default:S.withCtx(()=>[L[1]||(L[1]=S.createTextVNode(" Відкрити бокову панель "))]),_:1,__:[1]})]),_:1},8,["isDialog","scheme"])):S.createCommentVNode("",!0)}}},m1={class:"bg-white p-4 rounded-lg h-full flex flex-col overflow-hidden"},g1={key:0,class:"flex flex-col flex-1 overflow-hidden"},y1={class:"space-y-0 overflow-y-auto flex-1 [&::-webkit-scrollbar]:h-1.5 [&::-webkit-scrollbar]:w-1.5 [&::-webkit-scrollbar-thumb]:rounded-full [&::-webkit-scrollbar-thumb]:bg-gray-300 [&::-webkit-scrollbar-track]:bg-transparent"},_1=["onClick"],x1={class:"text-base font-medium"},b1={class:"mt-2 flex flex-wrap gap-2"},v1={key:1,class:"px-2 py-1 text-sm bg-gray-100 rounded-full"},w1={key:0,class:"my-5 pr-2"},S1={class:"paginationWrapper relative flex justify-center"},A1={key:1,class:"text-center text-slate-400"},k1={__name:"vs-list-widget",props:{config:{type:Object,required:!0}},emits:["cardValues"],setup(p,{emit:f}){const _=p,v=f,k=S.ref([]),P=S.ref(0),x=S.ref(1),o=S.ref(10),B=async()=>{try{const H=await Wr.get(_.config.api,{params:{page:x.value,limit:o.value}});k.value=H.data.rows,P.value=H.data.total}catch(H){console.error("Error fetching data:",H)}},D=H=>{x.value=H,B()},L=H=>{o.value=H,x.value=1,B()};return S.onMounted(()=>{B()}),(H,M)=>{var T;const C=S.resolveComponent("VsPagination");return S.openBlock(),S.createElementBlock("div",m1,[M[0]||(M[0]=S.createElementVNode("h2",{class:"text-xl font-semibold mb-4"},"Список",-1)),((T=k.value)==null?void 0:T.length)>0?(S.openBlock(),S.createElementBlock("div",g1,[S.createElementVNode("div",y1,[(S.openBlock(!0),S.createElementBlock(S.Fragment,null,S.renderList(k.value,N=>(S.openBlock(),S.createElementBlock("div",{key:N.id,class:"py-4 border-b last:border-b-0 hover:bg-gray-50",onClick:G=>v("cardValuesId",N.id)},[S.createElementVNode("h3",x1,S.toDisplayString(N.name),1),S.createElementVNode("div",b1,[N.status_data?(S.openBlock(),S.createElementBlock("span",{key:0,class:S.normalizeClass(["px-2 py-1 text-sm rounded-full",{"bg-green-100 text-green-800":N.status_data.color==="green","bg-red-100 text-red-800":N.status_data.color==="red"}])},S.toDisplayString(N.status_data.text),3)):S.createCommentVNode("",!0),N.class_mbd_id_data?(S.openBlock(),S.createElementBlock("span",v1,S.toDisplayString(N.class_mbd_id_data.text),1)):S.createCommentVNode("",!0)])],8,_1))),128))]),P.value>o.value?(S.openBlock(),S.createElementBlock("div",w1,[S.createElementVNode("div",S1,[S.createVNode(C,{total:P.value,maxPages:4,defaultPage:x.value,pageSize:o.value,goTo:!1,size:"medium",onPageChange:D,backgroundColor:"#e5e7eb",borderedCellSelected:!0,pageSizes:[5,10,20,50],onPageSizeChange:L},null,8,["total","defaultPage","pageSize"])])])):S.createCommentVNode("",!0)])):(S.openBlock(),S.createElementBlock("div",A1,"Немає даних"))])}}},T1={class:"map-skeleton-loader"},C1=Nr({__name:"vs-skeleton-loader",setup(p){return(f,_)=>(S.openBlock(),S.createElementBlock("div",T1,_[0]||(_[0]=[S.createElementVNode("div",{class:"dot-pulse"},null,-1)])))}},[["__scopeId","data-v-954c1e03"]]),E1={},P1={width:"24",height:"24",viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg"};function I1(p,f){return S.openBlock(),S.createElementBlock("svg",P1,f[0]||(f[0]=[S.createElementVNode("title",null,"Globe Icon",-1),S.createElementVNode("desc",null," A circular representation of a globe with horizontal and vertical lines ",-1),S.createElementVNode("path",{d:"M12 22C17.5228 22 22 17.5228 22 12C22 6.47715 17.5228 2 12 2C6.47715 2 2 6.47715 2 12C2 17.5228 6.47715 22 12 22Z",stroke:"#1E40AF","stroke-width":"1","stroke-linecap":"round","stroke-linejoin":"round"},null,-1),S.createElementVNode("path",{d:"M2 12H22",stroke:"#1E40AF","stroke-width":"1","stroke-linecap":"round","stroke-linejoin":"round"},null,-1),S.createElementVNode("path",{d:"M12 2C14.5013 4.73835 15.9228 8.29203 16 12C15.9228 15.708 14.5013 19.2616 12 22C9.49872 19.2616 8.07725 15.708 8 12C8.07725 8.29203 9.49872 4.73835 12 2Z",stroke:"#1E40AF","stroke-width":"1","stroke-linecap":"round","stroke-linejoin":"round"},null,-1)]))}const M1={components:{homeIcon:Nr(E1,[["render",I1]])},name:"vs-homezoom",props:{map:{type:Object},initialView:{type:Object,default:()=>({})}},methods:{homeZoom(){!this.map||!this.initialView||(this.initialView.bbox?this.map.fitBounds(this.initialView.bbox,{duration:0,padding:10}):this.initialView.center&&this.initialView.zoom!==void 0&&(this.map.setCenter(this.initialView.center),this.map.setZoom(this.initialView.zoom)),this.initialView.pitch!==void 0&&this.map.setPitch(this.initialView.pitch),this.initialView.bearing!==void 0&&this.map.setBearing(this.initialView.bearing))}},computed:{}};function L1(p,f,_,v,k,P){const x=S.resolveComponent("homeIcon"),o=S.resolveComponent("VsPopover");return S.openBlock(),S.createElementBlock("div",null,[S.createVNode(o,{trigger:"hover",placement:"left",teleport:"body",class:"flex"},{reference:S.withCtx(()=>[S.createVNode(x,{onClick:P.homeZoom,class:"w-full h-auto p-[9px] [transition:.3s] hover:[transition:.3s] text-[24px] hover:bg-[#DBEAFE] flex font-normal cursor-pointer text-[#1E40AF] bg-[#fff] rounded-[4px] border-[1px] border-solid border-[#E5E7EB]"},null,8,["onClick"])]),default:S.withCtx(()=>[f[0]||(f[0]=S.createElementVNode("div",null,"Повернутися до початкових налаштувань",-1))]),_:1,__:[0]})])}const R1=Nr(M1,[["render",L1]]),D1={},z1={width:"24",height:"24",viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg"};function B1(p,f){return S.openBlock(),S.createElementBlock("svg",z1,f[0]||(f[0]=[S.createElementVNode("title",null,"Document with Two Sections Icon",-1),S.createElementVNode("desc",null,"A document icon with a split design indicating two sections",-1),S.createElementVNode("path",{d:"M6 9V2H18V9",stroke:"#1E40AF","stroke-width":"1","stroke-linecap":"round","stroke-linejoin":"round"},null,-1),S.createElementVNode("path",{d:"M6 18H4C3.46957 18 2.96086 17.7893 2.58579 17.4142C2.21071 17.0391 2 16.5304 2 16V11C2 10.4696 2.21071 9.96086 2.58579 9.58579C2.96086 9.21071 3.46957 9 4 9H20C20.5304 9 21.0391 9.21071 21.4142 9.58579C21.7893 9.96086 22 10.4696 22 11V16C22 16.5304 21.7893 17.0391 21.4142 17.4142C21.0391 17.7893 20.5304 18 20 18H18",stroke:"#1E40AF","stroke-width":"1","stroke-linecap":"round","stroke-linejoin":"round"},null,-1),S.createElementVNode("path",{d:"M18 14H6V22H18V14Z",stroke:"#1E40AF","stroke-width":"1","stroke-linecap":"round","stroke-linejoin":"round"},null,-1)]))}const V1={components:{printIcon:Nr(D1,[["render",B1]])},props:{map:{type:Object},activeTool:String,setActiveTool:Function},data(){return{printVisible:!1,scriptElements:[],styleElements:[],resourcesLoaded:!1}},watch:{activeTool(p){p!=="print"?this.printVisible=!1:this.init()},async printVisible(p){!this.resourcesLoaded&&p?(await this.loadResources(),this.init(),this.simulateClick()):this.removeResources()},activeTool(p,f){p!=="print"&&f==="print"&&(this.closePrint&&this.closePrint(),this.printVisible=!1),p==="print"&&!this.printVisible&&(this.printVisible=!0,this.init())}},computed:{modalButtonClasses(){return{"!bg-[#DBEAFE]":this.printVisible,"bg-white":!this.printVisible}}},mounted(){document.addEventListener("click",p=>{const f=document.querySelector(".mapboxgl-export-list");if(f&&f.contains(p.target)){p.stopPropagation();return}!p.target.classList.contains("mapboxgl-export-list")&&!p.target.classList.contains("print-button")&&!p.target.classList.contains("mapboxgl-export-control")&&!p.target.id.includes("mapbox-gl-export")&&(this.printVisible=!1)})},methods:{addScript(p){return new Promise((f,_)=>{const v=document.createElement("script");v.src=p,v.async=!0,v.onload=f,v.onerror=_,document.head.appendChild(v),this.scriptElements.push(v)})},addStyle(p){return new Promise((f,_)=>{const v=document.createElement("link");v.href=p,v.rel="stylesheet",v.type="text/css",v.onload=f,v.onerror=_,document.head.appendChild(v),this.styleElements.push(v)})},async loadResources(){try{await this.addStyle("https://cdnjs.cloudflare.com/ajax/libs/mapbox-gl/3.8.0/mapbox-gl.min.css"),await this.addScript("https://cdnjs.cloudflare.com/ajax/libs/mapbox-gl/3.8.0/mapbox-gl.js"),await this.addStyle("https://cdn.jsdelivr.net/npm/@watergis/mapbox-gl-export@3.5.4/dist/mapbox-gl-export.min.css"),await this.addScript("https://cdn.jsdelivr.net/npm/@watergis/mapbox-gl-export@3.5.4/dist/mapbox-gl-export.umd.min.js"),this.resourcesLoaded=!0}catch(p){console.error("Failed to load resources:",p)}},removeResources(){this.scriptElements.forEach(p=>{p.parentNode&&p.parentNode.removeChild(p)}),this.scriptElements=[],this.styleElements.forEach(p=>{p.parentNode&&p.parentNode.removeChild(p)}),this.styleElements=[],this.resourcesLoaded=!1},async toggleResources(){this.printVisible=!this.printVisible},init(){if(!window.MapboxExportControl){console.error("MapboxExportControl is not loaded.");return}window.mapboxgl.accessToken="pk.eyJ1Ijoia3Jpemhhbm92c2t5IiwiYSI6ImNsemkxNWtkODA5dDcycnNhMWZzYWM0MTAifQ.6fEpgfd_2mA4UYuflDewpQ";const{MapboxExportControl:p,Size:f,PageOrientation:_,Format:v,DPI:k}=window.MapboxExportControl;this.map.addControl(new p({PageSize:f.A3,PageOrientation:_.Portrait,Format:v.PNG,DPI:k[96],Crosshair:!0,PrintableArea:!0,Local:"uk"}))},simulateClick(){new Promise(f=>{const _=setTimeout(()=>{const v=document.querySelector(".mapboxgl-export-control");v&&(clearInterval(_),f(v))},100)}).then(f=>{f.click()}).catch(()=>{console.error("Print button not found.")})},togglePrint(){!this.activeTool||this.activeTool!=="print"?this.setActiveTool&&this.setActiveTool("print"):this.setActiveTool&&this.setActiveTool(null),this.printVisible=!this.printVisible,this.printVisible?this.init():this.removeResources()}}};function O1(p,f,_,v,k,P){const x=S.resolveComponent("printIcon"),o=S.resolveComponent("VsPopover");return S.openBlock(),S.createBlock(o,{trigger:"hover",placement:"left",teleport:"body"},{reference:S.withCtx(()=>[S.createVNode(x,{onClick:P.togglePrint,class:S.normalizeClass([P.modalButtonClasses,"print-button w-full h-auto p-[9px] [transition:.3s] hover:[transition:.3s] text-[24px] hover:bg-[#DBEAFE] flex font-normal cursor-pointer text-[#1E40AF] bg-[#fff] rounded-[4px] border-[1px] border-solid border-[#E5E7EB]"])},null,8,["onClick","class"])]),default:S.withCtx(()=>[f[0]||(f[0]=S.createElementVNode("div",null,"Надрукувати",-1))]),_:1,__:[0]})}const F1=Nr(V1,[["render",O1]]),N1={props:{map:{type:Object,required:!0}},data(){return{is3D:!1}},mounted(){this.map.on("move",this.updateViewStatus),this.updateViewStatus()},beforeUnmount(){this.map.off("move",this.updateViewStatus)},methods:{toggleView(){this.is3D?this.map.easeTo({pitch:0,bearing:0,duration:1e3}):this.map.easeTo({pitch:60,bearing:-29.6,duration:1e3})},updateViewStatus(){this.is3D=this.map.getPitch()!==0}}};function q1(p,f,_,v,k,P){const x=S.resolveComponent("VsPopover");return S.openBlock(),S.createBlock(x,{trigger:"hover",placement:"left",teleport:"body",class:"flex"},{reference:S.withCtx(()=>[S.createElementVNode("div",{class:"font-light w-full h-[44px] p-[9px] [transition:.3s] hover:[transition:.3s] text-[19px] hover:bg-[#DBEAFE] flex cursor-pointer text-[#1E40AF] bg-[#fff] rounded-[4px] border-[1px] border-solid border-[#E5E7EB]",onClick:f[0]||(f[0]=(...o)=>P.toggleView&&P.toggleView(...o))},S.toDisplayString(k.is3D?"2D":"3D"),1)]),default:S.withCtx(()=>[f[1]||(f[1]=S.createElementVNode("div",null,"Перемикач виду",-1))]),_:1,__:[1]})}const U1=Nr(N1,[["render",q1]]),j1={},H1={class:"shrink-0 size-4",xmlns:"http://www.w3.org/2000/svg",width:"24",height:"24",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor","stroke-width":"2","stroke-linecap":"round","stroke-linejoin":"round"};function W1(p,f){return S.openBlock(),S.createElementBlock("svg",H1,f[0]||(f[0]=[S.createElementVNode("path",{d:"M18 6 6 18"},null,-1),S.createElementVNode("path",{d:"m6 6 12 12"},null,-1)]))}const $h=Nr(j1,[["render",W1]]),Z1={props:{bgColor:{type:String,default:"#1E40AF"}}},K1={width:"24",height:"24",viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg"},G1=["stroke"],J1=["stroke"],X1=["stroke"],Q1=["stroke"],Y1=["stroke"],$1=["stroke"];function ew(p,f,_,v,k,P){return S.openBlock(),S.createElementBlock("svg",K1,[f[0]||(f[0]=S.createElementVNode("title",null,"Target Icon",-1)),f[1]||(f[1]=S.createElementVNode("desc",null,"A target icon with a circular pattern inside a rounded square",-1)),S.createElementVNode("path",{d:"M2 12H5",stroke:_.bgColor,"stroke-width":"1","stroke-linecap":"round","stroke-linejoin":"round"},null,8,G1),S.createElementVNode("path",{d:"M19 12H22",stroke:_.bgColor,"stroke-width":"1","stroke-linecap":"round","stroke-linejoin":"round"},null,8,J1),S.createElementVNode("path",{d:"M12 2V5",stroke:_.bgColor,"stroke-width":"1","stroke-linecap":"round","stroke-linejoin":"round"},null,8,X1),S.createElementVNode("path",{d:"M12 19V22",stroke:_.bgColor,"stroke-width":"1","stroke-linecap":"round","stroke-linejoin":"round"},null,8,Q1),S.createElementVNode("path",{d:"M12 19C15.866 19 19 15.866 19 12C19 8.13401 15.866 5 12 5C8.13401 5 5 8.13401 5 12C5 15.866 8.13401 19 12 19Z",stroke:_.bgColor,"stroke-width":"1","stroke-linecap":"round","stroke-linejoin":"round"},null,8,Y1),S.createElementVNode("path",{d:"M12 15C13.6569 15 15 13.6569 15 12C15 10.3431 13.6569 9 12 9C10.3431 9 9 10.3431 9 12C9 13.6569 10.3431 15 12 15Z",stroke:_.bgColor,"stroke-width":"1","stroke-linecap":"round","stroke-linejoin":"round"},null,8,$1)])}const tw=Nr(Z1,[["render",ew]]),{Marker:rw}=wh,iw={components:{geoIcon:tw,closeIcon:$h},data(){return{location:null,data:null,marker:null,showLocation:!1}},computed:{modalButtonClasses(){return{"!bg-[#DBEAFE]":this.showLocation,"bg-white":!this.showLocation}}},props:{map:{type:Object}},beforeUnmount(){var p;(p=this.marker)==null||p.remove()},watch:{activeControl(p,f){p!=="geolocation"&&f==="geolocation"&&(this.showLocation=!1,this.closeGeolocation())}},methods:{togleGeolocation(){this.showLocation=!this.showLocation,this.showLocation?this.getUserLocation():(this.closeGeolocation(),this.activeControl="no")},getUserLocation(){navigator.geolocation?navigator.geolocation.getCurrentPosition(this.onGeolocationSuccess,this.onGeolocationError):(this.showLocation=!1,this.activeControl="no",this.$notify({type:"error",title:"Помилка",message:"Цей браузер не підтримує геолокацію"}),this.$emit("close"))},async onGeolocationSuccess(p){this.location={latitude:p.coords.latitude,longitude:p.coords.longitude};const _=await(await fetch(`https://nominatim.openstreetmap.org/reverse?format=json&lat=${this.location.latitude}&lon=${this.location.longitude}`)).json();this.data=_.address;const v=[this.location.longitude,this.location.latitude],k=[[parseFloat(_.boundingbox[2]),parseFloat(_.boundingbox[0])],[parseFloat(_.boundingbox[3]),parseFloat(_.boundingbox[1])]];this.map.fitBounds(k,{padding:200,maxZoom:16}),this.marker||(this.marker=new rw({color:"var(--primary)"})),this.marker.setLngLat(v).addTo(this.map),this.activeControl="geolocation"},closeGeolocation(){this.showLocation=!1,this.marker&&(this.marker.remove(),this.marker=null),this.location=null,this.data=null},onGeolocationError(){this.showLocation=!1,this.activeControl="no",this.$notify({type:"error",title:"Помилка",message:"Для визначення геолокації потрібен HTTPS протокол"}),this.$emit("close")}}},nw={key:0,class:"max-w-[412px] absolute w-full top-[20px] right-[70px] bg-white border rounded-[15px] p-4 z-10"},ow={class:"flex justify-between items-center border-b pb-[16px]"},sw={class:"d-flex"},aw={class:"pt-[16px]"};function lw(p,f,_,v,k,P){var D,L,H,M,C,T;const x=S.resolveComponent("closeIcon"),o=S.resolveComponent("geoIcon"),B=S.resolveComponent("VsPopover");return S.openBlock(),S.createElementBlock("div",null,[(S.openBlock(),S.createBlock(S.Teleport,{to:"#maplibre-demo-map"},[k.location?(S.openBlock(),S.createElementBlock("div",nw,[S.createElementVNode("div",ow,[f[0]||(f[0]=S.createElementVNode("div",{class:"text-lg font-semibold"},"Ваша геолокація",-1)),S.createElementVNode("div",sw,[S.createVNode(x,{onClick:P.closeGeolocation},null,8,["onClick"])])]),S.createElementVNode("div",aw,[S.createElementVNode("div",null,[f[1]||(f[1]=S.createElementVNode("strong",null,"Широта:",-1)),S.createTextVNode(" "+S.toDisplayString((D=k.location)==null?void 0:D.latitude),1)]),S.createElementVNode("div",null,[f[2]||(f[2]=S.createElementVNode("strong",null,"Довгота:",-1)),S.createTextVNode(" "+S.toDisplayString((L=k.location)==null?void 0:L.longitude),1)]),S.createElementVNode("div",null,[f[3]||(f[3]=S.createElementVNode("strong",null,"КраЇна:",-1)),S.createTextVNode(" "+S.toDisplayString((H=k.data)==null?void 0:H.country),1)]),S.createElementVNode("div",null,[f[4]||(f[4]=S.createElementVNode("strong",null,"Код країни:",-1)),S.createTextVNode(" "+S.toDisplayString((M=k.data)==null?void 0:M.country_code),1)]),S.createElementVNode("div",null,[f[5]||(f[5]=S.createElementVNode("strong",null,"Місто:",-1)),S.createTextVNode(" "+S.toDisplayString((C=k.data)==null?void 0:C.city),1)]),S.createElementVNode("div",null,[f[6]||(f[6]=S.createElementVNode("strong",null,"Поштовий індекс:",-1)),S.createTextVNode(" "+S.toDisplayString((T=k.data)==null?void 0:T.postcode),1)])])])):S.createCommentVNode("",!0)])),S.createVNode(B,{trigger:"hover",placement:"left",teleport:"body",class:"flex"},{reference:S.withCtx(()=>[S.createVNode(o,{onClick:P.togleGeolocation,class:S.normalizeClass([P.modalButtonClasses,"w-full h-auto p-[9px] [transition:.3s] hover:[transition:.3s] text-[24px] hover:bg-[#DBEAFE] flex font-normal cursor-pointer text-[#1E40AF] bg-[#fff] rounded-[4px] border-[1px] border-solid border-[#E5E7EB]"])},null,8,["onClick","class"])]),default:S.withCtx(()=>[f[7]||(f[7]=S.createElementVNode("div",null,"Дізнатися геолокацію",-1))]),_:1,__:[7]})])}const cw=Nr(iw,[["render",lw]]);var Im=63710088e-1;function uw(p,f){var _,v,k,P,x,o,B,D,L,H,M=0,C=p.type==="FeatureCollection",T=p.type==="Feature",N=C?p.features.length:1;for(_=0;_<N;_++){for(o=C?p.features[_].geometry:T?p.geometry:p,D=C?p.features[_].properties:T?p.properties:{},L=C?p.features[_].bbox:T?p.bbox:void 0,H=C?p.features[_].id:T?p.id:void 0,B=o?o.type==="GeometryCollection":!1,x=B?o.geometries.length:1,k=0;k<x;k++){if(P=B?o.geometries[k]:o,P===null){if(f(null,M,D,L,H)===!1)return!1;continue}switch(P.type){case"Point":case"LineString":case"MultiPoint":case"Polygon":case"MultiLineString":case"MultiPolygon":{if(f(P,M,D,L,H)===!1)return!1;break}case"GeometryCollection":{for(v=0;v<P.geometries.length;v++)if(f(P.geometries[v],M,D,L,H)===!1)return!1;break}default:throw new Error("Unknown Geometry Type")}}M++}}function hw(p,f,_){var v=_;return uw(p,function(k,P,x,o,B){P===0&&_===void 0?v=k:v=f(v,k,P,x,o,B)}),v}function pw(p){return hw(p,(f,_)=>f+dw(_),0)}function dw(p){let f=0,_;switch(p.type){case"Polygon":return Mm(p.coordinates);case"MultiPolygon":for(_=0;_<p.coordinates.length;_++)f+=Mm(p.coordinates[_]);return f;case"Point":case"MultiPoint":case"LineString":case"MultiLineString":return 0}return 0}function Mm(p){let f=0;if(p&&p.length>0){f+=Math.abs(Lm(p[0]));for(let _=1;_<p.length;_++)f-=Math.abs(Lm(p[_]))}return f}var fw=Im*Im/2,ep=Math.PI/180;function Lm(p){const f=p.length-1;if(f<=2)return 0;let _=0,v=0;for(;v<f;){const k=p[v],P=p[v+1===f?0:v+1],x=p[v+2>=f?(v+2)%f:v+2],o=k[0]*ep,B=P[1]*ep,D=x[0]*ep;_+=(D-o)*Math.sin(B),v++}return _*fw}var an=63710088e-1,mw={centimeters:an*100,centimetres:an*100,degrees:360/(2*Math.PI),feet:an*3.28084,inches:an*39.37,kilometers:an/1e3,kilometres:an/1e3,meters:an,metres:an,miles:an/1609.344,millimeters:an*1e3,millimetres:an*1e3,nauticalmiles:an/1852,radians:1,yards:an*1.0936};function du(p,f,_={}){const v={type:"Feature"};return(_.id===0||_.id)&&(v.id=_.id),_.bbox&&(v.bbox=_.bbox),v.properties=f||{},v.geometry=p,v}function Rm(p,f,_={}){for(const k of p){if(k.length<4)throw new Error("Each LinearRing of a Polygon must have 4 or more Positions.");if(k[k.length-1].length!==k[0].length)throw new Error("First and last Position are not equivalent.");for(let P=0;P<k[k.length-1].length;P++)if(k[k.length-1][P]!==k[0][P])throw new Error("First and last Position are not equivalent.")}return du({type:"Polygon",coordinates:p},f,_)}function fu(p,f,_={}){if(p.length<2)throw new Error("coordinates must be an array of two or more positions");return du({type:"LineString",coordinates:p},f,_)}function yl(p,f={}){const _={type:"FeatureCollection"};return f.id&&(_.id=f.id),f.bbox&&(_.bbox=f.bbox),_.features=p,_}function gw(p,f="kilometers"){const _=mw[f];if(!_)throw new Error(f+" units is invalid");return p*_}function mu(p){return p%360*Math.PI/180}function Dm(p){if(!p)throw new Error("coord is required");if(!Array.isArray(p)){if(p.type==="Feature"&&p.geometry!==null&&p.geometry.type==="Point")return[...p.geometry.coordinates];if(p.type==="Point")return[...p.coordinates]}if(Array.isArray(p)&&p.length>=2&&!Array.isArray(p[0])&&!Array.isArray(p[1]))return[...p];throw new Error("coord must be GeoJSON Point or an Array of numbers")}function tp(p,f,_={}){var v=Dm(p),k=Dm(f),P=mu(k[1]-v[1]),x=mu(k[0]-v[0]),o=mu(v[1]),B=mu(k[1]),D=Math.pow(Math.sin(P/2),2)+Math.pow(Math.sin(x/2),2)*Math.cos(o)*Math.cos(B);return gw(2*Math.atan2(Math.sqrt(D),Math.sqrt(1-D)),_.units)}function zm(p,f,_){if(p!==null)for(var v,k,P,x,o,B,D,L=0,H=0,M,C=p.type,T=C==="FeatureCollection",N=C==="Feature",G=T?p.features.length:1,ie=0;ie<G;ie++){D=T?p.features[ie].geometry:N?p.geometry:p,M=D?D.type==="GeometryCollection":!1,o=M?D.geometries.length:1;for(var le=0;le<o;le++){var Ee=0,te=0;if(x=M?D.geometries[le]:D,x!==null){B=x.coordinates;var me=x.type;switch(L=0,me){case null:break;case"Point":if(f(B,H,ie,Ee,te)===!1)return!1;H++,Ee++;break;case"LineString":case"MultiPoint":for(v=0;v<B.length;v++){if(f(B[v],H,ie,Ee,te)===!1)return!1;H++,me==="MultiPoint"&&Ee++}me==="LineString"&&Ee++;break;case"Polygon":case"MultiLineString":for(v=0;v<B.length;v++){for(k=0;k<B[v].length-L;k++){if(f(B[v][k],H,ie,Ee,te)===!1)return!1;H++}me==="MultiLineString"&&Ee++,me==="Polygon"&&te++}me==="Polygon"&&Ee++;break;case"MultiPolygon":for(v=0;v<B.length;v++){for(te=0,k=0;k<B[v].length;k++){for(P=0;P<B[v][k].length-L;P++){if(f(B[v][k][P],H,ie,Ee,te)===!1)return!1;H++}te++}Ee++}break;case"GeometryCollection":for(v=0;v<x.geometries.length;v++)if(zm(x.geometries[v],f)===!1)return!1;break;default:throw new Error("Unknown Geometry Type")}}}}}function yw(p,f){var _,v,k,P,x,o,B,D,L,H,M=0,C=p.type==="FeatureCollection",T=p.type==="Feature",N=C?p.features.length:1;for(_=0;_<N;_++){for(o=C?p.features[_].geometry:T?p.geometry:p,D=C?p.features[_].properties:T?p.properties:{},L=C?p.features[_].bbox:T?p.bbox:void 0,H=C?p.features[_].id:T?p.id:void 0,B=o?o.type==="GeometryCollection":!1,x=B?o.geometries.length:1,k=0;k<x;k++){if(P=B?o.geometries[k]:o,P===null){if(f(null,M,D,L,H)===!1)return!1;continue}switch(P.type){case"Point":case"LineString":case"MultiPoint":case"Polygon":case"MultiLineString":case"MultiPolygon":{if(f(P,M,D,L,H)===!1)return!1;break}case"GeometryCollection":{for(v=0;v<P.geometries.length;v++)if(f(P.geometries[v],M,D,L,H)===!1)return!1;break}default:throw new Error("Unknown Geometry Type")}}M++}}function _w(p,f){yw(p,function(_,v,k,P,x){var o=_===null?null:_.type;switch(o){case null:case"Point":case"LineString":case"Polygon":return f(du(_,k,{bbox:P,id:x}),v,0)===!1?!1:void 0}var B;switch(o){case"MultiPoint":B="Point";break;case"MultiLineString":B="LineString";break;case"MultiPolygon":B="Polygon";break}for(var D=0;D<_.coordinates.length;D++){var L=_.coordinates[D],H={type:B,coordinates:L};if(f(du(H,k),v,D)===!1)return!1}})}function xw(p,f){_w(p,function(_,v,k){var P=0;if(_.geometry){var x=_.geometry.type;if(!(x==="Point"||x==="MultiPoint")){var o,B=0,D=0,L=0;if(zm(_,function(H,M,C,T,N){if(o===void 0||v>B||T>D||N>L){o=H,B=v,D=T,L=N,P=0;return}var G=fu([o,H],_.properties);if(f(G,v,k,N,P)===!1)return!1;P++,o=H})===!1)return!1}}})}function bw(p,f,_){var v=_,k=!1;return xw(p,function(P,x,o,B,D){k===!1&&_===void 0?v=P:v=f(v,P,x,o,B,D),k=!0}),v}function vw(p,f={}){return bw(p,(_,v)=>{const k=v.geometry.coordinates;return _+tp(k[0],k[1],f)},0)}const ww={props:{bgColor:{type:String,default:"#1E40AF"}}},Sw={width:"24",height:"24",viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg"},Aw=["stroke"],kw=["stroke"],Tw=["stroke"],Cw=["stroke"],Ew=["stroke"];function Pw(p,f,_,v,k,P){return S.openBlock(),S.createElementBlock("svg",Sw,[f[0]||(f[0]=S.createElementVNode("title",null,"Pencil Icon",-1)),f[1]||(f[1]=S.createElementVNode("desc",null,"A pencil icon with strokes and detailed lines",-1)),S.createElementVNode("path",{d:"M21.3 15.3C21.5238 15.523 21.7013 15.7879 21.8225 16.0796C21.9436 16.3714 22.0059 16.6841 22.0059 17C22.0059 17.3159 21.9436 17.6286 21.8225 17.9204C21.7013 18.2121 21.5238 18.477 21.3 18.7L18.7 21.3C18.4771 21.5237 18.2121 21.7013 17.9204 21.8224C17.6287 21.9435 17.3159 22.0059 17 22.0059C16.6842 22.0059 16.3714 21.9435 16.0797 21.8224C15.788 21.7013 15.523 21.5237 15.3 21.3L2.70005 8.7C2.2506 8.24838 1.99829 7.63715 1.99829 7C1.99829 6.36285 2.2506 5.75162 2.70005 5.3L5.30005 2.7C5.75167 2.25056 6.36289 1.99825 7.00005 1.99825C7.6372 1.99825 8.24842 2.25056 8.70005 2.7L21.3 15.3Z",stroke:_.bgColor,"stroke-width":"1","stroke-linecap":"round","stroke-linejoin":"round"},null,8,Aw),S.createElementVNode("path",{d:"M14.5 12.5L16.5 10.5",stroke:_.bgColor,"stroke-width":"1","stroke-linecap":"round","stroke-linejoin":"round"},null,8,kw),S.createElementVNode("path",{d:"M11.5 9.5L13.5 7.5",stroke:_.bgColor,"stroke-width":"1","stroke-linecap":"round","stroke-linejoin":"round"},null,8,Tw),S.createElementVNode("path",{d:"M8.5 6.5L10.5 4.5",stroke:_.bgColor,"stroke-width":"1","stroke-linecap":"round","stroke-linejoin":"round"},null,8,Cw),S.createElementVNode("path",{d:"M17.5 15.5L19.5 13.5",stroke:_.bgColor,"stroke-width":"1","stroke-linecap":"round","stroke-linejoin":"round"},null,8,Ew)])}const Iw={name:"vs-measure",components:{rulerIcon:Nr(ww,[["render",Pw]]),closeIcon:$h},data(){return{points:[],inputPoint:[],distance:0,distanceType:!1,modalVisible:!1,draggingPointId:null}},watch:{async points(){this.inputPoint=this.points.map(p=>{var f,_;return{id:p.properties.id,value:((_=(f=p==null?void 0:p.geometry)==null?void 0:f.coordinates)==null?void 0:_.reduceRight((v,k)=>[...v,typeof k=="string"?k:k.toFixed(5)],[]).join(","))||""}}),this.setPoints()},activeTool(p,f){p!=="length"&&f==="length"&&(this.closeMeasure(),this.modalVisible=!1),p==="length"&&!this.modalVisible&&(this.modalVisible=!0,this.initMeasureLayer())}},props:{map:{type:Object},activeTool:String,setActiveTool:Function},methods:{measureMapClick(p){const f=this.map.queryRenderedFeatures(p.point,{layers:["measure-points"]});if(f.length)this.points=this.points.filter(_=>{var v,k;return _.properties.id!==((k=(v=f[0])==null?void 0:v.properties)==null?void 0:k.id)});else{const _={type:"Feature",geometry:{type:"Point",coordinates:Object.values(p.lngLat)},properties:{id:Math.floor(Math.random()*1e3)}};this.points=this.points.concat(_)}},async setPoints(){const p=this.points.filter(k=>k==null?void 0:k.geometry),f=p.map((k,P)=>{var B,D;const x=tp(p[P?P-1:0],k),o=this.distanceType?x:x+ +((D=(B=p[P-1])==null?void 0:B.properties)==null?void 0:D.distance)||0;return k.properties.distance=o,k.properties.title=`${o.toLocaleString()}км`,k}),_=await yl(f);if(f.length>2){const k=Rm([[...f.map(P=>P.geometry.coordinates),f[0].geometry.coordinates]]);this.map.getSource("linear-area").setData(yl([k]))}else{const k=this.map.getSource("measure");k&&k.setData(_)}f.length>1&&(_.features=_.features.concat(fu(f.map(k=>k.geometry.coordinates))),this.distance=vw(fu(f.map(k=>k.geometry.coordinates))));const v=this.map.getSource("measure");v&&v.setData(_)},handleDelete(p){this.points=this.points.filter(f=>f.properties.id!==p)},addCoords(){this.points=this.points.concat({type:"Feature",properties:{id:Math.floor(Math.random()*1e3)},geometry:null})},handleChange(){this.points=this.inputPoint.map(p=>{if(/^([^,]*,[^,]*)$/.test(p.value)){const f=p.value.split(",").reverse();if(f[0]<-90||f[0]>90||f[1]>180||f[1]<-180)this.$notify({type:"error",title:"Помилка",message:"Координати неправильні"});else return{type:"Feature",geometry:{type:"Point",coordinates:f},properties:{id:p.id}}}else this.$notify({type:"error",title:"Помилка",message:"Координати неправильні"})})},removeLinearLayer(){this.map.getLayer("measure-lines")&&this.map.removeLayer("measure-lines"),this.map.getLayer("measure-points")&&this.map.removeLayer("measure-points"),this.map.getLayer("measure-symbol")&&this.map.removeLayer("measure-symbol"),this.map.getSource("measure")&&this.map.removeSource("measure"),this.map.getLayer("linear-area-fill")&&this.map.removeLayer("linear-area-fill"),this.map.getSource("linear-area")&&this.map.removeSource("linear-area"),this.distance=0},createLinearLayer(){this.map.addSource("measure",{type:"geojson",data:{type:"FeatureCollection",features:[]}}),this.map.addLayer({id:"measure-lines",type:"line",source:"measure",layout:{"line-cap":"round","line-join":"round"},paint:{"line-color":"#000","line-width":2.5},filter:["in","$type","LineString"]}),this.map.addLayer({id:"measure-points",type:"circle",source:"measure",paint:{"circle-radius":4.5,"circle-color":"#fff","circle-stroke-width":2,"circle-stroke-color":"#000"},filter:["in","$type","Point"]}),this.map.addLayer({id:"measure-symbol",source:"measure",type:"symbol",paint:{"text-color":"#111","text-halo-color":"#fff","text-halo-width":2},layout:{"symbol-placement":"point","text-letter-spacing":.2,"text-field":"{title}","text-font":["Open Sans Regular"],"text-size":15,"text-anchor":"bottom-left"},filter:["in","$type","Point"]}),this.createAreaLayer(),this.map.on("mousemove",this.mouseMove),this.map.on("mousemove",this.mouseMove)},mouseMove(p){const f=this.map.queryRenderedFeatures(p.point,{layers:["measure-points"]});this.map.getCanvas().style.cursor=f.length?"move":"crosshair"},createAreaLayer(){const{map:p}=this;p.addSource("linear-area",{type:"geojson",data:{type:"FeatureCollection",features:[]}})},distanceFormat(){const p=this.points.filter(f=>f.geometry).map(f=>f.geometry);p.forEach((f,_)=>{const v=tp(p[_?_-1:0],f);distance.push(v);const k=this.distanceType?v:v+ +this.points[_?_-1:0].properties.distance||0;this.points[_].properties.distance=k,this.points[_].properties.title=`${k.toLocaleString()}km`})},initMeasureLayer(){this.createLinearLayer(),this.map.on("mousedown","measure-points",this.handleDrag),this.map.on("click",this.measureMapClick),this.map.on("touchend",this.measureMapClick)},onMove(p){const f=p.lngLat;this.points=this.points.map(_=>_.properties.id===this.draggingPointId?{..._,geometry:{..._.geometry,coordinates:[f.lng,f.lat]}}:_),this.setPoints()},onUp(){this.map.off("mousemove",this.onMove),this.draggingPointId=null},handleDrag(p){p.preventDefault();const f=this.map.queryRenderedFeatures(p.point,{layers:["measure-points"]});if(f.length){const _=f[0].properties.id;this.draggingPointId=_,this.map.on("mousemove",this.onMove),this.map.once("mouseup",this.onUp)}},closeMeasure(){this.points=[],this.map.off("touchend",this.measureMapClick),this.map.off("click",this.measureMapClick),this.map.off("mousemove",this.mouseMove),this.map.getCanvas().style.cursor="grab",this.modalVisible=!1,this.removeLinearLayer()},toggleMeasure(){!this.activeTool||this.activeTool!=="length"?this.setActiveTool&&this.setActiveTool("length"):this.setActiveTool&&this.setActiveTool(null),this.modalVisible=!this.modalVisible,this.modalVisible?this.initMeasureLayer():this.closeMeasure()}},computed:{buttonClasses(){return{"!bg-[#DBEAFE]":this.modalVisible,"bg-white":!this.modalVisible}}}},Mw={key:0,class:"max-w-[412px] absolute w-full top-[20px] right-[60px] bg-white border rounded-[15px] p-4 z-10"},Lw={class:"flex justify-between items-center border-b pb-[16px]"},Rw={class:"pt-[16px]"},Dw={class:"text-[14px] font-medium text-[#6B7280] mb-[16px]"},zw={key:0,class:"flex items-center mb-4"},Bw={key:1,class:"text-[14px] font-bold",ref:"distanceContainer"};function Vw(p,f,_,v,k,P){const x=S.resolveComponent("closeIcon"),o=S.resolveComponent("VsPopover"),B=S.resolveComponent("VsSwitch"),D=S.resolveComponent("rulerIcon");return S.openBlock(),S.createElementBlock("div",null,[(S.openBlock(),S.createBlock(S.Teleport,{to:"#maplibre-demo-map"},[k.modalVisible&&_.activeTool==="length"?(S.openBlock(),S.createElementBlock("div",Mw,[S.createElementVNode("div",Lw,[f[3]||(f[3]=S.createElementVNode("div",{class:"text-[20px]"},"Лінійка",-1)),S.createVNode(o,{trigger:"hover",teleport:"body"},{reference:S.withCtx(()=>[S.createElementVNode("button",{type:"button",class:"size-8 inline-flex justify-center items-center gap-x-2 rounded-full border border-transparent bg-gray-100 text-gray-800 hover:bg-gray-200 focus:outline-none focus:bg-gray-200 disabled:opacity-50 disabled:pointer-events-none dark:bg-neutral-700 dark:hover:bg-neutral-600 dark:text-neutral-400 dark:focus:bg-neutral-600",onClick:f[0]||(f[0]=(...L)=>P.toggleMeasure&&P.toggleMeasure(...L))},[S.createVNode(x,{class:"cursor-pointer"})])]),default:S.withCtx(()=>[f[2]||(f[2]=S.createTextVNode(" Приховати панель "))]),_:1,__:[2]})]),S.createElementVNode("div",Rw,[S.createElementVNode("p",Dw,[k.points.length?S.createCommentVNode("",!0):(S.openBlock(),S.createElementBlock(S.Fragment,{key:0},[S.createTextVNode(" Натисніть на мапу, щоб додати першу точку. ")],64)),k.points.length==1?(S.openBlock(),S.createElementBlock(S.Fragment,{key:1},[S.createTextVNode(" Натисніть на мапу, щоб додати другу точку. ")],64)):S.createCommentVNode("",!0),k.points.length>1?(S.openBlock(),S.createElementBlock(S.Fragment,{key:2},[S.createTextVNode(" Продовжуйте натискати для додавання нових точок. Точки можна рухати. ")],64)):S.createCommentVNode("",!0)]),k.points.length>=3?(S.openBlock(),S.createElementBlock("div",zw,[S.createVNode(B,{modelValue:k.distanceType,"onUpdate:modelValue":f[1]||(f[1]=L=>k.distanceType=L),onChange:P.setPoints},null,8,["modelValue","onChange"]),f[4]||(f[4]=S.createElementVNode("span",{class:"text-[14px] font-medium text-[#6B7280] ml-2"},"загальна | до точки",-1))])):S.createCommentVNode("",!0),k.points.length>=2?(S.openBlock(),S.createElementBlock("div",Bw,[f[5]||(f[5]=S.createTextVNode(" Загальна відстань: ")),S.createElementVNode("span",null,S.toDisplayString(k.distance.toLocaleString())+" км",1)],512)):S.createCommentVNode("",!0)])])):S.createCommentVNode("",!0)])),S.createVNode(o,{trigger:"hover",placement:"left",teleport:"body",class:"flex"},{reference:S.withCtx(()=>[S.createVNode(D,{class:S.normalizeClass([P.buttonClasses,"w-full h-auto p-[9px] [transition:.3s] hover:[transition:.3s] text-[24px] hover:bg-[#DBEAFE] flex font-normal cursor-pointer text-[#1E40AF] bg-[#fff] rounded-[4px] border-[1px] border-solid border-[#E5E7EB]"]),onClick:P.toggleMeasure},null,8,["class","onClick"])]),default:S.withCtx(()=>[f[6]||(f[6]=S.createElementVNode("div",null,"Виміряти довжину",-1))]),_:1,__:[6]})])}const Ow=Nr(Iw,[["render",Vw],["__scopeId","data-v-401b2f16"]]),Fw={props:{bgColor:{type:String,default:"#1E40AF"}}},Nw={width:"24",height:"24",viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg"},qw=["stroke"],Uw=["stroke"],jw=["stroke"];function Hw(p,f,_,v,k,P){return S.openBlock(),S.createElementBlock("svg",Nw,[f[0]||(f[0]=S.createElementVNode("title",null,"Crossed Arrows with Curved Line Icon",-1)),f[1]||(f[1]=S.createElementVNode("desc",null,"Two crossed arrows with a curved line to the right",-1)),S.createElementVNode("path",{d:"M4 19L12 11",stroke:_.bgColor,"stroke-width":"1","stroke-linecap":"round","stroke-linejoin":"round"},null,8,qw),S.createElementVNode("path",{d:"M12 19L4 11",stroke:_.bgColor,"stroke-width":"1","stroke-linecap":"round","stroke-linejoin":"round"},null,8,Uw),S.createElementVNode("path",{d:"M20 12H16C16 10.5 16.442 10 17.5 9.5C18.558 9 20 8.334 20 7.002C20 6.53 19.83 6.072 19.516 5.712C19.196 5.35007 18.7613 5.1092 18.2848 5.02981C17.8083 4.95043 17.319 5.03735 16.899 5.276C16.479 5.515 16.161 5.89 16 6.336",stroke:_.bgColor,"stroke-width":"1","stroke-linecap":"round","stroke-linejoin":"round"},null,8,jw)])}const Ww={components:{areaIcon:Nr(Fw,[["render",Hw]]),closeIcon:$h},name:"vs-area-measure",props:{map:{type:Object},activeTool:String,setActiveTool:Function},data(){return{points:[],inputPoint:[],area:0,modalVisible:!1,draggingPointId:null}},watch:{async points(){this.inputPoint=this.points.map(p=>{var f,_;return{id:p.properties.id,value:((_=(f=p==null?void 0:p.geometry)==null?void 0:f.coordinates)==null?void 0:_.reduceRight((v,k)=>[...v,typeof k=="string"?k:k.toFixed(5)],[]).join(","))||""}}),this.setPoints()},activeTool(p,f){p!=="area"&&f==="area"&&(this.closeMeasure(),this.modalVisible=!1),p==="area"&&!this.modalVisible&&(this.modalVisible=!0,this.initMeasureLayer())}},methods:{measureMapClick(p){const f=this.map.queryRenderedFeatures(p.point,{layers:["area-measure-points"]});if(f.length)this.points=this.points.filter(_=>_.properties.id!==f[0].properties.id);else{const _={type:"Feature",geometry:{type:"Point",coordinates:Object.values(p.lngLat)},properties:{id:Math.floor(Math.random()*1e3)}};this.points=this.points.concat(_)}},async setPoints(){const p=this.points.filter(v=>v==null?void 0:v.geometry),f=await yl(p);if(p.length>2){const v=Rm([[...p.map(P=>P.geometry.coordinates),p[0].geometry.coordinates]]);this.area=pw(v)/1e6;const k=this.map.getSource("area-linear-area");k&&k.setData(yl([v]))}else{const v=this.map.getSource("area-linear-area");v&&v.setData(yl([]))}p.length>1&&(f.features=f.features.concat(fu(p.map(v=>v.geometry.coordinates))));const _=this.map.getSource("area-measure");_&&_.setData(f)},handleDelete(p){this.points=this.points.filter(f=>f.properties.id!==p)},addCoords(){this.points=this.points.concat({type:"Feature",properties:{id:Math.floor(Math.random()*1e3)},geometry:null})},handleChange(){this.points=this.inputPoint.map(p=>{if(/^([^,]*,[^,]*)$/.test(p.value)){const f=p.value.split(",").reverse();if(f[0]<-90||f[0]>90||f[1]>180||f[1]<-180)this.$notify({type:"error",title:"Помилка",message:"Недійсні координати!"});else return{type:"Feature",geometry:{type:"Point",coordinates:f},properties:{id:p.id}}}else this.$notify({type:"error",title:"Помилка",message:"Недійсні координати!"})})},removeLinearLayer(){["area-measure-lines","area-measure-points","area-linear-area-fill","center-symbol"].forEach(_=>{this.map.getLayer(_)&&this.map.removeLayer(_)}),["area-measure","area-linear-area"].forEach(_=>{this.map.getSource(_)&&this.map.removeSource(_)}),this.area=0},createLinearLayer(){this.map.addSource("area-measure",{type:"geojson",data:{type:"FeatureCollection",features:[]}}),this.map.addLayer({id:"area-measure-lines",type:"line",source:"area-measure",layout:{"line-cap":"round","line-join":"round"},paint:{"line-color":"#000","line-width":2.5},filter:["in","$type","LineString"]}),this.map.addLayer({id:"area-measure-points",type:"circle",source:"area-measure",paint:{"circle-radius":4.5,"circle-color":"#fff","circle-stroke-width":2,"circle-stroke-color":"#000"},filter:["in","$type","Point"]}),this.createAreaLayer(),this.map.on("mousemove",this.mouseMove)},mouseMove(p){const f=this.map.queryRenderedFeatures(p.point,{layers:["area-measure-points"]});this.map.getCanvas().style.cursor=f.length?"move":"crosshair"},createAreaLayer(){this.map.addSource("area-linear-area",{type:"geojson",data:{type:"FeatureCollection",features:[]}}),this.map.addLayer({id:"area-linear-area-fill",type:"fill",source:"area-linear-area",layout:{},paint:{"fill-color":"#000","fill-opacity":.06}})},initMeasureLayer(){this.createLinearLayer(),this.map.on("mousedown","area-measure-points",this.handleDrag),this.map.on("click",this.measureMapClick),this.map.on("touchend",this.measureMapClick)},onMove(p){const f=p.lngLat;this.points=this.points.map(_=>_.properties.id===this.draggingPointId?{..._,geometry:{..._.geometry,coordinates:[f.lng,f.lat]}}:_),this.setPoints()},onUp(){this.map.off("mousemove",this.onMove),this.draggingPointId=null},handleDrag(p){p.preventDefault();const f=this.map.queryRenderedFeatures(p.point,{layers:["area-measure-points"]});if(f.length){const _=f[0].properties.id;this.draggingPointId=_,this.map.on("mousemove",this.onMove),this.map.once("mouseup",this.onUp)}},closeMeasure(){this.points=[],this.map.off("touchend",this.measureMapClick),this.map.off("click",this.measureMapClick),this.map.off("mousemove",this.mouseMove),this.map.getCanvas().style.cursor="grab",this.modalVisible=!1,this.removeLinearLayer()},toggleMeasure(){!this.activeTool||this.activeTool!=="area"?this.setActiveTool&&this.setActiveTool("area"):this.setActiveTool&&this.setActiveTool(null),this.modalVisible=!this.modalVisible,this.modalVisible?this.initMeasureLayer():this.closeMeasure()}},computed:{modalButtonClasses(){return{"!bg-[#DBEAFE]":this.modalVisible,"bg-white":!this.modalVisible}}}},Zw={key:0,class:"max-w-[412px] absolute w-full top-[20px] right-[60px] bg-white border rounded-[15px] p-4 z-10"},Kw={class:"flex justify-between items-center border-b pb-[16px]"},Gw={class:"pt-[16px]"},Jw={class:"text-[14px] font-medium text-[#6B7280] mb-[16px]"},Xw={key:0,ref:"distanceContainer",class:"text-[14px] font-bold"};function Qw(p,f,_,v,k,P){const x=S.resolveComponent("closeIcon"),o=S.resolveComponent("VsPopover"),B=S.resolveComponent("areaIcon");return S.openBlock(),S.createElementBlock("div",null,[(S.openBlock(),S.createBlock(S.Teleport,{to:"#maplibre-demo-map"},[k.modalVisible&&_.activeTool==="area"?(S.openBlock(),S.createElementBlock("div",Zw,[S.createElementVNode("div",Kw,[f[2]||(f[2]=S.createElementVNode("div",{class:"text-lg"},"Площа",-1)),S.createVNode(o,{trigger:"hover",teleport:"body"},{reference:S.withCtx(()=>[S.createElementVNode("button",{type:"button",class:"size-8 inline-flex justify-center items-center gap-x-2 rounded-full border border-transparent bg-gray-100 text-gray-800 hover:bg-gray-200 focus:outline-none focus:bg-gray-200 disabled:opacity-50 disabled:pointer-events-none dark:bg-neutral-700 dark:hover:bg-neutral-600 dark:text-neutral-400 dark:focus:bg-neutral-600",onClick:f[0]||(f[0]=(...D)=>P.toggleMeasure&&P.toggleMeasure(...D))},[S.createVNode(x,{class:"cursor-pointer"})])]),default:S.withCtx(()=>[f[1]||(f[1]=S.createTextVNode(" Приховати панель "))]),_:1,__:[1]})]),S.createElementVNode("div",Gw,[S.createElementVNode("p",Jw,[k.points.length?S.createCommentVNode("",!0):(S.openBlock(),S.createElementBlock(S.Fragment,{key:0},[S.createTextVNode(" Натисніть на мапу, щоб додати першу точку. ")],64)),k.points.length==1?(S.openBlock(),S.createElementBlock(S.Fragment,{key:1},[S.createTextVNode(" Натисніть на мапу, щоб додати другу точку. ")],64)):S.createCommentVNode("",!0),k.points.length>1?(S.openBlock(),S.createElementBlock(S.Fragment,{key:2},[S.createTextVNode(" Продовжуйте натискати для додавання нових точок. Точки можна рухати. ")],64)):S.createCommentVNode("",!0)]),k.points.length>2?(S.openBlock(),S.createElementBlock("div",Xw,[f[3]||(f[3]=S.createTextVNode(" Загальна площа: ")),S.createElementVNode("span",null,S.toDisplayString(k.area.toLocaleString())+" км²",1)],512)):S.createCommentVNode("",!0)])])):S.createCommentVNode("",!0)])),S.createVNode(o,{trigger:"hover",placement:"left",teleport:"body",class:"flex"},{reference:S.withCtx(()=>[S.createVNode(B,{onClick:P.toggleMeasure,class:S.normalizeClass([P.modalButtonClasses,"w-full h-auto p-[9px] [transition:.3s] hover:[transition:.3s] text-[24px] hover:bg-[#DBEAFE] flex font-normal cursor-pointer text-[#1E40AF] bg-[#fff] rounded-[4px] border-[1px] border-solid border-[#E5E7EB]"])},null,8,["onClick","class"])]),default:S.withCtx(()=>[f[4]||(f[4]=S.createElementVNode("div",null,"Виміряти площу",-1))]),_:1,__:[4]})])}const Yw=Nr(Ww,[["render",Qw],["__scopeId","data-v-024154e1"]]),$w=Nr({__name:"vs-map-widget-column",props:{position:String,widgets:Array,map:Object,mapLoaded:Boolean,cardValues:Object,hasFilters:Boolean,currentFilterLayer:Object,enabledLayerIds:Array,getWidgetComponent:Function,getColumnWidth:Function,rightColumnOffset:[String,Number],maxHeight:Number,history:Boolean},emits:["set-filter-layer","update:enabledLayerIds","cardValuesId","closeCard","content-resize"],setup(p,{expose:f,emit:_}){const v=_,k=S.ref(null);f({columnRef:k});let P=null;return S.onMounted(()=>{P=new MutationObserver(()=>{var x;clearTimeout((x=k.value)==null?void 0:x._resizeTimeout),k.value._resizeTimeout=setTimeout(()=>{v("content-resize")},30)}),k.value&&P.observe(k.value,{childList:!0,subtree:!0,characterData:!0})}),S.onUnmounted(()=>{P&&P.disconnect()}),(x,o)=>p.mapLoaded?(S.openBlock(),S.createElementBlock("div",{key:0,class:S.normalizeClass(["widget-column",[S.unref(bd)(p.position)]]),ref_key:"columnRef",ref:k,style:S.normalizeStyle({maxHeight:p.maxHeight?p.maxHeight+"px":void 0,width:p.getColumnWidth(p.position),...p.rightColumnOffset?{right:p.rightColumnOffset}:{}})},[(S.openBlock(!0),S.createElementBlock(S.Fragment,null,S.renderList(p.widgets,B=>(S.openBlock(),S.createElementBlock(S.Fragment,{key:B.id||B.type},[B.type!=="card"?(S.openBlock(),S.createBlock(S.resolveDynamicComponent(p.getWidgetComponent(B.type)),{key:0,map:p.map,config:B.config,hasFilters:p.hasFilters,currentLayer:p.currentFilterLayer,enabledLayerIds:p.enabledLayerIds,history:p.history,onSetFilterLayer:o[0]||(o[0]=D=>x.$emit("set-filter-layer",D)),"onUpdate:enabledLayerIds":o[1]||(o[1]=D=>x.$emit("update:enabledLayerIds",D)),onCardValuesId:o[2]||(o[2]=D=>x.$emit("cardValuesId",D)),onContentResize:o[3]||(o[3]=D=>x.$emit("content-resize")),class:"widget"},null,40,["map","config","hasFilters","currentLayer","enabledLayerIds","history"])):S.createCommentVNode("",!0),p.cardValues&&B.type==="card"?(S.openBlock(),S.createBlock(cf,{key:1,config:B.config,cardValues:p.cardValues,class:"widget",onClose:o[4]||(o[4]=D=>x.$emit("closeCard")),onContentResize:o[5]||(o[5]=D=>x.$emit("content-resize"))},null,8,["config","cardValues"])):S.createCommentVNode("",!0)],64))),128))],6)):S.createCommentVNode("",!0)}},[["__scopeId","data-v-b777fbc8"]]),e2={class:"map-widgets"},t2={class:"absolute top-[180px] right-2 z-10 flex flex-col gap-[5px]"},Bm=Nr({__name:"vs-map",props:{config:{type:Object,required:!0}},setup(p){const f=p,_=S.ref(null),v=S.ref(!1);let k=null;const P=S.ref(null),x=S.ref(null),o=S.ref([]),B=S.ref([]),D=S.ref(null),L=S.ref(null),H=["top-left","top-right","top-center","center","bottom-left","bottom-center","bottom-right"],M={"top-left":S.ref(null),"top-right":S.ref(null),"top-center":S.ref(null),center:S.ref(null),"bottom-left":S.ref(null),"bottom-center":S.ref(null),"bottom-right":S.ref(null)};function C(gt,bt){M[gt].value=bt==null?void 0:bt.columnRef}const T=S.ref(0),N=S.ref(0),G=S.ref(0),ie=S.ref(0),le=S.ref(0),Ee=S.ref(0),te=S.ref(0);function me(gt){if(!gt){const Ot={topLeft:M["top-left"].value,topRight:M["top-right"].value,topCenter:M["top-center"].value,center:M.center.value,bottomLeft:M["bottom-left"].value,bottomRight:M["bottom-right"].value,bottomCenter:M["bottom-center"].value};Object.values(Ot).forEach(Nt=>{Nt&&(Nt.style.maxHeight="")});const{heights:pr}=Pm(Ot,window.innerHeight);T.value=pr.topLeft,N.value=pr.topRight,G.value=pr.topCenter,ie.value=pr.center,le.value=pr.bottomLeft,Ee.value=pr.bottomRight,te.value=pr.bottomCenter;return}const ct={"top-left":["top-left","bottom-left"],"bottom-left":["top-left","bottom-left"],"top-right":["top-right","bottom-right"],"bottom-right":["top-right","bottom-right"],"top-center":["top-center","bottom-center"],"bottom-center":["top-center","bottom-center"],center:["center"]}[gt]||[],Bt={topLeft:M["top-left"].value,topRight:M["top-right"].value,topCenter:M["top-center"].value,center:M.center.value,bottomLeft:M["bottom-left"].value,bottomRight:M["bottom-right"].value,bottomCenter:M["bottom-center"].value};ct.forEach(Ot=>{Bt[Ot]&&(Bt[Ot].style.maxHeight="")});const{heights:Ht}=Pm(Bt,window.innerHeight);ct.forEach(Ot=>{Bt[Ot]&&Ht[Ot]&&(Bt[Ot].style.maxHeight=Ht[Ot]+"px")}),ct.includes("top-left")&&(T.value=Ht.topLeft),ct.includes("bottom-left")&&(le.value=Ht.bottomLeft),ct.includes("top-right")&&(N.value=Ht.topRight),ct.includes("bottom-right")&&(Ee.value=Ht.bottomRight),ct.includes("top-center")&&(G.value=Ht.topCenter),ct.includes("bottom-center")&&(te.value=Ht.bottomCenter),ct.includes("center")&&(ie.value=Ht.center)}function De(gt){var bt,ct;return gt==="center"?[...((bt=f.config.widgets)==null?void 0:bt.filter(Ht=>(Ht.position||{})==="center"))||[],...B.value.filter(Ht=>Ht.position==="center")]:((ct=f.config.widgets)==null?void 0:ct.filter(Bt=>(Bt.position||{})===gt))||[]}hu.registerHelper("eq",(gt,bt)=>gt===bt),hu.registerHelper("formatDate",gt=>gt?new Date(gt).toLocaleDateString():"Немає дати"),hu.registerHelper("get",(gt,bt)=>(gt==null?void 0:gt[bt])??"");const qe=(gt,bt,ct)=>{try{if(gt)if(ct==="markdown"){const Bt=gt.replace(/\{\{([^}]+)\}\}/g,(Ht,Ot)=>{try{return new Function("data",`with(data) { return ${Ot} }`)(bt)}catch{return""}});return br(Bt)}else return hu.compile(gt)(bt)}catch(Bt){return console.error("Error processing template:",Bt),gt}},rt=(gt,bt,ct,Bt,Ht,Ot)=>{const pr=qe(gt,Bt,Ht),Nt=bt?qe(bt,Bt,Ht):"";let mr="";return ct!=null&&ct.length&&(mr=ct.map(jr=>{const mi=qe(jr.value,Bt,Ht);return`
|
|
823
|
-
<tr class="flex justify-between items-center">
|
|
824
|
-
<td class="font-medium mr-1.5 flex items-center">${jr.label}</td>
|
|
825
|
-
<td class="text-right">${mi}</td>
|
|
826
|
-
</tr>
|
|
827
|
-
`}).join("")),`
|
|
828
|
-
<div class="absolute min-w-28 max-w-[300px] bg-white/70 border border-gray-200 rounded-lg shadow-md text-gray-800 pointer-events-none" style="left: ${Ot.x+10}px; top: ${Ot.y}px">
|
|
829
|
-
${pr?`
|
|
830
|
-
<div class="font-semibold text-sm border-b border-solid border-gray-200 text-gray-800 rounded-t-lg px-2 py-1">
|
|
831
|
-
<h3>${pr}</h3>
|
|
832
|
-
</div>
|
|
833
|
-
`:""}
|
|
834
|
-
${bt?`<div class="text-sm px-2 py-1 break-words">${Nt}</div>`:""}
|
|
835
|
-
${ct!=null&&ct.length&&!bt?`
|
|
836
|
-
<div class="text-xs px-2 py-0.5 text-gray-500">
|
|
837
|
-
<table class="w-full">
|
|
838
|
-
<tbody>${mr}</tbody>
|
|
839
|
-
</table>
|
|
840
|
-
</div>
|
|
841
|
-
`:""}
|
|
842
|
-
</div>
|
|
843
|
-
`},At=gt=>({legend:Ry,basemaps:Oy,layers:u_,info:__,attribute:xx,catalog:jb,filters:c1,"inline-filters":f1,list:k1,card:cf})[gt],_t=S.computed(()=>{var gt;return(gt=f.config.widgets)==null?void 0:gt.some(bt=>bt.type==="filters")}),lt=gt=>{P.value=gt};function xt(){const gt=new URLSearchParams(window.location.search),bt=parseFloat(gt.get("x")),ct=parseFloat(gt.get("y")),Bt=parseFloat(gt.get("z")),Ht=parseFloat(gt.get("bearing")),Ot=parseFloat(gt.get("pitch"));return{center:isFinite(bt)&&isFinite(ct)?[bt,ct]:null,zoom:isFinite(Bt)?Bt:null,bearing:isFinite(Ht)?Ht:null,pitch:isFinite(Ot)?Ot:null}}function qt({center:gt,zoom:bt,bearing:ct,pitch:Bt}){const Ht=new URLSearchParams(window.location.search);Ht.set("x",gt[0].toFixed(5)),Ht.set("y",gt[1].toFixed(5)),Ht.set("z",bt.toFixed(2)),Ht.set("bearing",ct.toFixed(2)),Ht.set("pitch",Bt.toFixed(2));const Ot=`${window.location.pathname}?${Ht.toString()}`;window.history.replaceState({},"",Ot)}const Xt=()=>{var Ot,pr;const gt={version:8,glyphs:"https://cdn.softpro.ua/data/fonts/{fontstack}/{range}.pbf",sources:{},layers:[]};let bt=f.config.map.center,ct=f.config.map.zoom,Bt=f.config.map.bearing||0,Ht=f.config.map.pitch||0;if(f.config.history){const Nt=xt();Nt.center&&(bt=Nt.center),Nt.zoom!==null&&(ct=Nt.zoom),Nt.bearing!==null&&(Bt=Nt.bearing),Nt.pitch!==null&&(Ht=Nt.pitch)}if(_.value=new wh.Map({container:"maplibre-demo-map",style:gt,center:bt,zoom:ct,bearing:Bt,pitch:Ht,maxBounds:[18.0856083513,40.3614785833,58.0807890155,56.3350745713]}),(pr=(Ot=f.config.interactions)==null?void 0:Ot.navigation)!=null&&pr.enabled){const Nt=new wh.NavigationControl({showCompass:!0,showZoom:!0,visualizePitch:!0});_.value.addControl(Nt,"top-right")}_.value.on("load",async()=>{var Nt,mr,jr,mi;try{await n1(_.value);const Ir=xt(),gi=Ir.center&&Ir.zoom!==null;if((Nt=f.config.map)!=null&&Nt.bbox&&!gi){const[hr,lr,Ft,wr]=f.config.map.bbox;_.value.fitBounds([[hr,lr],[Ft,wr]],{padding:50,duration:0})}if(await(async()=>{var lr,Ft,wr;const hr=((wr=(Ft=(lr=f.config.widgets.find(dr=>dr.type==="layers"))==null?void 0:lr.config)==null?void 0:Ft.layers)==null?void 0:wr.filter(dr=>{var Jt;return((Jt=dr.style)==null?void 0:Jt.attrType)==="icon-by-attribute"}))||[];for(const dr of hr){const{rules:Jt,default_icon:fr,icon_base_url:It}=dr.style,wt=[...Jt.map(Ae=>Ae.icon),fr].filter(Boolean);for(const Ae of wt)try{const K=`${It}${Ae}`,Q=await _.value.loadImage(K);_.value.hasImage(Ae)||_.value.addImage(Ae,Q.data)}catch(K){console.error(`Failed to load icon: ${Ae}`,K)}}})(),Lo(_.value,{id:"voyager",url:"https://data.gki.com.ua/api-user/rtile/voyager/ua/{z}/{x}/{y}.png",title:"Базова карта (voyager)",service:"raster",attribution:"© <a href='http://www.openstreetmap.org/copyright'>OpenStreetMap</a>, © <a href='https://carto.com/attributions'>CARTO</a>"}),(mi=(jr=(mr=f.config)==null?void 0:mr.interactions)==null?void 0:jr.hover)!=null&&mi.enabled&&(_.value.on("mousemove",hr=>{var fr,It,wt,Ae;const lr=_.value.queryRenderedFeatures(hr.point);if(_.value&&_.value.getCanvas&&(_.value.getCanvas().style.cursor=lr.length?"pointer":""),!lr.length){if(x.value){const K=(fr=_.value.getSource(x.value.source))==null?void 0:fr.type,Q={source:x.value.source,id:x.value.id};K==="vector"&&(Q.sourceLayer=x.value.source),Rr(_.value,x.value.source,x.value.id,{hovered:!1}),x.value=null}k&&(k.remove(),k=null);return}const Ft=lr[0];if(!x.value||x.value.id!==Ft.id||x.value.source!==Ft.layer.source){if(x.value){const ee=(It=_.value.getSource(x.value.source))==null?void 0:It.type,he={source:x.value.source,id:x.value.id};ee==="vector"&&(he.sourceLayer=x.value.source),Rr(_.value,x.value.source,x.value.id,{hovered:!1})}const K=(wt=_.value.getSource(Ft.layer.source))==null?void 0:wt.type,Q={source:Ft.layer.source,id:Ft.id};K==="vector"&&(Q.sourceLayer=Ft.layer.source),Rr(_.value,Ft.layer.source,Ft.id,{hovered:!0}),x.value={source:Ft.layer.source,id:Ft.id}}const wr=f.config.widgets.find(K=>K.type==="layers"),dr=f.config.widgets.find(K=>K.type==="attribute");let Jt=null;if(wr&&(Jt=wr.config.layers.find(K=>K.id===Ft.layer.source)),!Jt&&dr&&dr.config.layer.id===Ft.layer.source&&(Jt=dr.config.layer),(Ae=Jt==null?void 0:Jt.style)!=null&&Ae.popup){const K=Jt.style.popup;let Q=K.title,ee="";K.mode==="markdown"?ee=Array.isArray(K.content)?K.content.join(`
|
|
844
|
-
|
|
845
|
-
`):"":ee=Array.isArray(K.content)?K.content.join(""):"",k||(k=document.createElement("div"),_.value.getContainer().appendChild(k));const he=_.value.project(hr.lngLat);k.innerHTML=rt(Q,ee,K.fields,Ft.properties,K.mode,he)}}),_.value.on("mouseleave",()=>{var hr;if(k&&(k.remove(),k=null),x.value){const lr=(hr=_.value.getSource(x.value.source))==null?void 0:hr.type,Ft={source:x.value.source,id:x.value.id};lr==="vector"&&(Ft.sourceLayer=x.value.source),Rr(_.value,x.value.source,x.value.id,{hovered:!1}),x.value=null}_.value&&_.value.getCanvas&&(_.value.getCanvas().style.cursor="")})),_.value.on("click",async hr=>{var wt;if(["length","area","print"].includes(L.value))return;const lr=_.value.queryRenderedFeatures(hr.point);if(!lr.length)return;o.value.forEach(Ae=>{var ee;const K=(ee=_.value.getSource(Ae.source))==null?void 0:ee.type,Q={source:Ae.source,id:Ae.id};K==="vector"&&(Q.sourceLayer=Ae.source),Rr(_.value,Ae.source,Ae.id,{selected:!1})}),o.value=[];const Ft=lr[0],wr=(wt=_.value.getSource(Ft.layer.source))==null?void 0:wt.type,dr={source:Ft.layer.source,id:Ft.id};wr==="vector"&&(dr.sourceLayer=Ft.layer.source),Rr(_.value,Ft.layer.source,Ft.id,{selected:!0}),o.value.push({source:Ft.layer.source,id:Ft.id});const Jt=f.config.widgets.find(Ae=>Ae.type==="layers"),fr=f.config.widgets.find(Ae=>Ae.type==="attribute");let It=(fr==null?void 0:fr.config.layer)||(Jt==null?void 0:Jt.config.layers.find(Ae=>Ae.id===Ft.layer.source));D.value={layer:(It==null?void 0:It.service_key)||"",map:(It==null?void 0:It.map_key)||"",id:Ft.properties.id,title:(It==null?void 0:It.title)||""}}),_.value.on("dblclick",hr=>{var wr;if(["length","area","print"].includes(L.value))return;Zr([hr.lngLat.lng,hr.lngLat.lat]);const lr=f.config.widgets.find(dr=>dr.type==="layers");let Ft=null;(wr=lr==null?void 0:lr.config)!=null&&wr.layers&&(Ft=lr.config.layers.find(dr=>dr.visible!==!1&&["tms","wms","raster"].includes((dr.service_type||dr.service||"").toLowerCase()))),D.value={layer:(Ft==null?void 0:Ft.map_key)||"",map:(Ft==null?void 0:Ft.service_key)||"",id:"",title:(Ft==null?void 0:Ft.title)||""}}),_.value.resize(),v.value=!0,f.config.history){const hr=()=>{const lr=_.value.getCenter();qt({center:[lr.lng,lr.lat],zoom:_.value.getZoom(),bearing:_.value.getBearing(),pitch:_.value.getPitch()})};_.value.on("moveend",hr),_.value.on("rotate",hr),_.value.on("pitch",hr)}}catch(Ir){console.error("Error loading map:",Ir)}})},kr=()=>{Si(),o.value.forEach(gt=>{_.value&&Rr(_.value,gt.source,gt.id,{selected:!1})}),o.value=[],D.value=null};S.onMounted(async()=>{await S.nextTick(),Xt(),me(),window.addEventListener("resize",()=>{me()}),S.watch([M["top-left"],M["top-right"],M["top-center"],M.center,M["bottom-left"],M["bottom-right"],M["bottom-center"],()=>f.config.widgets,B],async()=>{await S.nextTick(),me(),setTimeout(me,0)},{deep:!0}),S.watch(v,gt=>{gt&&S.nextTick().then(()=>{me()})})}),S.onUnmounted(()=>{window.removeEventListener("resize",me)});const vr=S.computed(()=>{var bt;return{height:f.config.height||((bt=f.config.map)==null?void 0:bt.height)||"100vh",width:"100%"}}),ni=gt=>{var ct;const bt=(ct=f.config.widgets)==null?void 0:ct.find(Bt=>Bt.position===gt);return(bt==null?void 0:bt.width)||"400px"},ir=S.ref([]),Ji=()=>{var bt;const gt=f.config.widgets.find(ct=>ct.type==="layers");return(bt=gt==null?void 0:gt.config)!=null&&bt.layers?gt.config.layers.map(ct=>({...ct,visible:ct.visible??!1})).filter(ct=>ct.visible).map(ct=>ct.id):[]};ir.value=Ji();function Rr(gt,bt,ct,Bt){gt.getStyle().layers.filter(Ot=>Ot.source===bt).forEach(Ot=>{var Nt;const pr={source:bt,id:ct};((Nt=gt.getSource(bt))==null?void 0:Nt.type)==="vector"&&Ot["source-layer"]&&(pr.sourceLayer=Ot["source-layer"]),gt.setFeatureState(pr,Bt)})}const Xi=S.computed(()=>{var gt,bt;return!!((bt=(gt=f.config.interactions)==null?void 0:gt.navigation)!=null&&bt.enabled)}),Dr=S.computed(()=>Array.isArray(f.config.tools)&&f.config.tools.length>0),ln=S.computed(()=>Xi.value||Dr.value?"70px":"20px");function Si(){_.value&&(_.value.getLayer("layer-with-pulsing-dot")&&_.value.removeLayer("layer-with-pulsing-dot"),_.value.getSource("dot-point")&&_.value.removeSource("dot-point"),_.value.hasImage&&_.value.hasImage("pulsing-dot")&&_.value.removeImage("pulsing-dot"))}function Zr(gt){var Bt,Ht,Ot,pr;Si();const bt=80,ct={width:bt,height:bt,data:new Uint8Array(bt*bt*4),onAdd(){const Nt=document.createElement("canvas");Nt.width=this.width,Nt.height=this.height,this.context=Nt.getContext("2d",{willReadFrequently:!0})},render(){var Vi;const mr=performance.now()%2e3/2e3,jr=bt/2*.3,mi=bt/2*.7*mr+jr,{context:Ir}=this;Ir.clearRect(0,0,this.width,this.height),Ir.beginPath(),Ir.arc(this.width/2,this.height/2,mi,0,Math.PI*2),Ir.fillStyle=`rgba(255, 100, 100, ${1-mr})`,Ir.fill();const gi=bt/2*.7*(mr-.5<0?mr-.5+1:mr-.5)+jr;return Ir.beginPath(),Ir.arc(this.width/2,this.height/2,gi,0,Math.PI*2),Ir.fillStyle=`rgba(255, 100, 100, ${1-(mr-.5<0?mr-.5+1:mr-.5)})`,Ir.fill(),this.data=Ir.getImageData(0,0,this.width,this.height).data,(Vi=_.value)==null||Vi.triggerRepaint(),!0}};(Bt=_.value)!=null&&Bt.hasImage("pulsing-dot")||(Ht=_.value)==null||Ht.addImage("pulsing-dot",ct,{pixelRatio:2}),(Ot=_.value)==null||Ot.addSource("dot-point",{type:"geojson",data:{type:"Feature",geometry:{type:"Point",coordinates:gt}}}),(pr=_.value)==null||pr.addLayer({id:"layer-with-pulsing-dot",type:"symbol",source:"dot-point",layout:{"icon-image":"pulsing-dot"},paint:{"icon-opacity":.6}})}const Qi=S.computed(()=>({center:f.config.map.center,zoom:f.config.map.zoom,pitch:f.config.map.pitch||0,bearing:f.config.map.bearing||0,bbox:f.config.map.bbox||null})),Yr={home:R1,print:F1,geolocation:cw,pitch:U1,length:Ow,area:Yw},Yi=gt=>{L.value=gt};function Li(gt){const{map_key:bt,service_key:ct}=f.config.widgets.find(Bt=>Bt.type==="list").config;bt&&ct&&(D.value={id:gt,map:bt,layer:ct})}function In(gt){switch(gt){case"top-left":return T.value;case"top-right":return N.value;case"top-center":return G.value;case"center":return ie.value;case"bottom-left":return le.value;case"bottom-right":return Ee.value;case"bottom-center":return te.value;default:return 0}}const fi=S.computed(()=>{var gt;return((gt=f.config.widgets)==null?void 0:gt.filter(bt=>bt.position==="absolute"))||[]});return(gt,bt)=>(S.openBlock(),S.createElementBlock("div",{id:"maplibre-demo-map",style:S.normalizeStyle(vr.value)},[v.value?S.createCommentVNode("",!0):(S.openBlock(),S.createBlock(C1,{key:0})),S.withDirectives(S.createElementVNode("div",e2,[(S.openBlock(),S.createElementBlock(S.Fragment,null,S.renderList(H,ct=>S.createVNode($w,{key:ct,position:ct,widgets:De(ct),map:_.value,mapLoaded:v.value,cardValues:D.value,hasFilters:_t.value,history:f.config.history,currentFilterLayer:P.value,enabledLayerIds:ir.value,getWidgetComponent:At,getColumnWidth:ni,rightColumnOffset:ct==="top-right"?ln.value:void 0,maxHeight:In(ct),ref_for:!0,ref:Bt=>C(ct,Bt),onSetFilterLayer:lt,"onUpdate:enabledLayerIds":bt[0]||(bt[0]=Bt=>ir.value=Bt),onCardValuesId:Li,onCloseCard:kr,onContentResize:()=>me(ct)},null,8,["position","widgets","map","mapLoaded","cardValues","hasFilters","history","currentFilterLayer","enabledLayerIds","rightColumnOffset","maxHeight","onContentResize"])),64)),S.createElementVNode("div",t2,[(S.openBlock(!0),S.createElementBlock(S.Fragment,null,S.renderList(p.config.tools,ct=>(S.openBlock(),S.createElementBlock(S.Fragment,{key:ct},[v.value&&Yr[ct]?(S.openBlock(),S.createBlock(S.resolveDynamicComponent(Yr[ct]),S.mergeProps({key:0,map:_.value,activeTool:L.value,setActiveTool:Yi},{ref_for:!0},ct==="home"?{initialView:Qi.value}:{},{onCardValuesId:Li}),null,16,["map","activeTool"])):S.createCommentVNode("",!0)],64))),128))])],512),[[S.vShow,v.value]]),(S.openBlock(!0),S.createElementBlock(S.Fragment,null,S.renderList(fi.value,(ct,Bt)=>(S.openBlock(),S.createElementBlock("div",{key:"abs-"+(ct.id||ct.type||Bt),class:"absolute z-20",style:S.normalizeStyle(ct.style)},[(S.openBlock(),S.createBlock(S.resolveDynamicComponent(At(ct.type)),{map:_.value,config:ct.config,hasFilters:_t.value,currentFilterLayer:P.value,enabledLayerIds:ir.value,cardValues:D.value,onSetFilterLayer:lt,"onUpdate:enabledLayerIds":bt[1]||(bt[1]=Ht=>ir.value=Ht),onCardValuesId:Li,onCloseCard:kr},null,40,["map","config","hasFilters","currentFilterLayer","enabledLayerIds","cardValues"]))],4))),128))],4))}},[["__scopeId","data-v-610e8e15"]]),r2={install(p){p.component("MapCustom",Bm)},MapCustom:Bm};on.gis=r2,Object.defineProperty(on,Symbol.toStringTag,{value:"Module"})});
|