@kvass/widgets 1.9.42 → 1.9.43

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.es.js CHANGED
@@ -1,4 +1,4 @@
1
- import{J as M2,G as M_,q as Dn,e as In,o as ur,b as Hr,c as Cn,y as Dd,r as Qo,E as yT,w as vd,z as cD,d as en,a as sl,g as fs,j as W_,v as An,C as vT,t as Pc,A as uD,m as hD,f as xT,n as cg,s as I2,i as dD,D as pD}from"./_plugin-vue_export-helper.js";var C2={},Do=typeof globalThis<"u"?globalThis:typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{};function bT(h){return h&&h.__esModule&&Object.prototype.hasOwnProperty.call(h,"default")?h.default:h}function fD(h){if(h.__esModule)return h;var d=h.default;if(typeof d=="function"){var m=function x(){return this instanceof x?Reflect.construct(d,arguments,this.constructor):d.apply(this,arguments)};m.prototype=d.prototype}else m={};return Object.defineProperty(m,"__esModule",{value:!0}),Object.keys(h).forEach(function(x){var T=Object.getOwnPropertyDescriptor(h,x);Object.defineProperty(m,x,T.get?T:{enumerable:!0,get:function(){return h[x]}})}),m}var wT={exports:{}};(function(h,d){(function(m,x){h.exports=x()})(Do,function(){var m,x,T;function I(R,C){if(!m)m=C;else if(!x)x=C;else{var Z="self.onerror = function() { console.error('An error occurred while parsing the WebWorker bundle. This is most likely due to improper transpilation by Babel; please see https://docs.mapbox.com/mapbox-gl-js/guides/install/#transpiling'); }; var sharedChunk = {}; ("+m+")(sharedChunk); ("+x+")(sharedChunk); self.onerror = null;",ee={};m(ee),T=C(ee),typeof window<"u"&&window&&window.URL&&window.URL.createObjectURL&&(T.workerUrl=window.URL.createObjectURL(new Blob([Z],{type:"text/javascript"})))}}I(["exports"],function(R){var C=typeof self<"u"?self:{},Z="3.1.2";let ee;const ne={API_URL:"https://api.mapbox.com",get API_URL_REGEX(){if(ee==null){const t=/^((https?:)?\/\/)?([^\/]+\.)?mapbox\.c(n|om)(\/|\?|$)/i;try{ee=C2.API_URL_REGEX!=null?new RegExp(C2.API_URL_REGEX):t}catch{ee=t}}return ee},get API_TILEJSON_REGEX(){return/^((https?:)?\/\/)?([^\/]+\.)?mapbox\.c(n|om)(\/v[0-9]*\/.*\.json.*$)/i},get API_SPRITE_REGEX(){return/^((https?:)?\/\/)?([^\/]+\.)?mapbox\.c(n|om)(\/styles\/v[0-9]*\/)(.*\/sprite.*\..*$)/i},get API_FONTS_REGEX(){return/^((https?:)?\/\/)?([^\/]+\.)?mapbox\.c(n|om)(\/fonts\/v[0-9]*\/)(.*\.pbf.*$)/i},get API_STYLE_REGEX(){return/^((https?:)?\/\/)?([^\/]+\.)?mapbox\.c(n|om)(\/styles\/v[0-9]*\/)(.*$)/i},get API_CDN_URL_REGEX(){return/^((https?:)?\/\/)?api\.mapbox\.c(n|om)(\/mapbox-gl-js\/)(.*$)/i},get EVENTS_URL(){if(!ne.API_URL)return null;try{const t=new URL(ne.API_URL);return t.hostname==="api.mapbox.cn"?"https://events.mapbox.cn/events/v2":t.hostname==="api.mapbox.com"?"https://events.mapbox.com/events/v2":null}catch{return null}},SESSION_PATH:"/map-sessions/v1",FEEDBACK_URL:"https://apps.mapbox.com/feedback",TILE_URL_VERSION:"v4",RASTER_URL_PREFIX:"raster/v1",REQUIRE_ACCESS_TOKEN:!0,ACCESS_TOKEN:null,DEFAULT_STYLE:"mapbox://styles/mapbox/standard",MAX_PARALLEL_IMAGE_REQUESTS:16,DRACO_URL:"https://api.mapbox.com/mapbox-gl-js/draco_decoder_gltf_v1.5.6.wasm",GLYPHS_URL:"mapbox://fonts/mapbox/{fontstack}/{range}.pbf"},Te={supported:!1,testSupport:function(t){!ve&&ke&&(Xe?ut(t):Me=t)}};let Me,ke,ve=!1,Xe=!1;function ut(t){const e=t.createTexture();t.bindTexture(t.TEXTURE_2D,e);try{if(t.texImage2D(t.TEXTURE_2D,0,t.RGBA,t.RGBA,t.UNSIGNED_BYTE,ke),t.isContextLost())return;Te.supported=!0}catch{}t.deleteTexture(e),ve=!0}C.document&&(ke=C.document.createElement("img"),ke.onload=function(){Me&&ut(Me),Me=null,Xe=!0},ke.onerror=function(){ve=!0,Me=null},ke.src="data:image/webp;base64,UklGRh4AAABXRUJQVlA4TBEAAAAvAQAAAAfQ//73v/+BiOh/AAA=");const tt="01";function yt(t){return t&&t.__esModule&&Object.prototype.hasOwnProperty.call(t,"default")?t.default:t}var _t=st;function st(t,e,i,r){this.cx=3*t,this.bx=3*(i-t)-this.cx,this.ax=1-this.cx-this.bx,this.cy=3*e,this.by=3*(r-e)-this.cy,this.ay=1-this.cy-this.by,this.p1x=t,this.p1y=e,this.p2x=i,this.p2y=r}st.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,e){if(e===void 0&&(e=1e-6),t<0)return 0;if(t>1)return 1;for(var i=t,r=0;r<8;r++){var o=this.sampleCurveX(i)-t;if(Math.abs(o)<e)return i;var n=this.sampleCurveDerivativeX(i);if(Math.abs(n)<1e-6)break;i-=o/n}var s=0,a=1;for(i=t,r=0;r<20&&(o=this.sampleCurveX(i),!(Math.abs(o-t)<e));r++)t>o?s=i:a=i,i=.5*(a-s)+s;return i},solve:function(t,e){return this.sampleCurveY(this.solveCurveX(t,e))}};var qe=yt(_t),$t=pi;function pi(t,e){this.x=t,this.y=e}pi.prototype={clone:function(){return new pi(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,e){return this.clone()._rotateAround(t,e)},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 e=t.x-this.x,i=t.y-this.y;return e*e+i*i},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,e){return Math.atan2(this.x*e-this.y*t,this.x*t+this.y*e)},_matMult:function(t){var e=t[2]*this.x+t[3]*this.y;return this.x=t[0]*this.x+t[1]*this.y,this.y=e,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 e=Math.cos(t),i=Math.sin(t),r=i*this.x+e*this.y;return this.x=e*this.x-i*this.y,this.y=r,this},_rotateAround:function(t,e){var i=Math.cos(t),r=Math.sin(t),o=e.y+r*(this.x-e.x)+i*(this.y-e.y);return this.x=e.x+i*(this.x-e.x)-r*(this.y-e.y),this.y=o,this},_round:function(){return this.x=Math.round(this.x),this.y=Math.round(this.y),this}},pi.convert=function(t){return t instanceof pi?t:Array.isArray(t)?new pi(t[0],t[1]):t};var X=yt($t);function lt(t,e){if(Array.isArray(t)){if(!Array.isArray(e)||t.length!==e.length)return!1;for(let i=0;i<t.length;i++)if(!lt(t[i],e[i]))return!1;return!0}if(typeof t=="object"&&t!==null&&e!==null){if(typeof e!="object"||Object.keys(t).length!==Object.keys(e).length)return!1;for(const i in t)if(!lt(t[i],e[i]))return!1;return!0}return t===e}const Rn=Math.PI/180,hr=180/Math.PI;function it(t){return t*Rn}function wi(t){return t*hr}const no=[[0,0],[1,0],[1,1],[0,1]];function Cr(t){if(t<=0)return 0;if(t>=1)return 1;const e=t*t,i=e*t;return 4*(t<.5?i:3*(t-e)+i-.75)}function on(t){let e=1/0,i=1/0,r=-1/0,o=-1/0;for(const n of t)e=Math.min(e,n.x),i=Math.min(i,n.y),r=Math.max(r,n.x),o=Math.max(o,n.y);return{min:new X(e,i),max:new X(r,o)}}function nn(t,e,i=0,r=!0){const o=new X(i,i),n=t.sub(o),s=e.add(o),a=[n,new X(s.x,n.y),s,new X(n.x,s.y)];return r&&a.push(n.clone()),a}function zo(t,e,i,r){const o=new qe(t,e,i,r);return function(n){return o.solve(n)}}const kr=zo(.25,.1,.25,1);function je(t,e,i){return Math.min(i,Math.max(e,t))}function Ro(t,e,i){return(i=je((i-t)/(e-t),0,1))*i*(3-2*i)}function Lo(t,e,i){const r=i-e,o=((t-e)%r+r)%r+e;return o===e?i:o}function xs(t,e,i){if(!t.length)return i(null,[]);let r=t.length;const o=new Array(t.length);let n=null;t.forEach((s,a)=>{e(s,(l,c)=>{l&&(n=l),o[a]=c,--r==0&&i(n,o)})})}function bs(t){const e=[];for(const i in t)e.push(t[i]);return e}function Be(t,...e){for(const i of e)for(const r in i)t[r]=i[r];return t}function Pr(t,e){const i={};for(let r=0;r<e.length;r++){const o=e[r];o in t&&(i[o]=t[o])}return i}let jd=1;function na(){return jd++}function Fc(){return function t(e){return e?(e^Math.random()*(16>>e/4)).toString(16):([1e7]+-[1e3]+-4e3+-8e3+-1e11).replace(/[018]/g,t)}()}function Nc(t){return t<=1?1:Math.pow(2,Math.ceil(Math.log(t)/Math.LN2))}function jc(t){return!!t&&/^[0-9a-f]{8}-[0-9a-f]{4}-[4][0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}$/i.test(t)}function Yi(t,e){t.forEach(i=>{e[i]&&(e[i]=e[i].bind(e))})}function sa(t,e){return t.indexOf(e,t.length-e.length)!==-1}function aa(t,e,i){const r={};for(const o in t)r[o]=e.call(this,t[o],o,t);return r}function xe(t,e,i){const r={};for(const o in t)e.call(this,t[o],o,t)&&(r[o]=t[o]);return r}function N(t){return Array.isArray(t)?t.map(N):typeof t=="object"&&t?aa(t,N):t}const U={};function H(t){U[t]||(typeof console<"u"&&console.warn(t),U[t]=!0)}function de(t,e,i){return(i.y-t.y)*(e.x-t.x)>(e.y-t.y)*(i.x-t.x)}function fe(t){let e=0;for(let i,r,o=0,n=t.length,s=n-1;o<n;s=o++)i=t[o],r=t[s],e+=(r.x-i.x)*(i.y+r.y);return e}function Le([t,e,i]){const r=it(e+90),o=it(i);return{x:t*Math.cos(r)*Math.sin(o),y:t*Math.sin(r)*Math.sin(o),z:t*Math.cos(o),azimuthal:e,polar:i}}function Ge(t,e,i){const r=Math.sqrt(t*t+e*e+i*i),o=r>0?Math.acos(i/r)*hr:0;let n=t!==0||e!==0?Math.atan2(-e,-t)*hr+90:0;return n<0&&(n+=360),[r,n,o]}function me(){return typeof WorkerGlobalScope<"u"&&typeof self<"u"&&self instanceof WorkerGlobalScope}function We(t){const e={};if(t.replace(/(?:^|(?:\s*\,\s*))([^\x00-\x20\(\)<>@\,;\:\\"\/\[\]\?\=\{\}\x7F]+)(?:\=(?:([^\x00-\x20\(\)<>@\,;\:\\"\/\[\]\?\=\{\}\x7F]+)|(?:\"((?:[^"\\]|\\.)*)\")))?/g,(i,r,o,n)=>{const s=o||n;return e[r]=!s||s.toLowerCase(),""}),e["max-age"]){const i=parseInt(e["max-age"],10);isNaN(i)?delete e["max-age"]:e["max-age"]=i}return e}let ht=null;function at(){return!!C.document.fullscreenElement||!!C.document.webkitFullscreenElement}function si(t){try{const e=C[t];return e.setItem("_mapbox_test_",1),e.removeItem("_mapbox_test_"),!0}catch{return!1}}function Ti(t,e){return[t[4*e],t[4*e+1],t[4*e+2],t[4*e+3]]}function rr(t,e,i){t[4*e+0]=i[0],t[4*e+1]=i[1],t[4*e+2]=i[2],t[4*e+3]=i[3]}function Ei(t,e){return[Math.pow(t[0],2.2)*e,Math.pow(t[1],2.2)*e,Math.pow(t[2],2.2)*e]}function zi(t){return[Math.pow(t[0],1/2.2),Math.pow(t[1],1/2.2),Math.pow(t[2],1/2.2)]}const ui="mapbox-tiles";let dr=500,br=50,wr,xo;function la(){try{return C.caches}catch{}}function Dr(){la()&&!wr&&(wr=C.caches.open(ui))}function sn(t){const e=t.indexOf("?");if(e<0)return t;const i=function(o){const n=o.indexOf("?");return n>0?o.slice(n+1).split("&"):[]}(t),r=i.filter(o=>{const n=o.split("=");return n[0]==="language"||n[0]==="worldview"});return r.length?`${t.slice(0,e)}?${r.join("&")}`:t.slice(0,e)}let Ln=1/0;function ca(t){Ln++,Ln>br&&(t.getActor().send("enforceCacheSizeLimit",dr),Ln=0)}const le={Unknown:"Unknown",Style:"Style",Source:"Source",Tile:"Tile",Glyphs:"Glyphs",SpriteImage:"SpriteImage",SpriteJSON:"SpriteJSON",Image:"Image",Model:"Model"};typeof Object.freeze=="function"&&Object.freeze(le);class ue extends Error{constructor(e,i,r){i===401&&Si(r)&&(e+=": you may have provided an invalid Mapbox access token. See https://docs.mapbox.com/api/overview/#access-tokens-and-token-scopes"),super(e),this.status=i,this.url=r}toString(){return`${this.name}: ${this.message} (${this.status}): ${this.url}`}}const ge=me()?()=>self.worker&&self.worker.referrer:()=>(C.location.protocol==="blob:"?C.parent:C).location.href,be=function(t,e){if(!(/^file:/.test(i=t.url)||/^file:/.test(ge())&&!/^\w+:/.test(i))){if(C.fetch&&C.Request&&C.AbortController&&C.Request.prototype.hasOwnProperty("signal"))return function(r,o){const n=new C.AbortController,s=new C.Request(r.url,{method:r.method||"GET",body:r.body,credentials:r.credentials,headers:r.headers,referrer:ge(),referrerPolicy:r.referrerPolicy,signal:n.signal});let a=!1,l=!1;const c=(u=s.url).indexOf("sku=")>0&&Si(u);var u;r.type==="json"&&s.headers.set("Accept","application/json");const p=(_,g,y)=>{if(l)return;if(_&&_.message!=="SecurityError"&&H(_.toString()),g&&y)return f(g);const v=Date.now();C.fetch(s).then(b=>{if(b.ok){const w=c?b.clone():null;return f(b,w,v)}return o(new ue(b.statusText,b.status,r.url))}).catch(b=>{b.name!=="AbortError"&&o(new Error(`${b.message} ${r.url}`))})},f=(_,g,y)=>{(r.type==="arrayBuffer"?_.arrayBuffer():r.type==="json"?_.json():_.text()).then(v=>{l||(g&&y&&function(b,w,S){if(Dr(),!wr)return;const A={status:w.status,statusText:w.statusText,headers:new C.Headers};w.headers.forEach((k,D)=>A.headers.set(D,k));const E=We(w.headers.get("Cache-Control")||"");if(E["no-store"])return;E["max-age"]&&A.headers.set("Expires",new Date(S+1e3*E["max-age"]).toUTCString());const M=A.headers.get("Expires");M&&(new Date(M).getTime()-S<42e4||function(k,D){if(xo===void 0)try{new Response(new ReadableStream),xo=!0}catch{xo=!1}xo?D(k.body):k.blob().then(D)}(w,k=>{const D=new C.Response(k,A);Dr(),wr&&wr.then(z=>z.put(sn(b.url),D)).catch(z=>H(z.message))}))}(s,g,y),a=!0,o(null,v,_.headers.get("Cache-Control"),_.headers.get("Expires")))}).catch(v=>{l||o(new Error(v.message))})};return c?function(_,g){if(Dr(),!wr)return g(null);const y=sn(_.url);wr.then(v=>{v.match(y).then(b=>{const w=function(S){if(!S)return!1;const A=new Date(S.headers.get("Expires")||0),E=We(S.headers.get("Cache-Control")||"");return A>Date.now()&&!E["no-cache"]}(b);v.delete(y),w&&v.put(y,b.clone()),g(null,b,w)}).catch(g)}).catch(g)}(s,p):p(null,null),{cancel:()=>{l=!0,a||n.abort()}}}(t,e);if(me()&&self.worker&&self.worker.actor)return self.worker.actor.send("getResource",t,e,void 0,!0)}var i;return function(r,o){const n=new C.XMLHttpRequest;n.open(r.method||"GET",r.url,!0),r.type==="arrayBuffer"&&(n.responseType="arraybuffer");for(const s in r.headers)n.setRequestHeader(s,r.headers[s]);return r.type==="json"&&(n.responseType="text",n.setRequestHeader("Accept","application/json")),n.withCredentials=r.credentials==="include",n.onerror=()=>{o(new Error(n.statusText))},n.onload=()=>{if((n.status>=200&&n.status<300||n.status===0)&&n.response!==null){let s=n.response;if(r.type==="json")try{s=JSON.parse(n.response)}catch(a){return o(a)}o(null,s,n.getResponseHeader("Cache-Control"),n.getResponseHeader("Expires"))}else o(new ue(n.statusText,n.status,r.url))},n.send(r.body),{cancel:()=>n.abort()}}(t,e)},we=function(t,e){return be(Be(t,{type:"json"}),e)},Ie=function(t,e){return be(Be(t,{type:"arrayBuffer"}),e)};function Pe(t){const e=C.document.createElement("a");return e.href=t,e.protocol===C.document.location.protocol&&e.host===C.document.location.host}const Ee="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAEAAAABCAYAAAAfFcSJAAAAC0lEQVQYV2NgAAIAAAUAAarVyFEAAAAASUVORK5CYII=";let Ne,Ce;Ne=[],Ce=0;const vt=function(t,e){if(Te.supported&&(t.headers||(t.headers={}),t.headers.accept="image/webp,*/*"),Ce>=ne.MAX_PARALLEL_IMAGE_REQUESTS){const n={requestParameters:t,callback:e,cancelled:!1,cancel(){this.cancelled=!0}};return Ne.push(n),n}Ce++;let i=!1;const r=()=>{if(!i)for(i=!0,Ce--;Ne.length&&Ce<ne.MAX_PARALLEL_IMAGE_REQUESTS;){const n=Ne.shift(),{requestParameters:s,callback:a,cancelled:l}=n;l||(n.cancel=vt(s,a).cancel)}},o=Ie(t,(n,s,a,l)=>{r(),n?e(n):s&&(C.createImageBitmap?function(c,u){const p=new C.Blob([new Uint8Array(c)],{type:"image/png"});C.createImageBitmap(p).then(f=>{u(null,f)}).catch(f=>{u(new Error(`Could not load image because of ${f.message}. Please make sure to use a supported image type such as PNG or JPEG. Note that SVGs are not supported.`))})}(s,(c,u)=>e(c,u,a,l)):function(c,u){const p=new C.Image,f=C.URL;p.onload=()=>{u(null,p),f.revokeObjectURL(p.src),p.onload=null,C.requestAnimationFrame(()=>{p.src=Ee})},p.onerror=()=>u(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 _=new C.Blob([new Uint8Array(c)],{type:"image/png"});p.src=c.byteLength?f.createObjectURL(_):Ee}(s,(c,u)=>e(c,u,a,l)))});return{cancel:()=>{o.cancel(),r()}}},ei="NO_ACCESS_TOKEN";class Ye{constructor(e,i,r){this._transformRequestFn=e,this._customAccessToken=i,this._silenceAuthErrors=!!r,this._createSkuToken()}_createSkuToken(){const e=function(){let i="";for(let r=0;r<10;r++)i+="0123456789abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ"[Math.floor(62*Math.random())];return{token:["1",tt,i].join(""),tokenExpiresAt:Date.now()+432e5}}();this._skuToken=e.token,this._skuTokenExpiresAt=e.tokenExpiresAt}_isSkuTokenExpired(){return Date.now()>this._skuTokenExpiresAt}transformRequest(e,i){return this._transformRequestFn&&this._transformRequestFn(e,i)||{url:e}}normalizeStyleURL(e,i){if(!Xt(e))return e;const r=Ki(e);return r.params.push(`sdk=js-${Z}`),r.path=`/styles/v1${r.path}`,this._makeAPIURL(r,this._customAccessToken||i)}normalizeGlyphsURL(e,i){if(!Xt(e))return e;const r=Ki(e);return r.path=`/fonts/v1${r.path}`,this._makeAPIURL(r,this._customAccessToken||i)}normalizeModelURL(e,i){if(!Xt(e))return e;const r=Ki(e);return r.path=`/models/v1${r.path}`,this._makeAPIURL(r,this._customAccessToken||i)}normalizeSourceURL(e,i,r,o){if(!Xt(e))return e;const n=Ki(e);return n.path=`/v4/${n.authority}.json`,n.params.push("secure"),r&&n.params.push(`language=${r}`),o&&n.params.push(`worldview=${o}`),this._makeAPIURL(n,this._customAccessToken||i)}normalizeSpriteURL(e,i,r,o){const n=Ki(e);return Xt(e)?(n.path=`/styles/v1${n.path}/sprite${i}${r}`,this._makeAPIURL(n,this._customAccessToken||o)):(n.path+=`${i}${r}`,Tr(n))}normalizeTileURL(e,i,r){if(this._isSkuTokenExpired()&&this._createSkuToken(),e&&!Xt(e))return e;const o=Ki(e);o.path=o.path.replace(/(\.(png|jpg)\d*)(?=$)/,`${i||r&&o.authority!=="raster"&&r===512?"@2x":""}${Te.supported?".webp":"$1"}`),o.authority==="raster"?o.path=`/${ne.RASTER_URL_PREFIX}${o.path}`:(o.path=o.path.replace(/^.+\/v4\//,"/"),o.path=`/${ne.TILE_URL_VERSION}${o.path}`);const n=this._customAccessToken||function(s){for(const a of s){const l=a.match(/^access_token=(.*)$/);if(l)return l[1]}return null}(o.params)||ne.ACCESS_TOKEN;return ne.REQUIRE_ACCESS_TOKEN&&n&&this._skuToken&&o.params.push(`sku=${this._skuToken}`),this._makeAPIURL(o,n)}canonicalizeTileURL(e,i){const r=Ki(e);if(!r.path.match(/^(\/v4\/|\/raster\/v1\/)/)||!r.path.match(/\.[\w]+$/))return e;let o="mapbox://";r.path.match(/^\/raster\/v1\//)?o+=`raster/${r.path.replace(`/${ne.RASTER_URL_PREFIX}/`,"")}`:o+=`tiles/${r.path.replace(`/${ne.TILE_URL_VERSION}/`,"")}`;let n=r.params;return i&&(n=n.filter(s=>!s.match(/^access_token=/))),n.length&&(o+=`?${n.join("&")}`),o}canonicalizeTileset(e,i){const r=!!i&&Xt(i),o=[];for(const n of e.tiles||[])Si(n)?o.push(this.canonicalizeTileURL(n,r)):o.push(n);return o}_makeAPIURL(e,i){const r="See https://docs.mapbox.com/api/overview/#access-tokens-and-token-scopes",o=Ki(ne.API_URL);if(e.protocol=o.protocol,e.authority=o.authority,e.protocol==="http"){const n=e.params.indexOf("secure");n>=0&&e.params.splice(n,1)}if(o.path!=="/"&&(e.path=`${o.path}${e.path}`),!ne.REQUIRE_ACCESS_TOKEN)return Tr(e);if(i=i||ne.ACCESS_TOKEN,!this._silenceAuthErrors){if(!i)throw new Error(`An API access token is required to use Mapbox GL. ${r}`);if(i[0]==="s")throw new Error(`Use a public access token (pk.*) with Mapbox GL, not a secret access token (sk.*). ${r}`)}return e.params=e.params.filter(n=>n.indexOf("access_token")===-1),e.params.push(`access_token=${i||""}`),Tr(e)}}function Xt(t){return t.indexOf("mapbox:")===0}function Si(t){return ne.API_URL_REGEX.test(t)}function Ri(t){return ne.API_CDN_URL_REGEX.test(t)}function qi(t){return ne.API_STYLE_REGEX.test(t)&&!pr(t)}function pr(t){return ne.API_SPRITE_REGEX.test(t)}const so=/^(\w+):\/\/([^/?]*)(\/[^?]+)?\??(.+)?/;function Ki(t){const e=t.match(so);if(!e)throw new Error("Unable to parse URL object");return{protocol:e[1],authority:e[2],path:e[3]||"/",params:e[4]?e[4].split("&"):[]}}function Tr(t){const e=t.params.length?`?${t.params.join("&")}`:"";return`${t.protocol}://${t.authority}${t.path}${e}`}const fr="mapbox.eventData";function ua(t){if(!t)return null;const e=t.split(".");if(!e||e.length!==3)return null;try{return JSON.parse(decodeURIComponent(C.atob(e[1]).split("").map(i=>"%"+("00"+i.charCodeAt(0).toString(16)).slice(-2)).join("")))}catch{return null}}class On{constructor(e){this.type=e,this.anonId=null,this.eventData={},this.queue=[],this.pendingRequest=null}getStorageKey(e){const i=ua(ne.ACCESS_TOKEN);let r="";return r=i&&i.u?C.btoa(encodeURIComponent(i.u).replace(/%([0-9A-F]{2})/g,(o,n)=>String.fromCharCode(+("0x"+n)))):ne.ACCESS_TOKEN||"",e?`${fr}.${e}:${r}`:`${fr}:${r}`}fetchEventData(){const e=si("localStorage"),i=this.getStorageKey(),r=this.getStorageKey("uuid");if(e)try{const o=C.localStorage.getItem(i);o&&(this.eventData=JSON.parse(o));const n=C.localStorage.getItem(r);n&&(this.anonId=n)}catch{H("Unable to read from LocalStorage")}}saveEventData(){const e=si("localStorage"),i=this.getStorageKey(),r=this.getStorageKey("uuid");if(e)try{C.localStorage.setItem(r,this.anonId),Object.keys(this.eventData).length>=1&&C.localStorage.setItem(i,JSON.stringify(this.eventData))}catch{H("Unable to write to LocalStorage")}}processRequests(e){}postEvent(e,i,r,o){if(!ne.EVENTS_URL)return;const n=Ki(ne.EVENTS_URL);n.params.push(`access_token=${o||ne.ACCESS_TOKEN||""}`);const s={event:this.type,created:new Date(e).toISOString()},a=i?Be(s,i):s,l={url:Tr(n),headers:{"Content-Type":"text/plain"},body:JSON.stringify([a])};this.pendingRequest=function(c,u){return be(Be(c,{method:"POST"}),u)}(l,c=>{this.pendingRequest=null,r(c),this.saveEventData(),this.processRequests(o)})}queueRequest(e,i){this.queue.push(e),this.processRequests(i)}}const ha=new class extends On{constructor(t){super("appUserTurnstile"),this._customAccessToken=t}postTurnstileEvent(t,e){ne.EVENTS_URL&&ne.ACCESS_TOKEN&&Array.isArray(t)&&t.some(i=>Xt(i)||Si(i))&&this.queueRequest(Date.now(),e)}processRequests(t){if(this.pendingRequest||this.queue.length===0)return;this.anonId&&this.eventData.lastSuccess&&this.eventData.tokenU||this.fetchEventData();const e=ua(ne.ACCESS_TOKEN),i=e?e.u:ne.ACCESS_TOKEN;let r=i!==this.eventData.tokenU;jc(this.anonId)||(this.anonId=Fc(),r=!0);const o=this.queue.shift();if(this.eventData.lastSuccess){const n=new Date(this.eventData.lastSuccess),s=new Date(o),a=(o-this.eventData.lastSuccess)/864e5;r=r||a>=1||a<-1||n.getDate()!==s.getDate()}else r=!0;r?this.postEvent(o,{sdkIdentifier:"mapbox-gl-js",sdkVersion:Z,skuId:tt,"enabled.telemetry":!1,userId:this.anonId},n=>{n||(this.eventData.lastSuccess=o,this.eventData.tokenU=i)},t):this.processRequests()}},Vd=ha.postTurnstileEvent.bind(ha),Mg=new class extends On{constructor(){super("map.load"),this.success={},this.skuToken=""}postMapLoadEvent(t,e,i,r){this.skuToken=e,this.errorCb=r,ne.EVENTS_URL&&(i||ne.ACCESS_TOKEN?this.queueRequest({id:t,timestamp:Date.now()},i):this.errorCb(new Error(ei)))}processRequests(t){if(this.pendingRequest||this.queue.length===0)return;const{id:e,timestamp:i}=this.queue.shift();e&&this.success[e]||(this.anonId||this.fetchEventData(),jc(this.anonId)||(this.anonId=Fc()),this.postEvent(i,{sdkIdentifier:"mapbox-gl-js",sdkVersion:Z,skuId:tt,skuToken:this.skuToken,userId:this.anonId},r=>{r?this.errorCb(r):e&&(this.success[e]=!0)},t))}},GE=Mg.postMapLoadEvent.bind(Mg),Ig=new class extends On{constructor(){super("gljs.performance")}postPerformanceEvent(t,e){ne.EVENTS_URL&&(t||ne.ACCESS_TOKEN)&&this.queueRequest({timestamp:Date.now(),performanceData:e},t)}processRequests(t){if(this.pendingRequest||this.queue.length===0)return;const{timestamp:e,performanceData:i}=this.queue.shift(),r=function(o){const n=C.performance.getEntriesByType("resource"),s=C.performance.getEntriesByType("mark"),a=function(f){const _={};if(f){for(const g in f)if(g!=="other")for(const y of f[g]){const v=`${g}ResolveRangeMin`,b=`${g}ResolveRangeMax`,w=`${g}RequestCount`,S=`${g}RequestCachedCount`;_[v]=Math.min(_[v]||1/0,y.startTime),_[b]=Math.max(_[b]||-1/0,y.responseEnd);const A=E=>{_[E]===void 0&&(_[E]=0),++_[E]};y.transferSize!==void 0&&y.transferSize===0&&A(S),A(w)}}return _}(function(f,_){const g={};if(f)for(const y of f){const v=_(y);g[v]===void 0&&(g[v]=[]),g[v].push(y)}return g}(n,HE)),l=C.devicePixelRatio,c=C.navigator.connection||C.navigator.mozConnection||C.navigator.webkitConnection,u={counters:[],metadata:[],attributes:[]},p=(f,_,g)=>{g!=null&&f.push({name:_,value:g.toString()})};for(const f in a)p(u.counters,f,a[f]);if(o.interactionRange[0]!==1/0&&o.interactionRange[1]!==-1/0&&(p(u.counters,"interactionRangeMin",o.interactionRange[0]),p(u.counters,"interactionRangeMax",o.interactionRange[1])),s)for(const f of Object.keys(Uc)){const _=Uc[f],g=s.find(y=>y.name===_);g&&p(u.counters,_,g.startTime)}return p(u.counters,"visibilityHidden",o.visibilityHidden),p(u.attributes,"style",function(f){if(f)for(const _ of f){const g=_.name.split("?")[0];if(qi(g)){const y=g.split("/").slice(-2);if(y.length===2)return`mapbox://styles/${y[0]}/${y[1]}`}}}(n)),p(u.attributes,"terrainEnabled",o.terrainEnabled?"true":"false"),p(u.attributes,"fogEnabled",o.fogEnabled?"true":"false"),p(u.attributes,"projection",o.projection),p(u.attributes,"zoom",o.zoom),p(u.metadata,"devicePixelRatio",l),p(u.metadata,"connectionEffectiveType",c?c.effectiveType:void 0),p(u.metadata,"navigatorUserAgent",C.navigator.userAgent),p(u.metadata,"screenWidth",C.screen.width),p(u.metadata,"screenHeight",C.screen.height),p(u.metadata,"windowWidth",C.innerWidth),p(u.metadata,"windowHeight",C.innerHeight),p(u.metadata,"mapWidth",o.width/l),p(u.metadata,"mapHeight",o.height/l),p(u.metadata,"webglRenderer",o.renderer),p(u.metadata,"webglVendor",o.vendor),p(u.metadata,"sdkVersion",Z),p(u.metadata,"sdkIdentifier","mapbox-gl-js"),u}(i);for(const o of r.metadata);for(const o of r.counters);for(const o of r.attributes);this.postEvent(e,r,()=>{},t)}},$E=Ig.postPerformanceEvent.bind(Ig),Cg=new class extends On{constructor(){super("map.auth"),this.success={},this.skuToken=""}getSession(t,e,i,r){if(!ne.API_URL||!ne.SESSION_PATH)return;const o=Ki(ne.API_URL+ne.SESSION_PATH);o.params.push(`sku=${e||""}`),o.params.push(`access_token=${r||ne.ACCESS_TOKEN||""}`);const n={url:Tr(o),headers:{"Content-Type":"text/plain"}};this.pendingRequest=function(s,a){return be(Be(s,{method:"GET"}),a)}(n,s=>{this.pendingRequest=null,i(s),this.saveEventData(),this.processRequests(r)})}getSessionAPI(t,e,i,r){this.skuToken=e,this.errorCb=r,ne.SESSION_PATH&&ne.API_URL&&(i||ne.ACCESS_TOKEN?this.queueRequest({id:t,timestamp:Date.now()},i):this.errorCb(new Error(ei)))}processRequests(t){if(this.pendingRequest||this.queue.length===0)return;const{id:e,timestamp:i}=this.queue.shift();e&&this.success[e]||this.getSession(i,this.skuToken,r=>{r?this.errorCb(r):e&&(this.success[e]=!0)},t)}},WE=Cg.getSessionAPI.bind(Cg),Vc=new Set;function kg(t,e){e?Vc.add(t):Vc.delete(t)}const Uc={create:"create",load:"load",fullLoad:"fullLoad"},Pg={mark(t){C.performance.mark(t)},measure(t,e,i){C.performance.measure(t,e,i)}};function HE(t){const e=t.name.split("?")[0];return Ri(e)&&e.includes("mapbox-gl.js")?"javascript":Ri(e)&&e.includes("mapbox-gl.css")?"css":function(i){return ne.API_FONTS_REGEX.test(i)}(e)?"fontRange":pr(e)?"sprite":qi(e)?"style":function(i){return ne.API_TILEJSON_REGEX.test(i)}(e)?"tilejson":"other"}const ZE=C.performance;function Dg(t){const e=t?t.url.toString():void 0;return ZE.getEntriesByName(e)}var zg=Ud;function Ud(t){return!function(e){return typeof window>"u"||typeof document>"u"?"not a browser":Array.prototype&&Array.prototype.every&&Array.prototype.filter&&Array.prototype.forEach&&Array.prototype.indexOf&&Array.prototype.lastIndexOf&&Array.prototype.map&&Array.prototype.some&&Array.prototype.reduce&&Array.prototype.reduceRight&&Array.isArray?Function.prototype&&Function.prototype.bind?Object.keys&&Object.create&&Object.getPrototypeOf&&Object.getOwnPropertyNames&&Object.isSealed&&Object.isFrozen&&Object.isExtensible&&Object.getOwnPropertyDescriptor&&Object.defineProperty&&Object.defineProperties&&Object.seal&&Object.freeze&&Object.preventExtensions?"JSON"in window&&"parse"in JSON&&"stringify"in JSON?function(){if(!("Worker"in window&&"Blob"in window&&"URL"in window))return!1;var r,o,n=new Blob([""],{type:"text/javascript"}),s=URL.createObjectURL(n);try{o=new Worker(s),r=!0}catch{r=!1}return o&&o.terminate(),URL.revokeObjectURL(s),r}()?"Uint8ClampedArray"in window?ArrayBuffer.isView?function(){var r=document.createElement("canvas");r.width=r.height=1;var o=r.getContext("2d");if(!o)return!1;var n=o.getImageData(0,0,1,1);return n&&n.width===r.width}()?(qd[i=e&&e.failIfMajorPerformanceCaveat]===void 0&&(qd[i]=function(r){var o,n=function(s){var a=document.createElement("canvas"),l=Object.create(Ud.webGLContextAttributes);return l.failIfMajorPerformanceCaveat=s,a.getContext("webgl",l)||a.getContext("experimental-webgl",l)}(r);if(!n)return!1;try{o=n.createShader(n.VERTEX_SHADER)}catch{return!1}return!(!o||n.isContextLost())&&(n.shaderSource(o,"void main() {}"),n.compileShader(o),n.getShaderParameter(o,n.COMPILE_STATUS)===!0)}(i)),qd[i]?document.documentMode?"insufficient ECMAScript 6 support":void 0:"insufficient WebGL support"):"insufficient Canvas/getImageData support":"insufficient ArrayBuffer support":"insufficient Uint8ClampedArray support":"insufficient worker support":"insufficient JSON support":"insufficient Object support":"insufficient Function support":"insufficent Array support";var i}(t)}var qd={};let Gd,qc,$d,Gc,ws;function Rg(){return Gd==null&&(Gd=C.OffscreenCanvas&&new C.OffscreenCanvas(1,1).getContext("2d")&&typeof C.createImageBitmap=="function"),Gd}Ud.webGLContextAttributes={antialias:!1,alpha:!0,stencil:!0,depth:!0};const ct={now:()=>Gc!==void 0?Gc:C.performance.now(),setNow(t){Gc=t},restoreNow(){Gc=void 0},frame(t){const e=C.requestAnimationFrame(t);return{cancel:()=>C.cancelAnimationFrame(e)}},getImageData(t,e=0){const{width:i,height:r}=t;ws||(ws=C.document.createElement("canvas"));const o=ws.getContext("2d",{willReadFrequently:!0});if(!o)throw new Error("failed to create canvas 2d context");return(i>ws.width||r>ws.height)&&(ws.width=i,ws.height=r),o.clearRect(-e,-e,i+2*e,r+2*e),o.drawImage(t,0,0,i,r),o.getImageData(-e,-e,i+2*e,r+2*e)},resolveURL:t=>(qc||(qc=C.document.createElement("a")),qc.href=t,qc.href),get devicePixelRatio(){return C.devicePixelRatio},get prefersReducedMotion(){return!!C.matchMedia&&($d==null&&($d=C.matchMedia("(prefers-reduced-motion: reduce)")),$d.matches)},hasCanvasFingerprintNoise(){if(!Rg())return!1;const t=new C.OffscreenCanvas(85,1),e=t.getContext("2d",{willReadFrequently:!0});let i=0;for(let o=0;o<t.width;++o)e.fillStyle=`rgba(${i++},${i++},${i++}, 255)`,e.fillRect(o,0,1,1);const r=e.getImageData(0,0,t.width,t.height);i=0;for(let o=0;o<r.data.length;++o)if(o%4!=3&&i++!==r.data[o])return!0;return!1}};function ni(t,e,i){const r=C.document.createElement(t);return e!==void 0&&(r.className=e),i&&i.appendChild(r),r}function an(t,e,i){const r=C.document.createElementNS("http://www.w3.org/2000/svg",t);for(const o of Object.keys(e))r.setAttributeNS(null,o,e[o]);return i&&i.appendChild(r),r}const Ts=C.document&&C.document.documentElement.style,fl=Ts&&Ts.userSelect!==void 0?"userSelect":"WebkitUserSelect";let Lg;function Og(){Ts&&fl&&(Lg=Ts[fl],Ts[fl]="none")}function Bg(){Ts&&fl&&(Ts[fl]=Lg)}function Wd(t){t.preventDefault(),t.stopPropagation(),C.removeEventListener("click",Wd,!0)}function Hd(){C.addEventListener("click",Wd,!0),C.setTimeout(()=>{C.removeEventListener("click",Wd,!0)},0)}function ml(t,e){const i=t.getBoundingClientRect();return Ng(t,i,e)}function $c(t,e){const i=t.getBoundingClientRect(),r=[];for(let o=0;o<e.length;o++)r.push(Ng(t,i,e[o]));return r}function Fg(t){return C.InstallTrigger!==void 0&&t.button===2&&t.ctrlKey&&C.navigator.platform.toUpperCase().indexOf("MAC")>=0?0:t.button}function Ng(t,e,i){const r=t.offsetWidth===e.width?1:t.offsetWidth/e.width;return new X((i.clientX-e.left)*r,(i.clientY-e.top)*r)}function jg(t,e,i){i[t]&&i[t].indexOf(e)!==-1||(i[t]=i[t]||[],i[t].push(e))}function Zd(t,e,i){if(i&&i[t]){const r=i[t].indexOf(e);r!==-1&&i[t].splice(r,1)}}class ye{constructor(e,i={}){Be(this,i),this.type=e}}class nt extends ye{constructor(e,i={}){super("error",Be({error:e},i))}}class Fi{on(e,i){return this._listeners=this._listeners||{},jg(e,i,this._listeners),this}off(e,i){return Zd(e,i,this._listeners),Zd(e,i,this._oneTimeListeners),this}once(e,i){return i?(this._oneTimeListeners=this._oneTimeListeners||{},jg(e,i,this._oneTimeListeners),this):new Promise(r=>this.once(e,r))}fire(e,i){typeof e=="string"&&(e=new ye(e,i||{}));const r=e.type;if(this.listens(r)){e.target=this;const o=this._listeners&&this._listeners[r]?this._listeners[r].slice():[];for(const a of o)a.call(this,e);const n=this._oneTimeListeners&&this._oneTimeListeners[r]?this._oneTimeListeners[r].slice():[];for(const a of n)Zd(r,a,this._oneTimeListeners),a.call(this,e);const s=this._eventedParent;s&&(Be(e,typeof this._eventedParentData=="function"?this._eventedParentData():this._eventedParentData),s.fire(e))}else e instanceof nt&&console.error(e.error);return this}listens(e){return!!(this._listeners&&this._listeners[e]&&this._listeners[e].length>0||this._oneTimeListeners&&this._oneTimeListeners[e]&&this._oneTimeListeners[e].length>0||this._eventedParent&&this._eventedParent.listens(e))}setEventedParent(e,i){return this._eventedParent=e,this._eventedParentData=i,this}}var J=JSON.parse('{"$version":8,"$root":{"version":{"required":true,"type":"enum","values":[8]},"fragment":{"type":"boolean"},"name":{"type":"string"},"metadata":{"type":"*"},"center":{"type":"array","value":"number"},"zoom":{"type":"number"},"bearing":{"type":"number","default":0,"period":360},"pitch":{"type":"number","default":0},"light":{"type":"light"},"lights":{"required":false,"type":"array","value":"light-3d"},"terrain":{"type":"terrain","optional":true},"fog":{"type":"fog"},"camera":{"type":"camera"},"imports":{"type":"array","value":"import"},"schema":{"type":"schema"},"sources":{"required":true,"type":"sources"},"sprite":{"type":"string"},"glyphs":{"type":"string","default":"mapbox://fonts/mapbox/{fontstack}/{range}.pbf"},"transition":{"type":"transition"},"projection":{"type":"projection"},"layers":{"required":true,"type":"array","value":"layer"},"models":{"type":"models"}},"model":{"type":"string","required":true},"import":{"id":{"type":"string","required":true},"url":{"type":"string","required":true},"config":{"type":"config"},"data":{"type":"$root"}},"config":{"*":{"type":"*"}},"schema":{"*":{"type":"option"}},"option":{"default":{"type":"*","required":true},"type":{"type":"enum","values":{"string":1,"number":1,"boolean":1,"color":1}},"array":{"type":"boolean"},"minValue":{"type":"number"},"maxValue":{"type":"number"},"stepValue":{"type":"number"},"values":{"type":"array","value":"*"},"metadata":{"type":"*"}},"models":{"*":{"type":"model"}},"light-3d":{"id":{"type":"string","required":true},"properties":{"type":"properties"},"type":{"type":"enum","values":{"ambient":{},"directional":{},"flat":{}}}},"properties":["properties_light_directional","properties_light_ambient","properties_light_flat"],"properties_light_directional":{"direction":{"type":"array","default":[210,30],"minimum":[0,0],"maximum":[360,90],"length":2,"value":"number","property-type":"data-constant","transition":true,"expression":{"interpolated":true,"parameters":["zoom"]}},"color":{"type":"color","property-type":"data-constant","default":"#ffffff","expression":{"interpolated":true,"parameters":["zoom"]},"transition":true},"intensity":{"type":"number","property-type":"data-constant","default":0.5,"minimum":0,"maximum":1,"expression":{"interpolated":true,"parameters":["zoom"]},"transition":true},"cast-shadows":{"type":"boolean","default":false,"expression":{},"property-type":"data-constant"},"shadow-intensity":{"type":"number","property-type":"data-constant","default":1,"minimum":0,"maximum":1,"expression":{"interpolated":true,"parameters":["zoom"]},"transition":true}},"properties_light_ambient":{"color":{"type":"color","property-type":"data-constant","default":"#ffffff","expression":{"interpolated":true,"parameters":["zoom"]},"transition":true},"intensity":{"type":"number","property-type":"data-constant","default":0.5,"minimum":0,"maximum":1,"expression":{"interpolated":true,"parameters":["zoom"]},"transition":true}},"properties_light_flat":{"anchor":{"type":"enum","default":"viewport","values":{"map":1,"viewport":1},"property-type":"data-constant","expression":{"parameters":["zoom"]}},"position":{"type":"array","default":[1.15,210,30],"length":3,"value":"number","property-type":"data-constant","transition":true,"expression":{"interpolated":true,"parameters":["zoom"]}},"color":{"type":"color","property-type":"data-constant","default":"#ffffff","expression":{"interpolated":true,"parameters":["zoom"]},"transition":true},"intensity":{"type":"number","property-type":"data-constant","default":0.5,"minimum":0,"maximum":1,"expression":{"interpolated":true,"parameters":["zoom"]},"transition":true}},"sources":{"*":{"type":"source"}},"source":["source_vector","source_raster","source_raster_dem","source_raster_array","source_geojson","source_video","source_image","source_model"],"source_vector":{"type":{"required":true,"type":"enum","values":{"vector":1}},"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":1,"tms":1},"default":"xyz"},"minzoom":{"type":"number","default":0},"maxzoom":{"type":"number","default":22},"attribution":{"type":"string"},"promoteId":{"type":"promoteId"},"volatile":{"type":"boolean","default":false},"*":{"type":"*"}},"source_raster":{"type":{"required":true,"type":"enum","values":{"raster":1}},"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},"scheme":{"type":"enum","values":{"xyz":1,"tms":1},"default":"xyz"},"attribution":{"type":"string"},"volatile":{"type":"boolean","default":false},"*":{"type":"*"}},"source_raster_dem":{"type":{"required":true,"type":"enum","values":{"raster-dem":1}},"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},"attribution":{"type":"string"},"encoding":{"type":"enum","values":{"terrarium":1,"mapbox":1},"default":"mapbox"},"volatile":{"type":"boolean","default":false},"*":{"type":"*"}},"source_raster_array":{"type":{"required":true,"type":"enum","values":{"raster-array":1}},"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},"attribution":{"type":"string"},"rasterLayers":{"type":"*"},"*":{"type":"*"}},"source_geojson":{"type":{"required":true,"type":"enum","values":{"geojson":1}},"data":{"type":"*"},"maxzoom":{"type":"number","default":18},"attribution":{"type":"string"},"buffer":{"type":"number","default":128,"maximum":512,"minimum":0},"filter":{"type":"*"},"tolerance":{"type":"number","default":0.375},"cluster":{"type":"boolean","default":false},"clusterRadius":{"type":"number","default":50,"minimum":0},"clusterMaxZoom":{"type":"number"},"clusterMinPoints":{"type":"number"},"clusterProperties":{"type":"*"},"lineMetrics":{"type":"boolean","default":false},"generateId":{"type":"boolean","default":false},"promoteId":{"type":"promoteId"}},"source_video":{"type":{"required":true,"type":"enum","values":{"video":1}},"urls":{"required":true,"type":"array","value":"string"},"coordinates":{"required":true,"type":"array","length":4,"value":{"type":"array","length":2,"value":"number"}}},"source_image":{"type":{"required":true,"type":"enum","values":{"image":1}},"url":{"required":false,"type":"string"},"coordinates":{"required":true,"type":"array","length":4,"value":{"type":"array","length":2,"value":"number"}}},"source_model":{"type":{"required":true,"type":"enum","values":{"model":1,"batched-model":1}},"maxzoom":{"type":"number","default":18},"minzoom":{"type":"number","default":0},"tiles":{"type":"array","value":"string"}},"layer":{"id":{"type":"string","required":true},"type":{"type":"enum","values":{"fill":{},"line":{},"symbol":{},"circle":{},"heatmap":{},"fill-extrusion":{},"raster":{},"hillshade":{},"model":{},"background":{},"sky":{},"slot":{}},"required":true},"metadata":{"type":"*"},"source":{"type":"string"},"source-layer":{"type":"string"},"slot":{"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_sky","layout_model"],"layout_background":{"visibility":{"type":"enum","values":{"visible":1,"none":1},"default":"visible","expression":{},"property-type":"constant"}},"layout_sky":{"visibility":{"type":"enum","values":{"visible":1,"none":1},"default":"visible","expression":{},"property-type":"constant"}},"layout_model":{"visibility":{"type":"enum","values":{"visible":1,"none":1},"default":"visible","expression":{},"property-type":"constant"},"model-id":{"type":"string","default":"","property-type":"data-driven","expression":{"parameters":["zoom","feature"]}}},"layout_fill":{"fill-sort-key":{"type":"number","expression":{"parameters":["zoom","feature"]},"property-type":"data-driven"},"visibility":{"type":"enum","values":{"visible":1,"none":1},"default":"visible","expression":{},"property-type":"constant"}},"layout_circle":{"circle-sort-key":{"type":"number","expression":{"parameters":["zoom","feature"]},"property-type":"data-driven"},"visibility":{"type":"enum","values":{"visible":1,"none":1},"default":"visible","expression":{},"property-type":"constant"}},"layout_heatmap":{"visibility":{"type":"enum","values":{"visible":1,"none":1},"default":"visible","expression":{},"property-type":"constant"}},"layout_fill-extrusion":{"visibility":{"type":"enum","values":{"visible":1,"none":1},"default":"visible","expression":{},"property-type":"constant"},"fill-extrusion-edge-radius":{"type":"number","private":true,"default":0,"minimum":0,"maximum":1,"expression":{},"property-type":"constant"}},"layout_line":{"line-cap":{"type":"enum","values":{"butt":1,"round":1,"square":1},"default":"butt","expression":{"parameters":["zoom","feature"]},"property-type":"data-driven"},"line-join":{"type":"enum","values":{"bevel":1,"round":1,"miter":1},"default":"miter","expression":{"parameters":["zoom","feature"]},"property-type":"data-driven"},"line-miter-limit":{"type":"number","default":2,"expression":{"interpolated":true,"parameters":["zoom"]},"property-type":"data-constant"},"line-round-limit":{"type":"number","default":1.05,"expression":{"interpolated":true,"parameters":["zoom"]},"property-type":"data-constant"},"line-sort-key":{"type":"number","expression":{"parameters":["zoom","feature"]},"property-type":"data-driven"},"visibility":{"type":"enum","values":{"visible":1,"none":1},"default":"visible","expression":{},"property-type":"constant"}},"layout_symbol":{"symbol-placement":{"type":"enum","values":{"point":1,"line":1,"line-center":1},"default":"point","expression":{"parameters":["zoom"]},"property-type":"data-constant"},"symbol-spacing":{"type":"number","default":250,"minimum":1,"expression":{"interpolated":true,"parameters":["zoom"]},"property-type":"data-constant"},"symbol-avoid-edges":{"type":"boolean","default":false,"expression":{"parameters":["zoom"]},"property-type":"data-constant"},"symbol-sort-key":{"type":"number","expression":{"parameters":["zoom","feature"]},"property-type":"data-driven"},"symbol-z-order":{"type":"enum","values":{"auto":1,"viewport-y":1,"source":1},"default":"auto","expression":{"parameters":["zoom"]},"property-type":"data-constant"},"symbol-z-elevate":{"type":"boolean","default":false,"expression":{"parameters":["zoom"]},"property-type":"data-constant"},"icon-allow-overlap":{"type":"boolean","default":false,"expression":{"parameters":["zoom"]},"property-type":"data-constant"},"icon-ignore-placement":{"type":"boolean","default":false,"expression":{"parameters":["zoom"]},"property-type":"data-constant"},"icon-optional":{"type":"boolean","default":false,"expression":{"parameters":["zoom"]},"property-type":"data-constant"},"icon-rotation-alignment":{"type":"enum","values":{"map":1,"viewport":1,"auto":1},"default":"auto","expression":{"parameters":["zoom"]},"property-type":"data-constant"},"icon-size":{"type":"number","default":1,"minimum":0,"expression":{"interpolated":true,"parameters":["zoom","feature"]},"property-type":"data-driven"},"icon-text-fit":{"type":"enum","values":{"none":1,"width":1,"height":1,"both":1},"default":"none","expression":{"parameters":["zoom","feature"]},"property-type":"data-driven"},"icon-text-fit-padding":{"type":"array","value":"number","length":4,"default":[0,0,0,0],"expression":{"interpolated":true,"parameters":["zoom","feature"]},"property-type":"data-driven"},"icon-image":{"type":"resolvedImage","tokens":true,"expression":{"parameters":["zoom","feature"]},"property-type":"data-driven"},"icon-rotate":{"type":"number","default":0,"period":360,"expression":{"interpolated":true,"parameters":["zoom","feature"]},"property-type":"data-driven"},"icon-padding":{"type":"number","default":2,"minimum":0,"expression":{"interpolated":true,"parameters":["zoom"]},"property-type":"data-constant"},"icon-keep-upright":{"type":"boolean","default":false,"expression":{"parameters":["zoom"]},"property-type":"data-constant"},"icon-offset":{"type":"array","value":"number","length":2,"default":[0,0],"expression":{"interpolated":true,"parameters":["zoom","feature"]},"property-type":"data-driven"},"icon-anchor":{"type":"enum","values":{"center":1,"left":1,"right":1,"top":1,"bottom":1,"top-left":1,"top-right":1,"bottom-left":1,"bottom-right":1},"default":"center","expression":{"parameters":["zoom","feature"]},"property-type":"data-driven"},"icon-pitch-alignment":{"type":"enum","values":{"map":1,"viewport":1,"auto":1},"default":"auto","expression":{"parameters":["zoom"]},"property-type":"data-constant"},"text-pitch-alignment":{"type":"enum","values":{"map":1,"viewport":1,"auto":1},"default":"auto","expression":{"parameters":["zoom"]},"property-type":"data-constant"},"text-rotation-alignment":{"type":"enum","values":{"map":1,"viewport":1,"auto":1},"default":"auto","expression":{"parameters":["zoom"]},"property-type":"data-constant"},"text-field":{"type":"formatted","default":"","tokens":true,"expression":{"parameters":["zoom","feature"]},"property-type":"data-driven"},"text-font":{"type":"array","value":"string","default":["Open Sans Regular","Arial Unicode MS Regular"],"expression":{"parameters":["zoom","feature"]},"property-type":"data-driven"},"text-size":{"type":"number","default":16,"minimum":0,"expression":{"interpolated":true,"parameters":["zoom","feature"]},"property-type":"data-driven"},"text-max-width":{"type":"number","default":10,"minimum":0,"expression":{"interpolated":true,"parameters":["zoom","feature"]},"property-type":"data-driven"},"text-line-height":{"type":"number","default":1.2,"expression":{"interpolated":true,"parameters":["zoom","feature"]},"property-type":"data-driven"},"text-letter-spacing":{"type":"number","default":0,"expression":{"interpolated":true,"parameters":["zoom","feature"]},"property-type":"data-driven"},"text-justify":{"type":"enum","values":{"auto":1,"left":1,"center":1,"right":1},"default":"center","expression":{"parameters":["zoom","feature"]},"property-type":"data-driven"},"text-radial-offset":{"type":"number","default":0,"property-type":"data-driven","expression":{"interpolated":true,"parameters":["zoom","feature"]}},"text-variable-anchor":{"type":"array","value":"enum","values":{"center":1,"left":1,"right":1,"top":1,"bottom":1,"top-left":1,"top-right":1,"bottom-left":1,"bottom-right":1},"expression":{"parameters":["zoom"]},"property-type":"data-constant"},"text-anchor":{"type":"enum","values":{"center":1,"left":1,"right":1,"top":1,"bottom":1,"top-left":1,"top-right":1,"bottom-left":1,"bottom-right":1},"default":"center","expression":{"parameters":["zoom","feature"]},"property-type":"data-driven"},"text-max-angle":{"type":"number","default":45,"expression":{"interpolated":true,"parameters":["zoom"]},"property-type":"data-constant"},"text-writing-mode":{"type":"array","value":"enum","values":{"horizontal":1,"vertical":1},"expression":{"parameters":["zoom"]},"property-type":"data-constant"},"text-rotate":{"type":"number","default":0,"period":360,"expression":{"interpolated":true,"parameters":["zoom","feature"]},"property-type":"data-driven"},"text-padding":{"type":"number","default":2,"minimum":0,"expression":{"interpolated":true,"parameters":["zoom"]},"property-type":"data-constant"},"text-keep-upright":{"type":"boolean","default":true,"expression":{"parameters":["zoom"]},"property-type":"data-constant"},"text-transform":{"type":"enum","values":{"none":1,"uppercase":1,"lowercase":1},"default":"none","expression":{"parameters":["zoom","feature"]},"property-type":"data-driven"},"text-offset":{"type":"array","value":"number","length":2,"default":[0,0],"expression":{"interpolated":true,"parameters":["zoom","feature"]},"property-type":"data-driven"},"text-allow-overlap":{"type":"boolean","default":false,"expression":{"parameters":["zoom"]},"property-type":"data-constant"},"text-ignore-placement":{"type":"boolean","default":false,"expression":{"parameters":["zoom"]},"property-type":"data-constant"},"text-optional":{"type":"boolean","default":false,"expression":{"parameters":["zoom"]},"property-type":"data-constant"},"visibility":{"type":"enum","values":{"visible":1,"none":1},"default":"visible","expression":{},"property-type":"constant"}},"layout_raster":{"visibility":{"type":"enum","values":{"visible":1,"none":1},"default":"visible","expression":{},"property-type":"constant"}},"layout_hillshade":{"visibility":{"type":"enum","values":{"visible":1,"none":1},"default":"visible","expression":{},"property-type":"constant"}},"filter":{"type":"array","value":"*"},"filter_symbol":{"type":"boolean","default":false,"property-type":"data-driven","expression":{"parameters":["zoom","feature","pitch","distance-from-center"]}},"filter_fill":{"type":"boolean","default":false,"property-type":"data-driven","expression":{"parameters":["zoom","feature"]}},"filter_line":{"type":"boolean","default":false,"property-type":"data-driven","expression":{"parameters":["zoom","feature"]}},"filter_circle":{"type":"boolean","default":false,"property-type":"data-driven","expression":{"parameters":["zoom","feature"]}},"filter_fill-extrusion":{"type":"boolean","default":false,"property-type":"data-driven","expression":{"parameters":["zoom","feature"]}},"filter_heatmap":{"type":"boolean","default":false,"property-type":"data-driven","expression":{"parameters":["zoom","feature"]}},"filter_operator":{"type":"enum","values":{"==":1,"!=":1,">":1,">=":1,"<":1,"<=":1,"in":1,"!in":1,"all":1,"any":1,"none":1,"has":1,"!has":1}},"geometry_type":{"type":"enum","values":{"Point":1,"LineString":1,"Polygon":1}},"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":1,"exponential":1,"interval":1,"categorical":1},"default":"exponential"},"colorSpace":{"type":"enum","values":{"rgb":1,"lab":1,"hcl":1},"default":"rgb"},"default":{"type":"*","required":false}},"function_stop":{"type":"array","minimum":0,"maximum":24,"value":["number","color"],"length":2},"expression":{"type":"array","value":"*","minimum":1},"fog":{"range":{"type":"array","default":[0.5,10],"minimum":-20,"maximum":20,"length":2,"value":"number","property-type":"data-constant","transition":true,"expression":{"interpolated":true,"parameters":["zoom","measure-light"],"relaxZoomRestriction":true}},"color":{"type":"color","property-type":"data-constant","default":"#ffffff","expression":{"interpolated":true,"parameters":["zoom","measure-light"],"relaxZoomRestriction":true},"transition":true},"high-color":{"type":"color","property-type":"data-constant","default":"#245cdf","expression":{"interpolated":true,"parameters":["zoom","measure-light"],"relaxZoomRestriction":true},"transition":true},"space-color":{"type":"color","property-type":"data-constant","default":["interpolate",["linear"],["zoom"],4,"#010b19",7,"#367ab9"],"expression":{"interpolated":true,"parameters":["zoom","measure-light"],"relaxZoomRestriction":true},"transition":true},"horizon-blend":{"type":"number","property-type":"data-constant","default":["interpolate",["linear"],["zoom"],4,0.2,7,0.1],"minimum":0,"maximum":1,"expression":{"interpolated":true,"parameters":["zoom","measure-light"],"relaxZoomRestriction":true},"transition":true},"star-intensity":{"type":"number","property-type":"data-constant","default":["interpolate",["linear"],["zoom"],5,0.35,6,0],"minimum":0,"maximum":1,"expression":{"interpolated":true,"parameters":["zoom","measure-light"],"relaxZoomRestriction":true},"transition":true},"vertical-range":{"type":"array","default":[0,0],"minimum":0,"length":2,"value":"number","property-type":"data-constant","transition":true,"expression":{"interpolated":true,"parameters":["zoom","measure-light"],"relaxZoomRestriction":true}}},"camera":{"camera-projection":{"type":"enum","values":{"perspective":1,"orthographic":1},"transition":true,"expression":{"interpolated":true,"parameters":["zoom"]},"default":"perspective","property-type":"data-constant"}},"light":{"anchor":{"type":"enum","default":"viewport","values":{"map":1,"viewport":1},"property-type":"data-constant","expression":{"parameters":["zoom"]}},"position":{"type":"array","default":[1.15,210,30],"length":3,"value":"number","property-type":"data-constant","transition":true,"expression":{"interpolated":true,"parameters":["zoom"]}},"color":{"type":"color","property-type":"data-constant","default":"#ffffff","expression":{"interpolated":true,"parameters":["zoom"]},"transition":true},"intensity":{"type":"number","property-type":"data-constant","default":0.5,"minimum":0,"maximum":1,"expression":{"interpolated":true,"parameters":["zoom"]},"transition":true}},"projection":{"name":{"type":"enum","values":{"albers":1,"equalEarth":1,"equirectangular":1,"lambertConformalConic":1,"mercator":1,"naturalEarth":1,"winkelTripel":1,"globe":1},"default":"mercator","required":true},"center":{"type":"array","length":2,"value":"number","property-type":"data-constant","minimum":[-180,-90],"maximum":[180,90]},"parallels":{"type":"array","length":2,"value":"number","property-type":"data-constant","minimum":[-90,-90],"maximum":[90,90]}},"terrain":{"source":{"type":"string","required":true},"exaggeration":{"type":"number","property-type":"data-constant","default":1,"minimum":0,"maximum":1000,"expression":{"interpolated":true,"parameters":["zoom"]},"transition":true}},"paint":["paint_fill","paint_line","paint_circle","paint_heatmap","paint_fill-extrusion","paint_symbol","paint_raster","paint_hillshade","paint_background","paint_sky","paint_model"],"paint_fill":{"fill-antialias":{"type":"boolean","default":true,"expression":{"parameters":["zoom"]},"property-type":"data-constant"},"fill-opacity":{"type":"number","default":1,"minimum":0,"maximum":1,"transition":true,"expression":{"interpolated":true,"parameters":["zoom","feature","feature-state","measure-light"]},"property-type":"data-driven"},"fill-color":{"type":"color","default":"#000000","transition":true,"expression":{"interpolated":true,"parameters":["zoom","feature","feature-state","measure-light"]},"property-type":"data-driven"},"fill-outline-color":{"type":"color","transition":true,"expression":{"interpolated":true,"parameters":["zoom","feature","feature-state","measure-light"]},"property-type":"data-driven"},"fill-translate":{"type":"array","value":"number","length":2,"default":[0,0],"transition":true,"expression":{"interpolated":true,"parameters":["zoom"]},"property-type":"data-constant"},"fill-translate-anchor":{"type":"enum","values":{"map":1,"viewport":1},"default":"map","expression":{"parameters":["zoom"]},"property-type":"data-constant"},"fill-pattern":{"type":"resolvedImage","expression":{"parameters":["zoom","feature"]},"property-type":"data-driven"},"fill-emissive-strength":{"type":"number","default":0,"minimum":0,"transition":true,"expression":{"interpolated":true,"parameters":["zoom","measure-light"]},"property-type":"data-constant"}},"paint_fill-extrusion":{"fill-extrusion-opacity":{"type":"number","default":1,"minimum":0,"maximum":1,"transition":true,"expression":{"interpolated":true,"parameters":["zoom"]},"property-type":"data-constant"},"fill-extrusion-color":{"type":"color","default":"#000000","transition":true,"expression":{"interpolated":true,"parameters":["zoom","feature","feature-state","measure-light"]},"property-type":"data-driven"},"fill-extrusion-translate":{"type":"array","value":"number","length":2,"default":[0,0],"transition":true,"expression":{"interpolated":true,"parameters":["zoom"]},"property-type":"data-constant"},"fill-extrusion-translate-anchor":{"type":"enum","values":{"map":1,"viewport":1},"default":"map","expression":{"parameters":["zoom"]},"property-type":"data-constant"},"fill-extrusion-pattern":{"type":"resolvedImage","expression":{"parameters":["zoom","feature"]},"property-type":"data-driven"},"fill-extrusion-height":{"type":"number","default":0,"minimum":0,"transition":true,"expression":{"interpolated":true,"parameters":["zoom","feature","feature-state"]},"property-type":"data-driven"},"fill-extrusion-base":{"type":"number","default":0,"minimum":0,"transition":true,"expression":{"interpolated":true,"parameters":["zoom","feature","feature-state"]},"property-type":"data-driven"},"fill-extrusion-vertical-gradient":{"type":"boolean","default":true,"expression":{"parameters":["zoom"]},"property-type":"data-constant"},"fill-extrusion-ambient-occlusion-intensity":{"property-type":"data-constant","type":"number","private":true,"default":0,"minimum":0,"maximum":1,"expression":{"interpolated":true,"parameters":["zoom"]},"transition":true},"fill-extrusion-ambient-occlusion-radius":{"property-type":"data-constant","type":"number","private":true,"default":3,"minimum":0,"expression":{"interpolated":true,"parameters":["zoom"]},"transition":true},"fill-extrusion-ambient-occlusion-wall-radius":{"property-type":"data-constant","type":"number","default":3,"minimum":0,"expression":{"interpolated":true,"parameters":["zoom"]},"transition":true},"fill-extrusion-ambient-occlusion-ground-radius":{"property-type":"data-constant","type":"number","default":3,"minimum":0,"expression":{"interpolated":true,"parameters":["zoom"]},"transition":true},"fill-extrusion-ambient-occlusion-ground-attenuation":{"property-type":"data-constant","type":"number","default":0.69,"minimum":0,"maximum":1,"transition":true,"expression":{"interpolated":true,"parameters":["zoom"]}},"fill-extrusion-flood-light-color":{"property-type":"data-constant","type":"color","default":"#ffffff","transition":true,"expression":{"interpolated":true,"parameters":["zoom","measure-light"]}},"fill-extrusion-flood-light-intensity":{"property-type":"data-constant","type":"number","default":0,"minimum":0,"maximum":1,"transition":true,"expression":{"interpolated":true,"parameters":["zoom","measure-light"]}},"fill-extrusion-flood-light-wall-radius":{"property-type":"data-driven","type":"number","default":0,"minimum":0,"transition":true,"expression":{"interpolated":true,"parameters":["feature","feature-state"]}},"fill-extrusion-flood-light-ground-radius":{"property-type":"data-driven","type":"number","default":0,"minimum":0,"transition":true,"expression":{"interpolated":true,"parameters":["feature","feature-state"]}},"fill-extrusion-flood-light-ground-attenuation":{"property-type":"data-constant","type":"number","default":0.69,"minimum":0,"maximum":1,"transition":true,"expression":{"interpolated":true,"parameters":["zoom"]}},"fill-extrusion-vertical-scale":{"property-type":"data-constant","type":"number","default":1,"minimum":0,"transition":true,"expression":{"interpolated":true,"parameters":["zoom"]}},"fill-extrusion-rounded-roof":{"property-type":"data-constant","type":"boolean","default":true,"expression":{"parameters":["zoom"]}},"fill-extrusion-cutoff-fade-range":{"type":"number","default":0,"minimum":0,"maximum":1,"expression":{},"property-type":"data-constant"},"fill-extrusion-emissive-strength":{"type":"number","default":0,"minimum":0,"transition":true,"expression":{"interpolated":true,"parameters":["zoom","measure-light"]},"property-type":"data-constant"}},"paint_line":{"line-opacity":{"type":"number","default":1,"minimum":0,"maximum":1,"transition":true,"expression":{"interpolated":true,"parameters":["zoom","feature","feature-state","measure-light"]},"property-type":"data-driven"},"line-color":{"type":"color","default":"#000000","transition":true,"expression":{"interpolated":true,"parameters":["zoom","feature","feature-state","measure-light"]},"property-type":"data-driven"},"line-translate":{"type":"array","value":"number","length":2,"default":[0,0],"transition":true,"expression":{"interpolated":true,"parameters":["zoom"]},"property-type":"data-constant"},"line-translate-anchor":{"type":"enum","values":{"map":1,"viewport":1},"default":"map","expression":{"parameters":["zoom"]},"property-type":"data-constant"},"line-width":{"type":"number","default":1,"minimum":0,"transition":true,"expression":{"interpolated":true,"parameters":["zoom","feature","feature-state","measure-light"]},"property-type":"data-driven"},"line-gap-width":{"type":"number","default":0,"minimum":0,"transition":true,"expression":{"interpolated":true,"parameters":["zoom","feature","feature-state","measure-light"]},"property-type":"data-driven"},"line-offset":{"type":"number","default":0,"transition":true,"expression":{"interpolated":true,"parameters":["zoom","feature","feature-state","measure-light"]},"property-type":"data-driven"},"line-blur":{"type":"number","default":0,"minimum":0,"transition":true,"expression":{"interpolated":true,"parameters":["zoom","feature","feature-state","measure-light"]},"property-type":"data-driven"},"line-dasharray":{"type":"array","value":"number","minimum":0,"expression":{"parameters":["zoom","feature"]},"property-type":"data-driven"},"line-pattern":{"type":"resolvedImage","expression":{"parameters":["zoom","feature"]},"property-type":"data-driven"},"line-gradient":{"type":"color","expression":{"interpolated":true,"parameters":["line-progress"]},"property-type":"color-ramp"},"line-trim-offset":{"type":"array","value":"number","length":2,"default":[0,0],"minimum":[0,0],"maximum":[1,1],"property-type":"constant"},"line-emissive-strength":{"type":"number","default":0,"minimum":0,"transition":true,"expression":{"interpolated":true,"parameters":["zoom","measure-light"]},"property-type":"data-constant"},"line-border-width":{"type":"number","private":true,"default":0,"minimum":0,"transition":true,"expression":{"interpolated":true,"parameters":["zoom","feature","feature-state"]},"property-type":"data-driven"},"line-border-color":{"type":"color","private":true,"default":"rgba(0, 0, 0, 0)","transition":true,"expression":{"interpolated":true,"parameters":["zoom","feature","feature-state"]},"property-type":"data-driven"}},"paint_circle":{"circle-radius":{"type":"number","default":5,"minimum":0,"transition":true,"expression":{"interpolated":true,"parameters":["zoom","feature","feature-state","measure-light"]},"property-type":"data-driven"},"circle-color":{"type":"color","default":"#000000","transition":true,"expression":{"interpolated":true,"parameters":["zoom","feature","feature-state","measure-light"]},"property-type":"data-driven"},"circle-blur":{"type":"number","default":0,"transition":true,"expression":{"interpolated":true,"parameters":["zoom","feature","feature-state","measure-light"]},"property-type":"data-driven"},"circle-opacity":{"type":"number","default":1,"minimum":0,"maximum":1,"transition":true,"expression":{"interpolated":true,"parameters":["zoom","feature","feature-state","measure-light"]},"property-type":"data-driven"},"circle-translate":{"type":"array","value":"number","length":2,"default":[0,0],"transition":true,"expression":{"interpolated":true,"parameters":["zoom"]},"property-type":"data-constant"},"circle-translate-anchor":{"type":"enum","values":{"map":1,"viewport":1},"default":"map","expression":{"parameters":["zoom"]},"property-type":"data-constant"},"circle-pitch-scale":{"type":"enum","values":{"map":1,"viewport":1},"default":"map","expression":{"parameters":["zoom"]},"property-type":"data-constant"},"circle-pitch-alignment":{"type":"enum","values":{"map":1,"viewport":1},"default":"viewport","expression":{"parameters":["zoom"]},"property-type":"data-constant"},"circle-stroke-width":{"type":"number","default":0,"minimum":0,"transition":true,"expression":{"interpolated":true,"parameters":["zoom","feature","feature-state","measure-light"]},"property-type":"data-driven"},"circle-stroke-color":{"type":"color","default":"#000000","transition":true,"expression":{"interpolated":true,"parameters":["zoom","feature","feature-state","measure-light"]},"property-type":"data-driven"},"circle-stroke-opacity":{"type":"number","default":1,"minimum":0,"maximum":1,"transition":true,"expression":{"interpolated":true,"parameters":["zoom","feature","feature-state","measure-light"]},"property-type":"data-driven"},"circle-emissive-strength":{"type":"number","default":0,"minimum":0,"transition":true,"expression":{"interpolated":true,"parameters":["zoom","measure-light"]},"property-type":"data-constant"}},"paint_heatmap":{"heatmap-radius":{"type":"number","default":30,"minimum":1,"transition":true,"expression":{"interpolated":true,"parameters":["zoom","feature","feature-state","measure-light"]},"property-type":"data-driven"},"heatmap-weight":{"type":"number","default":1,"minimum":0,"expression":{"interpolated":true,"parameters":["zoom","feature","feature-state","measure-light"]},"property-type":"data-driven"},"heatmap-intensity":{"type":"number","default":1,"minimum":0,"transition":true,"expression":{"interpolated":true,"parameters":["zoom"]},"property-type":"data-constant"},"heatmap-color":{"type":"color","default":["interpolate",["linear"],["heatmap-density"],0,"rgba(0, 0, 255, 0)",0.1,"royalblue",0.3,"cyan",0.5,"lime",0.7,"yellow",1,"red"],"expression":{"interpolated":true,"parameters":["heatmap-density"]},"property-type":"color-ramp"},"heatmap-opacity":{"type":"number","default":1,"minimum":0,"maximum":1,"transition":true,"expression":{"interpolated":true,"parameters":["zoom"]},"property-type":"data-constant"}},"paint_symbol":{"icon-opacity":{"type":"number","default":1,"minimum":0,"maximum":1,"transition":true,"expression":{"interpolated":true,"parameters":["zoom","feature","feature-state","measure-light"]},"property-type":"data-driven"},"icon-emissive-strength":{"type":"number","default":1,"minimum":0,"transition":true,"expression":{"interpolated":true,"parameters":["zoom","measure-light"]},"property-type":"data-driven"},"text-emissive-strength":{"type":"number","default":1,"minimum":0,"transition":true,"expression":{"interpolated":true,"parameters":["zoom","measure-light"]},"property-type":"data-driven"},"icon-color":{"type":"color","default":"#000000","transition":true,"expression":{"interpolated":true,"parameters":["zoom","feature","feature-state","measure-light"]},"property-type":"data-driven"},"icon-halo-color":{"type":"color","default":"rgba(0, 0, 0, 0)","transition":true,"expression":{"interpolated":true,"parameters":["zoom","feature","feature-state","measure-light"]},"property-type":"data-driven"},"icon-halo-width":{"type":"number","default":0,"minimum":0,"transition":true,"expression":{"interpolated":true,"parameters":["zoom","feature","feature-state","measure-light"]},"property-type":"data-driven"},"icon-halo-blur":{"type":"number","default":0,"minimum":0,"transition":true,"expression":{"interpolated":true,"parameters":["zoom","feature","feature-state","measure-light"]},"property-type":"data-driven"},"icon-translate":{"type":"array","value":"number","length":2,"default":[0,0],"transition":true,"expression":{"interpolated":true,"parameters":["zoom"]},"property-type":"data-constant"},"icon-translate-anchor":{"type":"enum","values":{"map":1,"viewport":1},"default":"map","expression":{"parameters":["zoom"]},"property-type":"data-constant"},"icon-image-cross-fade":{"type":"number","property-type":"data-driven","default":0,"minimum":0,"maximum":1,"expression":{"interpolated":true,"parameters":["zoom","feature","feature-state","measure-light"]},"transition":true},"text-opacity":{"type":"number","default":1,"minimum":0,"maximum":1,"transition":true,"expression":{"interpolated":true,"parameters":["zoom","feature","feature-state","measure-light"]},"property-type":"data-driven"},"text-color":{"type":"color","default":"#000000","transition":true,"overridable":true,"expression":{"interpolated":true,"parameters":["zoom","feature","feature-state","measure-light"]},"property-type":"data-driven"},"text-halo-color":{"type":"color","default":"rgba(0, 0, 0, 0)","transition":true,"expression":{"interpolated":true,"parameters":["zoom","feature","feature-state","measure-light"]},"property-type":"data-driven"},"text-halo-width":{"type":"number","default":0,"minimum":0,"transition":true,"expression":{"interpolated":true,"parameters":["zoom","feature","feature-state","measure-light"]},"property-type":"data-driven"},"text-halo-blur":{"type":"number","default":0,"minimum":0,"transition":true,"expression":{"interpolated":true,"parameters":["zoom","feature","feature-state","measure-light"]},"property-type":"data-driven"},"text-translate":{"type":"array","value":"number","length":2,"default":[0,0],"transition":true,"expression":{"interpolated":true,"parameters":["zoom"]},"property-type":"data-constant"},"text-translate-anchor":{"type":"enum","values":{"map":1,"viewport":1},"default":"map","expression":{"parameters":["zoom"]},"property-type":"data-constant"},"icon-color-saturation":{"type":"number","default":1,"minimum":0,"maximum":1,"transition":true,"expression":{},"property-type":"data-constant"}},"paint_raster":{"raster-opacity":{"type":"number","default":1,"minimum":0,"maximum":1,"transition":true,"expression":{"interpolated":true,"parameters":["zoom"]},"property-type":"data-constant"},"raster-color":{"type":"color","expression":{"interpolated":true,"parameters":["raster-value"]},"property-type":"color-ramp"},"raster-color-mix":{"type":"array","default":[0.2126,0.7152,0.0722,0],"length":4,"value":"number","property-type":"data-constant","transition":true,"expression":{"interpolated":true,"parameters":["zoom"]}},"raster-color-range":{"type":"array","default":[0,1],"length":2,"value":"number","property-type":"data-constant","transition":true,"expression":{"interpolated":true,"parameters":["zoom"]}},"raster-hue-rotate":{"type":"number","default":0,"period":360,"transition":true,"expression":{"interpolated":true,"parameters":["zoom"]},"property-type":"data-constant"},"raster-brightness-min":{"type":"number","default":0,"minimum":0,"maximum":1,"transition":true,"expression":{"interpolated":true,"parameters":["zoom"]},"property-type":"data-constant"},"raster-brightness-max":{"type":"number","default":1,"minimum":0,"maximum":1,"transition":true,"expression":{"interpolated":true,"parameters":["zoom"]},"property-type":"data-constant"},"raster-saturation":{"type":"number","default":0,"minimum":-1,"maximum":1,"transition":true,"expression":{"interpolated":true,"parameters":["zoom"]},"property-type":"data-constant"},"raster-contrast":{"type":"number","default":0,"minimum":-1,"maximum":1,"transition":true,"expression":{"interpolated":true,"parameters":["zoom"]},"property-type":"data-constant"},"raster-resampling":{"type":"enum","values":{"linear":1,"nearest":1},"default":"linear","expression":{"parameters":["zoom"]},"property-type":"data-constant"},"raster-fade-duration":{"type":"number","default":300,"minimum":0,"expression":{"interpolated":true,"parameters":["zoom"]},"property-type":"data-constant"},"raster-emissive-strength":{"type":"number","default":0,"minimum":0,"transition":true,"expression":{"interpolated":true,"parameters":["zoom","measure-light"]},"property-type":"data-constant"},"raster-array-band":{"type":"string","required":false,"property-type":"data-constant"},"raster-elevation":{"type":"number","default":0,"minimum":0,"transition":true,"expression":{"interpolated":true,"parameters":["zoom"]},"property-type":"data-constant"}},"paint_hillshade":{"hillshade-illumination-direction":{"type":"number","default":335,"minimum":0,"maximum":359,"expression":{"interpolated":true,"parameters":["zoom"]},"property-type":"data-constant"},"hillshade-illumination-anchor":{"type":"enum","values":{"map":1,"viewport":1},"default":"viewport","expression":{"parameters":["zoom"]},"property-type":"data-constant"},"hillshade-exaggeration":{"type":"number","default":0.5,"minimum":0,"maximum":1,"transition":true,"expression":{"interpolated":true,"parameters":["zoom"]},"property-type":"data-constant"},"hillshade-shadow-color":{"type":"color","default":"#000000","transition":true,"expression":{"interpolated":true,"parameters":["zoom","measure-light"]},"property-type":"data-constant"},"hillshade-highlight-color":{"type":"color","default":"#FFFFFF","transition":true,"expression":{"interpolated":true,"parameters":["zoom","measure-light"]},"property-type":"data-constant"},"hillshade-accent-color":{"type":"color","default":"#000000","transition":true,"expression":{"interpolated":true,"parameters":["zoom","measure-light"]},"property-type":"data-constant"},"hillshade-emissive-strength":{"type":"number","default":0,"minimum":0,"transition":true,"expression":{"interpolated":true,"parameters":["zoom","measure-light"]},"property-type":"data-constant"}},"paint_background":{"background-color":{"type":"color","default":"#000000","transition":true,"expression":{"interpolated":true,"parameters":["zoom"]},"property-type":"data-constant"},"background-pattern":{"type":"resolvedImage","expression":{"parameters":["zoom"]},"property-type":"data-constant"},"background-opacity":{"type":"number","default":1,"minimum":0,"maximum":1,"transition":true,"expression":{"interpolated":true,"parameters":["zoom"]},"property-type":"data-constant"},"background-emissive-strength":{"type":"number","default":0,"minimum":0,"transition":true,"expression":{"interpolated":true,"parameters":["zoom","measure-light"]},"property-type":"data-constant"}},"paint_sky":{"sky-type":{"type":"enum","values":{"gradient":1,"atmosphere":1},"default":"atmosphere","expression":{"parameters":["zoom"]},"property-type":"data-constant"},"sky-atmosphere-sun":{"type":"array","value":"number","length":2,"minimum":[0,0],"maximum":[360,180],"expression":{"parameters":["zoom"]},"property-type":"data-constant"},"sky-atmosphere-sun-intensity":{"type":"number","default":10,"minimum":0,"maximum":100,"property-type":"data-constant"},"sky-gradient-center":{"type":"array","value":"number","default":[0,0],"length":2,"minimum":[0,0],"maximum":[360,180],"expression":{"parameters":["zoom"]},"property-type":"data-constant"},"sky-gradient-radius":{"type":"number","default":90,"minimum":0,"maximum":180,"expression":{"parameters":["zoom"]},"property-type":"data-constant"},"sky-gradient":{"type":"color","default":["interpolate",["linear"],["sky-radial-progress"],0.8,"#87ceeb",1,"white"],"expression":{"interpolated":true,"parameters":["sky-radial-progress"]},"property-type":"color-ramp"},"sky-atmosphere-halo-color":{"type":"color","default":"white","property-type":"data-constant"},"sky-atmosphere-color":{"type":"color","default":"white","property-type":"data-constant"},"sky-opacity":{"type":"number","default":1,"minimum":0,"maximum":1,"transition":true,"expression":{"interpolated":true,"parameters":["zoom"]},"property-type":"data-constant"}},"paint_model":{"model-opacity":{"type":"number","default":1,"minimum":0,"maximum":1,"transition":true,"expression":{"interpolated":true,"parameters":["zoom"]},"property-type":"data-constant"},"model-rotation":{"type":"array","value":"number","length":3,"default":[0,0,0],"period":360,"property-type":"data-driven","expression":{"interpolated":true,"parameters":["feature","feature-state","zoom"]},"transition":true},"model-scale":{"type":"array","value":"number","length":3,"default":[1,1,1],"property-type":"data-driven","expression":{"interpolated":true,"parameters":["feature","feature-state","zoom"]},"transition":true},"model-translation":{"type":"array","value":"number","length":3,"default":[0,0,0],"property-type":"data-driven","expression":{"interpolated":true,"parameters":["feature","feature-state","zoom"]},"transition":true},"model-color":{"type":"color","default":"#ffffff","property-type":"data-driven","expression":{"interpolated":true,"parameters":["feature","feature-state","measure-light","zoom"]},"transition":true},"model-color-mix-intensity":{"type":"number","property-type":"data-driven","default":0,"minimum":0,"maximum":1,"expression":{"interpolated":true,"parameters":["feature","feature-state","measure-light"]},"transition":true},"model-type":{"type":"enum","values":{"common-3d":1,"location-indicator":1},"default":"common-3d","property-type":"data-constant"},"model-cast-shadows":{"type":"boolean","default":true,"expression":{},"property-type":"data-constant"},"model-receive-shadows":{"type":"boolean","default":true,"expression":{},"property-type":"data-constant"},"model-ambient-occlusion-intensity":{"type":"number","default":1,"minimum":0,"maximum":1,"expression":{"interpolated":true,"parameters":["zoom"]},"property-type":"data-constant","transition":true},"model-emissive-strength":{"type":"number","property-type":"data-driven","default":0,"minimum":0,"maximum":5,"expression":{"interpolated":true,"parameters":["feature","feature-state","measure-light"]},"transition":true},"model-roughness":{"type":"number","default":1,"minimum":0,"maximum":1,"property-type":"data-driven","expression":{"interpolated":true,"parameters":["feature","feature-state"]},"transition":true},"model-height-based-emissive-strength-multiplier":{"type":"array","default":[1,1,1,1,0],"length":5,"value":"number","property-type":"data-driven","expression":{"interpolated":true,"parameters":["feature","feature-state","measure-light"]},"transition":true},"model-cutoff-fade-range":{"type":"number","default":0,"minimum":0,"maximum":1,"expression":{},"property-type":"data-constant"}},"transition":{"duration":{"type":"number","default":300,"minimum":0},"delay":{"type":"number","default":0,"minimum":0}},"property-type":{"data-driven":{"type":"property-type"},"color-ramp":{"type":"property-type"},"data-constant":{"type":"property-type"},"constant":{"type":"property-type"}},"promoteId":{"*":{"type":"string"}}}');class Oe{constructor(e,i,r,o){this.message=(e?`${e}: `:"")+r,o&&(this.identifier=o),i!=null&&i.__line__&&(this.line=i.__line__)}}class Es extends Oe{}function ln(t,...e){for(const i of e)for(const r in i)t[r]=i[r];return t}function Gi(t){return t instanceof Number||t instanceof String||t instanceof Boolean?t.valueOf():t}function cn(t){if(Array.isArray(t))return t.map(cn);if(t instanceof Object&&!(t instanceof Number||t instanceof String||t instanceof Boolean)){const e={};for(const i in t)e[i]=cn(t[i]);return e}return Gi(t)}class XE extends Error{constructor(e,i){super(i),this.message=i,this.key=e}}var Oo=XE;class Xd{constructor(e,i=[]){this.parent=e,this.bindings={};for(const[r,o]of i)this.bindings[r]=o}concat(e){return new Xd(this,e)}get(e){if(this.bindings[e])return this.bindings[e];if(this.parent)return this.parent.get(e);throw new Error(`${e} not found in scope.`)}has(e){return!!this.bindings[e]||!!this.parent&&this.parent.has(e)}}var YE=Xd;const da={kind:"null"},ze={kind:"number"},Ft={kind:"string"},Ut={kind:"boolean"},ao={kind:"color"},pa={kind:"object"},jt={kind:"value"},Wc={kind:"collator"},_l={kind:"formatted"},gl={kind:"resolvedImage"};function zr(t,e){return{kind:"array",itemType:t,N:e}}function Ni(t){if(t.kind==="array"){const e=Ni(t.itemType);return typeof t.N=="number"?`array<${e}, ${t.N}>`:t.itemType.kind==="value"?"array":`array<${e}>`}return t.kind}const KE=[da,ze,Ft,Ut,ao,_l,pa,zr(jt),gl];function yl(t,e){if(e.kind==="error")return null;if(t.kind==="array"){if(e.kind==="array"&&(e.N===0&&e.itemType.kind==="value"||!yl(t.itemType,e.itemType))&&(typeof t.N!="number"||t.N===e.N))return null}else{if(t.kind===e.kind)return null;if(t.kind==="value"){for(const i of KE)if(!yl(i,e))return null}}return`Expected ${Ni(t)} but found ${Ni(e)} instead.`}function Yd(t,e){return e.some(i=>i.kind===t.kind)}function vl(t,e){return e.some(i=>i==="null"?t===null:i==="array"?Array.isArray(t):i==="object"?t&&!Array.isArray(t)&&typeof t=="object":i===typeof t)}var Kd,Vg={transparent:[0,0,0,0],aliceblue:[240,248,255,1],antiquewhite:[250,235,215,1],aqua:[0,255,255,1],aquamarine:[127,255,212,1],azure:[240,255,255,1],beige:[245,245,220,1],bisque:[255,228,196,1],black:[0,0,0,1],blanchedalmond:[255,235,205,1],blue:[0,0,255,1],blueviolet:[138,43,226,1],brown:[165,42,42,1],burlywood:[222,184,135,1],cadetblue:[95,158,160,1],chartreuse:[127,255,0,1],chocolate:[210,105,30,1],coral:[255,127,80,1],cornflowerblue:[100,149,237,1],cornsilk:[255,248,220,1],crimson:[220,20,60,1],cyan:[0,255,255,1],darkblue:[0,0,139,1],darkcyan:[0,139,139,1],darkgoldenrod:[184,134,11,1],darkgray:[169,169,169,1],darkgreen:[0,100,0,1],darkgrey:[169,169,169,1],darkkhaki:[189,183,107,1],darkmagenta:[139,0,139,1],darkolivegreen:[85,107,47,1],darkorange:[255,140,0,1],darkorchid:[153,50,204,1],darkred:[139,0,0,1],darksalmon:[233,150,122,1],darkseagreen:[143,188,143,1],darkslateblue:[72,61,139,1],darkslategray:[47,79,79,1],darkslategrey:[47,79,79,1],darkturquoise:[0,206,209,1],darkviolet:[148,0,211,1],deeppink:[255,20,147,1],deepskyblue:[0,191,255,1],dimgray:[105,105,105,1],dimgrey:[105,105,105,1],dodgerblue:[30,144,255,1],firebrick:[178,34,34,1],floralwhite:[255,250,240,1],forestgreen:[34,139,34,1],fuchsia:[255,0,255,1],gainsboro:[220,220,220,1],ghostwhite:[248,248,255,1],gold:[255,215,0,1],goldenrod:[218,165,32,1],gray:[128,128,128,1],green:[0,128,0,1],greenyellow:[173,255,47,1],grey:[128,128,128,1],honeydew:[240,255,240,1],hotpink:[255,105,180,1],indianred:[205,92,92,1],indigo:[75,0,130,1],ivory:[255,255,240,1],khaki:[240,230,140,1],lavender:[230,230,250,1],lavenderblush:[255,240,245,1],lawngreen:[124,252,0,1],lemonchiffon:[255,250,205,1],lightblue:[173,216,230,1],lightcoral:[240,128,128,1],lightcyan:[224,255,255,1],lightgoldenrodyellow:[250,250,210,1],lightgray:[211,211,211,1],lightgreen:[144,238,144,1],lightgrey:[211,211,211,1],lightpink:[255,182,193,1],lightsalmon:[255,160,122,1],lightseagreen:[32,178,170,1],lightskyblue:[135,206,250,1],lightslategray:[119,136,153,1],lightslategrey:[119,136,153,1],lightsteelblue:[176,196,222,1],lightyellow:[255,255,224,1],lime:[0,255,0,1],limegreen:[50,205,50,1],linen:[250,240,230,1],magenta:[255,0,255,1],maroon:[128,0,0,1],mediumaquamarine:[102,205,170,1],mediumblue:[0,0,205,1],mediumorchid:[186,85,211,1],mediumpurple:[147,112,219,1],mediumseagreen:[60,179,113,1],mediumslateblue:[123,104,238,1],mediumspringgreen:[0,250,154,1],mediumturquoise:[72,209,204,1],mediumvioletred:[199,21,133,1],midnightblue:[25,25,112,1],mintcream:[245,255,250,1],mistyrose:[255,228,225,1],moccasin:[255,228,181,1],navajowhite:[255,222,173,1],navy:[0,0,128,1],oldlace:[253,245,230,1],olive:[128,128,0,1],olivedrab:[107,142,35,1],orange:[255,165,0,1],orangered:[255,69,0,1],orchid:[218,112,214,1],palegoldenrod:[238,232,170,1],palegreen:[152,251,152,1],paleturquoise:[175,238,238,1],palevioletred:[219,112,147,1],papayawhip:[255,239,213,1],peachpuff:[255,218,185,1],peru:[205,133,63,1],pink:[255,192,203,1],plum:[221,160,221,1],powderblue:[176,224,230,1],purple:[128,0,128,1],rebeccapurple:[102,51,153,1],red:[255,0,0,1],rosybrown:[188,143,143,1],royalblue:[65,105,225,1],saddlebrown:[139,69,19,1],salmon:[250,128,114,1],sandybrown:[244,164,96,1],seagreen:[46,139,87,1],seashell:[255,245,238,1],sienna:[160,82,45,1],silver:[192,192,192,1],skyblue:[135,206,235,1],slateblue:[106,90,205,1],slategray:[112,128,144,1],slategrey:[112,128,144,1],snow:[255,250,250,1],springgreen:[0,255,127,1],steelblue:[70,130,180,1],tan:[210,180,140,1],teal:[0,128,128,1],thistle:[216,191,216,1],tomato:[255,99,71,1],turquoise:[64,224,208,1],violet:[238,130,238,1],wheat:[245,222,179,1],white:[255,255,255,1],whitesmoke:[245,245,245,1],yellow:[255,255,0,1],yellowgreen:[154,205,50,1]};function Hc(t){return(t=Math.round(t))<0?0:t>255?255:t}function Jd(t){return Hc(t[t.length-1]==="%"?parseFloat(t)/100*255:parseInt(t))}function Zc(t){return(e=t[t.length-1]==="%"?parseFloat(t)/100:parseFloat(t))<0?0:e>1?1:e;var e}function Qd(t,e,i){return i<0?i+=1:i>1&&(i-=1),6*i<1?t+(e-t)*i*6:2*i<1?e:3*i<2?t+(e-t)*(2/3-i)*6:t}try{Kd={}.parseCSSColor=function(t){var e,i=t.replace(/ /g,"").toLowerCase();if(i in Vg)return Vg[i].slice();if(i[0]==="#")return i.length===4?(e=parseInt(i.substr(1),16))>=0&&e<=4095?[(3840&e)>>4|(3840&e)>>8,240&e|(240&e)>>4,15&e|(15&e)<<4,1]:null:i.length===7&&(e=parseInt(i.substr(1),16))>=0&&e<=16777215?[(16711680&e)>>16,(65280&e)>>8,255&e,1]:null;var r=i.indexOf("("),o=i.indexOf(")");if(r!==-1&&o+1===i.length){var n=i.substr(0,r),s=i.substr(r+1,o-(r+1)).split(","),a=1;switch(n){case"rgba":if(s.length!==4)return null;a=Zc(s.pop());case"rgb":return s.length!==3?null:[Jd(s[0]),Jd(s[1]),Jd(s[2]),a];case"hsla":if(s.length!==4)return null;a=Zc(s.pop());case"hsl":if(s.length!==3)return null;var l=(parseFloat(s[0])%360+360)%360/360,c=Zc(s[1]),u=Zc(s[2]),p=u<=.5?u*(c+1):u+c-u*c,f=2*u-p;return[Hc(255*Qd(f,p,l+1/3)),Hc(255*Qd(f,p,l)),Hc(255*Qd(f,p,l-1/3)),a];default:return null}}return null}}catch{}class Rr{constructor(e,i,r,o=1){this.r=e,this.g=i,this.b=r,this.a=o}static parse(e){if(!e)return;if(e instanceof Rr)return e;if(typeof e!="string")return;const i=Kd(e);return i?new Rr(i[0]/255*i[3],i[1]/255*i[3],i[2]/255*i[3],i[3]):void 0}toString(){const[e,i,r,o]=this.toArray();return`rgba(${Math.round(e)},${Math.round(i)},${Math.round(r)},${o})`}toArray(){const{r:e,g:i,b:r,a:o}=this;return o===0?[0,0,0,0]:[255*e/o,255*i/o,255*r/o,o]}toArray01(){const{r:e,g:i,b:r,a:o}=this;return o===0?[0,0,0,0]:[e/o,i/o,r/o,o]}toArray01Scaled(e){const{r:i,g:r,b:o,a:n}=this;return n===0?[0,0,0]:[i/n*e,r/n*e,o/n*e]}toArray01PremultipliedAlpha(){const{r:e,g:i,b:r,a:o}=this;return[e,i,r,o]}toArray01Linear(){const{r:e,g:i,b:r,a:o}=this;return o===0?[0,0,0,0]:[Math.pow(e/o,2.2),Math.pow(i/o,2.2),Math.pow(r/o,2.2),o]}}Rr.black=new Rr(0,0,0,1),Rr.white=new Rr(1,1,1,1),Rr.transparent=new Rr(0,0,0,0),Rr.red=new Rr(1,0,0,1),Rr.blue=new Rr(0,0,1,1);var bt=Rr;class ep{constructor(e,i,r){this.sensitivity=e?i?"variant":"case":i?"accent":"base",this.locale=r,this.collator=new Intl.Collator(this.locale?this.locale:[],{sensitivity:this.sensitivity,usage:"search"})}compare(e,i){return this.collator.compare(e,i)}resolvedLocale(){return new Intl.Collator(this.locale?this.locale:[]).resolvedOptions().locale}}class tp{constructor(e,i,r,o,n){this.text=e.normalize?e.normalize():e,this.image=i,this.scale=r,this.fontStack=o,this.textColor=n}}class Lr{constructor(e){this.sections=e}static fromString(e){return new Lr([new tp(e,null,null,null,null)])}isEmpty(){return this.sections.length===0||!this.sections.some(e=>e.text.length!==0||e.image&&e.image.namePrimary.length!==0)}static factory(e){return e instanceof Lr?e:Lr.fromString(e)}toString(){return this.sections.length===0?"":this.sections.map(e=>e.text).join("")}serialize(){const e=["format"];for(const i of this.sections){if(i.image){e.push(["image",i.image.namePrimary]);continue}e.push(i.text);const r={};i.fontStack&&(r["text-font"]=["literal",i.fontStack.split(",")]),i.scale&&(r["font-scale"]=i.scale),i.textColor&&(r["text-color"]=["rgba"].concat(i.textColor.toArray())),e.push(r)}return e}}class lo{constructor(e){this.namePrimary=e.namePrimary,e.nameSecondary&&(this.nameSecondary=e.nameSecondary),this.available=e.available}toString(){return this.nameSecondary?`[${this.namePrimary},${this.nameSecondary}]`:this.namePrimary}static fromString(e,i){return e?new lo({namePrimary:e,nameSecondary:i,available:!1}):null}serialize(){return this.nameSecondary?["image",this.namePrimary,this.nameSecondary]:["image",this.namePrimary]}}function Ug(t,e,i,r){return typeof t=="number"&&t>=0&&t<=255&&typeof e=="number"&&e>=0&&e<=255&&typeof i=="number"&&i>=0&&i<=255?r===void 0||typeof r=="number"&&r>=0&&r<=1?null:`Invalid rgba value [${[t,e,i,r].join(", ")}]: 'a' must be between 0 and 1.`:`Invalid rgba value [${(typeof r=="number"?[t,e,i,r]:[t,e,i]).join(", ")}]: 'r', 'g', and 'b' must be between 0 and 255.`}function fa(t){if(t===null||typeof t=="string"||typeof t=="boolean"||typeof t=="number"||t instanceof bt||t instanceof ep||t instanceof Lr||t instanceof lo)return!0;if(Array.isArray(t)){for(const e of t)if(!fa(e))return!1;return!0}if(typeof t=="object"){for(const e in t)if(!fa(t[e]))return!1;return!0}return!1}function Ji(t){if(t===null)return da;if(typeof t=="string")return Ft;if(typeof t=="boolean")return Ut;if(typeof t=="number")return ze;if(t instanceof bt)return ao;if(t instanceof ep)return Wc;if(t instanceof Lr)return _l;if(t instanceof lo)return gl;if(Array.isArray(t)){const e=t.length;let i;for(const r of t){const o=Ji(r);if(i){if(i===o)continue;i=jt;break}i=o}return zr(i||jt,e)}return pa}function xl(t){const e=typeof t;return t===null?"":e==="string"||e==="number"||e==="boolean"?String(t):t instanceof bt||t instanceof Lr||t instanceof lo?t.toString():JSON.stringify(t)}class ip{constructor(e,i){this.type=e,this.value=i}static parse(e,i){if(e.length!==2)return i.error(`'literal' expression requires exactly one argument, but found ${e.length-1} instead.`);if(!fa(e[1]))return i.error("invalid value");const r=e[1];let o=Ji(r);const n=i.expectedType;return o.kind!=="array"||o.N!==0||!n||n.kind!=="array"||typeof n.N=="number"&&n.N!==0||(o=n),new ip(o,r)}evaluate(){return this.value}eachChild(){}outputDefined(){return!0}serialize(){return this.type.kind==="array"||this.type.kind==="object"?["literal",this.value]:this.value instanceof bt?["rgba"].concat(this.value.toArray()):this.value instanceof Lr?this.value.serialize():this.value}}var bl=ip,or=class{constructor(t){this.name="ExpressionEvaluationError",this.message=t}toJSON(){return this.message}};const rp={string:Ft,number:ze,boolean:Ut,object:pa};class op{constructor(e,i){this.type=e,this.args=i}static parse(e,i){if(e.length<2)return i.error("Expected at least one argument.");let r,o=1;const n=e[0];if(n==="array"){let a,l;if(e.length>2){const c=e[1];if(typeof c!="string"||!(c in rp)||c==="object")return i.error('The item type argument of "array" must be one of string, number, boolean',1);a=rp[c],o++}else a=jt;if(e.length>3){if(e[2]!==null&&(typeof e[2]!="number"||e[2]<0||e[2]!==Math.floor(e[2])))return i.error('The length argument to "array" must be a positive integer literal',2);l=e[2],o++}r=zr(a,l)}else r=rp[n];const s=[];for(;o<e.length;o++){const a=i.parse(e[o],o,jt);if(!a)return null;s.push(a)}return new op(r,s)}evaluate(e){for(let i=0;i<this.args.length;i++){const r=this.args[i].evaluate(e);if(!yl(this.type,Ji(r)))return r;if(i===this.args.length-1)throw new or(`Expected value to be of type ${Ni(this.type)}, but found ${Ni(Ji(r))} instead.`)}return null}eachChild(e){this.args.forEach(e)}outputDefined(){return this.args.every(e=>e.outputDefined())}serialize(){const e=this.type,i=[e.kind];if(e.kind==="array"){const r=e.itemType;if(r.kind==="string"||r.kind==="number"||r.kind==="boolean"){i.push(r.kind);const o=e.N;(typeof o=="number"||this.args.length>1)&&i.push(o)}}return i.concat(this.args.map(r=>r.serialize()))}}var un=op;class wl{constructor(e){this.type=_l,this.sections=e}static parse(e,i){if(e.length<2)return i.error("Expected at least one argument.");const r=e[1];if(!Array.isArray(r)&&typeof r=="object")return i.error("First argument must be an image or text section.");const o=[];let n=!1;for(let s=1;s<=e.length-1;++s){const a=e[s];if(n&&typeof a=="object"&&!Array.isArray(a)){n=!1;let l=null;if(a["font-scale"]&&(l=i.parse(a["font-scale"],1,ze),!l))return null;let c=null;if(a["text-font"]&&(c=i.parse(a["text-font"],1,zr(Ft)),!c))return null;let u=null;if(a["text-color"]&&(u=i.parse(a["text-color"],1,ao),!u))return null;const p=o[o.length-1];p.scale=l,p.font=c,p.textColor=u}else{const l=i.parse(e[s],1,jt);if(!l)return null;const c=l.type.kind;if(c!=="string"&&c!=="value"&&c!=="null"&&c!=="resolvedImage")return i.error("Formatted text type must be 'string', 'value', 'image' or 'null'.");n=!0,o.push({content:l,scale:null,font:null,textColor:null})}}return new wl(o)}evaluate(e){return new Lr(this.sections.map(i=>{const r=i.content.evaluate(e);return Ji(r)===gl?new tp("",r,null,null,null):new tp(xl(r),null,i.scale?i.scale.evaluate(e):null,i.font?i.font.evaluate(e).join(","):null,i.textColor?i.textColor.evaluate(e):null)}))}eachChild(e){for(const i of this.sections)e(i.content),i.scale&&e(i.scale),i.font&&e(i.font),i.textColor&&e(i.textColor)}outputDefined(){return!1}serialize(){const e=["format"];for(const i of this.sections){e.push(i.content.serialize());const r={};i.scale&&(r["font-scale"]=i.scale.serialize()),i.font&&(r["text-font"]=i.font.serialize()),i.textColor&&(r["text-color"]=i.textColor.serialize()),e.push(r)}return e}}class Tl{constructor(e,i){this.type=gl,this.inputPrimary=e,this.inputSecondary=i}static parse(e,i){if(e.length<2)return i.error("Expected two or more arguments.");const r=i.parse(e[1],1,Ft);if(!r)return i.error("No image name provided.");if(e.length===2)return new Tl(r);const o=i.parse(e[2],1,Ft);return o?new Tl(r,o):i.error("Secondary image variant is not a string.")}evaluate(e){const i=lo.fromString(this.inputPrimary.evaluate(e),this.inputSecondary?this.inputSecondary.evaluate(e):void 0);return i&&e.availableImages&&(i.available=e.availableImages.indexOf(i.namePrimary)>-1,i.nameSecondary&&i.available&&e.availableImages&&(i.available=e.availableImages.indexOf(i.nameSecondary)>-1)),i}eachChild(e){e(this.inputPrimary),this.inputSecondary&&e(this.inputSecondary)}outputDefined(){return!1}serialize(){return this.inputSecondary?["image",this.inputPrimary.serialize(),this.inputSecondary.serialize()]:["image",this.inputPrimary.serialize()]}}function Yt(t){return t instanceof Number?"number":t instanceof String?"string":t instanceof Boolean?"boolean":Array.isArray(t)?"array":t===null?"null":typeof t}const JE={"to-boolean":Ut,"to-color":ao,"to-number":ze,"to-string":Ft};class np{constructor(e,i){this.type=e,this.args=i}static parse(e,i){if(e.length<2)return i.error("Expected at least one argument.");const r=e[0],o=[];let n=da;if(r==="to-array"){if(!Array.isArray(e[1]))return null;const s=e[1].length;if(i.expectedType){if(i.expectedType.kind!=="array")return i.error(`Expected ${i.expectedType.kind} but found array.`);n=zr(i.expectedType.itemType,s)}else{if(!(s>0&&fa(e[1][0])))return null;n=zr(Ji(e[1][0]),s)}for(let a=0;a<s;a++){const l=e[1][a];let c;if(Yt(l)==="array")c=i.parse(l,void 0,n.itemType);else{const u=Yt(l);if(u!==n.itemType.kind)return i.error(`Expected ${n.itemType.kind} but found ${u}.`);c=i.registry.literal.parse(["literal",l===void 0?null:l],i)}if(!c)return null;o.push(c)}}else{if((r==="to-boolean"||r==="to-string")&&e.length!==2)return i.error("Expected one argument.");n=JE[r];for(let s=1;s<e.length;s++){const a=i.parse(e[s],s,jt);if(!a)return null;o.push(a)}}return new np(n,o)}evaluate(e){if(this.type.kind==="boolean")return!!this.args[0].evaluate(e);if(this.type.kind==="color"){let i,r;for(const o of this.args){if(i=o.evaluate(e),r=null,i instanceof bt)return i;if(typeof i=="string"){const n=e.parseColor(i);if(n)return n}else if(Array.isArray(i)&&(r=i.length<3||i.length>4?`Invalid rbga value ${JSON.stringify(i)}: expected an array containing either three or four numeric values.`:Ug(i[0],i[1],i[2],i[3]),!r))return new bt(i[0]/255,i[1]/255,i[2]/255,i[3])}throw new or(r||`Could not parse color from value '${typeof i=="string"?i:String(JSON.stringify(i))}'`)}if(this.type.kind==="number"){let i=null;for(const r of this.args){if(i=r.evaluate(e),i===null)return 0;const o=Number(i);if(!isNaN(o))return o}throw new or(`Could not convert ${JSON.stringify(i)} to number.`)}return this.type.kind==="formatted"?Lr.fromString(xl(this.args[0].evaluate(e))):this.type.kind==="resolvedImage"?lo.fromString(xl(this.args[0].evaluate(e))):this.type.kind==="array"?this.args.map(i=>i.evaluate(e)):xl(this.args[0].evaluate(e))}eachChild(e){this.args.forEach(e)}outputDefined(){return this.args.every(e=>e.outputDefined())}serialize(){if(this.type.kind==="formatted")return new wl([{content:this.args[0],scale:null,font:null,textColor:null}]).serialize();if(this.type.kind==="resolvedImage")return new Tl(this.args[0]).serialize();const e=this.type.kind==="array"?[]:[`to-${this.type.kind}`];return this.eachChild(i=>{e.push(i.serialize())}),e}}var Ss=np;const QE=["Unknown","Point","LineString","Polygon"];var qg=class{constructor(t){this.globals=null,this.feature=null,this.featureState=null,this.formattedSection=null,this._parseColorCache={},this.availableImages=null,this.canonical=null,this.featureTileCoord=null,this.featureDistanceData=null,this.options=t}id(){return this.feature&&this.feature.id!==void 0?this.feature.id:null}geometryType(){return this.feature?typeof this.feature.type=="number"?QE[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||{}}measureLight(t){return this.globals.brightness||0}distanceFromCenter(){if(this.featureTileCoord&&this.featureDistanceData){const t=this.featureDistanceData.center,e=this.featureDistanceData.scale,{x:i,y:r}=this.featureTileCoord;return this.featureDistanceData.bearing[0]*(i*e-t[0])+this.featureDistanceData.bearing[1]*(r*e-t[1])}return 0}parseColor(t){let e=this._parseColorCache[t];return e||(e=this._parseColorCache[t]=bt.parse(t)),e}getConfig(t){return this.options?this.options.get(t):null}};class As{constructor(e,i,r,o,n){this.name=e,this.type=i,this._evaluate=r,this.args=o,this._overloadIndex=n}evaluate(e){if(!this._evaluate){const i=As.definitions[this.name];this._evaluate=Array.isArray(i)?i[2]:i.overloads[this._overloadIndex][1]}return this._evaluate(e,this.args)}eachChild(e){this.args.forEach(e)}outputDefined(){return!1}serialize(){return[this.name].concat(this.args.map(e=>e.serialize()))}static parse(e,i){const r=e[0],o=As.definitions[r];if(!o)return i.error(`Unknown expression "${r}". If you wanted a literal array, use ["literal", [...]].`,0);const n=Array.isArray(o)?o[0]:o.type,s=Array.isArray(o)?[[o[1],o[2]]]:o.overloads,a=[];let l=null,c=-1;for(const[u,p]of s){if(Array.isArray(u)&&u.length!==e.length-1)continue;a.push(u),c++,l=new sy(i.registry,i.path,null,i.scope,void 0,i.options);const f=[];let _=!1;for(let g=1;g<e.length;g++){const y=e[g],v=Array.isArray(u)?u[g-1]:u.type,b=l.parse(y,1+f.length,v);if(!b){_=!0;break}f.push(b)}if(!_)if(Array.isArray(u)&&u.length!==f.length)l.error(`Expected ${u.length} arguments, but found ${f.length} instead.`);else{for(let g=0;g<f.length;g++){const y=Array.isArray(u)?u[g]:u.type,v=f[g];l.concat(g+1).checkSubtype(y,v.type)}if(l.errors.length===0)return new As(r,n,p,f,c)}}if(a.length===1)i.errors.push(...l.errors);else{const u=(a.length?a:s.map(([f])=>f)).map(eS).join(" | "),p=[];for(let f=1;f<e.length;f++){const _=i.parse(e[f],1+p.length);if(!_)return null;p.push(Ni(_.type))}i.error(`Expected arguments of type ${u}, but found (${p.join(", ")}) instead.`)}return null}static register(e,i){As.definitions=i;for(const r in i)e[r]=As}}function eS(t){return Array.isArray(t)?`(${t.map(Ni).join(", ")})`:`(${Ni(t.type)}...)`}var Bo=As;class Xc{constructor(e,i,r){this.type=Wc,this.locale=r,this.caseSensitive=e,this.diacriticSensitive=i}static parse(e,i){if(e.length!==2)return i.error("Expected one argument.");const r=e[1];if(typeof r!="object"||Array.isArray(r))return i.error("Collator options argument must be an object.");const o=i.parse(r["case-sensitive"]!==void 0&&r["case-sensitive"],1,Ut);if(!o)return null;const n=i.parse(r["diacritic-sensitive"]!==void 0&&r["diacritic-sensitive"],1,Ut);if(!n)return null;let s=null;return r.locale&&(s=i.parse(r.locale,1,Ft),!s)?null:new Xc(o,n,s)}evaluate(e){return new ep(this.caseSensitive.evaluate(e),this.diacriticSensitive.evaluate(e),this.locale?this.locale.evaluate(e):null)}eachChild(e){e(this.caseSensitive),e(this.diacriticSensitive),this.locale&&e(this.locale)}outputDefined(){return!1}serialize(){const e={};return e["case-sensitive"]=this.caseSensitive.serialize(),e["diacritic-sensitive"]=this.diacriticSensitive.serialize(),this.locale&&(e.locale=this.locale.serialize()),["collator",e]}}var Gg={exports:{}};Gg.exports=function(){function t(r,o,n,s,a){for(;s>n;){if(s-n>600){var l=s-n+1,c=o-n+1,u=Math.log(l),p=.5*Math.exp(2*u/3),f=.5*Math.sqrt(u*p*(l-p)/l)*(c-l/2<0?-1:1);t(r,o,Math.max(n,Math.floor(o-c*p/l+f)),Math.min(s,Math.floor(o+(l-c)*p/l+f)),a)}var _=r[o],g=n,y=s;for(e(r,n,o),a(r[s],_)>0&&e(r,n,s);g<y;){for(e(r,g,y),g++,y--;a(r[g],_)<0;)g++;for(;a(r[y],_)>0;)y--}a(r[n],_)===0?e(r,n,y):e(r,++y,s),y<=o&&(n=y+1),o<=y&&(s=y-1)}}function e(r,o,n){var s=r[o];r[o]=r[n],r[n]=s}function i(r,o){return r<o?-1:r>o?1:0}return function(r,o,n,s,a){t(r,o,n||0,s||r.length-1,a||i)}}();var tS=yt(Gg.exports);function iS(t){let e=0;for(let i,r,o=0,n=t.length,s=n-1;o<n;s=o++)i=t[o],r=t[s],e+=(r.x-i.x)*(i.y+r.y);return e}function El(t,e){t[0]=Math.min(t[0],e[0]),t[1]=Math.min(t[1],e[1]),t[2]=Math.max(t[2],e[0]),t[3]=Math.max(t[3],e[1])}function Sl(t,e){return!(t[0]<=e[0]||t[2]>=e[2]||t[1]<=e[1]||t[3]>=e[3])}function rS(t,e,i){const r=t[0]-e[0],o=t[1]-e[1],n=t[0]-i[0],s=t[1]-i[1];return r*s-n*o==0&&r*n<=0&&o*s<=0}function ma(t,e,i=!1){let r=!1;for(let a=0,l=e.length;a<l;a++){const c=e[a];for(let u=0,p=c.length,f=p-1;u<p;f=u++){const _=c[f],g=c[u];if(rS(t,_,g))return i;(n=_)[1]>(o=t)[1]!=(s=g)[1]>o[1]&&o[0]<(s[0]-n[0])*(o[1]-n[1])/(s[1]-n[1])+n[0]&&(r=!r)}}var o,n,s;return r}function $g(t,e,i,r){const o=r[0]-i[0],n=r[1]-i[1],s=(t[0]-i[0])*n-o*(t[1]-i[1]),a=(e[0]-i[0])*n-o*(e[1]-i[1]);return s>0&&a<0||s<0&&a>0}function Yc(t,e,i,r){return(o=[r[0]-i[0],r[1]-i[1]])[0]*(n=[e[0]-t[0],e[1]-t[1]])[1]-o[1]*n[0]!=0&&!(!$g(t,e,i,r)||!$g(i,r,t,e));var o,n}const Bn=8192;function oS(t,e){const i=(180+t[0])/360,r=(180-180/Math.PI*Math.log(Math.tan(Math.PI/4+t[1]*Math.PI/360)))/360,o=Math.pow(2,e.z);return[Math.round(i*o*Bn),Math.round(r*o*Bn)]}function nS(t,e){for(let i=0;i<e.length;i++)if(ma(t,e[i]))return!0;return!1}function sS(t,e,i){for(const r of i)for(let o=0,n=r.length,s=n-1;o<n;s=o++)if(Yc(t,e,r[s],r[o]))return!0;return!1}function Wg(t,e){for(let i=0;i<t.length;++i)if(!ma(t[i],e))return!1;for(let i=0;i<t.length-1;++i)if(sS(t[i],t[i+1],e))return!1;return!0}function aS(t,e){for(let i=0;i<e.length;i++)if(Wg(t,e[i]))return!0;return!1}function sp(t,e,i){const r=[];for(let o=0;o<t.length;o++){const n=[];for(let s=0;s<t[o].length;s++){const a=oS(t[o][s],i);El(e,a),n.push(a)}r.push(n)}return r}function Hg(t,e,i){const r=[];for(let o=0;o<t.length;o++){const n=sp(t[o],e,i);r.push(n)}return r}function Zg(t,e,i,r){if(t[0]<i[0]||t[0]>i[2]){const o=.5*r;let n=t[0]-i[0]>o?-r:i[0]-t[0]>o?r:0;n===0&&(n=t[0]-i[2]>o?-r:i[2]-t[0]>o?r:0),t[0]+=n}El(e,t)}function Xg(t,e,i,r){const o=Math.pow(2,r.z)*Bn,n=[r.x*Bn,r.y*Bn],s=[];if(!t)return s;for(const a of t)for(const l of a){const c=[l.x+n[0],l.y+n[1]];Zg(c,e,i,o),s.push(c)}return s}function Yg(t,e,i,r){const o=Math.pow(2,r.z)*Bn,n=[r.x*Bn,r.y*Bn],s=[];if(!t)return s;for(const l of t){const c=[];for(const u of l){const p=[u.x+n[0],u.y+n[1]];El(e,p),c.push(p)}s.push(c)}if(e[2]-e[0]<=o/2){(a=e)[0]=a[1]=1/0,a[2]=a[3]=-1/0;for(const l of s)for(const c of l)Zg(c,e,i,o)}var a;return s}class Al{constructor(e,i){this.type=Ut,this.geojson=e,this.geometries=i}static parse(e,i){if(e.length!==2)return i.error(`'within' expression requires exactly one argument, but found ${e.length-1} instead.`);if(fa(e[1])){const r=e[1];if(r.type==="FeatureCollection")for(let o=0;o<r.features.length;++o){const n=r.features[o].geometry.type;if(n==="Polygon"||n==="MultiPolygon")return new Al(r,r.features[o].geometry)}else if(r.type==="Feature"){const o=r.geometry.type;if(o==="Polygon"||o==="MultiPolygon")return new Al(r,r.geometry)}else if(r.type==="Polygon"||r.type==="MultiPolygon")return new Al(r,r)}return i.error("'within' expression requires valid geojson object that contains polygon geometry type.")}evaluate(e){if(e.geometry()!=null&&e.canonicalID()!=null){if(e.geometryType()==="Point")return function(i,r){const o=[1/0,1/0,-1/0,-1/0],n=[1/0,1/0,-1/0,-1/0],s=i.canonicalID();if(!s)return!1;if(r.type==="Polygon"){const a=sp(r.coordinates,n,s),l=Xg(i.geometry(),o,n,s);if(!Sl(o,n))return!1;for(const c of l)if(!ma(c,a))return!1}if(r.type==="MultiPolygon"){const a=Hg(r.coordinates,n,s),l=Xg(i.geometry(),o,n,s);if(!Sl(o,n))return!1;for(const c of l)if(!nS(c,a))return!1}return!0}(e,this.geometries);if(e.geometryType()==="LineString")return function(i,r){const o=[1/0,1/0,-1/0,-1/0],n=[1/0,1/0,-1/0,-1/0],s=i.canonicalID();if(!s)return!1;if(r.type==="Polygon"){const a=sp(r.coordinates,n,s),l=Yg(i.geometry(),o,n,s);if(!Sl(o,n))return!1;for(const c of l)if(!Wg(c,a))return!1}if(r.type==="MultiPolygon"){const a=Hg(r.coordinates,n,s),l=Yg(i.geometry(),o,n,s);if(!Sl(o,n))return!1;for(const c of l)if(!aS(c,a))return!1}return!0}(e,this.geometries)}return!1}eachChild(){}outputDefined(){return!0}serialize(){return["within",this.geojson]}}var ap=Al,Kg={exports:{}};Kg.exports=function(){var t={kilometers:1,miles:.621371192237334,nauticalmiles:.5399568034557235,meters:1e3,metres:1e3,yards:1093.6132983377079,feet:3280.839895013123,inches:39370.078740157485},e=1/298.257223563,i=e*(2-e),r=Math.PI/180,o=function(c,u){if(c===void 0)throw new Error("No latitude given.");if(u&&!t[u])throw new Error("Unknown unit "+u+". Use one of: "+Object.keys(t).join(", "));var p=6378.137*r*(u?t[u]:1),f=Math.cos(c*r),_=1/(1-i*(1-f*f)),g=Math.sqrt(_);this.kx=p*g*f,this.ky=p*g*_*(1-i)},n={units:{configurable:!0}};function s(c,u){return c[0]===u[0]&&c[1]===u[1]}function a(c,u,p){var f=l(u[0]-c[0]);return[c[0]+f*p,c[1]+(u[1]-c[1])*p]}function l(c){for(;c<-180;)c+=360;for(;c>180;)c-=360;return c}return o.fromTile=function(c,u,p){var f=Math.PI*(1-2*(c+.5)/Math.pow(2,u)),_=Math.atan(.5*(Math.exp(f)-Math.exp(-f)))/r;return new o(_,p)},n.units.get=function(){return t},o.prototype.distance=function(c,u){var p=l(c[0]-u[0])*this.kx,f=(c[1]-u[1])*this.ky;return Math.sqrt(p*p+f*f)},o.prototype.bearing=function(c,u){var p=l(u[0]-c[0])*this.kx;return Math.atan2(p,(u[1]-c[1])*this.ky)/r},o.prototype.destination=function(c,u,p){var f=p*r;return this.offset(c,Math.sin(f)*u,Math.cos(f)*u)},o.prototype.offset=function(c,u,p){return[c[0]+u/this.kx,c[1]+p/this.ky]},o.prototype.lineDistance=function(c){for(var u=0,p=0;p<c.length-1;p++)u+=this.distance(c[p],c[p+1]);return u},o.prototype.area=function(c){for(var u=0,p=0;p<c.length;p++)for(var f=c[p],_=0,g=f.length,y=g-1;_<g;y=_++)u+=l(f[_][0]-f[y][0])*(f[_][1]+f[y][1])*(p?-1:1);return Math.abs(u)/2*this.kx*this.ky},o.prototype.along=function(c,u){var p=0;if(u<=0)return c[0];for(var f=0;f<c.length-1;f++){var _=c[f],g=c[f+1],y=this.distance(_,g);if((p+=y)>u)return a(_,g,(u-(p-y))/y)}return c[c.length-1]},o.prototype.pointToSegmentDistance=function(c,u,p){var f=u[0],_=u[1],g=l(p[0]-f)*this.kx,y=(p[1]-_)*this.ky,v=0;return g===0&&y===0||((v=(l(c[0]-f)*this.kx*g+(c[1]-_)*this.ky*y)/(g*g+y*y))>1?(f=p[0],_=p[1]):v>0&&(f+=g/this.kx*v,_+=y/this.ky*v)),g=l(c[0]-f)*this.kx,y=(c[1]-_)*this.ky,Math.sqrt(g*g+y*y)},o.prototype.pointOnLine=function(c,u){for(var p,f,_,g,y=1/0,v=0;v<c.length-1;v++){var b=c[v][0],w=c[v][1],S=l(c[v+1][0]-b)*this.kx,A=(c[v+1][1]-w)*this.ky,E=0;S===0&&A===0||((E=(l(u[0]-b)*this.kx*S+(u[1]-w)*this.ky*A)/(S*S+A*A))>1?(b=c[v+1][0],w=c[v+1][1]):E>0&&(b+=S/this.kx*E,w+=A/this.ky*E));var M=(S=l(u[0]-b)*this.kx)*S+(A=(u[1]-w)*this.ky)*A;M<y&&(y=M,p=b,f=w,_=v,g=E)}return{point:[p,f],index:_,t:Math.max(0,Math.min(1,g))}},o.prototype.lineSlice=function(c,u,p){var f=this.pointOnLine(p,c),_=this.pointOnLine(p,u);if(f.index>_.index||f.index===_.index&&f.t>_.t){var g=f;f=_,_=g}var y=[f.point],v=f.index+1,b=_.index;!s(p[v],y[0])&&v<=b&&y.push(p[v]);for(var w=v+1;w<=b;w++)y.push(p[w]);return s(p[b],_.point)||y.push(_.point),y},o.prototype.lineSliceAlong=function(c,u,p){for(var f=0,_=[],g=0;g<p.length-1;g++){var y=p[g],v=p[g+1],b=this.distance(y,v);if((f+=b)>c&&_.length===0&&_.push(a(y,v,(c-(f-b))/b)),f>=u)return _.push(a(y,v,(u-(f-b))/b)),_;f>c&&_.push(v)}return _},o.prototype.bufferPoint=function(c,u){var p=u/this.ky,f=u/this.kx;return[c[0]-f,c[1]-p,c[0]+f,c[1]+p]},o.prototype.bufferBBox=function(c,u){var p=u/this.ky,f=u/this.kx;return[c[0]-f,c[1]-p,c[2]+f,c[3]+p]},o.prototype.insideBBox=function(c,u){return l(c[0]-u[0])>=0&&l(c[0]-u[2])<=0&&c[1]>=u[1]&&c[1]<=u[3]},Object.defineProperties(o,n),o}();var lp=yt(Kg.exports),Jg={exports:{}};Jg.exports=function(){var t=function(i,r){if(i===void 0&&(i=[]),r===void 0&&(r=e),this.data=i,this.length=this.data.length,this.compare=r,this.length>0)for(var o=(this.length>>1)-1;o>=0;o--)this._down(o)};function e(i,r){return i<r?-1:i>r?1:0}return t.prototype.push=function(i){this.data.push(i),this.length++,this._up(this.length-1)},t.prototype.pop=function(){if(this.length!==0){var i=this.data[0],r=this.data.pop();return this.length--,this.length>0&&(this.data[0]=r,this._down(0)),i}},t.prototype.peek=function(){return this.data[0]},t.prototype._up=function(i){for(var r=this.data,o=this.compare,n=r[i];i>0;){var s=i-1>>1,a=r[s];if(o(n,a)>=0)break;r[i]=a,i=s}r[i]=n},t.prototype._down=function(i){for(var r=this.data,o=this.compare,n=this.length>>1,s=r[i];i<n;){var a=1+(i<<1),l=r[a],c=a+1;if(c<this.length&&o(r[c],l)<0&&(a=c,l=r[c]),o(l,s)>=0)break;r[i]=l,i=a}r[i]=s},t}();var cp=yt(Jg.exports),oe=8192;function Qg(t,e){return e.dist-t.dist}const up=100,hp=50;function ey(t){const e=[1/0,1/0,-1/0,-1/0];if(e.length!==t.length)return!1;for(let i=0;i<e.length;i++)if(e[i]!==t[i])return!1;return!0}function Kc(t){return t[1]-t[0]+1}function hn(t,e){const i=t[1]>=t[0]&&t[1]<e;return i||console.warn("Distance Expression: Index is out of range"),i}function dp(t,e){if(t[0]>t[1])return[null,null];const i=Kc(t);if(e){if(i===2)return[t,null];const r=Math.floor(i/2);return[[t[0],t[0]+r],[t[0]+r,t[1]]]}{if(i===1)return[t,null];const r=Math.floor(i/2)-1;return[[t[0],t[0]+r],[t[0]+r+1,t[1]]]}}function Ms(t,e){const i=[1/0,1/0,-1/0,-1/0];if(!hn(e,t.length))return i;for(let r=e[0];r<=e[1];++r)El(i,t[r]);return i}function Jc(t){const e=[1/0,1/0,-1/0,-1/0];for(let i=0;i<t.length;++i)for(let r=0;r<t[i].length;++r)El(e,t[i][r]);return e}function _a(t,e,i){if(ey(t)||ey(e))return NaN;let r=0,o=0;return t[2]<e[0]&&(r=e[0]-t[2]),t[0]>e[2]&&(r=t[0]-e[2]),t[1]>e[3]&&(o=t[1]-e[3]),t[3]<e[1]&&(o=e[1]-t[3]),i.distance([0,0],[r,o])}function pp(t,e){const i=Math.pow(2,e.z);return[(o=(t.x/oe+e.x)/i,360*o-180),(r=(t.y/oe+e.y)/i,360/Math.PI*Math.atan(Math.exp((180-360*r)*Math.PI/180))-90)];var r,o}function lS(t,e){const i=[];for(let r=0;r<t.length;++r)i.push(pp(t[r],e));return i}function ty(t,e,i){const r=i.pointOnLine(e,t).point;return i.distance(t,r)}function iy(t,e,i,r,o){const n=i.slice(r[0],r[1]+1);let s=1/0;for(let a=e[0];a<=e[1];++a)if((s=Math.min(s,ty(t[a],n,o)))===0)return 0;return s}function fp(t,e,i,r,o){const n=Math.min(o.pointToSegmentDistance(t,i,r),o.pointToSegmentDistance(e,i,r)),s=Math.min(o.pointToSegmentDistance(i,t,e),o.pointToSegmentDistance(r,t,e));return Math.min(n,s)}function cS(t,e,i,r,o){if(!hn(e,t.length)||!hn(r,i.length))return NaN;let n=1/0;for(let s=e[0];s<e[1];++s)for(let a=r[0];a<r[1];++a){if(Yc(t[s],t[s+1],i[a],i[a+1]))return 0;n=Math.min(n,fp(t[s],t[s+1],i[a],i[a+1],o))}return n}function uS(t,e,i,r,o){if(!hn(e,t.length)||!hn(r,i.length))return NaN;let n=1/0;for(let s=e[0];s<=e[1];++s)for(let a=r[0];a<=r[1];++a)if((n=Math.min(n,o.distance(t[s],i[a])))===0)return n;return n}function hS(t,e,i){if(ma(t,e,!0))return 0;let r=1/0;for(const o of e){const n=o.length;if(n<2)return console.warn("Distance Expression: Invalid polygon!"),NaN;if(o[0]!==o[n-1]&&(r=Math.min(r,i.pointToSegmentDistance(t,o[n-1],o[0])))===0||(r=Math.min(r,ty(t,o,i)))===0)return r}return r}function dS(t,e,i,r){if(!hn(e,t.length))return NaN;for(let n=e[0];n<=e[1];++n)if(ma(t[n],i,!0))return 0;let o=1/0;for(let n=e[0];n<e[1];++n)for(const s of i)for(let a=0,l=s.length,c=l-1;a<l;c=a++){if(Yc(t[n],t[n+1],s[c],s[a]))return 0;o=Math.min(o,fp(t[n],t[n+1],s[c],s[a],r))}return o}function ry(t,e){for(const i of t)for(let r=0;r<=i.length-1;++r)if(ma(i[r],e,!0))return!0;return!1}function pS(t,e,i,r=1/0){const o=Jc(t),n=Jc(e);if(r!==1/0&&_a(o,n,i)>=r)return r;if(Sl(o,n)){if(ry(t,e))return 0}else if(ry(e,t))return 0;let s=r;for(const a of t)for(let l=0,c=a.length,u=c-1;l<c;u=l++)for(const p of e)for(let f=0,_=p.length,g=_-1;f<_;g=f++){if(Yc(a[u],a[l],p[g],p[f]))return 0;s=Math.min(s,fp(a[u],a[l],p[g],p[f],i))}return s}function Qc(t,e,i,r,o,n,s){if(n===null||s===null)return;const a=_a(Ms(r,n),Ms(o,s),i);a<e&&t.push({dist:a,range1:n,range2:s})}function fS(t,e,i,r,o=1/0){let n=Math.min(r.distance(t[0],i[0][0]),o);if(n===0)return n;const s=new cp([{dist:0,range1:[0,t.length-1],range2:[0,0]}],Qg),a=e?hp:up,l=Jc(i);for(;s.length;){const c=s.pop();if(c.dist>=n)continue;const u=c.range1;if(Kc(u)<=a){if(!hn(u,t.length))return NaN;if(e){const p=dS(t,u,i,r);if((n=Math.min(n,p))===0)return n}else for(let p=u[0];p<=u[1];++p){const f=hS(t[p],i,r);if((n=Math.min(n,f))===0)return n}}else{const p=dp(u,e);if(p[0]!==null){const f=_a(Ms(t,p[0]),l,r);f<n&&s.push({dist:f,range1:p[0],range2:[0,0]})}if(p[1]!==null){const f=_a(Ms(t,p[1]),l,r);f<n&&s.push({dist:f,range1:p[1],range2:[0,0]})}}}return n}function oy(t,e,i,r,o,n=1/0){let s=Math.min(n,o.distance(t[0],i[0]));if(s===0)return s;const a=new cp([{dist:0,range1:[0,t.length-1],range2:[0,i.length-1]}],Qg),l=e?hp:up,c=r?hp:up;for(;a.length;){const u=a.pop();if(u.dist>=s)continue;const p=u.range1,f=u.range2;if(Kc(p)<=l&&Kc(f)<=c){if(!hn(p,t.length)||!hn(f,i.length))return NaN;if(e&&r?s=Math.min(s,cS(t,p,i,f,o)):e||r?e&&!r?s=Math.min(s,iy(i,f,t,p,o)):!e&&r&&(s=Math.min(s,iy(t,p,i,f,o))):s=Math.min(s,uS(t,p,i,f,o)),s===0)return s}else{const _=dp(p,e),g=dp(f,r);Qc(a,s,o,t,i,_[0],g[0]),Qc(a,s,o,t,i,_[0],g[1]),Qc(a,s,o,t,i,_[1],g[0]),Qc(a,s,o,t,i,_[1],g[1])}}return s}function mp(t,e,i,r,o=1/0){let n=o;const s=Ms(t,[0,t.length-1]);for(const a of i)if(!(n!==1/0&&_a(s,Ms(a,[0,a.length-1]),r)>=n)&&(n=Math.min(n,oy(t,e,a,!0,r,n)),n===0))return n;return n}function eu(t,e,i,r,o=1/0){let n=o;const s=Ms(t,[0,t.length-1]);for(const a of i){if(n!==1/0&&_a(s,Jc(a),r)>=n)continue;const l=fS(t,e,a,r,n);if(isNaN(l))return l;if((n=Math.min(n,l))===0)return n}return n}function _p(t){return t==="Point"||t==="MultiPoint"||t==="LineString"||t==="MultiLineString"||t==="Polygon"||t==="MultiPolygon"}class Ml{constructor(e,i){this.type=ze,this.geojson=e,this.geometries=i}static parse(e,i){if(e.length!==2)return i.error(`'distance' expression requires either one argument, but found ' ${e.length-1} instead.`);if(fa(e[1])){const r=e[1];if(r.type==="FeatureCollection"){for(let o=0;o<r.features.length;++o)if(_p(r.features[o].geometry.type))return new Ml(r,r.features[o].geometry)}else if(r.type==="Feature"){if(_p(r.geometry.type))return new Ml(r,r.geometry)}else if(_p(r.type))return new Ml(r,r)}return i.error("'distance' expression needs to be an array with format ['Distance', GeoJSONObj].")}evaluate(e){const i=e.geometry(),r=e.canonicalID();if(i!=null&&r!=null){if(e.geometryType()==="Point")return function(o,n,s){const a=[];for(const c of o)for(const u of c)a.push(pp(u,n));const l=new lp(a[0][1],"meters");return s.type==="Point"||s.type==="MultiPoint"||s.type==="LineString"?oy(a,!1,s.type==="Point"?[s.coordinates]:s.coordinates,s.type==="LineString",l):s.type==="MultiLineString"?mp(a,!1,s.coordinates,l):s.type==="Polygon"||s.type==="MultiPolygon"?eu(a,!1,s.type==="Polygon"?[s.coordinates]:s.coordinates,l):null}(i,r,this.geometries);if(e.geometryType()==="LineString")return function(o,n,s){const a=[];for(const c of o){const u=[];for(const p of c)u.push(pp(p,n));a.push(u)}const l=new lp(a[0][0][1],"meters");if(s.type==="Point"||s.type==="MultiPoint"||s.type==="LineString")return mp(s.type==="Point"?[s.coordinates]:s.coordinates,s.type==="LineString",a,l);if(s.type==="MultiLineString"){let c=1/0;for(let u=0;u<s.coordinates.length;u++){const p=mp(s.coordinates[u],!0,a,l,c);if(isNaN(p))return p;if((c=Math.min(c,p))===0)return c}return c}if(s.type==="Polygon"||s.type==="MultiPolygon"){let c=1/0;for(let u=0;u<a.length;u++){const p=eu(a[u],!0,s.type==="Polygon"?[s.coordinates]:s.coordinates,l,c);if(isNaN(p))return p;if((c=Math.min(c,p))===0)return c}return c}return null}(i,r,this.geometries);if(e.geometryType()==="Polygon")return function(o,n,s){const a=[];for(const c of function(u,p){const f=u.length;if(f<=1)return[u];const _=[];let g,y;for(let v=0;v<f;v++){const b=iS(u[v]);b!==0&&(u[v].area=Math.abs(b),y===void 0&&(y=b<0),y===b<0?(g&&_.push(g),g=[u[v]]):g.push(u[v]))}return g&&_.push(g),_}(o)){const u=[];for(let p=0;p<c.length;++p)u.push(lS(c[p],n));a.push(u)}const l=new lp(a[0][0][0][1],"meters");if(s.type==="Point"||s.type==="MultiPoint"||s.type==="LineString")return eu(s.type==="Point"?[s.coordinates]:s.coordinates,s.type==="LineString",a,l);if(s.type==="MultiLineString"){let c=1/0;for(let u=0;u<s.coordinates.length;u++){const p=eu(s.coordinates[u],!0,a,l,c);if(isNaN(p))return p;if((c=Math.min(c,p))===0)return c}return c}return s.type==="Polygon"||s.type==="MultiPolygon"?function(c,u,p){let f=1/0;for(const _ of c)for(const g of u){const y=pS(_,g,p,f);if(isNaN(y))return y;if((f=Math.min(f,y))===0)return f}return f}(s.type==="Polygon"?[s.coordinates]:s.coordinates,a,l):null}(i,r,this.geometries);console.warn("Distance Expression: currently only evaluates valid Point/LineString/Polygon geometries.")}else console.warn("Distance Expression: requirs valid feature and canonical information.");return null}eachChild(){}outputDefined(){return!0}serialize(){return["distance",this.geojson]}}var gp=Ml;function ga(t){if(t instanceof Bo&&(t.name==="get"&&t.args.length===1||t.name==="feature-state"||t.name==="has"&&t.args.length===1||t.name==="properties"||t.name==="geometry-type"||t.name==="id"||/^filter-/.test(t.name))||t instanceof ap||t instanceof gp)return!1;let e=!0;return t.eachChild(i=>{e&&!ga(i)&&(e=!1)}),e}function Il(t){if(t instanceof Bo&&t.name==="feature-state")return!1;let e=!0;return t.eachChild(i=>{e&&!Il(i)&&(e=!1)}),e}function yp(t){if(t instanceof Bo&&t.name==="config")return!1;let e=!0;return t.eachChild(i=>{e&&!yp(i)&&(e=!1)}),e}function ya(t,e){if(t instanceof Bo&&e.indexOf(t.name)>=0)return!1;let i=!0;return t.eachChild(r=>{i&&!ya(r,e)&&(i=!1)}),i}class vp{constructor(e,i){this.type=i.type,this.name=e,this.boundExpression=i}static parse(e,i){if(e.length!==2||typeof e[1]!="string")return i.error("'var' expression requires exactly one string literal argument.");const r=e[1];return i.scope.has(r)?new vp(r,i.scope.get(r)):i.error(`Unknown variable "${r}". Make sure "${r}" has been bound in an enclosing "let" expression before using it.`,1)}evaluate(e){return this.boundExpression.evaluate(e)}eachChild(){}outputDefined(){return!1}serialize(){return["var",this.name]}}var ny=vp;class xp{constructor(e,i=[],r,o=new YE,n=[],s){this.registry=e,this.path=i,this.key=i.map(a=>`[${a}]`).join(""),this.scope=o,this.errors=n,this.expectedType=r,this.options=s}parse(e,i,r,o,n={}){return i||r?this.concat(i,r,o)._parse(e,n):this._parse(e,n)}_parse(e,i){function r(o,n,s){return s==="assert"?new un(n,[o]):s==="coerce"?new Ss(n,[o]):o}if(e!==null&&typeof e!="string"&&typeof e!="boolean"&&typeof e!="number"||(e=["literal",e]),Array.isArray(e)){if(e.length===0)return this.error('Expected an array with at least one element. If you wanted a literal array, use ["literal", []].');const o=typeof e[0]=="string"?this.registry[e[0]]:void 0;if(o){let n=o.parse(e,this);if(!n)return null;if(this.expectedType){const s=this.expectedType,a=n.type;if(s.kind!=="string"&&s.kind!=="number"&&s.kind!=="boolean"&&s.kind!=="object"&&s.kind!=="array"||a.kind!=="value")if(s.kind!=="color"&&s.kind!=="formatted"&&s.kind!=="resolvedImage"||a.kind!=="value"&&a.kind!=="string"){if(this.checkSubtype(s,a))return null}else n=r(n,s,i.typeAnnotation||"coerce");else n=r(n,s,i.typeAnnotation||"assert")}if(!(n instanceof bl)&&n.type.kind!=="resolvedImage"&&bp(n)){const s=new qg(this.options);try{n=new bl(n.type,n.evaluate(s))}catch(a){return this.error(a.message),null}}return n}return Ss.parse(["to-array",e],this)}return this.error(e===void 0?"'undefined' value invalid. Use null instead.":typeof e=="object"?'Bare objects invalid. Use ["literal", {...}] instead.':`Expected an array, but found ${typeof e} instead.`)}concat(e,i,r){const o=typeof e=="number"?this.path.concat(e):this.path,n=r?this.scope.concat(r):this.scope;return new xp(this.registry,o,i||null,n,this.errors,this.options)}error(e,...i){const r=`${this.key}${i.map(o=>`[${o}]`).join("")}`;this.errors.push(new Oo(r,e))}checkSubtype(e,i){const r=yl(e,i);return r&&this.error(r),r}}var sy=xp;function bp(t){if(t instanceof ny)return bp(t.boundExpression);if(t instanceof Bo&&t.name==="error"||t instanceof Bo&&t.name==="config"||t instanceof Xc||t instanceof ap||t instanceof gp)return!1;const e=t instanceof Ss||t instanceof un;let i=!0;return t.eachChild(r=>{i=e?i&&bp(r):i&&r instanceof bl}),!!i&&ga(t)&&ya(t,["zoom","heatmap-density","line-progress","raster-value","sky-radial-progress","accumulated","is-supported-script","pitch","distance-from-center","measure-light"])}function tu(t,e){const i=t.length-1;let r,o,n=0,s=i,a=0;for(;n<=s;)if(a=Math.floor((n+s)/2),r=t[a],o=t[a+1],r<=e){if(a===i||e<o)return a;n=a+1}else{if(!(r>e))throw new or("Input is not a number.");s=a-1}return 0}class wp{constructor(e,i,r){this.type=e,this.input=i,this.labels=[],this.outputs=[];for(const[o,n]of r)this.labels.push(o),this.outputs.push(n)}static parse(e,i){if(e.length-1<4)return i.error(`Expected at least 4 arguments, but found only ${e.length-1}.`);if((e.length-1)%2!=0)return i.error("Expected an even number of arguments.");const r=i.parse(e[1],1,ze);if(!r)return null;const o=[];let n=null;i.expectedType&&i.expectedType.kind!=="value"&&(n=i.expectedType);for(let s=1;s<e.length;s+=2){const a=s===1?-1/0:e[s],l=e[s+1],c=s,u=s+1;if(typeof a!="number")return i.error('Input/output pairs for "step" expressions must be defined using literal numeric values (not computed expressions) for the input values.',c);if(o.length&&o[o.length-1][0]>=a)return i.error('Input/output pairs for "step" expressions must be arranged with input values in strictly ascending order.',c);const p=i.parse(l,u,n);if(!p)return null;n=n||p.type,o.push([a,p])}return new wp(n,r,o)}evaluate(e){const i=this.labels,r=this.outputs;if(i.length===1)return r[0].evaluate(e);const o=this.input.evaluate(e);if(o<=i[0])return r[0].evaluate(e);const n=i.length;return o>=i[n-1]?r[n-1].evaluate(e):r[tu(i,o)].evaluate(e)}eachChild(e){e(this.input);for(const i of this.outputs)e(i)}outputDefined(){return this.outputs.every(e=>e.outputDefined())}serialize(){const e=["step",this.input.serialize()];for(let i=0;i<this.labels.length;i++)i>0&&e.push(this.labels[i]),e.push(this.outputs[i].serialize());return e}}var Tp=wp;function rt(t,e,i){return t*(1-i)+e*i}function ay(t,e,i){return t.map((r,o)=>rt(r,e[o],i))}var iu=Object.freeze({__proto__:null,array:ay,color:function(t,e,i){return new bt(rt(t.r,e.r,i),rt(t.g,e.g,i),rt(t.b,e.b,i),rt(t.a,e.a,i))},number:rt});const ly=.95047,cy=1.08883,uy=4/29,va=6/29,hy=3*va*va,mS=va*va*va,_S=Math.PI/180,gS=180/Math.PI;function Ep(t){return t>mS?Math.pow(t,1/3):t/hy+uy}function Sp(t){return t>va?t*t*t:hy*(t-uy)}function Ap(t){return 255*(t<=.0031308?12.92*t:1.055*Math.pow(t,1/2.4)-.055)}function Mp(t){return(t/=255)<=.04045?t/12.92:Math.pow((t+.055)/1.055,2.4)}function dy(t){const e=Mp(t.r),i=Mp(t.g),r=Mp(t.b),o=Ep((.4124564*e+.3575761*i+.1804375*r)/ly),n=Ep((.2126729*e+.7151522*i+.072175*r)/1);return{l:116*n-16,a:500*(o-n),b:200*(n-Ep((.0193339*e+.119192*i+.9503041*r)/cy)),alpha:t.a}}function py(t){let e=(t.l+16)/116,i=isNaN(t.a)?e:e+t.a/500,r=isNaN(t.b)?e:e-t.b/200;return e=1*Sp(e),i=ly*Sp(i),r=cy*Sp(r),new bt(Ap(3.2404542*i-1.5371385*e-.4985314*r),Ap(-.969266*i+1.8760108*e+.041556*r),Ap(.0556434*i-.2040259*e+1.0572252*r),t.alpha)}function yS(t,e,i){const r=e-t;return t+i*(r>180||r<-180?r-360*Math.round(r/360):r)}const Cl={forward:dy,reverse:py,interpolate:function(t,e,i){return{l:rt(t.l,e.l,i),a:rt(t.a,e.a,i),b:rt(t.b,e.b,i),alpha:rt(t.alpha,e.alpha,i)}}},kl={forward:function(t){const{l:e,a:i,b:r}=dy(t),o=Math.atan2(r,i)*gS;return{h:o<0?o+360:o,c:Math.sqrt(i*i+r*r),l:e,alpha:t.a}},reverse:function(t){const e=t.h*_S,i=t.c;return py({l:t.l,a:Math.cos(e)*i,b:Math.sin(e)*i,alpha:t.alpha})},interpolate:function(t,e,i){return{h:yS(t.h,e.h,i),c:rt(t.c,e.c,i),l:rt(t.l,e.l,i),alpha:rt(t.alpha,e.alpha,i)}}};var fy=Object.freeze({__proto__:null,hcl:kl,lab:Cl});class ru{constructor(e,i,r,o,n){this.type=e,this.operator=i,this.interpolation=r,this.input=o,this.labels=[],this.outputs=[];for(const[s,a]of n)this.labels.push(s),this.outputs.push(a)}static interpolationFactor(e,i,r,o){let n=0;if(e.name==="exponential")n=Ip(i,e.base,r,o);else if(e.name==="linear")n=Ip(i,1,r,o);else if(e.name==="cubic-bezier"){const s=e.controlPoints;n=new qe(s[0],s[1],s[2],s[3]).solve(Ip(i,1,r,o))}return n}static parse(e,i){let[r,o,n,...s]=e;if(!Array.isArray(o)||o.length===0)return i.error("Expected an interpolation type expression.",1);if(o[0]==="linear")o={name:"linear"};else if(o[0]==="exponential"){const c=o[1];if(typeof c!="number")return i.error("Exponential interpolation requires a numeric base.",1,1);o={name:"exponential",base:c}}else{if(o[0]!=="cubic-bezier")return i.error(`Unknown interpolation type ${String(o[0])}`,1,0);{const c=o.slice(1);if(c.length!==4||c.some(u=>typeof u!="number"||u<0||u>1))return i.error("Cubic bezier interpolation requires four numeric arguments with values between 0 and 1.",1);o={name:"cubic-bezier",controlPoints:c}}}if(e.length-1<4)return i.error(`Expected at least 4 arguments, but found only ${e.length-1}.`);if((e.length-1)%2!=0)return i.error("Expected an even number of arguments.");if(n=i.parse(n,2,ze),!n)return null;const a=[];let l=null;r==="interpolate-hcl"||r==="interpolate-lab"?l=ao:i.expectedType&&i.expectedType.kind!=="value"&&(l=i.expectedType);for(let c=0;c<s.length;c+=2){const u=s[c],p=s[c+1],f=c+3,_=c+4;if(typeof u!="number")return i.error('Input/output pairs for "interpolate" expressions must be defined using literal numeric values (not computed expressions) for the input values.',f);if(a.length&&a[a.length-1][0]>=u)return i.error('Input/output pairs for "interpolate" expressions must be arranged with input values in strictly ascending order.',f);const g=i.parse(p,_,l);if(!g)return null;l=l||g.type,a.push([u,g])}return l.kind==="number"||l.kind==="color"||l.kind==="array"&&l.itemType.kind==="number"&&typeof l.N=="number"?new ru(l,r,o,n,a):i.error(`Type ${Ni(l)} is not interpolatable.`)}evaluate(e){const i=this.labels,r=this.outputs;if(i.length===1)return r[0].evaluate(e);const o=this.input.evaluate(e);if(o<=i[0])return r[0].evaluate(e);const n=i.length;if(o>=i[n-1])return r[n-1].evaluate(e);const s=tu(i,o),a=ru.interpolationFactor(this.interpolation,o,i[s],i[s+1]),l=r[s].evaluate(e),c=r[s+1].evaluate(e);return this.operator==="interpolate"?iu[this.type.kind.toLowerCase()](l,c,a):this.operator==="interpolate-hcl"?kl.reverse(kl.interpolate(kl.forward(l),kl.forward(c),a)):Cl.reverse(Cl.interpolate(Cl.forward(l),Cl.forward(c),a))}eachChild(e){e(this.input);for(const i of this.outputs)e(i)}outputDefined(){return this.outputs.every(e=>e.outputDefined())}serialize(){let e;e=this.interpolation.name==="linear"?["linear"]:this.interpolation.name==="exponential"?this.interpolation.base===1?["linear"]:["exponential",this.interpolation.base]:["cubic-bezier"].concat(this.interpolation.controlPoints);const i=[this.operator,e,this.input.serialize()];for(let r=0;r<this.labels.length;r++)i.push(this.labels[r],this.outputs[r].serialize());return i}}function Ip(t,e,i,r){const o=r-i,n=t-i;return o===0?0:e===1?n/o:(Math.pow(e,n)-1)/(Math.pow(e,o)-1)}var Fo=ru;class Cp{constructor(e,i){this.type=e,this.args=i}static parse(e,i){if(e.length<2)return i.error("Expectected at least one argument.");let r=null;const o=i.expectedType;o&&o.kind!=="value"&&(r=o);const n=[];for(const a of e.slice(1)){const l=i.parse(a,1+n.length,r,void 0,{typeAnnotation:"omit"});if(!l)return null;r=r||l.type,n.push(l)}const s=o&&n.some(a=>yl(o,a.type));return new Cp(s?jt:r,n)}evaluate(e){let i,r=null,o=0;for(const n of this.args){if(o++,r=n.evaluate(e),r&&r instanceof lo&&!r.available&&(i||(i=r),r=null,o===this.args.length))return i;if(r!==null)break}return r}eachChild(e){this.args.forEach(e)}outputDefined(){return this.args.every(e=>e.outputDefined())}serialize(){const e=["coalesce"];return this.eachChild(i=>{e.push(i.serialize())}),e}}var my=Cp;class kp{constructor(e,i){this.type=i.type,this.bindings=[].concat(e),this.result=i}evaluate(e){return this.result.evaluate(e)}eachChild(e){for(const i of this.bindings)e(i[1]);e(this.result)}static parse(e,i){if(e.length<4)return i.error(`Expected at least 3 arguments, but found ${e.length-1} instead.`);const r=[];for(let n=1;n<e.length-1;n+=2){const s=e[n];if(typeof s!="string")return i.error(`Expected string, but found ${typeof s} instead.`,n);if(/[^a-zA-Z0-9_]/.test(s))return i.error("Variable names must contain only alphanumeric characters or '_'.",n);const a=i.parse(e[n+1],n+1);if(!a)return null;r.push([s,a])}const o=i.parse(e[e.length-1],e.length-1,i.expectedType,r);return o?new kp(r,o):null}outputDefined(){return this.result.outputDefined()}serialize(){const e=["let"];for(const[i,r]of this.bindings)e.push(i,r.serialize());return e.push(this.result.serialize()),e}}var _y=kp;class Pp{constructor(e,i,r){this.type=e,this.index=i,this.input=r}static parse(e,i){if(e.length!==3)return i.error(`Expected 2 arguments, but found ${e.length-1} instead.`);const r=i.parse(e[1],1,ze),o=i.parse(e[2],2,zr(i.expectedType||jt));return r&&o?new Pp(o.type.itemType,r,o):null}evaluate(e){const i=this.index.evaluate(e),r=this.input.evaluate(e);if(i<0)throw new or(`Array index out of bounds: ${i} < 0.`);if(i>=r.length)throw new or(`Array index out of bounds: ${i} > ${r.length-1}.`);if(i!==Math.floor(i))throw new or(`Array index must be an integer, but found ${i} instead.`);return r[i]}eachChild(e){e(this.index),e(this.input)}outputDefined(){return!1}serialize(){return["at",this.index.serialize(),this.input.serialize()]}}var vS=Pp;class Dp{constructor(e,i){this.type=Ut,this.needle=e,this.haystack=i}static parse(e,i){if(e.length!==3)return i.error(`Expected 2 arguments, but found ${e.length-1} instead.`);const r=i.parse(e[1],1,jt),o=i.parse(e[2],2,jt);return r&&o?Yd(r.type,[Ut,Ft,ze,da,jt])?new Dp(r,o):i.error(`Expected first argument to be of type boolean, string, number or null, but found ${Ni(r.type)} instead`):null}evaluate(e){const i=this.needle.evaluate(e),r=this.haystack.evaluate(e);if(r==null)return!1;if(!vl(i,["boolean","string","number","null"]))throw new or(`Expected first argument to be of type boolean, string, number or null, but found ${Ni(Ji(i))} instead.`);if(!vl(r,["string","array"]))throw new or(`Expected second argument to be of type array or string, but found ${Ni(Ji(r))} instead.`);return r.indexOf(i)>=0}eachChild(e){e(this.needle),e(this.haystack)}outputDefined(){return!0}serialize(){return["in",this.needle.serialize(),this.haystack.serialize()]}}var xS=Dp;class ou{constructor(e,i,r){this.type=ze,this.needle=e,this.haystack=i,this.fromIndex=r}static parse(e,i){if(e.length<=2||e.length>=5)return i.error(`Expected 3 or 4 arguments, but found ${e.length-1} instead.`);const r=i.parse(e[1],1,jt),o=i.parse(e[2],2,jt);if(!r||!o)return null;if(!Yd(r.type,[Ut,Ft,ze,da,jt]))return i.error(`Expected first argument to be of type boolean, string, number or null, but found ${Ni(r.type)} instead`);if(e.length===4){const n=i.parse(e[3],3,ze);return n?new ou(r,o,n):null}return new ou(r,o)}evaluate(e){const i=this.needle.evaluate(e),r=this.haystack.evaluate(e);if(!vl(i,["boolean","string","number","null"]))throw new or(`Expected first argument to be of type boolean, string, number or null, but found ${Ni(Ji(i))} instead.`);if(!vl(r,["string","array"]))throw new or(`Expected second argument to be of type array or string, but found ${Ni(Ji(r))} instead.`);if(this.fromIndex){const o=this.fromIndex.evaluate(e);return r.indexOf(i,o)}return r.indexOf(i)}eachChild(e){e(this.needle),e(this.haystack),this.fromIndex&&e(this.fromIndex)}outputDefined(){return!1}serialize(){if(this.fromIndex!=null&&this.fromIndex!==void 0){const e=this.fromIndex.serialize();return["index-of",this.needle.serialize(),this.haystack.serialize(),e]}return["index-of",this.needle.serialize(),this.haystack.serialize()]}}var bS=ou;class zp{constructor(e,i,r,o,n,s){this.inputType=e,this.type=i,this.input=r,this.cases=o,this.outputs=n,this.otherwise=s}static parse(e,i){if(e.length<5)return i.error(`Expected at least 4 arguments, but found only ${e.length-1}.`);if(e.length%2!=1)return i.error("Expected an even number of arguments.");let r,o;i.expectedType&&i.expectedType.kind!=="value"&&(o=i.expectedType);const n={},s=[];for(let c=2;c<e.length-1;c+=2){let u=e[c];const p=e[c+1];Array.isArray(u)||(u=[u]);const f=i.concat(c);if(u.length===0)return f.error("Expected at least one branch label.");for(const g of u){if(typeof g!="number"&&typeof g!="string")return f.error("Branch labels must be numbers or strings.");if(typeof g=="number"&&Math.abs(g)>Number.MAX_SAFE_INTEGER)return f.error(`Branch labels must be integers no larger than ${Number.MAX_SAFE_INTEGER}.`);if(typeof g=="number"&&Math.floor(g)!==g)return f.error("Numeric branch labels must be integer values.");if(r){if(f.checkSubtype(r,Ji(g)))return null}else r=Ji(g);if(n[String(g)]!==void 0)return f.error("Branch labels must be unique.");n[String(g)]=s.length}const _=i.parse(p,c,o);if(!_)return null;o=o||_.type,s.push(_)}const a=i.parse(e[1],1,jt);if(!a)return null;const l=i.parse(e[e.length-1],e.length-1,o);return l?a.type.kind!=="value"&&i.concat(1).checkSubtype(r,a.type)?null:new zp(r,o,a,n,s,l):null}evaluate(e){const i=this.input.evaluate(e);return(Ji(i)===this.inputType&&this.outputs[this.cases[i]]||this.otherwise).evaluate(e)}eachChild(e){e(this.input),this.outputs.forEach(e),e(this.otherwise)}outputDefined(){return this.outputs.every(e=>e.outputDefined())&&this.otherwise.outputDefined()}serialize(){const e=["match",this.input.serialize()],i=Object.keys(this.cases).sort(),r=[],o={};for(const s of i){const a=o[this.cases[s]];a===void 0?(o[this.cases[s]]=r.length,r.push([this.cases[s],[s]])):r[a][1].push(s)}const n=s=>this.inputType.kind==="number"?Number(s):s;for(const[s,a]of r)e.push(a.length===1?n(a[0]):a.map(n)),e.push(this.outputs[s].serialize());return e.push(this.otherwise.serialize()),e}}var wS=zp;class Rp{constructor(e,i,r){this.type=e,this.branches=i,this.otherwise=r}static parse(e,i){if(e.length<4)return i.error(`Expected at least 3 arguments, but found only ${e.length-1}.`);if(e.length%2!=0)return i.error("Expected an odd number of arguments.");let r;i.expectedType&&i.expectedType.kind!=="value"&&(r=i.expectedType);const o=[];for(let s=1;s<e.length-1;s+=2){const a=i.parse(e[s],s,Ut);if(!a)return null;const l=i.parse(e[s+1],s+1,r);if(!l)return null;o.push([a,l]),r=r||l.type}const n=i.parse(e[e.length-1],e.length-1,r);return n?new Rp(r,o,n):null}evaluate(e){for(const[i,r]of this.branches)if(i.evaluate(e))return r.evaluate(e);return this.otherwise.evaluate(e)}eachChild(e){for(const[i,r]of this.branches)e(i),e(r);e(this.otherwise)}outputDefined(){return this.branches.every(([e,i])=>i.outputDefined())&&this.otherwise.outputDefined()}serialize(){const e=["case"];return this.eachChild(i=>{e.push(i.serialize())}),e}}var TS=Rp;class nu{constructor(e,i,r,o){this.type=e,this.input=i,this.beginIndex=r,this.endIndex=o}static parse(e,i){if(e.length<=2||e.length>=5)return i.error(`Expected 3 or 4 arguments, but found ${e.length-1} instead.`);const r=i.parse(e[1],1,jt),o=i.parse(e[2],2,ze);if(!r||!o)return null;if(!Yd(r.type,[zr(jt),Ft,jt]))return i.error(`Expected first argument to be of type array or string, but found ${Ni(r.type)} instead`);if(e.length===4){const n=i.parse(e[3],3,ze);return n?new nu(r.type,r,o,n):null}return new nu(r.type,r,o)}evaluate(e){const i=this.input.evaluate(e),r=this.beginIndex.evaluate(e);if(!vl(i,["string","array"]))throw new or(`Expected first argument to be of type array or string, but found ${Ni(Ji(i))} instead.`);if(this.endIndex){const o=this.endIndex.evaluate(e);return i.slice(r,o)}return i.slice(r)}eachChild(e){e(this.input),e(this.beginIndex),this.endIndex&&e(this.endIndex)}outputDefined(){return!1}serialize(){if(this.endIndex!=null&&this.endIndex!==void 0){const e=this.endIndex.serialize();return["slice",this.input.serialize(),this.beginIndex.serialize(),e]}return["slice",this.input.serialize(),this.beginIndex.serialize()]}}var ES=nu;function gy(t,e){return t==="=="||t==="!="?e.kind==="boolean"||e.kind==="string"||e.kind==="number"||e.kind==="null"||e.kind==="value":e.kind==="string"||e.kind==="number"||e.kind==="value"}function yy(t,e,i,r){return r.compare(e,i)===0}function xa(t,e,i){const r=t!=="=="&&t!=="!=";return class TT{constructor(n,s,a){this.type=Ut,this.lhs=n,this.rhs=s,this.collator=a,this.hasUntypedArgument=n.type.kind==="value"||s.type.kind==="value"}static parse(n,s){if(n.length!==3&&n.length!==4)return s.error("Expected two or three arguments.");const a=n[0];let l=s.parse(n[1],1,jt);if(!l)return null;if(!gy(a,l.type))return s.concat(1).error(`"${a}" comparisons are not supported for type '${Ni(l.type)}'.`);let c=s.parse(n[2],2,jt);if(!c)return null;if(!gy(a,c.type))return s.concat(2).error(`"${a}" comparisons are not supported for type '${Ni(c.type)}'.`);if(l.type.kind!==c.type.kind&&l.type.kind!=="value"&&c.type.kind!=="value")return s.error(`Cannot compare types '${Ni(l.type)}' and '${Ni(c.type)}'.`);r&&(l.type.kind==="value"&&c.type.kind!=="value"?l=new un(c.type,[l]):l.type.kind!=="value"&&c.type.kind==="value"&&(c=new un(l.type,[c])));let u=null;if(n.length===4){if(l.type.kind!=="string"&&c.type.kind!=="string"&&l.type.kind!=="value"&&c.type.kind!=="value")return s.error("Cannot use collator to compare non-string types.");if(u=s.parse(n[3],3,Wc),!u)return null}return new TT(l,c,u)}evaluate(n){const s=this.lhs.evaluate(n),a=this.rhs.evaluate(n);if(r&&this.hasUntypedArgument){const l=Ji(s),c=Ji(a);if(l.kind!==c.kind||l.kind!=="string"&&l.kind!=="number")throw new or(`Expected arguments for "${t}" to be (string, string) or (number, number), but found (${l.kind}, ${c.kind}) instead.`)}if(this.collator&&!r&&this.hasUntypedArgument){const l=Ji(s),c=Ji(a);if(l.kind!=="string"||c.kind!=="string")return e(n,s,a)}return this.collator?i(n,s,a,this.collator.evaluate(n)):e(n,s,a)}eachChild(n){n(this.lhs),n(this.rhs),this.collator&&n(this.collator)}outputDefined(){return!0}serialize(){const n=[t];return this.eachChild(s=>{n.push(s.serialize())}),n}}}const SS=xa("==",function(t,e,i){return e===i},yy),AS=xa("!=",function(t,e,i){return e!==i},function(t,e,i,r){return!yy(0,e,i,r)}),MS=xa("<",function(t,e,i){return e<i},function(t,e,i,r){return r.compare(e,i)<0}),IS=xa(">",function(t,e,i){return e>i},function(t,e,i,r){return r.compare(e,i)>0}),CS=xa("<=",function(t,e,i){return e<=i},function(t,e,i,r){return r.compare(e,i)<=0}),kS=xa(">=",function(t,e,i){return e>=i},function(t,e,i,r){return r.compare(e,i)>=0});class Lp{constructor(e,i,r,o,n,s){this.type=Ft,this.number=e,this.locale=i,this.currency=r,this.unit=o,this.minFractionDigits=n,this.maxFractionDigits=s}static parse(e,i){if(e.length!==3)return i.error("Expected two arguments.");const r=i.parse(e[1],1,ze);if(!r)return null;const o=e[2];if(typeof o!="object"||Array.isArray(o))return i.error("NumberFormat options argument must be an object.");let n=null;if(o.locale&&(n=i.parse(o.locale,1,Ft),!n))return null;let s=null;if(o.currency&&(s=i.parse(o.currency,1,Ft),!s))return null;let a=null;if(o.unit&&(a=i.parse(o.unit,1,Ft),!a))return null;let l=null;if(o["min-fraction-digits"]&&(l=i.parse(o["min-fraction-digits"],1,ze),!l))return null;let c=null;return o["max-fraction-digits"]&&(c=i.parse(o["max-fraction-digits"],1,ze),!c)?null:new Lp(r,n,s,a,l,c)}evaluate(e){return new Intl.NumberFormat(this.locale?this.locale.evaluate(e):[],{style:(this.currency?"currency":this.unit&&"unit")||"decimal",currency:this.currency?this.currency.evaluate(e):void 0,unit:this.unit?this.unit.evaluate(e):void 0,minimumFractionDigits:this.minFractionDigits?this.minFractionDigits.evaluate(e):void 0,maximumFractionDigits:this.maxFractionDigits?this.maxFractionDigits.evaluate(e):void 0}).format(this.number.evaluate(e))}eachChild(e){e(this.number),this.locale&&e(this.locale),this.currency&&e(this.currency),this.unit&&e(this.unit),this.minFractionDigits&&e(this.minFractionDigits),this.maxFractionDigits&&e(this.maxFractionDigits)}outputDefined(){return!1}serialize(){const e={};return this.locale&&(e.locale=this.locale.serialize()),this.currency&&(e.currency=this.currency.serialize()),this.unit&&(e.unit=this.unit.serialize()),this.minFractionDigits&&(e["min-fraction-digits"]=this.minFractionDigits.serialize()),this.maxFractionDigits&&(e["max-fraction-digits"]=this.maxFractionDigits.serialize()),["number-format",this.number.serialize(),e]}}class Op{constructor(e){this.type=ze,this.input=e}static parse(e,i){if(e.length!==2)return i.error(`Expected 1 argument, but found ${e.length-1} instead.`);const r=i.parse(e[1],1);return r?r.type.kind!=="array"&&r.type.kind!=="string"&&r.type.kind!=="value"?i.error(`Expected argument of type string or array, but found ${Ni(r.type)} instead.`):new Op(r):null}evaluate(e){const i=this.input.evaluate(e);if(typeof i=="string"||Array.isArray(i))return i.length;throw new or(`Expected value to be of type string or array, but found ${Ni(Ji(i))} instead.`)}eachChild(e){e(this.input)}outputDefined(){return!1}serialize(){const e=["length"];return this.eachChild(i=>{e.push(i.serialize())}),e}}function Bp(t){return function(){t=1831565813+(t|=0)|0;let e=Math.imul(t^t>>>15,1|t);return e=e+Math.imul(e^e>>>7,61|e)^e,((e^e>>>14)>>>0)/4294967296}}const vy={"==":SS,"!=":AS,">":IS,"<":MS,">=":kS,"<=":CS,array:un,at:vS,boolean:un,case:TS,coalesce:my,collator:Xc,format:wl,image:Tl,in:xS,"index-of":bS,interpolate:Fo,"interpolate-hcl":Fo,"interpolate-lab":Fo,length:Op,let:_y,literal:bl,match:wS,number:un,"number-format":Lp,object:un,slice:ES,step:Tp,string:un,"to-boolean":Ss,"to-color":Ss,"to-number":Ss,"to-string":Ss,var:ny,within:ap,distance:gp};function xy(t,[e,i,r,o]){e=e.evaluate(t),i=i.evaluate(t),r=r.evaluate(t);const n=o?o.evaluate(t):1,s=Ug(e,i,r,n);if(s)throw new or(s);return new bt(e/255*n,i/255*n,r/255*n,n)}function by(t,[e,i,r,o]){e=e.evaluate(t),i=i.evaluate(t),r=r.evaluate(t);const n=o?o.evaluate(t):1,s=function(c,u,p,f){return typeof c=="number"&&c>=0&&c<=360?typeof u=="number"&&u>=0&&u<=100&&typeof p=="number"&&p>=0&&p<=100?f===void 0||typeof f=="number"&&f>=0&&f<=1?null:`Invalid hsla value [${[c,u,p,f].join(", ")}]: 'a' must be between 0 and 1.`:`Invalid hsla value [${(typeof f=="number"?[c,u,p,f]:[c,u,p]).join(", ")}]: 's', and 'l' must be between 0 and 100.`:`Invalid hsla value [${(typeof f=="number"?[c,u,p,f]:[c,u,p]).join(", ")}]: 'h' must be between 0 and 360.`}(e,i,r,n);if(s)throw new or(s);const a=`hsla(${e}, ${i}%, ${r}%, ${n})`,l=bt.parse(a);if(!l)throw new or(`Failed to parse HSLA color: ${a}`);return l}function wy(t,e){return t in e}function Fp(t,e){const i=e[t];return i===void 0?null:i}function Ty(t,e){switch(t){case"string":return String(e);case"number":return+e;case"boolean":return!!e;case"color":return bt.parse(e)}return e}function Ey(t,e,i,r){return r!==void 0&&(t=r*Math.round(t/r)),e!==void 0&&t<e&&(t=e),i!==void 0&&t>i&&(t=i),t}function Sy(t,e,i){i.length&&(e+=`${i}`);const r=t.getConfig(e);if(!r)return null;const{type:o,value:n,values:s,minValue:a,maxValue:l,stepValue:c}=r,u=r.default.evaluate(t);let p=n?n.evaluate(t):u;return o&&(p=Ty(o,p)),n!==void 0&&p!==void 0&&s&&!s.includes(p)&&(p=u,o&&(p=Ty(o,p))),p===void 0||a===void 0&&l===void 0&&c===void 0||(typeof p=="number"?p=Ey(p,a,l,c):Array.isArray(p)&&(p=p.map(f=>typeof f=="number"?Ey(f,a,l,c):f))),p}function Is(t){return{type:t}}Bo.register(vy,{error:[{kind:"error"},[Ft],(t,[e])=>{throw new or(e.evaluate(t))}],typeof:[Ft,[jt],(t,[e])=>Ni(Ji(e.evaluate(t)))],"to-rgba":[zr(ze,4),[ao],(t,[e])=>e.evaluate(t).toArray()],rgb:[ao,[ze,ze,ze],xy],rgba:[ao,[ze,ze,ze,ze],xy],hsl:[ao,[ze,ze,ze],by],hsla:[ao,[ze,ze,ze,ze],by],has:{type:Ut,overloads:[[[Ft],(t,[e])=>wy(e.evaluate(t),t.properties())],[[Ft,pa],(t,[e,i])=>wy(e.evaluate(t),i.evaluate(t))]]},get:{type:jt,overloads:[[[Ft],(t,[e])=>Fp(e.evaluate(t),t.properties())],[[Ft,pa],(t,[e,i])=>Fp(e.evaluate(t),i.evaluate(t))]]},config:{type:jt,overloads:[[[Ft],(t,[e])=>Sy(t,e.evaluate(t),"")],[[Ft,Ft],(t,[e,i])=>Sy(t,e.evaluate(t),i.evaluate(t))]]},"feature-state":[jt,[Ft],(t,[e])=>Fp(e.evaluate(t),t.featureState||{})],properties:[pa,[],t=>t.properties()],"geometry-type":[Ft,[],t=>t.geometryType()],id:[jt,[],t=>t.id()],zoom:[ze,[],t=>t.globals.zoom],pitch:[ze,[],t=>t.globals.pitch||0],"distance-from-center":[ze,[],t=>t.distanceFromCenter()],"measure-light":[ze,[Ft],(t,[e])=>t.measureLight(e.evaluate(t))],"heatmap-density":[ze,[],t=>t.globals.heatmapDensity||0],"line-progress":[ze,[],t=>t.globals.lineProgress||0],"raster-value":[ze,[],t=>t.globals.rasterValue||0],"sky-radial-progress":[ze,[],t=>t.globals.skyRadialProgress||0],accumulated:[jt,[],t=>t.globals.accumulated===void 0?null:t.globals.accumulated],"+":[ze,Is(ze),(t,e)=>{let i=0;for(const r of e)i+=r.evaluate(t);return i}],"*":[ze,Is(ze),(t,e)=>{let i=1;for(const r of e)i*=r.evaluate(t);return i}],"-":{type:ze,overloads:[[[ze,ze],(t,[e,i])=>e.evaluate(t)-i.evaluate(t)],[[ze],(t,[e])=>-e.evaluate(t)]]},"/":[ze,[ze,ze],(t,[e,i])=>e.evaluate(t)/i.evaluate(t)],"%":[ze,[ze,ze],(t,[e,i])=>e.evaluate(t)%i.evaluate(t)],ln2:[ze,[],()=>Math.LN2],pi:[ze,[],()=>Math.PI],e:[ze,[],()=>Math.E],"^":[ze,[ze,ze],(t,[e,i])=>Math.pow(e.evaluate(t),i.evaluate(t))],sqrt:[ze,[ze],(t,[e])=>Math.sqrt(e.evaluate(t))],log10:[ze,[ze],(t,[e])=>Math.log(e.evaluate(t))/Math.LN10],ln:[ze,[ze],(t,[e])=>Math.log(e.evaluate(t))],log2:[ze,[ze],(t,[e])=>Math.log(e.evaluate(t))/Math.LN2],sin:[ze,[ze],(t,[e])=>Math.sin(e.evaluate(t))],cos:[ze,[ze],(t,[e])=>Math.cos(e.evaluate(t))],tan:[ze,[ze],(t,[e])=>Math.tan(e.evaluate(t))],asin:[ze,[ze],(t,[e])=>Math.asin(e.evaluate(t))],acos:[ze,[ze],(t,[e])=>Math.acos(e.evaluate(t))],atan:[ze,[ze],(t,[e])=>Math.atan(e.evaluate(t))],min:[ze,Is(ze),(t,e)=>Math.min(...e.map(i=>i.evaluate(t)))],max:[ze,Is(ze),(t,e)=>Math.max(...e.map(i=>i.evaluate(t)))],abs:[ze,[ze],(t,[e])=>Math.abs(e.evaluate(t))],round:[ze,[ze],(t,[e])=>{const i=e.evaluate(t);return i<0?-Math.round(-i):Math.round(i)}],floor:[ze,[ze],(t,[e])=>Math.floor(e.evaluate(t))],ceil:[ze,[ze],(t,[e])=>Math.ceil(e.evaluate(t))],"filter-==":[Ut,[Ft,jt],(t,[e,i])=>t.properties()[e.value]===i.value],"filter-id-==":[Ut,[jt],(t,[e])=>t.id()===e.value],"filter-type-==":[Ut,[Ft],(t,[e])=>t.geometryType()===e.value],"filter-<":[Ut,[Ft,jt],(t,[e,i])=>{const r=t.properties()[e.value],o=i.value;return typeof r==typeof o&&r<o}],"filter-id-<":[Ut,[jt],(t,[e])=>{const i=t.id(),r=e.value;return typeof i==typeof r&&i<r}],"filter->":[Ut,[Ft,jt],(t,[e,i])=>{const r=t.properties()[e.value],o=i.value;return typeof r==typeof o&&r>o}],"filter-id->":[Ut,[jt],(t,[e])=>{const i=t.id(),r=e.value;return typeof i==typeof r&&i>r}],"filter-<=":[Ut,[Ft,jt],(t,[e,i])=>{const r=t.properties()[e.value],o=i.value;return typeof r==typeof o&&r<=o}],"filter-id-<=":[Ut,[jt],(t,[e])=>{const i=t.id(),r=e.value;return typeof i==typeof r&&i<=r}],"filter->=":[Ut,[Ft,jt],(t,[e,i])=>{const r=t.properties()[e.value],o=i.value;return typeof r==typeof o&&r>=o}],"filter-id->=":[Ut,[jt],(t,[e])=>{const i=t.id(),r=e.value;return typeof i==typeof r&&i>=r}],"filter-has":[Ut,[jt],(t,[e])=>e.value in t.properties()],"filter-has-id":[Ut,[],t=>t.id()!==null&&t.id()!==void 0],"filter-type-in":[Ut,[zr(Ft)],(t,[e])=>e.value.indexOf(t.geometryType())>=0],"filter-id-in":[Ut,[zr(jt)],(t,[e])=>e.value.indexOf(t.id())>=0],"filter-in-small":[Ut,[Ft,zr(jt)],(t,[e,i])=>i.value.indexOf(t.properties()[e.value])>=0],"filter-in-large":[Ut,[Ft,zr(jt)],(t,[e,i])=>function(r,o,n,s){for(;n<=s;){const a=n+s>>1;if(o[a]===r)return!0;o[a]>r?s=a-1:n=a+1}return!1}(t.properties()[e.value],i.value,0,i.value.length-1)],all:{type:Ut,overloads:[[[Ut,Ut],(t,[e,i])=>e.evaluate(t)&&i.evaluate(t)],[Is(Ut),(t,e)=>{for(const i of e)if(!i.evaluate(t))return!1;return!0}]]},any:{type:Ut,overloads:[[[Ut,Ut],(t,[e,i])=>e.evaluate(t)||i.evaluate(t)],[Is(Ut),(t,e)=>{for(const i of e)if(i.evaluate(t))return!0;return!1}]]},"!":[Ut,[Ut],(t,[e])=>!e.evaluate(t)],"is-supported-script":[Ut,[Ft],(t,[e])=>{const i=t.globals&&t.globals.isSupportedScript;return!i||i(e.evaluate(t))}],upcase:[Ft,[Ft],(t,[e])=>e.evaluate(t).toUpperCase()],downcase:[Ft,[Ft],(t,[e])=>e.evaluate(t).toLowerCase()],concat:[Ft,Is(jt),(t,e)=>e.map(i=>xl(i.evaluate(t))).join("")],"resolved-locale":[Ft,[Wc],(t,[e])=>e.evaluate(t).resolvedLocale()],random:[ze,[ze,ze,jt],(t,e)=>{const[i,r,o]=e.map(s=>s.evaluate(t));if(i>r||i===r)return i;let n;if(typeof o=="string")n=function(s){let a=0;if(s.length===0)return a;for(let l=0;l<s.length;l++)a=(a<<5)-a+s.charCodeAt(l),a&=a;return a}(o);else{if(typeof o!="number")throw new or(`Invalid seed input: ${o}`);n=o}return i+Bp(n)()*(r-i)}]});var Pl=vy;function Ay(t){return{result:"success",value:t}}function Cs(t){return{result:"error",value:t}}function My(t,e){return!!t&&!!t.parameters&&t.parameters.indexOf(e)>-1}function ks(t){return t["property-type"]==="data-driven"}function Iy(t){return My(t.expression,"measure-light")}function Np(t){return My(t.expression,"zoom")}function jp(t){return!!t.expression&&t.expression.interpolated}function su(t){return typeof t=="object"&&t!==null&&!Array.isArray(t)}function PS(t){return t}function Cy(t,e){const i=e.type==="color",r=t.stops&&typeof t.stops[0][0]=="object",o=r||!(r||t.property!==void 0),n=t.type||(jp(e)?"exponential":"interval");if(i&&((t=ln({},t)).stops&&(t.stops=t.stops.map(c=>[c[0],bt.parse(c[1])])),t.default=bt.parse(t.default?t.default:e.default)),t.colorSpace&&t.colorSpace!=="rgb"&&!fy[t.colorSpace])throw new Error(`Unknown color space: ${t.colorSpace}`);let s,a,l;if(n==="exponential")s=ky;else if(n==="interval")s=zS;else if(n==="categorical"){s=DS,a=Object.create(null);for(const c of t.stops)a[c[0]]=c[1];l=typeof t.stops[0][0]}else{if(n!=="identity")throw new Error(`Unknown function type "${n}"`);s=RS}if(r){const c={},u=[];for(let _=0;_<t.stops.length;_++){const g=t.stops[_],y=g[0].zoom;c[y]===void 0&&(c[y]={zoom:y,type:t.type,property:t.property,default:t.default,stops:[]},u.push(y)),c[y].stops.push([g[0].value,g[1]])}const p=[];for(const _ of u)p.push([c[_].zoom,Cy(c[_],e)]);const f={name:"linear"};return{kind:"composite",interpolationType:f,interpolationFactor:Fo.interpolationFactor.bind(void 0,f),zoomStops:p.map(_=>_[0]),evaluate:({zoom:_},g)=>ky({stops:p,base:t.base},e,_).evaluate(_,g)}}if(o){const c=n==="exponential"?{name:"exponential",base:t.base!==void 0?t.base:1}:null;return{kind:"camera",interpolationType:c,interpolationFactor:Fo.interpolationFactor.bind(void 0,c),zoomStops:t.stops.map(u=>u[0]),evaluate:({zoom:u})=>s(t,e,u,a,l)}}return{kind:"source",evaluate(c,u){const p=u&&u.properties?u.properties[t.property]:void 0;return p===void 0?Dl(t.default,e.default):s(t,e,p,a,l)}}}function Dl(t,e,i){return t!==void 0?t:e!==void 0?e:i!==void 0?i:void 0}function DS(t,e,i,r,o){return Dl(typeof i===o?r[i]:void 0,t.default,e.default)}function zS(t,e,i){if(Yt(i)!=="number")return Dl(t.default,e.default);const r=t.stops.length;if(r===1||i<=t.stops[0][0])return t.stops[0][1];if(i>=t.stops[r-1][0])return t.stops[r-1][1];const o=tu(t.stops.map(n=>n[0]),i);return t.stops[o][1]}function ky(t,e,i){const r=t.base!==void 0?t.base:1;if(Yt(i)!=="number")return Dl(t.default,e.default);const o=t.stops.length;if(o===1||i<=t.stops[0][0])return t.stops[0][1];if(i>=t.stops[o-1][0])return t.stops[o-1][1];const n=tu(t.stops.map(u=>u[0]),i),s=function(u,p,f,_){const g=_-f,y=u-f;return g===0?0:p===1?y/g:(Math.pow(p,y)-1)/(Math.pow(p,g)-1)}(i,r,t.stops[n][0],t.stops[n+1][0]),a=t.stops[n][1],l=t.stops[n+1][1];let c=iu[e.type]||PS;if(t.colorSpace&&t.colorSpace!=="rgb"){const u=fy[t.colorSpace];c=(p,f)=>u.reverse(u.interpolate(u.forward(p),u.forward(f),s))}return typeof a.evaluate=="function"?{evaluate(...u){const p=a.evaluate.apply(void 0,u),f=l.evaluate.apply(void 0,u);if(p!==void 0&&f!==void 0)return c(p,f,s)}}:c(a,l,s)}function RS(t,e,i){return e.type==="color"?i=bt.parse(i):e.type==="formatted"?i=Lr.fromString(i.toString()):e.type==="resolvedImage"?i=lo.fromString(i.toString()):Yt(i)===e.type||e.type==="enum"&&e.values[i]||(i=void 0),Dl(i,t.default,e.default)}class Vp{constructor(e,i,r){this.expression=e,this._warningHistory={},this._evaluator=new qg(r),this._defaultValue=i?function(o){return o.type==="color"&&(su(o.default)||Array.isArray(o.default))?new bt(0,0,0,0):o.type==="color"?bt.parse(o.default)||null:o.default===void 0?null:o.default}(i):null,this._enumValues=i&&i.type==="enum"?i.values:null}evaluateWithoutErrorHandling(e,i,r,o,n,s,a,l){return this._evaluator.globals=e,this._evaluator.feature=i,this._evaluator.featureState=r,this._evaluator.canonical=o||null,this._evaluator.availableImages=n||null,this._evaluator.formattedSection=s,this._evaluator.featureTileCoord=a||null,this._evaluator.featureDistanceData=l||null,this.expression.evaluate(this._evaluator)}evaluate(e,i,r,o,n,s,a,l){this._evaluator.globals=e,this._evaluator.feature=i||null,this._evaluator.featureState=r||null,this._evaluator.canonical=o||null,this._evaluator.availableImages=n||null,this._evaluator.formattedSection=s||null,this._evaluator.featureTileCoord=a||null,this._evaluator.featureDistanceData=l||null;try{const c=this.expression.evaluate(this._evaluator);if(c==null||typeof c=="number"&&c!=c)return this._defaultValue;if(this._enumValues&&!(c in this._enumValues))throw new or(`Expected value to be one of ${Object.keys(this._enumValues).map(u=>JSON.stringify(u)).join(", ")}, but found ${JSON.stringify(c)} instead.`);return c}catch(c){return this._warningHistory[c.message]||(this._warningHistory[c.message]=!0,typeof console<"u"&&console.warn(c.message)),this._defaultValue}}}function au(t){return Array.isArray(t)&&t.length>0&&typeof t[0]=="string"&&t[0]in Pl}function Fn(t,e,i){const r=new sy(Pl,[],e?function(n){const s={color:ao,string:Ft,number:ze,enum:Ft,boolean:Ut,formatted:_l,resolvedImage:gl};return n.type==="array"?zr(s[n.value]||jt,n.length):s[n.type]}(e):void 0,void 0,void 0,i),o=r.parse(t,void 0,void 0,void 0,e&&e.type==="string"?{typeAnnotation:"coerce"}:void 0);return o?Ay(new Vp(o,e,i)):Cs(r.errors)}class Up{constructor(e,i,r){this.kind=e,this._styleExpression=i,this.isLightConstant=r,this.isStateDependent=e!=="constant"&&!Il(i.expression),this.isConfigDependent=!yp(i.expression)}evaluateWithoutErrorHandling(e,i,r,o,n,s){return this._styleExpression.evaluateWithoutErrorHandling(e,i,r,o,n,s)}evaluate(e,i,r,o,n,s){return this._styleExpression.evaluate(e,i,r,o,n,s)}}class Nn{constructor(e,i,r,o,n){this.kind=e,this.zoomStops=r,this._styleExpression=i,this.isStateDependent=e!=="camera"&&!Il(i.expression),this.isLightConstant=n,this.isConfigDependent=!yp(i.expression),this.interpolationType=o}evaluateWithoutErrorHandling(e,i,r,o,n,s){return this._styleExpression.evaluateWithoutErrorHandling(e,i,r,o,n,s)}evaluate(e,i,r,o,n,s){return this._styleExpression.evaluate(e,i,r,o,n,s)}interpolationFactor(e,i,r){return this.interpolationType?Fo.interpolationFactor(this.interpolationType,e,i,r):0}}function qp(t,e,i){if((t=Fn(t,e,i)).result==="error")return t;const r=t.value.expression,o=ga(r);if(!o&&!ks(e))return Cs([new Oo("","data expressions not supported")]);const n=ya(r,["zoom","pitch","distance-from-center"]);if(!n&&!Np(e))return Cs([new Oo("","zoom expressions not supported")]);const s=ya(r,["measure-light"]);if(!s&&!Iy(e))return Cs([new Oo("","measure-light expression not supported")]);const a=e.expression&&e.expression.relaxZoomRestriction,l=cu(r);return l||n||a?l instanceof Oo?Cs([l]):l instanceof Fo&&!jp(e)?Cs([new Oo("",'"interpolate" expressions cannot be used with this property')]):Ay(l?new Nn(o?"camera":"composite",t.value,l.labels,l instanceof Fo?l.interpolation:void 0,s):new Up(o?"constant":"source",t.value,s)):Cs([new Oo("",'"zoom" expression may only be used as input to a top-level "step" or "interpolate" expression, or in the properties of atmosphere.')])}class lu{constructor(e,i){this._parameters=e,this._specification=i,ln(this,Cy(this._parameters,this._specification))}static deserialize(e){return new lu(e._parameters,e._specification)}static serialize(e){return{_parameters:e._parameters,_specification:e._specification}}}function cu(t){let e=null;if(t instanceof _y)e=cu(t.result);else if(t instanceof my){for(const i of t.args)if(e=cu(i),e)break}else(t instanceof Tp||t instanceof Fo)&&t.input instanceof Bo&&t.input.name==="zoom"&&(e=t);return e instanceof Oo||t.eachChild(i=>{const r=cu(i);r instanceof Oo?e=r:e&&r&&e!==r&&(e=new Oo("",'Only one zoom-based "step" or "interpolate" subexpression may be used in an expression.'))}),e}function co(t){const e=t.key,i=t.value,r=t.valueSpec||{},o=t.objectElementValidators||{},n=t.style,s=t.styleSpec;let a=[];const l=Yt(i);if(l!=="object")return[new Oe(e,i,`object expected, ${l} found`)];for(const c in i){const u=c.split(".")[0];let p;o[u]?p=o[u]:r[u]?p=ar:o["*"]?p=o["*"]:r["*"]&&(p=ar),p?a=a.concat(p({key:(e&&`${e}.`)+c,value:i[c],valueSpec:r[u]||r["*"],style:n,styleSpec:s,object:i,objectKey:c},i)):a.push(new Es(e,i[c],`unknown property "${c}"`))}for(const c in r)o[c]||r[c].required&&r[c].default===void 0&&i[c]===void 0&&a.push(new Oe(e,i,`missing required property "${c}"`));return a}function Py(t){const e=t.value,i=t.valueSpec,r=t.style,o=t.styleSpec,n=t.key,s=t.arrayElementValidator||ar;if(Yt(e)!=="array")return[new Oe(n,e,`array expected, ${Yt(e)} found`)];if(i.length&&e.length!==i.length)return[new Oe(n,e,`array length ${i.length} expected, length ${e.length} found`)];if(i["min-length"]&&e.length<i["min-length"])return[new Oe(n,e,`array length at least ${i["min-length"]} expected, length ${e.length} found`)];let a={type:i.value,values:i.values,minimum:i.minimum,maximum:i.maximum,function:void 0};o.$version<7&&(a.function=i.function),Yt(i.value)==="object"&&(a=i.value);let l=[];for(let c=0;c<e.length;c++)l=l.concat(s({array:e,arrayIndex:c,value:e[c],valueSpec:a,style:r,styleSpec:o,key:`${n}[${c}]`},!0));return l}function Dy(t){const e=t.key,i=t.value,r=t.valueSpec;let o=Yt(i);if(o==="number"&&i!=i&&(o="NaN"),o!=="number")return[new Oe(e,i,`number expected, ${o} found`)];if("minimum"in r){let n=r.minimum;if(Yt(r.minimum)==="array"&&(n=r.minimum[t.arrayIndex]),i<n)return[new Oe(e,i,`${i} is less than the minimum value ${n}`)]}if("maximum"in r){let n=r.maximum;if(Yt(r.maximum)==="array"&&(n=r.maximum[t.arrayIndex]),i>n)return[new Oe(e,i,`${i} is greater than the maximum value ${n}`)]}return[]}function zy(t){const e=t.valueSpec,i=Gi(t.value.type);let r,o,n,s={};const a=i!=="categorical"&&t.value.property===void 0,l=!a,c=Yt(t.value.stops)==="array"&&Yt(t.value.stops[0])==="array"&&Yt(t.value.stops[0][0])==="object",u=co({key:t.key,value:t.value,valueSpec:t.styleSpec.function,style:t.style,styleSpec:t.styleSpec,objectElementValidators:{stops:function(_){if(i==="identity")return[new Oe(_.key,_.value,'identity function may not have a "stops" property')];let g=[];const y=_.value;return g=g.concat(Py({key:_.key,value:y,valueSpec:_.valueSpec,style:_.style,styleSpec:_.styleSpec,arrayElementValidator:p})),Yt(y)==="array"&&y.length===0&&g.push(new Oe(_.key,y,"array must have at least one stop")),g},default:function(_){return ar({key:_.key,value:_.value,valueSpec:e,style:_.style,styleSpec:_.styleSpec})}}});return i==="identity"&&a&&u.push(new Oe(t.key,t.value,'missing required property "property"')),i==="identity"||t.value.stops||u.push(new Oe(t.key,t.value,'missing required property "stops"')),i==="exponential"&&t.valueSpec.expression&&!jp(t.valueSpec)&&u.push(new Oe(t.key,t.value,"exponential functions not supported")),t.styleSpec.$version>=8&&(l&&!ks(t.valueSpec)?u.push(new Oe(t.key,t.value,"property functions not supported")):a&&!Np(t.valueSpec)&&u.push(new Oe(t.key,t.value,"zoom functions not supported"))),i!=="categorical"&&!c||t.value.property!==void 0||u.push(new Oe(t.key,t.value,'"property" property is required')),u;function p(_){let g=[];const y=_.value,v=_.key;if(Yt(y)!=="array")return[new Oe(v,y,`array expected, ${Yt(y)} found`)];if(y.length!==2)return[new Oe(v,y,`array length 2 expected, length ${y.length} found`)];if(c){if(Yt(y[0])!=="object")return[new Oe(v,y,`object expected, ${Yt(y[0])} found`)];if(y[0].zoom===void 0)return[new Oe(v,y,"object stop key must have zoom")];if(y[0].value===void 0)return[new Oe(v,y,"object stop key must have value")];const b=Gi(y[0].zoom);if(typeof b!="number")return[new Oe(v,y[0].zoom,"stop zoom values must be numbers")];if(n&&n>b)return[new Oe(v,y[0].zoom,"stop zoom values must appear in ascending order")];b!==n&&(n=b,o=void 0,s={}),g=g.concat(co({key:`${v}[0]`,value:y[0],valueSpec:{zoom:{}},style:_.style,styleSpec:_.styleSpec,objectElementValidators:{zoom:Dy,value:f}}))}else g=g.concat(f({key:`${v}[0]`,value:y[0],style:_.style,styleSpec:_.styleSpec},y));return au(cn(y[1]))?g.concat([new Oe(`${v}[1]`,y[1],"expressions are not allowed in function stops.")]):g.concat(ar({key:`${v}[1]`,value:y[1],valueSpec:e,style:_.style,styleSpec:_.styleSpec}))}function f(_,g){const y=Yt(_.value),v=Gi(_.value),b=_.value!==null?_.value:g;if(r){if(y!==r)return[new Oe(_.key,b,`${y} stop domain type must match previous stop domain type ${r}`)]}else r=y;if(y!=="number"&&y!=="string"&&y!=="boolean"&&typeof v!="number"&&typeof v!="string"&&typeof v!="boolean")return[new Oe(_.key,b,"stop domain value must be a number, string, or boolean")];if(y!=="number"&&i!=="categorical"){let w=`number expected, ${y} found`;return ks(e)&&i===void 0&&(w+='\nIf you intended to use a categorical function, specify `"type": "categorical"`.'),[new Oe(_.key,b,w)]}return i!=="categorical"||y!=="number"||typeof v=="number"&&isFinite(v)&&Math.floor(v)===v?i!=="categorical"&&y==="number"&&typeof v=="number"&&typeof o=="number"&&o!==void 0&&v<o?[new Oe(_.key,b,"stop domain values must appear in ascending order")]:(o=v,i==="categorical"&&v in s?[new Oe(_.key,b,"stop domain values must be unique")]:(s[v]=!0,[])):[new Oe(_.key,b,`integer expected, found ${String(v)}`)]}}function Ps(t){const e=(t.expressionContext==="property"?qp:Fn)(cn(t.value),t.valueSpec);if(e.result==="error")return e.value.map(r=>new Oe(`${t.key}${r.key}`,t.value,r.message));const i=e.value.expression||e.value._styleExpression.expression;if(t.expressionContext==="property"&&t.propertyKey==="text-font"&&!i.outputDefined())return[new Oe(t.key,t.value,`Invalid data expression for "${t.propertyKey}". Output values must be contained as literals within the expression.`)];if(t.expressionContext==="property"&&t.propertyType==="layout"&&!Il(i))return[new Oe(t.key,t.value,'"feature-state" data expressions are not supported with layout properties.')];if(t.expressionContext==="filter")return Ry(i,t);if(t.expressionContext&&t.expressionContext.indexOf("cluster")===0){if(!ya(i,["zoom","feature-state"]))return[new Oe(t.key,t.value,'"zoom" and "feature-state" expressions are not supported with cluster properties.')];if(t.expressionContext==="cluster-initial"&&!ga(i))return[new Oe(t.key,t.value,"Feature data expressions are not supported with initial expression part of cluster properties.")]}return[]}function Ry(t,e){const i=new Set(["zoom","feature-state","pitch","distance-from-center"]);if(e.valueSpec&&e.valueSpec.expression)for(const o of e.valueSpec.expression.parameters)i.delete(o);if(i.size===0)return[];const r=[];return t instanceof Bo&&i.has(t.name)?[new Oe(e.key,e.value,`["${t.name}"] expression is not supported in a filter for a ${e.object.type} layer with id: ${e.object.id}`)]:(t.eachChild(o=>{r.push(...Ry(o,e))}),r)}function uu(t){const e=t.key,i=t.value,r=t.valueSpec,o=[];return Array.isArray(r.values)?r.values.indexOf(Gi(i))===-1&&o.push(new Oe(e,i,`expected one of [${r.values.join(", ")}], ${JSON.stringify(i)} found`)):Object.keys(r.values).indexOf(Gi(i))===-1&&o.push(new Oe(e,i,`expected one of [${Object.keys(r.values).join(", ")}], ${JSON.stringify(i)} found`)),o}function Gp(t){if(t===!0||t===!1)return!0;if(!Array.isArray(t)||t.length===0)return!1;switch(t[0]){case"has":return t.length>=2&&t[1]!=="$id"&&t[1]!=="$type";case"in":return t.length>=3&&(typeof t[1]!="string"||Array.isArray(t[2]));case"!in":case"!has":case"none":return!1;case"==":case"!=":case">":case">=":case"<":case"<=":return t.length!==3||Array.isArray(t[1])||Array.isArray(t[2]);case"any":case"all":for(const e of t.slice(1))if(!Gp(e)&&typeof e!="boolean")return!1;return!0;default:return!0}}function hu(t,e="fill"){if(t==null)return{filter:()=>!0,needGeometry:!1,needFeature:!1};Gp(t)||(t=du(t));const i=t;let r=!0;try{r=function(c){if(!ba(c))return c;let u=cn(c);return Oy(u),u=Ly(u),u}(i)}catch{console.warn(`Failed to extract static filter. Filter will continue working, but at higher memory usage and slower framerate.
1
+ import{O as M2,G as M_,q as Dn,e as In,o as ur,b as Hr,c as Cn,y as Dd,r as Qo,E as yT,w as vd,z as cD,d as en,a as sl,g as fs,j as W_,v as An,C as vT,t as Pc,A as uD,m as hD,f as xT,n as cg,s as I2,i as dD,D as pD}from"./_plugin-vue_export-helper.js";var C2={},Do=typeof globalThis<"u"?globalThis:typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{};function bT(h){return h&&h.__esModule&&Object.prototype.hasOwnProperty.call(h,"default")?h.default:h}function fD(h){if(h.__esModule)return h;var d=h.default;if(typeof d=="function"){var m=function x(){return this instanceof x?Reflect.construct(d,arguments,this.constructor):d.apply(this,arguments)};m.prototype=d.prototype}else m={};return Object.defineProperty(m,"__esModule",{value:!0}),Object.keys(h).forEach(function(x){var T=Object.getOwnPropertyDescriptor(h,x);Object.defineProperty(m,x,T.get?T:{enumerable:!0,get:function(){return h[x]}})}),m}var wT={exports:{}};(function(h,d){(function(m,x){h.exports=x()})(Do,function(){var m,x,T;function I(R,C){if(!m)m=C;else if(!x)x=C;else{var Z="self.onerror = function() { console.error('An error occurred while parsing the WebWorker bundle. This is most likely due to improper transpilation by Babel; please see https://docs.mapbox.com/mapbox-gl-js/guides/install/#transpiling'); }; var sharedChunk = {}; ("+m+")(sharedChunk); ("+x+")(sharedChunk); self.onerror = null;",ee={};m(ee),T=C(ee),typeof window<"u"&&window&&window.URL&&window.URL.createObjectURL&&(T.workerUrl=window.URL.createObjectURL(new Blob([Z],{type:"text/javascript"})))}}I(["exports"],function(R){var C=typeof self<"u"?self:{},Z="3.1.2";let ee;const ne={API_URL:"https://api.mapbox.com",get API_URL_REGEX(){if(ee==null){const t=/^((https?:)?\/\/)?([^\/]+\.)?mapbox\.c(n|om)(\/|\?|$)/i;try{ee=C2.API_URL_REGEX!=null?new RegExp(C2.API_URL_REGEX):t}catch{ee=t}}return ee},get API_TILEJSON_REGEX(){return/^((https?:)?\/\/)?([^\/]+\.)?mapbox\.c(n|om)(\/v[0-9]*\/.*\.json.*$)/i},get API_SPRITE_REGEX(){return/^((https?:)?\/\/)?([^\/]+\.)?mapbox\.c(n|om)(\/styles\/v[0-9]*\/)(.*\/sprite.*\..*$)/i},get API_FONTS_REGEX(){return/^((https?:)?\/\/)?([^\/]+\.)?mapbox\.c(n|om)(\/fonts\/v[0-9]*\/)(.*\.pbf.*$)/i},get API_STYLE_REGEX(){return/^((https?:)?\/\/)?([^\/]+\.)?mapbox\.c(n|om)(\/styles\/v[0-9]*\/)(.*$)/i},get API_CDN_URL_REGEX(){return/^((https?:)?\/\/)?api\.mapbox\.c(n|om)(\/mapbox-gl-js\/)(.*$)/i},get EVENTS_URL(){if(!ne.API_URL)return null;try{const t=new URL(ne.API_URL);return t.hostname==="api.mapbox.cn"?"https://events.mapbox.cn/events/v2":t.hostname==="api.mapbox.com"?"https://events.mapbox.com/events/v2":null}catch{return null}},SESSION_PATH:"/map-sessions/v1",FEEDBACK_URL:"https://apps.mapbox.com/feedback",TILE_URL_VERSION:"v4",RASTER_URL_PREFIX:"raster/v1",REQUIRE_ACCESS_TOKEN:!0,ACCESS_TOKEN:null,DEFAULT_STYLE:"mapbox://styles/mapbox/standard",MAX_PARALLEL_IMAGE_REQUESTS:16,DRACO_URL:"https://api.mapbox.com/mapbox-gl-js/draco_decoder_gltf_v1.5.6.wasm",GLYPHS_URL:"mapbox://fonts/mapbox/{fontstack}/{range}.pbf"},Te={supported:!1,testSupport:function(t){!ve&&ke&&(Xe?ut(t):Me=t)}};let Me,ke,ve=!1,Xe=!1;function ut(t){const e=t.createTexture();t.bindTexture(t.TEXTURE_2D,e);try{if(t.texImage2D(t.TEXTURE_2D,0,t.RGBA,t.RGBA,t.UNSIGNED_BYTE,ke),t.isContextLost())return;Te.supported=!0}catch{}t.deleteTexture(e),ve=!0}C.document&&(ke=C.document.createElement("img"),ke.onload=function(){Me&&ut(Me),Me=null,Xe=!0},ke.onerror=function(){ve=!0,Me=null},ke.src="data:image/webp;base64,UklGRh4AAABXRUJQVlA4TBEAAAAvAQAAAAfQ//73v/+BiOh/AAA=");const tt="01";function yt(t){return t&&t.__esModule&&Object.prototype.hasOwnProperty.call(t,"default")?t.default:t}var _t=st;function st(t,e,i,r){this.cx=3*t,this.bx=3*(i-t)-this.cx,this.ax=1-this.cx-this.bx,this.cy=3*e,this.by=3*(r-e)-this.cy,this.ay=1-this.cy-this.by,this.p1x=t,this.p1y=e,this.p2x=i,this.p2y=r}st.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,e){if(e===void 0&&(e=1e-6),t<0)return 0;if(t>1)return 1;for(var i=t,r=0;r<8;r++){var o=this.sampleCurveX(i)-t;if(Math.abs(o)<e)return i;var n=this.sampleCurveDerivativeX(i);if(Math.abs(n)<1e-6)break;i-=o/n}var s=0,a=1;for(i=t,r=0;r<20&&(o=this.sampleCurveX(i),!(Math.abs(o-t)<e));r++)t>o?s=i:a=i,i=.5*(a-s)+s;return i},solve:function(t,e){return this.sampleCurveY(this.solveCurveX(t,e))}};var qe=yt(_t),$t=pi;function pi(t,e){this.x=t,this.y=e}pi.prototype={clone:function(){return new pi(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,e){return this.clone()._rotateAround(t,e)},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 e=t.x-this.x,i=t.y-this.y;return e*e+i*i},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,e){return Math.atan2(this.x*e-this.y*t,this.x*t+this.y*e)},_matMult:function(t){var e=t[2]*this.x+t[3]*this.y;return this.x=t[0]*this.x+t[1]*this.y,this.y=e,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 e=Math.cos(t),i=Math.sin(t),r=i*this.x+e*this.y;return this.x=e*this.x-i*this.y,this.y=r,this},_rotateAround:function(t,e){var i=Math.cos(t),r=Math.sin(t),o=e.y+r*(this.x-e.x)+i*(this.y-e.y);return this.x=e.x+i*(this.x-e.x)-r*(this.y-e.y),this.y=o,this},_round:function(){return this.x=Math.round(this.x),this.y=Math.round(this.y),this}},pi.convert=function(t){return t instanceof pi?t:Array.isArray(t)?new pi(t[0],t[1]):t};var X=yt($t);function lt(t,e){if(Array.isArray(t)){if(!Array.isArray(e)||t.length!==e.length)return!1;for(let i=0;i<t.length;i++)if(!lt(t[i],e[i]))return!1;return!0}if(typeof t=="object"&&t!==null&&e!==null){if(typeof e!="object"||Object.keys(t).length!==Object.keys(e).length)return!1;for(const i in t)if(!lt(t[i],e[i]))return!1;return!0}return t===e}const Rn=Math.PI/180,hr=180/Math.PI;function it(t){return t*Rn}function wi(t){return t*hr}const no=[[0,0],[1,0],[1,1],[0,1]];function Cr(t){if(t<=0)return 0;if(t>=1)return 1;const e=t*t,i=e*t;return 4*(t<.5?i:3*(t-e)+i-.75)}function on(t){let e=1/0,i=1/0,r=-1/0,o=-1/0;for(const n of t)e=Math.min(e,n.x),i=Math.min(i,n.y),r=Math.max(r,n.x),o=Math.max(o,n.y);return{min:new X(e,i),max:new X(r,o)}}function nn(t,e,i=0,r=!0){const o=new X(i,i),n=t.sub(o),s=e.add(o),a=[n,new X(s.x,n.y),s,new X(n.x,s.y)];return r&&a.push(n.clone()),a}function zo(t,e,i,r){const o=new qe(t,e,i,r);return function(n){return o.solve(n)}}const kr=zo(.25,.1,.25,1);function je(t,e,i){return Math.min(i,Math.max(e,t))}function Ro(t,e,i){return(i=je((i-t)/(e-t),0,1))*i*(3-2*i)}function Lo(t,e,i){const r=i-e,o=((t-e)%r+r)%r+e;return o===e?i:o}function xs(t,e,i){if(!t.length)return i(null,[]);let r=t.length;const o=new Array(t.length);let n=null;t.forEach((s,a)=>{e(s,(l,c)=>{l&&(n=l),o[a]=c,--r==0&&i(n,o)})})}function bs(t){const e=[];for(const i in t)e.push(t[i]);return e}function Be(t,...e){for(const i of e)for(const r in i)t[r]=i[r];return t}function Pr(t,e){const i={};for(let r=0;r<e.length;r++){const o=e[r];o in t&&(i[o]=t[o])}return i}let jd=1;function na(){return jd++}function Fc(){return function t(e){return e?(e^Math.random()*(16>>e/4)).toString(16):([1e7]+-[1e3]+-4e3+-8e3+-1e11).replace(/[018]/g,t)}()}function Nc(t){return t<=1?1:Math.pow(2,Math.ceil(Math.log(t)/Math.LN2))}function jc(t){return!!t&&/^[0-9a-f]{8}-[0-9a-f]{4}-[4][0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}$/i.test(t)}function Yi(t,e){t.forEach(i=>{e[i]&&(e[i]=e[i].bind(e))})}function sa(t,e){return t.indexOf(e,t.length-e.length)!==-1}function aa(t,e,i){const r={};for(const o in t)r[o]=e.call(this,t[o],o,t);return r}function xe(t,e,i){const r={};for(const o in t)e.call(this,t[o],o,t)&&(r[o]=t[o]);return r}function N(t){return Array.isArray(t)?t.map(N):typeof t=="object"&&t?aa(t,N):t}const U={};function H(t){U[t]||(typeof console<"u"&&console.warn(t),U[t]=!0)}function de(t,e,i){return(i.y-t.y)*(e.x-t.x)>(e.y-t.y)*(i.x-t.x)}function fe(t){let e=0;for(let i,r,o=0,n=t.length,s=n-1;o<n;s=o++)i=t[o],r=t[s],e+=(r.x-i.x)*(i.y+r.y);return e}function Le([t,e,i]){const r=it(e+90),o=it(i);return{x:t*Math.cos(r)*Math.sin(o),y:t*Math.sin(r)*Math.sin(o),z:t*Math.cos(o),azimuthal:e,polar:i}}function Ge(t,e,i){const r=Math.sqrt(t*t+e*e+i*i),o=r>0?Math.acos(i/r)*hr:0;let n=t!==0||e!==0?Math.atan2(-e,-t)*hr+90:0;return n<0&&(n+=360),[r,n,o]}function me(){return typeof WorkerGlobalScope<"u"&&typeof self<"u"&&self instanceof WorkerGlobalScope}function We(t){const e={};if(t.replace(/(?:^|(?:\s*\,\s*))([^\x00-\x20\(\)<>@\,;\:\\"\/\[\]\?\=\{\}\x7F]+)(?:\=(?:([^\x00-\x20\(\)<>@\,;\:\\"\/\[\]\?\=\{\}\x7F]+)|(?:\"((?:[^"\\]|\\.)*)\")))?/g,(i,r,o,n)=>{const s=o||n;return e[r]=!s||s.toLowerCase(),""}),e["max-age"]){const i=parseInt(e["max-age"],10);isNaN(i)?delete e["max-age"]:e["max-age"]=i}return e}let ht=null;function at(){return!!C.document.fullscreenElement||!!C.document.webkitFullscreenElement}function si(t){try{const e=C[t];return e.setItem("_mapbox_test_",1),e.removeItem("_mapbox_test_"),!0}catch{return!1}}function Ti(t,e){return[t[4*e],t[4*e+1],t[4*e+2],t[4*e+3]]}function rr(t,e,i){t[4*e+0]=i[0],t[4*e+1]=i[1],t[4*e+2]=i[2],t[4*e+3]=i[3]}function Ei(t,e){return[Math.pow(t[0],2.2)*e,Math.pow(t[1],2.2)*e,Math.pow(t[2],2.2)*e]}function zi(t){return[Math.pow(t[0],1/2.2),Math.pow(t[1],1/2.2),Math.pow(t[2],1/2.2)]}const ui="mapbox-tiles";let dr=500,br=50,wr,xo;function la(){try{return C.caches}catch{}}function Dr(){la()&&!wr&&(wr=C.caches.open(ui))}function sn(t){const e=t.indexOf("?");if(e<0)return t;const i=function(o){const n=o.indexOf("?");return n>0?o.slice(n+1).split("&"):[]}(t),r=i.filter(o=>{const n=o.split("=");return n[0]==="language"||n[0]==="worldview"});return r.length?`${t.slice(0,e)}?${r.join("&")}`:t.slice(0,e)}let Ln=1/0;function ca(t){Ln++,Ln>br&&(t.getActor().send("enforceCacheSizeLimit",dr),Ln=0)}const le={Unknown:"Unknown",Style:"Style",Source:"Source",Tile:"Tile",Glyphs:"Glyphs",SpriteImage:"SpriteImage",SpriteJSON:"SpriteJSON",Image:"Image",Model:"Model"};typeof Object.freeze=="function"&&Object.freeze(le);class ue extends Error{constructor(e,i,r){i===401&&Si(r)&&(e+=": you may have provided an invalid Mapbox access token. See https://docs.mapbox.com/api/overview/#access-tokens-and-token-scopes"),super(e),this.status=i,this.url=r}toString(){return`${this.name}: ${this.message} (${this.status}): ${this.url}`}}const ge=me()?()=>self.worker&&self.worker.referrer:()=>(C.location.protocol==="blob:"?C.parent:C).location.href,be=function(t,e){if(!(/^file:/.test(i=t.url)||/^file:/.test(ge())&&!/^\w+:/.test(i))){if(C.fetch&&C.Request&&C.AbortController&&C.Request.prototype.hasOwnProperty("signal"))return function(r,o){const n=new C.AbortController,s=new C.Request(r.url,{method:r.method||"GET",body:r.body,credentials:r.credentials,headers:r.headers,referrer:ge(),referrerPolicy:r.referrerPolicy,signal:n.signal});let a=!1,l=!1;const c=(u=s.url).indexOf("sku=")>0&&Si(u);var u;r.type==="json"&&s.headers.set("Accept","application/json");const p=(_,g,y)=>{if(l)return;if(_&&_.message!=="SecurityError"&&H(_.toString()),g&&y)return f(g);const v=Date.now();C.fetch(s).then(b=>{if(b.ok){const w=c?b.clone():null;return f(b,w,v)}return o(new ue(b.statusText,b.status,r.url))}).catch(b=>{b.name!=="AbortError"&&o(new Error(`${b.message} ${r.url}`))})},f=(_,g,y)=>{(r.type==="arrayBuffer"?_.arrayBuffer():r.type==="json"?_.json():_.text()).then(v=>{l||(g&&y&&function(b,w,S){if(Dr(),!wr)return;const A={status:w.status,statusText:w.statusText,headers:new C.Headers};w.headers.forEach((k,D)=>A.headers.set(D,k));const E=We(w.headers.get("Cache-Control")||"");if(E["no-store"])return;E["max-age"]&&A.headers.set("Expires",new Date(S+1e3*E["max-age"]).toUTCString());const M=A.headers.get("Expires");M&&(new Date(M).getTime()-S<42e4||function(k,D){if(xo===void 0)try{new Response(new ReadableStream),xo=!0}catch{xo=!1}xo?D(k.body):k.blob().then(D)}(w,k=>{const D=new C.Response(k,A);Dr(),wr&&wr.then(z=>z.put(sn(b.url),D)).catch(z=>H(z.message))}))}(s,g,y),a=!0,o(null,v,_.headers.get("Cache-Control"),_.headers.get("Expires")))}).catch(v=>{l||o(new Error(v.message))})};return c?function(_,g){if(Dr(),!wr)return g(null);const y=sn(_.url);wr.then(v=>{v.match(y).then(b=>{const w=function(S){if(!S)return!1;const A=new Date(S.headers.get("Expires")||0),E=We(S.headers.get("Cache-Control")||"");return A>Date.now()&&!E["no-cache"]}(b);v.delete(y),w&&v.put(y,b.clone()),g(null,b,w)}).catch(g)}).catch(g)}(s,p):p(null,null),{cancel:()=>{l=!0,a||n.abort()}}}(t,e);if(me()&&self.worker&&self.worker.actor)return self.worker.actor.send("getResource",t,e,void 0,!0)}var i;return function(r,o){const n=new C.XMLHttpRequest;n.open(r.method||"GET",r.url,!0),r.type==="arrayBuffer"&&(n.responseType="arraybuffer");for(const s in r.headers)n.setRequestHeader(s,r.headers[s]);return r.type==="json"&&(n.responseType="text",n.setRequestHeader("Accept","application/json")),n.withCredentials=r.credentials==="include",n.onerror=()=>{o(new Error(n.statusText))},n.onload=()=>{if((n.status>=200&&n.status<300||n.status===0)&&n.response!==null){let s=n.response;if(r.type==="json")try{s=JSON.parse(n.response)}catch(a){return o(a)}o(null,s,n.getResponseHeader("Cache-Control"),n.getResponseHeader("Expires"))}else o(new ue(n.statusText,n.status,r.url))},n.send(r.body),{cancel:()=>n.abort()}}(t,e)},we=function(t,e){return be(Be(t,{type:"json"}),e)},Ie=function(t,e){return be(Be(t,{type:"arrayBuffer"}),e)};function Pe(t){const e=C.document.createElement("a");return e.href=t,e.protocol===C.document.location.protocol&&e.host===C.document.location.host}const Ee="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAEAAAABCAYAAAAfFcSJAAAAC0lEQVQYV2NgAAIAAAUAAarVyFEAAAAASUVORK5CYII=";let Ne,Ce;Ne=[],Ce=0;const vt=function(t,e){if(Te.supported&&(t.headers||(t.headers={}),t.headers.accept="image/webp,*/*"),Ce>=ne.MAX_PARALLEL_IMAGE_REQUESTS){const n={requestParameters:t,callback:e,cancelled:!1,cancel(){this.cancelled=!0}};return Ne.push(n),n}Ce++;let i=!1;const r=()=>{if(!i)for(i=!0,Ce--;Ne.length&&Ce<ne.MAX_PARALLEL_IMAGE_REQUESTS;){const n=Ne.shift(),{requestParameters:s,callback:a,cancelled:l}=n;l||(n.cancel=vt(s,a).cancel)}},o=Ie(t,(n,s,a,l)=>{r(),n?e(n):s&&(C.createImageBitmap?function(c,u){const p=new C.Blob([new Uint8Array(c)],{type:"image/png"});C.createImageBitmap(p).then(f=>{u(null,f)}).catch(f=>{u(new Error(`Could not load image because of ${f.message}. Please make sure to use a supported image type such as PNG or JPEG. Note that SVGs are not supported.`))})}(s,(c,u)=>e(c,u,a,l)):function(c,u){const p=new C.Image,f=C.URL;p.onload=()=>{u(null,p),f.revokeObjectURL(p.src),p.onload=null,C.requestAnimationFrame(()=>{p.src=Ee})},p.onerror=()=>u(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 _=new C.Blob([new Uint8Array(c)],{type:"image/png"});p.src=c.byteLength?f.createObjectURL(_):Ee}(s,(c,u)=>e(c,u,a,l)))});return{cancel:()=>{o.cancel(),r()}}},ei="NO_ACCESS_TOKEN";class Ye{constructor(e,i,r){this._transformRequestFn=e,this._customAccessToken=i,this._silenceAuthErrors=!!r,this._createSkuToken()}_createSkuToken(){const e=function(){let i="";for(let r=0;r<10;r++)i+="0123456789abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ"[Math.floor(62*Math.random())];return{token:["1",tt,i].join(""),tokenExpiresAt:Date.now()+432e5}}();this._skuToken=e.token,this._skuTokenExpiresAt=e.tokenExpiresAt}_isSkuTokenExpired(){return Date.now()>this._skuTokenExpiresAt}transformRequest(e,i){return this._transformRequestFn&&this._transformRequestFn(e,i)||{url:e}}normalizeStyleURL(e,i){if(!Xt(e))return e;const r=Ki(e);return r.params.push(`sdk=js-${Z}`),r.path=`/styles/v1${r.path}`,this._makeAPIURL(r,this._customAccessToken||i)}normalizeGlyphsURL(e,i){if(!Xt(e))return e;const r=Ki(e);return r.path=`/fonts/v1${r.path}`,this._makeAPIURL(r,this._customAccessToken||i)}normalizeModelURL(e,i){if(!Xt(e))return e;const r=Ki(e);return r.path=`/models/v1${r.path}`,this._makeAPIURL(r,this._customAccessToken||i)}normalizeSourceURL(e,i,r,o){if(!Xt(e))return e;const n=Ki(e);return n.path=`/v4/${n.authority}.json`,n.params.push("secure"),r&&n.params.push(`language=${r}`),o&&n.params.push(`worldview=${o}`),this._makeAPIURL(n,this._customAccessToken||i)}normalizeSpriteURL(e,i,r,o){const n=Ki(e);return Xt(e)?(n.path=`/styles/v1${n.path}/sprite${i}${r}`,this._makeAPIURL(n,this._customAccessToken||o)):(n.path+=`${i}${r}`,Tr(n))}normalizeTileURL(e,i,r){if(this._isSkuTokenExpired()&&this._createSkuToken(),e&&!Xt(e))return e;const o=Ki(e);o.path=o.path.replace(/(\.(png|jpg)\d*)(?=$)/,`${i||r&&o.authority!=="raster"&&r===512?"@2x":""}${Te.supported?".webp":"$1"}`),o.authority==="raster"?o.path=`/${ne.RASTER_URL_PREFIX}${o.path}`:(o.path=o.path.replace(/^.+\/v4\//,"/"),o.path=`/${ne.TILE_URL_VERSION}${o.path}`);const n=this._customAccessToken||function(s){for(const a of s){const l=a.match(/^access_token=(.*)$/);if(l)return l[1]}return null}(o.params)||ne.ACCESS_TOKEN;return ne.REQUIRE_ACCESS_TOKEN&&n&&this._skuToken&&o.params.push(`sku=${this._skuToken}`),this._makeAPIURL(o,n)}canonicalizeTileURL(e,i){const r=Ki(e);if(!r.path.match(/^(\/v4\/|\/raster\/v1\/)/)||!r.path.match(/\.[\w]+$/))return e;let o="mapbox://";r.path.match(/^\/raster\/v1\//)?o+=`raster/${r.path.replace(`/${ne.RASTER_URL_PREFIX}/`,"")}`:o+=`tiles/${r.path.replace(`/${ne.TILE_URL_VERSION}/`,"")}`;let n=r.params;return i&&(n=n.filter(s=>!s.match(/^access_token=/))),n.length&&(o+=`?${n.join("&")}`),o}canonicalizeTileset(e,i){const r=!!i&&Xt(i),o=[];for(const n of e.tiles||[])Si(n)?o.push(this.canonicalizeTileURL(n,r)):o.push(n);return o}_makeAPIURL(e,i){const r="See https://docs.mapbox.com/api/overview/#access-tokens-and-token-scopes",o=Ki(ne.API_URL);if(e.protocol=o.protocol,e.authority=o.authority,e.protocol==="http"){const n=e.params.indexOf("secure");n>=0&&e.params.splice(n,1)}if(o.path!=="/"&&(e.path=`${o.path}${e.path}`),!ne.REQUIRE_ACCESS_TOKEN)return Tr(e);if(i=i||ne.ACCESS_TOKEN,!this._silenceAuthErrors){if(!i)throw new Error(`An API access token is required to use Mapbox GL. ${r}`);if(i[0]==="s")throw new Error(`Use a public access token (pk.*) with Mapbox GL, not a secret access token (sk.*). ${r}`)}return e.params=e.params.filter(n=>n.indexOf("access_token")===-1),e.params.push(`access_token=${i||""}`),Tr(e)}}function Xt(t){return t.indexOf("mapbox:")===0}function Si(t){return ne.API_URL_REGEX.test(t)}function Ri(t){return ne.API_CDN_URL_REGEX.test(t)}function qi(t){return ne.API_STYLE_REGEX.test(t)&&!pr(t)}function pr(t){return ne.API_SPRITE_REGEX.test(t)}const so=/^(\w+):\/\/([^/?]*)(\/[^?]+)?\??(.+)?/;function Ki(t){const e=t.match(so);if(!e)throw new Error("Unable to parse URL object");return{protocol:e[1],authority:e[2],path:e[3]||"/",params:e[4]?e[4].split("&"):[]}}function Tr(t){const e=t.params.length?`?${t.params.join("&")}`:"";return`${t.protocol}://${t.authority}${t.path}${e}`}const fr="mapbox.eventData";function ua(t){if(!t)return null;const e=t.split(".");if(!e||e.length!==3)return null;try{return JSON.parse(decodeURIComponent(C.atob(e[1]).split("").map(i=>"%"+("00"+i.charCodeAt(0).toString(16)).slice(-2)).join("")))}catch{return null}}class On{constructor(e){this.type=e,this.anonId=null,this.eventData={},this.queue=[],this.pendingRequest=null}getStorageKey(e){const i=ua(ne.ACCESS_TOKEN);let r="";return r=i&&i.u?C.btoa(encodeURIComponent(i.u).replace(/%([0-9A-F]{2})/g,(o,n)=>String.fromCharCode(+("0x"+n)))):ne.ACCESS_TOKEN||"",e?`${fr}.${e}:${r}`:`${fr}:${r}`}fetchEventData(){const e=si("localStorage"),i=this.getStorageKey(),r=this.getStorageKey("uuid");if(e)try{const o=C.localStorage.getItem(i);o&&(this.eventData=JSON.parse(o));const n=C.localStorage.getItem(r);n&&(this.anonId=n)}catch{H("Unable to read from LocalStorage")}}saveEventData(){const e=si("localStorage"),i=this.getStorageKey(),r=this.getStorageKey("uuid");if(e)try{C.localStorage.setItem(r,this.anonId),Object.keys(this.eventData).length>=1&&C.localStorage.setItem(i,JSON.stringify(this.eventData))}catch{H("Unable to write to LocalStorage")}}processRequests(e){}postEvent(e,i,r,o){if(!ne.EVENTS_URL)return;const n=Ki(ne.EVENTS_URL);n.params.push(`access_token=${o||ne.ACCESS_TOKEN||""}`);const s={event:this.type,created:new Date(e).toISOString()},a=i?Be(s,i):s,l={url:Tr(n),headers:{"Content-Type":"text/plain"},body:JSON.stringify([a])};this.pendingRequest=function(c,u){return be(Be(c,{method:"POST"}),u)}(l,c=>{this.pendingRequest=null,r(c),this.saveEventData(),this.processRequests(o)})}queueRequest(e,i){this.queue.push(e),this.processRequests(i)}}const ha=new class extends On{constructor(t){super("appUserTurnstile"),this._customAccessToken=t}postTurnstileEvent(t,e){ne.EVENTS_URL&&ne.ACCESS_TOKEN&&Array.isArray(t)&&t.some(i=>Xt(i)||Si(i))&&this.queueRequest(Date.now(),e)}processRequests(t){if(this.pendingRequest||this.queue.length===0)return;this.anonId&&this.eventData.lastSuccess&&this.eventData.tokenU||this.fetchEventData();const e=ua(ne.ACCESS_TOKEN),i=e?e.u:ne.ACCESS_TOKEN;let r=i!==this.eventData.tokenU;jc(this.anonId)||(this.anonId=Fc(),r=!0);const o=this.queue.shift();if(this.eventData.lastSuccess){const n=new Date(this.eventData.lastSuccess),s=new Date(o),a=(o-this.eventData.lastSuccess)/864e5;r=r||a>=1||a<-1||n.getDate()!==s.getDate()}else r=!0;r?this.postEvent(o,{sdkIdentifier:"mapbox-gl-js",sdkVersion:Z,skuId:tt,"enabled.telemetry":!1,userId:this.anonId},n=>{n||(this.eventData.lastSuccess=o,this.eventData.tokenU=i)},t):this.processRequests()}},Vd=ha.postTurnstileEvent.bind(ha),Mg=new class extends On{constructor(){super("map.load"),this.success={},this.skuToken=""}postMapLoadEvent(t,e,i,r){this.skuToken=e,this.errorCb=r,ne.EVENTS_URL&&(i||ne.ACCESS_TOKEN?this.queueRequest({id:t,timestamp:Date.now()},i):this.errorCb(new Error(ei)))}processRequests(t){if(this.pendingRequest||this.queue.length===0)return;const{id:e,timestamp:i}=this.queue.shift();e&&this.success[e]||(this.anonId||this.fetchEventData(),jc(this.anonId)||(this.anonId=Fc()),this.postEvent(i,{sdkIdentifier:"mapbox-gl-js",sdkVersion:Z,skuId:tt,skuToken:this.skuToken,userId:this.anonId},r=>{r?this.errorCb(r):e&&(this.success[e]=!0)},t))}},GE=Mg.postMapLoadEvent.bind(Mg),Ig=new class extends On{constructor(){super("gljs.performance")}postPerformanceEvent(t,e){ne.EVENTS_URL&&(t||ne.ACCESS_TOKEN)&&this.queueRequest({timestamp:Date.now(),performanceData:e},t)}processRequests(t){if(this.pendingRequest||this.queue.length===0)return;const{timestamp:e,performanceData:i}=this.queue.shift(),r=function(o){const n=C.performance.getEntriesByType("resource"),s=C.performance.getEntriesByType("mark"),a=function(f){const _={};if(f){for(const g in f)if(g!=="other")for(const y of f[g]){const v=`${g}ResolveRangeMin`,b=`${g}ResolveRangeMax`,w=`${g}RequestCount`,S=`${g}RequestCachedCount`;_[v]=Math.min(_[v]||1/0,y.startTime),_[b]=Math.max(_[b]||-1/0,y.responseEnd);const A=E=>{_[E]===void 0&&(_[E]=0),++_[E]};y.transferSize!==void 0&&y.transferSize===0&&A(S),A(w)}}return _}(function(f,_){const g={};if(f)for(const y of f){const v=_(y);g[v]===void 0&&(g[v]=[]),g[v].push(y)}return g}(n,HE)),l=C.devicePixelRatio,c=C.navigator.connection||C.navigator.mozConnection||C.navigator.webkitConnection,u={counters:[],metadata:[],attributes:[]},p=(f,_,g)=>{g!=null&&f.push({name:_,value:g.toString()})};for(const f in a)p(u.counters,f,a[f]);if(o.interactionRange[0]!==1/0&&o.interactionRange[1]!==-1/0&&(p(u.counters,"interactionRangeMin",o.interactionRange[0]),p(u.counters,"interactionRangeMax",o.interactionRange[1])),s)for(const f of Object.keys(Uc)){const _=Uc[f],g=s.find(y=>y.name===_);g&&p(u.counters,_,g.startTime)}return p(u.counters,"visibilityHidden",o.visibilityHidden),p(u.attributes,"style",function(f){if(f)for(const _ of f){const g=_.name.split("?")[0];if(qi(g)){const y=g.split("/").slice(-2);if(y.length===2)return`mapbox://styles/${y[0]}/${y[1]}`}}}(n)),p(u.attributes,"terrainEnabled",o.terrainEnabled?"true":"false"),p(u.attributes,"fogEnabled",o.fogEnabled?"true":"false"),p(u.attributes,"projection",o.projection),p(u.attributes,"zoom",o.zoom),p(u.metadata,"devicePixelRatio",l),p(u.metadata,"connectionEffectiveType",c?c.effectiveType:void 0),p(u.metadata,"navigatorUserAgent",C.navigator.userAgent),p(u.metadata,"screenWidth",C.screen.width),p(u.metadata,"screenHeight",C.screen.height),p(u.metadata,"windowWidth",C.innerWidth),p(u.metadata,"windowHeight",C.innerHeight),p(u.metadata,"mapWidth",o.width/l),p(u.metadata,"mapHeight",o.height/l),p(u.metadata,"webglRenderer",o.renderer),p(u.metadata,"webglVendor",o.vendor),p(u.metadata,"sdkVersion",Z),p(u.metadata,"sdkIdentifier","mapbox-gl-js"),u}(i);for(const o of r.metadata);for(const o of r.counters);for(const o of r.attributes);this.postEvent(e,r,()=>{},t)}},$E=Ig.postPerformanceEvent.bind(Ig),Cg=new class extends On{constructor(){super("map.auth"),this.success={},this.skuToken=""}getSession(t,e,i,r){if(!ne.API_URL||!ne.SESSION_PATH)return;const o=Ki(ne.API_URL+ne.SESSION_PATH);o.params.push(`sku=${e||""}`),o.params.push(`access_token=${r||ne.ACCESS_TOKEN||""}`);const n={url:Tr(o),headers:{"Content-Type":"text/plain"}};this.pendingRequest=function(s,a){return be(Be(s,{method:"GET"}),a)}(n,s=>{this.pendingRequest=null,i(s),this.saveEventData(),this.processRequests(r)})}getSessionAPI(t,e,i,r){this.skuToken=e,this.errorCb=r,ne.SESSION_PATH&&ne.API_URL&&(i||ne.ACCESS_TOKEN?this.queueRequest({id:t,timestamp:Date.now()},i):this.errorCb(new Error(ei)))}processRequests(t){if(this.pendingRequest||this.queue.length===0)return;const{id:e,timestamp:i}=this.queue.shift();e&&this.success[e]||this.getSession(i,this.skuToken,r=>{r?this.errorCb(r):e&&(this.success[e]=!0)},t)}},WE=Cg.getSessionAPI.bind(Cg),Vc=new Set;function kg(t,e){e?Vc.add(t):Vc.delete(t)}const Uc={create:"create",load:"load",fullLoad:"fullLoad"},Pg={mark(t){C.performance.mark(t)},measure(t,e,i){C.performance.measure(t,e,i)}};function HE(t){const e=t.name.split("?")[0];return Ri(e)&&e.includes("mapbox-gl.js")?"javascript":Ri(e)&&e.includes("mapbox-gl.css")?"css":function(i){return ne.API_FONTS_REGEX.test(i)}(e)?"fontRange":pr(e)?"sprite":qi(e)?"style":function(i){return ne.API_TILEJSON_REGEX.test(i)}(e)?"tilejson":"other"}const ZE=C.performance;function Dg(t){const e=t?t.url.toString():void 0;return ZE.getEntriesByName(e)}var zg=Ud;function Ud(t){return!function(e){return typeof window>"u"||typeof document>"u"?"not a browser":Array.prototype&&Array.prototype.every&&Array.prototype.filter&&Array.prototype.forEach&&Array.prototype.indexOf&&Array.prototype.lastIndexOf&&Array.prototype.map&&Array.prototype.some&&Array.prototype.reduce&&Array.prototype.reduceRight&&Array.isArray?Function.prototype&&Function.prototype.bind?Object.keys&&Object.create&&Object.getPrototypeOf&&Object.getOwnPropertyNames&&Object.isSealed&&Object.isFrozen&&Object.isExtensible&&Object.getOwnPropertyDescriptor&&Object.defineProperty&&Object.defineProperties&&Object.seal&&Object.freeze&&Object.preventExtensions?"JSON"in window&&"parse"in JSON&&"stringify"in JSON?function(){if(!("Worker"in window&&"Blob"in window&&"URL"in window))return!1;var r,o,n=new Blob([""],{type:"text/javascript"}),s=URL.createObjectURL(n);try{o=new Worker(s),r=!0}catch{r=!1}return o&&o.terminate(),URL.revokeObjectURL(s),r}()?"Uint8ClampedArray"in window?ArrayBuffer.isView?function(){var r=document.createElement("canvas");r.width=r.height=1;var o=r.getContext("2d");if(!o)return!1;var n=o.getImageData(0,0,1,1);return n&&n.width===r.width}()?(qd[i=e&&e.failIfMajorPerformanceCaveat]===void 0&&(qd[i]=function(r){var o,n=function(s){var a=document.createElement("canvas"),l=Object.create(Ud.webGLContextAttributes);return l.failIfMajorPerformanceCaveat=s,a.getContext("webgl",l)||a.getContext("experimental-webgl",l)}(r);if(!n)return!1;try{o=n.createShader(n.VERTEX_SHADER)}catch{return!1}return!(!o||n.isContextLost())&&(n.shaderSource(o,"void main() {}"),n.compileShader(o),n.getShaderParameter(o,n.COMPILE_STATUS)===!0)}(i)),qd[i]?document.documentMode?"insufficient ECMAScript 6 support":void 0:"insufficient WebGL support"):"insufficient Canvas/getImageData support":"insufficient ArrayBuffer support":"insufficient Uint8ClampedArray support":"insufficient worker support":"insufficient JSON support":"insufficient Object support":"insufficient Function support":"insufficent Array support";var i}(t)}var qd={};let Gd,qc,$d,Gc,ws;function Rg(){return Gd==null&&(Gd=C.OffscreenCanvas&&new C.OffscreenCanvas(1,1).getContext("2d")&&typeof C.createImageBitmap=="function"),Gd}Ud.webGLContextAttributes={antialias:!1,alpha:!0,stencil:!0,depth:!0};const ct={now:()=>Gc!==void 0?Gc:C.performance.now(),setNow(t){Gc=t},restoreNow(){Gc=void 0},frame(t){const e=C.requestAnimationFrame(t);return{cancel:()=>C.cancelAnimationFrame(e)}},getImageData(t,e=0){const{width:i,height:r}=t;ws||(ws=C.document.createElement("canvas"));const o=ws.getContext("2d",{willReadFrequently:!0});if(!o)throw new Error("failed to create canvas 2d context");return(i>ws.width||r>ws.height)&&(ws.width=i,ws.height=r),o.clearRect(-e,-e,i+2*e,r+2*e),o.drawImage(t,0,0,i,r),o.getImageData(-e,-e,i+2*e,r+2*e)},resolveURL:t=>(qc||(qc=C.document.createElement("a")),qc.href=t,qc.href),get devicePixelRatio(){return C.devicePixelRatio},get prefersReducedMotion(){return!!C.matchMedia&&($d==null&&($d=C.matchMedia("(prefers-reduced-motion: reduce)")),$d.matches)},hasCanvasFingerprintNoise(){if(!Rg())return!1;const t=new C.OffscreenCanvas(85,1),e=t.getContext("2d",{willReadFrequently:!0});let i=0;for(let o=0;o<t.width;++o)e.fillStyle=`rgba(${i++},${i++},${i++}, 255)`,e.fillRect(o,0,1,1);const r=e.getImageData(0,0,t.width,t.height);i=0;for(let o=0;o<r.data.length;++o)if(o%4!=3&&i++!==r.data[o])return!0;return!1}};function ni(t,e,i){const r=C.document.createElement(t);return e!==void 0&&(r.className=e),i&&i.appendChild(r),r}function an(t,e,i){const r=C.document.createElementNS("http://www.w3.org/2000/svg",t);for(const o of Object.keys(e))r.setAttributeNS(null,o,e[o]);return i&&i.appendChild(r),r}const Ts=C.document&&C.document.documentElement.style,fl=Ts&&Ts.userSelect!==void 0?"userSelect":"WebkitUserSelect";let Lg;function Og(){Ts&&fl&&(Lg=Ts[fl],Ts[fl]="none")}function Bg(){Ts&&fl&&(Ts[fl]=Lg)}function Wd(t){t.preventDefault(),t.stopPropagation(),C.removeEventListener("click",Wd,!0)}function Hd(){C.addEventListener("click",Wd,!0),C.setTimeout(()=>{C.removeEventListener("click",Wd,!0)},0)}function ml(t,e){const i=t.getBoundingClientRect();return Ng(t,i,e)}function $c(t,e){const i=t.getBoundingClientRect(),r=[];for(let o=0;o<e.length;o++)r.push(Ng(t,i,e[o]));return r}function Fg(t){return C.InstallTrigger!==void 0&&t.button===2&&t.ctrlKey&&C.navigator.platform.toUpperCase().indexOf("MAC")>=0?0:t.button}function Ng(t,e,i){const r=t.offsetWidth===e.width?1:t.offsetWidth/e.width;return new X((i.clientX-e.left)*r,(i.clientY-e.top)*r)}function jg(t,e,i){i[t]&&i[t].indexOf(e)!==-1||(i[t]=i[t]||[],i[t].push(e))}function Zd(t,e,i){if(i&&i[t]){const r=i[t].indexOf(e);r!==-1&&i[t].splice(r,1)}}class ye{constructor(e,i={}){Be(this,i),this.type=e}}class nt extends ye{constructor(e,i={}){super("error",Be({error:e},i))}}class Fi{on(e,i){return this._listeners=this._listeners||{},jg(e,i,this._listeners),this}off(e,i){return Zd(e,i,this._listeners),Zd(e,i,this._oneTimeListeners),this}once(e,i){return i?(this._oneTimeListeners=this._oneTimeListeners||{},jg(e,i,this._oneTimeListeners),this):new Promise(r=>this.once(e,r))}fire(e,i){typeof e=="string"&&(e=new ye(e,i||{}));const r=e.type;if(this.listens(r)){e.target=this;const o=this._listeners&&this._listeners[r]?this._listeners[r].slice():[];for(const a of o)a.call(this,e);const n=this._oneTimeListeners&&this._oneTimeListeners[r]?this._oneTimeListeners[r].slice():[];for(const a of n)Zd(r,a,this._oneTimeListeners),a.call(this,e);const s=this._eventedParent;s&&(Be(e,typeof this._eventedParentData=="function"?this._eventedParentData():this._eventedParentData),s.fire(e))}else e instanceof nt&&console.error(e.error);return this}listens(e){return!!(this._listeners&&this._listeners[e]&&this._listeners[e].length>0||this._oneTimeListeners&&this._oneTimeListeners[e]&&this._oneTimeListeners[e].length>0||this._eventedParent&&this._eventedParent.listens(e))}setEventedParent(e,i){return this._eventedParent=e,this._eventedParentData=i,this}}var J=JSON.parse('{"$version":8,"$root":{"version":{"required":true,"type":"enum","values":[8]},"fragment":{"type":"boolean"},"name":{"type":"string"},"metadata":{"type":"*"},"center":{"type":"array","value":"number"},"zoom":{"type":"number"},"bearing":{"type":"number","default":0,"period":360},"pitch":{"type":"number","default":0},"light":{"type":"light"},"lights":{"required":false,"type":"array","value":"light-3d"},"terrain":{"type":"terrain","optional":true},"fog":{"type":"fog"},"camera":{"type":"camera"},"imports":{"type":"array","value":"import"},"schema":{"type":"schema"},"sources":{"required":true,"type":"sources"},"sprite":{"type":"string"},"glyphs":{"type":"string","default":"mapbox://fonts/mapbox/{fontstack}/{range}.pbf"},"transition":{"type":"transition"},"projection":{"type":"projection"},"layers":{"required":true,"type":"array","value":"layer"},"models":{"type":"models"}},"model":{"type":"string","required":true},"import":{"id":{"type":"string","required":true},"url":{"type":"string","required":true},"config":{"type":"config"},"data":{"type":"$root"}},"config":{"*":{"type":"*"}},"schema":{"*":{"type":"option"}},"option":{"default":{"type":"*","required":true},"type":{"type":"enum","values":{"string":1,"number":1,"boolean":1,"color":1}},"array":{"type":"boolean"},"minValue":{"type":"number"},"maxValue":{"type":"number"},"stepValue":{"type":"number"},"values":{"type":"array","value":"*"},"metadata":{"type":"*"}},"models":{"*":{"type":"model"}},"light-3d":{"id":{"type":"string","required":true},"properties":{"type":"properties"},"type":{"type":"enum","values":{"ambient":{},"directional":{},"flat":{}}}},"properties":["properties_light_directional","properties_light_ambient","properties_light_flat"],"properties_light_directional":{"direction":{"type":"array","default":[210,30],"minimum":[0,0],"maximum":[360,90],"length":2,"value":"number","property-type":"data-constant","transition":true,"expression":{"interpolated":true,"parameters":["zoom"]}},"color":{"type":"color","property-type":"data-constant","default":"#ffffff","expression":{"interpolated":true,"parameters":["zoom"]},"transition":true},"intensity":{"type":"number","property-type":"data-constant","default":0.5,"minimum":0,"maximum":1,"expression":{"interpolated":true,"parameters":["zoom"]},"transition":true},"cast-shadows":{"type":"boolean","default":false,"expression":{},"property-type":"data-constant"},"shadow-intensity":{"type":"number","property-type":"data-constant","default":1,"minimum":0,"maximum":1,"expression":{"interpolated":true,"parameters":["zoom"]},"transition":true}},"properties_light_ambient":{"color":{"type":"color","property-type":"data-constant","default":"#ffffff","expression":{"interpolated":true,"parameters":["zoom"]},"transition":true},"intensity":{"type":"number","property-type":"data-constant","default":0.5,"minimum":0,"maximum":1,"expression":{"interpolated":true,"parameters":["zoom"]},"transition":true}},"properties_light_flat":{"anchor":{"type":"enum","default":"viewport","values":{"map":1,"viewport":1},"property-type":"data-constant","expression":{"parameters":["zoom"]}},"position":{"type":"array","default":[1.15,210,30],"length":3,"value":"number","property-type":"data-constant","transition":true,"expression":{"interpolated":true,"parameters":["zoom"]}},"color":{"type":"color","property-type":"data-constant","default":"#ffffff","expression":{"interpolated":true,"parameters":["zoom"]},"transition":true},"intensity":{"type":"number","property-type":"data-constant","default":0.5,"minimum":0,"maximum":1,"expression":{"interpolated":true,"parameters":["zoom"]},"transition":true}},"sources":{"*":{"type":"source"}},"source":["source_vector","source_raster","source_raster_dem","source_raster_array","source_geojson","source_video","source_image","source_model"],"source_vector":{"type":{"required":true,"type":"enum","values":{"vector":1}},"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":1,"tms":1},"default":"xyz"},"minzoom":{"type":"number","default":0},"maxzoom":{"type":"number","default":22},"attribution":{"type":"string"},"promoteId":{"type":"promoteId"},"volatile":{"type":"boolean","default":false},"*":{"type":"*"}},"source_raster":{"type":{"required":true,"type":"enum","values":{"raster":1}},"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},"scheme":{"type":"enum","values":{"xyz":1,"tms":1},"default":"xyz"},"attribution":{"type":"string"},"volatile":{"type":"boolean","default":false},"*":{"type":"*"}},"source_raster_dem":{"type":{"required":true,"type":"enum","values":{"raster-dem":1}},"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},"attribution":{"type":"string"},"encoding":{"type":"enum","values":{"terrarium":1,"mapbox":1},"default":"mapbox"},"volatile":{"type":"boolean","default":false},"*":{"type":"*"}},"source_raster_array":{"type":{"required":true,"type":"enum","values":{"raster-array":1}},"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},"attribution":{"type":"string"},"rasterLayers":{"type":"*"},"*":{"type":"*"}},"source_geojson":{"type":{"required":true,"type":"enum","values":{"geojson":1}},"data":{"type":"*"},"maxzoom":{"type":"number","default":18},"attribution":{"type":"string"},"buffer":{"type":"number","default":128,"maximum":512,"minimum":0},"filter":{"type":"*"},"tolerance":{"type":"number","default":0.375},"cluster":{"type":"boolean","default":false},"clusterRadius":{"type":"number","default":50,"minimum":0},"clusterMaxZoom":{"type":"number"},"clusterMinPoints":{"type":"number"},"clusterProperties":{"type":"*"},"lineMetrics":{"type":"boolean","default":false},"generateId":{"type":"boolean","default":false},"promoteId":{"type":"promoteId"}},"source_video":{"type":{"required":true,"type":"enum","values":{"video":1}},"urls":{"required":true,"type":"array","value":"string"},"coordinates":{"required":true,"type":"array","length":4,"value":{"type":"array","length":2,"value":"number"}}},"source_image":{"type":{"required":true,"type":"enum","values":{"image":1}},"url":{"required":false,"type":"string"},"coordinates":{"required":true,"type":"array","length":4,"value":{"type":"array","length":2,"value":"number"}}},"source_model":{"type":{"required":true,"type":"enum","values":{"model":1,"batched-model":1}},"maxzoom":{"type":"number","default":18},"minzoom":{"type":"number","default":0},"tiles":{"type":"array","value":"string"}},"layer":{"id":{"type":"string","required":true},"type":{"type":"enum","values":{"fill":{},"line":{},"symbol":{},"circle":{},"heatmap":{},"fill-extrusion":{},"raster":{},"hillshade":{},"model":{},"background":{},"sky":{},"slot":{}},"required":true},"metadata":{"type":"*"},"source":{"type":"string"},"source-layer":{"type":"string"},"slot":{"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_sky","layout_model"],"layout_background":{"visibility":{"type":"enum","values":{"visible":1,"none":1},"default":"visible","expression":{},"property-type":"constant"}},"layout_sky":{"visibility":{"type":"enum","values":{"visible":1,"none":1},"default":"visible","expression":{},"property-type":"constant"}},"layout_model":{"visibility":{"type":"enum","values":{"visible":1,"none":1},"default":"visible","expression":{},"property-type":"constant"},"model-id":{"type":"string","default":"","property-type":"data-driven","expression":{"parameters":["zoom","feature"]}}},"layout_fill":{"fill-sort-key":{"type":"number","expression":{"parameters":["zoom","feature"]},"property-type":"data-driven"},"visibility":{"type":"enum","values":{"visible":1,"none":1},"default":"visible","expression":{},"property-type":"constant"}},"layout_circle":{"circle-sort-key":{"type":"number","expression":{"parameters":["zoom","feature"]},"property-type":"data-driven"},"visibility":{"type":"enum","values":{"visible":1,"none":1},"default":"visible","expression":{},"property-type":"constant"}},"layout_heatmap":{"visibility":{"type":"enum","values":{"visible":1,"none":1},"default":"visible","expression":{},"property-type":"constant"}},"layout_fill-extrusion":{"visibility":{"type":"enum","values":{"visible":1,"none":1},"default":"visible","expression":{},"property-type":"constant"},"fill-extrusion-edge-radius":{"type":"number","private":true,"default":0,"minimum":0,"maximum":1,"expression":{},"property-type":"constant"}},"layout_line":{"line-cap":{"type":"enum","values":{"butt":1,"round":1,"square":1},"default":"butt","expression":{"parameters":["zoom","feature"]},"property-type":"data-driven"},"line-join":{"type":"enum","values":{"bevel":1,"round":1,"miter":1},"default":"miter","expression":{"parameters":["zoom","feature"]},"property-type":"data-driven"},"line-miter-limit":{"type":"number","default":2,"expression":{"interpolated":true,"parameters":["zoom"]},"property-type":"data-constant"},"line-round-limit":{"type":"number","default":1.05,"expression":{"interpolated":true,"parameters":["zoom"]},"property-type":"data-constant"},"line-sort-key":{"type":"number","expression":{"parameters":["zoom","feature"]},"property-type":"data-driven"},"visibility":{"type":"enum","values":{"visible":1,"none":1},"default":"visible","expression":{},"property-type":"constant"}},"layout_symbol":{"symbol-placement":{"type":"enum","values":{"point":1,"line":1,"line-center":1},"default":"point","expression":{"parameters":["zoom"]},"property-type":"data-constant"},"symbol-spacing":{"type":"number","default":250,"minimum":1,"expression":{"interpolated":true,"parameters":["zoom"]},"property-type":"data-constant"},"symbol-avoid-edges":{"type":"boolean","default":false,"expression":{"parameters":["zoom"]},"property-type":"data-constant"},"symbol-sort-key":{"type":"number","expression":{"parameters":["zoom","feature"]},"property-type":"data-driven"},"symbol-z-order":{"type":"enum","values":{"auto":1,"viewport-y":1,"source":1},"default":"auto","expression":{"parameters":["zoom"]},"property-type":"data-constant"},"symbol-z-elevate":{"type":"boolean","default":false,"expression":{"parameters":["zoom"]},"property-type":"data-constant"},"icon-allow-overlap":{"type":"boolean","default":false,"expression":{"parameters":["zoom"]},"property-type":"data-constant"},"icon-ignore-placement":{"type":"boolean","default":false,"expression":{"parameters":["zoom"]},"property-type":"data-constant"},"icon-optional":{"type":"boolean","default":false,"expression":{"parameters":["zoom"]},"property-type":"data-constant"},"icon-rotation-alignment":{"type":"enum","values":{"map":1,"viewport":1,"auto":1},"default":"auto","expression":{"parameters":["zoom"]},"property-type":"data-constant"},"icon-size":{"type":"number","default":1,"minimum":0,"expression":{"interpolated":true,"parameters":["zoom","feature"]},"property-type":"data-driven"},"icon-text-fit":{"type":"enum","values":{"none":1,"width":1,"height":1,"both":1},"default":"none","expression":{"parameters":["zoom","feature"]},"property-type":"data-driven"},"icon-text-fit-padding":{"type":"array","value":"number","length":4,"default":[0,0,0,0],"expression":{"interpolated":true,"parameters":["zoom","feature"]},"property-type":"data-driven"},"icon-image":{"type":"resolvedImage","tokens":true,"expression":{"parameters":["zoom","feature"]},"property-type":"data-driven"},"icon-rotate":{"type":"number","default":0,"period":360,"expression":{"interpolated":true,"parameters":["zoom","feature"]},"property-type":"data-driven"},"icon-padding":{"type":"number","default":2,"minimum":0,"expression":{"interpolated":true,"parameters":["zoom"]},"property-type":"data-constant"},"icon-keep-upright":{"type":"boolean","default":false,"expression":{"parameters":["zoom"]},"property-type":"data-constant"},"icon-offset":{"type":"array","value":"number","length":2,"default":[0,0],"expression":{"interpolated":true,"parameters":["zoom","feature"]},"property-type":"data-driven"},"icon-anchor":{"type":"enum","values":{"center":1,"left":1,"right":1,"top":1,"bottom":1,"top-left":1,"top-right":1,"bottom-left":1,"bottom-right":1},"default":"center","expression":{"parameters":["zoom","feature"]},"property-type":"data-driven"},"icon-pitch-alignment":{"type":"enum","values":{"map":1,"viewport":1,"auto":1},"default":"auto","expression":{"parameters":["zoom"]},"property-type":"data-constant"},"text-pitch-alignment":{"type":"enum","values":{"map":1,"viewport":1,"auto":1},"default":"auto","expression":{"parameters":["zoom"]},"property-type":"data-constant"},"text-rotation-alignment":{"type":"enum","values":{"map":1,"viewport":1,"auto":1},"default":"auto","expression":{"parameters":["zoom"]},"property-type":"data-constant"},"text-field":{"type":"formatted","default":"","tokens":true,"expression":{"parameters":["zoom","feature"]},"property-type":"data-driven"},"text-font":{"type":"array","value":"string","default":["Open Sans Regular","Arial Unicode MS Regular"],"expression":{"parameters":["zoom","feature"]},"property-type":"data-driven"},"text-size":{"type":"number","default":16,"minimum":0,"expression":{"interpolated":true,"parameters":["zoom","feature"]},"property-type":"data-driven"},"text-max-width":{"type":"number","default":10,"minimum":0,"expression":{"interpolated":true,"parameters":["zoom","feature"]},"property-type":"data-driven"},"text-line-height":{"type":"number","default":1.2,"expression":{"interpolated":true,"parameters":["zoom","feature"]},"property-type":"data-driven"},"text-letter-spacing":{"type":"number","default":0,"expression":{"interpolated":true,"parameters":["zoom","feature"]},"property-type":"data-driven"},"text-justify":{"type":"enum","values":{"auto":1,"left":1,"center":1,"right":1},"default":"center","expression":{"parameters":["zoom","feature"]},"property-type":"data-driven"},"text-radial-offset":{"type":"number","default":0,"property-type":"data-driven","expression":{"interpolated":true,"parameters":["zoom","feature"]}},"text-variable-anchor":{"type":"array","value":"enum","values":{"center":1,"left":1,"right":1,"top":1,"bottom":1,"top-left":1,"top-right":1,"bottom-left":1,"bottom-right":1},"expression":{"parameters":["zoom"]},"property-type":"data-constant"},"text-anchor":{"type":"enum","values":{"center":1,"left":1,"right":1,"top":1,"bottom":1,"top-left":1,"top-right":1,"bottom-left":1,"bottom-right":1},"default":"center","expression":{"parameters":["zoom","feature"]},"property-type":"data-driven"},"text-max-angle":{"type":"number","default":45,"expression":{"interpolated":true,"parameters":["zoom"]},"property-type":"data-constant"},"text-writing-mode":{"type":"array","value":"enum","values":{"horizontal":1,"vertical":1},"expression":{"parameters":["zoom"]},"property-type":"data-constant"},"text-rotate":{"type":"number","default":0,"period":360,"expression":{"interpolated":true,"parameters":["zoom","feature"]},"property-type":"data-driven"},"text-padding":{"type":"number","default":2,"minimum":0,"expression":{"interpolated":true,"parameters":["zoom"]},"property-type":"data-constant"},"text-keep-upright":{"type":"boolean","default":true,"expression":{"parameters":["zoom"]},"property-type":"data-constant"},"text-transform":{"type":"enum","values":{"none":1,"uppercase":1,"lowercase":1},"default":"none","expression":{"parameters":["zoom","feature"]},"property-type":"data-driven"},"text-offset":{"type":"array","value":"number","length":2,"default":[0,0],"expression":{"interpolated":true,"parameters":["zoom","feature"]},"property-type":"data-driven"},"text-allow-overlap":{"type":"boolean","default":false,"expression":{"parameters":["zoom"]},"property-type":"data-constant"},"text-ignore-placement":{"type":"boolean","default":false,"expression":{"parameters":["zoom"]},"property-type":"data-constant"},"text-optional":{"type":"boolean","default":false,"expression":{"parameters":["zoom"]},"property-type":"data-constant"},"visibility":{"type":"enum","values":{"visible":1,"none":1},"default":"visible","expression":{},"property-type":"constant"}},"layout_raster":{"visibility":{"type":"enum","values":{"visible":1,"none":1},"default":"visible","expression":{},"property-type":"constant"}},"layout_hillshade":{"visibility":{"type":"enum","values":{"visible":1,"none":1},"default":"visible","expression":{},"property-type":"constant"}},"filter":{"type":"array","value":"*"},"filter_symbol":{"type":"boolean","default":false,"property-type":"data-driven","expression":{"parameters":["zoom","feature","pitch","distance-from-center"]}},"filter_fill":{"type":"boolean","default":false,"property-type":"data-driven","expression":{"parameters":["zoom","feature"]}},"filter_line":{"type":"boolean","default":false,"property-type":"data-driven","expression":{"parameters":["zoom","feature"]}},"filter_circle":{"type":"boolean","default":false,"property-type":"data-driven","expression":{"parameters":["zoom","feature"]}},"filter_fill-extrusion":{"type":"boolean","default":false,"property-type":"data-driven","expression":{"parameters":["zoom","feature"]}},"filter_heatmap":{"type":"boolean","default":false,"property-type":"data-driven","expression":{"parameters":["zoom","feature"]}},"filter_operator":{"type":"enum","values":{"==":1,"!=":1,">":1,">=":1,"<":1,"<=":1,"in":1,"!in":1,"all":1,"any":1,"none":1,"has":1,"!has":1}},"geometry_type":{"type":"enum","values":{"Point":1,"LineString":1,"Polygon":1}},"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":1,"exponential":1,"interval":1,"categorical":1},"default":"exponential"},"colorSpace":{"type":"enum","values":{"rgb":1,"lab":1,"hcl":1},"default":"rgb"},"default":{"type":"*","required":false}},"function_stop":{"type":"array","minimum":0,"maximum":24,"value":["number","color"],"length":2},"expression":{"type":"array","value":"*","minimum":1},"fog":{"range":{"type":"array","default":[0.5,10],"minimum":-20,"maximum":20,"length":2,"value":"number","property-type":"data-constant","transition":true,"expression":{"interpolated":true,"parameters":["zoom","measure-light"],"relaxZoomRestriction":true}},"color":{"type":"color","property-type":"data-constant","default":"#ffffff","expression":{"interpolated":true,"parameters":["zoom","measure-light"],"relaxZoomRestriction":true},"transition":true},"high-color":{"type":"color","property-type":"data-constant","default":"#245cdf","expression":{"interpolated":true,"parameters":["zoom","measure-light"],"relaxZoomRestriction":true},"transition":true},"space-color":{"type":"color","property-type":"data-constant","default":["interpolate",["linear"],["zoom"],4,"#010b19",7,"#367ab9"],"expression":{"interpolated":true,"parameters":["zoom","measure-light"],"relaxZoomRestriction":true},"transition":true},"horizon-blend":{"type":"number","property-type":"data-constant","default":["interpolate",["linear"],["zoom"],4,0.2,7,0.1],"minimum":0,"maximum":1,"expression":{"interpolated":true,"parameters":["zoom","measure-light"],"relaxZoomRestriction":true},"transition":true},"star-intensity":{"type":"number","property-type":"data-constant","default":["interpolate",["linear"],["zoom"],5,0.35,6,0],"minimum":0,"maximum":1,"expression":{"interpolated":true,"parameters":["zoom","measure-light"],"relaxZoomRestriction":true},"transition":true},"vertical-range":{"type":"array","default":[0,0],"minimum":0,"length":2,"value":"number","property-type":"data-constant","transition":true,"expression":{"interpolated":true,"parameters":["zoom","measure-light"],"relaxZoomRestriction":true}}},"camera":{"camera-projection":{"type":"enum","values":{"perspective":1,"orthographic":1},"transition":true,"expression":{"interpolated":true,"parameters":["zoom"]},"default":"perspective","property-type":"data-constant"}},"light":{"anchor":{"type":"enum","default":"viewport","values":{"map":1,"viewport":1},"property-type":"data-constant","expression":{"parameters":["zoom"]}},"position":{"type":"array","default":[1.15,210,30],"length":3,"value":"number","property-type":"data-constant","transition":true,"expression":{"interpolated":true,"parameters":["zoom"]}},"color":{"type":"color","property-type":"data-constant","default":"#ffffff","expression":{"interpolated":true,"parameters":["zoom"]},"transition":true},"intensity":{"type":"number","property-type":"data-constant","default":0.5,"minimum":0,"maximum":1,"expression":{"interpolated":true,"parameters":["zoom"]},"transition":true}},"projection":{"name":{"type":"enum","values":{"albers":1,"equalEarth":1,"equirectangular":1,"lambertConformalConic":1,"mercator":1,"naturalEarth":1,"winkelTripel":1,"globe":1},"default":"mercator","required":true},"center":{"type":"array","length":2,"value":"number","property-type":"data-constant","minimum":[-180,-90],"maximum":[180,90]},"parallels":{"type":"array","length":2,"value":"number","property-type":"data-constant","minimum":[-90,-90],"maximum":[90,90]}},"terrain":{"source":{"type":"string","required":true},"exaggeration":{"type":"number","property-type":"data-constant","default":1,"minimum":0,"maximum":1000,"expression":{"interpolated":true,"parameters":["zoom"]},"transition":true}},"paint":["paint_fill","paint_line","paint_circle","paint_heatmap","paint_fill-extrusion","paint_symbol","paint_raster","paint_hillshade","paint_background","paint_sky","paint_model"],"paint_fill":{"fill-antialias":{"type":"boolean","default":true,"expression":{"parameters":["zoom"]},"property-type":"data-constant"},"fill-opacity":{"type":"number","default":1,"minimum":0,"maximum":1,"transition":true,"expression":{"interpolated":true,"parameters":["zoom","feature","feature-state","measure-light"]},"property-type":"data-driven"},"fill-color":{"type":"color","default":"#000000","transition":true,"expression":{"interpolated":true,"parameters":["zoom","feature","feature-state","measure-light"]},"property-type":"data-driven"},"fill-outline-color":{"type":"color","transition":true,"expression":{"interpolated":true,"parameters":["zoom","feature","feature-state","measure-light"]},"property-type":"data-driven"},"fill-translate":{"type":"array","value":"number","length":2,"default":[0,0],"transition":true,"expression":{"interpolated":true,"parameters":["zoom"]},"property-type":"data-constant"},"fill-translate-anchor":{"type":"enum","values":{"map":1,"viewport":1},"default":"map","expression":{"parameters":["zoom"]},"property-type":"data-constant"},"fill-pattern":{"type":"resolvedImage","expression":{"parameters":["zoom","feature"]},"property-type":"data-driven"},"fill-emissive-strength":{"type":"number","default":0,"minimum":0,"transition":true,"expression":{"interpolated":true,"parameters":["zoom","measure-light"]},"property-type":"data-constant"}},"paint_fill-extrusion":{"fill-extrusion-opacity":{"type":"number","default":1,"minimum":0,"maximum":1,"transition":true,"expression":{"interpolated":true,"parameters":["zoom"]},"property-type":"data-constant"},"fill-extrusion-color":{"type":"color","default":"#000000","transition":true,"expression":{"interpolated":true,"parameters":["zoom","feature","feature-state","measure-light"]},"property-type":"data-driven"},"fill-extrusion-translate":{"type":"array","value":"number","length":2,"default":[0,0],"transition":true,"expression":{"interpolated":true,"parameters":["zoom"]},"property-type":"data-constant"},"fill-extrusion-translate-anchor":{"type":"enum","values":{"map":1,"viewport":1},"default":"map","expression":{"parameters":["zoom"]},"property-type":"data-constant"},"fill-extrusion-pattern":{"type":"resolvedImage","expression":{"parameters":["zoom","feature"]},"property-type":"data-driven"},"fill-extrusion-height":{"type":"number","default":0,"minimum":0,"transition":true,"expression":{"interpolated":true,"parameters":["zoom","feature","feature-state"]},"property-type":"data-driven"},"fill-extrusion-base":{"type":"number","default":0,"minimum":0,"transition":true,"expression":{"interpolated":true,"parameters":["zoom","feature","feature-state"]},"property-type":"data-driven"},"fill-extrusion-vertical-gradient":{"type":"boolean","default":true,"expression":{"parameters":["zoom"]},"property-type":"data-constant"},"fill-extrusion-ambient-occlusion-intensity":{"property-type":"data-constant","type":"number","private":true,"default":0,"minimum":0,"maximum":1,"expression":{"interpolated":true,"parameters":["zoom"]},"transition":true},"fill-extrusion-ambient-occlusion-radius":{"property-type":"data-constant","type":"number","private":true,"default":3,"minimum":0,"expression":{"interpolated":true,"parameters":["zoom"]},"transition":true},"fill-extrusion-ambient-occlusion-wall-radius":{"property-type":"data-constant","type":"number","default":3,"minimum":0,"expression":{"interpolated":true,"parameters":["zoom"]},"transition":true},"fill-extrusion-ambient-occlusion-ground-radius":{"property-type":"data-constant","type":"number","default":3,"minimum":0,"expression":{"interpolated":true,"parameters":["zoom"]},"transition":true},"fill-extrusion-ambient-occlusion-ground-attenuation":{"property-type":"data-constant","type":"number","default":0.69,"minimum":0,"maximum":1,"transition":true,"expression":{"interpolated":true,"parameters":["zoom"]}},"fill-extrusion-flood-light-color":{"property-type":"data-constant","type":"color","default":"#ffffff","transition":true,"expression":{"interpolated":true,"parameters":["zoom","measure-light"]}},"fill-extrusion-flood-light-intensity":{"property-type":"data-constant","type":"number","default":0,"minimum":0,"maximum":1,"transition":true,"expression":{"interpolated":true,"parameters":["zoom","measure-light"]}},"fill-extrusion-flood-light-wall-radius":{"property-type":"data-driven","type":"number","default":0,"minimum":0,"transition":true,"expression":{"interpolated":true,"parameters":["feature","feature-state"]}},"fill-extrusion-flood-light-ground-radius":{"property-type":"data-driven","type":"number","default":0,"minimum":0,"transition":true,"expression":{"interpolated":true,"parameters":["feature","feature-state"]}},"fill-extrusion-flood-light-ground-attenuation":{"property-type":"data-constant","type":"number","default":0.69,"minimum":0,"maximum":1,"transition":true,"expression":{"interpolated":true,"parameters":["zoom"]}},"fill-extrusion-vertical-scale":{"property-type":"data-constant","type":"number","default":1,"minimum":0,"transition":true,"expression":{"interpolated":true,"parameters":["zoom"]}},"fill-extrusion-rounded-roof":{"property-type":"data-constant","type":"boolean","default":true,"expression":{"parameters":["zoom"]}},"fill-extrusion-cutoff-fade-range":{"type":"number","default":0,"minimum":0,"maximum":1,"expression":{},"property-type":"data-constant"},"fill-extrusion-emissive-strength":{"type":"number","default":0,"minimum":0,"transition":true,"expression":{"interpolated":true,"parameters":["zoom","measure-light"]},"property-type":"data-constant"}},"paint_line":{"line-opacity":{"type":"number","default":1,"minimum":0,"maximum":1,"transition":true,"expression":{"interpolated":true,"parameters":["zoom","feature","feature-state","measure-light"]},"property-type":"data-driven"},"line-color":{"type":"color","default":"#000000","transition":true,"expression":{"interpolated":true,"parameters":["zoom","feature","feature-state","measure-light"]},"property-type":"data-driven"},"line-translate":{"type":"array","value":"number","length":2,"default":[0,0],"transition":true,"expression":{"interpolated":true,"parameters":["zoom"]},"property-type":"data-constant"},"line-translate-anchor":{"type":"enum","values":{"map":1,"viewport":1},"default":"map","expression":{"parameters":["zoom"]},"property-type":"data-constant"},"line-width":{"type":"number","default":1,"minimum":0,"transition":true,"expression":{"interpolated":true,"parameters":["zoom","feature","feature-state","measure-light"]},"property-type":"data-driven"},"line-gap-width":{"type":"number","default":0,"minimum":0,"transition":true,"expression":{"interpolated":true,"parameters":["zoom","feature","feature-state","measure-light"]},"property-type":"data-driven"},"line-offset":{"type":"number","default":0,"transition":true,"expression":{"interpolated":true,"parameters":["zoom","feature","feature-state","measure-light"]},"property-type":"data-driven"},"line-blur":{"type":"number","default":0,"minimum":0,"transition":true,"expression":{"interpolated":true,"parameters":["zoom","feature","feature-state","measure-light"]},"property-type":"data-driven"},"line-dasharray":{"type":"array","value":"number","minimum":0,"expression":{"parameters":["zoom","feature"]},"property-type":"data-driven"},"line-pattern":{"type":"resolvedImage","expression":{"parameters":["zoom","feature"]},"property-type":"data-driven"},"line-gradient":{"type":"color","expression":{"interpolated":true,"parameters":["line-progress"]},"property-type":"color-ramp"},"line-trim-offset":{"type":"array","value":"number","length":2,"default":[0,0],"minimum":[0,0],"maximum":[1,1],"property-type":"constant"},"line-emissive-strength":{"type":"number","default":0,"minimum":0,"transition":true,"expression":{"interpolated":true,"parameters":["zoom","measure-light"]},"property-type":"data-constant"},"line-border-width":{"type":"number","private":true,"default":0,"minimum":0,"transition":true,"expression":{"interpolated":true,"parameters":["zoom","feature","feature-state"]},"property-type":"data-driven"},"line-border-color":{"type":"color","private":true,"default":"rgba(0, 0, 0, 0)","transition":true,"expression":{"interpolated":true,"parameters":["zoom","feature","feature-state"]},"property-type":"data-driven"}},"paint_circle":{"circle-radius":{"type":"number","default":5,"minimum":0,"transition":true,"expression":{"interpolated":true,"parameters":["zoom","feature","feature-state","measure-light"]},"property-type":"data-driven"},"circle-color":{"type":"color","default":"#000000","transition":true,"expression":{"interpolated":true,"parameters":["zoom","feature","feature-state","measure-light"]},"property-type":"data-driven"},"circle-blur":{"type":"number","default":0,"transition":true,"expression":{"interpolated":true,"parameters":["zoom","feature","feature-state","measure-light"]},"property-type":"data-driven"},"circle-opacity":{"type":"number","default":1,"minimum":0,"maximum":1,"transition":true,"expression":{"interpolated":true,"parameters":["zoom","feature","feature-state","measure-light"]},"property-type":"data-driven"},"circle-translate":{"type":"array","value":"number","length":2,"default":[0,0],"transition":true,"expression":{"interpolated":true,"parameters":["zoom"]},"property-type":"data-constant"},"circle-translate-anchor":{"type":"enum","values":{"map":1,"viewport":1},"default":"map","expression":{"parameters":["zoom"]},"property-type":"data-constant"},"circle-pitch-scale":{"type":"enum","values":{"map":1,"viewport":1},"default":"map","expression":{"parameters":["zoom"]},"property-type":"data-constant"},"circle-pitch-alignment":{"type":"enum","values":{"map":1,"viewport":1},"default":"viewport","expression":{"parameters":["zoom"]},"property-type":"data-constant"},"circle-stroke-width":{"type":"number","default":0,"minimum":0,"transition":true,"expression":{"interpolated":true,"parameters":["zoom","feature","feature-state","measure-light"]},"property-type":"data-driven"},"circle-stroke-color":{"type":"color","default":"#000000","transition":true,"expression":{"interpolated":true,"parameters":["zoom","feature","feature-state","measure-light"]},"property-type":"data-driven"},"circle-stroke-opacity":{"type":"number","default":1,"minimum":0,"maximum":1,"transition":true,"expression":{"interpolated":true,"parameters":["zoom","feature","feature-state","measure-light"]},"property-type":"data-driven"},"circle-emissive-strength":{"type":"number","default":0,"minimum":0,"transition":true,"expression":{"interpolated":true,"parameters":["zoom","measure-light"]},"property-type":"data-constant"}},"paint_heatmap":{"heatmap-radius":{"type":"number","default":30,"minimum":1,"transition":true,"expression":{"interpolated":true,"parameters":["zoom","feature","feature-state","measure-light"]},"property-type":"data-driven"},"heatmap-weight":{"type":"number","default":1,"minimum":0,"expression":{"interpolated":true,"parameters":["zoom","feature","feature-state","measure-light"]},"property-type":"data-driven"},"heatmap-intensity":{"type":"number","default":1,"minimum":0,"transition":true,"expression":{"interpolated":true,"parameters":["zoom"]},"property-type":"data-constant"},"heatmap-color":{"type":"color","default":["interpolate",["linear"],["heatmap-density"],0,"rgba(0, 0, 255, 0)",0.1,"royalblue",0.3,"cyan",0.5,"lime",0.7,"yellow",1,"red"],"expression":{"interpolated":true,"parameters":["heatmap-density"]},"property-type":"color-ramp"},"heatmap-opacity":{"type":"number","default":1,"minimum":0,"maximum":1,"transition":true,"expression":{"interpolated":true,"parameters":["zoom"]},"property-type":"data-constant"}},"paint_symbol":{"icon-opacity":{"type":"number","default":1,"minimum":0,"maximum":1,"transition":true,"expression":{"interpolated":true,"parameters":["zoom","feature","feature-state","measure-light"]},"property-type":"data-driven"},"icon-emissive-strength":{"type":"number","default":1,"minimum":0,"transition":true,"expression":{"interpolated":true,"parameters":["zoom","measure-light"]},"property-type":"data-driven"},"text-emissive-strength":{"type":"number","default":1,"minimum":0,"transition":true,"expression":{"interpolated":true,"parameters":["zoom","measure-light"]},"property-type":"data-driven"},"icon-color":{"type":"color","default":"#000000","transition":true,"expression":{"interpolated":true,"parameters":["zoom","feature","feature-state","measure-light"]},"property-type":"data-driven"},"icon-halo-color":{"type":"color","default":"rgba(0, 0, 0, 0)","transition":true,"expression":{"interpolated":true,"parameters":["zoom","feature","feature-state","measure-light"]},"property-type":"data-driven"},"icon-halo-width":{"type":"number","default":0,"minimum":0,"transition":true,"expression":{"interpolated":true,"parameters":["zoom","feature","feature-state","measure-light"]},"property-type":"data-driven"},"icon-halo-blur":{"type":"number","default":0,"minimum":0,"transition":true,"expression":{"interpolated":true,"parameters":["zoom","feature","feature-state","measure-light"]},"property-type":"data-driven"},"icon-translate":{"type":"array","value":"number","length":2,"default":[0,0],"transition":true,"expression":{"interpolated":true,"parameters":["zoom"]},"property-type":"data-constant"},"icon-translate-anchor":{"type":"enum","values":{"map":1,"viewport":1},"default":"map","expression":{"parameters":["zoom"]},"property-type":"data-constant"},"icon-image-cross-fade":{"type":"number","property-type":"data-driven","default":0,"minimum":0,"maximum":1,"expression":{"interpolated":true,"parameters":["zoom","feature","feature-state","measure-light"]},"transition":true},"text-opacity":{"type":"number","default":1,"minimum":0,"maximum":1,"transition":true,"expression":{"interpolated":true,"parameters":["zoom","feature","feature-state","measure-light"]},"property-type":"data-driven"},"text-color":{"type":"color","default":"#000000","transition":true,"overridable":true,"expression":{"interpolated":true,"parameters":["zoom","feature","feature-state","measure-light"]},"property-type":"data-driven"},"text-halo-color":{"type":"color","default":"rgba(0, 0, 0, 0)","transition":true,"expression":{"interpolated":true,"parameters":["zoom","feature","feature-state","measure-light"]},"property-type":"data-driven"},"text-halo-width":{"type":"number","default":0,"minimum":0,"transition":true,"expression":{"interpolated":true,"parameters":["zoom","feature","feature-state","measure-light"]},"property-type":"data-driven"},"text-halo-blur":{"type":"number","default":0,"minimum":0,"transition":true,"expression":{"interpolated":true,"parameters":["zoom","feature","feature-state","measure-light"]},"property-type":"data-driven"},"text-translate":{"type":"array","value":"number","length":2,"default":[0,0],"transition":true,"expression":{"interpolated":true,"parameters":["zoom"]},"property-type":"data-constant"},"text-translate-anchor":{"type":"enum","values":{"map":1,"viewport":1},"default":"map","expression":{"parameters":["zoom"]},"property-type":"data-constant"},"icon-color-saturation":{"type":"number","default":1,"minimum":0,"maximum":1,"transition":true,"expression":{},"property-type":"data-constant"}},"paint_raster":{"raster-opacity":{"type":"number","default":1,"minimum":0,"maximum":1,"transition":true,"expression":{"interpolated":true,"parameters":["zoom"]},"property-type":"data-constant"},"raster-color":{"type":"color","expression":{"interpolated":true,"parameters":["raster-value"]},"property-type":"color-ramp"},"raster-color-mix":{"type":"array","default":[0.2126,0.7152,0.0722,0],"length":4,"value":"number","property-type":"data-constant","transition":true,"expression":{"interpolated":true,"parameters":["zoom"]}},"raster-color-range":{"type":"array","default":[0,1],"length":2,"value":"number","property-type":"data-constant","transition":true,"expression":{"interpolated":true,"parameters":["zoom"]}},"raster-hue-rotate":{"type":"number","default":0,"period":360,"transition":true,"expression":{"interpolated":true,"parameters":["zoom"]},"property-type":"data-constant"},"raster-brightness-min":{"type":"number","default":0,"minimum":0,"maximum":1,"transition":true,"expression":{"interpolated":true,"parameters":["zoom"]},"property-type":"data-constant"},"raster-brightness-max":{"type":"number","default":1,"minimum":0,"maximum":1,"transition":true,"expression":{"interpolated":true,"parameters":["zoom"]},"property-type":"data-constant"},"raster-saturation":{"type":"number","default":0,"minimum":-1,"maximum":1,"transition":true,"expression":{"interpolated":true,"parameters":["zoom"]},"property-type":"data-constant"},"raster-contrast":{"type":"number","default":0,"minimum":-1,"maximum":1,"transition":true,"expression":{"interpolated":true,"parameters":["zoom"]},"property-type":"data-constant"},"raster-resampling":{"type":"enum","values":{"linear":1,"nearest":1},"default":"linear","expression":{"parameters":["zoom"]},"property-type":"data-constant"},"raster-fade-duration":{"type":"number","default":300,"minimum":0,"expression":{"interpolated":true,"parameters":["zoom"]},"property-type":"data-constant"},"raster-emissive-strength":{"type":"number","default":0,"minimum":0,"transition":true,"expression":{"interpolated":true,"parameters":["zoom","measure-light"]},"property-type":"data-constant"},"raster-array-band":{"type":"string","required":false,"property-type":"data-constant"},"raster-elevation":{"type":"number","default":0,"minimum":0,"transition":true,"expression":{"interpolated":true,"parameters":["zoom"]},"property-type":"data-constant"}},"paint_hillshade":{"hillshade-illumination-direction":{"type":"number","default":335,"minimum":0,"maximum":359,"expression":{"interpolated":true,"parameters":["zoom"]},"property-type":"data-constant"},"hillshade-illumination-anchor":{"type":"enum","values":{"map":1,"viewport":1},"default":"viewport","expression":{"parameters":["zoom"]},"property-type":"data-constant"},"hillshade-exaggeration":{"type":"number","default":0.5,"minimum":0,"maximum":1,"transition":true,"expression":{"interpolated":true,"parameters":["zoom"]},"property-type":"data-constant"},"hillshade-shadow-color":{"type":"color","default":"#000000","transition":true,"expression":{"interpolated":true,"parameters":["zoom","measure-light"]},"property-type":"data-constant"},"hillshade-highlight-color":{"type":"color","default":"#FFFFFF","transition":true,"expression":{"interpolated":true,"parameters":["zoom","measure-light"]},"property-type":"data-constant"},"hillshade-accent-color":{"type":"color","default":"#000000","transition":true,"expression":{"interpolated":true,"parameters":["zoom","measure-light"]},"property-type":"data-constant"},"hillshade-emissive-strength":{"type":"number","default":0,"minimum":0,"transition":true,"expression":{"interpolated":true,"parameters":["zoom","measure-light"]},"property-type":"data-constant"}},"paint_background":{"background-color":{"type":"color","default":"#000000","transition":true,"expression":{"interpolated":true,"parameters":["zoom"]},"property-type":"data-constant"},"background-pattern":{"type":"resolvedImage","expression":{"parameters":["zoom"]},"property-type":"data-constant"},"background-opacity":{"type":"number","default":1,"minimum":0,"maximum":1,"transition":true,"expression":{"interpolated":true,"parameters":["zoom"]},"property-type":"data-constant"},"background-emissive-strength":{"type":"number","default":0,"minimum":0,"transition":true,"expression":{"interpolated":true,"parameters":["zoom","measure-light"]},"property-type":"data-constant"}},"paint_sky":{"sky-type":{"type":"enum","values":{"gradient":1,"atmosphere":1},"default":"atmosphere","expression":{"parameters":["zoom"]},"property-type":"data-constant"},"sky-atmosphere-sun":{"type":"array","value":"number","length":2,"minimum":[0,0],"maximum":[360,180],"expression":{"parameters":["zoom"]},"property-type":"data-constant"},"sky-atmosphere-sun-intensity":{"type":"number","default":10,"minimum":0,"maximum":100,"property-type":"data-constant"},"sky-gradient-center":{"type":"array","value":"number","default":[0,0],"length":2,"minimum":[0,0],"maximum":[360,180],"expression":{"parameters":["zoom"]},"property-type":"data-constant"},"sky-gradient-radius":{"type":"number","default":90,"minimum":0,"maximum":180,"expression":{"parameters":["zoom"]},"property-type":"data-constant"},"sky-gradient":{"type":"color","default":["interpolate",["linear"],["sky-radial-progress"],0.8,"#87ceeb",1,"white"],"expression":{"interpolated":true,"parameters":["sky-radial-progress"]},"property-type":"color-ramp"},"sky-atmosphere-halo-color":{"type":"color","default":"white","property-type":"data-constant"},"sky-atmosphere-color":{"type":"color","default":"white","property-type":"data-constant"},"sky-opacity":{"type":"number","default":1,"minimum":0,"maximum":1,"transition":true,"expression":{"interpolated":true,"parameters":["zoom"]},"property-type":"data-constant"}},"paint_model":{"model-opacity":{"type":"number","default":1,"minimum":0,"maximum":1,"transition":true,"expression":{"interpolated":true,"parameters":["zoom"]},"property-type":"data-constant"},"model-rotation":{"type":"array","value":"number","length":3,"default":[0,0,0],"period":360,"property-type":"data-driven","expression":{"interpolated":true,"parameters":["feature","feature-state","zoom"]},"transition":true},"model-scale":{"type":"array","value":"number","length":3,"default":[1,1,1],"property-type":"data-driven","expression":{"interpolated":true,"parameters":["feature","feature-state","zoom"]},"transition":true},"model-translation":{"type":"array","value":"number","length":3,"default":[0,0,0],"property-type":"data-driven","expression":{"interpolated":true,"parameters":["feature","feature-state","zoom"]},"transition":true},"model-color":{"type":"color","default":"#ffffff","property-type":"data-driven","expression":{"interpolated":true,"parameters":["feature","feature-state","measure-light","zoom"]},"transition":true},"model-color-mix-intensity":{"type":"number","property-type":"data-driven","default":0,"minimum":0,"maximum":1,"expression":{"interpolated":true,"parameters":["feature","feature-state","measure-light"]},"transition":true},"model-type":{"type":"enum","values":{"common-3d":1,"location-indicator":1},"default":"common-3d","property-type":"data-constant"},"model-cast-shadows":{"type":"boolean","default":true,"expression":{},"property-type":"data-constant"},"model-receive-shadows":{"type":"boolean","default":true,"expression":{},"property-type":"data-constant"},"model-ambient-occlusion-intensity":{"type":"number","default":1,"minimum":0,"maximum":1,"expression":{"interpolated":true,"parameters":["zoom"]},"property-type":"data-constant","transition":true},"model-emissive-strength":{"type":"number","property-type":"data-driven","default":0,"minimum":0,"maximum":5,"expression":{"interpolated":true,"parameters":["feature","feature-state","measure-light"]},"transition":true},"model-roughness":{"type":"number","default":1,"minimum":0,"maximum":1,"property-type":"data-driven","expression":{"interpolated":true,"parameters":["feature","feature-state"]},"transition":true},"model-height-based-emissive-strength-multiplier":{"type":"array","default":[1,1,1,1,0],"length":5,"value":"number","property-type":"data-driven","expression":{"interpolated":true,"parameters":["feature","feature-state","measure-light"]},"transition":true},"model-cutoff-fade-range":{"type":"number","default":0,"minimum":0,"maximum":1,"expression":{},"property-type":"data-constant"}},"transition":{"duration":{"type":"number","default":300,"minimum":0},"delay":{"type":"number","default":0,"minimum":0}},"property-type":{"data-driven":{"type":"property-type"},"color-ramp":{"type":"property-type"},"data-constant":{"type":"property-type"},"constant":{"type":"property-type"}},"promoteId":{"*":{"type":"string"}}}');class Oe{constructor(e,i,r,o){this.message=(e?`${e}: `:"")+r,o&&(this.identifier=o),i!=null&&i.__line__&&(this.line=i.__line__)}}class Es extends Oe{}function ln(t,...e){for(const i of e)for(const r in i)t[r]=i[r];return t}function Gi(t){return t instanceof Number||t instanceof String||t instanceof Boolean?t.valueOf():t}function cn(t){if(Array.isArray(t))return t.map(cn);if(t instanceof Object&&!(t instanceof Number||t instanceof String||t instanceof Boolean)){const e={};for(const i in t)e[i]=cn(t[i]);return e}return Gi(t)}class XE extends Error{constructor(e,i){super(i),this.message=i,this.key=e}}var Oo=XE;class Xd{constructor(e,i=[]){this.parent=e,this.bindings={};for(const[r,o]of i)this.bindings[r]=o}concat(e){return new Xd(this,e)}get(e){if(this.bindings[e])return this.bindings[e];if(this.parent)return this.parent.get(e);throw new Error(`${e} not found in scope.`)}has(e){return!!this.bindings[e]||!!this.parent&&this.parent.has(e)}}var YE=Xd;const da={kind:"null"},ze={kind:"number"},Ft={kind:"string"},Ut={kind:"boolean"},ao={kind:"color"},pa={kind:"object"},jt={kind:"value"},Wc={kind:"collator"},_l={kind:"formatted"},gl={kind:"resolvedImage"};function zr(t,e){return{kind:"array",itemType:t,N:e}}function Ni(t){if(t.kind==="array"){const e=Ni(t.itemType);return typeof t.N=="number"?`array<${e}, ${t.N}>`:t.itemType.kind==="value"?"array":`array<${e}>`}return t.kind}const KE=[da,ze,Ft,Ut,ao,_l,pa,zr(jt),gl];function yl(t,e){if(e.kind==="error")return null;if(t.kind==="array"){if(e.kind==="array"&&(e.N===0&&e.itemType.kind==="value"||!yl(t.itemType,e.itemType))&&(typeof t.N!="number"||t.N===e.N))return null}else{if(t.kind===e.kind)return null;if(t.kind==="value"){for(const i of KE)if(!yl(i,e))return null}}return`Expected ${Ni(t)} but found ${Ni(e)} instead.`}function Yd(t,e){return e.some(i=>i.kind===t.kind)}function vl(t,e){return e.some(i=>i==="null"?t===null:i==="array"?Array.isArray(t):i==="object"?t&&!Array.isArray(t)&&typeof t=="object":i===typeof t)}var Kd,Vg={transparent:[0,0,0,0],aliceblue:[240,248,255,1],antiquewhite:[250,235,215,1],aqua:[0,255,255,1],aquamarine:[127,255,212,1],azure:[240,255,255,1],beige:[245,245,220,1],bisque:[255,228,196,1],black:[0,0,0,1],blanchedalmond:[255,235,205,1],blue:[0,0,255,1],blueviolet:[138,43,226,1],brown:[165,42,42,1],burlywood:[222,184,135,1],cadetblue:[95,158,160,1],chartreuse:[127,255,0,1],chocolate:[210,105,30,1],coral:[255,127,80,1],cornflowerblue:[100,149,237,1],cornsilk:[255,248,220,1],crimson:[220,20,60,1],cyan:[0,255,255,1],darkblue:[0,0,139,1],darkcyan:[0,139,139,1],darkgoldenrod:[184,134,11,1],darkgray:[169,169,169,1],darkgreen:[0,100,0,1],darkgrey:[169,169,169,1],darkkhaki:[189,183,107,1],darkmagenta:[139,0,139,1],darkolivegreen:[85,107,47,1],darkorange:[255,140,0,1],darkorchid:[153,50,204,1],darkred:[139,0,0,1],darksalmon:[233,150,122,1],darkseagreen:[143,188,143,1],darkslateblue:[72,61,139,1],darkslategray:[47,79,79,1],darkslategrey:[47,79,79,1],darkturquoise:[0,206,209,1],darkviolet:[148,0,211,1],deeppink:[255,20,147,1],deepskyblue:[0,191,255,1],dimgray:[105,105,105,1],dimgrey:[105,105,105,1],dodgerblue:[30,144,255,1],firebrick:[178,34,34,1],floralwhite:[255,250,240,1],forestgreen:[34,139,34,1],fuchsia:[255,0,255,1],gainsboro:[220,220,220,1],ghostwhite:[248,248,255,1],gold:[255,215,0,1],goldenrod:[218,165,32,1],gray:[128,128,128,1],green:[0,128,0,1],greenyellow:[173,255,47,1],grey:[128,128,128,1],honeydew:[240,255,240,1],hotpink:[255,105,180,1],indianred:[205,92,92,1],indigo:[75,0,130,1],ivory:[255,255,240,1],khaki:[240,230,140,1],lavender:[230,230,250,1],lavenderblush:[255,240,245,1],lawngreen:[124,252,0,1],lemonchiffon:[255,250,205,1],lightblue:[173,216,230,1],lightcoral:[240,128,128,1],lightcyan:[224,255,255,1],lightgoldenrodyellow:[250,250,210,1],lightgray:[211,211,211,1],lightgreen:[144,238,144,1],lightgrey:[211,211,211,1],lightpink:[255,182,193,1],lightsalmon:[255,160,122,1],lightseagreen:[32,178,170,1],lightskyblue:[135,206,250,1],lightslategray:[119,136,153,1],lightslategrey:[119,136,153,1],lightsteelblue:[176,196,222,1],lightyellow:[255,255,224,1],lime:[0,255,0,1],limegreen:[50,205,50,1],linen:[250,240,230,1],magenta:[255,0,255,1],maroon:[128,0,0,1],mediumaquamarine:[102,205,170,1],mediumblue:[0,0,205,1],mediumorchid:[186,85,211,1],mediumpurple:[147,112,219,1],mediumseagreen:[60,179,113,1],mediumslateblue:[123,104,238,1],mediumspringgreen:[0,250,154,1],mediumturquoise:[72,209,204,1],mediumvioletred:[199,21,133,1],midnightblue:[25,25,112,1],mintcream:[245,255,250,1],mistyrose:[255,228,225,1],moccasin:[255,228,181,1],navajowhite:[255,222,173,1],navy:[0,0,128,1],oldlace:[253,245,230,1],olive:[128,128,0,1],olivedrab:[107,142,35,1],orange:[255,165,0,1],orangered:[255,69,0,1],orchid:[218,112,214,1],palegoldenrod:[238,232,170,1],palegreen:[152,251,152,1],paleturquoise:[175,238,238,1],palevioletred:[219,112,147,1],papayawhip:[255,239,213,1],peachpuff:[255,218,185,1],peru:[205,133,63,1],pink:[255,192,203,1],plum:[221,160,221,1],powderblue:[176,224,230,1],purple:[128,0,128,1],rebeccapurple:[102,51,153,1],red:[255,0,0,1],rosybrown:[188,143,143,1],royalblue:[65,105,225,1],saddlebrown:[139,69,19,1],salmon:[250,128,114,1],sandybrown:[244,164,96,1],seagreen:[46,139,87,1],seashell:[255,245,238,1],sienna:[160,82,45,1],silver:[192,192,192,1],skyblue:[135,206,235,1],slateblue:[106,90,205,1],slategray:[112,128,144,1],slategrey:[112,128,144,1],snow:[255,250,250,1],springgreen:[0,255,127,1],steelblue:[70,130,180,1],tan:[210,180,140,1],teal:[0,128,128,1],thistle:[216,191,216,1],tomato:[255,99,71,1],turquoise:[64,224,208,1],violet:[238,130,238,1],wheat:[245,222,179,1],white:[255,255,255,1],whitesmoke:[245,245,245,1],yellow:[255,255,0,1],yellowgreen:[154,205,50,1]};function Hc(t){return(t=Math.round(t))<0?0:t>255?255:t}function Jd(t){return Hc(t[t.length-1]==="%"?parseFloat(t)/100*255:parseInt(t))}function Zc(t){return(e=t[t.length-1]==="%"?parseFloat(t)/100:parseFloat(t))<0?0:e>1?1:e;var e}function Qd(t,e,i){return i<0?i+=1:i>1&&(i-=1),6*i<1?t+(e-t)*i*6:2*i<1?e:3*i<2?t+(e-t)*(2/3-i)*6:t}try{Kd={}.parseCSSColor=function(t){var e,i=t.replace(/ /g,"").toLowerCase();if(i in Vg)return Vg[i].slice();if(i[0]==="#")return i.length===4?(e=parseInt(i.substr(1),16))>=0&&e<=4095?[(3840&e)>>4|(3840&e)>>8,240&e|(240&e)>>4,15&e|(15&e)<<4,1]:null:i.length===7&&(e=parseInt(i.substr(1),16))>=0&&e<=16777215?[(16711680&e)>>16,(65280&e)>>8,255&e,1]:null;var r=i.indexOf("("),o=i.indexOf(")");if(r!==-1&&o+1===i.length){var n=i.substr(0,r),s=i.substr(r+1,o-(r+1)).split(","),a=1;switch(n){case"rgba":if(s.length!==4)return null;a=Zc(s.pop());case"rgb":return s.length!==3?null:[Jd(s[0]),Jd(s[1]),Jd(s[2]),a];case"hsla":if(s.length!==4)return null;a=Zc(s.pop());case"hsl":if(s.length!==3)return null;var l=(parseFloat(s[0])%360+360)%360/360,c=Zc(s[1]),u=Zc(s[2]),p=u<=.5?u*(c+1):u+c-u*c,f=2*u-p;return[Hc(255*Qd(f,p,l+1/3)),Hc(255*Qd(f,p,l)),Hc(255*Qd(f,p,l-1/3)),a];default:return null}}return null}}catch{}class Rr{constructor(e,i,r,o=1){this.r=e,this.g=i,this.b=r,this.a=o}static parse(e){if(!e)return;if(e instanceof Rr)return e;if(typeof e!="string")return;const i=Kd(e);return i?new Rr(i[0]/255*i[3],i[1]/255*i[3],i[2]/255*i[3],i[3]):void 0}toString(){const[e,i,r,o]=this.toArray();return`rgba(${Math.round(e)},${Math.round(i)},${Math.round(r)},${o})`}toArray(){const{r:e,g:i,b:r,a:o}=this;return o===0?[0,0,0,0]:[255*e/o,255*i/o,255*r/o,o]}toArray01(){const{r:e,g:i,b:r,a:o}=this;return o===0?[0,0,0,0]:[e/o,i/o,r/o,o]}toArray01Scaled(e){const{r:i,g:r,b:o,a:n}=this;return n===0?[0,0,0]:[i/n*e,r/n*e,o/n*e]}toArray01PremultipliedAlpha(){const{r:e,g:i,b:r,a:o}=this;return[e,i,r,o]}toArray01Linear(){const{r:e,g:i,b:r,a:o}=this;return o===0?[0,0,0,0]:[Math.pow(e/o,2.2),Math.pow(i/o,2.2),Math.pow(r/o,2.2),o]}}Rr.black=new Rr(0,0,0,1),Rr.white=new Rr(1,1,1,1),Rr.transparent=new Rr(0,0,0,0),Rr.red=new Rr(1,0,0,1),Rr.blue=new Rr(0,0,1,1);var bt=Rr;class ep{constructor(e,i,r){this.sensitivity=e?i?"variant":"case":i?"accent":"base",this.locale=r,this.collator=new Intl.Collator(this.locale?this.locale:[],{sensitivity:this.sensitivity,usage:"search"})}compare(e,i){return this.collator.compare(e,i)}resolvedLocale(){return new Intl.Collator(this.locale?this.locale:[]).resolvedOptions().locale}}class tp{constructor(e,i,r,o,n){this.text=e.normalize?e.normalize():e,this.image=i,this.scale=r,this.fontStack=o,this.textColor=n}}class Lr{constructor(e){this.sections=e}static fromString(e){return new Lr([new tp(e,null,null,null,null)])}isEmpty(){return this.sections.length===0||!this.sections.some(e=>e.text.length!==0||e.image&&e.image.namePrimary.length!==0)}static factory(e){return e instanceof Lr?e:Lr.fromString(e)}toString(){return this.sections.length===0?"":this.sections.map(e=>e.text).join("")}serialize(){const e=["format"];for(const i of this.sections){if(i.image){e.push(["image",i.image.namePrimary]);continue}e.push(i.text);const r={};i.fontStack&&(r["text-font"]=["literal",i.fontStack.split(",")]),i.scale&&(r["font-scale"]=i.scale),i.textColor&&(r["text-color"]=["rgba"].concat(i.textColor.toArray())),e.push(r)}return e}}class lo{constructor(e){this.namePrimary=e.namePrimary,e.nameSecondary&&(this.nameSecondary=e.nameSecondary),this.available=e.available}toString(){return this.nameSecondary?`[${this.namePrimary},${this.nameSecondary}]`:this.namePrimary}static fromString(e,i){return e?new lo({namePrimary:e,nameSecondary:i,available:!1}):null}serialize(){return this.nameSecondary?["image",this.namePrimary,this.nameSecondary]:["image",this.namePrimary]}}function Ug(t,e,i,r){return typeof t=="number"&&t>=0&&t<=255&&typeof e=="number"&&e>=0&&e<=255&&typeof i=="number"&&i>=0&&i<=255?r===void 0||typeof r=="number"&&r>=0&&r<=1?null:`Invalid rgba value [${[t,e,i,r].join(", ")}]: 'a' must be between 0 and 1.`:`Invalid rgba value [${(typeof r=="number"?[t,e,i,r]:[t,e,i]).join(", ")}]: 'r', 'g', and 'b' must be between 0 and 255.`}function fa(t){if(t===null||typeof t=="string"||typeof t=="boolean"||typeof t=="number"||t instanceof bt||t instanceof ep||t instanceof Lr||t instanceof lo)return!0;if(Array.isArray(t)){for(const e of t)if(!fa(e))return!1;return!0}if(typeof t=="object"){for(const e in t)if(!fa(t[e]))return!1;return!0}return!1}function Ji(t){if(t===null)return da;if(typeof t=="string")return Ft;if(typeof t=="boolean")return Ut;if(typeof t=="number")return ze;if(t instanceof bt)return ao;if(t instanceof ep)return Wc;if(t instanceof Lr)return _l;if(t instanceof lo)return gl;if(Array.isArray(t)){const e=t.length;let i;for(const r of t){const o=Ji(r);if(i){if(i===o)continue;i=jt;break}i=o}return zr(i||jt,e)}return pa}function xl(t){const e=typeof t;return t===null?"":e==="string"||e==="number"||e==="boolean"?String(t):t instanceof bt||t instanceof Lr||t instanceof lo?t.toString():JSON.stringify(t)}class ip{constructor(e,i){this.type=e,this.value=i}static parse(e,i){if(e.length!==2)return i.error(`'literal' expression requires exactly one argument, but found ${e.length-1} instead.`);if(!fa(e[1]))return i.error("invalid value");const r=e[1];let o=Ji(r);const n=i.expectedType;return o.kind!=="array"||o.N!==0||!n||n.kind!=="array"||typeof n.N=="number"&&n.N!==0||(o=n),new ip(o,r)}evaluate(){return this.value}eachChild(){}outputDefined(){return!0}serialize(){return this.type.kind==="array"||this.type.kind==="object"?["literal",this.value]:this.value instanceof bt?["rgba"].concat(this.value.toArray()):this.value instanceof Lr?this.value.serialize():this.value}}var bl=ip,or=class{constructor(t){this.name="ExpressionEvaluationError",this.message=t}toJSON(){return this.message}};const rp={string:Ft,number:ze,boolean:Ut,object:pa};class op{constructor(e,i){this.type=e,this.args=i}static parse(e,i){if(e.length<2)return i.error("Expected at least one argument.");let r,o=1;const n=e[0];if(n==="array"){let a,l;if(e.length>2){const c=e[1];if(typeof c!="string"||!(c in rp)||c==="object")return i.error('The item type argument of "array" must be one of string, number, boolean',1);a=rp[c],o++}else a=jt;if(e.length>3){if(e[2]!==null&&(typeof e[2]!="number"||e[2]<0||e[2]!==Math.floor(e[2])))return i.error('The length argument to "array" must be a positive integer literal',2);l=e[2],o++}r=zr(a,l)}else r=rp[n];const s=[];for(;o<e.length;o++){const a=i.parse(e[o],o,jt);if(!a)return null;s.push(a)}return new op(r,s)}evaluate(e){for(let i=0;i<this.args.length;i++){const r=this.args[i].evaluate(e);if(!yl(this.type,Ji(r)))return r;if(i===this.args.length-1)throw new or(`Expected value to be of type ${Ni(this.type)}, but found ${Ni(Ji(r))} instead.`)}return null}eachChild(e){this.args.forEach(e)}outputDefined(){return this.args.every(e=>e.outputDefined())}serialize(){const e=this.type,i=[e.kind];if(e.kind==="array"){const r=e.itemType;if(r.kind==="string"||r.kind==="number"||r.kind==="boolean"){i.push(r.kind);const o=e.N;(typeof o=="number"||this.args.length>1)&&i.push(o)}}return i.concat(this.args.map(r=>r.serialize()))}}var un=op;class wl{constructor(e){this.type=_l,this.sections=e}static parse(e,i){if(e.length<2)return i.error("Expected at least one argument.");const r=e[1];if(!Array.isArray(r)&&typeof r=="object")return i.error("First argument must be an image or text section.");const o=[];let n=!1;for(let s=1;s<=e.length-1;++s){const a=e[s];if(n&&typeof a=="object"&&!Array.isArray(a)){n=!1;let l=null;if(a["font-scale"]&&(l=i.parse(a["font-scale"],1,ze),!l))return null;let c=null;if(a["text-font"]&&(c=i.parse(a["text-font"],1,zr(Ft)),!c))return null;let u=null;if(a["text-color"]&&(u=i.parse(a["text-color"],1,ao),!u))return null;const p=o[o.length-1];p.scale=l,p.font=c,p.textColor=u}else{const l=i.parse(e[s],1,jt);if(!l)return null;const c=l.type.kind;if(c!=="string"&&c!=="value"&&c!=="null"&&c!=="resolvedImage")return i.error("Formatted text type must be 'string', 'value', 'image' or 'null'.");n=!0,o.push({content:l,scale:null,font:null,textColor:null})}}return new wl(o)}evaluate(e){return new Lr(this.sections.map(i=>{const r=i.content.evaluate(e);return Ji(r)===gl?new tp("",r,null,null,null):new tp(xl(r),null,i.scale?i.scale.evaluate(e):null,i.font?i.font.evaluate(e).join(","):null,i.textColor?i.textColor.evaluate(e):null)}))}eachChild(e){for(const i of this.sections)e(i.content),i.scale&&e(i.scale),i.font&&e(i.font),i.textColor&&e(i.textColor)}outputDefined(){return!1}serialize(){const e=["format"];for(const i of this.sections){e.push(i.content.serialize());const r={};i.scale&&(r["font-scale"]=i.scale.serialize()),i.font&&(r["text-font"]=i.font.serialize()),i.textColor&&(r["text-color"]=i.textColor.serialize()),e.push(r)}return e}}class Tl{constructor(e,i){this.type=gl,this.inputPrimary=e,this.inputSecondary=i}static parse(e,i){if(e.length<2)return i.error("Expected two or more arguments.");const r=i.parse(e[1],1,Ft);if(!r)return i.error("No image name provided.");if(e.length===2)return new Tl(r);const o=i.parse(e[2],1,Ft);return o?new Tl(r,o):i.error("Secondary image variant is not a string.")}evaluate(e){const i=lo.fromString(this.inputPrimary.evaluate(e),this.inputSecondary?this.inputSecondary.evaluate(e):void 0);return i&&e.availableImages&&(i.available=e.availableImages.indexOf(i.namePrimary)>-1,i.nameSecondary&&i.available&&e.availableImages&&(i.available=e.availableImages.indexOf(i.nameSecondary)>-1)),i}eachChild(e){e(this.inputPrimary),this.inputSecondary&&e(this.inputSecondary)}outputDefined(){return!1}serialize(){return this.inputSecondary?["image",this.inputPrimary.serialize(),this.inputSecondary.serialize()]:["image",this.inputPrimary.serialize()]}}function Yt(t){return t instanceof Number?"number":t instanceof String?"string":t instanceof Boolean?"boolean":Array.isArray(t)?"array":t===null?"null":typeof t}const JE={"to-boolean":Ut,"to-color":ao,"to-number":ze,"to-string":Ft};class np{constructor(e,i){this.type=e,this.args=i}static parse(e,i){if(e.length<2)return i.error("Expected at least one argument.");const r=e[0],o=[];let n=da;if(r==="to-array"){if(!Array.isArray(e[1]))return null;const s=e[1].length;if(i.expectedType){if(i.expectedType.kind!=="array")return i.error(`Expected ${i.expectedType.kind} but found array.`);n=zr(i.expectedType.itemType,s)}else{if(!(s>0&&fa(e[1][0])))return null;n=zr(Ji(e[1][0]),s)}for(let a=0;a<s;a++){const l=e[1][a];let c;if(Yt(l)==="array")c=i.parse(l,void 0,n.itemType);else{const u=Yt(l);if(u!==n.itemType.kind)return i.error(`Expected ${n.itemType.kind} but found ${u}.`);c=i.registry.literal.parse(["literal",l===void 0?null:l],i)}if(!c)return null;o.push(c)}}else{if((r==="to-boolean"||r==="to-string")&&e.length!==2)return i.error("Expected one argument.");n=JE[r];for(let s=1;s<e.length;s++){const a=i.parse(e[s],s,jt);if(!a)return null;o.push(a)}}return new np(n,o)}evaluate(e){if(this.type.kind==="boolean")return!!this.args[0].evaluate(e);if(this.type.kind==="color"){let i,r;for(const o of this.args){if(i=o.evaluate(e),r=null,i instanceof bt)return i;if(typeof i=="string"){const n=e.parseColor(i);if(n)return n}else if(Array.isArray(i)&&(r=i.length<3||i.length>4?`Invalid rbga value ${JSON.stringify(i)}: expected an array containing either three or four numeric values.`:Ug(i[0],i[1],i[2],i[3]),!r))return new bt(i[0]/255,i[1]/255,i[2]/255,i[3])}throw new or(r||`Could not parse color from value '${typeof i=="string"?i:String(JSON.stringify(i))}'`)}if(this.type.kind==="number"){let i=null;for(const r of this.args){if(i=r.evaluate(e),i===null)return 0;const o=Number(i);if(!isNaN(o))return o}throw new or(`Could not convert ${JSON.stringify(i)} to number.`)}return this.type.kind==="formatted"?Lr.fromString(xl(this.args[0].evaluate(e))):this.type.kind==="resolvedImage"?lo.fromString(xl(this.args[0].evaluate(e))):this.type.kind==="array"?this.args.map(i=>i.evaluate(e)):xl(this.args[0].evaluate(e))}eachChild(e){this.args.forEach(e)}outputDefined(){return this.args.every(e=>e.outputDefined())}serialize(){if(this.type.kind==="formatted")return new wl([{content:this.args[0],scale:null,font:null,textColor:null}]).serialize();if(this.type.kind==="resolvedImage")return new Tl(this.args[0]).serialize();const e=this.type.kind==="array"?[]:[`to-${this.type.kind}`];return this.eachChild(i=>{e.push(i.serialize())}),e}}var Ss=np;const QE=["Unknown","Point","LineString","Polygon"];var qg=class{constructor(t){this.globals=null,this.feature=null,this.featureState=null,this.formattedSection=null,this._parseColorCache={},this.availableImages=null,this.canonical=null,this.featureTileCoord=null,this.featureDistanceData=null,this.options=t}id(){return this.feature&&this.feature.id!==void 0?this.feature.id:null}geometryType(){return this.feature?typeof this.feature.type=="number"?QE[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||{}}measureLight(t){return this.globals.brightness||0}distanceFromCenter(){if(this.featureTileCoord&&this.featureDistanceData){const t=this.featureDistanceData.center,e=this.featureDistanceData.scale,{x:i,y:r}=this.featureTileCoord;return this.featureDistanceData.bearing[0]*(i*e-t[0])+this.featureDistanceData.bearing[1]*(r*e-t[1])}return 0}parseColor(t){let e=this._parseColorCache[t];return e||(e=this._parseColorCache[t]=bt.parse(t)),e}getConfig(t){return this.options?this.options.get(t):null}};class As{constructor(e,i,r,o,n){this.name=e,this.type=i,this._evaluate=r,this.args=o,this._overloadIndex=n}evaluate(e){if(!this._evaluate){const i=As.definitions[this.name];this._evaluate=Array.isArray(i)?i[2]:i.overloads[this._overloadIndex][1]}return this._evaluate(e,this.args)}eachChild(e){this.args.forEach(e)}outputDefined(){return!1}serialize(){return[this.name].concat(this.args.map(e=>e.serialize()))}static parse(e,i){const r=e[0],o=As.definitions[r];if(!o)return i.error(`Unknown expression "${r}". If you wanted a literal array, use ["literal", [...]].`,0);const n=Array.isArray(o)?o[0]:o.type,s=Array.isArray(o)?[[o[1],o[2]]]:o.overloads,a=[];let l=null,c=-1;for(const[u,p]of s){if(Array.isArray(u)&&u.length!==e.length-1)continue;a.push(u),c++,l=new sy(i.registry,i.path,null,i.scope,void 0,i.options);const f=[];let _=!1;for(let g=1;g<e.length;g++){const y=e[g],v=Array.isArray(u)?u[g-1]:u.type,b=l.parse(y,1+f.length,v);if(!b){_=!0;break}f.push(b)}if(!_)if(Array.isArray(u)&&u.length!==f.length)l.error(`Expected ${u.length} arguments, but found ${f.length} instead.`);else{for(let g=0;g<f.length;g++){const y=Array.isArray(u)?u[g]:u.type,v=f[g];l.concat(g+1).checkSubtype(y,v.type)}if(l.errors.length===0)return new As(r,n,p,f,c)}}if(a.length===1)i.errors.push(...l.errors);else{const u=(a.length?a:s.map(([f])=>f)).map(eS).join(" | "),p=[];for(let f=1;f<e.length;f++){const _=i.parse(e[f],1+p.length);if(!_)return null;p.push(Ni(_.type))}i.error(`Expected arguments of type ${u}, but found (${p.join(", ")}) instead.`)}return null}static register(e,i){As.definitions=i;for(const r in i)e[r]=As}}function eS(t){return Array.isArray(t)?`(${t.map(Ni).join(", ")})`:`(${Ni(t.type)}...)`}var Bo=As;class Xc{constructor(e,i,r){this.type=Wc,this.locale=r,this.caseSensitive=e,this.diacriticSensitive=i}static parse(e,i){if(e.length!==2)return i.error("Expected one argument.");const r=e[1];if(typeof r!="object"||Array.isArray(r))return i.error("Collator options argument must be an object.");const o=i.parse(r["case-sensitive"]!==void 0&&r["case-sensitive"],1,Ut);if(!o)return null;const n=i.parse(r["diacritic-sensitive"]!==void 0&&r["diacritic-sensitive"],1,Ut);if(!n)return null;let s=null;return r.locale&&(s=i.parse(r.locale,1,Ft),!s)?null:new Xc(o,n,s)}evaluate(e){return new ep(this.caseSensitive.evaluate(e),this.diacriticSensitive.evaluate(e),this.locale?this.locale.evaluate(e):null)}eachChild(e){e(this.caseSensitive),e(this.diacriticSensitive),this.locale&&e(this.locale)}outputDefined(){return!1}serialize(){const e={};return e["case-sensitive"]=this.caseSensitive.serialize(),e["diacritic-sensitive"]=this.diacriticSensitive.serialize(),this.locale&&(e.locale=this.locale.serialize()),["collator",e]}}var Gg={exports:{}};Gg.exports=function(){function t(r,o,n,s,a){for(;s>n;){if(s-n>600){var l=s-n+1,c=o-n+1,u=Math.log(l),p=.5*Math.exp(2*u/3),f=.5*Math.sqrt(u*p*(l-p)/l)*(c-l/2<0?-1:1);t(r,o,Math.max(n,Math.floor(o-c*p/l+f)),Math.min(s,Math.floor(o+(l-c)*p/l+f)),a)}var _=r[o],g=n,y=s;for(e(r,n,o),a(r[s],_)>0&&e(r,n,s);g<y;){for(e(r,g,y),g++,y--;a(r[g],_)<0;)g++;for(;a(r[y],_)>0;)y--}a(r[n],_)===0?e(r,n,y):e(r,++y,s),y<=o&&(n=y+1),o<=y&&(s=y-1)}}function e(r,o,n){var s=r[o];r[o]=r[n],r[n]=s}function i(r,o){return r<o?-1:r>o?1:0}return function(r,o,n,s,a){t(r,o,n||0,s||r.length-1,a||i)}}();var tS=yt(Gg.exports);function iS(t){let e=0;for(let i,r,o=0,n=t.length,s=n-1;o<n;s=o++)i=t[o],r=t[s],e+=(r.x-i.x)*(i.y+r.y);return e}function El(t,e){t[0]=Math.min(t[0],e[0]),t[1]=Math.min(t[1],e[1]),t[2]=Math.max(t[2],e[0]),t[3]=Math.max(t[3],e[1])}function Sl(t,e){return!(t[0]<=e[0]||t[2]>=e[2]||t[1]<=e[1]||t[3]>=e[3])}function rS(t,e,i){const r=t[0]-e[0],o=t[1]-e[1],n=t[0]-i[0],s=t[1]-i[1];return r*s-n*o==0&&r*n<=0&&o*s<=0}function ma(t,e,i=!1){let r=!1;for(let a=0,l=e.length;a<l;a++){const c=e[a];for(let u=0,p=c.length,f=p-1;u<p;f=u++){const _=c[f],g=c[u];if(rS(t,_,g))return i;(n=_)[1]>(o=t)[1]!=(s=g)[1]>o[1]&&o[0]<(s[0]-n[0])*(o[1]-n[1])/(s[1]-n[1])+n[0]&&(r=!r)}}var o,n,s;return r}function $g(t,e,i,r){const o=r[0]-i[0],n=r[1]-i[1],s=(t[0]-i[0])*n-o*(t[1]-i[1]),a=(e[0]-i[0])*n-o*(e[1]-i[1]);return s>0&&a<0||s<0&&a>0}function Yc(t,e,i,r){return(o=[r[0]-i[0],r[1]-i[1]])[0]*(n=[e[0]-t[0],e[1]-t[1]])[1]-o[1]*n[0]!=0&&!(!$g(t,e,i,r)||!$g(i,r,t,e));var o,n}const Bn=8192;function oS(t,e){const i=(180+t[0])/360,r=(180-180/Math.PI*Math.log(Math.tan(Math.PI/4+t[1]*Math.PI/360)))/360,o=Math.pow(2,e.z);return[Math.round(i*o*Bn),Math.round(r*o*Bn)]}function nS(t,e){for(let i=0;i<e.length;i++)if(ma(t,e[i]))return!0;return!1}function sS(t,e,i){for(const r of i)for(let o=0,n=r.length,s=n-1;o<n;s=o++)if(Yc(t,e,r[s],r[o]))return!0;return!1}function Wg(t,e){for(let i=0;i<t.length;++i)if(!ma(t[i],e))return!1;for(let i=0;i<t.length-1;++i)if(sS(t[i],t[i+1],e))return!1;return!0}function aS(t,e){for(let i=0;i<e.length;i++)if(Wg(t,e[i]))return!0;return!1}function sp(t,e,i){const r=[];for(let o=0;o<t.length;o++){const n=[];for(let s=0;s<t[o].length;s++){const a=oS(t[o][s],i);El(e,a),n.push(a)}r.push(n)}return r}function Hg(t,e,i){const r=[];for(let o=0;o<t.length;o++){const n=sp(t[o],e,i);r.push(n)}return r}function Zg(t,e,i,r){if(t[0]<i[0]||t[0]>i[2]){const o=.5*r;let n=t[0]-i[0]>o?-r:i[0]-t[0]>o?r:0;n===0&&(n=t[0]-i[2]>o?-r:i[2]-t[0]>o?r:0),t[0]+=n}El(e,t)}function Xg(t,e,i,r){const o=Math.pow(2,r.z)*Bn,n=[r.x*Bn,r.y*Bn],s=[];if(!t)return s;for(const a of t)for(const l of a){const c=[l.x+n[0],l.y+n[1]];Zg(c,e,i,o),s.push(c)}return s}function Yg(t,e,i,r){const o=Math.pow(2,r.z)*Bn,n=[r.x*Bn,r.y*Bn],s=[];if(!t)return s;for(const l of t){const c=[];for(const u of l){const p=[u.x+n[0],u.y+n[1]];El(e,p),c.push(p)}s.push(c)}if(e[2]-e[0]<=o/2){(a=e)[0]=a[1]=1/0,a[2]=a[3]=-1/0;for(const l of s)for(const c of l)Zg(c,e,i,o)}var a;return s}class Al{constructor(e,i){this.type=Ut,this.geojson=e,this.geometries=i}static parse(e,i){if(e.length!==2)return i.error(`'within' expression requires exactly one argument, but found ${e.length-1} instead.`);if(fa(e[1])){const r=e[1];if(r.type==="FeatureCollection")for(let o=0;o<r.features.length;++o){const n=r.features[o].geometry.type;if(n==="Polygon"||n==="MultiPolygon")return new Al(r,r.features[o].geometry)}else if(r.type==="Feature"){const o=r.geometry.type;if(o==="Polygon"||o==="MultiPolygon")return new Al(r,r.geometry)}else if(r.type==="Polygon"||r.type==="MultiPolygon")return new Al(r,r)}return i.error("'within' expression requires valid geojson object that contains polygon geometry type.")}evaluate(e){if(e.geometry()!=null&&e.canonicalID()!=null){if(e.geometryType()==="Point")return function(i,r){const o=[1/0,1/0,-1/0,-1/0],n=[1/0,1/0,-1/0,-1/0],s=i.canonicalID();if(!s)return!1;if(r.type==="Polygon"){const a=sp(r.coordinates,n,s),l=Xg(i.geometry(),o,n,s);if(!Sl(o,n))return!1;for(const c of l)if(!ma(c,a))return!1}if(r.type==="MultiPolygon"){const a=Hg(r.coordinates,n,s),l=Xg(i.geometry(),o,n,s);if(!Sl(o,n))return!1;for(const c of l)if(!nS(c,a))return!1}return!0}(e,this.geometries);if(e.geometryType()==="LineString")return function(i,r){const o=[1/0,1/0,-1/0,-1/0],n=[1/0,1/0,-1/0,-1/0],s=i.canonicalID();if(!s)return!1;if(r.type==="Polygon"){const a=sp(r.coordinates,n,s),l=Yg(i.geometry(),o,n,s);if(!Sl(o,n))return!1;for(const c of l)if(!Wg(c,a))return!1}if(r.type==="MultiPolygon"){const a=Hg(r.coordinates,n,s),l=Yg(i.geometry(),o,n,s);if(!Sl(o,n))return!1;for(const c of l)if(!aS(c,a))return!1}return!0}(e,this.geometries)}return!1}eachChild(){}outputDefined(){return!0}serialize(){return["within",this.geojson]}}var ap=Al,Kg={exports:{}};Kg.exports=function(){var t={kilometers:1,miles:.621371192237334,nauticalmiles:.5399568034557235,meters:1e3,metres:1e3,yards:1093.6132983377079,feet:3280.839895013123,inches:39370.078740157485},e=1/298.257223563,i=e*(2-e),r=Math.PI/180,o=function(c,u){if(c===void 0)throw new Error("No latitude given.");if(u&&!t[u])throw new Error("Unknown unit "+u+". Use one of: "+Object.keys(t).join(", "));var p=6378.137*r*(u?t[u]:1),f=Math.cos(c*r),_=1/(1-i*(1-f*f)),g=Math.sqrt(_);this.kx=p*g*f,this.ky=p*g*_*(1-i)},n={units:{configurable:!0}};function s(c,u){return c[0]===u[0]&&c[1]===u[1]}function a(c,u,p){var f=l(u[0]-c[0]);return[c[0]+f*p,c[1]+(u[1]-c[1])*p]}function l(c){for(;c<-180;)c+=360;for(;c>180;)c-=360;return c}return o.fromTile=function(c,u,p){var f=Math.PI*(1-2*(c+.5)/Math.pow(2,u)),_=Math.atan(.5*(Math.exp(f)-Math.exp(-f)))/r;return new o(_,p)},n.units.get=function(){return t},o.prototype.distance=function(c,u){var p=l(c[0]-u[0])*this.kx,f=(c[1]-u[1])*this.ky;return Math.sqrt(p*p+f*f)},o.prototype.bearing=function(c,u){var p=l(u[0]-c[0])*this.kx;return Math.atan2(p,(u[1]-c[1])*this.ky)/r},o.prototype.destination=function(c,u,p){var f=p*r;return this.offset(c,Math.sin(f)*u,Math.cos(f)*u)},o.prototype.offset=function(c,u,p){return[c[0]+u/this.kx,c[1]+p/this.ky]},o.prototype.lineDistance=function(c){for(var u=0,p=0;p<c.length-1;p++)u+=this.distance(c[p],c[p+1]);return u},o.prototype.area=function(c){for(var u=0,p=0;p<c.length;p++)for(var f=c[p],_=0,g=f.length,y=g-1;_<g;y=_++)u+=l(f[_][0]-f[y][0])*(f[_][1]+f[y][1])*(p?-1:1);return Math.abs(u)/2*this.kx*this.ky},o.prototype.along=function(c,u){var p=0;if(u<=0)return c[0];for(var f=0;f<c.length-1;f++){var _=c[f],g=c[f+1],y=this.distance(_,g);if((p+=y)>u)return a(_,g,(u-(p-y))/y)}return c[c.length-1]},o.prototype.pointToSegmentDistance=function(c,u,p){var f=u[0],_=u[1],g=l(p[0]-f)*this.kx,y=(p[1]-_)*this.ky,v=0;return g===0&&y===0||((v=(l(c[0]-f)*this.kx*g+(c[1]-_)*this.ky*y)/(g*g+y*y))>1?(f=p[0],_=p[1]):v>0&&(f+=g/this.kx*v,_+=y/this.ky*v)),g=l(c[0]-f)*this.kx,y=(c[1]-_)*this.ky,Math.sqrt(g*g+y*y)},o.prototype.pointOnLine=function(c,u){for(var p,f,_,g,y=1/0,v=0;v<c.length-1;v++){var b=c[v][0],w=c[v][1],S=l(c[v+1][0]-b)*this.kx,A=(c[v+1][1]-w)*this.ky,E=0;S===0&&A===0||((E=(l(u[0]-b)*this.kx*S+(u[1]-w)*this.ky*A)/(S*S+A*A))>1?(b=c[v+1][0],w=c[v+1][1]):E>0&&(b+=S/this.kx*E,w+=A/this.ky*E));var M=(S=l(u[0]-b)*this.kx)*S+(A=(u[1]-w)*this.ky)*A;M<y&&(y=M,p=b,f=w,_=v,g=E)}return{point:[p,f],index:_,t:Math.max(0,Math.min(1,g))}},o.prototype.lineSlice=function(c,u,p){var f=this.pointOnLine(p,c),_=this.pointOnLine(p,u);if(f.index>_.index||f.index===_.index&&f.t>_.t){var g=f;f=_,_=g}var y=[f.point],v=f.index+1,b=_.index;!s(p[v],y[0])&&v<=b&&y.push(p[v]);for(var w=v+1;w<=b;w++)y.push(p[w]);return s(p[b],_.point)||y.push(_.point),y},o.prototype.lineSliceAlong=function(c,u,p){for(var f=0,_=[],g=0;g<p.length-1;g++){var y=p[g],v=p[g+1],b=this.distance(y,v);if((f+=b)>c&&_.length===0&&_.push(a(y,v,(c-(f-b))/b)),f>=u)return _.push(a(y,v,(u-(f-b))/b)),_;f>c&&_.push(v)}return _},o.prototype.bufferPoint=function(c,u){var p=u/this.ky,f=u/this.kx;return[c[0]-f,c[1]-p,c[0]+f,c[1]+p]},o.prototype.bufferBBox=function(c,u){var p=u/this.ky,f=u/this.kx;return[c[0]-f,c[1]-p,c[2]+f,c[3]+p]},o.prototype.insideBBox=function(c,u){return l(c[0]-u[0])>=0&&l(c[0]-u[2])<=0&&c[1]>=u[1]&&c[1]<=u[3]},Object.defineProperties(o,n),o}();var lp=yt(Kg.exports),Jg={exports:{}};Jg.exports=function(){var t=function(i,r){if(i===void 0&&(i=[]),r===void 0&&(r=e),this.data=i,this.length=this.data.length,this.compare=r,this.length>0)for(var o=(this.length>>1)-1;o>=0;o--)this._down(o)};function e(i,r){return i<r?-1:i>r?1:0}return t.prototype.push=function(i){this.data.push(i),this.length++,this._up(this.length-1)},t.prototype.pop=function(){if(this.length!==0){var i=this.data[0],r=this.data.pop();return this.length--,this.length>0&&(this.data[0]=r,this._down(0)),i}},t.prototype.peek=function(){return this.data[0]},t.prototype._up=function(i){for(var r=this.data,o=this.compare,n=r[i];i>0;){var s=i-1>>1,a=r[s];if(o(n,a)>=0)break;r[i]=a,i=s}r[i]=n},t.prototype._down=function(i){for(var r=this.data,o=this.compare,n=this.length>>1,s=r[i];i<n;){var a=1+(i<<1),l=r[a],c=a+1;if(c<this.length&&o(r[c],l)<0&&(a=c,l=r[c]),o(l,s)>=0)break;r[i]=l,i=a}r[i]=s},t}();var cp=yt(Jg.exports),oe=8192;function Qg(t,e){return e.dist-t.dist}const up=100,hp=50;function ey(t){const e=[1/0,1/0,-1/0,-1/0];if(e.length!==t.length)return!1;for(let i=0;i<e.length;i++)if(e[i]!==t[i])return!1;return!0}function Kc(t){return t[1]-t[0]+1}function hn(t,e){const i=t[1]>=t[0]&&t[1]<e;return i||console.warn("Distance Expression: Index is out of range"),i}function dp(t,e){if(t[0]>t[1])return[null,null];const i=Kc(t);if(e){if(i===2)return[t,null];const r=Math.floor(i/2);return[[t[0],t[0]+r],[t[0]+r,t[1]]]}{if(i===1)return[t,null];const r=Math.floor(i/2)-1;return[[t[0],t[0]+r],[t[0]+r+1,t[1]]]}}function Ms(t,e){const i=[1/0,1/0,-1/0,-1/0];if(!hn(e,t.length))return i;for(let r=e[0];r<=e[1];++r)El(i,t[r]);return i}function Jc(t){const e=[1/0,1/0,-1/0,-1/0];for(let i=0;i<t.length;++i)for(let r=0;r<t[i].length;++r)El(e,t[i][r]);return e}function _a(t,e,i){if(ey(t)||ey(e))return NaN;let r=0,o=0;return t[2]<e[0]&&(r=e[0]-t[2]),t[0]>e[2]&&(r=t[0]-e[2]),t[1]>e[3]&&(o=t[1]-e[3]),t[3]<e[1]&&(o=e[1]-t[3]),i.distance([0,0],[r,o])}function pp(t,e){const i=Math.pow(2,e.z);return[(o=(t.x/oe+e.x)/i,360*o-180),(r=(t.y/oe+e.y)/i,360/Math.PI*Math.atan(Math.exp((180-360*r)*Math.PI/180))-90)];var r,o}function lS(t,e){const i=[];for(let r=0;r<t.length;++r)i.push(pp(t[r],e));return i}function ty(t,e,i){const r=i.pointOnLine(e,t).point;return i.distance(t,r)}function iy(t,e,i,r,o){const n=i.slice(r[0],r[1]+1);let s=1/0;for(let a=e[0];a<=e[1];++a)if((s=Math.min(s,ty(t[a],n,o)))===0)return 0;return s}function fp(t,e,i,r,o){const n=Math.min(o.pointToSegmentDistance(t,i,r),o.pointToSegmentDistance(e,i,r)),s=Math.min(o.pointToSegmentDistance(i,t,e),o.pointToSegmentDistance(r,t,e));return Math.min(n,s)}function cS(t,e,i,r,o){if(!hn(e,t.length)||!hn(r,i.length))return NaN;let n=1/0;for(let s=e[0];s<e[1];++s)for(let a=r[0];a<r[1];++a){if(Yc(t[s],t[s+1],i[a],i[a+1]))return 0;n=Math.min(n,fp(t[s],t[s+1],i[a],i[a+1],o))}return n}function uS(t,e,i,r,o){if(!hn(e,t.length)||!hn(r,i.length))return NaN;let n=1/0;for(let s=e[0];s<=e[1];++s)for(let a=r[0];a<=r[1];++a)if((n=Math.min(n,o.distance(t[s],i[a])))===0)return n;return n}function hS(t,e,i){if(ma(t,e,!0))return 0;let r=1/0;for(const o of e){const n=o.length;if(n<2)return console.warn("Distance Expression: Invalid polygon!"),NaN;if(o[0]!==o[n-1]&&(r=Math.min(r,i.pointToSegmentDistance(t,o[n-1],o[0])))===0||(r=Math.min(r,ty(t,o,i)))===0)return r}return r}function dS(t,e,i,r){if(!hn(e,t.length))return NaN;for(let n=e[0];n<=e[1];++n)if(ma(t[n],i,!0))return 0;let o=1/0;for(let n=e[0];n<e[1];++n)for(const s of i)for(let a=0,l=s.length,c=l-1;a<l;c=a++){if(Yc(t[n],t[n+1],s[c],s[a]))return 0;o=Math.min(o,fp(t[n],t[n+1],s[c],s[a],r))}return o}function ry(t,e){for(const i of t)for(let r=0;r<=i.length-1;++r)if(ma(i[r],e,!0))return!0;return!1}function pS(t,e,i,r=1/0){const o=Jc(t),n=Jc(e);if(r!==1/0&&_a(o,n,i)>=r)return r;if(Sl(o,n)){if(ry(t,e))return 0}else if(ry(e,t))return 0;let s=r;for(const a of t)for(let l=0,c=a.length,u=c-1;l<c;u=l++)for(const p of e)for(let f=0,_=p.length,g=_-1;f<_;g=f++){if(Yc(a[u],a[l],p[g],p[f]))return 0;s=Math.min(s,fp(a[u],a[l],p[g],p[f],i))}return s}function Qc(t,e,i,r,o,n,s){if(n===null||s===null)return;const a=_a(Ms(r,n),Ms(o,s),i);a<e&&t.push({dist:a,range1:n,range2:s})}function fS(t,e,i,r,o=1/0){let n=Math.min(r.distance(t[0],i[0][0]),o);if(n===0)return n;const s=new cp([{dist:0,range1:[0,t.length-1],range2:[0,0]}],Qg),a=e?hp:up,l=Jc(i);for(;s.length;){const c=s.pop();if(c.dist>=n)continue;const u=c.range1;if(Kc(u)<=a){if(!hn(u,t.length))return NaN;if(e){const p=dS(t,u,i,r);if((n=Math.min(n,p))===0)return n}else for(let p=u[0];p<=u[1];++p){const f=hS(t[p],i,r);if((n=Math.min(n,f))===0)return n}}else{const p=dp(u,e);if(p[0]!==null){const f=_a(Ms(t,p[0]),l,r);f<n&&s.push({dist:f,range1:p[0],range2:[0,0]})}if(p[1]!==null){const f=_a(Ms(t,p[1]),l,r);f<n&&s.push({dist:f,range1:p[1],range2:[0,0]})}}}return n}function oy(t,e,i,r,o,n=1/0){let s=Math.min(n,o.distance(t[0],i[0]));if(s===0)return s;const a=new cp([{dist:0,range1:[0,t.length-1],range2:[0,i.length-1]}],Qg),l=e?hp:up,c=r?hp:up;for(;a.length;){const u=a.pop();if(u.dist>=s)continue;const p=u.range1,f=u.range2;if(Kc(p)<=l&&Kc(f)<=c){if(!hn(p,t.length)||!hn(f,i.length))return NaN;if(e&&r?s=Math.min(s,cS(t,p,i,f,o)):e||r?e&&!r?s=Math.min(s,iy(i,f,t,p,o)):!e&&r&&(s=Math.min(s,iy(t,p,i,f,o))):s=Math.min(s,uS(t,p,i,f,o)),s===0)return s}else{const _=dp(p,e),g=dp(f,r);Qc(a,s,o,t,i,_[0],g[0]),Qc(a,s,o,t,i,_[0],g[1]),Qc(a,s,o,t,i,_[1],g[0]),Qc(a,s,o,t,i,_[1],g[1])}}return s}function mp(t,e,i,r,o=1/0){let n=o;const s=Ms(t,[0,t.length-1]);for(const a of i)if(!(n!==1/0&&_a(s,Ms(a,[0,a.length-1]),r)>=n)&&(n=Math.min(n,oy(t,e,a,!0,r,n)),n===0))return n;return n}function eu(t,e,i,r,o=1/0){let n=o;const s=Ms(t,[0,t.length-1]);for(const a of i){if(n!==1/0&&_a(s,Jc(a),r)>=n)continue;const l=fS(t,e,a,r,n);if(isNaN(l))return l;if((n=Math.min(n,l))===0)return n}return n}function _p(t){return t==="Point"||t==="MultiPoint"||t==="LineString"||t==="MultiLineString"||t==="Polygon"||t==="MultiPolygon"}class Ml{constructor(e,i){this.type=ze,this.geojson=e,this.geometries=i}static parse(e,i){if(e.length!==2)return i.error(`'distance' expression requires either one argument, but found ' ${e.length-1} instead.`);if(fa(e[1])){const r=e[1];if(r.type==="FeatureCollection"){for(let o=0;o<r.features.length;++o)if(_p(r.features[o].geometry.type))return new Ml(r,r.features[o].geometry)}else if(r.type==="Feature"){if(_p(r.geometry.type))return new Ml(r,r.geometry)}else if(_p(r.type))return new Ml(r,r)}return i.error("'distance' expression needs to be an array with format ['Distance', GeoJSONObj].")}evaluate(e){const i=e.geometry(),r=e.canonicalID();if(i!=null&&r!=null){if(e.geometryType()==="Point")return function(o,n,s){const a=[];for(const c of o)for(const u of c)a.push(pp(u,n));const l=new lp(a[0][1],"meters");return s.type==="Point"||s.type==="MultiPoint"||s.type==="LineString"?oy(a,!1,s.type==="Point"?[s.coordinates]:s.coordinates,s.type==="LineString",l):s.type==="MultiLineString"?mp(a,!1,s.coordinates,l):s.type==="Polygon"||s.type==="MultiPolygon"?eu(a,!1,s.type==="Polygon"?[s.coordinates]:s.coordinates,l):null}(i,r,this.geometries);if(e.geometryType()==="LineString")return function(o,n,s){const a=[];for(const c of o){const u=[];for(const p of c)u.push(pp(p,n));a.push(u)}const l=new lp(a[0][0][1],"meters");if(s.type==="Point"||s.type==="MultiPoint"||s.type==="LineString")return mp(s.type==="Point"?[s.coordinates]:s.coordinates,s.type==="LineString",a,l);if(s.type==="MultiLineString"){let c=1/0;for(let u=0;u<s.coordinates.length;u++){const p=mp(s.coordinates[u],!0,a,l,c);if(isNaN(p))return p;if((c=Math.min(c,p))===0)return c}return c}if(s.type==="Polygon"||s.type==="MultiPolygon"){let c=1/0;for(let u=0;u<a.length;u++){const p=eu(a[u],!0,s.type==="Polygon"?[s.coordinates]:s.coordinates,l,c);if(isNaN(p))return p;if((c=Math.min(c,p))===0)return c}return c}return null}(i,r,this.geometries);if(e.geometryType()==="Polygon")return function(o,n,s){const a=[];for(const c of function(u,p){const f=u.length;if(f<=1)return[u];const _=[];let g,y;for(let v=0;v<f;v++){const b=iS(u[v]);b!==0&&(u[v].area=Math.abs(b),y===void 0&&(y=b<0),y===b<0?(g&&_.push(g),g=[u[v]]):g.push(u[v]))}return g&&_.push(g),_}(o)){const u=[];for(let p=0;p<c.length;++p)u.push(lS(c[p],n));a.push(u)}const l=new lp(a[0][0][0][1],"meters");if(s.type==="Point"||s.type==="MultiPoint"||s.type==="LineString")return eu(s.type==="Point"?[s.coordinates]:s.coordinates,s.type==="LineString",a,l);if(s.type==="MultiLineString"){let c=1/0;for(let u=0;u<s.coordinates.length;u++){const p=eu(s.coordinates[u],!0,a,l,c);if(isNaN(p))return p;if((c=Math.min(c,p))===0)return c}return c}return s.type==="Polygon"||s.type==="MultiPolygon"?function(c,u,p){let f=1/0;for(const _ of c)for(const g of u){const y=pS(_,g,p,f);if(isNaN(y))return y;if((f=Math.min(f,y))===0)return f}return f}(s.type==="Polygon"?[s.coordinates]:s.coordinates,a,l):null}(i,r,this.geometries);console.warn("Distance Expression: currently only evaluates valid Point/LineString/Polygon geometries.")}else console.warn("Distance Expression: requirs valid feature and canonical information.");return null}eachChild(){}outputDefined(){return!0}serialize(){return["distance",this.geojson]}}var gp=Ml;function ga(t){if(t instanceof Bo&&(t.name==="get"&&t.args.length===1||t.name==="feature-state"||t.name==="has"&&t.args.length===1||t.name==="properties"||t.name==="geometry-type"||t.name==="id"||/^filter-/.test(t.name))||t instanceof ap||t instanceof gp)return!1;let e=!0;return t.eachChild(i=>{e&&!ga(i)&&(e=!1)}),e}function Il(t){if(t instanceof Bo&&t.name==="feature-state")return!1;let e=!0;return t.eachChild(i=>{e&&!Il(i)&&(e=!1)}),e}function yp(t){if(t instanceof Bo&&t.name==="config")return!1;let e=!0;return t.eachChild(i=>{e&&!yp(i)&&(e=!1)}),e}function ya(t,e){if(t instanceof Bo&&e.indexOf(t.name)>=0)return!1;let i=!0;return t.eachChild(r=>{i&&!ya(r,e)&&(i=!1)}),i}class vp{constructor(e,i){this.type=i.type,this.name=e,this.boundExpression=i}static parse(e,i){if(e.length!==2||typeof e[1]!="string")return i.error("'var' expression requires exactly one string literal argument.");const r=e[1];return i.scope.has(r)?new vp(r,i.scope.get(r)):i.error(`Unknown variable "${r}". Make sure "${r}" has been bound in an enclosing "let" expression before using it.`,1)}evaluate(e){return this.boundExpression.evaluate(e)}eachChild(){}outputDefined(){return!1}serialize(){return["var",this.name]}}var ny=vp;class xp{constructor(e,i=[],r,o=new YE,n=[],s){this.registry=e,this.path=i,this.key=i.map(a=>`[${a}]`).join(""),this.scope=o,this.errors=n,this.expectedType=r,this.options=s}parse(e,i,r,o,n={}){return i||r?this.concat(i,r,o)._parse(e,n):this._parse(e,n)}_parse(e,i){function r(o,n,s){return s==="assert"?new un(n,[o]):s==="coerce"?new Ss(n,[o]):o}if(e!==null&&typeof e!="string"&&typeof e!="boolean"&&typeof e!="number"||(e=["literal",e]),Array.isArray(e)){if(e.length===0)return this.error('Expected an array with at least one element. If you wanted a literal array, use ["literal", []].');const o=typeof e[0]=="string"?this.registry[e[0]]:void 0;if(o){let n=o.parse(e,this);if(!n)return null;if(this.expectedType){const s=this.expectedType,a=n.type;if(s.kind!=="string"&&s.kind!=="number"&&s.kind!=="boolean"&&s.kind!=="object"&&s.kind!=="array"||a.kind!=="value")if(s.kind!=="color"&&s.kind!=="formatted"&&s.kind!=="resolvedImage"||a.kind!=="value"&&a.kind!=="string"){if(this.checkSubtype(s,a))return null}else n=r(n,s,i.typeAnnotation||"coerce");else n=r(n,s,i.typeAnnotation||"assert")}if(!(n instanceof bl)&&n.type.kind!=="resolvedImage"&&bp(n)){const s=new qg(this.options);try{n=new bl(n.type,n.evaluate(s))}catch(a){return this.error(a.message),null}}return n}return Ss.parse(["to-array",e],this)}return this.error(e===void 0?"'undefined' value invalid. Use null instead.":typeof e=="object"?'Bare objects invalid. Use ["literal", {...}] instead.':`Expected an array, but found ${typeof e} instead.`)}concat(e,i,r){const o=typeof e=="number"?this.path.concat(e):this.path,n=r?this.scope.concat(r):this.scope;return new xp(this.registry,o,i||null,n,this.errors,this.options)}error(e,...i){const r=`${this.key}${i.map(o=>`[${o}]`).join("")}`;this.errors.push(new Oo(r,e))}checkSubtype(e,i){const r=yl(e,i);return r&&this.error(r),r}}var sy=xp;function bp(t){if(t instanceof ny)return bp(t.boundExpression);if(t instanceof Bo&&t.name==="error"||t instanceof Bo&&t.name==="config"||t instanceof Xc||t instanceof ap||t instanceof gp)return!1;const e=t instanceof Ss||t instanceof un;let i=!0;return t.eachChild(r=>{i=e?i&&bp(r):i&&r instanceof bl}),!!i&&ga(t)&&ya(t,["zoom","heatmap-density","line-progress","raster-value","sky-radial-progress","accumulated","is-supported-script","pitch","distance-from-center","measure-light"])}function tu(t,e){const i=t.length-1;let r,o,n=0,s=i,a=0;for(;n<=s;)if(a=Math.floor((n+s)/2),r=t[a],o=t[a+1],r<=e){if(a===i||e<o)return a;n=a+1}else{if(!(r>e))throw new or("Input is not a number.");s=a-1}return 0}class wp{constructor(e,i,r){this.type=e,this.input=i,this.labels=[],this.outputs=[];for(const[o,n]of r)this.labels.push(o),this.outputs.push(n)}static parse(e,i){if(e.length-1<4)return i.error(`Expected at least 4 arguments, but found only ${e.length-1}.`);if((e.length-1)%2!=0)return i.error("Expected an even number of arguments.");const r=i.parse(e[1],1,ze);if(!r)return null;const o=[];let n=null;i.expectedType&&i.expectedType.kind!=="value"&&(n=i.expectedType);for(let s=1;s<e.length;s+=2){const a=s===1?-1/0:e[s],l=e[s+1],c=s,u=s+1;if(typeof a!="number")return i.error('Input/output pairs for "step" expressions must be defined using literal numeric values (not computed expressions) for the input values.',c);if(o.length&&o[o.length-1][0]>=a)return i.error('Input/output pairs for "step" expressions must be arranged with input values in strictly ascending order.',c);const p=i.parse(l,u,n);if(!p)return null;n=n||p.type,o.push([a,p])}return new wp(n,r,o)}evaluate(e){const i=this.labels,r=this.outputs;if(i.length===1)return r[0].evaluate(e);const o=this.input.evaluate(e);if(o<=i[0])return r[0].evaluate(e);const n=i.length;return o>=i[n-1]?r[n-1].evaluate(e):r[tu(i,o)].evaluate(e)}eachChild(e){e(this.input);for(const i of this.outputs)e(i)}outputDefined(){return this.outputs.every(e=>e.outputDefined())}serialize(){const e=["step",this.input.serialize()];for(let i=0;i<this.labels.length;i++)i>0&&e.push(this.labels[i]),e.push(this.outputs[i].serialize());return e}}var Tp=wp;function rt(t,e,i){return t*(1-i)+e*i}function ay(t,e,i){return t.map((r,o)=>rt(r,e[o],i))}var iu=Object.freeze({__proto__:null,array:ay,color:function(t,e,i){return new bt(rt(t.r,e.r,i),rt(t.g,e.g,i),rt(t.b,e.b,i),rt(t.a,e.a,i))},number:rt});const ly=.95047,cy=1.08883,uy=4/29,va=6/29,hy=3*va*va,mS=va*va*va,_S=Math.PI/180,gS=180/Math.PI;function Ep(t){return t>mS?Math.pow(t,1/3):t/hy+uy}function Sp(t){return t>va?t*t*t:hy*(t-uy)}function Ap(t){return 255*(t<=.0031308?12.92*t:1.055*Math.pow(t,1/2.4)-.055)}function Mp(t){return(t/=255)<=.04045?t/12.92:Math.pow((t+.055)/1.055,2.4)}function dy(t){const e=Mp(t.r),i=Mp(t.g),r=Mp(t.b),o=Ep((.4124564*e+.3575761*i+.1804375*r)/ly),n=Ep((.2126729*e+.7151522*i+.072175*r)/1);return{l:116*n-16,a:500*(o-n),b:200*(n-Ep((.0193339*e+.119192*i+.9503041*r)/cy)),alpha:t.a}}function py(t){let e=(t.l+16)/116,i=isNaN(t.a)?e:e+t.a/500,r=isNaN(t.b)?e:e-t.b/200;return e=1*Sp(e),i=ly*Sp(i),r=cy*Sp(r),new bt(Ap(3.2404542*i-1.5371385*e-.4985314*r),Ap(-.969266*i+1.8760108*e+.041556*r),Ap(.0556434*i-.2040259*e+1.0572252*r),t.alpha)}function yS(t,e,i){const r=e-t;return t+i*(r>180||r<-180?r-360*Math.round(r/360):r)}const Cl={forward:dy,reverse:py,interpolate:function(t,e,i){return{l:rt(t.l,e.l,i),a:rt(t.a,e.a,i),b:rt(t.b,e.b,i),alpha:rt(t.alpha,e.alpha,i)}}},kl={forward:function(t){const{l:e,a:i,b:r}=dy(t),o=Math.atan2(r,i)*gS;return{h:o<0?o+360:o,c:Math.sqrt(i*i+r*r),l:e,alpha:t.a}},reverse:function(t){const e=t.h*_S,i=t.c;return py({l:t.l,a:Math.cos(e)*i,b:Math.sin(e)*i,alpha:t.alpha})},interpolate:function(t,e,i){return{h:yS(t.h,e.h,i),c:rt(t.c,e.c,i),l:rt(t.l,e.l,i),alpha:rt(t.alpha,e.alpha,i)}}};var fy=Object.freeze({__proto__:null,hcl:kl,lab:Cl});class ru{constructor(e,i,r,o,n){this.type=e,this.operator=i,this.interpolation=r,this.input=o,this.labels=[],this.outputs=[];for(const[s,a]of n)this.labels.push(s),this.outputs.push(a)}static interpolationFactor(e,i,r,o){let n=0;if(e.name==="exponential")n=Ip(i,e.base,r,o);else if(e.name==="linear")n=Ip(i,1,r,o);else if(e.name==="cubic-bezier"){const s=e.controlPoints;n=new qe(s[0],s[1],s[2],s[3]).solve(Ip(i,1,r,o))}return n}static parse(e,i){let[r,o,n,...s]=e;if(!Array.isArray(o)||o.length===0)return i.error("Expected an interpolation type expression.",1);if(o[0]==="linear")o={name:"linear"};else if(o[0]==="exponential"){const c=o[1];if(typeof c!="number")return i.error("Exponential interpolation requires a numeric base.",1,1);o={name:"exponential",base:c}}else{if(o[0]!=="cubic-bezier")return i.error(`Unknown interpolation type ${String(o[0])}`,1,0);{const c=o.slice(1);if(c.length!==4||c.some(u=>typeof u!="number"||u<0||u>1))return i.error("Cubic bezier interpolation requires four numeric arguments with values between 0 and 1.",1);o={name:"cubic-bezier",controlPoints:c}}}if(e.length-1<4)return i.error(`Expected at least 4 arguments, but found only ${e.length-1}.`);if((e.length-1)%2!=0)return i.error("Expected an even number of arguments.");if(n=i.parse(n,2,ze),!n)return null;const a=[];let l=null;r==="interpolate-hcl"||r==="interpolate-lab"?l=ao:i.expectedType&&i.expectedType.kind!=="value"&&(l=i.expectedType);for(let c=0;c<s.length;c+=2){const u=s[c],p=s[c+1],f=c+3,_=c+4;if(typeof u!="number")return i.error('Input/output pairs for "interpolate" expressions must be defined using literal numeric values (not computed expressions) for the input values.',f);if(a.length&&a[a.length-1][0]>=u)return i.error('Input/output pairs for "interpolate" expressions must be arranged with input values in strictly ascending order.',f);const g=i.parse(p,_,l);if(!g)return null;l=l||g.type,a.push([u,g])}return l.kind==="number"||l.kind==="color"||l.kind==="array"&&l.itemType.kind==="number"&&typeof l.N=="number"?new ru(l,r,o,n,a):i.error(`Type ${Ni(l)} is not interpolatable.`)}evaluate(e){const i=this.labels,r=this.outputs;if(i.length===1)return r[0].evaluate(e);const o=this.input.evaluate(e);if(o<=i[0])return r[0].evaluate(e);const n=i.length;if(o>=i[n-1])return r[n-1].evaluate(e);const s=tu(i,o),a=ru.interpolationFactor(this.interpolation,o,i[s],i[s+1]),l=r[s].evaluate(e),c=r[s+1].evaluate(e);return this.operator==="interpolate"?iu[this.type.kind.toLowerCase()](l,c,a):this.operator==="interpolate-hcl"?kl.reverse(kl.interpolate(kl.forward(l),kl.forward(c),a)):Cl.reverse(Cl.interpolate(Cl.forward(l),Cl.forward(c),a))}eachChild(e){e(this.input);for(const i of this.outputs)e(i)}outputDefined(){return this.outputs.every(e=>e.outputDefined())}serialize(){let e;e=this.interpolation.name==="linear"?["linear"]:this.interpolation.name==="exponential"?this.interpolation.base===1?["linear"]:["exponential",this.interpolation.base]:["cubic-bezier"].concat(this.interpolation.controlPoints);const i=[this.operator,e,this.input.serialize()];for(let r=0;r<this.labels.length;r++)i.push(this.labels[r],this.outputs[r].serialize());return i}}function Ip(t,e,i,r){const o=r-i,n=t-i;return o===0?0:e===1?n/o:(Math.pow(e,n)-1)/(Math.pow(e,o)-1)}var Fo=ru;class Cp{constructor(e,i){this.type=e,this.args=i}static parse(e,i){if(e.length<2)return i.error("Expectected at least one argument.");let r=null;const o=i.expectedType;o&&o.kind!=="value"&&(r=o);const n=[];for(const a of e.slice(1)){const l=i.parse(a,1+n.length,r,void 0,{typeAnnotation:"omit"});if(!l)return null;r=r||l.type,n.push(l)}const s=o&&n.some(a=>yl(o,a.type));return new Cp(s?jt:r,n)}evaluate(e){let i,r=null,o=0;for(const n of this.args){if(o++,r=n.evaluate(e),r&&r instanceof lo&&!r.available&&(i||(i=r),r=null,o===this.args.length))return i;if(r!==null)break}return r}eachChild(e){this.args.forEach(e)}outputDefined(){return this.args.every(e=>e.outputDefined())}serialize(){const e=["coalesce"];return this.eachChild(i=>{e.push(i.serialize())}),e}}var my=Cp;class kp{constructor(e,i){this.type=i.type,this.bindings=[].concat(e),this.result=i}evaluate(e){return this.result.evaluate(e)}eachChild(e){for(const i of this.bindings)e(i[1]);e(this.result)}static parse(e,i){if(e.length<4)return i.error(`Expected at least 3 arguments, but found ${e.length-1} instead.`);const r=[];for(let n=1;n<e.length-1;n+=2){const s=e[n];if(typeof s!="string")return i.error(`Expected string, but found ${typeof s} instead.`,n);if(/[^a-zA-Z0-9_]/.test(s))return i.error("Variable names must contain only alphanumeric characters or '_'.",n);const a=i.parse(e[n+1],n+1);if(!a)return null;r.push([s,a])}const o=i.parse(e[e.length-1],e.length-1,i.expectedType,r);return o?new kp(r,o):null}outputDefined(){return this.result.outputDefined()}serialize(){const e=["let"];for(const[i,r]of this.bindings)e.push(i,r.serialize());return e.push(this.result.serialize()),e}}var _y=kp;class Pp{constructor(e,i,r){this.type=e,this.index=i,this.input=r}static parse(e,i){if(e.length!==3)return i.error(`Expected 2 arguments, but found ${e.length-1} instead.`);const r=i.parse(e[1],1,ze),o=i.parse(e[2],2,zr(i.expectedType||jt));return r&&o?new Pp(o.type.itemType,r,o):null}evaluate(e){const i=this.index.evaluate(e),r=this.input.evaluate(e);if(i<0)throw new or(`Array index out of bounds: ${i} < 0.`);if(i>=r.length)throw new or(`Array index out of bounds: ${i} > ${r.length-1}.`);if(i!==Math.floor(i))throw new or(`Array index must be an integer, but found ${i} instead.`);return r[i]}eachChild(e){e(this.index),e(this.input)}outputDefined(){return!1}serialize(){return["at",this.index.serialize(),this.input.serialize()]}}var vS=Pp;class Dp{constructor(e,i){this.type=Ut,this.needle=e,this.haystack=i}static parse(e,i){if(e.length!==3)return i.error(`Expected 2 arguments, but found ${e.length-1} instead.`);const r=i.parse(e[1],1,jt),o=i.parse(e[2],2,jt);return r&&o?Yd(r.type,[Ut,Ft,ze,da,jt])?new Dp(r,o):i.error(`Expected first argument to be of type boolean, string, number or null, but found ${Ni(r.type)} instead`):null}evaluate(e){const i=this.needle.evaluate(e),r=this.haystack.evaluate(e);if(r==null)return!1;if(!vl(i,["boolean","string","number","null"]))throw new or(`Expected first argument to be of type boolean, string, number or null, but found ${Ni(Ji(i))} instead.`);if(!vl(r,["string","array"]))throw new or(`Expected second argument to be of type array or string, but found ${Ni(Ji(r))} instead.`);return r.indexOf(i)>=0}eachChild(e){e(this.needle),e(this.haystack)}outputDefined(){return!0}serialize(){return["in",this.needle.serialize(),this.haystack.serialize()]}}var xS=Dp;class ou{constructor(e,i,r){this.type=ze,this.needle=e,this.haystack=i,this.fromIndex=r}static parse(e,i){if(e.length<=2||e.length>=5)return i.error(`Expected 3 or 4 arguments, but found ${e.length-1} instead.`);const r=i.parse(e[1],1,jt),o=i.parse(e[2],2,jt);if(!r||!o)return null;if(!Yd(r.type,[Ut,Ft,ze,da,jt]))return i.error(`Expected first argument to be of type boolean, string, number or null, but found ${Ni(r.type)} instead`);if(e.length===4){const n=i.parse(e[3],3,ze);return n?new ou(r,o,n):null}return new ou(r,o)}evaluate(e){const i=this.needle.evaluate(e),r=this.haystack.evaluate(e);if(!vl(i,["boolean","string","number","null"]))throw new or(`Expected first argument to be of type boolean, string, number or null, but found ${Ni(Ji(i))} instead.`);if(!vl(r,["string","array"]))throw new or(`Expected second argument to be of type array or string, but found ${Ni(Ji(r))} instead.`);if(this.fromIndex){const o=this.fromIndex.evaluate(e);return r.indexOf(i,o)}return r.indexOf(i)}eachChild(e){e(this.needle),e(this.haystack),this.fromIndex&&e(this.fromIndex)}outputDefined(){return!1}serialize(){if(this.fromIndex!=null&&this.fromIndex!==void 0){const e=this.fromIndex.serialize();return["index-of",this.needle.serialize(),this.haystack.serialize(),e]}return["index-of",this.needle.serialize(),this.haystack.serialize()]}}var bS=ou;class zp{constructor(e,i,r,o,n,s){this.inputType=e,this.type=i,this.input=r,this.cases=o,this.outputs=n,this.otherwise=s}static parse(e,i){if(e.length<5)return i.error(`Expected at least 4 arguments, but found only ${e.length-1}.`);if(e.length%2!=1)return i.error("Expected an even number of arguments.");let r,o;i.expectedType&&i.expectedType.kind!=="value"&&(o=i.expectedType);const n={},s=[];for(let c=2;c<e.length-1;c+=2){let u=e[c];const p=e[c+1];Array.isArray(u)||(u=[u]);const f=i.concat(c);if(u.length===0)return f.error("Expected at least one branch label.");for(const g of u){if(typeof g!="number"&&typeof g!="string")return f.error("Branch labels must be numbers or strings.");if(typeof g=="number"&&Math.abs(g)>Number.MAX_SAFE_INTEGER)return f.error(`Branch labels must be integers no larger than ${Number.MAX_SAFE_INTEGER}.`);if(typeof g=="number"&&Math.floor(g)!==g)return f.error("Numeric branch labels must be integer values.");if(r){if(f.checkSubtype(r,Ji(g)))return null}else r=Ji(g);if(n[String(g)]!==void 0)return f.error("Branch labels must be unique.");n[String(g)]=s.length}const _=i.parse(p,c,o);if(!_)return null;o=o||_.type,s.push(_)}const a=i.parse(e[1],1,jt);if(!a)return null;const l=i.parse(e[e.length-1],e.length-1,o);return l?a.type.kind!=="value"&&i.concat(1).checkSubtype(r,a.type)?null:new zp(r,o,a,n,s,l):null}evaluate(e){const i=this.input.evaluate(e);return(Ji(i)===this.inputType&&this.outputs[this.cases[i]]||this.otherwise).evaluate(e)}eachChild(e){e(this.input),this.outputs.forEach(e),e(this.otherwise)}outputDefined(){return this.outputs.every(e=>e.outputDefined())&&this.otherwise.outputDefined()}serialize(){const e=["match",this.input.serialize()],i=Object.keys(this.cases).sort(),r=[],o={};for(const s of i){const a=o[this.cases[s]];a===void 0?(o[this.cases[s]]=r.length,r.push([this.cases[s],[s]])):r[a][1].push(s)}const n=s=>this.inputType.kind==="number"?Number(s):s;for(const[s,a]of r)e.push(a.length===1?n(a[0]):a.map(n)),e.push(this.outputs[s].serialize());return e.push(this.otherwise.serialize()),e}}var wS=zp;class Rp{constructor(e,i,r){this.type=e,this.branches=i,this.otherwise=r}static parse(e,i){if(e.length<4)return i.error(`Expected at least 3 arguments, but found only ${e.length-1}.`);if(e.length%2!=0)return i.error("Expected an odd number of arguments.");let r;i.expectedType&&i.expectedType.kind!=="value"&&(r=i.expectedType);const o=[];for(let s=1;s<e.length-1;s+=2){const a=i.parse(e[s],s,Ut);if(!a)return null;const l=i.parse(e[s+1],s+1,r);if(!l)return null;o.push([a,l]),r=r||l.type}const n=i.parse(e[e.length-1],e.length-1,r);return n?new Rp(r,o,n):null}evaluate(e){for(const[i,r]of this.branches)if(i.evaluate(e))return r.evaluate(e);return this.otherwise.evaluate(e)}eachChild(e){for(const[i,r]of this.branches)e(i),e(r);e(this.otherwise)}outputDefined(){return this.branches.every(([e,i])=>i.outputDefined())&&this.otherwise.outputDefined()}serialize(){const e=["case"];return this.eachChild(i=>{e.push(i.serialize())}),e}}var TS=Rp;class nu{constructor(e,i,r,o){this.type=e,this.input=i,this.beginIndex=r,this.endIndex=o}static parse(e,i){if(e.length<=2||e.length>=5)return i.error(`Expected 3 or 4 arguments, but found ${e.length-1} instead.`);const r=i.parse(e[1],1,jt),o=i.parse(e[2],2,ze);if(!r||!o)return null;if(!Yd(r.type,[zr(jt),Ft,jt]))return i.error(`Expected first argument to be of type array or string, but found ${Ni(r.type)} instead`);if(e.length===4){const n=i.parse(e[3],3,ze);return n?new nu(r.type,r,o,n):null}return new nu(r.type,r,o)}evaluate(e){const i=this.input.evaluate(e),r=this.beginIndex.evaluate(e);if(!vl(i,["string","array"]))throw new or(`Expected first argument to be of type array or string, but found ${Ni(Ji(i))} instead.`);if(this.endIndex){const o=this.endIndex.evaluate(e);return i.slice(r,o)}return i.slice(r)}eachChild(e){e(this.input),e(this.beginIndex),this.endIndex&&e(this.endIndex)}outputDefined(){return!1}serialize(){if(this.endIndex!=null&&this.endIndex!==void 0){const e=this.endIndex.serialize();return["slice",this.input.serialize(),this.beginIndex.serialize(),e]}return["slice",this.input.serialize(),this.beginIndex.serialize()]}}var ES=nu;function gy(t,e){return t==="=="||t==="!="?e.kind==="boolean"||e.kind==="string"||e.kind==="number"||e.kind==="null"||e.kind==="value":e.kind==="string"||e.kind==="number"||e.kind==="value"}function yy(t,e,i,r){return r.compare(e,i)===0}function xa(t,e,i){const r=t!=="=="&&t!=="!=";return class TT{constructor(n,s,a){this.type=Ut,this.lhs=n,this.rhs=s,this.collator=a,this.hasUntypedArgument=n.type.kind==="value"||s.type.kind==="value"}static parse(n,s){if(n.length!==3&&n.length!==4)return s.error("Expected two or three arguments.");const a=n[0];let l=s.parse(n[1],1,jt);if(!l)return null;if(!gy(a,l.type))return s.concat(1).error(`"${a}" comparisons are not supported for type '${Ni(l.type)}'.`);let c=s.parse(n[2],2,jt);if(!c)return null;if(!gy(a,c.type))return s.concat(2).error(`"${a}" comparisons are not supported for type '${Ni(c.type)}'.`);if(l.type.kind!==c.type.kind&&l.type.kind!=="value"&&c.type.kind!=="value")return s.error(`Cannot compare types '${Ni(l.type)}' and '${Ni(c.type)}'.`);r&&(l.type.kind==="value"&&c.type.kind!=="value"?l=new un(c.type,[l]):l.type.kind!=="value"&&c.type.kind==="value"&&(c=new un(l.type,[c])));let u=null;if(n.length===4){if(l.type.kind!=="string"&&c.type.kind!=="string"&&l.type.kind!=="value"&&c.type.kind!=="value")return s.error("Cannot use collator to compare non-string types.");if(u=s.parse(n[3],3,Wc),!u)return null}return new TT(l,c,u)}evaluate(n){const s=this.lhs.evaluate(n),a=this.rhs.evaluate(n);if(r&&this.hasUntypedArgument){const l=Ji(s),c=Ji(a);if(l.kind!==c.kind||l.kind!=="string"&&l.kind!=="number")throw new or(`Expected arguments for "${t}" to be (string, string) or (number, number), but found (${l.kind}, ${c.kind}) instead.`)}if(this.collator&&!r&&this.hasUntypedArgument){const l=Ji(s),c=Ji(a);if(l.kind!=="string"||c.kind!=="string")return e(n,s,a)}return this.collator?i(n,s,a,this.collator.evaluate(n)):e(n,s,a)}eachChild(n){n(this.lhs),n(this.rhs),this.collator&&n(this.collator)}outputDefined(){return!0}serialize(){const n=[t];return this.eachChild(s=>{n.push(s.serialize())}),n}}}const SS=xa("==",function(t,e,i){return e===i},yy),AS=xa("!=",function(t,e,i){return e!==i},function(t,e,i,r){return!yy(0,e,i,r)}),MS=xa("<",function(t,e,i){return e<i},function(t,e,i,r){return r.compare(e,i)<0}),IS=xa(">",function(t,e,i){return e>i},function(t,e,i,r){return r.compare(e,i)>0}),CS=xa("<=",function(t,e,i){return e<=i},function(t,e,i,r){return r.compare(e,i)<=0}),kS=xa(">=",function(t,e,i){return e>=i},function(t,e,i,r){return r.compare(e,i)>=0});class Lp{constructor(e,i,r,o,n,s){this.type=Ft,this.number=e,this.locale=i,this.currency=r,this.unit=o,this.minFractionDigits=n,this.maxFractionDigits=s}static parse(e,i){if(e.length!==3)return i.error("Expected two arguments.");const r=i.parse(e[1],1,ze);if(!r)return null;const o=e[2];if(typeof o!="object"||Array.isArray(o))return i.error("NumberFormat options argument must be an object.");let n=null;if(o.locale&&(n=i.parse(o.locale,1,Ft),!n))return null;let s=null;if(o.currency&&(s=i.parse(o.currency,1,Ft),!s))return null;let a=null;if(o.unit&&(a=i.parse(o.unit,1,Ft),!a))return null;let l=null;if(o["min-fraction-digits"]&&(l=i.parse(o["min-fraction-digits"],1,ze),!l))return null;let c=null;return o["max-fraction-digits"]&&(c=i.parse(o["max-fraction-digits"],1,ze),!c)?null:new Lp(r,n,s,a,l,c)}evaluate(e){return new Intl.NumberFormat(this.locale?this.locale.evaluate(e):[],{style:(this.currency?"currency":this.unit&&"unit")||"decimal",currency:this.currency?this.currency.evaluate(e):void 0,unit:this.unit?this.unit.evaluate(e):void 0,minimumFractionDigits:this.minFractionDigits?this.minFractionDigits.evaluate(e):void 0,maximumFractionDigits:this.maxFractionDigits?this.maxFractionDigits.evaluate(e):void 0}).format(this.number.evaluate(e))}eachChild(e){e(this.number),this.locale&&e(this.locale),this.currency&&e(this.currency),this.unit&&e(this.unit),this.minFractionDigits&&e(this.minFractionDigits),this.maxFractionDigits&&e(this.maxFractionDigits)}outputDefined(){return!1}serialize(){const e={};return this.locale&&(e.locale=this.locale.serialize()),this.currency&&(e.currency=this.currency.serialize()),this.unit&&(e.unit=this.unit.serialize()),this.minFractionDigits&&(e["min-fraction-digits"]=this.minFractionDigits.serialize()),this.maxFractionDigits&&(e["max-fraction-digits"]=this.maxFractionDigits.serialize()),["number-format",this.number.serialize(),e]}}class Op{constructor(e){this.type=ze,this.input=e}static parse(e,i){if(e.length!==2)return i.error(`Expected 1 argument, but found ${e.length-1} instead.`);const r=i.parse(e[1],1);return r?r.type.kind!=="array"&&r.type.kind!=="string"&&r.type.kind!=="value"?i.error(`Expected argument of type string or array, but found ${Ni(r.type)} instead.`):new Op(r):null}evaluate(e){const i=this.input.evaluate(e);if(typeof i=="string"||Array.isArray(i))return i.length;throw new or(`Expected value to be of type string or array, but found ${Ni(Ji(i))} instead.`)}eachChild(e){e(this.input)}outputDefined(){return!1}serialize(){const e=["length"];return this.eachChild(i=>{e.push(i.serialize())}),e}}function Bp(t){return function(){t=1831565813+(t|=0)|0;let e=Math.imul(t^t>>>15,1|t);return e=e+Math.imul(e^e>>>7,61|e)^e,((e^e>>>14)>>>0)/4294967296}}const vy={"==":SS,"!=":AS,">":IS,"<":MS,">=":kS,"<=":CS,array:un,at:vS,boolean:un,case:TS,coalesce:my,collator:Xc,format:wl,image:Tl,in:xS,"index-of":bS,interpolate:Fo,"interpolate-hcl":Fo,"interpolate-lab":Fo,length:Op,let:_y,literal:bl,match:wS,number:un,"number-format":Lp,object:un,slice:ES,step:Tp,string:un,"to-boolean":Ss,"to-color":Ss,"to-number":Ss,"to-string":Ss,var:ny,within:ap,distance:gp};function xy(t,[e,i,r,o]){e=e.evaluate(t),i=i.evaluate(t),r=r.evaluate(t);const n=o?o.evaluate(t):1,s=Ug(e,i,r,n);if(s)throw new or(s);return new bt(e/255*n,i/255*n,r/255*n,n)}function by(t,[e,i,r,o]){e=e.evaluate(t),i=i.evaluate(t),r=r.evaluate(t);const n=o?o.evaluate(t):1,s=function(c,u,p,f){return typeof c=="number"&&c>=0&&c<=360?typeof u=="number"&&u>=0&&u<=100&&typeof p=="number"&&p>=0&&p<=100?f===void 0||typeof f=="number"&&f>=0&&f<=1?null:`Invalid hsla value [${[c,u,p,f].join(", ")}]: 'a' must be between 0 and 1.`:`Invalid hsla value [${(typeof f=="number"?[c,u,p,f]:[c,u,p]).join(", ")}]: 's', and 'l' must be between 0 and 100.`:`Invalid hsla value [${(typeof f=="number"?[c,u,p,f]:[c,u,p]).join(", ")}]: 'h' must be between 0 and 360.`}(e,i,r,n);if(s)throw new or(s);const a=`hsla(${e}, ${i}%, ${r}%, ${n})`,l=bt.parse(a);if(!l)throw new or(`Failed to parse HSLA color: ${a}`);return l}function wy(t,e){return t in e}function Fp(t,e){const i=e[t];return i===void 0?null:i}function Ty(t,e){switch(t){case"string":return String(e);case"number":return+e;case"boolean":return!!e;case"color":return bt.parse(e)}return e}function Ey(t,e,i,r){return r!==void 0&&(t=r*Math.round(t/r)),e!==void 0&&t<e&&(t=e),i!==void 0&&t>i&&(t=i),t}function Sy(t,e,i){i.length&&(e+=`${i}`);const r=t.getConfig(e);if(!r)return null;const{type:o,value:n,values:s,minValue:a,maxValue:l,stepValue:c}=r,u=r.default.evaluate(t);let p=n?n.evaluate(t):u;return o&&(p=Ty(o,p)),n!==void 0&&p!==void 0&&s&&!s.includes(p)&&(p=u,o&&(p=Ty(o,p))),p===void 0||a===void 0&&l===void 0&&c===void 0||(typeof p=="number"?p=Ey(p,a,l,c):Array.isArray(p)&&(p=p.map(f=>typeof f=="number"?Ey(f,a,l,c):f))),p}function Is(t){return{type:t}}Bo.register(vy,{error:[{kind:"error"},[Ft],(t,[e])=>{throw new or(e.evaluate(t))}],typeof:[Ft,[jt],(t,[e])=>Ni(Ji(e.evaluate(t)))],"to-rgba":[zr(ze,4),[ao],(t,[e])=>e.evaluate(t).toArray()],rgb:[ao,[ze,ze,ze],xy],rgba:[ao,[ze,ze,ze,ze],xy],hsl:[ao,[ze,ze,ze],by],hsla:[ao,[ze,ze,ze,ze],by],has:{type:Ut,overloads:[[[Ft],(t,[e])=>wy(e.evaluate(t),t.properties())],[[Ft,pa],(t,[e,i])=>wy(e.evaluate(t),i.evaluate(t))]]},get:{type:jt,overloads:[[[Ft],(t,[e])=>Fp(e.evaluate(t),t.properties())],[[Ft,pa],(t,[e,i])=>Fp(e.evaluate(t),i.evaluate(t))]]},config:{type:jt,overloads:[[[Ft],(t,[e])=>Sy(t,e.evaluate(t),"")],[[Ft,Ft],(t,[e,i])=>Sy(t,e.evaluate(t),i.evaluate(t))]]},"feature-state":[jt,[Ft],(t,[e])=>Fp(e.evaluate(t),t.featureState||{})],properties:[pa,[],t=>t.properties()],"geometry-type":[Ft,[],t=>t.geometryType()],id:[jt,[],t=>t.id()],zoom:[ze,[],t=>t.globals.zoom],pitch:[ze,[],t=>t.globals.pitch||0],"distance-from-center":[ze,[],t=>t.distanceFromCenter()],"measure-light":[ze,[Ft],(t,[e])=>t.measureLight(e.evaluate(t))],"heatmap-density":[ze,[],t=>t.globals.heatmapDensity||0],"line-progress":[ze,[],t=>t.globals.lineProgress||0],"raster-value":[ze,[],t=>t.globals.rasterValue||0],"sky-radial-progress":[ze,[],t=>t.globals.skyRadialProgress||0],accumulated:[jt,[],t=>t.globals.accumulated===void 0?null:t.globals.accumulated],"+":[ze,Is(ze),(t,e)=>{let i=0;for(const r of e)i+=r.evaluate(t);return i}],"*":[ze,Is(ze),(t,e)=>{let i=1;for(const r of e)i*=r.evaluate(t);return i}],"-":{type:ze,overloads:[[[ze,ze],(t,[e,i])=>e.evaluate(t)-i.evaluate(t)],[[ze],(t,[e])=>-e.evaluate(t)]]},"/":[ze,[ze,ze],(t,[e,i])=>e.evaluate(t)/i.evaluate(t)],"%":[ze,[ze,ze],(t,[e,i])=>e.evaluate(t)%i.evaluate(t)],ln2:[ze,[],()=>Math.LN2],pi:[ze,[],()=>Math.PI],e:[ze,[],()=>Math.E],"^":[ze,[ze,ze],(t,[e,i])=>Math.pow(e.evaluate(t),i.evaluate(t))],sqrt:[ze,[ze],(t,[e])=>Math.sqrt(e.evaluate(t))],log10:[ze,[ze],(t,[e])=>Math.log(e.evaluate(t))/Math.LN10],ln:[ze,[ze],(t,[e])=>Math.log(e.evaluate(t))],log2:[ze,[ze],(t,[e])=>Math.log(e.evaluate(t))/Math.LN2],sin:[ze,[ze],(t,[e])=>Math.sin(e.evaluate(t))],cos:[ze,[ze],(t,[e])=>Math.cos(e.evaluate(t))],tan:[ze,[ze],(t,[e])=>Math.tan(e.evaluate(t))],asin:[ze,[ze],(t,[e])=>Math.asin(e.evaluate(t))],acos:[ze,[ze],(t,[e])=>Math.acos(e.evaluate(t))],atan:[ze,[ze],(t,[e])=>Math.atan(e.evaluate(t))],min:[ze,Is(ze),(t,e)=>Math.min(...e.map(i=>i.evaluate(t)))],max:[ze,Is(ze),(t,e)=>Math.max(...e.map(i=>i.evaluate(t)))],abs:[ze,[ze],(t,[e])=>Math.abs(e.evaluate(t))],round:[ze,[ze],(t,[e])=>{const i=e.evaluate(t);return i<0?-Math.round(-i):Math.round(i)}],floor:[ze,[ze],(t,[e])=>Math.floor(e.evaluate(t))],ceil:[ze,[ze],(t,[e])=>Math.ceil(e.evaluate(t))],"filter-==":[Ut,[Ft,jt],(t,[e,i])=>t.properties()[e.value]===i.value],"filter-id-==":[Ut,[jt],(t,[e])=>t.id()===e.value],"filter-type-==":[Ut,[Ft],(t,[e])=>t.geometryType()===e.value],"filter-<":[Ut,[Ft,jt],(t,[e,i])=>{const r=t.properties()[e.value],o=i.value;return typeof r==typeof o&&r<o}],"filter-id-<":[Ut,[jt],(t,[e])=>{const i=t.id(),r=e.value;return typeof i==typeof r&&i<r}],"filter->":[Ut,[Ft,jt],(t,[e,i])=>{const r=t.properties()[e.value],o=i.value;return typeof r==typeof o&&r>o}],"filter-id->":[Ut,[jt],(t,[e])=>{const i=t.id(),r=e.value;return typeof i==typeof r&&i>r}],"filter-<=":[Ut,[Ft,jt],(t,[e,i])=>{const r=t.properties()[e.value],o=i.value;return typeof r==typeof o&&r<=o}],"filter-id-<=":[Ut,[jt],(t,[e])=>{const i=t.id(),r=e.value;return typeof i==typeof r&&i<=r}],"filter->=":[Ut,[Ft,jt],(t,[e,i])=>{const r=t.properties()[e.value],o=i.value;return typeof r==typeof o&&r>=o}],"filter-id->=":[Ut,[jt],(t,[e])=>{const i=t.id(),r=e.value;return typeof i==typeof r&&i>=r}],"filter-has":[Ut,[jt],(t,[e])=>e.value in t.properties()],"filter-has-id":[Ut,[],t=>t.id()!==null&&t.id()!==void 0],"filter-type-in":[Ut,[zr(Ft)],(t,[e])=>e.value.indexOf(t.geometryType())>=0],"filter-id-in":[Ut,[zr(jt)],(t,[e])=>e.value.indexOf(t.id())>=0],"filter-in-small":[Ut,[Ft,zr(jt)],(t,[e,i])=>i.value.indexOf(t.properties()[e.value])>=0],"filter-in-large":[Ut,[Ft,zr(jt)],(t,[e,i])=>function(r,o,n,s){for(;n<=s;){const a=n+s>>1;if(o[a]===r)return!0;o[a]>r?s=a-1:n=a+1}return!1}(t.properties()[e.value],i.value,0,i.value.length-1)],all:{type:Ut,overloads:[[[Ut,Ut],(t,[e,i])=>e.evaluate(t)&&i.evaluate(t)],[Is(Ut),(t,e)=>{for(const i of e)if(!i.evaluate(t))return!1;return!0}]]},any:{type:Ut,overloads:[[[Ut,Ut],(t,[e,i])=>e.evaluate(t)||i.evaluate(t)],[Is(Ut),(t,e)=>{for(const i of e)if(i.evaluate(t))return!0;return!1}]]},"!":[Ut,[Ut],(t,[e])=>!e.evaluate(t)],"is-supported-script":[Ut,[Ft],(t,[e])=>{const i=t.globals&&t.globals.isSupportedScript;return!i||i(e.evaluate(t))}],upcase:[Ft,[Ft],(t,[e])=>e.evaluate(t).toUpperCase()],downcase:[Ft,[Ft],(t,[e])=>e.evaluate(t).toLowerCase()],concat:[Ft,Is(jt),(t,e)=>e.map(i=>xl(i.evaluate(t))).join("")],"resolved-locale":[Ft,[Wc],(t,[e])=>e.evaluate(t).resolvedLocale()],random:[ze,[ze,ze,jt],(t,e)=>{const[i,r,o]=e.map(s=>s.evaluate(t));if(i>r||i===r)return i;let n;if(typeof o=="string")n=function(s){let a=0;if(s.length===0)return a;for(let l=0;l<s.length;l++)a=(a<<5)-a+s.charCodeAt(l),a&=a;return a}(o);else{if(typeof o!="number")throw new or(`Invalid seed input: ${o}`);n=o}return i+Bp(n)()*(r-i)}]});var Pl=vy;function Ay(t){return{result:"success",value:t}}function Cs(t){return{result:"error",value:t}}function My(t,e){return!!t&&!!t.parameters&&t.parameters.indexOf(e)>-1}function ks(t){return t["property-type"]==="data-driven"}function Iy(t){return My(t.expression,"measure-light")}function Np(t){return My(t.expression,"zoom")}function jp(t){return!!t.expression&&t.expression.interpolated}function su(t){return typeof t=="object"&&t!==null&&!Array.isArray(t)}function PS(t){return t}function Cy(t,e){const i=e.type==="color",r=t.stops&&typeof t.stops[0][0]=="object",o=r||!(r||t.property!==void 0),n=t.type||(jp(e)?"exponential":"interval");if(i&&((t=ln({},t)).stops&&(t.stops=t.stops.map(c=>[c[0],bt.parse(c[1])])),t.default=bt.parse(t.default?t.default:e.default)),t.colorSpace&&t.colorSpace!=="rgb"&&!fy[t.colorSpace])throw new Error(`Unknown color space: ${t.colorSpace}`);let s,a,l;if(n==="exponential")s=ky;else if(n==="interval")s=zS;else if(n==="categorical"){s=DS,a=Object.create(null);for(const c of t.stops)a[c[0]]=c[1];l=typeof t.stops[0][0]}else{if(n!=="identity")throw new Error(`Unknown function type "${n}"`);s=RS}if(r){const c={},u=[];for(let _=0;_<t.stops.length;_++){const g=t.stops[_],y=g[0].zoom;c[y]===void 0&&(c[y]={zoom:y,type:t.type,property:t.property,default:t.default,stops:[]},u.push(y)),c[y].stops.push([g[0].value,g[1]])}const p=[];for(const _ of u)p.push([c[_].zoom,Cy(c[_],e)]);const f={name:"linear"};return{kind:"composite",interpolationType:f,interpolationFactor:Fo.interpolationFactor.bind(void 0,f),zoomStops:p.map(_=>_[0]),evaluate:({zoom:_},g)=>ky({stops:p,base:t.base},e,_).evaluate(_,g)}}if(o){const c=n==="exponential"?{name:"exponential",base:t.base!==void 0?t.base:1}:null;return{kind:"camera",interpolationType:c,interpolationFactor:Fo.interpolationFactor.bind(void 0,c),zoomStops:t.stops.map(u=>u[0]),evaluate:({zoom:u})=>s(t,e,u,a,l)}}return{kind:"source",evaluate(c,u){const p=u&&u.properties?u.properties[t.property]:void 0;return p===void 0?Dl(t.default,e.default):s(t,e,p,a,l)}}}function Dl(t,e,i){return t!==void 0?t:e!==void 0?e:i!==void 0?i:void 0}function DS(t,e,i,r,o){return Dl(typeof i===o?r[i]:void 0,t.default,e.default)}function zS(t,e,i){if(Yt(i)!=="number")return Dl(t.default,e.default);const r=t.stops.length;if(r===1||i<=t.stops[0][0])return t.stops[0][1];if(i>=t.stops[r-1][0])return t.stops[r-1][1];const o=tu(t.stops.map(n=>n[0]),i);return t.stops[o][1]}function ky(t,e,i){const r=t.base!==void 0?t.base:1;if(Yt(i)!=="number")return Dl(t.default,e.default);const o=t.stops.length;if(o===1||i<=t.stops[0][0])return t.stops[0][1];if(i>=t.stops[o-1][0])return t.stops[o-1][1];const n=tu(t.stops.map(u=>u[0]),i),s=function(u,p,f,_){const g=_-f,y=u-f;return g===0?0:p===1?y/g:(Math.pow(p,y)-1)/(Math.pow(p,g)-1)}(i,r,t.stops[n][0],t.stops[n+1][0]),a=t.stops[n][1],l=t.stops[n+1][1];let c=iu[e.type]||PS;if(t.colorSpace&&t.colorSpace!=="rgb"){const u=fy[t.colorSpace];c=(p,f)=>u.reverse(u.interpolate(u.forward(p),u.forward(f),s))}return typeof a.evaluate=="function"?{evaluate(...u){const p=a.evaluate.apply(void 0,u),f=l.evaluate.apply(void 0,u);if(p!==void 0&&f!==void 0)return c(p,f,s)}}:c(a,l,s)}function RS(t,e,i){return e.type==="color"?i=bt.parse(i):e.type==="formatted"?i=Lr.fromString(i.toString()):e.type==="resolvedImage"?i=lo.fromString(i.toString()):Yt(i)===e.type||e.type==="enum"&&e.values[i]||(i=void 0),Dl(i,t.default,e.default)}class Vp{constructor(e,i,r){this.expression=e,this._warningHistory={},this._evaluator=new qg(r),this._defaultValue=i?function(o){return o.type==="color"&&(su(o.default)||Array.isArray(o.default))?new bt(0,0,0,0):o.type==="color"?bt.parse(o.default)||null:o.default===void 0?null:o.default}(i):null,this._enumValues=i&&i.type==="enum"?i.values:null}evaluateWithoutErrorHandling(e,i,r,o,n,s,a,l){return this._evaluator.globals=e,this._evaluator.feature=i,this._evaluator.featureState=r,this._evaluator.canonical=o||null,this._evaluator.availableImages=n||null,this._evaluator.formattedSection=s,this._evaluator.featureTileCoord=a||null,this._evaluator.featureDistanceData=l||null,this.expression.evaluate(this._evaluator)}evaluate(e,i,r,o,n,s,a,l){this._evaluator.globals=e,this._evaluator.feature=i||null,this._evaluator.featureState=r||null,this._evaluator.canonical=o||null,this._evaluator.availableImages=n||null,this._evaluator.formattedSection=s||null,this._evaluator.featureTileCoord=a||null,this._evaluator.featureDistanceData=l||null;try{const c=this.expression.evaluate(this._evaluator);if(c==null||typeof c=="number"&&c!=c)return this._defaultValue;if(this._enumValues&&!(c in this._enumValues))throw new or(`Expected value to be one of ${Object.keys(this._enumValues).map(u=>JSON.stringify(u)).join(", ")}, but found ${JSON.stringify(c)} instead.`);return c}catch(c){return this._warningHistory[c.message]||(this._warningHistory[c.message]=!0,typeof console<"u"&&console.warn(c.message)),this._defaultValue}}}function au(t){return Array.isArray(t)&&t.length>0&&typeof t[0]=="string"&&t[0]in Pl}function Fn(t,e,i){const r=new sy(Pl,[],e?function(n){const s={color:ao,string:Ft,number:ze,enum:Ft,boolean:Ut,formatted:_l,resolvedImage:gl};return n.type==="array"?zr(s[n.value]||jt,n.length):s[n.type]}(e):void 0,void 0,void 0,i),o=r.parse(t,void 0,void 0,void 0,e&&e.type==="string"?{typeAnnotation:"coerce"}:void 0);return o?Ay(new Vp(o,e,i)):Cs(r.errors)}class Up{constructor(e,i,r){this.kind=e,this._styleExpression=i,this.isLightConstant=r,this.isStateDependent=e!=="constant"&&!Il(i.expression),this.isConfigDependent=!yp(i.expression)}evaluateWithoutErrorHandling(e,i,r,o,n,s){return this._styleExpression.evaluateWithoutErrorHandling(e,i,r,o,n,s)}evaluate(e,i,r,o,n,s){return this._styleExpression.evaluate(e,i,r,o,n,s)}}class Nn{constructor(e,i,r,o,n){this.kind=e,this.zoomStops=r,this._styleExpression=i,this.isStateDependent=e!=="camera"&&!Il(i.expression),this.isLightConstant=n,this.isConfigDependent=!yp(i.expression),this.interpolationType=o}evaluateWithoutErrorHandling(e,i,r,o,n,s){return this._styleExpression.evaluateWithoutErrorHandling(e,i,r,o,n,s)}evaluate(e,i,r,o,n,s){return this._styleExpression.evaluate(e,i,r,o,n,s)}interpolationFactor(e,i,r){return this.interpolationType?Fo.interpolationFactor(this.interpolationType,e,i,r):0}}function qp(t,e,i){if((t=Fn(t,e,i)).result==="error")return t;const r=t.value.expression,o=ga(r);if(!o&&!ks(e))return Cs([new Oo("","data expressions not supported")]);const n=ya(r,["zoom","pitch","distance-from-center"]);if(!n&&!Np(e))return Cs([new Oo("","zoom expressions not supported")]);const s=ya(r,["measure-light"]);if(!s&&!Iy(e))return Cs([new Oo("","measure-light expression not supported")]);const a=e.expression&&e.expression.relaxZoomRestriction,l=cu(r);return l||n||a?l instanceof Oo?Cs([l]):l instanceof Fo&&!jp(e)?Cs([new Oo("",'"interpolate" expressions cannot be used with this property')]):Ay(l?new Nn(o?"camera":"composite",t.value,l.labels,l instanceof Fo?l.interpolation:void 0,s):new Up(o?"constant":"source",t.value,s)):Cs([new Oo("",'"zoom" expression may only be used as input to a top-level "step" or "interpolate" expression, or in the properties of atmosphere.')])}class lu{constructor(e,i){this._parameters=e,this._specification=i,ln(this,Cy(this._parameters,this._specification))}static deserialize(e){return new lu(e._parameters,e._specification)}static serialize(e){return{_parameters:e._parameters,_specification:e._specification}}}function cu(t){let e=null;if(t instanceof _y)e=cu(t.result);else if(t instanceof my){for(const i of t.args)if(e=cu(i),e)break}else(t instanceof Tp||t instanceof Fo)&&t.input instanceof Bo&&t.input.name==="zoom"&&(e=t);return e instanceof Oo||t.eachChild(i=>{const r=cu(i);r instanceof Oo?e=r:e&&r&&e!==r&&(e=new Oo("",'Only one zoom-based "step" or "interpolate" subexpression may be used in an expression.'))}),e}function co(t){const e=t.key,i=t.value,r=t.valueSpec||{},o=t.objectElementValidators||{},n=t.style,s=t.styleSpec;let a=[];const l=Yt(i);if(l!=="object")return[new Oe(e,i,`object expected, ${l} found`)];for(const c in i){const u=c.split(".")[0];let p;o[u]?p=o[u]:r[u]?p=ar:o["*"]?p=o["*"]:r["*"]&&(p=ar),p?a=a.concat(p({key:(e&&`${e}.`)+c,value:i[c],valueSpec:r[u]||r["*"],style:n,styleSpec:s,object:i,objectKey:c},i)):a.push(new Es(e,i[c],`unknown property "${c}"`))}for(const c in r)o[c]||r[c].required&&r[c].default===void 0&&i[c]===void 0&&a.push(new Oe(e,i,`missing required property "${c}"`));return a}function Py(t){const e=t.value,i=t.valueSpec,r=t.style,o=t.styleSpec,n=t.key,s=t.arrayElementValidator||ar;if(Yt(e)!=="array")return[new Oe(n,e,`array expected, ${Yt(e)} found`)];if(i.length&&e.length!==i.length)return[new Oe(n,e,`array length ${i.length} expected, length ${e.length} found`)];if(i["min-length"]&&e.length<i["min-length"])return[new Oe(n,e,`array length at least ${i["min-length"]} expected, length ${e.length} found`)];let a={type:i.value,values:i.values,minimum:i.minimum,maximum:i.maximum,function:void 0};o.$version<7&&(a.function=i.function),Yt(i.value)==="object"&&(a=i.value);let l=[];for(let c=0;c<e.length;c++)l=l.concat(s({array:e,arrayIndex:c,value:e[c],valueSpec:a,style:r,styleSpec:o,key:`${n}[${c}]`},!0));return l}function Dy(t){const e=t.key,i=t.value,r=t.valueSpec;let o=Yt(i);if(o==="number"&&i!=i&&(o="NaN"),o!=="number")return[new Oe(e,i,`number expected, ${o} found`)];if("minimum"in r){let n=r.minimum;if(Yt(r.minimum)==="array"&&(n=r.minimum[t.arrayIndex]),i<n)return[new Oe(e,i,`${i} is less than the minimum value ${n}`)]}if("maximum"in r){let n=r.maximum;if(Yt(r.maximum)==="array"&&(n=r.maximum[t.arrayIndex]),i>n)return[new Oe(e,i,`${i} is greater than the maximum value ${n}`)]}return[]}function zy(t){const e=t.valueSpec,i=Gi(t.value.type);let r,o,n,s={};const a=i!=="categorical"&&t.value.property===void 0,l=!a,c=Yt(t.value.stops)==="array"&&Yt(t.value.stops[0])==="array"&&Yt(t.value.stops[0][0])==="object",u=co({key:t.key,value:t.value,valueSpec:t.styleSpec.function,style:t.style,styleSpec:t.styleSpec,objectElementValidators:{stops:function(_){if(i==="identity")return[new Oe(_.key,_.value,'identity function may not have a "stops" property')];let g=[];const y=_.value;return g=g.concat(Py({key:_.key,value:y,valueSpec:_.valueSpec,style:_.style,styleSpec:_.styleSpec,arrayElementValidator:p})),Yt(y)==="array"&&y.length===0&&g.push(new Oe(_.key,y,"array must have at least one stop")),g},default:function(_){return ar({key:_.key,value:_.value,valueSpec:e,style:_.style,styleSpec:_.styleSpec})}}});return i==="identity"&&a&&u.push(new Oe(t.key,t.value,'missing required property "property"')),i==="identity"||t.value.stops||u.push(new Oe(t.key,t.value,'missing required property "stops"')),i==="exponential"&&t.valueSpec.expression&&!jp(t.valueSpec)&&u.push(new Oe(t.key,t.value,"exponential functions not supported")),t.styleSpec.$version>=8&&(l&&!ks(t.valueSpec)?u.push(new Oe(t.key,t.value,"property functions not supported")):a&&!Np(t.valueSpec)&&u.push(new Oe(t.key,t.value,"zoom functions not supported"))),i!=="categorical"&&!c||t.value.property!==void 0||u.push(new Oe(t.key,t.value,'"property" property is required')),u;function p(_){let g=[];const y=_.value,v=_.key;if(Yt(y)!=="array")return[new Oe(v,y,`array expected, ${Yt(y)} found`)];if(y.length!==2)return[new Oe(v,y,`array length 2 expected, length ${y.length} found`)];if(c){if(Yt(y[0])!=="object")return[new Oe(v,y,`object expected, ${Yt(y[0])} found`)];if(y[0].zoom===void 0)return[new Oe(v,y,"object stop key must have zoom")];if(y[0].value===void 0)return[new Oe(v,y,"object stop key must have value")];const b=Gi(y[0].zoom);if(typeof b!="number")return[new Oe(v,y[0].zoom,"stop zoom values must be numbers")];if(n&&n>b)return[new Oe(v,y[0].zoom,"stop zoom values must appear in ascending order")];b!==n&&(n=b,o=void 0,s={}),g=g.concat(co({key:`${v}[0]`,value:y[0],valueSpec:{zoom:{}},style:_.style,styleSpec:_.styleSpec,objectElementValidators:{zoom:Dy,value:f}}))}else g=g.concat(f({key:`${v}[0]`,value:y[0],style:_.style,styleSpec:_.styleSpec},y));return au(cn(y[1]))?g.concat([new Oe(`${v}[1]`,y[1],"expressions are not allowed in function stops.")]):g.concat(ar({key:`${v}[1]`,value:y[1],valueSpec:e,style:_.style,styleSpec:_.styleSpec}))}function f(_,g){const y=Yt(_.value),v=Gi(_.value),b=_.value!==null?_.value:g;if(r){if(y!==r)return[new Oe(_.key,b,`${y} stop domain type must match previous stop domain type ${r}`)]}else r=y;if(y!=="number"&&y!=="string"&&y!=="boolean"&&typeof v!="number"&&typeof v!="string"&&typeof v!="boolean")return[new Oe(_.key,b,"stop domain value must be a number, string, or boolean")];if(y!=="number"&&i!=="categorical"){let w=`number expected, ${y} found`;return ks(e)&&i===void 0&&(w+='\nIf you intended to use a categorical function, specify `"type": "categorical"`.'),[new Oe(_.key,b,w)]}return i!=="categorical"||y!=="number"||typeof v=="number"&&isFinite(v)&&Math.floor(v)===v?i!=="categorical"&&y==="number"&&typeof v=="number"&&typeof o=="number"&&o!==void 0&&v<o?[new Oe(_.key,b,"stop domain values must appear in ascending order")]:(o=v,i==="categorical"&&v in s?[new Oe(_.key,b,"stop domain values must be unique")]:(s[v]=!0,[])):[new Oe(_.key,b,`integer expected, found ${String(v)}`)]}}function Ps(t){const e=(t.expressionContext==="property"?qp:Fn)(cn(t.value),t.valueSpec);if(e.result==="error")return e.value.map(r=>new Oe(`${t.key}${r.key}`,t.value,r.message));const i=e.value.expression||e.value._styleExpression.expression;if(t.expressionContext==="property"&&t.propertyKey==="text-font"&&!i.outputDefined())return[new Oe(t.key,t.value,`Invalid data expression for "${t.propertyKey}". Output values must be contained as literals within the expression.`)];if(t.expressionContext==="property"&&t.propertyType==="layout"&&!Il(i))return[new Oe(t.key,t.value,'"feature-state" data expressions are not supported with layout properties.')];if(t.expressionContext==="filter")return Ry(i,t);if(t.expressionContext&&t.expressionContext.indexOf("cluster")===0){if(!ya(i,["zoom","feature-state"]))return[new Oe(t.key,t.value,'"zoom" and "feature-state" expressions are not supported with cluster properties.')];if(t.expressionContext==="cluster-initial"&&!ga(i))return[new Oe(t.key,t.value,"Feature data expressions are not supported with initial expression part of cluster properties.")]}return[]}function Ry(t,e){const i=new Set(["zoom","feature-state","pitch","distance-from-center"]);if(e.valueSpec&&e.valueSpec.expression)for(const o of e.valueSpec.expression.parameters)i.delete(o);if(i.size===0)return[];const r=[];return t instanceof Bo&&i.has(t.name)?[new Oe(e.key,e.value,`["${t.name}"] expression is not supported in a filter for a ${e.object.type} layer with id: ${e.object.id}`)]:(t.eachChild(o=>{r.push(...Ry(o,e))}),r)}function uu(t){const e=t.key,i=t.value,r=t.valueSpec,o=[];return Array.isArray(r.values)?r.values.indexOf(Gi(i))===-1&&o.push(new Oe(e,i,`expected one of [${r.values.join(", ")}], ${JSON.stringify(i)} found`)):Object.keys(r.values).indexOf(Gi(i))===-1&&o.push(new Oe(e,i,`expected one of [${Object.keys(r.values).join(", ")}], ${JSON.stringify(i)} found`)),o}function Gp(t){if(t===!0||t===!1)return!0;if(!Array.isArray(t)||t.length===0)return!1;switch(t[0]){case"has":return t.length>=2&&t[1]!=="$id"&&t[1]!=="$type";case"in":return t.length>=3&&(typeof t[1]!="string"||Array.isArray(t[2]));case"!in":case"!has":case"none":return!1;case"==":case"!=":case">":case">=":case"<":case"<=":return t.length!==3||Array.isArray(t[1])||Array.isArray(t[2]);case"any":case"all":for(const e of t.slice(1))if(!Gp(e)&&typeof e!="boolean")return!1;return!0;default:return!0}}function hu(t,e="fill"){if(t==null)return{filter:()=>!0,needGeometry:!1,needFeature:!1};Gp(t)||(t=du(t));const i=t;let r=!0;try{r=function(c){if(!ba(c))return c;let u=cn(c);return Oy(u),u=Ly(u),u}(i)}catch{console.warn(`Failed to extract static filter. Filter will continue working, but at higher memory usage and slower framerate.
2
2
  This is most likely a bug, please report this via https://github.com/mapbox/mapbox-gl-js/issues/new?assignees=&labels=&template=Bug_report.md
3
3
  and paste the contents of this message in the report.
4
4
  Thank you!