(window["webpackJsonp"]=window["webpackJsonp"]||[]).push([["chunk-d2111408"],{"229e":function(t,e,r){"use strict";r.d(e,"a",(function(){return Ct})),r.d(e,"b",(function(){return Ht})),r.d(e,"c",(function(){return $t})),r.d(e,"d",(function(){return qt})),r.d(e,"e",(function(){return Yt})),r.d(e,"f",(function(){return jt})),r.d(e,"g",(function(){return Kt}));var n,i,a=r("ab39"),s=r("ff93"),o=r("b2b2"),l=r("ae0b");!function(t){t[t.R8_SIGNED=0]="R8_SIGNED",t[t.R8_UNSIGNED=1]="R8_UNSIGNED",t[t.R16_SIGNED=2]="R16_SIGNED",t[t.R16_UNSIGNED=3]="R16_UNSIGNED",t[t.R8G8_SIGNED=4]="R8G8_SIGNED",t[t.R8G8_UNSIGNED=5]="R8G8_UNSIGNED",t[t.R16G16_SIGNED=6]="R16G16_SIGNED",t[t.R16G16_UNSIGNED=7]="R16G16_UNSIGNED",t[t.R8G8B8A8_SIGNED=8]="R8G8B8A8_SIGNED",t[t.R8G8B8A8_UNSIGNED=9]="R8G8B8A8_UNSIGNED",t[t.R8G8B8A8_COLOR=10]="R8G8B8A8_COLOR",t[t.R16G16B16A16_DASHARRAY=11]="R16G16B16A16_DASHARRAY",t[t.R16G16B16A16_PATTERN=12]="R16G16B16A16_PATTERN"}(n||(n={})),function(t){t[t.UNIFORM=0]="UNIFORM",t[t.DATA_DRIVEN=1]="DATA_DRIVEN",t[t.INTERPOLATED_DATA_DRIVEN=2]="INTERPOLATED_DATA_DRIVEN",t[t.UNUSED=3]="UNUSED"}(i||(i={}));var u=r("d17d"),c=r("3f3e");class h{constructor(t){this._locations=new Map,this._key=t}get key(){return this._key}get type(){return 7&this._key}defines(){return[]}getStride(){return this._layoutInfo||this._buildAttributesInfo(),this._stride}getAttributeLocations(){return 0===this._locations.size&&this._buildAttributesInfo(),this._locations}getLayoutInfo(){return this._layoutInfo||this._buildAttributesInfo(),this._layoutInfo}getEncodingInfos(){return this._propertyEncodingInfo||this._buildAttributesInfo(),this._propertyEncodingInfo}getUniforms(){return this._uniforms||this._buildAttributesInfo(),this._uniforms}getShaderHeader(){return this._shaderHeader||this._buildAttributesInfo(),this._shaderHeader}getShaderMain(){return this._shaderMain||this._buildAttributesInfo(),this._shaderMain}setDataUniforms(t,e,r,n,i){const a=this.getUniforms();for(const s of a){const{name:a,type:o,getValue:l}=s,u=l(r,e,n,i);if(null!==u)switch(o){case"float":t.setUniform1f(a,u);break;case"vec2":t.setUniform2fv(a,u);break;case"vec4":t.setUniform4fv(a,u)}}}encodeAttributes(t,e,r,i){const a=this.attributesInfo(),s=this.getEncodingInfos(),o=[];let l=0,u=0;for(const h of Object.keys(s)){var c;const p=s[h],{type:y,precisionFactor:f,isLayout:g}=a[h],d=g?r.getLayoutProperty(h):r.getPaintProperty(h),_=null==(c=d.interpolator)?void 0:c.getInterpolationRange(e);let m=0;for(const r of p){const{offset:a,bufferElementsToAdd:s}=r;if(s>0){for(let t=0;t4)n++,l={dataIndex:n,count:0,offset:0},4!==a&&(r[e]=l),t.push({location:-1,name:"a_data_"+n,count:a,type:e,normalized:s}),u=Math.ceil(Math.max(o/4,1));else{const e=t[l.dataIndex];e.count+=a,u=Math.ceil(Math.max(e.count*i/4,1))-Math.ceil(Math.max(l.offset/4,1))}c.push({dataIndex:l.dataIndex,offset:l.offset,bufferElementsToAdd:u}),l.offset+=o,l.count+=a}}for(const i of t)switch(i.type){case u["k"].BYTE:case u["k"].UNSIGNED_BYTE:i.count=4;case u["k"].SHORT:case u["k"].UNSIGNED_SHORT:i.count+=i.count%2}this._buildVertexBufferLayout(t);let l=0;const c=this._layoutInfo.geometry;for(const i of c)this._locations.set(i.name,l++);const p=this._layoutInfo.opacity;if(p)for(const i of p)this._locations.set(i.name,l++);this._buildShaderInfo(t,e),this._propertyEncodingInfo=e}_buildVertexBufferLayout(t){const e={},r=this.geometryInfo();let n=r[0].stride;if(0===t.length)e.geometry=r;else{const i=[];let a=n;for(const e of t)n+=p(e.type)*e.count;for(const t of r){const e={...t};e.stride=n,i.push(e)}for(const e of t)i.push(new c["a"](e.name,e.count,e.type,a,n)),a+=p(e.type)*e.count;e.geometry=i}this.opacityInfo()&&(e.opacity=this.opacityInfo()),this._layoutInfo=e,this._stride=n}_buildShaderInfo(t,e){let r="\n",a="\n";const s=[];for(const n of t)r+=`attribute ${this._getType(n.count)} ${n.name};\n`;const l=this.attributes(),u=this.attributesInfo();let c=-1;for(const p of l){c++;const{name:t,type:l,precisionFactor:f,isLayout:g}=u[p],d=f&&1!==f?" * "+1/f:"",{bytesPerElement:_,count:m}=h._encodingInfo[l],b=t=>`a_data_${t.dataIndex}${y(m,t.offset,_)}`;switch(this.getAtributeState(c)){case i.UNIFORM:{const e=this._getType(m),i="u_"+t;s.push({name:i,type:e,getValue:(t,e,r,i)=>{const a=g?t.getLayoutValue(p,e):t.getPaintValue(p,e);if(l===n.R16G16B16A16_DASHARRAY){const r=t.getDashKey(a,t.getLayoutValue("line-cap",e)),n=i.getMosaicItemPosition(r,!1);if(Object(o["j"])(n))return null;const{tl:s,br:l}=n;return[s[0],l[1],l[0],s[1]]}if(l===n.R16G16B16A16_PATTERN){const t=i.getMosaicItemPosition(a,-1===p.indexOf("line-"));if(Object(o["j"])(t))return null;const{tl:e,br:r}=t;return[e[0],r[1],r[0],e[1]]}if(l===n.R8G8B8A8_COLOR){const t=a[3];return[t*a[0],t*a[1],t*a[2],t]}return a}}),r+=`uniform ${e} ${i};\n`,a+=`${e} ${t} = ${i};\n`}break;case i.DATA_DRIVEN:{const r=b(e[p][0]);a+=`${this._getType(m)} ${t} = ${r}${d};\n`}break;case i.INTERPOLATED_DATA_DRIVEN:{const n="u_t_"+t;s.push({name:n,type:"float",getValue:(t,e,r,n)=>(g?t.getLayoutProperty(p):t.getPaintProperty(p)).interpolator.interpolationUniformValue(r,e)}),r+=`uniform float ${n};\n`;const i=b(e[p][0]),o=b(e[p][1]);a+=`${this._getType(m)} ${t} = mix(${i}${d}, ${o}${d}, ${n});\n`}}}this._shaderHeader=r,this._shaderMain=a,this._uniforms=s}_bit(t){return(this._key&1<>t}_getType(t){switch(t){case 1:return"float";case 2:return"vec2";case 3:return"vec3";case 4:return"vec4"}throw new Error("Invalid count")}_encodeColor(t){const e=255*t[3];return l["a"].i8888to32(t[0]*e,t[1]*e,t[2]*e,e)}_encodePattern(t,e,r){if(!r||!r.rect)return;const n=2,i=r.rect,a=r.width,s=r.height;e[t]=this._encodeShort(i.x+n,0),e[t]|=this._encodeShort(i.y+n+s,16),e[t+1]=this._encodeShort(i.x+n+a,0),e[t+1]|=this._encodeShort(i.y+n,16)}_encodeByte(t,e){return(255&t)<{switch(t){case u["k"].FLOAT:case u["k"].INT:case u["k"].UNSIGNED_INT:return 4;case u["k"].SHORT:case u["k"].UNSIGNED_SHORT:return 2;case u["k"].BYTE:case u["k"].UNSIGNED_BYTE:return 1}},y=(t,e,r)=>{const n=e/r;if(1===t)switch(n){case 0:return".x";case 1:return".y";case 2:return".z";case 3:return".w"}else if(2===t)switch(n){case 0:return".xy";case 1:return".yz";case 2:return".zw"}else if(3===t)switch(n){case 0:return".xyz";case 1:return".yzw"}return""};class f extends h{constructor(t){super(t)}geometryInfo(){return f.GEOMETRY_LAYOUT}opacityInfo(){return null}attributes(){return f.ATTRIBUTES}attributesInfo(){return f.ATTRIBUTES_INFO}}f.ATTRIBUTES=[],f.GEOMETRY_LAYOUT=[new c["a"]("a_pos",2,u["k"].BYTE,0,2)],f.ATTRIBUTES_INFO={};class g extends h{constructor(t){super(t)}geometryInfo(){return g.GEOMETRY_LAYOUT}opacityInfo(){return null}attributes(){return g.ATTRIBUTES}attributesInfo(){return g.ATTRIBUTES_INFO}}g.ATTRIBUTES=["circle-radius","circle-color","circle-opacity","circle-stroke-width","circle-stroke-color","circle-stroke-opacity","circle-blur"],g.GEOMETRY_LAYOUT=[new c["a"]("a_pos",2,u["k"].SHORT,0,4)],g.ATTRIBUTES_INFO={"circle-radius":{name:"radius",type:n.R8_UNSIGNED},"circle-color":{name:"color",type:n.R8G8B8A8_COLOR},"circle-opacity":{name:"opacity",type:n.R8_UNSIGNED,precisionFactor:100},"circle-stroke-width":{name:"stroke_width",type:n.R8_UNSIGNED,precisionFactor:4},"circle-stroke-color":{name:"stroke_color",type:n.R8G8B8A8_COLOR},"circle-stroke-opacity":{name:"stroke_opacity",type:n.R8_UNSIGNED,precisionFactor:100},"circle-blur":{name:"blur",type:n.R8_UNSIGNED,precisionFactor:32}};class d extends h{constructor(t){super(t)}geometryInfo(){return d.GEOMETRY_LAYOUT}opacityInfo(){return null}attributes(){return d.ATTRIBUTES}attributesInfo(){return d.ATTRIBUTES_INFO}}d.ATTRIBUTES=["fill-color","fill-opacity","fill-pattern"],d.GEOMETRY_LAYOUT=[new c["a"]("a_pos",2,u["k"].SHORT,0,4)],d.ATTRIBUTES_INFO={"fill-color":{name:"color",type:n.R8G8B8A8_COLOR},"fill-opacity":{name:"opacity",type:n.R8_UNSIGNED,precisionFactor:100},"fill-pattern":{name:"tlbr",type:n.R16G16B16A16_PATTERN,isOptional:!0}};class _ extends h{constructor(t,e){super(t),this.usefillColor=e}geometryInfo(){return _.GEOMETRY_LAYOUT}opacityInfo(){return null}attributes(){return this.usefillColor?_.ATTRIBUTES_FILL:_.ATTRIBUTES_OUTLINE}attributesInfo(){return this.usefillColor?_.ATTRIBUTES_INFO_FILL:_.ATTRIBUTES_INFO_OUTLINE}}_.ATTRIBUTES_OUTLINE=["fill-outline-color","fill-opacity"],_.ATTRIBUTES_FILL=["fill-color","fill-opacity"],_.GEOMETRY_LAYOUT=[new c["a"]("a_pos",2,u["k"].SHORT,0,8),new c["a"]("a_offset",2,u["k"].BYTE,4,8),new c["a"]("a_xnormal",2,u["k"].BYTE,6,8)],_.ATTRIBUTES_INFO_OUTLINE={"fill-outline-color":{name:"color",type:n.R8G8B8A8_COLOR},"fill-opacity":{name:"opacity",type:n.R8_UNSIGNED,precisionFactor:100}},_.ATTRIBUTES_INFO_FILL={"fill-color":{name:"color",type:n.R8G8B8A8_COLOR},"fill-opacity":{name:"opacity",type:n.R8_UNSIGNED,precisionFactor:100}};class m extends h{constructor(t){super(t)}geometryInfo(){return m.GEOMETRY_LAYOUT}opacityInfo(){return null}attributes(){return m.ATTRIBUTES}attributesInfo(){return m.ATTRIBUTES_INFO}}m.ATTRIBUTES=["line-blur","line-color","line-gap-width","line-offset","line-opacity","line-width","line-pattern","line-dasharray"],m.GEOMETRY_LAYOUT=[new c["a"]("a_pos",2,u["k"].SHORT,0,16),new c["a"]("a_extrude_offset",4,u["k"].BYTE,4,16),new c["a"]("a_dir_normal",4,u["k"].BYTE,8,16),new c["a"]("a_accumulatedDistance",2,u["k"].UNSIGNED_SHORT,12,16)],m.ATTRIBUTES_INFO={"line-width":{name:"width",type:n.R8_UNSIGNED,precisionFactor:2},"line-gap-width":{name:"gap_width",type:n.R8_UNSIGNED,precisionFactor:2},"line-offset":{name:"offset",type:n.R8_SIGNED,precisionFactor:2},"line-color":{name:"color",type:n.R8G8B8A8_COLOR},"line-opacity":{name:"opacity",type:n.R8_UNSIGNED,precisionFactor:100},"line-blur":{name:"blur",type:n.R8_UNSIGNED,precisionFactor:4},"line-pattern":{name:"tlbr",type:n.R16G16B16A16_PATTERN,isOptional:!0},"line-dasharray":{name:"tlbr",type:n.R16G16B16A16_DASHARRAY,isOptional:!0}};const b=[new c["a"]("a_pos",2,u["k"].SHORT,0,16),new c["a"]("a_vertexOffset",2,u["k"].SHORT,4,16),new c["a"]("a_texAngleRange",4,u["k"].UNSIGNED_BYTE,8,16),new c["a"]("a_levelInfo",4,u["k"].UNSIGNED_BYTE,12,16)],w=[new c["a"]("a_opacityInfo",1,u["k"].UNSIGNED_BYTE,0,1)];class v extends h{constructor(t){super(t)}geometryInfo(){return b}opacityInfo(){return w}attributes(){return v.ATTRIBUTES}attributesInfo(){return v.ATTRIBUTES_INFO}}v.ATTRIBUTES=["icon-color","icon-opacity","icon-halo-blur","icon-halo-color","icon-halo-width","icon-size"],v.ATTRIBUTES_INFO={"icon-color":{name:"color",type:n.R8G8B8A8_COLOR},"icon-opacity":{name:"opacity",type:n.R8_UNSIGNED,precisionFactor:100},"icon-halo-color":{name:"halo_color",type:n.R8G8B8A8_COLOR},"icon-halo-width":{name:"halo_width",type:n.R8_UNSIGNED,precisionFactor:4},"icon-halo-blur":{name:"halo_blur",type:n.R8_UNSIGNED,precisionFactor:4},"icon-size":{name:"size",type:n.R8_UNSIGNED,precisionFactor:32,isLayout:!0}};class E extends h{constructor(t){super(t)}geometryInfo(){return b}opacityInfo(){return w}attributes(){return E.ATTRIBUTES}attributesInfo(){return E.ATTRIBUTES_INFO}}E.ATTRIBUTES=["text-color","text-opacity","text-halo-blur","text-halo-color","text-halo-width","text-size"],E.ATTRIBUTES_INFO={"text-color":{name:"color",type:n.R8G8B8A8_COLOR},"text-opacity":{name:"opacity",type:n.R8_UNSIGNED,precisionFactor:100},"text-halo-color":{name:"halo_color",type:n.R8G8B8A8_COLOR},"text-halo-width":{name:"halo_width",type:n.R8_UNSIGNED,precisionFactor:4},"text-halo-blur":{name:"halo_blur",type:n.R8_UNSIGNED,precisionFactor:4},"text-size":{name:"size",type:n.R8_UNSIGNED,isLayout:!0}};var I=r("9ef0"),T=r("d329"),D=r("0554"),x=r("3b19");const R={kind:"null"},N={kind:"number"},A={kind:"string"},P={kind:"boolean"},S={kind:"color"},L={kind:"object"},O={kind:"value"};function U(t,e){return{kind:"array",itemType:t,n:e}}const k=[R,N,A,P,S,L,U(O)];function B(t){if("array"===t.kind){const e=B(t.itemType);return"number"==typeof t.n?`array<${e}, ${t.n}>`:"value"===t.itemType.kind?"array":`array<${e}>`}return t.kind}function G(t){if(null===t)return R;if("string"==typeof t)return A;if("boolean"==typeof t)return P;if("number"==typeof t)return N;if(t instanceof I["a"])return S;if(Array.isArray(t)){let e;for(const r of t){const t=G(r);if(e){if(e!==t){e=O;break}}else e=t}return U(e||O,t.length)}return"object"==typeof t?L:O}function M(t,e){if("array"===e.kind)return"array"===t.kind&&(0===t.n&&"value"===t.itemType.kind||M(t.itemType,e.itemType))&&("number"!=typeof e.n||e.n===t.n);if("value"===e.kind)for(const r of k)if(M(t,r))return!0;return e.kind===t.kind}function z(t){if(null===t)return"";const e=typeof t;return"string"===e?t:"number"===e||"boolean"===e?String(t):t instanceof I["a"]?t.toString():JSON.stringify(t)}var F=r("3976");class V{constructor(t){this.parent=t,this.vars={}}add(t,e){this.vars[t]=e}get(t){return this.vars[t]?this.vars[t]:this.parent?this.parent.get(t):null}}class C{constructor(){this.type=O}static parse(t){if(t.length>1)throw new Error('"id" does not expect arguments');return new C}evaluate(t,e){return null==t?void 0:t.id}}class ${constructor(){this.type=A}static parse(t){if(t.length>1)throw new Error('"geometry-type" does not expect arguments');return new $}evaluate(t,e){if(!t)return null;switch(t.type){case F["a"].Point:return"Point";case F["a"].LineString:return"LineString";case F["a"].Polygon:return"Polygon";default:return null}}}class Y{constructor(){this.type=L}static parse(t){if(t.length>1)throw new Error('"properties" does not expect arguments');return new Y}evaluate(t,e){return null==t?void 0:t.values}}class j{constructor(){this.type=N}static parse(t){if(t.length>1)throw new Error('"zoom" does not expect arguments');return new j}evaluate(t,e){return e}}class H{constructor(t,e,r){this.lhs=t,this.rhs=e,this.compare=r,this.type=P}static parse(t,e,r){if(3!==t.length&&4!==t.length)throw new Error(`"${t[0]}" expects 2 or 3 arguments`);if(4===t.length)throw new Error(`"${t[0]}" collator not supported`);return new H(kt(t[1],e),kt(t[2],e),r)}evaluate(t,e){return this.compare(this.lhs.evaluate(t,e),this.rhs.evaluate(t,e))}}class q extends H{static parse(t,e){return H.parse(t,e,(t,e)=>t===e)}}class K extends H{static parse(t,e){return H.parse(t,e,(t,e)=>t!==e)}}class W extends H{static parse(t,e){return H.parse(t,e,(t,e)=>tt<=e)}}class J extends H{static parse(t,e){return H.parse(t,e,(t,e)=>t>e)}}class Q extends H{static parse(t,e){return H.parse(t,e,(t,e)=>t>=e)}}class X{constructor(t){this.arg=t,this.type=P}static parse(t,e){if(2!==t.length)throw new Error('"!" expects 1 argument');return new X(kt(t[1],e))}evaluate(t,e){return!this.arg.evaluate(t,e)}}class tt{constructor(t){this.args=t,this.type=P}static parse(t,e){const r=[];for(let n=1;n1)throw new Error("Cubic bezier interpolation requires four numeric arguments with values between 0 and 1")}break;default:throw new Error(`"${t[0]}" unknown interpolation type "${i[0]}"`)}if(t.length%2!=1)throw new Error(`"${n}" expects an even number of arguments`);const a=kt(t[2],e,N);let s;"interpolate-hcl"===n||"interpolate-lab"===n?s=S:r&&"value"!==r.kind&&(s=r);const o=[];for(let l=3;l=r)throw new Error(`"${n}" requires strictly ascending stop inputs`);const i=kt(t[l+1],e,s);s||(s=i.type),o.push([r,i])}if(s&&s!==S&&s!==N&&("array"!==s.kind||s.itemType!==N))throw new Error(`"${n}" cannot interpolate type ${B(s)}`);return new st(n,s,i,a,o)}evaluate(t,e){const r=this.stops;if(1===r.length)return r[0][1].evaluate(t,e);const n=this.input.evaluate(t,e);if(n<=r[0][0])return r[0][1].evaluate(t,e);if(n>=r[r.length-1][0])return r[r.length-1][1].evaluate(t,e);let i=0;for(;++iObject(x["e"])(t,u[e],o));if("color"===this.type.kind&&l instanceof I["a"]&&u instanceof I["a"]){const t=new I["a"](l),e=new I["a"](u);return new I["a"]([Object(x["e"])(t.r,e.r,o),Object(x["e"])(t.g,e.g,o),Object(x["e"])(t.b,e.b,o),Object(x["e"])(t.a,e.a,o)])}if("number"===this.type.kind&&"number"==typeof l&&"number"==typeof u)return Object(x["e"])(l,u,o);throw new Error(`"${this.operator}" cannot interpolate type ${B(this.type)}`)}if("interpolate-hcl"===this.operator){const t=Object(T["c"])(l),e=Object(T["c"])(u),r=e.h-t.h,n=Object(T["d"])({h:t.h+o*(r>180||r<-180?r-360*Math.round(r/360):r),c:Object(x["e"])(t.c,e.c,o),l:Object(x["e"])(t.l,e.l,o)});return new I["a"]({a:Object(x["e"])(l.a,u.a,o),...n})}if("interpolate-lab"===this.operator){const t=Object(T["b"])(l),e=Object(T["b"])(u),r=Object(T["d"])({l:Object(x["e"])(t.l,e.l,o),a:Object(x["e"])(t.a,e.a,o),b:Object(x["e"])(t.b,e.b,o)});return new I["a"]({a:Object(x["e"])(l.a,u.a,o),...r})}throw new Error(`Unexpected operator "${this.operator}"`)}interpolationUniformValue(t,e){const r=this.stops;if(1===r.length)return 0;if(t>=r[r.length-1][0])return 0;let n=0;for(;++n=r)return[r,r];let n=0;for(;++n1&&(i=1),i}static _exponentialInterpolationRatio(t,e,r,n){const i=n-r;if(0===i)return 0;const a=t-r;return 1===e?a/i:(e**a-1)/(e**i-1)}}class ot{constructor(t,e,r){this.type=t,this.input=e,this.stops=r}static parse(t,e){if(t.length<5)throw new Error('"step" expects at least 4 arguments');if(t.length%2!=1)throw new Error('"step" expects an even number of arguments');const r=kt(t[1],e,N);let n;const i=[];i.push([-1/0,kt(t[2],e)]);for(let a=3;a=r)throw new Error('"step" requires strictly ascending stop inputs');const s=kt(t[a+1],e);n||(n=s.type),i.push([r,s])}return new ot(n,r,i)}evaluate(t,e){const r=this.stops;if(1===r.length)return r[0][1].evaluate(t,e);const n=this.input.evaluate(t,e);let i=0;for(;++i=n.length)throw new Error('"at" index out of bounds');if(r!==Math.floor(r))throw new Error('"at" index must be an integer');return n[r]}}class ht{constructor(t,e){this.key=t,this.obj=e,this.type=O}static parse(t,e){let r,n;switch(t.length){case 2:return r=kt(t[1],e),new ht(r);case 3:return r=kt(t[1],e),n=kt(t[2],e),new ht(r,n);default:throw new Error('"get" expects 1 or 2 arguments')}}evaluate(t,e){const r=this.key.evaluate(t,e);return this.obj?this.obj.evaluate(t,e)[r]:null==t?void 0:t.values[r]}}class pt{constructor(t,e){this.key=t,this.obj=e,this.type=P}static parse(t,e){let r,n;switch(t.length){case 2:return r=kt(t[1],e),new pt(r);case 3:return r=kt(t[1],e),n=kt(t[2],e),new pt(r,n);default:throw new Error('"has" expects 1 or 2 arguments')}}evaluate(t,e){const r=this.key.evaluate(t,e);return this.obj?r in this.obj.evaluate(t,e):!(null==t||!t.values[r])}}class yt{constructor(t,e){this.key=t,this.vals=e,this.type=P}static parse(t,e){if(3!==t.length)throw new Error('"in" expects 2 arguments');return new yt(kt(t[1],e),kt(t[2],e))}evaluate(t,e){const r=this.key.evaluate(t,e);return-1!==this.vals.evaluate(t,e).indexOf(r)}}class ft{constructor(t,e,r){this.item=t,this.array=e,this.from=r,this.type=N}static parse(t,e){if(t.length<3||t.length>4)throw new Error('"index-of" expects 3 or 4 arguments');const r=kt(t[1],e),n=kt(t[2],e);if(4===t.length){const i=kt(t[3],e,N);return new ft(r,n,i)}return new ft(r,n)}evaluate(t,e){const r=this.item.evaluate(t,e),n=this.array.evaluate(t,e);if(this.from){const i=this.from.evaluate(t,e);if(i!==Math.floor(i))throw new Error('"index-of" index must be an integer');return n.indexOf(r,i)}return n.indexOf(r)}}class gt{constructor(t){this.arg=t,this.type=N}static parse(t,e){if(2!==t.length)throw new Error('"length" expects 2 arguments');const r=kt(t[1],e);return new gt(r)}evaluate(t,e){const r=this.arg.evaluate(t,e);if("string"==typeof r)return r.length;if(Array.isArray(r))return r.length;throw new Error('"length" expects string or array')}}class dt{constructor(t,e,r,n){this.type=t,this.array=e,this.from=r,this.to=n}static parse(t,e){if(t.length<3||t.length>4)throw new Error('"slice" expects 2 or 3 arguments');const r=kt(t[1],e),n=kt(t[2],e,N);if(n.type!==N)throw new Error('"slice" index must return a number');if(4===t.length){const i=kt(t[3],e,N);if(i.type!==N)throw new Error('"slice" index must return a number');return new dt(r.type,r,n,i)}return new dt(r.type,r,n)}evaluate(t,e){const r=this.array.evaluate(t,e);if(!Array.isArray(r)&&"string"!=typeof r)throw new Error('"slice" input must be an array or a string');const n=this.from.evaluate(t,e);if(n<0||n>=r.length)throw new Error('"slice" index out of bounds');if(n!==Math.floor(n))throw new Error('"slice" index must be an integer');if(this.to){const i=this.to.evaluate(t,e);if(i<0||i>=r.length)throw new Error('"slice" index out of bounds');if(i!==Math.floor(i))throw new Error('"slice" index must be an integer');return r.slice(n,i)}return r.slice(n)}}class _t{constructor(){this.type=P}static parse(t){if(1!==t.length)throw new Error('"has-id" expects no arguments');return new _t}evaluate(t,e){return t&&void 0!==t.id}}class mt{constructor(t,e){this.args=t,this.calculate=e,this.type=N}static parse(t,e,r){const n=t.slice(1).map(t=>kt(t,e));return new mt(n,r)}evaluate(t,e){let r;return this.args&&(r=this.args.map(r=>r.evaluate(t,e))),this.calculate(r)}}class bt extends mt{static parse(t,e){switch(t.length){case 2:return mt.parse(t,e,t=>-t[0]);case 3:return mt.parse(t,e,t=>t[0]-t[1]);default:throw new Error('"-" expects 1 or 2 arguments')}}}class wt extends mt{static parse(t,e){return mt.parse(t,e,t=>{let e=1;for(const r of t)e*=r;return e})}}class vt extends mt{static parse(t,e){if(3===t.length)return mt.parse(t,e,t=>t[0]/t[1]);throw new Error('"/" expects 2 arguments')}}class Et extends mt{static parse(t,e){if(3===t.length)return mt.parse(t,e,t=>t[0]%t[1]);throw new Error('"%" expects 2 arguments')}}class It extends mt{static parse(t,e){if(3===t.length)return mt.parse(t,e,t=>t[0]**t[1]);throw new Error('"^" expects 1 or 2 arguments')}}class Tt extends mt{static parse(t,e){return mt.parse(t,e,t=>{let e=0;for(const r of t)e+=r;return e})}}class Dt{constructor(t,e){this.args=t,this.calculate=e,this.type=N}static parse(t,e){const r=t.slice(1).map(t=>kt(t,e));return new Dt(r,Dt.ops[t[0]])}evaluate(t,e){let r;return this.args&&(r=this.args.map(r=>r.evaluate(t,e))),this.calculate(r)}}Dt.ops={abs:t=>Math.abs(t[0]),acos:t=>Math.acos(t[0]),asin:t=>Math.asin(t[0]),atan:t=>Math.atan(t[0]),ceil:t=>Math.ceil(t[0]),cos:t=>Math.cos(t[0]),e:()=>Math.E,floor:t=>Math.floor(t[0]),ln:t=>Math.log(t[0]),ln2:()=>Math.LN2,log10:t=>Math.log(t[0])/Math.LN10,log2:t=>Math.log(t[0])/Math.LN2,max:t=>Math.max(...t),min:t=>Math.min(...t),pi:()=>Math.PI,round:t=>Math.round(t[0]),sin:t=>Math.sin(t[0]),sqrt:t=>Math.sqrt(t[0]),tan:t=>Math.tan(t[0])};class xt{constructor(t){this.args=t,this.type=A}static parse(t,e){return new xt(t.slice(1).map(t=>kt(t,e)))}evaluate(t,e){return this.args.map(r=>r.evaluate(t,e)).join("")}}class Rt{constructor(t,e){this.arg=t,this.calculate=e,this.type=A}static parse(t,e){if(2!==t.length)throw new Error(t[0]+" expects 1 argument");const r=kt(t[1],e);return new Rt(r,Rt.ops[t[0]])}evaluate(t,e){return this.calculate(this.arg.evaluate(t,e))}}Rt.ops={downcase:t=>t.toLowerCase(),upcase:t=>t.toUpperCase()};class Nt{constructor(t){this.args=t,this.type=S}static parse(t,e){if(4!==t.length)throw new Error('"rgb" expects 3 arguments');const r=t.slice(1).map(t=>kt(t,e));return new Nt(r)}evaluate(t,e){const r=this._validate(this.args[0].evaluate(t,e)),n=this._validate(this.args[1].evaluate(t,e)),i=this._validate(this.args[2].evaluate(t,e));return new I["a"]({r:r,g:n,b:i})}_validate(t){if("number"!=typeof t||t<0||t>255)throw new Error(t+": invalid color component");return Math.round(t)}}class At{constructor(t){this.args=t,this.type=S}static parse(t,e){if(5!==t.length)throw new Error('"rgba" expects 4 arguments');const r=t.slice(1).map(t=>kt(t,e));return new At(r)}evaluate(t,e){const r=this._validate(this.args[0].evaluate(t,e)),n=this._validate(this.args[1].evaluate(t,e)),i=this._validate(this.args[2].evaluate(t,e)),a=this._validateAlpha(this.args[3].evaluate(t,e));return new I["a"]({r:r,g:n,b:i,a:a})}_validate(t){if("number"!=typeof t||t<0||t>255)throw new Error(t+": invalid color component");return Math.round(t)}_validateAlpha(t){if("number"!=typeof t||t<0||t>1)throw new Error(t+": invalid alpha color component");return t}}class Pt{constructor(t){this.color=t,this.type=U(N,4)}static parse(t,e){if(2!==t.length)throw new Error('"to-rgba" expects 1 argument');const r=kt(t[1],e);return new Pt(r)}evaluate(t,e){return new I["a"](this.color.evaluate(t,e)).toRgba()}}class St{constructor(t,e){this.type=t,this.args=e}static parse(t,e){const r=t[0];if(t.length<2)throw new Error(r+" expects at least one argument");let n,i=1;if("array"===r){if(t.length>2){switch(t[1]){case"string":n=A;break;case"number":n=N;break;case"boolean":n=P;break;default:throw new Error('"array" type argument must be string, number or boolean')}i++}else n=O;let e;if(t.length>3){if(e=t[2],null!==e&&("number"!=typeof e||e<0||e!==Math.floor(e)))throw new Error('"array" length argument must be a positive integer literal');i++}n=U(n,e)}else switch(r){case"string":n=A;break;case"number":n=N;break;case"boolean":n=P;break;case"object":n=L}const a=[];for(;i":J,">=":Q,all:tt,any:et,case:nt,coalesce:it,match:at,within:null,interpolate:st,"interpolate-hcl":st,"interpolate-lab":st,step:ot,let:lt,var:ut,concat:xt,downcase:Rt,"is-supported-script":null,"resolved-locale":null,upcase:Rt,rgb:Nt,rgba:At,"to-rgba":Pt,"-":bt,"*":wt,"/":vt,"%":Et,"^":It,"+":Tt,abs:Dt,acos:Dt,asin:Dt,atan:Dt,ceil:Dt,cos:Dt,e:Dt,floor:Dt,ln:Dt,ln2:Dt,log10:Dt,log2:Dt,max:Dt,min:Dt,pi:Dt,round:Dt,sin:Dt,sqrt:Dt,tan:Dt,zoom:j,"heatmap-density":null,"has-id":_t,none:rt};class Gt{constructor(t){this._expression=t}filter(t,e){if(!this._expression)return!0;try{return this._expression.evaluate(t,e)}catch(r){return console.log(r.message),!0}}static createFilter(t){if(!t)return null;this.isLegacyFilter(t)&&(t=this.convertLegacyFilter(t));try{const e=kt(t,null,P);return new Gt(e)}catch(e){return console.log(e.message),null}}static isLegacyFilter(t){if(!Array.isArray(t))return!0;if(0===t.length)return!0;switch(t[0]){case"==":case"!=":case">":case"<":case">=":case"<=":return 3===t.length&&"string"==typeof t[1]&&!Array.isArray(t[2]);case"in":return t.length>=3&&"string"==typeof t[1]&&!Array.isArray(t[2]);case"!in":case"none":case"!has":return!0;case"any":case"all":for(let e=1;e":case"<":case">=":case"<=":return Gt.convertComparison(e,t[1],t[2]);case"in":return Gt.convertIn(t[1],t.slice(2));case"!in":return Gt.negate(Gt.convertIn(t[1],t.slice(2)));case"any":case"all":case"none":return Gt.convertCombining(e,t.slice(1));case"has":return Gt.convertHas(t[1]);case"!has":return Gt.negate(Gt.convertHas(t[1]));default:throw new Error("Unexpected legacy filter.")}}static convertComparison(t,e,r){switch(e){case"$type":return[t,["geometry-type"],r];case"$id":return[t,["id"],r];default:return[t,["get",e],r]}}static convertIn(t,e){switch(t){case"$type":return["in",["geometry-type"],["literal",e]];case"$id":return["in",["id"],["literal",e]];default:return["in",["get",t],["literal",e]]}}static convertHas(t){switch(t){case"$type":return!0;case"$id":return["has-id"];default:return["has",t]}}static convertCombining(t,e){return[t].concat(e.map(this.convertLegacyFilter))}static negate(t){return["!",t]}}var Mt=r("ef89");class zt{constructor(t,e){let r;switch(this.isDataDriven=!1,this.interpolator=null,t.type){case"number":case"color":r=!0;break;case"array":r="number"===t.value;break;default:r=!1}if(null==e&&(e=t.default),Array.isArray(e)&&e.length>0&&Bt[e[0]]){const r={number:N,color:S,string:A,boolean:P,enum:A};try{const n="array"===t.type?U(r[t.value]||O,t.length):r[t.type],i=kt(e,null,n);this.getValue=this._buildExpression(i,t),this.isDataDriven=!0,i instanceof st&&i.input instanceof j&&(this.interpolator=i)}catch(i){console.log(i.message),this.getValue=this._buildSimple(t.default)}return}r&&"interval"===e.type&&(r=!1);const n=e&&e.stops&&e.stops.length>0;if(n)for(const a of e.stops)a[1]=this._validate(a[1],t);if(this.isDataDriven=!!e&&!!e.property,this.isDataDriven)if(void 0!==e.default&&(e.default=this._validate(e.default,t)),n)switch(e.type){case"identity":this.getValue=this._buildIdentity(e,t);break;case"categorical":this.getValue=this._buildCategorical(e,t);break;default:this.getValue=r?this._buildInterpolate(e,t):this._buildInterval(e,t)}else this.getValue=this._buildIdentity(e,t);else n?this.getValue=r?this._buildZoomInterpolate(e):this._buildZoomInterval(e):(e=this._validate(e,t),this.getValue=this._buildSimple(e))}_validate(t,e){if("number"===e.type){if(te.maximum)return e.maximum}else"color"===e.type?t=zt._parseColor(t):"enum"===e.type?"string"==typeof t&&(t=e.values.indexOf(t)):"array"===e.type&&"enum"===e.value?t=t.map(t=>"string"==typeof t?e.values.indexOf(t):t):"string"===e.type&&(t=z(t));return t}_buildSimple(t){return()=>t}_buildExpression(t,e){return(r,n)=>{try{const i=t.evaluate(n,r);return void 0===i?e.default:this._validate(i,e)}catch(i){return console.log(i.message),e.default}}}_buildIdentity(t,e){return(r,n)=>{let i;return n&&(i=n.values[t.property]),void 0!==i&&(i=this._validate(i,e)),null!=i?i:void 0!==t.default?t.default:e.default}}_buildCategorical(t,e){return(r,n)=>{let i;return n&&(i=n.values[t.property]),i=this._categorical(i,t.stops),void 0!==i?i:void 0!==t.default?t.default:e.default}}_buildInterval(t,e){return(r,n)=>{let i;return n&&(i=n.values[t.property]),"number"==typeof i?this._interval(i,t.stops):void 0!==t.default?t.default:e.default}}_buildInterpolate(t,e){return(r,n)=>{let i;return n&&(i=n.values[t.property]),"number"==typeof i?this._interpolate(i,t.stops,t.base||1):void 0!==t.default?t.default:e.default}}_buildZoomInterpolate(t){return e=>this._interpolate(e,t.stops,t.base||1)}_buildZoomInterval(t){return e=>this._interval(e,t.stops)}_categorical(t,e){const r=e.length;for(let n=0;nthis._create(t,e,r)),this.layers){let t;for(let e=0;e=this.layers.length?null:this.layers[t].id}getStyleLayerByUID(t){const e=this._uidToLayer.get(t);return null!=e?e:null}getStyleLayerIndex(t){const e=this._layerByName[t];return e?this.layers.indexOf(e):-1}setStyleLayer(t,e){if(!t||!t.id)return;const r=this._style;null!=e&&e>=this.layers.length&&(e=this.layers.length-1);let n,i=!0;const s=this._layerByName[t.id];if(s){const o=this.layers.indexOf(s);e||(e=o),e===o?(i=!1,n=a._recreateLayer(t,s),this.layers[e]=n,r.layers[e]=t):(this.layers.splice(o,1),r.layers.splice(o,1),n=this._create(t,e,this.layers),this.layers.splice(e,0,n),r.layers.splice(e,0,t))}else n=this._create(t,e,this.layers),!e||e>=this.layers.length?(this.layers.push(n),r.layers.push(t)):(this.layers.splice(e,0,n),r.layers.splice(e,0,t));this._layerByName[t.id]=n,this._uidToLayer.set(n.uid,n),i&&this._recomputeZValues(),this._identifyRefLayers()}getStyleLayer(t){const e=this._layerByName[t];return e?{type:e.typeName,id:e.id,source:e.source,"source-layer":e.sourceLayer,minzoom:e.minzoom,maxzoom:e.maxzoom,filter:e.filter,layout:e.layout,paint:e.paint}:null}deleteStyleLayer(t){const e=this._layerByName[t];if(e){delete this._layerByName[t],this._uidToLayer.delete(e.uid);const r=this.layers.indexOf(e);this.layers.splice(r,1),this._style.layers.splice(r,1),this._recomputeZValues(),this._identifyRefLayers()}}getLayerById(t){return this._layerByName[t]}getLayoutProperties(t){const e=this._layerByName[t];return e?e.layout:null}getPaintProperties(t){const e=this._layerByName[t];return e?e.paint:null}setPaintProperties(t,e){const r=this._layerByName[t];if(!r)return;const n={type:r.typeName,id:r.id,source:r.source,"source-layer":r.sourceLayer,minzoom:r.minzoom,maxzoom:r.maxzoom,filter:r.filter,layout:r.layout,paint:e},i=a._recreateLayer(n,r),s=this.layers.indexOf(r);this.layers[s]=i,this._style.layers[s].paint=e,this._layerByName[r.id]=i,this._uidToLayer.set(r.uid,i)}setLayoutProperties(t,e){const r=this._layerByName[t];if(!r)return;const n={type:r.typeName,id:r.id,source:r.source,"source-layer":r.sourceLayer,minzoom:r.minzoom,maxzoom:r.maxzoom,filter:r.filter,layout:e,paint:r.paint},i=a._recreateLayer(n,r),s=this.layers.indexOf(r);this.layers[s]=i,this._style.layers[s].layout=e,this._layerByName[r.id]=i,this._uidToLayer.set(r.uid,i)}setStyleLayerVisibility(t,e){const r=this._layerByName[t];if(!r)return;const n=r.layout||{};n.visibility=e;const i={type:r.typeName,id:r.id,source:r.source,"source-layer":r.sourceLayer,minzoom:r.minzoom,maxzoom:r.maxzoom,filter:r.filter,layout:n,paint:r.paint},s=a._recreateLayer(i,r),o=this.layers.indexOf(r);this.layers[o]=s,this._style.layers[o].layout=n,this._layerByName[r.id]=s,this._uidToLayer.set(r.uid,s)}getStyleLayerVisibility(t){var e;const r=this._layerByName[t];if(!r)return"none";const n=r.layout;return null!=(e=null==n?void 0:n.visibility)?e:"visible"}_recomputeZValues(){const t=this.layers,e=1/(t.length+1);for(let r=0;rt.keye.key?1:0);const i=t.length;for(let a=0;at<=.04045?t/12.92:((t+.055)/1.055)**2.4),r=c(l,e);return{x:100*r[0],y:100*r[1],z:100*r[2]}}function p(t){const e=c(u,[t.x/100,t.y/100,t.z/100]).map(t=>{const e=t<=.0031308?12.92*t:1.055*t**(1/2.4)-.055;return Math.min(1,Math.max(e,0))});return{r:Math.round(255*e[0]),g:Math.round(255*e[1]),b:Math.round(255*e[2])}}function y(t){const e=[t.x/95.047,t.y/100,t.z/108.883].map(t=>t>(6/29)**3?t**(1/3):1/3*(29/6)**2*t+4/29);return{l:116*e[1]-16,a:500*(e[0]-e[1]),b:200*(e[1]-e[2])}}function f(t){const e=t.l,r=[(e+16)/116+t.a/500,(e+16)/116,(e+16)/116-t.b/200].map(t=>t>6/29?t**3:3*(6/29)**2*(t-4/29));return{x:95.047*r[0],y:100*r[1],z:108.883*r[2]}}function g(t){const e=t.l,r=t.a,n=t.b,i=Math.sqrt(r*r+n*n);let a=Math.atan2(n,r);return a=a>0?a:a+2*Math.PI,{l:e,c:i,h:a}}function d(t){const e=t.l,r=t.c,n=t.h;return{l:e,a:r*Math.cos(n),b:r*Math.sin(n)}}function _(t){return y(h(t))}function m(t){return p(f(t))}function b(t){return g(y(h(t)))}function w(t){return p(f(d(t)))}function v(t){const e=t.r,r=t.g,n=t.b,i=Math.max(e,r,n),a=i-Math.min(e,r,n);let s=i,o=0===a?0:i===e?(r-n)/a%6:i===r?(n-e)/a+2:(e-r)/a+4,l=0===a?0:a/s;return o<0&&(o+=6),o*=60,l*=100,s*=100/255,{h:o,s:l,v:s}}function E(t){const e=(t.h+360)%360/60,r=t.s/100,n=t.v/100*255,i=n*r,a=i*(1-Math.abs(e%2-1));let s;switch(Math.floor(e)){case 0:s={r:i,g:a,b:0};break;case 1:s={r:a,g:i,b:0};break;case 2:s={r:0,g:i,b:a};break;case 3:s={r:0,g:a,b:i};break;case 4:s={r:a,g:0,b:i};break;case 5:case 6:s={r:i,g:0,b:a};break;default:s={r:0,g:0,b:0}}return s.r=Math.round(s.r+n-i),s.g=Math.round(s.g+n-i),s.b=Math.round(s.b+n-i),s}function I(t){return n(t)?t:s(t)?w(t):a(t)?m(t):o(t)?p(t):i(t)?E(t):t}function T(t){return i(t)?t:v(I(t))}function D(t){return a(t)?t:_(I(t))}function x(t){return s(t)?t:b(I(t))}}}]); //# sourceMappingURL=chunk-d2111408.350835c9.js.map