13 lines
		
	
	
		
			1.1 MiB
		
	
	
	
	
	
			
		
		
	
	
			13 lines
		
	
	
		
			1.1 MiB
		
	
	
	
	
	
window.mapboxRenderer = function(t){var e={};function n(r){if(e[r])return e[r].exports;var i=e[r]={i:r,l:!1,exports:{}};return t[r].call(i.exports,i,i.exports,n),i.l=!0,i.exports}return n.m=t,n.c=e,n.d=function(t,e,r){n.o(t,e)||Object.defineProperty(t,e,{enumerable:!0,get:r})},n.r=function(t){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(t,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(t,"__esModule",{value:!0})},n.t=function(t,e){if(1&e&&(t=n(t)),8&e)return t;if(4&e&&"object"==typeof t&&t&&t.__esModule)return t;var r=Object.create(null);if(n.r(r),Object.defineProperty(r,"default",{enumerable:!0,value:t}),2&e&&"string"!=typeof t)for(var i in t)n.d(r,i,function(e){return t[e]}.bind(null,i));return r},n.n=function(t){var e=t&&t.__esModule?function(){return t.default}:function(){return t};return n.d(e,"a",e),e},n.o=function(t,e){return Object.prototype.hasOwnProperty.call(t,e)},n.p="",n(n.s=131)}([function(t,e,n){function r(t,e){return function(t){if(Array.isArray(t))return t}(t)||function(t,e){var n=[],r=!0,i=!1,o=void 0;try{for(var a,s=t[Symbol.iterator]();!(r=(a=s.next()).done)&&(n.push(a.value),!e||n.length!==e);r=!0);}catch(t){i=!0,o=t}finally{try{r||null==s.return||s.return()}finally{if(i)throw o}}return n}(t,e)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance")}()}function i(t){return(i="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t})(t)}var o=n(73),a=n(35);n(3);e.easeCubicInOut=function(t){if(t<=0)return 0;if(t>=1)return 1;var e=t*t,n=e*t;return 4*(t<.5?n:3*(t-e)+n-.75)},e.bezier=function(t,e,n,r){var i=new o(t,e,n,r);return function(t){return i.solve(t)}},e.ease=e.bezier(.25,.1,.25,1),e.clamp=function(t,e,n){return Math.min(n,Math.max(e,t))},e.wrap=function(t,e,n){var r=n-e,i=((t-e)%r+r)%r+e;return i===e?n:i},e.asyncAll=function(t,e,n){if(!t.length)return n(null,[]);var r=t.length,i=new Array(t.length),o=null;t.forEach(function(t,a){e(t,function(t,e){t&&(o=t),i[a]=e,0==--r&&n(o,i)})})},e.values=function(t){var e=[];for(var n in t)e.push(t[n]);return e},e.keysDifference=function(t,e){var n=[];for(var r in t)r in e||n.push(r);return n},e.extend=function(t){for(var e=arguments.length,n=new Array(e>1?e-1:0),r=1;r<e;r++)n[r-1]=arguments[r];for(var i=0,o=n;i<o.length;i++){var a=o[i];for(var s in a)t[s]=a[s]}return t},e.pick=function(t,e){for(var n={},r=0;r<e.length;r++){var i=e[r];i in t&&(n[i]=t[i])}return n};var s=1;e.uniqueId=function(){return s++},e.bindAll=function(t,e){t.forEach(function(t){e[t]&&(e[t]=e[t].bind(e))})},e.getCoordinatesCenter=function(t){for(var e=1/0,n=1/0,r=-1/0,i=-1/0,o=0;o<t.length;o++)e=Math.min(e,t[o].column),n=Math.min(n,t[o].row),r=Math.max(r,t[o].column),i=Math.max(i,t[o].row);var s=r-e,u=i-n,l=Math.max(s,u),c=Math.max(0,Math.floor(-Math.log(l)/Math.LN2));return new a((e+r)/2,(n+i)/2,0).zoomTo(c)},e.endsWith=function(t,e){return-1!==t.indexOf(e,t.length-e.length)},e.mapObject=function(t,e,n){var r={};for(var i in t)r[i]=e.call(n||this,t[i],i,t);return r},e.filterObject=function(t,e,n){var r={};for(var i in t)e.call(n||this,t[i],i,t)&&(r[i]=t[i]);return r},e.deepEqual=n(74),e.clone=function(t){return Array.isArray(t)?t.map(e.clone):"object"===i(t)&&t?e.mapObject(t,e.clone):t},e.arraysIntersect=function(t,e){for(var n=0;n<t.length;n++)if(e.indexOf(t[n])>=0)return!0;return!1};var u={};e.warnOnce=function(t){u[t]||("undefined"!=typeof console&&console.warn(t),u[t]=!0)},e.isCounterClockwise=function(t,e,n){return(n.y-t.y)*(e.x-t.x)>(e.y-t.y)*(n.x-t.x)},e.calculateSignedArea=function(t){for(var e,n,r=0,i=0,o=t.length,a=o-1;i<o;a=i++)e=t[i],r+=((n=t[a]).x-e.x)*(e.y+n.y);return r},e.isClosedPolygon=function(t){if(t.length<4)return!1;var n=t[0],r=t[t.length-1];return!(Math.abs(n.x-r.x)>0||Math.abs(n.y-r.y)>0)&&Math.abs(e.calculateSignedArea(t))>.01},e.sphericalToCartesian=function(t){var e=r(t,3),n=e[0],i=e[1],o=e[2];return i+=90,i*=Math.PI/180,o*=Math.PI/180,{x:n*Math.cos(i)*Math.sin(o),y:n*Math.sin(i)*Math.sin(o),z:n*Math.cos(o)}},e.parseCacheControl=function(t){var e={};if(t.replace(/(?:^|(?:\s*\,\s*))([^\x00-\x20\(\)<>@\,;\:\\"\/\[\]\?\=\{\}\x7F]+)(?:\=(?:([^\x00-\x20\(\)<>@\,;\:\\"\/\[\]\?\=\{\}\x7F]+)|(?:\"((?:[^"\\]|\\.)*)\")))?/g,function(t,n,r,i){var o=r||i;return e[n]=!o||o.toLowerCase(),""}),e["max-age"]){var n=parseInt(e["max-age"],10);isNaN(n)?delete e["max-age"]:e["max-age"]=n}return e}},function(t,e,n){"use strict";(function(e){var r=n(135);
 | 
						||
/*!
 | 
						||
 * The buffer module from node.js, for the browser.
 | 
						||
 *
 | 
						||
 * @author   Feross Aboukhadijeh <feross@feross.org> <http://feross.org>
 | 
						||
 * @license  MIT
 | 
						||
 */function i(t,e){if(t===e)return 0;for(var n=t.length,r=e.length,i=0,o=Math.min(n,r);i<o;++i)if(t[i]!==e[i]){n=t[i],r=e[i];break}return n<r?-1:r<n?1:0}function o(t){return e.Buffer&&"function"==typeof e.Buffer.isBuffer?e.Buffer.isBuffer(t):!(null==t||!t._isBuffer)}var a=n(136),s=Object.prototype.hasOwnProperty,u=Array.prototype.slice,l="foo"===function(){}.name;function c(t){return Object.prototype.toString.call(t)}function f(t){return!o(t)&&("function"==typeof e.ArrayBuffer&&("function"==typeof ArrayBuffer.isView?ArrayBuffer.isView(t):!!t&&(t instanceof DataView||!!(t.buffer&&t.buffer instanceof ArrayBuffer))))}var h=t.exports=g,p=/\s*function\s+([^\(\s]*)\s*/;function d(t){if(a.isFunction(t)){if(l)return t.name;var e=t.toString().match(p);return e&&e[1]}}function y(t,e){return"string"==typeof t?t.length<e?t:t.slice(0,e):t}function m(t){if(l||!a.isFunction(t))return a.inspect(t);var e=d(t);return"[Function"+(e?": "+e:"")+"]"}function v(t,e,n,r,i){throw new h.AssertionError({message:n,actual:t,expected:e,operator:r,stackStartFunction:i})}function g(t,e){t||v(t,!0,e,"==",h.ok)}function b(t,e,n,r){if(t===e)return!0;if(o(t)&&o(e))return 0===i(t,e);if(a.isDate(t)&&a.isDate(e))return t.getTime()===e.getTime();if(a.isRegExp(t)&&a.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(f(t)&&f(e)&&c(t)===c(e)&&!(t instanceof Float32Array||t instanceof Float64Array))return 0===i(new Uint8Array(t.buffer),new Uint8Array(e.buffer));if(o(t)!==o(e))return!1;var s=(r=r||{actual:[],expected:[]}).actual.indexOf(t);return-1!==s&&s===r.expected.indexOf(e)||(r.actual.push(t),r.expected.push(e),function(t,e,n,r){if(null==t||null==e)return!1;if(a.isPrimitive(t)||a.isPrimitive(e))return t===e;if(n&&Object.getPrototypeOf(t)!==Object.getPrototypeOf(e))return!1;var i=x(t),o=x(e);if(i&&!o||!i&&o)return!1;if(i)return t=u.call(t),e=u.call(e),b(t,e,n);var s,l,c=k(t),f=k(e);if(c.length!==f.length)return!1;for(c.sort(),f.sort(),l=c.length-1;l>=0;l--)if(c[l]!==f[l])return!1;for(l=c.length-1;l>=0;l--)if(s=c[l],!b(t[s],e[s],n,r))return!1;return!0}(t,e,n,r))}return n?t===e:t==e}function x(t){return"[object Arguments]"==Object.prototype.toString.call(t)}function _(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 w(t,e,n,r){var i;if("function"!=typeof e)throw new TypeError('"block" argument must be a function');"string"==typeof n&&(r=n,n=null),i=function(t){var e;try{t()}catch(t){e=t}return e}(e),r=(n&&n.name?" ("+n.name+").":".")+(r?" "+r:"."),t&&!i&&v(i,n,"Missing expected exception"+r);var o="string"==typeof r,s=!t&&i&&!n;if((!t&&a.isError(i)&&o&&_(i,n)||s)&&v(i,n,"Got unwanted exception"+r),t&&i&&n&&!_(i,n)||!t&&i)throw i}h.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=function(t){return y(m(t.actual),128)+" "+t.operator+" "+y(m(t.expected),128)}(this),this.generatedMessage=!0);var e=t.stackStartFunction||v;if(Error.captureStackTrace)Error.captureStackTrace(this,e);else{var n=new Error;if(n.stack){var r=n.stack,i=d(e),o=r.indexOf("\n"+i);if(o>=0){var a=r.indexOf("\n",o+1);r=r.substring(a+1)}this.stack=r}}},a.inherits(h.AssertionError,Error),h.fail=v,h.ok=g,h.equal=function(t,e,n){t!=e&&v(t,e,n,"==",h.equal)},h.notEqual=function(t,e,n){t==e&&v(t,e,n,"!=",h.notEqual)},h.deepEqual=function(t,e,n){b(t,e,!1)||v(t,e,n,"deepEqual",h.deepEqual)},h.deepStrictEqual=function(t,e,n){b(t,e,!0)||v(t,e,n,"deepStrictEqual",h.deepStrictEqual)},h.notDeepEqual=function(t,e,n){b(t,e,!1)&&v(t,e,n,"notDeepEqual",h.notDeepEqual)},h.notDeepStrictEqual=function t(e,n,r){b(e,n,!0)&&v(e,n,r,"notDeepStrictEqual",t)},h.strictEqual=function(t,e,n){t!==e&&v(t,e,n,"===",h.strictEqual)},h.notStrictEqual=function(t,e,n){t===e&&v(t,e,n,"!==",h.notStrictEqual)},h.throws=function(t,e,n){w(!0,t,e,n)},h.doesNotThrow=function(t,e,n){w(!1,t,e,n)},h.ifError=function(t){if(t)throw t},h.strict=r(function t(e,n){e||v(e,!0,n,"==",t)},h,{equal:h.strictEqual,deepEqual:h.deepStrictEqual,notEqual:h.notStrictEqual,notDeepEqual:h.notDeepStrictEqual}),h.strict.strict=h.strict;var k=Object.keys||function(t){var e=[];for(var n in t)s.call(t,n)&&e.push(n);return e}}).call(this,n(134))},function(t,e,n){var r=n(5),i=r.performance&&r.performance.now?r.performance.now.bind(r.performance):Date.now.bind(Date),o=r.requestAnimationFrame||r.mozRequestAnimationFrame||r.webkitRequestAnimationFrame||r.msRequestAnimationFrame,a=r.cancelAnimationFrame||r.mozCancelAnimationFrame||r.webkitCancelAnimationFrame||r.msCancelAnimationFrame;t.exports={now:i,frame:function(t){return o(t)},cancelFrame:function(t){return a(t)},getImageData:function(t){var e=r.document.createElement("canvas"),n=e.getContext("2d");if(!n)throw new Error("failed to create canvas 2d context");return e.width=t.width,e.height=t.height,n.drawImage(t,0,0,t.width,t.height),n.getImageData(0,0,t.width,t.height)},hardwareConcurrency:r.navigator.hardwareConcurrency||4,get devicePixelRatio(){return r.devicePixelRatio},supportsWebp:!1};var s=r.document.createElement("img");s.onload=function(){t.exports.supportsWebp=!0},s.src="data:image/webp;base64,UklGRh4AAABXRUJQVlA4TBEAAAAvAQAAAAfQ//73v/+BiOh/AAA="},function(t,e,n){"use strict";function r(t,e){this.x=t,this.y=e}t.exports=r,r.prototype={clone:function(){return new r(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,n=t.y-this.y;return e*e+n*n},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,n=t[2]*this.x+t[3]*this.y;return this.x=e,this.y=n,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),n=Math.sin(t),r=e*this.x-n*this.y,i=n*this.x+e*this.y;return this.x=r,this.y=i,this},_rotateAround:function(t,e){var n=Math.cos(t),r=Math.sin(t),i=e.x+n*(this.x-e.x)-r*(this.y-e.y),o=e.y+r*(this.x-e.x)+n*(this.y-e.y);return this.x=i,this.y=o,this},_round:function(){return this.x=Math.round(this.x),this.y=Math.round(this.y),this}},r.convert=function(t){return t instanceof r?t:Array.isArray(t)?new r(t[0],t[1]):t}},function(t,e,n){function r(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function i(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,r.key,r)}}function o(t,e,n){return e&&i(t.prototype,e),n&&i(t,n),t}var a=n(1),s=n(0),u=s.clone,l=s.extend,c=s.easeCubicInOut,f=n(26),h=n(30).normalizePropertyExpression,p=(n(12),n(11).register),d=function(){function t(e,n){r(this,t),this.property=e,this.value=n,this.expression=h(void 0===n?e.specification.default:n,e.specification)}return o(t,[{key:"isDataDriven",value:function(){return"source"===this.expression.kind||"composite"===this.expression.kind}},{key:"possiblyEvaluate",value:function(t){return this.property.possiblyEvaluate(this,t)}}]),t}(),y=function(){function t(e){r(this,t),this.property=e,this.value=new d(e,void 0)}return o(t,[{key:"transitioned",value:function(t,e){return new v(this.property,this.value,e,l({},t.transition,this.transition),t.now)}},{key:"untransitioned",value:function(){return new v(this.property,this.value,null,{},0)}}]),t}(),m=function(){function t(e){r(this,t),this._properties=e,this._values=Object.create(e.defaultTransitionablePropertyValues)}return o(t,[{key:"getValue",value:function(t){return u(this._values[t].value.value)}},{key:"setValue",value:function(t,e){this._values.hasOwnProperty(t)||(this._values[t]=new y(this._values[t].property)),this._values[t].value=new d(this._values[t].property,null===e?void 0:u(e))}},{key:"getTransition",value:function(t){return u(this._values[t].transition)}},{key:"setTransition",value:function(t,e){this._values.hasOwnProperty(t)||(this._values[t]=new y(this._values[t].property)),this._values[t].transition=u(e)||void 0}},{key:"serialize",value:function(){for(var t={},e=0,n=Object.keys(this._values);e<n.length;e++){var r=n[e],i=this.getValue(r);void 0!==i&&(t[r]=i);var o=this.getTransition(r);void 0!==o&&(t["".concat(r,"-transition")]=o)}return t}},{key:"transitioned",value:function(t,e){for(var n=new g(this._properties),r=0,i=Object.keys(this._values);r<i.length;r++){var o=i[r];n._values[o]=this._values[o].transitioned(t,e._values[o])}return n}},{key:"untransitioned",value:function(){for(var t=new g(this._properties),e=0,n=Object.keys(this._values);e<n.length;e++){var r=n[e];t._values[r]=this._values[r].untransitioned()}return t}}]),t}(),v=function(){function t(e,n,i,o,a){r(this,t),this.property=e,this.value=n,this.begin=a+o.delay||0,this.end=this.begin+o.duration||0,e.specification.transition&&(o.delay||o.duration)&&(this.prior=i)}return o(t,[{key:"possiblyEvaluate",value:function(t){var e=t.now||0,n=this.value.possiblyEvaluate(t),r=this.prior;if(r){if(e>this.end)return this.prior=null,n;if(this.value.isDataDriven())return this.prior=null,n;if(e<this.begin)return r.possiblyEvaluate(t);var i=(e-this.begin)/(this.end-this.begin);return this.property.interpolate(r.possiblyEvaluate(t),n,c(i))}return n}}]),t}(),g=function(){function t(e){r(this,t),this._properties=e,this._values=Object.create(e.defaultTransitioningPropertyValues)}return o(t,[{key:"possiblyEvaluate",value:function(t){for(var e=new _(this._properties),n=0,r=Object.keys(this._values);n<r.length;n++){var i=r[n];e._values[i]=this._values[i].possiblyEvaluate(t)}return e}},{key:"hasTransition",value:function(){for(var t=0,e=Object.keys(this._values);t<e.length;t++){var n=e[t];if(this._values[n].prior)return!0}return!1}}]),t}(),b=function(){function t(e){r(this,t),this._properties=e,this._values=Object.create(e.defaultPropertyValues)}return o(t,[{key:"getValue",value:function(t){return u(this._values[t].value)}},{key:"setValue",value:function(t,e){this._values[t]=new d(this._values[t].property,null===e?void 0:u(e))}},{key:"serialize",value:function(){for(var t={},e=0,n=Object.keys(this._values);e<n.length;e++){var r=n[e],i=this.getValue(r);void 0!==i&&(t[r]=i)}return t}},{key:"possiblyEvaluate",value:function(t){for(var e=new _(this._properties),n=0,r=Object.keys(this._values);n<r.length;n++){var i=r[n];e._values[i]=this._values[i].possiblyEvaluate(t)}return e}}]),t}(),x=function(){function t(e,n,i){r(this,t),this.property=e,this.value=n,this.globals=i}return o(t,[{key:"isConstant",value:function(){return"constant"===this.value.kind}},{key:"constantOr",value:function(t){return"constant"===this.value.kind?this.value.value:t}},{key:"evaluate",value:function(t){return this.property.evaluate(this.value,this.globals,t)}}]),t}(),_=function(){function t(e){r(this,t),this._properties=e,this._values=Object.create(e.defaultPossiblyEvaluatedValues)}return o(t,[{key:"get",value:function(t){return this._values[t]}}]),t}(),w=function(){function t(e){r(this,t),this.specification=e}return o(t,[{key:"possiblyEvaluate",value:function(t,e){return a(!t.isDataDriven()),t.expression.evaluate(e)}},{key:"interpolate",value:function(t,e,n){var r=f[this.specification.type];return r?r(t,e,n):t}}]),t}(),k=function(){function t(e){r(this,t),this.specification=e}return o(t,[{key:"possiblyEvaluate",value:function(t,e){return"constant"===t.expression.kind||"camera"===t.expression.kind?new x(this,{kind:"constant",value:t.expression.evaluate(e)},e):new x(this,t.expression,e)}},{key:"interpolate",value:function(t,e,n){if("constant"!==t.value.kind||"constant"!==e.value.kind)return t;if(void 0!==t.value.value&&void 0!==e.value.value){var r=f[this.specification.type];return r?new x(this,{kind:"constant",value:r(t.value.value,e.value.value,n)},t.globals):t}}},{key:"evaluate",value:function(t,e,n){return"constant"===t.kind?t.value:t.evaluate(e,n)}}]),t}(),S=function(){function t(e){r(this,t),this.specification=e}return o(t,[{key:"possiblyEvaluate",value:function(t,e){if(void 0!==t.value){if("constant"===t.expression.kind){var n=t.expression.evaluate(e);return this._calculate(n,n,n,e)}return a(!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)}}},{key:"_calculate",value:function(t,e,n,r){var i=r.zoom,o=i-Math.floor(i),a=r.crossFadingFactor();return i>r.zoomHistory.lastIntegerZoom?{from:t,to:e,fromScale:2,toScale:1,t:o+(1-o)*a}:{from:n,to:e,fromScale:.5,toScale:1,t:1-(1-a)*o}}},{key:"interpolate",value:function(t){return t}}]),t}(),T=function(){function t(e){r(this,t),this.specification=e}return o(t,[{key:"possiblyEvaluate",value:function(){}},{key:"interpolate",value:function(){}}]),t}();p("DataDrivenProperty",k),p("DataConstantProperty",w),p("CrossFadedProperty",S),p("HeatmapColorProperty",T),t.exports={PropertyValue:d,Transitionable:m,Transitioning:g,Layout:b,PossiblyEvaluatedPropertyValue:x,PossiblyEvaluated:_,DataConstantProperty:w,DataDrivenProperty:k,CrossFadedProperty:S,HeatmapColorProperty:T,Properties:function t(e){for(var n in r(this,t),this.properties=e,this.defaultPropertyValues={},this.defaultTransitionablePropertyValues={},this.defaultTransitioningPropertyValues={},this.defaultPossiblyEvaluatedValues={},e){var i=e[n],o=this.defaultPropertyValues[n]=new d(i,void 0),a=this.defaultTransitionablePropertyValues[n]=new y(i);this.defaultTransitioningPropertyValues[n]=a.untransitioned(),this.defaultPossiblyEvaluatedValues[n]=o.possiblyEvaluate({})}}}},function(t,e){t.exports=self},function(t,e){t.exports=8192},function(t,e){t.exports=function(t,e,n){this.message=(t?"".concat(t,": "):"")+n,null!=e&&e.__line__&&(this.line=e.__line__)}},function(t,e){var n={kind:"null"},r={kind:"number"},i={kind:"string"},o={kind:"boolean"},a={kind:"color"},s={kind:"object"},u={kind:"value"};function l(t,e){return{kind:"array",itemType:t,N:e}}function c(t){if("array"===t.kind){var e=c(t.itemType);return"number"==typeof t.N?"array<".concat(e,", ").concat(t.N,">"):"value"===t.itemType.kind?"array":"array<".concat(e,">")}return t.kind}var f=[n,r,i,o,a,s,l(u)];t.exports={NullType:n,NumberType:r,StringType:i,BooleanType:o,ColorType:a,ObjectType:s,ValueType:u,array:l,ErrorType:{kind:"error"},toString:c,checkSubtype:function t(e,n){if("error"===n.kind)return null;if("array"===e.kind){if("array"===n.kind&&!t(e.itemType,n.itemType)&&("number"!=typeof e.N||e.N===n.N))return null}else{if(e.kind===n.kind)return null;if("value"===e.kind)for(var r=0,i=f;r<i.length;r++)if(!t(i[r],n))return null}return"Expected ".concat(c(e)," but found ").concat(c(n)," instead.")}}},function(t,e,n){var r=n(3),i=n(5);e.create=function(t,e,n){var r=i.document.createElement(t);return e&&(r.className=e),n&&n.appendChild(r),r},e.createNS=function(t,e){return i.document.createElementNS(t,e)};var o=i.document.documentElement.style;function a(t){for(var e=0;e<t.length;e++)if(t[e]in o)return t[e];return t[0]}var s,u=a(["userSelect","MozUserSelect","WebkitUserSelect","msUserSelect"]);e.disableDrag=function(){u&&(s=o[u],o[u]="none")},e.enableDrag=function(){u&&(o[u]=s)};var l=a(["transform","WebkitTransform"]);e.setTransform=function(t,e){t.style[l]=e};var c=function t(e){e.preventDefault(),e.stopPropagation(),i.removeEventListener("click",t,!0)};e.suppressClick=function(){i.addEventListener("click",c,!0),i.setTimeout(function(){i.removeEventListener("click",c,!0)},0)},e.mousePos=function(t,e){var n=t.getBoundingClientRect();return e=e.touches?e.touches[0]:e,new r(e.clientX-n.left-t.clientLeft,e.clientY-n.top-t.clientTop)},e.touchPos=function(t,e){for(var n=t.getBoundingClientRect(),i=[],o="touchend"===e.type?e.changedTouches:e.touches,a=0;a<o.length;a++)i.push(new r(o[a].clientX-n.left-t.clientLeft,o[a].clientY-n.top-t.clientTop));return i},e.remove=function(t){t.parentNode&&t.parentNode.removeChild(t)}},function(t,e,n){function r(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,r.key,r)}}var i=n(0);function o(t,e,n){n[t]=n[t]||[],n[t].push(e)}function a(t,e,n){if(n&&n[t]){var r=n[t].indexOf(e);-1!==r&&n[t].splice(r,1)}}var s=function(){function t(){!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,t)}var e,n,s;return e=t,(n=[{key:"on",value:function(t,e){return this._listeners=this._listeners||{},o(t,e,this._listeners),this}},{key:"off",value:function(t,e){return a(t,e,this._listeners),a(t,e,this._oneTimeListeners),this}},{key:"once",value:function(t,e){return this._oneTimeListeners=this._oneTimeListeners||{},o(t,e,this._oneTimeListeners),this}},{key:"fire",value:function(t,e){if(this.listens(t)){e=i.extend({},e,{type:t,target:this});var n=this._listeners&&this._listeners[t]?this._listeners[t].slice():[],r=!0,o=!1,s=void 0;try{for(var u,l=n[Symbol.iterator]();!(r=(u=l.next()).done);r=!0){u.value.call(this,e)}}catch(t){o=!0,s=t}finally{try{r||null==l.return||l.return()}finally{if(o)throw s}}var c=this._oneTimeListeners&&this._oneTimeListeners[t]?this._oneTimeListeners[t].slice():[],f=!0,h=!1,p=void 0;try{for(var d,y=c[Symbol.iterator]();!(f=(d=y.next()).done);f=!0){var m=d.value;a(t,m,this._oneTimeListeners),m.call(this,e)}}catch(t){h=!0,p=t}finally{try{f||null==y.return||y.return()}finally{if(h)throw p}}this._eventedParent&&this._eventedParent.fire(t,i.extend({},e,"function"==typeof this._eventedParentData?this._eventedParentData():this._eventedParentData))}else i.endsWith(t,"error")&&console.error(e&&e.error||e||"Empty error event");return this}},{key:"listens",value: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)}},{key:"setEventedParent",value:function(t,e){return this._eventedParent=t,this._eventedParentData=e,this}}])&&r(e.prototype,n),s&&r(e,s),t}();t.exports=s},function(t,e,n){function r(t){return(r="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t})(t)}var i=n(1),o=n(102),a=n(12),s=n(30),u=s.StylePropertyFunction,l=s.StyleExpression,c=s.StyleExpressionWithErrorHandling,f=s.ZoomDependentExpression,h=s.ZoomConstantExpression,p=n(42).CompoundExpression,d=n(90),y=n(5).ImageData,m={};function v(t,e){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};i(!m[t],"".concat(t," is already registered.")),Object.defineProperty(e,"_classRegistryKey",{value:t,writeable:!1}),m[t]={klass:e,omit:n.omit||[],shallow:n.shallow||[]}}for(var g in v("Object",Object),o.serialize=function(t,e){var n=t.toArrayBuffer();return e&&e.push(n),n},o.deserialize=function(t){return new o(t)},v("Grid",o),v("Color",a),v("StylePropertyFunction",u),v("StyleExpression",l,{omit:["_evaluator"]}),v("StyleExpressionWithErrorHandling",c,{omit:["_evaluator"]}),v("ZoomDependentExpression",f),v("ZoomConstantExpression",h),v("CompoundExpression",p,{omit:["_evaluate"]}),d)d[g]._classRegistryKey||v("Expression_".concat(g),d[g]);t.exports={register:v,serialize:function t(e,n){if(null==e||"boolean"==typeof e||"number"==typeof e||"string"==typeof e||e instanceof Boolean||e instanceof Number||e instanceof String||e instanceof Date||e instanceof RegExp)return e;if(e instanceof ArrayBuffer)return n&&n.push(e),e;if(ArrayBuffer.isView(e)){var o=e;return n&&n.push(o.buffer),o}if(e instanceof y)return n&&n.push(e.data.buffer),e;if(Array.isArray(e)){var a=[],s=!0,u=!1,l=void 0;try{for(var c,f=e[Symbol.iterator]();!(s=(c=f.next()).done);s=!0){var h=c.value;a.push(t(h,n))}}catch(t){u=!0,l=t}finally{try{s||null==f.return||f.return()}finally{if(u)throw l}}return a}if("object"===r(e)){var p=e.constructor,d=p._classRegistryKey;if(!d)throw new Error("can't serialize object of unregistered class");i(m[d]);var v={};if(p.serialize)v._serialized=p.serialize(e,n);else for(var g in e)if(e.hasOwnProperty(g)&&!(m[d].omit.indexOf(g)>=0)){var b=e[g];v[g]=m[d].shallow.indexOf(g)>=0?b:t(b,n)}return{name:d,properties:v}}throw new Error("can't serialize object of type ".concat(r(e)))},deserialize:function t(e){if(null==e||"boolean"==typeof e||"number"==typeof e||"string"==typeof e||e instanceof Boolean||e instanceof Number||e instanceof String||e instanceof Date||e instanceof RegExp||e instanceof ArrayBuffer||ArrayBuffer.isView(e)||e instanceof y)return e;if(Array.isArray(e))return e.map(function(e){return t(e)});if("object"===r(e)){var n=e,i=n.name,o=n.properties;if(!i)throw new Error("can't deserialize object of anonymous class");var a=m[i].klass;if(!a)throw new Error("can't deserialize unregistered class ".concat(i));if(a.deserialize)return a.deserialize(o._serialized);for(var s=Object.create(a.prototype),u=0,l=Object.keys(o);u<l.length;u++){var c=l[u];s[c]=m[i].shallow.indexOf(c)>=0?o[c]:t(o[c])}return s}throw new Error("can't deserialize object of type ".concat(r(e)))}}},function(t,e,n){function r(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,r.key,r)}}var i=n(80).parseCSSColor,o=function(){function t(e,n,r){var i=arguments.length>3&&void 0!==arguments[3]?arguments[3]:1;!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,t),this.r=e,this.g=n,this.b=r,this.a=i}var e,n,o;return e=t,o=[{key:"parse",value:function(e){if(e){if(e instanceof t)return e;if("string"==typeof e){var n=i(e);if(n)return new t(n[0]/255*n[3],n[1]/255*n[3],n[2]/255*n[3],n[3])}}}}],(n=[{key:"toString",value:function(){var t=this,e=[this.r,this.g,this.b].map(function(e){return Math.round(255*e/t.a)});return"rgba(".concat(e.concat(this.a).join(","),")")}}])&&r(e.prototype,n),o&&r(e,o),t}();o.black=new o(0,0,0,1),o.white=new o(1,1,1,1),o.transparent=new o(0,0,0,0),t.exports=o},function(t,e,n){t.exports=n(140)},function(t,e,n){function r(t){return(r="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t})(t)}function i(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function o(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,r.key,r)}}function a(t,e,n){return e&&o(t.prototype,e),n&&o(t,n),t}function s(t,e){return!e||"object"!==r(e)&&"function"!=typeof e?function(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}(t):e}function u(t){return(u=Object.setPrototypeOf?Object.getPrototypeOf:function(t){return t.__proto__||Object.getPrototypeOf(t)})(t)}function l(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),e&&c(t,e)}function c(t,e){return(c=Object.setPrototypeOf||function(t,e){return t.__proto__=e,t})(t,e)}var f=n(1),h=n(23).StructArray,p=n(23).Struct,d=n(11).register,y=n(3),m=function(t){function e(){return i(this,e),s(this,u(e).apply(this,arguments))}return l(e,h),a(e,[{key:"_refreshViews",value:function(){this.uint8=new Uint8Array(this.arrayBuffer),this.int16=new Int16Array(this.arrayBuffer)}},{key:"emplaceBack",value:function(t,e){var n=this.length;this.resize(n+1);var r=2*n;return this.int16[r+0]=t,this.int16[r+1]=e,n}}]),e}();m.prototype.bytesPerElement=4,d("StructArrayLayout2i4",m);var v=function(t){function e(){return i(this,e),s(this,u(e).apply(this,arguments))}return l(e,h),a(e,[{key:"_refreshViews",value:function(){this.uint8=new Uint8Array(this.arrayBuffer),this.int16=new Int16Array(this.arrayBuffer)}},{key:"emplaceBack",value:function(t,e,n,r){var i=this.length;this.resize(i+1);var o=4*i;return this.int16[o+0]=t,this.int16[o+1]=e,this.int16[o+2]=n,this.int16[o+3]=r,i}}]),e}();v.prototype.bytesPerElement=8,d("StructArrayLayout4i8",v);var g=function(t){function e(){return i(this,e),s(this,u(e).apply(this,arguments))}return l(e,h),a(e,[{key:"_refreshViews",value:function(){this.uint8=new Uint8Array(this.arrayBuffer),this.int16=new Int16Array(this.arrayBuffer)}},{key:"emplaceBack",value:function(t,e,n,r,i,o){var a=this.length;this.resize(a+1);var s=6*a;return this.int16[s+0]=t,this.int16[s+1]=e,this.int16[s+2]=n,this.int16[s+3]=r,this.int16[s+4]=i,this.int16[s+5]=o,a}}]),e}();g.prototype.bytesPerElement=12,d("StructArrayLayout2i4i12",g);var b=function(t){function e(){return i(this,e),s(this,u(e).apply(this,arguments))}return l(e,h),a(e,[{key:"_refreshViews",value:function(){this.uint8=new Uint8Array(this.arrayBuffer),this.int16=new Int16Array(this.arrayBuffer)}},{key:"emplaceBack",value:function(t,e,n,r,i,o,a,s){var u=this.length;this.resize(u+1);var l=6*u,c=12*u;return this.int16[l+0]=t,this.int16[l+1]=e,this.int16[l+2]=n,this.int16[l+3]=r,this.uint8[c+8]=i,this.uint8[c+9]=o,this.uint8[c+10]=a,this.uint8[c+11]=s,u}}]),e}();b.prototype.bytesPerElement=12,d("StructArrayLayout4i4ub12",b);var x=function(t){function e(){return i(this,e),s(this,u(e).apply(this,arguments))}return l(e,h),a(e,[{key:"_refreshViews",value:function(){this.uint8=new Uint8Array(this.arrayBuffer),this.int16=new Int16Array(this.arrayBuffer),this.uint16=new Uint16Array(this.arrayBuffer)}},{key:"emplaceBack",value:function(t,e,n,r,i,o,a,s){var u=this.length;this.resize(u+1);var l=8*u;return this.int16[l+0]=t,this.int16[l+1]=e,this.int16[l+2]=n,this.int16[l+3]=r,this.uint16[l+4]=i,this.uint16[l+5]=o,this.uint16[l+6]=a,this.uint16[l+7]=s,u}}]),e}();x.prototype.bytesPerElement=16,d("StructArrayLayout4i4ui16",x);var _=function(t){function e(){return i(this,e),s(this,u(e).apply(this,arguments))}return l(e,h),a(e,[{key:"_refreshViews",value:function(){this.uint8=new Uint8Array(this.arrayBuffer),this.float32=new Float32Array(this.arrayBuffer)}},{key:"emplaceBack",value:function(t,e,n){var r=this.length;this.resize(r+1);var i=3*r;return this.float32[i+0]=t,this.float32[i+1]=e,this.float32[i+2]=n,r}}]),e}();_.prototype.bytesPerElement=12,d("StructArrayLayout3f12",_);var w=function(t){function e(){return i(this,e),s(this,u(e).apply(this,arguments))}return l(e,h),a(e,[{key:"_refreshViews",value:function(){this.uint8=new Uint8Array(this.arrayBuffer),this.uint32=new Uint32Array(this.arrayBuffer)}},{key:"emplaceBack",value:function(t){var e=this.length;this.resize(e+1);var n=1*e;return this.uint32[n+0]=t,e}}]),e}();w.prototype.bytesPerElement=4,d("StructArrayLayout1ul4",w);var k=function(t){function e(){return i(this,e),s(this,u(e).apply(this,arguments))}return l(e,h),a(e,[{key:"_refreshViews",value:function(){this.uint8=new Uint8Array(this.arrayBuffer),this.int16=new Int16Array(this.arrayBuffer),this.uint32=new Uint32Array(this.arrayBuffer),this.uint16=new Uint16Array(this.arrayBuffer)}},{key:"emplaceBack",value:function(t,e,n,r,i,o,a,s,u,l,c){var f=this.length;this.resize(f+1);var h=12*f,p=6*f;return this.int16[h+0]=t,this.int16[h+1]=e,this.int16[h+2]=n,this.int16[h+3]=r,this.int16[h+4]=i,this.int16[h+5]=o,this.uint32[p+3]=a,this.uint16[h+8]=s,this.uint16[h+9]=u,this.int16[h+10]=l,this.int16[h+11]=c,f}}]),e}();k.prototype.bytesPerElement=24,d("StructArrayLayout6i1ul2ui2i24",k);var S=function(t){function e(){return i(this,e),s(this,u(e).apply(this,arguments))}return l(e,h),a(e,[{key:"_refreshViews",value:function(){this.uint8=new Uint8Array(this.arrayBuffer),this.int16=new Int16Array(this.arrayBuffer)}},{key:"emplaceBack",value:function(t,e,n,r,i,o){var a=this.length;this.resize(a+1);var s=6*a;return this.int16[s+0]=t,this.int16[s+1]=e,this.int16[s+2]=n,this.int16[s+3]=r,this.int16[s+4]=i,this.int16[s+5]=o,a}}]),e}();S.prototype.bytesPerElement=12,d("StructArrayLayout2i2i2i12",S);var T=function(t){function e(){return i(this,e),s(this,u(e).apply(this,arguments))}return l(e,h),a(e,[{key:"_refreshViews",value:function(){this.uint8=new Uint8Array(this.arrayBuffer)}},{key:"emplaceBack",value:function(t,e){var n=this.length;this.resize(n+1);var r=4*n;return this.uint8[r+0]=t,this.uint8[r+1]=e,n}}]),e}();T.prototype.bytesPerElement=4,d("StructArrayLayout2ub4",T);var A=function(t){function e(){return i(this,e),s(this,u(e).apply(this,arguments))}return l(e,h),a(e,[{key:"_refreshViews",value:function(){this.uint8=new Uint8Array(this.arrayBuffer),this.int16=new Int16Array(this.arrayBuffer),this.uint16=new Uint16Array(this.arrayBuffer),this.uint32=new Uint32Array(this.arrayBuffer),this.float32=new Float32Array(this.arrayBuffer)}},{key:"emplaceBack",value:function(t,e,n,r,i,o,a,s,u,l,c,f,h,p){var d=this.length;this.resize(d+1);var y=20*d,m=10*d,v=40*d;return this.int16[y+0]=t,this.int16[y+1]=e,this.uint16[y+2]=n,this.uint16[y+3]=r,this.uint32[m+2]=i,this.uint32[m+3]=o,this.uint32[m+4]=a,this.uint16[y+10]=s,this.uint16[y+11]=u,this.uint16[y+12]=l,this.float32[m+7]=c,this.float32[m+8]=f,this.uint8[v+36]=h,this.uint8[v+37]=p,d}}]),e}();A.prototype.bytesPerElement=40,d("StructArrayLayout2i2ui3ul3ui2f2ub40",A);var E=function(t){function e(){return i(this,e),s(this,u(e).apply(this,arguments))}return l(e,h),a(e,[{key:"_refreshViews",value:function(){this.uint8=new Uint8Array(this.arrayBuffer),this.float32=new Float32Array(this.arrayBuffer)}},{key:"emplaceBack",value:function(t){var e=this.length;this.resize(e+1);var n=1*e;return this.float32[n+0]=t,e}}]),e}();E.prototype.bytesPerElement=4,d("StructArrayLayout1f4",E);var z=function(t){function e(){return i(this,e),s(this,u(e).apply(this,arguments))}return l(e,h),a(e,[{key:"_refreshViews",value:function(){this.uint8=new Uint8Array(this.arrayBuffer),this.int16=new Int16Array(this.arrayBuffer)}},{key:"emplaceBack",value:function(t,e,n){var r=this.length;this.resize(r+1);var i=3*r;return this.int16[i+0]=t,this.int16[i+1]=e,this.int16[i+2]=n,r}}]),e}();z.prototype.bytesPerElement=6,d("StructArrayLayout3i6",z);var C=function(t){function e(){return i(this,e),s(this,u(e).apply(this,arguments))}return l(e,h),a(e,[{key:"_refreshViews",value:function(){this.uint8=new Uint8Array(this.arrayBuffer),this.uint32=new Uint32Array(this.arrayBuffer),this.uint16=new Uint16Array(this.arrayBuffer)}},{key:"emplaceBack",value:function(t,e,n){var r=this.length;this.resize(r+1);var i=2*r,o=4*r;return this.uint32[i+0]=t,this.uint16[o+2]=e,this.uint16[o+3]=n,r}}]),e}();C.prototype.bytesPerElement=8,d("StructArrayLayout1ul2ui8",C);var P=function(t){function e(){return i(this,e),s(this,u(e).apply(this,arguments))}return l(e,h),a(e,[{key:"_refreshViews",value:function(){this.uint8=new Uint8Array(this.arrayBuffer),this.uint16=new Uint16Array(this.arrayBuffer)}},{key:"emplaceBack",value:function(t,e,n){var r=this.length;this.resize(r+1);var i=3*r;return this.uint16[i+0]=t,this.uint16[i+1]=e,this.uint16[i+2]=n,r}}]),e}();P.prototype.bytesPerElement=6,d("StructArrayLayout3ui6",P);var O=function(t){function e(){return i(this,e),s(this,u(e).apply(this,arguments))}return l(e,h),a(e,[{key:"_refreshViews",value:function(){this.uint8=new Uint8Array(this.arrayBuffer),this.uint16=new Uint16Array(this.arrayBuffer)}},{key:"emplaceBack",value:function(t,e){var n=this.length;this.resize(n+1);var r=2*n;return this.uint16[r+0]=t,this.uint16[r+1]=e,n}}]),e}();O.prototype.bytesPerElement=4,d("StructArrayLayout2ui4",O);var I=function(t){function e(){return i(this,e),s(this,u(e).apply(this,arguments))}return l(e,h),a(e,[{key:"_refreshViews",value:function(){this.uint8=new Uint8Array(this.arrayBuffer),this.float32=new Float32Array(this.arrayBuffer)}},{key:"emplaceBack",value:function(t,e){var n=this.length;this.resize(n+1);var r=2*n;return this.float32[r+0]=t,this.float32[r+1]=e,n}}]),e}();I.prototype.bytesPerElement=8,d("StructArrayLayout2f8",I);var j=function(t){function e(){return i(this,e),s(this,u(e).apply(this,arguments))}return l(e,h),a(e,[{key:"_refreshViews",value:function(){this.uint8=new Uint8Array(this.arrayBuffer),this.float32=new Float32Array(this.arrayBuffer)}},{key:"emplaceBack",value:function(t,e,n,r){var i=this.length;this.resize(i+1);var o=4*i;return this.float32[o+0]=t,this.float32[o+1]=e,this.float32[o+2]=n,this.float32[o+3]=r,i}}]),e}();j.prototype.bytesPerElement=16,d("StructArrayLayout4f16",j);var M=function(t){function e(){return i(this,e),s(this,u(e).apply(this,arguments))}return l(e,p),a(e,[{key:"anchorPointX",get:function(){return this._structArray.int16[this._pos2+0]},set:function(t){this._structArray.int16[this._pos2+0]=t}},{key:"anchorPointY",get:function(){return this._structArray.int16[this._pos2+1]},set:function(t){this._structArray.int16[this._pos2+1]=t}},{key:"x1",get:function(){return this._structArray.int16[this._pos2+2]},set:function(t){this._structArray.int16[this._pos2+2]=t}},{key:"y1",get:function(){return this._structArray.int16[this._pos2+3]},set:function(t){this._structArray.int16[this._pos2+3]=t}},{key:"x2",get:function(){return this._structArray.int16[this._pos2+4]},set:function(t){this._structArray.int16[this._pos2+4]=t}},{key:"y2",get:function(){return this._structArray.int16[this._pos2+5]},set:function(t){this._structArray.int16[this._pos2+5]=t}},{key:"featureIndex",get:function(){return this._structArray.uint32[this._pos4+3]},set:function(t){this._structArray.uint32[this._pos4+3]=t}},{key:"sourceLayerIndex",get:function(){return this._structArray.uint16[this._pos2+8]},set:function(t){this._structArray.uint16[this._pos2+8]=t}},{key:"bucketIndex",get:function(){return this._structArray.uint16[this._pos2+9]},set:function(t){this._structArray.uint16[this._pos2+9]=t}},{key:"radius",get:function(){return this._structArray.int16[this._pos2+10]},set:function(t){this._structArray.int16[this._pos2+10]=t}},{key:"signedDistanceFromAnchor",get:function(){return this._structArray.int16[this._pos2+11]},set:function(t){this._structArray.int16[this._pos2+11]=t}},{key:"anchorPoint",get:function(){return new y(this.anchorPointX,this.anchorPointY)}}]),e}();M.prototype.size=24;var L=function(t){function e(){return i(this,e),s(this,u(e).apply(this,arguments))}return l(e,k),a(e,[{key:"get",value:function(t){return f(!this.isTransferred),new M(this,t)}}]),e}();d("CollisionBoxArray",L);var B=function(t){function e(){return i(this,e),s(this,u(e).apply(this,arguments))}return l(e,p),a(e,[{key:"anchorX",get:function(){return this._structArray.int16[this._pos2+0]},set:function(t){this._structArray.int16[this._pos2+0]=t}},{key:"anchorY",get:function(){return this._structArray.int16[this._pos2+1]},set:function(t){this._structArray.int16[this._pos2+1]=t}},{key:"glyphStartIndex",get:function(){return this._structArray.uint16[this._pos2+2]},set:function(t){this._structArray.uint16[this._pos2+2]=t}},{key:"numGlyphs",get:function(){return this._structArray.uint16[this._pos2+3]},set:function(t){this._structArray.uint16[this._pos2+3]=t}},{key:"vertexStartIndex",get:function(){return this._structArray.uint32[this._pos4+2]},set:function(t){this._structArray.uint32[this._pos4+2]=t}},{key:"lineStartIndex",get:function(){return this._structArray.uint32[this._pos4+3]},set:function(t){this._structArray.uint32[this._pos4+3]=t}},{key:"lineLength",get:function(){return this._structArray.uint32[this._pos4+4]},set:function(t){this._structArray.uint32[this._pos4+4]=t}},{key:"segment",get:function(){return this._structArray.uint16[this._pos2+10]},set:function(t){this._structArray.uint16[this._pos2+10]=t}},{key:"lowerSize",get:function(){return this._structArray.uint16[this._pos2+11]},set:function(t){this._structArray.uint16[this._pos2+11]=t}},{key:"upperSize",get:function(){return this._structArray.uint16[this._pos2+12]},set:function(t){this._structArray.uint16[this._pos2+12]=t}},{key:"lineOffsetX",get:function(){return this._structArray.float32[this._pos4+7]},set:function(t){this._structArray.float32[this._pos4+7]=t}},{key:"lineOffsetY",get:function(){return this._structArray.float32[this._pos4+8]},set:function(t){this._structArray.float32[this._pos4+8]=t}},{key:"writingMode",get:function(){return this._structArray.uint8[this._pos1+36]},set:function(t){this._structArray.uint8[this._pos1+36]=t}},{key:"hidden",get:function(){return this._structArray.uint8[this._pos1+37]},set:function(t){this._structArray.uint8[this._pos1+37]=t}}]),e}();B.prototype.size=40;var R=function(t){function e(){return i(this,e),s(this,u(e).apply(this,arguments))}return l(e,A),a(e,[{key:"get",value:function(t){return f(!this.isTransferred),new B(this,t)}}]),e}();d("PlacedSymbolArray",R);var D=function(t){function e(){return i(this,e),s(this,u(e).apply(this,arguments))}return l(e,p),a(e,[{key:"offsetX",get:function(){return this._structArray.float32[this._pos4+0]},set:function(t){this._structArray.float32[this._pos4+0]=t}}]),e}();D.prototype.size=4;var F=function(t){function e(){return i(this,e),s(this,u(e).apply(this,arguments))}return l(e,E),a(e,[{key:"getoffsetX",value:function(t){return this.float32[1*t+0]}},{key:"get",value:function(t){return f(!this.isTransferred),new D(this,t)}}]),e}();d("GlyphOffsetArray",F);var V=function(t){function e(){return i(this,e),s(this,u(e).apply(this,arguments))}return l(e,p),a(e,[{key:"x",get:function(){return this._structArray.int16[this._pos2+0]},set:function(t){this._structArray.int16[this._pos2+0]=t}},{key:"y",get:function(){return this._structArray.int16[this._pos2+1]},set:function(t){this._structArray.int16[this._pos2+1]=t}},{key:"tileUnitDistanceFromAnchor",get:function(){return this._structArray.int16[this._pos2+2]},set:function(t){this._structArray.int16[this._pos2+2]=t}}]),e}();V.prototype.size=6;var N=function(t){function e(){return i(this,e),s(this,u(e).apply(this,arguments))}return l(e,z),a(e,[{key:"getx",value:function(t){return this.int16[3*t+0]}},{key:"gety",value:function(t){return this.int16[3*t+1]}},{key:"gettileUnitDistanceFromAnchor",value:function(t){return this.int16[3*t+2]}},{key:"get",value:function(t){return f(!this.isTransferred),new V(this,t)}}]),e}();d("SymbolLineVertexArray",N);var q=function(t){function e(){return i(this,e),s(this,u(e).apply(this,arguments))}return l(e,p),a(e,[{key:"featureIndex",get:function(){return this._structArray.uint32[this._pos4+0]},set:function(t){this._structArray.uint32[this._pos4+0]=t}},{key:"sourceLayerIndex",get:function(){return this._structArray.uint16[this._pos2+2]},set:function(t){this._structArray.uint16[this._pos2+2]=t}},{key:"bucketIndex",get:function(){return this._structArray.uint16[this._pos2+3]},set:function(t){this._structArray.uint16[this._pos2+3]=t}}]),e}();q.prototype.size=8;var U=function(t){function e(){return i(this,e),s(this,u(e).apply(this,arguments))}return l(e,C),a(e,[{key:"get",value:function(t){return f(!this.isTransferred),new q(this,t)}}]),e}();d("FeatureIndexArray",U),t.exports={StructArrayLayout2i4:m,StructArrayLayout4i8:v,StructArrayLayout2i4i12:g,StructArrayLayout4i4ub12:b,StructArrayLayout4i4ui16:x,StructArrayLayout3f12:_,StructArrayLayout1ul4:w,StructArrayLayout6i1ul2ui2i24:k,StructArrayLayout2i2i2i12:S,StructArrayLayout2ub4:T,StructArrayLayout2i2ui3ul3ui2f2ub40:A,StructArrayLayout1f4:E,StructArrayLayout3i6:z,StructArrayLayout1ul2ui8:C,StructArrayLayout3ui6:P,StructArrayLayout2ui4:O,StructArrayLayout2f8:I,StructArrayLayout4f16:j,PosArray:m,RasterBoundsArray:v,CircleLayoutArray:m,FillLayoutArray:m,FillExtrusionLayoutArray:g,HeatmapLayoutArray:m,LineLayoutArray:b,SymbolLayoutArray:x,SymbolDynamicLayoutArray:_,SymbolOpacityArray:w,CollisionBoxLayoutArray:S,CollisionCircleLayoutArray:S,CollisionVertexArray:T,TriangleIndexArray:P,LineIndexArray:O,CollisionBoxArray:L,PlacedSymbolArray:R,GlyphOffsetArray:F,SymbolLineVertexArray:N,FeatureIndexArray:U}},function(t,e){var n=function t(e,n,r){!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,t),this.func=e,this.mask=n,this.range=r};n.ReadOnly=!1,n.ReadWrite=!0,n.disabled=new n(519,n.ReadOnly,[0,1]),t.exports=n},function(t,e,n){function r(t){return(r="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t})(t)}function i(t,e){return!e||"object"!==r(e)&&"function"!=typeof e?function(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}(t):e}function o(t){var e="function"==typeof Map?new Map:void 0;return(o=function(t){if(null===t||(n=t,-1===Function.toString.call(n).indexOf("[native code]")))return t;var n;if("function"!=typeof t)throw new TypeError("Super expression must either be null or a function");if(void 0!==e){if(e.has(t))return e.get(t);e.set(t,r)}function r(){return a(t,arguments,u(this).constructor)}return r.prototype=Object.create(t.prototype,{constructor:{value:r,enumerable:!1,writable:!0,configurable:!0}}),s(r,t)})(t)}function a(t,e,n){return(a=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],function(){})),!0}catch(t){return!1}}()?Reflect.construct:function(t,e,n){var r=[null];r.push.apply(r,e);var i=new(Function.bind.apply(t,r));return n&&s(i,n.prototype),i}).apply(null,arguments)}function s(t,e){return(s=Object.setPrototypeOf||function(t,e){return t.__proto__=e,t})(t,e)}function u(t){return(u=Object.setPrototypeOf?Object.getPrototypeOf:function(t){return t.__proto__||Object.getPrototypeOf(t)})(t)}var l=n(5),c={Unknown:"Unknown",Style:"Style",Source:"Source",Tile:"Tile",Glyphs:"Glyphs",SpriteImage:"SpriteImage",SpriteJSON:"SpriteJSON",Image:"Image"};e.ResourceType=c,"function"==typeof Object.freeze&&Object.freeze(c);var f=function(t){function e(t,n){var r;return function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,e),(r=i(this,u(e).call(this,t))).status=n,r}return function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),e&&s(t,e)}(e,o(Error)),e}();function h(t){var e=new l.XMLHttpRequest;for(var n in e.open("GET",t.url,!0),t.headers)e.setRequestHeader(n,t.headers[n]);return e.withCredentials="include"===t.credentials,e}e.getJSON=function(t,e){var n=h(t);return n.setRequestHeader("Accept","application/json"),n.onerror=function(){e(new Error(n.statusText))},n.onload=function(){if(n.status>=200&&n.status<300&&n.response){var t;try{t=JSON.parse(n.response)}catch(t){return e(t)}e(null,t)}else e(new f(n.statusText,n.status))},n.send(),n},e.getArrayBuffer=function(t,e){var n=h(t);return n.responseType="arraybuffer",n.onerror=function(){e(new Error(n.statusText))},n.onload=function(){var t=n.response;if(0===t.byteLength&&200===n.status)return e(new Error("http status 200 returned without content."));n.status>=200&&n.status<300&&n.response?e(null,{data:t,cacheControl:n.getResponseHeader("Cache-Control"),expires:n.getResponseHeader("Expires")}):e(new f(n.statusText,n.status))},n.send(),n};e.getImage=function(t,n){return e.getArrayBuffer(t,function(t,e){if(t)n(t);else if(e){var r=new l.Image,i=l.URL||l.webkitURL;r.onload=function(){n(null,r),i.revokeObjectURL(r.src)};var o=new l.Blob([new Uint8Array(e.data)],{type:"image/png"});r.cacheControl=e.cacheControl,r.expires=e.expires,r.src=e.data.byteLength?i.createObjectURL(o):"data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAEAAAABCAYAAAAfFcSJAAAAC0lEQVQYV2NgAAIAAAUAAarVyFEAAAAASUVORK5CYII="}})},e.getVideo=function(t,e){var n,r,i=l.document.createElement("video");i.onloadstart=function(){e(null,i)};for(var o=0;o<t.length;o++){var a=l.document.createElement("source");n=t[o],r=void 0,(r=l.document.createElement("a")).href=n,(r.protocol!==l.document.location.protocol||r.host!==l.document.location.host)&&(i.crossOrigin="Anonymous"),a.src=t[o],i.appendChild(a)}return i}},function(t,e){function n(t){return(n="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t})(t)}t.exports=function(t){return t instanceof Number?"number":t instanceof String?"string":t instanceof Boolean?"boolean":Array.isArray(t)?"array":null===t?"null":n(t)}},function(t,e){var n=function t(e,n,r,i,o,a){!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,t),this.test=e,this.ref=n,this.mask=r,this.fail=i,this.depthFail=o,this.pass=a};n.disabled=new n({func:519,mask:0},0,0,7680,7680,7680),t.exports=n},function(t,e,n){function r(t){return(r="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t})(t)}function i(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,r.key,r)}}function o(t,e){return!e||"object"!==r(e)&&"function"!=typeof e?function(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}(t):e}function a(t){return(a=Object.setPrototypeOf?Object.getPrototypeOf:function(t){return t.__proto__||Object.getPrototypeOf(t)})(t)}function s(t,e){return(s=Object.setPrototypeOf||function(t,e){return t.__proto__=e,t})(t,e)}var u=n(0),l=n(13),c=n(54),f=n(10),h=n(4),p=h.Layout,d=h.Transitionable,y=(h.Transitioning,h.Properties,function(t){function e(t,n){var r;for(var i in function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,e),(r=o(this,a(e).call(this))).id=t.id,r.metadata=t.metadata,r.type=t.type,r.minzoom=t.minzoom,r.maxzoom=t.maxzoom,r.visibility="visible","background"!==t.type&&(r.source=t.source,r.sourceLayer=t["source-layer"],r.filter=t.filter),r._featureFilter=function(){return!0},n.layout&&(r._unevaluatedLayout=new p(n.layout)),r._transitionablePaint=new d(n.paint),t.paint)r.setPaintProperty(i,t.paint[i],{validate:!1});for(var s in t.layout)r.setLayoutProperty(s,t.layout[s],{validate:!1});return r._transitioningPaint=r._transitionablePaint.untransitioned(),r}var n,r,h;return function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),e&&s(t,e)}(e,f),n=e,(r=[{key:"getLayoutProperty",value:function(t){return"visibility"===t?this.visibility:this._unevaluatedLayout.getValue(t)}},{key:"setLayoutProperty",value:function(t,e,n){if(null!=e){var r="layers.".concat(this.id,".layout.").concat(t);if(this._validate(c.layoutProperty,r,t,e,n))return}"visibility"!==t?this._unevaluatedLayout.setValue(t,e):this.visibility="none"===e?e:"visible"}},{key:"getPaintProperty",value:function(t){return u.endsWith(t,"-transition")?this._transitionablePaint.getTransition(t.slice(0,-"-transition".length)):this._transitionablePaint.getValue(t)}},{key:"setPaintProperty",value:function(t,e,n){if(null!=e){var r="layers.".concat(this.id,".paint.").concat(t);if(this._validate(c.paintProperty,r,t,e,n))return}u.endsWith(t,"-transition")?this._transitionablePaint.setTransition(t.slice(0,-"-transition".length),e||void 0):this._transitionablePaint.setValue(t,e)}},{key:"isHidden",value:function(t){return!!(this.minzoom&&t<this.minzoom)||(!!(this.maxzoom&&t>=this.maxzoom)||"none"===this.visibility)}},{key:"updateTransitions",value:function(t){this._transitioningPaint=this._transitionablePaint.transitioned(t,this._transitioningPaint)}},{key:"hasTransition",value:function(){return this._transitioningPaint.hasTransition()}},{key:"recalculate",value:function(t){this._unevaluatedLayout&&(this.layout=this._unevaluatedLayout.possiblyEvaluate(t)),this.paint=this._transitioningPaint.possiblyEvaluate(t)}},{key:"serialize",value: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"),u.filterObject(t,function(t,e){return!(void 0===t||"layout"===e&&!Object.keys(t).length||"paint"===e&&!Object.keys(t).length)})}},{key:"_validate",value:function(t,e,n,r,i){return(!i||!1!==i.validate)&&c.emitErrors(this,t.call(c,{key:e,layerType:this.type,objectKey:n,value:r,styleSpec:l,style:{glyphs:!0,sprite:!0}}))}},{key:"hasOffscreenPass",value:function(){return!1}},{key:"resize",value:function(){}}])&&i(n.prototype,r),h&&i(n,h),e}());t.exports=y;var m={circle:n(151),heatmap:n(155),hillshade:n(158),fill:n(160),"fill-extrusion":n(165),line:n(169),symbol:n(174),background:n(180),raster:n(182)};y.create=function(t){return new m[t.type](t)}},function(t,e,n){function r(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,r.key,r)}}var i=n(5),o=i.HTMLImageElement,a=i.HTMLCanvasElement,s=i.HTMLVideoElement,u=i.ImageData,l=function(){function t(e,n,r,i){!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,t),this.context=e;var o=n.width,a=n.height;this.size=[o,a],this.format=r,this.texture=e.gl.createTexture(),this.update(n,i)}var e,n,i;return e=t,(n=[{key:"update",value:function(t,e){var n=t.width,r=t.height;this.size=[n,r];var i=this.context,l=i.gl;l.bindTexture(l.TEXTURE_2D,this.texture),i.pixelStoreUnpack.set(1),this.format===l.RGBA&&!1!==e&&i.pixelStoreUnpackPremultiplyAlpha.set(!0),t instanceof o||t instanceof a||t instanceof s||t instanceof u?l.texImage2D(l.TEXTURE_2D,0,this.format,this.format,l.UNSIGNED_BYTE,t):l.texImage2D(l.TEXTURE_2D,0,this.format,n,r,0,this.format,l.UNSIGNED_BYTE,t.data)}},{key:"bind",value:function(t,e,n){var r=this.context.gl;r.bindTexture(r.TEXTURE_2D,this.texture),t!==this.filter&&(r.texParameteri(r.TEXTURE_2D,r.TEXTURE_MAG_FILTER,t),r.texParameteri(r.TEXTURE_2D,r.TEXTURE_MIN_FILTER,n||t),this.filter=t),e!==this.wrap&&(r.texParameteri(r.TEXTURE_2D,r.TEXTURE_WRAP_S,e),r.texParameteri(r.TEXTURE_2D,r.TEXTURE_WRAP_T,e),this.wrap=e)}},{key:"destroy",value:function(){this.context.gl.deleteTexture(this.texture),this.texture=null}}])&&r(e.prototype,n),i&&r(e,i),t}();t.exports=l},function(t,e,n){function r(t){return(r="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t})(t)}function i(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,r.key,r)}}var o=n(0).wrap,a=function(){function t(e,n){if(function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,t),isNaN(e)||isNaN(n))throw new Error("Invalid LngLat object: (".concat(e,", ").concat(n,")"));if(this.lng=+e,this.lat=+n,this.lat>90||this.lat<-90)throw new Error("Invalid LngLat latitude value: must be between -90 and 90")}var e,a,s;return e=t,s=[{key:"convert",value:function(e){if(e instanceof t)return e;if(Array.isArray(e)&&(2===e.length||3===e.length))return new t(Number(e[0]),Number(e[1]));if(!Array.isArray(e)&&"object"===r(e)&&null!==e)return new t(Number(e.lng),Number(e.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>]")}}],(a=[{key:"wrap",value:function(){return new t(o(this.lng,-180,180),this.lat)}},{key:"toArray",value:function(){return[this.lng,this.lat]}},{key:"toString",value:function(){return"LngLat(".concat(this.lng,", ").concat(this.lat,")")}},{key:"toBounds",value:function(e){var r=360*e/40075017,i=r/Math.cos(Math.PI/180*this.lat);return new(n(39))(new t(this.lng-i,this.lat-r),new t(this.lng+i,this.lat+r))}}])&&i(e.prototype,a),s&&i(e,s),t}();t.exports=a},function(t,e,n){t.exports=function(){"use strict";var t;return(t=new Float32Array(3))[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}(),{vec3:{transformMat3:function(t,e,n){var r=e[0],i=e[1],o=e[2];return t[0]=r*n[0]+i*n[3]+o*n[6],t[1]=r*n[1]+i*n[4]+o*n[7],t[2]=r*n[2]+i*n[5]+o*n[8],t}},vec4:{transformMat4:function(t,e,n){var r=e[0],i=e[1],o=e[2],a=e[3];return t[0]=n[0]*r+n[4]*i+n[8]*o+n[12]*a,t[1]=n[1]*r+n[5]*i+n[9]*o+n[13]*a,t[2]=n[2]*r+n[6]*i+n[10]*o+n[14]*a,t[3]=n[3]*r+n[7]*i+n[11]*o+n[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,n){var r=e[0],i=e[1],o=e[2],a=e[3],s=Math.sin(n),u=Math.cos(n);return t[0]=r*u+o*s,t[1]=i*u+a*s,t[2]=r*-s+o*u,t[3]=i*-s+a*u,t},scale:function(t,e,n){var r=e[0],i=e[1],o=e[2],a=e[3],s=n[0],u=n[1];return t[0]=r*s,t[1]=i*s,t[2]=o*u,t[3]=a*u,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 n=Math.sin(e),r=Math.cos(e);return t[0]=r,t[1]=n,t[2]=0,t[3]=-n,t[4]=r,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,n){var r,i,o,a,s,u,l,c,f,h,p,d,y=n[0],m=n[1],v=n[2];return e===t?(t[12]=e[0]*y+e[4]*m+e[8]*v+e[12],t[13]=e[1]*y+e[5]*m+e[9]*v+e[13],t[14]=e[2]*y+e[6]*m+e[10]*v+e[14],t[15]=e[3]*y+e[7]*m+e[11]*v+e[15]):(r=e[0],i=e[1],o=e[2],a=e[3],s=e[4],u=e[5],l=e[6],c=e[7],f=e[8],h=e[9],p=e[10],d=e[11],t[0]=r,t[1]=i,t[2]=o,t[3]=a,t[4]=s,t[5]=u,t[6]=l,t[7]=c,t[8]=f,t[9]=h,t[10]=p,t[11]=d,t[12]=r*y+s*m+f*v+e[12],t[13]=i*y+u*m+h*v+e[13],t[14]=o*y+l*m+p*v+e[14],t[15]=a*y+c*m+d*v+e[15]),t},scale:function(t,e,n){var r=n[0],i=n[1],o=n[2];return t[0]=e[0]*r,t[1]=e[1]*r,t[2]=e[2]*r,t[3]=e[3]*r,t[4]=e[4]*i,t[5]=e[5]*i,t[6]=e[6]*i,t[7]=e[7]*i,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,n){var r=e[0],i=e[1],o=e[2],a=e[3],s=e[4],u=e[5],l=e[6],c=e[7],f=e[8],h=e[9],p=e[10],d=e[11],y=e[12],m=e[13],v=e[14],g=e[15],b=n[0],x=n[1],_=n[2],w=n[3];return t[0]=b*r+x*s+_*f+w*y,t[1]=b*i+x*u+_*h+w*m,t[2]=b*o+x*l+_*p+w*v,t[3]=b*a+x*c+_*d+w*g,b=n[4],x=n[5],_=n[6],w=n[7],t[4]=b*r+x*s+_*f+w*y,t[5]=b*i+x*u+_*h+w*m,t[6]=b*o+x*l+_*p+w*v,t[7]=b*a+x*c+_*d+w*g,b=n[8],x=n[9],_=n[10],w=n[11],t[8]=b*r+x*s+_*f+w*y,t[9]=b*i+x*u+_*h+w*m,t[10]=b*o+x*l+_*p+w*v,t[11]=b*a+x*c+_*d+w*g,b=n[12],x=n[13],_=n[14],w=n[15],t[12]=b*r+x*s+_*f+w*y,t[13]=b*i+x*u+_*h+w*m,t[14]=b*o+x*l+_*p+w*v,t[15]=b*a+x*c+_*d+w*g,t},perspective:function(t,e,n,r,i){var o=1/Math.tan(e/2),a=1/(r-i);return t[0]=o/n,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]=(i+r)*a,t[11]=-1,t[12]=0,t[13]=0,t[14]=2*i*r*a,t[15]=0,t},rotateX:function(t,e,n){var r=Math.sin(n),i=Math.cos(n),o=e[4],a=e[5],s=e[6],u=e[7],l=e[8],c=e[9],f=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*i+l*r,t[5]=a*i+c*r,t[6]=s*i+f*r,t[7]=u*i+h*r,t[8]=l*i-o*r,t[9]=c*i-a*r,t[10]=f*i-s*r,t[11]=h*i-u*r,t},rotateZ:function(t,e,n){var r=Math.sin(n),i=Math.cos(n),o=e[0],a=e[1],s=e[2],u=e[3],l=e[4],c=e[5],f=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*i+l*r,t[1]=a*i+c*r,t[2]=s*i+f*r,t[3]=u*i+h*r,t[4]=l*i-o*r,t[5]=c*i-a*r,t[6]=f*i-s*r,t[7]=h*i-u*r,t},invert:function(t,e){var n=e[0],r=e[1],i=e[2],o=e[3],a=e[4],s=e[5],u=e[6],l=e[7],c=e[8],f=e[9],h=e[10],p=e[11],d=e[12],y=e[13],m=e[14],v=e[15],g=n*s-r*a,b=n*u-i*a,x=n*l-o*a,_=r*u-i*s,w=r*l-o*s,k=i*l-o*u,S=c*y-f*d,T=c*m-h*d,A=c*v-p*d,E=f*m-h*y,z=f*v-p*y,C=h*v-p*m,P=g*C-b*z+x*E+_*A-w*T+k*S;return P?(P=1/P,t[0]=(s*C-u*z+l*E)*P,t[1]=(i*z-r*C-o*E)*P,t[2]=(y*k-m*w+v*_)*P,t[3]=(h*w-f*k-p*_)*P,t[4]=(u*A-a*C-l*T)*P,t[5]=(n*C-i*A+o*T)*P,t[6]=(m*x-d*k-v*b)*P,t[7]=(c*k-h*x+p*b)*P,t[8]=(a*z-s*A+l*S)*P,t[9]=(r*A-n*z-o*S)*P,t[10]=(d*w-y*x+v*g)*P,t[11]=(f*x-c*w-p*g)*P,t[12]=(s*T-a*E-u*S)*P,t[13]=(n*E-r*T+i*S)*P,t[14]=(y*b-d*_-m*g)*P,t[15]=(c*_-f*b+h*g)*P,t):null},ortho:function(t,e,n,r,i,o,a){var s=1/(e-n),u=1/(r-i),l=1/(o-a);return t[0]=-2*s,t[1]=0,t[2]=0,t[3]=0,t[4]=0,t[5]=-2*u,t[6]=0,t[7]=0,t[8]=0,t[9]=0,t[10]=2*l,t[11]=0,t[12]=(e+n)*s,t[13]=(i+r)*u,t[14]=(a+o)*l,t[15]=1,t}}}}()},function(t,e,n){function r(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,r.key,r)}}function i(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}var o=n(1),a={Int8:Int8Array,Uint8:Uint8Array,Int16:Int16Array,Uint16:Uint16Array,Int32:Int32Array,Uint32:Uint32Array,Float32:Float32Array},s=function(){function t(){i(this,t),this.isTransferred=!1,this.capacity=-1,this.resize(0)}var e,n,a;return e=t,a=[{key:"serialize",value:function(t,e){return o(!t.isTransferred),t._trim(),e&&(t.isTransferred=!0,e.push(t.arrayBuffer)),{length:t.length,arrayBuffer:t.arrayBuffer}}},{key:"deserialize",value:function(t){var e=Object.create(this.prototype);return e.arrayBuffer=t.arrayBuffer,e.length=t.length,e.capacity=t.arrayBuffer.byteLength/e.bytesPerElement,e._refreshViews(),e}}],(n=[{key:"_trim",value:function(){this.length!==this.capacity&&(this.capacity=this.length,this.arrayBuffer=this.arrayBuffer.slice(0,this.length*this.bytesPerElement),this._refreshViews())}},{key:"clear",value:function(){this.length=0}},{key:"resize",value:function(t){o(!this.isTransferred),this.reserve(t),this.length=t}},{key:"reserve",value:function(t){if(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)}}},{key:"_refreshViews",value:function(){throw new Error("_refreshViews() must be implemented by each concrete StructArray layout")}}])&&r(e.prototype,n),a&&r(e,a),t}();function u(t,e){return Math.ceil(t/e)*e}t.exports.StructArray=s,t.exports.Struct=function t(e,n){i(this,t),this._structArray=e,this._pos1=n*this.size,this._pos2=this._pos1/2,this._pos4=this._pos1/4,this._pos8=this._pos1/8},t.exports.viewTypes=a,t.exports.createLayout=function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:1,n=0,r=0;return{members:t.map(function(t){o(t.name.length);var i,s=(i=t.type,a[i].BYTES_PER_ELEMENT),l=n=u(n,Math.max(e,s)),c=t.components||1;return r=Math.max(r,s),n+=s*c,{name:t.name,type:t.type,components:c,offset:l}}),size:u(n,Math.max(r,e)),alignment:e}}},function(t,e){function n(t){return t instanceof Number||t instanceof String||t instanceof Boolean?t.valueOf():t}t.exports=n,t.exports.deep=function t(e){return Array.isArray(e)?e.map(t):n(e)}},function(t,e,n){function r(t){return(r="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t})(t)}var i=n(1),o=n(12),a=n(8),s=a.NullType,u=a.NumberType,l=a.StringType,c=a.BooleanType,f=a.ColorType,h=a.ObjectType,p=a.ValueType,d=a.array;t.exports={Color:o,validateRGBA:function(t,e,n,r){return"number"==typeof t&&t>=0&&t<=255&&"number"==typeof e&&e>=0&&e<=255&&"number"==typeof n&&n>=0&&n<=255?void 0===r||"number"==typeof r&&r>=0&&r<=1?null:"Invalid rgba value [".concat([t,e,n,r].join(", "),"]: 'a' must be between 0 and 1."):"Invalid rgba value [".concat(("number"==typeof r?[t,e,n,r]:[t,e,n]).join(", "),"]: 'r', 'g', and 'b' must be between 0 and 255.")},isValue:function t(e){if(null===e)return!0;if("string"==typeof e)return!0;if("boolean"==typeof e)return!0;if("number"==typeof e)return!0;if(e instanceof o)return!0;if(Array.isArray(e)){var n=!0,i=!1,a=void 0;try{for(var s,u=e[Symbol.iterator]();!(n=(s=u.next()).done);n=!0)if(!t(s.value))return!1}catch(t){i=!0,a=t}finally{try{n||null==u.return||u.return()}finally{if(i)throw a}}return!0}if("object"===r(e)){for(var l in e)if(!t(e[l]))return!1;return!0}return!1},typeOf:function t(e){if(null===e)return s;if("string"==typeof e)return l;if("boolean"==typeof e)return c;if("number"==typeof e)return u;if(e instanceof o)return f;if(Array.isArray(e)){var n,a=e.length,y=!0,m=!1,v=void 0;try{for(var g,b=e[Symbol.iterator]();!(y=(g=b.next()).done);y=!0){var x=t(g.value);if(n){if(n===x)continue;n=p;break}n=x}}catch(t){m=!0,v=t}finally{try{y||null==b.return||b.return()}finally{if(m)throw v}}return d(n||p,a)}return i("object"===r(e)),h}}},function(t,e,n){var r=n(12);function i(t,e,n){return t*(1-n)+e*n}t.exports={number:i,color:function(t,e,n){return new r(i(t.r,e.r,n),i(t.g,e.g,n),i(t.b,e.b,n),i(t.a,e.a,n))},array:function(t,e,n){return t.map(function(t,r){return i(t,e[r],n)})}}},function(t,e,n){function r(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function i(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,r.key,r)}}function o(t,e,n){return e&&i(t.prototype,e),n&&i(t,n),t}var a=n(198),s=n(1),u=n(11).register,l=n(35),c=function(){function t(e,n,i){r(this,t),s(e>=0&&e<=25),s(n>=0&&n<Math.pow(2,e)),s(i>=0&&i<Math.pow(2,e)),this.z=e,this.x=n,this.y=i,this.key=p(0,e,n,i)}return o(t,[{key:"equals",value:function(t){return this.z===t.z&&this.x===t.x&&this.y===t.y}},{key:"url",value:function(t,e){var n=a.getTileBBox(this.x,this.y,this.z),r=function(t,e,n){for(var r,i="",o=t;o>0;o--)i+=(e&(r=1<<o-1)?1:0)+(n&r?2:0);return i}(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(this.z)).replace("{x}",String(this.x)).replace("{y}",String("tms"===e?Math.pow(2,this.z)-this.y-1:this.y)).replace("{quadkey}",r).replace("{bbox-epsg-3857}",n)}}]),t}(),f=function t(e,n,i){r(this,t),this.wrap=e,this.canonical=n,this.key=p(e,n.z,n.x,n.y),this.posMatrix=i},h=function(){function t(e,n,i,o,a){r(this,t),s(e>=i),this.overscaledZ=e,this.wrap=n,this.canonical=new c(i,+o,+a),this.key=p(n,e,o,a)}return o(t,[{key:"scaledTo",value:function(e){s(e<=this.overscaledZ);var n=this.canonical.z-e;return e>this.canonical.z?new t(e,this.wrap,this.canonical.z,this.canonical.x,this.canonical.y):new t(e,this.wrap,e,this.canonical.x>>n,this.canonical.y>>n)}},{key:"isChildOf",value:function(t){var e=this.canonical.z-t.canonical.z;return 0===t.overscaledZ||t.overscaledZ<this.overscaledZ&&t.canonical.x===this.canonical.x>>e&&t.canonical.y===this.canonical.y>>e}},{key:"children",value:function(e){if(this.overscaledZ>=e)return[new t(this.overscaledZ+1,this.wrap,this.canonical.z,this.canonical.x,this.canonical.y)];var n=this.canonical.z+1,r=2*this.canonical.x,i=2*this.canonical.y;return[new t(n,this.wrap,n,r,i),new t(n,this.wrap,n,r+1,i),new t(n,this.wrap,n,r,i+1),new t(n,this.wrap,n,r+1,i+1)]}},{key:"isLessThan",value:function(t){return this.wrap<t.wrap||!(this.wrap>t.wrap)&&(this.overscaledZ<t.overscaledZ||!(this.overscaledZ>t.overscaledZ)&&(this.canonical.x<t.canonical.x||!(this.canonical.x>t.canonical.x)&&this.canonical.y<t.canonical.y))}},{key:"wrapped",value:function(){return new t(this.overscaledZ,0,this.canonical.z,this.canonical.x,this.canonical.y)}},{key:"overscaleFactor",value:function(){return Math.pow(2,this.overscaledZ-this.canonical.z)}},{key:"toUnwrapped",value:function(){return new f(this.wrap,this.canonical,this.posMatrix)}},{key:"toString",value:function(){return"".concat(this.overscaledZ,"/").concat(this.canonical.x,"/").concat(this.canonical.y)}},{key:"toCoordinate",value:function(){return new l(this.canonical.x+Math.pow(2,this.wrap),this.canonical.y,this.canonical.z)}}]),t}();function p(t,e,n,r){(t*=2)<0&&(t=-1*t-1);var i=1<<e;return 32*(i*i*t+i*r+n)+e}u("CanonicalTileID",c),u("OverscaledTileID",h,{omit:["posMatrix"]}),t.exports={CanonicalTileID:c,OverscaledTileID:h,UnwrappedTileID:f}},function(t,e,n){var r=n(6);t.exports=function(t,e,n){return e*(r/t.tileSize)}},function(t,e,n){var r=n(41),i=n(24),o=n(30).isExpression,a=n(57).isFunction;t.exports=function(t){var e=n(91),s=n(94),u=n(43),l={"*":function(){return[]},array:n(92),boolean:n(148),number:n(93),color:n(149),constants:n(75),enum:n(58),filter:n(59),function:n(91),layer:n(95),object:n(43),source:n(99),light:n(100),string:n(101)},c=t.value,f=t.valueSpec,h=t.styleSpec;return f.function&&a(i(c))?e(t):f.function&&o(i.deep(c))?s(t):f.type&&l[f.type]?l[f.type](t):u(r({},t,{valueSpec:f.type?h[f.type]:f}))}},function(t,e,n){function r(t){return(r="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t})(t)}function i(t,e){return!e||"object"!==r(e)&&"function"!=typeof e?function(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}(t):e}function o(t){return(o=Object.setPrototypeOf?Object.getPrototypeOf:function(t){return t.__proto__||Object.getPrototypeOf(t)})(t)}function a(t,e){return(a=Object.setPrototypeOf||function(t,e){return t.__proto__=e,t})(t,e)}function s(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function u(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,r.key,r)}}function l(t,e,n){return e&&u(t.prototype,e),n&&u(t,n),t}var c=n(1),f=n(41),h=n(76),p=n(77),d=n(55),y=n(42).CompoundExpression,m=n(86),v=n(56),g=n(88),b=n(89),x=n(90),_=n(84),w=n(31),k=n(146),S=k.success,T=k.error,A=function(){function t(e){s(this,t),this.expression=e}return l(t,[{key:"evaluate",value:function(t,e){return this._evaluator||(this._evaluator=new d),this._evaluator.globals=t,this._evaluator.feature=e,this.expression.evaluate(this._evaluator)}}]),t}(),E=function(t){function e(t,n){var r,a;return s(this,e),(r=i(this,o(e).call(this,t)))._warningHistory={},r._defaultValue="color"===(a=n).type&&M(a.default)?new B(0,0,0,0):"color"===a.type?B.parse(a.default)||null:void 0===a.default?null:a.default,"enum"===n.type&&(r._enumValues=n.values),r}return function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),e&&a(t,e)}(e,A),l(e,[{key:"evaluate",value:function(t,e){this._evaluator||(this._evaluator=new d),this._evaluator.globals=t,this._evaluator.feature=e;try{var n=this.expression.evaluate(this._evaluator);if(null==n)return this._defaultValue;if(this._enumValues&&!(n in this._enumValues))throw new w("Expected value to be one of ".concat(Object.keys(this._enumValues).map(function(t){return JSON.stringify(t)}).join(", "),", but found ").concat(JSON.stringify(n)," instead."));return n}catch(t){return this._warningHistory[t.message]||(this._warningHistory[t.message]=!0,"undefined"!=typeof console&&console.warn(t.message)),this._defaultValue}}}]),e}();function z(t){return Array.isArray(t)&&t.length>0&&"string"==typeof t[0]&&t[0]in x}function C(t,e){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{},r=new p(x,[],function(t){var e={color:F,string:V,number:N,enum:V,boolean:q};if("array"===t.type)return Z(e[t.value]||U,t.length);return e[t.type]||null}(e)),i=r.parse(t);return i?!1===n.handleErrors?S(new A(i)):S(new E(i,e)):(c(r.errors.length>0),T(r.errors))}var P=function(){function t(e,n){s(this,t),this.kind=e,this._styleExpression=n}return l(t,[{key:"evaluate",value:function(t,e){return this._styleExpression.evaluate(t,e)}}]),t}(),O=function(){function t(e,n,r){s(this,t),this.kind=e,this.zoomStops=r.labels,this._styleExpression=n,r instanceof v&&(this._interpolationType=r.interpolation)}return l(t,[{key:"evaluate",value:function(t,e){return this._styleExpression.evaluate(t,e)}},{key:"interpolationFactor",value:function(t,e,n){return this._interpolationType?v.interpolationFactor(this._interpolationType,t,e,n):0}}]),t}();function I(t,e){if("error"===(t=C(t,e,arguments.length>2&&void 0!==arguments[2]?arguments[2]:{})).result)return t;var n=t.value.expression,r=_.isFeatureConstant(n);if(!r&&!e["property-function"])return T([new h("","property expressions not supported")]);var i=_.isGlobalPropertyConstant(n,["zoom"]);if(!i&&!1===e["zoom-function"])return T([new h("","zoom expressions not supported")]);var o=function t(e){var n=null;if(e instanceof b)n=t(e.result);else if(e instanceof g){var r=!0,i=!1,o=void 0;try{for(var a,s=e.args[Symbol.iterator]();!(r=(a=s.next()).done);r=!0){var u=a.value;if(n=t(u))break}}catch(t){i=!0,o=t}finally{try{r||null==s.return||s.return()}finally{if(i)throw o}}}else(e instanceof m||e instanceof v)&&e.input instanceof y&&"zoom"===e.input.name&&(n=e);if(n instanceof h)return n;e.eachChild(function(e){var r=t(e);r instanceof h?n=r:!n&&r?n=new h("",'"zoom" expression may only be used as input to a top-level "step" or "interpolate" expression.'):n&&r&&n!==r&&(n=new h("",'Only one zoom-based "step" or "interpolate" subexpression may be used in an expression.'))});return n}(n);return o||i?o instanceof h?T([o]):o instanceof v&&"piecewise-constant"===e.function?T([new h("",'"interpolate" expressions cannot be used with this property')]):S(o?new O(r?"camera":"composite",t.value,o):new P(r?"constant":"source",t.value)):T([new h("",'"zoom" expression may only be used as input to a top-level "step" or "interpolate" expression.')])}var j=n(57),M=j.isFunction,L=j.createFunction,B=n(25).Color,R=function(){function t(e,n){s(this,t),this._parameters=e,this._specification=n,f(this,L(this._parameters,this._specification))}return l(t,null,[{key:"deserialize",value:function(e){return new t(e._parameters,e._specification)}},{key:"serialize",value:function(t){return{_parameters:t._parameters,_specification:t._specification}}}]),t}();t.exports={StyleExpression:A,StyleExpressionWithErrorHandling:E,isExpression:z,createExpression:C,createPropertyExpression:I,normalizePropertyExpression:function(t,e){if(M(t))return new R(t,e);if(z(t)){var n=I(t,e);if("error"===n.result)throw new Error(n.value.map(function(t){return"".concat(t.key,": ").concat(t.message)}).join(", "));return n.value}var r=t;return"string"==typeof t&&"color"===e.type&&(r=B.parse(t)),{kind:"constant",evaluate:function(){return r}}},ZoomConstantExpression:P,ZoomDependentExpression:O,StylePropertyFunction:R};var D=n(8),F=D.ColorType,V=D.StringType,N=D.NumberType,q=D.BooleanType,U=D.ValueType,Z=D.array},function(t,e){function n(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,r.key,r)}}var r=function(){function t(e){!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,t),this.name="ExpressionEvaluationError",this.message=e}var e,r,i;return e=t,(r=[{key:"toJSON",value:function(){return this.message}}])&&n(e.prototype,r),i&&n(e,i),t}();t.exports=r},function(t,e,n){function r(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function i(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,r.key,r)}}function o(t,e,n){return e&&i(t.prototype,e),n&&i(t,n),t}var a=n(153).packUint8ToFloat,s=(n(12),n(11).register),u=n(4).PossiblyEvaluatedPropertyValue,l=n(14),c=l.StructArrayLayout1f4,f=l.StructArrayLayout2f8,h=l.StructArrayLayout4f16;function p(t){return[a(255*t.r,255*t.g),a(255*t.b,255*t.a)]}var d=function(){function t(e,n,i){r(this,t),this.value=e,this.name=n,this.type=i,this.statistics={max:-1/0}}return o(t,[{key:"defines",value:function(){return["#define HAS_UNIFORM_u_".concat(this.name)]}},{key:"populatePaintArray",value:function(){}},{key:"upload",value:function(){}},{key:"destroy",value:function(){}},{key:"setUniforms",value:function(t,e,n,r){var i=r.constantOr(this.value),o=t.gl;"color"===this.type?o.uniform4f(e.uniforms["u_".concat(this.name)],i.r,i.g,i.b,i.a):o.uniform1f(e.uniforms["u_".concat(this.name)],i)}}]),t}(),y=function(){function t(e,n,i){r(this,t),this.expression=e,this.name=n,this.type=i,this.statistics={max:-1/0};var o="color"===i?f:c;this.paintVertexAttributes=[{name:"a_".concat(n),type:"Float32",components:"color"===i?2:1,offset:0}],this.paintVertexArray=new o}return o(t,[{key:"defines",value:function(){return[]}},{key:"populatePaintArray",value:function(t,e){var n=this.paintVertexArray,r=n.length;n.reserve(t);var i=this.expression.evaluate({zoom:0},e);if("color"===this.type)for(var o=p(i),a=r;a<t;a++)n.emplaceBack(o[0],o[1]);else{for(var s=r;s<t;s++)n.emplaceBack(i);this.statistics.max=Math.max(this.statistics.max,i)}}},{key:"upload",value:function(t){this.paintVertexArray&&(this.paintVertexBuffer=t.createVertexBuffer(this.paintVertexArray,this.paintVertexAttributes))}},{key:"destroy",value:function(){this.paintVertexBuffer&&this.paintVertexBuffer.destroy()}},{key:"setUniforms",value:function(t,e){t.gl.uniform1f(e.uniforms["a_".concat(this.name,"_t")],0)}}]),t}(),m=function(){function t(e,n,i,o,a){r(this,t),this.expression=e,this.name=n,this.type=i,this.useIntegerZoom=o,this.zoom=a,this.statistics={max:-1/0};var s="color"===i?h:f;this.paintVertexAttributes=[{name:"a_".concat(n),type:"Float32",components:"color"===i?4:2,offset:0}],this.paintVertexArray=new s}return o(t,[{key:"defines",value:function(){return[]}},{key:"populatePaintArray",value:function(t,e){var n=this.paintVertexArray,r=n.length;n.reserve(t);var i=this.expression.evaluate({zoom:this.zoom},e),o=this.expression.evaluate({zoom:this.zoom+1},e);if("color"===this.type)for(var a=p(i),s=p(o),u=r;u<t;u++)n.emplaceBack(a[0],a[1],s[0],s[1]);else{for(var l=r;l<t;l++)n.emplaceBack(i,o);this.statistics.max=Math.max(this.statistics.max,i,o)}}},{key:"upload",value:function(t){this.paintVertexArray&&(this.paintVertexBuffer=t.createVertexBuffer(this.paintVertexArray,this.paintVertexAttributes))}},{key:"destroy",value:function(){this.paintVertexBuffer&&this.paintVertexBuffer.destroy()}},{key:"interpolationFactor",value: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)}},{key:"setUniforms",value:function(t,e,n){t.gl.uniform1f(e.uniforms["a_".concat(this.name,"_t")],this.interpolationFactor(n.zoom))}}]),t}(),v=function(){function t(){r(this,t),this.binders={},this.cacheKey="",this._buffers=[]}return o(t,[{key:"populatePaintArrays",value:function(t,e){for(var n in this.binders)this.binders[n].populatePaintArray(t,e)}},{key:"defines",value:function(){var t=[];for(var e in this.binders)t.push.apply(t,this.binders[e].defines());return t}},{key:"setUniforms",value:function(t,e,n,r){for(var i in this.binders){this.binders[i].setUniforms(t,e,r,n.get(i))}}},{key:"getPaintVertexBuffers",value:function(){return this._buffers}},{key:"upload",value:function(t){for(var e in this.binders)this.binders[e].upload(t);var n=[];for(var r in this.binders){var i=this.binders[r];(i instanceof y||i instanceof m)&&i.paintVertexBuffer&&n.push(i.paintVertexBuffer)}this._buffers=n}},{key:"destroy",value:function(){for(var t in this.binders)this.binders[t].destroy()}}],[{key:"createDynamic",value:function(e,n,r){var i=new t,o=[];for(var a in e.paint._values)if(r(a)){var s=e.paint.get(a);if(s instanceof u&&s.property.specification["property-function"]){var l=b(a,e.type),c=s.property.specification.type,f=s.property.useIntegerZoom;"constant"===s.value.kind?(i.binders[a]=new d(s.value,l,c),o.push("/u_".concat(l))):"source"===s.value.kind?(i.binders[a]=new y(s.value,l,c),o.push("/a_".concat(l))):(i.binders[a]=new m(s.value,l,c,f,n),o.push("/z_".concat(l)))}}return i.cacheKey=o.sort().join(""),i}}]),t}(),g=function(){function t(e,n,i){var o=arguments.length>3&&void 0!==arguments[3]?arguments[3]:function(){return!0};r(this,t),this.programConfigurations={};var a=!0,s=!1,u=void 0;try{for(var l,c=n[Symbol.iterator]();!(a=(l=c.next()).done);a=!0){var f=l.value;this.programConfigurations[f.id]=v.createDynamic(f,i,o),this.programConfigurations[f.id].layoutAttributes=e}}catch(t){s=!0,u=t}finally{try{a||null==c.return||c.return()}finally{if(s)throw u}}}return o(t,[{key:"populatePaintArrays",value:function(t,e){for(var n in this.programConfigurations)this.programConfigurations[n].populatePaintArrays(t,e)}},{key:"get",value:function(t){return this.programConfigurations[t]}},{key:"upload",value:function(t){for(var e in this.programConfigurations)this.programConfigurations[e].upload(t)}},{key:"destroy",value:function(){for(var t in this.programConfigurations)this.programConfigurations[t].destroy()}}]),t}();function b(t,e){return{"text-opacity":"opacity","icon-opacity":"opacity","text-color":"fill_color","icon-color":"fill_color","text-halo-color":"halo_color","icon-halo-color":"halo_color","text-halo-blur":"halo_blur","icon-halo-blur":"halo_blur","text-halo-width":"halo_width","icon-halo-width":"halo_width","line-gap-width":"gapwidth"}[t]||t.replace("".concat(e,"-"),"").replace(/-/g,"_")}s("ConstantBinder",d),s("SourceExpressionBinder",y),s("CompositeExpressionBinder",m),s("ProgramConfiguration",v,{omit:["_buffers"]}),s("ProgramConfigurationSet",g),t.exports={ProgramConfiguration:v,ProgramConfigurationSet:g}},function(t,e,n){function r(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function i(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,r.key,r)}}function o(t,e,n){return e&&i(t.prototype,e),n&&i(t,n),t}var a=n(1),s=n(11).register;function u(t,e,n,r){var i=e.width,o=e.height;if(r){if(r.length!==i*o*n)throw new RangeError("mismatched image size")}else r=new Uint8Array(i*o*n);return t.width=i,t.height=o,t.data=r,t}function l(t,e,n){var r=e.width,i=e.height;if(r!==t.width||i!==t.height){var o=u({},{width:r,height:i},n);c(t,o,{x:0,y:0},{x:0,y:0},{width:Math.min(t.width,r),height:Math.min(t.height,i)},n),t.width=r,t.height=i,t.data=o.data}}function c(t,e,n,r,i,o){if(0===i.width||0===i.height)return e;if(i.width>t.width||i.height>t.height||n.x>t.width-i.width||n.y>t.height-i.height)throw new RangeError("out of range source coordinates for image copy");if(i.width>e.width||i.height>e.height||r.x>e.width-i.width||r.y>e.height-i.height)throw new RangeError("out of range destination coordinates for image copy");var s=t.data,u=e.data;a(s!==u);for(var l=0;l<i.height;l++)for(var c=((n.y+l)*t.width+n.x)*o,f=((r.y+l)*e.width+r.x)*o,h=0;h<i.width*o;h++)u[f+h]=s[c+h];return e}var f=function(){function t(e,n){r(this,t),u(this,e,1,n)}return o(t,[{key:"resize",value:function(t){l(this,t,1)}},{key:"clone",value:function(){return new t({width:this.width,height:this.height},new Uint8Array(this.data))}}],[{key:"copy",value:function(t,e,n,r,i){c(t,e,n,r,i,1)}}]),t}(),h=function(){function t(e,n){r(this,t),u(this,e,4,n)}return o(t,[{key:"resize",value:function(t){l(this,t,4)}},{key:"clone",value:function(){return new t({width:this.width,height:this.height},new Uint8Array(this.data))}}],[{key:"copy",value:function(t,e,n,r,i){c(t,e,n,r,i,4)}}]),t}();s("AlphaImage",f),s("RGBAImage",h),t.exports={AlphaImage:f,RGBAImage:h}},function(t,e,n){var r=n(64),i=n(2),o="See https://www.mapbox.com/api-documentation/#access-tokens";function a(t,e){var n=c(r.API_URL);if(t.protocol=n.protocol,t.authority=n.authority,"/"!==n.path&&(t.path="".concat(n.path).concat(t.path)),!r.REQUIRE_ACCESS_TOKEN)return f(t);if(!(e=e||r.ACCESS_TOKEN))throw new Error("An API access token is required to use Mapbox GL. ".concat(o));if("s"===e[0])throw new Error("Use a public access token (pk.*) with Mapbox GL, not a secret access token (sk.*). ".concat(o));return t.params.push("access_token=".concat(e)),f(t)}function s(t){return 0===t.indexOf("mapbox:")}e.isMapboxURL=s,e.normalizeStyleURL=function(t,e){if(!s(t))return t;var n=c(t);return n.path="/styles/v1".concat(n.path),a(n,e)},e.normalizeGlyphsURL=function(t,e){if(!s(t))return t;var n=c(t);return n.path="/fonts/v1".concat(n.path),a(n,e)},e.normalizeSourceURL=function(t,e){if(!s(t))return t;var n=c(t);return n.path="/v4/".concat(n.authority,".json"),n.params.push("secure"),a(n,e)},e.normalizeSpriteURL=function(t,e,n,r){var i=c(t);return s(t)?(i.path="/styles/v1".concat(i.path,"/sprite").concat(e).concat(n),a(i,r)):(i.path+="".concat(e).concat(n),f(i))};var u=/(\.(png|jpg)\d*)(?=$)/;e.normalizeTileURL=function(t,e,n){if(!e||!s(e))return t;var o=c(t),a=i.devicePixelRatio>=2||512===n?"@2x":"",l=i.supportsWebp?".webp":"$1";return o.path=o.path.replace(u,"".concat(a).concat(l)),function(t){for(var e=0;e<t.length;e++)0===t[e].indexOf("access_token=tk.")&&(t[e]="access_token=".concat(r.ACCESS_TOKEN||""))}(o.params),f(o)};var l=/^(\w+):\/\/([^/?]*)(\/[^?]+)?\??(.+)?/;function c(t){var e=t.match(l);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 f(t){var e=t.params.length?"?".concat(t.params.join("&")):"";return"".concat(t.protocol,"://").concat(t.authority).concat(t.path).concat(e)}},function(t,e){function n(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,r.key,r)}}var r=function(){function t(e,n,r){!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,t),this.column=e,this.row=n,this.zoom=r}var e,r,i;return e=t,(r=[{key:"clone",value:function(){return new t(this.column,this.row,this.zoom)}},{key:"zoomTo",value:function(t){return this.clone()._zoomTo(t)}},{key:"sub",value:function(t){return this.clone()._sub(t)}},{key:"_zoomTo",value:function(t){var e=Math.pow(2,t-this.zoom);return this.column*=e,this.row*=e,this.zoom=t,this}},{key:"_sub",value:function(t){return t=t.zoomTo(this.zoom),this.column-=t.column,this.row-=t.row,this}}])&&n(e.prototype,r),i&&n(e,i),t}();t.exports=r},function(t,e,n){function r(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,r.key,r)}}var i=n(0).warnOnce,o=n(11).register,a=Math.pow(2,16)-1,s=function(){function e(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:[];!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,e),this.segments=t}var n,o,s;return n=e,(o=[{key:"prepareSegment",value:function(e,n,r){var o=this.segments[this.segments.length-1];return e>a&&i("Max vertices per segment is ".concat(a,": bucket requested ").concat(e)),(!o||o.vertexLength+e>t.exports.MAX_VERTEX_ARRAY_LENGTH)&&(o={vertexOffset:n.length,primitiveOffset:r.length,vertexLength:0,primitiveLength:0},this.segments.push(o)),o}},{key:"get",value:function(){return this.segments}},{key:"destroy",value:function(){var t=!0,e=!1,n=void 0;try{for(var r,i=this.segments[Symbol.iterator]();!(t=(r=i.next()).done);t=!0){var o=r.value;for(var a in o.vaos)o.vaos[a].destroy()}}catch(t){e=!0,n=t}finally{try{t||null==i.return||i.return()}finally{if(e)throw n}}}}])&&r(n.prototype,o),s&&r(n,s),e}();o("SegmentVector",s),t.exports={SegmentVector:s,MAX_VERTEX_ARRAY_LENGTH:a}},function(t,e,n){t.exports={LineIndexArray:n(14).LineIndexArray,TriangleIndexArray:n(14).TriangleIndexArray}},function(t,e,n){var r=n(0),i=n(6);var o,a=(o=16,{min:-1*Math.pow(2,o-1),max:Math.pow(2,o-1)-1});t.exports=function(t){for(var e=i/t.extent,n=t.loadGeometry(),o=0;o<n.length;o++)for(var s=n[o],u=0;u<s.length;u++){var l=s[u];l.x=Math.round(l.x*e),l.y=Math.round(l.y*e),(l.x<a.min||l.x>a.max||l.y<a.min||l.y>a.max)&&r.warnOnce("Geometry exceeds allowed extent, reduce your vector tile buffer size")}return n}},function(t,e,n){function r(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,r.key,r)}}var i=n(21),o=function(){function t(e,n){!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,t),e&&(n?this.setSouthWest(e).setNorthEast(n):4===e.length?this.setSouthWest([e[0],e[1]]).setNorthEast([e[2],e[3]]):this.setSouthWest(e[0]).setNorthEast(e[1]))}var e,n,o;return e=t,o=[{key:"convert",value:function(e){return!e||e instanceof t?e:new t(e)}}],(n=[{key:"setNorthEast",value:function(t){return this._ne=t instanceof i?new i(t.lng,t.lat):i.convert(t),this}},{key:"setSouthWest",value:function(t){return this._sw=t instanceof i?new i(t.lng,t.lat):i.convert(t),this}},{key:"extend",value:function(e){var n,r,o=this._sw,a=this._ne;if(e instanceof i)n=e,r=e;else{if(!(e instanceof t))return Array.isArray(e)?e.every(Array.isArray)?this.extend(t.convert(e)):this.extend(i.convert(e)):this;if(n=e._sw,r=e._ne,!n||!r)return this}return o||a?(o.lng=Math.min(n.lng,o.lng),o.lat=Math.min(n.lat,o.lat),a.lng=Math.max(r.lng,a.lng),a.lat=Math.max(r.lat,a.lat)):(this._sw=new i(n.lng,n.lat),this._ne=new i(r.lng,r.lat)),this}},{key:"getCenter",value:function(){return new i((this._sw.lng+this._ne.lng)/2,(this._sw.lat+this._ne.lat)/2)}},{key:"getSouthWest",value:function(){return this._sw}},{key:"getNorthEast",value:function(){return this._ne}},{key:"getNorthWest",value:function(){return new i(this.getWest(),this.getNorth())}},{key:"getSouthEast",value:function(){return new i(this.getEast(),this.getSouth())}},{key:"getWest",value:function(){return this._sw.lng}},{key:"getSouth",value:function(){return this._sw.lat}},{key:"getEast",value:function(){return this._ne.lng}},{key:"getNorth",value:function(){return this._ne.lat}},{key:"toArray",value:function(){return[this._sw.toArray(),this._ne.toArray()]}},{key:"toString",value:function(){return"LngLatBounds(".concat(this._sw.toString(),", ").concat(this._ne.toString(),")")}},{key:"isEmpty",value:function(){return!(this._sw&&this._ne)}}])&&r(e.prototype,n),o&&r(e,o),t}();t.exports=o},function(t,e,n){function r(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,r.key,r)}}var i=n(1),o=function(){function t(){!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,t),this.boundProgram=null,this.boundLayoutVertexBuffer=null,this.boundPaintVertexBuffers=[],this.boundIndexBuffer=null,this.boundVertexOffset=null,this.boundDynamicVertexBuffer=null,this.vao=null}var e,n,o;return e=t,(n=[{key:"bind",value:function(t,e,n,r,i,o,a,s){this.context=t;for(var u=this.boundPaintVertexBuffers.length!==r.length,l=0;!u&&l<r.length;l++)this.boundPaintVertexBuffers[l]!==r[l]&&(u=!0);var c=!this.vao||this.boundProgram!==e||this.boundLayoutVertexBuffer!==n||u||this.boundIndexBuffer!==i||this.boundVertexOffset!==o||this.boundDynamicVertexBuffer!==a||this.boundDynamicVertexBuffer2!==s;!t.extVertexArrayObject||c?this.freshBind(e,n,r,i,o,a,s):(t.bindVertexArrayOES.set(this.vao),a&&a.bind(),i&&i.dynamicDraw&&i.bind(),s&&s.bind())}},{key:"freshBind",value:function(t,e,n,r,o,a,s){var u,l=t.numAttributes,c=this.context,f=c.gl;if(c.extVertexArrayObject)this.vao&&this.destroy(),this.vao=c.extVertexArrayObject.createVertexArrayOES(),c.bindVertexArrayOES.set(this.vao),u=0,this.boundProgram=t,this.boundLayoutVertexBuffer=e,this.boundPaintVertexBuffers=n,this.boundIndexBuffer=r,this.boundVertexOffset=o,this.boundDynamicVertexBuffer=a,this.boundDynamicVertexBuffer2=s;else{u=c.currentNumAttributes||0;for(var h=l;h<u;h++)i(0!==h),f.disableVertexAttribArray(h)}e.enableAttributes(f,t);var p=!0,d=!1,y=void 0;try{for(var m,v=n[Symbol.iterator]();!(p=(m=v.next()).done);p=!0){m.value.enableAttributes(f,t)}}catch(t){d=!0,y=t}finally{try{p||null==v.return||v.return()}finally{if(d)throw y}}a&&a.enableAttributes(f,t),s&&s.enableAttributes(f,t),e.bind(),e.setVertexAttribPointers(f,t,o);var g=!0,b=!1,x=void 0;try{for(var _,w=n[Symbol.iterator]();!(g=(_=w.next()).done);g=!0){var k=_.value;k.bind(),k.setVertexAttribPointers(f,t,o)}}catch(t){b=!0,x=t}finally{try{g||null==w.return||w.return()}finally{if(b)throw x}}a&&(a.bind(),a.setVertexAttribPointers(f,t,o)),r&&r.bind(),s&&(s.bind(),s.setVertexAttribPointers(f,t,o)),c.currentNumAttributes=l}},{key:"destroy",value:function(){this.vao&&(this.context.extVertexArrayObject.deleteVertexArrayOES(this.vao),this.vao=null)}}])&&r(e.prototype,n),o&&r(e,o),t}();t.exports=o},function(t,e){t.exports=function(t){for(var e=arguments.length,n=new Array(e>1?e-1:0),r=1;r<e;r++)n[r-1]=arguments[r];for(var i=0,o=n;i<o.length;i++){var a=o[i];for(var s in a)t[s]=a[s]}return t}},function(t,e,n){function r(t,e){return function(t){if(Array.isArray(t))return t}(t)||function(t,e){var n=[],r=!0,i=!1,o=void 0;try{for(var a,s=t[Symbol.iterator]();!(r=(a=s.next()).done)&&(n.push(a.value),!e||n.length!==e);r=!0);}catch(t){i=!0,o=t}finally{try{r||null==s.return||s.return()}finally{if(i)throw o}}return n}(t,e)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance")}()}function i(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,r.key,r)}}var o=n(8).toString,a=n(77),s=(n(55),n(1)),u=function(){function t(e,n,r,i){!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,t),this.name=e,this.type=n,this._evaluate=r,this.args=i}var e,n,u;return e=t,u=[{key:"parse",value:function(e,n){var i=e[0],u=t.definitions[i];if(!u)return n.error('Unknown expression "'.concat(i,'". If you wanted a literal array, use ["literal", [...]].'),0);for(var l=Array.isArray(u)?u[0]:u.type,c=Array.isArray(u)?[[u[1],u[2]]]:u.overloads,f=c.filter(function(t){var n=r(t,1)[0];return!Array.isArray(n)||n.length===e.length-1}),h=[],p=1;p<e.length;p++){var d=e[p],y=void 0;if(1===f.length){var m=f[0][0];y=Array.isArray(m)?m[p-1]:m.type}var v=n.parse(d,1+h.length,y);if(!v)return null;h.push(v)}var g=null,b=!0,x=!1,_=void 0;try{for(var w,k=f[Symbol.iterator]();!(b=(w=k.next()).done);b=!0){var S=r(w.value,2),T=S[0],A=S[1];if(g=new a(n.registry,n.path,null,n.scope),Array.isArray(T)&&T.length!==h.length)g.error("Expected ".concat(T.length," arguments, but found ").concat(h.length," instead."));else{for(var E=0;E<h.length;E++){var z=Array.isArray(T)?T[E]:T.type,C=h[E];g.concat(E+1).checkSubtype(z,C.type)}if(0===g.errors.length)return new t(i,l,A,h)}}}catch(t){x=!0,_=t}finally{try{b||null==k.return||k.return()}finally{if(x)throw _}}if(s(!g||g.errors.length>0),1===f.length)n.errors.push.apply(n.errors,g.errors);else{var P=(f.length?f:c).map(function(t){var e,n=r(t,1)[0];return e=n,Array.isArray(e)?"(".concat(e.map(o).join(", "),")"):"(".concat(o(e.type),"...)")}).join(" | "),O=h.map(function(t){return o(t.type)}).join(", ");n.error("Expected arguments of type ".concat(P,", but found (").concat(O,") instead."))}return null}},{key:"register",value:function(e,n){for(var r in s(!t.definitions),t.definitions=n,n)e[r]=t}}],(n=[{key:"evaluate",value:function(t){return this._evaluate(t,this.args)}},{key:"eachChild",value:function(t){this.args.forEach(t)}},{key:"possibleOutputs",value:function(){return[void 0]}}])&&i(e.prototype,n),u&&i(e,u),t}();t.exports={CompoundExpression:u,varargs:function(t){return{type:t}}}},function(t,e,n){var r=n(7),i=n(17),o=n(29);t.exports=function(t){var e=t.key,n=t.value,a=t.valueSpec||{},s=t.objectElementValidators||{},u=t.style,l=t.styleSpec,c=[],f=i(n);if("object"!==f)return[new r(e,n,"object expected, ".concat(f," found"))];for(var h in n){var p=h.split(".")[0],d=a[p]||a["*"],y=void 0;if(s[p])y=s[p];else if(a[p])y=o;else if(s["*"])y=s["*"];else{if(!a["*"]){c.push(new r(e,n[h],'unknown property "'.concat(h,'"')));continue}y=o}c=c.concat(y({key:(e?"".concat(e,"."):e)+h,value:n[h],valueSpec:d,style:u,styleSpec:l,object:n,objectKey:h},n))}for(var m in a)s[m]||a[m].required&&void 0===a[m].default&&void 0===n[m]&&c.push(new r(e,n,'missing required property "'.concat(m,'"')));return c}},function(t,e,n){var r=n(0).isCounterClockwise;function i(t,e,n){if(t.length>1){if(o(t,e))return!0;for(var r=0;r<e.length;r++)if(s(e[r],t,n))return!0}for(var i=0;i<t.length;i++)if(s(t[i],e,n))return!0;return!1}function o(t,e){if(0===t.length||0===e.length)return!1;for(var n=0;n<t.length-1;n++)for(var r=t[n],i=t[n+1],o=0;o<e.length-1;o++){if(a(r,i,e[o],e[o+1]))return!0}return!1}function a(t,e,n,i){return r(t,n,i)!==r(e,n,i)&&r(t,e,n)!==r(t,e,i)}function s(t,e,n){var r=n*n;if(1===e.length)return t.distSqr(e[0])<r;for(var i=1;i<e.length;i++){if(u(t,e[i-1],e[i])<r)return!0}return!1}function u(t,e,n){var r=e.distSqr(n);if(0===r)return t.distSqr(e);var i=((t.x-e.x)*(n.x-e.x)+(t.y-e.y)*(n.y-e.y))/r;return i<0?t.distSqr(e):i>1?t.distSqr(n):t.distSqr(n.sub(e)._mult(i)._add(e))}function l(t,e){for(var n,r,i,o=!1,a=0;a<t.length;a++)for(var s=0,u=(n=t[a]).length-1;s<n.length;u=s++)r=n[s],i=n[u],r.y>e.y!=i.y>e.y&&e.x<(i.x-r.x)*(e.y-r.y)/(i.y-r.y)+r.x&&(o=!o);return o}function c(t,e){for(var n=!1,r=0,i=t.length-1;r<t.length;i=r++){var o=t[r],a=t[i];o.y>e.y!=a.y>e.y&&e.x<(a.x-o.x)*(e.y-o.y)/(a.y-o.y)+o.x&&(n=!n)}return n}t.exports={multiPolygonIntersectsBufferedMultiPoint:function(t,e,n){for(var r=0;r<t.length;r++)for(var i=t[r],o=0;o<e.length;o++)for(var a=e[o],u=0;u<a.length;u++){var l=a[u];if(c(i,l))return!0;if(s(l,i,n))return!0}return!1},multiPolygonIntersectsMultiPolygon:function(t,e){if(1===t.length&&1===t[0].length)return l(e,t[0][0]);for(var n=0;n<e.length;n++)for(var r=e[n],i=0;i<r.length;i++)if(l(t,r[i]))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(o(s,e[c]))return!0}return!1},multiPolygonIntersectsBufferedMultiLine:function(t,e,n){for(var r=0;r<e.length;r++)for(var o=e[r],a=0;a<t.length;a++){var s=t[a];if(s.length>=3)for(var u=0;u<o.length;u++)if(c(s,o[u]))return!0;if(i(s,o,n))return!0}return!1},polygonIntersectsPolygon:function(t,e){for(var n=0;n<t.length;n++)if(c(e,t[n]))return!0;for(var r=0;r<e.length;r++)if(c(t,e[r]))return!0;return!!o(t,e)},distToSegmentSquared:u}},function(t,e,n){var r=n(0),i={vector:n(196),raster:n(114),"raster-dem":n(197),geojson:n(115),video:n(199),image:n(52),canvas:n(200)};e.create=function(t,e,n,o){var a=new i[e.type](t,e,n,o);if(a.id!==t)throw new Error("Expected Source id to be ".concat(t," instead of ").concat(a.id));return r.bindAll(["load","abort","unload","serialize","prepare"],a),a},e.getType=function(t){return i[t]},e.setType=function(t,e){i[t]=e}},function(t,e,n){var r=n(23).createLayout;t.exports=r([{name:"a_pos",type:"Int16",components:2},{name:"a_texture_pos",type:"Int16",components:2}])},function(t,e,n){var r=n(3);t.exports={getMaximumPaintValue:function(t,e,n){var r=e.paint.get(t).value;return"constant"===r.kind?r.value:n.programConfigurations.get(e.id).binders[t].statistics.max},translateDistance:function(t){return Math.sqrt(t[0]*t[0]+t[1]*t[1])},translate:function(t,e,n,i,o){if(!e[0]&&!e[1])return t;var a=r.convert(e);"viewport"===n&&a._rotate(-i);for(var s=[],u=0;u<t.length;u++){for(var l=t[u],c=[],f=0;f<l.length;f++)c.push(l[f].sub(a._mult(o)));s.push(c)}return s}}},function(t,e,n){t.exports.VectorTile=n(172),t.exports.VectorTileFeature=n(107),t.exports.VectorTileLayer=n(106)},function(t,e,n){var r=n(16),i=n(10),o=n(5),a=!1,s=null;t.exports.evented=new i,t.exports.registerForPluginAvailability=function(e){return s?e({pluginBlobURL:s,errorCallback:t.exports.errorCallback}):t.exports.evented.once("pluginAvailable",e),e},t.exports.createBlobURL=function(t){return o.URL.createObjectURL(new o.Blob([t.data],{type:"text/javascript"}))},t.exports.clearRTLTextPlugin=function(){a=!1,s=null},t.exports.setRTLTextPlugin=function(e,n){if(a)throw new Error("setRTLTextPlugin cannot be called multiple times.");a=!0,t.exports.errorCallback=n,r.getArrayBuffer({url:e},function(e,r){e?n(e):r&&(s=t.exports.createBlobURL(r),t.exports.evented.fire("pluginAvailable",{pluginBlobURL:s,errorCallback:n}))})},t.exports.applyArabicShaping=null,t.exports.processBidirectionalText=null},function(t,e,n){var r=n(30).normalizePropertyExpression,i=n(26),o=n(0);t.exports={getSizeData:function(t,e){var n=e.expression;if("constant"===n.kind)return{functionType:"constant",layoutSize:n.evaluate({zoom:t+1})};if("source"===n.kind)return{functionType:"source"};for(var r=n.zoomStops,i=0;i<r.length&&r[i]<=t;)i++;for(var o=i=Math.max(0,i-1);o<r.length&&r[o]<t+1;)o++;o=Math.min(r.length-1,o);var a={min:r[i],max:r[o]};return"composite"===n.kind?{functionType:"composite",zoomRange:a,propertyValue:e.value}:{functionType:"camera",layoutSize:n.evaluate({zoom:t+1}),zoomRange:a,sizeRange:{min:n.evaluate({zoom:a.min}),max:n.evaluate({zoom:a.max})},propertyValue:e.value}},evaluateSizeForFeature:function(t,e,n){var r=e;return"source"===t.functionType?n.lowerSize/10:"composite"===t.functionType?i.number(n.lowerSize/10,n.upperSize/10,r.uSizeT):r.uSize},evaluateSizeForZoom:function(t,e,n){if("constant"===t.functionType)return{uSizeT:0,uSize:t.layoutSize};if("source"===t.functionType)return{uSizeT:0,uSize:0};if("camera"===t.functionType){var i=t.propertyValue,a=t.zoomRange,s=t.sizeRange,u=r(i,n.specification),l=o.clamp(u.interpolationFactor(e,a.min,a.max),0,1);return{uSizeT:0,uSize:s.min+l*(s.max-s.min)}}var c=t.propertyValue,f=t.zoomRange,h=r(c,n.specification);return{uSizeT:o.clamp(h.interpolationFactor(e,f.min,f.max),0,1),uSize:0}}}},function(t,e,n){var r=n(13),i=n(4),o=i.Properties,a=i.DataConstantProperty,s=i.DataDrivenProperty,u=(i.CrossFadedProperty,i.HeatmapColorProperty,new o({"symbol-placement":new a(r.layout_symbol["symbol-placement"]),"symbol-spacing":new a(r.layout_symbol["symbol-spacing"]),"symbol-avoid-edges":new a(r.layout_symbol["symbol-avoid-edges"]),"icon-allow-overlap":new a(r.layout_symbol["icon-allow-overlap"]),"icon-ignore-placement":new a(r.layout_symbol["icon-ignore-placement"]),"icon-optional":new a(r.layout_symbol["icon-optional"]),"icon-rotation-alignment":new a(r.layout_symbol["icon-rotation-alignment"]),"icon-size":new s(r.layout_symbol["icon-size"]),"icon-text-fit":new a(r.layout_symbol["icon-text-fit"]),"icon-text-fit-padding":new a(r.layout_symbol["icon-text-fit-padding"]),"icon-image":new s(r.layout_symbol["icon-image"]),"icon-rotate":new s(r.layout_symbol["icon-rotate"]),"icon-padding":new a(r.layout_symbol["icon-padding"]),"icon-keep-upright":new a(r.layout_symbol["icon-keep-upright"]),"icon-offset":new s(r.layout_symbol["icon-offset"]),"icon-anchor":new s(r.layout_symbol["icon-anchor"]),"icon-pitch-alignment":new a(r.layout_symbol["icon-pitch-alignment"]),"text-pitch-alignment":new a(r.layout_symbol["text-pitch-alignment"]),"text-rotation-alignment":new a(r.layout_symbol["text-rotation-alignment"]),"text-field":new s(r.layout_symbol["text-field"]),"text-font":new s(r.layout_symbol["text-font"]),"text-size":new s(r.layout_symbol["text-size"]),"text-max-width":new s(r.layout_symbol["text-max-width"]),"text-line-height":new a(r.layout_symbol["text-line-height"]),"text-letter-spacing":new s(r.layout_symbol["text-letter-spacing"]),"text-justify":new s(r.layout_symbol["text-justify"]),"text-anchor":new s(r.layout_symbol["text-anchor"]),"text-max-angle":new a(r.layout_symbol["text-max-angle"]),"text-rotate":new s(r.layout_symbol["text-rotate"]),"text-padding":new a(r.layout_symbol["text-padding"]),"text-keep-upright":new a(r.layout_symbol["text-keep-upright"]),"text-transform":new s(r.layout_symbol["text-transform"]),"text-offset":new s(r.layout_symbol["text-offset"]),"text-allow-overlap":new a(r.layout_symbol["text-allow-overlap"]),"text-ignore-placement":new a(r.layout_symbol["text-ignore-placement"]),"text-optional":new a(r.layout_symbol["text-optional"])})),l=new o({"icon-opacity":new s(r.paint_symbol["icon-opacity"]),"icon-color":new s(r.paint_symbol["icon-color"]),"icon-halo-color":new s(r.paint_symbol["icon-halo-color"]),"icon-halo-width":new s(r.paint_symbol["icon-halo-width"]),"icon-halo-blur":new s(r.paint_symbol["icon-halo-blur"]),"icon-translate":new a(r.paint_symbol["icon-translate"]),"icon-translate-anchor":new a(r.paint_symbol["icon-translate-anchor"]),"text-opacity":new s(r.paint_symbol["text-opacity"]),"text-color":new s(r.paint_symbol["text-color"]),"text-halo-color":new s(r.paint_symbol["text-halo-color"]),"text-halo-width":new s(r.paint_symbol["text-halo-width"]),"text-halo-blur":new s(r.paint_symbol["text-halo-blur"]),"text-translate":new a(r.paint_symbol["text-translate"]),"text-translate-anchor":new a(r.paint_symbol["text-translate-anchor"])});t.exports={paint:l,layout:u}},function(t,e,n){function r(t){return(r="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t})(t)}function i(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,r.key,r)}}function o(t,e){return!e||"object"!==r(e)&&"function"!=typeof e?function(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}(t):e}function a(t){return(a=Object.setPrototypeOf?Object.getPrototypeOf:function(t){return t.__proto__||Object.getPrototypeOf(t)})(t)}function s(t,e){return(s=Object.setPrototypeOf||function(t,e){return t.__proto__=e,t})(t,e)}var u=n(0),l=n(27).CanonicalTileID,c=n(21),f=n(3),h=n(10),p=n(16),d=n(2),y=n(6),m=n(14).RasterBoundsArray,v=n(46),g=n(40),b=n(20),x=function(t){function e(t,n,r,i){var s;return function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,e),(s=o(this,a(e).call(this))).id=t,s.dispatcher=r,s.coordinates=n.coordinates,s.type="image",s.minzoom=0,s.maxzoom=22,s.tileSize=512,s.tiles={},s.setEventedParent(i),s.options=n,s}var n,r,x;return function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),e&&s(t,e)}(e,h),n=e,(r=[{key:"load",value:function(){var t=this;this.fire("dataloading",{dataType:"source"}),this.url=this.options.url,p.getImage(this.map._transformRequest(this.url,p.ResourceType.Image),function(e,n){e?t.fire("error",{error:e}):n&&(t.image=d.getImageData(n),t._finishLoading())})}},{key:"_finishLoading",value:function(){this.map&&(this.setCoordinates(this.coordinates),this.fire("data",{dataType:"source",sourceDataType:"metadata"}))}},{key:"onAdd",value:function(t){this.map=t,this.load()}},{key:"setCoordinates",value:function(t){this.coordinates=t;var e=this.map,n=t.map(function(t){return e.transform.locationCoordinate(c.convert(t)).zoomTo(0)}),r=this.centerCoord=u.getCoordinatesCenter(n);r.column=Math.floor(r.column),r.row=Math.floor(r.row),this.tileID=new l(r.zoom,r.column,r.row),this.minzoom=this.maxzoom=r.zoom;var i=n.map(function(t){var e=t.zoomTo(r.zoom);return new f(Math.round((e.column-r.column)*y),Math.round((e.row-r.row)*y))});return this._boundsArray=new m,this._boundsArray.emplaceBack(i[0].x,i[0].y,0,0),this._boundsArray.emplaceBack(i[1].x,i[1].y,y,0),this._boundsArray.emplaceBack(i[3].x,i[3].y,0,y),this._boundsArray.emplaceBack(i[2].x,i[2].y,y,y),this.boundsBuffer&&(this.boundsBuffer.destroy(),delete this.boundsBuffer),this.fire("data",{dataType:"source",sourceDataType:"content"}),this}},{key:"prepare",value:function(){if(0!==Object.keys(this.tiles).length&&this.image){var t=this.map.painter.context,e=t.gl;for(var n in this.boundsBuffer||(this.boundsBuffer=t.createVertexBuffer(this._boundsArray,v.members)),this.boundsVAO||(this.boundsVAO=new g),this.texture||(this.texture=new b(t,this.image,e.RGBA),this.texture.bind(e.LINEAR,e.CLAMP_TO_EDGE)),this.tiles){var r=this.tiles[n];"loaded"!==r.state&&(r.state="loaded",r.texture=this.texture)}}}},{key:"loadTile",value:function(t,e){this.tileID&&this.tileID.equals(t.tileID.canonical)?(this.tiles[String(t.tileID.wrap)]=t,t.buckets={},e(null)):(t.state="errored",e(null))}},{key:"serialize",value:function(){return{type:"image",url:this.options.url,coordinates:this.coordinates}}},{key:"hasTransition",value:function(){return!1}}])&&i(n.prototype,r),x&&i(n,x),e}();t.exports=x},function(t,e,n){function r(t){return(r="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t})(t)}function i(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,r.key,r)}}function o(t){return(o=Object.setPrototypeOf?Object.getPrototypeOf:function(t){return t.__proto__||Object.getPrototypeOf(t)})(t)}function a(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}function s(t,e){return(s=Object.setPrototypeOf||function(t,e){return t.__proto__=e,t})(t,e)}var u=n(1),l=n(10),c=n(19),f=n(184),h=n(185),p=n(187),d=n(192),y=n(193),m=n(0),v=n(16),g=n(34),b=n(2),x=n(194),_=n(54),w=n(45).getType,k=n(45).setType,S=n(116),T=n(117),A=(n(115),n(13)),E=n(209),z=n(214),C=n(216),P=n(49),O=n(217),I=n(108),j=n(123),M=m.pick(C.operations,["addLayer","removeLayer","setPaintProperty","setLayoutProperty","setFilter","addSource","removeSource","setLayerZoomRange","setLight","setTransition","setGeoJSONSourceData"]),L=m.pick(C.operations,["setCenter","setZoom","setBearing","setPitch"]),B=function(t){function e(t){var n,i=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,e),(n=function(t,e){return!e||"object"!==r(e)&&"function"!=typeof e?a(t):e}(this,o(e).call(this))).map=t,n.dispatcher=new x(E(),a(n)),n.imageManager=new h,n.glyphManager=new p(t._transformRequest,i.localIdeographFontFamily),n.lineAtlas=new y(256,512),n.crossTileSymbolIndex=new j,n._layers={},n._order=[],n.sourceCaches={},n.zoomHistory=new I,n._loaded=!1,n._resetUpdates();var s=a(n);return n._rtlTextPluginCallback=P.registerForPluginAvailability(function(t){for(var e in s.dispatcher.broadcast("loadRTLTextPlugin",t.pluginBlobURL,t.errorCallback),s.sourceCaches)s.sourceCaches[e].reload()}),n.on("data",function(t){if("source"===t.dataType&&"metadata"===t.sourceDataType){var e=n.sourceCaches[t.sourceId];if(e){var r=e.getSource();if(r&&r.vectorLayerIds)for(var i in n._layers){var o=n._layers[i];o.source===r.id&&n._validateLayer(o)}}}}),n}var n,B,R;return function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),e&&s(t,e)}(e,l),n=e,(B=[{key:"loadURL",value:function(t){var e=this,n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};this.fire("dataloading",{dataType:"style"});var r="boolean"==typeof n.validate?n.validate:!g.isMapboxURL(t);t=g.normalizeStyleURL(t,n.accessToken);var i=this.map._transformRequest(t,v.ResourceType.Style);v.getJSON(i,function(t,n){t?e.fire("error",{error:t}):n&&e._load(n,r)})}},{key:"loadJSON",value:function(t){var e=this,n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};this.fire("dataloading",{dataType:"style"}),b.frame(function(){e._load(t,!1!==n.validate)})}},{key:"_load",value:function(t,e){var n=this;if(!e||!_.emitErrors(this,_(t))){for(var r in this._loaded=!0,this.stylesheet=t,t.sources)this.addSource(r,t.sources[r],{validate:!1});t.sprite?f(t.sprite,this.map._transformRequest,function(t,e){if(t)n.fire("error",t);else if(e)for(var r in e)n.imageManager.addImage(r,e[r]);n.imageManager.setLoaded(!0),n.fire("data",{dataType:"style"})}):this.imageManager.setLoaded(!0),this.glyphManager.setURL(t.glyphs);var i=z(this.stylesheet.layers);this._order=i.map(function(t){return t.id}),this._layers={};var o=!0,a=!1,s=void 0;try{for(var u,l=i[Symbol.iterator]();!(o=(u=l.next()).done);o=!0){var h=u.value;(h=c.create(h)).setEventedParent(this,{layer:{id:h.id}}),this._layers[h.id]=h}}catch(t){a=!0,s=t}finally{try{o||null==l.return||l.return()}finally{if(a)throw s}}this.dispatcher.broadcast("setLayers",this._serializeLayers(this._order)),this.light=new d(this.stylesheet.light),this.fire("data",{dataType:"style"}),this.fire("style.load")}}},{key:"_validateLayer",value:function(t){var e=this.sourceCaches[t.source];if(e){var n=t.sourceLayer;if(n){var r=e.getSource();("geojson"===r.type||r.vectorLayerIds&&-1===r.vectorLayerIds.indexOf(n))&&this.fire("error",{error:new Error('Source layer "'.concat(n,'" ')+'does not exist on source "'.concat(r.id,'" ')+'as specified by style layer "'.concat(t.id,'"'))})}}}},{key:"loaded",value:function(){if(!this._loaded)return!1;if(Object.keys(this._updatedSources).length)return!1;for(var t in this.sourceCaches)if(!this.sourceCaches[t].loaded())return!1;return!!this.imageManager.isLoaded()}},{key:"_serializeLayers",value:function(t){var e=this;return t.map(function(t){return e._layers[t].serialize()})}},{key:"hasTransitions",value:function(){if(this.light&&this.light.hasTransition())return!0;for(var t in this.sourceCaches)if(this.sourceCaches[t].hasTransition())return!0;for(var e in this._layers)if(this._layers[e].hasTransition())return!0;return!1}},{key:"_checkLoaded",value:function(){if(!this._loaded)throw new Error("Style is not done loading")}},{key:"update",value:function(t){if(this._loaded){if(this._changed){var e=Object.keys(this._updatedLayers),n=Object.keys(this._removedLayers);for(var r in(e.length||n.length)&&this._updateWorkerLayers(e,n),this._updatedSources){var i=this._updatedSources[r];u("reload"===i||"clear"===i),"reload"===i?this._reloadSource(r):"clear"===i&&this._clearSource(r)}for(var o in this._updatedPaintProps)this._layers[o].updateTransitions(t);this.light.updateTransitions(t),this._resetUpdates(),this.fire("data",{dataType:"style"})}for(var a in this.sourceCaches)this.sourceCaches[a].used=!1;var s=!0,l=!1,c=void 0;try{for(var f,h=this._order[Symbol.iterator]();!(s=(f=h.next()).done);s=!0){var p=f.value,d=this._layers[p];d.recalculate(t),!d.isHidden(t.zoom)&&d.source&&(this.sourceCaches[d.source].used=!0)}}catch(t){l=!0,c=t}finally{try{s||null==h.return||h.return()}finally{if(l)throw c}}this.light.recalculate(t),this.z=t.zoom}}},{key:"_updateWorkerLayers",value:function(t,e){this.dispatcher.broadcast("updateLayers",{layers:this._serializeLayers(t),removedIds:e})}},{key:"_resetUpdates",value:function(){this._changed=!1,this._updatedLayers={},this._removedLayers={},this._updatedSources={},this._updatedPaintProps={}}},{key:"setState",value:function(t){var e=this;if(this._checkLoaded(),_.emitErrors(this,_(t)))return!1;(t=m.clone(t)).layers=z(t.layers);var n=C(this.serialize(),t).filter(function(t){return!(t.command in L)});if(0===n.length)return!1;var r=n.filter(function(t){return!(t.command in M)});if(r.length>0)throw new Error("Unimplemented: ".concat(r.map(function(t){return t.command}).join(", "),"."));return n.forEach(function(t){"setTransition"!==t.command&&e[t.command].apply(e,t.args)}),this.stylesheet=t,!0}},{key:"addImage",value:function(t,e){if(this.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"})}},{key:"getImage",value:function(t){return this.imageManager.getImage(t)}},{key:"removeImage",value:function(t){if(!this.getImage(t))return this.fire("error",{error:new Error("No image with this name exists.")});this.imageManager.removeImage(t),this.fire("data",{dataType:"style"})}},{key:"addSource",value:function(t,e,n){var r=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: ".concat(Object.keys(e).join(", "),"."));if(!(["vector","raster","geojson","video","image","canvas"].indexOf(e.type)>=0)||!this._validate(_.source,"sources.".concat(t),e,null,n)){var i=this.sourceCaches[t]=new T(t,e,this.dispatcher);i.style=this,i.setEventedParent(this,function(){return{isSourceLoaded:r.loaded(),source:i.serialize(),sourceId:t}}),i.onAdd(this.map),this._changed=!0}}},{key:"removeSource",value:function(t){if(this._checkLoaded(),void 0===this.sourceCaches[t])throw new Error("There is no source with this ID");for(var e in this._layers)if(this._layers[e].source===t)return this.fire("error",{error:new Error('Source "'.concat(t,'" cannot be removed while layer "').concat(e,'" is using it.'))});var n=this.sourceCaches[t];delete this.sourceCaches[t],delete this._updatedSources[t],n.fire("data",{sourceDataType:"metadata",dataType:"source",sourceId:t}),n.setEventedParent(null),n.clearTiles(),n.onRemove&&n.onRemove(this.map),this._changed=!0}},{key:"setGeoJSONSourceData",value:function(t,e){this._checkLoaded(),u(void 0!==this.sourceCaches[t],"There is no source with this ID");var n=this.sourceCaches[t].getSource();u("geojson"===n.type),n.setData(e),this._changed=!0}},{key:"getSource",value:function(t){return this.sourceCaches[t]&&this.sourceCaches[t].getSource()}},{key:"addLayer",value:function(t,e,n){this._checkLoaded();var i=t.id;if("object"===r(t.source)&&(this.addSource(i,t.source),t=m.clone(t),t=m.extend(t,{source:i})),!this._validate(_.layer,"layers.".concat(i),t,{arrayIndex:-1},n)){var o=c.create(t);this._validateLayer(o),o.setEventedParent(this,{layer:{id:i}});var a=e?this._order.indexOf(e):this._order.length;if(e&&-1===a)this.fire("error",{error:new Error('Layer with id "'.concat(e,'" does not exist on this map.'))});else{if(this._order.splice(a,0,i),this._layerOrderChanged=!0,this._layers[i]=o,this._removedLayers[i]&&o.source){var s=this._removedLayers[i];delete this._removedLayers[i],s.type!==o.type?this._updatedSources[o.source]="clear":(this._updatedSources[o.source]="reload",this.sourceCaches[o.source].pause())}this._updateLayer(o)}}}},{key:"moveLayer",value:function(t,e){if(this._checkLoaded(),this._changed=!0,this._layers[t]){var n=this._order.indexOf(t);this._order.splice(n,1);var r=e?this._order.indexOf(e):this._order.length;e&&-1===r?this.fire("error",{error:new Error('Layer with id "'.concat(e,'" does not exist on this map.'))}):(this._order.splice(r,0,t),this._layerOrderChanged=!0)}else this.fire("error",{error:new Error("The layer '".concat(t,"' does not exist in ")+"the map's style and cannot be moved.")})}},{key:"removeLayer",value:function(t){this._checkLoaded();var e=this._layers[t];if(e){e.setEventedParent(null);var n=this._order.indexOf(t);this._order.splice(n,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 '".concat(t,"' does not exist in ")+"the map's style and cannot be removed.")})}},{key:"getLayer",value:function(t){return this._layers[t]}},{key:"setLayerZoomRange",value:function(t,e,n){this._checkLoaded();var r=this.getLayer(t);r?r.minzoom===e&&r.maxzoom===n||(null!=e&&(r.minzoom=e),null!=n&&(r.maxzoom=n),this._updateLayer(r)):this.fire("error",{error:new Error("The layer '".concat(t,"' does not exist in ")+"the map's style and cannot have zoom extent.")})}},{key:"setFilter",value:function(t,e){this._checkLoaded();var n=this.getLayer(t);if(n){if(!m.deepEqual(n.filter,e))return null==e?(n.filter=void 0,void this._updateLayer(n)):void(this._validate(_.filter,"layers.".concat(n.id,".filter"),e)||(n.filter=m.clone(e),this._updateLayer(n)))}else this.fire("error",{error:new Error("The layer '".concat(t,"' does not exist in ")+"the map's style and cannot be filtered.")})}},{key:"getFilter",value:function(t){return m.clone(this.getLayer(t).filter)}},{key:"setLayoutProperty",value:function(t,e,n){this._checkLoaded();var r=this.getLayer(t);r?m.deepEqual(r.getLayoutProperty(e),n)||(r.setLayoutProperty(e,n),this._updateLayer(r)):this.fire("error",{error:new Error("The layer '".concat(t,"' does not exist in ")+"the map's style and cannot be styled.")})}},{key:"getLayoutProperty",value:function(t,e){return this.getLayer(t).getLayoutProperty(e)}},{key:"setPaintProperty",value:function(t,e,n){this._checkLoaded();var r=this.getLayer(t);if(r){if(!m.deepEqual(r.getPaintProperty(e),n)){var i=r._transitionablePaint._values[e].value.isDataDriven();r.setPaintProperty(e,n),(r._transitionablePaint._values[e].value.isDataDriven()||i)&&this._updateLayer(r),this._changed=!0,this._updatedPaintProps[t]=!0}}else this.fire("error",{error:new Error("The layer '".concat(t,"' does not exist in ")+"the map's style and cannot be styled.")})}},{key:"getPaintProperty",value:function(t,e){return this.getLayer(t).getPaintProperty(e)}},{key:"getTransition",value:function(){return m.extend({duration:300,delay:0},this.stylesheet&&this.stylesheet.transition)}},{key:"serialize",value:function(){var t=this;return m.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:m.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})}},{key:"_updateLayer",value: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}},{key:"_flattenRenderedFeatures",value:function(t){for(var e=[],n=this._order.length-1;n>=0;n--){var r=this._order[n],i=!0,o=!1,a=void 0;try{for(var s,u=t[Symbol.iterator]();!(i=(s=u.next()).done);i=!0){var l=s.value[r];if(l){var c=!0,f=!1,h=void 0;try{for(var p,d=l[Symbol.iterator]();!(c=(p=d.next()).done);c=!0){var y=p.value;e.push(y)}}catch(t){f=!0,h=t}finally{try{c||null==d.return||d.return()}finally{if(f)throw h}}}}}catch(t){o=!0,a=t}finally{try{i||null==u.return||u.return()}finally{if(o)throw a}}}return e}},{key:"queryRenderedFeatures",value:function(t,e,n,r){e&&e.filter&&this._validate(_.filter,"queryRenderedFeatures.filter",e.filter);var i={};if(e&&e.layers){if(!Array.isArray(e.layers))return this.fire("error",{error:"parameters.layers must be an Array."}),[];var o=!0,a=!1,s=void 0;try{for(var u,l=e.layers[Symbol.iterator]();!(o=(u=l.next()).done);o=!0){var c=u.value,f=this._layers[c];if(!f)return this.fire("error",{error:"The layer '".concat(c,"' does not exist ")+"in the map's style and cannot be queried for features."}),[];i[f.source]=!0}}catch(t){a=!0,s=t}finally{try{o||null==l.return||l.return()}finally{if(a)throw s}}}var h=[];for(var p in this.sourceCaches)if(!e.layers||i[p]){var d=S.rendered(this.sourceCaches[p],this._layers,t,e,n,r,this.collisionIndex);h.push(d)}return this._flattenRenderedFeatures(h)}},{key:"querySourceFeatures",value:function(t,e){e&&e.filter&&this._validate(_.filter,"querySourceFeatures.filter",e.filter);var n=this.sourceCaches[t];return n?S.source(n,e):[]}},{key:"addSourceType",value:function(t,e,n){return w(t)?n(new Error('A source type called "'.concat(t,'" already exists.'))):(k(t,e),e.workerSourceURL?void this.dispatcher.broadcast("loadWorkerSource",{name:t,url:e.workerSourceURL},n):n(null,null))}},{key:"getLight",value:function(){return this.light.getLight()}},{key:"setLight",value:function(t){this._checkLoaded();var e=this.light.getLight(),n=!1;for(var r in t)if(!m.deepEqual(t[r],e[r])){n=!0;break}if(n){var i={now:b.now(),transition:m.extend({duration:300,delay:0},this.stylesheet.transition)};this.light.setLight(t),this.light.updateTransitions(i)}}},{key:"_validate",value:function(t,e,n,r,i){return(!i||!1!==i.validate)&&_.emitErrors(this,t.call(_,m.extend({key:e,style:this.serialize(),value:n,styleSpec:A},r)))}},{key:"_remove",value:function(){for(var t in P.evented.off("pluginAvailable",this._rtlTextPluginCallback),this.sourceCaches)this.sourceCaches[t].clearTiles();this.dispatcher.remove()}},{key:"_clearSource",value:function(t){this.sourceCaches[t].clearTiles()}},{key:"_reloadSource",value:function(t){this.sourceCaches[t].resume(),this.sourceCaches[t].reload()}},{key:"_updateSources",value:function(t){for(var e in this.sourceCaches)this.sourceCaches[e].update(t)}},{key:"_generateCollisionBoxes",value:function(){for(var t in this.sourceCaches)this._reloadSource(t)}},{key:"_updatePlacement",value:function(t,e,n){var r=this,i=!1,o=!1,a={},s=!0,u=!1,l=void 0;try{for(var c,f=this._order[Symbol.iterator]();!(s=(c=f.next()).done);s=!0){var h=c.value,p=this._layers[h];if("symbol"===p.type){a[p.source]||function(){var t=r.sourceCaches[p.source];a[p.source]=t.getRenderableIds().map(function(e){return t.getTileByID(e)}).sort(function(t,e){return e.tileID.overscaledZ-t.tileID.overscaledZ||(t.tileID.isLessThan(e.tileID)?-1:1)})}();var d=this.crossTileSymbolIndex.addLayer(p,a[p.source]);i=i||d}}}catch(t){u=!0,l=t}finally{try{s||null==f.return||f.return()}finally{if(u)throw l}}var y=this._layerOrderChanged;if((y||!this.pauseablePlacement||this.pauseablePlacement.isDone()&&!this.placement.stillRecent(b.now()))&&(this.pauseablePlacement=new O(t,this._order,y,e,n),this._layerOrderChanged=!1),this.pauseablePlacement.isDone())this.placement.setStale();else{if(this.pauseablePlacement.continuePlacement(this._order,this._layers,a),this.pauseablePlacement.isDone()){var m=this.pauseablePlacement.placement;o=m.commit(this.placement,b.now()),(!this.placement||o||i)&&(this.placement=m,this.collisionIndex=this.placement.collisionIndex),this.placement.setRecent(b.now(),m.stale)}i&&this.pauseablePlacement.placement.setStale()}if(o||i){var v=!0,g=!1,x=void 0;try{for(var _,w=this._order[Symbol.iterator]();!(v=(_=w.next()).done);v=!0){var k=_.value,S=this._layers[k];"symbol"===S.type&&this.placement.updateLayerOpacities(S,a[S.source])}}catch(t){g=!0,x=t}finally{try{v||null==w.return||w.return()}finally{if(g)throw x}}}return!this.pauseablePlacement.isDone()||this.placement.hasTransitions(b.now())}},{key:"getImages",value:function(t,e,n){this.imageManager.getImages(e.icons,n)}},{key:"getGlyphs",value:function(t,e,n){this.glyphManager.getGlyphs(e.stacks,n)}}])&&i(n.prototype,B),R&&i(n,R),e}();t.exports=B},function(t,e,n){t.exports=n(141),t.exports.emitErrors=function(t,e){if(e&&e.length){var n=!0,r=!1,i=void 0;try{for(var o,a=e[Symbol.iterator]();!(n=(o=a.next()).done);n=!0){var s=o.value.message;t.fire("error",{error:new Error(s)})}}catch(t){r=!0,i=t}finally{try{n||null==a.return||a.return()}finally{if(r)throw i}}return!0}return!1}},function(t,e,n){function r(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,r.key,r)}}var i=n(1),o=n(78),a=n(25).Color,s=["Unknown","Point","LineString","Polygon"],u=function(){function t(){!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,t),this.scope=new o,this._parseColorCache={}}var e,n,u;return e=t,(n=[{key:"id",value:function(){return this.feature&&"id"in this.feature?this.feature.id:null}},{key:"geometryType",value:function(){return this.feature?"number"==typeof this.feature.type?s[this.feature.type]:this.feature.type:null}},{key:"properties",value:function(){return this.feature&&this.feature.properties||{}}},{key:"pushScope",value:function(t){this.scope=this.scope.concat(t)}},{key:"popScope",value:function(){i(this.scope.parent),this.scope=this.scope.parent}},{key:"parseColor",value:function(t){var e=this._parseColorCache[t];return e||(e=this._parseColorCache[t]=a.parse(t)),e}}])&&r(e.prototype,n),u&&r(e,u),t}();t.exports=u},function(t,e,n){function r(t){return function(t){if(Array.isArray(t)){for(var e=0,n=new Array(t.length);e<t.length;e++)n[e]=t[e];return n}}(t)||i(t)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance")}()}function i(t){if(Symbol.iterator in Object(t)||"[object Arguments]"===Object.prototype.toString.call(t))return Array.from(t)}function o(t,e){return s(t)||function(t,e){var n=[],r=!0,i=!1,o=void 0;try{for(var a,s=t[Symbol.iterator]();!(r=(a=s.next()).done)&&(n.push(a.value),!e||n.length!==e);r=!0);}catch(t){i=!0,o=t}finally{try{r||null==s.return||s.return()}finally{if(i)throw o}}return n}(t,e)||a()}function a(){throw new TypeError("Invalid attempt to destructure non-iterable instance")}function s(t){if(Array.isArray(t))return t}function u(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,r.key,r)}}var l=n(73),c=n(26),f=n(8),h=f.toString,p=f.NumberType,d=n(87).findStopLessThanOrEqualTo,y=function(){function t(e,n,r,i){!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,t),this.type=e,this.interpolation=n,this.input=r,this.labels=[],this.outputs=[];var a=!0,s=!1,u=void 0;try{for(var l,c=i[Symbol.iterator]();!(a=(l=c.next()).done);a=!0){var f=o(l.value,2),h=f[0],p=f[1];this.labels.push(h),this.outputs.push(p)}}catch(t){s=!0,u=t}finally{try{a||null==c.return||c.return()}finally{if(s)throw u}}}var e,n,f;return e=t,f=[{key:"interpolationFactor",value:function(t,e,n,r){var i=0;if("exponential"===t.name)i=m(e,t.base,n,r);else if("linear"===t.name)i=m(e,1,n,r);else if("cubic-bezier"===t.name){var o=t.controlPoints;i=new l(o[0],o[1],o[2],o[3]).solve(m(e,1,n,r))}return i}},{key:"parse",value:function(e,n){var r,o=s(r=e)||i(r)||a(),u=o[1],l=o[2],c=o.slice(3);if(!Array.isArray(u)||0===u.length)return n.error("Expected an interpolation type expression.",1);if("linear"===u[0])u={name:"linear"};else if("exponential"===u[0]){var f=u[1];if("number"!=typeof f)return n.error("Exponential interpolation requires a numeric base.",1,1);u={name:"exponential",base:f}}else{if("cubic-bezier"!==u[0])return n.error("Unknown interpolation type ".concat(String(u[0])),1,0);var d=u.slice(1);if(4!==d.length||d.some(function(t){return"number"!=typeof t||t<0||t>1}))return n.error("Cubic bezier interpolation requires four numeric arguments with values between 0 and 1.",1);u={name:"cubic-bezier",controlPoints:d}}if(e.length-1<4)return n.error("Expected at least 4 arguments, but found only ".concat(e.length-1,"."));if((e.length-1)%2!=0)return n.error("Expected an even number of arguments.");if(!(l=n.parse(l,2,p)))return null;var y=[],m=null;n.expectedType&&"value"!==n.expectedType.kind&&(m=n.expectedType);for(var v=0;v<c.length;v+=2){var g=c[v],b=c[v+1],x=v+3,_=v+4;if("number"!=typeof g)return n.error('Input/output pairs for "interpolate" expressions must be defined using literal numeric values (not computed expressions) for the input values.',x);if(y.length&&y[y.length-1][0]>=g)return n.error('Input/output pairs for "interpolate" expressions must be arranged with input values in strictly ascending order.',x);var w=n.parse(b,_,m);if(!w)return null;m=m||w.type,y.push([g,w])}return"number"===m.kind||"color"===m.kind||"array"===m.kind&&"number"===m.itemType.kind&&"number"==typeof m.N?new t(m,u,l,y):n.error("Type ".concat(h(m)," is not interpolatable."))}}],(n=[{key:"evaluate",value:function(e){var n=this.labels,r=this.outputs;if(1===n.length)return r[0].evaluate(e);var i=this.input.evaluate(e);if(i<=n[0])return r[0].evaluate(e);var o=n.length;if(i>=n[o-1])return r[o-1].evaluate(e);var a=d(n,i),s=n[a],u=n[a+1],l=t.interpolationFactor(this.interpolation,i,s,u),f=r[a].evaluate(e),h=r[a+1].evaluate(e);return c[this.type.kind.toLowerCase()](f,h,l)}},{key:"eachChild",value:function(t){t(this.input);var e=!0,n=!1,r=void 0;try{for(var i,o=this.outputs[Symbol.iterator]();!(e=(i=o.next()).done);e=!0){t(i.value)}}catch(t){n=!0,r=t}finally{try{e||null==o.return||o.return()}finally{if(n)throw r}}}},{key:"possibleOutputs",value:function(){var t;return(t=[]).concat.apply(t,r(this.outputs.map(function(t){return t.possibleOutputs()})))}}])&&u(e.prototype,n),f&&u(e,f),t}();function m(t,e,n,r){var i=r-n,o=t-n;return 0===i?0:1===e?o/i:(Math.pow(e,o)-1)/(Math.pow(e,i)-1)}t.exports=y},function(t,e,n){function r(t){return(r="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t})(t)}var i=n(147),o=n(12),a=n(41),s=n(17),u=n(26),l=n(56);function c(t){return t}function f(t,e,n){return void 0!==t?t:void 0!==e?e:void 0!==n?n:void 0}function h(t,e,n,i,o){return f(r(n)===o?i[n]:void 0,t.default,e.default)}function p(t,e,n){if("number"!==s(n))return f(t.default,e.default);var r=t.stops.length;if(1===r)return t.stops[0][1];if(n<=t.stops[0][0])return t.stops[0][1];if(n>=t.stops[r-1][0])return t.stops[r-1][1];var i=m(t.stops,n);return t.stops[i][1]}function d(t,e,n){var r=void 0!==t.base?t.base:1;if("number"!==s(n))return f(t.default,e.default);var o=t.stops.length;if(1===o)return t.stops[0][1];if(n<=t.stops[0][0])return t.stops[0][1];if(n>=t.stops[o-1][0])return t.stops[o-1][1];var a=m(t.stops,n),l=function(t,e,n,r){var i=r-n,o=t-n;return 0===i?0:1===e?o/i:(Math.pow(e,o)-1)/(Math.pow(e,i)-1)}(n,r,t.stops[a][0],t.stops[a+1][0]),h=t.stops[a][1],p=t.stops[a+1][1],d=u[e.type]||c;if(t.colorSpace&&"rgb"!==t.colorSpace){var y=i[t.colorSpace];d=function(t,e){return y.reverse(y.interpolate(y.forward(t),y.forward(e),l))}}return"function"==typeof h.evaluate?{evaluate:function(){for(var t=arguments.length,e=new Array(t),n=0;n<t;n++)e[n]=arguments[n];var r=h.evaluate.apply(void 0,e),i=p.evaluate.apply(void 0,e);if(void 0!==r&&void 0!==i)return d(r,i,l)}}:d(h,p,l)}function y(t,e,n){return"color"===e.type?n=o.parse(n):s(n)===e.type||"enum"===e.type&&e.values[n]||(n=void 0),f(n,t.default,e.default)}function m(t,e){for(var n,r,i=0,o=t.length-1,a=0;i<=o;){if(n=t[a=Math.floor((i+o)/2)][0],r=t[a+1][0],e===n||e>n&&e<r)return a;n<e?i=a+1:n>e&&(o=a-1)}return Math.max(a-1,0)}t.exports={createFunction:function t(e,n){var s,u,c,m="color"===n.type,v=e.stops&&"object"===r(e.stops[0][0]),g=v||void 0!==e.property,b=v||!g,x=e.type||("interpolated"===n.function?"exponential":"interval");if(m&&((e=a({},e)).stops&&(e.stops=e.stops.map(function(t){return[t[0],o.parse(t[1])]})),e.default?e.default=o.parse(e.default):e.default=o.parse(n.default)),e.colorSpace&&"rgb"!==e.colorSpace&&!i[e.colorSpace])throw new Error("Unknown color space: ".concat(e.colorSpace));if("exponential"===x)s=d;else if("interval"===x)s=p;else if("categorical"===x){s=h,u=Object.create(null);var _=!0,w=!1,k=void 0;try{for(var S,T=e.stops[Symbol.iterator]();!(_=(S=T.next()).done);_=!0){var A=S.value;u[A[0]]=A[1]}}catch(t){w=!0,k=t}finally{try{_||null==T.return||T.return()}finally{if(w)throw k}}c=r(e.stops[0][0])}else{if("identity"!==x)throw new Error('Unknown function type "'.concat(x,'"'));s=y}if(v){for(var E={},z=[],C=0;C<e.stops.length;C++){var P=e.stops[C],O=P[0].zoom;void 0===E[O]&&(E[O]={zoom:O,type:e.type,property:e.property,default:e.default,stops:[]},z.push(O)),E[O].stops.push([P[0].value,P[1]])}for(var I=[],j=0,M=z;j<M.length;j++){var L=M[j];I.push([E[L].zoom,t(E[L],n)])}return{kind:"composite",interpolationFactor:l.interpolationFactor.bind(void 0,{name:"linear"}),zoomStops:I.map(function(t){return t[0]}),evaluate:function(t,r){var i=t.zoom;return d({stops:I,base:e.base},n,i).evaluate(i,r)}}}return b?{kind:"camera",interpolationFactor:"exponential"===x?l.interpolationFactor.bind(void 0,{name:"exponential",base:void 0!==e.base?e.base:1}):function(){return 0},zoomStops:e.stops.map(function(t){return t[0]}),evaluate:function(t){var r=t.zoom;return s(e,n,r,u,c)}}:{kind:"source",evaluate:function(t,r){var i=r&&r.properties?r.properties[e.property]:void 0;return void 0===i?f(e.default,n.default):s(e,n,i,u,c)}}},isFunction:function(t){return"object"===r(t)&&null!==t&&!Array.isArray(t)}}},function(t,e,n){var r=n(7),i=n(24);t.exports=function(t){var e=t.key,n=t.value,o=t.valueSpec,a=[];return Array.isArray(o.values)?-1===o.values.indexOf(i(n))&&a.push(new r(e,n,"expected one of [".concat(o.values.join(", "),"], ").concat(JSON.stringify(n)," found"))):-1===Object.keys(o.values).indexOf(i(n))&&a.push(new r(e,n,"expected one of [".concat(Object.keys(o.values).join(", "),"], ").concat(JSON.stringify(n)," found"))),a}},function(t,e,n){var r=n(7),i=n(94),o=n(58),a=n(17),s=n(24),u=n(41),l=n(60).isExpressionFilter;t.exports=function(t){return l(s.deep(t.value))?i(u({},t,{expressionContext:"filter",valueSpec:{value:"boolean"}})):function t(e){var n=e.value;var i=e.key;if("array"!==a(n))return[new r(i,n,"array expected, ".concat(a(n)," found"))];var u=e.styleSpec;var l;var c=[];if(n.length<1)return[new r(i,n,"filter array must have at least 1 element")];c=c.concat(o({key:"".concat(i,"[0]"),value:n[0],valueSpec:u.filter_operator,style:e.style,styleSpec:e.styleSpec}));switch(s(n[0])){case"<":case"<=":case">":case">=":n.length>=2&&"$type"===s(n[1])&&c.push(new r(i,n,'"$type" cannot be use with operator "'.concat(n[0],'"')));case"==":case"!=":3!==n.length&&c.push(new r(i,n,'filter array for operator "'.concat(n[0],'" must have 3 elements')));case"in":case"!in":n.length>=2&&"string"!==(l=a(n[1]))&&c.push(new r("".concat(i,"[1]"),n[1],"string expected, ".concat(l," found")));for(var f=2;f<n.length;f++)l=a(n[f]),"$type"===s(n[1])?c=c.concat(o({key:"".concat(i,"[").concat(f,"]"),value:n[f],valueSpec:u.geometry_type,style:e.style,styleSpec:e.styleSpec})):"string"!==l&&"number"!==l&&"boolean"!==l&&c.push(new r("".concat(i,"[").concat(f,"]"),n[f],"string, number, or boolean expected, ".concat(l," found")));break;case"any":case"all":case"none":for(var h=1;h<n.length;h++)c=c.concat(t({key:"".concat(i,"[").concat(h,"]"),value:n[h],style:e.style,styleSpec:e.styleSpec}));break;case"has":case"!has":l=a(n[1]),2!==n.length?c.push(new r(i,n,'filter array for "'.concat(n[0],'" operator must have 2 elements'))):"string"!==l&&c.push(new r("".concat(i,"[1]"),n[1],"string expected, ".concat(l," found")))}return c}(t)}},function(t,e,n){function r(t){return(r="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t})(t)}var i=n(30).createExpression;function o(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":var e=!0,n=!1,r=void 0;try{for(var i,a=t.slice(1)[Symbol.iterator]();!(e=(i=a.next()).done);e=!0){var s=i.value;if(!o(s)&&"boolean"!=typeof s)return!1}}catch(t){n=!0,r=t}finally{try{e||null==a.return||a.return()}finally{if(n)throw r}}return!0;default:return!0}}t.exports=function(t){if(!t)return function(){return!0};o(t)||(t=u(t));var e=i(t,a);if("error"===e.result)throw new Error(e.value.map(function(t){return"".concat(t.key,": ").concat(t.message)}).join(", "));return function(t,n){return e.value.evaluate(t,n)}},t.exports.isExpressionFilter=o;var a={type:"boolean",default:!1,function:!0,"property-function":!0,"zoom-function":!0};function s(t,e){return t<e?-1:t>e?1:0}function u(t){if(!t)return!0;var e,n=t[0];return t.length<=1?"any"!==n:"=="===n?l(t[1],t[2],"=="):"!="===n?h(l(t[1],t[2],"==")):"<"===n||">"===n||"<="===n||">="===n?l(t[1],t[2],n):"any"===n?(e=t.slice(1),["any"].concat(e.map(u))):"all"===n?["all"].concat(t.slice(1).map(u)):"none"===n?["all"].concat(t.slice(1).map(u).map(h)):"in"===n?c(t[1],t.slice(2)):"!in"===n?h(c(t[1],t.slice(2))):"has"===n?f(t[1]):"!has"!==n||h(f(t[1]))}function l(t,e,n){switch(t){case"$type":return["filter-type-".concat(n),e];case"$id":return["filter-id-".concat(n),e];default:return["filter-".concat(n),t,e]}}function c(t,e){if(0===e.length)return!1;switch(t){case"$type":return["filter-type-in",["literal",e]];case"$id":return["filter-id-in",["literal",e]];default:return e.length>200&&!e.some(function(t){return r(t)!==r(e[0])})?["filter-in-large",t,["literal",e.sort(s)]]:["filter-in-small",t,["literal",e]]}}function f(t){switch(t){case"$type":return!0;case"$id":return["filter-has-id"];default:return["filter-has",t]}}function h(t){return["!",t]}},function(t,e,n){function r(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,r.key,r)}}var i=n(108),o=function(){function t(e,n){!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,t),this.zoom=e,n?(this.now=n.now,this.fadeDuration=n.fadeDuration,this.zoomHistory=n.zoomHistory,this.transition=n.transition):(this.now=0,this.fadeDuration=0,this.zoomHistory=new i,this.transition={})}var e,n,o;return e=t,(n=[{key:"crossFadingFactor",value:function(){return 0===this.fadeDuration?1:Math.min((this.now-this.zoomHistory.lastIntegerZoomTime)/this.fadeDuration,1)}}])&&r(e.prototype,n),o&&r(e,o),t}();t.exports=o},function(t,e,n){function r(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function i(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,r.key,r)}}function o(t,e,n){return e&&i(t.prototype,e),n&&i(t,n),t}var a=n(175),s=a.symbolLayoutAttributes,u=a.collisionVertexAttributes,l=a.collisionBoxLayout,c=a.collisionCircleLayout,f=a.dynamicLayoutAttributes,h=n(14),p=h.SymbolLayoutArray,d=h.SymbolDynamicLayoutArray,y=h.SymbolOpacityArray,m=h.CollisionBoxLayoutArray,v=h.CollisionCircleLayoutArray,g=h.CollisionVertexArray,b=h.PlacedSymbolArray,x=h.GlyphOffsetArray,_=h.SymbolLineVertexArray,w=n(3),k=n(36).SegmentVector,S=n(32).ProgramConfigurationSet,T=n(37),A=T.TriangleIndexArray,E=T.LineIndexArray,z=n(176),C=n(177),P=n(63),O=n(38),I=n(48).VectorTileFeature.types,j=n(110),M=(n(178),n(50).getSizeData),L=n(11).register,B=[{name:"a_fade_opacity",components:1,type:"Uint8",offset:0}];function R(t,e,n,r,i,o,a,s){t.emplaceBack(e,n,Math.round(64*r),Math.round(64*i),o,a,s?s[0]:0,s?s[1]:0)}function D(t,e,n){t.emplaceBack(e.x,e.y,n),t.emplaceBack(e.x,e.y,n),t.emplaceBack(e.x,e.y,n),t.emplaceBack(e.x,e.y,n)}var F=function(){function t(e){r(this,t),this.layoutVertexArray=new p,this.indexArray=new A,this.programConfigurations=e,this.segments=new k,this.dynamicLayoutVertexArray=new d,this.opacityVertexArray=new y,this.placedSymbolArray=new b}return o(t,[{key:"upload",value:function(t,e){this.layoutVertexBuffer=t.createVertexBuffer(this.layoutVertexArray,s.members),this.indexBuffer=t.createIndexBuffer(this.indexArray,e),this.programConfigurations.upload(t),this.dynamicLayoutVertexBuffer=t.createVertexBuffer(this.dynamicLayoutVertexArray,f.members,!0),this.opacityVertexBuffer=t.createVertexBuffer(this.opacityVertexArray,B,!0),this.opacityVertexBuffer.itemSize=1}},{key:"destroy",value:function(){this.layoutVertexBuffer&&(this.layoutVertexBuffer.destroy(),this.indexBuffer.destroy(),this.programConfigurations.destroy(),this.segments.destroy(),this.dynamicLayoutVertexBuffer.destroy(),this.opacityVertexBuffer.destroy())}}]),t}();L("SymbolBuffers",F);var V=function(){function t(e,n,i){r(this,t),this.layoutVertexArray=new e,this.layoutAttributes=n,this.indexArray=new i,this.segments=new k,this.collisionVertexArray=new g}return o(t,[{key:"upload",value:function(t){this.layoutVertexBuffer=t.createVertexBuffer(this.layoutVertexArray,this.layoutAttributes),this.indexBuffer=t.createIndexBuffer(this.indexArray),this.collisionVertexBuffer=t.createVertexBuffer(this.collisionVertexArray,u.members,!0)}},{key:"destroy",value:function(){this.layoutVertexBuffer&&(this.layoutVertexBuffer.destroy(),this.indexBuffer.destroy(),this.segments.destroy(),this.collisionVertexBuffer.destroy())}}]),t}();L("CollisionBuffers",V);var N=function(){function t(e){r(this,t),this.collisionBoxArray=e.collisionBoxArray,this.zoom=e.zoom,this.overscaling=e.overscaling,this.layers=e.layers,this.layerIds=this.layers.map(function(t){return t.id}),this.index=e.index,this.pixelRatio=e.pixelRatio;var n=this.layers[0]._unevaluatedLayout._values;this.textSizeData=M(this.zoom,n["text-size"]),this.iconSizeData=M(this.zoom,n["icon-size"]);var i=this.layers[0].layout;this.sortFeaturesByY=i.get("text-allow-overlap")||i.get("icon-allow-overlap")||i.get("text-ignore-placement")||i.get("icon-ignore-placement")}return o(t,[{key:"createArrays",value:function(){this.text=new F(new S(s.members,this.layers,this.zoom,function(t){return/^text/.test(t)})),this.icon=new F(new S(s.members,this.layers,this.zoom,function(t){return/^icon/.test(t)})),this.collisionBox=new V(m,l.members,E),this.collisionCircle=new V(v,c.members,A),this.glyphOffsetArray=new x,this.lineVertexArray=new _}},{key:"populate",value:function(t,e){var n=this.layers[0],r=n.layout,i=r.get("text-font"),o=r.get("text-field"),a=r.get("icon-image"),s=("constant"!==o.value.kind||o.value.value.length>0)&&("constant"!==i.value.kind||i.value.value.length>0),u="constant"!==a.value.kind||a.value.value&&a.value.value.length>0;if(this.features=[],s||u){var l=e.iconDependencies,c=e.glyphDependencies,f={zoom:this.zoom},h=!0,p=!1,d=void 0;try{for(var y,m=t[Symbol.iterator]();!(h=(y=m.next()).done);h=!0){var v=y.value,g=v.feature,b=v.index,x=v.sourceLayerIndex;if(n._featureFilter(f,g)){var _=void 0;s&&(_=n.getValueAndResolveTokens("text-field",g),_=z(_,n,g));var w=void 0;if(u&&(w=n.getValueAndResolveTokens("icon-image",g)),_||w){var k={text:_,icon:w,index:b,sourceLayerIndex:x,geometry:O(g),properties:g.properties,type:I[g.type]};if(void 0!==g.id&&(k.id=g.id),this.features.push(k),w&&(l[w]=!0),_)for(var S=i.evaluate(g).join(","),T=c[S]=c[S]||{},A="map"===r.get("text-rotation-alignment")&&"line"===r.get("symbol-placement"),E=P.allowsVerticalWritingMode(_),M=0;M<_.length;M++)if(T[_.charCodeAt(M)]=!0,A&&E){var L=j.lookup[_.charAt(M)];L&&(T[L.charCodeAt(0)]=!0)}}}}}catch(t){p=!0,d=t}finally{try{h||null==m.return||m.return()}finally{if(p)throw d}}"line"===r.get("symbol-placement")&&(this.features=C(this.features))}}},{key:"isEmpty",value:function(){return 0===this.symbolInstances.length}},{key:"upload",value:function(t){this.text.upload(t,this.sortFeaturesByY),this.icon.upload(t,this.sortFeaturesByY),this.collisionBox.upload(t),this.collisionCircle.upload(t)}},{key:"destroy",value:function(){this.text.destroy(),this.icon.destroy(),this.collisionBox.destroy(),this.collisionCircle.destroy()}},{key:"addToLineVertexArray",value:function(t,e){var n=this.lineVertexArray.length;if(void 0!==t.segment){for(var r=t.dist(e[t.segment+1]),i=t.dist(e[t.segment]),o={},a=t.segment+1;a<e.length;a++)o[a]={x:e[a].x,y:e[a].y,tileUnitDistanceFromAnchor:r},a<e.length-1&&(r+=e[a+1].dist(e[a]));for(var s=t.segment||0;s>=0;s--)o[s]={x:e[s].x,y:e[s].y,tileUnitDistanceFromAnchor:i},s>0&&(i+=e[s-1].dist(e[s]));for(var u=0;u<e.length;u++){var l=o[u];this.lineVertexArray.emplaceBack(l.x,l.y,l.tileUnitDistanceFromAnchor)}}return{lineStartIndex:n,lineLength:this.lineVertexArray.length-n}}},{key:"addSymbols",value:function(t,e,n,r,i,o,a,s,u,l){var c=t.indexArray,f=t.layoutVertexArray,h=t.dynamicLayoutVertexArray,p=t.segments.prepareSegment(4*e.length,t.layoutVertexArray,t.indexArray),d=this.glyphOffsetArray.length,y=p.vertexLength,m=!0,v=!1,g=void 0;try{for(var b,x=e[Symbol.iterator]();!(m=(b=x.next()).done);m=!0){var _=b.value,w=_.tl,k=_.tr,S=_.bl,T=_.br,A=_.tex,E=p.vertexLength,z=_.glyphOffset[1];R(f,s.x,s.y,w.x,z+w.y,A.x,A.y,n),R(f,s.x,s.y,k.x,z+k.y,A.x+A.w,A.y,n),R(f,s.x,s.y,S.x,z+S.y,A.x,A.y+A.h,n),R(f,s.x,s.y,T.x,z+T.y,A.x+A.w,A.y+A.h,n),D(h,s,0),c.emplaceBack(E,E+1,E+2),c.emplaceBack(E+1,E+2,E+3),p.vertexLength+=4,p.primitiveLength+=2,this.glyphOffsetArray.emplaceBack(_.glyphOffset[0])}}catch(t){v=!0,g=t}finally{try{m||null==x.return||x.return()}finally{if(v)throw g}}t.placedSymbolArray.emplaceBack(s.x,s.y,d,this.glyphOffsetArray.length-d,y,u,l,s.segment,n?n[0]:0,n?n[1]:0,r[0],r[1],a,!1),t.programConfigurations.populatePaintArrays(t.layoutVertexArray.length,o)}},{key:"_addCollisionDebugVertex",value:function(t,e,n,r,i){return e.emplaceBack(0,0),t.emplaceBack(n.x,n.y,r.x,r.y,Math.round(i.x),Math.round(i.y))}},{key:"addCollisionDebugVertices",value:function(t,e,n,r,i,o,a,s){var u=i.segments.prepareSegment(4,i.layoutVertexArray,i.indexArray),l=u.vertexLength,c=i.layoutVertexArray,f=i.collisionVertexArray;if(this._addCollisionDebugVertex(c,f,o,a.anchor,new w(t,e)),this._addCollisionDebugVertex(c,f,o,a.anchor,new w(n,e)),this._addCollisionDebugVertex(c,f,o,a.anchor,new w(n,r)),this._addCollisionDebugVertex(c,f,o,a.anchor,new w(t,r)),u.vertexLength+=4,s){var h=i.indexArray;h.emplaceBack(l,l+1,l+2),h.emplaceBack(l,l+2,l+3),u.primitiveLength+=2}else{var p=i.indexArray;p.emplaceBack(l,l+1),p.emplaceBack(l+1,l+2),p.emplaceBack(l+2,l+3),p.emplaceBack(l+3,l),u.primitiveLength+=4}}},{key:"generateCollisionDebugBuffers",value:function(){var t=!0,e=!1,n=void 0;try{for(var r,i=this.symbolInstances[Symbol.iterator]();!(t=(r=i.next()).done);t=!0){var o=r.value;o.textCollisionFeature={boxStartIndex:o.textBoxStartIndex,boxEndIndex:o.textBoxEndIndex},o.iconCollisionFeature={boxStartIndex:o.iconBoxStartIndex,boxEndIndex:o.iconBoxEndIndex};for(var a=0;a<2;a++){var s=o[0===a?"textCollisionFeature":"iconCollisionFeature"];if(s)for(var u=s.boxStartIndex;u<s.boxEndIndex;u++){var l=this.collisionBoxArray.get(u),c=l.x1,f=l.y1,h=l.x2,p=l.y2,d=l.radius>0;this.addCollisionDebugVertices(c,f,h,p,d?this.collisionCircle:this.collisionBox,l.anchorPoint,o,d)}}}}catch(t){e=!0,n=t}finally{try{t||null==i.return||i.return()}finally{if(e)throw n}}}},{key:"deserializeCollisionBoxes",value:function(t,e,n,r,i){for(var o={},a=e;a<n;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 u=r;u<i;u++){var l=t.get(u);if(0===l.radius){o.iconBox={x1:l.x1,y1:l.y1,x2:l.x2,y2:l.y2,anchorPointX:l.anchorPointX,anchorPointY:l.anchorPointY};break}}return o}},{key:"hasTextData",value:function(){return this.text.segments.get().length>0}},{key:"hasIconData",value:function(){return this.icon.segments.get().length>0}},{key:"hasCollisionBoxData",value:function(){return this.collisionBox.segments.get().length>0}},{key:"hasCollisionCircleData",value:function(){return this.collisionCircle.segments.get().length>0}},{key:"sortFeatures",value: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 n=[],r=0;r<this.symbolInstances.length;r++)n.push(r);var i=Math.sin(t),o=Math.cos(t);n.sort(function(t,n){var r=e.symbolInstances[t],a=e.symbolInstances[n];return(i*r.anchor.x+o*r.anchor.y|0)-(i*a.anchor.x+o*a.anchor.y|0)||a.featureIndex-r.featureIndex}),this.text.indexArray.clear(),this.icon.indexArray.clear();for(var a=0,s=n;a<s.length;a++){var u=s[a],l=this.symbolInstances[u],c=!0,f=!1,h=void 0;try{for(var p,d=l.placedTextSymbolIndices[Symbol.iterator]();!(c=(p=d.next()).done);c=!0)for(var y=p.value,m=this.text.placedSymbolArray.get(y),v=m.vertexStartIndex+4*m.numGlyphs,g=m.vertexStartIndex;g<v;g+=4)this.text.indexArray.emplaceBack(g,g+1,g+2),this.text.indexArray.emplaceBack(g+1,g+2,g+3)}catch(t){f=!0,h=t}finally{try{c||null==d.return||d.return()}finally{if(f)throw h}}var b=this.icon.placedSymbolArray.get(u);if(b.numGlyphs){var x=b.vertexStartIndex;this.icon.indexArray.emplaceBack(x,x+1,x+2),this.icon.indexArray.emplaceBack(x+1,x+2,x+3)}}this.text.indexBuffer&&this.text.indexBuffer.updateData(this.text.indexArray),this.icon.indexBuffer&&this.icon.indexBuffer.updateData(this.icon.indexArray)}}}]),t}();L("SymbolBucket",N,{omit:["layers","collisionBoxArray","features","compareText"],shallow:["symbolInstances"]}),N.MAX_GLYPHS=65535,N.addDynamicAttributes=D,t.exports=N},function(t,e,n){var r=n(109);t.exports.allowsIdeographicBreaking=function(t){var n=!0,r=!1,i=void 0;try{for(var o,a=t[Symbol.iterator]();!(n=(o=a.next()).done);n=!0){var s=o.value;if(!e.charAllowsIdeographicBreaking(s.charCodeAt(0)))return!1}}catch(t){r=!0,i=t}finally{try{n||null==a.return||a.return()}finally{if(r)throw i}}return!0},t.exports.allowsVerticalWritingMode=function(t){var n=!0,r=!1,i=void 0;try{for(var o,a=t[Symbol.iterator]();!(n=(o=a.next()).done);n=!0){var s=o.value;if(e.charHasUprightVerticalOrientation(s.charCodeAt(0)))return!0}}catch(t){r=!0,i=t}finally{try{n||null==a.return||a.return()}finally{if(r)throw i}}return!1},t.exports.allowsLetterSpacing=function(t){var n=!0,r=!1,i=void 0;try{for(var o,a=t[Symbol.iterator]();!(n=(o=a.next()).done);n=!0){var s=o.value;if(!e.charAllowsLetterSpacing(s.charCodeAt(0)))return!1}}catch(t){r=!0,i=t}finally{try{n||null==a.return||a.return()}finally{if(r)throw i}}return!0},t.exports.charAllowsLetterSpacing=function(t){return!r.Arabic(t)&&(!r["Arabic Supplement"](t)&&(!r["Arabic Extended-A"](t)&&(!r["Arabic Presentation Forms-A"](t)&&!r["Arabic Presentation Forms-B"](t))))},t.exports.charAllowsIdeographicBreaking=function(t){return!(t<11904)&&(!!r["Bopomofo Extended"](t)||(!!r.Bopomofo(t)||(!!r["CJK Compatibility Forms"](t)||(!!r["CJK Compatibility Ideographs"](t)||(!!r["CJK Compatibility"](t)||(!!r["CJK Radicals Supplement"](t)||(!!r["CJK Strokes"](t)||(!!r["CJK Symbols and Punctuation"](t)||(!!r["CJK Unified Ideographs Extension A"](t)||(!!r["CJK Unified Ideographs"](t)||(!!r["Enclosed CJK Letters and Months"](t)||(!!r["Halfwidth and Fullwidth Forms"](t)||(!!r.Hiragana(t)||(!!r["Ideographic Description Characters"](t)||(!!r["Kangxi Radicals"](t)||(!!r["Katakana Phonetic Extensions"](t)||(!!r.Katakana(t)||(!!r["Vertical Forms"](t)||(!!r["Yi Radicals"](t)||!!r["Yi Syllables"](t))))))))))))))))))))},e.charHasUprightVerticalOrientation=function(t){return 746===t||747===t||!(t<4352)&&(!!r["Bopomofo Extended"](t)||(!!r.Bopomofo(t)||(!(!r["CJK Compatibility Forms"](t)||t>=65097&&t<=65103)||(!!r["CJK Compatibility Ideographs"](t)||(!!r["CJK Compatibility"](t)||(!!r["CJK Radicals Supplement"](t)||(!!r["CJK Strokes"](t)||(!(!r["CJK Symbols and Punctuation"](t)||t>=12296&&t<=12305||t>=12308&&t<=12319||12336===t)||(!!r["CJK Unified Ideographs Extension A"](t)||(!!r["CJK Unified Ideographs"](t)||(!!r["Enclosed CJK Letters and Months"](t)||(!!r["Hangul Compatibility Jamo"](t)||(!!r["Hangul Jamo Extended-A"](t)||(!!r["Hangul Jamo Extended-B"](t)||(!!r["Hangul Jamo"](t)||(!!r["Hangul Syllables"](t)||(!!r.Hiragana(t)||(!!r["Ideographic Description Characters"](t)||(!!r.Kanbun(t)||(!!r["Kangxi Radicals"](t)||(!!r["Katakana Phonetic Extensions"](t)||(!(!r.Katakana(t)||12540===t)||(!(!r["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)||(!(!r["Small Form Variants"](t)||t>=65112&&t<=65118||t>=65123&&t<=65126)||(!!r["Unified Canadian Aboriginal Syllabics"](t)||(!!r["Unified Canadian Aboriginal Syllabics Extended"](t)||(!!r["Vertical Forms"](t)||(!!r["Yijing Hexagram Symbols"](t)||(!!r["Yi Syllables"](t)||!!r["Yi Radicals"](t))))))))))))))))))))))))))))))},e.charHasNeutralVerticalOrientation=function(t){return!(!r["Latin-1 Supplement"](t)||167!==t&&169!==t&&174!==t&&177!==t&&188!==t&&189!==t&&190!==t&&215!==t&&247!==t)||(!(!r["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)||(!!r["Letterlike Symbols"](t)||(!!r["Number Forms"](t)||(!(!r["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))||(!(!r["Control Pictures"](t)||9251===t)||(!!r["Optical Character Recognition"](t)||(!!r["Enclosed Alphanumerics"](t)||(!!r["Geometric Shapes"](t)||(!(!r["Miscellaneous Symbols"](t)||t>=9754&&t<=9759)||(!(!r["Miscellaneous Symbols and Arrows"](t)||!(t>=11026&&t<=11055||t>=11088&&t<=11097||t>=11192&&t<=11243))||(!!r["CJK Symbols and Punctuation"](t)||(!!r.Katakana(t)||(!!r["Private Use Area"](t)||(!!r["CJK Compatibility Forms"](t)||(!!r["Small Form Variants"](t)||(!!r["Halfwidth and Fullwidth Forms"](t)||(8734===t||8756===t||8757===t||t>=9984&&t<=10087||t>=10102&&t<=10131||65532===t||65533===t)))))))))))))))))},e.charHasRotatedVerticalOrientation=function(t){return!(e.charHasUprightVerticalOrientation(t)||e.charHasNeutralVerticalOrientation(t))}},function(t,e){t.exports={API_URL:"https://api.mapbox.com",REQUIRE_ACCESS_TOKEN:!0,ACCESS_TOKEN:null}},function(t,e,n){"use strict";t.exports=i;var r=n(190);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}i.Varint=0,i.Fixed64=1,i.Bytes=2,i.Fixed32=5;function o(t){return t.type===i.Bytes?t.readVarint()+t.pos:t.pos+1}function a(t,e,n){return n?4294967296*e+(t>>>0):4294967296*(e>>>0)+(t>>>0)}function s(t,e,n){var r=e<=16383?1:e<=2097151?2:e<=268435455?3:Math.floor(Math.log(e)/(7*Math.LN2));n.realloc(r);for(var i=n.pos-1;i>=t;i--)n.buf[i+r]=n.buf[i]}function u(t,e){for(var n=0;n<t.length;n++)e.writeVarint(t[n])}function l(t,e){for(var n=0;n<t.length;n++)e.writeSVarint(t[n])}function c(t,e){for(var n=0;n<t.length;n++)e.writeFloat(t[n])}function f(t,e){for(var n=0;n<t.length;n++)e.writeDouble(t[n])}function h(t,e){for(var n=0;n<t.length;n++)e.writeBoolean(t[n])}function p(t,e){for(var n=0;n<t.length;n++)e.writeFixed32(t[n])}function d(t,e){for(var n=0;n<t.length;n++)e.writeSFixed32(t[n])}function y(t,e){for(var n=0;n<t.length;n++)e.writeFixed64(t[n])}function m(t,e){for(var n=0;n<t.length;n++)e.writeSFixed64(t[n])}function v(t,e){return(t[e]|t[e+1]<<8|t[e+2]<<16)+16777216*t[e+3]}function g(t,e,n){t[n]=e,t[n+1]=e>>>8,t[n+2]=e>>>16,t[n+3]=e>>>24}function b(t,e){return(t[e]|t[e+1]<<8|t[e+2]<<16)+(t[e+3]<<24)}i.prototype={destroy:function(){this.buf=null},readFields:function(t,e,n){for(n=n||this.length;this.pos<n;){var r=this.readVarint(),i=r>>3,o=this.pos;this.type=7&r,t(i,e,this),this.pos===o&&this.skip(r)}return e},readMessage:function(t,e){return this.readFields(t,e,this.readVarint()+this.pos)},readFixed32:function(){var t=v(this.buf,this.pos);return this.pos+=4,t},readSFixed32:function(){var t=b(this.buf,this.pos);return this.pos+=4,t},readFixed64:function(){var t=v(this.buf,this.pos)+4294967296*v(this.buf,this.pos+4);return this.pos+=8,t},readSFixed64:function(){var t=v(this.buf,this.pos)+4294967296*b(this.buf,this.pos+4);return this.pos+=8,t},readFloat:function(){var t=r.read(this.buf,this.pos,!0,23,4);return this.pos+=4,t},readDouble:function(){var t=r.read(this.buf,this.pos,!0,52,8);return this.pos+=8,t},readVarint:function(t){var e,n,r=this.buf;return e=127&(n=r[this.pos++]),n<128?e:(e|=(127&(n=r[this.pos++]))<<7,n<128?e:(e|=(127&(n=r[this.pos++]))<<14,n<128?e:(e|=(127&(n=r[this.pos++]))<<21,n<128?e:function(t,e,n){var r,i,o=n.buf;if(i=o[n.pos++],r=(112&i)>>4,i<128)return a(t,r,e);if(i=o[n.pos++],r|=(127&i)<<3,i<128)return a(t,r,e);if(i=o[n.pos++],r|=(127&i)<<10,i<128)return a(t,r,e);if(i=o[n.pos++],r|=(127&i)<<17,i<128)return a(t,r,e);if(i=o[n.pos++],r|=(127&i)<<24,i<128)return a(t,r,e);if(i=o[n.pos++],r|=(1&i)<<31,i<128)return a(t,r,e);throw new Error("Expected varint not more than 10 bytes")}(e|=(15&(n=r[this.pos]))<<28,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=function(t,e,n){var r="",i=e;for(;i<n;){var o,a,s,u=t[i],l=null,c=u>239?4:u>223?3:u>191?2:1;if(i+c>n)break;1===c?u<128&&(l=u):2===c?128==(192&(o=t[i+1]))&&(l=(31&u)<<6|63&o)<=127&&(l=null):3===c?(o=t[i+1],a=t[i+2],128==(192&o)&&128==(192&a)&&((l=(15&u)<<12|(63&o)<<6|63&a)<=2047||l>=55296&&l<=57343)&&(l=null)):4===c&&(o=t[i+1],a=t[i+2],s=t[i+3],128==(192&o)&&128==(192&a)&&128==(192&s)&&((l=(15&u)<<18|(63&o)<<12|(63&a)<<6|63&s)<=65535||l>=1114112)&&(l=null)),null===l?(l=65533,c=1):l>65535&&(l-=65536,r+=String.fromCharCode(l>>>10&1023|55296),l=56320|1023&l),r+=String.fromCharCode(l),i+=c}return r}(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){if(this.type!==i.Bytes)return t.push(this.readVarint(e));var n=o(this);for(t=t||[];this.pos<n;)t.push(this.readVarint(e));return t},readPackedSVarint:function(t){if(this.type!==i.Bytes)return t.push(this.readSVarint());var e=o(this);for(t=t||[];this.pos<e;)t.push(this.readSVarint());return t},readPackedBoolean:function(t){if(this.type!==i.Bytes)return t.push(this.readBoolean());var e=o(this);for(t=t||[];this.pos<e;)t.push(this.readBoolean());return t},readPackedFloat:function(t){if(this.type!==i.Bytes)return t.push(this.readFloat());var e=o(this);for(t=t||[];this.pos<e;)t.push(this.readFloat());return t},readPackedDouble:function(t){if(this.type!==i.Bytes)return t.push(this.readDouble());var e=o(this);for(t=t||[];this.pos<e;)t.push(this.readDouble());return t},readPackedFixed32:function(t){if(this.type!==i.Bytes)return t.push(this.readFixed32());var e=o(this);for(t=t||[];this.pos<e;)t.push(this.readFixed32());return t},readPackedSFixed32:function(t){if(this.type!==i.Bytes)return t.push(this.readSFixed32());var e=o(this);for(t=t||[];this.pos<e;)t.push(this.readSFixed32());return t},readPackedFixed64:function(t){if(this.type!==i.Bytes)return t.push(this.readFixed64());var e=o(this);for(t=t||[];this.pos<e;)t.push(this.readFixed64());return t},readPackedSFixed64:function(t){if(this.type!==i.Bytes)return t.push(this.readSFixed64());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 n=new Uint8Array(e);n.set(this.buf),this.buf=n,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),g(this.buf,t,this.pos),this.pos+=4},writeSFixed32:function(t){this.realloc(4),g(this.buf,t,this.pos),this.pos+=4},writeFixed64:function(t){this.realloc(8),g(this.buf,-1&t,this.pos),g(this.buf,Math.floor(t*(1/4294967296)),this.pos+4),this.pos+=8},writeSFixed64:function(t){this.realloc(8),g(this.buf,-1&t,this.pos),g(this.buf,Math.floor(t*(1/4294967296)),this.pos+4),this.pos+=8},writeVarint:function(t){(t=+t||0)>268435455||t<0?function(t,e){var n,r;t>=0?(n=t%4294967296|0,r=t/4294967296|0):(r=~(-t/4294967296),4294967295^(n=~(-t%4294967296))?n=n+1|0:(n=0,r=r+1|0));if(t>=0x10000000000000000||t<-0x10000000000000000)throw new Error("Given varint doesn't fit into 10 bytes");e.realloc(10),function(t,e,n){n.buf[n.pos++]=127&t|128,t>>>=7,n.buf[n.pos++]=127&t|128,t>>>=7,n.buf[n.pos++]=127&t|128,t>>>=7,n.buf[n.pos++]=127&t|128,t>>>=7,n.buf[n.pos]=127&t}(n,0,e),function(t,e){var n=(7&t)<<4;if(e.buf[e.pos++]|=n|((t>>>=3)?128:0),!t)return;if(e.buf[e.pos++]=127&t|((t>>>=7)?128:0),!t)return;if(e.buf[e.pos++]=127&t|((t>>>=7)?128:0),!t)return;if(e.buf[e.pos++]=127&t|((t>>>=7)?128:0),!t)return;if(e.buf[e.pos++]=127&t|((t>>>=7)?128:0),!t)return;e.buf[e.pos++]=127&t}(r,e)}(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),this.pos++;var e=this.pos;this.pos=function(t,e,n){for(var r,i,o=0;o<e.length;o++){if((r=e.charCodeAt(o))>55295&&r<57344){if(!i){r>56319||o+1===e.length?(t[n++]=239,t[n++]=191,t[n++]=189):i=r;continue}if(r<56320){t[n++]=239,t[n++]=191,t[n++]=189,i=r;continue}r=i-55296<<10|r-56320|65536,i=null}else i&&(t[n++]=239,t[n++]=191,t[n++]=189,i=null);r<128?t[n++]=r:(r<2048?t[n++]=r>>6|192:(r<65536?t[n++]=r>>12|224:(t[n++]=r>>18|240,t[n++]=r>>12&63|128),t[n++]=r>>6&63|128),t[n++]=63&r|128)}return n}(this.buf,t,this.pos);var n=this.pos-e;n>=128&&s(e,n,this),this.pos=e-1,this.writeVarint(n),this.pos+=n},writeFloat:function(t){this.realloc(4),r.write(this.buf,t,this.pos,!0,23,4),this.pos+=4},writeDouble:function(t){this.realloc(8),r.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 n=0;n<e;n++)this.buf[this.pos++]=t[n]},writeRawMessage:function(t,e){this.pos++;var n=this.pos;t(e,this);var r=this.pos-n;r>=128&&s(n,r,this),this.pos=n-1,this.writeVarint(r),this.pos+=r},writeMessage:function(t,e,n){this.writeTag(t,i.Bytes),this.writeRawMessage(e,n)},writePackedVarint:function(t,e){e.length&&this.writeMessage(t,u,e)},writePackedSVarint:function(t,e){e.length&&this.writeMessage(t,l,e)},writePackedBoolean:function(t,e){e.length&&this.writeMessage(t,h,e)},writePackedFloat:function(t,e){e.length&&this.writeMessage(t,c,e)},writePackedDouble:function(t,e){e.length&&this.writeMessage(t,f,e)},writePackedFixed32:function(t,e){e.length&&this.writeMessage(t,p,e)},writePackedSFixed32:function(t,e){e.length&&this.writeMessage(t,d,e)},writePackedFixed64:function(t,e){e.length&&this.writeMessage(t,y,e)},writePackedSFixed64:function(t,e){e.length&&this.writeMessage(t,m,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))}}},function(t,e,n){var r=n(3),i=n(22),o=i.mat4,a=i.vec4,s=n(50),u=n(62).addDynamicAttributes,l=n(51).layout,c=n(205).WritingMode;function f(t,e){var n=[t.x,t.y,0,1];x(n,n,e);var i=n[3];return{point:new r(n[0]/i,n[1]/i),signedDistanceFromCamera:i}}function h(t,e){var n=t[0]/t[3],r=t[1]/t[3];return n>=-e[0]&&n<=e[0]&&r>=-e[1]&&r<=e[1]}function p(t,e,n,r,i,o,a,s,u,l,c,f){var h=s.glyphStartIndex+s.numGlyphs,p=s.lineStartIndex,d=s.lineStartIndex+s.lineLength,y=e.getoffsetX(s.glyphStartIndex),m=e.getoffsetX(h-1),g=v(t*y,n,r,i,o,a,s.segment,p,d,u,l,c,f);if(!g)return null;var b=v(t*m,n,r,i,o,a,s.segment,p,d,u,l,c,f);return b?{first:g,last:b}:null}function d(t,e,n,r){if(t===c.horizontal&&Math.abs(n.y-e.y)>Math.abs(n.x-e.x)*r)return{useVertical:!0};return(t===c.vertical?e.y<n.y:e.x>n.x)?{needsFlipping:!0}:null}function y(t,e,n,i,o,a,s,l,c,h,y,g,b,x){var _,w=e/24,k=t.lineOffsetX*e,S=t.lineOffsetY*e;if(t.numGlyphs>1){var T=t.glyphStartIndex+t.numGlyphs,A=t.lineStartIndex,E=t.lineStartIndex+t.lineLength,z=p(w,l,k,S,n,y,g,t,c,a,b,!1);if(!z)return{notEnoughRoom:!0};var C=f(z.first.point,s).point,P=f(z.last.point,s).point;if(i&&!n){var O=d(t.writingMode,C,P,x);if(O)return O}_=[z.first];for(var I=t.glyphStartIndex+1;I<T-1;I++)_.push(v(w*l.getoffsetX(I),k,S,n,y,g,t.segment,A,E,c,a,b,!1));_.push(z.last)}else{if(i&&!n){var j=f(g,o).point,M=t.lineStartIndex+t.segment+1,L=new r(c.getx(M),c.gety(M)),B=f(L,o),R=B.signedDistanceFromCamera>0?B.point:m(g,L,j,1,o),D=d(t.writingMode,j,R,x);if(D)return D}var F=v(w*l.getoffsetX(t.glyphStartIndex),k,S,n,y,g,t.segment,t.lineStartIndex,t.lineStartIndex+t.lineLength,c,a,b,!1);if(!F)return{notEnoughRoom:!0};_=[F]}var V=!0,N=!1,q=void 0;try{for(var U,Z=_[Symbol.iterator]();!(V=(U=Z.next()).done);V=!0){var G=U.value;u(h,G.point,G.angle)}}catch(t){N=!0,q=t}finally{try{V||null==Z.return||Z.return()}finally{if(N)throw q}}return{}}function m(t,e,n,r,i){var o=f(t.add(t.sub(e)._unit()),i).point,a=n.sub(o);return n.add(a._mult(r/a.mag()))}function v(t,e,n,i,o,a,s,u,l,c,h,p,d){var y=i?t-e:t+e,v=y>0?1:-1,g=0;i&&(v*=-1,g=Math.PI),v<0&&(g+=Math.PI);for(var b=v>0?u+s:u+s+1,x=b,_=o,w=o,k=0,S=0,T=Math.abs(y);k+S<=T;){if((b+=v)<u||b>=l)return null;if(w=_,void 0===(_=p[b])){var A=new r(c.getx(b),c.gety(b)),E=f(A,h);if(E.signedDistanceFromCamera>0)_=p[b]=E.point;else{var z=b-v;_=m(0===k?a:new r(c.getx(z),c.gety(z)),A,w,T-k+1,h)}}k+=S,S=w.dist(_)}var C=(T-k)/S,P=_.sub(w),O=P.mult(C)._add(w);return O._add(P._unit()._perp()._mult(n*v)),{point:O,angle:g+Math.atan2(_.y-w.y,_.x-w.x),tileDistance:d?{prevTileDistance:b-v===x?0:c.gettileUnitDistanceFromAnchor(b-v),lastSegmentViewportDistance:T-k}:null}}t.exports={updateLineLabels:function(t,e,n,i,o,u,p,d){var m=i?t.textSizeData:t.iconSizeData,v=s.evaluateSizeForZoom(m,n.transform.zoom,l.properties[i?"text-size":"icon-size"]),g=[256/n.width*2+1,256/n.height*2+1],x=i?t.text.dynamicLayoutVertexArray:t.icon.dynamicLayoutVertexArray;x.clear();for(var _=t.lineVertexArray,w=i?t.text.placedSymbolArray:t.icon.placedSymbolArray,k=n.transform.width/n.transform.height,S=!1,T=0;T<w.length;T++){var A=w.get(T);if(A.hidden||A.writingMode===c.vertical&&!S)b(A.numGlyphs,x);else{S=!1;var E=[A.anchorX,A.anchorY,0,1];if(a.transformMat4(E,E,e),h(E,g)){var z=E[3],C=.5+z/n.transform.cameraToCenterDistance*.5,P=s.evaluateSizeForFeature(m,v,A),O=p?P*C:P/C,I=new r(A.anchorX,A.anchorY),j=f(I,o).point,M={},L=y(A,O,!1,d,e,o,u,t.glyphOffsetArray,_,x,j,I,M,k);S=L.useVertical,(L.notEnoughRoom||S||L.needsFlipping&&y(A,O,!0,d,e,o,u,t.glyphOffsetArray,_,x,j,I,M,k).notEnoughRoom)&&b(A.numGlyphs,x)}else b(A.numGlyphs,x)}}i?t.text.dynamicLayoutVertexBuffer.updateData(x):t.icon.dynamicLayoutVertexBuffer.updateData(x)},getLabelPlaneMatrix:function(t,e,n,r,i){var a=o.identity(new Float32Array(16));e?(o.identity(a),o.scale(a,a,[1/i,1/i,1]),n||o.rotateZ(a,a,r.angle)):(o.scale(a,a,[r.width/2,-r.height/2,1]),o.translate(a,a,[1,-1,0]),o.multiply(a,a,t));return a},getGlCoordMatrix:function(t,e,n,r,i){var a=o.identity(new Float32Array(16));e?(o.multiply(a,a,t),o.scale(a,a,[i,i,1]),n||o.rotateZ(a,a,-r.angle)):(o.scale(a,a,[1,-1,1]),o.translate(a,a,[-1,-1,0]),o.scale(a,a,[2/r.width,2/r.height,1]));return a},project:f,placeFirstAndLastGlyph:p,xyTransformMat4:x};var g=new Float32Array([-1/0,-1/0,0,-1/0,-1/0,0,-1/0,-1/0,0,-1/0,-1/0,0]);function b(t,e){for(var n=0;n<t;n++){var r=e.length;e.resize(r+4),e.float32.set(g,3*r)}}function x(t,e,n){var r=e[0],i=e[1];return t[0]=n[0]*r+n[4]*i+n[12],t[1]=n[1]*r+n[5]*i+n[13],t[3]=n[3]*r+n[7]*i+n[15],t}},function(t,e,n){function r(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,r.key,r)}}var i=n(206),o=n(207),a=n(208),s=(n(15),n(18),n(68)),u=n(0),l=n(122),c=l.ClearColor,f=l.ClearDepth,h=l.ClearStencil,p=l.ColorMask,d=l.DepthMask,y=l.StencilMask,m=l.StencilFunc,v=l.StencilOp,g=l.StencilTest,b=l.DepthRange,x=l.DepthTest,_=l.DepthFunc,w=l.Blend,k=l.BlendFunc,S=l.BlendColor,T=l.Program,A=l.LineWidth,E=l.ActiveTextureUnit,z=l.Viewport,C=l.BindFramebuffer,P=l.BindRenderbuffer,O=l.BindTexture,I=l.BindVertexBuffer,j=l.BindElementBuffer,M=l.BindVertexArrayOES,L=l.PixelStoreUnpack,B=l.PixelStoreUnpackPremultiplyAlpha,R=function(){function t(e){!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,t),this.gl=e,this.extVertexArrayObject=this.gl.getExtension("OES_vertex_array_object"),this.lineWidthRange=e.getParameter(e.ALIASED_LINE_WIDTH_RANGE),this.clearColor=new c(this),this.clearDepth=new f(this),this.clearStencil=new h(this),this.colorMask=new p(this),this.depthMask=new d(this),this.stencilMask=new y(this),this.stencilFunc=new m(this),this.stencilOp=new v(this),this.stencilTest=new g(this),this.depthRange=new b(this),this.depthTest=new x(this),this.depthFunc=new _(this),this.blend=new w(this),this.blendFunc=new k(this),this.blendColor=new S(this),this.program=new T(this),this.lineWidth=new A(this),this.activeTexture=new E(this),this.viewport=new z(this),this.bindFramebuffer=new C(this),this.bindRenderbuffer=new P(this),this.bindTexture=new O(this),this.bindVertexBuffer=new I(this),this.bindElementBuffer=new j(this),this.bindVertexArrayOES=this.extVertexArrayObject&&new M(this),this.pixelStoreUnpack=new L(this),this.pixelStoreUnpackPremultiplyAlpha=new B(this),this.extTextureFilterAnisotropic=e.getExtension("EXT_texture_filter_anisotropic")||e.getExtension("MOZ_EXT_texture_filter_anisotropic")||e.getExtension("WEBKIT_EXT_texture_filter_anisotropic"),this.extTextureFilterAnisotropic&&(this.extTextureFilterAnisotropicMax=e.getParameter(this.extTextureFilterAnisotropic.MAX_TEXTURE_MAX_ANISOTROPY_EXT)),this.extTextureHalfFloat=e.getExtension("OES_texture_half_float"),this.extTextureHalfFloat&&e.getExtension("OES_texture_half_float_linear")}var e,n,l;return e=t,(n=[{key:"createIndexBuffer",value:function(t,e){return new i(this,t,e)}},{key:"createVertexBuffer",value:function(t,e,n){return new o(this,t,e,n)}},{key:"createRenderbuffer",value:function(t,e,n){var r=this.gl,i=r.createRenderbuffer();return this.bindRenderbuffer.set(i),r.renderbufferStorage(r.RENDERBUFFER,t,e,n),this.bindRenderbuffer.set(null),i}},{key:"createFramebuffer",value:function(t,e){return new a(this,t,e)}},{key:"clear",value:function(t){var e=t.color,n=t.depth,r=this.gl,i=0;e&&(i|=r.COLOR_BUFFER_BIT,this.clearColor.set(e),this.colorMask.set([!0,!0,!0,!0])),void 0!==n&&(i|=r.DEPTH_BUFFER_BIT,this.clearDepth.set(n),this.depthMask.set(!0)),r.clear(i)}},{key:"setDepthMode",value:function(t){t.func!==this.gl.ALWAYS||t.mask?(this.depthTest.set(!0),this.depthFunc.set(t.func),this.depthMask.set(t.mask),this.depthRange.set(t.range)):this.depthTest.set(!1)}},{key:"setStencilMode",value:function(t){t.func!==this.gl.ALWAYS||t.mask?(this.stencilTest.set(!0),this.stencilMask.set(t.mask),this.stencilOp.set([t.fail,t.depthFail,t.pass]),this.stencilFunc.set({func:t.test.func,ref:t.ref,mask:t.test.mask})):this.stencilTest.set(!1)}},{key:"setColorMode",value:function(t){u.deepEqual(t.blendFunction,s.Replace)?this.blend.set(!1):(this.blend.set(!0),this.blendFunc.set(t.blendFunction),this.blendColor.set(t.blendColor)),this.colorMask.set(t.mask)}}])&&r(e.prototype,n),l&&r(e,l),t}();t.exports=R},function(t,e,n){var r=n(12),i=function t(e,n,r){!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,t),this.blendFunction=e,this.blendColor=n,this.mask=r};i.disabled=new i(i.Replace=[1,0],r.transparent,[!1,!1,!1,!1]),i.unblended=new i(i.Replace,r.transparent,[!0,!0,!0,!0]),i.alphaBlended=new i([1,771],r.transparent,[!0,!0,!0,!0]),t.exports=i},function(t,e,n){function r(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function i(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,r.key,r)}}function o(t,e,n){return e&&i(t.prototype,e),n&&i(t,n),t}var a=n(120),s=n(6),u=n(50),l=n(66),c=n(51).layout,f=n(1),h=n(28),p=function(){function t(e,n,i,o){r(this,t),this.opacity=e?Math.max(0,Math.min(1,e.opacity+(e.placed?n:-n))):o&&i?1:0,this.placed=i}return o(t,[{key:"isHidden",value:function(){return 0===this.opacity&&!this.placed}}]),t}(),d=function(){function t(e,n,i,o,a){r(this,t),this.text=new p(e?e.text:null,n,i,a),this.icon=new p(e?e.icon:null,n,o,a)}return o(t,[{key:"isHidden",value:function(){return this.text.isHidden()&&this.icon.isHidden()}}]),t}(),y=function t(e,n,i){r(this,t),this.text=e,this.icon=n,this.skipFade=i},m=function(){function t(e,n){r(this,t),this.transform=e.clone(),this.collisionIndex=new a(this.transform),this.recentUntil=-1/0,this.placements={},this.opacities={},this.stale=!1,this.fadeDuration=n}return o(t,[{key:"placeLayerTile",value:function(t,e,n,r){var i=e.getBucket(t);if(i){var o=i.layers[0].layout,a=Math.pow(2,this.transform.zoom-e.tileID.overscaledZ),u=e.tileSize/s,c=this.transform.calculatePosMatrix(e.tileID.toUnwrapped()),f=l.getLabelPlaneMatrix(c,"map"===o.get("text-pitch-alignment"),"map"===o.get("text-rotation-alignment"),this.transform,h(e,1,this.transform.zoom)),p=l.getLabelPlaneMatrix(c,"map"===o.get("icon-pitch-alignment"),"map"===o.get("icon-rotation-alignment"),this.transform,h(e,1,this.transform.zoom));this.placeLayerBucket(i,c,f,p,a,u,n,r,e.collisionBoxArray,e.tileID.key,t.source)}}},{key:"placeLayerBucket",value:function(t,e,n,r,i,o,a,s,l,h,p){var d=t.layers[0].layout,m=u.evaluateSizeForZoom(t.textSizeData,this.transform.zoom,c.properties["text-size"]),v=!t.hasTextData()||d.get("text-optional"),g=!t.hasIconData()||d.get("icon-optional"),b=!0,x=!1,_=void 0;try{for(var w,k=t.symbolInstances[Symbol.iterator]();!(b=(w=k.next()).done);b=!0){var S=w.value;if(!s[S.crossTileID]){var T=!1,A=!1,E=!0,z=null,C=null,P=null;S.collisionArrays||(S.collisionArrays=t.deserializeCollisionBoxes(l,S.textBoxStartIndex,S.textBoxEndIndex,S.iconBoxStartIndex,S.iconBoxEndIndex)),S.collisionArrays.textBox&&(T=(z=this.collisionIndex.placeCollisionBox(S.collisionArrays.textBox,d.get("text-allow-overlap"),o,e)).box.length>0,E=E&&z.offscreen);var O=S.collisionArrays.textCircles;if(O){var I=t.text.placedSymbolArray.get(S.placedTextSymbolIndices[0]),j=u.evaluateSizeForFeature(t.textSizeData,m,I);C=this.collisionIndex.placeCollisionCircles(O,d.get("text-allow-overlap"),i,o,S.key,I,t.lineVertexArray,t.glyphOffsetArray,j,e,n,a,"map"===d.get("text-pitch-alignment")),T=d.get("text-allow-overlap")||C.circles.length>0,E=E&&C.offscreen}S.collisionArrays.iconBox&&(A=(P=this.collisionIndex.placeCollisionBox(S.collisionArrays.iconBox,d.get("icon-allow-overlap"),o,e)).box.length>0,E=E&&P.offscreen),v||g?g?v||(A=A&&T):T=A&&T:A=T=A&&T,T&&z&&this.collisionIndex.insertCollisionBox(z.box,d.get("text-ignore-placement"),h,p,t.bucketInstanceId,S.textBoxStartIndex),A&&P&&this.collisionIndex.insertCollisionBox(P.box,d.get("icon-ignore-placement"),h,p,t.bucketInstanceId,S.iconBoxStartIndex),T&&C&&this.collisionIndex.insertCollisionCircles(C.circles,d.get("text-ignore-placement"),h,p,t.bucketInstanceId,S.textBoxStartIndex),f(0!==S.crossTileID),f(0!==t.bucketInstanceId),this.placements[S.crossTileID]=new y(T,A,E||t.justReloaded),s[S.crossTileID]=!0}}}catch(t){x=!0,_=t}finally{try{b||null==k.return||k.return()}finally{if(x)throw _}}t.justReloaded=!1}},{key:"commit",value:function(t,e){this.commitTime=e;var n=!1,r=t&&0!==this.fadeDuration?(this.commitTime-t.commitTime)/this.fadeDuration:1,i=t?t.opacities:{};for(var o in this.placements){var a=this.placements[o],s=i[o];s?(this.opacities[o]=new d(s,r,a.text,a.icon),n=n||a.text!==s.text.placed||a.icon!==s.icon.placed):(this.opacities[o]=new d(null,r,a.text,a.icon,a.skipFade),n=n||a.text||a.icon)}for(var u in i){var l=i[u];if(!this.opacities[u]){var c=new d(l,r,!1,!1);c.isHidden()||(this.opacities[u]=c,n=n||l.text.placed||l.icon.placed)}}return n}},{key:"updateLayerOpacities",value:function(t,e){var n={},r=!0,i=!1,o=void 0;try{for(var a,s=e[Symbol.iterator]();!(r=(a=s.next()).done);r=!0){var u=a.value,l=u.getBucket(t);l&&this.updateBucketOpacities(l,n,u.collisionBoxArray)}}catch(t){i=!0,o=t}finally{try{r||null==s.return||s.return()}finally{if(i)throw o}}}},{key:"updateBucketOpacities",value:function(t,e,n){t.hasTextData()&&t.text.opacityVertexArray.clear(),t.hasIconData()&&t.icon.opacityVertexArray.clear(),t.hasCollisionBoxData()&&t.collisionBox.collisionVertexArray.clear(),t.hasCollisionCircleData()&&t.collisionCircle.collisionVertexArray.clear();for(var r=t.layers[0].layout,i=new d(null,0,r.get("text-allow-overlap"),r.get("icon-allow-overlap"),!0),o=0;o<t.symbolInstances.length;o++){var a=t.symbolInstances[o],s=e[a.crossTileID],u=this.opacities[a.crossTileID];u?s&&(u=i):(u=i,this.opacities[a.crossTileID]=u),e[a.crossTileID]=!0;var l=a.numGlyphVertices>0||a.numVerticalGlyphVertices>0,c=a.numIconVertices>0;if(l){for(var h=T(u.text),p=(a.numGlyphVertices+a.numVerticalGlyphVertices)/4,y=0;y<p;y++)t.text.opacityVertexArray.emplaceBack(h);var m=!0,g=!1,b=void 0;try{for(var x,_=a.placedTextSymbolIndices[Symbol.iterator]();!(m=(x=_.next()).done);m=!0){var w=x.value;t.text.placedSymbolArray.get(w).hidden=u.text.isHidden()}}catch(t){g=!0,b=t}finally{try{m||null==_.return||_.return()}finally{if(g)throw b}}}if(c){for(var k=T(u.icon),S=0;S<a.numIconVertices/4;S++)t.icon.opacityVertexArray.emplaceBack(k);t.icon.placedSymbolArray.get(o).hidden=u.icon.isHidden()}a.collisionArrays||(a.collisionArrays=t.deserializeCollisionBoxes(n,a.textBoxStartIndex,a.textBoxEndIndex,a.iconBoxStartIndex,a.iconBoxEndIndex));var A=a.collisionArrays;if(A){A.textBox&&t.hasCollisionBoxData()&&v(t.collisionBox.collisionVertexArray,u.text.placed,!1),A.iconBox&&t.hasCollisionBoxData()&&v(t.collisionBox.collisionVertexArray,u.icon.placed,!1);var E=A.textCircles;if(E&&t.hasCollisionCircleData())for(var z=0;z<E.length;z+=5){var C=s||0===E[z+4];v(t.collisionCircle.collisionVertexArray,u.text.placed,C)}}}t.sortFeatures(this.transform.angle),t.hasTextData()&&t.text.opacityVertexBuffer&&t.text.opacityVertexBuffer.updateData(t.text.opacityVertexArray),t.hasIconData()&&t.icon.opacityVertexBuffer&&t.icon.opacityVertexBuffer.updateData(t.icon.opacityVertexArray),t.hasCollisionBoxData()&&t.collisionBox.collisionVertexBuffer&&t.collisionBox.collisionVertexBuffer.updateData(t.collisionBox.collisionVertexArray),t.hasCollisionCircleData()&&t.collisionCircle.collisionVertexBuffer&&t.collisionCircle.collisionVertexBuffer.updateData(t.collisionCircle.collisionVertexArray),f(t.text.opacityVertexArray.length===t.text.layoutVertexArray.length/4),f(t.icon.opacityVertexArray.length===t.icon.layoutVertexArray.length/4)}},{key:"symbolFadeChange",value:function(t){return 0===this.fadeDuration?1:(t-this.commitTime)/this.fadeDuration}},{key:"hasTransitions",value:function(t){return this.symbolFadeChange(t)<1||this.stale}},{key:"stillRecent",value:function(t){return this.recentUntil>t}},{key:"setRecent",value:function(t,e){this.stale=e,this.recentUntil=t+this.fadeDuration}},{key:"setStale",value:function(){this.stale=!0}}]),t}();function v(t,e,n){t.emplaceBack(e?1:0,n?1:0),t.emplaceBack(e?1:0,n?1:0),t.emplaceBack(e?1:0,n?1:0),t.emplaceBack(e?1:0,n?1:0)}var g=Math.pow(2,25),b=Math.pow(2,24),x=Math.pow(2,17),_=Math.pow(2,16),w=Math.pow(2,9),k=Math.pow(2,8),S=Math.pow(2,1);function T(t){if(0===t.opacity&&!t.placed)return 0;if(1===t.opacity&&t.placed)return 4294967295;var e=t.placed?1:0,n=Math.floor(127*t.opacity);return n*g+e*b+n*x+e*_+n*w+e*k+n*S+e}t.exports=m},function(t,e,n){var r=n(1),i=n(28);e.isPatternMissing=function(t,e){if(!t)return!1;var n=e.imageManager.getPattern(t.from),r=e.imageManager.getPattern(t.to);return!n||!r},e.prepare=function(t,e,n){var i=e.context,o=i.gl,a=e.imageManager.getPattern(t.from),s=e.imageManager.getPattern(t.to);r(a&&s),o.uniform1i(n.uniforms.u_image,0),o.uniform2fv(n.uniforms.u_pattern_tl_a,a.tl),o.uniform2fv(n.uniforms.u_pattern_br_a,a.br),o.uniform2fv(n.uniforms.u_pattern_tl_b,s.tl),o.uniform2fv(n.uniforms.u_pattern_br_b,s.br);var u=e.imageManager.getPixelSize(),l=u.width,c=u.height;o.uniform2fv(n.uniforms.u_texsize,[l,c]),o.uniform1f(n.uniforms.u_mix,t.t),o.uniform2fv(n.uniforms.u_pattern_size_a,a.displaySize),o.uniform2fv(n.uniforms.u_pattern_size_b,s.displaySize),o.uniform1f(n.uniforms.u_scale_a,t.fromScale),o.uniform1f(n.uniforms.u_scale_b,t.toScale),i.activeTexture.set(o.TEXTURE0),e.imageManager.bind(e.context)},e.setTile=function(t,e,n){var r=e.context.gl;r.uniform1f(n.uniforms.u_tile_units_to_pixels,1/i(t,1,e.transform.tileZoom(t)));var o=Math.pow(2,t.tileID.overscaledZ),a=t.tileSize*Math.pow(2,e.transform.tileZoom(t))/o,s=a*(t.tileID.canonical.x+t.tileID.wrap*o),u=a*t.tileID.canonical.y;r.uniform2f(n.uniforms.u_pixel_coord_upper,s>>16,u>>16),r.uniform2f(n.uniforms.u_pixel_coord_lower,65535&s,65535&u)}},function(t,e,n){var r=n(72),i=n(2),o=n(132).version,a=n(133),s=n(295),u=n(296),l=n(128),c=n(297),f=n(298),h=n(299),p=n(129),d=n(53),y=n(21),m=n(39),v=n(3),g=n(10),b=n(64),x=n(49),_=n(300);t.exports={version:o,supported:r,workerCount:Math.max(Math.floor(i.hardwareConcurrency/2),1),setRTLTextPlugin:x.setRTLTextPlugin,Map:a,NavigationControl:s,GeolocateControl:u,AttributionControl:l,ScaleControl:c,FullscreenControl:f,Popup:h,Marker:p,Style:d,LngLat:y,LngLatBounds:m,Point:v,Evented:g,config:b,BasicRenderer:_,get accessToken(){return b.ACCESS_TOKEN},set accessToken(t){b.ACCESS_TOKEN=t}}},function(t,e,n){"use strict";function r(t){return!!("undefined"!=typeof window&&"undefined"!=typeof document&&Array.prototype&&Array.prototype.every&&Array.prototype.filter&&Array.prototype.forEach&&Array.prototype.indexOf&&Array.prototype.lastIndexOf&&Array.prototype.map&&Array.prototype.some&&Array.prototype.reduce&&Array.prototype.reduceRight&&Array.isArray&&Function.prototype&&Function.prototype.bind&&Object.keys&&Object.create&&Object.getPrototypeOf&&Object.getOwnPropertyNames&&Object.isSealed&&Object.isFrozen&&Object.isExtensible&&Object.getOwnPropertyDescriptor&&Object.defineProperty&&Object.defineProperties&&Object.seal&&Object.freeze&&Object.preventExtensions&&"JSON"in window&&"parse"in JSON&&"stringify"in JSON&&function(){if(!("Worker"in window&&"Blob"in window&&"URL"in window))return!1;var t,e,n=new Blob([""],{type:"text/javascript"}),r=URL.createObjectURL(n);try{e=new Worker(r),t=!0}catch(e){t=!1}e&&e.terminate();return URL.revokeObjectURL(r),t}()&&"Uint8ClampedArray"in window&&ArrayBuffer.isView&&function(t){void 0===i[t]&&(i[t]=function(t){var e=document.createElement("canvas"),n=Object.create(r.webGLContextAttributes);return n.failIfMajorPerformanceCaveat=t,e.probablySupportsContext?e.probablySupportsContext("webgl",n)||e.probablySupportsContext("experimental-webgl",n):e.supportsContext?e.supportsContext("webgl",n)||e.supportsContext("experimental-webgl",n):e.getContext("webgl",n)||e.getContext("experimental-webgl",n)}(t));return i[t]}(t&&t.failIfMajorPerformanceCaveat))}t.exports?t.exports=r:window&&(window.mapboxgl=window.mapboxgl||{},window.mapboxgl.supported=r);var i={};r.webGLContextAttributes={antialias:!1,alpha:!0,stencil:!0,depth:!0}},function(t,e){function n(t,e,n,r){this.cx=3*t,this.bx=3*(n-t)-this.cx,this.ax=1-this.cx-this.bx,this.cy=3*e,this.by=3*(r-e)-this.cy,this.ay=1-this.cy-this.by,this.p1x=t,this.p1y=r,this.p2x=n,this.p2y=r}t.exports=n,n.prototype.sampleCurveX=function(t){return((this.ax*t+this.bx)*t+this.cx)*t},n.prototype.sampleCurveY=function(t){return((this.ay*t+this.by)*t+this.cy)*t},n.prototype.sampleCurveDerivativeX=function(t){return(3*this.ax*t+2*this.bx)*t+this.cx},n.prototype.solveCurveX=function(t,e){var n,r,i,o,a;for(void 0===e&&(e=1e-6),i=t,a=0;a<8;a++){if(o=this.sampleCurveX(i)-t,Math.abs(o)<e)return i;var s=this.sampleCurveDerivativeX(i);if(Math.abs(s)<1e-6)break;i-=o/s}if((i=t)<(n=0))return n;if(i>(r=1))return r;for(;n<r;){if(o=this.sampleCurveX(i),Math.abs(o-t)<e)return i;t>o?n=i:r=i,i=.5*(r-n)+n}return i},n.prototype.solve=function(t,e){return this.sampleCurveY(this.solveCurveX(t,e))}},function(t,e){function n(t){return(n="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t})(t)}t.exports=function t(e,r){if(Array.isArray(e)){if(!Array.isArray(r)||e.length!==r.length)return!1;for(var i=0;i<e.length;i++)if(!t(e[i],r[i]))return!1;return!0}if("object"===n(e)&&null!==e&&null!==r){if("object"!==n(r))return!1;if(Object.keys(e).length!==Object.keys(r).length)return!1;for(var o in e)if(!t(e[o],r[o]))return!1;return!0}return e===r}},function(t,e,n){var r=n(7);t.exports=function(t){var e=t.key,n=t.value;return n?[new r(e,n,"constants have been deprecated as of v8")]:[]}},function(t,e){function n(t){return(n="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t})(t)}function r(t,e){return!e||"object"!==n(e)&&"function"!=typeof e?function(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}(t):e}function i(t){var e="function"==typeof Map?new Map:void 0;return(i=function(t){if(null===t||(n=t,-1===Function.toString.call(n).indexOf("[native code]")))return t;var n;if("function"!=typeof t)throw new TypeError("Super expression must either be null or a function");if(void 0!==e){if(e.has(t))return e.get(t);e.set(t,r)}function r(){return o(t,arguments,s(this).constructor)}return r.prototype=Object.create(t.prototype,{constructor:{value:r,enumerable:!1,writable:!0,configurable:!0}}),a(r,t)})(t)}function o(t,e,n){return(o=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],function(){})),!0}catch(t){return!1}}()?Reflect.construct:function(t,e,n){var r=[null];r.push.apply(r,e);var i=new(Function.bind.apply(t,r));return n&&a(i,n.prototype),i}).apply(null,arguments)}function a(t,e){return(a=Object.setPrototypeOf||function(t,e){return t.__proto__=e,t})(t,e)}function s(t){return(s=Object.setPrototypeOf?Object.getPrototypeOf:function(t){return t.__proto__||Object.getPrototypeOf(t)})(t)}var u=function(t){function e(t,n){var i;return function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,e),(i=r(this,s(e).call(this,n))).message=n,i.key=t,i}return function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),e&&a(t,e)}(e,i(Error)),e}();t.exports=u},function(t,e,n){function r(t){return(r="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t})(t)}function i(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,r.key,r)}}var o=n(78),a=n(8).checkSubtype,s=n(76),u=n(79),l=n(81),c=n(82),f=n(83),h=function(){function t(e){var n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:[],r=arguments.length>2?arguments[2]:void 0,i=arguments.length>3&&void 0!==arguments[3]?arguments[3]:new o,a=arguments.length>4&&void 0!==arguments[4]?arguments[4]:[];!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,t),this.registry=e,this.path=n,this.key=n.map(function(t){return"[".concat(t,"]")}).join(""),this.scope=i,this.errors=a,this.expectedType=r}var e,h,p;return e=t,(h=[{key:"parse",value:function(t,e,i,o){var a=arguments.length>4&&void 0!==arguments[4]?arguments[4]:{},s=this;if(e&&(s=s.concat(e,i,o)),null!==t&&"string"!=typeof t&&"boolean"!=typeof t&&"number"!=typeof t||(t=["literal",t]),Array.isArray(t)){if(0===t.length)return s.error('Expected an array with at least one element. If you wanted a literal array, use ["literal", []].');var h=t[0];if("string"!=typeof h)return s.error("Expression name must be a string, but found ".concat(r(h),' instead. If you wanted a literal array, use ["literal", [...]].'),0),null;var p=s.registry[h];if(p){var d=p.parse(t,s);if(!d)return null;if(s.expectedType){var y=s.expectedType,m=d.type;if("string"!==y.kind&&"number"!==y.kind&&"boolean"!==y.kind||"value"!==m.kind)if("array"===y.kind&&"value"===m.kind)a.omitTypeAnnotations||(d=new c(y,d));else if("color"!==y.kind||"value"!==m.kind&&"string"!==m.kind){if(s.checkSubtype(s.expectedType,d.type))return null}else a.omitTypeAnnotations||(d=new f(y,[d]));else a.omitTypeAnnotations||(d=new l(y,[d]))}if(!(d instanceof u)&&function(t){var e=n(42).CompoundExpression,r=n(84),i=r.isGlobalPropertyConstant,o=r.isFeatureConstant,a=n(85);if(t instanceof a)return!1;if(t instanceof e&&"error"===t.name)return!1;var s=!0;if(t.eachChild(function(t){t instanceof u||(s=!1)}),!s)return!1;return o(t)&&i(t,["zoom","heatmap-density"])}(d)){var v=new(n(55));try{d=new u(d.type,d.evaluate(v))}catch(t){return s.error(t.message),null}}return d}return s.error('Unknown expression "'.concat(h,'". If you wanted a literal array, use ["literal", [...]].'),0)}return void 0===t?s.error("'undefined' value invalid. Use null instead."):"object"===r(t)?s.error('Bare objects invalid. Use ["literal", {...}] instead.'):s.error("Expected an array, but found ".concat(r(t)," instead."))}},{key:"concat",value:function(e,n,r){var i="number"==typeof e?this.path.concat(e):this.path,o=r?this.scope.concat(r):this.scope;return new t(this.registry,i,n||null,o,this.errors)}},{key:"error",value:function(t){for(var e=arguments.length,n=new Array(e>1?e-1:0),r=1;r<e;r++)n[r-1]=arguments[r];var i="".concat(this.key).concat(n.map(function(t){return"[".concat(t,"]")}).join(""));this.errors.push(new s(i,t))}},{key:"checkSubtype",value:function(t,e){var n=a(t,e);return n&&this.error(n),n}}])&&i(e.prototype,h),p&&i(e,p),t}();t.exports=h},function(t,e){function n(t,e){return function(t){if(Array.isArray(t))return t}(t)||function(t,e){var n=[],r=!0,i=!1,o=void 0;try{for(var a,s=t[Symbol.iterator]();!(r=(a=s.next()).done)&&(n.push(a.value),!e||n.length!==e);r=!0);}catch(t){i=!0,o=t}finally{try{r||null==s.return||s.return()}finally{if(i)throw o}}return n}(t,e)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance")}()}function r(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,r.key,r)}}var i=function(){function t(e){var r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:[];!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,t),this.parent=e,this.bindings={};var i=!0,o=!1,a=void 0;try{for(var s,u=r[Symbol.iterator]();!(i=(s=u.next()).done);i=!0){var l=n(s.value,2),c=l[0],f=l[1];this.bindings[c]=f}}catch(t){o=!0,a=t}finally{try{i||null==u.return||u.return()}finally{if(o)throw a}}}var e,i,o;return e=t,(i=[{key:"concat",value:function(e){return new t(this,e)}},{key:"get",value:function(t){if(this.bindings[t])return this.bindings[t];if(this.parent)return this.parent.get(t);throw new Error("".concat(t," not found in scope."))}},{key:"has",value:function(t){return!!this.bindings[t]||!!this.parent&&this.parent.has(t)}}])&&r(e.prototype,i),o&&r(e,o),t}();t.exports=i},function(t,e,n){function r(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,r.key,r)}}var i=n(25),o=i.isValue,a=i.typeOf,s=function(){function t(e,n){!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,t),this.type=e,this.value=n}var e,n,i;return e=t,i=[{key:"parse",value:function(e,n){if(2!==e.length)return n.error("'literal' expression requires exactly one argument, but found ".concat(e.length-1," instead."));if(!o(e[1]))return n.error("invalid value");var r=e[1],i=a(r),s=n.expectedType;return"array"!==i.kind||0!==i.N||!s||"array"!==s.kind||"number"==typeof s.N&&0!==s.N||(i=s),new t(i,r)}}],(n=[{key:"evaluate",value:function(){return this.value}},{key:"eachChild",value:function(){}},{key:"possibleOutputs",value:function(){return[this.value]}}])&&r(e.prototype,n),i&&r(e,i),t}();t.exports=s},function(t,e){var n={transparent:[0,0,0,0],aliceblue:[240,248,255,1],antiquewhite:[250,235,215,1],aqua:[0,255,255,1],aquamarine:[127,255,212,1],azure:[240,255,255,1],beige:[245,245,220,1],bisque:[255,228,196,1],black:[0,0,0,1],blanchedalmond:[255,235,205,1],blue:[0,0,255,1],blueviolet:[138,43,226,1],brown:[165,42,42,1],burlywood:[222,184,135,1],cadetblue:[95,158,160,1],chartreuse:[127,255,0,1],chocolate:[210,105,30,1],coral:[255,127,80,1],cornflowerblue:[100,149,237,1],cornsilk:[255,248,220,1],crimson:[220,20,60,1],cyan:[0,255,255,1],darkblue:[0,0,139,1],darkcyan:[0,139,139,1],darkgoldenrod:[184,134,11,1],darkgray:[169,169,169,1],darkgreen:[0,100,0,1],darkgrey:[169,169,169,1],darkkhaki:[189,183,107,1],darkmagenta:[139,0,139,1],darkolivegreen:[85,107,47,1],darkorange:[255,140,0,1],darkorchid:[153,50,204,1],darkred:[139,0,0,1],darksalmon:[233,150,122,1],darkseagreen:[143,188,143,1],darkslateblue:[72,61,139,1],darkslategray:[47,79,79,1],darkslategrey:[47,79,79,1],darkturquoise:[0,206,209,1],darkviolet:[148,0,211,1],deeppink:[255,20,147,1],deepskyblue:[0,191,255,1],dimgray:[105,105,105,1],dimgrey:[105,105,105,1],dodgerblue:[30,144,255,1],firebrick:[178,34,34,1],floralwhite:[255,250,240,1],forestgreen:[34,139,34,1],fuchsia:[255,0,255,1],gainsboro:[220,220,220,1],ghostwhite:[248,248,255,1],gold:[255,215,0,1],goldenrod:[218,165,32,1],gray:[128,128,128,1],green:[0,128,0,1],greenyellow:[173,255,47,1],grey:[128,128,128,1],honeydew:[240,255,240,1],hotpink:[255,105,180,1],indianred:[205,92,92,1],indigo:[75,0,130,1],ivory:[255,255,240,1],khaki:[240,230,140,1],lavender:[230,230,250,1],lavenderblush:[255,240,245,1],lawngreen:[124,252,0,1],lemonchiffon:[255,250,205,1],lightblue:[173,216,230,1],lightcoral:[240,128,128,1],lightcyan:[224,255,255,1],lightgoldenrodyellow:[250,250,210,1],lightgray:[211,211,211,1],lightgreen:[144,238,144,1],lightgrey:[211,211,211,1],lightpink:[255,182,193,1],lightsalmon:[255,160,122,1],lightseagreen:[32,178,170,1],lightskyblue:[135,206,250,1],lightslategray:[119,136,153,1],lightslategrey:[119,136,153,1],lightsteelblue:[176,196,222,1],lightyellow:[255,255,224,1],lime:[0,255,0,1],limegreen:[50,205,50,1],linen:[250,240,230,1],magenta:[255,0,255,1],maroon:[128,0,0,1],mediumaquamarine:[102,205,170,1],mediumblue:[0,0,205,1],mediumorchid:[186,85,211,1],mediumpurple:[147,112,219,1],mediumseagreen:[60,179,113,1],mediumslateblue:[123,104,238,1],mediumspringgreen:[0,250,154,1],mediumturquoise:[72,209,204,1],mediumvioletred:[199,21,133,1],midnightblue:[25,25,112,1],mintcream:[245,255,250,1],mistyrose:[255,228,225,1],moccasin:[255,228,181,1],navajowhite:[255,222,173,1],navy:[0,0,128,1],oldlace:[253,245,230,1],olive:[128,128,0,1],olivedrab:[107,142,35,1],orange:[255,165,0,1],orangered:[255,69,0,1],orchid:[218,112,214,1],palegoldenrod:[238,232,170,1],palegreen:[152,251,152,1],paleturquoise:[175,238,238,1],palevioletred:[219,112,147,1],papayawhip:[255,239,213,1],peachpuff:[255,218,185,1],peru:[205,133,63,1],pink:[255,192,203,1],plum:[221,160,221,1],powderblue:[176,224,230,1],purple:[128,0,128,1],rebeccapurple:[102,51,153,1],red:[255,0,0,1],rosybrown:[188,143,143,1],royalblue:[65,105,225,1],saddlebrown:[139,69,19,1],salmon:[250,128,114,1],sandybrown:[244,164,96,1],seagreen:[46,139,87,1],seashell:[255,245,238,1],sienna:[160,82,45,1],silver:[192,192,192,1],skyblue:[135,206,235,1],slateblue:[106,90,205,1],slategray:[112,128,144,1],slategrey:[112,128,144,1],snow:[255,250,250,1],springgreen:[0,255,127,1],steelblue:[70,130,180,1],tan:[210,180,140,1],teal:[0,128,128,1],thistle:[216,191,216,1],tomato:[255,99,71,1],turquoise:[64,224,208,1],violet:[238,130,238,1],wheat:[245,222,179,1],white:[255,255,255,1],whitesmoke:[245,245,245,1],yellow:[255,255,0,1],yellowgreen:[154,205,50,1]};function r(t){return(t=Math.round(t))<0?0:t>255?255:t}function i(t){return t<0?0:t>1?1:t}function o(t){return"%"===t[t.length-1]?r(parseFloat(t)/100*255):r(parseInt(t))}function a(t){return"%"===t[t.length-1]?i(parseFloat(t)/100):i(parseFloat(t))}function s(t,e,n){return n<0?n+=1:n>1&&(n-=1),6*n<1?t+(e-t)*n*6:2*n<1?e:3*n<2?t+(e-t)*(2/3-n)*6:t}try{e.parseCSSColor=function(t){var e,i=t.replace(/ /g,"").toLowerCase();if(i in n)return n[i].slice();if("#"===i[0])return 4===i.length?(e=parseInt(i.substr(1),16))>=0&&e<=4095?[(3840&e)>>4|(3840&e)>>8,240&e|(240&e)>>4,15&e|(15&e)<<4,1]:null:7===i.length&&(e=parseInt(i.substr(1),16))>=0&&e<=16777215?[(16711680&e)>>16,(65280&e)>>8,255&e,1]:null;var u=i.indexOf("("),l=i.indexOf(")");if(-1!==u&&l+1===i.length){var c=i.substr(0,u),f=i.substr(u+1,l-(u+1)).split(","),h=1;switch(c){case"rgba":if(4!==f.length)return null;h=a(f.pop());case"rgb":return 3!==f.length?null:[o(f[0]),o(f[1]),o(f[2]),h];case"hsla":if(4!==f.length)return null;h=a(f.pop());case"hsl":if(3!==f.length)return null;var p=(parseFloat(f[0])%360+360)%360/360,d=a(f[1]),y=a(f[2]),m=y<=.5?y*(d+1):y+d-y*d,v=2*y-m;return[r(255*s(v,m,p+1/3)),r(255*s(v,m,p)),r(255*s(v,m,p-1/3)),h];default:return null}}return null}}catch(t){}},function(t,e,n){function r(t){return function(t){if(Array.isArray(t)){for(var e=0,n=new Array(t.length);e<t.length;e++)n[e]=t[e];return n}}(t)||function(t){if(Symbol.iterator in Object(t)||"[object Arguments]"===Object.prototype.toString.call(t))return Array.from(t)}(t)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance")}()}function i(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,r.key,r)}}var o=n(1),a=n(8),s=a.ObjectType,u=a.ValueType,l=a.StringType,c=a.NumberType,f=a.BooleanType,h=n(31),p=n(8),d=p.checkSubtype,y=p.toString,m=n(25).typeOf,v={string:l,number:c,boolean:f,object:s},g=function(){function t(e,n){!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,t),this.type=e,this.args=n}var e,n,a;return e=t,a=[{key:"parse",value:function(e,n){if(e.length<2)return n.error("Expected at least one argument.");var r=e[0];o(v[r],r);for(var i=v[r],a=[],s=1;s<e.length;s++){var l=n.parse(e[s],s,u);if(!l)return null;a.push(l)}return new t(i,a)}}],(n=[{key:"evaluate",value:function(t){for(var e=0;e<this.args.length;e++){var n=this.args[e].evaluate(t);if(!d(this.type,m(n)))return n;if(e===this.args.length-1)throw new h("Expected value to be of type ".concat(y(this.type),", but found ").concat(y(m(n))," instead."))}return o(!1),null}},{key:"eachChild",value:function(t){this.args.forEach(t)}},{key:"possibleOutputs",value:function(){var t;return(t=[]).concat.apply(t,r(this.args.map(function(t){return t.possibleOutputs()})))}}])&&i(e.prototype,n),a&&i(e,a),t}();t.exports=g},function(t,e,n){function r(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,r.key,r)}}var i=n(8),o=i.toString,a=i.array,s=i.ValueType,u=i.StringType,l=i.NumberType,c=i.BooleanType,f=i.checkSubtype,h=n(25).typeOf,p=n(31),d={string:u,number:l,boolean:c},y=function(){function t(e,n){!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,t),this.type=e,this.input=n}var e,n,i;return e=t,i=[{key:"parse",value:function(e,n){if(e.length<2||e.length>4)return n.error("Expected 1, 2, or 3 arguments, but found ".concat(e.length-1," instead."));var r,i;if(e.length>2){var o=e[1];if("string"!=typeof o||!(o in d))return n.error('The item type argument of "array" must be one of string, number, boolean',1);r=d[o]}else r=s;if(e.length>3){if("number"!=typeof e[2]||e[2]<0||e[2]!==Math.floor(e[2]))return n.error('The length argument to "array" must be a positive integer literal',2);i=e[2]}var u=a(r,i),l=n.parse(e[e.length-1],e.length-1,s);return l?new t(u,l):null}}],(n=[{key:"evaluate",value:function(t){var e=this.input.evaluate(t);if(f(this.type,h(e)))throw new p("Expected value to be of type ".concat(o(this.type),", but found ").concat(o(h(e))," instead."));return e}},{key:"eachChild",value:function(t){t(this.input)}},{key:"possibleOutputs",value:function(){return this.input.possibleOutputs()}}])&&r(e.prototype,n),i&&r(e,i),t}();t.exports=y},function(t,e,n){function r(t){return function(t){if(Array.isArray(t)){for(var e=0,n=new Array(t.length);e<t.length;e++)n[e]=t[e];return n}}(t)||function(t){if(Symbol.iterator in Object(t)||"[object Arguments]"===Object.prototype.toString.call(t))return Array.from(t)}(t)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance")}()}function i(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,r.key,r)}}var o=n(1),a=n(8),s=a.ColorType,u=a.ValueType,l=a.NumberType,c=n(25),f=c.Color,h=c.validateRGBA,p=n(31),d={"to-number":l,"to-color":s},y=function(){function t(e,n){!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,t),this.type=e,this.args=n}var e,n,a;return e=t,a=[{key:"parse",value:function(e,n){if(e.length<2)return n.error("Expected at least one argument.");var r=e[0];o(d[r],r);for(var i=d[r],a=[],s=1;s<e.length;s++){var l=n.parse(e[s],s,u);if(!l)return null;a.push(l)}return new t(i,a)}}],(n=[{key:"evaluate",value:function(t){if("color"===this.type.kind){var e,n,r=!0,i=!1,o=void 0;try{for(var a,s=this.args[Symbol.iterator]();!(r=(a=s.next()).done);r=!0){if(e=a.value.evaluate(t),n=null,"string"==typeof e){var u=t.parseColor(e);if(u)return u}else if(Array.isArray(e)&&!(n=e.length<3||e.length>4?"Invalid rbga value ".concat(JSON.stringify(e),": expected an array containing either three or four numeric values."):h(e[0],e[1],e[2],e[3])))return new f(e[0]/255,e[1]/255,e[2]/255,e[3])}}catch(t){i=!0,o=t}finally{try{r||null==s.return||s.return()}finally{if(i)throw o}}throw new p(n||"Could not parse color from value '".concat("string"==typeof e?e:JSON.stringify(e),"'"))}var l=null,c=!0,d=!1,y=void 0;try{for(var m,v=this.args[Symbol.iterator]();!(c=(m=v.next()).done);c=!0){if(null!==(l=m.value.evaluate(t))){var g=Number(l);if(!isNaN(g))return g}}}catch(t){d=!0,y=t}finally{try{c||null==v.return||v.return()}finally{if(d)throw y}}throw new p("Could not convert ".concat(JSON.stringify(l)," to number."))}},{key:"eachChild",value:function(t){this.args.forEach(t)}},{key:"possibleOutputs",value:function(){var t;return(t=[]).concat.apply(t,r(this.args.map(function(t){return t.possibleOutputs()})))}}])&&i(e.prototype,n),a&&i(e,a),t}();t.exports=y},function(t,e,n){var r=n(42).CompoundExpression;t.exports={isFeatureConstant:function t(e){if(e instanceof r){if("get"===e.name&&1===e.args.length)return!1;if("has"===e.name&&1===e.args.length)return!1;if("properties"===e.name||"geometry-type"===e.name||"id"===e.name)return!1;if(e.name.startsWith("filter-"))return!1}var n=!0;return e.eachChild(function(e){n&&!t(e)&&(n=!1)}),n},isGlobalPropertyConstant:function t(e,n){if(e instanceof r&&n.indexOf(e.name)>=0)return!1;var i=!0;return e.eachChild(function(e){i&&!t(e,n)&&(i=!1)}),i}}},function(t,e){function n(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,r.key,r)}}var r=function(){function t(e,n){!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,t),this.type=n,this.name=e}var e,r,i;return e=t,i=[{key:"parse",value:function(e,n){if(2!==e.length||"string"!=typeof e[1])return n.error("'var' expression requires exactly one string literal argument.");var r=e[1];return n.scope.has(r)?new t(r,n.scope.get(r).type):n.error('Unknown variable "'.concat(r,'". Make sure "').concat(r,'" has been bound in an enclosing "let" expression before using it.'),1)}}],(r=[{key:"evaluate",value:function(t){return t.scope.get(this.name).evaluate(t)}},{key:"eachChild",value:function(){}},{key:"possibleOutputs",value:function(){return[void 0]}}])&&n(e.prototype,r),i&&n(e,i),t}();t.exports=r},function(t,e,n){function r(t){return function(t){if(Array.isArray(t)){for(var e=0,n=new Array(t.length);e<t.length;e++)n[e]=t[e];return n}}(t)||i(t)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance")}()}function i(t){if(Symbol.iterator in Object(t)||"[object Arguments]"===Object.prototype.toString.call(t))return Array.from(t)}function o(t,e){return s(t)||function(t,e){var n=[],r=!0,i=!1,o=void 0;try{for(var a,s=t[Symbol.iterator]();!(r=(a=s.next()).done)&&(n.push(a.value),!e||n.length!==e);r=!0);}catch(t){i=!0,o=t}finally{try{r||null==s.return||s.return()}finally{if(i)throw o}}return n}(t,e)||a()}function a(){throw new TypeError("Invalid attempt to destructure non-iterable instance")}function s(t){if(Array.isArray(t))return t}function u(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,r.key,r)}}var l=n(8).NumberType,c=n(87).findStopLessThanOrEqualTo,f=function(){function t(e,n,r){!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,t),this.type=e,this.input=n,this.labels=[],this.outputs=[];var i=!0,a=!1,s=void 0;try{for(var u,l=r[Symbol.iterator]();!(i=(u=l.next()).done);i=!0){var c=o(u.value,2),f=c[0],h=c[1];this.labels.push(f),this.outputs.push(h)}}catch(t){a=!0,s=t}finally{try{i||null==l.return||l.return()}finally{if(a)throw s}}}var e,n,f;return e=t,f=[{key:"parse",value:function(e,n){var r,o=s(r=e)||i(r)||a(),u=o[1],c=o.slice(2);if(e.length-1<4)return n.error("Expected at least 4 arguments, but found only ".concat(e.length-1,"."));if((e.length-1)%2!=0)return n.error("Expected an even number of arguments.");if(!(u=n.parse(u,1,l)))return null;var f=[],h=null;n.expectedType&&"value"!==n.expectedType.kind&&(h=n.expectedType),c.unshift(-1/0);for(var p=0;p<c.length;p+=2){var d=c[p],y=c[p+1],m=p+1,v=p+2;if("number"!=typeof d)return n.error('Input/output pairs for "step" expressions must be defined using literal numeric values (not computed expressions) for the input values.',m);if(f.length&&f[f.length-1][0]>=d)return n.error('Input/output pairs for "step" expressions must be arranged with input values in strictly ascending order.',m);var g=n.parse(y,v,h);if(!g)return null;h=h||g.type,f.push([d,g])}return new t(h,u,f)}}],(n=[{key:"evaluate",value:function(t){var e=this.labels,n=this.outputs;if(1===e.length)return n[0].evaluate(t);var r=this.input.evaluate(t);if(r<=e[0])return n[0].evaluate(t);var i=e.length;return r>=e[i-1]?n[i-1].evaluate(t):n[c(e,r)].evaluate(t)}},{key:"eachChild",value:function(t){t(this.input);var e=!0,n=!1,r=void 0;try{for(var i,o=this.outputs[Symbol.iterator]();!(e=(i=o.next()).done);e=!0){t(i.value)}}catch(t){n=!0,r=t}finally{try{e||null==o.return||o.return()}finally{if(n)throw r}}}},{key:"possibleOutputs",value:function(){var t;return(t=[]).concat.apply(t,r(this.outputs.map(function(t){return t.possibleOutputs()})))}}])&&u(e.prototype,n),f&&u(e,f),t}();t.exports=f},function(t,e,n){var r=n(31);t.exports={findStopLessThanOrEqualTo:function(t,e){for(var n,i,o=0,a=t.length-1,s=0;o<=a;){if(n=t[s=Math.floor((o+a)/2)],i=t[s+1],e===n||e>n&&e<i)return s;if(n<e)o=s+1;else{if(!(n>e))throw new r("Input is not a number.");a=s-1}}return Math.max(s-1,0)}}},function(t,e,n){function r(t){return function(t){if(Array.isArray(t)){for(var e=0,n=new Array(t.length);e<t.length;e++)n[e]=t[e];return n}}(t)||function(t){if(Symbol.iterator in Object(t)||"[object Arguments]"===Object.prototype.toString.call(t))return Array.from(t)}(t)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance")}()}function i(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,r.key,r)}}var o=n(1),a=n(8),s=a.checkSubtype,u=a.ValueType,l=function(){function t(e,n){!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,t),this.type=e,this.args=n}var e,n,a;return e=t,a=[{key:"parse",value:function(e,n){if(e.length<2)return n.error("Expectected at least one argument.");var r=null,i=n.expectedType;i&&"value"!==i.kind&&(r=i);var a=[],l=!0,c=!1,f=void 0;try{for(var h,p=e.slice(1)[Symbol.iterator]();!(l=(h=p.next()).done);l=!0){var d=h.value,y=n.parse(d,1+a.length,r,void 0,{omitTypeAnnotations:!0});if(!y)return null;r=r||y.type,a.push(y)}}catch(t){c=!0,f=t}finally{try{l||null==p.return||p.return()}finally{if(c)throw f}}return o(r),new t(i&&a.some(function(t){return s(i,t.type)})?u:r,a)}}],(n=[{key:"evaluate",value:function(t){var e=null,n=!0,r=!1,i=void 0;try{for(var o,a=this.args[Symbol.iterator]();!(n=(o=a.next()).done);n=!0){if(null!==(e=o.value.evaluate(t)))break}}catch(t){r=!0,i=t}finally{try{n||null==a.return||a.return()}finally{if(r)throw i}}return e}},{key:"eachChild",value:function(t){this.args.forEach(t)}},{key:"possibleOutputs",value:function(){var t;return(t=[]).concat.apply(t,r(this.args.map(function(t){return t.possibleOutputs()})))}}])&&i(e.prototype,n),a&&i(e,a),t}();t.exports=l},function(t,e){function n(t){return(n="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t})(t)}function r(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,r.key,r)}}var i=function(){function t(e,n){!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,t),this.type=n.type,this.bindings=[].concat(e),this.result=n}var e,i,o;return e=t,o=[{key:"parse",value:function(e,r){if(e.length<4)return r.error("Expected at least 3 arguments, but found ".concat(e.length-1," instead."));for(var i=[],o=1;o<e.length-1;o+=2){var a=e[o];if("string"!=typeof a)return r.error("Expected string, but found ".concat(n(a)," instead."),o);if(/[^a-zA-Z0-9_]/.test(a))return r.error("Variable names must contain only alphanumeric characters or '_'.",o);var s=r.parse(e[o+1],o+1);if(!s)return null;i.push([a,s])}var u=r.parse(e[e.length-1],e.length-1,void 0,i);return u?new t(i,u):null}}],(i=[{key:"evaluate",value:function(t){t.pushScope(this.bindings);var e=this.result.evaluate(t);return t.popScope(),e}},{key:"eachChild",value:function(t){var e=!0,n=!1,r=void 0;try{for(var i,o=this.bindings[Symbol.iterator]();!(e=(i=o.next()).done);e=!0){t(i.value[1])}}catch(t){n=!0,r=t}finally{try{e||null==o.return||o.return()}finally{if(n)throw r}}t(this.result)}},{key:"possibleOutputs",value:function(){return this.result.possibleOutputs()}}])&&r(e.prototype,i),o&&r(e,o),t}();t.exports=i},function(t,e,n){function r(t){return function(t){if(Array.isArray(t)){for(var e=0,n=new Array(t.length);e<t.length;e++)n[e]=t[e];return n}}(t)||function(t){if(Symbol.iterator in Object(t)||"[object Arguments]"===Object.prototype.toString.call(t))return Array.from(t)}(t)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance")}()}function i(t){return(i="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t})(t)}function o(t,e){return function(t){if(Array.isArray(t))return t}(t)||function(t,e){var n=[],r=!0,i=!1,o=void 0;try{for(var a,s=t[Symbol.iterator]();!(r=(a=s.next()).done)&&(n.push(a.value),!e||n.length!==e);r=!0);}catch(t){i=!0,o=t}finally{try{r||null==s.return||s.return()}finally{if(i)throw o}}return n}(t,e)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance")}()}var a=n(8),s=a.NumberType,u=a.StringType,l=a.BooleanType,c=a.ColorType,f=a.ObjectType,h=a.ValueType,p=a.ErrorType,d=a.array,y=a.toString,m=n(25),v=m.typeOf,g=m.Color,b=m.validateRGBA,x=n(42),_=x.CompoundExpression,w=x.varargs,k=n(31),S=n(89),T=n(85),A=n(79),E=n(81),z=n(82),C=n(83),P=n(142),O=n(143),I=n(144),j=n(86),M=n(56),L=n(88),B=n(145),R={"==":B.Equals,"!=":B.NotEquals,array:z,at:P,boolean:E,case:I,coalesce:L,interpolate:M,let:S,literal:A,match:O,number:E,object:E,step:j,string:E,"to-color":C,"to-number":C,var:T};function D(t,e){var n=o(e,4),r=n[0],i=n[1],a=n[2],s=n[3];r=r.evaluate(t),i=i.evaluate(t),a=a.evaluate(t);var u=s?s.evaluate(t):1,l=b(r,i,a,u);if(l)throw new k(l);return new g(r/255*u,i/255*u,a/255*u,u)}function F(t,e){return t in e}function V(t,e){var n=e[t];return void 0===n?null:n}function N(t,e){return o(e,1)[0].evaluate(t).length}function q(t,e){var n=o(e,2),r=n[0],i=n[1];return r.evaluate(t)<i.evaluate(t)}function U(t,e){var n=o(e,2),r=n[0],i=n[1];return r.evaluate(t)>i.evaluate(t)}function Z(t,e){var n=o(e,2),r=n[0],i=n[1];return r.evaluate(t)<=i.evaluate(t)}function G(t,e){var n=o(e,2),r=n[0],i=n[1];return r.evaluate(t)>=i.evaluate(t)}_.register(R,{error:[p,[u],function(t,e){var n=o(e,1)[0];throw new k(n.evaluate(t))}],typeof:[u,[h],function(t,e){var n=o(e,1)[0];return y(v(n.evaluate(t)))}],"to-string":[u,[h],function(t,e){var n=o(e,1)[0],r=i(n=n.evaluate(t));return null===n||"string"===r||"number"===r||"boolean"===r?String(n):n instanceof g?n.toString():JSON.stringify(n)}],"to-boolean":[l,[h],function(t,e){var n=o(e,1)[0];return Boolean(n.evaluate(t))}],"to-rgba":[d(s,4),[c],function(t,e){var n=o(e,1)[0].evaluate(t),r=n.r,i=n.g,a=n.b,s=n.a;return[255*r/s,255*i/s,255*a/s,s]}],rgb:[c,[s,s,s],D],rgba:[c,[s,s,s,s],D],length:{type:s,overloads:[[[u],N],[[d(h)],N]]},has:{type:l,overloads:[[[u],function(t,e){return F(o(e,1)[0].evaluate(t),t.properties())}],[[u,f],function(t,e){var n=o(e,2),r=n[0],i=n[1];return F(r.evaluate(t),i.evaluate(t))}]]},get:{type:h,overloads:[[[u],function(t,e){return V(o(e,1)[0].evaluate(t),t.properties())}],[[u,f],function(t,e){var n=o(e,2),r=n[0],i=n[1];return V(r.evaluate(t),i.evaluate(t))}]]},properties:[f,[],function(t){return t.properties()}],"geometry-type":[u,[],function(t){return t.geometryType()}],id:[h,[],function(t){return t.id()}],zoom:[s,[],function(t){return t.globals.zoom}],"heatmap-density":[s,[],function(t){return t.globals.heatmapDensity||0}],"+":[s,w(s),function(t,e){var n=0,r=!0,i=!1,o=void 0;try{for(var a,s=e[Symbol.iterator]();!(r=(a=s.next()).done);r=!0){n+=a.value.evaluate(t)}}catch(t){i=!0,o=t}finally{try{r||null==s.return||s.return()}finally{if(i)throw o}}return n}],"*":[s,w(s),function(t,e){var n=1,r=!0,i=!1,o=void 0;try{for(var a,s=e[Symbol.iterator]();!(r=(a=s.next()).done);r=!0){n*=a.value.evaluate(t)}}catch(t){i=!0,o=t}finally{try{r||null==s.return||s.return()}finally{if(i)throw o}}return n}],"-":{type:s,overloads:[[[s,s],function(t,e){var n=o(e,2),r=n[0],i=n[1];return r.evaluate(t)-i.evaluate(t)}],[[s],function(t,e){return-o(e,1)[0].evaluate(t)}]]},"/":[s,[s,s],function(t,e){var n=o(e,2),r=n[0],i=n[1];return r.evaluate(t)/i.evaluate(t)}],"%":[s,[s,s],function(t,e){var n=o(e,2),r=n[0],i=n[1];return r.evaluate(t)%i.evaluate(t)}],ln2:[s,[],function(){return Math.LN2}],pi:[s,[],function(){return Math.PI}],e:[s,[],function(){return Math.E}],"^":[s,[s,s],function(t,e){var n=o(e,2),r=n[0],i=n[1];return Math.pow(r.evaluate(t),i.evaluate(t))}],sqrt:[s,[s],function(t,e){var n=o(e,1)[0];return Math.sqrt(n.evaluate(t))}],log10:[s,[s],function(t,e){var n=o(e,1)[0];return Math.log10(n.evaluate(t))}],ln:[s,[s],function(t,e){var n=o(e,1)[0];return Math.log(n.evaluate(t))}],log2:[s,[s],function(t,e){var n=o(e,1)[0];return Math.log2(n.evaluate(t))}],sin:[s,[s],function(t,e){var n=o(e,1)[0];return Math.sin(n.evaluate(t))}],cos:[s,[s],function(t,e){var n=o(e,1)[0];return Math.cos(n.evaluate(t))}],tan:[s,[s],function(t,e){var n=o(e,1)[0];return Math.tan(n.evaluate(t))}],asin:[s,[s],function(t,e){var n=o(e,1)[0];return Math.asin(n.evaluate(t))}],acos:[s,[s],function(t,e){var n=o(e,1)[0];return Math.acos(n.evaluate(t))}],atan:[s,[s],function(t,e){var n=o(e,1)[0];return Math.atan(n.evaluate(t))}],min:[s,w(s),function(t,e){return Math.min.apply(Math,r(e.map(function(e){return e.evaluate(t)})))}],max:[s,w(s),function(t,e){return Math.max.apply(Math,r(e.map(function(e){return e.evaluate(t)})))}],"filter-==":[l,[u,h],function(t,e){var n=o(e,2),r=n[0],i=n[1];return t.properties()[r.value]===i.value}],"filter-id-==":[l,[h],function(t,e){var n=o(e,1)[0];return t.id()===n.value}],"filter-type-==":[l,[u],function(t,e){var n=o(e,1)[0];return t.geometryType()===n.value}],"filter-<":[l,[u,h],function(t,e){var n=o(e,2),r=n[0],a=n[1],s=t.properties()[r.value],u=a.value;return i(s)===i(u)&&s<u}],"filter-id-<":[l,[h],function(t,e){var n=o(e,1)[0],r=t.id(),a=n.value;return i(r)===i(a)&&r<a}],"filter->":[l,[u,h],function(t,e){var n=o(e,2),r=n[0],a=n[1],s=t.properties()[r.value],u=a.value;return i(s)===i(u)&&s>u}],"filter-id->":[l,[h],function(t,e){var n=o(e,1)[0],r=t.id(),a=n.value;return i(r)===i(a)&&r>a}],"filter-<=":[l,[u,h],function(t,e){var n=o(e,2),r=n[0],a=n[1],s=t.properties()[r.value],u=a.value;return i(s)===i(u)&&s<=u}],"filter-id-<=":[l,[h],function(t,e){var n=o(e,1)[0],r=t.id(),a=n.value;return i(r)===i(a)&&r<=a}],"filter->=":[l,[u,h],function(t,e){var n=o(e,2),r=n[0],a=n[1],s=t.properties()[r.value],u=a.value;return i(s)===i(u)&&s>=u}],"filter-id->=":[l,[h],function(t,e){var n=o(e,1)[0],r=t.id(),a=n.value;return i(r)===i(a)&&r>=a}],"filter-has":[l,[h],function(t,e){return o(e,1)[0].value in t.properties()}],"filter-has-id":[l,[],function(t){return null!==t.id()}],"filter-type-in":[l,[d(u)],function(t,e){return o(e,1)[0].value.indexOf(t.geometryType())>=0}],"filter-id-in":[l,[d(h)],function(t,e){return o(e,1)[0].value.indexOf(t.id())>=0}],"filter-in-small":[l,[u,d(h)],function(t,e){var n=o(e,2),r=n[0];return n[1].value.indexOf(t.properties()[r.value])>=0}],"filter-in-large":[l,[u,d(h)],function(t,e){var n=o(e,2),r=n[0],i=n[1];return function(t,e,n,r){for(;n<=r;){var i=n+r>>1;if(e[i]===t)return!0;e[i]>t?r=i-1:n=i+1}return!1}(t.properties()[r.value],i.value,0,i.value.length-1)}],">":{type:l,overloads:[[[s,s],U],[[u,u],U]]},"<":{type:l,overloads:[[[s,s],q],[[u,u],q]]},">=":{type:l,overloads:[[[s,s],G],[[u,u],G]]},"<=":{type:l,overloads:[[[s,s],Z],[[u,u],Z]]},all:{type:l,overloads:[[[l,l],function(t,e){var n=o(e,2),r=n[0],i=n[1];return r.evaluate(t)&&i.evaluate(t)}],[w(l),function(t,e){var n=!0,r=!1,i=void 0;try{for(var o,a=e[Symbol.iterator]();!(n=(o=a.next()).done);n=!0){if(!o.value.evaluate(t))return!1}}catch(t){r=!0,i=t}finally{try{n||null==a.return||a.return()}finally{if(r)throw i}}return!0}]]},any:{type:l,overloads:[[[l,l],function(t,e){var n=o(e,2),r=n[0],i=n[1];return r.evaluate(t)||i.evaluate(t)}],[w(l),function(t,e){var n=!0,r=!1,i=void 0;try{for(var o,a=e[Symbol.iterator]();!(n=(o=a.next()).done);n=!0){if(o.value.evaluate(t))return!0}}catch(t){r=!0,i=t}finally{try{n||null==a.return||a.return()}finally{if(r)throw i}}return!1}]]},"!":[l,[l],function(t,e){return!o(e,1)[0].evaluate(t)}],upcase:[u,[u],function(t,e){return o(e,1)[0].evaluate(t).toUpperCase()}],downcase:[u,[u],function(t,e){return o(e,1)[0].evaluate(t).toLowerCase()}],concat:[u,w(u),function(t,e){return e.map(function(e){return e.evaluate(t)}).join("")}]}),t.exports=R},function(t,e,n){var r=n(7),i=n(17),o=n(29),a=n(43),s=n(92),u=n(93),l=n(24);t.exports=function(t){var e,n,c,f=t.valueSpec,h=l(t.value.type),p={},d="categorical"!==h&&void 0===t.value.property,y=!d,m="array"===i(t.value.stops)&&"array"===i(t.value.stops[0])&&"object"===i(t.value.stops[0][0]),v=a({key:t.key,value:t.value,valueSpec:t.styleSpec.function,style:t.style,styleSpec:t.styleSpec,objectElementValidators:{stops:function(t){if("identity"===h)return[new r(t.key,t.value,'identity function may not have a "stops" property')];var e=[],n=t.value;e=e.concat(s({key:t.key,value:n,valueSpec:t.valueSpec,style:t.style,styleSpec:t.styleSpec,arrayElementValidator:g})),"array"===i(n)&&0===n.length&&e.push(new r(t.key,n,"array must have at least one stop"));return e},default:function(t){return o({key:t.key,value:t.value,valueSpec:f,style:t.style,styleSpec:t.styleSpec})}}});return"identity"===h&&d&&v.push(new r(t.key,t.value,'missing required property "property"')),"identity"===h||t.value.stops||v.push(new r(t.key,t.value,'missing required property "stops"')),"exponential"===h&&"piecewise-constant"===t.valueSpec.function&&v.push(new r(t.key,t.value,"exponential functions not supported")),t.styleSpec.$version>=8&&(y&&!t.valueSpec["property-function"]?v.push(new r(t.key,t.value,"property functions not supported")):d&&!t.valueSpec["zoom-function"]&&"heatmap-color"!==t.objectKey&&v.push(new r(t.key,t.value,"zoom functions not supported"))),"categorical"!==h&&!m||void 0!==t.value.property||v.push(new r(t.key,t.value,'"property" property is required')),v;function g(t){var e=[],s=t.value,h=t.key;if("array"!==i(s))return[new r(h,s,"array expected, ".concat(i(s)," found"))];if(2!==s.length)return[new r(h,s,"array length 2 expected, length ".concat(s.length," found"))];if(m){if("object"!==i(s[0]))return[new r(h,s,"object expected, ".concat(i(s[0])," found"))];if(void 0===s[0].zoom)return[new r(h,s,"object stop key must have zoom")];if(void 0===s[0].value)return[new r(h,s,"object stop key must have value")];if(c&&c>l(s[0].zoom))return[new r(h,s[0].zoom,"stop zoom values must appear in ascending order")];l(s[0].zoom)!==c&&(c=l(s[0].zoom),n=void 0,p={}),e=e.concat(a({key:"".concat(h,"[0]"),value:s[0],valueSpec:{zoom:{}},style:t.style,styleSpec:t.styleSpec,objectElementValidators:{zoom:u,value:b}}))}else e=e.concat(b({key:"".concat(h,"[0]"),value:s[0],valueSpec:{},style:t.style,styleSpec:t.styleSpec},s));return e.concat(o({key:"".concat(h,"[1]"),value:s[1],valueSpec:f,style:t.style,styleSpec:t.styleSpec}))}function b(t,o){var a=i(t.value),s=l(t.value),u=null!==t.value?t.value:o;if(e){if(a!==e)return[new r(t.key,u,"".concat(a," stop domain type must match previous stop domain type ").concat(e))]}else e=a;if("number"!==a&&"string"!==a&&"boolean"!==a)return[new r(t.key,u,"stop domain value must be a number, string, or boolean")];if("number"!==a&&"categorical"!==h){var c="number expected, ".concat(a," found");return f["property-function"]&&void 0===h&&(c+='\nIf you intended to use a categorical function, specify `"type": "categorical"`.'),[new r(t.key,u,c)]}return"categorical"!==h||"number"!==a||isFinite(s)&&Math.floor(s)===s?"categorical"!==h&&"number"===a&&void 0!==n&&s<n?[new r(t.key,u,"stop domain values must appear in ascending order")]:(n=s,"categorical"===h&&s in p?[new r(t.key,u,"stop domain values must be unique")]:(p[s]=!0,[])):[new r(t.key,u,"integer expected, found ".concat(s))]}}},function(t,e,n){var r=n(17),i=n(29),o=n(7);t.exports=function(t){var e=t.value,n=t.valueSpec,a=t.style,s=t.styleSpec,u=t.key,l=t.arrayElementValidator||i;if("array"!==r(e))return[new o(u,e,"array expected, ".concat(r(e)," found"))];if(n.length&&e.length!==n.length)return[new o(u,e,"array length ".concat(n.length," expected, length ").concat(e.length," found"))];if(n["min-length"]&&e.length<n["min-length"])return[new o(u,e,"array length at least ".concat(n["min-length"]," expected, length ").concat(e.length," found"))];var c={type:n.value};s.$version<7&&(c.function=n.function),"object"===r(n.value)&&(c=n.value);for(var f=[],h=0;h<e.length;h++)f=f.concat(l({array:e,arrayIndex:h,value:e[h],valueSpec:c,style:a,styleSpec:s,key:"".concat(u,"[").concat(h,"]")}));return f}},function(t,e,n){var r=n(17),i=n(7);t.exports=function(t){var e=t.key,n=t.value,o=t.valueSpec,a=r(n);return"number"!==a?[new i(e,n,"number expected, ".concat(a," found"))]:"minimum"in o&&n<o.minimum?[new i(e,n,"".concat(n," is less than the minimum value ").concat(o.minimum))]:"maximum"in o&&n>o.maximum?[new i(e,n,"".concat(n," is greater than the maximum value ").concat(o.maximum))]:[]}},function(t,e,n){var r=n(7),i=n(30),o=i.createExpression,a=i.createPropertyExpression,s=n(24);t.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 r("".concat(t.key).concat(e.key),t.value,e.message)}):"property"===t.expressionContext&&"text-font"===t.propertyKey&&-1!==e.value._styleExpression.expression.possibleOutputs().indexOf(void 0)?[new r(t.key,t.value,'Invalid data expression for "text-font". Output values must be contained as literals within the expression.')]:[]}},function(t,e,n){var r=n(7),i=n(24),o=n(43),a=n(59),s=n(96),u=n(98),l=n(29),c=n(41);t.exports=function(t){var e=[],n=t.value,f=t.key,h=t.style,p=t.styleSpec;n.type||n.ref||e.push(new r(f,n,'either "type" or "ref" is required'));var d,y=i(n.type),m=i(n.ref);if(n.id)for(var v=i(n.id),g=0;g<t.arrayIndex;g++){var b=h.layers[g];i(b.id)===v&&e.push(new r(f,n.id,'duplicate layer id "'.concat(n.id,'", previously used at line ').concat(b.id.__line__)))}if("ref"in n)["type","source","source-layer","filter","layout"].forEach(function(t){t in n&&e.push(new r(f,n[t],'"'.concat(t,'" is prohibited for ref layers')))}),h.layers.forEach(function(t){i(t.id)===m&&(d=t)}),d?d.ref?e.push(new r(f,n.ref,"ref cannot reference another ref layer")):y=i(d.type):e.push(new r(f,n.ref,'ref layer "'.concat(m,'" not found')));else if("background"!==y)if(n.source){var x=h.sources&&h.sources[n.source],_=x&&i(x.type);x?"vector"===_&&"raster"===y?e.push(new r(f,n.source,'layer "'.concat(n.id,'" requires a raster source'))):"raster"===_&&"raster"!==y?e.push(new r(f,n.source,'layer "'.concat(n.id,'" requires a vector source'))):"vector"!==_||n["source-layer"]?"raster-dem"===_&&"hillshade"!==y&&e.push(new r(f,n.source,"raster-dem source can only be used with layer type 'hillshade'.")):e.push(new r(f,n,'layer "'.concat(n.id,'" must specify a "source-layer"'))):e.push(new r(f,n.source,'source "'.concat(n.source,'" not found')))}else e.push(new r(f,n,'missing required property "source"'));return e=e.concat(o({key:f,value:n,valueSpec:p.layer,style:t.style,styleSpec:t.styleSpec,objectElementValidators:{"*":function(){return[]},type:function(){return l({key:"".concat(f,".type"),value:n.type,valueSpec:p.layer.type,style:t.style,styleSpec:t.styleSpec,object:n,objectKey:"type"})},filter:a,layout:function(t){return o({layer:n,key:t.key,value:t.value,style:t.style,styleSpec:t.styleSpec,objectElementValidators:{"*":function(t){return u(c({layerType:y},t))}}})},paint:function(t){return o({layer:n,key:t.key,value:t.value,style:t.style,styleSpec:t.styleSpec,objectElementValidators:{"*":function(t){return s(c({layerType:y},t))}}})}}}))}},function(t,e,n){var r=n(97);t.exports=function(t){return r(t,"paint")}},function(t,e,n){var r=n(29),i=n(7),o=n(17),a=n(57).isFunction,s=n(24);t.exports=function(t,e){var n=t.key,u=t.style,l=t.styleSpec,c=t.value,f=t.objectKey,h=l["".concat(e,"_").concat(t.layerType)];if(!h)return[];var p=f.match(/^(.*)-transition$/);if("paint"===e&&p&&h[p[1]]&&h[p[1]].transition)return r({key:n,value:c,valueSpec:l.transition,style:u,styleSpec:l});var d,y=t.valueSpec||h[f];if(!y)return[new i(n,c,'unknown property "'.concat(f,'"'))];if("string"===o(c)&&y["property-function"]&&!y.tokens&&(d=/^{([^}]+)}$/.exec(c)))return[new i(n,c,'"'.concat(f,'" does not support interpolation syntax\n')+'Use an identity property function instead: `{ "type": "identity", "property": '.concat(JSON.stringify(d[1])," }`."))];var m=[];return"symbol"===t.layerType&&("text-field"===f&&u&&!u.glyphs&&m.push(new i(n,c,'use of "text-field" requires a style "glyphs" property')),"text-font"===f&&a(s.deep(c))&&"identity"===s(c.type)&&m.push(new i(n,c,'"text-font" does not support identity functions'))),m.concat(r({key:t.key,value:c,valueSpec:y,style:u,styleSpec:l,expressionContext:"property",propertyKey:f}))}},function(t,e,n){var r=n(97);t.exports=function(t){return r(t,"layout")}},function(t,e,n){var r=n(7),i=n(24),o=n(43),a=n(58);t.exports=function(t){var e=t.value,n=t.key,s=t.styleSpec,u=t.style;if(!e.type)return[new r(n,e,'"type" is required')];var l=i(e.type),c=[];switch(l){case"vector":case"raster":case"raster-dem":if(c=c.concat(o({key:n,value:e,valueSpec:s["source_".concat(l.replace("-","_"))],style:t.style,styleSpec:s})),"url"in e)for(var f in e)["type","url","tileSize"].indexOf(f)<0&&c.push(new r("".concat(n,".").concat(f),e[f],'a source with a "url" property may not include a "'.concat(f,'" property')));return c;case"geojson":return o({key:n,value:e,valueSpec:s.source_geojson,style:u,styleSpec:s});case"video":return o({key:n,value:e,valueSpec:s.source_video,style:u,styleSpec:s});case"image":return o({key:n,value:e,valueSpec:s.source_image,style:u,styleSpec:s});case"canvas":return o({key:n,value:e,valueSpec:s.source_canvas,style:u,styleSpec:s});default:return a({key:"".concat(n,".type"),value:e.type,valueSpec:{values:["vector","raster","raster-dem","geojson","video","image","canvas"]},style:u,styleSpec:s})}}},function(t,e,n){var r=n(7),i=n(17),o=n(29);t.exports=function(t){var e=t.value,n=t.styleSpec,a=n.light,s=t.style,u=[],l=i(e);if(void 0===e)return u;if("object"!==l)return u=u.concat([new r("light",e,"object expected, ".concat(l," found"))]);for(var c in e){var f=c.match(/^(.*)-transition$/);u=f&&a[f[1]]&&a[f[1]].transition?u.concat(o({key:c,value:e[c],valueSpec:n.transition,style:s,styleSpec:n})):a[c]?u.concat(o({key:c,value:e[c],valueSpec:a[c],style:s,styleSpec:n})):u.concat([new r(c,e[c],'unknown property "'.concat(c,'"'))])}return u}},function(t,e,n){var r=n(17),i=n(7);t.exports=function(t){var e=t.value,n=t.key,o=r(e);return"string"!==o?[new i(n,e,"string expected, ".concat(o," found"))]:[]}},function(t,e,n){"use strict";t.exports=i;var r=3;function i(t,e,n){var i=this.cells=[];if(t instanceof ArrayBuffer){this.arrayBuffer=t;var o=new Int32Array(this.arrayBuffer);t=o[0],e=o[1],n=o[2],this.d=e+2*n;for(var a=0;a<this.d*this.d;a++){var s=o[r+a],u=o[r+a+1];i.push(s===u?null:o.subarray(s,u))}var l=o[r+i.length],c=o[r+i.length+1];this.keys=o.subarray(l,c),this.bboxes=o.subarray(c),this.insert=this._insertReadonly}else{this.d=e+2*n;for(var f=0;f<this.d*this.d;f++)i.push([]);this.keys=[],this.bboxes=[]}this.n=e,this.extent=t,this.padding=n,this.scale=e/t,this.uid=0;var h=n/e*t;this.min=-h,this.max=t+h}i.prototype.insert=function(t,e,n,r,i){this._forEachCell(e,n,r,i,this._insertCell,this.uid++),this.keys.push(t),this.bboxes.push(e),this.bboxes.push(n),this.bboxes.push(r),this.bboxes.push(i)},i.prototype._insertReadonly=function(){throw"Cannot insert into a GridIndex created from an ArrayBuffer."},i.prototype._insertCell=function(t,e,n,r,i,o){this.cells[i].push(o)},i.prototype.query=function(t,e,n,r,i){var o=this.min,a=this.max;if(t<=o&&e<=o&&a<=n&&a<=r&&!i)return Array.prototype.slice.call(this.keys);var s=[];return this._forEachCell(t,e,n,r,this._queryCell,s,{},i),s},i.prototype._queryCell=function(t,e,n,r,i,o,a,s){var u=this.cells[i];if(null!==u)for(var l=this.keys,c=this.bboxes,f=0;f<u.length;f++){var h=u[f];if(void 0===a[h]){var p=4*h;(s?s(c[p+0],c[p+1],c[p+2],c[p+3]):t<=c[p+2]&&e<=c[p+3]&&n>=c[p+0]&&r>=c[p+1])?(a[h]=!0,o.push(l[h])):a[h]=!1}}},i.prototype._forEachCell=function(t,e,n,r,i,o,a,s){for(var u=this._convertToCellCoord(t),l=this._convertToCellCoord(e),c=this._convertToCellCoord(n),f=this._convertToCellCoord(r),h=u;h<=c;h++)for(var p=l;p<=f;p++){var d=this.d*p+h;if((!s||s(this._convertFromCellCoord(h),this._convertFromCellCoord(p),this._convertFromCellCoord(h+1),this._convertFromCellCoord(p+1)))&&i.call(this,t,e,n,r,d,o,a,s))return}},i.prototype._convertFromCellCoord=function(t){return(t-this.padding)/this.scale},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=r+this.cells.length+1+1,n=0,i=0;i<this.cells.length;i++)n+=this.cells[i].length;var o=new Int32Array(e+n+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 u=t[s];o[r+s]=a,o.set(u,a),a+=u.length}return o[r+t.length]=a,o.set(this.keys,a),a+=this.keys.length,o[r+t.length+1]=a,o.set(this.bboxes,a),a+=this.bboxes.length,o.buffer}},function(t,e,n){function r(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,r.key,r)}}var i=n(14).CircleLayoutArray,o=n(152).members,a=n(36).SegmentVector,s=n(32).ProgramConfigurationSet,u=n(37).TriangleIndexArray,l=n(38),c=n(6),f=n(11).register;function h(t,e,n,r,i){t.emplaceBack(2*e+(r+1)/2,2*n+(i+1)/2)}var p=function(){function t(e){!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,t),this.zoom=e.zoom,this.overscaling=e.overscaling,this.layers=e.layers,this.layerIds=this.layers.map(function(t){return t.id}),this.index=e.index,this.layoutVertexArray=new i,this.indexArray=new u,this.segments=new a,this.programConfigurations=new s(o,e.layers,e.zoom)}var e,n,f;return e=t,(n=[{key:"populate",value:function(t,e){var n=!0,r=!1,i=void 0;try{for(var o,a=t[Symbol.iterator]();!(n=(o=a.next()).done);n=!0){var s=o.value,u=s.feature,c=s.index,f=s.sourceLayerIndex;if(this.layers[0]._featureFilter({zoom:this.zoom},u)){var h=l(u);this.addFeature(u,h),e.featureIndex.insert(u,h,c,f,this.index)}}}catch(t){r=!0,i=t}finally{try{n||null==a.return||a.return()}finally{if(r)throw i}}}},{key:"isEmpty",value:function(){return 0===this.layoutVertexArray.length}},{key:"upload",value:function(t){this.layoutVertexBuffer=t.createVertexBuffer(this.layoutVertexArray,o),this.indexBuffer=t.createIndexBuffer(this.indexArray),this.programConfigurations.upload(t)}},{key:"destroy",value:function(){this.layoutVertexBuffer&&(this.layoutVertexBuffer.destroy(),this.indexBuffer.destroy(),this.programConfigurations.destroy(),this.segments.destroy())}},{key:"addFeature",value:function(t,e){var n=!0,r=!1,i=void 0;try{for(var o,a=e[Symbol.iterator]();!(n=(o=a.next()).done);n=!0){var s=o.value,u=!0,l=!1,f=void 0;try{for(var p,d=s[Symbol.iterator]();!(u=(p=d.next()).done);u=!0){var y=p.value,m=y.x,v=y.y;if(!(m<0||m>=c||v<0||v>=c)){var g=this.segments.prepareSegment(4,this.layoutVertexArray,this.indexArray),b=g.vertexLength;h(this.layoutVertexArray,m,v,-1,-1),h(this.layoutVertexArray,m,v,1,-1),h(this.layoutVertexArray,m,v,1,1),h(this.layoutVertexArray,m,v,-1,1),this.indexArray.emplaceBack(b,b+1,b+2),this.indexArray.emplaceBack(b,b+3,b+2),g.vertexLength+=4,g.primitiveLength+=2}}}catch(t){l=!0,f=t}finally{try{u||null==d.return||d.return()}finally{if(l)throw f}}}}catch(t){r=!0,i=t}finally{try{n||null==a.return||a.return()}finally{if(r)throw i}}this.programConfigurations.populatePaintArrays(this.layoutVertexArray.length,t)}}])&&r(e.prototype,n),f&&r(e,f),t}();f("CircleBucket",p,{omit:["layers"]}),t.exports=p},function(t,e,n){"use strict";function r(t,e,n){n=n||2;var r,s,u,l,c,p,y,m=e&&e.length,v=m?e[0]*n:t.length,g=i(t,0,v,n,!0),b=[];if(!g||g.next===g.prev)return b;if(m&&(g=function(t,e,n,r){var a,s,u,l,c,p=[];for(a=0,s=e.length;a<s;a++)u=e[a]*r,l=a<s-1?e[a+1]*r:t.length,(c=i(t,u,l,r,!1))===c.next&&(c.steiner=!0),p.push(d(c));for(p.sort(f),a=0;a<p.length;a++)h(p[a],n),n=o(n,n.next);return n}(t,e,g,n)),t.length>80*n){r=u=t[0],s=l=t[1];for(var x=n;x<v;x+=n)(c=t[x])<r&&(r=c),(p=t[x+1])<s&&(s=p),c>u&&(u=c),p>l&&(l=p);y=0!==(y=Math.max(u-r,l-s))?1/y:0}return a(g,b,n,r,s,y),b}function i(t,e,n,r,i){var o,a;if(i===T(t,e,n,r)>0)for(o=e;o<n;o+=r)a=w(o,t[o],t[o+1],a);else for(o=n-r;o>=e;o-=r)a=w(o,t[o],t[o+1],a);return a&&g(a,a.next)&&(k(a),a=a.next),a}function o(t,e){if(!t)return t;e||(e=t);var n,r=t;do{if(n=!1,r.steiner||!g(r,r.next)&&0!==v(r.prev,r,r.next))r=r.next;else{if(k(r),(r=e=r.prev)===r.next)break;n=!0}}while(n||r!==e);return e}function a(t,e,n,r,i,f,h){if(t){!h&&f&&function(t,e,n,r){var i=t;do{null===i.z&&(i.z=p(i.x,i.y,e,n,r)),i.prevZ=i.prev,i.nextZ=i.next,i=i.next}while(i!==t);i.prevZ.nextZ=null,i.prevZ=null,function(t){var e,n,r,i,o,a,s,u,l=1;do{for(n=t,t=null,o=null,a=0;n;){for(a++,r=n,s=0,e=0;e<l&&(s++,r=r.nextZ);e++);for(u=l;s>0||u>0&&r;)0!==s&&(0===u||!r||n.z<=r.z)?(i=n,n=n.nextZ,s--):(i=r,r=r.nextZ,u--),o?o.nextZ=i:t=i,i.prevZ=o,o=i;n=r}o.nextZ=null,l*=2}while(a>1)}(i)}(t,r,i,f);for(var d,y,m=t;t.prev!==t.next;)if(d=t.prev,y=t.next,f?u(t,r,i,f):s(t))e.push(d.i/n),e.push(t.i/n),e.push(y.i/n),k(t),t=y.next,m=y.next;else if((t=y)===m){h?1===h?a(t=l(t,e,n),e,n,r,i,f,2):2===h&&c(t,e,n,r,i,f):a(o(t),e,n,r,i,f,1);break}}}function s(t){var e=t.prev,n=t,r=t.next;if(v(e,n,r)>=0)return!1;for(var i=t.next.next;i!==t.prev;){if(y(e.x,e.y,n.x,n.y,r.x,r.y,i.x,i.y)&&v(i.prev,i,i.next)>=0)return!1;i=i.next}return!0}function u(t,e,n,r){var i=t.prev,o=t,a=t.next;if(v(i,o,a)>=0)return!1;for(var s=i.x<o.x?i.x<a.x?i.x:a.x:o.x<a.x?o.x:a.x,u=i.y<o.y?i.y<a.y?i.y:a.y:o.y<a.y?o.y:a.y,l=i.x>o.x?i.x>a.x?i.x:a.x:o.x>a.x?o.x:a.x,c=i.y>o.y?i.y>a.y?i.y:a.y:o.y>a.y?o.y:a.y,f=p(s,u,e,n,r),h=p(l,c,e,n,r),d=t.prevZ,m=t.nextZ;d&&d.z>=f&&m&&m.z<=h;){if(d!==t.prev&&d!==t.next&&y(i.x,i.y,o.x,o.y,a.x,a.y,d.x,d.y)&&v(d.prev,d,d.next)>=0)return!1;if(d=d.prevZ,m!==t.prev&&m!==t.next&&y(i.x,i.y,o.x,o.y,a.x,a.y,m.x,m.y)&&v(m.prev,m,m.next)>=0)return!1;m=m.nextZ}for(;d&&d.z>=f;){if(d!==t.prev&&d!==t.next&&y(i.x,i.y,o.x,o.y,a.x,a.y,d.x,d.y)&&v(d.prev,d,d.next)>=0)return!1;d=d.prevZ}for(;m&&m.z<=h;){if(m!==t.prev&&m!==t.next&&y(i.x,i.y,o.x,o.y,a.x,a.y,m.x,m.y)&&v(m.prev,m,m.next)>=0)return!1;m=m.nextZ}return!0}function l(t,e,n){var r=t;do{var i=r.prev,o=r.next.next;!g(i,o)&&b(i,r,r.next,o)&&x(i,o)&&x(o,i)&&(e.push(i.i/n),e.push(r.i/n),e.push(o.i/n),k(r),k(r.next),r=t=o),r=r.next}while(r!==t);return r}function c(t,e,n,r,i,s){var u=t;do{for(var l=u.next.next;l!==u.prev;){if(u.i!==l.i&&m(u,l)){var c=_(u,l);return u=o(u,u.next),c=o(c,c.next),a(u,e,n,r,i,s),void a(c,e,n,r,i,s)}l=l.next}u=u.next}while(u!==t)}function f(t,e){return t.x-e.x}function h(t,e){if(e=function(t,e){var n,r=e,i=t.x,o=t.y,a=-1/0;do{if(o<=r.y&&o>=r.next.y&&r.next.y!==r.y){var s=r.x+(o-r.y)*(r.next.x-r.x)/(r.next.y-r.y);if(s<=i&&s>a){if(a=s,s===i){if(o===r.y)return r;if(o===r.next.y)return r.next}n=r.x<r.next.x?r:r.next}}r=r.next}while(r!==e);if(!n)return null;if(i===a)return n.prev;var u,l=n,c=n.x,f=n.y,h=1/0;r=n.next;for(;r!==l;)i>=r.x&&r.x>=c&&i!==r.x&&y(o<f?i:a,o,c,f,o<f?a:i,o,r.x,r.y)&&((u=Math.abs(o-r.y)/(i-r.x))<h||u===h&&r.x>n.x)&&x(r,t)&&(n=r,h=u),r=r.next;return n}(t,e)){var n=_(e,t);o(n,n.next)}}function p(t,e,n,r,i){return(t=1431655765&((t=858993459&((t=252645135&((t=16711935&((t=32767*(t-n)*i)|t<<8))|t<<4))|t<<2))|t<<1))|(e=1431655765&((e=858993459&((e=252645135&((e=16711935&((e=32767*(e-r)*i)|e<<8))|e<<4))|e<<2))|e<<1))<<1}function d(t){var e=t,n=t;do{(e.x<n.x||e.x===n.x&&e.y<n.y)&&(n=e),e=e.next}while(e!==t);return n}function y(t,e,n,r,i,o,a,s){return(i-a)*(e-s)-(t-a)*(o-s)>=0&&(t-a)*(r-s)-(n-a)*(e-s)>=0&&(n-a)*(o-s)-(i-a)*(r-s)>=0}function m(t,e){return t.next.i!==e.i&&t.prev.i!==e.i&&!function(t,e){var n=t;do{if(n.i!==t.i&&n.next.i!==t.i&&n.i!==e.i&&n.next.i!==e.i&&b(n,n.next,t,e))return!0;n=n.next}while(n!==t);return!1}(t,e)&&x(t,e)&&x(e,t)&&function(t,e){var n=t,r=!1,i=(t.x+e.x)/2,o=(t.y+e.y)/2;do{n.y>o!=n.next.y>o&&n.next.y!==n.y&&i<(n.next.x-n.x)*(o-n.y)/(n.next.y-n.y)+n.x&&(r=!r),n=n.next}while(n!==t);return r}(t,e)}function v(t,e,n){return(e.y-t.y)*(n.x-e.x)-(e.x-t.x)*(n.y-e.y)}function g(t,e){return t.x===e.x&&t.y===e.y}function b(t,e,n,r){return!!(g(t,e)&&g(n,r)||g(t,r)&&g(n,e))||v(t,e,n)>0!=v(t,e,r)>0&&v(n,r,t)>0!=v(n,r,e)>0}function x(t,e){return v(t.prev,t,t.next)<0?v(t,e,t.next)>=0&&v(t,t.prev,e)>=0:v(t,e,t.prev)<0||v(t,t.next,e)<0}function _(t,e){var n=new S(t.i,t.x,t.y),r=new S(e.i,e.x,e.y),i=t.next,o=e.prev;return t.next=e,e.prev=t,n.next=i,i.prev=n,r.next=n,n.prev=r,o.next=r,r.prev=o,r}function w(t,e,n,r){var i=new S(t,e,n);return r?(i.next=r.next,i.prev=r,r.next.prev=i,r.next=i):(i.prev=i,i.next=i),i}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 S(t,e,n){this.i=t,this.x=e,this.y=n,this.prev=null,this.next=null,this.z=null,this.prevZ=null,this.nextZ=null,this.steiner=!1}function T(t,e,n,r){for(var i=0,o=e,a=n-r;o<n;o+=r)i+=(t[a]-t[o])*(t[o+1]+t[a+1]),a=o;return i}t.exports=r,t.exports.default=r,r.deviation=function(t,e,n,r){var i=e&&e.length,o=i?e[0]*n:t.length,a=Math.abs(T(t,0,o,n));if(i)for(var s=0,u=e.length;s<u;s++){var l=e[s]*n,c=s<u-1?e[s+1]*n:t.length;a-=Math.abs(T(t,l,c,n))}var f=0;for(s=0;s<r.length;s+=3){var h=r[s]*n,p=r[s+1]*n,d=r[s+2]*n;f+=Math.abs((t[h]-t[d])*(t[p+1]-t[h+1])-(t[h]-t[p])*(t[d+1]-t[h+1]))}return 0===a&&0===f?0:Math.abs((f-a)/a)},r.flatten=function(t){for(var e=t[0][0].length,n={vertices:[],holes:[],dimensions:e},r=0,i=0;i<t.length;i++){for(var o=0;o<t[i].length;o++)for(var a=0;a<e;a++)n.vertices.push(t[i][o][a]);i>0&&(r+=t[i-1].length,n.holes.push(r))}return n}},function(t,e,n){var r=n(163),i=n(0).calculateSignedArea;function o(t,e){return e.area-t.area}t.exports=function(t,e){var n=t.length;if(n<=1)return[t];for(var a,s,u=[],l=0;l<n;l++){var c=i(t[l]);0!==c&&(t[l].area=Math.abs(c),void 0===s&&(s=c<0),s===c<0?(a&&u.push(a),a=[t[l]]):a.push(t[l]))}if(a&&u.push(a),e>1)for(var f=0;f<u.length;f++)u[f].length<=e||(r(u[f],e,1,u[f].length-1,o),u[f]=u[f].slice(0,e));return u}},function(t,e,n){"use strict";var r=n(107);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(o,this,e),this.length=this._features.length}function o(t,e,n){15===t?e.version=n.readVarint():1===t?e.name=n.readString():5===t?e.extent=n.readVarint():2===t?e._features.push(n.pos):3===t?e._keys.push(n.readString()):4===t&&e._values.push(function(t){var e=null,n=t.readVarint()+t.pos;for(;t.pos<n;){var r=t.readVarint()>>3;e=1===r?t.readString():2===r?t.readFloat():3===r?t.readDouble():4===r?t.readVarint64():5===r?t.readVarint():6===r?t.readSVarint():7===r?t.readBoolean():null}return e}(n))}t.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 r(this._pbf,e,this.extent,this._keys,this._values)}},function(t,e,n){"use strict";var r=n(3);function i(t,e,n,r,i){this.properties={},this.extent=n,this.type=0,this._pbf=t,this._geometry=-1,this._keys=r,this._values=i,t.readFields(o,this,e)}function o(t,e,n){1==t?e.id=n.readVarint():2==t?function(t,e){var n=t.readVarint()+t.pos;for(;t.pos<n;){var r=e._keys[t.readVarint()],i=e._values[t.readVarint()];e.properties[r]=i}}(n,e):3==t?e.type=n.readVarint():4==t&&(e._geometry=n.pos)}function a(t){for(var e,n,r=0,i=0,o=t.length,a=o-1;i<o;a=i++)e=t[i],r+=((n=t[a]).x-e.x)*(e.y+n.y);return r}t.exports=i,i.types=["Unknown","Point","LineString","Polygon"],i.prototype.loadGeometry=function(){var t=this._pbf;t.pos=this._geometry;for(var e,n=t.readVarint()+t.pos,i=1,o=0,a=0,s=0,u=[];t.pos<n;){if(o<=0){var l=t.readVarint();i=7&l,o=l>>3}if(o--,1===i||2===i)a+=t.readSVarint(),s+=t.readSVarint(),1===i&&(e&&u.push(e),e=[]),e.push(new r(a,s));else{if(7!==i)throw new Error("unknown command "+i);e&&e.push(e[0].clone())}}return e&&u.push(e),u},i.prototype.bbox=function(){var t=this._pbf;t.pos=this._geometry;for(var e=t.readVarint()+t.pos,n=1,r=0,i=0,o=0,a=1/0,s=-1/0,u=1/0,l=-1/0;t.pos<e;){if(r<=0){var c=t.readVarint();n=7&c,r=c>>3}if(r--,1===n||2===n)(i+=t.readSVarint())<a&&(a=i),i>s&&(s=i),(o+=t.readSVarint())<u&&(u=o),o>l&&(l=o);else if(7!==n)throw new Error("unknown command "+n)}return[a,u,s,l]},i.prototype.toGeoJSON=function(t,e,n){var r,o,s=this.extent*Math.pow(2,n),u=this.extent*t,l=this.extent*e,c=this.loadGeometry(),f=i.types[this.type];function h(t){for(var e=0;e<t.length;e++){var n=t[e],r=180-360*(n.y+l)/s;t[e]=[360*(n.x+u)/s-180,360/Math.PI*Math.atan(Math.exp(r*Math.PI/180))-90]}}switch(this.type){case 1:var p=[];for(r=0;r<c.length;r++)p[r]=c[r][0];h(c=p);break;case 2:for(r=0;r<c.length;r++)h(c[r]);break;case 3:for(c=function(t){var e=t.length;if(e<=1)return[t];for(var n,r,i=[],o=0;o<e;o++){var s=a(t[o]);0!==s&&(void 0===r&&(r=s<0),r===s<0?(n&&i.push(n),n=[t[o]]):n.push(t[o]))}n&&i.push(n);return i}(c),r=0;r<c.length;r++)for(o=0;o<c[r].length;o++)h(c[r][o])}1===c.length?c=c[0]:f="Multi"+f;var d={type:"Feature",geometry:{type:f,coordinates:c},properties:this.properties};return"id"in this&&(d.id=this.id),d}},function(t,e){function n(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,r.key,r)}}var r=function(){function t(){!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,t),this.first=!0}var e,r,i;return e=t,(r=[{key:"update",value:function(t,e){var n=Math.floor(t);return this.first?(this.first=!1,this.lastIntegerZoom=n,this.lastIntegerZoomTime=0,this.lastZoom=t,this.lastFloorZoom=n,!0):(this.lastFloorZoom>n?(this.lastIntegerZoom=n+1,this.lastIntegerZoomTime=e):this.lastFloorZoom<n&&(this.lastIntegerZoom=n,this.lastIntegerZoomTime=e),t!==this.lastZoom&&(this.lastZoom=t,this.lastFloorZoom=n,!0))}}])&&n(e.prototype,r),i&&n(e,i),t}();t.exports=r},function(t,e){t.exports={"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}}},function(t,e,n){var r=n(63);t.exports=function(e){for(var n="",i=0;i<e.length;i++){var o=e.charCodeAt(i+1)||null,a=e.charCodeAt(i-1)||null;(!o||!r.charHasRotatedVerticalOrientation(o)||t.exports.lookup[e[i+1]])&&(!a||!r.charHasRotatedVerticalOrientation(a)||t.exports.lookup[e[i-1]])&&t.exports.lookup[e[i]]?n+=t.exports.lookup[e[i]]:n+=e[i]}return n},t.exports.lookup={"!":"︕","#":"#",$:"$","%":"%","&":"&","(":"︵",")":"︶","*":"*","+":"+",",":"︐","-":"︲",".":"・","/":"/",":":"︓",";":"︔","<":"︿","=":"=",">":"﹀","?":"︖","@":"@","[":"﹇","\\":"\","]":"﹈","^":"^",_:"︳","`":"`","{":"︷","|":"―","}":"︸","~":"~","¢":"¢","£":"£","¥":"¥","¦":"¦","¬":"¬","¯":" ̄","–":"︲","—":"︱","‘":"﹃","’":"﹄","“":"﹁","”":"﹂","…":"︙","‧":"・","₩":"₩","、":"︑","。":"︒","〈":"︿","〉":"﹀","《":"︽","》":"︾","「":"﹁","」":"﹂","『":"﹃","』":"﹄","【":"︻","】":"︼","〔":"︹","〕":"︺","〖":"︗","〗":"︘","!":"︕","(":"︵",")":"︶",",":"︐","-":"︲",".":"・",":":"︓",";":"︔","<":"︿",">":"﹀","?":"︖","[":"﹇","]":"﹈","_":"︳","{":"︷","|":"―","}":"︸","⦅":"︵","⦆":"︶","。":"︒","「":"﹁","」":"﹂"}},function(t,e,n){t.exports=function(){function t(t,e,n){n=n||{},this.w=t||64,this.h=e||64,this.autoResize=!!n.autoResize,this.shelves=[],this.freebins=[],this.stats={},this.bins={},this.maxId=0}function e(t,e,n){this.x=0,this.y=t,this.w=this.free=e,this.h=n}function n(t,e,n,r,i,o,a){this.id=t,this.x=e,this.y=n,this.w=r,this.h=i,this.maxw=o||r,this.maxh=a||i,this.refcount=0}return t.prototype.pack=function(t,e){t=[].concat(t),e=e||{};for(var n,r,i,o,a=[],s=0;s<t.length;s++)if(n=t[s].w||t[s].width,r=t[s].h||t[s].height,i=t[s].id,n&&r){if(!(o=this.packOne(n,r,i)))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,n,r){var i,o,a,s,u,l,c,f,h={freebin:-1,shelf:-1,waste:1/0},p=0;if("string"==typeof r||"number"==typeof r){if(i=this.getBin(r))return this.ref(i),i;"number"==typeof r&&(this.maxId=Math.max(r,this.maxId))}else r=++this.maxId;for(s=0;s<this.freebins.length;s++){if(n===(i=this.freebins[s]).maxh&&t===i.maxw)return this.allocFreebin(s,t,n,r);n>i.maxh||t>i.maxw||n<=i.maxh&&t<=i.maxw&&(a=i.maxw*i.maxh-t*n)<h.waste&&(h.waste=a,h.freebin=s)}for(s=0;s<this.shelves.length;s++)if(p+=(o=this.shelves[s]).h,!(t>o.free)){if(n===o.h)return this.allocShelf(s,t,n,r);n>o.h||n<o.h&&(a=(o.h-n)*t)<h.waste&&(h.freebin=-1,h.waste=a,h.shelf=s)}return-1!==h.freebin?this.allocFreebin(h.freebin,t,n,r):-1!==h.shelf?this.allocShelf(h.shelf,t,n,r):n<=this.h-p&&t<=this.w?(o=new e(p,this.w,n),this.allocShelf(this.shelves.push(o)-1,t,n,r)):this.autoResize?(u=l=this.h,((c=f=this.w)<=u||t>c)&&(f=2*Math.max(t,c)),(u<c||n>u)&&(l=2*Math.max(n,u)),this.resize(f,l),this.packOne(t,n,r)):null},t.prototype.allocFreebin=function(t,e,n,r){var i=this.freebins.splice(t,1)[0];return i.id=r,i.w=e,i.h=n,i.refcount=0,this.bins[r]=i,this.ref(i),i},t.prototype.allocShelf=function(t,e,n,r){var i=this.shelves[t].alloc(e,n,r);return this.bins[r]=i,this.ref(i),i},t.prototype.shrink=function(){if(this.shelves.length>0){for(var t=0,e=0,n=0;n<this.shelves.length;n++){var r=this.shelves[n];e+=r.h,t=Math.max(r.w-r.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 n=0;n<this.shelves.length;n++)this.shelves[n].resize(t);return!0},e.prototype.alloc=function(t,e,r){if(t>this.free||e>this.h)return null;var i=this.x;return this.x+=t,this.free-=t,new n(r,i,this.y,t,e,t,this.h)},e.prototype.resize=function(t){return this.free+=t-this.w,this.w=t,!0},t}()},function(t,e,n){var r=n(0),i=n(16),o=n(2),a=n(34).normalizeSourceURL;t.exports=function(t,e,n){var s=function(t,e){if(t)return n(t);if(e){var i=r.pick(e,["tiles","minzoom","maxzoom","attribution","mapbox_logo","bounds"]);e.vector_layers&&(i.vectorLayers=e.vector_layers,i.vectorLayerIds=i.vectorLayers.map(function(t){return t.id})),n(null,i)}};t.url?i.getJSON(e(a(t.url),i.ResourceType.Source),s):o.frame(function(){return s(null,t)})}},function(t,e,n){function r(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,r.key,r)}}var i=n(39),o=n(0).clamp,a=function(){function t(e,n,r){!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,t),this.bounds=i.convert(this.validateBounds(e)),this.minzoom=n||0,this.maxzoom=r||24}var e,n,a;return e=t,(n=[{key:"validateBounds",value: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]}},{key:"contains",value:function(t){var e=Math.floor(this.lngX(this.bounds.getWest(),t.z)),n=Math.floor(this.latY(this.bounds.getNorth(),t.z)),r=Math.ceil(this.lngX(this.bounds.getEast(),t.z)),i=Math.ceil(this.latY(this.bounds.getSouth(),t.z));return t.x>=e&&t.x<r&&t.y>=n&&t.y<i}},{key:"lngX",value:function(t,e){return(t+180)*(Math.pow(2,e)/360)}},{key:"latY",value:function(t,e){var n=o(Math.sin(Math.PI/180*t),-.9999,.9999),r=Math.pow(2,e)/(2*Math.PI);return Math.pow(2,e-1)+.5*Math.log((1+n)/(1-n))*-r}}])&&r(e.prototype,n),a&&r(e,a),t}();t.exports=a},function(t,e,n){function r(t){return(r="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t})(t)}function i(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,r.key,r)}}function o(t){return(o=Object.setPrototypeOf?Object.getPrototypeOf:function(t){return t.__proto__||Object.getPrototypeOf(t)})(t)}function a(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}function s(t,e){return(s=Object.setPrototypeOf||function(t,e){return t.__proto__=e,t})(t,e)}var u=n(0),l=n(16),c=n(10),f=n(112),h=n(34).normalizeTileURL,p=n(113),d=n(20),y=function(t){function e(t,n,i,s){var l;return function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,e),(l=function(t,e){return!e||"object"!==r(e)&&"function"!=typeof e?a(t):e}(this,o(e).call(this))).id=t,l.dispatcher=i,l.setEventedParent(s),l.type="raster",l.minzoom=0,l.maxzoom=22,l.roundZoom=!0,l.scheme="xyz",l.tileSize=512,l._loaded=!1,l._options=u.extend({},n),u.extend(a(l),u.pick(n,["url","scheme","tileSize"])),l}var n,y,m;return function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),e&&s(t,e)}(e,c),n=e,(y=[{key:"load",value:function(){var t=this;this.fire("dataloading",{dataType:"source"}),f(this._options,this.map._transformRequest,function(e,n){e?t.fire("error",e):n&&(u.extend(t,n),n.bounds&&(t.tileBounds=new p(n.bounds,t.minzoom,t.maxzoom)),t.fire("data",{dataType:"source",sourceDataType:"metadata"}),t.fire("data",{dataType:"source",sourceDataType:"content"}))})}},{key:"onAdd",value:function(t){this.map=t,this.load()}},{key:"serialize",value:function(){return u.extend({},this._options)}},{key:"hasTile",value:function(t){return!this.tileBounds||this.tileBounds.contains(t.canonical)}},{key:"loadTile",value:function(t,e){var n=this,r=h(t.tileID.canonical.url(this.tiles,this.scheme),this.url,this.tileSize);t.request=l.getImage(this.map._transformRequest(r,l.ResourceType.Tile),function(r,i){if(delete t.request,t.aborted)t.state="unloaded",e(null);else if(r)t.state="errored",e(r);else if(i){n.map._refreshExpiredTiles&&t.setExpiryData(i),delete i.cacheControl,delete i.expires;var o=n.map.painter.context,a=o.gl;t.texture=n.map.painter.getTileTexture(i.width),t.texture?(t.texture.bind(a.LINEAR,a.CLAMP_TO_EDGE,a.LINEAR_MIPMAP_NEAREST),a.texSubImage2D(a.TEXTURE_2D,0,0,0,a.RGBA,a.UNSIGNED_BYTE,i)):(t.texture=new d(o,i,a.RGBA),t.texture.bind(a.LINEAR,a.CLAMP_TO_EDGE,a.LINEAR_MIPMAP_NEAREST),o.extTextureFilterAnisotropic&&a.texParameterf(a.TEXTURE_2D,o.extTextureFilterAnisotropic.TEXTURE_MAX_ANISOTROPY_EXT,o.extTextureFilterAnisotropicMax)),a.generateMipmap(a.TEXTURE_2D),t.state="loaded",e(null)}})}},{key:"abortTile",value:function(t,e){t.request&&(t.request.abort(),delete t.request),e()}},{key:"unloadTile",value:function(t,e){t.texture&&this.map.painter.saveTileTexture(t.texture),e()}},{key:"hasTransition",value:function(){return!1}}])&&i(n.prototype,y),m&&i(n,m),e}();t.exports=y},function(t,e,n){function r(t){return(r="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t})(t)}function i(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,r.key,r)}}function o(t,e){return!e||"object"!==r(e)&&"function"!=typeof e?function(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}(t):e}function a(t){return(a=Object.setPrototypeOf?Object.getPrototypeOf:function(t){return t.__proto__||Object.getPrototypeOf(t)})(t)}function s(t,e){return(s=Object.setPrototypeOf||function(t,e){return t.__proto__=e,t})(t,e)}var u=n(10),l=n(0),c=n(5),f=n(6),h=n(16).ResourceType,p=n(2),d=function(t){function e(t,n,r,i){var s;!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,e),(s=o(this,a(e).call(this))).id=t,s.type="geojson",s.minzoom=0,s.maxzoom=18,s.tileSize=512,s.isTileClipped=!0,s.reparseOverscaled=!0,s.dispatcher=r,s.setEventedParent(i),s._data=n.data,s._options=l.extend({},n),void 0!==n.maxzoom&&(s.maxzoom=n.maxzoom),n.type&&(s.type=n.type);var u=f/s.tileSize;return s.workerOptions=l.extend({source:s.id,cluster:n.cluster||!1,geojsonVtOptions:{buffer:(void 0!==n.buffer?n.buffer:128)*u,tolerance:(void 0!==n.tolerance?n.tolerance:.375)*u,extent:f,maxZoom:s.maxzoom},superclusterOptions:{maxZoom:void 0!==n.clusterMaxZoom?Math.min(n.clusterMaxZoom,s.maxzoom-1):s.maxzoom-1,extent:f,radius:(n.clusterRadius||50)*u,log:!1}},n.workerOptions),s}var n,r,d;return function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),e&&s(t,e)}(e,u),n=e,(r=[{key:"load",value: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"})})}},{key:"onAdd",value:function(t){this.map=t,this.load()}},{key:"setData",value: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}},{key:"_updateWorkerData",value:function(t){var e,n,r=this,i=l.extend({},this.workerOptions),o=this._data;"string"==typeof o?i.request=this.map._transformRequest((e=o,(n=c.document.createElement("a")).href=e,n.href),h.Source):i.data=JSON.stringify(o),this.workerID=this.dispatcher.send("".concat(this.type,".loadData"),i,function(e){r._loaded=!0,t(e)},this.workerID)}},{key:"loadTile",value:function(t,e){var n=this,r=void 0===t.workerID||"expired"===t.state?"loadTile":"reloadTile",i={type:this.type,uid:t.uid,tileID:t.tileID,zoom:t.tileID.overscaledZ,maxZoom:this.maxzoom,tileSize:this.tileSize,source:this.id,pixelRatio:p.devicePixelRatio,overscaling:t.tileID.overscaleFactor(),showCollisionBoxes:this.map.showCollisionBoxes};t.workerID=this.dispatcher.send(r,i,function(i,o){return t.unloadVectorData(),t.aborted?e(null):i?e(i):(t.loadVectorData(o,n.map.painter,"reloadTile"===r),e(null))},this.workerID)}},{key:"abortTile",value:function(t){t.aborted=!0}},{key:"unloadTile",value:function(t){t.unloadVectorData(),this.dispatcher.send("removeTile",{uid:t.uid,type:this.type,source:this.id},null,t.workerID)}},{key:"onRemove",value:function(){this.dispatcher.broadcast("removeSource",{type:this.type,source:this.id})}},{key:"serialize",value:function(){return l.extend({},this._options,{type:this.type,data:this._data})}},{key:"hasTransition",value:function(){return!1}}])&&i(n.prototype,r),d&&i(n,d),e}();t.exports=d},function(t,e){function n(t,e){var n=t.tileID,r=e.tileID;return n.overscaledZ-r.overscaledZ||n.canonical.y-r.canonical.y||n.wrap-r.wrap||n.canonical.x-r.canonical.x}e.rendered=function(t,e,r,i,o,a,s){var u=t.tilesIn(r);u.sort(n);var l=[],c=!0,f=!1,h=void 0;try{for(var p,d=u[Symbol.iterator]();!(c=(p=d.next()).done);c=!0){var y=p.value;l.push({wrappedTileID:y.tileID.wrapped().key,queryResults:y.tile.queryRenderedFeatures(e,y.queryGeometry,y.scale,i,a,t.id,s)})}}catch(t){f=!0,h=t}finally{try{c||null==d.return||d.return()}finally{if(f)throw h}}return function(t){var e={},n={},r=!0,i=!1,o=void 0;try{for(var a,s=t[Symbol.iterator]();!(r=(a=s.next()).done);r=!0){var u=a.value,l=u.queryResults,c=u.wrappedTileID,f=n[c]=n[c]||{};for(var h in l){var p=l[h],d=f[h]=f[h]||{},y=e[h]=e[h]||[],m=!0,v=!1,g=void 0;try{for(var b,x=p[Symbol.iterator]();!(m=(b=x.next()).done);m=!0){var _=b.value;d[_.featureIndex]||(d[_.featureIndex]=!0,y.push(_.feature))}}catch(t){v=!0,g=t}finally{try{m||null==x.return||x.return()}finally{if(v)throw g}}}}}catch(t){i=!0,o=t}finally{try{r||null==s.return||s.return()}finally{if(i)throw o}}return e}(l)},e.source=function(t,e){for(var n=t.getRenderableIds().map(function(e){return t.getTileByID(e)}),r=[],i={},o=0;o<n.length;o++){var a=n[o],s=a.tileID.canonical.key;i[s]||(i[s]=!0,a.querySourceFeatures(r,e))}return r}},function(t,e,n){function r(t){return(r="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t})(t)}function i(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,r.key,r)}}function o(t){return(o=Object.setPrototypeOf?Object.getPrototypeOf:function(t){return t.__proto__||Object.getPrototypeOf(t)})(t)}function a(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}function s(t,e){return(s=Object.setPrototypeOf||function(t,e){return t.__proto__=e,t})(t,e)}var u=n(45).create,l=n(118),c=n(10),f=n(121),h=n(35),p=n(0),d=n(6),y=(n(67),n(3)),m=n(2),v=n(27).OverscaledTileID,g=n(1),b=function(t){function e(t,n,i){var s;return function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,e),(s=function(t,e){return!e||"object"!==r(e)&&"function"!=typeof e?a(t):e}(this,o(e).call(this))).id=t,s.dispatcher=i,s.on("data",function(t){"source"===t.dataType&&"metadata"===t.sourceDataType&&(s._sourceLoaded=!0),s._sourceLoaded&&!s._paused&&"source"===t.dataType&&"content"===t.sourceDataType&&(s.reload(),s.transform&&s.update(s.transform))}),s.on("error",function(){s._sourceErrored=!0}),s._source=u(t,n,i,a(s)),s._tiles={},s._cache=new f(0,s._unloadTile.bind(a(s))),s._timers={},s._cacheTimers={},s._maxTileCacheSize=null,s._isIdRenderable=s._isIdRenderable.bind(a(s)),s._coveredTiles={},s}var n,b,w;return function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),e&&s(t,e)}(e,c),n=e,(b=[{key:"onAdd",value:function(t){this.map=t,this._maxTileCacheSize=t?t._maxTileCacheSize:null,this._source&&this._source.onAdd&&this._source.onAdd(t)}},{key:"onRemove",value:function(t){this._source&&this._source.onRemove&&this._source.onRemove(t)}},{key:"loaded",value:function(){if(this._sourceErrored)return!0;if(!this._sourceLoaded)return!1;for(var t in this._tiles){var e=this._tiles[t];if("loaded"!==e.state&&"errored"!==e.state)return!1}return!0}},{key:"getSource",value:function(){return this._source}},{key:"pause",value:function(){this._paused=!0}},{key:"resume",value:function(){if(this._paused){var t=this._shouldReloadOnResume;this._paused=!1,this._shouldReloadOnResume=!1,t&&this.reload(),this.transform&&this.update(this.transform)}}},{key:"_loadTile",value:function(t,e){return this._source.loadTile(t,e)}},{key:"_unloadTile",value:function(t){if(this._source.unloadTile)return this._source.unloadTile(t,function(){})}},{key:"_abortTile",value:function(t){if(this._source.abortTile)return this._source.abortTile(t,function(){})}},{key:"serialize",value:function(){return this._source.serialize()}},{key:"prepare",value:function(t){for(var e in this._source.prepare&&this._source.prepare(),this._tiles)this._tiles[e].upload(t)}},{key:"getIds",value:function(){var t=this;return Object.keys(this._tiles).map(Number).sort(function(e,n){var r=t._tiles[e].tileID,i=t._tiles[n].tileID,o=new y(r.canonical.x,r.canonical.y).rotate(t.transform.angle),a=new y(i.canonical.x,i.canonical.y).rotate(t.transform.angle);return r.overscaledZ-i.overscaledZ||a.y-o.y||a.x-o.x})}},{key:"getRenderableIds",value:function(){return this.getIds().filter(this._isIdRenderable)}},{key:"hasRenderableParent",value:function(t){var e=this.findLoadedParent(t,0,{});return!!e&&this._isIdRenderable(e.tileID.key)}},{key:"_isIdRenderable",value:function(t){return this._tiles[t]&&this._tiles[t].hasData()&&!this._coveredTiles[t]}},{key:"reload",value:function(){if(this._paused)this._shouldReloadOnResume=!0;else for(var t in this._resetCache(),this._tiles)this._reloadTile(t,"reloading")}},{key:"_reloadTile",value:function(t,e){var n=this._tiles[t];n&&("loading"!==n.state&&(n.state=e),this._loadTile(n,this._tileLoaded.bind(this,n,t,e)))}},{key:"_tileLoaded",value:function(t,e,n,r){if(r)return t.state="errored",void(404!==r.status?this._source.fire("error",{tile:t,error:r}):this.update(this.transform));t.timeAdded=m.now(),"expired"===n&&(t.refreshedUponExpiration=!0),this._setTileReloadTimer(e,t),"raster-dem"===this.getSource().type&&t.dem&&this._backfillDEM(t),this._source.fire("data",{dataType:"source",tile:t,coord:t.tileID}),this.map&&(this.map.painter.tileExtentVAO.vao=null)}},{key:"_backfillDEM",value:function(t){for(var e=this.getRenderableIds(),n=0;n<e.length;n++){var r=e[n];if(t.neighboringTiles&&t.neighboringTiles[r]){var i=this.getTileByID(r);o(t,i),o(i,t)}}function o(t,e){t.needsHillshadePrepare=!0;var n=e.tileID.canonical.x-t.tileID.canonical.x,r=e.tileID.canonical.y-t.tileID.canonical.y,i=Math.pow(2,t.tileID.canonical.z),o=e.tileID.key;0===n&&0===r||Math.abs(r)>1||(Math.abs(n)>1&&(1===Math.abs(n+i)?n+=i:1===Math.abs(n-i)&&(n-=i)),e.dem&&t.dem&&(t.dem.backfillBorder(e.dem,n,r),t.neighboringTiles&&t.neighboringTiles[o]&&(t.neighboringTiles[o].backfilled=!0)))}}},{key:"getTile",value:function(t){return this.getTileByID(t.key)}},{key:"getTileByID",value:function(t){return this._tiles[t]}},{key:"getZoom",value:function(t){return t.zoom+t.scaleZoom(t.tileSize/this._source.tileSize)}},{key:"_findLoadedChildren",value:function(t,e,n){var r=!1;for(var i in this._tiles){var o=this._tiles[i];if(!(n[i]||!o.hasData()||o.tileID.overscaledZ<=t.overscaledZ||o.tileID.overscaledZ>e)){var a=Math.pow(2,o.tileID.canonical.z-t.canonical.z);if(Math.floor(o.tileID.canonical.x/a)===t.canonical.x&&Math.floor(o.tileID.canonical.y/a)===t.canonical.y)for(n[i]=o.tileID,r=!0;o&&o.tileID.overscaledZ-1>t.overscaledZ;){var s=o.tileID.scaledTo(o.tileID.overscaledZ-1);if(!s)break;(o=this._tiles[s.key])&&o.hasData()&&(delete n[i],n[s.key]=s)}}}return r}},{key:"findLoadedParent",value:function(t,e,n){for(var r=t.overscaledZ-1;r>=e;r--){var i=t.scaledTo(r);if(!i)return;var o=String(i.key),a=this._tiles[o];if(a&&a.hasData())return n[o]=i,a;if(this._cache.has(o))return n[o]=i,this._cache.get(o)}}},{key:"updateCacheSize",value:function(t){var e=(Math.ceil(t.width/this._source.tileSize)+1)*(Math.ceil(t.height/this._source.tileSize)+1),n=Math.floor(5*e),r="number"==typeof this._maxTileCacheSize?Math.min(this._maxTileCacheSize,n):n;this._cache.setMaxSize(r)}},{key:"update",value:function(t){var n=this;if(this.transform=t,this._sourceLoaded&&!this._paused){var r;this.updateCacheSize(t),this._coveredTiles={},this.used?this._source.tileID?r=t.getVisibleUnwrappedCoordinates(this._source.tileID).map(function(t){return new v(t.canonical.z,t.wrap,t.canonical.z,t.canonical.x,t.canonical.y)}):(r=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&&(r=r.filter(function(t){return n._source.hasTile(t)}))):r=[];var i,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(r,o),l={};if(_(this._source.type))for(var c=Object.keys(u),f=0;f<c.length;f++){var h=c[f],d=u[h];g(d.key===+h);var y=this._tiles[h];if(y&&(void 0===y.fadeEndTime||y.fadeEndTime>=m.now())){this._findLoadedChildren(d,s,u)&&(u[h]=d);var b=this.findLoadedParent(d,a,l);b&&this._addTile(b.tileID)}}for(i in l)u[i]||(this._coveredTiles[i]=!0);for(i in l)u[i]=l[i];for(var x=p.keysDifference(this._tiles,u),w=0;w<x.length;w++)this._removeTile(x[w])}}},{key:"_updateRetainedTiles",value:function(t,n){for(var r={},i={},o=Math.max(n-e.maxOverzooming,this._source.minzoom),a=Math.max(n+e.maxUnderzooming,this._source.minzoom),s=0;s<t.length;s++){var u=t[s],l=this._addTile(u),c=!1;if(l.hasData())r[u.key]=u;else{c=l.wasRequested(),r[u.key]=u;var f=!0;if(n+1>this._source.maxzoom){var h=u.children(this._source.maxzoom)[0],p=this.getTile(h);p&&p.hasData()?r[h.key]=h:f=!1}else{this._findLoadedChildren(u,a,r);for(var d=u.children(this._source.maxzoom),y=0;y<d.length;y++)if(!r[d[y].key]){f=!1;break}}if(!f)for(var m=u.overscaledZ-1;m>=o;--m){var v=u.scaledTo(m);if(i[v.key])break;if(i[v.key]=!0,!(l=this.getTile(v))&&c&&(l=this._addTile(v)),l&&(r[v.key]=v,c=l.wasRequested(),l.hasData()))break}}}return r}},{key:"_addTile",value:function(t){var e=this._tiles[t.key];if(e)return e;(e=this._cache.getAndRemove(t.key))&&this._cacheTimers[t.key]&&(clearTimeout(this._cacheTimers[t.key]),delete this._cacheTimers[t.key],this._setTileReloadTimer(t.key,e));var n=Boolean(e);return n||(e=new l(t,this._source.tileSize*t.overscaleFactor()),this._loadTile(e,this._tileLoaded.bind(this,e,t.key,e.state))),e?(e.uses++,this._tiles[t.key]=e,n||this._source.fire("dataloading",{tile:e,coord:e.tileID,dataType:"source"}),e):null}},{key:"_setTileReloadTimer",value:function(t,e){var n=this;t in this._timers&&(clearTimeout(this._timers[t]),delete this._timers[t]);var r=e.getExpiryTimeout();r&&(this._timers[t]=setTimeout(function(){n._reloadTile(t,"expired"),delete n._timers[t]},r))}},{key:"_setCacheInvalidationTimer",value:function(t,e){var n=this;t in this._cacheTimers&&(clearTimeout(this._cacheTimers[t]),delete this._cacheTimers[t]);var r=e.getExpiryTimeout();r&&(this._cacheTimers[t]=setTimeout(function(){n._cache.remove(t),delete n._cacheTimers[t]},r))}},{key:"_removeTile",value: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(e.hasData()){e.tileID=e.tileID.wrapped();var n=e.tileID.key;this._cache.add(n,e),this._setCacheInvalidationTimer(n,e)}else e.aborted=!0,this._abortTile(e),this._unloadTile(e)}},{key:"clearTiles",value:function(){for(var t in this._shouldReloadOnResume=!1,this._paused=!1,this._tiles)this._removeTile(t);this._resetCache()}},{key:"_resetCache",value:function(){for(var t in this._cacheTimers)clearTimeout(this._cacheTimers[t]);this._cacheTimers={},this._cache.reset()}},{key:"tilesIn",value:function(t){for(var e=[],n=this.getIds(),r=1/0,i=1/0,o=-1/0,a=-1/0,s=t[0].zoom,u=0;u<t.length;u++){var l=t[u];r=Math.min(r,l.column),i=Math.min(i,l.row),o=Math.max(o,l.column),a=Math.max(a,l.row)}for(var c=0;c<n.length;c++){var f=this._tiles[n[c]],p=f.tileID,y=[x(p,new h(r,i,s)),x(p,new h(o,a,s))];if(y[0].x<d&&y[0].y<d&&y[1].x>=0&&y[1].y>=0){for(var m=[],v=0;v<t.length;v++)m.push(x(p,t[v]));e.push({tile:f,tileID:p,queryGeometry:[m],scale:Math.pow(2,this.transform.zoom-f.tileID.overscaledZ)})}}return e}},{key:"getVisibleCoordinates",value:function(){var t=this,e=this.getRenderableIds().map(function(e){return t._tiles[e].tileID}),n=!0,r=!1,i=void 0;try{for(var o,a=e[Symbol.iterator]();!(n=(o=a.next()).done);n=!0){var s=o.value;s.posMatrix=this.transform.calculatePosMatrix(s.toUnwrapped())}}catch(t){r=!0,i=t}finally{try{n||null==a.return||a.return()}finally{if(r)throw i}}return e}},{key:"hasTransition",value:function(){if(this._source.hasTransition())return!0;if(_(this._source.type))for(var t in this._tiles){var e=this._tiles[t];if(void 0!==e.fadeEndTime&&e.fadeEndTime>=m.now())return!0}return!1}}])&&i(n.prototype,b),w&&i(n,w),e}();function x(t,e){var n=e.zoomTo(t.canonical.z);return new y((n.column-(t.canonical.x+t.wrap*Math.pow(2,t.canonical.z)))*d,(n.row-t.canonical.y)*d)}function _(t){return"raster"===t||"image"===t||"video"===t}b.maxOverzooming=10,b.maxUnderzooming=3,t.exports=b},function(t,e,n){function r(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,r.key,r)}}var i=n(0),o=n(201).deserialize,a=(n(202),n(48)),s=n(65),u=n(119),l=n(60),c=(n(120),n(62)),f=n(14),h=f.RasterBoundsArray,p=f.CollisionBoxArray,d=n(46),y=n(6),m=n(3),v=n(20),g=n(36).SegmentVector,b=n(37).TriangleIndexArray,x=n(2),_=function(){function t(e,n){!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,t),this.tileID=e,this.uid=i.uniqueId(),this.uses=0,this.tileSize=n,this.buckets={},this.expirationTime=null,this.expiredRequestCount=0,this.state="loading"}var e,n,f;return e=t,(n=[{key:"registerFadeDuration",value:function(t){var e=t+this.timeAdded;e<x.now()||this.fadeEndTime&&e<this.fadeEndTime||(this.fadeEndTime=e)}},{key:"wasRequested",value:function(){return"errored"===this.state||"loaded"===this.state||"reloading"===this.state}},{key:"loadVectorData",value:function(t,e,n){if(this.hasData()&&this.unloadVectorData(),this.state="loaded",t){if(t.rawTileData&&(this.rawTileData=t.rawTileData),this.collisionBoxArray=t.collisionBoxArray,this.featureIndex=t.featureIndex,this.featureIndex.rawTileData=this.rawTileData,this.buckets=o(t.buckets,e.style),n)for(var r in this.buckets){var i=this.buckets[r];i instanceof c&&(i.justReloaded=!0)}t.iconAtlasImage&&(this.iconAtlasImage=t.iconAtlasImage),t.glyphAtlasImage&&(this.glyphAtlasImage=t.glyphAtlasImage)}else this.collisionBoxArray=new p}},{key:"unloadVectorData",value:function(){for(var t in this.buckets)this.buckets[t].destroy();this.buckets={},this.iconAtlasTexture&&this.iconAtlasTexture.destroy(),this.glyphAtlasTexture&&this.glyphAtlasTexture.destroy(),this.collisionBoxArray=null,this.featureIndex=null,this.state="unloaded"}},{key:"unloadDEMData",value:function(){this.dem=null,this.neighboringTiles=null,this.state="unloaded"}},{key:"getBucket",value:function(t){return this.buckets[t.id]}},{key:"upload",value:function(t){for(var e in this.buckets){var n=this.buckets[e];n.uploaded||(n.upload(t),n.uploaded=!0)}var r=t.gl;this.iconAtlasImage&&(this.iconAtlasTexture=new v(t,this.iconAtlasImage,r.RGBA),this.iconAtlasImage=null),this.glyphAtlasImage&&(this.glyphAtlasTexture=new v(t,this.glyphAtlasImage,r.ALPHA),this.glyphAtlasImage=null)}},{key:"queryRenderedFeatures",value:function(t,e,n,r,i,o,a){if(!this.featureIndex||!this.collisionBoxArray)return{};var s=0,u={};for(var l in t){var f=this.getBucket(t[l]);f&&(s=Math.max(s,t[l].queryRadius(f)),f instanceof c&&void 0!==f.bucketInstanceId&&(u[f.bucketInstanceId]=!0))}return this.featureIndex.query({queryGeometry:e,scale:n,tileSize:this.tileSize,bearing:i,params:r,additionalRadius:s,collisionBoxArray:this.collisionBoxArray,sourceID:o,collisionIndex:a,bucketInstanceIds:u},t)}},{key:"querySourceFeatures",value:function(t,e){if(this.rawTileData){this.vtLayers||(this.vtLayers=new a.VectorTile(new s(this.rawTileData)).layers);var n=e?e.sourceLayer:"",r=this.vtLayers._geojsonTileLayer||this.vtLayers[n];if(r)for(var i=l(e&&e.filter),o={z:this.tileID.overscaledZ,x:this.tileID.canonical.x,y:this.tileID.canonical.y},c=0;c<r.length;c++){var f=r.feature(c);if(i({zoom:this.tileID.overscaledZ},f)){var h=new u(f,o.z,o.x,o.y);h.tile=o,t.push(h)}}}}},{key:"clearMask",value: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)}},{key:"setMask",value:function(t,e){if(!i.deepEqual(this.mask,t)&&(this.mask=t,this.clearMask(),!i.deepEqual(t,{0:!0}))){var n=new h,r=new b;this.segments=new g,this.segments.prepareSegment(0,n,r);for(var o=Object.keys(t),a=0;a<o.length;a++){var s=t[o[a]],u=y>>s.z,l=new m(s.x*u,s.y*u),c=new m(l.x+u,l.y+u),f=this.segments.prepareSegment(4,n,r);n.emplaceBack(l.x,l.y,l.x,l.y),n.emplaceBack(c.x,l.y,c.x,l.y),n.emplaceBack(l.x,c.y,l.x,c.y),n.emplaceBack(c.x,c.y,c.x,c.y);var p=f.vertexLength;r.emplaceBack(p,p+1,p+2),r.emplaceBack(p+1,p+2,p+3),f.vertexLength+=4,f.primitiveLength+=2}this.maskedBoundsBuffer=e.createVertexBuffer(n,d.members),this.maskedIndexBuffer=e.createIndexBuffer(r)}}},{key:"hasData",value:function(){return"loaded"===this.state||"reloading"===this.state||"expired"===this.state}},{key:"setExpiryData",value:function(t){var e=this.expirationTime;if(t.cacheControl){var n=i.parseCacheControl(t.cacheControl);n["max-age"]&&(this.expirationTime=Date.now()+1e3*n["max-age"])}else t.expires&&(this.expirationTime=new Date(t.expires).getTime());if(this.expirationTime){var r=Date.now(),o=!1;if(this.expirationTime>r)o=!1;else if(e)if(this.expirationTime<e)o=!0;else{var a=this.expirationTime-e;a?this.expirationTime=r+Math.max(a,3e4):o=!0}else o=!0;o?(this.expiredRequestCount++,this.state="expired"):this.expiredRequestCount=0}}},{key:"getExpiryTimeout",value: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)}}])&&r(e.prototype,n),f&&r(e,f),t}();t.exports=_},function(t,e){function n(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,r.key,r)}}var r=function(){function t(e,n,r,i){!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,t),this.type="Feature",this._vectorTileFeature=e,e._z=n,e._x=r,e._y=i,this.properties=e.properties,null!=e.id&&(this.id=e.id)}var e,r,i;return e=t,(r=[{key:"toJSON",value:function(){var t={geometry:this.geometry};for(var e in this)"_geometry"!==e&&"_vectorTileFeature"!==e&&(t[e]=this[e]);return t}},{key:"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},set:function(t){this._geometry=t}}])&&n(e.prototype,r),i&&n(e,i),t}();t.exports=r},function(t,e,n){function r(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,r.key,r)}}var i=n(3),o=n(44),a=n(204),s=(n(22).mat4,n(66)),u=100,l=function(){function t(e){var n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:new a(e.width+2*u,e.height+2*u,25),r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:new a(e.width+2*u,e.height+2*u,25);!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,t),this.transform=e,this.grid=n,this.ignoredGrid=r,this.pitchfactor=Math.cos(e._pitch)*e.cameraToCenterDistance,this.screenRightBoundary=e.width+u,this.screenBottomBoundary=e.height+u}var e,n,l;return e=t,(n=[{key:"placeCollisionBox",value:function(t,e,n,r){var i=this.projectAndGetPerspectiveRatio(r,t.anchorPointX,t.anchorPointY),o=n*i.perspectiveRatio,a=t.x1*o+i.point.x,s=t.y1*o+i.point.y,u=t.x2*o+i.point.x,l=t.y2*o+i.point.y;return!e&&this.grid.hitTest(a,s,u,l)?{box:[],offscreen:!1}:{box:[a,s,u,l],offscreen:this.isOffscreen(a,s,u,l)}}},{key:"approximateTileDistance",value:function(t,e,n,r,i){var o=i?1:r/this.pitchfactor,a=t.lastSegmentViewportDistance*n;return t.prevTileDistance+a+(o-1)*a*Math.abs(Math.sin(e))}},{key:"placeCollisionCircles",value:function(t,e,n,r,o,a,u,l,f,h,p,d,y){var m=[],v=this.projectAnchor(h,a.anchorX,a.anchorY),g=f/24,b=a.lineOffsetX*f,x=a.lineOffsetY*f,_=new i(a.anchorX,a.anchorY),w=s.project(_,p).point,k=s.placeFirstAndLastGlyph(g,l,b,x,!1,w,_,a,u,p,{},!0),S=!1,T=!0,A=v.perspectiveRatio*r,E=1/(r*n),z=0,C=0;k&&(z=this.approximateTileDistance(k.first.tileDistance,k.first.angle,E,v.cameraDistance,y),C=this.approximateTileDistance(k.last.tileDistance,k.last.angle,E,v.cameraDistance,y));for(var P=0;P<t.length;P+=5){var O=t[P],I=t[P+1],j=t[P+2],M=t[P+3];if(!k||M<-z||M>C)c(t,P,!1);else{var L=this.projectPoint(h,O,I),B=j*A;if(m.length>0){var R=L.x-m[m.length-4],D=L.y-m[m.length-3];if(B*B*2>R*R+D*D)if(P+8<t.length){var F=t[P+8];if(F>-z&&F<C){c(t,P,!1);continue}}}var V=P/5;if(m.push(L.x,L.y,B,V),c(t,P,!0),T=T&&this.isOffscreen(L.x-B,L.y-B,L.x+B,L.y+B),!e&&this.grid.hitTestCircle(L.x,L.y,B)){if(!d)return{circles:[],offscreen:!1};S=!0}}}return{circles:S?[]:m,offscreen:T}}},{key:"queryRenderedSymbols",value:function(t,e,n,r,a,s){var u={},l=[];if(0===t.length||0===this.grid.keysLength()&&0===this.ignoredGrid.keysLength())return l;for(var c=this.transform.calculatePosMatrix(e.toUnwrapped()),f=[],h=1/0,p=1/0,d=-1/0,y=-1/0,m=0;m<t.length;m++)for(var v=t[m],g=0;g<v.length;g++){var b=this.projectPoint(c,v[g].x,v[g].y);h=Math.min(h,b.x),p=Math.min(p,b.y),d=Math.max(d,b.x),y=Math.max(y,b.y),f.push(b)}for(var x=e.key,_=[],w=this.grid.query(h,p,d,y),k=0;k<w.length;k++)w[k].sourceID===a&&w[k].tileID===x&&s[w[k].bucketInstanceId]&&_.push(w[k].boxIndex);for(var S=this.ignoredGrid.query(h,p,d,y),T=0;T<S.length;T++)S[T].sourceID===a&&S[T].tileID===x&&_.push(S[T].boxIndex);for(var A=0;A<_.length;A++){var E=r.get(_[A]),z=E.sourceLayerIndex,C=E.featureIndex,P=E.bucketIndex;if(void 0===u[z]&&(u[z]={}),void 0===u[z][C]&&(u[z][C]={}),!u[z][C][P]){var O=this.projectAndGetPerspectiveRatio(c,E.anchorPointX,E.anchorPointY),I=n*O.perspectiveRatio,j=E.x1*I+O.point.x,M=E.y1*I+O.point.y,L=E.x2*I+O.point.x,B=E.y2*I+O.point.y,R=[new i(j,M),new i(L,M),new i(L,B),new i(j,B)];o.polygonIntersectsPolygon(f,R)&&(u[z][C][P]=!0,l.push(_[A]))}}return l}},{key:"insertCollisionBox",value:function(t,e,n,r,i,o){var a={tileID:n,sourceID:r,bucketInstanceId:i,boxIndex:o};(e?this.ignoredGrid:this.grid).insert(a,t[0],t[1],t[2],t[3])}},{key:"insertCollisionCircles",value:function(t,e,n,r,i,o){for(var a=e?this.ignoredGrid:this.grid,s=0;s<t.length;s+=4){var u={tileID:n,sourceID:r,bucketInstanceId:i,boxIndex:o+t[s+3]};a.insertCircle(u,t[s],t[s+1],t[s+2])}}},{key:"projectAnchor",value:function(t,e,n){var r=[e,n,0,1];return s.xyTransformMat4(r,r,t),{perspectiveRatio:.5+this.transform.cameraToCenterDistance/r[3]*.5,cameraDistance:r[3]}}},{key:"projectPoint",value:function(t,e,n){var r=[e,n,0,1];return s.xyTransformMat4(r,r,t),new i((r[0]/r[3]+1)/2*this.transform.width+u,(-r[1]/r[3]+1)/2*this.transform.height+u)}},{key:"projectAndGetPerspectiveRatio",value:function(t,e,n){var r=[e,n,0,1];return s.xyTransformMat4(r,r,t),{point:new i((r[0]/r[3]+1)/2*this.transform.width+u,(-r[1]/r[3]+1)/2*this.transform.height+u),perspectiveRatio:.5+this.transform.cameraToCenterDistance/r[3]*.5}}},{key:"isOffscreen",value:function(t,e,n,r){return n<u||t>=this.screenRightBoundary||r<u||e>this.screenBottomBoundary}}])&&r(e.prototype,n),l&&r(e,l),t}();function c(t,e,n){t[e+4]=n?1:0}t.exports=l},function(t,e){function n(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,r.key,r)}}var r=function(){function t(e,n){!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,t),this.max=e,this.onRemove=n,this.reset()}var e,r,i;return e=t,(r=[{key:"reset",value:function(){for(var t in this.data)this.onRemove(this.data[t]);return this.data={},this.order=[],this}},{key:"add",value: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 n=this.getAndRemove(this.order[0]);n&&this.onRemove(n)}return this}},{key:"has",value:function(t){return t in this.data}},{key:"keys",value:function(){return this.order}},{key:"getAndRemove",value: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}},{key:"get",value:function(t){return this.has(t)?this.data[t]:null}},{key:"remove",value: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}},{key:"setMaxSize",value:function(t){for(this.max=t;this.order.length>this.max;){var e=this.getAndRemove(this.order[0]);e&&this.onRemove(e)}return this}}])&&n(e.prototype,r),i&&n(e,i),t}();t.exports=r},function(t,e,n){function r(t){return(r="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t})(t)}function i(t,e){return!e||"object"!==r(e)&&"function"!=typeof e?function(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}(t):e}function o(t){return(o=Object.setPrototypeOf?Object.getPrototypeOf:function(t){return t.__proto__||Object.getPrototypeOf(t)})(t)}function a(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),e&&s(t,e)}function s(t,e){return(s=Object.setPrototypeOf||function(t,e){return t.__proto__=e,t})(t,e)}function u(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function l(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,r.key,r)}}function c(t,e,n){return e&&l(t.prototype,e),n&&l(t,n),t}var f=n(12),h=n(0),p=function(){function t(e){u(this,t),this.context=e,this.current=f.transparent}return c(t,[{key:"get",value:function(){return this.current}},{key:"set",value:function(t){var e=this.current;t.r===e.r&&t.g===e.g&&t.b===e.b&&t.a===e.a||(this.context.gl.clearColor(t.r,t.g,t.b,t.a),this.current=t)}}]),t}(),d=function(){function t(e){u(this,t),this.context=e,this.current=1}return c(t,[{key:"get",value:function(){return this.current}},{key:"set",value:function(t){this.current!==t&&(this.context.gl.clearDepth(t),this.current=t)}}]),t}(),y=function(){function t(e){u(this,t),this.context=e,this.current=0}return c(t,[{key:"get",value:function(){return this.current}},{key:"set",value:function(t){this.current!==t&&(this.context.gl.clearStencil(t),this.current=t)}}]),t}(),m=function(){function t(e){u(this,t),this.context=e,this.current=[!0,!0,!0,!0]}return c(t,[{key:"get",value:function(){return this.current}},{key:"set",value:function(t){var e=this.current;t[0]===e[0]&&t[1]===e[1]&&t[2]===e[2]&&t[3]===e[3]||(this.context.gl.colorMask(t[0],t[1],t[2],t[3]),this.current=t)}}]),t}(),v=function(){function t(e){u(this,t),this.context=e,this.current=!0}return c(t,[{key:"get",value:function(){return this.current}},{key:"set",value:function(t){this.current!==t&&(this.context.gl.depthMask(t),this.current=t)}}]),t}(),g=function(){function t(e){u(this,t),this.context=e,this.current=255}return c(t,[{key:"get",value:function(){return this.current}},{key:"set",value:function(t){this.current!==t&&(this.context.gl.stencilMask(t),this.current=t)}}]),t}(),b=function(){function t(e){u(this,t),this.context=e,this.current={func:e.gl.ALWAYS,ref:0,mask:255}}return c(t,[{key:"get",value:function(){return this.current}},{key:"set",value:function(t){var e=this.current;t.func===e.func&&t.ref===e.ref&&t.mask===e.mask||(this.context.gl.stencilFunc(t.func,t.ref,t.mask),this.current=t)}}]),t}(),x=function(){function t(e){u(this,t),this.context=e;var n=this.context.gl;this.current=[n.KEEP,n.KEEP,n.KEEP]}return c(t,[{key:"get",value:function(){return this.current}},{key:"set",value:function(t){var e=this.current;t[0]===e[0]&&t[1]===e[1]&&t[2]===e[2]||(this.context.gl.stencilOp(t[0],t[1],t[2]),this.current=t)}}]),t}(),_=function(){function t(e){u(this,t),this.context=e,this.current=!1}return c(t,[{key:"get",value:function(){return this.current}},{key:"set",value:function(t){if(this.current!==t){var e=this.context.gl;t?e.enable(e.STENCIL_TEST):e.disable(e.STENCIL_TEST),this.current=t}}}]),t}(),w=function(){function t(e){u(this,t),this.context=e,this.current=[0,1]}return c(t,[{key:"get",value:function(){return this.current}},{key:"set",value:function(t){var e=this.current;t[0]===e[0]&&t[1]===e[1]||(this.context.gl.depthRange(t[0],t[1]),this.current=t)}}]),t}(),k=function(){function t(e){u(this,t),this.context=e,this.current=!1}return c(t,[{key:"get",value:function(){return this.current}},{key:"set",value:function(t){if(this.current!==t){var e=this.context.gl;t?e.enable(e.DEPTH_TEST):e.disable(e.DEPTH_TEST),this.current=t}}}]),t}(),S=function(){function t(e){u(this,t),this.context=e,this.current=e.gl.LESS}return c(t,[{key:"get",value:function(){return this.current}},{key:"set",value:function(t){this.current!==t&&(this.context.gl.depthFunc(t),this.current=t)}}]),t}(),T=function(){function t(e){u(this,t),this.context=e,this.current=!1}return c(t,[{key:"get",value:function(){return this.current}},{key:"set",value:function(t){if(this.current!==t){var e=this.context.gl;t?e.enable(e.BLEND):e.disable(e.BLEND),this.current=t}}}]),t}(),A=function(){function t(e){u(this,t),this.context=e;var n=this.context.gl;this.current=[n.ONE,n.ZERO]}return c(t,[{key:"get",value:function(){return this.current}},{key:"set",value:function(t){var e=this.current;t[0]===e[0]&&t[1]===e[1]||(this.context.gl.blendFunc(t[0],t[1]),this.current=t)}}]),t}(),E=function(){function t(e){u(this,t),this.context=e,this.current=f.transparent}return c(t,[{key:"get",value:function(){return this.current}},{key:"set",value:function(t){var e=this.current;t.r===e.r&&t.g===e.g&&t.b===e.b&&t.a===e.a||(this.context.gl.blendColor(t.r,t.g,t.b,t.a),this.current=t)}}]),t}(),z=function(){function t(e){u(this,t),this.context=e,this.current=null}return c(t,[{key:"get",value:function(){return this.current}},{key:"set",value:function(t){this.current!==t&&(this.context.gl.useProgram(t),this.current=t)}}]),t}(),C=function(){function t(e){u(this,t),this.context=e,this.current=1}return c(t,[{key:"get",value:function(){return this.current}},{key:"set",value:function(t){var e=this.context.lineWidthRange,n=h.clamp(t,e[0],e[1]);this.current!==n&&(this.context.gl.lineWidth(n),this.current=t)}}]),t}(),P=function(){function t(e){u(this,t),this.context=e,this.current=e.gl.TEXTURE0}return c(t,[{key:"get",value:function(){return this.current}},{key:"set",value:function(t){this.current!==t&&(this.context.gl.activeTexture(t),this.current=t)}}]),t}(),O=function(){function t(e){u(this,t),this.context=e;var n=this.context.gl;this.current=[0,0,n.drawingBufferWidth,n.drawingBufferHeight]}return c(t,[{key:"get",value:function(){return this.current}},{key:"set",value:function(t){var e=this.current;t[0]===e[0]&&t[1]===e[1]&&t[2]===e[2]&&t[3]===e[3]||(this.context.gl.viewport(t[0],t[1],t[2],t[3]),this.current=t)}}]),t}(),I=function(){function t(e){u(this,t),this.context=e,this.current=null}return c(t,[{key:"get",value:function(){return this.current}},{key:"set",value:function(t){if(this.current!==t){var e=this.context.gl;e.bindFramebuffer(e.FRAMEBUFFER,t),this.current=t}}}]),t}(),j=function(){function t(e){u(this,t),this.context=e,this.current=null}return c(t,[{key:"get",value:function(){return this.current}},{key:"set",value:function(t){if(this.current!==t){var e=this.context.gl;e.bindRenderbuffer(e.RENDERBUFFER,t),this.current=t}}}]),t}(),M=function(){function t(e){u(this,t),this.context=e,this.current=null}return c(t,[{key:"get",value:function(){return this.current}},{key:"set",value:function(t){if(this.current!==t){var e=this.context.gl;e.bindTexture(e.TEXTURE_2D,t),this.current=t}}}]),t}(),L=function(){function t(e){u(this,t),this.context=e,this.current=null}return c(t,[{key:"get",value:function(){return this.current}},{key:"set",value:function(t){if(this.current!==t){var e=this.context.gl;e.bindBuffer(e.ARRAY_BUFFER,t),this.current=t}}}]),t}(),B=function(){function t(e){u(this,t),this.context=e,this.current=null}return c(t,[{key:"get",value:function(){return this.current}},{key:"set",value:function(t){var e=this.context.gl;e.bindBuffer(e.ELEMENT_ARRAY_BUFFER,t),this.current=t}}]),t}(),R=function(){function t(e){u(this,t),this.context=e,this.current=null}return c(t,[{key:"get",value:function(){return this.current}},{key:"set",value:function(t){this.current!==t&&this.context.extVertexArrayObject&&(this.context.extVertexArrayObject.bindVertexArrayOES(t),this.current=t)}}]),t}(),D=function(){function t(e){u(this,t),this.context=e,this.current=4}return c(t,[{key:"get",value:function(){return this.current}},{key:"set",value:function(t){if(this.current!==t){var e=this.context.gl;e.pixelStorei(e.UNPACK_ALIGNMENT,t),this.current=t}}}]),t}(),F=function(){function t(e){u(this,t),this.context=e,this.current=!1}return c(t,[{key:"get",value:function(){return this.current}},{key:"set",value:function(t){if(this.current!==t){var e=this.context.gl;e.pixelStorei(e.UNPACK_PREMULTIPLY_ALPHA_WEBGL,t),this.current=t}}}]),t}(),V=function(){function t(e,n){u(this,t),this.context=e,this.current=null,this.parent=n}return c(t,[{key:"get",value:function(){return this.current}}]),t}(),N=function(t){function e(t,n){var r;return u(this,e),(r=i(this,o(e).call(this,t,n))).dirty=!1,r}return a(e,V),c(e,[{key:"set",value:function(t){if(this.dirty||this.current!==t){var e=this.context.gl;this.context.bindFramebuffer.set(this.parent),e.framebufferTexture2D(e.FRAMEBUFFER,e.COLOR_ATTACHMENT0,e.TEXTURE_2D,t,0),this.current=t,this.dirty=!1}}},{key:"setDirty",value:function(){this.dirty=!0}}]),e}(),q=function(t){function e(){return u(this,e),i(this,o(e).apply(this,arguments))}return a(e,V),c(e,[{key:"set",value:function(t){if(this.current!==t){var e=this.context.gl;this.context.bindFramebuffer.set(this.parent),e.framebufferRenderbuffer(e.FRAMEBUFFER,e.DEPTH_ATTACHMENT,e.RENDERBUFFER,t),this.current=t}}}]),e}();t.exports={ClearColor:p,ClearDepth:d,ClearStencil:y,ColorMask:m,DepthMask:v,StencilMask:g,StencilFunc:b,StencilOp:x,StencilTest:_,DepthRange:w,DepthTest:k,DepthFunc:S,Blend:T,BlendFunc:A,BlendColor:E,Program:z,LineWidth:C,ActiveTextureUnit:P,Viewport:O,BindFramebuffer:I,BindRenderbuffer:j,BindTexture:M,BindVertexBuffer:L,BindElementBuffer:B,BindVertexArrayOES:R,PixelStoreUnpack:D,PixelStoreUnpackPremultiplyAlpha:F,ColorAttachment:N,DepthAttachment:q}},function(t,e,n){function r(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function i(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,r.key,r)}}function o(t,e,n){return e&&i(t.prototype,e),n&&i(t,n),t}var a=n(6),s=512/a/2,u=function(){function t(e,n,i){r(this,t),this.tileID=e,this.indexedSymbolInstances={},this.bucketInstanceId=i;var o=!0,a=!1,s=void 0;try{for(var u,l=n[Symbol.iterator]();!(o=(u=l.next()).done);o=!0){var c=u.value,f=c.key;this.indexedSymbolInstances[f]||(this.indexedSymbolInstances[f]=[]),this.indexedSymbolInstances[f].push({crossTileID:c.crossTileID,coord:this.getScaledCoordinates(c,e)})}}catch(t){a=!0,s=t}finally{try{o||null==l.return||l.return()}finally{if(a)throw s}}}return o(t,[{key:"getScaledCoordinates",value:function(t,e){var n=e.canonical.z-this.tileID.canonical.z,r=s/Math.pow(2,n),i=t.anchor;return{x:Math.floor((e.canonical.x*a+i.x)*r),y:Math.floor((e.canonical.y*a+i.y)*r)}}},{key:"findMatches",value:function(t,e,n){var r=this.tileID.canonical.z<e.canonical.z?1:Math.pow(2,this.tileID.canonical.z-e.canonical.z),i=!0,o=!1,a=void 0;try{for(var s,u=t[Symbol.iterator]();!(i=(s=u.next()).done);i=!0){var l=s.value;if(!l.crossTileID){var c=this.indexedSymbolInstances[l.key];if(c){var f=this.getScaledCoordinates(l,e),h=!0,p=!1,d=void 0;try{for(var y,m=c[Symbol.iterator]();!(h=(y=m.next()).done);h=!0){var v=y.value;if(Math.abs(v.coord.x-f.x)<=r&&Math.abs(v.coord.y-f.y)<=r&&!n[v.crossTileID]){n[v.crossTileID]=!0,l.crossTileID=v.crossTileID;break}}}catch(t){p=!0,d=t}finally{try{h||null==m.return||m.return()}finally{if(p)throw d}}}}}}catch(t){o=!0,a=t}finally{try{i||null==u.return||u.return()}finally{if(o)throw a}}}}]),t}(),l=function(){function t(){r(this,t),this.maxCrossTileID=0}return o(t,[{key:"generate",value:function(){return++this.maxCrossTileID}}]),t}(),c=function(){function t(){r(this,t),this.indexes={},this.usedCrossTileIDs={}}return o(t,[{key:"addBucket",value:function(t,e,n){if(this.indexes[t.overscaledZ]&&this.indexes[t.overscaledZ][t.key]){if(this.indexes[t.overscaledZ][t.key].bucketInstanceId===e.bucketInstanceId)return!1;this.removeBucketCrossTileIDs(t.overscaledZ,this.indexes[t.overscaledZ][t.key])}var r=!0,i=!1,o=void 0;try{for(var a,s=e.symbolInstances[Symbol.iterator]();!(r=(a=s.next()).done);r=!0){a.value.crossTileID=0}}catch(t){i=!0,o=t}finally{try{r||null==s.return||s.return()}finally{if(i)throw o}}this.usedCrossTileIDs[t.overscaledZ]||(this.usedCrossTileIDs[t.overscaledZ]={});var l=this.usedCrossTileIDs[t.overscaledZ];for(var c in this.indexes){var f=this.indexes[c];if(Number(c)>t.overscaledZ)for(var h in f){var p=f[h];p.tileID.isChildOf(t)&&p.findMatches(e.symbolInstances,t,l)}else{var d=f[t.scaledTo(Number(c)).key];d&&d.findMatches(e.symbolInstances,t,l)}}var y=!0,m=!1,v=void 0;try{for(var g,b=e.symbolInstances[Symbol.iterator]();!(y=(g=b.next()).done);y=!0){var x=g.value;x.crossTileID||(x.crossTileID=n.generate(),l[x.crossTileID]=!0)}}catch(t){m=!0,v=t}finally{try{y||null==b.return||b.return()}finally{if(m)throw v}}return void 0===this.indexes[t.overscaledZ]&&(this.indexes[t.overscaledZ]={}),this.indexes[t.overscaledZ][t.key]=new u(t,e.symbolInstances,e.bucketInstanceId),!0}},{key:"removeBucketCrossTileIDs",value:function(t,e){for(var n in e.indexedSymbolInstances){var r=!0,i=!1,o=void 0;try{for(var a,s=e.indexedSymbolInstances[n][Symbol.iterator]();!(r=(a=s.next()).done);r=!0){var u=a.value;delete this.usedCrossTileIDs[t][u.crossTileID]}}catch(t){i=!0,o=t}finally{try{r||null==s.return||s.return()}finally{if(i)throw o}}}}},{key:"removeStaleBuckets",value:function(t){var e=!1;for(var n in this.indexes){var r=this.indexes[n];for(var i in r)t[r[i].bucketInstanceId]||(this.removeBucketCrossTileIDs(n,r[i]),delete r[i],e=!0)}return e}}]),t}(),f=function(){function t(){r(this,t),this.layerIndexes={},this.crossTileIDs=new l,this.maxBucketInstanceId=0}return o(t,[{key:"addLayer",value:function(t,e){var n=this.layerIndexes[t.id];void 0===n&&(n=this.layerIndexes[t.id]=new c);var r=!1,i={},o=!0,a=!1,s=void 0;try{for(var u,l=e[Symbol.iterator]();!(o=(u=l.next()).done);o=!0){var f=u.value,h=f.getBucket(t);h&&(h.bucketInstanceId||(h.bucketInstanceId=++this.maxBucketInstanceId),n.addBucket(f.tileID,h,this.crossTileIDs)&&(r=!0),i[h.bucketInstanceId]=!0)}}catch(t){a=!0,s=t}finally{try{o||null==l.return||l.return()}finally{if(a)throw s}}return n.removeStaleBuckets(i)&&(r=!0),r}}]),t}();t.exports=f},function(t,e,n){function r(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,r.key,r)}}var i=n(2),o=n(22).mat4,a=n(117),s=n(6),u=n(28),l=n(0),c=n(40),f=n(14),h=f.RasterBoundsArray,p=f.PosArray,d=n(46),y=n(125),m=n(32).ProgramConfiguration,v=n(123),g=n(126),b=n(268),x=n(67),_=n(15),w=n(18),k=n(68),S=(n(20),n(269)),T=n(12),A={symbol:n(270),circle:n(272),heatmap:n(273),line:n(274),fill:n(275),"fill-extrusion":n(276),hillshade:n(277),raster:n(278),background:n(279),debug:n(280)},E=function(){function t(e,n){!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,t),this.context=new x(e),this.transform=n,this._tileTextures={},this.setup(),this.numSublayers=a.maxUnderzooming+a.maxOverzooming+1,this.depthEpsilon=1/Math.pow(2,16),this.depthRboNeedsClear=!0,this.emptyProgramConfiguration=new m,this.crossTileSymbolIndex=new v}var e,n,f;return e=t,(n=[{key:"resize",value:function(t,e){var n=this.context.gl;if(this.width=t*i.devicePixelRatio,this.height=e*i.devicePixelRatio,this.context.viewport.set([0,0,this.width,this.height]),this.style){var r=!0,o=!1,a=void 0;try{for(var s,u=this.style._order[Symbol.iterator]();!(r=(s=u.next()).done);r=!0){var l=s.value;this.style._layers[l].resize()}}catch(t){o=!0,a=t}finally{try{r||null==u.return||u.return()}finally{if(o)throw a}}}this.depthRbo&&(n.deleteRenderbuffer(this.depthRbo),this.depthRbo=null)}},{key:"setup",value:function(){var t=this.context,e=new p;e.emplaceBack(0,0),e.emplaceBack(s,0),e.emplaceBack(0,s),e.emplaceBack(s,s),this.tileExtentBuffer=t.createVertexBuffer(e,y.members),this.tileExtentVAO=new c,this.tileExtentPatternVAO=new c;var n=new p;n.emplaceBack(0,0),n.emplaceBack(s,0),n.emplaceBack(s,s),n.emplaceBack(0,s),n.emplaceBack(0,0),this.debugBuffer=t.createVertexBuffer(n,y.members),this.debugVAO=new c;var r=new h;r.emplaceBack(0,0,0,0),r.emplaceBack(s,0,s,0),r.emplaceBack(0,s,0,s),r.emplaceBack(s,s,s,s),this.rasterBoundsBuffer=t.createVertexBuffer(r,d.members),this.rasterBoundsVAO=new c;var i=new p;i.emplaceBack(0,0),i.emplaceBack(1,0),i.emplaceBack(0,1),i.emplaceBack(1,1),this.viewportBuffer=t.createVertexBuffer(i,y.members),this.viewportVAO=new c}},{key:"clearStencil",value:function(){var t=this.context,e=t.gl;t.setColorMode(k.disabled),t.setDepthMode(_.disabled),t.setStencilMode(new w({func:e.ALWAYS,mask:0},0,255,e.ZERO,e.ZERO,e.ZERO));var n=o.create();o.ortho(n,0,this.width,this.height,0,0,1),o.scale(n,n,[e.drawingBufferWidth,e.drawingBufferHeight,0]);var r=this.useProgram("clippingMask");e.uniformMatrix4fv(r.uniforms.u_matrix,!1,n),this.viewportVAO.bind(t,r,this.viewportBuffer,[]),e.drawArrays(e.TRIANGLE_STRIP,0,4)}},{key:"_renderTileClippingMasks",value:function(t){var e=this.context,n=e.gl;e.setColorMode(k.disabled),e.setDepthMode(_.disabled);var r=1;this._tileClippingMaskIDs={};var i=!0,o=!1,a=void 0;try{for(var s,u=t[Symbol.iterator]();!(i=(s=u.next()).done);i=!0){var l=s.value,c=this._tileClippingMaskIDs[l.key]=r++;e.setStencilMode(new w({func:n.ALWAYS,mask:0},c,255,n.KEEP,n.KEEP,n.REPLACE));var f=this.useProgram("clippingMask");n.uniformMatrix4fv(f.uniforms.u_matrix,!1,l.posMatrix),this.tileExtentVAO.bind(this.context,f,this.tileExtentBuffer,[]),n.drawArrays(n.TRIANGLE_STRIP,0,this.tileExtentBuffer.length)}}catch(t){o=!0,a=t}finally{try{i||null==u.return||u.return()}finally{if(o)throw a}}}},{key:"stencilModeForClipping",value:function(t){var e=this.context.gl;return new w({func:e.EQUAL,mask:255},this._tileClippingMaskIDs[t.key],0,e.KEEP,e.KEEP,e.REPLACE)}},{key:"colorModeForRenderPass",value:function(){var t=this.context.gl;if(this._showOverdrawInspector){return new k([t.CONSTANT_COLOR,t.ONE],new T(1/8,1/8,1/8,0),[!0,!0,!0,!0])}return"opaque"===this.renderPass?k.unblended:k.alphaBlended}},{key:"depthModeForSublayer",value:function(t,e,n){var r=1-((1+this.currentLayer)*this.numSublayers+t)*this.depthEpsilon,i=r-1+this.depthRange;return new _(n||this.context.gl.LEQUAL,e,[i,r])}},{key:"render",value:function(t,e){var n=this;for(var r in this.style=t,this.options=e,this.lineAtlas=t.lineAtlas,this.imageManager=t.imageManager,this.glyphManager=t.glyphManager,this.symbolFadeChange=t.placement.symbolFadeChange(i.now()),t.sourceCaches){var o=this.style.sourceCaches[r];o.used&&o.prepare(this.context)}var a=this.style._order,s=l.filterObject(this.style.sourceCaches,function(t){return"raster"===t.getSource().type||"raster-dem"===t.getSource().type}),u=function(t){var e=s[t],r=e.getVisibleCoordinates().map(function(t){return e.getTile(t)});S(r,n.context)};for(var c in s)u(c);this.renderPass="offscreen";var f,h=[];this.depthRboNeedsClear=!0;for(var p=0;p<a.length;p++){var d=this.style._layers[a[p]];d.hasOffscreenPass()&&!d.isHidden(this.transform.zoom)&&(d.source!==(f&&f.id)&&(h=[],(f=this.style.sourceCaches[d.source])&&(h=f.getVisibleCoordinates()).reverse()),h.length&&this.renderLayer(this,f,d,h))}this.context.bindFramebuffer.set(null),this.context.clear({color:e.showOverdrawInspector?T.black:T.transparent,depth:1}),this._showOverdrawInspector=e.showOverdrawInspector,this.depthRange=(t._order.length+2)*this.numSublayers*this.depthEpsilon,this.renderPass="opaque";var y,m=[];for(this.currentLayer=a.length-1,this.currentLayer;this.currentLayer>=0;this.currentLayer--){var v=this.style._layers[a[this.currentLayer]];v.source!==(y&&y.id)&&(m=[],(y=this.style.sourceCaches[v.source])&&(this.clearStencil(),m=y.getVisibleCoordinates(),y.getSource().isTileClipped&&this._renderTileClippingMasks(m))),this.renderLayer(this,y,v,m)}this.renderPass="translucent";var g,b=[];for(this.currentLayer=0,this.currentLayer;this.currentLayer<a.length;this.currentLayer++){var x=this.style._layers[a[this.currentLayer]];x.source!==(g&&g.id)&&(b=[],(g=this.style.sourceCaches[x.source])&&(this.clearStencil(),b=g.getVisibleCoordinates(),g.getSource().isTileClipped&&this._renderTileClippingMasks(b)),b.reverse()),this.renderLayer(this,g,x,b)}if(this.options.showTileBoundaries){var _=this.style.sourceCaches[Object.keys(this.style.sourceCaches)[0]];_&&A.debug(this,_,_.getVisibleCoordinates())}}},{key:"setupOffscreenDepthRenderbuffer",value:function(){var t=this.context;this.depthRbo||(this.depthRbo=t.createRenderbuffer(t.gl.DEPTH_COMPONENT16,this.width,this.height))}},{key:"renderLayer",value:function(t,e,n,r){n.isHidden(this.transform.zoom)||("background"===n.type||r.length)&&(this.id=n.id,A[n.type](t,e,n,r))}},{key:"translatePosMatrix",value:function(t,e,n,r,i){if(!n[0]&&!n[1])return t;var a=i?"map"===r?this.transform.angle:0:"viewport"===r?-this.transform.angle:0;if(a){var s=Math.sin(a),l=Math.cos(a);n=[n[0]*l-n[1]*s,n[0]*s+n[1]*l]}var c=[i?n[0]:u(e,n[0],this.transform.zoom),i?n[1]:u(e,n[1],this.transform.zoom),0],f=new Float32Array(16);return o.translate(f,t,c),f}},{key:"saveTileTexture",value:function(t){var e=this._tileTextures[t.size[0]];e?e.push(t):this._tileTextures[t.size[0]]=[t]}},{key:"getTileTexture",value:function(t){var e=this._tileTextures[t];return e&&e.length>0?e.pop():null}},{key:"_createProgramCached",value:function(t,e){this.cache=this.cache||{};var n="".concat(t).concat(e.cacheKey||"").concat(this._showOverdrawInspector?"/overdraw":"");return this.cache[n]||(this.cache[n]=new b(this.context,g[t],e,this._showOverdrawInspector)),this.cache[n]}},{key:"useProgram",value:function(t,e){var n=this._createProgramCached(t,e||this.emptyProgramConfiguration);return this.context.program.set(n.program),n}}])&&r(e.prototype,n),f&&r(e,f),t}();t.exports=E},function(t,e,n){var r=n(23).createLayout;t.exports=r([{name:"a_pos",type:"Int16",components:2}])},function(t,e,n){var r={prelude:{fragmentSource:n(218),vertexSource:n(219)},background:{fragmentSource:n(220),vertexSource:n(221)},backgroundPattern:{fragmentSource:n(222),vertexSource:n(223)},circle:{fragmentSource:n(224),vertexSource:n(225)},clippingMask:{fragmentSource:n(226),vertexSource:n(227)},heatmap:{fragmentSource:n(228),vertexSource:n(229)},heatmapTexture:{fragmentSource:n(230),vertexSource:n(231)},collisionBox:{fragmentSource:n(232),vertexSource:n(233)},collisionCircle:{fragmentSource:n(234),vertexSource:n(235)},debug:{fragmentSource:n(236),vertexSource:n(237)},fill:{fragmentSource:n(238),vertexSource:n(239)},fillOutline:{fragmentSource:n(240),vertexSource:n(241)},fillOutlinePattern:{fragmentSource:n(242),vertexSource:n(243)},fillPattern:{fragmentSource:n(244),vertexSource:n(245)},fillExtrusion:{fragmentSource:n(246),vertexSource:n(247)},fillExtrusionPattern:{fragmentSource:n(248),vertexSource:n(249)},extrusionTexture:{fragmentSource:n(250),vertexSource:n(251)},hillshadePrepare:{fragmentSource:n(252),vertexSource:n(253)},hillshade:{fragmentSource:n(254),vertexSource:n(255)},line:{fragmentSource:n(256),vertexSource:n(257)},linePattern:{fragmentSource:n(258),vertexSource:n(259)},lineSDF:{fragmentSource:n(260),vertexSource:n(261)},raster:{fragmentSource:n(262),vertexSource:n(263)},symbolIcon:{fragmentSource:n(264),vertexSource:n(265)},symbolSDF:{fragmentSource:n(266),vertexSource:n(267)}},i=/#pragma mapbox: ([\w]+) ([\w]+) ([\w]+) ([\w]+)/g,o=function(t){var e=r[t],n={};e.fragmentSource=e.fragmentSource.replace(i,function(t,e,r,i,o){return n[o]=!0,"define"===e?"\n#ifndef HAS_UNIFORM_u_".concat(o,"\nvarying ").concat(r," ").concat(i," ").concat(o,";\n#else\nuniform ").concat(r," ").concat(i," u_").concat(o,";\n#endif\n"):"\n#ifdef HAS_UNIFORM_u_".concat(o,"\n    ").concat(r," ").concat(i," ").concat(o," = u_").concat(o,";\n#endif\n")}),e.vertexSource=e.vertexSource.replace(i,function(t,e,r,i,o){var a="float"===i?"vec2":"vec4";return n[o]?"define"===e?"\n#ifndef HAS_UNIFORM_u_".concat(o,"\nuniform lowp float a_").concat(o,"_t;\nattribute ").concat(r," ").concat(a," a_").concat(o,";\nvarying ").concat(r," ").concat(i," ").concat(o,";\n#else\nuniform ").concat(r," ").concat(i," u_").concat(o,";\n#endif\n"):"\n#ifndef HAS_UNIFORM_u_".concat(o,"\n    ").concat(o," = unpack_mix_").concat(a,"(a_").concat(o,", a_").concat(o,"_t);\n#else\n    ").concat(r," ").concat(i," ").concat(o," = u_").concat(o,";\n#endif\n"):"define"===e?"\n#ifndef HAS_UNIFORM_u_".concat(o,"\nuniform lowp float a_").concat(o,"_t;\nattribute ").concat(r," ").concat(a," a_").concat(o,";\n#else\nuniform ").concat(r," ").concat(i," u_").concat(o,";\n#endif\n"):"\n#ifndef HAS_UNIFORM_u_".concat(o,"\n    ").concat(r," ").concat(i," ").concat(o," = unpack_mix_").concat(a,"(a_").concat(o,", a_").concat(o,"_t);\n#else\n    ").concat(r," ").concat(i," ").concat(o," = u_").concat(o,";\n#endif\n")})};for(var a in r)o(a);t.exports=r},function(t,e,n){function r(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,r.key,r)}}var i=n(9),o=n(0),a=n(5),s=n(2),u=o.bezier(0,0,.25,1),l=function(){function t(e,n){!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,t),this._map=e,this._el=n.element||e.getCanvasContainer(),this._button=n.button||"right",this._bearingSnap=n.bearingSnap||0,this._pitchWithRotate=!1!==n.pitchWithRotate,o.bindAll(["_onDown","_onMove","_onUp"],this)}var e,n,l;return e=t,(n=[{key:"isEnabled",value:function(){return!!this._enabled}},{key:"isActive",value:function(){return!!this._active}},{key:"enable",value:function(){this.isEnabled()||(this._el.addEventListener("mousedown",this._onDown),this._enabled=!0)}},{key:"disable",value:function(){this.isEnabled()&&(this._el.removeEventListener("mousedown",this._onDown),this._enabled=!1)}},{key:"_onDown",value: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,n=t.button;if(void 0!==a.InstallTrigger&&2===t.button&&t.ctrlKey&&a.navigator.platform.toUpperCase().indexOf("MAC")>=0&&(n=0),n!==e)return}else if(t.ctrlKey||0!==t.button)return;i.disableDrag(),a.document.addEventListener("mousemove",this._onMove,{capture:!0}),a.document.addEventListener("mouseup",this._onUp),a.addEventListener("blur",this._onUp),this._active=!1,this._inertia=[[s.now(),this._map.getBearing()]],this._startPos=this._pos=i.mousePos(this._el,t),this._center=this._map.transform.centerPoint,t.preventDefault()}}},{key:"_onMove",value: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 n=this._pos,r=i.mousePos(this._el,t),o=.8*(n.x-r.x),a=-.5*(n.y-r.y),u=e.getBearing()-o,l=e.getPitch()-a,c=this._inertia,f=c[c.length-1];this._drainInertiaBuffer(),c.push([s.now(),e._normalizeBearing(u,f[1])]),e.transform.bearing=u,this._pitchWithRotate&&(this._fireEvent("pitch",t),e.transform.pitch=l),this._fireEvent("rotate",t),this._fireEvent("move",t),this._pos=r}},{key:"_onUp",value:function(t){var e=this;if(a.document.removeEventListener("mousemove",this._onMove,{capture:!0}),a.document.removeEventListener("mouseup",this._onUp),a.removeEventListener("blur",this._onUp),i.enableDrag(),this.isActive()){this._active=!1,this._fireEvent("rotateend",t),this._drainInertiaBuffer();var n=this._map,r=n.getBearing(),o=this._inertia,s=function(){Math.abs(r)<e._bearingSnap?n.resetNorth({noMoveStart:!0},{originalEvent:t}):(e._map.moving=!1,e._fireEvent("moveend",t)),e._pitchWithRotate&&e._fireEvent("pitchend",t)};if(o.length<2)s();else{var l=o[0],c=o[o.length-1],f=o[o.length-2],h=n._normalizeBearing(r,f[1]),p=c[1]-l[1],d=p<0?-1:1,y=(c[0]-l[0])/1e3;if(0!==p&&0!==y){var m=Math.abs(p*(.25/y));m>180&&(m=180);var v=m/180;h+=d*m*(v/2),Math.abs(n._normalizeBearing(h,0))<this._bearingSnap&&(h=n._normalizeBearing(0,h)),n.rotateTo(h,{duration:1e3*v,easing:u,noMoveStart:!0},{originalEvent:t})}else s()}}}},{key:"_fireEvent",value:function(t,e){return this._map.fire(t,{originalEvent:e})}},{key:"_drainInertiaBuffer",value:function(){for(var t=this._inertia,e=s.now();t.length>0&&e-t[0][0]>160;)t.shift()}}])&&r(e.prototype,n),l&&r(e,l),t}();t.exports=l},function(t,e,n){function r(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,r.key,r)}}var i=n(9),o=n(0),a=n(64),s=function(){function t(e){!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,t),this.options=e,o.bindAll(["_updateEditLink","_updateData","_updateCompact"],this)}var e,n,s;return e=t,(n=[{key:"getDefaultPosition",value:function(){return"bottom-right"}},{key:"onAdd",value: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}},{key:"onRemove",value: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}},{key:"_updateEditLink",value: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:a.ACCESS_TOKEN}];if(t){var n=e.reduce(function(t,n,r){return n.value&&(t+="".concat(n.key,"=").concat(n.value).concat(r<e.length-1?"&":"")),t},"?");t.href="https://www.mapbox.com/feedback/".concat(n).concat(this._map._hash?this._map._hash.getHashString(!0):"")}}},{key:"_updateData",value:function(t){t&&"metadata"===t.sourceDataType&&(this._updateAttributions(),this._updateEditLink())}},{key:"_updateAttributions",value: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 n=this._map.style.sourceCaches;for(var r in n){var i=n[r].getSource();i.attribution&&t.indexOf(i.attribution)<0&&t.push(i.attribution)}t.sort(function(t,e){return t.length-e.length}),t=t.filter(function(e,n){for(var r=n+1;r<t.length;r++)if(t[r].indexOf(e)>=0)return!1;return!0}),this._container.innerHTML=t.join(" | "),this._editLink=null}}},{key:"_updateCompact",value:function(){this._map.getCanvasContainer().offsetWidth<=640?this._container.classList.add("mapboxgl-compact"):this._container.classList.remove("mapboxgl-compact")}}])&&r(e.prototype,n),s&&r(e,s),t}();t.exports=s},function(t,e,n){function r(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,r.key,r)}}var i=n(9),o=n(21),a=n(3),s=n(130),u=n(0).bindAll,l=function(){function t(e,n){if(function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,t),this._offset=a.convert(n&&n.offset||[0,0]),u(["_update","_onMapClick"],this),!e){e=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 o=i.createNS("http://www.w3.org/2000/svg","g");o.setAttributeNS(null,"stroke","none"),o.setAttributeNS(null,"stroke-width","1"),o.setAttributeNS(null,"fill","none"),o.setAttributeNS(null,"fill-rule","evenodd");var s=i.createNS("http://www.w3.org/2000/svg","g");s.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 c=0,f=[{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"}];c<f.length;c++){var h=f[c],p=i.createNS("http://www.w3.org/2000/svg","ellipse");p.setAttributeNS(null,"opacity","0.04"),p.setAttributeNS(null,"cx","10.5"),p.setAttributeNS(null,"cy","5.80029008"),p.setAttributeNS(null,"rx",h.rx),p.setAttributeNS(null,"ry",h.ry),l.appendChild(p)}var d=i.createNS("http://www.w3.org/2000/svg","g");d.setAttributeNS(null,"fill","#3FB1CE");var y=i.createNS("http://www.w3.org/2000/svg","path");y.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"),d.appendChild(y);var m=i.createNS("http://www.w3.org/2000/svg","g");m.setAttributeNS(null,"opacity","0.25"),m.setAttributeNS(null,"fill","#000000");var v=i.createNS("http://www.w3.org/2000/svg","path");v.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(v);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 b=i.createNS("http://www.w3.org/2000/svg","g");b.setAttributeNS(null,"transform","translate(8.0, 8.0)");var x=i.createNS("http://www.w3.org/2000/svg","circle");x.setAttributeNS(null,"fill","#000000"),x.setAttributeNS(null,"opacity","0.25"),x.setAttributeNS(null,"cx","5.5"),x.setAttributeNS(null,"cy","5.5"),x.setAttributeNS(null,"r","5.4999962");var _=i.createNS("http://www.w3.org/2000/svg","circle");_.setAttributeNS(null,"fill","#FFFFFF"),_.setAttributeNS(null,"cx","5.5"),_.setAttributeNS(null,"cy","5.5"),_.setAttributeNS(null,"r","5.4999962"),b.appendChild(x),b.appendChild(_),s.appendChild(l),s.appendChild(d),s.appendChild(m),s.appendChild(g),s.appendChild(b),r.appendChild(s),e.appendChild(r)}e.classList.add("mapboxgl-marker"),this._element=e,this._popup=null}var e,n,l;return e=t,(n=[{key:"addTo",value: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}},{key:"remove",value: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}},{key:"getLngLat",value:function(){return this._lngLat}},{key:"setLngLat",value:function(t){return this._lngLat=o.convert(t),this._pos=null,this._popup&&this._popup.setLngLat(this._lngLat),this._update(),this}},{key:"getElement",value:function(){return this._element}},{key:"setPopup",value: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._lngLat&&this._popup.setLngLat(this._lngLat)),this}},{key:"_onMapClick",value:function(t){var e=t.originalEvent.target,n=this._element;this._popup&&(e===n||n.contains(e))&&this.togglePopup()}},{key:"getPopup",value:function(){return this._popup}},{key:"togglePopup",value:function(){var t=this._popup;return t?(t.isOpen()?t.remove():t.addTo(this._map),this):this}},{key:"_update",value:function(t){this._map&&(this._map.transform.renderWorldCopies&&(this._lngLat=s(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(".concat(this._pos.x,"px, ").concat(this._pos.y,"px)")))}},{key:"getOffset",value:function(){return this._offset}},{key:"setOffset",value:function(t){return this._offset=a.convert(t),this._update(),this}}])&&r(e.prototype,n),l&&r(e,l),t}();t.exports=l},function(t,e,n){var r=n(21);t.exports=function(t,e,n){if(t=new r(t.lng,t.lat),e){var i=new r(t.lng-360,t.lat),o=new r(t.lng+360,t.lat),a=n.locationPoint(t).distSqr(e);n.locationPoint(i).distSqr(e)<a?t=i:n.locationPoint(o).distSqr(e)<a&&(t=o)}for(;Math.abs(t.lng-n.center.lng)>180;){var s=n.locationPoint(t);if(s.x>=0&&s.y>=0&&s.x<=n.width&&s.y<=n.height)break;t.lng>n.center.lng?t.lng-=360:t.lng+=360}return t}},function(t,e,n){t.exports=n(71)},function(t){t.exports={name:"mapbox-gl",description:"A WebGL interactive maps library",version:"2.1.3",main:"dist/mapbox-gl.js",module:"dist/mapbox-gl.js",style:"dist/mapbox-gl.css",license:"SEE LICENSE IN LICENSE.txt",repository:{type:"git",url:"git://github.com/mapbox/mapbox-gl-js.git"},engines:{node:">=6.4.0"},dependencies:{"@mapbox/gl-matrix":"^0.0.1","@mapbox/mapbox-gl-supported":"^1.3.0","@mapbox/point-geometry":"^0.1.0","@mapbox/shelf-pack":"=3.1.0","@mapbox/sphericalmercator":"github:landtechnologies/sphericalmercator#24a1b89b4edc26fcfd6171d61c27e3a9ea2f885c","@mapbox/tiny-sdf":"^1.1.0","@mapbox/unitbezier":"^0.0.0","@mapbox/vector-tile":"^1.3.0","@mapbox/whoots-js":"^3.0.0",brfs:"^1.4.0",bubleify:"^0.7.0",csscolorparser:"~1.0.2",earcut:"^2.1.3","geojson-rewind":"^0.3.0","geojson-vt":"^3.0.0","gray-matter":"^3.0.8","grid-index":"^1.0.0","jsonlint-lines-primitives":"~1.6.0","mapbox-gl-supported":"^1.2.0",minimist:"0.0.8","package-json-versionify":"^1.0.2",pbf:"^3.0.5","point-geometry":"^0.0.0",quickselect:"^1.0.0",rw:"^1.3.3","shuffle-seed":"^1.1.6","sort-object":"^0.3.2",supercluster:"^2.3.0",through2:"^2.0.3",tinyqueue:"^1.1.0",unassertify:"^2.0.0",unflowify:"^1.0.0","vt-pbf":"^3.0.1",webworkify:"^1.5.0"},devDependencies:{"@babel/cli":"^7.4.4","@babel/core":"^7.4.5","@babel/plugin-proposal-class-properties":"^7.4.4","@babel/plugin-transform-flow-strip-types":"^7.4.4","@babel/preset-env":"^7.4.5","@mapbox/batfish":"^0.13.3","@mapbox/mapbox-gl-rtl-text":"^0.1.1","@mapbox/mapbox-gl-test-suite":"file:test/integration","babel-eslint":"^7.0.0","babel-loader":"^8.0.6","babel-preset-es2015":"^6.24.1",benchmark:"~2.1.0",browserify:"^14.0.0",coveralls:"^2.11.8",d3:"^4.12.0",derequire:"^2.0.6",documentation:"5.3.3",ejs:"^2.5.7",envify:"^4.0.0",eslint:"4.1.1","eslint-config-mourner":"^2.0.0","eslint-plugin-flowtype":"^2.34.0","eslint-plugin-html":"^3.0.0","eslint-plugin-node":"^5.1.1","eslint-plugin-react":"^7.3.0","execcommand-copy":"^1.1.0","flow-bin":"^0.62.0","flow-coverage-report":"^0.3.0","flow-remove-types":"^1.0.4","github-slugger":"^1.1.1",gl:"^4.0.1",glob:"^7.0.3","in-publish":"^2.0.0","is-builtin-module":"^1.0.0",jsdom:"^11.2.0","json-stringify-pretty-compact":"^1.0.4",lodash:"^4.16.0",minifyify:"^7.0.1","mock-geolocation":"^1.0.11","npm-run-all":"^4.0.1",nyc:"^10.1.2","object.entries":"^1.0.4",pngjs:"^3.0.0",prismjs:"^1.8.1","prop-types":"^15.6.0",proxyquire:"^1.7.9","raw-loader":"^0.5.1",react:"^16.0.0","react-dom":"^16.0.0","react-helmet":"^5.2.0",remark:"^8.0.0","remark-html":"^5.0.1","remark-react":"^4.0.1",request:"^2.79.0",sinon:"^2.1.0",slugg:"^1.2.1",st:"^1.2.0",stylelint:"^7.10.1",tap:"^10.3.0",watchify:"^3.7.0",webpack:"^4.35.0","webpack-cli":"^3.3.5","worker-loader":"^2.0.0"},browserify:{transform:["unflowify",["bubleify",{bubleError:!0,transforms:{dangerousForOf:!0},objectAssign:"Object.assign"}],"package-json-versionify","unassertify","brfs","./build/minifyify_style_spec","./build/strictify"]},browser:{"./src/util/window.js":"./src/util/browser/window.js","./src/util/web_worker.js":"./src/util/browser/web_worker.js"},scripts:{"build-dev":"browserify src/index.js --debug --ignore-transform unassertify --standalone mapboxgl > dist/mapbox-gl-dev.js && tap --no-coverage test/build/dev.test.js","watch-dev":"watchify src/index.js --debug --ignore-transform unassertify --standalone mapboxgl --outfile dist/mapbox-gl-dev.js --verbose","watch-style-property-editor":"watchify debug/style_property_editor.js --debug -o debug/style_property_editor_generated.js --standalone StylePropertyEditor --verbose","build-min":"browserify src/index.js --debug --plugin [minifyify --map mapbox-gl.js.map --output dist/mapbox-gl.js.map] --standalone mapboxgl | derequire > dist/mapbox-gl.js && tap --no-coverage test/build/min.test.js","build-token":"browserify debug/access_token.js --debug --transform envify > debug/access_token_generated.js","build-benchmarks":'BENCHMARK_VERSION="$(git rev-parse --abbrev-ref HEAD) $(git rev-parse --short=7 HEAD)" browserify bench/benchmarks.js --debug --transform envify --outfile bench/benchmarks_generated.js --verbose',"watch-benchmarks":'BENCHMARK_VERSION="$(git rev-parse --abbrev-ref HEAD) $(git rev-parse --short=7 HEAD)" watchify bench/benchmarks.js --debug --transform envify --outfile bench/benchmarks_generated.js --verbose',"watch-benchmarks-view":"watchify bench/benchmarks_view.js --debug --outfile bench/benchmarks_view_generated.js --verbose","start-server":"st --no-cache --localhost --port 9966 --index index.html .",start:"run-p build-token watch-dev watch-style-property-editor watch-benchmarks watch-benchmarks-view start-server","start-debug":"run-p build-token watch-dev watch-style-property-editor start-server","start-bench":"run-p build-token watch-benchmarks watch-benchmarks-view start-server","build-docs":"documentation build --github --format json --config ./docs/documentation.yml --output docs/components/api.json src/index.js",build:"run-s build-docs && DEPLOY_ENV=production batfish build # invoked by publisher when publishing docs on the mb-pages branch","start-docs":"run-s build-min build-docs && DEPLOY_ENV=local batfish start",lint:"eslint --cache --ignore-path .gitignore src test bench docs docs/pages/example/*.html debug/*.html","lint-docs":"documentation lint src/index.js","lint-css":"stylelint 'dist/mapbox-gl.css'","open-changed-examples":"git diff --name-only mb-pages HEAD -- docs/pages/example/*.html | awk '{print \"http://127.0.0.1:4000/mapbox-gl-js/example/\" substr($0,33,length($0)-37)}' | xargs open",test:"run-s lint lint-css test-flow test-unit","test-suite":"run-s test-render test-query","test-suite-clean":'find test/integration/{render,query}-tests -mindepth 2 -type d  -not \\( -exec test -e "{}/style.json" \\; \\) -print | xargs -t rm -r',"test-unit":"tap --reporter classic --no-coverage test/unit","test-render":"node --max-old-space-size=2048 test/render.test.js","test-query":"node test/query.test.js","test-expressions":"node test/expression.test.js","test-flow":"node build/generate-flow-typed-style-spec && flow .","test-flow-cov":"flow-coverage-report -i 'src/**/*.js' -t html","test-cov":"nyc --require=flow-remove-types/register --reporter=text-summary --reporter=lcov --cache run-s test-unit test-expressions test-query test-render",prepublish:"in-publish && run-s build-dev build-min || not-in-publish",codegen:"node build/generate-style-code.js && flow-node build/generate-struct-arrays.js"},bin:{"gl-style-migrate":"src/style-spec/bin/gl-style-migrate","gl-style-validate":"src/style-spec/bin/gl-style-validate","gl-style-format":"src/style-spec/bin/gl-style-format","gl-style-composite":"src/style-spec/bin/gl-style-composite"},files:["build/","dist/","flow-typed/","src/",".flowconfig"]}},function(t,e,n){function r(t){return(r="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t})(t)}function i(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,r.key,r)}}function o(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}function a(t,e,n){return(a="undefined"!=typeof Reflect&&Reflect.get?Reflect.get:function(t,e,n){var r=function(t,e){for(;!Object.prototype.hasOwnProperty.call(t,e)&&null!==(t=s(t)););return t}(t,e);if(r){var i=Object.getOwnPropertyDescriptor(r,e);return i.get?i.get.call(n):i.value}})(t,e,n||t)}function s(t){return(s=Object.setPrototypeOf?Object.getPrototypeOf:function(t){return t.__proto__||Object.getPrototypeOf(t)})(t)}function u(t,e){return(u=Object.setPrototypeOf||function(t,e){return t.__proto__=e,t})(t,e)}var l=n(0),c=n(2),f=n(5),h=n(5),p=h.HTMLImageElement,d=h.HTMLElement,y=n(9),m=n(16),v=n(53),g=n(61),b=n(124),x=n(281),_=n(283),w=n(285),k=n(292),S=n(21),T=n(39),A=n(3),E=n(128),z=n(293),C=n(72),P=n(33).RGBAImage;n(294);var O={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,fadeDuration:300},I=function(t){function e(t){var n;if(function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,e),null!=(t=l.extend({},O,t)).minZoom&&null!=t.maxZoom&&t.minZoom>t.maxZoom)throw new Error("maxZoom must be greater than minZoom");var i=new x(t.minZoom,t.maxZoom,t.renderWorldCopies);(n=function(t,e){return!e||"object"!==r(e)&&"function"!=typeof e?o(t):e}(this,s(e).call(this,i,t)))._interactive=t.interactive,n._maxTileCacheSize=t.maxTileCacheSize,n._failIfMajorPerformanceCaveat=t.failIfMajorPerformanceCaveat,n._preserveDrawingBuffer=t.preserveDrawingBuffer,n._trackResize=t.trackResize,n._bearingSnap=t.bearingSnap,n._refreshExpiredTiles=t.refreshExpiredTiles,n._fadeDuration=t.fadeDuration,n._crossFadingFactor=1;var a=t.transformRequest;if(n._transformRequest=a?function(t,e){return a(t,e)||{url:t}}:function(t){return{url:t}},"string"==typeof t.container){var u=f.document.getElementById(t.container);if(!u)throw new Error("Container '".concat(t.container,"' not found."));n._container=u}else{if(!(t.container instanceof d))throw new Error("Invalid type: 'container' must be a String or HTMLElement.");n._container=t.container}return t.maxBounds&&n.setMaxBounds(t.maxBounds),l.bindAll(["_onWindowOnline","_onWindowResize","_contextLost","_contextRestored","_update","_render","_onData","_onDataLoading"],o(n)),n._setupContainer(),n._setupPainter(),n.on("move",n._update.bind(o(n),!1)),n.on("zoom",n._update.bind(o(n),!0)),n.on("move",function(){n._rerender()}),void 0!==f&&(f.addEventListener("online",n._onWindowOnline,!1),f.addEventListener("resize",n._onWindowResize,!1)),w(o(n),t),n._hash=t.hash&&(new _).addTo(o(n)),n._hash&&n._hash._onHashChange()||n.jumpTo({center:t.center,zoom:t.zoom,bearing:t.bearing,pitch:t.pitch}),n.resize(),t.style&&n.setStyle(t.style,{localIdeographFontFamily:t.localIdeographFontFamily}),t.attributionControl&&n.addControl(new E),n.addControl(new z,t.logoPosition),n.on("style.load",function(){this.transform.unmodified&&this.jumpTo(this.style.stylesheet)}),n.on("data",n._onData),n.on("dataloading",n._onDataLoading),n}var n,h,I;return function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),e&&u(t,e)}(e,k),n=e,(h=[{key:"addControl",value:function(t,e){void 0===e&&t.getDefaultPosition&&(e=t.getDefaultPosition()),void 0===e&&(e="top-right");var n=t.onAdd(this),r=this._controlPositions[e];return-1!==e.indexOf("bottom")?r.insertBefore(n,r.firstChild):r.appendChild(n),this}},{key:"removeControl",value:function(t){return t.onRemove(this),this}},{key:"resize",value:function(){var t=this._containerDimensions(),e=t[0],n=t[1];return this._resizeCanvas(e,n),this.transform.resize(e,n),this.painter.resize(e,n),this.fire("movestart").fire("move").fire("resize").fire("moveend")}},{key:"getBounds",value:function(){var t=new T(this.transform.pointLocation(new A(0,this.transform.height)),this.transform.pointLocation(new A(this.transform.width,0)));return(this.transform.angle||this.transform.pitch)&&(t.extend(this.transform.pointLocation(new A(this.transform.size.x,0))),t.extend(this.transform.pointLocation(new A(0,this.transform.size.y)))),t}},{key:"getMaxBounds",value:function(){return this.transform.latRange&&2===this.transform.latRange.length&&this.transform.lngRange&&2===this.transform.lngRange.length?new T([this.transform.lngRange[0],this.transform.latRange[0]],[this.transform.lngRange[1],this.transform.latRange[1]]):null}},{key:"setMaxBounds",value:function(t){if(t){var e=T.convert(t);this.transform.lngRange=[e.getWest(),e.getEast()],this.transform.latRange=[e.getSouth(),e.getNorth()],this.transform._constrain(),this._update()}else null==t&&(this.transform.lngRange=null,this.transform.latRange=null,this._update());return this}},{key:"setMinZoom",value:function(t){if((t=null==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 ".concat(0," and the current maxZoom, inclusive"))}},{key:"getMinZoom",value:function(){return this.transform.minZoom}},{key:"setMaxZoom",value:function(t){if((t=null==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")}},{key:"getMaxZoom",value:function(){return this.transform.maxZoom}},{key:"project",value:function(t){return this.transform.locationPoint(S.convert(t))}},{key:"unproject",value:function(t){return this.transform.pointLocation(A.convert(t))}},{key:"on",value:function(t,n,r){var i=this;if(void 0===r)return a(s(e.prototype),"on",this).call(this,t,n);var o=function(){if("mouseenter"===t||"mouseover"===t){var e=!1;return{layer:n,listener:r,delegates:{mousemove:function(o){var a=i.getLayer(n)?i.queryRenderedFeatures(o.point,{layers:[n]}):[];a.length?e||(e=!0,r.call(i,l.extend({features:a},o,{type:t}))):e=!1},mouseout:function(){e=!1}}}}if("mouseleave"===t||"mouseout"===t){var o=!1;return{layer:n,listener:r,delegates:{mousemove:function(e){(i.getLayer(n)?i.queryRenderedFeatures(e.point,{layers:[n]}):[]).length?o=!0:o&&(o=!1,r.call(i,l.extend({},e,{type:t})))},mouseout:function(e){o&&(o=!1,r.call(i,l.extend({},e,{type:t})))}}}}var a,s,u;return{layer:n,listener:r,delegates:(a={},s=t,u=function(t){var e=i.getLayer(n)?i.queryRenderedFeatures(t.point,{layers:[n]}):[];e.length&&r.call(i,l.extend({features:e},t))},s in a?Object.defineProperty(a,s,{value:u,enumerable:!0,configurable:!0,writable:!0}):a[s]=u,a)}}();for(var u in this._delegatedListeners=this._delegatedListeners||{},this._delegatedListeners[t]=this._delegatedListeners[t]||[],this._delegatedListeners[t].push(o),o.delegates)this.on(u,o.delegates[u]);return this}},{key:"off",value:function(t,n,r){if(void 0===r)return a(s(e.prototype),"off",this).call(this,t,n);if(this._delegatedListeners&&this._delegatedListeners[t])for(var i=this._delegatedListeners[t],o=0;o<i.length;o++){var u=i[o];if(u.layer===n&&u.listener===r){for(var l in u.delegates)this.off(l,u.delegates[l]);return i.splice(o,1),this}}return this}},{key:"queryRenderedFeatures",value:function(t,e){var n;return 2===arguments.length?(t=arguments[0],e=arguments[1]):1===arguments.length&&((n=arguments[0])instanceof A||Array.isArray(n))?(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):[]}},{key:"_makeQueryGeometry",value:function(t){var e,n=this;if(void 0===t&&(t=[A.convert([0,0]),A.convert([this.transform.width,this.transform.height])]),t instanceof A||"number"==typeof t[0]){e=[A.convert(t)]}else{var r=[A.convert(t[0]),A.convert(t[1])];e=[r[0],new A(r[1].x,r[0].y),r[1],new A(r[0].x,r[1].y),r[0]]}return e=e.map(function(t){return n.transform.pointCoordinate(t)})}},{key:"querySourceFeatures",value:function(t,e){return this.style.querySourceFeatures(t,e)}},{key:"setStyle",value:function(t,e){if((!e||!1!==e.diff&&!e.localIdeographFontFamily)&&this.style&&t&&"object"===r(t))try{return this.style.setState(t)&&this._update(!0),this}catch(t){l.warnOnce("Unable to perform style diff: ".concat(t.message||t.error||t,".  Rebuilding the style from scratch."))}return this.style&&(this.style.setEventedParent(null),this.style._remove()),t?(this.style=new v(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)}},{key:"getStyle",value:function(){if(this.style)return this.style.serialize()}},{key:"isStyleLoaded",value:function(){return this.style?this.style.loaded():l.warnOnce("There is no style added to the map.")}},{key:"addSource",value:function(t,e){return this.style.addSource(t,e),this._update(!0),this}},{key:"isSourceLoaded",value: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 '".concat(t,"'"))})}},{key:"areTilesLoaded",value:function(){var t=this.style&&this.style.sourceCaches;for(var e in t){var n=t[e]._tiles;for(var r in n){var i=n[r];if("loaded"!==i.state&&"errored"!==i.state)return!1}}return!0}},{key:"addSourceType",value:function(t,e,n){return this.style.addSourceType(t,e,n)}},{key:"removeSource",value:function(t){return this.style.removeSource(t),this._update(!0),this}},{key:"getSource",value:function(t){return this.style.getSource(t)}},{key:"addImage",value:function(t,e){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{},r=n.pixelRatio,i=void 0===r?1:r,o=n.sdf,a=void 0!==o&&o;if(e instanceof p){var s=c.getImageData(e),u=s.width,l=s.height,f=s.data;this.style.addImage(t,{data:new P({width:u,height:l},f),pixelRatio:i,sdf:a})}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`")});var h=e.width,d=e.height,y=e.data;this.style.addImage(t,{data:new P({width:h,height:d},y.slice(0)),pixelRatio:i,sdf:a})}}},{key:"hasImage",value:function(t){return t?!!this.style.getImage(t):(this.fire("error",{error:new Error("Missing required image id")}),!1)}},{key:"removeImage",value:function(t){this.style.removeImage(t)}},{key:"loadImage",value:function(t,e){m.getImage(this._transformRequest(t,m.ResourceType.Image),e)}},{key:"addLayer",value:function(t,e){return this.style.addLayer(t,e),this._update(!0),this}},{key:"moveLayer",value:function(t,e){return this.style.moveLayer(t,e),this._update(!0),this}},{key:"removeLayer",value:function(t){return this.style.removeLayer(t),this._update(!0),this}},{key:"getLayer",value:function(t){return this.style.getLayer(t)}},{key:"setFilter",value:function(t,e){return this.style.setFilter(t,e),this._update(!0),this}},{key:"setLayerZoomRange",value:function(t,e,n){return this.style.setLayerZoomRange(t,e,n),this._update(!0),this}},{key:"getFilter",value:function(t){return this.style.getFilter(t)}},{key:"setPaintProperty",value:function(t,e,n){return this.style.setPaintProperty(t,e,n),this._update(!0),this}},{key:"getPaintProperty",value:function(t,e){return this.style.getPaintProperty(t,e)}},{key:"setLayoutProperty",value:function(t,e,n){return this.style.setLayoutProperty(t,e,n),this._update(!0),this}},{key:"getLayoutProperty",value:function(t,e){return this.style.getLayoutProperty(t,e)}},{key:"setLight",value:function(t){return this.style.setLight(t),this._update(!0),this}},{key:"getLight",value:function(){return this.style.getLight()}},{key:"getContainer",value:function(){return this._container}},{key:"getCanvasContainer",value:function(){return this._canvasContainer}},{key:"getCanvas",value:function(){return this._canvas}},{key:"_containerDimensions",value:function(){var t=0,e=0;return this._container&&(t=this._container.offsetWidth||400,e=this._container.offsetHeight||300),[t,e]}},{key:"_setupContainer",value:function(){var t=this._container;t.classList.add("mapboxgl-map"),(this._missingCSSContainer=y.create("div","mapboxgl-missing-css",t)).innerHTML="Missing Mapbox GL JS CSS";var e=this._canvasContainer=y.create("div","mapboxgl-canvas-container",t);this._interactive&&e.classList.add("mapboxgl-interactive"),this._canvas=y.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 n=this._containerDimensions();this._resizeCanvas(n[0],n[1]);var r=this._controlContainer=y.create("div","mapboxgl-control-container",t),i=this._controlPositions={};["top-left","top-right","bottom-left","bottom-right"].forEach(function(t){i[t]=y.create("div","mapboxgl-ctrl-".concat(t),r)})}},{key:"_resizeCanvas",value:function(t,e){var n=f.devicePixelRatio||1;this._canvas.width=n*t,this._canvas.height=n*e,this._canvas.style.width="".concat(t,"px"),this._canvas.style.height="".concat(e,"px")}},{key:"_setupPainter",value:function(){var t=l.extend({failIfMajorPerformanceCaveat:this._failIfMajorPerformanceCaveat,preserveDrawingBuffer:this._preserveDrawingBuffer},C.webGLContextAttributes),e=this._canvas.getContext("webgl",t)||this._canvas.getContext("experimental-webgl",t);e?this.painter=new b(e,this.transform):this.fire("error",{error:new Error("Failed to initialize WebGL")})}},{key:"_contextLost",value:function(t){t.preventDefault(),this._frameId&&(c.cancelFrame(this._frameId),this._frameId=null),this.fire("webglcontextlost",{originalEvent:t})}},{key:"_contextRestored",value:function(t){this._setupPainter(),this.resize(),this._update(),this.fire("webglcontextrestored",{originalEvent:t})}},{key:"loaded",value:function(){return!this._styleDirty&&!this._sourcesDirty&&!(!this.style||!this.style.loaded())}},{key:"_update",value:function(t){this.style&&(this._styleDirty=this._styleDirty||t,this._sourcesDirty=!0,this._rerender())}},{key:"_render",value:function(){this.isEasing()&&this._updateEase();var t=!1;if(this.style&&this._styleDirty){this._styleDirty=!1;var e=this.transform.zoom,n=c.now();this.style.zoomHistory.update(e,n);var r=new g(e,{now:n,fadeDuration:this._fadeDuration,zoomHistory:this.style.zoomHistory,transition:this.style.getTransition()}),i=r.crossFadingFactor();1===i&&i===this._crossFadingFactor||(t=!0,this._crossFadingFactor=i),this.style.update(r)}return 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._fadeDuration),this.painter.render(this.style,{showTileBoundaries:this.showTileBoundaries,showOverdrawInspector:this._showOverdrawInspector,rotating:this.rotating,zooming:this.zooming,fadeDuration:this._fadeDuration}),this.fire("render"),this.loaded()&&!this._loaded&&(this._loaded=!0,this.fire("load")),this.style&&(this.style.hasTransitions()||t)&&(this._styleDirty=!0),(this._sourcesDirty||this._repaint||this._styleDirty||this._placementDirty||this.isEasing())&&this._rerender(),this}},{key:"remove",value:function(){this._hash&&this._hash.remove(),c.cancelFrame(this._frameId),this._frameId=null,this.setStyle(null),void 0!==f&&(f.removeEventListener("resize",this._onWindowResize,!1),f.removeEventListener("online",this._onWindowOnline,!1));var t=this.painter.context.gl.getExtension("WEBGL_lose_context");t&&t.loseContext(),j(this._canvasContainer),j(this._controlContainer),j(this._missingCSSContainer),this._container.classList.remove("mapboxgl-map"),this.fire("remove")}},{key:"_rerender",value:function(){var t=this;this.style&&!this._frameId&&(this._frameId=c.frame(function(){t._frameId=null,t._render()}))}},{key:"_onWindowOnline",value:function(){this._update()}},{key:"_onWindowResize",value:function(){this._trackResize&&this.stop().resize()._update()}},{key:"_onData",value:function(t){this._update("style"===t.dataType),this.fire("".concat(t.dataType,"data"),t)}},{key:"_onDataLoading",value:function(t){this.fire("".concat(t.dataType,"dataloading"),t)}},{key:"showTileBoundaries",get:function(){return!!this._showTileBoundaries},set:function(t){this._showTileBoundaries!==t&&(this._showTileBoundaries=t,this._update())}},{key:"showCollisionBoxes",get:function(){return!!this._showCollisionBoxes},set:function(t){this._showCollisionBoxes!==t&&(this._showCollisionBoxes=t,t?this.style._generateCollisionBoxes():this._update())}},{key:"showOverdrawInspector",get:function(){return!!this._showOverdrawInspector},set:function(t){this._showOverdrawInspector!==t&&(this._showOverdrawInspector=t,this._update())}},{key:"repaint",get:function(){return!!this._repaint},set:function(t){this._repaint=t,this._update()}},{key:"vertices",get:function(){return!!this._vertices},set:function(t){this._vertices=t,this._update()}}])&&i(n.prototype,h),I&&i(n,I),e}();function j(t){t.parentNode&&t.parentNode.removeChild(t)}t.exports=I},function(t,e){var n;n=function(){return this}();try{n=n||new Function("return this")()}catch(t){"object"==typeof window&&(n=window)}t.exports=n},function(t,e,n){"use strict";
 | 
						||
/*
 | 
						||
object-assign
 | 
						||
(c) Sindre Sorhus
 | 
						||
@license MIT
 | 
						||
*/var r=Object.getOwnPropertySymbols,i=Object.prototype.hasOwnProperty,o=Object.prototype.propertyIsEnumerable;t.exports=function(){try{if(!Object.assign)return!1;var t=new String("abc");if(t[5]="de","5"===Object.getOwnPropertyNames(t)[0])return!1;for(var e={},n=0;n<10;n++)e["_"+String.fromCharCode(n)]=n;if("0123456789"!==Object.getOwnPropertyNames(e).map(function(t){return e[t]}).join(""))return!1;var r={};return"abcdefghijklmnopqrst".split("").forEach(function(t){r[t]=t}),"abcdefghijklmnopqrst"===Object.keys(Object.assign({},r)).join("")}catch(t){return!1}}()?Object.assign:function(t,e){for(var n,a,s=function(t){if(null==t)throw new TypeError("Object.assign cannot be called with null or undefined");return Object(t)}(t),u=1;u<arguments.length;u++){for(var l in n=Object(arguments[u]))i.call(n,l)&&(s[l]=n[l]);if(r){a=r(n);for(var c=0;c<a.length;c++)o.call(n,a[c])&&(s[a[c]]=n[a[c]])}}return s}},function(t,e,n){(function(t){var r=Object.getOwnPropertyDescriptors||function(t){for(var e=Object.keys(t),n={},r=0;r<e.length;r++)n[e[r]]=Object.getOwnPropertyDescriptor(t,e[r]);return n},i=/%[sdj%]/g;e.format=function(t){if(!v(t)){for(var e=[],n=0;n<arguments.length;n++)e.push(s(arguments[n]));return e.join(" ")}n=1;for(var r=arguments,o=r.length,a=String(t).replace(i,function(t){if("%%"===t)return"%";if(n>=o)return t;switch(t){case"%s":return String(r[n++]);case"%d":return Number(r[n++]);case"%j":try{return JSON.stringify(r[n++])}catch(t){return"[Circular]"}default:return t}}),u=r[n];n<o;u=r[++n])y(u)||!x(u)?a+=" "+u:a+=" "+s(u);return a},e.deprecate=function(n,r){if(void 0!==t&&!0===t.noDeprecation)return n;if(void 0===t)return function(){return e.deprecate(n,r).apply(this,arguments)};var i=!1;return function(){if(!i){if(t.throwDeprecation)throw new Error(r);t.traceDeprecation?console.trace(r):console.error(r),i=!0}return n.apply(this,arguments)}};var o,a={};function s(t,n){var r={seen:[],stylize:l};return arguments.length>=3&&(r.depth=arguments[2]),arguments.length>=4&&(r.colors=arguments[3]),d(n)?r.showHidden=n:n&&e._extend(r,n),g(r.showHidden)&&(r.showHidden=!1),g(r.depth)&&(r.depth=2),g(r.colors)&&(r.colors=!1),g(r.customInspect)&&(r.customInspect=!0),r.colors&&(r.stylize=u),c(r,t,r.depth)}function u(t,e){var n=s.styles[e];return n?"["+s.colors[n][0]+"m"+t+"["+s.colors[n][1]+"m":t}function l(t,e){return t}function c(t,n,r){if(t.customInspect&&n&&k(n.inspect)&&n.inspect!==e.inspect&&(!n.constructor||n.constructor.prototype!==n)){var i=n.inspect(r,t);return v(i)||(i=c(t,i,r)),i}var o=function(t,e){if(g(e))return t.stylize("undefined","undefined");if(v(e)){var n="'"+JSON.stringify(e).replace(/^"|"$/g,"").replace(/'/g,"\\'").replace(/\\"/g,'"')+"'";return t.stylize(n,"string")}if(m(e))return t.stylize(""+e,"number");if(d(e))return t.stylize(""+e,"boolean");if(y(e))return t.stylize("null","null")}(t,n);if(o)return o;var a=Object.keys(n),s=function(t){var e={};return t.forEach(function(t,n){e[t]=!0}),e}(a);if(t.showHidden&&(a=Object.getOwnPropertyNames(n)),w(n)&&(a.indexOf("message")>=0||a.indexOf("description")>=0))return f(n);if(0===a.length){if(k(n)){var u=n.name?": "+n.name:"";return t.stylize("[Function"+u+"]","special")}if(b(n))return t.stylize(RegExp.prototype.toString.call(n),"regexp");if(_(n))return t.stylize(Date.prototype.toString.call(n),"date");if(w(n))return f(n)}var l,x="",S=!1,T=["{","}"];(p(n)&&(S=!0,T=["[","]"]),k(n))&&(x=" [Function"+(n.name?": "+n.name:"")+"]");return b(n)&&(x=" "+RegExp.prototype.toString.call(n)),_(n)&&(x=" "+Date.prototype.toUTCString.call(n)),w(n)&&(x=" "+f(n)),0!==a.length||S&&0!=n.length?r<0?b(n)?t.stylize(RegExp.prototype.toString.call(n),"regexp"):t.stylize("[Object]","special"):(t.seen.push(n),l=S?function(t,e,n,r,i){for(var o=[],a=0,s=e.length;a<s;++a)E(e,String(a))?o.push(h(t,e,n,r,String(a),!0)):o.push("");return i.forEach(function(i){i.match(/^\d+$/)||o.push(h(t,e,n,r,i,!0))}),o}(t,n,r,s,a):a.map(function(e){return h(t,n,r,s,e,S)}),t.seen.pop(),function(t,e,n){if(t.reduce(function(t,e){return 0,e.indexOf("\n")>=0&&0,t+e.replace(/\u001b\[\d\d?m/g,"").length+1},0)>60)return n[0]+(""===e?"":e+"\n ")+" "+t.join(",\n  ")+" "+n[1];return n[0]+e+" "+t.join(", ")+" "+n[1]}(l,x,T)):T[0]+x+T[1]}function f(t){return"["+Error.prototype.toString.call(t)+"]"}function h(t,e,n,r,i,o){var a,s,u;if((u=Object.getOwnPropertyDescriptor(e,i)||{value:e[i]}).get?s=u.set?t.stylize("[Getter/Setter]","special"):t.stylize("[Getter]","special"):u.set&&(s=t.stylize("[Setter]","special")),E(r,i)||(a="["+i+"]"),s||(t.seen.indexOf(u.value)<0?(s=y(n)?c(t,u.value,null):c(t,u.value,n-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")),g(a)){if(o&&i.match(/^\d+$/))return s;(a=JSON.stringify(""+i)).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 p(t){return Array.isArray(t)}function d(t){return"boolean"==typeof t}function y(t){return null===t}function m(t){return"number"==typeof t}function v(t){return"string"==typeof t}function g(t){return void 0===t}function b(t){return x(t)&&"[object RegExp]"===S(t)}function x(t){return"object"==typeof t&&null!==t}function _(t){return x(t)&&"[object Date]"===S(t)}function w(t){return x(t)&&("[object Error]"===S(t)||t instanceof Error)}function k(t){return"function"==typeof t}function S(t){return Object.prototype.toString.call(t)}function T(t){return t<10?"0"+t.toString(10):t.toString(10)}e.debuglog=function(n){if(g(o)&&(o=t.env.NODE_DEBUG||""),n=n.toUpperCase(),!a[n])if(new RegExp("\\b"+n+"\\b","i").test(o)){var r=t.pid;a[n]=function(){var t=e.format.apply(e,arguments);console.error("%s %d: %s",n,r,t)}}else a[n]=function(){};return a[n]},e.inspect=s,s.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]},s.styles={special:"cyan",number:"yellow",boolean:"yellow",undefined:"grey",null:"bold",string:"green",date:"magenta",regexp:"red"},e.isArray=p,e.isBoolean=d,e.isNull=y,e.isNullOrUndefined=function(t){return null==t},e.isNumber=m,e.isString=v,e.isSymbol=function(t){return"symbol"==typeof t},e.isUndefined=g,e.isRegExp=b,e.isObject=x,e.isDate=_,e.isError=w,e.isFunction=k,e.isPrimitive=function(t){return null===t||"boolean"==typeof t||"number"==typeof t||"string"==typeof t||"symbol"==typeof t||void 0===t},e.isBuffer=n(138);var A=["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"];function E(t,e){return Object.prototype.hasOwnProperty.call(t,e)}e.log=function(){var t,n;console.log("%s - %s",(t=new Date,n=[T(t.getHours()),T(t.getMinutes()),T(t.getSeconds())].join(":"),[t.getDate(),A[t.getMonth()],n].join(" ")),e.format.apply(e,arguments))},e.inherits=n(139),e._extend=function(t,e){if(!e||!x(e))return t;for(var n=Object.keys(e),r=n.length;r--;)t[n[r]]=e[n[r]];return t};var z="undefined"!=typeof Symbol?Symbol("util.promisify.custom"):void 0;function C(t,e){if(!t){var n=new Error("Promise was rejected with a falsy value");n.reason=t,t=n}return e(t)}e.promisify=function(t){if("function"!=typeof t)throw new TypeError('The "original" argument must be of type Function');if(z&&t[z]){var e;if("function"!=typeof(e=t[z]))throw new TypeError('The "util.promisify.custom" argument must be of type Function');return Object.defineProperty(e,z,{value:e,enumerable:!1,writable:!1,configurable:!0}),e}function e(){for(var e,n,r=new Promise(function(t,r){e=t,n=r}),i=[],o=0;o<arguments.length;o++)i.push(arguments[o]);i.push(function(t,r){t?n(t):e(r)});try{t.apply(this,i)}catch(t){n(t)}return r}return Object.setPrototypeOf(e,Object.getPrototypeOf(t)),z&&Object.defineProperty(e,z,{value:e,enumerable:!1,writable:!1,configurable:!0}),Object.defineProperties(e,r(t))},e.promisify.custom=z,e.callbackify=function(e){if("function"!=typeof e)throw new TypeError('The "original" argument must be of type Function');function n(){for(var n=[],r=0;r<arguments.length;r++)n.push(arguments[r]);var i=n.pop();if("function"!=typeof i)throw new TypeError("The last argument must be of type Function");var o=this,a=function(){return i.apply(o,arguments)};e.apply(this,n).then(function(e){t.nextTick(a,null,e)},function(e){t.nextTick(C,e,a)})}return Object.setPrototypeOf(n,Object.getPrototypeOf(e)),Object.defineProperties(n,r(e)),n}}).call(this,n(137))},function(t,e){var n,r,i=t.exports={};function o(){throw new Error("setTimeout has not been defined")}function a(){throw new Error("clearTimeout has not been defined")}function s(t){if(n===setTimeout)return setTimeout(t,0);if((n===o||!n)&&setTimeout)return n=setTimeout,setTimeout(t,0);try{return n(t,0)}catch(e){try{return n.call(null,t,0)}catch(e){return n.call(this,t,0)}}}!function(){try{n="function"==typeof setTimeout?setTimeout:o}catch(t){n=o}try{r="function"==typeof clearTimeout?clearTimeout:a}catch(t){r=a}}();var u,l=[],c=!1,f=-1;function h(){c&&u&&(c=!1,u.length?l=u.concat(l):f=-1,l.length&&p())}function p(){if(!c){var t=s(h);c=!0;for(var e=l.length;e;){for(u=l,l=[];++f<e;)u&&u[f].run();f=-1,e=l.length}u=null,c=!1,function(t){if(r===clearTimeout)return clearTimeout(t);if((r===a||!r)&&clearTimeout)return r=clearTimeout,clearTimeout(t);try{r(t)}catch(e){try{return r.call(null,t)}catch(e){return r.call(this,t)}}}(t)}}function d(t,e){this.fun=t,this.array=e}function y(){}i.nextTick=function(t){var e=new Array(arguments.length-1);if(arguments.length>1)for(var n=1;n<arguments.length;n++)e[n-1]=arguments[n];l.push(new d(t,e)),1!==l.length||c||s(p)},d.prototype.run=function(){this.fun.apply(null,this.array)},i.title="browser",i.browser=!0,i.env={},i.argv=[],i.version="",i.versions={},i.on=y,i.addListener=y,i.once=y,i.off=y,i.removeListener=y,i.removeAllListeners=y,i.emit=y,i.prependListener=y,i.prependOnceListener=y,i.listeners=function(t){return[]},i.binding=function(t){throw new Error("process.binding is not supported")},i.cwd=function(){return"/"},i.chdir=function(t){throw new Error("process.chdir is not supported")},i.umask=function(){return 0}},function(t,e){t.exports=function(t){return t&&"object"==typeof t&&"function"==typeof t.copy&&"function"==typeof t.fill&&"function"==typeof t.readUInt8}},function(t,e){"function"==typeof Object.create?t.exports=function(t,e){t.super_=e,t.prototype=Object.create(e.prototype,{constructor:{value:t,enumerable:!1,writable:!0,configurable:!0}})}:t.exports=function(t,e){t.super_=e;var n=function(){};n.prototype=e.prototype,t.prototype=new n,t.prototype.constructor=t}},function(t){t.exports={$version:8,$root:{version:{required:!0,type:"enum",values:[8],doc:"Style specification version number. Must be 8.",example:8},name:{type:"string",doc:"A human-readable name for the style.",example:"Bright"},metadata:{type:"*",doc:"Arbitrary properties useful to track with the stylesheet, but do not influence rendering. Properties should be prefixed to avoid collisions, like 'mapbox:'."},center:{type:"array",value:"number",doc:"Default map center in longitude and latitude.  The style center will be used only if the map has not been positioned by other means (e.g. map options or user interaction).",example:[-73.9749,40.7736]},zoom:{type:"number",doc:"Default zoom level.  The style zoom will be used only if the map has not been positioned by other means (e.g. map options or user interaction).",example:12.5},bearing:{type:"number",default:0,period:360,units:"degrees",doc:'Default bearing, in degrees. The bearing is the compass direction that is "up"; for example, a bearing of 90° orients the map so that east is up. This value will be used only if the map has not been positioned by other means (e.g. map options or user interaction).',example:29},pitch:{type:"number",default:0,units:"degrees",doc:"Default pitch, in degrees. Zero is perpendicular to the surface, for a look straight down at the map, while a greater value like 60 looks ahead towards the horizon. The style pitch will be used only if the map has not been positioned by other means (e.g. map options or user interaction).",example:50},light:{type:"light",doc:"The global light source.",example:{anchor:"viewport",color:"white",intensity:.4}},sources:{required:!0,type:"sources",doc:"Data source specifications.",example:{"mapbox-streets":{type:"vector",url:"mapbox://mapbox.mapbox-streets-v6"}}},sprite:{type:"string",doc:"A base URL for retrieving the sprite image and metadata. The extensions `.png`, `.json` and scale factor `@2x.png` will be automatically appended. This property is required if any layer uses the `background-pattern`, `fill-pattern`, `line-pattern`, `fill-extrusion-pattern`, or `icon-image` properties.",example:"mapbox://sprites/mapbox/bright-v8"},glyphs:{type:"string",doc:"A URL template for loading signed-distance-field glyph sets in PBF format. The URL must include `{fontstack}` and `{range}` tokens. This property is required if any layer uses the `text-field` layout property.",example:"mapbox://fonts/mapbox/{fontstack}/{range}.pbf"},transition:{type:"transition",doc:"A global transition definition to use as a default across properties.",example:{duration:300,delay:0}},layers:{required:!0,type:"array",value:"layer",doc:"Layers will be drawn in the order of this array.",example:[{id:"water",source:"mapbox-streets","source-layer":"water",type:"fill",paint:{"fill-color":"#00ffff"}}]}},sources:{"*":{type:"source",doc:"Specification of a data source. For vector and raster sources, either TileJSON or a URL to a TileJSON must be provided. For image and video sources, a URL must be provided. For GeoJSON sources, a URL or inline GeoJSON must be provided."}},source:["source_vector","source_raster","source_raster_dem","source_geojson","source_video","source_image","source_canvas"],source_vector:{type:{required:!0,type:"enum",values:{vector:{doc:"A vector tile source."}},doc:"The type of the source."},url:{type:"string",doc:"A URL to a TileJSON resource. Supported protocols are `http:`, `https:`, and `mapbox://<mapid>`."},tiles:{type:"array",value:"string",doc:"An array of one or more tile source URLs, as in the TileJSON spec."},bounds:{type:"array",value:"number",length:4,default:[-180,-85.0511,180,85.0511],doc:"An array containing the longitude and latitude of the southwest and northeast corners of the source's bounding box in the following order: `[sw.lng, sw.lat, ne.lng, ne.lat]`. When this property is included in a source, no tiles outside of the given bounds are requested by Mapbox GL."},minzoom:{type:"number",default:0,doc:"Minimum zoom level for which tiles are available, as in the TileJSON spec."},maxzoom:{type:"number",default:22,doc:"Maximum zoom level for which tiles are available, as in the TileJSON spec. Data from tiles at the maxzoom are used when displaying the map at higher zoom levels."},attribution:{type:"string",doc:"Contains an attribution to be displayed when the map is shown to a user."},"*":{type:"*",doc:"Other keys to configure the data source."}},source_raster:{type:{required:!0,type:"enum",values:{raster:{doc:"A raster tile source."}},doc:"The type of the source."},url:{type:"string",doc:"A URL to a TileJSON resource. Supported protocols are `http:`, `https:`, and `mapbox://<mapid>`."},tiles:{type:"array",value:"string",doc:"An array of one or more tile source URLs, as in the TileJSON spec."},bounds:{type:"array",value:"number",length:4,default:[-180,-85.0511,180,85.0511],doc:"An array containing the longitude and latitude of the southwest and northeast corners of the source's bounding box in the following order: `[sw.lng, sw.lat, ne.lng, ne.lat]`. When this property is included in a source, no tiles outside of the given bounds are requested by Mapbox GL."},minzoom:{type:"number",default:0,doc:"Minimum zoom level for which tiles are available, as in the TileJSON spec."},maxzoom:{type:"number",default:22,doc:"Maximum zoom level for which tiles are available, as in the TileJSON spec. Data from tiles at the maxzoom are used when displaying the map at higher zoom levels."},tileSize:{type:"number",default:512,units:"pixels",doc:"The minimum visual size to display tiles for this layer. Only configurable for raster layers."},scheme:{type:"enum",values:{xyz:{doc:"Slippy map tilenames scheme."},tms:{doc:"OSGeo spec scheme."}},default:"xyz",doc:"Influences the y direction of the tile coordinates. The global-mercator (aka Spherical Mercator) profile is assumed."},attribution:{type:"string",doc:"Contains an attribution to be displayed when the map is shown to a user."},"*":{type:"*",doc:"Other keys to configure the data source."}},source_raster_dem:{type:{required:!0,type:"enum",values:{"raster-dem":{doc:"A raster DEM source using Mapbox Terrain RGB"}},doc:"The type of the source."},url:{type:"string",doc:"A URL to a TileJSON resource. Supported protocols are `http:`, `https:`, and `mapbox://<mapid>`."},tiles:{type:"array",value:"string",doc:"An array of one or more tile source URLs, as in the TileJSON spec."},bounds:{type:"array",value:"number",length:4,default:[-180,-85.0511,180,85.0511],doc:"An array containing the longitude and latitude of the southwest and northeast corners of the source's bounding box in the following order: `[sw.lng, sw.lat, ne.lng, ne.lat]`. When this property is included in a source, no tiles outside of the given bounds are requested by Mapbox GL."},minzoom:{type:"number",default:0,doc:"Minimum zoom level for which tiles are available, as in the TileJSON spec."},maxzoom:{type:"number",default:22,doc:"Maximum zoom level for which tiles are available, as in the TileJSON spec. Data from tiles at the maxzoom are used when displaying the map at higher zoom levels."},tileSize:{type:"number",default:512,units:"pixels",doc:"The minimum visual size to display tiles for this layer. Only configurable for raster layers."},attribution:{type:"string",doc:"Contains an attribution to be displayed when the map is shown to a user."},"*":{type:"*",doc:"Other keys to configure the data source."}},source_geojson:{type:{required:!0,type:"enum",values:{geojson:{doc:"A GeoJSON data source."}},doc:"The data type of the GeoJSON source."},data:{type:"*",doc:"A URL to a GeoJSON file, or inline GeoJSON."},maxzoom:{type:"number",default:18,doc:"Maximum zoom level at which to create vector tiles (higher means greater detail at high zoom levels)."},buffer:{type:"number",default:128,maximum:512,minimum:0,doc:"Size of the tile buffer on each side. A value of 0 produces no buffer. A value of 512 produces a buffer as wide as the tile itself. Larger values produce fewer rendering artifacts near tile edges and slower performance."},tolerance:{type:"number",default:.375,doc:"Douglas-Peucker simplification tolerance (higher means simpler geometries and faster performance)."},cluster:{type:"boolean",default:!1,doc:"If the data is a collection of point features, setting this to true clusters the points by radius into groups."},clusterRadius:{type:"number",default:50,minimum:0,doc:"Radius of each cluster if clustering is enabled. A value of 512 indicates a radius equal to the width of a tile."},clusterMaxZoom:{type:"number",doc:"Max zoom on which to cluster points if clustering is enabled. Defaults to one zoom less than maxzoom (so that last zoom features are not clustered)."}},source_video:{type:{required:!0,type:"enum",values:{video:{doc:"A video data source."}},doc:"The data type of the video source."},urls:{required:!0,type:"array",value:"string",doc:"URLs to video content in order of preferred format."},coordinates:{required:!0,doc:"Corners of video specified in longitude, latitude pairs.",type:"array",length:4,value:{type:"array",length:2,value:"number",doc:"A single longitude, latitude pair."}}},source_image:{type:{required:!0,type:"enum",values:{image:{doc:"An image data source."}},doc:"The data type of the image source."},url:{required:!0,type:"string",doc:"URL that points to an image."},coordinates:{required:!0,doc:"Corners of image specified in longitude, latitude pairs.",type:"array",length:4,value:{type:"array",length:2,value:"number",doc:"A single longitude, latitude pair."}}},source_canvas:{type:{required:!0,type:"enum",values:{canvas:{doc:"A canvas data source."}},doc:"The data type of the canvas source."},coordinates:{required:!0,doc:"Corners of canvas specified in longitude, latitude pairs.",type:"array",length:4,value:{type:"array",length:2,value:"number",doc:"A single longitude, latitude pair."}},animate:{type:"boolean",default:"true",doc:"Whether the canvas source is animated. If the canvas is static, `animate` should be set to `false` to improve performance."},canvas:{type:"string",required:!0,doc:"HTML ID of the canvas from which to read pixels."}},layer:{id:{type:"string",doc:"Unique layer name.",required:!0},type:{type:"enum",values:{fill:{doc:"A filled polygon with an optional stroked border.","sdk-support":{"basic functionality":{js:"0.10.0",android:"2.0.1",ios:"2.0.0",macos:"0.1.0"}}},line:{doc:"A stroked line.","sdk-support":{"basic functionality":{js:"0.10.0",android:"2.0.1",ios:"2.0.0",macos:"0.1.0"}}},symbol:{doc:"An icon or a text label.","sdk-support":{"basic functionality":{js:"0.10.0",android:"2.0.1",ios:"2.0.0",macos:"0.1.0"}}},circle:{doc:"A filled circle.","sdk-support":{"basic functionality":{js:"0.10.0",android:"2.0.1",ios:"2.0.0",macos:"0.1.0"}}},heatmap:{doc:"A heatmap.","sdk-support":{"basic functionality":{js:"0.41.0"}}},"fill-extrusion":{doc:"An extruded (3D) polygon.","sdk-support":{"basic functionality":{js:"0.27.0",android:"5.1.0",ios:"3.6.0",macos:"0.5.0"}}},raster:{doc:"Raster map textures such as satellite imagery.","sdk-support":{"basic functionality":{js:"0.10.0",android:"2.0.1",ios:"2.0.0",macos:"0.1.0"}}},hillshade:{doc:"Client-side hillshading visualization based on DEM data. Currently, the implementation only supports Mapbox Terrain RGB tiles","sdk-support":{"basic functionality":{js:"0.43.0"}}},background:{doc:"The background color or pattern of the map.","sdk-support":{"basic functionality":{js:"0.10.0",android:"2.0.1",ios:"2.0.0",macos:"0.1.0"}}}},doc:"Rendering type of this layer.",required:!0},metadata:{type:"*",doc:"Arbitrary properties useful to track with the layer, but do not influence rendering. Properties should be prefixed to avoid collisions, like 'mapbox:'."},source:{type:"string",doc:"Name of a source description to be used for this layer. Required for all layer types except `background`."},"source-layer":{type:"string",doc:"Layer to use from a vector tile source. Required for vector tile sources; prohibited for all other source types, including GeoJSON sources."},minzoom:{type:"number",minimum:0,maximum:24,doc:"The minimum zoom level on which the layer gets parsed and appears on."},maxzoom:{type:"number",minimum:0,maximum:24,doc:"The maximum zoom level on which the layer gets parsed and appears on."},filter:{type:"filter",doc:"A expression specifying conditions on source features. Only features that match the filter are displayed."},layout:{type:"layout",doc:"Layout properties for the layer."},paint:{type:"paint",doc:"Default paint properties for this layer."}},layout:["layout_fill","layout_line","layout_circle","layout_heatmap","layout_fill-extrusion","layout_symbol","layout_raster","layout_hillshade","layout_background"],layout_background:{visibility:{type:"enum",values:{visible:{doc:"The layer is shown."},none:{doc:"The layer is not shown."}},default:"visible",doc:"Whether this layer is displayed.","sdk-support":{"basic functionality":{js:"0.10.0",android:"2.0.1",ios:"2.0.0",macos:"0.1.0"}}}},layout_fill:{visibility:{type:"enum",values:{visible:{doc:"The layer is shown."},none:{doc:"The layer is not shown."}},default:"visible",doc:"Whether this layer is displayed.","sdk-support":{"basic functionality":{js:"0.10.0",android:"2.0.1",ios:"2.0.0",macos:"0.1.0"}}}},layout_circle:{visibility:{type:"enum",values:{visible:{doc:"The layer is shown."},none:{doc:"The layer is not shown."}},default:"visible",doc:"Whether this layer is displayed.","sdk-support":{"basic functionality":{js:"0.10.0",android:"2.0.1",ios:"2.0.0",macos:"0.1.0"}}}},layout_heatmap:{visibility:{type:"enum",values:{visible:{doc:"The layer is shown."},none:{doc:"The layer is not shown."}},default:"visible",doc:"Whether this layer is displayed.","sdk-support":{"basic functionality":{js:"0.41.0"}}}},"layout_fill-extrusion":{visibility:{type:"enum",values:{visible:{doc:"The layer is shown."},none:{doc:"The layer is not shown."}},default:"visible",doc:"Whether this layer is displayed.","sdk-support":{"basic functionality":{js:"0.27.0",android:"5.1.0",ios:"3.6.0",macos:"0.5.0"}}}},layout_line:{"line-cap":{type:"enum",function:"piecewise-constant","zoom-function":!0,values:{butt:{doc:"A cap with a squared-off end which is drawn to the exact endpoint of the line."},round:{doc:"A cap with a rounded end which is drawn beyond the endpoint of the line at a radius of one-half of the line's width and centered on the endpoint of the line."},square:{doc:"A cap with a squared-off end which is drawn beyond the endpoint of the line at a distance of one-half of the line's width."}},default:"butt",doc:"The display of line endings.","sdk-support":{"basic functionality":{js:"0.10.0",android:"2.0.1",ios:"2.0.0",macos:"0.1.0"},"data-driven styling":{}}},"line-join":{type:"enum",function:"piecewise-constant","zoom-function":!0,"property-function":!0,values:{bevel:{doc:"A join with a squared-off end which is drawn beyond the endpoint of the line at a distance of one-half of the line's width."},round:{doc:"A join with a rounded end which is drawn beyond the endpoint of the line at a radius of one-half of the line's width and centered on the endpoint of the line."},miter:{doc:"A join with a sharp, angled corner which is drawn with the outer sides beyond the endpoint of the path until they meet."}},default:"miter",doc:"The display of lines when joining.","sdk-support":{"basic functionality":{js:"0.10.0",android:"2.0.1",ios:"2.0.0",macos:"0.1.0"},"data-driven styling":{js:"0.40.0",android:"5.2.0",ios:"3.7.0",macos:"0.6.0"}}},"line-miter-limit":{type:"number",default:2,function:"interpolated","zoom-function":!0,doc:"Used to automatically convert miter joins to bevel joins for sharp angles.",requires:[{"line-join":"miter"}],"sdk-support":{"basic functionality":{js:"0.10.0",android:"2.0.1",ios:"2.0.0",macos:"0.1.0"},"data-driven styling":{}}},"line-round-limit":{type:"number",default:1.05,function:"interpolated","zoom-function":!0,doc:"Used to automatically convert round joins to miter joins for shallow angles.",requires:[{"line-join":"round"}],"sdk-support":{"basic functionality":{js:"0.10.0",android:"2.0.1",ios:"2.0.0",macos:"0.1.0"},"data-driven styling":{}}},visibility:{type:"enum",values:{visible:{doc:"The layer is shown."},none:{doc:"The layer is not shown."}},default:"visible",doc:"Whether this layer is displayed.","sdk-support":{"basic functionality":{js:"0.10.0",android:"2.0.1",ios:"2.0.0",macos:"0.1.0"},"data-driven styling":{}}}},layout_symbol:{"symbol-placement":{type:"enum",function:"piecewise-constant","zoom-function":!0,values:{point:{doc:"The label is placed at the point where the geometry is located."},line:{doc:"The label is placed along the line of the geometry. Can only be used on `LineString` and `Polygon` geometries."}},default:"point",doc:"Label placement relative to its geometry.","sdk-support":{"basic functionality":{js:"0.10.0",android:"2.0.1",ios:"2.0.0",macos:"0.1.0"},"data-driven styling":{}}},"symbol-spacing":{type:"number",default:250,minimum:1,function:"interpolated","zoom-function":!0,units:"pixels",doc:"Distance between two symbol anchors.",requires:[{"symbol-placement":"line"}],"sdk-support":{"basic functionality":{js:"0.10.0",android:"2.0.1",ios:"2.0.0",macos:"0.1.0"},"data-driven styling":{}}},"symbol-avoid-edges":{type:"boolean",function:"piecewise-constant","zoom-function":!0,default:!1,doc:"If true, the symbols will not cross tile edges to avoid mutual collisions. Recommended in layers that don't have enough padding in the vector tile to prevent collisions, or if it is a point symbol layer placed after a line symbol layer.","sdk-support":{"basic functionality":{js:"0.10.0",android:"2.0.1",ios:"2.0.0",macos:"0.1.0"},"data-driven styling":{}}},"icon-allow-overlap":{type:"boolean",function:"piecewise-constant","zoom-function":!0,default:!1,doc:"If true, the icon will be visible even if it collides with other previously drawn symbols.",requires:["icon-image"],"sdk-support":{"basic functionality":{js:"0.10.0",android:"2.0.1",ios:"2.0.0",macos:"0.1.0"},"data-driven styling":{}}},"icon-ignore-placement":{type:"boolean",function:"piecewise-constant","zoom-function":!0,default:!1,doc:"If true, other symbols can be visible even if they collide with the icon.",requires:["icon-image"],"sdk-support":{"basic functionality":{js:"0.10.0",android:"2.0.1",ios:"2.0.0",macos:"0.1.0"},"data-driven styling":{}}},"icon-optional":{type:"boolean",function:"piecewise-constant","zoom-function":!0,default:!1,doc:"If true, text will display without their corresponding icons when the icon collides with other symbols and the text does not.",requires:["icon-image","text-field"],"sdk-support":{"basic functionality":{js:"0.10.0",android:"2.0.1",ios:"2.0.0",macos:"0.1.0"},"data-driven styling":{}}},"icon-rotation-alignment":{type:"enum",function:"piecewise-constant","zoom-function":!0,values:{map:{doc:"When `symbol-placement` is set to `point`, aligns icons east-west. When `symbol-placement` is set to `line`, aligns icon x-axes with the line."},viewport:{doc:"Produces icons whose x-axes are aligned with the x-axis of the viewport, regardless of the value of `symbol-placement`."},auto:{doc:"When `symbol-placement` is set to `point`, this is equivalent to `viewport`. When `symbol-placement` is set to `line`, this is equivalent to `map`."}},default:"auto",doc:"In combination with `symbol-placement`, determines the rotation behavior of icons.",requires:["icon-image"],"sdk-support":{"basic functionality":{js:"0.10.0",android:"2.0.1",ios:"2.0.0",macos:"0.1.0"},"`auto` value":{js:"0.25.0",android:"4.2.0",ios:"3.4.0",macos:"0.3.0"},"data-driven styling":{}}},"icon-size":{type:"number",default:1,minimum:0,function:"interpolated","zoom-function":!0,"property-function":!0,units:"factor of the original icon size",doc:"Scales the original size of the icon by the provided factor. The new pixel size of the image will be the original pixel size multiplied by `icon-size`. 1 is the original size; 3 triples the size of the image.",requires:["icon-image"],"sdk-support":{"basic functionality":{js:"0.10.0",android:"2.0.1",ios:"2.0.0",macos:"0.1.0"},"data-driven styling":{js:"0.35.0",android:"5.1.0",ios:"3.6.0",macos:"0.5.0"}}},"icon-text-fit":{type:"enum",function:"piecewise-constant","zoom-function":!0,values:{none:{doc:"The icon is displayed at its intrinsic aspect ratio."},width:{doc:"The icon is scaled in the x-dimension to fit the width of the text."},height:{doc:"The icon is scaled in the y-dimension to fit the height of the text."},both:{doc:"The icon is scaled in both x- and y-dimensions."}},default:"none",doc:"Scales the icon to fit around the associated text.",requires:["icon-image","text-field"],"sdk-support":{"basic functionality":{js:"0.21.0",android:"4.2.0",ios:"3.4.0",macos:"0.2.1"},"data-driven styling":{}}},"icon-text-fit-padding":{type:"array",value:"number",length:4,default:[0,0,0,0],units:"pixels",function:"interpolated","zoom-function":!0,doc:"Size of the additional area added to dimensions determined by `icon-text-fit`, in clockwise order: top, right, bottom, left.",requires:["icon-image","text-field",{"icon-text-fit":["both","width","height"]}],"sdk-support":{"basic functionality":{js:"0.21.0",android:"4.2.0",ios:"3.4.0",macos:"0.2.1"},"data-driven styling":{}}},"icon-image":{type:"string",function:"piecewise-constant","zoom-function":!0,"property-function":!0,doc:"Name of image in sprite to use for drawing an image background. Within literal values and zoom functions, property names enclosed in curly brackets (e.g. `{token}`) are replaced with the value of the named property. Expressions and property functions do not support this syntax; for equivalent functionality in expressions, use the [`concat`](#expressions-concat) and [`get`](#expressions-get) operators.",tokens:!0,"sdk-support":{"basic functionality":{js:"0.10.0",android:"2.0.1",ios:"2.0.0",macos:"0.1.0"},"data-driven styling":{js:"0.35.0",android:"5.1.0",ios:"3.6.0",macos:"0.5.0"}}},"icon-rotate":{type:"number",default:0,period:360,function:"interpolated","zoom-function":!0,"property-function":!0,units:"degrees",doc:"Rotates the icon clockwise.",requires:["icon-image"],"sdk-support":{"basic functionality":{js:"0.10.0",android:"2.0.1",ios:"2.0.0",macos:"0.1.0"},"data-driven styling":{js:"0.21.0",android:"5.0.0",ios:"3.5.0",macos:"0.4.0"}}},"icon-padding":{type:"number",default:2,minimum:0,function:"interpolated","zoom-function":!0,units:"pixels",doc:"Size of the additional area around the icon bounding box used for detecting symbol collisions.",requires:["icon-image"],"sdk-support":{"basic functionality":{js:"0.10.0",android:"2.0.1",ios:"2.0.0",macos:"0.1.0"},"data-driven styling":{}}},"icon-keep-upright":{type:"boolean",function:"piecewise-constant","zoom-function":!0,default:!1,doc:"If true, the icon may be flipped to prevent it from being rendered upside-down.",requires:["icon-image",{"icon-rotation-alignment":"map"},{"symbol-placement":"line"}],"sdk-support":{"basic functionality":{js:"0.10.0",android:"2.0.1",ios:"2.0.0",macos:"0.1.0"},"data-driven styling":{}}},"icon-offset":{type:"array",value:"number",length:2,default:[0,0],function:"interpolated","zoom-function":!0,"property-function":!0,doc:"Offset distance of icon from its anchor. Positive values indicate right and down, while negative values indicate left and up. Each component is multiplied by the value of `icon-size` to obtain the final offset in pixels. When combined with `icon-rotate` the offset will be as if the rotated direction was up.",requires:["icon-image"],"sdk-support":{"basic functionality":{js:"0.10.0",android:"2.0.1",ios:"2.0.0",macos:"0.1.0"},"data-driven styling":{js:"0.29.0",android:"5.0.0",ios:"3.5.0",macos:"0.4.0"}}},"icon-anchor":{type:"enum",function:"piecewise-constant","zoom-function":!0,"property-function":!0,values:{center:{doc:"The center of the icon is placed closest to the anchor."},left:{doc:"The left side of the icon is placed closest to the anchor."},right:{doc:"The right side of the icon is placed closest to the anchor."},top:{doc:"The top of the icon is placed closest to the anchor."},bottom:{doc:"The bottom of the icon is placed closest to the anchor."},"top-left":{doc:"The top left corner of the icon is placed closest to the anchor."},"top-right":{doc:"The top right corner of the icon is placed closest to the anchor."},"bottom-left":{doc:"The bottom left corner of the icon is placed closest to the anchor."},"bottom-right":{doc:"The bottom right corner of the icon is placed closest to the anchor."}},default:"center",doc:"Part of the icon placed closest to the anchor.",requires:["icon-image"],"sdk-support":{"basic functionality":{js:"0.40.0",android:"5.2.0",ios:"3.7.0",macos:"0.6.0"},"data-driven styling":{js:"0.40.0",android:"5.2.0",ios:"3.7.0",macos:"0.6.0"}}},"icon-pitch-alignment":{type:"enum",function:"piecewise-constant","zoom-function":!0,values:{map:{doc:"The icon is aligned to the plane of the map."},viewport:{doc:"The icon is aligned to the plane of the viewport."},auto:{doc:"Automatically matches the value of `icon-rotation-alignment`."}},default:"auto",doc:"Orientation of icon when map is pitched.",requires:["icon-image"],"sdk-support":{"basic functionality":{js:"0.39.0",android:"5.2.0",ios:"3.7.0",macos:"0.6.0"},"data-driven styling":{}}},"text-pitch-alignment":{type:"enum",function:"piecewise-constant","zoom-function":!0,values:{map:{doc:"The text is aligned to the plane of the map."},viewport:{doc:"The text is aligned to the plane of the viewport."},auto:{doc:"Automatically matches the value of `text-rotation-alignment`."}},default:"auto",doc:"Orientation of text when map is pitched.",requires:["text-field"],"sdk-support":{"basic functionality":{js:"0.21.0",android:"4.2.0",ios:"3.4.0",macos:"0.2.1"},"`auto` value":{js:"0.25.0",android:"4.2.0",ios:"3.4.0",macos:"0.3.0"},"data-driven styling":{}}},"text-rotation-alignment":{type:"enum",function:"piecewise-constant","zoom-function":!0,values:{map:{doc:"When `symbol-placement` is set to `point`, aligns text east-west. When `symbol-placement` is set to `line`, aligns text x-axes with the line."},viewport:{doc:"Produces glyphs whose x-axes are aligned with the x-axis of the viewport, regardless of the value of `symbol-placement`."},auto:{doc:"When `symbol-placement` is set to `point`, this is equivalent to `viewport`. When `symbol-placement` is set to `line`, this is equivalent to `map`."}},default:"auto",doc:"In combination with `symbol-placement`, determines the rotation behavior of the individual glyphs forming the text.",requires:["text-field"],"sdk-support":{"basic functionality":{js:"0.10.0",android:"2.0.1",ios:"2.0.0",macos:"0.1.0"},"`auto` value":{js:"0.25.0",android:"4.2.0",ios:"3.4.0",macos:"0.3.0"},"data-driven styling":{}}},"text-field":{type:"string",function:"piecewise-constant","zoom-function":!0,"property-function":!0,default:"",tokens:!0,doc:"Value to use for a text label. Within literal values and zoom functions, property names enclosed in curly brackets (e.g. `{token}`) are replaced with the value of the named property. Expressions and property functions do not support this syntax; for equivalent functionality in expressions, use the [`concat`](#expressions-concat) and [`get`](#expressions-get) operators.","sdk-support":{"basic functionality":{js:"0.10.0",android:"2.0.1",ios:"2.0.0",macos:"0.1.0"},"data-driven styling":{js:"0.33.0",android:"5.0.0",ios:"3.5.0",macos:"0.4.0"}}},"text-font":{type:"array",value:"string",function:"piecewise-constant","zoom-function":!0,"property-function":!0,default:["Open Sans Regular","Arial Unicode MS Regular"],doc:"Font stack to use for displaying text.",requires:["text-field"],"sdk-support":{"basic functionality":{js:"0.10.0",android:"2.0.1",ios:"2.0.0",macos:"0.1.0"},"data-driven styling":{}}},"text-size":{type:"number",default:16,minimum:0,units:"pixels",function:"interpolated","zoom-function":!0,"property-function":!0,doc:"Font size.",requires:["text-field"],"sdk-support":{"basic functionality":{js:"0.10.0",android:"2.0.1",ios:"2.0.0",macos:"0.1.0"},"data-driven styling":{js:"0.35.0",android:"5.1.0",ios:"3.6.0",macos:"0.5.0"}}},"text-max-width":{type:"number",default:10,minimum:0,units:"ems",function:"interpolated","zoom-function":!0,"property-function":!0,doc:"The maximum line width for text wrapping.",requires:["text-field"],"sdk-support":{"basic functionality":{js:"0.10.0",android:"2.0.1",ios:"2.0.0",macos:"0.1.0"},"data-driven styling":{js:"0.40.0",android:"5.2.0",ios:"3.7.0",macos:"0.6.0"}}},"text-line-height":{type:"number",default:1.2,units:"ems",function:"interpolated","zoom-function":!0,doc:"Text leading value for multi-line text.",requires:["text-field"],"sdk-support":{"basic functionality":{js:"0.10.0",android:"2.0.1",ios:"2.0.0",macos:"0.1.0"},"data-driven styling":{}}},"text-letter-spacing":{type:"number",default:0,units:"ems",function:"interpolated","zoom-function":!0,"property-function":!0,doc:"Text tracking amount.",requires:["text-field"],"sdk-support":{"basic functionality":{js:"0.10.0",android:"2.0.1",ios:"2.0.0",macos:"0.1.0"},"data-driven styling":{js:"0.40.0",android:"5.2.0",ios:"3.7.0",macos:"0.6.0"}}},"text-justify":{type:"enum",function:"piecewise-constant","zoom-function":!0,"property-function":!0,values:{left:{doc:"The text is aligned to the left."},center:{doc:"The text is centered."},right:{doc:"The text is aligned to the right."}},default:"center",doc:"Text justification options.",requires:["text-field"],"sdk-support":{"basic functionality":{js:"0.10.0",android:"2.0.1",ios:"2.0.0",macos:"0.1.0"},"data-driven styling":{js:"0.39.0",android:"5.2.0",ios:"3.7.0",macos:"0.6.0"}}},"text-anchor":{type:"enum",function:"piecewise-constant","zoom-function":!0,"property-function":!0,values:{center:{doc:"The center of the text is placed closest to the anchor."},left:{doc:"The left side of the text is placed closest to the anchor."},right:{doc:"The right side of the text is placed closest to the anchor."},top:{doc:"The top of the text is placed closest to the anchor."},bottom:{doc:"The bottom of the text is placed closest to the anchor."},"top-left":{doc:"The top left corner of the text is placed closest to the anchor."},"top-right":{doc:"The top right corner of the text is placed closest to the anchor."},"bottom-left":{doc:"The bottom left corner of the text is placed closest to the anchor."},"bottom-right":{doc:"The bottom right corner of the text is placed closest to the anchor."}},default:"center",doc:"Part of the text placed closest to the anchor.",requires:["text-field"],"sdk-support":{"basic functionality":{js:"0.10.0",android:"2.0.1",ios:"2.0.0",macos:"0.1.0"},"data-driven styling":{js:"0.39.0",android:"5.2.0",ios:"3.7.0",macos:"0.6.0"}}},"text-max-angle":{type:"number",default:45,units:"degrees",function:"interpolated","zoom-function":!0,doc:"Maximum angle change between adjacent characters.",requires:["text-field",{"symbol-placement":"line"}],"sdk-support":{"basic functionality":{js:"0.10.0",android:"2.0.1",ios:"2.0.0",macos:"0.1.0"},"data-driven styling":{}}},"text-rotate":{type:"number",default:0,period:360,units:"degrees",function:"interpolated","zoom-function":!0,"property-function":!0,doc:"Rotates the text clockwise.",requires:["text-field"],"sdk-support":{"basic functionality":{js:"0.10.0",android:"2.0.1",ios:"2.0.0",macos:"0.1.0"},"data-driven styling":{js:"0.35.0",android:"5.1.0",ios:"3.6.0",macos:"0.5.0"}}},"text-padding":{type:"number",default:2,minimum:0,units:"pixels",function:"interpolated","zoom-function":!0,doc:"Size of the additional area around the text bounding box used for detecting symbol collisions.",requires:["text-field"],"sdk-support":{"basic functionality":{js:"0.10.0",android:"2.0.1",ios:"2.0.0",macos:"0.1.0"},"data-driven styling":{}}},"text-keep-upright":{type:"boolean",function:"piecewise-constant","zoom-function":!0,default:!0,doc:"If true, the text may be flipped vertically to prevent it from being rendered upside-down.",requires:["text-field",{"text-rotation-alignment":"map"},{"symbol-placement":"line"}],"sdk-support":{"basic functionality":{js:"0.10.0",android:"2.0.1",ios:"2.0.0",macos:"0.1.0"},"data-driven styling":{}}},"text-transform":{type:"enum",function:"piecewise-constant","zoom-function":!0,"property-function":!0,values:{none:{doc:"The text is not altered."},uppercase:{doc:"Forces all letters to be displayed in uppercase."},lowercase:{doc:"Forces all letters to be displayed in lowercase."}},default:"none",doc:"Specifies how to capitalize text, similar to the CSS `text-transform` property.",requires:["text-field"],"sdk-support":{"basic functionality":{js:"0.10.0",android:"2.0.1",ios:"2.0.0",macos:"0.1.0"},"data-driven styling":{js:"0.33.0",android:"5.0.0",ios:"3.5.0",macos:"0.4.0"}}},"text-offset":{type:"array",doc:"Offset distance of text from its anchor. Positive values indicate right and down, while negative values indicate left and up.",value:"number",units:"ems",function:"interpolated","zoom-function":!0,"property-function":!0,length:2,default:[0,0],requires:["text-field"],"sdk-support":{"basic functionality":{js:"0.10.0",android:"2.0.1",ios:"2.0.0",macos:"0.1.0"},"data-driven styling":{js:"0.35.0",android:"5.1.0",ios:"3.6.0",macos:"0.5.0"}}},"text-allow-overlap":{type:"boolean",function:"piecewise-constant","zoom-function":!0,default:!1,doc:"If true, the text will be visible even if it collides with other previously drawn symbols.",requires:["text-field"],"sdk-support":{"basic functionality":{js:"0.10.0",android:"2.0.1",ios:"2.0.0",macos:"0.1.0"},"data-driven styling":{}}},"text-ignore-placement":{type:"boolean",function:"piecewise-constant","zoom-function":!0,default:!1,doc:"If true, other symbols can be visible even if they collide with the text.",requires:["text-field"],"sdk-support":{"basic functionality":{js:"0.10.0",android:"2.0.1",ios:"2.0.0",macos:"0.1.0"},"data-driven styling":{}}},"text-optional":{type:"boolean",function:"piecewise-constant","zoom-function":!0,default:!1,doc:"If true, icons will display without their corresponding text when the text collides with other symbols and the icon does not.",requires:["text-field","icon-image"],"sdk-support":{"basic functionality":{js:"0.10.0",android:"2.0.1",ios:"2.0.0",macos:"0.1.0"},"data-driven styling":{}}},visibility:{type:"enum",values:{visible:{doc:"The layer is shown."},none:{doc:"The layer is not shown."}},default:"visible",doc:"Whether this layer is displayed.","sdk-support":{"basic functionality":{js:"0.10.0",android:"2.0.1",ios:"2.0.0",macos:"0.1.0"},"data-driven styling":{}}}},layout_raster:{visibility:{type:"enum",values:{visible:{doc:"The layer is shown."},none:{doc:"The layer is not shown."}},default:"visible",doc:"Whether this layer is displayed.","sdk-support":{"basic functionality":{js:"0.10.0",android:"2.0.1",ios:"2.0.0",macos:"0.1.0"},"data-driven styling":{}}}},layout_hillshade:{visibility:{type:"enum",values:{visible:{doc:"The layer is shown."},none:{doc:"The layer is not shown."}},default:"visible",doc:"Whether this layer is displayed.","sdk-support":{"basic functionality":{js:"0.43.0"},"data-driven styling":{}}}},filter:{type:"array",value:"*",doc:"A filter selects specific features from a layer."},filter_operator:{type:"enum",values:{"==":{doc:'`["==", key, value]` equality: `feature[key] = value`'},"!=":{doc:'`["!=", key, value]` inequality: `feature[key] ≠ value`'},">":{doc:'`[">", key, value]` greater than: `feature[key] > value`'},">=":{doc:'`[">=", key, value]` greater than or equal: `feature[key] ≥ value`'},"<":{doc:'`["<", key, value]` less than: `feature[key] < value`'},"<=":{doc:'`["<=", key, value]` less than or equal: `feature[key] ≤ value`'},in:{doc:'`["in", key, v0, ..., vn]` set inclusion: `feature[key] ∈ {v0, ..., vn}`'},"!in":{doc:'`["!in", key, v0, ..., vn]` set exclusion: `feature[key] ∉ {v0, ..., vn}`'},all:{doc:'`["all", f0, ..., fn]` logical `AND`: `f0 ∧ ... ∧ fn`'},any:{doc:'`["any", f0, ..., fn]` logical `OR`: `f0 ∨ ... ∨ fn`'},none:{doc:'`["none", f0, ..., fn]` logical `NOR`: `¬f0 ∧ ... ∧ ¬fn`'},has:{doc:'`["has", key]` `feature[key]` exists'},"!has":{doc:'`["!has", key]` `feature[key]` does not exist'}},doc:"The filter operator."},geometry_type:{type:"enum",values:{Point:{doc:"Filter to point geometries."},LineString:{doc:"Filter to line geometries."},Polygon:{doc:"Filter to polygon geometries."}},doc:"The geometry type for the filter to select."},function:{expression:{type:"expression",doc:"An expression."},stops:{type:"array",doc:"An array of stops.",value:"function_stop"},base:{type:"number",default:1,minimum:0,doc:"The exponential base of the interpolation curve. It controls the rate at which the result increases. Higher values make the result increase more towards the high end of the range. With `1` the stops are interpolated linearly."},property:{type:"string",doc:"The name of a feature property to use as the function input.",default:"$zoom"},type:{type:"enum",values:{identity:{doc:"Return the input value as the output value."},exponential:{doc:"Generate an output by interpolating between stops just less than and just greater than the function input."},interval:{doc:"Return the output value of the stop just less than the function input."},categorical:{doc:"Return the output value of the stop equal to the function input."}},doc:"The interpolation strategy to use in function evaluation.",default:"exponential"},colorSpace:{type:"enum",values:{rgb:{doc:"Use the RGB color space to interpolate color values"},lab:{doc:"Use the LAB color space to interpolate color values."},hcl:{doc:"Use the HCL color space to interpolate color values, interpolating the Hue, Chroma, and Luminance channels individually."}},doc:"The color space in which colors interpolated. Interpolating colors in perceptual color spaces like LAB and HCL tend to produce color ramps that look more consistent and produce colors that can be differentiated more easily than those interpolated in RGB space.",default:"rgb"},default:{type:"*",required:!1,doc:"A value to serve as a fallback function result when a value isn't otherwise available. It is used in the following circumstances:\n* In categorical functions, when the feature value does not match any of the stop domain values.\n* In property and zoom-and-property functions, when a feature does not contain a value for the specified property.\n* In identity functions, when the feature value is not valid for the style property (for example, if the function is being used for a `circle-color` property but the feature property value is not a string or not a valid color).\n* In interval or exponential property and zoom-and-property functions, when the feature value is not numeric.\nIf no default is provided, the style property's default is used in these circumstances."}},function_stop:{type:"array",minimum:0,maximum:22,value:["number","color"],length:2,doc:"Zoom level and value pair."},expression:{type:"array",value:"*",minimum:1,doc:"An expression defines a function that can be used for data-driven style properties or feature filters."},expression_name:{doc:"",type:"enum",values:{let:{doc:'Binds expressions to named variables, which can then be referenced in the result expression using ["var", "variable_name"].',group:"Variable binding"},var:{doc:'References variable bound using "let".',group:"Variable binding"},literal:{doc:"Provides a literal array or object value.",group:"Types"},array:{doc:"Asserts that the input is an array (optionally with a specific item type and length).  If, when the input expression is evaluated, it is not of the asserted type, then this assertion will cause the whole expression to be aborted.",group:"Types"},at:{doc:"Retrieves an item from an array.",group:"Lookup"},case:{doc:"Selects the first output whose corresponding test condition evaluates to true.",group:"Decision"},match:{doc:'Selects the output whose label value matches the input value, or the fallback value if no match is found. The `input` can be any string or number expression (e.g. `["get", "building_type"]`). Each label can either be a single literal value or an array of values.',group:"Decision"},coalesce:{doc:"Evaluates each expression in turn until the first non-null value is obtained, and returns that value.",group:"Decision"},step:{doc:'Produces discrete, stepped results by evaluating a piecewise-constant function defined by pairs of input and output values ("stops"). The `input` may be any numeric expression (e.g., `["get", "population"]`). Stop inputs must be numeric literals in strictly ascending order. Returns the output value of the stop just less than the input, or the first input if the input is less than the first stop.',group:"Ramps, scales, curves"},interpolate:{doc:'Produces continuous, smooth results by interpolating between pairs of input and output values ("stops"). The `input` may be any numeric expression (e.g., `["get", "population"]`). Stop inputs must be numeric literals in strictly ascending order. The output type must be `number`, `array<number>`, or `color`.\n\nInterpolation types:\n- `["linear"]`: interpolates linearly between the pair of stops just less than and just greater than the input.\n- `["exponential", base]`: interpolates exponentially between the stops just less than and just greater than the input. `base` controls the rate at which the output increases: higher values make the output increase more towards the high end of the range. With values close to 1 the output increases linearly.\n- `["cubic-bezier", x1, y1, x2, y2]`: interpolates using the cubic bezier curve defined by the given control points.',group:"Ramps, scales, curves"},ln2:{doc:"Returns mathematical constant ln(2).",group:"Math"},pi:{doc:"Returns the mathematical constant pi.",group:"Math"},e:{doc:"Returns the mathematical constant e.",group:"Math"},typeof:{doc:"Returns a string describing the type of the given value.",group:"Types"},string:{doc:"Asserts that the input value is a string. If multiple values are provided, each one is evaluated in order until a string value is obtained. If none of the inputs are strings, the expression is an error.",group:"Types"},number:{doc:"Asserts that the input value is a number. If multiple values are provided, each one is evaluated in order until a number value is obtained. If none of the inputs are numbers, the expression is an error.",group:"Types"},boolean:{doc:"Asserts that the input value is a boolean. If multiple values are provided, each one is evaluated in order until a boolean value is obtained. If none of the inputs are booleans, the expression is an error.",group:"Types"},object:{doc:"Asserts that the input value is an object. If it is not, the expression is an error.",group:"Types"},"to-string":{doc:'Converts the input value to a string. If the input is `null`, the result is `"null"`. If the input is a boolean, the result is `"true"` or `"false"`. If the input is a number, it is converted to a string as specified by the ["NumberToString" algorithm](https://tc39.github.io/ecma262/#sec-tostring-applied-to-the-number-type) of the ECMAScript Language Specification. If the input is a color, it is converted to a string of the form `"rgba(r,g,b,a)"`, where `r`, `g`, and `b` are numerals ranging from 0 to 255, and `a` ranges from 0 to 1. Otherwise, the input is converted to a string in the format specified by the [`JSON.stringify`](https://tc39.github.io/ecma262/#sec-json.stringify) function of the ECMAScript Language Specification.',group:"Types"},"to-number":{doc:'Converts the input value to a number, if possible. If the input is `null` or `false`, the result is 0. If the input is `true`, the result is 1. If the input is a string, it is converted to a number as specified by the ["ToNumber Applied to the String Type" algorithm](https://tc39.github.io/ecma262/#sec-tonumber-applied-to-the-string-type) of the ECMAScript Language Specification. If multiple values are provided, each one is evaluated in order until the first successful conversion is obtained. If none of the inputs can be converted, the expression is an error.',group:"Types"},"to-boolean":{doc:"Converts the input value to a boolean. The result is `false` when then input is an empty string, 0, `false`, `null`, or `NaN`; otherwise it is `true`.",group:"Types"},"to-rgba":{doc:"Returns a four-element array containing the input color's red, green, blue, and alpha components, in that order.",group:"Color"},"to-color":{doc:"Converts the input value to a color. If multiple values are provided, each one is evaluated in order until the first successful conversion is obtained. If none of the inputs can be converted, the expression is an error.",group:"Types"},rgb:{doc:"Creates a color value from red, green, and blue components, which must range between 0 and 255, and an alpha component of 1. If any component is out of range, the expression is an error.",group:"Color"},rgba:{doc:"Creates a color value from red, green, blue components, which must range between 0 and 255, and an alpha component which must range between 0 and 1. If any component is out of range, the expression is an error.",group:"Color"},get:{doc:"Retrieves a property value from the current feature's properties, or from another object if a second argument is provided. Returns null if the requested property is missing.",group:"Lookup"},has:{doc:"Tests for the presence of an property value in the current feature's properties, or from another object if a second argument is provided.",group:"Lookup"},length:{doc:"Gets the length of an array or string.",group:"Lookup"},properties:{doc:'Gets the feature properties object.  Note that in some cases, it may be more efficient to use ["get", "property_name"] directly.',group:"Feature data"},"geometry-type":{doc:"Gets the feature's geometry type: Point, MultiPoint, LineString, MultiLineString, Polygon, MultiPolygon.",group:"Feature data"},id:{doc:"Gets the feature's id, if it has one.",group:"Feature data"},zoom:{doc:'Gets the current zoom level.  Note that in style layout and paint properties, ["zoom"] may only appear as the input to a top-level "step" or "interpolate" expression.',group:"Zoom"},"heatmap-density":{doc:"Gets the kernel density estimation of a pixel in a heatmap layer, which is a relative measure of how many data points are crowded around a particular pixel. Can only be used in the `heatmap-color` property.",group:"Heatmap"},"+":{doc:"Returns the sum of the inputs.",group:"Math"},"*":{doc:"Returns the product of the inputs.",group:"Math"},"-":{doc:"For two inputs, returns the result of subtracting the second input from the first. For a single input, returns the result of subtracting it from 0.",group:"Math"},"/":{doc:"Returns the result of floating point division of the first input by the second.",group:"Math"},"%":{doc:"Returns the remainder after integer division of the first input by the second.",group:"Math"},"^":{doc:"Returns the result of raising the first input to the power specified by the second.",group:"Math"},sqrt:{doc:"Returns the square root of the input.",group:"Math"},log10:{doc:"Returns the base-ten logarithm of the input.",group:"Math"},ln:{doc:"Returns the natural logarithm of the input.",group:"Math"},log2:{doc:"Returns the base-two logarithm of the input.",group:"Math"},sin:{doc:"Returns the sine of the input.",group:"Math"},cos:{doc:"Returns the cosine of the input.",group:"Math"},tan:{doc:"Returns the tangent of the input.",group:"Math"},asin:{doc:"Returns the arcsine of the input.",group:"Math"},acos:{doc:"Returns the arccosine of the input.",group:"Math"},atan:{doc:"Returns the arctangent of the input.",group:"Math"},min:{doc:"Returns the minimum value of the inputs.",group:"Math"},max:{doc:"Returns the maximum value of the inputs.",group:"Math"},"==":{doc:"Returns `true` if the input values are equal, `false` otherwise. The inputs must be numbers, strings, or booleans, and both of the same type.",group:"Decision"},"!=":{doc:"Returns `true` if the input values are not equal, `false` otherwise. The inputs must be numbers, strings, or booleans, and both of the same type.",group:"Decision"},">":{doc:"Returns `true` if the first input is strictly greater than the second, `false` otherwise. The inputs must be numbers or strings, and both of the same type.",group:"Decision"},"<":{doc:"Returns `true` if the first input is strictly less than the second, `false` otherwise. The inputs must be numbers or strings, and both of the same type.",group:"Decision"},">=":{doc:"Returns `true` if the first input is greater than or equal to the second, `false` otherwise. The inputs must be numbers or strings, and both of the same type.",group:"Decision"},"<=":{doc:"Returns `true` if the first input is less than or equal to the second, `false` otherwise. The inputs must be numbers or strings, and both of the same type.",group:"Decision"},all:{doc:"Returns `true` if all the inputs are `true`, `false` otherwise. The inputs are evaluated in order, and evaluation is short-circuiting: once an input expression evaluates to `false`, the result is `false` and no further input expressions are evaluated.",group:"Decision"},any:{doc:"Returns `true` if any of the inputs are `true`, `false` otherwise. The inputs are evaluated in order, and evaluation is short-circuiting: once an input expression evaluates to `true`, the result is `true` and no further input expressions are evaluated.",group:"Decision"},"!":{doc:"Logical negation. Returns `true` if the input is `false`, and `false` if the input is `true`.",group:"Decision"},upcase:{doc:"Returns the input string converted to uppercase. Follows the Unicode Default Case Conversion algorithm and the locale-insensitive case mappings in the Unicode Character Database.",group:"String"},downcase:{doc:"Returns the input string converted to lowercase. Follows the Unicode Default Case Conversion algorithm and the locale-insensitive case mappings in the Unicode Character Database.",group:"String"},concat:{doc:"Returns a string consisting of the concatenation of the inputs.",group:"String"}}},light:{anchor:{type:"enum",default:"viewport",values:{map:{doc:"The position of the light source is aligned to the rotation of the map."},viewport:{doc:"The position of the light source is aligned to the rotation of the viewport."}},transition:!1,"zoom-function":!0,"property-function":!1,function:"piecewise-constant",doc:"Whether extruded geometries are lit relative to the map or viewport.",example:"map","sdk-support":{"basic functionality":{js:"0.27.0",android:"5.1.0",ios:"3.6.0",macos:"0.5.0"}}},position:{type:"array",default:[1.15,210,30],length:3,value:"number",transition:!0,function:"interpolated","zoom-function":!0,"property-function":!1,doc:"Position of the light source relative to lit (extruded) geometries, in [r radial coordinate, a azimuthal angle, p polar angle] where r indicates the distance from the center of the base of an object to its light, a indicates the position of the light relative to 0° (0° when `light.anchor` is set to `viewport` corresponds to the top of the viewport, or 0° when `light.anchor` is set to `map` corresponds to due north, and degrees proceed clockwise), and p indicates the height of the light (from 0°, directly above, to 180°, directly below).",example:[1.5,90,80],"sdk-support":{"basic functionality":{js:"0.27.0",android:"5.1.0",ios:"3.6.0",macos:"0.5.0"}}},color:{type:"color",default:"#ffffff",function:"interpolated","zoom-function":!0,"property-function":!1,transition:!0,doc:"Color tint for lighting extruded geometries.","sdk-support":{"basic functionality":{js:"0.27.0",android:"5.1.0",ios:"3.6.0",macos:"0.5.0"}}},intensity:{type:"number",default:.5,minimum:0,maximum:1,function:"interpolated","zoom-function":!0,"property-function":!1,transition:!0,doc:"Intensity of lighting (on a scale from 0 to 1). Higher numbers will present as more extreme contrast.","sdk-support":{"basic functionality":{js:"0.27.0",android:"5.1.0",ios:"3.6.0",macos:"0.5.0"}}}},paint:["paint_fill","paint_line","paint_circle","paint_heatmap","paint_fill-extrusion","paint_symbol","paint_raster","paint_hillshade","paint_background"],paint_fill:{"fill-antialias":{type:"boolean",function:"piecewise-constant","zoom-function":!0,default:!0,doc:"Whether or not the fill should be antialiased.","sdk-support":{"basic functionality":{js:"0.10.0",android:"2.0.1",ios:"2.0.0",macos:"0.1.0"},"data-driven styling":{}}},"fill-opacity":{type:"number",function:"interpolated","zoom-function":!0,"property-function":!0,default:1,minimum:0,maximum:1,doc:"The opacity of the entire fill layer. In contrast to the `fill-color`, this value will also affect the 1px stroke around the fill, if the stroke is used.",transition:!0,"sdk-support":{"basic functionality":{js:"0.10.0",android:"2.0.1",ios:"2.0.0",macos:"0.1.0"},"data-driven styling":{js:"0.21.0",android:"5.0.0",ios:"3.5.0",macos:"0.4.0"}}},"fill-color":{type:"color",default:"#000000",doc:"The color of the filled part of this layer. This color can be specified as `rgba` with an alpha component and the color's opacity will not affect the opacity of the 1px stroke, if it is used.",function:"interpolated","zoom-function":!0,"property-function":!0,transition:!0,requires:[{"!":"fill-pattern"}],"sdk-support":{"basic functionality":{js:"0.10.0",android:"2.0.1",ios:"2.0.0",macos:"0.1.0"},"data-driven styling":{js:"0.19.0",android:"5.0.0",ios:"3.5.0",macos:"0.4.0"}}},"fill-outline-color":{type:"color",doc:"The outline color of the fill. Matches the value of `fill-color` if unspecified.",function:"interpolated","zoom-function":!0,"property-function":!0,transition:!0,requires:[{"!":"fill-pattern"},{"fill-antialias":!0}],"sdk-support":{"basic functionality":{js:"0.10.0",android:"2.0.1",ios:"2.0.0",macos:"0.1.0"},"data-driven styling":{js:"0.19.0",android:"5.0.0",ios:"3.5.0",macos:"0.4.0"}}},"fill-translate":{type:"array",value:"number",length:2,default:[0,0],function:"interpolated","zoom-function":!0,transition:!0,units:"pixels",doc:"The geometry's offset. Values are [x, y] where negatives indicate left and up, respectively.","sdk-support":{"basic functionality":{js:"0.10.0",android:"2.0.1",ios:"2.0.0",macos:"0.1.0"},"data-driven styling":{}}},"fill-translate-anchor":{type:"enum",function:"piecewise-constant","zoom-function":!0,values:{map:{doc:"The fill is translated relative to the map."},viewport:{doc:"The fill is translated relative to the viewport."}},doc:"Controls the frame of reference for `fill-translate`.",default:"map",requires:["fill-translate"],"sdk-support":{"basic functionality":{js:"0.10.0",android:"2.0.1",ios:"2.0.0",macos:"0.1.0"},"data-driven styling":{}}},"fill-pattern":{type:"string",function:"piecewise-constant","zoom-function":!0,transition:!0,doc:"Name of image in sprite to use for drawing image fills. For seamless patterns, image width and height must be a factor of two (2, 4, 8, ..., 512).","sdk-support":{"basic functionality":{js:"0.10.0",android:"2.0.1",ios:"2.0.0",macos:"0.1.0"},"data-driven styling":{}}}},"paint_fill-extrusion":{"fill-extrusion-opacity":{type:"number",function:"interpolated","zoom-function":!0,"property-function":!1,default:1,minimum:0,maximum:1,doc:"The opacity of the entire fill extrusion layer. This is rendered on a per-layer, not per-feature, basis, and data-driven styling is not available.",transition:!0,"sdk-support":{"basic functionality":{js:"0.27.0",android:"5.1.0",ios:"3.6.0",macos:"0.5.0"}}},"fill-extrusion-color":{type:"color",default:"#000000",doc:"The base color of the extruded fill. The extrusion's surfaces will be shaded differently based on this color in combination with the root `light` settings. If this color is specified as `rgba` with an alpha component, the alpha component will be ignored; use `fill-extrusion-opacity` to set layer opacity.",function:"interpolated","zoom-function":!0,"property-function":!0,transition:!0,requires:[{"!":"fill-extrusion-pattern"}],"sdk-support":{"basic functionality":{js:"0.27.0",android:"5.1.0",ios:"3.6.0",macos:"0.5.0"},"data-driven styling":{js:"0.27.0",android:"5.1.0",ios:"3.6.0",macos:"0.5.0"}}},"fill-extrusion-translate":{type:"array",value:"number",length:2,default:[0,0],function:"interpolated","zoom-function":!0,transition:!0,units:"pixels",doc:"The geometry's offset. Values are [x, y] where negatives indicate left and up (on the flat plane), respectively.","sdk-support":{"basic functionality":{js:"0.27.0",android:"5.1.0",ios:"3.6.0",macos:"0.5.0"},"data-driven styling":{}}},"fill-extrusion-translate-anchor":{type:"enum",function:"piecewise-constant","zoom-function":!0,values:{map:{doc:"The fill extrusion is translated relative to the map."},viewport:{doc:"The fill extrusion is translated relative to the viewport."}},doc:"Controls the frame of reference for `fill-extrusion-translate`.",default:"map",requires:["fill-extrusion-translate"],"sdk-support":{"basic functionality":{js:"0.27.0",android:"5.1.0",ios:"3.6.0",macos:"0.5.0"},"data-driven styling":{}}},"fill-extrusion-pattern":{type:"string",function:"piecewise-constant","zoom-function":!0,transition:!0,doc:"Name of image in sprite to use for drawing images on extruded fills. For seamless patterns, image width and height must be a factor of two (2, 4, 8, ..., 512).","sdk-support":{"basic functionality":{js:"0.27.0",android:"5.1.0",ios:"3.6.0",macos:"0.5.0"},"data-driven styling":{}}},"fill-extrusion-height":{type:"number",function:"interpolated","zoom-function":!0,"property-function":!0,default:0,minimum:0,units:"meters",doc:"The height with which to extrude this layer.",transition:!0,"sdk-support":{"basic functionality":{js:"0.27.0",android:"5.1.0",ios:"3.6.0",macos:"0.5.0"},"data-driven styling":{js:"0.27.0",android:"5.1.0",ios:"3.6.0",macos:"0.5.0"}}},"fill-extrusion-base":{type:"number",function:"interpolated","zoom-function":!0,"property-function":!0,default:0,minimum:0,units:"meters",doc:"The height with which to extrude the base of this layer. Must be less than or equal to `fill-extrusion-height`.",transition:!0,requires:["fill-extrusion-height"],"sdk-support":{"basic functionality":{js:"0.27.0",android:"5.1.0",ios:"3.6.0",macos:"0.5.0"},"data-driven styling":{js:"0.27.0",android:"5.1.0",ios:"3.6.0",macos:"0.5.0"}}}},paint_line:{"line-opacity":{type:"number",doc:"The opacity at which the line will be drawn.",function:"interpolated","zoom-function":!0,"property-function":!0,default:1,minimum:0,maximum:1,transition:!0,"sdk-support":{"basic functionality":{js:"0.10.0",android:"2.0.1",ios:"2.0.0",macos:"0.1.0"},"data-driven styling":{js:"0.29.0",android:"5.0.0",ios:"3.5.0",macos:"0.4.0"}}},"line-color":{type:"color",doc:"The color with which the line will be drawn.",default:"#000000",function:"interpolated","zoom-function":!0,"property-function":!0,transition:!0,requires:[{"!":"line-pattern"}],"sdk-support":{"basic functionality":{js:"0.10.0",android:"2.0.1",ios:"2.0.0",macos:"0.1.0"},"data-driven styling":{js:"0.23.0",android:"5.0.0",ios:"3.5.0",macos:"0.4.0"}}},"line-translate":{type:"array",value:"number",length:2,default:[0,0],function:"interpolated","zoom-function":!0,transition:!0,units:"pixels",doc:"The geometry's offset. Values are [x, y] where negatives indicate left and up, respectively.","sdk-support":{"basic functionality":{js:"0.10.0",android:"2.0.1",ios:"2.0.0",macos:"0.1.0"},"data-driven styling":{}}},"line-translate-anchor":{type:"enum",function:"piecewise-constant","zoom-function":!0,values:{map:{doc:"The line is translated relative to the map."},viewport:{doc:"The line is translated relative to the viewport."}},doc:"Controls the frame of reference for `line-translate`.",default:"map",requires:["line-translate"],"sdk-support":{"basic functionality":{js:"0.10.0",android:"2.0.1",ios:"2.0.0",macos:"0.1.0"},"data-driven styling":{}}},"line-width":{type:"number",default:1,minimum:0,function:"interpolated","zoom-function":!0,"property-function":!0,transition:!0,units:"pixels",doc:"Stroke thickness.","sdk-support":{"basic functionality":{js:"0.10.0",android:"2.0.1",ios:"2.0.0",macos:"0.1.0"},"data-driven styling":{js:"0.39.0"}}},"line-gap-width":{type:"number",default:0,minimum:0,doc:"Draws a line casing outside of a line's actual path. Value indicates the width of the inner gap.",function:"interpolated","zoom-function":!0,"property-function":!0,transition:!0,units:"pixels","sdk-support":{"basic functionality":{js:"0.10.0",android:"2.0.1",ios:"2.0.0",macos:"0.1.0"},"data-driven styling":{js:"0.29.0",android:"5.0.0",ios:"3.5.0",macos:"0.4.0"}}},"line-offset":{type:"number",default:0,doc:"The line's offset. For linear features, a positive value offsets the line to the right, relative to the direction of the line, and a negative value to the left. For polygon features, a positive value results in an inset, and a negative value results in an outset.",function:"interpolated","zoom-function":!0,"property-function":!0,transition:!0,units:"pixels","sdk-support":{"basic functionality":{js:"0.12.1",android:"3.0.0",ios:"3.1.0",macos:"0.1.0"},"data-driven styling":{js:"0.29.0",android:"5.0.0",ios:"3.5.0",macos:"0.4.0"}}},"line-blur":{type:"number",default:0,minimum:0,function:"interpolated","zoom-function":!0,"property-function":!0,transition:!0,units:"pixels",doc:"Blur applied to the line, in pixels.","sdk-support":{"basic functionality":{js:"0.10.0",android:"2.0.1",ios:"2.0.0",macos:"0.1.0"},"data-driven styling":{js:"0.29.0",android:"5.0.0",ios:"3.5.0",macos:"0.4.0"}}},"line-dasharray":{type:"array",value:"number",function:"piecewise-constant","zoom-function":!0,doc:"Specifies the lengths of the alternating dashes and gaps that form the dash pattern. The lengths are later scaled by the line width. To convert a dash length to pixels, multiply the length by the current line width.",minimum:0,transition:!0,units:"line widths",requires:[{"!":"line-pattern"}],"sdk-support":{"basic functionality":{js:"0.10.0",android:"2.0.1",ios:"2.0.0",macos:"0.1.0"},"data-driven styling":{}}},"line-pattern":{type:"string",function:"piecewise-constant","zoom-function":!0,transition:!0,doc:"Name of image in sprite to use for drawing image lines. For seamless patterns, image width must be a factor of two (2, 4, 8, ..., 512).","sdk-support":{"basic functionality":{js:"0.10.0",android:"2.0.1",ios:"2.0.0",macos:"0.1.0"},"data-driven styling":{}}}},paint_circle:{"circle-radius":{type:"number",default:5,minimum:0,function:"interpolated","zoom-function":!0,"property-function":!0,transition:!0,units:"pixels",doc:"Circle radius.","sdk-support":{"basic functionality":{js:"0.10.0",android:"2.0.1",ios:"2.0.0",macos:"0.1.0"},"data-driven styling":{js:"0.18.0",android:"5.0.0",ios:"3.5.0",macos:"0.4.0"}}},"circle-color":{type:"color",default:"#000000",doc:"The fill color of the circle.",function:"interpolated","zoom-function":!0,"property-function":!0,transition:!0,"sdk-support":{"basic functionality":{js:"0.10.0",android:"2.0.1",ios:"2.0.0",macos:"0.1.0"},"data-driven styling":{js:"0.18.0",android:"5.0.0",ios:"3.5.0",macos:"0.4.0"}}},"circle-blur":{type:"number",default:0,doc:"Amount to blur the circle. 1 blurs the circle such that only the centerpoint is full opacity.",function:"interpolated","zoom-function":!0,"property-function":!0,transition:!0,"sdk-support":{"basic functionality":{js:"0.10.0",android:"2.0.1",ios:"2.0.0",macos:"0.1.0"},"data-driven styling":{js:"0.20.0",android:"5.0.0",ios:"3.5.0",macos:"0.4.0"}}},"circle-opacity":{type:"number",doc:"The opacity at which the circle will be drawn.",default:1,minimum:0,maximum:1,function:"interpolated","zoom-function":!0,"property-function":!0,transition:!0,"sdk-support":{"basic functionality":{js:"0.10.0",android:"2.0.1",ios:"2.0.0",macos:"0.1.0"},"data-driven styling":{js:"0.20.0",android:"5.0.0",ios:"3.5.0",macos:"0.4.0"}}},"circle-translate":{type:"array",value:"number",length:2,default:[0,0],function:"interpolated","zoom-function":!0,transition:!0,units:"pixels",doc:"The geometry's offset. Values are [x, y] where negatives indicate left and up, respectively.","sdk-support":{"basic functionality":{js:"0.10.0",android:"2.0.1",ios:"2.0.0",macos:"0.1.0"},"data-driven styling":{}}},"circle-translate-anchor":{type:"enum",function:"piecewise-constant","zoom-function":!0,values:{map:{doc:"The circle is translated relative to the map."},viewport:{doc:"The circle is translated relative to the viewport."}},doc:"Controls the frame of reference for `circle-translate`.",default:"map",requires:["circle-translate"],"sdk-support":{"basic functionality":{js:"0.10.0",android:"2.0.1",ios:"2.0.0",macos:"0.1.0"},"data-driven styling":{}}},"circle-pitch-scale":{type:"enum",function:"piecewise-constant","zoom-function":!0,values:{map:{doc:"Circles are scaled according to their apparent distance to the camera."},viewport:{doc:"Circles are not scaled."}},default:"map",doc:"Controls the scaling behavior of the circle when the map is pitched.","sdk-support":{"basic functionality":{js:"0.21.0",android:"4.2.0",ios:"3.4.0",macos:"0.2.1"},"data-driven styling":{}}},"circle-pitch-alignment":{type:"enum",function:"piecewise-constant","zoom-function":!0,values:{map:{doc:"The circle is aligned to the plane of the map."},viewport:{doc:"The circle is aligned to the plane of the viewport."}},default:"viewport",doc:"Orientation of circle when map is pitched.","sdk-support":{"basic functionality":{js:"0.39.0",android:"5.2.0",ios:"3.7.0",macos:"0.6.0"},"data-driven styling":{}}},"circle-stroke-width":{type:"number",default:0,minimum:0,function:"interpolated","zoom-function":!0,"property-function":!0,transition:!0,units:"pixels",doc:"The width of the circle's stroke. Strokes are placed outside of the `circle-radius`.","sdk-support":{"basic functionality":{js:"0.29.0",android:"5.0.0",ios:"3.5.0",macos:"0.4.0"},"data-driven styling":{js:"0.29.0",android:"5.0.0",ios:"3.5.0",macos:"0.4.0"}}},"circle-stroke-color":{type:"color",default:"#000000",doc:"The stroke color of the circle.",function:"interpolated","zoom-function":!0,"property-function":!0,transition:!0,"sdk-support":{"basic functionality":{js:"0.29.0",android:"5.0.0",ios:"3.5.0",macos:"0.4.0"},"data-driven styling":{js:"0.29.0",android:"5.0.0",ios:"3.5.0",macos:"0.4.0"}}},"circle-stroke-opacity":{type:"number",doc:"The opacity of the circle's stroke.",default:1,minimum:0,maximum:1,function:"interpolated","zoom-function":!0,"property-function":!0,transition:!0,"sdk-support":{"basic functionality":{js:"0.29.0",android:"5.0.0",ios:"3.5.0",macos:"0.4.0"},"data-driven styling":{js:"0.29.0",android:"5.0.0",ios:"3.5.0",macos:"0.4.0"}}}},paint_heatmap:{"heatmap-radius":{type:"number",default:30,minimum:1,function:"interpolated","zoom-function":!0,"property-function":!0,transition:!0,units:"pixels",doc:"Radius of influence of one heatmap point in pixels. Increasing the value makes the heatmap smoother, but less detailed.","sdk-support":{"basic functionality":{js:"0.41.0"},"data-driven styling":{}}},"heatmap-weight":{type:"number",default:1,minimum:0,function:"interpolated","zoom-function":!0,"property-function":!0,transition:!1,doc:"A measure of how much an individual point contributes to the heatmap. A value of 10 would be equivalent to having 10 points of weight 1 in the same spot. Especially useful when combined with clustering.","sdk-support":{"basic functionality":{js:"0.41.0"},"data-driven styling":{js:"0.41.0"}}},"heatmap-intensity":{type:"number",default:1,minimum:0,function:"interpolated","zoom-function":!0,"property-function":!1,transition:!0,doc:"Similar to `heatmap-weight` but controls the intensity of the heatmap globally. Primarily used for adjusting the heatmap based on zoom level.","sdk-support":{"basic functionality":{js:"0.41.0"},"data-driven styling":{}}},"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"],doc:'Defines the color of each pixel based on its density value in a heatmap.  Should be an expression that uses `["heatmap-density"]` as input.',function:"interpolated","zoom-function":!1,"property-function":!1,transition:!1,"sdk-support":{"basic functionality":{js:"0.41.0"},"data-driven styling":{}}},"heatmap-opacity":{type:"number",doc:"The global opacity at which the heatmap layer will be drawn.",default:1,minimum:0,maximum:1,function:"interpolated","zoom-function":!0,"property-function":!1,transition:!0,"sdk-support":{"basic functionality":{js:"0.41.0"},"data-driven styling":{}}}},paint_symbol:{"icon-opacity":{doc:"The opacity at which the icon will be drawn.",type:"number",default:1,minimum:0,maximum:1,function:"interpolated","zoom-function":!0,"property-function":!0,transition:!0,requires:["icon-image"],"sdk-support":{"basic functionality":{js:"0.10.0",android:"2.0.1",ios:"2.0.0",macos:"0.1.0"},"data-driven styling":{js:"0.33.0",android:"5.0.0",ios:"3.5.0",macos:"0.4.0"}}},"icon-color":{type:"color",default:"#000000",function:"interpolated","zoom-function":!0,"property-function":!0,transition:!0,doc:"The color of the icon. This can only be used with sdf icons.",requires:["icon-image"],"sdk-support":{"basic functionality":{js:"0.10.0",android:"2.0.1",ios:"2.0.0",macos:"0.1.0"},"data-driven styling":{js:"0.33.0",android:"5.0.0",ios:"3.5.0",macos:"0.4.0"}}},"icon-halo-color":{type:"color",default:"rgba(0, 0, 0, 0)",function:"interpolated","zoom-function":!0,"property-function":!0,transition:!0,doc:"The color of the icon's halo. Icon halos can only be used with SDF icons.",requires:["icon-image"],"sdk-support":{"basic functionality":{js:"0.10.0",android:"2.0.1",ios:"2.0.0",macos:"0.1.0"},"data-driven styling":{js:"0.33.0",android:"5.0.0",ios:"3.5.0",macos:"0.4.0"}}},"icon-halo-width":{type:"number",default:0,minimum:0,function:"interpolated","zoom-function":!0,"property-function":!0,transition:!0,units:"pixels",doc:"Distance of halo to the icon outline.",requires:["icon-image"],"sdk-support":{"basic functionality":{js:"0.10.0",android:"2.0.1",ios:"2.0.0",macos:"0.1.0"},"data-driven styling":{js:"0.33.0",android:"5.0.0",ios:"3.5.0",macos:"0.4.0"}}},"icon-halo-blur":{type:"number",default:0,minimum:0,function:"interpolated","zoom-function":!0,"property-function":!0,transition:!0,units:"pixels",doc:"Fade out the halo towards the outside.",requires:["icon-image"],"sdk-support":{"basic functionality":{js:"0.10.0",android:"2.0.1",ios:"2.0.0",macos:"0.1.0"},"data-driven styling":{js:"0.33.0",android:"5.0.0",ios:"3.5.0",macos:"0.4.0"}}},"icon-translate":{type:"array",value:"number",length:2,default:[0,0],function:"interpolated","zoom-function":!0,transition:!0,units:"pixels",doc:"Distance that the icon's anchor is moved from its original placement. Positive values indicate right and down, while negative values indicate left and up.",requires:["icon-image"],"sdk-support":{"basic functionality":{js:"0.10.0",android:"2.0.1",ios:"2.0.0",macos:"0.1.0"},"data-driven styling":{}}},"icon-translate-anchor":{type:"enum",function:"piecewise-constant","zoom-function":!0,values:{map:{doc:"Icons are translated relative to the map."},viewport:{doc:"Icons are translated relative to the viewport."}},doc:"Controls the frame of reference for `icon-translate`.",default:"map",requires:["icon-image","icon-translate"],"sdk-support":{"basic functionality":{js:"0.10.0",android:"2.0.1",ios:"2.0.0",macos:"0.1.0"},"data-driven styling":{}}},"text-opacity":{type:"number",doc:"The opacity at which the text will be drawn.",default:1,minimum:0,maximum:1,function:"interpolated","zoom-function":!0,"property-function":!0,transition:!0,requires:["text-field"],"sdk-support":{"basic functionality":{js:"0.10.0",android:"2.0.1",ios:"2.0.0",macos:"0.1.0"},"data-driven styling":{js:"0.33.0",android:"5.0.0",ios:"3.5.0",macos:"0.4.0"}}},"text-color":{type:"color",doc:"The color with which the text will be drawn.",default:"#000000",function:"interpolated","zoom-function":!0,"property-function":!0,transition:!0,requires:["text-field"],"sdk-support":{"basic functionality":{js:"0.10.0",android:"2.0.1",ios:"2.0.0",macos:"0.1.0"},"data-driven styling":{js:"0.33.0",android:"5.0.0",ios:"3.5.0",macos:"0.4.0"}}},"text-halo-color":{type:"color",default:"rgba(0, 0, 0, 0)",function:"interpolated","zoom-function":!0,"property-function":!0,transition:!0,doc:"The color of the text's halo, which helps it stand out from backgrounds.",requires:["text-field"],"sdk-support":{"basic functionality":{js:"0.10.0",android:"2.0.1",ios:"2.0.0",macos:"0.1.0"},"data-driven styling":{js:"0.33.0",android:"5.0.0",ios:"3.5.0",macos:"0.4.0"}}},"text-halo-width":{type:"number",default:0,minimum:0,function:"interpolated","zoom-function":!0,"property-function":!0,transition:!0,units:"pixels",doc:"Distance of halo to the font outline. Max text halo width is 1/4 of the font-size.",requires:["text-field"],"sdk-support":{"basic functionality":{js:"0.10.0",android:"2.0.1",ios:"2.0.0",macos:"0.1.0"},"data-driven styling":{js:"0.33.0",android:"5.0.0",ios:"3.5.0",macos:"0.4.0"}}},"text-halo-blur":{type:"number",default:0,minimum:0,function:"interpolated","zoom-function":!0,"property-function":!0,transition:!0,units:"pixels",doc:"The halo's fadeout distance towards the outside.",requires:["text-field"],"sdk-support":{"basic functionality":{js:"0.10.0",android:"2.0.1",ios:"2.0.0",macos:"0.1.0"},"data-driven styling":{js:"0.33.0",android:"5.0.0",ios:"3.5.0",macos:"0.4.0"}}},"text-translate":{type:"array",value:"number",length:2,default:[0,0],function:"interpolated","zoom-function":!0,transition:!0,units:"pixels",doc:"Distance that the text's anchor is moved from its original placement. Positive values indicate right and down, while negative values indicate left and up.",requires:["text-field"],"sdk-support":{"basic functionality":{js:"0.10.0",android:"2.0.1",ios:"2.0.0",macos:"0.1.0"},"data-driven styling":{}}},"text-translate-anchor":{type:"enum",function:"piecewise-constant","zoom-function":!0,values:{map:{doc:"The text is translated relative to the map."},viewport:{doc:"The text is translated relative to the viewport."}},doc:"Controls the frame of reference for `text-translate`.",default:"map",requires:["text-field","text-translate"],"sdk-support":{"basic functionality":{js:"0.10.0",android:"2.0.1",ios:"2.0.0",macos:"0.1.0"},"data-driven styling":{}}}},paint_raster:{"raster-opacity":{type:"number",doc:"The opacity at which the image will be drawn.",default:1,minimum:0,maximum:1,function:"interpolated","zoom-function":!0,transition:!0,"sdk-support":{"basic functionality":{js:"0.10.0",android:"2.0.1",ios:"2.0.0",macos:"0.1.0"},"data-driven styling":{}}},"raster-hue-rotate":{type:"number",default:0,period:360,function:"interpolated","zoom-function":!0,transition:!0,units:"degrees",doc:"Rotates hues around the color wheel.","sdk-support":{"basic functionality":{js:"0.10.0",android:"2.0.1",ios:"2.0.0",macos:"0.1.0"},"data-driven styling":{}}},"raster-brightness-min":{type:"number",function:"interpolated","zoom-function":!0,doc:"Increase or reduce the brightness of the image. The value is the minimum brightness.",default:0,minimum:0,maximum:1,transition:!0,"sdk-support":{"basic functionality":{js:"0.10.0",android:"2.0.1",ios:"2.0.0",macos:"0.1.0"},"data-driven styling":{}}},"raster-brightness-max":{type:"number",function:"interpolated","zoom-function":!0,doc:"Increase or reduce the brightness of the image. The value is the maximum brightness.",default:1,minimum:0,maximum:1,transition:!0,"sdk-support":{"basic functionality":{js:"0.10.0",android:"2.0.1",ios:"2.0.0",macos:"0.1.0"},"data-driven styling":{}}},"raster-saturation":{type:"number",doc:"Increase or reduce the saturation of the image.",default:0,minimum:-1,maximum:1,function:"interpolated","zoom-function":!0,transition:!0,"sdk-support":{"basic functionality":{js:"0.10.0",android:"2.0.1",ios:"2.0.0",macos:"0.1.0"},"data-driven styling":{}}},"raster-contrast":{type:"number",doc:"Increase or reduce the contrast of the image.",default:0,minimum:-1,maximum:1,function:"interpolated","zoom-function":!0,transition:!0,"sdk-support":{"basic functionality":{js:"0.10.0",android:"2.0.1",ios:"2.0.0",macos:"0.1.0"},"data-driven styling":{}}},"raster-fade-duration":{type:"number",default:300,minimum:0,function:"interpolated","zoom-function":!0,transition:!1,units:"milliseconds",doc:"Fade duration when a new tile is added.","sdk-support":{"basic functionality":{js:"0.10.0",android:"2.0.1",ios:"2.0.0",macos:"0.1.0"},"data-driven styling":{}}}},paint_hillshade:{"hillshade-illumination-direction":{type:"number",default:335,minimum:0,maximum:359,doc:"The direction of the light source used to generate the hillshading with 0 as the top of the viewport if `hillshade-illumination-anchor` is set to `viewport` and due north if `hillshade-illumination-anchor` is set to `map`.",function:"interpolated","zoom-function":!0,transition:!1},"hillshade-illumination-anchor":{type:"enum",function:"piecewise-constant","zoom-function":!0,values:{map:{doc:"The hillshade illumination is relative to the north direction."},viewport:{doc:"The hillshade illumination is relative to the top of the viewport."}},default:"viewport",doc:"Direction of light source when map is rotated."},"hillshade-exaggeration":{type:"number",doc:"Intensity of the hillshade",default:.5,minimum:0,maximum:1,function:"interpolated","zoom-function":!0,transition:!0},"hillshade-shadow-color":{type:"color",default:"#000000",doc:"The shading color of areas that face away from the light source.",function:"interpolated","zoom-function":!0,transition:!0},"hillshade-highlight-color":{type:"color",default:"#FFFFFF",doc:"The shading color of areas that faces towards the light source.",function:"interpolated","zoom-function":!0,transition:!0},"hillshade-accent-color":{type:"color",default:"#000000",doc:"The shading color used to accentuate rugged terrain like sharp cliffs and gorges.",function:"interpolated","zoom-function":!0,transition:!0}},paint_background:{"background-color":{type:"color",default:"#000000",doc:"The color with which the background will be drawn.",function:"interpolated","zoom-function":!0,transition:!0,requires:[{"!":"background-pattern"}],"sdk-support":{"basic functionality":{js:"0.10.0",android:"2.0.1",ios:"2.0.0",macos:"0.1.0"}}},"background-pattern":{type:"string",function:"piecewise-constant","zoom-function":!0,transition:!0,doc:"Name of image in sprite to use for drawing an image background. For seamless patterns, image width and height must be a factor of two (2, 4, 8, ..., 512).","sdk-support":{"basic functionality":{js:"0.10.0",android:"2.0.1",ios:"2.0.0",macos:"0.1.0"}}},"background-opacity":{type:"number",default:1,minimum:0,maximum:1,doc:"The opacity at which the background will be drawn.",function:"interpolated","zoom-function":!0,transition:!0,"sdk-support":{"basic functionality":{js:"0.10.0",android:"2.0.1",ios:"2.0.0",macos:"0.1.0"}}}},transition:{duration:{type:"number",default:300,minimum:0,units:"milliseconds",doc:"Time allotted for transitions to complete."},delay:{type:"number",default:0,minimum:0,units:"milliseconds",doc:"Length of time before a transition begins."}}}},function(t,e,n){var r=n(75),i=n(29),o=n(13),a=n(150);function s(t,e){e=e||o;var n=[];return n=n.concat(i({key:"",value:t,valueSpec:e.$root,styleSpec:e,style:t,objectElementValidators:{glyphs:a,"*":function(){return[]}}})),t.constants&&(n=n.concat(r({key:"constants",value:t.constants,style:t,styleSpec:e}))),u(n)}function u(t){return[].concat(t).sort(function(t,e){return t.line-e.line})}function l(t){return function(){return u(t.apply(this,arguments))}}s.source=l(n(99)),s.light=l(n(100)),s.layer=l(n(95)),s.filter=l(n(59)),s.paintProperty=l(n(96)),s.layoutProperty=l(n(98)),t.exports=s},function(t,e,n){function r(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,r.key,r)}}var i=n(8),o=i.array,a=i.ValueType,s=i.NumberType,u=n(31),l=function(){function t(e,n,r){!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,t),this.type=e,this.index=n,this.input=r}var e,n,i;return e=t,i=[{key:"parse",value:function(e,n){if(3!==e.length)return n.error("Expected 2 arguments, but found ".concat(e.length-1," instead."));var r=n.parse(e[1],1,s),i=n.parse(e[2],2,o(n.expectedType||a));return r&&i?new t(i.type.itemType,r,i):null}}],(n=[{key:"evaluate",value:function(t){var e=this.index.evaluate(t),n=this.input.evaluate(t);if(e<0||e>=n.length)throw new u("Array index out of bounds: ".concat(e," > ").concat(n.length,"."));if(e!==Math.floor(e))throw new u("Array index must be an integer, but found ".concat(e," instead."));return n[e]}},{key:"eachChild",value:function(t){t(this.index),t(this.input)}},{key:"possibleOutputs",value:function(){return[void 0]}}])&&r(e.prototype,n),i&&r(e,i),t}();t.exports=l},function(t,e,n){function r(t){return function(t){if(Array.isArray(t)){for(var e=0,n=new Array(t.length);e<t.length;e++)n[e]=t[e];return n}}(t)||function(t){if(Symbol.iterator in Object(t)||"[object Arguments]"===Object.prototype.toString.call(t))return Array.from(t)}(t)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance")}()}function i(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,r.key,r)}}var o=n(1),a=n(25).typeOf,s=function(){function t(e,n,r,i,o,a){!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,t),this.inputType=e,this.type=n,this.input=r,this.cases=i,this.outputs=o,this.otherwise=a}var e,n,s;return e=t,s=[{key:"parse",value:function(e,n){if(e.length<5)return n.error("Expected at least 4 arguments, but found only ".concat(e.length-1,"."));if(e.length%2!=1)return n.error("Expected an even number of arguments.");var r,i;n.expectedType&&"value"!==n.expectedType.kind&&(i=n.expectedType);for(var s={},u=[],l=2;l<e.length-1;l+=2){var c=e[l],f=e[l+1];Array.isArray(c)||(c=[c]);var h=n.concat(l);if(0===c.length)return h.error("Expected at least one branch label.");var p=!0,d=!1,y=void 0;try{for(var m,v=c[Symbol.iterator]();!(p=(m=v.next()).done);p=!0){var g=m.value;if("number"!=typeof g&&"string"!=typeof g)return h.error("Branch labels must be numbers or strings.");if("number"==typeof g&&Math.abs(g)>Number.MAX_SAFE_INTEGER)return h.error("Branch labels must be integers no larger than ".concat(Number.MAX_SAFE_INTEGER,"."));if("number"==typeof g&&Math.floor(g)!==g)return h.error("Numeric branch labels must be integer values.");if(r){if(h.checkSubtype(r,a(g)))return null}else r=a(g);if(void 0!==s[String(g)])return h.error("Branch labels must be unique.");s[String(g)]=u.length}}catch(t){d=!0,y=t}finally{try{p||null==v.return||v.return()}finally{if(d)throw y}}var b=n.parse(f,l,i);if(!b)return null;i=i||b.type,u.push(b)}var x=n.parse(e[1],1,r);if(!x)return null;var _=n.parse(e[e.length-1],e.length-1,i);return _?(o(r&&i),new t(r,i,x,s,u,_)):null}}],(n=[{key:"evaluate",value:function(t){var e=this.input.evaluate(t);return(this.outputs[this.cases[e]]||this.otherwise).evaluate(t)}},{key:"eachChild",value:function(t){t(this.input),this.outputs.forEach(t),t(this.otherwise)}},{key:"possibleOutputs",value:function(){var t;return(t=[]).concat.apply(t,r(this.outputs.map(function(t){return t.possibleOutputs()}))).concat(this.otherwise.possibleOutputs())}}])&&i(e.prototype,n),s&&i(e,s),t}();t.exports=s},function(t,e,n){function r(t){return function(t){if(Array.isArray(t)){for(var e=0,n=new Array(t.length);e<t.length;e++)n[e]=t[e];return n}}(t)||function(t){if(Symbol.iterator in Object(t)||"[object Arguments]"===Object.prototype.toString.call(t))return Array.from(t)}(t)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance")}()}function i(t,e){return function(t){if(Array.isArray(t))return t}(t)||function(t,e){var n=[],r=!0,i=!1,o=void 0;try{for(var a,s=t[Symbol.iterator]();!(r=(a=s.next()).done)&&(n.push(a.value),!e||n.length!==e);r=!0);}catch(t){i=!0,o=t}finally{try{r||null==s.return||s.return()}finally{if(i)throw o}}return n}(t,e)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance")}()}function o(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,r.key,r)}}var a=n(1),s=n(8).BooleanType,u=function(){function t(e,n,r){!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,t),this.type=e,this.branches=n,this.otherwise=r}var e,n,u;return e=t,u=[{key:"parse",value:function(e,n){if(e.length<4)return n.error("Expected at least 3 arguments, but found only ".concat(e.length-1,"."));if(e.length%2!=0)return n.error("Expected an odd number of arguments.");var r;n.expectedType&&"value"!==n.expectedType.kind&&(r=n.expectedType);for(var i=[],o=1;o<e.length-1;o+=2){var u=n.parse(e[o],o,s);if(!u)return null;var l=n.parse(e[o+1],o+1,r);if(!l)return null;i.push([u,l]),r=r||l.type}var c=n.parse(e[e.length-1],e.length-1,r);return c?(a(r),new t(r,i,c)):null}}],(n=[{key:"evaluate",value:function(t){var e=!0,n=!1,r=void 0;try{for(var o,a=this.branches[Symbol.iterator]();!(e=(o=a.next()).done);e=!0){var s=i(o.value,2),u=s[0],l=s[1];if(u.evaluate(t))return l.evaluate(t)}}catch(t){n=!0,r=t}finally{try{e||null==a.return||a.return()}finally{if(n)throw r}}return this.otherwise.evaluate(t)}},{key:"eachChild",value:function(t){var e=!0,n=!1,r=void 0;try{for(var o,a=this.branches[Symbol.iterator]();!(e=(o=a.next()).done);e=!0){var s=i(o.value,2),u=s[0],l=s[1];t(u),t(l)}}catch(t){n=!0,r=t}finally{try{e||null==a.return||a.return()}finally{if(n)throw r}}t(this.otherwise)}},{key:"possibleOutputs",value:function(){var t;return(t=[]).concat.apply(t,r(this.branches.map(function(t){var e=i(t,2);e[0];return e[1].possibleOutputs()}))).concat(this.otherwise.possibleOutputs())}}])&&o(e.prototype,n),u&&o(e,u),t}();t.exports=u},function(t,e,n){function r(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,r.key,r)}}var i=n(8),o=i.ValueType,a=i.BooleanType,s=n(8).toString;function u(t){return"string"===t.kind||"number"===t.kind||"boolean"===t.kind||"null"===t.kind}function l(t){return function(){function e(t,n){!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,e),this.type=a,this.lhs=t,this.rhs=n}var n,i,l;return n=e,l=[{key:"parse",value:function(t,n){if(3!==t.length)return n.error("Expected two arguments.");var r=n.parse(t[1],1,o);if(!r)return null;var i=n.parse(t[2],2,o);return i?u(r.type)||u(i.type)?r.type.kind!==i.type.kind&&"value"!==r.type.kind&&"value"!==i.type.kind?n.error("Cannot compare ".concat(s(r.type)," and ").concat(s(i.type),".")):new e(r,i):n.error("Expected at least one argument to be a string, number, boolean, or null, but found (".concat(s(r.type),", ").concat(s(i.type),") instead.")):null}}],(i=[{key:"evaluate",value:function(e){return t(this.lhs.evaluate(e),this.rhs.evaluate(e))}},{key:"eachChild",value:function(t){t(this.lhs),t(this.rhs)}},{key:"possibleOutputs",value:function(){return[!0,!1]}}])&&r(n.prototype,i),l&&r(n,l),e}()}t.exports={Equals:l(function(t,e){return t===e}),NotEquals:l(function(t,e){return t!==e})}},function(t,e){t.exports={success:function(t){return{result:"success",value:t}},error:function(t){return{result:"error",value:t}}}},function(t,e,n){var r=n(12),i=n(26).number,o=.95047,a=1,s=1.08883,u=4/29,l=6/29,c=3*l*l,f=l*l*l,h=Math.PI/180,p=180/Math.PI;function d(t){return t>f?Math.pow(t,1/3):t/c+u}function y(t){return t>l?t*t*t:c*(t-u)}function m(t){return 255*(t<=.0031308?12.92*t:1.055*Math.pow(t,1/2.4)-.055)}function v(t){return(t/=255)<=.04045?t/12.92:Math.pow((t+.055)/1.055,2.4)}function g(t){var e=v(t.r),n=v(t.g),r=v(t.b),i=d((.4124564*e+.3575761*n+.1804375*r)/o),u=d((.2126729*e+.7151522*n+.072175*r)/a);return{l:116*u-16,a:500*(i-u),b:200*(u-d((.0193339*e+.119192*n+.9503041*r)/s)),alpha:t.a}}function b(t){var e=(t.l+16)/116,n=isNaN(t.a)?e:e+t.a/500,i=isNaN(t.b)?e:e-t.b/200;return e=a*y(e),n=o*y(n),i=s*y(i),new r(m(3.2404542*n-1.5371385*e-.4985314*i),m(-.969266*n+1.8760108*e+.041556*i),m(.0556434*n-.2040259*e+1.0572252*i),t.alpha)}function x(t,e,n){var r=e-t;return t+n*(r>180||r<-180?r-360*Math.round(r/360):r)}t.exports={lab:{forward:g,reverse:b,interpolate:function(t,e,n){return{l:i(t.l,e.l,n),a:i(t.a,e.a,n),b:i(t.b,e.b,n),alpha:i(t.alpha,e.alpha,n)}}},hcl:{forward:function(t){var e=g(t),n=e.l,r=e.a,i=e.b,o=Math.atan2(i,r)*p;return{h:o<0?o+360:o,c:Math.sqrt(r*r+i*i),l:n,alpha:t.a}},reverse:function(t){var e=t.h*h,n=t.c;return b({l:t.l,a:Math.cos(e)*n,b:Math.sin(e)*n,alpha:t.alpha})},interpolate:function(t,e,n){return{h:x(t.h,e.h,n),c:i(t.c,e.c,n),l:i(t.l,e.l,n),alpha:i(t.alpha,e.alpha,n)}}}}},function(t,e,n){var r=n(17),i=n(7);t.exports=function(t){var e=t.value,n=t.key,o=r(e);return"boolean"!==o?[new i(n,e,"boolean expected, ".concat(o," found"))]:[]}},function(t,e,n){var r=n(7),i=n(17),o=n(80).parseCSSColor;t.exports=function(t){var e=t.key,n=t.value,a=i(n);return"string"!==a?[new r(e,n,"color expected, ".concat(a," found"))]:null===o(n)?[new r(e,n,'color expected, "'.concat(n,'" found'))]:[]}},function(t,e,n){var r=n(7),i=n(101);t.exports=function(t){var e=t.value,n=t.key,o=i(t);return o.length?o:(-1===e.indexOf("{fontstack}")&&o.push(new r(n,e,'"glyphs" url must include a "{fontstack}" token')),-1===e.indexOf("{range}")&&o.push(new r(n,e,'"glyphs" url must include a "{range}" token')),o)}},function(t,e,n){function r(t){return(r="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t})(t)}function i(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,r.key,r)}}function o(t,e){return!e||"object"!==r(e)&&"function"!=typeof e?function(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}(t):e}function a(t){return(a=Object.setPrototypeOf?Object.getPrototypeOf:function(t){return t.__proto__||Object.getPrototypeOf(t)})(t)}function s(t,e){return(s=Object.setPrototypeOf||function(t,e){return t.__proto__=e,t})(t,e)}var u=n(19),l=n(103),c=n(44).multiPolygonIntersectsBufferedMultiPoint,f=n(47),h=f.getMaximumPaintValue,p=f.translateDistance,d=f.translate,y=n(154),m=n(4),v=(m.Transitionable,m.Transitioning,m.PossiblyEvaluated,function(t){function e(t){return function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,e),o(this,a(e).call(this,t,y))}var n,r,f;return function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),e&&s(t,e)}(e,u),n=e,(r=[{key:"createBucket",value:function(t){return new l(t)}},{key:"queryRadius",value:function(t){var e=t;return h("circle-radius",this,e)+h("circle-stroke-width",this,e)+p(this.paint.get("circle-translate"))}},{key:"queryIntersectsFeature",value:function(t,e,n,r,i,o){var a=d(t,this.paint.get("circle-translate"),this.paint.get("circle-translate-anchor"),i,o),s=this.paint.get("circle-radius").evaluate(e)*o,u=this.paint.get("circle-stroke-width").evaluate(e)*o;return c(a,n,s+u)}}])&&i(n.prototype,r),f&&i(n,f),e}());t.exports=v},function(t,e,n){var r=n(23).createLayout;t.exports=r([{name:"a_pos",components:2,type:"Int16"}],4)},function(t,e,n){var r=n(0);e.packUint8ToFloat=function(t,e){return 256*(t=r.clamp(Math.floor(t),0,255))+(e=r.clamp(Math.floor(e),0,255))}},function(t,e,n){var r=n(13),i=n(4),o=i.Properties,a=i.DataConstantProperty,s=i.DataDrivenProperty,u=(i.CrossFadedProperty,i.HeatmapColorProperty,new o({"circle-radius":new s(r.paint_circle["circle-radius"]),"circle-color":new s(r.paint_circle["circle-color"]),"circle-blur":new s(r.paint_circle["circle-blur"]),"circle-opacity":new s(r.paint_circle["circle-opacity"]),"circle-translate":new a(r.paint_circle["circle-translate"]),"circle-translate-anchor":new a(r.paint_circle["circle-translate-anchor"]),"circle-pitch-scale":new a(r.paint_circle["circle-pitch-scale"]),"circle-pitch-alignment":new a(r.paint_circle["circle-pitch-alignment"]),"circle-stroke-width":new s(r.paint_circle["circle-stroke-width"]),"circle-stroke-color":new s(r.paint_circle["circle-stroke-color"]),"circle-stroke-opacity":new s(r.paint_circle["circle-stroke-opacity"])}));t.exports={paint:u}},function(t,e,n){function r(t){return(r="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t})(t)}function i(t,e){return!e||"object"!==r(e)&&"function"!=typeof e?function(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}(t):e}function o(t,e,n){return(o="undefined"!=typeof Reflect&&Reflect.get?Reflect.get:function(t,e,n){var r=function(t,e){for(;!Object.prototype.hasOwnProperty.call(t,e)&&null!==(t=a(t)););return t}(t,e);if(r){var i=Object.getOwnPropertyDescriptor(r,e);return i.get?i.get.call(n):i.value}})(t,e,n||t)}function a(t){return(a=Object.setPrototypeOf?Object.getPrototypeOf:function(t){return t.__proto__||Object.getPrototypeOf(t)})(t)}function s(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,r.key,r)}}function u(t,e,n){return e&&s(t.prototype,e),n&&s(t,n),t}function l(t,e){return(l=Object.setPrototypeOf||function(t,e){return t.__proto__=e,t})(t,e)}var c=n(19),f=n(156),h=n(33).RGBAImage,p=n(157),d=n(4),y=(d.Transitionable,d.Transitioning,d.PossiblyEvaluated,function(t){function e(t){var n;return function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,e),(n=i(this,a(e).call(this,t,p)))._updateColorRamp(),n}return function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),e&&l(t,e)}(e,c),u(e,[{key:"createBucket",value:function(t){return new f(t)}}]),u(e,[{key:"setPaintProperty",value:function(t,n,r){o(a(e.prototype),"setPaintProperty",this).call(this,t,n,r),"heatmap-color"===t&&this._updateColorRamp()}},{key:"_updateColorRamp",value:function(){for(var t=this._transitionablePaint._values["heatmap-color"].value.expression,e=new Uint8Array(1024),n=e.length,r=4;r<n;r+=4){var i=t.evaluate({heatmapDensity:r/n});e[r+0]=Math.floor(255*i.r/i.a),e[r+1]=Math.floor(255*i.g/i.a),e[r+2]=Math.floor(255*i.b/i.a),e[r+3]=Math.floor(255*i.a)}this.colorRamp=new h({width:256,height:1},e),this.colorRampTexture=null}},{key:"resize",value:function(){this.heatmapFbo&&(this.heatmapFbo.destroy(),this.heatmapFbo=null)}},{key:"queryRadius",value:function(){return 0}},{key:"queryIntersectsFeature",value:function(){return!1}},{key:"hasOffscreenPass",value:function(){return 0!==this.paint.get("heatmap-opacity")&&"none"!==this.visibility}}]),e}());t.exports=y},function(t,e,n){function r(t){return(r="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t})(t)}function i(t,e){return!e||"object"!==r(e)&&"function"!=typeof e?function(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}(t):e}function o(t){return(o=Object.setPrototypeOf?Object.getPrototypeOf:function(t){return t.__proto__||Object.getPrototypeOf(t)})(t)}function a(t,e){return(a=Object.setPrototypeOf||function(t,e){return t.__proto__=e,t})(t,e)}var s=n(103),u=n(11).register,l=function(t){function e(){return function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,e),i(this,o(e).apply(this,arguments))}return function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),e&&a(t,e)}(e,s),e}();u("HeatmapBucket",l,{omit:["layers"]}),t.exports=l},function(t,e,n){var r=n(13),i=n(4),o=i.Properties,a=i.DataConstantProperty,s=i.DataDrivenProperty,u=(i.CrossFadedProperty,i.HeatmapColorProperty),l=new o({"heatmap-radius":new s(r.paint_heatmap["heatmap-radius"]),"heatmap-weight":new s(r.paint_heatmap["heatmap-weight"]),"heatmap-intensity":new a(r.paint_heatmap["heatmap-intensity"]),"heatmap-color":new u(r.paint_heatmap["heatmap-color"]),"heatmap-opacity":new a(r.paint_heatmap["heatmap-opacity"])});t.exports={paint:l}},function(t,e,n){function r(t){return(r="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t})(t)}function i(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,r.key,r)}}function o(t,e){return!e||"object"!==r(e)&&"function"!=typeof e?function(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}(t):e}function a(t){return(a=Object.setPrototypeOf?Object.getPrototypeOf:function(t){return t.__proto__||Object.getPrototypeOf(t)})(t)}function s(t,e){return(s=Object.setPrototypeOf||function(t,e){return t.__proto__=e,t})(t,e)}var u=n(19),l=n(159),c=n(4),f=(c.Transitionable,c.Transitioning,c.PossiblyEvaluated,function(t){function e(t){return function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,e),o(this,a(e).call(this,t,l))}var n,r,c;return function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),e&&s(t,e)}(e,u),n=e,(r=[{key:"hasOffscreenPass",value:function(){return 0!==this.paint.get("hillshade-exaggeration")&&"none"!==this.visibility}}])&&i(n.prototype,r),c&&i(n,c),e}());t.exports=f},function(t,e,n){var r=n(13),i=n(4),o=i.Properties,a=i.DataConstantProperty,s=(i.DataDrivenProperty,i.CrossFadedProperty,i.HeatmapColorProperty,new o({"hillshade-illumination-direction":new a(r.paint_hillshade["hillshade-illumination-direction"]),"hillshade-illumination-anchor":new a(r.paint_hillshade["hillshade-illumination-anchor"]),"hillshade-exaggeration":new a(r.paint_hillshade["hillshade-exaggeration"]),"hillshade-shadow-color":new a(r.paint_hillshade["hillshade-shadow-color"]),"hillshade-highlight-color":new a(r.paint_hillshade["hillshade-highlight-color"]),"hillshade-accent-color":new a(r.paint_hillshade["hillshade-accent-color"])}));t.exports={paint:s}},function(t,e,n){function r(t){return(r="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t})(t)}function i(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,r.key,r)}}function o(t,e){return!e||"object"!==r(e)&&"function"!=typeof e?function(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}(t):e}function a(t){return(a=Object.setPrototypeOf?Object.getPrototypeOf:function(t){return t.__proto__||Object.getPrototypeOf(t)})(t)}function s(t,e){return(s=Object.setPrototypeOf||function(t,e){return t.__proto__=e,t})(t,e)}var u=n(19),l=n(161),c=n(44).multiPolygonIntersectsMultiPolygon,f=n(47),h=f.translateDistance,p=f.translate,d=n(164),y=n(4),m=(y.Transitionable,y.Transitioning,y.PossiblyEvaluated,function(t){function e(t){return function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,e),o(this,a(e).call(this,t,d))}var n,r,f;return function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),e&&s(t,e)}(e,u),n=e,(r=[{key:"recalculate",value: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"])}},{key:"createBucket",value:function(t){return new l(t)}},{key:"queryRadius",value:function(){return h(this.paint.get("fill-translate"))}},{key:"queryIntersectsFeature",value:function(t,e,n,r,i,o){var a=p(t,this.paint.get("fill-translate"),this.paint.get("fill-translate-anchor"),i,o);return c(a,n)}}])&&i(n.prototype,r),f&&i(n,f),e}());t.exports=m},function(t,e,n){function r(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,r.key,r)}}var i=n(14).FillLayoutArray,o=n(162).members,a=n(36).SegmentVector,s=n(32).ProgramConfigurationSet,u=n(37),l=u.LineIndexArray,c=u.TriangleIndexArray,f=n(38),h=n(104),p=n(105),d=n(1),y=n(11).register,m=function(){function t(e){!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,t),this.zoom=e.zoom,this.overscaling=e.overscaling,this.layers=e.layers,this.layerIds=this.layers.map(function(t){return t.id}),this.index=e.index,this.layoutVertexArray=new i,this.indexArray=new c,this.indexArray2=new l,this.programConfigurations=new s(o,e.layers,e.zoom),this.segments=new a,this.segments2=new a}var e,n,u;return e=t,(n=[{key:"populate",value:function(t,e){var n=!0,r=!1,i=void 0;try{for(var o,a=t[Symbol.iterator]();!(n=(o=a.next()).done);n=!0){var s=o.value,u=s.feature,l=s.index,c=s.sourceLayerIndex;if(this.layers[0]._featureFilter({zoom:this.zoom},u)){var h=f(u);this.addFeature(u,h),e.featureIndex.insert(u,h,l,c,this.index)}}}catch(t){r=!0,i=t}finally{try{n||null==a.return||a.return()}finally{if(r)throw i}}}},{key:"isEmpty",value:function(){return 0===this.layoutVertexArray.length}},{key:"upload",value:function(t){this.layoutVertexBuffer=t.createVertexBuffer(this.layoutVertexArray,o),this.indexBuffer=t.createIndexBuffer(this.indexArray),this.indexBuffer2=t.createIndexBuffer(this.indexArray2),this.programConfigurations.upload(t)}},{key:"destroy",value:function(){this.layoutVertexBuffer&&(this.layoutVertexBuffer.destroy(),this.indexBuffer.destroy(),this.indexBuffer2.destroy(),this.programConfigurations.destroy(),this.segments.destroy(),this.segments2.destroy())}},{key:"addFeature",value:function(t,e){var n=!0,r=!1,i=void 0;try{for(var o,a=p(e,500)[Symbol.iterator]();!(n=(o=a.next()).done);n=!0){var s=o.value,u=0,l=!0,c=!1,f=void 0;try{for(var y,m=s[Symbol.iterator]();!(l=(y=m.next()).done);l=!0){u+=y.value.length}}catch(t){c=!0,f=t}finally{try{l||null==m.return||m.return()}finally{if(c)throw f}}var v=this.segments.prepareSegment(u,this.layoutVertexArray,this.indexArray),g=v.vertexLength,b=[],x=[],_=!0,w=!1,k=void 0;try{for(var S,T=s[Symbol.iterator]();!(_=(S=T.next()).done);_=!0){var A=S.value;if(0!==A.length){A!==s[0]&&x.push(b.length/2);var E=this.segments2.prepareSegment(A.length,this.layoutVertexArray,this.indexArray2),z=E.vertexLength;this.layoutVertexArray.emplaceBack(A[0].x,A[0].y),this.indexArray2.emplaceBack(z+A.length-1,z),b.push(A[0].x),b.push(A[0].y);for(var C=1;C<A.length;C++)this.layoutVertexArray.emplaceBack(A[C].x,A[C].y),this.indexArray2.emplaceBack(z+C-1,z+C),b.push(A[C].x),b.push(A[C].y);E.vertexLength+=A.length,E.primitiveLength+=A.length}}}catch(t){w=!0,k=t}finally{try{_||null==T.return||T.return()}finally{if(w)throw k}}var P=h(b,x);d(P.length%3==0);for(var O=0;O<P.length;O+=3)this.indexArray.emplaceBack(g+P[O],g+P[O+1],g+P[O+2]);v.vertexLength+=u,v.primitiveLength+=P.length/3}}catch(t){r=!0,i=t}finally{try{n||null==a.return||a.return()}finally{if(r)throw i}}this.programConfigurations.populatePaintArrays(this.layoutVertexArray.length,t)}}])&&r(e.prototype,n),u&&r(e,u),t}();y("FillBucket",m,{omit:["layers"]}),t.exports=m},function(t,e,n){var r=n(23).createLayout;t.exports=r([{name:"a_pos",components:2,type:"Int16"}],4)},function(t,e,n){t.exports=function(){"use strict";function t(t,e,n){var r=t[e];t[e]=t[n],t[n]=r}function e(t,e){return t<e?-1:t>e?1:0}return function(n,r,i,o,a){!function e(n,r,i,o,a){for(;o>i;){if(o-i>600){var s=o-i+1,u=r-i+1,l=Math.log(s),c=.5*Math.exp(2*l/3),f=.5*Math.sqrt(l*c*(s-c)/s)*(u-s/2<0?-1:1),h=Math.max(i,Math.floor(r-u*c/s+f)),p=Math.min(o,Math.floor(r+(s-u)*c/s+f));e(n,r,h,p,a)}var d=n[r],y=i,m=o;for(t(n,i,r),a(n[o],d)>0&&t(n,i,o);y<m;){for(t(n,y,m),y++,m--;a(n[y],d)<0;)y++;for(;a(n[m],d)>0;)m--}0===a(n[i],d)?t(n,i,m):t(n,++m,o),m<=r&&(i=m+1),r<=m&&(o=m-1)}}(n,r,i||0,o||n.length-1,a||e)}}()},function(t,e,n){var r=n(13),i=n(4),o=i.Properties,a=i.DataConstantProperty,s=i.DataDrivenProperty,u=i.CrossFadedProperty,l=(i.HeatmapColorProperty,new o({"fill-antialias":new a(r.paint_fill["fill-antialias"]),"fill-opacity":new s(r.paint_fill["fill-opacity"]),"fill-color":new s(r.paint_fill["fill-color"]),"fill-outline-color":new s(r.paint_fill["fill-outline-color"]),"fill-translate":new a(r.paint_fill["fill-translate"]),"fill-translate-anchor":new a(r.paint_fill["fill-translate-anchor"]),"fill-pattern":new u(r.paint_fill["fill-pattern"])}));t.exports={paint:l}},function(t,e,n){function r(t){return(r="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t})(t)}function i(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,r.key,r)}}function o(t,e){return!e||"object"!==r(e)&&"function"!=typeof e?function(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}(t):e}function a(t){return(a=Object.setPrototypeOf?Object.getPrototypeOf:function(t){return t.__proto__||Object.getPrototypeOf(t)})(t)}function s(t,e){return(s=Object.setPrototypeOf||function(t,e){return t.__proto__=e,t})(t,e)}var u=n(19),l=n(166),c=n(44).multiPolygonIntersectsMultiPolygon,f=n(47),h=f.translateDistance,p=f.translate,d=n(168),y=n(4),m=(y.Transitionable,y.Transitioning,y.PossiblyEvaluated,function(t){function e(t){return function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,e),o(this,a(e).call(this,t,d))}var n,r,f;return function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),e&&s(t,e)}(e,u),n=e,(r=[{key:"createBucket",value:function(t){return new l(t)}},{key:"queryRadius",value:function(){return h(this.paint.get("fill-extrusion-translate"))}},{key:"queryIntersectsFeature",value:function(t,e,n,r,i,o){var a=p(t,this.paint.get("fill-extrusion-translate"),this.paint.get("fill-extrusion-translate-anchor"),i,o);return c(a,n)}},{key:"hasOffscreenPass",value:function(){return 0!==this.paint.get("fill-extrusion-opacity")&&"none"!==this.visibility}},{key:"resize",value:function(){this.viewportFrame&&(this.viewportFrame.destroy(),this.viewportFrame=null)}}])&&i(n.prototype,r),f&&i(n,f),e}());t.exports=m},function(t,e,n){function r(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,r.key,r)}}var i=n(14).FillExtrusionLayoutArray,o=n(167).members,a=n(36),s=a.SegmentVector,u=a.MAX_VERTEX_ARRAY_LENGTH,l=n(32).ProgramConfigurationSet,c=n(37).TriangleIndexArray,f=n(38),h=n(6),p=n(104),d=n(105),y=n(1),m=n(11).register,v=Math.pow(2,13);function g(t,e,n,r,i,o,a,s){t.emplaceBack(e,n,2*Math.floor(r*v)+a,i*v*2,o*v*2,Math.round(s))}var b=function(){function t(e){!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,t),this.zoom=e.zoom,this.overscaling=e.overscaling,this.layers=e.layers,this.layerIds=this.layers.map(function(t){return t.id}),this.index=e.index,this.layoutVertexArray=new i,this.indexArray=new c,this.programConfigurations=new l(o,e.layers,e.zoom),this.segments=new s}var e,n,a;return e=t,(n=[{key:"populate",value:function(t,e){var n=!0,r=!1,i=void 0;try{for(var o,a=t[Symbol.iterator]();!(n=(o=a.next()).done);n=!0){var s=o.value,u=s.feature,l=s.index,c=s.sourceLayerIndex;if(this.layers[0]._featureFilter({zoom:this.zoom},u)){var h=f(u);this.addFeature(u,h),e.featureIndex.insert(u,h,l,c,this.index)}}}catch(t){r=!0,i=t}finally{try{n||null==a.return||a.return()}finally{if(r)throw i}}}},{key:"isEmpty",value:function(){return 0===this.layoutVertexArray.length}},{key:"upload",value:function(t){this.layoutVertexBuffer=t.createVertexBuffer(this.layoutVertexArray,o),this.indexBuffer=t.createIndexBuffer(this.indexArray),this.programConfigurations.upload(t)}},{key:"destroy",value:function(){this.layoutVertexBuffer&&(this.layoutVertexBuffer.destroy(),this.indexBuffer.destroy(),this.programConfigurations.destroy(),this.segments.destroy())}},{key:"addFeature",value:function(t,e){var n=!0,r=!1,i=void 0;try{for(var o,a=d(e,500)[Symbol.iterator]();!(n=(o=a.next()).done);n=!0){var s=o.value,l=0,c=!0,f=!1,h=void 0;try{for(var m,v=s[Symbol.iterator]();!(c=(m=v.next()).done);c=!0){l+=m.value.length}}catch(t){f=!0,h=t}finally{try{c||null==v.return||v.return()}finally{if(f)throw h}}var b=this.segments.prepareSegment(4,this.layoutVertexArray,this.indexArray),w=!0,k=!1,S=void 0;try{for(var T,A=s[Symbol.iterator]();!(w=(T=A.next()).done);w=!0){var E=T.value;if(0!==E.length&&!_(E))for(var z=0,C=0;C<E.length;C++){var P=E[C];if(C>=1){var O=E[C-1];if(!x(P,O)){b.vertexLength+4>u&&(b=this.segments.prepareSegment(4,this.layoutVertexArray,this.indexArray));var I=P.sub(O)._perp()._unit(),j=O.dist(P);z+j>32768&&(z=0),g(this.layoutVertexArray,P.x,P.y,I.x,I.y,0,0,z),g(this.layoutVertexArray,P.x,P.y,I.x,I.y,0,1,z),z+=j,g(this.layoutVertexArray,O.x,O.y,I.x,I.y,0,0,z),g(this.layoutVertexArray,O.x,O.y,I.x,I.y,0,1,z);var M=b.vertexLength;this.indexArray.emplaceBack(M,M+1,M+2),this.indexArray.emplaceBack(M+1,M+2,M+3),b.vertexLength+=4,b.primitiveLength+=2}}}}}catch(t){k=!0,S=t}finally{try{w||null==A.return||A.return()}finally{if(k)throw S}}b.vertexLength+l>u&&(b=this.segments.prepareSegment(l,this.layoutVertexArray,this.indexArray));var L=[],B=[],R=b.vertexLength,D=!0,F=!1,V=void 0;try{for(var N,q=s[Symbol.iterator]();!(D=(N=q.next()).done);D=!0){var U=N.value;if(0!==U.length){U!==s[0]&&B.push(L.length/2);for(var Z=0;Z<U.length;Z++){var G=U[Z];g(this.layoutVertexArray,G.x,G.y,0,0,1,1,0),L.push(G.x),L.push(G.y)}}}}catch(t){F=!0,V=t}finally{try{D||null==q.return||q.return()}finally{if(F)throw V}}var W=p(L,B);y(W.length%3==0);for(var H=0;H<W.length;H+=3)this.indexArray.emplaceBack(R+W[H],R+W[H+1],R+W[H+2]);b.primitiveLength+=W.length/3,b.vertexLength+=l}}catch(t){r=!0,i=t}finally{try{n||null==a.return||a.return()}finally{if(r)throw i}}this.programConfigurations.populatePaintArrays(this.layoutVertexArray.length,t)}}])&&r(e.prototype,n),a&&r(e,a),t}();function x(t,e){return t.x===e.x&&(t.x<0||t.x>h)||t.y===e.y&&(t.y<0||t.y>h)}function _(t){return t.every(function(t){return t.x<0})||t.every(function(t){return t.x>h})||t.every(function(t){return t.y<0})||t.every(function(t){return t.y>h})}m("FillExtrusionBucket",b,{omit:["layers"]}),t.exports=b},function(t,e,n){var r=n(23).createLayout;t.exports=r([{name:"a_pos",components:2,type:"Int16"},{name:"a_normal_ed",components:4,type:"Int16"}],4)},function(t,e,n){var r=n(13),i=n(4),o=i.Properties,a=i.DataConstantProperty,s=i.DataDrivenProperty,u=i.CrossFadedProperty,l=(i.HeatmapColorProperty,new o({"fill-extrusion-opacity":new a(r["paint_fill-extrusion"]["fill-extrusion-opacity"]),"fill-extrusion-color":new s(r["paint_fill-extrusion"]["fill-extrusion-color"]),"fill-extrusion-translate":new a(r["paint_fill-extrusion"]["fill-extrusion-translate"]),"fill-extrusion-translate-anchor":new a(r["paint_fill-extrusion"]["fill-extrusion-translate-anchor"]),"fill-extrusion-pattern":new u(r["paint_fill-extrusion"]["fill-extrusion-pattern"]),"fill-extrusion-height":new s(r["paint_fill-extrusion"]["fill-extrusion-height"]),"fill-extrusion-base":new s(r["paint_fill-extrusion"]["fill-extrusion-base"])}));t.exports={paint:l}},function(t,e,n){function r(t){return(r="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t})(t)}function i(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function o(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,r.key,r)}}function a(t,e,n){return e&&o(t.prototype,e),n&&o(t,n),t}function s(t,e){return!e||"object"!==r(e)&&"function"!=typeof e?function(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}(t):e}function u(t,e,n){return(u="undefined"!=typeof Reflect&&Reflect.get?Reflect.get:function(t,e,n){var r=function(t,e){for(;!Object.prototype.hasOwnProperty.call(t,e)&&null!==(t=l(t)););return t}(t,e);if(r){var i=Object.getOwnPropertyDescriptor(r,e);return i.get?i.get.call(n):i.value}})(t,e,n||t)}function l(t){return(l=Object.setPrototypeOf?Object.getPrototypeOf:function(t){return t.__proto__||Object.getPrototypeOf(t)})(t)}function c(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),e&&f(t,e)}function f(t,e){return(f=Object.setPrototypeOf||function(t,e){return t.__proto__=e,t})(t,e)}var h=n(3),p=n(19),d=n(170),y=n(44).multiPolygonIntersectsBufferedMultiLine,m=n(47),v=m.getMaximumPaintValue,g=m.translateDistance,b=m.translate,x=n(173),_=n(0).extend,w=n(61),k=n(4),S=(k.Transitionable,k.Transitioning,k.Layout,k.PossiblyEvaluated,k.DataDrivenProperty),T=new(function(t){function e(){return i(this,e),s(this,l(e).apply(this,arguments))}return c(e,S),a(e,[{key:"possiblyEvaluate",value:function(t,n){return n=new w(Math.floor(n.zoom),{now:n.now,fadeDuration:n.fadeDuration,zoomHistory:n.zoomHistory,transition:n.transition}),u(l(e.prototype),"possiblyEvaluate",this).call(this,t,n)}},{key:"evaluate",value:function(t,n,r){return n=_({},n,{zoom:Math.floor(n.zoom)}),u(l(e.prototype),"evaluate",this).call(this,t,n,r)}}]),e}())(x.paint.properties["line-width"].specification);T.useIntegerZoom=!0;var A=function(t){function e(t){return i(this,e),s(this,l(e).call(this,t,x))}return c(e,p),a(e,[{key:"recalculate",value:function(t){u(l(e.prototype),"recalculate",this).call(this,t),this.paint._values["line-floorwidth"]=T.possiblyEvaluate(this._transitioningPaint._values["line-width"].value,t)}},{key:"createBucket",value:function(t){return new d(t)}},{key:"queryRadius",value:function(t){var e=t,n=E(v("line-width",this,e),v("line-gap-width",this,e)),r=v("line-offset",this,e);return n/2+Math.abs(r)+g(this.paint.get("line-translate"))}},{key:"queryIntersectsFeature",value:function(t,e,n,r,i,o){var a=b(t,this.paint.get("line-translate"),this.paint.get("line-translate-anchor"),i,o),s=o/2*E(this.paint.get("line-width").evaluate(e),this.paint.get("line-gap-width").evaluate(e)),u=this.paint.get("line-offset").evaluate(e);return u&&(n=function(t,e){for(var n=[],r=new h(0,0),i=0;i<t.length;i++){for(var o=t[i],a=[],s=0;s<o.length;s++){var u=o[s-1],l=o[s],c=o[s+1],f=0===s?r:l.sub(u)._unit()._perp(),p=s===o.length-1?r:c.sub(l)._unit()._perp(),d=f._add(p)._unit(),y=d.x*p.x+d.y*p.y;d._mult(1/y),a.push(d._mult(e)._add(l))}n.push(a)}return n}(n,u*o)),y(a,n,s)}}]),e}();function E(t,e){return e>0?e+2*t:t}t.exports=A},function(t,e,n){function r(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,r.key,r)}}var i=n(14).LineLayoutArray,o=n(171).members,a=n(36).SegmentVector,s=n(32).ProgramConfigurationSet,u=n(37).TriangleIndexArray,l=n(38),c=n(6),f=n(48).VectorTileFeature.types,h=n(11).register,p=63,d=Math.cos(Math.PI/180*37.5),y=.5,m=Math.pow(2,14)/y;function v(t,e,n,r,i,o,a){t.emplaceBack(e.x,e.y,r?1:0,i?1:-1,Math.round(p*n.x)+128,Math.round(p*n.y)+128,1+(0===o?0:o<0?-1:1)|(a*y&63)<<2,a*y>>6)}var g=function(){function t(e){!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,t),this.zoom=e.zoom,this.overscaling=e.overscaling,this.layers=e.layers,this.layerIds=this.layers.map(function(t){return t.id}),this.index=e.index,this.layoutVertexArray=new i,this.indexArray=new u,this.programConfigurations=new s(o,e.layers,e.zoom),this.segments=new a}var e,n,h;return e=t,(n=[{key:"populate",value:function(t,e){var n=!0,r=!1,i=void 0;try{for(var o,a=t[Symbol.iterator]();!(n=(o=a.next()).done);n=!0){var s=o.value,u=s.feature,c=s.index,f=s.sourceLayerIndex;if(this.layers[0]._featureFilter({zoom:this.zoom},u)){var h=l(u);this.addFeature(u,h),e.featureIndex.insert(u,h,c,f,this.index)}}}catch(t){r=!0,i=t}finally{try{n||null==a.return||a.return()}finally{if(r)throw i}}}},{key:"isEmpty",value:function(){return 0===this.layoutVertexArray.length}},{key:"upload",value:function(t){this.layoutVertexBuffer=t.createVertexBuffer(this.layoutVertexArray,o),this.indexBuffer=t.createIndexBuffer(this.indexArray),this.programConfigurations.upload(t)}},{key:"destroy",value:function(){this.layoutVertexBuffer&&(this.layoutVertexBuffer.destroy(),this.indexBuffer.destroy(),this.programConfigurations.destroy(),this.segments.destroy())}},{key:"addFeature",value:function(t,e){var n=this.layers[0].layout,r=n.get("line-join").evaluate(t),i=n.get("line-cap"),o=n.get("line-miter-limit"),a=n.get("line-round-limit"),s=!0,u=!1,l=void 0;try{for(var c,f=e[Symbol.iterator]();!(s=(c=f.next()).done);s=!0){var h=c.value;this.addLine(h,t,r,i,o,a)}}catch(t){u=!0,l=t}finally{try{s||null==f.return||f.return()}finally{if(u)throw l}}}},{key:"addLine",value:function(t,e,n,r,i,o){for(var a="Polygon"===f[e.type],s=t.length;s>=2&&t[s-1].equals(t[s-2]);)s--;for(var u=0;u<s-1&&t[u].equals(t[u+1]);)u++;if(!(s<(a?3:2))){"bevel"===n&&(i=1.05);var l=c/(512*this.overscaling)*15,h=t[u],p=this.segments.prepareSegment(10*s,this.layoutVertexArray,this.indexArray);this.distance=0;var y,m,v,g=r,b=a?"butt":r,x=!0,_=void 0,w=void 0,k=void 0,S=void 0;this.e1=this.e2=this.e3=-1,a&&(y=t[s-2],S=h.sub(y)._unit()._perp());for(var T=u;T<s;T++)if(!(w=a&&T===s-1?t[u+1]:t[T+1])||!t[T].equals(w)){S&&(k=S),y&&(_=y),y=t[T],S=w?w.sub(y)._unit()._perp():k;var A=(k=k||S).add(S);0===A.x&&0===A.y||A._unit();var E=A.x*S.x+A.y*S.y,z=0!==E?1/E:1/0,C=E<d&&_&&w;if(C&&T>u){var P=y.dist(_);if(P>2*l){var O=y.sub(y.sub(_)._mult(l/P)._round());this.distance+=O.dist(_),this.addCurrentVertex(O,this.distance,k.mult(1),0,0,!1,p),_=O}}var I=_&&w,j=I?n:w?g:b;if(I&&"round"===j&&(z<o?j="miter":z<=2&&(j="fakeround")),"miter"===j&&z>i&&(j="bevel"),"bevel"===j&&(z>2&&(j="flipbevel"),z<i&&(j="miter")),_&&(this.distance+=y.dist(_)),"miter"===j)A._mult(z),this.addCurrentVertex(y,this.distance,A,0,0,!1,p);else if("flipbevel"===j){if(z>100)A=S.clone().mult(-1);else{var M=k.x*S.y-k.y*S.x>0?-1:1,L=z*k.add(S).mag()/k.sub(S).mag();A._perp()._mult(L*M)}this.addCurrentVertex(y,this.distance,A,0,0,!1,p),this.addCurrentVertex(y,this.distance,A.mult(-1),0,0,!1,p)}else if("bevel"===j||"fakeround"===j){var B=k.x*S.y-k.y*S.x>0,R=-Math.sqrt(z*z-1);if(B?(v=0,m=R):(m=0,v=R),x||this.addCurrentVertex(y,this.distance,k,m,v,!1,p),"fakeround"===j){for(var D=Math.floor(8*(.5-(E-.5))),F=void 0,V=0;V<D;V++)F=S.mult((V+1)/(D+1))._add(k)._unit(),this.addPieSliceVertex(y,this.distance,F,B,p);this.addPieSliceVertex(y,this.distance,A,B,p);for(var N=D-1;N>=0;N--)F=k.mult((N+1)/(D+1))._add(S)._unit(),this.addPieSliceVertex(y,this.distance,F,B,p)}w&&this.addCurrentVertex(y,this.distance,S,-m,-v,!1,p)}else"butt"===j?(x||this.addCurrentVertex(y,this.distance,k,0,0,!1,p),w&&this.addCurrentVertex(y,this.distance,S,0,0,!1,p)):"square"===j?(x||(this.addCurrentVertex(y,this.distance,k,1,1,!1,p),this.e1=this.e2=-1),w&&this.addCurrentVertex(y,this.distance,S,-1,-1,!1,p)):"round"===j&&(x||(this.addCurrentVertex(y,this.distance,k,0,0,!1,p),this.addCurrentVertex(y,this.distance,k,1,1,!0,p),this.e1=this.e2=-1),w&&(this.addCurrentVertex(y,this.distance,S,-1,-1,!0,p),this.addCurrentVertex(y,this.distance,S,0,0,!1,p)));if(C&&T<s-1){var q=y.dist(w);if(q>2*l){var U=y.add(w.sub(y)._mult(l/q)._round());this.distance+=U.dist(y),this.addCurrentVertex(U,this.distance,S.mult(1),0,0,!1,p),y=U}}x=!1}this.programConfigurations.populatePaintArrays(this.layoutVertexArray.length,e)}}},{key:"addCurrentVertex",value:function(t,e,n,r,i,o,a){var s,u=this.layoutVertexArray,l=this.indexArray;s=n.clone(),r&&s._sub(n.perp()._mult(r)),v(u,t,s,o,!1,r,e),this.e3=a.vertexLength++,this.e1>=0&&this.e2>=0&&(l.emplaceBack(this.e1,this.e2,this.e3),a.primitiveLength++),this.e1=this.e2,this.e2=this.e3,s=n.mult(-1),i&&s._sub(n.perp()._mult(i)),v(u,t,s,o,!0,-i,e),this.e3=a.vertexLength++,this.e1>=0&&this.e2>=0&&(l.emplaceBack(this.e1,this.e2,this.e3),a.primitiveLength++),this.e1=this.e2,this.e2=this.e3,e>m/2&&(this.distance=0,this.addCurrentVertex(t,this.distance,n,r,i,o,a))}},{key:"addPieSliceVertex",value:function(t,e,n,r,i){n=n.mult(r?-1:1);var o=this.layoutVertexArray,a=this.indexArray;v(o,t,n,!1,r,0,e),this.e3=i.vertexLength++,this.e1>=0&&this.e2>=0&&(a.emplaceBack(this.e1,this.e2,this.e3),i.primitiveLength++),r?this.e2=this.e3:this.e1=this.e3}}])&&r(e.prototype,n),h&&r(e,h),t}();h("LineBucket",g,{omit:["layers"]}),t.exports=g},function(t,e,n){var r=n(23).createLayout;t.exports=r([{name:"a_pos_normal",components:4,type:"Int16"},{name:"a_data",components:4,type:"Uint8"}],4)},function(t,e,n){"use strict";var r=n(106);function i(t,e,n){if(3===t){var i=new r(n,n.readVarint()+n.pos);i.length&&(e[i.name]=i)}}t.exports=function(t,e){this.layers=t.readFields(i,{},e)}},function(t,e,n){var r=n(13),i=n(4),o=i.Properties,a=i.DataConstantProperty,s=i.DataDrivenProperty,u=i.CrossFadedProperty,l=(i.HeatmapColorProperty,new o({"line-cap":new a(r.layout_line["line-cap"]),"line-join":new s(r.layout_line["line-join"]),"line-miter-limit":new a(r.layout_line["line-miter-limit"]),"line-round-limit":new a(r.layout_line["line-round-limit"])})),c=new o({"line-opacity":new s(r.paint_line["line-opacity"]),"line-color":new s(r.paint_line["line-color"]),"line-translate":new a(r.paint_line["line-translate"]),"line-translate-anchor":new a(r.paint_line["line-translate-anchor"]),"line-width":new s(r.paint_line["line-width"]),"line-gap-width":new s(r.paint_line["line-gap-width"]),"line-offset":new s(r.paint_line["line-offset"]),"line-blur":new s(r.paint_line["line-blur"]),"line-dasharray":new u(r.paint_line["line-dasharray"]),"line-pattern":new u(r.paint_line["line-pattern"])});t.exports={paint:c,layout:l}},function(t,e,n){function r(t){return(r="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t})(t)}function i(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,r.key,r)}}function o(t,e){return!e||"object"!==r(e)&&"function"!=typeof e?function(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}(t):e}function a(t,e,n){return(a="undefined"!=typeof Reflect&&Reflect.get?Reflect.get:function(t,e,n){var r=function(t,e){for(;!Object.prototype.hasOwnProperty.call(t,e)&&null!==(t=s(t)););return t}(t,e);if(r){var i=Object.getOwnPropertyDescriptor(r,e);return i.get?i.get.call(n):i.value}})(t,e,n||t)}function s(t){return(s=Object.setPrototypeOf?Object.getPrototypeOf:function(t){return t.__proto__||Object.getPrototypeOf(t)})(t)}function u(t,e){return(u=Object.setPrototypeOf||function(t,e){return t.__proto__=e,t})(t,e)}var l=n(19),c=n(62),f=n(179),h=n(30).isExpression,p=n(1),d=n(51),y=n(4),m=(y.Transitionable,y.Transitioning,y.Layout,y.PossiblyEvaluated,function(t){function e(t){return function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,e),o(this,s(e).call(this,t,d))}var n,r,y;return function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),e&&u(t,e)}(e,l),n=e,(r=[{key:"recalculate",value:function(t){a(s(e.prototype),"recalculate",this).call(this,t),"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"))}},{key:"getValueAndResolveTokens",value:function(t,e){var n=this.layout.get(t).evaluate(e),r=this._unevaluatedLayout._values[t];return r.isDataDriven()||h(r.value)?n:f(e.properties,n)}},{key:"createBucket",value:function(t){return new c(t)}},{key:"queryRadius",value:function(){return 0}},{key:"queryIntersectsFeature",value:function(){return p(!1),!1}}])&&i(n.prototype,r),y&&i(n,y),e}());t.exports=m},function(t,e,n){var r=n(23).createLayout,i={symbolLayoutAttributes:r([{name:"a_pos_offset",components:4,type:"Int16"},{name:"a_data",components:4,type:"Uint16"}]),dynamicLayoutAttributes:r([{name:"a_projected_pos",components:3,type:"Float32"}],4),placementOpacityAttributes:r([{name:"a_fade_opacity",components:1,type:"Uint32"}],4),collisionVertexAttributes:r([{name:"a_placed",components:2,type:"Uint8"}],4),collisionBox:r([{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"}]),collisionBoxLayout:r([{name:"a_pos",components:2,type:"Int16"},{name:"a_anchor_pos",components:2,type:"Int16"},{name:"a_extrude",components:2,type:"Int16"}],4),collisionCircleLayout:r([{name:"a_pos",components:2,type:"Int16"},{name:"a_anchor_pos",components:2,type:"Int16"},{name:"a_extrude",components:2,type:"Int16"}],4),placement:r([{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"}]),glyphOffset:r([{type:"Float32",name:"offsetX"}]),lineVertex:r([{type:"Int16",name:"x"},{type:"Int16",name:"y"},{type:"Int16",name:"tileUnitDistanceFromAnchor"}])};t.exports=i},function(t,e,n){var r=n(49);t.exports=function(t,e,n){var i=e.layout.get("text-transform").evaluate(n);return"uppercase"===i?t=t.toLocaleUpperCase():"lowercase"===i&&(t=t.toLocaleLowerCase()),r.applyArabicShaping&&(t=r.applyArabicShaping(t)),t}},function(t,e){t.exports=function(t){var e={},n={},r=[],i=0;function o(e){r.push(t[e]),i++}function a(t,e,i){var o=n[t];return delete n[t],n[e]=o,r[o].geometry[0].pop(),r[o].geometry[0]=r[o].geometry[0].concat(i[0]),o}function s(t,n,i){var o=e[n];return delete e[n],e[t]=o,r[o].geometry[0].shift(),r[o].geometry[0]=i[0].concat(r[o].geometry[0]),o}function u(t,e,n){var r=n?e[0][e[0].length-1]:e[0][0];return"".concat(t,":").concat(r.x,":").concat(r.y)}for(var l=0;l<t.length;l++){var c=t[l],f=c.geometry,h=c.text;if(h){var p=u(h,f),d=u(h,f,!0);if(p in n&&d in e&&n[p]!==e[d]){var y=s(p,d,f),m=a(p,d,r[y].geometry);delete e[p],delete n[d],n[u(h,r[m].geometry,!0)]=m,r[y].geometry=null}else p in n?a(p,d,f):d in e?s(p,d,f):(o(l),e[p]=i-1,n[d]=i-1)}else o(l)}return r.filter(function(t){return t.geometry})}},function(t,e,n){function r(t){return(r="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t})(t)}function i(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,r.key,r)}}function o(t,e){return!e||"object"!==r(e)&&"function"!=typeof e?function(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}(t):e}function a(t){return(a=Object.setPrototypeOf?Object.getPrototypeOf:function(t){return t.__proto__||Object.getPrototypeOf(t)})(t)}function s(t,e){return(s=Object.setPrototypeOf||function(t,e){return t.__proto__=e,t})(t,e)}var u=n(3),l=n(11).register,c=function(t){function e(t,n,r,i){var s;return function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,e),(s=o(this,a(e).call(this,t,n))).angle=r,void 0!==i&&(s.segment=i),s}var n,r,l;return function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),e&&s(t,e)}(e,u),n=e,(r=[{key:"clone",value:function(){return new e(this.x,this.y,this.angle,this.segment)}}])&&i(n.prototype,r),l&&i(n,l),e}();l("Anchor",c),t.exports=c},function(t,e){t.exports=function(t,e){return e.replace(/{([^{}]+)}/g,function(e,n){return n in t?String(t[n]):""}).replace(/FORMAT_NUMBER\(([^\)]+)\)/g,function(t,e){return function(t){t=t.split(",");var e=parseFloat(t[0]);t[2]&&(e*=parseFloat(t[2]));return e<1e3?Math.round(e):e<1e5?(e/1e3).toFixed(1)+"K":e<1e6?Math.round(e/1e3)+"K":e<1e9?(e/1e6).toFixed(2)+"M":e<1e12?(e=Math.round(e/1e6).toFixed(0)).slice(0,-3)+","+e.slice(-4,-1)+"M":"HUGE_NUM"}(e)})}},function(t,e,n){function r(t){return(r="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t})(t)}function i(t,e){return!e||"object"!==r(e)&&"function"!=typeof e?function(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}(t):e}function o(t){return(o=Object.setPrototypeOf?Object.getPrototypeOf:function(t){return t.__proto__||Object.getPrototypeOf(t)})(t)}function a(t,e){return(a=Object.setPrototypeOf||function(t,e){return t.__proto__=e,t})(t,e)}var s=n(19),u=n(181),l=n(4),c=(l.Transitionable,l.Transitioning,l.PossiblyEvaluated,function(t){function e(t){return function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,e),i(this,o(e).call(this,t,u))}return function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),e&&a(t,e)}(e,s),e}());t.exports=c},function(t,e,n){var r=n(13),i=n(4),o=i.Properties,a=i.DataConstantProperty,s=(i.DataDrivenProperty,i.CrossFadedProperty),u=(i.HeatmapColorProperty,new o({"background-color":new a(r.paint_background["background-color"]),"background-pattern":new s(r.paint_background["background-pattern"]),"background-opacity":new a(r.paint_background["background-opacity"])}));t.exports={paint:u}},function(t,e,n){function r(t){return(r="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t})(t)}function i(t,e){return!e||"object"!==r(e)&&"function"!=typeof e?function(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}(t):e}function o(t){return(o=Object.setPrototypeOf?Object.getPrototypeOf:function(t){return t.__proto__||Object.getPrototypeOf(t)})(t)}function a(t,e){return(a=Object.setPrototypeOf||function(t,e){return t.__proto__=e,t})(t,e)}var s=n(19),u=n(183),l=n(4),c=(l.Transitionable,l.Transitioning,l.PossiblyEvaluated,function(t){function e(t){return function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,e),i(this,o(e).call(this,t,u))}return function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),e&&a(t,e)}(e,s),e}());t.exports=c},function(t,e,n){var r=n(13),i=n(4),o=i.Properties,a=i.DataConstantProperty,s=(i.DataDrivenProperty,i.CrossFadedProperty,i.HeatmapColorProperty,new o({"raster-opacity":new a(r.paint_raster["raster-opacity"]),"raster-hue-rotate":new a(r.paint_raster["raster-hue-rotate"]),"raster-brightness-min":new a(r.paint_raster["raster-brightness-min"]),"raster-brightness-max":new a(r.paint_raster["raster-brightness-max"]),"raster-saturation":new a(r.paint_raster["raster-saturation"]),"raster-contrast":new a(r.paint_raster["raster-contrast"]),"raster-fade-duration":new a(r.paint_raster["raster-fade-duration"])}));t.exports={paint:s}},function(t,e,n){var r=n(16),i=n(2),o=n(34).normalizeSpriteURL,a=n(33).RGBAImage;t.exports=function(t,e,n){var s,u,l,c=i.devicePixelRatio>1?"@2x":"";function f(){if(l)n(l);else if(s&&u){var t=i.getImageData(u),e={};for(var r in s){var o=s[r],c=o.width,f=o.height,h=o.x,p=o.y,d=o.sdf,y=o.pixelRatio,m=new a({width:c,height:f});a.copy(t,m,{x:h,y:p},{x:0,y:0},{width:c,height:f}),e[r]={data:m,pixelRatio:y,sdf:d}}n(null,e)}}r.getJSON(e(o(t,c,".json"),r.ResourceType.SpriteJSON),function(t,e){l||(l=t,s=e,f())}),r.getImage(e(o(t,c,".png"),r.ResourceType.SpriteImage),function(t,e){l||(l=t,u=e,f())})}},function(t,e,n){function r(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,r.key,r)}}var i=n(111),o=n(33).RGBAImage,a=n(186).imagePosition,s=n(20),u=n(1),l=function(){function t(){!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,t),this.images={},this.loaded=!1,this.requestors=[],this.shelfPack=new i(64,64,{autoResize:!0}),this.patterns={},this.atlasImage=new o({width:64,height:64}),this.dirty=!0}var e,n,l;return e=t,(n=[{key:"isLoaded",value:function(){return this.loaded}},{key:"setLoaded",value:function(t){if(this.loaded!==t&&(this.loaded=t,t)){var e=!0,n=!1,r=void 0;try{for(var i,o=this.requestors[Symbol.iterator]();!(e=(i=o.next()).done);e=!0){var a=i.value,s=a.ids,u=a.callback;this._notify(s,u)}}catch(t){n=!0,r=t}finally{try{e||null==o.return||o.return()}finally{if(n)throw r}}this.requestors=[]}}},{key:"getImage",value:function(t){return this.images[t]}},{key:"addImage",value:function(t,e){u(!this.images[t]),this.images[t]=e}},{key:"removeImage",value:function(t){u(this.images[t]),delete this.images[t];var e=this.patterns[t];e&&(this.shelfPack.unref(e.bin),delete this.patterns[t])}},{key:"getImages",value:function(t,e){var n=!0;if(!this.isLoaded()){var r=!0,i=!1,o=void 0;try{for(var a,s=t[Symbol.iterator]();!(r=(a=s.next()).done);r=!0){var u=a.value;this.images[u]||(n=!1)}}catch(t){i=!0,o=t}finally{try{r||null==s.return||s.return()}finally{if(i)throw o}}}this.isLoaded()||n?this._notify(t,e):this.requestors.push({ids:t,callback:e})}},{key:"_notify",value:function(t,e){var n={},r=!0,i=!1,o=void 0;try{for(var a,s=t[Symbol.iterator]();!(r=(a=s.next()).done);r=!0){var u=a.value,l=this.images[u];l&&(n[u]={data:l.data.clone(),pixelRatio:l.pixelRatio,sdf:l.sdf})}}catch(t){i=!0,o=t}finally{try{r||null==s.return||s.return()}finally{if(i)throw o}}e(null,n)}},{key:"getPixelSize",value:function(){return{width:this.shelfPack.w,height:this.shelfPack.h}}},{key:"getPattern",value:function(t){var e=this.patterns[t];if(e)return e.position;var n=this.getImage(t);if(!n)return null;var r=n.data.width+2,i=n.data.height+2,s=this.shelfPack.packOne(r,i);if(!s)return null;this.atlasImage.resize(this.getPixelSize());var u=n.data,l=this.atlasImage,c=s.x+1,f=s.y+1,h=u.width,p=u.height;o.copy(u,l,{x:0,y:0},{x:c,y:f},{width:h,height:p}),o.copy(u,l,{x:0,y:p-1},{x:c,y:f-1},{width:h,height:1}),o.copy(u,l,{x:0,y:0},{x:c,y:f+p},{width:h,height:1}),o.copy(u,l,{x:h-1,y:0},{x:c-1,y:f},{width:1,height:p}),o.copy(u,l,{x:0,y:0},{x:c+h,y:f},{width:1,height:p}),this.dirty=!0;var d=a(s,n);return this.patterns[t]={bin:s,position:d},d}},{key:"bind",value:function(t){var e=t.gl;this.atlasTexture?this.dirty&&(this.atlasTexture.update(this.atlasImage),this.dirty=!1):this.atlasTexture=new s(t,this.atlasImage,e.RGBA),this.atlasTexture.bind(e.LINEAR,e.CLAMP_TO_EDGE)}}])&&r(e.prototype,n),l&&r(e,l),t}();t.exports=l},function(t,e,n){var r=n(111),i=n(33).RGBAImage,o=1;function a(t,e){var n=e.pixelRatio,r={x:t.x+o,y:t.y+o,w:t.w-2*o,h:t.h-2*o};return{pixelRatio:n,textureRect:r,tl:[r.x,r.y],br:[r.x+r.w,r.y+r.h],displaySize:[r.w/n,r.h/n]}}t.exports={imagePosition:a,makeImageAtlas:function(t){var e=new i({width:0,height:0}),n={},s=new r(0,0,{autoResize:!0});for(var u in t){var l=t[u],c=s.packOne(l.data.width+2*o,l.data.height+2*o);e.resize({width:s.w,height:s.h}),i.copy(l.data,e,{x:0,y:0},{x:c.x+o,y:c.y+o},l.data),n[u]=a(c,l)}return s.shrink(),e.resize({width:s.w,height:s.h}),{image:e,positions:n}}}},function(t,e,n){function r(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,r.key,r)}}var i=n(188),o=n(191),a=n(109),s=n(0).asyncAll,u=n(33).AlphaImage,l=function(){function t(e,n){!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,t),this.requestTransform=e,this.localIdeographFontFamily=n,this.entries={}}var e,n,l;return e=t,(n=[{key:"setURL",value:function(t){this.url=t}},{key:"getGlyphs",value:function(t,e){var n=this,r=[];for(var o in t){var a=!0,u=!1,l=void 0;try{for(var c,f=t[o][Symbol.iterator]();!(a=(c=f.next()).done);a=!0){var h=c.value;r.push({stack:o,id:h})}}catch(t){u=!0,l=t}finally{try{a||null==f.return||f.return()}finally{if(u)throw l}}}s(r,function(t,e){var r=t.stack,o=t.id,a=n.entries[r];a||(a=n.entries[r]={glyphs:{},requests:{}});var s=a.glyphs[o];if(void 0===s)if(s=n._tinySDF(a,r,o))e(null,{stack:r,id:o,glyph:s});else{var u=Math.floor(o/256);if(256*u>65535)e(new Error("glyphs > 65535 not supported"));else{var l=a.requests[u];l||(l=a.requests[u]=[],i(r,u,n.url,n.requestTransform,function(t,e){if(e)for(var n in e)a.glyphs[+n]=e[+n];var r=!0,i=!1,o=void 0;try{for(var s,c=l[Symbol.iterator]();!(r=(s=c.next()).done);r=!0){(0,s.value)(t,e)}}catch(t){i=!0,o=t}finally{try{r||null==c.return||c.return()}finally{if(i)throw o}}delete a.requests[u]})),l.push(function(t,n){t?e(t):n&&e(null,{stack:r,id:o,glyph:n[o]||null})})}}else e(null,{stack:r,id:o,glyph:s})},function(t,n){if(t)e(t);else if(n){var r={},i=!0,o=!1,a=void 0;try{for(var s,u=n[Symbol.iterator]();!(i=(s=u.next()).done);i=!0){var l=s.value,c=l.stack,f=l.id,h=l.glyph;(r[c]||(r[c]={}))[f]=h&&{id:h.id,bitmap:h.bitmap.clone(),metrics:h.metrics}}}catch(t){o=!0,a=t}finally{try{i||null==u.return||u.return()}finally{if(o)throw a}}e(null,r)}})}},{key:"_tinySDF",value:function(t,e,n){var r=this.localIdeographFontFamily;if(r&&(a["CJK Unified Ideographs"](n)||a["Hangul Syllables"](n))){var i=t.tinySDF;if(!i){var s="400";/bold/i.test(e)?s="900":/medium/i.test(e)?s="500":/light/i.test(e)&&(s="200"),i=t.tinySDF=new o(24,3,8,.25,r,s)}return{id:n,bitmap:new u({width:30,height:30},i.draw(String.fromCharCode(n))),metrics:{width:24,height:24,left:0,top:-8,advance:24}}}}}])&&r(e.prototype,n),l&&r(e,l),t}();t.exports=l},function(t,e,n){var r=n(34).normalizeGlyphsURL,i=n(16),o=n(189);t.exports=function(t,e,n,a,s){var u=256*e,l=u+255,c=a(r(n).replace("{fontstack}",t).replace("{range}","".concat(u,"-").concat(l)),i.ResourceType.Glyphs);i.getArrayBuffer(c,function(t,e){if(t)s(t);else if(e){var n={},r=!0,i=!1,a=void 0;try{for(var u,l=o(e.data)[Symbol.iterator]();!(r=(u=l.next()).done);r=!0){var c=u.value;n[c.id]=c}}catch(t){i=!0,a=t}finally{try{r||null==l.return||l.return()}finally{if(i)throw a}}s(null,n)}})}},function(t,e,n){var r=n(33).AlphaImage,i=n(65),o=3;function a(t,e,n){1===t&&n.readMessage(s,e)}function s(t,e,n){if(3===t){var i=n.readMessage(u,{}),a=i.id,s=i.bitmap,l=i.width,c=i.height,f=i.left,h=i.top,p=i.advance;e.push({id:a,bitmap:new r({width:l+2*o,height:c+2*o},s),metrics:{width:l,height:c,left:f,top:h,advance:p}})}}function u(t,e,n){1===t?e.id=n.readVarint():2===t?e.bitmap=n.readBytes():3===t?e.width=n.readVarint():4===t?e.height=n.readVarint():5===t?e.left=n.readSVarint():6===t?e.top=n.readSVarint():7===t&&(e.advance=n.readVarint())}t.exports=function(t){return new i(t).readFields(a,[])},t.exports.GLYPH_PBF_BORDER=o},function(t,e){e.read=function(t,e,n,r,i){var o,a,s=8*i-r-1,u=(1<<s)-1,l=u>>1,c=-7,f=n?i-1:0,h=n?-1:1,p=t[e+f];for(f+=h,o=p&(1<<-c)-1,p>>=-c,c+=s;c>0;o=256*o+t[e+f],f+=h,c-=8);for(a=o&(1<<-c)-1,o>>=-c,c+=r;c>0;a=256*a+t[e+f],f+=h,c-=8);if(0===o)o=1-l;else{if(o===u)return a?NaN:1/0*(p?-1:1);a+=Math.pow(2,r),o-=l}return(p?-1:1)*a*Math.pow(2,o-r)},e.write=function(t,e,n,r,i,o){var a,s,u,l=8*o-i-1,c=(1<<l)-1,f=c>>1,h=23===i?Math.pow(2,-24)-Math.pow(2,-77):0,p=r?0:o-1,d=r?1:-1,y=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*(u=Math.pow(2,-a))<1&&(a--,u*=2),(e+=a+f>=1?h/u:h*Math.pow(2,1-f))*u>=2&&(a++,u/=2),a+f>=c?(s=0,a=c):a+f>=1?(s=(e*u-1)*Math.pow(2,i),a+=f):(s=e*Math.pow(2,f-1)*Math.pow(2,i),a=0));i>=8;t[n+p]=255&s,p+=d,s/=256,i-=8);for(a=a<<i|s,l+=i;l>0;t[n+p]=255&a,p+=d,a/=256,l-=8);t[n+p-d]|=128*y}},function(t,e,n){"use strict";t.exports=i,t.exports.default=i;var r=1e20;function i(t,e,n,r,i,o){this.fontSize=t||24,this.buffer=void 0===e?3:e,this.cutoff=r||.25,this.fontFamily=i||"sans-serif",this.fontWeight=o||"normal",this.radius=n||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 o(t,e,n,r,i,o,s){for(var u=0;u<e;u++){for(var l=0;l<n;l++)r[l]=t[l*e+u];for(a(r,i,o,s,n),l=0;l<n;l++)t[l*e+u]=i[l]}for(l=0;l<n;l++){for(u=0;u<e;u++)r[u]=t[l*e+u];for(a(r,i,o,s,e),u=0;u<e;u++)t[l*e+u]=Math.sqrt(i[u])}}function a(t,e,n,i,o){n[0]=0,i[0]=-r,i[1]=+r;for(var a=1,s=0;a<o;a++){for(var u=(t[a]+a*a-(t[n[s]]+n[s]*n[s]))/(2*a-2*n[s]);u<=i[s];)s--,u=(t[a]+a*a-(t[n[s]]+n[s]*n[s]))/(2*a-2*n[s]);n[++s]=a,i[s]=u,i[s+1]=+r}for(a=0,s=0;a<o;a++){for(;i[s+1]<a;)s++;e[a]=(a-n[s])*(a-n[s])+t[n[s]]}}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),n=new Uint8ClampedArray(this.size*this.size),i=0;i<this.size*this.size;i++){var a=e.data[4*i+3]/255;this.gridOuter[i]=1===a?0:0===a?r:Math.pow(Math.max(0,.5-a),2),this.gridInner[i]=1===a?r:0===a?0:Math.pow(Math.max(0,a-.5),2)}for(o(this.gridOuter,this.size,this.size,this.f,this.d,this.v,this.z),o(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];n[i]=Math.max(0,Math.min(255,Math.round(255-255*(s/this.radius+this.cutoff))))}return n}},function(t,e,n){function r(t){return(r="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t})(t)}function i(t,e){return!e||"object"!==r(e)&&"function"!=typeof e?function(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}(t):e}function o(t){return(o=Object.setPrototypeOf?Object.getPrototypeOf:function(t){return t.__proto__||Object.getPrototypeOf(t)})(t)}function a(t,e){return(a=Object.setPrototypeOf||function(t,e){return t.__proto__=e,t})(t,e)}function s(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function u(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,r.key,r)}}function l(t,e,n){return e&&u(t.prototype,e),n&&u(t,n),t}var c=n(13),f=n(0),h=n(10),p=n(54),d=n(0).sphericalToCartesian,y=(n(12),n(26)),m=n(4),v=m.Properties,g=m.Transitionable,b=(m.Transitioning,m.PossiblyEvaluated,m.DataConstantProperty),x=function(){function t(){s(this,t),this.specification=c.light.position}return l(t,[{key:"possiblyEvaluate",value:function(t,e){return d(t.expression.evaluate(e))}},{key:"interpolate",value:function(t,e,n){return{x:y.number(t.x,e.x,n),y:y.number(t.y,e.y,n),z:y.number(t.z,e.z,n)}}}]),t}(),_=new v({anchor:new b(c.light.anchor),position:new x,color:new b(c.light.color),intensity:new b(c.light.intensity)}),w=function(t){function e(t){var n;return s(this,e),(n=i(this,o(e).call(this)))._transitionable=new g(_),n.setLight(t),n._transitioning=n._transitionable.untransitioned(),n}return function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),e&&a(t,e)}(e,h),l(e,[{key:"getLight",value:function(){return this._transitionable.serialize()}},{key:"setLight",value:function(t){if(!this._validate(p.light,t))for(var e in t){var n=t[e];f.endsWith(e,"-transition")?this._transitionable.setTransition(e.slice(0,-"-transition".length),n):this._transitionable.setValue(e,n)}}},{key:"updateTransitions",value:function(t){this._transitioning=this._transitionable.transitioned(t,this._transitioning)}},{key:"hasTransition",value:function(){return this._transitioning.hasTransition()}},{key:"recalculate",value:function(t){this.properties=this._transitioning.possiblyEvaluate(t)}},{key:"_validate",value:function(t,e){return p.emitErrors(this,t.call(p,f.extend({value:e,style:{glyphs:!0,sprite:!0},styleSpec:c})))}}]),e}();t.exports=w},function(t,e,n){function r(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,r.key,r)}}var i=n(0),o=function(){function t(e,n){!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,t),this.width=e,this.height=n,this.nextRow=0,this.bytes=4,this.data=new Uint8Array(this.width*this.height*this.bytes),this.positions={}}var e,n,o;return e=t,(n=[{key:"getDash",value:function(t,e){var n=t.join(",")+String(e);return this.positions[n]||(this.positions[n]=this.addDash(t,e)),this.positions[n]}},{key:"addDash",value:function(t,e){var n=e?7:0,r=2*n+1;if(this.nextRow+r>this.height)return i.warnOnce("LineAtlas out of space"),null;for(var o=0,a=0;a<t.length;a++)o+=t[a];for(var s=this.width/o,u=s/2,l=t.length%2==1,c=-n;c<=n;c++)for(var f=this.nextRow+n+c,h=this.width*f,p=l?-t[t.length-1]:0,d=t[0],y=1,m=0;m<this.width;m++){for(;d<m/s;)p=d,d+=t[y],l&&y===t.length-1&&(d+=t[0]),y++;var v=Math.abs(m-p*s),g=Math.abs(m-d*s),b=Math.min(v,g),x=y%2==1,_=void 0;if(e){var w=n?c/n*(u+1):0;if(x){var k=u-Math.abs(w);_=Math.sqrt(b*b+k*k)}else _=u-Math.sqrt(b*b+w*w)}else _=(x?1:-1)*b;this.data[3+4*(h+m)]=Math.max(0,Math.min(255,_+128))}var S={y:(this.nextRow+n+.5)/this.height,height:2*n/this.height,width:o};return this.nextRow+=r,this.dirty=!0,S}},{key:"bind",value:function(t){var e=t.gl;this.texture?(e.bindTexture(e.TEXTURE_2D,this.texture),this.dirty&&(this.dirty=!1,e.texSubImage2D(e.TEXTURE_2D,0,0,0,this.width,this.height,e.RGBA,e.UNSIGNED_BYTE,this.data))):(this.texture=e.createTexture(),e.bindTexture(e.TEXTURE_2D,this.texture),e.texParameteri(e.TEXTURE_2D,e.TEXTURE_WRAP_S,e.REPEAT),e.texParameteri(e.TEXTURE_2D,e.TEXTURE_WRAP_T,e.REPEAT),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,this.width,this.height,0,e.RGBA,e.UNSIGNED_BYTE,this.data))}}])&&r(e.prototype,n),o&&r(e,o),t}();t.exports=o},function(t,e,n){function r(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,r.key,r)}}var i=n(0),o=n(195),a=function(){function t(e,n){!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,t),this.workerPool=e,this.actors=[],this.currentActor=0,this.id=i.uniqueId();for(var r=this.workerPool.acquire(this.id),a=0;a<r.length;a++){var s=r[a],u=new o(s,n,this.id);u.name="Worker ".concat(a),this.actors.push(u)}}var e,n,a;return e=t,(n=[{key:"broadcast",value:function(t,e,n){n=n||function(){},i.asyncAll(this.actors,function(n,r){n.send(t,e,r)},n)}},{key:"send",value:function(t,e,n,r){return("number"!=typeof r||isNaN(r))&&(r=this.currentActor=(this.currentActor+1)%this.actors.length),this.actors[r].send(t,e,n),r}},{key:"remove",value:function(){this.actors.forEach(function(t){t.remove()}),this.actors=[],this.workerPool.release(this.id)}}])&&r(e.prototype,n),a&&r(e,a),t}();t.exports=a},function(t,e,n){function r(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,r.key,r)}}var i=n(0),o=n(11),a=o.serialize,s=o.deserialize,u=function(){function t(e,n,r){!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,t),this.target=e,this.parent=n,this.mapId=r,this.callbacks={},this.callbackID=0,i.bindAll(["receive"],this),this.target.addEventListener("message",this.receive,!1)}var e,n,o;return e=t,(n=[{key:"send",value:function(t,e,n,r){var i=n?"".concat(this.mapId,":").concat(this.callbackID++):null;n&&(this.callbacks[i]=n);var o=[];this.target.postMessage({targetMapId:r,sourceMapId:this.mapId,type:t,id:String(i),data:a(e,o)},o)}},{key:"receive",value:function(t){var e,n=this,r=t.data,i=r.id;if(!r.targetMapId||this.mapId===r.targetMapId){var o=function(t,e){var r=[];n.target.postMessage({sourceMapId:n.mapId,type:"<response>",id:String(i),error:t?String(t):null,data:a(e,r)},r)};if("<response>"===r.type)e=this.callbacks[r.id],delete this.callbacks[r.id],e&&r.error?e(new Error(r.error)):e&&e(null,s(r.data));else if(void 0!==r.id&&this.parent[r.type])this.parent[r.type](r.sourceMapId,s(r.data),o);else if(void 0!==r.id&&this.parent.getWorkerSource){var u=r.type.split(".");this.parent.getWorkerSource(r.sourceMapId,u[0])[u[1]](s(r.data),o)}else this.parent[r.type](s(r.data))}}},{key:"remove",value:function(){this.target.removeEventListener("message",this.receive,!1)}}])&&r(e.prototype,n),o&&r(e,o),t}();t.exports=u},function(t,e,n){function r(t){return(r="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t})(t)}function i(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,r.key,r)}}function o(t){return(o=Object.setPrototypeOf?Object.getPrototypeOf:function(t){return t.__proto__||Object.getPrototypeOf(t)})(t)}function a(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}function s(t,e){return(s=Object.setPrototypeOf||function(t,e){return t.__proto__=e,t})(t,e)}var u=n(10),l=n(0),c=n(112),f=n(34).normalizeTileURL,h=n(113),p=n(16).ResourceType,d=n(2),y=function(t){function e(t,n,i,s){var u;if(function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,e),(u=function(t,e){return!e||"object"!==r(e)&&"function"!=typeof e?a(t):e}(this,o(e).call(this))).id=t,u.dispatcher=i,u.type="vector",u.minzoom=0,u.maxzoom=22,u.scheme="xyz",u.tileSize=512,u.reparseOverscaled=!0,u.isTileClipped=!0,l.extend(a(u),l.pick(n,["url","scheme","tileSize"])),u._options=l.extend({type:"vector"},n),512!==u.tileSize)throw new Error("vector tile sources must have a tileSize of 512");return u.setEventedParent(s),u}var n,y,m;return function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),e&&s(t,e)}(e,u),n=e,(y=[{key:"load",value:function(){var t=this;this.fire("dataloading",{dataType:"source"}),c(this._options,this.map._transformRequest,function(e,n){e?t.fire("error",e):n&&(l.extend(t,n),n.bounds&&(t.tileBounds=new h(n.bounds,t.minzoom,t.maxzoom)),t.fire("data",{dataType:"source",sourceDataType:"metadata"}),t.fire("data",{dataType:"source",sourceDataType:"content"}))})}},{key:"hasTile",value:function(t){return!this.tileBounds||this.tileBounds.contains(t.canonical)}},{key:"onAdd",value:function(t){this.map=t,this.load()}},{key:"serialize",value:function(){return l.extend({},this._options)}},{key:"loadTile",value:function(t,e){var n=t.tileID.overscaleFactor(),r=f(t.tileID.canonical.url(this.tiles,this.scheme),this.url),i={request:this.map._transformRequest(r,p.Tile),uid:t.uid,tileID:t.tileID,zoom:t.tileID.overscaledZ,tileSize:this.tileSize*n,type:this.type,source:this.id,pixelRatio:d.devicePixelRatio,overscaling:n,showCollisionBoxes:this.map.showCollisionBoxes};function o(n,r){return t.aborted?e(null):n?e(n):(this.map._refreshExpiredTiles&&t.setExpiryData(r),t.loadVectorData(r,this.map.painter),e(null),void(t.reloadCallback&&(this.loadTile(t,t.reloadCallback),t.reloadCallback=null)))}void 0===t.workerID||"expired"===t.state?t.workerID=this.dispatcher.send("loadTile",i,o.bind(this)):"loading"===t.state?t.reloadCallback=e:this.dispatcher.send("reloadTile",i,o.bind(this),t.workerID)}},{key:"abortTile",value:function(t){this.dispatcher.send("abortTile",{uid:t.uid,type:this.type,source:this.id},void 0,t.workerID)}},{key:"unloadTile",value:function(t){t.unloadVectorData(),this.dispatcher.send("removeTile",{uid:t.uid,type:this.type,source:this.id},void 0,t.workerID),t.workerID=void 0}},{key:"hasTransition",value:function(){return!1}}])&&i(n.prototype,y),m&&i(n,m),e}();t.exports=y},function(t,e,n){function r(t){return(r="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t})(t)}function i(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,r.key,r)}}function o(t,e){return!e||"object"!==r(e)&&"function"!=typeof e?function(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}(t):e}function a(t){return(a=Object.setPrototypeOf?Object.getPrototypeOf:function(t){return t.__proto__||Object.getPrototypeOf(t)})(t)}function s(t,e){return(s=Object.setPrototypeOf||function(t,e){return t.__proto__=e,t})(t,e)}var u=n(16),l=n(0),c=(n(10),n(34).normalizeTileURL),f=n(2),h=n(27).OverscaledTileID,p=n(114),d=function(t){function e(t,n,r,i){var s;return function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,e),(s=o(this,a(e).call(this,t,n,r,i))).type="raster-dem",s.maxzoom=22,s._options=l.extend({},n),s}var n,r,d;return function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),e&&s(t,e)}(e,p),n=e,(r=[{key:"serialize",value:function(){return{type:"raster-dem",url:this.url,tileSize:this.tileSize,tiles:this.tiles,bounds:this.bounds}}},{key:"loadTile",value:function(t,e){var n=c(t.tileID.canonical.url(this.tiles,this.scheme),this.url,this.tileSize);t.request=u.getImage(this.map._transformRequest(n,u.ResourceType.Tile),function(n,r){if(delete t.request,t.aborted)t.state="unloaded",e(null);else if(n)t.state="errored",e(n);else if(r){this.map._refreshExpiredTiles&&t.setExpiryData(r),delete r.cacheControl,delete r.expires;var i=f.getImageData(r),o={uid:t.uid,coord:t.tileID,source:this.id,rawImageData:i};t.workerID&&"expired"!==t.state||(t.workerID=this.dispatcher.send("loadDEMTile",o,function(n,r){n&&(t.state="errored",e(n));r&&(t.dem=r,t.needsHillshadePrepare=!0,t.state="loaded",e(null))}.bind(this)))}}.bind(this)),t.neighboringTiles=this._getNeighboringTiles(t.tileID)}},{key:"_getNeighboringTiles",value:function(t){var e=t.canonical,n=Math.pow(2,e.z),r=(e.x-1+n)%n,i=0===e.x?t.wrap-1:t.wrap,o=(e.x+1+n)%n,a=e.x+1===n?t.wrap+1:t.wrap,s={};return s[new h(t.overscaledZ,i,e.z,r,e.y).key]={backfilled:!1},s[new h(t.overscaledZ,a,e.z,o,e.y).key]={backfilled:!1},e.y>0&&(s[new h(t.overscaledZ,i,e.z,r,e.y-1).key]={backfilled:!1},s[new h(t.overscaledZ,t.wrap,e.z,e.x,e.y-1).key]={backfilled:!1},s[new h(t.overscaledZ,a,e.z,o,e.y-1).key]={backfilled:!1}),e.y+1<n&&(s[new h(t.overscaledZ,i,e.z,r,e.y+1).key]={backfilled:!1},s[new h(t.overscaledZ,t.wrap,e.z,e.x,e.y+1).key]={backfilled:!1},s[new h(t.overscaledZ,a,e.z,o,e.y+1).key]={backfilled:!1}),s}},{key:"unloadTile",value:function(t){t.demTexture&&this.map.painter.saveTileTexture(t.demTexture),t.fbo&&(t.fbo.destroy(),delete t.fbo),t.dem&&delete t.dem,delete t.neighboringTiles,t.state="unloaded",this.dispatcher.send("removeDEMTile",{uid:t.uid,source:this.id},void 0,t.workerID)}}])&&i(n.prototype,r),d&&i(n,d),e}();t.exports=d},function(t,e,n){"use strict";function r(t,e,n,r,o,a){return a=a||{},t+"?"+["bbox="+i(n,r,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="+e].join("&")}function i(t,e,n){var r=o(256*t,256*(e=Math.pow(2,n)-e-1),n),i=o(256*(t+1),256*(e+1),n);return r[0]+","+r[1]+","+i[0]+","+i[1]}function o(t,e,n){var r=2*Math.PI*6378137/256/Math.pow(2,n);return[t*r-2*Math.PI*6378137/2,e*r-2*Math.PI*6378137/2]}n.r(e),n.d(e,"getURL",function(){return r}),n.d(e,"getTileBBox",function(){return i}),n.d(e,"getMercCoords",function(){return o})},function(t,e,n){function r(t){return(r="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t})(t)}function i(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,r.key,r)}}function o(t,e){return!e||"object"!==r(e)&&"function"!=typeof e?function(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}(t):e}function a(t){return(a=Object.setPrototypeOf?Object.getPrototypeOf:function(t){return t.__proto__||Object.getPrototypeOf(t)})(t)}function s(t,e){return(s=Object.setPrototypeOf||function(t,e){return t.__proto__=e,t})(t,e)}var u=n(16),l=n(52),c=n(46),f=n(40),h=n(20),p=function(t){function e(t,n,r,i){var s;return function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,e),(s=o(this,a(e).call(this,t,n,r,i))).roundZoom=!0,s.type="video",s.options=n,s}var n,r,p;return function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),e&&s(t,e)}(e,l),n=e,(r=[{key:"load",value:function(){var t=this,e=this.options;this.urls=e.urls,u.getVideo(e.urls,function(e,n){e?t.fire("error",{error:e}):n&&(t.video=n,t.video.loop=!0,t.video.addEventListener("playing",function(){t.map._rerender()}),t.map&&t.video.play(),t._finishLoading())})}},{key:"getVideo",value:function(){return this.video}},{key:"onAdd",value:function(t){this.map||(this.map=t,this.load(),this.video&&(this.video.play(),this.setCoordinates(this.coordinates)))}},{key:"prepare",value:function(){if(!(0===Object.keys(this.tiles).length||this.video.readyState<2)){var t=this.map.painter.context,e=t.gl;for(var n in this.boundsBuffer||(this.boundsBuffer=t.createVertexBuffer(this._boundsArray,c.members)),this.boundsVAO||(this.boundsVAO=new f),this.texture?this.video.paused||(this.texture.bind(e.LINEAR,e.CLAMP_TO_EDGE),e.texSubImage2D(e.TEXTURE_2D,0,0,0,e.RGBA,e.UNSIGNED_BYTE,this.video)):(this.texture=new h(t,this.video,e.RGBA),this.texture.bind(e.LINEAR,e.CLAMP_TO_EDGE)),this.tiles){var r=this.tiles[n];"loaded"!==r.state&&(r.state="loaded",r.texture=this.texture)}}}},{key:"serialize",value:function(){return{type:"video",urls:this.urls,coordinates:this.coordinates}}},{key:"hasTransition",value:function(){return this.video&&!this.video.paused}}])&&i(n.prototype,r),p&&i(n,p),e}();t.exports=p},function(t,e,n){function r(t){return(r="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t})(t)}function i(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,r.key,r)}}function o(t,e){return!e||"object"!==r(e)&&"function"!=typeof e?function(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}(t):e}function a(t){return(a=Object.setPrototypeOf?Object.getPrototypeOf:function(t){return t.__proto__||Object.getPrototypeOf(t)})(t)}function s(t,e){return(s=Object.setPrototypeOf||function(t,e){return t.__proto__=e,t})(t,e)}var u=n(52),l=n(5),c=n(46),f=n(40),h=n(20),p=function(t){function e(t,n,r,i){var s;return function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,e),(s=o(this,a(e).call(this,t,n,r,i))).options=n,s.animate=void 0===n.animate||n.animate,s}var n,r,p;return function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),e&&s(t,e)}(e,u),n=e,(r=[{key:"load",value:function(){this.canvas=this.canvas||l.document.getElementById(this.options.canvas),this.width=this.canvas.width,this.height=this.canvas.height,this._hasInvalidDimensions()?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())}},{key:"getCanvas",value:function(){return this.canvas}},{key:"onAdd",value:function(t){this.map=t,this.load(),this.canvas&&this.animate&&this.play()}},{key:"onRemove",value:function(){this.pause()}},{key:"prepare",value:function(){var t=!1;if(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){var e=this.map.painter.context,n=e.gl;for(var r in this.boundsBuffer||(this.boundsBuffer=e.createVertexBuffer(this._boundsArray,c.members)),this.boundsVAO||(this.boundsVAO=new f),this.texture?t?this.texture.update(this.canvas):this._playing&&(this.texture.bind(n.LINEAR,n.CLAMP_TO_EDGE),n.texSubImage2D(n.TEXTURE_2D,0,0,0,n.RGBA,n.UNSIGNED_BYTE,this.canvas)):(this.texture=new h(e,this.canvas,n.RGBA),this.texture.bind(n.LINEAR,n.CLAMP_TO_EDGE)),this.tiles){var i=this.tiles[r];"loaded"!==i.state&&(i.state="loaded",i.texture=this.texture)}}}},{key:"serialize",value:function(){return{type:"canvas",canvas:this.canvas,coordinates:this.coordinates}}},{key:"hasTransition",value:function(){return this._playing}},{key:"_hasInvalidDimensions",value:function(){for(var t=0,e=[this.canvas.width,this.canvas.height];t<e.length;t++){var n=e[t];if(isNaN(n)||n<=0)return!0}return!1}}])&&i(n.prototype,r),p&&i(n,p),e}();t.exports=p},function(t,e){t.exports={deserialize:function(t,e){var n={};if(!e)return n;var r=!0,i=!1,o=void 0;try{for(var a,s=t[Symbol.iterator]();!(r=(a=s.next()).done);r=!0){var u=a.value,l=u.layerIds.map(function(t){return e.getLayer(t)}).filter(Boolean);if(0!==l.length){u.layers=l;var c=!0,f=!1,h=void 0;try{for(var p,d=l[Symbol.iterator]();!(c=(p=d.next()).done);c=!0){n[p.value.id]=u}}catch(t){f=!0,h=t}finally{try{c||null==d.return||d.return()}finally{if(f)throw h}}}}}catch(t){i=!0,o=t}finally{try{r||null==s.return||s.return()}finally{if(i)throw o}}return n}}},function(t,e,n){function r(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,r.key,r)}}n(3);var i=n(38),o=n(6),a=n(60),s=n(102),u=n(203),l=n(48),c=n(65),f=n(119),h=n(0).arraysIntersect,p=(n(27).OverscaledTileID,n(11).register),d=n(14).FeatureIndexArray,y=function(){function t(e,n,r,i){!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,t),this.tileID=e,this.overscaling=n,this.x=e.canonical.x,this.y=e.canonical.y,this.z=e.canonical.z,this.grid=r||new s(o,16,0),this.featureIndexArray=i||new d}var e,n,p;return e=t,(n=[{key:"insert",value:function(t,e,n,r,i){var o=this.featureIndexArray.length;this.featureIndexArray.emplaceBack(n,r,i);for(var a=0;a<e.length;a++){for(var s=e[a],u=[1/0,1/0,-1/0,-1/0],l=0;l<s.length;l++){var c=s[l];u[0]=Math.min(u[0],c.x),u[1]=Math.min(u[1],c.y),u[2]=Math.max(u[2],c.x),u[3]=Math.max(u[3],c.y)}this.grid.insert(o,u[0],u[1],u[2],u[3])}}},{key:"query",value:function(t,e){this.vtLayers||(this.vtLayers=new l.VectorTile(new c(this.rawTileData)).layers,this.sourceLayerCoder=new u(this.vtLayers?Object.keys(this.vtLayers).sort():["_geojsonTileLayer"]));for(var n={},r=t.params||{},i=o/t.tileSize/t.scale,s=a(r.filter),f=t.queryGeometry,h=t.additionalRadius*i,p=1/0,d=1/0,y=-1/0,v=-1/0,g=0;g<f.length;g++)for(var b=f[g],x=0;x<b.length;x++){var _=b[x];p=Math.min(p,_.x),d=Math.min(d,_.y),y=Math.max(y,_.x),v=Math.max(v,_.y)}var w=this.grid.query(p-h,d-h,y+h,v+h);w.sort(m),this.filterMatching(n,w,this.featureIndexArray,f,s,r.layers,e,t.bearing,i);var k=t.collisionIndex?t.collisionIndex.queryRenderedSymbols(f,this.tileID,o/t.tileSize,t.collisionBoxArray,t.sourceID,t.bucketInstanceIds):[];return k.sort(),this.filterMatching(n,k,t.collisionBoxArray,f,s,r.layers,e,t.bearing,i),n}},{key:"filterMatching",value:function(t,e,n,r,o,a,s,u,l){for(var c,p=0;p<e.length;p++){var d=e[p];if(d!==c){c=d;var y=n.get(d),m=this.bucketLayerIDs[y.bucketIndex];if(!a||h(a,m)){var v=this.sourceLayerCoder.decode(y.sourceLayerIndex),g=this.vtLayers[v].feature(y.featureIndex);if(o({zoom:this.tileID.overscaledZ},g))for(var b=null,x=0;x<m.length;x++){var _=m[x];if(!(a&&a.indexOf(_)<0)){var w=s[_];if(w&&("symbol"===w.type||(b||(b=i(g)),w.queryIntersectsFeature(r,g,b,this.z,u,l)))){var k=new f(g,this.z,this.x,this.y);k.layer=w.serialize();var S=t[_];void 0===S&&(S=t[_]=[]),S.push({featureIndex:d,feature:k})}}}}}}}},{key:"hasLayer",value:function(t){var e=!0,n=!1,r=void 0;try{for(var i,o=this.bucketLayerIDs[Symbol.iterator]();!(e=(i=o.next()).done);e=!0){var a=i.value,s=!0,u=!1,l=void 0;try{for(var c,f=a[Symbol.iterator]();!(s=(c=f.next()).done);s=!0){if(t===c.value)return!0}}catch(t){u=!0,l=t}finally{try{s||null==f.return||f.return()}finally{if(u)throw l}}}}catch(t){n=!0,r=t}finally{try{e||null==o.return||o.return()}finally{if(n)throw r}}return!1}}])&&r(e.prototype,n),p&&r(e,p),t}();function m(t,e){return e-t}p("FeatureIndex",y,{omit:["rawTileData","sourceLayerCoder","collisionIndex"]}),t.exports=y},function(t,e,n){function r(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,r.key,r)}}var i=n(1),o=function(){function t(e){!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,t),this._stringToNumber={},this._numberToString=[];for(var n=0;n<e.length;n++){var r=e[n];this._stringToNumber[r]=n,this._numberToString[n]=r}}var e,n,o;return e=t,(n=[{key:"encode",value:function(t){return i(t in this._stringToNumber),this._stringToNumber[t]}},{key:"decode",value:function(t){return i(t<this._numberToString.length),this._numberToString[t]}}])&&r(e.prototype,n),o&&r(e,o),t}();t.exports=o},function(t,e){function n(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,r.key,r)}}var r=function(){function t(e,n,r){!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,t);var i=this.boxCells=[],o=this.circleCells=[];this.xCellCount=Math.ceil(e/r),this.yCellCount=Math.ceil(n/r);for(var a=0;a<this.xCellCount*this.yCellCount;a++)i.push([]),o.push([]);this.circleKeys=[],this.boxKeys=[],this.bboxes=[],this.circles=[],this.width=e,this.height=n,this.xScale=this.xCellCount/e,this.yScale=this.yCellCount/n,this.boxUid=0,this.circleUid=0}var e,r,i;return e=t,(r=[{key:"keysLength",value:function(){return this.boxKeys.length+this.circleKeys.length}},{key:"insert",value:function(t,e,n,r,i){this._forEachCell(e,n,r,i,this._insertBoxCell,this.boxUid++),this.boxKeys.push(t),this.bboxes.push(e),this.bboxes.push(n),this.bboxes.push(r),this.bboxes.push(i)}},{key:"insertCircle",value:function(t,e,n,r){this._forEachCell(e-r,n-r,e+r,n+r,this._insertCircleCell,this.circleUid++),this.circleKeys.push(t),this.circles.push(e),this.circles.push(n),this.circles.push(r)}},{key:"_insertBoxCell",value:function(t,e,n,r,i,o){this.boxCells[i].push(o)}},{key:"_insertCircleCell",value:function(t,e,n,r,i,o){this.circleCells[i].push(o)}},{key:"_query",value:function(t,e,n,r,i){if(n<0||t>this.width||r<0||e>this.height)return!i&&[];var o=[];if(t<=0&&e<=0&&this.width<=n&&this.height<=r)o=Array.prototype.slice.call(this.boxKeys).concat(this.circleKeys);else{var a={hitTest:i,seenUids:{box:{},circle:{}}};this._forEachCell(t,e,n,r,this._queryCell,o,a)}return i?o.length>0:o}},{key:"_queryCircle",value:function(t,e,n,r){var i=t-n,o=t+n,a=e-n,s=e+n;if(o<0||i>this.width||s<0||a>this.height)return!r&&[];var u=[],l={hitTest:r,circle:{x:t,y:e,radius:n},seenUids:{box:{},circle:{}}};return this._forEachCell(i,a,o,s,this._queryCellCircle,u,l),r?u.length>0:u}},{key:"query",value:function(t,e,n,r){return this._query(t,e,n,r,!1)}},{key:"hitTest",value:function(t,e,n,r){return this._query(t,e,n,r,!0)}},{key:"hitTestCircle",value:function(t,e,n){return this._queryCircle(t,e,n,!0)}},{key:"_queryCell",value:function(t,e,n,r,i,o,a){var s=a.seenUids,u=this.boxCells[i];if(null!==u){var l=this.bboxes,c=!0,f=!1,h=void 0;try{for(var p,d=u[Symbol.iterator]();!(c=(p=d.next()).done);c=!0){var y=p.value;if(!s.box[y]){s.box[y]=!0;var m=4*y;if(t<=l[m+2]&&e<=l[m+3]&&n>=l[m+0]&&r>=l[m+1]){if(a.hitTest)return o.push(!0),!0;o.push(this.boxKeys[y])}}}}catch(t){f=!0,h=t}finally{try{c||null==d.return||d.return()}finally{if(f)throw h}}}var v=this.circleCells[i];if(null!==v){var g=this.circles,b=!0,x=!1,_=void 0;try{for(var w,k=v[Symbol.iterator]();!(b=(w=k.next()).done);b=!0){var S=w.value;if(!s.circle[S]){s.circle[S]=!0;var T=3*S;if(this._circleAndRectCollide(g[T],g[T+1],g[T+2],t,e,n,r)){if(a.hitTest)return o.push(!0),!0;o.push(this.circleKeys[S])}}}}catch(t){x=!0,_=t}finally{try{b||null==k.return||k.return()}finally{if(x)throw _}}}}},{key:"_queryCellCircle",value:function(t,e,n,r,i,o,a){var s=a.circle,u=a.seenUids,l=this.boxCells[i];if(null!==l){var c=this.bboxes,f=!0,h=!1,p=void 0;try{for(var d,y=l[Symbol.iterator]();!(f=(d=y.next()).done);f=!0){var m=d.value;if(!u.box[m]){u.box[m]=!0;var v=4*m;if(this._circleAndRectCollide(s.x,s.y,s.radius,c[v+0],c[v+1],c[v+2],c[v+3]))return o.push(!0),!0}}}catch(t){h=!0,p=t}finally{try{f||null==y.return||y.return()}finally{if(h)throw p}}}var g=this.circleCells[i];if(null!==g){var b=this.circles,x=!0,_=!1,w=void 0;try{for(var k,S=g[Symbol.iterator]();!(x=(k=S.next()).done);x=!0){var T=k.value;if(!u.circle[T]){u.circle[T]=!0;var A=3*T;if(this._circlesCollide(b[A],b[A+1],b[A+2],s.x,s.y,s.radius))return o.push(!0),!0}}}catch(t){_=!0,w=t}finally{try{x||null==S.return||S.return()}finally{if(_)throw w}}}}},{key:"_forEachCell",value:function(t,e,n,r,i,o,a){for(var s=this._convertToXCellCoord(t),u=this._convertToYCellCoord(e),l=this._convertToXCellCoord(n),c=this._convertToYCellCoord(r),f=s;f<=l;f++)for(var h=u;h<=c;h++){var p=this.xCellCount*h+f;if(i.call(this,t,e,n,r,p,o,a))return}}},{key:"_convertToXCellCoord",value:function(t){return Math.max(0,Math.min(this.xCellCount-1,Math.floor(t*this.xScale)))}},{key:"_convertToYCellCoord",value:function(t){return Math.max(0,Math.min(this.yCellCount-1,Math.floor(t*this.yScale)))}},{key:"_circlesCollide",value:function(t,e,n,r,i,o){var a=r-t,s=i-e,u=n+o;return u*u>a*a+s*s}},{key:"_circleAndRectCollide",value:function(t,e,n,r,i,o,a){var s=(o-r)/2,u=Math.abs(t-(r+s));if(u>s+n)return!1;var l=(a-i)/2,c=Math.abs(e-(i+l));if(c>l+n)return!1;if(u<=s||c<=l)return!0;var f=u-s,h=c-l;return f*f+h*h<=n*n}}])&&n(e.prototype,r),i&&n(e,i),t}();t.exports=r},function(t,e,n){var r,i;function o(t,e,n){return e in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}var a=n(63),s=n(110),u=n(49),l={horizontal:1,vertical:2,horizontalOnly:3};t.exports={shapeText:function(t,e,n,r,i,o,c,f,h,p){var d=t.trim();p===l.vertical&&(d=s(d));var g,b=[],x={positionedGlyphs:b,text:d,top:f[1],bottom:f[1],left:f[0],right:f[0],writingMode:p},_=u.processBidirectionalText;g=_?_(d,y(d,c,n,e)):function(t,e){var n=[],r=0,i=!0,o=!1,a=void 0;try{for(var s,u=e[Symbol.iterator]();!(i=(s=u.next()).done);i=!0){var l=s.value;n.push(t.substring(r,l)),r=l}}catch(t){o=!0,a=t}finally{try{i||null==u.return||u.return()}finally{if(o)throw a}}r<t.length&&n.push(t.substring(r,t.length));return n}(d,y(d,c,n,e));return function(t,e,n,r,i,o,s,u,c){var f=0,h=-17,p=0,d=t.positionedGlyphs,y="right"===o?1:"left"===o?0:.5,g=!0,b=!1,x=void 0;try{for(var _,w=n[Symbol.iterator]();!(g=(_=w.next()).done);g=!0){var k=_.value;if((k=k.trim()).length){for(var S=d.length,T=0;T<k.length;T++){var A=k.charCodeAt(T),E=e[A];E&&(a.charHasUprightVerticalOrientation(A)&&s!==l.horizontal?(d.push({glyph:A,x:f,y:0,vertical:!0}),f+=c+u):(d.push({glyph:A,x:f,y:h,vertical:!1}),f+=E.metrics.advance+u))}if(d.length!==S){var z=f-u;p=Math.max(z,p),v(d,e,S,d.length-1,y)}f=0,h+=r}else h+=r}}catch(t){b=!0,x=t}finally{try{g||null==w.return||w.return()}finally{if(b)throw x}}var C=m(i),P=C.horizontalAlign,O=C.verticalAlign;!function(t,e,n,r,i,o,a){for(var s=(e-n)*i,u=(-r*a+.5)*o,l=0;l<t.length;l++)t[l].x+=s,t[l].y+=u}(d,y,P,O,p,r,n.length);var I=n.length*r;t.top+=-O*I,t.bottom=t.top+I,t.left+=-P*p,t.right=t.left+p}(x,e,g,r,i,o,p,c,h),!!b.length&&x},shapeIcon:function(t,e,n){var r=m(n),i=r.horizontalAlign,o=r.verticalAlign,a=e[0],s=e[1],u=a-t.displaySize[0]*i,l=u+t.displaySize[0],c=s-t.displaySize[1]*o,f=c+t.displaySize[1];return{image:t,top:c,bottom:f,left:u,right:l}},WritingMode:l};var c=(o(r={},9,!0),o(r,10,!0),o(r,11,!0),o(r,12,!0),o(r,13,!0),o(r,32,!0),r),f=(o(i={},10,!0),o(i,32,!0),o(i,38,!0),o(i,40,!0),o(i,41,!0),o(i,43,!0),o(i,45,!0),o(i,47,!0),o(i,173,!0),o(i,183,!0),o(i,8203,!0),o(i,8208,!0),o(i,8211,!0),o(i,8231,!0),i);function h(t,e,n,r){var i=Math.pow(t-e,2);return r?t<e?i/2:2*i:i+Math.abs(n)*n}function p(t,e){var n=0;return 10===t&&(n-=1e4),40!==t&&65288!==t||(n+=50),41!==e&&65289!==e||(n+=50),n}function d(t,e,n,r,i,o){var a=null,s=h(e,n,i,o),u=!0,l=!1,c=void 0;try{for(var f,p=r[Symbol.iterator]();!(u=(f=p.next()).done);u=!0){var d=f.value,y=h(e-d.x,n,i,o)+d.badness;y<=s&&(a=d,s=y)}}catch(t){l=!0,c=t}finally{try{u||null==p.return||p.return()}finally{if(l)throw c}}return{index:t,x:e,priorBreak:a,badness:s}}function y(t,e,n,r){if(!n)return[];if(!t)return[];for(var i=[],o=function(t,e,n,r){for(var i=0,o=0;o<t.length;o++){var a=r[t.charCodeAt(o)];a&&(i+=a.metrics.advance+e)}return i/Math.max(1,Math.ceil(i/n))}(t,e,n,r),s=0,u=0;u<t.length;u++){var l=t.charCodeAt(u),h=r[l];h&&!c[l]&&(s+=h.metrics.advance+e),u<t.length-1&&(f[l]||a.charAllowsIdeographicBreaking(l))&&i.push(d(u+1,s,o,i,p(l,t.charCodeAt(u+1)),!1))}return function t(e){return e?t(e.priorBreak).concat(e.index):[]}(d(t.length,s,o,i,0,!0))}function m(t){var e=.5,n=.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":n=1;break;case"top":case"top-right":case"top-left":n=0}return{horizontalAlign:e,verticalAlign:n}}function v(t,e,n,r,i){if(i){var o=e[t[r].glyph];if(o)for(var a=o.metrics.advance,s=(t[r].x+a)*i,u=n;u<=r;u++)t[u].x-=s}}},function(t,e,n){function r(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,r.key,r)}}var i=n(1),o=function(){function t(e,n,r){!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,t),this.context=e;var i=e.gl;this.buffer=i.createBuffer(),this.dynamicDraw=Boolean(r),this.unbindVAO(),e.bindElementBuffer.set(this.buffer),i.bufferData(i.ELEMENT_ARRAY_BUFFER,n.arrayBuffer,this.dynamicDraw?i.DYNAMIC_DRAW:i.STATIC_DRAW),this.dynamicDraw||delete n.arrayBuffer}var e,n,o;return e=t,(n=[{key:"unbindVAO",value:function(){this.context.extVertexArrayObject&&this.context.bindVertexArrayOES.set(null)}},{key:"bind",value:function(){this.context.bindElementBuffer.set(this.buffer)}},{key:"updateData",value:function(t){var e=this.context.gl;i(this.dynamicDraw),this.unbindVAO(),this.bind(),e.bufferSubData(e.ELEMENT_ARRAY_BUFFER,0,t.arrayBuffer)}},{key:"destroy",value:function(){var t=this.context.gl;this.buffer&&(t.deleteBuffer(this.buffer),delete this.buffer)}}])&&r(e.prototype,n),o&&r(e,o),t}();t.exports=o},function(t,e,n){function r(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,r.key,r)}}var i=n(1),o={Int8:"BYTE",Uint8:"UNSIGNED_BYTE",Int16:"SHORT",Uint16:"UNSIGNED_SHORT",Int32:"INT",Uint32:"UNSIGNED_INT",Float32:"FLOAT"},a=function(){function t(e,n,r,i){!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,t),this.length=n.length,this.attributes=r,this.itemSize=n.bytesPerElement,this.dynamicDraw=i,this.context=e;var o=e.gl;this.buffer=o.createBuffer(),e.bindVertexBuffer.set(this.buffer),o.bufferData(o.ARRAY_BUFFER,n.arrayBuffer,this.dynamicDraw?o.DYNAMIC_DRAW:o.STATIC_DRAW),this.dynamicDraw||delete n.arrayBuffer}var e,n,a;return e=t,(n=[{key:"bind",value:function(){this.context.bindVertexBuffer.set(this.buffer)}},{key:"updateData",value:function(t){i(t.length===this.length);var e=this.context.gl;this.bind(),e.bufferSubData(e.ARRAY_BUFFER,0,t.arrayBuffer)}},{key:"enableAttributes",value:function(t,e){for(var n=0;n<this.attributes.length;n++){var r=this.attributes[n],i=e.attributes[r.name];void 0!==i&&t.enableVertexAttribArray(i)}}},{key:"setVertexAttribPointers",value:function(t,e,n){for(var r=0;r<this.attributes.length;r++){var i=this.attributes[r],a=e.attributes[i.name];void 0!==a&&t.vertexAttribPointer(a,i.components,t[o[i.type]],!1,this.itemSize,i.offset+this.itemSize*(n||0))}}},{key:"destroy",value:function(){var t=this.context.gl;this.buffer&&(t.deleteBuffer(this.buffer),delete this.buffer)}}])&&r(e.prototype,n),a&&r(e,a),t}();t.exports=a},function(t,e,n){function r(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,r.key,r)}}var i=n(122),o=i.ColorAttachment,a=i.DepthAttachment,s=function(){function t(e,n,r){!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,t),this.context=e,this.width=n,this.height=r;var i=e.gl,s=this.framebuffer=i.createFramebuffer();this.colorAttachment=new o(e,s),this.depthAttachment=new a(e,s)}var e,n,i;return e=t,(n=[{key:"destroy",value:function(){var t=this.context.gl,e=this.colorAttachment.get();e&&t.deleteTexture(e);var n=this.depthAttachment.get();n&&t.deleteRenderbuffer(n),t.deleteFramebuffer(this.framebuffer)}}])&&r(e.prototype,n),i&&r(e,i),t}();t.exports=s},function(t,e,n){var r,i=n(210);t.exports=function(){return r||(r=new i),r}},function(t,e,n){function r(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,r.key,r)}}var i=n(1),o=n(211),a=function(){function t(){!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,t),this.active={}}var e,a,s;return e=t,(a=[{key:"acquire",value:function(t){if(!this.workers){var e=n(71).workerCount;for(i("number"==typeof e&&e<1/0),this.workers=[];this.workers.length<e;)this.workers.push(new o)}return this.active[t]=!0,this.workers.slice()}},{key:"release",value:function(t){delete this.active[t],0===Object.keys(this.active).length&&(this.workers.forEach(function(t){t.terminate()}),this.workers=null)}}])&&r(e.prototype,a),s&&r(e,s),t}();t.exports=a},function(t,e,n){var r=n(212);n(5);t.exports=function(){return new r}},function(t,e,n){t.exports=function(){return n(213)('!function(t){var e={};function n(r){if(e[r])return e[r].exports;var i=e[r]={i:r,l:!1,exports:{}};return t[r].call(i.exports,i,i.exports,n),i.l=!0,i.exports}n.m=t,n.c=e,n.d=function(t,e,r){n.o(t,e)||Object.defineProperty(t,e,{enumerable:!0,get:r})},n.r=function(t){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(t,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(t,"__esModule",{value:!0})},n.t=function(t,e){if(1&e&&(t=n(t)),8&e)return t;if(4&e&&"object"==typeof t&&t&&t.__esModule)return t;var r=Object.create(null);if(n.r(r),Object.defineProperty(r,"default",{enumerable:!0,value:t}),2&e&&"string"!=typeof t)for(var i in t)n.d(r,i,function(e){return t[e]}.bind(null,i));return r},n.n=function(t){var e=t&&t.__esModule?function(){return t.default}:function(){return t};return n.d(e,"a",e),e},n.o=function(t,e){return Object.prototype.hasOwnProperty.call(t,e)},n.p="",n(n.s=86)}([function(t,e,n){"use strict";(function(e){var r=n(90);\n/*!\n * The buffer module from node.js, for the browser.\n *\n * @author   Feross Aboukhadijeh <feross@feross.org> <http://feross.org>\n * @license  MIT\n */function i(t,e){if(t===e)return 0;for(var n=t.length,r=e.length,i=0,o=Math.min(n,r);i<o;++i)if(t[i]!==e[i]){n=t[i],r=e[i];break}return n<r?-1:r<n?1:0}function o(t){return e.Buffer&&"function"==typeof e.Buffer.isBuffer?e.Buffer.isBuffer(t):!(null==t||!t._isBuffer)}var a=n(91),s=Object.prototype.hasOwnProperty,u=Array.prototype.slice,l="foo"===function(){}.name;function c(t){return Object.prototype.toString.call(t)}function f(t){return!o(t)&&("function"==typeof e.ArrayBuffer&&("function"==typeof ArrayBuffer.isView?ArrayBuffer.isView(t):!!t&&(t instanceof DataView||!!(t.buffer&&t.buffer instanceof ArrayBuffer))))}var h=t.exports=g,p=/\\s*function\\s+([^\\(\\s]*)\\s*/;function y(t){if(a.isFunction(t)){if(l)return t.name;var e=t.toString().match(p);return e&&e[1]}}function d(t,e){return"string"==typeof t?t.length<e?t:t.slice(0,e):t}function v(t){if(l||!a.isFunction(t))return a.inspect(t);var e=y(t);return"[Function"+(e?": "+e:"")+"]"}function m(t,e,n,r,i){throw new h.AssertionError({message:n,actual:t,expected:e,operator:r,stackStartFunction:i})}function g(t,e){t||m(t,!0,e,"==",h.ok)}function b(t,e,n,r){if(t===e)return!0;if(o(t)&&o(e))return 0===i(t,e);if(a.isDate(t)&&a.isDate(e))return t.getTime()===e.getTime();if(a.isRegExp(t)&&a.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(f(t)&&f(e)&&c(t)===c(e)&&!(t instanceof Float32Array||t instanceof Float64Array))return 0===i(new Uint8Array(t.buffer),new Uint8Array(e.buffer));if(o(t)!==o(e))return!1;var s=(r=r||{actual:[],expected:[]}).actual.indexOf(t);return-1!==s&&s===r.expected.indexOf(e)||(r.actual.push(t),r.expected.push(e),function(t,e,n,r){if(null==t||null==e)return!1;if(a.isPrimitive(t)||a.isPrimitive(e))return t===e;if(n&&Object.getPrototypeOf(t)!==Object.getPrototypeOf(e))return!1;var i=x(t),o=x(e);if(i&&!o||!i&&o)return!1;if(i)return t=u.call(t),e=u.call(e),b(t,e,n);var s,l,c=_(t),f=_(e);if(c.length!==f.length)return!1;for(c.sort(),f.sort(),l=c.length-1;l>=0;l--)if(c[l]!==f[l])return!1;for(l=c.length-1;l>=0;l--)if(s=c[l],!b(t[s],e[s],n,r))return!1;return!0}(t,e,n,r))}return n?t===e:t==e}function x(t){return"[object Arguments]"==Object.prototype.toString.call(t)}function w(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 k(t,e,n,r){var i;if("function"!=typeof e)throw new TypeError(\'"block" argument must be a function\');"string"==typeof n&&(r=n,n=null),i=function(t){var e;try{t()}catch(t){e=t}return e}(e),r=(n&&n.name?" ("+n.name+").":".")+(r?" "+r:"."),t&&!i&&m(i,n,"Missing expected exception"+r);var o="string"==typeof r,s=!t&&i&&!n;if((!t&&a.isError(i)&&o&&w(i,n)||s)&&m(i,n,"Got unwanted exception"+r),t&&i&&n&&!w(i,n)||!t&&i)throw i}h.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=function(t){return d(v(t.actual),128)+" "+t.operator+" "+d(v(t.expected),128)}(this),this.generatedMessage=!0);var e=t.stackStartFunction||m;if(Error.captureStackTrace)Error.captureStackTrace(this,e);else{var n=new Error;if(n.stack){var r=n.stack,i=y(e),o=r.indexOf("\\n"+i);if(o>=0){var a=r.indexOf("\\n",o+1);r=r.substring(a+1)}this.stack=r}}},a.inherits(h.AssertionError,Error),h.fail=m,h.ok=g,h.equal=function(t,e,n){t!=e&&m(t,e,n,"==",h.equal)},h.notEqual=function(t,e,n){t==e&&m(t,e,n,"!=",h.notEqual)},h.deepEqual=function(t,e,n){b(t,e,!1)||m(t,e,n,"deepEqual",h.deepEqual)},h.deepStrictEqual=function(t,e,n){b(t,e,!0)||m(t,e,n,"deepStrictEqual",h.deepStrictEqual)},h.notDeepEqual=function(t,e,n){b(t,e,!1)&&m(t,e,n,"notDeepEqual",h.notDeepEqual)},h.notDeepStrictEqual=function t(e,n,r){b(e,n,!0)&&m(e,n,r,"notDeepStrictEqual",t)},h.strictEqual=function(t,e,n){t!==e&&m(t,e,n,"===",h.strictEqual)},h.notStrictEqual=function(t,e,n){t===e&&m(t,e,n,"!==",h.notStrictEqual)},h.throws=function(t,e,n){k(!0,t,e,n)},h.doesNotThrow=function(t,e,n){k(!1,t,e,n)},h.ifError=function(t){if(t)throw t},h.strict=r(function t(e,n){e||m(e,!0,n,"==",t)},h,{equal:h.strictEqual,deepEqual:h.deepStrictEqual,notEqual:h.notStrictEqual,notDeepEqual:h.notDeepStrictEqual}),h.strict.strict=h.strict;var _=Object.keys||function(t){var e=[];for(var n in t)s.call(t,n)&&e.push(n);return e}}).call(this,n(89))},function(t,e,n){function r(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function i(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,r.key,r)}}function o(t,e,n){return e&&i(t.prototype,e),n&&i(t,n),t}var a=n(0),s=n(2),u=s.clone,l=s.extend,c=s.easeCubicInOut,f=n(19),h=n(14).normalizePropertyExpression,p=(n(13),n(3).register),y=function(){function t(e,n){r(this,t),this.property=e,this.value=n,this.expression=h(void 0===n?e.specification.default:n,e.specification)}return o(t,[{key:"isDataDriven",value:function(){return"source"===this.expression.kind||"composite"===this.expression.kind}},{key:"possiblyEvaluate",value:function(t){return this.property.possiblyEvaluate(this,t)}}]),t}(),d=function(){function t(e){r(this,t),this.property=e,this.value=new y(e,void 0)}return o(t,[{key:"transitioned",value:function(t,e){return new m(this.property,this.value,e,l({},t.transition,this.transition),t.now)}},{key:"untransitioned",value:function(){return new m(this.property,this.value,null,{},0)}}]),t}(),v=function(){function t(e){r(this,t),this._properties=e,this._values=Object.create(e.defaultTransitionablePropertyValues)}return o(t,[{key:"getValue",value:function(t){return u(this._values[t].value.value)}},{key:"setValue",value:function(t,e){this._values.hasOwnProperty(t)||(this._values[t]=new d(this._values[t].property)),this._values[t].value=new y(this._values[t].property,null===e?void 0:u(e))}},{key:"getTransition",value:function(t){return u(this._values[t].transition)}},{key:"setTransition",value:function(t,e){this._values.hasOwnProperty(t)||(this._values[t]=new d(this._values[t].property)),this._values[t].transition=u(e)||void 0}},{key:"serialize",value:function(){for(var t={},e=0,n=Object.keys(this._values);e<n.length;e++){var r=n[e],i=this.getValue(r);void 0!==i&&(t[r]=i);var o=this.getTransition(r);void 0!==o&&(t["".concat(r,"-transition")]=o)}return t}},{key:"transitioned",value:function(t,e){for(var n=new g(this._properties),r=0,i=Object.keys(this._values);r<i.length;r++){var o=i[r];n._values[o]=this._values[o].transitioned(t,e._values[o])}return n}},{key:"untransitioned",value:function(){for(var t=new g(this._properties),e=0,n=Object.keys(this._values);e<n.length;e++){var r=n[e];t._values[r]=this._values[r].untransitioned()}return t}}]),t}(),m=function(){function t(e,n,i,o,a){r(this,t),this.property=e,this.value=n,this.begin=a+o.delay||0,this.end=this.begin+o.duration||0,e.specification.transition&&(o.delay||o.duration)&&(this.prior=i)}return o(t,[{key:"possiblyEvaluate",value:function(t){var e=t.now||0,n=this.value.possiblyEvaluate(t),r=this.prior;if(r){if(e>this.end)return this.prior=null,n;if(this.value.isDataDriven())return this.prior=null,n;if(e<this.begin)return r.possiblyEvaluate(t);var i=(e-this.begin)/(this.end-this.begin);return this.property.interpolate(r.possiblyEvaluate(t),n,c(i))}return n}}]),t}(),g=function(){function t(e){r(this,t),this._properties=e,this._values=Object.create(e.defaultTransitioningPropertyValues)}return o(t,[{key:"possiblyEvaluate",value:function(t){for(var e=new w(this._properties),n=0,r=Object.keys(this._values);n<r.length;n++){var i=r[n];e._values[i]=this._values[i].possiblyEvaluate(t)}return e}},{key:"hasTransition",value:function(){for(var t=0,e=Object.keys(this._values);t<e.length;t++){var n=e[t];if(this._values[n].prior)return!0}return!1}}]),t}(),b=function(){function t(e){r(this,t),this._properties=e,this._values=Object.create(e.defaultPropertyValues)}return o(t,[{key:"getValue",value:function(t){return u(this._values[t].value)}},{key:"setValue",value:function(t,e){this._values[t]=new y(this._values[t].property,null===e?void 0:u(e))}},{key:"serialize",value:function(){for(var t={},e=0,n=Object.keys(this._values);e<n.length;e++){var r=n[e],i=this.getValue(r);void 0!==i&&(t[r]=i)}return t}},{key:"possiblyEvaluate",value:function(t){for(var e=new w(this._properties),n=0,r=Object.keys(this._values);n<r.length;n++){var i=r[n];e._values[i]=this._values[i].possiblyEvaluate(t)}return e}}]),t}(),x=function(){function t(e,n,i){r(this,t),this.property=e,this.value=n,this.globals=i}return o(t,[{key:"isConstant",value:function(){return"constant"===this.value.kind}},{key:"constantOr",value:function(t){return"constant"===this.value.kind?this.value.value:t}},{key:"evaluate",value:function(t){return this.property.evaluate(this.value,this.globals,t)}}]),t}(),w=function(){function t(e){r(this,t),this._properties=e,this._values=Object.create(e.defaultPossiblyEvaluatedValues)}return o(t,[{key:"get",value:function(t){return this._values[t]}}]),t}(),k=function(){function t(e){r(this,t),this.specification=e}return o(t,[{key:"possiblyEvaluate",value:function(t,e){return a(!t.isDataDriven()),t.expression.evaluate(e)}},{key:"interpolate",value:function(t,e,n){var r=f[this.specification.type];return r?r(t,e,n):t}}]),t}(),_=function(){function t(e){r(this,t),this.specification=e}return o(t,[{key:"possiblyEvaluate",value:function(t,e){return"constant"===t.expression.kind||"camera"===t.expression.kind?new x(this,{kind:"constant",value:t.expression.evaluate(e)},e):new x(this,t.expression,e)}},{key:"interpolate",value:function(t,e,n){if("constant"!==t.value.kind||"constant"!==e.value.kind)return t;if(void 0!==t.value.value&&void 0!==e.value.value){var r=f[this.specification.type];return r?new x(this,{kind:"constant",value:r(t.value.value,e.value.value,n)},t.globals):t}}},{key:"evaluate",value:function(t,e,n){return"constant"===t.kind?t.value:t.evaluate(e,n)}}]),t}(),S=function(){function t(e){r(this,t),this.specification=e}return o(t,[{key:"possiblyEvaluate",value:function(t,e){if(void 0!==t.value){if("constant"===t.expression.kind){var n=t.expression.evaluate(e);return this._calculate(n,n,n,e)}return a(!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)}}},{key:"_calculate",value:function(t,e,n,r){var i=r.zoom,o=i-Math.floor(i),a=r.crossFadingFactor();return i>r.zoomHistory.lastIntegerZoom?{from:t,to:e,fromScale:2,toScale:1,t:o+(1-o)*a}:{from:n,to:e,fromScale:.5,toScale:1,t:1-(1-a)*o}}},{key:"interpolate",value:function(t){return t}}]),t}(),A=function(){function t(e){r(this,t),this.specification=e}return o(t,[{key:"possiblyEvaluate",value:function(){}},{key:"interpolate",value:function(){}}]),t}();p("DataDrivenProperty",_),p("DataConstantProperty",k),p("CrossFadedProperty",S),p("HeatmapColorProperty",A),t.exports={PropertyValue:y,Transitionable:v,Transitioning:g,Layout:b,PossiblyEvaluatedPropertyValue:x,PossiblyEvaluated:w,DataConstantProperty:k,DataDrivenProperty:_,CrossFadedProperty:S,HeatmapColorProperty:A,Properties:function t(e){for(var n in r(this,t),this.properties=e,this.defaultPropertyValues={},this.defaultTransitionablePropertyValues={},this.defaultTransitioningPropertyValues={},this.defaultPossiblyEvaluatedValues={},e){var i=e[n],o=this.defaultPropertyValues[n]=new y(i,void 0),a=this.defaultTransitionablePropertyValues[n]=new d(i);this.defaultTransitioningPropertyValues[n]=a.untransitioned(),this.defaultPossiblyEvaluatedValues[n]=o.possiblyEvaluate({})}}}},function(t,e,n){function r(t,e){return function(t){if(Array.isArray(t))return t}(t)||function(t,e){var n=[],r=!0,i=!1,o=void 0;try{for(var a,s=t[Symbol.iterator]();!(r=(a=s.next()).done)&&(n.push(a.value),!e||n.length!==e);r=!0);}catch(t){i=!0,o=t}finally{try{r||null==s.return||s.return()}finally{if(i)throw o}}return n}(t,e)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance")}()}function i(t){return(i="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t})(t)}var o=n(46),a=n(47);n(6);e.easeCubicInOut=function(t){if(t<=0)return 0;if(t>=1)return 1;var e=t*t,n=e*t;return 4*(t<.5?n:3*(t-e)+n-.75)},e.bezier=function(t,e,n,r){var i=new o(t,e,n,r);return function(t){return i.solve(t)}},e.ease=e.bezier(.25,.1,.25,1),e.clamp=function(t,e,n){return Math.min(n,Math.max(e,t))},e.wrap=function(t,e,n){var r=n-e,i=((t-e)%r+r)%r+e;return i===e?n:i},e.asyncAll=function(t,e,n){if(!t.length)return n(null,[]);var r=t.length,i=new Array(t.length),o=null;t.forEach(function(t,a){e(t,function(t,e){t&&(o=t),i[a]=e,0==--r&&n(o,i)})})},e.values=function(t){var e=[];for(var n in t)e.push(t[n]);return e},e.keysDifference=function(t,e){var n=[];for(var r in t)r in e||n.push(r);return n},e.extend=function(t){for(var e=arguments.length,n=new Array(e>1?e-1:0),r=1;r<e;r++)n[r-1]=arguments[r];for(var i=0,o=n;i<o.length;i++){var a=o[i];for(var s in a)t[s]=a[s]}return t},e.pick=function(t,e){for(var n={},r=0;r<e.length;r++){var i=e[r];i in t&&(n[i]=t[i])}return n};var s=1;e.uniqueId=function(){return s++},e.bindAll=function(t,e){t.forEach(function(t){e[t]&&(e[t]=e[t].bind(e))})},e.getCoordinatesCenter=function(t){for(var e=1/0,n=1/0,r=-1/0,i=-1/0,o=0;o<t.length;o++)e=Math.min(e,t[o].column),n=Math.min(n,t[o].row),r=Math.max(r,t[o].column),i=Math.max(i,t[o].row);var s=r-e,u=i-n,l=Math.max(s,u),c=Math.max(0,Math.floor(-Math.log(l)/Math.LN2));return new a((e+r)/2,(n+i)/2,0).zoomTo(c)},e.endsWith=function(t,e){return-1!==t.indexOf(e,t.length-e.length)},e.mapObject=function(t,e,n){var r={};for(var i in t)r[i]=e.call(n||this,t[i],i,t);return r},e.filterObject=function(t,e,n){var r={};for(var i in t)e.call(n||this,t[i],i,t)&&(r[i]=t[i]);return r},e.deepEqual=n(88),e.clone=function(t){return Array.isArray(t)?t.map(e.clone):"object"===i(t)&&t?e.mapObject(t,e.clone):t},e.arraysIntersect=function(t,e){for(var n=0;n<t.length;n++)if(e.indexOf(t[n])>=0)return!0;return!1};var u={};e.warnOnce=function(t){u[t]||("undefined"!=typeof console&&console.warn(t),u[t]=!0)},e.isCounterClockwise=function(t,e,n){return(n.y-t.y)*(e.x-t.x)>(e.y-t.y)*(n.x-t.x)},e.calculateSignedArea=function(t){for(var e,n,r=0,i=0,o=t.length,a=o-1;i<o;a=i++)e=t[i],r+=((n=t[a]).x-e.x)*(e.y+n.y);return r},e.isClosedPolygon=function(t){if(t.length<4)return!1;var n=t[0],r=t[t.length-1];return!(Math.abs(n.x-r.x)>0||Math.abs(n.y-r.y)>0)&&Math.abs(e.calculateSignedArea(t))>.01},e.sphericalToCartesian=function(t){var e=r(t,3),n=e[0],i=e[1],o=e[2];return i+=90,i*=Math.PI/180,o*=Math.PI/180,{x:n*Math.cos(i)*Math.sin(o),y:n*Math.sin(i)*Math.sin(o),z:n*Math.cos(o)}},e.parseCacheControl=function(t){var e={};if(t.replace(/(?:^|(?:\\s*\\,\\s*))([^\\x00-\\x20\\(\\)<>@\\,;\\:\\\\"\\/\\[\\]\\?\\=\\{\\}\\x7F]+)(?:\\=(?:([^\\x00-\\x20\\(\\)<>@\\,;\\:\\\\"\\/\\[\\]\\?\\=\\{\\}\\x7F]+)|(?:\\"((?:[^"\\\\]|\\\\.)*)\\")))?/g,function(t,n,r,i){var o=r||i;return e[n]=!o||o.toLowerCase(),""}),e["max-age"]){var n=parseInt(e["max-age"],10);isNaN(n)?delete e["max-age"]:e["max-age"]=n}return e}},function(t,e,n){function r(t){return(r="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t})(t)}var i=n(0),o=n(48),a=n(13),s=n(14),u=s.StylePropertyFunction,l=s.StyleExpression,c=s.StyleExpressionWithErrorHandling,f=s.ZoomDependentExpression,h=s.ZoomConstantExpression,p=n(23).CompoundExpression,y=n(63),d=n(36).ImageData,v={};function m(t,e){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};i(!v[t],"".concat(t," is already registered.")),Object.defineProperty(e,"_classRegistryKey",{value:t,writeable:!1}),v[t]={klass:e,omit:n.omit||[],shallow:n.shallow||[]}}for(var g in m("Object",Object),o.serialize=function(t,e){var n=t.toArrayBuffer();return e&&e.push(n),n},o.deserialize=function(t){return new o(t)},m("Grid",o),m("Color",a),m("StylePropertyFunction",u),m("StyleExpression",l,{omit:["_evaluator"]}),m("StyleExpressionWithErrorHandling",c,{omit:["_evaluator"]}),m("ZoomDependentExpression",f),m("ZoomConstantExpression",h),m("CompoundExpression",p,{omit:["_evaluate"]}),y)y[g]._classRegistryKey||m("Expression_".concat(g),y[g]);t.exports={register:m,serialize:function t(e,n){if(null==e||"boolean"==typeof e||"number"==typeof e||"string"==typeof e||e instanceof Boolean||e instanceof Number||e instanceof String||e instanceof Date||e instanceof RegExp)return e;if(e instanceof ArrayBuffer)return n&&n.push(e),e;if(ArrayBuffer.isView(e)){var o=e;return n&&n.push(o.buffer),o}if(e instanceof d)return n&&n.push(e.data.buffer),e;if(Array.isArray(e)){var a=[],s=!0,u=!1,l=void 0;try{for(var c,f=e[Symbol.iterator]();!(s=(c=f.next()).done);s=!0){var h=c.value;a.push(t(h,n))}}catch(t){u=!0,l=t}finally{try{s||null==f.return||f.return()}finally{if(u)throw l}}return a}if("object"===r(e)){var p=e.constructor,y=p._classRegistryKey;if(!y)throw new Error("can\'t serialize object of unregistered class");i(v[y]);var m={};if(p.serialize)m._serialized=p.serialize(e,n);else for(var g in e)if(e.hasOwnProperty(g)&&!(v[y].omit.indexOf(g)>=0)){var b=e[g];m[g]=v[y].shallow.indexOf(g)>=0?b:t(b,n)}return{name:y,properties:m}}throw new Error("can\'t serialize object of type ".concat(r(e)))},deserialize:function t(e){if(null==e||"boolean"==typeof e||"number"==typeof e||"string"==typeof e||e instanceof Boolean||e instanceof Number||e instanceof String||e instanceof Date||e instanceof RegExp||e instanceof ArrayBuffer||ArrayBuffer.isView(e)||e instanceof d)return e;if(Array.isArray(e))return e.map(function(e){return t(e)});if("object"===r(e)){var n=e,i=n.name,o=n.properties;if(!i)throw new Error("can\'t deserialize object of anonymous class");var a=v[i].klass;if(!a)throw new Error("can\'t deserialize unregistered class ".concat(i));if(a.deserialize)return a.deserialize(o._serialized);for(var s=Object.create(a.prototype),u=0,l=Object.keys(o);u<l.length;u++){var c=l[u];s[c]=v[i].shallow.indexOf(c)>=0?o[c]:t(o[c])}return s}throw new Error("can\'t deserialize object of type ".concat(r(e)))}}},function(t,e){var n={kind:"null"},r={kind:"number"},i={kind:"string"},o={kind:"boolean"},a={kind:"color"},s={kind:"object"},u={kind:"value"};function l(t,e){return{kind:"array",itemType:t,N:e}}function c(t){if("array"===t.kind){var e=c(t.itemType);return"number"==typeof t.N?"array<".concat(e,", ").concat(t.N,">"):"value"===t.itemType.kind?"array":"array<".concat(e,">")}return t.kind}var f=[n,r,i,o,a,s,l(u)];t.exports={NullType:n,NumberType:r,StringType:i,BooleanType:o,ColorType:a,ObjectType:s,ValueType:u,array:l,ErrorType:{kind:"error"},toString:c,checkSubtype:function t(e,n){if("error"===n.kind)return null;if("array"===e.kind){if("array"===n.kind&&!t(e.itemType,n.itemType)&&("number"!=typeof e.N||e.N===n.N))return null}else{if(e.kind===n.kind)return null;if("value"===e.kind)for(var r=0,i=f;r<i.length;r++)if(!t(i[r],n))return null}return"Expected ".concat(c(e)," but found ").concat(c(n)," instead.")}}},function(t,e){t.exports=function(t,e,n){this.message=(t?"".concat(t,": "):"")+n,null!=e&&e.__line__&&(this.line=e.__line__)}},function(t,e,n){"use strict";function r(t,e){this.x=t,this.y=e}t.exports=r,r.prototype={clone:function(){return new r(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,n=t.y-this.y;return e*e+n*n},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,n=t[2]*this.x+t[3]*this.y;return this.x=e,this.y=n,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),n=Math.sin(t),r=e*this.x-n*this.y,i=n*this.x+e*this.y;return this.x=r,this.y=i,this},_rotateAround:function(t,e){var n=Math.cos(t),r=Math.sin(t),i=e.x+n*(this.x-e.x)-r*(this.y-e.y),o=e.y+r*(this.x-e.x)+n*(this.y-e.y);return this.x=i,this.y=o,this},_round:function(){return this.x=Math.round(this.x),this.y=Math.round(this.y),this}},r.convert=function(t){return t instanceof r?t:Array.isArray(t)?new r(t[0],t[1]):t}},function(t,e){function n(t){return(n="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t})(t)}t.exports=function(t){return t instanceof Number?"number":t instanceof String?"string":t instanceof Boolean?"boolean":Array.isArray(t)?"array":null===t?"null":n(t)}},function(t,e,n){t.exports=n(102)},function(t,e,n){function r(t){return(r="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t})(t)}function i(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,r.key,r)}}function o(t,e){return!e||"object"!==r(e)&&"function"!=typeof e?function(t){if(void 0===t)throw new ReferenceError("this hasn\'t been initialised - super() hasn\'t been called");return t}(t):e}function a(t){return(a=Object.setPrototypeOf?Object.getPrototypeOf:function(t){return t.__proto__||Object.getPrototypeOf(t)})(t)}function s(t,e){return(s=Object.setPrototypeOf||function(t,e){return t.__proto__=e,t})(t,e)}var u=n(2),l=n(8),c=n(103),f=n(76),h=n(1),p=h.Layout,y=h.Transitionable,d=(h.Transitioning,h.Properties,function(t){function e(t,n){var r;for(var i in function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,e),(r=o(this,a(e).call(this))).id=t.id,r.metadata=t.metadata,r.type=t.type,r.minzoom=t.minzoom,r.maxzoom=t.maxzoom,r.visibility="visible","background"!==t.type&&(r.source=t.source,r.sourceLayer=t["source-layer"],r.filter=t.filter),r._featureFilter=function(){return!0},n.layout&&(r._unevaluatedLayout=new p(n.layout)),r._transitionablePaint=new y(n.paint),t.paint)r.setPaintProperty(i,t.paint[i],{validate:!1});for(var s in t.layout)r.setLayoutProperty(s,t.layout[s],{validate:!1});return r._transitioningPaint=r._transitionablePaint.untransitioned(),r}var n,r,h;return function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),e&&s(t,e)}(e,f),n=e,(r=[{key:"getLayoutProperty",value:function(t){return"visibility"===t?this.visibility:this._unevaluatedLayout.getValue(t)}},{key:"setLayoutProperty",value:function(t,e,n){if(null!=e){var r="layers.".concat(this.id,".layout.").concat(t);if(this._validate(c.layoutProperty,r,t,e,n))return}"visibility"!==t?this._unevaluatedLayout.setValue(t,e):this.visibility="none"===e?e:"visible"}},{key:"getPaintProperty",value:function(t){return u.endsWith(t,"-transition")?this._transitionablePaint.getTransition(t.slice(0,-"-transition".length)):this._transitionablePaint.getValue(t)}},{key:"setPaintProperty",value:function(t,e,n){if(null!=e){var r="layers.".concat(this.id,".paint.").concat(t);if(this._validate(c.paintProperty,r,t,e,n))return}u.endsWith(t,"-transition")?this._transitionablePaint.setTransition(t.slice(0,-"-transition".length),e||void 0):this._transitionablePaint.setValue(t,e)}},{key:"isHidden",value:function(t){return!!(this.minzoom&&t<this.minzoom)||(!!(this.maxzoom&&t>=this.maxzoom)||"none"===this.visibility)}},{key:"updateTransitions",value:function(t){this._transitioningPaint=this._transitionablePaint.transitioned(t,this._transitioningPaint)}},{key:"hasTransition",value:function(){return this._transitioningPaint.hasTransition()}},{key:"recalculate",value:function(t){this._unevaluatedLayout&&(this.layout=this._unevaluatedLayout.possiblyEvaluate(t)),this.paint=this._transitioningPaint.possiblyEvaluate(t)}},{key:"serialize",value: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"),u.filterObject(t,function(t,e){return!(void 0===t||"layout"===e&&!Object.keys(t).length||"paint"===e&&!Object.keys(t).length)})}},{key:"_validate",value:function(t,e,n,r,i){return(!i||!1!==i.validate)&&c.emitErrors(this,t.call(c,{key:e,layerType:this.type,objectKey:n,value:r,styleSpec:l,style:{glyphs:!0,sprite:!0}}))}},{key:"hasOffscreenPass",value:function(){return!1}},{key:"resize",value:function(){}}])&&i(n.prototype,r),h&&i(n,h),e}());t.exports=d;var v={circle:n(108),heatmap:n(112),hillshade:n(115),fill:n(117),"fill-extrusion":n(122),line:n(126),symbol:n(132),background:n(140),raster:n(142)};d.create=function(t){return new v[t.type](t)}},function(t,e,n){function r(t){return(r="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t})(t)}function i(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function o(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,r.key,r)}}function a(t,e,n){return e&&o(t.prototype,e),n&&o(t,n),t}function s(t,e){return!e||"object"!==r(e)&&"function"!=typeof e?function(t){if(void 0===t)throw new ReferenceError("this hasn\'t been initialised - super() hasn\'t been called");return t}(t):e}function u(t){return(u=Object.setPrototypeOf?Object.getPrototypeOf:function(t){return t.__proto__||Object.getPrototypeOf(t)})(t)}function l(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),e&&c(t,e)}function c(t,e){return(c=Object.setPrototypeOf||function(t,e){return t.__proto__=e,t})(t,e)}var f=n(0),h=n(17).StructArray,p=n(17).Struct,y=n(3).register,d=n(6),v=function(t){function e(){return i(this,e),s(this,u(e).apply(this,arguments))}return l(e,h),a(e,[{key:"_refreshViews",value:function(){this.uint8=new Uint8Array(this.arrayBuffer),this.int16=new Int16Array(this.arrayBuffer)}},{key:"emplaceBack",value:function(t,e){var n=this.length;this.resize(n+1);var r=2*n;return this.int16[r+0]=t,this.int16[r+1]=e,n}}]),e}();v.prototype.bytesPerElement=4,y("StructArrayLayout2i4",v);var m=function(t){function e(){return i(this,e),s(this,u(e).apply(this,arguments))}return l(e,h),a(e,[{key:"_refreshViews",value:function(){this.uint8=new Uint8Array(this.arrayBuffer),this.int16=new Int16Array(this.arrayBuffer)}},{key:"emplaceBack",value:function(t,e,n,r){var i=this.length;this.resize(i+1);var o=4*i;return this.int16[o+0]=t,this.int16[o+1]=e,this.int16[o+2]=n,this.int16[o+3]=r,i}}]),e}();m.prototype.bytesPerElement=8,y("StructArrayLayout4i8",m);var g=function(t){function e(){return i(this,e),s(this,u(e).apply(this,arguments))}return l(e,h),a(e,[{key:"_refreshViews",value:function(){this.uint8=new Uint8Array(this.arrayBuffer),this.int16=new Int16Array(this.arrayBuffer)}},{key:"emplaceBack",value:function(t,e,n,r,i,o){var a=this.length;this.resize(a+1);var s=6*a;return this.int16[s+0]=t,this.int16[s+1]=e,this.int16[s+2]=n,this.int16[s+3]=r,this.int16[s+4]=i,this.int16[s+5]=o,a}}]),e}();g.prototype.bytesPerElement=12,y("StructArrayLayout2i4i12",g);var b=function(t){function e(){return i(this,e),s(this,u(e).apply(this,arguments))}return l(e,h),a(e,[{key:"_refreshViews",value:function(){this.uint8=new Uint8Array(this.arrayBuffer),this.int16=new Int16Array(this.arrayBuffer)}},{key:"emplaceBack",value:function(t,e,n,r,i,o,a,s){var u=this.length;this.resize(u+1);var l=6*u,c=12*u;return this.int16[l+0]=t,this.int16[l+1]=e,this.int16[l+2]=n,this.int16[l+3]=r,this.uint8[c+8]=i,this.uint8[c+9]=o,this.uint8[c+10]=a,this.uint8[c+11]=s,u}}]),e}();b.prototype.bytesPerElement=12,y("StructArrayLayout4i4ub12",b);var x=function(t){function e(){return i(this,e),s(this,u(e).apply(this,arguments))}return l(e,h),a(e,[{key:"_refreshViews",value:function(){this.uint8=new Uint8Array(this.arrayBuffer),this.int16=new Int16Array(this.arrayBuffer),this.uint16=new Uint16Array(this.arrayBuffer)}},{key:"emplaceBack",value:function(t,e,n,r,i,o,a,s){var u=this.length;this.resize(u+1);var l=8*u;return this.int16[l+0]=t,this.int16[l+1]=e,this.int16[l+2]=n,this.int16[l+3]=r,this.uint16[l+4]=i,this.uint16[l+5]=o,this.uint16[l+6]=a,this.uint16[l+7]=s,u}}]),e}();x.prototype.bytesPerElement=16,y("StructArrayLayout4i4ui16",x);var w=function(t){function e(){return i(this,e),s(this,u(e).apply(this,arguments))}return l(e,h),a(e,[{key:"_refreshViews",value:function(){this.uint8=new Uint8Array(this.arrayBuffer),this.float32=new Float32Array(this.arrayBuffer)}},{key:"emplaceBack",value:function(t,e,n){var r=this.length;this.resize(r+1);var i=3*r;return this.float32[i+0]=t,this.float32[i+1]=e,this.float32[i+2]=n,r}}]),e}();w.prototype.bytesPerElement=12,y("StructArrayLayout3f12",w);var k=function(t){function e(){return i(this,e),s(this,u(e).apply(this,arguments))}return l(e,h),a(e,[{key:"_refreshViews",value:function(){this.uint8=new Uint8Array(this.arrayBuffer),this.uint32=new Uint32Array(this.arrayBuffer)}},{key:"emplaceBack",value:function(t){var e=this.length;this.resize(e+1);var n=1*e;return this.uint32[n+0]=t,e}}]),e}();k.prototype.bytesPerElement=4,y("StructArrayLayout1ul4",k);var _=function(t){function e(){return i(this,e),s(this,u(e).apply(this,arguments))}return l(e,h),a(e,[{key:"_refreshViews",value:function(){this.uint8=new Uint8Array(this.arrayBuffer),this.int16=new Int16Array(this.arrayBuffer),this.uint32=new Uint32Array(this.arrayBuffer),this.uint16=new Uint16Array(this.arrayBuffer)}},{key:"emplaceBack",value:function(t,e,n,r,i,o,a,s,u,l,c){var f=this.length;this.resize(f+1);var h=12*f,p=6*f;return this.int16[h+0]=t,this.int16[h+1]=e,this.int16[h+2]=n,this.int16[h+3]=r,this.int16[h+4]=i,this.int16[h+5]=o,this.uint32[p+3]=a,this.uint16[h+8]=s,this.uint16[h+9]=u,this.int16[h+10]=l,this.int16[h+11]=c,f}}]),e}();_.prototype.bytesPerElement=24,y("StructArrayLayout6i1ul2ui2i24",_);var S=function(t){function e(){return i(this,e),s(this,u(e).apply(this,arguments))}return l(e,h),a(e,[{key:"_refreshViews",value:function(){this.uint8=new Uint8Array(this.arrayBuffer),this.int16=new Int16Array(this.arrayBuffer)}},{key:"emplaceBack",value:function(t,e,n,r,i,o){var a=this.length;this.resize(a+1);var s=6*a;return this.int16[s+0]=t,this.int16[s+1]=e,this.int16[s+2]=n,this.int16[s+3]=r,this.int16[s+4]=i,this.int16[s+5]=o,a}}]),e}();S.prototype.bytesPerElement=12,y("StructArrayLayout2i2i2i12",S);var A=function(t){function e(){return i(this,e),s(this,u(e).apply(this,arguments))}return l(e,h),a(e,[{key:"_refreshViews",value:function(){this.uint8=new Uint8Array(this.arrayBuffer)}},{key:"emplaceBack",value:function(t,e){var n=this.length;this.resize(n+1);var r=4*n;return this.uint8[r+0]=t,this.uint8[r+1]=e,n}}]),e}();A.prototype.bytesPerElement=4,y("StructArrayLayout2ub4",A);var T=function(t){function e(){return i(this,e),s(this,u(e).apply(this,arguments))}return l(e,h),a(e,[{key:"_refreshViews",value:function(){this.uint8=new Uint8Array(this.arrayBuffer),this.int16=new Int16Array(this.arrayBuffer),this.uint16=new Uint16Array(this.arrayBuffer),this.uint32=new Uint32Array(this.arrayBuffer),this.float32=new Float32Array(this.arrayBuffer)}},{key:"emplaceBack",value:function(t,e,n,r,i,o,a,s,u,l,c,f,h,p){var y=this.length;this.resize(y+1);var d=20*y,v=10*y,m=40*y;return this.int16[d+0]=t,this.int16[d+1]=e,this.uint16[d+2]=n,this.uint16[d+3]=r,this.uint32[v+2]=i,this.uint32[v+3]=o,this.uint32[v+4]=a,this.uint16[d+10]=s,this.uint16[d+11]=u,this.uint16[d+12]=l,this.float32[v+7]=c,this.float32[v+8]=f,this.uint8[m+36]=h,this.uint8[m+37]=p,y}}]),e}();T.prototype.bytesPerElement=40,y("StructArrayLayout2i2ui3ul3ui2f2ub40",T);var j=function(t){function e(){return i(this,e),s(this,u(e).apply(this,arguments))}return l(e,h),a(e,[{key:"_refreshViews",value:function(){this.uint8=new Uint8Array(this.arrayBuffer),this.float32=new Float32Array(this.arrayBuffer)}},{key:"emplaceBack",value:function(t){var e=this.length;this.resize(e+1);var n=1*e;return this.float32[n+0]=t,e}}]),e}();j.prototype.bytesPerElement=4,y("StructArrayLayout1f4",j);var O=function(t){function e(){return i(this,e),s(this,u(e).apply(this,arguments))}return l(e,h),a(e,[{key:"_refreshViews",value:function(){this.uint8=new Uint8Array(this.arrayBuffer),this.int16=new Int16Array(this.arrayBuffer)}},{key:"emplaceBack",value:function(t,e,n){var r=this.length;this.resize(r+1);var i=3*r;return this.int16[i+0]=t,this.int16[i+1]=e,this.int16[i+2]=n,r}}]),e}();O.prototype.bytesPerElement=6,y("StructArrayLayout3i6",O);var z=function(t){function e(){return i(this,e),s(this,u(e).apply(this,arguments))}return l(e,h),a(e,[{key:"_refreshViews",value:function(){this.uint8=new Uint8Array(this.arrayBuffer),this.uint32=new Uint32Array(this.arrayBuffer),this.uint16=new Uint16Array(this.arrayBuffer)}},{key:"emplaceBack",value:function(t,e,n){var r=this.length;this.resize(r+1);var i=2*r,o=4*r;return this.uint32[i+0]=t,this.uint16[o+2]=e,this.uint16[o+3]=n,r}}]),e}();z.prototype.bytesPerElement=8,y("StructArrayLayout1ul2ui8",z);var P=function(t){function e(){return i(this,e),s(this,u(e).apply(this,arguments))}return l(e,h),a(e,[{key:"_refreshViews",value:function(){this.uint8=new Uint8Array(this.arrayBuffer),this.uint16=new Uint16Array(this.arrayBuffer)}},{key:"emplaceBack",value:function(t,e,n){var r=this.length;this.resize(r+1);var i=3*r;return this.uint16[i+0]=t,this.uint16[i+1]=e,this.uint16[i+2]=n,r}}]),e}();P.prototype.bytesPerElement=6,y("StructArrayLayout3ui6",P);var E=function(t){function e(){return i(this,e),s(this,u(e).apply(this,arguments))}return l(e,h),a(e,[{key:"_refreshViews",value:function(){this.uint8=new Uint8Array(this.arrayBuffer),this.uint16=new Uint16Array(this.arrayBuffer)}},{key:"emplaceBack",value:function(t,e){var n=this.length;this.resize(n+1);var r=2*n;return this.uint16[r+0]=t,this.uint16[r+1]=e,n}}]),e}();E.prototype.bytesPerElement=4,y("StructArrayLayout2ui4",E);var C=function(t){function e(){return i(this,e),s(this,u(e).apply(this,arguments))}return l(e,h),a(e,[{key:"_refreshViews",value:function(){this.uint8=new Uint8Array(this.arrayBuffer),this.float32=new Float32Array(this.arrayBuffer)}},{key:"emplaceBack",value:function(t,e){var n=this.length;this.resize(n+1);var r=2*n;return this.float32[r+0]=t,this.float32[r+1]=e,n}}]),e}();C.prototype.bytesPerElement=8,y("StructArrayLayout2f8",C);var M=function(t){function e(){return i(this,e),s(this,u(e).apply(this,arguments))}return l(e,h),a(e,[{key:"_refreshViews",value:function(){this.uint8=new Uint8Array(this.arrayBuffer),this.float32=new Float32Array(this.arrayBuffer)}},{key:"emplaceBack",value:function(t,e,n,r){var i=this.length;this.resize(i+1);var o=4*i;return this.float32[o+0]=t,this.float32[o+1]=e,this.float32[o+2]=n,this.float32[o+3]=r,i}}]),e}();M.prototype.bytesPerElement=16,y("StructArrayLayout4f16",M);var I=function(t){function e(){return i(this,e),s(this,u(e).apply(this,arguments))}return l(e,p),a(e,[{key:"anchorPointX",get:function(){return this._structArray.int16[this._pos2+0]},set:function(t){this._structArray.int16[this._pos2+0]=t}},{key:"anchorPointY",get:function(){return this._structArray.int16[this._pos2+1]},set:function(t){this._structArray.int16[this._pos2+1]=t}},{key:"x1",get:function(){return this._structArray.int16[this._pos2+2]},set:function(t){this._structArray.int16[this._pos2+2]=t}},{key:"y1",get:function(){return this._structArray.int16[this._pos2+3]},set:function(t){this._structArray.int16[this._pos2+3]=t}},{key:"x2",get:function(){return this._structArray.int16[this._pos2+4]},set:function(t){this._structArray.int16[this._pos2+4]=t}},{key:"y2",get:function(){return this._structArray.int16[this._pos2+5]},set:function(t){this._structArray.int16[this._pos2+5]=t}},{key:"featureIndex",get:function(){return this._structArray.uint32[this._pos4+3]},set:function(t){this._structArray.uint32[this._pos4+3]=t}},{key:"sourceLayerIndex",get:function(){return this._structArray.uint16[this._pos2+8]},set:function(t){this._structArray.uint16[this._pos2+8]=t}},{key:"bucketIndex",get:function(){return this._structArray.uint16[this._pos2+9]},set:function(t){this._structArray.uint16[this._pos2+9]=t}},{key:"radius",get:function(){return this._structArray.int16[this._pos2+10]},set:function(t){this._structArray.int16[this._pos2+10]=t}},{key:"signedDistanceFromAnchor",get:function(){return this._structArray.int16[this._pos2+11]},set:function(t){this._structArray.int16[this._pos2+11]=t}},{key:"anchorPoint",get:function(){return new d(this.anchorPointX,this.anchorPointY)}}]),e}();I.prototype.size=24;var B=function(t){function e(){return i(this,e),s(this,u(e).apply(this,arguments))}return l(e,_),a(e,[{key:"get",value:function(t){return f(!this.isTransferred),new I(this,t)}}]),e}();y("CollisionBoxArray",B);var V=function(t){function e(){return i(this,e),s(this,u(e).apply(this,arguments))}return l(e,p),a(e,[{key:"anchorX",get:function(){return this._structArray.int16[this._pos2+0]},set:function(t){this._structArray.int16[this._pos2+0]=t}},{key:"anchorY",get:function(){return this._structArray.int16[this._pos2+1]},set:function(t){this._structArray.int16[this._pos2+1]=t}},{key:"glyphStartIndex",get:function(){return this._structArray.uint16[this._pos2+2]},set:function(t){this._structArray.uint16[this._pos2+2]=t}},{key:"numGlyphs",get:function(){return this._structArray.uint16[this._pos2+3]},set:function(t){this._structArray.uint16[this._pos2+3]=t}},{key:"vertexStartIndex",get:function(){return this._structArray.uint32[this._pos4+2]},set:function(t){this._structArray.uint32[this._pos4+2]=t}},{key:"lineStartIndex",get:function(){return this._structArray.uint32[this._pos4+3]},set:function(t){this._structArray.uint32[this._pos4+3]=t}},{key:"lineLength",get:function(){return this._structArray.uint32[this._pos4+4]},set:function(t){this._structArray.uint32[this._pos4+4]=t}},{key:"segment",get:function(){return this._structArray.uint16[this._pos2+10]},set:function(t){this._structArray.uint16[this._pos2+10]=t}},{key:"lowerSize",get:function(){return this._structArray.uint16[this._pos2+11]},set:function(t){this._structArray.uint16[this._pos2+11]=t}},{key:"upperSize",get:function(){return this._structArray.uint16[this._pos2+12]},set:function(t){this._structArray.uint16[this._pos2+12]=t}},{key:"lineOffsetX",get:function(){return this._structArray.float32[this._pos4+7]},set:function(t){this._structArray.float32[this._pos4+7]=t}},{key:"lineOffsetY",get:function(){return this._structArray.float32[this._pos4+8]},set:function(t){this._structArray.float32[this._pos4+8]=t}},{key:"writingMode",get:function(){return this._structArray.uint8[this._pos1+36]},set:function(t){this._structArray.uint8[this._pos1+36]=t}},{key:"hidden",get:function(){return this._structArray.uint8[this._pos1+37]},set:function(t){this._structArray.uint8[this._pos1+37]=t}}]),e}();V.prototype.size=40;var L=function(t){function e(){return i(this,e),s(this,u(e).apply(this,arguments))}return l(e,T),a(e,[{key:"get",value:function(t){return f(!this.isTransferred),new V(this,t)}}]),e}();y("PlacedSymbolArray",L);var F=function(t){function e(){return i(this,e),s(this,u(e).apply(this,arguments))}return l(e,p),a(e,[{key:"offsetX",get:function(){return this._structArray.float32[this._pos4+0]},set:function(t){this._structArray.float32[this._pos4+0]=t}}]),e}();F.prototype.size=4;var R=function(t){function e(){return i(this,e),s(this,u(e).apply(this,arguments))}return l(e,j),a(e,[{key:"getoffsetX",value:function(t){return this.float32[1*t+0]}},{key:"get",value:function(t){return f(!this.isTransferred),new F(this,t)}}]),e}();y("GlyphOffsetArray",R);var D=function(t){function e(){return i(this,e),s(this,u(e).apply(this,arguments))}return l(e,p),a(e,[{key:"x",get:function(){return this._structArray.int16[this._pos2+0]},set:function(t){this._structArray.int16[this._pos2+0]=t}},{key:"y",get:function(){return this._structArray.int16[this._pos2+1]},set:function(t){this._structArray.int16[this._pos2+1]=t}},{key:"tileUnitDistanceFromAnchor",get:function(){return this._structArray.int16[this._pos2+2]},set:function(t){this._structArray.int16[this._pos2+2]=t}}]),e}();D.prototype.size=6;var q=function(t){function e(){return i(this,e),s(this,u(e).apply(this,arguments))}return l(e,O),a(e,[{key:"getx",value:function(t){return this.int16[3*t+0]}},{key:"gety",value:function(t){return this.int16[3*t+1]}},{key:"gettileUnitDistanceFromAnchor",value:function(t){return this.int16[3*t+2]}},{key:"get",value:function(t){return f(!this.isTransferred),new D(this,t)}}]),e}();y("SymbolLineVertexArray",q);var N=function(t){function e(){return i(this,e),s(this,u(e).apply(this,arguments))}return l(e,p),a(e,[{key:"featureIndex",get:function(){return this._structArray.uint32[this._pos4+0]},set:function(t){this._structArray.uint32[this._pos4+0]=t}},{key:"sourceLayerIndex",get:function(){return this._structArray.uint16[this._pos2+2]},set:function(t){this._structArray.uint16[this._pos2+2]=t}},{key:"bucketIndex",get:function(){return this._structArray.uint16[this._pos2+3]},set:function(t){this._structArray.uint16[this._pos2+3]=t}}]),e}();N.prototype.size=8;var U=function(t){function e(){return i(this,e),s(this,u(e).apply(this,arguments))}return l(e,z),a(e,[{key:"get",value:function(t){return f(!this.isTransferred),new N(this,t)}}]),e}();y("FeatureIndexArray",U),t.exports={StructArrayLayout2i4:v,StructArrayLayout4i8:m,StructArrayLayout2i4i12:g,StructArrayLayout4i4ub12:b,StructArrayLayout4i4ui16:x,StructArrayLayout3f12:w,StructArrayLayout1ul4:k,StructArrayLayout6i1ul2ui2i24:_,StructArrayLayout2i2i2i12:S,StructArrayLayout2ub4:A,StructArrayLayout2i2ui3ul3ui2f2ub40:T,StructArrayLayout1f4:j,StructArrayLayout3i6:O,StructArrayLayout1ul2ui8:z,StructArrayLayout3ui6:P,StructArrayLayout2ui4:E,StructArrayLayout2f8:C,StructArrayLayout4f16:M,PosArray:v,RasterBoundsArray:m,CircleLayoutArray:v,FillLayoutArray:v,FillExtrusionLayoutArray:g,HeatmapLayoutArray:v,LineLayoutArray:b,SymbolLayoutArray:x,SymbolDynamicLayoutArray:w,SymbolOpacityArray:k,CollisionBoxLayoutArray:S,CollisionCircleLayoutArray:S,CollisionVertexArray:A,TriangleIndexArray:P,LineIndexArray:E,CollisionBoxArray:B,PlacedSymbolArray:L,GlyphOffsetArray:R,SymbolLineVertexArray:q,FeatureIndexArray:U}},function(t,e,n){function r(t){return(r="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t})(t)}var i=n(0),o=n(13),a=n(4),s=a.NullType,u=a.NumberType,l=a.StringType,c=a.BooleanType,f=a.ColorType,h=a.ObjectType,p=a.ValueType,y=a.array;t.exports={Color:o,validateRGBA:function(t,e,n,r){return"number"==typeof t&&t>=0&&t<=255&&"number"==typeof e&&e>=0&&e<=255&&"number"==typeof n&&n>=0&&n<=255?void 0===r||"number"==typeof r&&r>=0&&r<=1?null:"Invalid rgba value [".concat([t,e,n,r].join(", "),"]: \'a\' must be between 0 and 1."):"Invalid rgba value [".concat(("number"==typeof r?[t,e,n,r]:[t,e,n]).join(", "),"]: \'r\', \'g\', and \'b\' must be between 0 and 255.")},isValue:function t(e){if(null===e)return!0;if("string"==typeof e)return!0;if("boolean"==typeof e)return!0;if("number"==typeof e)return!0;if(e instanceof o)return!0;if(Array.isArray(e)){var n=!0,i=!1,a=void 0;try{for(var s,u=e[Symbol.iterator]();!(n=(s=u.next()).done);n=!0)if(!t(s.value))return!1}catch(t){i=!0,a=t}finally{try{n||null==u.return||u.return()}finally{if(i)throw a}}return!0}if("object"===r(e)){for(var l in e)if(!t(e[l]))return!1;return!0}return!1},typeOf:function t(e){if(null===e)return s;if("string"==typeof e)return l;if("boolean"==typeof e)return c;if("number"==typeof e)return u;if(e instanceof o)return f;if(Array.isArray(e)){var n,a=e.length,d=!0,v=!1,m=void 0;try{for(var g,b=e[Symbol.iterator]();!(d=(g=b.next()).done);d=!0){var x=t(g.value);if(n){if(n===x)continue;n=p;break}n=x}}catch(t){v=!0,m=t}finally{try{d||null==b.return||b.return()}finally{if(v)throw m}}return y(n||p,a)}return i("object"===r(e)),h}}},function(t,e){function n(t){return t instanceof Number||t instanceof String||t instanceof Boolean?t.valueOf():t}t.exports=n,t.exports.deep=function t(e){return Array.isArray(e)?e.map(t):n(e)}},function(t,e,n){function r(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,r.key,r)}}var i=n(49).parseCSSColor,o=function(){function t(e,n,r){var i=arguments.length>3&&void 0!==arguments[3]?arguments[3]:1;!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,t),this.r=e,this.g=n,this.b=r,this.a=i}var e,n,o;return e=t,o=[{key:"parse",value:function(e){if(e){if(e instanceof t)return e;if("string"==typeof e){var n=i(e);if(n)return new t(n[0]/255*n[3],n[1]/255*n[3],n[2]/255*n[3],n[3])}}}}],(n=[{key:"toString",value:function(){var t=this,e=[this.r,this.g,this.b].map(function(e){return Math.round(255*e/t.a)});return"rgba(".concat(e.concat(this.a).join(","),")")}}])&&r(e.prototype,n),o&&r(e,o),t}();o.black=new o(0,0,0,1),o.white=new o(1,1,1,1),o.transparent=new o(0,0,0,0),t.exports=o},function(t,e,n){function r(t){return(r="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t})(t)}function i(t,e){return!e||"object"!==r(e)&&"function"!=typeof e?function(t){if(void 0===t)throw new ReferenceError("this hasn\'t been initialised - super() hasn\'t been called");return t}(t):e}function o(t){return(o=Object.setPrototypeOf?Object.getPrototypeOf:function(t){return t.__proto__||Object.getPrototypeOf(t)})(t)}function a(t,e){return(a=Object.setPrototypeOf||function(t,e){return t.__proto__=e,t})(t,e)}function s(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function u(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,r.key,r)}}function l(t,e,n){return e&&u(t.prototype,e),n&&u(t,n),t}var c=n(0),f=n(22),h=n(50),p=n(51),y=n(33),d=n(23).CompoundExpression,v=n(59),m=n(34),g=n(61),b=n(62),x=n(63),w=n(57),k=n(15),_=n(99),S=_.success,A=_.error,T=function(){function t(e){s(this,t),this.expression=e}return l(t,[{key:"evaluate",value:function(t,e){return this._evaluator||(this._evaluator=new y),this._evaluator.globals=t,this._evaluator.feature=e,this.expression.evaluate(this._evaluator)}}]),t}(),j=function(t){function e(t,n){var r,a;return s(this,e),(r=i(this,o(e).call(this,t)))._warningHistory={},r._defaultValue="color"===(a=n).type&&I(a.default)?new V(0,0,0,0):"color"===a.type?V.parse(a.default)||null:void 0===a.default?null:a.default,"enum"===n.type&&(r._enumValues=n.values),r}return function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),e&&a(t,e)}(e,T),l(e,[{key:"evaluate",value:function(t,e){this._evaluator||(this._evaluator=new y),this._evaluator.globals=t,this._evaluator.feature=e;try{var n=this.expression.evaluate(this._evaluator);if(null==n)return this._defaultValue;if(this._enumValues&&!(n in this._enumValues))throw new k("Expected value to be one of ".concat(Object.keys(this._enumValues).map(function(t){return JSON.stringify(t)}).join(", "),", but found ").concat(JSON.stringify(n)," instead."));return n}catch(t){return this._warningHistory[t.message]||(this._warningHistory[t.message]=!0,"undefined"!=typeof console&&console.warn(t.message)),this._defaultValue}}}]),e}();function O(t){return Array.isArray(t)&&t.length>0&&"string"==typeof t[0]&&t[0]in x}function z(t,e){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{},r=new p(x,[],function(t){var e={color:R,string:D,number:q,enum:D,boolean:N};if("array"===t.type)return J(e[t.value]||U,t.length);return e[t.type]||null}(e)),i=r.parse(t);return i?!1===n.handleErrors?S(new T(i)):S(new j(i,e)):(c(r.errors.length>0),A(r.errors))}var P=function(){function t(e,n){s(this,t),this.kind=e,this._styleExpression=n}return l(t,[{key:"evaluate",value:function(t,e){return this._styleExpression.evaluate(t,e)}}]),t}(),E=function(){function t(e,n,r){s(this,t),this.kind=e,this.zoomStops=r.labels,this._styleExpression=n,r instanceof m&&(this._interpolationType=r.interpolation)}return l(t,[{key:"evaluate",value:function(t,e){return this._styleExpression.evaluate(t,e)}},{key:"interpolationFactor",value:function(t,e,n){return this._interpolationType?m.interpolationFactor(this._interpolationType,t,e,n):0}}]),t}();function C(t,e){if("error"===(t=z(t,e,arguments.length>2&&void 0!==arguments[2]?arguments[2]:{})).result)return t;var n=t.value.expression,r=w.isFeatureConstant(n);if(!r&&!e["property-function"])return A([new h("","property expressions not supported")]);var i=w.isGlobalPropertyConstant(n,["zoom"]);if(!i&&!1===e["zoom-function"])return A([new h("","zoom expressions not supported")]);var o=function t(e){var n=null;if(e instanceof b)n=t(e.result);else if(e instanceof g){var r=!0,i=!1,o=void 0;try{for(var a,s=e.args[Symbol.iterator]();!(r=(a=s.next()).done);r=!0){var u=a.value;if(n=t(u))break}}catch(t){i=!0,o=t}finally{try{r||null==s.return||s.return()}finally{if(i)throw o}}}else(e instanceof v||e instanceof m)&&e.input instanceof d&&"zoom"===e.input.name&&(n=e);if(n instanceof h)return n;e.eachChild(function(e){var r=t(e);r instanceof h?n=r:!n&&r?n=new h("",\'"zoom" expression may only be used as input to a top-level "step" or "interpolate" expression.\'):n&&r&&n!==r&&(n=new h("",\'Only one zoom-based "step" or "interpolate" subexpression may be used in an expression.\'))});return n}(n);return o||i?o instanceof h?A([o]):o instanceof m&&"piecewise-constant"===e.function?A([new h("",\'"interpolate" expressions cannot be used with this property\')]):S(o?new E(r?"camera":"composite",t.value,o):new P(r?"constant":"source",t.value)):A([new h("",\'"zoom" expression may only be used as input to a top-level "step" or "interpolate" expression.\')])}var M=n(35),I=M.isFunction,B=M.createFunction,V=n(11).Color,L=function(){function t(e,n){s(this,t),this._parameters=e,this._specification=n,f(this,B(this._parameters,this._specification))}return l(t,null,[{key:"deserialize",value:function(e){return new t(e._parameters,e._specification)}},{key:"serialize",value:function(t){return{_parameters:t._parameters,_specification:t._specification}}}]),t}();t.exports={StyleExpression:T,StyleExpressionWithErrorHandling:j,isExpression:O,createExpression:z,createPropertyExpression:C,normalizePropertyExpression:function(t,e){if(I(t))return new L(t,e);if(O(t)){var n=C(t,e);if("error"===n.result)throw new Error(n.value.map(function(t){return"".concat(t.key,": ").concat(t.message)}).join(", "));return n.value}var r=t;return"string"==typeof t&&"color"===e.type&&(r=V.parse(t)),{kind:"constant",evaluate:function(){return r}}},ZoomConstantExpression:P,ZoomDependentExpression:E,StylePropertyFunction:L};var F=n(4),R=F.ColorType,D=F.StringType,q=F.NumberType,N=F.BooleanType,U=F.ValueType,J=F.array},function(t,e){function n(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,r.key,r)}}var r=function(){function t(e){!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,t),this.name="ExpressionEvaluationError",this.message=e}var e,r,i;return e=t,(r=[{key:"toJSON",value:function(){return this.message}}])&&n(e.prototype,r),i&&n(e,i),t}();t.exports=r},function(t,e,n){var r=n(22),i=n(12),o=n(14).isExpression,a=n(35).isFunction;t.exports=function(t){var e=n(65),s=n(68),u=n(24),l={"*":function(){return[]},array:n(66),boolean:n(105),number:n(67),color:n(106),constants:n(64),enum:n(37),filter:n(38),function:n(65),layer:n(69),object:n(24),source:n(73),light:n(74),string:n(75)},c=t.value,f=t.valueSpec,h=t.styleSpec;return f.function&&a(i(c))?e(t):f.function&&o(i.deep(c))?s(t):f.type&&l[f.type]?l[f.type](t):u(r({},t,{valueSpec:f.type?h[f.type]:f}))}},function(t,e,n){function r(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,r.key,r)}}function i(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}var o=n(0),a={Int8:Int8Array,Uint8:Uint8Array,Int16:Int16Array,Uint16:Uint16Array,Int32:Int32Array,Uint32:Uint32Array,Float32:Float32Array},s=function(){function t(){i(this,t),this.isTransferred=!1,this.capacity=-1,this.resize(0)}var e,n,a;return e=t,a=[{key:"serialize",value:function(t,e){return o(!t.isTransferred),t._trim(),e&&(t.isTransferred=!0,e.push(t.arrayBuffer)),{length:t.length,arrayBuffer:t.arrayBuffer}}},{key:"deserialize",value:function(t){var e=Object.create(this.prototype);return e.arrayBuffer=t.arrayBuffer,e.length=t.length,e.capacity=t.arrayBuffer.byteLength/e.bytesPerElement,e._refreshViews(),e}}],(n=[{key:"_trim",value:function(){this.length!==this.capacity&&(this.capacity=this.length,this.arrayBuffer=this.arrayBuffer.slice(0,this.length*this.bytesPerElement),this._refreshViews())}},{key:"clear",value:function(){this.length=0}},{key:"resize",value:function(t){o(!this.isTransferred),this.reserve(t),this.length=t}},{key:"reserve",value:function(t){if(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)}}},{key:"_refreshViews",value:function(){throw new Error("_refreshViews() must be implemented by each concrete StructArray layout")}}])&&r(e.prototype,n),a&&r(e,a),t}();function u(t,e){return Math.ceil(t/e)*e}t.exports.StructArray=s,t.exports.Struct=function t(e,n){i(this,t),this._structArray=e,this._pos1=n*this.size,this._pos2=this._pos1/2,this._pos4=this._pos1/4,this._pos8=this._pos1/8},t.exports.viewTypes=a,t.exports.createLayout=function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:1,n=0,r=0;return{members:t.map(function(t){o(t.name.length);var i,s=(i=t.type,a[i].BYTES_PER_ELEMENT),l=n=u(n,Math.max(e,s)),c=t.components||1;return r=Math.max(r,s),n+=s*c,{name:t.name,type:t.type,components:c,offset:l}}),size:u(n,Math.max(r,e)),alignment:e}}},function(t,e){t.exports=8192},function(t,e,n){var r=n(13);function i(t,e,n){return t*(1-n)+e*n}t.exports={number:i,color:function(t,e,n){return new r(i(t.r,e.r,n),i(t.g,e.g,n),i(t.b,e.b,n),i(t.a,e.a,n))},array:function(t,e,n){return t.map(function(t,r){return i(t,e[r],n)})}}},function(t,e,n){var r=n(2),i=n(18);var o,a=(o=16,{min:-1*Math.pow(2,o-1),max:Math.pow(2,o-1)-1});t.exports=function(t){for(var e=i/t.extent,n=t.loadGeometry(),o=0;o<n.length;o++)for(var s=n[o],u=0;u<s.length;u++){var l=s[u];l.x=Math.round(l.x*e),l.y=Math.round(l.y*e),(l.x<a.min||l.x>a.max||l.y<a.min||l.y>a.max)&&r.warnOnce("Geometry exceeds allowed extent, reduce your vector tile buffer size")}return n}},function(t,e,n){t.exports.VectorTile=n(129),t.exports.VectorTileFeature=n(80),t.exports.VectorTileLayer=n(79)},function(t,e){t.exports=function(t){for(var e=arguments.length,n=new Array(e>1?e-1:0),r=1;r<e;r++)n[r-1]=arguments[r];for(var i=0,o=n;i<o.length;i++){var a=o[i];for(var s in a)t[s]=a[s]}return t}},function(t,e,n){function r(t,e){return function(t){if(Array.isArray(t))return t}(t)||function(t,e){var n=[],r=!0,i=!1,o=void 0;try{for(var a,s=t[Symbol.iterator]();!(r=(a=s.next()).done)&&(n.push(a.value),!e||n.length!==e);r=!0);}catch(t){i=!0,o=t}finally{try{r||null==s.return||s.return()}finally{if(i)throw o}}return n}(t,e)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance")}()}function i(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,r.key,r)}}var o=n(4).toString,a=n(51),s=(n(33),n(0)),u=function(){function t(e,n,r,i){!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,t),this.name=e,this.type=n,this._evaluate=r,this.args=i}var e,n,u;return e=t,u=[{key:"parse",value:function(e,n){var i=e[0],u=t.definitions[i];if(!u)return n.error(\'Unknown expression "\'.concat(i,\'". If you wanted a literal array, use ["literal", [...]].\'),0);for(var l=Array.isArray(u)?u[0]:u.type,c=Array.isArray(u)?[[u[1],u[2]]]:u.overloads,f=c.filter(function(t){var n=r(t,1)[0];return!Array.isArray(n)||n.length===e.length-1}),h=[],p=1;p<e.length;p++){var y=e[p],d=void 0;if(1===f.length){var v=f[0][0];d=Array.isArray(v)?v[p-1]:v.type}var m=n.parse(y,1+h.length,d);if(!m)return null;h.push(m)}var g=null,b=!0,x=!1,w=void 0;try{for(var k,_=f[Symbol.iterator]();!(b=(k=_.next()).done);b=!0){var S=r(k.value,2),A=S[0],T=S[1];if(g=new a(n.registry,n.path,null,n.scope),Array.isArray(A)&&A.length!==h.length)g.error("Expected ".concat(A.length," arguments, but found ").concat(h.length," instead."));else{for(var j=0;j<h.length;j++){var O=Array.isArray(A)?A[j]:A.type,z=h[j];g.concat(j+1).checkSubtype(O,z.type)}if(0===g.errors.length)return new t(i,l,T,h)}}}catch(t){x=!0,w=t}finally{try{b||null==_.return||_.return()}finally{if(x)throw w}}if(s(!g||g.errors.length>0),1===f.length)n.errors.push.apply(n.errors,g.errors);else{var P=(f.length?f:c).map(function(t){var e,n=r(t,1)[0];return e=n,Array.isArray(e)?"(".concat(e.map(o).join(", "),")"):"(".concat(o(e.type),"...)")}).join(" | "),E=h.map(function(t){return o(t.type)}).join(", ");n.error("Expected arguments of type ".concat(P,", but found (").concat(E,") instead."))}return null}},{key:"register",value:function(e,n){for(var r in s(!t.definitions),t.definitions=n,n)e[r]=t}}],(n=[{key:"evaluate",value:function(t){return this._evaluate(t,this.args)}},{key:"eachChild",value:function(t){this.args.forEach(t)}},{key:"possibleOutputs",value:function(){return[void 0]}}])&&i(e.prototype,n),u&&i(e,u),t}();t.exports={CompoundExpression:u,varargs:function(t){return{type:t}}}},function(t,e,n){var r=n(5),i=n(7),o=n(16);t.exports=function(t){var e=t.key,n=t.value,a=t.valueSpec||{},s=t.objectElementValidators||{},u=t.style,l=t.styleSpec,c=[],f=i(n);if("object"!==f)return[new r(e,n,"object expected, ".concat(f," found"))];for(var h in n){var p=h.split(".")[0],y=a[p]||a["*"],d=void 0;if(s[p])d=s[p];else if(a[p])d=o;else if(s["*"])d=s["*"];else{if(!a["*"]){c.push(new r(e,n[h],\'unknown property "\'.concat(h,\'"\')));continue}d=o}c=c.concat(d({key:(e?"".concat(e,"."):e)+h,value:n[h],valueSpec:y,style:u,styleSpec:l,object:n,objectKey:h},n))}for(var v in a)s[v]||a[v].required&&void 0===a[v].default&&void 0===n[v]&&c.push(new r(e,n,\'missing required property "\'.concat(v,\'"\')));return c}},function(t,e,n){function r(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,r.key,r)}}var i=n(2).warnOnce,o=n(3).register,a=Math.pow(2,16)-1,s=function(){function e(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:[];!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,e),this.segments=t}var n,o,s;return n=e,(o=[{key:"prepareSegment",value:function(e,n,r){var o=this.segments[this.segments.length-1];return e>a&&i("Max vertices per segment is ".concat(a,": bucket requested ").concat(e)),(!o||o.vertexLength+e>t.exports.MAX_VERTEX_ARRAY_LENGTH)&&(o={vertexOffset:n.length,primitiveOffset:r.length,vertexLength:0,primitiveLength:0},this.segments.push(o)),o}},{key:"get",value:function(){return this.segments}},{key:"destroy",value:function(){var t=!0,e=!1,n=void 0;try{for(var r,i=this.segments[Symbol.iterator]();!(t=(r=i.next()).done);t=!0){var o=r.value;for(var a in o.vaos)o.vaos[a].destroy()}}catch(t){e=!0,n=t}finally{try{t||null==i.return||i.return()}finally{if(e)throw n}}}}])&&r(n.prototype,o),s&&r(n,s),e}();o("SegmentVector",s),t.exports={SegmentVector:s,MAX_VERTEX_ARRAY_LENGTH:a}},function(t,e,n){function r(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function i(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,r.key,r)}}function o(t,e,n){return e&&i(t.prototype,e),n&&i(t,n),t}var a=n(110).packUint8ToFloat,s=(n(13),n(3).register),u=n(1).PossiblyEvaluatedPropertyValue,l=n(10),c=l.StructArrayLayout1f4,f=l.StructArrayLayout2f8,h=l.StructArrayLayout4f16;function p(t){return[a(255*t.r,255*t.g),a(255*t.b,255*t.a)]}var y=function(){function t(e,n,i){r(this,t),this.value=e,this.name=n,this.type=i,this.statistics={max:-1/0}}return o(t,[{key:"defines",value:function(){return["#define HAS_UNIFORM_u_".concat(this.name)]}},{key:"populatePaintArray",value:function(){}},{key:"upload",value:function(){}},{key:"destroy",value:function(){}},{key:"setUniforms",value:function(t,e,n,r){var i=r.constantOr(this.value),o=t.gl;"color"===this.type?o.uniform4f(e.uniforms["u_".concat(this.name)],i.r,i.g,i.b,i.a):o.uniform1f(e.uniforms["u_".concat(this.name)],i)}}]),t}(),d=function(){function t(e,n,i){r(this,t),this.expression=e,this.name=n,this.type=i,this.statistics={max:-1/0};var o="color"===i?f:c;this.paintVertexAttributes=[{name:"a_".concat(n),type:"Float32",components:"color"===i?2:1,offset:0}],this.paintVertexArray=new o}return o(t,[{key:"defines",value:function(){return[]}},{key:"populatePaintArray",value:function(t,e){var n=this.paintVertexArray,r=n.length;n.reserve(t);var i=this.expression.evaluate({zoom:0},e);if("color"===this.type)for(var o=p(i),a=r;a<t;a++)n.emplaceBack(o[0],o[1]);else{for(var s=r;s<t;s++)n.emplaceBack(i);this.statistics.max=Math.max(this.statistics.max,i)}}},{key:"upload",value:function(t){this.paintVertexArray&&(this.paintVertexBuffer=t.createVertexBuffer(this.paintVertexArray,this.paintVertexAttributes))}},{key:"destroy",value:function(){this.paintVertexBuffer&&this.paintVertexBuffer.destroy()}},{key:"setUniforms",value:function(t,e){t.gl.uniform1f(e.uniforms["a_".concat(this.name,"_t")],0)}}]),t}(),v=function(){function t(e,n,i,o,a){r(this,t),this.expression=e,this.name=n,this.type=i,this.useIntegerZoom=o,this.zoom=a,this.statistics={max:-1/0};var s="color"===i?h:f;this.paintVertexAttributes=[{name:"a_".concat(n),type:"Float32",components:"color"===i?4:2,offset:0}],this.paintVertexArray=new s}return o(t,[{key:"defines",value:function(){return[]}},{key:"populatePaintArray",value:function(t,e){var n=this.paintVertexArray,r=n.length;n.reserve(t);var i=this.expression.evaluate({zoom:this.zoom},e),o=this.expression.evaluate({zoom:this.zoom+1},e);if("color"===this.type)for(var a=p(i),s=p(o),u=r;u<t;u++)n.emplaceBack(a[0],a[1],s[0],s[1]);else{for(var l=r;l<t;l++)n.emplaceBack(i,o);this.statistics.max=Math.max(this.statistics.max,i,o)}}},{key:"upload",value:function(t){this.paintVertexArray&&(this.paintVertexBuffer=t.createVertexBuffer(this.paintVertexArray,this.paintVertexAttributes))}},{key:"destroy",value:function(){this.paintVertexBuffer&&this.paintVertexBuffer.destroy()}},{key:"interpolationFactor",value: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)}},{key:"setUniforms",value:function(t,e,n){t.gl.uniform1f(e.uniforms["a_".concat(this.name,"_t")],this.interpolationFactor(n.zoom))}}]),t}(),m=function(){function t(){r(this,t),this.binders={},this.cacheKey="",this._buffers=[]}return o(t,[{key:"populatePaintArrays",value:function(t,e){for(var n in this.binders)this.binders[n].populatePaintArray(t,e)}},{key:"defines",value:function(){var t=[];for(var e in this.binders)t.push.apply(t,this.binders[e].defines());return t}},{key:"setUniforms",value:function(t,e,n,r){for(var i in this.binders){this.binders[i].setUniforms(t,e,r,n.get(i))}}},{key:"getPaintVertexBuffers",value:function(){return this._buffers}},{key:"upload",value:function(t){for(var e in this.binders)this.binders[e].upload(t);var n=[];for(var r in this.binders){var i=this.binders[r];(i instanceof d||i instanceof v)&&i.paintVertexBuffer&&n.push(i.paintVertexBuffer)}this._buffers=n}},{key:"destroy",value:function(){for(var t in this.binders)this.binders[t].destroy()}}],[{key:"createDynamic",value:function(e,n,r){var i=new t,o=[];for(var a in e.paint._values)if(r(a)){var s=e.paint.get(a);if(s instanceof u&&s.property.specification["property-function"]){var l=b(a,e.type),c=s.property.specification.type,f=s.property.useIntegerZoom;"constant"===s.value.kind?(i.binders[a]=new y(s.value,l,c),o.push("/u_".concat(l))):"source"===s.value.kind?(i.binders[a]=new d(s.value,l,c),o.push("/a_".concat(l))):(i.binders[a]=new v(s.value,l,c,f,n),o.push("/z_".concat(l)))}}return i.cacheKey=o.sort().join(""),i}}]),t}(),g=function(){function t(e,n,i){var o=arguments.length>3&&void 0!==arguments[3]?arguments[3]:function(){return!0};r(this,t),this.programConfigurations={};var a=!0,s=!1,u=void 0;try{for(var l,c=n[Symbol.iterator]();!(a=(l=c.next()).done);a=!0){var f=l.value;this.programConfigurations[f.id]=m.createDynamic(f,i,o),this.programConfigurations[f.id].layoutAttributes=e}}catch(t){s=!0,u=t}finally{try{a||null==c.return||c.return()}finally{if(s)throw u}}}return o(t,[{key:"populatePaintArrays",value:function(t,e){for(var n in this.programConfigurations)this.programConfigurations[n].populatePaintArrays(t,e)}},{key:"get",value:function(t){return this.programConfigurations[t]}},{key:"upload",value:function(t){for(var e in this.programConfigurations)this.programConfigurations[e].upload(t)}},{key:"destroy",value:function(){for(var t in this.programConfigurations)this.programConfigurations[t].destroy()}}]),t}();function b(t,e){return{"text-opacity":"opacity","icon-opacity":"opacity","text-color":"fill_color","icon-color":"fill_color","text-halo-color":"halo_color","icon-halo-color":"halo_color","text-halo-blur":"halo_blur","icon-halo-blur":"halo_blur","text-halo-width":"halo_width","icon-halo-width":"halo_width","line-gap-width":"gapwidth"}[t]||t.replace("".concat(e,"-"),"").replace(/-/g,"_")}s("ConstantBinder",y),s("SourceExpressionBinder",d),s("CompositeExpressionBinder",v),s("ProgramConfiguration",m,{omit:["_buffers"]}),s("ProgramConfigurationSet",g),t.exports={ProgramConfiguration:m,ProgramConfigurationSet:g}},function(t,e,n){t.exports={LineIndexArray:n(10).LineIndexArray,TriangleIndexArray:n(10).TriangleIndexArray}},function(t,e,n){var r=n(2).isCounterClockwise;function i(t,e,n){if(t.length>1){if(o(t,e))return!0;for(var r=0;r<e.length;r++)if(s(e[r],t,n))return!0}for(var i=0;i<t.length;i++)if(s(t[i],e,n))return!0;return!1}function o(t,e){if(0===t.length||0===e.length)return!1;for(var n=0;n<t.length-1;n++)for(var r=t[n],i=t[n+1],o=0;o<e.length-1;o++){if(a(r,i,e[o],e[o+1]))return!0}return!1}function a(t,e,n,i){return r(t,n,i)!==r(e,n,i)&&r(t,e,n)!==r(t,e,i)}function s(t,e,n){var r=n*n;if(1===e.length)return t.distSqr(e[0])<r;for(var i=1;i<e.length;i++){if(u(t,e[i-1],e[i])<r)return!0}return!1}function u(t,e,n){var r=e.distSqr(n);if(0===r)return t.distSqr(e);var i=((t.x-e.x)*(n.x-e.x)+(t.y-e.y)*(n.y-e.y))/r;return i<0?t.distSqr(e):i>1?t.distSqr(n):t.distSqr(n.sub(e)._mult(i)._add(e))}function l(t,e){for(var n,r,i,o=!1,a=0;a<t.length;a++)for(var s=0,u=(n=t[a]).length-1;s<n.length;u=s++)r=n[s],i=n[u],r.y>e.y!=i.y>e.y&&e.x<(i.x-r.x)*(e.y-r.y)/(i.y-r.y)+r.x&&(o=!o);return o}function c(t,e){for(var n=!1,r=0,i=t.length-1;r<t.length;i=r++){var o=t[r],a=t[i];o.y>e.y!=a.y>e.y&&e.x<(a.x-o.x)*(e.y-o.y)/(a.y-o.y)+o.x&&(n=!n)}return n}t.exports={multiPolygonIntersectsBufferedMultiPoint:function(t,e,n){for(var r=0;r<t.length;r++)for(var i=t[r],o=0;o<e.length;o++)for(var a=e[o],u=0;u<a.length;u++){var l=a[u];if(c(i,l))return!0;if(s(l,i,n))return!0}return!1},multiPolygonIntersectsMultiPolygon:function(t,e){if(1===t.length&&1===t[0].length)return l(e,t[0][0]);for(var n=0;n<e.length;n++)for(var r=e[n],i=0;i<r.length;i++)if(l(t,r[i]))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(o(s,e[c]))return!0}return!1},multiPolygonIntersectsBufferedMultiLine:function(t,e,n){for(var r=0;r<e.length;r++)for(var o=e[r],a=0;a<t.length;a++){var s=t[a];if(s.length>=3)for(var u=0;u<o.length;u++)if(c(s,o[u]))return!0;if(i(s,o,n))return!0}return!1},polygonIntersectsPolygon:function(t,e){for(var n=0;n<t.length;n++)if(c(e,t[n]))return!0;for(var r=0;r<e.length;r++)if(c(t,e[r]))return!0;return!!o(t,e)},distToSegmentSquared:u}},function(t,e,n){function r(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function i(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,r.key,r)}}function o(t,e,n){return e&&i(t.prototype,e),n&&i(t,n),t}var a=n(0),s=n(3).register;function u(t,e,n,r){var i=e.width,o=e.height;if(r){if(r.length!==i*o*n)throw new RangeError("mismatched image size")}else r=new Uint8Array(i*o*n);return t.width=i,t.height=o,t.data=r,t}function l(t,e,n){var r=e.width,i=e.height;if(r!==t.width||i!==t.height){var o=u({},{width:r,height:i},n);c(t,o,{x:0,y:0},{x:0,y:0},{width:Math.min(t.width,r),height:Math.min(t.height,i)},n),t.width=r,t.height=i,t.data=o.data}}function c(t,e,n,r,i,o){if(0===i.width||0===i.height)return e;if(i.width>t.width||i.height>t.height||n.x>t.width-i.width||n.y>t.height-i.height)throw new RangeError("out of range source coordinates for image copy");if(i.width>e.width||i.height>e.height||r.x>e.width-i.width||r.y>e.height-i.height)throw new RangeError("out of range destination coordinates for image copy");var s=t.data,u=e.data;a(s!==u);for(var l=0;l<i.height;l++)for(var c=((n.y+l)*t.width+n.x)*o,f=((r.y+l)*e.width+r.x)*o,h=0;h<i.width*o;h++)u[f+h]=s[c+h];return e}var f=function(){function t(e,n){r(this,t),u(this,e,1,n)}return o(t,[{key:"resize",value:function(t){l(this,t,1)}},{key:"clone",value:function(){return new t({width:this.width,height:this.height},new Uint8Array(this.data))}}],[{key:"copy",value:function(t,e,n,r,i){c(t,e,n,r,i,1)}}]),t}(),h=function(){function t(e,n){r(this,t),u(this,e,4,n)}return o(t,[{key:"resize",value:function(t){l(this,t,4)}},{key:"clone",value:function(){return new t({width:this.width,height:this.height},new Uint8Array(this.data))}}],[{key:"copy",value:function(t,e,n,r,i){c(t,e,n,r,i,4)}}]),t}();s("AlphaImage",f),s("RGBAImage",h),t.exports={AlphaImage:f,RGBAImage:h}},function(t,e,n){var r=n(6);t.exports={getMaximumPaintValue:function(t,e,n){var r=e.paint.get(t).value;return"constant"===r.kind?r.value:n.programConfigurations.get(e.id).binders[t].statistics.max},translateDistance:function(t){return Math.sqrt(t[0]*t[0]+t[1]*t[1])},translate:function(t,e,n,i,o){if(!e[0]&&!e[1])return t;var a=r.convert(e);"viewport"===n&&a._rotate(-i);for(var s=[],u=0;u<t.length;u++){for(var l=t[u],c=[],f=0;f<l.length;f++)c.push(l[f].sub(a._mult(o)));s.push(c)}return s}}},function(t,e,n){var r=n(136);t.exports.allowsIdeographicBreaking=function(t){var n=!0,r=!1,i=void 0;try{for(var o,a=t[Symbol.iterator]();!(n=(o=a.next()).done);n=!0){var s=o.value;if(!e.charAllowsIdeographicBreaking(s.charCodeAt(0)))return!1}}catch(t){r=!0,i=t}finally{try{n||null==a.return||a.return()}finally{if(r)throw i}}return!0},t.exports.allowsVerticalWritingMode=function(t){var n=!0,r=!1,i=void 0;try{for(var o,a=t[Symbol.iterator]();!(n=(o=a.next()).done);n=!0){var s=o.value;if(e.charHasUprightVerticalOrientation(s.charCodeAt(0)))return!0}}catch(t){r=!0,i=t}finally{try{n||null==a.return||a.return()}finally{if(r)throw i}}return!1},t.exports.allowsLetterSpacing=function(t){var n=!0,r=!1,i=void 0;try{for(var o,a=t[Symbol.iterator]();!(n=(o=a.next()).done);n=!0){var s=o.value;if(!e.charAllowsLetterSpacing(s.charCodeAt(0)))return!1}}catch(t){r=!0,i=t}finally{try{n||null==a.return||a.return()}finally{if(r)throw i}}return!0},t.exports.charAllowsLetterSpacing=function(t){return!r.Arabic(t)&&(!r["Arabic Supplement"](t)&&(!r["Arabic Extended-A"](t)&&(!r["Arabic Presentation Forms-A"](t)&&!r["Arabic Presentation Forms-B"](t))))},t.exports.charAllowsIdeographicBreaking=function(t){return!(t<11904)&&(!!r["Bopomofo Extended"](t)||(!!r.Bopomofo(t)||(!!r["CJK Compatibility Forms"](t)||(!!r["CJK Compatibility Ideographs"](t)||(!!r["CJK Compatibility"](t)||(!!r["CJK Radicals Supplement"](t)||(!!r["CJK Strokes"](t)||(!!r["CJK Symbols and Punctuation"](t)||(!!r["CJK Unified Ideographs Extension A"](t)||(!!r["CJK Unified Ideographs"](t)||(!!r["Enclosed CJK Letters and Months"](t)||(!!r["Halfwidth and Fullwidth Forms"](t)||(!!r.Hiragana(t)||(!!r["Ideographic Description Characters"](t)||(!!r["Kangxi Radicals"](t)||(!!r["Katakana Phonetic Extensions"](t)||(!!r.Katakana(t)||(!!r["Vertical Forms"](t)||(!!r["Yi Radicals"](t)||!!r["Yi Syllables"](t))))))))))))))))))))},e.charHasUprightVerticalOrientation=function(t){return 746===t||747===t||!(t<4352)&&(!!r["Bopomofo Extended"](t)||(!!r.Bopomofo(t)||(!(!r["CJK Compatibility Forms"](t)||t>=65097&&t<=65103)||(!!r["CJK Compatibility Ideographs"](t)||(!!r["CJK Compatibility"](t)||(!!r["CJK Radicals Supplement"](t)||(!!r["CJK Strokes"](t)||(!(!r["CJK Symbols and Punctuation"](t)||t>=12296&&t<=12305||t>=12308&&t<=12319||12336===t)||(!!r["CJK Unified Ideographs Extension A"](t)||(!!r["CJK Unified Ideographs"](t)||(!!r["Enclosed CJK Letters and Months"](t)||(!!r["Hangul Compatibility Jamo"](t)||(!!r["Hangul Jamo Extended-A"](t)||(!!r["Hangul Jamo Extended-B"](t)||(!!r["Hangul Jamo"](t)||(!!r["Hangul Syllables"](t)||(!!r.Hiragana(t)||(!!r["Ideographic Description Characters"](t)||(!!r.Kanbun(t)||(!!r["Kangxi Radicals"](t)||(!!r["Katakana Phonetic Extensions"](t)||(!(!r.Katakana(t)||12540===t)||(!(!r["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)||(!(!r["Small Form Variants"](t)||t>=65112&&t<=65118||t>=65123&&t<=65126)||(!!r["Unified Canadian Aboriginal Syllabics"](t)||(!!r["Unified Canadian Aboriginal Syllabics Extended"](t)||(!!r["Vertical Forms"](t)||(!!r["Yijing Hexagram Symbols"](t)||(!!r["Yi Syllables"](t)||!!r["Yi Radicals"](t))))))))))))))))))))))))))))))},e.charHasNeutralVerticalOrientation=function(t){return!(!r["Latin-1 Supplement"](t)||167!==t&&169!==t&&174!==t&&177!==t&&188!==t&&189!==t&&190!==t&&215!==t&&247!==t)||(!(!r["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)||(!!r["Letterlike Symbols"](t)||(!!r["Number Forms"](t)||(!(!r["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))||(!(!r["Control Pictures"](t)||9251===t)||(!!r["Optical Character Recognition"](t)||(!!r["Enclosed Alphanumerics"](t)||(!!r["Geometric Shapes"](t)||(!(!r["Miscellaneous Symbols"](t)||t>=9754&&t<=9759)||(!(!r["Miscellaneous Symbols and Arrows"](t)||!(t>=11026&&t<=11055||t>=11088&&t<=11097||t>=11192&&t<=11243))||(!!r["CJK Symbols and Punctuation"](t)||(!!r.Katakana(t)||(!!r["Private Use Area"](t)||(!!r["CJK Compatibility Forms"](t)||(!!r["Small Form Variants"](t)||(!!r["Halfwidth and Fullwidth Forms"](t)||(8734===t||8756===t||8757===t||t>=9984&&t<=10087||t>=10102&&t<=10131||65532===t||65533===t)))))))))))))))))},e.charHasRotatedVerticalOrientation=function(t){return!(e.charHasUprightVerticalOrientation(t)||e.charHasNeutralVerticalOrientation(t))}},function(t,e,n){"use strict";t.exports=i;var r=n(146);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}i.Varint=0,i.Fixed64=1,i.Bytes=2,i.Fixed32=5;function o(t){return t.type===i.Bytes?t.readVarint()+t.pos:t.pos+1}function a(t,e,n){return n?4294967296*e+(t>>>0):4294967296*(e>>>0)+(t>>>0)}function s(t,e,n){var r=e<=16383?1:e<=2097151?2:e<=268435455?3:Math.floor(Math.log(e)/(7*Math.LN2));n.realloc(r);for(var i=n.pos-1;i>=t;i--)n.buf[i+r]=n.buf[i]}function u(t,e){for(var n=0;n<t.length;n++)e.writeVarint(t[n])}function l(t,e){for(var n=0;n<t.length;n++)e.writeSVarint(t[n])}function c(t,e){for(var n=0;n<t.length;n++)e.writeFloat(t[n])}function f(t,e){for(var n=0;n<t.length;n++)e.writeDouble(t[n])}function h(t,e){for(var n=0;n<t.length;n++)e.writeBoolean(t[n])}function p(t,e){for(var n=0;n<t.length;n++)e.writeFixed32(t[n])}function y(t,e){for(var n=0;n<t.length;n++)e.writeSFixed32(t[n])}function d(t,e){for(var n=0;n<t.length;n++)e.writeFixed64(t[n])}function v(t,e){for(var n=0;n<t.length;n++)e.writeSFixed64(t[n])}function m(t,e){return(t[e]|t[e+1]<<8|t[e+2]<<16)+16777216*t[e+3]}function g(t,e,n){t[n]=e,t[n+1]=e>>>8,t[n+2]=e>>>16,t[n+3]=e>>>24}function b(t,e){return(t[e]|t[e+1]<<8|t[e+2]<<16)+(t[e+3]<<24)}i.prototype={destroy:function(){this.buf=null},readFields:function(t,e,n){for(n=n||this.length;this.pos<n;){var r=this.readVarint(),i=r>>3,o=this.pos;this.type=7&r,t(i,e,this),this.pos===o&&this.skip(r)}return e},readMessage:function(t,e){return this.readFields(t,e,this.readVarint()+this.pos)},readFixed32:function(){var t=m(this.buf,this.pos);return this.pos+=4,t},readSFixed32:function(){var t=b(this.buf,this.pos);return this.pos+=4,t},readFixed64:function(){var t=m(this.buf,this.pos)+4294967296*m(this.buf,this.pos+4);return this.pos+=8,t},readSFixed64:function(){var t=m(this.buf,this.pos)+4294967296*b(this.buf,this.pos+4);return this.pos+=8,t},readFloat:function(){var t=r.read(this.buf,this.pos,!0,23,4);return this.pos+=4,t},readDouble:function(){var t=r.read(this.buf,this.pos,!0,52,8);return this.pos+=8,t},readVarint:function(t){var e,n,r=this.buf;return e=127&(n=r[this.pos++]),n<128?e:(e|=(127&(n=r[this.pos++]))<<7,n<128?e:(e|=(127&(n=r[this.pos++]))<<14,n<128?e:(e|=(127&(n=r[this.pos++]))<<21,n<128?e:function(t,e,n){var r,i,o=n.buf;if(i=o[n.pos++],r=(112&i)>>4,i<128)return a(t,r,e);if(i=o[n.pos++],r|=(127&i)<<3,i<128)return a(t,r,e);if(i=o[n.pos++],r|=(127&i)<<10,i<128)return a(t,r,e);if(i=o[n.pos++],r|=(127&i)<<17,i<128)return a(t,r,e);if(i=o[n.pos++],r|=(127&i)<<24,i<128)return a(t,r,e);if(i=o[n.pos++],r|=(1&i)<<31,i<128)return a(t,r,e);throw new Error("Expected varint not more than 10 bytes")}(e|=(15&(n=r[this.pos]))<<28,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=function(t,e,n){var r="",i=e;for(;i<n;){var o,a,s,u=t[i],l=null,c=u>239?4:u>223?3:u>191?2:1;if(i+c>n)break;1===c?u<128&&(l=u):2===c?128==(192&(o=t[i+1]))&&(l=(31&u)<<6|63&o)<=127&&(l=null):3===c?(o=t[i+1],a=t[i+2],128==(192&o)&&128==(192&a)&&((l=(15&u)<<12|(63&o)<<6|63&a)<=2047||l>=55296&&l<=57343)&&(l=null)):4===c&&(o=t[i+1],a=t[i+2],s=t[i+3],128==(192&o)&&128==(192&a)&&128==(192&s)&&((l=(15&u)<<18|(63&o)<<12|(63&a)<<6|63&s)<=65535||l>=1114112)&&(l=null)),null===l?(l=65533,c=1):l>65535&&(l-=65536,r+=String.fromCharCode(l>>>10&1023|55296),l=56320|1023&l),r+=String.fromCharCode(l),i+=c}return r}(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){if(this.type!==i.Bytes)return t.push(this.readVarint(e));var n=o(this);for(t=t||[];this.pos<n;)t.push(this.readVarint(e));return t},readPackedSVarint:function(t){if(this.type!==i.Bytes)return t.push(this.readSVarint());var e=o(this);for(t=t||[];this.pos<e;)t.push(this.readSVarint());return t},readPackedBoolean:function(t){if(this.type!==i.Bytes)return t.push(this.readBoolean());var e=o(this);for(t=t||[];this.pos<e;)t.push(this.readBoolean());return t},readPackedFloat:function(t){if(this.type!==i.Bytes)return t.push(this.readFloat());var e=o(this);for(t=t||[];this.pos<e;)t.push(this.readFloat());return t},readPackedDouble:function(t){if(this.type!==i.Bytes)return t.push(this.readDouble());var e=o(this);for(t=t||[];this.pos<e;)t.push(this.readDouble());return t},readPackedFixed32:function(t){if(this.type!==i.Bytes)return t.push(this.readFixed32());var e=o(this);for(t=t||[];this.pos<e;)t.push(this.readFixed32());return t},readPackedSFixed32:function(t){if(this.type!==i.Bytes)return t.push(this.readSFixed32());var e=o(this);for(t=t||[];this.pos<e;)t.push(this.readSFixed32());return t},readPackedFixed64:function(t){if(this.type!==i.Bytes)return t.push(this.readFixed64());var e=o(this);for(t=t||[];this.pos<e;)t.push(this.readFixed64());return t},readPackedSFixed64:function(t){if(this.type!==i.Bytes)return t.push(this.readSFixed64());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 n=new Uint8Array(e);n.set(this.buf),this.buf=n,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),g(this.buf,t,this.pos),this.pos+=4},writeSFixed32:function(t){this.realloc(4),g(this.buf,t,this.pos),this.pos+=4},writeFixed64:function(t){this.realloc(8),g(this.buf,-1&t,this.pos),g(this.buf,Math.floor(t*(1/4294967296)),this.pos+4),this.pos+=8},writeSFixed64:function(t){this.realloc(8),g(this.buf,-1&t,this.pos),g(this.buf,Math.floor(t*(1/4294967296)),this.pos+4),this.pos+=8},writeVarint:function(t){(t=+t||0)>268435455||t<0?function(t,e){var n,r;t>=0?(n=t%4294967296|0,r=t/4294967296|0):(r=~(-t/4294967296),4294967295^(n=~(-t%4294967296))?n=n+1|0:(n=0,r=r+1|0));if(t>=0x10000000000000000||t<-0x10000000000000000)throw new Error("Given varint doesn\'t fit into 10 bytes");e.realloc(10),function(t,e,n){n.buf[n.pos++]=127&t|128,t>>>=7,n.buf[n.pos++]=127&t|128,t>>>=7,n.buf[n.pos++]=127&t|128,t>>>=7,n.buf[n.pos++]=127&t|128,t>>>=7,n.buf[n.pos]=127&t}(n,0,e),function(t,e){var n=(7&t)<<4;if(e.buf[e.pos++]|=n|((t>>>=3)?128:0),!t)return;if(e.buf[e.pos++]=127&t|((t>>>=7)?128:0),!t)return;if(e.buf[e.pos++]=127&t|((t>>>=7)?128:0),!t)return;if(e.buf[e.pos++]=127&t|((t>>>=7)?128:0),!t)return;if(e.buf[e.pos++]=127&t|((t>>>=7)?128:0),!t)return;e.buf[e.pos++]=127&t}(r,e)}(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),this.pos++;var e=this.pos;this.pos=function(t,e,n){for(var r,i,o=0;o<e.length;o++){if((r=e.charCodeAt(o))>55295&&r<57344){if(!i){r>56319||o+1===e.length?(t[n++]=239,t[n++]=191,t[n++]=189):i=r;continue}if(r<56320){t[n++]=239,t[n++]=191,t[n++]=189,i=r;continue}r=i-55296<<10|r-56320|65536,i=null}else i&&(t[n++]=239,t[n++]=191,t[n++]=189,i=null);r<128?t[n++]=r:(r<2048?t[n++]=r>>6|192:(r<65536?t[n++]=r>>12|224:(t[n++]=r>>18|240,t[n++]=r>>12&63|128),t[n++]=r>>6&63|128),t[n++]=63&r|128)}return n}(this.buf,t,this.pos);var n=this.pos-e;n>=128&&s(e,n,this),this.pos=e-1,this.writeVarint(n),this.pos+=n},writeFloat:function(t){this.realloc(4),r.write(this.buf,t,this.pos,!0,23,4),this.pos+=4},writeDouble:function(t){this.realloc(8),r.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 n=0;n<e;n++)this.buf[this.pos++]=t[n]},writeRawMessage:function(t,e){this.pos++;var n=this.pos;t(e,this);var r=this.pos-n;r>=128&&s(n,r,this),this.pos=n-1,this.writeVarint(r),this.pos+=r},writeMessage:function(t,e,n){this.writeTag(t,i.Bytes),this.writeRawMessage(e,n)},writePackedVarint:function(t,e){e.length&&this.writeMessage(t,u,e)},writePackedSVarint:function(t,e){e.length&&this.writeMessage(t,l,e)},writePackedBoolean:function(t,e){e.length&&this.writeMessage(t,h,e)},writePackedFloat:function(t,e){e.length&&this.writeMessage(t,c,e)},writePackedDouble:function(t,e){e.length&&this.writeMessage(t,f,e)},writePackedFixed32:function(t,e){e.length&&this.writeMessage(t,p,e)},writePackedSFixed32:function(t,e){e.length&&this.writeMessage(t,y,e)},writePackedFixed64:function(t,e){e.length&&this.writeMessage(t,d,e)},writePackedSFixed64:function(t,e){e.length&&this.writeMessage(t,v,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))}}},function(t,e,n){function r(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,r.key,r)}}var i=n(0),o=n(52),a=n(11).Color,s=["Unknown","Point","LineString","Polygon"],u=function(){function t(){!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,t),this.scope=new o,this._parseColorCache={}}var e,n,u;return e=t,(n=[{key:"id",value:function(){return this.feature&&"id"in this.feature?this.feature.id:null}},{key:"geometryType",value:function(){return this.feature?"number"==typeof this.feature.type?s[this.feature.type]:this.feature.type:null}},{key:"properties",value:function(){return this.feature&&this.feature.properties||{}}},{key:"pushScope",value:function(t){this.scope=this.scope.concat(t)}},{key:"popScope",value:function(){i(this.scope.parent),this.scope=this.scope.parent}},{key:"parseColor",value:function(t){var e=this._parseColorCache[t];return e||(e=this._parseColorCache[t]=a.parse(t)),e}}])&&r(e.prototype,n),u&&r(e,u),t}();t.exports=u},function(t,e,n){function r(t){return function(t){if(Array.isArray(t)){for(var e=0,n=new Array(t.length);e<t.length;e++)n[e]=t[e];return n}}(t)||i(t)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance")}()}function i(t){if(Symbol.iterator in Object(t)||"[object Arguments]"===Object.prototype.toString.call(t))return Array.from(t)}function o(t,e){return s(t)||function(t,e){var n=[],r=!0,i=!1,o=void 0;try{for(var a,s=t[Symbol.iterator]();!(r=(a=s.next()).done)&&(n.push(a.value),!e||n.length!==e);r=!0);}catch(t){i=!0,o=t}finally{try{r||null==s.return||s.return()}finally{if(i)throw o}}return n}(t,e)||a()}function a(){throw new TypeError("Invalid attempt to destructure non-iterable instance")}function s(t){if(Array.isArray(t))return t}function u(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,r.key,r)}}var l=n(46),c=n(19),f=n(4),h=f.toString,p=f.NumberType,y=n(60).findStopLessThanOrEqualTo,d=function(){function t(e,n,r,i){!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,t),this.type=e,this.interpolation=n,this.input=r,this.labels=[],this.outputs=[];var a=!0,s=!1,u=void 0;try{for(var l,c=i[Symbol.iterator]();!(a=(l=c.next()).done);a=!0){var f=o(l.value,2),h=f[0],p=f[1];this.labels.push(h),this.outputs.push(p)}}catch(t){s=!0,u=t}finally{try{a||null==c.return||c.return()}finally{if(s)throw u}}}var e,n,f;return e=t,f=[{key:"interpolationFactor",value:function(t,e,n,r){var i=0;if("exponential"===t.name)i=v(e,t.base,n,r);else if("linear"===t.name)i=v(e,1,n,r);else if("cubic-bezier"===t.name){var o=t.controlPoints;i=new l(o[0],o[1],o[2],o[3]).solve(v(e,1,n,r))}return i}},{key:"parse",value:function(e,n){var r,o=s(r=e)||i(r)||a(),u=o[1],l=o[2],c=o.slice(3);if(!Array.isArray(u)||0===u.length)return n.error("Expected an interpolation type expression.",1);if("linear"===u[0])u={name:"linear"};else if("exponential"===u[0]){var f=u[1];if("number"!=typeof f)return n.error("Exponential interpolation requires a numeric base.",1,1);u={name:"exponential",base:f}}else{if("cubic-bezier"!==u[0])return n.error("Unknown interpolation type ".concat(String(u[0])),1,0);var y=u.slice(1);if(4!==y.length||y.some(function(t){return"number"!=typeof t||t<0||t>1}))return n.error("Cubic bezier interpolation requires four numeric arguments with values between 0 and 1.",1);u={name:"cubic-bezier",controlPoints:y}}if(e.length-1<4)return n.error("Expected at least 4 arguments, but found only ".concat(e.length-1,"."));if((e.length-1)%2!=0)return n.error("Expected an even number of arguments.");if(!(l=n.parse(l,2,p)))return null;var d=[],v=null;n.expectedType&&"value"!==n.expectedType.kind&&(v=n.expectedType);for(var m=0;m<c.length;m+=2){var g=c[m],b=c[m+1],x=m+3,w=m+4;if("number"!=typeof g)return n.error(\'Input/output pairs for "interpolate" expressions must be defined using literal numeric values (not computed expressions) for the input values.\',x);if(d.length&&d[d.length-1][0]>=g)return n.error(\'Input/output pairs for "interpolate" expressions must be arranged with input values in strictly ascending order.\',x);var k=n.parse(b,w,v);if(!k)return null;v=v||k.type,d.push([g,k])}return"number"===v.kind||"color"===v.kind||"array"===v.kind&&"number"===v.itemType.kind&&"number"==typeof v.N?new t(v,u,l,d):n.error("Type ".concat(h(v)," is not interpolatable."))}}],(n=[{key:"evaluate",value:function(e){var n=this.labels,r=this.outputs;if(1===n.length)return r[0].evaluate(e);var i=this.input.evaluate(e);if(i<=n[0])return r[0].evaluate(e);var o=n.length;if(i>=n[o-1])return r[o-1].evaluate(e);var a=y(n,i),s=n[a],u=n[a+1],l=t.interpolationFactor(this.interpolation,i,s,u),f=r[a].evaluate(e),h=r[a+1].evaluate(e);return c[this.type.kind.toLowerCase()](f,h,l)}},{key:"eachChild",value:function(t){t(this.input);var e=!0,n=!1,r=void 0;try{for(var i,o=this.outputs[Symbol.iterator]();!(e=(i=o.next()).done);e=!0){t(i.value)}}catch(t){n=!0,r=t}finally{try{e||null==o.return||o.return()}finally{if(n)throw r}}}},{key:"possibleOutputs",value:function(){var t;return(t=[]).concat.apply(t,r(this.outputs.map(function(t){return t.possibleOutputs()})))}}])&&u(e.prototype,n),f&&u(e,f),t}();function v(t,e,n,r){var i=r-n,o=t-n;return 0===i?0:1===e?o/i:(Math.pow(e,o)-1)/(Math.pow(e,i)-1)}t.exports=d},function(t,e,n){function r(t){return(r="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t})(t)}var i=n(100),o=n(13),a=n(22),s=n(7),u=n(19),l=n(34);function c(t){return t}function f(t,e,n){return void 0!==t?t:void 0!==e?e:void 0!==n?n:void 0}function h(t,e,n,i,o){return f(r(n)===o?i[n]:void 0,t.default,e.default)}function p(t,e,n){if("number"!==s(n))return f(t.default,e.default);var r=t.stops.length;if(1===r)return t.stops[0][1];if(n<=t.stops[0][0])return t.stops[0][1];if(n>=t.stops[r-1][0])return t.stops[r-1][1];var i=v(t.stops,n);return t.stops[i][1]}function y(t,e,n){var r=void 0!==t.base?t.base:1;if("number"!==s(n))return f(t.default,e.default);var o=t.stops.length;if(1===o)return t.stops[0][1];if(n<=t.stops[0][0])return t.stops[0][1];if(n>=t.stops[o-1][0])return t.stops[o-1][1];var a=v(t.stops,n),l=function(t,e,n,r){var i=r-n,o=t-n;return 0===i?0:1===e?o/i:(Math.pow(e,o)-1)/(Math.pow(e,i)-1)}(n,r,t.stops[a][0],t.stops[a+1][0]),h=t.stops[a][1],p=t.stops[a+1][1],y=u[e.type]||c;if(t.colorSpace&&"rgb"!==t.colorSpace){var d=i[t.colorSpace];y=function(t,e){return d.reverse(d.interpolate(d.forward(t),d.forward(e),l))}}return"function"==typeof h.evaluate?{evaluate:function(){for(var t=arguments.length,e=new Array(t),n=0;n<t;n++)e[n]=arguments[n];var r=h.evaluate.apply(void 0,e),i=p.evaluate.apply(void 0,e);if(void 0!==r&&void 0!==i)return y(r,i,l)}}:y(h,p,l)}function d(t,e,n){return"color"===e.type?n=o.parse(n):s(n)===e.type||"enum"===e.type&&e.values[n]||(n=void 0),f(n,t.default,e.default)}function v(t,e){for(var n,r,i=0,o=t.length-1,a=0;i<=o;){if(n=t[a=Math.floor((i+o)/2)][0],r=t[a+1][0],e===n||e>n&&e<r)return a;n<e?i=a+1:n>e&&(o=a-1)}return Math.max(a-1,0)}t.exports={createFunction:function t(e,n){var s,u,c,v="color"===n.type,m=e.stops&&"object"===r(e.stops[0][0]),g=m||void 0!==e.property,b=m||!g,x=e.type||("interpolated"===n.function?"exponential":"interval");if(v&&((e=a({},e)).stops&&(e.stops=e.stops.map(function(t){return[t[0],o.parse(t[1])]})),e.default?e.default=o.parse(e.default):e.default=o.parse(n.default)),e.colorSpace&&"rgb"!==e.colorSpace&&!i[e.colorSpace])throw new Error("Unknown color space: ".concat(e.colorSpace));if("exponential"===x)s=y;else if("interval"===x)s=p;else if("categorical"===x){s=h,u=Object.create(null);var w=!0,k=!1,_=void 0;try{for(var S,A=e.stops[Symbol.iterator]();!(w=(S=A.next()).done);w=!0){var T=S.value;u[T[0]]=T[1]}}catch(t){k=!0,_=t}finally{try{w||null==A.return||A.return()}finally{if(k)throw _}}c=r(e.stops[0][0])}else{if("identity"!==x)throw new Error(\'Unknown function type "\'.concat(x,\'"\'));s=d}if(m){for(var j={},O=[],z=0;z<e.stops.length;z++){var P=e.stops[z],E=P[0].zoom;void 0===j[E]&&(j[E]={zoom:E,type:e.type,property:e.property,default:e.default,stops:[]},O.push(E)),j[E].stops.push([P[0].value,P[1]])}for(var C=[],M=0,I=O;M<I.length;M++){var B=I[M];C.push([j[B].zoom,t(j[B],n)])}return{kind:"composite",interpolationFactor:l.interpolationFactor.bind(void 0,{name:"linear"}),zoomStops:C.map(function(t){return t[0]}),evaluate:function(t,r){var i=t.zoom;return y({stops:C,base:e.base},n,i).evaluate(i,r)}}}return b?{kind:"camera",interpolationFactor:"exponential"===x?l.interpolationFactor.bind(void 0,{name:"exponential",base:void 0!==e.base?e.base:1}):function(){return 0},zoomStops:e.stops.map(function(t){return t[0]}),evaluate:function(t){var r=t.zoom;return s(e,n,r,u,c)}}:{kind:"source",evaluate:function(t,r){var i=r&&r.properties?r.properties[e.property]:void 0;return void 0===i?f(e.default,n.default):s(e,n,i,u,c)}}},isFunction:function(t){return"object"===r(t)&&null!==t&&!Array.isArray(t)}}},function(t,e){t.exports=self},function(t,e,n){var r=n(5),i=n(12);t.exports=function(t){var e=t.key,n=t.value,o=t.valueSpec,a=[];return Array.isArray(o.values)?-1===o.values.indexOf(i(n))&&a.push(new r(e,n,"expected one of [".concat(o.values.join(", "),"], ").concat(JSON.stringify(n)," found"))):-1===Object.keys(o.values).indexOf(i(n))&&a.push(new r(e,n,"expected one of [".concat(Object.keys(o.values).join(", "),"], ").concat(JSON.stringify(n)," found"))),a}},function(t,e,n){var r=n(5),i=n(68),o=n(37),a=n(7),s=n(12),u=n(22),l=n(39).isExpressionFilter;t.exports=function(t){return l(s.deep(t.value))?i(u({},t,{expressionContext:"filter",valueSpec:{value:"boolean"}})):function t(e){var n=e.value;var i=e.key;if("array"!==a(n))return[new r(i,n,"array expected, ".concat(a(n)," found"))];var u=e.styleSpec;var l;var c=[];if(n.length<1)return[new r(i,n,"filter array must have at least 1 element")];c=c.concat(o({key:"".concat(i,"[0]"),value:n[0],valueSpec:u.filter_operator,style:e.style,styleSpec:e.styleSpec}));switch(s(n[0])){case"<":case"<=":case">":case">=":n.length>=2&&"$type"===s(n[1])&&c.push(new r(i,n,\'"$type" cannot be use with operator "\'.concat(n[0],\'"\')));case"==":case"!=":3!==n.length&&c.push(new r(i,n,\'filter array for operator "\'.concat(n[0],\'" must have 3 elements\')));case"in":case"!in":n.length>=2&&"string"!==(l=a(n[1]))&&c.push(new r("".concat(i,"[1]"),n[1],"string expected, ".concat(l," found")));for(var f=2;f<n.length;f++)l=a(n[f]),"$type"===s(n[1])?c=c.concat(o({key:"".concat(i,"[").concat(f,"]"),value:n[f],valueSpec:u.geometry_type,style:e.style,styleSpec:e.styleSpec})):"string"!==l&&"number"!==l&&"boolean"!==l&&c.push(new r("".concat(i,"[").concat(f,"]"),n[f],"string, number, or boolean expected, ".concat(l," found")));break;case"any":case"all":case"none":for(var h=1;h<n.length;h++)c=c.concat(t({key:"".concat(i,"[").concat(h,"]"),value:n[h],style:e.style,styleSpec:e.styleSpec}));break;case"has":case"!has":l=a(n[1]),2!==n.length?c.push(new r(i,n,\'filter array for "\'.concat(n[0],\'" operator must have 2 elements\'))):"string"!==l&&c.push(new r("".concat(i,"[1]"),n[1],"string expected, ".concat(l," found")))}return c}(t)}},function(t,e,n){function r(t){return(r="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t})(t)}var i=n(14).createExpression;function o(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":var e=!0,n=!1,r=void 0;try{for(var i,a=t.slice(1)[Symbol.iterator]();!(e=(i=a.next()).done);e=!0){var s=i.value;if(!o(s)&&"boolean"!=typeof s)return!1}}catch(t){n=!0,r=t}finally{try{e||null==a.return||a.return()}finally{if(n)throw r}}return!0;default:return!0}}t.exports=function(t){if(!t)return function(){return!0};o(t)||(t=u(t));var e=i(t,a);if("error"===e.result)throw new Error(e.value.map(function(t){return"".concat(t.key,": ").concat(t.message)}).join(", "));return function(t,n){return e.value.evaluate(t,n)}},t.exports.isExpressionFilter=o;var a={type:"boolean",default:!1,function:!0,"property-function":!0,"zoom-function":!0};function s(t,e){return t<e?-1:t>e?1:0}function u(t){if(!t)return!0;var e,n=t[0];return t.length<=1?"any"!==n:"=="===n?l(t[1],t[2],"=="):"!="===n?h(l(t[1],t[2],"==")):"<"===n||">"===n||"<="===n||">="===n?l(t[1],t[2],n):"any"===n?(e=t.slice(1),["any"].concat(e.map(u))):"all"===n?["all"].concat(t.slice(1).map(u)):"none"===n?["all"].concat(t.slice(1).map(u).map(h)):"in"===n?c(t[1],t.slice(2)):"!in"===n?h(c(t[1],t.slice(2))):"has"===n?f(t[1]):"!has"!==n||h(f(t[1]))}function l(t,e,n){switch(t){case"$type":return["filter-type-".concat(n),e];case"$id":return["filter-id-".concat(n),e];default:return["filter-".concat(n),t,e]}}function c(t,e){if(0===e.length)return!1;switch(t){case"$type":return["filter-type-in",["literal",e]];case"$id":return["filter-id-in",["literal",e]];default:return e.length>200&&!e.some(function(t){return r(t)!==r(e[0])})?["filter-in-large",t,["literal",e.sort(s)]]:["filter-in-small",t,["literal",e]]}}function f(t){switch(t){case"$type":return!0;case"$id":return["filter-has-id"];default:return["filter-has",t]}}function h(t){return["!",t]}},function(t,e,n){var r=n(120),i=n(2).calculateSignedArea;function o(t,e){return e.area-t.area}t.exports=function(t,e){var n=t.length;if(n<=1)return[t];for(var a,s,u=[],l=0;l<n;l++){var c=i(t[l]);0!==c&&(t[l].area=Math.abs(c),void 0===s&&(s=c<0),s===c<0?(a&&u.push(a),a=[t[l]]):a.push(t[l]))}if(a&&u.push(a),e>1)for(var f=0;f<u.length;f++)u[f].length<=e||(r(u[f],e,1,u[f].length-1,o),u[f]=u[f].slice(0,e));return u}},function(t,e,n){function r(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,r.key,r)}}var i=n(131),o=function(){function t(e,n){!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,t),this.zoom=e,n?(this.now=n.now,this.fadeDuration=n.fadeDuration,this.zoomHistory=n.zoomHistory,this.transition=n.transition):(this.now=0,this.fadeDuration=0,this.zoomHistory=new i,this.transition={})}var e,n,o;return e=t,(n=[{key:"crossFadingFactor",value:function(){return 0===this.fadeDuration?1:Math.min((this.now-this.zoomHistory.lastIntegerZoomTime)/this.fadeDuration,1)}}])&&r(e.prototype,n),o&&r(e,o),t}();t.exports=o},function(t,e,n){function r(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function i(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,r.key,r)}}function o(t,e,n){return e&&i(t.prototype,e),n&&i(t,n),t}var a=n(133),s=a.symbolLayoutAttributes,u=a.collisionVertexAttributes,l=a.collisionBoxLayout,c=a.collisionCircleLayout,f=a.dynamicLayoutAttributes,h=n(10),p=h.SymbolLayoutArray,y=h.SymbolDynamicLayoutArray,d=h.SymbolOpacityArray,v=h.CollisionBoxLayoutArray,m=h.CollisionCircleLayoutArray,g=h.CollisionVertexArray,b=h.PlacedSymbolArray,x=h.GlyphOffsetArray,w=h.SymbolLineVertexArray,k=n(6),_=n(25).SegmentVector,S=n(26).ProgramConfigurationSet,A=n(27),T=A.TriangleIndexArray,j=A.LineIndexArray,O=n(134),z=n(135),P=n(31),E=n(20),C=n(21).VectorTileFeature.types,M=n(81),I=(n(45),n(137).getSizeData),B=n(3).register,V=[{name:"a_fade_opacity",components:1,type:"Uint8",offset:0}];function L(t,e,n,r,i,o,a,s){t.emplaceBack(e,n,Math.round(64*r),Math.round(64*i),o,a,s?s[0]:0,s?s[1]:0)}function F(t,e,n){t.emplaceBack(e.x,e.y,n),t.emplaceBack(e.x,e.y,n),t.emplaceBack(e.x,e.y,n),t.emplaceBack(e.x,e.y,n)}var R=function(){function t(e){r(this,t),this.layoutVertexArray=new p,this.indexArray=new T,this.programConfigurations=e,this.segments=new _,this.dynamicLayoutVertexArray=new y,this.opacityVertexArray=new d,this.placedSymbolArray=new b}return o(t,[{key:"upload",value:function(t,e){this.layoutVertexBuffer=t.createVertexBuffer(this.layoutVertexArray,s.members),this.indexBuffer=t.createIndexBuffer(this.indexArray,e),this.programConfigurations.upload(t),this.dynamicLayoutVertexBuffer=t.createVertexBuffer(this.dynamicLayoutVertexArray,f.members,!0),this.opacityVertexBuffer=t.createVertexBuffer(this.opacityVertexArray,V,!0),this.opacityVertexBuffer.itemSize=1}},{key:"destroy",value:function(){this.layoutVertexBuffer&&(this.layoutVertexBuffer.destroy(),this.indexBuffer.destroy(),this.programConfigurations.destroy(),this.segments.destroy(),this.dynamicLayoutVertexBuffer.destroy(),this.opacityVertexBuffer.destroy())}}]),t}();B("SymbolBuffers",R);var D=function(){function t(e,n,i){r(this,t),this.layoutVertexArray=new e,this.layoutAttributes=n,this.indexArray=new i,this.segments=new _,this.collisionVertexArray=new g}return o(t,[{key:"upload",value:function(t){this.layoutVertexBuffer=t.createVertexBuffer(this.layoutVertexArray,this.layoutAttributes),this.indexBuffer=t.createIndexBuffer(this.indexArray),this.collisionVertexBuffer=t.createVertexBuffer(this.collisionVertexArray,u.members,!0)}},{key:"destroy",value:function(){this.layoutVertexBuffer&&(this.layoutVertexBuffer.destroy(),this.indexBuffer.destroy(),this.segments.destroy(),this.collisionVertexBuffer.destroy())}}]),t}();B("CollisionBuffers",D);var q=function(){function t(e){r(this,t),this.collisionBoxArray=e.collisionBoxArray,this.zoom=e.zoom,this.overscaling=e.overscaling,this.layers=e.layers,this.layerIds=this.layers.map(function(t){return t.id}),this.index=e.index,this.pixelRatio=e.pixelRatio;var n=this.layers[0]._unevaluatedLayout._values;this.textSizeData=I(this.zoom,n["text-size"]),this.iconSizeData=I(this.zoom,n["icon-size"]);var i=this.layers[0].layout;this.sortFeaturesByY=i.get("text-allow-overlap")||i.get("icon-allow-overlap")||i.get("text-ignore-placement")||i.get("icon-ignore-placement")}return o(t,[{key:"createArrays",value:function(){this.text=new R(new S(s.members,this.layers,this.zoom,function(t){return/^text/.test(t)})),this.icon=new R(new S(s.members,this.layers,this.zoom,function(t){return/^icon/.test(t)})),this.collisionBox=new D(v,l.members,j),this.collisionCircle=new D(m,c.members,T),this.glyphOffsetArray=new x,this.lineVertexArray=new w}},{key:"populate",value:function(t,e){var n=this.layers[0],r=n.layout,i=r.get("text-font"),o=r.get("text-field"),a=r.get("icon-image"),s=("constant"!==o.value.kind||o.value.value.length>0)&&("constant"!==i.value.kind||i.value.value.length>0),u="constant"!==a.value.kind||a.value.value&&a.value.value.length>0;if(this.features=[],s||u){var l=e.iconDependencies,c=e.glyphDependencies,f={zoom:this.zoom},h=!0,p=!1,y=void 0;try{for(var d,v=t[Symbol.iterator]();!(h=(d=v.next()).done);h=!0){var m=d.value,g=m.feature,b=m.index,x=m.sourceLayerIndex;if(n._featureFilter(f,g)){var w=void 0;s&&(w=n.getValueAndResolveTokens("text-field",g),w=O(w,n,g));var k=void 0;if(u&&(k=n.getValueAndResolveTokens("icon-image",g)),w||k){var _={text:w,icon:k,index:b,sourceLayerIndex:x,geometry:E(g),properties:g.properties,type:C[g.type]};if(void 0!==g.id&&(_.id=g.id),this.features.push(_),k&&(l[k]=!0),w)for(var S=i.evaluate(g).join(","),A=c[S]=c[S]||{},T="map"===r.get("text-rotation-alignment")&&"line"===r.get("symbol-placement"),j=P.allowsVerticalWritingMode(w),I=0;I<w.length;I++)if(A[w.charCodeAt(I)]=!0,T&&j){var B=M.lookup[w.charAt(I)];B&&(A[B.charCodeAt(0)]=!0)}}}}}catch(t){p=!0,y=t}finally{try{h||null==v.return||v.return()}finally{if(p)throw y}}"line"===r.get("symbol-placement")&&(this.features=z(this.features))}}},{key:"isEmpty",value:function(){return 0===this.symbolInstances.length}},{key:"upload",value:function(t){this.text.upload(t,this.sortFeaturesByY),this.icon.upload(t,this.sortFeaturesByY),this.collisionBox.upload(t),this.collisionCircle.upload(t)}},{key:"destroy",value:function(){this.text.destroy(),this.icon.destroy(),this.collisionBox.destroy(),this.collisionCircle.destroy()}},{key:"addToLineVertexArray",value:function(t,e){var n=this.lineVertexArray.length;if(void 0!==t.segment){for(var r=t.dist(e[t.segment+1]),i=t.dist(e[t.segment]),o={},a=t.segment+1;a<e.length;a++)o[a]={x:e[a].x,y:e[a].y,tileUnitDistanceFromAnchor:r},a<e.length-1&&(r+=e[a+1].dist(e[a]));for(var s=t.segment||0;s>=0;s--)o[s]={x:e[s].x,y:e[s].y,tileUnitDistanceFromAnchor:i},s>0&&(i+=e[s-1].dist(e[s]));for(var u=0;u<e.length;u++){var l=o[u];this.lineVertexArray.emplaceBack(l.x,l.y,l.tileUnitDistanceFromAnchor)}}return{lineStartIndex:n,lineLength:this.lineVertexArray.length-n}}},{key:"addSymbols",value:function(t,e,n,r,i,o,a,s,u,l){var c=t.indexArray,f=t.layoutVertexArray,h=t.dynamicLayoutVertexArray,p=t.segments.prepareSegment(4*e.length,t.layoutVertexArray,t.indexArray),y=this.glyphOffsetArray.length,d=p.vertexLength,v=!0,m=!1,g=void 0;try{for(var b,x=e[Symbol.iterator]();!(v=(b=x.next()).done);v=!0){var w=b.value,k=w.tl,_=w.tr,S=w.bl,A=w.br,T=w.tex,j=p.vertexLength,O=w.glyphOffset[1];L(f,s.x,s.y,k.x,O+k.y,T.x,T.y,n),L(f,s.x,s.y,_.x,O+_.y,T.x+T.w,T.y,n),L(f,s.x,s.y,S.x,O+S.y,T.x,T.y+T.h,n),L(f,s.x,s.y,A.x,O+A.y,T.x+T.w,T.y+T.h,n),F(h,s,0),c.emplaceBack(j,j+1,j+2),c.emplaceBack(j+1,j+2,j+3),p.vertexLength+=4,p.primitiveLength+=2,this.glyphOffsetArray.emplaceBack(w.glyphOffset[0])}}catch(t){m=!0,g=t}finally{try{v||null==x.return||x.return()}finally{if(m)throw g}}t.placedSymbolArray.emplaceBack(s.x,s.y,y,this.glyphOffsetArray.length-y,d,u,l,s.segment,n?n[0]:0,n?n[1]:0,r[0],r[1],a,!1),t.programConfigurations.populatePaintArrays(t.layoutVertexArray.length,o)}},{key:"_addCollisionDebugVertex",value:function(t,e,n,r,i){return e.emplaceBack(0,0),t.emplaceBack(n.x,n.y,r.x,r.y,Math.round(i.x),Math.round(i.y))}},{key:"addCollisionDebugVertices",value:function(t,e,n,r,i,o,a,s){var u=i.segments.prepareSegment(4,i.layoutVertexArray,i.indexArray),l=u.vertexLength,c=i.layoutVertexArray,f=i.collisionVertexArray;if(this._addCollisionDebugVertex(c,f,o,a.anchor,new k(t,e)),this._addCollisionDebugVertex(c,f,o,a.anchor,new k(n,e)),this._addCollisionDebugVertex(c,f,o,a.anchor,new k(n,r)),this._addCollisionDebugVertex(c,f,o,a.anchor,new k(t,r)),u.vertexLength+=4,s){var h=i.indexArray;h.emplaceBack(l,l+1,l+2),h.emplaceBack(l,l+2,l+3),u.primitiveLength+=2}else{var p=i.indexArray;p.emplaceBack(l,l+1),p.emplaceBack(l+1,l+2),p.emplaceBack(l+2,l+3),p.emplaceBack(l+3,l),u.primitiveLength+=4}}},{key:"generateCollisionDebugBuffers",value:function(){var t=!0,e=!1,n=void 0;try{for(var r,i=this.symbolInstances[Symbol.iterator]();!(t=(r=i.next()).done);t=!0){var o=r.value;o.textCollisionFeature={boxStartIndex:o.textBoxStartIndex,boxEndIndex:o.textBoxEndIndex},o.iconCollisionFeature={boxStartIndex:o.iconBoxStartIndex,boxEndIndex:o.iconBoxEndIndex};for(var a=0;a<2;a++){var s=o[0===a?"textCollisionFeature":"iconCollisionFeature"];if(s)for(var u=s.boxStartIndex;u<s.boxEndIndex;u++){var l=this.collisionBoxArray.get(u),c=l.x1,f=l.y1,h=l.x2,p=l.y2,y=l.radius>0;this.addCollisionDebugVertices(c,f,h,p,y?this.collisionCircle:this.collisionBox,l.anchorPoint,o,y)}}}}catch(t){e=!0,n=t}finally{try{t||null==i.return||i.return()}finally{if(e)throw n}}}},{key:"deserializeCollisionBoxes",value:function(t,e,n,r,i){for(var o={},a=e;a<n;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 u=r;u<i;u++){var l=t.get(u);if(0===l.radius){o.iconBox={x1:l.x1,y1:l.y1,x2:l.x2,y2:l.y2,anchorPointX:l.anchorPointX,anchorPointY:l.anchorPointY};break}}return o}},{key:"hasTextData",value:function(){return this.text.segments.get().length>0}},{key:"hasIconData",value:function(){return this.icon.segments.get().length>0}},{key:"hasCollisionBoxData",value:function(){return this.collisionBox.segments.get().length>0}},{key:"hasCollisionCircleData",value:function(){return this.collisionCircle.segments.get().length>0}},{key:"sortFeatures",value: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 n=[],r=0;r<this.symbolInstances.length;r++)n.push(r);var i=Math.sin(t),o=Math.cos(t);n.sort(function(t,n){var r=e.symbolInstances[t],a=e.symbolInstances[n];return(i*r.anchor.x+o*r.anchor.y|0)-(i*a.anchor.x+o*a.anchor.y|0)||a.featureIndex-r.featureIndex}),this.text.indexArray.clear(),this.icon.indexArray.clear();for(var a=0,s=n;a<s.length;a++){var u=s[a],l=this.symbolInstances[u],c=!0,f=!1,h=void 0;try{for(var p,y=l.placedTextSymbolIndices[Symbol.iterator]();!(c=(p=y.next()).done);c=!0)for(var d=p.value,v=this.text.placedSymbolArray.get(d),m=v.vertexStartIndex+4*v.numGlyphs,g=v.vertexStartIndex;g<m;g+=4)this.text.indexArray.emplaceBack(g,g+1,g+2),this.text.indexArray.emplaceBack(g+1,g+2,g+3)}catch(t){f=!0,h=t}finally{try{c||null==y.return||y.return()}finally{if(f)throw h}}var b=this.icon.placedSymbolArray.get(u);if(b.numGlyphs){var x=b.vertexStartIndex;this.icon.indexArray.emplaceBack(x,x+1,x+2),this.icon.indexArray.emplaceBack(x+1,x+2,x+3)}}this.text.indexBuffer&&this.text.indexBuffer.updateData(this.text.indexArray),this.icon.indexBuffer&&this.icon.indexBuffer.updateData(this.icon.indexArray)}}}]),t}();B("SymbolBucket",q,{omit:["layers","collisionBoxArray","features","compareText"],shallow:["symbolInstances"]}),q.MAX_GLYPHS=65535,q.addDynamicAttributes=F,t.exports=q},function(t,e,n){var r=n(44),i=n(76),o=n(36),a=!1,s=null;t.exports.evented=new i,t.exports.registerForPluginAvailability=function(e){return s?e({pluginBlobURL:s,errorCallback:t.exports.errorCallback}):t.exports.evented.once("pluginAvailable",e),e},t.exports.createBlobURL=function(t){return o.URL.createObjectURL(new o.Blob([t.data],{type:"text/javascript"}))},t.exports.clearRTLTextPlugin=function(){a=!1,s=null},t.exports.setRTLTextPlugin=function(e,n){if(a)throw new Error("setRTLTextPlugin cannot be called multiple times.");a=!0,t.exports.errorCallback=n,r.getArrayBuffer({url:e},function(e,r){e?n(e):r&&(s=t.exports.createBlobURL(r),t.exports.evented.fire("pluginAvailable",{pluginBlobURL:s,errorCallback:n}))})},t.exports.applyArabicShaping=null,t.exports.processBidirectionalText=null},function(t,e,n){function r(t){return(r="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t})(t)}function i(t,e){return!e||"object"!==r(e)&&"function"!=typeof e?function(t){if(void 0===t)throw new ReferenceError("this hasn\'t been initialised - super() hasn\'t been called");return t}(t):e}function o(t){var e="function"==typeof Map?new Map:void 0;return(o=function(t){if(null===t||(n=t,-1===Function.toString.call(n).indexOf("[native code]")))return t;var n;if("function"!=typeof t)throw new TypeError("Super expression must either be null or a function");if(void 0!==e){if(e.has(t))return e.get(t);e.set(t,r)}function r(){return a(t,arguments,u(this).constructor)}return r.prototype=Object.create(t.prototype,{constructor:{value:r,enumerable:!1,writable:!0,configurable:!0}}),s(r,t)})(t)}function a(t,e,n){return(a=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],function(){})),!0}catch(t){return!1}}()?Reflect.construct:function(t,e,n){var r=[null];r.push.apply(r,e);var i=new(Function.bind.apply(t,r));return n&&s(i,n.prototype),i}).apply(null,arguments)}function s(t,e){return(s=Object.setPrototypeOf||function(t,e){return t.__proto__=e,t})(t,e)}function u(t){return(u=Object.setPrototypeOf?Object.getPrototypeOf:function(t){return t.__proto__||Object.getPrototypeOf(t)})(t)}var l=n(36),c={Unknown:"Unknown",Style:"Style",Source:"Source",Tile:"Tile",Glyphs:"Glyphs",SpriteImage:"SpriteImage",SpriteJSON:"SpriteJSON",Image:"Image"};e.ResourceType=c,"function"==typeof Object.freeze&&Object.freeze(c);var f=function(t){function e(t,n){var r;return function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,e),(r=i(this,u(e).call(this,t))).status=n,r}return function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),e&&s(t,e)}(e,o(Error)),e}();function h(t){var e=new l.XMLHttpRequest;for(var n in e.open("GET",t.url,!0),t.headers)e.setRequestHeader(n,t.headers[n]);return e.withCredentials="include"===t.credentials,e}e.getJSON=function(t,e){var n=h(t);return n.setRequestHeader("Accept","application/json"),n.onerror=function(){e(new Error(n.statusText))},n.onload=function(){if(n.status>=200&&n.status<300&&n.response){var t;try{t=JSON.parse(n.response)}catch(t){return e(t)}e(null,t)}else e(new f(n.statusText,n.status))},n.send(),n},e.getArrayBuffer=function(t,e){var n=h(t);return n.responseType="arraybuffer",n.onerror=function(){e(new Error(n.statusText))},n.onload=function(){var t=n.response;if(0===t.byteLength&&200===n.status)return e(new Error("http status 200 returned without content."));n.status>=200&&n.status<300&&n.response?e(null,{data:t,cacheControl:n.getResponseHeader("Cache-Control"),expires:n.getResponseHeader("Expires")}):e(new f(n.statusText,n.status))},n.send(),n};e.getImage=function(t,n){return e.getArrayBuffer(t,function(t,e){if(t)n(t);else if(e){var r=new l.Image,i=l.URL||l.webkitURL;r.onload=function(){n(null,r),i.revokeObjectURL(r.src)};var o=new l.Blob([new Uint8Array(e.data)],{type:"image/png"});r.cacheControl=e.cacheControl,r.expires=e.expires,r.src=e.data.byteLength?i.createObjectURL(o):"data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAEAAAABCAYAAAAfFcSJAAAAC0lEQVQYV2NgAAIAAAUAAarVyFEAAAAASUVORK5CYII="}})},e.getVideo=function(t,e){var n,r,i=l.document.createElement("video");i.onloadstart=function(){e(null,i)};for(var o=0;o<t.length;o++){var a=l.document.createElement("source");n=t[o],r=void 0,(r=l.document.createElement("a")).href=n,(r.protocol!==l.document.location.protocol||r.host!==l.document.location.host)&&(i.crossOrigin="Anonymous"),a.src=t[o],i.appendChild(a)}return i}},function(t,e,n){function r(t){return(r="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t})(t)}function i(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,r.key,r)}}function o(t,e){return!e||"object"!==r(e)&&"function"!=typeof e?function(t){if(void 0===t)throw new ReferenceError("this hasn\'t been initialised - super() hasn\'t been called");return t}(t):e}function a(t){return(a=Object.setPrototypeOf?Object.getPrototypeOf:function(t){return t.__proto__||Object.getPrototypeOf(t)})(t)}function s(t,e){return(s=Object.setPrototypeOf||function(t,e){return t.__proto__=e,t})(t,e)}var u=n(6),l=n(3).register,c=function(t){function e(t,n,r,i){var s;return function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,e),(s=o(this,a(e).call(this,t,n))).angle=r,void 0!==i&&(s.segment=i),s}var n,r,l;return function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),e&&s(t,e)}(e,u),n=e,(r=[{key:"clone",value:function(){return new e(this.x,this.y,this.angle,this.segment)}}])&&i(n.prototype,r),l&&i(n,l),e}();l("Anchor",c),t.exports=c},function(t,e){function n(t,e,n,r){this.cx=3*t,this.bx=3*(n-t)-this.cx,this.ax=1-this.cx-this.bx,this.cy=3*e,this.by=3*(r-e)-this.cy,this.ay=1-this.cy-this.by,this.p1x=t,this.p1y=r,this.p2x=n,this.p2y=r}t.exports=n,n.prototype.sampleCurveX=function(t){return((this.ax*t+this.bx)*t+this.cx)*t},n.prototype.sampleCurveY=function(t){return((this.ay*t+this.by)*t+this.cy)*t},n.prototype.sampleCurveDerivativeX=function(t){return(3*this.ax*t+2*this.bx)*t+this.cx},n.prototype.solveCurveX=function(t,e){var n,r,i,o,a;for(void 0===e&&(e=1e-6),i=t,a=0;a<8;a++){if(o=this.sampleCurveX(i)-t,Math.abs(o)<e)return i;var s=this.sampleCurveDerivativeX(i);if(Math.abs(s)<1e-6)break;i-=o/s}if((i=t)<(n=0))return n;if(i>(r=1))return r;for(;n<r;){if(o=this.sampleCurveX(i),Math.abs(o-t)<e)return i;t>o?n=i:r=i,i=.5*(r-n)+n}return i},n.prototype.solve=function(t,e){return this.sampleCurveY(this.solveCurveX(t,e))}},function(t,e){function n(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,r.key,r)}}var r=function(){function t(e,n,r){!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,t),this.column=e,this.row=n,this.zoom=r}var e,r,i;return e=t,(r=[{key:"clone",value:function(){return new t(this.column,this.row,this.zoom)}},{key:"zoomTo",value:function(t){return this.clone()._zoomTo(t)}},{key:"sub",value:function(t){return this.clone()._sub(t)}},{key:"_zoomTo",value:function(t){var e=Math.pow(2,t-this.zoom);return this.column*=e,this.row*=e,this.zoom=t,this}},{key:"_sub",value:function(t){return t=t.zoomTo(this.zoom),this.column-=t.column,this.row-=t.row,this}}])&&n(e.prototype,r),i&&n(e,i),t}();t.exports=r},function(t,e,n){"use strict";t.exports=i;var r=3;function i(t,e,n){var i=this.cells=[];if(t instanceof ArrayBuffer){this.arrayBuffer=t;var o=new Int32Array(this.arrayBuffer);t=o[0],e=o[1],n=o[2],this.d=e+2*n;for(var a=0;a<this.d*this.d;a++){var s=o[r+a],u=o[r+a+1];i.push(s===u?null:o.subarray(s,u))}var l=o[r+i.length],c=o[r+i.length+1];this.keys=o.subarray(l,c),this.bboxes=o.subarray(c),this.insert=this._insertReadonly}else{this.d=e+2*n;for(var f=0;f<this.d*this.d;f++)i.push([]);this.keys=[],this.bboxes=[]}this.n=e,this.extent=t,this.padding=n,this.scale=e/t,this.uid=0;var h=n/e*t;this.min=-h,this.max=t+h}i.prototype.insert=function(t,e,n,r,i){this._forEachCell(e,n,r,i,this._insertCell,this.uid++),this.keys.push(t),this.bboxes.push(e),this.bboxes.push(n),this.bboxes.push(r),this.bboxes.push(i)},i.prototype._insertReadonly=function(){throw"Cannot insert into a GridIndex created from an ArrayBuffer."},i.prototype._insertCell=function(t,e,n,r,i,o){this.cells[i].push(o)},i.prototype.query=function(t,e,n,r,i){var o=this.min,a=this.max;if(t<=o&&e<=o&&a<=n&&a<=r&&!i)return Array.prototype.slice.call(this.keys);var s=[];return this._forEachCell(t,e,n,r,this._queryCell,s,{},i),s},i.prototype._queryCell=function(t,e,n,r,i,o,a,s){var u=this.cells[i];if(null!==u)for(var l=this.keys,c=this.bboxes,f=0;f<u.length;f++){var h=u[f];if(void 0===a[h]){var p=4*h;(s?s(c[p+0],c[p+1],c[p+2],c[p+3]):t<=c[p+2]&&e<=c[p+3]&&n>=c[p+0]&&r>=c[p+1])?(a[h]=!0,o.push(l[h])):a[h]=!1}}},i.prototype._forEachCell=function(t,e,n,r,i,o,a,s){for(var u=this._convertToCellCoord(t),l=this._convertToCellCoord(e),c=this._convertToCellCoord(n),f=this._convertToCellCoord(r),h=u;h<=c;h++)for(var p=l;p<=f;p++){var y=this.d*p+h;if((!s||s(this._convertFromCellCoord(h),this._convertFromCellCoord(p),this._convertFromCellCoord(h+1),this._convertFromCellCoord(p+1)))&&i.call(this,t,e,n,r,y,o,a,s))return}},i.prototype._convertFromCellCoord=function(t){return(t-this.padding)/this.scale},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=r+this.cells.length+1+1,n=0,i=0;i<this.cells.length;i++)n+=this.cells[i].length;var o=new Int32Array(e+n+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 u=t[s];o[r+s]=a,o.set(u,a),a+=u.length}return o[r+t.length]=a,o.set(this.keys,a),a+=this.keys.length,o[r+t.length+1]=a,o.set(this.bboxes,a),a+=this.bboxes.length,o.buffer}},function(t,e){var n={transparent:[0,0,0,0],aliceblue:[240,248,255,1],antiquewhite:[250,235,215,1],aqua:[0,255,255,1],aquamarine:[127,255,212,1],azure:[240,255,255,1],beige:[245,245,220,1],bisque:[255,228,196,1],black:[0,0,0,1],blanchedalmond:[255,235,205,1],blue:[0,0,255,1],blueviolet:[138,43,226,1],brown:[165,42,42,1],burlywood:[222,184,135,1],cadetblue:[95,158,160,1],chartreuse:[127,255,0,1],chocolate:[210,105,30,1],coral:[255,127,80,1],cornflowerblue:[100,149,237,1],cornsilk:[255,248,220,1],crimson:[220,20,60,1],cyan:[0,255,255,1],darkblue:[0,0,139,1],darkcyan:[0,139,139,1],darkgoldenrod:[184,134,11,1],darkgray:[169,169,169,1],darkgreen:[0,100,0,1],darkgrey:[169,169,169,1],darkkhaki:[189,183,107,1],darkmagenta:[139,0,139,1],darkolivegreen:[85,107,47,1],darkorange:[255,140,0,1],darkorchid:[153,50,204,1],darkred:[139,0,0,1],darksalmon:[233,150,122,1],darkseagreen:[143,188,143,1],darkslateblue:[72,61,139,1],darkslategray:[47,79,79,1],darkslategrey:[47,79,79,1],darkturquoise:[0,206,209,1],darkviolet:[148,0,211,1],deeppink:[255,20,147,1],deepskyblue:[0,191,255,1],dimgray:[105,105,105,1],dimgrey:[105,105,105,1],dodgerblue:[30,144,255,1],firebrick:[178,34,34,1],floralwhite:[255,250,240,1],forestgreen:[34,139,34,1],fuchsia:[255,0,255,1],gainsboro:[220,220,220,1],ghostwhite:[248,248,255,1],gold:[255,215,0,1],goldenrod:[218,165,32,1],gray:[128,128,128,1],green:[0,128,0,1],greenyellow:[173,255,47,1],grey:[128,128,128,1],honeydew:[240,255,240,1],hotpink:[255,105,180,1],indianred:[205,92,92,1],indigo:[75,0,130,1],ivory:[255,255,240,1],khaki:[240,230,140,1],lavender:[230,230,250,1],lavenderblush:[255,240,245,1],lawngreen:[124,252,0,1],lemonchiffon:[255,250,205,1],lightblue:[173,216,230,1],lightcoral:[240,128,128,1],lightcyan:[224,255,255,1],lightgoldenrodyellow:[250,250,210,1],lightgray:[211,211,211,1],lightgreen:[144,238,144,1],lightgrey:[211,211,211,1],lightpink:[255,182,193,1],lightsalmon:[255,160,122,1],lightseagreen:[32,178,170,1],lightskyblue:[135,206,250,1],lightslategray:[119,136,153,1],lightslategrey:[119,136,153,1],lightsteelblue:[176,196,222,1],lightyellow:[255,255,224,1],lime:[0,255,0,1],limegreen:[50,205,50,1],linen:[250,240,230,1],magenta:[255,0,255,1],maroon:[128,0,0,1],mediumaquamarine:[102,205,170,1],mediumblue:[0,0,205,1],mediumorchid:[186,85,211,1],mediumpurple:[147,112,219,1],mediumseagreen:[60,179,113,1],mediumslateblue:[123,104,238,1],mediumspringgreen:[0,250,154,1],mediumturquoise:[72,209,204,1],mediumvioletred:[199,21,133,1],midnightblue:[25,25,112,1],mintcream:[245,255,250,1],mistyrose:[255,228,225,1],moccasin:[255,228,181,1],navajowhite:[255,222,173,1],navy:[0,0,128,1],oldlace:[253,245,230,1],olive:[128,128,0,1],olivedrab:[107,142,35,1],orange:[255,165,0,1],orangered:[255,69,0,1],orchid:[218,112,214,1],palegoldenrod:[238,232,170,1],palegreen:[152,251,152,1],paleturquoise:[175,238,238,1],palevioletred:[219,112,147,1],papayawhip:[255,239,213,1],peachpuff:[255,218,185,1],peru:[205,133,63,1],pink:[255,192,203,1],plum:[221,160,221,1],powderblue:[176,224,230,1],purple:[128,0,128,1],rebeccapurple:[102,51,153,1],red:[255,0,0,1],rosybrown:[188,143,143,1],royalblue:[65,105,225,1],saddlebrown:[139,69,19,1],salmon:[250,128,114,1],sandybrown:[244,164,96,1],seagreen:[46,139,87,1],seashell:[255,245,238,1],sienna:[160,82,45,1],silver:[192,192,192,1],skyblue:[135,206,235,1],slateblue:[106,90,205,1],slategray:[112,128,144,1],slategrey:[112,128,144,1],snow:[255,250,250,1],springgreen:[0,255,127,1],steelblue:[70,130,180,1],tan:[210,180,140,1],teal:[0,128,128,1],thistle:[216,191,216,1],tomato:[255,99,71,1],turquoise:[64,224,208,1],violet:[238,130,238,1],wheat:[245,222,179,1],white:[255,255,255,1],whitesmoke:[245,245,245,1],yellow:[255,255,0,1],yellowgreen:[154,205,50,1]};function r(t){return(t=Math.round(t))<0?0:t>255?255:t}function i(t){return t<0?0:t>1?1:t}function o(t){return"%"===t[t.length-1]?r(parseFloat(t)/100*255):r(parseInt(t))}function a(t){return"%"===t[t.length-1]?i(parseFloat(t)/100):i(parseFloat(t))}function s(t,e,n){return n<0?n+=1:n>1&&(n-=1),6*n<1?t+(e-t)*n*6:2*n<1?e:3*n<2?t+(e-t)*(2/3-n)*6:t}try{e.parseCSSColor=function(t){var e,i=t.replace(/ /g,"").toLowerCase();if(i in n)return n[i].slice();if("#"===i[0])return 4===i.length?(e=parseInt(i.substr(1),16))>=0&&e<=4095?[(3840&e)>>4|(3840&e)>>8,240&e|(240&e)>>4,15&e|(15&e)<<4,1]:null:7===i.length&&(e=parseInt(i.substr(1),16))>=0&&e<=16777215?[(16711680&e)>>16,(65280&e)>>8,255&e,1]:null;var u=i.indexOf("("),l=i.indexOf(")");if(-1!==u&&l+1===i.length){var c=i.substr(0,u),f=i.substr(u+1,l-(u+1)).split(","),h=1;switch(c){case"rgba":if(4!==f.length)return null;h=a(f.pop());case"rgb":return 3!==f.length?null:[o(f[0]),o(f[1]),o(f[2]),h];case"hsla":if(4!==f.length)return null;h=a(f.pop());case"hsl":if(3!==f.length)return null;var p=(parseFloat(f[0])%360+360)%360/360,y=a(f[1]),d=a(f[2]),v=d<=.5?d*(y+1):d+y-d*y,m=2*d-v;return[r(255*s(m,v,p+1/3)),r(255*s(m,v,p)),r(255*s(m,v,p-1/3)),h];default:return null}}return null}}catch(t){}},function(t,e){function n(t){return(n="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t})(t)}function r(t,e){return!e||"object"!==n(e)&&"function"!=typeof e?function(t){if(void 0===t)throw new ReferenceError("this hasn\'t been initialised - super() hasn\'t been called");return t}(t):e}function i(t){var e="function"==typeof Map?new Map:void 0;return(i=function(t){if(null===t||(n=t,-1===Function.toString.call(n).indexOf("[native code]")))return t;var n;if("function"!=typeof t)throw new TypeError("Super expression must either be null or a function");if(void 0!==e){if(e.has(t))return e.get(t);e.set(t,r)}function r(){return o(t,arguments,s(this).constructor)}return r.prototype=Object.create(t.prototype,{constructor:{value:r,enumerable:!1,writable:!0,configurable:!0}}),a(r,t)})(t)}function o(t,e,n){return(o=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],function(){})),!0}catch(t){return!1}}()?Reflect.construct:function(t,e,n){var r=[null];r.push.apply(r,e);var i=new(Function.bind.apply(t,r));return n&&a(i,n.prototype),i}).apply(null,arguments)}function a(t,e){return(a=Object.setPrototypeOf||function(t,e){return t.__proto__=e,t})(t,e)}function s(t){return(s=Object.setPrototypeOf?Object.getPrototypeOf:function(t){return t.__proto__||Object.getPrototypeOf(t)})(t)}var u=function(t){function e(t,n){var i;return function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,e),(i=r(this,s(e).call(this,n))).message=n,i.key=t,i}return function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),e&&a(t,e)}(e,i(Error)),e}();t.exports=u},function(t,e,n){function r(t){return(r="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t})(t)}function i(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,r.key,r)}}var o=n(52),a=n(4).checkSubtype,s=n(50),u=n(53),l=n(54),c=n(55),f=n(56),h=function(){function t(e){var n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:[],r=arguments.length>2?arguments[2]:void 0,i=arguments.length>3&&void 0!==arguments[3]?arguments[3]:new o,a=arguments.length>4&&void 0!==arguments[4]?arguments[4]:[];!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,t),this.registry=e,this.path=n,this.key=n.map(function(t){return"[".concat(t,"]")}).join(""),this.scope=i,this.errors=a,this.expectedType=r}var e,h,p;return e=t,(h=[{key:"parse",value:function(t,e,i,o){var a=arguments.length>4&&void 0!==arguments[4]?arguments[4]:{},s=this;if(e&&(s=s.concat(e,i,o)),null!==t&&"string"!=typeof t&&"boolean"!=typeof t&&"number"!=typeof t||(t=["literal",t]),Array.isArray(t)){if(0===t.length)return s.error(\'Expected an array with at least one element. If you wanted a literal array, use ["literal", []].\');var h=t[0];if("string"!=typeof h)return s.error("Expression name must be a string, but found ".concat(r(h),\' instead. If you wanted a literal array, use ["literal", [...]].\'),0),null;var p=s.registry[h];if(p){var y=p.parse(t,s);if(!y)return null;if(s.expectedType){var d=s.expectedType,v=y.type;if("string"!==d.kind&&"number"!==d.kind&&"boolean"!==d.kind||"value"!==v.kind)if("array"===d.kind&&"value"===v.kind)a.omitTypeAnnotations||(y=new c(d,y));else if("color"!==d.kind||"value"!==v.kind&&"string"!==v.kind){if(s.checkSubtype(s.expectedType,y.type))return null}else a.omitTypeAnnotations||(y=new f(d,[y]));else a.omitTypeAnnotations||(y=new l(d,[y]))}if(!(y instanceof u)&&function(t){var e=n(23).CompoundExpression,r=n(57),i=r.isGlobalPropertyConstant,o=r.isFeatureConstant,a=n(58);if(t instanceof a)return!1;if(t instanceof e&&"error"===t.name)return!1;var s=!0;if(t.eachChild(function(t){t instanceof u||(s=!1)}),!s)return!1;return o(t)&&i(t,["zoom","heatmap-density"])}(y)){var m=new(n(33));try{y=new u(y.type,y.evaluate(m))}catch(t){return s.error(t.message),null}}return y}return s.error(\'Unknown expression "\'.concat(h,\'". If you wanted a literal array, use ["literal", [...]].\'),0)}return void 0===t?s.error("\'undefined\' value invalid. Use null instead."):"object"===r(t)?s.error(\'Bare objects invalid. Use ["literal", {...}] instead.\'):s.error("Expected an array, but found ".concat(r(t)," instead."))}},{key:"concat",value:function(e,n,r){var i="number"==typeof e?this.path.concat(e):this.path,o=r?this.scope.concat(r):this.scope;return new t(this.registry,i,n||null,o,this.errors)}},{key:"error",value:function(t){for(var e=arguments.length,n=new Array(e>1?e-1:0),r=1;r<e;r++)n[r-1]=arguments[r];var i="".concat(this.key).concat(n.map(function(t){return"[".concat(t,"]")}).join(""));this.errors.push(new s(i,t))}},{key:"checkSubtype",value:function(t,e){var n=a(t,e);return n&&this.error(n),n}}])&&i(e.prototype,h),p&&i(e,p),t}();t.exports=h},function(t,e){function n(t,e){return function(t){if(Array.isArray(t))return t}(t)||function(t,e){var n=[],r=!0,i=!1,o=void 0;try{for(var a,s=t[Symbol.iterator]();!(r=(a=s.next()).done)&&(n.push(a.value),!e||n.length!==e);r=!0);}catch(t){i=!0,o=t}finally{try{r||null==s.return||s.return()}finally{if(i)throw o}}return n}(t,e)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance")}()}function r(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,r.key,r)}}var i=function(){function t(e){var r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:[];!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,t),this.parent=e,this.bindings={};var i=!0,o=!1,a=void 0;try{for(var s,u=r[Symbol.iterator]();!(i=(s=u.next()).done);i=!0){var l=n(s.value,2),c=l[0],f=l[1];this.bindings[c]=f}}catch(t){o=!0,a=t}finally{try{i||null==u.return||u.return()}finally{if(o)throw a}}}var e,i,o;return e=t,(i=[{key:"concat",value:function(e){return new t(this,e)}},{key:"get",value:function(t){if(this.bindings[t])return this.bindings[t];if(this.parent)return this.parent.get(t);throw new Error("".concat(t," not found in scope."))}},{key:"has",value:function(t){return!!this.bindings[t]||!!this.parent&&this.parent.has(t)}}])&&r(e.prototype,i),o&&r(e,o),t}();t.exports=i},function(t,e,n){function r(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,r.key,r)}}var i=n(11),o=i.isValue,a=i.typeOf,s=function(){function t(e,n){!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,t),this.type=e,this.value=n}var e,n,i;return e=t,i=[{key:"parse",value:function(e,n){if(2!==e.length)return n.error("\'literal\' expression requires exactly one argument, but found ".concat(e.length-1," instead."));if(!o(e[1]))return n.error("invalid value");var r=e[1],i=a(r),s=n.expectedType;return"array"!==i.kind||0!==i.N||!s||"array"!==s.kind||"number"==typeof s.N&&0!==s.N||(i=s),new t(i,r)}}],(n=[{key:"evaluate",value:function(){return this.value}},{key:"eachChild",value:function(){}},{key:"possibleOutputs",value:function(){return[this.value]}}])&&r(e.prototype,n),i&&r(e,i),t}();t.exports=s},function(t,e,n){function r(t){return function(t){if(Array.isArray(t)){for(var e=0,n=new Array(t.length);e<t.length;e++)n[e]=t[e];return n}}(t)||function(t){if(Symbol.iterator in Object(t)||"[object Arguments]"===Object.prototype.toString.call(t))return Array.from(t)}(t)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance")}()}function i(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,r.key,r)}}var o=n(0),a=n(4),s=a.ObjectType,u=a.ValueType,l=a.StringType,c=a.NumberType,f=a.BooleanType,h=n(15),p=n(4),y=p.checkSubtype,d=p.toString,v=n(11).typeOf,m={string:l,number:c,boolean:f,object:s},g=function(){function t(e,n){!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,t),this.type=e,this.args=n}var e,n,a;return e=t,a=[{key:"parse",value:function(e,n){if(e.length<2)return n.error("Expected at least one argument.");var r=e[0];o(m[r],r);for(var i=m[r],a=[],s=1;s<e.length;s++){var l=n.parse(e[s],s,u);if(!l)return null;a.push(l)}return new t(i,a)}}],(n=[{key:"evaluate",value:function(t){for(var e=0;e<this.args.length;e++){var n=this.args[e].evaluate(t);if(!y(this.type,v(n)))return n;if(e===this.args.length-1)throw new h("Expected value to be of type ".concat(d(this.type),", but found ").concat(d(v(n))," instead."))}return o(!1),null}},{key:"eachChild",value:function(t){this.args.forEach(t)}},{key:"possibleOutputs",value:function(){var t;return(t=[]).concat.apply(t,r(this.args.map(function(t){return t.possibleOutputs()})))}}])&&i(e.prototype,n),a&&i(e,a),t}();t.exports=g},function(t,e,n){function r(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,r.key,r)}}var i=n(4),o=i.toString,a=i.array,s=i.ValueType,u=i.StringType,l=i.NumberType,c=i.BooleanType,f=i.checkSubtype,h=n(11).typeOf,p=n(15),y={string:u,number:l,boolean:c},d=function(){function t(e,n){!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,t),this.type=e,this.input=n}var e,n,i;return e=t,i=[{key:"parse",value:function(e,n){if(e.length<2||e.length>4)return n.error("Expected 1, 2, or 3 arguments, but found ".concat(e.length-1," instead."));var r,i;if(e.length>2){var o=e[1];if("string"!=typeof o||!(o in y))return n.error(\'The item type argument of "array" must be one of string, number, boolean\',1);r=y[o]}else r=s;if(e.length>3){if("number"!=typeof e[2]||e[2]<0||e[2]!==Math.floor(e[2]))return n.error(\'The length argument to "array" must be a positive integer literal\',2);i=e[2]}var u=a(r,i),l=n.parse(e[e.length-1],e.length-1,s);return l?new t(u,l):null}}],(n=[{key:"evaluate",value:function(t){var e=this.input.evaluate(t);if(f(this.type,h(e)))throw new p("Expected value to be of type ".concat(o(this.type),", but found ").concat(o(h(e))," instead."));return e}},{key:"eachChild",value:function(t){t(this.input)}},{key:"possibleOutputs",value:function(){return this.input.possibleOutputs()}}])&&r(e.prototype,n),i&&r(e,i),t}();t.exports=d},function(t,e,n){function r(t){return function(t){if(Array.isArray(t)){for(var e=0,n=new Array(t.length);e<t.length;e++)n[e]=t[e];return n}}(t)||function(t){if(Symbol.iterator in Object(t)||"[object Arguments]"===Object.prototype.toString.call(t))return Array.from(t)}(t)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance")}()}function i(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,r.key,r)}}var o=n(0),a=n(4),s=a.ColorType,u=a.ValueType,l=a.NumberType,c=n(11),f=c.Color,h=c.validateRGBA,p=n(15),y={"to-number":l,"to-color":s},d=function(){function t(e,n){!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,t),this.type=e,this.args=n}var e,n,a;return e=t,a=[{key:"parse",value:function(e,n){if(e.length<2)return n.error("Expected at least one argument.");var r=e[0];o(y[r],r);for(var i=y[r],a=[],s=1;s<e.length;s++){var l=n.parse(e[s],s,u);if(!l)return null;a.push(l)}return new t(i,a)}}],(n=[{key:"evaluate",value:function(t){if("color"===this.type.kind){var e,n,r=!0,i=!1,o=void 0;try{for(var a,s=this.args[Symbol.iterator]();!(r=(a=s.next()).done);r=!0){if(e=a.value.evaluate(t),n=null,"string"==typeof e){var u=t.parseColor(e);if(u)return u}else if(Array.isArray(e)&&!(n=e.length<3||e.length>4?"Invalid rbga value ".concat(JSON.stringify(e),": expected an array containing either three or four numeric values."):h(e[0],e[1],e[2],e[3])))return new f(e[0]/255,e[1]/255,e[2]/255,e[3])}}catch(t){i=!0,o=t}finally{try{r||null==s.return||s.return()}finally{if(i)throw o}}throw new p(n||"Could not parse color from value \'".concat("string"==typeof e?e:JSON.stringify(e),"\'"))}var l=null,c=!0,y=!1,d=void 0;try{for(var v,m=this.args[Symbol.iterator]();!(c=(v=m.next()).done);c=!0){if(null!==(l=v.value.evaluate(t))){var g=Number(l);if(!isNaN(g))return g}}}catch(t){y=!0,d=t}finally{try{c||null==m.return||m.return()}finally{if(y)throw d}}throw new p("Could not convert ".concat(JSON.stringify(l)," to number."))}},{key:"eachChild",value:function(t){this.args.forEach(t)}},{key:"possibleOutputs",value:function(){var t;return(t=[]).concat.apply(t,r(this.args.map(function(t){return t.possibleOutputs()})))}}])&&i(e.prototype,n),a&&i(e,a),t}();t.exports=d},function(t,e,n){var r=n(23).CompoundExpression;t.exports={isFeatureConstant:function t(e){if(e instanceof r){if("get"===e.name&&1===e.args.length)return!1;if("has"===e.name&&1===e.args.length)return!1;if("properties"===e.name||"geometry-type"===e.name||"id"===e.name)return!1;if(e.name.startsWith("filter-"))return!1}var n=!0;return e.eachChild(function(e){n&&!t(e)&&(n=!1)}),n},isGlobalPropertyConstant:function t(e,n){if(e instanceof r&&n.indexOf(e.name)>=0)return!1;var i=!0;return e.eachChild(function(e){i&&!t(e,n)&&(i=!1)}),i}}},function(t,e){function n(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,r.key,r)}}var r=function(){function t(e,n){!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,t),this.type=n,this.name=e}var e,r,i;return e=t,i=[{key:"parse",value:function(e,n){if(2!==e.length||"string"!=typeof e[1])return n.error("\'var\' expression requires exactly one string literal argument.");var r=e[1];return n.scope.has(r)?new t(r,n.scope.get(r).type):n.error(\'Unknown variable "\'.concat(r,\'". Make sure "\').concat(r,\'" has been bound in an enclosing "let" expression before using it.\'),1)}}],(r=[{key:"evaluate",value:function(t){return t.scope.get(this.name).evaluate(t)}},{key:"eachChild",value:function(){}},{key:"possibleOutputs",value:function(){return[void 0]}}])&&n(e.prototype,r),i&&n(e,i),t}();t.exports=r},function(t,e,n){function r(t){return function(t){if(Array.isArray(t)){for(var e=0,n=new Array(t.length);e<t.length;e++)n[e]=t[e];return n}}(t)||i(t)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance")}()}function i(t){if(Symbol.iterator in Object(t)||"[object Arguments]"===Object.prototype.toString.call(t))return Array.from(t)}function o(t,e){return s(t)||function(t,e){var n=[],r=!0,i=!1,o=void 0;try{for(var a,s=t[Symbol.iterator]();!(r=(a=s.next()).done)&&(n.push(a.value),!e||n.length!==e);r=!0);}catch(t){i=!0,o=t}finally{try{r||null==s.return||s.return()}finally{if(i)throw o}}return n}(t,e)||a()}function a(){throw new TypeError("Invalid attempt to destructure non-iterable instance")}function s(t){if(Array.isArray(t))return t}function u(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,r.key,r)}}var l=n(4).NumberType,c=n(60).findStopLessThanOrEqualTo,f=function(){function t(e,n,r){!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,t),this.type=e,this.input=n,this.labels=[],this.outputs=[];var i=!0,a=!1,s=void 0;try{for(var u,l=r[Symbol.iterator]();!(i=(u=l.next()).done);i=!0){var c=o(u.value,2),f=c[0],h=c[1];this.labels.push(f),this.outputs.push(h)}}catch(t){a=!0,s=t}finally{try{i||null==l.return||l.return()}finally{if(a)throw s}}}var e,n,f;return e=t,f=[{key:"parse",value:function(e,n){var r,o=s(r=e)||i(r)||a(),u=o[1],c=o.slice(2);if(e.length-1<4)return n.error("Expected at least 4 arguments, but found only ".concat(e.length-1,"."));if((e.length-1)%2!=0)return n.error("Expected an even number of arguments.");if(!(u=n.parse(u,1,l)))return null;var f=[],h=null;n.expectedType&&"value"!==n.expectedType.kind&&(h=n.expectedType),c.unshift(-1/0);for(var p=0;p<c.length;p+=2){var y=c[p],d=c[p+1],v=p+1,m=p+2;if("number"!=typeof y)return n.error(\'Input/output pairs for "step" expressions must be defined using literal numeric values (not computed expressions) for the input values.\',v);if(f.length&&f[f.length-1][0]>=y)return n.error(\'Input/output pairs for "step" expressions must be arranged with input values in strictly ascending order.\',v);var g=n.parse(d,m,h);if(!g)return null;h=h||g.type,f.push([y,g])}return new t(h,u,f)}}],(n=[{key:"evaluate",value:function(t){var e=this.labels,n=this.outputs;if(1===e.length)return n[0].evaluate(t);var r=this.input.evaluate(t);if(r<=e[0])return n[0].evaluate(t);var i=e.length;return r>=e[i-1]?n[i-1].evaluate(t):n[c(e,r)].evaluate(t)}},{key:"eachChild",value:function(t){t(this.input);var e=!0,n=!1,r=void 0;try{for(var i,o=this.outputs[Symbol.iterator]();!(e=(i=o.next()).done);e=!0){t(i.value)}}catch(t){n=!0,r=t}finally{try{e||null==o.return||o.return()}finally{if(n)throw r}}}},{key:"possibleOutputs",value:function(){var t;return(t=[]).concat.apply(t,r(this.outputs.map(function(t){return t.possibleOutputs()})))}}])&&u(e.prototype,n),f&&u(e,f),t}();t.exports=f},function(t,e,n){var r=n(15);t.exports={findStopLessThanOrEqualTo:function(t,e){for(var n,i,o=0,a=t.length-1,s=0;o<=a;){if(n=t[s=Math.floor((o+a)/2)],i=t[s+1],e===n||e>n&&e<i)return s;if(n<e)o=s+1;else{if(!(n>e))throw new r("Input is not a number.");a=s-1}}return Math.max(s-1,0)}}},function(t,e,n){function r(t){return function(t){if(Array.isArray(t)){for(var e=0,n=new Array(t.length);e<t.length;e++)n[e]=t[e];return n}}(t)||function(t){if(Symbol.iterator in Object(t)||"[object Arguments]"===Object.prototype.toString.call(t))return Array.from(t)}(t)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance")}()}function i(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,r.key,r)}}var o=n(0),a=n(4),s=a.checkSubtype,u=a.ValueType,l=function(){function t(e,n){!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,t),this.type=e,this.args=n}var e,n,a;return e=t,a=[{key:"parse",value:function(e,n){if(e.length<2)return n.error("Expectected at least one argument.");var r=null,i=n.expectedType;i&&"value"!==i.kind&&(r=i);var a=[],l=!0,c=!1,f=void 0;try{for(var h,p=e.slice(1)[Symbol.iterator]();!(l=(h=p.next()).done);l=!0){var y=h.value,d=n.parse(y,1+a.length,r,void 0,{omitTypeAnnotations:!0});if(!d)return null;r=r||d.type,a.push(d)}}catch(t){c=!0,f=t}finally{try{l||null==p.return||p.return()}finally{if(c)throw f}}return o(r),new t(i&&a.some(function(t){return s(i,t.type)})?u:r,a)}}],(n=[{key:"evaluate",value:function(t){var e=null,n=!0,r=!1,i=void 0;try{for(var o,a=this.args[Symbol.iterator]();!(n=(o=a.next()).done);n=!0){if(null!==(e=o.value.evaluate(t)))break}}catch(t){r=!0,i=t}finally{try{n||null==a.return||a.return()}finally{if(r)throw i}}return e}},{key:"eachChild",value:function(t){this.args.forEach(t)}},{key:"possibleOutputs",value:function(){var t;return(t=[]).concat.apply(t,r(this.args.map(function(t){return t.possibleOutputs()})))}}])&&i(e.prototype,n),a&&i(e,a),t}();t.exports=l},function(t,e){function n(t){return(n="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t})(t)}function r(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,r.key,r)}}var i=function(){function t(e,n){!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,t),this.type=n.type,this.bindings=[].concat(e),this.result=n}var e,i,o;return e=t,o=[{key:"parse",value:function(e,r){if(e.length<4)return r.error("Expected at least 3 arguments, but found ".concat(e.length-1," instead."));for(var i=[],o=1;o<e.length-1;o+=2){var a=e[o];if("string"!=typeof a)return r.error("Expected string, but found ".concat(n(a)," instead."),o);if(/[^a-zA-Z0-9_]/.test(a))return r.error("Variable names must contain only alphanumeric characters or \'_\'.",o);var s=r.parse(e[o+1],o+1);if(!s)return null;i.push([a,s])}var u=r.parse(e[e.length-1],e.length-1,void 0,i);return u?new t(i,u):null}}],(i=[{key:"evaluate",value:function(t){t.pushScope(this.bindings);var e=this.result.evaluate(t);return t.popScope(),e}},{key:"eachChild",value:function(t){var e=!0,n=!1,r=void 0;try{for(var i,o=this.bindings[Symbol.iterator]();!(e=(i=o.next()).done);e=!0){t(i.value[1])}}catch(t){n=!0,r=t}finally{try{e||null==o.return||o.return()}finally{if(n)throw r}}t(this.result)}},{key:"possibleOutputs",value:function(){return this.result.possibleOutputs()}}])&&r(e.prototype,i),o&&r(e,o),t}();t.exports=i},function(t,e,n){function r(t){return function(t){if(Array.isArray(t)){for(var e=0,n=new Array(t.length);e<t.length;e++)n[e]=t[e];return n}}(t)||function(t){if(Symbol.iterator in Object(t)||"[object Arguments]"===Object.prototype.toString.call(t))return Array.from(t)}(t)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance")}()}function i(t){return(i="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t})(t)}function o(t,e){return function(t){if(Array.isArray(t))return t}(t)||function(t,e){var n=[],r=!0,i=!1,o=void 0;try{for(var a,s=t[Symbol.iterator]();!(r=(a=s.next()).done)&&(n.push(a.value),!e||n.length!==e);r=!0);}catch(t){i=!0,o=t}finally{try{r||null==s.return||s.return()}finally{if(i)throw o}}return n}(t,e)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance")}()}var a=n(4),s=a.NumberType,u=a.StringType,l=a.BooleanType,c=a.ColorType,f=a.ObjectType,h=a.ValueType,p=a.ErrorType,y=a.array,d=a.toString,v=n(11),m=v.typeOf,g=v.Color,b=v.validateRGBA,x=n(23),w=x.CompoundExpression,k=x.varargs,_=n(15),S=n(62),A=n(58),T=n(53),j=n(54),O=n(55),z=n(56),P=n(95),E=n(96),C=n(97),M=n(59),I=n(34),B=n(61),V=n(98),L={"==":V.Equals,"!=":V.NotEquals,array:O,at:P,boolean:j,case:C,coalesce:B,interpolate:I,let:S,literal:T,match:E,number:j,object:j,step:M,string:j,"to-color":z,"to-number":z,var:A};function F(t,e){var n=o(e,4),r=n[0],i=n[1],a=n[2],s=n[3];r=r.evaluate(t),i=i.evaluate(t),a=a.evaluate(t);var u=s?s.evaluate(t):1,l=b(r,i,a,u);if(l)throw new _(l);return new g(r/255*u,i/255*u,a/255*u,u)}function R(t,e){return t in e}function D(t,e){var n=e[t];return void 0===n?null:n}function q(t,e){return o(e,1)[0].evaluate(t).length}function N(t,e){var n=o(e,2),r=n[0],i=n[1];return r.evaluate(t)<i.evaluate(t)}function U(t,e){var n=o(e,2),r=n[0],i=n[1];return r.evaluate(t)>i.evaluate(t)}function J(t,e){var n=o(e,2),r=n[0],i=n[1];return r.evaluate(t)<=i.evaluate(t)}function G(t,e){var n=o(e,2),r=n[0],i=n[1];return r.evaluate(t)>=i.evaluate(t)}w.register(L,{error:[p,[u],function(t,e){var n=o(e,1)[0];throw new _(n.evaluate(t))}],typeof:[u,[h],function(t,e){var n=o(e,1)[0];return d(m(n.evaluate(t)))}],"to-string":[u,[h],function(t,e){var n=o(e,1)[0],r=i(n=n.evaluate(t));return null===n||"string"===r||"number"===r||"boolean"===r?String(n):n instanceof g?n.toString():JSON.stringify(n)}],"to-boolean":[l,[h],function(t,e){var n=o(e,1)[0];return Boolean(n.evaluate(t))}],"to-rgba":[y(s,4),[c],function(t,e){var n=o(e,1)[0].evaluate(t),r=n.r,i=n.g,a=n.b,s=n.a;return[255*r/s,255*i/s,255*a/s,s]}],rgb:[c,[s,s,s],F],rgba:[c,[s,s,s,s],F],length:{type:s,overloads:[[[u],q],[[y(h)],q]]},has:{type:l,overloads:[[[u],function(t,e){return R(o(e,1)[0].evaluate(t),t.properties())}],[[u,f],function(t,e){var n=o(e,2),r=n[0],i=n[1];return R(r.evaluate(t),i.evaluate(t))}]]},get:{type:h,overloads:[[[u],function(t,e){return D(o(e,1)[0].evaluate(t),t.properties())}],[[u,f],function(t,e){var n=o(e,2),r=n[0],i=n[1];return D(r.evaluate(t),i.evaluate(t))}]]},properties:[f,[],function(t){return t.properties()}],"geometry-type":[u,[],function(t){return t.geometryType()}],id:[h,[],function(t){return t.id()}],zoom:[s,[],function(t){return t.globals.zoom}],"heatmap-density":[s,[],function(t){return t.globals.heatmapDensity||0}],"+":[s,k(s),function(t,e){var n=0,r=!0,i=!1,o=void 0;try{for(var a,s=e[Symbol.iterator]();!(r=(a=s.next()).done);r=!0){n+=a.value.evaluate(t)}}catch(t){i=!0,o=t}finally{try{r||null==s.return||s.return()}finally{if(i)throw o}}return n}],"*":[s,k(s),function(t,e){var n=1,r=!0,i=!1,o=void 0;try{for(var a,s=e[Symbol.iterator]();!(r=(a=s.next()).done);r=!0){n*=a.value.evaluate(t)}}catch(t){i=!0,o=t}finally{try{r||null==s.return||s.return()}finally{if(i)throw o}}return n}],"-":{type:s,overloads:[[[s,s],function(t,e){var n=o(e,2),r=n[0],i=n[1];return r.evaluate(t)-i.evaluate(t)}],[[s],function(t,e){return-o(e,1)[0].evaluate(t)}]]},"/":[s,[s,s],function(t,e){var n=o(e,2),r=n[0],i=n[1];return r.evaluate(t)/i.evaluate(t)}],"%":[s,[s,s],function(t,e){var n=o(e,2),r=n[0],i=n[1];return r.evaluate(t)%i.evaluate(t)}],ln2:[s,[],function(){return Math.LN2}],pi:[s,[],function(){return Math.PI}],e:[s,[],function(){return Math.E}],"^":[s,[s,s],function(t,e){var n=o(e,2),r=n[0],i=n[1];return Math.pow(r.evaluate(t),i.evaluate(t))}],sqrt:[s,[s],function(t,e){var n=o(e,1)[0];return Math.sqrt(n.evaluate(t))}],log10:[s,[s],function(t,e){var n=o(e,1)[0];return Math.log10(n.evaluate(t))}],ln:[s,[s],function(t,e){var n=o(e,1)[0];return Math.log(n.evaluate(t))}],log2:[s,[s],function(t,e){var n=o(e,1)[0];return Math.log2(n.evaluate(t))}],sin:[s,[s],function(t,e){var n=o(e,1)[0];return Math.sin(n.evaluate(t))}],cos:[s,[s],function(t,e){var n=o(e,1)[0];return Math.cos(n.evaluate(t))}],tan:[s,[s],function(t,e){var n=o(e,1)[0];return Math.tan(n.evaluate(t))}],asin:[s,[s],function(t,e){var n=o(e,1)[0];return Math.asin(n.evaluate(t))}],acos:[s,[s],function(t,e){var n=o(e,1)[0];return Math.acos(n.evaluate(t))}],atan:[s,[s],function(t,e){var n=o(e,1)[0];return Math.atan(n.evaluate(t))}],min:[s,k(s),function(t,e){return Math.min.apply(Math,r(e.map(function(e){return e.evaluate(t)})))}],max:[s,k(s),function(t,e){return Math.max.apply(Math,r(e.map(function(e){return e.evaluate(t)})))}],"filter-==":[l,[u,h],function(t,e){var n=o(e,2),r=n[0],i=n[1];return t.properties()[r.value]===i.value}],"filter-id-==":[l,[h],function(t,e){var n=o(e,1)[0];return t.id()===n.value}],"filter-type-==":[l,[u],function(t,e){var n=o(e,1)[0];return t.geometryType()===n.value}],"filter-<":[l,[u,h],function(t,e){var n=o(e,2),r=n[0],a=n[1],s=t.properties()[r.value],u=a.value;return i(s)===i(u)&&s<u}],"filter-id-<":[l,[h],function(t,e){var n=o(e,1)[0],r=t.id(),a=n.value;return i(r)===i(a)&&r<a}],"filter->":[l,[u,h],function(t,e){var n=o(e,2),r=n[0],a=n[1],s=t.properties()[r.value],u=a.value;return i(s)===i(u)&&s>u}],"filter-id->":[l,[h],function(t,e){var n=o(e,1)[0],r=t.id(),a=n.value;return i(r)===i(a)&&r>a}],"filter-<=":[l,[u,h],function(t,e){var n=o(e,2),r=n[0],a=n[1],s=t.properties()[r.value],u=a.value;return i(s)===i(u)&&s<=u}],"filter-id-<=":[l,[h],function(t,e){var n=o(e,1)[0],r=t.id(),a=n.value;return i(r)===i(a)&&r<=a}],"filter->=":[l,[u,h],function(t,e){var n=o(e,2),r=n[0],a=n[1],s=t.properties()[r.value],u=a.value;return i(s)===i(u)&&s>=u}],"filter-id->=":[l,[h],function(t,e){var n=o(e,1)[0],r=t.id(),a=n.value;return i(r)===i(a)&&r>=a}],"filter-has":[l,[h],function(t,e){return o(e,1)[0].value in t.properties()}],"filter-has-id":[l,[],function(t){return null!==t.id()}],"filter-type-in":[l,[y(u)],function(t,e){return o(e,1)[0].value.indexOf(t.geometryType())>=0}],"filter-id-in":[l,[y(h)],function(t,e){return o(e,1)[0].value.indexOf(t.id())>=0}],"filter-in-small":[l,[u,y(h)],function(t,e){var n=o(e,2),r=n[0];return n[1].value.indexOf(t.properties()[r.value])>=0}],"filter-in-large":[l,[u,y(h)],function(t,e){var n=o(e,2),r=n[0],i=n[1];return function(t,e,n,r){for(;n<=r;){var i=n+r>>1;if(e[i]===t)return!0;e[i]>t?r=i-1:n=i+1}return!1}(t.properties()[r.value],i.value,0,i.value.length-1)}],">":{type:l,overloads:[[[s,s],U],[[u,u],U]]},"<":{type:l,overloads:[[[s,s],N],[[u,u],N]]},">=":{type:l,overloads:[[[s,s],G],[[u,u],G]]},"<=":{type:l,overloads:[[[s,s],J],[[u,u],J]]},all:{type:l,overloads:[[[l,l],function(t,e){var n=o(e,2),r=n[0],i=n[1];return r.evaluate(t)&&i.evaluate(t)}],[k(l),function(t,e){var n=!0,r=!1,i=void 0;try{for(var o,a=e[Symbol.iterator]();!(n=(o=a.next()).done);n=!0){if(!o.value.evaluate(t))return!1}}catch(t){r=!0,i=t}finally{try{n||null==a.return||a.return()}finally{if(r)throw i}}return!0}]]},any:{type:l,overloads:[[[l,l],function(t,e){var n=o(e,2),r=n[0],i=n[1];return r.evaluate(t)||i.evaluate(t)}],[k(l),function(t,e){var n=!0,r=!1,i=void 0;try{for(var o,a=e[Symbol.iterator]();!(n=(o=a.next()).done);n=!0){if(o.value.evaluate(t))return!0}}catch(t){r=!0,i=t}finally{try{n||null==a.return||a.return()}finally{if(r)throw i}}return!1}]]},"!":[l,[l],function(t,e){return!o(e,1)[0].evaluate(t)}],upcase:[u,[u],function(t,e){return o(e,1)[0].evaluate(t).toUpperCase()}],downcase:[u,[u],function(t,e){return o(e,1)[0].evaluate(t).toLowerCase()}],concat:[u,k(u),function(t,e){return e.map(function(e){return e.evaluate(t)}).join("")}]}),t.exports=L},function(t,e,n){var r=n(5);t.exports=function(t){var e=t.key,n=t.value;return n?[new r(e,n,"constants have been deprecated as of v8")]:[]}},function(t,e,n){var r=n(5),i=n(7),o=n(16),a=n(24),s=n(66),u=n(67),l=n(12);t.exports=function(t){var e,n,c,f=t.valueSpec,h=l(t.value.type),p={},y="categorical"!==h&&void 0===t.value.property,d=!y,v="array"===i(t.value.stops)&&"array"===i(t.value.stops[0])&&"object"===i(t.value.stops[0][0]),m=a({key:t.key,value:t.value,valueSpec:t.styleSpec.function,style:t.style,styleSpec:t.styleSpec,objectElementValidators:{stops:function(t){if("identity"===h)return[new r(t.key,t.value,\'identity function may not have a "stops" property\')];var e=[],n=t.value;e=e.concat(s({key:t.key,value:n,valueSpec:t.valueSpec,style:t.style,styleSpec:t.styleSpec,arrayElementValidator:g})),"array"===i(n)&&0===n.length&&e.push(new r(t.key,n,"array must have at least one stop"));return e},default:function(t){return o({key:t.key,value:t.value,valueSpec:f,style:t.style,styleSpec:t.styleSpec})}}});return"identity"===h&&y&&m.push(new r(t.key,t.value,\'missing required property "property"\')),"identity"===h||t.value.stops||m.push(new r(t.key,t.value,\'missing required property "stops"\')),"exponential"===h&&"piecewise-constant"===t.valueSpec.function&&m.push(new r(t.key,t.value,"exponential functions not supported")),t.styleSpec.$version>=8&&(d&&!t.valueSpec["property-function"]?m.push(new r(t.key,t.value,"property functions not supported")):y&&!t.valueSpec["zoom-function"]&&"heatmap-color"!==t.objectKey&&m.push(new r(t.key,t.value,"zoom functions not supported"))),"categorical"!==h&&!v||void 0!==t.value.property||m.push(new r(t.key,t.value,\'"property" property is required\')),m;function g(t){var e=[],s=t.value,h=t.key;if("array"!==i(s))return[new r(h,s,"array expected, ".concat(i(s)," found"))];if(2!==s.length)return[new r(h,s,"array length 2 expected, length ".concat(s.length," found"))];if(v){if("object"!==i(s[0]))return[new r(h,s,"object expected, ".concat(i(s[0])," found"))];if(void 0===s[0].zoom)return[new r(h,s,"object stop key must have zoom")];if(void 0===s[0].value)return[new r(h,s,"object stop key must have value")];if(c&&c>l(s[0].zoom))return[new r(h,s[0].zoom,"stop zoom values must appear in ascending order")];l(s[0].zoom)!==c&&(c=l(s[0].zoom),n=void 0,p={}),e=e.concat(a({key:"".concat(h,"[0]"),value:s[0],valueSpec:{zoom:{}},style:t.style,styleSpec:t.styleSpec,objectElementValidators:{zoom:u,value:b}}))}else e=e.concat(b({key:"".concat(h,"[0]"),value:s[0],valueSpec:{},style:t.style,styleSpec:t.styleSpec},s));return e.concat(o({key:"".concat(h,"[1]"),value:s[1],valueSpec:f,style:t.style,styleSpec:t.styleSpec}))}function b(t,o){var a=i(t.value),s=l(t.value),u=null!==t.value?t.value:o;if(e){if(a!==e)return[new r(t.key,u,"".concat(a," stop domain type must match previous stop domain type ").concat(e))]}else e=a;if("number"!==a&&"string"!==a&&"boolean"!==a)return[new r(t.key,u,"stop domain value must be a number, string, or boolean")];if("number"!==a&&"categorical"!==h){var c="number expected, ".concat(a," found");return f["property-function"]&&void 0===h&&(c+=\'\\nIf you intended to use a categorical function, specify `"type": "categorical"`.\'),[new r(t.key,u,c)]}return"categorical"!==h||"number"!==a||isFinite(s)&&Math.floor(s)===s?"categorical"!==h&&"number"===a&&void 0!==n&&s<n?[new r(t.key,u,"stop domain values must appear in ascending order")]:(n=s,"categorical"===h&&s in p?[new r(t.key,u,"stop domain values must be unique")]:(p[s]=!0,[])):[new r(t.key,u,"integer expected, found ".concat(s))]}}},function(t,e,n){var r=n(7),i=n(16),o=n(5);t.exports=function(t){var e=t.value,n=t.valueSpec,a=t.style,s=t.styleSpec,u=t.key,l=t.arrayElementValidator||i;if("array"!==r(e))return[new o(u,e,"array expected, ".concat(r(e)," found"))];if(n.length&&e.length!==n.length)return[new o(u,e,"array length ".concat(n.length," expected, length ").concat(e.length," found"))];if(n["min-length"]&&e.length<n["min-length"])return[new o(u,e,"array length at least ".concat(n["min-length"]," expected, length ").concat(e.length," found"))];var c={type:n.value};s.$version<7&&(c.function=n.function),"object"===r(n.value)&&(c=n.value);for(var f=[],h=0;h<e.length;h++)f=f.concat(l({array:e,arrayIndex:h,value:e[h],valueSpec:c,style:a,styleSpec:s,key:"".concat(u,"[").concat(h,"]")}));return f}},function(t,e,n){var r=n(7),i=n(5);t.exports=function(t){var e=t.key,n=t.value,o=t.valueSpec,a=r(n);return"number"!==a?[new i(e,n,"number expected, ".concat(a," found"))]:"minimum"in o&&n<o.minimum?[new i(e,n,"".concat(n," is less than the minimum value ").concat(o.minimum))]:"maximum"in o&&n>o.maximum?[new i(e,n,"".concat(n," is greater than the maximum value ").concat(o.maximum))]:[]}},function(t,e,n){var r=n(5),i=n(14),o=i.createExpression,a=i.createPropertyExpression,s=n(12);t.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 r("".concat(t.key).concat(e.key),t.value,e.message)}):"property"===t.expressionContext&&"text-font"===t.propertyKey&&-1!==e.value._styleExpression.expression.possibleOutputs().indexOf(void 0)?[new r(t.key,t.value,\'Invalid data expression for "text-font". Output values must be contained as literals within the expression.\')]:[]}},function(t,e,n){var r=n(5),i=n(12),o=n(24),a=n(38),s=n(70),u=n(72),l=n(16),c=n(22);t.exports=function(t){var e=[],n=t.value,f=t.key,h=t.style,p=t.styleSpec;n.type||n.ref||e.push(new r(f,n,\'either "type" or "ref" is required\'));var y,d=i(n.type),v=i(n.ref);if(n.id)for(var m=i(n.id),g=0;g<t.arrayIndex;g++){var b=h.layers[g];i(b.id)===m&&e.push(new r(f,n.id,\'duplicate layer id "\'.concat(n.id,\'", previously used at line \').concat(b.id.__line__)))}if("ref"in n)["type","source","source-layer","filter","layout"].forEach(function(t){t in n&&e.push(new r(f,n[t],\'"\'.concat(t,\'" is prohibited for ref layers\')))}),h.layers.forEach(function(t){i(t.id)===v&&(y=t)}),y?y.ref?e.push(new r(f,n.ref,"ref cannot reference another ref layer")):d=i(y.type):e.push(new r(f,n.ref,\'ref layer "\'.concat(v,\'" not found\')));else if("background"!==d)if(n.source){var x=h.sources&&h.sources[n.source],w=x&&i(x.type);x?"vector"===w&&"raster"===d?e.push(new r(f,n.source,\'layer "\'.concat(n.id,\'" requires a raster source\'))):"raster"===w&&"raster"!==d?e.push(new r(f,n.source,\'layer "\'.concat(n.id,\'" requires a vector source\'))):"vector"!==w||n["source-layer"]?"raster-dem"===w&&"hillshade"!==d&&e.push(new r(f,n.source,"raster-dem source can only be used with layer type \'hillshade\'.")):e.push(new r(f,n,\'layer "\'.concat(n.id,\'" must specify a "source-layer"\'))):e.push(new r(f,n.source,\'source "\'.concat(n.source,\'" not found\')))}else e.push(new r(f,n,\'missing required property "source"\'));return e=e.concat(o({key:f,value:n,valueSpec:p.layer,style:t.style,styleSpec:t.styleSpec,objectElementValidators:{"*":function(){return[]},type:function(){return l({key:"".concat(f,".type"),value:n.type,valueSpec:p.layer.type,style:t.style,styleSpec:t.styleSpec,object:n,objectKey:"type"})},filter:a,layout:function(t){return o({layer:n,key:t.key,value:t.value,style:t.style,styleSpec:t.styleSpec,objectElementValidators:{"*":function(t){return u(c({layerType:d},t))}}})},paint:function(t){return o({layer:n,key:t.key,value:t.value,style:t.style,styleSpec:t.styleSpec,objectElementValidators:{"*":function(t){return s(c({layerType:d},t))}}})}}}))}},function(t,e,n){var r=n(71);t.exports=function(t){return r(t,"paint")}},function(t,e,n){var r=n(16),i=n(5),o=n(7),a=n(35).isFunction,s=n(12);t.exports=function(t,e){var n=t.key,u=t.style,l=t.styleSpec,c=t.value,f=t.objectKey,h=l["".concat(e,"_").concat(t.layerType)];if(!h)return[];var p=f.match(/^(.*)-transition$/);if("paint"===e&&p&&h[p[1]]&&h[p[1]].transition)return r({key:n,value:c,valueSpec:l.transition,style:u,styleSpec:l});var y,d=t.valueSpec||h[f];if(!d)return[new i(n,c,\'unknown property "\'.concat(f,\'"\'))];if("string"===o(c)&&d["property-function"]&&!d.tokens&&(y=/^{([^}]+)}$/.exec(c)))return[new i(n,c,\'"\'.concat(f,\'" does not support interpolation syntax\\n\')+\'Use an identity property function instead: `{ "type": "identity", "property": \'.concat(JSON.stringify(y[1])," }`."))];var v=[];return"symbol"===t.layerType&&("text-field"===f&&u&&!u.glyphs&&v.push(new i(n,c,\'use of "text-field" requires a style "glyphs" property\')),"text-font"===f&&a(s.deep(c))&&"identity"===s(c.type)&&v.push(new i(n,c,\'"text-font" does not support identity functions\'))),v.concat(r({key:t.key,value:c,valueSpec:d,style:u,styleSpec:l,expressionContext:"property",propertyKey:f}))}},function(t,e,n){var r=n(71);t.exports=function(t){return r(t,"layout")}},function(t,e,n){var r=n(5),i=n(12),o=n(24),a=n(37);t.exports=function(t){var e=t.value,n=t.key,s=t.styleSpec,u=t.style;if(!e.type)return[new r(n,e,\'"type" is required\')];var l=i(e.type),c=[];switch(l){case"vector":case"raster":case"raster-dem":if(c=c.concat(o({key:n,value:e,valueSpec:s["source_".concat(l.replace("-","_"))],style:t.style,styleSpec:s})),"url"in e)for(var f in e)["type","url","tileSize"].indexOf(f)<0&&c.push(new r("".concat(n,".").concat(f),e[f],\'a source with a "url" property may not include a "\'.concat(f,\'" property\')));return c;case"geojson":return o({key:n,value:e,valueSpec:s.source_geojson,style:u,styleSpec:s});case"video":return o({key:n,value:e,valueSpec:s.source_video,style:u,styleSpec:s});case"image":return o({key:n,value:e,valueSpec:s.source_image,style:u,styleSpec:s});case"canvas":return o({key:n,value:e,valueSpec:s.source_canvas,style:u,styleSpec:s});default:return a({key:"".concat(n,".type"),value:e.type,valueSpec:{values:["vector","raster","raster-dem","geojson","video","image","canvas"]},style:u,styleSpec:s})}}},function(t,e,n){var r=n(5),i=n(7),o=n(16);t.exports=function(t){var e=t.value,n=t.styleSpec,a=n.light,s=t.style,u=[],l=i(e);if(void 0===e)return u;if("object"!==l)return u=u.concat([new r("light",e,"object expected, ".concat(l," found"))]);for(var c in e){var f=c.match(/^(.*)-transition$/);u=f&&a[f[1]]&&a[f[1]].transition?u.concat(o({key:c,value:e[c],valueSpec:n.transition,style:s,styleSpec:n})):a[c]?u.concat(o({key:c,value:e[c],valueSpec:a[c],style:s,styleSpec:n})):u.concat([new r(c,e[c],\'unknown property "\'.concat(c,\'"\'))])}return u}},function(t,e,n){var r=n(7),i=n(5);t.exports=function(t){var e=t.value,n=t.key,o=r(e);return"string"!==o?[new i(n,e,"string expected, ".concat(o," found"))]:[]}},function(t,e,n){function r(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,r.key,r)}}var i=n(2);function o(t,e,n){n[t]=n[t]||[],n[t].push(e)}function a(t,e,n){if(n&&n[t]){var r=n[t].indexOf(e);-1!==r&&n[t].splice(r,1)}}var s=function(){function t(){!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,t)}var e,n,s;return e=t,(n=[{key:"on",value:function(t,e){return this._listeners=this._listeners||{},o(t,e,this._listeners),this}},{key:"off",value:function(t,e){return a(t,e,this._listeners),a(t,e,this._oneTimeListeners),this}},{key:"once",value:function(t,e){return this._oneTimeListeners=this._oneTimeListeners||{},o(t,e,this._oneTimeListeners),this}},{key:"fire",value:function(t,e){if(this.listens(t)){e=i.extend({},e,{type:t,target:this});var n=this._listeners&&this._listeners[t]?this._listeners[t].slice():[],r=!0,o=!1,s=void 0;try{for(var u,l=n[Symbol.iterator]();!(r=(u=l.next()).done);r=!0){u.value.call(this,e)}}catch(t){o=!0,s=t}finally{try{r||null==l.return||l.return()}finally{if(o)throw s}}var c=this._oneTimeListeners&&this._oneTimeListeners[t]?this._oneTimeListeners[t].slice():[],f=!0,h=!1,p=void 0;try{for(var y,d=c[Symbol.iterator]();!(f=(y=d.next()).done);f=!0){var v=y.value;a(t,v,this._oneTimeListeners),v.call(this,e)}}catch(t){h=!0,p=t}finally{try{f||null==d.return||d.return()}finally{if(h)throw p}}this._eventedParent&&this._eventedParent.fire(t,i.extend({},e,"function"==typeof this._eventedParentData?this._eventedParentData():this._eventedParentData))}else i.endsWith(t,"error")&&console.error(e&&e.error||e||"Empty error event");return this}},{key:"listens",value: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)}},{key:"setEventedParent",value:function(t,e){return this._eventedParent=t,this._eventedParentData=e,this}}])&&r(e.prototype,n),s&&r(e,s),t}();t.exports=s},function(t,e,n){function r(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,r.key,r)}}var i=n(10).CircleLayoutArray,o=n(109).members,a=n(25).SegmentVector,s=n(26).ProgramConfigurationSet,u=n(27).TriangleIndexArray,l=n(20),c=n(18),f=n(3).register;function h(t,e,n,r,i){t.emplaceBack(2*e+(r+1)/2,2*n+(i+1)/2)}var p=function(){function t(e){!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,t),this.zoom=e.zoom,this.overscaling=e.overscaling,this.layers=e.layers,this.layerIds=this.layers.map(function(t){return t.id}),this.index=e.index,this.layoutVertexArray=new i,this.indexArray=new u,this.segments=new a,this.programConfigurations=new s(o,e.layers,e.zoom)}var e,n,f;return e=t,(n=[{key:"populate",value:function(t,e){var n=!0,r=!1,i=void 0;try{for(var o,a=t[Symbol.iterator]();!(n=(o=a.next()).done);n=!0){var s=o.value,u=s.feature,c=s.index,f=s.sourceLayerIndex;if(this.layers[0]._featureFilter({zoom:this.zoom},u)){var h=l(u);this.addFeature(u,h),e.featureIndex.insert(u,h,c,f,this.index)}}}catch(t){r=!0,i=t}finally{try{n||null==a.return||a.return()}finally{if(r)throw i}}}},{key:"isEmpty",value:function(){return 0===this.layoutVertexArray.length}},{key:"upload",value:function(t){this.layoutVertexBuffer=t.createVertexBuffer(this.layoutVertexArray,o),this.indexBuffer=t.createIndexBuffer(this.indexArray),this.programConfigurations.upload(t)}},{key:"destroy",value:function(){this.layoutVertexBuffer&&(this.layoutVertexBuffer.destroy(),this.indexBuffer.destroy(),this.programConfigurations.destroy(),this.segments.destroy())}},{key:"addFeature",value:function(t,e){var n=!0,r=!1,i=void 0;try{for(var o,a=e[Symbol.iterator]();!(n=(o=a.next()).done);n=!0){var s=o.value,u=!0,l=!1,f=void 0;try{for(var p,y=s[Symbol.iterator]();!(u=(p=y.next()).done);u=!0){var d=p.value,v=d.x,m=d.y;if(!(v<0||v>=c||m<0||m>=c)){var g=this.segments.prepareSegment(4,this.layoutVertexArray,this.indexArray),b=g.vertexLength;h(this.layoutVertexArray,v,m,-1,-1),h(this.layoutVertexArray,v,m,1,-1),h(this.layoutVertexArray,v,m,1,1),h(this.layoutVertexArray,v,m,-1,1),this.indexArray.emplaceBack(b,b+1,b+2),this.indexArray.emplaceBack(b,b+3,b+2),g.vertexLength+=4,g.primitiveLength+=2}}}catch(t){l=!0,f=t}finally{try{u||null==y.return||y.return()}finally{if(l)throw f}}}}catch(t){r=!0,i=t}finally{try{n||null==a.return||a.return()}finally{if(r)throw i}}this.programConfigurations.populatePaintArrays(this.layoutVertexArray.length,t)}}])&&r(e.prototype,n),f&&r(e,f),t}();f("CircleBucket",p,{omit:["layers"]}),t.exports=p},function(t,e,n){"use strict";function r(t,e,n){n=n||2;var r,s,u,l,c,p,d,v=e&&e.length,m=v?e[0]*n:t.length,g=i(t,0,m,n,!0),b=[];if(!g||g.next===g.prev)return b;if(v&&(g=function(t,e,n,r){var a,s,u,l,c,p=[];for(a=0,s=e.length;a<s;a++)u=e[a]*r,l=a<s-1?e[a+1]*r:t.length,(c=i(t,u,l,r,!1))===c.next&&(c.steiner=!0),p.push(y(c));for(p.sort(f),a=0;a<p.length;a++)h(p[a],n),n=o(n,n.next);return n}(t,e,g,n)),t.length>80*n){r=u=t[0],s=l=t[1];for(var x=n;x<m;x+=n)(c=t[x])<r&&(r=c),(p=t[x+1])<s&&(s=p),c>u&&(u=c),p>l&&(l=p);d=0!==(d=Math.max(u-r,l-s))?1/d:0}return a(g,b,n,r,s,d),b}function i(t,e,n,r,i){var o,a;if(i===A(t,e,n,r)>0)for(o=e;o<n;o+=r)a=k(o,t[o],t[o+1],a);else for(o=n-r;o>=e;o-=r)a=k(o,t[o],t[o+1],a);return a&&g(a,a.next)&&(_(a),a=a.next),a}function o(t,e){if(!t)return t;e||(e=t);var n,r=t;do{if(n=!1,r.steiner||!g(r,r.next)&&0!==m(r.prev,r,r.next))r=r.next;else{if(_(r),(r=e=r.prev)===r.next)break;n=!0}}while(n||r!==e);return e}function a(t,e,n,r,i,f,h){if(t){!h&&f&&function(t,e,n,r){var i=t;do{null===i.z&&(i.z=p(i.x,i.y,e,n,r)),i.prevZ=i.prev,i.nextZ=i.next,i=i.next}while(i!==t);i.prevZ.nextZ=null,i.prevZ=null,function(t){var e,n,r,i,o,a,s,u,l=1;do{for(n=t,t=null,o=null,a=0;n;){for(a++,r=n,s=0,e=0;e<l&&(s++,r=r.nextZ);e++);for(u=l;s>0||u>0&&r;)0!==s&&(0===u||!r||n.z<=r.z)?(i=n,n=n.nextZ,s--):(i=r,r=r.nextZ,u--),o?o.nextZ=i:t=i,i.prevZ=o,o=i;n=r}o.nextZ=null,l*=2}while(a>1)}(i)}(t,r,i,f);for(var y,d,v=t;t.prev!==t.next;)if(y=t.prev,d=t.next,f?u(t,r,i,f):s(t))e.push(y.i/n),e.push(t.i/n),e.push(d.i/n),_(t),t=d.next,v=d.next;else if((t=d)===v){h?1===h?a(t=l(t,e,n),e,n,r,i,f,2):2===h&&c(t,e,n,r,i,f):a(o(t),e,n,r,i,f,1);break}}}function s(t){var e=t.prev,n=t,r=t.next;if(m(e,n,r)>=0)return!1;for(var i=t.next.next;i!==t.prev;){if(d(e.x,e.y,n.x,n.y,r.x,r.y,i.x,i.y)&&m(i.prev,i,i.next)>=0)return!1;i=i.next}return!0}function u(t,e,n,r){var i=t.prev,o=t,a=t.next;if(m(i,o,a)>=0)return!1;for(var s=i.x<o.x?i.x<a.x?i.x:a.x:o.x<a.x?o.x:a.x,u=i.y<o.y?i.y<a.y?i.y:a.y:o.y<a.y?o.y:a.y,l=i.x>o.x?i.x>a.x?i.x:a.x:o.x>a.x?o.x:a.x,c=i.y>o.y?i.y>a.y?i.y:a.y:o.y>a.y?o.y:a.y,f=p(s,u,e,n,r),h=p(l,c,e,n,r),y=t.prevZ,v=t.nextZ;y&&y.z>=f&&v&&v.z<=h;){if(y!==t.prev&&y!==t.next&&d(i.x,i.y,o.x,o.y,a.x,a.y,y.x,y.y)&&m(y.prev,y,y.next)>=0)return!1;if(y=y.prevZ,v!==t.prev&&v!==t.next&&d(i.x,i.y,o.x,o.y,a.x,a.y,v.x,v.y)&&m(v.prev,v,v.next)>=0)return!1;v=v.nextZ}for(;y&&y.z>=f;){if(y!==t.prev&&y!==t.next&&d(i.x,i.y,o.x,o.y,a.x,a.y,y.x,y.y)&&m(y.prev,y,y.next)>=0)return!1;y=y.prevZ}for(;v&&v.z<=h;){if(v!==t.prev&&v!==t.next&&d(i.x,i.y,o.x,o.y,a.x,a.y,v.x,v.y)&&m(v.prev,v,v.next)>=0)return!1;v=v.nextZ}return!0}function l(t,e,n){var r=t;do{var i=r.prev,o=r.next.next;!g(i,o)&&b(i,r,r.next,o)&&x(i,o)&&x(o,i)&&(e.push(i.i/n),e.push(r.i/n),e.push(o.i/n),_(r),_(r.next),r=t=o),r=r.next}while(r!==t);return r}function c(t,e,n,r,i,s){var u=t;do{for(var l=u.next.next;l!==u.prev;){if(u.i!==l.i&&v(u,l)){var c=w(u,l);return u=o(u,u.next),c=o(c,c.next),a(u,e,n,r,i,s),void a(c,e,n,r,i,s)}l=l.next}u=u.next}while(u!==t)}function f(t,e){return t.x-e.x}function h(t,e){if(e=function(t,e){var n,r=e,i=t.x,o=t.y,a=-1/0;do{if(o<=r.y&&o>=r.next.y&&r.next.y!==r.y){var s=r.x+(o-r.y)*(r.next.x-r.x)/(r.next.y-r.y);if(s<=i&&s>a){if(a=s,s===i){if(o===r.y)return r;if(o===r.next.y)return r.next}n=r.x<r.next.x?r:r.next}}r=r.next}while(r!==e);if(!n)return null;if(i===a)return n.prev;var u,l=n,c=n.x,f=n.y,h=1/0;r=n.next;for(;r!==l;)i>=r.x&&r.x>=c&&i!==r.x&&d(o<f?i:a,o,c,f,o<f?a:i,o,r.x,r.y)&&((u=Math.abs(o-r.y)/(i-r.x))<h||u===h&&r.x>n.x)&&x(r,t)&&(n=r,h=u),r=r.next;return n}(t,e)){var n=w(e,t);o(n,n.next)}}function p(t,e,n,r,i){return(t=1431655765&((t=858993459&((t=252645135&((t=16711935&((t=32767*(t-n)*i)|t<<8))|t<<4))|t<<2))|t<<1))|(e=1431655765&((e=858993459&((e=252645135&((e=16711935&((e=32767*(e-r)*i)|e<<8))|e<<4))|e<<2))|e<<1))<<1}function y(t){var e=t,n=t;do{(e.x<n.x||e.x===n.x&&e.y<n.y)&&(n=e),e=e.next}while(e!==t);return n}function d(t,e,n,r,i,o,a,s){return(i-a)*(e-s)-(t-a)*(o-s)>=0&&(t-a)*(r-s)-(n-a)*(e-s)>=0&&(n-a)*(o-s)-(i-a)*(r-s)>=0}function v(t,e){return t.next.i!==e.i&&t.prev.i!==e.i&&!function(t,e){var n=t;do{if(n.i!==t.i&&n.next.i!==t.i&&n.i!==e.i&&n.next.i!==e.i&&b(n,n.next,t,e))return!0;n=n.next}while(n!==t);return!1}(t,e)&&x(t,e)&&x(e,t)&&function(t,e){var n=t,r=!1,i=(t.x+e.x)/2,o=(t.y+e.y)/2;do{n.y>o!=n.next.y>o&&n.next.y!==n.y&&i<(n.next.x-n.x)*(o-n.y)/(n.next.y-n.y)+n.x&&(r=!r),n=n.next}while(n!==t);return r}(t,e)}function m(t,e,n){return(e.y-t.y)*(n.x-e.x)-(e.x-t.x)*(n.y-e.y)}function g(t,e){return t.x===e.x&&t.y===e.y}function b(t,e,n,r){return!!(g(t,e)&&g(n,r)||g(t,r)&&g(n,e))||m(t,e,n)>0!=m(t,e,r)>0&&m(n,r,t)>0!=m(n,r,e)>0}function x(t,e){return m(t.prev,t,t.next)<0?m(t,e,t.next)>=0&&m(t,t.prev,e)>=0:m(t,e,t.prev)<0||m(t,t.next,e)<0}function w(t,e){var n=new S(t.i,t.x,t.y),r=new S(e.i,e.x,e.y),i=t.next,o=e.prev;return t.next=e,e.prev=t,n.next=i,i.prev=n,r.next=n,n.prev=r,o.next=r,r.prev=o,r}function k(t,e,n,r){var i=new S(t,e,n);return r?(i.next=r.next,i.prev=r,r.next.prev=i,r.next=i):(i.prev=i,i.next=i),i}function _(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 S(t,e,n){this.i=t,this.x=e,this.y=n,this.prev=null,this.next=null,this.z=null,this.prevZ=null,this.nextZ=null,this.steiner=!1}function A(t,e,n,r){for(var i=0,o=e,a=n-r;o<n;o+=r)i+=(t[a]-t[o])*(t[o+1]+t[a+1]),a=o;return i}t.exports=r,t.exports.default=r,r.deviation=function(t,e,n,r){var i=e&&e.length,o=i?e[0]*n:t.length,a=Math.abs(A(t,0,o,n));if(i)for(var s=0,u=e.length;s<u;s++){var l=e[s]*n,c=s<u-1?e[s+1]*n:t.length;a-=Math.abs(A(t,l,c,n))}var f=0;for(s=0;s<r.length;s+=3){var h=r[s]*n,p=r[s+1]*n,y=r[s+2]*n;f+=Math.abs((t[h]-t[y])*(t[p+1]-t[h+1])-(t[h]-t[p])*(t[y+1]-t[h+1]))}return 0===a&&0===f?0:Math.abs((f-a)/a)},r.flatten=function(t){for(var e=t[0][0].length,n={vertices:[],holes:[],dimensions:e},r=0,i=0;i<t.length;i++){for(var o=0;o<t[i].length;o++)for(var a=0;a<e;a++)n.vertices.push(t[i][o][a]);i>0&&(r+=t[i-1].length,n.holes.push(r))}return n}},function(t,e,n){"use strict";var r=n(80);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(o,this,e),this.length=this._features.length}function o(t,e,n){15===t?e.version=n.readVarint():1===t?e.name=n.readString():5===t?e.extent=n.readVarint():2===t?e._features.push(n.pos):3===t?e._keys.push(n.readString()):4===t&&e._values.push(function(t){var e=null,n=t.readVarint()+t.pos;for(;t.pos<n;){var r=t.readVarint()>>3;e=1===r?t.readString():2===r?t.readFloat():3===r?t.readDouble():4===r?t.readVarint64():5===r?t.readVarint():6===r?t.readSVarint():7===r?t.readBoolean():null}return e}(n))}t.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 r(this._pbf,e,this.extent,this._keys,this._values)}},function(t,e,n){"use strict";var r=n(6);function i(t,e,n,r,i){this.properties={},this.extent=n,this.type=0,this._pbf=t,this._geometry=-1,this._keys=r,this._values=i,t.readFields(o,this,e)}function o(t,e,n){1==t?e.id=n.readVarint():2==t?function(t,e){var n=t.readVarint()+t.pos;for(;t.pos<n;){var r=e._keys[t.readVarint()],i=e._values[t.readVarint()];e.properties[r]=i}}(n,e):3==t?e.type=n.readVarint():4==t&&(e._geometry=n.pos)}function a(t){for(var e,n,r=0,i=0,o=t.length,a=o-1;i<o;a=i++)e=t[i],r+=((n=t[a]).x-e.x)*(e.y+n.y);return r}t.exports=i,i.types=["Unknown","Point","LineString","Polygon"],i.prototype.loadGeometry=function(){var t=this._pbf;t.pos=this._geometry;for(var e,n=t.readVarint()+t.pos,i=1,o=0,a=0,s=0,u=[];t.pos<n;){if(o<=0){var l=t.readVarint();i=7&l,o=l>>3}if(o--,1===i||2===i)a+=t.readSVarint(),s+=t.readSVarint(),1===i&&(e&&u.push(e),e=[]),e.push(new r(a,s));else{if(7!==i)throw new Error("unknown command "+i);e&&e.push(e[0].clone())}}return e&&u.push(e),u},i.prototype.bbox=function(){var t=this._pbf;t.pos=this._geometry;for(var e=t.readVarint()+t.pos,n=1,r=0,i=0,o=0,a=1/0,s=-1/0,u=1/0,l=-1/0;t.pos<e;){if(r<=0){var c=t.readVarint();n=7&c,r=c>>3}if(r--,1===n||2===n)(i+=t.readSVarint())<a&&(a=i),i>s&&(s=i),(o+=t.readSVarint())<u&&(u=o),o>l&&(l=o);else if(7!==n)throw new Error("unknown command "+n)}return[a,u,s,l]},i.prototype.toGeoJSON=function(t,e,n){var r,o,s=this.extent*Math.pow(2,n),u=this.extent*t,l=this.extent*e,c=this.loadGeometry(),f=i.types[this.type];function h(t){for(var e=0;e<t.length;e++){var n=t[e],r=180-360*(n.y+l)/s;t[e]=[360*(n.x+u)/s-180,360/Math.PI*Math.atan(Math.exp(r*Math.PI/180))-90]}}switch(this.type){case 1:var p=[];for(r=0;r<c.length;r++)p[r]=c[r][0];h(c=p);break;case 2:for(r=0;r<c.length;r++)h(c[r]);break;case 3:for(c=function(t){var e=t.length;if(e<=1)return[t];for(var n,r,i=[],o=0;o<e;o++){var s=a(t[o]);0!==s&&(void 0===r&&(r=s<0),r===s<0?(n&&i.push(n),n=[t[o]]):n.push(t[o]))}n&&i.push(n);return i}(c),r=0;r<c.length;r++)for(o=0;o<c[r].length;o++)h(c[r][o])}1===c.length?c=c[0]:f="Multi"+f;var y={type:"Feature",geometry:{type:f,coordinates:c},properties:this.properties};return"id"in this&&(y.id=this.id),y}},function(t,e,n){var r=n(31);t.exports=function(e){for(var n="",i=0;i<e.length;i++){var o=e.charCodeAt(i+1)||null,a=e.charCodeAt(i-1)||null;(!o||!r.charHasRotatedVerticalOrientation(o)||t.exports.lookup[e[i+1]])&&(!a||!r.charHasRotatedVerticalOrientation(a)||t.exports.lookup[e[i-1]])&&t.exports.lookup[e[i]]?n+=t.exports.lookup[e[i]]:n+=e[i]}return n},t.exports.lookup={"!":"︕","#":"#",$:"$","%":"%","&":"&","(":"︵",")":"︶","*":"*","+":"+",",":"︐","-":"︲",".":"・","/":"/",":":"︓",";":"︔","<":"︿","=":"=",">":"﹀","?":"︖","@":"@","[":"﹇","\\\\":"\","]":"﹈","^":"^",_:"︳","`":"`","{":"︷","|":"―","}":"︸","~":"~","¢":"¢","£":"£","¥":"¥","¦":"¦","¬":"¬","¯":" ̄","–":"︲","—":"︱","‘":"﹃","’":"﹄","“":"﹁","”":"﹂","…":"︙","‧":"・","₩":"₩","、":"︑","。":"︒","〈":"︿","〉":"﹀","《":"︽","》":"︾","「":"﹁","」":"﹂","『":"﹃","』":"﹄","【":"︻","】":"︼","〔":"︹","〕":"︺","〖":"︗","〗":"︘","!":"︕","(":"︵",")":"︶",",":"︐","-":"︲",".":"・",":":"︓",";":"︔","<":"︿",">":"﹀","?":"︖","[":"﹇","]":"﹈","_":"︳","{":"︷","|":"―","}":"︸","⦅":"︵","⦆":"︶","。":"︒","「":"﹁","」":"﹂"}},function(t,e,n){function r(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,r.key,r)}}var i=n(44),o=n(21),a=n(32),s=n(147),u=n(2);function l(t,e){var n=i.getArrayBuffer(t.request,function(t,n){t?e(t):n&&e(null,{vectorTile:new o.VectorTile(new a(n.data)),rawData:n.data,cacheControl:n.cacheControl,expires:n.expires})});return function(){n.abort(),e()}}var c=function(){function t(e,n,r){!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,t),this.actor=e,this.layerIndex=n,this.loadVectorData=r||l,this.loading={},this.loaded={}}var e,n,i;return e=t,(n=[{key:"loadTile",value:function(t,e){var n=this,r=t.source,i=t.uid;this.loading[r]||(this.loading[r]={});var o=this.loading[r][i]=new s(t);o.abort=this.loadVectorData(t,function(t,a){if(delete n.loading[r][i],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,n.layerIndex,n.actor,function(t,n){if(t||!n)return e(t);e(null,u.extend({rawTileData:s.slice(0)},n,l))}),n.loaded[r]=n.loaded[r]||{},n.loaded[r][i]=o})}},{key:"reloadTile",value:function(t,e){var n=this.loaded[t.source],r=t.uid,i=this;if(n&&n[r]){var o=n[r];o.showCollisionBoxes=t.showCollisionBoxes,"parsing"===o.status?o.reloadCallback=a.bind(o):"done"===o.status&&o.parse(o.vectorTile,this.layerIndex,this.actor,a.bind(o))}function a(t,n){if(this.reloadCallback){var r=this.reloadCallback;delete this.reloadCallback,this.parse(this.vectorTile,i.layerIndex,i.actor,r)}e(t,n)}}},{key:"abortTile",value:function(t,e){var n=this.loading[t.source],r=t.uid;n&&n[r]&&n[r].abort&&(n[r].abort(),delete n[r]),e()}},{key:"removeTile",value:function(t,e){var n=this.loaded[t.source],r=t.uid;n&&n[r]&&delete n[r],e()}}])&&r(e.prototype,n),i&&r(e,i),t}();t.exports=c},function(t,e,n){function r(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,r.key,r)}}var i=n(0),o=function(){function t(e){!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,t),this._stringToNumber={},this._numberToString=[];for(var n=0;n<e.length;n++){var r=e[n];this._stringToNumber[r]=n,this._numberToString[n]=r}}var e,n,o;return e=t,(n=[{key:"encode",value:function(t){return i(t in this._stringToNumber),this._stringToNumber[t]}},{key:"decode",value:function(t){return i(t<this._numberToString.length),this._numberToString[t]}}])&&r(e.prototype,n),o&&r(e,o),t}();t.exports=o},function(t,e,n){function r(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function i(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,r.key,r)}}function o(t,e,n){return e&&i(t.prototype,e),n&&i(t,n),t}var a=n(150),s=n(0),u=n(3).register,l=n(47),c=function(){function t(e,n,i){r(this,t),s(e>=0&&e<=25),s(n>=0&&n<Math.pow(2,e)),s(i>=0&&i<Math.pow(2,e)),this.z=e,this.x=n,this.y=i,this.key=p(0,e,n,i)}return o(t,[{key:"equals",value:function(t){return this.z===t.z&&this.x===t.x&&this.y===t.y}},{key:"url",value:function(t,e){var n=a.getTileBBox(this.x,this.y,this.z),r=function(t,e,n){for(var r,i="",o=t;o>0;o--)i+=(e&(r=1<<o-1)?1:0)+(n&r?2:0);return i}(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(this.z)).replace("{x}",String(this.x)).replace("{y}",String("tms"===e?Math.pow(2,this.z)-this.y-1:this.y)).replace("{quadkey}",r).replace("{bbox-epsg-3857}",n)}}]),t}(),f=function t(e,n,i){r(this,t),this.wrap=e,this.canonical=n,this.key=p(e,n.z,n.x,n.y),this.posMatrix=i},h=function(){function t(e,n,i,o,a){r(this,t),s(e>=i),this.overscaledZ=e,this.wrap=n,this.canonical=new c(i,+o,+a),this.key=p(n,e,o,a)}return o(t,[{key:"scaledTo",value:function(e){s(e<=this.overscaledZ);var n=this.canonical.z-e;return e>this.canonical.z?new t(e,this.wrap,this.canonical.z,this.canonical.x,this.canonical.y):new t(e,this.wrap,e,this.canonical.x>>n,this.canonical.y>>n)}},{key:"isChildOf",value:function(t){var e=this.canonical.z-t.canonical.z;return 0===t.overscaledZ||t.overscaledZ<this.overscaledZ&&t.canonical.x===this.canonical.x>>e&&t.canonical.y===this.canonical.y>>e}},{key:"children",value:function(e){if(this.overscaledZ>=e)return[new t(this.overscaledZ+1,this.wrap,this.canonical.z,this.canonical.x,this.canonical.y)];var n=this.canonical.z+1,r=2*this.canonical.x,i=2*this.canonical.y;return[new t(n,this.wrap,n,r,i),new t(n,this.wrap,n,r+1,i),new t(n,this.wrap,n,r,i+1),new t(n,this.wrap,n,r+1,i+1)]}},{key:"isLessThan",value:function(t){return this.wrap<t.wrap||!(this.wrap>t.wrap)&&(this.overscaledZ<t.overscaledZ||!(this.overscaledZ>t.overscaledZ)&&(this.canonical.x<t.canonical.x||!(this.canonical.x>t.canonical.x)&&this.canonical.y<t.canonical.y))}},{key:"wrapped",value:function(){return new t(this.overscaledZ,0,this.canonical.z,this.canonical.x,this.canonical.y)}},{key:"overscaleFactor",value:function(){return Math.pow(2,this.overscaledZ-this.canonical.z)}},{key:"toUnwrapped",value:function(){return new f(this.wrap,this.canonical,this.posMatrix)}},{key:"toString",value:function(){return"".concat(this.overscaledZ,"/").concat(this.canonical.x,"/").concat(this.canonical.y)}},{key:"toCoordinate",value:function(){return new l(this.canonical.x+Math.pow(2,this.wrap),this.canonical.y,this.canonical.z)}}]),t}();function p(t,e,n,r){(t*=2)<0&&(t=-1*t-1);var i=1<<e;return 32*(i*i*t+i*r+n)+e}u("CanonicalTileID",c),u("OverscaledTileID",h,{omit:["posMatrix"]}),t.exports={CanonicalTileID:c,OverscaledTileID:h,UnwrappedTileID:f}},function(t,e,n){t.exports=function(){function t(t,e,n){n=n||{},this.w=t||64,this.h=e||64,this.autoResize=!!n.autoResize,this.shelves=[],this.freebins=[],this.stats={},this.bins={},this.maxId=0}function e(t,e,n){this.x=0,this.y=t,this.w=this.free=e,this.h=n}function n(t,e,n,r,i,o,a){this.id=t,this.x=e,this.y=n,this.w=r,this.h=i,this.maxw=o||r,this.maxh=a||i,this.refcount=0}return t.prototype.pack=function(t,e){t=[].concat(t),e=e||{};for(var n,r,i,o,a=[],s=0;s<t.length;s++)if(n=t[s].w||t[s].width,r=t[s].h||t[s].height,i=t[s].id,n&&r){if(!(o=this.packOne(n,r,i)))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,n,r){var i,o,a,s,u,l,c,f,h={freebin:-1,shelf:-1,waste:1/0},p=0;if("string"==typeof r||"number"==typeof r){if(i=this.getBin(r))return this.ref(i),i;"number"==typeof r&&(this.maxId=Math.max(r,this.maxId))}else r=++this.maxId;for(s=0;s<this.freebins.length;s++){if(n===(i=this.freebins[s]).maxh&&t===i.maxw)return this.allocFreebin(s,t,n,r);n>i.maxh||t>i.maxw||n<=i.maxh&&t<=i.maxw&&(a=i.maxw*i.maxh-t*n)<h.waste&&(h.waste=a,h.freebin=s)}for(s=0;s<this.shelves.length;s++)if(p+=(o=this.shelves[s]).h,!(t>o.free)){if(n===o.h)return this.allocShelf(s,t,n,r);n>o.h||n<o.h&&(a=(o.h-n)*t)<h.waste&&(h.freebin=-1,h.waste=a,h.shelf=s)}return-1!==h.freebin?this.allocFreebin(h.freebin,t,n,r):-1!==h.shelf?this.allocShelf(h.shelf,t,n,r):n<=this.h-p&&t<=this.w?(o=new e(p,this.w,n),this.allocShelf(this.shelves.push(o)-1,t,n,r)):this.autoResize?(u=l=this.h,((c=f=this.w)<=u||t>c)&&(f=2*Math.max(t,c)),(u<c||n>u)&&(l=2*Math.max(n,u)),this.resize(f,l),this.packOne(t,n,r)):null},t.prototype.allocFreebin=function(t,e,n,r){var i=this.freebins.splice(t,1)[0];return i.id=r,i.w=e,i.h=n,i.refcount=0,this.bins[r]=i,this.ref(i),i},t.prototype.allocShelf=function(t,e,n,r){var i=this.shelves[t].alloc(e,n,r);return this.bins[r]=i,this.ref(i),i},t.prototype.shrink=function(){if(this.shelves.length>0){for(var t=0,e=0,n=0;n<this.shelves.length;n++){var r=this.shelves[n];e+=r.h,t=Math.max(r.w-r.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 n=0;n<this.shelves.length;n++)this.shelves[n].resize(t);return!0},e.prototype.alloc=function(t,e,r){if(t>this.free||e>this.h)return null;var i=this.x;return this.x+=t,this.free-=t,new n(r,i,this.y,t,e,t,this.h)},e.prototype.resize=function(t){return this.free+=t-this.w,this.w=t,!0},t}()},function(t,e,n){function r(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,r.key,r)}}var i=n(87),o=n(101),a=n(82),s=n(164),u=n(166),l=n(0),c=n(43);new(function(){function t(e){var n=this;!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,t),this.self=e,this.actor=new i(e,this),this.layerIndexes={},this.workerSourceTypes={vector:a,geojson:u},this.workerSources={},this.demWorkerSources={},this.self.registerWorkerSource=function(t,e){if(n.workerSourceTypes[t])throw new Error(\'Worker source with name "\'.concat(t,\'" already registered.\'));n.workerSourceTypes[t]=e},this.self.registerRTLTextPlugin=function(t){if(c.applyArabicShaping||c.processBidirectionalText)throw new Error("RTL text plugin already registered.");c.applyArabicShaping=t.applyArabicShaping,c.processBidirectionalText=t.processBidirectionalText}}var e,n,f;return e=t,(n=[{key:"setLayers",value:function(t,e,n){this.getLayerIndex(t).replace(e),n()}},{key:"updateLayers",value:function(t,e,n){this.getLayerIndex(t).update(e.layers,e.removedIds),n()}},{key:"loadTile",value:function(t,e,n){l(e.type),this.getWorkerSource(t,e.type).loadTile(e,n)}},{key:"loadDEMTile",value:function(t,e,n){this.getDEMWorkerSource(t).loadTile(e,n)}},{key:"reloadTile",value:function(t,e,n){l(e.type),this.getWorkerSource(t,e.type).reloadTile(e,n)}},{key:"abortTile",value:function(t,e,n){l(e.type),this.getWorkerSource(t,e.type).abortTile(e,n)}},{key:"removeTile",value:function(t,e,n){l(e.type),this.getWorkerSource(t,e.type).removeTile(e,n)}},{key:"removeDEMTile",value:function(t,e){this.getDEMWorkerSource(t).removeTile(e)}},{key:"removeSource",value:function(t,e,n){l(e.type);var r=this.getWorkerSource(t,e.type);void 0!==r.removeSource?r.removeSource(e,n):n()}},{key:"loadWorkerSource",value:function(t,e,n){try{this.self.importScripts(e.url),n()}catch(t){n(t)}}},{key:"loadRTLTextPlugin",value:function(t,e,n){try{c.applyArabicShaping||c.processBidirectionalText||(this.self.importScripts(e),c.applyArabicShaping&&c.processBidirectionalText||n(new Error("RTL Text Plugin failed to import scripts from ".concat(e))))}catch(t){n(t)}}},{key:"getLayerIndex",value:function(t){var e=this.layerIndexes[t];return e||(e=this.layerIndexes[t]=new o),e}},{key:"getWorkerSource",value:function(t,e){var n=this;if(this.workerSources[t]||(this.workerSources[t]={}),!this.workerSources[t][e]){var r={send:function(e,r,i){n.actor.send(e,r,i,t)}};this.workerSources[t][e]=new this.workerSourceTypes[e](r,this.getLayerIndex(t))}return this.workerSources[t][e]}},{key:"getDEMWorkerSource",value:function(t){return this.demWorkerSources[t]||(this.demWorkerSources[t]=new s),this.demWorkerSources[t]}}])&&r(e.prototype,n),f&&r(e,f),t}())(self)},function(t,e,n){function r(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,r.key,r)}}var i=n(2),o=n(3),a=o.serialize,s=o.deserialize,u=function(){function t(e,n,r){!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,t),this.target=e,this.parent=n,this.mapId=r,this.callbacks={},this.callbackID=0,i.bindAll(["receive"],this),this.target.addEventListener("message",this.receive,!1)}var e,n,o;return e=t,(n=[{key:"send",value:function(t,e,n,r){var i=n?"".concat(this.mapId,":").concat(this.callbackID++):null;n&&(this.callbacks[i]=n);var o=[];this.target.postMessage({targetMapId:r,sourceMapId:this.mapId,type:t,id:String(i),data:a(e,o)},o)}},{key:"receive",value:function(t){var e,n=this,r=t.data,i=r.id;if(!r.targetMapId||this.mapId===r.targetMapId){var o=function(t,e){var r=[];n.target.postMessage({sourceMapId:n.mapId,type:"<response>",id:String(i),error:t?String(t):null,data:a(e,r)},r)};if("<response>"===r.type)e=this.callbacks[r.id],delete this.callbacks[r.id],e&&r.error?e(new Error(r.error)):e&&e(null,s(r.data));else if(void 0!==r.id&&this.parent[r.type])this.parent[r.type](r.sourceMapId,s(r.data),o);else if(void 0!==r.id&&this.parent.getWorkerSource){var u=r.type.split(".");this.parent.getWorkerSource(r.sourceMapId,u[0])[u[1]](s(r.data),o)}else this.parent[r.type](s(r.data))}}},{key:"remove",value:function(){this.target.removeEventListener("message",this.receive,!1)}}])&&r(e.prototype,n),o&&r(e,o),t}();t.exports=u},function(t,e){function n(t){return(n="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t})(t)}t.exports=function t(e,r){if(Array.isArray(e)){if(!Array.isArray(r)||e.length!==r.length)return!1;for(var i=0;i<e.length;i++)if(!t(e[i],r[i]))return!1;return!0}if("object"===n(e)&&null!==e&&null!==r){if("object"!==n(r))return!1;if(Object.keys(e).length!==Object.keys(r).length)return!1;for(var o in e)if(!t(e[o],r[o]))return!1;return!0}return e===r}},function(t,e){var n;n=function(){return this}();try{n=n||new Function("return this")()}catch(t){"object"==typeof window&&(n=window)}t.exports=n},function(t,e,n){"use strict";\n/*\nobject-assign\n(c) Sindre Sorhus\n@license MIT\n*/var r=Object.getOwnPropertySymbols,i=Object.prototype.hasOwnProperty,o=Object.prototype.propertyIsEnumerable;t.exports=function(){try{if(!Object.assign)return!1;var t=new String("abc");if(t[5]="de","5"===Object.getOwnPropertyNames(t)[0])return!1;for(var e={},n=0;n<10;n++)e["_"+String.fromCharCode(n)]=n;if("0123456789"!==Object.getOwnPropertyNames(e).map(function(t){return e[t]}).join(""))return!1;var r={};return"abcdefghijklmnopqrst".split("").forEach(function(t){r[t]=t}),"abcdefghijklmnopqrst"===Object.keys(Object.assign({},r)).join("")}catch(t){return!1}}()?Object.assign:function(t,e){for(var n,a,s=function(t){if(null==t)throw new TypeError("Object.assign cannot be called with null or undefined");return Object(t)}(t),u=1;u<arguments.length;u++){for(var l in n=Object(arguments[u]))i.call(n,l)&&(s[l]=n[l]);if(r){a=r(n);for(var c=0;c<a.length;c++)o.call(n,a[c])&&(s[a[c]]=n[a[c]])}}return s}},function(t,e,n){(function(t){var r=Object.getOwnPropertyDescriptors||function(t){for(var e=Object.keys(t),n={},r=0;r<e.length;r++)n[e[r]]=Object.getOwnPropertyDescriptor(t,e[r]);return n},i=/%[sdj%]/g;e.format=function(t){if(!m(t)){for(var e=[],n=0;n<arguments.length;n++)e.push(s(arguments[n]));return e.join(" ")}n=1;for(var r=arguments,o=r.length,a=String(t).replace(i,function(t){if("%%"===t)return"%";if(n>=o)return t;switch(t){case"%s":return String(r[n++]);case"%d":return Number(r[n++]);case"%j":try{return JSON.stringify(r[n++])}catch(t){return"[Circular]"}default:return t}}),u=r[n];n<o;u=r[++n])d(u)||!x(u)?a+=" "+u:a+=" "+s(u);return a},e.deprecate=function(n,r){if(void 0!==t&&!0===t.noDeprecation)return n;if(void 0===t)return function(){return e.deprecate(n,r).apply(this,arguments)};var i=!1;return function(){if(!i){if(t.throwDeprecation)throw new Error(r);t.traceDeprecation?console.trace(r):console.error(r),i=!0}return n.apply(this,arguments)}};var o,a={};function s(t,n){var r={seen:[],stylize:l};return arguments.length>=3&&(r.depth=arguments[2]),arguments.length>=4&&(r.colors=arguments[3]),y(n)?r.showHidden=n:n&&e._extend(r,n),g(r.showHidden)&&(r.showHidden=!1),g(r.depth)&&(r.depth=2),g(r.colors)&&(r.colors=!1),g(r.customInspect)&&(r.customInspect=!0),r.colors&&(r.stylize=u),c(r,t,r.depth)}function u(t,e){var n=s.styles[e];return n?"["+s.colors[n][0]+"m"+t+"["+s.colors[n][1]+"m":t}function l(t,e){return t}function c(t,n,r){if(t.customInspect&&n&&_(n.inspect)&&n.inspect!==e.inspect&&(!n.constructor||n.constructor.prototype!==n)){var i=n.inspect(r,t);return m(i)||(i=c(t,i,r)),i}var o=function(t,e){if(g(e))return t.stylize("undefined","undefined");if(m(e)){var n="\'"+JSON.stringify(e).replace(/^"|"$/g,"").replace(/\'/g,"\\\\\'").replace(/\\\\"/g,\'"\')+"\'";return t.stylize(n,"string")}if(v(e))return t.stylize(""+e,"number");if(y(e))return t.stylize(""+e,"boolean");if(d(e))return t.stylize("null","null")}(t,n);if(o)return o;var a=Object.keys(n),s=function(t){var e={};return t.forEach(function(t,n){e[t]=!0}),e}(a);if(t.showHidden&&(a=Object.getOwnPropertyNames(n)),k(n)&&(a.indexOf("message")>=0||a.indexOf("description")>=0))return f(n);if(0===a.length){if(_(n)){var u=n.name?": "+n.name:"";return t.stylize("[Function"+u+"]","special")}if(b(n))return t.stylize(RegExp.prototype.toString.call(n),"regexp");if(w(n))return t.stylize(Date.prototype.toString.call(n),"date");if(k(n))return f(n)}var l,x="",S=!1,A=["{","}"];(p(n)&&(S=!0,A=["[","]"]),_(n))&&(x=" [Function"+(n.name?": "+n.name:"")+"]");return b(n)&&(x=" "+RegExp.prototype.toString.call(n)),w(n)&&(x=" "+Date.prototype.toUTCString.call(n)),k(n)&&(x=" "+f(n)),0!==a.length||S&&0!=n.length?r<0?b(n)?t.stylize(RegExp.prototype.toString.call(n),"regexp"):t.stylize("[Object]","special"):(t.seen.push(n),l=S?function(t,e,n,r,i){for(var o=[],a=0,s=e.length;a<s;++a)j(e,String(a))?o.push(h(t,e,n,r,String(a),!0)):o.push("");return i.forEach(function(i){i.match(/^\\d+$/)||o.push(h(t,e,n,r,i,!0))}),o}(t,n,r,s,a):a.map(function(e){return h(t,n,r,s,e,S)}),t.seen.pop(),function(t,e,n){if(t.reduce(function(t,e){return 0,e.indexOf("\\n")>=0&&0,t+e.replace(/\\u001b\\[\\d\\d?m/g,"").length+1},0)>60)return n[0]+(""===e?"":e+"\\n ")+" "+t.join(",\\n  ")+" "+n[1];return n[0]+e+" "+t.join(", ")+" "+n[1]}(l,x,A)):A[0]+x+A[1]}function f(t){return"["+Error.prototype.toString.call(t)+"]"}function h(t,e,n,r,i,o){var a,s,u;if((u=Object.getOwnPropertyDescriptor(e,i)||{value:e[i]}).get?s=u.set?t.stylize("[Getter/Setter]","special"):t.stylize("[Getter]","special"):u.set&&(s=t.stylize("[Setter]","special")),j(r,i)||(a="["+i+"]"),s||(t.seen.indexOf(u.value)<0?(s=d(n)?c(t,u.value,null):c(t,u.value,n-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")),g(a)){if(o&&i.match(/^\\d+$/))return s;(a=JSON.stringify(""+i)).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 p(t){return Array.isArray(t)}function y(t){return"boolean"==typeof t}function d(t){return null===t}function v(t){return"number"==typeof t}function m(t){return"string"==typeof t}function g(t){return void 0===t}function b(t){return x(t)&&"[object RegExp]"===S(t)}function x(t){return"object"==typeof t&&null!==t}function w(t){return x(t)&&"[object Date]"===S(t)}function k(t){return x(t)&&("[object Error]"===S(t)||t instanceof Error)}function _(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)}e.debuglog=function(n){if(g(o)&&(o=t.env.NODE_DEBUG||""),n=n.toUpperCase(),!a[n])if(new RegExp("\\\\b"+n+"\\\\b","i").test(o)){var r=t.pid;a[n]=function(){var t=e.format.apply(e,arguments);console.error("%s %d: %s",n,r,t)}}else a[n]=function(){};return a[n]},e.inspect=s,s.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]},s.styles={special:"cyan",number:"yellow",boolean:"yellow",undefined:"grey",null:"bold",string:"green",date:"magenta",regexp:"red"},e.isArray=p,e.isBoolean=y,e.isNull=d,e.isNullOrUndefined=function(t){return null==t},e.isNumber=v,e.isString=m,e.isSymbol=function(t){return"symbol"==typeof t},e.isUndefined=g,e.isRegExp=b,e.isObject=x,e.isDate=w,e.isError=k,e.isFunction=_,e.isPrimitive=function(t){return null===t||"boolean"==typeof t||"number"==typeof t||"string"==typeof t||"symbol"==typeof t||void 0===t},e.isBuffer=n(93);var T=["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"];function j(t,e){return Object.prototype.hasOwnProperty.call(t,e)}e.log=function(){var t,n;console.log("%s - %s",(t=new Date,n=[A(t.getHours()),A(t.getMinutes()),A(t.getSeconds())].join(":"),[t.getDate(),T[t.getMonth()],n].join(" ")),e.format.apply(e,arguments))},e.inherits=n(94),e._extend=function(t,e){if(!e||!x(e))return t;for(var n=Object.keys(e),r=n.length;r--;)t[n[r]]=e[n[r]];return t};var O="undefined"!=typeof Symbol?Symbol("util.promisify.custom"):void 0;function z(t,e){if(!t){var n=new Error("Promise was rejected with a falsy value");n.reason=t,t=n}return e(t)}e.promisify=function(t){if("function"!=typeof t)throw new TypeError(\'The "original" argument must be of type Function\');if(O&&t[O]){var e;if("function"!=typeof(e=t[O]))throw new TypeError(\'The "util.promisify.custom" argument must be of type Function\');return Object.defineProperty(e,O,{value:e,enumerable:!1,writable:!1,configurable:!0}),e}function e(){for(var e,n,r=new Promise(function(t,r){e=t,n=r}),i=[],o=0;o<arguments.length;o++)i.push(arguments[o]);i.push(function(t,r){t?n(t):e(r)});try{t.apply(this,i)}catch(t){n(t)}return r}return Object.setPrototypeOf(e,Object.getPrototypeOf(t)),O&&Object.defineProperty(e,O,{value:e,enumerable:!1,writable:!1,configurable:!0}),Object.defineProperties(e,r(t))},e.promisify.custom=O,e.callbackify=function(e){if("function"!=typeof e)throw new TypeError(\'The "original" argument must be of type Function\');function n(){for(var n=[],r=0;r<arguments.length;r++)n.push(arguments[r]);var i=n.pop();if("function"!=typeof i)throw new TypeError("The last argument must be of type Function");var o=this,a=function(){return i.apply(o,arguments)};e.apply(this,n).then(function(e){t.nextTick(a,null,e)},function(e){t.nextTick(z,e,a)})}return Object.setPrototypeOf(n,Object.getPrototypeOf(e)),Object.defineProperties(n,r(e)),n}}).call(this,n(92))},function(t,e){var n,r,i=t.exports={};function o(){throw new Error("setTimeout has not been defined")}function a(){throw new Error("clearTimeout has not been defined")}function s(t){if(n===setTimeout)return setTimeout(t,0);if((n===o||!n)&&setTimeout)return n=setTimeout,setTimeout(t,0);try{return n(t,0)}catch(e){try{return n.call(null,t,0)}catch(e){return n.call(this,t,0)}}}!function(){try{n="function"==typeof setTimeout?setTimeout:o}catch(t){n=o}try{r="function"==typeof clearTimeout?clearTimeout:a}catch(t){r=a}}();var u,l=[],c=!1,f=-1;function h(){c&&u&&(c=!1,u.length?l=u.concat(l):f=-1,l.length&&p())}function p(){if(!c){var t=s(h);c=!0;for(var e=l.length;e;){for(u=l,l=[];++f<e;)u&&u[f].run();f=-1,e=l.length}u=null,c=!1,function(t){if(r===clearTimeout)return clearTimeout(t);if((r===a||!r)&&clearTimeout)return r=clearTimeout,clearTimeout(t);try{r(t)}catch(e){try{return r.call(null,t)}catch(e){return r.call(this,t)}}}(t)}}function y(t,e){this.fun=t,this.array=e}function d(){}i.nextTick=function(t){var e=new Array(arguments.length-1);if(arguments.length>1)for(var n=1;n<arguments.length;n++)e[n-1]=arguments[n];l.push(new y(t,e)),1!==l.length||c||s(p)},y.prototype.run=function(){this.fun.apply(null,this.array)},i.title="browser",i.browser=!0,i.env={},i.argv=[],i.version="",i.versions={},i.on=d,i.addListener=d,i.once=d,i.off=d,i.removeListener=d,i.removeAllListeners=d,i.emit=d,i.prependListener=d,i.prependOnceListener=d,i.listeners=function(t){return[]},i.binding=function(t){throw new Error("process.binding is not supported")},i.cwd=function(){return"/"},i.chdir=function(t){throw new Error("process.chdir is not supported")},i.umask=function(){return 0}},function(t,e){t.exports=function(t){return t&&"object"==typeof t&&"function"==typeof t.copy&&"function"==typeof t.fill&&"function"==typeof t.readUInt8}},function(t,e){"function"==typeof Object.create?t.exports=function(t,e){t.super_=e,t.prototype=Object.create(e.prototype,{constructor:{value:t,enumerable:!1,writable:!0,configurable:!0}})}:t.exports=function(t,e){t.super_=e;var n=function(){};n.prototype=e.prototype,t.prototype=new n,t.prototype.constructor=t}},function(t,e,n){function r(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,r.key,r)}}var i=n(4),o=i.array,a=i.ValueType,s=i.NumberType,u=n(15),l=function(){function t(e,n,r){!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,t),this.type=e,this.index=n,this.input=r}var e,n,i;return e=t,i=[{key:"parse",value:function(e,n){if(3!==e.length)return n.error("Expected 2 arguments, but found ".concat(e.length-1," instead."));var r=n.parse(e[1],1,s),i=n.parse(e[2],2,o(n.expectedType||a));return r&&i?new t(i.type.itemType,r,i):null}}],(n=[{key:"evaluate",value:function(t){var e=this.index.evaluate(t),n=this.input.evaluate(t);if(e<0||e>=n.length)throw new u("Array index out of bounds: ".concat(e," > ").concat(n.length,"."));if(e!==Math.floor(e))throw new u("Array index must be an integer, but found ".concat(e," instead."));return n[e]}},{key:"eachChild",value:function(t){t(this.index),t(this.input)}},{key:"possibleOutputs",value:function(){return[void 0]}}])&&r(e.prototype,n),i&&r(e,i),t}();t.exports=l},function(t,e,n){function r(t){return function(t){if(Array.isArray(t)){for(var e=0,n=new Array(t.length);e<t.length;e++)n[e]=t[e];return n}}(t)||function(t){if(Symbol.iterator in Object(t)||"[object Arguments]"===Object.prototype.toString.call(t))return Array.from(t)}(t)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance")}()}function i(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,r.key,r)}}var o=n(0),a=n(11).typeOf,s=function(){function t(e,n,r,i,o,a){!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,t),this.inputType=e,this.type=n,this.input=r,this.cases=i,this.outputs=o,this.otherwise=a}var e,n,s;return e=t,s=[{key:"parse",value:function(e,n){if(e.length<5)return n.error("Expected at least 4 arguments, but found only ".concat(e.length-1,"."));if(e.length%2!=1)return n.error("Expected an even number of arguments.");var r,i;n.expectedType&&"value"!==n.expectedType.kind&&(i=n.expectedType);for(var s={},u=[],l=2;l<e.length-1;l+=2){var c=e[l],f=e[l+1];Array.isArray(c)||(c=[c]);var h=n.concat(l);if(0===c.length)return h.error("Expected at least one branch label.");var p=!0,y=!1,d=void 0;try{for(var v,m=c[Symbol.iterator]();!(p=(v=m.next()).done);p=!0){var g=v.value;if("number"!=typeof g&&"string"!=typeof g)return h.error("Branch labels must be numbers or strings.");if("number"==typeof g&&Math.abs(g)>Number.MAX_SAFE_INTEGER)return h.error("Branch labels must be integers no larger than ".concat(Number.MAX_SAFE_INTEGER,"."));if("number"==typeof g&&Math.floor(g)!==g)return h.error("Numeric branch labels must be integer values.");if(r){if(h.checkSubtype(r,a(g)))return null}else r=a(g);if(void 0!==s[String(g)])return h.error("Branch labels must be unique.");s[String(g)]=u.length}}catch(t){y=!0,d=t}finally{try{p||null==m.return||m.return()}finally{if(y)throw d}}var b=n.parse(f,l,i);if(!b)return null;i=i||b.type,u.push(b)}var x=n.parse(e[1],1,r);if(!x)return null;var w=n.parse(e[e.length-1],e.length-1,i);return w?(o(r&&i),new t(r,i,x,s,u,w)):null}}],(n=[{key:"evaluate",value:function(t){var e=this.input.evaluate(t);return(this.outputs[this.cases[e]]||this.otherwise).evaluate(t)}},{key:"eachChild",value:function(t){t(this.input),this.outputs.forEach(t),t(this.otherwise)}},{key:"possibleOutputs",value:function(){var t;return(t=[]).concat.apply(t,r(this.outputs.map(function(t){return t.possibleOutputs()}))).concat(this.otherwise.possibleOutputs())}}])&&i(e.prototype,n),s&&i(e,s),t}();t.exports=s},function(t,e,n){function r(t){return function(t){if(Array.isArray(t)){for(var e=0,n=new Array(t.length);e<t.length;e++)n[e]=t[e];return n}}(t)||function(t){if(Symbol.iterator in Object(t)||"[object Arguments]"===Object.prototype.toString.call(t))return Array.from(t)}(t)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance")}()}function i(t,e){return function(t){if(Array.isArray(t))return t}(t)||function(t,e){var n=[],r=!0,i=!1,o=void 0;try{for(var a,s=t[Symbol.iterator]();!(r=(a=s.next()).done)&&(n.push(a.value),!e||n.length!==e);r=!0);}catch(t){i=!0,o=t}finally{try{r||null==s.return||s.return()}finally{if(i)throw o}}return n}(t,e)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance")}()}function o(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,r.key,r)}}var a=n(0),s=n(4).BooleanType,u=function(){function t(e,n,r){!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,t),this.type=e,this.branches=n,this.otherwise=r}var e,n,u;return e=t,u=[{key:"parse",value:function(e,n){if(e.length<4)return n.error("Expected at least 3 arguments, but found only ".concat(e.length-1,"."));if(e.length%2!=0)return n.error("Expected an odd number of arguments.");var r;n.expectedType&&"value"!==n.expectedType.kind&&(r=n.expectedType);for(var i=[],o=1;o<e.length-1;o+=2){var u=n.parse(e[o],o,s);if(!u)return null;var l=n.parse(e[o+1],o+1,r);if(!l)return null;i.push([u,l]),r=r||l.type}var c=n.parse(e[e.length-1],e.length-1,r);return c?(a(r),new t(r,i,c)):null}}],(n=[{key:"evaluate",value:function(t){var e=!0,n=!1,r=void 0;try{for(var o,a=this.branches[Symbol.iterator]();!(e=(o=a.next()).done);e=!0){var s=i(o.value,2),u=s[0],l=s[1];if(u.evaluate(t))return l.evaluate(t)}}catch(t){n=!0,r=t}finally{try{e||null==a.return||a.return()}finally{if(n)throw r}}return this.otherwise.evaluate(t)}},{key:"eachChild",value:function(t){var e=!0,n=!1,r=void 0;try{for(var o,a=this.branches[Symbol.iterator]();!(e=(o=a.next()).done);e=!0){var s=i(o.value,2),u=s[0],l=s[1];t(u),t(l)}}catch(t){n=!0,r=t}finally{try{e||null==a.return||a.return()}finally{if(n)throw r}}t(this.otherwise)}},{key:"possibleOutputs",value:function(){var t;return(t=[]).concat.apply(t,r(this.branches.map(function(t){var e=i(t,2);e[0];return e[1].possibleOutputs()}))).concat(this.otherwise.possibleOutputs())}}])&&o(e.prototype,n),u&&o(e,u),t}();t.exports=u},function(t,e,n){function r(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,r.key,r)}}var i=n(4),o=i.ValueType,a=i.BooleanType,s=n(4).toString;function u(t){return"string"===t.kind||"number"===t.kind||"boolean"===t.kind||"null"===t.kind}function l(t){return function(){function e(t,n){!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,e),this.type=a,this.lhs=t,this.rhs=n}var n,i,l;return n=e,l=[{key:"parse",value:function(t,n){if(3!==t.length)return n.error("Expected two arguments.");var r=n.parse(t[1],1,o);if(!r)return null;var i=n.parse(t[2],2,o);return i?u(r.type)||u(i.type)?r.type.kind!==i.type.kind&&"value"!==r.type.kind&&"value"!==i.type.kind?n.error("Cannot compare ".concat(s(r.type)," and ").concat(s(i.type),".")):new e(r,i):n.error("Expected at least one argument to be a string, number, boolean, or null, but found (".concat(s(r.type),", ").concat(s(i.type),") instead.")):null}}],(i=[{key:"evaluate",value:function(e){return t(this.lhs.evaluate(e),this.rhs.evaluate(e))}},{key:"eachChild",value:function(t){t(this.lhs),t(this.rhs)}},{key:"possibleOutputs",value:function(){return[!0,!1]}}])&&r(n.prototype,i),l&&r(n,l),e}()}t.exports={Equals:l(function(t,e){return t===e}),NotEquals:l(function(t,e){return t!==e})}},function(t,e){t.exports={success:function(t){return{result:"success",value:t}},error:function(t){return{result:"error",value:t}}}},function(t,e,n){var r=n(13),i=n(19).number,o=.95047,a=1,s=1.08883,u=4/29,l=6/29,c=3*l*l,f=l*l*l,h=Math.PI/180,p=180/Math.PI;function y(t){return t>f?Math.pow(t,1/3):t/c+u}function d(t){return t>l?t*t*t:c*(t-u)}function v(t){return 255*(t<=.0031308?12.92*t:1.055*Math.pow(t,1/2.4)-.055)}function m(t){return(t/=255)<=.04045?t/12.92:Math.pow((t+.055)/1.055,2.4)}function g(t){var e=m(t.r),n=m(t.g),r=m(t.b),i=y((.4124564*e+.3575761*n+.1804375*r)/o),u=y((.2126729*e+.7151522*n+.072175*r)/a);return{l:116*u-16,a:500*(i-u),b:200*(u-y((.0193339*e+.119192*n+.9503041*r)/s)),alpha:t.a}}function b(t){var e=(t.l+16)/116,n=isNaN(t.a)?e:e+t.a/500,i=isNaN(t.b)?e:e-t.b/200;return e=a*d(e),n=o*d(n),i=s*d(i),new r(v(3.2404542*n-1.5371385*e-.4985314*i),v(-.969266*n+1.8760108*e+.041556*i),v(.0556434*n-.2040259*e+1.0572252*i),t.alpha)}function x(t,e,n){var r=e-t;return t+n*(r>180||r<-180?r-360*Math.round(r/360):r)}t.exports={lab:{forward:g,reverse:b,interpolate:function(t,e,n){return{l:i(t.l,e.l,n),a:i(t.a,e.a,n),b:i(t.b,e.b,n),alpha:i(t.alpha,e.alpha,n)}}},hcl:{forward:function(t){var e=g(t),n=e.l,r=e.a,i=e.b,o=Math.atan2(i,r)*p;return{h:o<0?o+360:o,c:Math.sqrt(r*r+i*i),l:n,alpha:t.a}},reverse:function(t){var e=t.h*h,n=t.c;return b({l:t.l,a:Math.cos(e)*n,b:Math.sin(e)*n,alpha:t.alpha})},interpolate:function(t,e,n){return{h:x(t.h,e.h,n),c:i(t.c,e.c,n),l:i(t.l,e.l,n),alpha:i(t.alpha,e.alpha,n)}}}}},function(t,e,n){function r(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,r.key,r)}}var i=n(9),o=n(2),a=n(39),s=n(144),u=function(){function t(e){!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,t),e&&this.replace(e)}var e,n,u;return e=t,(n=[{key:"replace",value:function(t){this._layerConfigs={},this._layers={},this.update(t,[])}},{key:"update",value:function(t,e){var n=this,r=!0,u=!1,l=void 0;try{for(var c,f=t[Symbol.iterator]();!(r=(c=f.next()).done);r=!0){var h=c.value;this._layerConfigs[h.id]=h;var p=this._layers[h.id]=i.create(h);p._featureFilter=a(p.filter)}}catch(t){u=!0,l=t}finally{try{r||null==f.return||f.return()}finally{if(u)throw l}}var y=!0,d=!1,v=void 0;try{for(var m,g=e[Symbol.iterator]();!(y=(m=g.next()).done);y=!0){var b=m.value;delete this._layerConfigs[b],delete this._layers[b]}}catch(t){d=!0,v=t}finally{try{y||null==g.return||g.return()}finally{if(d)throw v}}this.familiesBySource={};var x=s(o.values(this._layerConfigs)),w=!0,k=!1,_=void 0;try{for(var S,A=x[Symbol.iterator]();!(w=(S=A.next()).done);w=!0){var T=S.value.map(function(t){return n._layers[t.id]}),j=T[0];if("none"!==j.visibility){var O=j.source||"",z=this.familiesBySource[O];z||(z=this.familiesBySource[O]={});var P=j.sourceLayer||"_geojsonTileLayer",E=z[P];E||(E=z[P]=[]),E.push(T)}}}catch(t){k=!0,_=t}finally{try{w||null==A.return||A.return()}finally{if(k)throw _}}}}])&&r(e.prototype,n),u&&r(e,u),t}();t.exports=u},function(t){t.exports={$version:8,$root:{version:{required:!0,type:"enum",values:[8],doc:"Style specification version number. Must be 8.",example:8},name:{type:"string",doc:"A human-readable name for the style.",example:"Bright"},metadata:{type:"*",doc:"Arbitrary properties useful to track with the stylesheet, but do not influence rendering. Properties should be prefixed to avoid collisions, like \'mapbox:\'."},center:{type:"array",value:"number",doc:"Default map center in longitude and latitude.  The style center will be used only if the map has not been positioned by other means (e.g. map options or user interaction).",example:[-73.9749,40.7736]},zoom:{type:"number",doc:"Default zoom level.  The style zoom will be used only if the map has not been positioned by other means (e.g. map options or user interaction).",example:12.5},bearing:{type:"number",default:0,period:360,units:"degrees",doc:\'Default bearing, in degrees. The bearing is the compass direction that is "up"; for example, a bearing of 90° orients the map so that east is up. This value will be used only if the map has not been positioned by other means (e.g. map options or user interaction).\',example:29},pitch:{type:"number",default:0,units:"degrees",doc:"Default pitch, in degrees. Zero is perpendicular to the surface, for a look straight down at the map, while a greater value like 60 looks ahead towards the horizon. The style pitch will be used only if the map has not been positioned by other means (e.g. map options or user interaction).",example:50},light:{type:"light",doc:"The global light source.",example:{anchor:"viewport",color:"white",intensity:.4}},sources:{required:!0,type:"sources",doc:"Data source specifications.",example:{"mapbox-streets":{type:"vector",url:"mapbox://mapbox.mapbox-streets-v6"}}},sprite:{type:"string",doc:"A base URL for retrieving the sprite image and metadata. The extensions `.png`, `.json` and scale factor `@2x.png` will be automatically appended. This property is required if any layer uses the `background-pattern`, `fill-pattern`, `line-pattern`, `fill-extrusion-pattern`, or `icon-image` properties.",example:"mapbox://sprites/mapbox/bright-v8"},glyphs:{type:"string",doc:"A URL template for loading signed-distance-field glyph sets in PBF format. The URL must include `{fontstack}` and `{range}` tokens. This property is required if any layer uses the `text-field` layout property.",example:"mapbox://fonts/mapbox/{fontstack}/{range}.pbf"},transition:{type:"transition",doc:"A global transition definition to use as a default across properties.",example:{duration:300,delay:0}},layers:{required:!0,type:"array",value:"layer",doc:"Layers will be drawn in the order of this array.",example:[{id:"water",source:"mapbox-streets","source-layer":"water",type:"fill",paint:{"fill-color":"#00ffff"}}]}},sources:{"*":{type:"source",doc:"Specification of a data source. For vector and raster sources, either TileJSON or a URL to a TileJSON must be provided. For image and video sources, a URL must be provided. For GeoJSON sources, a URL or inline GeoJSON must be provided."}},source:["source_vector","source_raster","source_raster_dem","source_geojson","source_video","source_image","source_canvas"],source_vector:{type:{required:!0,type:"enum",values:{vector:{doc:"A vector tile source."}},doc:"The type of the source."},url:{type:"string",doc:"A URL to a TileJSON resource. Supported protocols are `http:`, `https:`, and `mapbox://<mapid>`."},tiles:{type:"array",value:"string",doc:"An array of one or more tile source URLs, as in the TileJSON spec."},bounds:{type:"array",value:"number",length:4,default:[-180,-85.0511,180,85.0511],doc:"An array containing the longitude and latitude of the southwest and northeast corners of the source\'s bounding box in the following order: `[sw.lng, sw.lat, ne.lng, ne.lat]`. When this property is included in a source, no tiles outside of the given bounds are requested by Mapbox GL."},minzoom:{type:"number",default:0,doc:"Minimum zoom level for which tiles are available, as in the TileJSON spec."},maxzoom:{type:"number",default:22,doc:"Maximum zoom level for which tiles are available, as in the TileJSON spec. Data from tiles at the maxzoom are used when displaying the map at higher zoom levels."},attribution:{type:"string",doc:"Contains an attribution to be displayed when the map is shown to a user."},"*":{type:"*",doc:"Other keys to configure the data source."}},source_raster:{type:{required:!0,type:"enum",values:{raster:{doc:"A raster tile source."}},doc:"The type of the source."},url:{type:"string",doc:"A URL to a TileJSON resource. Supported protocols are `http:`, `https:`, and `mapbox://<mapid>`."},tiles:{type:"array",value:"string",doc:"An array of one or more tile source URLs, as in the TileJSON spec."},bounds:{type:"array",value:"number",length:4,default:[-180,-85.0511,180,85.0511],doc:"An array containing the longitude and latitude of the southwest and northeast corners of the source\'s bounding box in the following order: `[sw.lng, sw.lat, ne.lng, ne.lat]`. When this property is included in a source, no tiles outside of the given bounds are requested by Mapbox GL."},minzoom:{type:"number",default:0,doc:"Minimum zoom level for which tiles are available, as in the TileJSON spec."},maxzoom:{type:"number",default:22,doc:"Maximum zoom level for which tiles are available, as in the TileJSON spec. Data from tiles at the maxzoom are used when displaying the map at higher zoom levels."},tileSize:{type:"number",default:512,units:"pixels",doc:"The minimum visual size to display tiles for this layer. Only configurable for raster layers."},scheme:{type:"enum",values:{xyz:{doc:"Slippy map tilenames scheme."},tms:{doc:"OSGeo spec scheme."}},default:"xyz",doc:"Influences the y direction of the tile coordinates. The global-mercator (aka Spherical Mercator) profile is assumed."},attribution:{type:"string",doc:"Contains an attribution to be displayed when the map is shown to a user."},"*":{type:"*",doc:"Other keys to configure the data source."}},source_raster_dem:{type:{required:!0,type:"enum",values:{"raster-dem":{doc:"A raster DEM source using Mapbox Terrain RGB"}},doc:"The type of the source."},url:{type:"string",doc:"A URL to a TileJSON resource. Supported protocols are `http:`, `https:`, and `mapbox://<mapid>`."},tiles:{type:"array",value:"string",doc:"An array of one or more tile source URLs, as in the TileJSON spec."},bounds:{type:"array",value:"number",length:4,default:[-180,-85.0511,180,85.0511],doc:"An array containing the longitude and latitude of the southwest and northeast corners of the source\'s bounding box in the following order: `[sw.lng, sw.lat, ne.lng, ne.lat]`. When this property is included in a source, no tiles outside of the given bounds are requested by Mapbox GL."},minzoom:{type:"number",default:0,doc:"Minimum zoom level for which tiles are available, as in the TileJSON spec."},maxzoom:{type:"number",default:22,doc:"Maximum zoom level for which tiles are available, as in the TileJSON spec. Data from tiles at the maxzoom are used when displaying the map at higher zoom levels."},tileSize:{type:"number",default:512,units:"pixels",doc:"The minimum visual size to display tiles for this layer. Only configurable for raster layers."},attribution:{type:"string",doc:"Contains an attribution to be displayed when the map is shown to a user."},"*":{type:"*",doc:"Other keys to configure the data source."}},source_geojson:{type:{required:!0,type:"enum",values:{geojson:{doc:"A GeoJSON data source."}},doc:"The data type of the GeoJSON source."},data:{type:"*",doc:"A URL to a GeoJSON file, or inline GeoJSON."},maxzoom:{type:"number",default:18,doc:"Maximum zoom level at which to create vector tiles (higher means greater detail at high zoom levels)."},buffer:{type:"number",default:128,maximum:512,minimum:0,doc:"Size of the tile buffer on each side. A value of 0 produces no buffer. A value of 512 produces a buffer as wide as the tile itself. Larger values produce fewer rendering artifacts near tile edges and slower performance."},tolerance:{type:"number",default:.375,doc:"Douglas-Peucker simplification tolerance (higher means simpler geometries and faster performance)."},cluster:{type:"boolean",default:!1,doc:"If the data is a collection of point features, setting this to true clusters the points by radius into groups."},clusterRadius:{type:"number",default:50,minimum:0,doc:"Radius of each cluster if clustering is enabled. A value of 512 indicates a radius equal to the width of a tile."},clusterMaxZoom:{type:"number",doc:"Max zoom on which to cluster points if clustering is enabled. Defaults to one zoom less than maxzoom (so that last zoom features are not clustered)."}},source_video:{type:{required:!0,type:"enum",values:{video:{doc:"A video data source."}},doc:"The data type of the video source."},urls:{required:!0,type:"array",value:"string",doc:"URLs to video content in order of preferred format."},coordinates:{required:!0,doc:"Corners of video specified in longitude, latitude pairs.",type:"array",length:4,value:{type:"array",length:2,value:"number",doc:"A single longitude, latitude pair."}}},source_image:{type:{required:!0,type:"enum",values:{image:{doc:"An image data source."}},doc:"The data type of the image source."},url:{required:!0,type:"string",doc:"URL that points to an image."},coordinates:{required:!0,doc:"Corners of image specified in longitude, latitude pairs.",type:"array",length:4,value:{type:"array",length:2,value:"number",doc:"A single longitude, latitude pair."}}},source_canvas:{type:{required:!0,type:"enum",values:{canvas:{doc:"A canvas data source."}},doc:"The data type of the canvas source."},coordinates:{required:!0,doc:"Corners of canvas specified in longitude, latitude pairs.",type:"array",length:4,value:{type:"array",length:2,value:"number",doc:"A single longitude, latitude pair."}},animate:{type:"boolean",default:"true",doc:"Whether the canvas source is animated. If the canvas is static, `animate` should be set to `false` to improve performance."},canvas:{type:"string",required:!0,doc:"HTML ID of the canvas from which to read pixels."}},layer:{id:{type:"string",doc:"Unique layer name.",required:!0},type:{type:"enum",values:{fill:{doc:"A filled polygon with an optional stroked border.","sdk-support":{"basic functionality":{js:"0.10.0",android:"2.0.1",ios:"2.0.0",macos:"0.1.0"}}},line:{doc:"A stroked line.","sdk-support":{"basic functionality":{js:"0.10.0",android:"2.0.1",ios:"2.0.0",macos:"0.1.0"}}},symbol:{doc:"An icon or a text label.","sdk-support":{"basic functionality":{js:"0.10.0",android:"2.0.1",ios:"2.0.0",macos:"0.1.0"}}},circle:{doc:"A filled circle.","sdk-support":{"basic functionality":{js:"0.10.0",android:"2.0.1",ios:"2.0.0",macos:"0.1.0"}}},heatmap:{doc:"A heatmap.","sdk-support":{"basic functionality":{js:"0.41.0"}}},"fill-extrusion":{doc:"An extruded (3D) polygon.","sdk-support":{"basic functionality":{js:"0.27.0",android:"5.1.0",ios:"3.6.0",macos:"0.5.0"}}},raster:{doc:"Raster map textures such as satellite imagery.","sdk-support":{"basic functionality":{js:"0.10.0",android:"2.0.1",ios:"2.0.0",macos:"0.1.0"}}},hillshade:{doc:"Client-side hillshading visualization based on DEM data. Currently, the implementation only supports Mapbox Terrain RGB tiles","sdk-support":{"basic functionality":{js:"0.43.0"}}},background:{doc:"The background color or pattern of the map.","sdk-support":{"basic functionality":{js:"0.10.0",android:"2.0.1",ios:"2.0.0",macos:"0.1.0"}}}},doc:"Rendering type of this layer.",required:!0},metadata:{type:"*",doc:"Arbitrary properties useful to track with the layer, but do not influence rendering. Properties should be prefixed to avoid collisions, like \'mapbox:\'."},source:{type:"string",doc:"Name of a source description to be used for this layer. Required for all layer types except `background`."},"source-layer":{type:"string",doc:"Layer to use from a vector tile source. Required for vector tile sources; prohibited for all other source types, including GeoJSON sources."},minzoom:{type:"number",minimum:0,maximum:24,doc:"The minimum zoom level on which the layer gets parsed and appears on."},maxzoom:{type:"number",minimum:0,maximum:24,doc:"The maximum zoom level on which the layer gets parsed and appears on."},filter:{type:"filter",doc:"A expression specifying conditions on source features. Only features that match the filter are displayed."},layout:{type:"layout",doc:"Layout properties for the layer."},paint:{type:"paint",doc:"Default paint properties for this layer."}},layout:["layout_fill","layout_line","layout_circle","layout_heatmap","layout_fill-extrusion","layout_symbol","layout_raster","layout_hillshade","layout_background"],layout_background:{visibility:{type:"enum",values:{visible:{doc:"The layer is shown."},none:{doc:"The layer is not shown."}},default:"visible",doc:"Whether this layer is displayed.","sdk-support":{"basic functionality":{js:"0.10.0",android:"2.0.1",ios:"2.0.0",macos:"0.1.0"}}}},layout_fill:{visibility:{type:"enum",values:{visible:{doc:"The layer is shown."},none:{doc:"The layer is not shown."}},default:"visible",doc:"Whether this layer is displayed.","sdk-support":{"basic functionality":{js:"0.10.0",android:"2.0.1",ios:"2.0.0",macos:"0.1.0"}}}},layout_circle:{visibility:{type:"enum",values:{visible:{doc:"The layer is shown."},none:{doc:"The layer is not shown."}},default:"visible",doc:"Whether this layer is displayed.","sdk-support":{"basic functionality":{js:"0.10.0",android:"2.0.1",ios:"2.0.0",macos:"0.1.0"}}}},layout_heatmap:{visibility:{type:"enum",values:{visible:{doc:"The layer is shown."},none:{doc:"The layer is not shown."}},default:"visible",doc:"Whether this layer is displayed.","sdk-support":{"basic functionality":{js:"0.41.0"}}}},"layout_fill-extrusion":{visibility:{type:"enum",values:{visible:{doc:"The layer is shown."},none:{doc:"The layer is not shown."}},default:"visible",doc:"Whether this layer is displayed.","sdk-support":{"basic functionality":{js:"0.27.0",android:"5.1.0",ios:"3.6.0",macos:"0.5.0"}}}},layout_line:{"line-cap":{type:"enum",function:"piecewise-constant","zoom-function":!0,values:{butt:{doc:"A cap with a squared-off end which is drawn to the exact endpoint of the line."},round:{doc:"A cap with a rounded end which is drawn beyond the endpoint of the line at a radius of one-half of the line\'s width and centered on the endpoint of the line."},square:{doc:"A cap with a squared-off end which is drawn beyond the endpoint of the line at a distance of one-half of the line\'s width."}},default:"butt",doc:"The display of line endings.","sdk-support":{"basic functionality":{js:"0.10.0",android:"2.0.1",ios:"2.0.0",macos:"0.1.0"},"data-driven styling":{}}},"line-join":{type:"enum",function:"piecewise-constant","zoom-function":!0,"property-function":!0,values:{bevel:{doc:"A join with a squared-off end which is drawn beyond the endpoint of the line at a distance of one-half of the line\'s width."},round:{doc:"A join with a rounded end which is drawn beyond the endpoint of the line at a radius of one-half of the line\'s width and centered on the endpoint of the line."},miter:{doc:"A join with a sharp, angled corner which is drawn with the outer sides beyond the endpoint of the path until they meet."}},default:"miter",doc:"The display of lines when joining.","sdk-support":{"basic functionality":{js:"0.10.0",android:"2.0.1",ios:"2.0.0",macos:"0.1.0"},"data-driven styling":{js:"0.40.0",android:"5.2.0",ios:"3.7.0",macos:"0.6.0"}}},"line-miter-limit":{type:"number",default:2,function:"interpolated","zoom-function":!0,doc:"Used to automatically convert miter joins to bevel joins for sharp angles.",requires:[{"line-join":"miter"}],"sdk-support":{"basic functionality":{js:"0.10.0",android:"2.0.1",ios:"2.0.0",macos:"0.1.0"},"data-driven styling":{}}},"line-round-limit":{type:"number",default:1.05,function:"interpolated","zoom-function":!0,doc:"Used to automatically convert round joins to miter joins for shallow angles.",requires:[{"line-join":"round"}],"sdk-support":{"basic functionality":{js:"0.10.0",android:"2.0.1",ios:"2.0.0",macos:"0.1.0"},"data-driven styling":{}}},visibility:{type:"enum",values:{visible:{doc:"The layer is shown."},none:{doc:"The layer is not shown."}},default:"visible",doc:"Whether this layer is displayed.","sdk-support":{"basic functionality":{js:"0.10.0",android:"2.0.1",ios:"2.0.0",macos:"0.1.0"},"data-driven styling":{}}}},layout_symbol:{"symbol-placement":{type:"enum",function:"piecewise-constant","zoom-function":!0,values:{point:{doc:"The label is placed at the point where the geometry is located."},line:{doc:"The label is placed along the line of the geometry. Can only be used on `LineString` and `Polygon` geometries."}},default:"point",doc:"Label placement relative to its geometry.","sdk-support":{"basic functionality":{js:"0.10.0",android:"2.0.1",ios:"2.0.0",macos:"0.1.0"},"data-driven styling":{}}},"symbol-spacing":{type:"number",default:250,minimum:1,function:"interpolated","zoom-function":!0,units:"pixels",doc:"Distance between two symbol anchors.",requires:[{"symbol-placement":"line"}],"sdk-support":{"basic functionality":{js:"0.10.0",android:"2.0.1",ios:"2.0.0",macos:"0.1.0"},"data-driven styling":{}}},"symbol-avoid-edges":{type:"boolean",function:"piecewise-constant","zoom-function":!0,default:!1,doc:"If true, the symbols will not cross tile edges to avoid mutual collisions. Recommended in layers that don\'t have enough padding in the vector tile to prevent collisions, or if it is a point symbol layer placed after a line symbol layer.","sdk-support":{"basic functionality":{js:"0.10.0",android:"2.0.1",ios:"2.0.0",macos:"0.1.0"},"data-driven styling":{}}},"icon-allow-overlap":{type:"boolean",function:"piecewise-constant","zoom-function":!0,default:!1,doc:"If true, the icon will be visible even if it collides with other previously drawn symbols.",requires:["icon-image"],"sdk-support":{"basic functionality":{js:"0.10.0",android:"2.0.1",ios:"2.0.0",macos:"0.1.0"},"data-driven styling":{}}},"icon-ignore-placement":{type:"boolean",function:"piecewise-constant","zoom-function":!0,default:!1,doc:"If true, other symbols can be visible even if they collide with the icon.",requires:["icon-image"],"sdk-support":{"basic functionality":{js:"0.10.0",android:"2.0.1",ios:"2.0.0",macos:"0.1.0"},"data-driven styling":{}}},"icon-optional":{type:"boolean",function:"piecewise-constant","zoom-function":!0,default:!1,doc:"If true, text will display without their corresponding icons when the icon collides with other symbols and the text does not.",requires:["icon-image","text-field"],"sdk-support":{"basic functionality":{js:"0.10.0",android:"2.0.1",ios:"2.0.0",macos:"0.1.0"},"data-driven styling":{}}},"icon-rotation-alignment":{type:"enum",function:"piecewise-constant","zoom-function":!0,values:{map:{doc:"When `symbol-placement` is set to `point`, aligns icons east-west. When `symbol-placement` is set to `line`, aligns icon x-axes with the line."},viewport:{doc:"Produces icons whose x-axes are aligned with the x-axis of the viewport, regardless of the value of `symbol-placement`."},auto:{doc:"When `symbol-placement` is set to `point`, this is equivalent to `viewport`. When `symbol-placement` is set to `line`, this is equivalent to `map`."}},default:"auto",doc:"In combination with `symbol-placement`, determines the rotation behavior of icons.",requires:["icon-image"],"sdk-support":{"basic functionality":{js:"0.10.0",android:"2.0.1",ios:"2.0.0",macos:"0.1.0"},"`auto` value":{js:"0.25.0",android:"4.2.0",ios:"3.4.0",macos:"0.3.0"},"data-driven styling":{}}},"icon-size":{type:"number",default:1,minimum:0,function:"interpolated","zoom-function":!0,"property-function":!0,units:"factor of the original icon size",doc:"Scales the original size of the icon by the provided factor. The new pixel size of the image will be the original pixel size multiplied by `icon-size`. 1 is the original size; 3 triples the size of the image.",requires:["icon-image"],"sdk-support":{"basic functionality":{js:"0.10.0",android:"2.0.1",ios:"2.0.0",macos:"0.1.0"},"data-driven styling":{js:"0.35.0",android:"5.1.0",ios:"3.6.0",macos:"0.5.0"}}},"icon-text-fit":{type:"enum",function:"piecewise-constant","zoom-function":!0,values:{none:{doc:"The icon is displayed at its intrinsic aspect ratio."},width:{doc:"The icon is scaled in the x-dimension to fit the width of the text."},height:{doc:"The icon is scaled in the y-dimension to fit the height of the text."},both:{doc:"The icon is scaled in both x- and y-dimensions."}},default:"none",doc:"Scales the icon to fit around the associated text.",requires:["icon-image","text-field"],"sdk-support":{"basic functionality":{js:"0.21.0",android:"4.2.0",ios:"3.4.0",macos:"0.2.1"},"data-driven styling":{}}},"icon-text-fit-padding":{type:"array",value:"number",length:4,default:[0,0,0,0],units:"pixels",function:"interpolated","zoom-function":!0,doc:"Size of the additional area added to dimensions determined by `icon-text-fit`, in clockwise order: top, right, bottom, left.",requires:["icon-image","text-field",{"icon-text-fit":["both","width","height"]}],"sdk-support":{"basic functionality":{js:"0.21.0",android:"4.2.0",ios:"3.4.0",macos:"0.2.1"},"data-driven styling":{}}},"icon-image":{type:"string",function:"piecewise-constant","zoom-function":!0,"property-function":!0,doc:"Name of image in sprite to use for drawing an image background. Within literal values and zoom functions, property names enclosed in curly brackets (e.g. `{token}`) are replaced with the value of the named property. Expressions and property functions do not support this syntax; for equivalent functionality in expressions, use the [`concat`](#expressions-concat) and [`get`](#expressions-get) operators.",tokens:!0,"sdk-support":{"basic functionality":{js:"0.10.0",android:"2.0.1",ios:"2.0.0",macos:"0.1.0"},"data-driven styling":{js:"0.35.0",android:"5.1.0",ios:"3.6.0",macos:"0.5.0"}}},"icon-rotate":{type:"number",default:0,period:360,function:"interpolated","zoom-function":!0,"property-function":!0,units:"degrees",doc:"Rotates the icon clockwise.",requires:["icon-image"],"sdk-support":{"basic functionality":{js:"0.10.0",android:"2.0.1",ios:"2.0.0",macos:"0.1.0"},"data-driven styling":{js:"0.21.0",android:"5.0.0",ios:"3.5.0",macos:"0.4.0"}}},"icon-padding":{type:"number",default:2,minimum:0,function:"interpolated","zoom-function":!0,units:"pixels",doc:"Size of the additional area around the icon bounding box used for detecting symbol collisions.",requires:["icon-image"],"sdk-support":{"basic functionality":{js:"0.10.0",android:"2.0.1",ios:"2.0.0",macos:"0.1.0"},"data-driven styling":{}}},"icon-keep-upright":{type:"boolean",function:"piecewise-constant","zoom-function":!0,default:!1,doc:"If true, the icon may be flipped to prevent it from being rendered upside-down.",requires:["icon-image",{"icon-rotation-alignment":"map"},{"symbol-placement":"line"}],"sdk-support":{"basic functionality":{js:"0.10.0",android:"2.0.1",ios:"2.0.0",macos:"0.1.0"},"data-driven styling":{}}},"icon-offset":{type:"array",value:"number",length:2,default:[0,0],function:"interpolated","zoom-function":!0,"property-function":!0,doc:"Offset distance of icon from its anchor. Positive values indicate right and down, while negative values indicate left and up. Each component is multiplied by the value of `icon-size` to obtain the final offset in pixels. When combined with `icon-rotate` the offset will be as if the rotated direction was up.",requires:["icon-image"],"sdk-support":{"basic functionality":{js:"0.10.0",android:"2.0.1",ios:"2.0.0",macos:"0.1.0"},"data-driven styling":{js:"0.29.0",android:"5.0.0",ios:"3.5.0",macos:"0.4.0"}}},"icon-anchor":{type:"enum",function:"piecewise-constant","zoom-function":!0,"property-function":!0,values:{center:{doc:"The center of the icon is placed closest to the anchor."},left:{doc:"The left side of the icon is placed closest to the anchor."},right:{doc:"The right side of the icon is placed closest to the anchor."},top:{doc:"The top of the icon is placed closest to the anchor."},bottom:{doc:"The bottom of the icon is placed closest to the anchor."},"top-left":{doc:"The top left corner of the icon is placed closest to the anchor."},"top-right":{doc:"The top right corner of the icon is placed closest to the anchor."},"bottom-left":{doc:"The bottom left corner of the icon is placed closest to the anchor."},"bottom-right":{doc:"The bottom right corner of the icon is placed closest to the anchor."}},default:"center",doc:"Part of the icon placed closest to the anchor.",requires:["icon-image"],"sdk-support":{"basic functionality":{js:"0.40.0",android:"5.2.0",ios:"3.7.0",macos:"0.6.0"},"data-driven styling":{js:"0.40.0",android:"5.2.0",ios:"3.7.0",macos:"0.6.0"}}},"icon-pitch-alignment":{type:"enum",function:"piecewise-constant","zoom-function":!0,values:{map:{doc:"The icon is aligned to the plane of the map."},viewport:{doc:"The icon is aligned to the plane of the viewport."},auto:{doc:"Automatically matches the value of `icon-rotation-alignment`."}},default:"auto",doc:"Orientation of icon when map is pitched.",requires:["icon-image"],"sdk-support":{"basic functionality":{js:"0.39.0",android:"5.2.0",ios:"3.7.0",macos:"0.6.0"},"data-driven styling":{}}},"text-pitch-alignment":{type:"enum",function:"piecewise-constant","zoom-function":!0,values:{map:{doc:"The text is aligned to the plane of the map."},viewport:{doc:"The text is aligned to the plane of the viewport."},auto:{doc:"Automatically matches the value of `text-rotation-alignment`."}},default:"auto",doc:"Orientation of text when map is pitched.",requires:["text-field"],"sdk-support":{"basic functionality":{js:"0.21.0",android:"4.2.0",ios:"3.4.0",macos:"0.2.1"},"`auto` value":{js:"0.25.0",android:"4.2.0",ios:"3.4.0",macos:"0.3.0"},"data-driven styling":{}}},"text-rotation-alignment":{type:"enum",function:"piecewise-constant","zoom-function":!0,values:{map:{doc:"When `symbol-placement` is set to `point`, aligns text east-west. When `symbol-placement` is set to `line`, aligns text x-axes with the line."},viewport:{doc:"Produces glyphs whose x-axes are aligned with the x-axis of the viewport, regardless of the value of `symbol-placement`."},auto:{doc:"When `symbol-placement` is set to `point`, this is equivalent to `viewport`. When `symbol-placement` is set to `line`, this is equivalent to `map`."}},default:"auto",doc:"In combination with `symbol-placement`, determines the rotation behavior of the individual glyphs forming the text.",requires:["text-field"],"sdk-support":{"basic functionality":{js:"0.10.0",android:"2.0.1",ios:"2.0.0",macos:"0.1.0"},"`auto` value":{js:"0.25.0",android:"4.2.0",ios:"3.4.0",macos:"0.3.0"},"data-driven styling":{}}},"text-field":{type:"string",function:"piecewise-constant","zoom-function":!0,"property-function":!0,default:"",tokens:!0,doc:"Value to use for a text label. Within literal values and zoom functions, property names enclosed in curly brackets (e.g. `{token}`) are replaced with the value of the named property. Expressions and property functions do not support this syntax; for equivalent functionality in expressions, use the [`concat`](#expressions-concat) and [`get`](#expressions-get) operators.","sdk-support":{"basic functionality":{js:"0.10.0",android:"2.0.1",ios:"2.0.0",macos:"0.1.0"},"data-driven styling":{js:"0.33.0",android:"5.0.0",ios:"3.5.0",macos:"0.4.0"}}},"text-font":{type:"array",value:"string",function:"piecewise-constant","zoom-function":!0,"property-function":!0,default:["Open Sans Regular","Arial Unicode MS Regular"],doc:"Font stack to use for displaying text.",requires:["text-field"],"sdk-support":{"basic functionality":{js:"0.10.0",android:"2.0.1",ios:"2.0.0",macos:"0.1.0"},"data-driven styling":{}}},"text-size":{type:"number",default:16,minimum:0,units:"pixels",function:"interpolated","zoom-function":!0,"property-function":!0,doc:"Font size.",requires:["text-field"],"sdk-support":{"basic functionality":{js:"0.10.0",android:"2.0.1",ios:"2.0.0",macos:"0.1.0"},"data-driven styling":{js:"0.35.0",android:"5.1.0",ios:"3.6.0",macos:"0.5.0"}}},"text-max-width":{type:"number",default:10,minimum:0,units:"ems",function:"interpolated","zoom-function":!0,"property-function":!0,doc:"The maximum line width for text wrapping.",requires:["text-field"],"sdk-support":{"basic functionality":{js:"0.10.0",android:"2.0.1",ios:"2.0.0",macos:"0.1.0"},"data-driven styling":{js:"0.40.0",android:"5.2.0",ios:"3.7.0",macos:"0.6.0"}}},"text-line-height":{type:"number",default:1.2,units:"ems",function:"interpolated","zoom-function":!0,doc:"Text leading value for multi-line text.",requires:["text-field"],"sdk-support":{"basic functionality":{js:"0.10.0",android:"2.0.1",ios:"2.0.0",macos:"0.1.0"},"data-driven styling":{}}},"text-letter-spacing":{type:"number",default:0,units:"ems",function:"interpolated","zoom-function":!0,"property-function":!0,doc:"Text tracking amount.",requires:["text-field"],"sdk-support":{"basic functionality":{js:"0.10.0",android:"2.0.1",ios:"2.0.0",macos:"0.1.0"},"data-driven styling":{js:"0.40.0",android:"5.2.0",ios:"3.7.0",macos:"0.6.0"}}},"text-justify":{type:"enum",function:"piecewise-constant","zoom-function":!0,"property-function":!0,values:{left:{doc:"The text is aligned to the left."},center:{doc:"The text is centered."},right:{doc:"The text is aligned to the right."}},default:"center",doc:"Text justification options.",requires:["text-field"],"sdk-support":{"basic functionality":{js:"0.10.0",android:"2.0.1",ios:"2.0.0",macos:"0.1.0"},"data-driven styling":{js:"0.39.0",android:"5.2.0",ios:"3.7.0",macos:"0.6.0"}}},"text-anchor":{type:"enum",function:"piecewise-constant","zoom-function":!0,"property-function":!0,values:{center:{doc:"The center of the text is placed closest to the anchor."},left:{doc:"The left side of the text is placed closest to the anchor."},right:{doc:"The right side of the text is placed closest to the anchor."},top:{doc:"The top of the text is placed closest to the anchor."},bottom:{doc:"The bottom of the text is placed closest to the anchor."},"top-left":{doc:"The top left corner of the text is placed closest to the anchor."},"top-right":{doc:"The top right corner of the text is placed closest to the anchor."},"bottom-left":{doc:"The bottom left corner of the text is placed closest to the anchor."},"bottom-right":{doc:"The bottom right corner of the text is placed closest to the anchor."}},default:"center",doc:"Part of the text placed closest to the anchor.",requires:["text-field"],"sdk-support":{"basic functionality":{js:"0.10.0",android:"2.0.1",ios:"2.0.0",macos:"0.1.0"},"data-driven styling":{js:"0.39.0",android:"5.2.0",ios:"3.7.0",macos:"0.6.0"}}},"text-max-angle":{type:"number",default:45,units:"degrees",function:"interpolated","zoom-function":!0,doc:"Maximum angle change between adjacent characters.",requires:["text-field",{"symbol-placement":"line"}],"sdk-support":{"basic functionality":{js:"0.10.0",android:"2.0.1",ios:"2.0.0",macos:"0.1.0"},"data-driven styling":{}}},"text-rotate":{type:"number",default:0,period:360,units:"degrees",function:"interpolated","zoom-function":!0,"property-function":!0,doc:"Rotates the text clockwise.",requires:["text-field"],"sdk-support":{"basic functionality":{js:"0.10.0",android:"2.0.1",ios:"2.0.0",macos:"0.1.0"},"data-driven styling":{js:"0.35.0",android:"5.1.0",ios:"3.6.0",macos:"0.5.0"}}},"text-padding":{type:"number",default:2,minimum:0,units:"pixels",function:"interpolated","zoom-function":!0,doc:"Size of the additional area around the text bounding box used for detecting symbol collisions.",requires:["text-field"],"sdk-support":{"basic functionality":{js:"0.10.0",android:"2.0.1",ios:"2.0.0",macos:"0.1.0"},"data-driven styling":{}}},"text-keep-upright":{type:"boolean",function:"piecewise-constant","zoom-function":!0,default:!0,doc:"If true, the text may be flipped vertically to prevent it from being rendered upside-down.",requires:["text-field",{"text-rotation-alignment":"map"},{"symbol-placement":"line"}],"sdk-support":{"basic functionality":{js:"0.10.0",android:"2.0.1",ios:"2.0.0",macos:"0.1.0"},"data-driven styling":{}}},"text-transform":{type:"enum",function:"piecewise-constant","zoom-function":!0,"property-function":!0,values:{none:{doc:"The text is not altered."},uppercase:{doc:"Forces all letters to be displayed in uppercase."},lowercase:{doc:"Forces all letters to be displayed in lowercase."}},default:"none",doc:"Specifies how to capitalize text, similar to the CSS `text-transform` property.",requires:["text-field"],"sdk-support":{"basic functionality":{js:"0.10.0",android:"2.0.1",ios:"2.0.0",macos:"0.1.0"},"data-driven styling":{js:"0.33.0",android:"5.0.0",ios:"3.5.0",macos:"0.4.0"}}},"text-offset":{type:"array",doc:"Offset distance of text from its anchor. Positive values indicate right and down, while negative values indicate left and up.",value:"number",units:"ems",function:"interpolated","zoom-function":!0,"property-function":!0,length:2,default:[0,0],requires:["text-field"],"sdk-support":{"basic functionality":{js:"0.10.0",android:"2.0.1",ios:"2.0.0",macos:"0.1.0"},"data-driven styling":{js:"0.35.0",android:"5.1.0",ios:"3.6.0",macos:"0.5.0"}}},"text-allow-overlap":{type:"boolean",function:"piecewise-constant","zoom-function":!0,default:!1,doc:"If true, the text will be visible even if it collides with other previously drawn symbols.",requires:["text-field"],"sdk-support":{"basic functionality":{js:"0.10.0",android:"2.0.1",ios:"2.0.0",macos:"0.1.0"},"data-driven styling":{}}},"text-ignore-placement":{type:"boolean",function:"piecewise-constant","zoom-function":!0,default:!1,doc:"If true, other symbols can be visible even if they collide with the text.",requires:["text-field"],"sdk-support":{"basic functionality":{js:"0.10.0",android:"2.0.1",ios:"2.0.0",macos:"0.1.0"},"data-driven styling":{}}},"text-optional":{type:"boolean",function:"piecewise-constant","zoom-function":!0,default:!1,doc:"If true, icons will display without their corresponding text when the text collides with other symbols and the icon does not.",requires:["text-field","icon-image"],"sdk-support":{"basic functionality":{js:"0.10.0",android:"2.0.1",ios:"2.0.0",macos:"0.1.0"},"data-driven styling":{}}},visibility:{type:"enum",values:{visible:{doc:"The layer is shown."},none:{doc:"The layer is not shown."}},default:"visible",doc:"Whether this layer is displayed.","sdk-support":{"basic functionality":{js:"0.10.0",android:"2.0.1",ios:"2.0.0",macos:"0.1.0"},"data-driven styling":{}}}},layout_raster:{visibility:{type:"enum",values:{visible:{doc:"The layer is shown."},none:{doc:"The layer is not shown."}},default:"visible",doc:"Whether this layer is displayed.","sdk-support":{"basic functionality":{js:"0.10.0",android:"2.0.1",ios:"2.0.0",macos:"0.1.0"},"data-driven styling":{}}}},layout_hillshade:{visibility:{type:"enum",values:{visible:{doc:"The layer is shown."},none:{doc:"The layer is not shown."}},default:"visible",doc:"Whether this layer is displayed.","sdk-support":{"basic functionality":{js:"0.43.0"},"data-driven styling":{}}}},filter:{type:"array",value:"*",doc:"A filter selects specific features from a layer."},filter_operator:{type:"enum",values:{"==":{doc:\'`["==", key, value]` equality: `feature[key] = value`\'},"!=":{doc:\'`["!=", key, value]` inequality: `feature[key] ≠ value`\'},">":{doc:\'`[">", key, value]` greater than: `feature[key] > value`\'},">=":{doc:\'`[">=", key, value]` greater than or equal: `feature[key] ≥ value`\'},"<":{doc:\'`["<", key, value]` less than: `feature[key] < value`\'},"<=":{doc:\'`["<=", key, value]` less than or equal: `feature[key] ≤ value`\'},in:{doc:\'`["in", key, v0, ..., vn]` set inclusion: `feature[key] ∈ {v0, ..., vn}`\'},"!in":{doc:\'`["!in", key, v0, ..., vn]` set exclusion: `feature[key] ∉ {v0, ..., vn}`\'},all:{doc:\'`["all", f0, ..., fn]` logical `AND`: `f0 ∧ ... ∧ fn`\'},any:{doc:\'`["any", f0, ..., fn]` logical `OR`: `f0 ∨ ... ∨ fn`\'},none:{doc:\'`["none", f0, ..., fn]` logical `NOR`: `¬f0 ∧ ... ∧ ¬fn`\'},has:{doc:\'`["has", key]` `feature[key]` exists\'},"!has":{doc:\'`["!has", key]` `feature[key]` does not exist\'}},doc:"The filter operator."},geometry_type:{type:"enum",values:{Point:{doc:"Filter to point geometries."},LineString:{doc:"Filter to line geometries."},Polygon:{doc:"Filter to polygon geometries."}},doc:"The geometry type for the filter to select."},function:{expression:{type:"expression",doc:"An expression."},stops:{type:"array",doc:"An array of stops.",value:"function_stop"},base:{type:"number",default:1,minimum:0,doc:"The exponential base of the interpolation curve. It controls the rate at which the result increases. Higher values make the result increase more towards the high end of the range. With `1` the stops are interpolated linearly."},property:{type:"string",doc:"The name of a feature property to use as the function input.",default:"$zoom"},type:{type:"enum",values:{identity:{doc:"Return the input value as the output value."},exponential:{doc:"Generate an output by interpolating between stops just less than and just greater than the function input."},interval:{doc:"Return the output value of the stop just less than the function input."},categorical:{doc:"Return the output value of the stop equal to the function input."}},doc:"The interpolation strategy to use in function evaluation.",default:"exponential"},colorSpace:{type:"enum",values:{rgb:{doc:"Use the RGB color space to interpolate color values"},lab:{doc:"Use the LAB color space to interpolate color values."},hcl:{doc:"Use the HCL color space to interpolate color values, interpolating the Hue, Chroma, and Luminance channels individually."}},doc:"The color space in which colors interpolated. Interpolating colors in perceptual color spaces like LAB and HCL tend to produce color ramps that look more consistent and produce colors that can be differentiated more easily than those interpolated in RGB space.",default:"rgb"},default:{type:"*",required:!1,doc:"A value to serve as a fallback function result when a value isn\'t otherwise available. It is used in the following circumstances:\\n* In categorical functions, when the feature value does not match any of the stop domain values.\\n* In property and zoom-and-property functions, when a feature does not contain a value for the specified property.\\n* In identity functions, when the feature value is not valid for the style property (for example, if the function is being used for a `circle-color` property but the feature property value is not a string or not a valid color).\\n* In interval or exponential property and zoom-and-property functions, when the feature value is not numeric.\\nIf no default is provided, the style property\'s default is used in these circumstances."}},function_stop:{type:"array",minimum:0,maximum:22,value:["number","color"],length:2,doc:"Zoom level and value pair."},expression:{type:"array",value:"*",minimum:1,doc:"An expression defines a function that can be used for data-driven style properties or feature filters."},expression_name:{doc:"",type:"enum",values:{let:{doc:\'Binds expressions to named variables, which can then be referenced in the result expression using ["var", "variable_name"].\',group:"Variable binding"},var:{doc:\'References variable bound using "let".\',group:"Variable binding"},literal:{doc:"Provides a literal array or object value.",group:"Types"},array:{doc:"Asserts that the input is an array (optionally with a specific item type and length).  If, when the input expression is evaluated, it is not of the asserted type, then this assertion will cause the whole expression to be aborted.",group:"Types"},at:{doc:"Retrieves an item from an array.",group:"Lookup"},case:{doc:"Selects the first output whose corresponding test condition evaluates to true.",group:"Decision"},match:{doc:\'Selects the output whose label value matches the input value, or the fallback value if no match is found. The `input` can be any string or number expression (e.g. `["get", "building_type"]`). Each label can either be a single literal value or an array of values.\',group:"Decision"},coalesce:{doc:"Evaluates each expression in turn until the first non-null value is obtained, and returns that value.",group:"Decision"},step:{doc:\'Produces discrete, stepped results by evaluating a piecewise-constant function defined by pairs of input and output values ("stops"). The `input` may be any numeric expression (e.g., `["get", "population"]`). Stop inputs must be numeric literals in strictly ascending order. Returns the output value of the stop just less than the input, or the first input if the input is less than the first stop.\',group:"Ramps, scales, curves"},interpolate:{doc:\'Produces continuous, smooth results by interpolating between pairs of input and output values ("stops"). The `input` may be any numeric expression (e.g., `["get", "population"]`). Stop inputs must be numeric literals in strictly ascending order. The output type must be `number`, `array<number>`, or `color`.\\n\\nInterpolation types:\\n- `["linear"]`: interpolates linearly between the pair of stops just less than and just greater than the input.\\n- `["exponential", base]`: interpolates exponentially between the stops just less than and just greater than the input. `base` controls the rate at which the output increases: higher values make the output increase more towards the high end of the range. With values close to 1 the output increases linearly.\\n- `["cubic-bezier", x1, y1, x2, y2]`: interpolates using the cubic bezier curve defined by the given control points.\',group:"Ramps, scales, curves"},ln2:{doc:"Returns mathematical constant ln(2).",group:"Math"},pi:{doc:"Returns the mathematical constant pi.",group:"Math"},e:{doc:"Returns the mathematical constant e.",group:"Math"},typeof:{doc:"Returns a string describing the type of the given value.",group:"Types"},string:{doc:"Asserts that the input value is a string. If multiple values are provided, each one is evaluated in order until a string value is obtained. If none of the inputs are strings, the expression is an error.",group:"Types"},number:{doc:"Asserts that the input value is a number. If multiple values are provided, each one is evaluated in order until a number value is obtained. If none of the inputs are numbers, the expression is an error.",group:"Types"},boolean:{doc:"Asserts that the input value is a boolean. If multiple values are provided, each one is evaluated in order until a boolean value is obtained. If none of the inputs are booleans, the expression is an error.",group:"Types"},object:{doc:"Asserts that the input value is an object. If it is not, the expression is an error.",group:"Types"},"to-string":{doc:\'Converts the input value to a string. If the input is `null`, the result is `"null"`. If the input is a boolean, the result is `"true"` or `"false"`. If the input is a number, it is converted to a string as specified by the ["NumberToString" algorithm](https://tc39.github.io/ecma262/#sec-tostring-applied-to-the-number-type) of the ECMAScript Language Specification. If the input is a color, it is converted to a string of the form `"rgba(r,g,b,a)"`, where `r`, `g`, and `b` are numerals ranging from 0 to 255, and `a` ranges from 0 to 1. Otherwise, the input is converted to a string in the format specified by the [`JSON.stringify`](https://tc39.github.io/ecma262/#sec-json.stringify) function of the ECMAScript Language Specification.\',group:"Types"},"to-number":{doc:\'Converts the input value to a number, if possible. If the input is `null` or `false`, the result is 0. If the input is `true`, the result is 1. If the input is a string, it is converted to a number as specified by the ["ToNumber Applied to the String Type" algorithm](https://tc39.github.io/ecma262/#sec-tonumber-applied-to-the-string-type) of the ECMAScript Language Specification. If multiple values are provided, each one is evaluated in order until the first successful conversion is obtained. If none of the inputs can be converted, the expression is an error.\',group:"Types"},"to-boolean":{doc:"Converts the input value to a boolean. The result is `false` when then input is an empty string, 0, `false`, `null`, or `NaN`; otherwise it is `true`.",group:"Types"},"to-rgba":{doc:"Returns a four-element array containing the input color\'s red, green, blue, and alpha components, in that order.",group:"Color"},"to-color":{doc:"Converts the input value to a color. If multiple values are provided, each one is evaluated in order until the first successful conversion is obtained. If none of the inputs can be converted, the expression is an error.",group:"Types"},rgb:{doc:"Creates a color value from red, green, and blue components, which must range between 0 and 255, and an alpha component of 1. If any component is out of range, the expression is an error.",group:"Color"},rgba:{doc:"Creates a color value from red, green, blue components, which must range between 0 and 255, and an alpha component which must range between 0 and 1. If any component is out of range, the expression is an error.",group:"Color"},get:{doc:"Retrieves a property value from the current feature\'s properties, or from another object if a second argument is provided. Returns null if the requested property is missing.",group:"Lookup"},has:{doc:"Tests for the presence of an property value in the current feature\'s properties, or from another object if a second argument is provided.",group:"Lookup"},length:{doc:"Gets the length of an array or string.",group:"Lookup"},properties:{doc:\'Gets the feature properties object.  Note that in some cases, it may be more efficient to use ["get", "property_name"] directly.\',group:"Feature data"},"geometry-type":{doc:"Gets the feature\'s geometry type: Point, MultiPoint, LineString, MultiLineString, Polygon, MultiPolygon.",group:"Feature data"},id:{doc:"Gets the feature\'s id, if it has one.",group:"Feature data"},zoom:{doc:\'Gets the current zoom level.  Note that in style layout and paint properties, ["zoom"] may only appear as the input to a top-level "step" or "interpolate" expression.\',group:"Zoom"},"heatmap-density":{doc:"Gets the kernel density estimation of a pixel in a heatmap layer, which is a relative measure of how many data points are crowded around a particular pixel. Can only be used in the `heatmap-color` property.",group:"Heatmap"},"+":{doc:"Returns the sum of the inputs.",group:"Math"},"*":{doc:"Returns the product of the inputs.",group:"Math"},"-":{doc:"For two inputs, returns the result of subtracting the second input from the first. For a single input, returns the result of subtracting it from 0.",group:"Math"},"/":{doc:"Returns the result of floating point division of the first input by the second.",group:"Math"},"%":{doc:"Returns the remainder after integer division of the first input by the second.",group:"Math"},"^":{doc:"Returns the result of raising the first input to the power specified by the second.",group:"Math"},sqrt:{doc:"Returns the square root of the input.",group:"Math"},log10:{doc:"Returns the base-ten logarithm of the input.",group:"Math"},ln:{doc:"Returns the natural logarithm of the input.",group:"Math"},log2:{doc:"Returns the base-two logarithm of the input.",group:"Math"},sin:{doc:"Returns the sine of the input.",group:"Math"},cos:{doc:"Returns the cosine of the input.",group:"Math"},tan:{doc:"Returns the tangent of the input.",group:"Math"},asin:{doc:"Returns the arcsine of the input.",group:"Math"},acos:{doc:"Returns the arccosine of the input.",group:"Math"},atan:{doc:"Returns the arctangent of the input.",group:"Math"},min:{doc:"Returns the minimum value of the inputs.",group:"Math"},max:{doc:"Returns the maximum value of the inputs.",group:"Math"},"==":{doc:"Returns `true` if the input values are equal, `false` otherwise. The inputs must be numbers, strings, or booleans, and both of the same type.",group:"Decision"},"!=":{doc:"Returns `true` if the input values are not equal, `false` otherwise. The inputs must be numbers, strings, or booleans, and both of the same type.",group:"Decision"},">":{doc:"Returns `true` if the first input is strictly greater than the second, `false` otherwise. The inputs must be numbers or strings, and both of the same type.",group:"Decision"},"<":{doc:"Returns `true` if the first input is strictly less than the second, `false` otherwise. The inputs must be numbers or strings, and both of the same type.",group:"Decision"},">=":{doc:"Returns `true` if the first input is greater than or equal to the second, `false` otherwise. The inputs must be numbers or strings, and both of the same type.",group:"Decision"},"<=":{doc:"Returns `true` if the first input is less than or equal to the second, `false` otherwise. The inputs must be numbers or strings, and both of the same type.",group:"Decision"},all:{doc:"Returns `true` if all the inputs are `true`, `false` otherwise. The inputs are evaluated in order, and evaluation is short-circuiting: once an input expression evaluates to `false`, the result is `false` and no further input expressions are evaluated.",group:"Decision"},any:{doc:"Returns `true` if any of the inputs are `true`, `false` otherwise. The inputs are evaluated in order, and evaluation is short-circuiting: once an input expression evaluates to `true`, the result is `true` and no further input expressions are evaluated.",group:"Decision"},"!":{doc:"Logical negation. Returns `true` if the input is `false`, and `false` if the input is `true`.",group:"Decision"},upcase:{doc:"Returns the input string converted to uppercase. Follows the Unicode Default Case Conversion algorithm and the locale-insensitive case mappings in the Unicode Character Database.",group:"String"},downcase:{doc:"Returns the input string converted to lowercase. Follows the Unicode Default Case Conversion algorithm and the locale-insensitive case mappings in the Unicode Character Database.",group:"String"},concat:{doc:"Returns a string consisting of the concatenation of the inputs.",group:"String"}}},light:{anchor:{type:"enum",default:"viewport",values:{map:{doc:"The position of the light source is aligned to the rotation of the map."},viewport:{doc:"The position of the light source is aligned to the rotation of the viewport."}},transition:!1,"zoom-function":!0,"property-function":!1,function:"piecewise-constant",doc:"Whether extruded geometries are lit relative to the map or viewport.",example:"map","sdk-support":{"basic functionality":{js:"0.27.0",android:"5.1.0",ios:"3.6.0",macos:"0.5.0"}}},position:{type:"array",default:[1.15,210,30],length:3,value:"number",transition:!0,function:"interpolated","zoom-function":!0,"property-function":!1,doc:"Position of the light source relative to lit (extruded) geometries, in [r radial coordinate, a azimuthal angle, p polar angle] where r indicates the distance from the center of the base of an object to its light, a indicates the position of the light relative to 0° (0° when `light.anchor` is set to `viewport` corresponds to the top of the viewport, or 0° when `light.anchor` is set to `map` corresponds to due north, and degrees proceed clockwise), and p indicates the height of the light (from 0°, directly above, to 180°, directly below).",example:[1.5,90,80],"sdk-support":{"basic functionality":{js:"0.27.0",android:"5.1.0",ios:"3.6.0",macos:"0.5.0"}}},color:{type:"color",default:"#ffffff",function:"interpolated","zoom-function":!0,"property-function":!1,transition:!0,doc:"Color tint for lighting extruded geometries.","sdk-support":{"basic functionality":{js:"0.27.0",android:"5.1.0",ios:"3.6.0",macos:"0.5.0"}}},intensity:{type:"number",default:.5,minimum:0,maximum:1,function:"interpolated","zoom-function":!0,"property-function":!1,transition:!0,doc:"Intensity of lighting (on a scale from 0 to 1). Higher numbers will present as more extreme contrast.","sdk-support":{"basic functionality":{js:"0.27.0",android:"5.1.0",ios:"3.6.0",macos:"0.5.0"}}}},paint:["paint_fill","paint_line","paint_circle","paint_heatmap","paint_fill-extrusion","paint_symbol","paint_raster","paint_hillshade","paint_background"],paint_fill:{"fill-antialias":{type:"boolean",function:"piecewise-constant","zoom-function":!0,default:!0,doc:"Whether or not the fill should be antialiased.","sdk-support":{"basic functionality":{js:"0.10.0",android:"2.0.1",ios:"2.0.0",macos:"0.1.0"},"data-driven styling":{}}},"fill-opacity":{type:"number",function:"interpolated","zoom-function":!0,"property-function":!0,default:1,minimum:0,maximum:1,doc:"The opacity of the entire fill layer. In contrast to the `fill-color`, this value will also affect the 1px stroke around the fill, if the stroke is used.",transition:!0,"sdk-support":{"basic functionality":{js:"0.10.0",android:"2.0.1",ios:"2.0.0",macos:"0.1.0"},"data-driven styling":{js:"0.21.0",android:"5.0.0",ios:"3.5.0",macos:"0.4.0"}}},"fill-color":{type:"color",default:"#000000",doc:"The color of the filled part of this layer. This color can be specified as `rgba` with an alpha component and the color\'s opacity will not affect the opacity of the 1px stroke, if it is used.",function:"interpolated","zoom-function":!0,"property-function":!0,transition:!0,requires:[{"!":"fill-pattern"}],"sdk-support":{"basic functionality":{js:"0.10.0",android:"2.0.1",ios:"2.0.0",macos:"0.1.0"},"data-driven styling":{js:"0.19.0",android:"5.0.0",ios:"3.5.0",macos:"0.4.0"}}},"fill-outline-color":{type:"color",doc:"The outline color of the fill. Matches the value of `fill-color` if unspecified.",function:"interpolated","zoom-function":!0,"property-function":!0,transition:!0,requires:[{"!":"fill-pattern"},{"fill-antialias":!0}],"sdk-support":{"basic functionality":{js:"0.10.0",android:"2.0.1",ios:"2.0.0",macos:"0.1.0"},"data-driven styling":{js:"0.19.0",android:"5.0.0",ios:"3.5.0",macos:"0.4.0"}}},"fill-translate":{type:"array",value:"number",length:2,default:[0,0],function:"interpolated","zoom-function":!0,transition:!0,units:"pixels",doc:"The geometry\'s offset. Values are [x, y] where negatives indicate left and up, respectively.","sdk-support":{"basic functionality":{js:"0.10.0",android:"2.0.1",ios:"2.0.0",macos:"0.1.0"},"data-driven styling":{}}},"fill-translate-anchor":{type:"enum",function:"piecewise-constant","zoom-function":!0,values:{map:{doc:"The fill is translated relative to the map."},viewport:{doc:"The fill is translated relative to the viewport."}},doc:"Controls the frame of reference for `fill-translate`.",default:"map",requires:["fill-translate"],"sdk-support":{"basic functionality":{js:"0.10.0",android:"2.0.1",ios:"2.0.0",macos:"0.1.0"},"data-driven styling":{}}},"fill-pattern":{type:"string",function:"piecewise-constant","zoom-function":!0,transition:!0,doc:"Name of image in sprite to use for drawing image fills. For seamless patterns, image width and height must be a factor of two (2, 4, 8, ..., 512).","sdk-support":{"basic functionality":{js:"0.10.0",android:"2.0.1",ios:"2.0.0",macos:"0.1.0"},"data-driven styling":{}}}},"paint_fill-extrusion":{"fill-extrusion-opacity":{type:"number",function:"interpolated","zoom-function":!0,"property-function":!1,default:1,minimum:0,maximum:1,doc:"The opacity of the entire fill extrusion layer. This is rendered on a per-layer, not per-feature, basis, and data-driven styling is not available.",transition:!0,"sdk-support":{"basic functionality":{js:"0.27.0",android:"5.1.0",ios:"3.6.0",macos:"0.5.0"}}},"fill-extrusion-color":{type:"color",default:"#000000",doc:"The base color of the extruded fill. The extrusion\'s surfaces will be shaded differently based on this color in combination with the root `light` settings. If this color is specified as `rgba` with an alpha component, the alpha component will be ignored; use `fill-extrusion-opacity` to set layer opacity.",function:"interpolated","zoom-function":!0,"property-function":!0,transition:!0,requires:[{"!":"fill-extrusion-pattern"}],"sdk-support":{"basic functionality":{js:"0.27.0",android:"5.1.0",ios:"3.6.0",macos:"0.5.0"},"data-driven styling":{js:"0.27.0",android:"5.1.0",ios:"3.6.0",macos:"0.5.0"}}},"fill-extrusion-translate":{type:"array",value:"number",length:2,default:[0,0],function:"interpolated","zoom-function":!0,transition:!0,units:"pixels",doc:"The geometry\'s offset. Values are [x, y] where negatives indicate left and up (on the flat plane), respectively.","sdk-support":{"basic functionality":{js:"0.27.0",android:"5.1.0",ios:"3.6.0",macos:"0.5.0"},"data-driven styling":{}}},"fill-extrusion-translate-anchor":{type:"enum",function:"piecewise-constant","zoom-function":!0,values:{map:{doc:"The fill extrusion is translated relative to the map."},viewport:{doc:"The fill extrusion is translated relative to the viewport."}},doc:"Controls the frame of reference for `fill-extrusion-translate`.",default:"map",requires:["fill-extrusion-translate"],"sdk-support":{"basic functionality":{js:"0.27.0",android:"5.1.0",ios:"3.6.0",macos:"0.5.0"},"data-driven styling":{}}},"fill-extrusion-pattern":{type:"string",function:"piecewise-constant","zoom-function":!0,transition:!0,doc:"Name of image in sprite to use for drawing images on extruded fills. For seamless patterns, image width and height must be a factor of two (2, 4, 8, ..., 512).","sdk-support":{"basic functionality":{js:"0.27.0",android:"5.1.0",ios:"3.6.0",macos:"0.5.0"},"data-driven styling":{}}},"fill-extrusion-height":{type:"number",function:"interpolated","zoom-function":!0,"property-function":!0,default:0,minimum:0,units:"meters",doc:"The height with which to extrude this layer.",transition:!0,"sdk-support":{"basic functionality":{js:"0.27.0",android:"5.1.0",ios:"3.6.0",macos:"0.5.0"},"data-driven styling":{js:"0.27.0",android:"5.1.0",ios:"3.6.0",macos:"0.5.0"}}},"fill-extrusion-base":{type:"number",function:"interpolated","zoom-function":!0,"property-function":!0,default:0,minimum:0,units:"meters",doc:"The height with which to extrude the base of this layer. Must be less than or equal to `fill-extrusion-height`.",transition:!0,requires:["fill-extrusion-height"],"sdk-support":{"basic functionality":{js:"0.27.0",android:"5.1.0",ios:"3.6.0",macos:"0.5.0"},"data-driven styling":{js:"0.27.0",android:"5.1.0",ios:"3.6.0",macos:"0.5.0"}}}},paint_line:{"line-opacity":{type:"number",doc:"The opacity at which the line will be drawn.",function:"interpolated","zoom-function":!0,"property-function":!0,default:1,minimum:0,maximum:1,transition:!0,"sdk-support":{"basic functionality":{js:"0.10.0",android:"2.0.1",ios:"2.0.0",macos:"0.1.0"},"data-driven styling":{js:"0.29.0",android:"5.0.0",ios:"3.5.0",macos:"0.4.0"}}},"line-color":{type:"color",doc:"The color with which the line will be drawn.",default:"#000000",function:"interpolated","zoom-function":!0,"property-function":!0,transition:!0,requires:[{"!":"line-pattern"}],"sdk-support":{"basic functionality":{js:"0.10.0",android:"2.0.1",ios:"2.0.0",macos:"0.1.0"},"data-driven styling":{js:"0.23.0",android:"5.0.0",ios:"3.5.0",macos:"0.4.0"}}},"line-translate":{type:"array",value:"number",length:2,default:[0,0],function:"interpolated","zoom-function":!0,transition:!0,units:"pixels",doc:"The geometry\'s offset. Values are [x, y] where negatives indicate left and up, respectively.","sdk-support":{"basic functionality":{js:"0.10.0",android:"2.0.1",ios:"2.0.0",macos:"0.1.0"},"data-driven styling":{}}},"line-translate-anchor":{type:"enum",function:"piecewise-constant","zoom-function":!0,values:{map:{doc:"The line is translated relative to the map."},viewport:{doc:"The line is translated relative to the viewport."}},doc:"Controls the frame of reference for `line-translate`.",default:"map",requires:["line-translate"],"sdk-support":{"basic functionality":{js:"0.10.0",android:"2.0.1",ios:"2.0.0",macos:"0.1.0"},"data-driven styling":{}}},"line-width":{type:"number",default:1,minimum:0,function:"interpolated","zoom-function":!0,"property-function":!0,transition:!0,units:"pixels",doc:"Stroke thickness.","sdk-support":{"basic functionality":{js:"0.10.0",android:"2.0.1",ios:"2.0.0",macos:"0.1.0"},"data-driven styling":{js:"0.39.0"}}},"line-gap-width":{type:"number",default:0,minimum:0,doc:"Draws a line casing outside of a line\'s actual path. Value indicates the width of the inner gap.",function:"interpolated","zoom-function":!0,"property-function":!0,transition:!0,units:"pixels","sdk-support":{"basic functionality":{js:"0.10.0",android:"2.0.1",ios:"2.0.0",macos:"0.1.0"},"data-driven styling":{js:"0.29.0",android:"5.0.0",ios:"3.5.0",macos:"0.4.0"}}},"line-offset":{type:"number",default:0,doc:"The line\'s offset. For linear features, a positive value offsets the line to the right, relative to the direction of the line, and a negative value to the left. For polygon features, a positive value results in an inset, and a negative value results in an outset.",function:"interpolated","zoom-function":!0,"property-function":!0,transition:!0,units:"pixels","sdk-support":{"basic functionality":{js:"0.12.1",android:"3.0.0",ios:"3.1.0",macos:"0.1.0"},"data-driven styling":{js:"0.29.0",android:"5.0.0",ios:"3.5.0",macos:"0.4.0"}}},"line-blur":{type:"number",default:0,minimum:0,function:"interpolated","zoom-function":!0,"property-function":!0,transition:!0,units:"pixels",doc:"Blur applied to the line, in pixels.","sdk-support":{"basic functionality":{js:"0.10.0",android:"2.0.1",ios:"2.0.0",macos:"0.1.0"},"data-driven styling":{js:"0.29.0",android:"5.0.0",ios:"3.5.0",macos:"0.4.0"}}},"line-dasharray":{type:"array",value:"number",function:"piecewise-constant","zoom-function":!0,doc:"Specifies the lengths of the alternating dashes and gaps that form the dash pattern. The lengths are later scaled by the line width. To convert a dash length to pixels, multiply the length by the current line width.",minimum:0,transition:!0,units:"line widths",requires:[{"!":"line-pattern"}],"sdk-support":{"basic functionality":{js:"0.10.0",android:"2.0.1",ios:"2.0.0",macos:"0.1.0"},"data-driven styling":{}}},"line-pattern":{type:"string",function:"piecewise-constant","zoom-function":!0,transition:!0,doc:"Name of image in sprite to use for drawing image lines. For seamless patterns, image width must be a factor of two (2, 4, 8, ..., 512).","sdk-support":{"basic functionality":{js:"0.10.0",android:"2.0.1",ios:"2.0.0",macos:"0.1.0"},"data-driven styling":{}}}},paint_circle:{"circle-radius":{type:"number",default:5,minimum:0,function:"interpolated","zoom-function":!0,"property-function":!0,transition:!0,units:"pixels",doc:"Circle radius.","sdk-support":{"basic functionality":{js:"0.10.0",android:"2.0.1",ios:"2.0.0",macos:"0.1.0"},"data-driven styling":{js:"0.18.0",android:"5.0.0",ios:"3.5.0",macos:"0.4.0"}}},"circle-color":{type:"color",default:"#000000",doc:"The fill color of the circle.",function:"interpolated","zoom-function":!0,"property-function":!0,transition:!0,"sdk-support":{"basic functionality":{js:"0.10.0",android:"2.0.1",ios:"2.0.0",macos:"0.1.0"},"data-driven styling":{js:"0.18.0",android:"5.0.0",ios:"3.5.0",macos:"0.4.0"}}},"circle-blur":{type:"number",default:0,doc:"Amount to blur the circle. 1 blurs the circle such that only the centerpoint is full opacity.",function:"interpolated","zoom-function":!0,"property-function":!0,transition:!0,"sdk-support":{"basic functionality":{js:"0.10.0",android:"2.0.1",ios:"2.0.0",macos:"0.1.0"},"data-driven styling":{js:"0.20.0",android:"5.0.0",ios:"3.5.0",macos:"0.4.0"}}},"circle-opacity":{type:"number",doc:"The opacity at which the circle will be drawn.",default:1,minimum:0,maximum:1,function:"interpolated","zoom-function":!0,"property-function":!0,transition:!0,"sdk-support":{"basic functionality":{js:"0.10.0",android:"2.0.1",ios:"2.0.0",macos:"0.1.0"},"data-driven styling":{js:"0.20.0",android:"5.0.0",ios:"3.5.0",macos:"0.4.0"}}},"circle-translate":{type:"array",value:"number",length:2,default:[0,0],function:"interpolated","zoom-function":!0,transition:!0,units:"pixels",doc:"The geometry\'s offset. Values are [x, y] where negatives indicate left and up, respectively.","sdk-support":{"basic functionality":{js:"0.10.0",android:"2.0.1",ios:"2.0.0",macos:"0.1.0"},"data-driven styling":{}}},"circle-translate-anchor":{type:"enum",function:"piecewise-constant","zoom-function":!0,values:{map:{doc:"The circle is translated relative to the map."},viewport:{doc:"The circle is translated relative to the viewport."}},doc:"Controls the frame of reference for `circle-translate`.",default:"map",requires:["circle-translate"],"sdk-support":{"basic functionality":{js:"0.10.0",android:"2.0.1",ios:"2.0.0",macos:"0.1.0"},"data-driven styling":{}}},"circle-pitch-scale":{type:"enum",function:"piecewise-constant","zoom-function":!0,values:{map:{doc:"Circles are scaled according to their apparent distance to the camera."},viewport:{doc:"Circles are not scaled."}},default:"map",doc:"Controls the scaling behavior of the circle when the map is pitched.","sdk-support":{"basic functionality":{js:"0.21.0",android:"4.2.0",ios:"3.4.0",macos:"0.2.1"},"data-driven styling":{}}},"circle-pitch-alignment":{type:"enum",function:"piecewise-constant","zoom-function":!0,values:{map:{doc:"The circle is aligned to the plane of the map."},viewport:{doc:"The circle is aligned to the plane of the viewport."}},default:"viewport",doc:"Orientation of circle when map is pitched.","sdk-support":{"basic functionality":{js:"0.39.0",android:"5.2.0",ios:"3.7.0",macos:"0.6.0"},"data-driven styling":{}}},"circle-stroke-width":{type:"number",default:0,minimum:0,function:"interpolated","zoom-function":!0,"property-function":!0,transition:!0,units:"pixels",doc:"The width of the circle\'s stroke. Strokes are placed outside of the `circle-radius`.","sdk-support":{"basic functionality":{js:"0.29.0",android:"5.0.0",ios:"3.5.0",macos:"0.4.0"},"data-driven styling":{js:"0.29.0",android:"5.0.0",ios:"3.5.0",macos:"0.4.0"}}},"circle-stroke-color":{type:"color",default:"#000000",doc:"The stroke color of the circle.",function:"interpolated","zoom-function":!0,"property-function":!0,transition:!0,"sdk-support":{"basic functionality":{js:"0.29.0",android:"5.0.0",ios:"3.5.0",macos:"0.4.0"},"data-driven styling":{js:"0.29.0",android:"5.0.0",ios:"3.5.0",macos:"0.4.0"}}},"circle-stroke-opacity":{type:"number",doc:"The opacity of the circle\'s stroke.",default:1,minimum:0,maximum:1,function:"interpolated","zoom-function":!0,"property-function":!0,transition:!0,"sdk-support":{"basic functionality":{js:"0.29.0",android:"5.0.0",ios:"3.5.0",macos:"0.4.0"},"data-driven styling":{js:"0.29.0",android:"5.0.0",ios:"3.5.0",macos:"0.4.0"}}}},paint_heatmap:{"heatmap-radius":{type:"number",default:30,minimum:1,function:"interpolated","zoom-function":!0,"property-function":!0,transition:!0,units:"pixels",doc:"Radius of influence of one heatmap point in pixels. Increasing the value makes the heatmap smoother, but less detailed.","sdk-support":{"basic functionality":{js:"0.41.0"},"data-driven styling":{}}},"heatmap-weight":{type:"number",default:1,minimum:0,function:"interpolated","zoom-function":!0,"property-function":!0,transition:!1,doc:"A measure of how much an individual point contributes to the heatmap. A value of 10 would be equivalent to having 10 points of weight 1 in the same spot. Especially useful when combined with clustering.","sdk-support":{"basic functionality":{js:"0.41.0"},"data-driven styling":{js:"0.41.0"}}},"heatmap-intensity":{type:"number",default:1,minimum:0,function:"interpolated","zoom-function":!0,"property-function":!1,transition:!0,doc:"Similar to `heatmap-weight` but controls the intensity of the heatmap globally. Primarily used for adjusting the heatmap based on zoom level.","sdk-support":{"basic functionality":{js:"0.41.0"},"data-driven styling":{}}},"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"],doc:\'Defines the color of each pixel based on its density value in a heatmap.  Should be an expression that uses `["heatmap-density"]` as input.\',function:"interpolated","zoom-function":!1,"property-function":!1,transition:!1,"sdk-support":{"basic functionality":{js:"0.41.0"},"data-driven styling":{}}},"heatmap-opacity":{type:"number",doc:"The global opacity at which the heatmap layer will be drawn.",default:1,minimum:0,maximum:1,function:"interpolated","zoom-function":!0,"property-function":!1,transition:!0,"sdk-support":{"basic functionality":{js:"0.41.0"},"data-driven styling":{}}}},paint_symbol:{"icon-opacity":{doc:"The opacity at which the icon will be drawn.",type:"number",default:1,minimum:0,maximum:1,function:"interpolated","zoom-function":!0,"property-function":!0,transition:!0,requires:["icon-image"],"sdk-support":{"basic functionality":{js:"0.10.0",android:"2.0.1",ios:"2.0.0",macos:"0.1.0"},"data-driven styling":{js:"0.33.0",android:"5.0.0",ios:"3.5.0",macos:"0.4.0"}}},"icon-color":{type:"color",default:"#000000",function:"interpolated","zoom-function":!0,"property-function":!0,transition:!0,doc:"The color of the icon. This can only be used with sdf icons.",requires:["icon-image"],"sdk-support":{"basic functionality":{js:"0.10.0",android:"2.0.1",ios:"2.0.0",macos:"0.1.0"},"data-driven styling":{js:"0.33.0",android:"5.0.0",ios:"3.5.0",macos:"0.4.0"}}},"icon-halo-color":{type:"color",default:"rgba(0, 0, 0, 0)",function:"interpolated","zoom-function":!0,"property-function":!0,transition:!0,doc:"The color of the icon\'s halo. Icon halos can only be used with SDF icons.",requires:["icon-image"],"sdk-support":{"basic functionality":{js:"0.10.0",android:"2.0.1",ios:"2.0.0",macos:"0.1.0"},"data-driven styling":{js:"0.33.0",android:"5.0.0",ios:"3.5.0",macos:"0.4.0"}}},"icon-halo-width":{type:"number",default:0,minimum:0,function:"interpolated","zoom-function":!0,"property-function":!0,transition:!0,units:"pixels",doc:"Distance of halo to the icon outline.",requires:["icon-image"],"sdk-support":{"basic functionality":{js:"0.10.0",android:"2.0.1",ios:"2.0.0",macos:"0.1.0"},"data-driven styling":{js:"0.33.0",android:"5.0.0",ios:"3.5.0",macos:"0.4.0"}}},"icon-halo-blur":{type:"number",default:0,minimum:0,function:"interpolated","zoom-function":!0,"property-function":!0,transition:!0,units:"pixels",doc:"Fade out the halo towards the outside.",requires:["icon-image"],"sdk-support":{"basic functionality":{js:"0.10.0",android:"2.0.1",ios:"2.0.0",macos:"0.1.0"},"data-driven styling":{js:"0.33.0",android:"5.0.0",ios:"3.5.0",macos:"0.4.0"}}},"icon-translate":{type:"array",value:"number",length:2,default:[0,0],function:"interpolated","zoom-function":!0,transition:!0,units:"pixels",doc:"Distance that the icon\'s anchor is moved from its original placement. Positive values indicate right and down, while negative values indicate left and up.",requires:["icon-image"],"sdk-support":{"basic functionality":{js:"0.10.0",android:"2.0.1",ios:"2.0.0",macos:"0.1.0"},"data-driven styling":{}}},"icon-translate-anchor":{type:"enum",function:"piecewise-constant","zoom-function":!0,values:{map:{doc:"Icons are translated relative to the map."},viewport:{doc:"Icons are translated relative to the viewport."}},doc:"Controls the frame of reference for `icon-translate`.",default:"map",requires:["icon-image","icon-translate"],"sdk-support":{"basic functionality":{js:"0.10.0",android:"2.0.1",ios:"2.0.0",macos:"0.1.0"},"data-driven styling":{}}},"text-opacity":{type:"number",doc:"The opacity at which the text will be drawn.",default:1,minimum:0,maximum:1,function:"interpolated","zoom-function":!0,"property-function":!0,transition:!0,requires:["text-field"],"sdk-support":{"basic functionality":{js:"0.10.0",android:"2.0.1",ios:"2.0.0",macos:"0.1.0"},"data-driven styling":{js:"0.33.0",android:"5.0.0",ios:"3.5.0",macos:"0.4.0"}}},"text-color":{type:"color",doc:"The color with which the text will be drawn.",default:"#000000",function:"interpolated","zoom-function":!0,"property-function":!0,transition:!0,requires:["text-field"],"sdk-support":{"basic functionality":{js:"0.10.0",android:"2.0.1",ios:"2.0.0",macos:"0.1.0"},"data-driven styling":{js:"0.33.0",android:"5.0.0",ios:"3.5.0",macos:"0.4.0"}}},"text-halo-color":{type:"color",default:"rgba(0, 0, 0, 0)",function:"interpolated","zoom-function":!0,"property-function":!0,transition:!0,doc:"The color of the text\'s halo, which helps it stand out from backgrounds.",requires:["text-field"],"sdk-support":{"basic functionality":{js:"0.10.0",android:"2.0.1",ios:"2.0.0",macos:"0.1.0"},"data-driven styling":{js:"0.33.0",android:"5.0.0",ios:"3.5.0",macos:"0.4.0"}}},"text-halo-width":{type:"number",default:0,minimum:0,function:"interpolated","zoom-function":!0,"property-function":!0,transition:!0,units:"pixels",doc:"Distance of halo to the font outline. Max text halo width is 1/4 of the font-size.",requires:["text-field"],"sdk-support":{"basic functionality":{js:"0.10.0",android:"2.0.1",ios:"2.0.0",macos:"0.1.0"},"data-driven styling":{js:"0.33.0",android:"5.0.0",ios:"3.5.0",macos:"0.4.0"}}},"text-halo-blur":{type:"number",default:0,minimum:0,function:"interpolated","zoom-function":!0,"property-function":!0,transition:!0,units:"pixels",doc:"The halo\'s fadeout distance towards the outside.",requires:["text-field"],"sdk-support":{"basic functionality":{js:"0.10.0",android:"2.0.1",ios:"2.0.0",macos:"0.1.0"},"data-driven styling":{js:"0.33.0",android:"5.0.0",ios:"3.5.0",macos:"0.4.0"}}},"text-translate":{type:"array",value:"number",length:2,default:[0,0],function:"interpolated","zoom-function":!0,transition:!0,units:"pixels",doc:"Distance that the text\'s anchor is moved from its original placement. Positive values indicate right and down, while negative values indicate left and up.",requires:["text-field"],"sdk-support":{"basic functionality":{js:"0.10.0",android:"2.0.1",ios:"2.0.0",macos:"0.1.0"},"data-driven styling":{}}},"text-translate-anchor":{type:"enum",function:"piecewise-constant","zoom-function":!0,values:{map:{doc:"The text is translated relative to the map."},viewport:{doc:"The text is translated relative to the viewport."}},doc:"Controls the frame of reference for `text-translate`.",default:"map",requires:["text-field","text-translate"],"sdk-support":{"basic functionality":{js:"0.10.0",android:"2.0.1",ios:"2.0.0",macos:"0.1.0"},"data-driven styling":{}}}},paint_raster:{"raster-opacity":{type:"number",doc:"The opacity at which the image will be drawn.",default:1,minimum:0,maximum:1,function:"interpolated","zoom-function":!0,transition:!0,"sdk-support":{"basic functionality":{js:"0.10.0",android:"2.0.1",ios:"2.0.0",macos:"0.1.0"},"data-driven styling":{}}},"raster-hue-rotate":{type:"number",default:0,period:360,function:"interpolated","zoom-function":!0,transition:!0,units:"degrees",doc:"Rotates hues around the color wheel.","sdk-support":{"basic functionality":{js:"0.10.0",android:"2.0.1",ios:"2.0.0",macos:"0.1.0"},"data-driven styling":{}}},"raster-brightness-min":{type:"number",function:"interpolated","zoom-function":!0,doc:"Increase or reduce the brightness of the image. The value is the minimum brightness.",default:0,minimum:0,maximum:1,transition:!0,"sdk-support":{"basic functionality":{js:"0.10.0",android:"2.0.1",ios:"2.0.0",macos:"0.1.0"},"data-driven styling":{}}},"raster-brightness-max":{type:"number",function:"interpolated","zoom-function":!0,doc:"Increase or reduce the brightness of the image. The value is the maximum brightness.",default:1,minimum:0,maximum:1,transition:!0,"sdk-support":{"basic functionality":{js:"0.10.0",android:"2.0.1",ios:"2.0.0",macos:"0.1.0"},"data-driven styling":{}}},"raster-saturation":{type:"number",doc:"Increase or reduce the saturation of the image.",default:0,minimum:-1,maximum:1,function:"interpolated","zoom-function":!0,transition:!0,"sdk-support":{"basic functionality":{js:"0.10.0",android:"2.0.1",ios:"2.0.0",macos:"0.1.0"},"data-driven styling":{}}},"raster-contrast":{type:"number",doc:"Increase or reduce the contrast of the image.",default:0,minimum:-1,maximum:1,function:"interpolated","zoom-function":!0,transition:!0,"sdk-support":{"basic functionality":{js:"0.10.0",android:"2.0.1",ios:"2.0.0",macos:"0.1.0"},"data-driven styling":{}}},"raster-fade-duration":{type:"number",default:300,minimum:0,function:"interpolated","zoom-function":!0,transition:!1,units:"milliseconds",doc:"Fade duration when a new tile is added.","sdk-support":{"basic functionality":{js:"0.10.0",android:"2.0.1",ios:"2.0.0",macos:"0.1.0"},"data-driven styling":{}}}},paint_hillshade:{"hillshade-illumination-direction":{type:"number",default:335,minimum:0,maximum:359,doc:"The direction of the light source used to generate the hillshading with 0 as the top of the viewport if `hillshade-illumination-anchor` is set to `viewport` and due north if `hillshade-illumination-anchor` is set to `map`.",function:"interpolated","zoom-function":!0,transition:!1},"hillshade-illumination-anchor":{type:"enum",function:"piecewise-constant","zoom-function":!0,values:{map:{doc:"The hillshade illumination is relative to the north direction."},viewport:{doc:"The hillshade illumination is relative to the top of the viewport."}},default:"viewport",doc:"Direction of light source when map is rotated."},"hillshade-exaggeration":{type:"number",doc:"Intensity of the hillshade",default:.5,minimum:0,maximum:1,function:"interpolated","zoom-function":!0,transition:!0},"hillshade-shadow-color":{type:"color",default:"#000000",doc:"The shading color of areas that face away from the light source.",function:"interpolated","zoom-function":!0,transition:!0},"hillshade-highlight-color":{type:"color",default:"#FFFFFF",doc:"The shading color of areas that faces towards the light source.",function:"interpolated","zoom-function":!0,transition:!0},"hillshade-accent-color":{type:"color",default:"#000000",doc:"The shading color used to accentuate rugged terrain like sharp cliffs and gorges.",function:"interpolated","zoom-function":!0,transition:!0}},paint_background:{"background-color":{type:"color",default:"#000000",doc:"The color with which the background will be drawn.",function:"interpolated","zoom-function":!0,transition:!0,requires:[{"!":"background-pattern"}],"sdk-support":{"basic functionality":{js:"0.10.0",android:"2.0.1",ios:"2.0.0",macos:"0.1.0"}}},"background-pattern":{type:"string",function:"piecewise-constant","zoom-function":!0,transition:!0,doc:"Name of image in sprite to use for drawing an image background. For seamless patterns, image width and height must be a factor of two (2, 4, 8, ..., 512).","sdk-support":{"basic functionality":{js:"0.10.0",android:"2.0.1",ios:"2.0.0",macos:"0.1.0"}}},"background-opacity":{type:"number",default:1,minimum:0,maximum:1,doc:"The opacity at which the background will be drawn.",function:"interpolated","zoom-function":!0,transition:!0,"sdk-support":{"basic functionality":{js:"0.10.0",android:"2.0.1",ios:"2.0.0",macos:"0.1.0"}}}},transition:{duration:{type:"number",default:300,minimum:0,units:"milliseconds",doc:"Time allotted for transitions to complete."},delay:{type:"number",default:0,minimum:0,units:"milliseconds",doc:"Length of time before a transition begins."}}}},function(t,e,n){t.exports=n(104),t.exports.emitErrors=function(t,e){if(e&&e.length){var n=!0,r=!1,i=void 0;try{for(var o,a=e[Symbol.iterator]();!(n=(o=a.next()).done);n=!0){var s=o.value.message;t.fire("error",{error:new Error(s)})}}catch(t){r=!0,i=t}finally{try{n||null==a.return||a.return()}finally{if(r)throw i}}return!0}return!1}},function(t,e,n){var r=n(64),i=n(16),o=n(8),a=n(107);function s(t,e){e=e||o;var n=[];return n=n.concat(i({key:"",value:t,valueSpec:e.$root,styleSpec:e,style:t,objectElementValidators:{glyphs:a,"*":function(){return[]}}})),t.constants&&(n=n.concat(r({key:"constants",value:t.constants,style:t,styleSpec:e}))),u(n)}function u(t){return[].concat(t).sort(function(t,e){return t.line-e.line})}function l(t){return function(){return u(t.apply(this,arguments))}}s.source=l(n(73)),s.light=l(n(74)),s.layer=l(n(69)),s.filter=l(n(38)),s.paintProperty=l(n(70)),s.layoutProperty=l(n(72)),t.exports=s},function(t,e,n){var r=n(7),i=n(5);t.exports=function(t){var e=t.value,n=t.key,o=r(e);return"boolean"!==o?[new i(n,e,"boolean expected, ".concat(o," found"))]:[]}},function(t,e,n){var r=n(5),i=n(7),o=n(49).parseCSSColor;t.exports=function(t){var e=t.key,n=t.value,a=i(n);return"string"!==a?[new r(e,n,"color expected, ".concat(a," found"))]:null===o(n)?[new r(e,n,\'color expected, "\'.concat(n,\'" found\'))]:[]}},function(t,e,n){var r=n(5),i=n(75);t.exports=function(t){var e=t.value,n=t.key,o=i(t);return o.length?o:(-1===e.indexOf("{fontstack}")&&o.push(new r(n,e,\'"glyphs" url must include a "{fontstack}" token\')),-1===e.indexOf("{range}")&&o.push(new r(n,e,\'"glyphs" url must include a "{range}" token\')),o)}},function(t,e,n){function r(t){return(r="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t})(t)}function i(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,r.key,r)}}function o(t,e){return!e||"object"!==r(e)&&"function"!=typeof e?function(t){if(void 0===t)throw new ReferenceError("this hasn\'t been initialised - super() hasn\'t been called");return t}(t):e}function a(t){return(a=Object.setPrototypeOf?Object.getPrototypeOf:function(t){return t.__proto__||Object.getPrototypeOf(t)})(t)}function s(t,e){return(s=Object.setPrototypeOf||function(t,e){return t.__proto__=e,t})(t,e)}var u=n(9),l=n(77),c=n(28).multiPolygonIntersectsBufferedMultiPoint,f=n(30),h=f.getMaximumPaintValue,p=f.translateDistance,y=f.translate,d=n(111),v=n(1),m=(v.Transitionable,v.Transitioning,v.PossiblyEvaluated,function(t){function e(t){return function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,e),o(this,a(e).call(this,t,d))}var n,r,f;return function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),e&&s(t,e)}(e,u),n=e,(r=[{key:"createBucket",value:function(t){return new l(t)}},{key:"queryRadius",value:function(t){var e=t;return h("circle-radius",this,e)+h("circle-stroke-width",this,e)+p(this.paint.get("circle-translate"))}},{key:"queryIntersectsFeature",value:function(t,e,n,r,i,o){var a=y(t,this.paint.get("circle-translate"),this.paint.get("circle-translate-anchor"),i,o),s=this.paint.get("circle-radius").evaluate(e)*o,u=this.paint.get("circle-stroke-width").evaluate(e)*o;return c(a,n,s+u)}}])&&i(n.prototype,r),f&&i(n,f),e}());t.exports=m},function(t,e,n){var r=n(17).createLayout;t.exports=r([{name:"a_pos",components:2,type:"Int16"}],4)},function(t,e,n){var r=n(2);e.packUint8ToFloat=function(t,e){return 256*(t=r.clamp(Math.floor(t),0,255))+(e=r.clamp(Math.floor(e),0,255))}},function(t,e,n){var r=n(8),i=n(1),o=i.Properties,a=i.DataConstantProperty,s=i.DataDrivenProperty,u=(i.CrossFadedProperty,i.HeatmapColorProperty,new o({"circle-radius":new s(r.paint_circle["circle-radius"]),"circle-color":new s(r.paint_circle["circle-color"]),"circle-blur":new s(r.paint_circle["circle-blur"]),"circle-opacity":new s(r.paint_circle["circle-opacity"]),"circle-translate":new a(r.paint_circle["circle-translate"]),"circle-translate-anchor":new a(r.paint_circle["circle-translate-anchor"]),"circle-pitch-scale":new a(r.paint_circle["circle-pitch-scale"]),"circle-pitch-alignment":new a(r.paint_circle["circle-pitch-alignment"]),"circle-stroke-width":new s(r.paint_circle["circle-stroke-width"]),"circle-stroke-color":new s(r.paint_circle["circle-stroke-color"]),"circle-stroke-opacity":new s(r.paint_circle["circle-stroke-opacity"])}));t.exports={paint:u}},function(t,e,n){function r(t){return(r="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t})(t)}function i(t,e){return!e||"object"!==r(e)&&"function"!=typeof e?function(t){if(void 0===t)throw new ReferenceError("this hasn\'t been initialised - super() hasn\'t been called");return t}(t):e}function o(t,e,n){return(o="undefined"!=typeof Reflect&&Reflect.get?Reflect.get:function(t,e,n){var r=function(t,e){for(;!Object.prototype.hasOwnProperty.call(t,e)&&null!==(t=a(t)););return t}(t,e);if(r){var i=Object.getOwnPropertyDescriptor(r,e);return i.get?i.get.call(n):i.value}})(t,e,n||t)}function a(t){return(a=Object.setPrototypeOf?Object.getPrototypeOf:function(t){return t.__proto__||Object.getPrototypeOf(t)})(t)}function s(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,r.key,r)}}function u(t,e,n){return e&&s(t.prototype,e),n&&s(t,n),t}function l(t,e){return(l=Object.setPrototypeOf||function(t,e){return t.__proto__=e,t})(t,e)}var c=n(9),f=n(113),h=n(29).RGBAImage,p=n(114),y=n(1),d=(y.Transitionable,y.Transitioning,y.PossiblyEvaluated,function(t){function e(t){var n;return function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,e),(n=i(this,a(e).call(this,t,p)))._updateColorRamp(),n}return function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),e&&l(t,e)}(e,c),u(e,[{key:"createBucket",value:function(t){return new f(t)}}]),u(e,[{key:"setPaintProperty",value:function(t,n,r){o(a(e.prototype),"setPaintProperty",this).call(this,t,n,r),"heatmap-color"===t&&this._updateColorRamp()}},{key:"_updateColorRamp",value:function(){for(var t=this._transitionablePaint._values["heatmap-color"].value.expression,e=new Uint8Array(1024),n=e.length,r=4;r<n;r+=4){var i=t.evaluate({heatmapDensity:r/n});e[r+0]=Math.floor(255*i.r/i.a),e[r+1]=Math.floor(255*i.g/i.a),e[r+2]=Math.floor(255*i.b/i.a),e[r+3]=Math.floor(255*i.a)}this.colorRamp=new h({width:256,height:1},e),this.colorRampTexture=null}},{key:"resize",value:function(){this.heatmapFbo&&(this.heatmapFbo.destroy(),this.heatmapFbo=null)}},{key:"queryRadius",value:function(){return 0}},{key:"queryIntersectsFeature",value:function(){return!1}},{key:"hasOffscreenPass",value:function(){return 0!==this.paint.get("heatmap-opacity")&&"none"!==this.visibility}}]),e}());t.exports=d},function(t,e,n){function r(t){return(r="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t})(t)}function i(t,e){return!e||"object"!==r(e)&&"function"!=typeof e?function(t){if(void 0===t)throw new ReferenceError("this hasn\'t been initialised - super() hasn\'t been called");return t}(t):e}function o(t){return(o=Object.setPrototypeOf?Object.getPrototypeOf:function(t){return t.__proto__||Object.getPrototypeOf(t)})(t)}function a(t,e){return(a=Object.setPrototypeOf||function(t,e){return t.__proto__=e,t})(t,e)}var s=n(77),u=n(3).register,l=function(t){function e(){return function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,e),i(this,o(e).apply(this,arguments))}return function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),e&&a(t,e)}(e,s),e}();u("HeatmapBucket",l,{omit:["layers"]}),t.exports=l},function(t,e,n){var r=n(8),i=n(1),o=i.Properties,a=i.DataConstantProperty,s=i.DataDrivenProperty,u=(i.CrossFadedProperty,i.HeatmapColorProperty),l=new o({"heatmap-radius":new s(r.paint_heatmap["heatmap-radius"]),"heatmap-weight":new s(r.paint_heatmap["heatmap-weight"]),"heatmap-intensity":new a(r.paint_heatmap["heatmap-intensity"]),"heatmap-color":new u(r.paint_heatmap["heatmap-color"]),"heatmap-opacity":new a(r.paint_heatmap["heatmap-opacity"])});t.exports={paint:l}},function(t,e,n){function r(t){return(r="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t})(t)}function i(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,r.key,r)}}function o(t,e){return!e||"object"!==r(e)&&"function"!=typeof e?function(t){if(void 0===t)throw new ReferenceError("this hasn\'t been initialised - super() hasn\'t been called");return t}(t):e}function a(t){return(a=Object.setPrototypeOf?Object.getPrototypeOf:function(t){return t.__proto__||Object.getPrototypeOf(t)})(t)}function s(t,e){return(s=Object.setPrototypeOf||function(t,e){return t.__proto__=e,t})(t,e)}var u=n(9),l=n(116),c=n(1),f=(c.Transitionable,c.Transitioning,c.PossiblyEvaluated,function(t){function e(t){return function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,e),o(this,a(e).call(this,t,l))}var n,r,c;return function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),e&&s(t,e)}(e,u),n=e,(r=[{key:"hasOffscreenPass",value:function(){return 0!==this.paint.get("hillshade-exaggeration")&&"none"!==this.visibility}}])&&i(n.prototype,r),c&&i(n,c),e}());t.exports=f},function(t,e,n){var r=n(8),i=n(1),o=i.Properties,a=i.DataConstantProperty,s=(i.DataDrivenProperty,i.CrossFadedProperty,i.HeatmapColorProperty,new o({"hillshade-illumination-direction":new a(r.paint_hillshade["hillshade-illumination-direction"]),"hillshade-illumination-anchor":new a(r.paint_hillshade["hillshade-illumination-anchor"]),"hillshade-exaggeration":new a(r.paint_hillshade["hillshade-exaggeration"]),"hillshade-shadow-color":new a(r.paint_hillshade["hillshade-shadow-color"]),"hillshade-highlight-color":new a(r.paint_hillshade["hillshade-highlight-color"]),"hillshade-accent-color":new a(r.paint_hillshade["hillshade-accent-color"])}));t.exports={paint:s}},function(t,e,n){function r(t){return(r="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t})(t)}function i(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,r.key,r)}}function o(t,e){return!e||"object"!==r(e)&&"function"!=typeof e?function(t){if(void 0===t)throw new ReferenceError("this hasn\'t been initialised - super() hasn\'t been called");return t}(t):e}function a(t){return(a=Object.setPrototypeOf?Object.getPrototypeOf:function(t){return t.__proto__||Object.getPrototypeOf(t)})(t)}function s(t,e){return(s=Object.setPrototypeOf||function(t,e){return t.__proto__=e,t})(t,e)}var u=n(9),l=n(118),c=n(28).multiPolygonIntersectsMultiPolygon,f=n(30),h=f.translateDistance,p=f.translate,y=n(121),d=n(1),v=(d.Transitionable,d.Transitioning,d.PossiblyEvaluated,function(t){function e(t){return function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,e),o(this,a(e).call(this,t,y))}var n,r,f;return function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),e&&s(t,e)}(e,u),n=e,(r=[{key:"recalculate",value: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"])}},{key:"createBucket",value:function(t){return new l(t)}},{key:"queryRadius",value:function(){return h(this.paint.get("fill-translate"))}},{key:"queryIntersectsFeature",value:function(t,e,n,r,i,o){var a=p(t,this.paint.get("fill-translate"),this.paint.get("fill-translate-anchor"),i,o);return c(a,n)}}])&&i(n.prototype,r),f&&i(n,f),e}());t.exports=v},function(t,e,n){function r(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,r.key,r)}}var i=n(10).FillLayoutArray,o=n(119).members,a=n(25).SegmentVector,s=n(26).ProgramConfigurationSet,u=n(27),l=u.LineIndexArray,c=u.TriangleIndexArray,f=n(20),h=n(78),p=n(40),y=n(0),d=n(3).register,v=function(){function t(e){!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,t),this.zoom=e.zoom,this.overscaling=e.overscaling,this.layers=e.layers,this.layerIds=this.layers.map(function(t){return t.id}),this.index=e.index,this.layoutVertexArray=new i,this.indexArray=new c,this.indexArray2=new l,this.programConfigurations=new s(o,e.layers,e.zoom),this.segments=new a,this.segments2=new a}var e,n,u;return e=t,(n=[{key:"populate",value:function(t,e){var n=!0,r=!1,i=void 0;try{for(var o,a=t[Symbol.iterator]();!(n=(o=a.next()).done);n=!0){var s=o.value,u=s.feature,l=s.index,c=s.sourceLayerIndex;if(this.layers[0]._featureFilter({zoom:this.zoom},u)){var h=f(u);this.addFeature(u,h),e.featureIndex.insert(u,h,l,c,this.index)}}}catch(t){r=!0,i=t}finally{try{n||null==a.return||a.return()}finally{if(r)throw i}}}},{key:"isEmpty",value:function(){return 0===this.layoutVertexArray.length}},{key:"upload",value:function(t){this.layoutVertexBuffer=t.createVertexBuffer(this.layoutVertexArray,o),this.indexBuffer=t.createIndexBuffer(this.indexArray),this.indexBuffer2=t.createIndexBuffer(this.indexArray2),this.programConfigurations.upload(t)}},{key:"destroy",value:function(){this.layoutVertexBuffer&&(this.layoutVertexBuffer.destroy(),this.indexBuffer.destroy(),this.indexBuffer2.destroy(),this.programConfigurations.destroy(),this.segments.destroy(),this.segments2.destroy())}},{key:"addFeature",value:function(t,e){var n=!0,r=!1,i=void 0;try{for(var o,a=p(e,500)[Symbol.iterator]();!(n=(o=a.next()).done);n=!0){var s=o.value,u=0,l=!0,c=!1,f=void 0;try{for(var d,v=s[Symbol.iterator]();!(l=(d=v.next()).done);l=!0){u+=d.value.length}}catch(t){c=!0,f=t}finally{try{l||null==v.return||v.return()}finally{if(c)throw f}}var m=this.segments.prepareSegment(u,this.layoutVertexArray,this.indexArray),g=m.vertexLength,b=[],x=[],w=!0,k=!1,_=void 0;try{for(var S,A=s[Symbol.iterator]();!(w=(S=A.next()).done);w=!0){var T=S.value;if(0!==T.length){T!==s[0]&&x.push(b.length/2);var j=this.segments2.prepareSegment(T.length,this.layoutVertexArray,this.indexArray2),O=j.vertexLength;this.layoutVertexArray.emplaceBack(T[0].x,T[0].y),this.indexArray2.emplaceBack(O+T.length-1,O),b.push(T[0].x),b.push(T[0].y);for(var z=1;z<T.length;z++)this.layoutVertexArray.emplaceBack(T[z].x,T[z].y),this.indexArray2.emplaceBack(O+z-1,O+z),b.push(T[z].x),b.push(T[z].y);j.vertexLength+=T.length,j.primitiveLength+=T.length}}}catch(t){k=!0,_=t}finally{try{w||null==A.return||A.return()}finally{if(k)throw _}}var P=h(b,x);y(P.length%3==0);for(var E=0;E<P.length;E+=3)this.indexArray.emplaceBack(g+P[E],g+P[E+1],g+P[E+2]);m.vertexLength+=u,m.primitiveLength+=P.length/3}}catch(t){r=!0,i=t}finally{try{n||null==a.return||a.return()}finally{if(r)throw i}}this.programConfigurations.populatePaintArrays(this.layoutVertexArray.length,t)}}])&&r(e.prototype,n),u&&r(e,u),t}();d("FillBucket",v,{omit:["layers"]}),t.exports=v},function(t,e,n){var r=n(17).createLayout;t.exports=r([{name:"a_pos",components:2,type:"Int16"}],4)},function(t,e,n){t.exports=function(){"use strict";function t(t,e,n){var r=t[e];t[e]=t[n],t[n]=r}function e(t,e){return t<e?-1:t>e?1:0}return function(n,r,i,o,a){!function e(n,r,i,o,a){for(;o>i;){if(o-i>600){var s=o-i+1,u=r-i+1,l=Math.log(s),c=.5*Math.exp(2*l/3),f=.5*Math.sqrt(l*c*(s-c)/s)*(u-s/2<0?-1:1),h=Math.max(i,Math.floor(r-u*c/s+f)),p=Math.min(o,Math.floor(r+(s-u)*c/s+f));e(n,r,h,p,a)}var y=n[r],d=i,v=o;for(t(n,i,r),a(n[o],y)>0&&t(n,i,o);d<v;){for(t(n,d,v),d++,v--;a(n[d],y)<0;)d++;for(;a(n[v],y)>0;)v--}0===a(n[i],y)?t(n,i,v):t(n,++v,o),v<=r&&(i=v+1),r<=v&&(o=v-1)}}(n,r,i||0,o||n.length-1,a||e)}}()},function(t,e,n){var r=n(8),i=n(1),o=i.Properties,a=i.DataConstantProperty,s=i.DataDrivenProperty,u=i.CrossFadedProperty,l=(i.HeatmapColorProperty,new o({"fill-antialias":new a(r.paint_fill["fill-antialias"]),"fill-opacity":new s(r.paint_fill["fill-opacity"]),"fill-color":new s(r.paint_fill["fill-color"]),"fill-outline-color":new s(r.paint_fill["fill-outline-color"]),"fill-translate":new a(r.paint_fill["fill-translate"]),"fill-translate-anchor":new a(r.paint_fill["fill-translate-anchor"]),"fill-pattern":new u(r.paint_fill["fill-pattern"])}));t.exports={paint:l}},function(t,e,n){function r(t){return(r="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t})(t)}function i(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,r.key,r)}}function o(t,e){return!e||"object"!==r(e)&&"function"!=typeof e?function(t){if(void 0===t)throw new ReferenceError("this hasn\'t been initialised - super() hasn\'t been called");return t}(t):e}function a(t){return(a=Object.setPrototypeOf?Object.getPrototypeOf:function(t){return t.__proto__||Object.getPrototypeOf(t)})(t)}function s(t,e){return(s=Object.setPrototypeOf||function(t,e){return t.__proto__=e,t})(t,e)}var u=n(9),l=n(123),c=n(28).multiPolygonIntersectsMultiPolygon,f=n(30),h=f.translateDistance,p=f.translate,y=n(125),d=n(1),v=(d.Transitionable,d.Transitioning,d.PossiblyEvaluated,function(t){function e(t){return function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,e),o(this,a(e).call(this,t,y))}var n,r,f;return function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),e&&s(t,e)}(e,u),n=e,(r=[{key:"createBucket",value:function(t){return new l(t)}},{key:"queryRadius",value:function(){return h(this.paint.get("fill-extrusion-translate"))}},{key:"queryIntersectsFeature",value:function(t,e,n,r,i,o){var a=p(t,this.paint.get("fill-extrusion-translate"),this.paint.get("fill-extrusion-translate-anchor"),i,o);return c(a,n)}},{key:"hasOffscreenPass",value:function(){return 0!==this.paint.get("fill-extrusion-opacity")&&"none"!==this.visibility}},{key:"resize",value:function(){this.viewportFrame&&(this.viewportFrame.destroy(),this.viewportFrame=null)}}])&&i(n.prototype,r),f&&i(n,f),e}());t.exports=v},function(t,e,n){function r(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,r.key,r)}}var i=n(10).FillExtrusionLayoutArray,o=n(124).members,a=n(25),s=a.SegmentVector,u=a.MAX_VERTEX_ARRAY_LENGTH,l=n(26).ProgramConfigurationSet,c=n(27).TriangleIndexArray,f=n(20),h=n(18),p=n(78),y=n(40),d=n(0),v=n(3).register,m=Math.pow(2,13);function g(t,e,n,r,i,o,a,s){t.emplaceBack(e,n,2*Math.floor(r*m)+a,i*m*2,o*m*2,Math.round(s))}var b=function(){function t(e){!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,t),this.zoom=e.zoom,this.overscaling=e.overscaling,this.layers=e.layers,this.layerIds=this.layers.map(function(t){return t.id}),this.index=e.index,this.layoutVertexArray=new i,this.indexArray=new c,this.programConfigurations=new l(o,e.layers,e.zoom),this.segments=new s}var e,n,a;return e=t,(n=[{key:"populate",value:function(t,e){var n=!0,r=!1,i=void 0;try{for(var o,a=t[Symbol.iterator]();!(n=(o=a.next()).done);n=!0){var s=o.value,u=s.feature,l=s.index,c=s.sourceLayerIndex;if(this.layers[0]._featureFilter({zoom:this.zoom},u)){var h=f(u);this.addFeature(u,h),e.featureIndex.insert(u,h,l,c,this.index)}}}catch(t){r=!0,i=t}finally{try{n||null==a.return||a.return()}finally{if(r)throw i}}}},{key:"isEmpty",value:function(){return 0===this.layoutVertexArray.length}},{key:"upload",value:function(t){this.layoutVertexBuffer=t.createVertexBuffer(this.layoutVertexArray,o),this.indexBuffer=t.createIndexBuffer(this.indexArray),this.programConfigurations.upload(t)}},{key:"destroy",value:function(){this.layoutVertexBuffer&&(this.layoutVertexBuffer.destroy(),this.indexBuffer.destroy(),this.programConfigurations.destroy(),this.segments.destroy())}},{key:"addFeature",value:function(t,e){var n=!0,r=!1,i=void 0;try{for(var o,a=y(e,500)[Symbol.iterator]();!(n=(o=a.next()).done);n=!0){var s=o.value,l=0,c=!0,f=!1,h=void 0;try{for(var v,m=s[Symbol.iterator]();!(c=(v=m.next()).done);c=!0){l+=v.value.length}}catch(t){f=!0,h=t}finally{try{c||null==m.return||m.return()}finally{if(f)throw h}}var b=this.segments.prepareSegment(4,this.layoutVertexArray,this.indexArray),k=!0,_=!1,S=void 0;try{for(var A,T=s[Symbol.iterator]();!(k=(A=T.next()).done);k=!0){var j=A.value;if(0!==j.length&&!w(j))for(var O=0,z=0;z<j.length;z++){var P=j[z];if(z>=1){var E=j[z-1];if(!x(P,E)){b.vertexLength+4>u&&(b=this.segments.prepareSegment(4,this.layoutVertexArray,this.indexArray));var C=P.sub(E)._perp()._unit(),M=E.dist(P);O+M>32768&&(O=0),g(this.layoutVertexArray,P.x,P.y,C.x,C.y,0,0,O),g(this.layoutVertexArray,P.x,P.y,C.x,C.y,0,1,O),O+=M,g(this.layoutVertexArray,E.x,E.y,C.x,C.y,0,0,O),g(this.layoutVertexArray,E.x,E.y,C.x,C.y,0,1,O);var I=b.vertexLength;this.indexArray.emplaceBack(I,I+1,I+2),this.indexArray.emplaceBack(I+1,I+2,I+3),b.vertexLength+=4,b.primitiveLength+=2}}}}}catch(t){_=!0,S=t}finally{try{k||null==T.return||T.return()}finally{if(_)throw S}}b.vertexLength+l>u&&(b=this.segments.prepareSegment(l,this.layoutVertexArray,this.indexArray));var B=[],V=[],L=b.vertexLength,F=!0,R=!1,D=void 0;try{for(var q,N=s[Symbol.iterator]();!(F=(q=N.next()).done);F=!0){var U=q.value;if(0!==U.length){U!==s[0]&&V.push(B.length/2);for(var J=0;J<U.length;J++){var G=U[J];g(this.layoutVertexArray,G.x,G.y,0,0,1,1,0),B.push(G.x),B.push(G.y)}}}}catch(t){R=!0,D=t}finally{try{F||null==N.return||N.return()}finally{if(R)throw D}}var Z=p(B,V);d(Z.length%3==0);for(var H=0;H<Z.length;H+=3)this.indexArray.emplaceBack(L+Z[H],L+Z[H+1],L+Z[H+2]);b.primitiveLength+=Z.length/3,b.vertexLength+=l}}catch(t){r=!0,i=t}finally{try{n||null==a.return||a.return()}finally{if(r)throw i}}this.programConfigurations.populatePaintArrays(this.layoutVertexArray.length,t)}}])&&r(e.prototype,n),a&&r(e,a),t}();function x(t,e){return t.x===e.x&&(t.x<0||t.x>h)||t.y===e.y&&(t.y<0||t.y>h)}function w(t){return t.every(function(t){return t.x<0})||t.every(function(t){return t.x>h})||t.every(function(t){return t.y<0})||t.every(function(t){return t.y>h})}v("FillExtrusionBucket",b,{omit:["layers"]}),t.exports=b},function(t,e,n){var r=n(17).createLayout;t.exports=r([{name:"a_pos",components:2,type:"Int16"},{name:"a_normal_ed",components:4,type:"Int16"}],4)},function(t,e,n){var r=n(8),i=n(1),o=i.Properties,a=i.DataConstantProperty,s=i.DataDrivenProperty,u=i.CrossFadedProperty,l=(i.HeatmapColorProperty,new o({"fill-extrusion-opacity":new a(r["paint_fill-extrusion"]["fill-extrusion-opacity"]),"fill-extrusion-color":new s(r["paint_fill-extrusion"]["fill-extrusion-color"]),"fill-extrusion-translate":new a(r["paint_fill-extrusion"]["fill-extrusion-translate"]),"fill-extrusion-translate-anchor":new a(r["paint_fill-extrusion"]["fill-extrusion-translate-anchor"]),"fill-extrusion-pattern":new u(r["paint_fill-extrusion"]["fill-extrusion-pattern"]),"fill-extrusion-height":new s(r["paint_fill-extrusion"]["fill-extrusion-height"]),"fill-extrusion-base":new s(r["paint_fill-extrusion"]["fill-extrusion-base"])}));t.exports={paint:l}},function(t,e,n){function r(t){return(r="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t})(t)}function i(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function o(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,r.key,r)}}function a(t,e,n){return e&&o(t.prototype,e),n&&o(t,n),t}function s(t,e){return!e||"object"!==r(e)&&"function"!=typeof e?function(t){if(void 0===t)throw new ReferenceError("this hasn\'t been initialised - super() hasn\'t been called");return t}(t):e}function u(t,e,n){return(u="undefined"!=typeof Reflect&&Reflect.get?Reflect.get:function(t,e,n){var r=function(t,e){for(;!Object.prototype.hasOwnProperty.call(t,e)&&null!==(t=l(t)););return t}(t,e);if(r){var i=Object.getOwnPropertyDescriptor(r,e);return i.get?i.get.call(n):i.value}})(t,e,n||t)}function l(t){return(l=Object.setPrototypeOf?Object.getPrototypeOf:function(t){return t.__proto__||Object.getPrototypeOf(t)})(t)}function c(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),e&&f(t,e)}function f(t,e){return(f=Object.setPrototypeOf||function(t,e){return t.__proto__=e,t})(t,e)}var h=n(6),p=n(9),y=n(127),d=n(28).multiPolygonIntersectsBufferedMultiLine,v=n(30),m=v.getMaximumPaintValue,g=v.translateDistance,b=v.translate,x=n(130),w=n(2).extend,k=n(41),_=n(1),S=(_.Transitionable,_.Transitioning,_.Layout,_.PossiblyEvaluated,_.DataDrivenProperty),A=new(function(t){function e(){return i(this,e),s(this,l(e).apply(this,arguments))}return c(e,S),a(e,[{key:"possiblyEvaluate",value:function(t,n){return n=new k(Math.floor(n.zoom),{now:n.now,fadeDuration:n.fadeDuration,zoomHistory:n.zoomHistory,transition:n.transition}),u(l(e.prototype),"possiblyEvaluate",this).call(this,t,n)}},{key:"evaluate",value:function(t,n,r){return n=w({},n,{zoom:Math.floor(n.zoom)}),u(l(e.prototype),"evaluate",this).call(this,t,n,r)}}]),e}())(x.paint.properties["line-width"].specification);A.useIntegerZoom=!0;var T=function(t){function e(t){return i(this,e),s(this,l(e).call(this,t,x))}return c(e,p),a(e,[{key:"recalculate",value:function(t){u(l(e.prototype),"recalculate",this).call(this,t),this.paint._values["line-floorwidth"]=A.possiblyEvaluate(this._transitioningPaint._values["line-width"].value,t)}},{key:"createBucket",value:function(t){return new y(t)}},{key:"queryRadius",value:function(t){var e=t,n=j(m("line-width",this,e),m("line-gap-width",this,e)),r=m("line-offset",this,e);return n/2+Math.abs(r)+g(this.paint.get("line-translate"))}},{key:"queryIntersectsFeature",value:function(t,e,n,r,i,o){var a=b(t,this.paint.get("line-translate"),this.paint.get("line-translate-anchor"),i,o),s=o/2*j(this.paint.get("line-width").evaluate(e),this.paint.get("line-gap-width").evaluate(e)),u=this.paint.get("line-offset").evaluate(e);return u&&(n=function(t,e){for(var n=[],r=new h(0,0),i=0;i<t.length;i++){for(var o=t[i],a=[],s=0;s<o.length;s++){var u=o[s-1],l=o[s],c=o[s+1],f=0===s?r:l.sub(u)._unit()._perp(),p=s===o.length-1?r:c.sub(l)._unit()._perp(),y=f._add(p)._unit(),d=y.x*p.x+y.y*p.y;y._mult(1/d),a.push(y._mult(e)._add(l))}n.push(a)}return n}(n,u*o)),d(a,n,s)}}]),e}();function j(t,e){return e>0?e+2*t:t}t.exports=T},function(t,e,n){function r(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,r.key,r)}}var i=n(10).LineLayoutArray,o=n(128).members,a=n(25).SegmentVector,s=n(26).ProgramConfigurationSet,u=n(27).TriangleIndexArray,l=n(20),c=n(18),f=n(21).VectorTileFeature.types,h=n(3).register,p=63,y=Math.cos(Math.PI/180*37.5),d=.5,v=Math.pow(2,14)/d;function m(t,e,n,r,i,o,a){t.emplaceBack(e.x,e.y,r?1:0,i?1:-1,Math.round(p*n.x)+128,Math.round(p*n.y)+128,1+(0===o?0:o<0?-1:1)|(a*d&63)<<2,a*d>>6)}var g=function(){function t(e){!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,t),this.zoom=e.zoom,this.overscaling=e.overscaling,this.layers=e.layers,this.layerIds=this.layers.map(function(t){return t.id}),this.index=e.index,this.layoutVertexArray=new i,this.indexArray=new u,this.programConfigurations=new s(o,e.layers,e.zoom),this.segments=new a}var e,n,h;return e=t,(n=[{key:"populate",value:function(t,e){var n=!0,r=!1,i=void 0;try{for(var o,a=t[Symbol.iterator]();!(n=(o=a.next()).done);n=!0){var s=o.value,u=s.feature,c=s.index,f=s.sourceLayerIndex;if(this.layers[0]._featureFilter({zoom:this.zoom},u)){var h=l(u);this.addFeature(u,h),e.featureIndex.insert(u,h,c,f,this.index)}}}catch(t){r=!0,i=t}finally{try{n||null==a.return||a.return()}finally{if(r)throw i}}}},{key:"isEmpty",value:function(){return 0===this.layoutVertexArray.length}},{key:"upload",value:function(t){this.layoutVertexBuffer=t.createVertexBuffer(this.layoutVertexArray,o),this.indexBuffer=t.createIndexBuffer(this.indexArray),this.programConfigurations.upload(t)}},{key:"destroy",value:function(){this.layoutVertexBuffer&&(this.layoutVertexBuffer.destroy(),this.indexBuffer.destroy(),this.programConfigurations.destroy(),this.segments.destroy())}},{key:"addFeature",value:function(t,e){var n=this.layers[0].layout,r=n.get("line-join").evaluate(t),i=n.get("line-cap"),o=n.get("line-miter-limit"),a=n.get("line-round-limit"),s=!0,u=!1,l=void 0;try{for(var c,f=e[Symbol.iterator]();!(s=(c=f.next()).done);s=!0){var h=c.value;this.addLine(h,t,r,i,o,a)}}catch(t){u=!0,l=t}finally{try{s||null==f.return||f.return()}finally{if(u)throw l}}}},{key:"addLine",value:function(t,e,n,r,i,o){for(var a="Polygon"===f[e.type],s=t.length;s>=2&&t[s-1].equals(t[s-2]);)s--;for(var u=0;u<s-1&&t[u].equals(t[u+1]);)u++;if(!(s<(a?3:2))){"bevel"===n&&(i=1.05);var l=c/(512*this.overscaling)*15,h=t[u],p=this.segments.prepareSegment(10*s,this.layoutVertexArray,this.indexArray);this.distance=0;var d,v,m,g=r,b=a?"butt":r,x=!0,w=void 0,k=void 0,_=void 0,S=void 0;this.e1=this.e2=this.e3=-1,a&&(d=t[s-2],S=h.sub(d)._unit()._perp());for(var A=u;A<s;A++)if(!(k=a&&A===s-1?t[u+1]:t[A+1])||!t[A].equals(k)){S&&(_=S),d&&(w=d),d=t[A],S=k?k.sub(d)._unit()._perp():_;var T=(_=_||S).add(S);0===T.x&&0===T.y||T._unit();var j=T.x*S.x+T.y*S.y,O=0!==j?1/j:1/0,z=j<y&&w&&k;if(z&&A>u){var P=d.dist(w);if(P>2*l){var E=d.sub(d.sub(w)._mult(l/P)._round());this.distance+=E.dist(w),this.addCurrentVertex(E,this.distance,_.mult(1),0,0,!1,p),w=E}}var C=w&&k,M=C?n:k?g:b;if(C&&"round"===M&&(O<o?M="miter":O<=2&&(M="fakeround")),"miter"===M&&O>i&&(M="bevel"),"bevel"===M&&(O>2&&(M="flipbevel"),O<i&&(M="miter")),w&&(this.distance+=d.dist(w)),"miter"===M)T._mult(O),this.addCurrentVertex(d,this.distance,T,0,0,!1,p);else if("flipbevel"===M){if(O>100)T=S.clone().mult(-1);else{var I=_.x*S.y-_.y*S.x>0?-1:1,B=O*_.add(S).mag()/_.sub(S).mag();T._perp()._mult(B*I)}this.addCurrentVertex(d,this.distance,T,0,0,!1,p),this.addCurrentVertex(d,this.distance,T.mult(-1),0,0,!1,p)}else if("bevel"===M||"fakeround"===M){var V=_.x*S.y-_.y*S.x>0,L=-Math.sqrt(O*O-1);if(V?(m=0,v=L):(v=0,m=L),x||this.addCurrentVertex(d,this.distance,_,v,m,!1,p),"fakeround"===M){for(var F=Math.floor(8*(.5-(j-.5))),R=void 0,D=0;D<F;D++)R=S.mult((D+1)/(F+1))._add(_)._unit(),this.addPieSliceVertex(d,this.distance,R,V,p);this.addPieSliceVertex(d,this.distance,T,V,p);for(var q=F-1;q>=0;q--)R=_.mult((q+1)/(F+1))._add(S)._unit(),this.addPieSliceVertex(d,this.distance,R,V,p)}k&&this.addCurrentVertex(d,this.distance,S,-v,-m,!1,p)}else"butt"===M?(x||this.addCurrentVertex(d,this.distance,_,0,0,!1,p),k&&this.addCurrentVertex(d,this.distance,S,0,0,!1,p)):"square"===M?(x||(this.addCurrentVertex(d,this.distance,_,1,1,!1,p),this.e1=this.e2=-1),k&&this.addCurrentVertex(d,this.distance,S,-1,-1,!1,p)):"round"===M&&(x||(this.addCurrentVertex(d,this.distance,_,0,0,!1,p),this.addCurrentVertex(d,this.distance,_,1,1,!0,p),this.e1=this.e2=-1),k&&(this.addCurrentVertex(d,this.distance,S,-1,-1,!0,p),this.addCurrentVertex(d,this.distance,S,0,0,!1,p)));if(z&&A<s-1){var N=d.dist(k);if(N>2*l){var U=d.add(k.sub(d)._mult(l/N)._round());this.distance+=U.dist(d),this.addCurrentVertex(U,this.distance,S.mult(1),0,0,!1,p),d=U}}x=!1}this.programConfigurations.populatePaintArrays(this.layoutVertexArray.length,e)}}},{key:"addCurrentVertex",value:function(t,e,n,r,i,o,a){var s,u=this.layoutVertexArray,l=this.indexArray;s=n.clone(),r&&s._sub(n.perp()._mult(r)),m(u,t,s,o,!1,r,e),this.e3=a.vertexLength++,this.e1>=0&&this.e2>=0&&(l.emplaceBack(this.e1,this.e2,this.e3),a.primitiveLength++),this.e1=this.e2,this.e2=this.e3,s=n.mult(-1),i&&s._sub(n.perp()._mult(i)),m(u,t,s,o,!0,-i,e),this.e3=a.vertexLength++,this.e1>=0&&this.e2>=0&&(l.emplaceBack(this.e1,this.e2,this.e3),a.primitiveLength++),this.e1=this.e2,this.e2=this.e3,e>v/2&&(this.distance=0,this.addCurrentVertex(t,this.distance,n,r,i,o,a))}},{key:"addPieSliceVertex",value:function(t,e,n,r,i){n=n.mult(r?-1:1);var o=this.layoutVertexArray,a=this.indexArray;m(o,t,n,!1,r,0,e),this.e3=i.vertexLength++,this.e1>=0&&this.e2>=0&&(a.emplaceBack(this.e1,this.e2,this.e3),i.primitiveLength++),r?this.e2=this.e3:this.e1=this.e3}}])&&r(e.prototype,n),h&&r(e,h),t}();h("LineBucket",g,{omit:["layers"]}),t.exports=g},function(t,e,n){var r=n(17).createLayout;t.exports=r([{name:"a_pos_normal",components:4,type:"Int16"},{name:"a_data",components:4,type:"Uint8"}],4)},function(t,e,n){"use strict";var r=n(79);function i(t,e,n){if(3===t){var i=new r(n,n.readVarint()+n.pos);i.length&&(e[i.name]=i)}}t.exports=function(t,e){this.layers=t.readFields(i,{},e)}},function(t,e,n){var r=n(8),i=n(1),o=i.Properties,a=i.DataConstantProperty,s=i.DataDrivenProperty,u=i.CrossFadedProperty,l=(i.HeatmapColorProperty,new o({"line-cap":new a(r.layout_line["line-cap"]),"line-join":new s(r.layout_line["line-join"]),"line-miter-limit":new a(r.layout_line["line-miter-limit"]),"line-round-limit":new a(r.layout_line["line-round-limit"])})),c=new o({"line-opacity":new s(r.paint_line["line-opacity"]),"line-color":new s(r.paint_line["line-color"]),"line-translate":new a(r.paint_line["line-translate"]),"line-translate-anchor":new a(r.paint_line["line-translate-anchor"]),"line-width":new s(r.paint_line["line-width"]),"line-gap-width":new s(r.paint_line["line-gap-width"]),"line-offset":new s(r.paint_line["line-offset"]),"line-blur":new s(r.paint_line["line-blur"]),"line-dasharray":new u(r.paint_line["line-dasharray"]),"line-pattern":new u(r.paint_line["line-pattern"])});t.exports={paint:c,layout:l}},function(t,e){function n(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,r.key,r)}}var r=function(){function t(){!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,t),this.first=!0}var e,r,i;return e=t,(r=[{key:"update",value:function(t,e){var n=Math.floor(t);return this.first?(this.first=!1,this.lastIntegerZoom=n,this.lastIntegerZoomTime=0,this.lastZoom=t,this.lastFloorZoom=n,!0):(this.lastFloorZoom>n?(this.lastIntegerZoom=n+1,this.lastIntegerZoomTime=e):this.lastFloorZoom<n&&(this.lastIntegerZoom=n,this.lastIntegerZoomTime=e),t!==this.lastZoom&&(this.lastZoom=t,this.lastFloorZoom=n,!0))}}])&&n(e.prototype,r),i&&n(e,i),t}();t.exports=r},function(t,e,n){function r(t){return(r="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t})(t)}function i(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,r.key,r)}}function o(t,e){return!e||"object"!==r(e)&&"function"!=typeof e?function(t){if(void 0===t)throw new ReferenceError("this hasn\'t been initialised - super() hasn\'t been called");return t}(t):e}function a(t,e,n){return(a="undefined"!=typeof Reflect&&Reflect.get?Reflect.get:function(t,e,n){var r=function(t,e){for(;!Object.prototype.hasOwnProperty.call(t,e)&&null!==(t=s(t)););return t}(t,e);if(r){var i=Object.getOwnPropertyDescriptor(r,e);return i.get?i.get.call(n):i.value}})(t,e,n||t)}function s(t){return(s=Object.setPrototypeOf?Object.getPrototypeOf:function(t){return t.__proto__||Object.getPrototypeOf(t)})(t)}function u(t,e){return(u=Object.setPrototypeOf||function(t,e){return t.__proto__=e,t})(t,e)}var l=n(9),c=n(42),f=n(138),h=n(14).isExpression,p=n(0),y=n(139),d=n(1),v=(d.Transitionable,d.Transitioning,d.Layout,d.PossiblyEvaluated,function(t){function e(t){return function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,e),o(this,s(e).call(this,t,y))}var n,r,d;return function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),e&&u(t,e)}(e,l),n=e,(r=[{key:"recalculate",value:function(t){a(s(e.prototype),"recalculate",this).call(this,t),"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"))}},{key:"getValueAndResolveTokens",value:function(t,e){var n=this.layout.get(t).evaluate(e),r=this._unevaluatedLayout._values[t];return r.isDataDriven()||h(r.value)?n:f(e.properties,n)}},{key:"createBucket",value:function(t){return new c(t)}},{key:"queryRadius",value:function(){return 0}},{key:"queryIntersectsFeature",value:function(){return p(!1),!1}}])&&i(n.prototype,r),d&&i(n,d),e}());t.exports=v},function(t,e,n){var r=n(17).createLayout,i={symbolLayoutAttributes:r([{name:"a_pos_offset",components:4,type:"Int16"},{name:"a_data",components:4,type:"Uint16"}]),dynamicLayoutAttributes:r([{name:"a_projected_pos",components:3,type:"Float32"}],4),placementOpacityAttributes:r([{name:"a_fade_opacity",components:1,type:"Uint32"}],4),collisionVertexAttributes:r([{name:"a_placed",components:2,type:"Uint8"}],4),collisionBox:r([{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"}]),collisionBoxLayout:r([{name:"a_pos",components:2,type:"Int16"},{name:"a_anchor_pos",components:2,type:"Int16"},{name:"a_extrude",components:2,type:"Int16"}],4),collisionCircleLayout:r([{name:"a_pos",components:2,type:"Int16"},{name:"a_anchor_pos",components:2,type:"Int16"},{name:"a_extrude",components:2,type:"Int16"}],4),placement:r([{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"}]),glyphOffset:r([{type:"Float32",name:"offsetX"}]),lineVertex:r([{type:"Int16",name:"x"},{type:"Int16",name:"y"},{type:"Int16",name:"tileUnitDistanceFromAnchor"}])};t.exports=i},function(t,e,n){var r=n(43);t.exports=function(t,e,n){var i=e.layout.get("text-transform").evaluate(n);return"uppercase"===i?t=t.toLocaleUpperCase():"lowercase"===i&&(t=t.toLocaleLowerCase()),r.applyArabicShaping&&(t=r.applyArabicShaping(t)),t}},function(t,e){t.exports=function(t){var e={},n={},r=[],i=0;function o(e){r.push(t[e]),i++}function a(t,e,i){var o=n[t];return delete n[t],n[e]=o,r[o].geometry[0].pop(),r[o].geometry[0]=r[o].geometry[0].concat(i[0]),o}function s(t,n,i){var o=e[n];return delete e[n],e[t]=o,r[o].geometry[0].shift(),r[o].geometry[0]=i[0].concat(r[o].geometry[0]),o}function u(t,e,n){var r=n?e[0][e[0].length-1]:e[0][0];return"".concat(t,":").concat(r.x,":").concat(r.y)}for(var l=0;l<t.length;l++){var c=t[l],f=c.geometry,h=c.text;if(h){var p=u(h,f),y=u(h,f,!0);if(p in n&&y in e&&n[p]!==e[y]){var d=s(p,y,f),v=a(p,y,r[d].geometry);delete e[p],delete n[y],n[u(h,r[v].geometry,!0)]=v,r[d].geometry=null}else p in n?a(p,y,f):y in e?s(p,y,f):(o(l),e[p]=i-1,n[y]=i-1)}else o(l)}return r.filter(function(t){return t.geometry})}},function(t,e){t.exports={"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}}},function(t,e,n){var r=n(14).normalizePropertyExpression,i=n(19),o=n(2);t.exports={getSizeData:function(t,e){var n=e.expression;if("constant"===n.kind)return{functionType:"constant",layoutSize:n.evaluate({zoom:t+1})};if("source"===n.kind)return{functionType:"source"};for(var r=n.zoomStops,i=0;i<r.length&&r[i]<=t;)i++;for(var o=i=Math.max(0,i-1);o<r.length&&r[o]<t+1;)o++;o=Math.min(r.length-1,o);var a={min:r[i],max:r[o]};return"composite"===n.kind?{functionType:"composite",zoomRange:a,propertyValue:e.value}:{functionType:"camera",layoutSize:n.evaluate({zoom:t+1}),zoomRange:a,sizeRange:{min:n.evaluate({zoom:a.min}),max:n.evaluate({zoom:a.max})},propertyValue:e.value}},evaluateSizeForFeature:function(t,e,n){var r=e;return"source"===t.functionType?n.lowerSize/10:"composite"===t.functionType?i.number(n.lowerSize/10,n.upperSize/10,r.uSizeT):r.uSize},evaluateSizeForZoom:function(t,e,n){if("constant"===t.functionType)return{uSizeT:0,uSize:t.layoutSize};if("source"===t.functionType)return{uSizeT:0,uSize:0};if("camera"===t.functionType){var i=t.propertyValue,a=t.zoomRange,s=t.sizeRange,u=r(i,n.specification),l=o.clamp(u.interpolationFactor(e,a.min,a.max),0,1);return{uSizeT:0,uSize:s.min+l*(s.max-s.min)}}var c=t.propertyValue,f=t.zoomRange,h=r(c,n.specification);return{uSizeT:o.clamp(h.interpolationFactor(e,f.min,f.max),0,1),uSize:0}}}},function(t,e){t.exports=function(t,e){return e.replace(/{([^{}]+)}/g,function(e,n){return n in t?String(t[n]):""}).replace(/FORMAT_NUMBER\\(([^\\)]+)\\)/g,function(t,e){return function(t){t=t.split(",");var e=parseFloat(t[0]);t[2]&&(e*=parseFloat(t[2]));return e<1e3?Math.round(e):e<1e5?(e/1e3).toFixed(1)+"K":e<1e6?Math.round(e/1e3)+"K":e<1e9?(e/1e6).toFixed(2)+"M":e<1e12?(e=Math.round(e/1e6).toFixed(0)).slice(0,-3)+","+e.slice(-4,-1)+"M":"HUGE_NUM"}(e)})}},function(t,e,n){var r=n(8),i=n(1),o=i.Properties,a=i.DataConstantProperty,s=i.DataDrivenProperty,u=(i.CrossFadedProperty,i.HeatmapColorProperty,new o({"symbol-placement":new a(r.layout_symbol["symbol-placement"]),"symbol-spacing":new a(r.layout_symbol["symbol-spacing"]),"symbol-avoid-edges":new a(r.layout_symbol["symbol-avoid-edges"]),"icon-allow-overlap":new a(r.layout_symbol["icon-allow-overlap"]),"icon-ignore-placement":new a(r.layout_symbol["icon-ignore-placement"]),"icon-optional":new a(r.layout_symbol["icon-optional"]),"icon-rotation-alignment":new a(r.layout_symbol["icon-rotation-alignment"]),"icon-size":new s(r.layout_symbol["icon-size"]),"icon-text-fit":new a(r.layout_symbol["icon-text-fit"]),"icon-text-fit-padding":new a(r.layout_symbol["icon-text-fit-padding"]),"icon-image":new s(r.layout_symbol["icon-image"]),"icon-rotate":new s(r.layout_symbol["icon-rotate"]),"icon-padding":new a(r.layout_symbol["icon-padding"]),"icon-keep-upright":new a(r.layout_symbol["icon-keep-upright"]),"icon-offset":new s(r.layout_symbol["icon-offset"]),"icon-anchor":new s(r.layout_symbol["icon-anchor"]),"icon-pitch-alignment":new a(r.layout_symbol["icon-pitch-alignment"]),"text-pitch-alignment":new a(r.layout_symbol["text-pitch-alignment"]),"text-rotation-alignment":new a(r.layout_symbol["text-rotation-alignment"]),"text-field":new s(r.layout_symbol["text-field"]),"text-font":new s(r.layout_symbol["text-font"]),"text-size":new s(r.layout_symbol["text-size"]),"text-max-width":new s(r.layout_symbol["text-max-width"]),"text-line-height":new a(r.layout_symbol["text-line-height"]),"text-letter-spacing":new s(r.layout_symbol["text-letter-spacing"]),"text-justify":new s(r.layout_symbol["text-justify"]),"text-anchor":new s(r.layout_symbol["text-anchor"]),"text-max-angle":new a(r.layout_symbol["text-max-angle"]),"text-rotate":new s(r.layout_symbol["text-rotate"]),"text-padding":new a(r.layout_symbol["text-padding"]),"text-keep-upright":new a(r.layout_symbol["text-keep-upright"]),"text-transform":new s(r.layout_symbol["text-transform"]),"text-offset":new s(r.layout_symbol["text-offset"]),"text-allow-overlap":new a(r.layout_symbol["text-allow-overlap"]),"text-ignore-placement":new a(r.layout_symbol["text-ignore-placement"]),"text-optional":new a(r.layout_symbol["text-optional"])})),l=new o({"icon-opacity":new s(r.paint_symbol["icon-opacity"]),"icon-color":new s(r.paint_symbol["icon-color"]),"icon-halo-color":new s(r.paint_symbol["icon-halo-color"]),"icon-halo-width":new s(r.paint_symbol["icon-halo-width"]),"icon-halo-blur":new s(r.paint_symbol["icon-halo-blur"]),"icon-translate":new a(r.paint_symbol["icon-translate"]),"icon-translate-anchor":new a(r.paint_symbol["icon-translate-anchor"]),"text-opacity":new s(r.paint_symbol["text-opacity"]),"text-color":new s(r.paint_symbol["text-color"]),"text-halo-color":new s(r.paint_symbol["text-halo-color"]),"text-halo-width":new s(r.paint_symbol["text-halo-width"]),"text-halo-blur":new s(r.paint_symbol["text-halo-blur"]),"text-translate":new a(r.paint_symbol["text-translate"]),"text-translate-anchor":new a(r.paint_symbol["text-translate-anchor"])});t.exports={paint:l,layout:u}},function(t,e,n){function r(t){return(r="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t})(t)}function i(t,e){return!e||"object"!==r(e)&&"function"!=typeof e?function(t){if(void 0===t)throw new ReferenceError("this hasn\'t been initialised - super() hasn\'t been called");return t}(t):e}function o(t){return(o=Object.setPrototypeOf?Object.getPrototypeOf:function(t){return t.__proto__||Object.getPrototypeOf(t)})(t)}function a(t,e){return(a=Object.setPrototypeOf||function(t,e){return t.__proto__=e,t})(t,e)}var s=n(9),u=n(141),l=n(1),c=(l.Transitionable,l.Transitioning,l.PossiblyEvaluated,function(t){function e(t){return function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,e),i(this,o(e).call(this,t,u))}return function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),e&&a(t,e)}(e,s),e}());t.exports=c},function(t,e,n){var r=n(8),i=n(1),o=i.Properties,a=i.DataConstantProperty,s=(i.DataDrivenProperty,i.CrossFadedProperty),u=(i.HeatmapColorProperty,new o({"background-color":new a(r.paint_background["background-color"]),"background-pattern":new s(r.paint_background["background-pattern"]),"background-opacity":new a(r.paint_background["background-opacity"])}));t.exports={paint:u}},function(t,e,n){function r(t){return(r="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t})(t)}function i(t,e){return!e||"object"!==r(e)&&"function"!=typeof e?function(t){if(void 0===t)throw new ReferenceError("this hasn\'t been initialised - super() hasn\'t been called");return t}(t):e}function o(t){return(o=Object.setPrototypeOf?Object.getPrototypeOf:function(t){return t.__proto__||Object.getPrototypeOf(t)})(t)}function a(t,e){return(a=Object.setPrototypeOf||function(t,e){return t.__proto__=e,t})(t,e)}var s=n(9),u=n(143),l=n(1),c=(l.Transitionable,l.Transitioning,l.PossiblyEvaluated,function(t){function e(t){return function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,e),i(this,o(e).call(this,t,u))}return function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),e&&a(t,e)}(e,s),e}());t.exports=c},function(t,e,n){var r=n(8),i=n(1),o=i.Properties,a=i.DataConstantProperty,s=(i.DataDrivenProperty,i.CrossFadedProperty,i.HeatmapColorProperty,new o({"raster-opacity":new a(r.paint_raster["raster-opacity"]),"raster-hue-rotate":new a(r.paint_raster["raster-hue-rotate"]),"raster-brightness-min":new a(r.paint_raster["raster-brightness-min"]),"raster-brightness-max":new a(r.paint_raster["raster-brightness-max"]),"raster-saturation":new a(r.paint_raster["raster-saturation"]),"raster-contrast":new a(r.paint_raster["raster-contrast"]),"raster-fade-duration":new a(r.paint_raster["raster-fade-duration"])}));t.exports={paint:s}},function(t,e,n){function r(t){return(r="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t})(t)}var i=n(145);function o(t){var e=r(t);if("number"===e||"boolean"===e||"string"===e||null==t)return JSON.stringify(t);if(Array.isArray(t)){var n="[",i=!0,a=!1,s=void 0;try{for(var u,l=t[Symbol.iterator]();!(i=(u=l.next()).done);i=!0){var c=u.value;n+="".concat(o(c),",")}}catch(t){a=!0,s=t}finally{try{i||null==l.return||l.return()}finally{if(a)throw s}}return"".concat(n,"]")}for(var f=Object.keys(t).sort(),h="{",p=0;p<f.length;p++)h+="".concat(JSON.stringify(f[p]),":").concat(o(t[f[p]]),",");return"".concat(h,"}")}function a(t){var e="",n=!0,r=!1,a=void 0;try{for(var s,u=i[Symbol.iterator]();!(n=(s=u.next()).done);n=!0){var l=s.value;e+="/".concat(o(t[l]))}}catch(t){r=!0,a=t}finally{try{n||null==u.return||u.return()}finally{if(r)throw a}}return e}t.exports=function(t){for(var e={},n=0;n<t.length;n++){var r=a(t[n]),i=e[r];i||(i=e[r]=[]),i.push(t[n])}var o=[];for(var s in e)o.push(e[s]);return o}},function(t,e){t.exports=["type","source","source-layer","minzoom","maxzoom","filter","layout"]},function(t,e){e.read=function(t,e,n,r,i){var o,a,s=8*i-r-1,u=(1<<s)-1,l=u>>1,c=-7,f=n?i-1:0,h=n?-1:1,p=t[e+f];for(f+=h,o=p&(1<<-c)-1,p>>=-c,c+=s;c>0;o=256*o+t[e+f],f+=h,c-=8);for(a=o&(1<<-c)-1,o>>=-c,c+=r;c>0;a=256*a+t[e+f],f+=h,c-=8);if(0===o)o=1-l;else{if(o===u)return a?NaN:1/0*(p?-1:1);a+=Math.pow(2,r),o-=l}return(p?-1:1)*a*Math.pow(2,o-r)},e.write=function(t,e,n,r,i,o){var a,s,u,l=8*o-i-1,c=(1<<l)-1,f=c>>1,h=23===i?Math.pow(2,-24)-Math.pow(2,-77):0,p=r?0:o-1,y=r?1:-1,d=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*(u=Math.pow(2,-a))<1&&(a--,u*=2),(e+=a+f>=1?h/u:h*Math.pow(2,1-f))*u>=2&&(a++,u/=2),a+f>=c?(s=0,a=c):a+f>=1?(s=(e*u-1)*Math.pow(2,i),a+=f):(s=e*Math.pow(2,f-1)*Math.pow(2,i),a=0));i>=8;t[n+p]=255&s,p+=y,s/=256,i-=8);for(a=a<<i|s,l+=i;l>0;t[n+p]=255&a,p+=y,a/=256,l-=8);t[n+p-y]|=128*d}},function(t,e,n){function r(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,r.key,r)}}var i=n(148),o=n(151).performSymbolLayout,a=n(10).CollisionBoxArray,s=n(83),u=n(42),l=n(2),c=n(0),f=n(162).makeImageAtlas,h=n(163).makeGlyphAtlas,p=n(41),y=n(84).OverscaledTileID,d=function(){function t(e){!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,t),this.tileID=new y(e.tileID.overscaledZ,e.tileID.wrap,e.tileID.canonical.z,e.tileID.canonical.x,e.tileID.canonical.y),this.uid=e.uid,this.zoom=e.zoom,this.pixelRatio=e.pixelRatio,this.tileSize=e.tileSize,this.source=e.source,this.overscaling=e.overscaling,this.showCollisionBoxes=e.showCollisionBoxes}var e,n,p;return e=t,(n=[{key:"parse",value:function(t,e,n,r){var p=this;this.status="parsing",this.data=t,this.collisionBoxArray=new a;var y=new s(Object.keys(t.layers).sort()),d=new i(this.tileID,this.overscaling);d.bucketLayerIDs=[];var m,g,b,x={},w={featureIndex:d,iconDependencies:{},glyphDependencies:{}},k=e.familiesBySource[this.source];for(var _ in k){var S=t.layers[_];if(S){1===S.version&&l.warnOnce(\'Vector tile source "\'.concat(this.source,\'" layer "\').concat(_,\'" \')+"does not use vector tile spec v2 and therefore may have some rendering errors.");for(var A=y.encode(_),T=[],j=0;j<S.length;j++){var O=S.feature(j);T.push({feature:O,index:j,sourceLayerIndex:A})}var z=!0,P=!1,E=void 0;try{for(var C,M=k[_][Symbol.iterator]();!(z=(C=M.next()).done);z=!0){var I=C.value,B=I[0];if(c(B.source===this.source),!(B.minzoom&&this.zoom<Math.floor(B.minzoom)))if(!(B.maxzoom&&this.zoom>=B.maxzoom))if("none"!==B.visibility)v(I,this.zoom),(x[B.id]=B.createBucket({index:d.bucketLayerIDs.length,layers:I,zoom:this.zoom,pixelRatio:this.pixelRatio,overscaling:this.overscaling,collisionBoxArray:this.collisionBoxArray})).populate(T,w),d.bucketLayerIDs.push(I.map(function(t){return t.id}))}}catch(t){P=!0,E=t}finally{try{z||null==M.return||M.return()}finally{if(P)throw E}}}}var V=l.mapObject(w.glyphDependencies,function(t){return Object.keys(t).map(Number)});Object.keys(V).length?n.send("getGlyphs",{uid:this.uid,stacks:V},function(t,e){m||(m=t,g=e,F.call(p))}):g={};var L=Object.keys(w.iconDependencies);function F(){if(m)return r(m);if(g&&b){var t=h(g),e=f(b);for(var n in x){var i=x[n];i instanceof u&&(v(i.layers,this.zoom),o(i,g,t.positions,b,e.positions,this.showCollisionBoxes))}this.status="done",r(null,{buckets:l.values(x).filter(function(t){return!t.isEmpty()}),featureIndex:d,collisionBoxArray:this.collisionBoxArray,glyphAtlasImage:t.image,iconAtlasImage:e.image})}}L.length?n.send("getImages",{icons:L},function(t,e){m||(m=t,b=e,F.call(p))}):b={},F.call(this)}}])&&r(e.prototype,n),p&&r(e,p),t}();function v(t,e){var n=new p(e),r=!0,i=!1,o=void 0;try{for(var a,s=t[Symbol.iterator]();!(r=(a=s.next()).done);r=!0){a.value.recalculate(n)}}catch(t){i=!0,o=t}finally{try{r||null==s.return||s.return()}finally{if(i)throw o}}}t.exports=d},function(t,e,n){function r(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,r.key,r)}}n(6);var i=n(20),o=n(18),a=n(39),s=n(48),u=n(83),l=n(21),c=n(32),f=n(149),h=n(2).arraysIntersect,p=(n(84).OverscaledTileID,n(3).register),y=n(10).FeatureIndexArray,d=function(){function t(e,n,r,i){!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,t),this.tileID=e,this.overscaling=n,this.x=e.canonical.x,this.y=e.canonical.y,this.z=e.canonical.z,this.grid=r||new s(o,16,0),this.featureIndexArray=i||new y}var e,n,p;return e=t,(n=[{key:"insert",value:function(t,e,n,r,i){var o=this.featureIndexArray.length;this.featureIndexArray.emplaceBack(n,r,i);for(var a=0;a<e.length;a++){for(var s=e[a],u=[1/0,1/0,-1/0,-1/0],l=0;l<s.length;l++){var c=s[l];u[0]=Math.min(u[0],c.x),u[1]=Math.min(u[1],c.y),u[2]=Math.max(u[2],c.x),u[3]=Math.max(u[3],c.y)}this.grid.insert(o,u[0],u[1],u[2],u[3])}}},{key:"query",value:function(t,e){this.vtLayers||(this.vtLayers=new l.VectorTile(new c(this.rawTileData)).layers,this.sourceLayerCoder=new u(this.vtLayers?Object.keys(this.vtLayers).sort():["_geojsonTileLayer"]));for(var n={},r=t.params||{},i=o/t.tileSize/t.scale,s=a(r.filter),f=t.queryGeometry,h=t.additionalRadius*i,p=1/0,y=1/0,d=-1/0,m=-1/0,g=0;g<f.length;g++)for(var b=f[g],x=0;x<b.length;x++){var w=b[x];p=Math.min(p,w.x),y=Math.min(y,w.y),d=Math.max(d,w.x),m=Math.max(m,w.y)}var k=this.grid.query(p-h,y-h,d+h,m+h);k.sort(v),this.filterMatching(n,k,this.featureIndexArray,f,s,r.layers,e,t.bearing,i);var _=t.collisionIndex?t.collisionIndex.queryRenderedSymbols(f,this.tileID,o/t.tileSize,t.collisionBoxArray,t.sourceID,t.bucketInstanceIds):[];return _.sort(),this.filterMatching(n,_,t.collisionBoxArray,f,s,r.layers,e,t.bearing,i),n}},{key:"filterMatching",value:function(t,e,n,r,o,a,s,u,l){for(var c,p=0;p<e.length;p++){var y=e[p];if(y!==c){c=y;var d=n.get(y),v=this.bucketLayerIDs[d.bucketIndex];if(!a||h(a,v)){var m=this.sourceLayerCoder.decode(d.sourceLayerIndex),g=this.vtLayers[m].feature(d.featureIndex);if(o({zoom:this.tileID.overscaledZ},g))for(var b=null,x=0;x<v.length;x++){var w=v[x];if(!(a&&a.indexOf(w)<0)){var k=s[w];if(k&&("symbol"===k.type||(b||(b=i(g)),k.queryIntersectsFeature(r,g,b,this.z,u,l)))){var _=new f(g,this.z,this.x,this.y);_.layer=k.serialize();var S=t[w];void 0===S&&(S=t[w]=[]),S.push({featureIndex:y,feature:_})}}}}}}}},{key:"hasLayer",value:function(t){var e=!0,n=!1,r=void 0;try{for(var i,o=this.bucketLayerIDs[Symbol.iterator]();!(e=(i=o.next()).done);e=!0){var a=i.value,s=!0,u=!1,l=void 0;try{for(var c,f=a[Symbol.iterator]();!(s=(c=f.next()).done);s=!0){if(t===c.value)return!0}}catch(t){u=!0,l=t}finally{try{s||null==f.return||f.return()}finally{if(u)throw l}}}}catch(t){n=!0,r=t}finally{try{e||null==o.return||o.return()}finally{if(n)throw r}}return!1}}])&&r(e.prototype,n),p&&r(e,p),t}();function v(t,e){return e-t}p("FeatureIndex",d,{omit:["rawTileData","sourceLayerCoder","collisionIndex"]}),t.exports=d},function(t,e){function n(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,r.key,r)}}var r=function(){function t(e,n,r,i){!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,t),this.type="Feature",this._vectorTileFeature=e,e._z=n,e._x=r,e._y=i,this.properties=e.properties,null!=e.id&&(this.id=e.id)}var e,r,i;return e=t,(r=[{key:"toJSON",value:function(){var t={geometry:this.geometry};for(var e in this)"_geometry"!==e&&"_vectorTileFeature"!==e&&(t[e]=this[e]);return t}},{key:"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},set:function(t){this._geometry=t}}])&&n(e.prototype,r),i&&n(e,i),t}();t.exports=r},function(t,e,n){"use strict";function r(t,e,n,r,o,a){return a=a||{},t+"?"+["bbox="+i(n,r,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="+e].join("&")}function i(t,e,n){var r=o(256*t,256*(e=Math.pow(2,n)-e-1),n),i=o(256*(t+1),256*(e+1),n);return r[0]+","+r[1]+","+i[0]+","+i[1]}function o(t,e,n){var r=2*Math.PI*6378137/256/Math.pow(2,n);return[t*r-2*Math.PI*6378137/2,e*r-2*Math.PI*6378137/2]}n.r(e),n.d(e,"getURL",function(){return r}),n.d(e,"getTileBBox",function(){return i}),n.d(e,"getMercCoords",function(){return o})},function(t,e,n){var r=n(45),i=n(152),o=n(154),a=n(155),s=n(156),u=s.shapeText,l=s.shapeIcon,c=s.WritingMode,f=n(157),h=f.getGlyphQuads,p=f.getIconQuads,y=n(159),d=n(2),v=n(31),m=n(160),g=n(40),b=n(18),x=n(42),w=n(41);n(6);function k(t,e,n,s,u,l){var f=l.layoutTextSize.evaluate(e),h=l.layoutIconSize.evaluate(e),v=l.textMaxSize.evaluate(e);void 0===v&&(v=f);var w=t.layers[0].layout,k=w.get("text-offset").evaluate(e),A=w.get("icon-offset").evaluate(e),T=f/24,j=t.tilePixelRatio*T,O=t.tilePixelRatio*v/24,z=t.tilePixelRatio*h,P=t.tilePixelRatio*w.get("symbol-spacing"),E=w.get("text-padding")*t.tilePixelRatio,C=w.get("icon-padding")*t.tilePixelRatio,M=w.get("text-max-angle")/180*Math.PI,I="map"===w.get("text-rotation-alignment")&&"line"===w.get("symbol-placement"),B="map"===w.get("icon-rotation-alignment")&&"line"===w.get("symbol-placement"),V=P/2,L=function(r,i){i.x<0||i.x>=b||i.y<0||i.y>=b||t.symbolInstances.push(function(t,e,n,r,i,o,s,u,l,f,h,v,m,g,b,w,k,S,A,T,j,O){var z,P,E=t.addToLineVertexArray(e,n),C=0,M=0,I=0,B=r.horizontal?r.horizontal.text:"",V=[];r.horizontal&&(z=new y(s,n,e,u,l,f,r.horizontal,h,v,m,t.overscaling),M+=_(t,e,r.horizontal,o,m,A,T,g,E,r.vertical?c.horizontal:c.horizontalOnly,V,j,O),r.vertical&&(I+=_(t,e,r.vertical,o,m,A,T,g,E,c.vertical,V,j,O)));var L=z?z.boxStartIndex:t.collisionBoxArray.length,F=z?z.boxEndIndex:t.collisionBoxArray.length;if(i){var R=p(e,i,o,k,r.horizontal,A,T);P=new y(s,n,e,u,l,f,i,b,w,!1,t.overscaling),C=4*R.length;var D=t.iconSizeData,q=null;"source"===D.functionType?q=[10*o.layout.get("icon-size").evaluate(T)]:"composite"===D.functionType&&(q=[10*O.compositeIconSizes[0].evaluate(T),10*O.compositeIconSizes[1].evaluate(T)]),t.addSymbols(t.icon,R,q,S,k,T,!1,e,E.lineStartIndex,E.lineLength)}var N=P?P.boxStartIndex:t.collisionBoxArray.length,U=P?P.boxEndIndex:t.collisionBoxArray.length;t.glyphOffsetArray.length>=x.MAX_GLYPHS&&d.warnOnce("Too many glyphs being rendered in a tile. See https://github.com/mapbox/mapbox-gl-js/issues/2907");var J=new a,G=new a;return{key:B,textBoxStartIndex:L,textBoxEndIndex:F,iconBoxStartIndex:N,iconBoxEndIndex:U,textOffset:g,iconOffset:S,anchor:e,line:n,featureIndex:u,feature:T,numGlyphVertices:M,numVerticalGlyphVertices:I,numIconVertices:C,textOpacityState:J,iconOpacityState:G,isDuplicate:!1,placedTextSymbolIndices:V,crossTileID:0}}(t,i,r,n,s,t.layers[0],t.collisionBoxArray,e.index,e.sourceLayerIndex,t.index,j,E,I,k,z,C,B,A,{zoom:t.zoom},e,u,l))};if("line"===w.get("symbol-placement")){var F=!0,R=!1,D=void 0;try{for(var q,N=o(e.geometry,0,0,b,b)[Symbol.iterator]();!(F=(q=N.next()).done);F=!0){var U=q.value,J=i(U,P,M,n.vertical||n.horizontal,s,24,O,t.overscaling,b),G=!0,Z=!1,H=void 0;try{for(var W,Y=J[Symbol.iterator]();!(G=(W=Y.next()).done);G=!0){var K=W.value,X=n.horizontal;X&&S(t,X.text,V,K)||L(U,K)}}catch(t){Z=!0,H=t}finally{try{G||null==Y.return||Y.return()}finally{if(Z)throw H}}}}catch(t){R=!0,D=t}finally{try{F||null==N.return||N.return()}finally{if(R)throw D}}}else if("Polygon"===e.type){var $=!0,Q=!1,tt=void 0;try{for(var et,nt=g(e.geometry,0)[Symbol.iterator]();!($=(et=nt.next()).done);$=!0){var rt=et.value,it=m(rt,16);L(rt[0],new r(it.x,it.y,0))}}catch(t){Q=!0,tt=t}finally{try{$||null==nt.return||nt.return()}finally{if(Q)throw tt}}}else if("LineString"===e.type){var ot=!0,at=!1,st=void 0;try{for(var ut,lt=e.geometry[Symbol.iterator]();!(ot=(ut=lt.next()).done);ot=!0){var ct=ut.value;L(ct,new r(ct[0].x,ct[0].y,0))}}catch(t){at=!0,st=t}finally{try{ot||null==lt.return||lt.return()}finally{if(at)throw st}}}else if("Point"===e.type){var ft=!0,ht=!1,pt=void 0;try{for(var yt,dt=e.geometry[Symbol.iterator]();!(ft=(yt=dt.next()).done);ft=!0){var vt=yt.value,mt=!0,gt=!1,bt=void 0;try{for(var xt,wt=vt[Symbol.iterator]();!(mt=(xt=wt.next()).done);mt=!0){var kt=xt.value;L([kt],new r(kt.x,kt.y,0))}}catch(t){gt=!0,bt=t}finally{try{mt||null==wt.return||wt.return()}finally{if(gt)throw bt}}}}catch(t){ht=!0,pt=t}finally{try{ft||null==dt.return||dt.return()}finally{if(ht)throw pt}}}}function _(t,e,n,r,i,o,a,s,u,l,c,f,p){var y=h(e,n,r,i,o,a,f),d=t.textSizeData,v=null;return"source"===d.functionType?v=[10*r.layout.get("text-size").evaluate(a)]:"composite"===d.functionType&&(v=[10*p.compositeTextSizes[0].evaluate(a),10*p.compositeTextSizes[1].evaluate(a)]),t.addSymbols(t.text,y,v,s,i,a,l,e,u.lineStartIndex,u.lineLength),c.push(t.text.placedSymbolArray.length-1),4*y.length}function S(t,e,n,r){var i=t.compareText;if(e in i){for(var o=i[e],a=o.length-1;a>=0;a--)if(r.dist(o[a])<n)return!0}else i[e]=[];return i[e].push(r),!1}t.exports={performSymbolLayout:function(t,e,n,r,i,o){t.createArrays(),t.symbolInstances=[];var a=512*t.overscaling;t.tilePixelRatio=b/a,t.compareText={},t.iconsNeedLinear=!1;var s=t.layers[0].layout,f=t.layers[0]._unevaluatedLayout._values,h={};if("composite"===t.textSizeData.functionType){var p=t.textSizeData.zoomRange,y=p.min,m=p.max;h.compositeTextSizes=[f["text-size"].possiblyEvaluate(new w(y)),f["text-size"].possiblyEvaluate(new w(m))]}if("composite"===t.iconSizeData.functionType){var g=t.iconSizeData.zoomRange,x=g.min,_=g.max;h.compositeIconSizes=[f["icon-size"].possiblyEvaluate(new w(x)),f["icon-size"].possiblyEvaluate(new w(_))]}h.layoutTextSize=f["text-size"].possiblyEvaluate(new w(t.zoom+1)),h.layoutIconSize=f["icon-size"].possiblyEvaluate(new w(t.zoom+1)),h.textMaxSize=f["text-size"].possiblyEvaluate(new w(18));var S=24*s.get("text-line-height"),A="map"===s.get("text-rotation-alignment")&&"line"===s.get("symbol-placement"),T=s.get("text-keep-upright"),j=!0,O=!1,z=void 0;try{for(var P,E=t.features[Symbol.iterator]();!(j=(P=E.next()).done);j=!0){var C=P.value,M=s.get("text-font").evaluate(C).join(","),I=e[M]||{},B=n[M]||{},V={},L=C.text;if(L){var F=v.allowsVerticalWritingMode(L),R=s.get("text-offset").evaluate(C).map(function(t){return 24*t}),D=24*s.get("text-letter-spacing").evaluate(C),q=v.allowsLetterSpacing(L)?D:0,N=s.get("text-anchor").evaluate(C),U=s.get("text-justify").evaluate(C),J="line"!==s.get("symbol-placement")?24*s.get("text-max-width").evaluate(C):0;V.horizontal=u(L,I,J,S,N,U,q,R,24,c.horizontal),F&&A&&T&&(V.vertical=u(L,I,J,S,N,U,q,R,24,c.vertical))}var G=void 0;if(C.icon){var Z=r[C.icon];Z&&(G=l(i[C.icon],s.get("icon-offset").evaluate(C),s.get("icon-anchor").evaluate(C)),void 0===t.sdfIcons?t.sdfIcons=Z.sdf:t.sdfIcons!==Z.sdf&&d.warnOnce("Style sheet warning: Cannot mix SDF and non-SDF icons in one buffer"),Z.pixelRatio!==t.pixelRatio?t.iconsNeedLinear=!0:0!==s.get("icon-rotate").constantOr(1)&&(t.iconsNeedLinear=!0))}(V.horizontal||G)&&k(t,C,V,G,B,h)}}catch(t){O=!0,z=t}finally{try{j||null==E.return||E.return()}finally{if(O)throw z}}o&&t.generateCollisionDebugBuffers()}}},function(t,e,n){var r=n(19).number,i=n(45),o=n(153);t.exports=function(t,e,n,a,s,u,l,c,f){var h=a?.6*u*l:0,p=Math.max(a?a.right-a.left:0,s?s.right-s.left:0),y=0===t[0].x||t[0].x===f||0===t[0].y||t[0].y===f;e-p*l<e/4&&(e=p*l+e/4);var d=2*u;return function t(e,n,a,s,u,l,c,f,h){var p=l/2;var y=0;for(var d=0;d<e.length-1;d++)y+=e[d].dist(e[d+1]);var v=0,m=n-a;var g=[];for(var b=0;b<e.length-1;b++){for(var x=e[b],w=e[b+1],k=x.dist(w),_=w.angleTo(x);m+a<v+k;){var S=((m+=a)-v)/k,A=r(x.x,w.x,S),T=r(x.y,w.y,S);if(A>=0&&A<h&&T>=0&&T<h&&m-p>=0&&m+p<=y){var j=new i(A,T,_,b);j._round(),s&&!o(e,j,l,s,u)||g.push(j)}}v+=k}f||g.length||c||(g=t(e,v/2,a,s,u,l,c,!0,h));return g}(t,y?e/2*c%e:(p/2+d)*l*c%e,e,h,n,p*l,y,!1,f)}},function(t,e){t.exports=function(t,e,n,r,i){if(void 0===e.segment)return!0;var o=e,a=e.segment+1,s=0;for(;s>-n/2;){if(--a<0)return!1;s-=t[a].dist(o),o=t[a]}s+=t[a].dist(t[a+1]),a++;var u=[],l=0;for(;s<n/2;){var c=t[a-1],f=t[a],h=t[a+1];if(!h)return!1;var p=c.angleTo(f)-f.angleTo(h);for(p=Math.abs((p+3*Math.PI)%(2*Math.PI)-Math.PI),u.push({distance:s,angleDelta:p}),l+=p;s-u[0].distance>r;)l-=u.shift().angleDelta;if(l>i)return!1;a++,s+=f.dist(h)}return!0}},function(t,e,n){var r=n(6);t.exports=function(t,e,n,i,o){for(var a=[],s=0;s<t.length;s++)for(var u=t[s],l=void 0,c=0;c<u.length-1;c++){var f=u[c],h=u[c+1];f.x<e&&h.x<e||(f.x<e?f=new r(e,f.y+(h.y-f.y)*((e-f.x)/(h.x-f.x)))._round():h.x<e&&(h=new r(e,f.y+(h.y-f.y)*((e-f.x)/(h.x-f.x)))._round()),f.y<n&&h.y<n||(f.y<n?f=new r(f.x+(h.x-f.x)*((n-f.y)/(h.y-f.y)),n)._round():h.y<n&&(h=new r(f.x+(h.x-f.x)*((n-f.y)/(h.y-f.y)),n)._round()),f.x>=i&&h.x>=i||(f.x>=i?f=new r(i,f.y+(h.y-f.y)*((i-f.x)/(h.x-f.x)))._round():h.x>=i&&(h=new r(i,f.y+(h.y-f.y)*((i-f.x)/(h.x-f.x)))._round()),f.y>=o&&h.y>=o||(f.y>=o?f=new r(f.x+(h.x-f.x)*((o-f.y)/(h.y-f.y)),o)._round():h.y>=o&&(h=new r(f.x+(h.x-f.x)*((o-f.y)/(h.y-f.y)),o)._round()),l&&f.equals(l[l.length-1])||(l=[f],a.push(l)),l.push(h)))))}return a}},function(t,e,n){function r(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,r.key,r)}}var i=n(3).register,o=function(){function t(){!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,t),this.opacity=0,this.targetOpacity=0,this.time=0}var e,n,i;return e=t,(n=[{key:"clone",value:function(){var e=new t;return e.opacity=this.opacity,e.targetOpacity=this.targetOpacity,e.time=this.time,e}}])&&r(e.prototype,n),i&&r(e,i),t}();i("OpacityState",o),t.exports=o},function(t,e,n){var r,i;function o(t,e,n){return e in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}var a=n(31),s=n(81),u=n(43),l={horizontal:1,vertical:2,horizontalOnly:3};t.exports={shapeText:function(t,e,n,r,i,o,c,f,h,p){var y=t.trim();p===l.vertical&&(y=s(y));var g,b=[],x={positionedGlyphs:b,text:y,top:f[1],bottom:f[1],left:f[0],right:f[0],writingMode:p},w=u.processBidirectionalText;g=w?w(y,d(y,c,n,e)):function(t,e){var n=[],r=0,i=!0,o=!1,a=void 0;try{for(var s,u=e[Symbol.iterator]();!(i=(s=u.next()).done);i=!0){var l=s.value;n.push(t.substring(r,l)),r=l}}catch(t){o=!0,a=t}finally{try{i||null==u.return||u.return()}finally{if(o)throw a}}r<t.length&&n.push(t.substring(r,t.length));return n}(y,d(y,c,n,e));return function(t,e,n,r,i,o,s,u,c){var f=0,h=-17,p=0,y=t.positionedGlyphs,d="right"===o?1:"left"===o?0:.5,g=!0,b=!1,x=void 0;try{for(var w,k=n[Symbol.iterator]();!(g=(w=k.next()).done);g=!0){var _=w.value;if((_=_.trim()).length){for(var S=y.length,A=0;A<_.length;A++){var T=_.charCodeAt(A),j=e[T];j&&(a.charHasUprightVerticalOrientation(T)&&s!==l.horizontal?(y.push({glyph:T,x:f,y:0,vertical:!0}),f+=c+u):(y.push({glyph:T,x:f,y:h,vertical:!1}),f+=j.metrics.advance+u))}if(y.length!==S){var O=f-u;p=Math.max(O,p),m(y,e,S,y.length-1,d)}f=0,h+=r}else h+=r}}catch(t){b=!0,x=t}finally{try{g||null==k.return||k.return()}finally{if(b)throw x}}var z=v(i),P=z.horizontalAlign,E=z.verticalAlign;!function(t,e,n,r,i,o,a){for(var s=(e-n)*i,u=(-r*a+.5)*o,l=0;l<t.length;l++)t[l].x+=s,t[l].y+=u}(y,d,P,E,p,r,n.length);var C=n.length*r;t.top+=-E*C,t.bottom=t.top+C,t.left+=-P*p,t.right=t.left+p}(x,e,g,r,i,o,p,c,h),!!b.length&&x},shapeIcon:function(t,e,n){var r=v(n),i=r.horizontalAlign,o=r.verticalAlign,a=e[0],s=e[1],u=a-t.displaySize[0]*i,l=u+t.displaySize[0],c=s-t.displaySize[1]*o,f=c+t.displaySize[1];return{image:t,top:c,bottom:f,left:u,right:l}},WritingMode:l};var c=(o(r={},9,!0),o(r,10,!0),o(r,11,!0),o(r,12,!0),o(r,13,!0),o(r,32,!0),r),f=(o(i={},10,!0),o(i,32,!0),o(i,38,!0),o(i,40,!0),o(i,41,!0),o(i,43,!0),o(i,45,!0),o(i,47,!0),o(i,173,!0),o(i,183,!0),o(i,8203,!0),o(i,8208,!0),o(i,8211,!0),o(i,8231,!0),i);function h(t,e,n,r){var i=Math.pow(t-e,2);return r?t<e?i/2:2*i:i+Math.abs(n)*n}function p(t,e){var n=0;return 10===t&&(n-=1e4),40!==t&&65288!==t||(n+=50),41!==e&&65289!==e||(n+=50),n}function y(t,e,n,r,i,o){var a=null,s=h(e,n,i,o),u=!0,l=!1,c=void 0;try{for(var f,p=r[Symbol.iterator]();!(u=(f=p.next()).done);u=!0){var y=f.value,d=h(e-y.x,n,i,o)+y.badness;d<=s&&(a=y,s=d)}}catch(t){l=!0,c=t}finally{try{u||null==p.return||p.return()}finally{if(l)throw c}}return{index:t,x:e,priorBreak:a,badness:s}}function d(t,e,n,r){if(!n)return[];if(!t)return[];for(var i=[],o=function(t,e,n,r){for(var i=0,o=0;o<t.length;o++){var a=r[t.charCodeAt(o)];a&&(i+=a.metrics.advance+e)}return i/Math.max(1,Math.ceil(i/n))}(t,e,n,r),s=0,u=0;u<t.length;u++){var l=t.charCodeAt(u),h=r[l];h&&!c[l]&&(s+=h.metrics.advance+e),u<t.length-1&&(f[l]||a.charAllowsIdeographicBreaking(l))&&i.push(y(u+1,s,o,i,p(l,t.charCodeAt(u+1)),!1))}return function t(e){return e?t(e.priorBreak).concat(e.index):[]}(y(t.length,s,o,i,0,!0))}function v(t){var e=.5,n=.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":n=1;break;case"top":case"top-right":case"top-left":n=0}return{horizontalAlign:e,verticalAlign:n}}function m(t,e,n,r,i){if(i){var o=e[t[r].glyph];if(o)for(var a=o.metrics.advance,s=(t[r].x+a)*i,u=n;u<=r;u++)t[u].x-=s}}},function(t,e,n){var r=n(6),i=n(158).GLYPH_PBF_BORDER;t.exports={getIconQuads:function(t,e,n,i,o,a,s){var u,l,c,f,h=e.image,p=n.layout,y=e.top-1/h.pixelRatio,d=e.left-1/h.pixelRatio,v=e.bottom+1/h.pixelRatio,m=e.right+1/h.pixelRatio;if("none"!==p.get("icon-text-fit")&&o){var g=m-d,b=v-y,x=p.get("text-size").evaluate(s)/24,w=o.left*x,k=o.right*x,_=o.top*x,S=o.bottom*x,A=k-w,T=S-_,j=p.get("icon-text-fit-padding")[0],O=p.get("icon-text-fit-padding")[1],z=p.get("icon-text-fit-padding")[2],P=p.get("icon-text-fit-padding")[3],E="width"===p.get("icon-text-fit")?.5*(T-b):0,C="height"===p.get("icon-text-fit")?.5*(A-g):0,M="width"===p.get("icon-text-fit")||"both"===p.get("icon-text-fit")?A:g,I="height"===p.get("icon-text-fit")||"both"===p.get("icon-text-fit")?T:b;u=new r(w+C-P,_+E-j),l=new r(w+C+O+M,_+E-j),c=new r(w+C+O+M,_+E+z+I),f=new r(w+C-P,_+E+z+I)}else u=new r(d,y),l=new r(m,y),c=new r(m,v),f=new r(d,v);var B=n.layout.get("icon-rotate").evaluate(s)*Math.PI/180;if(B){var V=Math.sin(B),L=Math.cos(B),F=[L,-V,V,L];u._matMult(F),l._matMult(F),f._matMult(F),c._matMult(F)}var R={x:h.textureRect.x-1,y:h.textureRect.y-1,w:h.textureRect.w+2,h:h.textureRect.h+2};return[{tl:u,tr:l,bl:f,br:c,tex:R,writingMode:void 0,glyphOffset:[0,0]}]},getGlyphQuads:function(t,e,n,o,a,s,u){for(var l=n.layout.get("text-rotate").evaluate(s)*Math.PI/180,c=n.layout.get("text-offset").evaluate(s).map(function(t){return 24*t}),f=e.positionedGlyphs,h=[],p=0;p<f.length;p++){var y=f[p],d=u[y.glyph];if(d){var v=d.rect;if(v){var m=i+1,g=d.metrics.advance/2,b=o?[y.x+g,y.y]:[0,0],x=o?[0,0]:[y.x+g+c[0],y.y+c[1]],w=d.metrics.left-m-g+x[0],k=-d.metrics.top-m+x[1],_=w+v.w,S=k+v.h,A=new r(w,k),T=new r(_,k),j=new r(w,S),O=new r(_,S);if(o&&y.vertical){var z=new r(-g,g),P=-Math.PI/2,E=new r(5,0);A._rotateAround(P,z)._add(E),T._rotateAround(P,z)._add(E),j._rotateAround(P,z)._add(E),O._rotateAround(P,z)._add(E)}if(l){var C=Math.sin(l),M=Math.cos(l),I=[M,-C,C,M];A._matMult(I),T._matMult(I),j._matMult(I),O._matMult(I)}h.push({tl:A,tr:T,bl:j,br:O,tex:v,writingMode:e.writingMode,glyphOffset:b})}}}return h}}},function(t,e,n){var r=n(29).AlphaImage,i=n(32),o=3;function a(t,e,n){1===t&&n.readMessage(s,e)}function s(t,e,n){if(3===t){var i=n.readMessage(u,{}),a=i.id,s=i.bitmap,l=i.width,c=i.height,f=i.left,h=i.top,p=i.advance;e.push({id:a,bitmap:new r({width:l+2*o,height:c+2*o},s),metrics:{width:l,height:c,left:f,top:h,advance:p}})}}function u(t,e,n){1===t?e.id=n.readVarint():2===t?e.bitmap=n.readBytes():3===t?e.width=n.readVarint():4===t?e.height=n.readVarint():5===t?e.left=n.readSVarint():6===t?e.top=n.readSVarint():7===t&&(e.advance=n.readVarint())}t.exports=function(t){return new i(t).readFields(a,[])},t.exports.GLYPH_PBF_BORDER=o},function(t,e){function n(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,r.key,r)}}var r=function(){function t(e,n,r,i,o,a,s,u,l,c,f){!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,t);var h=s.top*u-l,p=s.bottom*u+l,y=s.left*u-l,d=s.right*u+l;if(this.boxStartIndex=e.length,c){var v=p-h,m=d-y;v>0&&(v=Math.max(10*u,v),this._addLineCollisionCircles(e,n,r,r.segment,m,v,i,o,a,f))}else e.emplaceBack(r.x,r.y,y,h,d,p,i,o,a,0,0);this.boxEndIndex=e.length}var e,r,i;return e=t,(r=[{key:"_addLineCollisionCircles",value:function(t,e,n,r,i,o,a,s,u,l){var c=o/2,f=Math.floor(i/c),h=1+.4*Math.log(l)/Math.LN2,p=Math.floor(f*h/2),y=-o/2,d=n,v=r+1,m=y,g=-i/2,b=g-i/4;do{if(--v<0){if(m>g)return;v=0;break}m-=e[v].dist(d),d=e[v]}while(m>b);for(var x=e[v].dist(e[v+1]),w=-p;w<f+p;w++){var k=w*c,_=g+k;if(k<0&&(_+=k),k>i&&(_+=k-i),!(_<m)){for(;m+x<_;){if(m+=x,++v+1>=e.length)return;x=e[v].dist(e[v+1])}var S=_-m,A=e[v],T=e[v+1].sub(A)._unit()._mult(S)._add(A)._round(),j=Math.abs(_-y)<c?0:.8*(_-y);t.emplaceBack(T.x,T.y,-o/2,-o/2,o/2,o/2,a,s,u,o/2,j)}}}}])&&n(e.prototype,r),i&&n(e,i),t}();t.exports=r},function(t,e,n){var r=n(161),i=n(6),o=n(28).distToSegmentSquared;function a(t,e){return e.max-t.max}function s(t,e,n,r){this.p=new i(t,e),this.h=n,this.d=function(t,e){for(var n=!1,r=1/0,i=0;i<e.length;i++)for(var a=e[i],s=0,u=a.length,l=u-1;s<u;l=s++){var c=a[s],f=a[l];c.y>t.y!=f.y>t.y&&t.x<(f.x-c.x)*(t.y-c.y)/(f.y-c.y)+c.x&&(n=!n),r=Math.min(r,o(t,c,f))}return(n?1:-1)*Math.sqrt(r)}(this.p,r),this.max=this.d+this.h*Math.SQRT2}t.exports=function(t){for(var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:1,n=arguments.length>2&&void 0!==arguments[2]&&arguments[2],o=1/0,u=1/0,l=-1/0,c=-1/0,f=t[0],h=0;h<f.length;h++){var p=f[h];(!h||p.x<o)&&(o=p.x),(!h||p.y<u)&&(u=p.y),(!h||p.x>l)&&(l=p.x),(!h||p.y>c)&&(c=p.y)}var y=l-o,d=c-u,v=Math.min(y,d),m=v/2,g=new r(null,a);if(0===v)return new i(o,u);for(var b=o;b<l;b+=v)for(var x=u;x<c;x+=v)g.push(new s(b+m,x+m,m,t));for(var w=function(t){for(var e=0,n=0,r=0,i=t[0],o=0,a=i.length,u=a-1;o<a;u=o++){var l=i[o],c=i[u],f=l.x*c.y-c.x*l.y;n+=(l.x+c.x)*f,r+=(l.y+c.y)*f,e+=3*f}return new s(n/e,r/e,0,t)}(t),k=g.length;g.length;){var _=g.pop();(_.d>w.d||!w.d)&&(w=_,n&&console.log("found best %d after %d probes",Math.round(1e4*_.d)/1e4,k)),_.max-w.d<=e||(m=_.h/2,g.push(new s(_.p.x-m,_.p.y-m,m,t)),g.push(new s(_.p.x+m,_.p.y-m,m,t)),g.push(new s(_.p.x-m,_.p.y+m,m,t)),g.push(new s(_.p.x+m,_.p.y+m,m,t)),k+=4)}return n&&(console.log("num probes: ".concat(k)),console.log("best distance: ".concat(w.d))),w.p}},function(t,e,n){"use strict";function r(t,e){if(!(this instanceof r))return new r(t,e);if(this.data=t||[],this.length=this.data.length,this.compare=e||i,this.length>0)for(var n=(this.length>>1)-1;n>=0;n--)this._down(n)}function i(t,e){return t<e?-1:t>e?1:0}t.exports=r,t.exports.default=r,r.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--,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,n=this.compare,r=e[t];t>0;){var i=t-1>>1,o=e[i];if(n(r,o)>=0)break;e[t]=o,t=i}e[t]=r},_down:function(t){for(var e=this.data,n=this.compare,r=this.length>>1,i=e[t];t<r;){var o=1+(t<<1),a=o+1,s=e[o];if(a<this.length&&n(e[a],s)<0&&(o=a,s=e[a]),n(s,i)>=0)break;e[t]=s,t=o}e[t]=i}}},function(t,e,n){var r=n(85),i=n(29).RGBAImage,o=1;function a(t,e){var n=e.pixelRatio,r={x:t.x+o,y:t.y+o,w:t.w-2*o,h:t.h-2*o};return{pixelRatio:n,textureRect:r,tl:[r.x,r.y],br:[r.x+r.w,r.y+r.h],displaySize:[r.w/n,r.h/n]}}t.exports={imagePosition:a,makeImageAtlas:function(t){var e=new i({width:0,height:0}),n={},s=new r(0,0,{autoResize:!0});for(var u in t){var l=t[u],c=s.packOne(l.data.width+2*o,l.data.height+2*o);e.resize({width:s.w,height:s.h}),i.copy(l.data,e,{x:0,y:0},{x:c.x+o,y:c.y+o},l.data),n[u]=a(c,l)}return s.shrink(),e.resize({width:s.w,height:s.h}),{image:e,positions:n}}}},function(t,e,n){var r=n(85),i=n(29).AlphaImage,o=1;t.exports={makeGlyphAtlas:function(t){var e=new i({width:0,height:0}),n={},a=new r(0,0,{autoResize:!0});for(var s in t){var u=t[s],l=n[s]={};for(var c in u){var f=u[+c];if(f&&0!==f.bitmap.width&&0!==f.bitmap.height){var h=a.packOne(f.bitmap.width+2*o,f.bitmap.height+2*o);e.resize({width:a.w,height:a.h}),i.copy(f.bitmap,e,{x:0,y:0},{x:h.x+o,y:h.y+o},f.bitmap),l[c]={rect:h,metrics:f.metrics}}}}return a.shrink(),e.resize({width:a.w,height:a.h}),{image:e,positions:n}}}},function(t,e,n){function r(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,r.key,r)}}var i=n(165).DEMData,o=function(){function t(){!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,t),this.loading={},this.loaded={}}var e,n,o;return e=t,(n=[{key:"loadTile",value:function(t,e){var n=t.source,r=t.uid;this.loading[n]||(this.loading[n]={});var o=new i(r);this.loading[n][r]=o,o.loadFromImage(t.rawImageData),delete this.loading[n][r],this.loaded[n]=this.loaded[n]||{},this.loaded[n][r]=o,e(null,o)}},{key:"removeTile",value:function(t){var e=this.loaded[t.source],n=t.uid;e&&e[n]&&delete e[n]}}])&&r(e.prototype,n),o&&r(e,o),t}();t.exports=o},function(t,e,n){function r(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function i(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,r.key,r)}}function o(t,e,n){return e&&i(t.prototype,e),n&&i(t,n),t}var a=n(29).RGBAImage,s=n(2),u=n(3).register,l=function(){function t(e,n,i){if(r(this,t),e<=0)throw new RangeError("Level must have positive dimension");this.dim=e,this.border=n,this.stride=this.dim+2*this.border,this.data=i||new Int32Array((this.dim+2*this.border)*(this.dim+2*this.border))}return o(t,[{key:"set",value:function(t,e,n){this.data[this._idx(t,e)]=n+65536}},{key:"get",value:function(t,e){return this.data[this._idx(t,e)]-65536}},{key:"_idx",value:function(t,e){if(t<-this.border||t>=this.dim+this.border||e<-this.border||e>=this.dim+this.border)throw new RangeError("out of range source coordinates for DEM data");return(e+this.border)*this.stride+(t+this.border)}}]),t}();u("Level",l);var c=function(){function t(e,n,i){r(this,t),this.uid=e,this.scale=n||1,this.level=i||new l(256,512),this.loaded=!!i}return o(t,[{key:"loadFromImage",value:function(t){if(t.height!==t.width)throw new RangeError("DEM tiles must be square");for(var e=this.level=new l(t.width,t.width/2),n=t.data,r=0;r<e.dim;r++)for(var i=0;i<e.dim;i++){var o=4*(r*e.dim+i);e.set(i,r,this.scale*((256*n[o]*256+256*n[o+1]+n[o+2])/10-1e4))}for(var a=0;a<e.dim;a++)e.set(-1,a,e.get(0,a)),e.set(e.dim,a,e.get(e.dim-1,a)),e.set(a,-1,e.get(a,0)),e.set(a,e.dim,e.get(a,e.dim-1));e.set(-1,-1,e.get(0,0)),e.set(e.dim,-1,e.get(e.dim-1,0)),e.set(-1,e.dim,e.get(0,e.dim-1)),e.set(e.dim,e.dim,e.get(e.dim-1,e.dim-1)),this.loaded=!0}},{key:"getPixels",value:function(){return new a({width:this.level.dim+2*this.level.border,height:this.level.dim+2*this.level.border},new Uint8Array(this.level.data.buffer))}},{key:"backfillBorder",value:function(t,e,n){var r=this.level,i=t.level;if(r.dim!==i.dim)throw new Error("level mismatch (dem dimension)");var o=e*r.dim,a=e*r.dim+r.dim,u=n*r.dim,l=n*r.dim+r.dim;switch(e){case-1:o=a-1;break;case 1:a=o+1}switch(n){case-1:u=l-1;break;case 1:l=u+1}for(var c=s.clamp(o,-r.border,r.dim+r.border),f=s.clamp(a,-r.border,r.dim+r.border),h=s.clamp(u,-r.border,r.dim+r.border),p=s.clamp(l,-r.border,r.dim+r.border),y=-e*r.dim,d=-n*r.dim,v=h;v<p;v++)for(var m=c;m<f;m++)r.set(m,v,i.get(m+y,v+d))}}]),t}();u("DEMData",c),t.exports={DEMData:c,Level:l}},function(t,e,n){function r(t){return(r="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t})(t)}function i(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,r.key,r)}}function o(t,e){return!e||"object"!==r(e)&&"function"!=typeof e?function(t){if(void 0===t)throw new ReferenceError("this hasn\'t been initialised - super() hasn\'t been called");return t}(t):e}function a(t,e,n){return(a="undefined"!=typeof Reflect&&Reflect.get?Reflect.get:function(t,e,n){var r=function(t,e){for(;!Object.prototype.hasOwnProperty.call(t,e)&&null!==(t=s(t)););return t}(t,e);if(r){var i=Object.getOwnPropertyDescriptor(r,e);return i.get?i.get.call(n):i.value}})(t,e,n||t)}function s(t){return(s=Object.setPrototypeOf?Object.getPrototypeOf:function(t){return t.__proto__||Object.getPrototypeOf(t)})(t)}function u(t,e){return(u=Object.setPrototypeOf||function(t,e){return t.__proto__=e,t})(t,e)}var l=n(44),c=n(167),f=n(170),h=n(171),p=n(173),y=n(178).default,d=n(82);function v(t,e){var n=t.source,r=t.tileID.canonical;if(!this._geoJSONIndexes[n])return e(null,null);var i=this._geoJSONIndexes[n].getTile(r.z,r.x,r.y);if(!i)return e(null,null);var o=new f(i.features),a=h(o);0===a.byteOffset&&a.byteLength===a.buffer.byteLength||(a=new Uint8Array(a)),e(null,{vectorTile:o,rawData:a.buffer})}var m=function(t){function e(t,n,r){var i;return function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,e),i=o(this,s(e).call(this,t,n,v)),r&&(i.loadGeoJSON=r),i._geoJSONIndexes={},i}var n,f,h;return function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),e&&u(t,e)}(e,d),n=e,(f=[{key:"loadData",value:function(t,e){var n=this;this.loadGeoJSON(t,function(i,o){if(i||!o)return e(i);if("object"!==r(o))return e(new Error("Input data is not a valid GeoJSON object."));c(o,!0);try{n._geoJSONIndexes[t.source]=t.cluster?p(t.superclusterOptions).load(o.features):y(o,t.geojsonVtOptions)}catch(i){return e(i)}n.loaded[t.source]={},e(null)})}},{key:"reloadTile",value:function(t,n){var r=this.loaded[t.source],i=t.uid;return r&&r[i]?a(s(e.prototype),"reloadTile",this).call(this,t,n):this.loadTile(t,n)}},{key:"loadGeoJSON",value:function(t,e){if(t.request)l.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."))}}}},{key:"removeSource",value:function(t,e){this._geoJSONIndexes[t.source]&&delete this._geoJSONIndexes[t.source],e()}}])&&i(n.prototype,f),h&&i(n,h),e}();t.exports=m},function(t,e,n){var r=n(168);function i(t,e){return function(n){return t(n,e)}}function o(t,e){e=!!e,t[0]=a(t[0],e);for(var n=1;n<t.length;n++)t[n]=a(t[n],!e);return t}function a(t,e){return function(t){return r.ring(t)>=0}(t)===e?t:t.reverse()}t.exports=function t(e,n){switch(e&&e.type||null){case"FeatureCollection":return e.features=e.features.map(i(t,n)),e;case"Feature":return e.geometry=t(e.geometry,n),e;case"Polygon":case"MultiPolygon":return function(t,e){"Polygon"===t.type?t.coordinates=o(t.coordinates,e):"MultiPolygon"===t.type&&(t.coordinates=t.coordinates.map(i(o,e)));return t}(e,n);default:return e}}},function(t,e,n){var r=n(169);function i(t){var e=0;if(t&&t.length>0){e+=Math.abs(o(t[0]));for(var n=1;n<t.length;n++)e-=Math.abs(o(t[n]))}return e}function o(t){var e,n,i,o,s,u,l=0,c=t.length;if(c>2){for(u=0;u<c;u++)u===c-2?(i=c-2,o=c-1,s=0):u===c-1?(i=c-1,o=0,s=1):(i=u,o=u+1,s=u+2),e=t[i],n=t[o],l+=(a(t[s][0])-a(e[0]))*Math.sin(a(n[1]));l=l*r.RADIUS*r.RADIUS/2}return l}function a(t){return t*Math.PI/180}t.exports.geometry=function t(e){var n,r=0;switch(e.type){case"Polygon":return i(e.coordinates);case"MultiPolygon":for(n=0;n<e.coordinates.length;n++)r+=i(e.coordinates[n]);return r;case"Point":case"MultiPoint":case"LineString":case"MultiLineString":return 0;case"GeometryCollection":for(n=0;n<e.geometries.length;n++)r+=t(e.geometries[n]);return r}},t.exports.ring=o},function(t,e){t.exports.RADIUS=6378137,t.exports.FLATTENING=1/298.257223563,t.exports.POLAR_RADIUS=6356752.3142},function(t,e,n){function r(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function i(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,r.key,r)}}function o(t,e,n){return e&&i(t.prototype,e),n&&i(t,n),t}var a=n(6),s=n(21).VectorTileFeature.prototype.toGeoJSON,u=n(18),l=function(){function t(e){r(this,t),this._feature=e,this.extent=u,this.type=e.type,this.properties=e.tags,"id"in e&&!isNaN(e.id)&&(this.id=parseInt(e.id,10))}return o(t,[{key:"loadGeometry",value:function(){if(1===this._feature.type){var t=[],e=!0,n=!1,r=void 0;try{for(var i,o=this._feature.geometry[Symbol.iterator]();!(e=(i=o.next()).done);e=!0){var s=i.value;t.push([new a(s[0],s[1])])}}catch(t){n=!0,r=t}finally{try{e||null==o.return||o.return()}finally{if(n)throw r}}return t}var u=[],l=!0,c=!1,f=void 0;try{for(var h,p=this._feature.geometry[Symbol.iterator]();!(l=(h=p.next()).done);l=!0){var y=h.value,d=[],v=!0,m=!1,g=void 0;try{for(var b,x=y[Symbol.iterator]();!(v=(b=x.next()).done);v=!0){var w=b.value;d.push(new a(w[0],w[1]))}}catch(t){m=!0,g=t}finally{try{v||null==x.return||x.return()}finally{if(m)throw g}}u.push(d)}}catch(t){c=!0,f=t}finally{try{l||null==p.return||p.return()}finally{if(c)throw f}}return u}},{key:"toGeoJSON",value:function(t,e,n){return s.call(this,t,e,n)}}]),t}(),c=function(){function t(e){r(this,t),this.layers={_geojsonTileLayer:this},this.name="_geojsonTileLayer",this.extent=u,this.length=e.length,this._features=e}return o(t,[{key:"feature",value:function(t){return new l(this._features[t])}}]),t}();t.exports=c},function(t,e,n){var r=n(32),i=n(172);function o(t){var e=new r;return function(t,e){for(var n in t.layers)e.writeMessage(3,a,t.layers[n])}(t,e),e.finish()}function a(t,e){var n;e.writeVarintField(15,t.version||1),e.writeStringField(1,t.name||""),e.writeVarintField(5,t.extent||4096);var r={keys:[],values:[],keycache:{},valuecache:{}};for(n=0;n<t.length;n++)r.feature=t.feature(n),e.writeMessage(2,s,r);var i=r.keys;for(n=0;n<i.length;n++)e.writeStringField(3,i[n]);var o=r.values;for(n=0;n<o.length;n++)e.writeMessage(4,h,o[n])}function s(t,e){var n=t.feature;void 0!==n.id&&e.writeVarintField(1,n.id),e.writeMessage(2,u,t),e.writeVarintField(3,n.type),e.writeMessage(4,f,n)}function u(t,e){var n=t.feature,r=t.keys,i=t.values,o=t.keycache,a=t.valuecache;for(var s in n.properties){var u=o[s];void 0===u&&(r.push(s),u=r.length-1,o[s]=u),e.writeVarint(u);var l=n.properties[s],c=typeof l;"string"!==c&&"boolean"!==c&&"number"!==c&&(l=JSON.stringify(l));var f=c+":"+l,h=a[f];void 0===h&&(i.push(l),h=i.length-1,a[f]=h),e.writeVarint(h)}}function l(t,e){return(e<<3)+(7&t)}function c(t){return t<<1^t>>31}function f(t,e){for(var n=t.loadGeometry(),r=t.type,i=0,o=0,a=n.length,s=0;s<a;s++){var u=n[s],f=1;1===r&&(f=u.length),e.writeVarint(l(1,f));for(var h=3===r?u.length-1:u.length,p=0;p<h;p++){1===p&&1!==r&&e.writeVarint(l(2,h-1));var y=u[p].x-i,d=u[p].y-o;e.writeVarint(c(y)),e.writeVarint(c(d)),i+=y,o+=d}3===r&&e.writeVarint(l(7,1))}}function h(t,e){var n=typeof t;"string"===n?e.writeStringField(1,t):"boolean"===n?e.writeBooleanField(7,t):"number"===n&&(t%1!=0?e.writeDoubleField(3,t):t<0?e.writeSVarintField(6,t):e.writeVarintField(5,t))}t.exports=o,t.exports.fromVectorTileJs=o,t.exports.fromGeojsonVt=function(t,e){e=e||{};var n={};for(var r in t)n[r]=new i(t[r].features,e),n[r].name=r,n[r].version=e.version,n[r].extent=e.extent;return o({layers:n})},t.exports.GeoJSONWrapper=i},function(t,e,n){"use strict";var r=n(6),i=n(21).VectorTileFeature;function o(t,e){this.options=e||{},this.features=t,this.length=t.length}function a(t,e){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=e||4096}t.exports=o,o.prototype.feature=function(t){return new a(this.features[t],this.options.extent)},a.prototype.loadGeometry=function(){var t=this.rawGeometry;this.geometry=[];for(var e=0;e<t.length;e++){for(var n=t[e],i=[],o=0;o<n.length;o++)i.push(new r(n[o][0],n[o][1]));this.geometry.push(i)}return this.geometry},a.prototype.bbox=function(){this.geometry||this.loadGeometry();for(var t=this.geometry,e=1/0,n=-1/0,r=1/0,i=-1/0,o=0;o<t.length;o++)for(var a=t[o],s=0;s<a.length;s++){var u=a[s];e=Math.min(e,u.x),n=Math.max(n,u.x),r=Math.min(r,u.y),i=Math.max(i,u.y)}return[e,r,n,i]},a.prototype.toGeoJSON=i.prototype.toGeoJSON},function(t,e,n){"use strict";var r=n(174);function i(t){this.options=f(Object.create(this.options),t),this.trees=new Array(this.options.maxZoom+1)}function o(t,e,n,r,i){return{x:t,y:e,zoom:1/0,id:r,properties:i,parentId:-1,numPoints:n}}function a(t,e){var n=t.geometry.coordinates;return{x:l(n[0]),y:c(n[1]),zoom:1/0,id:e,parentId:-1}}function s(t){return{type:"Feature",properties:u(t),geometry:{type:"Point",coordinates:[(r=t.x,360*(r-.5)),(e=t.y,n=(180-360*e)*Math.PI/180,360*Math.atan(Math.exp(n))/Math.PI-90)]}};var e,n,r}function u(t){var e=t.numPoints,n=e>=1e4?Math.round(e/1e3)+"k":e>=1e3?Math.round(e/100)/10+"k":e;return f(f({},t.properties),{cluster:!0,cluster_id:t.id,point_count:e,point_count_abbreviated:n})}function l(t){return t/360+.5}function c(t){var e=Math.sin(t*Math.PI/180),n=.5-.25*Math.log((1+e)/(1-e))/Math.PI;return n<0?0:n>1?1:n}function f(t,e){for(var n in e)t[n]=e[n];return t}function h(t){return t.x}function p(t){return t.y}t.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 n="prepare "+t.length+" points";e&&console.time(n),this.points=t;var i=t.map(a);e&&console.timeEnd(n);for(var o=this.options.maxZoom;o>=this.options.minZoom;o--){var s=+Date.now();this.trees[o+1]=r(i,h,p,this.options.nodeSize,Float32Array),i=this._cluster(i,o),e&&console.log("z%d: %d clusters in %dms",o,i.length,+Date.now()-s)}return this.trees[this.options.minZoom]=r(i,h,p,this.options.nodeSize,Float32Array),e&&console.timeEnd("total time"),this},getClusters:function(t,e){for(var n=this.trees[this._limitZoom(e)],r=n.range(l(t[0]),c(t[3]),l(t[2]),c(t[1])),i=[],o=0;o<r.length;o++){var a=n.points[r[o]];i.push(a.numPoints?s(a):this.points[a.id])}return i},getChildren:function(t,e){for(var n=this.trees[e+1].points[t],r=this.options.radius/(this.options.extent*Math.pow(2,e)),i=this.trees[e+1].within(n.x,n.y,r),o=[],a=0;a<i.length;a++){var u=this.trees[e+1].points[i[a]];u.parentId===t&&o.push(u.numPoints?s(u):this.points[u.id])}return o},getLeaves:function(t,e,n,r){n=n||10,r=r||0;var i=[];return this._appendLeaves(i,t,e,n,r,0),i},getTile:function(t,e,n){var r=this.trees[this._limitZoom(t)],i=Math.pow(2,t),o=this.options.extent,a=this.options.radius/o,s=(n-a)/i,u=(n+1+a)/i,l={features:[]};return this._addTileFeatures(r.range((e-a)/i,s,(e+1+a)/i,u),r.points,e,n,i,l),0===e&&this._addTileFeatures(r.range(1-a/i,s,1,u),r.points,i,n,i,l),e===i-1&&this._addTileFeatures(r.range(0,s,a/i,u),r.points,-1,n,i,l),l.features.length?l:null},getClusterExpansionZoom:function(t,e){for(;e<this.options.maxZoom;){var n=this.getChildren(t,e);if(e++,1!==n.length)break;t=n[0].properties.cluster_id}return e},_appendLeaves:function(t,e,n,r,i,o){for(var a=this.getChildren(e,n),s=0;s<a.length;s++){var u=a[s].properties;if(u.cluster?o+u.point_count<=i?o+=u.point_count:o=this._appendLeaves(t,u.cluster_id,n+1,r,i,o):o<i?o++:t.push(a[s]),t.length===r)break}return o},_addTileFeatures:function(t,e,n,r,i,o){for(var a=0;a<t.length;a++){var s=e[t[a]];o.features.push({type:1,geometry:[[Math.round(this.options.extent*(s.x*i-n)),Math.round(this.options.extent*(s.y*i-r))]],tags:s.numPoints?u(s):this.points[s.id].properties})}},_limitZoom:function(t){return Math.max(this.options.minZoom,Math.min(t,this.options.maxZoom+1))},_cluster:function(t,e){for(var n=[],r=this.options.radius/(this.options.extent*Math.pow(2,e)),i=0;i<t.length;i++){var a=t[i];if(!(a.zoom<=e)){a.zoom=e;var s=this.trees[e+1],u=s.within(a.x,a.y,r),l=a.numPoints||1,c=a.x*l,f=a.y*l,h=null;this.options.reduce&&(h=this.options.initial(),this._accumulate(h,a));for(var p=0;p<u.length;p++){var y=s.points[u[p]];if(e<y.zoom){var d=y.numPoints||1;y.zoom=e,c+=y.x*d,f+=y.y*d,l+=d,y.parentId=i,this.options.reduce&&this._accumulate(h,y)}}1===l?n.push(a):(a.parentId=i,n.push(o(c/l,f/l,l,i,h)))}}return n},_accumulate:function(t,e){var n=e.numPoints?e.properties:this.options.map(this.points[e.id].properties);this.options.reduce(t,n)}}},function(t,e,n){"use strict";var r=n(175),i=n(176),o=n(177);function a(t,e,n,i,o){e=e||s,n=n||u,o=o||Array,this.nodeSize=i||64,this.points=t,this.ids=new o(t.length),this.coords=new o(2*t.length);for(var a=0;a<t.length;a++)this.ids[a]=a,this.coords[2*a]=e(t[a]),this.coords[2*a+1]=n(t[a]);r(this.ids,this.coords,this.nodeSize,0,this.ids.length-1,0)}function s(t){return t[0]}function u(t){return t[1]}t.exports=function(t,e,n,r,i){return new a(t,e,n,r,i)},a.prototype={range:function(t,e,n,r){return i(this.ids,this.coords,t,e,n,r,this.nodeSize)},within:function(t,e,n){return o(this.ids,this.coords,t,e,n,this.nodeSize)}}},function(t,e,n){"use strict";function r(t,e,n,r){i(t,n,r),i(e,2*n,2*r),i(e,2*n+1,2*r+1)}function i(t,e,n){var r=t[e];t[e]=t[n],t[n]=r}t.exports=function t(e,n,i,o,a,s){if(a-o<=i)return;var u=Math.floor((o+a)/2);!function t(e,n,i,o,a,s){for(;a>o;){if(a-o>600){var u=a-o+1,l=i-o+1,c=Math.log(u),f=.5*Math.exp(2*c/3),h=.5*Math.sqrt(c*f*(u-f)/u)*(l-u/2<0?-1:1),p=Math.max(o,Math.floor(i-l*f/u+h)),y=Math.min(a,Math.floor(i+(u-l)*f/u+h));t(e,n,i,p,y,s)}var d=n[2*i+s],v=o,m=a;for(r(e,n,o,i),n[2*a+s]>d&&r(e,n,o,a);v<m;){for(r(e,n,v,m),v++,m--;n[2*v+s]<d;)v++;for(;n[2*m+s]>d;)m--}n[2*o+s]===d?r(e,n,o,m):r(e,n,++m,a),m<=i&&(o=m+1),i<=m&&(a=m-1)}}(e,n,u,o,a,s%2);t(e,n,i,o,u-1,s+1);t(e,n,i,u+1,a,s+1)}},function(t,e,n){"use strict";t.exports=function(t,e,n,r,i,o,a){var s,u,l=[0,t.length-1,0],c=[];for(;l.length;){var f=l.pop(),h=l.pop(),p=l.pop();if(h-p<=a)for(var y=p;y<=h;y++)s=e[2*y],u=e[2*y+1],s>=n&&s<=i&&u>=r&&u<=o&&c.push(t[y]);else{var d=Math.floor((p+h)/2);s=e[2*d],u=e[2*d+1],s>=n&&s<=i&&u>=r&&u<=o&&c.push(t[d]);var v=(f+1)%2;(0===f?n<=s:r<=u)&&(l.push(p),l.push(d-1),l.push(v)),(0===f?i>=s:o>=u)&&(l.push(d+1),l.push(h),l.push(v))}}return c}},function(t,e,n){"use strict";function r(t,e,n,r){var i=t-n,o=e-r;return i*i+o*o}t.exports=function(t,e,n,i,o,a){var s=[0,t.length-1,0],u=[],l=o*o;for(;s.length;){var c=s.pop(),f=s.pop(),h=s.pop();if(f-h<=a)for(var p=h;p<=f;p++)r(e[2*p],e[2*p+1],n,i)<=l&&u.push(t[p]);else{var y=Math.floor((h+f)/2),d=e[2*y],v=e[2*y+1];r(d,v,n,i)<=l&&u.push(t[y]);var m=(c+1)%2;(0===c?n-o<=d:i-o<=v)&&(s.push(h),s.push(y-1),s.push(m)),(0===c?n+o>=d:i+o>=v)&&(s.push(y+1),s.push(f),s.push(m))}}return u}},function(t,e,n){"use strict";function r(t,e,n,r,i,o){var a=i-n,s=o-r;if(0!==a||0!==s){var u=((t-n)*a+(e-r)*s)/(a*a+s*s);u>1?(n=i,r=o):u>0&&(n+=a*u,r+=s*u)}return(a=t-n)*a+(s=e-r)*s}function i(t,e,n,r){var i={id:void 0===t?null:t,type:e,geometry:n,tags:r,minX:1/0,minY:1/0,maxX:-1/0,maxY:-1/0};return function(t){var e=t.geometry,n=t.type;if("Point"===n||"MultiPoint"===n||"LineString"===n)o(t,e);else if("Polygon"===n||"MultiLineString"===n)for(var r=0;r<e.length;r++)o(t,e[r]);else if("MultiPolygon"===n)for(r=0;r<e.length;r++)for(var i=0;i<e[r].length;i++)o(t,e[r][i])}(i),i}function o(t,e){for(var n=0;n<e.length;n+=3)t.minX=Math.min(t.minX,e[n]),t.minY=Math.min(t.minY,e[n+1]),t.maxX=Math.max(t.maxX,e[n]),t.maxY=Math.max(t.maxY,e[n+1])}function a(t,e,n,r){if(e.geometry){var o=e.geometry.coordinates,c=e.geometry.type,f=Math.pow(n.tolerance/((1<<n.maxZoom)*n.extent),2),h=[],p=e.id;if(n.promoteId?p=e.properties[n.promoteId]:n.generateId&&(p=r||0),"Point"===c)s(o,h);else if("MultiPoint"===c)for(var y=0;y<o.length;y++)s(o[y],h);else if("LineString"===c)u(o,h,f,!1);else if("MultiLineString"===c){if(n.lineMetrics){for(y=0;y<o.length;y++)h=[],u(o[y],h,f,!1),t.push(i(p,"LineString",h,e.properties));return}l(o,h,f,!1)}else if("Polygon"===c)l(o,h,f,!0);else{if("MultiPolygon"!==c){if("GeometryCollection"===c){for(y=0;y<e.geometry.geometries.length;y++)a(t,{id:p,geometry:e.geometry.geometries[y],properties:e.properties},n,r);return}throw new Error("Input data is not a valid GeoJSON object.")}for(y=0;y<o.length;y++){var d=[];l(o[y],d,f,!0),h.push(d)}}t.push(i(p,c,h,e.properties))}}function s(t,e){e.push(c(t[0])),e.push(f(t[1])),e.push(0)}function u(t,e,n,i){for(var o,a,s=0,u=0;u<t.length;u++){var l=c(t[u][0]),h=f(t[u][1]);e.push(l),e.push(h),e.push(0),u>0&&(s+=i?(o*h-l*a)/2:Math.sqrt(Math.pow(l-o,2)+Math.pow(h-a,2))),o=l,a=h}var p=e.length-3;e[2]=1,function t(e,n,i,o){for(var a,s=o,u=i-n>>1,l=i-n,c=e[n],f=e[n+1],h=e[i],p=e[i+1],y=n+3;y<i;y+=3){var d=r(e[y],e[y+1],c,f,h,p);if(d>s)a=y,s=d;else if(d===s){var v=Math.abs(y-u);v<l&&(a=y,l=v)}}s>o&&(a-n>3&&t(e,n,a,o),e[a+2]=s,i-a>3&&t(e,a,i,o))}(e,0,p,n),e[p+2]=1,e.size=Math.abs(s),e.start=0,e.end=e.size}function l(t,e,n,r){for(var i=0;i<t.length;i++){var o=[];u(t[i],o,n,r),e.push(o)}}function c(t){return t/360+.5}function f(t){var e=Math.sin(t*Math.PI/180),n=.5-.25*Math.log((1+e)/(1-e))/Math.PI;return n<0?0:n>1?1:n}function h(t,e,n,r,o,a,s,u){if(r/=e,a>=(n/=e)&&s<r)return t;if(s<n||a>=r)return null;for(var l=[],c=0;c<t.length;c++){var f=t[c],h=f.geometry,d=f.type,m=0===o?f.minX:f.minY,g=0===o?f.maxX:f.maxY;if(m>=n&&g<r)l.push(f);else if(!(g<n||m>=r)){var b=[];if("Point"===d||"MultiPoint"===d)p(h,b,n,r,o);else if("LineString"===d)y(h,b,n,r,o,!1,u.lineMetrics);else if("MultiLineString"===d)v(h,b,n,r,o,!1);else if("Polygon"===d)v(h,b,n,r,o,!0);else if("MultiPolygon"===d)for(var x=0;x<h.length;x++){var w=[];v(h[x],w,n,r,o,!0),w.length&&b.push(w)}if(b.length){if(u.lineMetrics&&"LineString"===d){for(x=0;x<b.length;x++)l.push(i(f.id,d,b[x],f.tags));continue}"LineString"!==d&&"MultiLineString"!==d||(1===b.length?(d="LineString",b=b[0]):d="MultiLineString"),"Point"!==d&&"MultiPoint"!==d||(d=3===b.length?"Point":"MultiPoint"),l.push(i(f.id,d,b,f.tags))}}}return l.length?l:null}function p(t,e,n,r,i){for(var o=0;o<t.length;o+=3){var a=t[o+i];a>=n&&a<=r&&(e.push(t[o]),e.push(t[o+1]),e.push(t[o+2]))}}function y(t,e,n,r,i,o,a){for(var s,u,l=d(t),c=0===i?g:b,f=t.start,h=0;h<t.length-3;h+=3){var p=t[h],y=t[h+1],v=t[h+2],x=t[h+3],w=t[h+4],k=0===i?p:y,_=0===i?x:w,S=!1;a&&(s=Math.sqrt(Math.pow(p-x,2)+Math.pow(y-w,2))),k<n?_>n&&(u=c(l,p,y,x,w,n),a&&(l.start=f+s*u)):k>r?_<r&&(u=c(l,p,y,x,w,r),a&&(l.start=f+s*u)):m(l,p,y,v),_<n&&k>=n&&(u=c(l,p,y,x,w,n),S=!0),_>r&&k<=r&&(u=c(l,p,y,x,w,r),S=!0),!o&&S&&(a&&(l.end=f+s*u),e.push(l),l=d(t)),a&&(f+=s)}var A=t.length-3;p=t[A],y=t[A+1],v=t[A+2],(k=0===i?p:y)>=n&&k<=r&&m(l,p,y,v),A=l.length-3,o&&A>=3&&(l[A]!==l[0]||l[A+1]!==l[1])&&m(l,l[0],l[1],l[2]),l.length&&e.push(l)}function d(t){var e=[];return e.size=t.size,e.start=t.start,e.end=t.end,e}function v(t,e,n,r,i,o){for(var a=0;a<t.length;a++)y(t[a],e,n,r,i,o,!1)}function m(t,e,n,r){t.push(e),t.push(n),t.push(r)}function g(t,e,n,r,i,o){var a=(o-e)/(r-e);return t.push(o),t.push(n+(i-n)*a),t.push(1),a}function b(t,e,n,r,i,o){var a=(o-n)/(i-n);return t.push(e+(r-e)*a),t.push(o),t.push(1),a}function x(t,e){for(var n=[],r=0;r<t.length;r++){var o,a=t[r],s=a.type;if("Point"===s||"MultiPoint"===s||"LineString"===s)o=w(a.geometry,e);else if("MultiLineString"===s||"Polygon"===s){o=[];for(var u=0;u<a.geometry.length;u++)o.push(w(a.geometry[u],e))}else if("MultiPolygon"===s)for(o=[],u=0;u<a.geometry.length;u++){for(var l=[],c=0;c<a.geometry[u].length;c++)l.push(w(a.geometry[u][c],e));o.push(l)}n.push(i(a.id,s,o,a.tags))}return n}function w(t,e){var n=[];n.size=t.size,void 0!==t.start&&(n.start=t.start,n.end=t.end);for(var r=0;r<t.length;r+=3)n.push(t[r]+e,t[r+1],t[r+2]);return n}function k(t,e){if(t.transformed)return t;var n,r,i,o=1<<t.z,a=t.x,s=t.y;for(n=0;n<t.features.length;n++){var u=t.features[n],l=u.geometry,c=u.type;if(u.geometry=[],1===c)for(r=0;r<l.length;r+=2)u.geometry.push(_(l[r],l[r+1],e,o,a,s));else for(r=0;r<l.length;r++){var f=[];for(i=0;i<l[r].length;i+=2)f.push(_(l[r][i],l[r][i+1],e,o,a,s));u.geometry.push(f)}}return t.transformed=!0,t}function _(t,e,n,r,i,o){return[Math.round(n*(t*r-i)),Math.round(n*(e*r-o))]}function S(t,e,n,r,i){for(var o=e===i.maxZoom?0:i.tolerance/((1<<e)*i.extent),a={features:[],numPoints:0,numSimplified:0,numFeatures:0,source:null,x:n,y:r,z:e,transformed:!1,minX:2,minY:1,maxX:-1,maxY:0},s=0;s<t.length;s++){a.numFeatures++,A(a,t[s],o,i);var u=t[s].minX,l=t[s].minY,c=t[s].maxX,f=t[s].maxY;u<a.minX&&(a.minX=u),l<a.minY&&(a.minY=l),c>a.maxX&&(a.maxX=c),f>a.maxY&&(a.maxY=f)}return a}function A(t,e,n,r){var i=e.geometry,o=e.type,a=[];if("Point"===o||"MultiPoint"===o)for(var s=0;s<i.length;s+=3)a.push(i[s]),a.push(i[s+1]),t.numPoints++,t.numSimplified++;else if("LineString"===o)T(a,i,t,n,!1,!1);else if("MultiLineString"===o||"Polygon"===o)for(s=0;s<i.length;s++)T(a,i[s],t,n,"Polygon"===o,0===s);else if("MultiPolygon"===o)for(var u=0;u<i.length;u++){var l=i[u];for(s=0;s<l.length;s++)T(a,l[s],t,n,!0,0===s)}if(a.length){var c=e.tags||null;if("LineString"===o&&r.lineMetrics){for(var f in c={},e.tags)c[f]=e.tags[f];c.mapbox_clip_start=i.start/i.size,c.mapbox_clip_end=i.end/i.size}var h={geometry:a,type:"Polygon"===o||"MultiPolygon"===o?3:"LineString"===o||"MultiLineString"===o?2:1,tags:c};null!==e.id&&(h.id=e.id),t.features.push(h)}}function T(t,e,n,r,i,o){var a=r*r;if(r>0&&e.size<(i?a:r))n.numPoints+=e.length/3;else{for(var s=[],u=0;u<e.length;u+=3)(0===r||e[u+2]>a)&&(n.numSimplified++,s.push(e[u]),s.push(e[u+1])),n.numPoints++;i&&function(t,e){for(var n=0,r=0,i=t.length,o=i-2;r<i;o=r,r+=2)n+=(t[r]-t[o])*(t[r+1]+t[o+1]);if(n>0===e)for(r=0,i=t.length;r<i/2;r+=2){var a=t[r],s=t[r+1];t[r]=t[i-2-r],t[r+1]=t[i-1-r],t[i-2-r]=a,t[i-1-r]=s}}(s,o),t.push(s)}}function j(t,e){return new O(t,e)}function O(t,e){var n=(e=this.options=function(t,e){for(var n in e)t[n]=e[n];return t}(Object.create(this.options),e)).debug;if(n&&console.time("preprocess data"),e.maxZoom<0||e.maxZoom>24)throw new Error("maxZoom should be in the 0-24 range");if(e.promoteId&&e.generateId)throw new Error("promoteId and generateId cannot be used together.");var r=function(t,e){var n=[];if("FeatureCollection"===t.type)for(var r=0;r<t.features.length;r++)a(n,t.features[r],e,r);else"Feature"===t.type?a(n,t,e):a(n,{geometry:t},e);return n}(t,e);this.tiles={},this.tileCoords=[],n&&(console.timeEnd("preprocess data"),console.log("index: maxZoom: %d, maxPoints: %d",e.indexMaxZoom,e.indexMaxPoints),console.time("generate tiles"),this.stats={},this.total=0),(r=function(t,e){var n=e.buffer/e.extent,r=t,i=h(t,1,-1-n,n,0,-1,2,e),o=h(t,1,1-n,2+n,0,-1,2,e);return(i||o)&&(r=h(t,1,-n,1+n,0,-1,2,e)||[],i&&(r=x(i,1).concat(r)),o&&(r=r.concat(x(o,-1)))),r}(r,e)).length&&this.splitTile(r,0,0,0),n&&(r.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 z(t,e,n){return 32*((1<<t)*n+e)+t}n.r(e),n.d(e,"default",function(){return j}),O.prototype.options={maxZoom:14,indexMaxZoom:5,indexMaxPoints:1e5,tolerance:3,extent:4096,buffer:64,lineMetrics:!1,promoteId:null,generateId:!1,debug:0},O.prototype.splitTile=function(t,e,n,r,i,o,a){for(var s=[t,e,n,r],u=this.options,l=u.debug;s.length;){r=s.pop(),n=s.pop(),e=s.pop(),t=s.pop();var c=1<<e,f=z(e,n,r),p=this.tiles[f];if(!p&&(l>1&&console.time("creation"),p=this.tiles[f]=S(t,e,n,r,u),this.tileCoords.push({z:e,x:n,y:r}),l)){l>1&&(console.log("tile z%d-%d-%d (features: %d, points: %d, simplified: %d)",e,n,r,p.numFeatures,p.numPoints,p.numSimplified),console.timeEnd("creation"));var y="z"+e;this.stats[y]=(this.stats[y]||0)+1,this.total++}if(p.source=t,i){if(e===u.maxZoom||e===i)continue;var d=1<<i-e;if(n!==Math.floor(o/d)||r!==Math.floor(a/d))continue}else if(e===u.indexMaxZoom||p.numPoints<=u.indexMaxPoints)continue;if(p.source=null,0!==t.length){l>1&&console.time("clipping");var v,m,g,b,x,w,k=.5*u.buffer/u.extent,_=.5-k,A=.5+k,T=1+k;v=m=g=b=null,x=h(t,c,n-k,n+A,0,p.minX,p.maxX,u),w=h(t,c,n+_,n+T,0,p.minX,p.maxX,u),t=null,x&&(v=h(x,c,r-k,r+A,1,p.minY,p.maxY,u),m=h(x,c,r+_,r+T,1,p.minY,p.maxY,u),x=null),w&&(g=h(w,c,r-k,r+A,1,p.minY,p.maxY,u),b=h(w,c,r+_,r+T,1,p.minY,p.maxY,u),w=null),l>1&&console.timeEnd("clipping"),s.push(v||[],e+1,2*n,2*r),s.push(m||[],e+1,2*n,2*r+1),s.push(g||[],e+1,2*n+1,2*r),s.push(b||[],e+1,2*n+1,2*r+1)}}},O.prototype.getTile=function(t,e,n){var r=this.options,i=r.extent,o=r.debug;if(t<0||t>24)return null;var a=1<<t,s=z(t,e=(e%a+a)%a,n);if(this.tiles[s])return k(this.tiles[s],i);o>1&&console.log("drilling down to z%d-%d-%d",t,e,n);for(var u,l=t,c=e,f=n;!u&&l>0;)l--,c=Math.floor(c/2),f=Math.floor(f/2),u=this.tiles[z(l,c,f)];return u&&u.source?(o>1&&console.log("found parent tile z%d-%d-%d",l,c,f),o>1&&console.time("drilling down"),this.splitTile(u.source,l,c,f,t,e,n),o>1&&console.timeEnd("drilling down"),this.tiles[s]?k(this.tiles[s],i):null):null}}]);\n//# sourceMappingURL=d607287920ba1cb7f5e6.worker.js.map',null)}},function(t,e,n){"use strict";var r=window.URL||window.webkitURL;t.exports=function(t,e){try{try{var n;try{(n=new(window.BlobBuilder||window.WebKitBlobBuilder||window.MozBlobBuilder||window.MSBlobBuilder)).append(t),n=n.getBlob()}catch(e){n=new Blob([t])}return new Worker(r.createObjectURL(n))}catch(e){return new Worker("data:application/javascript,"+encodeURIComponent(t))}}catch(t){if(!e)throw Error("Inline worker is not supported");return new Worker(e)}}},function(t,e,n){var r=n(215);function i(t,e){var n={};for(var i in t)"ref"!==i&&(n[i]=t[i]);return r.forEach(function(t){t in e&&(n[t]=e[t])}),n}t.exports=function(t){t=t.slice();for(var e=Object.create(null),n=0;n<t.length;n++)e[t[n].id]=t[n];for(var r=0;r<t.length;r++)"ref"in t[r]&&(t[r]=i(t[r],e[t[r].ref]));return t}},function(t,e){t.exports=["type","source","source-layer","minzoom","maxzoom","filter","layout"]},function(t,e,n){var r=n(74),i={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"};function o(t,e,n){n.push({command:i.addSource,args:[t,e[t]]})}function a(t,e,n){e.push({command:i.removeSource,args:[t]}),n[t]=!0}function s(t,e,n,r){a(t,n,r),o(t,e,n)}function u(t,e,n){var i;for(i in t[n])if(t[n].hasOwnProperty(i)&&"data"!==i&&!r(t[n][i],e[n][i]))return!1;for(i in e[n])if(e[n].hasOwnProperty(i)&&"data"!==i&&!r(t[n][i],e[n][i]))return!1;return!0}function l(t,e,n,i,o,a){var s;for(s in e=e||{},t=t||{})t.hasOwnProperty(s)&&(r(t[s],e[s])||n.push({command:a,args:[i,s,e[s],o]}));for(s in e)e.hasOwnProperty(s)&&!t.hasOwnProperty(s)&&(r(t[s],e[s])||n.push({command:a,args:[i,s,e[s],o]}))}function c(t){return t.id}function f(t,e){return t[e.id]=e,t}t.exports=function(t,e){if(!t)return[{command:i.setStyle,args:[e]}];var n=[];try{if(!r(t.version,e.version))return[{command:i.setStyle,args:[e]}];r(t.center,e.center)||n.push({command:i.setCenter,args:[e.center]}),r(t.zoom,e.zoom)||n.push({command:i.setZoom,args:[e.zoom]}),r(t.bearing,e.bearing)||n.push({command:i.setBearing,args:[e.bearing]}),r(t.pitch,e.pitch)||n.push({command:i.setPitch,args:[e.pitch]}),r(t.sprite,e.sprite)||n.push({command:i.setSprite,args:[e.sprite]}),r(t.glyphs,e.glyphs)||n.push({command:i.setGlyphs,args:[e.glyphs]}),r(t.transition,e.transition)||n.push({command:i.setTransition,args:[e.transition]}),r(t.light,e.light)||n.push({command:i.setLight,args:[e.light]});var h={},p=[];!function(t,e,n,l){var c;for(c in e=e||{},t=t||{})t.hasOwnProperty(c)&&(e.hasOwnProperty(c)||a(c,n,l));for(c in e)e.hasOwnProperty(c)&&(t.hasOwnProperty(c)?r(t[c],e[c])||("geojson"===t[c].type&&"geojson"===e[c].type&&u(t,e,c)?n.push({command:i.setGeoJSONSourceData,args:[c,e[c].data]}):s(c,e,n,l)):o(c,e,n))}(t.sources,e.sources,p,h);var d=[];t.layers&&t.layers.forEach(function(t){h[t.source]?n.push({command:i.removeLayer,args:[t.id]}):d.push(t)}),n=n.concat(p),function(t,e,n){e=e||[];var o,a,s,u,h,p,d,y=(t=t||[]).map(c),m=e.map(c),v=t.reduce(f,{}),g=e.reduce(f,{}),b=y.slice(),x=Object.create(null);for(o=0,a=0;o<y.length;o++)s=y[o],g.hasOwnProperty(s)?a++:(n.push({command:i.removeLayer,args:[s]}),b.splice(b.indexOf(s,a),1));for(o=0,a=0;o<m.length;o++)s=m[m.length-1-o],b[b.length-1-o]!==s&&(v.hasOwnProperty(s)?(n.push({command:i.removeLayer,args:[s]}),b.splice(b.lastIndexOf(s,b.length-a),1)):a++,p=b[b.length-o],n.push({command:i.addLayer,args:[g[s],p]}),b.splice(b.length-o,0,s),x[s]=!0);for(o=0;o<m.length;o++)if(u=v[s=m[o]],h=g[s],!x[s]&&!r(u,h))if(r(u.source,h.source)&&r(u["source-layer"],h["source-layer"])&&r(u.type,h.type)){for(d in l(u.layout,h.layout,n,s,null,i.setLayoutProperty),l(u.paint,h.paint,n,s,null,i.setPaintProperty),r(u.filter,h.filter)||n.push({command:i.setFilter,args:[s,h.filter]}),r(u.minzoom,h.minzoom)&&r(u.maxzoom,h.maxzoom)||n.push({command:i.setLayerZoomRange,args:[s,h.minzoom,h.maxzoom]}),u)u.hasOwnProperty(d)&&"layout"!==d&&"paint"!==d&&"filter"!==d&&"metadata"!==d&&"minzoom"!==d&&"maxzoom"!==d&&(0===d.indexOf("paint.")?l(u[d],h[d],n,s,d.slice(6),i.setPaintProperty):r(u[d],h[d])||n.push({command:i.setLayerProperty,args:[s,d,h[d]]}));for(d in h)h.hasOwnProperty(d)&&!u.hasOwnProperty(d)&&"layout"!==d&&"paint"!==d&&"filter"!==d&&"metadata"!==d&&"minzoom"!==d&&"maxzoom"!==d&&(0===d.indexOf("paint.")?l(u[d],h[d],n,s,d.slice(6),i.setPaintProperty):r(u[d],h[d])||n.push({command:i.setLayerProperty,args:[s,d,h[d]]}))}else n.push({command:i.removeLayer,args:[s]}),p=b[b.lastIndexOf(s)+1],n.push({command:i.addLayer,args:[h,p]})}(d,e.layers,n)}catch(t){console.warn("Unable to compute style diff:",t),n=[{command:i.setStyle,args:[e]}]}return n},t.exports.operations=i},function(t,e,n){function r(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function i(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,r.key,r)}}function o(t,e,n){return e&&i(t.prototype,e),n&&i(t,n),t}var a=n(2),s=n(69),u=function(){function t(){r(this,t),this._currentTileIndex=0,this._seenCrossTileIDs={}}return o(t,[{key:"continuePlacement",value:function(t,e,n,r,i){for(;this._currentTileIndex<t.length;){var o=t[this._currentTileIndex];if(e.placeLayerTile(r,o,n,this._seenCrossTileIDs),this._currentTileIndex++,i())return!0}}}]),t}(),l=function(){function t(e,n,i,o,a){r(this,t),this.placement=new s(e,a),this._currentPlacementIndex=n.length-1,this._forceFullPlacement=i,this._showCollisionBoxes=o,this._done=!1}return o(t,[{key:"isDone",value:function(){return this._done}},{key:"continuePlacement",value:function(t,e,n){for(var r=this,i=a.now(),o=function(){var t=a.now()-i;return!r._forceFullPlacement&&t>2};this._currentPlacementIndex>=0;){var s=e[t[this._currentPlacementIndex]],l=this.placement.collisionIndex.transform.zoom;if("symbol"===s.type&&(!s.minzoom||s.minzoom<=l)&&(!s.maxzoom||s.maxzoom>l)){if(this._inProgressLayer||(this._inProgressLayer=new u),this._inProgressLayer.continuePlacement(n[s.source],this.placement,this._showCollisionBoxes,s,o))return;delete this._inProgressLayer}this._currentPlacementIndex--}this._done=!0}}]),t}();t.exports=l},function(t,e){t.exports="#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"},function(t,e){t.exports="#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"},function(t,e){t.exports="uniform vec4 u_color;\nuniform float u_opacity;\n\nvoid main() {\n    gl_FragColor = u_color * u_opacity;\n\n#ifdef OVERDRAW_INSPECTOR\n    gl_FragColor = vec4(1.0);\n#endif\n}\n"},function(t,e){t.exports="attribute vec2 a_pos;\n\nuniform mat4 u_matrix;\n\nvoid main() {\n    gl_Position = u_matrix * vec4(a_pos, 0, 1);\n}\n"},function(t,e){t.exports="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;\nuniform float u_opacity;\n\nuniform sampler2D u_image;\n\nvarying vec2 v_pos_a;\nvarying vec2 v_pos_b;\n\nvoid main() {\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) * u_opacity;\n\n#ifdef OVERDRAW_INSPECTOR\n    gl_FragColor = vec4(1.0);\n#endif\n}\n"},function(t,e){t.exports="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\nvoid main() {\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"},function(t,e){t.exports="#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"},function(t,e){t.exports="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"},function(t,e){t.exports="void main() {\n    gl_FragColor = vec4(1.0);\n}\n"},function(t,e){t.exports="attribute vec2 a_pos;\n\nuniform mat4 u_matrix;\n\nvoid main() {\n    gl_Position = u_matrix * vec4(a_pos, 0, 1);\n}\n"},function(t,e){t.exports="#pragma mapbox: define highp float weight\n\nuniform highp float u_intensity;\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"},function(t,e){t.exports="#pragma mapbox: define highp float weight\n#pragma mapbox: define mediump float radius\n\nuniform mat4 u_matrix;\nuniform float u_extrude_scale;\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    #pragma mapbox: initialize mediump float radius\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 radius\n    v_extrude = S * unscaled_extrude;\n\n    // Scale by radius and the zoom-based scale factor to produce actual\n    // mesh position\n    vec2 extrude = v_extrude * 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"},function(t,e){t.exports="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"},function(t,e){t.exports="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"},function(t,e){t.exports="\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}"},function(t,e){t.exports="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"},function(t,e){t.exports="\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 = 15.0 * extrude_scale_length;\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"},function(t,e){t.exports="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 * (u_camera_to_center_distance / camera_to_anchor_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"},function(t,e){t.exports="uniform highp vec4 u_color;\n\nvoid main() {\n    gl_FragColor = u_color;\n}\n"},function(t,e){t.exports="attribute vec2 a_pos;\n\nuniform mat4 u_matrix;\n\nvoid main() {\n    gl_Position = u_matrix * vec4(a_pos, 0, 1);\n}\n"},function(t,e){t.exports="#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"},function(t,e){t.exports="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"},function(t,e){t.exports="#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"},function(t,e){t.exports="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"},function(t,e){t.exports="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"},function(t,e){t.exports="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"},function(t,e){t.exports="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"},function(t,e){t.exports="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"},function(t,e){t.exports="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"},function(t,e){t.exports="uniform mat4 u_matrix;\nuniform vec3 u_lightcolor;\nuniform lowp vec3 u_lightpos;\nuniform lowp float u_lightintensity;\n\nattribute vec2 a_pos;\nattribute vec4 a_normal_ed;\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    vec3 normal = a_normal_ed.xyz;\n\n    base = max(0.0, base);\n    height = max(0.0, height);\n\n    float t = mod(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(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 (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"},function(t,e){t.exports="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"},function(t,e){t.exports="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 vec4 a_normal_ed;\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    vec3 normal = a_normal_ed.xyz;\n    float edgedistance = a_normal_ed.w;\n\n    base = max(0.0, base);\n    height = max(0.0, height);\n\n    float t = mod(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 = normal.x == 1.0 && normal.y == 0.0 && normal.z == 16384.0\n        ? a_pos // extrusion top\n        : vec2(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(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 (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"},function(t,e){t.exports="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"},function(t,e){t.exports="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"},function(t,e){t.exports="#ifdef GL_ES\nprecision highp float;\n#endif\n\nuniform sampler2D u_image;\nvarying vec2 v_pos;\nuniform vec2 u_dimension;\nuniform float u_zoom;\n\nfloat getElevation(vec2 coord, float bias) {\n    // Convert encoded elevation value to meters\n    vec4 data = texture2D(u_image, coord) * 255.0;\n    return (data.r + data.g * 256.0 + data.b * 256.0 * 256.0) / 4.0;\n}\n\nvoid main() {\n    vec2 epsilon = 1.0 / u_dimension;\n\n    // queried pixels:\n    // +-----------+\n    // |   |   |   |\n    // | a | b | c |\n    // |   |   |   |\n    // +-----------+\n    // |   |   |   |\n    // | d | e | f |\n    // |   |   |   |\n    // +-----------+\n    // |   |   |   |\n    // | g | h | i |\n    // |   |   |   |\n    // +-----------+\n\n    float a = getElevation(v_pos + vec2(-epsilon.x, -epsilon.y), 0.0);\n    float b = getElevation(v_pos + vec2(0, -epsilon.y), 0.0);\n    float c = getElevation(v_pos + vec2(epsilon.x, -epsilon.y), 0.0);\n    float d = getElevation(v_pos + vec2(-epsilon.x, 0), 0.0);\n    float e = getElevation(v_pos, 0.0);\n    float f = getElevation(v_pos + vec2(epsilon.x, 0), 0.0);\n    float g = getElevation(v_pos + vec2(-epsilon.x, epsilon.y), 0.0);\n    float h = getElevation(v_pos + vec2(0, epsilon.y), 0.0);\n    float i = getElevation(v_pos + vec2(epsilon.x, epsilon.y), 0.0);\n\n    // here we divide the x and y slopes by 8 * pixel size\n    // where pixel size (aka meters/pixel) is:\n    // circumference of the world / (pixels per tile * number of tiles)\n    // which is equivalent to: 8 * 40075016.6855785 / (512 * pow(2, u_zoom))\n    // which can be reduced to: pow(2, 19.25619978527 - u_zoom)\n    // we want to vertically exaggerate the hillshading though, because otherwise\n    // it is barely noticeable at low zooms. to do this, we multiply this by some\n    // scale factor pow(2, (u_zoom - 14) * a) where a is an arbitrary value and 14 is the\n    // maxzoom of the tile source. here we use a=0.3 which works out to the\n    // expression below. see nickidlugash's awesome breakdown for more info\n    // https://github.com/mapbox/mapbox-gl-js/pull/5286#discussion_r148419556\n    float exaggeration = u_zoom < 2.0 ? 0.4 : u_zoom < 4.5 ? 0.35 : 0.3;\n\n    vec2 deriv = vec2(\n        (c + f + f + i) - (a + d + d + g),\n        (g + h + h + i) - (a + b + b + c)\n    ) /  pow(2.0, (u_zoom - 14.0) * exaggeration + 19.2562 - u_zoom);\n\n    gl_FragColor = clamp(vec4(\n        deriv.x / 2.0 + 0.5,\n        deriv.y / 2.0 + 0.5,\n        1.0,\n        1.0), 0.0, 1.0);\n\n#ifdef OVERDRAW_INSPECTOR\n    gl_FragColor = vec4(1.0);\n#endif\n}\n"},function(t,e){t.exports="uniform mat4 u_matrix;\n\nattribute vec2 a_pos;\nattribute vec2 a_texture_pos;\n\nvarying vec2 v_pos;\n\nvoid main() {\n    gl_Position = u_matrix * vec4(a_pos, 0, 1);\n    v_pos = (a_texture_pos / 8192.0) / 2.0 + 0.25;\n}\n"},function(t,e){t.exports="uniform sampler2D u_image;\nvarying vec2 v_pos;\n\nuniform vec2 u_latrange;\nuniform vec2 u_light;\nuniform vec4 u_shadow;\nuniform vec4 u_highlight;\nuniform vec4 u_accent;\n\n#define PI 3.141592653589793\n\nvoid main() {\n    vec4 pixel = texture2D(u_image, v_pos);\n\n    vec2 deriv = ((pixel.rg * 2.0) - 1.0);\n\n    // We divide the slope by a scale factor based on the cosin of the pixel's approximate latitude\n    // to account for mercator projection distortion. see #4807 for details\n    float scaleFactor = cos(radians((u_latrange[0] - u_latrange[1]) * (1.0 - v_pos.y) + u_latrange[1]));\n    // We also multiply the slope by an arbitrary z-factor of 1.25\n    float slope = atan(1.25 * length(deriv) / scaleFactor);\n    float aspect = deriv.x != 0.0 ? atan(deriv.y, -deriv.x) : PI / 2.0 * (deriv.y > 0.0 ? 1.0 : -1.0);\n\n    float intensity = u_light.x;\n    // We add PI to make this property match the global light object, which adds PI/2 to the light's azimuthal\n    // position property to account for 0deg corresponding to north/the top of the viewport in the style spec\n    // and the original shader was written to accept (-illuminationDirection - 90) as the azimuthal.\n    float azimuth = u_light.y + PI;\n\n    // We scale the slope exponentially based on intensity, using a calculation similar to\n    // the exponential interpolation function in the style spec:\n    // https://github.com/mapbox/mapbox-gl-js/blob/master/src/style-spec/expression/definitions/interpolate.js#L217-L228\n    // so that higher intensity values create more opaque hillshading.\n    float base = 1.875 - intensity * 1.75;\n    float maxValue = 0.5 * PI;\n    float scaledSlope = intensity != 0.5 ? ((pow(base, slope) - 1.0) / (pow(base, maxValue) - 1.0)) * maxValue : slope;\n\n    // The accent color is calculated with the cosine of the slope while the shade color is calculated with the sine\n    // so that the accent color's rate of change eases in while the shade color's eases out.\n    float accent = cos(scaledSlope);\n    // We multiply both the accent and shade color by a clamped intensity value\n    // so that intensities >= 0.5 do not additionally affect the color values\n    // while intensity values < 0.5 make the overall color more transparent.\n    vec4 accent_color = (1.0 - accent) * u_accent * clamp(intensity * 2.0, 0.0, 1.0);\n    float shade = abs(mod((aspect + azimuth) / PI + 0.5, 2.0) - 1.0);\n    vec4 shade_color = mix(u_shadow, u_highlight, shade) * sin(scaledSlope) * clamp(intensity * 2.0, 0.0, 1.0);\n    gl_FragColor = accent_color * (1.0 - shade_color.a) + shade_color;\n\n#ifdef OVERDRAW_INSPECTOR\n    gl_FragColor = vec4(1.0);\n#endif\n}\n"},function(t,e){t.exports="uniform mat4 u_matrix;\n\nattribute vec2 a_pos;\nattribute vec2 a_texture_pos;\n\nvarying vec2 v_pos;\n\nvoid main() {\n    gl_Position = u_matrix * vec4(a_pos, 0, 1);\n    v_pos = a_texture_pos / 8192.0;\n}\n"},function(t,e){t.exports="#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"},function(t,e){t.exports="\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"},function(t,e){t.exports="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"},function(t,e){t.exports="// 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"},function(t,e){t.exports="\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"},function(t,e){t.exports="// 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"},function(t,e){t.exports="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"},function(t,e){t.exports="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"},function(t,e){t.exports="uniform sampler2D u_texture;\n\n#pragma mapbox: define lowp float opacity\n\nvarying vec2 v_tex;\n\nvoid main() {\n    #pragma mapbox: initialize lowp float opacity\n\n    lowp float alpha = 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"},function(t,e){t.exports="const float PI = 3.141592653589793;\n\nattribute vec4 a_pos_offset;\nattribute vec4 a_data;\nattribute vec3 a_projected_pos;\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;\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}\n"},function(t,e){t.exports="#define SDF_PX 8.0\n#define EDGE_GAMMA 0.105/DEVICE_PIXEL_RATIO\n\nuniform bool u_has_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\n    lowp float dist = texture2D(u_texture, tex).a;\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\n    highp float gamma_scaled = gamma * u_gamma_scale;\n    highp float alpha = smoothstep(buff - gamma_scaled, buff + gamma_scaled, dist);\n    if (u_has_halo) {\n        gamma = (halo_blur * 1.19 / SDF_PX + EDGE_GAMMA) / (fontScale * u_gamma_scale);\n        highp float gamma_scaled_halo = gamma * u_gamma_scale;\n        lowp float buff_halo = (6.0 - halo_width / fontScale) / SDF_PX;\n        highp float alpha_halo = smoothstep(buff_halo - gamma_scaled, buff_halo + gamma_scaled, dist);\n        color = mix(halo_color, color, alpha);\n        alpha = alpha_halo;\n    }\n    gl_FragColor = color * (alpha * opacity);\n\n#ifdef OVERDRAW_INSPECTOR\n    gl_FragColor = vec4(1.0);\n#endif\n}\n"},function(t,e){t.exports="const float PI = 3.141592653589793;\n\nattribute vec4 a_pos_offset;\nattribute vec4 a_data;\nattribute vec3 a_projected_pos;\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\n    v_data0 = vec2(tex.x, tex.y);\n    v_data1 = vec3(gamma_scale, size, 1.0);\n}\n"},function(t,e,n){function r(t,e,n){return e in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}function i(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,r.key,r)}}var o=n(2),a=n(126),s=n(1),u=(n(32).ProgramConfiguration,n(40)),l=(n(67),function(){function t(e,n,r,i){!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,t);var u=e.gl;this.program=u.createProgram();var l=r.defines().concat("#define DEVICE_PIXEL_RATIO ".concat(o.devicePixelRatio.toFixed(1)));i&&l.push("#define OVERDRAW_INSPECTOR;");var c=l.concat(a.prelude.fragmentSource,n.fragmentSource).join("\n"),f=l.concat(a.prelude.vertexSource,n.vertexSource).join("\n"),h=u.createShader(u.FRAGMENT_SHADER);u.shaderSource(h,c),u.compileShader(h),s(u.getShaderParameter(h,u.COMPILE_STATUS),u.getShaderInfoLog(h)),u.attachShader(this.program,h);var p=u.createShader(u.VERTEX_SHADER);u.shaderSource(p,f),u.compileShader(p),s(u.getShaderParameter(p,u.COMPILE_STATUS),u.getShaderInfoLog(p)),u.attachShader(this.program,p);for(var d=r.layoutAttributes||[],y=0;y<d.length;y++)u.bindAttribLocation(this.program,y,d[y].name);u.linkProgram(this.program),s(u.getProgramParameter(this.program,u.LINK_STATUS),u.getProgramInfoLog(this.program)),this.numAttributes=u.getProgramParameter(this.program,u.ACTIVE_ATTRIBUTES),this.attributes={},this.uniforms={};for(var m=0;m<this.numAttributes;m++){var v=u.getActiveAttrib(this.program,m);v&&(this.attributes[v.name]=u.getAttribLocation(this.program,v.name))}for(var g=u.getProgramParameter(this.program,u.ACTIVE_UNIFORMS),b=0;b<g;b++){var x=u.getActiveUniform(this.program,b);x&&(this.uniforms[x.name]=u.getUniformLocation(this.program,x.name))}}var e,n,l;return e=t,(n=[{key:"draw",value:function(t,e,n,i,o,a,s,l,c){var f,h=t.gl,p=(f={},r(f,h.LINES,2),r(f,h.TRIANGLES,3),f)[e],d=!0,y=!1,m=void 0;try{for(var v,g=a.get()[Symbol.iterator]();!(d=(v=g.next()).done);d=!0){var b=v.value,x=b.vaos||(b.vaos={});(x[n]||(x[n]=new u)).bind(t,this,i,s?s.getPaintVertexBuffers():[],o,b.vertexOffset,l,c),h.drawElements(e,b.primitiveLength*p,h.UNSIGNED_SHORT,b.primitiveOffset*p*2)}}catch(t){y=!0,m=t}finally{try{d||null==g.return||g.return()}finally{if(y)throw m}}}}])&&i(e.prototype,n),l&&i(e,l),t}());t.exports=l},function(t,e,n){var r=n(27),i=r.OverscaledTileID,o=r.CanonicalTileID;function a(t,e,n,r,i){for(var s=0;s<n.length;s++){var u=n[s];if(r.isLessThan(u.tileID))break;if(e.key===u.tileID.key)return;if(u.tileID.isChildOf(e)){for(var l=e.children(1/0),c=0;c<l.length;c++){a(t,l[c],n.slice(s),r,i)}return}}var f=e.overscaledZ-t.overscaledZ,h=new o(f,e.canonical.x-(t.canonical.x<<f),e.canonical.y-(t.canonical.y<<f));i[h.key]=i[h.key]||h}t.exports=function(t,e){for(var n=t.sort(function(t,e){return t.tileID.isLessThan(e.tileID)?-1:e.tileID.isLessThan(t.tileID)?1:0}),r=0;r<n.length;r++){var o={},s=n[r],u=n.slice(r+1);a(s.tileID.wrapped(),s.tileID,u,new i(0,s.tileID.wrap+1,0,0,0),o),s.setMask(o,e)}}},function(t,e,n){var r=n(271),i=n(28),o=n(66),a=n(50),s=n(22).mat4.identity(new Float32Array(16)),u=n(51).layout,l=n(18),c=n(15);function f(t,e,n,r,a,u,l,f,d,y){var m,v=t.context,g=v.gl,b=t.transform,x="map"===f,_="map"===d,w=x&&"line"===n.layout.get("symbol-placement"),k=x&&!_&&!w,S=_;v.setDepthMode(S?t.depthModeForSublayer(0,c.ReadOnly):c.disabled);var T=!0,A=!1,E=void 0;try{for(var z,C=r[Symbol.iterator]();!(T=(z=C.next()).done);T=!0){var P=z.value,O=e.getTile(P),I=O.getBucket(n);if(I){var j=a?I.text:I.icon;if(j&&j.segments.get().length){var M=j.programConfigurations.get(n.id),L=a||I.sdfIcons,B=a?I.textSizeData:I.iconSizeData;if(m||(m=t.useProgram(L?"symbolSDF":"symbolIcon",M),M.setUniforms(t.context,m,n.paint,{zoom:t.transform.zoom}),h(m,t,n,a,k,_,B)),v.activeTexture.set(g.TEXTURE0),g.uniform1i(m.uniforms.u_texture,0),a)O.glyphAtlasTexture.bind(g.LINEAR,g.CLAMP_TO_EDGE),g.uniform2fv(m.uniforms.u_texsize,O.glyphAtlasTexture.size);else{var R=1!==n.layout.get("icon-size").constantOr(0)||I.iconsNeedLinear,D=_||0!==b.pitch;O.iconAtlasTexture.bind(L||t.options.rotating||t.options.zooming||R||D?g.LINEAR:g.NEAREST,g.CLAMP_TO_EDGE),g.uniform2fv(m.uniforms.u_texsize,O.iconAtlasTexture.size)}g.uniformMatrix4fv(m.uniforms.u_matrix,!1,t.translatePosMatrix(P.posMatrix,O,u,l));var F=i(O,1,t.transform.zoom),V=o.getLabelPlaneMatrix(P.posMatrix,_,x,t.transform,F),N=o.getGlCoordMatrix(P.posMatrix,_,x,t.transform,F);g.uniformMatrix4fv(m.uniforms.u_gl_coord_matrix,!1,t.translatePosMatrix(N,O,u,l,!0)),w?(g.uniformMatrix4fv(m.uniforms.u_label_plane_matrix,!1,s),o.updateLineLabels(I,P.posMatrix,t,a,V,N,_,y)):g.uniformMatrix4fv(m.uniforms.u_label_plane_matrix,!1,V),g.uniform1f(m.uniforms.u_fade_change,t.options.fadeDuration?t.symbolFadeChange:1),p(m,M,t,n,O,j,a,L,_)}}}}catch(t){A=!0,E=t}finally{try{T||null==C.return||C.return()}finally{if(A)throw E}}}function h(t,e,n,r,i,o,s){var l=e.context.gl,c=e.transform;l.uniform1i(t.uniforms.u_pitch_with_map,o?1:0),l.uniform1f(t.uniforms.u_is_text,r?1:0),l.uniform1f(t.uniforms.u_pitch,c.pitch/360*2*Math.PI);var f="constant"===s.functionType||"source"===s.functionType,h="constant"===s.functionType||"camera"===s.functionType;l.uniform1i(t.uniforms.u_is_size_zoom_constant,f?1:0),l.uniform1i(t.uniforms.u_is_size_feature_constant,h?1:0),l.uniform1f(t.uniforms.u_camera_to_center_distance,c.cameraToCenterDistance);var p=a.evaluateSizeForZoom(s,c.zoom,u.properties[r?"text-size":"icon-size"]);void 0!==p.uSizeT&&l.uniform1f(t.uniforms.u_size_t,p.uSizeT),void 0!==p.uSize&&l.uniform1f(t.uniforms.u_size,p.uSize),l.uniform1f(t.uniforms.u_aspect_ratio,c.width/c.height),l.uniform1i(t.uniforms.u_rotate_symbol,i?1:0)}function p(t,e,n,r,i,o,a,s,u){var l=n.context,c=l.gl,f=n.transform;if(s){var h=0!==r.paint.get(a?"text-halo-width":"icon-halo-width").constantOr(1),p=u?Math.cos(f._pitch)*f.cameraToCenterDistance:1;c.uniform1f(t.uniforms.u_gamma_scale,p),c.uniform1f(t.uniforms.u_has_halo,h?1:0)}!function(t,e,n,r){r.draw(n,n.gl.TRIANGLES,e.id,t.layoutVertexBuffer,t.indexBuffer,t.segments,t.programConfigurations.get(e.id),t.dynamicLayoutVertexBuffer,t.opacityVertexBuffer)}(o,r,l,t)}t.exports=function(t,e,n,i){if("translucent"!==t.renderPass)return;var o=t.context;o.setStencilMode(l.disabled),o.setColorMode(t.colorModeForRenderPass()),0!==n.paint.get("icon-opacity").constantOr(1)&&f(t,e,n,i,!1,n.paint.get("icon-translate"),n.paint.get("icon-translate-anchor"),n.layout.get("icon-rotation-alignment"),n.layout.get("icon-pitch-alignment"),n.layout.get("icon-keep-upright"));0!==n.paint.get("text-opacity").constantOr(1)&&f(t,e,n,i,!0,n.paint.get("text-translate"),n.paint.get("text-translate-anchor"),n.layout.get("text-rotation-alignment"),n.layout.get("text-pitch-alignment"),n.layout.get("text-keep-upright"));e.map.showCollisionBoxes&&r(t,e,n,i)}},function(t,e,n){var r=n(28),i=n(15),o=n(18);function a(t,e,n,a,s){var u=t.context,l=u.gl,c=s?t.useProgram("collisionCircle"):t.useProgram("collisionBox");u.setDepthMode(i.disabled),u.setStencilMode(o.disabled),u.setColorMode(t.colorModeForRenderPass());for(var f=0;f<a.length;f++){var h=a[f],p=e.getTile(h),d=p.getBucket(n);if(d){var y=s?d.collisionCircle:d.collisionBox;if(y){l.uniformMatrix4fv(c.uniforms.u_matrix,!1,h.posMatrix),s||u.lineWidth.set(1),l.uniform1f(c.uniforms.u_camera_to_center_distance,t.transform.cameraToCenterDistance);var m=r(p,1,t.transform.zoom),v=Math.pow(2,t.transform.zoom-p.tileID.overscaledZ);l.uniform1f(c.uniforms.u_pixels_to_tile_units,m),l.uniform2f(c.uniforms.u_extrude_scale,t.transform.pixelsToGLUnits[0]/(m*v),t.transform.pixelsToGLUnits[1]/(m*v)),c.draw(u,s?l.TRIANGLES:l.LINES,n.id,y.layoutVertexBuffer,y.indexBuffer,y.segments,null,y.collisionVertexBuffer,null)}}}}t.exports=function(t,e,n,r){a(t,e,n,r,!1),a(t,e,n,r,!0)}},function(t,e,n){var r=n(28),i=n(18),o=n(15);t.exports=function(t,e,n,a){if("translucent"!==t.renderPass)return;var s=n.paint.get("circle-opacity"),u=n.paint.get("circle-stroke-width"),l=n.paint.get("circle-stroke-opacity");if(0===s.constantOr(1)&&(0===u.constantOr(1)||0===l.constantOr(1)))return;var c=t.context,f=c.gl;c.setDepthMode(t.depthModeForSublayer(0,o.ReadOnly)),c.setStencilMode(i.disabled),c.setColorMode(t.colorModeForRenderPass());for(var h=!0,p=0;p<a.length;p++){var d=a[p],y=e.getTile(d),m=y.getBucket(n);if(m){var v=t.context.program.get(),g=m.programConfigurations.get(n.id),b=t.useProgram("circle",g);if((h||b.program!==v)&&(g.setUniforms(c,b,n.paint,{zoom:t.transform.zoom}),h=!1),f.uniform1f(b.uniforms.u_camera_to_center_distance,t.transform.cameraToCenterDistance),f.uniform1i(b.uniforms.u_scale_with_map,"map"===n.paint.get("circle-pitch-scale")?1:0),"map"===n.paint.get("circle-pitch-alignment")){f.uniform1i(b.uniforms.u_pitch_with_map,1);var x=r(y,1,t.transform.zoom);f.uniform2f(b.uniforms.u_extrude_scale,x,x)}else f.uniform1i(b.uniforms.u_pitch_with_map,0),f.uniform2fv(b.uniforms.u_extrude_scale,t.transform.pixelsToGLUnits);f.uniformMatrix4fv(b.uniforms.u_matrix,!1,t.translatePosMatrix(d.posMatrix,y,n.paint.get("circle-translate"),n.paint.get("circle-translate-anchor"))),b.draw(c,f.TRIANGLES,n.id,m.layoutVertexBuffer,m.indexBuffer,m.segments,g)}}}},function(t,e,n){var r=n(22).mat4,i=n(20),o=n(28),a=n(12),s=n(15),u=n(18),l=n(68);t.exports=function(t,e,n,c){if(0===n.paint.get("heatmap-opacity"))return;if("offscreen"===t.renderPass){var f=t.context,h=f.gl;f.setDepthMode(t.depthModeForSublayer(0,s.ReadOnly)),f.setStencilMode(u.disabled),function(t,e,n){var r=t.gl;t.activeTexture.set(r.TEXTURE1),t.viewport.set([0,0,e.width/4,e.height/4]);var i=n.heatmapFbo;if(i)r.bindTexture(r.TEXTURE_2D,i.colorAttachment.get()),t.bindFramebuffer.set(i.framebuffer);else{var o=r.createTexture();r.bindTexture(r.TEXTURE_2D,o),r.texParameteri(r.TEXTURE_2D,r.TEXTURE_WRAP_S,r.CLAMP_TO_EDGE),r.texParameteri(r.TEXTURE_2D,r.TEXTURE_WRAP_T,r.CLAMP_TO_EDGE),r.texParameteri(r.TEXTURE_2D,r.TEXTURE_MIN_FILTER,r.LINEAR),r.texParameteri(r.TEXTURE_2D,r.TEXTURE_MAG_FILTER,r.LINEAR),i=n.heatmapFbo=t.createFramebuffer(e.width/4,e.height/4),function t(e,n,r,i){var o=e.gl;o.texImage2D(o.TEXTURE_2D,0,o.RGBA,n.width/4,n.height/4,0,o.RGBA,e.extTextureHalfFloat?e.extTextureHalfFloat.HALF_FLOAT_OES:o.UNSIGNED_BYTE,null);i.colorAttachment.set(r);e.extTextureHalfFloat&&o.checkFramebufferStatus(o.FRAMEBUFFER)!==o.FRAMEBUFFER_COMPLETE&&(e.extTextureHalfFloat=null,i.colorAttachment.setDirty(),t(e,n,r,i))}(t,e,o,i)}}(f,t,n),f.clear({color:a.transparent}),f.setColorMode(new l([h.ONE,h.ONE],a.transparent,[!0,!0,!0,!0]));for(var p=!0,d=0;d<c.length;d++){var y=c[d];if(!e.hasRenderableParent(y)){var m=e.getTile(y),v=m.getBucket(n);if(v){var g=t.context.program.get(),b=v.programConfigurations.get(n.id),x=t.useProgram("heatmap",b),_=t.transform.zoom;(p||x.program!==g)&&(b.setUniforms(t.context,x,n.paint,{zoom:_}),p=!1),h.uniform1f(x.uniforms.u_extrude_scale,o(m,1,_)),h.uniform1f(x.uniforms.u_intensity,n.paint.get("heatmap-intensity")),h.uniformMatrix4fv(x.uniforms.u_matrix,!1,y.posMatrix),x.draw(f,h.TRIANGLES,n.id,v.layoutVertexBuffer,v.indexBuffer,v.segments,b)}}}f.viewport.set([0,0,t.width,t.height])}else"translucent"===t.renderPass&&(t.context.setColorMode(t.colorModeForRenderPass()),function(t,e){var n=t.context,o=n.gl,a=e.heatmapFbo;if(!a)return;n.activeTexture.set(o.TEXTURE0),o.bindTexture(o.TEXTURE_2D,a.colorAttachment.get()),n.activeTexture.set(o.TEXTURE1);var u=e.colorRampTexture;u||(u=e.colorRampTexture=new i(n,e.colorRamp,o.RGBA));u.bind(o.LINEAR,o.CLAMP_TO_EDGE),n.setDepthMode(s.disabled);var l=t.useProgram("heatmapTexture"),c=e.paint.get("heatmap-opacity");o.uniform1f(l.uniforms.u_opacity,c),o.uniform1i(l.uniforms.u_image,0),o.uniform1i(l.uniforms.u_color_ramp,1);var f=r.create();r.ortho(f,0,t.width,t.height,0,0,1),o.uniformMatrix4fv(l.uniforms.u_matrix,!1,f),o.uniform2f(l.uniforms.u_world,o.drawingBufferWidth,o.drawingBufferHeight),t.viewportVAO.bind(t.context,l,t.viewportBuffer,[]),o.drawArrays(o.TRIANGLE_STRIP,0,4)}(t,n))}},function(t,e,n){var r=n(2),i=n(28),o=n(15);function a(t,e,n,o,a,s,u,l,c){var f,h,p,d,y=e.context,m=y.gl,v=a.paint.get("line-dasharray"),g=a.paint.get("line-pattern");if(l||c){var b=1/i(n,1,e.transform.tileZoom(n));if(v){f=e.lineAtlas.getDash(v.from,"round"===a.layout.get("line-cap")),h=e.lineAtlas.getDash(v.to,"round"===a.layout.get("line-cap"));var x=f.width*v.fromScale,_=h.width*v.toScale;m.uniform2f(t.uniforms.u_patternscale_a,b/x,-f.height/2),m.uniform2f(t.uniforms.u_patternscale_b,b/_,-h.height/2),m.uniform1f(t.uniforms.u_sdfgamma,e.lineAtlas.width/(256*Math.min(x,_)*r.devicePixelRatio)/2)}else if(g){if(p=e.imageManager.getPattern(g.from),d=e.imageManager.getPattern(g.to),!p||!d)return;m.uniform2f(t.uniforms.u_pattern_size_a,p.displaySize[0]*g.fromScale/b,d.displaySize[1]),m.uniform2f(t.uniforms.u_pattern_size_b,d.displaySize[0]*g.toScale/b,d.displaySize[1]);var w=e.imageManager.getPixelSize(),k=w.width,S=w.height;m.uniform2fv(t.uniforms.u_texsize,[k,S])}m.uniform2f(t.uniforms.u_gl_units_to_pixels,1/e.transform.pixelsToGLUnits[0],1/e.transform.pixelsToGLUnits[1])}l&&(v?(m.uniform1i(t.uniforms.u_image,0),y.activeTexture.set(m.TEXTURE0),e.lineAtlas.bind(y),m.uniform1f(t.uniforms.u_tex_y_a,f.y),m.uniform1f(t.uniforms.u_tex_y_b,h.y),m.uniform1f(t.uniforms.u_mix,v.t)):g&&(m.uniform1i(t.uniforms.u_image,0),y.activeTexture.set(m.TEXTURE0),e.imageManager.bind(y),m.uniform2fv(t.uniforms.u_pattern_tl_a,p.tl),m.uniform2fv(t.uniforms.u_pattern_br_a,p.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))),y.setStencilMode(e.stencilModeForClipping(s));var T=e.translatePosMatrix(s.posMatrix,n,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/i(n,1,e.transform.zoom)),t.draw(y,m.TRIANGLES,a.id,o.layoutVertexBuffer,o.indexBuffer,o.segments,u)}t.exports=function(t,e,n,r){if("translucent"===t.renderPass&&0!==n.paint.get("line-opacity").constantOr(1)){var i=t.context;i.setDepthMode(t.depthModeForSublayer(0,o.ReadOnly)),i.setColorMode(t.colorModeForRenderPass());var s,u=n.paint.get("line-dasharray")?"lineSDF":n.paint.get("line-pattern")?"linePattern":"line",l=!0,c=!0,f=!1,h=void 0;try{for(var p,d=r[Symbol.iterator]();!(c=(p=d.next()).done);c=!0){var y=p.value,m=e.getTile(y),v=m.getBucket(n);if(v){var g=v.programConfigurations.get(n.id),b=t.context.program.get(),x=t.useProgram(u,g),_=l||x.program!==b,w=s!==m.tileID.overscaledZ;_&&g.setUniforms(t.context,x,n.paint,{zoom:t.transform.zoom}),a(x,t,m,v,n,y,g,_,w),s=m.tileID.overscaledZ,l=!1}}}catch(t){f=!0,h=t}finally{try{c||null==d.return||d.return()}finally{if(f)throw h}}}}},function(t,e,n){var r=n(70),i=n(12),o=n(15);function a(t,e,n,i,o){if(!r.isPatternMissing(n.paint.get("fill-pattern"),t)){var a=!0,s=!0,u=!1,l=void 0;try{for(var c,f=i[Symbol.iterator]();!(s=(c=f.next()).done);s=!0){var h=c.value,p=e.getTile(h),d=p.getBucket(n);d&&(t.context.setStencilMode(t.stencilModeForClipping(h)),o(t,e,n,p,h,d,a),a=!1)}}catch(t){u=!0,l=t}finally{try{s||null==f.return||f.return()}finally{if(u)throw l}}}}function s(t,e,n,r,i,o,a){var s=t.context.gl,u=o.programConfigurations.get(n.id);l("fill",n.paint.get("fill-pattern"),t,u,n,r,i,a).draw(t.context,s.TRIANGLES,n.id,o.layoutVertexBuffer,o.indexBuffer,o.segments,u)}function u(t,e,n,r,i,o,a){var s=t.context.gl,u=o.programConfigurations.get(n.id),c=l("fillOutline",n.getPaintProperty("fill-outline-color")?null:n.paint.get("fill-pattern"),t,u,n,r,i,a);s.uniform2f(c.uniforms.u_world,s.drawingBufferWidth,s.drawingBufferHeight),c.draw(t.context,s.LINES,n.id,o.layoutVertexBuffer,o.indexBuffer2,o.segments2,u)}function l(t,e,n,i,o,a,s,u){var l,c=n.context.program.get();return e?(l=n.useProgram("".concat(t,"Pattern"),i),(u||l.program!==c)&&(i.setUniforms(n.context,l,o.paint,{zoom:n.transform.zoom}),r.prepare(e,n,l)),r.setTile(a,n,l)):(l=n.useProgram(t,i),(u||l.program!==c)&&i.setUniforms(n.context,l,o.paint,{zoom:n.transform.zoom})),n.context.gl.uniformMatrix4fv(l.uniforms.u_matrix,!1,n.translatePosMatrix(s.posMatrix,a,o.paint.get("fill-translate"),o.paint.get("fill-translate-anchor"))),l}t.exports=function(t,e,n,r){var l=n.paint.get("fill-color"),c=n.paint.get("fill-opacity");if(0===c.constantOr(1))return;var f=t.context;f.setColorMode(t.colorModeForRenderPass());var h=n.paint.get("fill-pattern")||1!==l.constantOr(i.transparent).a||1!==c.constantOr(0)?"translucent":"opaque";t.renderPass===h&&(f.setDepthMode(t.depthModeForSublayer(1,"opaque"===t.renderPass?o.ReadWrite:o.ReadOnly)),a(t,e,n,r,s));"translucent"===t.renderPass&&n.paint.get("fill-antialias")&&(f.lineWidth.set(2),f.setDepthMode(t.depthModeForSublayer(n.getPaintProperty("fill-outline-color")?2:0,o.ReadOnly)),a(t,e,n,r,u))}},function(t,e,n){var r=n(22),i=n(70),o=n(20),a=n(12),s=n(15),u=r.mat3,l=r.mat4,c=r.vec3,f=n(18);function h(t,e,n,r,o,a,s){var l=t.context,f=l.gl,h=n.paint.get("fill-extrusion-pattern"),p=t.context.program.get(),d=a.programConfigurations.get(n.id),y=t.useProgram(h?"fillExtrusionPattern":"fillExtrusion",d);if((s||y.program!==p)&&d.setUniforms(l,y,n.paint,{zoom:t.transform.zoom}),h){if(i.isPatternMissing(h,t))return;i.prepare(h,t,y),i.setTile(r,t,y),f.uniform1f(y.uniforms.u_height_factor,-Math.pow(2,o.overscaledZ)/r.tileSize/8)}t.context.gl.uniformMatrix4fv(y.uniforms.u_matrix,!1,t.translatePosMatrix(o.posMatrix,r,n.paint.get("fill-extrusion-translate"),n.paint.get("fill-extrusion-translate-anchor"))),function(t,e){var n=e.context.gl,r=e.style.light,i=r.properties.get("position"),o=[i.x,i.y,i.z],a=u.create();"viewport"===r.properties.get("anchor")&&u.fromRotation(a,-e.transform.angle);c.transformMat3(o,o,a);var s=r.properties.get("color");n.uniform3fv(t.uniforms.u_lightpos,o),n.uniform1f(t.uniforms.u_lightintensity,r.properties.get("intensity")),n.uniform3f(t.uniforms.u_lightcolor,s.r,s.g,s.b)}(y,t),y.draw(l,f.TRIANGLES,n.id,a.layoutVertexBuffer,a.indexBuffer,a.segments,d)}t.exports=function(t,e,n,r){if(0===n.paint.get("fill-extrusion-opacity"))return;if("offscreen"===t.renderPass){!function(t,e){var n=t.context,r=n.gl,i=e.viewportFrame;t.depthRboNeedsClear&&t.setupOffscreenDepthRenderbuffer();if(!i){var u=new o(n,{width:t.width,height:t.height,data:null},r.RGBA);u.bind(r.LINEAR,r.CLAMP_TO_EDGE),(i=e.viewportFrame=n.createFramebuffer(t.width,t.height)).colorAttachment.set(u.texture)}n.bindFramebuffer.set(i.framebuffer),i.depthAttachment.set(t.depthRbo),t.depthRboNeedsClear&&(n.clear({depth:1}),t.depthRboNeedsClear=!1);n.clear({color:a.transparent}),n.setStencilMode(f.disabled),n.setDepthMode(new s(r.LEQUAL,s.ReadWrite,[0,1])),n.setColorMode(t.colorModeForRenderPass())}(t,n);var i=!0,u=!0,c=!1,p=void 0;try{for(var d,y=r[Symbol.iterator]();!(u=(d=y.next()).done);u=!0){var m=d.value,v=e.getTile(m),g=v.getBucket(n);g&&(h(t,e,n,v,m,g,i),i=!1)}}catch(t){c=!0,p=t}finally{try{u||null==y.return||y.return()}finally{if(c)throw p}}}else"translucent"===t.renderPass&&function(t,e){var n=e.viewportFrame;if(!n)return;var r=t.context,i=r.gl,o=t.useProgram("extrusionTexture");r.setStencilMode(f.disabled),r.setDepthMode(s.disabled),r.setColorMode(t.colorModeForRenderPass()),r.activeTexture.set(i.TEXTURE0),i.bindTexture(i.TEXTURE_2D,n.colorAttachment.get()),i.uniform1f(o.uniforms.u_opacity,e.paint.get("fill-extrusion-opacity")),i.uniform1i(o.uniforms.u_image,0);var a=l.create();l.ortho(a,0,t.width,t.height,0,0,1),i.uniformMatrix4fv(o.uniforms.u_matrix,!1,a),i.uniform2f(o.uniforms.u_world,i.drawingBufferWidth,i.drawingBufferHeight),t.viewportVAO.bind(r,o,t.viewportBuffer,[]),i.drawArrays(i.TRIANGLE_STRIP,0,4)}(t,n)}},function(t,e,n){var r=n(35),i=n(20),o=n(6),a=n(22).mat4,s=n(18),u=n(15);function l(t,e,n){var i=t.context,o=i.gl,a=e.fbo;if(a){var s=t.useProgram("hillshade"),u=t.transform.calculatePosMatrix(e.tileID.toUnwrapped());!function(t,e,n){var r=n.paint.get("hillshade-illumination-direction")*(Math.PI/180);"viewport"===n.paint.get("hillshade-illumination-anchor")&&(r-=e.transform.angle),e.context.gl.uniform2f(t.uniforms.u_light,n.paint.get("hillshade-exaggeration"),r)}(s,t,n);var l=function(t,e){var n=e.toCoordinate(),i=new r(n.column,n.row+1,n.zoom);return[t.transform.coordinateLocation(n).lat,t.transform.coordinateLocation(i).lat]}(t,e.tileID);i.activeTexture.set(o.TEXTURE0),o.bindTexture(o.TEXTURE_2D,a.colorAttachment.get()),o.uniformMatrix4fv(s.uniforms.u_matrix,!1,u),o.uniform2fv(s.uniforms.u_latrange,l),o.uniform1i(s.uniforms.u_image,0);var c=n.paint.get("hillshade-shadow-color");o.uniform4f(s.uniforms.u_shadow,c.r,c.g,c.b,c.a);var f=n.paint.get("hillshade-highlight-color");o.uniform4f(s.uniforms.u_highlight,f.r,f.g,f.b,f.a);var h=n.paint.get("hillshade-accent-color");if(o.uniform4f(s.uniforms.u_accent,h.r,h.g,h.b,h.a),e.maskedBoundsBuffer&&e.maskedIndexBuffer&&e.segments)s.draw(i,o.TRIANGLES,n.id,e.maskedBoundsBuffer,e.maskedIndexBuffer,e.segments);else{var p=t.rasterBoundsBuffer;t.rasterBoundsVAO.bind(i,s,p,[]),o.drawArrays(o.TRIANGLE_STRIP,0,p.length)}}}function c(t,e){var n=t.context,r=n.gl;if(e.dem&&e.dem.level){var s=e.dem.level.dim,u=e.dem.getPixels();if(n.activeTexture.set(r.TEXTURE1),n.pixelStoreUnpackPremultiplyAlpha.set(!1),e.demTexture=e.demTexture||t.getTileTexture(e.tileSize),e.demTexture){var l=e.demTexture;l.update(u,!1),l.bind(r.NEAREST,r.CLAMP_TO_EDGE)}else e.demTexture=new i(n,u,r.RGBA,!1),e.demTexture.bind(r.NEAREST,r.CLAMP_TO_EDGE);n.activeTexture.set(r.TEXTURE0);var c=e.fbo;if(!c){var f=new i(n,{width:s,height:s,data:null},r.RGBA);f.bind(r.LINEAR,r.CLAMP_TO_EDGE),(c=e.fbo=n.createFramebuffer(s,s)).colorAttachment.set(f.texture)}n.bindFramebuffer.set(c.framebuffer),n.viewport.set([0,0,s,s]);var h=a.create();a.ortho(h,0,o,-o,0,0,1),a.translate(h,h,[0,-o,0]);var p=t.useProgram("hillshadePrepare");r.uniformMatrix4fv(p.uniforms.u_matrix,!1,h),r.uniform1f(p.uniforms.u_zoom,e.tileID.overscaledZ),r.uniform2fv(p.uniforms.u_dimension,[2*s,2*s]),r.uniform1i(p.uniforms.u_image,1);var d=t.rasterBoundsBuffer;t.rasterBoundsVAO.bind(n,p,d,[]),r.drawArrays(r.TRIANGLE_STRIP,0,d.length),e.needsHillshadePrepare=!1}}t.exports=function(t,e,n,r){if("offscreen"!==t.renderPass&&"translucent"!==t.renderPass)return;var i=t.context;i.setDepthMode(t.depthModeForSublayer(0,u.ReadOnly)),i.setStencilMode(s.disabled),i.setColorMode(t.colorModeForRenderPass());var o=!0,a=!1,f=void 0;try{for(var h,p=r[Symbol.iterator]();!(o=(h=p.next()).done);o=!0){var d=h.value,y=e.getTile(d);y.needsHillshadePrepare&&"offscreen"===t.renderPass?c(t,y):"translucent"===t.renderPass&&l(t,y,n)}}catch(t){a=!0,f=t}finally{try{o||null==p.return||p.return()}finally{if(a)throw f}}i.viewport.set([0,0,t.width,t.height])}},function(t,e,n){var r=n(0),i=n(52),o=n(2),a=n(18),s=n(15);function u(t,e,n,i,a){var s=i.paint.get("raster-fade-duration");if(s>0){var u=o.now(),l=(u-t.timeAdded)/s,c=e?(u-e.timeAdded)/s:-1,f=n.getSource(),h=a.coveringZoomLevel({tileSize:f.tileSize,roundZoom:f.roundZoom}),p=!e||Math.abs(e.tileID.overscaledZ-h)>Math.abs(t.tileID.overscaledZ-h),d=p&&t.refreshedUponExpiration?1:r.clamp(p?l:1-c,0,1);return t.refreshedUponExpiration&&l>=1&&(t.refreshedUponExpiration=!1),e?{opacity:1,mix:1-d}:{opacity:d,mix:0}}return{opacity:1,mix:0}}t.exports=function(t,e,n,r){if("translucent"!==t.renderPass)return;if(0===n.paint.get("raster-opacity"))return;var o=t.context,l=o.gl,c=e.getSource(),f=t.useProgram("raster");o.setStencilMode(a.disabled),o.setColorMode(t.colorModeForRenderPass()),l.uniform1f(f.uniforms.u_brightness_low,n.paint.get("raster-brightness-min")),l.uniform1f(f.uniforms.u_brightness_high,n.paint.get("raster-brightness-max")),l.uniform1f(f.uniforms.u_saturation_factor,(p=n.paint.get("raster-saturation"),p>0?1-1/(1.001-p):-p)),l.uniform1f(f.uniforms.u_contrast_factor,(h=n.paint.get("raster-contrast"),h>0?1/(1-h):1+h)),l.uniform3fv(f.uniforms.u_spin_weights,function(t){t*=Math.PI/180;var e=Math.sin(t),n=Math.cos(t);return[(2*n+1)/3,(-Math.sqrt(3)*e-n+1)/3,(Math.sqrt(3)*e-n+1)/3]}(n.paint.get("raster-hue-rotate"))),l.uniform1f(f.uniforms.u_buffer_scale,1),l.uniform1i(f.uniforms.u_image0,0),l.uniform1i(f.uniforms.u_image1,1);var h;var p;var d=r.length&&r[0].overscaledZ,y=!0,m=!1,v=void 0;try{for(var g,b=r[Symbol.iterator]();!(y=(g=b.next()).done);y=!0){var x=g.value;o.setDepthMode(t.depthModeForSublayer(x.overscaledZ-d,1===n.paint.get("raster-opacity")?s.ReadWrite:s.ReadOnly,l.LESS));var _=e.getTile(x),w=t.transform.calculatePosMatrix(x.toUnwrapped());_.registerFadeDuration(n.paint.get("raster-fade-duration")),l.uniformMatrix4fv(f.uniforms.u_matrix,!1,w);var k=e.findLoadedParent(x,0,{}),S=u(_,k,e,n,t.transform),T=void 0,A=void 0;if(o.activeTexture.set(l.TEXTURE0),_.texture.bind(l.LINEAR,l.CLAMP_TO_EDGE,l.LINEAR_MIPMAP_NEAREST),o.activeTexture.set(l.TEXTURE1),k?(k.texture.bind(l.LINEAR,l.CLAMP_TO_EDGE,l.LINEAR_MIPMAP_NEAREST),T=Math.pow(2,k.tileID.overscaledZ-_.tileID.overscaledZ),A=[_.tileID.canonical.x*T%1,_.tileID.canonical.y*T%1]):_.texture.bind(l.LINEAR,l.CLAMP_TO_EDGE,l.LINEAR_MIPMAP_NEAREST),l.uniform2fv(f.uniforms.u_tl_parent,A||[0,0]),l.uniform1f(f.uniforms.u_scale_parent,T||1),l.uniform1f(f.uniforms.u_fade_t,S.mix),l.uniform1f(f.uniforms.u_opacity,S.opacity*n.paint.get("raster-opacity")),c instanceof i){var E=c.boundsBuffer,z=c.boundsVAO;z.bind(o,f,E,[]),l.drawArrays(l.TRIANGLE_STRIP,0,E.length)}else if(_.maskedBoundsBuffer&&_.maskedIndexBuffer&&_.segments)f.draw(o,l.TRIANGLES,n.id,_.maskedBoundsBuffer,_.maskedIndexBuffer,_.segments);else{var C=t.rasterBoundsBuffer,P=t.rasterBoundsVAO;P.bind(o,f,C,[]),l.drawArrays(l.TRIANGLE_STRIP,0,C.length)}}}catch(t){m=!0,v=t}finally{try{y||null==b.return||b.return()}finally{if(m)throw v}}}},function(t,e,n){var r=n(70),i=n(18),o=n(15);t.exports=function(t,e,n){var a=n.paint.get("background-color"),s=n.paint.get("background-opacity");if(0===s)return;var u,l=t.context,c=l.gl,f=t.transform,h=f.tileSize,p=n.paint.get("background-pattern"),d=p||1!==a.a||1!==s?"translucent":"opaque";if(t.renderPass!==d)return;if(l.setStencilMode(i.disabled),l.setDepthMode(t.depthModeForSublayer(0,"opaque"===d?o.ReadWrite:o.ReadOnly)),l.setColorMode(t.colorModeForRenderPass()),p){if(r.isPatternMissing(p,t))return;u=t.useProgram("backgroundPattern"),r.prepare(p,t,u),t.tileExtentPatternVAO.bind(l,u,t.tileExtentBuffer,[])}else u=t.useProgram("background"),c.uniform4fv(u.uniforms.u_color,[a.r,a.g,a.b,a.a]),t.tileExtentVAO.bind(l,u,t.tileExtentBuffer,[]);c.uniform1f(u.uniforms.u_opacity,s);var y=f.coveringTiles({tileSize:h}),m=!0,v=!1,g=void 0;try{for(var b,x=y[Symbol.iterator]();!(m=(b=x.next()).done);m=!0){var _=b.value;p&&r.setTile({tileID:_,tileSize:h},t,u),c.uniformMatrix4fv(u.uniforms.u_matrix,!1,t.transform.calculatePosMatrix(_.toUnwrapped())),c.drawArrays(c.TRIANGLE_STRIP,0,t.tileExtentBuffer.length)}}catch(t){v=!0,g=t}finally{try{m||null==x.return||x.return()}finally{if(v)throw g}}}},function(t,e,n){var r=n(2),i=n(22).mat4,o=n(6),a=n(40),s=n(14).PosArray,u=n(125),l=n(15),c=n(18);function f(t,e,n){var f=t.context,p=f.gl;f.lineWidth.set(1*r.devicePixelRatio);var d=n.posMatrix,y=t.useProgram("debug");f.setDepthMode(l.disabled),f.setStencilMode(c.disabled),f.setColorMode(t.colorModeForRenderPass()),p.uniformMatrix4fv(y.uniforms.u_matrix,!1,d),p.uniform4f(y.uniforms.u_color,1,0,0,1),t.debugVAO.bind(f,y,t.debugBuffer,[]),p.drawArrays(p.LINE_STRIP,0,t.debugBuffer.length);for(var m=function(t,e,n,r){r=r||1;var i,o,a,s,u,l,c,f,p=[];for(i=0,o=t.length;i<o;i++)if(u=h[t[i]]){for(f=null,a=0,s=u[1].length;a<s;a+=2)-1===u[1][a]&&-1===u[1][a+1]?f=null:(l=e+u[1][a]*r,c=n-u[1][a+1]*r,f&&p.push(f.x,f.y,l,c),f={x:l,y:c});e+=u[0]*r}return p}(n.toString(),50,200,5),v=new s,g=0;g<m.length;g+=2)v.emplaceBack(m[g],m[g+1]);var b=f.createVertexBuffer(v,u.members);(new a).bind(f,y,b,[]),p.uniform4f(y.uniforms.u_color,1,1,1,1);for(var x=e.getTile(n).tileSize,_=o/(Math.pow(2,t.transform.zoom-n.overscaledZ)*x),w=[[-1,-1],[-1,1],[1,-1],[1,1]],k=0;k<w.length;k++){var S=w[k];p.uniformMatrix4fv(y.uniforms.u_matrix,!1,i.translate([],d,[_*S[0],_*S[1],0])),p.drawArrays(p.LINES,0,b.length)}p.uniform4f(y.uniforms.u_color,0,0,0,1),p.uniformMatrix4fv(y.uniforms.u_matrix,!1,d),p.drawArrays(p.LINES,0,b.length)}t.exports=function(t,e,n){for(var r=0;r<n.length;r++)f(t,e,n[r])};var h={" ":[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]]}},function(t,e,n){function r(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,r.key,r)}}var i=n(21),o=n(3),a=n(35),s=n(0),u=n(26).number,l=n(282),c=n(27),f=(c.CanonicalTileID,c.UnwrappedTileID),h=n(6),p=n(22),d=p.vec4,y=p.mat4,m=p.mat2,v=function(){function t(e,n,r){!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,t),this.tileSize=512,this._renderWorldCopies=void 0===r||r,this._minZoom=e||0,this._maxZoom=n||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={}}var e,n,c;return e=t,(n=[{key:"clone",value:function(){var e=new t(this._minZoom,this._maxZoom,this._renderWorldCopies);return e.tileSize=this.tileSize,e.latRange=this.latRange,e.width=this.width,e.height=this.height,e._center=this._center,e.zoom=this.zoom,e.angle=this.angle,e._fov=this._fov,e._pitch=this._pitch,e._unmodified=this._unmodified,e._calcMatrices(),e}},{key:"coveringZoomLevel",value:function(t){return(t.roundZoom?Math.round:Math.floor)(this.zoom+this.scaleZoom(this.tileSize/t.tileSize))}},{key:"getVisibleUnwrappedCoordinates",value:function(t){var e=this.pointCoordinate(new o(0,0),0),n=this.pointCoordinate(new o(this.width,0),0),r=Math.floor(e.column),i=Math.floor(n.column),a=[new f(0,t)];if(this._renderWorldCopies)for(var s=r;s<=i;s++)0!==s&&a.push(new f(s,t));return a}},{key:"coveringTiles",value:function(t){var e=this.coveringZoomLevel(t),n=e;if(void 0!==t.minzoom&&e<t.minzoom)return[];void 0!==t.maxzoom&&e>t.maxzoom&&(e=t.maxzoom);var r=this.pointCoordinate(this.centerPoint,e),i=new o(r.column-.5,r.row-.5),a=[this.pointCoordinate(new o(0,0),e),this.pointCoordinate(new o(this.width,0),e),this.pointCoordinate(new o(this.width,this.height),e),this.pointCoordinate(new o(0,this.height),e)];return l(e,a,t.reparseOverscaled?n:e,this._renderWorldCopies).sort(function(t,e){return i.dist(t.canonical)-i.dist(e.canonical)})}},{key:"resize",value:function(t,e){this.width=t,this.height=e,this.pixelsToGLUnits=[2/t,-2/e],this._constrain(),this._calcMatrices()}},{key:"zoomScale",value:function(t){return Math.pow(2,t)}},{key:"scaleZoom",value:function(t){return Math.log(t)/Math.LN2}},{key:"project",value:function(t){return new o(this.lngX(t.lng),this.latY(t.lat))}},{key:"unproject",value:function(t){return new i(this.xLng(t.x),this.yLat(t.y))}},{key:"lngX",value:function(t){return(180+t)*this.worldSize/360}},{key:"latY",value:function(t){return(180-180/Math.PI*Math.log(Math.tan(Math.PI/4+t*Math.PI/360)))*this.worldSize/360}},{key:"xLng",value:function(t){return 360*t/this.worldSize-180}},{key:"yLat",value:function(t){var e=180-360*t/this.worldSize;return 360/Math.PI*Math.atan(Math.exp(e*Math.PI/180))-90}},{key:"setLocationAtPoint",value:function(t,e){var n=this.pointCoordinate(e)._sub(this.pointCoordinate(this.centerPoint));this.center=this.coordinateLocation(this.locationCoordinate(t)._sub(n)),this._renderWorldCopies&&(this.center=this.center.wrap())}},{key:"locationPoint",value:function(t){return this.coordinatePoint(this.locationCoordinate(t))}},{key:"pointLocation",value:function(t){return this.coordinateLocation(this.pointCoordinate(t))}},{key:"locationCoordinate",value:function(t){return new a(this.lngX(t.lng)/this.tileSize,this.latY(t.lat)/this.tileSize,this.zoom).zoomTo(this.tileZoom)}},{key:"coordinateLocation",value:function(t){var e=t.zoomTo(this.zoom);return new i(this.xLng(e.column*this.tileSize),this.yLat(e.row*this.tileSize))}},{key:"pointCoordinate",value:function(t,e){void 0===e&&(e=this.tileZoom);var n=[t.x,t.y,0,1],r=[t.x,t.y,1,1];d.transformMat4(n,n,this.pixelMatrixInverse),d.transformMat4(r,r,this.pixelMatrixInverse);var i=n[3],o=r[3],s=n[1]/i,l=r[1]/o,c=n[2]/i,f=r[2]/o,h=c===f?0:(0-c)/(f-c);return new a(u(n[0]/i,r[0]/o,h)/this.tileSize,u(s,l,h)/this.tileSize,this.zoom)._zoomTo(e)}},{key:"coordinatePoint",value:function(t){var e=t.zoomTo(this.zoom),n=[e.column*this.tileSize,e.row*this.tileSize,0,1];return d.transformMat4(n,n,this.pixelMatrix),new o(n[0]/n[3],n[1]/n[3])}},{key:"calculatePosMatrix",value:function(t){var e=t.key;if(this._posMatrixCache[e])return this._posMatrixCache[e];var n=t.canonical,r=this.worldSize/this.zoomScale(n.z),i=n.x+Math.pow(2,n.z)*t.wrap,o=y.identity(new Float64Array(16));return y.translate(o,o,[i*r,n.y*r,0]),y.scale(o,o,[r/h,r/h,1]),y.multiply(o,this.projMatrix,o),this._posMatrixCache[e]=new Float32Array(o),this._posMatrixCache[e]}},{key:"_constrain",value:function(){if(this.center&&this.width&&this.height&&!this._constraining){this._constraining=!0;var t,e,n,r,i=-90,a=90,s=-180,u=180,l=this.size,c=this._unmodified;if(this.latRange){var f=this.latRange;i=this.latY(f[1]),t=(a=this.latY(f[0]))-i<l.y?l.y/(a-i):0}if(this.lngRange){var h=this.lngRange;s=this.lngX(h[0]),e=(u=this.lngX(h[1]))-s<l.x?l.x/(u-s):0}var p=Math.max(e||0,t||0);if(p)return this.center=this.unproject(new o(e?(u+s)/2:this.x,t?(a+i)/2:this.y)),this.zoom+=this.scaleZoom(p),this._unmodified=c,void(this._constraining=!1);if(this.latRange){var d=this.y,y=l.y/2;d-y<i&&(r=i+y),d+y>a&&(r=a-y)}if(this.lngRange){var m=this.x,v=l.x/2;m-v<s&&(n=s+v),m+v>u&&(n=u-v)}void 0===n&&void 0===r||(this.center=this.unproject(new o(void 0!==n?n:this.x,void 0!==r?r:this.y))),this._unmodified=c,this._constraining=!1}}},{key:"_calcMatrices",value: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,n=Math.sin(t)*this.cameraToCenterDistance/Math.sin(Math.PI-e-t),r=1.01*(Math.cos(Math.PI/2-this._pitch)*n+this.cameraToCenterDistance),i=new Float64Array(16);y.perspective(i,this._fov,this.width/this.height,1,r),y.scale(i,i,[1,-1,1]),y.translate(i,i,[0,0,-this.cameraToCenterDistance]),y.rotateX(i,i,this._pitch),y.rotateZ(i,i,this.angle),y.translate(i,i,[-this.x,-this.y,0]);var o=this.worldSize/(2*Math.PI*6378137*Math.abs(Math.cos(this.center.lat*(Math.PI/180))));if(y.scale(i,i,[1,1,o,1]),this.projMatrix=i,i=y.create(),y.scale(i,i,[this.width/2,-this.height/2,1]),y.translate(i,i,[1,-1,0]),this.pixelMatrix=y.multiply(new Float64Array(16),i,this.projMatrix),!(i=y.invert(new Float64Array(16),this.pixelMatrix)))throw new Error("failed to invert matrix");this.pixelMatrixInverse=i,this._posMatrixCache={}}}},{key:"minZoom",get:function(){return this._minZoom},set:function(t){this._minZoom!==t&&(this._minZoom=t,this.zoom=Math.max(this.zoom,t))}},{key:"maxZoom",get:function(){return this._maxZoom},set:function(t){this._maxZoom!==t&&(this._maxZoom=t,this.zoom=Math.min(this.zoom,t))}},{key:"renderWorldCopies",get:function(){return this._renderWorldCopies}},{key:"worldSize",get:function(){return this.tileSize*this.scale}},{key:"centerPoint",get:function(){return this.size._div(2)}},{key:"size",get:function(){return new o(this.width,this.height)}},{key:"bearing",get:function(){return-this.angle/Math.PI*180},set:function(t){var e=-s.wrap(t,-180,180)*Math.PI/180;this.angle!==e&&(this._unmodified=!1,this.angle=e,this._calcMatrices(),this.rotationMatrix=m.create(),m.rotate(this.rotationMatrix,this.rotationMatrix,this.angle))}},{key:"pitch",get:function(){return this._pitch/Math.PI*180},set:function(t){var e=s.clamp(t,0,60)/180*Math.PI;this._pitch!==e&&(this._unmodified=!1,this._pitch=e,this._calcMatrices())}},{key:"fov",get:function(){return this._fov/Math.PI*180},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())}},{key:"zoom",get:function(){return this._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())}},{key:"center",get:function(){return this._center},set:function(t){t.lat===this._center.lat&&t.lng===this._center.lng||(this._unmodified=!1,this._center=t,this._constrain(),this._calcMatrices())}},{key:"unmodified",get:function(){return this._unmodified}},{key:"x",get:function(){return this.lngX(this.center.lng)}},{key:"y",get:function(){return this.latY(this.center.lat)}},{key:"point",get:function(){return new o(this.x,this.y)}}])&&r(e.prototype,n),c&&r(e,c),t}();t.exports=v},function(t,e,n){n(35);var r=n(27).OverscaledTileID;function i(t,e){if(t.row>e.row){var n=t;t=e,e=n}return{x0:t.column,y0:t.row,x1:e.column,y1:e.row,dx:e.column-t.column,dy:e.row-t.row}}function o(t,e,n,r,i){var o=Math.max(n,Math.floor(e.y0)),a=Math.min(r,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 u=t.dx/t.dy,l=e.dx/e.dy,c=t.dx>0,f=e.dx<0,h=o;h<a;h++){var p=u*Math.max(0,Math.min(t.dy,h+c-t.y0))+t.x0,d=l*Math.max(0,Math.min(e.dy,h+f-e.y0))+e.x0;i(Math.floor(d),Math.ceil(p),h)}}function a(t,e,n,r,a,s){var u,l=i(t,e),c=i(e,n),f=i(n,t);l.dy>c.dy&&(u=l,l=c,c=u),l.dy>f.dy&&(u=l,l=f,f=u),c.dy>f.dy&&(u=c,c=f,f=u),l.dy&&o(f,l,r,a,s),c.dy&&o(f,c,r,a,s)}t.exports=function(t,e,n,i){void 0===i&&(i=!0);var o=1<<t,s={};function u(e,a,u){var l,c,f,h;if(u>=0&&u<=o)for(l=e;l<a;l++)c=Math.floor(l/o),f=(l%o+o)%o,0!==c&&!0!==i||(h=new r(n,c,t,f,u),s[h.key]=h)}return a(e[0],e[1],e[2],0,o,u),a(e[2],e[3],e[0],0,o,u),Object.keys(s).map(function(t){return s[t]})}},function(t,e,n){function r(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,r.key,r)}}var i=n(0),o=n(5),a=n(284),s=function(){function t(){!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,t),i.bindAll(["_onHashChange","_updateHash"],this),this._updateHash=a(this._updateHashUnthrottled.bind(this),300)}var e,n,s;return e=t,(n=[{key:"addTo",value:function(t){return this._map=t,o.addEventListener("hashchange",this._onHashChange,!1),this._map.on("moveend",this._updateHash),this}},{key:"remove",value:function(){return o.removeEventListener("hashchange",this._onHashChange,!1),this._map.off("moveend",this._updateHash),delete this._map,this}},{key:"getHashString",value:function(t){var e=this._map.getCenter(),n=Math.round(100*this._map.getZoom())/100,r=Math.ceil((n*Math.LN2+Math.log(512/360/.5))/Math.LN10),i=Math.pow(10,r),o=Math.round(e.lng*i)/i,a=Math.round(e.lat*i)/i,s=this._map.getBearing(),u=this._map.getPitch(),l="";return l+=t?"#/".concat(o,"/").concat(a,"/").concat(n):"#".concat(n,"/").concat(a,"/").concat(o),(s||u)&&(l+="/".concat(Math.round(10*s)/10)),u&&(l+="/".concat(Math.round(u))),l}},{key:"_onHashChange",value:function(){var t=o.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)}},{key:"_updateHashUnthrottled",value:function(){var t=this.getHashString();o.history.replaceState("","",t)}}])&&r(e.prototype,n),s&&r(e,s),t}();t.exports=s},function(t,e){t.exports=function(t,e){var n=!1,r=0;return function(){return n=!0,r||function i(){r=0,n&&(t(),r=setTimeout(i,e),n=!1)}(),r}}},function(t,e,n){var r=n(9),i=n(3),o={scrollZoom:n(286),boxZoom:n(287),dragRotate:n(127),dragPan:n(288),keyboard:n(289),doubleClickZoom:n(290),touchZoomRotate:n(291)};t.exports=function(t,e){var n=t.getCanvasContainer(),a=null,s=!1,u=null,l=null;for(var c in o)t[c]=new o[c](t,e),e.interactive&&e[c]&&t[c].enable(e[c]);function f(){l=null}function h(e,i){var o=r.mousePos(n,i);return t.fire(e,{lngLat:t.unproject(o),point:o,originalEvent:i})}function p(e,o){var a=r.touchPos(n,o),s=a.reduce(function(t,e,n,r){return t.add(e.div(r.length))},new i(0,0));return t.fire(e,{lngLat:t.unproject(s),point:s,lngLats:a.map(function(e){return t.unproject(e)},this),points:a,originalEvent:o})}n.addEventListener("mouseout",function(t){h("mouseout",t)},!1),n.addEventListener("mousedown",function(e){t.doubleClickZoom.isActive()||t.stop();u=r.mousePos(n,e),h("mousedown",e),s=!0},!1),n.addEventListener("mouseup",function(e){var n=t.dragRotate&&t.dragRotate.isActive();a&&!n&&h("contextmenu",a);a=null,s=!1,h("mouseup",e)},!1),n.addEventListener("mousemove",function(e){if(t.dragPan&&t.dragPan.isActive())return;if(t.dragRotate&&t.dragRotate.isActive())return;var r=e.toElement||e.target;for(;r&&r!==n;)r=r.parentNode;if(r!==n)return;h("mousemove",e)},!1),n.addEventListener("touchstart",function(e){if(t.stop(),p("touchstart",e),!e.touches||e.touches.length>1)return;l?(clearTimeout(l),l=null,h("dblclick",e)):l=setTimeout(f,300)},!1),n.addEventListener("touchend",function(t){p("touchend",t)},!1),n.addEventListener("touchmove",function(t){p("touchmove",t)},!1),n.addEventListener("touchcancel",function(t){p("touchcancel",t)},!1),n.addEventListener("click",function(t){r.mousePos(n,t).equals(u)&&h("click",t)},!1),n.addEventListener("dblclick",function(t){h("dblclick",t),t.preventDefault()},!1),n.addEventListener("contextmenu",function(e){var n=t.dragRotate&&t.dragRotate.isActive();s||n?s&&(a=e):h("contextmenu",e);e.preventDefault()},!1)}},function(t,e,n){function r(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,r.key,r)}}var i=n(9),o=n(0),a=n(2),s=n(5),u=s.navigator.userAgent.toLowerCase(),l=-1!==u.indexOf("firefox"),c=-1!==u.indexOf("safari")&&-1===u.indexOf("chrom"),f=function(){function t(e){!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,t),this._map=e,this._el=e.getCanvasContainer(),o.bindAll(["_onWheel","_onTimeout"],this)}var e,n,u;return e=t,(n=[{key:"isEnabled",value:function(){return!!this._enabled}},{key:"enable",value: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)}},{key:"disable",value:function(){this.isEnabled()&&(this._el.removeEventListener("wheel",this._onWheel),this._el.removeEventListener("mousewheel",this._onWheel),this._enabled=!1)}},{key:"_onWheel",value:function(t){var e=0;"wheel"===t.type?(e=t.deltaY,l&&t.deltaMode===s.WheelEvent.DOM_DELTA_PIXEL&&(e/=a.devicePixelRatio),t.deltaMode===s.WheelEvent.DOM_DELTA_LINE&&(e*=40)):"mousewheel"===t.type&&(e=-t.wheelDeltaY,c&&(e/=3));var n=a.now(),r=n-(this._time||0);this._pos=i.mousePos(this._el,t),this._time=n,0!==e&&e%4.000244140625==0?this._type="wheel":0!==e&&Math.abs(e)<4?this._type="trackpad":r>400?(this._type=null,this._lastValue=e,this._timeout=setTimeout(this._onTimeout,40)):this._type||(this._type=Math.abs(r*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()}},{key:"_onTimeout",value:function(){this._type="wheel",this._zoom(-this._lastValue)}},{key:"_zoom",value:function(t,e){if(0!==t){var n=this._map,r=2/(1+Math.exp(-Math.abs(t/100)));t<0&&0!==r&&(r=1/r);var i=n.ease?n.ease.to:n.transform.scale,o=n.transform.scaleZoom(i*r);n.zoomTo(o,{duration:"wheel"===this._type?200:0,around:this._aroundCenter?n.getCenter():n.unproject(this._pos),delayEndEvents:200,smoothEasing:!0},{originalEvent:e})}}}])&&r(e.prototype,n),u&&r(e,u),t}();t.exports=f},function(t,e,n){function r(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,r.key,r)}}var i=n(9),o=n(39),a=n(0),s=n(5),u=function(){function t(e){!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,t),this._map=e,this._el=e.getCanvasContainer(),this._container=e.getContainer(),a.bindAll(["_onMouseDown","_onMouseMove","_onMouseUp","_onKeyDown"],this)}var e,n,u;return e=t,(n=[{key:"isEnabled",value:function(){return!!this._enabled}},{key:"isActive",value:function(){return!!this._active}},{key:"enable",value: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)}},{key:"disable",value:function(){this.isEnabled()&&(this._el.removeEventListener("mousedown",this._onMouseDown),this._enabled=!1)}},{key:"_onMouseDown",value:function(t){t.shiftKey&&0===t.button&&(s.document.addEventListener("mousemove",this._onMouseMove,!1),s.document.addEventListener("keydown",this._onKeyDown,!1),s.document.addEventListener("mouseup",this._onMouseUp,!1),i.disableDrag(),this._startPos=i.mousePos(this._el,t),this._active=!0)}},{key:"_onMouseMove",value:function(t){var e=this._startPos,n=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 r=Math.min(e.x,n.x),o=Math.max(e.x,n.x),a=Math.min(e.y,n.y),s=Math.max(e.y,n.y);i.setTransform(this._box,"translate(".concat(r,"px,").concat(a,"px)")),this._box.style.width="".concat(o-r,"px"),this._box.style.height="".concat(s-a,"px")}},{key:"_onMouseUp",value:function(t){if(0===t.button){var e=this._startPos,n=i.mousePos(this._el,t),r=(new o).extend(this._map.unproject(e)).extend(this._map.unproject(n));this._finish(),e.x===n.x&&e.y===n.y?this._fireEvent("boxzoomcancel",t):this._map.fitBounds(r,{linear:!0}).fire("boxzoomend",{originalEvent:t,boxZoomBounds:r})}}},{key:"_onKeyDown",value:function(t){27===t.keyCode&&(this._finish(),this._fireEvent("boxzoomcancel",t))}},{key:"_finish",value:function(){this._active=!1,s.document.removeEventListener("mousemove",this._onMouseMove,!1),s.document.removeEventListener("keydown",this._onKeyDown,!1),s.document.removeEventListener("mouseup",this._onMouseUp,!1),this._container.classList.remove("mapboxgl-crosshair"),this._box&&(i.remove(this._box),this._box=null),i.enableDrag()}},{key:"_fireEvent",value:function(t,e){return this._map.fire(t,{originalEvent:e})}}])&&r(e.prototype,n),u&&r(e,u),t}();t.exports=u},function(t,e,n){function r(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,r.key,r)}}var i=n(9),o=n(0),a=n(5),s=n(2),u=o.bezier(0,0,.3,1),l=function(){function t(e){!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,t),this._map=e,this._el=e.getCanvasContainer(),o.bindAll(["_onDown","_onMove","_onUp","_onTouchEnd","_onMouseUp"],this)}var e,n,l;return e=t,(n=[{key:"isEnabled",value:function(){return!!this._enabled}},{key:"isActive",value:function(){return!!this._active}},{key:"enable",value: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)}},{key:"disable",value: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)}},{key:"_onDown",value:function(t){this._ignoreEvent(t)||this.isActive()||(t.touches?(a.document.addEventListener("touchmove",this._onMove),a.document.addEventListener("touchend",this._onTouchEnd)):(a.document.addEventListener("mousemove",this._onMove),a.document.addEventListener("mouseup",this._onMouseUp)),a.addEventListener("blur",this._onMouseUp),this._active=!1,this._startPos=this._pos=i.mousePos(this._el,t),this._inertia=[[s.now(),this._pos]])}},{key:"_onMove",value: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),n=this._map;n.stop(),this._drainInertiaBuffer(),this._inertia.push([s.now(),e]),n.transform.setLocationAtPoint(n.transform.pointLocation(this._pos),e),this._fireEvent("drag",t),this._fireEvent("move",t),this._pos=e,t.preventDefault()}}},{key:"_onUp",value:function(t){var e=this;if(this.isActive()){this._active=!1,this._fireEvent("dragend",t),this._drainInertiaBuffer();var n=function(){e._map.moving=!1,e._fireEvent("moveend",t)},r=this._inertia;if(r.length<2)n();else{var i=r[r.length-1],o=r[0],a=i[1].sub(o[1]),s=(i[0]-o[0])/1e3;if(0===s||i[1].equals(o[1]))n();else{var l=a.mult(.3/s),c=l.mag();c>1400&&(c=1400,l._unit()._mult(c));var f=c/750,h=l.mult(-f/2);this._map.panBy(h,{duration:1e3*f,easing:u,noMoveStart:!0},{originalEvent:t})}}}}},{key:"_onMouseUp",value:function(t){this._ignoreEvent(t)||(this._onUp(t),a.document.removeEventListener("mousemove",this._onMove),a.document.removeEventListener("mouseup",this._onMouseUp),a.removeEventListener("blur",this._onMouseUp))}},{key:"_onTouchEnd",value:function(t){this._ignoreEvent(t)||(this._onUp(t),a.document.removeEventListener("touchmove",this._onMove),a.document.removeEventListener("touchend",this._onTouchEnd))}},{key:"_fireEvent",value:function(t,e){return this._map.fire(t,{originalEvent:e})}},{key:"_ignoreEvent",value: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))}},{key:"_drainInertiaBuffer",value:function(){for(var t=this._inertia,e=s.now();t.length>0&&e-t[0][0]>160;)t.shift()}}])&&r(e.prototype,n),l&&r(e,l),t}();t.exports=l},function(t,e,n){function r(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,r.key,r)}}var i=n(0),o=function(){function t(e){!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,t),this._map=e,this._el=e.getCanvasContainer(),i.bindAll(["_onKeyDown"],this)}var e,n,o;return e=t,(n=[{key:"isEnabled",value:function(){return!!this._enabled}},{key:"enable",value:function(){this.isEnabled()||(this._el.addEventListener("keydown",this._onKeyDown,!1),this._enabled=!0)}},{key:"disable",value:function(){this.isEnabled()&&(this._el.removeEventListener("keydown",this._onKeyDown),this._enabled=!1)}},{key:"_onKeyDown",value:function(t){if(!(t.altKey||t.ctrlKey||t.metaKey)){var e=0,n=0,r=0,i=0,o=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?n=-1:(t.preventDefault(),i=-1);break;case 39:t.shiftKey?n=1:(t.preventDefault(),i=1);break;case 38:t.shiftKey?r=1:(t.preventDefault(),o=-1);break;case 40:t.shiftKey?r=-1:(o=1,t.preventDefault());break;default:return}var s=this._map,u=s.getZoom(),l={duration:300,delayEndEvents:500,easing:a,zoom:e?Math.round(u)+e*(t.shiftKey?2:1):u,bearing:s.getBearing()+15*n,pitch:s.getPitch()+10*r,offset:[100*-i,100*-o],center:s.getCenter()};s.easeTo(l,{originalEvent:t})}}}])&&r(e.prototype,n),o&&r(e,o),t}();function a(t){return t*(2-t)}t.exports=o},function(t,e,n){function r(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,r.key,r)}}var i=n(0),o=function(){function t(e){!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,t),this._map=e,i.bindAll(["_onDblClick","_onZoomEnd"],this)}var e,n,o;return e=t,(n=[{key:"isEnabled",value:function(){return!!this._enabled}},{key:"isActive",value:function(){return!!this._active}},{key:"enable",value:function(){this.isEnabled()||(this._map.on("dblclick",this._onDblClick),this._enabled=!0)}},{key:"disable",value:function(){this.isEnabled()&&(this._map.off("dblclick",this._onDblClick),this._enabled=!1)}},{key:"_onDblClick",value: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)}},{key:"_onZoomEnd",value:function(){this._active=!1,this._map.off("zoomend",this._onZoomEnd)}}])&&r(e.prototype,n),o&&r(e,o),t}();t.exports=o},function(t,e,n){function r(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,r.key,r)}}var i=n(9),o=n(0),a=n(5),s=n(2),u=o.bezier(0,0,.15,1),l=function(){function t(e){!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,t),this._map=e,this._el=e.getCanvasContainer(),o.bindAll(["_onStart","_onMove","_onEnd"],this)}var e,n,l;return e=t,(n=[{key:"isEnabled",value:function(){return!!this._enabled}},{key:"enable",value: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)}},{key:"disable",value:function(){this.isEnabled()&&(this._el.classList.remove("mapboxgl-touch-zoom-rotate"),this._el.removeEventListener("touchstart",this._onStart),this._enabled=!1)}},{key:"disableRotation",value:function(){this._rotationDisabled=!0}},{key:"enableRotation",value:function(){this._rotationDisabled=!1}},{key:"_onStart",value:function(t){if(2===t.touches.length){var e=i.mousePos(this._el,t.touches[0]),n=i.mousePos(this._el,t.touches[1]);this._startVec=e.sub(n),this._startScale=this._map.transform.scale,this._startBearing=this._map.transform.bearing,this._gestureIntent=void 0,this._inertia=[],a.document.addEventListener("touchmove",this._onMove,!1),a.document.addEventListener("touchend",this._onEnd,!1)}}},{key:"_onMove",value:function(t){if(2===t.touches.length){var e=i.mousePos(this._el,t.touches[0]),n=i.mousePos(this._el,t.touches[1]),r=e.add(n).div(2),o=e.sub(n),a=o.mag()/this._startVec.mag(),u=this._rotationDisabled?0:180*o.angleWith(this._startVec)/Math.PI,l=this._map;if(this._gestureIntent){var c={duration:0,around:l.unproject(r)};"rotate"===this._gestureIntent&&(c.bearing=this._startBearing+u),"zoom"!==this._gestureIntent&&"rotate"!==this._gestureIntent||(c.zoom=l.transform.scaleZoom(this._startScale*a)),l.stop(),this._drainInertiaBuffer(),this._inertia.push([s.now(),a,r]),l.easeTo(c,{originalEvent:t})}else{var f=Math.abs(1-a)>.15;Math.abs(u)>10?this._gestureIntent="rotate":f&&(this._gestureIntent="zoom"),this._gestureIntent&&(this._startVec=o,this._startScale=l.transform.scale,this._startBearing=l.transform.bearing)}t.preventDefault()}}},{key:"_onEnd",value:function(t){a.document.removeEventListener("touchmove",this._onMove),a.document.removeEventListener("touchend",this._onEnd),this._drainInertiaBuffer();var e=this._inertia,n=this._map;if(e.length<2)n.snapToNorth({},{originalEvent:t});else{var r=e[e.length-1],i=e[0],o=n.transform.scaleZoom(this._startScale*r[1]),s=n.transform.scaleZoom(this._startScale*i[1]),l=o-s,c=(r[0]-i[0])/1e3,f=r[2];if(0!==c&&o!==s){var h=.15*l/c;Math.abs(h)>2.5&&(h=h>0?2.5:-2.5);var p=1e3*Math.abs(h/(12*.15)),d=o+h*p/2e3;d<0&&(d=0),n.easeTo({zoom:d,duration:p,easing:u,around:this._aroundCenter?n.getCenter():n.unproject(f)},{originalEvent:t})}else n.snapToNorth({},{originalEvent:t})}}},{key:"_drainInertiaBuffer",value:function(){for(var t=this._inertia,e=s.now();t.length>2&&e-t[0][0]>160;)t.shift()}}])&&r(e.prototype,n),l&&r(e,l),t}();t.exports=l},function(t,e,n){function r(t){return(r="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t})(t)}function i(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,r.key,r)}}function o(t,e){return!e||"object"!==r(e)&&"function"!=typeof e?function(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}(t):e}function a(t){return(a=Object.setPrototypeOf?Object.getPrototypeOf:function(t){return t.__proto__||Object.getPrototypeOf(t)})(t)}function s(t,e){return(s=Object.setPrototypeOf||function(t,e){return t.__proto__=e,t})(t,e)}var u=n(0),l=n(26).number,c=n(2),f=n(21),h=n(39),p=n(3),d=n(10),y=function(t){function e(t,n){var r;return function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,e),(r=o(this,a(e).call(this))).moving=!1,r.transform=t,r._bearingSnap=n.bearingSnap,r}var n,r,y;return function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),e&&s(t,e)}(e,d),n=e,(r=[{key:"getCenter",value:function(){return this.transform.center}},{key:"setCenter",value:function(t,e){return this.jumpTo({center:t},e)}},{key:"panBy",value:function(t,e,n){return t=p.convert(t).mult(-1),this.panTo(this.transform.center,u.extend({offset:t},e),n)}},{key:"panTo",value:function(t,e,n){return this.easeTo(u.extend({center:t},e),n)}},{key:"getZoom",value:function(){return this.transform.zoom}},{key:"setZoom",value:function(t,e){return this.jumpTo({zoom:t},e),this}},{key:"zoomTo",value:function(t,e,n){return this.easeTo(u.extend({zoom:t},e),n)}},{key:"zoomIn",value:function(t,e){return this.zoomTo(this.getZoom()+1,t,e),this}},{key:"zoomOut",value:function(t,e){return this.zoomTo(this.getZoom()-1,t,e),this}},{key:"getBearing",value:function(){return this.transform.bearing}},{key:"setBearing",value:function(t,e){return this.jumpTo({bearing:t},e),this}},{key:"rotateTo",value:function(t,e,n){return this.easeTo(u.extend({bearing:t},e),n)}},{key:"resetNorth",value:function(t,e){return this.rotateTo(0,u.extend({duration:1e3},t),e),this}},{key:"snapToNorth",value:function(t,e){return Math.abs(this.getBearing())<this._bearingSnap?this.resetNorth(t,e):this}},{key:"getPitch",value:function(){return this.transform.pitch}},{key:"setPitch",value:function(t,e){return this.jumpTo({pitch:t},e),this}},{key:"fitBounds",value:function(t,e,n){if("number"==typeof(e=u.extend({padding:{top:0,bottom:0,right:0,left:0},offset:[0,0],maxZoom:this.transform.maxZoom},e)).padding){var r=e.padding;e.padding={top:r,bottom:r,right:r,left:r}}if(!u.deepEqual(Object.keys(e.padding).sort(function(t,e){return t<e?-1:t>e?1:0}),["bottom","left","right","top"]))return u.warnOnce("options.padding must be a positive number, or an Object with keys 'bottom', 'left', 'right', 'top'"),this;t=h.convert(t);var i=[(e.padding.left-e.padding.right)/2,(e.padding.top-e.padding.bottom)/2],o=Math.min(e.padding.right,e.padding.left),a=Math.min(e.padding.top,e.padding.bottom);e.offset=[e.offset[0]+i[0],e.offset[1]+i[1]];var s=p.convert(e.offset),l=this.transform,c=l.project(t.getNorthWest()),f=l.project(t.getSouthEast()),d=f.sub(c),y=(l.width-2*o-2*Math.abs(s.x))/d.x,m=(l.height-2*a-2*Math.abs(s.y))/d.y;return m<0||y<0?(u.warnOnce("Map cannot fit within canvas with the given bounds, padding, and/or offset."),this):(e.center=l.unproject(c.add(f).div(2)),e.zoom=Math.min(l.scaleZoom(l.scale*Math.min(y,m)),e.maxZoom),e.bearing=0,e.linear?this.easeTo(e,n):this.flyTo(e,n))}},{key:"jumpTo",value:function(t,e){this.stop();var n=this.transform,r=!1,i=!1,o=!1;return"zoom"in t&&n.zoom!==+t.zoom&&(r=!0,n.zoom=+t.zoom),void 0!==t.center&&(n.center=f.convert(t.center)),"bearing"in t&&n.bearing!==+t.bearing&&(i=!0,n.bearing=+t.bearing),"pitch"in t&&n.pitch!==+t.pitch&&(o=!0,n.pitch=+t.pitch),this.fire("movestart",e).fire("move",e),r&&this.fire("zoomstart",e).fire("zoom",e).fire("zoomend",e),i&&this.fire("rotate",e),o&&this.fire("pitchstart",e).fire("pitch",e).fire("pitchend",e),this.fire("moveend",e)}},{key:"easeTo",value:function(t,e){var n=this;this.stop(),!1===(t=u.extend({offset:[0,0],duration:500,easing:u.ease},t)).animate&&(t.duration=0),t.smoothEasing&&0!==t.duration&&(t.easing=this._smoothOutEasing(t.duration));var r=this.transform,i=this.getZoom(),o=this.getBearing(),a=this.getPitch(),s="zoom"in t?+t.zoom:i,c="bearing"in t?this._normalizeBearing(t.bearing,o):o,h="pitch"in t?+t.pitch:a,d=r.centerPoint.add(p.convert(t.offset)),y=r.pointLocation(d),m=f.convert(t.center||y);this._normalizeCenter(m);var v,g,b=r.project(y),x=r.project(m).sub(b),_=r.zoomScale(s-i);return t.around&&(v=f.convert(t.around),g=r.locationPoint(v)),this.zooming=s!==i,this.rotating=o!==c,this.pitching=h!==a,this._prepareEase(e,t.noMoveStart),clearTimeout(this._onEaseEnd),this._ease(function(t){if(n.zooming&&(r.zoom=l(i,s,t)),n.rotating&&(r.bearing=l(o,c,t)),n.pitching&&(r.pitch=l(a,h,t)),v)r.setLocationAtPoint(v,g);else{var u=r.zoomScale(r.zoom-i),f=s>i?Math.min(2,_):Math.max(.5,_),p=Math.pow(f,1-t),y=r.unproject(b.add(x.mult(t*p)).mult(u));r.setLocationAtPoint(r.renderWorldCopies?y.wrap():y,d)}n._fireMoveEvents(e)},function(){t.delayEndEvents?n._onEaseEnd=setTimeout(function(){return n._easeToEnd(e)},t.delayEndEvents):n._easeToEnd(e)},t),this}},{key:"_prepareEase",value:function(t,e){this.moving=!0,e||this.fire("movestart",t),this.zooming&&this.fire("zoomstart",t),this.pitching&&this.fire("pitchstart",t)}},{key:"_fireMoveEvents",value:function(t){this.fire("move",t),this.zooming&&this.fire("zoom",t),this.rotating&&this.fire("rotate",t),this.pitching&&this.fire("pitch",t)}},{key:"_easeToEnd",value:function(t){var e=this.zooming,n=this.pitching;this.moving=!1,this.zooming=!1,this.rotating=!1,this.pitching=!1,e&&this.fire("zoomend",t),n&&this.fire("pitchend",t),this.fire("moveend",t)}},{key:"flyTo",value:function(t,e){var n=this;this.stop(),t=u.extend({offset:[0,0],speed:1.2,curve:1.42,easing:u.ease},t);var r=this.transform,i=this.getZoom(),o=this.getBearing(),a=this.getPitch(),s="zoom"in t?u.clamp(+t.zoom,r.minZoom,r.maxZoom):i,c="bearing"in t?this._normalizeBearing(t.bearing,o):o,h="pitch"in t?+t.pitch:a,d=r.zoomScale(s-i),y=r.centerPoint.add(p.convert(t.offset)),m=r.pointLocation(y),v=f.convert(t.center||m);this._normalizeCenter(v);var g=r.project(m),b=r.project(v).sub(g),x=t.curve,_=Math.max(r.width,r.height),w=_/d,k=b.mag();if("minZoom"in t){var S=u.clamp(Math.min(t.minZoom,i,s),r.minZoom,r.maxZoom),T=_/r.zoomScale(S-i);x=Math.sqrt(T/k*2)}var A=x*x;function E(t){var e=(w*w-_*_+(t?-1:1)*A*A*k*k)/(2*(t?w:_)*A*k);return Math.log(Math.sqrt(e*e+1)-e)}function z(t){return(Math.exp(t)-Math.exp(-t))/2}function C(t){return(Math.exp(t)+Math.exp(-t))/2}var P=E(0),O=function(t){return C(P)/C(P+x*t)},I=function(t){return _*((C(P)*(z(e=P+x*t)/C(e))-z(P))/A)/k;var e},j=(E(1)-P)/x;if(Math.abs(k)<1e-6||!isFinite(j)){if(Math.abs(_-w)<1e-6)return this.easeTo(t,e);var M=w<_?-1:1;j=Math.abs(Math.log(w/_))/x,I=function(){return 0},O=function(t){return Math.exp(M*x*t)}}if("duration"in t)t.duration=+t.duration;else{var L="screenSpeed"in t?+t.screenSpeed/x:+t.speed;t.duration=1e3*j/L}return t.maxDuration&&t.duration>t.maxDuration&&(t.duration=0),this.zooming=!0,this.rotating=o!==c,this.pitching=h!==a,this._prepareEase(e,!1),this._ease(function(t){var s=t*j,u=1/O(s);r.zoom=i+r.scaleZoom(u),n.rotating&&(r.bearing=l(o,c,t)),n.pitching&&(r.pitch=l(a,h,t));var f=r.unproject(g.add(b.mult(I(s))).mult(u));r.setLocationAtPoint(r.renderWorldCopies?f.wrap():f,y),n._fireMoveEvents(e)},function(){return n._easeToEnd(e)},t),this}},{key:"isEasing",value:function(){return!!this._easeFn}},{key:"isMoving",value:function(){return this.moving}},{key:"stop",value:function(){return this._easeFn&&this._finishEase(),this}},{key:"_ease",value:function(t,e,n){!1===n.animate||0===n.duration?(t(1),e()):(this._easeStart=c.now(),this._easeFn=t,this._finishFn=e,this._easeOptions=n,this._update())}},{key:"_updateEase",value:function(){var t=Math.min((c.now()-this._easeStart)/this._easeOptions.duration,1);this._easeFn(this._easeOptions.easing(t)),1===t&&this._finishEase()}},{key:"_finishEase",value:function(){delete this._easeFn;var t=this._finishFn;delete this._finishFn,t.call(this)}},{key:"_normalizeBearing",value:function(t,e){t=u.wrap(t,-180,180);var n=Math.abs(t-e);return Math.abs(t-360-e)<n&&(t-=360),Math.abs(t+360-e)<n&&(t+=360),t}},{key:"_normalizeCenter",value:function(t){var e=this.transform;if(e.renderWorldCopies&&!e.lngRange){var n=t.lng-e.center.lng;t.lng+=n>180?-360:n<-180?360:0}}},{key:"_smoothOutEasing",value:function(t){var e=u.ease;if(this._prevEase){var n=this._prevEase,r=(c.now()-n.start)/n.duration,i=n.easing(r+.01)-n.easing(r),o=.27/Math.sqrt(i*i+1e-4)*.01,a=Math.sqrt(.0729-o*o);e=u.bezier(o,a,.25,1)}return this._prevEase={start:c.now(),duration:t,easing:e},e}}])&&i(n.prototype,r),y&&i(n,y),e}();t.exports=y},function(t,e,n){function r(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,r.key,r)}}var i=n(9),o=n(0),a=function(){function t(){!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,t),o.bindAll(["_updateLogo"],this)}var e,n,a;return e=t,(n=[{key:"onAdd",value: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}},{key:"onRemove",value:function(){i.remove(this._container),this._map.off("sourcedata",this._updateLogo)}},{key:"getDefaultPosition",value:function(){return"bottom-left"}},{key:"_updateLogo",value:function(t){t&&"metadata"!==t.sourceDataType||(this._container.style.display=this._logoRequired()?"block":"none")}},{key:"_logoRequired",value: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}}}])&&r(e.prototype,n),a&&r(e,a),t}();t.exports=a},function(t,e){},function(t,e,n){function r(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,r.key,r)}}var i=n(9),o=n(0),a=n(127),s={showCompass:!0,showZoom:!0},u=function(){function t(e){var n=this;!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,t),this.options=o.extend({},s,e),this._container=i.create("div","mapboxgl-ctrl mapboxgl-ctrl-group"),this._container.addEventListener("contextmenu",function(t){return t.preventDefault()}),this.options.showZoom&&(this._zoomInButton=this._createButton("mapboxgl-ctrl-icon mapboxgl-ctrl-zoom-in","Zoom In",function(){return n._map.zoomIn()}),this._zoomOutButton=this._createButton("mapboxgl-ctrl-icon mapboxgl-ctrl-zoom-out","Zoom Out",function(){return n._map.zoomOut()})),this.options.showCompass&&(o.bindAll(["_rotateCompassArrow"],this),this._compass=this._createButton("mapboxgl-ctrl-icon mapboxgl-ctrl-compass","Reset North",function(){return n._map.resetNorth()}),this._compassArrow=i.create("span","mapboxgl-ctrl-compass-arrow",this._compass))}var e,n,u;return e=t,(n=[{key:"_rotateCompassArrow",value:function(){var t="rotate(".concat(this._map.transform.angle*(180/Math.PI),"deg)");this._compassArrow.style.transform=t}},{key:"onAdd",value:function(t){return this._map=t,this.options.showCompass&&(this._map.on("rotate",this._rotateCompassArrow),this._rotateCompassArrow(),this._handler=new a(t,{button:"left",element:this._compass}),this._handler.enable()),this._container}},{key:"onRemove",value:function(){i.remove(this._container),this.options.showCompass&&(this._map.off("rotate",this._rotateCompassArrow),this._handler.disable(),delete this._handler),delete this._map}},{key:"_createButton",value:function(t,e,n){var r=i.create("button",t,this._container);return r.type="button",r.setAttribute("aria-label",e),r.addEventListener("click",n),r}}])&&r(e.prototype,n),u&&r(e,u),t}();t.exports=u},function(t,e,n){function r(t){return(r="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t})(t)}function i(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,r.key,r)}}function o(t){return(o=Object.setPrototypeOf?Object.getPrototypeOf:function(t){return t.__proto__||Object.getPrototypeOf(t)})(t)}function a(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}function s(t,e){return(s=Object.setPrototypeOf||function(t,e){return t.__proto__=e,t})(t,e)}var u,l=n(10),c=n(9),f=n(5),h=n(0),p=n(1),d=n(21),y=n(129),m={positionOptions:{enableHighAccuracy:!1,timeout:6e3},fitBoundsOptions:{maxZoom:15},trackUserLocation:!1,showUserLocation:!0};var v=function(t){function e(t){var n;return function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,e),(n=function(t,e){return!e||"object"!==r(e)&&"function"!=typeof e?a(t):e}(this,o(e).call(this))).options=h.extend({},m,t),h.bindAll(["_onSuccess","_onError","_finish","_setupUI","_updateCamera","_updateMarker","_onClickGeolocate"],a(n)),n}var n,v,g;return function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),e&&s(t,e)}(e,l),n=e,(v=[{key:"onAdd",value:function(t){var e;return this._map=t,this._container=c.create("div","".concat("mapboxgl-ctrl"," ").concat("mapboxgl-ctrl","-group")),e=this._setupUI,void 0!==u?e(u):void 0!==f.navigator.permissions?f.navigator.permissions.query({name:"geolocation"}).then(function(t){u="denied"!==t.state,e(u)}):(u=!!f.navigator.geolocation,e(u)),this._container}},{key:"onRemove",value:function(){void 0!==this._geolocationWatchID&&(f.navigator.geolocation.clearWatch(this._geolocationWatchID),this._geolocationWatchID=void 0),this.options.showUserLocation&&this._userLocationDotMarker.remove(),c.remove(this._container),this._map=void 0}},{key:"_onSuccess",value: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:p(!1,"Unexpected watchState ".concat(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()}},{key:"_updateCamera",value:function(t){var e=new d(t.coords.longitude,t.coords.latitude),n=t.coords.accuracy;this._map.fitBounds(e.toBounds(n),this.options.fitBoundsOptions,{geolocateSource:!0})}},{key:"_updateMarker",value:function(t){t?this._userLocationDotMarker.setLngLat([t.coords.longitude,t.coords.latitude]).addTo(this._map):this._userLocationDotMarker.remove()}},{key:"_onError",value: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:p(!1,"Unexpected watchState ".concat(this._watchState))}"OFF"!==this._watchState&&this.options.showUserLocation&&this._dotElement.classList.add("mapboxgl-user-location-dot-stale"),this.fire("error",t),this._finish()}},{key:"_finish",value:function(){this._timeoutId&&clearTimeout(this._timeoutId),this._timeoutId=void 0}},{key:"_setupUI",value:function(t){var e=this;!1!==t&&(this._container.addEventListener("contextmenu",function(t){return t.preventDefault()}),this._geolocateButton=c.create("button","".concat("mapboxgl-ctrl","-icon ").concat("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=c.create("div","mapboxgl-user-location-dot"),this._userLocationDotMarker=new y(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"))}))}},{key:"_onClickGeolocate",value: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:p(!1,"Unexpected watchState ".concat(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:p(!1,"Unexpected watchState ".concat(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=f.navigator.geolocation.watchPosition(this._onSuccess,this._onError,this.options.positionOptions))}else f.navigator.geolocation.getCurrentPosition(this._onSuccess,this._onError,this.options.positionOptions),this._timeoutId=setTimeout(this._finish,1e4)}},{key:"_clearWatch",value:function(){f.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)}}])&&i(n.prototype,v),g&&i(n,g),e}();t.exports=v},function(t,e,n){function r(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,r.key,r)}}var i=n(9),o=n(0),a=function(){function t(e){!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,t),this.options=e,o.bindAll(["_onMove"],this)}var e,n,a;return e=t,(n=[{key:"getDefaultPosition",value:function(){return"bottom-left"}},{key:"_onMove",value:function(){!function(t,e,n){var r=n&&n.maxWidth||100,i=t._container.clientHeight/2,o=(a=t.unproject([0,i]),u=t.unproject([r,i]),l=Math.PI/180,c=a.lat*l,f=u.lat*l,h=Math.sin(c)*Math.sin(f)+Math.cos(c)*Math.cos(f)*Math.cos((u.lng-a.lng)*l),6371e3*Math.acos(Math.min(h,1)));var a,u,l,c,f,h;if(n&&"imperial"===n.unit){var p=3.2808*o;if(p>5280){var d=p/5280;s(e,r,d,"mi")}else s(e,r,p,"ft")}else if(n&&"nautical"===n.unit){var y=o/1852;s(e,r,y,"nm")}else s(e,r,o,"m")}(this._map,this._container,this.options)}},{key:"onAdd",value:function(t){return this._map=t,this._container=i.create("div","mapboxgl-ctrl mapboxgl-ctrl-scale",t.getContainer()),this._map.on("move",this._onMove),this._onMove(),this._container}},{key:"onRemove",value:function(){i.remove(this._container),this._map.off("move",this._onMove),this._map=void 0}}])&&r(e.prototype,n),a&&r(e,a),t}();function s(t,e,n,r){var i,o,a,s=(i=n,(o=Math.pow(10,"".concat(Math.floor(i)).length-1))*(a=(a=i/o)>=10?10:a>=5?5:a>=3?3:a>=2?2:1)),u=s/n;"m"===r&&s>=1e3&&(s/=1e3,r="km"),t.style.width="".concat(e*u,"px"),t.innerHTML=s+r}t.exports=a},function(t,e,n){function r(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,r.key,r)}}var i=n(9),o=n(0),a=n(5),s=function(){function t(){!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,t),this._fullscreen=!1,o.bindAll(["_onClickFullscreen","_changeIcon"],this),"onfullscreenchange"in a.document?this._fullscreenchange="fullscreenchange":"onmozfullscreenchange"in a.document?this._fullscreenchange="mozfullscreenchange":"onwebkitfullscreenchange"in a.document?this._fullscreenchange="webkitfullscreenchange":"onmsfullscreenchange"in a.document&&(this._fullscreenchange="MSFullscreenChange"),this._className="mapboxgl-ctrl"}var e,n,s;return e=t,(n=[{key:"onAdd",value:function(t){return this._map=t,this._mapContainer=this._map.getContainer(),this._container=i.create("div","".concat(this._className," mapboxgl-ctrl-group")),this._checkFullscreenSupport()?this._setupUI():(this._container.style.display="none",o.warnOnce("This device does not support fullscreen mode.")),this._container}},{key:"onRemove",value:function(){i.remove(this._container),this._map=null,a.document.removeEventListener(this._fullscreenchange,this._changeIcon)}},{key:"_checkFullscreenSupport",value:function(){return!!(a.document.fullscreenEnabled||a.document.mozFullScreenEnabled||a.document.msFullscreenEnabled||a.document.webkitFullscreenEnabled)}},{key:"_setupUI",value:function(){var t=this._fullscreenButton=i.create("button","".concat(this._className,"-icon ").concat(this._className,"-fullscreen"),this._container);t.setAttribute("aria-label","Toggle fullscreen"),t.type="button",this._fullscreenButton.addEventListener("click",this._onClickFullscreen),a.document.addEventListener(this._fullscreenchange,this._changeIcon)}},{key:"_isFullscreen",value:function(){return this._fullscreen}},{key:"_changeIcon",value:function(){(a.document.fullscreenElement||a.document.mozFullScreenElement||a.document.webkitFullscreenElement||a.document.msFullscreenElement)===this._mapContainer!==this._fullscreen&&(this._fullscreen=!this._fullscreen,this._fullscreenButton.classList.toggle("".concat(this._className,"-shrink")),this._fullscreenButton.classList.toggle("".concat(this._className,"-fullscreen")))}},{key:"_onClickFullscreen",value:function(){this._isFullscreen()?a.document.exitFullscreen?a.document.exitFullscreen():a.document.mozCancelFullScreen?a.document.mozCancelFullScreen():a.document.msExitFullscreen?a.document.msExitFullscreen():a.document.webkitCancelFullScreen&&a.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()}}])&&r(e.prototype,n),s&&r(e,s),t}();t.exports=s},function(t,e,n){function r(t){return(r="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t})(t)}function i(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,r.key,r)}}function o(t){return(o=Object.setPrototypeOf?Object.getPrototypeOf:function(t){return t.__proto__||Object.getPrototypeOf(t)})(t)}function a(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}function s(t,e){return(s=Object.setPrototypeOf||function(t,e){return t.__proto__=e,t})(t,e)}var u=n(0),l=n(10),c=n(9),f=n(21),h=n(3),p=n(5),d=n(130),y={closeButton:!0,closeOnClick:!0},m=function(t){function e(t){var n;return function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,e),(n=function(t,e){return!e||"object"!==r(e)&&"function"!=typeof e?a(t):e}(this,o(e).call(this))).options=u.extend(Object.create(y),t),u.bindAll(["_update","_onClickClose"],a(n)),n}var n,m,v;return function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),e&&s(t,e)}(e,l),n=e,(m=[{key:"addTo",value:function(t){return this._map=t,this._map.on("move",this._update),this.options.closeOnClick&&this._map.on("click",this._onClickClose),this._update(),this}},{key:"isOpen",value:function(){return!!this._map}},{key:"remove",value:function(){return this._content&&c.remove(this._content),this._container&&(c.remove(this._container),delete this._container),this._map&&(this._map.off("move",this._update),this._map.off("click",this._onClickClose),delete this._map),this.fire("close"),this}},{key:"getLngLat",value:function(){return this._lngLat}},{key:"setLngLat",value:function(t){return this._lngLat=f.convert(t),this._pos=null,this._update(),this}},{key:"setText",value:function(t){return this.setDOMContent(p.document.createTextNode(t))}},{key:"setHTML",value:function(t){var e,n=p.document.createDocumentFragment(),r=p.document.createElement("body");for(r.innerHTML=t;e=r.firstChild;)n.appendChild(e);return this.setDOMContent(n)}},{key:"setDOMContent",value:function(t){return this._createContent(),this._content.appendChild(t),this._update(),this}},{key:"_createContent",value:function(){this._content&&c.remove(this._content),this._content=c.create("div","mapboxgl-popup-content",this._container),this.options.closeButton&&(this._closeButton=c.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))}},{key:"_update",value:function(){if(this._map&&this._lngLat&&this._content){this._container||(this._container=c.create("div","mapboxgl-popup",this._map.getContainer()),this._tip=c.create("div","mapboxgl-popup-tip",this._container),this._container.appendChild(this._content)),this._map.transform.renderWorldCopies&&(this._lngLat=d(this._lngLat,this._pos,this._map.transform));var t=this._pos=this._map.project(this._lngLat),e=this.options.anchor,n=function t(e){if(e){if("number"==typeof e){var n=Math.round(Math.sqrt(.5*Math.pow(e,2)));return{top:new h(0,e),"top-left":new h(n,n),"top-right":new h(-n,n),bottom:new h(0,-e),"bottom-left":new h(n,-n),"bottom-right":new h(-n,-n),left:new h(e,0),right:new h(-e,0)}}if(e instanceof h||Array.isArray(e)){var r=h.convert(e);return{top:r,"top-left":r,"top-right":r,bottom:r,"bottom-left":r,"bottom-right":r,left:r,right:r}}return{top:h.convert(e.top||[0,0]),"top-left":h.convert(e["top-left"]||[0,0]),"top-right":h.convert(e["top-right"]||[0,0]),bottom:h.convert(e.bottom||[0,0]),"bottom-left":h.convert(e["bottom-left"]||[0,0]),"bottom-right":h.convert(e["bottom-right"]||[0,0]),left:h.convert(e.left||[0,0]),right:h.convert(e.right||[0,0])}}return t(new h(0,0))}(this.options.offset);if(!e){var r=this._container.offsetWidth,i=this._container.offsetHeight;e=t.y+n.bottom.y<i?["top"]:t.y>this._map.transform.height-i?["bottom"]:[],t.x<r/2?e.push("left"):t.x>this._map.transform.width-r/2&&e.push("right"),e=0===e.length?"bottom":e.join("-")}var o=t.add(n[e]).round(),a={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%)"},s=this._container.classList;for(var u in a)s.remove("mapboxgl-popup-anchor-".concat(u));s.add("mapboxgl-popup-anchor-".concat(e)),c.setTransform(this._container,"".concat(a[e]," translate(").concat(o.x,"px,").concat(o.y,"px)"))}}},{key:"_onClickClose",value:function(){this.remove()}}])&&i(n.prototype,m),v&&i(n,v),e}();t.exports=m},function(t,e,n){function r(t){return(r="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t})(t)}function i(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,r.key,r)}}function o(t){return(o=Object.setPrototypeOf?Object.getPrototypeOf:function(t){return t.__proto__||Object.getPrototypeOf(t)})(t)}function a(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}function s(t,e){return(s=Object.setPrototypeOf||function(t,e){return t.__proto__=e,t})(t,e)}var u=n(301),l=n(302),c=n(6),f=n(10),h=n(27).OverscaledTileID,p=n(22).mat4,d=(n(45),n(116)),y=n(61),m=(n(69),n(1)),v=n(306),g=1024,b=function(t){function e(t){var n;return function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,e),(n=function(t,e){return!e||"object"!==r(e)&&"function"!=typeof e?a(t):e}(this,o(e).call(this)))._canvas=document.createElement("canvas"),n._canvas.style.imageRendering="pixelated",n._canvas.addEventListener("webglcontextlost",function(){return console.log("webglcontextlost")},!1),n._canvas.addEventListener("webglcontextrestored",function(){return n._createGlContext()},!1),n._canvas.width=g,n._canvas.height=g,n.transform={zoom:0,angle:0,pitch:0,_pitch:0,scaleZoom:function(){return 0},cameraToCenterDistance:1,cameraToTileDistance:function(){return 1},clone:function(){return n.transform},width:g,height:g,pixelsToGLUnits:[2/g,-2/g],tileZoom:function(t){return t.tileID.canonical.z},calculatePosMatrix:function(t){return t.posMatrix}},v(t.style),n._initStyle=t.style,n._style=new l(Object.assign({},t.style,{transition:{duration:0}}),a(n)),n._style.setEventedParent(a(n),{style:n._style}),n._style.on("data",function(t){return"style"===t.dataType&&n._onReady()}),n._createGlContext(),n.painter.resize(g,g),n._pendingRenders=new Map,n._nextRenderId=0,n._configId=0,n._queuedConfigChanges=[],n}var b,x,_;return function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),e&&s(t,e)}(e,f),b=e,(x=[{key:"_onReady",value:function(){this._style.update(new y(16))}},{key:"_transformRequest",value:function(t,e){return{url:t,headers:{},credentials:""}}},{key:"_calculatePosMatrix",value:function(t,e,n){var r=this;this._tmpMat4f64=this._tmpMat4f64||new Float64Array(16),this._tmpMat4f32=new Float32Array(16),p.identity(this._tmpMat4f64);var i,o,a=n/g;return i=this._tmpMat4f64,o=[2/c*a,-2/c*a,1],r._tmpMat4f64b=r._tmpMat4f64b||new Float32Array(16),p.identity(r._tmpMat4f64b),p.scale(r._tmpMat4f64b,r._tmpMat4f64b,o),p.multiply(i,r._tmpMat4f64b,i),function(t,e){r._tmpMat4f64b=r._tmpMat4f64b||new Float32Array(16),p.identity(r._tmpMat4f64b),p.translate(r._tmpMat4f64b,r._tmpMat4f64b,e),p.multiply(t,r._tmpMat4f64b,t)}(this._tmpMat4f64,[2*t/g-1,1-2*e/g,0]),this._tmpMat4f32.set(this._tmpMat4f64),this._tmpMat4f32}},{key:"_createGlContext",value:function(){var t=Object.assign({failIfMajorPerformanceCaveat:!1,preserveDrawingBuffer:!1},n(307).webGLContextAttributes);if(this._gl=this._canvas.getContext("webgl",t)||this._canvas.getContext("experimental-webgl",t),!this._gl)throw new Error("Failed to initialize WebGL");this.painter=new u(this._gl,this.transform),this.painter.style=this._style}},{key:"setPaintProperty",value:function(t,e,n){var r=this,i=!(arguments.length>3&&void 0!==arguments[3])||arguments[3];return this._queuedConfigChanges.push(function(){return r._style.setPaintProperty(t,e,n)}),i?this._processConfigQueue(++this._configId):function(){return r._processConfigQueue(++r._configId)}}},{key:"setLayoutProperty",value:function(t,e,n){var r=this,i=!(arguments.length>3&&void 0!==arguments[3])||arguments[3];return this._queuedConfigChanges.push(function(){return r._style.setLayoutProperty(t,e,n)}),i?this._processConfigQueue(++this._configId):function(){return r._processConfigQueue(++r._configId)}}},{key:"setFilter",value:function(t,e){var n=this,r=!(arguments.length>2&&void 0!==arguments[2])||arguments[2];return this._queuedConfigChanges.push(function(){return n._style.setFilter(t,e)}),r?this._processConfigQueue(++this._configId):function(){return n._processConfigQueue(++n._configId)}}},{key:"_processConfigQueue",value:function(t){var e=this;return this._style.loadedPromise.then(function(){if(e._configId!==t)return!1;for(e._cancelAllPendingRenders();e._queuedConfigChanges.length;)e._queuedConfigChanges.shift()();return e._style.update(new y(16)),e.fire("configChanged"),!0})}},{key:"getLayersVisible",value:function(t,e){var n=this;return Object.keys(this._style._layers).filter(function(t){return"visible"===n._style.getLayoutProperty(t,"visibility")}).filter(function(r){var i,o=(i=n._style._layers[r])&&i._eventedParent.stylesheet.layers.find(function(t){return t.id===i.id});return(!t||o&&(void 0===o.minzoom_||t>=o.minzoom_)&&(void 0===o.maxzoom_||t<=o.maxzoom_))&&(!e||o&&o.source===e)})}},{key:"getLayerOriginalFilter",value:function(t){var e=this._initStyle.layers.find(function(e){return e.id===t});return e&&e.filter}},{key:"getLayerOriginalPaint",value:function(t){var e=this._initStyle.layers.find(function(e){return e.id===t});return e&&e.paint}},{key:"getLayerOriginalLayout",value:function(t){var e=this._initStyle.layers.find(function(e){return e.id===t});return e&&e.layout}},{key:"getVisibleSources",value:function(t){var e=this;return Object.keys(this._style.sourceCaches).filter(function(t){return e.getLayersVisible(e.painter._filterForZoom,t).length>0})}},{key:"filterForZoom",value:function(t){t!==this.painter._filterForZoom&&(this.painter._filterForZoom=t)}},{key:"_cancelAllPendingRenders",value:function(){var t=this;this._pendingRenders.forEach(function(e){return t._finishRender(e.tileSetID,e.renderId,"canceled")}),this._pendingRenders.clear(),Object.values(this._style.sourceCaches).forEach(function(t){return t.invalidateAllLoadedTiles()})}},{key:"_finishRender",value:function(t,e,n){var r=this._pendingRenders.get(t);if(r&&r.renderId===e){for(;r.consumers.length;)r.consumers.shift().next(n);this._pendingRenders.delete(t)}}},{key:"_canonicalizeSpec",value:function(t,e){var n=t.map(function(t){return t.left}).reduce(function(t,e){return Math.min(t,e)},1/0),r=t.map(function(t){return t.top}).reduce(function(t,e){return Math.min(t,e)},1/0);return{tilesSpec:t.map(function(t){return{source:t.source,z:t.z,x:t.x,y:t.y,top:t.top-r,left:t.left-n,size:t.size}}),drawSpec:{srcLeft:e.srcLeft-n,srcTop:e.srcTop-r,width:e.width,height:e.height,destLeft:e.destLeft,destTop:e.destTop}}}},{key:"_tileSpecToString",value:function(t){return t.map(function(t){return"".concat(t.source," ").concat(t.z," ").concat(t.x," ").concat(t.y," ").concat(t.left," ").concat(t.top," ").concat(t.size)}).sort().join(" ")}},{key:"releaseRender",value:function(t){var e=this._pendingRenders.get(t.tileSetID);if(t.tiles.forEach(function(t){return t.cache.releaseTile(t)}),e&&e.renderId===t.renderId){t.consumer.next("canceled");var n=e.consumers.indexOf(t.consumer);-1!==n&&e.consumers.splice(n,1),0===e.consumers.length&&this._finishRender(e.tileSetID,t.renderId,"fully-canceled")}}},{key:"renderTiles",value:function(t,e,n,r){var i=this,o=this._canonicalizeSpec(n,e);e=o.drawSpec,n=o.tilesSpec;var a=this._tileSpecToString(n),s={ctx:t,drawSpec:e,tilesSpec:n,next:r},u=this._pendingRenders.get(a);if(u)return u.tiles.forEach(function(t){return t.uses++}),u.consumers.push(s),{renderId:u.renderId,consumer:s,tiles:u.tiles,tileSetID:a};var l=++this._nextRenderId;u={tileSetID:a,renderId:l,tiles:n.map(function(t){var e=new h(t.z,0,t.z,t.x,t.y,0);return i._style.sourceCaches[t.source].acquireTile(e,t.size)}),consumers:[s]},this._pendingRenders.set(a,u);var c=[];return Promise.all(u.tiles.map(function(t,e){return t.loadedPromise.catch(function(t){return c.push(e)})})).catch(function(t){return i._finishRender(a,l,t)}).then(function(){if((u=i._pendingRenders.get(a))&&u.renderId===l){var t=c.length?"".concat(c.length," of ").concat(n.length," tiles not available"):null;if(n.length-c.length==0)return u.consumers.forEach(function(t){return t.ctx.clearRect(e.destLeft,e.destTop,e.width,e.height)}),void i._finishRender(a,l,"no available tiles");Object.values(i._style.sourceCaches).forEach(function(t){return t.currentlyRenderingTiles=[]}),n.forEach(function(t,e){if(!c.includes(e)){var n=u.tiles[e];n.tileSize=t.size,n.left=t.left,n.top=t.top,i._style.sourceCaches[t.source].currentlyRenderingTiles.push(n)}});for(var r=u.consumers.map(function(t){return t.drawSpec.srcLeft}).reduce(function(t,e){return Math.min(t,e)},1/0),o=u.consumers.map(function(t){return t.drawSpec.srcTop}).reduce(function(t,e){return Math.min(t,e)},1/0),s=u.consumers.map(function(t){return t.drawSpec.srcLeft+t.drawSpec.width}).reduce(function(t,e){return Math.max(t,e)},-1/0),f=u.consumers.map(function(t){return t.drawSpec.srcTop+t.drawSpec.height}).reduce(function(t,e){return Math.max(t,e)},-1/0),h=function(t){for(var e=function(e){var r=u.consumers.filter(function(n){return n.drawSpec.srcLeft+n.drawSpec.width>t&&n.drawSpec.srcLeft<t+g&&n.drawSpec.srcTop+n.drawSpec.height>e&&n.drawSpec.srcTop<e+g});if(0===r.length)return"continue";u.tiles.forEach(function(n){return n.tileID.posMatrix=i._calculatePosMatrix(n.left-t,n.top-e,n.tileSize)}),i._style.update(new y(n[0].z)),i.painter.render(i._style,{showTileBoundaries:!1,showOverdrawInspector:!1}),r.forEach(function(n){var r=0|Math.max(0,n.drawSpec.srcLeft-t),o=0|Math.min(g,n.drawSpec.srcLeft+n.drawSpec.width-t),a=0|Math.max(0,n.drawSpec.srcTop-e),s=0|Math.min(g,n.drawSpec.srcTop+n.drawSpec.height-e),u=n.drawSpec.destLeft+(n.drawSpec.srcLeft<t?t-n.drawSpec.srcLeft:0),l=n.drawSpec.destTop+(n.drawSpec.srcTop<e?e-n.drawSpec.srcTop:0),c=o-r,f=s-a;n.ctx.drawImage(i._canvas,r,a,c,f,u,l,c,f)})},r=o;r<f;r+=g)e(r)},p=r;p<s;p+=g)h(p);for(;u.consumers.length;)u.consumers.shift().next(t);i._pendingRenders.delete(a),Object.values(i._style.sourceCaches).forEach(function(t){return t.currentlyRenderingTiles=[]})}}),{renderId:u.renderId,consumer:s,tiles:u.tiles,tileSetID:a}}},{key:"queryRenderedFeatures",value:function(t){var e=this;m(t.source);var n={};this.getLayersVisible(t.renderedZoom,t.source).forEach(function(t){return n[t]=e._style._layers[t]});var r=d.rendered(this._style.sourceCaches[t.source],n,t,{},t.tileZ,0),i={};return Object.keys(r).forEach(function(t){return r[t].map(function(t){(i[t.layer["source-layer"]]=i[t.layer["source-layer"]]||[]).push(t._vectorTileFeature.properties)})}),i}},{key:"showCanvasForDebug",value:function(){document.body.appendChild(this._canvas),this._canvas.style.position="fixed",this._canvas.style.bottom="0px",this._canvas.style.right="0px",this._canvas.style.background="#ccc",this._canvas.style.opacity="0.7",this._canvas.style.transform="scale(0.5) translate(502px,502px)"}},{key:"destroyDebugCanvas",value:function(){renderer._canvas.parentElement&&document.body.removeChild(this._canvas)}}])&&i(b.prototype,x),_&&i(b,_),e}();t.exports=b},function(t,e,n){function r(t){return(r="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t})(t)}function i(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,r.key,r)}}function o(t,e){return!e||"object"!==r(e)&&"function"!=typeof e?function(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}(t):e}function a(t,e,n){return(a="undefined"!=typeof Reflect&&Reflect.get?Reflect.get:function(t,e,n){var r=function(t,e){for(;!Object.prototype.hasOwnProperty.call(t,e)&&null!==(t=s(t)););return t}(t,e);if(r){var i=Object.getOwnPropertyDescriptor(r,e);return i.get?i.get.call(n):i.value}})(t,e,n||t)}function s(t){return(s=Object.setPrototypeOf?Object.getPrototypeOf:function(t){return t.__proto__||Object.getPrototypeOf(t)})(t)}function u(t,e){return(u=Object.setPrototypeOf||function(t,e){return t.__proto__=e,t})(t,e)}var l=n(124),c=function(t){function e(t,n){var r;return function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,e),(r=o(this,s(e).call(this,t,n)))._filterForZoom=15,r}var n,r,c;return function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),e&&u(t,e)}(e,l),n=e,(r=[{key:"resize",value:function(t,e){var n=this.context.gl;this.width=t,this.height=e,n.viewport(0,0,this.width,this.height)}},{key:"renderLayer",value:function(t,n,r,i){var o=function(t){return t&&t._eventedParent.stylesheet.layers.find(function(e){return e.id===t.id})}(r);o&&o.minzoom_&&i[0].overscaledZ<o.minzoom_||o&&o.maxzoom_&&i[0].overscaledZ>=o.maxzoom_||a(s(e.prototype),"renderLayer",this).call(this,t,n,r,i)}}])&&i(n.prototype,r),c&&i(n,c),e}();t.exports=c},function(t,e,n){function r(t){return(r="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t})(t)}function i(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,r.key,r)}}function o(t,e){return!e||"object"!==r(e)&&"function"!=typeof e?function(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}(t):e}function a(t){return(a=Object.setPrototypeOf?Object.getPrototypeOf:function(t){return t.__proto__||Object.getPrototypeOf(t)})(t)}function s(t,e){return(s=Object.setPrototypeOf||function(t,e){return t.__proto__=e,t})(t,e)}var u=n(53),l=n(45),c=n(69),f=n(303),h=function(t){function e(t,n,r){var i;return function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,e),(i=o(this,a(e).call(this,n,r))).loadedPromise=new Promise(function(t){return i.on("data",function(e){return"style"===e.dataType&&t()})}),i.loadedPromise.then(function(){return i.placement=new c(n.transform,0)}),i.loadJSON(t),i}var n,r,h;return function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),e&&s(t,e)}(e,u),n=e,(r=[{key:"addSource",value:function(t,e,n){var r=l.create(t,e,this.dispatcher,this);r.setEventedParent(this,{source:r}),r.map=this.map,r.tiles=e.tiles,r.load(),this.loadedPromise.then(function(){return new Promise(function(t){return r.on("data",function(e){return"source"===e.dataType&&t()})})}),this.sourceCaches[t]=new f(r)}},{key:"setLayers",value:function(t){var e=this;return Object.keys(this._layers).map(function(n){return e.setLayoutProperty(n,"visibility",t.includes(n)?"visible":"none")})}}])&&i(n.prototype,r),h&&i(n,h),e}();t.exports=h},function(t,e,n){function r(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,r.key,r)}}function i(t,e,n){return e in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}var o=n(121),a=n(1),s=n(118),u=n(304),l=n(6),c=new(n(305)),f=20,h=function(){function t(e){var n=this;!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,t),i(this,"_tilesInUse",{}),i(this,"map",{}),this._source=e,this._tileCache=new o(f,function(t){return n._source.unloadTile(t)})}var e,n,h;return e=t,(n=[{key:"getSource",value:function(){return this._source}},{key:"getVisibleCoordinates",value:function(){return this.currentlyRenderingTiles.map(function(t){return t.tileID})}},{key:"getRenderableIds",value:function(){return this.getVisibleCoordinates()}},{key:"acquireTile",value:function(t,e){var n=this,r=this._tilesInUse[t.key]||this._tileCache.getAndRemove(t.key)||new s(t.wrapped(),e,t.canonical.z);return r.uses++,this._tilesInUse[t.key]=r,r.cache=this,r.loadedPromise?r:(r.loadedPromise=new Promise(function(t,e){var i=setTimeout(function(){n._source.abortTile(r),r.loadedPromise=null,e("timeout")},6e4);n._source.loadTile(r,function(n){clearTimeout(i),n?(r._isDud=!0,e(n)):t()})}),r)}},{key:"getTileByID",value:function(t){return this.getTile(t)}},{key:"getTile",value:function(t){return this._tilesInUse[t.key]}},{key:"serialize",value:function(){return this._source.serialize()}},{key:"prepare",value:function(t){this.currentlyRenderingTiles.forEach(function(e){return e.upload(t)})}},{key:"releaseTile",value:function(t){a(t.uses>0),--t.uses>0||(delete this._tilesInUse[t.tileID.key],t.hasData()||this._isDud?this._tileCache.add(t.tileID.key,t):(this._source.abortTile(t),this._source.unloadTile(t)))}},{key:"invalidateAllLoadedTiles",value:function(){var t=this;Object.values(this._tilesInUse).forEach(function(t){return!t._isDud&&(t.loadedPromise=null)}),this._tileCache.keys().forEach(function(e){var n=t._tileCache.get(e);!n._isDud&&(n.loadedPromise=null)})}},{key:"tilesIn",value:function(t){var e=c.px([t.lng,t.lat],t.tileZ,!1).map(function(t){return t/256}),n=0|e[0],r=0|e[1],i=e.map(function(t){return(t-(0|t))*l}),o=i[0],a=i[1];return Object.values(this._tilesInUse).filter(function(t){return t.hasData()}).map(function(t){return{tile:t,tileID:t.tileID,queryGeometry:[[u.convert([o+l*(n-t.tileID.canonical.x),a+l*(r-t.tileID.canonical.y)])]],scale:1}})}},{key:"reload",value:function(){}},{key:"pause",value:function(){}},{key:"resume",value:function(){}}])&&r(e.prototype,n),h&&r(e,h),t}();t.exports=h},function(t,e,n){"use strict";function r(t,e){this.x=t,this.y=e}t.exports=r,r.prototype={clone:function(){return new r(this.x,this.y)},add:function(t){return this.clone()._add(t)},sub:function(t){return this.clone()._sub(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)},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,n=t.y-this.y;return e*e+n*n},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,n=t[2]*this.x+t[3]*this.y;return this.x=e,this.y=n,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},_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),n=Math.sin(t),r=e*this.x-n*this.y,i=n*this.x+e*this.y;return this.x=r,this.y=i,this},_round:function(){return this.x=Math.round(this.x),this.y=Math.round(this.y),this}},r.convert=function(t){return t instanceof r?t:Array.isArray(t)?new r(t[0],t[1]):t}},function(t,e,n){var r=function(){var t={},e=Math.PI/180,n=180/Math.PI,r=6378137,i=20037508.342789244;function o(e){if(e=e||{},this.size=e.size||256,!t[this.size]){var n=this.size,r=t[this.size]={};r.Bc=[],r.Cc=[],r.zc=[],r.Ac=[];for(var i=0;i<30;i++)r.Bc.push(n/360),r.Cc.push(n/(2*Math.PI)),r.zc.push(n/2),r.Ac.push(n),n*=2}this.Bc=t[this.size].Bc,this.Cc=t[this.size].Cc,this.zc=t[this.size].zc,this.Ac=t[this.size].Ac}return o.prototype.px=function(t,n,r){void 0===r&&(r=!0);var i=this.zc[n],o=Math.min(Math.max(Math.sin(e*t[1]),-.9999),.9999),a=i+t[0]*this.Bc[n],s=i+.5*Math.log((1+o)/(1-o))*-this.Cc[n];return r&&(a=Math.round(a),s=Math.round(s)),a>this.Ac[n]&&(a=this.Ac[n]),s>this.Ac[n]&&(s=this.Ac[n]),[a,s]},o.prototype.ll=function(t,e){var r=(t[1]-this.zc[e])/-this.Cc[e];return[(t[0]-this.zc[e])/this.Bc[e],n*(2*Math.atan(Math.exp(r))-.5*Math.PI)]},o.prototype.bbox=function(t,e,n,r,i){r&&(e=Math.pow(2,n)-1-e);var o=[t*this.size,(+e+1)*this.size],a=[(+t+1)*this.size,e*this.size],s=this.ll(o,n).concat(this.ll(a,n));return"900913"===i?this.convert(s,"900913"):s},o.prototype.xyz=function(t,e,n,r){"900913"===r&&(t=this.convert(t,"WGS84"));var i=[t[0],t[1]],o=[t[2],t[3]],a=this.px(i,e),s=this.px(o,e),u=[Math.floor(a[0]/this.size),Math.floor((s[0]-1)/this.size)],l=[Math.floor(s[1]/this.size),Math.floor((a[1]-1)/this.size)],c={minX:Math.min.apply(Math,u)<0?0:Math.min.apply(Math,u),minY:Math.min.apply(Math,l)<0?0:Math.min.apply(Math,l),maxX:Math.max.apply(Math,u),maxY:Math.max.apply(Math,l)};if(n){var f={minY:Math.pow(2,e)-1-c.maxY,maxY:Math.pow(2,e)-1-c.minY};c.minY=f.minY,c.maxY=f.maxY}return c},o.prototype.convert=function(t,e){return"900913"===e?this.forward(t.slice(0,2)).concat(this.forward(t.slice(2,4))):this.inverse(t.slice(0,2)).concat(this.inverse(t.slice(2,4)))},o.prototype.forward=function(t){var n=[r*t[0]*e,r*Math.log(Math.tan(.25*Math.PI+.5*t[1]*e))];return n[0]>i&&(n[0]=i),n[0]<-i&&(n[0]=-i),n[1]>i&&(n[1]=i),n[1]<-i&&(n[1]=-i),n},o.prototype.inverse=function(t){return[t[0]*n/r,(.5*Math.PI-2*Math.atan(Math.exp(-t[1]/r)))*n]},o}();t.exports=r},function(t,e){function n(t){return(n="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t})(t)}t.exports=function(t){"object"===n(t)&&Array.isArray(t.layers)&&(t.layers.forEach(function(t){"number"==typeof t.minzoom&&(t.minzoom_=t.minzoom,delete t.minzoom),"number"==typeof t.maxzoom&&(t.maxzoom_=t.maxzoom,delete t.maxzoom)}),t.layers=t.layers.filter(function(t){return"raster"!==t.type&&"background"!==t.type}))}},function(t,e,n){"use strict";function r(t){return!!("undefined"!=typeof window&&"undefined"!=typeof document&&Array.prototype&&Array.prototype.every&&Array.prototype.filter&&Array.prototype.forEach&&Array.prototype.indexOf&&Array.prototype.lastIndexOf&&Array.prototype.map&&Array.prototype.some&&Array.prototype.reduce&&Array.prototype.reduceRight&&Array.isArray&&Function.prototype&&Function.prototype.bind&&Object.keys&&Object.create&&Object.getPrototypeOf&&Object.getOwnPropertyNames&&Object.isSealed&&Object.isFrozen&&Object.isExtensible&&Object.getOwnPropertyDescriptor&&Object.defineProperty&&Object.defineProperties&&Object.seal&&Object.freeze&&Object.preventExtensions&&"JSON"in window&&"parse"in JSON&&"stringify"in JSON&&"Worker"in window&&"Uint8ClampedArray"in window&&function(t){void 0===i[t]&&(i[t]=function(t){var e=document.createElement("canvas"),n=Object.create(r.webGLContextAttributes);return n.failIfMajorPerformanceCaveat=t,e.probablySupportsContext?e.probablySupportsContext("webgl",n)||e.probablySupportsContext("experimental-webgl",n):e.supportsContext?e.supportsContext("webgl",n)||e.supportsContext("experimental-webgl",n):e.getContext("webgl",n)||e.getContext("experimental-webgl",n)}(t));return i[t]}(t&&t.failIfMajorPerformanceCaveat))}t.exports?t.exports=r:window&&(window.mapboxgl=window.mapboxgl||{},window.mapboxgl.supported=r);var i={};r.webGLContextAttributes={antialias:!1,alpha:!0,stencil:!0,depth:!0}}]);
 |