<!DOCTYPE html>
<html>
<head>
<meta charset='utf-8' />
<title>Add a vector tile source</title>
<meta name='viewport' content='initial-scale=1,maximum-scale=1,user-scalable=no' />
<script src="script.js"></script>
<link href='style.css' rel='stylesheet' />
<style>
body { margin:0; padding:0; }
#map { position:absolute; top:0; bottom:0; width:100%; }
</style>
</head>
<body>
<div id='map'></div>
<script>
mapboxgl.accessToken = 'pk.eyJ1IjoiYmVuamFtaW4td3lzcyIsImEiOiJVcm5FdEw4In0.S8HRIEq8NqdtFVz2-BwQog';
var map = new mapboxgl.Map({
container: 'map',
style: 'mapbox://styles/mapbox/light-v9',
zoom: 11,
center: [-122.411,37.771],
});
map.on('load', function () {
// map.addLayer({
// "id": "terrain-data",
// "type": "line",
// "source": {
// type: 'vector',
// url: 'mapbox://mapbox.mapbox-terrain-v2'
// },
// "source-layer": "contour",
// "layout": {
// "line-join": "round",
// "line-cap": "round"
// },
// "paint": {
// "line-color": "#ff69b4 ",
// "line-width": 1
// }
// });
map.addSource('vectorDataSource', {
"type": "vector",
"tiles": [ "https://dataspace.demo.socrata.com/tiles/r6t9-rak2/point/{z}/{x}/{y}.json?$limit=1000" ]
// "tiles": [ "https://dataspace.demo.socrata.com/resource/r6t9-rak2.geojson?$limit=1000&$where=point is not null" ]
});
map.addLayer({
'id': 'pointLayer',
'type': 'circle',
'source': 'vectorDataSource',
'source-layer': '_geojsonTileLayer',
'paint': {
'circle-radius': 20,
'circle-color': '#288dc1 ',
"circle-opacity": 0.5
}
});
map.addLayer({
id: "cluster-count",
type: "symbol",
'source': 'vectorDataSource',
'source-layer': '_geojsonTileLayer',
layout: {
"text-field": "{point_count_abbreviated}",
"text-size": 12
}
});
});
</script>
</body>
</html>
!function(t){if("object"==typeof exports&&"undefined"!=typeof module)module.exports=t();else if("function"==typeof define&&define.amd)define([],t);else{("undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof self?self:this).mapboxgl=t()}}(function(){return function t(e,r,i){function n(a,s){if(!r[a]){if(!e[a]){var l="function"==typeof require&&require;if(!s&&l)return l(a,!0);if(o)return o(a,!0);var u=new Error("Cannot find module '"+a+"'");throw u.code="MODULE_NOT_FOUND",u}var c=r[a]={exports:{}};e[a][0].call(c.exports,function(t){var r=e[a][1][t];return n(r||t)},c,c.exports,t,e,r,i)}return r[a].exports}for(var o="function"==typeof require&&require,a=0;a<i.length;a++)n(i[a]);return n}({1:[function(t,e,r){!function(t,i){"object"==typeof r&&void 0!==e?e.exports=i():t.glMatrix=i()}(this,function(){"use strict";(function(){var t=new Float32Array(3);t[0]=0,t[1]=0,t[2]=0})(),function(){var t=new Float32Array(4);t[0]=0,t[1]=0,t[2]=0,t[3]=0}();return{vec3:{transformMat3:function(t,e,r){var i=e[0],n=e[1],o=e[2];return t[0]=i*r[0]+n*r[3]+o*r[6],t[1]=i*r[1]+n*r[4]+o*r[7],t[2]=i*r[2]+n*r[5]+o*r[8],t}},vec4:{transformMat4:function(t,e,r){var i=e[0],n=e[1],o=e[2],a=e[3];return t[0]=r[0]*i+r[4]*n+r[8]*o+r[12]*a,t[1]=r[1]*i+r[5]*n+r[9]*o+r[13]*a,t[2]=r[2]*i+r[6]*n+r[10]*o+r[14]*a,t[3]=r[3]*i+r[7]*n+r[11]*o+r[15]*a,t}},mat2:{create:function(){var t=new Float32Array(4);return t[0]=1,t[1]=0,t[2]=0,t[3]=1,t},rotate:function(t,e,r){var i=e[0],n=e[1],o=e[2],a=e[3],s=Math.sin(r),l=Math.cos(r);return t[0]=i*l+o*s,t[1]=n*l+a*s,t[2]=i*-s+o*l,t[3]=n*-s+a*l,t},scale:function(t,e,r){var i=e[0],n=e[1],o=e[2],a=e[3],s=r[0],l=r[1];return t[0]=i*s,t[1]=n*s,t[2]=o*l,t[3]=a*l,t}},mat3:{create:function(){var t=new Float32Array(9);return t[0]=1,t[1]=0,t[2]=0,t[3]=0,t[4]=1,t[5]=0,t[6]=0,t[7]=0,t[8]=1,t},fromRotation:function(t,e){var r=Math.sin(e),i=Math.cos(e);return t[0]=i,t[1]=r,t[2]=0,t[3]=-r,t[4]=i,t[5]=0,t[6]=0,t[7]=0,t[8]=1,t}},mat4:{create:function(){var t=new Float32Array(16);return t[0]=1,t[1]=0,t[2]=0,t[3]=0,t[4]=0,t[5]=1,t[6]=0,t[7]=0,t[8]=0,t[9]=0,t[10]=1,t[11]=0,t[12]=0,t[13]=0,t[14]=0,t[15]=1,t},identity:function(t){return t[0]=1,t[1]=0,t[2]=0,t[3]=0,t[4]=0,t[5]=1,t[6]=0,t[7]=0,t[8]=0,t[9]=0,t[10]=1,t[11]=0,t[12]=0,t[13]=0,t[14]=0,t[15]=1,t},translate:function(t,e,r){var i,n,o,a,s,l,u,c,p,h,f,d,m=r[0],y=r[1],g=r[2];return e===t?(t[12]=e[0]*m+e[4]*y+e[8]*g+e[12],t[13]=e[1]*m+e[5]*y+e[9]*g+e[13],t[14]=e[2]*m+e[6]*y+e[10]*g+e[14],t[15]=e[3]*m+e[7]*y+e[11]*g+e[15]):(i=e[0],n=e[1],o=e[2],a=e[3],s=e[4],l=e[5],u=e[6],c=e[7],p=e[8],h=e[9],f=e[10],d=e[11],t[0]=i,t[1]=n,t[2]=o,t[3]=a,t[4]=s,t[5]=l,t[6]=u,t[7]=c,t[8]=p,t[9]=h,t[10]=f,t[11]=d,t[12]=i*m+s*y+p*g+e[12],t[13]=n*m+l*y+h*g+e[13],t[14]=o*m+u*y+f*g+e[14],t[15]=a*m+c*y+d*g+e[15]),t},scale:function(t,e,r){var i=r[0],n=r[1],o=r[2];return t[0]=e[0]*i,t[1]=e[1]*i,t[2]=e[2]*i,t[3]=e[3]*i,t[4]=e[4]*n,t[5]=e[5]*n,t[6]=e[6]*n,t[7]=e[7]*n,t[8]=e[8]*o,t[9]=e[9]*o,t[10]=e[10]*o,t[11]=e[11]*o,t[12]=e[12],t[13]=e[13],t[14]=e[14],t[15]=e[15],t},multiply:function(t,e,r){var i=e[0],n=e[1],o=e[2],a=e[3],s=e[4],l=e[5],u=e[6],c=e[7],p=e[8],h=e[9],f=e[10],d=e[11],m=e[12],y=e[13],g=e[14],v=e[15],_=r[0],x=r[1],b=r[2],w=r[3];return t[0]=_*i+x*s+b*p+w*m,t[1]=_*n+x*l+b*h+w*y,t[2]=_*o+x*u+b*f+w*g,t[3]=_*a+x*c+b*d+w*v,_=r[4],x=r[5],b=r[6],w=r[7],t[4]=_*i+x*s+b*p+w*m,t[5]=_*n+x*l+b*h+w*y,t[6]=_*o+x*u+b*f+w*g,t[7]=_*a+x*c+b*d+w*v,_=r[8],x=r[9],b=r[10],w=r[11],t[8]=_*i+x*s+b*p+w*m,t[9]=_*n+x*l+b*h+w*y,t[10]=_*o+x*u+b*f+w*g,t[11]=_*a+x*c+b*d+w*v,_=r[12],x=r[13],b=r[14],w=r[15],t[12]=_*i+x*s+b*p+w*m,t[13]=_*n+x*l+b*h+w*y,t[14]=_*o+x*u+b*f+w*g,t[15]=_*a+x*c+b*d+w*v,t},perspective:function(t,e,r,i,n){var o=1/Math.tan(e/2),a=1/(i-n);return t[0]=o/r,t[1]=0,t[2]=0,t[3]=0,t[4]=0,t[5]=o,t[6]=0,t[7]=0,t[8]=0,t[9]=0,t[10]=(n+i)*a,t[11]=-1,t[12]=0,t[13]=0,t[14]=2*n*i*a,t[15]=0,t},rotateX:function(t,e,r){var i=Math.sin(r),n=Math.cos(r),o=e[4],a=e[5],s=e[6],l=e[7],u=e[8],c=e[9],p=e[10],h=e[11];return e!==t&&(t[0]=e[0],t[1]=e[1],t[2]=e[2],t[3]=e[3],t[12]=e[12],t[13]=e[13],t[14]=e[14],t[15]=e[15]),t[4]=o*n+u*i,t[5]=a*n+c*i,t[6]=s*n+p*i,t[7]=l*n+h*i,t[8]=u*n-o*i,t[9]=c*n-a*i,t[10]=p*n-s*i,t[11]=h*n-l*i,t},rotateZ:function(t,e,r){var i=Math.sin(r),n=Math.cos(r),o=e[0],a=e[1],s=e[2],l=e[3],u=e[4],c=e[5],p=e[6],h=e[7];return e!==t&&(t[8]=e[8],t[9]=e[9],t[10]=e[10],t[11]=e[11],t[12]=e[12],t[13]=e[13],t[14]=e[14],t[15]=e[15]),t[0]=o*n+u*i,t[1]=a*n+c*i,t[2]=s*n+p*i,t[3]=l*n+h*i,t[4]=u*n-o*i,t[5]=c*n-a*i,t[6]=p*n-s*i,t[7]=h*n-l*i,t},invert:function(t,e){var r=e[0],i=e[1],n=e[2],o=e[3],a=e[4],s=e[5],l=e[6],u=e[7],c=e[8],p=e[9],h=e[10],f=e[11],d=e[12],m=e[13],y=e[14],g=e[15],v=r*s-i*a,_=r*l-n*a,x=r*u-o*a,b=i*l-n*s,w=i*u-o*s,z=n*u-o*l,T=c*m-p*d,S=c*y-h*d,A=c*g-f*d,E=p*y-h*m,C=p*g-f*m,k=h*g-f*y,M=v*k-_*C+x*E+b*A-w*S+z*T;return M?(M=1/M,t[0]=(s*k-l*C+u*E)*M,t[1]=(n*C-i*k-o*E)*M,t[2]=(m*z-y*w+g*b)*M,t[3]=(h*w-p*z-f*b)*M,t[4]=(l*A-a*k-u*S)*M,t[5]=(r*k-n*A+o*S)*M,t[6]=(y*x-d*z-g*_)*M,t[7]=(c*z-h*x+f*_)*M,t[8]=(a*C-s*A+u*T)*M,t[9]=(i*A-r*C-o*T)*M,t[10]=(d*w-m*x+g*v)*M,t[11]=(p*x-c*w-f*v)*M,t[12]=(s*S-a*E-l*T)*M,t[13]=(r*E-i*S+n*T)*M,t[14]=(m*_-d*b-y*v)*M,t[15]=(c*b-p*_+h*v)*M,t):null},ortho:function(t,e,r,i,n,o,a){var s=1/(e-r),l=1/(i-n),u=1/(o-a);return t[0]=-2*s,t[1]=0,t[2]=0,t[3]=0,t[4]=0,t[5]=-2*l,t[6]=0,t[7]=0,t[8]=0,t[9]=0,t[10]=2*u,t[11]=0,t[12]=(e+r)*s,t[13]=(n+i)*l,t[14]=(a+o)*u,t[15]=1,t}}}})},{}],2:[function(t,e,r){"use strict";function i(t,e){this.x=t,this.y=e}e.exports=i,i.prototype={clone:function(){return new i(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),i=e*this.x-r*this.y,n=r*this.x+e*this.y;return this.x=i,this.y=n,this},_rotateAround:function(t,e){var r=Math.cos(t),i=Math.sin(t),n=e.x+r*(this.x-e.x)-i*(this.y-e.y),o=e.y+i*(this.x-e.x)+r*(this.y-e.y);return this.x=n,this.y=o,this},_round:function(){return this.x=Math.round(this.x),this.y=Math.round(this.y),this}},i.convert=function(t){return t instanceof i?t:Array.isArray(t)?new i(t[0],t[1]):t}},{}],3:[function(t,e,r){!function(t,i){"object"==typeof r&&void 0!==e?e.exports=i():t.ShelfPack=i()}(this,function(){function t(t,e,r){r=r||{},this.w=t||64,this.h=e||64,this.autoResize=!!r.autoResize,this.shelves=[],this.freebins=[],this.stats={},this.bins={},this.maxId=0}function e(t,e,r){this.x=0,this.y=t,this.w=this.free=e,this.h=r}function r(t,e,r,i,n,o,a){this.id=t,this.x=e,this.y=r,this.w=i,this.h=n,this.maxw=o||i,this.maxh=a||n,this.refcount=0}return t.prototype.pack=function(t,e){t=[].concat(t),e=e||{};for(var r,i,n,o,a=[],s=0;s<t.length;s++)if(r=t[s].w||t[s].width,i=t[s].h||t[s].height,n=t[s].id,r&&i){if(!(o=this.packOne(r,i,n)))continue;e.inPlace&&(t[s].x=o.x,t[s].y=o.y,t[s].id=o.id),a.push(o)}return this.shrink(),a},t.prototype.packOne=function(t,r,i){var n,o,a,s,l={freebin:-1,shelf:-1,waste:1/0},u=0;if("string"==typeof i||"number"==typeof i){if(n=this.getBin(i))return this.ref(n),n;"number"==typeof i&&(this.maxId=Math.max(i,this.maxId))}else i=++this.maxId;for(s=0;s<this.freebins.length;s++){if(n=this.freebins[s],r===n.maxh&&t===n.maxw)return this.allocFreebin(s,t,r,i);r>n.maxh||t>n.maxw||r<=n.maxh&&t<=n.maxw&&(a=n.maxw*n.maxh-t*r)<l.waste&&(l.waste=a,l.freebin=s)}for(s=0;s<this.shelves.length;s++)if(o=this.shelves[s],u+=o.h,!(t>o.free)){if(r===o.h)return this.allocShelf(s,t,r,i);r>o.h||r<o.h&&(a=(o.h-r)*t)<l.waste&&(l.freebin=-1,l.waste=a,l.shelf=s)}if(-1!==l.freebin)return this.allocFreebin(l.freebin,t,r,i);if(-1!==l.shelf)return this.allocShelf(l.shelf,t,r,i);if(r<=this.h-u&&t<=this.w)return o=new e(u,this.w,r),this.allocShelf(this.shelves.push(o)-1,t,r,i);if(this.autoResize){var c,p,h,f;return c=p=this.h,((h=f=this.w)<=c||t>h)&&(f=2*Math.max(t,h)),(c<h||r>c)&&(p=2*Math.max(r,c)),this.resize(f,p),this.packOne(t,r,i)}return null},t.prototype.allocFreebin=function(t,e,r,i){var n=this.freebins.splice(t,1)[0];return n.id=i,n.w=e,n.h=r,n.refcount=0,this.bins[i]=n,this.ref(n),n},t.prototype.allocShelf=function(t,e,r,i){var n=this.shelves[t].alloc(e,r,i);return this.bins[i]=n,this.ref(n),n},t.prototype.shrink=function(){if(this.shelves.length>0){for(var t=0,e=0,r=0;r<this.shelves.length;r++){var i=this.shelves[r];e+=i.h,t=Math.max(i.w-i.free,t)}this.resize(t,e)}},t.prototype.getBin=function(t){return this.bins[t]},t.prototype.ref=function(t){if(1==++t.refcount){var e=t.h;this.stats[e]=1+(0|this.stats[e])}return t.refcount},t.prototype.unref=function(t){return 0===t.refcount?0:(0==--t.refcount&&(this.stats[t.h]--,delete this.bins[t.id],this.freebins.push(t)),t.refcount)},t.prototype.clear=function(){this.shelves=[],this.freebins=[],this.stats={},this.bins={},this.maxId=0},t.prototype.resize=function(t,e){this.w=t,this.h=e;for(var r=0;r<this.shelves.length;r++)this.shelves[r].resize(t);return!0},e.prototype.alloc=function(t,e,i){if(t>this.free||e>this.h)return null;var n=this.x;return this.x+=t,this.free-=t,new r(i,n,this.y,t,e,t,this.h)},e.prototype.resize=function(t){return this.free+=t-this.w,this.w=t,!0},t})},{}],4:[function(t,e,r){"use strict";function i(t,e,r,i,n,o){this.fontSize=t||24,this.buffer=void 0===e?3:e,this.cutoff=i||.25,this.fontFamily=n||"sans-serif",this.fontWeight=o||"normal",this.radius=r||8;var a=this.size=this.fontSize+2*this.buffer;this.canvas=document.createElement("canvas"),this.canvas.width=this.canvas.height=a,this.ctx=this.canvas.getContext("2d"),this.ctx.font=this.fontWeight+" "+this.fontSize+"px "+this.fontFamily,this.ctx.textBaseline="middle",this.ctx.fillStyle="black",this.gridOuter=new Float64Array(a*a),this.gridInner=new Float64Array(a*a),this.f=new Float64Array(a),this.d=new Float64Array(a),this.z=new Float64Array(a+1),this.v=new Int16Array(a),this.middle=Math.round(a/2*(navigator.userAgent.indexOf("Gecko/")>=0?1.2:1))}function n(t,e,r,i,n,a,s){for(var l=0;l<e;l++){for(var u=0;u<r;u++)i[u]=t[u*e+l];for(o(i,n,a,s,r),u=0;u<r;u++)t[u*e+l]=n[u]}for(u=0;u<r;u++){for(l=0;l<e;l++)i[l]=t[u*e+l];for(o(i,n,a,s,e),l=0;l<e;l++)t[u*e+l]=Math.sqrt(n[l])}}function o(t,e,r,i,n){r[0]=0,i[0]=-a,i[1]=+a;for(var o=1,s=0;o<n;o++){for(var l=(t[o]+o*o-(t[r[s]]+r[s]*r[s]))/(2*o-2*r[s]);l<=i[s];)s--,l=(t[o]+o*o-(t[r[s]]+r[s]*r[s]))/(2*o-2*r[s]);r[++s]=o,i[s]=l,i[s+1]=+a}for(o=0,s=0;o<n;o++){for(;i[s+1]<o;)s++;e[o]=(o-r[s])*(o-r[s])+t[r[s]]}}e.exports=i;var a=1e20;i.prototype.draw=function(t){this.ctx.clearRect(0,0,this.size,this.size),this.ctx.fillText(t,this.buffer,this.middle);for(var e=this.ctx.getImageData(0,0,this.size,this.size),r=new Uint8ClampedArray(this.size*this.size),i=0;i<this.size*this.size;i++){var o=e.data[4*i+3]/255;this.gridOuter[i]=1===o?0:0===o?a:Math.pow(Math.max(0,.5-o),2),this.gridInner[i]=1===o?a:0===o?0:Math.pow(Math.max(0,o-.5),2)}for(n(this.gridOuter,this.size,this.size,this.f,this.d,this.v,this.z),n(this.gridInner,this.size,this.size,this.f,this.d,this.v,this.z),i=0;i<this.size*this.size;i++){var s=this.gridOuter[i]-this.gridInner[i];r[i]=Math.max(0,Math.min(255,Math.round(255-255*(s/this.radius+this.cutoff))))}return r}},{}],5:[function(t,e,r){function i(t,e,r,i){this.cx=3*t,this.bx=3*(r-t)-this.cx,this.ax=1-this.cx-this.bx,this.cy=3*e,this.by=3*(i-e)-this.cy,this.ay=1-this.cy-this.by,this.p1x=t,this.p1y=i,this.p2x=r,this.p2y=i}e.exports=i,i.prototype.sampleCurveX=function(t){return((this.ax*t+this.bx)*t+this.cx)*t},i.prototype.sampleCurveY=function(t){return((this.ay*t+this.by)*t+this.cy)*t},i.prototype.sampleCurveDerivativeX=function(t){return(3*this.ax*t+2*this.bx)*t+this.cx},i.prototype.solveCurveX=function(t,e){void 0===e&&(e=1e-6);var r,i,n,o,a;for(n=t,a=0;a<8;a++){if(o=this.sampleCurveX(n)-t,Math.abs(o)<e)return n;var s=this.sampleCurveDerivativeX(n);if(Math.abs(s)<1e-6)break;n-=o/s}if(r=0,i=1,(n=t)<r)return r;if(n>i)return i;for(;r<i;){if(o=this.sampleCurveX(n),Math.abs(o-t)<e)return n;t>o?r=n:i=n,n=.5*(i-r)+r}return n},i.prototype.solve=function(t,e){return this.sampleCurveY(this.solveCurveX(t,e))}},{}],6:[function(t,e,r){e.exports.VectorTile=t("./lib/vectortile.js"),e.exports.VectorTileFeature=t("./lib/vectortilefeature.js"),e.exports.VectorTileLayer=t("./lib/vectortilelayer.js")},{"./lib/vectortile.js":7,"./lib/vectortilefeature.js":8,"./lib/vectortilelayer.js":9}],7:[function(t,e,r){"use strict";function i(t,e,r){if(3===t){var i=new n(r,r.readVarint()+r.pos);i.length&&(e[i.name]=i)}}var n=t("./vectortilelayer");e.exports=function(t,e){this.layers=t.readFields(i,{},e)}},{"./vectortilelayer":9}],8:[function(t,e,r){"use strict";function i(t,e,r,i,o){this.properties={},this.extent=r,this.type=0,this._pbf=t,this._geometry=-1,this._keys=i,this._values=o,t.readFields(n,this,e)}function n(t,e,r){1==t?e.id=r.readVarint():2==t?o(r,e):3==t?e.type=r.readVarint():4==t&&(e._geometry=r.pos)}function o(t,e){for(var r=t.readVarint()+t.pos;t.pos<r;){var i=e._keys[t.readVarint()],n=e._values[t.readVarint()];e.properties[i]=n}}function a(t){var e=t.length;if(e<=1)return[t];for(var r,i,n=[],o=0;o<e;o++){var a=s(t[o]);0!==a&&(void 0===i&&(i=a<0),i===a<0?(r&&n.push(r),r=[t[o]]):r.push(t[o]))}return r&&n.push(r),n}function s(t){for(var e,r,i=0,n=0,o=t.length,a=o-1;n<o;a=n++)e=t[n],i+=((r=t[a]).x-e.x)*(e.y+r.y);return i}var l=t("@mapbox/point-geometry");e.exports=i,i.types=["Unknown","Point","LineString","Polygon"],i.prototype.loadGeometry=function(){var t=this._pbf;t.pos=this._geometry;for(var e,r=t.readVarint()+t.pos,i=1,n=0,o=0,a=0,s=[];t.pos<r;){if(!n){var u=t.readVarint();i=7&u,n=u>>3}if(n--,1===i||2===i)o+=t.readSVarint(),a+=t.readSVarint(),1===i&&(e&&s.push(e),e=[]),e.push(new l(o,a));else{if(7!==i)throw new Error("unknown command "+i);e&&e.push(e[0].clone())}}return e&&s.push(e),s},i.prototype.bbox=function(){var t=this._pbf;t.pos=this._geometry;for(var e=t.readVarint()+t.pos,r=1,i=0,n=0,o=0,a=1/0,s=-1/0,l=1/0,u=-1/0;t.pos<e;){if(!i){var c=t.readVarint();r=7&c,i=c>>3}if(i--,1===r||2===r)n+=t.readSVarint(),o+=t.readSVarint(),n<a&&(a=n),n>s&&(s=n),o<l&&(l=o),o>u&&(u=o);else if(7!==r)throw new Error("unknown command "+r)}return[a,l,s,u]},i.prototype.toGeoJSON=function(t,e,r){function n(t){for(var e=0;e<t.length;e++){var r=t[e],i=180-360*(r.y+c)/l;t[e]=[360*(r.x+u)/l-180,360/Math.PI*Math.atan(Math.exp(i*Math.PI/180))-90]}}var o,s,l=this.extent*Math.pow(2,r),u=this.extent*t,c=this.extent*e,p=this.loadGeometry(),h=i.types[this.type];switch(this.type){case 1:var f=[];for(o=0;o<p.length;o++)f[o]=p[o][0];n(p=f);break;case 2:for(o=0;o<p.length;o++)n(p[o]);break;case 3:for(p=a(p),o=0;o<p.length;o++)for(s=0;s<p[o].length;s++)n(p[o][s])}1===p.length?p=p[0]:h="Multi"+h;var d={type:"Feature",geometry:{type:h,coordinates:p},properties:this.properties};return"id"in this&&(d.id=this.id),d}},{"@mapbox/point-geometry":2}],9:[function(t,e,r){"use strict";function i(t,e){this.version=1,this.name=null,this.extent=4096,this.length=0,this._pbf=t,this._keys=[],this._values=[],this._features=[],t.readFields(n,this,e),this.length=this._features.length}function n(t,e,r){15===t?e.version=r.readVarint():1===t?e.name=r.readString():5===t?e.extent=r.readVarint():2===t?e._features.push(r.pos):3===t?e._keys.push(r.readString()):4===t&&e._values.push(o(r))}function o(t){for(var e=null,r=t.readVarint()+t.pos;t.pos<r;){var i=t.readVarint()>>3;e=1===i?t.readString():2===i?t.readFloat():3===i?t.readDouble():4===i?t.readVarint64():5===i?t.readVarint():6===i?t.readSVarint():7===i?t.readBoolean():null}return e}var a=t("./vectortilefeature.js");e.exports=i,i.prototype.feature=function(t){if(t<0||t>=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 a(this._pbf,e,this.extent,this._keys,this._values)}},{"./vectortilefeature.js":8}],10:[function(t,e,r){!function(t,i){i("object"==typeof r&&void 0!==e?r:t.WhooTS=t.WhooTS||{})}(this,function(t){function e(t,e,i){var n=r(256*t,256*(e=Math.pow(2,i)-e-1),i),o=r(256*(t+1),256*(e+1),i);return n[0]+","+n[1]+","+o[0]+","+o[1]}function r(t,e,r){var i=2*Math.PI*6378137/256/Math.pow(2,r);return[t*i-2*Math.PI*6378137/2,e*i-2*Math.PI*6378137/2]}t.getURL=function(t,r,i,n,o,a){return a=a||{},t+"?"+["bbox="+e(i,n,o),"format="+(a.format||"image/png"),"service="+(a.service||"WMS"),"version="+(a.version||"1.1.1"),"request="+(a.request||"GetMap"),"srs="+(a.srs||"EPSG:3857"),"width="+(a.width||256),"height="+(a.height||256),"layers="+r].join("&")},t.getTileBBox=e,t.getMercCoords=r,Object.defineProperty(t,"__esModule",{value:!0})})},{}],11:[function(t,e,r){(function(r){"use strict";function i(t,e){if(t===e)return 0;for(var r=t.length,i=e.length,n=0,o=Math.min(r,i);n<o;++n)if(t[n]!==e[n]){r=t[n],i=e[n];break}return r<i?-1:i<r?1:0}function n(t){return r.Buffer&&"function"==typeof r.Buffer.isBuffer?r.Buffer.isBuffer(t):!(null==t||!t._isBuffer)}function o(t){return Object.prototype.toString.call(t)}function a(t){return!n(t)&&("function"==typeof r.ArrayBuffer&&("function"==typeof ArrayBuffer.isView?ArrayBuffer.isView(t):!!t&&(t instanceof DataView||!!(t.buffer&&t.buffer instanceof ArrayBuffer))))}function s(t){if(x.isFunction(t)){if(z)return t.name;var e=t.toString().match(S);return e&&e[1]}}function l(t,e){return"string"==typeof t?t.length<e?t:t.slice(0,e):t}function u(t){if(z||!x.isFunction(t))return x.inspect(t);var e=s(t);return"[Function"+(e?": "+e:"")+"]"}function c(t){return l(u(t.actual),128)+" "+t.operator+" "+l(u(t.expected),128)}function p(t,e,r,i,n){throw new T.AssertionError({message:r,actual:t,expected:e,operator:i,stackStartFunction:n})}function h(t,e){t||p(t,!0,e,"==",T.ok)}function f(t,e,r,s){if(t===e)return!0;if(n(t)&&n(e))return 0===i(t,e);if(x.isDate(t)&&x.isDate(e))return t.getTime()===e.getTime();if(x.isRegExp(t)&&x.isRegExp(e))return t.source===e.source&&t.global===e.global&&t.multiline===e.multiline&&t.lastIndex===e.lastIndex&&t.ignoreCase===e.ignoreCase;if(null!==t&&"object"==typeof t||null!==e&&"object"==typeof e){if(a(t)&&a(e)&&o(t)===o(e)&&!(t instanceof Float32Array||t instanceof Float64Array))return 0===i(new Uint8Array(t.buffer),new Uint8Array(e.buffer));if(n(t)!==n(e))return!1;var l=(s=s||{actual:[],expected:[]}).actual.indexOf(t);return-1!==l&&l===s.expected.indexOf(e)||(s.actual.push(t),s.expected.push(e),m(t,e,r,s))}return r?t===e:t==e}function d(t){return"[object Arguments]"==Object.prototype.toString.call(t)}function m(t,e,r,i){if(null===t||void 0===t||null===e||void 0===e)return!1;if(x.isPrimitive(t)||x.isPrimitive(e))return t===e;if(r&&Object.getPrototypeOf(t)!==Object.getPrototypeOf(e))return!1;var n=d(t),o=d(e);if(n&&!o||!n&&o)return!1;if(n)return t=w.call(t),e=w.call(e),f(t,e,r);var a,s,l=A(t),u=A(e);if(l.length!==u.length)return!1;for(l.sort(),u.sort(),s=l.length-1;s>=0;s--)if(l[s]!==u[s])return!1;for(s=l.length-1;s>=0;s--)if(a=l[s],!f(t[a],e[a],r,i))return!1;return!0}function y(t,e,r){f(t,e,!0)&&p(t,e,r,"notDeepStrictEqual",y)}function g(t,e){if(!t||!e)return!1;if("[object RegExp]"==Object.prototype.toString.call(e))return e.test(t);try{if(t instanceof e)return!0}catch(t){}return!Error.isPrototypeOf(e)&&!0===e.call({},t)}function v(t){var e;try{t()}catch(t){e=t}return e}function _(t,e,r,i){var n;if("function"!=typeof e)throw new TypeError('"block" argument must be a function');"string"==typeof r&&(i=r,r=null),n=v(e),i=(r&&r.name?" ("+r.name+").":".")+(i?" "+i:"."),t&&!n&&p(n,r,"Missing expected exception"+i);var o="string"==typeof i,a=!t&&x.isError(n),s=!t&&n&&!r;if((a&&o&&g(n,r)||s)&&p(n,r,"Got unwanted exception"+i),t&&n&&r&&!g(n,r)||!t&&n)throw n}var x=t("util/"),b=Object.prototype.hasOwnProperty,w=Array.prototype.slice,z="foo"===function(){}.name,T=e.exports=h,S=/\s*function\s+([^\(\s]*)\s*/;T.AssertionError=function(t){this.name="AssertionError",this.actual=t.actual,this.expected=t.expected,this.operator=t.operator,t.message?(this.message=t.message,this.generatedMessage=!1):(this.message=c(this),this.generatedMessage=!0);var e=t.stackStartFunction||p;if(Error.captureStackTrace)Error.captureStackTrace(this,e);else{var r=new Error;if(r.stack){var i=r.stack,n=s(e),o=i.indexOf("\n"+n);if(o>=0){var a=i.indexOf("\n",o+1);i=i.substring(a+1)}this.stack=i}}},x.inherits(T.AssertionError,Error),T.fail=p,T.ok=h,T.equal=function(t,e,r){t!=e&&p(t,e,r,"==",T.equal)},T.notEqual=function(t,e,r){t==e&&p(t,e,r,"!=",T.notEqual)},T.deepEqual=function(t,e,r){f(t,e,!1)||p(t,e,r,"deepEqual",T.deepEqual)},T.deepStrictEqual=function(t,e,r){f(t,e,!0)||p(t,e,r,"deepStrictEqual",T.deepStrictEqual)},T.notDeepEqual=function(t,e,r){f(t,e,!1)&&p(t,e,r,"notDeepEqual",T.notDeepEqual)},T.notDeepStrictEqual=y,T.strictEqual=function(t,e,r){t!==e&&p(t,e,r,"===",T.strictEqual)},T.notStrictEqual=function(t,e,r){t===e&&p(t,e,r,"!==",T.notStrictEqual)},T.throws=function(t,e,r){_(!0,t,e,r)},T.doesNotThrow=function(t,e,r){_(!1,t,e,r)},T.ifError=function(t){if(t)throw t};var A=Object.keys||function(t){var e=[];for(var r in t)b.call(t,r)&&e.push(r);return e}}).call(this,"undefined"!=typeof global?global:"undefined"!=typeof self?self:"undefined"!=typeof window?window:{})},{"util/":46}],12:[function(t,e,r){function i(t){return t=Math.round(t),t<0?0:t>255?255:t}function n(t){return t<0?0:t>1?1:t}function o(t){return i("%"===t[t.length-1]?parseFloat(t)/100*255:parseInt(t))}function a(t){return n("%"===t[t.length-1]?parseFloat(t)/100:parseFloat(t))}function s(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}var l={transparent:[0,0,0,0],aliceblue:[240,248,255,1],antiquewhite:[250,235,215,1],aqua:[0,255,255,1],aquamarine:[127,255,212,1],azure:[240,255,255,1],beige:[245,245,220,1],bisque:[255,228,196,1],black:[0,0,0,1],blanchedalmond:[255,235,205,1],blue:[0,0,255,1],blueviolet:[138,43,226,1],brown:[165,42,42,1],burlywood:[222,184,135,1],cadetblue:[95,158,160,1],chartreuse:[127,255,0,1],chocolate:[210,105,30,1],coral:[255,127,80,1],cornflowerblue:[100,149,237,1],cornsilk:[255,248,220,1],crimson:[220,20,60,1],cyan:[0,255,255,1],darkblue:[0,0,139,1],darkcyan:[0,139,139,1],darkgoldenrod:[184,134,11,1],darkgray:[169,169,169,1],darkgreen:[0,100,0,1],darkgrey:[169,169,169,1],darkkhaki:[189,183,107,1],darkmagenta:[139,0,139,1],darkolivegreen:[85,107,47,1],darkorange:[255,140,0,1],darkorchid:[153,50,204,1],darkred:[139,0,0,1],darksalmon:[233,150,122,1],darkseagreen:[143,188,143,1],darkslateblue:[72,61,139,1],darkslategray:[47,79,79,1],darkslategrey:[47,79,79,1],darkturquoise:[0,206,209,1],darkviolet:[148,0,211,1],deeppink:[255,20,147,1],deepskyblue:[0,191,255,1],dimgray:[105,105,105,1],dimgrey:[105,105,105,1],dodgerblue:[30,144,255,1],firebrick:[178,34,34,1],floralwhite:[255,250,240,1],forestgreen:[34,139,34,1],fuchsia:[255,0,255,1],gainsboro:[220,220,220,1],ghostwhite:[248,248,255,1],gold:[255,215,0,1],goldenrod:[218,165,32,1],gray:[128,128,128,1],green:[0,128,0,1],greenyellow:[173,255,47,1],grey:[128,128,128,1],honeydew:[240,255,240,1],hotpink:[255,105,180,1],indianred:[205,92,92,1],indigo:[75,0,130,1],ivory:[255,255,240,1],khaki:[240,230,140,1],lavender:[230,230,250,1],lavenderblush:[255,240,245,1],lawngreen:[124,252,0,1],lemonchiffon:[255,250,205,1],lightblue:[173,216,230,1],lightcoral:[240,128,128,1],lightcyan:[224,255,255,1],lightgoldenrodyellow:[250,250,210,1],lightgray:[211,211,211,1],lightgreen:[144,238,144,1],lightgrey:[211,211,211,1],lightpink:[255,182,193,1],lightsalmon:[255,160,122,1],lightseagreen:[32,178,170,1],lightskyblue:[135,206,250,1],lightslategray:[119,136,153,1],lightslategrey:[119,136,153,1],lightsteelblue:[176,196,222,1],lightyellow:[255,255,224,1],lime:[0,255,0,1],limegreen:[50,205,50,1],linen:[250,240,230,1],magenta:[255,0,255,1],maroon:[128,0,0,1],mediumaquamarine:[102,205,170,1],mediumblue:[0,0,205,1],mediumorchid:[186,85,211,1],mediumpurple:[147,112,219,1],mediumseagreen:[60,179,113,1],mediumslateblue:[123,104,238,1],mediumspringgreen:[0,250,154,1],mediumturquoise:[72,209,204,1],mediumvioletred:[199,21,133,1],midnightblue:[25,25,112,1],mintcream:[245,255,250,1],mistyrose:[255,228,225,1],moccasin:[255,228,181,1],navajowhite:[255,222,173,1],navy:[0,0,128,1],oldlace:[253,245,230,1],olive:[128,128,0,1],olivedrab:[107,142,35,1],orange:[255,165,0,1],orangered:[255,69,0,1],orchid:[218,112,214,1],palegoldenrod:[238,232,170,1],palegreen:[152,251,152,1],paleturquoise:[175,238,238,1],palevioletred:[219,112,147,1],papayawhip:[255,239,213,1],peachpuff:[255,218,185,1],peru:[205,133,63,1],pink:[255,192,203,1],plum:[221,160,221,1],powderblue:[176,224,230,1],purple:[128,0,128,1],rebeccapurple:[102,51,153,1],red:[255,0,0,1],rosybrown:[188,143,143,1],royalblue:[65,105,225,1],saddlebrown:[139,69,19,1],salmon:[250,128,114,1],sandybrown:[244,164,96,1],seagreen:[46,139,87,1],seashell:[255,245,238,1],sienna:[160,82,45,1],silver:[192,192,192,1],skyblue:[135,206,235,1],slateblue:[106,90,205,1],slategray:[112,128,144,1],slategrey:[112,128,144,1],snow:[255,250,250,1],springgreen:[0,255,127,1],steelblue:[70,130,180,1],tan:[210,180,140,1],teal:[0,128,128,1],thistle:[216,191,216,1],tomato:[255,99,71,1],turquoise:[64,224,208,1],violet:[238,130,238,1],wheat:[245,222,179,1],white:[255,255,255,1],whitesmoke:[245,245,245,1],yellow:[255,255,0,1],yellowgreen:[154,205,50,1]};try{r.parseCSSColor=function(t){var e=t.replace(/ /g,"").toLowerCase();if(e in l)return l[e].slice();if("#"===e[0]){if(4===e.length)return(r=parseInt(e.substr(1),16))>=0&&r<=4095?[(3840&r)>>4|(3840&r)>>8,240&r|(240&r)>>4,15&r|(15&r)<<4,1]:null;if(7===e.length){var r=parseInt(e.substr(1),16);return r>=0&&r<=16777215?[(16711680&r)>>16,(65280&r)>>8,255&r,1]:null}return null}var n=e.indexOf("("),u=e.indexOf(")");if(-1!==n&&u+1===e.length){var c=e.substr(0,n),p=e.substr(n+1,u-(n+1)).split(","),h=1;switch(c){case"rgba":if(4!==p.length)return null;h=a(p.pop());case"rgb":return 3!==p.length?null:[o(p[0]),o(p[1]),o(p[2]),h];case"hsla":if(4!==p.length)return null;h=a(p.pop());case"hsl":if(3!==p.length)return null;var f=(parseFloat(p[0])%360+360)%360/360,d=a(p[1]),m=a(p[2]),y=m<=.5?m*(d+1):m+d-m*d,g=2*m-y;return[i(255*s(g,y,f+1/3)),i(255*s(g,y,f)),i(255*s(g,y,f-1/3)),h];default:return null}}return null}}catch(t){}},{}],13:[function(t,e,r){"use strict";function i(t,e,r){r=r||2;var i=e&&e.length,o=i?e[0]*r:t.length,s=n(t,0,o,r,!0),l=[];if(!s)return l;var u,c,h,f,d,m,y;if(i&&(s=p(t,e,s,r)),t.length>80*r){u=h=t[0],c=f=t[1];for(var g=r;g<o;g+=r)d=t[g],m=t[g+1],d<u&&(u=d),m<c&&(c=m),d>h&&(h=d),m>f&&(f=m);y=Math.max(h-u,f-c)}return a(s,l,r,u,c,y),l}function n(t,e,r,i,n){var o,a;if(n===I(t,e,r,i)>0)for(o=e;o<r;o+=i)a=C(o,t[o],t[o+1],a);else for(o=r-i;o>=e;o-=i)a=C(o,t[o],t[o+1],a);return a&&w(a,a.next)&&(k(a),a=a.next),a}function o(t,e){if(!t)return t;e||(e=t);var r,i=t;do{if(r=!1,i.steiner||!w(i,i.next)&&0!==b(i.prev,i,i.next))i=i.next;else{if(k(i),(i=e=i.prev)===i.next)return null;r=!0}}while(r||i!==e);return e}function a(t,e,r,i,n,p,h){if(t){!h&&p&&m(t,i,n,p);for(var f,d,y=t;t.prev!==t.next;)if(f=t.prev,d=t.next,p?l(t,i,n,p):s(t))e.push(f.i/r),e.push(t.i/r),e.push(d.i/r),k(t),t=d.next,y=d.next;else if((t=d)===y){h?1===h?a(t=u(t,e,r),e,r,i,n,p,2):2===h&&c(t,e,r,i,n,p):a(o(t),e,r,i,n,p,1);break}}}function s(t){var e=t.prev,r=t,i=t.next;if(b(e,r,i)>=0)return!1;for(var n=t.next.next;n!==t.prev;){if(_(e.x,e.y,r.x,r.y,i.x,i.y,n.x,n.y)&&b(n.prev,n,n.next)>=0)return!1;n=n.next}return!0}function l(t,e,r,i){var n=t.prev,o=t,a=t.next;if(b(n,o,a)>=0)return!1;for(var s=n.x<o.x?n.x<a.x?n.x:a.x:o.x<a.x?o.x:a.x,l=n.y<o.y?n.y<a.y?n.y:a.y:o.y<a.y?o.y:a.y,u=n.x>o.x?n.x>a.x?n.x:a.x:o.x>a.x?o.x:a.x,c=n.y>o.y?n.y>a.y?n.y:a.y:o.y>a.y?o.y:a.y,p=g(s,l,e,r,i),h=g(u,c,e,r,i),f=t.nextZ;f&&f.z<=h;){if(f!==t.prev&&f!==t.next&&_(n.x,n.y,o.x,o.y,a.x,a.y,f.x,f.y)&&b(f.prev,f,f.next)>=0)return!1;f=f.nextZ}for(f=t.prevZ;f&&f.z>=p;){if(f!==t.prev&&f!==t.next&&_(n.x,n.y,o.x,o.y,a.x,a.y,f.x,f.y)&&b(f.prev,f,f.next)>=0)return!1;f=f.prevZ}return!0}function u(t,e,r){var i=t;do{var n=i.prev,o=i.next.next;!w(n,o)&&z(n,i,i.next,o)&&S(n,o)&&S(o,n)&&(e.push(n.i/r),e.push(i.i/r),e.push(o.i/r),k(i),k(i.next),i=t=o),i=i.next}while(i!==t);return i}function c(t,e,r,i,n,s){var l=t;do{for(var u=l.next.next;u!==l.prev;){if(l.i!==u.i&&x(l,u)){var c=E(l,u);return l=o(l,l.next),c=o(c,c.next),a(l,e,r,i,n,s),void a(c,e,r,i,n,s)}u=u.next}l=l.next}while(l!==t)}function p(t,e,r,i){var a,s,l,u=[];for(a=0,s=e.length;a<s;a++)(l=n(t,e[a]*i,a<s-1?e[a+1]*i:t.length,i,!1))===l.next&&(l.steiner=!0),u.push(v(l));for(u.sort(h),a=0;a<u.length;a++)f(u[a],r),r=o(r,r.next);return r}function h(t,e){return t.x-e.x}function f(t,e){if(e=d(t,e)){var r=E(e,t);o(r,r.next)}}function d(t,e){var r,i=e,n=t.x,o=t.y,a=-1/0;do{if(o<=i.y&&o>=i.next.y){var s=i.x+(o-i.y)*(i.next.x-i.x)/(i.next.y-i.y);if(s<=n&&s>a){if(a=s,s===n){if(o===i.y)return i;if(o===i.next.y)return i.next}r=i.x<i.next.x?i:i.next}}i=i.next}while(i!==e);if(!r)return null;if(n===a)return r.prev;var l,u=r,c=r.x,p=r.y,h=1/0;for(i=r.next;i!==u;)n>=i.x&&i.x>=c&&_(o<p?n:a,o,c,p,o<p?a:n,o,i.x,i.y)&&((l=Math.abs(o-i.y)/(n-i.x))<h||l===h&&i.x>r.x)&&S(i,t)&&(r=i,h=l),i=i.next;return r}function m(t,e,r,i){var n=t;do{null===n.z&&(n.z=g(n.x,n.y,e,r,i)),n.prevZ=n.prev,n.nextZ=n.next,n=n.next}while(n!==t);n.prevZ.nextZ=null,n.prevZ=null,y(n)}function y(t){var e,r,i,n,o,a,s,l,u=1;do{for(r=t,t=null,o=null,a=0;r;){for(a++,i=r,s=0,e=0;e<u&&(s++,i=i.nextZ);e++);for(l=u;s>0||l>0&&i;)0===s?(n=i,i=i.nextZ,l--):0!==l&&i?r.z<=i.z?(n=r,r=r.nextZ,s--):(n=i,i=i.nextZ,l--):(n=r,r=r.nextZ,s--),o?o.nextZ=n:t=n,n.prevZ=o,o=n;r=i}o.nextZ=null,u*=2}while(a>1);return t}function g(t,e,r,i,n){return t=32767*(t-r)/n,e=32767*(e-i)/n,t=16711935&(t|t<<8),t=252645135&(t|t<<4),t=858993459&(t|t<<2),t=1431655765&(t|t<<1),e=16711935&(e|e<<8),e=252645135&(e|e<<4),e=858993459&(e|e<<2),e=1431655765&(e|e<<1),t|e<<1}function v(t){var e=t,r=t;do{e.x<r.x&&(r=e),e=e.next}while(e!==t);return r}function _(t,e,r,i,n,o,a,s){return(n-a)*(e-s)-(t-a)*(o-s)>=0&&(t-a)*(i-s)-(r-a)*(e-s)>=0&&(r-a)*(o-s)-(n-a)*(i-s)>=0}function x(t,e){return t.next.i!==e.i&&t.prev.i!==e.i&&!T(t,e)&&S(t,e)&&S(e,t)&&A(t,e)}function b(t,e,r){return(e.y-t.y)*(r.x-e.x)-(e.x-t.x)*(r.y-e.y)}function w(t,e){return t.x===e.x&&t.y===e.y}function z(t,e,r,i){return!!(w(t,e)&&w(r,i)||w(t,i)&&w(r,e))||b(t,e,r)>0!=b(t,e,i)>0&&b(r,i,t)>0!=b(r,i,e)>0}function T(t,e){var r=t;do{if(r.i!==t.i&&r.next.i!==t.i&&r.i!==e.i&&r.next.i!==e.i&&z(r,r.next,t,e))return!0;r=r.next}while(r!==t);return!1}function S(t,e){return b(t.prev,t,t.next)<0?b(t,e,t.next)>=0&&b(t,t.prev,e)>=0:b(t,e,t.prev)<0||b(t,t.next,e)<0}function A(t,e){var r=t,i=!1,n=(t.x+e.x)/2,o=(t.y+e.y)/2;do{r.y>o!=r.next.y>o&&n<(r.next.x-r.x)*(o-r.y)/(r.next.y-r.y)+r.x&&(i=!i),r=r.next}while(r!==t);return i}function E(t,e){var r=new M(t.i,t.x,t.y),i=new M(e.i,e.x,e.y),n=t.next,o=e.prev;return t.next=e,e.prev=t,r.next=n,n.prev=r,i.next=r,r.prev=i,o.next=i,i.prev=o,i}function C(t,e,r,i){var n=new M(t,e,r);return i?(n.next=i.next,n.prev=i,i.next.prev=n,i.next=n):(n.prev=n,n.next=n),n}function k(t){t.next.prev=t.prev,t.prev.next=t.next,t.prevZ&&(t.prevZ.nextZ=t.nextZ),t.nextZ&&(t.nextZ.prevZ=t.prevZ)}function M(t,e,r){this.i=t,this.x=e,this.y=r,this.prev=null,this.next=null,this.z=null,this.prevZ=null,this.nextZ=null,this.steiner=!1}function I(t,e,r,i){for(var n=0,o=e,a=r-i;o<r;o+=i)n+=(t[a]-t[o])*(t[o+1]+t[a+1]),a=o;return n}e.exports=i,i.deviation=function(t,e,r,i){var n=e&&e.length,o=n?e[0]*r:t.length,a=Math.abs(I(t,0,o,r));if(n)for(var s=0,l=e.length;s<l;s++){var u=e[s]*r,c=s<l-1?e[s+1]*r:t.length;a-=Math.abs(I(t,u,c,r))}var p=0;for(s=0;s<i.length;s+=3){var h=i[s]*r,f=i[s+1]*r,d=i[s+2]*r;p+=Math.abs((t[h]-t[d])*(t[f+1]-t[h+1])-(t[h]-t[f])*(t[d+1]-t[h+1]))}return 0===a&&0===p?0:Math.abs((p-a)/a)},i.flatten=function(t){for(var e=t[0][0].length,r={vertices:[],holes:[],dimensions:e},i=0,n=0;n<t.length;n++){for(var o=0;o<t[n].length;o++)for(var a=0;a<e;a++)r.vertices.push(t[n][o][a]);n>0&&(i+=t[n-1].length,r.holes.push(i))}return r}},{}],14:[function(t,e,r){function i(t){var e=0;if(t&&t.length>0){e+=Math.abs(n(t[0]));for(var r=1;r<t.length;r++)e-=Math.abs(n(t[r]))}return e}function n(t){var e=0;if(t.length>2){for(var r,i,n=0;n<t.length-1;n++)r=t[n],e+=o((i=t[n+1])[0]-r[0])*(2+Math.sin(o(r[1]))+Math.sin(o(i[1])));e=e*a.RADIUS*a.RADIUS/2}return e}function o(t){return t*Math.PI/180}var a=t("wgs84");e.exports.geometry=function(t){if("Polygon"===t.type)return i(t.coordinates);if("MultiPolygon"===t.type){for(var e=0,r=0;r<t.coordinates.length;r++)e+=i(t.coordinates[r]);return e}return null},e.exports.ring=n},{wgs84:50}],15:[function(t,e,r){function i(t,e){switch(t&&t.type||null){case"FeatureCollection":return t.features=t.features.map(n(i,e)),t;case"Feature":return t.geometry=i(t.geometry,e),t;case"Polygon":case"MultiPolygon":return o(t,e);default:return t}}function n(t,e){return function(r){return t(r,e)}}function o(t,e){return"Polygon"===t.type?t.coordinates=a(t.coordinates,e):"MultiPolygon"===t.type&&(t.coordinates=t.coordinates.map(n(a,e))),t}function a(t,e){e=!!e,t[0]=s(t[0],e);for(var r=1;r<t.length;r++)t[r]=s(t[r],!e);return t}function s(t,e){return l(t)===e?t:t.reverse()}function l(t){return u.ring(t)>=0}var u=t("geojson-area");e.exports=i},{"geojson-area":14}],16:[function(t,e,r){"use strict";function i(t,e,r,i){for(var n=[],o=0;o<t.length;o++){var a=t[o],s=a[i];s>=e&&s<=r&&n.push(a)}return n}function n(t,e,r,i,n,a){for(var s=[],l=0;l<t.length;l++){var u,c,p,h=0,f=0,d=null,m=t[l],y=m.area,g=m.dist,v=m.outer,_=m.length,x=[];for(c=0;c<_-1;c++)u=d||m[c],d=m[c+1],h=f||u[i],f=d[i],h<e?f>r?(x.push(n(u,d,e),n(u,d,r)),a||(x=o(s,x,y,g,v))):f>=e&&x.push(n(u,d,e)):h>r?f<e?(x.push(n(u,d,r),n(u,d,e)),a||(x=o(s,x,y,g,v))):f<=r&&x.push(n(u,d,r)):(x.push(u),f<e?(x.push(n(u,d,e)),a||(x=o(s,x,y,g,v))):f>r&&(x.push(n(u,d,r)),a||(x=o(s,x,y,g,v))));(h=(u=m[_-1])[i])>=e&&h<=r&&x.push(u),p=x[x.length-1],a&&p&&(x[0][0]!==p[0]||x[0][1]!==p[1])&&x.push(x[0]),o(s,x,y,g,v)}return s}function o(t,e,r,i,n){return e.length&&(e.area=r,e.dist=i,void 0!==n&&(e.outer=n),t.push(e)),[]}e.exports=function(t,e,r,o,s,l,u,c){if(r/=e,o/=e,u>=r&&c<=o)return t;if(u>o||c<r)return null;for(var p=[],h=0;h<t.length;h++){var f,d,m=t[h],y=m.geometry,g=m.type;if(f=m.min[s],d=m.max[s],f>=r&&d<=o)p.push(m);else if(!(f>o||d<r)){var v=1===g?i(y,r,o,s):n(y,r,o,s,l,3===g);v.length&&p.push(a(m.tags,g,v,m.id))}}return p.length?p:null};var a=t("./feature")},{"./feature":18}],17:[function(t,e,r){"use strict";function i(t,e,r){if(null!==e.geometry){var a,s,u,c,p=e.geometry,h=p.type,f=p.coordinates,d=e.properties,m=e.id;if("Point"===h)t.push(l(d,1,[o(f)],m));else if("MultiPoint"===h)t.push(l(d,1,n(f),m));else if("LineString"===h)t.push(l(d,2,[n(f,r)],m));else if("MultiLineString"===h||"Polygon"===h){for(u=[],a=0;a<f.length;a++)c=n(f[a],r),"Polygon"===h&&(c.outer=0===a),u.push(c);t.push(l(d,"Polygon"===h?3:2,u,m))}else if("MultiPolygon"===h){for(u=[],a=0;a<f.length;a++)for(s=0;s<f[a].length;s++)(c=n(f[a][s],r)).outer=0===s,u.push(c);t.push(l(d,3,u,m))}else{if("GeometryCollection"!==h)throw new Error("Input data is not a valid GeoJSON object.");for(a=0;a<p.geometries.length;a++)i(t,{geometry:p.geometries[a],properties:d},r)}}}function n(t,e){for(var r=[],i=0;i<t.length;i++)r.push(o(t[i]));return e&&(s(r,e),a(r)),r}function o(t){var e=Math.sin(t[1]*Math.PI/180),r=t[0]/360+.5,i=.5-.25*Math.log((1+e)/(1-e))/Math.PI;return i=i<0?0:i>1?1:i,[r,i,0]}function a(t){for(var e,r,i=0,n=0,o=0;o<t.length-1;o++)e=r||t[o],r=t[o+1],i+=e[0]*r[1]-r[0]*e[1],n+=Math.abs(r[0]-e[0])+Math.abs(r[1]-e[1]);t.area=Math.abs(i/2),t.dist=n}e.exports=function(t,e){var r=[];if("FeatureCollection"===t.type)for(var n=0;n<t.features.length;n++)i(r,t.features[n],e);else"Feature"===t.type?i(r,t,e):i(r,{geometry:t},e);return r};var s=t("./simplify"),l=t("./feature")},{"./feature":18,"./simplify":20}],18:[function(t,e,r){"use strict";function i(t){var e=t.geometry,r=t.min,i=t.max;if(1===t.type)n(r,i,e);else for(var o=0;o<e.length;o++)n(r,i,e[o]);return t}function n(t,e,r){for(var i,n=0;n<r.length;n++)i=r[n],t[0]=Math.min(i[0],t[0]),e[0]=Math.max(i[0],e[0]),t[1]=Math.min(i[1],t[1]),e[1]=Math.max(i[1],e[1])}e.exports=function(t,e,r,n){var o={id:n||null,type:e,geometry:r,tags:t||null,min:[1/0,1/0],max:[-1/0,-1/0]};return i(o),o}},{}],19:[function(t,e,r){"use strict";function i(t,e){var r=(e=this.options=s(Object.create(this.options),e)).debug;r&&console.time("preprocess data");var i=1<<e.maxZoom,n=u(t,e.tolerance/(i*e.extent));this.tiles={},this.tileCoords=[],r&&(console.timeEnd("preprocess data"),console.log("index: maxZoom: %d, maxPoints: %d",e.indexMaxZoom,e.indexMaxPoints),console.time("generate tiles"),this.stats={},this.total=0),(n=h(n,e.buffer/e.extent,o)).length&&this.splitTile(n,0,0,0),r&&(n.length&&console.log("features: %d, points: %d",this.tiles[0].numFeatures,this.tiles[0].numPoints),console.timeEnd("generate tiles"),console.log("tiles generated:",this.total,JSON.stringify(this.stats)))}function n(t,e,r){return 32*((1<<t)*r+e)+t}function o(t,e,r){return[r,(r-t[0])*(e[1]-t[1])/(e[0]-t[0])+t[1],1]}function a(t,e,r){return[(r-t[1])*(e[0]-t[0])/(e[1]-t[1])+t[0],r,1]}function s(t,e){for(var r in e)t[r]=e[r];return t}function l(t,e,r){var i=t.source;if(1!==i.length)return!1;var n=i[0];if(3!==n.type||n.geometry.length>1)return!1;var o=n.geometry[0].length;if(5!==o)return!1;for(var a=0;a<o;a++){var s=c.point(n.geometry[0][a],e,t.z2,t.x,t.y);if(s[0]!==-r&&s[0]!==e+r||s[1]!==-r&&s[1]!==e+r)return!1}return!0}e.exports=function(t,e){return new i(t,e)};var u=t("./convert"),c=t("./transform"),p=t("./clip"),h=t("./wrap"),f=t("./tile");i.prototype.options={maxZoom:14,indexMaxZoom:5,indexMaxPoints:1e5,solidChildren:!1,tolerance:3,extent:4096,buffer:64,debug:0},i.prototype.splitTile=function(t,e,r,i,s,u,c){for(var h=[t,e,r,i],d=this.options,m=d.debug,y=null;h.length;){i=h.pop(),r=h.pop(),e=h.pop(),t=h.pop();var g=1<<e,v=n(e,r,i),_=this.tiles[v],x=e===d.maxZoom?0:d.tolerance/(g*d.extent);if(!_&&(m>1&&console.time("creation"),_=this.tiles[v]=f(t,g,r,i,x,e===d.maxZoom),this.tileCoords.push({z:e,x:r,y:i}),m)){m>1&&(console.log("tile z%d-%d-%d (features: %d, points: %d, simplified: %d)",e,r,i,_.numFeatures,_.numPoints,_.numSimplified),console.timeEnd("creation"));var b="z"+e;this.stats[b]=(this.stats[b]||0)+1,this.total++}if(_.source=t,s){if(e===d.maxZoom||e===s)continue;var w=1<<s-e;if(r!==Math.floor(u/w)||i!==Math.floor(c/w))continue}else if(e===d.indexMaxZoom||_.numPoints<=d.indexMaxPoints)continue;if(d.solidChildren||!l(_,d.extent,d.buffer)){_.source=null,m>1&&console.time("clipping");var z,T,S,A,E,C,k=.5*d.buffer/d.extent,M=.5-k,I=.5+k,P=1+k;z=T=S=A=null,E=p(t,g,r-k,r+I,0,o,_.min[0],_.max[0]),C=p(t,g,r+M,r+P,0,o,_.min[0],_.max[0]),E&&(z=p(E,g,i-k,i+I,1,a,_.min[1],_.max[1]),T=p(E,g,i+M,i+P,1,a,_.min[1],_.max[1])),C&&(S=p(C,g,i-k,i+I,1,a,_.min[1],_.max[1]),A=p(C,g,i+M,i+P,1,a,_.min[1],_.max[1])),m>1&&console.timeEnd("clipping"),t.length&&(h.push(z||[],e+1,2*r,2*i),h.push(T||[],e+1,2*r,2*i+1),h.push(S||[],e+1,2*r+1,2*i),h.push(A||[],e+1,2*r+1,2*i+1))}else s&&(y=e)}return y},i.prototype.getTile=function(t,e,r){var i=this.options,o=i.extent,a=i.debug,s=1<<t,u=n(t,e=(e%s+s)%s,r);if(this.tiles[u])return c.tile(this.tiles[u],o);a>1&&console.log("drilling down to z%d-%d-%d",t,e,r);for(var p,h=t,f=e,d=r;!p&&h>0;)h--,f=Math.floor(f/2),d=Math.floor(d/2),p=this.tiles[n(h,f,d)];if(!p||!p.source)return null;if(a>1&&console.log("found parent tile z%d-%d-%d",h,f,d),l(p,o,i.buffer))return c.tile(p,o);a>1&&console.time("drilling down");var m=this.splitTile(p.source,h,f,d,t,e,r);if(a>1&&console.timeEnd("drilling down"),null!==m){var y=1<<t-m;u=n(m,Math.floor(e/y),Math.floor(r/y))}return this.tiles[u]?c.tile(this.tiles[u],o):null}},{"./clip":16,"./convert":17,"./tile":21,"./transform":22,"./wrap":23}],20:[function(t,e,r){"use strict";function i(t,e,r){var i=e[0],n=e[1],o=r[0],a=r[1],s=t[0],l=t[1],u=o-i,c=a-n;if(0!==u||0!==c){var p=((s-i)*u+(l-n)*c)/(u*u+c*c);p>1?(i=o,n=a):p>0&&(i+=u*p,n+=c*p)}return u=s-i,c=l-n,u*u+c*c}e.exports=function(t,e){var r,n,o,a,s=e*e,l=0,u=t.length-1,c=[];for(t[l][2]=1,t[u][2]=1;u;){for(n=0,r=l+1;r<u;r++)(o=i(t[r],t[l],t[u]))>n&&(a=r,n=o);n>s?(t[a][2]=n,c.push(l),c.push(a),l=a):(u=c.pop(),l=c.pop())}}},{}],21:[function(t,e,r){"use strict";function i(t,e,r,i){var o,a,s,l,u=e.geometry,c=e.type,p=[],h=r*r;if(1===c)for(o=0;o<u.length;o++)p.push(u[o]),t.numPoints++,t.numSimplified++;else for(o=0;o<u.length;o++)if(s=u[o],i||!(2===c&&s.dist<r||3===c&&s.area<h)){var f=[];for(a=0;a<s.length;a++)l=s[a],(i||l[2]>h)&&(f.push(l),t.numSimplified++),t.numPoints++;3===c&&n(f,s.outer),p.push(f)}else t.numPoints+=s.length;if(p.length){var d={geometry:p,type:c,tags:e.tags||null};null!==e.id&&(d.id=e.id),t.features.push(d)}}function n(t,e){o(t)<0===e&&t.reverse()}function o(t){for(var e,r,i=0,n=0,o=t.length,a=o-1;n<o;a=n++)e=t[n],i+=((r=t[a])[0]-e[0])*(e[1]+r[1]);return i}e.exports=function(t,e,r,n,o,a){for(var s={features:[],numPoints:0,numSimplified:0,numFeatures:0,source:null,x:r,y:n,z2:e,transformed:!1,min:[2,1],max:[-1,0]},l=0;l<t.length;l++){s.numFeatures++,i(s,t[l],o,a);var u=t[l].min,c=t[l].max;u[0]<s.min[0]&&(s.min[0]=u[0]),u[1]<s.min[1]&&(s.min[1]=u[1]),c[0]>s.max[0]&&(s.max[0]=c[0]),c[1]>s.max[1]&&(s.max[1]=c[1])}return s}},{}],22:[function(t,e,r){"use strict";function i(t,e,r,i,n){return[Math.round(e*(t[0]*r-i)),Math.round(e*(t[1]*r-n))]}r.tile=function(t,e){if(t.transformed)return t;var r,n,o,a=t.z2,s=t.x,l=t.y;for(r=0;r<t.features.length;r++){var u=t.features[r],c=u.geometry;if(1===u.type)for(n=0;n<c.length;n++)c[n]=i(c[n],e,a,s,l);else for(n=0;n<c.length;n++){var p=c[n];for(o=0;o<p.length;o++)p[o]=i(p[o],e,a,s,l)}}return t.transformed=!0,t},r.point=i},{}],23:[function(t,e,r){"use strict";function i(t,e){for(var r=[],i=0;i<t.length;i++){var o,s=t[i],l=s.type;if(1===l)o=n(s.geometry,e);else{o=[];for(var u=0;u<s.geometry.length;u++)o.push(n(s.geometry[u],e))}r.push(a(s.tags,l,o,s.id))}return r}function n(t,e){var r=[];r.area=t.area,r.dist=t.dist;for(var i=0;i<t.length;i++)r.push([t[i][0]+e,t[i][1],t[i][2]]);return r}var o=t("./clip"),a=t("./feature");e.exports=function(t,e,r){var n=t,a=o(t,1,-1-e,e,0,r,-1,2),s=o(t,1,1-e,2+e,0,r,-1,2);return(a||s)&&(n=o(t,1,-e,1+e,0,r,-1,2)||[],a&&(n=i(a,1).concat(n)),s&&(n=n.concat(i(s,-1)))),n}},{"./clip":16,"./feature":18}],24:[function(t,e,r){"use strict";function i(t,e,r){var i=this.cells=[];if(t instanceof ArrayBuffer){this.arrayBuffer=t;var o=new Int32Array(this.arrayBuffer);t=o[0],e=o[1],r=o[2],this.d=e+2*r;for(var a=0;a<this.d*this.d;a++){var s=o[n+a],l=o[n+a+1];i.push(s===l?null:o.subarray(s,l))}var u=o[n+i.length],c=o[n+i.length+1];this.keys=o.subarray(u,c),this.bboxes=o.subarray(c),this.insert=this._insertReadonly}else{this.d=e+2*r;for(var p=0;p<this.d*this.d;p++)i.push([]);this.keys=[],this.bboxes=[]}this.n=e,this.extent=t,this.padding=r,this.scale=e/t,this.uid=0;var h=r/e*t;this.min=-h,this.max=t+h}e.exports=i;var n=3;i.prototype.insert=function(t,e,r,i,n){this._forEachCell(e,r,i,n,this._insertCell,this.uid++),this.keys.push(t),this.bboxes.push(e),this.bboxes.push(r),this.bboxes.push(i),this.bboxes.push(n)},i.prototype._insertReadonly=function(){throw"Cannot insert into a GridIndex created from an ArrayBuffer."},i.prototype._insertCell=function(t,e,r,i,n,o){this.cells[n].push(o)},i.prototype.query=function(t,e,r,i){var n=this.min,o=this.max;if(t<=n&&e<=n&&o<=r&&o<=i)return Array.prototype.slice.call(this.keys);var a=[],s={};return this._forEachCell(t,e,r,i,this._queryCell,a,s),a},i.prototype._queryCell=function(t,e,r,i,n,o,a){var s=this.cells[n];if(null!==s)for(var l=this.keys,u=this.bboxes,c=0;c<s.length;c++){var p=s[c];if(void 0===a[p]){var h=4*p;t<=u[h+2]&&e<=u[h+3]&&r>=u[h+0]&&i>=u[h+1]?(a[p]=!0,o.push(l[p])):a[p]=!1}}},i.prototype._forEachCell=function(t,e,r,i,n,o,a){for(var s=this._convertToCellCoord(t),l=this._convertToCellCoord(e),u=this._convertToCellCoord(r),c=this._convertToCellCoord(i),p=s;p<=u;p++)for(var h=l;h<=c;h++){var f=this.d*h+p;if(n.call(this,t,e,r,i,f,o,a))return}},i.prototype._convertToCellCoord=function(t){return Math.max(0,Math.min(this.d-1,Math.floor(t*this.scale)+this.padding))},i.prototype.toArrayBuffer=function(){if(this.arrayBuffer)return this.arrayBuffer;for(var t=this.cells,e=n+this.cells.length+1+1,r=0,i=0;i<this.cells.length;i++)r+=this.cells[i].length;var o=new Int32Array(e+r+this.keys.length+this.bboxes.length);o[0]=this.extent,o[1]=this.n,o[2]=this.padding;for(var a=e,s=0;s<t.length;s++){var l=t[s];o[n+s]=a,o.set(l,a),a+=l.length}return o[n+t.length]=a,o.set(this.keys,a),a+=this.keys.length,o[n+t.length+1]=a,o.set(this.bboxes,a),a+=this.bboxes.length,o.buffer}},{}],25:[function(t,e,r){r.read=function(t,e,r,i,n){var o,a,s=8*n-i-1,l=(1<<s)-1,u=l>>1,c=-7,p=r?n-1:0,h=r?-1:1,f=t[e+p];for(p+=h,o=f&(1<<-c)-1,f>>=-c,c+=s;c>0;o=256*o+t[e+p],p+=h,c-=8);for(a=o&(1<<-c)-1,o>>=-c,c+=i;c>0;a=256*a+t[e+p],p+=h,c-=8);if(0===o)o=1-u;else{if(o===l)return a?NaN:1/0*(f?-1:1);a+=Math.pow(2,i),o-=u}return(f?-1:1)*a*Math.pow(2,o-i)},r.write=function(t,e,r,i,n,o){var a,s,l,u=8*o-n-1,c=(1<<u)-1,p=c>>1,h=23===n?Math.pow(2,-24)-Math.pow(2,-77):0,f=i?0:o-1,d=i?1:-1,m=e<0||0===e&&1/e<0?1:0;for(e=Math.abs(e),isNaN(e)||e===1/0?(s=isNaN(e)?1:0,a=c):(a=Math.floor(Math.log(e)/Math.LN2),e*(l=Math.pow(2,-a))<1&&(a--,l*=2),(e+=a+p>=1?h/l:h*Math.pow(2,1-p))*l>=2&&(a++,l/=2),a+p>=c?(s=0,a=c):a+p>=1?(s=(e*l-1)*Math.pow(2,n),a+=p):(s=e*Math.pow(2,p-1)*Math.pow(2,n),a=0));n>=8;t[r+f]=255&s,f+=d,s/=256,n-=8);for(a=a<<n|s,u+=n;u>0;t[r+f]=255&a,f+=d,a/=256,u-=8);t[r+f-d]|=128*m}},{}],26:[function(t,e,r){"use strict";function i(t,e,r,i,s){e=e||n,r=r||o,s=s||Array,this.nodeSize=i||64,this.points=t,this.ids=new s(t.length),this.coords=new s(2*t.length);for(var l=0;l<t.length;l++)this.ids[l]=l,this.coords[2*l]=e(t[l]),this.coords[2*l+1]=r(t[l]);a(this.ids,this.coords,this.nodeSize,0,this.ids.length-1,0)}function n(t){return t[0]}function o(t){return t[1]}var a=t("./sort"),s=t("./range"),l=t("./within");e.exports=function(t,e,r,n,o){return new i(t,e,r,n,o)},i.prototype={range:function(t,e,r,i){return s(this.ids,this.coords,t,e,r,i,this.nodeSize)},within:function(t,e,r){return l(this.ids,this.coords,t,e,r,this.nodeSize)}}},{"./range":27,"./sort":28,"./within":29}],27:[function(t,e,r){"use strict";e.exports=function(t,e,r,i,n,o,a){for(var s,l,u=[0,t.length-1,0],c=[];u.length;){var p=u.pop(),h=u.pop(),f=u.pop();if(h-f<=a)for(var d=f;d<=h;d++)s=e[2*d],l=e[2*d+1],s>=r&&s<=n&&l>=i&&l<=o&&c.push(t[d]);else{var m=Math.floor((f+h)/2);s=e[2*m],l=e[2*m+1],s>=r&&s<=n&&l>=i&&l<=o&&c.push(t[m]);var y=(p+1)%2;(0===p?r<=s:i<=l)&&(u.push(f),u.push(m-1),u.push(y)),(0===p?n>=s:o>=l)&&(u.push(m+1),u.push(h),u.push(y))}}return c}},{}],28:[function(t,e,r){"use strict";function i(t,e,r,o,a,s){if(!(a-o<=r)){var l=Math.floor((o+a)/2);n(t,e,l,o,a,s%2),i(t,e,r,o,l-1,s+1),i(t,e,r,l+1,a,s+1)}}function n(t,e,r,i,a,s){for(;a>i;){if(a-i>600){var l=a-i+1,u=r-i+1,c=Math.log(l),p=.5*Math.exp(2*c/3),h=.5*Math.sqrt(c*p*(l-p)/l)*(u-l/2<0?-1:1);n(t,e,r,Math.max(i,Math.floor(r-u*p/l+h)),Math.min(a,Math.floor(r+(l-u)*p/l+h)),s)}var f=e[2*r+s],d=i,m=a;for(o(t,e,i,r),e[2*a+s]>f&&o(t,e,i,a);d<m;){for(o(t,e,d,m),d++,m--;e[2*d+s]<f;)d++;for(;e[2*m+s]>f;)m--}e[2*i+s]===f?o(t,e,i,m):o(t,e,++m,a),m<=r&&(i=m+1),r<=m&&(a=m-1)}}function o(t,e,r,i){a(t,r,i),a(e,2*r,2*i),a(e,2*r+1,2*i+1)}function a(t,e,r){var i=t[e];t[e]=t[r],t[r]=i}e.exports=i},{}],29:[function(t,e,r){"use strict";function i(t,e,r,i){var n=t-r,o=e-i;return n*n+o*o}e.exports=function(t,e,r,n,o,a){for(var s=[0,t.length-1,0],l=[],u=o*o;s.length;){var c=s.pop(),p=s.pop(),h=s.pop();if(p-h<=a)for(var f=h;f<=p;f++)i(e[2*f],e[2*f+1],r,n)<=u&&l.push(t[f]);else{var d=Math.floor((h+p)/2),m=e[2*d],y=e[2*d+1];i(m,y,r,n)<=u&&l.push(t[d]);var g=(c+1)%2;(0===c?r-o<=m:n-o<=y)&&(s.push(h),s.push(d-1),s.push(g)),(0===c?r+o>=m:n+o>=y)&&(s.push(d+1),s.push(p),s.push(g))}}return l}},{}],30:[function(t,e,r){function i(t){return!!t&&"object"==typeof t}function n(t,e){for(var r=-1,i=t.length;++r<i;)if(e(t[r],r,t))return!0;return!1}function o(t,e,r,n,s,l){return t===e||(null==t||null==e||!c(t)&&!i(e)?t!==t&&e!==e:a(t,e,o,r,n,s,l))}function a(t,e,r,i,n,o,a){var c=p(t),f=p(e),y=m,g=m;c||((y=S.call(t))==d?y=x:y!=x&&(c=h(t))),f||((g=S.call(e))==d?g=x:g!=x&&(f=h(e)));var v=y==x,_=g==x,b=y==g;if(b&&!c&&!v)return l(t,e,y);if(!n){var w=v&&T.call(t,"__wrapped__"),z=_&&T.call(e,"__wrapped__");if(w||z)return r(w?t.value():t,z?e.value():e,i,n,o,a)}if(!b)return!1;o||(o=[]),a||(a=[]);for(var A=o.length;A--;)if(o[A]==t)return a[A]==e;o.push(t),a.push(e);var E=(c?s:u)(t,e,r,i,n,o,a);return o.pop(),a.pop(),E}function s(t,e,r,i,o,a,s){var l=-1,u=t.length,c=e.length;if(u!=c&&!(o&&c>u))return!1;for(;++l<u;){var p=t[l],h=e[l],f=i?i(o?h:p,o?p:h,l):void 0;if(void 0!==f){if(f)continue;return!1}if(o){if(!n(e,function(t){return p===t||r(p,t,i,o,a,s)}))return!1}else if(p!==h&&!r(p,h,i,o,a,s))return!1}return!0}function l(t,e,r){switch(r){case y:case g:return+t==+e;case v:return t.name==e.name&&t.message==e.message;case _:return t!=+t?e!=+e:t==+e;case b:case w:return t==e+""}return!1}function u(t,e,r,i,n,o,a){var s=f(t),l=s.length;if(l!=f(e).length&&!n)return!1;for(var u=l;u--;){var c=s[u];if(!(n?c in e:T.call(e,c)))return!1}for(var p=n;++u<l;){var h=t[c=s[u]],d=e[c],m=i?i(n?d:h,n?h:d,c):void 0;if(!(void 0===m?r(h,d,i,n,o,a):m))return!1;p||(p="constructor"==c)}if(!p){var y=t.constructor,g=e.constructor;if(y!=g&&"constructor"in t&&"constructor"in e&&!("function"==typeof y&&y instanceof y&&"function"==typeof g&&g instanceof g))return!1}return!0}function c(t){var e=typeof t;return!!t&&("object"==e||"function"==e)}var p=t("lodash.isarray"),h=t("lodash.istypedarray"),f=t("lodash.keys"),d="[object Arguments]",m="[object Array]",y="[object Boolean]",g="[object Date]",v="[object Error]",_="[object Number]",x="[object Object]",b="[object RegExp]",w="[object String]",z=Object.prototype,T=z.hasOwnProperty,S=z.toString;e.exports=o},{"lodash.isarray":34,"lodash.istypedarray":36,"lodash.keys":37}],31:[function(t,e,r){function i(t){return t}e.exports=function(t,e,r){if("function"!=typeof t)return i;if(void 0===e)return t;switch(r){case 1:return function(r){return t.call(e,r)};case 3:return function(r,i,n){return t.call(e,r,i,n)};case 4:return function(r,i,n,o){return t.call(e,r,i,n,o)};case 5:return function(r,i,n,o,a){return t.call(e,r,i,n,o,a)}}return function(){return t.apply(e,arguments)}}},{}],32:[function(t,e,r){function i(t){return!!t&&"object"==typeof t}function n(t){return o(t)&&h.call(t)==s}function o(t){var e=typeof t;return!!t&&("object"==e||"function"==e)}function a(t){return null!=t&&(n(t)?f.test(c.call(t)):i(t)&&l.test(t))}var s="[object Function]",l=/^\[object .+?Constructor\]$/,u=Object.prototype,c=Function.prototype.toString,p=u.hasOwnProperty,h=u.toString,f=RegExp("^"+c.call(p).replace(/[\\^$.*+?()[\]{}|]/g,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$");e.exports=function(t,e){var r=null==t?void 0:t[e];return a(r)?r:void 0}},{}],33:[function(t,e,r){function i(t){return null!=t&&a(t.length)&&!o(t)}function n(t){return l(t)&&i(t)}function o(t){var e=s(t)?m.call(t):"";return e==p||e==h}function a(t){return"number"==typeof t&&t>-1&&t%1==0&&t<=u}function s(t){var e=typeof t;return!!t&&("object"==e||"function"==e)}function l(t){return!!t&&"object"==typeof t}var u=9007199254740991,c="[object Arguments]",p="[object Function]",h="[object GeneratorFunction]",f=Object.prototype,d=f.hasOwnProperty,m=f.toString,y=f.propertyIsEnumerable;e.exports=function(t){return n(t)&&d.call(t,"callee")&&(!y.call(t,"callee")||m.call(t)==c)}},{}],34:[function(t,e,r){function i(t){return!!t&&"object"==typeof t}function n(t){return"number"==typeof t&&t>-1&&t%1==0&&t<=m}function o(t){return a(t)&&f.call(t)==l}function a(t){var e=typeof t;return!!t&&("object"==e||"function"==e)}function s(t){return null!=t&&(o(t)?d.test(p.call(t)):i(t)&&u.test(t))}var l="[object Function]",u=/^\[object .+?Constructor\]$/,c=Object.prototype,p=Function.prototype.toString,h=c.hasOwnProperty,f=c.toString,d=RegExp("^"+p.call(h).replace(/[\\^$.*+?()[\]{}|]/g,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$"),m=9007199254740991,y=function(t,e){var r=null==t?void 0:t[e];return s(r)?r:void 0}(Array,"isArray")||function(t){return i(t)&&n(t.length)&&"[object Array]"==f.call(t)};e.exports=y},{}],35:[function(t,e,r){var i=t("lodash._baseisequal"),n=t("lodash._bindcallback");e.exports=function(t,e,r,o){var a=(r="function"==typeof r?n(r,o,3):void 0)?r(t,e):void 0;return void 0===a?i(t,e,r):!!a}},{"lodash._baseisequal":30,"lodash._bindcallback":31}],36:[function(t,e,r){function i(t){return"number"==typeof t&&t>-1&&t%1==0&&t<=o}function n(t){return!!t&&"object"==typeof t}var o=9007199254740991,a={};a["[object Float32Array]"]=a["[object Float64Array]"]=a["[object Int8Array]"]=a["[object Int16Array]"]=a["[object Int32Array]"]=a["[object Uint8Array]"]=a["[object Uint8ClampedArray]"]=a["[object Uint16Array]"]=a["[object Uint32Array]"]=!0,a["[object Arguments]"]=a["[object Array]"]=a["[object ArrayBuffer]"]=a["[object Boolean]"]=a["[object DataView]"]=a["[object Date]"]=a["[object Error]"]=a["[object Function]"]=a["[object Map]"]=a["[object Number]"]=a["[object Object]"]=a["[object RegExp]"]=a["[object Set]"]=a["[object String]"]=a["[object WeakMap]"]=!1;var s=Object.prototype.toString;e.exports=function(t){return n(t)&&i(t.length)&&!!a[s.call(t)]}},{}],37:[function(t,e,r){function i(t){return null!=t&&o(y(t))}function n(t,e){return t="number"==typeof t||h.test(t)?+t:-1,e=null==e?m:e,t>-1&&t%1==0&&t<e}function o(t){return"number"==typeof t&&t>-1&&t%1==0&&t<=m}function a(t){for(var e=l(t),r=e.length,i=r&&t.length,a=!!i&&o(i)&&(p(t)||c(t)),s=-1,u=[];++s<r;){var h=e[s];(a&&n(h,i)||f.call(t,h))&&u.push(h)}return u}function s(t){var e=typeof t;return!!t&&("object"==e||"function"==e)}function l(t){if(null==t)return[];s(t)||(t=Object(t));var e=t.length;e=e&&o(e)&&(p(t)||c(t))&&e||0;for(var r=t.constructor,i=-1,a="function"==typeof r&&r.prototype===t,l=Array(e),u=e>0;++i<e;)l[i]=i+"";for(var h in t)u&&n(h,e)||"constructor"==h&&(a||!f.call(t,h))||l.push(h);return l}var u=t("lodash._getnative"),c=t("lodash.isarguments"),p=t("lodash.isarray"),h=/^\d+$/,f=Object.prototype.hasOwnProperty,d=u(Object,"keys"),m=9007199254740991,y=function(t){return function(e){return null==e?void 0:e[t]}}("length"),g=d?function(t){var e=null==t?void 0:t.constructor;return"function"==typeof e&&e.prototype===t||"function"!=typeof t&&i(t)?a(t):s(t)?d(t):[]}:a;e.exports=g},{"lodash._getnative":32,"lodash.isarguments":33,"lodash.isarray":34}],38:[function(t,e,r){"use strict";function i(t){return!!(n()&&o()&&a()&&s()&&l()&&u()&&c()&&p(t&&t.failIfMajorPerformanceCaveat))}function n(){return"undefined"!=typeof window&&"undefined"!=typeof document}function o(){return Array.prototype&&Array.prototype.every&&Array.prototype.filter&&Array.prototype.forEach&&Array.prototype.indexOf&&Array.prototype.lastIndexOf&&Array.prototype.map&&Array.prototype.some&&Array.prototype.reduce&&Array.prototype.reduceRight&&Array.isArray}function a(){return Function.prototype&&Function.prototype.bind}function s(){return Object.keys&&Object.create&&Object.getPrototypeOf&&Object.getOwnPropertyNames&&Object.isSealed&&Object.isFrozen&&Object.isExtensible&&Object.getOwnPropertyDescriptor&&Object.defineProperty&&Object.defineProperties&&Object.seal&&Object.freeze&&Object.preventExtensions}function l(){return"JSON"in window&&"parse"in JSON&&"stringify"in JSON}function u(){return"Worker"in window}function c(){return"Uint8ClampedArray"in window}function p(t){return void 0===f[t]&&(f[t]=h(t)),f[t]}function h(t){var e=document.createElement("canvas"),r=Object.create(i.webGLContextAttributes);return r.failIfMajorPerformanceCaveat=t,e.probablySupportsContext?e.probablySupportsContext("webgl",r)||e.probablySupportsContext("experimental-webgl",r):e.supportsContext?e.supportsContext("webgl",r)||e.supportsContext("experimental-webgl",r):e.getContext("webgl",r)||e.getContext("experimental-webgl",r)}void 0!==e&&e.exports?e.exports=i:window&&(window.mapboxgl=window.mapboxgl||{},window.mapboxgl.supported=i);var f={};i.webGLContextAttributes={antialias:!1,alpha:!0,stencil:!0,depth:!0}},{}],39:[function(t,e,r){"use strict";function i(t){this.buf=ArrayBuffer.isView&&ArrayBuffer.isView(t)?t:new Uint8Array(t||0),this.pos=0,this.type=0,this.length=this.buf.length}function n(t,e,r){var i,n,o=r.buf;if(n=o[r.pos++],i=(112&n)>>4,n<128)return a(t,i,e);if(n=o[r.pos++],i|=(127&n)<<3,n<128)return a(t,i,e);if(n=o[r.pos++],i|=(127&n)<<10,n<128)return a(t,i,e);if(n=o[r.pos++],i|=(127&n)<<17,n<128)return a(t,i,e);if(n=o[r.pos++],i|=(127&n)<<24,n<128)return a(t,i,e);if(n=o[r.pos++],i|=(1&n)<<31,n<128)return a(t,i,e);throw new Error("Expected varint not more than 10 bytes")}function o(t){return t.type===i.Bytes?t.readVarint()+t.pos:t.pos+1}function a(t,e,r){return r?4294967296*e+(t>>>0):4294967296*(e>>>0)+(t>>>0)}function s(t,e){var r,i;if(t>=0?(r=t%4294967296|0,i=t/4294967296|0):(i=~(-t/4294967296),4294967295^(r=~(-t%4294967296))?r=r+1|0:(r=0,i=i+1|0)),t>=0x10000000000000000||t<-0x10000000000000000)throw new Error("Given varint doesn't fit into 10 bytes");e.realloc(10),l(r,i,e),u(i,e)}function l(t,e,r){r.buf[r.pos++]=127&t|128,t>>>=7,r.buf[r.pos++]=127&t|128,t>>>=7,r.buf[r.pos++]=127&t|128,t>>>=7,r.buf[r.pos++]=127&t|128,t>>>=7,r.buf[r.pos]=127&t}function u(t,e){var r=(7&t)<<4;e.buf[e.pos++]|=r|((t>>>=3)?128:0),t&&(e.buf[e.pos++]=127&t|((t>>>=7)?128:0),t&&(e.buf[e.pos++]=127&t|((t>>>=7)?128:0),t&&(e.buf[e.pos++]=127&t|((t>>>=7)?128:0),t&&(e.buf[e.pos++]=127&t|((t>>>=7)?128:0),t&&(e.buf[e.pos++]=127&t)))))}function c(t,e,r){var i=e<=16383?1:e<=2097151?2:e<=268435455?3:Math.ceil(Math.log(e)/(7*Math.LN2));r.realloc(i);for(var n=r.pos-1;n>=t;n--)r.buf[n+i]=r.buf[n]}function p(t,e){for(var r=0;r<t.length;r++)e.writeVarint(t[r])}function h(t,e){for(var r=0;r<t.length;r++)e.writeSVarint(t[r])}function f(t,e){for(var r=0;r<t.length;r++)e.writeFloat(t[r])}function d(t,e){for(var r=0;r<t.length;r++)e.writeDouble(t[r])}function m(t,e){for(var r=0;r<t.length;r++)e.writeBoolean(t[r])}function y(t,e){for(var r=0;r<t.length;r++)e.writeFixed32(t[r])}function g(t,e){for(var r=0;r<t.length;r++)e.writeSFixed32(t[r])}function v(t,e){for(var r=0;r<t.length;r++)e.writeFixed64(t[r])}function _(t,e){for(var r=0;r<t.length;r++)e.writeSFixed64(t[r])}function x(t,e){return(t[e]|t[e+1]<<8|t[e+2]<<16)+16777216*t[e+3]}function b(t,e,r){t[r]=e,t[r+1]=e>>>8,t[r+2]=e>>>16,t[r+3]=e>>>24}function w(t,e){return(t[e]|t[e+1]<<8|t[e+2]<<16)+(t[e+3]<<24)}function z(t,e,r){for(var i="",n=e;n<r;){var o=t[n],a=null,s=o>239?4:o>223?3:o>191?2:1;if(n+s>r)break;var l,u,c;1===s?o<128&&(a=o):2===s?128==(192&(l=t[n+1]))&&(a=(31&o)<<6|63&l)<=127&&(a=null):3===s?(l=t[n+1],u=t[n+2],128==(192&l)&&128==(192&u)&&((a=(15&o)<<12|(63&l)<<6|63&u)<=2047||a>=55296&&a<=57343)&&(a=null)):4===s&&(l=t[n+1],u=t[n+2],c=t[n+3],128==(192&l)&&128==(192&u)&&128==(192&c)&&((a=(15&o)<<18|(63&l)<<12|(63&u)<<6|63&c)<=65535||a>=1114112)&&(a=null)),null===a?(a=65533,s=1):a>65535&&(a-=65536,i+=String.fromCharCode(a>>>10&1023|55296),a=56320|1023&a),i+=String.fromCharCode(a),n+=s}return i}function T(t,e,r){for(var i,n,o=0;o<e.length;o++){if((i=e.charCodeAt(o))>55295&&i<57344){if(!n){i>56319||o+1===e.length?(t[r++]=239,t[r++]=191,t[r++]=189):n=i;continue}if(i<56320){t[r++]=239,t[r++]=191,t[r++]=189,n=i;continue}i=n-55296<<10|i-56320|65536,n=null}else n&&(t[r++]=239,t[r++]=191,t[r++]=189,n=null);i<128?t[r++]=i:(i<2048?t[r++]=i>>6|192:(i<65536?t[r++]=i>>12|224:(t[r++]=i>>18|240,t[r++]=i>>12&63|128),t[r++]=i>>6&63|128),t[r++]=63&i|128)}return r}e.exports=i;var S=t("ieee754");i.Varint=0,i.Fixed64=1,i.Bytes=2,i.Fixed32=5;i.prototype={destroy:function(){this.buf=null},readFields:function(t,e,r){for(r=r||this.length;this.pos<r;){var i=this.readVarint(),n=i>>3,o=this.pos;this.type=7&i,t(n,e,this),this.pos===o&&this.skip(i)}return e},readMessage:function(t,e){return this.readFields(t,e,this.readVarint()+this.pos)},readFixed32:function(){var t=x(this.buf,this.pos);return this.pos+=4,t},readSFixed32:function(){var t=w(this.buf,this.pos);return this.pos+=4,t},readFixed64:function(){var t=x(this.buf,this.pos)+4294967296*x(this.buf,this.pos+4);return this.pos+=8,t},readSFixed64:function(){var t=x(this.buf,this.pos)+4294967296*w(this.buf,this.pos+4);return this.pos+=8,t},readFloat:function(){var t=S.read(this.buf,this.pos,!0,23,4);return this.pos+=4,t},readDouble:function(){var t=S.read(this.buf,this.pos,!0,52,8);return this.pos+=8,t},readVarint:function(t){var e,r,i=this.buf;return r=i[this.pos++],e=127&r,r<128?e:(r=i[this.pos++],e|=(127&r)<<7,r<128?e:(r=i[this.pos++],e|=(127&r)<<14,r<128?e:(r=i[this.pos++],e|=(127&r)<<21,r<128?e:(r=i[this.pos],e|=(15&r)<<28,n(e,t,this)))))},readVarint64:function(){return this.readVarint(!0)},readSVarint:function(){var t=this.readVarint();return t%2==1?(t+1)/-2:t/2},readBoolean:function(){return Boolean(this.readVarint())},readString:function(){var t=this.readVarint()+this.pos,e=z(this.buf,this.pos,t);return this.pos=t,e},readBytes:function(){var t=this.readVarint()+this.pos,e=this.buf.subarray(this.pos,t);return this.pos=t,e},readPackedVarint:function(t,e){var r=o(this);for(t=t||[];this.pos<r;)t.push(this.readVarint(e));return t},readPackedSVarint:function(t){var e=o(this);for(t=t||[];this.pos<e;)t.push(this.readSVarint());return t},readPackedBoolean:function(t){var e=o(this);for(t=t||[];this.pos<e;)t.push(this.readBoolean());return t},readPackedFloat:function(t){var e=o(this);for(t=t||[];this.pos<e;)t.push(this.readFloat());return t},readPackedDouble:function(t){var e=o(this);for(t=t||[];this.pos<e;)t.push(this.readDouble());return t},readPackedFixed32:function(t){var e=o(this);for(t=t||[];this.pos<e;)t.push(this.readFixed32());return t},readPackedSFixed32:function(t){var e=o(this);for(t=t||[];this.pos<e;)t.push(this.readSFixed32());return t},readPackedFixed64:function(t){var e=o(this);for(t=t||[];this.pos<e;)t.push(this.readFixed64());return t},readPackedSFixed64:function(t){var e=o(this);for(t=t||[];this.pos<e;)t.push(this.readSFixed64());return t},skip:function(t){var e=7&t;if(e===i.Varint)for(;this.buf[this.pos++]>127;);else if(e===i.Bytes)this.pos=this.readVarint()+this.pos;else if(e===i.Fixed32)this.pos+=4;else{if(e!==i.Fixed64)throw new Error("Unimplemented type: "+e);this.pos+=8}},writeTag:function(t,e){this.writeVarint(t<<3|e)},realloc:function(t){for(var e=this.length||16;e<this.pos+t;)e*=2;if(e!==this.length){var r=new Uint8Array(e);r.set(this.buf),this.buf=r,this.length=e}},finish:function(){return this.length=this.pos,this.pos=0,this.buf.subarray(0,this.length)},writeFixed32:function(t){this.realloc(4),b(this.buf,t,this.pos),this.pos+=4},writeSFixed32:function(t){this.realloc(4),b(this.buf,t,this.pos),this.pos+=4},writeFixed64:function(t){this.realloc(8),b(this.buf,-1&t,this.pos),b(this.buf,Math.floor(t*(1/4294967296)),this.pos+4),this.pos+=8},writeSFixed64:function(t){this.realloc(8),b(this.buf,-1&t,this.pos),b(this.buf,Math.floor(t*(1/4294967296)),this.pos+4),this.pos+=8},writeVarint:function(t){(t=+t||0)>268435455||t<0?s(t,this):(this.realloc(4),this.buf[this.pos++]=127&t|(t>127?128:0),t<=127||(this.buf[this.pos++]=127&(t>>>=7)|(t>127?128:0),t<=127||(this.buf[this.pos++]=127&(t>>>=7)|(t>127?128:0),t<=127||(this.buf[this.pos++]=t>>>7&127))))},writeSVarint:function(t){this.writeVarint(t<0?2*-t-1:2*t)},writeBoolean:function(t){this.writeVarint(Boolean(t))},writeString:function(t){t=String(t),this.realloc(4*t.length);var e=++this.pos;this.pos=T(this.buf,t,this.pos);var r=this.pos-e;r>=128&&c(e,r,this),this.pos=e-1,this.writeVarint(r),this.pos+=r},writeFloat:function(t){this.realloc(4),S.write(this.buf,t,this.pos,!0,23,4),this.pos+=4},writeDouble:function(t){this.realloc(8),S.write(this.buf,t,this.pos,!0,52,8),this.pos+=8},writeBytes:function(t){var e=t.length;this.writeVarint(e),this.realloc(e);for(var r=0;r<e;r++)this.buf[this.pos++]=t[r]},writeRawMessage:function(t,e){var r=++this.pos;t(e,this);var i=this.pos-r;i>=128&&c(r,i,this),this.pos=r-1,this.writeVarint(i),this.pos+=i},writeMessage:function(t,e,r){this.writeTag(t,i.Bytes),this.writeRawMessage(e,r)},writePackedVarint:function(t,e){this.writeMessage(t,p,e)},writePackedSVarint:function(t,e){this.writeMessage(t,h,e)},writePackedBoolean:function(t,e){this.writeMessage(t,m,e)},writePackedFloat:function(t,e){this.writeMessage(t,f,e)},writePackedDouble:function(t,e){this.writeMessage(t,d,e)},writePackedFixed32:function(t,e){this.writeMessage(t,y,e)},writePackedSFixed32:function(t,e){this.writeMessage(t,g,e)},writePackedFixed64:function(t,e){this.writeMessage(t,v,e)},writePackedSFixed64:function(t,e){this.writeMessage(t,_,e)},writeBytesField:function(t,e){this.writeTag(t,i.Bytes),this.writeBytes(e)},writeFixed32Field:function(t,e){this.writeTag(t,i.Fixed32),this.writeFixed32(e)},writeSFixed32Field:function(t,e){this.writeTag(t,i.Fixed32),this.writeSFixed32(e)},writeFixed64Field:function(t,e){this.writeTag(t,i.Fixed64),this.writeFixed64(e)},writeSFixed64Field:function(t,e){this.writeTag(t,i.Fixed64),this.writeSFixed64(e)},writeVarintField:function(t,e){this.writeTag(t,i.Varint),this.writeVarint(e)},writeSVarintField:function(t,e){this.writeTag(t,i.Varint),this.writeSVarint(e)},writeStringField:function(t,e){this.writeTag(t,i.Bytes),this.writeString(e)},writeFloatField:function(t,e){this.writeTag(t,i.Fixed32),this.writeFloat(e)},writeDoubleField:function(t,e){this.writeTag(t,i.Fixed64),this.writeDouble(e)},writeBooleanField:function(t,e){this.writeVarintField(t,Boolean(e))}}},{ieee754:25}],40:[function(t,e,r){function i(){throw new Error("setTimeout has not been defined")}function n(){throw new Error("clearTimeout has not been defined")}function o(t){if(p===setTimeout)return setTimeout(t,0);if((p===i||!p)&&setTimeout)return p=setTimeout,setTimeout(t,0);try{return p(t,0)}catch(e){try{return p.call(null,t,0)}catch(e){return p.call(this,t,0)}}}function a(t){if(h===clearTimeout)return clearTimeout(t);if((h===n||!h)&&clearTimeout)return h=clearTimeout,clearTimeout(t);try{return h(t)}catch(e){try{return h.call(null,t)}catch(e){return h.call(this,t)}}}function s(){y&&d&&(y=!1,d.length?m=d.concat(m):g=-1,m.length&&l())}function l(){if(!y){var t=o(s);y=!0;for(var e=m.length;e;){for(d=m,m=[];++g<e;)d&&d[g].run();g=-1,e=m.length}d=null,y=!1,a(t)}}function u(t,e){this.fun=t,this.array=e}function c(){}var p,h,f=e.exports={};!function(){try{p="function"==typeof setTimeout?setTimeout:i}catch(t){p=i}try{h="function"==typeof clearTimeout?clearTimeout:n}catch(t){h=n}}();var d,m=[],y=!1,g=-1;f.nextTick=function(t){var e=new Array(arguments.length-1);if(arguments.length>1)for(var r=1;r<arguments.length;r++)e[r-1]=arguments[r];m.push(new u(t,e)),1!==m.length||y||o(l)},u.prototype.run=function(){this.fun.apply(null,this.array)},f.title="browser",f.browser=!0,f.env={},f.argv=[],f.version="",f.versions={},f.on=c,f.addListener=c,f.once=c,f.off=c,f.removeListener=c,f.removeAllListeners=c,f.emit=c,f.prependListener=c,f.prependOnceListener=c,f.listeners=function(t){return[]},f.binding=function(t){throw new Error("process.binding is not supported")},f.cwd=function(){return"/"},f.chdir=function(t){throw new Error("process.chdir is not supported")},f.umask=function(){return 0}},{}],41:[function(t,e,r){"use strict";function i(t,e,r,a,s){for(r=r||0,a=a||t.length-1,s=s||o;a>r;){if(a-r>600){var l=a-r+1,u=e-r+1,c=Math.log(l),p=.5*Math.exp(2*c/3),h=.5*Math.sqrt(c*p*(l-p)/l)*(u-l/2<0?-1:1);i(t,e,Math.max(r,Math.floor(e-u*p/l+h)),Math.min(a,Math.floor(e+(l-u)*p/l+h)),s)}var f=t[e],d=r,m=a;for(n(t,r,e),s(t[a],f)>0&&n(t,r,a);d<m;){for(n(t,d,m),d++,m--;s(t[d],f)<0;)d++;for(;s(t[m],f)>0;)m--}0===s(t[r],f)?n(t,r,m):n(t,++m,a),m<=e&&(r=m+1),e<=m&&(a=m-1)}}function n(t,e,r){var i=t[e];t[e]=t[r],t[r]=i}function o(t,e){return t<e?-1:t>e?1:0}e.exports=i},{}],42:[function(t,e,r){"use strict";function i(t){this.options=h(Object.create(this.options),t),this.trees=new Array(this.options.maxZoom+1)}function n(t,e,r,i,n){return{x:t,y:e,zoom:1/0,id:i,properties:n,parentId:-1,numPoints:r}}function o(t,e){var r=t.geometry.coordinates;return{x:l(r[0]),y:u(r[1]),zoom:1/0,id:e,parentId:-1}}function a(t){return{type:"Feature",properties:s(t),geometry:{type:"Point",coordinates:[c(t.x),p(t.y)]}}}function s(t){var e=t.numPoints,r=e>=1e4?Math.round(e/1e3)+"k":e>=1e3?Math.round(e/100)/10+"k":e;return h(h({},t.properties),{cluster:!0,cluster_id:t.id,point_count:e,point_count_abbreviated:r})}function l(t){return t/360+.5}function u(t){var e=Math.sin(t*Math.PI/180),r=.5-.25*Math.log((1+e)/(1-e))/Math.PI;return r<0?0:r>1?1:r}function c(t){return 360*(t-.5)}function p(t){var e=(180-360*t)*Math.PI/180;return 360*Math.atan(Math.exp(e))/Math.PI-90}function h(t,e){for(var r in e)t[r]=e[r];return t}function f(t){return t.x}function d(t){return t.y}var m=t("kdbush");e.exports=function(t){return new i(t)},i.prototype={options:{minZoom:0,maxZoom:16,radius:40,extent:512,nodeSize:64,log:!1,reduce:null,initial:function(){return{}},map:function(t){return t}},load:function(t){var e=this.options.log;e&&console.time("total time");var r="prepare "+t.length+" points";e&&console.time(r),this.points=t;var i=t.map(o);e&&console.timeEnd(r);for(var n=this.options.maxZoom;n>=this.options.minZoom;n--){var a=+Date.now();this.trees[n+1]=m(i,f,d,this.options.nodeSize,Float32Array),i=this._cluster(i,n),e&&console.log("z%d: %d clusters in %dms",n,i.length,+Date.now()-a)}return this.trees[this.options.minZoom]=m(i,f,d,this.options.nodeSize,Float32Array),e&&console.timeEnd("total time"),this},getClusters:function(t,e){for(var r=this.trees[this._limitZoom(e)],i=r.range(l(t[0]),u(t[3]),l(t[2]),u(t[1])),n=[],o=0;o<i.length;o++){var s=r.points[i[o]];n.push(s.numPoints?a(s):this.points[s.id])}return n},getChildren:function(t,e){for(var r=this.trees[e+1].points[t],i=this.options.radius/(this.options.extent*Math.pow(2,e)),n=this.trees[e+1].within(r.x,r.y,i),o=[],s=0;s<n.length;s++){var l=this.trees[e+1].points[n[s]];l.parentId===t&&o.push(l.numPoints?a(l):this.points[l.id])}return o},getLeaves:function(t,e,r,i){r=r||10,i=i||0;var n=[];return this._appendLeaves(n,t,e,r,i,0),n},getTile:function(t,e,r){var i=this.trees[this._limitZoom(t)],n=Math.pow(2,t),o=this.options.extent,a=this.options.radius/o,s=(r-a)/n,l=(r+1+a)/n,u={features:[]};return this._addTileFeatures(i.range((e-a)/n,s,(e+1+a)/n,l),i.points,e,r,n,u),0===e&&this._addTileFeatures(i.range(1-a/n,s,1,l),i.points,n,r,n,u),e===n-1&&this._addTileFeatures(i.range(0,s,a/n,l),i.points,-1,r,n,u),u.features.length?u:null},getClusterExpansionZoom:function(t,e){for(;e<this.options.maxZoom;){var r=this.getChildren(t,e);if(e++,1!==r.length)break;t=r[0].properties.cluster_id}return e},_appendLeaves:function(t,e,r,i,n,o){for(var a=this.getChildren(e,r),s=0;s<a.length;s++){var l=a[s].properties;if(l.cluster?o+l.point_count<=n?o+=l.point_count:o=this._appendLeaves(t,l.cluster_id,r+1,i,n,o):o<n?o++:t.push(a[s]),t.length===i)break}return o},_addTileFeatures:function(t,e,r,i,n,o){for(var a=0;a<t.length;a++){var l=e[t[a]];o.features.push({type:1,geometry:[[Math.round(this.options.extent*(l.x*n-r)),Math.round(this.options.extent*(l.y*n-i))]],tags:l.numPoints?s(l):this.points[l.id].properties})}},_limitZoom:function(t){return Math.max(this.options.minZoom,Math.min(t,this.options.maxZoom+1))},_cluster:function(t,e){for(var r=[],i=this.options.radius/(this.options.extent*Math.pow(2,e)),o=0;o<t.length;o++){var a=t[o];if(!(a.zoom<=e)){a.zoom=e;var s=this.trees[e+1],l=s.within(a.x,a.y,i),u=a.numPoints||1,c=a.x*u,p=a.y*u,h=null;this.options.reduce&&(h=this.options.initial(),this._accumulate(h,a));for(var f=0;f<l.length;f++){var d=s.points[l[f]];if(e<d.zoom){var m=d.numPoints||1;d.zoom=e,c+=d.x*m,p+=d.y*m,u+=m,d.parentId=o,this.options.reduce&&this._accumulate(h,d)}}1===u?r.push(a):(a.parentId=o,r.push(n(c/u,p/u,u,o,h)))}}return r},_accumulate:function(t,e){var r=e.numPoints?e.properties:this.options.map(this.points[e.id].properties);this.options.reduce(t,r)}}},{kdbush:26}],43:[function(t,e,r){"use strict";function i(t,e){if(!(this instanceof i))return new i(t,e);if(this.data=t||[],this.length=this.data.length,this.compare=e||n,this.length>0)for(var r=this.length>>1;r>=0;r--)this._down(r)}function n(t,e){return t<e?-1:t>e?1:0}e.exports=i,i.prototype={push:function(t){this.data.push(t),this.length++,this._up(this.length-1)},pop:function(){if(0!==this.length){var t=this.data[0];return--this.length>0&&(this.data[0]=this.data[this.length],this._down(0)),this.data.pop(),t}},peek:function(){return this.data[0]},_up:function(t){for(var e=this.data,r=this.compare,i=e[t];t>0;){var n=t-1>>1,o=e[n];if(r(i,o)>=0)break;e[t]=o,t=n}e[t]=i},_down:function(t){for(var e=this.data,r=this.compare,i=this.length,n=i>>1,o=e[t];t<n;){var a=1+(t<<1),s=a+1,l=e[a];if(s<i&&r(e[s],l)<0&&(a=s,l=e[s]),r(l,o)>=0)break;e[t]=l,t=a}e[t]=o}}},{}],44:[function(t,e,r){"function"==typeof Object.create?e.exports=function(t,e){t.super_=e,t.prototype=Object.create(e.prototype,{constructor:{value:t,enumerable:!1,writable:!0,configurable:!0}})}:e.exports=function(t,e){t.super_=e;var r=function(){};r.prototype=e.prototype,t.prototype=new r,t.prototype.constructor=t}},{}],45:[function(t,e,r){e.exports=function(t){return t&&"object"==typeof t&&"function"==typeof t.copy&&"function"==typeof t.fill&&"function"==typeof t.readUInt8}},{}],46:[function(t,e,r){(function(e,i){function n(t,e){var i={seen:[],stylize:a};return arguments.length>=3&&(i.depth=arguments[2]),arguments.length>=4&&(i.colors=arguments[3]),m(e)?i.showHidden=e:e&&r._extend(i,e),_(i.showHidden)&&(i.showHidden=!1),_(i.depth)&&(i.depth=2),_(i.colors)&&(i.colors=!1),_(i.customInspect)&&(i.customInspect=!0),i.colors&&(i.stylize=o),l(i,t,i.depth)}function o(t,e){var r=n.styles[e];return r?"["+n.colors[r][0]+"m"+t+"["+n.colors[r][1]+"m":t}function a(t,e){return t}function s(t){var e={};return t.forEach(function(t,r){e[t]=!0}),e}function l(t,e,i){if(t.customInspect&&e&&T(e.inspect)&&e.inspect!==r.inspect&&(!e.constructor||e.constructor.prototype!==e)){var n=e.inspect(i,t);return v(n)||(n=l(t,n,i)),n}var o=u(t,e);if(o)return o;var a=Object.keys(e),m=s(a);if(t.showHidden&&(a=Object.getOwnPropertyNames(e)),z(e)&&(a.indexOf("message")>=0||a.indexOf("description")>=0))return c(e);if(0===a.length){if(T(e)){var y=e.name?": "+e.name:"";return t.stylize("[Function"+y+"]","special")}if(x(e))return t.stylize(RegExp.prototype.toString.call(e),"regexp");if(w(e))return t.stylize(Date.prototype.toString.call(e),"date");if(z(e))return c(e)}var g="",_=!1,b=["{","}"];if(d(e)&&(_=!0,b=["[","]"]),T(e)&&(g=" [Function"+(e.name?": "+e.name:"")+"]"),x(e)&&(g=" "+RegExp.prototype.toString.call(e)),w(e)&&(g=" "+Date.prototype.toUTCString.call(e)),z(e)&&(g=" "+c(e)),0===a.length&&(!_||0==e.length))return b[0]+g+b[1];if(i<0)return x(e)?t.stylize(RegExp.prototype.toString.call(e),"regexp"):t.stylize("[Object]","special");t.seen.push(e);var S;return S=_?p(t,e,i,m,a):a.map(function(r){return h(t,e,i,m,r,_)}),t.seen.pop(),f(S,g,b)}function u(t,e){if(_(e))return t.stylize("undefined","undefined");if(v(e)){var r="'"+JSON.stringify(e).replace(/^"|"$/g,"").replace(/'/g,"\\'").replace(/\\"/g,'"')+"'";return t.stylize(r,"string")}return g(e)?t.stylize(""+e,"number"):m(e)?t.stylize(""+e,"boolean"):y(e)?t.stylize("null","null"):void 0}function c(t){return"["+Error.prototype.toString.call(t)+"]"}function p(t,e,r,i,n){for(var o=[],a=0,s=e.length;a<s;++a)C(e,String(a))?o.push(h(t,e,r,i,String(a),!0)):o.push("");return n.forEach(function(n){n.match(/^\d+$/)||o.push(h(t,e,r,i,n,!0))}),o}function h(t,e,r,i,n,o){var a,s,u;if(u=Object.getOwnPropertyDescriptor(e,n)||{value:e[n]},u.get?s=u.set?t.stylize("[Getter/Setter]","special"):t.stylize("[Getter]","special"):u.set&&(s=t.stylize("[Setter]","special")),C(i,n)||(a="["+n+"]"),s||(t.seen.indexOf(u.value)<0?(s=y(r)?l(t,u.value,null):l(t,u.value,r-1)).indexOf("\n")>-1&&(s=o?s.split("\n").map(function(t){return" "+t}).join("\n").substr(2):"\n"+s.split("\n").map(function(t){return" "+t}).join("\n")):s=t.stylize("[Circular]","special")),_(a)){if(o&&n.match(/^\d+$/))return s;(a=JSON.stringify(""+n)).match(/^"([a-zA-Z_][a-zA-Z_0-9]*)"$/)?(a=a.substr(1,a.length-2),a=t.stylize(a,"name")):(a=a.replace(/'/g,"\\'").replace(/\\"/g,'"').replace(/(^"|"$)/g,"'"),a=t.stylize(a,"string"))}return a+": "+s}function f(t,e,r){var i=0;return t.reduce(function(t,e){return i++,e.indexOf("\n")>=0&&i++,t+e.replace(/\u001b\[\d\d?m/g,"").length+1},0)>60?r[0]+(""===e?"":e+"\n ")+" "+t.join(",\n ")+" "+r[1]:r[0]+e+" "+t.join(", ")+" "+r[1]}function d(t){return Array.isArray(t)}function m(t){return"boolean"==typeof t}function y(t){return null===t}function g(t){return"number"==typeof t}function v(t){return"string"==typeof t}function _(t){return void 0===t}function x(t){return b(t)&&"[object RegExp]"===S(t)}function b(t){return"object"==typeof t&&null!==t}function w(t){return b(t)&&"[object Date]"===S(t)}function z(t){return b(t)&&("[object Error]"===S(t)||t instanceof Error)}function T(t){return"function"==typeof t}function S(t){return Object.prototype.toString.call(t)}function A(t){return t<10?"0"+t.toString(10):t.toString(10)}function E(){var t=new Date,e=[A(t.getHours()),A(t.getMinutes()),A(t.getSeconds())].join(":");return[t.getDate(),P[t.getMonth()],e].join(" ")}function C(t,e){return Object.prototype.hasOwnProperty.call(t,e)}var k=/%[sdj%]/g;r.format=function(t){if(!v(t)){for(var e=[],r=0;r<arguments.length;r++)e.push(n(arguments[r]));return e.join(" ")}for(var r=1,i=arguments,o=i.length,a=String(t).replace(k,function(t){if("%%"===t)return"%";if(r>=o)return t;switch(t){case"%s":return String(i[r++]);case"%d":return Number(i[r++]);case"%j":try{return JSON.stringify(i[r++])}catch(t){return"[Circular]"}default:return t}}),s=i[r];r<o;s=i[++r])y(s)||!b(s)?a+=" "+s:a+=" "+n(s);return a},r.deprecate=function(t,n){if(_(i.process))return function(){return r.deprecate(t,n).apply(this,arguments)};if(!0===e.noDeprecation)return t;var o=!1;return function(){if(!o){if(e.throwDeprecation)throw new Error(n);e.traceDeprecation?console.trace(n):console.error(n),o=!0}return t.apply(this,arguments)}};var M,I={};r.debuglog=function(t){if(_(M)&&(M=e.env.NODE_DEBUG||""),t=t.toUpperCase(),!I[t])if(new RegExp("\\b"+t+"\\b","i").test(M)){var i=e.pid;I[t]=function(){var e=r.format.apply(r,arguments);console.error("%s %d: %s",t,i,e)}}else I[t]=function(){};return I[t]},r.inspect=n,n.colors={bold:[1,22],italic:[3,23],underline:[4,24],inverse:[7,27],white:[37,39],grey:[90,39],black:[30,39],blue:[34,39],cyan:[36,39],green:[32,39],magenta:[35,39],red:[31,39],yellow:[33,39]},n.styles={special:"cyan",number:"yellow",boolean:"yellow",undefined:"grey",null:"bold",string:"green",date:"magenta",regexp:"red"},r.isArray=d,r.isBoolean=m,r.isNull=y,r.isNullOrUndefined=function(t){return null==t},r.isNumber=g,r.isString=v,r.isSymbol=function(t){return"symbol"==typeof t},r.isUndefined=_,r.isRegExp=x,r.isObject=b,r.isDate=w,r.isError=z,r.isFunction=T,r.isPrimitive=function(t){return null===t||"boolean"==typeof t||"number"==typeof t||"string"==typeof t||"symbol"==typeof t||void 0===t},r.isBuffer=t("./support/isBuffer");var P=["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"];r.log=function(){console.log("%s - %s",E(),r.format.apply(r,arguments))},r.inherits=t("inherits"),r._extend=function(t,e){if(!e||!b(e))return t;for(var r=Object.keys(e),i=r.length;i--;)t[r[i]]=e[r[i]];return t}}).call(this,t("_process"),"undefined"!=typeof global?global:"undefined"!=typeof self?self:"undefined"!=typeof window?window:{})},{"./support/isBuffer":45,_process:40,inherits:44}],47:[function(t,e,r){function i(t){var e=new h;return n(t,e),e.finish()}function n(t,e){for(var r in t.layers)e.writeMessage(3,o,t.layers[r])}function o(t,e){e.writeVarintField(15,t.version||1),e.writeStringField(1,t.name||""),e.writeVarintField(5,t.extent||4096);var r,i={keys:[],values:[],keycache:{},valuecache:{}};for(r=0;r<t.length;r++)i.feature=t.feature(r),e.writeMessage(2,a,i);var n=i.keys;for(r=0;r<n.length;r++)e.writeStringField(3,n[r]);var o=i.values;for(r=0;r<o.length;r++)e.writeMessage(4,p,o[r])}function a(t,e){var r=t.feature;void 0!==r.id&&e.writeVarintField(1,r.id),e.writeMessage(2,s,t),e.writeVarintField(3,r.type),e.writeMessage(4,c,r)}function s(t,e){var r=t.feature,i=t.keys,n=t.values,o=t.keycache,a=t.valuecache;for(var s in r.properties){var l=o[s];void 0===l&&(i.push(s),l=i.length-1,o[s]=l),e.writeVarint(l);var u=r.properties[s],c=typeof u;"string"!==c&&"boolean"!==c&&"number"!==c&&(u=JSON.stringify(u));var p=c+":"+u,h=a[p];void 0===h&&(n.push(u),h=n.length-1,a[p]=h),e.writeVarint(h)}}function l(t,e){return(e<<3)+(7&t)}function u(t){return t<<1^t>>31}function c(t,e){for(var r=t.loadGeometry(),i=t.type,n=0,o=0,a=r.length,s=0;s<a;s++){var c=r[s],p=1;1===i&&(p=c.length),e.writeVarint(l(1,p));for(var h=0;h<c.length;h++){1===h&&1!==i&&e.writeVarint(l(2,c.length-1));var f=c[h].x-n,d=c[h].y-o;e.writeVarint(u(f)),e.writeVarint(u(d)),n+=f,o+=d}}}function p(t,e){var r=typeof t;"string"===r?e.writeStringField(1,t):"boolean"===r?e.writeBooleanField(7,t):"number"===r&&(t%1!=0?e.writeDoubleField(3,t):t<0?e.writeSVarintField(6,t):e.writeVarintField(5,t))}var h=t("pbf"),f=t("./lib/geojson_wrapper");e.exports=i,e.exports.fromVectorTileJs=i,e.exports.fromGeojsonVt=function(t){var e={};for(var r in t)e[r]=new f(t[r].features),e[r].name=r;return i({layers:e})},e.exports.GeoJSONWrapper=f},{"./lib/geojson_wrapper":48,pbf:39}],48:[function(t,e,r){"use strict";function i(t){this.features=t,this.length=t.length}function n(t){this.id="number"==typeof t.id?t.id:void 0,this.type=t.type,this.rawGeometry=1===t.type?[t.geometry]:t.geometry,this.properties=t.tags,this.extent=4096}var o=t("@mapbox/point-geometry"),a=t("@mapbox/vector-tile").VectorTileFeature;e.exports=i,i.prototype.feature=function(t){return new n(this.features[t])},n.prototype.loadGeometry=function(){var t=this.rawGeometry;this.geometry=[];for(var e=0;e<t.length;e++){for(var r=t[e],i=[],n=0;n<r.length;n++)i.push(new o(r[n][0],r[n][1]));this.geometry.push(i)}return this.geometry},n.prototype.bbox=function(){this.geometry||this.loadGeometry();for(var t=this.geometry,e=1/0,r=-1/0,i=1/0,n=-1/0,o=0;o<t.length;o++)for(var a=t[o],s=0;s<a.length;s++){var l=a[s];e=Math.min(e,l.x),r=Math.max(r,l.x),i=Math.min(i,l.y),n=Math.max(n,l.y)}return[e,i,r,n]},n.prototype.toGeoJSON=a.prototype.toGeoJSON},{"@mapbox/point-geometry":2,"@mapbox/vector-tile":6}],49:[function(t,e,r){var i=arguments[3],n=arguments[4],o=arguments[5],a=JSON.stringify;e.exports=function(t,e){function r(t){y[t]=!0;for(var e in n[t][1]){var i=n[t][1][e];y[i]||r(i)}}for(var s,l=Object.keys(o),u=0,c=l.length;u<c;u++){var p=l[u],h=o[p].exports;if(h===t||h&&h.default===t){s=p;break}}if(!s){s=Math.floor(Math.pow(16,8)*Math.random()).toString(16);for(var f={},u=0,c=l.length;u<c;u++)f[p=l[u]]=p;n[s]=[Function(["require","module","exports"],"("+t+")(self)"),f]}var d=Math.floor(Math.pow(16,8)*Math.random()).toString(16),m={};m[s]=s,n[d]=[Function(["require"],"var f = require("+a(s)+");(f.default ? f.default : f)(self);"),m];var y={};r(d);var g="("+i+")({"+Object.keys(y).map(function(t){return a(t)+":["+n[t][0]+","+a(n[t][1])+"]"}).join(",")+"},{},["+a(d)+"])",v=window.URL||window.webkitURL||window.mozURL||window.msURL,_=new Blob([g],{type:"text/javascript"});if(e&&e.bare)return _;var x=v.createObjectURL(_),b=new Worker(x);return b.objectURL=x,b}},{}],50:[function(t,e,r){e.exports.RADIUS=6378137,e.exports.FLATTENING=1/298.257223563,e.exports.POLAR_RADIUS=6356752.3142},{}],51:[function(t,e,r){e.exports={version:"0.42.2"}},{}],52:[function(t,e,r){"use strict";var i=t("../util/util");e.exports={deserialize:function(t,e){var r={};if(!e)return r;for(var n=0,o=t;n<o.length;n+=1){var a=o[n],s=a.layerIds.map(function(t){return e.getLayer(t)}).filter(Boolean);if(0!==s.length)for(var l=s[0].createBucket(i.extend({layers:s},a)),u=0,c=s;u<c.length;u+=1)r[c[u].id]=l}return r}}},{"../util/util":267}],53:[function(t,e,r){"use strict";function i(t,e,r,i,n){t.emplaceBack(2*e+(i+1)/2,2*r+(n+1)/2)}var n=t("../segment").SegmentVector,o=t("../../gl/vertex_buffer"),a=t("../../gl/index_buffer"),s=t("../program_configuration").ProgramConfigurationSet,l=t("../vertex_array_type"),u=t("../index_array_type").TriangleIndexArray,c=t("../load_geometry"),p=t("../extent"),h={layoutAttributes:[{name:"a_pos",components:2,type:"Int16"}],indexArrayType:u,paintAttributes:[{property:"circle-color"},{property:"circle-radius"},{property:"circle-blur"},{property:"circle-opacity"},{property:"circle-stroke-color"},{property:"circle-stroke-width"},{property:"circle-stroke-opacity"}]},f=l(h.layoutAttributes),d=function(t){this.zoom=t.zoom,this.overscaling=t.overscaling,this.layers=t.layers,this.index=t.index,this.layoutVertexArray=new f(t.layoutVertexArray),this.indexArray=new u(t.indexArray),this.segments=new n(t.segments),this.programConfigurations=new s(this.constructor.programInterface,t.layers,t.zoom,t.programConfigurations)};d.prototype.populate=function(t,e){for(var r=this,i=0,n=t;i<n.length;i+=1){var o=n[i],a=o.feature,s=o.index,l=o.sourceLayerIndex;if(r.layers[0]._featureFilter({zoom:r.zoom},a)){var u=c(a);r.addFeature(a,u),e.featureIndex.insert(a,u,s,l,r.index)}}},d.prototype.isEmpty=function(){return 0===this.layoutVertexArray.length},d.prototype.serialize=function(t){return{zoom:this.zoom,layerIds:this.layers.map(function(t){return t.id}),layoutVertexArray:this.layoutVertexArray.serialize(t),indexArray:this.indexArray.serialize(t),programConfigurations:this.programConfigurations.serialize(t),segments:this.segments.get()}},d.prototype.upload=function(t){this.layoutVertexBuffer=new o(t,this.layoutVertexArray),this.indexBuffer=new a(t,this.indexArray),this.programConfigurations.upload(t)},d.prototype.destroy=function(){this.layoutVertexBuffer&&(this.layoutVertexBuffer.destroy(),this.indexBuffer.destroy(),this.programConfigurations.destroy(),this.segments.destroy())},d.prototype.addFeature=function(t,e){for(var r=this,n=0,o=e;n<o.length;n+=1)for(var a=0,s=o[n];a<s.length;a+=1){var l=s[a],u=l.x,c=l.y;if(!(u<0||u>=p||c<0||c>=p)){var h=r.segments.prepareSegment(4,r.layoutVertexArray,r.indexArray),f=h.vertexLength;i(r.layoutVertexArray,u,c,-1,-1),i(r.layoutVertexArray,u,c,1,-1),i(r.layoutVertexArray,u,c,1,1),i(r.layoutVertexArray,u,c,-1,1),r.indexArray.emplaceBack(f,f+1,f+2),r.indexArray.emplaceBack(f,f+3,f+2),h.vertexLength+=4,h.primitiveLength+=2}}this.programConfigurations.populatePaintArrays(this.layoutVertexArray.length,t)},d.programInterface=h,e.exports=d},{"../../gl/index_buffer":72,"../../gl/vertex_buffer":73,"../extent":59,"../index_array_type":61,"../load_geometry":62,"../program_configuration":64,"../segment":66,"../vertex_array_type":67}],54:[function(t,e,r){"use strict";var i=t("../segment").SegmentVector,n=t("../../gl/vertex_buffer"),o=t("../../gl/index_buffer"),a=t("../program_configuration").ProgramConfigurationSet,s=t("../vertex_array_type"),l=t("../index_array_type"),u=l.LineIndexArray,c=l.TriangleIndexArray,p=t("../load_geometry"),h=t("earcut"),f=t("../../util/classify_rings"),d=t("assert"),m={layoutAttributes:[{name:"a_pos",components:2,type:"Int16"}],indexArrayType:c,indexArrayType2:u,paintAttributes:[{property:"fill-color"},{property:"fill-outline-color"},{property:"fill-opacity"}]},y=s(m.layoutAttributes),g=function(t){this.zoom=t.zoom,this.overscaling=t.overscaling,this.layers=t.layers,this.index=t.index,this.layoutVertexArray=new y(t.layoutVertexArray),this.indexArray=new c(t.indexArray),this.indexArray2=new u(t.indexArray2),this.programConfigurations=new a(m,t.layers,t.zoom,t.programConfigurations),this.segments=new i(t.segments),this.segments2=new i(t.segments2)};g.prototype.populate=function(t,e){for(var r=this,i=0,n=t;i<n.length;i+=1){var o=n[i],a=o.feature,s=o.index,l=o.sourceLayerIndex;if(r.layers[0]._featureFilter({zoom:r.zoom},a)){var u=p(a);r.addFeature(a,u),e.featureIndex.insert(a,u,s,l,r.index)}}},g.prototype.isEmpty=function(){return 0===this.layoutVertexArray.length},g.prototype.serialize=function(t){return{zoom:this.zoom,layerIds:this.layers.map(function(t){return t.id}),layoutVertexArray:this.layoutVertexArray.serialize(t),indexArray:this.indexArray.serialize(t),indexArray2:this.indexArray2.serialize(t),programConfigurations:this.programConfigurations.serialize(t),segments:this.segments.get(),segments2:this.segments2.get()}},g.prototype.upload=function(t){this.layoutVertexBuffer=new n(t,this.layoutVertexArray),this.indexBuffer=new o(t,this.indexArray),this.indexBuffer2=new o(t,this.indexArray2),this.programConfigurations.upload(t)},g.prototype.destroy=function(){this.layoutVertexBuffer&&(this.layoutVertexBuffer.destroy(),this.indexBuffer.destroy(),this.indexBuffer2.destroy(),this.programConfigurations.destroy(),this.segments.destroy(),this.segments2.destroy())},g.prototype.addFeature=function(t,e){for(var r=this,i=0,n=f(e,500);i<n.length;i+=1){for(var o=n[i],a=0,s=0,l=o;s<l.length;s+=1)a+=l[s].length;for(var u=r.segments.prepareSegment(a,r.layoutVertexArray,r.indexArray),c=u.vertexLength,p=[],m=[],y=0,g=o;y<g.length;y+=1){var v=g[y];if(0!==v.length){v!==o[0]&&m.push(p.length/2);var _=r.segments2.prepareSegment(v.length,r.layoutVertexArray,r.indexArray2),x=_.vertexLength;r.layoutVertexArray.emplaceBack(v[0].x,v[0].y),r.indexArray2.emplaceBack(x+v.length-1,x),p.push(v[0].x),p.push(v[0].y);for(var b=1;b<v.length;b++)r.layoutVertexArray.emplaceBack(v[b].x,v[b].y),r.indexArray2.emplaceBack(x+b-1,x+b),p.push(v[b].x),p.push(v[b].y);_.vertexLength+=v.length,_.primitiveLength+=v.length}}var w=h(p,m);d(w.length%3==0);for(var z=0;z<w.length;z+=3)r.indexArray.emplaceBack(c+w[z],c+w[z+1],c+w[z+2]);u.vertexLength+=a,u.primitiveLength+=w.length/3}this.programConfigurations.populatePaintArrays(this.layoutVertexArray.length,t)},g.programInterface=m,e.exports=g},{"../../gl/index_buffer":72,"../../gl/vertex_buffer":73,"../../util/classify_rings":249,"../index_array_type":61,"../load_geometry":62,"../program_configuration":64,"../segment":66,"../vertex_array_type":67,assert:11,earcut:13}],55:[function(t,e,r){"use strict";function i(t,e,r,i,n,o,a,s){t.emplaceBack(e,r,2*Math.floor(i*_)+a,n*_*2,o*_*2,Math.round(s))}function n(t,e){return t.x===e.x&&(t.x<0||t.x>d)||t.y===e.y&&(t.y<0||t.y>d)}var o=t("../segment"),a=o.SegmentVector,s=o.MAX_VERTEX_ARRAY_LENGTH,l=t("../../gl/vertex_buffer"),u=t("../../gl/index_buffer"),c=t("../program_configuration").ProgramConfigurationSet,p=t("../vertex_array_type"),h=t("../index_array_type").TriangleIndexArray,f=t("../load_geometry"),d=t("../extent"),m=t("earcut"),y=t("../../util/classify_rings"),g=t("assert"),v={layoutAttributes:[{name:"a_pos",components:2,type:"Int16"},{name:"a_normal",components:3,type:"Int16"},{name:"a_edgedistance",components:1,type:"Int16"}],indexArrayType:h,paintAttributes:[{property:"fill-extrusion-base"},{property:"fill-extrusion-height"},{property:"fill-extrusion-color"}]},_=Math.pow(2,13),x=p(v.layoutAttributes),b=function(t){this.zoom=t.zoom,this.overscaling=t.overscaling,this.layers=t.layers,this.index=t.index,this.layoutVertexArray=new x(t.layoutVertexArray),this.indexArray=new h(t.indexArray),this.programConfigurations=new c(v,t.layers,t.zoom,t.programConfigurations),this.segments=new a(t.segments)};b.prototype.populate=function(t,e){for(var r=this,i=0,n=t;i<n.length;i+=1){var o=n[i],a=o.feature,s=o.index,l=o.sourceLayerIndex;if(r.layers[0]._featureFilter({zoom:r.zoom},a)){var u=f(a);r.addFeature(a,u),e.featureIndex.insert(a,u,s,l,r.index)}}},b.prototype.isEmpty=function(){return 0===this.layoutVertexArray.length},b.prototype.serialize=function(t){return{zoom:this.zoom,layerIds:this.layers.map(function(t){return t.id}),layoutVertexArray:this.layoutVertexArray.serialize(t),indexArray:this.indexArray.serialize(t),programConfigurations:this.programConfigurations.serialize(t),segments:this.segments.get()}},b.prototype.upload=function(t){this.layoutVertexBuffer=new l(t,this.layoutVertexArray),this.indexBuffer=new u(t,this.indexArray),this.programConfigurations.upload(t)},b.prototype.destroy=function(){this.layoutVertexBuffer&&(this.layoutVertexBuffer.destroy(),this.indexBuffer.destroy(),this.programConfigurations.destroy(),this.segments.destroy())},b.prototype.addFeature=function(t,e){for(var r=this,o=0,a=y(e,500);o<a.length;o+=1){for(var l=a[o],u=0,c=0,p=l;c<p.length;c+=1)u+=p[c].length;for(var h=r.segments.prepareSegment(4,r.layoutVertexArray,r.indexArray),f=0,d=l;f<d.length;f+=1){var v=d[f];if(0!==v.length)for(var _=0,x=0;x<v.length;x++){var b=v[x];if(x>=1){var w=v[x-1];if(!n(b,w)){h.vertexLength+4>s&&(h=r.segments.prepareSegment(4,r.layoutVertexArray,r.indexArray));var z=b.sub(w)._perp()._unit();i(r.layoutVertexArray,b.x,b.y,z.x,z.y,0,0,_),i(r.layoutVertexArray,b.x,b.y,z.x,z.y,0,1,_),_+=w.dist(b),i(r.layoutVertexArray,w.x,w.y,z.x,z.y,0,0,_),i(r.layoutVertexArray,w.x,w.y,z.x,z.y,0,1,_);var T=h.vertexLength;r.indexArray.emplaceBack(T,T+1,T+2),r.indexArray.emplaceBack(T+1,T+2,T+3),h.vertexLength+=4,h.primitiveLength+=2}}}}h.vertexLength+u>s&&(h=r.segments.prepareSegment(u,r.layoutVertexArray,r.indexArray));for(var S=[],A=[],E=h.vertexLength,C=0,k=l;C<k.length;C+=1){var M=k[C];if(0!==M.length){M!==l[0]&&A.push(S.length/2);for(var I=0;I<M.length;I++){var P=M[I];i(r.layoutVertexArray,P.x,P.y,0,0,1,1,0),S.push(P.x),S.push(P.y)}}}var L=m(S,A);g(L.length%3==0);for(var R=0;R<L.length;R+=3)r.indexArray.emplaceBack(E+L[R],E+L[R+1],E+L[R+2]);h.primitiveLength+=L.length/3,h.vertexLength+=u}this.programConfigurations.populatePaintArrays(this.layoutVertexArray.length,t)},b.programInterface=v,e.exports=b},{"../../gl/index_buffer":72,"../../gl/vertex_buffer":73,"../../util/classify_rings":249,"../extent":59,"../index_array_type":61,"../load_geometry":62,"../program_configuration":64,"../segment":66,"../vertex_array_type":67,assert:11,earcut:13}],56:[function(t,e,r){"use strict";var i=t("./circle_bucket"),n={layoutAttributes:i.programInterface.layoutAttributes,indexArrayType:i.programInterface.indexArrayType,paintAttributes:[{property:"heatmap-weight"}]},o=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}(i);o.programInterface=n,e.exports=o},{"./circle_bucket":53}],57:[function(t,e,r){"use strict";function i(t,e,r,i,n,o,a){t.emplaceBack(e.x,e.y,i?1:0,n?1:-1,Math.round(f*r.x)+128,Math.round(f*r.y)+128,1+(0===o?0:o<0?-1:1)|(a*m&63)<<2,a*m>>6)}var n=t("../segment").SegmentVector,o=t("../../gl/vertex_buffer"),a=t("../../gl/index_buffer"),s=t("../program_configuration").ProgramConfigurationSet,l=t("../vertex_array_type"),u=t("../index_array_type").TriangleIndexArray,c=t("../load_geometry"),p=t("../extent"),h=t("@mapbox/vector-tile").VectorTileFeature.types,f=63,d=Math.cos(Math.PI/180*37.5),m=.5,y=Math.pow(2,14)/m,g={layoutAttributes:[{name:"a_pos_normal",components:4,type:"Int16"},{name:"a_data",components:4,type:"Uint8"}],paintAttributes:[{property:"line-color"},{property:"line-blur"},{property:"line-opacity"},{property:"line-gap-width",name:"gapwidth"},{property:"line-offset"},{property:"line-width"},{property:"line-floorwidth"}],indexArrayType:u},v=l(g.layoutAttributes),_=function(t){this.zoom=t.zoom,this.overscaling=t.overscaling,this.layers=t.layers,this.index=t.index,this.layoutVertexArray=new v(t.layoutVertexArray),this.indexArray=new u(t.indexArray),this.programConfigurations=new s(g,t.layers,t.zoom,t.programConfigurations),this.segments=new n(t.segments)};_.prototype.populate=function(t,e){for(var r=this,i=0,n=t;i<n.length;i+=1){var o=n[i],a=o.feature,s=o.index,l=o.sourceLayerIndex;if(r.layers[0]._featureFilter({zoom:r.zoom},a)){var u=c(a);r.addFeature(a,u),e.featureIndex.insert(a,u,s,l,r.index)}}},_.prototype.isEmpty=function(){return 0===this.layoutVertexArray.length},_.prototype.serialize=function(t){return{zoom:this.zoom,layerIds:this.layers.map(function(t){return t.id}),layoutVertexArray:this.layoutVertexArray.serialize(t),indexArray:this.indexArray.serialize(t),programConfigurations:this.programConfigurations.serialize(t),segments:this.segments.get()}},_.prototype.upload=function(t){this.layoutVertexBuffer=new o(t,this.layoutVertexArray),this.indexBuffer=new a(t,this.indexArray),this.programConfigurations.upload(t)},_.prototype.destroy=function(){this.layoutVertexBuffer&&(this.layoutVertexBuffer.destroy(),this.indexBuffer.destroy(),this.programConfigurations.destroy(),this.segments.destroy())},_.prototype.addFeature=function(t,e){for(var r=this,i=this.layers[0].layout,n=i.get("line-join").evaluate(t),o=i.get("line-cap"),a=i.get("line-miter-limit"),s=i.get("line-round-limit"),l=0,u=e;l<u.length;l+=1){var c=u[l];r.addLine(c,t,n,o,a,s)}},_.prototype.addLine=function(t,e,r,i,n,o){for(var a=this,s="Polygon"===h[e.type],l=t.length;l>=2&&t[l-1].equals(t[l-2]);)l--;for(var u=0;u<l-1&&t[u].equals(t[u+1]);)u++;if(!(l<(s?3:2))){"bevel"===r&&(n=1.05);var c=p/(512*this.overscaling)*15,f=t[u],m=this.segments.prepareSegment(10*l,this.layoutVertexArray,this.indexArray);this.distance=0;var y,g,v,_=i,x=s?"butt":i,b=!0,w=void 0,z=void 0,T=void 0,S=void 0;this.e1=this.e2=this.e3=-1,s&&(y=t[l-2],S=f.sub(y)._unit()._perp());for(var A=u;A<l;A++)if(!(z=s&&A===l-1?t[u+1]:t[A+1])||!t[A].equals(z)){S&&(T=S),y&&(w=y),y=t[A],S=z?z.sub(y)._unit()._perp():T;var E=(T=T||S).add(S);0===E.x&&0===E.y||E._unit();var C=E.x*S.x+E.y*S.y,k=0!==C?1/C:1/0,M=C<d&&w&&z;if(M&&A>u){var I=y.dist(w);if(I>2*c){var P=y.sub(y.sub(w)._mult(c/I)._round());a.distance+=P.dist(w),a.addCurrentVertex(P,a.distance,T.mult(1),0,0,!1,m),w=P}}var L=w&&z,R=L?r:z?_:x;if(L&&"round"===R&&(k<o?R="miter":k<=2&&(R="fakeround")),"miter"===R&&k>n&&(R="bevel"),"bevel"===R&&(k>2&&(R="flipbevel"),k<n&&(R="miter")),w&&(a.distance+=y.dist(w)),"miter"===R)E._mult(k),a.addCurrentVertex(y,a.distance,E,0,0,!1,m);else if("flipbevel"===R){if(k>100)E=S.clone().mult(-1);else{var D=T.x*S.y-T.y*S.x>0?-1:1,B=k*T.add(S).mag()/T.sub(S).mag();E._perp()._mult(B*D)}a.addCurrentVertex(y,a.distance,E,0,0,!1,m),a.addCurrentVertex(y,a.distance,E.mult(-1),0,0,!1,m)}else if("bevel"===R||"fakeround"===R){var O=T.x*S.y-T.y*S.x>0,F=-Math.sqrt(k*k-1);if(O?(v=0,g=F):(g=0,v=F),b||a.addCurrentVertex(y,a.distance,T,g,v,!1,m),"fakeround"===R){for(var j=Math.floor(8*(.5-(C-.5))),V=void 0,N=0;N<j;N++)V=S.mult((N+1)/(j+1))._add(T)._unit(),a.addPieSliceVertex(y,a.distance,V,O,m);a.addPieSliceVertex(y,a.distance,E,O,m);for(var U=j-1;U>=0;U--)V=T.mult((U+1)/(j+1))._add(S)._unit(),a.addPieSliceVertex(y,a.distance,V,O,m)}z&&a.addCurrentVertex(y,a.distance,S,-g,-v,!1,m)}else"butt"===R?(b||a.addCurrentVertex(y,a.distance,T,0,0,!1,m),z&&a.addCurrentVertex(y,a.distance,S,0,0,!1,m)):"square"===R?(b||(a.addCurrentVertex(y,a.distance,T,1,1,!1,m),a.e1=a.e2=-1),z&&a.addCurrentVertex(y,a.distance,S,-1,-1,!1,m)):"round"===R&&(b||(a.addCurrentVertex(y,a.distance,T,0,0,!1,m),a.addCurrentVertex(y,a.distance,T,1,1,!0,m),a.e1=a.e2=-1),z&&(a.addCurrentVertex(y,a.distance,S,-1,-1,!0,m),a.addCurrentVertex(y,a.distance,S,0,0,!1,m)));if(M&&A<l-1){var q=y.dist(z);if(q>2*c){var G=y.add(z.sub(y)._mult(c/q)._round());a.distance+=G.dist(y),a.addCurrentVertex(G,a.distance,S.mult(1),0,0,!1,m),y=G}}b=!1}this.programConfigurations.populatePaintArrays(this.layoutVertexArray.length,e)}},_.prototype.addCurrentVertex=function(t,e,r,n,o,a,s){var l,u=this.layoutVertexArray,c=this.indexArray;l=r.clone(),n&&l._sub(r.perp()._mult(n)),i(u,t,l,a,!1,n,e),this.e3=s.vertexLength++,this.e1>=0&&this.e2>=0&&(c.emplaceBack(this.e1,this.e2,this.e3),s.primitiveLength++),this.e1=this.e2,this.e2=this.e3,l=r.mult(-1),o&&l._sub(r.perp()._mult(o)),i(u,t,l,a,!0,-o,e),this.e3=s.vertexLength++,this.e1>=0&&this.e2>=0&&(c.emplaceBack(this.e1,this.e2,this.e3),s.primitiveLength++),this.e1=this.e2,this.e2=this.e3,e>y/2&&(this.distance=0,this.addCurrentVertex(t,this.distance,r,n,o,a,s))},_.prototype.addPieSliceVertex=function(t,e,r,n,o){r=r.mult(n?-1:1);var a=this.layoutVertexArray,s=this.indexArray;i(a,t,r,!1,n,0,e),this.e3=o.vertexLength++,this.e1>=0&&this.e2>=0&&(s.emplaceBack(this.e1,this.e2,this.e3),o.primitiveLength++),n?this.e2=this.e3:this.e1=this.e3},_.programInterface=g,e.exports=_},{"../../gl/index_buffer":72,"../../gl/vertex_buffer":73,"../extent":59,"../index_array_type":61,"../load_geometry":62,"../program_configuration":64,"../segment":66,"../vertex_array_type":67,"@mapbox/vector-tile":6}],58:[function(t,e,r){"use strict";function i(t,e,r,i,n,o,a,s){t.emplaceBack(e,r,Math.round(64*i),Math.round(64*n),o,a,s?s[0]:void 0,s?s[1]:void 0)}function n(t,e,r){t.emplaceBack(e.x,e.y,r),t.emplaceBack(e.x,e.y,r),t.emplaceBack(e.x,e.y,r),t.emplaceBack(e.x,e.y,r)}var o=t("@mapbox/point-geometry"),a=t("../segment").SegmentVector,s=t("../../gl/vertex_buffer"),l=t("../../gl/index_buffer"),u=t("../program_configuration").ProgramConfigurationSet,c=t("../vertex_array_type"),p=t("../index_array_type"),h=p.TriangleIndexArray,f=p.LineIndexArray,d=t("../../symbol/transform_text"),m=t("../../symbol/mergelines"),y=t("../../util/script_detection"),g=t("../load_geometry"),v=t("@mapbox/vector-tile").VectorTileFeature.types,_=t("../../util/struct_array"),x=t("../../util/verticalize_punctuation"),b=(t("../../symbol/anchor"),t("../../symbol/opacity_state"),t("../../symbol/symbol_size").getSizeData),w=_({members:[{type:"Int16",name:"anchorX"},{type:"Int16",name:"anchorY"},{type:"Uint16",name:"glyphStartIndex"},{type:"Uint16",name:"numGlyphs"},{type:"Uint32",name:"vertexStartIndex"},{type:"Uint32",name:"lineStartIndex"},{type:"Uint32",name:"lineLength"},{type:"Uint16",name:"segment"},{type:"Uint16",name:"lowerSize"},{type:"Uint16",name:"upperSize"},{type:"Float32",name:"lineOffsetX"},{type:"Float32",name:"lineOffsetY"},{type:"Uint8",name:"writingMode"},{type:"Uint8",name:"hidden"}]}),z=_({members:[{type:"Float32",name:"offsetX"}]}),T=_({members:[{type:"Int16",name:"x"},{type:"Int16",name:"y"},{type:"Int16",name:"tileUnitDistanceFromAnchor"}]}),S=[{name:"a_pos_offset",components:4,type:"Int16"},{name:"a_data",components:4,type:"Uint16"}],A=[{name:"a_projected_pos",components:3,type:"Float32"}],E=[{name:"a_fade_opacity",components:1,type:"Uint32"}],C=[{name:"a_fade_opacity",components:1,type:"Uint8",offset:0}],k=[{name:"a_placed",components:2,type:"Uint8"}],M={text:{layoutAttributes:S,dynamicLayoutAttributes:A,indexArrayType:h,opacityAttributes:E,paintAttributes:[{property:"text-color",name:"fill_color"},{property:"text-halo-color",name:"halo_color"},{property:"text-halo-width",name:"halo_width"},{property:"text-halo-blur",name:"halo_blur"},{property:"text-opacity",name:"opacity"}]},icon:{layoutAttributes:S,dynamicLayoutAttributes:A,indexArrayType:h,opacityAttributes:E,paintAttributes:[{property:"icon-color",name:"fill_color"},{property:"icon-halo-color",name:"halo_color"},{property:"icon-halo-width",name:"halo_width"},{property:"icon-halo-blur",name:"halo_blur"},{property:"icon-opacity",name:"opacity"}]},collisionBox:{layoutAttributes:[{name:"a_pos",components:2,type:"Int16"},{name:"a_anchor_pos",components:2,type:"Int16"},{name:"a_extrude",components:2,type:"Int16"}],indexArrayType:f,collisionAttributes:k},collisionCircle:{layoutAttributes:[{name:"a_pos",components:2,type:"Int16"},{name:"a_anchor_pos",components:2,type:"Int16"},{name:"a_extrude",components:2,type:"Int16"}],collisionAttributes:k,indexArrayType:h}},I=function(t,e,r,i){this.programInterface=t;var n=c(t.layoutAttributes),o=t.indexArrayType;if(this.layoutVertexArray=new n(i&&i.layoutVertexArray),this.indexArray=new o(i&&i.indexArray),this.programConfigurations=new u(t,e,r,i&&i.programConfigurations),this.segments=new a(i&&i.segments),t.dynamicLayoutAttributes){var s=c(t.dynamicLayoutAttributes);this.dynamicLayoutVertexArray=new s(i&&i.dynamicLayoutVertexArray)}if(t.opacityAttributes){var l=c(t.opacityAttributes);this.opacityVertexArray=new l(i&&i.opacityVertexArray)}if(t.collisionAttributes){var p=c(t.collisionAttributes);this.collisionVertexArray=new p(i&&i.collisionVertexArray)}};I.prototype.serialize=function(t){return{layoutVertexArray:this.layoutVertexArray.serialize(t),indexArray:this.indexArray.serialize(t),programConfigurations:this.programConfigurations.serialize(t),segments:this.segments.get(),dynamicLayoutVertexArray:this.dynamicLayoutVertexArray&&this.dynamicLayoutVertexArray.serialize(t),opacityVertexArray:this.opacityVertexArray&&this.opacityVertexArray.serialize(t),collisionVertexArray:this.collisionVertexArray&&this.collisionVertexArray.serialize(t)}},I.prototype.upload=function(t,e){this.layoutVertexBuffer=new s(t,this.layoutVertexArray),this.indexBuffer=new l(t,this.indexArray,e),this.programConfigurations.upload(t),this.programInterface.dynamicLayoutAttributes&&(this.dynamicLayoutVertexBuffer=new s(t,this.dynamicLayoutVertexArray,!0)),this.programInterface.opacityAttributes&&(this.opacityVertexBuffer=new s(t,this.opacityVertexArray,!0),this.opacityVertexBuffer.itemSize=1,this.opacityVertexBuffer.attributes=C),this.programInterface.collisionAttributes&&(this.collisionVertexBuffer=new s(t,this.collisionVertexArray,!0))},I.prototype.destroy=function(){this.layoutVertexBuffer&&(this.layoutVertexBuffer.destroy(),this.indexBuffer.destroy(),this.programConfigurations.destroy(),this.segments.destroy(),this.dynamicLayoutVertexBuffer&&this.dynamicLayoutVertexBuffer.destroy(),this.opacityVertexBuffer&&this.opacityVertexBuffer.destroy(),this.collisionVertexBuffer&&this.collisionVertexBuffer.destroy())};var P=function(t){if(this.collisionBoxArray=t.collisionBoxArray,this.zoom=t.zoom,this.overscaling=t.overscaling,this.layers=t.layers,this.index=t.index,this.sdfIcons=t.sdfIcons,this.iconsNeedLinear=t.iconsNeedLinear,this.pixelRatio=t.pixelRatio,t.text){this.text=new I(M.text,t.layers,t.zoom,t.text),this.icon=new I(M.icon,t.layers,t.zoom,t.icon),this.collisionBox=new I(M.collisionBox,t.layers,t.zoom,t.collisionBox),this.collisionCircle=new I(M.collisionCircle,t.layers,t.zoom,t.collisionCircle),this.textSizeData=t.textSizeData,this.iconSizeData=t.iconSizeData,this.placedGlyphArray=new w(t.placedGlyphArray),this.placedIconArray=new w(t.placedIconArray),this.glyphOffsetArray=new z(t.glyphOffsetArray),this.lineVertexArray=new T(t.lineVertexArray),this.symbolInstances=t.symbolInstances;var e=t.layers[0].layout;this.sortFeaturesByY=e.get("text-allow-overlap")||e.get("icon-allow-overlap")||e.get("text-ignore-placement")||e.get("icon-ignore-placement")}else{var r=this.layers[0]._unevaluatedLayout._values;if(this.textSizeData=b(this.zoom,r["text-size"]),"composite"===this.textSizeData.functionType){var i=this.textSizeData.zoomRange,n=i.min,o=i.max;this.compositeTextSizes=[r["text-size"].possiblyEvaluate({zoom:n}),r["text-size"].possiblyEvaluate({zoom:o})]}if(this.iconSizeData=b(this.zoom,r["icon-size"]),"composite"===this.iconSizeData.functionType){var a=this.iconSizeData.zoomRange,s=a.min,l=a.max;this.compositeIconSizes=[r["icon-size"].possiblyEvaluate({zoom:s}),r["icon-size"].possiblyEvaluate({zoom:l})]}this.layoutTextSize=r["text-size"].possiblyEvaluate({zoom:this.zoom+1}),this.layoutIconSize=r["icon-size"].possiblyEvaluate({zoom:this.zoom+1}),this.textMaxSize=r["text-size"].possiblyEvaluate({zoom:18})}};P.prototype.createArrays=function(){this.text=new I(M.text,this.layers,this.zoom),this.icon=new I(M.icon,this.layers,this.zoom),this.collisionBox=new I(M.collisionBox,this.layers,this.zoom),this.collisionCircle=new I(M.collisionCircle,this.layers,this.zoom),this.placedGlyphArray=new w,this.placedIconArray=new w,this.glyphOffsetArray=new z,this.lineVertexArray=new T},P.prototype.populate=function(t,e){var r=this,i=this.layers[0],n=i.layout,o=n.get("text-font").join(","),a=n.get("text-field"),s=n.get("icon-image"),l="constant"!==a.value.kind||a.value.value.length>0&&o.length>0,u="constant"!==s.value.kind||s.value.value&&s.value.value.length>0;if(this.features=[],l||u){for(var c=e.iconDependencies,p=e.glyphDependencies,h=p[o]=p[o]||{},f={zoom:this.zoom},_=0,b=t;_<b.length;_+=1){var w=b[_],z=w.feature,T=w.index,S=w.sourceLayerIndex;if(i._featureFilter(f,z)){var A=void 0;l&&(A=i.getValueAndResolveTokens("text-field",z),A=d(A,i,z));var E=void 0;if(u&&(E=i.getValueAndResolveTokens("icon-image",z)),A||E){var C={text:A,icon:E,index:T,sourceLayerIndex:S,geometry:g(z),properties:z.properties,type:v[z.type]};if(void 0!==z.id&&(C.id=z.id),r.features.push(C),E&&(c[E]=!0),A)for(var k="map"===n.get("text-rotation-alignment")&&"line"===n.get("symbol-placement"),M=y.allowsVerticalWritingMode(A),I=0;I<A.length;I++)if(h[A.charCodeAt(I)]=!0,k&&M){var P=x.lookup[A.charAt(I)];P&&(h[P.charCodeAt(0)]=!0)}}}}"line"===n.get("symbol-placement")&&(this.features=m(this.features))}},P.prototype.isEmpty=function(){return 0===this.symbolInstances.length},P.prototype.serialize=function(t){return{zoom:this.zoom,layerIds:this.layers.map(function(t){return t.id}),sdfIcons:this.sdfIcons,iconsNeedLinear:this.iconsNeedLinear,textSizeData:this.textSizeData,iconSizeData:this.iconSizeData,placedGlyphArray:this.placedGlyphArray.serialize(t),placedIconArray:this.placedIconArray.serialize(t),glyphOffsetArray:this.glyphOffsetArray.serialize(t),lineVertexArray:this.lineVertexArray.serialize(t),text:this.text.serialize(t),icon:this.icon.serialize(t),collisionBox:this.collisionBox.serialize(t),collisionCircle:this.collisionCircle.serialize(t),symbolInstances:this.symbolInstances}},P.prototype.upload=function(t){this.text.upload(t,this.sortFeaturesByY),this.icon.upload(t,this.sortFeaturesByY),this.collisionBox.upload(t),this.collisionCircle.upload(t)},P.prototype.destroy=function(){this.text.destroy(),this.icon.destroy(),this.collisionBox.destroy(),this.collisionCircle.destroy()},P.prototype.addToLineVertexArray=function(t,e){var r=this,i=this.lineVertexArray.length;if(void 0!==t.segment){for(var n=t.dist(e[t.segment+1]),o=t.dist(e[t.segment]),a={},s=t.segment+1;s<e.length;s++)a[s]={x:e[s].x,y:e[s].y,tileUnitDistanceFromAnchor:n},s<e.length-1&&(n+=e[s+1].dist(e[s]));for(var l=t.segment||0;l>=0;l--)a[l]={x:e[l].x,y:e[l].y,tileUnitDistanceFromAnchor:o},l>0&&(o+=e[l-1].dist(e[l]));for(var u=0;u<e.length;u++){var c=a[u];r.lineVertexArray.emplaceBack(c.x,c.y,c.tileUnitDistanceFromAnchor)}}return{lineStartIndex:i,lineLength:this.lineVertexArray.length-i}},P.prototype.addSymbols=function(t,e,r,o,a,s,l,u,c,p,h){for(var f=this,d=t.indexArray,m=t.layoutVertexArray,y=t.dynamicLayoutVertexArray,g=t.segments.prepareSegment(4*e.length,t.layoutVertexArray,t.indexArray),v=this.glyphOffsetArray.length,_=g.vertexLength,x=0,b=e;x<b.length;x+=1){var w=b[x],z=w.tl,T=w.tr,S=w.bl,A=w.br,E=w.tex,C=g.vertexLength,k=w.glyphOffset[1];i(m,u.x,u.y,z.x,k+z.y,E.x,E.y,r),i(m,u.x,u.y,T.x,k+T.y,E.x+E.w,E.y,r),i(m,u.x,u.y,S.x,k+S.y,E.x,E.y+E.h,r),i(m,u.x,u.y,A.x,k+A.y,E.x+E.w,E.y+E.h,r),n(y,u,0),d.emplaceBack(C,C+1,C+2),d.emplaceBack(C+1,C+2,C+3),g.vertexLength+=4,g.primitiveLength+=2,f.glyphOffsetArray.emplaceBack(w.glyphOffset[0])}h.emplaceBack(u.x,u.y,v,this.glyphOffsetArray.length-v,_,c,p,u.segment,r?r[0]:0,r?r[1]:0,o[0],o[1],l,!1),t.programConfigurations.populatePaintArrays(t.layoutVertexArray.length,s)},P.prototype._addCollisionDebugVertex=function(t,e,r,i,n){return e.emplaceBack(0,0),t.emplaceBack(r.x,r.y,i.x,i.y,Math.round(n.x),Math.round(n.y))},P.prototype.addCollisionDebugVertices=function(t,e,r,i,n,a,s,l){var u=n.segments.prepareSegment(4,n.layoutVertexArray,n.indexArray),c=u.vertexLength,p=n.layoutVertexArray,h=n.indexArray,f=n.collisionVertexArray;this._addCollisionDebugVertex(p,f,a,s.anchor,new o(t,e)),this._addCollisionDebugVertex(p,f,a,s.anchor,new o(r,e)),this._addCollisionDebugVertex(p,f,a,s.anchor,new o(r,i)),this._addCollisionDebugVertex(p,f,a,s.anchor,new o(t,i)),u.vertexLength+=4,l?(h.emplaceBack(c,c+1,c+2),h.emplaceBack(c,c+2,c+3),u.primitiveLength+=2):(h.emplaceBack(c,c+1),h.emplaceBack(c+1,c+2),h.emplaceBack(c+2,c+3),h.emplaceBack(c+3,c),u.primitiveLength+=4)},P.prototype.generateCollisionDebugBuffers=function(){for(var t=this,e=0,r=t.symbolInstances;e<r.length;e+=1){var i=r[e];i.textCollisionFeature={boxStartIndex:i.textBoxStartIndex,boxEndIndex:i.textBoxEndIndex},i.iconCollisionFeature={boxStartIndex:i.iconBoxStartIndex,boxEndIndex:i.iconBoxEndIndex};for(var n=0;n<2;n++){var o=i[0===n?"textCollisionFeature":"iconCollisionFeature"];if(o)for(var a=o.boxStartIndex;a<o.boxEndIndex;a++){var s=t.collisionBoxArray.get(a),l=s.x1,u=s.y1,c=s.x2,p=s.y2,h=s.radius>0;t.addCollisionDebugVertices(l,u,c,p,h?t.collisionCircle:t.collisionBox,s.anchorPoint,i,h)}}}},P.prototype.deserializeCollisionBoxes=function(t,e,r,i,n){for(var o={},a=e;a<r;a++){var s=t.get(a);if(0===s.radius){o.textBox={x1:s.x1,y1:s.y1,x2:s.x2,y2:s.y2,anchorPointX:s.anchorPointX,anchorPointY:s.anchorPointY};break}o.textCircles||(o.textCircles=[]);o.textCircles.push(s.anchorPointX,s.anchorPointY,s.radius,s.signedDistanceFromAnchor,1)}for(var l=i;l<n;l++){var u=t.get(l);if(0===u.radius){o.iconBox={x1:u.x1,y1:u.y1,x2:u.x2,y2:u.y2,anchorPointX:u.anchorPointX,anchorPointY:u.anchorPointY};break}}return o},P.prototype.sortFeatures=function(t){var e=this;if(this.sortFeaturesByY&&this.sortedAngle!==t&&(this.sortedAngle=t,!(this.text.segments.get().length>1||this.icon.segments.get().length>1))){for(var r=[],i=0;i<this.symbolInstances.length;i++)r.push(i);var n=Math.sin(t),o=Math.cos(t);r.sort(function(t,r){var i=e.symbolInstances[t],a=e.symbolInstances[r];return(n*i.anchor.x+o*i.anchor.y|0)-(n*a.anchor.x+o*a.anchor.y|0)||a.featureIndex-i.featureIndex}),this.text.indexArray.clear(),this.icon.indexArray.clear();for(var a=0,s=r;a<s.length;a+=1){for(var l=s[a],u=0,c=e.symbolInstances[l].placedTextSymbolIndices;u<c.length;u+=1)for(var p=c[u],h=e.placedGlyphArray.get(p),f=h.vertexStartIndex+4*h.numGlyphs,d=h.vertexStartIndex;d<f;d+=4)e.text.indexArray.emplaceBack(d,d+1,d+2),e.text.indexArray.emplaceBack(d+1,d+2,d+3);var m=e.placedIconArray.get(l);if(m.numGlyphs){var y=m.vertexStartIndex;e.icon.indexArray.emplaceBack(y,y+1,y+2),e.icon.indexArray.emplaceBack(y+1,y+2,y+3)}}this.text.indexBuffer&&this.text.indexBuffer.updateData(this.text.indexArray.serialize()),this.icon.indexBuffer&&this.icon.indexBuffer.updateData(this.icon.indexArray.serialize())}},P.programInterfaces=M,P.MAX_GLYPHS=65535,P.addDynamicAttributes=n,e.exports=P},{"../../gl/index_buffer":72,"../../gl/vertex_buffer":73,"../../symbol/anchor":206,"../../symbol/mergelines":215,"../../symbol/opacity_state":216,"../../symbol/symbol_size":222,"../../symbol/transform_text":223,"../../util/script_detection":262,"../../util/struct_array":264,"../../util/verticalize_punctuation":269,"../index_array_type":61,"../load_geometry":62,"../program_configuration":64,"../segment":66,"../vertex_array_type":67,"@mapbox/point-geometry":2,"@mapbox/vector-tile":6}],59:[function(t,e,r){"use strict";e.exports=8192},{}],60:[function(t,e,r){"use strict";function i(t,e){return e-t}t("@mapbox/point-geometry");var n=t("./load_geometry"),o=t("./extent"),a=t("../style-spec/feature_filter"),s=t("../util/struct_array"),l=t("grid-index"),u=t("../util/dictionary_coder"),c=t("@mapbox/vector-tile"),p=t("pbf"),h=t("../util/vectortile_to_geojson"),f=t("../util/util").arraysIntersect,d=t("../source/tile_coord"),m=s({members:[{type:"Uint32",name:"featureIndex"},{type:"Uint16",name:"sourceLayerIndex"},{type:"Uint16",name:"bucketIndex"}]}),y=function(t,e,r,i){this.coord=t,this.overscaling=e,this.x=t.x,this.y=t.y,this.z=t.z-Math.log(e)/Math.LN2,this.grid=r||new l(o,16,0),this.featureIndexArray=i||new m};y.deserialize=function(t,e){var r=t.coord,i=new y(new d(r.z,r.x,r.y,r.w),t.overscaling,new l(t.grid),new m(t.featureIndexArray));return i.rawTileData=e,i.bucketLayerIDs=t.bucketLayerIDs,i},y.prototype.insert=function(t,e,r,i,n){var o=this,a=this.featureIndexArray.length;this.featureIndexArray.emplaceBack(r,i,n);for(var s=0;s<e.length;s++){for(var l=e[s],u=[1/0,1/0,-1/0,-1/0],c=0;c<l.length;c++){var p=l[c];u[0]=Math.min(u[0],p.x),u[1]=Math.min(u[1],p.y),u[2]=Math.max(u[2],p.x),u[3]=Math.max(u[3],p.y)}o.grid.insert(a,u[0],u[1],u[2],u[3])}},y.prototype.setCollisionIndex=function(t){this.collisionIndex=t},y.prototype.serialize=function(t){var e=this.grid.toArrayBuffer();return t&&t.push(e),{coord:this.coord,overscaling:this.overscaling,grid:e,featureIndexArray:this.featureIndexArray.serialize(t),bucketLayerIDs:this.bucketLayerIDs}},y.prototype.query=function(t,e){this.vtLayers||(this.vtLayers=new c.VectorTile(new p(this.rawTileData)).layers,this.sourceLayerCoder=new u(this.vtLayers?Object.keys(this.vtLayers).sort():["_geojsonTileLayer"]));for(var r={},n=t.params||{},s=o/t.tileSize/t.scale,l=a(n.filter),h=t.queryGeometry,f=t.additionalRadius*s,d=1/0,m=1/0,y=-1/0,g=-1/0,v=0;v<h.length;v++)for(var _=h[v],x=0;x<_.length;x++){var b=_[x];d=Math.min(d,b.x),m=Math.min(m,b.y),y=Math.max(y,b.x),g=Math.max(g,b.y)}var w=this.grid.query(d-f,m-f,y+f,g+f);w.sort(i),this.filterMatching(r,w,this.featureIndexArray,h,l,n.layers,e,t.bearing,s);var z=this.collisionIndex?this.collisionIndex.queryRenderedSymbols(h,this.coord,t.tileSourceMaxZoom,o/t.tileSize,t.collisionBoxArray,t.sourceID):[];return z.sort(),this.filterMatching(r,z,t.collisionBoxArray,h,l,n.layers,e,t.bearing,s),r},y.prototype.filterMatching=function(t,e,r,i,o,a,s,l,u){for(var c,p=this,d=0;d<e.length;d++){var m=e[d];if(m!==c){c=m;var y=r.get(m),g=p.bucketLayerIDs[y.bucketIndex];if(!a||f(a,g)){var v=p.sourceLayerCoder.decode(y.sourceLayerIndex),_=p.vtLayers[v].feature(y.featureIndex);if(o({zoom:p.coord.z},_))for(var x=null,b=0;b<g.length;b++){var w=g[b];if(!(a&&a.indexOf(w)<0)){var z=s[w];if(z&&("symbol"===z.type||(x||(x=n(_)),z.queryIntersectsFeature(i,_,x,p.z,l,u)))){var T=new h(_,p.z,p.x,p.y);T.layer=z.serialize();var S=t[w];void 0===S&&(S=t[w]=[]),S.push({featureIndex:m,feature:T})}}}}}}},y.prototype.hasLayer=function(t){for(var e=0,r=this.bucketLayerIDs;e<r.length;e+=1)for(var i=0,n=r[e];i<n.length;i+=1)if(t===n[i])return!0;return!1},e.exports=y},{"../source/tile_coord":113,"../style-spec/feature_filter":146,"../util/dictionary_coder":251,"../util/struct_array":264,"../util/util":267,"../util/vectortile_to_geojson":268,"./extent":59,"./load_geometry":62,"@mapbox/point-geometry":2,"@mapbox/vector-tile":6,"grid-index":24,pbf:39}],61:[function(t,e,r){"use strict";function i(t){return n({members:[{type:"Uint16",name:"vertices",components:t}]})}var n=t("../util/struct_array");e.exports={LineIndexArray:i(2),TriangleIndexArray:i(3)}},{"../util/struct_array":264}],62:[function(t,e,r){"use strict";var i=t("../util/util"),n=t("./extent"),o=function(t){return{min:-1*Math.pow(2,t-1),max:Math.pow(2,t-1)-1}}(16);e.exports=function(t){for(var e=n/t.extent,r=t.loadGeometry(),a=0;a<r.length;a++)for(var s=r[a],l=0;l<s.length;l++){var u=s[l];u.x=Math.round(u.x*e),u.y=Math.round(u.y*e),(u.x<o.min||u.x>o.max||u.y<o.min||u.y>o.max)&&i.warnOnce("Geometry exceeds allowed extent, reduce your vector tile buffer size")}return r}},{"../util/util":267,"./extent":59}],63:[function(t,e,r){"use strict";var i=t("../util/struct_array")({members:[{name:"a_pos",type:"Int16",components:2}]});e.exports=i},{"../util/struct_array":264}],64:[function(t,e,r){"use strict";function i(t){return[o(255*t.r,255*t.g),o(255*t.b,255*t.a)]}var n=t("./vertex_array_type"),o=t("../shaders/encode_attribute").packUint8ToFloat,a=t("../gl/vertex_buffer"),s=t("../style-spec/util/color"),l=function(t,e,r,i){this.value=t,this.name=e,this.type=r,this.property=i,this.statistics={max:-1/0}};l.prototype.defines=function(){return["#define HAS_UNIFORM_u_"+this.name]},l.prototype.populatePaintArray=function(){},l.prototype.setUniforms=function(t,e,r,i){var n=i.constantOr(this.value);"color"===this.type?t.uniform4f(e.uniforms["u_"+this.name],n.r,n.g,n.b,n.a):t.uniform1f(e.uniforms["u_"+this.name],n)};var u=function(t,e,r,i){this.expression=t,this.name=e,this.type=r,this.property=i,this.statistics={max:-1/0}};u.prototype.defines=function(){return[]},u.prototype.populatePaintArray=function(t,e,r,n){var o=this,a=this.expression.evaluate({zoom:0},n);if("color"===this.type)for(var s=i(a),l=e;l<r;l++){var u=t.get(l);u["a_"+o.name+"0"]=s[0],u["a_"+o.name+"1"]=s[1]}else{for(var c=e;c<r;c++)t.get(c)["a_"+o.name]=a;this.statistics.max=Math.max(this.statistics.max,a)}},u.prototype.setUniforms=function(t,e){t.uniform1f(e.uniforms["a_"+this.name+"_t"],0)};var c=function(t,e,r,i,n,o){this.expression=t,this.name=e,this.type=r,this.property=i,this.useIntegerZoom=n,this.zoom=o,this.statistics={max:-1/0}};c.prototype.defines=function(){return[]},c.prototype.populatePaintArray=function(t,e,r,n){var o=this,a=this.expression.evaluate({zoom:this.zoom},n),s=this.expression.evaluate({zoom:this.zoom+1},n);if("color"===this.type)for(var l=i(a),u=i(s),c=e;c<r;c++){var p=t.get(c);p["a_"+o.name+"0"]=l[0],p["a_"+o.name+"1"]=l[1],p["a_"+o.name+"2"]=u[0],p["a_"+o.name+"3"]=u[1]}else{for(var h=e;h<r;h++){var f=t.get(h);f["a_"+o.name+"0"]=a,f["a_"+o.name+"1"]=s}this.statistics.max=Math.max(this.statistics.max,a,s)}},c.prototype.interpolationFactor=function(t){return this.useIntegerZoom?this.expression.interpolationFactor(Math.floor(t),this.zoom,this.zoom+1):this.expression.interpolationFactor(t,this.zoom,this.zoom+1)},c.prototype.setUniforms=function(t,e,r){t.uniform1f(e.uniforms["a_"+this.name+"_t"],this.interpolationFactor(r.zoom))};var p=function(){this.binders={},this.cacheKey=""};p.createDynamic=function(t,e,r){for(var i=new p,o=[],a=0,s=t.paintAttributes||[];a<s.length;a+=1){var h=s[a],f=h.property,d=h.name||f.replace(e.type+"-","").replace(/-/g,"_"),m=e.paint.get(f),y=m.property.specification.type,g=m.property.useIntegerZoom;"constant"===m.value.kind?(i.binders[d]=new l(m.value,d,y,f),i.cacheKey+="/u_"+d):"source"===m.value.kind?(i.binders[d]=new u(m.value,d,y,f),i.cacheKey+="/a_"+d,o.push({name:"a_"+d,type:"Float32",components:"color"===y?2:1})):(i.binders[d]=new c(m.value,d,y,f,g,r),i.cacheKey+="/z_"+d,o.push({name:"a_"+d,type:"Float32",components:"color"===y?4:2}))}return i.PaintVertexArray=n(o),i.interface=t,i.layer=e,i},p.forBackgroundColor=function(t,e){var r=new p;return r.binders.color=new l(t,"color","color","background-color"),r.cacheKey+="/u_color",r.binders.opacity=new l(e,"opacity","number","background-opacity"),r.cacheKey+="/u_opacity",r},p.forBackgroundPattern=function(t){var e=new p;return e.binders.opacity=new l(t,"opacity","number","background-opacity"),e.cacheKey+="/u_opacity",e},p.forTileClippingMask=function(){return p.forBackgroundColor(s.black,1)},p.prototype.populatePaintArray=function(t,e){var r=this,i=this.paintVertexArray;if(0!==i.bytesPerElement){var n=i.length;i.resize(t);for(var o in r.binders)r.binders[o].populatePaintArray(i,n,t,e)}},p.prototype.defines=function(){var t=this,e=[];for(var r in t.binders)e.push.apply(e,t.binders[r].defines());return e},p.prototype.setUniforms=function(t,e,r,i){var n=this;for(var o in n.binders){var a=n.binders[o];a.setUniforms(t,e,i,r.get(a.property))}},p.prototype.serialize=function(t){var e=this;if(0===this.paintVertexArray.length)return null;var r={};for(var i in e.binders)r[e.binders[i].property]=e.binders[i].statistics;return{array:this.paintVertexArray.serialize(t),type:this.paintVertexArray.constructor.serialize(),statistics:r}},p.deserialize=function(t,e,r,i){var o=p.createDynamic(t,e,r);return i&&(o.PaintVertexArray=n(i.type.members),o.paintVertexArray=new o.PaintVertexArray(i.array),o.paintPropertyStatistics=i.statistics),o},p.prototype.upload=function(t){this.paintVertexArray&&(this.paintVertexBuffer=new a(t,this.paintVertexArray))},p.prototype.destroy=function(){this.paintVertexBuffer&&this.paintVertexBuffer.destroy()};var h=function(t,e,r,i){var n=this;if(this.programConfigurations={},i)for(var o=0,a=e;o<a.length;o+=1){var s=a[o];n.programConfigurations[s.id]=p.deserialize(t,s,r,i[s.id])}else for(var l=0,u=e;l<u.length;l+=1){var c=u[l],h=p.createDynamic(t,c,r);h.paintVertexArray=new h.PaintVertexArray,n.programConfigurations[c.id]=h}};h.prototype.populatePaintArrays=function(t,e){var r=this;for(var i in r.programConfigurations)r.programConfigurations[i].populatePaintArray(t,e)},h.prototype.serialize=function(t){var e=this,r={};for(var i in e.programConfigurations){var n=e.programConfigurations[i].serialize(t);n&&(r[i]=n)}return r},h.prototype.get=function(t){return this.programConfigurations[t]},h.prototype.upload=function(t){var e=this;for(var r in e.programConfigurations)e.programConfigurations[r].upload(t)},h.prototype.destroy=function(){var t=this;for(var e in t.programConfigurations)t.programConfigurations[e].destroy()},e.exports={ProgramConfiguration:p,ProgramConfigurationSet:h}},{"../gl/vertex_buffer":73,"../shaders/encode_attribute":97,"../style-spec/util/color":151,"./vertex_array_type":67}],65:[function(t,e,r){"use strict";var i=t("../util/struct_array")({members:[{name:"a_pos",type:"Int16",components:2},{name:"a_texture_pos",type:"Int16",components:2}]});e.exports=i},{"../util/struct_array":264}],66:[function(t,e,r){"use strict";var i=t("../util/util").warnOnce,n=Math.pow(2,16)-1,o=function(t){void 0===t&&(t=[]),this.segments=t};o.prototype.prepareSegment=function(t,r,o){var a=this.segments[this.segments.length-1];return t>n&&i("Max vertices per segment is "+n+": bucket requested "+t),(!a||a.vertexLength+t>e.exports.MAX_VERTEX_ARRAY_LENGTH)&&(a={vertexOffset:r.length,primitiveOffset:o.length,vertexLength:0,primitiveLength:0},this.segments.push(a)),a},o.prototype.get=function(){return this.segments},o.prototype.destroy=function(){for(var t=0,e=this.segments;t<e.length;t+=1){var r=e[t];for(var i in r.vaos)r.vaos[i].destroy()}},e.exports={SegmentVector:o,MAX_VERTEX_ARRAY_LENGTH:n}},{"../util/util":267}],67:[function(t,e,r){"use strict";var i=t("../util/struct_array");e.exports=function(t){return i({members:t,alignment:4})}},{"../util/struct_array":264}],68:[function(t,e,r){"use strict";var i=function(t,e,r){this.column=t,this.row=e,this.zoom=r};i.prototype.clone=function(){return new i(this.column,this.row,this.zoom)},i.prototype.zoomTo=function(t){return this.clone()._zoomTo(t)},i.prototype.sub=function(t){return this.clone()._sub(t)},i.prototype._zoomTo=function(t){var e=Math.pow(2,t-this.zoom);return this.column*=e,this.row*=e,this.zoom=t,this},i.prototype._sub=function(t){return t=t.zoomTo(this.zoom),this.column-=t.column,this.row-=t.row,this},e.exports=i},{}],69:[function(t,e,r){"use strict";var i=t("../util/util").wrap,n=function(t,e){if(isNaN(t)||isNaN(e))throw new Error("Invalid LngLat object: ("+t+", "+e+")");if(this.lng=+t,this.lat=+e,this.lat>90||this.lat<-90)throw new Error("Invalid LngLat latitude value: must be between -90 and 90")};n.prototype.wrap=function(){return new n(i(this.lng,-180,180),this.lat)},n.prototype.toArray=function(){return[this.lng,this.lat]},n.prototype.toString=function(){return"LngLat("+this.lng+", "+this.lat+")"},n.prototype.toBounds=function(e){var r=360*e/40075017,i=r/Math.cos(Math.PI/180*this.lat);return new(t("./lng_lat_bounds"))(new n(this.lng-i,this.lat-r),new n(this.lng+i,this.lat+r))},n.convert=function(t){if(t instanceof n)return t;if(Array.isArray(t)&&(2===t.length||3===t.length))return new n(Number(t[0]),Number(t[1]));if(!Array.isArray(t)&&"object"==typeof t&&null!==t)return new n(Number(t.lng),Number(t.lat));throw new Error("`LngLatLike` argument must be specified as a LngLat instance, an object {lng: <lng>, lat: <lat>}, or an array of [<lng>, <lat>]")},e.exports=n},{"../util/util":267,"./lng_lat_bounds":70}],70:[function(t,e,r){"use strict";var i=t("./lng_lat"),n=function(t,e){t&&(e?this.setSouthWest(t).setNorthEast(e):4===t.length?this.setSouthWest([t[0],t[1]]).setNorthEast([t[2],t[3]]):this.setSouthWest(t[0]).setNorthEast(t[1]))};n.prototype.setNorthEast=function(t){return this._ne=t instanceof i?new i(t.lng,t.lat):i.convert(t),this},n.prototype.setSouthWest=function(t){return this._sw=t instanceof i?new i(t.lng,t.lat):i.convert(t),this},n.prototype.extend=function(t){var e,r,o=this._sw,a=this._ne;if(t instanceof i)e=t,r=t;else{if(!(t instanceof n))return Array.isArray(t)?t.every(Array.isArray)?this.extend(n.convert(t)):this.extend(i.convert(t)):this;if(e=t._sw,r=t._ne,!e||!r)return this}return o||a?(o.lng=Math.min(e.lng,o.lng),o.lat=Math.min(e.lat,o.lat),a.lng=Math.max(r.lng,a.lng),a.lat=Math.max(r.lat,a.lat)):(this._sw=new i(e.lng,e.lat),this._ne=new i(r.lng,r.lat)),this},n.prototype.getCenter=function(){return new i((this._sw.lng+this._ne.lng)/2,(this._sw.lat+this._ne.lat)/2)},n.prototype.getSouthWest=function(){return this._sw},n.prototype.getNorthEast=function(){return this._ne},n.prototype.getNorthWest=function(){return new i(this.getWest(),this.getNorth())},n.prototype.getSouthEast=function(){return new i(this.getEast(),this.getSouth())},n.prototype.getWest=function(){return this._sw.lng},n.prototype.getSouth=function(){return this._sw.lat},n.prototype.getEast=function(){return this._ne.lng},n.prototype.getNorth=function(){return this._ne.lat},n.prototype.toArray=function(){return[this._sw.toArray(),this._ne.toArray()]},n.prototype.toString=function(){return"LngLatBounds("+this._sw.toString()+", "+this._ne.toString()+")"},n.convert=function(t){return!t||t instanceof n?t:new n(t)},e.exports=n},{"./lng_lat":69}],71:[function(t,e,r){"use strict";var i=t("./lng_lat"),n=t("@mapbox/point-geometry"),o=t("./coordinate"),a=t("../util/util"),s=t("../style-spec/util/interpolate").number,l=t("../source/tile_coord"),u=t("../data/extent"),c=t("@mapbox/gl-matrix"),p=c.vec4,h=c.mat4,f=c.mat2,d=function(t,e,r){this.tileSize=512,this._renderWorldCopies=void 0===r||r,this._minZoom=t||0,this._maxZoom=e||22,this.latRange=[-85.05113,85.05113],this.width=0,this.height=0,this._center=new i(0,0),this.zoom=0,this.angle=0,this._fov=.6435011087932844,this._pitch=0,this._unmodified=!0,this._posMatrixCache={}},m={minZoom:{},maxZoom:{},renderWorldCopies:{},worldSize:{},centerPoint:{},size:{},bearing:{},pitch:{},fov:{},zoom:{},center:{},unmodified:{},x:{},y:{},point:{}};d.prototype.clone=function(){var t=new d(this._minZoom,this._maxZoom,this._renderWorldCopies);return t.tileSize=this.tileSize,t.latRange=this.latRange,t.width=this.width,t.height=this.height,t._center=this._center,t.zoom=this.zoom,t.angle=this.angle,t._fov=this._fov,t._pitch=this._pitch,t._unmodified=this._unmodified,t._calcMatrices(),t},m.minZoom.get=function(){return this._minZoom},m.minZoom.set=function(t){this._minZoom!==t&&(this._minZoom=t,this.zoom=Math.max(this.zoom,t))},m.maxZoom.get=function(){return this._maxZoom},m.maxZoom.set=function(t){this._maxZoom!==t&&(this._maxZoom=t,this.zoom=Math.min(this.zoom,t))},m.renderWorldCopies.get=function(){return this._renderWorldCopies},m.worldSize.get=function(){return this.tileSize*this.scale},m.centerPoint.get=function(){return this.size._div(2)},m.size.get=function(){return new n(this.width,this.height)},m.bearing.get=function(){return-this.angle/Math.PI*180},m.bearing.set=function(t){var e=-a.wrap(t,-180,180)*Math.PI/180;this.angle!==e&&(this._unmodified=!1,this.angle=e,this._calcMatrices(),this.rotationMatrix=f.create(),f.rotate(this.rotationMatrix,this.rotationMatrix,this.angle))},m.pitch.get=function(){return this._pitch/Math.PI*180},m.pitch.set=function(t){var e=a.clamp(t,0,60)/180*Math.PI;this._pitch!==e&&(this._unmodified=!1,this._pitch=e,this._calcMatrices())},m.fov.get=function(){return this._fov/Math.PI*180},m.fov.set=function(t){t=Math.max(.01,Math.min(60,t)),this._fov!==t&&(this._unmodified=!1,this._fov=t/180*Math.PI,this._calcMatrices())},m.zoom.get=function(){return this._zoom},m.zoom.set=function(t){var e=Math.min(Math.max(t,this.minZoom),this.maxZoom);this._zoom!==e&&(this._unmodified=!1,this._zoom=e,this.scale=this.zoomScale(e),this.tileZoom=Math.floor(e),this.zoomFraction=e-this.tileZoom,this._constrain(),this._calcMatrices())},m.center.get=function(){return this._center},m.center.set=function(t){t.lat===this._center.lat&&t.lng===this._center.lng||(this._unmodified=!1,this._center=t,this._constrain(),this._calcMatrices())},d.prototype.coveringZoomLevel=function(t){return(t.roundZoom?Math.round:Math.floor)(this.zoom+this.scaleZoom(this.tileSize/t.tileSize))},d.prototype.getVisibleWrappedCoordinates=function(t){for(var e=this.pointCoordinate(new n(0,0),0),r=this.pointCoordinate(new n(this.width,0),0),i=Math.floor(e.column),o=Math.floor(r.column),a=[t],s=i;s<=o;s++)0!==s&&a.push(new l(t.z,t.x,t.y,s));return a},d.prototype.coveringTiles=function(t){var e=this.coveringZoomLevel(t),r=e;if(void 0!==t.minzoom&&e<t.minzoom)return[];void 0!==t.maxzoom&&e>t.maxzoom&&(e=t.maxzoom);var i=this.pointCoordinate(this.centerPoint,e),o=new n(i.column-.5,i.row-.5),a=[this.pointCoordinate(new n(0,0),e),this.pointCoordinate(new n(this.width,0),e),this.pointCoordinate(new n(this.width,this.height),e),this.pointCoordinate(new n(0,this.height),e)];return l.cover(e,a,t.reparseOverscaled?r:e,this._renderWorldCopies).sort(function(t,e){return o.dist(t)-o.dist(e)})},d.prototype.resize=function(t,e){this.width=t,this.height=e,this.pixelsToGLUnits=[2/t,-2/e],this._constrain(),this._calcMatrices()},m.unmodified.get=function(){return this._unmodified},d.prototype.zoomScale=function(t){return Math.pow(2,t)},d.prototype.scaleZoom=function(t){return Math.log(t)/Math.LN2},d.prototype.project=function(t){return new n(this.lngX(t.lng),this.latY(t.lat))},d.prototype.unproject=function(t){return new i(this.xLng(t.x),this.yLat(t.y))},m.x.get=function(){return this.lngX(this.center.lng)},m.y.get=function(){return this.latY(this.center.lat)},m.point.get=function(){return new n(this.x,this.y)},d.prototype.lngX=function(t){return(180+t)*this.worldSize/360},d.prototype.latY=function(t){return(180-180/Math.PI*Math.log(Math.tan(Math.PI/4+t*Math.PI/360)))*this.worldSize/360},d.prototype.xLng=function(t){return 360*t/this.worldSize-180},d.prototype.yLat=function(t){var e=180-360*t/this.worldSize;return 360/Math.PI*Math.atan(Math.exp(e*Math.PI/180))-90},d.prototype.setLocationAtPoint=function(t,e){var r=this.pointCoordinate(e)._sub(this.pointCoordinate(this.centerPoint));this.center=this.coordinateLocation(this.locationCoordinate(t)._sub(r)),this._renderWorldCopies&&(this.center=this.center.wrap())},d.prototype.locationPoint=function(t){return this.coordinatePoint(this.locationCoordinate(t))},d.prototype.pointLocation=function(t){return this.coordinateLocation(this.pointCoordinate(t))},d.prototype.locationCoordinate=function(t){return new o(this.lngX(t.lng)/this.tileSize,this.latY(t.lat)/this.tileSize,this.zoom).zoomTo(this.tileZoom)},d.prototype.coordinateLocation=function(t){var e=t.zoomTo(this.zoom);return new i(this.xLng(e.column*this.tileSize),this.yLat(e.row*this.tileSize))},d.prototype.pointCoordinate=function(t,e){void 0===e&&(e=this.tileZoom);var r=[t.x,t.y,0,1],i=[t.x,t.y,1,1];p.transformMat4(r,r,this.pixelMatrixInverse),p.transformMat4(i,i,this.pixelMatrixInverse);var n=r[3],a=i[3],l=r[0]/n,u=i[0]/a,c=r[1]/n,h=i[1]/a,f=r[2]/n,d=i[2]/a,m=f===d?0:(0-f)/(d-f);return new o(s(l,u,m)/this.tileSize,s(c,h,m)/this.tileSize,this.zoom)._zoomTo(e)},d.prototype.coordinatePoint=function(t){var e=t.zoomTo(this.zoom),r=[e.column*this.tileSize,e.row*this.tileSize,0,1];return p.transformMat4(r,r,this.pixelMatrix),new n(r[0]/r[3],r[1]/r[3])},d.prototype.calculatePosMatrix=function(t,e){var r=t.id.toString();if(e&&(r+=e.toString()),this._posMatrixCache[r])return this._posMatrixCache[r];var i=t.toCoordinate(e),n=this.worldSize/this.zoomScale(i.zoom),o=h.identity(new Float64Array(16));return h.translate(o,o,[i.column*n,i.row*n,0]),h.scale(o,o,[n/u,n/u,1]),h.multiply(o,this.projMatrix,o),this._posMatrixCache[r]=new Float32Array(o),this._posMatrixCache[r]},d.prototype._constrain=function(){if(this.center&&this.width&&this.height&&!this._constraining){this._constraining=!0;var t,e,r,i,o=-90,a=90,s=-180,l=180,u=this.size,c=this._unmodified;if(this.latRange){var p=this.latRange;o=this.latY(p[1]),t=(a=this.latY(p[0]))-o<u.y?u.y/(a-o):0}if(this.lngRange){var h=this.lngRange;s=this.lngX(h[0]),e=(l=this.lngX(h[1]))-s<u.x?u.x/(l-s):0}var f=Math.max(e||0,t||0);if(f)return this.center=this.unproject(new n(e?(l+s)/2:this.x,t?(a+o)/2:this.y)),this.zoom+=this.scaleZoom(f),this._unmodified=c,void(this._constraining=!1);if(this.latRange){var d=this.y,m=u.y/2;d-m<o&&(i=o+m),d+m>a&&(i=a-m)}if(this.lngRange){var y=this.x,g=u.x/2;y-g<s&&(r=s+g),y+g>l&&(r=l-g)}void 0===r&&void 0===i||(this.center=this.unproject(new n(void 0!==r?r:this.x,void 0!==i?i:this.y))),this._unmodified=c,this._constraining=!1}},d.prototype._calcMatrices=function(){if(this.height){this.cameraToCenterDistance=.5/Math.tan(this._fov/2)*this.height;var t=this._fov/2,e=Math.PI/2+this._pitch,r=Math.sin(t)*this.cameraToCenterDistance/Math.sin(Math.PI-e-t),i=1.01*(Math.cos(Math.PI/2-this._pitch)*r+this.cameraToCenterDistance),n=new Float64Array(16);h.perspective(n,this._fov,this.width/this.height,1,i),h.scale(n,n,[1,-1,1]),h.translate(n,n,[0,0,-this.cameraToCenterDistance]),h.rotateX(n,n,this._pitch),h.rotateZ(n,n,this.angle),h.translate(n,n,[-this.x,-this.y,0]);var o=this.worldSize/(2*Math.PI*6378137*Math.abs(Math.cos(this.center.lat*(Math.PI/180))));if(h.scale(n,n,[1,1,o,1]),this.projMatrix=n,n=h.create(),h.scale(n,n,[this.width/2,-this.height/2,1]),h.translate(n,n,[1,-1,0]),this.pixelMatrix=h.multiply(new Float64Array(16),n,this.projMatrix),!(n=h.invert(new Float64Array(16),this.pixelMatrix)))throw new Error("failed to invert matrix");this.pixelMatrixInverse=n,this._posMatrixCache={}}},Object.defineProperties(d.prototype,m),e.exports=d},{"../data/extent":59,"../source/tile_coord":113,"../style-spec/util/interpolate":155,"../util/util":267,"./coordinate":68,"./lng_lat":69,"@mapbox/gl-matrix":1,"@mapbox/point-geometry":2}],72:[function(t,e,r){"use strict";var i=t("assert"),n=function(t,e,r){this.gl=t,this.buffer=t.createBuffer(),this.dynamicDraw=Boolean(r),this.unbindVAO(),t.bindBuffer(t.ELEMENT_ARRAY_BUFFER,this.buffer),t.bufferData(t.ELEMENT_ARRAY_BUFFER,e.arrayBuffer,this.dynamicDraw?t.DYNAMIC_DRAW:t.STATIC_DRAW),this.dynamicDraw||delete e.arrayBuffer};n.prototype.unbindVAO=function(){void 0===this.gl.extVertexArrayObject&&(this.gl.extVertexArrayObject=this.gl.getExtension("OES_vertex_array_object")),this.gl.extVertexArrayObject&&this.gl.extVertexArrayObject.bindVertexArrayOES(null)},n.prototype.bind=function(){this.gl.bindBuffer(this.gl.ELEMENT_ARRAY_BUFFER,this.buffer)},n.prototype.updateData=function(t){i(this.dynamicDraw),this.unbindVAO(),this.bind(),this.gl.bufferSubData(this.gl.ELEMENT_ARRAY_BUFFER,0,t.arrayBuffer)},n.prototype.destroy=function(){this.buffer&&(this.gl.deleteBuffer(this.buffer),delete this.buffer)},e.exports=n},{assert:11}],73:[function(t,e,r){"use strict";var i={Int8:"BYTE",Uint8:"UNSIGNED_BYTE",Int16:"SHORT",Uint16:"UNSIGNED_SHORT",Int32:"INT",Uint32:"UNSIGNED_INT",Float32:"FLOAT"},n=function(t,e,r){this.length=e.length,this.attributes=e.members,this.itemSize=e.bytesPerElement,this.dynamicDraw=r,this.gl=t,this.buffer=t.createBuffer(),this.gl.bindBuffer(t.ARRAY_BUFFER,this.buffer),this.gl.bufferData(t.ARRAY_BUFFER,e.arrayBuffer,this.dynamicDraw?t.DYNAMIC_DRAW:t.STATIC_DRAW),this.dynamicDraw||delete e.arrayBuffer};n.prototype.bind=function(){this.gl.bindBuffer(this.gl.ARRAY_BUFFER,this.buffer)},n.prototype.updateData=function(t){this.bind(),this.gl.bufferSubData(this.gl.ARRAY_BUFFER,0,t.arrayBuffer)},n.prototype.enableAttributes=function(t,e){for(var r=this,i=0;i<this.attributes.length;i++){var n=r.attributes[i],o=e.attributes[n.name];void 0!==o&&t.enableVertexAttribArray(o)}},n.prototype.setVertexAttribPointers=function(t,e,r){for(var n=this,o=0;o<this.attributes.length;o++){var a=n.attributes[o],s=e.attributes[a.name];void 0!==s&&t.vertexAttribPointer(s,a.components,t[i[a.type]],!1,n.itemSize,a.offset+n.itemSize*(r||0))}},n.prototype.destroy=function(){this.buffer&&(this.gl.deleteBuffer(this.buffer),delete this.buffer)},e.exports=n},{}],74:[function(t,e,r){"use strict";var i=t("mapbox-gl-supported"),n=t("./util/browser"),o=t("../package.json").version,a=t("./ui/map"),s=t("./ui/control/navigation_control"),l=t("./ui/control/geolocate_control"),u=t("./ui/control/attribution_control"),c=t("./ui/control/scale_control"),p=t("./ui/control/fullscreen_control"),h=t("./ui/popup"),f=t("./ui/marker"),d=t("./style/style"),m=t("./geo/lng_lat"),y=t("./geo/lng_lat_bounds"),g=t("@mapbox/point-geometry"),v=t("./util/evented"),_=t("./util/config"),x=t("./source/rtl_text_plugin");e.exports={version:o,supported:i,workerCount:Math.max(Math.floor(n.hardwareConcurrency/2),1),setRTLTextPlugin:x.setRTLTextPlugin,Map:a,NavigationControl:s,GeolocateControl:l,AttributionControl:u,ScaleControl:c,FullscreenControl:p,Popup:h,Marker:f,Style:d,LngLat:m,LngLatBounds:y,Point:g,Evented:v,config:_,get accessToken(){return _.ACCESS_TOKEN},set accessToken(t){_.ACCESS_TOKEN=t}}},{"../package.json":51,"./geo/lng_lat":69,"./geo/lng_lat_bounds":70,"./source/rtl_text_plugin":108,"./style/style":186,"./ui/control/attribution_control":226,"./ui/control/fullscreen_control":227,"./ui/control/geolocate_control":228,"./ui/control/navigation_control":230,"./ui/control/scale_control":231,"./ui/map":241,"./ui/marker":242,"./ui/popup":243,"./util/browser":246,"./util/config":250,"./util/evented":254,"@mapbox/point-geometry":2,"mapbox-gl-supported":38}],75:[function(t,e,r){"use strict";var i=t("./pattern"),n=t("../data/program_configuration").ProgramConfiguration,o=t("../style/properties"),a=o.PossiblyEvaluated,s=o.PossiblyEvaluatedPropertyValue,l=t("../style/style_layer/fill_style_layer_properties").paint;e.exports=function(t,e,r){var o=r.paint.get("background-color"),u=r.paint.get("background-opacity");if(0!==u){var c=t.gl,p=t.transform,h=p.tileSize,f=r.paint.get("background-pattern"),d={zoom:p.zoom},m=f||1!==o.a||1!==u?"translucent":"opaque";if(t.renderPass===m){c.disable(c.STENCIL_TEST),t.setDepthSublayer(0);var y=new a(l);y._values["background-color"]=new s(l.properties["fill-color"],{kind:"constant",value:o},d),y._values["background-opacity"]=new s(l.properties["fill-opacity"],{kind:"constant",value:u},d);var g;if(f){if(i.isPatternMissing(f,t))return;var v=n.forBackgroundPattern(u);g=t.useProgram("fillPattern",v),v.setUniforms(c,g,y,d),i.prepare(f,t,g),t.tileExtentPatternVAO.bind(c,g,t.tileExtentBuffer)}else{var _=n.forBackgroundColor(o,u);g=t.useProgram("fill",_),_.setUniforms(c,g,y,d),t.tileExtentVAO.bind(c,g,t.tileExtentBuffer)}for(var x=0,b=p.coveringTiles({tileSize:h});x<b.length;x+=1){var w=b[x];f&&i.setTile({coord:w,tileSize:h},t,g),c.uniformMatrix4fv(g.uniforms.u_matrix,!1,t.transform.calculatePosMatrix(w)),c.drawArrays(c.TRIANGLE_STRIP,0,t.tileExtentBuffer.length)}}}}},{"../data/program_configuration":64,"../style/properties":184,"../style/style_layer/fill_style_layer_properties":195,"./pattern":91}],76:[function(t,e,r){"use strict";var i=t("../source/pixels_to_tile_units");e.exports=function(t,e,r,n){if("translucent"===t.renderPass){var o=r.paint.get("circle-opacity"),a=r.paint.get("circle-stroke-width"),s=r.paint.get("circle-stroke-opacity");if(0!==o.constantOr(1)||0!==a.constantOr(1)&&0!==s.constantOr(1)){var l=t.gl;t.setDepthSublayer(0),t.depthMask(!1),l.disable(l.STENCIL_TEST);for(var u=0;u<n.length;u++){var c=n[u],p=e.getTile(c),h=p.getBucket(r);if(h){var f=h.programConfigurations.get(r.id),d=t.useProgram("circle",f);if(f.setUniforms(l,d,r.paint,{zoom:t.transform.zoom}),l.uniform1f(d.uniforms.u_camera_to_center_distance,t.transform.cameraToCenterDistance),l.uniform1i(d.uniforms.u_scale_with_map,"map"===r.paint.get("circle-pitch-scale")?1:0),"map"===r.paint.get("circle-pitch-alignment")){l.uniform1i(d.uniforms.u_pitch_with_map,1);var m=i(p,1,t.transform.zoom);l.uniform2f(d.uniforms.u_extrude_scale,m,m)}else l.uniform1i(d.uniforms.u_pitch_with_map,0),l.uniform2fv(d.uniforms.u_extrude_scale,t.transform.pixelsToGLUnits);l.uniformMatrix4fv(d.uniforms.u_matrix,!1,t.translatePosMatrix(c.posMatrix,p,r.paint.get("circle-translate"),r.paint.get("circle-translate-anchor"))),d.draw(l,l.TRIANGLES,r.id,h.layoutVertexBuffer,h.indexBuffer,h.segments,f)}}}}}},{"../source/pixels_to_tile_units":105}],77:[function(t,e,r){"use strict";function i(t,e,r,i,o){for(var a=t.gl,s=o?t.useProgram("collisionCircle"):t.useProgram("collisionBox"),l=0;l<i.length;l++){var u=i[l],c=e.getTile(u),p=c.getBucket(r);if(p){var h=o?p.collisionCircle:p.collisionBox;if(h){a.uniformMatrix4fv(s.uniforms.u_matrix,!1,u.posMatrix),o||t.lineWidth(1),a.uniform1f(s.uniforms.u_camera_to_center_distance,t.transform.cameraToCenterDistance);var f=n(c,1,t.transform.zoom),d=Math.pow(2,t.transform.zoom-c.coord.z);a.uniform1f(s.uniforms.u_pixels_to_tile_units,f),a.uniform2f(s.uniforms.u_extrude_scale,t.transform.pixelsToGLUnits[0]/(f*d),t.transform.pixelsToGLUnits[1]/(f*d)),s.draw(a,o?a.TRIANGLES:a.LINES,r.id,h.layoutVertexBuffer,h.indexBuffer,h.segments,null,h.collisionVertexBuffer,null)}}}}var n=t("../source/pixels_to_tile_units");e.exports=function(t,e,r,n){i(t,e,r,n,!1),i(t,e,r,n,!0)}},{"../source/pixels_to_tile_units":105}],78:[function(t,e,r){"use strict";function i(t,e,r){var i=t.gl;i.disable(i.STENCIL_TEST),t.lineWidth(1*o.devicePixelRatio);var p=r.posMatrix,h=t.useProgram("debug");i.uniformMatrix4fv(h.uniforms.u_matrix,!1,p),i.uniform4f(h.uniforms.u_color,1,0,0,1),t.debugVAO.bind(i,h,t.debugBuffer),i.drawArrays(i.LINE_STRIP,0,t.debugBuffer.length);for(var f=n(r.toString(),50,200,5),d=new c,m=0;m<f.length;m+=2)d.emplaceBack(f[m],f[m+1]);var y=new l(i,d);(new u).bind(i,h,y),i.uniform4f(h.uniforms.u_color,1,1,1,1);for(var g=e.getTile(r).tileSize,v=s/(Math.pow(2,t.transform.zoom-r.z)*g),_=[[-1,-1],[-1,1],[1,-1],[1,1]],x=0;x<_.length;x++){var b=_[x];i.uniformMatrix4fv(h.uniforms.u_matrix,!1,a.translate([],p,[v*b[0],v*b[1],0])),i.drawArrays(i.LINES,0,y.length)}i.uniform4f(h.uniforms.u_color,0,0,0,1),i.uniformMatrix4fv(h.uniforms.u_matrix,!1,p),i.drawArrays(i.LINES,0,y.length)}function n(t,e,r,i){i=i||1;var n,o,a,s,l,u,c,h,f=[];for(n=0,o=t.length;n<o;n++)if(l=p[t[n]]){for(h=null,a=0,s=l[1].length;a<s;a+=2)-1===l[1][a]&&-1===l[1][a+1]?h=null:(u=e+l[1][a]*i,c=r-l[1][a+1]*i,h&&f.push(h.x,h.y,u,c),h={x:u,y:c});e+=l[0]*i}return f}var o=t("../util/browser"),a=t("@mapbox/gl-matrix").mat4,s=t("../data/extent"),l=t("../gl/vertex_buffer"),u=t("./vertex_array_object"),c=t("../data/pos_array");e.exports=function(t,e,r){for(var n=0;n<r.length;n++)i(t,e,r[n])};var p={" ":[16,[]],"!":[10,[5,21,5,7,-1,-1,5,2,4,1,5,0,6,1,5,2]],'"':[16,[4,21,4,14,-1,-1,12,21,12,14]],"#":[21,[11,25,4,-7,-1,-1,17,25,10,-7,-1,-1,4,12,18,12,-1,-1,3,6,17,6]],$:[20,[8,25,8,-4,-1,-1,12,25,12,-4,-1,-1,17,18,15,20,12,21,8,21,5,20,3,18,3,16,4,14,5,13,7,12,13,10,15,9,16,8,17,6,17,3,15,1,12,0,8,0,5,1,3,3]],"%":[24,[21,21,3,0,-1,-1,8,21,10,19,10,17,9,15,7,14,5,14,3,16,3,18,4,20,6,21,8,21,10,20,13,19,16,19,19,20,21,21,-1,-1,17,7,15,6,14,4,14,2,16,0,18,0,20,1,21,3,21,5,19,7,17,7]],"&":[26,[23,12,23,13,22,14,21,14,20,13,19,11,17,6,15,3,13,1,11,0,7,0,5,1,4,2,3,4,3,6,4,8,5,9,12,13,13,14,14,16,14,18,13,20,11,21,9,20,8,18,8,16,9,13,11,10,16,3,18,1,20,0,22,0,23,1,23,2]],"'":[10,[5,19,4,20,5,21,6,20,6,18,5,16,4,15]],"(":[14,[11,25,9,23,7,20,5,16,4,11,4,7,5,2,7,-2,9,-5,11,-7]],")":[14,[3,25,5,23,7,20,9,16,10,11,10,7,9,2,7,-2,5,-5,3,-7]],"*":[16,[8,21,8,9,-1,-1,3,18,13,12,-1,-1,13,18,3,12]],"+":[26,[13,18,13,0,-1,-1,4,9,22,9]],",":[10,[6,1,5,0,4,1,5,2,6,1,6,-1,5,-3,4,-4]],"-":[26,[4,9,22,9]],".":[10,[5,2,4,1,5,0,6,1,5,2]],"/":[22,[20,25,2,-7]],0:[20,[9,21,6,20,4,17,3,12,3,9,4,4,6,1,9,0,11,0,14,1,16,4,17,9,17,12,16,17,14,20,11,21,9,21]],1:[20,[6,17,8,18,11,21,11,0]],2:[20,[4,16,4,17,5,19,6,20,8,21,12,21,14,20,15,19,16,17,16,15,15,13,13,10,3,0,17,0]],3:[20,[5,21,16,21,10,13,13,13,15,12,16,11,17,8,17,6,16,3,14,1,11,0,8,0,5,1,4,2,3,4]],4:[20,[13,21,3,7,18,7,-1,-1,13,21,13,0]],5:[20,[15,21,5,21,4,12,5,13,8,14,11,14,14,13,16,11,17,8,17,6,16,3,14,1,11,0,8,0,5,1,4,2,3,4]],6:[20,[16,18,15,20,12,21,10,21,7,20,5,17,4,12,4,7,5,3,7,1,10,0,11,0,14,1,16,3,17,6,17,7,16,10,14,12,11,13,10,13,7,12,5,10,4,7]],7:[20,[17,21,7,0,-1,-1,3,21,17,21]],8:[20,[8,21,5,20,4,18,4,16,5,14,7,13,11,12,14,11,16,9,17,7,17,4,16,2,15,1,12,0,8,0,5,1,4,2,3,4,3,7,4,9,6,11,9,12,13,13,15,14,16,16,16,18,15,20,12,21,8,21]],9:[20,[16,14,15,11,13,9,10,8,9,8,6,9,4,11,3,14,3,15,4,18,6,20,9,21,10,21,13,20,15,18,16,14,16,9,15,4,13,1,10,0,8,0,5,1,4,3]],":":[10,[5,14,4,13,5,12,6,13,5,14,-1,-1,5,2,4,1,5,0,6,1,5,2]],";":[10,[5,14,4,13,5,12,6,13,5,14,-1,-1,6,1,5,0,4,1,5,2,6,1,6,-1,5,-3,4,-4]],"<":[24,[20,18,4,9,20,0]],"=":[26,[4,12,22,12,-1,-1,4,6,22,6]],">":[24,[4,18,20,9,4,0]],"?":[18,[3,16,3,17,4,19,5,20,7,21,11,21,13,20,14,19,15,17,15,15,14,13,13,12,9,10,9,7,-1,-1,9,2,8,1,9,0,10,1,9,2]],"@":[27,[18,13,17,15,15,16,12,16,10,15,9,14,8,11,8,8,9,6,11,5,14,5,16,6,17,8,-1,-1,12,16,10,14,9,11,9,8,10,6,11,5,-1,-1,18,16,17,8,17,6,19,5,21,5,23,7,24,10,24,12,23,15,22,17,20,19,18,20,15,21,12,21,9,20,7,19,5,17,4,15,3,12,3,9,4,6,5,4,7,2,9,1,12,0,15,0,18,1,20,2,21,3,-1,-1,19,16,18,8,18,6,19,5]],A:[18,[9,21,1,0,-1,-1,9,21,17,0,-1,-1,4,7,14,7]],B:[21,[4,21,4,0,-1,-1,4,21,13,21,16,20,17,19,18,17,18,15,17,13,16,12,13,11,-1,-1,4,11,13,11,16,10,17,9,18,7,18,4,17,2,16,1,13,0,4,0]],C:[21,[18,16,17,18,15,20,13,21,9,21,7,20,5,18,4,16,3,13,3,8,4,5,5,3,7,1,9,0,13,0,15,1,17,3,18,5]],D:[21,[4,21,4,0,-1,-1,4,21,11,21,14,20,16,18,17,16,18,13,18,8,17,5,16,3,14,1,11,0,4,0]],E:[19,[4,21,4,0,-1,-1,4,21,17,21,-1,-1,4,11,12,11,-1,-1,4,0,17,0]],F:[18,[4,21,4,0,-1,-1,4,21,17,21,-1,-1,4,11,12,11]],G:[21,[18,16,17,18,15,20,13,21,9,21,7,20,5,18,4,16,3,13,3,8,4,5,5,3,7,1,9,0,13,0,15,1,17,3,18,5,18,8,-1,-1,13,8,18,8]],H:[22,[4,21,4,0,-1,-1,18,21,18,0,-1,-1,4,11,18,11]],I:[8,[4,21,4,0]],J:[16,[12,21,12,5,11,2,10,1,8,0,6,0,4,1,3,2,2,5,2,7]],K:[21,[4,21,4,0,-1,-1,18,21,4,7,-1,-1,9,12,18,0]],L:[17,[4,21,4,0,-1,-1,4,0,16,0]],M:[24,[4,21,4,0,-1,-1,4,21,12,0,-1,-1,20,21,12,0,-1,-1,20,21,20,0]],N:[22,[4,21,4,0,-1,-1,4,21,18,0,-1,-1,18,21,18,0]],O:[22,[9,21,7,20,5,18,4,16,3,13,3,8,4,5,5,3,7,1,9,0,13,0,15,1,17,3,18,5,19,8,19,13,18,16,17,18,15,20,13,21,9,21]],P:[21,[4,21,4,0,-1,-1,4,21,13,21,16,20,17,19,18,17,18,14,17,12,16,11,13,10,4,10]],Q:[22,[9,21,7,20,5,18,4,16,3,13,3,8,4,5,5,3,7,1,9,0,13,0,15,1,17,3,18,5,19,8,19,13,18,16,17,18,15,20,13,21,9,21,-1,-1,12,4,18,-2]],R:[21,[4,21,4,0,-1,-1,4,21,13,21,16,20,17,19,18,17,18,15,17,13,16,12,13,11,4,11,-1,-1,11,11,18,0]],S:[20,[17,18,15,20,12,21,8,21,5,20,3,18,3,16,4,14,5,13,7,12,13,10,15,9,16,8,17,6,17,3,15,1,12,0,8,0,5,1,3,3]],T:[16,[8,21,8,0,-1,-1,1,21,15,21]],U:[22,[4,21,4,6,5,3,7,1,10,0,12,0,15,1,17,3,18,6,18,21]],V:[18,[1,21,9,0,-1,-1,17,21,9,0]],W:[24,[2,21,7,0,-1,-1,12,21,7,0,-1,-1,12,21,17,0,-1,-1,22,21,17,0]],X:[20,[3,21,17,0,-1,-1,17,21,3,0]],Y:[18,[1,21,9,11,9,0,-1,-1,17,21,9,11]],Z:[20,[17,21,3,0,-1,-1,3,21,17,21,-1,-1,3,0,17,0]],"[":[14,[4,25,4,-7,-1,-1,5,25,5,-7,-1,-1,4,25,11,25,-1,-1,4,-7,11,-7]],"\\":[14,[0,21,14,-3]],"]":[14,[9,25,9,-7,-1,-1,10,25,10,-7,-1,-1,3,25,10,25,-1,-1,3,-7,10,-7]],"^":[16,[6,15,8,18,10,15,-1,-1,3,12,8,17,13,12,-1,-1,8,17,8,0]],_:[16,[0,-2,16,-2]],"`":[10,[6,21,5,20,4,18,4,16,5,15,6,16,5,17]],a:[19,[15,14,15,0,-1,-1,15,11,13,13,11,14,8,14,6,13,4,11,3,8,3,6,4,3,6,1,8,0,11,0,13,1,15,3]],b:[19,[4,21,4,0,-1,-1,4,11,6,13,8,14,11,14,13,13,15,11,16,8,16,6,15,3,13,1,11,0,8,0,6,1,4,3]],c:[18,[15,11,13,13,11,14,8,14,6,13,4,11,3,8,3,6,4,3,6,1,8,0,11,0,13,1,15,3]],d:[19,[15,21,15,0,-1,-1,15,11,13,13,11,14,8,14,6,13,4,11,3,8,3,6,4,3,6,1,8,0,11,0,13,1,15,3]],e:[18,[3,8,15,8,15,10,14,12,13,13,11,14,8,14,6,13,4,11,3,8,3,6,4,3,6,1,8,0,11,0,13,1,15,3]],f:[12,[10,21,8,21,6,20,5,17,5,0,-1,-1,2,14,9,14]],g:[19,[15,14,15,-2,14,-5,13,-6,11,-7,8,-7,6,-6,-1,-1,15,11,13,13,11,14,8,14,6,13,4,11,3,8,3,6,4,3,6,1,8,0,11,0,13,1,15,3]],h:[19,[4,21,4,0,-1,-1,4,10,7,13,9,14,12,14,14,13,15,10,15,0]],i:[8,[3,21,4,20,5,21,4,22,3,21,-1,-1,4,14,4,0]],j:[10,[5,21,6,20,7,21,6,22,5,21,-1,-1,6,14,6,-3,5,-6,3,-7,1,-7]],k:[17,[4,21,4,0,-1,-1,14,14,4,4,-1,-1,8,8,15,0]],l:[8,[4,21,4,0]],m:[30,[4,14,4,0,-1,-1,4,10,7,13,9,14,12,14,14,13,15,10,15,0,-1,-1,15,10,18,13,20,14,23,14,25,13,26,10,26,0]],n:[19,[4,14,4,0,-1,-1,4,10,7,13,9,14,12,14,14,13,15,10,15,0]],o:[19,[8,14,6,13,4,11,3,8,3,6,4,3,6,1,8,0,11,0,13,1,15,3,16,6,16,8,15,11,13,13,11,14,8,14]],p:[19,[4,14,4,-7,-1,-1,4,11,6,13,8,14,11,14,13,13,15,11,16,8,16,6,15,3,13,1,11,0,8,0,6,1,4,3]],q:[19,[15,14,15,-7,-1,-1,15,11,13,13,11,14,8,14,6,13,4,11,3,8,3,6,4,3,6,1,8,0,11,0,13,1,15,3]],r:[13,[4,14,4,0,-1,-1,4,8,5,11,7,13,9,14,12,14]],s:[17,[14,11,13,13,10,14,7,14,4,13,3,11,4,9,6,8,11,7,13,6,14,4,14,3,13,1,10,0,7,0,4,1,3,3]],t:[12,[5,21,5,4,6,1,8,0,10,0,-1,-1,2,14,9,14]],u:[19,[4,14,4,4,5,1,7,0,10,0,12,1,15,4,-1,-1,15,14,15,0]],v:[16,[2,14,8,0,-1,-1,14,14,8,0]],w:[22,[3,14,7,0,-1,-1,11,14,7,0,-1,-1,11,14,15,0,-1,-1,19,14,15,0]],x:[17,[3,14,14,0,-1,-1,14,14,3,0]],y:[16,[2,14,8,0,-1,-1,14,14,8,0,6,-4,4,-6,2,-7,1,-7]],z:[17,[14,14,3,0,-1,-1,3,14,14,14,-1,-1,3,0,14,0]],"{":[14,[9,25,7,24,6,23,5,21,5,19,6,17,7,16,8,14,8,12,6,10,-1,-1,7,24,6,22,6,20,7,18,8,17,9,15,9,13,8,11,4,9,8,7,9,5,9,3,8,1,7,0,6,-2,6,-4,7,-6,-1,-1,6,8,8,6,8,4,7,2,6,1,5,-1,5,-3,6,-5,7,-6,9,-7]],"|":[8,[4,25,4,-7]],"}":[14,[5,25,7,24,8,23,9,21,9,19,8,17,7,16,6,14,6,12,8,10,-1,-1,7,24,8,22,8,20,7,18,6,17,5,15,5,13,6,11,10,9,6,7,5,5,5,3,6,1,7,0,8,-2,8,-4,7,-6,-1,-1,8,8,6,6,6,4,7,2,8,1,9,-1,9,-3,8,-5,7,-6,5,-7]],"~":[24,[3,6,3,8,4,11,6,12,8,12,10,11,14,8,16,7,18,7,20,8,21,10,-1,-1,3,8,4,10,6,11,8,11,10,10,14,7,16,6,18,6,20,7,21,10,21,12]]}},{"../data/extent":59,"../data/pos_array":63,"../gl/vertex_buffer":73,"../util/browser":246,"./vertex_array_object":96,"@mapbox/gl-matrix":1}],79:[function(t,e,r){"use strict";function i(t,e,r,i,n){if(!s.isPatternMissing(r.paint.get("fill-pattern"),t))for(var o=!0,a=0,l=i;a<l.length;a+=1){var u=l[a],c=e.getTile(u),p=c.getBucket(r);p&&(t.enableTileClippingMask(u),n(t,e,r,c,u,p,o),o=!1)}}function n(t,e,r,i,n,o,s){var l=t.gl,u=o.programConfigurations.get(r.id);a("fill",r.paint.get("fill-pattern"),t,u,r,i,n,s).draw(l,l.TRIANGLES,r.id,o.layoutVertexBuffer,o.indexBuffer,o.segments,u)}function o(t,e,r,i,n,o,s){var l=t.gl,u=o.programConfigurations.get(r.id),c=a("fillOutline",r.getPaintProperty("fill-outline-color")?null:r.paint.get("fill-pattern"),t,u,r,i,n,s);l.uniform2f(c.uniforms.u_world,l.drawingBufferWidth,l.drawingBufferHeight),c.draw(l,l.LINES,r.id,o.layoutVertexBuffer,o.indexBuffer2,o.segments2,u)}function a(t,e,r,i,n,o,a,l){var u,c=r.currentProgram;return e?(u=r.useProgram(t+"Pattern",i),(l||u!==c)&&(i.setUniforms(r.gl,u,n.paint,{zoom:r.transform.zoom}),s.prepare(e,r,u)),s.setTile(o,r,u)):(u=r.useProgram(t,i),(l||u!==c)&&i.setUniforms(r.gl,u,n.paint,{zoom:r.transform.zoom})),r.gl.uniformMatrix4fv(u.uniforms.u_matrix,!1,r.translatePosMatrix(a.posMatrix,o,n.paint.get("fill-translate"),n.paint.get("fill-translate-anchor"))),u}var s=t("./pattern"),l=t("../style-spec/util/color");e.exports=function(t,e,r,a){var s=r.paint.get("fill-color"),u=r.paint.get("fill-opacity");if(0!==u.constantOr(1)){var c=t.gl;c.enable(c.STENCIL_TEST);var p=r.paint.get("fill-pattern")||1!==s.constantOr(l.transparent).a||1!==u.constantOr(0)?"translucent":"opaque";t.renderPass===p&&(t.setDepthSublayer(1),t.depthMask("opaque"===t.renderPass),i(t,e,r,a,n)),"translucent"===t.renderPass&&r.paint.get("fill-antialias")&&(t.lineWidth(2),t.depthMask(!1),t.setDepthSublayer(r.getPaintProperty("fill-outline-color")?2:0),i(t,e,r,a,o))}}},{"../style-spec/util/color":151,"./pattern":91}],80:[function(t,e,r){"use strict";function i(t,e){var r=e.viewportFrame;if(r){var i=t.gl,n=t.useProgram("extrusionTexture");i.disable(i.STENCIL_TEST),i.disable(i.DEPTH_TEST),i.activeTexture(i.TEXTURE0),i.bindTexture(i.TEXTURE_2D,r.texture),i.uniform1f(n.uniforms.u_opacity,e.paint.get("fill-extrusion-opacity")),i.uniform1i(n.uniforms.u_image,0);var o=u.create();u.ortho(o,0,t.width,t.height,0,0,1),i.uniformMatrix4fv(n.uniforms.u_matrix,!1,o),i.uniform2f(n.uniforms.u_world,i.drawingBufferWidth,i.drawingBufferHeight),t.viewportVAO.bind(i,n,t.viewportBuffer),i.drawArrays(i.TRIANGLE_STRIP,0,4)}}function n(t,e,r,i){var n=e.getTile(i),a=n.getBucket(r);if(a){var l=t.gl,u=r.paint.get("fill-extrusion-pattern"),c=a.programConfigurations.get(r.id),p=t.useProgram(u?"fillExtrusionPattern":"fillExtrusion",c);if(c.setUniforms(l,p,r.paint,{zoom:t.transform.zoom}),u){if(s.isPatternMissing(u,t))return;s.prepare(u,t,p),s.setTile(n,t,p),l.uniform1f(p.uniforms.u_height_factor,-Math.pow(2,i.z)/n.tileSize/8)}t.gl.uniformMatrix4fv(p.uniforms.u_matrix,!1,t.translatePosMatrix(i.posMatrix,n,r.paint.get("fill-extrusion-translate"),r.paint.get("fill-extrusion-translate-anchor"))),o(p,t),p.draw(l,l.TRIANGLES,r.id,a.layoutVertexBuffer,a.indexBuffer,a.segments,c)}}function o(t,e){var r=e.gl,i=e.style.light,n=i.properties.get("position"),o=[n.x,n.y,n.z],a=l.create();"viewport"===i.properties.get("anchor")&&l.fromRotation(a,-e.transform.angle),c.transformMat3(o,o,a);var s=i.properties.get("color");r.uniform3fv(t.uniforms.u_lightpos,o),r.uniform1f(t.uniforms.u_lightintensity,i.properties.get("intensity")),r.uniform3f(t.uniforms.u_lightcolor,s.r,s.g,s.b)}var a=t("@mapbox/gl-matrix"),s=t("./pattern"),l=a.mat3,u=a.mat4,c=a.vec3;e.exports=function(t,e,r,o){if(0!==r.paint.get("fill-extrusion-opacity"))if("3d"===t.renderPass){var a=t.gl;a.disable(a.STENCIL_TEST),a.enable(a.DEPTH_TEST),t.clearColor(),t.depthMask(!0);for(var s=0;s<o.length;s++)n(t,e,r,o[s])}else"translucent"===t.renderPass&&i(t,r)}},{"./pattern":91,"@mapbox/gl-matrix":1}],81:[function(t,e,r){"use strict";function i(t,e,r){t.activeTexture(t.TEXTURE1),t.viewport(0,0,e.width/4,e.height/4);var i=r.heatmapTexture,o=r.heatmapFbo;i?(t.bindTexture(t.TEXTURE_2D,i),t.bindFramebuffer(t.FRAMEBUFFER,o)):(i=r.heatmapTexture=t.createTexture(),t.bindTexture(t.TEXTURE_2D,i),t.texParameteri(t.TEXTURE_2D,t.TEXTURE_WRAP_S,t.CLAMP_TO_EDGE),t.texParameteri(t.TEXTURE_2D,t.TEXTURE_WRAP_T,t.CLAMP_TO_EDGE),t.texParameteri(t.TEXTURE_2D,t.TEXTURE_MIN_FILTER,t.LINEAR),t.texParameteri(t.TEXTURE_2D,t.TEXTURE_MAG_FILTER,t.LINEAR),n(t,e,i,o=r.heatmapFbo=t.createFramebuffer()))}function n(t,e,r,i){t.texImage2D(t.TEXTURE_2D,0,t.RGBA,e.width/4,e.height/4,0,t.RGBA,e.extTextureHalfFloat?e.extTextureHalfFloat.HALF_FLOAT_OES:t.UNSIGNED_BYTE,null),t.bindFramebuffer(t.FRAMEBUFFER,i),t.framebufferTexture2D(t.FRAMEBUFFER,t.COLOR_ATTACHMENT0,t.TEXTURE_2D,r,0),e.extTextureHalfFloat&&t.checkFramebufferStatus(t.FRAMEBUFFER)!==t.FRAMEBUFFER_COMPLETE&&(e.extTextureHalfFloat=null,n(t,e,r,i))}function o(t,e,r){t.bindFramebuffer(t.FRAMEBUFFER,null),t.activeTexture(t.TEXTURE2);var i=r.colorRampTexture;i||(i=r.colorRampTexture=new s(t,r.colorRamp,t.RGBA)),i.bind(t.LINEAR,t.CLAMP_TO_EDGE),t.blendFunc(t.ONE,t.ONE_MINUS_SRC_ALPHA);var n=e.useProgram("heatmapTexture");t.viewport(0,0,e.width,e.height),t.activeTexture(t.TEXTURE0),t.bindTexture(t.TEXTURE_2D,r.heatmapTexture);var o=r.paint.get("heatmap-opacity");t.uniform1f(n.uniforms.u_opacity,o),t.uniform1i(n.uniforms.u_image,1),t.uniform1i(n.uniforms.u_color_ramp,2);var l=a.create();a.ortho(l,0,e.width,e.height,0,0,1),t.uniformMatrix4fv(n.uniforms.u_matrix,!1,l),t.disable(t.DEPTH_TEST),t.uniform2f(n.uniforms.u_world,t.drawingBufferWidth,t.drawingBufferHeight),e.viewportVAO.bind(t,n,e.viewportBuffer),t.drawArrays(t.TRIANGLE_STRIP,0,4),t.enable(t.DEPTH_TEST)}var a=t("@mapbox/gl-matrix").mat4,s=t("./texture"),l=t("../source/pixels_to_tile_units");e.exports=function(t,e,r,n){if(!t.isOpaquePass&&0!==r.paint.get("heatmap-opacity")){var a=t.gl;t.setDepthSublayer(0),t.depthMask(!1),a.disable(a.STENCIL_TEST),i(a,t,r),a.clearColor(0,0,0,0),a.clear(a.COLOR_BUFFER_BIT),a.blendFunc(a.ONE,a.ONE);for(var s=0;s<n.length;s++){var u=n[s];if(!e.hasRenderableParent(u)){var c=e.getTile(u),p=c.getBucket(r);if(p){var h=p.programConfigurations.get(r.id),f=t.useProgram("heatmap",h),d=t.transform.zoom;h.setUniforms(a,f,r.paint,{zoom:d}),a.uniform1f(f.uniforms.u_radius,r.paint.get("heatmap-radius")),a.uniform1f(f.uniforms.u_extrude_scale,l(c,1,d)),a.uniform1f(f.uniforms.u_intensity,r.paint.get("heatmap-intensity")),a.uniformMatrix4fv(f.uniforms.u_matrix,!1,u.posMatrix),f.draw(a,a.TRIANGLES,r.id,p.layoutVertexBuffer,p.indexBuffer,p.segments,h)}}}o(a,t,r)}}},{"../source/pixels_to_tile_units":105,"./texture":94,"@mapbox/gl-matrix":1}],82:[function(t,e,r){"use strict";function i(t,e,r,i,a,s,l,u,c){var p,h,f,d,m=e.gl,y=a.paint.get("line-dasharray"),g=a.paint.get("line-pattern");if(u||c){var v=1/o(r,1,e.transform.tileZoom);if(y){p=e.lineAtlas.getDash(y.from,"round"===a.layout.get("line-cap")),h=e.lineAtlas.getDash(y.to,"round"===a.layout.get("line-cap"));var _=p.width*y.fromScale,x=h.width*y.toScale;m.uniform2f(t.uniforms.u_patternscale_a,v/_,-p.height/2),m.uniform2f(t.uniforms.u_patternscale_b,v/x,-h.height/2),m.uniform1f(t.uniforms.u_sdfgamma,e.lineAtlas.width/(256*Math.min(_,x)*n.devicePixelRatio)/2)}else if(g){if(f=e.imageManager.getPattern(g.from),d=e.imageManager.getPattern(g.to),!f||!d)return;m.uniform2f(t.uniforms.u_pattern_size_a,f.displaySize[0]*g.fromScale/v,d.displaySize[1]),m.uniform2f(t.uniforms.u_pattern_size_b,d.displaySize[0]*g.toScale/v,d.displaySize[1]);var b=e.imageManager.getPixelSize(),w=b.width,z=b.height;m.uniform2fv(t.uniforms.u_texsize,[w,z])}m.uniform2f(t.uniforms.u_gl_units_to_pixels,1/e.transform.pixelsToGLUnits[0],1/e.transform.pixelsToGLUnits[1])}u&&(y?(m.uniform1i(t.uniforms.u_image,0),m.activeTexture(m.TEXTURE0),e.lineAtlas.bind(m),m.uniform1f(t.uniforms.u_tex_y_a,p.y),m.uniform1f(t.uniforms.u_tex_y_b,h.y),m.uniform1f(t.uniforms.u_mix,y.t)):g&&(m.uniform1i(t.uniforms.u_image,0),m.activeTexture(m.TEXTURE0),e.imageManager.bind(m),m.uniform2fv(t.uniforms.u_pattern_tl_a,f.tl),m.uniform2fv(t.uniforms.u_pattern_br_a,f.br),m.uniform2fv(t.uniforms.u_pattern_tl_b,d.tl),m.uniform2fv(t.uniforms.u_pattern_br_b,d.br),m.uniform1f(t.uniforms.u_fade,g.t))),e.enableTileClippingMask(s);var T=e.translatePosMatrix(s.posMatrix,r,a.paint.get("line-translate"),a.paint.get("line-translate-anchor"));m.uniformMatrix4fv(t.uniforms.u_matrix,!1,T),m.uniform1f(t.uniforms.u_ratio,1/o(r,1,e.transform.zoom)),t.draw(m,m.TRIANGLES,a.id,i.layoutVertexBuffer,i.indexBuffer,i.segments,l)}var n=t("../util/browser"),o=t("../source/pixels_to_tile_units");e.exports=function(t,e,r,n){if("translucent"===t.renderPass&&0!==r.paint.get("line-opacity").constantOr(1)){t.setDepthSublayer(0),t.depthMask(!1);var o=t.gl;o.enable(o.STENCIL_TEST);for(var a,s=r.paint.get("line-dasharray")?"lineSDF":r.paint.get("line-pattern")?"linePattern":"line",l=!0,u=0,c=n;u<c.length;u+=1){var p=c[u],h=e.getTile(p),f=h.getBucket(r);if(f){var d=f.programConfigurations.get(r.id),m=t.currentProgram,y=t.useProgram(s,d),g=l||y!==m,v=a!==h.coord.z;g&&d.setUniforms(t.gl,y,r.paint,{zoom:t.transform.zoom}),i(y,t,h,f,r,p,d,g,v),a=h.coord.z,l=!1}}}}},{"../source/pixels_to_tile_units":105,"../util/browser":246}],83:[function(t,e,r){"use strict";function i(t){t*=Math.PI/180;var e=Math.sin(t),r=Math.cos(t);return[(2*r+1)/3,(-Math.sqrt(3)*e-r+1)/3,(Math.sqrt(3)*e-r+1)/3]}function n(t){return t>0?1/(1-t):1+t}function o(t){return t>0?1-1/(1.001-t):-t}function a(t,e,r,i,n){var o=i.paint.get("raster-fade-duration");if(o>0){var a=Date.now(),l=(a-t.timeAdded)/o,u=e?(a-e.timeAdded)/o:-1,c=r.getSource(),p=n.coveringZoomLevel({tileSize:c.tileSize,roundZoom:c.roundZoom}),h=!e||Math.abs(e.coord.z-p)>Math.abs(t.coord.z-p),f=h&&t.refreshedUponExpiration?1:s.clamp(h?l:1-u,0,1);return t.refreshedUponExpiration&&l>=1&&(t.refreshedUponExpiration=!1),e?{opacity:1,mix:1-f}:{opacity:f,mix:0}}return{opacity:1,mix:0}}var s=t("../util/util"),l=t("../source/image_source");e.exports=function(t,e,r,s){if("translucent"===t.renderPass&&0!==r.paint.get("raster-opacity")){var u=t.gl,c=e.getSource(),p=t.useProgram("raster");u.enable(u.DEPTH_TEST),t.depthMask(1===r.paint.get("raster-opacity")),u.depthFunc(u.LESS),u.disable(u.STENCIL_TEST),u.uniform1f(p.uniforms.u_brightness_low,r.paint.get("raster-brightness-min")),u.uniform1f(p.uniforms.u_brightness_high,r.paint.get("raster-brightness-max")),u.uniform1f(p.uniforms.u_saturation_factor,o(r.paint.get("raster-saturation"))),u.uniform1f(p.uniforms.u_contrast_factor,n(r.paint.get("raster-contrast"))),u.uniform3fv(p.uniforms.u_spin_weights,i(r.paint.get("raster-hue-rotate"))),u.uniform1f(p.uniforms.u_buffer_scale,1),u.uniform1i(p.uniforms.u_image0,0),u.uniform1i(p.uniforms.u_image1,1);for(var h=s.length&&s[0].z,f=0,d=s;f<d.length;f+=1){var m=d[f];t.setDepthSublayer(m.z-h);var y=e.getTile(m),g=t.transform.calculatePosMatrix(m,e.getSource().maxzoom);y.registerFadeDuration(r.paint.get("raster-fade-duration")),u.uniformMatrix4fv(p.uniforms.u_matrix,!1,g);var v=e.findLoadedParent(m,0,{}),_=a(y,v,e,r,t.transform),x=void 0,b=void 0;if(u.activeTexture(u.TEXTURE0),y.texture.bind(u.LINEAR,u.CLAMP_TO_EDGE,u.LINEAR_MIPMAP_NEAREST),u.activeTexture(u.TEXTURE1),v?(v.texture.bind(u.LINEAR,u.CLAMP_TO_EDGE,u.LINEAR_MIPMAP_NEAREST),x=Math.pow(2,v.coord.z-y.coord.z),b=[y.coord.x*x%1,y.coord.y*x%1]):y.texture.bind(u.LINEAR,u.CLAMP_TO_EDGE,u.LINEAR_MIPMAP_NEAREST),u.uniform2fv(p.uniforms.u_tl_parent,b||[0,0]),u.uniform1f(p.uniforms.u_scale_parent,x||1),u.uniform1f(p.uniforms.u_fade_t,_.mix),u.uniform1f(p.uniforms.u_opacity,_.opacity*r.paint.get("raster-opacity")),c instanceof l){var w=c.boundsBuffer;c.boundsVAO.bind(u,p,w),u.drawArrays(u.TRIANGLE_STRIP,0,w.length)}else if(y.maskedBoundsBuffer&&y.maskedIndexBuffer&&y.segments)p.draw(u,u.TRIANGLES,r.id,y.maskedBoundsBuffer,y.maskedIndexBuffer,y.segments);else{var z=t.rasterBoundsBuffer;t.rasterBoundsVAO.bind(u,p,z),u.drawArrays(u.TRIANGLE_STRIP,0,z.length)}}u.depthFunc(u.LEQUAL)}}},{"../source/image_source":103,"../util/util":267}],84:[function(t,e,r){"use strict";function i(t,e,r,i,a,s,c,h,f,d){var m=t.gl,y=t.transform,g="map"===h,v="map"===f,_=g&&"line"===r.layout.get("symbol-placement"),x=g&&!v&&!_,b=v;b?m.enable(m.DEPTH_TEST):m.disable(m.DEPTH_TEST);for(var w,z=0,T=i;z<T.length;z+=1){var S=T[z],A=e.getTile(S),E=A.getBucket(r);if(E){var C=a?E.text:E.icon;if(C&&C.segments.get().length){var k=C.programConfigurations.get(r.id),M=a||E.sdfIcons,I=a?E.textSizeData:E.iconSizeData;if(w||(w=t.useProgram(M?"symbolSDF":"symbolIcon",k),k.setUniforms(m,w,r.paint,{zoom:t.transform.zoom}),n(w,t,r,a,x,v,I)),m.activeTexture(m.TEXTURE0),m.uniform1i(w.uniforms.u_texture,0),a)A.glyphAtlasTexture.bind(m.LINEAR,m.CLAMP_TO_EDGE),m.uniform2fv(w.uniforms.u_texsize,A.glyphAtlasTexture.size);else{var P=1!==r.layout.get("icon-size").constantOr(0)||E.iconsNeedLinear,L=v||0!==y.pitch;A.iconAtlasTexture.bind(M||t.options.rotating||t.options.zooming||P||L?m.LINEAR:m.NEAREST,m.CLAMP_TO_EDGE),m.uniform2fv(w.uniforms.u_texsize,A.iconAtlasTexture.size)}t.enableTileClippingMask(S),m.uniformMatrix4fv(w.uniforms.u_matrix,!1,t.translatePosMatrix(S.posMatrix,A,s,c));var R=l(A,1,t.transform.zoom),D=u.getLabelPlaneMatrix(S.posMatrix,v,g,t.transform,R),B=u.getGlCoordMatrix(S.posMatrix,v,g,t.transform,R);m.uniformMatrix4fv(w.uniforms.u_gl_coord_matrix,!1,t.translatePosMatrix(B,A,s,c,!0)),_?(m.uniformMatrix4fv(w.uniforms.u_label_plane_matrix,!1,p),u.updateLineLabels(E,S.posMatrix,t,a,D,B,v,d)):m.uniformMatrix4fv(w.uniforms.u_label_plane_matrix,!1,D),m.uniform1f(w.uniforms.u_fade_change,t.options.collisionFadeDuration?(Date.now()-E.fadeStartTime)/t.options.collisionFadeDuration:1),o(w,k,t,r,A,C,a,M,v)}}}b||m.enable(m.DEPTH_TEST)}function n(t,e,r,i,n,o,a){var s=e.gl,l=e.transform;s.uniform1i(t.uniforms.u_pitch_with_map,o?1:0),s.uniform1f(t.uniforms.u_is_text,i?1:0),s.uniform1f(t.uniforms.u_pitch,l.pitch/360*2*Math.PI);var u="constant"===a.functionType||"source"===a.functionType,p="constant"===a.functionType||"camera"===a.functionType;s.uniform1i(t.uniforms.u_is_size_zoom_constant,u?1:0),s.uniform1i(t.uniforms.u_is_size_feature_constant,p?1:0),s.uniform1f(t.uniforms.u_camera_to_center_distance,l.cameraToCenterDistance);var f=c.evaluateSizeForZoom(a,l.zoom,h.properties[i?"text-size":"icon-size"]);void 0!==f.uSizeT&&s.uniform1f(t.uniforms.u_size_t,f.uSizeT),void 0!==f.uSize&&s.uniform1f(t.uniforms.u_size,f.uSize),s.uniform1f(t.uniforms.u_aspect_ratio,l.width/l.height),s.uniform1i(t.uniforms.u_rotate_symbol,n?1:0)}function o(t,e,r,i,n,o,s,l,u){var c=r.gl,p=r.transform;if(l){var h=0!==i.paint.get(s?"text-halo-width":"icon-halo-width").constantOr(1),f=u?Math.cos(p._pitch)*p.cameraToCenterDistance:1;c.uniform1f(t.uniforms.u_gamma_scale,f),h&&(c.uniform1f(t.uniforms.u_is_halo,1),a(o,i,c,t)),c.uniform1f(t.uniforms.u_is_halo,0)}a(o,i,c,t)}function a(t,e,r,i){i.draw(r,r.TRIANGLES,e.id,t.layoutVertexBuffer,t.indexBuffer,t.segments,t.programConfigurations.get(e.id),t.dynamicLayoutVertexBuffer,t.opacityVertexBuffer)}var s=t("./draw_collision_debug"),l=t("../source/pixels_to_tile_units"),u=t("../symbol/projection"),c=t("../symbol/symbol_size"),p=t("@mapbox/gl-matrix").mat4.identity(new Float32Array(16)),h=t("../style/style_layer/symbol_style_layer_properties").layout;e.exports=function(t,e,r,n){if("translucent"===t.renderPass){var o=t.gl;o.disable(o.STENCIL_TEST),t.setDepthSublayer(0),t.depthMask(!1),0!==r.paint.get("icon-opacity").constantOr(1)&&i(t,e,r,n,!1,r.paint.get("icon-translate"),r.paint.get("icon-translate-anchor"),r.layout.get("icon-rotation-alignment"),r.layout.get("icon-pitch-alignment"),r.layout.get("icon-keep-upright")),0!==r.paint.get("text-opacity").constantOr(1)&&i(t,e,r,n,!0,r.paint.get("text-translate"),r.paint.get("text-translate-anchor"),r.layout.get("text-rotation-alignment"),r.layout.get("text-pitch-alignment"),r.layout.get("text-keep-upright")),e.map.showCollisionBoxes&&s(t,e,r,n)}}},{"../source/pixels_to_tile_units":105,"../style/style_layer/symbol_style_layer_properties":203,"../symbol/projection":217,"../symbol/symbol_size":222,"./draw_collision_debug":77,"@mapbox/gl-matrix":1}],85:[function(t,e,r){"use strict";var i=t("@mapbox/shelf-pack"),n=t("../util/image").AlphaImage,o=1;e.exports={makeGlyphAtlas:function(t){var e=n.create({width:0,height:0}),r={},a=new i(0,0,{autoResize:!0});for(var s in t){var l=t[s],u=r[s]={};for(var c in l){var p=l[+c];if(p&&0!==p.bitmap.width&&0!==p.bitmap.height){var h=a.packOne(p.bitmap.width+2*o,p.bitmap.height+2*o);n.resize(e,{width:a.w,height:a.h}),n.copy(p.bitmap,e,{x:0,y:0},{x:h.x+o,y:h.y+o},p.bitmap),u[c]={rect:h,metrics:p.metrics}}}}return a.shrink(),n.resize(e,{width:a.w,height:a.h}),{image:e,positions:r}}}},{"../util/image":257,"@mapbox/shelf-pack":3}],86:[function(t,e,r){"use strict";var i=t("../style/load_glyph_range"),n=t("@mapbox/tiny-sdf"),o=t("../util/is_char_in_unicode_block"),a=t("../util/util").asyncAll,s=t("../util/image").AlphaImage,l=function(t,e){this.requestTransform=t,this.localIdeographFontFamily=e,this.entries={}};l.prototype.setURL=function(t){this.url=t},l.prototype.getGlyphs=function(t,e){var r=this,n=[];for(var o in t)for(var s=0,l=t[o];s<l.length;s+=1){var u=l[s];n.push({stack:o,id:u})}a(n,function(t,e){var n=t.stack,o=t.id,a=r.entries[n];a||(a=r.entries[n]={glyphs:{},requests:{}});var s=a.glyphs[o];if(void 0===s)if(s=r._tinySDF(a,n,o))e(null,{stack:n,id:o,glyph:s});else{var l=Math.floor(o/256);if(256*l>65535)e(new Error("glyphs > 65535 not supported"));else{var u=a.requests[l];u||(u=a.requests[l]=[],i(n,l,r.url,r.requestTransform,function(t,e){if(e)for(var r in e)a.glyphs[+r]=e[+r];for(var i=0,n=u;i<n.length;i+=1)(0,n[i])(t,e);delete a.requests[l]})),u.push(function(t,r){t?e(t):r&&e(null,{stack:n,id:o,glyph:r[o]||null})})}}else e(null,{stack:n,id:o,glyph:s})},function(t,r){if(t)e(t);else if(r){for(var i={},n=0,o=r;n<o.length;n+=1){var a=o[n],s=a.stack,l=a.id,u=a.glyph;(i[s]||(i[s]={}))[l]=u}e(null,i)}})},l.prototype._tinySDF=function(t,e,r){var i=this.localIdeographFontFamily;if(i&&(o["CJK Unified Ideographs"](r)||o["Hangul Syllables"](r))){var a=t.tinySDF;if(!a){var l="400";/bold/i.test(e)?l="900":/medium/i.test(e)?l="500":/light/i.test(e)&&(l="200"),a=t.tinySDF=new n(24,3,8,.25,i,l)}return{id:r,bitmap:s.create({width:30,height:30},a.draw(String.fromCharCode(r))),metrics:{width:24,height:24,left:0,top:-8,advance:24}}}},e.exports=l},{"../style/load_glyph_range":180,"../util/image":257,"../util/is_char_in_unicode_block":259,"../util/util":267,"@mapbox/tiny-sdf":4}],87:[function(t,e,r){"use strict";function i(t,e){var r=e.pixelRatio,i={x:t.x+a,y:t.y+a,w:t.w-2*a,h:t.h-2*a};return{pixelRatio:r,textureRect:i,tl:[i.x,i.y],br:[i.x+i.w,i.y+i.h],displaySize:[i.w/r,i.h/r]}}var n=t("@mapbox/shelf-pack"),o=t("../util/image").RGBAImage,a=1;e.exports={imagePosition:i,makeImageAtlas:function(t){var e=o.create({width:0,height:0}),r={},s=new n(0,0,{autoResize:!0});for(var l in t){var u=t[l],c=s.packOne(u.data.width+2*a,u.data.height+2*a);o.resize(e,{width:s.w,height:s.h}),o.copy(u.data,e,{x:0,y:0},{x:c.x+a,y:c.y+a},u.data),r[l]=i(c,u)}return s.shrink(),o.resize(e,{width:s.w,height:s.h}),{image:e,positions:r}}}},{"../util/image":257,"@mapbox/shelf-pack":3}],88:[function(t,e,r){"use strict";var i=t("@mapbox/shelf-pack"),n=t("../util/image").RGBAImage,o=t("./image_atlas").imagePosition,a=t("./texture"),s=t("assert"),l=function(){this.images={},this.loaded=!1,this.requestors=[],this.shelfPack=new i(64,64,{autoResize:!0}),this.patterns={},this.atlasImage=n.create({width:64,height:64}),this.dirty=!0};l.prototype.isLoaded=function(){return this.loaded},l.prototype.setLoaded=function(t){var e=this;if(this.loaded!==t&&(this.loaded=t,t)){for(var r=0,i=e.requestors;r<i.length;r+=1){var n=i[r],o=n.ids,a=n.callback;e._notify(o,a)}this.requestors=[]}},l.prototype.getImage=function(t){return this.images[t]},l.prototype.addImage=function(t,e){s(!this.images[t]),this.images[t]=e},l.prototype.removeImage=function(t){s(this.images[t]),delete this.images[t];var e=this.patterns[t];e&&(this.shelfPack.unref(e.bin),delete this.patterns[t])},l.prototype.getImages=function(t,e){var r=this,i=!0;if(!this.isLoaded())for(var n=0,o=t;n<o.length;n+=1){var a=o[n];r.images[a]||(i=!1)}this.isLoaded()||i?this._notify(t,e):this.requestors.push({ids:t,callback:e})},l.prototype._notify=function(t,e){for(var r=this,i={},n=0,o=t;n<o.length;n+=1){var a=o[n],s=r.images[a];s&&(i[a]=s)}e(null,i)},l.prototype.getPixelSize=function(){return{width:this.shelfPack.w,height:this.shelfPack.h}},l.prototype.getPattern=function(t){var e=this.patterns[t];if(e)return e.position;var r=this.getImage(t);if(!r)return null;var i=r.data.width+2,a=r.data.height+2,s=this.shelfPack.packOne(i,a);if(!s)return null;n.resize(this.atlasImage,this.getPixelSize());var l=r.data,u=this.atlasImage,c=s.x+1,p=s.y+1,h=l.width,f=l.height;n.copy(l,u,{x:0,y:0},{x:c,y:p},{width:h,height:f}),n.copy(l,u,{x:0,y:f-1},{x:c,y:p-1},{width:h,height:1}),n.copy(l,u,{x:0,y:0},{x:c,y:p+f},{width:h,height:1}),n.copy(l,u,{x:h-1,y:0},{x:c-1,y:p},{width:1,height:f}),n.copy(l,u,{x:0,y:0},{x:c+h,y:p},{width:1,height:f}),this.dirty=!0;var d=o(s,r);return this.patterns[t]={bin:s,position:d},d},l.prototype.bind=function(t){this.atlasTexture?this.dirty&&(this.atlasTexture.update(this.atlasImage),this.dirty=!1):this.atlasTexture=new a(t,this.atlasImage,t.RGBA),this.atlasTexture.bind(t.LINEAR,t.CLAMP_TO_EDGE)},e.exports=l},{"../util/image":257,"./image_atlas":87,"./texture":94,"@mapbox/shelf-pack":3,assert:11}],89:[function(t,e,r){"use strict";var i=t("../util/util"),n=function(t,e){this.width=t,this.height=e,this.nextRow=0,this.bytes=4,this.data=new Uint8Array(this.width*this.height*this.bytes),this.positions={}};n.prototype.getDash=function(t,e){var r=t.join(",")+String(e);return this.positions[r]||(this.positions[r]=this.addDash(t,e)),this.positions[r]},n.prototype.addDash=function(t,e){var r=this,n=e?7:0,o=2*n+1;if(this.nextRow+o>this.height)return i.warnOnce("LineAtlas out of space"),null;for(var a=0,s=0;s<t.length;s++)a+=t[s];for(var l=this.width/a,u=l/2,c=t.length%2==1,p=-n;p<=n;p++)for(var h=r.nextRow+n+p,f=r.width*h,d=c?-t[t.length-1]:0,m=t[0],y=1,g=0;g<this.width;g++){for(;m<g/l;)d=m,m+=t[y],c&&y===t.length-1&&(m+=t[0]),y++;var v=Math.abs(g-d*l),_=Math.abs(g-m*l),x=Math.min(v,_),b=y%2==1,w=void 0;if(e){var z=n?p/n*(u+1):0;if(b){var T=u-Math.abs(z);w=Math.sqrt(x*x+T*T)}else w=u-Math.sqrt(x*x+z*z)}else w=(b?1:-1)*x;r.data[3+4*(f+g)]=Math.max(0,Math.min(255,w+128))}var S={y:(this.nextRow+n+.5)/this.height,height:2*n/this.height,width:a};return this.nextRow+=o,this.dirty=!0,S},n.prototype.bind=function(t){this.texture?(t.bindTexture(t.TEXTURE_2D,this.texture),this.dirty&&(this.dirty=!1,t.texSubImage2D(t.TEXTURE_2D,0,0,0,this.width,this.height,t.RGBA,t.UNSIGNED_BYTE,this.data))):(this.texture=t.createTexture(),t.bindTexture(t.TEXTURE_2D,this.texture),t.texParameteri(t.TEXTURE_2D,t.TEXTURE_WRAP_S,t.REPEAT),t.texParameteri(t.TEXTURE_2D,t.TEXTURE_WRAP_T,t.REPEAT),t.texParameteri(t.TEXTURE_2D,t.TEXTURE_MIN_FILTER,t.LINEAR),t.texParameteri(t.TEXTURE_2D,t.TEXTURE_MAG_FILTER,t.LINEAR),t.texImage2D(t.TEXTURE_2D,0,t.RGBA,this.width,this.height,0,t.RGBA,t.UNSIGNED_BYTE,this.data))},e.exports=n},{"../util/util":267}],90:[function(t,e,r){"use strict";var i=t("../util/browser"),n=t("@mapbox/gl-matrix").mat4,o=t("../source/source_cache"),a=t("../data/extent"),s=t("../source/pixels_to_tile_units"),l=t("../util/util"),u=t("../gl/vertex_buffer"),c=t("./vertex_array_object"),p=t("../data/raster_bounds_array"),h=t("../data/pos_array"),f=t("../data/program_configuration").ProgramConfiguration,d=t("../symbol/cross_tile_symbol_index"),m=t("../shaders"),y=t("./program"),g=t("./render_texture"),v=t("./tile_mask"),_={symbol:t("./draw_symbol"),circle:t("./draw_circle"),heatmap:t("./draw_heatmap"),line:t("./draw_line"),fill:t("./draw_fill"),"fill-extrusion":t("./draw_fill_extrusion"),raster:t("./draw_raster"),background:t("./draw_background"),debug:t("./draw_debug")},x=function(t,e){this.gl=t,this.transform=e,this._tileTextures={},this.setup(),this.numSublayers=o.maxUnderzooming+o.maxOverzooming+1,this.depthEpsilon=1/Math.pow(2,16),this.lineWidthRange=t.getParameter(t.ALIASED_LINE_WIDTH_RANGE),this.emptyProgramConfiguration=new f,this.crossTileSymbolIndex=new d};x.prototype.resize=function(t,e){var r=this,n=this.gl;if(this.width=t*i.devicePixelRatio,this.height=e*i.devicePixelRatio,n.viewport(0,0,this.width,this.height),this.style)for(var o=0,a=r.style._order;o<a.length;o+=1){var s=a[o];r.style._layers[s].resize(n)}this.depthRbo&&(this.gl.deleteRenderbuffer(this.depthRbo),this.depthRbo=null)},x.prototype.setup=function(){var t=this.gl;t.enable(t.BLEND),t.blendFunc(t.ONE,t.ONE_MINUS_SRC_ALPHA),t.enable(t.STENCIL_TEST),t.enable(t.DEPTH_TEST),t.depthFunc(t.LEQUAL),this._depthMask=!1,t.depthMask(!1);var e=new h;e.emplaceBack(0,0),e.emplaceBack(a,0),e.emplaceBack(0,a),e.emplaceBack(a,a),this.tileExtentBuffer=new u(t,e),this.tileExtentVAO=new c,this.tileExtentPatternVAO=new c;var r=new h;r.emplaceBack(0,0),r.emplaceBack(a,0),r.emplaceBack(a,a),r.emplaceBack(0,a),r.emplaceBack(0,0),this.debugBuffer=new u(t,r),this.debugVAO=new c;var i=new p;i.emplaceBack(0,0,0,0),i.emplaceBack(a,0,a,0),i.emplaceBack(0,a,0,a),i.emplaceBack(a,a,a,a),this.rasterBoundsBuffer=new u(t,i),this.rasterBoundsVAO=new c;var n=new h;n.emplaceBack(0,0),n.emplaceBack(1,0),n.emplaceBack(0,1),n.emplaceBack(1,1),this.viewportBuffer=new u(t,n),this.viewportVAO=new c,this.extTextureFilterAnisotropic=t.getExtension("EXT_texture_filter_anisotropic")||t.getExtension("MOZ_EXT_texture_filter_anisotropic")||t.getExtension("WEBKIT_EXT_texture_filter_anisotropic"),this.extTextureFilterAnisotropic&&(this.extTextureFilterAnisotropicMax=t.getParameter(this.extTextureFilterAnisotropic.MAX_TEXTURE_MAX_ANISOTROPY_EXT)),this.extTextureHalfFloat=t.getExtension("OES_texture_half_float"),this.extTextureHalfFloat&&t.getExtension("OES_texture_half_float_linear")},x.prototype.clearColor=function(){var t=this.gl;t.clearColor(0,0,0,0),t.clear(t.COLOR_BUFFER_BIT)},x.prototype.clearStencil=function(){var t=this.gl;t.colorMask(!1,!1,!1,!1),this.depthMask(!1),t.disable(t.DEPTH_TEST),t.enable(t.STENCIL_TEST),t.stencilMask(255),t.stencilOp(t.ZERO,t.ZERO,t.ZERO),t.stencilFunc(t.ALWAYS,0,255);var e=n.create();n.ortho(e,0,this.width,this.height,0,0,1),n.scale(e,e,[t.drawingBufferWidth,t.drawingBufferHeight,0]);var r=this.useProgram("fill",f.forTileClippingMask());t.uniformMatrix4fv(r.uniforms.u_matrix,!1,e),this.viewportVAO.bind(t,r,this.viewportBuffer),t.drawArrays(t.TRIANGLE_STRIP,0,4),t.stencilMask(0),t.colorMask(!0,!0,!0,!0),this.depthMask(!0),t.enable(t.DEPTH_TEST)},x.prototype.clearDepth=function(){var t=this.gl;t.clearDepth(1),this.depthMask(!0),t.clear(t.DEPTH_BUFFER_BIT)},x.prototype._renderTileClippingMasks=function(t){var e=this,r=this.gl;r.colorMask(!1,!1,!1,!1),this.depthMask(!1),r.disable(r.DEPTH_TEST),r.enable(r.STENCIL_TEST),r.stencilMask(255),r.stencilOp(r.KEEP,r.KEEP,r.REPLACE);var i=1;this._tileClippingMaskIDs={};for(var n=f.forTileClippingMask(),o=0,a=t;o<a.length;o+=1){var s=a[o],l=e._tileClippingMaskIDs[s.id]=i++;r.stencilFunc(r.ALWAYS,l,255);var u=e.useProgram("fill",n);r.uniformMatrix4fv(u.uniforms.u_matrix,!1,s.posMatrix),e.tileExtentVAO.bind(r,u,e.tileExtentBuffer),r.drawArrays(r.TRIANGLE_STRIP,0,e.tileExtentBuffer.length)}r.stencilMask(0),r.colorMask(!0,!0,!0,!0),this.depthMask(!0),r.enable(r.DEPTH_TEST)},x.prototype.enableTileClippingMask=function(t){var e=this.gl;e.stencilFunc(e.EQUAL,this._tileClippingMaskIDs[t.id],255)},x.prototype.render=function(t,e){var r=this;this.style=t,this.options=e,this.lineAtlas=t.lineAtlas,this.imageManager=t.imageManager,this.glyphManager=t.glyphManager;for(var i in t.sourceCaches){var n=r.style.sourceCaches[i];n.used&&n.prepare(r.gl)}var o=this.style._order,a=l.filterObject(this.style.sourceCaches,function(t){return"raster"===t._source.type});for(var s in a)!function(t){var e=a[t],i=e.getVisibleCoordinates().map(function(t){return e.getTile(t)});v(i,r.gl)}(s);this.renderPass="3d";for(var u,c=!0,p=[],h=0;h<o.length;h++){var f=r.style._layers[o[h]];if(f.has3DPass()&&!f.isHidden(r.transform.zoom)&&(f.source!==(u&&u.id)&&(p=[],(u=r.style.sourceCaches[f.source])&&(r.clearStencil(),p=u.getVisibleCoordinates()),p.reverse()),p.length)){r._setup3DRenderbuffer();var d=f.viewportFrame||new g(r);f.viewportFrame=d,d.bindWithDepth(r.depthRbo),c&&(r.clearDepth(),c=!1),r.renderLayer(r,u,f,p),d.unbind()}}this.clearColor(),this.clearDepth(),this.showOverdrawInspector(e.showOverdrawInspector),this.depthRange=(t._order.length+2)*this.numSublayers*this.depthEpsilon,this.renderPass="opaque";var m,y=[];for(this.currentLayer=o.length-1,this._showOverdrawInspector||this.gl.disable(this.gl.BLEND),this.currentLayer;this.currentLayer>=0;this.currentLayer--){var x=r.style._layers[o[r.currentLayer]];x.source!==(m&&m.id)&&(y=[],(m=r.style.sourceCaches[x.source])&&(r.clearStencil(),y=m.getVisibleCoordinates(),m.getSource().isTileClipped&&r._renderTileClippingMasks(y))),r.renderLayer(r,m,x,y)}this.renderPass="translucent";var b,w=[];for(this.gl.enable(this.gl.BLEND),this.currentLayer=0,this.currentLayer;this.currentLayer<o.length;this.currentLayer++){var z=r.style._layers[o[r.currentLayer]];z.source!==(b&&b.id)&&(w=[],(b=r.style.sourceCaches[z.source])&&(r.clearStencil(),w=b.getVisibleCoordinates(),b.getSource().isTileClipped&&r._renderTileClippingMasks(w)),w.reverse()),r.renderLayer(r,b,z,w)}if(this.options.showTileBoundaries){var T=this.style.sourceCaches[Object.keys(this.style.sourceCaches)[0]];T&&_.debug(this,T,T.getVisibleCoordinates())}},x.prototype._setup3DRenderbuffer=function(){if(!this.depthRbo){var t=this.gl;this.depthRbo=t.createRenderbuffer(),t.bindRenderbuffer(t.RENDERBUFFER,this.depthRbo),t.renderbufferStorage(t.RENDERBUFFER,t.DEPTH_COMPONENT16,this.width,this.height),t.bindRenderbuffer(t.RENDERBUFFER,null)}this.depthRboAttached=!0},x.prototype.depthMask=function(t){t!==this._depthMask&&(this._depthMask=t,this.gl.depthMask(t))},x.prototype.renderLayer=function(t,e,r,i){r.isHidden(this.transform.zoom)||("background"===r.type||i.length)&&(this.id=r.id,_[r.type](t,e,r,i))},x.prototype.setDepthSublayer=function(t){var e=1-((1+this.currentLayer)*this.numSublayers+t)*this.depthEpsilon,r=e-1+this.depthRange;this.gl.depthRange(r,e)},x.prototype.translatePosMatrix=function(t,e,r,i,o){if(!r[0]&&!r[1])return t;var a=o?"map"===i?this.transform.angle:0:"viewport"===i?-this.transform.angle:0;if(a){var l=Math.sin(a),u=Math.cos(a);r=[r[0]*u-r[1]*l,r[0]*l+r[1]*u]}var c=[o?r[0]:s(e,r[0],this.transform.zoom),o?r[1]:s(e,r[1],this.transform.zoom),0],p=new Float32Array(16);return n.translate(p,t,c),p},x.prototype.saveTileTexture=function(t){var e=this._tileTextures[t.size[0]];e?e.push(t):this._tileTextures[t.size[0]]=[t]},x.prototype.getTileTexture=function(t){var e=this._tileTextures[t];return e&&e.length>0?e.pop():null},x.prototype.lineWidth=function(t){this.gl.lineWidth(l.clamp(t,this.lineWidthRange[0],this.lineWidthRange[1]))},x.prototype.showOverdrawInspector=function(t){if(t||this._showOverdrawInspector){this._showOverdrawInspector=t;var e=this.gl;if(t){e.blendFunc(e.CONSTANT_COLOR,e.ONE);e.blendColor(1/8,1/8,1/8,0),e.clearColor(0,0,0,1),e.clear(e.COLOR_BUFFER_BIT)}else e.blendFunc(e.ONE,e.ONE_MINUS_SRC_ALPHA)}},x.prototype._createProgramCached=function(t,e){this.cache=this.cache||{};var r=""+t+(e.cacheKey||"")+(this._showOverdrawInspector?"/overdraw":"");return this.cache[r]||(this.cache[r]=new y(this.gl,m[t],e,this._showOverdrawInspector)),this.cache[r]},x.prototype.useProgram=function(t,e){var r=this.gl,i=this._createProgramCached(t,e||this.emptyProgramConfiguration);return this.currentProgram!==i&&(r.useProgram(i.program),this.currentProgram=i),i},e.exports=x},{"../data/extent":59,"../data/pos_array":63,"../data/program_configuration":64,"../data/raster_bounds_array":65,"../gl/vertex_buffer":73,"../shaders":98,"../source/pixels_to_tile_units":105,"../source/source_cache":110,"../symbol/cross_tile_symbol_index":212,"../util/browser":246,"../util/util":267,"./draw_background":75,"./draw_circle":76,"./draw_debug":78,"./draw_fill":79,"./draw_fill_extrusion":80,"./draw_heatmap":81,"./draw_line":82,"./draw_raster":83,"./draw_symbol":84,"./program":92,"./render_texture":93,"./tile_mask":95,"./vertex_array_object":96,"@mapbox/gl-matrix":1}],91:[function(t,e,r){"use strict";var i=t("assert"),n=t("../source/pixels_to_tile_units");r.isPatternMissing=function(t,e){if(!t)return!1;var r=e.imageManager.getPattern(t.from),i=e.imageManager.getPattern(t.to);return!r||!i},r.prepare=function(t,e,r){var n=e.gl,o=e.imageManager.getPattern(t.from),a=e.imageManager.getPattern(t.to);i(o&&a),n.uniform1i(r.uniforms.u_image,0),n.uniform2fv(r.uniforms.u_pattern_tl_a,o.tl),n.uniform2fv(r.uniforms.u_pattern_br_a,o.br),n.uniform2fv(r.uniforms.u_pattern_tl_b,a.tl),n.uniform2fv(r.uniforms.u_pattern_br_b,a.br);var s=e.imageManager.getPixelSize(),l=s.width,u=s.height;n.uniform2fv(r.uniforms.u_texsize,[l,u]),n.uniform1f(r.uniforms.u_mix,t.t),n.uniform2fv(r.uniforms.u_pattern_size_a,o.displaySize),n.uniform2fv(r.uniforms.u_pattern_size_b,a.displaySize),n.uniform1f(r.uniforms.u_scale_a,t.fromScale),n.uniform1f(r.uniforms.u_scale_b,t.toScale),n.activeTexture(n.TEXTURE0),e.imageManager.bind(n)},r.setTile=function(t,e,r){var i=e.gl;i.uniform1f(r.uniforms.u_tile_units_to_pixels,1/n(t,1,e.transform.tileZoom));var o=Math.pow(2,t.coord.z),a=t.tileSize*Math.pow(2,e.transform.tileZoom)/o,s=a*(t.coord.x+t.coord.w*o),l=a*t.coord.y;i.uniform2f(r.uniforms.u_pixel_coord_upper,s>>16,l>>16),i.uniform2f(r.uniforms.u_pixel_coord_lower,65535&s,65535&l)}},{"../source/pixels_to_tile_units":105,assert:11}],92:[function(t,e,r){"use strict";var i=t("../util/browser"),n=t("../shaders"),o=t("assert"),a=(t("../data/program_configuration").ProgramConfiguration,t("./vertex_array_object")),s=function(t,e,r,a){var s=this;this.gl=t,this.program=t.createProgram();var l=r.defines().concat("#define DEVICE_PIXEL_RATIO "+i.devicePixelRatio.toFixed(1));a&&l.push("#define OVERDRAW_INSPECTOR;");var u=l.concat(n.prelude.fragmentSource,e.fragmentSource).join("\n"),c=l.concat(n.prelude.vertexSource,e.vertexSource).join("\n"),p=t.createShader(t.FRAGMENT_SHADER);t.shaderSource(p,u),t.compileShader(p),o(t.getShaderParameter(p,t.COMPILE_STATUS),t.getShaderInfoLog(p)),t.attachShader(this.program,p);var h=t.createShader(t.VERTEX_SHADER);t.shaderSource(h,c),t.compileShader(h),o(t.getShaderParameter(h,t.COMPILE_STATUS),t.getShaderInfoLog(h)),t.attachShader(this.program,h);for(var f=r.interface?r.interface.layoutAttributes:[],d=0;d<f.length;d++)t.bindAttribLocation(s.program,d,f[d].name);t.linkProgram(this.program),o(t.getProgramParameter(this.program,t.LINK_STATUS),t.getProgramInfoLog(this.program)),this.numAttributes=t.getProgramParameter(this.program,t.ACTIVE_ATTRIBUTES),this.attributes={},this.uniforms={};for(var m=0;m<this.numAttributes;m++){var y=t.getActiveAttrib(s.program,m);y&&(s.attributes[y.name]=t.getAttribLocation(s.program,y.name))}for(var g=t.getProgramParameter(this.program,t.ACTIVE_UNIFORMS),v=0;v<g;v++){var _=t.getActiveUniform(s.program,v);_&&(s.uniforms[_.name]=t.getUniformLocation(s.program,_.name))}};s.prototype.draw=function(t,e,r,i,n,o,s,l,u){for(var c,p=this,h=(c={},c[t.LINES]=2,c[t.TRIANGLES]=3,c)[e],f=0,d=o.get();f<d.length;f+=1){var m=d[f],y=m.vaos||(m.vaos={});(y[r]||(y[r]=new a)).bind(t,p,i,n,s&&s.paintVertexBuffer,m.vertexOffset,l,u),t.drawElements(e,m.primitiveLength*h,t.UNSIGNED_SHORT,m.primitiveOffset*h*2)}},e.exports=s},{"../data/program_configuration":64,"../shaders":98,"../util/browser":246,"./vertex_array_object":96,assert:11}],93:[function(t,e,r){"use strict";var i=function(t){var e=this.gl=t.gl,r=this.texture=e.createTexture();e.bindTexture(e.TEXTURE_2D,r),e.texParameteri(e.TEXTURE_2D,e.TEXTURE_WRAP_S,e.CLAMP_TO_EDGE),e.texParameteri(e.TEXTURE_2D,e.TEXTURE_WRAP_T,e.CLAMP_TO_EDGE),e.texParameteri(e.TEXTURE_2D,e.TEXTURE_MIN_FILTER,e.LINEAR),e.texParameteri(e.TEXTURE_2D,e.TEXTURE_MAG_FILTER,e.LINEAR),e.texImage2D(e.TEXTURE_2D,0,e.RGBA,t.width,t.height,0,e.RGBA,e.UNSIGNED_BYTE,null),e.bindTexture(e.TEXTURE_2D,null);var i=this.fbo=e.createFramebuffer();e.bindFramebuffer(e.FRAMEBUFFER,i),e.framebufferTexture2D(e.FRAMEBUFFER,e.COLOR_ATTACHMENT0,e.TEXTURE_2D,r,0)};i.prototype.bindWithDepth=function(t){var e=this.gl;e.bindFramebuffer(e.FRAMEBUFFER,this.fbo),this.attachedRbo!==t&&(e.framebufferRenderbuffer(e.FRAMEBUFFER,e.DEPTH_ATTACHMENT,e.RENDERBUFFER,t),this.attachedRbo=t)},i.prototype.unbind=function(){var t=this.gl;t.bindFramebuffer(t.FRAMEBUFFER,null)},e.exports=i},{}],94:[function(t,e,r){"use strict";var i=t("../util/window"),n=i.HTMLImageElement,o=i.HTMLCanvasElement,a=i.HTMLVideoElement,s=i.ImageData,l=function(t,e,r){this.gl=t;var i=e.width,n=e.height;this.size=[i,n],this.format=r,this.texture=t.createTexture(),this.update(e)};l.prototype.update=function(t){var e=t.width,r=t.height;this.size=[e,r];var i=this.gl;i.bindTexture(i.TEXTURE_2D,this.texture),i.pixelStorei(i.UNPACK_ALIGNMENT,1),this.format===i.RGBA&&i.pixelStorei(i.UNPACK_PREMULTIPLY_ALPHA_WEBGL,!0),t instanceof n||t instanceof o||t instanceof a||t instanceof s?i.texImage2D(i.TEXTURE_2D,0,this.format,this.format,i.UNSIGNED_BYTE,t):i.texImage2D(i.TEXTURE_2D,0,this.format,e,r,0,this.format,i.UNSIGNED_BYTE,t.data)},l.prototype.bind=function(t,e,r){var i=this.gl;i.bindTexture(i.TEXTURE_2D,this.texture),t!==this.filter&&(i.texParameteri(i.TEXTURE_2D,i.TEXTURE_MAG_FILTER,t),i.texParameteri(i.TEXTURE_2D,i.TEXTURE_MIN_FILTER,r||t),this.filter=t),e!==this.wrap&&(i.texParameteri(i.TEXTURE_2D,i.TEXTURE_WRAP_S,e),i.texParameteri(i.TEXTURE_2D,i.TEXTURE_WRAP_T,e),this.wrap=e)},l.prototype.destroy=function(){this.gl.deleteTexture(this.texture),this.texture=null},e.exports=l},{"../util/window":248}],95:[function(t,e,r){"use strict";function i(t,e,r,o,a){for(var s=0;s<r.length;s++){var l=r[s];if(o.isLessThan(l.coord))break;if(e.id===l.coord.id)return;if(l.coord.isChildOf(e,l.sourceMaxZoom)){for(var u=e.children(1/0),c=0;c<u.length;c++)i(t,u[c],r.slice(s),o,a);return}}var p=e.z-t.z,h=new n(p,e.x-(t.x<<p),e.y-(t.y<<p)).id;a[h]=a[h]||!0}var n=t("../source/tile_coord");e.exports=function(t,e){for(var r=t.sort(function(t,e){return t.coord.isLessThan(e.coord)?-1:e.coord.isLessThan(t.coord)?1:0}),o=0;o<r.length;o++){var a={},s=r[o],l=r.slice(o+1);i(s.coord.wrapped(),s.coord,l,new n(0,0,0,s.coord.w+1),a),s.setMask(a,e)}}},{"../source/tile_coord":113}],96:[function(t,e,r){"use strict";var i=t("assert"),n=function(){this.boundProgram=null,this.boundVertexBuffer=null,this.boundVertexBuffer2=null,this.boundIndexBuffer=null,this.boundVertexOffset=null,this.boundDynamicVertexBuffer=null,this.vao=null};n.prototype.bind=function(t,e,r,i,n,o,a,s){void 0===t.extVertexArrayObject&&(t.extVertexArrayObject=t.getExtension("OES_vertex_array_object"));var l=!this.vao||this.boundProgram!==e||this.boundVertexBuffer!==r||this.boundVertexBuffer2!==n||this.boundIndexBuffer!==i||this.boundVertexOffset!==o||this.boundDynamicVertexBuffer!==a||this.boundDynamicVertexBuffer2!==s;!t.extVertexArrayObject||l?(this.freshBind(t,e,r,i,n,o,a,s),this.gl=t):(t.extVertexArrayObject.bindVertexArrayOES(this.vao),a&&a.bind(),i&&i.dynamicDraw&&i.bind(),s&&s.bind())},n.prototype.freshBind=function(t,e,r,n,o,a,s,l){var u,c=e.numAttributes;if(t.extVertexArrayObject)this.vao&&this.destroy(),this.vao=t.extVertexArrayObject.createVertexArrayOES(),t.extVertexArrayObject.bindVertexArrayOES(this.vao),u=0,this.boundProgram=e,this.boundVertexBuffer=r,this.boundVertexBuffer2=o,this.boundIndexBuffer=n,this.boundVertexOffset=a,this.boundDynamicVertexBuffer=s,this.boundDynamicVertexBuffer2=l;else{u=t.currentNumAttributes||0;for(var p=c;p<u;p++)i(0!==p),t.disableVertexAttribArray(p)}r.enableAttributes(t,e),o&&o.enableAttributes(t,e),s&&s.enableAttributes(t,e),l&&l.enableAttributes(t,e),r.bind(),r.setVertexAttribPointers(t,e,a),o&&(o.bind(),o.setVertexAttribPointers(t,e,a)),s&&(s.bind(),s.setVertexAttribPointers(t,e,a)),n&&n.bind(),l&&(l.bind(),l.setVertexAttribPointers(t,e,a)),t.currentNumAttributes=c},n.prototype.destroy=function(){this.vao&&(this.gl.extVertexArrayObject.deleteVertexArrayOES(this.vao),this.vao=null)},e.exports=n},{assert:11}],97:[function(t,e,r){"use strict";var i=t("../util/util");r.packUint8ToFloat=function(t,e){return t=i.clamp(Math.floor(t),0,255),e=i.clamp(Math.floor(e),0,255),256*t+e}},{"../util/util":267}],98:[function(t,e,r){"use strict";var i={prelude:{fragmentSource:"#ifdef GL_ES\nprecision mediump float;\n#else\n\n#if !defined(lowp)\n#define lowp\n#endif\n\n#if !defined(mediump)\n#define mediump\n#endif\n\n#if !defined(highp)\n#define highp\n#endif\n\n#endif\n",vertexSource:"#ifdef GL_ES\nprecision highp float;\n#else\n\n#if !defined(lowp)\n#define lowp\n#endif\n\n#if !defined(mediump)\n#define mediump\n#endif\n\n#if !defined(highp)\n#define highp\n#endif\n\n#endif\n\n// Unpack a pair of values that have been packed into a single float.\n// The packed values are assumed to be 8-bit unsigned integers, and are\n// packed like so:\n// packedValue = floor(input[0]) * 256 + input[1],\nvec2 unpack_float(const float packedValue) {\n int packedIntValue = int(packedValue);\n int v0 = packedIntValue / 256;\n return vec2(v0, packedIntValue - v0 * 256);\n}\n\nvec2 unpack_opacity(const float packedOpacity) {\n int intOpacity = int(packedOpacity) / 2;\n return vec2(float(intOpacity) / 127.0, mod(packedOpacity, 2.0));\n}\n\n// To minimize the number of attributes needed, we encode a 4-component\n// color into a pair of floats (i.e. a vec2) as follows:\n// [ floor(color.r * 255) * 256 + color.g * 255,\n// floor(color.b * 255) * 256 + color.g * 255 ]\nvec4 decode_color(const vec2 encodedColor) {\n return vec4(\n unpack_float(encodedColor[0]) / 255.0,\n unpack_float(encodedColor[1]) / 255.0\n );\n}\n\n// Unpack a pair of paint values and interpolate between them.\nfloat unpack_mix_vec2(const vec2 packedValue, const float t) {\n return mix(packedValue[0], packedValue[1], t);\n}\n\n// Unpack a pair of paint values and interpolate between them.\nvec4 unpack_mix_vec4(const vec4 packedColors, const float t) {\n vec4 minColor = decode_color(vec2(packedColors[0], packedColors[1]));\n vec4 maxColor = decode_color(vec2(packedColors[2], packedColors[3]));\n return mix(minColor, maxColor, t);\n}\n\n// The offset depends on how many pixels are between the world origin and the edge of the tile:\n// vec2 offset = mod(pixel_coord, size)\n//\n// At high zoom levels there are a ton of pixels between the world origin and the edge of the tile.\n// The glsl spec only guarantees 16 bits of precision for highp floats. We need more than that.\n//\n// The pixel_coord is passed in as two 16 bit values:\n// pixel_coord_upper = floor(pixel_coord / 2^16)\n// pixel_coord_lower = mod(pixel_coord, 2^16)\n//\n// The offset is calculated in a series of steps that should preserve this precision:\nvec2 get_pattern_pos(const vec2 pixel_coord_upper, const vec2 pixel_coord_lower,\n const vec2 pattern_size, const float tile_units_to_pixels, const vec2 pos) {\n\n vec2 offset = mod(mod(mod(pixel_coord_upper, pattern_size) * 256.0, pattern_size) * 256.0 + pixel_coord_lower, pattern_size);\n return (tile_units_to_pixels * pos + offset) / pattern_size;\n}\n"},circle:{fragmentSource:"#pragma mapbox: define highp vec4 color\n#pragma mapbox: define mediump float radius\n#pragma mapbox: define lowp float blur\n#pragma mapbox: define lowp float opacity\n#pragma mapbox: define highp vec4 stroke_color\n#pragma mapbox: define mediump float stroke_width\n#pragma mapbox: define lowp float stroke_opacity\n\nvarying vec3 v_data;\n\nvoid main() {\n #pragma mapbox: initialize highp vec4 color\n #pragma mapbox: initialize mediump float radius\n #pragma mapbox: initialize lowp float blur\n #pragma mapbox: initialize lowp float opacity\n #pragma mapbox: initialize highp vec4 stroke_color\n #pragma mapbox: initialize mediump float stroke_width\n #pragma mapbox: initialize lowp float stroke_opacity\n\n vec2 extrude = v_data.xy;\n float extrude_length = length(extrude);\n\n lowp float antialiasblur = v_data.z;\n float antialiased_blur = -max(blur, antialiasblur);\n\n float opacity_t = smoothstep(0.0, antialiased_blur, extrude_length - 1.0);\n\n float color_t = stroke_width < 0.01 ? 0.0 : smoothstep(\n antialiased_blur,\n 0.0,\n extrude_length - radius / (radius + stroke_width)\n );\n\n gl_FragColor = opacity_t * mix(color * opacity, stroke_color * stroke_opacity, color_t);\n\n#ifdef OVERDRAW_INSPECTOR\n gl_FragColor = vec4(1.0);\n#endif\n}\n",vertexSource:"uniform mat4 u_matrix;\nuniform bool u_scale_with_map;\nuniform bool u_pitch_with_map;\nuniform vec2 u_extrude_scale;\nuniform highp float u_camera_to_center_distance;\n\nattribute vec2 a_pos;\n\n#pragma mapbox: define highp vec4 color\n#pragma mapbox: define mediump float radius\n#pragma mapbox: define lowp float blur\n#pragma mapbox: define lowp float opacity\n#pragma mapbox: define highp vec4 stroke_color\n#pragma mapbox: define mediump float stroke_width\n#pragma mapbox: define lowp float stroke_opacity\n\nvarying vec3 v_data;\n\nvoid main(void) {\n #pragma mapbox: initialize highp vec4 color\n #pragma mapbox: initialize mediump float radius\n #pragma mapbox: initialize lowp float blur\n #pragma mapbox: initialize lowp float opacity\n #pragma mapbox: initialize highp vec4 stroke_color\n #pragma mapbox: initialize mediump float stroke_width\n #pragma mapbox: initialize lowp float stroke_opacity\n\n // unencode the extrusion vector that we snuck into the a_pos vector\n vec2 extrude = vec2(mod(a_pos, 2.0) * 2.0 - 1.0);\n\n // multiply a_pos by 0.5, since we had it * 2 in order to sneak\n // in extrusion data\n vec2 circle_center = floor(a_pos * 0.5);\n if (u_pitch_with_map) {\n vec2 corner_position = circle_center;\n if (u_scale_with_map) {\n corner_position += extrude * (radius + stroke_width) * u_extrude_scale;\n } else {\n // Pitching the circle with the map effectively scales it with the map\n // To counteract the effect for pitch-scale: viewport, we rescale the\n // whole circle based on the pitch scaling effect at its central point\n vec4 projected_center = u_matrix * vec4(circle_center, 0, 1);\n corner_position += extrude * (radius + stroke_width) * u_extrude_scale * (projected_center.w / u_camera_to_center_distance);\n }\n\n gl_Position = u_matrix * vec4(corner_position, 0, 1);\n } else {\n gl_Position = u_matrix * vec4(circle_center, 0, 1);\n\n if (u_scale_with_map) {\n gl_Position.xy += extrude * (radius + stroke_width) * u_extrude_scale * u_camera_to_center_distance;\n } else {\n gl_Position.xy += extrude * (radius + stroke_width) * u_extrude_scale * gl_Position.w;\n }\n }\n\n // This is a minimum blur distance that serves as a faux-antialiasing for\n // the circle. since blur is a ratio of the circle's size and the intent is\n // to keep the blur at roughly 1px, the two are inversely related.\n lowp float antialiasblur = 1.0 / DEVICE_PIXEL_RATIO / (radius + stroke_width);\n\n v_data = vec3(extrude.x, extrude.y, antialiasblur);\n}\n"},heatmap:{fragmentSource:"#pragma mapbox: define highp float weight\n\nuniform highp float u_intensity;\nuniform highp float u_radius;\nvarying vec2 v_extrude;\n\n// Gaussian kernel coefficient: 1 / sqrt(2 * PI)\n#define GAUSS_COEF 0.3989422804014327\n\nvoid main() {\n #pragma mapbox: initialize highp float weight\n\n // Kernel density estimation with a Gaussian kernel of size 5x5\n float d = -0.5 * 3.0 * 3.0 * dot(v_extrude, v_extrude);\n float val = weight * u_intensity * GAUSS_COEF * exp(d);\n\n gl_FragColor = vec4(val, 1.0, 1.0, 1.0);\n\n#ifdef OVERDRAW_INSPECTOR\n gl_FragColor = vec4(1.0);\n#endif\n}\n",vertexSource:"#pragma mapbox: define highp float weight\n\nuniform mat4 u_matrix;\nuniform float u_extrude_scale;\nuniform float u_radius;\nuniform float u_opacity;\nuniform float u_intensity;\n\nattribute vec2 a_pos;\n\nvarying vec2 v_extrude;\n\n// Effective \"0\" in the kernel density texture to adjust the kernel size to;\n// this empirically chosen number minimizes artifacts on overlapping kernels\n// for typical heatmap cases (assuming clustered source)\nconst highp float ZERO = 1.0 / 255.0 / 16.0;\n\n// Gaussian kernel coefficient: 1 / sqrt(2 * PI)\n#define GAUSS_COEF 0.3989422804014327\n\nvoid main(void) {\n #pragma mapbox: initialize highp float weight\n\n // unencode the extrusion vector that we snuck into the a_pos vector\n vec2 unscaled_extrude = vec2(mod(a_pos, 2.0) * 2.0 - 1.0);\n\n // This 'extrude' comes in ranging from [-1, -1], to [1, 1]. We'll use\n // it to produce the vertices of a square mesh framing the point feature\n // we're adding to the kernel density texture. We'll also pass it as\n // a varying, so that the fragment shader can determine the distance of\n // each fragment from the point feature.\n // Before we do so, we need to scale it up sufficiently so that the\n // kernel falls effectively to zero at the edge of the mesh.\n // That is, we want to know S such that\n // weight * u_intensity * GAUSS_COEF * exp(-0.5 * 3.0^2 * S^2) == ZERO\n // Which solves to:\n // S = sqrt(-2.0 * log(ZERO / (weight * u_intensity * GAUSS_COEF))) / 3.0\n float S = sqrt(-2.0 * log(ZERO / weight / u_intensity / GAUSS_COEF)) / 3.0;\n\n // Pass the varying in units of u_radius\n v_extrude = S * unscaled_extrude;\n\n // Scale by u_radius and the zoom-based scale factor to produce actual\n // mesh position\n vec2 extrude = v_extrude * u_radius * u_extrude_scale;\n\n // multiply a_pos by 0.5, since we had it * 2 in order to sneak\n // in extrusion data\n vec4 pos = vec4(floor(a_pos * 0.5) + extrude, 0, 1);\n\n gl_Position = u_matrix * pos;\n}\n"},heatmapTexture:{fragmentSource:"uniform sampler2D u_image;\nuniform sampler2D u_color_ramp;\nuniform float u_opacity;\nvarying vec2 v_pos;\n\nvoid main() {\n float t = texture2D(u_image, v_pos).r;\n vec4 color = texture2D(u_color_ramp, vec2(t, 0.5));\n gl_FragColor = color * u_opacity;\n\n#ifdef OVERDRAW_INSPECTOR\n gl_FragColor = vec4(0.0);\n#endif\n}\n",vertexSource:"uniform mat4 u_matrix;\nuniform vec2 u_world;\nattribute vec2 a_pos;\nvarying vec2 v_pos;\n\nvoid main() {\n gl_Position = u_matrix * vec4(a_pos * u_world, 0, 1);\n\n v_pos.x = a_pos.x;\n v_pos.y = 1.0 - a_pos.y;\n}\n"},collisionBox:{fragmentSource:"\nvarying float v_placed;\nvarying float v_notUsed;\n\nvoid main() {\n\n float alpha = 0.5;\n\n // Red = collision, hide label\n gl_FragColor = vec4(1.0, 0.0, 0.0, 1.0) * alpha;\n\n // Blue = no collision, label is showing\n if (v_placed > 0.5) {\n gl_FragColor = vec4(0.0, 0.0, 1.0, 0.5) * alpha;\n }\n\n if (v_notUsed > 0.5) {\n // This box not used, fade it out\n gl_FragColor *= .1;\n }\n}",vertexSource:"attribute vec2 a_pos;\nattribute vec2 a_anchor_pos;\nattribute vec2 a_extrude;\nattribute vec2 a_placed;\n\nuniform mat4 u_matrix;\nuniform vec2 u_extrude_scale;\nuniform float u_camera_to_center_distance;\n\nvarying float v_placed;\nvarying float v_notUsed;\n\nvoid main() {\n vec4 projectedPoint = u_matrix * vec4(a_anchor_pos, 0, 1);\n highp float camera_to_anchor_distance = projectedPoint.w;\n highp float collision_perspective_ratio = 0.5 + 0.5 * (u_camera_to_center_distance / camera_to_anchor_distance);\n\n gl_Position = u_matrix * vec4(a_pos, 0.0, 1.0);\n gl_Position.xy += a_extrude * u_extrude_scale * gl_Position.w * collision_perspective_ratio;\n\n v_placed = a_placed.x;\n v_notUsed = a_placed.y;\n}\n"},collisionCircle:{fragmentSource:"\nvarying float v_placed;\nvarying float v_notUsed;\nvarying float v_radius;\nvarying vec2 v_extrude;\nvarying vec2 v_extrude_scale;\n\nvoid main() {\n float alpha = 0.5;\n\n // Red = collision, hide label\n vec4 color = vec4(1.0, 0.0, 0.0, 1.0) * alpha;\n\n // Blue = no collision, label is showing\n if (v_placed > 0.5) {\n color = vec4(0.0, 0.0, 1.0, 0.5) * alpha;\n }\n\n if (v_notUsed > 0.5) {\n // This box not used, fade it out\n color *= .2;\n }\n\n float extrude_scale_length = length(v_extrude_scale);\n float extrude_length = length(v_extrude) * extrude_scale_length;\n float stroke_width = 3.0;\n float radius = v_radius * extrude_scale_length;\n\n float distance_to_edge = abs(extrude_length - radius);\n float opacity_t = smoothstep(-stroke_width, 0.0, -distance_to_edge);\n\n gl_FragColor = opacity_t * color;\n}\n",vertexSource:"attribute vec2 a_pos;\nattribute vec2 a_anchor_pos;\nattribute vec2 a_extrude;\nattribute vec2 a_placed;\n\nuniform mat4 u_matrix;\nuniform vec2 u_extrude_scale;\nuniform float u_camera_to_center_distance;\n\nvarying float v_placed;\nvarying float v_notUsed;\nvarying float v_radius;\n\nvarying vec2 v_extrude;\nvarying vec2 v_extrude_scale;\n\nvoid main() {\n vec4 projectedPoint = u_matrix * vec4(a_anchor_pos, 0, 1);\n highp float camera_to_anchor_distance = projectedPoint.w;\n highp float collision_perspective_ratio = 0.5 + 0.5 * (camera_to_anchor_distance / u_camera_to_center_distance);\n\n gl_Position = u_matrix * vec4(a_pos, 0.0, 1.0);\n\n highp float padding_factor = 1.2; // Pad the vertices slightly to make room for anti-alias blur\n gl_Position.xy += a_extrude * u_extrude_scale * padding_factor * gl_Position.w / collision_perspective_ratio;\n\n v_placed = a_placed.x;\n v_notUsed = a_placed.y;\n v_radius = abs(a_extrude.y); // We don't pitch the circles, so both units of the extrusion vector are equal in magnitude to the radius\n\n v_extrude = a_extrude * padding_factor;\n v_extrude_scale = u_extrude_scale * u_camera_to_center_distance / collision_perspective_ratio;\n}\n"},debug:{fragmentSource:"uniform highp vec4 u_color;\n\nvoid main() {\n gl_FragColor = u_color;\n}\n",vertexSource:"attribute vec2 a_pos;\n\nuniform mat4 u_matrix;\n\nvoid main() {\n gl_Position = u_matrix * vec4(a_pos, 0, 1);\n}\n"},fill:{fragmentSource:"#pragma mapbox: define highp vec4 color\n#pragma mapbox: define lowp float opacity\n\nvoid main() {\n #pragma mapbox: initialize highp vec4 color\n #pragma mapbox: initialize lowp float opacity\n\n gl_FragColor = color * opacity;\n\n#ifdef OVERDRAW_INSPECTOR\n gl_FragColor = vec4(1.0);\n#endif\n}\n",vertexSource:"attribute vec2 a_pos;\n\nuniform mat4 u_matrix;\n\n#pragma mapbox: define highp vec4 color\n#pragma mapbox: define lowp float opacity\n\nvoid main() {\n #pragma mapbox: initialize highp vec4 color\n #pragma mapbox: initialize lowp float opacity\n\n gl_Position = u_matrix * vec4(a_pos, 0, 1);\n}\n"},fillOutline:{fragmentSource:"#pragma mapbox: define highp vec4 outline_color\n#pragma mapbox: define lowp float opacity\n\nvarying vec2 v_pos;\n\nvoid main() {\n #pragma mapbox: initialize highp vec4 outline_color\n #pragma mapbox: initialize lowp float opacity\n\n float dist = length(v_pos - gl_FragCoord.xy);\n float alpha = 1.0 - smoothstep(0.0, 1.0, dist);\n gl_FragColor = outline_color * (alpha * opacity);\n\n#ifdef OVERDRAW_INSPECTOR\n gl_FragColor = vec4(1.0);\n#endif\n}\n",vertexSource:"attribute vec2 a_pos;\n\nuniform mat4 u_matrix;\nuniform vec2 u_world;\n\nvarying vec2 v_pos;\n\n#pragma mapbox: define highp vec4 outline_color\n#pragma mapbox: define lowp float opacity\n\nvoid main() {\n #pragma mapbox: initialize highp vec4 outline_color\n #pragma mapbox: initialize lowp float opacity\n\n gl_Position = u_matrix * vec4(a_pos, 0, 1);\n v_pos = (gl_Position.xy / gl_Position.w + 1.0) / 2.0 * u_world;\n}\n"},fillOutlinePattern:{fragmentSource:"uniform vec2 u_pattern_tl_a;\nuniform vec2 u_pattern_br_a;\nuniform vec2 u_pattern_tl_b;\nuniform vec2 u_pattern_br_b;\nuniform vec2 u_texsize;\nuniform float u_mix;\n\nuniform sampler2D u_image;\n\nvarying vec2 v_pos_a;\nvarying vec2 v_pos_b;\nvarying vec2 v_pos;\n\n#pragma mapbox: define lowp float opacity\n\nvoid main() {\n #pragma mapbox: initialize lowp float opacity\n\n vec2 imagecoord = mod(v_pos_a, 1.0);\n vec2 pos = mix(u_pattern_tl_a / u_texsize, u_pattern_br_a / u_texsize, imagecoord);\n vec4 color1 = texture2D(u_image, pos);\n\n vec2 imagecoord_b = mod(v_pos_b, 1.0);\n vec2 pos2 = mix(u_pattern_tl_b / u_texsize, u_pattern_br_b / u_texsize, imagecoord_b);\n vec4 color2 = texture2D(u_image, pos2);\n\n // find distance to outline for alpha interpolation\n\n float dist = length(v_pos - gl_FragCoord.xy);\n float alpha = 1.0 - smoothstep(0.0, 1.0, dist);\n\n\n gl_FragColor = mix(color1, color2, u_mix) * alpha * opacity;\n\n#ifdef OVERDRAW_INSPECTOR\n gl_FragColor = vec4(1.0);\n#endif\n}\n",vertexSource:"uniform mat4 u_matrix;\nuniform vec2 u_world;\nuniform vec2 u_pattern_size_a;\nuniform vec2 u_pattern_size_b;\nuniform vec2 u_pixel_coord_upper;\nuniform vec2 u_pixel_coord_lower;\nuniform float u_scale_a;\nuniform float u_scale_b;\nuniform float u_tile_units_to_pixels;\n\nattribute vec2 a_pos;\n\nvarying vec2 v_pos_a;\nvarying vec2 v_pos_b;\nvarying vec2 v_pos;\n\n#pragma mapbox: define lowp float opacity\n\nvoid main() {\n #pragma mapbox: initialize lowp float opacity\n\n gl_Position = u_matrix * vec4(a_pos, 0, 1);\n\n v_pos_a = get_pattern_pos(u_pixel_coord_upper, u_pixel_coord_lower, u_scale_a * u_pattern_size_a, u_tile_units_to_pixels, a_pos);\n v_pos_b = get_pattern_pos(u_pixel_coord_upper, u_pixel_coord_lower, u_scale_b * u_pattern_size_b, u_tile_units_to_pixels, a_pos);\n\n v_pos = (gl_Position.xy / gl_Position.w + 1.0) / 2.0 * u_world;\n}\n"},fillPattern:{fragmentSource:"uniform vec2 u_pattern_tl_a;\nuniform vec2 u_pattern_br_a;\nuniform vec2 u_pattern_tl_b;\nuniform vec2 u_pattern_br_b;\nuniform vec2 u_texsize;\nuniform float u_mix;\n\nuniform sampler2D u_image;\n\nvarying vec2 v_pos_a;\nvarying vec2 v_pos_b;\n\n#pragma mapbox: define lowp float opacity\n\nvoid main() {\n #pragma mapbox: initialize lowp float opacity\n\n vec2 imagecoord = mod(v_pos_a, 1.0);\n vec2 pos = mix(u_pattern_tl_a / u_texsize, u_pattern_br_a / u_texsize, imagecoord);\n vec4 color1 = texture2D(u_image, pos);\n\n vec2 imagecoord_b = mod(v_pos_b, 1.0);\n vec2 pos2 = mix(u_pattern_tl_b / u_texsize, u_pattern_br_b / u_texsize, imagecoord_b);\n vec4 color2 = texture2D(u_image, pos2);\n\n gl_FragColor = mix(color1, color2, u_mix) * opacity;\n\n#ifdef OVERDRAW_INSPECTOR\n gl_FragColor = vec4(1.0);\n#endif\n}\n",vertexSource:"uniform mat4 u_matrix;\nuniform vec2 u_pattern_size_a;\nuniform vec2 u_pattern_size_b;\nuniform vec2 u_pixel_coord_upper;\nuniform vec2 u_pixel_coord_lower;\nuniform float u_scale_a;\nuniform float u_scale_b;\nuniform float u_tile_units_to_pixels;\n\nattribute vec2 a_pos;\n\nvarying vec2 v_pos_a;\nvarying vec2 v_pos_b;\n\n#pragma mapbox: define lowp float opacity\n\nvoid main() {\n #pragma mapbox: initialize lowp float opacity\n\n gl_Position = u_matrix * vec4(a_pos, 0, 1);\n\n v_pos_a = get_pattern_pos(u_pixel_coord_upper, u_pixel_coord_lower, u_scale_a * u_pattern_size_a, u_tile_units_to_pixels, a_pos);\n v_pos_b = get_pattern_pos(u_pixel_coord_upper, u_pixel_coord_lower, u_scale_b * u_pattern_size_b, u_tile_units_to_pixels, a_pos);\n}\n"},fillExtrusion:{fragmentSource:"varying vec4 v_color;\n#pragma mapbox: define lowp float base\n#pragma mapbox: define lowp float height\n#pragma mapbox: define highp vec4 color\n\nvoid main() {\n #pragma mapbox: initialize lowp float base\n #pragma mapbox: initialize lowp float height\n #pragma mapbox: initialize highp vec4 color\n\n gl_FragColor = v_color;\n\n#ifdef OVERDRAW_INSPECTOR\n gl_FragColor = vec4(1.0);\n#endif\n}\n",vertexSource:"uniform mat4 u_matrix;\nuniform vec3 u_lightcolor;\nuniform lowp vec3 u_lightpos;\nuniform lowp float u_lightintensity;\n\nattribute vec2 a_pos;\nattribute vec3 a_normal;\nattribute float a_edgedistance;\n\nvarying vec4 v_color;\n\n#pragma mapbox: define lowp float base\n#pragma mapbox: define lowp float height\n\n#pragma mapbox: define highp vec4 color\n\nvoid main() {\n #pragma mapbox: initialize lowp float base\n #pragma mapbox: initialize lowp float height\n #pragma mapbox: initialize highp vec4 color\n\n base = max(0.0, base);\n height = max(0.0, height);\n\n float ed = a_edgedistance; // use each attrib in order to not trip a VAO assert\n float t = mod(a_normal.x, 2.0);\n\n gl_Position = u_matrix * vec4(a_pos, t > 0.0 ? height : base, 1);\n\n // Relative luminance (how dark/bright is the surface color?)\n float colorvalue = color.r * 0.2126 + color.g * 0.7152 + color.b * 0.0722;\n\n v_color = vec4(0.0, 0.0, 0.0, 1.0);\n\n // Add slight ambient lighting so no extrusions are totally black\n vec4 ambientlight = vec4(0.03, 0.03, 0.03, 1.0);\n color += ambientlight;\n\n // Calculate cos(theta), where theta is the angle between surface normal and diffuse light ray\n float directional = clamp(dot(a_normal / 16384.0, u_lightpos), 0.0, 1.0);\n\n // Adjust directional so that\n // the range of values for highlight/shading is narrower\n // with lower light intensity\n // and with lighter/brighter surface colors\n directional = mix((1.0 - u_lightintensity), max((1.0 - colorvalue + u_lightintensity), 1.0), directional);\n\n // Add gradient along z axis of side surfaces\n if (a_normal.y != 0.0) {\n directional *= clamp((t + base) * pow(height / 150.0, 0.5), mix(0.7, 0.98, 1.0 - u_lightintensity), 1.0);\n }\n\n // Assign final color based on surface + ambient light color, diffuse light directional, and light color\n // with lower bounds adjusted to hue of light\n // so that shading is tinted with the complementary (opposite) color to the light color\n v_color.r += clamp(color.r * directional * u_lightcolor.r, mix(0.0, 0.3, 1.0 - u_lightcolor.r), 1.0);\n v_color.g += clamp(color.g * directional * u_lightcolor.g, mix(0.0, 0.3, 1.0 - u_lightcolor.g), 1.0);\n v_color.b += clamp(color.b * directional * u_lightcolor.b, mix(0.0, 0.3, 1.0 - u_lightcolor.b), 1.0);\n}\n"},fillExtrusionPattern:{fragmentSource:"uniform vec2 u_pattern_tl_a;\nuniform vec2 u_pattern_br_a;\nuniform vec2 u_pattern_tl_b;\nuniform vec2 u_pattern_br_b;\nuniform vec2 u_texsize;\nuniform float u_mix;\n\nuniform sampler2D u_image;\n\nvarying vec2 v_pos_a;\nvarying vec2 v_pos_b;\nvarying vec4 v_lighting;\n\n#pragma mapbox: define lowp float base\n#pragma mapbox: define lowp float height\n\nvoid main() {\n #pragma mapbox: initialize lowp float base\n #pragma mapbox: initialize lowp float height\n\n vec2 imagecoord = mod(v_pos_a, 1.0);\n vec2 pos = mix(u_pattern_tl_a / u_texsize, u_pattern_br_a / u_texsize, imagecoord);\n vec4 color1 = texture2D(u_image, pos);\n\n vec2 imagecoord_b = mod(v_pos_b, 1.0);\n vec2 pos2 = mix(u_pattern_tl_b / u_texsize, u_pattern_br_b / u_texsize, imagecoord_b);\n vec4 color2 = texture2D(u_image, pos2);\n\n vec4 mixedColor = mix(color1, color2, u_mix);\n\n gl_FragColor = mixedColor * v_lighting;\n\n#ifdef OVERDRAW_INSPECTOR\n gl_FragColor = vec4(1.0);\n#endif\n}\n",vertexSource:"uniform mat4 u_matrix;\nuniform vec2 u_pattern_size_a;\nuniform vec2 u_pattern_size_b;\nuniform vec2 u_pixel_coord_upper;\nuniform vec2 u_pixel_coord_lower;\nuniform float u_scale_a;\nuniform float u_scale_b;\nuniform float u_tile_units_to_pixels;\nuniform float u_height_factor;\n\nuniform vec3 u_lightcolor;\nuniform lowp vec3 u_lightpos;\nuniform lowp float u_lightintensity;\n\nattribute vec2 a_pos;\nattribute vec3 a_normal;\nattribute float a_edgedistance;\n\nvarying vec2 v_pos_a;\nvarying vec2 v_pos_b;\nvarying vec4 v_lighting;\nvarying float v_directional;\n\n#pragma mapbox: define lowp float base\n#pragma mapbox: define lowp float height\n\nvoid main() {\n #pragma mapbox: initialize lowp float base\n #pragma mapbox: initialize lowp float height\n\n base = max(0.0, base);\n height = max(0.0, height);\n\n float t = mod(a_normal.x, 2.0);\n float z = t > 0.0 ? height : base;\n\n gl_Position = u_matrix * vec4(a_pos, z, 1);\n\n vec2 pos = a_normal.x == 1.0 && a_normal.y == 0.0 && a_normal.z == 16384.0\n ? a_pos // extrusion top\n : vec2(a_edgedistance, z * u_height_factor); // extrusion side\n\n v_pos_a = get_pattern_pos(u_pixel_coord_upper, u_pixel_coord_lower, u_scale_a * u_pattern_size_a, u_tile_units_to_pixels, pos);\n v_pos_b = get_pattern_pos(u_pixel_coord_upper, u_pixel_coord_lower, u_scale_b * u_pattern_size_b, u_tile_units_to_pixels, pos);\n\n v_lighting = vec4(0.0, 0.0, 0.0, 1.0);\n float directional = clamp(dot(a_normal / 16383.0, u_lightpos), 0.0, 1.0);\n directional = mix((1.0 - u_lightintensity), max((0.5 + u_lightintensity), 1.0), directional);\n\n if (a_normal.y != 0.0) {\n directional *= clamp((t + base) * pow(height / 150.0, 0.5), mix(0.7, 0.98, 1.0 - u_lightintensity), 1.0);\n }\n\n v_lighting.rgb += clamp(directional * u_lightcolor, mix(vec3(0.0), vec3(0.3), 1.0 - u_lightcolor), vec3(1.0));\n}\n"},extrusionTexture:{fragmentSource:"uniform sampler2D u_image;\nuniform float u_opacity;\nvarying vec2 v_pos;\n\nvoid main() {\n gl_FragColor = texture2D(u_image, v_pos) * u_opacity;\n\n#ifdef OVERDRAW_INSPECTOR\n gl_FragColor = vec4(0.0);\n#endif\n}\n",vertexSource:"uniform mat4 u_matrix;\nuniform vec2 u_world;\nattribute vec2 a_pos;\nvarying vec2 v_pos;\n\nvoid main() {\n gl_Position = u_matrix * vec4(a_pos * u_world, 0, 1);\n\n v_pos.x = a_pos.x;\n v_pos.y = 1.0 - a_pos.y;\n}\n"},line:{fragmentSource:"#pragma mapbox: define highp vec4 color\n#pragma mapbox: define lowp float blur\n#pragma mapbox: define lowp float opacity\n\nvarying vec2 v_width2;\nvarying vec2 v_normal;\nvarying float v_gamma_scale;\n\nvoid main() {\n #pragma mapbox: initialize highp vec4 color\n #pragma mapbox: initialize lowp float blur\n #pragma mapbox: initialize lowp float opacity\n\n // Calculate the distance of the pixel from the line in pixels.\n float dist = length(v_normal) * v_width2.s;\n\n // Calculate the antialiasing fade factor. This is either when fading in\n // the line in case of an offset line (v_width2.t) or when fading out\n // (v_width2.s)\n float blur2 = (blur + 1.0 / DEVICE_PIXEL_RATIO) * v_gamma_scale;\n float alpha = clamp(min(dist - (v_width2.t - blur2), v_width2.s - dist) / blur2, 0.0, 1.0);\n\n gl_FragColor = color * (alpha * opacity);\n\n#ifdef OVERDRAW_INSPECTOR\n gl_FragColor = vec4(1.0);\n#endif\n}\n",vertexSource:"\n\n// the distance over which the line edge fades out.\n// Retina devices need a smaller distance to avoid aliasing.\n#define ANTIALIASING 1.0 / DEVICE_PIXEL_RATIO / 2.0\n\n// floor(127 / 2) == 63.0\n// the maximum allowed miter limit is 2.0 at the moment. the extrude normal is\n// stored in a byte (-128..127). we scale regular normals up to length 63, but\n// there are also \"special\" normals that have a bigger length (of up to 126 in\n// this case).\n// #define scale 63.0\n#define scale 0.015873016\n\nattribute vec4 a_pos_normal;\nattribute vec4 a_data;\n\nuniform mat4 u_matrix;\nuniform mediump float u_ratio;\nuniform vec2 u_gl_units_to_pixels;\n\nvarying vec2 v_normal;\nvarying vec2 v_width2;\nvarying float v_gamma_scale;\n\n#pragma mapbox: define highp vec4 color\n#pragma mapbox: define lowp float blur\n#pragma mapbox: define lowp float opacity\n#pragma mapbox: define mediump float gapwidth\n#pragma mapbox: define lowp float offset\n#pragma mapbox: define mediump float width\n\nvoid main() {\n #pragma mapbox: initialize highp vec4 color\n #pragma mapbox: initialize lowp float blur\n #pragma mapbox: initialize lowp float opacity\n #pragma mapbox: initialize mediump float gapwidth\n #pragma mapbox: initialize lowp float offset\n #pragma mapbox: initialize mediump float width\n\n vec2 a_extrude = a_data.xy - 128.0;\n float a_direction = mod(a_data.z, 4.0) - 1.0;\n\n vec2 pos = a_pos_normal.xy;\n\n // x is 1 if it's a round cap, 0 otherwise\n // y is 1 if the normal points up, and -1 if it points down\n mediump vec2 normal = a_pos_normal.zw;\n v_normal = normal;\n\n // these transformations used to be applied in the JS and native code bases.\n // moved them into the shader for clarity and simplicity.\n gapwidth = gapwidth / 2.0;\n float halfwidth = width / 2.0;\n offset = -1.0 * offset;\n\n float inset = gapwidth + (gapwidth > 0.0 ? ANTIALIASING : 0.0);\n float outset = gapwidth + halfwidth * (gapwidth > 0.0 ? 2.0 : 1.0) + ANTIALIASING;\n\n // Scale the extrusion vector down to a normal and then up by the line width\n // of this vertex.\n mediump vec2 dist = outset * a_extrude * scale;\n\n // Calculate the offset when drawing a line that is to the side of the actual line.\n // We do this by creating a vector that points towards the extrude, but rotate\n // it when we're drawing round end points (a_direction = -1 or 1) since their\n // extrude vector points in another direction.\n mediump float u = 0.5 * a_direction;\n mediump float t = 1.0 - abs(u);\n mediump vec2 offset2 = offset * a_extrude * scale * normal.y * mat2(t, -u, u, t);\n\n vec4 projected_extrude = u_matrix * vec4(dist / u_ratio, 0.0, 0.0);\n gl_Position = u_matrix * vec4(pos + offset2 / u_ratio, 0.0, 1.0) + projected_extrude;\n\n // calculate how much the perspective view squishes or stretches the extrude\n float extrude_length_without_perspective = length(dist);\n float extrude_length_with_perspective = length(projected_extrude.xy / gl_Position.w * u_gl_units_to_pixels);\n v_gamma_scale = extrude_length_without_perspective / extrude_length_with_perspective;\n\n v_width2 = vec2(outset, inset);\n}\n"},linePattern:{fragmentSource:"uniform vec2 u_pattern_size_a;\nuniform vec2 u_pattern_size_b;\nuniform vec2 u_pattern_tl_a;\nuniform vec2 u_pattern_br_a;\nuniform vec2 u_pattern_tl_b;\nuniform vec2 u_pattern_br_b;\nuniform vec2 u_texsize;\nuniform float u_fade;\n\nuniform sampler2D u_image;\n\nvarying vec2 v_normal;\nvarying vec2 v_width2;\nvarying float v_linesofar;\nvarying float v_gamma_scale;\n\n#pragma mapbox: define lowp float blur\n#pragma mapbox: define lowp float opacity\n\nvoid main() {\n #pragma mapbox: initialize lowp float blur\n #pragma mapbox: initialize lowp float opacity\n\n // Calculate the distance of the pixel from the line in pixels.\n float dist = length(v_normal) * v_width2.s;\n\n // Calculate the antialiasing fade factor. This is either when fading in\n // the line in case of an offset line (v_width2.t) or when fading out\n // (v_width2.s)\n float blur2 = (blur + 1.0 / DEVICE_PIXEL_RATIO) * v_gamma_scale;\n float alpha = clamp(min(dist - (v_width2.t - blur2), v_width2.s - dist) / blur2, 0.0, 1.0);\n\n float x_a = mod(v_linesofar / u_pattern_size_a.x, 1.0);\n float x_b = mod(v_linesofar / u_pattern_size_b.x, 1.0);\n float y_a = 0.5 + (v_normal.y * v_width2.s / u_pattern_size_a.y);\n float y_b = 0.5 + (v_normal.y * v_width2.s / u_pattern_size_b.y);\n vec2 pos_a = mix(u_pattern_tl_a / u_texsize, u_pattern_br_a / u_texsize, vec2(x_a, y_a));\n vec2 pos_b = mix(u_pattern_tl_b / u_texsize, u_pattern_br_b / u_texsize, vec2(x_b, y_b));\n\n vec4 color = mix(texture2D(u_image, pos_a), texture2D(u_image, pos_b), u_fade);\n\n gl_FragColor = color * alpha * opacity;\n\n#ifdef OVERDRAW_INSPECTOR\n gl_FragColor = vec4(1.0);\n#endif\n}\n",vertexSource:"// floor(127 / 2) == 63.0\n// the maximum allowed miter limit is 2.0 at the moment. the extrude normal is\n// stored in a byte (-128..127). we scale regular normals up to length 63, but\n// there are also \"special\" normals that have a bigger length (of up to 126 in\n// this case).\n// #define scale 63.0\n#define scale 0.015873016\n\n// We scale the distance before adding it to the buffers so that we can store\n// long distances for long segments. Use this value to unscale the distance.\n#define LINE_DISTANCE_SCALE 2.0\n\n// the distance over which the line edge fades out.\n// Retina devices need a smaller distance to avoid aliasing.\n#define ANTIALIASING 1.0 / DEVICE_PIXEL_RATIO / 2.0\n\nattribute vec4 a_pos_normal;\nattribute vec4 a_data;\n\nuniform mat4 u_matrix;\nuniform mediump float u_ratio;\nuniform vec2 u_gl_units_to_pixels;\n\nvarying vec2 v_normal;\nvarying vec2 v_width2;\nvarying float v_linesofar;\nvarying float v_gamma_scale;\n\n#pragma mapbox: define lowp float blur\n#pragma mapbox: define lowp float opacity\n#pragma mapbox: define lowp float offset\n#pragma mapbox: define mediump float gapwidth\n#pragma mapbox: define mediump float width\n\nvoid main() {\n #pragma mapbox: initialize lowp float blur\n #pragma mapbox: initialize lowp float opacity\n #pragma mapbox: initialize lowp float offset\n #pragma mapbox: initialize mediump float gapwidth\n #pragma mapbox: initialize mediump float width\n\n vec2 a_extrude = a_data.xy - 128.0;\n float a_direction = mod(a_data.z, 4.0) - 1.0;\n float a_linesofar = (floor(a_data.z / 4.0) + a_data.w * 64.0) * LINE_DISTANCE_SCALE;\n\n vec2 pos = a_pos_normal.xy;\n\n // x is 1 if it's a round cap, 0 otherwise\n // y is 1 if the normal points up, and -1 if it points down\n mediump vec2 normal = a_pos_normal.zw;\n v_normal = normal;\n\n // these transformations used to be applied in the JS and native code bases.\n // moved them into the shader for clarity and simplicity.\n gapwidth = gapwidth / 2.0;\n float halfwidth = width / 2.0;\n offset = -1.0 * offset;\n\n float inset = gapwidth + (gapwidth > 0.0 ? ANTIALIASING : 0.0);\n float outset = gapwidth + halfwidth * (gapwidth > 0.0 ? 2.0 : 1.0) + ANTIALIASING;\n\n // Scale the extrusion vector down to a normal and then up by the line width\n // of this vertex.\n mediump vec2 dist = outset * a_extrude * scale;\n\n // Calculate the offset when drawing a line that is to the side of the actual line.\n // We do this by creating a vector that points towards the extrude, but rotate\n // it when we're drawing round end points (a_direction = -1 or 1) since their\n // extrude vector points in another direction.\n mediump float u = 0.5 * a_direction;\n mediump float t = 1.0 - abs(u);\n mediump vec2 offset2 = offset * a_extrude * scale * normal.y * mat2(t, -u, u, t);\n\n vec4 projected_extrude = u_matrix * vec4(dist / u_ratio, 0.0, 0.0);\n gl_Position = u_matrix * vec4(pos + offset2 / u_ratio, 0.0, 1.0) + projected_extrude;\n\n // calculate how much the perspective view squishes or stretches the extrude\n float extrude_length_without_perspective = length(dist);\n float extrude_length_with_perspective = length(projected_extrude.xy / gl_Position.w * u_gl_units_to_pixels);\n v_gamma_scale = extrude_length_without_perspective / extrude_length_with_perspective;\n\n v_linesofar = a_linesofar;\n v_width2 = vec2(outset, inset);\n}\n"},lineSDF:{fragmentSource:"\nuniform sampler2D u_image;\nuniform float u_sdfgamma;\nuniform float u_mix;\n\nvarying vec2 v_normal;\nvarying vec2 v_width2;\nvarying vec2 v_tex_a;\nvarying vec2 v_tex_b;\nvarying float v_gamma_scale;\n\n#pragma mapbox: define highp vec4 color\n#pragma mapbox: define lowp float blur\n#pragma mapbox: define lowp float opacity\n#pragma mapbox: define mediump float width\n#pragma mapbox: define lowp float floorwidth\n\nvoid main() {\n #pragma mapbox: initialize highp vec4 color\n #pragma mapbox: initialize lowp float blur\n #pragma mapbox: initialize lowp float opacity\n #pragma mapbox: initialize mediump float width\n #pragma mapbox: initialize lowp float floorwidth\n\n // Calculate the distance of the pixel from the line in pixels.\n float dist = length(v_normal) * v_width2.s;\n\n // Calculate the antialiasing fade factor. This is either when fading in\n // the line in case of an offset line (v_width2.t) or when fading out\n // (v_width2.s)\n float blur2 = (blur + 1.0 / DEVICE_PIXEL_RATIO) * v_gamma_scale;\n float alpha = clamp(min(dist - (v_width2.t - blur2), v_width2.s - dist) / blur2, 0.0, 1.0);\n\n float sdfdist_a = texture2D(u_image, v_tex_a).a;\n float sdfdist_b = texture2D(u_image, v_tex_b).a;\n float sdfdist = mix(sdfdist_a, sdfdist_b, u_mix);\n alpha *= smoothstep(0.5 - u_sdfgamma / floorwidth, 0.5 + u_sdfgamma / floorwidth, sdfdist);\n\n gl_FragColor = color * (alpha * opacity);\n\n#ifdef OVERDRAW_INSPECTOR\n gl_FragColor = vec4(1.0);\n#endif\n}\n",vertexSource:"// floor(127 / 2) == 63.0\n// the maximum allowed miter limit is 2.0 at the moment. the extrude normal is\n// stored in a byte (-128..127). we scale regular normals up to length 63, but\n// there are also \"special\" normals that have a bigger length (of up to 126 in\n// this case).\n// #define scale 63.0\n#define scale 0.015873016\n\n// We scale the distance before adding it to the buffers so that we can store\n// long distances for long segments. Use this value to unscale the distance.\n#define LINE_DISTANCE_SCALE 2.0\n\n// the distance over which the line edge fades out.\n// Retina devices need a smaller distance to avoid aliasing.\n#define ANTIALIASING 1.0 / DEVICE_PIXEL_RATIO / 2.0\n\nattribute vec4 a_pos_normal;\nattribute vec4 a_data;\n\nuniform mat4 u_matrix;\nuniform mediump float u_ratio;\nuniform vec2 u_patternscale_a;\nuniform float u_tex_y_a;\nuniform vec2 u_patternscale_b;\nuniform float u_tex_y_b;\nuniform vec2 u_gl_units_to_pixels;\n\nvarying vec2 v_normal;\nvarying vec2 v_width2;\nvarying vec2 v_tex_a;\nvarying vec2 v_tex_b;\nvarying float v_gamma_scale;\n\n#pragma mapbox: define highp vec4 color\n#pragma mapbox: define lowp float blur\n#pragma mapbox: define lowp float opacity\n#pragma mapbox: define mediump float gapwidth\n#pragma mapbox: define lowp float offset\n#pragma mapbox: define mediump float width\n#pragma mapbox: define lowp float floorwidth\n\nvoid main() {\n #pragma mapbox: initialize highp vec4 color\n #pragma mapbox: initialize lowp float blur\n #pragma mapbox: initialize lowp float opacity\n #pragma mapbox: initialize mediump float gapwidth\n #pragma mapbox: initialize lowp float offset\n #pragma mapbox: initialize mediump float width\n #pragma mapbox: initialize lowp float floorwidth\n\n vec2 a_extrude = a_data.xy - 128.0;\n float a_direction = mod(a_data.z, 4.0) - 1.0;\n float a_linesofar = (floor(a_data.z / 4.0) + a_data.w * 64.0) * LINE_DISTANCE_SCALE;\n\n vec2 pos = a_pos_normal.xy;\n\n // x is 1 if it's a round cap, 0 otherwise\n // y is 1 if the normal points up, and -1 if it points down\n mediump vec2 normal = a_pos_normal.zw;\n v_normal = normal;\n\n // these transformations used to be applied in the JS and native code bases.\n // moved them into the shader for clarity and simplicity.\n gapwidth = gapwidth / 2.0;\n float halfwidth = width / 2.0;\n offset = -1.0 * offset;\n\n float inset = gapwidth + (gapwidth > 0.0 ? ANTIALIASING : 0.0);\n float outset = gapwidth + halfwidth * (gapwidth > 0.0 ? 2.0 : 1.0) + ANTIALIASING;\n\n // Scale the extrusion vector down to a normal and then up by the line width\n // of this vertex.\n mediump vec2 dist =outset * a_extrude * scale;\n\n // Calculate the offset when drawing a line that is to the side of the actual line.\n // We do this by creating a vector that points towards the extrude, but rotate\n // it when we're drawing round end points (a_direction = -1 or 1) since their\n // extrude vector points in another direction.\n mediump float u = 0.5 * a_direction;\n mediump float t = 1.0 - abs(u);\n mediump vec2 offset2 = offset * a_extrude * scale * normal.y * mat2(t, -u, u, t);\n\n vec4 projected_extrude = u_matrix * vec4(dist / u_ratio, 0.0, 0.0);\n gl_Position = u_matrix * vec4(pos + offset2 / u_ratio, 0.0, 1.0) + projected_extrude;\n\n // calculate how much the perspective view squishes or stretches the extrude\n float extrude_length_without_perspective = length(dist);\n float extrude_length_with_perspective = length(projected_extrude.xy / gl_Position.w * u_gl_units_to_pixels);\n v_gamma_scale = extrude_length_without_perspective / extrude_length_with_perspective;\n\n v_tex_a = vec2(a_linesofar * u_patternscale_a.x / floorwidth, normal.y * u_patternscale_a.y + u_tex_y_a);\n v_tex_b = vec2(a_linesofar * u_patternscale_b.x / floorwidth, normal.y * u_patternscale_b.y + u_tex_y_b);\n\n v_width2 = vec2(outset, inset);\n}\n"},raster:{fragmentSource:"uniform float u_fade_t;\nuniform float u_opacity;\nuniform sampler2D u_image0;\nuniform sampler2D u_image1;\nvarying vec2 v_pos0;\nvarying vec2 v_pos1;\n\nuniform float u_brightness_low;\nuniform float u_brightness_high;\n\nuniform float u_saturation_factor;\nuniform float u_contrast_factor;\nuniform vec3 u_spin_weights;\n\nvoid main() {\n\n // read and cross-fade colors from the main and parent tiles\n vec4 color0 = texture2D(u_image0, v_pos0);\n vec4 color1 = texture2D(u_image1, v_pos1);\n if (color0.a > 0.0) {\n color0.rgb = color0.rgb / color0.a;\n }\n if (color1.a > 0.0) {\n color1.rgb = color1.rgb / color1.a;\n }\n vec4 color = mix(color0, color1, u_fade_t);\n color.a *= u_opacity;\n vec3 rgb = color.rgb;\n\n // spin\n rgb = vec3(\n dot(rgb, u_spin_weights.xyz),\n dot(rgb, u_spin_weights.zxy),\n dot(rgb, u_spin_weights.yzx));\n\n // saturation\n float average = (color.r + color.g + color.b) / 3.0;\n rgb += (average - rgb) * u_saturation_factor;\n\n // contrast\n rgb = (rgb - 0.5) * u_contrast_factor + 0.5;\n\n // brightness\n vec3 u_high_vec = vec3(u_brightness_low, u_brightness_low, u_brightness_low);\n vec3 u_low_vec = vec3(u_brightness_high, u_brightness_high, u_brightness_high);\n\n gl_FragColor = vec4(mix(u_high_vec, u_low_vec, rgb) * color.a, color.a);\n\n#ifdef OVERDRAW_INSPECTOR\n gl_FragColor = vec4(1.0);\n#endif\n}\n",vertexSource:"uniform mat4 u_matrix;\nuniform vec2 u_tl_parent;\nuniform float u_scale_parent;\nuniform float u_buffer_scale;\n\nattribute vec2 a_pos;\nattribute vec2 a_texture_pos;\n\nvarying vec2 v_pos0;\nvarying vec2 v_pos1;\n\nvoid main() {\n gl_Position = u_matrix * vec4(a_pos, 0, 1);\n // We are using Int16 for texture position coordinates to give us enough precision for\n // fractional coordinates. We use 8192 to scale the texture coordinates in the buffer\n // as an arbitrarily high number to preserve adequate precision when rendering.\n // This is also the same value as the EXTENT we are using for our tile buffer pos coordinates,\n // so math for modifying either is consistent.\n v_pos0 = (((a_texture_pos / 8192.0) - 0.5) / u_buffer_scale ) + 0.5;\n v_pos1 = (v_pos0 * u_scale_parent) + u_tl_parent;\n}\n"},symbolIcon:{fragmentSource:"uniform sampler2D u_texture;\n\n#pragma mapbox: define lowp float opacity\n\nvarying vec2 v_tex;\nvarying float v_fade_opacity;\n\nvoid main() {\n #pragma mapbox: initialize lowp float opacity\n\n lowp float alpha = opacity * v_fade_opacity;\n gl_FragColor = texture2D(u_texture, v_tex) * alpha;\n\n#ifdef OVERDRAW_INSPECTOR\n gl_FragColor = vec4(1.0);\n#endif\n}\n",vertexSource:"const float PI = 3.141592653589793;\n\nattribute vec4 a_pos_offset;\nattribute vec4 a_data;\nattribute vec3 a_projected_pos;\nattribute float a_fade_opacity;\n\nuniform bool u_is_size_zoom_constant;\nuniform bool u_is_size_feature_constant;\nuniform highp float u_size_t; // used to interpolate between zoom stops when size is a composite function\nuniform highp float u_size; // used when size is both zoom and feature constant\nuniform highp float u_camera_to_center_distance;\nuniform highp float u_pitch;\nuniform bool u_rotate_symbol;\nuniform highp float u_aspect_ratio;\nuniform float u_fade_change;\n\n#pragma mapbox: define lowp float opacity\n\nuniform mat4 u_matrix;\nuniform mat4 u_label_plane_matrix;\nuniform mat4 u_gl_coord_matrix;\n\nuniform bool u_is_text;\nuniform bool u_pitch_with_map;\n\nuniform vec2 u_texsize;\n\nvarying vec2 v_tex;\nvarying float v_fade_opacity;\n\nvoid main() {\n #pragma mapbox: initialize lowp float opacity\n\n vec2 a_pos = a_pos_offset.xy;\n vec2 a_offset = a_pos_offset.zw;\n\n vec2 a_tex = a_data.xy;\n vec2 a_size = a_data.zw;\n\n highp float segment_angle = -a_projected_pos[2];\n\n float size;\n if (!u_is_size_zoom_constant && !u_is_size_feature_constant) {\n size = mix(a_size[0], a_size[1], u_size_t) / 10.0;\n } else if (u_is_size_zoom_constant && !u_is_size_feature_constant) {\n size = a_size[0] / 10.0;\n } else if (!u_is_size_zoom_constant && u_is_size_feature_constant) {\n size = u_size;\n } else {\n size = u_size;\n }\n\n vec4 projectedPoint = u_matrix * vec4(a_pos, 0, 1);\n highp float camera_to_anchor_distance = projectedPoint.w;\n // See comments in symbol_sdf.vertex\n highp float distance_ratio = u_pitch_with_map ?\n camera_to_anchor_distance / u_camera_to_center_distance :\n u_camera_to_center_distance / camera_to_anchor_distance;\n highp float perspective_ratio = 0.5 + 0.5 * distance_ratio;\n\n size *= perspective_ratio;\n\n float fontScale = u_is_text ? size / 24.0 : size;\n\n highp float symbol_rotation = 0.0;\n if (u_rotate_symbol) {\n // See comments in symbol_sdf.vertex\n vec4 offsetProjectedPoint = u_matrix * vec4(a_pos + vec2(1, 0), 0, 1);\n\n vec2 a = projectedPoint.xy / projectedPoint.w;\n vec2 b = offsetProjectedPoint.xy / offsetProjectedPoint.w;\n\n symbol_rotation = atan((b.y - a.y) / u_aspect_ratio, b.x - a.x);\n }\n\n highp float angle_sin = sin(segment_angle + symbol_rotation);\n highp float angle_cos = cos(segment_angle + symbol_rotation);\n mat2 rotation_matrix = mat2(angle_cos, -1.0 * angle_sin, angle_sin, angle_cos);\n\n vec4 projected_pos = u_label_plane_matrix * vec4(a_projected_pos.xy, 0.0, 1.0);\n gl_Position = u_gl_coord_matrix * vec4(projected_pos.xy / projected_pos.w + rotation_matrix * (a_offset / 64.0 * fontScale), 0.0, 1.0);\n\n v_tex = a_tex / u_texsize;\n vec2 fade_opacity = unpack_opacity(a_fade_opacity);\n float fade_change = fade_opacity[1] > 0.5 ? u_fade_change : -u_fade_change;\n v_fade_opacity = max(0.0, min(1.0, fade_opacity[0] + fade_change));\n}\n"},symbolSDF:{fragmentSource:"#define SDF_PX 8.0\n#define EDGE_GAMMA 0.105/DEVICE_PIXEL_RATIO\n\nuniform bool u_is_halo;\n#pragma mapbox: define highp vec4 fill_color\n#pragma mapbox: define highp vec4 halo_color\n#pragma mapbox: define lowp float opacity\n#pragma mapbox: define lowp float halo_width\n#pragma mapbox: define lowp float halo_blur\n\nuniform sampler2D u_texture;\nuniform highp float u_gamma_scale;\nuniform bool u_is_text;\n\nvarying vec2 v_data0;\nvarying vec3 v_data1;\n\nvoid main() {\n #pragma mapbox: initialize highp vec4 fill_color\n #pragma mapbox: initialize highp vec4 halo_color\n #pragma mapbox: initialize lowp float opacity\n #pragma mapbox: initialize lowp float halo_width\n #pragma mapbox: initialize lowp float halo_blur\n\n vec2 tex = v_data0.xy;\n float gamma_scale = v_data1.x;\n float size = v_data1.y;\n float fade_opacity = v_data1[2];\n\n float fontScale = u_is_text ? size / 24.0 : size;\n\n lowp vec4 color = fill_color;\n highp float gamma = EDGE_GAMMA / (fontScale * u_gamma_scale);\n lowp float buff = (256.0 - 64.0) / 256.0;\n if (u_is_halo) {\n color = halo_color;\n gamma = (halo_blur * 1.19 / SDF_PX + EDGE_GAMMA) / (fontScale * u_gamma_scale);\n buff = (6.0 - halo_width / fontScale) / SDF_PX;\n }\n\n lowp float dist = texture2D(u_texture, tex).a;\n highp float gamma_scaled = gamma * gamma_scale;\n highp float alpha = smoothstep(buff - gamma_scaled, buff + gamma_scaled, dist);\n\n gl_FragColor = color * (alpha * opacity * fade_opacity);\n\n#ifdef OVERDRAW_INSPECTOR\n gl_FragColor = vec4(1.0);\n#endif\n}\n",vertexSource:"const float PI = 3.141592653589793;\n\nattribute vec4 a_pos_offset;\nattribute vec4 a_data;\nattribute vec3 a_projected_pos;\nattribute float a_fade_opacity;\n\n// contents of a_size vary based on the type of property value\n// used for {text,icon}-size.\n// For constants, a_size is disabled.\n// For source functions, we bind only one value per vertex: the value of {text,icon}-size evaluated for the current feature.\n// For composite functions:\n// [ text-size(lowerZoomStop, feature),\n// text-size(upperZoomStop, feature) ]\nuniform bool u_is_size_zoom_constant;\nuniform bool u_is_size_feature_constant;\nuniform highp float u_size_t; // used to interpolate between zoom stops when size is a composite function\nuniform highp float u_size; // used when size is both zoom and feature constant\n\n#pragma mapbox: define highp vec4 fill_color\n#pragma mapbox: define highp vec4 halo_color\n#pragma mapbox: define lowp float opacity\n#pragma mapbox: define lowp float halo_width\n#pragma mapbox: define lowp float halo_blur\n\nuniform mat4 u_matrix;\nuniform mat4 u_label_plane_matrix;\nuniform mat4 u_gl_coord_matrix;\n\nuniform bool u_is_text;\nuniform bool u_pitch_with_map;\nuniform highp float u_pitch;\nuniform bool u_rotate_symbol;\nuniform highp float u_aspect_ratio;\nuniform highp float u_camera_to_center_distance;\nuniform float u_fade_change;\n\nuniform vec2 u_texsize;\n\nvarying vec2 v_data0;\nvarying vec3 v_data1;\n\nvoid main() {\n #pragma mapbox: initialize highp vec4 fill_color\n #pragma mapbox: initialize highp vec4 halo_color\n #pragma mapbox: initialize lowp float opacity\n #pragma mapbox: initialize lowp float halo_width\n #pragma mapbox: initialize lowp float halo_blur\n\n vec2 a_pos = a_pos_offset.xy;\n vec2 a_offset = a_pos_offset.zw;\n\n vec2 a_tex = a_data.xy;\n vec2 a_size = a_data.zw;\n\n highp float segment_angle = -a_projected_pos[2];\n float size;\n\n if (!u_is_size_zoom_constant && !u_is_size_feature_constant) {\n size = mix(a_size[0], a_size[1], u_size_t) / 10.0;\n } else if (u_is_size_zoom_constant && !u_is_size_feature_constant) {\n size = a_size[0] / 10.0;\n } else if (!u_is_size_zoom_constant && u_is_size_feature_constant) {\n size = u_size;\n } else {\n size = u_size;\n }\n\n vec4 projectedPoint = u_matrix * vec4(a_pos, 0, 1);\n highp float camera_to_anchor_distance = projectedPoint.w;\n // If the label is pitched with the map, layout is done in pitched space,\n // which makes labels in the distance smaller relative to viewport space.\n // We counteract part of that effect by multiplying by the perspective ratio.\n // If the label isn't pitched with the map, we do layout in viewport space,\n // which makes labels in the distance larger relative to the features around\n // them. We counteract part of that effect by dividing by the perspective ratio.\n highp float distance_ratio = u_pitch_with_map ?\n camera_to_anchor_distance / u_camera_to_center_distance :\n u_camera_to_center_distance / camera_to_anchor_distance;\n highp float perspective_ratio = 0.5 + 0.5 * distance_ratio;\n\n size *= perspective_ratio;\n\n float fontScale = u_is_text ? size / 24.0 : size;\n\n highp float symbol_rotation = 0.0;\n if (u_rotate_symbol) {\n // Point labels with 'rotation-alignment: map' are horizontal with respect to tile units\n // To figure out that angle in projected space, we draw a short horizontal line in tile\n // space, project it, and measure its angle in projected space.\n vec4 offsetProjectedPoint = u_matrix * vec4(a_pos + vec2(1, 0), 0, 1);\n\n vec2 a = projectedPoint.xy / projectedPoint.w;\n vec2 b = offsetProjectedPoint.xy / offsetProjectedPoint.w;\n\n symbol_rotation = atan((b.y - a.y) / u_aspect_ratio, b.x - a.x);\n }\n\n highp float angle_sin = sin(segment_angle + symbol_rotation);\n highp float angle_cos = cos(segment_angle + symbol_rotation);\n mat2 rotation_matrix = mat2(angle_cos, -1.0 * angle_sin, angle_sin, angle_cos);\n\n vec4 projected_pos = u_label_plane_matrix * vec4(a_projected_pos.xy, 0.0, 1.0);\n gl_Position = u_gl_coord_matrix * vec4(projected_pos.xy / projected_pos.w + rotation_matrix * (a_offset / 64.0 * fontScale), 0.0, 1.0);\n float gamma_scale = gl_Position.w;\n\n vec2 tex = a_tex / u_texsize;\n vec2 fade_opacity = unpack_opacity(a_fade_opacity);\n float fade_change = fade_opacity[1] > 0.5 ? u_fade_change : -u_fade_change;\n float interpolated_fade_opacity = max(0.0, min(1.0, fade_opacity[0] + fade_change));\n\n v_data0 = vec2(tex.x, tex.y);\n v_data1 = vec3(gamma_scale, size, interpolated_fade_opacity);\n}\n"}},n=/#pragma mapbox: ([\w]+) ([\w]+) ([\w]+) ([\w]+)/g;for(var o in i)!function(t){var e=i[t],r={};e.fragmentSource=e.fragmentSource.replace(n,function(t,e,i,n,o){return r[o]=!0,"define"===e?"\n#ifndef HAS_UNIFORM_u_"+o+"\nvarying "+i+" "+n+" "+o+";\n#else\nuniform "+i+" "+n+" u_"+o+";\n#endif\n":"\n#ifdef HAS_UNIFORM_u_"+o+"\n "+i+" "+n+" "+o+" = u_"+o+";\n#endif\n"}),e.vertexSource=e.vertexSource.replace(n,function(t,e,i,n,o){var a="float"===n?"vec2":"vec4";return r[o]?"define"===e?"\n#ifndef HAS_UNIFORM_u_"+o+"\nuniform lowp float a_"+o+"_t;\nattribute "+i+" "+a+" a_"+o+";\nvarying "+i+" "+n+" "+o+";\n#else\nuniform "+i+" "+n+" u_"+o+";\n#endif\n":"\n#ifndef HAS_UNIFORM_u_"+o+"\n "+o+" = unpack_mix_"+a+"(a_"+o+", a_"+o+"_t);\n#else\n "+i+" "+n+" "+o+" = u_"+o+";\n#endif\n":"define"===e?"\n#ifndef HAS_UNIFORM_u_"+o+"\nuniform lowp float a_"+o+"_t;\nattribute "+i+" "+a+" a_"+o+";\n#else\nuniform "+i+" "+n+" u_"+o+";\n#endif\n":"\n#ifndef HAS_UNIFORM_u_"+o+"\n "+i+" "+n+" "+o+" = unpack_mix_"+a+"(a_"+o+", a_"+o+"_t);\n#else\n "+i+" "+n+" "+o+" = u_"+o+";\n#endif\n"})}(o);e.exports=i},{}],99:[function(t,e,r){"use strict";var i=t("./image_source"),n=t("../util/window"),o=function(t){function e(e,r,i,n){t.call(this,e,r,i,n),this.options=r,this.animate=void 0===r.animate||r.animate}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype.load=function(){if(this.canvas=this.canvas||n.document.getElementById(this.options.canvas),this.width=this.canvas.width,this.height=this.canvas.height,this._hasInvalidDimensions())return this.fire("error",new Error("Canvas dimensions cannot be less than or equal to zero."));this.play=function(){this._playing=!0,this.map._rerender()},this.pause=function(){this._playing=!1},this._finishLoading()},e.prototype.getCanvas=function(){return this.canvas},e.prototype.onAdd=function(t){this.map=t,this.load(),this.canvas&&this.animate&&this.play()},e.prototype.onRemove=function(){this.pause()},e.prototype.prepare=function(){var t=!1;this.canvas.width!==this.width&&(this.width=this.canvas.width,t=!0),this.canvas.height!==this.height&&(this.height=this.canvas.height,t=!0),this._hasInvalidDimensions()||0!==Object.keys(this.tiles).length&&this._prepareImage(this.map.painter.gl,this.canvas,t)},e.prototype.serialize=function(){return{type:"canvas",canvas:this.canvas,coordinates:this.coordinates}},e.prototype.hasTransition=function(){return this._playing},e.prototype._hasInvalidDimensions=function(){for(var t=this,e=0,r=[t.canvas.width,t.canvas.height];e<r.length;e+=1){var i=r[e];if(isNaN(i)||i<=0)return!0}return!1},e}(i);e.exports=o},{"../util/window":248,"./image_source":103}],100:[function(t,e,r){"use strict";function i(t){var e=a.document.createElement("a");return e.href=t,e.href}var n=t("../util/evented"),o=t("../util/util"),a=t("../util/window"),s=t("../data/extent"),l=t("../util/ajax").ResourceType,u=t("../util/browser"),c=function(t){function e(e,r,i,n){t.call(this),this.id=e,this.type="geojson",this.minzoom=0,this.maxzoom=22,this.tileSize=512,this.isTileClipped=!0,this.reparseOverscaled=!0,this.dispatcher=i,this.setEventedParent(n),this._data=r.data,this._options=o.extend({},r),void 0!==r.maxzoom&&(this.maxzoom=r.maxzoom),r.type&&(this.type=r.type);var a=s/this.tileSize;this.workerOptions=o.extend({source:this.id,cluster:r.cluster||!1,geojsonVtOptions:{buffer:(void 0!==r.buffer?r.buffer:128)*a,tolerance:(void 0!==r.tolerance?r.tolerance:.375)*a,extent:s,maxZoom:this.maxzoom},superclusterOptions:{maxZoom:void 0!==r.clusterMaxZoom?Math.min(r.clusterMaxZoom,this.maxzoom-1):this.maxzoom-1,aggregateBy:r.aggregateBy,extent:s,radius:(r.clusterRadius||50)*a,log:!1}},r.workerOptions)}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype.load=function(){var t=this;this.fire("dataloading",{dataType:"source"}),this._updateWorkerData(function(e){e?t.fire("error",{error:e}):t.fire("data",{dataType:"source",sourceDataType:"metadata"})})},e.prototype.onAdd=function(t){this.map=t,this.load()},e.prototype.setData=function(t){var e=this;return this._data=t,this.fire("dataloading",{dataType:"source"}),this._updateWorkerData(function(t){if(t)return e.fire("error",{error:t});e.fire("data",{dataType:"source",sourceDataType:"content"})}),this},e.prototype.getLeaves=function(t,e,r,i,n){var a=this,s=o.extend({clusterId:t,clusterZoom:Math.ceil(e),limit:r||10,offset:i||0},this.workerOptions);this.dispatcher.send(this.type+".getLeaves",s,function(t,e){if(t)return n({success:!1}),a.fire("error",{error:t});n({success:!0,leaves:e})},this.workerID)},e.prototype._updateWorkerData=function(t){var e=this,r=o.extend({},this.workerOptions),n=this._data;"string"==typeof n?r.request=this.map._transformRequest(i(n),l.Source):r.data=JSON.stringify(n),this.workerID=this.dispatcher.send(this.type+".loadData",r,function(r){e._loaded=!0,t(r)},this.workerID)},e.prototype.loadTile=function(t,e){var r=this,i=void 0===t.workerID||"expired"===t.state?"loadTile":"reloadTile",n={type:this.type,uid:t.uid,coord:t.coord,zoom:t.coord.z,maxZoom:this.maxzoom,tileSize:this.tileSize,source:this.id,pixelRatio:u.devicePixelRatio,overscaling:t.coord.z>this.maxzoom?Math.pow(2,t.coord.z-this.maxzoom):1,showCollisionBoxes:this.map.showCollisionBoxes};t.workerID=this.dispatcher.send(i,n,function(i,n){return t.unloadVectorData(),t.aborted?e(null):i?e(i):(t.loadVectorData(n,r.map.painter),e(null))},this.workerID)},e.prototype.abortTile=function(t){t.aborted=!0},e.prototype.unloadTile=function(t){t.unloadVectorData(),this.dispatcher.send("removeTile",{uid:t.uid,type:this.type,source:this.id},null,t.workerID)},e.prototype.onRemove=function(){this.dispatcher.broadcast("removeSource",{type:this.type,source:this.id})},e.prototype.serialize=function(){return o.extend({},this._options,{type:this.type,data:this._data})},e.prototype.hasTransition=function(){return!1},e}(n);e.exports=c},{"../data/extent":59,"../util/ajax":245,"../util/browser":246,"../util/evented":254,"../util/util":267,"../util/window":248}],101:[function(t,e,r){"use strict";function i(t,e){var r=t.source,i=t.coord;if(!this._geoJSONIndexes[r])return e(null,null);var n=this._geoJSONIndexes[r].getTile(Math.min(i.z,t.maxZoom),i.x,i.y);if(!n)return e(null,null);var o=new a(n.features),l=s(o);0===l.byteOffset&&l.byteLength===l.buffer.byteLength||(l=new Uint8Array(l)),e(null,{vectorTile:o,rawData:l.buffer})}var n=t("../util/ajax"),o=t("geojson-rewind"),a=t("./geojson_wrapper"),s=t("vt-pbf"),l=t("supercluster"),u=t("geojson-vt"),c=function(t){function e(e,r,n){t.call(this,e,r,i),n&&(this.loadGeoJSON=n),this._geoJSONIndexes={}}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype.getLeaves=function(t,e){e(null,this._geoJSONIndexes[t.source].getLeaves(t.clusterId,t.clusterZoom,t.limit,t.offset))},e.prototype.loadData=function(t,e){var r=this;this.loadGeoJSON(t,function(i,n){if(i||!n)return e(i);if("object"!=typeof n)return e(new Error("Input data is not a valid GeoJSON object."));o(n,!0);var a=t.superclusterOptions;a.aggregateBy&&(a.map=function(t){return{sum:Number(t[a.aggregateBy])||1}},a.reduce=function(t,e){t.sum+=e.sum},a.initial=function(){return{sum:0}});try{r._geoJSONIndexes[t.source]=t.cluster?l(t.superclusterOptions).load(n.features):u(n,t.geojsonVtOptions)}catch(i){return e(i)}r.loaded[t.source]={},e(null)})},e.prototype.reloadTile=function(e,r){var i=this.loaded[e.source],n=e.uid;return i&&i[n]?t.prototype.reloadTile.call(this,e,r):this.loadTile(e,r)},e.prototype.loadGeoJSON=function(t,e){if(t.request)n.getJSON(t.request,e);else{if("string"!=typeof t.data)return e(new Error("Input data is not a valid GeoJSON object."));try{return e(null,JSON.parse(t.data))}catch(t){return e(new Error("Input data is not a valid GeoJSON object."))}}},e.prototype.removeSource=function(t,e){this._geoJSONIndexes[t.source]&&delete this._geoJSONIndexes[t.source],e()},e}(t("./vector_tile_worker_source"));e.exports=c},{"../util/ajax":245,"./geojson_wrapper":102,"./vector_tile_worker_source":115,"geojson-rewind":15,"geojson-vt":19,supercluster:42,"vt-pbf":47}],102:[function(t,e,r){"use strict";var i=t("@mapbox/point-geometry"),n=t("@mapbox/vector-tile").VectorTileFeature.prototype.toGeoJSON,o=t("../data/extent"),a=function(t){this._feature=t,this.extent=o,this.type=t.type,this.properties=t.tags,"id"in t&&!isNaN(t.id)&&(this.id=parseInt(t.id,10))};a.prototype.loadGeometry=function(){var t=this;if(1===this._feature.type){for(var e=[],r=0,n=t._feature.geometry;r<n.length;r+=1){var o=n[r];e.push([new i(o[0],o[1])])}return e}for(var a=[],s=0,l=t._feature.geometry;s<l.length;s+=1){for(var u=[],c=0,p=l[s];c<p.length;c+=1){var h=p[c];u.push(new i(h[0],h[1]))}a.push(u)}return a},a.prototype.toGeoJSON=function(t,e,r){return n.call(this,t,e,r)};var s=function(t){this.layers={_geojsonTileLayer:this},this.name="_geojsonTileLayer",this.extent=o,this.length=t.length,this._features=t};s.prototype.feature=function(t){return new a(this._features[t])},e.exports=s},{"../data/extent":59,"@mapbox/point-geometry":2,"@mapbox/vector-tile":6}],103:[function(t,e,r){"use strict";var i=t("../util/util"),n=t("../util/window"),o=t("./tile_coord"),a=t("../geo/lng_lat"),s=t("@mapbox/point-geometry"),l=t("../util/evented"),u=t("../util/ajax"),c=t("../util/browser"),p=t("../data/extent"),h=t("../data/raster_bounds_array"),f=t("../gl/vertex_buffer"),d=t("../render/vertex_array_object"),m=t("../render/texture"),y=function(t){function e(e,r,i,n){t.call(this),this.id=e,this.dispatcher=i,this.coordinates=r.coordinates,this.type="image",this.minzoom=0,this.maxzoom=22,this.tileSize=512,this.tiles={},this.setEventedParent(n),this.options=r,this.textureLoaded=!1}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype.load=function(){var t=this;this.fire("dataloading",{dataType:"source"}),this.url=this.options.url,u.getImage(this.map._transformRequest(this.url,u.ResourceType.Image),function(e,r){e?t.fire("error",{error:e}):r&&(t.image=c.getImageData(r),t._finishLoading())})},e.prototype._finishLoading=function(){this.map&&(this.setCoordinates(this.coordinates),this.fire("data",{dataType:"source",sourceDataType:"metadata"}))},e.prototype.onAdd=function(t){this.map=t,this.load()},e.prototype.setCoordinates=function(t){this.coordinates=t;var e=this.map,r=t.map(function(t){return e.transform.locationCoordinate(a.convert(t)).zoomTo(0)}),n=this.centerCoord=i.getCoordinatesCenter(r);n.column=Math.floor(n.column),n.row=Math.floor(n.row),this.coord=new o(n.zoom,n.column,n.row),this.minzoom=this.maxzoom=n.zoom;var l=r.map(function(t){var e=t.zoomTo(n.zoom);return new s(Math.round((e.column-n.column)*p),Math.round((e.row-n.row)*p))});return this._boundsArray=new h,this._boundsArray.emplaceBack(l[0].x,l[0].y,0,0),this._boundsArray.emplaceBack(l[1].x,l[1].y,p,0),this._boundsArray.emplaceBack(l[3].x,l[3].y,0,p),this._boundsArray.emplaceBack(l[2].x,l[2].y,p,p),this.boundsBuffer&&(this.boundsBuffer.destroy(),delete this.boundsBuffer),this.fire("data",{dataType:"source",sourceDataType:"content"}),this},e.prototype.prepare=function(){0!==Object.keys(this.tiles).length&&this.image&&this._prepareImage(this.map.painter.gl,this.image)},e.prototype._prepareImage=function(t,e,r){var i=this;this.boundsBuffer||(this.boundsBuffer=new f(t,this._boundsArray)),this.boundsVAO||(this.boundsVAO=new d),this.textureLoaded?r?this.texture.update(e):(e instanceof n.HTMLVideoElement||e instanceof n.ImageData||e instanceof n.HTMLCanvasElement)&&(this.texture.bind(t.LINEAR,t.CLAMP_TO_EDGE),t.texSubImage2D(t.TEXTURE_2D,0,0,0,t.RGBA,t.UNSIGNED_BYTE,e)):(this.textureLoaded=!0,this.texture=new m(t,e,t.RGBA),this.texture.bind(t.LINEAR,t.CLAMP_TO_EDGE));for(var o in i.tiles){var a=i.tiles[o];"loaded"!==a.state&&(a.state="loaded",a.texture=i.texture)}},e.prototype.loadTile=function(t,e){this.coord&&this.coord.toString()===t.coord.toString()?(this.tiles[String(t.coord.w)]=t,t.buckets={},e(null)):(t.state="errored",e(null))},e.prototype.serialize=function(){return{type:"image",url:this.options.url,coordinates:this.coordinates}},e.prototype.hasTransition=function(){return!1},e}(l);e.exports=y},{"../data/extent":59,"../data/raster_bounds_array":65,"../geo/lng_lat":69,"../gl/vertex_buffer":73,"../render/texture":94,"../render/vertex_array_object":96,"../util/ajax":245,"../util/browser":246,"../util/evented":254,"../util/util":267,"../util/window":248,"./tile_coord":113,"@mapbox/point-geometry":2}],104:[function(t,e,r){"use strict";var i=t("../util/util"),n=t("../util/ajax"),o=t("../util/browser"),a=t("../util/mapbox").normalizeSourceURL;e.exports=function(t,e,r){var s=function(t,e){if(t)return r(t);if(e){var n=i.pick(e,["tiles","minzoom","maxzoom","attribution","mapbox_logo","bounds"]);e.vector_layers&&(n.vectorLayers=e.vector_layers,n.vectorLayerIds=n.vectorLayers.map(function(t){return t.id})),r(null,n)}};t.url?n.getJSON(e(a(t.url),n.ResourceType.Source),s):o.frame(function(){return s(null,t)})}},{"../util/ajax":245,"../util/browser":246,"../util/mapbox":261,"../util/util":267}],105:[function(t,e,r){"use strict";var i=t("../data/extent");e.exports=function(t,e,r){return e*(i/(t.tileSize*Math.pow(2,r-t.coord.z)))}},{"../data/extent":59}],106:[function(t,e,r){"use strict";function i(t,e){var r=t.coord,i=e.coord;return r.z-i.z||r.y-i.y||r.w-i.w||r.x-i.x}function n(t){for(var e={},r={},i=0,n=t;i<n.length;i+=1){var o=n[i],a=o.queryResults,s=o.wrappedTileID,l=r[s]=r[s]||{};for(var u in a)for(var c=a[u],p=l[u]=l[u]||{},h=e[u]=e[u]||[],f=0,d=c;f<d.length;f+=1){var m=d[f];p[m.featureIndex]||(p[m.featureIndex]=!0,h.push(m.feature))}}return e}var o=t("./tile_coord");r.rendered=function(t,e,r,o,a,s){var l=t.tilesIn(r);l.sort(i);for(var u=[],c=0,p=l;c<p.length;c+=1){var h=p[c];u.push({wrappedTileID:h.coord.wrapped().id,queryResults:h.tile.queryRenderedFeatures(e,h.queryGeometry,h.scale,o,s,t.id)})}return n(u)},r.source=function(t,e){for(var r=t.getRenderableIds().map(function(e){return t.getTileByID(e)}),i=[],n={},a=0;a<r.length;a++){var s=r[a],l=new o(Math.min(s.sourceMaxZoom,s.coord.z),s.coord.x,s.coord.y,0).id;n[l]||(n[l]=!0,s.querySourceFeatures(i,e))}return i}},{"./tile_coord":113}],107:[function(t,e,r){"use strict";var i=t("../util/util"),n=t("../util/ajax"),o=t("../util/evented"),a=t("./load_tilejson"),s=t("../util/mapbox").normalizeTileURL,l=t("./tile_bounds"),u=t("../render/texture"),c=function(t){function e(e,r,n,o){t.call(this),this.id=e,this.dispatcher=n,this.setEventedParent(o),this.type="raster",this.minzoom=0,this.maxzoom=22,this.roundZoom=!0,this.scheme="xyz",this.tileSize=512,this._loaded=!1,this._options=i.extend({},r),i.extend(this,i.pick(r,["url","scheme","tileSize"]))}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype.load=function(){var t=this;this.fire("dataloading",{dataType:"source"}),a(this._options,this.map._transformRequest,function(e,r){e?t.fire("error",e):r&&(i.extend(t,r),r.bounds&&(t.tileBounds=new l(r.bounds,t.minzoom,t.maxzoom)),t.fire("data",{dataType:"source",sourceDataType:"metadata"}),t.fire("data",{dataType:"source",sourceDataType:"content"}))})},e.prototype.onAdd=function(t){this.map=t,this.load()},e.prototype.serialize=function(){return i.extend({},this._options)},e.prototype.hasTile=function(t){return!this.tileBounds||this.tileBounds.contains(t,this.maxzoom)},e.prototype.loadTile=function(t,e){var r=this,i=s(t.coord.url(this.tiles,null,this.scheme),this.url,this.tileSize);t.request=n.getImage(this.map._transformRequest(i,n.ResourceType.Tile),function(i,n){if(delete t.request,t.aborted)t.state="unloaded",e(null);else if(i)t.state="errored",e(i);else if(n){r.map._refreshExpiredTiles&&t.setExpiryData(n),delete n.cacheControl,delete n.expires;var o=r.map.painter.gl;t.texture=r.map.painter.getTileTexture(n.width),t.texture?(t.texture.bind(o.LINEAR,o.CLAMP_TO_EDGE,o.LINEAR_MIPMAP_NEAREST),o.texSubImage2D(o.TEXTURE_2D,0,0,0,o.RGBA,o.UNSIGNED_BYTE,n)):(t.texture=new u(o,n,o.RGBA),t.texture.bind(o.LINEAR,o.CLAMP_TO_EDGE,o.LINEAR_MIPMAP_NEAREST),r.map.painter.extTextureFilterAnisotropic&&o.texParameterf(o.TEXTURE_2D,r.map.painter.extTextureFilterAnisotropic.TEXTURE_MAX_ANISOTROPY_EXT,r.map.painter.extTextureFilterAnisotropicMax)),o.generateMipmap(o.TEXTURE_2D),t.state="loaded",e(null)}})},e.prototype.abortTile=function(t,e){t.request&&(t.request.abort(),delete t.request),e()},e.prototype.unloadTile=function(t,e){t.texture&&this.map.painter.saveTileTexture(t.texture),e()},e.prototype.hasTransition=function(){return!1},e}(o);e.exports=c},{"../render/texture":94,"../util/ajax":245,"../util/evented":254,"../util/mapbox":261,"../util/util":267,"./load_tilejson":104,"./tile_bounds":112}],108:[function(t,e,r){"use strict";var i=t("../util/ajax"),n=t("../util/evented"),o=t("../util/window"),a=!1,s=null;e.exports.evented=new n,e.exports.registerForPluginAvailability=function(t){return s?t({pluginBlobURL:s,errorCallback:e.exports.errorCallback}):e.exports.evented.once("pluginAvailable",t),t},e.exports.createBlobURL=function(t){return o.URL.createObjectURL(new o.Blob([t.data],{type:"text/javascript"}))},e.exports.clearRTLTextPlugin=function(){a=!1,s=null},e.exports.setRTLTextPlugin=function(t,r){if(a)throw new Error("setRTLTextPlugin cannot be called multiple times.");a=!0,e.exports.errorCallback=r,i.getArrayBuffer({url:t},function(t,i){t?r(t):i&&(s=e.exports.createBlobURL(i),e.exports.evented.fire("pluginAvailable",{pluginBlobURL:s,errorCallback:r}))})},e.exports.applyArabicShaping=null,e.exports.processBidirectionalText=null},{"../util/ajax":245,"../util/evented":254,"../util/window":248}],109:[function(t,e,r){"use strict";var i=t("../util/util"),n={vector:t("../source/vector_tile_source"),raster:t("../source/raster_tile_source"),geojson:t("../source/geojson_source"),video:t("../source/video_source"),image:t("../source/image_source"),canvas:t("../source/canvas_source")};r.create=function(t,e,r,o){var a=new n[e.type](t,e,r,o);if(a.id!==t)throw new Error("Expected Source id to be "+t+" instead of "+a.id);return i.bindAll(["load","abort","unload","serialize","prepare"],a),a},r.getType=function(t){return n[t]},r.setType=function(t,e){n[t]=e}},{"../source/canvas_source":99,"../source/geojson_source":100,"../source/image_source":103,"../source/raster_tile_source":107,"../source/vector_tile_source":114,"../source/video_source":116,"../util/util":267}],110:[function(t,e,r){"use strict";function i(t,e,r){var i=r.zoomTo(Math.min(t.z,e));return new f((i.column-(t.x+t.w*Math.pow(2,t.z)))*h,(i.row-t.y)*h)}function n(t){return"raster"===t||"image"===t||"video"===t}var o=t("./source").create,a=t("./tile"),s=t("../util/evented"),l=t("./tile_coord"),u=t("../util/lru_cache"),c=t("../geo/coordinate"),p=t("../util/util"),h=t("../data/extent"),f=t("@mapbox/point-geometry"),d=function(t){function e(e,r,i){var n=this;t.call(this),this.id=e,this.dispatcher=i,this.on("data",function(t){"source"===t.dataType&&"metadata"===t.sourceDataType&&(n._sourceLoaded=!0),n._sourceLoaded&&!n._paused&&"source"===t.dataType&&"content"===t.sourceDataType&&(n.reload(),n.transform&&n.update(n.transform))}),this.on("error",function(){n._sourceErrored=!0}),this._source=o(e,r,i,this),this._tiles={},this._cache=new u(0,this._unloadTile.bind(this)),this._timers={},this._cacheTimers={},this._maxTileCacheSize=null,this._isIdRenderable=this._isIdRenderable.bind(this),this._coveredTiles={}}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype.onAdd=function(t){this.map=t,this._maxTileCacheSize=t?t._maxTileCacheSize:null,this._source&&this._source.onAdd&&this._source.onAdd(t)},e.prototype.onRemove=function(t){this._source&&this._source.onRemove&&this._source.onRemove(t)},e.prototype.loaded=function(){var t=this;if(this._sourceErrored)return!0;if(!this._sourceLoaded)return!1;for(var e in t._tiles){var r=t._tiles[e];if("loaded"!==r.state&&"errored"!==r.state)return!1}return!0},e.prototype.getSource=function(){return this._source},e.prototype.pause=function(){this._paused=!0},e.prototype.getNeedsFullPlacement=function(){return this._needsFullPlacement},e.prototype.resume=function(){if(this._paused){var t=this._shouldReloadOnResume;this._paused=!1,this._shouldReloadOnResume=!1,t&&this.reload(),this.transform&&this.update(this.transform)}},e.prototype._loadTile=function(t,e){return this._source.loadTile(t,e)},e.prototype._unloadTile=function(t){if(this._source.unloadTile)return this._source.unloadTile(t,function(){})},e.prototype._abortTile=function(t){if(this._source.abortTile)return this._source.abortTile(t,function(){})},e.prototype.serialize=function(){return this._source.serialize()},e.prototype.prepare=function(t){var e=this;this._source.prepare&&this._source.prepare();for(var r in e._tiles)e._tiles[r].upload(t)},e.prototype.getIds=function(){var t=this;return Object.keys(this._tiles).map(Number).sort(function(e,r){var i=l.fromID(e),n=l.fromID(r),o=new f(i.x,i.y).rotate(t.transform.angle),a=new f(n.x,n.y).rotate(t.transform.angle);return i.z-n.z||a.y-o.y||a.x-o.x})},e.prototype.getRenderableIds=function(){return this.getIds().filter(this._isIdRenderable)},e.prototype.hasRenderableParent=function(t){var e=this.findLoadedParent(t,0,{});return!!e&&this._isIdRenderable(e.coord.id)},e.prototype._isIdRenderable=function(t){return this._tiles[t]&&this._tiles[t].hasData()&&!this._coveredTiles[t]},e.prototype.reload=function(){var t=this;if(this._paused)this._shouldReloadOnResume=!0;else{this._cache.reset();for(var e in t._tiles)t._reloadTile(e,"reloading")}},e.prototype._reloadTile=function(t,e){var r=this._tiles[t];r&&("loading"!==r.state&&(r.state=e),this._loadTile(r,this._tileLoaded.bind(this,r,t,e)))},e.prototype._tileLoaded=function(t,e,r,i){if(i)return t.state="errored",void(404!==i.status?this._source.fire("error",{tile:t,error:i}):this.update(this.transform));t.timeAdded=(new Date).getTime(),"expired"===r&&(t.refreshedUponExpiration=!0),this._setTileReloadTimer(e,t),this._source.fire("data",{dataType:"source",tile:t,coord:t.coord}),this.map&&(this.map.painter.tileExtentVAO.vao=null),this._updatePlacement(),this.map&&t.added(this.map.painter.crossTileSymbolIndex)},e.prototype.getTile=function(t){return this.getTileByID(t.id)},e.prototype.getTileByID=function(t){return this._tiles[t]},e.prototype.getZoom=function(t){return t.zoom+t.scaleZoom(t.tileSize/this._source.tileSize)},e.prototype._findLoadedChildren=function(t,e,r){var i=this,n=!1;for(var o in i._tiles){var a=i._tiles[o];if(!(r[o]||!a.hasData()||a.coord.z<=t.z||a.coord.z>e)){var s=Math.pow(2,Math.min(a.coord.z,i._source.maxzoom)-Math.min(t.z,i._source.maxzoom));if(Math.floor(a.coord.x/s)===t.x&&Math.floor(a.coord.y/s)===t.y)for(r[o]=!0,n=!0;a&&a.coord.z-1>t.z;){var l=a.coord.parent(i._source.maxzoom);if(!l)break;(a=i._tiles[l.id])&&a.hasData()&&(delete r[o],r[l.id]=!0)}}}return n},e.prototype.findLoadedParent=function(t,e,r){for(var i=this,n=t.z-1;n>=e;n--){var o=t.parent(i._source.maxzoom);if(!o)return;t=o;var a=String(t.id),s=i._tiles[a];if(s&&s.hasData())return r[a]=!0,s;if(i._cache.has(a))return r[a]=!0,i._cache.get(a)}},e.prototype.updateCacheSize=function(t){var e=(Math.ceil(t.width/this._source.tileSize)+1)*(Math.ceil(t.height/this._source.tileSize)+1),r=Math.floor(5*e),i="number"==typeof this._maxTileCacheSize?Math.min(this._maxTileCacheSize,r):r;this._cache.setMaxSize(i)},e.prototype.update=function(t){var r=this;if(this.transform=t,this._sourceLoaded&&!this._paused){this.updateCacheSize(t),this._coveredTiles={};var i;this.used?this._source.coord?i=t.getVisibleWrappedCoordinates(this._source.coord):(i=t.coveringTiles({tileSize:this._source.tileSize,minzoom:this._source.minzoom,maxzoom:this._source.maxzoom,roundZoom:this._source.roundZoom,reparseOverscaled:this._source.reparseOverscaled}),this._source.hasTile&&(i=i.filter(function(t){return r._source.hasTile(t)}))):i=[];var o=(this._source.roundZoom?Math.round:Math.floor)(this.getZoom(t)),a=Math.max(o-e.maxOverzooming,this._source.minzoom),s=Math.max(o+e.maxUnderzooming,this._source.minzoom),u=this._updateRetainedTiles(i,o),c={};if(n(this._source.type))for(var h=Object.keys(u),f=0;f<h.length;f++){var d=h[f],m=l.fromID(+d),y=r._tiles[d];if(y&&(void 0===y.fadeEndTime||y.fadeEndTime>=Date.now())){r._findLoadedChildren(m,s,u)&&(u[d]=!0);var g=r.findLoadedParent(m,a,c);g&&r._addTile(g.coord)}}var v;for(v in c)u[v]||(r._coveredTiles[v]=!0);for(v in c)u[v]=!0;for(var _=p.keysDifference(this._tiles,u),x=0;x<_.length;x++)r._removeTile(_[x])}},e.prototype._updateRetainedTiles=function(t,r){var i,n,o,a,s=this,l={},u={},c=Math.max(r-e.maxOverzooming,this._source.minzoom);for(i=0;i<t.length;i++){n=t[i];var p=!1;if((o=s._addTile(n)).hasData())l[n.id]=!0;else{if(p=o.wasRequested(),l[n.id]=!0,a=!0,r+1>s._source.maxzoom){var h=n.children(s._source.maxzoom)[0],f=s.getTile(h);f&&f.hasData()?l[h.id]=!0:a=!1}else for(var d=n.children(s._source.maxzoom),m=0;m<d.length;m++){var y=d[m],g=y?s.getTile(y):null;g&&g.hasData()?l[y.id]=!0:a=!1}if(!a)for(var v=r-1;v>=c;--v){var _=n.scaledTo(v,s._source.maxzoom);if(u[_.id])break;if(u[_.id]=!0,!(o=s.getTile(_))&&p&&(o=s._addTile(_)),o&&(l[_.id]=!0,p=o.wasRequested(),o.hasData()))break}}}return l},e.prototype._addTile=function(t){var e=this._tiles[t.id];if(e)return e;(e=this._cache.getAndRemove(t.id))&&(this._updatePlacement(),this.map&&e.added(this.map.painter.crossTileSymbolIndex),this._cacheTimers[t.id]&&(clearTimeout(this._cacheTimers[t.id]),delete this._cacheTimers[t.id],this._setTileReloadTimer(t.id,e)));var r=Boolean(e);if(!r){var i=t.z,n=i>this._source.maxzoom?Math.pow(2,i-this._source.maxzoom):1;e=new a(t,this._source.tileSize*n,this._source.maxzoom),this._loadTile(e,this._tileLoaded.bind(this,e,t.id,e.state))}return e?(e.uses++,this._tiles[t.id]=e,r||this._source.fire("dataloading",{tile:e,coord:e.coord,dataType:"source"}),e):null},e.prototype._setTileReloadTimer=function(t,e){var r=this,i=e.getExpiryTimeout();i&&(this._timers[t]=setTimeout(function(){r._reloadTile(t,"expired"),delete r._timers[t]},i))},e.prototype._setCacheInvalidationTimer=function(t,e){var r=this,i=e.getExpiryTimeout();i&&(this._cacheTimers[t]=setTimeout(function(){r._cache.remove(t),delete r._cacheTimers[t]},i))},e.prototype._removeTile=function(t){var e=this._tiles[t];if(e&&(e.uses--,delete this._tiles[t],this._timers[t]&&(clearTimeout(this._timers[t]),delete this._timers[t]),!(e.uses>0)))if(this._updatePlacement(),this.map&&e.removed(this.map.painter.crossTileSymbolIndex),e.hasData()){e.coord=e.coord.wrapped();var r=e.coord.id;this._cache.add(r,e),this._setCacheInvalidationTimer(r,e)}else e.aborted=!0,this._abortTile(e),this._unloadTile(e)},e.prototype._updatePlacement=function(){this._needsFullPlacement=!0},e.prototype.clearTiles=function(){var t=this;this._shouldReloadOnResume=!1,this._paused=!1;for(var e in t._tiles)t._removeTile(e);this._cache.reset()},e.prototype.tilesIn=function(t){for(var e=this,r=[],n=this.getIds(),o=1/0,a=1/0,s=-1/0,u=-1/0,p=t[0].zoom,f=0;f<t.length;f++){var d=t[f];o=Math.min(o,d.column),a=Math.min(a,d.row),s=Math.max(s,d.column),u=Math.max(u,d.row)}for(var m=0;m<n.length;m++){var y=e._tiles[n[m]],g=l.fromID(n[m]),v=[i(g,y.sourceMaxZoom,new c(o,a,p)),i(g,y.sourceMaxZoom,new c(s,u,p))];if(v[0].x<h&&v[0].y<h&&v[1].x>=0&&v[1].y>=0){for(var _=[],x=0;x<t.length;x++)_.push(i(g,y.sourceMaxZoom,t[x]));r.push({tile:y,coord:g,queryGeometry:[_],scale:Math.pow(2,e.transform.zoom-y.coord.z)})}}return r},e.prototype.commitPlacement=function(t,e){var r=this;this._needsFullPlacement=!1;for(var i=this.getIds(),n=0;n<i.length;n++)r.getTileByID(i[n]).commitPlacement(t,e,r.transform.angle)},e.prototype.getVisibleCoordinates=function(){for(var t=this,e=this.getRenderableIds().map(l.fromID),r=0,i=e;r<i.length;r+=1){var n=i[r];n.posMatrix=t.transform.calculatePosMatrix(n,t._source.maxzoom)}return e},e.prototype.hasTransition=function(){var t=this;if(this._source.hasTransition())return!0;if(n(this._source.type))for(var e in t._tiles){var r=t._tiles[e];if(void 0!==r.fadeEndTime&&r.fadeEndTime>=Date.now())return!0}return!1},e}(s);d.maxOverzooming=10,d.maxUnderzooming=3,e.exports=d},{"../data/extent":59,"../geo/coordinate":68,"../util/evented":254,"../util/lru_cache":260,"../util/util":267,"./source":109,"./tile":111,"./tile_coord":113,"@mapbox/point-geometry":2}],111:[function(t,e,r){"use strict";var i=t("../util/util"),n=t("../data/bucket").deserialize,o=t("../data/bucket/symbol_bucket"),a=t("../data/feature_index"),s=t("@mapbox/vector-tile"),l=t("pbf"),u=t("../util/vectortile_to_geojson"),c=t("../style-spec/feature_filter"),p=(t("../symbol/collision_index"),t("../symbol/collision_box")),h=t("../data/raster_bounds_array"),f=t("./tile_coord"),d=t("../data/extent"),m=t("@mapbox/point-geometry"),y=t("../gl/vertex_buffer"),g=t("../gl/index_buffer"),v=t("../render/texture"),_=t("../data/segment").SegmentVector,x=t("../data/index_array_type").TriangleIndexArray,b=t("../symbol/projection"),w=t("../symbol/symbol_placement"),z=w.performSymbolPlacement,T=w.updateOpacities,S=t("../source/pixels_to_tile_units"),A=function(t,e,r){this.coord=t,this.uid=i.uniqueId(),this.uses=0,this.tileSize=e,this.sourceMaxZoom=r,this.buckets={},this.expirationTime=null,this.expiredRequestCount=0,this.state="loading"};A.prototype.registerFadeDuration=function(t){var e=t+this.timeAdded;e<Date.now()||this.fadeEndTime&&e<this.fadeEndTime||(this.fadeEndTime=e)},A.prototype.wasRequested=function(){return"errored"===this.state||"loaded"===this.state||"reloading"===this.state},A.prototype.loadVectorData=function(t,e){this.hasData()&&this.unloadVectorData(),this.state="loaded",t?(t.rawTileData&&(this.rawTileData=t.rawTileData),this.collisionBoxArray=new p(t.collisionBoxArray),this.featureIndex=a.deserialize(t.featureIndex,this.rawTileData),this.buckets=n(t.buckets,e.style),t.iconAtlasImage&&(this.iconAtlasImage=t.iconAtlasImage),t.glyphAtlasImage&&(this.glyphAtlasImage=t.glyphAtlasImage),t.iconAtlasImage&&(this.iconAtlasImage=t.iconAtlasImage),t.glyphAtlasImage&&(this.glyphAtlasImage=t.glyphAtlasImage)):this.collisionBoxArray=new p},A.prototype.unloadVectorData=function(){var t=this;for(var e in t.buckets)t.buckets[e].destroy();this.buckets={},this.iconAtlasTexture&&this.iconAtlasTexture.destroy(),this.glyphAtlasTexture&&this.glyphAtlasTexture.destroy(),this.collisionBoxArray=null,this.featureIndex=null,this.state="unloaded"},A.prototype.added=function(t){var e=this;for(var r in e.buckets){var i=e.buckets[r];i instanceof o&&t.addTileLayer(r,e.coord,e.sourceMaxZoom,i.symbolInstances)}},A.prototype.removed=function(t){var e=this;for(var r in e.buckets)e.buckets[r]instanceof o&&t.removeTileLayer(r,e.coord,e.sourceMaxZoom)},A.prototype.placeLayer=function(t,e,r,i){var n=this.getBucket(r),a=this.collisionBoxArray;if(n&&n instanceof o&&a){var s=e.transform.calculatePosMatrix(this.coord,this.sourceMaxZoom),l="map"===n.layers[0].layout.get("text-pitch-alignment"),u=d/this.tileSize,c=S(this,1,e.transform.zoom),p=b.getLabelPlaneMatrix(s,l,!0,e.transform,c);z(n,e,t,e.transform.zoom,u,s,p,this.coord.id,i,a)}},A.prototype.commitPlacement=function(t,e,r){var i=this;for(var n in i.buckets){var a=i.buckets[n];a instanceof o&&(T(a,e),a.sortFeatures(r))}this.featureIndex&&this.featureIndex.setCollisionIndex(t)},A.prototype.getBucket=function(t){return this.buckets[t.id]},A.prototype.upload=function(t){var e=this;for(var r in e.buckets){var i=e.buckets[r];i.uploaded||(i.upload(t),i.uploaded=!0)}this.iconAtlasImage&&(this.iconAtlasTexture=new v(t,this.iconAtlasImage,t.RGBA),this.iconAtlasImage=null),this.glyphAtlasImage&&(this.glyphAtlasTexture=new v(t,this.glyphAtlasImage,t.ALPHA),this.glyphAtlasImage=null)},A.prototype.queryRenderedFeatures=function(t,e,r,i,n,o){var a=this;if(!this.featureIndex)return{};var s=0;for(var l in t){var u=a.getBucket(t[l]);u&&(s=Math.max(s,t[l].queryRadius(u)))}return this.featureIndex.query({queryGeometry:e,scale:r,tileSize:this.tileSize,bearing:n,params:i,additionalRadius:s,tileSourceMaxZoom:this.sourceMaxZoom,collisionBoxArray:this.collisionBoxArray,sourceID:o},t)},A.prototype.querySourceFeatures=function(t,e){var r=this;if(this.rawTileData){this.vtLayers||(this.vtLayers=new s.VectorTile(new l(this.rawTileData)).layers);var i=e?e.sourceLayer:"",n=this.vtLayers._geojsonTileLayer||this.vtLayers[i];if(n)for(var o=c(e&&e.filter),a={z:this.coord.z,x:this.coord.x,y:this.coord.y},p=0;p<n.length;p++){var h=n.feature(p);if(o({zoom:r.coord.z},h)){var f=new u(h,r.coord.z,r.coord.x,r.coord.y);f.tile=a,t.push(f)}}}},A.prototype.clearMask=function(){this.segments&&(this.segments.destroy(),delete this.segments),this.maskedBoundsBuffer&&(this.maskedBoundsBuffer.destroy(),delete this.maskedBoundsBuffer),this.maskedIndexBuffer&&(this.maskedIndexBuffer.destroy(),delete this.maskedIndexBuffer)},A.prototype.setMask=function(t,e){var r=this;if(!i.deepEqual(this.mask,t)&&(this.mask=t,this.clearMask(),!i.deepEqual(t,{0:!0}))){var n=new h,o=new x;this.segments=new _,this.segments.prepareSegment(0,n,o);for(var a=Object.keys(t),s=0;s<a.length;s++){var l=f.fromID(+a[s]),u=d>>l.z,c=new m(l.x*u,l.y*u),p=new m(c.x+u,c.y+u),v=r.segments.prepareSegment(4,n,o);n.emplaceBack(c.x,c.y,c.x,c.y),n.emplaceBack(p.x,c.y,p.x,c.y),n.emplaceBack(c.x,p.y,c.x,p.y),n.emplaceBack(p.x,p.y,p.x,p.y);var b=v.vertexLength;o.emplaceBack(b,b+1,b+2),o.emplaceBack(b+1,b+2,b+3),v.vertexLength+=4,v.primitiveLength+=2}this.maskedBoundsBuffer=new y(e,n),this.maskedIndexBuffer=new g(e,o)}},A.prototype.hasData=function(){return"loaded"===this.state||"reloading"===this.state||"expired"===this.state},A.prototype.setExpiryData=function(t){var e=this.expirationTime;if(t.cacheControl){var r=i.parseCacheControl(t.cacheControl);r["max-age"]&&(this.expirationTime=Date.now()+1e3*r["max-age"])}else t.expires&&(this.expirationTime=new Date(t.expires).getTime());if(this.expirationTime){var n=Date.now(),o=!1;if(this.expirationTime>n)o=!1;else if(e)if(this.expirationTime<e)o=!0;else{var a=this.expirationTime-e;a?this.expirationTime=n+Math.max(a,3e4):o=!0}else o=!0;o?(this.expiredRequestCount++,this.state="expired"):this.expiredRequestCount=0}},A.prototype.getExpiryTimeout=function(){if(this.expirationTime)return this.expiredRequestCount?1e3*(1<<Math.min(this.expiredRequestCount-1,31)):Math.min(this.expirationTime-(new Date).getTime(),Math.pow(2,31)-1)},e.exports=A},{"../data/bucket":52,"../data/bucket/symbol_bucket":58,"../data/extent":59,"../data/feature_index":60,"../data/index_array_type":61,"../data/raster_bounds_array":65,"../data/segment":66,"../gl/index_buffer":72,"../gl/vertex_buffer":73,"../render/texture":94,"../source/pixels_to_tile_units":105,"../style-spec/feature_filter":146,"../symbol/collision_box":209,"../symbol/collision_index":211,"../symbol/projection":217,"../symbol/symbol_placement":221,"../util/util":267,"../util/vectortile_to_geojson":268,"./tile_coord":113,"@mapbox/point-geometry":2,"@mapbox/vector-tile":6,pbf:39}],112:[function(t,e,r){"use strict";var i=t("../geo/lng_lat_bounds"),n=t("../util/util").clamp,o=function(t,e,r){this.bounds=i.convert(this.validateBounds(t)),this.minzoom=e||0,this.maxzoom=r||24};o.prototype.validateBounds=function(t){return Array.isArray(t)&&4===t.length?[Math.max(-180,t[0]),Math.max(-90,t[1]),Math.min(180,t[2]),Math.min(90,t[3])]:[-180,-90,180,90]},o.prototype.contains=function(t,e){var r=e?Math.min(t.z,e):t.z,i={minX:Math.floor(this.lngX(this.bounds.getWest(),r)),minY:Math.floor(this.latY(this.bounds.getNorth(),r)),maxX:Math.ceil(this.lngX(this.bounds.getEast(),r)),maxY:Math.ceil(this.latY(this.bounds.getSouth(),r))};return t.x>=i.minX&&t.x<i.maxX&&t.y>=i.minY&&t.y<i.maxY},o.prototype.lngX=function(t,e){return(t+180)*(Math.pow(2,e)/360)},o.prototype.latY=function(t,e){var r=n(Math.sin(Math.PI/180*t),-.9999,.9999),i=Math.pow(2,e)/(2*Math.PI);return Math.pow(2,e-1)+.5*Math.log((1+r)/(1-r))*-i},e.exports=o},{"../geo/lng_lat_bounds":70,"../util/util":267}],113:[function(t,e,r){"use strict";function i(t,e){if(t.row>e.row){var r=t;t=e,e=r}return{x0:t.column,y0:t.row,x1:e.column,y1:e.row,dx:e.column-t.column,dy:e.row-t.row}}function n(t,e,r,i,n){var o=Math.max(r,Math.floor(e.y0)),a=Math.min(i,Math.ceil(e.y1));if(t.x0===e.x0&&t.y0===e.y0?t.x0+e.dy/t.dy*t.dx<e.x1:t.x1-e.dy/t.dy*t.dx<e.x0){var s=t;t=e,e=s}for(var l=t.dx/t.dy,u=e.dx/e.dy,c=t.dx>0,p=e.dx<0,h=o;h<a;h++){var f=l*Math.max(0,Math.min(t.dy,h+c-t.y0))+t.x0,d=u*Math.max(0,Math.min(e.dy,h+p-e.y0))+e.x0;n(Math.floor(d),Math.ceil(f),h)}}function o(t,e,r,o,a,s){var l,u=i(t,e),c=i(e,r),p=i(r,t);u.dy>c.dy&&(l=u,u=c,c=l),u.dy>p.dy&&(l=u,u=p,p=l),c.dy>p.dy&&(l=c,c=p,p=l),u.dy&&n(p,u,o,a,s),c.dy&&n(p,c,o,a,s)}function a(t,e,r){for(var i,n="",o=t;o>0;o--)n+=(e&(i=1<<o-1)?1:0)+(r&i?2:0);return n}var s=t("assert"),l=t("@mapbox/whoots-js"),u=t("../geo/coordinate"),c=function(t,e,r,i){s(!isNaN(t)&&t>=0&&t%1==0),s(!isNaN(e)&&e>=0&&e%1==0),s(!isNaN(r)&&r>=0&&r%1==0),(void 0===i||isNaN(i))&&(i=0),this.z=+t,this.x=+e,this.y=+r,this.w=+i,(i*=2)<0&&(i=-1*i-1);var n=1<<this.z;this.id=32*(n*n*i+n*this.y+this.x)+this.z,this.posMatrix=null};c.prototype.toString=function(){return this.z+"/"+this.x+"/"+this.y},c.prototype.toCoordinate=function(t){var e=Math.min(this.z,void 0===t?this.z:t),r=Math.pow(2,e),i=this.y,n=this.x+r*this.w;return new u(n,i,e)},c.prototype.url=function(t,e,r){var i=l.getTileBBox(this.x,this.y,this.z),n=a(this.z,this.x,this.y);return t[(this.x+this.y)%t.length].replace("{prefix}",(this.x%16).toString(16)+(this.y%16).toString(16)).replace("{z}",String(Math.min(this.z,e||this.z))).replace("{x}",String(this.x)).replace("{y}",String("tms"===r?Math.pow(2,this.z)-this.y-1:this.y)).replace("{quadkey}",n).replace("{bbox-epsg-3857}",i)},c.prototype.parent=function(t){return 0===this.z?null:this.z>t?new c(this.z-1,this.x,this.y,this.w):new c(this.z-1,Math.floor(this.x/2),Math.floor(this.y/2),this.w)},c.prototype.wrapped=function(){return new c(this.z,this.x,this.y,0)},c.prototype.isLessThan=function(t){return this.w<t.w||!(this.w>t.w)&&(this.z<t.z||!(this.z>t.z)&&(this.x<t.x||!(this.x>t.x)&&this.y<t.y))},c.prototype.children=function(t){if(this.z>=t)return[new c(this.z+1,this.x,this.y,this.w)];var e=this.z+1,r=2*this.x,i=2*this.y;return[new c(e,r,i,this.w),new c(e,r+1,i,this.w),new c(e,r,i+1,this.w),new c(e,r+1,i+1,this.w)]},c.prototype.scaledTo=function(t,e){return this.z>e?new c(t,this.x,this.y,this.w):t<=this.z?new c(t,this.x>>this.z-t,this.y>>this.z-t,this.w):new c(t,this.x<<t-this.z,this.y<<t-this.z,this.w)},c.prototype.isChildOf=function(t,e){var r=Math.min(e,t.z),i=Math.min(e,this.z);return 0===t.z||t.z<this.z&&t.x===this.x>>i-r&&t.y===this.y>>i-r},c.cover=function(t,e,r,i){function n(t,e,n){var o,l,u,p;if(n>=0&&n<=a)for(o=t;o<e;o++)l=Math.floor(o/a),u=(o%a+a)%a,0!==l&&!0!==i||(p=new c(r,u,n,l),s[p.id]=p)}void 0===i&&(i=!0);var a=1<<t,s={};return o(e[0],e[1],e[2],0,a,n),o(e[2],e[3],e[0],0,a,n),Object.keys(s).map(function(t){return s[t]})},c.fromID=function(t){var e=t%32,r=1<<e,i=(t-e)/32,n=i%r,o=(i-n)/r%r,a=Math.floor(i/(r*r));return a%2!=0&&(a=-1*a-1),a/=2,new c(e,n,o,a)},e.exports=c},{"../geo/coordinate":68,"@mapbox/whoots-js":10,assert:11}],114:[function(t,e,r){"use strict";var i=t("../util/evented"),n=t("../util/util"),o=t("./load_tilejson"),a=t("../util/mapbox").normalizeTileURL,s=t("./tile_bounds"),l=t("../util/ajax").ResourceType,u=t("../util/browser"),c=function(t){function e(e,r,i,o){if(t.call(this),this.id=e,this.dispatcher=i,this.type="vector",this.minzoom=0,this.maxzoom=22,this.scheme="xyz",this.tileSize=512,this.reparseOverscaled=!0,this.isTileClipped=!0,n.extend(this,n.pick(r,["url","scheme","tileSize"])),this._options=n.extend({type:"vector"},r),512!==this.tileSize)throw new Error("vector tile sources must have a tileSize of 512");this.setEventedParent(o)}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype.load=function(){var t=this;this.fire("dataloading",{dataType:"source"}),o(this._options,this.map._transformRequest,function(e,r){e?t.fire("error",e):r&&(n.extend(t,r),r.bounds&&(t.tileBounds=new s(r.bounds,t.minzoom,t.maxzoom)),t.fire("data",{dataType:"source",sourceDataType:"metadata"}),t.fire("data",{dataType:"source",sourceDataType:"content"}))})},e.prototype.hasTile=function(t){return!this.tileBounds||this.tileBounds.contains(t,this.maxzoom)},e.prototype.onAdd=function(t){this.map=t,this.load()},e.prototype.serialize=function(){return n.extend({},this._options)},e.prototype.loadTile=function(t,e){function r(r,i){return t.aborted?e(null):r?e(r):(this.map._refreshExpiredTiles&&t.setExpiryData(i),t.loadVectorData(i,this.map.painter),e(null),void(t.reloadCallback&&(this.loadTile(t,t.reloadCallback),t.reloadCallback=null)))}var i=t.coord.z>this.maxzoom?Math.pow(2,t.coord.z-this.maxzoom):1,n=a(t.coord.url(this.tiles,this.maxzoom,this.scheme),this.url),o={request:this.map._transformRequest(n,l.Tile),uid:t.uid,coord:t.coord,zoom:t.coord.z,tileSize:this.tileSize*i,type:this.type,source:this.id,pixelRatio:u.devicePixelRatio,overscaling:i,showCollisionBoxes:this.map.showCollisionBoxes};void 0===t.workerID||"expired"===t.state?t.workerID=this.dispatcher.send("loadTile",o,r.bind(this)):"loading"===t.state?t.reloadCallback=e:this.dispatcher.send("reloadTile",o,r.bind(this),t.workerID)},e.prototype.abortTile=function(t){this.dispatcher.send("abortTile",{uid:t.uid,type:this.type,source:this.id},void 0,t.workerID)},e.prototype.unloadTile=function(t){t.unloadVectorData(),this.dispatcher.send("removeTile",{uid:t.uid,type:this.type,source:this.id},void 0,t.workerID)},e.prototype.hasTransition=function(){return!1},e}(i);e.exports=c},{"../util/ajax":245,"../util/browser":246,"../util/evented":254,"../util/mapbox":261,"../util/util":267,"./load_tilejson":104,"./tile_bounds":112}],115:[function(t,e,r){"use strict";function i(t,e){if((t.request.url+"").indexOf("tiles.mapbox.com")>=0)return n(t,e);var r=o.getJSON(t.request,function(r,i){if(r||!i)return e(r);if("object"!=typeof i)return e(new Error("Input data is not a valid GeoJSON object."));c(i,!0);var n={minZoom:5,maxZoom:20,extent:p,radius:p/512*50};try{var o=h(n).load(i.features).getTile(t.zoom,t.coord.x,t.coord.y);if(!o)return;console.log("geoJSONTile yaaaay",t.zoom,t.coord.x,t.coord.y,o);var a=new f(o.features);console.log("geojsonWrapper",a);var s=d(a);e(null,{vectorTile:a,rawData:s.buffer,cacheControl:"max-age=90000",expires:void 0})}catch(r){return e(r)}});return function(){r.abort(),e()}}function n(t,e){var r=o.getArrayBuffer(t.request,function(t,r){t?e(t):r&&e(null,{vectorTile:new a.VectorTile(new s(r.data)),rawData:r.data,cacheControl:r.cacheControl,expires:r.expires})});return function(){r.abort(),e()}}var o=t("../util/ajax"),a=t("@mapbox/vector-tile"),s=t("pbf"),l=t("./worker_tile"),u=t("../util/util"),c=(t("geojson-vt"),t("geojson-rewind")),p=t("../data/extent"),h=t("supercluster"),f=t("./geojson_wrapper"),d=t("vt-pbf"),m=function(t,e,r){this.actor=t,this.layerIndex=e,this.loadVectorData=r||i,this.loading={},this.loaded={}};m.prototype.loadTile=function(t,e){var r=this,i=t.source,n=t.uid;this.loading[i]||(this.loading[i]={});var o=this.loading[i][n]=new l(t);o.abort=this.loadVectorData(t,function(t,a){if(delete r.loading[i][n],t||!a)return e(t);var s=a.rawData,l={};a.expires&&(l.expires=a.expires),a.cacheControl&&(l.cacheControl=a.cacheControl),o.vectorTile=a.vectorTile,o.parse(a.vectorTile,r.layerIndex,r.actor,function(t,r,i){if(t||!r)return e(t);e(null,u.extend({rawTileData:s},r,l),i)}),r.loaded[i]=r.loaded[i]||{},r.loaded[i][n]=o})},m.prototype.reloadTile=function(t,e){var r=this.loaded[t.source],i=t.uid,n=this;if(r&&r[i]){var o=r[i];o.showCollisionBoxes=t.showCollisionBoxes,"parsing"===o.status?o.reloadCallback=e:"done"===o.status&&o.parse(o.vectorTile,this.layerIndex,this.actor,function(t,r){if(this.reloadCallback){var i=this.reloadCallback;delete this.reloadCallback,this.parse(this.vectorTile,n.layerIndex,n.actor,i)}e(t,r)}.bind(o))}},m.prototype.abortTile=function(t,e){var r=this.loading[t.source],i=t.uid;r&&r[i]&&r[i].abort&&(r[i].abort(),delete r[i]),e()},m.prototype.removeTile=function(t,e){var r=this.loaded[t.source],i=t.uid;r&&r[i]&&delete r[i],e()},e.exports=m},{"../data/extent":59,"../util/ajax":245,"../util/util":267,"./geojson_wrapper":102,"./worker_tile":118,"@mapbox/vector-tile":6,"geojson-rewind":15,"geojson-vt":19,pbf:39,supercluster:42,"vt-pbf":47}],116:[function(t,e,r){"use strict";var i=t("../util/ajax"),n=function(t){function e(e,r,i,n){t.call(this,e,r,i,n),this.roundZoom=!0,this.type="video",this.options=r}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype.load=function(){var t=this,e=this.options;this.urls=e.urls,i.getVideo(e.urls,function(e,r){e?t.fire("error",{error:e}):r&&(t.video=r,t.video.loop=!0,t.video.addEventListener("playing",function(){t.map._rerender()}),t.map&&t.video.play(),t._finishLoading())})},e.prototype.getVideo=function(){return this.video},e.prototype.onAdd=function(t){this.map||(this.map=t,this.load(),this.video&&(this.video.play(),this.setCoordinates(this.coordinates)))},e.prototype.prepare=function(){0===Object.keys(this.tiles).length||this.video.readyState<2||this._prepareImage(this.map.painter.gl,this.video)},e.prototype.serialize=function(){return{type:"video",urls:this.urls,coordinates:this.coordinates}},e.prototype.hasTransition=function(){return this.video&&!this.video.paused},e}(t("./image_source"));e.exports=n},{"../util/ajax":245,"./image_source":103}],117:[function(t,e,r){"use strict";var i=t("../util/actor"),n=t("../style/style_layer_index"),o=t("./vector_tile_worker_source"),a=t("./geojson_worker_source"),s=t("assert"),l=t("./rtl_text_plugin"),u=function(t){var e=this;this.self=t,this.actor=new i(t,this),this.layerIndexes={},this.workerSourceTypes={vector:o,geojson:a},this.workerSources={},this.self.registerWorkerSource=function(t,r){if(e.workerSourceTypes[t])throw new Error('Worker source with name "'+t+'" already registered.');e.workerSourceTypes[t]=r},this.self.registerRTLTextPlugin=function(t){if(l.applyArabicShaping||l.processBidirectionalText)throw new Error("RTL text plugin already registered.");l.applyArabicShaping=t.applyArabicShaping,l.processBidirectionalText=t.processBidirectionalText}};u.prototype.setLayers=function(t,e,r){this.getLayerIndex(t).replace(e),r()},u.prototype.updateLayers=function(t,e,r){this.getLayerIndex(t).update(e.layers,e.removedIds),r()},u.prototype.loadTile=function(t,e,r){s(e.type),this.getWorkerSource(t,e.type).loadTile(e,r)},u.prototype.reloadTile=function(t,e,r){s(e.type),this.getWorkerSource(t,e.type).reloadTile(e,r)},u.prototype.abortTile=function(t,e,r){s(e.type),this.getWorkerSource(t,e.type).abortTile(e,r)},u.prototype.removeTile=function(t,e,r){s(e.type),this.getWorkerSource(t,e.type).removeTile(e,r)},u.prototype.removeSource=function(t,e,r){s(e.type);var i=this.getWorkerSource(t,e.type);void 0!==i.removeSource?i.removeSource(e,r):r()},u.prototype.loadWorkerSource=function(t,e,r){try{this.self.importScripts(e.url),r()}catch(t){r(t)}},u.prototype.loadRTLTextPlugin=function(t,e,r){try{l.applyArabicShaping||l.processBidirectionalText||(this.self.importScripts(e),l.applyArabicShaping&&l.processBidirectionalText||r(new Error("RTL Text Plugin failed to import scripts from "+e)))}catch(t){r(t)}},u.prototype.getLayerIndex=function(t){var e=this.layerIndexes[t];return e||(e=this.layerIndexes[t]=new n),e},u.prototype.getWorkerSource=function(t,e){var r=this;if(this.workerSources[t]||(this.workerSources[t]={}),!this.workerSources[t][e]){var i={send:function(e,i,n,o){r.actor.send(e,i,n,o,t)}};this.workerSources[t][e]=new this.workerSourceTypes[e](i,this.getLayerIndex(t))}return this.workerSources[t][e]},e.exports=function(t){return new u(t)}},{"../style/style_layer_index":204,"../util/actor":244,"./geojson_worker_source":101,"./rtl_text_plugin":108,"./vector_tile_worker_source":115,assert:11}],118:[function(t,e,r){"use strict";function i(t,e){for(var r=0,i=t;r<i.length;r+=1)i[r].recalculate({zoom:e,now:Number.MAX_VALUE,defaultFadeDuration:0,zoomHistory:{lastIntegerZoom:0,lastIntegerZoomTime:0,lastZoom:0}})}function n(t,e){return t.filter(function(t){return!t.isEmpty()}).map(function(t){return t.serialize(e)})}var o=t("../data/feature_index"),a=t("../symbol/symbol_layout").performSymbolLayout,s=t("../symbol/collision_box"),l=t("../util/dictionary_coder"),u=t("../data/bucket/symbol_bucket"),c=t("../util/util"),p=t("assert"),h=t("../render/image_atlas").makeImageAtlas,f=t("../render/glyph_atlas").makeGlyphAtlas,d=function(t){this.coord=t.coord,this.uid=t.uid,this.zoom=t.zoom,this.pixelRatio=t.pixelRatio,this.tileSize=t.tileSize,this.source=t.source,this.overscaling=t.overscaling,this.showCollisionBoxes=t.showCollisionBoxes};d.prototype.parse=function(t,e,r,d){function m(){var t=this;if(P)return d(P);if(L&&R){var e=f(L),r=h(R);for(var o in _){var s=_[o];s instanceof u&&(i(s.layers,t.zoom),a(s,L,e.positions,R,r.positions,t.showCollisionBoxes))}this.status="done";var l=[e.image.data.buffer,r.image.data.buffer];d(null,{buckets:n(c.values(_),l),featureIndex:v.serialize(l),collisionBoxArray:this.collisionBoxArray.serialize(),glyphAtlasImage:e.image,iconAtlasImage:r.image},l)}}var y=this;this.status="parsing",this.data=t,this.collisionBoxArray=new s;var g=new l(Object.keys(t.layers).sort()),v=new o(this.coord,this.overscaling);v.bucketLayerIDs=[];var _={},x={featureIndex:v,iconDependencies:{},glyphDependencies:{}},b=e.familiesBySource[this.source];for(var w in b){var z=t.layers[w];if(z){1===z.version&&c.warnOnce('Vector tile source "'+y.source+'" layer "'+w+'" does not use vector tile spec v2 and therefore may have some rendering errors.');for(var T=g.encode(w),S=[],A=0;A<z.length;A++){var E=z.feature(A);S.push({feature:E,index:A,sourceLayerIndex:T})}for(var C=0,k=b[w];C<k.length;C+=1){var M=k[C],I=M[0];p(I.source===y.source),I.minzoom&&y.zoom<Math.floor(I.minzoom)||(I.maxzoom&&y.zoom>=I.maxzoom||"none"!==I.visibility&&(i(M,y.zoom),(_[I.id]=I.createBucket({index:v.bucketLayerIDs.length,layers:M,zoom:y.zoom,pixelRatio:y.pixelRatio,overscaling:y.overscaling,collisionBoxArray:y.collisionBoxArray})).populate(S,x),v.bucketLayerIDs.push(M.map(function(t){return t.id}))))}}}var P,L,R,D=c.mapObject(x.glyphDependencies,function(t){return Object.keys(t).map(Number)});Object.keys(D).length?r.send("getGlyphs",{uid:this.uid,stacks:D},function(t,e){P||(P=t,L=e,m.call(y))}):L={};var B=Object.keys(x.iconDependencies);B.length?r.send("getImages",{icons:B},function(t,e){P||(P=t,R=e,m.call(y))}):R={},m.call(this)},e.exports=d},{"../data/bucket/symbol_bucket":58,"../data/feature_index":60,"../render/glyph_atlas":85,"../render/image_atlas":87,"../symbol/collision_box":209,"../symbol/symbol_layout":220,"../util/dictionary_coder":251,"../util/util":267,assert:11}],119:[function(t,e,r){"use strict";function i(t,e){var r={};for(var i in t)"ref"!==i&&(r[i]=t[i]);return n.forEach(function(t){t in e&&(r[t]=e[t])}),r}var n=t("./util/ref_properties");e.exports=function(t){t=t.slice();for(var e=Object.create(null),r=0;r<t.length;r++)e[t[r].id]=t[r];for(var n=0;n<t.length;n++)"ref"in t[n]&&(t[n]=i(t[n],e[t[n].ref]));return t}},{"./util/ref_properties":156}],120:[function(t,e,r){"use strict";function i(t,e,r,i){t=t||{},e=e||{};var n;for(n in t)t.hasOwnProperty(n)&&(e.hasOwnProperty(n)||(r.push({command:u.removeSource,args:[n]}),i[n]=!0));for(n in e)e.hasOwnProperty(n)&&(t.hasOwnProperty(n)?l(t[n],e[n])||("geojson"===t[n].type&&"geojson"===e[n].type?r.push({command:u.setGeoJSONSourceData,args:[n,e[n].data]}):(r.push({command:u.removeSource,args:[n]}),r.push({command:u.addSource,args:[n,e[n]]}),i[n]=!0)):r.push({command:u.addSource,args:[n,e[n]]}))}function n(t,e,r,i,n,o){t=t||{},e=e||{};var a;for(a in t)t.hasOwnProperty(a)&&(l(t[a],e[a])||r.push({command:o,args:[i,a,e[a],n]}));for(a in e)e.hasOwnProperty(a)&&!t.hasOwnProperty(a)&&(l(t[a],e[a])||r.push({command:o,args:[i,a,e[a],n]}))}function o(t){return t.id}function a(t,e){return t[e.id]=e,t}function s(t,e,r){t=t||[],e=e||[];var i,s,c,p,h,f,d,m=t.map(o),y=e.map(o),g=t.reduce(a,{}),v=e.reduce(a,{}),_=m.slice(),x=Object.create(null);for(i=0,s=0;i<m.length;i++)c=m[i],v.hasOwnProperty(c)?s++:(r.push({command:u.removeLayer,args:[c]}),_.splice(_.indexOf(c,s),1));for(i=0,s=0;i<y.length;i++)c=y[y.length-1-i],_[_.length-1-i]!==c&&(g.hasOwnProperty(c)?(r.push({command:u.removeLayer,args:[c]}),_.splice(_.lastIndexOf(c,_.length-s),1)):s++,f=_[_.length-i],r.push({command:u.addLayer,args:[v[c],f]}),_.splice(_.length-i,0,c),x[c]=!0);for(i=0;i<y.length;i++)if(c=y[i],p=g[c],h=v[c],!x[c]&&!l(p,h))if(l(p.source,h.source)&&l(p["source-layer"],h["source-layer"])&&l(p.type,h.type)){n(p.layout,h.layout,r,c,null,u.setLayoutProperty),n(p.paint,h.paint,r,c,null,u.setPaintProperty),l(p.filter,h.filter)||r.push({command:u.setFilter,args:[c,h.filter]}),l(p.minzoom,h.minzoom)&&l(p.maxzoom,h.maxzoom)||r.push({command:u.setLayerZoomRange,args:[c,h.minzoom,h.maxzoom]});for(d in p)p.hasOwnProperty(d)&&"layout"!==d&&"paint"!==d&&"filter"!==d&&"metadata"!==d&&"minzoom"!==d&&"maxzoom"!==d&&(0===d.indexOf("paint.")?n(p[d],h[d],r,c,d.slice(6),u.setPaintProperty):l(p[d],h[d])||r.push({command:u.setLayerProperty,args:[c,d,h[d]]}));for(d in h)h.hasOwnProperty(d)&&!p.hasOwnProperty(d)&&"layout"!==d&&"paint"!==d&&"filter"!==d&&"metadata"!==d&&"minzoom"!==d&&"maxzoom"!==d&&(0===d.indexOf("paint.")?n(p[d],h[d],r,c,d.slice(6),u.setPaintProperty):l(p[d],h[d])||r.push({command:u.setLayerProperty,args:[c,d,h[d]]}))}else r.push({command:u.removeLayer,args:[c]}),f=_[_.lastIndexOf(c)+1],r.push({command:u.addLayer,args:[h,f]})}var l=t("lodash.isequal"),u={setStyle:"setStyle",addLayer:"addLayer",removeLayer:"removeLayer",setPaintProperty:"setPaintProperty",setLayoutProperty:"setLayoutProperty",setFilter:"setFilter",addSource:"addSource",removeSource:"removeSource",setGeoJSONSourceData:"setGeoJSONSourceData",setLayerZoomRange:"setLayerZoomRange",setLayerProperty:"setLayerProperty",setCenter:"setCenter",setZoom:"setZoom",setBearing:"setBearing",setPitch:"setPitch",setSprite:"setSprite",setGlyphs:"setGlyphs",setTransition:"setTransition",setLight:"setLight"};e.exports=function(t,e){if(!t)return[{command:u.setStyle,args:[e]}];var r=[];try{if(!l(t.version,e.version))return[{command:u.setStyle,args:[e]}];l(t.center,e.center)||r.push({command:u.setCenter,args:[e.center]}),l(t.zoom,e.zoom)||r.push({command:u.setZoom,args:[e.zoom]}),l(t.bearing,e.bearing)||r.push({command:u.setBearing,args:[e.bearing]}),l(t.pitch,e.pitch)||r.push({command:u.setPitch,args:[e.pitch]}),l(t.sprite,e.sprite)||r.push({command:u.setSprite,args:[e.sprite]}),l(t.glyphs,e.glyphs)||r.push({command:u.setGlyphs,args:[e.glyphs]}),l(t.transition,e.transition)||r.push({command:u.setTransition,args:[e.transition]}),l(t.light,e.light)||r.push({command:u.setLight,args:[e.light]});var n={},o=[];i(t.sources,e.sources,o,n);var a=[];t.layers&&t.layers.forEach(function(t){n[t.source]?r.push({command:u.removeLayer,args:[t.id]}):a.push(t)}),r=r.concat(o),s(a,e.layers,r)}catch(t){console.warn("Unable to compute style diff:",t),r=[{command:u.setStyle,args:[e]}]}return r},e.exports.operations=u},{"lodash.isequal":35}],121:[function(t,e,r){"use strict";var i=t("util").format;e.exports=function(t,e){for(var r=[],n=arguments.length-2;n-- >0;)r[n]=arguments[n+2];this.message=(t?t+": ":"")+i.apply(i,r),null!==e&&void 0!==e&&e.__line__&&(this.line=e.__line__)}},{util:46}],122:[function(t,e,r){"use strict";function i(t){return Array.isArray(t)?"("+t.map(n).join(", ")+")":"("+n(t.type)+"...)"}var n=t("./types").toString,o=t("./parsing_context"),a=(t("./evaluation_context"),t("assert")),s=function(t,e,r,i){this.name=t,this.type=e,this._evaluate=r,this.args=i};s.prototype.evaluate=function(t){return this._evaluate(t,this.args)},s.prototype.eachChild=function(t){this.args.forEach(t)},s.parse=function(t,e){var r=t[0],l=s.definitions[r];if(!l)return e.error('Unknown expression "'+r+'". If you wanted a literal array, use ["literal", [...]].',0);for(var u=Array.isArray(l)?l[0]:l.type,c=Array.isArray(l)?[[l[1],l[2]]]:l.overloads,p=c.filter(function(e){var r=e[0];return!Array.isArray(r)||r.length===t.length-1}),h=[],f=1;f<t.length;f++){var d=t[f],m=void 0;if(1===p.length){var y=p[0][0];m=Array.isArray(y)?y[f-1]:y.type}var g=e.parse(d,1+h.length,m);if(!g)return null;h.push(g)}for(var v=null,_=0,x=p;_<x.length;_+=1){var b=x[_],w=b[0],z=b[1];if(v=new o(e.definitions,e.path,null,e.scope),Array.isArray(w)&&w.length!==h.length)v.error("Expected "+w.length+" arguments, but found "+h.length+" instead.");else{for(var T=0;T<h.length;T++){var S=Array.isArray(w)?w[T]:w.type,A=h[T];v.concat(T+1).checkSubtype(S,A.type)}if(0===v.errors.length)return new s(r,u,z,h)}}if(a(!v||v.errors.length>0),1===p.length)e.errors.push.apply(e.errors,v.errors);else{var E=(p.length?p:c).map(function(t){return i(t[0])}).join(" | "),C=h.map(function(t){return n(t.type)}).join(", ");e.error("Expected arguments of type "+E+", but found ("+C+") instead.")}return null},s.register=function(t,e){a(!s.definitions),s.definitions=e;for(var r in e)t[r]=s},e.exports={CompoundExpression:s,varargs:function(t){return{type:t}}}},{"./evaluation_context":136,"./parsing_context":139,"./types":144,assert:11}],123:[function(t,e,r){"use strict";var i=t("../types"),n=i.toString,o=i.array,a=i.ValueType,s=i.StringType,l=i.NumberType,u=i.BooleanType,c=i.checkSubtype,p=t("../values").typeOf,h=t("../runtime_error"),f={string:s,number:l,boolean:u},d=function(t,e){this.type=t,this.input=e};d.parse=function(t,e){if(t.length<2||t.length>4)return e.error("Expected 1, 2, or 3 arguments, but found "+(t.length-1)+" instead.");var r,i;if(t.length>2){var n=t[1];if("string"!=typeof n||!(n in f))return e.error('The item type argument of "array" must be one of string, number, boolean',1);r=f[n]}else r=a;if(t.length>3){if("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);i=t[2]}var s=o(r,i),l=e.parse(t[t.length-1],t.length-1,a);return l?new d(s,l):null},d.prototype.evaluate=function(t){var e=this.input.evaluate(t);if(c(this.type,p(e)))throw new h("Expected value to be of type "+n(this.type)+", but found "+n(p(e))+" instead.");return e},d.prototype.eachChild=function(t){t(this.input)},e.exports=d},{"../runtime_error":141,"../types":144,"../values":145}],124:[function(t,e,r){"use strict";var i=t("assert"),n=t("../types"),o=n.ObjectType,a=n.ValueType,s=n.StringType,l=n.NumberType,u=n.BooleanType,c=t("../runtime_error"),p=t("../types"),h=p.checkSubtype,f=p.toString,d=t("../values").typeOf,m={string:s,number:l,boolean:u,object:o},y=function(t,e){this.type=t,this.args=e};y.parse=function(t,e){if(t.length<2)return e.error("Expected at least one argument.");var r=t[0];i(m[r],r);for(var n=m[r],o=[],s=1;s<t.length;s++){var l=e.parse(t[s],s,a);if(!l)return null;o.push(l)}return new y(n,o)},y.prototype.evaluate=function(t){for(var e=this,r=0;r<this.args.length;r++){var n=e.args[r].evaluate(t);if(!h(e.type,d(n)))return n;if(r===e.args.length-1)throw new c("Expected value to be of type "+f(e.type)+", but found "+f(d(n))+" instead.")}return i(!1),null},y.prototype.eachChild=function(t){this.args.forEach(t)},e.exports=y},{"../runtime_error":141,"../types":144,"../values":145,assert:11}],125:[function(t,e,r){"use strict";var i=t("../types"),n=i.array,o=i.ValueType,a=i.NumberType,s=t("../runtime_error"),l=function(t,e,r){this.type=t,this.index=e,this.input=r};l.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,a),i=e.parse(t[2],2,n(e.expectedType||o));if(!r||!i)return null;var s=i.type;return new l(s.itemType,r,i)},l.prototype.evaluate=function(t){var e=this.index.evaluate(t),r=this.input.evaluate(t);if(e<0||e>=r.length)throw new s("Array index out of bounds: "+e+" > "+r.length+".");if(e!==Math.floor(e))throw new s("Array index must be an integer, but found "+e+" instead.");return r[e]},l.prototype.eachChild=function(t){t(this.index),t(this.input)},e.exports=l},{"../runtime_error":141,"../types":144}],126:[function(t,e,r){"use strict";var i=t("assert"),n=t("../types").BooleanType,o=function(t,e,r){this.type=t,this.branches=e,this.otherwise=r};o.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 a=[],s=1;s<t.length-1;s+=2){var l=e.parse(t[s],s,n);if(!l)return null;var u=e.parse(t[s+1],s+1,r);if(!u)return null;a.push([l,u]),r=r||u.type}var c=e.parse(t[t.length-1],t.length-1,r);return c?(i(r),new o(r,a,c)):null},o.prototype.evaluate=function(t){for(var e=0,r=this.branches;e<r.length;e+=1){var i=r[e],n=i[0],o=i[1];if(n.evaluate(t))return o.evaluate(t)}return this.otherwise.evaluate(t)},o.prototype.eachChild=function(t){for(var e=0,r=this.branches;e<r.length;e+=1){var i=r[e],n=i[0],o=i[1];t(n),t(o)}t(this.otherwise)},e.exports=o},{"../types":144,assert:11}],127:[function(t,e,r){"use strict";var i=t("assert"),n=function(t,e){this.type=t,this.args=e};n.parse=function(t,e){if(t.length<2)return e.error("Expectected at least one argument.");var r=null;e.expectedType&&"value"!==e.expectedType.kind&&(r=e.expectedType);for(var o=[],a=0,s=t.slice(1);a<s.length;a+=1){var l=s[a],u=e.parse(l,1+o.length,r);if(!u)return null;r=r||u.type,o.push(u)}return i(r),new n(r,o)},n.prototype.evaluate=function(t){for(var e=null,r=0,i=this.args;r<i.length&&null===(e=i[r].evaluate(t));r+=1);return e},n.prototype.eachChild=function(t){this.args.forEach(t)},e.exports=n},{assert:11}],128:[function(t,e,r){"use strict";var i=t("assert"),n=t("../types"),o=n.ColorType,a=n.ValueType,s=n.NumberType,l=t("../values"),u=l.Color,c=l.validateRGBA,p=t("../runtime_error"),h={"to-number":s,"to-color":o},f=function(t,e){this.type=t,this.args=e};f.parse=function(t,e){if(t.length<2)return e.error("Expected at least one argument.");var r=t[0];i(h[r],r);for(var n=h[r],o=[],s=1;s<t.length;s++){var l=e.parse(t[s],s,a);if(!l)return null;o.push(l)}return new f(n,o)},f.prototype.evaluate=function(t){var e=this;if("color"===this.type.kind){for(var r,i,n=0,o=e.args;n<o.length;n+=1)if(r=o[n].evaluate(t),i=null,"string"==typeof r){var a=t.parseColor(r);if(a)return a}else if(Array.isArray(r)&&!(i=r.length<3||r.length>4?"Invalid rbga value "+JSON.stringify(r)+": expected an array containing either three or four numeric values.":c(r[0],r[1],r[2],r[3])))return new u(r[0]/255,r[1]/255,r[2]/255,r[3]);throw new p(i||"Could not parse color from value '"+("string"==typeof r?r:JSON.stringify(r))+"'")}for(var s=null,l=0,h=e.args;l<h.length;l+=1)if(null!==(s=h[l].evaluate(t))){var f=Number(s);if(!isNaN(f))return f}throw new p("Could not convert "+JSON.stringify(s)+" to number.")},f.prototype.eachChild=function(t){this.args.forEach(t)},e.exports=f},{"../runtime_error":141,"../types":144,"../values":145,assert:11}],129:[function(t,e,r){"use strict";function i(t,e){var r=e[0],i=e[1],n=e[2],o=e[3];r=r.evaluate(t),i=i.evaluate(t),n=n.evaluate(t),o=o&&o.evaluate(t);var a=E(r,i,n,o);if(a)throw new I(a);return new A(r/255,i/255,n/255,o)}function n(t,e){return t in e}function o(t,e){var r=e[t];return void 0===r?null:r}function a(t,e){return e[0].evaluate(t).length}function s(t,e){var r=e[0],i=e[1];return r.evaluate(t)===i.evaluate(t)}function l(t,e){var r=e[0],i=e[1];return r.evaluate(t)!==i.evaluate(t)}function u(t,e){var r=e[0],i=e[1];return r.evaluate(t)<i.evaluate(t)}function c(t,e){var r=e[0],i=e[1];return r.evaluate(t)>i.evaluate(t)}function p(t,e){var r=e[0],i=e[1];return r.evaluate(t)<=i.evaluate(t)}function h(t,e){var r=e[0],i=e[1];return r.evaluate(t)>=i.evaluate(t)}var f=t("../types"),d=f.NullType,m=f.NumberType,y=f.StringType,g=f.BooleanType,v=f.ColorType,_=f.ObjectType,x=f.ValueType,b=f.ErrorType,w=f.array,z=f.toString,T=t("../values"),S=T.typeOf,A=T.Color,E=T.validateRGBA,C=t("../compound_expression"),k=C.CompoundExpression,M=C.varargs,I=t("../runtime_error"),P=t("./let"),L=t("./var"),R=t("./literal"),D=t("./assertion"),B=t("./array"),O=t("./coercion"),F=t("./at"),j=t("./match"),V=t("./case"),N=t("./step"),U=t("./interpolate"),q={let:P,var:L,literal:R,string:D,number:D,boolean:D,object:D,array:B,"to-number":O,"to-color":O,at:F,case:V,match:j,coalesce:t("./coalesce"),step:N,interpolate:U};k.register(q,{error:[b,[y],function(t,e){var r=e[0];throw new I(r.evaluate(t))}],typeof:[y,[x],function(t,e){var r=e[0];return z(S(r.evaluate(t)))}],"to-string":[y,[x],function(t,e){var r=e[0],i=typeof(r=r.evaluate(t));return null===r||"string"===i||"number"===i||"boolean"===i?String(r):r instanceof A?"rgba("+255*r.r+","+255*r.g+","+255*r.b+","+r.a+")":JSON.stringify(r)}],"to-boolean":[g,[x],function(t,e){var r=e[0];return Boolean(r.evaluate(t))}],"to-rgba":[w(m,4),[v],function(t,e){var r=e[0].evaluate(t);return[r.r,r.g,r.b,r.a]}],rgb:[v,[m,m,m],i],rgba:[v,[m,m,m,m],i],length:{type:m,overloads:[[[y],a],[[w(x)],a]]},has:{type:g,overloads:[[[y],function(t,e){return n(e[0].evaluate(t),t.properties())}],[[y,_],function(t,e){var r=e[0],i=e[1];return n(r.evaluate(t),i.evaluate(t))}]]},get:{type:x,overloads:[[[y],function(t,e){return o(e[0].evaluate(t),t.properties())}],[[y,_],function(t,e){var r=e[0],i=e[1];return o(r.evaluate(t),i.evaluate(t))}]]},properties:[_,[],function(t){return t.properties()}],"geometry-type":[y,[],function(t){return t.geometryType()}],id:[x,[],function(t){return t.id()}],zoom:[m,[],function(t){return t.globals.zoom}],"heatmap-density":[m,[],function(t){return t.globals.heatmapDensity||0}],"+":[m,M(m),function(t,e){for(var r=0,i=0,n=e;i<n.length;i+=1)r+=n[i].evaluate(t);return r}],"*":[m,M(m),function(t,e){for(var r=1,i=0,n=e;i<n.length;i+=1)r*=n[i].evaluate(t);return r}],"-":{type:m,overloads:[[[m,m],function(t,e){var r=e[0],i=e[1];return r.evaluate(t)-i.evaluate(t)}],[[m],function(t,e){return-e[0].evaluate(t)}]]},"/":[m,[m,m],function(t,e){var r=e[0],i=e[1];return r.evaluate(t)/i.evaluate(t)}],"%":[m,[m,m],function(t,e){var r=e[0],i=e[1];return r.evaluate(t)%i.evaluate(t)}],ln2:[m,[],function(){return Math.LN2}],pi:[m,[],function(){return Math.PI}],e:[m,[],function(){return Math.E}],"^":[m,[m,m],function(t,e){var r=e[0],i=e[1];return Math.pow(r.evaluate(t),i.evaluate(t))}],sqrt:[m,[m],function(t,e){var r=e[0];return Math.sqrt(r.evaluate(t))}],log10:[m,[m],function(t,e){var r=e[0];return Math.log10(r.evaluate(t))}],ln:[m,[m],function(t,e){var r=e[0];return Math.log(r.evaluate(t))}],log2:[m,[m],function(t,e){var r=e[0];return Math.log2(r.evaluate(t))}],sin:[m,[m],function(t,e){var r=e[0];return Math.sin(r.evaluate(t))}],cos:[m,[m],function(t,e){var r=e[0];return Math.cos(r.evaluate(t))}],tan:[m,[m],function(t,e){var r=e[0];return Math.tan(r.evaluate(t))}],asin:[m,[m],function(t,e){var r=e[0];return Math.asin(r.evaluate(t))}],acos:[m,[m],function(t,e){var r=e[0];return Math.acos(r.evaluate(t))}],atan:[m,[m],function(t,e){var r=e[0];return Math.atan(r.evaluate(t))}],min:[m,M(m),function(t,e){return Math.min.apply(Math,e.map(function(e){return e.evaluate(t)}))}],max:[m,M(m),function(t,e){return Math.max.apply(Math,e.map(function(e){return e.evaluate(t)}))}],"==":{type:g,overloads:[[[m,m],s],[[y,y],s],[[g,g],s],[[d,d],s]]},"!=":{type:g,overloads:[[[m,m],l],[[y,y],l],[[g,g],l],[[d,d],l]]},">":{type:g,overloads:[[[m,m],c],[[y,y],c]]},"<":{type:g,overloads:[[[m,m],u],[[y,y],u]]},">=":{type:g,overloads:[[[m,m],h],[[y,y],h]]},"<=":{type:g,overloads:[[[m,m],p],[[y,y],p]]},all:{type:g,overloads:[[[g,g],function(t,e){var r=e[0],i=e[1];return r.evaluate(t)&&i.evaluate(t)}],[M(g),function(t,e){for(var r=0,i=e;r<i.length;r+=1)if(!i[r].evaluate(t))return!1;return!0}]]},any:{type:g,overloads:[[[g,g],function(t,e){var r=e[0],i=e[1];return r.evaluate(t)||i.evaluate(t)}],[M(g),function(t,e){for(var r=0,i=e;r<i.length;r+=1)if(i[r].evaluate(t))return!0;return!1}]]},"!":[g,[g],function(t,e){return!e[0].evaluate(t)}],upcase:[y,[y],function(t,e){return e[0].evaluate(t).toUpperCase()}],downcase:[y,[y],function(t,e){return e[0].evaluate(t).toLowerCase()}],concat:[y,M(y),function(t,e){return e.map(function(e){return e.evaluate(t)}).join("")}]}),e.exports=q},{"../compound_expression":122,"../runtime_error":141,"../types":144,"../values":145,"./array":123,"./assertion":124,"./at":125,"./case":126,"./coalesce":127,"./coercion":128,"./interpolate":130,"./let":131,"./literal":132,"./match":133,"./step":134,"./var":135}],130:[function(t,e,r){"use strict";function i(t,e,r,i){var n=i-r,o=t-r;return 0===n?0:1===e?o/n:(Math.pow(e,o)-1)/(Math.pow(e,n)-1)}var n=t("@mapbox/unitbezier"),o=t("../../util/interpolate"),a=t("../types"),s=a.toString,l=a.NumberType,u=t("../stops").findStopLessThanOrEqualTo,c=function(t,e,r,i){var n=this;this.type=t,this.interpolation=e,this.input=r,this.labels=[],this.outputs=[];for(var o=0,a=i;o<a.length;o+=1){var s=a[o],l=s[0],u=s[1];n.labels.push(l),n.outputs.push(u)}};c.interpolationFactor=function(t,e,r,o){var a=0;if("exponential"===t.name)a=i(e,t.base,r,o);else if("linear"===t.name)a=i(e,1,r,o);else if("cubic-bezier"===t.name){var s=t.controlPoints;a=new n(s[0],s[1],s[2],s[3]).solve(i(e,1,r,o))}return a},c.parse=function(t,e){var r=t[1],i=t[2],n=t.slice(3);if(!Array.isArray(r)||0===r.length)return e.error("Expected an interpolation type expression.",1);if("linear"===r[0])r={name:"linear"};else if("exponential"===r[0]){var o=r[1];if("number"!=typeof o)return e.error("Exponential interpolation requires a numeric base.",1,1);r={name:"exponential",base:o}}else{if("cubic-bezier"!==r[0])return e.error("Unknown interpolation type "+String(r[0]),1,0);var a=r.slice(1);if(4!==a.length||a.some(function(t){return"number"!=typeof t||t<0||t>1}))return e.error("Cubic bezier interpolation requires four numeric arguments with values between 0 and 1.",1);r={name:"cubic-bezier",controlPoints:a}}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,l)))return null;var u=[],p=null;e.expectedType&&"value"!==e.expectedType.kind&&(p=e.expectedType);for(var h=0;h<n.length;h+=2){var f=n[h],d=n[h+1],m=h+3,y=h+4;if("number"!=typeof f)return e.error('Input/output pairs for "interpolate" expressions must be defined using literal numeric values (not computed expressions) for the input values.',m);if(u.length&&u[u.length-1][0]>=f)return e.error('Input/output pairs for "interpolate" expressions must be arranged with input values in strictly ascending order.',m);var g=e.parse(d,y,p);if(!g)return null;p=p||g.type,u.push([f,g])}return"number"===p.kind||"color"===p.kind||"array"===p.kind&&"number"===p.itemType.kind&&"number"==typeof p.N?new c(p,r,i,u):e.error("Type "+s(p)+" is not interpolatable.")},c.prototype.evaluate=function(t){var e=this.labels,r=this.outputs;if(1===e.length)return r[0].evaluate(t);var i=this.input.evaluate(t);if(i<=e[0])return r[0].evaluate(t);var n=e.length;if(i>=e[n-1])return r[n-1].evaluate(t);var a=u(e,i),s=e[a],l=e[a+1],p=c.interpolationFactor(this.interpolation,i,s,l),h=r[a].evaluate(t),f=r[a+1].evaluate(t);return o[this.type.kind.toLowerCase()](h,f,p)},c.prototype.eachChild=function(t){var e=this;t(this.input);for(var r=0,i=e.outputs;r<i.length;r+=1)t(i[r])},e.exports=c},{"../../util/interpolate":155,"../stops":143,"../types":144,"@mapbox/unitbezier":5}],131:[function(t,e,r){"use strict";var i=function(t,e){this.type=e.type,this.bindings=[].concat(t),this.result=e};i.prototype.evaluate=function(t){t.pushScope(this.bindings);var e=this.result.evaluate(t);return t.popScope(),e},i.prototype.eachChild=function(t){for(var e=0,r=this.bindings;e<r.length;e+=1)t(r[e][1]);t(this.result)},i.parse=function(t,e){if(t.length<4)return e.error("Expected at least 3 arguments, but found "+(t.length-1)+" instead.");for(var r=[],n=1;n<t.length-1;n+=2){var o=t[n];if("string"!=typeof o)return e.error("Expected string, but found "+typeof o+" instead.",n);if(/[^a-zA-Z0-9_]/.test(o))return e.error("Variable names must contain only alphanumeric characters or '_'.",n);var a=e.parse(t[n+1],n+1);if(!a)return null;r.push([o,a])}var s=e.parse(t[t.length-1],t.length-1,void 0,r);return s?new i(r,s):null},e.exports=i},{}],132:[function(t,e,r){"use strict";var i=t("../values"),n=i.isValue,o=i.typeOf,a=function(t,e){this.type=t,this.value=e};a.parse=function(t,e){if(2!==t.length)return e.error("'literal' expression requires exactly one argument, but found "+(t.length-1)+" instead.");if(!n(t[1]))return e.error("invalid value");var r=t[1],i=o(r),s=e.expectedType;return"array"!==i.kind||0!==i.N||!s||"array"!==s.kind||"number"==typeof s.N&&0!==s.N||(i=s),new a(i,r)},a.prototype.evaluate=function(){return this.value},a.prototype.eachChild=function(){},e.exports=a},{"../values":145}],133:[function(t,e,r){"use strict";var i=t("assert"),n=t("../values").typeOf,o=function(t,e,r,i,n,o){this.inputType=t,this.type=e,this.input=r,this.cases=i,this.outputs=n,this.otherwise=o};o.parse=function(t,e){if(t.length<5)return e.error("Expected at least 4 arguments, but found only "+(t.length-1)+".");if(t.length%2!=1)return e.error("Expected an even number of arguments.");var r,a;e.expectedType&&"value"!==e.expectedType.kind&&(a=e.expectedType);for(var s={},l=[],u=2;u<t.length-1;u+=2){var c=t[u],p=t[u+1];Array.isArray(c)||(c=[c]);var h=e.concat(u);if(0===c.length)return h.error("Expected at least one branch label.");for(var f=0,d=c;f<d.length;f+=1){var m=d[f];if("number"!=typeof m&&"string"!=typeof m)return h.error("Branch labels must be numbers or strings.");if("number"==typeof m&&Math.abs(m)>Number.MAX_SAFE_INTEGER)return h.error("Branch labels must be integers no larger than "+Number.MAX_SAFE_INTEGER+".");if("number"==typeof m&&Math.floor(m)!==m)return h.error("Numeric branch labels must be integer values.");if(r){if(h.checkSubtype(r,n(m)))return null}else r=n(m);if(void 0!==s[String(m)])return h.error("Branch labels must be unique.");s[String(m)]=l.length}var y=e.parse(p,u,a);if(!y)return null;a=a||y.type,l.push(y)}var g=e.parse(t[1],1,r);if(!g)return null;var v=e.parse(t[t.length-1],t.length-1,a);return v?(i(r&&a),new o(r,a,g,s,l,v)):null},o.prototype.evaluate=function(t){var e=this.input.evaluate(t);return(this.outputs[this.cases[e]]||this.otherwise).evaluate(t)},o.prototype.eachChild=function(t){t(this.input),this.outputs.forEach(t),t(this.otherwise)},e.exports=o},{"../values":145,assert:11}],134:[function(t,e,r){"use strict";var i=t("../types").NumberType,n=t("../stops").findStopLessThanOrEqualTo,o=function(t,e,r){var i=this;this.type=t,this.input=e,this.labels=[],this.outputs=[];for(var n=0,o=r;n<o.length;n+=1){var a=o[n],s=a[0],l=a[1];i.labels.push(s),i.outputs.push(l)}};o.parse=function(t,e){var r=t[1],n=t.slice(2);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(!(r=e.parse(r,1,i)))return null;var a=[],s=null;e.expectedType&&"value"!==e.expectedType.kind&&(s=e.expectedType),n.unshift(-1/0);for(var l=0;l<n.length;l+=2){var u=n[l],c=n[l+1],p=l+1,h=l+2;if("number"!=typeof u)return e.error('Input/output pairs for "step" expressions must be defined using literal numeric values (not computed expressions) for the input values.',p);if(a.length&&a[a.length-1][0]>=u)return e.error('Input/output pairs for "step" expressions must be arranged with input values in strictly ascending order.',p);var f=e.parse(c,h,s);if(!f)return null;s=s||f.type,a.push([u,f])}return new o(s,r,a)},o.prototype.evaluate=function(t){var e=this.labels,r=this.outputs;if(1===e.length)return r[0].evaluate(t);var i=this.input.evaluate(t);if(i<=e[0])return r[0].evaluate(t);var o=e.length;return i>=e[o-1]?r[o-1].evaluate(t):r[n(e,i)].evaluate(t)},o.prototype.eachChild=function(t){var e=this;t(this.input);for(var r=0,i=e.outputs;r<i.length;r+=1)t(i[r])},e.exports=o},{"../stops":143,"../types":144}],135:[function(t,e,r){"use strict";var i=function(t,e){this.type=e,this.name=t};i.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 i(r,e.scope.get(r).type):e.error('Unknown variable "'+r+'". Make sure "'+r+'" has been bound in an enclosing "let" expression before using it.',1)},i.prototype.evaluate=function(t){return t.scope.get(this.name).evaluate(t)},i.prototype.eachChild=function(){},e.exports=i},{}],136:[function(t,e,r){"use strict";var i=t("assert"),n=t("./scope"),o=t("./values").Color,a=["Unknown","Point","LineString","Polygon"],s=function(){this.scope=new n,this._parseColorCache={}};s.prototype.id=function(){return this.feature&&"id"in this.feature?this.feature.id:null},s.prototype.geometryType=function(){return this.feature?"number"==typeof this.feature.type?a[this.feature.type]:this.feature.type:null},s.prototype.properties=function(){return this.feature&&this.feature.properties||{}},s.prototype.pushScope=function(t){this.scope=this.scope.concat(t)},s.prototype.popScope=function(){i(this.scope.parent),this.scope=this.scope.parent},s.prototype.parseColor=function(t){var e=this._parseColorCache[t];return e||(e=this._parseColorCache[t]=o.parse(t)),e},e.exports=s},{"./scope":142,"./values":145,assert:11}],137:[function(t,e,r){"use strict";function i(t){return Array.isArray(t)&&t.length>0&&"string"==typeof t[0]&&t[0]in v}function n(t,e,r){void 0===r&&(r={});var i=new p(v,[],s(e)),n=i.parse(t);if(!n)return u(i.errors.length>0),z(i.errors);var o,a=new h;if(!1===r.handleErrors)o=function(t,e){return a.globals=t,a.feature=e,n.evaluate(a)};else{var c,f={},d=l(e);"enum"===e.type&&(c=e.values),o=function(t,e){a.globals=t,a.feature=e;try{var r=n.evaluate(a);if(null===r||void 0===r)return d;if(c&&!(r in c))throw new x("Expected value to be one of "+Object.keys(c).map(function(t){return JSON.stringify(t)}).join(", ")+", but found "+JSON.stringify(r)+" instead.");return r}catch(t){return f[t.message]||(f[t.message]=!0,"undefined"!=typeof console&&console.warn(t.message)),d}}}return w({evaluate:o,parsed:n})}function o(t,e,r){if(void 0===r&&(r={}),"error"===(t=n(t,e,r)).result)return t;var i=t.value,o=i.evaluate,s=i.parsed,l=_.isFeatureConstant(s);if(!l&&!e["property-function"])return z([new c("","property expressions not supported")]);var u=_.isGlobalPropertyConstant(s,["zoom"]);if(!u&&!1===e["zoom-function"])return z([new c("","zoom expressions not supported")]);var p=a(s);if(!p&&!u)return z([new c("",'"zoom" expression may only be used as input to a top-level "step" or "interpolate" expression.')]);if(p instanceof c)return z([p]);if(p instanceof m&&"piecewise-constant"===e.function)return z([new c("",'"interpolate" expressions cannot be used with this property')]);if(!p)return w(l?{kind:"constant",parsed:s,evaluate:o}:{kind:"source",parsed:s,evaluate:o});var h=p instanceof m?m.interpolationFactor.bind(void 0,p.interpolation):function(){return 0},f=p.labels;return w(l?{kind:"camera",parsed:s,evaluate:o,interpolationFactor:h,zoomStops:f}:{kind:"composite",parsed:s,evaluate:o,interpolationFactor:h,zoomStops:f})}function a(t){var e=null;if(t instanceof g)e=a(t.result);else if(t instanceof y)for(var r=0,i=t.args;r<i.length;r+=1){var n=i[r];if(e=a(n))break}else(t instanceof d||t instanceof m)&&t.input instanceof f&&"zoom"===t.input.name&&(e=t);return e instanceof c?e:(t.eachChild(function(t){var r=a(t);r instanceof c?e=r:!e&&r?e=new c("",'"zoom" expression may only be used as input to a top-level "step" or "interpolate" expression.'):e&&r&&e!==r&&(e=new c("",'Only one zoom-based "step" or "interpolate" subexpression may be used in an expression.'))}),e)}function s(t){var e={color:k,string:M,number:I,enum:M,boolean:P};return"array"===t.type?R(e[t.value]||L,t.length):e[t.type]||null}function l(t){return"color"===t.type&&S(t.default)?new E(0,0,0,0):"color"===t.type?E.parse(t.default)||null:void 0===t.default?null:t.default}var u=t("assert"),c=t("./parsing_error"),p=t("./parsing_context"),h=t("./evaluation_context"),f=t("./compound_expression").CompoundExpression,d=t("./definitions/step"),m=t("./definitions/interpolate"),y=t("./definitions/coalesce"),g=t("./definitions/let"),v=t("./definitions"),_=t("./is_constant"),x=t("./runtime_error"),b=t("../util/result"),w=b.success,z=b.error,T=t("../function"),S=T.isFunction,A=T.createFunction,E=t("./values").Color;e.exports={isExpression:i,createExpression:n,createPropertyExpression:o,normalizePropertyExpression:function(t,e){if(S(t))return A(t,e);if(i(t)){var r=o(t,e);if("error"===r.result)throw new Error(r.value.map(function(t){return t.key+": "+t.message}).join(", "));return r.value}var n=t;return"string"==typeof t&&"color"===e.type&&(n=E.parse(t)),{kind:"constant",evaluate:function(){return n}}}};var C=t("./types"),k=C.ColorType,M=C.StringType,I=C.NumberType,P=C.BooleanType,L=C.ValueType,R=C.array},{"../function":147,"../util/result":157,"./compound_expression":122,"./definitions":129,"./definitions/coalesce":127,"./definitions/interpolate":130,"./definitions/let":131,"./definitions/step":134,"./evaluation_context":136,"./is_constant":138,"./parsing_context":139,"./parsing_error":140,"./runtime_error":141,"./types":144,"./values":145,assert:11}],138:[function(t,e,r){"use strict";function i(t){if(t instanceof o){if("get"===t.name&&1===t.args.length)return!1;if("has"===t.name&&1===t.args.length)return!1;if("properties"===t.name||"geometry-type"===t.name||"id"===t.name)return!1}var e=!0;return t.eachChild(function(t){e&&!i(t)&&(e=!1)}),e}function n(t,e){if(t instanceof o&&e.indexOf(t.name)>=0)return!1;var r=!0;return t.eachChild(function(t){r&&!n(t,e)&&(r=!1)}),r}var o=t("./compound_expression").CompoundExpression;e.exports={isFeatureConstant:i,isGlobalPropertyConstant:n}},{"./compound_expression":122}],139:[function(t,e,r){"use strict";function i(e){var r=t("./compound_expression").CompoundExpression,i=t("./is_constant"),n=i.isGlobalPropertyConstant,o=i.isFeatureConstant;if(e instanceof t("./definitions/var"))return!1;if(e instanceof r&&"error"===e.name)return!1;var a=!0;return e.eachChild(function(t){t instanceof s||(a=!1)}),!!a&&(o(e)&&n(e,["zoom","heatmap-density"]))}var n=t("./scope"),o=t("./types").checkSubtype,a=t("./parsing_error"),s=t("./definitions/literal"),l=function(t,e,r,i,o){void 0===e&&(e=[]),void 0===i&&(i=new n),void 0===o&&(o=[]),this.definitions=t,this.path=e,this.key=e.map(function(t){return"["+t+"]"}).join(""),this.scope=i,this.errors=o,this.expectedType=r};l.prototype.parse=function(e,r,n,o){var a=this;if(r&&(a=a.concat(r,n,o)),null!==e&&"string"!=typeof e&&"boolean"!=typeof e&&"number"!=typeof e||(e=["literal",e]),Array.isArray(e)){if(0===e.length)return a.error('Expected an array with at least one element. If you wanted a literal array, use ["literal", []].');var l=e[0];if("string"!=typeof l)return a.error("Expression name must be a string, but found "+typeof l+' instead. If you wanted a literal array, use ["literal", [...]].',0),null;var u=a.definitions[l];if(u){var c=u.parse(e,a);if(!c)return null;var p=a.expectedType,h=c.type;if(p&&(("string"===p.kind||"number"===p.kind||"boolean"===p.kind)&&"value"===h.kind?c=new(t("./definitions/assertion"))(p,[c]):"color"!==p.kind||"value"!==h.kind&&"string"!==h.kind||(c=new(t("./definitions/coercion"))(p,[c])),a.checkSubtype(p,c.type)))return null;if(!(c instanceof s)&&i(c)){var f=new(t("./evaluation_context"));try{c=new s(c.type,c.evaluate(f))}catch(t){return a.error(t.message),null}}return c}return a.error('Unknown expression "'+l+'". If you wanted a literal array, use ["literal", [...]].',0)}return void 0===e?a.error("'undefined' value invalid. Use null instead."):"object"==typeof e?a.error('Bare objects invalid. Use ["literal", {...}] instead.'):a.error("Expected an array, but found "+typeof e+" instead.")},l.prototype.concat=function(t,e,r){var i="number"==typeof t?this.path.concat(t):this.path,n=r?this.scope.concat(r):this.scope;return new l(this.definitions,i,e||null,n,this.errors)},l.prototype.error=function(t){for(var e=[],r=arguments.length-1;r-- >0;)e[r]=arguments[r+1];var i=""+this.key+e.map(function(t){return"["+t+"]"}).join("");this.errors.push(new a(i,t))},l.prototype.checkSubtype=function(t,e){var r=o(t,e);return r&&this.error(r),r},e.exports=l},{"./compound_expression":122,"./definitions/assertion":124,"./definitions/coercion":128,"./definitions/literal":132,"./definitions/var":135,"./evaluation_context":136,"./is_constant":138,"./parsing_error":140,"./scope":142,"./types":144}],140:[function(t,e,r){"use strict";var i=function(t){function e(e,r){t.call(this,r),this.message=r,this.key=e}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e}(Error);e.exports=i},{}],141:[function(t,e,r){"use strict";var i=function(t){this.name="ExpressionEvaluationError",this.message=t};i.prototype.toJSON=function(){return this.message},e.exports=i},{}],142:[function(t,e,r){"use strict";var i=function(t,e){var r=this;void 0===e&&(e=[]),this.parent=t,this.bindings={};for(var i=0,n=e;i<n.length;i+=1){var o=n[i],a=o[0],s=o[1];r.bindings[a]=s}};i.prototype.concat=function(t){return new i(this,t)},i.prototype.get=function(t){if(this.bindings[t])return this.bindings[t];if(this.parent)return this.parent.get(t);throw new Error(t+" not found in scope.")},i.prototype.has=function(t){return!!this.bindings[t]||!!this.parent&&this.parent.has(t)},e.exports=i},{}],143:[function(t,e,r){"use strict";e.exports={findStopLessThanOrEqualTo:function(t,e){for(var r,i,n=0,o=t.length-1,a=0;n<=o;){if(a=Math.floor((n+o)/2),r=t[a],i=t[a+1],e===r||e>r&&e<i)return a;r<e?n=a+1:r>e&&(o=a-1)}return Math.max(a-1,0)}}},{}],144:[function(t,e,r){"use strict";function i(t,e){return{kind:"array",itemType:t,N:e}}function n(t){if("array"===t.kind){var e=n(t.itemType);return"number"==typeof t.N?"array<"+e+", "+t.N+">":"value"===t.itemType.kind?"array":"array<"+e+">"}return t.kind}function o(t,e){if("error"===e.kind)return null;if("array"===t.kind){if("array"===e.kind&&!o(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,i=d;r<i.length;r+=1)if(!o(i[r],e))return null}return"Expected "+n(t)+" but found "+n(e)+" instead."}var a={kind:"null"},s={kind:"number"},l={kind:"string"},u={kind:"boolean"},c={kind:"color"},p={kind:"object"},h={kind:"value"},f={kind:"error"},d=[a,s,l,u,c,p,i(h)];e.exports={NullType:a,NumberType:s,StringType:l,BooleanType:u,ColorType:c,ObjectType:p,ValueType:h,array:i,ErrorType:f,toString:n,checkSubtype:o}},{}],145:[function(t,e,r){"use strict";function i(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 a)return!0;if(Array.isArray(t)){for(var e=0,r=t;e<r.length;e+=1)if(!i(r[e]))return!1;return!0}if("object"==typeof t){for(var n in t)if(!i(t[n]))return!1;return!0}return!1}function n(t){if(null===t)return l;if("string"==typeof t)return c;if("boolean"==typeof t)return p;if("number"==typeof t)return u;if(t instanceof a)return h;if(Array.isArray(t)){for(var e,r=t.length,i=0,s=t;i<s.length;i+=1){var y=n(s[i]);if(e){if(e===y)continue;e=d;break}e=y}return m(e||d,r)}return o("object"==typeof t),f}var o=t("assert"),a=t("../util/color"),s=t("./types"),l=s.NullType,u=s.NumberType,c=s.StringType,p=s.BooleanType,h=s.ColorType,f=s.ObjectType,d=s.ValueType,m=s.array;e.exports={Color:a,validateRGBA:function(t,e,r,i){return"number"==typeof t&&t>=0&&t<=255&&"number"==typeof e&&e>=0&&e<=255&&"number"==typeof r&&r>=0&&r<=255?void 0===i||"number"==typeof i&&i>=0&&i<=1?null:"Invalid rgba value ["+[t,e,r,i].join(", ")+"]: 'a' must be between 0 and 1.":"Invalid rgba value ["+("number"==typeof i?[t,e,r,i]:[t,e,r]).join(", ")+"]: 'r', 'g', and 'b' must be between 0 and 255."},isValue:i,typeOf:n}},{"../util/color":151,"./types":144,assert:11}],146:[function(t,e,r){"use strict";function i(t){if(!Array.isArray(t)||0===t.length)return!1;switch(t[0]){case"has":return t.length>=2&&"$id"!==t[1]&&"$type"!==t[1];case"in":case"!in":case"!has":case"none":return!1;case"==":case"!=":case">":case">=":case"<":case"<=":return 3===t.length&&(Array.isArray(t[1])||Array.isArray(t[2]));case"any":case"all":for(var e=0,r=t.slice(1);e<r.length;e+=1){var n=r[e];if(!i(n)&&"boolean"!=typeof n)return!1}return!0;default:return!0}}function n(t){if(!t)return"true";var e=t[0];return t.length<=1?"any"===e?"false":"true":"("+("=="===e?a(t[1],t[2],"===",!1):"!="===e?a(t[1],t[2],"!==",!1):"<"===e||">"===e||"<="===e||">="===e?a(t[1],t[2],e,!0):"any"===e?s(t.slice(1),"||"):"all"===e?s(t.slice(1),"&&"):"none"===e?c(s(t.slice(1),"||")):"in"===e?l(t[1],t.slice(2)):"!in"===e?c(l(t[1],t.slice(2))):"has"===e?u(t[1]):"!has"===e?c(u(t[1])):"true")+")"}function o(t){return"$type"===t?"f.type":"$id"===t?"f.id":"p["+JSON.stringify(t)+"]"}function a(t,e,r,i){var n=o(t),a="$type"===t?f.indexOf(e):JSON.stringify(e);return(i?"typeof "+n+"=== typeof "+a+"&&":"")+n+r+a}function s(t,e){return t.map(n).join(e)}function l(t,e){"$type"===t&&(e=e.map(function(t){return f.indexOf(t)}));var r=JSON.stringify(e.sort(p)),i=o(t);return e.length<=200?r+".indexOf("+i+") !== -1":"function(v, a, i, j) {while (i <= j) { var m = (i + j) >> 1; if (a[m] === v) return true; if (a[m] > v) j = m - 1; else i = m + 1;}return false; }("+i+", "+r+",0,"+(e.length-1)+")"}function u(t){return"$id"===t?'"id" in f':JSON.stringify(t)+" in p"}function c(t){return"!("+t+")"}function p(t,e){return t<e?-1:t>e?1:0}var h=t("../expression").createExpression;e.exports=function(t){if(!t)return function(){return!0};if(!i(t))return new Function("g","f","var p = (f && f.properties || {}); return "+n(t));var e=h(t,d);if("error"===e.result)throw new Error(e.value.map(function(t){return t.key+": "+t.message}).join(", "));return e.value.evaluate},e.exports.isExpressionFilter=i;var f=["Unknown","Point","LineString","Polygon"],d={type:"boolean",default:!1,function:!0,"property-function":!0,"zoom-function":!0}},{"../expression":137}],147:[function(t,e,r){"use strict";function i(t){return t}function n(t,e){var r="color"===e.type,c=t.stops&&"object"==typeof t.stops[0][0],p=c||void 0!==t.property,m=c||!p,y=t.type||("interpolated"===e.function?"exponential":"interval");r&&((t=d({},t)).stops&&(t.stops=t.stops.map(function(t){return[t[0],f.parse(t[1])]})),t.default?t.default=f.parse(t.default):t.default=f.parse(e.default));var v,_,x;if("exponential"===y)v=l;else if("interval"===y)v=s;else if("categorical"===y){v=a,_=Object.create(null);for(var b=0,w=t.stops;b<w.length;b+=1){var z=w[b];_[z[0]]=z[1]}x=typeof t.stops[0][0]}else{if("identity"!==y)throw new Error('Unknown function type "'+y+'"');v=u}var T;if(t.colorSpace&&"rgb"!==t.colorSpace){if(!h[t.colorSpace])throw new Error("Unknown color space: "+t.colorSpace);var S=h[t.colorSpace];t=JSON.parse(JSON.stringify(t));for(var A=0;A<t.stops.length;A++)t.stops[A]=[t.stops[A][0],S.forward(t.stops[A][1])];T=S.reverse}else T=i;if(c){for(var E={},C=[],k=0;k<t.stops.length;k++){var M=t.stops[k],I=M[0].zoom;void 0===E[I]&&(E[I]={zoom:I,type:t.type,property:t.property,default:t.default,stops:[]},C.push(I)),E[I].stops.push([M[0].value,M[1]])}for(var P=[],L=0,R=C;L<R.length;L+=1){var D=R[L];P.push([E[D].zoom,n(E[D],e)])}return{kind:"composite",interpolationFactor:g.interpolationFactor.bind(void 0,{name:"linear"}),zoomStops:P.map(function(t){return t[0]}),evaluate:function(r,i){var n=r.zoom;return T(l({stops:P,base:t.base},e,n).evaluate(n,i))}}}return m?{kind:"camera",interpolationFactor:"exponential"===y?g.interpolationFactor.bind(void 0,{name:"exponential",base:void 0!==t.base?t.base:1}):function(){return 0},zoomStops:t.stops.map(function(t){return t[0]}),evaluate:function(r){var i=r.zoom;return T(v(t,e,i,_,x))}}:{kind:"source",evaluate:function(r,i){var n=i&&i.properties?i.properties[t.property]:void 0;return void 0===n?o(t.default,e.default):T(v(t,e,n,_,x))}}}function o(t,e,r){return void 0!==t?t:void 0!==e?e:void 0!==r?r:void 0}function a(t,e,r,i,n){return o(typeof r===n?i[r]:void 0,t.default,e.default)}function s(t,e,r){if("number"!==m(r))return o(t.default,e.default);var i=t.stops.length;if(1===i)return t.stops[0][1];if(r<=t.stops[0][0])return t.stops[0][1];if(r>=t.stops[i-1][0])return t.stops[i-1][1];var n=c(t.stops,r);return t.stops[n][1]}function l(t,e,r){var n=void 0!==t.base?t.base:1;if("number"!==m(r))return o(t.default,e.default);var a=t.stops.length;if(1===a)return t.stops[0][1];if(r<=t.stops[0][0])return t.stops[0][1];if(r>=t.stops[a-1][0])return t.stops[a-1][1];var s=c(t.stops,r),l=p(r,n,t.stops[s][0],t.stops[s+1][0]),u=t.stops[s][1],h=t.stops[s+1][1],f=y[e.type]||i;return"function"==typeof u.evaluate?{evaluate:function(){for(var t=[],e=arguments.length;e--;)t[e]=arguments[e];var r=u.evaluate.apply(void 0,t),i=h.evaluate.apply(void 0,t);if(void 0!==r&&void 0!==i)return f(r,i,l)}}:f(u,h,l)}function u(t,e,r){return"color"===e.type?r=f.parse(r):m(r)===e.type||"enum"===e.type&&e.values[r]||(r=void 0),o(r,t.default,e.default)}function c(t,e){for(var r,i,n=0,o=t.length-1,a=0;n<=o;){if(a=Math.floor((n+o)/2),r=t[a][0],i=t[a+1][0],e===r||e>r&&e<i)return a;r<e?n=a+1:r>e&&(o=a-1)}return Math.max(a-1,0)}function p(t,e,r,i){var n=i-r,o=t-r;return 0===n?0:1===e?o/n:(Math.pow(e,o)-1)/(Math.pow(e,n)-1)}var h=t("../util/color_spaces"),f=t("../util/color"),d=t("../util/extend"),m=t("../util/get_type"),y=t("../util/interpolate"),g=t("../expression/definitions/interpolate");e.exports={createFunction:n,isFunction:function(t){return"object"==typeof t&&null!==t&&!Array.isArray(t)}}},{"../expression/definitions/interpolate":130,"../util/color":151,"../util/color_spaces":152,"../util/extend":153,"../util/get_type":154,"../util/interpolate":155}],148:[function(t,e,r){"use strict";function i(t){var e=typeof t;if("number"===e||"boolean"===e||"string"===e||void 0===t||null===t)return JSON.stringify(t);if(Array.isArray(t)){for(var r="[",n=0,o=t;n<o.length;n+=1)r+=i(o[n])+",";return r+"]"}for(var a=Object.keys(t).sort(),s="{",l=0;l<a.length;l++)s+=JSON.stringify(a[l])+":"+i(t[a[l]])+",";return s+"}"}function n(t){for(var e="",r=0,n=o;r<n.length;r+=1)e+="/"+i(t[n[r]]);return e}var o=t("./util/ref_properties");e.exports=function(t){for(var e={},r=0;r<t.length;r++){var i=n(t[r]),o=e[i];o||(o=e[i]=[]),o.push(t[r])}var a=[];for(var s in e)a.push(e[s]);return a}},{"./util/ref_properties":156}],149:[function(t,e,r){"use strict";e.exports=t("./v8.json")},{"./v8.json":150}],150:[function(t,e,r){e.exports={$version:8,$root:{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"}},sources:{"*":{type:"source"}},source:["source_vector","source_raster","source_geojson","source_video","source_image","source_canvas"],source_vector:{type:{required:!0,type:"enum",values:{vector:{}}},url:{type:"string"},tiles:{type:"array",value:"string"},bounds:{type:"array",value:"number",length:4,default:[-180,-85.0511,180,85.0511]},minzoom:{type:"number",default:0},maxzoom:{type:"number",default:22},attribution:{type:"string"},"*":{type:"*"}},source_raster:{type:{required:!0,type:"enum",values:{raster:{}}},url:{type:"string"},tiles:{type:"array",value:"string"},bounds:{type:"array",value:"number",length:4,default:[-180,-85.0511,180,85.0511]},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:"*"}},source_geojson:{type:{required:!0,type:"enum",values:{geojson:{}}},data:{type:"*"},maxzoom:{type:"number",default:18},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"},aggregateBy:{type:"string"}},source_video:{type:{required:!0,type:"enum",values:{video:{}}},urls:{required:!0,type:"array",value:"string"},coordinates:{required:!0,type:"array",length:4,value:{type:"array",length:2,value:"number"}}},source_image:{type:{required:!0,type:"enum",values:{image:{}}},url:{required:!0,type:"string"},coordinates:{required:!0,type:"array",length:4,value:{type:"array",length:2,value:"number"}}},source_canvas:{type:{required:!0,type:"enum",values:{canvas:{}}},coordinates:{required:!0,type:"array",length:4,value:{type:"array",length:2,value:"number"}},animate:{type:"boolean",default:"true"},canvas:{type:"string",required:!0}},layer:{id:{type:"string",required:!0},type:{type:"enum",values:{fill:{},line:{},symbol:{},circle:{},heatmap:{},"fill-extrusion":{},raster:{},background:{}}},metadata:{type:"*"},source:{type:"string"},"source-layer":{type:"string"},minzoom:{type:"number",minimum:0,maximum:24},maxzoom:{type:"number",minimum:0,maximum:24},filter:{type:"filter"},layout:{type:"layout"},paint:{type:"paint"}},layout:["layout_fill","layout_line","layout_circle","layout_heatmap","layout_fill-extrusion","layout_symbol","layout_raster","layout_background"],layout_background:{visibility:{type:"enum",values:{visible:{},none:{}},default:"visible"}},layout_fill:{visibility:{type:"enum",values:{visible:{},none:{}},default:"visible"}},layout_circle:{visibility:{type:"enum",values:{visible:{},none:{}},default:"visible"}},layout_heatmap:{visibility:{type:"enum",values:{visible:{},none:{}},default:"visible"}},"layout_fill-extrusion":{visibility:{type:"enum",values:{visible:{},none:{}},default:"visible"}},layout_line:{"line-cap":{type:"enum",function:"piecewise-constant","zoom-function":!0,values:{butt:{},round:{},square:{}},default:"butt"},"line-join":{type:"enum",function:"piecewise-constant","zoom-function":!0,"property-function":!0,values:{bevel:{},round:{},miter:{}},default:"miter"},"line-miter-limit":{type:"number",default:2,function:"interpolated","zoom-function":!0,requires:[{"line-join":"miter"}]},"line-round-limit":{type:"number",default:1.05,function:"interpolated","zoom-function":!0,requires:[{"line-join":"round"}]},visibility:{type:"enum",values:{visible:{},none:{}},default:"visible"}},layout_symbol:{"symbol-placement":{type:"enum",function:"piecewise-constant","zoom-function":!0,values:{point:{},line:{}},default:"point"},"symbol-spacing":{type:"number",default:250,minimum:1,function:"interpolated","zoom-function":!0,units:"pixels",requires:[{"symbol-placement":"line"}]},"symbol-avoid-edges":{type:"boolean",function:"piecewise-constant","zoom-function":!0,default:!1},"icon-allow-overlap":{type:"boolean",function:"piecewise-constant","zoom-function":!0,default:!1,requires:["icon-image"]},"icon-ignore-placement":{type:"boolean",function:"piecewise-constant","zoom-function":!0,default:!1,requires:["icon-image"]},"icon-optional":{type:"boolean",function:"piecewise-constant","zoom-function":!0,default:!1,requires:["icon-image","text-field"]},"icon-rotation-alignment":{type:"enum",function:"piecewise-constant","zoom-function":!0,values:{map:{},viewport:{},auto:{}},default:"auto",requires:["icon-image"]},"icon-size":{type:"number",default:1,minimum:0,function:"interpolated","zoom-function":!0,"property-function":!0,units:"factor of the original icon size",requires:["icon-image"]},"icon-text-fit":{type:"enum",function:"piecewise-constant","zoom-function":!0,values:{none:{},width:{},height:{},both:{}},default:"none",requires:["icon-image","text-field"]},"icon-text-fit-padding":{type:"array",value:"number",length:4,default:[0,0,0,0],units:"pixels",function:"interpolated","zoom-function":!0,requires:["icon-image","text-field",{"icon-text-fit":["both","width","height"]}]},"icon-image":{type:"string",function:"piecewise-constant","zoom-function":!0,"property-function":!0,tokens:!0},"icon-rotate":{type:"number",default:0,period:360,function:"interpolated","zoom-function":!0,"property-function":!0,units:"degrees",requires:["icon-image"]},"icon-padding":{type:"number",default:2,minimum:0,function:"interpolated","zoom-function":!0,units:"pixels",requires:["icon-image"]},"icon-keep-upright":{type:"boolean",function:"piecewise-constant","zoom-function":!0,default:!1,requires:["icon-image",{"icon-rotation-alignment":"map"},{"symbol-placement":"line"}]},"icon-offset":{type:"array",value:"number",units:'pixels multiplied by the value of "icon-size"',length:2,default:[0,0],function:"interpolated","zoom-function":!0,"property-function":!0,requires:["icon-image"]},"icon-anchor":{type:"enum",function:"piecewise-constant","zoom-function":!0,"property-function":!0,values:{center:{},left:{},right:{},top:{},bottom:{},"top-left":{},"top-right":{},"bottom-left":{},"bottom-right":{}},default:"center",requires:["icon-image"]},"icon-pitch-alignment":{type:"enum",function:"piecewise-constant","zoom-function":!0,values:{map:{},viewport:{},auto:{}},default:"auto",requires:["icon-image"]},"text-pitch-alignment":{type:"enum",function:"piecewise-constant","zoom-function":!0,values:{map:{},viewport:{},auto:{}},default:"auto",requires:["text-field"]},"text-rotation-alignment":{type:"enum",function:"piecewise-constant","zoom-function":!0,values:{map:{},viewport:{},auto:{}},default:"auto",requires:["text-field"]},"text-field":{type:"string",function:"piecewise-constant","zoom-function":!0,"property-function":!0,default:"",tokens:!0},"text-font":{type:"array",value:"string",function:"piecewise-constant","zoom-function":!0,default:["Open Sans Regular","Arial Unicode MS Regular"],requires:["text-field"]},"text-size":{type:"number",default:16,minimum:0,units:"pixels",function:"interpolated","zoom-function":!0,"property-function":!0,requires:["text-field"]},"text-max-width":{type:"number",default:10,minimum:0,units:"ems",function:"interpolated","zoom-function":!0,"property-function":!0,requires:["text-field"]},"text-line-height":{type:"number",default:1.2,units:"ems",function:"interpolated","zoom-function":!0,requires:["text-field"]},"text-letter-spacing":{type:"number",default:0,units:"ems",function:"interpolated","zoom-function":!0,"property-function":!0,requires:["text-field"]},"text-justify":{type:"enum",function:"piecewise-constant","zoom-function":!0,"property-function":!0,values:{left:{},center:{},right:{}},default:"center",requires:["text-field"]},"text-anchor":{type:"enum",function:"piecewise-constant","zoom-function":!0,"property-function":!0,values:{center:{},left:{},right:{},top:{},bottom:{},"top-left":{},"top-right":{},"bottom-left":{},"bottom-right":{}},default:"center",requires:["text-field"]},"text-max-angle":{type:"number",default:45,units:"degrees",function:"interpolated","zoom-function":!0,requires:["text-field",{"symbol-placement":"line"}]},"text-rotate":{type:"number",default:0,period:360,units:"degrees",function:"interpolated","zoom-function":!0,"property-function":!0,requires:["text-field"]},"text-padding":{type:"number",default:2,minimum:0,units:"pixels",function:"interpolated","zoom-function":!0,requires:["text-field"]},"text-keep-upright":{type:"boolean",function:"piecewise-constant","zoom-function":!0,default:!0,requires:["text-field",{"text-rotation-alignment":"map"},{"symbol-placement":"line"}]},"text-transform":{type:"enum",function:"piecewise-constant","zoom-function":!0,"property-function":!0,values:{none:{},uppercase:{},lowercase:{}},default:"none",requires:["text-field"]},"text-offset":{type:"array",value:"number",units:"ems",function:"interpolated","zoom-function":!0,"property-function":!0,length:2,default:[0,0],requires:["text-field"]},"text-allow-overlap":{type:"boolean",function:"piecewise-constant","zoom-function":!0,default:!1,requires:["text-field"]},"text-ignore-placement":{type:"boolean",function:"piecewise-constant","zoom-function":!0,default:!1,requires:["text-field"]},"text-optional":{type:"boolean",function:"piecewise-constant","zoom-function":!0,default:!1,requires:["text-field","icon-image"]},visibility:{type:"enum",values:{visible:{},none:{}},default:"visible"}},layout_raster:{visibility:{type:"enum",values:{visible:{},none:{}},default:"visible"}},filter:{type:"array",value:"*"},filter_operator:{type:"enum",values:{"==":{},"!=":{},">":{},">=":{},"<":{},"<=":{},in:{},"!in":{},all:{},any:{},none:{},has:{},"!has":{}}},geometry_type:{type:"enum",values:{Point:{},LineString:{},Polygon:{}}},function:{expression:{type:"expression"},stops:{type:"array",value:"function_stop"},base:{type:"number",default:1,minimum:0},property:{type:"string",default:"$zoom"},type:{type:"enum",values:{identity:{},exponential:{},interval:{},categorical:{}},default:"exponential"},colorSpace:{type:"enum",values:{rgb:{},lab:{},hcl:{}},default:"rgb"},default:{type:"*",required:!1}},function_stop:{type:"array",minimum:0,maximum:22,value:["number","color"],length:2},expression:{type:"array",value:"*",minimum:1},expression_name:{type:"enum",values:{let:{group:"Variable binding"},var:{group:"Variable binding"},literal:{group:"Types"},array:{group:"Types"},at:{group:"Lookup"},case:{group:"Decision"},match:{group:"Decision"},coalesce:{group:"Decision"},step:{group:"Ramps, scales, curves"},interpolate:{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"},"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"},"geometry-type":{group:"Feature data"},id:{group:"Feature data"},zoom:{group:"Zoom"},"heatmap-density":{group:"Heatmap"},"+":{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"},"==":{group:"Decision"},"!=":{group:"Decision"},">":{group:"Decision"},"<":{group:"Decision"},">=":{group:"Decision"},"<=":{group:"Decision"},all:{group:"Decision"},any:{group:"Decision"},"!":{group:"Decision"},upcase:{group:"String"},downcase:{group:"String"},concat:{group:"String"}}},light:{anchor:{type:"enum",default:"viewport",values:{map:{},viewport:{}},transition:!1,"zoom-function":!0,"property-function":!1,function:"piecewise-constant"},position:{type:"array",default:[1.15,210,30],length:3,value:"number",transition:!0,function:"interpolated","zoom-function":!0,"property-function":!1},color:{type:"color",default:"#ffffff",function:"interpolated","zoom-function":!0,"property-function":!1,transition:!0},intensity:{type:"number",default:.5,minimum:0,maximum:1,function:"interpolated","zoom-function":!0,"property-function":!1,transition:!0}},paint:["paint_fill","paint_line","paint_circle","paint_heatmap","paint_fill-extrusion","paint_symbol","paint_raster","paint_background"],paint_fill:{"fill-antialias":{type:"boolean",function:"piecewise-constant","zoom-function":!0,default:!0},"fill-opacity":{type:"number",function:"interpolated","zoom-function":!0,"property-function":!0,default:1,minimum:0,maximum:1,transition:!0},"fill-color":{type:"color",default:"#000000",function:"interpolated","zoom-function":!0,"property-function":!0,transition:!0,requires:[{"!":"fill-pattern"}]},"fill-outline-color":{type:"color",function:"interpolated","zoom-function":!0,"property-function":!0,transition:!0,requires:[{"!":"fill-pattern"},{"fill-antialias":!0}]},"fill-translate":{type:"array",value:"number",length:2,default:[0,0],function:"interpolated","zoom-function":!0,transition:!0,units:"pixels"},"fill-translate-anchor":{type:"enum",function:"piecewise-constant","zoom-function":!0,values:{map:{},viewport:{}},default:"map",requires:["fill-translate"]},"fill-pattern":{type:"string",function:"piecewise-constant","zoom-function":!0,transition:!0}},"paint_fill-extrusion":{"fill-extrusion-opacity":{type:"number",function:"interpolated","zoom-function":!0,"property-function":!1,default:1,minimum:0,maximum:1,transition:!0},"fill-extrusion-color":{type:"color",default:"#000000",function:"interpolated","zoom-function":!0,"property-function":!0,transition:!0,requires:[{"!":"fill-extrusion-pattern"}]},"fill-extrusion-translate":{type:"array",value:"number",length:2,default:[0,0],function:"interpolated","zoom-function":!0,transition:!0,units:"pixels"},"fill-extrusion-translate-anchor":{type:"enum",function:"piecewise-constant","zoom-function":!0,values:{map:{},viewport:{}},default:"map",requires:["fill-extrusion-translate"]},"fill-extrusion-pattern":{type:"string",function:"piecewise-constant","zoom-function":!0,transition:!0},"fill-extrusion-height":{type:"number",function:"interpolated","zoom-function":!0,"property-function":!0,default:0,minimum:0,units:"meters",transition:!0},"fill-extrusion-base":{type:"number",function:"interpolated","zoom-function":!0,"property-function":!0,default:0,minimum:0,units:"meters",transition:!0,requires:["fill-extrusion-height"]}},paint_line:{"line-opacity":{type:"number",function:"interpolated","zoom-function":!0,"property-function":!0,default:1,minimum:0,maximum:1,transition:!0},"line-color":{type:"color",default:"#000000",function:"interpolated","zoom-function":!0,"property-function":!0,transition:!0,requires:[{"!":"line-pattern"}]},"line-translate":{type:"array",value:"number",length:2,default:[0,0],function:"interpolated","zoom-function":!0,transition:!0,units:"pixels"},"line-translate-anchor":{type:"enum",function:"piecewise-constant","zoom-function":!0,values:{map:{},viewport:{}},default:"map",requires:["line-translate"]},"line-width":{type:"number",default:1,minimum:0,function:"interpolated","zoom-function":!0,"property-function":!0,transition:!0,units:"pixels"},"line-gap-width":{type:"number",default:0,minimum:0,function:"interpolated","zoom-function":!0,"property-function":!0,transition:!0,units:"pixels"},"line-offset":{type:"number",default:0,function:"interpolated","zoom-function":!0,"property-function":!0,transition:!0,units:"pixels"},"line-blur":{type:"number",default:0,minimum:0,function:"interpolated","zoom-function":!0,"property-function":!0,transition:!0,units:"pixels"},"line-dasharray":{type:"array",value:"number",function:"piecewise-constant","zoom-function":!0,minimum:0,transition:!0,units:"line widths",requires:[{"!":"line-pattern"}]},"line-pattern":{type:"string",function:"piecewise-constant","zoom-function":!0,transition:!0}},paint_circle:{"circle-radius":{type:"number",default:5,minimum:0,function:"interpolated","zoom-function":!0,"property-function":!0,transition:!0,units:"pixels"},"circle-color":{type:"color",default:"#000000",function:"interpolated","zoom-function":!0,"property-function":!0,transition:!0},"circle-blur":{type:"number",default:0,function:"interpolated","zoom-function":!0,"property-function":!0,transition:!0},"circle-opacity":{type:"number",default:1,minimum:0,maximum:1,function:"interpolated","zoom-function":!0,"property-function":!0,transition:!0},"circle-translate":{type:"array",value:"number",length:2,default:[0,0],function:"interpolated","zoom-function":!0,transition:!0,units:"pixels"},"circle-translate-anchor":{type:"enum",function:"piecewise-constant","zoom-function":!0,values:{map:{},viewport:{}},default:"map",requires:["circle-translate"]},"circle-pitch-scale":{type:"enum",function:"piecewise-constant","zoom-function":!0,values:{map:{},viewport:{}},default:"map"},"circle-pitch-alignment":{type:"enum",function:"piecewise-constant","zoom-function":!0,values:{map:{},viewport:{}},default:"viewport"},"circle-stroke-width":{type:"number",default:0,minimum:0,function:"interpolated","zoom-function":!0,"property-function":!0,transition:!0,units:"pixels"},"circle-stroke-color":{type:"color",default:"#000000",function:"interpolated","zoom-function":!0,"property-function":!0,transition:!0},"circle-stroke-opacity":{type:"number",default:1,minimum:0,maximum:1,function:"interpolated","zoom-function":!0,"property-function":!0,transition:!0}},paint_heatmap:{"heatmap-radius":{type:"number",default:30,minimum:1,function:"interpolated","zoom-function":!0,"property-function":!1,transition:!0,units:"pixels"},"heatmap-weight":{type:"number",default:1,minimum:0,function:"interpolated","zoom-function":!0,"property-function":!0,transition:!1},"heatmap-intensity":{type:"number",default:1,minimum:0,function:"interpolated","zoom-function":!0,"property-function":!1,transition:!0},"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"],function:"interpolated","zoom-function":!1,"property-function":!1,transition:!0},"heatmap-opacity":{type:"number",default:1,minimum:0,maximum:1,function:"interpolated","zoom-function":!0,"property-function":!1,transition:!0}},paint_symbol:{"icon-opacity":{type:"number",default:1,minimum:0,maximum:1,function:"interpolated","zoom-function":!0,"property-function":!0,transition:!0,requires:["icon-image"]},"icon-color":{type:"color",default:"#000000",function:"interpolated","zoom-function":!0,"property-function":!0,transition:!0,requires:["icon-image"]},"icon-halo-color":{type:"color",default:"rgba(0, 0, 0, 0)",function:"interpolated","zoom-function":!0,"property-function":!0,transition:!0,requires:["icon-image"]},"icon-halo-width":{type:"number",default:0,minimum:0,function:"interpolated","zoom-function":!0,"property-function":!0,transition:!0,units:"pixels",requires:["icon-image"]},"icon-halo-blur":{type:"number",default:0,minimum:0,function:"interpolated","zoom-function":!0,"property-function":!0,transition:!0,units:"pixels",requires:["icon-image"]},"icon-translate":{type:"array",value:"number",length:2,default:[0,0],function:"interpolated","zoom-function":!0,transition:!0,units:"pixels",requires:["icon-image"]},"icon-translate-anchor":{type:"enum",function:"piecewise-constant","zoom-function":!0,values:{map:{},viewport:{}},default:"map",requires:["icon-image","icon-translate"]},"text-opacity":{type:"number",default:1,minimum:0,maximum:1,function:"interpolated","zoom-function":!0,"property-function":!0,transition:!0,requires:["text-field"]},"text-color":{type:"color",default:"#000000",function:"interpolated","zoom-function":!0,"property-function":!0,transition:!0,requires:["text-field"]},"text-halo-color":{type:"color",default:"rgba(0, 0, 0, 0)",function:"interpolated","zoom-function":!0,"property-function":!0,transition:!0,requires:["text-field"]},"text-halo-width":{type:"number",default:0,minimum:0,function:"interpolated","zoom-function":!0,"property-function":!0,transition:!0,units:"pixels",requires:["text-field"]},"text-halo-blur":{type:"number",default:0,minimum:0,function:"interpolated","zoom-function":!0,"property-function":!0,transition:!0,units:"pixels",requires:["text-field"]},"text-translate":{type:"array",value:"number",length:2,default:[0,0],function:"interpolated","zoom-function":!0,transition:!0,units:"pixels",requires:["text-field"]},"text-translate-anchor":{type:"enum",function:"piecewise-constant","zoom-function":!0,values:{map:{},viewport:{}},default:"map",requires:["text-field","text-translate"]}},paint_raster:{"raster-opacity":{type:"number",default:1,minimum:0,maximum:1,function:"interpolated","zoom-function":!0,transition:!0},"raster-hue-rotate":{type:"number",default:0,period:360,function:"interpolated","zoom-function":!0,transition:!0,units:"degrees"},"raster-brightness-min":{type:"number",function:"interpolated","zoom-function":!0,default:0,minimum:0,maximum:1,transition:!0},"raster-brightness-max":{type:"number",function:"interpolated","zoom-function":!0,default:1,minimum:0,maximum:1,transition:!0},"raster-saturation":{type:"number",default:0,minimum:-1,maximum:1,function:"interpolated","zoom-function":!0,transition:!0},"raster-contrast":{type:"number",default:0,minimum:-1,maximum:1,function:"interpolated","zoom-function":!0,transition:!0},"raster-fade-duration":{type:"number",default:300,minimum:0,function:"interpolated","zoom-function":!0,transition:!0,units:"milliseconds"}},paint_background:{"background-color":{type:"color",default:"#000000",function:"interpolated","zoom-function":!0,transition:!0,requires:[{"!":"background-pattern"}]},"background-pattern":{type:"string",function:"piecewise-constant","zoom-function":!0,transition:!0},"background-opacity":{type:"number",default:1,minimum:0,maximum:1,function:"interpolated","zoom-function":!0,transition:!0}},transition:{duration:{type:"number",default:300,minimum:0,units:"milliseconds"},delay:{type:"number",default:0,minimum:0,units:"milliseconds"}}}},{}],151:[function(t,e,r){"use strict";var i=t("csscolorparser").parseCSSColor,n=function(t,e,r,i){void 0===i&&(i=1),this.r=t,this.g=e,this.b=r,this.a=i};n.parse=function(t){if(t){if(t instanceof n)return t;if("string"==typeof t){var e=i(t);if(e)return new n(e[0]/255*e[3],e[1]/255*e[3],e[2]/255*e[3],e[3])}}},n.black=new n(0,0,0,1),n.white=new n(1,1,1,1),n.transparent=new n(0,0,0,0),e.exports=n},{csscolorparser:12}],152:[function(t,e,r){"use strict";function i(t){return t>y?Math.pow(t,1/3):t/m+f}function n(t){return t>d?t*t*t:m*(t-f)}function o(t){return 255*(t<=.0031308?12.92*t:1.055*Math.pow(t,1/2.4)-.055)}function a(t){return t/=255,t<=.04045?t/12.92:Math.pow((t+.055)/1.055,2.4)}function s(t){var e=a(t.r),r=a(t.g),n=a(t.b),o=i((.4124564*e+.3575761*r+.1804375*n)/c),s=i((.2126729*e+.7151522*r+.072175*n)/p);return{l:116*s-16,a:500*(o-s),b:200*(s-i((.0193339*e+.119192*r+.9503041*n)/h)),alpha:t.a}}function l(t){var e=(t.l+16)/116,r=isNaN(t.a)?e:e+t.a/500,i=isNaN(t.b)?e:e-t.b/200;return e=p*n(e),r=c*n(r),i=h*n(i),new u(o(3.2404542*r-1.5371385*e-.4985314*i),o(-.969266*r+1.8760108*e+.041556*i),o(.0556434*r-.2040259*e+1.0572252*i),t.alpha)}var u=t("./color"),c=.95047,p=1,h=1.08883,f=4/29,d=6/29,m=3*d*d,y=d*d*d,g=Math.PI/180,v=180/Math.PI;e.exports={lab:{forward:s,reverse:l},hcl:{forward:function(t){var e=s(t),r=e.l,i=e.a,n=e.b,o=Math.atan2(n,i)*v;return{h:o<0?o+360:o,c:Math.sqrt(i*i+n*n),l:r,alpha:t.a}},reverse:function(t){var e=t.h*g,r=t.c;return l({l:t.l,a:Math.cos(e)*r,b:Math.sin(e)*r,alpha:t.alpha})}}}},{"./color":151}],153:[function(t,e,r){"use strict";e.exports=function(t){for(var e=[],r=arguments.length-1;r-- >0;)e[r]=arguments[r+1];for(var i=0,n=e;i<n.length;i+=1){var o=n[i];for(var a in o)t[a]=o[a]}return t}},{}],154:[function(t,e,r){"use strict";e.exports=function(t){return t instanceof Number?"number":t instanceof String?"string":t instanceof Boolean?"boolean":Array.isArray(t)?"array":null===t?"null":typeof t}},{}],155:[function(t,e,r){"use strict";function i(t,e,r){return t*(1-r)+e*r}var n=t("./color");e.exports={number:i,color:function(t,e,r){return new n(i(t.r,e.r,r),i(t.g,e.g,r),i(t.b,e.b,r),i(t.a,e.a,r))},array:function(t,e,r){return t.map(function(t,n){return i(t,e[n],r)})}}},{"./color":151}],156:[function(t,e,r){"use strict";e.exports=["type","source","source-layer","minzoom","maxzoom","filter","layout"]},{}],157:[function(t,e,r){"use strict";e.exports={success:function(t){return{result:"success",value:t}},error:function(t){return{result:"error",value:t}}}},{}],158:[function(t,e,r){"use strict";function i(t){return t instanceof Number||t instanceof String||t instanceof Boolean?t.valueOf():t}function n(t){return Array.isArray(t)?t.map(n):i(t)}e.exports=i,e.exports.deep=n},{}],159:[function(t,e,r){"use strict";var i=t("../error/validation_error"),n=t("../util/get_type"),o=t("../util/extend"),a=t("../util/unbundle_jsonlint"),s=t("../expression").isExpression,l=t("../function").isFunction;e.exports=function(e){var r=t("./validate_function"),u=t("./validate_expression"),c=t("./validate_object"),p={"*":function(){return[]},array:t("./validate_array"),boolean:t("./validate_boolean"),number:t("./validate_number"),color:t("./validate_color"),constants:t("./validate_constants"),enum:t("./validate_enum"),filter:t("./validate_filter"),function:t("./validate_function"),layer:t("./validate_layer"),object:t("./validate_object"),source:t("./validate_source"),light:t("./validate_light"),string:t("./validate_string")},h=e.value,f=e.valueSpec,d=e.key,m=e.styleSpec,y=e.style;if("string"===n(h)&&"@"===h[0]){if(m.$version>7)return[new i(d,h,"constants have been deprecated as of v8")];if(!(h in y.constants))return[new i(d,h,'constant "%s" not found',h)];e=o({},e,{value:y.constants[h]})}return f.function&&l(a(h))?r(e):f.function&&s(a.deep(h))?u(e):f.type&&p[f.type]?p[f.type](e):c(o({},e,{valueSpec:f.type?m[f.type]:f}))}},{"../error/validation_error":121,"../expression":137,"../function":147,"../util/extend":153,"../util/get_type":154,"../util/unbundle_jsonlint":158,"./validate_array":160,"./validate_boolean":161,"./validate_color":162,"./validate_constants":163,"./validate_enum":164,"./validate_expression":165,"./validate_filter":166,"./validate_function":167,"./validate_layer":169,"./validate_light":171,"./validate_number":172,"./validate_object":173,"./validate_source":176,"./validate_string":177}],160:[function(t,e,r){"use strict";var i=t("../util/get_type"),n=t("./validate"),o=t("../error/validation_error");e.exports=function(t){var e=t.value,r=t.valueSpec,a=t.style,s=t.styleSpec,l=t.key,u=t.arrayElementValidator||n;if("array"!==i(e))return[new o(l,e,"array expected, %s found",i(e))];if(r.length&&e.length!==r.length)return[new o(l,e,"array length %d expected, length %d found",r.length,e.length)];if(r["min-length"]&&e.length<r["min-length"])return[new o(l,e,"array length at least %d expected, length %d found",r["min-length"],e.length)];var c={type:r.value};s.$version<7&&(c.function=r.function),"object"===i(r.value)&&(c=r.value);for(var p=[],h=0;h<e.length;h++)p=p.concat(u({array:e,arrayIndex:h,value:e[h],valueSpec:c,style:a,styleSpec:s,key:l+"["+h+"]"}));return p}},{"../error/validation_error":121,"../util/get_type":154,"./validate":159}],161:[function(t,e,r){"use strict";var i=t("../util/get_type"),n=t("../error/validation_error");e.exports=function(t){var e=t.value,r=t.key,o=i(e);return"boolean"!==o?[new n(r,e,"boolean expected, %s found",o)]:[]}},{"../error/validation_error":121,"../util/get_type":154}],162:[function(t,e,r){"use strict";var i=t("../error/validation_error"),n=t("../util/get_type"),o=t("csscolorparser").parseCSSColor;e.exports=function(t){var e=t.key,r=t.value,a=n(r);return"string"!==a?[new i(e,r,"color expected, %s found",a)]:null===o(r)?[new i(e,r,'color expected, "%s" found',r)]:[]}},{"../error/validation_error":121,"../util/get_type":154,csscolorparser:12}],163:[function(t,e,r){"use strict";var i=t("../error/validation_error");e.exports=function(t){var e=t.key,r=t.value;return r?[new i(e,r,"constants have been deprecated as of v8")]:[]}},{"../error/validation_error":121}],164:[function(t,e,r){"use strict";var i=t("../error/validation_error"),n=t("../util/unbundle_jsonlint");e.exports=function(t){var e=t.key,r=t.value,o=t.valueSpec,a=[];return Array.isArray(o.values)?-1===o.values.indexOf(n(r))&&a.push(new i(e,r,"expected one of [%s], %s found",o.values.join(", "),JSON.stringify(r))):-1===Object.keys(o.values).indexOf(n(r))&&a.push(new i(e,r,"expected one of [%s], %s found",Object.keys(o.values).join(", "),JSON.stringify(r))),a}},{"../error/validation_error":121,"../util/unbundle_jsonlint":158}],165:[function(t,e,r){"use strict";var i=t("../error/validation_error"),n=t("../expression"),o=n.createExpression,a=n.createPropertyExpression,s=t("../util/unbundle_jsonlint");e.exports=function(t){var e=("property"===t.expressionContext?a:o)(s.deep(t.value),t.valueSpec);return"error"!==e.result?[]:e.value.map(function(e){return new i(""+t.key+e.key,t.value,e.message)})}},{"../error/validation_error":121,"../expression":137,"../util/unbundle_jsonlint":158}],166:[function(t,e,r){"use strict";function i(t){var e=t.value,r=t.key;if("array"!==s(e))return[new n(r,e,"array expected, %s found",s(e))];var o,u=t.styleSpec,c=[];if(e.length<1)return[new n(r,e,"filter array must have at least 1 element")];switch(c=c.concat(a({key:r+"[0]",value:e[0],valueSpec:u.filter_operator,style:t.style,styleSpec:t.styleSpec})),l(e[0])){case"<":case"<=":case">":case">=":e.length>=2&&"$type"===l(e[1])&&c.push(new n(r,e,'"$type" cannot be use with operator "%s"',e[0]));case"==":case"!=":3!==e.length&&c.push(new n(r,e,'filter array for operator "%s" must have 3 elements',e[0]));case"in":case"!in":e.length>=2&&"string"!==(o=s(e[1]))&&c.push(new n(r+"[1]",e[1],"string expected, %s found",o));for(var p=2;p<e.length;p++)o=s(e[p]),"$type"===l(e[1])?c=c.concat(a({key:r+"["+p+"]",value:e[p],valueSpec:u.geometry_type,style:t.style,styleSpec:t.styleSpec})):"string"!==o&&"number"!==o&&"boolean"!==o&&c.push(new n(r+"["+p+"]",e[p],"string, number, or boolean expected, %s found",o));break;case"any":case"all":case"none":for(var h=1;h<e.length;h++)c=c.concat(i({key:r+"["+h+"]",value:e[h],style:t.style,styleSpec:t.styleSpec}));break;case"has":case"!has":o=s(e[1]),2!==e.length?c.push(new n(r,e,'filter array for "%s" operator must have 2 elements',e[0])):"string"!==o&&c.push(new n(r+"[1]",e[1],"string expected, %s found",o))}return c}var n=t("../error/validation_error"),o=t("./validate_expression"),a=t("./validate_enum"),s=t("../util/get_type"),l=t("../util/unbundle_jsonlint"),u=t("../util/extend"),c=t("../feature_filter").isExpressionFilter;e.exports=function(t){return c(l.deep(t.value))?o(u({},t,{expressionContext:"filter",valueSpec:{value:"boolean"}})):i(t)}},{"../error/validation_error":121,"../feature_filter":146,"../util/extend":153,"../util/get_type":154,"../util/unbundle_jsonlint":158,"./validate_enum":164,"./validate_expression":165}],167:[function(t,e,r){"use strict";var i=t("../error/validation_error"),n=t("../util/get_type"),o=t("./validate"),a=t("./validate_object"),s=t("./validate_array"),l=t("./validate_number"),u=t("../util/unbundle_jsonlint");e.exports=function(t){function e(t){var e=[],s=t.value,c=t.key;if("array"!==n(s))return[new i(c,s,"array expected, %s found",n(s))];if(2!==s.length)return[new i(c,s,"array length %d expected, length %d found",2,s.length)];if(v){if("object"!==n(s[0]))return[new i(c,s,"object expected, %s found",n(s[0]))];if(void 0===s[0].zoom)return[new i(c,s,"object stop key must have zoom")];if(void 0===s[0].value)return[new i(c,s,"object stop key must have value")];if(h&&h>u(s[0].zoom))return[new i(c,s[0].zoom,"stop zoom values must appear in ascending order")];u(s[0].zoom)!==h&&(h=u(s[0].zoom),p=void 0,m={}),e=e.concat(a({key:c+"[0]",value:s[0],valueSpec:{zoom:{}},style:t.style,styleSpec:t.styleSpec,objectElementValidators:{zoom:l,value:r}}))}else e=e.concat(r({key:c+"[0]",value:s[0],valueSpec:{},style:t.style,styleSpec:t.styleSpec},s));return e.concat(o({key:c+"[1]",value:s[1],valueSpec:f,style:t.style,styleSpec:t.styleSpec}))}function r(t,e){var r=n(t.value),o=u(t.value),a=null!==t.value?t.value:e;if(c){if(r!==c)return[new i(t.key,a,"%s stop domain type must match previous stop domain type %s",r,c)]}else c=r;if("number"!==r&&"string"!==r&&"boolean"!==r)return[new i(t.key,a,"stop domain value must be a number, string, or boolean")];if("number"!==r&&"categorical"!==d){var s="number expected, %s found";return f["property-function"]&&void 0===d&&(s+='\nIf you intended to use a categorical function, specify `"type": "categorical"`.'),[new i(t.key,a,s,r)]}return"categorical"!==d||"number"!==r||isFinite(o)&&Math.floor(o)===o?"categorical"!==d&&"number"===r&&void 0!==p&&o<p?[new i(t.key,a,"stop domain values must appear in ascending order")]:(p=o,"categorical"===d&&o in m?[new i(t.key,a,"stop domain values must be unique")]:(m[o]=!0,[])):[new i(t.key,a,"integer expected, found %s",o)]}var c,p,h,f=t.valueSpec,d=u(t.value.type),m={},y="categorical"!==d&&void 0===t.value.property,g=!y,v="array"===n(t.value.stops)&&"array"===n(t.value.stops[0])&&"object"===n(t.value.stops[0][0]),_=a({key:t.key,value:t.value,valueSpec:t.styleSpec.function,style:t.style,styleSpec:t.styleSpec,objectElementValidators:{stops:function(t){if("identity"===d)return[new i(t.key,t.value,'identity function may not have a "stops" property')];var r=[],o=t.value;return r=r.concat(s({key:t.key,value:o,valueSpec:t.valueSpec,style:t.style,styleSpec:t.styleSpec,arrayElementValidator:e})),"array"===n(o)&&0===o.length&&r.push(new i(t.key,o,"array must have at least one stop")),r},default:function(t){return o({key:t.key,value:t.value,valueSpec:f,style:t.style,styleSpec:t.styleSpec})}}});return"identity"===d&&y&&_.push(new i(t.key,t.value,'missing required property "property"')),"identity"===d||t.value.stops||_.push(new i(t.key,t.value,'missing required property "stops"')),"exponential"===d&&"piecewise-constant"===t.valueSpec.function&&_.push(new i(t.key,t.value,"exponential functions not supported")),t.styleSpec.$version>=8&&(g&&!t.valueSpec["property-function"]?_.push(new i(t.key,t.value,"property functions not supported")):y&&!t.valueSpec["zoom-function"]&&"heatmap-color"!==t.objectKey&&_.push(new i(t.key,t.value,"zoom functions not supported"))),"categorical"!==d&&!v||void 0!==t.value.property||_.push(new i(t.key,t.value,'"property" property is required')),_}},{"../error/validation_error":121,"../util/get_type":154,"../util/unbundle_jsonlint":158,"./validate":159,"./validate_array":160,"./validate_number":172,"./validate_object":173}],168:[function(t,e,r){"use strict";var i=t("../error/validation_error"),n=t("./validate_string");e.exports=function(t){var e=t.value,r=t.key,o=n(t);return o.length?o:(-1===e.indexOf("{fontstack}")&&o.push(new i(r,e,'"glyphs" url must include a "{fontstack}" token')),-1===e.indexOf("{range}")&&o.push(new i(r,e,'"glyphs" url must include a "{range}" token')),o)}},{"../error/validation_error":121,"./validate_string":177}],169:[function(t,e,r){"use strict";var i=t("../error/validation_error"),n=t("../util/unbundle_jsonlint"),o=t("./validate_object"),a=t("./validate_filter"),s=t("./validate_paint_property"),l=t("./validate_layout_property"),u=t("../util/extend");e.exports=function(t){var e=[],r=t.value,c=t.key,p=t.style,h=t.styleSpec;r.type||r.ref||e.push(new i(c,r,'either "type" or "ref" is required'));var f=n(r.type),d=n(r.ref);if(r.id)for(var m=n(r.id),y=0;y<t.arrayIndex;y++){var g=p.layers[y];n(g.id)===m&&e.push(new i(c,r.id,'duplicate layer id "%s", previously used at line %d',r.id,g.id.__line__))}if("ref"in r){["type","source","source-layer","filter","layout"].forEach(function(t){t in r&&e.push(new i(c,r[t],'"%s" is prohibited for ref layers',t))});var v;p.layers.forEach(function(t){n(t.id)===d&&(v=t)}),v?v.ref?e.push(new i(c,r.ref,"ref cannot reference another ref layer")):f=n(v.type):e.push(new i(c,r.ref,'ref layer "%s" not found',d))}else if("background"!==f)if(r.source){var _=p.sources&&p.sources[r.source],x=_&&n(_.type);_?"vector"===x&&"raster"===f?e.push(new i(c,r.source,'layer "%s" requires a raster source',r.id)):"raster"===x&&"raster"!==f?e.push(new i(c,r.source,'layer "%s" requires a vector source',r.id)):"vector"!==x||r["source-layer"]||e.push(new i(c,r,'layer "%s" must specify a "source-layer"',r.id)):e.push(new i(c,r.source,'source "%s" not found',r.source))}else e.push(new i(c,r,'missing required property "source"'));return e=e.concat(o({key:c,value:r,valueSpec:h.layer,style:t.style,styleSpec:t.styleSpec,objectElementValidators:{"*":function(){return[]},filter:a,layout:function(t){return o({layer:r,key:t.key,value:t.value,style:t.style,styleSpec:t.styleSpec,objectElementValidators:{"*":function(t){return l(u({layerType:f},t))}}})},paint:function(t){return o({layer:r,key:t.key,value:t.value,style:t.style,styleSpec:t.styleSpec,objectElementValidators:{"*":function(t){return s(u({layerType:f},t))}}})}}}))}},{"../error/validation_error":121,"../util/extend":153,"../util/unbundle_jsonlint":158,"./validate_filter":166,"./validate_layout_property":170,"./validate_object":173,"./validate_paint_property":174}],170:[function(t,e,r){"use strict";var i=t("./validate_property");e.exports=function(t){return i(t,"layout")}},{"./validate_property":175}],171:[function(t,e,r){"use strict";var i=t("../error/validation_error"),n=t("../util/get_type"),o=t("./validate");e.exports=function(t){var e=t.value,r=t.styleSpec,a=r.light,s=t.style,l=[],u=n(e);if(void 0===e)return l;if("object"!==u)return l=l.concat([new i("light",e,"object expected, %s found",u)]);for(var c in e){var p=c.match(/^(.*)-transition$/);l=p&&a[p[1]]&&a[p[1]].transition?l.concat(o({key:c,value:e[c],valueSpec:r.transition,style:s,styleSpec:r})):a[c]?l.concat(o({key:c,value:e[c],valueSpec:a[c],style:s,styleSpec:r})):l.concat([new i(c,e[c],'unknown property "%s"',c)])}return l}},{"../error/validation_error":121,"../util/get_type":154,"./validate":159}],172:[function(t,e,r){"use strict";var i=t("../util/get_type"),n=t("../error/validation_error");e.exports=function(t){var e=t.key,r=t.value,o=t.valueSpec,a=i(r);return"number"!==a?[new n(e,r,"number expected, %s found",a)]:"minimum"in o&&r<o.minimum?[new n(e,r,"%s is less than the minimum value %s",r,o.minimum)]:"maximum"in o&&r>o.maximum?[new n(e,r,"%s is greater than the maximum value %s",r,o.maximum)]:[]}},{"../error/validation_error":121,"../util/get_type":154}],173:[function(t,e,r){"use strict";var i=t("../error/validation_error"),n=t("../util/get_type"),o=t("./validate");e.exports=function(t){var e=t.key,r=t.value,a=t.valueSpec||{},s=t.objectElementValidators||{},l=t.style,u=t.styleSpec,c=[],p=n(r);if("object"!==p)return[new i(e,r,"object expected, %s found",p)];for(var h in r){var f=h.split(".")[0],d=a[f]||a["*"],m=void 0;if(s[f])m=s[f];else if(a[f])m=o;else if(s["*"])m=s["*"];else{if(!a["*"]){c.push(new i(e,r[h],'unknown property "%s"',h));continue}m=o}c=c.concat(m({key:(e?e+".":e)+h,value:r[h],valueSpec:d,style:l,styleSpec:u,object:r,objectKey:h},r))}for(var y in a)a[y].required&&void 0===a[y].default&&void 0===r[y]&&c.push(new i(e,r,'missing required property "%s"',y));return c}},{"../error/validation_error":121,"../util/get_type":154,"./validate":159}],174:[function(t,e,r){"use strict";var i=t("./validate_property");e.exports=function(t){return i(t,"paint")}},{"./validate_property":175}],175:[function(t,e,r){"use strict";var i=t("./validate"),n=t("../error/validation_error"),o=t("../util/get_type");e.exports=function(t,e){var r=t.key,a=t.style,s=t.styleSpec,l=t.value,u=t.objectKey,c=s[e+"_"+t.layerType];if(!c)return[];var p=u.match(/^(.*)-transition$/);if("paint"===e&&p&&c[p[1]]&&c[p[1]].transition)return i({key:r,value:l,valueSpec:s.transition,style:a,styleSpec:s});var h=t.valueSpec||c[u];if(!h)return[new n(r,l,'unknown property "%s"',u)];var f;if("string"===o(l)&&h["property-function"]&&!h.tokens&&(f=/^{([^}]+)}$/.exec(l)))return[new n(r,l,'"%s" does not support interpolation syntax\nUse an identity property function instead: `{ "type": "identity", "property": %s` }`.',u,JSON.stringify(f[1]))];var d=[];return"symbol"===t.layerType&&"text-field"===u&&a&&!a.glyphs&&d.push(new n(r,l,'use of "text-field" requires a style "glyphs" property')),d.concat(i({key:t.key,value:l,valueSpec:h,style:a,styleSpec:s,expressionContext:"property"}))}},{"../error/validation_error":121,"../util/get_type":154,"./validate":159}],176:[function(t,e,r){"use strict";var i=t("../error/validation_error"),n=t("../util/unbundle_jsonlint"),o=t("./validate_object"),a=t("./validate_enum");e.exports=function(t){var e=t.value,r=t.key,s=t.styleSpec,l=t.style;if(!e.type)return[new i(r,e,'"type" is required')];var u=n(e.type),c=[];switch(u){case"vector":case"raster":if(c=c.concat(o({key:r,value:e,valueSpec:s["source_"+u],style:t.style,styleSpec:s})),"url"in e)for(var p in e)["type","url","tileSize"].indexOf(p)<0&&c.push(new i(r+"."+p,e[p],'a source with a "url" property may not include a "%s" property',p));return c;case"geojson":return o({key:r,value:e,valueSpec:s.source_geojson,style:l,styleSpec:s});case"video":return o({key:r,value:e,valueSpec:s.source_video,style:l,styleSpec:s});case"image":return o({key:r,value:e,valueSpec:s.source_image,style:l,styleSpec:s});case"canvas":return o({key:r,value:e,valueSpec:s.source_canvas,style:l,styleSpec:s});default:return a({key:r+".type",value:e.type,valueSpec:{values:["vector","raster","geojson","video","image","canvas"]},style:l,styleSpec:s})}}},{"../error/validation_error":121,"../util/unbundle_jsonlint":158,"./validate_enum":164,"./validate_object":173}],177:[function(t,e,r){"use strict";var i=t("../util/get_type"),n=t("../error/validation_error");e.exports=function(t){var e=t.value,r=t.key,o=i(e);return"string"!==o?[new n(r,e,"string expected, %s found",o)]:[]}},{"../error/validation_error":121,"../util/get_type":154}],178:[function(t,e,r){"use strict";function i(t,e){e=e||l;var r=[];return r=r.concat(s({key:"",value:t,valueSpec:e.$root,styleSpec:e,style:t,objectElementValidators:{glyphs:u,"*":function(){return[]}}})),t.constants&&(r=r.concat(a({key:"constants",value:t.constants,style:t,styleSpec:e}))),n(r)}function n(t){return[].concat(t).sort(function(t,e){return t.line-e.line})}function o(t){return function(){return n(t.apply(this,arguments))}}var a=t("./validate/validate_constants"),s=t("./validate/validate"),l=t("./reference/latest"),u=t("./validate/validate_glyphs_url");i.source=o(t("./validate/validate_source")),i.light=o(t("./validate/validate_light")),i.layer=o(t("./validate/validate_layer")),i.filter=o(t("./validate/validate_filter")),i.paintProperty=o(t("./validate/validate_paint_property")),i.layoutProperty=o(t("./validate/validate_layout_property")),e.exports=i},{"./reference/latest":149,"./validate/validate":159,"./validate/validate_constants":163,"./validate/validate_filter":166,"./validate/validate_glyphs_url":168,"./validate/validate_layer":169,"./validate/validate_layout_property":170,"./validate/validate_light":171,"./validate/validate_paint_property":174,"./validate/validate_source":176}],179:[function(t,e,r){"use strict";var i=t("../style-spec/reference/latest"),n=t("../util/util"),o=t("../util/evented"),a=t("./validate_style"),s=t("../util/util").sphericalToCartesian,l=(t("../style-spec/util/color"),t("../style-spec/util/interpolate")),u=t("./properties"),c=u.Properties,p=u.Transitionable,h=(u.Transitioning,u.PossiblyEvaluated,u.DataConstantProperty),f=function(){this.specification=i.light.position};f.prototype.possiblyEvaluate=function(t,e){return s(t.expression.evaluate(e))},f.prototype.interpolate=function(t,e,r){return{x:l.number(t.x,e.x,r),y:l.number(t.y,e.y,r),z:l.number(t.z,e.z,r)}};var d=new c({anchor:new h(i.light.anchor),position:new f,color:new h(i.light.color),intensity:new h(i.light.intensity)}),m=function(t){function e(e){t.call(this),this._transitionable=new p(d),this.setLight(e),this._transitioning=this._transitionable.untransitioned()}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype.getLight=function(){return this._transitionable.serialize()},e.prototype.setLight=function(t){var e=this;if(!this._validate(a.light,t))for(var r in t){var i=t[r];n.endsWith(r,"-transition")?e._transitionable.setTransition(r.slice(0,-"-transition".length),i):e._transitionable.setValue(r,i)}},e.prototype.updateTransitions=function(t,e){!1===t.transition?this._transitioning=this._transitionable.untransitioned():this._transitioning=this._transitionable.transitioned({now:Date.now(),transition:e},this._transitioning)},e.prototype.hasTransition=function(){return this._transitioning.hasTransition()},e.prototype.recalculate=function(t){this.properties=this._transitioning.possiblyEvaluate(t)},e.prototype._validate=function(t,e){return a.emitErrors(this,t.call(a,n.extend({value:e,style:{glyphs:!0,sprite:!0},styleSpec:i})))},e}(o);e.exports=m},{"../style-spec/reference/latest":149,"../style-spec/util/color":151,"../style-spec/util/interpolate":155,"../util/evented":254,"../util/util":267,"./properties":184,"./validate_style":205}],180:[function(t,e,r){"use strict";var i=t("../util/mapbox").normalizeGlyphsURL,n=t("../util/ajax"),o=t("./parse_glyph_pbf");e.exports=function(t,e,r,a,s){var l=256*e,u=l+255,c=a(i(r).replace("{fontstack}",t).replace("{range}",l+"-"+u),n.ResourceType.Glyphs);n.getArrayBuffer(c,function(t,e){if(t)s(t);else if(e){for(var r={},i=0,n=o(e.data);i<n.length;i+=1){var a=n[i];r[a.id]=a}s(null,r)}})}},{"../util/ajax":245,"../util/mapbox":261,"./parse_glyph_pbf":182}],181:[function(t,e,r){"use strict";var i=t("../util/ajax"),n=t("../util/browser"),o=t("../util/mapbox").normalizeSpriteURL,a=t("../util/image").RGBAImage;e.exports=function(t,e,r){function s(){if(c)r(c);else if(l&&u){var t=n.getImageData(u),e={};for(var i in l){var o=l[i],s=o.width,p=o.height,h=o.x,f=o.y,d=o.sdf,m=o.pixelRatio,y=a.create({width:s,height:p});a.copy(t,y,{x:h,y:f},{x:0,y:0},{width:s,height:p}),e[i]={data:y,pixelRatio:m,sdf:d}}r(null,e)}}var l,u,c,p=n.devicePixelRatio>1?"@2x":"";i.getJSON(e(o(t,p,".json"),i.ResourceType.SpriteJSON),function(t,e){c||(c=t,l=e,s())}),i.getImage(e(o(t,p,".png"),i.ResourceType.SpriteImage),function(t,e){c||(c=t,u=e,s())})}},{"../util/ajax":245,"../util/browser":246,"../util/image":257,"../util/mapbox":261}],182:[function(t,e,r){"use strict";function i(t,e,r){1===t&&r.readMessage(n,e)}function n(t,e,r){if(3===t){var i=r.readMessage(o,{}),n=i.id,s=i.bitmap,u=i.width,c=i.height,p=i.left,h=i.top,f=i.advance;e.push({id:n,bitmap:a.create({width:u+2*l,height:c+2*l},s),metrics:{width:u,height:c,left:p,top:h,advance:f}})}}function o(t,e,r){1===t?e.id=r.readVarint():2===t?e.bitmap=r.readBytes():3===t?e.width=r.readVarint():4===t?e.height=r.readVarint():5===t?e.left=r.readSVarint():6===t?e.top=r.readSVarint():7===t&&(e.advance=r.readVarint())}var a=t("../util/image").AlphaImage,s=t("pbf"),l=3;e.exports=function(t){return new s(t).readFields(i,[])},e.exports.GLYPH_PBF_BORDER=l},{"../util/image":257,pbf:39}],183:[function(t,e,r){"use strict";function i(t,e){var r=a.fromID(t),i=a.fromID(e);return r.isLessThan(i)?-1:i.isLessThan(r)?1:0}var n=t("../util/browser"),o=t("../symbol/collision_index"),a=t("../source/tile_coord"),s=function(t){this._currentTileIndex=0,this._tileIDs=t};s.prototype.continuePlacement=function(t,e,r,i,n){for(var o=this;this._currentTileIndex<this._tileIDs.length;)if(t.getTileByID(o._tileIDs[o._currentTileIndex]).placeLayer(r,e,i,t.id),o._currentTileIndex++,n())return!0};var l=function(t,e,r,i,a,s){this.collisionIndex=new o(t.clone()),this._currentPlacementIndex=e.length-1,this._forceFullPlacement=r,this._showCollisionBoxes=i,this._sourceCacheTileIDs={},this._done=!1,this._delayUntil=r||!s?n.now():s._delayUntil+300,this._collisionFadeTimes=s?s._collisionFadeTimes:{latestStart:0,duration:a}};l.prototype.isDone=function(){return this._done},l.prototype.continuePlacement=function(t,e,r){var o=this,a=n.now();if(a<this._delayUntil)return!0;for(;this._currentPlacementIndex>=0;){var l=e[t[o._currentPlacementIndex]];if("symbol"===l.type){var u=r[l.source];if(o._inProgressLayer||(o._sourceCacheTileIDs[l.source]||(o._sourceCacheTileIDs[l.source]=u.getRenderableIds().sort(i)),o._inProgressLayer=new s(o._sourceCacheTileIDs[l.source])),o._inProgressLayer.continuePlacement(u,o.collisionIndex,o._showCollisionBoxes,l,function(){var t=n.now()-a;return!o._forceFullPlacement&&t>2}))return;delete o._inProgressLayer}o._currentPlacementIndex--}for(var c in r)r[c].commitPlacement(o.collisionIndex,o._collisionFadeTimes);this._done=!0},l.prototype.stillFading=function(){return Date.now()<this._collisionFadeTimes.latestStart+this._collisionFadeTimes.duration},e.exports=l},{"../source/tile_coord":113,"../symbol/collision_index":211,"../util/browser":246}],184:[function(t,e,r){"use strict";var i=t("assert"),n=t("../util/util"),o=n.extend,a=n.easeCubicInOut,s=t("../style-spec/util/interpolate"),l=t("../style-spec/expression").normalizePropertyExpression,u=(t("../style-spec/util/color"),function(t,e){this.property=t,this.value=e,this.expression=l(void 0===e?t.specification.default:e,t.specification)});u.prototype.isDataDriven=function(){return"source"===this.expression.kind||"composite"===this.expression.kind},u.prototype.possiblyEvaluate=function(t){return this.property.possiblyEvaluate(this,t)};var c=function(t){this.property=t,this.value=new u(t,void 0)};c.prototype.transitioned=function(t,e){return new h(this.property,this.value,e,o({},this.transition,t.transition),t.now)},c.prototype.untransitioned=function(){return new h(this.property,this.value,null,{},0)};var p=function(t){this._properties=t,this._values=Object.create(t.defaultTransitionablePropertyValues)};p.prototype.getValue=function(t){return this._values[t].value.value},p.prototype.setValue=function(t,e){this._values.hasOwnProperty(t)||(this._values[t]=new c(this._values[t].property)),this._values[t].value=new u(this._values[t].property,null===e?void 0:e)},p.prototype.getTransition=function(t){return this._values[t].transition},p.prototype.setTransition=function(t,e){this._values.hasOwnProperty(t)||(this._values[t]=new c(this._values[t].property)),this._values[t].transition=e||void 0},p.prototype.serialize=function(){for(var t=this,e={},r=0,i=Object.keys(t._values);r<i.length;r+=1){var n=i[r],o=t.getValue(n);void 0!==o&&(e[n]=o);var a=t.getTransition(n);void 0!==a&&(e[n+"-transition"]=a)}return e},p.prototype.transitioned=function(t,e){for(var r=this,i=new f(this._properties),n=0,o=Object.keys(r._values);n<o.length;n+=1){var a=o[n];i._values[a]=r._values[a].transitioned(t,e._values[a])}return i},p.prototype.untransitioned=function(){for(var t=this,e=new f(this._properties),r=0,i=Object.keys(t._values);r<i.length;r+=1){var n=i[r];e._values[n]=t._values[n].untransitioned()}return e};var h=function(t,e,r,i,n){this.property=t,this.value=e,this.begin=n+i.delay||0,this.end=this.begin+i.duration||0,(i.delay||i.duration)&&(this.prior=r)};h.prototype.possiblyEvaluate=function(t){var e=t.now||0,r=this.value.possiblyEvaluate(t),i=this.prior;if(i){if(e>this.end)return this.prior=null,r;if(this.value.isDataDriven())return this.prior=null,r;if(e<this.begin)return i.possiblyEvaluate(t);var n=(e-this.begin)/(this.end-this.begin);return this.property.interpolate(i.possiblyEvaluate(t),r,a(n))}return r};var f=function(t){this._properties=t,this._values=Object.create(t.defaultTransitioningPropertyValues)};f.prototype.possiblyEvaluate=function(t){for(var e=this,r=new y(this._properties),i=0,n=Object.keys(e._values);i<n.length;i+=1){var o=n[i];r._values[o]=e._values[o].possiblyEvaluate(t)}return r},f.prototype.hasTransition=function(){for(var t=this,e=0,r=Object.keys(t._values);e<r.length;e+=1){var i=r[e];if(t._values[i].prior)return!0}return!1};var d=function(t){this._properties=t,this._values=Object.create(t.defaultPropertyValues)};d.prototype.getValue=function(t){return this._values[t].value},d.prototype.setValue=function(t,e){this._values[t]=new u(this._values[t].property,null===e?void 0:e)},d.prototype.serialize=function(){for(var t=this,e={},r=0,i=Object.keys(t._values);r<i.length;r+=1){var n=i[r],o=t.getValue(n);void 0!==o&&(e[n]=o)}return e},d.prototype.possiblyEvaluate=function(t){for(var e=this,r=new y(this._properties),i=0,n=Object.keys(e._values);i<n.length;i+=1){var o=n[i];r._values[o]=e._values[o].possiblyEvaluate(t)}return r};var m=function(t,e,r){this.property=t,this.value=e,this.globals=r};m.prototype.isConstant=function(){return"constant"===this.value.kind},m.prototype.constantOr=function(t){return"constant"===this.value.kind?this.value.value:t},m.prototype.evaluate=function(t){return this.property.evaluate(this.value,this.globals,t)};var y=function(t){this._properties=t,this._values=Object.create(t.defaultPossiblyEvaluatedValues)};y.prototype.get=function(t){return this._values[t]};var g=function(t){this.specification=t};g.prototype.possiblyEvaluate=function(t,e){return i(!t.isDataDriven()),t.expression.evaluate(e)},g.prototype.interpolate=function(t,e,r){var i=s[this.specification.type];return i?i(t,e,r):t};var v=function(t,e){void 0===e&&(e=!1),this.specification=t,this.useIntegerZoom=e};v.prototype.possiblyEvaluate=function(t,e){return this.useIntegerZoom&&(e=o({},e,{zoom:Math.floor(e.zoom)})),"constant"===t.expression.kind||"camera"===t.expression.kind?new m(this,{kind:"constant",value:t.expression.evaluate(e)},e):new m(this,t.expression,e)},v.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!==t.value.value){var i=s[this.specification.type];return i?new m(this,{kind:"constant",value:i(t.value.value,e.value.value,r)},t.globals):t}},v.prototype.evaluate=function(t,e,r){return this.useIntegerZoom&&(e=o({},e,{zoom:Math.floor(e.zoom)})),"constant"===t.kind?t.value:t.evaluate(e,r)};var _=function(t){this.specification=t};_.prototype.possiblyEvaluate=function(t,e){if(void 0!==t.value){if("constant"===t.expression.kind){var r=t.expression.evaluate(e);return this._calculate(r,r,r,e)}return i(!t.isDataDriven()),this._calculate(t.expression.evaluate({zoom:e.zoom-1}),t.expression.evaluate({zoom:e.zoom}),t.expression.evaluate({zoom:e.zoom+1}),e)}},_.prototype._calculate=function(t,e,r,i){var n=i.zoom,o=n-Math.floor(n),a=i.defaultFadeDuration,s=0!==a?Math.min((i.now-i.zoomHistory.lastIntegerZoomTime)/a,1):1;return n>i.zoomHistory.lastIntegerZoom?{from:t,to:e,fromScale:2,toScale:1,t:o+(1-o)*s}:{from:r,to:e,fromScale:.5,toScale:1,t:1-(1-s)*o}},_.prototype.interpolate=function(t){return t};var x=function(t){this.specification=t};x.prototype.possiblyEvaluate=function(){},x.prototype.interpolate=function(){};e.exports={PropertyValue:u,Transitionable:p,Transitioning:f,Layout:d,PossiblyEvaluatedPropertyValue:m,PossiblyEvaluated:y,DataConstantProperty:g,DataDrivenProperty:v,CrossFadedProperty:_,HeatmapColorProperty:x,Properties:function(t){var e=this;this.properties=t,this.defaultPropertyValues={},this.defaultTransitionablePropertyValues={},this.defaultTransitioningPropertyValues={},this.defaultPossiblyEvaluatedValues={};for(var r in t){var i=t[r],n=e.defaultPropertyValues[r]=new u(i,void 0),o=e.defaultTransitionablePropertyValues[r]=new c(i);e.defaultTransitioningPropertyValues[r]=o.untransitioned(),e.defaultPossiblyEvaluatedValues[r]=n.possiblyEvaluate({})}}}},{"../style-spec/expression":137,"../style-spec/util/color":151,"../style-spec/util/interpolate":155,"../util/util":267,assert:11}],185:[function(t,e,r){"use strict";var i=t("@mapbox/point-geometry");e.exports={getMaximumPaintValue:function(t,e,r){var i=e.paint.get(t).value;return"constant"===i.kind?i.value:r.programConfigurations.get(e.id).paintPropertyStatistics[t].max},translateDistance:function(t){return Math.sqrt(t[0]*t[0]+t[1]*t[1])},translate:function(t,e,r,n,o){if(!e[0]&&!e[1])return t;var a=i.convert(e);"viewport"===r&&a._rotate(-n);for(var s=[],l=0;l<t.length;l++){for(var u=t[l],c=[],p=0;p<u.length;p++)c.push(u[p].sub(a._mult(o)));s.push(c)}return s}}},{"@mapbox/point-geometry":2}],186:[function(t,e,r){"use strict";var i=t("assert"),n=t("../util/evented"),o=t("./style_layer"),a=t("./load_sprite"),s=t("../render/image_manager"),l=t("../render/glyph_manager"),u=t("./light"),c=t("../render/line_atlas"),p=t("../util/util"),h=t("../util/ajax"),f=t("../util/mapbox"),d=t("../util/browser"),m=t("../util/dispatcher"),y=t("./validate_style"),g=t("../source/source").getType,v=t("../source/source").setType,_=t("../source/query_features"),x=t("../source/source_cache"),b=(t("../source/geojson_source"),t("../style-spec/reference/latest")),w=t("../util/global_worker_pool"),z=t("../style-spec/deref"),T=t("../style-spec/diff"),S=t("../source/rtl_text_plugin"),A=t("./placement"),E=p.pick(T.operations,["addLayer","removeLayer","setPaintProperty","setLayoutProperty","setFilter","addSource","removeSource","setLayerZoomRange","setLight","setTransition","setGeoJSONSourceData"]),C=p.pick(T.operations,["setCenter","setZoom","setBearing","setPitch"]),k=function(t){function e(e,r){var i=this;void 0===r&&(r={}),t.call(this),this.map=e,this.dispatcher=new m(w(),this),this.imageManager=new s,this.glyphManager=new l(e._transformRequest,r.localIdeographFontFamily),this.lineAtlas=new c(256,512),this._layers={},this._order=[],this.sourceCaches={},this.zoomHistory={},this._loaded=!1,this._resetUpdates();var n=this;this._rtlTextPluginCallback=S.registerForPluginAvailability(function(t){n.dispatcher.broadcast("loadRTLTextPlugin",t.pluginBlobURL,t.errorCallback);for(var e in n.sourceCaches)n.sourceCaches[e].reload()}),this.on("data",function(t){if("source"===t.dataType&&"metadata"===t.sourceDataType){var e=i.sourceCaches[t.sourceId];if(e){var r=e.getSource();if(r&&r.vectorLayerIds)for(var n in i._layers){var o=i._layers[n];o.source===r.id&&i._validateLayer(o)}}}})}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype.loadURL=function(t,e){var r=this;void 0===e&&(e={}),this.fire("dataloading",{dataType:"style"});var i="boolean"==typeof e.validate?e.validate:!f.isMapboxURL(t);t=f.normalizeStyleURL(t,e.accessToken);var n=this.map._transformRequest(t,h.ResourceType.Style);h.getJSON(n,function(t,e){t?r.fire("error",{error:t}):e&&r._load(e,i)})},e.prototype.loadJSON=function(t,e){var r=this;void 0===e&&(e={}),this.fire("dataloading",{dataType:"style"}),d.frame(function(){r._load(t,!1!==e.validate)})},e.prototype._load=function(t,e){var r=this;if(!e||!y.emitErrors(this,y(t))){this._loaded=!0,this.stylesheet=t,this.updatePaintProperties();for(var i in t.sources)r.addSource(i,t.sources[i],{validate:!1});t.sprite?a(t.sprite,this.map._transformRequest,function(t,e){if(t)r.fire("error",t);else if(e)for(var i in e)r.imageManager.addImage(i,e[i]);r.imageManager.setLoaded(!0),r.fire("data",{dataType:"style"})}):this.imageManager.setLoaded(!0),this.glyphManager.setURL(t.glyphs);var n=z(this.stylesheet.layers);this._order=n.map(function(t){return t.id}),this._layers={};for(var s=0,l=n;s<l.length;s+=1){var c=l[s];(c=o.create(c)).setEventedParent(r,{layer:{id:c.id}}),r._layers[c.id]=c}this.dispatcher.broadcast("setLayers",this._serializeLayers(this._order)),this.light=new u(this.stylesheet.light),this.fire("data",{dataType:"style"}),this.fire("style.load")}},e.prototype._validateLayer=function(t){var e=this.sourceCaches[t.source];if(e){var r=t.sourceLayer;if(r){var i=e.getSource();("geojson"===i.type||i.vectorLayerIds&&-1===i.vectorLayerIds.indexOf(r))&&this.fire("error",{error:new Error('Source layer "'+r+'" does not exist on source "'+i.id+'" as specified by style layer "'+t.id+'"')})}}},e.prototype.loaded=function(){var t=this;if(!this._loaded)return!1;if(Object.keys(this._updatedSources).length)return!1;for(var e in t.sourceCaches)if(!t.sourceCaches[e].loaded())return!1;return!!this.imageManager.isLoaded()},e.prototype._serializeLayers=function(t){var e=this;return t.map(function(t){return e._layers[t].serialize()})},e.prototype._applyPaintPropertyUpdates=function(t){var e=this;if(this._loaded){t=t||{transition:!0};var r=p.extend({duration:300,delay:0},this.stylesheet.transition),i=this._updatedAllPaintProps?this._layers:this._updatedPaintProps;for(var n in i)e._layers[n].updatePaintTransitions(t,r);this.light.updateTransitions(t,r)}},e.prototype._recalculate=function(t){var e=this;if(this._loaded){for(var r in e.sourceCaches)e.sourceCaches[r].used=!1;for(var i={zoom:t,now:Date.now(),defaultFadeDuration:300,zoomHistory:this._updateZoomHistory(t)},n=0,o=e._order;n<o.length;n+=1){var a=o[n],s=e._layers[a];s.recalculate(i),!s.isHidden(t)&&s.source&&(e.sourceCaches[s.source].used=!0)}this.light.recalculate(i),this.z=t}},e.prototype.hasTransitions=function(){var t=this;if(this.light&&this.light.hasTransition())return!0;for(var e in t.sourceCaches)if(t.sourceCaches[e].hasTransition())return!0;for(var r in t._layers)if(t._layers[r].hasTransition())return!0;return!1},e.prototype._updateZoomHistory=function(t){var e=this.zoomHistory;return void 0===e.lastIntegerZoom&&(e.lastIntegerZoom=Math.floor(t),e.lastIntegerZoomTime=0,e.lastZoom=t),Math.floor(e.lastZoom)<Math.floor(t)?(e.lastIntegerZoom=Math.floor(t),e.lastIntegerZoomTime=Date.now()):Math.floor(e.lastZoom)>Math.floor(t)&&(e.lastIntegerZoom=Math.floor(t+1),e.lastIntegerZoomTime=Date.now()),e.lastZoom=t,e},e.prototype._checkLoaded=function(){if(!this._loaded)throw new Error("Style is not done loading")},e.prototype.update=function(t){var e=this;if(this._changed){var r=Object.keys(this._updatedLayers),n=Object.keys(this._removedLayers);(r.length||n.length)&&this._updateWorkerLayers(r,n);for(var o in e._updatedSources){var a=e._updatedSources[o];i("reload"===a||"clear"===a),"reload"===a?e._reloadSource(o):"clear"===a&&e._clearSource(o)}this._applyPaintPropertyUpdates(t),this._resetUpdates(),this.fire("data",{dataType:"style"})}},e.prototype._updateWorkerLayers=function(t,e){this.dispatcher.broadcast("updateLayers",{layers:this._serializeLayers(t),removedIds:e})},e.prototype._resetUpdates=function(){this._changed=!1,this._updatedLayers={},this._removedLayers={},this._updatedSources={},this._updatedPaintProps={},this._updatedAllPaintProps=!1},e.prototype.setState=function(t){var e=this;if(this._checkLoaded(),y.emitErrors(this,y(t)))return!1;(t=p.clone(t)).layers=z(t.layers);var r=T(this.serialize(),t).filter(function(t){return!(t.command in C)});if(0===r.length)return!1;var i=r.filter(function(t){return!(t.command in E)});if(i.length>0)throw new Error("Unimplemented: "+i.map(function(t){return t.command}).join(", ")+".");return r.forEach(function(t){"setTransition"!==t.command&&e[t.command].apply(e,t.args)}),this.stylesheet=t,!0},e.prototype.addImage=function(t,e){if(this.imageManager.getImage(t))return this.fire("error",{error:new Error("An image with this name already exists.")});this.imageManager.addImage(t,e),this.fire("data",{dataType:"style"})},e.prototype.removeImage=function(t){if(!this.imageManager.getImage(t))return this.fire("error",{error:new Error("No image with this name exists.")});this.imageManager.removeImage(t),this.fire("data",{dataType:"style"})},e.prototype.addSource=function(t,e,r){var i=this;if(this._checkLoaded(),void 0!==this.sourceCaches[t])throw new Error("There is already a source with this ID");if(!e.type)throw new Error("The type property must be defined, but the only the following properties were given: "+Object.keys(e).join(", ")+".");if(!(["vector","raster","geojson","video","image","canvas"].indexOf(e.type)>=0)||!this._validate(y.source,"sources."+t,e,null,r)){var n=this.sourceCaches[t]=new x(t,e,this.dispatcher);n.style=this,n.setEventedParent(this,function(){return{isSourceLoaded:i.loaded(),source:n.serialize(),sourceId:t}}),n.onAdd(this.map),this._changed=!0}},e.prototype.removeSource=function(t){if(this._checkLoaded(),void 0===this.sourceCaches[t])throw new Error("There is no source with this ID");var e=this.sourceCaches[t];delete this.sourceCaches[t],delete this._updatedSources[t],e.fire("data",{sourceDataType:"metadata",dataType:"source",sourceId:t}),e.setEventedParent(null),e.clearTiles(),e.onRemove&&e.onRemove(this.map),this._changed=!0},e.prototype.setGeoJSONSourceData=function(t,e){this._checkLoaded(),i(void 0!==this.sourceCaches[t],"There is no source with this ID");var r=this.sourceCaches[t].getSource();i("geojson"===r.type),r.setData(e),this._changed=!0},e.prototype.getSource=function(t){return this.sourceCaches[t]&&this.sourceCaches[t].getSource()},e.prototype.addLayer=function(t,e,r){this._checkLoaded();var i=t.id;if("object"==typeof t.source&&(this.addSource(i,t.source),t=p.clone(t),t=p.extend(t,{source:i})),!this._validate(y.layer,"layers."+i,t,{arrayIndex:-1},r)){var n=o.create(t);this._validateLayer(n),n.setEventedParent(this,{layer:{id:i}});var a=e?this._order.indexOf(e):this._order.length;if(e&&-1===a)this.fire("error",{message:new Error('Layer with id "'+e+'" does not exist on this map.')});else{if(this._order.splice(a,0,i),this._layerOrderChanged=!0,this._layers[i]=n,this._removedLayers[i]&&n.source){var s=this._removedLayers[i];delete this._removedLayers[i],s.type!==n.type?this._updatedSources[n.source]="clear":(this._updatedSources[n.source]="reload",this.sourceCaches[n.source].pause())}this._updateLayer(n),this.updatePaintProperties(i)}}},e.prototype.moveLayer=function(t,e){if(this._checkLoaded(),this._changed=!0,this._layers[t]){var r=this._order.indexOf(t);this._order.splice(r,1);var i=e?this._order.indexOf(e):this._order.length;this._order.splice(i,0,t),this._layerOrderChanged=!0}else this.fire("error",{error:new Error("The layer '"+t+"' does not exist in the map's style and cannot be moved.")})},e.prototype.removeLayer=function(t){this._checkLoaded();var e=this._layers[t];if(e){e.setEventedParent(null);var r=this._order.indexOf(t);this._order.splice(r,1),this._layerOrderChanged=!0,this._changed=!0,this._removedLayers[t]=e,delete this._layers[t],delete this._updatedLayers[t],delete this._updatedPaintProps[t]}else this.fire("error",{error:new Error("The layer '"+t+"' does not exist in the map's style and cannot be removed.")})},e.prototype.getLayer=function(t){return this._layers[t]},e.prototype.setLayerZoomRange=function(t,e,r){this._checkLoaded();var i=this.getLayer(t);i?i.minzoom===e&&i.maxzoom===r||(null!=e&&(i.minzoom=e),null!=r&&(i.maxzoom=r),this._updateLayer(i)):this.fire("error",{error:new Error("The layer '"+t+"' does not exist in the map's style and cannot have zoom extent.")})},e.prototype.setFilter=function(t,e){this._checkLoaded();var r=this.getLayer(t);if(r){if(!p.deepEqual(r.filter,e))return null===e||void 0===e?(r.filter=void 0,void this._updateLayer(r)):void(this._validate(y.filter,"layers."+r.id+".filter",e)||(r.filter=p.clone(e),this._updateLayer(r)))}else this.fire("error",{error:new Error("The layer '"+t+"' does not exist in the map's style and cannot be filtered.")})},e.prototype.getFilter=function(t){return p.clone(this.getLayer(t).filter)},e.prototype.setLayoutProperty=function(t,e,r){this._checkLoaded();var i=this.getLayer(t);i?p.deepEqual(i.getLayoutProperty(e),r)||(i.setLayoutProperty(e,r),this._updateLayer(i)):this.fire("error",{error:new Error("The layer '"+t+"' does not exist in the map's style and cannot be styled.")})},e.prototype.getLayoutProperty=function(t,e){return this.getLayer(t).getLayoutProperty(e)},e.prototype.setPaintProperty=function(t,e,r){this._checkLoaded();var i=this.getLayer(t);if(i){if(!p.deepEqual(i.getPaintProperty(e),r)){var n=i._transitionablePaint._values[e].value.isDataDriven();i.setPaintProperty(e,r),(i._transitionablePaint._values[e].value.isDataDriven()||n)&&this._updateLayer(i),this.updatePaintProperties(t,e)}}else this.fire("error",{error:new Error("The layer '"+t+"' does not exist in the map's style and cannot be styled.")})},e.prototype.getPaintProperty=function(t,e){return this.getLayer(t).getPaintProperty(e)},e.prototype.getTransition=function(){return p.extend({duration:300,delay:0},this.stylesheet&&this.stylesheet.transition)},e.prototype.updatePaintProperties=function(t,e){if(this._changed=!0,t){var r=this._updatedPaintProps;r[t]||(r[t]={}),r[t][e||"all"]=!0}else this._updatedAllPaintProps=!0},e.prototype.serialize=function(){var t=this;return p.filterObject({version:this.stylesheet.version,name:this.stylesheet.name,metadata:this.stylesheet.metadata,light:this.stylesheet.light,center:this.stylesheet.center,zoom:this.stylesheet.zoom,bearing:this.stylesheet.bearing,pitch:this.stylesheet.pitch,sprite:this.stylesheet.sprite,glyphs:this.stylesheet.glyphs,transition:this.stylesheet.transition,sources:p.mapObject(this.sourceCaches,function(t){return t.serialize()}),layers:this._order.map(function(e){return t._layers[e].serialize()})},function(t){return void 0!==t})},e.prototype._updateLayer=function(t){this._updatedLayers[t.id]=!0,t.source&&!this._updatedSources[t.source]&&(this._updatedSources[t.source]="reload",this.sourceCaches[t.source].pause()),this._changed=!0},e.prototype._flattenRenderedFeatures=function(t){for(var e=this,r=[],i=this._order.length-1;i>=0;i--)for(var n=e._order[i],o=0,a=t;o<a.length;o+=1){var s=a[o][n];if(s)for(var l=0,u=s;l<u.length;l+=1){var c=u[l];r.push(c)}}return r},e.prototype.queryRenderedFeatures=function(t,e,r,i){var n=this;e&&e.filter&&this._validate(y.filter,"queryRenderedFeatures.filter",e.filter);var o={};if(e&&e.layers){if(!Array.isArray(e.layers))return this.fire("error",{error:"parameters.layers must be an Array."}),[];for(var a=0,s=e.layers;a<s.length;a+=1){var l=s[a],u=n._layers[l];if(!u)return n.fire("error",{error:"The layer '"+l+"' does not exist in the map's style and cannot be queried for features."}),[];o[u.source]=!0}}var c=[];for(var p in n.sourceCaches)if(!e.layers||o[p]){var h=_.rendered(n.sourceCaches[p],n._layers,t,e,r,i);c.push(h)}return this._flattenRenderedFeatures(c)},e.prototype.querySourceFeatures=function(t,e){e&&e.filter&&this._validate(y.filter,"querySourceFeatures.filter",e.filter);var r=this.sourceCaches[t];return r?_.source(r,e):[]},e.prototype.addSourceType=function(t,e,r){return g(t)?r(new Error('A source type called "'+t+'" already exists.')):(v(t,e),e.workerSourceURL?void this.dispatcher.broadcast("loadWorkerSource",{name:t,url:e.workerSourceURL},r):r(null,null))},e.prototype.getLight=function(){return this.light.getLight()},e.prototype.setLight=function(t,e){this._checkLoaded();var r=this.light.getLight(),i=!1;for(var n in t)if(!p.deepEqual(t[n],r[n])){i=!0;break}if(i){e=e||{transition:!0};var o=p.extend({duration:300,delay:0},this.stylesheet.transition);this.light.setLight(t),this.light.updateTransitions(e,o)}},e.prototype._validate=function(t,e,r,i,n){return(!n||!1!==n.validate)&&y.emitErrors(this,t.call(y,p.extend({key:e,style:this.serialize(),value:r,styleSpec:b},i)))},e.prototype._remove=function(){var t=this;S.evented.off("pluginAvailable",this._rtlTextPluginCallback);for(var e in t.sourceCaches)t.sourceCaches[e].clearTiles();this.dispatcher.remove()},e.prototype._clearSource=function(t){this.sourceCaches[t].clearTiles()},e.prototype._reloadSource=function(t){this.sourceCaches[t].resume(),this.sourceCaches[t].reload()},e.prototype._updateSources=function(t){var e=this;for(var r in e.sourceCaches)e.sourceCaches[r].update(t)},e.prototype.getNeedsFullPlacement=function(){var t=this;if(this._layerOrderChanged)return!0;for(var e in t.sourceCaches)if(t.sourceCaches[e].getNeedsFullPlacement())return!0;return!1},e.prototype._generateCollisionBoxes=function(){var t=this;for(var e in t.sourceCaches)t._reloadSource(e)},e.prototype._updatePlacement=function(t,e,r){var i=this.getNeedsFullPlacement();return(i||!this.placement||this.placement.isDone())&&(this.placement=new A(t,this._order,i,e,r,this.placement),this._layerOrderChanged=!1),this.placement.continuePlacement(this._order,this._layers,this.sourceCaches),this.placement.isDone()&&(this.collisionIndex=this.placement.collisionIndex),!this.placement.isDone()||this.placement.stillFading()},e.prototype.getImages=function(t,e,r){this.imageManager.getImages(e.icons,r)},e.prototype.getGlyphs=function(t,e,r){this.glyphManager.getGlyphs(e.stacks,r)},e}(n);e.exports=k},{"../render/glyph_manager":86,"../render/image_manager":88,"../render/line_atlas":89,"../source/geojson_source":100,"../source/query_features":106,"../source/rtl_text_plugin":108,"../source/source":109,"../source/source_cache":110,"../style-spec/deref":119,"../style-spec/diff":120,"../style-spec/reference/latest":149,"../util/ajax":245,"../util/browser":246,"../util/dispatcher":252,"../util/evented":254,"../util/global_worker_pool":256,"../util/mapbox":261,"../util/util":267,"./light":179,"./load_sprite":181,"./placement":183,"./style_layer":187,"./validate_style":205,assert:11}],187:[function(t,e,r){"use strict";var i=t("../util/util"),n=t("../style-spec/reference/latest"),o=t("./validate_style"),a=t("../util/evented"),s=t("./properties"),l=s.Layout,u=s.Transitionable,c=(s.Transitioning,s.Properties,function(t){function e(e,r){var i=this;t.call(this),this.id=e.id,this.metadata=e.metadata,this.type=e.type,this.minzoom=e.minzoom,this.maxzoom=e.maxzoom,this.visibility="visible","background"!==e.type&&(this.source=e.source,this.sourceLayer=e["source-layer"],this.filter=e.filter),this._featureFilter=function(){return!0},r.layout&&(this._unevaluatedLayout=new l(r.layout)),this._transitionablePaint=new u(r.paint);for(var n in e.paint)i.setPaintProperty(n,e.paint[n],{validate:!1});for(var o in e.layout)i.setLayoutProperty(o,e.layout[o],{validate:!1});this._transitioningPaint=this._transitionablePaint.untransitioned()}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype.getLayoutProperty=function(t){return"visibility"===t?this.visibility:this._unevaluatedLayout.getValue(t)},e.prototype.setLayoutProperty=function(t,e,r){if(null!==e&&void 0!==e){var i="layers."+this.id+".layout."+t;if(this._validate(o.layoutProperty,i,t,e,r))return}"visibility"!==t?this._unevaluatedLayout.setValue(t,e):this.visibility="none"===e?e:"visible"},e.prototype.getPaintProperty=function(t){return i.endsWith(t,"-transition")?this._transitionablePaint.getTransition(t.slice(0,-"-transition".length)):this._transitionablePaint.getValue(t)},e.prototype.setPaintProperty=function(t,e,r){if(null!==e&&void 0!==e){var n="layers."+this.id+".paint."+t;if(this._validate(o.paintProperty,n,t,e,r))return}i.endsWith(t,"-transition")?this._transitionablePaint.setTransition(t.slice(0,-"-transition".length),e||void 0):this._transitionablePaint.setValue(t,e)},e.prototype.isHidden=function(t){return!!(this.minzoom&&t<this.minzoom)||(!!(this.maxzoom&&t>=this.maxzoom)||"none"===this.visibility)},e.prototype.updatePaintTransitions=function(t,e){!1===t.transition?this._transitioningPaint=this._transitionablePaint.untransitioned():this._transitioningPaint=this._transitionablePaint.transitioned({now:Date.now(),transition:e},this._transitioningPaint)},e.prototype.hasTransition=function(){return this._transitioningPaint.hasTransition()},e.prototype.recalculate=function(t){this._unevaluatedLayout&&(this.layout=this._unevaluatedLayout.possiblyEvaluate(t)),this.paint=this._transitioningPaint.possiblyEvaluate(t)},e.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"none"===this.visibility&&(t.layout=t.layout||{},t.layout.visibility="none"),i.filterObject(t,function(t,e){return!(void 0===t||"layout"===e&&!Object.keys(t).length||"paint"===e&&!Object.keys(t).length)})},e.prototype._validate=function(t,e,r,i,a){return(!a||!1!==a.validate)&&o.emitErrors(this,t.call(o,{key:e,layerType:this.type,objectKey:r,value:i,styleSpec:n,style:{glyphs:!0,sprite:!0}}))},e.prototype.has3DPass=function(){return!1},e.prototype.resize=function(t){},e}(a));e.exports=c;var p={circle:t("./style_layer/circle_style_layer"),heatmap:t("./style_layer/heatmap_style_layer"),fill:t("./style_layer/fill_style_layer"),"fill-extrusion":t("./style_layer/fill_extrusion_style_layer"),line:t("./style_layer/line_style_layer"),symbol:t("./style_layer/symbol_style_layer"),background:t("./style_layer/background_style_layer"),raster:t("./style_layer/raster_style_layer")};c.create=function(t){return new p[t.type](t)}},{"../style-spec/reference/latest":149,"../util/evented":254,"../util/util":267,"./properties":184,"./style_layer/background_style_layer":188,"./style_layer/circle_style_layer":190,"./style_layer/fill_extrusion_style_layer":192,"./style_layer/fill_style_layer":194,"./style_layer/heatmap_style_layer":196,"./style_layer/line_style_layer":198,"./style_layer/raster_style_layer":200,"./style_layer/symbol_style_layer":202,"./validate_style":205}],188:[function(t,e,r){"use strict";var i=t("../style_layer"),n=t("./background_style_layer_properties"),o=t("../properties"),a=(o.Transitionable,o.Transitioning,o.PossiblyEvaluated,function(t){function e(e){t.call(this,e,n)}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e}(i));e.exports=a},{"../properties":184,"../style_layer":187,"./background_style_layer_properties":189}],189:[function(t,e,r){"use strict";var i=t("../../style-spec/reference/latest"),n=t("../properties"),o=n.Properties,a=n.DataConstantProperty,s=(n.DataDrivenProperty,n.CrossFadedProperty),l=(n.HeatmapColorProperty,new o({"background-color":new a(i.paint_background["background-color"]),"background-pattern":new s(i.paint_background["background-pattern"]),"background-opacity":new a(i.paint_background["background-opacity"])}));e.exports={paint:l}},{"../../style-spec/reference/latest":149,"../properties":184}],190:[function(t,e,r){"use strict";var i=t("../style_layer"),n=t("../../data/bucket/circle_bucket"),o=t("../../util/intersection_tests").multiPolygonIntersectsBufferedMultiPoint,a=t("../query_utils"),s=a.getMaximumPaintValue,l=a.translateDistance,u=a.translate,c=t("./circle_style_layer_properties"),p=t("../properties"),h=(p.Transitionable,p.Transitioning,p.PossiblyEvaluated,function(t){function e(e){t.call(this,e,c)}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype.createBucket=function(t){return new n(t)},e.prototype.queryRadius=function(t){var e=t;return s("circle-radius",this,e)+s("circle-stroke-width",this,e)+l(this.paint.get("circle-translate"))},e.prototype.queryIntersectsFeature=function(t,e,r,i,n,a){var s=u(t,this.paint.get("circle-translate"),this.paint.get("circle-translate-anchor"),n,a),l=this.paint.get("circle-radius").evaluate(e)*a,c=this.paint.get("circle-stroke-width").evaluate(e)*a;return o(s,r,l+c)},e}(i));e.exports=h},{"../../data/bucket/circle_bucket":53,"../../util/intersection_tests":258,"../properties":184,"../query_utils":185,"../style_layer":187,"./circle_style_layer_properties":191}],191:[function(t,e,r){"use strict";var i=t("../../style-spec/reference/latest"),n=t("../properties"),o=n.Properties,a=n.DataConstantProperty,s=n.DataDrivenProperty,l=(n.CrossFadedProperty,n.HeatmapColorProperty,new o({"circle-radius":new s(i.paint_circle["circle-radius"]),"circle-color":new s(i.paint_circle["circle-color"]),"circle-blur":new s(i.paint_circle["circle-blur"]),"circle-opacity":new s(i.paint_circle["circle-opacity"]),"circle-translate":new a(i.paint_circle["circle-translate"]),"circle-translate-anchor":new a(i.paint_circle["circle-translate-anchor"]),"circle-pitch-scale":new a(i.paint_circle["circle-pitch-scale"]),"circle-pitch-alignment":new a(i.paint_circle["circle-pitch-alignment"]),"circle-stroke-width":new s(i.paint_circle["circle-stroke-width"]),"circle-stroke-color":new s(i.paint_circle["circle-stroke-color"]),"circle-stroke-opacity":new s(i.paint_circle["circle-stroke-opacity"])}));e.exports={paint:l}},{"../../style-spec/reference/latest":149,"../properties":184}],192:[function(t,e,r){"use strict";var i=t("../style_layer"),n=t("../../data/bucket/fill_extrusion_bucket"),o=t("../../util/intersection_tests").multiPolygonIntersectsMultiPolygon,a=t("../query_utils"),s=a.translateDistance,l=a.translate,u=t("./fill_extrusion_style_layer_properties"),c=t("../properties"),p=(c.Transitionable,c.Transitioning,c.PossiblyEvaluated,function(t){function e(e){t.call(this,e,u)}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype.createBucket=function(t){return new n(t)},e.prototype.queryRadius=function(){return s(this.paint.get("fill-extrusion-translate"))},e.prototype.queryIntersectsFeature=function(t,e,r,i,n,a){var s=l(t,this.paint.get("fill-extrusion-translate"),this.paint.get("fill-extrusion-translate-anchor"),n,a);return o(s,r)},e.prototype.has3DPass=function(){return 0!==this.paint.get("fill-extrusion-opacity")&&"none"!==this.visibility},e.prototype.resize=function(t){if(this.viewportFrame){var e=this.viewportFrame,r=e.texture,i=e.fbo;t.deleteTexture(r),t.deleteFramebuffer(i),this.viewportFrame=null}},e}(i));e.exports=p},{"../../data/bucket/fill_extrusion_bucket":55,"../../util/intersection_tests":258,"../properties":184,"../query_utils":185,"../style_layer":187,"./fill_extrusion_style_layer_properties":193}],193:[function(t,e,r){"use strict";var i=t("../../style-spec/reference/latest"),n=t("../properties"),o=n.Properties,a=n.DataConstantProperty,s=n.DataDrivenProperty,l=n.CrossFadedProperty,u=(n.HeatmapColorProperty,new o({"fill-extrusion-opacity":new a(i["paint_fill-extrusion"]["fill-extrusion-opacity"]),"fill-extrusion-color":new s(i["paint_fill-extrusion"]["fill-extrusion-color"]),"fill-extrusion-translate":new a(i["paint_fill-extrusion"]["fill-extrusion-translate"]),"fill-extrusion-translate-anchor":new a(i["paint_fill-extrusion"]["fill-extrusion-translate-anchor"]),"fill-extrusion-pattern":new l(i["paint_fill-extrusion"]["fill-extrusion-pattern"]),"fill-extrusion-height":new s(i["paint_fill-extrusion"]["fill-extrusion-height"]),"fill-extrusion-base":new s(i["paint_fill-extrusion"]["fill-extrusion-base"])}));e.exports={paint:u}},{"../../style-spec/reference/latest":149,"../properties":184}],194:[function(t,e,r){"use strict";var i=t("../style_layer"),n=t("../../data/bucket/fill_bucket"),o=t("../../util/intersection_tests").multiPolygonIntersectsMultiPolygon,a=t("../query_utils"),s=a.translateDistance,l=a.translate,u=t("./fill_style_layer_properties"),c=t("../properties"),p=(c.Transitionable,c.Transitioning,c.PossiblyEvaluated,function(t){function e(e){t.call(this,e,u)}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype.recalculate=function(t){this.paint=this._transitioningPaint.possiblyEvaluate(t),void 0===this._transitionablePaint.getValue("fill-outline-color")&&(this.paint._values["fill-outline-color"]=this.paint._values["fill-color"])},e.prototype.createBucket=function(t){return new n(t)},e.prototype.queryRadius=function(){return s(this.paint.get("fill-translate"))},e.prototype.queryIntersectsFeature=function(t,e,r,i,n,a){var s=l(t,this.paint.get("fill-translate"),this.paint.get("fill-translate-anchor"),n,a);return o(s,r)},e}(i));e.exports=p},{"../../data/bucket/fill_bucket":54,"../../util/intersection_tests":258,"../properties":184,"../query_utils":185,"../style_layer":187,"./fill_style_layer_properties":195}],195:[function(t,e,r){"use strict";var i=t("../../style-spec/reference/latest"),n=t("../properties"),o=n.Properties,a=n.DataConstantProperty,s=n.DataDrivenProperty,l=n.CrossFadedProperty,u=(n.HeatmapColorProperty,new o({"fill-antialias":new a(i.paint_fill["fill-antialias"]),"fill-opacity":new s(i.paint_fill["fill-opacity"]),"fill-color":new s(i.paint_fill["fill-color"]),"fill-outline-color":new s(i.paint_fill["fill-outline-color"]),"fill-translate":new a(i.paint_fill["fill-translate"]),"fill-translate-anchor":new a(i.paint_fill["fill-translate-anchor"]),"fill-pattern":new l(i.paint_fill["fill-pattern"])}));e.exports={paint:u}},{"../../style-spec/reference/latest":149,"../properties":184}],196:[function(t,e,r){"use strict";var i=t("../style_layer"),n=t("../../data/bucket/heatmap_bucket"),o=t("../../util/image").RGBAImage,a=t("./heatmap_style_layer_properties"),s=t("../properties"),l=(s.Transitionable,s.Transitioning,s.PossiblyEvaluated,function(t){function e(e){t.call(this,e,a),this._updateColorRamp()}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype.createBucket=function(t){return new n(t)},e.prototype.setPaintProperty=function(e,r,i){t.prototype.setPaintProperty.call(this,e,r,i),"heatmap-color"===e&&this._updateColorRamp()},e.prototype._updateColorRamp=function(){for(var t=this._transitionablePaint._values["heatmap-color"].value.expression,e=new Uint8Array(1024),r=e.length,i=4;i<r;i+=4){var n=t.evaluate({heatmapDensity:i/r});e[i+0]=Math.floor(255*n.r/n.a),e[i+1]=Math.floor(255*n.g/n.a),e[i+2]=Math.floor(255*n.b/n.a),e[i+3]=Math.floor(255*n.a)}this.colorRamp=o.create({width:256,height:1},e),this.colorRampTexture=null},e.prototype.resize=function(t){this.heatmapTexture&&(t.deleteTexture(this.heatmapTexture),this.heatmapTexture=null),this.heatmapFbo&&(t.deleteFramebuffer(this.heatmapFbo),this.heatmapFbo=null)},e.prototype.queryRadius=function(){return 0},e.prototype.queryIntersectsFeature=function(){return!1},e}(i));e.exports=l},{"../../data/bucket/heatmap_bucket":56,"../../util/image":257,"../properties":184,"../style_layer":187,"./heatmap_style_layer_properties":197}],197:[function(t,e,r){"use strict";var i=t("../../style-spec/reference/latest"),n=t("../properties"),o=n.Properties,a=n.DataConstantProperty,s=n.DataDrivenProperty,l=(n.CrossFadedProperty,n.HeatmapColorProperty),u=new o({"heatmap-radius":new a(i.paint_heatmap["heatmap-radius"]),"heatmap-weight":new s(i.paint_heatmap["heatmap-weight"]),"heatmap-intensity":new a(i.paint_heatmap["heatmap-intensity"]),"heatmap-color":new l(i.paint_heatmap["heatmap-color"]),"heatmap-opacity":new a(i.paint_heatmap["heatmap-opacity"])});e.exports={paint:u}},{"../../style-spec/reference/latest":149,"../properties":184}],198:[function(t,e,r){"use strict";function i(t,e){return e>0?e+2*t:t}function n(t,e){for(var r=[],i=new o(0,0),n=0;n<t.length;n++){for(var a=t[n],s=[],l=0;l<a.length;l++){var u=a[l-1],c=a[l],p=a[l+1],h=0===l?i:c.sub(u)._unit()._perp(),f=l===a.length-1?i:p.sub(c)._unit()._perp(),d=h._add(f)._unit(),m=d.x*f.x+d.y*f.y;d._mult(1/m),s.push(d._mult(e)._add(c))}r.push(s)}return r}var o=t("@mapbox/point-geometry"),a=t("../style_layer"),s=t("../../data/bucket/line_bucket"),l=t("../../util/intersection_tests").multiPolygonIntersectsBufferedMultiLine,u=t("../query_utils"),c=u.getMaximumPaintValue,p=u.translateDistance,h=u.translate,f=t("./line_style_layer_properties"),d=t("../properties"),m=(d.Transitionable,d.Transitioning,d.Layout,d.PossiblyEvaluated,new(0,d.DataDrivenProperty)(f.paint.properties["line-width"].specification,!0)),y=function(t){function e(e){t.call(this,e,f)}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype.recalculate=function(e){t.prototype.recalculate.call(this,e),this.paint._values["line-floorwidth"]=m.possiblyEvaluate(this._transitioningPaint._values["line-width"].value,e)},e.prototype.createBucket=function(t){return new s(t)},e.prototype.queryRadius=function(t){var e=t,r=i(c("line-width",this,e),c("line-gap-width",this,e)),n=c("line-offset",this,e);return r/2+Math.abs(n)+p(this.paint.get("line-translate"))},e.prototype.queryIntersectsFeature=function(t,e,r,o,a,s){var u=h(t,this.paint.get("line-translate"),this.paint.get("line-translate-anchor"),a,s),c=s/2*i(this.paint.get("line-width").evaluate(e),this.paint.get("line-gap-width").evaluate(e)),p=this.paint.get("line-offset").evaluate(e);return p&&(r=n(r,p*s)),l(u,r,c)},e}(a);e.exports=y},{"../../data/bucket/line_bucket":57,"../../util/intersection_tests":258,"../properties":184,"../query_utils":185,"../style_layer":187,"./line_style_layer_properties":199,"@mapbox/point-geometry":2}],199:[function(t,e,r){"use strict";var i=t("../../style-spec/reference/latest"),n=t("../properties"),o=n.Properties,a=n.DataConstantProperty,s=n.DataDrivenProperty,l=n.CrossFadedProperty,u=(n.HeatmapColorProperty,new o({"line-cap":new a(i.layout_line["line-cap"]),"line-join":new s(i.layout_line["line-join"]),"line-miter-limit":new a(i.layout_line["line-miter-limit"]),"line-round-limit":new a(i.layout_line["line-round-limit"])})),c=new o({"line-opacity":new s(i.paint_line["line-opacity"]),"line-color":new s(i.paint_line["line-color"]),"line-translate":new a(i.paint_line["line-translate"]),"line-translate-anchor":new a(i.paint_line["line-translate-anchor"]),"line-width":new s(i.paint_line["line-width"]),"line-gap-width":new s(i.paint_line["line-gap-width"]),"line-offset":new s(i.paint_line["line-offset"]),"line-blur":new s(i.paint_line["line-blur"]),"line-dasharray":new l(i.paint_line["line-dasharray"]),"line-pattern":new l(i.paint_line["line-pattern"])});e.exports={paint:c,layout:u}},{"../../style-spec/reference/latest":149,"../properties":184}],200:[function(t,e,r){"use strict";var i=t("../style_layer"),n=t("./raster_style_layer_properties"),o=t("../properties"),a=(o.Transitionable,o.Transitioning,o.PossiblyEvaluated,function(t){function e(e){t.call(this,e,n)}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e}(i));e.exports=a},{"../properties":184,"../style_layer":187,"./raster_style_layer_properties":201}],201:[function(t,e,r){"use strict";var i=t("../../style-spec/reference/latest"),n=t("../properties"),o=n.Properties,a=n.DataConstantProperty,s=(n.DataDrivenProperty,n.CrossFadedProperty,n.HeatmapColorProperty,new o({"raster-opacity":new a(i.paint_raster["raster-opacity"]),"raster-hue-rotate":new a(i.paint_raster["raster-hue-rotate"]),"raster-brightness-min":new a(i.paint_raster["raster-brightness-min"]),"raster-brightness-max":new a(i.paint_raster["raster-brightness-max"]),"raster-saturation":new a(i.paint_raster["raster-saturation"]),"raster-contrast":new a(i.paint_raster["raster-contrast"]),"raster-fade-duration":new a(i.paint_raster["raster-fade-duration"])}));e.exports={paint:s}},{"../../style-spec/reference/latest":149,"../properties":184}],202:[function(t,e,r){"use strict";var i=t("../style_layer"),n=t("../../data/bucket/symbol_bucket"),o=t("../../util/token"),a=t("../../style-spec/expression").isExpression,s=t("assert"),l=t("./symbol_style_layer_properties"),u=t("../properties"),c=(u.Transitionable,u.Transitioning,u.Layout,u.PossiblyEvaluated,function(t){function e(e){t.call(this,e,l)}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype.recalculate=function(e){t.prototype.recalculate.call(this,e),"auto"===this.layout.get("icon-rotation-alignment")&&("line"===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")&&("line"===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"))},e.prototype.getValueAndResolveTokens=function(t,e){var r=this.layout.get(t).evaluate(e),i=this._unevaluatedLayout._values[t];return i.isDataDriven()||a(i.value)?r:o(e.properties,r)},e.prototype.createBucket=function(t){return new n(t)},e.prototype.queryRadius=function(){return 0},e.prototype.queryIntersectsFeature=function(){return s(!1),!1},e}(i));e.exports=c},{"../../data/bucket/symbol_bucket":58,"../../style-spec/expression":137,"../../util/token":266,"../properties":184,"../style_layer":187,"./symbol_style_layer_properties":203,assert:11}],203:[function(t,e,r){"use strict";var i=t("../../style-spec/reference/latest"),n=t("../properties"),o=n.Properties,a=n.DataConstantProperty,s=n.DataDrivenProperty,l=(n.CrossFadedProperty,n.HeatmapColorProperty,new o({"symbol-placement":new a(i.layout_symbol["symbol-placement"]),"symbol-spacing":new a(i.layout_symbol["symbol-spacing"]),"symbol-avoid-edges":new a(i.layout_symbol["symbol-avoid-edges"]),"icon-allow-overlap":new a(i.layout_symbol["icon-allow-overlap"]),"icon-ignore-placement":new a(i.layout_symbol["icon-ignore-placement"]),"icon-optional":new a(i.layout_symbol["icon-optional"]),"icon-rotation-alignment":new a(i.layout_symbol["icon-rotation-alignment"]),"icon-size":new s(i.layout_symbol["icon-size"]),"icon-text-fit":new a(i.layout_symbol["icon-text-fit"]),"icon-text-fit-padding":new a(i.layout_symbol["icon-text-fit-padding"]),"icon-image":new s(i.layout_symbol["icon-image"]),"icon-rotate":new s(i.layout_symbol["icon-rotate"]),"icon-padding":new a(i.layout_symbol["icon-padding"]),"icon-keep-upright":new a(i.layout_symbol["icon-keep-upright"]),"icon-offset":new s(i.layout_symbol["icon-offset"]),"icon-anchor":new s(i.layout_symbol["icon-anchor"]),"icon-pitch-alignment":new a(i.layout_symbol["icon-pitch-alignment"]),"text-pitch-alignment":new a(i.layout_symbol["text-pitch-alignment"]),"text-rotation-alignment":new a(i.layout_symbol["text-rotation-alignment"]),"text-field":new s(i.layout_symbol["text-field"]),"text-font":new a(i.layout_symbol["text-font"]),"text-size":new s(i.layout_symbol["text-size"]),"text-max-width":new s(i.layout_symbol["text-max-width"]),"text-line-height":new a(i.layout_symbol["text-line-height"]),"text-letter-spacing":new s(i.layout_symbol["text-letter-spacing"]),"text-justify":new s(i.layout_symbol["text-justify"]),"text-anchor":new s(i.layout_symbol["text-anchor"]),"text-max-angle":new a(i.layout_symbol["text-max-angle"]),"text-rotate":new s(i.layout_symbol["text-rotate"]),"text-padding":new a(i.layout_symbol["text-padding"]),"text-keep-upright":new a(i.layout_symbol["text-keep-upright"]),"text-transform":new s(i.layout_symbol["text-transform"]),"text-offset":new s(i.layout_symbol["text-offset"]),"text-allow-overlap":new a(i.layout_symbol["text-allow-overlap"]),"text-ignore-placement":new a(i.layout_symbol["text-ignore-placement"]),"text-optional":new a(i.layout_symbol["text-optional"])})),u=new o({"icon-opacity":new s(i.paint_symbol["icon-opacity"]),"icon-color":new s(i.paint_symbol["icon-color"]),"icon-halo-color":new s(i.paint_symbol["icon-halo-color"]),"icon-halo-width":new s(i.paint_symbol["icon-halo-width"]),"icon-halo-blur":new s(i.paint_symbol["icon-halo-blur"]),"icon-translate":new a(i.paint_symbol["icon-translate"]),"icon-translate-anchor":new a(i.paint_symbol["icon-translate-anchor"]),"text-opacity":new s(i.paint_symbol["text-opacity"]),"text-color":new s(i.paint_symbol["text-color"]),"text-halo-color":new s(i.paint_symbol["text-halo-color"]),"text-halo-width":new s(i.paint_symbol["text-halo-width"]),"text-halo-blur":new s(i.paint_symbol["text-halo-blur"]),"text-translate":new a(i.paint_symbol["text-translate"]),"text-translate-anchor":new a(i.paint_symbol["text-translate-anchor"])});e.exports={paint:u,layout:l}},{"../../style-spec/reference/latest":149,"../properties":184}],204:[function(t,e,r){"use strict";var i=t("./style_layer"),n=t("../util/util"),o=t("../style-spec/feature_filter"),a=t("../style-spec/group_by_layout"),s=function(t){t&&this.replace(t)};s.prototype.replace=function(t){this._layerConfigs={},this._layers={},this.update(t,[])},s.prototype.update=function(t,e){for(var r=this,s=0,l=t;s<l.length;s+=1){var u=l[s];r._layerConfigs[u.id]=u;var c=r._layers[u.id]=i.create(u);c._featureFilter=o(c.filter)}for(var p=0,h=e;p<h.length;p+=1){var f=h[p];delete r._layerConfigs[f],delete r._layers[f]}this.familiesBySource={};for(var d=0,m=a(n.values(this._layerConfigs));d<m.length;d+=1){var y=m[d].map(function(t){return r._layers[t.id]}),g=y[0];if("none"!==g.visibility){var v=g.source||"",_=r.familiesBySource[v];_||(_=r.familiesBySource[v]={});var x=g.sourceLayer||"_geojsonTileLayer",b=_[x];b||(b=_[x]=[]),b.push(y)}}},e.exports=s},{"../style-spec/feature_filter":146,"../style-spec/group_by_layout":148,"../util/util":267,"./style_layer":187}],205:[function(t,e,r){"use strict";e.exports=t("../style-spec/validate_style.min"),e.exports.emitErrors=function(t,e){if(e&&e.length){for(var r=0,i=e;r<i.length;r+=1){var n=i[r].message;t.fire("error",{error:new Error(n)})}return!0}return!1}},{"../style-spec/validate_style.min":178}],206:[function(t,e,r){"use strict";var i=function(t){function e(e,r,i,n){t.call(this,e,r),this.angle=i,void 0!==n&&(this.segment=n)}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype.clone=function(){return new e(this.x,this.y,this.angle,this.segment)},e}(t("@mapbox/point-geometry"));e.exports=i},{"@mapbox/point-geometry":2}],207:[function(t,e,r){"use strict";e.exports=function(t,e,r,i,n){if(void 0===e.segment)return!0;for(var o=e,a=e.segment+1,s=0;s>-r/2;){if(--a<0)return!1;s-=t[a].dist(o),o=t[a]}s+=t[a].dist(t[a+1]),a++;for(var l=[],u=0;s<r/2;){var c=t[a-1],p=t[a],h=t[a+1];if(!h)return!1;var f=c.angleTo(p)-p.angleTo(h);for(f=Math.abs((f+3*Math.PI)%(2*Math.PI)-Math.PI),l.push({distance:s,angleDelta:f}),u+=f;s-l[0].distance>i;)u-=l.shift().angleDelta;if(u>n)return!1;a++,s+=p.dist(h)}return!0}},{}],208:[function(t,e,r){"use strict";var i=t("@mapbox/point-geometry");e.exports=function(t,e,r,n,o){for(var a=[],s=0;s<t.length;s++)for(var l=t[s],u=void 0,c=0;c<l.length-1;c++){var p=l[c],h=l[c+1];p.x<e&&h.x<e||(p.x<e?p=new i(e,p.y+(h.y-p.y)*((e-p.x)/(h.x-p.x)))._round():h.x<e&&(h=new i(e,p.y+(h.y-p.y)*((e-p.x)/(h.x-p.x)))._round()),p.y<r&&h.y<r||(p.y<r?p=new i(p.x+(h.x-p.x)*((r-p.y)/(h.y-p.y)),r)._round():h.y<r&&(h=new i(p.x+(h.x-p.x)*((r-p.y)/(h.y-p.y)),r)._round()),p.x>=n&&h.x>=n||(p.x>=n?p=new i(n,p.y+(h.y-p.y)*((n-p.x)/(h.x-p.x)))._round():h.x>=n&&(h=new i(n,p.y+(h.y-p.y)*((n-p.x)/(h.x-p.x)))._round()),p.y>=o&&h.y>=o||(p.y>=o?p=new i(p.x+(h.x-p.x)*((o-p.y)/(h.y-p.y)),o)._round():h.y>=o&&(h=new i(p.x+(h.x-p.x)*((o-p.y)/(h.y-p.y)),o)._round()),u&&p.equals(u[u.length-1])||(u=[p],a.push(u)),u.push(h)))))}return a}},{"@mapbox/point-geometry":2}],209:[function(t,e,r){"use strict";var i=t("../util/struct_array"),n=t("@mapbox/point-geometry"),o=i({members:[{type:"Int16",name:"anchorPointX"},{type:"Int16",name:"anchorPointY"},{type:"Int16",name:"x1"},{type:"Int16",name:"y1"},{type:"Int16",name:"x2"},{type:"Int16",name:"y2"},{type:"Uint32",name:"featureIndex"},{type:"Uint16",name:"sourceLayerIndex"},{type:"Uint16",name:"bucketIndex"},{type:"Int16",name:"radius"},{type:"Int16",name:"signedDistanceFromAnchor"}]});Object.defineProperty(o.prototype.StructType.prototype,"anchorPoint",{get:function(){return new n(this.anchorPointX,this.anchorPointY)}}),e.exports=o},{"../util/struct_array":264,"@mapbox/point-geometry":2}],210:[function(t,e,r){"use strict";var i=function(t,e,r,i,n,o,a,s,l,u,c){var p=a.top*s-l,h=a.bottom*s+l,f=a.left*s-l,d=a.right*s+l;if(this.boxStartIndex=t.length,u){var m=h-p,y=d-f;m>0&&(m=Math.max(10*s,m),this._addLineCollisionCircles(t,e,r,r.segment,y,m,i,n,o,c))}else t.emplaceBack(r.x,r.y,f,p,d,h,i,n,o,0,0);this.boxEndIndex=t.length};i.prototype._addLineCollisionCircles=function(t,e,r,i,n,o,a,s,l,u){var c=o/2,p=Math.floor(n/c),h=1+.4*Math.log(u)/Math.LN2,f=Math.floor(p*h/2),d=-o/2,m=r,y=i+1,g=d,v=-n/2,_=v-n/4;do{if(--y<0){if(g>v)return;y=0;break}g-=e[y].dist(m),m=e[y]}while(g>_);for(var x=e[y].dist(e[y+1]),b=-f;b<p+f;b++){var w=b*c,z=v+w;if(w<0&&(z+=w),w>n&&(z+=w-n),!(z<g)){for(;g+x<z;){if(g+=x,++y+1>=e.length)return;x=e[y].dist(e[y+1])}var T=z-g,S=e[y],A=e[y+1].sub(S)._unit()._mult(T)._add(S)._round(),E=Math.abs(z-d)<c?0:.8*(z-d);t.emplaceBack(A.x,A.y,-o/2,-o/2,o/2,o/2,a,s,l,o/2,E)}}},e.exports=i},{}],211:[function(t,e,r){"use strict";function i(t,e,r){t[e+4]=r?1:0}var n=t("@mapbox/point-geometry"),o=t("../util/intersection_tests"),a=t("./grid_index"),s=(t("@mapbox/gl-matrix").mat4,t("../symbol/projection")),l=function(t,e,r){void 0===e&&(e=new a(t.width+200,t.height+200,25)),void 0===r&&(r=new a(t.width+200,t.height+200,25)),this.transform=t,this.grid=e,this.ignoredGrid=r,this.pitchfactor=Math.cos(t._pitch)*t.cameraToCenterDistance};l.prototype.placeCollisionBox=function(t,e,r,i){var n=this.projectAndGetPerspectiveRatio(i,t.anchorPointX,t.anchorPointY),o=r*n.perspectiveRatio,a=t.x1/o+n.point.x,s=t.y1/o+n.point.y,l=t.x2/o+n.point.x,u=t.y2/o+n.point.y;return!e&&this.grid.hitTest(a,s,l,u)?[]:[a,s,l,u]},l.prototype.approximateTileDistance=function(t,e,r,i,n){var o=n?1:i/this.pitchfactor,a=t.lastSegmentViewportDistance*r;return t.prevTileDistance+a+(o-1)*a*Math.abs(Math.sin(e))},l.prototype.placeCollisionCircles=function(t,e,r,o,a,l,u,c,p,h,f,d,m){var y=this,g=[],v=this.projectAnchor(h,l.anchorX,l.anchorY),_={},x=p/24,b=l.lineOffsetX*p,w=l.lineOffsetY*p,z=new n(l.anchorX,l.anchorY),T=s.project(z,f).point,S=s.placeFirstAndLastGlyph(x,c,b,w,!1,T,z,l,u,f,_,!0),A=!1,E=v.perspectiveRatio*o,C=E/r,k=0,M=0;S&&(k=this.approximateTileDistance(S.first.tileDistance,S.first.angle,C,v.cameraDistance,m),M=this.approximateTileDistance(S.last.tileDistance,S.last.angle,C,v.cameraDistance,m));for(var I=0;I<t.length;I+=5){var P=t[I],L=t[I+1],R=t[I+2],D=t[I+3];if(!S||D<-k||D>M)i(t,I,!1);else{var B=y.projectPoint(h,P,L),O=R/E;if(g.length>0){var F=B.x-g[g.length-4],j=B.y-g[g.length-3];if(O*O*2>F*F+j*j&&I+8<t.length){var V=t[I+8];if(V>-k&&V<M){i(t,I,!1);continue}}}var N=I/5;if(g.push(B.x,B.y,O,N),i(t,I,!0),!e&&y.grid.hitTestCircle(B.x,B.y,O)){if(!d)return[];A=!0}}}return A?[]:g},l.prototype.queryRenderedSymbols=function(t,e,r,i,a,s){var l=this,u={},c=[];if(0===t.length||0===this.grid.keysLength()&&0===this.ignoredGrid.keysLength())return c;for(var p=this.transform.calculatePosMatrix(e,r),h=[],f=1/0,d=1/0,m=-1/0,y=-1/0,g=0;g<t.length;g++)for(var v=t[g],_=0;_<v.length;_++){var x=l.projectPoint(p,v[_].x,v[_].y);f=Math.min(f,x.x),d=Math.min(d,x.y),m=Math.max(m,x.x),y=Math.max(y,x.y),h.push(x)}for(var b=e.id,w=[],z=this.grid.query(f,d,m,y),T=0;T<z.length;T++)z[T].sourceID===s&&z[T].tileID===b&&w.push(z[T].boxIndex);for(var S=this.ignoredGrid.query(f,d,m,y),A=0;A<S.length;A++)S[A].sourceID===s&&S[A].tileID===b&&w.push(S[A].boxIndex);for(var E=0;E<w.length;E++){var C=a.get(w[E]),k=C.sourceLayerIndex,M=C.featureIndex,I=C.bucketIndex;if(void 0===u[k]&&(u[k]={}),void 0===u[k][M]&&(u[k][M]={}),!u[k][M][I]){var P=l.projectAndGetPerspectiveRatio(p,C.anchorPointX,C.anchorPointY),L=i*P.perspectiveRatio,R=C.x1/L+P.point.x,D=C.y1/L+P.point.y,B=C.x2/L+P.point.x,O=C.y2/L+P.point.y,F=[new n(R,D),new n(B,D),new n(B,O),new n(R,O)];o.polygonIntersectsPolygon(h,F)&&(u[k][M][I]=!0,c.push(w[E]))}}return c},l.prototype.insertCollisionBox=function(t,e,r,i,n){var o={tileID:r,sourceID:i,boxIndex:n};(e?this.ignoredGrid:this.grid).insert(o,t[0],t[1],t[2],t[3])},l.prototype.insertCollisionCircles=function(t,e,r,i,n){for(var o=e?this.ignoredGrid:this.grid,a=0;a<t.length;a+=4){var s={tileID:r,sourceID:i,boxIndex:n+t[a+3]};o.insertCircle(s,t[a],t[a+1],t[a+2])}},l.prototype.projectAnchor=function(t,e,r){var i=[e,r,0,1];return s.xyTransformMat4(i,i,t),{perspectiveRatio:.5+i[3]/this.transform.cameraToCenterDistance*.5,cameraDistance:i[3]}},l.prototype.projectPoint=function(t,e,r){var i=[e,r,0,1];return s.xyTransformMat4(i,i,t),new n((i[0]/i[3]+1)/2*this.transform.width+100,(-i[1]/i[3]+1)/2*this.transform.height+100)},l.prototype.projectAndGetPerspectiveRatio=function(t,e,r){var i=[e,r,0,1];return s.xyTransformMat4(i,i,t),{point:new n((i[0]/i[3]+1)/2*this.transform.width+100,(-i[1]/i[3]+1)/2*this.transform.height+100),perspectiveRatio:.5+i[3]/this.transform.cameraToCenterDistance*.5}},e.exports=l},{"../symbol/projection":217,"../util/intersection_tests":258,"./grid_index":214,"@mapbox/gl-matrix":1,"@mapbox/point-geometry":2}],212:[function(t,e,r){"use strict";var i=t("../data/extent"),n=t("./opacity_state"),o=t("assert"),a=512/i/2,s=function(t,e,r){var i=this;this.coord=t,this.sourceMaxZoom=e,this.symbolInstances={};for(var o=0,a=r;o<a.length;o+=1){var s=a[o],l=s.key;i.symbolInstances[l]||(i.symbolInstances[l]=[]),i.symbolInstances[l].push({instance:s,coordinates:i.getScaledCoordinates(s,t)}),s.isDuplicate=!1,s.textOpacityState=new n,s.iconOpacityState=new n}};s.prototype.getScaledCoordinates=function(t,e){var r=Math.min(this.sourceMaxZoom,e.z)-Math.min(this.sourceMaxZoom,this.coord.z),n=a/(1<<r),o=t.anchor;return{x:Math.floor((e.x*i+o.x)*n),y:Math.floor((e.y*i+o.y)*n)}},s.prototype.getMatchingSymbol=function(t,e){var r=this;if(this.symbolInstances[t.key])for(var i=this.getScaledCoordinates(t,e),n=0,o=r.symbolInstances[t.key];n<o.length;n+=1){var a=o[n];if(Math.abs(a.coordinates.x-i.x)<=1&&Math.abs(a.coordinates.y-i.y)<=1)return a.instance}},s.prototype.forEachSymbolInstance=function(t){var e=this;for(var r in e.symbolInstances)for(var i=0,n=e.symbolInstances[r];i<n.length;i+=1)t(n[i].instance)};var l=function(){this.indexes={}};l.prototype.addTile=function(t,e,r){var i=this,n=25,o=0;for(var a in i.indexes)n=Math.min(a,n),o=Math.max(a,o);for(var l=new s(t,e,r),u=o;u>t.z;u--){var c=i.indexes[u];for(var p in c){var h=c[p];h.coord.isChildOf(t,e)&&i.blockLabels(h,l,!1)}}var f=this.indexes[t.z]&&this.indexes[t.z][t.id];f&&(this.blockLabels(l,f,!0),this.removeTile(t,e));for(var d=t.z-1;d>=n;d--){var m=t.scaledTo(d,e),y=i.indexes[d]&&i.indexes[d][m.id];y&&i.blockLabels(l,y,!0)}void 0===this.indexes[t.z]&&(this.indexes[t.z]={}),this.indexes[t.z][t.id]=l},l.prototype.removeTile=function(t,e){var r=this,i=this.indexes[t.z][t.id];delete this.indexes[t.z][t.id],0===Object.keys(this.indexes[t.z]).length&&delete this.indexes[t.z];for(var n=Math.min.apply(Math,[25].concat(Object.keys(this.indexes))),o=t,a=t.z-1;a>=n&&(o=o.parent(e));a--){var s=r.indexes[a]&&r.indexes[a][o.id];s&&r.unblockLabels(i,s)}},l.prototype.blockLabels=function(t,e,r){t.forEachSymbolInstance(function(i){if(!i.isDuplicate){var n=e.getMatchingSymbol(i,t.coord);void 0!==n&&(n.isDuplicate||(n.isDuplicate=!0,r&&(i.textOpacityState=n.textOpacityState.clone(),i.iconOpacityState=n.iconOpacityState.clone())))}})},l.prototype.unblockLabels=function(t,e){o(t.coord.z>e.coord.z),t.forEachSymbolInstance(function(r){if(!r.isDuplicate){var i=e.getMatchingSymbol(r,t.coord);void 0!==i&&(i.isDuplicate=!1,i.textOpacityState=r.textOpacityState.clone(),i.iconOpacityState=r.iconOpacityState.clone(),r.isDuplicate=!0)}})};var u=function(){this.layerIndexes={}};u.prototype.addTileLayer=function(t,e,r,i){var n=this.layerIndexes[t];void 0===n&&(n=this.layerIndexes[t]=new l),n.addTile(e,r,i)},u.prototype.removeTileLayer=function(t,e,r){var i=this.layerIndexes[t];void 0!==i&&i.removeTile(e,r)},e.exports=u},{"../data/extent":59,"./opacity_state":216,assert:11}],213:[function(t,e,r){"use strict";function i(t,e,r,s,l,u,c,p,h){for(var f=u/2,d=0,m=0;m<t.length-1;m++)d+=t[m].dist(t[m+1]);for(var y=0,g=e-r,v=[],_=0;_<t.length-1;_++){for(var x=t[_],b=t[_+1],w=x.dist(b),z=b.angleTo(x);g+r<y+w;){var T=((g+=r)-y)/w,S=n(x.x,b.x,T),A=n(x.y,b.y,T);if(S>=0&&S<h&&A>=0&&A<h&&g-f>=0&&g+f<=d){var E=new o(S,A,z,_);E._round(),s&&!a(t,E,u,s,l)||v.push(E)}}y+=w}return p||v.length||c||(v=i(t,y/2,r,s,l,u,c,!0,h)),v}var n=t("../style-spec/util/interpolate").number,o=t("../symbol/anchor"),a=t("./check_max_angle");e.exports=function(t,e,r,n,o,a,s,l,u){var c=n?.6*a*s:0,p=Math.max(n?n.right-n.left:0,o?o.right-o.left:0),h=0===t[0].x||t[0].x===u||0===t[0].y||t[0].y===u;e-p*s<e/4&&(e=p*s+e/4);var f=2*a;return i(t,h?e/2*l%e:(p/2+f)*s*l%e,e,c,r,p*s,h,!1,u)}},{"../style-spec/util/interpolate":155,"../symbol/anchor":206,"./check_max_angle":207}],214:[function(t,e,r){"use strict";var i=function(t,e,r){var i=this.boxCells=[],n=this.circleCells=[];this.xCellCount=Math.ceil(t/r),this.yCellCount=Math.ceil(e/r);for(var o=0;o<this.xCellCount*this.yCellCount;o++)i.push([]),n.push([]);this.circleKeys=[],this.boxKeys=[],this.bboxes=[],this.circles=[],this.width=t,this.height=e,this.xScale=this.xCellCount/t,this.yScale=this.yCellCount/e,this.boxUid=0,this.circleUid=0};i.prototype.keysLength=function(){return this.boxKeys.length+this.circleKeys.length},i.prototype.insert=function(t,e,r,i,n){this._forEachCell(e,r,i,n,this._insertBoxCell,this.boxUid++),this.boxKeys.push(t),this.bboxes.push(e),this.bboxes.push(r),this.bboxes.push(i),this.bboxes.push(n)},i.prototype.insertCircle=function(t,e,r,i){this._forEachCell(e-i,r-i,e+i,r+i,this._insertCircleCell,this.circleUid++),this.circleKeys.push(t),this.circles.push(e),this.circles.push(r),this.circles.push(i)},i.prototype._insertBoxCell=function(t,e,r,i,n,o){this.boxCells[n].push(o)},i.prototype._insertCircleCell=function(t,e,r,i,n,o){this.circleCells[n].push(o)},i.prototype._query=function(t,e,r,i,n){if(r<0||t>this.width||i<0||e>this.height)return!n&&[];var o=[];if(t<=0&&e<=0&&this.width<=r&&this.height<=i)o=Array.prototype.slice.call(this.boxKeys).concat(this.circleKeys);else{var a={hitTest:n,seenUids:{box:{},circle:{}}};this._forEachCell(t,e,r,i,this._queryCell,o,a)}return n?o.length>0:o},i.prototype._queryCircle=function(t,e,r,i){var n=t-r,o=t+r,a=e-r,s=e+r;if(o<0||n>this.width||s<0||a>this.height)return!i&&[];var l=[],u={hitTest:i,circle:{x:t,y:e,radius:r},seenUids:{box:{},circle:{}}};return this._forEachCell(n,a,o,s,this._queryCellCircle,l,u),i?l.length>0:l},i.prototype.query=function(t,e,r,i){return this._query(t,e,r,i,!1)},i.prototype.hitTest=function(t,e,r,i){return this._query(t,e,r,i,!0)},i.prototype.hitTestCircle=function(t,e,r){return this._queryCircle(t,e,r,!0)},i.prototype._queryCell=function(t,e,r,i,n,o,a){var s=this,l=a.seenUids,u=this.boxCells[n];if(null!==u)for(var c=this.bboxes,p=0,h=u;p<h.length;p+=1){var f=h[p];if(!l.box[f]){l.box[f]=!0;var d=4*f;if(t<=c[d+2]&&e<=c[d+3]&&r>=c[d+0]&&i>=c[d+1]){if(a.hitTest)return o.push(!0),!0;o.push(s.boxKeys[f])}}}var m=this.circleCells[n];if(null!==m)for(var y=this.circles,g=0,v=m;g<v.length;g+=1){var _=v[g];if(!l.circle[_]){l.circle[_]=!0;var x=3*_;if(s._circleAndRectCollide(y[x],y[x+1],y[x+2],t,e,r,i)){if(a.hitTest)return o.push(!0),!0;o.push(s.circleKeys[_])}}}},i.prototype._queryCellCircle=function(t,e,r,i,n,o,a){var s=this,l=a.circle,u=a.seenUids,c=this.boxCells[n];if(null!==c)for(var p=this.bboxes,h=0,f=c;h<f.length;h+=1){var d=f[h];if(!u.box[d]){u.box[d]=!0;var m=4*d;if(s._circleAndRectCollide(l.x,l.y,l.radius,p[m+0],p[m+1],p[m+2],p[m+3]))return o.push(!0),!0}}var y=this.circleCells[n];if(null!==y)for(var g=this.circles,v=0,_=y;v<_.length;v+=1){var x=_[v];if(!u.circle[x]){u.circle[x]=!0;var b=3*x;if(s._circlesCollide(g[b],g[b+1],g[b+2],l.x,l.y,l.radius))return o.push(!0),!0}}},i.prototype._forEachCell=function(t,e,r,i,n,o,a){for(var s=this,l=this._convertToXCellCoord(t),u=this._convertToYCellCoord(e),c=this._convertToXCellCoord(r),p=this._convertToYCellCoord(i),h=l;h<=c;h++)for(var f=u;f<=p;f++){var d=s.xCellCount*f+h;if(n.call(s,t,e,r,i,d,o,a))return}},i.prototype._convertToXCellCoord=function(t){return Math.max(0,Math.min(this.xCellCount-1,Math.floor(t*this.xScale)))},i.prototype._convertToYCellCoord=function(t){return Math.max(0,Math.min(this.yCellCount-1,Math.floor(t*this.yScale)))},i.prototype._circlesCollide=function(t,e,r,i,n,o){var a=i-t,s=n-e,l=r+o;return l*l>a*a+s*s},i.prototype._circleAndRectCollide=function(t,e,r,i,n,o,a){var s=(o-i)/2,l=Math.abs(t-(i+s));if(l>s+r)return!1;var u=(a-n)/2,c=Math.abs(e-(n+u));if(c>u+r)return!1;if(l<=s||c<=u)return!0;var p=l-s,h=c-u;return p*p+h*h<=r*r},e.exports=i},{}],215:[function(t,e,r){"use strict";e.exports=function(t){function e(e){s.push(t[e]),l++}function r(t,e,r){var i=a[t];return delete a[t],a[e]=i,s[i].geometry[0].pop(),s[i].geometry[0]=s[i].geometry[0].concat(r[0]),i}function i(t,e,r){var i=o[e];return delete o[e],o[t]=i,s[i].geometry[0].shift(),s[i].geometry[0]=r[0].concat(s[i].geometry[0]),i}function n(t,e,r){var i=r?e[0][e[0].length-1]:e[0][0];return t+":"+i.x+":"+i.y}for(var o={},a={},s=[],l=0,u=0;u<t.length;u++){var c=t[u],p=c.geometry,h=c.text;if(h){var f=n(h,p),d=n(h,p,!0);if(f in a&&d in o&&a[f]!==o[d]){var m=i(f,d,p),y=r(f,d,s[m].geometry);delete o[f],delete a[d],a[n(h,s[y].geometry,!0)]=y,s[m].geometry=null}else f in a?r(f,d,p):d in o?i(f,d,p):(e(u),o[f]=l-1,a[d]=l-1)}else e(u)}return s.filter(function(t){return t.geometry})}},{}],216:[function(t,e,r){"use strict";var i=function(){this.opacity=0,this.targetOpacity=0,this.time=0};i.prototype.clone=function(){var t=new i;return t.opacity=this.opacity,t.targetOpacity=this.targetOpacity,t.time=this.time,t},e.exports=i},{}],217:[function(t,e,r){"use strict";function i(t,e){var r=[t.x,t.y,0,1];p(r,r,e);var i=r[3];return{point:new h(r[0]/i,r[1]/i),signedDistanceFromCamera:i}}function n(t,e){var r=t[0]/t[3],i=t[1]/t[3];return r>=-e[0]&&r<=e[0]&&i>=-e[1]&&i<=e[1]}function o(t,e,r,i,n,o,a,s,l,c,p,h){var f=s.glyphStartIndex+s.numGlyphs,d=s.lineStartIndex,m=s.lineStartIndex+s.lineLength,y=e.getoffsetX(s.glyphStartIndex),g=e.getoffsetX(f-1),v=u(t*y,r,i,n,o,a,s.segment,d,m,l,c,p,h);if(!v)return null;var _=u(t*g,r,i,n,o,a,s.segment,d,m,l,c,p,h);return _?{first:v,last:_}:null}function a(t,e,r,i){return t===_.horizontal&&Math.abs(r.y-e.y)>Math.abs(r.x-e.x)*i?{useVertical:!0}:(t===_.vertical?e.y<r.y:e.x>r.x)?{needsFlipping:!0}:null}function s(t,e,r,n,s,c,p,f,d,m,y,v,_,x){var b,w=e/24,z=t.lineOffsetX*e,T=t.lineOffsetY*e;if(t.numGlyphs>1){var S=t.glyphStartIndex+t.numGlyphs,A=t.lineStartIndex,E=t.lineStartIndex+t.lineLength,C=o(w,f,z,T,r,y,v,t,d,c,_,!1);if(!C)return{notEnoughRoom:!0};var k=i(C.first.point,p).point,M=i(C.last.point,p).point;if(n&&!r){var I=a(t.writingMode,k,M,x);if(I)return I}b=[C.first];for(var P=t.glyphStartIndex+1;P<S-1;P++)b.push(u(w*f.getoffsetX(P),z,T,r,y,v,t.segment,A,E,d,c,_,!1));b.push(C.last)}else{if(n&&!r){var L=i(v,s).point,R=t.lineStartIndex+t.segment+1,D=new h(d.getx(R),d.gety(R)),B=i(D,s),O=B.signedDistanceFromCamera>0?B.point:l(v,D,L,1,s),F=a(t.writingMode,L,O,x);if(F)return F}var j=u(w*f.getoffsetX(t.glyphStartIndex),z,T,r,y,v,t.segment,t.lineStartIndex,t.lineStartIndex+t.lineLength,d,c,_,!1);if(!j)return{notEnoughRoom:!0};b=[j]}for(var V=0,N=b;V<N.length;V+=1){var U=N[V];g(m,U.point,U.angle)}return{}}function l(t,e,r,n,o){var a=i(t.add(t.sub(e)._unit()),o).point,s=r.sub(a);return r.add(s._mult(n/s.mag()))}function u(t,e,r,n,o,a,s,u,c,p,f,d,m){var y=n?t-e:t+e,g=y>0?1:-1,v=0;n&&(g*=-1,v=Math.PI),g<0&&(v+=Math.PI);for(var _=g>0?u+s:u+s+1,x=_,b=o,w=o,z=0,T=0,S=Math.abs(y);z+T<=S;){if((_+=g)<u||_>=c)return null;if(w=b,void 0===(b=d[_])){var A=new h(p.getx(_),p.gety(_)),E=i(A,f);if(E.signedDistanceFromCamera>0)b=d[_]=E.point;else{var C=_-g;b=l(0===z?a:new h(p.getx(C),p.gety(C)),A,w,S-z+1,f)}}z+=T,T=w.dist(b)}var k=(S-z)/T,M=b.sub(w),I=M.mult(k)._add(w);return I._add(M._unit()._perp()._mult(r*g)),{point:I,angle:v+Math.atan2(b.y-w.y,b.x-w.x),tileDistance:m?{prevTileDistance:_-g===x?0:p.gettileUnitDistanceFromAnchor(_-g),lastSegmentViewportDistance:S-z}:null}}function c(t,e){for(var r=0;r<t;r++){var i=e.length;e.resize(i+4),e.float32.set(x,3*i)}}function p(t,e,r){var i=e[0],n=e[1];return t[0]=r[0]*i+r[4]*n+r[12],t[1]=r[1]*i+r[5]*n+r[13],t[3]=r[3]*i+r[7]*n+r[15],t}var h=t("@mapbox/point-geometry"),f=t("@mapbox/gl-matrix"),d=f.mat4,m=f.vec4,y=t("./symbol_size"),g=t("../data/bucket/symbol_bucket").addDynamicAttributes,v=t("../style/style_layer/symbol_style_layer_properties").layout,_=t("../symbol/shaping").WritingMode;e.exports={updateLineLabels:function(t,e,r,o,a,l,u,p){var f=o?t.textSizeData:t.iconSizeData,d=y.evaluateSizeForZoom(f,r.transform.zoom,v.properties[o?"text-size":"icon-size"]),g=[256/r.width*2+1,256/r.height*2+1],x=o?t.text.dynamicLayoutVertexArray:t.icon.dynamicLayoutVertexArray;x.clear();for(var b=t.lineVertexArray,w=o?t.placedGlyphArray:t.placedIconArray,z=r.transform.width/r.transform.height,T=!1,S=0;S<w.length;S++){var A=w.get(S);if(A.hidden||A.writingMode===_.vertical&&!T)c(A.numGlyphs,x);else{T=!1;var E=[A.anchorX,A.anchorY,0,1];if(m.transformMat4(E,E,e),n(E,g)){var C=.5+E[3]/r.transform.cameraToCenterDistance*.5,k=y.evaluateSizeForFeature(f,d,A),M=u?k*C:k/C,I=new h(A.anchorX,A.anchorY),P=i(I,a).point,L={},R=s(A,M,!1,p,e,a,l,t.glyphOffsetArray,b,x,P,I,L,z);T=R.useVertical,(R.notEnoughRoom||T||R.needsFlipping&&s(A,M,!0,p,e,a,l,t.glyphOffsetArray,b,x,P,I,L,z).notEnoughRoom)&&c(A.numGlyphs,x)}else c(A.numGlyphs,x)}}o?t.text.dynamicLayoutVertexBuffer.updateData(x.serialize()):t.icon.dynamicLayoutVertexBuffer.updateData(x.serialize())},getLabelPlaneMatrix:function(t,e,r,i,n){var o=d.identity(new Float32Array(16));return e?(d.identity(o),d.scale(o,o,[1/n,1/n,1]),r||d.rotateZ(o,o,i.angle)):(d.scale(o,o,[i.width/2,-i.height/2,1]),d.translate(o,o,[1,-1,0]),d.multiply(o,o,t)),o},getGlCoordMatrix:function(t,e,r,i,n){var o=d.identity(new Float32Array(16));return e?(d.multiply(o,o,t),d.scale(o,o,[n,n,1]),r||d.rotateZ(o,o,-i.angle)):(d.scale(o,o,[1,-1,1]),d.translate(o,o,[-1,-1,0]),d.scale(o,o,[2/i.width,2/i.height,1])),o},project:i,placeFirstAndLastGlyph:o,xyTransformMat4:p};var x=new Float32Array([-1/0,-1/0,0,-1/0,-1/0,0,-1/0,-1/0,0,-1/0,-1/0,0])},{"../data/bucket/symbol_bucket":58,"../style/style_layer/symbol_style_layer_properties":203,"../symbol/shaping":219,"./symbol_size":222,"@mapbox/gl-matrix":1,"@mapbox/point-geometry":2}],218:[function(t,e,r){"use strict";var i=t("@mapbox/point-geometry"),n=t("../style/parse_glyph_pbf").GLYPH_PBF_BORDER;e.exports={getIconQuads:function(t,e,r,n,o,a,s){var l,u,c,p,h=e.image,f=r.layout,d=e.top-1/h.pixelRatio,m=e.left-1/h.pixelRatio,y=e.bottom+1/h.pixelRatio,g=e.right+1/h.pixelRatio;if("none"!==f.get("icon-text-fit")&&o){var v=g-m,_=y-d,x=f.get("text-size").evaluate(s)/24,b=o.left*x,w=o.right*x,z=o.top*x,T=w-b,S=o.bottom*x-z,A=f.get("icon-text-fit-padding")[0],E=f.get("icon-text-fit-padding")[1],C=f.get("icon-text-fit-padding")[2],k=f.get("icon-text-fit-padding")[3],M="width"===f.get("icon-text-fit")?.5*(S-_):0,I="height"===f.get("icon-text-fit")?.5*(T-v):0,P="width"===f.get("icon-text-fit")||"both"===f.get("icon-text-fit")?T:v,L="height"===f.get("icon-text-fit")||"both"===f.get("icon-text-fit")?S:_;l=new i(b+I-k,z+M-A),u=new i(b+I+E+P,z+M-A),c=new i(b+I+E+P,z+M+C+L),p=new i(b+I-k,z+M+C+L)}else l=new i(m,d),u=new i(g,d),c=new i(g,y),p=new i(m,y);var R=r.layout.get("icon-rotate").evaluate(s)*Math.PI/180;if(R){var D=Math.sin(R),B=Math.cos(R),O=[B,-D,D,B];l._matMult(O),u._matMult(O),p._matMult(O),c._matMult(O)}return[{tl:l,tr:u,bl:p,br:c,tex:{x:h.textureRect.x-1,y:h.textureRect.y-1,w:h.textureRect.w+2,h:h.textureRect.h+2},writingMode:void 0,glyphOffset:[0,0]}]},getGlyphQuads:function(t,e,r,o,a,s,l){for(var u=r.layout.get("text-rotate").evaluate(s)*Math.PI/180,c=r.layout.get("text-offset").evaluate(s).map(function(t){return 24*t}),p=e.positionedGlyphs,h=[],f=0;f<p.length;f++){var d=p[f],m=l[d.glyph];if(m){var y=m.rect;if(y){var g=n+1,v=m.metrics.advance/2,_=o?[d.x+v,d.y]:[0,0],x=o?[0,0]:[d.x+v+c[0],d.y+c[1]],b=m.metrics.left-g-v+x[0],w=-m.metrics.top-g+x[1],z=b+y.w,T=w+y.h,S=new i(b,w),A=new i(z,w),E=new i(b,T),C=new i(z,T);if(o&&d.vertical){var k=new i(-v,v),M=-Math.PI/2,I=new i(5,0);S._rotateAround(M,k)._add(I),A._rotateAround(M,k)._add(I),E._rotateAround(M,k)._add(I),C._rotateAround(M,k)._add(I)}if(u){var P=Math.sin(u),L=Math.cos(u),R=[L,-P,P,L];S._matMult(R),A._matMult(R),E._matMult(R),C._matMult(R)}h.push({tl:S,tr:A,bl:E,br:C,tex:y,writingMode:e.writingMode,glyphOffset:_})}}}return h}}},{"../style/parse_glyph_pbf":182,"@mapbox/point-geometry":2}],219:[function(t,e,r){"use strict";function i(t,e){for(var r=[],i=0,n=0,o=e;n<o.length;n+=1){var a=o[n];r.push(t.substring(i,a)),i=a}return i<t.length&&r.push(t.substring(i,t.length)),r}function n(t,e,r,i){for(var n=0,o=0;o<t.length;o++){var a=i[t.charCodeAt(o)];a&&(n+=a.metrics.advance+e)}return n/Math.max(1,Math.ceil(n/r))}function o(t,e,r,i){var n=Math.pow(t-e,2);return i?t<e?n/2:2*n:n+Math.abs(r)*r}function a(t,e){var r=0;return 10===t&&(r-=1e4),40!==t&&65288!==t||(r+=50),41!==e&&65289!==e||(r+=50),r}function s(t,e,r,i,n,a){for(var s=null,l=o(e,r,n,a),u=0,c=i;u<c.length;u+=1){var p=c[u],h=o(e-p.x,r,n,a)+p.badness;h<=l&&(s=p,l=h)}return{index:t,x:e,priorBreak:s,badness:l}}function l(t){return t?l(t.priorBreak).concat(t.index):[]}function u(t,e,r,i){if(!r)return[];if(!t)return[];for(var o=[],u=n(t,e,r,i),c=0,p=0;p<t.length;p++){var h=t.charCodeAt(p),f=i[h];f&&!v[h]&&(c+=f.metrics.advance+e),p<t.length-1&&(_[h]||d.charAllowsIdeographicBreaking(h))&&o.push(s(p+1,c,u,o,a(h,t.charCodeAt(p+1)),!1))}return l(s(t.length,c,u,o,0,!0))}function c(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}}function p(t,e,r,i,n,o,a,s,l){for(var u=0,p=-17,m=0,y=t.positionedGlyphs,v="right"===o?1:"left"===o?0:.5,_=0,x=r;_<x.length;_+=1){var b=x[_];if((b=b.trim()).length){for(var w=y.length,z=0;z<b.length;z++){var T=b.charCodeAt(z),S=e[T];S&&(d.charHasUprightVerticalOrientation(T)&&a!==g.horizontal?(y.push({glyph:T,x:u,y:0,vertical:!0}),u+=l+s):(y.push({glyph:T,x:u,y:p,vertical:!1}),u+=S.metrics.advance+s))}if(y.length!==w){var A=u-s;m=Math.max(A,m),h(y,e,w,y.length-1,v)}u=0,p+=i}else p+=i}var E=c(n),C=E.horizontalAlign,k=E.verticalAlign;f(y,v,C,k,m,i,r.length);var M=r.length*i;t.top+=-k*M,t.bottom=t.top+M,t.left+=-C*m,t.right=t.left+m}function h(t,e,r,i,n){if(n){var o=e[t[i].glyph];if(o)for(var a=o.metrics.advance,s=(t[i].x+a)*n,l=r;l<=i;l++)t[l].x-=s}}function f(t,e,r,i,n,o,a){for(var s=(e-r)*n,l=(-i*a+.5)*o,u=0;u<t.length;u++)t[u].x+=s,t[u].y+=l}var d=t("../util/script_detection"),m=t("../util/verticalize_punctuation"),y=t("../source/rtl_text_plugin"),g={horizontal:1,vertical:2,horizontalOnly:3};e.exports={shapeText:function(t,e,r,n,o,a,s,l,c,h){var f=t.trim();h===g.vertical&&(f=m(f));var d,v=[],_={positionedGlyphs:v,text:f,top:l[1],bottom:l[1],left:l[0],right:l[0],writingMode:h},x=y.processBidirectionalText;return d=x?x(f,u(f,s,r,e)):i(f,u(f,s,r,e)),p(_,e,d,n,o,a,h,s,c),!!v.length&&_},shapeIcon:function(t,e,r){var i=c(r),n=i.horizontalAlign,o=i.verticalAlign,a=e[0],s=e[1],l=a-t.displaySize[0]*n,u=l+t.displaySize[0],p=s-t.displaySize[1]*o;return{image:t,top:p,bottom:p+t.displaySize[1],left:l,right:u}},WritingMode:g};var v={};v[9]=!0,v[10]=!0,v[11]=!0,v[12]=!0,v[13]=!0,v[32]=!0;var _={};_[10]=!0,_[32]=!0,_[38]=!0,_[40]=!0,_[41]=!0,_[43]=!0,_[45]=!0,_[47]=!0,_[173]=!0,_[183]=!0,_[8203]=!0,_[8208]=!0,_[8211]=!0,_[8231]=!0},{"../source/rtl_text_plugin":108,"../util/script_detection":262,"../util/verticalize_punctuation":269}],220:[function(t,e,r){"use strict";function i(t,e,r,i,n){var c=t.layoutTextSize.evaluate(e),p=t.layoutIconSize.evaluate(e),h=t.textMaxSize.evaluate(e);void 0===h&&(h=c);var f=t.layers[0].layout,d=f.get("text-offset").evaluate(e),m=f.get("icon-offset").evaluate(e),y=c/24,g=t.tilePixelRatio*y,v=t.tilePixelRatio*h/24,_=t.tilePixelRatio*p,x=t.tilePixelRatio*f.get("symbol-spacing"),T=f.get("text-padding")*t.tilePixelRatio,S=f.get("icon-padding")*t.tilePixelRatio,A=f.get("text-max-angle")/180*Math.PI,E="map"===f.get("text-rotation-alignment")&&"line"===f.get("symbol-placement"),C="map"===f.get("icon-rotation-alignment")&&"line"===f.get("symbol-placement"),k=x/2,M=function(a,s){s.x<0||s.x>=z||s.y<0||s.y>=z||t.symbolInstances.push(o(t,s,a,r,i,t.layers[0],t.collisionBoxArray,e.index,e.sourceLayerIndex,t.index,g,T,E,d,_,S,C,m,{zoom:t.zoom},e,n))};if("line"===f.get("symbol-placement"))for(var I=0,P=u(e.geometry,0,0,z,z);I<P.length;I+=1)for(var L=P[I],R=0,D=l(L,x,A,r.vertical||r.horizontal,i,24,v,t.overscaling,z);R<D.length;R+=1){var B=D[R],O=r.horizontal;O&&a(t,O.text,k,B)||M(L,B)}else if("Polygon"===e.type)for(var F=0,j=w(e.geometry,0);F<j.length;F+=1){var V=j[F],N=b(V,16);M(V[0],new s(N.x,N.y,0))}else if("LineString"===e.type)for(var U=0,q=e.geometry;U<q.length;U+=1){var G=q[U];M(G,new s(G[0].x,G[0].y,0))}else if("Point"===e.type)for(var Z=0,W=e.geometry;Z<W.length;Z+=1)for(var X=0,H=W[Z];X<H.length;X+=1){var K=H[X];M([K],new s(K.x,K.y,0))}}function n(t,e,r,i,n,o,a,s,l,u,c,p){var h=y(e,r,i,n,o,a,p),f=t.textSizeData,d=null;return"source"===f.functionType?d=[10*i.layout.get("text-size").evaluate(a)]:"composite"===f.functionType&&(d=[10*t.compositeTextSizes[0].evaluate(a),10*t.compositeTextSizes[1].evaluate(a)]),t.addSymbols(t.text,h,d,s,n,a,u,e,l.lineStartIndex,l.lineLength,t.placedGlyphArray),c.push(t.placedGlyphArray.length-1),4*h.length}function o(t,e,r,i,o,a,s,l,u,p,h,f,m,y,x,b,w,z,S,A,E){var C,k,M=t.addToLineVertexArray(e,r),I=0,P=0,L=0,R=i.horizontal?i.horizontal.text:"",D=[];i.horizontal&&(C=new v(s,r,e,l,u,p,i.horizontal,h,f,m,t.overscaling),P+=n(t,e,i.horizontal,a,m,S,A,y,M,i.vertical?d.horizontal:d.horizontalOnly,D,E),i.vertical&&(L+=n(t,e,i.vertical,a,m,S,A,y,M,d.vertical,D,E)));var B=C?C.boxStartIndex:t.collisionBoxArray.length,O=C?C.boxEndIndex:t.collisionBoxArray.length;if(o){var F=g(e,o,a,w,i.horizontal,S,A);k=new v(s,r,e,l,u,p,o,x,b,!1,t.overscaling),I=4*F.length;var j=t.iconSizeData,V=null;"source"===j.functionType?V=[10*a.layout.get("icon-size").evaluate(A)]:"composite"===j.functionType&&(V=[10*t.compositeIconSizes[0].evaluate(A),10*t.compositeIconSizes[1].evaluate(A)]),t.addSymbols(t.icon,F,V,z,w,A,!1,e,M.lineStartIndex,M.lineLength,t.placedIconArray)}var N=k?k.boxStartIndex:t.collisionBoxArray.length,U=k?k.boxEndIndex:t.collisionBoxArray.length;return t.glyphOffsetArray.length>=T.MAX_GLYPHS&&_.warnOnce("Too many glyphs being rendered in a tile. See https://github.com/mapbox/mapbox-gl-js/issues/2907"),{key:R,textBoxStartIndex:B,textBoxEndIndex:O,iconBoxStartIndex:N,iconBoxEndIndex:U,textOffset:y,iconOffset:z,anchor:e,line:r,featureIndex:l,feature:A,numGlyphVertices:P,numVerticalGlyphVertices:L,numIconVertices:I,textOpacityState:new c,iconOpacityState:new c,isDuplicate:!1,placedTextSymbolIndices:D}}function a(t,e,r,i){var n=t.compareText;if(e in n){for(var o=n[e],a=o.length-1;a>=0;a--)if(i.dist(o[a])<r)return!0}else n[e]=[];return n[e].push(i),!1}var s=t("./anchor"),l=t("./get_anchors"),u=t("./clip_line"),c=t("./opacity_state"),p=t("./shaping"),h=p.shapeText,f=p.shapeIcon,d=p.WritingMode,m=t("./quads"),y=m.getGlyphQuads,g=m.getIconQuads,v=t("./collision_feature"),_=t("../util/util"),x=t("../util/script_detection"),b=t("../util/find_pole_of_inaccessibility"),w=t("../util/classify_rings"),z=t("../data/extent"),T=t("../data/bucket/symbol_bucket");t("@mapbox/point-geometry");e.exports={performSymbolLayout:function(t,e,r,n,o,a){t.createArrays(),t.symbolInstances=[];var s=512*t.overscaling;t.tilePixelRatio=z/s,t.compareText={},t.iconsNeedLinear=!1;for(var l=t.layers[0].layout,u=24*l.get("text-line-height"),c=l.get("text-font").join(","),p="map"===l.get("text-rotation-alignment")&&"line"===l.get("symbol-placement"),m=l.get("text-keep-upright"),y=e[c]||{},g=r[c]||{},v=0,b=t.features;v<b.length;v+=1){var w=b[v],T={},S=w.text;if(S){var A=x.allowsVerticalWritingMode(S),E=l.get("text-offset").evaluate(w).map(function(t){return 24*t}),C=24*l.get("text-letter-spacing").evaluate(w),k=x.allowsLetterSpacing(S)?C:0,M=l.get("text-anchor").evaluate(w),I=l.get("text-justify").evaluate(w),P="line"!==l.get("symbol-placement")?24*l.get("text-max-width").evaluate(w):0;T.horizontal=h(S,y,P,u,M,I,k,E,24,d.horizontal),A&&p&&m&&(T.vertical=h(S,y,P,u,M,I,k,E,24,d.vertical))}var L=void 0;if(w.icon){var R=n[w.icon];R&&(L=f(o[w.icon],l.get("icon-offset").evaluate(w),l.get("icon-anchor").evaluate(w)),void 0===t.sdfIcons?t.sdfIcons=R.sdf:t.sdfIcons!==R.sdf&&_.warnOnce("Style sheet warning: Cannot mix SDF and non-SDF icons in one buffer"),R.pixelRatio!==t.pixelRatio?t.iconsNeedLinear=!0:0!==l.get("icon-rotate").constantOr(1)&&(t.iconsNeedLinear=!0))}(T.horizontal||L)&&i(t,w,T,L,g)}a&&t.generateCollisionDebugBuffers()}}},{"../data/bucket/symbol_bucket":58,"../data/extent":59,"../util/classify_rings":249,"../util/find_pole_of_inaccessibility":255,"../util/script_detection":262,"../util/util":267,"./anchor":206,"./clip_line":208,"./collision_feature":210,"./get_anchors":213,"./opacity_state":216,"./quads":218,"./shaping":219,"@mapbox/point-geometry":2}],221:[function(t,e,r){"use strict";function i(t,e,r,i,n){if(t.isDuplicate)e.opacity=0,e.targetOpacity=0;else{e.targetOpacity!==r&&(n.latestStart=i);var o=n.duration?(i-e.time)/n.duration:1;e.opacity=Math.max(0,Math.min(1,e.opacity+(1===e.targetOpacity?o:-o))),e.targetOpacity=r,e.time=i}}function n(t){if(0===t.opacity&&0===t.targetOpacity)return 0;if(1===t.opacity&&1===t.targetOpacity)return 4294967295;var e=1===t.targetOpacity?1:0,r=Math.floor(127*t.opacity);return r*u+e*c+r*p+e*h+r*f+e*d+r*m+e}function o(t,e){t.emplaceBack(e?1:0,0),t.emplaceBack(e?1:0,0),t.emplaceBack(e?1:0,0),t.emplaceBack(e?1:0,0)}function a(t,e,r,i){for(var n=0;n<e.length;n+=5){var o=i||0===e[n+4];t.emplaceBack(r?1:0,o?1:0),t.emplaceBack(r?1:0,o?1:0),t.emplaceBack(r?1:0,o?1:0),t.emplaceBack(r?1:0,o?1:0)}}var s=t("./symbol_size"),l=t("../style/style_layer/symbol_style_layer_properties").layout;t("@mapbox/gl-matrix").mat4;e.exports={updateOpacities:function(t,e){var r=t.text&&t.text.opacityVertexArray,o=t.icon&&t.icon.opacityVertexArray;r&&r.clear(),o&&o.clear(),t.fadeStartTime=Date.now();for(var a=0,s=t.symbolInstances;a<s.length;a+=1){var l=s[a],u=!(l.textBoxStartIndex===l.textBoxEndIndex),c=!(l.iconBoxStartIndex===l.iconBoxEndIndex);if(u||c){if(u){var p=l.placedText?1:0,h=l.textOpacityState,f=0===h.opacity&&0===h.targetOpacity;i(l,h,p,t.fadeStartTime,e);var d=0===h.opacity&&0===h.targetOpacity;if(f!==d)for(var m=0,y=l.placedTextSymbolIndices;m<y.length;m+=1){var g=y[m];t.placedGlyphArray.get(g).hidden=d}for(var v=(l.numGlyphVertices+l.numVerticalGlyphVertices)/4,_=n(h),x=0;x<v;x++)r.emplaceBack(_)}if(c){var b=l.placedIcon?1:0,w=l.iconOpacityState;i(l,w,b,t.fadeStartTime,e);for(var z=l.numIconVertices/4,T=n(w),S=0;S<z;S++)o.emplaceBack(T)}}}r&&t.text.opacityVertexBuffer&&t.text.opacityVertexBuffer.updateData(r.serialize()),o&&t.icon.opacityVertexBuffer&&t.icon.opacityVertexBuffer.updateData(o.serialize())},performSymbolPlacement:function(t,e,r,i,n,u,c,p,h,f){var d,m,y=t.layers[0].layout,g=Math.pow(2,i-t.zoom);r&&(t.collisionBox&&t.collisionBox.collisionVertexArray&&t.collisionBox.collisionVertexArray.length&&(d=t.collisionBox.collisionVertexArray).clear(),t.collisionCircle&&t.collisionCircle.collisionVertexArray&&t.collisionCircle.collisionVertexArray.length&&(m=t.collisionCircle.collisionVertexArray).clear());for(var v=s.evaluateSizeForZoom(t.textSizeData,e.transform.zoom,l.properties["text-size"]),_="map"===y.get("text-pitch-alignment"),x=0,b=t.symbolInstances;x<b.length;x+=1){var w=b[x],z=!(w.textBoxStartIndex===w.textBoxEndIndex),T=!(w.iconBoxStartIndex===w.iconBoxEndIndex),S=y.get("text-optional")||!z,A=y.get("icon-optional")||!T;w.collisionArrays||(w.collisionArrays=t.deserializeCollisionBoxes(f,w.textBoxStartIndex,w.textBoxEndIndex,w.iconBoxStartIndex,w.iconBoxEndIndex));var E=[],C=[],k=[],M=!1;if(!w.isDuplicate){w.collisionArrays.textBox&&(E=e.placeCollisionBox(w.collisionArrays.textBox,y.get("text-allow-overlap"),n,u)),w.collisionArrays.iconBox&&(C=e.placeCollisionBox(w.collisionArrays.iconBox,y.get("icon-allow-overlap"),n,u));var I=w.collisionArrays.textCircles;if(I){var P=t.placedGlyphArray.get(w.placedTextSymbolIndices[0]),L=s.evaluateSizeForFeature(t.textSizeData,v,P);k=e.placeCollisionCircles(I,y.get("text-allow-overlap"),g,n,w.key,P,t.lineVertexArray,t.glyphOffsetArray,L,u,c,r,_),M=y.get("text-allow-overlap")||k.length>0}}var R=E.length>0||M,D=C.length>0;S||A?A?S||(D=D&&R):R=D&&R:D=R=D&&R,w.placedText=R,w.placedIcon=D,w.collisionArrays.textBox&&(d&&o(d,R),R&&e.insertCollisionBox(E,y.get("text-ignore-placement"),p,h,w.textBoxStartIndex)),w.collisionArrays.iconBox&&(d&&o(d,D),D&&e.insertCollisionBox(C,y.get("icon-ignore-placement"),p,h,w.iconBoxStartIndex)),w.collisionArrays.textCircles&&(m&&a(m,w.collisionArrays.textCircles,R,w.isDuplicate),R&&e.insertCollisionCircles(k,y.get("text-ignore-placement"),p,h,w.textBoxStartIndex))}d&&t.collisionBox.collisionVertexBuffer&&t.collisionBox.collisionVertexBuffer.updateData(d.serialize()),m&&t.collisionCircle.collisionVertexBuffer&&t.collisionCircle.collisionVertexBuffer.updateData(m.serialize())}};var u=Math.pow(2,25),c=Math.pow(2,24),p=Math.pow(2,17),h=Math.pow(2,16),f=Math.pow(2,9),d=Math.pow(2,8),m=Math.pow(2,1)},{"../style/style_layer/symbol_style_layer_properties":203,"./symbol_size":222,"@mapbox/gl-matrix":1}],222:[function(t,e,r){"use strict";var i=t("../style-spec/expression").normalizePropertyExpression,n=t("../style-spec/util/interpolate"),o=t("../util/util");e.exports={getSizeData:function(t,e){var r=e.expression;if("constant"===r.kind)return{functionType:"constant",layoutSize:r.evaluate({zoom:t+1})};if("source"===r.kind)return{functionType:"source"};for(var i=r.zoomStops,n=0;n<i.length&&i[n]<=t;)n++;for(var o=n=Math.max(0,n-1);o<i.length&&i[o]<t+1;)o++;o=Math.min(i.length-1,o);var a={min:i[n],max:i[o]};return"composite"===r.kind?{functionType:"composite",zoomRange:a,propertyValue:e.value}:{functionType:"camera",layoutSize:r.evaluate({zoom:t+1}),zoomRange:a,sizeRange:{min:r.evaluate({zoom:a.min}),max:r.evaluate({zoom:a.max})},propertyValue:e.value}},evaluateSizeForFeature:function(t,e,r){var i=e;return"source"===t.functionType?r.lowerSize/10:"composite"===t.functionType?n.number(r.lowerSize/10,r.upperSize/10,i.uSizeT):i.uSize},evaluateSizeForZoom:function(t,e,r){if("constant"===t.functionType)return{uSizeT:0,uSize:t.layoutSize};if("source"===t.functionType)return{uSizeT:0,uSize:0};if("camera"===t.functionType){var n=t.propertyValue,a=t.zoomRange,s=t.sizeRange,l=i(n,r.specification),u=o.clamp(l.interpolationFactor(e,a.min,a.max),0,1);return{uSizeT:0,uSize:s.min+u*(s.max-s.min)}}var c=t.propertyValue,p=t.zoomRange,h=i(c,r.specification);return{uSizeT:o.clamp(h.interpolationFactor(e,p.min,p.max),0,1),uSize:0}}}},{"../style-spec/expression":137,"../style-spec/util/interpolate":155,"../util/util":267}],223:[function(t,e,r){"use strict";var i=t("../source/rtl_text_plugin");e.exports=function(t,e,r){var n=e.layout.get("text-transform").evaluate(r);return"uppercase"===n?t=t.toLocaleUpperCase():"lowercase"===n&&(t=t.toLocaleLowerCase()),i.applyArabicShaping&&(t=i.applyArabicShaping(t)),t}},{"../source/rtl_text_plugin":108}],224:[function(t,e,r){"use strict";var i=t("../util/dom"),n=t("@mapbox/point-geometry"),o={scrollZoom:t("./handler/scroll_zoom"),boxZoom:t("./handler/box_zoom"),dragRotate:t("./handler/drag_rotate"),dragPan:t("./handler/drag_pan"),keyboard:t("./handler/keyboard"),doubleClickZoom:t("./handler/dblclick_zoom"),touchZoomRotate:t("./handler/touch_zoom_rotate")};e.exports=function(t,e){function r(){h=null}function a(e,r){var n=i.mousePos(l,r);return t.fire(e,{lngLat:t.unproject(n),point:n,originalEvent:r})}function s(e,r){var o=i.touchPos(l,r),a=o.reduce(function(t,e,r,i){return t.add(e.div(i.length))},new n(0,0));return t.fire(e,{lngLat:t.unproject(a),point:a,lngLats:o.map(function(e){return t.unproject(e)},this),points:o,originalEvent:r})}var l=t.getCanvasContainer(),u=null,c=!1,p=null,h=null;for(var f in o)t[f]=new o[f](t,e),e.interactive&&e[f]&&t[f].enable(e[f]);l.addEventListener("mouseout",function(t){a("mouseout",t)},!1),l.addEventListener("mousedown",function(e){t.doubleClickZoom.isActive()||t.stop(),p=i.mousePos(l,e),a("mousedown",e),c=!0},!1),l.addEventListener("mouseup",function(e){var r=t.dragRotate&&t.dragRotate.isActive();u&&!r&&a("contextmenu",u),u=null,c=!1,a("mouseup",e)},!1),l.addEventListener("mousemove",function(e){if(!(t.dragPan&&t.dragPan.isActive()||t.dragRotate&&t.dragRotate.isActive())){for(var r=e.toElement||e.target;r&&r!==l;)r=r.parentNode;r===l&&a("mousemove",e)}},!1),l.addEventListener("touchstart",function(e){t.stop(),s("touchstart",e),!e.touches||e.touches.length>1||(h?(clearTimeout(h),h=null,a("dblclick",e)):h=setTimeout(r,300))},!1),l.addEventListener("touchend",function(t){s("touchend",t)},!1),l.addEventListener("touchmove",function(t){s("touchmove",t)},!1),l.addEventListener("touchcancel",function(t){s("touchcancel",t)},!1),l.addEventListener("click",function(t){i.mousePos(l,t).equals(p)&&a("click",t)},!1),l.addEventListener("dblclick",function(t){a("dblclick",t),t.preventDefault()},!1),l.addEventListener("contextmenu",function(e){var r=t.dragRotate&&t.dragRotate.isActive();c||r?c&&(u=e):a("contextmenu",e),e.preventDefault()},!1)}},{"../util/dom":253,"./handler/box_zoom":233,"./handler/dblclick_zoom":234,"./handler/drag_pan":235,"./handler/drag_rotate":236,"./handler/keyboard":237,"./handler/scroll_zoom":238,"./handler/touch_zoom_rotate":239,"@mapbox/point-geometry":2}],225:[function(t,e,r){"use strict";var i=t("../util/util"),n=t("../style-spec/util/interpolate").number,o=t("../util/browser"),a=t("../geo/lng_lat"),s=t("../geo/lng_lat_bounds"),l=t("@mapbox/point-geometry"),u=function(t){function e(e,r){t.call(this),this.moving=!1,this.transform=e,this._bearingSnap=r.bearingSnap}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype.getCenter=function(){return this.transform.center},e.prototype.setCenter=function(t,e){return this.jumpTo({center:t},e)},e.prototype.panBy=function(t,e,r){return t=l.convert(t).mult(-1),this.panTo(this.transform.center,i.extend({offset:t},e),r)},e.prototype.panTo=function(t,e,r){return this.easeTo(i.extend({center:t},e),r)},e.prototype.getZoom=function(){return this.transform.zoom},e.prototype.setZoom=function(t,e){return this.jumpTo({zoom:t},e),this},e.prototype.zoomTo=function(t,e,r){return this.easeTo(i.extend({zoom:t},e),r)},e.prototype.zoomIn=function(t,e){return this.zoomTo(this.getZoom()+1,t,e),this},e.prototype.zoomOut=function(t,e){return this.zoomTo(this.getZoom()-1,t,e),this},e.prototype.getBearing=function(){return this.transform.bearing},e.prototype.setBearing=function(t,e){return this.jumpTo({bearing:t},e),this},e.prototype.rotateTo=function(t,e,r){return this.easeTo(i.extend({bearing:t},e),r)},e.prototype.resetNorth=function(t,e){return this.rotateTo(0,i.extend({duration:1e3},t),e),this},e.prototype.snapToNorth=function(t,e){return Math.abs(this.getBearing())<this._bearingSnap?this.resetNorth(t,e):this},e.prototype.getPitch=function(){return this.transform.pitch},e.prototype.setPitch=function(t,e){return this.jumpTo({pitch:t},e),this},e.prototype.fitBounds=function(t,e,r){if("number"==typeof(e=i.extend({padding:{top:0,bottom:0,right:0,left:0},offset:[0,0],maxZoom:this.transform.maxZoom},e)).padding){var n=e.padding;e.padding={top:n,bottom:n,right:n,left:n}}if(!i.deepEqual(Object.keys(e.padding).sort(function(t,e){return t<e?-1:t>e?1:0}),["bottom","left","right","top"]))return i.warnOnce("options.padding must be a positive number, or an Object with keys 'bottom', 'left', 'right', 'top'"),this;t=s.convert(t);var o=[(e.padding.left-e.padding.right)/2,(e.padding.top-e.padding.bottom)/2],a=Math.min(e.padding.right,e.padding.left),u=Math.min(e.padding.top,e.padding.bottom);e.offset=[e.offset[0]+o[0],e.offset[1]+o[1]];var c=l.convert(e.offset),p=this.transform,h=p.project(t.getNorthWest()),f=p.project(t.getSouthEast()),d=f.sub(h),m=(p.width-2*a-2*Math.abs(c.x))/d.x,y=(p.height-2*u-2*Math.abs(c.y))/d.y;return y<0||m<0?(i.warnOnce("Map cannot fit within canvas with the given bounds, padding, and/or offset."),this):(e.center=p.unproject(h.add(f).div(2)),e.zoom=Math.min(p.scaleZoom(p.scale*Math.min(m,y)),e.maxZoom),e.bearing=0,e.linear?this.easeTo(e,r):this.flyTo(e,r))},e.prototype.jumpTo=function(t,e){this.stop();var r=this.transform,i=!1,n=!1,o=!1;return"zoom"in t&&r.zoom!==+t.zoom&&(i=!0,r.zoom=+t.zoom),void 0!==t.center&&(r.center=a.convert(t.center)),"bearing"in t&&r.bearing!==+t.bearing&&(n=!0,r.bearing=+t.bearing),"pitch"in t&&r.pitch!==+t.pitch&&(o=!0,r.pitch=+t.pitch),this.fire("movestart",e).fire("move",e),i&&this.fire("zoomstart",e).fire("zoom",e).fire("zoomend",e),n&&this.fire("rotate",e),o&&this.fire("pitchstart",e).fire("pitch",e).fire("pitchend",e),this.fire("moveend",e)},e.prototype.easeTo=function(t,e){var r=this;this.stop(),!1===(t=i.extend({offset:[0,0],duration:500,easing:i.ease},t)).animate&&(t.duration=0),t.smoothEasing&&0!==t.duration&&(t.easing=this._smoothOutEasing(t.duration));var o=this.transform,s=this.getZoom(),u=this.getBearing(),c=this.getPitch(),p="zoom"in t?+t.zoom:s,h="bearing"in t?this._normalizeBearing(t.bearing,u):u,f="pitch"in t?+t.pitch:c,d=o.centerPoint.add(l.convert(t.offset)),m=o.pointLocation(d),y=a.convert(t.center||m);this._normalizeCenter(y);var g,v,_=o.project(m),x=o.project(y).sub(_),b=o.zoomScale(p-s);return t.around&&(g=a.convert(t.around),v=o.locationPoint(g)),this.zooming=p!==s,this.rotating=u!==h,this.pitching=f!==c,this._prepareEase(e,t.noMoveStart),clearTimeout(this._onEaseEnd),this._ease(function(t){if(this.zooming&&(o.zoom=n(s,p,t)),this.rotating&&(o.bearing=n(u,h,t)),this.pitching&&(o.pitch=n(c,f,t)),g)o.setLocationAtPoint(g,v);else{var r=o.zoomScale(o.zoom-s),i=p>s?Math.min(2,b):Math.max(.5,b),a=Math.pow(i,1-t),l=o.unproject(_.add(x.mult(t*a)).mult(r));o.setLocationAtPoint(o.renderWorldCopies?l.wrap():l,d)}this._fireMoveEvents(e)},function(){t.delayEndEvents?r._onEaseEnd=setTimeout(function(){return r._easeToEnd(e)},t.delayEndEvents):r._easeToEnd(e)},t),this},e.prototype._prepareEase=function(t,e){this.moving=!0,e||this.fire("movestart",t),this.zooming&&this.fire("zoomstart",t),this.pitching&&this.fire("pitchstart",t)},e.prototype._fireMoveEvents=function(t){this.fire("move",t),this.zooming&&this.fire("zoom",t),this.rotating&&this.fire("rotate",t),this.pitching&&this.fire("pitch",t)},e.prototype._easeToEnd=function(t){var e=this.zooming,r=this.pitching;this.moving=!1,this.zooming=!1,this.rotating=!1,this.pitching=!1,e&&this.fire("zoomend",t),r&&this.fire("pitchend",t),this.fire("moveend",t)},e.prototype.flyTo=function(t,e){function r(t){var e=(A*A-S*S+(t?-1:1)*M*M*E*E)/(2*(t?A:S)*M*E);return Math.log(Math.sqrt(e*e+1)-e)}function o(t){return(Math.exp(t)-Math.exp(-t))/2}function s(t){return(Math.exp(t)+Math.exp(-t))/2}function u(t){return o(t)/s(t)}var c=this;this.stop(),t=i.extend({offset:[0,0],speed:1.2,curve:1.42,easing:i.ease},t);var p=this.transform,h=this.getZoom(),f=this.getBearing(),d=this.getPitch(),m="zoom"in t?i.clamp(+t.zoom,p.minZoom,p.maxZoom):h,y="bearing"in t?this._normalizeBearing(t.bearing,f):f,g="pitch"in t?+t.pitch:d,v=p.zoomScale(m-h),_=p.centerPoint.add(l.convert(t.offset)),x=p.pointLocation(_),b=a.convert(t.center||x);this._normalizeCenter(b);var w=p.project(x),z=p.project(b).sub(w),T=t.curve,S=Math.max(p.width,p.height),A=S/v,E=z.mag();if("minZoom"in t){var C=i.clamp(Math.min(t.minZoom,h,m),p.minZoom,p.maxZoom),k=S/p.zoomScale(C-h);T=Math.sqrt(k/E*2)}var M=T*T,I=r(0),P=function(t){return s(I)/s(I+T*t)},L=function(t){return S*((s(I)*u(I+T*t)-o(I))/M)/E},R=(r(1)-I)/T;if(Math.abs(E)<1e-6||!isFinite(R)){if(Math.abs(S-A)<1e-6)return this.easeTo(t,e);var D=A<S?-1:1;R=Math.abs(Math.log(A/S))/T,L=function(){return 0},P=function(t){return Math.exp(D*T*t)}}if("duration"in t)t.duration=+t.duration;else{var B="screenSpeed"in t?+t.screenSpeed/T:+t.speed;t.duration=1e3*R/B}return t.maxDuration&&t.duration>t.maxDuration&&(t.duration=0),this.zooming=!0,this.rotating=f!==y,this.pitching=g!==d,this._prepareEase(e,!1),this._ease(function(t){var r=t*R,i=1/P(r);p.zoom=h+p.scaleZoom(i),this.rotating&&(p.bearing=n(f,y,t)),this.pitching&&(p.pitch=n(d,g,t));var o=p.unproject(w.add(z.mult(L(r))).mult(i));p.setLocationAtPoint(p.renderWorldCopies?o.wrap():o,_),this._fireMoveEvents(e)},function(){return c._easeToEnd(e)},t),this},e.prototype.isEasing=function(){return!!this._abortFn},e.prototype.isMoving=function(){return this.moving},e.prototype.stop=function(){return this._abortFn&&(this._abortFn(),this._finishEase()),this},e.prototype._ease=function(t,e,r){this._finishFn=e,this._abortFn=o.timed(function(e){t.call(this,r.easing(e)),1===e&&this._finishEase()},!1===r.animate?0:r.duration,this)},e.prototype._finishEase=function(){delete this._abortFn;var t=this._finishFn;delete this._finishFn,t.call(this)},e.prototype._normalizeBearing=function(t,e){t=i.wrap(t,-180,180);var r=Math.abs(t-e);return Math.abs(t-360-e)<r&&(t-=360),Math.abs(t+360-e)<r&&(t+=360),t},e.prototype._normalizeCenter=function(t){var e=this.transform;if(e.renderWorldCopies&&!e.lngRange){var r=t.lng-e.center.lng;t.lng+=r>180?-360:r<-180?360:0}},e.prototype._smoothOutEasing=function(t){var e=i.ease;if(this._prevEase){var r=this._prevEase,n=(Date.now()-r.start)/r.duration,o=r.easing(n+.01)-r.easing(n),a=.27/Math.sqrt(o*o+1e-4)*.01,s=Math.sqrt(.0729-a*a);e=i.bezier(a,s,.25,1)}return this._prevEase={start:(new Date).getTime(),duration:t,easing:e},e},e}(t("../util/evented"));e.exports=u},{"../geo/lng_lat":69,"../geo/lng_lat_bounds":70,"../style-spec/util/interpolate":155,"../util/browser":246,"../util/evented":254,"../util/util":267,"@mapbox/point-geometry":2}],226:[function(t,e,r){"use strict";var i=t("../../util/dom"),n=t("../../util/util"),o=t("../../util/config"),a=function(t){this.options=t,n.bindAll(["_updateEditLink","_updateData","_updateCompact"],this)};a.prototype.getDefaultPosition=function(){return"bottom-right"},a.prototype.onAdd=function(t){var e=this.options&&this.options.compact;return this._map=t,this._container=i.create("div","mapboxgl-ctrl mapboxgl-ctrl-attrib"),e&&this._container.classList.add("mapboxgl-compact"),this._updateAttributions(),this._updateEditLink(),this._map.on("sourcedata",this._updateData),this._map.on("moveend",this._updateEditLink),void 0===e&&(this._map.on("resize",this._updateCompact),this._updateCompact()),this._container},a.prototype.onRemove=function(){i.remove(this._container),this._map.off("sourcedata",this._updateData),this._map.off("moveend",this._updateEditLink),this._map.off("resize",this._updateCompact),this._map=void 0},a.prototype._updateEditLink=function(){var t=this._editLink;t||(t=this._editLink=this._container.querySelector(".mapbox-improve-map"));var e=[{key:"owner",value:this.styleOwner},{key:"id",value:this.styleId},{key:"access_token",value:o.ACCESS_TOKEN}];if(t){var r=e.reduce(function(t,r,i){return r.value&&(t+=r.key+"="+r.value+(i<e.length-1?"&":"")),t},"?");t.href="https://www.mapbox.com/feedback/"+r+(this._map._hash?this._map._hash.getHashString(!0):"")}},a.prototype._updateData=function(t){t&&"metadata"===t.sourceDataType&&(this._updateAttributions(),this._updateEditLink())},a.prototype._updateAttributions=function(){if(this._map.style){var t=[];if(this._map.style.stylesheet){var e=this._map.style.stylesheet;this.styleOwner=e.owner,this.styleId=e.id}var r=this._map.style.sourceCaches;for(var i in r){var n=r[i].getSource();n.attribution&&t.indexOf(n.attribution)<0&&t.push(n.attribution)}t.sort(function(t,e){return t.length-e.length}),t=t.filter(function(e,r){for(var i=r+1;i<t.length;i++)if(t[i].indexOf(e)>=0)return!1;return!0}),this._container.innerHTML=t.join(" | "),this._editLink=null}},a.prototype._updateCompact=function(){this._map.getCanvasContainer().offsetWidth<=640?this._container.classList.add("mapboxgl-compact"):this._container.classList.remove("mapboxgl-compact")},e.exports=a},{"../../util/config":250,"../../util/dom":253,"../../util/util":267}],227:[function(t,e,r){"use strict";var i=t("../../util/dom"),n=t("../../util/util"),o=t("../../util/window"),a=function(){this._fullscreen=!1,n.bindAll(["_onClickFullscreen","_changeIcon"],this),"onfullscreenchange"in o.document?this._fullscreenchange="fullscreenchange":"onmozfullscreenchange"in o.document?this._fullscreenchange="mozfullscreenchange":"onwebkitfullscreenchange"in o.document?this._fullscreenchange="webkitfullscreenchange":"onmsfullscreenchange"in o.document&&(this._fullscreenchange="MSFullscreenChange"),this._className="mapboxgl-ctrl"};a.prototype.onAdd=function(t){return this._map=t,this._mapContainer=this._map.getContainer(),this._container=i.create("div",this._className+" mapboxgl-ctrl-group"),this._checkFullscreenSupport()?this._setupUI():(this._container.style.display="none",n.warnOnce("This device does not support fullscreen mode.")),this._container},a.prototype.onRemove=function(){i.remove(this._container),this._map=null,o.document.removeEventListener(this._fullscreenchange,this._changeIcon)},a.prototype._checkFullscreenSupport=function(){return!!(o.document.fullscreenEnabled||o.document.mozFullScreenEnabled||o.document.msFullscreenEnabled||o.document.webkitFullscreenEnabled)},a.prototype._setupUI=function(){var t=this._fullscreenButton=i.create("button",this._className+"-icon "+this._className+"-fullscreen",this._container);t.setAttribute("aria-label","Toggle fullscreen"),t.type="button",this._fullscreenButton.addEventListener("click",this._onClickFullscreen),o.document.addEventListener(this._fullscreenchange,this._changeIcon)},a.prototype._isFullscreen=function(){return this._fullscreen},a.prototype._changeIcon=function(){(o.document.fullscreenElement||o.document.mozFullScreenElement||o.document.webkitFullscreenElement||o.document.msFullscreenElement)===this._mapContainer!==this._fullscreen&&(this._fullscreen=!this._fullscreen,this._fullscreenButton.classList.toggle(this._className+"-shrink"),this._fullscreenButton.classList.toggle(this._className+"-fullscreen"))},a.prototype._onClickFullscreen=function(){this._isFullscreen()?o.document.exitFullscreen?o.document.exitFullscreen():o.document.mozCancelFullScreen?o.document.mozCancelFullScreen():o.document.msExitFullscreen?o.document.msExitFullscreen():o.document.webkitCancelFullScreen&&o.document.webkitCancelFullScreen():this._mapContainer.requestFullscreen?this._mapContainer.requestFullscreen():this._mapContainer.mozRequestFullScreen?this._mapContainer.mozRequestFullScreen():this._mapContainer.msRequestFullscreen?this._mapContainer.msRequestFullscreen():this._mapContainer.webkitRequestFullscreen&&this._mapContainer.webkitRequestFullscreen()},e.exports=a},{"../../util/dom":253,"../../util/util":267,"../../util/window":248}],228:[function(t,e,r){"use strict";function i(t){void 0!==n?t(n):void 0!==s.navigator.permissions?s.navigator.permissions.query({name:"geolocation"}).then(function(e){n="denied"!==e.state,t(n)}):(n=!!s.navigator.geolocation,t(n))}var n,o=t("../../util/evented"),a=t("../../util/dom"),s=t("../../util/window"),l=t("../../util/util"),u=t("assert"),c=t("../../geo/lng_lat"),p=t("../marker"),h={positionOptions:{enableHighAccuracy:!1,timeout:6e3},fitBoundsOptions:{maxZoom:15},trackUserLocation:!1,showUserLocation:!0},f=function(t){function e(e){t.call(this),this.options=l.extend({},h,e),l.bindAll(["_onSuccess","_onError","_finish","_setupUI","_updateCamera","_updateMarker","_onClickGeolocate"],this)}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype.onAdd=function(t){return this._map=t,this._container=a.create("div","mapboxgl-ctrl mapboxgl-ctrl-group"),i(this._setupUI),this._container},e.prototype.onRemove=function(){void 0!==this._geolocationWatchID&&(s.navigator.geolocation.clearWatch(this._geolocationWatchID),this._geolocationWatchID=void 0),this.options.showUserLocation&&this._userLocationDotMarker.remove(),a.remove(this._container),this._map=void 0},e.prototype._onSuccess=function(t){if(this.options.trackUserLocation)switch(this._lastKnownPosition=t,this._watchState){case"WAITING_ACTIVE":case"ACTIVE_LOCK":case"ACTIVE_ERROR":this._watchState="ACTIVE_LOCK",this._geolocateButton.classList.remove("mapboxgl-ctrl-geolocate-waiting"),this._geolocateButton.classList.remove("mapboxgl-ctrl-geolocate-active-error"),this._geolocateButton.classList.add("mapboxgl-ctrl-geolocate-active");break;case"BACKGROUND":case"BACKGROUND_ERROR":this._watchState="BACKGROUND",this._geolocateButton.classList.remove("mapboxgl-ctrl-geolocate-waiting"),this._geolocateButton.classList.remove("mapboxgl-ctrl-geolocate-background-error"),this._geolocateButton.classList.add("mapboxgl-ctrl-geolocate-background");break;default:u(!1,"Unexpected watchState "+this._watchState)}this.options.showUserLocation&&"OFF"!==this._watchState&&this._updateMarker(t),this.options.trackUserLocation&&"ACTIVE_LOCK"!==this._watchState||this._updateCamera(t),this.options.showUserLocation&&this._dotElement.classList.remove("mapboxgl-user-location-dot-stale"),this.fire("geolocate",t),this._finish()},e.prototype._updateCamera=function(t){var e=new c(t.coords.longitude,t.coords.latitude),r=t.coords.accuracy;this._map.fitBounds(e.toBounds(r),this.options.fitBoundsOptions,{geolocateSource:!0})},e.prototype._updateMarker=function(t){t?this._userLocationDotMarker.setLngLat([t.coords.longitude,t.coords.latitude]).addTo(this._map):this._userLocationDotMarker.remove()},e.prototype._onError=function(t){if(this.options.trackUserLocation)if(1===t.code)this._watchState="OFF",this._geolocateButton.classList.remove("mapboxgl-ctrl-geolocate-waiting"),this._geolocateButton.classList.remove("mapboxgl-ctrl-geolocate-active"),this._geolocateButton.classList.remove("mapboxgl-ctrl-geolocate-active-error"),this._geolocateButton.classList.remove("mapboxgl-ctrl-geolocate-background"),this._geolocateButton.classList.remove("mapboxgl-ctrl-geolocate-background-error"),void 0!==this._geolocationWatchID&&this._clearWatch();else switch(this._watchState){case"WAITING_ACTIVE":this._watchState="ACTIVE_ERROR",this._geolocateButton.classList.remove("mapboxgl-ctrl-geolocate-active"),this._geolocateButton.classList.add("mapboxgl-ctrl-geolocate-active-error");break;case"ACTIVE_LOCK":this._watchState="ACTIVE_ERROR",this._geolocateButton.classList.remove("mapboxgl-ctrl-geolocate-active"),this._geolocateButton.classList.add("mapboxgl-ctrl-geolocate-active-error"),this._geolocateButton.classList.add("mapboxgl-ctrl-geolocate-waiting");break;case"BACKGROUND":this._watchState="BACKGROUND_ERROR",this._geolocateButton.classList.remove("mapboxgl-ctrl-geolocate-background"),this._geolocateButton.classList.add("mapboxgl-ctrl-geolocate-background-error"),this._geolocateButton.classList.add("mapboxgl-ctrl-geolocate-waiting");break;case"ACTIVE_ERROR":break;default:u(!1,"Unexpected watchState "+this._watchState)}"OFF"!==this._watchState&&this.options.showUserLocation&&this._dotElement.classList.add("mapboxgl-user-location-dot-stale"),this.fire("error",t),this._finish()},e.prototype._finish=function(){this._timeoutId&&clearTimeout(this._timeoutId),this._timeoutId=void 0},e.prototype._setupUI=function(t){var e=this;!1!==t&&(this._container.addEventListener("contextmenu",function(t){return t.preventDefault()}),this._geolocateButton=a.create("button","mapboxgl-ctrl-icon mapboxgl-ctrl-geolocate",this._container),this._geolocateButton.type="button",this._geolocateButton.setAttribute("aria-label","Geolocate"),this.options.trackUserLocation&&(this._geolocateButton.setAttribute("aria-pressed","false"),this._watchState="OFF"),this.options.showUserLocation&&(this._dotElement=a.create("div","mapboxgl-user-location-dot"),this._userLocationDotMarker=new p(this._dotElement),this.options.trackUserLocation&&(this._watchState="OFF")),this._geolocateButton.addEventListener("click",this._onClickGeolocate.bind(this)),this.options.trackUserLocation&&this._map.on("movestart",function(t){t.geolocateSource||"ACTIVE_LOCK"!==e._watchState||(e._watchState="BACKGROUND",e._geolocateButton.classList.add("mapboxgl-ctrl-geolocate-background"),e._geolocateButton.classList.remove("mapboxgl-ctrl-geolocate-active"),e.fire("trackuserlocationend"))}))},e.prototype._onClickGeolocate=function(){if(this.options.trackUserLocation){switch(this._watchState){case"OFF":this._watchState="WAITING_ACTIVE",this.fire("trackuserlocationstart");break;case"WAITING_ACTIVE":case"ACTIVE_LOCK":case"ACTIVE_ERROR":case"BACKGROUND_ERROR":this._watchState="OFF",this._geolocateButton.classList.remove("mapboxgl-ctrl-geolocate-waiting"),this._geolocateButton.classList.remove("mapboxgl-ctrl-geolocate-active"),this._geolocateButton.classList.remove("mapboxgl-ctrl-geolocate-active-error"),this._geolocateButton.classList.remove("mapboxgl-ctrl-geolocate-background"),this._geolocateButton.classList.remove("mapboxgl-ctrl-geolocate-background-error"),this.fire("trackuserlocationend");break;case"BACKGROUND":this._watchState="ACTIVE_LOCK",this._geolocateButton.classList.remove("mapboxgl-ctrl-geolocate-background"),this._lastKnownPosition&&this._updateCamera(this._lastKnownPosition),this.fire("trackuserlocationstart");break;default:u(!1,"Unexpected watchState "+this._watchState)}switch(this._watchState){case"WAITING_ACTIVE":this._geolocateButton.classList.add("mapboxgl-ctrl-geolocate-waiting"),this._geolocateButton.classList.add("mapboxgl-ctrl-geolocate-active");break;case"ACTIVE_LOCK":this._geolocateButton.classList.add("mapboxgl-ctrl-geolocate-active");break;case"ACTIVE_ERROR":this._geolocateButton.classList.add("mapboxgl-ctrl-geolocate-waiting"),this._geolocateButton.classList.add("mapboxgl-ctrl-geolocate-active-error");break;case"BACKGROUND":this._geolocateButton.classList.add("mapboxgl-ctrl-geolocate-background");break;case"BACKGROUND_ERROR":this._geolocateButton.classList.add("mapboxgl-ctrl-geolocate-waiting"),this._geolocateButton.classList.add("mapboxgl-ctrl-geolocate-background-error");break;case"OFF":break;default:u(!1,"Unexpected watchState "+this._watchState)}"OFF"===this._watchState&&void 0!==this._geolocationWatchID?this._clearWatch():void 0===this._geolocationWatchID&&(this._geolocateButton.classList.add("mapboxgl-ctrl-geolocate-waiting"),this._geolocateButton.setAttribute("aria-pressed","true"),this._geolocationWatchID=s.navigator.geolocation.watchPosition(this._onSuccess,this._onError,this.options.positionOptions))}else s.navigator.geolocation.getCurrentPosition(this._onSuccess,this._onError,this.options.positionOptions),this._timeoutId=setTimeout(this._finish,1e4)},e.prototype._clearWatch=function(){s.navigator.geolocation.clearWatch(this._geolocationWatchID),this._geolocationWatchID=void 0,this._geolocateButton.classList.remove("mapboxgl-ctrl-geolocate-waiting"),this._geolocateButton.setAttribute("aria-pressed","false"),this.options.showUserLocation&&this._updateMarker(null)},e}(o);e.exports=f},{"../../geo/lng_lat":69,"../../util/dom":253,"../../util/evented":254,"../../util/util":267,"../../util/window":248,"../marker":242,assert:11}],229:[function(t,e,r){"use strict";var i=t("../../util/dom"),n=t("../../util/util"),o=function(){n.bindAll(["_updateLogo"],this)};o.prototype.onAdd=function(t){this._map=t,this._container=i.create("div","mapboxgl-ctrl");var e=i.create("a","mapboxgl-ctrl-logo");return e.target="_blank",e.href="https://www.mapbox.com/",e.setAttribute("aria-label","Mapbox logo"),this._container.appendChild(e),this._container.style.display="none",this._map.on("sourcedata",this._updateLogo),this._updateLogo(),this._container},o.prototype.onRemove=function(){i.remove(this._container),this._map.off("sourcedata",this._updateLogo)},o.prototype.getDefaultPosition=function(){return"bottom-left"},o.prototype._updateLogo=function(t){t&&"metadata"!==t.sourceDataType||(this._container.style.display=this._logoRequired()?"block":"none")},o.prototype._logoRequired=function(){if(this._map.style){var t=this._map.style.sourceCaches;for(var e in t)if(t[e].getSource().mapbox_logo)return!0;return!1}},e.exports=o},{"../../util/dom":253,"../../util/util":267}],230:[function(t,e,r){"use strict";var i=t("../../util/dom"),n=t("../../util/util"),o=t("../handler/drag_rotate"),a=function(){var t=this;n.bindAll(["_rotateCompassArrow"],this),this._container=i.create("div","mapboxgl-ctrl mapboxgl-ctrl-group"),this._container.addEventListener("contextmenu",function(t){return t.preventDefault()}),this._zoomInButton=this._createButton("mapboxgl-ctrl-icon mapboxgl-ctrl-zoom-in","Zoom In",function(){return t._map.zoomIn()}),this._zoomOutButton=this._createButton("mapboxgl-ctrl-icon mapboxgl-ctrl-zoom-out","Zoom Out",function(){return t._map.zoomOut()}),this._compass=this._createButton("mapboxgl-ctrl-icon mapboxgl-ctrl-compass","Reset North",function(){return t._map.resetNorth()}),this._compassArrow=i.create("span","mapboxgl-ctrl-compass-arrow",this._compass)};a.prototype._rotateCompassArrow=function(){var t="rotate("+this._map.transform.angle*(180/Math.PI)+"deg)";this._compassArrow.style.transform=t},a.prototype.onAdd=function(t){return this._map=t,this._map.on("rotate",this._rotateCompassArrow),this._rotateCompassArrow(),this._handler=new o(t,{button:"left",element:this._compass}),this._handler.enable(),this._container},a.prototype.onRemove=function(){i.remove(this._container),this._map.off("rotate",this._rotateCompassArrow),delete this._map,this._handler.disable(),delete this._handler},a.prototype._createButton=function(t,e,r){var n=i.create("button",t,this._container);return n.type="button",n.setAttribute("aria-label",e),n.addEventListener("click",r),n},e.exports=a},{"../../util/dom":253,"../../util/util":267,"../handler/drag_rotate":236}],231:[function(t,e,r){"use strict";function i(t,e,r){var i=r&&r.maxWidth||100,a=t._container.clientHeight/2,s=o(t.unproject([0,a]),t.unproject([i,a]));if(r&&"imperial"===r.unit){var l=3.2808*s;l>5280?n(e,i,l/5280,"mi"):n(e,i,l,"ft")}else r&&"nautical"===r.unit?n(e,i,s/1852,"nm"):n(e,i,s,"m")}function n(t,e,r,i){var n=a(r),o=n/r;"m"===i&&n>=1e3&&(n/=1e3,i="km"),t.style.width=e*o+"px",t.innerHTML=n+i}function o(t,e){var r=Math.PI/180,i=t.lat*r,n=e.lat*r,o=Math.sin(i)*Math.sin(n)+Math.cos(i)*Math.cos(n)*Math.cos((e.lng-t.lng)*r);return 6371e3*Math.acos(Math.min(o,1))}function a(t){var e=Math.pow(10,(""+Math.floor(t)).length-1),r=t/e;return r=r>=10?10:r>=5?5:r>=3?3:r>=2?2:1,e*r}var s=t("../../util/dom"),l=t("../../util/util"),u=function(t){this.options=t,l.bindAll(["_onMove"],this)};u.prototype.getDefaultPosition=function(){return"bottom-left"},u.prototype._onMove=function(){i(this._map,this._container,this.options)},u.prototype.onAdd=function(t){return this._map=t,this._container=s.create("div","mapboxgl-ctrl mapboxgl-ctrl-scale",t.getContainer()),this._map.on("move",this._onMove),this._onMove(),this._container},u.prototype.onRemove=function(){s.remove(this._container),this._map.off("move",this._onMove),this._map=void 0},e.exports=u},{"../../util/dom":253,"../../util/util":267}],232:[function(t,e,r){"use strict"},{}],233:[function(t,e,r){"use strict";var i=t("../../util/dom"),n=t("../../geo/lng_lat_bounds"),o=t("../../util/util"),a=t("../../util/window"),s=function(t){this._map=t,this._el=t.getCanvasContainer(),this._container=t.getContainer(),o.bindAll(["_onMouseDown","_onMouseMove","_onMouseUp","_onKeyDown"],this)};s.prototype.isEnabled=function(){return!!this._enabled},s.prototype.isActive=function(){return!!this._active},s.prototype.enable=function(){this.isEnabled()||(this._map.dragPan&&this._map.dragPan.disable(),this._el.addEventListener("mousedown",this._onMouseDown,!1),this._map.dragPan&&this._map.dragPan.enable(),this._enabled=!0)},s.prototype.disable=function(){this.isEnabled()&&(this._el.removeEventListener("mousedown",this._onMouseDown),this._enabled=!1)},s.prototype._onMouseDown=function(t){t.shiftKey&&0===t.button&&(a.document.addEventListener("mousemove",this._onMouseMove,!1),a.document.addEventListener("keydown",this._onKeyDown,!1),a.document.addEventListener("mouseup",this._onMouseUp,!1),i.disableDrag(),this._startPos=i.mousePos(this._el,t),this._active=!0)},s.prototype._onMouseMove=function(t){var e=this._startPos,r=i.mousePos(this._el,t);this._box||(this._box=i.create("div","mapboxgl-boxzoom",this._container),this._container.classList.add("mapboxgl-crosshair"),this._fireEvent("boxzoomstart",t));var n=Math.min(e.x,r.x),o=Math.max(e.x,r.x),a=Math.min(e.y,r.y),s=Math.max(e.y,r.y);i.setTransform(this._box,"translate("+n+"px,"+a+"px)"),this._box.style.width=o-n+"px",this._box.style.height=s-a+"px"},s.prototype._onMouseUp=function(t){if(0===t.button){var e=this._startPos,r=i.mousePos(this._el,t),o=(new n).extend(this._map.unproject(e)).extend(this._map.unproject(r));this._finish(),e.x===r.x&&e.y===r.y?this._fireEvent("boxzoomcancel",t):this._map.fitBounds(o,{linear:!0}).fire("boxzoomend",{originalEvent:t,boxZoomBounds:o})}},s.prototype._onKeyDown=function(t){27===t.keyCode&&(this._finish(),this._fireEvent("boxzoomcancel",t))},s.prototype._finish=function(){this._active=!1,a.document.removeEventListener("mousemove",this._onMouseMove,!1),a.document.removeEventListener("keydown",this._onKeyDown,!1),a.document.removeEventListener("mouseup",this._onMouseUp,!1),this._container.classList.remove("mapboxgl-crosshair"),this._box&&(i.remove(this._box),this._box=null),i.enableDrag()},s.prototype._fireEvent=function(t,e){return this._map.fire(t,{originalEvent:e})},e.exports=s},{"../../geo/lng_lat_bounds":70,"../../util/dom":253,"../../util/util":267,"../../util/window":248}],234:[function(t,e,r){"use strict";var i=t("../../util/util"),n=function(t){this._map=t,i.bindAll(["_onDblClick","_onZoomEnd"],this)};n.prototype.isEnabled=function(){return!!this._enabled},n.prototype.isActive=function(){return!!this._active},n.prototype.enable=function(){this.isEnabled()||(this._map.on("dblclick",this._onDblClick),this._enabled=!0)},n.prototype.disable=function(){this.isEnabled()&&(this._map.off("dblclick",this._onDblClick),this._enabled=!1)},n.prototype._onDblClick=function(t){this._active=!0,this._map.on("zoomend",this._onZoomEnd),this._map.zoomTo(this._map.getZoom()+(t.originalEvent.shiftKey?-1:1),{around:t.lngLat},t)},n.prototype._onZoomEnd=function(){this._active=!1,this._map.off("zoomend",this._onZoomEnd)},e.exports=n},{"../../util/util":267}],235:[function(t,e,r){"use strict";var i=t("../../util/dom"),n=t("../../util/util"),o=t("../../util/window"),a=n.bezier(0,0,.3,1),s=function(t){this._map=t,this._el=t.getCanvasContainer(),n.bindAll(["_onDown","_onMove","_onUp","_onTouchEnd","_onMouseUp"],this)};s.prototype.isEnabled=function(){return!!this._enabled},s.prototype.isActive=function(){return!!this._active},s.prototype.enable=function(){this.isEnabled()||(this._el.classList.add("mapboxgl-touch-drag-pan"),this._el.addEventListener("mousedown",this._onDown),this._el.addEventListener("touchstart",this._onDown),this._enabled=!0)},s.prototype.disable=function(){this.isEnabled()&&(this._el.classList.remove("mapboxgl-touch-drag-pan"),this._el.removeEventListener("mousedown",this._onDown),this._el.removeEventListener("touchstart",this._onDown),this._enabled=!1)},s.prototype._onDown=function(t){this._ignoreEvent(t)||this.isActive()||(t.touches?(o.document.addEventListener("touchmove",this._onMove),o.document.addEventListener("touchend",this._onTouchEnd)):(o.document.addEventListener("mousemove",this._onMove),o.document.addEventListener("mouseup",this._onMouseUp)),o.addEventListener("blur",this._onMouseUp),this._active=!1,this._startPos=this._pos=i.mousePos(this._el,t),this._inertia=[[Date.now(),this._pos]])},s.prototype._onMove=function(t){if(!this._ignoreEvent(t)){this.isActive()||(this._active=!0,this._map.moving=!0,this._fireEvent("dragstart",t),this._fireEvent("movestart",t));var e=i.mousePos(this._el,t),r=this._map;r.stop(),this._drainInertiaBuffer(),this._inertia.push([Date.now(),e]),r.transform.setLocationAtPoint(r.transform.pointLocation(this._pos),e),this._fireEvent("drag",t),this._fireEvent("move",t),this._pos=e,t.preventDefault()}},s.prototype._onUp=function(t){var e=this;if(this.isActive()){this._active=!1,this._fireEvent("dragend",t),this._drainInertiaBuffer();var r=function(){e._map.moving=!1,e._fireEvent("moveend",t)},i=this._inertia;if(i.length<2)r();else{var n=i[i.length-1],o=i[0],s=n[1].sub(o[1]),l=(n[0]-o[0])/1e3;if(0===l||n[1].equals(o[1]))r();else{var u=s.mult(.3/l),c=u.mag();c>1400&&(c=1400,u._unit()._mult(c));var p=c/750,h=u.mult(-p/2);this._map.panBy(h,{duration:1e3*p,easing:a,noMoveStart:!0},{originalEvent:t})}}}},s.prototype._onMouseUp=function(t){this._ignoreEvent(t)||(this._onUp(t),o.document.removeEventListener("mousemove",this._onMove),o.document.removeEventListener("mouseup",this._onMouseUp),o.removeEventListener("blur",this._onMouseUp))},s.prototype._onTouchEnd=function(t){this._ignoreEvent(t)||(this._onUp(t),o.document.removeEventListener("touchmove",this._onMove),o.document.removeEventListener("touchend",this._onTouchEnd))},s.prototype._fireEvent=function(t,e){return this._map.fire(t,{originalEvent:e})},s.prototype._ignoreEvent=function(t){var e=this._map;return!(!e.boxZoom||!e.boxZoom.isActive())||(!(!e.dragRotate||!e.dragRotate.isActive())||(t.touches?t.touches.length>1:!!t.ctrlKey||"mousemove"!==t.type&&t.button&&0!==t.button))},s.prototype._drainInertiaBuffer=function(){for(var t=this._inertia,e=Date.now();t.length>0&&e-t[0][0]>160;)t.shift()},e.exports=s},{"../../util/dom":253,"../../util/util":267,"../../util/window":248}],236:[function(t,e,r){"use strict";var i=t("../../util/dom"),n=t("../../util/util"),o=t("../../util/window"),a=n.bezier(0,0,.25,1),s=function(t,e){this._map=t,this._el=e.element||t.getCanvasContainer(),this._button=e.button||"right",this._bearingSnap=e.bearingSnap||0,this._pitchWithRotate=!1!==e.pitchWithRotate,n.bindAll(["_onDown","_onMove","_onUp"],this)};s.prototype.isEnabled=function(){return!!this._enabled},s.prototype.isActive=function(){return!!this._active},s.prototype.enable=function(){this.isEnabled()||(this._el.addEventListener("mousedown",this._onDown),this._enabled=!0)},s.prototype.disable=function(){this.isEnabled()&&(this._el.removeEventListener("mousedown",this._onDown),this._enabled=!1)},s.prototype._onDown=function(t){if(!(this._map.boxZoom&&this._map.boxZoom.isActive()||this._map.dragPan&&this._map.dragPan.isActive()||this.isActive())){if("right"===this._button){var e=t.ctrlKey?0:2,r=t.button;if(void 0!==o.InstallTrigger&&2===t.button&&t.ctrlKey&&o.navigator.platform.toUpperCase().indexOf("MAC")>=0&&(r=0),r!==e)return}else if(t.ctrlKey||0!==t.button)return;i.disableDrag(),o.document.addEventListener("mousemove",this._onMove,{capture:!0}),o.document.addEventListener("mouseup",this._onUp),o.addEventListener("blur",this._onUp),this._active=!1,this._inertia=[[Date.now(),this._map.getBearing()]],this._startPos=this._pos=i.mousePos(this._el,t),this._center=this._map.transform.centerPoint,t.preventDefault()}},s.prototype._onMove=function(t){this.isActive()||(this._active=!0,this._map.moving=!0,this._fireEvent("rotatestart",t),this._fireEvent("movestart",t),this._pitchWithRotate&&this._fireEvent("pitchstart",t));var e=this._map;e.stop();var r=this._pos,n=i.mousePos(this._el,t),o=.8*(r.x-n.x),a=-.5*(r.y-n.y),s=e.getBearing()-o,l=e.getPitch()-a,u=this._inertia,c=u[u.length-1];this._drainInertiaBuffer(),u.push([Date.now(),e._normalizeBearing(s,c[1])]),e.transform.bearing=s,this._pitchWithRotate&&(this._fireEvent("pitch",t),e.transform.pitch=l),this._fireEvent("rotate",t),this._fireEvent("move",t),this._pos=n},s.prototype._onUp=function(t){var e=this;if(o.document.removeEventListener("mousemove",this._onMove,{capture:!0}),o.document.removeEventListener("mouseup",this._onUp),o.removeEventListener("blur",this._onUp),i.enableDrag(),this.isActive()){this._active=!1,this._fireEvent("rotateend",t),this._drainInertiaBuffer();var r=this._map,n=r.getBearing(),s=this._inertia,l=function(){Math.abs(n)<e._bearingSnap?r.resetNorth({noMoveStart:!0},{originalEvent:t}):(e._map.moving=!1,e._fireEvent("moveend",t)),e._pitchWithRotate&&e._fireEvent("pitchend",t)};if(s.length<2)l();else{var u=s[0],c=s[s.length-1],p=s[s.length-2],h=r._normalizeBearing(n,p[1]),f=c[1]-u[1],d=f<0?-1:1,m=(c[0]-u[0])/1e3;if(0!==f&&0!==m){var y=Math.abs(f*(.25/m));y>180&&(y=180);var g=y/180;h+=d*y*(g/2),Math.abs(r._normalizeBearing(h,0))<this._bearingSnap&&(h=r._normalizeBearing(0,h)),r.rotateTo(h,{duration:1e3*g,easing:a,noMoveStart:!0},{originalEvent:t})}else l()}}},s.prototype._fireEvent=function(t,e){return this._map.fire(t,{originalEvent:e})},s.prototype._drainInertiaBuffer=function(){for(var t=this._inertia,e=Date.now();t.length>0&&e-t[0][0]>160;)t.shift()},e.exports=s},{"../../util/dom":253,"../../util/util":267,"../../util/window":248}],237:[function(t,e,r){"use strict";function i(t){return t*(2-t)}var n=t("../../util/util"),o=function(t){this._map=t,this._el=t.getCanvasContainer(),n.bindAll(["_onKeyDown"],this)};o.prototype.isEnabled=function(){return!!this._enabled},o.prototype.enable=function(){this.isEnabled()||(this._el.addEventListener("keydown",this._onKeyDown,!1),this._enabled=!0)},o.prototype.disable=function(){this.isEnabled()&&(this._el.removeEventListener("keydown",this._onKeyDown),this._enabled=!1)},o.prototype._onKeyDown=function(t){if(!(t.altKey||t.ctrlKey||t.metaKey)){var e=0,r=0,n=0,o=0,a=0;switch(t.keyCode){case 61:case 107:case 171:case 187:e=1;break;case 189:case 109:case 173:e=-1;break;case 37:t.shiftKey?r=-1:(t.preventDefault(),o=-1);break;case 39:t.shiftKey?r=1:(t.preventDefault(),o=1);break;case 38:t.shiftKey?n=1:(t.preventDefault(),a=-1);break;case 40:t.shiftKey?n=-1:(a=1,t.preventDefault());break;default:return}var s=this._map,l=s.getZoom(),u={duration:300,delayEndEvents:500,easing:i,zoom:e?Math.round(l)+e*(t.shiftKey?2:1):l,bearing:s.getBearing()+15*r,pitch:s.getPitch()+10*n,offset:[100*-o,100*-a],center:s.getCenter()};s.easeTo(u,{originalEvent:t})}},e.exports=o},{"../../util/util":267}],238:[function(t,e,r){"use strict";var i=t("../../util/dom"),n=t("../../util/util"),o=t("../../util/browser"),a=t("../../util/window"),s=a.navigator.userAgent.toLowerCase(),l=-1!==s.indexOf("firefox"),u=-1!==s.indexOf("safari")&&-1===s.indexOf("chrom"),c=function(t){this._map=t,this._el=t.getCanvasContainer(),n.bindAll(["_onWheel","_onTimeout"],this)};c.prototype.isEnabled=function(){return!!this._enabled},c.prototype.enable=function(t){this.isEnabled()||(this._el.addEventListener("wheel",this._onWheel,!1),this._el.addEventListener("mousewheel",this._onWheel,!1),this._enabled=!0,this._aroundCenter=t&&"center"===t.around)},c.prototype.disable=function(){this.isEnabled()&&(this._el.removeEventListener("wheel",this._onWheel),this._el.removeEventListener("mousewheel",this._onWheel),this._enabled=!1)},c.prototype._onWheel=function(t){var e=0;"wheel"===t.type?(e=t.deltaY,l&&t.deltaMode===a.WheelEvent.DOM_DELTA_PIXEL&&(e/=o.devicePixelRatio),t.deltaMode===a.WheelEvent.DOM_DELTA_LINE&&(e*=40)):"mousewheel"===t.type&&(e=-t.wheelDeltaY,u&&(e/=3));var r=o.now(),n=r-(this._time||0);this._pos=i.mousePos(this._el,t),this._time=r,0!==e&&e%4.000244140625==0?this._type="wheel":0!==e&&Math.abs(e)<4?this._type="trackpad":n>400?(this._type=null,this._lastValue=e,this._timeout=setTimeout(this._onTimeout,40)):this._type||(this._type=Math.abs(n*e)<200?"trackpad":"wheel",this._timeout&&(clearTimeout(this._timeout),this._timeout=null,e+=this._lastValue)),t.shiftKey&&e&&(e/=4),this._type&&this._zoom(-e,t),t.preventDefault()},c.prototype._onTimeout=function(){this._type="wheel",this._zoom(-this._lastValue)},c.prototype._zoom=function(t,e){if(0!==t){var r=this._map,i=2/(1+Math.exp(-Math.abs(t/100)));t<0&&0!==i&&(i=1/i);var n=r.ease?r.ease.to:r.transform.scale,o=r.transform.scaleZoom(n*i);r.zoomTo(o,{duration:"wheel"===this._type?200:0,around:this._aroundCenter?r.getCenter():r.unproject(this._pos),delayEndEvents:200,smoothEasing:!0},{originalEvent:e})}},e.exports=c},{"../../util/browser":246,"../../util/dom":253,"../../util/util":267,"../../util/window":248}],239:[function(t,e,r){"use strict";var i=t("../../util/dom"),n=t("../../util/util"),o=t("../../util/window"),a=n.bezier(0,0,.15,1),s=function(t){this._map=t,this._el=t.getCanvasContainer(),n.bindAll(["_onStart","_onMove","_onEnd"],this)};s.prototype.isEnabled=function(){return!!this._enabled},s.prototype.enable=function(t){this.isEnabled()||(this._el.classList.add("mapboxgl-touch-zoom-rotate"),this._el.addEventListener("touchstart",this._onStart,!1),this._enabled=!0,this._aroundCenter=t&&"center"===t.around)},s.prototype.disable=function(){this.isEnabled()&&(this._el.classList.remove("mapboxgl-touch-zoom-rotate"),this._el.removeEventListener("touchstart",this._onStart),this._enabled=!1)},s.prototype.disableRotation=function(){this._rotationDisabled=!0},s.prototype.enableRotation=function(){this._rotationDisabled=!1},s.prototype._onStart=function(t){if(2===t.touches.length){var e=i.mousePos(this._el,t.touches[0]),r=i.mousePos(this._el,t.touches[1]);this._startVec=e.sub(r),this._startScale=this._map.transform.scale,this._startBearing=this._map.transform.bearing,this._gestureIntent=void 0,this._inertia=[],o.document.addEventListener("touchmove",this._onMove,!1),o.document.addEventListener("touchend",this._onEnd,!1)}},s.prototype._onMove=function(t){if(2===t.touches.length){var e=i.mousePos(this._el,t.touches[0]),r=i.mousePos(this._el,t.touches[1]),n=e.add(r).div(2),o=e.sub(r),a=o.mag()/this._startVec.mag(),s=this._rotationDisabled?0:180*o.angleWith(this._startVec)/Math.PI,l=this._map;if(this._gestureIntent){var u={duration:0,around:l.unproject(n)};"rotate"===this._gestureIntent&&(u.bearing=this._startBearing+s),"zoom"!==this._gestureIntent&&"rotate"!==this._gestureIntent||(u.zoom=l.transform.scaleZoom(this._startScale*a)),l.stop(),this._drainInertiaBuffer(),this._inertia.push([Date.now(),a,n]),l.easeTo(u,{originalEvent:t})}else{var c=Math.abs(1-a)>.15;Math.abs(s)>10?this._gestureIntent="rotate":c&&(this._gestureIntent="zoom"),this._gestureIntent&&(this._startVec=o,this._startScale=l.transform.scale,this._startBearing=l.transform.bearing)}t.preventDefault()}},s.prototype._onEnd=function(t){o.document.removeEventListener("touchmove",this._onMove),o.document.removeEventListener("touchend",this._onEnd),this._drainInertiaBuffer();var e=this._inertia,r=this._map;if(e.length<2)r.snapToNorth({},{originalEvent:t});else{var i=e[e.length-1],n=e[0],s=r.transform.scaleZoom(this._startScale*i[1]),l=r.transform.scaleZoom(this._startScale*n[1]),u=s-l,c=(i[0]-n[0])/1e3,p=i[2];if(0!==c&&s!==l){var h=.15*u/c;Math.abs(h)>2.5&&(h=h>0?2.5:-2.5);var f=1e3*Math.abs(h/(12*.15)),d=s+h*f/2e3;d<0&&(d=0),r.easeTo({zoom:d,duration:f,easing:a,around:this._aroundCenter?r.getCenter():r.unproject(p)},{originalEvent:t})}else r.snapToNorth({},{originalEvent:t})}},s.prototype._drainInertiaBuffer=function(){for(var t=this._inertia,e=Date.now();t.length>2&&e-t[0][0]>160;)t.shift()},e.exports=s},{"../../util/dom":253,"../../util/util":267,"../../util/window":248}],240:[function(t,e,r){"use strict";var i=t("../util/util"),n=t("../util/window"),o=t("../util/throttle"),a=function(){i.bindAll(["_onHashChange","_updateHash"],this),this._updateHash=o(this._updateHashUnthrottled.bind(this),300)};a.prototype.addTo=function(t){return this._map=t,n.addEventListener("hashchange",this._onHashChange,!1),this._map.on("moveend",this._updateHash),this},a.prototype.remove=function(){return n.removeEventListener("hashchange",this._onHashChange,!1),this._map.off("moveend",this._updateHash),delete this._map,this},a.prototype.getHashString=function(t){var e=this._map.getCenter(),r=Math.round(100*this._map.getZoom())/100,i=Math.max(0,Math.ceil(Math.log(r)/Math.LN2)),n=Math.round(e.lng*Math.pow(10,i))/Math.pow(10,i),o=Math.round(e.lat*Math.pow(10,i))/Math.pow(10,i),a=this._map.getBearing(),s=this._map.getPitch(),l="";return l+=t?"#/"+n+"/"+o+"/"+r:"#"+r+"/"+o+"/"+n,(a||s)&&(l+="/"+Math.round(10*a)/10),s&&(l+="/"+Math.round(s)),l},a.prototype._onHashChange=function(){var t=n.location.hash.replace("#","").split("/");return t.length>=3&&(this._map.jumpTo({center:[+t[2],+t[1]],zoom:+t[0],bearing:+(t[3]||0),pitch:+(t[4]||0)}),!0)},a.prototype._updateHashUnthrottled=function(){var t=this.getHashString();n.history.replaceState("","",t)},e.exports=a},{"../util/throttle":265,"../util/util":267,"../util/window":248}],241:[function(t,e,r){"use strict";function i(t){t.parentNode&&t.parentNode.removeChild(t)}var n=t("../util/util"),o=t("../util/browser"),a=t("../util/window"),s=t("../util/window"),l=s.HTMLImageElement,u=s.HTMLElement,c=t("../util/dom"),p=t("../util/ajax"),h=t("../style/style"),f=t("../render/painter"),d=t("../geo/transform"),m=t("./hash"),y=t("./bind_handlers"),g=t("./camera"),v=t("../geo/lng_lat"),_=t("../geo/lng_lat_bounds"),x=t("@mapbox/point-geometry"),b=t("./control/attribution_control"),w=t("./control/logo_control"),z=t("mapbox-gl-supported");t("./events");var T={center:[0,0],zoom:0,bearing:0,pitch:0,minZoom:0,maxZoom:22,interactive:!0,scrollZoom:!0,boxZoom:!0,dragRotate:!0,dragPan:!0,keyboard:!0,doubleClickZoom:!0,touchZoomRotate:!0,bearingSnap:7,hash:!1,attributionControl:!0,failIfMajorPerformanceCaveat:!1,preserveDrawingBuffer:!1,trackResize:!0,renderWorldCopies:!0,refreshExpiredTiles:!0,maxTileCacheSize:null,transformRequest:null,collisionFadeDuration:300},S=function(t){function e(e){var r=this;if(null!=(e=n.extend({},T,e)).minZoom&&null!=e.maxZoom&&e.minZoom>e.maxZoom)throw new Error("maxZoom must be greater than minZoom");var i=new d(e.minZoom,e.maxZoom,e.renderWorldCopies);t.call(this,i,e),this._interactive=e.interactive,this._maxTileCacheSize=e.maxTileCacheSize,this._failIfMajorPerformanceCaveat=e.failIfMajorPerformanceCaveat,this._preserveDrawingBuffer=e.preserveDrawingBuffer,this._trackResize=e.trackResize,this._bearingSnap=e.bearingSnap,this._refreshExpiredTiles=e.refreshExpiredTiles,this._collisionFadeDuration=e.collisionFadeDuration;var o=e.transformRequest;if(this._transformRequest=o?function(t,e){return o(t,e)||{url:t}}:function(t){return{url:t}},"string"==typeof e.container){var s=a.document.getElementById(e.container);if(!s)throw new Error("Container '"+e.container+"' not found.");this._container=s}else{if(!(e.container instanceof u))throw new Error("Invalid type: 'container' must be a String or HTMLElement.");this._container=e.container}e.maxBounds&&this.setMaxBounds(e.maxBounds),n.bindAll(["_onWindowOnline","_onWindowResize","_contextLost","_contextRestored","_update","_render","_onData","_onDataLoading"],this),this._setupContainer(),this._setupPainter(),this.on("move",this._update.bind(this,!1)),this.on("zoom",this._update.bind(this,!0)),this.on("move",function(){r._rerender()}),void 0!==a&&(a.addEventListener("online",this._onWindowOnline,!1),a.addEventListener("resize",this._onWindowResize,!1)),y(this,e),this._hash=e.hash&&(new m).addTo(this),this._hash&&this._hash._onHashChange()||this.jumpTo({center:e.center,zoom:e.zoom,bearing:e.bearing,pitch:e.pitch}),this.resize(),e.style&&this.setStyle(e.style,{localIdeographFontFamily:e.localIdeographFontFamily}),e.attributionControl&&this.addControl(new b),this.addControl(new w,e.logoPosition),this.on("style.load",function(){this.transform.unmodified&&this.jumpTo(this.style.stylesheet),this.style.update({transition:!1})}),this.on("data",this._onData),this.on("dataloading",this._onDataLoading)}t&&(e.__proto__=t),(e.prototype=Object.create(t&&t.prototype)).constructor=e;var r={showTileBoundaries:{},showCollisionBoxes:{},showOverdrawInspector:{},repaint:{},vertices:{}};return e.prototype.addControl=function(t,e){void 0===e&&t.getDefaultPosition&&(e=t.getDefaultPosition()),void 0===e&&(e="top-right");var r=t.onAdd(this),i=this._controlPositions[e];return-1!==e.indexOf("bottom")?i.insertBefore(r,i.firstChild):i.appendChild(r),this},e.prototype.removeControl=function(t){return t.onRemove(this),this},e.prototype.resize=function(){var t=this._containerDimensions(),e=t[0],r=t[1];return this._resizeCanvas(e,r),this.transform.resize(e,r),this.painter.resize(e,r),this.fire("movestart").fire("move").fire("resize").fire("moveend")},e.prototype.getBounds=function(){var t=new _(this.transform.pointLocation(new x(0,this.transform.height)),this.transform.pointLocation(new x(this.transform.width,0)));return(this.transform.angle||this.transform.pitch)&&(t.extend(this.transform.pointLocation(new x(this.transform.size.x,0))),t.extend(this.transform.pointLocation(new x(0,this.transform.size.y)))),t},e.prototype.getMaxBounds=function(){return this.transform.latRange&&2===this.transform.latRange.length&&this.transform.lngRange&&2===this.transform.lngRange.length?new _([this.transform.lngRange[0],this.transform.latRange[0]],[this.transform.lngRange[1],this.transform.latRange[1]]):null},e.prototype.setMaxBounds=function(t){if(t){var e=_.convert(t);this.transform.lngRange=[e.getWest(),e.getEast()],this.transform.latRange=[e.getSouth(),e.getNorth()],this.transform._constrain(),this._update()}else null!==t&&void 0!==t||(this.transform.lngRange=null,this.transform.latRange=null,this._update());return this},e.prototype.setMinZoom=function(t){if((t=null===t||void 0===t?0:t)>=0&&t<=this.transform.maxZoom)return this.transform.minZoom=t,this._update(),this.getZoom()<t&&this.setZoom(t),this;throw new Error("minZoom must be between 0 and the current maxZoom, inclusive")},e.prototype.getMinZoom=function(){return this.transform.minZoom},e.prototype.setMaxZoom=function(t){if((t=null===t||void 0===t?22:t)>=this.transform.minZoom)return this.transform.maxZoom=t,this._update(),this.getZoom()>t&&this.setZoom(t),this;throw new Error("maxZoom must be greater than the current minZoom")},e.prototype.getMaxZoom=function(){return this.transform.maxZoom},e.prototype.project=function(t){return this.transform.locationPoint(v.convert(t))},e.prototype.unproject=function(t){return this.transform.pointLocation(x.convert(t))},e.prototype.on=function(e,r,i){var o=this;if(void 0===i)return t.prototype.on.call(this,e,r);var a=function(){if("mouseenter"===e||"mouseover"===e){var t=!1;return{layer:r,listener:i,delegates:{mousemove:function(a){var s=o.getLayer(r)?o.queryRenderedFeatures(a.point,{layers:[r]}):[];s.length?t||(t=!0,i.call(o,n.extend({features:s},a,{type:e}))):t=!1},mouseout:function(){t=!1}}}}if("mouseleave"===e||"mouseout"===e){var a=!1;return{layer:r,listener:i,delegates:{mousemove:function(t){(o.getLayer(r)?o.queryRenderedFeatures(t.point,{layers:[r]}):[]).length?a=!0:a&&(a=!1,i.call(o,n.extend({},t,{type:e})))},mouseout:function(t){a&&(a=!1,i.call(o,n.extend({},t,{type:e})))}}}}return{layer:r,listener:i,delegates:(s={},s[e]=function(t){var e=o.getLayer(r)?o.queryRenderedFeatures(t.point,{layers:[r]}):[];e.length&&i.call(o,n.extend({features:e},t))},s)};var s}();this._delegatedListeners=this._delegatedListeners||{},this._delegatedListeners[e]=this._delegatedListeners[e]||[],this._delegatedListeners[e].push(a);for(var s in a.delegates)o.on(s,a.delegates[s]);return this},e.prototype.off=function(e,r,i){var n=this;if(void 0===i)return t.prototype.off.call(this,e,r);if(this._delegatedListeners&&this._delegatedListeners[e])for(var o=this._delegatedListeners[e],a=0;a<o.length;a++){var s=o[a];if(s.layer===r&&s.listener===i){for(var l in s.delegates)n.off(l,s.delegates[l]);return o.splice(a,1),n}}return this},e.prototype.queryRenderedFeatures=function(t,e){return 2===arguments.length?(t=arguments[0],e=arguments[1]):1===arguments.length&&function(t){return t instanceof x||Array.isArray(t)}(arguments[0])?(t=arguments[0],e={}):1===arguments.length?(t=void 0,e=arguments[0]):(t=void 0,e={}),this.style?this.style.queryRenderedFeatures(this._makeQueryGeometry(t),e,this.transform.zoom,this.transform.angle):[]},e.prototype._makeQueryGeometry=function(t){var e=this;void 0===t&&(t=[x.convert([0,0]),x.convert([this.transform.width,this.transform.height])]);var r;if(t instanceof x||"number"==typeof t[0])r=[x.convert(t)];else{var i=[x.convert(t[0]),x.convert(t[1])];r=[i[0],new x(i[1].x,i[0].y),i[1],new x(i[0].x,i[1].y),i[0]]}return r=r.map(function(t){return e.transform.pointCoordinate(t)})},e.prototype.querySourceFeatures=function(t,e){return this.style.querySourceFeatures(t,e)},e.prototype.setStyle=function(t,e){if((!e||!1!==e.diff&&!e.localIdeographFontFamily)&&this.style&&t&&"object"==typeof t)try{return this.style.setState(t)&&this._update(!0),this}catch(t){n.warnOnce("Unable to perform style diff: "+(t.message||t.error||t)+". Rebuilding the style from scratch.")}return this.style&&(this.style.setEventedParent(null),this.style._remove()),t?(this.style=new h(this,e||{}),this.style.setEventedParent(this,{style:this.style}),"string"==typeof t?this.style.loadURL(t):this.style.loadJSON(t),this):(delete this.style,this)},e.prototype.getStyle=function(){if(this.style)return this.style.serialize()},e.prototype.isStyleLoaded=function(){return this.style?this.style.loaded():n.warnOnce("There is no style added to the map.")},e.prototype.addSource=function(t,e){return this.style.addSource(t,e),this._update(!0),this},e.prototype.isSourceLoaded=function(t){var e=this.style&&this.style.sourceCaches[t];{if(void 0!==e)return e.loaded();this.fire("error",{error:new Error("There is no source with ID '"+t+"'")})}},e.prototype.areTilesLoaded=function(){var t=this.style&&this.style.sourceCaches;for(var e in t){var r=t[e]._tiles;for(var i in r){var n=r[i];if("loaded"!==n.state&&"errored"!==n.state)return!1}}return!0},e.prototype.addSourceType=function(t,e,r){return this.style.addSourceType(t,e,r)},e.prototype.removeSource=function(t){return this.style.removeSource(t),this._update(!0),this},e.prototype.getSource=function(t){return this.style.getSource(t)},e.prototype.addImage=function(t,e,r){void 0===r&&(r={});var i=r.pixelRatio;void 0===i&&(i=1);var n=r.sdf;if(void 0===n&&(n=!1),e instanceof l)e=o.getImageData(e);else if(void 0===e.width||void 0===e.height)return this.fire("error",{error:new Error("Invalid arguments to map.addImage(). The second argument must be an `HTMLImageElement`, `ImageData`, or object with `width`, `height`, and `data` properties with the same format as `ImageData`")});this.style.addImage(t,{data:e,pixelRatio:i,sdf:n})},e.prototype.removeImage=function(t){this.style.removeImage(t)},e.prototype.loadImage=function(t,e){p.getImage(this._transformRequest(t,p.ResourceType.Image),e)},e.prototype.addLayer=function(t,e){return this.style.addLayer(t,e),this._update(!0),this},e.prototype.moveLayer=function(t,e){return this.style.moveLayer(t,e),this._update(!0),this},e.prototype.removeLayer=function(t){return this.style.removeLayer(t),this._update(!0),this},e.prototype.getLayer=function(t){return this.style.getLayer(t)},e.prototype.setFilter=function(t,e){return this.style.setFilter(t,e),this._update(!0),this},e.prototype.setLayerZoomRange=function(t,e,r){return this.style.setLayerZoomRange(t,e,r),this._update(!0),this},e.prototype.getFilter=function(t){return this.style.getFilter(t)},e.prototype.setPaintProperty=function(t,e,r){return this.style.setPaintProperty(t,e,r),this._update(!0),this},e.prototype.getPaintProperty=function(t,e){return this.style.getPaintProperty(t,e)},e.prototype.setLayoutProperty=function(t,e,r){return this.style.setLayoutProperty(t,e,r),this._update(!0),this},e.prototype.getLayoutProperty=function(t,e){return this.style.getLayoutProperty(t,e)},e.prototype.setLight=function(t){return this.style.setLight(t),this._update(!0),this},e.prototype.getLight=function(){return this.style.getLight()},e.prototype.getContainer=function(){return this._container},e.prototype.getCanvasContainer=function(){return this._canvasContainer},e.prototype.getCanvas=function(){return this._canvas},e.prototype._containerDimensions=function(){var t=0,e=0;return this._container&&(t=this._container.offsetWidth||400,e=this._container.offsetHeight||300),[t,e]},e.prototype._setupContainer=function(){var t=this._container;t.classList.add("mapboxgl-map"),(this._missingCSSContainer=c.create("div","mapboxgl-missing-css",t)).innerHTML="Missing Mapbox GL JS CSS";var e=this._canvasContainer=c.create("div","mapboxgl-canvas-container",t);this._interactive&&e.classList.add("mapboxgl-interactive"),this._canvas=c.create("canvas","mapboxgl-canvas",e),this._canvas.style.position="absolute",this._canvas.addEventListener("webglcontextlost",this._contextLost,!1),this._canvas.addEventListener("webglcontextrestored",this._contextRestored,!1),this._canvas.setAttribute("tabindex","0"),this._canvas.setAttribute("aria-label","Map");var r=this._containerDimensions();this._resizeCanvas(r[0],r[1]);var i=this._controlContainer=c.create("div","mapboxgl-control-container",t),n=this._controlPositions={};["top-left","top-right","bottom-left","bottom-right"].forEach(function(t){n[t]=c.create("div","mapboxgl-ctrl-"+t,i)})},e.prototype._resizeCanvas=function(t,e){var r=a.devicePixelRatio||1;this._canvas.width=r*t,this._canvas.height=r*e,this._canvas.style.width=t+"px",this._canvas.style.height=e+"px"},e.prototype._setupPainter=function(){var t=n.extend({failIfMajorPerformanceCaveat:this._failIfMajorPerformanceCaveat,preserveDrawingBuffer:this._preserveDrawingBuffer},z.webGLContextAttributes),e=this._canvas.getContext("webgl",t)||this._canvas.getContext("experimental-webgl",t);e?this.painter=new f(e,this.transform):this.fire("error",{error:new Error("Failed to initialize WebGL")})},e.prototype._contextLost=function(t){t.preventDefault(),this._frameId&&(o.cancelFrame(this._frameId),this._frameId=null),this.fire("webglcontextlost",{originalEvent:t})},e.prototype._contextRestored=function(t){this._setupPainter(),this.resize(),this._update(),this.fire("webglcontextrestored",{originalEvent:t})},e.prototype.loaded=function(){return!(this._styleDirty||this._sourcesDirty||this._placementDirty)&&!(!this.style||!this.style.loaded())},e.prototype._update=function(t){return this.style?(this._styleDirty=this._styleDirty||t,this._sourcesDirty=!0,this._rerender(),this):this},e.prototype._render=function(){return this.style&&this._styleDirty&&(this._styleDirty=!1,this.style.update(),this.style._recalculate(this.transform.zoom)),this.style&&this._sourcesDirty&&(this._sourcesDirty=!1,this.style._updateSources(this.transform)),this._placementDirty=this.style&&this.style._updatePlacement(this.painter.transform,this.showCollisionBoxes,this._collisionFadeDuration),this.painter.render(this.style,{showTileBoundaries:this.showTileBoundaries,showOverdrawInspector:this._showOverdrawInspector,rotating:this.rotating,zooming:this.zooming,collisionFadeDuration:this._collisionFadeDuration}),this.fire("render"),this.loaded()&&!this._loaded&&(this._loaded=!0,this.fire("load")),this._frameId=null,this.style&&this.style.hasTransitions()&&(this._styleDirty=!0),(this._sourcesDirty||this._repaint||this._styleDirty||this._placementDirty)&&this._rerender(),this},e.prototype.remove=function(){this._hash&&this._hash.remove(),o.cancelFrame(this._frameId),this._frameId=null,this.setStyle(null),void 0!==a&&(a.removeEventListener("resize",this._onWindowResize,!1),a.removeEventListener("online",this._onWindowOnline,!1));var t=this.painter.gl.getExtension("WEBGL_lose_context");t&&t.loseContext(),i(this._canvasContainer),i(this._controlContainer),i(this._missingCSSContainer),this._container.classList.remove("mapboxgl-map"),this.fire("remove")},e.prototype._rerender=function(){this.style&&!this._frameId&&(this._frameId=o.frame(this._render))},e.prototype._onWindowOnline=function(){this._update()},e.prototype._onWindowResize=function(){this._trackResize&&this.stop().resize()._update()},r.showTileBoundaries.get=function(){return!!this._showTileBoundaries},r.showTileBoundaries.set=function(t){this._showTileBoundaries!==t&&(this._showTileBoundaries=t,this._update())},r.showCollisionBoxes.get=function(){return!!this._showCollisionBoxes},r.showCollisionBoxes.set=function(t){this._showCollisionBoxes!==t&&(this._showCollisionBoxes=t,t?this.style._generateCollisionBoxes():this._update())},r.showOverdrawInspector.get=function(){return!!this._showOverdrawInspector},r.showOverdrawInspector.set=function(t){this._showOverdrawInspector!==t&&(this._showOverdrawInspector=t,this._update())},r.repaint.get=function(){return!!this._repaint},r.repaint.set=function(t){this._repaint=t,this._update()},r.vertices.get=function(){return!!this._vertices},r.vertices.set=function(t){this._vertices=t,this._update()},e.prototype._onData=function(t){this._update("style"===t.dataType),this.fire(t.dataType+"data",t)},e.prototype._onDataLoading=function(t){this.fire(t.dataType+"dataloading",t)},Object.defineProperties(e.prototype,r),e}(g);e.exports=S},{"../geo/lng_lat":69,"../geo/lng_lat_bounds":70,"../geo/transform":71,"../render/painter":90,"../style/style":186,"../util/ajax":245,"../util/browser":246,"../util/dom":253,"../util/util":267,"../util/window":248,"./bind_handlers":224,"./camera":225,"./control/attribution_control":226,"./control/logo_control":229,"./events":232,"./hash":240,"@mapbox/point-geometry":2,"mapbox-gl-supported":38}],242:[function(t,e,r){"use strict";var i=t("../util/dom"),n=t("../geo/lng_lat"),o=t("@mapbox/point-geometry"),a=t("../util/smart_wrap"),s=t("../util/util").bindAll,l=function(t,e){if(this._offset=o.convert(e&&e.offset||[0,0]),s(["_update","_onMapClick"],this),!t){t=i.create("div");var r=i.createNS("http://www.w3.org/2000/svg","svg");r.setAttributeNS(null,"height","41px"),r.setAttributeNS(null,"width","27px"),r.setAttributeNS(null,"viewBox","0 0 27 41");var n=i.createNS("http://www.w3.org/2000/svg","g");n.setAttributeNS(null,"stroke","none"),n.setAttributeNS(null,"stroke-width","1"),n.setAttributeNS(null,"fill","none"),n.setAttributeNS(null,"fill-rule","evenodd");var a=i.createNS("http://www.w3.org/2000/svg","g");a.setAttributeNS(null,"fill-rule","nonzero");var l=i.createNS("http://www.w3.org/2000/svg","g");l.setAttributeNS(null,"transform","translate(3.0, 29.0)"),l.setAttributeNS(null,"fill","#000000");for(var u=0,c=[{rx:"10.5",ry:"5.25002273"},{rx:"10.5",ry:"5.25002273"},{rx:"9.5",ry:"4.77275007"},{rx:"8.5",ry:"4.29549936"},{rx:"7.5",ry:"3.81822308"},{rx:"6.5",ry:"3.34094679"},{rx:"5.5",ry:"2.86367051"},{rx:"4.5",ry:"2.38636864"}];u<c.length;u+=1){var p=c[u],h=i.createNS("http://www.w3.org/2000/svg","ellipse");h.setAttributeNS(null,"opacity","0.04"),h.setAttributeNS(null,"cx","10.5"),h.setAttributeNS(null,"cy","5.80029008"),h.setAttributeNS(null,"rx",p.rx),h.setAttributeNS(null,"ry",p.ry),l.appendChild(h)}var f=i.createNS("http://www.w3.org/2000/svg","g");f.setAttributeNS(null,"fill","#3FB1CE");var d=i.createNS("http://www.w3.org/2000/svg","path");d.setAttributeNS(null,"d","M27,13.5 C27,19.074644 20.250001,27.000002 14.75,34.500002 C14.016665,35.500004 12.983335,35.500004 12.25,34.500002 C6.7499993,27.000002 0,19.222562 0,13.5 C0,6.0441559 6.0441559,0 13.5,0 C20.955844,0 27,6.0441559 27,13.5 Z"),f.appendChild(d);var m=i.createNS("http://www.w3.org/2000/svg","g");m.setAttributeNS(null,"opacity","0.25"),m.setAttributeNS(null,"fill","#000000");var y=i.createNS("http://www.w3.org/2000/svg","path");y.setAttributeNS(null,"d","M13.5,0 C6.0441559,0 0,6.0441559 0,13.5 C0,19.222562 6.7499993,27 12.25,34.5 C13,35.522727 14.016664,35.500004 14.75,34.5 C20.250001,27 27,19.074644 27,13.5 C27,6.0441559 20.955844,0 13.5,0 Z M13.5,1 C20.415404,1 26,6.584596 26,13.5 C26,15.898657 24.495584,19.181431 22.220703,22.738281 C19.945823,26.295132 16.705119,30.142167 13.943359,33.908203 C13.743445,34.180814 13.612715,34.322738 13.5,34.441406 C13.387285,34.322738 13.256555,34.180814 13.056641,33.908203 C10.284481,30.127985 7.4148684,26.314159 5.015625,22.773438 C2.6163816,19.232715 1,15.953538 1,13.5 C1,6.584596 6.584596,1 13.5,1 Z"),m.appendChild(y);var g=i.createNS("http://www.w3.org/2000/svg","g");g.setAttributeNS(null,"transform","translate(6.0, 7.0)"),g.setAttributeNS(null,"fill","#FFFFFF");var v=i.createNS("http://www.w3.org/2000/svg","g");v.setAttributeNS(null,"transform","translate(8.0, 8.0)");var _=i.createNS("http://www.w3.org/2000/svg","circle");_.setAttributeNS(null,"fill","#000000"),_.setAttributeNS(null,"opacity","0.25"),_.setAttributeNS(null,"cx","5.5"),_.setAttributeNS(null,"cy","5.5"),_.setAttributeNS(null,"r","5.4999962");var x=i.createNS("http://www.w3.org/2000/svg","circle");x.setAttributeNS(null,"fill","#FFFFFF"),x.setAttributeNS(null,"cx","5.5"),x.setAttributeNS(null,"cy","5.5"),x.setAttributeNS(null,"r","5.4999962"),v.appendChild(_),v.appendChild(x),a.appendChild(l),a.appendChild(f),a.appendChild(m),a.appendChild(g),a.appendChild(v),r.appendChild(a),t.appendChild(r)}t.classList.add("mapboxgl-marker"),this._element=t,this._popup=null};l.prototype.addTo=function(t){return this.remove(),this._map=t,t.getCanvasContainer().appendChild(this._element),t.on("move",this._update),t.on("moveend",this._update),this._update(),this._map.on("click",this._onMapClick),this},l.prototype.remove=function(){return this._map&&(this._map.off("click",this._onMapClick),this._map.off("move",this._update),this._map.off("moveend",this._update),delete this._map),i.remove(this._element),this._popup&&this._popup.remove(),this},l.prototype.getLngLat=function(){return this._lngLat},l.prototype.setLngLat=function(t){return this._lngLat=n.convert(t),this._pos=null,this._popup&&this._popup.setLngLat(this._lngLat),this._update(),this},l.prototype.getElement=function(){return this._element},l.prototype.setPopup=function(t){return this._popup&&(this._popup.remove(),this._popup=null),t&&("offset"in t.options||(t.options.offset=this._offset),this._popup=t,this._popup.setLngLat(this._lngLat)),this},l.prototype._onMapClick=function(t){var e=t.originalEvent.target,r=this._element;this._popup&&(e===r||r.contains(e))&&this.togglePopup()},l.prototype.getPopup=function(){return this._popup},l.prototype.togglePopup=function(){var t=this._popup;return t?(t.isOpen()?t.remove():t.addTo(this._map),this):this},l.prototype._update=function(t){this._map&&(this._map.transform.renderWorldCopies&&(this._lngLat=a(this._lngLat,this._pos,this._map.transform)),this._pos=this._map.project(this._lngLat)._add(this._offset),t&&"moveend"!==t.type||(this._pos=this._pos.round()),i.setTransform(this._element,"translate(-50%, -50%) translate("+this._pos.x+"px, "+this._pos.y+"px)"))},e.exports=l},{"../geo/lng_lat":69,"../util/dom":253,"../util/smart_wrap":263,"../util/util":267,"@mapbox/point-geometry":2}],243:[function(t,e,r){"use strict";function i(t){if(t){if("number"==typeof t){var e=Math.round(Math.sqrt(.5*Math.pow(t,2)));return{top:new l(0,t),"top-left":new l(e,e),"top-right":new l(-e,e),bottom:new l(0,-t),"bottom-left":new l(e,-e),"bottom-right":new l(-e,-e),left:new l(t,0),right:new l(-t,0)}}if(t instanceof l||Array.isArray(t)){var r=l.convert(t);return{top:r,"top-left":r,"top-right":r,bottom:r,"bottom-left":r,"bottom-right":r,left:r,right:r}}return{top:l.convert(t.top||[0,0]),"top-left":l.convert(t["top-left"]||[0,0]),"top-right":l.convert(t["top-right"]||[0,0]),bottom:l.convert(t.bottom||[0,0]),"bottom-left":l.convert(t["bottom-left"]||[0,0]),"bottom-right":l.convert(t["bottom-right"]||[0,0]),left:l.convert(t.left||[0,0]),right:l.convert(t.right||[0,0])}}return i(new l(0,0))}var n=t("../util/util"),o=t("../util/evented"),a=t("../util/dom"),s=t("../geo/lng_lat"),l=t("@mapbox/point-geometry"),u=t("../util/window"),c=t("../util/smart_wrap"),p={closeButton:!0,closeOnClick:!0},h=function(t){function e(e){t.call(this),this.options=n.extend(Object.create(p),e),n.bindAll(["_update","_onClickClose"],this)}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype.addTo=function(t){return this._map=t,this._map.on("move",this._update),this.options.closeOnClick&&this._map.on("click",this._onClickClose),this._update(),this},e.prototype.isOpen=function(){return!!this._map},e.prototype.remove=function(){return this._content&&a.remove(this._content),this._container&&(a.remove(this._container),delete this._container),this._map&&(this._map.off("move",this._update),this._map.off("click",this._onClickClose),delete this._map),this.fire("close"),this},e.prototype.getLngLat=function(){return this._lngLat},e.prototype.setLngLat=function(t){return this._lngLat=s.convert(t),this._pos=null,this._update(),this},e.prototype.setText=function(t){return this.setDOMContent(u.document.createTextNode(t))},e.prototype.setHTML=function(t){var e,r=u.document.createDocumentFragment(),i=u.document.createElement("body");for(i.innerHTML=t;;){if(!(e=i.firstChild))break;r.appendChild(e)}return this.setDOMContent(r)},e.prototype.setDOMContent=function(t){return this._createContent(),this._content.appendChild(t),this._update(),this},e.prototype._createContent=function(){this._content&&a.remove(this._content),this._content=a.create("div","mapboxgl-popup-content",this._container),this.options.closeButton&&(this._closeButton=a.create("button","mapboxgl-popup-close-button",this._content),this._closeButton.type="button",this._closeButton.setAttribute("aria-label","Close popup"),this._closeButton.innerHTML="×",this._closeButton.addEventListener("click",this._onClickClose))},e.prototype._update=function(){if(this._map&&this._lngLat&&this._content){this._container||(this._container=a.create("div","mapboxgl-popup",this._map.getContainer()),this._tip=a.create("div","mapboxgl-popup-tip",this._container),this._container.appendChild(this._content)),this._map.transform.renderWorldCopies&&(this._lngLat=c(this._lngLat,this._pos,this._map.transform));var t=this._pos=this._map.project(this._lngLat),e=this.options.anchor,r=i(this.options.offset);if(!e){var n=this._container.offsetWidth,o=this._container.offsetHeight;e=t.y+r.bottom.y<o?["top"]:t.y>this._map.transform.height-o?["bottom"]:[],t.x<n/2?e.push("left"):t.x>this._map.transform.width-n/2&&e.push("right"),e=0===e.length?"bottom":e.join("-")}var s=t.add(r[e]).round(),l={top:"translate(-50%,0)","top-left":"translate(0,0)","top-right":"translate(-100%,0)",bottom:"translate(-50%,-100%)","bottom-left":"translate(0,-100%)","bottom-right":"translate(-100%,-100%)",left:"translate(0,-50%)",right:"translate(-100%,-50%)"},u=this._container.classList;for(var p in l)u.remove("mapboxgl-popup-anchor-"+p);u.add("mapboxgl-popup-anchor-"+e),a.setTransform(this._container,l[e]+" translate("+s.x+"px,"+s.y+"px)")}},e.prototype._onClickClose=function(){this.remove()},e}(o);e.exports=h},{"../geo/lng_lat":69,"../util/dom":253,"../util/evented":254,"../util/smart_wrap":263,"../util/util":267,"../util/window":248,"@mapbox/point-geometry":2}],244:[function(t,e,r){"use strict";var i=t("./util"),n=function(t,e,r){this.target=t,this.parent=e,this.mapId=r,this.callbacks={},this.callbackID=0,i.bindAll(["receive"],this),this.target.addEventListener("message",this.receive,!1)};n.prototype.send=function(t,e,r,i,n){var o=r?this.mapId+":"+this.callbackID++:null;r&&(this.callbacks[o]=r),this.target.postMessage({targetMapId:n,sourceMapId:this.mapId,type:t,id:String(o),data:e},i)},n.prototype.receive=function(t){var e,r=this,i=t.data,n=i.id;if(!i.targetMapId||this.mapId===i.targetMapId){var o=function(t,e,i){r.target.postMessage({sourceMapId:r.mapId,type:"<response>",id:String(n),error:t?String(t):null,data:e},i)};if("<response>"===i.type)e=this.callbacks[i.id],delete this.callbacks[i.id],e&&i.error?e(new Error(i.error)):e&&e(null,i.data);else if(void 0!==i.id&&this.parent[i.type])this.parent[i.type](i.sourceMapId,i.data,o);else if(void 0!==i.id&&this.parent.getWorkerSource){var a=i.type.split(".");this.parent.getWorkerSource(i.sourceMapId,a[0])[a[1]](i.data,o)}else this.parent[i.type](i.data)}},n.prototype.remove=function(){this.target.removeEventListener("message",this.receive,!1)},e.exports=n},{"./util":267}],245:[function(t,e,r){"use strict";function i(t){var e=new o.XMLHttpRequest;e.open("GET",t.url,!0);for(var r in t.headers)e.setRequestHeader(r,t.headers[r]);return e.withCredentials="include"===t.credentials,e}function n(t){var e=o.document.createElement("a");return e.href=t,e.protocol===o.document.location.protocol&&e.host===o.document.location.host}var o=t("./window"),a={Unknown:"Unknown",Style:"Style",Source:"Source",Tile:"Tile",Glyphs:"Glyphs",SpriteImage:"SpriteImage",SpriteJSON:"SpriteJSON",Image:"Image"};r.ResourceType=a,"function"==typeof Object.freeze&&Object.freeze(a);var s=function(t){function e(e,r){t.call(this,e),this.status=r}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e}(Error);r.getJSON=function(t,e){var r=i(t);return r.setRequestHeader("Accept","application/json"),r.onerror=function(){e(new Error(r.statusText))},r.onload=function(){if(r.status>=200&&r.status<300&&r.response){var t;try{t=JSON.parse(r.response)}catch(t){return e(t)}e(null,t)}else e(new s(r.statusText,r.status))},r.send(),r},r.getArrayBuffer=function(t,e){var r=i(t);return r.responseType="arraybuffer",r.onerror=function(){e(new Error(r.statusText))},r.onload=function(){var t=r.response;if(0===t.byteLength&&200===r.status)return e(new Error("http status 200 returned without content."));r.status>=200&&r.status<300&&r.response?e(null,{data:t,cacheControl:r.getResponseHeader("Cache-Control"),expires:r.getResponseHeader("Expires")}):e(new s(r.statusText,r.status))},r.send(),r};r.getImage=function(t,e){return r.getArrayBuffer(t,function(t,r){if(t)e(t);else if(r){var i=new o.Image,n=o.URL||o.webkitURL;i.onload=function(){e(null,i),n.revokeObjectURL(i.src)};var a=new o.Blob([new Uint8Array(r.data)],{type:"image/png"});i.cacheControl=r.cacheControl,i.expires=r.expires,i.src=r.data.byteLength?n.createObjectURL(a):"data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAEAAAABCAYAAAAfFcSJAAAAC0lEQVQYV2NgAAIAAAUAAarVyFEAAAAASUVORK5CYII="}})},r.getVideo=function(t,e){var r=o.document.createElement("video");r.onloadstart=function(){e(null,r)};for(var i=0;i<t.length;i++){var a=o.document.createElement("source");n(t[i])||(r.crossOrigin="Anonymous"),a.src=t[i],r.appendChild(a)}return r}},{"./window":248}],246:[function(t,e,r){"use strict";var i=t("./window"),n=i.performance&&i.performance.now?i.performance.now.bind(i.performance):Date.now.bind(Date),o=i.requestAnimationFrame||i.mozRequestAnimationFrame||i.webkitRequestAnimationFrame||i.msRequestAnimationFrame,a=i.cancelAnimationFrame||i.mozCancelAnimationFrame||i.webkitCancelAnimationFrame||i.msCancelAnimationFrame;e.exports={now:n,frame:function(t){return o(t)},cancelFrame:function(t){return a(t)},timed:function(t,e,r){function i(){if(!a){var l=n();l>=s+e?t.call(r,1):(t.call(r,(l-s)/e),o(i))}}if(!e)return t.call(r,1),null;var a=!1,s=n();return o(i),function(){a=!0}},getImageData:function(t){var e=i.document.createElement("canvas"),r=e.getContext("2d");if(!r)throw new Error("failed to create canvas 2d context");return e.width=t.width,e.height=t.height,r.drawImage(t,0,0,t.width,t.height),r.getImageData(0,0,t.width,t.height)},hardwareConcurrency:i.navigator.hardwareConcurrency||4,get devicePixelRatio(){return i.devicePixelRatio},supportsWebp:!1};var s=i.document.createElement("img");s.onload=function(){e.exports.supportsWebp=!0},s.src="data:image/webp;base64,UklGRh4AAABXRUJQVlA4TBEAAAAvAQAAAAfQ//73v/+BiOh/AAA="},{"./window":248}],247:[function(t,e,r){"use strict";var i=t("webworkify"),n=t("../window"),o=n.URL.createObjectURL(new i(t("../../source/worker"),{bare:!0}));e.exports=function(){return new n.Worker(o)}},{"../../source/worker":117,"../window":248,webworkify:49}],248:[function(t,e,r){"use strict";e.exports=self},{}],249:[function(t,e,r){"use strict";function i(t,e){return e.area-t.area}var n=t("quickselect"),o=t("./util").calculateSignedArea;e.exports=function(t,e){var r=t.length;if(r<=1)return[t];for(var a,s,l=[],u=0;u<r;u++){var c=o(t[u]);0!==c&&(t[u].area=Math.abs(c),void 0===s&&(s=c<0),s===c<0?(a&&l.push(a),a=[t[u]]):a.push(t[u]))}if(a&&l.push(a),e>1)for(var p=0;p<l.length;p++)l[p].length<=e||(n(l[p],e,1,l[p].length-1,i),l[p]=l[p].slice(0,e));return l}},{"./util":267,quickselect:41}],250:[function(t,e,r){"use strict";var i={API_URL:"https://api.mapbox.com",REQUIRE_ACCESS_TOKEN:!0,ACCESS_TOKEN:null};e.exports=i},{}],251:[function(t,e,r){"use strict";var i=t("assert"),n=function(t){var e=this;this._stringToNumber={},this._numberToString=[];for(var r=0;r<t.length;r++){var i=t[r];e._stringToNumber[i]=r,e._numberToString[r]=i}};n.prototype.encode=function(t){return i(t in this._stringToNumber),this._stringToNumber[t]},n.prototype.decode=function(t){return i(t<this._numberToString.length),this._numberToString[t]},e.exports=n},{assert:11}],252:[function(t,e,r){"use strict";var i=t("./util"),n=t("./actor"),o=function(t,e){var r=this;this.workerPool=t,this.actors=[],this.currentActor=0,this.id=i.uniqueId();for(var o=this.workerPool.acquire(this.id),a=0;a<o.length;a++){var s=o[a],l=new n(s,e,r.id);l.name="Worker "+a,r.actors.push(l)}};o.prototype.broadcast=function(t,e,r){r=r||function(){},i.asyncAll(this.actors,function(r,i){r.send(t,e,i)},r)},o.prototype.send=function(t,e,r,i,n){return("number"!=typeof i||isNaN(i))&&(i=this.currentActor=(this.currentActor+1)%this.actors.length),this.actors[i].send(t,e,r,n),i},o.prototype.remove=function(){this.actors.forEach(function(t){t.remove()}),this.actors=[],this.workerPool.release(this.id)},e.exports=o},{"./actor":244,"./util":267}],253:[function(t,e,r){"use strict";function i(t){for(var e=0;e<t.length;e++)if(t[e]in s)return t[e];return t[0]}var n=t("@mapbox/point-geometry"),o=t("./window");r.create=function(t,e,r){var i=o.document.createElement(t);return e&&(i.className=e),r&&r.appendChild(i),i},r.createNS=function(t,e){return o.document.createElementNS(t,e)};var a,s=o.document.documentElement.style,l=i(["userSelect","MozUserSelect","WebkitUserSelect","msUserSelect"]);r.disableDrag=function(){l&&(a=s[l],s[l]="none")},r.enableDrag=function(){l&&(s[l]=a)};var u=i(["transform","WebkitTransform"]);r.setTransform=function(t,e){t.style[u]=e};var c=function(t){t.preventDefault(),t.stopPropagation(),o.removeEventListener("click",c,!0)};r.suppressClick=function(){o.addEventListener("click",c,!0),o.setTimeout(function(){o.removeEventListener("click",c,!0)},0)},r.mousePos=function(t,e){var r=t.getBoundingClientRect();return e=e.touches?e.touches[0]:e,new n(e.clientX-r.left-t.clientLeft,e.clientY-r.top-t.clientTop)},r.touchPos=function(t,e){for(var r=t.getBoundingClientRect(),i=[],o="touchend"===e.type?e.changedTouches:e.touches,a=0;a<o.length;a++)i.push(new n(o[a].clientX-r.left-t.clientLeft,o[a].clientY-r.top-t.clientTop));return i},r.remove=function(t){t.parentNode&&t.parentNode.removeChild(t)}},{"./window":248,"@mapbox/point-geometry":2}],254:[function(t,e,r){"use strict";function i(t,e,r){r[t]=r[t]||[],r[t].push(e)}function n(t,e,r){if(r&&r[t]){var i=r[t].indexOf(e);-1!==i&&r[t].splice(i,1)}}var o=t("./util"),a=function(){};a.prototype.on=function(t,e){return this._listeners=this._listeners||{},i(t,e,this._listeners),this},a.prototype.off=function(t,e){return n(t,e,this._listeners),n(t,e,this._oneTimeListeners),this},a.prototype.once=function(t,e){return this._oneTimeListeners=this._oneTimeListeners||{},i(t,e,this._oneTimeListeners),this},a.prototype.fire=function(t,e){var r=this;if(this.listens(t)){e=o.extend({},e,{type:t,target:this});for(var i=this._listeners&&this._listeners[t]?this._listeners[t].slice():[],a=0;a<i.length;a++)i[a].call(r,e);for(var s=this._oneTimeListeners&&this._oneTimeListeners[t]?this._oneTimeListeners[t].slice():[],l=0;l<s.length;l++)s[l].call(r,e),n(t,s[l],r._oneTimeListeners);this._eventedParent&&this._eventedParent.fire(t,o.extend({},e,"function"==typeof this._eventedParentData?this._eventedParentData():this._eventedParentData))}else o.endsWith(t,"error")&&console.error(e&&e.error||e||"Empty error event");return this},a.prototype.listens=function(t){return this._listeners&&this._listeners[t]&&this._listeners[t].length>0||this._oneTimeListeners&&this._oneTimeListeners[t]&&this._oneTimeListeners[t].length>0||this._eventedParent&&this._eventedParent.listens(t)},a.prototype.setEventedParent=function(t,e){return this._eventedParent=t,this._eventedParentData=e,this},e.exports=a},{"./util":267}],255:[function(t,e,r){"use strict";function i(t,e){return e.max-t.max}function n(t,e,r,i){this.p=new l(t,e),this.h=r,this.d=o(this.p,i),this.max=this.d+this.h*Math.SQRT2}function o(t,e){for(var r=!1,i=1/0,n=0;n<e.length;n++)for(var o=e[n],a=0,s=o.length,l=s-1;a<s;l=a++){var c=o[a],p=o[l];c.y>t.y!=p.y>t.y&&t.x<(p.x-c.x)*(t.y-c.y)/(p.y-c.y)+c.x&&(r=!r),i=Math.min(i,u(t,c,p))}return(r?1:-1)*Math.sqrt(i)}function a(t){for(var e=0,r=0,i=0,o=t[0],a=0,s=o.length,l=s-1;a<s;l=a++){var u=o[a],c=o[l],p=u.x*c.y-c.x*u.y;r+=(u.x+c.x)*p,i+=(u.y+c.y)*p,e+=3*p}return new n(r/e,i/e,0,t)}var s=t("tinyqueue"),l=t("@mapbox/point-geometry"),u=t("./intersection_tests").distToSegmentSquared;e.exports=function(t,e,r){void 0===e&&(e=1),void 0===r&&(r=!1);for(var o=1/0,u=1/0,c=-1/0,p=-1/0,h=t[0],f=0;f<h.length;f++){var d=h[f];(!f||d.x<o)&&(o=d.x),(!f||d.y<u)&&(u=d.y),(!f||d.x>c)&&(c=d.x),(!f||d.y>p)&&(p=d.y)}var m=c-o,y=p-u,g=Math.min(m,y),v=g/2,_=new s(null,i);if(0===g)return new l(o,u);for(var x=o;x<c;x+=g)for(var b=u;b<p;b+=g)_.push(new n(x+v,b+v,v,t));for(var w=a(t),z=_.length;_.length;){var T=_.pop();(T.d>w.d||!w.d)&&(w=T,r&&console.log("found best %d after %d probes",Math.round(1e4*T.d)/1e4,z)),T.max-w.d<=e||(v=T.h/2,_.push(new n(T.p.x-v,T.p.y-v,v,t)),_.push(new n(T.p.x+v,T.p.y-v,v,t)),_.push(new n(T.p.x-v,T.p.y+v,v,t)),_.push(new n(T.p.x+v,T.p.y+v,v,t)),z+=4)}return r&&(console.log("num probes: "+z),console.log("best distance: "+w.d)),w.p}},{"./intersection_tests":258,"@mapbox/point-geometry":2,tinyqueue:43}],256:[function(t,e,r){"use strict";var i,n=t("./worker_pool");e.exports=function(){return i||(i=new n),i}},{"./worker_pool":270}],257:[function(t,e,r){"use strict";function i(t,e,r){var i=t.width,n=t.height;if(r){if(r.length!==i*n*e)throw new RangeError("mismatched image size")}else r=new Uint8Array(i*n*e);return{width:i,height:n,data:r}}function n(t,e,r){var n=e.width,a=e.height;if(n===t.width&&a===t.height)return t;var s=i({width:n,height:a},r);o(t,s,{x:0,y:0},{x:0,y:0},{width:Math.min(t.width,n),height:Math.min(t.height,a)},r),t.width=n,t.height=a,t.data=s.data}function o(t,e,r,i,n,o){if(0===n.width||0===n.height)return e;if(n.width>t.width||n.height>t.height||r.x>t.width-n.width||r.y>t.height-n.height)throw new RangeError("out of range source coordinates for image copy");if(n.width>e.width||n.height>e.height||i.x>e.width-n.width||i.y>e.height-n.height)throw new RangeError("out of range destination coordinates for image copy");var s=t.data,l=e.data;a(s!==l);for(var u=0;u<n.height;u++)for(var c=((r.y+u)*t.width+r.x)*o,p=((i.y+u)*e.width+i.x)*o,h=0;h<n.width*o;h++)l[p+h]=s[c+h];return e}var a=t("assert"),s=function(){};s.create=function(t,e){return i(t,1,e)},s.resize=function(t,e){n(t,e,1)},s.copy=function(t,e,r,i,n){o(t,e,r,i,n,1)};var l=function(){};l.create=function(t,e){return i(t,4,e)},l.resize=function(t,e){n(t,e,4)},l.copy=function(t,e,r,i,n){o(t,e,r,i,n,4)},e.exports={AlphaImage:s,RGBAImage:l}},{assert:11}],258:[function(t,e,r){"use strict";function i(t,e,r){if(t.length>1){if(n(t,e))return!0;for(var i=0;i<e.length;i++)if(a(e[i],t,r))return!0}for(var o=0;o<t.length;o++)if(a(t[o],e,r))return!0;return!1}function n(t,e){if(0===t.length||0===e.length)return!1;for(var r=0;r<t.length-1;r++)for(var i=t[r],n=t[r+1],a=0;a<e.length-1;a++)if(o(i,n,e[a],e[a+1]))return!0;return!1}function o(t,e,r,i){return c(t,r,i)!==c(e,r,i)&&c(t,e,r)!==c(t,e,i)}function a(t,e,r){var i=r*r;if(1===e.length)return t.distSqr(e[0])<i;for(var n=1;n<e.length;n++)if(s(t,e[n-1],e[n])<i)return!0;return!1}function s(t,e,r){var i=e.distSqr(r);if(0===i)return t.distSqr(e);var n=((t.x-e.x)*(r.x-e.x)+(t.y-e.y)*(r.y-e.y))/i;return n<0?t.distSqr(e):n>1?t.distSqr(r):t.distSqr(r.sub(e)._mult(n)._add(e))}function l(t,e){for(var r,i,n,o=!1,a=0;a<t.length;a++)for(var s=0,l=(r=t[a]).length-1;s<r.length;l=s++)i=r[s],n=r[l],i.y>e.y!=n.y>e.y&&e.x<(n.x-i.x)*(e.y-i.y)/(n.y-i.y)+i.x&&(o=!o);return o}function u(t,e){for(var r=!1,i=0,n=t.length-1;i<t.length;n=i++){var o=t[i],a=t[n];o.y>e.y!=a.y>e.y&&e.x<(a.x-o.x)*(e.y-o.y)/(a.y-o.y)+o.x&&(r=!r)}return r}var c=t("./util").isCounterClockwise;e.exports={multiPolygonIntersectsBufferedMultiPoint:function(t,e,r){for(var i=0;i<t.length;i++)for(var n=t[i],o=0;o<e.length;o++)for(var s=e[o],l=0;l<s.length;l++){var c=s[l];if(u(n,c))return!0;if(a(c,n,r))return!0}return!1},multiPolygonIntersectsMultiPolygon:function(t,e){if(1===t.length&&1===t[0].length)return l(e,t[0][0]);for(var r=0;r<e.length;r++)for(var i=e[r],o=0;o<i.length;o++)if(l(t,i[o]))return!0;for(var a=0;a<t.length;a++){for(var s=t[a],u=0;u<s.length;u++)if(l(e,s[u]))return!0;for(var c=0;c<e.length;c++)if(n(s,e[c]))return!0}return!1},multiPolygonIntersectsBufferedMultiLine:function(t,e,r){for(var n=0;n<e.length;n++)for(var o=e[n],a=0;a<t.length;a++){var s=t[a];if(s.length>=3)for(var l=0;l<o.length;l++)if(u(s,o[l]))return!0;if(i(s,o,r))return!0}return!1},polygonIntersectsPolygon:function(t,e){for(var r=0;r<t.length;r++)if(u(e,t[r]))return!0;for(var i=0;i<e.length;i++)if(u(t,e[i]))return!0;return!!n(t,e)},distToSegmentSquared:s}},{"./util":267}],259:[function(t,e,r){"use strict";var i={"Latin-1 Supplement":function(t){return t>=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},"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}};e.exports=i},{}],260:[function(t,e,r){"use strict";var i=function(t,e){this.max=t,this.onRemove=e,this.reset()};i.prototype.reset=function(){var t=this;for(var e in t.data)t.onRemove(t.data[e]);return this.data={},this.order=[],this},i.prototype.add=function(t,e){if(this.has(t))this.order.splice(this.order.indexOf(t),1),this.data[t]=e,this.order.push(t);else if(this.data[t]=e,this.order.push(t),this.order.length>this.max){var r=this.getAndRemove(this.order[0]);r&&this.onRemove(r)}return this},i.prototype.has=function(t){return t in this.data},i.prototype.keys=function(){return this.order},i.prototype.getAndRemove=function(t){if(!this.has(t))return null;var e=this.data[t];return delete this.data[t],this.order.splice(this.order.indexOf(t),1),e},i.prototype.get=function(t){return this.has(t)?this.data[t]:null},i.prototype.remove=function(t){if(!this.has(t))return this;var e=this.data[t];return delete this.data[t],this.onRemove(e),this.order.splice(this.order.indexOf(t),1),this},i.prototype.setMaxSize=function(t){var e=this;for(this.max=t;this.order.length>this.max;){var r=e.getAndRemove(e.order[0]);r&&e.onRemove(r)}return this},e.exports=i},{}],261:[function(t,e,r){"use strict";function i(t,e){var r=a(l.API_URL);if(t.protocol=r.protocol,t.authority=r.authority,"/"!==r.path&&(t.path=""+r.path+t.path),!l.REQUIRE_ACCESS_TOKEN)return s(t);if(!(e=e||l.ACCESS_TOKEN))throw new Error("An API access token is required to use Mapbox GL. "+c);if("s"===e[0])throw new Error("Use a public access token (pk.*) with Mapbox GL, not a secret access token (sk.*). "+c);return t.params.push("access_token="+e),s(t)}function n(t){return 0===t.indexOf("mapbox:")}function o(t){for(var e=0;e<t.length;e++)0===t[e].indexOf("access_token=tk.")&&(t[e]="access_token="+(l.ACCESS_TOKEN||""))}function a(t){var e=t.match(h);if(!e)throw new Error("Unable to parse URL object");return{protocol:e[1],authority:e[2],path:e[3]||"/",params:e[4]?e[4].split("&"):[]}}function s(t){var e=t.params.length?"?"+t.params.join("&"):"";return t.protocol+"://"+t.authority+t.path+e}var l=t("./config"),u=t("./browser"),c="See https://www.mapbox.com/api-documentation/#access-tokens";r.isMapboxURL=n,r.normalizeStyleURL=function(t,e){if(!n(t))return t;var r=a(t);return r.path="/styles/v1"+r.path,i(r,e)},r.normalizeGlyphsURL=function(t,e){if(!n(t))return t;var r=a(t);return r.path="/fonts/v1"+r.path,i(r,e)},r.normalizeSourceURL=function(t,e){if(!n(t))return t;var r=a(t);return r.path="/v4/"+r.authority+".json",r.params.push("secure"),i(r,e)},r.normalizeSpriteURL=function(t,e,r,o){var l=a(t);return n(t)?(l.path="/styles/v1"+l.path+"/sprite"+e+r,i(l,o)):(l.path+=""+e+r,s(l))};var p=/(\.(png|jpg)\d*)(?=$)/;r.normalizeTileURL=function(t,e,r){if(!e||!n(e))return t;var i=a(t),l=u.devicePixelRatio>=2||512===r?"@2x":"",c=u.supportsWebp?".webp":"$1";return i.path=i.path.replace(p,""+l+c),o(i.params),s(i)};var h=/^(\w+):\/\/([^/?]*)(\/[^?]+)?\??(.+)?/},{"./browser":246,"./config":250}],262:[function(t,e,r){"use strict";var i=t("./is_char_in_unicode_block");e.exports.allowsIdeographicBreaking=function(t){for(var e=0,i=t;e<i.length;e+=1){var n=i[e];if(!r.charAllowsIdeographicBreaking(n.charCodeAt(0)))return!1}return!0},e.exports.allowsVerticalWritingMode=function(t){for(var e=0,i=t;e<i.length;e+=1){var n=i[e];if(r.charHasUprightVerticalOrientation(n.charCodeAt(0)))return!0}return!1},e.exports.allowsLetterSpacing=function(t){for(var e=0,i=t;e<i.length;e+=1){var n=i[e];if(!r.charAllowsLetterSpacing(n.charCodeAt(0)))return!1}return!0},e.exports.charAllowsLetterSpacing=function(t){return!i.Arabic(t)&&(!i["Arabic Supplement"](t)&&(!i["Arabic Extended-A"](t)&&(!i["Arabic Presentation Forms-A"](t)&&!i["Arabic Presentation Forms-B"](t))))},e.exports.charAllowsIdeographicBreaking=function(t){return!(t<11904)&&(!!i["Bopomofo Extended"](t)||(!!i.Bopomofo(t)||(!!i["CJK Compatibility Forms"](t)||(!!i["CJK Compatibility Ideographs"](t)||(!!i["CJK Compatibility"](t)||(!!i["CJK Radicals Supplement"](t)||(!!i["CJK Strokes"](t)||(!!i["CJK Symbols and Punctuation"](t)||(!!i["CJK Unified Ideographs Extension A"](t)||(!!i["CJK Unified Ideographs"](t)||(!!i["Enclosed CJK Letters and Months"](t)||(!!i["Halfwidth and Fullwidth Forms"](t)||(!!i.Hiragana(t)||(!!i["Ideographic Description Characters"](t)||(!!i["Kangxi Radicals"](t)||(!!i["Katakana Phonetic Extensions"](t)||(!!i.Katakana(t)||(!!i["Vertical Forms"](t)||(!!i["Yi Radicals"](t)||!!i["Yi Syllables"](t))))))))))))))))))))},r.charHasUprightVerticalOrientation=function(t){return 746===t||747===t||!(t<4352)&&(!!i["Bopomofo Extended"](t)||(!!i.Bopomofo(t)||(!(!i["CJK Compatibility Forms"](t)||t>=65097&&t<=65103)||(!!i["CJK Compatibility Ideographs"](t)||(!!i["CJK Compatibility"](t)||(!!i["CJK Radicals Supplement"](t)||(!!i["CJK Strokes"](t)||(!(!i["CJK Symbols and Punctuation"](t)||t>=12296&&t<=12305||t>=12308&&t<=12319||12336===t)||(!!i["CJK Unified Ideographs Extension A"](t)||(!!i["CJK Unified Ideographs"](t)||(!!i["Enclosed CJK Letters and Months"](t)||(!!i["Hangul Compatibility Jamo"](t)||(!!i["Hangul Jamo Extended-A"](t)||(!!i["Hangul Jamo Extended-B"](t)||(!!i["Hangul Jamo"](t)||(!!i["Hangul Syllables"](t)||(!!i.Hiragana(t)||(!!i["Ideographic Description Characters"](t)||(!!i.Kanbun(t)||(!!i["Kangxi Radicals"](t)||(!!i["Katakana Phonetic Extensions"](t)||(!(!i.Katakana(t)||12540===t)||(!(!i["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)||(!(!i["Small Form Variants"](t)||t>=65112&&t<=65118||t>=65123&&t<=65126)||(!!i["Unified Canadian Aboriginal Syllabics"](t)||(!!i["Unified Canadian Aboriginal Syllabics Extended"](t)||(!!i["Vertical Forms"](t)||(!!i["Yijing Hexagram Symbols"](t)||(!!i["Yi Syllables"](t)||!!i["Yi Radicals"](t))))))))))))))))))))))))))))))},r.charHasNeutralVerticalOrientation=function(t){return!(!i["Latin-1 Supplement"](t)||167!==t&&169!==t&&174!==t&&177!==t&&188!==t&&189!==t&&190!==t&&215!==t&&247!==t)||(!(!i["General Punctuation"](t)||8214!==t&&8224!==t&&8225!==t&&8240!==t&&8241!==t&&8251!==t&&8252!==t&&8258!==t&&8263!==t&&8264!==t&&8265!==t&&8273!==t)||(!!i["Letterlike Symbols"](t)||(!!i["Number Forms"](t)||(!(!i["Miscellaneous Technical"](t)||!(t>=8960&&t<=8967||t>=8972&&t<=8991||t>=8996&&t<=9e3||9003===t||t>=9085&&t<=9114||t>=9150&&t<=9165||9167===t||t>=9169&&t<=9179||t>=9186&&t<=9215))||(!(!i["Control Pictures"](t)||9251===t)||(!!i["Optical Character Recognition"](t)||(!!i["Enclosed Alphanumerics"](t)||(!!i["Geometric Shapes"](t)||(!(!i["Miscellaneous Symbols"](t)||t>=9754&&t<=9759)||(!(!i["Miscellaneous Symbols and Arrows"](t)||!(t>=11026&&t<=11055||t>=11088&&t<=11097||t>=11192&&t<=11243))||(!!i["CJK Symbols and Punctuation"](t)||(!!i.Katakana(t)||(!!i["Private Use Area"](t)||(!!i["CJK Compatibility Forms"](t)||(!!i["Small Form Variants"](t)||(!!i["Halfwidth and Fullwidth Forms"](t)||(8734===t||8756===t||8757===t||t>=9984&&t<=10087||t>=10102&&t<=10131||65532===t||65533===t)))))))))))))))))},r.charHasRotatedVerticalOrientation=function(t){return!(r.charHasUprightVerticalOrientation(t)||r.charHasNeutralVerticalOrientation(t))}},{"./is_char_in_unicode_block":259}],263:[function(t,e,r){"use strict";var i=t("../geo/lng_lat");e.exports=function(t,e,r){if(t=new i(t.lng,t.lat),e){var n=new i(t.lng-360,t.lat),o=new i(t.lng+360,t.lat),a=r.locationPoint(t).distSqr(e);r.locationPoint(n).distSqr(e)<a?t=n:r.locationPoint(o).distSqr(e)<a&&(t=o)}for(;Math.abs(t.lng-r.center.lng)>180;){var s=r.locationPoint(t);if(s.x>=0&&s.y>=0&&s.x<=r.width&&s.y<=r.height)break;t.lng>r.center.lng?t.lng-=360:t.lng+=360}return t}},{"../geo/lng_lat":69}],264:[function(t,e,r){"use strict";function i(t,e){return Math.ceil(t/e)*e}function n(t){return p[t].BYTES_PER_ELEMENT}function o(t){return t.toLowerCase()}function a(t,e){for(var r=[],i=[],a="var i = this.length;\nthis.resize(this.length + 1);\n",s=0,l=t;s<l.length;s+=1){var u=l[s],c=n(u.type);r.indexOf(c)<0&&(r.push(c),a+="var o"+c.toFixed(0)+" = i * "+(e/c).toFixed(0)+";\n");for(var p=0;p<u.components;p++){var h="v"+i.length,f="o"+c.toFixed(0)+" + "+(u.offset/c+p).toFixed(0);a+="this."+o(u.type)+"["+f+"] = "+h+";\n",i.push(h)}}return a+="return i;",new Function(i.toString(),a)}function s(t,e){var r="this._pos"+n(t.type).toFixed(0)+" + "+(t.offset/n(t.type)+e).toFixed(0);return"this._structArray."+o(t.type)+"["+r+"]"}function l(t,e,r){var i=(t.offset/n(t.type)+e).toFixed(0),a=r/n(t.type);return new Function("index","return this."+o(t.type)+"[index * "+a+" + "+i+"];")}function u(t,e){var r=s(t,e);return{get:new Function("return "+r+";"),set:new Function("x",r+" = x;")}}var c=t("assert");e.exports=function(t){var e=JSON.stringify(t);if(d[e])return d[e];var r=void 0===t.alignment?1:t.alignment,o=0,s=0,m=["Uint8"],y=t.members.map(function(t){c(t.name.length),c(t.type in p),m.indexOf(t.type)<0&&m.push(t.type);var e=n(t.type),a=o=i(o,Math.max(r,e)),l=t.components||1;return s=Math.max(s,e),o+=e*l,{name:t.name,type:t.type,components:l,offset:a}}),g=i(o,Math.max(s,r)),v=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}(h);v.prototype.alignment=r,v.prototype.size=g;for(var _=0,x=y;_<x.length;_+=1)for(var b=x[_],w=0;w<b.components;w++){var z=b.name;if(b.components>1&&(z+=w),z in v.prototype)throw new Error(z+" is a reserved name and cannot be used as a member name.");Object.defineProperty(v.prototype,z,u(b,w))}var T=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}(f);T.prototype.members=y,T.prototype.StructType=v,T.prototype.bytesPerElement=g,T.prototype.emplaceBack=a(y,g),T.prototype._usedTypes=m,d[e]=T;for(var S=0,A=y;S<A.length;S+=1)for(var E=A[S],C=0;C<E.components;C++){var k="get"+E.name;if(E.components>1&&(k+=C),k in T.prototype)throw new Error(k+" is a reserved name and cannot be used as a member name.");T.prototype[k]=l(E,C,g)}return T};var p={Int8:Int8Array,Uint8:Uint8Array,Int16:Int16Array,Uint16:Uint16Array,Int32:Int32Array,Uint32:Uint32Array,Float32:Float32Array},h=function(t,e){this._structArray=t,this._pos1=e*this.size,this._pos2=this._pos1/2,this._pos4=this._pos1/4,this._pos8=this._pos1/8},f=function(t){this.isTransferred=!1,void 0!==t?(this.arrayBuffer=t.arrayBuffer,this.length=t.length,this.capacity=this.arrayBuffer.byteLength/this.bytesPerElement,this._refreshViews()):(this.capacity=-1,this.resize(0))};f.serialize=function(){return{members:this.prototype.members,alignment:this.prototype.StructType.prototype.alignment}},f.prototype.serialize=function(t){return c(!this.isTransferred),this._trim(),t&&(this.isTransferred=!0,t.push(this.arrayBuffer)),{length:this.length,arrayBuffer:this.arrayBuffer}},f.prototype.get=function(t){return c(!this.isTransferred),new this.StructType(this,t)},f.prototype._trim=function(){this.length!==this.capacity&&(this.capacity=this.length,this.arrayBuffer=this.arrayBuffer.slice(0,this.length*this.bytesPerElement),this._refreshViews())},f.prototype.clear=function(){this.length=0},f.prototype.resize=function(t){if(c(!this.isTransferred),this.length=t,t>this.capacity){this.capacity=Math.max(t,Math.floor(5*this.capacity),128),this.arrayBuffer=new ArrayBuffer(this.capacity*this.bytesPerElement);var e=this.uint8;this._refreshViews(),e&&this.uint8.set(e)}},f.prototype._refreshViews=function(){for(var t=this,e=0,r=t._usedTypes;e<r.length;e+=1){var i=r[e];t[o(i)]=new p[i](t.arrayBuffer)}},f.prototype.toArray=function(t,e){var r=this;c(!this.isTransferred);for(var i=[],n=t;n<e;n++){var o=r.get(n);i.push(o)}return i};var d={}},{assert:11}],265:[function(t,e,r){"use strict";e.exports=function(t,e){var r=!1,i=0,n=function(){i=0,r&&(t(),i=setTimeout(n,e),r=!1)};return function(){return r=!0,i||n(),i}}},{}],266:[function(t,e,r){"use strict";e.exports=function(t,e){return e.replace(/{([^{}]+)}/g,function(e,r){return r in t?String(t[r]):""})}},{}],267:[function(t,e,r){"use strict";var i=t("@mapbox/unitbezier"),n=t("../geo/coordinate");t("@mapbox/point-geometry");r.easeCubicInOut=function(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)},r.bezier=function(t,e,r,n){var o=new i(t,e,r,n);return function(t){return o.solve(t)}},r.ease=r.bezier(.25,.1,.25,1),r.clamp=function(t,e,r){return Math.min(r,Math.max(e,t))},r.wrap=function(t,e,r){var i=r-e,n=((t-e)%i+i)%i+e;return n===e?r:n},r.asyncAll=function(t,e,r){if(!t.length)return r(null,[]);var i=t.length,n=new Array(t.length),o=null;t.forEach(function(t,a){e(t,function(t,e){t&&(o=t),n[a]=e,0==--i&&r(o,n)})})},r.values=function(t){var e=[];for(var r in t)e.push(t[r]);return e},r.keysDifference=function(t,e){var r=[];for(var i in t)i in e||r.push(i);return r},r.extend=function(t){for(var e=[],r=arguments.length-1;r-- >0;)e[r]=arguments[r+1];for(var i=0,n=e;i<n.length;i+=1){var o=n[i];for(var a in o)t[a]=o[a]}return t},r.pick=function(t,e){for(var r={},i=0;i<e.length;i++){var n=e[i];n in t&&(r[n]=t[n])}return r};var o=1;r.uniqueId=function(){return o++},r.bindAll=function(t,e){t.forEach(function(t){e[t]&&(e[t]=e[t].bind(e))})},r.getCoordinatesCenter=function(t){for(var e=1/0,r=1/0,i=-1/0,o=-1/0,a=0;a<t.length;a++)e=Math.min(e,t[a].column),r=Math.min(r,t[a].row),i=Math.max(i,t[a].column),o=Math.max(o,t[a].row);var s=i-e,l=o-r,u=Math.max(s,l),c=Math.max(0,Math.floor(-Math.log(u)/Math.LN2));return new n((e+i)/2,(r+o)/2,0).zoomTo(c)},r.endsWith=function(t,e){return-1!==t.indexOf(e,t.length-e.length)},r.mapObject=function(t,e,r){var i=this,n={};for(var o in t)n[o]=e.call(r||i,t[o],o,t);return n},r.filterObject=function(t,e,r){var i=this,n={};for(var o in t)e.call(r||i,t[o],o,t)&&(n[o]=t[o]);return n},r.deepEqual=function(t,e){if(Array.isArray(t)){if(!Array.isArray(e)||t.length!==e.length)return!1;for(var i=0;i<t.length;i++)if(!r.deepEqual(t[i],e[i]))return!1;return!0}if("object"==typeof t&&null!==t&&null!==e){if("object"!=typeof e)return!1;if(Object.keys(t).length!==Object.keys(e).length)return!1;for(var n in t)if(!r.deepEqual(t[n],e[n]))return!1;return!0}return t===e},r.clone=function(t){return Array.isArray(t)?t.map(r.clone):"object"==typeof t&&t?r.mapObject(t,r.clone):t},r.arraysIntersect=function(t,e){for(var r=0;r<t.length;r++)if(e.indexOf(t[r])>=0)return!0;return!1};var a={};r.warnOnce=function(t){a[t]||("undefined"!=typeof console&&console.warn(t),a[t]=!0)},r.isCounterClockwise=function(t,e,r){return(r.y-t.y)*(e.x-t.x)>(e.y-t.y)*(r.x-t.x)},r.calculateSignedArea=function(t){for(var e=0,r=0,i=t.length,n=i-1,o=void 0,a=void 0;r<i;n=r++)o=t[r],e+=((a=t[n]).x-o.x)*(o.y+a.y);return e},r.isClosedPolygon=function(t){if(t.length<4)return!1;var e=t[0],i=t[t.length-1];return!(Math.abs(e.x-i.x)>0||Math.abs(e.y-i.y)>0)&&Math.abs(r.calculateSignedArea(t))>.01},r.sphericalToCartesian=function(t){var e=t[0],r=t[1],i=t[2];return r+=90,r*=Math.PI/180,i*=Math.PI/180,{x:e*Math.cos(r)*Math.sin(i),y:e*Math.sin(r)*Math.sin(i),z:e*Math.cos(i)}},r.parseCacheControl=function(t){var e=/(?:^|(?:\s*\,\s*))([^\x00-\x20\(\)<>@\,;\:\\"\/\[\]\?\=\{\}\x7F]+)(?:\=(?:([^\x00-\x20\(\)<>@\,;\:\\"\/\[\]\?\=\{\}\x7F]+)|(?:\"((?:[^"\\]|\\.)*)\")))?/g,r={};if(t.replace(e,function(t,e,i,n){var o=i||n;return r[e]=!o||o.toLowerCase(),""}),r["max-age"]){var i=parseInt(r["max-age"],10);isNaN(i)?delete r["max-age"]:r["max-age"]=i}return r}},{"../geo/coordinate":68,"@mapbox/point-geometry":2,"@mapbox/unitbezier":5}],268:[function(t,e,r){"use strict";var i=function(t,e,r,i){this.type="Feature",this._vectorTileFeature=t,t._z=e,t._x=r,t._y=i,this.properties=t.properties,null!=t.id&&(this.id=t.id)},n={geometry:{}};n.geometry.get=function(){return void 0===this._geometry&&(this._geometry=this._vectorTileFeature.toGeoJSON(this._vectorTileFeature._x,this._vectorTileFeature._y,this._vectorTileFeature._z).geometry),this._geometry},n.geometry.set=function(t){this._geometry=t},i.prototype.toJSON=function(){var t=this,e={geometry:this.geometry};for(var r in t)"_geometry"!==r&&"_vectorTileFeature"!==r&&(e[r]=t[r]);return e},Object.defineProperties(i.prototype,n),e.exports=i},{}],269:[function(t,e,r){"use strict";var i=t("./script_detection");e.exports=function(t){for(var r="",n=0;n<t.length;n++){var o=t.charCodeAt(n+1)||null,a=t.charCodeAt(n-1)||null;(!o||!i.charHasRotatedVerticalOrientation(o)||e.exports.lookup[t[n+1]])&&(!a||!i.charHasRotatedVerticalOrientation(a)||e.exports.lookup[t[n-1]])&&e.exports.lookup[t[n]]?r+=e.exports.lookup[t[n]]:r+=t[n]}return r},e.exports.lookup={"!":"︕","#":"#",$:"$","%":"%","&":"&","(":"︵",")":"︶","*":"*","+":"+",",":"︐","-":"︲",".":"・","/":"/",":":"︓",";":"︔","<":"︿","=":"=",">":"﹀","?":"︖","@":"@","[":"﹇","\\":"\","]":"﹈","^":"^",_:"︳","`":"`","{":"︷","|":"―","}":"︸","~":"~","¢":"¢","£":"£","¥":"¥","¦":"¦","¬":"¬","¯":" ̄","–":"︲","—":"︱","‘":"﹃","’":"﹄","“":"﹁","”":"﹂","…":"︙","‧":"・","₩":"₩","、":"︑","。":"︒","〈":"︿","〉":"﹀","《":"︽","》":"︾","「":"﹁","」":"﹂","『":"﹃","』":"﹄","【":"︻","】":"︼","〔":"︹","〕":"︺","〖":"︗","〗":"︘","!":"︕","(":"︵",")":"︶",",":"︐","-":"︲",".":"・",":":"︓",";":"︔","<":"︿",">":"﹀","?":"︖","[":"﹇","]":"﹈","_":"︳","{":"︷","|":"―","}":"︸","⦅":"︵","⦆":"︶","。":"︒","「":"﹁","」":"﹂"}},{"./script_detection":262}],270:[function(t,e,r){"use strict";var i=t("assert"),n=t("./web_worker"),o=function(){this.active={}};o.prototype.acquire=function(e){var r=this;if(!this.workers){var o=t("../").workerCount;for(i("number"==typeof o&&o<1/0),this.workers=[];this.workers.length<o;)r.workers.push(new n)}return this.active[e]=!0,this.workers.slice()},o.prototype.release=function(t){delete this.active[t],0===Object.keys(this.active).length&&(this.workers.forEach(function(t){t.terminate()}),this.workers=null)},e.exports=o},{"../":74,"./web_worker":247,assert:11}]},{},[74])(74)});
.mapboxgl-map {
font: 12px/20px 'Helvetica Neue', Arial, Helvetica, sans-serif;
overflow: hidden;
position: relative;
-webkit-tap-highlight-color: rgba(0,0,0,0);
}
.mapboxgl-map:-webkit-full-screen {
width: 100%;
height: 100%;
}
.mapboxgl-missing-css {
display: none;
}
.mapboxgl-canvas-container.mapboxgl-interactive,
.mapboxgl-ctrl-nav-compass {
cursor: -webkit-grab;
cursor: -moz-grab;
cursor: grab;
}
.mapboxgl-canvas-container.mapboxgl-interactive:active,
.mapboxgl-ctrl-nav-compass:active {
cursor: -webkit-grabbing;
cursor: -moz-grabbing;
cursor: grabbing;
}
.mapboxgl-canvas-container.mapboxgl-touch-zoom-rotate {
-ms-touch-action: pan-x pan-y;
touch-action: pan-x pan-y;
}
.mapboxgl-canvas-container.mapboxgl-touch-drag-pan {
-ms-touch-action: pinch-zoom;
}
.mapboxgl-canvas-container.mapboxgl-touch-zoom-rotate.mapboxgl-touch-drag-pan {
-ms-touch-action: none;
touch-action: none;
}
.mapboxgl-ctrl-top-left,
.mapboxgl-ctrl-top-right,
.mapboxgl-ctrl-bottom-left,
.mapboxgl-ctrl-bottom-right { position:absolute; pointer-events:none; z-index:2; }
.mapboxgl-ctrl-top-left { top:0; left:0; }
.mapboxgl-ctrl-top-right { top:0; right:0; }
.mapboxgl-ctrl-bottom-left { bottom:0; left:0; }
.mapboxgl-ctrl-bottom-right { right:0; bottom:0; }
.mapboxgl-ctrl { clear:both; pointer-events:auto }
.mapboxgl-ctrl-top-left .mapboxgl-ctrl { margin:10px 0 0 10px; float:left; }
.mapboxgl-ctrl-top-right .mapboxgl-ctrl{ margin:10px 10px 0 0; float:right; }
.mapboxgl-ctrl-bottom-left .mapboxgl-ctrl { margin:0 0 10px 10px; float:left; }
.mapboxgl-ctrl-bottom-right .mapboxgl-ctrl { margin:0 10px 10px 0; float:right; }
.mapboxgl-ctrl-group {
border-radius: 4px;
-moz-box-shadow: 0px 0px 2px rgba(0,0,0,0.1);
-webkit-box-shadow: 0px 0px 2px rgba(0,0,0,0.1);
box-shadow: 0px 0px 0px 2px rgba(0,0,0,0.1);
overflow: hidden;
background: #fff;
}
.mapboxgl-ctrl-group > button {
width: 30px;
height: 30px;
display: block;
padding: 0;
outline: none;
border: none;
border-bottom: 1px solid #ddd;
box-sizing: border-box;
background-color: rgba(0,0,0,0);
cursor: pointer;
}
/* https://bugzilla.mozilla.org/show_bug.cgi?id=140562 */
.mapboxgl-ctrl > button::-moz-focus-inner {
border: 0;
padding: 0;
}
.mapboxgl-ctrl > button:last-child {
border-bottom: 0;
}
.mapboxgl-ctrl > button:hover {
background-color: rgba(0,0,0,0.05);
}
.mapboxgl-ctrl-icon,
.mapboxgl-ctrl-icon > .mapboxgl-ctrl-compass-arrow {
speak: none;
-webkit-font-smoothing: antialiased;
-moz-osx-font-smoothing: grayscale;
}
.mapboxgl-ctrl-icon {
padding: 5px;
}
.mapboxgl-ctrl-icon.mapboxgl-ctrl-zoom-out {
background-image: url("data:image/svg+xml;charset=utf8,%3Csvg%20viewBox%3D%270%200%2020%2020%27%20xmlns%3D%27http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%27%3E%0A%20%20%3Cpath%20style%3D%27fill%3A%23333333%3B%27%20d%3D%27m%207%2C9%20c%20-0.554%2C0%20-1%2C0.446%20-1%2C1%200%2C0.554%200.446%2C1%201%2C1%20l%206%2C0%20c%200.554%2C0%201%2C-0.446%201%2C-1%200%2C-0.554%20-0.446%2C-1%20-1%2C-1%20z%27%20%2F%3E%0A%3C%2Fsvg%3E%0A");
}
.mapboxgl-ctrl-icon.mapboxgl-ctrl-zoom-in {
background-image: url("data:image/svg+xml;charset=utf8,%3Csvg%20viewBox%3D%270%200%2020%2020%27%20xmlns%3D%27http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%27%3E%0A%20%20%3Cpath%20style%3D%27fill%3A%23333333%3B%27%20d%3D%27M%2010%206%20C%209.446%206%209%206.4459904%209%207%20L%209%209%20L%207%209%20C%206.446%209%206%209.446%206%2010%20C%206%2010.554%206.446%2011%207%2011%20L%209%2011%20L%209%2013%20C%209%2013.55401%209.446%2014%2010%2014%20C%2010.554%2014%2011%2013.55401%2011%2013%20L%2011%2011%20L%2013%2011%20C%2013.554%2011%2014%2010.554%2014%2010%20C%2014%209.446%2013.554%209%2013%209%20L%2011%209%20L%2011%207%20C%2011%206.4459904%2010.554%206%2010%206%20z%27%20%2F%3E%0A%3C%2Fsvg%3E%0A");
}
.mapboxgl-ctrl-icon.mapboxgl-ctrl-geolocate {
background-image: url("data:image/svg+xml;charset=utf-8,%3Csvg%20viewBox%3D%270%200%2020%2020%27%20xmlns%3D%27http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%27%3E%0D%0A%20%20%3Cpath%20style%3D%27fill%3A%23333%3B%27%20d%3D%27M10%204C9%204%209%205%209%205L9%205.1A5%205%200%200%200%205.1%209L5%209C5%209%204%209%204%2010%204%2011%205%2011%205%2011L5.1%2011A5%205%200%200%200%209%2014.9L9%2015C9%2015%209%2016%2010%2016%2011%2016%2011%2015%2011%2015L11%2014.9A5%205%200%200%200%2014.9%2011L15%2011C15%2011%2016%2011%2016%2010%2016%209%2015%209%2015%209L14.9%209A5%205%200%200%200%2011%205.1L11%205C11%205%2011%204%2010%204zM10%206.5A3.5%203.5%200%200%201%2013.5%2010%203.5%203.5%200%200%201%2010%2013.5%203.5%203.5%200%200%201%206.5%2010%203.5%203.5%200%200%201%2010%206.5zM10%208.3A1.8%201.8%200%200%200%208.3%2010%201.8%201.8%200%200%200%2010%2011.8%201.8%201.8%200%200%200%2011.8%2010%201.8%201.8%200%200%200%2010%208.3z%27%20%2F%3E%0D%0A%3C%2Fsvg%3E");
}
.mapboxgl-ctrl-icon.mapboxgl-ctrl-geolocate:disabled {
background-image: url("data:image/svg+xml;charset=utf-8,%3Csvg%20viewBox%3D%270%200%2020%2020%27%20xmlns%3D%27http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%27%3E%0D%0A%20%20%3Cpath%20style%3D%27fill%3A%23aaa%3B%27%20d%3D%27M10%204C9%204%209%205%209%205L9%205.1A5%205%200%200%200%205.1%209L5%209C5%209%204%209%204%2010%204%2011%205%2011%205%2011L5.1%2011A5%205%200%200%200%209%2014.9L9%2015C9%2015%209%2016%2010%2016%2011%2016%2011%2015%2011%2015L11%2014.9A5%205%200%200%200%2014.9%2011L15%2011C15%2011%2016%2011%2016%2010%2016%209%2015%209%2015%209L14.9%209A5%205%200%200%200%2011%205.1L11%205C11%205%2011%204%2010%204zM10%206.5A3.5%203.5%200%200%201%2013.5%2010%203.5%203.5%200%200%201%2010%2013.5%203.5%203.5%200%200%201%206.5%2010%203.5%203.5%200%200%201%2010%206.5zM10%208.3A1.8%201.8%200%200%200%208.3%2010%201.8%201.8%200%200%200%2010%2011.8%201.8%201.8%200%200%200%2011.8%2010%201.8%201.8%200%200%200%2010%208.3z%27%20%2F%3E%0D%0A%3C%2Fsvg%3E");
}
.mapboxgl-ctrl-icon.mapboxgl-ctrl-geolocate.mapboxgl-ctrl-geolocate-active {
background-image: url("data:image/svg+xml;charset=utf-8,%3Csvg%20viewBox%3D%270%200%2020%2020%27%20xmlns%3D%27http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%27%3E%0D%0A%20%20%3Cpath%20style%3D%27fill%3A%2333b5e5%3B%27%20d%3D%27M10%204C9%204%209%205%209%205L9%205.1A5%205%200%200%200%205.1%209L5%209C5%209%204%209%204%2010%204%2011%205%2011%205%2011L5.1%2011A5%205%200%200%200%209%2014.9L9%2015C9%2015%209%2016%2010%2016%2011%2016%2011%2015%2011%2015L11%2014.9A5%205%200%200%200%2014.9%2011L15%2011C15%2011%2016%2011%2016%2010%2016%209%2015%209%2015%209L14.9%209A5%205%200%200%200%2011%205.1L11%205C11%205%2011%204%2010%204zM10%206.5A3.5%203.5%200%200%201%2013.5%2010%203.5%203.5%200%200%201%2010%2013.5%203.5%203.5%200%200%201%206.5%2010%203.5%203.5%200%200%201%2010%206.5zM10%208.3A1.8%201.8%200%200%200%208.3%2010%201.8%201.8%200%200%200%2010%2011.8%201.8%201.8%200%200%200%2011.8%2010%201.8%201.8%200%200%200%2010%208.3z%27%20%2F%3E%0D%0A%3C%2Fsvg%3E");
}
.mapboxgl-ctrl-icon.mapboxgl-ctrl-geolocate.mapboxgl-ctrl-geolocate-active-error {
background-image: url("data:image/svg+xml;charset=utf-8,%3Csvg%20viewBox%3D%270%200%2020%2020%27%20xmlns%3D%27http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%27%3E%0D%0A%20%20%3Cpath%20style%3D%27fill%3A%23e58978%3B%27%20d%3D%27M10%204C9%204%209%205%209%205L9%205.1A5%205%200%200%200%205.1%209L5%209C5%209%204%209%204%2010%204%2011%205%2011%205%2011L5.1%2011A5%205%200%200%200%209%2014.9L9%2015C9%2015%209%2016%2010%2016%2011%2016%2011%2015%2011%2015L11%2014.9A5%205%200%200%200%2014.9%2011L15%2011C15%2011%2016%2011%2016%2010%2016%209%2015%209%2015%209L14.9%209A5%205%200%200%200%2011%205.1L11%205C11%205%2011%204%2010%204zM10%206.5A3.5%203.5%200%200%201%2013.5%2010%203.5%203.5%200%200%201%2010%2013.5%203.5%203.5%200%200%201%206.5%2010%203.5%203.5%200%200%201%2010%206.5zM10%208.3A1.8%201.8%200%200%200%208.3%2010%201.8%201.8%200%200%200%2010%2011.8%201.8%201.8%200%200%200%2011.8%2010%201.8%201.8%200%200%200%2010%208.3z%27%20%2F%3E%0D%0A%3C%2Fsvg%3E");
}
.mapboxgl-ctrl-icon.mapboxgl-ctrl-geolocate.mapboxgl-ctrl-geolocate-background {
background-image: url("data:image/svg+xml;charset=utf-8,%3Csvg%20viewBox%3D%270%200%2020%2020%27%20xmlns%3D%27http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%27%3E%0A%20%20%3Cpath%20style%3D%27fill%3A%2333b5e5%3B%27%20d%3D%27M%2010%2C4%20C%209%2C4%209%2C5%209%2C5%20L%209%2C5.1%20C%207.0357113%2C5.5006048%205.5006048%2C7.0357113%205.1%2C9%20L%205%2C9%20c%200%2C0%20-1%2C0%20-1%2C1%200%2C1%201%2C1%201%2C1%20l%200.1%2C0%20c%200.4006048%2C1.964289%201.9357113%2C3.499395%203.9%2C3.9%20L%209%2C15%20c%200%2C0%200%2C1%201%2C1%201%2C0%201%2C-1%201%2C-1%20l%200%2C-0.1%20c%201.964289%2C-0.400605%203.499395%2C-1.935711%203.9%2C-3.9%20l%200.1%2C0%20c%200%2C0%201%2C0%201%2C-1%20C%2016%2C9%2015%2C9%2015%2C9%20L%2014.9%2C9%20C%2014.499395%2C7.0357113%2012.964289%2C5.5006048%2011%2C5.1%20L%2011%2C5%20c%200%2C0%200%2C-1%20-1%2C-1%20z%20m%200%2C2.5%20c%201.932997%2C0%203.5%2C1.5670034%203.5%2C3.5%200%2C1.932997%20-1.567003%2C3.5%20-3.5%2C3.5%20C%208.0670034%2C13.5%206.5%2C11.932997%206.5%2C10%206.5%2C8.0670034%208.0670034%2C6.5%2010%2C6.5%20Z%27%20%2F%3E%0A%3C%2Fsvg%3E");
}
.mapboxgl-ctrl-icon.mapboxgl-ctrl-geolocate.mapboxgl-ctrl-geolocate-background-error {
background-image: url("data:image/svg+xml;charset=utf-8,%3Csvg%20viewBox%3D%270%200%2020%2020%27%20xmlns%3D%27http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%27%3E%0A%20%20%3Cpath%20style%3D%27fill%3A%23e54e33%3B%27%20d%3D%27M%2010%2C4%20C%209%2C4%209%2C5%209%2C5%20L%209%2C5.1%20C%207.0357113%2C5.5006048%205.5006048%2C7.0357113%205.1%2C9%20L%205%2C9%20c%200%2C0%20-1%2C0%20-1%2C1%200%2C1%201%2C1%201%2C1%20l%200.1%2C0%20c%200.4006048%2C1.964289%201.9357113%2C3.499395%203.9%2C3.9%20L%209%2C15%20c%200%2C0%200%2C1%201%2C1%201%2C0%201%2C-1%201%2C-1%20l%200%2C-0.1%20c%201.964289%2C-0.400605%203.499395%2C-1.935711%203.9%2C-3.9%20l%200.1%2C0%20c%200%2C0%201%2C0%201%2C-1%20C%2016%2C9%2015%2C9%2015%2C9%20L%2014.9%2C9%20C%2014.499395%2C7.0357113%2012.964289%2C5.5006048%2011%2C5.1%20L%2011%2C5%20c%200%2C0%200%2C-1%20-1%2C-1%20z%20m%200%2C2.5%20c%201.932997%2C0%203.5%2C1.5670034%203.5%2C3.5%200%2C1.932997%20-1.567003%2C3.5%20-3.5%2C3.5%20C%208.0670034%2C13.5%206.5%2C11.932997%206.5%2C10%206.5%2C8.0670034%208.0670034%2C6.5%2010%2C6.5%20Z%27%20%2F%3E%0A%3C%2Fsvg%3E");
}
.mapboxgl-ctrl-icon.mapboxgl-ctrl-geolocate.mapboxgl-ctrl-geolocate-waiting {
-webkit-animation: mapboxgl-spin 2s infinite linear;
-moz-animation: mapboxgl-spin 2s infinite linear;
-o-animation: mapboxgl-spin 2s infinite linear;
-ms-animation: mapboxgl-spin 2s infinite linear;
animation: mapboxgl-spin 2s infinite linear;
}
@-webkit-keyframes mapboxgl-spin {
0% { -webkit-transform: rotate(0deg); }
100% { -webkit-transform: rotate(360deg); }
}
@-moz-keyframes mapboxgl-spin {
0% { -moz-transform: rotate(0deg); }
100% { -moz-transform: rotate(360deg); }
}
@-o-keyframes mapboxgl-spin {
0% { -o-transform: rotate(0deg); }
100% { -o-transform: rotate(360deg); }
}
@-ms-keyframes mapboxgl-spin {
0% { -ms-transform: rotate(0deg); }
100% { -ms-transform: rotate(360deg); }
}
@keyframes mapboxgl-spin {
0% { transform: rotate(0deg); }
100% { transform: rotate(360deg); }
}
.mapboxgl-ctrl-icon.mapboxgl-ctrl-fullscreen {
background-image: url("data:image/svg+xml;base64,PD94bWwgdmVyc2lvbj0iMS4wIiBlbmNvZGluZz0iVVRGLTgiIHN0YW5kYWxvbmU9Im5vIj8+CjwhLS0gR2VuZXJhdG9yOiBBZG9iZSBJbGx1c3RyYXRvciAxOS4wLjEsIFNWRyBFeHBvcnQgUGx1Zy1JbiAuIFNWRyBWZXJzaW9uOiA2LjAwIEJ1aWxkIDApICAtLT4KCjxzdmcKICAgeG1sbnM6ZGM9Imh0dHA6Ly9wdXJsLm9yZy9kYy9lbGVtZW50cy8xLjEvIgogICB4bWxuczpjYz0iaHR0cDovL2NyZWF0aXZlY29tbW9ucy5vcmcvbnMjIgogICB4bWxuczpyZGY9Imh0dHA6Ly93d3cudzMub3JnLzE5OTkvMDIvMjItcmRmLXN5bnRheC1ucyMiCiAgIHhtbG5zOnN2Zz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciCiAgIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyIKICAgeG1sbnM6c29kaXBvZGk9Imh0dHA6Ly9zb2RpcG9kaS5zb3VyY2Vmb3JnZS5uZXQvRFREL3NvZGlwb2RpLTAuZHRkIgogICB4bWxuczppbmtzY2FwZT0iaHR0cDovL3d3dy5pbmtzY2FwZS5vcmcvbmFtZXNwYWNlcy9pbmtzY2FwZSIKICAgdmVyc2lvbj0iMS4xIgogICBpZD0iTGF5ZXJfMSIKICAgeD0iMHB4IgogICB5PSIwcHgiCiAgIHZpZXdCb3g9IjAgMCAyMCAyMCIKICAgc3R5bGU9ImVuYWJsZS1iYWNrZ3JvdW5kOm5ldyAwIDAgMjAgMjA7IgogICB4bWw6c3BhY2U9InByZXNlcnZlIgogICBpbmtzY2FwZTp2ZXJzaW9uPSIwLjkxIHIxMzcyNSIKICAgc29kaXBvZGk6ZG9jbmFtZT0iZnVsbHNjcmVlbi5zdmciPjxtZXRhZGF0YQogICAgIGlkPSJtZXRhZGF0YTQxODUiPjxyZGY6UkRGPjxjYzpXb3JrCiAgICAgICAgIHJkZjphYm91dD0iIj48ZGM6Zm9ybWF0PmltYWdlL3N2Zyt4bWw8L2RjOmZvcm1hdD48ZGM6dHlwZQogICAgICAgICAgIHJkZjpyZXNvdXJjZT0iaHR0cDovL3B1cmwub3JnL2RjL2RjbWl0eXBlL1N0aWxsSW1hZ2UiIC8+PGRjOnRpdGxlPjwvZGM6dGl0bGU+PC9jYzpXb3JrPjwvcmRmOlJERj48L21ldGFkYXRhPjxkZWZzCiAgICAgaWQ9ImRlZnM0MTgzIiAvPjxzb2RpcG9kaTpuYW1lZHZpZXcKICAgICBwYWdlY29sb3I9IiNmZmZmZmYiCiAgICAgYm9yZGVyY29sb3I9IiM2NjY2NjYiCiAgICAgYm9yZGVyb3BhY2l0eT0iMSIKICAgICBvYmplY3R0b2xlcmFuY2U9IjEwIgogICAgIGdyaWR0b2xlcmFuY2U9IjEwIgogICAgIGd1aWRldG9sZXJhbmNlPSIxMCIKICAgICBpbmtzY2FwZTpwYWdlb3BhY2l0eT0iMCIKICAgICBpbmtzY2FwZTpwYWdlc2hhZG93PSIyIgogICAgIGlua3NjYXBlOndpbmRvdy13aWR0aD0iMTQ3MSIKICAgICBpbmtzY2FwZTp3aW5kb3ctaGVpZ2h0PSI2OTUiCiAgICAgaWQ9Im5hbWVkdmlldzQxODEiCiAgICAgc2hvd2dyaWQ9ImZhbHNlIgogICAgIGlua3NjYXBlOnpvb209IjExLjMxMzcwOCIKICAgICBpbmtzY2FwZTpjeD0iMTQuNjk4MjgiCiAgICAgaW5rc2NhcGU6Y3k9IjEwLjUyNjY4OSIKICAgICBpbmtzY2FwZTp3aW5kb3cteD0iNjk3IgogICAgIGlua3NjYXBlOndpbmRvdy15PSIyOTgiCiAgICAgaW5rc2NhcGU6d2luZG93LW1heGltaXplZD0iMCIKICAgICBpbmtzY2FwZTpjdXJyZW50LWxheWVyPSJMYXllcl8xIgogICAgIGlua3NjYXBlOnNuYXAtYmJveD0idHJ1ZSIKICAgICBpbmtzY2FwZTpiYm94LXBhdGhzPSJ0cnVlIgogICAgIGlua3NjYXBlOm9iamVjdC1wYXRocz0idHJ1ZSIKICAgICBpbmtzY2FwZTpiYm94LW5vZGVzPSJ0cnVlIgogICAgIGlua3NjYXBlOm9iamVjdC1ub2Rlcz0idHJ1ZSI+PGlua3NjYXBlOmdyaWQKICAgICAgIHR5cGU9Inh5Z3JpZCIKICAgICAgIGlkPSJncmlkNjA3NiIgLz48L3NvZGlwb2RpOm5hbWVkdmlldz48cGF0aAogICAgIGQ9Ik0gNSA0IEMgNC41IDQgNCA0LjUgNCA1IEwgNCA2IEwgNCA5IEwgNC41IDkgTCA1Ljc3NzM0MzggNy4yOTY4NzUgQyA2Ljc3NzEzMTkgOC4wNjAyMTMxIDcuODM1NzY1IDguOTU2NTcyOCA4Ljg5MDYyNSAxMCBDIDcuODI1NzEyMSAxMS4wNjMzIDYuNzc2MTc5MSAxMS45NTE2NzUgNS43ODEyNSAxMi43MDcwMzEgTCA0LjUgMTEgTCA0IDExIEwgNCAxNSBDIDQgMTUuNSA0LjUgMTYgNSAxNiBMIDkgMTYgTCA5IDE1LjUgTCA3LjI3MzQzNzUgMTQuMjA1MDc4IEMgOC4wNDI4OTMxIDEzLjE4Nzg4NiA4LjkzOTU0NDEgMTIuMTMzNDgxIDkuOTYwOTM3NSAxMS4wNjgzNTkgQyAxMS4wNDIzNzEgMTIuMTQ2OTkgMTEuOTQyMDkzIDEzLjIxMTIgMTIuNzA3MDMxIDE0LjIxODc1IEwgMTEgMTUuNSBMIDExIDE2IEwgMTQgMTYgTCAxNSAxNiBDIDE1LjUgMTYgMTYgMTUuNSAxNiAxNSBMIDE2IDE0IEwgMTYgMTEgTCAxNS41IDExIEwgMTQuMjA1MDc4IDEyLjcyNjU2MiBDIDEzLjE3Nzk4NSAxMS45NDk2MTcgMTIuMTEyNzE4IDExLjA0MzU3NyAxMS4wMzcxMDkgMTAuMDA5NzY2IEMgMTIuMTUxODU2IDguOTgxMDYxIDEzLjIyNDM0NSA4LjA3OTg2MjQgMTQuMjI4NTE2IDcuMzA0Njg3NSBMIDE1LjUgOSBMIDE2IDkgTCAxNiA1IEMgMTYgNC41IDE1LjUgNCAxNSA0IEwgMTEgNCBMIDExIDQuNSBMIDEyLjcwMzEyNSA1Ljc3NzM0MzggQyAxMS45MzI2NDcgNi43ODY0ODM0IDExLjAyNjY5MyA3Ljg1NTQ3MTIgOS45NzA3MDMxIDguOTE5OTIxOSBDIDguOTU4NDczOSA3LjgyMDQ5NDMgOC4wNjk4NzY3IDYuNzYyNzE4OCA3LjMwNDY4NzUgNS43NzE0ODQ0IEwgOSA0LjUgTCA5IDQgTCA2IDQgTCA1IDQgeiAiCiAgICAgaWQ9InBhdGg0MTY5IiAvPjwvc3ZnPg==");
}
.mapboxgl-ctrl-icon.mapboxgl-ctrl-shrink {
background-image: url("data:image/svg+xml;base64,PD94bWwgdmVyc2lvbj0iMS4wIiBlbmNvZGluZz0iVVRGLTgiIHN0YW5kYWxvbmU9Im5vIj8+CjwhLS0gR2VuZXJhdG9yOiBBZG9iZSBJbGx1c3RyYXRvciAxOS4wLjEsIFNWRyBFeHBvcnQgUGx1Zy1JbiAuIFNWRyBWZXJzaW9uOiA2LjAwIEJ1aWxkIDApICAtLT4KCjxzdmcKICAgeG1sbnM6ZGM9Imh0dHA6Ly9wdXJsLm9yZy9kYy9lbGVtZW50cy8xLjEvIgogICB4bWxuczpjYz0iaHR0cDovL2NyZWF0aXZlY29tbW9ucy5vcmcvbnMjIgogICB4bWxuczpyZGY9Imh0dHA6Ly93d3cudzMub3JnLzE5OTkvMDIvMjItcmRmLXN5bnRheC1ucyMiCiAgIHhtbG5zOnN2Zz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciCiAgIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyIKICAgeG1sbnM6c29kaXBvZGk9Imh0dHA6Ly9zb2RpcG9kaS5zb3VyY2Vmb3JnZS5uZXQvRFREL3NvZGlwb2RpLTAuZHRkIgogICB4bWxuczppbmtzY2FwZT0iaHR0cDovL3d3dy5pbmtzY2FwZS5vcmcvbmFtZXNwYWNlcy9pbmtzY2FwZSIKICAgdmVyc2lvbj0iMS4xIgogICBpZD0iTGF5ZXJfMSIKICAgeD0iMHB4IgogICB5PSIwcHgiCiAgIHZpZXdCb3g9IjAgMCAyMCAyMCIKICAgc3R5bGU9ImVuYWJsZS1iYWNrZ3JvdW5kOm5ldyAwIDAgMjAgMjA7IgogICB4bWw6c3BhY2U9InByZXNlcnZlIgogICBpbmtzY2FwZTp2ZXJzaW9uPSIwLjkxIHIxMzcyNSIKICAgc29kaXBvZGk6ZG9jbmFtZT0ic2hyaW5rLnN2ZyI+PG1ldGFkYXRhCiAgICAgaWQ9Im1ldGFkYXRhMTkiPjxyZGY6UkRGPjxjYzpXb3JrCiAgICAgICAgIHJkZjphYm91dD0iIj48ZGM6Zm9ybWF0PmltYWdlL3N2Zyt4bWw8L2RjOmZvcm1hdD48ZGM6dHlwZQogICAgICAgICAgIHJkZjpyZXNvdXJjZT0iaHR0cDovL3B1cmwub3JnL2RjL2RjbWl0eXBlL1N0aWxsSW1hZ2UiIC8+PGRjOnRpdGxlPjwvZGM6dGl0bGU+PC9jYzpXb3JrPjwvcmRmOlJERj48L21ldGFkYXRhPjxkZWZzCiAgICAgaWQ9ImRlZnMxNyIgLz48c29kaXBvZGk6bmFtZWR2aWV3CiAgICAgcGFnZWNvbG9yPSIjZmZmZmZmIgogICAgIGJvcmRlcmNvbG9yPSIjNjY2NjY2IgogICAgIGJvcmRlcm9wYWNpdHk9IjEiCiAgICAgb2JqZWN0dG9sZXJhbmNlPSIxMCIKICAgICBncmlkdG9sZXJhbmNlPSIxMCIKICAgICBndWlkZXRvbGVyYW5jZT0iMTAiCiAgICAgaW5rc2NhcGU6cGFnZW9wYWNpdHk9IjAiCiAgICAgaW5rc2NhcGU6cGFnZXNoYWRvdz0iMiIKICAgICBpbmtzY2FwZTp3aW5kb3ctd2lkdGg9IjIwMjEiCiAgICAgaW5rc2NhcGU6d2luZG93LWhlaWdodD0iOTA4IgogICAgIGlkPSJuYW1lZHZpZXcxNSIKICAgICBzaG93Z3JpZD0iZmFsc2UiCiAgICAgaW5rc2NhcGU6em9vbT0iMSIKICAgICBpbmtzY2FwZTpjeD0iNC45NTAxMDgyIgogICAgIGlua3NjYXBlOmN5PSIxMC44NTQ3NDciCiAgICAgaW5rc2NhcGU6d2luZG93LXg9IjAiCiAgICAgaW5rc2NhcGU6d2luZG93LXk9IjAiCiAgICAgaW5rc2NhcGU6d2luZG93LW1heGltaXplZD0iMCIKICAgICBpbmtzY2FwZTpjdXJyZW50LWxheWVyPSJMYXllcl8xIgogICAgIGlua3NjYXBlOnNuYXAtYmJveD0idHJ1ZSIKICAgICBpbmtzY2FwZTpiYm94LXBhdGhzPSJ0cnVlIgogICAgIGlua3NjYXBlOnNuYXAtYmJveC1lZGdlLW1pZHBvaW50cz0idHJ1ZSIKICAgICBpbmtzY2FwZTpiYm94LW5vZGVzPSJ0cnVlIgogICAgIGlua3NjYXBlOnNuYXAtYmJveC1taWRwb2ludHM9InRydWUiCiAgICAgaW5rc2NhcGU6b2JqZWN0LXBhdGhzPSJ0cnVlIgogICAgIGlua3NjYXBlOm9iamVjdC1ub2Rlcz0idHJ1ZSI+PGlua3NjYXBlOmdyaWQKICAgICAgIHR5cGU9Inh5Z3JpZCIKICAgICAgIGlkPSJncmlkNDE0NyIgLz48L3NvZGlwb2RpOm5hbWVkdmlldz48cGF0aAogICAgIHN0eWxlPSJmaWxsOiMwMDAwMDAiCiAgICAgZD0iTSA0LjI0MjE4NzUgMy40OTIxODc1IEEgMC43NTAwNzUgMC43NTAwNzUgMCAwIDAgMy43MTg3NSA0Ljc4MTI1IEwgNS45NjQ4NDM4IDcuMDI3MzQzOCBMIDQgOC41IEwgNCA5IEwgOCA5IEMgOC41MDAwMDEgOC45OTk5OTg4IDkgOC40OTk5OTkyIDkgOCBMIDkgNCBMIDguNSA0IEwgNy4wMTc1NzgxIDUuOTU1MDc4MSBMIDQuNzgxMjUgMy43MTg3NSBBIDAuNzUwMDc1IDAuNzUwMDc1IDAgMCAwIDQuMjQyMTg3NSAzLjQ5MjE4NzUgeiBNIDE1LjczNDM3NSAzLjQ5MjE4NzUgQSAwLjc1MDA3NSAwLjc1MDA3NSAwIDAgMCAxNS4yMTg3NSAzLjcxODc1IEwgMTIuOTg0Mzc1IDUuOTUzMTI1IEwgMTEuNSA0IEwgMTEgNCBMIDExIDggQyAxMSA4LjQ5OTk5OTIgMTEuNDk5OTk5IDguOTk5OTk4OCAxMiA5IEwgMTYgOSBMIDE2IDguNSBMIDE0LjAzNTE1NiA3LjAyNzM0MzggTCAxNi4yODEyNSA0Ljc4MTI1IEEgMC43NTAwNzUgMC43NTAwNzUgMCAwIDAgMTUuNzM0Mzc1IDMuNDkyMTg3NSB6IE0gNCAxMSBMIDQgMTEuNSBMIDUuOTY0ODQzOCAxMi45NzI2NTYgTCAzLjcxODc1IDE1LjIxODc1IEEgMC43NTEzMDA5NiAwLjc1MTMwMDk2IDAgMSAwIDQuNzgxMjUgMTYuMjgxMjUgTCA3LjAyNzM0MzggMTQuMDM1MTU2IEwgOC41IDE2IEwgOSAxNiBMIDkgMTIgQyA5IDExLjUwMDAwMSA4LjUwMDAwMSAxMS4wMDAwMDEgOCAxMSBMIDQgMTEgeiBNIDEyIDExIEMgMTEuNDk5OTk5IDExLjAwMDAwMSAxMSAxMS41MDAwMDEgMTEgMTIgTCAxMSAxNiBMIDExLjUgMTYgTCAxMi45NzI2NTYgMTQuMDM1MTU2IEwgMTUuMjE4NzUgMTYuMjgxMjUgQSAwLjc1MTMwMDk2IDAuNzUxMzAwOTYgMCAxIDAgMTYuMjgxMjUgMTUuMjE4NzUgTCAxNC4wMzUxNTYgMTIuOTcyNjU2IEwgMTYgMTEuNSBMIDE2IDExIEwgMTIgMTEgeiAiCiAgICAgaWQ9InBhdGg3IiAvPjwvc3ZnPg==");
}
.mapboxgl-ctrl-icon.mapboxgl-ctrl-compass > .mapboxgl-ctrl-compass-arrow {
width: 20px;
height: 20px;
margin: 5px;
background-image: url("data:image/svg+xml;charset=utf8,%3Csvg%20xmlns%3D%27http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%27%20viewBox%3D%270%200%2020%2020%27%3E%0A%09%3Cpolygon%20fill%3D%27%23333333%27%20points%3D%276%2C9%2010%2C1%2014%2C9%27%2F%3E%0A%09%3Cpolygon%20fill%3D%27%23CCCCCC%27%20points%3D%276%2C11%2010%2C19%2014%2C11%20%27%2F%3E%0A%3C%2Fsvg%3E");
background-repeat: no-repeat;
display: inline-block;
}
a.mapboxgl-ctrl-logo {
width: 85px;
height: 21px;
margin: 0 0 -3px -3px;
display: block;
background-repeat: no-repeat;
cursor: pointer;
background-image: url(data:image/svg+xml;base64,PD94bWwgdmVyc2lvbj0iMS4wIiBlbmNvZGluZz0idXRmLTgiPz48c3ZnIHZlcnNpb249IjEuMSIgaWQ9IkxheWVyXzEiIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyIgeG1sbnM6eGxpbms9Imh0dHA6Ly93d3cudzMub3JnLzE5OTkveGxpbmsiIHg9IjBweCIgeT0iMHB4IiAgIHZpZXdCb3g9IjAgMCA4NC40OSAyMSIgc3R5bGU9ImVuYWJsZS1iYWNrZ3JvdW5kOm5ldyAwIDAgODQuNDkgMjE7IiB4bWw6c3BhY2U9InByZXNlcnZlIj48Zz4gIDxwYXRoIGNsYXNzPSJzdDAiIHN0eWxlPSJvcGFjaXR5OjAuOTsgZmlsbDogI0ZGRkZGRjsgZW5hYmxlLWJhY2tncm91bmQ6IG5ldzsiIGQ9Ik04My4yNSwxNC4yNmMwLDAuMTItMC4wOSwwLjIxLTAuMjEsMC4yMWgtMS42MWMtMC4xMywwLTAuMjQtMC4wNi0wLjMtMC4xN2wtMS40NC0yLjM5bC0xLjQ0LDIuMzkgICAgYy0wLjA2LDAuMTEtMC4xOCwwLjE3LTAuMywwLjE3aC0xLjYxYy0wLjA0LDAtMC4wOC0wLjAxLTAuMTItMC4wM2MtMC4wOS0wLjA2LTAuMTMtMC4xOS0wLjA2LTAuMjhsMCwwbDIuNDMtMy42OEw3Ni4yLDYuODQgICAgYy0wLjAyLTAuMDMtMC4wMy0wLjA3LTAuMDMtMC4xMmMwLTAuMTIsMC4wOS0wLjIxLDAuMjEtMC4yMWgxLjYxYzAuMTMsMCwwLjI0LDAuMDYsMC4zLDAuMTdsMS40MSwyLjM2bDEuNC0yLjM1ICAgIGMwLjA2LTAuMTEsMC4xOC0wLjE3LDAuMy0wLjE3SDgzYzAuMDQsMCwwLjA4LDAuMDEsMC4xMiwwLjAzYzAuMDksMC4wNiwwLjEzLDAuMTksMC4wNiwwLjI4bDAsMGwtMi4zNywzLjYzbDIuNDMsMy42NyAgICBDODMuMjQsMTQuMTgsODMuMjUsMTQuMjIsODMuMjUsMTQuMjZ6Ii8+ICA8cGF0aCBjbGFzcz0ic3QwIiBzdHlsZT0ib3BhY2l0eTowLjk7IGZpbGw6ICNGRkZGRkY7IGVuYWJsZS1iYWNrZ3JvdW5kOiBuZXc7IiBkPSJNNjYuMjQsOS41OWMtMC4zOS0xLjg4LTEuOTYtMy4yOC0zLjg0LTMuMjhjLTEuMDMsMC0yLjAzLDAuNDItMi43MywxLjE4VjMuNTFjMC0wLjEzLTAuMS0wLjIzLTAuMjMtMC4yM2gtMS40ICAgIGMtMC4xMywwLTAuMjMsMC4xMS0wLjIzLDAuMjN2MTAuNzJjMCwwLjEzLDAuMSwwLjIzLDAuMjMsMC4yM2gxLjRjMC4xMywwLDAuMjMtMC4xMSwwLjIzLTAuMjNWMTMuNWMwLjcxLDAuNzUsMS43LDEuMTgsMi43MywxLjE4ICAgIGMxLjg4LDAsMy40NS0xLjQxLDMuODQtMy4yOUM2Ni4zNywxMC43OSw2Ni4zNywxMC4xOCw2Ni4yNCw5LjU5TDY2LjI0LDkuNTl6IE02Mi4wOCwxM2MtMS4zMiwwLTIuMzktMS4xMS0yLjQxLTIuNDh2LTAuMDYgICAgYzAuMDItMS4zOCwxLjA5LTIuNDgsMi40MS0yLjQ4czIuNDIsMS4xMiwyLjQyLDIuNTFTNjMuNDEsMTMsNjIuMDgsMTN6Ii8+ICA8cGF0aCBjbGFzcz0ic3QwIiBzdHlsZT0ib3BhY2l0eTowLjk7IGZpbGw6ICNGRkZGRkY7IGVuYWJsZS1iYWNrZ3JvdW5kOiBuZXc7IiBkPSJNNzEuNjcsNi4zMmMtMS45OC0wLjAxLTMuNzIsMS4zNS00LjE2LDMuMjljLTAuMTMsMC41OS0wLjEzLDEuMTksMCwxLjc3YzAuNDQsMS45NCwyLjE3LDMuMzIsNC4xNywzLjMgICAgYzIuMzUsMCw0LjI2LTEuODcsNC4yNi00LjE5Uzc0LjA0LDYuMzIsNzEuNjcsNi4zMnogTTcxLjY1LDEzLjAxYy0xLjMzLDAtMi40Mi0xLjEyLTIuNDItMi41MXMxLjA4LTIuNTIsMi40Mi0yLjUyICAgIGMxLjMzLDAsMi40MiwxLjEyLDIuNDIsMi41MVM3Mi45OSwxMyw3MS42NSwxMy4wMUw3MS42NSwxMy4wMXoiLz4gIDxwYXRoIGNsYXNzPSJzdDEiIHN0eWxlPSJvcGFjaXR5OjAuMzU7IGVuYWJsZS1iYWNrZ3JvdW5kOm5ldzsiIGQ9Ik02Mi4wOCw3Ljk4Yy0xLjMyLDAtMi4zOSwxLjExLTIuNDEsMi40OHYwLjA2QzU5LjY4LDExLjksNjAuNzUsMTMsNjIuMDgsMTNzMi40Mi0xLjEyLDIuNDItMi41MSAgICBTNjMuNDEsNy45OCw2Mi4wOCw3Ljk4eiBNNjIuMDgsMTEuNzZjLTAuNjMsMC0xLjE0LTAuNTYtMS4xNy0xLjI1di0wLjA0YzAuMDEtMC42OSwwLjU0LTEuMjUsMS4xNy0xLjI1ICAgIGMwLjYzLDAsMS4xNywwLjU3LDEuMTcsMS4yN0M2My4yNCwxMS4yLDYyLjczLDExLjc2LDYyLjA4LDExLjc2eiIvPiAgPHBhdGggY2xhc3M9InN0MSIgc3R5bGU9Im9wYWNpdHk6MC4zNTsgZW5hYmxlLWJhY2tncm91bmQ6bmV3OyIgZD0iTTcxLjY1LDcuOThjLTEuMzMsMC0yLjQyLDEuMTItMi40MiwyLjUxUzcwLjMyLDEzLDcxLjY1LDEzczIuNDItMS4xMiwyLjQyLTIuNTFTNzIuOTksNy45OCw3MS42NSw3Ljk4eiAgICAgTTcxLjY1LDExLjc2Yy0wLjY0LDAtMS4xNy0wLjU3LTEuMTctMS4yN2MwLTAuNywwLjUzLTEuMjYsMS4xNy0xLjI2czEuMTcsMC41NywxLjE3LDEuMjdDNzIuODIsMTEuMjEsNzIuMjksMTEuNzYsNzEuNjUsMTEuNzZ6IiAgICAvPiAgPHBhdGggY2xhc3M9InN0MCIgc3R5bGU9Im9wYWNpdHk6MC45OyBmaWxsOiAjRkZGRkZGOyBlbmFibGUtYmFja2dyb3VuZDogbmV3OyIgZD0iTTQ1Ljc0LDYuNTNoLTEuNGMtMC4xMywwLTAuMjMsMC4xMS0wLjIzLDAuMjN2MC43M2MtMC43MS0wLjc1LTEuNy0xLjE4LTIuNzMtMS4xOCAgICBjLTIuMTcsMC0zLjk0LDEuODctMy45NCw0LjE5czEuNzcsNC4xOSwzLjk0LDQuMTljMS4wNCwwLDIuMDMtMC40MywyLjczLTEuMTl2MC43M2MwLDAuMTMsMC4xLDAuMjMsMC4yMywwLjIzaDEuNCAgICBjMC4xMywwLDAuMjMtMC4xMSwwLjIzLTAuMjNWNi43NGMwLTAuMTItMC4wOS0wLjIyLTAuMjItMC4yMkM0NS43NSw2LjUzLDQ1Ljc1LDYuNTMsNDUuNzQsNi41M3ogTTQ0LjEyLDEwLjUzICAgIEM0NC4xMSwxMS45LDQzLjAzLDEzLDQxLjcxLDEzcy0yLjQyLTEuMTItMi40Mi0yLjUxczEuMDgtMi41MiwyLjQtMi41MmMxLjMzLDAsMi4zOSwxLjExLDIuNDEsMi40OEw0NC4xMiwxMC41M3oiLz4gIDxwYXRoIGNsYXNzPSJzdDEiIHN0eWxlPSJvcGFjaXR5OjAuMzU7IGVuYWJsZS1iYWNrZ3JvdW5kOm5ldzsiIGQ9Ik00MS43MSw3Ljk4Yy0xLjMzLDAtMi40MiwxLjEyLTIuNDIsMi41MVM0MC4zNywxMyw0MS43MSwxM3MyLjM5LTEuMTEsMi40MS0yLjQ4di0wLjA2ICAgIEM0NC4xLDkuMDksNDMuMDMsNy45OCw0MS43MSw3Ljk4eiBNNDAuNTUsMTAuNDljMC0wLjcsMC41Mi0xLjI3LDEuMTctMS4yN2MwLjY0LDAsMS4xNCwwLjU2LDEuMTcsMS4yNXYwLjA0ICAgIGMtMC4wMSwwLjY4LTAuNTMsMS4yNC0xLjE3LDEuMjRDNDEuMDgsMTEuNzUsNDAuNTUsMTEuMTksNDAuNTUsMTAuNDl6Ii8+ICA8cGF0aCBjbGFzcz0ic3QwIiBzdHlsZT0ib3BhY2l0eTowLjk7IGZpbGw6ICNGRkZGRkY7IGVuYWJsZS1iYWNrZ3JvdW5kOiBuZXc7IiBkPSJNNTIuNDEsNi4zMmMtMS4wMywwLTIuMDMsMC40Mi0yLjczLDEuMThWNi43NWMwLTAuMTMtMC4xLTAuMjMtMC4yMy0wLjIzaC0xLjRjLTAuMTMsMC0wLjIzLDAuMTEtMC4yMywwLjIzICAgIHYxMC43MmMwLDAuMTMsMC4xLDAuMjMsMC4yMywwLjIzaDEuNGMwLjEzLDAsMC4yMy0wLjEsMC4yMy0wLjIzVjEzLjVjMC43MSwwLjc1LDEuNywxLjE4LDIuNzQsMS4xOGMyLjE3LDAsMy45NC0xLjg3LDMuOTQtNC4xOSAgICBTNTQuNTgsNi4zMiw1Mi40MSw2LjMyeiBNNTIuMDgsMTMuMDFjLTEuMzIsMC0yLjM5LTEuMTEtMi40Mi0yLjQ4di0wLjA3YzAuMDItMS4zOCwxLjA5LTIuNDksMi40LTIuNDljMS4zMiwwLDIuNDEsMS4xMiwyLjQxLDIuNTEgICAgUzUzLjQsMTMsNTIuMDgsMTMuMDFMNTIuMDgsMTMuMDF6Ii8+ICA8cGF0aCBjbGFzcz0ic3QxIiBzdHlsZT0ib3BhY2l0eTowLjM1OyBlbmFibGUtYmFja2dyb3VuZDpuZXc7IiBkPSJNNTIuMDgsNy45OGMtMS4zMiwwLTIuMzksMS4xMS0yLjQyLDIuNDh2MC4wNmMwLjAzLDEuMzgsMS4xLDIuNDgsMi40MiwyLjQ4czIuNDEtMS4xMiwyLjQxLTIuNTEgICAgUzUzLjQsNy45OCw1Mi4wOCw3Ljk4eiBNNTIuMDgsMTEuNzZjLTAuNjMsMC0xLjE0LTAuNTYtMS4xNy0xLjI1di0wLjA0YzAuMDEtMC42OSwwLjU0LTEuMjUsMS4xNy0xLjI1YzAuNjMsMCwxLjE3LDAuNTgsMS4xNywxLjI3ICAgIFM1Mi43MiwxMS43Niw1Mi4wOCwxMS43NnoiLz4gIDxwYXRoIGNsYXNzPSJzdDAiIHN0eWxlPSJvcGFjaXR5OjAuOTsgZmlsbDogI0ZGRkZGRjsgZW5hYmxlLWJhY2tncm91bmQ6IG5ldzsiIGQ9Ik0zNi4wOCwxNC4yNGMwLDAuMTMtMC4xLDAuMjMtMC4yMywwLjIzaC0xLjQxYy0wLjEzLDAtMC4yMy0wLjExLTAuMjMtMC4yM1Y5LjY4YzAtMC45OC0wLjc0LTEuNzEtMS42Mi0xLjcxICAgIGMtMC44LDAtMS40NiwwLjctMS41OSwxLjYybDAuMDEsNC42NmMwLDAuMTMtMC4xMSwwLjIzLTAuMjMsMC4yM2gtMS40MWMtMC4xMywwLTAuMjMtMC4xMS0wLjIzLTAuMjNWOS42OCAgICBjMC0wLjk4LTAuNzQtMS43MS0xLjYyLTEuNzFjLTAuODUsMC0xLjU0LDAuNzktMS42LDEuOHY0LjQ4YzAsMC4xMy0wLjEsMC4yMy0wLjIzLDAuMjNoLTEuNGMtMC4xMywwLTAuMjMtMC4xMS0wLjIzLTAuMjNWNi43NCAgICBjMC4wMS0wLjEzLDAuMS0wLjIyLDAuMjMtMC4yMmgxLjRjMC4xMywwLDAuMjIsMC4xMSwwLjIzLDAuMjJWNy40YzAuNS0wLjY4LDEuMy0xLjA5LDIuMTYtMS4xaDAuMDNjMS4wOSwwLDIuMDksMC42LDIuNiwxLjU1ICAgIGMwLjQ1LTAuOTUsMS40LTEuNTUsMi40NC0xLjU2YzEuNjIsMCwyLjkzLDEuMjUsMi45LDIuNzhMMzYuMDgsMTQuMjR6Ii8+ICA8cGF0aCBjbGFzcz0ic3QxIiBzdHlsZT0ib3BhY2l0eTowLjM1OyBlbmFibGUtYmFja2dyb3VuZDpuZXc7IiBkPSJNODQuMzQsMTMuNTlsLTAuMDctMC4xM2wtMS45Ni0yLjk5bDEuOTQtMi45NWMwLjQ0LTAuNjcsMC4yNi0xLjU2LTAuNDEtMi4wMmMtMC4wMiwwLTAuMDMsMC0wLjA0LTAuMDEgICAgYy0wLjIzLTAuMTUtMC41LTAuMjItMC43OC0wLjIyaC0xLjYxYy0wLjU2LDAtMS4wOCwwLjI5LTEuMzcsMC43OEw3OS43Miw2LjZsLTAuMzQtMC41NkM3OS4wOSw1LjU2LDc4LjU3LDUuMjcsNzgsNS4yN2gtMS42ICAgIGMtMC42LDAtMS4xMywwLjM3LTEuMzUsMC45MmMtMi4xOS0xLjY2LTUuMjgtMS40Ny03LjI2LDAuNDVjLTAuMzUsMC4zNC0wLjY1LDAuNzItMC44OSwxLjE0Yy0wLjktMS42Mi0yLjU4LTIuNzItNC41LTIuNzIgICAgYy0wLjUsMC0xLjAxLDAuMDctMS40OCwwLjIzVjMuNTFjMC0wLjgyLTAuNjYtMS40OC0xLjQ3LTEuNDhoLTEuNGMtMC44MSwwLTEuNDcsMC42Ni0xLjQ3LDEuNDd2My43NSAgICBjLTAuOTUtMS4zNi0yLjUtMi4xOC00LjE3LTIuMTljLTAuNzQsMC0xLjQ2LDAuMTYtMi4xMiwwLjQ3Yy0wLjI0LTAuMTctMC41NC0wLjI2LTAuODQtMC4yNmgtMS40Yy0wLjQ1LDAtMC44NywwLjIxLTEuMTUsMC41NiAgICBjLTAuMDItMC4wMy0wLjA0LTAuMDUtMC4wNy0wLjA4Yy0wLjI4LTAuMy0wLjY4LTAuNDctMS4wOS0wLjQ3aC0xLjM5Yy0wLjMsMC0wLjYsMC4wOS0wLjg0LDAuMjZjLTAuNjctMC4zLTEuMzktMC40Ni0yLjEyLTAuNDYgICAgYy0xLjgzLDAtMy40MywxLTQuMzcsMi41Yy0wLjItMC40Ni0wLjQ4LTAuODktMC44My0xLjI1Yy0wLjgtMC44MS0xLjg5LTEuMjUtMy4wMi0xLjI1aC0wLjAxYy0wLjg5LDAuMDEtMS43NSwwLjMzLTIuNDYsMC44OCAgICBjLTAuNzQtMC41Ny0xLjY0LTAuODgtMi41Ny0wLjg4SDI4LjFjLTAuMjksMC0wLjU4LDAuMDMtMC44NiwwLjExYy0wLjI4LDAuMDYtMC41NiwwLjE2LTAuODIsMC4yOGMtMC4yMS0wLjEyLTAuNDUtMC4xOC0wLjctMC4xOCAgICBoLTEuNGMtMC44MiwwLTEuNDcsMC42Ni0xLjQ3LDEuNDd2Ny41YzAsMC44MiwwLjY2LDEuNDcsMS40NywxLjQ3aDEuNGMwLjgyLDAsMS40OC0wLjY2LDEuNDgtMS40OGwwLDBWOS43OSAgICBjMC4wMy0wLjM2LDAuMjMtMC41OSwwLjM2LTAuNTljMC4xOCwwLDAuMzgsMC4xOCwwLjM4LDAuNDd2NC41N2MwLDAuODIsMC42NiwxLjQ3LDEuNDcsMS40N2gxLjQxYzAuODIsMCwxLjQ3LTAuNjYsMS40Ny0xLjQ3ICAgIGwtMC4wMS00LjU3YzAuMDYtMC4zMiwwLjI1LTAuNDcsMC4zNS0wLjQ3YzAuMTgsMCwwLjM4LDAuMTgsMC4zOCwwLjQ3djQuNTdjMCwwLjgyLDAuNjYsMS40NywxLjQ3LDEuNDdoMS40MSAgICBjMC44MiwwLDEuNDctMC42NiwxLjQ3LTEuNDd2LTAuMzhjMC45NiwxLjI5LDIuNDYsMi4wNiw0LjA2LDIuMDZjMC43NCwwLDEuNDYtMC4xNiwyLjEyLTAuNDdjMC4yNCwwLjE3LDAuNTQsMC4yNiwwLjg0LDAuMjZoMS4zOSAgICBjMC4zLDAsMC42LTAuMDksMC44NC0wLjI2djIuMDFjMCwwLjgyLDAuNjYsMS40NywxLjQ3LDEuNDdoMS40YzAuODIsMCwxLjQ3LTAuNjYsMS40Ny0xLjQ3di0xLjc3YzAuNDgsMC4xNSwwLjk5LDAuMjMsMS40OSwwLjIyICAgIGMxLjcsMCwzLjIyLTAuODcsNC4xNy0yLjJ2MC41MmMwLDAuODIsMC42NiwxLjQ3LDEuNDcsMS40N2gxLjRjMC4zLDAsMC42LTAuMDksMC44NC0wLjI2YzAuNjYsMC4zMSwxLjM5LDAuNDcsMi4xMiwwLjQ3ICAgIGMxLjkyLDAsMy42LTEuMSw0LjQ5LTIuNzNjMS41NCwyLjY1LDQuOTUsMy41Myw3LjU4LDEuOThjMC4xOC0wLjExLDAuMzYtMC4yMiwwLjUzLTAuMzZjMC4yMiwwLjU1LDAuNzYsMC45MSwxLjM1LDAuOUg3OCAgICBjMC41NiwwLDEuMDgtMC4yOSwxLjM3LTAuNzhsMC4zNy0wLjYxbDAuMzcsMC42MWMwLjI5LDAuNDgsMC44MSwwLjc4LDEuMzgsMC43OGgxLjZjMC44MSwwLDEuNDYtMC42NiwxLjQ1LTEuNDYgICAgQzg0LjQ5LDE0LjAyLDg0LjQ0LDEzLjgsODQuMzQsMTMuNTlMODQuMzQsMTMuNTl6IE0zNS44NiwxNC40N2gtMS40MWMtMC4xMywwLTAuMjMtMC4xMS0wLjIzLTAuMjNWOS42OCAgICBjMC0wLjk4LTAuNzQtMS43MS0xLjYyLTEuNzFjLTAuOCwwLTEuNDYsMC43LTEuNTksMS42MmwwLjAxLDQuNjZjMCwwLjEzLTAuMSwwLjIzLTAuMjMsMC4yM2gtMS40MWMtMC4xMywwLTAuMjMtMC4xMS0wLjIzLTAuMjMgICAgVjkuNjhjMC0wLjk4LTAuNzQtMS43MS0xLjYyLTEuNzFjLTAuODUsMC0xLjU0LDAuNzktMS42LDEuOHY0LjQ4YzAsMC4xMy0wLjEsMC4yMy0wLjIzLDAuMjNoLTEuNGMtMC4xMywwLTAuMjMtMC4xMS0wLjIzLTAuMjMgICAgVjYuNzRjMC4wMS0wLjEzLDAuMTEtMC4yMiwwLjIzLTAuMjJoMS40YzAuMTMsMCwwLjIyLDAuMTEsMC4yMywwLjIyVjcuNGMwLjUtMC42OCwxLjMtMS4wOSwyLjE2LTEuMWgwLjAzICAgIGMxLjA5LDAsMi4wOSwwLjYsMi42LDEuNTVjMC40NS0wLjk1LDEuNC0xLjU1LDIuNDQtMS41NmMxLjYyLDAsMi45MywxLjI1LDIuOSwyLjc4bDAuMDEsNS4xNkMzNi4wOSwxNC4zNiwzNS45OCwxNC40NiwzNS44NiwxNC40NyAgICBMMzUuODYsMTQuNDd6IE00NS45NywxNC4yNGMwLDAuMTMtMC4xLDAuMjMtMC4yMywwLjIzaC0xLjRjLTAuMTMsMC0wLjIzLTAuMTEtMC4yMy0wLjIzVjEzLjVjLTAuNywwLjc2LTEuNjksMS4xOC0yLjcyLDEuMTggICAgYy0yLjE3LDAtMy45NC0xLjg3LTMuOTQtNC4xOXMxLjc3LTQuMTksMy45NC00LjE5YzEuMDMsMCwyLjAyLDAuNDMsMi43MywxLjE4VjYuNzRjMC0wLjEzLDAuMS0wLjIzLDAuMjMtMC4yM2gxLjQgICAgYzAuMTItMC4wMSwwLjIyLDAuMDgsMC4yMywwLjIxYzAsMC4wMSwwLDAuMDEsMCwwLjAydjcuNTFoLTAuMDFWMTQuMjR6IE01Mi40MSwxNC42N2MtMS4wMywwLTIuMDItMC40My0yLjczLTEuMTh2My45NyAgICBjMCwwLjEzLTAuMSwwLjIzLTAuMjMsMC4yM2gtMS40Yy0wLjEzLDAtMC4yMy0wLjEtMC4yMy0wLjIzVjYuNzVjMC0wLjEzLDAuMS0wLjIyLDAuMjMtMC4yMmgxLjRjMC4xMywwLDAuMjMsMC4xMSwwLjIzLDAuMjN2MC43MyAgICBjMC43MS0wLjc2LDEuNy0xLjE4LDIuNzMtMS4xOGMyLjE3LDAsMy45NCwxLjg2LDMuOTQsNC4xOFM1NC41OCwxNC42Nyw1Mi40MSwxNC42N3ogTTY2LjI0LDExLjM5Yy0wLjM5LDEuODctMS45NiwzLjI5LTMuODQsMy4yOSAgICBjLTEuMDMsMC0yLjAyLTAuNDMtMi43My0xLjE4djAuNzNjMCwwLjEzLTAuMSwwLjIzLTAuMjMsMC4yM2gtMS40Yy0wLjEzLDAtMC4yMy0wLjExLTAuMjMtMC4yM1YzLjUxYzAtMC4xMywwLjEtMC4yMywwLjIzLTAuMjMgICAgaDEuNGMwLjEzLDAsMC4yMywwLjExLDAuMjMsMC4yM3YzLjk3YzAuNzEtMC43NSwxLjctMS4xOCwyLjczLTEuMTdjMS44OCwwLDMuNDUsMS40LDMuODQsMy4yOEM2Ni4zNywxMC4xOSw2Ni4zNywxMC44LDY2LjI0LDExLjM5ICAgIEw2Ni4yNCwxMS4zOUw2Ni4yNCwxMS4zOXogTTcxLjY3LDE0LjY4Yy0yLDAuMDEtMy43My0xLjM1LTQuMTctMy4zYy0wLjEzLTAuNTktMC4xMy0xLjE5LDAtMS43N2MwLjQ0LTEuOTQsMi4xNy0zLjMxLDQuMTctMy4zICAgIGMyLjM2LDAsNC4yNiwxLjg3LDQuMjYsNC4xOVM3NC4wMywxNC42OCw3MS42NywxNC42OEw3MS42NywxNC42OHogTTgzLjA0LDE0LjQ3aC0xLjYxYy0wLjEzLDAtMC4yNC0wLjA2LTAuMy0wLjE3bC0xLjQ0LTIuMzkgICAgbC0xLjQ0LDIuMzljLTAuMDYsMC4xMS0wLjE4LDAuMTctMC4zLDAuMTdoLTEuNjFjLTAuMDQsMC0wLjA4LTAuMDEtMC4xMi0wLjAzYy0wLjA5LTAuMDYtMC4xMy0wLjE5LTAuMDYtMC4yOGwwLDBsMi40My0zLjY4ICAgIEw3Ni4yLDYuODRjLTAuMDItMC4wMy0wLjAzLTAuMDctMC4wMy0wLjEyYzAtMC4xMiwwLjA5LTAuMjEsMC4yMS0wLjIxaDEuNjFjMC4xMywwLDAuMjQsMC4wNiwwLjMsMC4xN2wxLjQxLDIuMzZsMS40MS0yLjM2ICAgIGMwLjA2LTAuMTEsMC4xOC0wLjE3LDAuMy0wLjE3aDEuNjFjMC4wNCwwLDAuMDgsMC4wMSwwLjEyLDAuMDNjMC4wOSwwLjA2LDAuMTMsMC4xOSwwLjA2LDAuMjhsMCwwbC0yLjM4LDMuNjRsMi40MywzLjY3ICAgIGMwLjAyLDAuMDMsMC4wMywwLjA3LDAuMDMsMC4xMkM4My4yNSwxNC4zOCw4My4xNiwxNC40Nyw4My4wNCwxNC40N0w4My4wNCwxNC40N0w4My4wNCwxNC40N3oiLz4gIDxwYXRoIGNsYXNzPSJzdDAiIHN0eWxlPSJvcGFjaXR5OjAuOTsgZmlsbDogI0ZGRkZGRjsgZW5hYmxlLWJhY2tncm91bmQ6IG5ldzsiIGQ9Ik0xMC41LDEuMjRjLTUuMTEsMC05LjI1LDQuMTUtOS4yNSw5LjI1czQuMTUsOS4yNSw5LjI1LDkuMjVzOS4yNS00LjE1LDkuMjUtOS4yNSAgICBDMTkuNzUsNS4zOCwxNS42MSwxLjI0LDEwLjUsMS4yNHogTTE0Ljg5LDEyLjc3Yy0xLjkzLDEuOTMtNC43OCwyLjMxLTYuNywyLjMxYy0wLjcsMC0xLjQxLTAuMDUtMi4xLTAuMTZjMCwwLTEuMDItNS42NCwyLjE0LTguODEgICAgYzAuODMtMC44MywxLjk1LTEuMjgsMy4xMy0xLjI4YzEuMjcsMCwyLjQ5LDAuNTEsMy4zOSwxLjQyQzE2LjU5LDguMDksMTYuNjQsMTEsMTQuODksMTIuNzd6Ii8+ICA8cGF0aCBjbGFzcz0ic3QxIiBzdHlsZT0ib3BhY2l0eTowLjM1OyBlbmFibGUtYmFja2dyb3VuZDpuZXc7IiBkPSJNMTAuNS0wLjAxQzQuNy0wLjAxLDAsNC43LDAsMTAuNDlzNC43LDEwLjUsMTAuNSwxMC41UzIxLDE2LjI5LDIxLDEwLjQ5QzIwLjk5LDQuNywxNi4zLTAuMDEsMTAuNS0wLjAxeiAgICAgTTEwLjUsMTkuNzRjLTUuMTEsMC05LjI1LTQuMTUtOS4yNS05LjI1czQuMTQtOS4yNiw5LjI1LTkuMjZzOS4yNSw0LjE1LDkuMjUsOS4yNUMxOS43NSwxNS42MSwxNS42MSwxOS43NCwxMC41LDE5Ljc0eiIvPiAgPHBhdGggY2xhc3M9InN0MSIgc3R5bGU9Im9wYWNpdHk6MC4zNTsgZW5hYmxlLWJhY2tncm91bmQ6bmV3OyIgZD0iTTE0Ljc0LDYuMjVDMTIuOSw0LjQxLDkuOTgsNC4zNSw4LjIzLDYuMWMtMy4xNiwzLjE3LTIuMTQsOC44MS0yLjE0LDguODFzNS42NCwxLjAyLDguODEtMi4xNCAgICBDMTYuNjQsMTEsMTYuNTksOC4wOSwxNC43NCw2LjI1eiBNMTIuNDcsMTAuMzRsLTAuOTEsMS44N2wtMC45LTEuODdMOC44LDkuNDNsMS44Ni0wLjlsMC45LTEuODdsMC45MSwxLjg3bDEuODYsMC45TDEyLjQ3LDEwLjM0eiIgICAgLz4gIDxwb2x5Z29uIGNsYXNzPSJzdDAiIHN0eWxlPSJvcGFjaXR5OjAuOTsgZmlsbDogI0ZGRkZGRjsgZW5hYmxlLWJhY2tncm91bmQ6IG5ldzsiIHBvaW50cz0iMTQuMzMsOS40MyAxMi40NywxMC4zNCAxMS41NiwxMi4yMSAxMC42NiwxMC4zNCA4LjgsOS40MyAxMC42Niw4LjUzIDExLjU2LDYuNjYgMTIuNDcsOC41MyAgICIvPjwvZz48L3N2Zz4=);
}
.mapboxgl-ctrl.mapboxgl-ctrl-attrib {
padding: 0 5px;
background-color: rgba(255, 255, 255, .5);
margin: 0;
}
.mapboxgl-ctrl-attrib.mapboxgl-compact {
padding-top: 2px;
padding-bottom: 2px;
margin: 0 10px 10px 10px;
position: relative;
padding-right: 24px;
background-color: #fff;
border-radius: 3px 12px 12px 3px;
visibility: hidden;
}
.mapboxgl-ctrl-attrib.mapboxgl-compact:hover {
visibility: visible;
}
.mapboxgl-ctrl-attrib.mapboxgl-compact:after {
content: '';
cursor: pointer;
position: absolute;
bottom: 0;
right: 0;
background-image: url("data:image/svg+xml;charset=utf-8,%3Csvg%20viewBox%3D%270%200%2020%2020%27%20xmlns%3D%27http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%27%3E%0D%0A%09%3Cpath%20fill%3D%27%23333333%27%20fill-rule%3D%27evenodd%27%20d%3D%27M4%2C10a6%2C6%200%201%2C0%2012%2C0a6%2C6%200%201%2C0%20-12%2C0%20M9%2C7a1%2C1%200%201%2C0%202%2C0a1%2C1%200%201%2C0%20-2%2C0%20M9%2C10a1%2C1%200%201%2C1%202%2C0l0%2C3a1%2C1%200%201%2C1%20-2%2C0%27%20%2F%3E%0D%0A%3C%2Fsvg%3E");
background-color: rgba(255, 255, 255, .5);
width: 24px;
height: 24px;
box-sizing: border-box;
visibility: visible;
border-radius: 12px;
}
.mapboxgl-ctrl-attrib a {
color: rgba(0,0,0,0.75);
text-decoration: none;
}
.mapboxgl-ctrl-attrib a:hover {
color: inherit;
text-decoration: underline;
}
/* stylelint-disable */
.mapboxgl-ctrl-attrib .mapbox-improve-map {
font-weight: bold;
margin-left: 2px;
}
/*stylelint-enable*/
.mapboxgl-ctrl-scale {
background-color: rgba(255,255,255,0.75);
font-size: 10px;
border-width: medium 2px 2px;
border-style: none solid solid;
border-color: #333;
padding: 0 5px;
color: #333;
box-sizing: border-box;
}
.mapboxgl-popup {
position: absolute;
top: 0;
left: 0;
display: -webkit-flex;
display: flex;
will-change: transform;
pointer-events: none;
}
.mapboxgl-popup-anchor-top,
.mapboxgl-popup-anchor-top-left,
.mapboxgl-popup-anchor-top-right {
-webkit-flex-direction: column;
flex-direction: column;
}
.mapboxgl-popup-anchor-bottom,
.mapboxgl-popup-anchor-bottom-left,
.mapboxgl-popup-anchor-bottom-right {
-webkit-flex-direction: column-reverse;
flex-direction: column-reverse;
}
.mapboxgl-popup-anchor-left {
-webkit-flex-direction: row;
flex-direction: row;
}
.mapboxgl-popup-anchor-right {
-webkit-flex-direction: row-reverse;
flex-direction: row-reverse;
}
.mapboxgl-popup-tip {
width: 0;
height: 0;
border: 10px solid transparent;
z-index: 1;
}
.mapboxgl-popup-anchor-top .mapboxgl-popup-tip {
-webkit-align-self: center;
align-self: center;
border-top: none;
border-bottom-color: #fff;
}
.mapboxgl-popup-anchor-top-left .mapboxgl-popup-tip {
-webkit-align-self: flex-start;
align-self: flex-start;
border-top: none;
border-left: none;
border-bottom-color: #fff;
}
.mapboxgl-popup-anchor-top-right .mapboxgl-popup-tip {
-webkit-align-self: flex-end;
align-self: flex-end;
border-top: none;
border-right: none;
border-bottom-color: #fff;
}
.mapboxgl-popup-anchor-bottom .mapboxgl-popup-tip {
-webkit-align-self: center;
align-self: center;
border-bottom: none;
border-top-color: #fff;
}
.mapboxgl-popup-anchor-bottom-left .mapboxgl-popup-tip {
-webkit-align-self: flex-start;
align-self: flex-start;
border-bottom: none;
border-left: none;
border-top-color: #fff;
}
.mapboxgl-popup-anchor-bottom-right .mapboxgl-popup-tip {
-webkit-align-self: flex-end;
align-self: flex-end;
border-bottom: none;
border-right: none;
border-top-color: #fff;
}
.mapboxgl-popup-anchor-left .mapboxgl-popup-tip {
-webkit-align-self: center;
align-self: center;
border-left: none;
border-right-color: #fff;
}
.mapboxgl-popup-anchor-right .mapboxgl-popup-tip {
-webkit-align-self: center;
align-self: center;
border-right: none;
border-left-color: #fff;
}
.mapboxgl-popup-close-button {
position: absolute;
right: 0;
top: 0;
border: none;
border-radius: 0 3px 0 0;
cursor: pointer;
background-color: rgba(0,0,0,0);
}
.mapboxgl-popup-close-button:hover {
background-color: rgba(0,0,0,0.05);
}
.mapboxgl-popup-content {
position: relative;
background: #fff;
border-radius: 3px;
box-shadow: 0 1px 2px rgba(0,0,0,0.10);
padding: 10px 10px 15px;
pointer-events: auto;
}
.mapboxgl-popup-anchor-top-left .mapboxgl-popup-content {
border-top-left-radius: 0;
}
.mapboxgl-popup-anchor-top-right .mapboxgl-popup-content {
border-top-right-radius: 0;
}
.mapboxgl-popup-anchor-bottom-left .mapboxgl-popup-content {
border-bottom-left-radius: 0;
}
.mapboxgl-popup-anchor-bottom-right .mapboxgl-popup-content {
border-bottom-right-radius: 0;
}
.mapboxgl-marker {
position: absolute;
top: 0;
left: 0;
will-change: transform;
}
.mapboxgl-user-location-dot {
background-color: #1DA1F2;
width: 16px;
height: 16px;
border-radius: 50%;
box-shadow: 0 0 2px rgba(0,0,0,0.25);
border: 2px solid #fff;
}
.mapboxgl-user-location-dot:after {
content: '';
display: block;
box-shadow: #1DA1F2 0 0 0 2px;
width: 16px;
height: 16px;
border-radius: 50%;
position: relative;
z-index: -1;
-webkit-animation: mapboxgl-user-location-dot-pulse 2s;
-moz-animation: mapboxgl-user-location-dot-pulse 2s;
-ms-animation: mapboxgl-user-location-dot-pulse 2s;
animation: mapboxgl-user-location-dot-pulse 2s;
-webkit-animation-iteration-count: infinite;
-moz-animation-iteration-count: infinite;
-ms-animation-iteration-count: infinite;
animation-iteration-count: infinite;
}
@-webkit-keyframes mapboxgl-user-location-dot-pulse {
0% { -webkit-box-shadow: 0 0 0 0 rgba(29, 161, 242, 0.8); }
70% { -webkit-box-shadow: 0 0 0 15px rgba(29, 161, 242, 0); }
242% { -webkit-box-shadow: 0 0 0 0 rgba(29, 161, 242, 0); }
}
@-ms-keyframes mapboxgl-user-location-dot-pulse {
0% { -ms-box-shadow: 0 0 0 0 rgba(29, 161, 242, 0.8); }
70% { -ms-box-shadow: 0 0 0 15px rgba(29, 161, 242, 0); }
242% { -ms-box-shadow: 0 0 0 0 rgba(29, 161, 242, 0); }
}
@keyframes mapboxgl-user-location-dot-pulse {
0% {
-moz-box-shadow: 0 0 0 0 rgba(29, 161, 242, 0.8);
box-shadow: 0 0 0 0 rgba(29, 161, 242, 0.4);
}
70% {
-moz-box-shadow: 0 0 0 15px rgba(29, 161, 242, 0);
box-shadow: 0 0 0 15px rgba(29, 161, 242, 0);
}
100% {
-moz-box-shadow: 0 0 0 0 rgba(29, 161, 242, 0);
box-shadow: 0 0 0 0 rgba(29, 161, 242, 0);
}
}
.mapboxgl-user-location-dot-stale {
background-color: #aaa;
}
.mapboxgl-user-location-dot-stale:after {
display: none
}
.mapboxgl-crosshair,
.mapboxgl-crosshair .mapboxgl-interactive,
.mapboxgl-crosshair .mapboxgl-interactive:active {
cursor: crosshair;
}
.mapboxgl-boxzoom {
position: absolute;
top: 0;
left: 0;
width: 0;
height: 0;
background: #fff;
border: 2px dotted #202020;
opacity: 0.5;
}
@media print {
/* stylelint-disable */
.mapbox-improve-map {
display:none;
}
/* stylelint-enable */
}