define(["./createTaskProcessorWorker","./when-b60132fc","./pbf-2b242707","./earcut-2.2.1-20c8012f"],(function(t,e,r,n){"use strict";function i(t){this._stringToNumber={},this._numberToString=[];for(var e=0;et.width||i.height>t.height||r.x>t.width-i.width||r.y>t.height-i.height)throw new RangeError("out of range source coordinates for image copy");if(i.width>e.width||i.height>e.height||n.x>e.width-i.width||n.y>e.height-i.height)throw new RangeError("out of range destination coordinates for image copy");for(var o=t.data,s=e.data,u=0;u=0;f--){var h=o[f];if(!(c.w>h.w||c.h>h.h)){if(c.x=h.x,c.y=h.y,u=Math.max(u,c.y+c.h),s=Math.max(s,c.x+c.w),c.w===h.w&&c.h===h.h){var d=o.pop();f255?255:t}function _(t){return t<0?0:t>1?1:t}function w(t){return"%"===t[t.length-1]?b(parseFloat(t)/100*255):b(parseInt(t))}function E(t){return"%"===t[t.length-1]?_(parseFloat(t)/100):_(parseFloat(t))}function T(t,e,r){return r<0?r+=1:r>1&&(r-=1),6*r<1?t+(e-t)*r*6:2*r<1?e:3*r<2?t+(e-t)*(2/3-r)*6:t}function A(t){var e,r=t.replace(/ /g,"").toLowerCase();if(r in x)return x[r].slice();if("#"===r[0])return 4===r.length?(e=parseInt(r.substr(1),16))>=0&&e<=4095?[(3840&e)>>4|(3840&e)>>8,240&e|(240&e)>>4,15&e|(15&e)<<4,1]:null:7===r.length&&(e=parseInt(r.substr(1),16))>=0&&e<=16777215?[(16711680&e)>>16,(65280&e)>>8,255&e,1]:null;var n=r.indexOf("("),i=r.indexOf(")");if(-1!==n&&i+1===r.length){var a=r.substr(0,n),o=r.substr(n+1,i-(n+1)).split(","),s=1;switch(a){case"rgba":if(4!==o.length)return null;s=E(o.pop());case"rgb":return 3!==o.length?null:[w(o[0]),w(o[1]),w(o[2]),s];case"hsla":if(4!==o.length)return null;s=E(o.pop());case"hsl":if(3!==o.length)return null;var u=(parseFloat(o[0])%360+360)%360/360,l=E(o[1]),p=E(o[2]),c=p<=.5?p*(l+1):p+l-p*l,f=2*p-c;return[b(255*T(f,c,u+1/3)),b(255*T(f,c,u)),b(255*T(f,c,u-1/3)),s];default:return null}}return null}var S=function(t,e,r,n){void 0===n&&(n=1),this.r=t,this.g=e,this.b=r,this.a=n};S.parse=function(t){if(t){if(t instanceof S)return t;if("string"==typeof t){var e=A(t);if(e)return new S(e[0]/255*e[3],e[1]/255*e[3],e[2]/255*e[3],e[3])}}},S.prototype.toString=function(){var t=this.toArray(),e=t[0],r=t[1],n=t[2],i=t[3];return"rgba("+Math.round(e)+","+Math.round(r)+","+Math.round(n)+","+i+")"},S.prototype.toArray=function(){var t=this,e=t.r,r=t.g,n=t.b,i=t.a;return 0===i?[0,0,0,0]:[255*e/i,255*r/i,255*n/i,i]},S.black=new S(0,0,0,1),S.white=new S(1,1,1,1),S.transparent=new S(0,0,0,0),S.red=new S(1,0,0,1);var I={kind:"null"},k={kind:"number"},M={kind:"string"},O={kind:"boolean"},P={kind:"color"},z={kind:"object"},R={kind:"value"},F={kind:"formatted"},C={kind:"resolvedImage"};function D(t,e){return{kind:"array",itemType:t,N:e}}function B(t){if("array"===t.kind){var e=B(t.itemType);return"number"==typeof t.N?"array<"+e+", "+t.N+">":"value"===t.itemType.kind?"array":"array<"+e+">"}return t.kind}var U=[I,k,M,O,P,F,z,D(R),C];function V(t,e){if("error"===e.kind)return null;if("array"===t.kind){if("array"===e.kind&&(0===e.N&&"value"===e.itemType.kind||!V(t.itemType,e.itemType))&&("number"!=typeof t.N||t.N===e.N))return null}else{if(t.kind===e.kind)return null;if("value"===t.kind)for(var r=0,n=U;r=0&&t<=255&&"number"==typeof e&&e>=0&&e<=255&&"number"==typeof r&&r>=0&&r<=255?void 0===n||"number"==typeof n&&n>=0&&n<=1?null:"Invalid rgba value ["+[t,e,r,n].join(", ")+"]: 'a' must be between 0 and 1.":"Invalid rgba value ["+("number"==typeof n?[t,e,r,n]:[t,e,r]).join(", ")+"]: 'r', 'g', and 'b' must be between 0 and 255."},et.isValue=function(t){if(null===t)return!0;if("string"==typeof t)return!0;if("boolean"==typeof t)return!0;if("number"==typeof t)return!0;if(t instanceof S)return!0;if(t instanceof N)return!0;if(t instanceof X)return!0;if(t instanceof q)return!0;if(Array.isArray(t)){for(var e=0,r=t;e2){var s=t[1];if("string"!=typeof s||!(s in ut)||"object"===s)return e.error('The item type argument of "array" must be one of string, number, boolean',1);a=ut[s],n++}else a=ot;if(t.length>3){if(null!==t[2]&&("number"!=typeof t[2]||t[2]<0||t[2]!==Math.floor(t[2])))return e.error('The length argument to "array" must be a positive integer literal',2);o=t[2],n++}r=st(a,o)}else r=ut[i];for(var u=[];n1)&&e.push(n)}}return e.concat(this.args.map((function(t){return t.serialize()})))};var pt={kind:"number"},ct={kind:"value"};function ft(t,e){return{kind:"array",itemType:t,N:e}}var ht=function(t,e,r){this.type=t,this.index=e,this.input=r};ht.parse=function(t,e){if(3!==t.length)return e.error("Expected 2 arguments, but found "+(t.length-1)+" instead.");var r=e.parse(t[1],1,pt),n=e.parse(t[2],2,ft(e.expectedType||ct));if(!r||!n)return null;var i=n.type;return new ht(i.itemType,r,n)},ht.prototype.evaluate=function(t){var e=this.index.evaluate(t),r=this.input.evaluate(t);if(e<0)throw new RuntimeError("Array index out of bounds: "+e+" < 0.");if(e>=r.length)throw new RuntimeError("Array index out of bounds: "+e+" > "+(r.length-1)+".");if(e!==Math.floor(e))throw new RuntimeError("Array index must be an integer, but found "+e+" instead.");return r[e]},ht.prototype.eachChild=function(t){t(this.index),t(this.input)},ht.prototype.possibleOutputs=function(){return[void 0]},ht.prototype.serialize=function(){return["at",this.index.serialize(),this.input.serialize()]};var dt={kind:"boolean"},yt=function(t,e,r){this.type=t,this.branches=e,this.otherwise=r};yt.parse=function(t,e){if(t.length<4)return e.error("Expected at least 3 arguments, but found only "+(t.length-1)+".");if(t.length%2!=0)return e.error("Expected an odd number of arguments.");var r;e.expectedType&&"value"!==e.expectedType.kind&&(r=e.expectedType);for(var n=[],i=1;i4?"Invalid rbga value "+JSON.stringify(e)+": expected an array containing either three or four numeric values.":validateRGBA(e[0],e[1],e[2],e[3])))return new Color(e[0]/255,e[1]/255,e[2]/255,e[3])}throw new RuntimeError(r||"Could not parse color from value '"+("string"==typeof e?e:String(JSON.stringify(e)))+"'")}if("number"===this.type.kind){for(var o=null,s=0,u=this.args;sr}function Bt(t,e,r){return e<=r}function Ut(t,e,r){return e>=r}function Vt(t,e,r,n){return 0===n.compare(e,r)}function Nt(t,e,r,n){return!Vt(0,e,r,n)}function Lt(t,e,r,n){return n.compare(e,r)<0}function Xt(t,e,r,n){return n.compare(e,r)>0}function qt(t,e,r,n){return n.compare(e,r)<=0}function jt(t,e,r,n){return n.compare(e,r)>=0}function Ht(t,e,r){var n="=="!==t&&"!="!==t;return function(){function i(t,e,r){this.type=Mt,this.lhs=t,this.rhs=e,this.collator=r,this.hasUntypedArgument="value"===t.type.kind||"value"===e.type.kind}return i.parse=function(t,e){if(3!==t.length&&4!==t.length)return e.error("Expected two or three arguments.");var r=t[0],a=e.parse(t[1],1,Ot);if(!a)return null;if(!zt(r,a.type))return e.concat(1).error('"'+r+"\" comparisons are not supported for type '"+toString(a.type)+"'.");var o=e.parse(t[2],2,Ot);if(!o)return null;if(!zt(r,o.type))return e.concat(2).error('"'+r+"\" comparisons are not supported for type '"+toString(o.type)+"'.");if(a.type.kind!==o.type.kind&&"value"!==a.type.kind&&"value"!==o.type.kind)return e.error("Cannot compare types '"+toString(a.type)+"' and '"+toString(o.type)+"'.");n&&("value"===a.type.kind&&"value"!==o.type.kind?a=new lt(o.type,[a]):"value"!==a.type.kind&&"value"===o.type.kind&&(o=new lt(a.type,[o])));var s=null;if(4===t.length){if("string"!==a.type.kind&&"string"!==o.type.kind&&"value"!==a.type.kind&&"value"!==o.type.kind)return e.error("Cannot use collator to compare non-string types.");if(!(s=e.parse(t[3],3,Pt)))return null}return new i(a,o,s)},i.prototype.evaluate=function(i){var a=this.lhs.evaluate(i),o=this.rhs.evaluate(i);if(n&&this.hasUntypedArgument){var s=et.typeOf(a),u=et.typeOf(o);if(s.kind!==u.kind||"string"!==s.kind&&"number"!==s.kind)throw new RuntimeError('Expected arguments for "'+t+'" to be (string, string) or (number, number), but found ('+s.kind+", "+u.kind+") instead.")}if(this.collator&&!n&&this.hasUntypedArgument){var l=et.typeOf(a),p=et.typeOf(o);if("string"!==l.kind||"string"!==p.kind)return e(i,a,o)}return this.collator?r(i,a,o,this.collator.evaluate(i)):e(i,a,o)},i.prototype.eachChild=function(t){t(this.lhs),t(this.rhs),this.collator&&t(this.collator)},i.prototype.possibleOutputs=function(){return[!0,!1]},i.prototype.serialize=function(){var e=[t];return this.eachChild((function(t){e.push(t.serialize())})),e},i}()}var Yt={};Yt.Equals=Ht("==",Rt,Vt),Yt.NotEquals=Ht("!=",Ft,Nt),Yt.LessThan=Ht("<",Ct,Lt),Yt.GreaterThan=Ht(">",Dt,Xt),Yt.LessThanOrEqual=Ht("<=",Bt,qt),Yt.GreaterThanOrEqual=Ht(">=",Ut,jt);var Qt={kind:"number"},Kt={kind:"string"},Gt={kind:"color"},Wt={kind:"value"},Jt={kind:"formatted"},Zt={kind:"resolvedImage"};function $t(t,e){return{kind:"array",itemType:t,N:e}}var te=function(t){this.type=Jt,this.sections=t};te.parse=function(t,e){if(t.length<2)return e.error("Expected at least one argument.");var r=t[1];if(!Array.isArray(r)&&"object"==typeof r)return e.error("First argument must be an image or text section.");for(var n=[],i=!1,a=1;a<=t.length-1;++a){var o=t[a];if(i&&"object"==typeof o&&!Array.isArray(o)){i=!1;var s=null;if(o["font-scale"]&&!(s=e.parse(o["font-scale"],1,Qt)))return null;var u=null;if(o["text-font"]&&!(u=e.parse(o["text-font"],1,$t(Kt))))return null;var l=null;if(o["text-color"]&&!(l=e.parse(o["text-color"],1,Gt)))return null;var p=n[n.length-1];p.scale=s,p.font=u,p.textColor=l}else{var c=e.parse(t[a],1,Wt);if(!c)return null;var f=c.type.kind;if("string"!==f&&"value"!==f&&"null"!==f&&"resolvedImage"!==f)return e.error("Formatted text type must be 'string', 'value', 'image' or 'null'.");i=!0,n.push({content:c,scale:null,font:null,textColor:null})}}return new te(n)},te.prototype.evaluate=function(t){return new X(this.sections.map((function(e){var r=e.content.evaluate(t);return et.typeOf(r)===Zt?new L("",r,null,null,null):new L(et.toString$1(r),null,e.scale?e.scale.evaluate(t):null,e.font?e.font.evaluate(t).join(","):null,e.textColor?e.textColor.evaluate(t):null)})))},te.prototype.eachChild=function(t){for(var e=0,r=this.sections;e-1&&(r=!0),new q({name:e,available:r})},ne.prototype.eachChild=function(t){t(this.input)},ne.prototype.possibleOutputs=function(){return[void 0]},ne.prototype.serialize=function(){return["image",this.input.serialize()]};var ie=function(t,e,r,n,i){this.type=t,this.operator=e,this.interpolation=r,this.input=n,this.labels=[],this.outputs=[];for(var a=0,o=i;a1})))return e.error("Cubic bezier interpolation requires four numeric arguments with values between 0 and 1.",1);n={name:"cubic-bezier",controlPoints:s}}if(t.length-1<4)return e.error("Expected at least 4 arguments, but found only "+(t.length-1)+".");if((t.length-1)%2!=0)return e.error("Expected an even number of arguments.");if(!(i=e.parse(i,2,ae)))return null;var u=[],l=null;"interpolate-hcl"===r||"interpolate-lab"===r?l=oe:e.expectedType&&"value"!==e.expectedType.kind&&(l=e.expectedType);for(var p=0;p=c)return e.error('Input/output pairs for "interpolate" expressions must be arranged with input values in strictly ascending order.',h);var y=e.parse(f,d,l);if(!y)return null;l=l||y.type,u.push([c,y])}return"number"===l.kind||"color"===l.kind||"array"===l.kind&&"number"===l.itemType.kind&&"number"==typeof l.N?new ie(l,r,n,i,u):e.error("Type "+toString(l)+" is not interpolatable.")},ie.prototype.evaluate=function(t){var e=this.labels,r=this.outputs;if(1===e.length)return r[0].evaluate(t);var n=this.input.evaluate(t);if(n<=e[0])return r[0].evaluate(t);var i=e.length;if(n>=e[i-1])return r[i-1].evaluate(t);var a=findStopLessThanOrEqualTo(e,n),o=e[a],s=e[a+1],u=ie.interpolationFactor(this.interpolation,n,o,s),l=r[a].evaluate(t),p=r[a+1].evaluate(t);return"interpolate"===this.operator?interpolate[this.type.kind.toLowerCase()](l,p,u):"interpolate-hcl"===this.operator?hcl.reverse(hcl.interpolate(hcl.forward(l),hcl.forward(p),u)):lab.reverse(lab.interpolate(lab.forward(l),lab.forward(p),u))},ie.prototype.eachChild=function(t){t(this.input);for(var e=0,r=this.outputs;e=0},he.prototype.eachChild=function(t){t(this.needle),t(this.haystack)},he.prototype.possibleOutputs=function(){return[!0,!1]},he.prototype.serialize=function(){return["in",this.needle.serialize(),this.haystack.serialize()]};var de=function(t,e){this.type=e.type,this.bindings=[].concat(t),this.result=e};de.prototype.evaluate=function(t){return this.result.evaluate(t)},de.prototype.eachChild=function(t){for(var e=0,r=this.bindings;eNumber.MAX_SAFE_INTEGER)return l.error("Branch labels must be integers no larger than "+Number.MAX_SAFE_INTEGER+".");if("number"==typeof f&&Math.floor(f)!==f)return l.error("Numeric branch labels must be integer values.");if(r){if(l.checkSubtype(r,et.typeOf(f)))return null}else r=et.typeOf(f);if(void 0!==i[String(f)])return l.error("Branch labels must be unique.");i[String(f)]=a.length}var h=e.parse(u,o,n);if(!h)return null;n=n||h.type,a.push(h)}var d=e.parse(t[1],1,ge);if(!d)return null;var y=e.parse(t[t.length-1],t.length-1,n);return y?"value"!==d.type.kind&&e.concat(1).checkSubtype(r,d.type)?null:new xe(r,n,d,i,a,y):null},xe.prototype.evaluate=function(t){var e=this.input.evaluate(t);return(et.typeOf(e)===this.inputType&&this.outputs[this.cases[e]]||this.otherwise).evaluate(t)},xe.prototype.eachChild=function(t){t(this.input),this.outputs.forEach(t),t(this.otherwise)},xe.prototype.possibleOutputs=function(){var t;return(t=[]).concat.apply(t,this.outputs.map((function(t){return t.possibleOutputs()}))).concat(this.otherwise.possibleOutputs())},xe.prototype.serialize=function(){for(var t=this,e=["match",this.input.serialize()],r=[],n={},i=0,a=Object.keys(this.cases).sort();ie))throw new RuntimeError("Input is not a number.");o=s-1}return 0}we.parse=function(t,e){if(3!==t.length)return e.error("Expected two arguments.");var r=e.parse(t[1],1,be);if(!r)return null;var n=t[2];if("object"!=typeof n||Array.isArray(n))return e.error("NumberFormat options argument must be an object.");var i=null;if(n.locale&&!(i=e.parse(n.locale,1,_e)))return null;var a=null;if(n.currency&&!(a=e.parse(n.currency,1,_e)))return null;var o=null;if(n["min-fraction-digits"]&&!(o=e.parse(n["min-fraction-digits"],1,be)))return null;var s=null;return n["max-fraction-digits"]&&!(s=e.parse(n["max-fraction-digits"],1,be))?null:new we(r,i,a,o,s)},we.prototype.evaluate=function(t){return new Intl.NumberFormat(this.locale?this.locale.evaluate(t):[],{style:this.currency?"currency":"decimal",currency:this.currency?this.currency.evaluate(t):void 0,minimumFractionDigits:this.minFractionDigits?this.minFractionDigits.evaluate(t):void 0,maximumFractionDigits:this.maxFractionDigits?this.maxFractionDigits.evaluate(t):void 0}).format(this.number.evaluate(t))},we.prototype.eachChild=function(t){t(this.number),this.locale&&t(this.locale),this.currency&&t(this.currency),this.minFractionDigits&&t(this.minFractionDigits),this.maxFractionDigits&&t(this.maxFractionDigits)},we.prototype.possibleOutputs=function(){return[void 0]},we.prototype.serialize=function(){var t={};return this.locale&&(t.locale=this.locale.serialize()),this.currency&&(t.currency=this.currency.serialize()),this.minFractionDigits&&(t["min-fraction-digits"]=this.minFractionDigits.serialize()),this.maxFractionDigits&&(t["max-fraction-digits"]=this.maxFractionDigits.serialize()),["number-format",this.number.serialize(),t]};var Te={kind:"number"},Ae=function(t,e,r){this.type=t,this.input=e,this.labels=[],this.outputs=[];for(var n=0,i=r;n=o)return e.error('Input/output pairs for "step" expressions must be arranged with input values in strictly ascending order.',u);var p=e.parse(s,l,i);if(!p)return null;i=i||p.type,n.push([o,p])}return new Ae(i,r,n)},Ae.prototype.evaluate=function(t){var e=this.labels,r=this.outputs;if(1===e.length)return r[0].evaluate(t);var n=this.input.evaluate(t);if(n<=e[0])return r[0].evaluate(t);var i=e.length;return n>=e[i-1]?r[i-1].evaluate(t):r[Ee(e,n)].evaluate(t)},Ae.prototype.eachChild=function(t){t(this.input);for(var e=0,r=this.outputs;e0&&t.push(this.labels[e]),t.push(this.outputs[e].serialize());return t};var Se=function(t,e){this.type=e.type,this.name=t,this.boundExpression=e};Se.parse=function(t,e){if(2!==t.length||"string"!=typeof t[1])return e.error("'var' expression requires exactly one string literal argument.");var r=t[1];return e.scope.has(r)?new Se(r,e.scope.get(r)):e.error('Unknown variable "'+r+'". Make sure "'+r+'" has been bound in an enclosing "let" expression before using it.',1)},Se.prototype.evaluate=function(t){return this.boundExpression.evaluate(t)},Se.prototype.eachChild=function(){},Se.prototype.possibleOutputs=function(){return[void 0]},Se.prototype.serialize=function(){return["var",this.name]};var Ie={"==":Yt.Equals,"!=":Yt.NotEquals,">":Yt.GreaterThan,"<":Yt.LessThan,">=":Yt.GreaterThanOrEqual,"<=":Yt.LessThanOrEqual,array:lt,at:ht,boolean:lt,case:yt,coalesce:vt,collator:kt,format:te,image:ne,in:he,interpolate:ie,"interpolate-hcl":ie,"interpolate-lab":ie,length:me,let:de,literal:ve,match:xe,number:lt,"number-format":we,object:lt,step:Ae,string:lt,"to-boolean":Tt,"to-color":Tt,"to-number":Tt,"to-string":Tt,var:Se};function ke(){}var Me={};for(var Oe in ke.register=function(t,e,r){void 0===r&&(r={}),Object.defineProperty(e,"_classRegistryKey",{value:t,writeable:!1}),Me[t]={klass:e,omit:r.omit||[],shallow:r.shallow||[]}},ke.register("Object",Object),ke.register("Color",S),ke.register("ResolvedImage",q),ke.register("ImageAtlas",g),ke.register("ImagePosition",p),ke.register("RGBAImage",f),ke.register("Formatted",X),ke.register("FormattedSection",L),Ie)Ie[Oe]._classRegistryKey||ke.register("Expression_"+Oe,Ie[Oe]);function Pe(t){return t&&"undefined"!=typeof ArrayBuffer&&(t instanceof ArrayBuffer||t.constructor&&"ArrayBuffer"===t.constructor.name)}ke.serialize=function(t,e){if(null==t||"boolean"==typeof t||"number"==typeof t||"string"==typeof t||t instanceof Boolean||t instanceof Number||t instanceof String||t instanceof Date||t instanceof RegExp)return t;if(Pe(t))return e&&e.push(t),t;if(ArrayBuffer.isView(t)){var r=t;return e&&e.push(r.buffer),r}if(t instanceof ImageData)return e&&e.push(t.data.buffer),t;if(Array.isArray(t)){for(var n=[],i=0,a=t;i=0)){var c=t[p];"function"!=typeof c&&(l[p]=Me[u].shallow.indexOf(p)>=0?c:ke.serialize(c,e))}t instanceof Error&&(l.message=t.message)}if(l.$name)throw new Error("$name property is reserved for worker serialization logic.");return"Object"!==u&&(l.$name=u),l}throw new Error("can't serialize object of type "+typeof t)},ke.deserialize=function(t){if(null==t||"boolean"==typeof t||"number"==typeof t||"string"==typeof t||t instanceof Boolean||t instanceof Number||t instanceof String||t instanceof Date||t instanceof RegExp||Pe(t)||ArrayBuffer.isView(t)||t instanceof ImageData)return t;if(Array.isArray(t))return t.map(ke.deserialize);if("object"==typeof t){var e=t.$name||"Object",r=Me[e].klass;if(!r)throw new Error("can't deserialize unregistered class "+e);if(r.deserialize)return r.deserialize(t);for(var n=Object.create(r.prototype),i=0,a=Object.keys(t);i=0?s:ke.deserialize(s)}}return n}throw new Error("can't deserialize object of type "+typeof t)};var ze=function(){this.first=!0};ze.prototype.update=function(t,e){var r=Math.floor(t);return this.first?(this.first=!1,this.lastIntegerZoom=r,this.lastIntegerZoomTime=0,this.lastZoom=t,this.lastFloorZoom=r,!0):(this.lastFloorZoom>r?(this.lastIntegerZoom=r+1,this.lastIntegerZoomTime=e):this.lastFloorZoomthis.zoomHistory.lastIntegerZoom?{fromScale:2,toScale:1,t:e+(1-e)*r}:{fromScale:.5,toScale:1,t:1-(1-r)*e}};var Fe=8192;function Ce(t,e,r){return Math.min(r,Math.max(e,t))}function De(t){return{min:-1*Math.pow(2,t-1),max:Math.pow(2,t-1)-1}}var Be=De(15);function Ue(t){for(var e=Fe/t.extent,r=t.loadGeometry(),n=0;nBe.max||o.yBe.max)&&(o.x=Ce(o.x,Be.min,Be.max),o.y=Ce(o.y,Be.min,Be.max))}return r}var Ve=function(t){void 0===t&&(t=[]),this.segments=t};Ve.prototype.prepareSegment=function(t,e,r,n){var i=this.segments[this.segments.length-1];return(!i||i.vertexLength+t>Ve.MAX_VERTEX_ARRAY_LENGTH||i.sortKey!==n)&&(i={vertexOffset:e.length,primitiveOffset:r.length,vertexLength:0,primitiveLength:0},void 0!==n&&(i.sortKey=n),this.segments.push(i)),i},Ve.prototype.get=function(){return this.segments},Ve.prototype.destroy=function(){for(var t=0,e=this.segments;tthis.capacity){this.capacity=Math.max(t,Math.floor(this.capacity*Le),Ne),this.arrayBuffer=new ArrayBuffer(this.capacity*this.bytesPerElement);var e=this.uint8;this._refreshViews(),e&&this.uint8.set(e)}},Xe.prototype._refreshViews=function(){throw new Error("_refreshViews() must be implemented by each concrete StructArray layout")};var qe=function(t){function e(){t.apply(this,arguments)}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype._refreshViews=function(){this.uint8=new Uint8Array(this.arrayBuffer),this.int16=new Int16Array(this.arrayBuffer)},e.prototype.emplaceBack=function(t,e,r,n,i,a){var o=this.length;return this.resize(o+1),this.emplace(o,t,e,r,n,i,a)},e.prototype.emplace=function(t,e,r,n,i,a,o){var s=4*t,u=8*t;return this.int16[s+0]=e,this.int16[s+1]=r,this.uint8[u+4]=n,this.uint8[u+5]=i,this.uint8[u+6]=a,this.uint8[u+7]=o,t},e}(Xe);qe.prototype.bytesPerElement=8,ke.register("StructArrayLayout2i4ub8",qe);var je=function(t){function e(){t.apply(this,arguments)}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype._refreshViews=function(){this.uint8=new Uint8Array(this.arrayBuffer),this.uint16=new Uint16Array(this.arrayBuffer)},e.prototype.emplaceBack=function(t,e,r){var n=this.length;return this.resize(n+1),this.emplace(n,t,e,r)},e.prototype.emplace=function(t,e,r,n){var i=3*t;return this.uint16[i+0]=e,this.uint16[i+1]=r,this.uint16[i+2]=n,t},e}(Xe);je.prototype.bytesPerElement=6,ke.register("StructArrayLayout3ui6",je);var He=function(){this.ids=[],this.positions=[],this.indexed=!1};function Ye(t,e,r,n){if(!(r>=n)){for(var i=t[r+n>>1],a=r-1,o=n+1;;){do{a++}while(t[a]i);if(a>=o)break;Qe(t,a,o),Qe(e,3*a,3*o),Qe(e,3*a+1,3*o+1),Qe(e,3*a+2,3*o+2)}Ye(t,e,r,o),Ye(t,e,o+1,n)}}function Qe(t,e,r){var n=t[e];t[e]=t[r],t[r]=n}He.prototype.add=function(t,e,r,n){this.ids.push(t),this.positions.push(e,r,n)},He.prototype.getPositions=function(t){for(var e=0,r=this.ids.length-1;e>1;this.ids[n]>=t?r=n:e=n+1}for(var i=[];this.ids[e]===t;){var a=this.positions[3*e],o=this.positions[3*e+1],s=this.positions[3*e+2];i.push({index:a,start:o,end:s}),e++}return i},He.serialize=function(t,e){var r=new Float64Array(t.ids),n=new Uint32Array(t.positions);return Ye(r,n,0,r.length-1),e&&e.push(r.buffer,n.buffer),{ids:r,positions:n}},He.deserialize=function(t){var e=new He;return e.ids=t.ids,e.positions=t.positions,e.indexed=!0,e},ke.register("FeaturePositionMap",He);var Ke=function(t,e,r){this.property=t,this.value=e,this.parameters=r};function Ge(){}Ke.prototype.isConstant=function(){return"constant"===this.value.kind},Ke.prototype.constantOr=function(t){return"constant"===this.value.kind?this.value.value:t},Ke.prototype.evaluate=function(t,e,r){return this.property.evaluate(this.value,this.parameters,t,e,r)},Ge.supportsPropertyExpression=function(t){return"data-driven"===t["property-type"]||"cross-faded-data-driven"===t["property-type"]},Ge.supportsZoomExpression=function(t){return!!t.expression&&t.expression.parameters.indexOf("zoom")>-1},Ge.supportsInterpolation=function(t){return!!t.expression&&t.expression.interpolated};var We={},Je=function(t,e){this.gl=t.gl,this.location=e};We.Uniform1i=function(t){function e(e,r){t.call(this,e,r),this.current=0}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype.set=function(t){this.current!==t&&(this.current=t,this.gl.uniform1i(this.location,t))},e}(Je),We.Uniform1f=function(t){function e(e,r){t.call(this,e,r),this.current=0}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype.set=function(t){this.current!==t&&(this.current=t,this.gl.uniform1f(this.location,t))},e}(Je),We.Uniform2f=function(t){function e(e,r){t.call(this,e,r),this.current=[0,0]}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype.set=function(t){t[0]===this.current[0]&&t[1]===this.current[1]||(this.current=t,this.gl.uniform2f(this.location,t[0],t[1]))},e}(Je),We.Uniform3f=function(t){function e(e,r){t.call(this,e,r),this.current=[0,0,0]}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype.set=function(t){t[0]===this.current[0]&&t[1]===this.current[1]&&t[2]===this.current[2]||(this.current=t,this.gl.uniform3f(this.location,t[0],t[1],t[2]))},e}(Je),We.Uniform4f=function(t){function e(e,r){t.call(this,e,r),this.current=[0,0,0,0]}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype.set=function(t){t[0]===this.current[0]&&t[1]===this.current[1]&&t[2]===this.current[2]&&t[3]===this.current[3]||(this.current=t,this.gl.uniform4f(this.location,t[0],t[1],t[2],t[3]))},e}(Je),We.UniformColor=function(t){function e(e,r){t.call(this,e,r),this.current=S.transparent}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype.set=function(t){t.r===this.current.r&&t.g===this.current.g&&t.b===this.current.b&&t.a===this.current.a||(this.current=t,this.gl.uniform4f(this.location,t.r,t.g,t.b,t.a))},e}(Je);var Ze=new Float32Array(16);We.UniformMatrix4f=function(t){function e(e,r){t.call(this,e,r),this.current=Ze}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype.set=function(t){this.gl.uniformMatrix4fv(this.location,!1,t)},e}(Je);var $e=function(t){function e(){t.apply(this,arguments)}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype._refreshViews=function(){this.uint8=new Uint8Array(this.arrayBuffer),this.uint16=new Uint16Array(this.arrayBuffer)},e.prototype.emplaceBack=function(t,e,r,n,i,a,o,s){var u=this.length;return this.resize(u+1),this.emplace(u,t,e,r,n,i,a,o,s)},e.prototype.emplace=function(t,e,r,n,i,a,o,s,u){var l=8*t;return this.uint16[l+0]=e,this.uint16[l+1]=r,this.uint16[l+2]=n,this.uint16[l+3]=i,this.uint16[l+4]=a,this.uint16[l+5]=o,this.uint16[l+6]=s,this.uint16[l+7]=u,t},e}(Xe);$e.prototype.bytesPerElement=16,ke.register("StructArrayLayout8ui16",$e);var tr=function(t){function e(){t.apply(this,arguments)}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype._refreshViews=function(){this.uint8=new Uint8Array(this.arrayBuffer),this.float32=new Float32Array(this.arrayBuffer)},e.prototype.emplaceBack=function(t,e){var r=this.length;return this.resize(r+1),this.emplace(r,t,e)},e.prototype.emplace=function(t,e,r){var n=2*t;return this.float32[n+0]=e,this.float32[n+1]=r,t},e}(Xe);tr.prototype.bytesPerElement=8,ke.register("StructArrayLayout2f8",tr);var er=function(t){function e(){t.apply(this,arguments)}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype._refreshViews=function(){this.uint8=new Uint8Array(this.arrayBuffer),this.float32=new Float32Array(this.arrayBuffer)},e.prototype.emplaceBack=function(t,e,r,n){var i=this.length;return this.resize(i+1),this.emplace(i,t,e,r,n)},e.prototype.emplace=function(t,e,r,n,i){var a=4*t;return this.float32[a+0]=e,this.float32[a+1]=r,this.float32[a+2]=n,this.float32[a+3]=i,t},e}(Xe);er.prototype.bytesPerElement=16,ke.register("StructArrayLayout4f16",er);var rr=function(t){function e(){t.apply(this,arguments)}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype._refreshViews=function(){this.uint8=new Uint8Array(this.arrayBuffer),this.float32=new Float32Array(this.arrayBuffer)},e.prototype.emplaceBack=function(t){var e=this.length;return this.resize(e+1),this.emplace(e,t)},e.prototype.emplace=function(t,e){var r=1*t;return this.float32[r+0]=e,t},e}(Xe);function nr(t,e,r){return Math.min(r,Math.max(e,t))}function ir(t,e){return 256*(t=nr(Math.floor(t),0,255))+(e=nr(Math.floor(e),0,255))}function ar(t){return[ir(255*t.r,255*t.g),ir(255*t.b,255*t.a)]}rr.prototype.bytesPerElement=4,ke.register("StructArrayLayout1f4",rr);var or=function(t,e,r){this.value=t,this.names=e,this.uniformNames=this.names.map((function(t){return"u_"+t})),this.type=r,this.maxValue=-1/0};or.prototype.defines=function(){return this.names.map((function(t){return"#define HAS_UNIFORM_u_"+t}))},or.prototype.setConstantPatternPositions=function(){},or.prototype.populatePaintArray=function(){},or.prototype.updatePaintArray=function(){},or.prototype.upload=function(){},or.prototype.destroy=function(){},or.prototype.setUniforms=function(t,e,r,n){e.set(n.constantOr(this.value))},or.prototype.getBinding=function(t,e){return"color"===this.type?new We.UniformColor(t,e):new We.Uniform1f(t,e)},or.serialize=function(t){var e=t.value,r=t.names,n=t.type;return{value:ke.serialize(e),names:r,type:n}},or.deserialize=function(t){var e=t.value,r=t.names,n=t.type;return new or(ke.deserialize(e),r,n)};var sr=function(t,e,r){this.value=t,this.names=e,this.uniformNames=this.names.map((function(t){return"u_"+t})),this.type=r,this.maxValue=-1/0,this.patternPositions={patternTo:null,patternFrom:null}};sr.prototype.defines=function(){return this.names.map((function(t){return"#define HAS_UNIFORM_u_"+t}))},sr.prototype.populatePaintArray=function(){},sr.prototype.updatePaintArray=function(){},sr.prototype.upload=function(){},sr.prototype.destroy=function(){},sr.prototype.setConstantPatternPositions=function(t,e){this.patternPositions.patternTo=t.tlbr,this.patternPositions.patternFrom=e.tlbr},sr.prototype.setUniforms=function(t,e,r,n,i){var a=this.patternPositions;"u_pattern_to"===i&&a.patternTo&&e.set(a.patternTo),"u_pattern_from"===i&&a.patternFrom&&e.set(a.patternFrom)},sr.prototype.getBinding=function(t,e){return new We.Uniform4f(t,e)};var ur=function(t,e,r,n){this.expression=t,this.names=e,this.type=r,this.uniformNames=this.names.map((function(t){return"a_"+t})),this.maxValue=-1/0,this.paintVertexAttributes=e.map((function(t){return{name:"a_"+t,type:"Float32",components:"color"===r?2:1,offset:0}})),this.paintVertexArray=new n};ur.prototype.defines=function(){return[]},ur.prototype.setConstantPatternPositions=function(){},ur.prototype.populatePaintArray=function(t,e,r,n){var i=this.paintVertexArray,a=i.length;i.reserve(t);var o=this.expression.evaluate(new EvaluationParameters(0),e,{},[],n);if("color"===this.type)for(var s=ar(o),u=a;ur;){if(n-r>600){var a=n-r+1,o=e-r+1,s=Math.log(a),u=.5*Math.exp(2*s/3),l=.5*Math.sqrt(s*u*(a-u)/a)*(o-a/2<0?-1:1);Mr(t,e,Math.max(r,Math.floor(e-o*u/a+l)),Math.min(n,Math.floor(e+(a-o)*u/a+l)),i)}var p=t[e],c=r,f=n;for(Or(t,r,e),i(t[n],p)>0&&Or(t,r,n);c0;)f--}0===i(t[r],p)?Or(t,r,f):Or(t,++f,n),f<=e&&(r=f+1),e<=f&&(n=f-1)}}function Or(t,e,r){var n=t[e];t[e]=t[r],t[r]=n}function Pr(t,e){return te?1:0}function zr(t){for(var e=0,r=0,n=t.length,i=n-1,a=void 0,o=void 0;r1)for(var u=0;u=2&&t[p-1].equals(t[p-2]);)p--;for(var c=0;c0;if(A&&x>c){var I=f.dist(y);if(I>2*h){var k=f.sub(f.sub(y)._mult(h/I)._round());this.updateDistance(y,k),this.addCurrentVertex(k,v,0,0,d),y=k}}var M=y&&m,O=M?r:l?"butt":n;if(M&&"round"===O&&(Ei&&(O="bevel"),"bevel"===O&&(E>2&&(O="flipbevel"),E100)b=g.mult(-1);else{var P=E*v.add(g).mag()/v.sub(g).mag();b._perp()._mult(P*(S?-1:1))}this.addCurrentVertex(f,b,0,0,d),this.addCurrentVertex(f,b.mult(-1),0,0,d)}else if("bevel"===O||"fakeround"===O){var z=-Math.sqrt(E*E-1),R=S?z:0,F=S?0:z;if(y&&this.addCurrentVertex(f,v,R,F,d),"fakeround"===O)for(var C=Math.round(180*T/Math.PI/Er),D=1;D2*h){var X=f.add(m.sub(f)._mult(h/L)._round());this.updateDistance(f,X),this.addCurrentVertex(X,g,0,0,d),f=X}}}this.programConfigurations.populatePaintArrays(this.layoutVertexArray.length,e,o,s)}},Ir.prototype.addCurrentVertex=function(t,e,r,n,i,a){void 0===a&&(a=!1);var o=e.x+e.y*r,s=e.y-e.x*r,u=-e.x+e.y*n,l=-e.y-e.x*n;this.addHalfVertex(t,o,s,a,!1,r,i),this.addHalfVertex(t,u,l,a,!0,-n,i),this.distance>Sr/2&&0===this.totalDistance&&(this.distance=0,this.addCurrentVertex(t,e,r,n,i,a))},Ir.prototype.addHalfVertex=function(t,e,r,n,i,a,o){var s=t.x,u=t.y,l=this.scaledDistance*Ar;this.layoutVertexArray.emplaceBack((s<<1)+(n?1:0),(u<<1)+(i?1:0),Math.round(br*e)+128,Math.round(br*r)+128,1+(0===a?0:a<0?-1:1)|(63&l)<<2,l>>6);var p=o.vertexLength++;this.e1>=0&&this.e2>=0&&(this.indexArray.emplaceBack(this.e1,this.e2,p),o.primitiveLength++),i?this.e2=p:this.e1=p},Ir.prototype.updateDistance=function(t,e){this.distance+=t.dist(e),this.scaledDistance=this.totalDistance>0?(this.clipStart+(this.clipEnd-this.clipStart)*this.distance/this.totalDistance)*(Sr-1):this.distance},ke.register("LineBucket",Ir,{omit:["layers","patternFeatures"]});var Cr=function(t){function e(){t.apply(this,arguments)}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype._refreshViews=function(){this.uint8=new Uint8Array(this.arrayBuffer),this.int16=new Int16Array(this.arrayBuffer)},e.prototype.emplaceBack=function(t,e){var r=this.length;return this.resize(r+1),this.emplace(r,t,e)},e.prototype.emplace=function(t,e,r){var n=2*t;return this.int16[n+0]=e,this.int16[n+1]=r,t},e}(Xe);Cr.prototype.bytesPerElement=4,ke.register("StructArrayLayout2i4",Cr);var Dr,Br=function(t){function e(){t.apply(this,arguments)}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype._refreshViews=function(){this.uint8=new Uint8Array(this.arrayBuffer),this.uint16=new Uint16Array(this.arrayBuffer)},e.prototype.emplaceBack=function(t,e){var r=this.length;return this.resize(r+1),this.emplace(r,t,e)},e.prototype.emplace=function(t,e,r){var n=2*t;return this.uint16[n+0]=e,this.uint16[n+1]=r,t},e}(Xe);function Ur(t,e,r){for(var n=r.patternDependencies,i=!1,a=0,o=e;a1&&(Nr.thisProgram=process.argv[1].replace(/\\/g,"/")),Nr.arguments=process.argv.slice(2),"undefined"!=typeof module&&(module.exports=Nr),process.on("uncaughtException",(function(t){if(!(t instanceof Yl))throw t})),process.on("unhandledRejection",Kl),Nr.quit=function(t){process.exit(t)},Nr.inspect=function(){return"[Emscripten Module object]"};else if(Hr)"undefined"!=typeof read&&(Nr.read=function(t){return read(t)}),Nr.readBinary=function(t){var e;return"function"==typeof readbuffer?new Uint8Array(readbuffer(t)):(Qu("object"==typeof(e=read(t,"binary"))),e)},"undefined"!=typeof scriptArgs?Nr.arguments=scriptArgs:void 0!==arguments&&(Nr.arguments=arguments),"function"==typeof quit&&(Nr.quit=function(t){quit(t)});else{if(!Xr&&!qr)throw new Error("environment detection error");qr?Kr=self.location.href:document.currentScript&&(Kr=document.currentScript.src),Kr=0!==Kr.indexOf("blob:")?Kr.substr(0,Kr.lastIndexOf("/")+1):"",Nr.read=function(t){var e=new XMLHttpRequest;return e.open("GET",t,!1),e.send(null),e.responseText},qr&&(Nr.readBinary=function(t){var e=new XMLHttpRequest;return e.open("GET",t,!1),e.responseType="arraybuffer",e.send(null),new Uint8Array(e.response)}),Nr.readAsync=function(t,e,r){var n=new XMLHttpRequest;n.open("GET",t,!0),n.responseType="arraybuffer",n.onload=function(){200==n.status||0==n.status&&n.response?e(n.response):r()},n.onerror=r,n.send(null)},Nr.setWindowTitle=function(t){document.title=t}}var Gr=Nr.print||("undefined"!=typeof console?console.log.bind(console):"undefined"!=typeof print?print:null),Wr=Nr.printErr||("undefined"!=typeof printErr?printErr:"undefined"!=typeof console&&console.warn.bind(console)||Gr);for(Vr in Lr)Lr.hasOwnProperty(Vr)&&(Nr[Vr]=Lr[Vr]);function Hu(t){Hu.shown||(Hu.shown={}),Hu.shown[t]||(Hu.shown[t]=1)}Lr=void 0,Qu(void 0===Nr.memoryInitializerPrefixURL,"Module.memoryInitializerPrefixURL option was removed, use Module.locateFile instead"),Qu(void 0===Nr.pthreadMainPrefixURL,"Module.pthreadMainPrefixURL option was removed, use Module.locateFile instead"),Qu(void 0===Nr.cdInitializerPrefixURL,"Module.cdInitializerPrefixURL option was removed, use Module.locateFile instead"),Qu(void 0===Nr.filePackagePrefixURL,"Module.filePackagePrefixURL option was removed, use Module.locateFile instead"),ai=ii=ni=function(){Kl("cannot use the stack before compiled code is ready to run, and has provided stack access")};var Jr={"f64-rem":function(t,e){return t%e},debugger:function(){}};new Array(0);var Zr,$r=0,tn=function(t){$r=t},en=function(){return $r};function Yu(t,e,r){switch("*"===(e=e||"i8").charAt(e.length-1)&&(e="i32"),e){case"i1":case"i8":return on[t>>0];case"i16":return un[t>>1];case"i32":case"i64":return ln[t>>2];case"float":return cn[t>>2];case"double":return fn[t>>3];default:Kl("invalid type for getValue: "+e)}return null}"object"!=typeof WebAssembly&&Kl("No WebAssembly support found. Build with -s WASM=0 to target JavaScript instead.");var rn=!1;function Qu(t,e){t||Kl("Assertion failed: "+e)}function Ku(t){var e=Nr["_"+t];return Qu(e,"Cannot call unknown function "+t+", make sure it is exported"),e}function Gu(t,e,r,n,i){var a={string:function(t){var e=0;if(null!=t&&0!==t){var r=1+(t.length<<2);tl(t,e=ni(r),r)}return e},array:function(t){var e=ni(t.length);return el(t,e),e}};var o=Ku(t),s=[],u=0;if(Qu("array"!==e,'Return type should not be "array".'),n)for(var l=0;l=n);)++i;if(i-e>16&&t.subarray&&nn)return nn.decode(t.subarray(e,i));for(var a="";e>10,56320|1023&l)}}else a+=String.fromCharCode((31&o)<<6|s)}else a+=String.fromCharCode(o)}return a}function Zu(t,e){return t?Ju(sn,t,e):""}function $u(t,e,r,n){if(!(n>0))return 0;for(var i=r,a=r+n-1,o=0;o=55296&&s<=57343)s=65536+((1023&s)<<10)|1023&t.charCodeAt(++o);if(s<=127){if(r>=a)break;e[r++]=s}else if(s<=2047){if(r+1>=a)break;e[r++]=192|s>>6,e[r++]=128|63&s}else if(s<=65535){if(r+2>=a)break;e[r++]=224|s>>12,e[r++]=128|s>>6&63,e[r++]=128|63&s}else{if(r+3>=a)break;s>=2097152&&Hu("Invalid Unicode code point 0x"+s.toString(16)+" encountered when serializing a JS string to an UTF-8 string on the asm.js/wasm heap! (Valid unicode code points should be in range 0-0x1FFFFF)."),e[r++]=240|s>>18,e[r++]=128|s>>12&63,e[r++]=128|s>>6&63,e[r++]=128|63&s}}return e[r]=0,r-i}function tl(t,e,r){return Qu("number"==typeof r,"stringToUTF8(str, outPtr, maxBytesToWrite) is missing the third parameter that specifies the length of the output buffer!"),$u(t,sn,e,r)}function el(t,e){Qu(t.length>=0,"writeArrayToMemory array must have a length (should be an array or typed array)"),on.set(t,e)}function rl(){var t=new Error;if(!t.stack){try{throw new Error(0)}catch(e){t=e}if(!t.stack)return"(no stack trace available)"}return t.stack.toString()}"undefined"!=typeof TextDecoder&&new TextDecoder("utf-16le");var an,on,sn,un,ln,pn,cn,fn,hn=65536;function nl(t,e){return t%e>0&&(t+=e-t%e),t}function il(){Nr.HEAP8=on=new Int8Array(an),Nr.HEAP16=un=new Int16Array(an),Nr.HEAP32=ln=new Int32Array(an),Nr.HEAPU8=sn=new Uint8Array(an),Nr.HEAPU16=new Uint16Array(an),Nr.HEAPU32=pn=new Uint32Array(an),Nr.HEAPF32=cn=new Float32Array(an),Nr.HEAPF64=fn=new Float64Array(an)}var dn=5872,yn=5248752,mn=5248752,vn=5840;Qu(dn%16==0,"stack must start aligned"),Qu(mn%16==0,"heap must start aligned");var gn=5242880;Nr.TOTAL_STACK&&Qu(gn===Nr.TOTAL_STACK,"the stack size can no longer be determined at runtime");var xn=Nr.TOTAL_MEMORY||16777216;function al(){34821223==pn[(yn>>2)-1]&&2310721022==pn[(yn>>2)-2]||Kl("Stack overflow! Stack cookie has been overwritten, expected hex dwords 0x89BACDFE and 0x02135467, but received 0x"+pn[(yn>>2)-2].toString(16)+" "+pn[(yn>>2)-1].toString(16)),1668509029!==ln[0]&&Kl("Runtime error: The application has corrupted its heap memory area (address zero)!")}function ol(t){Kl("Stack overflow! Attempted to allocate "+t+" bytes on the stack, but stack has only "+(yn-ai()+t)+" bytes available!")}if(xn>2]=mn,ln[0]=1668509029,un[1]=25459,115!==sn[2]||99!==sn[3])throw"Runtime error: expected the system to be little-endian!";function sl(t){for(;t.length>0;){var e=t.shift();if("function"!=typeof e){var r=e.func;"number"==typeof r?void 0===e.arg?Nr.dynCall_v(r):Nr.dynCall_vi(r,e.arg):r(void 0===e.arg?null:e.arg)}else e()}}var bn=[],_n=[],wn=[],En=[],Tn=!1,An=!1;function ul(){if(Nr.preRun)for("function"==typeof Nr.preRun&&(Nr.preRun=[Nr.preRun]);Nr.preRun.length;)t=Nr.preRun.shift(),bn.unshift(t);var t;sl(bn)}function ll(){if(al(),Nr.postRun)for("function"==typeof Nr.postRun&&(Nr.postRun=[Nr.postRun]);Nr.postRun.length;)t=Nr.postRun.shift(),En.unshift(t);var t;sl(En)}Qu(Math.imul,"This browser does not support Math.imul(), build with LEGACY_VM_SUPPORT or POLYFILL_OLD_MATH_FUNCTIONS to add in a polyfill"),Qu(Math.fround,"This browser does not support Math.fround(), build with LEGACY_VM_SUPPORT or POLYFILL_OLD_MATH_FUNCTIONS to add in a polyfill"),Qu(Math.clz32,"This browser does not support Math.clz32(), build with LEGACY_VM_SUPPORT or POLYFILL_OLD_MATH_FUNCTIONS to add in a polyfill"),Qu(Math.trunc,"This browser does not support Math.trunc(), build with LEGACY_VM_SUPPORT or POLYFILL_OLD_MATH_FUNCTIONS to add in a polyfill");var Sn=0,In=null,kn=null,Mn={};function pl(t){Sn++,Nr.monitorRunDependencies&&Nr.monitorRunDependencies(Sn),t&&(Qu(!Mn[t]),Mn[t]=1,null===In&&"undefined"!=typeof setInterval&&(In=setInterval((function(){if(rn)return clearInterval(In),void(In=null)}),1e4)))}function cl(t){if(Sn--,Nr.monitorRunDependencies&&Nr.monitorRunDependencies(Sn),t&&(Qu(Mn[t]),delete Mn[t]),0==Sn&&(null!==In&&(clearInterval(In),In=null),kn)){var e=kn;kn=null,e()}}Nr.preloadedImages={},Nr.preloadedAudios={};var On={error:function(){Kl("Filesystem support (FS) was not included. The problem is that you are using files from JS, but files were not used from C/C++, so filesystem support was not auto-included. You can force-include filesystem support with -s FORCE_FILESYSTEM=1")},init:function(){On.error()},createDataFile:function(){On.error()},createPreloadedFile:function(){On.error()},createLazyFile:function(){On.error()},open:function(){On.error()},mkdev:function(){On.error()},registerDevice:function(){On.error()},analyzePath:function(){On.error()},loadFilesFromDB:function(){On.error()},ErrnoError:function(){On.error()}};Nr.FS_createDataFile=On.createDataFile,Nr.FS_createPreloadedFile=On.createPreloadedFile;var Pn="data:application/octet-stream;base64,";function fl(t){return String.prototype.startsWith?t.startsWith(Pn):0===t.indexOf(Pn)}var zn="ThirdParty/earcut.wasm";function hl(){try{if(Nr.wasmBinary)return new Uint8Array(Nr.wasmBinary);if(Nr.readBinary)return Nr.readBinary(zn);throw"both async and sync fetching of the wasm failed"}catch(t){Kl(t)}}function dl(t){var e={env:t,global:{NaN:NaN,Infinity:1/0},"global.Math":Math,asm2wasm:Jr};function r(t,e){var r=t.exports;Nr.asm=r,cl("wasm-instantiate")}pl("wasm-instantiate");var n=Nr;function i(t){Qu(Nr===n,"the Module object should not be replaced during async compilation - perhaps the order of HTML elements is wrong?"),n=null,r(t.instance)}function a(t){return(Nr.wasmBinary||!Xr&&!qr||"function"!=typeof fetch?new Promise((function(t,e){t(hl())})):fetch(zn,{credentials:"same-origin"}).then((function(t){if(!t.ok)throw"failed to load wasm binary file at '"+zn+"'";return t.arrayBuffer()})).catch((function(){return hl()}))).then((function(t){return WebAssembly.instantiate(t,e)})).then(t,(function(t){}))}if(Nr.instantiateWasm)try{return Nr.instantiateWasm(e,r)}catch(t){return!1}return function(){if(Nr.wasmBinary||"function"!=typeof WebAssembly.instantiateStreaming||fl(zn)||"function"!=typeof fetch)return a(i);fetch(zn,{credentials:"same-origin"}).then((function(t){return WebAssembly.instantiateStreaming(t,e).then(i,(function(t){a(i)}))}))}(),{}}fl(zn)||(Dr=zn,zn=Nr.locateFile?Nr.locateFile(Dr,Kr):Kr+Dr),Nr.asm=function(t,e,r){e.memory=Zr,e.table=new WebAssembly.Table({initial:260,maximum:260,element:"anyfunc"}),e.__memory_base=1024,e.__table_base=0;var n=dl(e);return Qu(n,"binaryen setup failed (no wasm support?)"),n};var Rn=5856;function yl(t){return ri(t)}Qu(Rn%8==0);var Fn={},Cn=[];function ml(t){t&&Fn[t].refcount++}function vl(t){if(!t||Fn[t])return t;for(var e in Fn)for(var r=+e,n=Fn[r].adjusted,i=n.length,a=0;a>2]},getStr:function(){return Zu(Dn.get())},get64:function(){var t=Dn.get(),e=Dn.get();return Qu(t>=0?0===e:-1===e),t},getZero:function(){Qu(0===Dn.get())}};function El(t,e){Dn.varargs=e;try{Dn.getStreamFromFD(),Dn.get(),Dn.get(),Dn.get(),Dn.get();return Kl("it should not be possible to operate on streams when !SYSCALLS_REQUIRE_FILESYSTEM"),0}catch(t){return void 0!==On&&t instanceof On.ErrnoError||Kl(t),-t.errno}}function Tl(){var t=Nr._fflush;t&&t(0);var e=Dn.buffers;e[1].length&&Dn.printChar(1,10),e[2].length&&Dn.printChar(2,10)}function Al(t,e){Dn.varargs=e;try{for(var r=Dn.get(),n=Dn.get(),i=Dn.get(),a=0,o=0;o>2],u=ln[n+(8*o+4)>>2],l=0;l>2]=t}function Rl(t){Kl("Cannot enlarge memory arrays to size "+t+" bytes (OOM). Either (1) compile with -s TOTAL_MEMORY=X with X higher than the current value "+on.length+", (2) compile with -s ALLOW_MEMORY_GROWTH=1 which allows increasing the size at runtime, or (3) if you want malloc to return NULL (0) instead of this abort, compile with -s ABORTING_MALLOC=0 ")}function Fl(t){t=nl(t,65536);var e=an.byteLength;try{return-1!==Zr.grow((t-e)/65536)&&(an=Zr.buffer,!0)}catch(r){return console.error("emscripten_realloc_buffer: Attempted to grow from "+e+" bytes to "+t+" bytes, but got error: "+r),!1}}function Cl(t){var e=Ol();Qu(t>e);var r=65536,n=2147418112;if(t>n)return!1;for(var i=Math.max(e,16777216);i0||(Qu(0==(3&yn)),pn[(yn>>2)-1]=34821223,pn[(yn>>2)-2]=2310721022,ul(),Sn>0||Nr.calledRun||(Nr.setStatus?(Nr.setStatus("Running..."),setTimeout((function(){setTimeout((function(){Nr.setStatus("")}),1),e()}),1)):e(),al()))}Nr.dynCall_ii=function(){return Qu(Tn,"you need to wait for the runtime to be ready (e.g. wait for main() to be called)"),Qu(!An,"the runtime was exited (use NO_EXIT_RUNTIME to keep it alive after main() exits)"),Nr.asm.dynCall_ii.apply(null,arguments)},Nr.dynCall_iidiiii=function(){return Qu(Tn,"you need to wait for the runtime to be ready (e.g. wait for main() to be called)"),Qu(!An,"the runtime was exited (use NO_EXIT_RUNTIME to keep it alive after main() exits)"),Nr.asm.dynCall_iidiiii.apply(null,arguments)},Nr.dynCall_iiii=function(){return Qu(Tn,"you need to wait for the runtime to be ready (e.g. wait for main() to be called)"),Qu(!An,"the runtime was exited (use NO_EXIT_RUNTIME to keep it alive after main() exits)"),Nr.asm.dynCall_iiii.apply(null,arguments)},Nr.dynCall_jiji=function(){return Qu(Tn,"you need to wait for the runtime to be ready (e.g. wait for main() to be called)"),Qu(!An,"the runtime was exited (use NO_EXIT_RUNTIME to keep it alive after main() exits)"),Nr.asm.dynCall_jiji.apply(null,arguments)},Nr.dynCall_v=function(){return Qu(Tn,"you need to wait for the runtime to be ready (e.g. wait for main() to be called)"),Qu(!An,"the runtime was exited (use NO_EXIT_RUNTIME to keep it alive after main() exits)"),Nr.asm.dynCall_v.apply(null,arguments)},Nr.dynCall_vi=function(){return Qu(Tn,"you need to wait for the runtime to be ready (e.g. wait for main() to be called)"),Qu(!An,"the runtime was exited (use NO_EXIT_RUNTIME to keep it alive after main() exits)"),Nr.asm.dynCall_vi.apply(null,arguments)},Nr.dynCall_vii=function(){return Qu(Tn,"you need to wait for the runtime to be ready (e.g. wait for main() to be called)"),Qu(!An,"the runtime was exited (use NO_EXIT_RUNTIME to keep it alive after main() exits)"),Nr.asm.dynCall_vii.apply(null,arguments)},Nr.dynCall_viiii=function(){return Qu(Tn,"you need to wait for the runtime to be ready (e.g. wait for main() to be called)"),Qu(!An,"the runtime was exited (use NO_EXIT_RUNTIME to keep it alive after main() exits)"),Nr.asm.dynCall_viiii.apply(null,arguments)},Nr.dynCall_viiiii=function(){return Qu(Tn,"you need to wait for the runtime to be ready (e.g. wait for main() to be called)"),Qu(!An,"the runtime was exited (use NO_EXIT_RUNTIME to keep it alive after main() exits)"),Nr.asm.dynCall_viiiii.apply(null,arguments)},Nr.dynCall_viiiiii=function(){return Qu(Tn,"you need to wait for the runtime to be ready (e.g. wait for main() to be called)"),Qu(!An,"the runtime was exited (use NO_EXIT_RUNTIME to keep it alive after main() exits)"),Nr.asm.dynCall_viiiiii.apply(null,arguments)},Nr.asm=Vn,Nr.intArrayFromString||(Nr.intArrayFromString=function(){Kl("'intArrayFromString' was not exported. add it to EXTRA_EXPORTED_RUNTIME_METHODS (see the FAQ)")}),Nr.intArrayToString||(Nr.intArrayToString=function(){Kl("'intArrayToString' was not exported. add it to EXTRA_EXPORTED_RUNTIME_METHODS (see the FAQ)")}),Nr.ccall=Gu,Nr.cwrap=Wu,Nr.setValue||(Nr.setValue=function(){Kl("'setValue' was not exported. add it to EXTRA_EXPORTED_RUNTIME_METHODS (see the FAQ)")}),Nr.getValue=Yu,Nr.allocate||(Nr.allocate=function(){Kl("'allocate' was not exported. add it to EXTRA_EXPORTED_RUNTIME_METHODS (see the FAQ)")}),Nr.getMemory||(Nr.getMemory=function(){Kl("'getMemory' was not exported. add it to EXTRA_EXPORTED_RUNTIME_METHODS (see the FAQ). Alternatively, forcing filesystem support (-s FORCE_FILESYSTEM=1) can export this for you")}),Nr.AsciiToString||(Nr.AsciiToString=function(){Kl("'AsciiToString' was not exported. add it to EXTRA_EXPORTED_RUNTIME_METHODS (see the FAQ)")}),Nr.stringToAscii||(Nr.stringToAscii=function(){Kl("'stringToAscii' was not exported. add it to EXTRA_EXPORTED_RUNTIME_METHODS (see the FAQ)")}),Nr.UTF8ArrayToString||(Nr.UTF8ArrayToString=function(){Kl("'UTF8ArrayToString' was not exported. add it to EXTRA_EXPORTED_RUNTIME_METHODS (see the FAQ)")}),Nr.UTF8ToString||(Nr.UTF8ToString=function(){Kl("'UTF8ToString' was not exported. add it to EXTRA_EXPORTED_RUNTIME_METHODS (see the FAQ)")}),Nr.stringToUTF8Array||(Nr.stringToUTF8Array=function(){Kl("'stringToUTF8Array' was not exported. add it to EXTRA_EXPORTED_RUNTIME_METHODS (see the FAQ)")}),Nr.stringToUTF8||(Nr.stringToUTF8=function(){Kl("'stringToUTF8' was not exported. add it to EXTRA_EXPORTED_RUNTIME_METHODS (see the FAQ)")}),Nr.lengthBytesUTF8||(Nr.lengthBytesUTF8=function(){Kl("'lengthBytesUTF8' was not exported. add it to EXTRA_EXPORTED_RUNTIME_METHODS (see the FAQ)")}),Nr.UTF16ToString||(Nr.UTF16ToString=function(){Kl("'UTF16ToString' was not exported. add it to EXTRA_EXPORTED_RUNTIME_METHODS (see the FAQ)")}),Nr.stringToUTF16||(Nr.stringToUTF16=function(){Kl("'stringToUTF16' was not exported. add it to EXTRA_EXPORTED_RUNTIME_METHODS (see the FAQ)")}),Nr.lengthBytesUTF16||(Nr.lengthBytesUTF16=function(){Kl("'lengthBytesUTF16' was not exported. add it to EXTRA_EXPORTED_RUNTIME_METHODS (see the FAQ)")}),Nr.UTF32ToString||(Nr.UTF32ToString=function(){Kl("'UTF32ToString' was not exported. add it to EXTRA_EXPORTED_RUNTIME_METHODS (see the FAQ)")}),Nr.stringToUTF32||(Nr.stringToUTF32=function(){Kl("'stringToUTF32' was not exported. add it to EXTRA_EXPORTED_RUNTIME_METHODS (see the FAQ)")}),Nr.lengthBytesUTF32||(Nr.lengthBytesUTF32=function(){Kl("'lengthBytesUTF32' was not exported. add it to EXTRA_EXPORTED_RUNTIME_METHODS (see the FAQ)")}),Nr.allocateUTF8||(Nr.allocateUTF8=function(){Kl("'allocateUTF8' was not exported. add it to EXTRA_EXPORTED_RUNTIME_METHODS (see the FAQ)")}),Nr.stackTrace||(Nr.stackTrace=function(){Kl("'stackTrace' was not exported. add it to EXTRA_EXPORTED_RUNTIME_METHODS (see the FAQ)")}),Nr.addOnPreRun||(Nr.addOnPreRun=function(){Kl("'addOnPreRun' was not exported. add it to EXTRA_EXPORTED_RUNTIME_METHODS (see the FAQ)")}),Nr.addOnInit||(Nr.addOnInit=function(){Kl("'addOnInit' was not exported. add it to EXTRA_EXPORTED_RUNTIME_METHODS (see the FAQ)")}),Nr.addOnPreMain||(Nr.addOnPreMain=function(){Kl("'addOnPreMain' was not exported. add it to EXTRA_EXPORTED_RUNTIME_METHODS (see the FAQ)")}),Nr.addOnExit||(Nr.addOnExit=function(){Kl("'addOnExit' was not exported. add it to EXTRA_EXPORTED_RUNTIME_METHODS (see the FAQ)")}),Nr.addOnPostRun||(Nr.addOnPostRun=function(){Kl("'addOnPostRun' was not exported. add it to EXTRA_EXPORTED_RUNTIME_METHODS (see the FAQ)")}),Nr.writeStringToMemory||(Nr.writeStringToMemory=function(){Kl("'writeStringToMemory' was not exported. add it to EXTRA_EXPORTED_RUNTIME_METHODS (see the FAQ)")}),Nr.writeArrayToMemory||(Nr.writeArrayToMemory=function(){Kl("'writeArrayToMemory' was not exported. add it to EXTRA_EXPORTED_RUNTIME_METHODS (see the FAQ)")}),Nr.writeAsciiToMemory||(Nr.writeAsciiToMemory=function(){Kl("'writeAsciiToMemory' was not exported. add it to EXTRA_EXPORTED_RUNTIME_METHODS (see the FAQ)")}),Nr.addRunDependency||(Nr.addRunDependency=function(){Kl("'addRunDependency' was not exported. add it to EXTRA_EXPORTED_RUNTIME_METHODS (see the FAQ). Alternatively, forcing filesystem support (-s FORCE_FILESYSTEM=1) can export this for you")}),Nr.removeRunDependency||(Nr.removeRunDependency=function(){Kl("'removeRunDependency' was not exported. add it to EXTRA_EXPORTED_RUNTIME_METHODS (see the FAQ). Alternatively, forcing filesystem support (-s FORCE_FILESYSTEM=1) can export this for you")}),Nr.ENV||(Nr.ENV=function(){Kl("'ENV' was not exported. add it to EXTRA_EXPORTED_RUNTIME_METHODS (see the FAQ)")}),Nr.FS||(Nr.FS=function(){Kl("'FS' was not exported. add it to EXTRA_EXPORTED_RUNTIME_METHODS (see the FAQ)")}),Nr.FS_createFolder||(Nr.FS_createFolder=function(){Kl("'FS_createFolder' was not exported. add it to EXTRA_EXPORTED_RUNTIME_METHODS (see the FAQ). Alternatively, forcing filesystem support (-s FORCE_FILESYSTEM=1) can export this for you")}),Nr.FS_createPath||(Nr.FS_createPath=function(){Kl("'FS_createPath' was not exported. add it to EXTRA_EXPORTED_RUNTIME_METHODS (see the FAQ). Alternatively, forcing filesystem support (-s FORCE_FILESYSTEM=1) can export this for you")}),Nr.FS_createDataFile||(Nr.FS_createDataFile=function(){Kl("'FS_createDataFile' was not exported. add it to EXTRA_EXPORTED_RUNTIME_METHODS (see the FAQ). Alternatively, forcing filesystem support (-s FORCE_FILESYSTEM=1) can export this for you")}),Nr.FS_createPreloadedFile||(Nr.FS_createPreloadedFile=function(){Kl("'FS_createPreloadedFile' was not exported. add it to EXTRA_EXPORTED_RUNTIME_METHODS (see the FAQ). Alternatively, forcing filesystem support (-s FORCE_FILESYSTEM=1) can export this for you")}),Nr.FS_createLazyFile||(Nr.FS_createLazyFile=function(){Kl("'FS_createLazyFile' was not exported. add it to EXTRA_EXPORTED_RUNTIME_METHODS (see the FAQ). Alternatively, forcing filesystem support (-s FORCE_FILESYSTEM=1) can export this for you")}),Nr.FS_createLink||(Nr.FS_createLink=function(){Kl("'FS_createLink' was not exported. add it to EXTRA_EXPORTED_RUNTIME_METHODS (see the FAQ). Alternatively, forcing filesystem support (-s FORCE_FILESYSTEM=1) can export this for you")}),Nr.FS_createDevice||(Nr.FS_createDevice=function(){Kl("'FS_createDevice' was not exported. add it to EXTRA_EXPORTED_RUNTIME_METHODS (see the FAQ). Alternatively, forcing filesystem support (-s FORCE_FILESYSTEM=1) can export this for you")}),Nr.FS_unlink||(Nr.FS_unlink=function(){Kl("'FS_unlink' was not exported. add it to EXTRA_EXPORTED_RUNTIME_METHODS (see the FAQ). Alternatively, forcing filesystem support (-s FORCE_FILESYSTEM=1) can export this for you")}),Nr.GL||(Nr.GL=function(){Kl("'GL' was not exported. add it to EXTRA_EXPORTED_RUNTIME_METHODS (see the FAQ)")}),Nr.dynamicAlloc||(Nr.dynamicAlloc=function(){Kl("'dynamicAlloc' was not exported. add it to EXTRA_EXPORTED_RUNTIME_METHODS (see the FAQ)")}),Nr.warnOnce||(Nr.warnOnce=function(){Kl("'warnOnce' was not exported. add it to EXTRA_EXPORTED_RUNTIME_METHODS (see the FAQ)")}),Nr.loadDynamicLibrary||(Nr.loadDynamicLibrary=function(){Kl("'loadDynamicLibrary' was not exported. add it to EXTRA_EXPORTED_RUNTIME_METHODS (see the FAQ)")}),Nr.loadWebAssemblyModule||(Nr.loadWebAssemblyModule=function(){Kl("'loadWebAssemblyModule' was not exported. add it to EXTRA_EXPORTED_RUNTIME_METHODS (see the FAQ)")}),Nr.getLEB||(Nr.getLEB=function(){Kl("'getLEB' was not exported. add it to EXTRA_EXPORTED_RUNTIME_METHODS (see the FAQ)")}),Nr.getFunctionTables||(Nr.getFunctionTables=function(){Kl("'getFunctionTables' was not exported. add it to EXTRA_EXPORTED_RUNTIME_METHODS (see the FAQ)")}),Nr.alignFunctionTables||(Nr.alignFunctionTables=function(){Kl("'alignFunctionTables' was not exported. add it to EXTRA_EXPORTED_RUNTIME_METHODS (see the FAQ)")}),Nr.registerFunctions||(Nr.registerFunctions=function(){Kl("'registerFunctions' was not exported. add it to EXTRA_EXPORTED_RUNTIME_METHODS (see the FAQ)")}),Nr.addFunction||(Nr.addFunction=function(){Kl("'addFunction' was not exported. add it to EXTRA_EXPORTED_RUNTIME_METHODS (see the FAQ)")}),Nr.removeFunction||(Nr.removeFunction=function(){Kl("'removeFunction' was not exported. add it to EXTRA_EXPORTED_RUNTIME_METHODS (see the FAQ)")}),Nr.getFuncWrapper||(Nr.getFuncWrapper=function(){Kl("'getFuncWrapper' was not exported. add it to EXTRA_EXPORTED_RUNTIME_METHODS (see the FAQ)")}),Nr.prettyPrint||(Nr.prettyPrint=function(){Kl("'prettyPrint' was not exported. add it to EXTRA_EXPORTED_RUNTIME_METHODS (see the FAQ)")}),Nr.makeBigInt||(Nr.makeBigInt=function(){Kl("'makeBigInt' was not exported. add it to EXTRA_EXPORTED_RUNTIME_METHODS (see the FAQ)")}),Nr.dynCall||(Nr.dynCall=function(){Kl("'dynCall' was not exported. add it to EXTRA_EXPORTED_RUNTIME_METHODS (see the FAQ)")}),Nr.getCompilerSetting||(Nr.getCompilerSetting=function(){Kl("'getCompilerSetting' was not exported. add it to EXTRA_EXPORTED_RUNTIME_METHODS (see the FAQ)")}),Nr.stackSave||(Nr.stackSave=function(){Kl("'stackSave' was not exported. add it to EXTRA_EXPORTED_RUNTIME_METHODS (see the FAQ)")}),Nr.stackRestore||(Nr.stackRestore=function(){Kl("'stackRestore' was not exported. add it to EXTRA_EXPORTED_RUNTIME_METHODS (see the FAQ)")}),Nr.stackAlloc||(Nr.stackAlloc=function(){Kl("'stackAlloc' was not exported. add it to EXTRA_EXPORTED_RUNTIME_METHODS (see the FAQ)")}),Nr.establishStackSpace||(Nr.establishStackSpace=function(){Kl("'establishStackSpace' was not exported. add it to EXTRA_EXPORTED_RUNTIME_METHODS (see the FAQ)")}),Nr.print||(Nr.print=function(){Kl("'print' was not exported. add it to EXTRA_EXPORTED_RUNTIME_METHODS (see the FAQ)")}),Nr.printErr||(Nr.printErr=function(){Kl("'printErr' was not exported. add it to EXTRA_EXPORTED_RUNTIME_METHODS (see the FAQ)")}),Nr.getTempRet0||(Nr.getTempRet0=function(){Kl("'getTempRet0' was not exported. add it to EXTRA_EXPORTED_RUNTIME_METHODS (see the FAQ)")}),Nr.setTempRet0||(Nr.setTempRet0=function(){Kl("'setTempRet0' was not exported. add it to EXTRA_EXPORTED_RUNTIME_METHODS (see the FAQ)")}),Nr.Pointer_stringify||(Nr.Pointer_stringify=function(){Kl("'Pointer_stringify' was not exported. add it to EXTRA_EXPORTED_RUNTIME_METHODS (see the FAQ)")}),Nr.ALLOC_NORMAL||Object.defineProperty(Nr,"ALLOC_NORMAL",{get:function(){Kl("'ALLOC_NORMAL' was not exported. add it to EXTRA_EXPORTED_RUNTIME_METHODS (see the FAQ)")}}),Nr.ALLOC_STACK||Object.defineProperty(Nr,"ALLOC_STACK",{get:function(){Kl("'ALLOC_STACK' was not exported. add it to EXTRA_EXPORTED_RUNTIME_METHODS (see the FAQ)")}}),Nr.ALLOC_DYNAMIC||Object.defineProperty(Nr,"ALLOC_DYNAMIC",{get:function(){Kl("'ALLOC_DYNAMIC' was not exported. add it to EXTRA_EXPORTED_RUNTIME_METHODS (see the FAQ)")}}),Nr.ALLOC_NONE||Object.defineProperty(Nr,"ALLOC_NONE",{get:function(){Kl("'ALLOC_NONE' was not exported. add it to EXTRA_EXPORTED_RUNTIME_METHODS (see the FAQ)")}}),Yl.prototype=new Error,Yl.prototype.constructor=Yl,kn=function t(){Nr.calledRun||Ql(),Nr.calledRun||(kn=t)},Nr.run=Ql;var oi=[];function Kl(t){Nr.onAbort&&Nr.onAbort(t),rn=!0;var e,r="abort("+(t=void 0!==t?'"'+t+'"':"")+") at "+(e=rl(),Nr.extraStackTrace&&(e+="\n"+Nr.extraStackTrace()),e.replace(/__Z[\w\d_]+/g,(function(t){return t==t?t:t+" ["+t+"]"})));throw oi&&oi.forEach((function(e){r=e(r,t)})),r}if(Nr.abort=Kl,Nr.preInit)for("function"==typeof Nr.preInit&&(Nr.preInit=[Nr.preInit]);Nr.preInit.length>0;)Nr.preInit.pop()();Nr.noExitRuntime=!0,Ql()}else Nr=null;var si=Nr,ui=!1;if(e.defined(si)){si.onRuntimeInitialized=function(){ui=!0};var li=si.cwrap("earcut","number",["number","number","number","number","number","number"])}var pi=o([{name:"a_pos",components:2,type:"Int16"}],4),ci=pi.members,fi=500,hi=function(t){this.zoom=t.zoom,this.overscaling=t.overscaling,this.layers=t.layers,this.layerIds=this.layers.map((function(t){return t.id})),this.index=t.index,this.hasPattern=!1,this.patternFeatures=[],this.layoutVertexArray=new Cr,this.indexArray=new je,this.indexArray2=new Br,this.programConfigurations=new yr(ci,t.layers,t.zoom),this.segments=new Ve,this.segments2=new Ve,this.stateDependentLayerIds=this.layers.filter((function(t){return t.isStateDependent()})).map((function(t){return t.id}))};hi.prototype.populate=function(t,e){this.hasPattern=Ur("fill",this.layers,e);for(var r=[],n=0,i=t;nthis.capacity){this.capacity=Math.max(t,Math.floor(this.capacity*mi),yi),this.arrayBuffer=new ArrayBuffer(this.capacity*this.bytesPerElement);var e=this.uint8;this._refreshViews(),e&&this.uint8.set(e)}},vi.prototype._refreshViews=function(){throw new Error("_refreshViews() must be implemented by each concrete StructArray layout")};var gi=function(t){function e(){t.apply(this,arguments)}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype._refreshViews=function(){this.uint8=new Uint8Array(this.arrayBuffer),this.uint32=new Uint32Array(this.arrayBuffer),this.uint16=new Uint16Array(this.arrayBuffer)},e.prototype.emplaceBack=function(t,e,r){var n=this.length;return this.resize(n+1),this.emplace(n,t,e,r)},e.prototype.emplace=function(t,e,r,n){var i=2*t,a=4*t;return this.uint32[i+0]=e,this.uint16[a+2]=r,this.uint16[a+3]=n,t},e}(vi);gi.prototype.bytesPerElement=8;var xi=function(t){function e(){t.apply(this,arguments)}t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e;var r={featureIndex:{configurable:!0},sourceLayerIndex:{configurable:!0},bucketIndex:{configurable:!0}};return r.featureIndex.get=function(){return this._structArray.uint32[this._pos4+0]},r.featureIndex.set=function(t){this._structArray.uint32[this._pos4+0]=t},r.sourceLayerIndex.get=function(){return this._structArray.uint16[this._pos2+2]},r.sourceLayerIndex.set=function(t){this._structArray.uint16[this._pos2+2]=t},r.bucketIndex.get=function(){return this._structArray.uint16[this._pos2+3]},r.bucketIndex.set=function(t){this._structArray.uint16[this._pos2+3]=t},Object.defineProperties(e.prototype,r),e}(di);xi.prototype.size=8;var bi=function(t){function e(){t.apply(this,arguments)}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype.get=function(t){return new xi(this,t)},e}(gi);ke.register("FeatureIndexArray",bi,{omit:["layers","patternFeatures"]});var _i={FeatureIndexArray:bi};function wi(t,e){this.x=t,this.y=e}function Ei(t,e,r,n,i){this.properties={},this.extent=r,this.type=0,this._pbf=t,this._geometry=-1,this._keys=n,this._values=i,t.readFields(Ti,this,e)}function Ti(t,e,r){1==t?e.id=r.readVarint():2==t?Ai(r,e):3==t?e.type=r.readVarint():4==t&&(e._geometry=r.pos)}function Ai(t,e){for(var r=t.readVarint()+t.pos;t.pos>3;e=1===n?t.readString():2===n?t.readFloat():3===n?t.readDouble():4===n?t.readVarint64():5===n?t.readVarint():6===n?t.readSVarint():7===n?t.readBoolean():null}return e}function Pi(t,e){this.layers=t.readFields(zi,{},e)}function zi(t,e,r){if(3===t){var n=new ki(r,r.readVarint()+r.pos);n.length&&(e[n.name]=n)}}wi.prototype={clone:function(){return new wi(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,r=t.y-this.y;return e*e+r*r},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[0]*this.x+t[1]*this.y,r=t[2]*this.x+t[3]*this.y;return this.x=e,this.y=r,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),r=Math.sin(t),n=e*this.x-r*this.y,i=r*this.x+e*this.y;return this.x=n,this.y=i,this},_rotateAround:function(t,e){var r=Math.cos(t),n=Math.sin(t),i=e.x+r*(this.x-e.x)-n*(this.y-e.y),a=e.y+n*(this.x-e.x)+r*(this.y-e.y);return this.x=i,this.y=a,this},_round:function(){return this.x=Math.round(this.x),this.y=Math.round(this.y),this}},wi.convert=function(t){return t instanceof wi?t:Array.isArray(t)?new wi(t[0],t[1]):t},Ei.types=["Unknown","Point","LineString","Polygon"],Ei.prototype.loadGeometry=function(){var t=this._pbf;t.pos=this._geometry;for(var e,r=t.readVarint()+t.pos,n=1,i=0,a=0,o=0,s=[];t.pos>3}i--,1===n||2===n?(a+=t.readSVarint(),o+=t.readSVarint(),1===n&&(e&&s.push(e),e=[]),e.push(new wi(a,o))):7===n?e&&e.push(e[0].clone()):console.log("VectorTileFeature loadGeometry unknown command "+n)}return e&&s.push(e),s},Ei.prototype.bbox=function(){var t=this._pbf;t.pos=this._geometry;for(var e=t.readVarint()+t.pos,r=1,n=0,i=0,a=0,o=1/0,s=-1/0,u=1/0,l=-1/0;t.pos>3}if(n--,1===r||2===r)(i+=t.readSVarint())s&&(s=i),(a+=t.readSVarint())l&&(l=a);else if(7!==r)throw new Error("unknown command "+r)}return[o,u,s,l]},Ei.prototype.toGeoJSON=function(t,e,r){var n,i,a=this.extent*Math.pow(2,r),o=this.extent*t,s=this.extent*e,u=this.loadGeometry(),l=Ei.types[this.type];function p(t){for(var e=0;e=this._features.length)throw new Error("feature index out of bounds");this._pbf.pos=this._features[t];var e=this._pbf.readVarint()+this._pbf.pos;return new Ei(this._pbf,e,this.extent,this._keys,this._values)};var Ri=3;function Fi(t,e,r){var n=this.cells=[];if(t instanceof ArrayBuffer){this.arrayBuffer=t;var i=new Int32Array(this.arrayBuffer);t=i[0],e=i[1],r=i[2],this.d=e+2*r;for(var a=0;a=p[h+0]&&n>=p[h+1])?(o[f]=!0,a.push(l[f])):o[f]=!1}}},Fi.prototype._forEachCell=function(t,e,r,n,i,a,o,s){for(var u=this._convertToCellCoord(t),l=this._convertToCellCoord(e),p=this._convertToCellCoord(r),c=this._convertToCellCoord(n),f=u;f<=p;f++)for(var h=l;h<=c;h++){var d=this.d*h+f;if((!s||s(this._convertFromCellCoord(f),this._convertFromCellCoord(h),this._convertFromCellCoord(f+1),this._convertFromCellCoord(h+1)))&&i.call(this,t,e,r,n,d,a,o,s))return}},Fi.prototype._convertFromCellCoord=function(t){return(t-this.padding)/this.scale},Fi.prototype._convertToCellCoord=function(t){return Math.max(0,Math.min(this.d-1,Math.floor(t*this.scale)+this.padding))},Fi.prototype.toArrayBuffer=function(){if(this.arrayBuffer)return this.arrayBuffer;for(var t=this.cells,e=Ri+this.cells.length+1+1,r=0,n=0;n=1)return 1;var e=t*t,r=e*t;return 4*(t<.5?r:3*(t-e)+r-.75)},Ci.asyncAll=function(t,e,r){if(!t.length)return r(null,[]);var n=t.length,i=new Array(t.length),a=null;t.forEach((function(t,o){e(t,(function(t,e){t&&(a=t),i[o]=e,0==--n&&r(a,i)}))}))},Ci.extend=function(t){for(var e=[],r=arguments.length-1;r-- >0;)e[r]=arguments[r+1];for(var n=0,i=e;n>e/4).toString(16):([1e7]+-[1e3]+-4e3+-8e3+-1e11).replace(/[018]/g,t)}()},Ci.validateUuid=function(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)},Ci.bindAll=function(t,e){t.forEach((function(t){e[t]&&(e[t]=e[t].bind(e))}))},Ci.endsWith=function(t,e){return-1!==t.indexOf(e,t.length-e.length)},Ci.mapObject=function(t,e,r){var n={};for(var i in t)n[i]=e.call(r||this,t[i],i,t);return n},Ci.filterObject=function(t,e,r){var n={};for(var i in t)e.call(r||this,t[i],i,t)&&(n[i]=t[i]);return n},Ci.clone=function(t){return Array.isArray(t)?t.map(Ci.clone):"object"==typeof t&&t?Ci.mapObject(t,Ci.clone):t},Ci.deepEqual=function(t,e){if(Array.isArray(t)){if(!Array.isArray(e)||t.length!==e.length)return!1;for(var r=0;r=0)return!0;return!1},Ci.isCounterClockwise=function(t,e,r){return(r.y-t.y)*(e.x-t.x)>(e.y-t.y)*(r.x-t.x)},Ci.isWorker=function(){return"undefined"!=typeof WorkerGlobalScope&&"undefined"!=typeof self&&self instanceof WorkerGlobalScope};var Bi=null;Ci.isSafari=function(t){if(null==Bi){var e=t.navigator?t.navigator.userAgent:null;Bi=!!t.safari||!(!e||!(/\b(iPad|iPhone|iPod)\b/.test(e)||e.match("Safari")&&!e.match("Chrome")))}return Bi},Ci.resolveTokens=function(t,e){return e.replace(/{([^{}]+)}/g,(function(e,r){return r in t?String(t[r]):""}))};var Ui=function(t,e){void 0===e&&(e=[]),this.parent=t,this.bindings={};for(var r=0,n=e;r=0)return!1;var r=!0;return t.eachChild((function(t){r&&!Xi.isGlobalPropertyConstant(t,e)&&(r=!1)})),r};var qi=function(t,e,r,n,i){void 0===e&&(e=[]),void 0===n&&(n=new Ui),void 0===i&&(i=[]),this.registry=t,this.path=e,this.key=e.map((function(t){return"["+t+"]"})).join(""),this.scope=n,this.errors=i,this.expectedType=r};function ji(t,e){const r=e[t];return void 0===r?null:r}qi.prototype.parse=function(t,e,r,n,i){return void 0===i&&(i={}),e?this.concat(e,r,n)._parse(t,i):this._parse(t,i)},qi.prototype._parse=function(t,e){function r(t,e,r){return"assert"===r?new lt(e,[t]):"coerce"===r?new Tt(e,[t]):t}if(null!==t&&"string"!=typeof t&&"boolean"!=typeof t&&"number"!=typeof t||(t=["literal",t]),Array.isArray(t)){if(0===t.length)return this.error('Expected an array with at least one element. If you wanted a literal array, use ["literal", []].');var n=t[0];if("string"!=typeof n)return this.error("Expression name must be a string, but found "+typeof n+' instead. If you wanted a literal array, use ["literal", [...]].',0),null;var i=this.registry[n];if(i){var a=i.parse(t,this);if(!a)return null;if(this.expectedType){var o=this.expectedType,s=a.type;if("string"!==o.kind&&"number"!==o.kind&&"boolean"!==o.kind&&"object"!==o.kind&&"array"!==o.kind||"value"!==s.kind)if("color"!==o.kind&&"formatted"!==o.kind&&"resolvedImage"!==o.kind||"value"!==s.kind&&"string"!==s.kind){if(this.checkSubtype(o,s))return null}else a=r(a,o,e.typeAnnotation||"coerce");else a=r(a,o,e.typeAnnotation||"assert")}return!(a instanceof ve)&&a.type.kind,a}return this.error('Unknown expression "'+n+'". If you wanted a literal array, use ["literal", [...]].',0)}return void 0===t?this.error("'undefined' value invalid. Use null instead."):"object"==typeof t?this.error('Bare objects invalid. Use ["literal", {...}] instead.'):this.error("Expected an array, but found "+typeof t+" instead.")},qi.prototype.concat=function(t,e,r){var n="number"==typeof t?this.path.concat(t):this.path,i=r?this.scope.concat(r):this.scope;return new qi(this.registry,n,e||null,i,this.errors)},qi.prototype.error=function(t){for(var e=[],r=arguments.length-1;r-- >0;)e[r]=arguments[r+1];var n=""+this.key+e.map((function(t){return"["+t+"]"})).join("");this.errors.push(new Vi(n,t))},qi.prototype.checkSubtype=function(t,e){var r=V(t,e);return r&&this.error(r),r};var Hi=function(t,e,r,n){this.name=t,this.type=e,this._evaluate=r,this.args=n};function Yi(t){return Array.isArray(t)?"("+t.map(toString).join(", ")+")":"("+toString(t.type)+"...)"}Hi.prototype.evaluate=function(t,e){return this._evaluate(t,this.args,e)},Hi.prototype.eachChild=function(t){this.args.forEach(t)},Hi.prototype.possibleOutputs=function(){return[void 0]},Hi.prototype.serialize=function(){return[this.name].concat(this.args.map((function(t){return t.serialize()})))},Hi.parse=function(t,e){var r,n=t[0],i=Hi.definitions[n];if(!i)return e.error('Unknown expression "'+n+'". If you wanted a literal array, use ["literal", [...]].',0);for(var a=Array.isArray(i)?i[0]:i.type,o=Array.isArray(i)?[[i[1],i[2]]]:i.overloads,s=o.filter((function(e){var r=e[0];return!Array.isArray(r)||r.length===t.length-1})),u=null,l=0,p=s;l-1))}],"filter-type-==":[Gi,[Ki],function(t,e){var r=e[0];return t.geometryType()===r.value}],"filter-<":[Gi,[Ki,Zi],function(t,e,r){var n,i,a=e[0],o=e[1],s=a.value,u=o.value;if(/(\S*)\s*([+-])\s*(\S*)/.test(s)){var l=s.match(/(\S*)\s*([+-])\s*(\S*)/),p=t.properties()[l[1]],c=l[2],f=t.properties()[l[3]];switch(c){case"+":n=p+f;break;case"-":n=p-f}i=o.value}else if(/^(left|right)\s*\((.+)\s*,\s*(\d+)\)/.test(s)){var h=s.match(/^(left|right)\s*\((.+)\s*,\s*(\d+)\)/),d=h[1],y=(p=t.properties()[h[2]],h[3]);if(n="left"==d?p.substring(0,y):p.substring(p.length-y),/^(left|right)\s*\((.+)\s*,\s*(\d+)\)/.test(u)){var m=u.match(/^(left|right)\s*\((.+)\s*,\s*(\d+)\)/),v=m[1],g=(f=t.properties()[m[2]],m[3]);i="left"==v?f.substring(0,g):f.substring(f.length-g)}else i=o.value}else n=t.properties()[a.value],i=o.value,r&&(i=t.properties()[i]);return"number"!=typeof i||isNaN(Number(n))||(n=Number(n)),typeof n==typeof i&&n":[Gi,[Ki,Zi],function(t,e,r){var n,i,a=e[0],o=e[1],s=a.value,u=o.value;if(/(\S*)\s*([+-])\s*(\S*)/.test(s)){var l=s.match(/(\S*)\s*([+-])\s*(\S*)/),p=t.properties()[l[1]],c=l[2],f=t.properties()[l[3]];switch(c){case"+":n=p+f;break;case"-":n=p-f}i=o.value}else if(/^(left|right)\s*\((.+)\s*,\s*(\d+)\)/.test(s)){var h=s.match(/^(left|right)\s*\((.+)\s*,\s*(\d+)\)/),d=h[1],y=(p=t.properties()[h[2]],h[3]);if(n="left"==d?p.substring(0,y):p.substring(p.length-y),/^(left|right)\s*\((.+)\s*,\s*(\d+)\)/.test(u)){var m=u.match(/^(left|right)\s*\((.+)\s*,\s*(\d+)\)/),v=m[1],g=(f=t.properties()[m[2]],m[3]);i="left"==v?f.substring(0,g):f.substring(f.length-g)}else i=o.value}else n=t.properties()[a.value],i=o.value,r&&(i=t.properties()[i]);return"number"!=typeof i||isNaN(Number(n))||(n=Number(n)),typeof n==typeof i&&n>i}],"filter-id->":[Gi,[Zi],function(t,e){var r=e[0],n=t.id(),i=r.value;return typeof n==typeof i&&n>i}],"filter-<=":[Gi,[Ki,Zi],function(t,e,r){var n,i,a=e[0],o=e[1],s=a.value,u=o.value;if(/(\S*)\s*([+-])\s*(\S*)/.test(s)){var l=s.match(/(\S*)\s*([+-])\s*(\S*)/),p=t.properties()[l[1]],c=l[2],f=t.properties()[l[3]];switch(c){case"+":n=p+f;break;case"-":n=p-f}i=o.value}else if(/^(left|right)\s*\((.+)\s*,\s*(\d+)\)/.test(s)){var h=s.match(/^(left|right)\s*\((.+)\s*,\s*(\d+)\)/),d=h[1],y=(p=t.properties()[h[2]],h[3]);if(n="left"==d?p.substring(0,y):p.substring(p.length-y),/^(left|right)\s*\((.+)\s*,\s*(\d+)\)/.test(u)){var m=u.match(/^(left|right)\s*\((.+)\s*,\s*(\d+)\)/),v=m[1],g=(f=t.properties()[m[2]],m[3]);i="left"==v?f.substring(0,g):f.substring(f.length-g)}else i=o.value}else n=t.properties()[a.value],i=o.value,r&&(i=t.properties()[i]);return"number"!=typeof i||isNaN(Number(n))||(n=Number(n)),typeof n==typeof i&&n<=i}],"filter-id-<=":[Gi,[Zi],function(t,e){var r=e[0],n=t.id(),i=r.value;return typeof n==typeof i&&n<=i}],"filter->=":[Gi,[Ki,Zi],function(t,e,r){var n,i,a=e[0],o=e[1],s=a.value,u=o.value;if(/(\S*)\s*([+-])\s*(\S*)/.test(s)){var l=s.match(/(\S*)\s*([+-])\s*(\S*)/),p=t.properties()[l[1]],c=l[2],f=t.properties()[l[3]];switch(c){case"+":n=p+f;break;case"-":n=p-f}i=o.value}else if(/^(left|right)\s*\((.+)\s*,\s*(\d+)\)/.test(s)){var h=s.match(/^(left|right)\s*\((.+)\s*,\s*(\d+)\)/),d=h[1],y=(p=t.properties()[h[2]],h[3]);if(n="left"==d?p.substring(0,y):p.substring(p.length-y),/^(left|right)\s*\((.+)\s*,\s*(\d+)\)/.test(u)){var m=u.match(/^(left|right)\s*\((.+)\s*,\s*(\d+)\)/),v=m[1],g=(f=t.properties()[m[2]],m[3]);i="left"==v?f.substring(0,g):f.substring(f.length-g)}else i=o.value}else n=t.properties()[a.value],i=o.value,r&&(i=t.properties()[i]);return"number"!=typeof i||isNaN(Number(n))||(n=Number(n)),typeof n==typeof i&&n>=i}],"filter-id->=":[Gi,[Zi],function(t,e){var r=e[0],n=t.id(),i=r.value;return typeof n==typeof i&&n>=i}],"filter-has":[Gi,[Zi],function(t,e){return e[0].value in t.properties()}],"filter-has-id":[Gi,[],function(t){return null!==t.id()}],"filter-type-in":[Gi,[ea(Ki)],function(t,e){return e[0].value.indexOf(t.geometryType())>=0}],"filter-id-in":[Gi,[ea(Zi)],function(t,e){return e[0].value.indexOf(t.id())>=0}],"filter-in-small":[Gi,[Ki,ea(Zi)],function(t,e){var r=e[0];return e[1].value.indexOf(t.properties()[r.value])>=0}],"filter-in-large":[Gi,[Ki,ea(Zi)],function(t,e){var r=e[0],n=e[1];return binarySearch(t.properties()[r.value],n.value,0,n.value.length-1)}],all:{type:Gi,overloads:[[[Gi,Gi],function(t,e){var r=e[0],n=e[1];return r.evaluate(t)&&n.evaluate(t)}],[ra(Gi),function(t,e){for(var r=0,n=e;rha?Math.pow(t,1/3):t/fa+pa}function va(t){return t>ca?t*t*t:fa*(t-pa)}function ga(t){return 255*(t<=.0031308?12.92*t:1.055*Math.pow(t,1/2.4)-.055)}function xa(t){return(t/=255)<=.04045?t/12.92:Math.pow((t+.055)/1.055,2.4)}function ba(t){var e=xa(t.r),r=xa(t.g),n=xa(t.b),i=ma((.4124564*e+.3575761*r+.1804375*n)/sa),a=ma((.2126729*e+.7151522*r+.072175*n)/ua);return{l:116*a-16,a:500*(i-a),b:200*(a-ma((.0193339*e+.119192*r+.9503041*n)/la)),alpha:t.a}}function _a(t){var e=(t.l+16)/116,r=isNaN(t.a)?e:e+t.a/500,n=isNaN(t.b)?e:e-t.b/200;return e=ua*va(e),r=sa*va(r),n=la*va(n),new Color(ga(3.2404542*r-1.5371385*e-.4985314*n),ga(-.969266*r+1.8760108*e+.041556*n),ga(.0556434*r-.2040259*e+1.0572252*n),t.alpha)}function wa(t,e,r){return{l:number(t.l,e.l,r),a:number(t.a,e.a,r),b:number(t.b,e.b,r),alpha:number(t.alpha,e.alpha,r)}}function Ea(t){var e=ba(t),r=e.l,n=e.a,i=e.b,a=Math.atan2(i,n)*ya;return{h:a<0?a+360:a,c:Math.sqrt(n*n+i*i),l:r,alpha:t.a}}function Ta(t){var e=t.h*da,r=t.c;return _a({l:t.l,a:Math.cos(e)*r,b:Math.sin(e)*r,alpha:t.alpha})}function Aa(t,e,r){var n=e-t;return t+r*(n>180||n<-180?n-360*Math.round(n/360):n)}function Sa(t,e,r){return{h:Aa(t.h,e.h,r),c:number(t.c,e.c,r),l:number(t.l,e.l,r),alpha:number(t.alpha,e.alpha,r)}}var Ia={forward:ba,reverse:_a,interpolate:wa},ka={forward:Ea,reverse:Ta,interpolate:Sa},Ma=Object.freeze({__proto__:null,lab:Ia,hcl:ka});function Oa(){}function Pa(t){return{result:"success",value:t}}function za(t){return{result:"error",value:t}}Oa.isExpression=function(t){return Array.isArray(t)&&t.length>0&&"string"==typeof t[0]&&t[0]in Ie};var Ra={kind:"number"},Fa={kind:"string"},Ca={kind:"boolean"},Da={kind:"color"},Ba={kind:"value"},Ua={kind:"formatted"},Va={kind:"resolvedImage"};function Na(t,e){return{kind:"array",itemType:t,N:e}}function La(t){var e=null;if(t instanceof de)e=La(t.result);else if(t instanceof vt){for(var r of t.args)if(e=La(r))break}else(t instanceof Ae||t instanceof ie)&&t.input instanceof qi.CompoundExpression&&"zoom"===t.input.name&&(e=t);return e instanceof Vi||t.eachChild((t=>{var r=La(t);r instanceof Vi?e=r:!e&&r?e=new Vi("",'"zoom" expression may only be used as input to a top-level "step" or "interpolate" expression.'):e&&r&&e!==r&&(e=new Vi("",'Only one zoom-based "step" or "interpolate" subexpression may be used in an expression.'))})),e}function Xa(t){var e={color:Da,string:Fa,number:Ra,enum:Fa,boolean:Ca,formatted:Ua,resolvedImage:Va};return"array"===t.type?Na(e[t.value]||Ba,t.length):e[t.type]}function qa(t){return"object"==typeof t&&null!==t&&!Array.isArray(t)}function ja(t){return t}function Ha(t){for(var e=[],r=arguments.length-1;r-- >0;)e[r]=arguments[r+1];for(var n=0,i=e;n=t.stops[i-1][0])return t.stops[i-1][1];var a=Ee(t.stops.map((t=>t[0])),r),o=to(r,n,t.stops[a][0],t.stops[a+1][0]),s=t.stops[a][1],u=t.stops[a+1][1],l=interpolate[e.type]||ja;if(t.colorSpace&&"rgb"!==t.colorSpace){var p=Ma[t.colorSpace];l=(t,e)=>p.reverse(p.interpolate(p.forward(t),p.forward(e),o))}return"function"==typeof s.evaluate?{evaluate(...t){var e=s.evaluate.apply(void 0,t),r=u.evaluate.apply(void 0,t);if(void 0!==e&&void 0!==r)return l(e,r,o)}}:l(s,u,o)}function Qa(t,e,r){return"color"===e.type?r=S.parse(r):"formatted"===e.type?r=Formatted.fromString(r.toString()):"resolvedImage"===e.type?r=ResolvedImage.fromString(r.toString()):ro(r)===e.type||"enum"===e.type&&e.values[r]||(r=void 0),$a(r,t.default,e.default)}function Ka(t,e){var r=new qi(Ie,[],e?Xa(e):void 0),n=r.parse(t,void 0,void 0,void 0,e&&"string"===e.type?{typeAnnotation:"coerce"}:void 0);return n?Pa(new ia(n,e)):(assert(r.errors.length>0),za(r.errors))}function Ga(t,e){this.kind=t,this._styleExpression=e,this.isStateDependent="constant"!==t&&!Xi.isStateConstant(e.expression)}function Wa(t,e,r,n){this.kind=t,this.zoomStops=r,this._styleExpression=e,this.isStateDependent="camera"!==t&&!Xi.isStateConstant(e.expression),this.interpolationType=n}function Ja(t,e){if("error"===(t=Ka(t,e)).result)return t;var r=t.value.expression,n=Xi.isFeatureConstant(r);if(!n&&!Ge.supportsPropertyExpression(e))return za([new Vi("","data expressions not supported")]);var i=Xi.isGlobalPropertyConstant(r,["zoom"]);if(!i&&!Ge.supportsZoomExpression(e))return za([new Vi("","zoom expressions not supported")]);var a=La(r);if(!a&&!i)return za([new Vi("",'"zoom" expression may only be used as input to a top-level "step" or "interpolate" expression.')]);if(a instanceof Vi)return za([a]);if(a instanceof ie&&!Ge.supportsInterpolation(e))return za([new Vi("",'"interpolate" expressions cannot be used with this property')]);if(!a)return Pa(new Ga(n?"constant":"source",t.value));var o=a instanceof ie?a.interpolation:void 0;return Pa(new Wa(n?"camera":"composite",t.value,a.labels,o))}function Za(t,e){var r,n,i,a="color"===e.type,o=t.stops&&"object"==typeof t.stops[0][0],s=o||void 0!==t.property,u=o||!s,l=t.type||(Ge.supportsInterpolation(e)?"exponential":"interval");if(a&&((t=Ha({},t)).stops&&(t.stops=t.stops.map((function(t){return[t[0],S.parse(t[1])]}))),t.default?t.default=S.parse(t.default):t.default=S.parse(e.default)),t.colorSpace&&"rgb"!==t.colorSpace&&!Ma[t.colorSpace])throw new Error("Unknown color space: "+t.colorSpace);if("exponential"===l)r=Ya;else if("interval"===l)r=evaluateIntervalFunction;else if("categorical"===l){r=evaluateCategoricalFunction,n=Object.create(null);for(var p=0,c=t.stops;p=2&&"$id"!==t[1]&&"$type"!==t[1];case"in":return t.length>=3&&Array.isArray(t[2]);case"!in":case"!has":case"none":case"crossFields":return!1;case"==":case"!=":case">":case">=":case"<":case"<=":case"like":case"!like":return 3!==t.length||Array.isArray(t[1])||Array.isArray(t[2]);case"any":case"all":for(var e=0,r=t.slice(1);ee?1:0}function oo(t){if(!t)return!0;var e=t[0];return t.length<=1?"any"!==e:"=="===e?so(t[1],t[2],"=="):"!="===e?co(so(t[1],t[2],"==")):"<"===e||">"===e||"<="===e||">="===e?so(t[1],t[2],e):"any"===e?uo(t.slice(1)):"all"===e?["all"].concat(t.slice(1).map(oo)):"crossFields"===e?["crossFields"].concat(t.slice(1).map(oo)):"none"===e?["all"].concat(t.slice(1).map(oo).map(co)):"in"===e?lo(t[1],t.slice(2)):"!in"===e?co(lo(t[1],t.slice(2))):"has"===e?po(t[1]):"!has"===e?co(po(t[1])):"like"===e?so(t[1],t[2],"like"):"!like"!==e||co(so(t[1],t[2],"like"))}function so(t,e,r){switch(t){case"$type":return["filter-type-"+r,e];case"$id":return["filter-id-"+r,e];default:return["filter-"+r,t,e]}}function uo(t){return["any"].concat(t.map(oo))}function lo(t,e){if(0===e.length)return!1;switch(t){case"$type":return["filter-type-in",["literal",e]];case"$id":return["filter-id-in",["literal",e]];default:return e.length>200&&!e.some((function(t){return typeof t!=typeof e[0]}))?["filter-in-large",t,["literal",e.sort(ao)]]:["filter-in-small",t,["literal",e]]}}function po(t){switch(t){case"$type":return!0;case"$id":return["filter-has-id"];default:return["filter-has",t]}}function co(t){return["!",t]}no.createFilter=function(t){if(null==t)return function(){return!0};no.isExpressionFilter(t)||(t=oo(t));var e=Oa.createExpression(t,io);if("error"===e.result)throw new Error(e.value.map((function(t){return t.key+": "+t.message})).join(", "));return function(t,r){return e.value.evaluate(t,r)}};var fo=_i.FeatureIndexArray,ho=function(t,e,r){this.x=t.x,this.y=t.y,this.z=t.z,this.grid=e||new Fi(Fe,16,0),this.featureIndexArray=r||new fo};function yo(t){for(var e=1/0,r=1/0,n=-1/0,i=-1/0,a=0,o=t;a=0&&c[3]>=0&&u.insert(s,c[0]-o,c[1]-o,c[2]+o,c[3]+o)}},ho.prototype.loadVTLayers=function(){return this.vtLayers||(this.vtLayers=new Pi(new r.Pbf(this.rawTileData)).layers,this.sourceLayerCoder=new i(this.vtLayers?Object.keys(this.vtLayers).sort():["_geojsonTileLayer"])),this.vtLayers},ho.prototype.query=function(t,r,n){var i=this;this.loadVTLayers();var a=t.params||{},o=vo(this.z,t.tileSize,a),s=no.createFilter(a.filter),u=t.queryGeometry,l=5,p=yo(u),c=[];e.defined(a.selectTolerance)&&(l+=o*a.selectTolerance),(c=this.grid.query(p.minX-l,p.minY-l,p.maxX+l,p.maxY+l)).sort(mo);for(var f,h={},d=function(e){var n=c[e];if(n!==f){f=n;var l=i.featureIndexArray.get(n),p=null;i.loadMatchingFeature(h,l.bucketIndex,l.sourceLayerIndex,l.featureIndex,s,a.layers,r,(function(e,r){p||(p=Ue(e));return r.queryIntersectsFeature(u,e,{},p,i.z,t.transform,o,t.pixelPosMatrix,t.adjustScale)}))}},y=0;y=Fe||l<0||l>=Fe)){var p=this.segments.prepareSegment(4,this.layoutVertexArray,this.indexArray,t.sortKey),c=p.vertexLength;To(this.layoutVertexArray,u,l,-1,-1),To(this.layoutVertexArray,u,l,1,-1),To(this.layoutVertexArray,u,l,1,1),To(this.layoutVertexArray,u,l,-1,1),this.indexArray.emplaceBack(c,c+1,c+2),this.indexArray.emplaceBack(c,c+3,c+2),p.vertexLength+=4,p.primitiveLength+=2}}this.programConfigurations.populatePaintArrays(this.layoutVertexArray.length,t,r,{})},ke.register("CircleBucket",Ao,{omit:["layers"]});var So=function(t){this.specification=t};So.prototype.possiblyEvaluate=function(t,e){return t.expression.evaluate(e)},So.prototype.interpolate=function(t,e,r){var n=interpolate[this.specification.type];return n?n(t,e,r):t},ke.register("DataConstantProperty",So);var Io=function(t,e){this.specification=t,this.overrides=e};Io.prototype.possiblyEvaluate=function(t,e,r){return"constant"===t.expression.kind||"camera"===t.expression.kind?new Ke(this,{kind:"constant",value:t.expression.evaluate(e,null,{},r)},e):new Ke(this,t.expression,e)},Io.prototype.interpolate=function(t,e,r){if("constant"!==t.value.kind||"constant"!==e.value.kind)return t;if(void 0===t.value.value||void 0===e.value.value)return new Ke(this,{kind:"constant",value:void 0},t.parameters);var n=interpolate[this.specification.type];return n?new Ke(this,{kind:"constant",value:n(t.value.value,e.value.value,r)},t.parameters):t},Io.prototype.evaluate=function(t,e,r,n,i){return"constant"===t.kind?t.value:t.evaluate(e,r,n,i)},ke.register("DataDrivenProperty",Io);var ko=function(t,e){this.property=t,this.value=e,this.expression=Oa.normalizePropertyExpression(void 0===e?t.specification.default:e,t.specification)};function Mo(t){if(t<=0)return 0;if(t>=1)return 1;var e=t*t,r=e*t;return 4*(t<.5?r:3*(t-e)+r-.75)}ko.prototype.isDataDriven=function(){return"source"===this.expression.kind||"composite"===this.expression.kind},ko.prototype.possiblyEvaluate=function(t,e){return this.property.possiblyEvaluate(this,t,e)};var Oo=function(t,e,r,n,i){this.property=t,this.value=e,this.begin=i+n.delay||0,this.end=this.begin+n.duration||0,t.specification.transition&&(n.delay||n.duration)&&(this.prior=r)};Oo.prototype.possiblyEvaluate=function(t,e){var r=t.now||0,n=this.value.possiblyEvaluate(t,e),i=this.prior;if(i){if(r>this.end)return this.prior=null,n;if(this.value.isDataDriven())return this.prior=null,n;if(r=this.maxzoom)||"none"===this.visibility)},No.prototype.updateTransitions=function(t){this._transitioningPaint=this._transitionablePaint.transitioned(t,this._transitioningPaint)},No.prototype.hasTransition=function(){return this._transitioningPaint.hasTransition()},No.prototype.recalculate=function(t,e){t.getCrossfadeParameters&&(this._crossfadeParameters=t.getCrossfadeParameters()),this._unevaluatedLayout&&(this.layout=this._unevaluatedLayout.possiblyEvaluate(t,e)),this.paint=this._transitioningPaint.possiblyEvaluate(t,e)},No.prototype.serialize=function(){var t={id:this.id,type:this.type,source:this.source,"source-layer":this.sourceLayer,metadata:this.metadata,minzoom:this.minzoom,maxzoom:this.maxzoom,filter:this.filter,layout:this._unevaluatedLayout&&this._unevaluatedLayout.serialize(),paint:this._transitionablePaint&&this._transitionablePaint.serialize()};return this.visibility&&(t.layout=t.layout||{},t.layout.visibility=this.visibility),Ci.filterObject(t,(function(t,e){return!(void 0===t||"layout"===e&&!Object.keys(t).length||"paint"===e&&!Object.keys(t).length)}))},No.prototype._validate=function(t,e,r,n,i){return!0},No.prototype.is3D=function(){return!1},No.prototype.isTileClipped=function(){return!1},No.prototype.hasOffscreenPass=function(){return!1},No.prototype.resize=function(){},No.prototype.isStateDependent=function(){return!0};var Lo=8,Xo={version:{required:!0,type:"enum",values:[8]},name:{type:"string"},metadata:{type:"*"},center:{type:"array",value:"number"},zoom:{type:"number"},bearing:{type:"number",default:0,period:360,units:"degrees"},pitch:{type:"number",default:0,units:"degrees"},light:{type:"light"},sources:{required:!0,type:"sources"},sprite:{type:"string"},glyphs:{type:"string"},transition:{type:"transition"},layers:{required:!0,type:"array",value:"layer"}},qo={"*":{type:"source"}},jo=["source_vector","source_raster","source_raster_dem","source_geojson","source_video","source_image"],Ho={type:{required:!0,type:"enum",values:{vector:{}}},url:{type:"string"},tiles:{type:"array",value:"string"},bounds:{type:"array",value:"number",length:4,default:[-180,-85.051129,180,85.051129]},scheme:{type:"enum",values:{xyz:{},tms:{}},default:"xyz"},minzoom:{type:"number",default:0},maxzoom:{type:"number",default:22},attribution:{type:"string"},"*":{type:"*"}},Yo={type:{required:!0,type:"enum",values:{raster:{}}},url:{type:"string"},tiles:{type:"array",value:"string"},bounds:{type:"array",value:"number",length:4,default:[-180,-85.051129,180,85.051129]},minzoom:{type:"number",default:0},maxzoom:{type:"number",default:22},tileSize:{type:"number",default:512,units:"pixels"},scheme:{type:"enum",values:{xyz:{},tms:{}},default:"xyz"},attribution:{type:"string"},"*":{type:"*"}},Qo={type:{required:!0,type:"enum",values:{"raster-dem":{}}},url:{type:"string"},tiles:{type:"array",value:"string"},bounds:{type:"array",value:"number",length:4,default:[-180,-85.051129,180,85.051129]},minzoom:{type:"number",default:0},maxzoom:{type:"number",default:22},tileSize:{type:"number",default:512,units:"pixels"},attribution:{type:"string"},encoding:{type:"enum",values:{terrarium:{},mapbox:{}},default:"mapbox"},"*":{type:"*"}},Ko={type:{required:!0,type:"enum",values:{geojson:{}}},data:{type:"*"},maxzoom:{type:"number",default:18},attribution:{type:"string"},buffer:{type:"number",default:128,maximum:512,minimum:0},tolerance:{type:"number",default:.375},cluster:{type:"boolean",default:!1},clusterRadius:{type:"number",default:50,minimum:0},clusterMaxZoom:{type:"number"},clusterProperties:{type:"*"},lineMetrics:{type:"boolean",default:!1},generateId:{type:"boolean",default:!1}},Go={type:{required:!0,type:"enum",values:{video:{}}},urls:{required:!0,type:"array",value:"string"},coordinates:{required:!0,type:"array",length:4,value:{type:"array",length:2,value:"number"}}},Wo={type:{required:!0,type:"enum",values:{image:{}}},url:{required:!0,type:"string"},coordinates:{required:!0,type:"array",length:4,value:{type:"array",length:2,value:"number"}}},Jo={id:{type:"string",required:!0},type:{type:"enum",values:{fill:{},line:{},symbol:{},circle:{},heatmap:{},"fill-extrusion":{},raster:{},hillshade:{},background:{}},required:!0},metadata:{type:"*"},source:{type:"string"},"source-layer":{type:"string"},minzoom:{type:"number",minimum:0,maximum:24},maxzoom:{type:"number",minimum:0,maximum:24},filter:{type:"filter"},layout:{type:"layout"},paint:{type:"paint"}},Zo=["layout_fill","layout_line","layout_circle","layout_heatmap","layout_fill-extrusion","layout_symbol","layout_raster","layout_hillshade","layout_background"],$o={visibility:{type:"enum",values:{visible:{},none:{}},default:"visible","property-type":"constant"}},ts={"fill-sort-key":{type:"number",expression:{interpolated:!1,parameters:["zoom","feature"]},"property-type":"data-driven"},visibility:{type:"enum",values:{visible:{},none:{}},default:"visible","property-type":"constant"}},es={"circle-sort-key":{type:"number",expression:{interpolated:!1,parameters:["zoom","feature"]},"property-type":"data-driven"},visibility:{type:"enum",values:{visible:{},none:{}},default:"visible","property-type":"constant"}},rs={visibility:{type:"enum",values:{visible:{},none:{}},default:"visible","property-type":"constant"}},ns={"line-cap":{type:"enum",values:{butt:{},round:{},square:{}},default:"butt",expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"line-join":{type:"enum",values:{bevel:{},round:{},miter:{}},default:"miter",expression:{interpolated:!1,parameters:["zoom","feature"]},"property-type":"data-driven"},"line-miter-limit":{type:"number",default:2,requires:[{"line-join":"miter"}],expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"line-round-limit":{type:"number",default:1.05,requires:[{"line-join":"round"}],expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"line-sort-key":{type:"number",expression:{interpolated:!1,parameters:["zoom","feature"]},"property-type":"data-driven"},visibility:{type:"enum",values:{visible:{},none:{}},default:"visible","property-type":"constant"}},is={"symbol-placement":{type:"enum",values:{point:{},line:{},"line-center":{}},default:"point",expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"symbol-spacing":{type:"number",default:250,minimum:1,units:"pixels",requires:[{"symbol-placement":"line"}],expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"symbol-avoid-edges":{type:"boolean",default:!1,expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"symbol-sort-key":{type:"number",expression:{interpolated:!1,parameters:["zoom","feature"]},"property-type":"data-driven"},"symbol-z-order":{type:"enum",values:{auto:{},"viewport-y":{},source:{}},default:"auto",expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"icon-allow-overlap":{type:"boolean",default:!1,requires:["icon-image"],expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"icon-ignore-placement":{type:"boolean",default:!1,requires:["icon-image"],expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"icon-optional":{type:"boolean",default:!1,requires:["icon-image","text-field"],expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"icon-rotation-alignment":{type:"enum",values:{map:{},viewport:{},auto:{}},default:"auto",requires:["icon-image"],expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"icon-size":{type:"number",default:1,minimum:0,units:"factor of the original icon size",requires:["icon-image"],expression:{interpolated:!0,parameters:["zoom","feature"]},"property-type":"data-driven"},"icon-text-fit":{type:"enum",values:{none:{},width:{},height:{},both:{}},default:"none",requires:["icon-image","text-field"],expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"icon-text-fit-padding":{type:"array",value:"number",length:4,default:[0,0,0,0],units:"pixels",requires:["icon-image","text-field",{"icon-text-fit":["both","width","height"]}],expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"icon-image":{type:"resolvedImage",tokens:!0,expression:{interpolated:!1,parameters:["zoom","feature"]},"property-type":"data-driven"},"icon-rotate":{type:"number",default:0,period:360,units:"degrees",requires:["icon-image"],expression:{interpolated:!0,parameters:["zoom","feature"]},"property-type":"data-driven"},"icon-padding":{type:"number",default:2,minimum:0,units:"pixels",requires:["icon-image"],expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"icon-keep-upright":{type:"boolean",default:!1,requires:["icon-image",{"icon-rotation-alignment":"map"},{"symbol-placement":["line","line-center"]}],expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"icon-offset":{type:"array",value:"number",length:2,default:[0,0],requires:["icon-image"],expression:{interpolated:!0,parameters:["zoom","feature"]},"property-type":"data-driven"},"icon-anchor":{type:"enum",values:{center:{},left:{},right:{},top:{},bottom:{},"top-left":{},"top-right":{},"bottom-left":{},"bottom-right":{}},default:"center",requires:["icon-image"],expression:{interpolated:!1,parameters:["zoom","feature"]},"property-type":"data-driven"},"icon-pitch-alignment":{type:"enum",values:{map:{},viewport:{},auto:{}},default:"auto",requires:["icon-image"],expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"text-pitch-alignment":{type:"enum",values:{map:{},viewport:{},auto:{}},default:"auto",requires:["text-field"],expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"text-rotation-alignment":{type:"enum",values:{map:{},viewport:{},auto:{}},default:"auto",requires:["text-field"],expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"text-field":{type:"formatted",default:"",tokens:!0,expression:{interpolated:!1,parameters:["zoom","feature"]},"property-type":"data-driven"},"text-font":{type:"array",value:"string",default:["Open Sans Regular","Arial Unicode MS Regular"],requires:["text-field"],expression:{interpolated:!1,parameters:["zoom","feature"]},"property-type":"data-driven"},"text-size":{type:"number",default:16,minimum:0,units:"pixels",requires:["text-field"],expression:{interpolated:!0,parameters:["zoom","feature"]},"property-type":"data-driven"},"text-max-width":{type:"number",default:10,minimum:0,units:"ems",requires:["text-field"],expression:{interpolated:!0,parameters:["zoom","feature"]},"property-type":"data-driven"},"text-line-height":{type:"number",default:1.2,units:"ems",requires:["text-field"],expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"text-letter-spacing":{type:"number",default:0,units:"ems",requires:["text-field"],expression:{interpolated:!0,parameters:["zoom","feature"]},"property-type":"data-driven"},"text-justify":{type:"enum",values:{auto:{},left:{},center:{},right:{}},default:"center",requires:["text-field"],expression:{interpolated:!1,parameters:["zoom","feature"]},"property-type":"data-driven"},"text-radial-offset":{type:"number",units:"ems",default:0,requires:["text-field"],"property-type":"data-driven",expression:{interpolated:!0,parameters:["zoom","feature"]}},"text-variable-anchor":{type:"array",value:"enum",values:{center:{},left:{},right:{},top:{},bottom:{},"top-left":{},"top-right":{},"bottom-left":{},"bottom-right":{}},requires:["text-field",{"symbol-placement":["point"]}],expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"text-anchor":{type:"enum",values:{center:{},left:{},right:{},top:{},bottom:{},"top-left":{},"top-right":{},"bottom-left":{},"bottom-right":{}},default:"center",requires:["text-field",{"!":"text-variable-anchor"}],expression:{interpolated:!1,parameters:["zoom","feature"]},"property-type":"data-driven"},"text-max-angle":{type:"number",default:45,units:"degrees",requires:["text-field",{"symbol-placement":["line","line-center"]}],expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"text-writing-mode":{type:"array",value:"enum",values:{horizontal:{},vertical:{}},requires:["text-field",{"symbol-placement":["point"]}],expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"text-rotate":{type:"number",default:0,period:360,units:"degrees",requires:["text-field"],expression:{interpolated:!0,parameters:["zoom","feature"]},"property-type":"data-driven"},"text-padding":{type:"number",default:2,minimum:0,units:"pixels",requires:["text-field"],expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"text-keep-upright":{type:"boolean",default:!0,requires:["text-field",{"text-rotation-alignment":"map"},{"symbol-placement":["line","line-center"]}],expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"text-transform":{type:"enum",values:{none:{},uppercase:{},lowercase:{}},default:"none",requires:["text-field"],expression:{interpolated:!1,parameters:["zoom","feature"]},"property-type":"data-driven"},"text-offset":{type:"array",value:"number",units:"ems",length:2,default:[0,0],requires:["text-field",{"!":"text-radial-offset"}],expression:{interpolated:!0,parameters:["zoom","feature"]},"property-type":"data-driven"},"text-allow-overlap":{type:"boolean",default:!1,requires:["text-field"],expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"text-ignore-placement":{type:"boolean",default:!1,requires:["text-field"],expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"text-optional":{type:"boolean",default:!1,requires:["text-field","icon-image"],expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},visibility:{type:"enum",values:{visible:{},none:{}},default:"visible","property-type":"constant"}},as={visibility:{type:"enum",values:{visible:{},none:{}},default:"visible","property-type":"constant"}},os={visibility:{type:"enum",values:{visible:{},none:{}},default:"visible","property-type":"constant"}},ss={type:"array",value:"*"},us={type:"enum",values:{"==":{},"!=":{},">":{},">=":{},"<":{},"<=":{},in:{},"!in":{},all:{},any:{},none:{},has:{},"!has":{}}},ls={type:"enum",values:{Point:{},LineString:{},Polygon:{}}},ps={type:"array",minimum:0,maximum:24,value:["number","color"],length:2},cs={type:"array",value:"*",minimum:1},fs={type:"enum",values:{let:{group:"Variable binding"},var:{group:"Variable binding"},literal:{group:"Types"},array:{group:"Types"},at:{group:"Lookup"},in:{group:"Lookup"},case:{group:"Decision"},match:{group:"Decision"},coalesce:{group:"Decision"},step:{group:"Ramps, scales, curves"},interpolate:{group:"Ramps, scales, curves"},"interpolate-hcl":{group:"Ramps, scales, curves"},"interpolate-lab":{group:"Ramps, scales, curves"},ln2:{group:"Math"},pi:{group:"Math"},e:{group:"Math"},typeof:{group:"Types"},string:{group:"Types"},number:{group:"Types"},boolean:{group:"Types"},object:{group:"Types"},collator:{group:"Types"},format:{group:"Types"},image:{group:"Types"},"number-format":{group:"Types"},"to-string":{group:"Types"},"to-number":{group:"Types"},"to-boolean":{group:"Types"},"to-rgba":{group:"Color"},"to-color":{group:"Types"},rgb:{group:"Color"},rgba:{group:"Color"},get:{group:"Lookup"},has:{group:"Lookup"},length:{group:"Lookup"},properties:{group:"Feature data"},"feature-state":{group:"Feature data"},"geometry-type":{group:"Feature data"},id:{group:"Feature data"},zoom:{group:"Zoom"},"heatmap-density":{group:"Heatmap"},"line-progress":{group:"Feature data"},accumulated:{group:"Feature data"},"+":{group:"Math"},"*":{group:"Math"},"-":{group:"Math"},"/":{group:"Math"},"%":{group:"Math"},"^":{group:"Math"},sqrt:{group:"Math"},log10:{group:"Math"},ln:{group:"Math"},log2:{group:"Math"},sin:{group:"Math"},cos:{group:"Math"},tan:{group:"Math"},asin:{group:"Math"},acos:{group:"Math"},atan:{group:"Math"},min:{group:"Math"},max:{group:"Math"},round:{group:"Math"},abs:{group:"Math"},ceil:{group:"Math"},floor:{group:"Math"},"==":{group:"Decision"},"!=":{group:"Decision"},">":{group:"Decision"},"<":{group:"Decision"},">=":{group:"Decision"},"<=":{group:"Decision"},all:{group:"Decision"},any:{group:"Decision"},"!":{group:"Decision"},"is-supported-script":{group:"String"},upcase:{group:"String"},downcase:{group:"String"},concat:{group:"String"},"resolved-locale":{group:"String"}}},hs={anchor:{type:"enum",default:"viewport",values:{map:{},viewport:{}},"property-type":"data-constant",transition:!1,expression:{interpolated:!1,parameters:["zoom"]}},position:{type:"array",default:[1.15,210,30],length:3,value:"number","property-type":"data-constant",transition:!0,expression:{interpolated:!0,parameters:["zoom"]}},color:{type:"color","property-type":"data-constant",default:"#ffffff",expression:{interpolated:!0,parameters:["zoom"]},transition:!0},intensity:{type:"number","property-type":"data-constant",default:.5,minimum:0,maximum:1,expression:{interpolated:!0,parameters:["zoom"]},transition:!0}},ds=["paint_fill","paint_line","paint_circle","paint_heatmap","paint_fill-extrusion","paint_symbol","paint_raster","paint_hillshade","paint_background"],ys={"fill-antialias":{type:"boolean",default:!0,expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"fill-opacity":{type:"number",default:1,minimum:0,maximum:1,transition:!0,expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"fill-color":{type:"color",default:"#000000",transition:!0,requires:[{"!":"fill-pattern"}],expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"fill-outline-color":{type:"color",transition:!0,requires:[{"!":"fill-pattern"},{"fill-antialias":!0}],expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"fill-translate":{type:"array",value:"number",length:2,default:[0,0],transition:!0,units:"pixels",expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"fill-translate-anchor":{type:"enum",values:{map:{},viewport:{}},default:"map",requires:["fill-translate"],expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"fill-pattern":{type:"resolvedImage",transition:!0,expression:{interpolated:!1,parameters:["zoom","feature"]},"property-type":"cross-faded-data-driven"}},ms={"line-opacity":{type:"number",default:1,minimum:0,maximum:1,transition:!0,expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"line-color":{type:"color",default:"#000000",transition:!0,requires:[{"!":"line-pattern"}],expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"line-translate":{type:"array",value:"number",length:2,default:[0,0],transition:!0,units:"pixels",expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"line-translate-anchor":{type:"enum",values:{map:{},viewport:{}},default:"map",requires:["line-translate"],expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"line-width":{type:"number",default:1,minimum:0,transition:!0,units:"pixels",expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"line-gap-width":{type:"number",default:0,minimum:0,transition:!0,units:"pixels",expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"line-offset":{type:"number",default:0,transition:!0,units:"pixels",expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"line-blur":{type:"number",default:0,minimum:0,transition:!0,units:"pixels",expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"line-dasharray":{type:"array",value:"number",minimum:0,transition:!0,units:"line widths",requires:[{"!":"line-pattern"}],expression:{interpolated:!1,parameters:["zoom"]},"property-type":"cross-faded"},"line-pattern":{type:"resolvedImage",transition:!0,expression:{interpolated:!1,parameters:["zoom","feature"]},"property-type":"cross-faded-data-driven"},"line-gradient":{type:"color",transition:!1,requires:[{"!":"line-dasharray"},{"!":"line-pattern"},{source:"geojson",has:{lineMetrics:!0}}],expression:{interpolated:!0,parameters:["line-progress"]},"property-type":"color-ramp"}},vs={"circle-radius":{type:"number",default:5,minimum:0,transition:!0,units:"pixels",expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"circle-color":{type:"color",default:"#000000",transition:!0,expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"circle-blur":{type:"number",default:0,transition:!0,expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"circle-opacity":{type:"number",default:1,minimum:0,maximum:1,transition:!0,expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"circle-translate":{type:"array",value:"number",length:2,default:[0,0],transition:!0,units:"pixels",expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"circle-translate-anchor":{type:"enum",values:{map:{},viewport:{}},default:"map",requires:["circle-translate"],expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"circle-pitch-scale":{type:"enum",values:{map:{},viewport:{}},default:"map",expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"circle-pitch-alignment":{type:"enum",values:{map:{},viewport:{}},default:"viewport",expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"circle-stroke-width":{type:"number",default:0,minimum:0,transition:!0,units:"pixels",expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"circle-stroke-color":{type:"color",default:"#000000",transition:!0,expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"circle-stroke-opacity":{type:"number",default:1,minimum:0,maximum:1,transition:!0,expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"}},gs={"heatmap-radius":{type:"number",default:30,minimum:1,transition:!0,units:"pixels",expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"heatmap-weight":{type:"number",default:1,minimum:0,transition:!1,expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"heatmap-intensity":{type:"number",default:1,minimum:0,transition:!0,expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"heatmap-color":{type:"color",default:["interpolate",["linear"],["heatmap-density"],0,"rgba(0, 0, 255, 0)",.1,"royalblue",.3,"cyan",.5,"lime",.7,"yellow",1,"red"],transition:!1,expression:{interpolated:!0,parameters:["heatmap-density"]},"property-type":"color-ramp"},"heatmap-opacity":{type:"number",default:1,minimum:0,maximum:1,transition:!0,expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"}},xs={"icon-opacity":{type:"number",default:1,minimum:0,maximum:1,transition:!0,requires:["icon-image"],expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"icon-color":{type:"color",default:"#000000",transition:!0,requires:["icon-image"],expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"icon-halo-color":{type:"color",default:"rgba(0, 0, 0, 0)",transition:!0,requires:["icon-image"],expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"icon-halo-width":{type:"number",default:0,minimum:0,transition:!0,units:"pixels",requires:["icon-image"],expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"icon-halo-blur":{type:"number",default:0,minimum:0,transition:!0,units:"pixels",requires:["icon-image"],expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"icon-translate":{type:"array",value:"number",length:2,default:[0,0],transition:!0,units:"pixels",requires:["icon-image"],expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"icon-translate-anchor":{type:"enum",values:{map:{},viewport:{}},default:"map",requires:["icon-image","icon-translate"],expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"text-opacity":{type:"number",default:1,minimum:0,maximum:1,transition:!0,requires:["text-field"],expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"text-color":{type:"color",default:"#000000",transition:!0,overridable:!0,requires:["text-field"],expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"text-halo-color":{type:"color",default:"rgba(0, 0, 0, 0)",transition:!0,requires:["text-field"],expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"text-halo-width":{type:"number",default:0,minimum:0,transition:!0,units:"pixels",requires:["text-field"],expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"text-show-background":{type:"boolean",default:!1,transition:!1,expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"text-halo-blur":{type:"number",default:0,minimum:0,transition:!0,units:"pixels",requires:["text-field"],expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"text-translate":{type:"array",value:"number",length:2,default:[0,0],transition:!0,units:"pixels",requires:["text-field"],expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"text-translate-anchor":{type:"enum",values:{map:{},viewport:{}},default:"map",requires:["text-field","text-translate"],expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"}},bs={"raster-opacity":{type:"number",default:1,minimum:0,maximum:1,transition:!0,expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"raster-hue-rotate":{type:"number",default:0,period:360,transition:!0,units:"degrees",expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"raster-brightness-min":{type:"number",default:0,minimum:0,maximum:1,transition:!0,expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"raster-brightness-max":{type:"number",default:1,minimum:0,maximum:1,transition:!0,expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"raster-saturation":{type:"number",default:0,minimum:-1,maximum:1,transition:!0,expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"raster-contrast":{type:"number",default:0,minimum:-1,maximum:1,transition:!0,expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"raster-resampling":{type:"enum",values:{linear:{},nearest:{}},default:"linear",expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"raster-fade-duration":{type:"number",default:300,minimum:0,transition:!1,units:"milliseconds",expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"}},_s={"hillshade-illumination-direction":{type:"number",default:335,minimum:0,maximum:359,transition:!1,expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"hillshade-illumination-anchor":{type:"enum",values:{map:{},viewport:{}},default:"viewport",expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"hillshade-exaggeration":{type:"number",default:.5,minimum:0,maximum:1,transition:!0,expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"hillshade-shadow-color":{type:"color",default:"#000000",transition:!0,expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"hillshade-highlight-color":{type:"color",default:"#FFFFFF",transition:!0,expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"hillshade-accent-color":{type:"color",default:"#000000",transition:!0,expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"}},ws={"background-color":{type:"color",default:"#000000",transition:!0,requires:[{"!":"background-pattern"}],expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"background-pattern":{type:"resolvedImage",transition:!0,expression:{interpolated:!1,parameters:["zoom"]},"property-type":"cross-faded"},"background-opacity":{type:"number",default:1,minimum:0,maximum:1,transition:!0,expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"}},Es={duration:{type:"number",default:300,minimum:0,units:"milliseconds"},delay:{type:"number",default:0,minimum:0,units:"milliseconds"}},Ts={$version:Lo,$root:Xo,sources:qo,source:jo,source_vector:Ho,source_raster:Yo,source_raster_dem:Qo,source_geojson:Ko,source_video:Go,source_image:Wo,layer:Jo,layout:Zo,layout_background:$o,layout_fill:ts,layout_circle:es,layout_heatmap:rs,"layout_fill-extrusion":{visibility:{type:"enum",values:{visible:{},none:{}},default:"visible","property-type":"constant"}},layout_line:ns,layout_symbol:is,layout_raster:as,layout_hillshade:os,filter:ss,filter_operator:us,geometry_type:ls,function:{expression:{type:"expression"},stops:{type:"array",value:"function_stop"},base:{type:"number",default:1,minimum:0},property:{type:"string",default:"$zoom"},type:{type:"enum",values:{identity:{},exponential:{},interval:{},categorical:{}},default:"exponential"},colorSpace:{type:"enum",values:{rgb:{},lab:{},hcl:{}},default:"rgb"},default:{type:"*",required:!1}},function_stop:ps,expression:cs,expression_name:fs,light:hs,paint:ds,paint_fill:ys,"paint_fill-extrusion":{"fill-extrusion-opacity":{type:"number",default:1,minimum:0,maximum:1,transition:!0,expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"fill-extrusion-color":{type:"color",default:"#000000",transition:!0,requires:[{"!":"fill-extrusion-pattern"}],expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"fill-extrusion-translate":{type:"array",value:"number",length:2,default:[0,0],transition:!0,units:"pixels",expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"fill-extrusion-translate-anchor":{type:"enum",values:{map:{},viewport:{}},default:"map",requires:["fill-extrusion-translate"],expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"fill-extrusion-pattern":{type:"resolvedImage",transition:!0,expression:{interpolated:!1,parameters:["zoom","feature"]},"property-type":"cross-faded-data-driven"},"fill-extrusion-height":{type:"number",default:0,minimum:0,units:"meters",transition:!0,expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"fill-extrusion-base":{type:"number",default:0,minimum:0,units:"meters",transition:!0,requires:["fill-extrusion-height"],expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"fill-extrusion-vertical-gradient":{type:"boolean",default:!0,transition:!1,expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"}},paint_line:ms,paint_circle:vs,paint_heatmap:gs,paint_symbol:xs,paint_raster:bs,paint_hillshade:_s,paint_background:ws,transition:Es,"property-type":{"data-driven":{type:"property-type"},"cross-faded":{type:"property-type"},"cross-faded-data-driven":{type:"property-type"},"color-ramp":{type:"property-type"},"data-constant":{type:"property-type"},constant:{type:"property-type"}}};function As(){}function Ss(t,e,r){if(t.length>1){if(Is(t,e))return!0;for(var n=0;ne.y!=i.y>e.y&&e.x<(i.x-n.x)*(e.y-n.y)/(i.y-n.y)+n.x&&(a=!a);return a}function Ps(t,e){for(var r=!1,n=0,i=t.length-1;ne.y!=o.y>e.y&&e.x<(o.x-a.x)*(e.y-a.y)/(o.y-a.y)+a.x&&(r=!r)}return r}As.polygonIntersectsPolygon=function(t,e){for(var r=0;r=3)for(var a=0;a1?t.distSqr(r):t.distSqr(r.sub(e)._mult(i)._add(e))};var zs=new zo({"circle-sort-key":new Io(Ts.layout_circle["circle-sort-key"])}),Rs=new zo({"circle-radius":new Io(Ts.paint_circle["circle-radius"]),"circle-color":new Io(Ts.paint_circle["circle-color"]),"circle-blur":new Io(Ts.paint_circle["circle-blur"]),"circle-opacity":new Io(Ts.paint_circle["circle-opacity"]),"circle-translate":new So(Ts.paint_circle["circle-translate"]),"circle-translate-anchor":new So(Ts.paint_circle["circle-translate-anchor"]),"circle-pitch-scale":new So(Ts.paint_circle["circle-pitch-scale"]),"circle-pitch-alignment":new So(Ts.paint_circle["circle-pitch-alignment"]),"circle-stroke-width":new Io(Ts.paint_circle["circle-stroke-width"]),"circle-stroke-color":new Io(Ts.paint_circle["circle-stroke-color"]),"circle-stroke-opacity":new Io(Ts.paint_circle["circle-stroke-opacity"])}),Fs={paint:Rs,layout:zs},Cs=function(t){function r(e){t.call(this,e,Fs)}return t&&(r.__proto__=t),r.prototype=Object.create(t&&t.prototype),r.prototype.constructor=r,r.prototype.createBucket=function(t){return new Ao(t)},r.prototype.queryRadius=function(t){var e=t;return Ro.getMaximumPaintValue("circle-radius",this,e)+Ro.getMaximumPaintValue("circle-stroke-width",this,e)+Ro.translateDistance(this.paint.get("circle-translate"))},r.prototype.queryIntersectsFeature=function(t,r,n,i,a,o,s,u,l){u=Us();for(var p=Ro.translate(t,this.paint.get("circle-translate"),this.paint.get("circle-translate-anchor"),0,s),c=this.paint.get("circle-radius").evaluate(r,n)+this.paint.get("circle-stroke-width").evaluate(r,n),f="map"===this.paint.get("circle-pitch-alignment"),h=f?p:Bs(p,u),d=f?c*s:c,y=0,m=i;yn.zoomHistory.lastIntegerZoom?{from:t,to:e}:{from:r,to:e}},e.prototype.interpolate=function(t){return t},e}(Io);ke.register("DataDrivenProperty",Io);var Ls=new zo({"fill-sort-key":new Io(Ts.layout_fill["fill-sort-key"])}),Xs=new zo({"fill-antialias":new So(Ts.paint_fill["fill-antialias"]),"fill-opacity":new Io(Ts.paint_fill["fill-opacity"]),"fill-color":new Io(Ts.paint_fill["fill-color"]),"fill-outline-color":new Io(Ts.paint_fill["fill-outline-color"]),"fill-translate":new So(Ts.paint_fill["fill-translate"]),"fill-translate-anchor":new So(Ts.paint_fill["fill-translate-anchor"]),"fill-pattern":new Ns(Ts.paint_fill["fill-pattern"])}),qs={paint:Xs,layout:Ls},js=function(t){function e(e){t.call(this,e,qs)}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype.recalculate=function(e,r){t.prototype.recalculate.call(this,e,r);var n=this.paint._values["fill-outline-color"];"constant"===n.value.kind&&void 0===n.value.value&&(this.paint._values["fill-outline-color"]=this.paint._values["fill-color"])},e.prototype.createBucket=function(t){return new hi(t)},e.prototype.queryRadius=function(){return Ro.translateDistance(this.paint.get("fill-translate"))},e.prototype.queryIntersectsFeature=function(t,e,r,n,i,a,o){var s=Ro.translate(t,this.paint.get("fill-translate"),this.paint.get("fill-translate-anchor"),0,o);return As.polygonIntersectsMultiPolygon(s,n)},e.prototype.isTileClipped=function(){return!0},e}(No),Hs=function(t){this.specification=t};Hs.prototype.possiblyEvaluate=function(t,e,r){if(void 0!==t.value){if("constant"===t.expression.kind){var n=t.expression.evaluate(e,null,{},r);return this._calculate(n,n,n,e)}return this._calculate(t.expression.evaluate(new EvaluationParameters(Math.floor(e.zoom-1),e)),t.expression.evaluate(new EvaluationParameters(Math.floor(e.zoom),e)),t.expression.evaluate(new EvaluationParameters(Math.floor(e.zoom+1),e)),e)}},Hs.prototype._calculate=function(t,e,r,n){return n.zoom>n.zoomHistory.lastIntegerZoom?{from:t,to:e}:{from:r,to:e}},Hs.prototype.interpolate=function(t){return t},ke.register("CrossFadedProperty",Hs);var Ys=function(t){this.specification=t};Ys.prototype.possiblyEvaluate=function(t,e,r){return!!t.expression.evaluate(e,null,{},r)},Ys.prototype.interpolate=function(){return!1},ke.register("ColorRampProperty",Ys);var Qs=new zo({"line-cap":new So(Ts.layout_line["line-cap"]),"line-join":new Io(Ts.layout_line["line-join"]),"line-miter-limit":new So(Ts.layout_line["line-miter-limit"]),"line-round-limit":new So(Ts.layout_line["line-round-limit"]),"line-sort-key":new Io(Ts.layout_line["line-sort-key"])}),Ks=new zo({"line-opacity":new Io(Ts.paint_line["line-opacity"]),"line-color":new Io(Ts.paint_line["line-color"]),"line-translate":new So(Ts.paint_line["line-translate"]),"line-translate-anchor":new So(Ts.paint_line["line-translate-anchor"]),"line-width":new Io(Ts.paint_line["line-width"]),"line-gap-width":new Io(Ts.paint_line["line-gap-width"]),"line-offset":new Io(Ts.paint_line["line-offset"]),"line-blur":new Io(Ts.paint_line["line-blur"]),"line-dasharray":new Hs(Ts.paint_line["line-dasharray"]),"line-pattern":new Ns(Ts.paint_line["line-pattern"]),"line-gradient":new Ys(Ts.paint_line["line-gradient"])}),Gs={paint:Ks,layout:Qs},Ws=function(t){function e(){t.apply(this,arguments)}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype.possiblyEvaluate=function(e,r){return r=new Re(Math.floor(r.zoom),{now:r.now,fadeDuration:r.fadeDuration,zoomHistory:r.zoomHistory,transition:r.transition}),t.prototype.possiblyEvaluate.call(this,e,r)},e.prototype.evaluate=function(e,r,n,i){return r=extend({},r,{zoom:Math.floor(r.zoom)}),t.prototype.evaluate.call(this,e,r,n,i)},e}(Io),Js=new Ws(Gs.paint.properties["line-width"].specification);Js.useIntegerZoom=!0;var Zs=function(t){function e(e){t.call(this,e,Gs)}function r(t,e){return e>0?e+2*t:t}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype._handleSpecialPaintPropertyUpdate=function(t){"line-gradient"===t&&this._updateGradient()},e.prototype._updateGradient=function(){var t=this._transitionablePaint._values["line-gradient"].value.expression;this.gradient=renderColorRamp(t,"lineProgress"),this.gradientTexture=null},e.prototype.recalculate=function(e,r){t.prototype.recalculate.call(this,e,r),this.paint._values["line-floorwidth"]=Js.possiblyEvaluate(this._transitioningPaint._values["line-width"].value,e)},e.prototype.createBucket=function(t){return new Ir(t)},e.prototype.queryRadius=function(t){var e=t,n=r(Ro.getMaximumPaintValue("line-width",this,e),Ro.getMaximumPaintValue("line-gap-width",this,e)),i=Ro.getMaximumPaintValue("line-offset",this,e);return n/2+Math.abs(i)+Ro.translateDistance(this.paint.get("line-translate"))},e.prototype.queryIntersectsFeature=function(t,e,n,i,a,o,s){var u=Ro.translate(t,this.paint.get("line-translate"),this.paint.get("line-translate-anchor"),0,s),l=r(this.paint.get("line-width").evaluate(e,n),this.paint.get("line-gap-width").evaluate(e,n)),p=s/2*(l=Math.max(l,5)),c=this.paint.get("line-offset").evaluate(e,n);return c&&(i=function(t,e){for(var r=[],n=new wi(0,0),i=0;i=0&&n>=t&&uu[this.text.charCodeAt(n)];n--)r--;this.text=this.text.substring(t,r),this.sectionIndex=this.sectionIndex.slice(t,r)},ou.prototype.substring=function(t,e){var r=new ou;return r.text=this.text.substring(t,e),r.sectionIndex=this.sectionIndex.slice(t,e),r.sections=this.sections,r},ou.prototype.toString=function(){return this.text},ou.prototype.getMaxScale=function(){var t=this;return this.sectionIndex.reduce((function(e,r){return Math.max(e,t.sections[r].scale)}),0)},ou.prototype.addTextSection=function(t,e){this.text+=t.text,this.sections.push(au.forText(t.scale,t.fontStack||e));for(var r=this.sections.length-1,n=0;n=iu?null:++this.imageSectionID:(this.imageSectionID=nu,this.imageSectionID)},eu.shapeText=function(t,e,r,n,i,a,o,s,u,l,p,c,f,h,d,y){var m=ou.fromFeature(t,i);c===eu.WritingMode.vertical&&m.verticalizePunctuation(),su(m,void 0);var v=[],g={positionedLines:v,text:m.toString(),top:p[1],bottom:p[1],left:p[0],right:p[0],writingMode:c,iconsInText:!1,verticalizable:!1};return!ru(v)&&g};var uu={};function lu(t){var e=.5,r=.5;switch(t){case"right":case"top-right":case"bottom-right":e=1;break;case"left":case"top-left":case"bottom-left":e=0}switch(t){case"bottom":case"bottom-right":case"bottom-left":r=1;break;case"top":case"top-right":case"top-left":r=0}return{horizontalAlign:e,verticalAlign:r}}uu[9]=!0,uu[10]=!0,uu[11]=!0,uu[12]=!0,uu[13]=!0,uu[32]=!0,eu.shapeIcon=function(t,e,r){var n=lu(r),i=n.horizontalAlign,a=n.verticalAlign,o=e[0],s=e[1],u=o-t.displaySize[0]*i,l=u+t.displaySize[0],p=s-t.displaySize[1]*a;return{image:t,top:p,bottom:p+t.displaySize[1],left:u,right:l}},eu.fitIconToText=function(t,e,r,n,i,a){var o,s=t.image;if(s.content){var u=s.content,l=s.pixelRatio||1;o=[u[0]/l,u[1]/l,s.displaySize[0]-u[2]/l,s.displaySize[1]-u[3]/l]}var p,c,f,h,d=e.left*a,y=e.right*a;"width"===r||"both"===r?(h=i[0]+d-n[3],c=i[0]+y+n[1]):c=(h=i[0]+(d+y-s.displaySize[0])/2)+s.displaySize[0];var m=e.top*a,v=e.bottom*a;return"height"===r||"both"===r?(p=i[1]+m-n[0],f=i[1]+v+n[2]):f=(p=i[1]+(m+v-s.displaySize[1])/2)+s.displaySize[1],{image:s,top:p,right:c,bottom:f,left:h,collisionPadding:o}};var pu=128;function cu(t,e){var r=e.expression;if("constant"===r.kind)return{kind:"constant",layoutSize:r.evaluate(new Re(t+1))};if("source"===r.kind)return{kind:"source"};for(var n=r.zoomStops,i=r.interpolationType,a=0;a=128&&t<=255},Arabic:function(t){return t>=1536&&t<=1791},"Arabic Supplement":function(t){return t>=1872&&t<=1919},"Arabic Extended-A":function(t){return t>=2208&&t<=2303},"Hangul Jamo":function(t){return t>=4352&&t<=4607},"Unified Canadian Aboriginal Syllabics":function(t){return t>=5120&&t<=5759},Khmer:function(t){return t>=6016&&t<=6143},"Unified Canadian Aboriginal Syllabics Extended":function(t){return t>=6320&&t<=6399},"General Punctuation":function(t){return t>=8192&&t<=8303},"Letterlike Symbols":function(t){return t>=8448&&t<=8527},"Number Forms":function(t){return t>=8528&&t<=8591},"Miscellaneous Technical":function(t){return t>=8960&&t<=9215},"Control Pictures":function(t){return t>=9216&&t<=9279},"Optical Character Recognition":function(t){return t>=9280&&t<=9311},"Enclosed Alphanumerics":function(t){return t>=9312&&t<=9471},"Geometric Shapes":function(t){return t>=9632&&t<=9727},"Miscellaneous Symbols":function(t){return t>=9728&&t<=9983},"Miscellaneous Symbols and Arrows":function(t){return t>=11008&&t<=11263},"CJK Radicals Supplement":function(t){return t>=11904&&t<=12031},"Kangxi Radicals":function(t){return t>=12032&&t<=12255},"Ideographic Description Characters":function(t){return t>=12272&&t<=12287},"CJK Symbols and Punctuation":function(t){return t>=12288&&t<=12351},Hiragana:function(t){return t>=12352&&t<=12447},Katakana:function(t){return t>=12448&&t<=12543},Bopomofo:function(t){return t>=12544&&t<=12591},"Hangul Compatibility Jamo":function(t){return t>=12592&&t<=12687},Kanbun:function(t){return t>=12688&&t<=12703},"Bopomofo Extended":function(t){return t>=12704&&t<=12735},"CJK Strokes":function(t){return t>=12736&&t<=12783},"Katakana Phonetic Extensions":function(t){return t>=12784&&t<=12799},"Enclosed CJK Letters and Months":function(t){return t>=12800&&t<=13055},"CJK Compatibility":function(t){return t>=13056&&t<=13311},"CJK Unified Ideographs Extension A":function(t){return t>=13312&&t<=19903},"Yijing Hexagram Symbols":function(t){return t>=19904&&t<=19967},"CJK Unified Ideographs":function(t){return t>=19968&&t<=40959},"Yi Syllables":function(t){return t>=40960&&t<=42127},"Yi Radicals":function(t){return t>=42128&&t<=42191},"Hangul Jamo Extended-A":function(t){return t>=43360&&t<=43391},"Hangul Syllables":function(t){return t>=44032&&t<=55215},"Hangul Jamo Extended-B":function(t){return t>=55216&&t<=55295},"Private Use Area":function(t){return t>=57344&&t<=63743},"CJK Compatibility Ideographs":function(t){return t>=63744&&t<=64255},"Arabic Presentation Forms-A":function(t){return t>=64336&&t<=65023},"Vertical Forms":function(t){return t>=65040&&t<=65055},"CJK Compatibility Forms":function(t){return t>=65072&&t<=65103},"Small Form Variants":function(t){return t>=65104&&t<=65135},"Arabic Presentation Forms-B":function(t){return t>=65136&&t<=65279},"Halfwidth and Fullwidth Forms":function(t){return t>=65280&&t<=65519}},gu=function(){};function xu(t){return!vu.Arabic(t)&&(!vu["Arabic Supplement"](t)&&(!vu["Arabic Extended-A"](t)&&(!vu["Arabic Presentation Forms-A"](t)&&!vu["Arabic Presentation Forms-B"](t))))}function bu(t){return 746===t||747===t||!(t<4352)&&(!!vu["Bopomofo Extended"](t)||(!!vu.Bopomofo(t)||(!(!vu["CJK Compatibility Forms"](t)||t>=65097&&t<=65103)||(!!vu["CJK Compatibility Ideographs"](t)||(!!vu["CJK Compatibility"](t)||(!!vu["CJK Radicals Supplement"](t)||(!!vu["CJK Strokes"](t)||(!(!vu["CJK Symbols and Punctuation"](t)||t>=12296&&t<=12305||t>=12308&&t<=12319||12336===t)||(!!vu["CJK Unified Ideographs Extension A"](t)||(!!vu["CJK Unified Ideographs"](t)||(!!vu["Enclosed CJK Letters and Months"](t)||(!!vu["Hangul Compatibility Jamo"](t)||(!!vu["Hangul Jamo Extended-A"](t)||(!!vu["Hangul Jamo Extended-B"](t)||(!!vu["Hangul Jamo"](t)||(!!vu["Hangul Syllables"](t)||(!!vu.Hiragana(t)||(!!vu["Ideographic Description Characters"](t)||(!!vu.Kanbun(t)||(!!vu["Kangxi Radicals"](t)||(!!vu["Katakana Phonetic Extensions"](t)||(!(!vu.Katakana(t)||12540===t)||(!(!vu["Halfwidth and Fullwidth Forms"](t)||65288===t||65289===t||65293===t||t>=65306&&t<=65310||65339===t||65341===t||65343===t||t>=65371&&t<=65503||65507===t||t>=65512&&t<=65519)||(!(!vu["Small Form Variants"](t)||t>=65112&&t<=65118||t>=65123&&t<=65126)||(!!vu["Unified Canadian Aboriginal Syllabics"](t)||(!!vu["Unified Canadian Aboriginal Syllabics Extended"](t)||(!!vu["Vertical Forms"](t)||(!!vu["Yijing Hexagram Symbols"](t)||(!!vu["Yi Syllables"](t)||!!vu["Yi Radicals"](t))))))))))))))))))))))))))))))}function _u(t){return t>=1424&&t<=2303||vu["Arabic Presentation Forms-A"](t)||vu["Arabic Presentation Forms-B"](t)}gu.allowsVerticalWritingMode=function(t){for(var e=0,r=t;e0)&&("constant"!==i.value.kind||i.value.value.length>0),u=("constant"!==o.value.kind||!!o.value.value)&&Object.keys(o.parameters).length>0,l=n.get("symbol-sort-key");if(this.features=[],s||u){for(var p=e.iconDependencies,c=e.glyphDependencies,f=e.availableImages,h=new Re(this.zoom),d=0,y=t;d=0;for(var M=0,O=b.sections;M=0;s--)a[s]={x:e[s].x,y:e[s].y,tileUnitDistanceFromAnchor:i},s>0&&(i+=e[s-1].dist(e[s]));for(var u=0;u0;this.addCollisionDebugVertices(o,s,u,l,p?n?this.textCollisionCircle:this.iconCollisionCircle:n?this.textCollisionBox:this.iconCollisionBox,a.anchorPoint,r,p)}},Mu.prototype.generateCollisionDebugBuffers=function(){for(var t=0;t0},Mu.prototype.hasIconData=function(){return this.icon.segments.get().length>0},Mu.prototype.hasTextCollisionBoxData=function(){return this.textCollisionBox.segments.get().length>0},Mu.prototype.hasIconCollisionBoxData=function(){return this.iconCollisionBox.segments.get().length>0},Mu.prototype.hasTextCollisionCircleData=function(){return this.textCollisionCircle.segments.get().length>0},Mu.prototype.hasIconCollisionCircleData=function(){return this.iconCollisionCircle.segments.get().length>0},Mu.prototype.addIndicesForPlacedSymbol=function(t,e){for(var r=t.placedSymbolArray.get(e),n=r.vertexStartIndex+4*r.numGlyphs,i=r.vertexStartIndex;i1||this.icon.segments.get().length>1)){this.symbolInstanceIndexes=this.getSortedSymbolIndexes(t),this.sortedAngle=t,this.text.indexArray.clear(),this.icon.indexArray.clear(),this.featureSortOrder=[];for(var r=0,n=this.symbolInstanceIndexes;r=0&&n.indexOf(t)===r&&e.addIndicesForPlacedSymbol(e.text,t)})),a.verticalPlacedTextSymbolIndex>=0&&this.addIndicesForPlacedSymbol(this.text,a.verticalPlacedTextSymbolIndex),a.placedIconSymbolIndex>=0&&this.addIndicesForPlacedSymbol(this.icon,a.placedIconSymbolIndex),a.verticalPlacedIconSymbolIndex>=0&&this.addIndicesForPlacedSymbol(this.icon,a.verticalPlacedIconSymbolIndex)}this.text.indexBuffer&&this.text.indexBuffer.updateData(this.text.indexArray),this.icon.indexBuffer&&this.icon.indexBuffer.updateData(this.icon.indexArray)}},ke.register("SymbolBucket",Mu,{omit:["layers","collisionBoxArray","compareText"]}),Mu.MAX_GLYPHS=65535,Mu.addDynamicAttributes=Au;var Ou={kind:"color"},Pu={kind:"formatted"},zu=new zo({"symbol-placement":new So(Ts.layout_symbol["symbol-placement"]),"symbol-spacing":new So(Ts.layout_symbol["symbol-spacing"]),"symbol-avoid-edges":new So(Ts.layout_symbol["symbol-avoid-edges"]),"symbol-sort-key":new Io(Ts.layout_symbol["symbol-sort-key"]),"symbol-z-order":new So(Ts.layout_symbol["symbol-z-order"]),"icon-allow-overlap":new So(Ts.layout_symbol["icon-allow-overlap"]),"icon-ignore-placement":new So(Ts.layout_symbol["icon-ignore-placement"]),"icon-optional":new So(Ts.layout_symbol["icon-optional"]),"icon-rotation-alignment":new So(Ts.layout_symbol["icon-rotation-alignment"]),"icon-size":new Io(Ts.layout_symbol["icon-size"]),"icon-text-fit":new So(Ts.layout_symbol["icon-text-fit"]),"icon-text-fit-padding":new So(Ts.layout_symbol["icon-text-fit-padding"]),"icon-image":new Io(Ts.layout_symbol["icon-image"]),"icon-rotate":new Io(Ts.layout_symbol["icon-rotate"]),"icon-padding":new So(Ts.layout_symbol["icon-padding"]),"icon-keep-upright":new So(Ts.layout_symbol["icon-keep-upright"]),"icon-offset":new Io(Ts.layout_symbol["icon-offset"]),"icon-anchor":new Io(Ts.layout_symbol["icon-anchor"]),"icon-pitch-alignment":new So(Ts.layout_symbol["icon-pitch-alignment"]),"text-pitch-alignment":new So(Ts.layout_symbol["text-pitch-alignment"]),"text-rotation-alignment":new So(Ts.layout_symbol["text-rotation-alignment"]),"text-field":new Io(Ts.layout_symbol["text-field"]),"text-font":new Io(Ts.layout_symbol["text-font"]),"text-size":new Io(Ts.layout_symbol["text-size"]),"text-max-width":new Io(Ts.layout_symbol["text-max-width"]),"text-line-height":new So(Ts.layout_symbol["text-line-height"]),"text-letter-spacing":new Io(Ts.layout_symbol["text-letter-spacing"]),"text-justify":new Io(Ts.layout_symbol["text-justify"]),"text-radial-offset":new Io(Ts.layout_symbol["text-radial-offset"]),"text-variable-anchor":new So(Ts.layout_symbol["text-variable-anchor"]),"text-anchor":new Io(Ts.layout_symbol["text-anchor"]),"text-max-angle":new So(Ts.layout_symbol["text-max-angle"]),"text-writing-mode":new So(Ts.layout_symbol["text-writing-mode"]),"text-rotate":new Io(Ts.layout_symbol["text-rotate"]),"text-padding":new So(Ts.layout_symbol["text-padding"]),"text-keep-upright":new So(Ts.layout_symbol["text-keep-upright"]),"text-transform":new Io(Ts.layout_symbol["text-transform"]),"text-offset":new Io(Ts.layout_symbol["text-offset"]),"text-allow-overlap":new So(Ts.layout_symbol["text-allow-overlap"]),"text-ignore-placement":new So(Ts.layout_symbol["text-ignore-placement"]),"text-optional":new So(Ts.layout_symbol["text-optional"])}),Ru=new zo({"icon-opacity":new Io(Ts.paint_symbol["icon-opacity"]),"icon-color":new Io(Ts.paint_symbol["icon-color"]),"icon-halo-color":new Io(Ts.paint_symbol["icon-halo-color"]),"icon-halo-width":new Io(Ts.paint_symbol["icon-halo-width"]),"icon-halo-blur":new Io(Ts.paint_symbol["icon-halo-blur"]),"icon-translate":new So(Ts.paint_symbol["icon-translate"]),"icon-translate-anchor":new So(Ts.paint_symbol["icon-translate-anchor"]),"text-opacity":new Io(Ts.paint_symbol["text-opacity"]),"text-color":new Io(Ts.paint_symbol["text-color"],{runtimeType:Ou,getOverride:function(t){return t.textColor},hasOverride:function(t){return!!t.textColor}}),"text-halo-color":new Io(Ts.paint_symbol["text-halo-color"]),"text-halo-width":new Io(Ts.paint_symbol["text-halo-width"]),"text-halo-blur":new Io(Ts.paint_symbol["text-halo-blur"]),"text-show-background":new Io(Ts.paint_symbol["text-show-background"]),"text-translate":new So(Ts.paint_symbol["text-translate"]),"text-translate-anchor":new So(Ts.paint_symbol["text-translate-anchor"])}),Fu={paint:Ru,layout:zu},Cu=function(t){function e(e){t.call(this,e,Fu)}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype.recalculate=function(e,r){if(t.prototype.recalculate.call(this,e,r),"auto"===this.layout.get("icon-rotation-alignment")&&("point"!==this.layout.get("symbol-placement")?this.layout._values["icon-rotation-alignment"]="map":this.layout._values["icon-rotation-alignment"]="viewport"),"auto"===this.layout.get("text-rotation-alignment")&&("point"!==this.layout.get("symbol-placement")?this.layout._values["text-rotation-alignment"]="map":this.layout._values["text-rotation-alignment"]="viewport"),"auto"===this.layout.get("text-pitch-alignment")&&(this.layout._values["text-pitch-alignment"]=this.layout.get("text-rotation-alignment")),"auto"===this.layout.get("icon-pitch-alignment")&&(this.layout._values["icon-pitch-alignment"]=this.layout.get("icon-rotation-alignment")),"point"===this.layout.get("symbol-placement")){var n=this.layout.get("text-writing-mode");if(n){for(var i=[],a=0,o=n;a