diff --git a/build/build/app.c7d68e2094c238bbc5c2.js b/build/build/app.c7d68e2094c238bbc5c2.js new file mode 100644 index 0000000..ecb5471 --- /dev/null +++ b/build/build/app.c7d68e2094c238bbc5c2.js @@ -0,0 +1,49 @@ +!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=295)}([function(t,e,n){"use strict";t.exports=n(305)},function(t,e,n){t.exports=n(319)()},function(module,exports,__webpack_require__){"use strict";var evalAllowed=!1;try{eval("evalAllowed = true")}catch(t){}var platformSupported=!!Object.setPrototypeOf&&evalAllowed;module.exports=__webpack_require__(316)},function(t,e,n){"use strict";n.d(e,"b",function(){return a}),n.d(e,"c",function(){return s}),n.d(e,"d",function(){return l}),n.d(e,"e",function(){return c}),n.d(e,"f",function(){return u}),n.d(e,"g",function(){return p}),n.d(e,"h",function(){return A}),n.d(e,"i",function(){return h}),n.d(e,"j",function(){return f}),n.d(e,"k",function(){return d}),n.d(e,"l",function(){return _}),n.d(e,"m",function(){return g}),n.d(e,"n",function(){return y}),n.d(e,"o",function(){return m}),n.d(e,"p",function(){return v}),n.d(e,"q",function(){return b}),n.d(e,"r",function(){return w}),n.d(e,"s",function(){return E}),n.d(e,"t",function(){return C}),n.d(e,"u",function(){return B}),n.d(e,"v",function(){return O}),n.d(e,"w",function(){return k}),n.d(e,"x",function(){return P}),n.d(e,"y",function(){return I}),n.d(e,"z",function(){return T}),n.d(e,"A",function(){return D}),n.d(e,"B",function(){return L}),n.d(e,"C",function(){return S}),n.d(e,"D",function(){return z}),n.d(e,"E",function(){return R}),n.d(e,"F",function(){return j}),n.d(e,"H",function(){return U}),n.d(e,"I",function(){return F}),n.d(e,"J",function(){return Q}),n.d(e,"G",function(){return K}),n.d(e,"a",function(){return W});var r=n(14),i=n(92),o=n(37);function a(t){for(var e=f(),n=0,r=t.length;ni&&(c|=o.a.RIGHT),la&&(c|=o.a.ABOVE),c===o.a.UNKNOWN&&(c=o.a.INTERSECTING),c}function f(){return[1/0,1/0,-1/0,-1/0]}function d(t,e,n,r,i){return i?(i[0]=t,i[1]=e,i[2]=n,i[3]=r,i):[t,e,n,r]}function _(t){return d(1/0,1/0,-1/0,-1/0,t)}function g(t,e){var n=t[0],r=t[1];return d(n,r,n,r,e)}function y(t,e){return x(_(e),t)}function m(t,e,n,r,i){return E(_(i),t,e,n,r)}function v(t,e){return t[0]==e[0]&&t[2]==e[2]&&t[1]==e[1]&&t[3]==e[3]}function b(t,e){return e[0]t[2]&&(t[2]=e[2]),e[1]t[3]&&(t[3]=e[3]),t}function w(t,e){e[0]t[2]&&(t[2]=e[0]),e[1]t[3]&&(t[3]=e[1])}function x(t,e){for(var n=0,r=e.length;ne[0]?r[0]=t[0]:r[0]=e[0],t[1]>e[1]?r[1]=t[1]:r[1]=e[1],t[2]=e[0]&&t[1]<=e[3]&&t[3]>=e[1]}function U(t){return t[2]=c&&s<=p),r||!(a&o.a.RIGHT)||i&o.a.RIGHT||(r=(l=g-(_-p)*y)>=u&&l<=A),r||!(a&o.a.BELOW)||i&o.a.BELOW||(r=(s=_-(g-u)/y)>=c&&s<=p),r||!(a&o.a.LEFT)||i&o.a.LEFT||(r=(l=g-(_-c)*y)>=u&&l<=A)}return r}function W(t,e,n){var r=[t[0],t[1],t[0],t[3],t[2],t[1],t[2],t[3]];return e(r,r,2),function(t,e,n){return d(Math.min.apply(null,t),Math.min.apply(null,e),Math.max.apply(null,t),Math.max.apply(null,e),n)}([r[0],r[2],r[4],r[6]],[r[1],r[3],r[5],r[7]],n)}},function(t,e,n){"use strict";n.d(e,"a",function(){return l}),n.d(e,"b",function(){return c}),n.d(e,"c",function(){return u}),n.d(e,"e",function(){return p}),n.d(e,"d",function(){return A});var r=n(13);function i(t,e,n,r){for(var i,o=0,a=t.length;o1?(n=i,r=o):c>0&&(n+=s*c,r+=l*c)}return a(t,e,n,r)}function a(t,e,n,r){var i=n-t,o=r-e;return i*i+o*o}function s(t){for(var e=t.length,n=0;ni&&(i=a,r=o)}if(0===i)return null;var s=t[r];t[r]=t[n],t[n]=s;for(var l=n+1;l=0;A--){p[A]=t[A][e]/t[A][A];for(var h=A-1;h>=0;h--)t[h][e]-=t[h][A]*p[A]}return p}function l(t){return 180*t/Math.PI}function c(t){return t*Math.PI/180}function u(t,e){var n=t%e;return n*e<0?n+e:n}function p(t,e,n){return t+n*(e-t)}},function(t,e,n){"use strict";n.d(e,"c",function(){return o}),n.d(e,"e",function(){return a}),n.d(e,"g",function(){return c}),n.d(e,"a",function(){return u}),n.d(e,"f",function(){return p}),n.d(e,"h",function(){return A}),n.d(e,"b",function(){return h}),n.d(e,"d",function(){return f});var r=n(14),i=new Array(6);function o(){return[1,0,0,1,0,0]}function a(t){return l(t,1,0,0,1,0,0)}function s(t,e){var n=t[0],r=t[1],i=t[2],o=t[3],a=t[4],s=t[5],l=e[0],c=e[1],u=e[2],p=e[3],A=e[4],h=e[5];return t[0]=n*l+i*c,t[1]=r*l+o*c,t[2]=n*u+i*p,t[3]=r*u+o*p,t[4]=n*A+i*h+a,t[5]=r*A+o*h+s,t}function l(t,e,n,r,i,o,a){return t[0]=e,t[1]=n,t[2]=r,t[3]=i,t[4]=o,t[5]=a,t}function c(t,e){return t[0]=e[0],t[1]=e[1],t[2]=e[2],t[3]=e[3],t[4]=e[4],t[5]=e[5],t}function u(t,e){var n=e[0],r=e[1];return e[0]=t[0]*n+t[2]*r+t[4],e[1]=t[1]*n+t[3]*r+t[5],e}function p(t,e,n){return s(t,l(i,e,0,0,n,0,0))}function A(t,e,n){return s(t,l(i,1,0,0,1,e,n))}function h(t,e,n,r,i,o,a,s){var l=Math.sin(o),c=Math.cos(o);return t[0]=r*c,t[1]=i*l,t[2]=-r*l,t[3]=i*c,t[4]=a*r*c-s*r*l+e,t[5]=a*i*l+s*i*c+n,t}function f(t){var e=function(t){return t[0]*t[3]-t[1]*t[2]}(t);Object(r.a)(0!==e,32);var n=t[0],i=t[1],o=t[2],a=t[3],s=t[4],l=t[5];return t[0]=a/e,t[1]=-i/e,t[2]=-o/e,t[3]=n/e,t[4]=(o*l-a*s)/e,t[5]=-(n*l-i*s)/e,t}},function(t,e,n){"use strict";function r(){return!0}function i(){return!1}function o(){}n.d(e,"b",function(){return r}),n.d(e,"a",function(){return i}),n.d(e,"c",function(){return o})},function(t,e,n){"use strict";n.d(e,"a",function(){return r}),n.d(e,"b",function(){return i}),n.d(e,"c",function(){return o}),n.d(e,"d",function(){return a});var r="function"==typeof Object.assign?Object.assign:function(t,e){var n=arguments;if(void 0===t||null===t)throw new TypeError("Cannot convert undefined or null to object");for(var r=Object(t),i=1,o=arguments.length;i>1)],e))<0?s=r+1:(l=r,c=!o);return c?s:~s}function i(t,e){return t>e?1:t=0}function a(t,e,n){var r,i=t.length;if(t[0]<=e)return 0;if(e<=t[i-1])return i-1;if(n>0){for(r=1;r-1;return r&&t.splice(n,1),r}function u(t,e){var n=t.length;if(n!==e.length)return!1;for(var r=0;r0||n&&0===o)})}n.d(e,"a",function(){return r}),n.d(e,"g",function(){return i}),n.d(e,"d",function(){return o}),n.d(e,"f",function(){return a}),n.d(e,"i",function(){return s}),n.d(e,"c",function(){return l}),n.d(e,"h",function(){return c}),n.d(e,"b",function(){return u}),n.d(e,"j",function(){return p}),n.d(e,"e",function(){return A})},function(module,__webpack_exports__,__webpack_require__){"use strict";(function(module){var react__WEBPACK_IMPORTED_MODULE_0__=__webpack_require__(0),react__WEBPACK_IMPORTED_MODULE_0___default=__webpack_require__.n(react__WEBPACK_IMPORTED_MODULE_0__),prop_types__WEBPACK_IMPORTED_MODULE_1__=__webpack_require__(1),prop_types__WEBPACK_IMPORTED_MODULE_1___default=__webpack_require__.n(prop_types__WEBPACK_IMPORTED_MODULE_1__),classnames__WEBPACK_IMPORTED_MODULE_2__=__webpack_require__(48),classnames__WEBPACK_IMPORTED_MODULE_2___default=__webpack_require__.n(classnames__WEBPACK_IMPORTED_MODULE_2__),_fields_DocLabel__WEBPACK_IMPORTED_MODULE_3__=__webpack_require__(49);function _typeof(t){return(_typeof="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 _classCallCheck(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function _defineProperties(t,e){for(var n=0;n`."},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.051129,180,85.051129],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."},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."},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://`."},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.051129,180,85.051129],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 RGB-encoded raster DEM source"}},doc:"The type of the source."},url:{type:"string",doc:"A URL to a TileJSON resource. Supported protocols are `http:`, `https:`, and `mapbox://`."},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.051129,180,85.051129],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."},encoding:{type:"enum",values:{terrarium:{doc:"Terrarium format PNG tiles. See https://aws.amazon.com/es/public-datasets/terrain/ for more info."},mapbox:{doc:"Mapbox Terrain RGB tiles. See https://www.mapbox.com/help/access-elevation-data/#mapbox-terrain-rgb for more info."}},default:"mapbox",doc:"The encoding used by this source. Mapbox Terrain RGB is used by default"},"*":{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)."},attribution:{type:"string",doc:"Contains an attribution to be displayed when the map is shown to a user."},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. Cluster groups become new `Point` features in the source with additional properties:\n * `cluster` Is `true` if the point is a cluster \n * `cluster_id` A unqiue id for the cluster to be used in conjunction with the [cluster inspection methods](https://www.mapbox.com/mapbox-gl-js/api/#geojsonsource#getclusterexpansionzoom)\n * `point_count` Number of original points grouped into this cluster\n * `point_count_abbreviated` An abbreviated point count"},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)."},lineMetrics:{type:"boolean",default:!1,doc:"Whether to calculate line distance metrics. This is required for line layers that specify `line-gradient` values."},generateId:{type:"boolean",default:!1,doc:"Whether to generate ids for the geojson features. When enabled, the `feature.id` property will be auto assigned based on its index in the `features` array, over-writing any previous values."}},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."}}},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",android:"6.0.0",ios:"4.0.0",macos:"0.7.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 and Mapzen Terrarium tiles.","sdk-support":{"basic functionality":{js:"0.43.0",android:"6.0.0",ios:"4.0.0",macos:"0.7.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 for the layer. At zoom levels less than the minzoom, the layer will be hidden."},maxzoom:{type:"number",minimum:0,maximum:24,doc:"The maximum zoom level for the layer. At zoom levels equal to or greater than the maxzoom, the layer will be hidden."},filter:{type:"filter",doc:"A expression specifying conditions on source features. Only features that match the filter are displayed. The `feature-state` expression is not supported in filter expressions."},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"}},"property-type":"constant"}},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"}},"property-type":"constant"}},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"}},"property-type":"constant"}},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",android:"6.0.0",ios:"4.0.0",macos:"0.7.0"}},"property-type":"constant"}},layout_line:{"line-cap":{type:"enum",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":{}},expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"line-join":{type:"enum",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"}},expression:{interpolated:!1,parameters:["zoom","feature"]},"property-type":"data-driven"},"line-miter-limit":{type:"number",default:2,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":{}},expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"line-round-limit":{type:"number",default:1.05,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":{}},expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},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":{}},"property-type":"constant"}},layout_symbol:{"symbol-placement":{type:"enum",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."},"line-center":{doc:"The label is placed at the center of the line of the geometry. Can only be used on `LineString` and `Polygon` geometries. Note that a single feature in a vector tile may contain multiple line 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"},"`line-center` value":{js:"0.47.0",android:"6.4.0",ios:"4.3.0",macos:"0.10.0"},"data-driven styling":{}},expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"symbol-spacing":{type:"number",default:250,minimum:1,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":{}},expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"symbol-avoid-edges":{type:"boolean",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":{}},expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"symbol-z-order":{type:"enum",values:{"viewport-y":{doc:"Symbols will be sorted by their y-position relative to the viewport."},source:{doc:"Symbols will be rendered in the same order as the source data with no sorting applied."}},default:"viewport-y",doc:"Controls the order in which overlapping symbols in the same layer are rendered","sdk-support":{"basic functionality":{js:"0.49.0"},"data-driven styling":{}},expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"icon-allow-overlap":{type:"boolean",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":{}},expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"icon-ignore-placement":{type:"boolean",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":{}},expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"icon-optional":{type:"boolean",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":{}},expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"icon-rotation-alignment":{type:"enum",values:{map:{doc:"When `symbol-placement` is set to `point`, aligns icons east-west. When `symbol-placement` is set to `line` or `line-center`, 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` or `line-center`, 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":{}},expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"icon-size":{type:"number",default:1,minimum: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"}},expression:{interpolated:!0,parameters:["zoom","feature"]},"property-type":"data-driven"},"icon-text-fit":{type:"enum",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":{}},expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"icon-text-fit-padding":{type:"array",value:"number",length:4,default:[0,0,0,0],units:"pixels",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":{}},expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"icon-image":{type:"string",doc:"Name of image in sprite to use for drawing an image background.",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"}},expression:{interpolated:!1,parameters:["zoom","feature"]},"property-type":"data-driven"},"icon-rotate":{type:"number",default:0,period:360,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"}},expression:{interpolated:!0,parameters:["zoom","feature"]},"property-type":"data-driven"},"icon-padding":{type:"number",default:2,minimum: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":{}},expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"icon-keep-upright":{type:"boolean",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","line-center"]}],"sdk-support":{"basic functionality":{js:"0.10.0",android:"2.0.1",ios:"2.0.0",macos:"0.1.0"},"data-driven styling":{}},expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"icon-offset":{type:"array",value:"number",length:2,default:[0,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"}},expression:{interpolated:!0,parameters:["zoom","feature"]},"property-type":"data-driven"},"icon-anchor":{type:"enum",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"}},expression:{interpolated:!1,parameters:["zoom","feature"]},"property-type":"data-driven"},"icon-pitch-alignment":{type:"enum",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":{}},expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"text-pitch-alignment":{type:"enum",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":{}},expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"text-rotation-alignment":{type:"enum",values:{map:{doc:"When `symbol-placement` is set to `point`, aligns text east-west. When `symbol-placement` is set to `line` or `line-center`, 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` or `line-center`, 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":{}},expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"text-field":{type:"formatted",default:"",tokens:!0,doc:"Value to use for a text label. If a plain `string` is provided, it will be treated as a `formatted` with default/inherited formatting options.","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"}},expression:{interpolated:!1,parameters:["zoom","feature"]},"property-type":"data-driven"},"text-font":{type:"array",value:"string",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":{js:"0.43.0",android:"6.0.0",ios:"4.0.0",macos:"0.7.0"}},expression:{interpolated:!1,parameters:["zoom","feature"]},"property-type":"data-driven"},"text-size":{type:"number",default:16,minimum:0,units:"pixels",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"}},expression:{interpolated:!0,parameters:["zoom","feature"]},"property-type":"data-driven"},"text-max-width":{type:"number",default:10,minimum:0,units:"ems",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"}},expression:{interpolated:!0,parameters:["zoom","feature"]},"property-type":"data-driven"},"text-line-height":{type:"number",default:1.2,units:"ems",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":{}},expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"text-letter-spacing":{type:"number",default:0,units:"ems",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"}},expression:{interpolated:!0,parameters:["zoom","feature"]},"property-type":"data-driven"},"text-justify":{type:"enum",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"}},expression:{interpolated:!1,parameters:["zoom","feature"]},"property-type":"data-driven"},"text-anchor":{type:"enum",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"}},expression:{interpolated:!1,parameters:["zoom","feature"]},"property-type":"data-driven"},"text-max-angle":{type:"number",default:45,units:"degrees",doc:"Maximum angle change between adjacent characters.",requires:["text-field",{"symbol-placement":["line","line-center"]}],"sdk-support":{"basic functionality":{js:"0.10.0",android:"2.0.1",ios:"2.0.0",macos:"0.1.0"},"data-driven styling":{}},expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"text-rotate":{type:"number",default:0,period:360,units:"degrees",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"}},expression:{interpolated:!0,parameters:["zoom","feature"]},"property-type":"data-driven"},"text-padding":{type:"number",default:2,minimum:0,units:"pixels",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":{}},expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"text-keep-upright":{type:"boolean",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","line-center"]}],"sdk-support":{"basic functionality":{js:"0.10.0",android:"2.0.1",ios:"2.0.0",macos:"0.1.0"},"data-driven styling":{}},expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"text-transform":{type:"enum",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"}},expression:{interpolated:!1,parameters:["zoom","feature"]},"property-type":"data-driven"},"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",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"}},expression:{interpolated:!0,parameters:["zoom","feature"]},"property-type":"data-driven"},"text-allow-overlap":{type:"boolean",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":{}},expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"text-ignore-placement":{type:"boolean",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":{}},expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"text-optional":{type:"boolean",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":{}},expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},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":{}},"property-type":"constant"}},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":{}},"property-type":"constant"}},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",android:"6.0.0",ios:"4.0.0",macos:"0.7.0"},"data-driven styling":{}},"property-type":"constant"}},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_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","sdk-support":{"basic functionality":{js:"0.41.0",android:"6.0.0",ios:"4.0.0",macos:"0.7.0"}}},var:{doc:'References variable bound using "let".',group:"Variable binding","sdk-support":{"basic functionality":{js:"0.41.0",android:"6.0.0",ios:"4.0.0",macos:"0.7.0"}}},literal:{doc:"Provides a literal array or object value.",group:"Types","sdk-support":{"basic functionality":{js:"0.41.0",android:"6.0.0",ios:"4.0.0",macos:"0.7.0"}}},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","sdk-support":{"basic functionality":{js:"0.41.0",android:"6.0.0",ios:"4.0.0",macos:"0.7.0"}}},at:{doc:"Retrieves an item from an array.",group:"Lookup","sdk-support":{"basic functionality":{js:"0.41.0",android:"6.0.0",ios:"4.0.0",macos:"0.7.0"}}},case:{doc:"Selects the first output whose corresponding test condition evaluates to true.",group:"Decision","sdk-support":{"basic functionality":{js:"0.41.0",android:"6.0.0",ios:"4.0.0",macos:"0.7.0"}}},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 expression (e.g. `["get", "building_type"]`). Each label must either be a single literal value or an array of literal values (e.g. `"a"` or `["c", "b"]`), and those values must be all strings or all numbers. (The values `"1"` and `1` cannot both be labels in the same match expression.) If the input type does not match the type of the labels, the result will be the fallback value.',group:"Decision","sdk-support":{"basic functionality":{js:"0.41.0",android:"6.0.0",ios:"4.0.0",macos:"0.7.0"}}},coalesce:{doc:"Evaluates each expression in turn until the first non-null value is obtained, and returns that value.",group:"Decision","sdk-support":{"basic functionality":{js:"0.41.0",android:"6.0.0",ios:"4.0.0",macos:"0.7.0"}}},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","sdk-support":{"basic functionality":{js:"0.42.0",android:"6.0.0",ios:"4.0.0",macos:"0.7.0"}}},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`, 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","sdk-support":{"basic functionality":{js:"0.42.0",android:"6.0.0",ios:"4.0.0",macos:"0.7.0"}}},"interpolate-hcl":{doc:'Produces continuous, smooth results by interpolating between pairs of input and output values ("stops"). Works like `interpolate`, but the output type must be `color`, and the interpolation is performed in the Hue-Chroma-Luminance color space.',group:"Ramps, scales, curves","sdk-support":{"basic functionality":{js:"0.49.0"}}},"interpolate-lab":{doc:'Produces continuous, smooth results by interpolating between pairs of input and output values ("stops"). Works like `interpolate`, but the output type must be `color`, and the interpolation is performed in the CIELAB color space.',group:"Ramps, scales, curves","sdk-support":{"basic functionality":{js:"0.49.0"}}},ln2:{doc:"Returns mathematical constant ln(2).",group:"Math","sdk-support":{"basic functionality":{js:"0.41.0",android:"6.0.0",ios:"4.0.0",macos:"0.7.0"}}},pi:{doc:"Returns the mathematical constant pi.",group:"Math","sdk-support":{"basic functionality":{js:"0.41.0",android:"6.0.0",ios:"4.0.0",macos:"0.7.0"}}},e:{doc:"Returns the mathematical constant e.",group:"Math","sdk-support":{"basic functionality":{js:"0.41.0",android:"6.0.0",ios:"4.0.0",macos:"0.7.0"}}},typeof:{doc:"Returns a string describing the type of the given value.",group:"Types","sdk-support":{"basic functionality":{js:"0.41.0",android:"6.0.0",ios:"4.0.0",macos:"0.7.0"}}},string:{doc:"Asserts that the input value is a string. If multiple values are provided, each one is evaluated in order until a string is obtained. If none of the inputs are strings, the expression is an error.",group:"Types","sdk-support":{"basic functionality":{js:"0.41.0",android:"6.0.0",ios:"4.0.0",macos:"0.7.0"}}},number:{doc:"Asserts that the input value is a number. If multiple values are provided, each one is evaluated in order until a number is obtained. If none of the inputs are numbers, the expression is an error.",group:"Types","sdk-support":{"basic functionality":{js:"0.41.0",android:"6.0.0",ios:"4.0.0",macos:"0.7.0"}}},boolean:{doc:"Asserts that the input value is a boolean. If multiple values are provided, each one is evaluated in order until a boolean is obtained. If none of the inputs are booleans, the expression is an error.",group:"Types","sdk-support":{"basic functionality":{js:"0.41.0",android:"6.0.0",ios:"4.0.0",macos:"0.7.0"}}},object:{doc:"Asserts that the input value is an object. If multiple values are provided, each one is evaluated in order until an object is obtained. If none of the inputs are objects, the expression is an error.",group:"Types","sdk-support":{"basic functionality":{js:"0.41.0",android:"6.0.0",ios:"4.0.0",macos:"0.7.0"}}},collator:{doc:"Returns a `collator` for use in locale-dependent comparison operations. The `case-sensitive` and `diacritic-sensitive` options default to `false`. The `locale` argument specifies the IETF language tag of the locale to use. If none is provided, the default locale is used. If the requested locale is not available, the `collator` will use a system-defined fallback locale. Use `resolved-locale` to test the results of locale fallback behavior.",group:"Types","sdk-support":{"basic functionality":{js:"0.45.0",android:"6.5.0",ios:"4.2.0",macos:"0.9.0"}}},format:{doc:"Returns `formatted` text containing annotations for use in mixed-format `text-field` entries. If set, the `text-font` argument overrides the font specified by the root layout properties. If set, the `font-scale` argument specifies a scaling factor relative to the `text-size` specified in the root layout properties.",group:"Types","sdk-support":{"basic functionality":{js:"0.48.0"}}},"to-string":{doc:'Converts the input value to a string. If the input is `null`, the result is `""`. 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","sdk-support":{"basic functionality":{js:"0.41.0",android:"6.0.0",ios:"4.0.0",macos:"0.7.0"}}},"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","sdk-support":{"basic functionality":{js:"0.41.0",android:"6.0.0",ios:"4.0.0",macos:"0.7.0"}}},"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","sdk-support":{"basic functionality":{js:"0.41.0",android:"6.0.0",ios:"4.0.0",macos:"0.7.0"}}},"to-rgba":{doc:"Returns a four-element array containing the input color's red, green, blue, and alpha components, in that order.",group:"Color","sdk-support":{"basic functionality":{js:"0.41.0",android:"6.0.0",ios:"4.0.0",macos:"0.7.0"}}},"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","sdk-support":{"basic functionality":{js:"0.41.0",android:"6.0.0",ios:"4.0.0",macos:"0.7.0"}}},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","sdk-support":{"basic functionality":{js:"0.41.0",android:"6.0.0",ios:"4.0.0",macos:"0.7.0"}}},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","sdk-support":{"basic functionality":{js:"0.41.0",android:"6.0.0",ios:"4.0.0",macos:"0.7.0"}}},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","sdk-support":{"basic functionality":{js:"0.41.0",android:"6.0.0",ios:"4.0.0",macos:"0.7.0"}}},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","sdk-support":{"basic functionality":{js:"0.41.0",android:"6.0.0",ios:"4.0.0",macos:"0.7.0"}}},length:{doc:"Gets the length of an array or string.",group:"Lookup","sdk-support":{"basic functionality":{js:"0.41.0",android:"6.0.0",ios:"4.0.0",macos:"0.7.0"}}},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","sdk-support":{"basic functionality":{js:"0.41.0",android:"6.0.0",ios:"4.0.0",macos:"0.7.0"}}},"feature-state":{doc:"Retrieves a property value from the current feature's state. Returns null if the requested property is not present on the feature's state. A feature's state is not part of the GeoJSON or vector tile data, and must be set programmatically on each feature. Note that [\"feature-state\"] can only be used with paint properties that support data-driven styling.",group:"Feature data","sdk-support":{"basic functionality":{js:"0.46.0"}}},"geometry-type":{doc:"Gets the feature's geometry type: Point, MultiPoint, LineString, MultiLineString, Polygon, MultiPolygon.",group:"Feature data","sdk-support":{"basic functionality":{js:"0.41.0",android:"6.0.0",ios:"4.0.0",macos:"0.7.0"}}},id:{doc:"Gets the feature's id, if it has one.",group:"Feature data","sdk-support":{"basic functionality":{js:"0.41.0",android:"6.0.0",ios:"4.0.0",macos:"0.7.0"}}},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","sdk-support":{"basic functionality":{js:"0.41.0",android:"6.0.0",ios:"4.0.0",macos:"0.7.0"}}},"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","sdk-support":{"basic functionality":{js:"0.41.0",android:"6.0.0",ios:"4.0.0",macos:"0.7.0"}}},"line-progress":{doc:"Gets the progress along a gradient line. Can only be used in the `line-gradient` property.",group:"Heatmap"},"+":{doc:"Returns the sum of the inputs.",group:"Math","sdk-support":{"basic functionality":{js:"0.41.0",android:"6.0.0",ios:"4.0.0",macos:"0.7.0"}}},"*":{doc:"Returns the product of the inputs.",group:"Math","sdk-support":{"basic functionality":{js:"0.41.0",android:"6.0.0",ios:"4.0.0",macos:"0.7.0"}}},"-":{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","sdk-support":{"basic functionality":{js:"0.41.0",android:"6.0.0",ios:"4.0.0",macos:"0.7.0"}}},"/":{doc:"Returns the result of floating point division of the first input by the second.",group:"Math","sdk-support":{"basic functionality":{js:"0.41.0",android:"6.0.0",ios:"4.0.0",macos:"0.7.0"}}},"%":{doc:"Returns the remainder after integer division of the first input by the second.",group:"Math","sdk-support":{"basic functionality":{js:"0.41.0",android:"6.0.0",ios:"4.0.0",macos:"0.7.0"}}},"^":{doc:"Returns the result of raising the first input to the power specified by the second.",group:"Math","sdk-support":{"basic functionality":{js:"0.41.0",android:"6.0.0",ios:"4.0.0",macos:"0.7.0"}}},sqrt:{doc:"Returns the square root of the input.",group:"Math","sdk-support":{"basic functionality":{js:"0.42.0",android:"6.0.0",ios:"4.0.0",macos:"0.7.0"}}},log10:{doc:"Returns the base-ten logarithm of the input.",group:"Math","sdk-support":{"basic functionality":{js:"0.41.0",android:"6.0.0",ios:"4.0.0",macos:"0.7.0"}}},ln:{doc:"Returns the natural logarithm of the input.",group:"Math","sdk-support":{"basic functionality":{js:"0.41.0",android:"6.0.0",ios:"4.0.0",macos:"0.7.0"}}},log2:{doc:"Returns the base-two logarithm of the input.",group:"Math","sdk-support":{"basic functionality":{js:"0.41.0",android:"6.0.0",ios:"4.0.0",macos:"0.7.0"}}},sin:{doc:"Returns the sine of the input.",group:"Math","sdk-support":{"basic functionality":{js:"0.41.0",android:"6.0.0",ios:"4.0.0",macos:"0.7.0"}}},cos:{doc:"Returns the cosine of the input.",group:"Math","sdk-support":{"basic functionality":{js:"0.41.0",android:"6.0.0",ios:"4.0.0",macos:"0.7.0"}}},tan:{doc:"Returns the tangent of the input.",group:"Math","sdk-support":{"basic functionality":{js:"0.41.0",android:"6.0.0",ios:"4.0.0",macos:"0.7.0"}}},asin:{doc:"Returns the arcsine of the input.",group:"Math","sdk-support":{"basic functionality":{js:"0.41.0",android:"6.0.0",ios:"4.0.0",macos:"0.7.0"}}},acos:{doc:"Returns the arccosine of the input.",group:"Math","sdk-support":{"basic functionality":{js:"0.41.0",android:"6.0.0",ios:"4.0.0",macos:"0.7.0"}}},atan:{doc:"Returns the arctangent of the input.",group:"Math","sdk-support":{"basic functionality":{js:"0.41.0",android:"6.0.0",ios:"4.0.0",macos:"0.7.0"}}},min:{doc:"Returns the minimum value of the inputs.",group:"Math","sdk-support":{"basic functionality":{js:"0.41.0",android:"6.0.0",ios:"4.0.0",macos:"0.7.0"}}},max:{doc:"Returns the maximum value of the inputs.",group:"Math","sdk-support":{"basic functionality":{js:"0.41.0",android:"6.0.0",ios:"4.0.0",macos:"0.7.0"}}},round:{doc:'Rounds the input to the nearest integer. Halfway values are rounded away from zero. For example, `["round", -1.5]` evaluates to -2.',group:"Math","sdk-support":{"basic functionality":{js:"0.45.0",android:"6.0.0",ios:"4.0.0",macos:"0.7.0"}}},abs:{doc:"Returns the absolute value of the input.",group:"Math","sdk-support":{"basic functionality":{js:"0.45.0",android:"6.0.0",ios:"4.0.0",macos:"0.7.0"}}},ceil:{doc:"Returns the smallest integer that is greater than or equal to the input.",group:"Math","sdk-support":{"basic functionality":{js:"0.45.0",android:"6.0.0",ios:"4.0.0",macos:"0.7.0"}}},floor:{doc:"Returns the largest integer that is less than or equal to the input.",group:"Math","sdk-support":{"basic functionality":{js:"0.45.0",android:"6.0.0",ios:"4.0.0",macos:"0.7.0"}}},"==":{doc:"Returns `true` if the input values are equal, `false` otherwise. The comparison is strictly typed: values of different runtime types are always considered unequal. Cases where the types are known to be different at parse time are considered invalid and will produce a parse error. Accepts an optional `collator` argument to control locale-dependent string comparisons.",group:"Decision","sdk-support":{"basic functionality":{js:"0.41.0",android:"6.0.0",ios:"4.0.0",macos:"0.7.0"},collator:{js:"0.45.0",android:"6.5.0",ios:"4.2.0",macos:"0.9.0"}}},"!=":{doc:"Returns `true` if the input values are not equal, `false` otherwise. The comparison is strictly typed: values of different runtime types are always considered unequal. Cases where the types are known to be different at parse time are considered invalid and will produce a parse error. Accepts an optional `collator` argument to control locale-dependent string comparisons.",group:"Decision","sdk-support":{"basic functionality":{js:"0.41.0",android:"6.0.0",ios:"4.0.0",macos:"0.7.0"},collator:{js:"0.45.0",android:"6.5.0",ios:"4.2.0",macos:"0.9.0"}}},">":{doc:"Returns `true` if the first input is strictly greater than the second, `false` otherwise. The arguments are required to be either both strings or both numbers; if during evaluation they are not, expression evaluation produces an error. Cases where this constraint is known not to hold at parse time are considered in valid and will produce a parse error. Accepts an optional `collator` argument to control locale-dependent string comparisons.",group:"Decision","sdk-support":{"basic functionality":{js:"0.41.0",android:"6.0.0",ios:"4.0.0",macos:"0.7.0"},collator:{js:"0.45.0",android:"6.5.0",ios:"4.2.0",macos:"0.9.0"}}},"<":{doc:"Returns `true` if the first input is strictly less than the second, `false` otherwise. The arguments are required to be either both strings or both numbers; if during evaluation they are not, expression evaluation produces an error. Cases where this constraint is known not to hold at parse time are considered in valid and will produce a parse error. Accepts an optional `collator` argument to control locale-dependent string comparisons.",group:"Decision","sdk-support":{"basic functionality":{js:"0.41.0",android:"6.0.0",ios:"4.0.0",macos:"0.7.0"},collator:{js:"0.45.0",android:"6.5.0",ios:"4.2.0",macos:"0.9.0"}}},">=":{doc:"Returns `true` if the first input is greater than or equal to the second, `false` otherwise. The arguments are required to be either both strings or both numbers; if during evaluation they are not, expression evaluation produces an error. Cases where this constraint is known not to hold at parse time are considered in valid and will produce a parse error. Accepts an optional `collator` argument to control locale-dependent string comparisons.",group:"Decision","sdk-support":{"basic functionality":{js:"0.41.0",android:"6.0.0",ios:"4.0.0",macos:"0.7.0"},collator:{js:"0.45.0",android:"6.5.0",ios:"4.2.0",macos:"0.9.0"}}},"<=":{doc:"Returns `true` if the first input is less than or equal to the second, `false` otherwise. The arguments are required to be either both strings or both numbers; if during evaluation they are not, expression evaluation produces an error. Cases where this constraint is known not to hold at parse time are considered in valid and will produce a parse error. Accepts an optional `collator` argument to control locale-dependent string comparisons.",group:"Decision","sdk-support":{"basic functionality":{js:"0.41.0",android:"6.0.0",ios:"4.0.0",macos:"0.7.0"},collator:{js:"0.45.0",android:"6.5.0",ios:"4.2.0",macos:"0.9.0"}}},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","sdk-support":{"basic functionality":{js:"0.41.0",android:"6.0.0",ios:"4.0.0",macos:"0.7.0"}}},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","sdk-support":{"basic functionality":{js:"0.41.0",android:"6.0.0",ios:"4.0.0",macos:"0.7.0"}}},"!":{doc:"Logical negation. Returns `true` if the input is `false`, and `false` if the input is `true`.",group:"Decision","sdk-support":{"basic functionality":{js:"0.41.0",android:"6.0.0",ios:"4.0.0",macos:"0.7.0"}}},"is-supported-script":{doc:"Returns `true` if the input string is expected to render legibly. Returns `false` if the input string contains sections that cannot be rendered without potential loss of meaning (e.g. Indic scripts that require complex text shaping, or right-to-left scripts if the the `mapbox-gl-rtl-text` plugin is not in use in Mapbox GL JS).",group:"String"},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","sdk-support":{"basic functionality":{js:"0.41.0",android:"6.0.0",ios:"4.0.0",macos:"0.7.0"}}},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","sdk-support":{"basic functionality":{js:"0.41.0",android:"6.0.0",ios:"4.0.0",macos:"0.7.0"}}},concat:{doc:"Returns a `string` consisting of the concatenation of the inputs. Each input is converted to a string as if by `to-string`.",group:"String","sdk-support":{"basic functionality":{js:"0.41.0",android:"6.0.0",ios:"4.0.0",macos:"0.7.0"}}},"resolved-locale":{doc:"Returns the IETF language tag of the locale being used by the provided `collator`. This can be used to determine the default system locale, or to determine if a requested locale was successfully loaded.",group:"String","sdk-support":{"basic functionality":{js:"0.45.0",android:"6.5.0",ios:"4.2.0",macos:"0.9.0"}}}}},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."}},"property-type":"data-constant",transition:!1,expression:{interpolated:!1,parameters:["zoom"]},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","property-type":"data-constant",transition:!0,expression:{interpolated:!0,parameters:["zoom"]},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","property-type":"data-constant",default:"#ffffff",expression:{interpolated:!0,parameters:["zoom"]},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","property-type":"data-constant",default:.5,minimum:0,maximum:1,expression:{interpolated:!0,parameters:["zoom"]},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",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":{}},expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"fill-opacity":{type:"number",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"}},expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"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.",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"}},expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"fill-outline-color":{type:"color",doc:"The outline color of the fill. Matches the value of `fill-color` if unspecified.",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"}},expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"fill-translate":{type:"array",value:"number",length:2,default:[0,0],transition:!0,units:"pixels",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":{}},expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"fill-translate-anchor":{type:"enum",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":{}},expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"fill-pattern":{type:"string",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). Note that zoom-dependent expressions will be evaluated only at integer zoom levels.","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.49.0",android:"6.5.0",macos:"0.11.0",ios:"4.4.0"}},expression:{interpolated:!1,parameters:["zoom","feature"]},"property-type":"cross-faded-data-driven"}},paint_line:{"line-opacity":{type:"number",doc:"The opacity at which the line will be drawn.",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"}},expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"line-color":{type:"color",doc:"The color with which the line will be drawn.",default:"#000000",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"}},expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"line-translate":{type:"array",value:"number",length:2,default:[0,0],transition:!0,units:"pixels",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":{}},expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"line-translate-anchor":{type:"enum",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":{}},expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"line-width":{type:"number",default:1,minimum: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",android:"5.2.0",ios:"3.7.0",macos:"0.6.0"}},expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"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.",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"}},expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"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.",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"}},expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"line-blur":{type:"number",default:0,minimum: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"}},expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"line-dasharray":{type:"array",value:"number",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. Note that GeoJSON sources with `lineMetrics: true` specified won't render dashed lines to the expected scale. Also note that zoom-dependent expressions will be evaluated only at integer zoom levels.",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":{}},expression:{interpolated:!1,parameters:["zoom"]},"property-type":"cross-faded"},"line-pattern":{type:"string",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). Note that zoom-dependent expressions will be evaluated only at integer zoom levels.","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.49.0",android:"6.5.0",macos:"0.11.0",ios:"4.4.0"}},expression:{interpolated:!1,parameters:["zoom","feature"]},"property-type":"cross-faded-data-driven"},"line-gradient":{type:"color",doc:'Defines a gradient with which to color a line feature. Can only be used with GeoJSON sources that specify `"lineMetrics": true`.',transition:!1,requires:[{"!":"line-dasharray"},{"!":"line-pattern"},{source:"geojson",has:{lineMetrics:!0}}],"sdk-support":{"basic functionality":{js:"0.45.0",android:"6.5.0",ios:"4.4.0",macos:"0.11.0"},"data-driven styling":{}},expression:{interpolated:!0,parameters:["line-progress"]},"property-type":"color-ramp"}},paint_circle:{"circle-radius":{type:"number",default:5,minimum: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"}},expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"circle-color":{type:"color",default:"#000000",doc:"The fill color of the circle.",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"}},expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"circle-blur":{type:"number",default:0,doc:"Amount to blur the circle. 1 blurs the circle such that only the centerpoint is full opacity.",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"}},expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"circle-opacity":{type:"number",doc:"The opacity at which the circle will be drawn.",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.20.0",android:"5.0.0",ios:"3.5.0",macos:"0.4.0"}},expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"circle-translate":{type:"array",value:"number",length:2,default:[0,0],transition:!0,units:"pixels",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":{}},expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"circle-translate-anchor":{type:"enum",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":{}},expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"circle-pitch-scale":{type:"enum",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":{}},expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"circle-pitch-alignment":{type:"enum",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":{}},expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"circle-stroke-width":{type:"number",default:0,minimum: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"}},expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"circle-stroke-color":{type:"color",default:"#000000",doc:"The stroke color of the circle.",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"}},expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"circle-stroke-opacity":{type:"number",doc:"The opacity of the circle's stroke.",default:1,minimum:0,maximum:1,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"}},expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"}},paint_heatmap:{"heatmap-radius":{type:"number",default:30,minimum:1,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",android:"6.0.0",ios:"4.0.0",macos:"0.7.0"},"data-driven styling":{js:"0.43.0",android:"6.0.0",ios:"4.0.0",macos:"0.7.0"}},expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"heatmap-weight":{type:"number",default:1,minimum: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",android:"6.0.0",ios:"4.0.0",macos:"0.7.0"},"data-driven styling":{js:"0.41.0",android:"6.0.0",ios:"4.0.0",macos:"0.7.0"}},expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"heatmap-intensity":{type:"number",default:1,minimum:0,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",android:"6.0.0",ios:"4.0.0",macos:"0.7.0"},"data-driven styling":{}},expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"heatmap-color":{type:"color",default:["interpolate",["linear"],["heatmap-density"],0,"rgba(0, 0, 255, 0)",.1,"royalblue",.3,"cyan",.5,"lime",.7,"yellow",1,"red"],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.',transition:!1,"sdk-support":{"basic functionality":{js:"0.41.0",android:"6.0.0",ios:"4.0.0",macos:"0.7.0"},"data-driven styling":{}},expression:{interpolated:!0,parameters:["heatmap-density"]},"property-type":"color-ramp"},"heatmap-opacity":{type:"number",doc:"The global opacity at which the heatmap layer will be drawn.",default:1,minimum:0,maximum:1,transition:!0,"sdk-support":{"basic functionality":{js:"0.41.0",android:"6.0.0",ios:"4.0.0",macos:"0.7.0"},"data-driven styling":{}},expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"}},paint_symbol:{"icon-opacity":{doc:"The opacity at which the icon will be drawn.",type:"number",default:1,minimum:0,maximum:1,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"}},expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"icon-color":{type:"color",default:"#000000",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"}},expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"icon-halo-color":{type:"color",default:"rgba(0, 0, 0, 0)",transition:!0,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"}},expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"icon-halo-width":{type:"number",default:0,minimum:0,transition:!0,units:"pixels",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"}},expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"icon-halo-blur":{type:"number",default:0,minimum:0,transition:!0,units:"pixels",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"}},expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"icon-translate":{type:"array",value:"number",length:2,default:[0,0],transition:!0,units:"pixels",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":{}},expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"icon-translate-anchor":{type:"enum",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":{}},expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"text-opacity":{type:"number",doc:"The opacity at which the text will be drawn.",default:1,minimum:0,maximum:1,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"}},expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"text-color":{type:"color",doc:"The color with which the text will be drawn.",default:"#000000",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"}},expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"text-halo-color":{type:"color",default:"rgba(0, 0, 0, 0)",transition:!0,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"}},expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"text-halo-width":{type:"number",default:0,minimum:0,transition:!0,units:"pixels",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"}},expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"text-halo-blur":{type:"number",default:0,minimum: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"}},expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"text-translate":{type:"array",value:"number",length:2,default:[0,0],transition:!0,units:"pixels",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":{}},expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"text-translate-anchor":{type:"enum",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":{}},expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"}},paint_raster:{"raster-opacity":{type:"number",doc:"The opacity at which the image will be drawn.",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":{}},expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"raster-hue-rotate":{type:"number",default:0,period:360,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":{}},expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"raster-brightness-min":{type:"number",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":{}},expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"raster-brightness-max":{type:"number",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":{}},expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"raster-saturation":{type:"number",doc:"Increase or reduce the saturation of the image.",default:0,minimum:-1,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":{}},expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"raster-contrast":{type:"number",doc:"Increase or reduce the contrast of the image.",default:0,minimum:-1,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":{}},expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"raster-resampling":{type:"enum",doc:"The resampling/interpolation method to use for overscaling, also known as texture magnification filter",values:{linear:{doc:"(Bi)linear filtering interpolates pixel values using the weighted average of the four closest original source pixels creating a smooth but blurry look when overscaled"},nearest:{doc:"Nearest neighbor filtering interpolates pixel values using the nearest original source pixel creating a sharp but pixelated look when overscaled"}},default:"linear","sdk-support":{"basic functionality":{js:"0.47.0",android:"6.3.0",ios:"4.2.0",macos:"0.9.0"},"data-driven styling":{}},expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"raster-fade-duration":{type:"number",default:300,minimum: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":{}},expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"}},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`.",transition:!1,"sdk-support":{"basic functionality":{js:"0.43.0",android:"6.0.0",ios:"4.0.0",macos:"0.7.0"},"data-driven styling":{}},expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"hillshade-illumination-anchor":{type:"enum",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.","sdk-support":{"basic functionality":{js:"0.43.0",android:"6.0.0",ios:"4.0.0",macos:"0.7.0"},"data-driven styling":{}},expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"hillshade-exaggeration":{type:"number",doc:"Intensity of the hillshade",default:.5,minimum:0,maximum:1,transition:!0,"sdk-support":{"basic functionality":{js:"0.43.0",android:"6.0.0",ios:"4.0.0",macos:"0.7.0"},"data-driven styling":{}},expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"hillshade-shadow-color":{type:"color",default:"#000000",doc:"The shading color of areas that face away from the light source.",transition:!0,"sdk-support":{"basic functionality":{js:"0.43.0",android:"6.0.0",ios:"4.0.0",macos:"0.7.0"},"data-driven styling":{}},expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"hillshade-highlight-color":{type:"color",default:"#FFFFFF",doc:"The shading color of areas that faces towards the light source.",transition:!0,"sdk-support":{"basic functionality":{js:"0.43.0",android:"6.0.0",ios:"4.0.0",macos:"0.7.0"},"data-driven styling":{}},expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"hillshade-accent-color":{type:"color",default:"#000000",doc:"The shading color used to accentuate rugged terrain like sharp cliffs and gorges.",transition:!0,"sdk-support":{"basic functionality":{js:"0.43.0",android:"6.0.0",ios:"4.0.0",macos:"0.7.0"},"data-driven styling":{}},expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"}},paint_background:{"background-color":{type:"color",default:"#000000",doc:"The color with which the background will be drawn.",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"}},expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"background-pattern":{type:"string",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). Note that zoom-dependent expressions will be evaluated only at integer zoom levels.","sdk-support":{"basic functionality":{js:"0.10.0",android:"2.0.1",ios:"2.0.0",macos:"0.1.0"}},expression:{interpolated:!1,parameters:["zoom"]},"property-type":"cross-faded"},"background-opacity":{type:"number",default:1,minimum:0,maximum:1,doc:"The opacity at which the background will be drawn.",transition:!0,"sdk-support":{"basic functionality":{js:"0.10.0",android:"2.0.1",ios:"2.0.0",macos:"0.1.0"}},expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"}},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."}},"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"}},"property-type":"constant"}},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."}},"paint_fill-extrusion":{"fill-extrusion-opacity":{type:"number",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"}},expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"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.",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"}},expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"fill-extrusion-translate":{type:"array",value:"number",length:2,default:[0,0],transition:!0,units:"pixels",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":{}},expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"fill-extrusion-translate-anchor":{type:"enum",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":{}},expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"fill-extrusion-pattern":{type:"string",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). Note that zoom-dependent expressions will be evaluated only at integer zoom levels.","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.49.0",android:"6.5.0",macos:"0.11.0",ios:"4.4.0"}},expression:{interpolated:!1,parameters:["zoom","feature"]},"property-type":"cross-faded-data-driven"},"fill-extrusion-height":{type:"number",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"}},expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"fill-extrusion-base":{type:"number",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"}},expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"fill-extrusion-vertical-gradient":{type:"boolean",default:!0,doc:"Whether to apply a vertical gradient to the sides of a fill-extrusion layer. If true, sides will be shaded slightly darker farther down.",transition:!1,"sdk-support":{"basic functionality":{js:"0.50.0"}},expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"}},"property-type":{"data-driven":{type:"property-type",doc:"Property is interpolable and can be represented using a property expression."},"cross-faded":{type:"property-type",doc:"Property is non-interpolable; rather, its values will be cross-faded to smoothly transition between integer zooms."},"cross-faded-data-driven":{type:"property-type",doc:"Property is non-interpolable; rather, its values will be cross-faded to smoothly transition between integer zooms. It can be represented using a property expression."},"color-ramp":{type:"property-type",doc:"Property should be specified using a color ramp from which the output color can be sampled based on a property calculation."},"data-constant":{type:"property-type",doc:"Property is interpolable but cannot be represented using a property expression."},constant:{type:"property-type",doc:"Property is constant across all zoom levels and property values."}}};var i=/("(?:[^\\"]|\\.)*")|[:,\][}{]/g;function o(t,e,n){return e in t?t[e]:n}var a=function(t,e){e=e||{};var n=JSON.stringify([1],null,o(e,"indent",2)).slice(2,-3),r=o(e,"margins",!1),a=""===n?1/0:o(e,"maxLength",80);return function t(e,o,s){e&&"function"==typeof e.toJSON&&(e=e.toJSON());var l=JSON.stringify(e);if(void 0===l)return l;var c=a-o.length-s;if(l.length<=c){var u=function(t,e){var n=e?" ":"",r={"{":"{"+n,"[":"["+n,"}":n+"}","]":n+"]",",":", ",":":": "};return t.replace(i,function(t,e){return e?t:r[t]})}(l,r);if(u.length<=c)return u}if("object"==typeof e&&null!==e){var p,A=o+n,h=[],f=function(t,e){return e===t.length-1?0:1};if(Array.isArray(e)){for(var d=0;d0)return[p[0],n+h.join(",\n"+A),p[1]].join("\n"+o)}return l}(t,"",0)};function s(t,e){var n={};for(var r in e)void 0!==t[r]&&(n[r]=t[r]);for(var i in t)void 0===n[i]&&(n[i]=t[i]);return n}var l="undefined"!=typeof window?window:void 0!==t?t:"undefined"!=typeof self?self:{};function c(t,e){return t(e={exports:{}},e.exports),e.exports}var u=c(function(t,e){!function(n){var r=e&&!e.nodeType&&e,i=t&&!t.nodeType&&t,o="object"==typeof l&&l;o.global!==o&&o.window!==o&&o.self!==o||(n=o);var a,s,c=2147483647,u=36,p=1,A=26,h=38,f=700,d=72,_=128,g="-",y=/^xn--/,m=/[^\x20-\x7E]/,v=/[\x2E\u3002\uFF0E\uFF61]/g,b={overflow:"Overflow: input needs wider integers to process","not-basic":"Illegal input >= 0x80 (not a basic code point)","invalid-input":"Invalid input"},w=u-p,x=Math.floor,E=String.fromCharCode;function M(t){throw RangeError(b[t])}function C(t,e){for(var n=t.length,r=[];n--;)r[n]=e(t[n]);return r}function B(t,e){var n=t.split("@"),r="";return n.length>1&&(r=n[0]+"@",t=n[1]),r+C((t=t.replace(v,".")).split("."),e).join(".")}function O(t){for(var e,n,r=[],i=0,o=t.length;i=55296&&e<=56319&&i65535&&(e+=E((t-=65536)>>>10&1023|55296),t=56320|1023&t),e+=E(t)}).join("")}function P(t){return t-48<10?t-22:t-65<26?t-65:t-97<26?t-97:u}function I(t,e){return t+22+75*(t<26)-((0!=e)<<5)}function T(t,e,n){var r=0;for(t=n?x(t/f):t>>1,t+=x(t/e);t>w*A>>1;r+=u)t=x(t/w);return x(r+(w+1)*t/(t+h))}function D(t){var e,n,r,i,o,a,s,l,h,f,y=[],m=t.length,v=0,b=_,w=d;for((n=t.lastIndexOf(g))<0&&(n=0),r=0;r=128&&M("not-basic"),y.push(t.charCodeAt(r));for(i=n>0?n+1:0;i=m&&M("invalid-input"),((l=P(t.charCodeAt(i++)))>=u||l>x((c-v)/a))&&M("overflow"),v+=l*a,!(l<(h=s<=w?p:s>=w+A?A:s-w));s+=u)a>x(c/(f=u-h))&&M("overflow"),a*=f;w=T(v-o,e=y.length+1,0==o),x(v/e)>c-b&&M("overflow"),b+=x(v/e),v%=e,y.splice(v++,0,b)}return k(y)}function L(t){var e,n,r,i,o,a,s,l,h,f,y,m,v,b,w,C=[];for(m=(t=O(t)).length,e=_,n=0,o=d,a=0;a=e&&yx((c-n)/(v=r+1))&&M("overflow"),n+=(s-e)*v,e=s,a=0;ac&&M("overflow"),y==e){for(l=n,h=u;!(l<(f=h<=o?p:h>=o+A?A:h-o));h+=u)w=l-f,b=u-f,C.push(E(I(f+w%b,0))),l=x(w/b);C.push(E(I(l,0))),o=T(n,v,r==i),n=0,++r}++n,++e}return C.join("")}if(a={version:"1.3.2",ucs2:{decode:O,encode:k},decode:D,encode:L,toASCII:function(t){return B(t,function(t){return m.test(t)?"xn--"+L(t):t})},toUnicode:function(t){return B(t,function(t){return y.test(t)?D(t.slice(4).toLowerCase()):t})}},r&&i)if(t.exports==r)i.exports=a;else for(s in a)a.hasOwnProperty(s)&&(r[s]=a[s]);else n.punycode=a}(l)}),p={isString:function(t){return"string"==typeof t},isObject:function(t){return"object"==typeof t&&null!==t},isNull:function(t){return null===t},isNullOrUndefined:function(t){return null==t}};function A(t,e){return Object.prototype.hasOwnProperty.call(t,e)}var h=function(t,e,n,r){e=e||"&",n=n||"=";var i={};if("string"!=typeof t||0===t.length)return i;var o=/\+/g;t=t.split(e);var a=1e3;r&&"number"==typeof r.maxKeys&&(a=r.maxKeys);var s=t.length;a>0&&s>a&&(s=a);for(var l=0;l=0?(c=f.substr(0,d),u=f.substr(d+1)):(c=f,u=""),p=decodeURIComponent(c),h=decodeURIComponent(u),A(i,p)?Array.isArray(i[p])?i[p].push(h):i[p]=[i[p],h]:i[p]=h}return i},f=function(t){switch(typeof t){case"string":return t;case"boolean":return t?"true":"false";case"number":return isFinite(t)?t:"";default:return""}},d=function(t,e,n,r){return e=e||"&",n=n||"=",null===t&&(t=void 0),"object"==typeof t?Object.keys(t).map(function(r){var i=encodeURIComponent(f(r))+n;return Array.isArray(t[r])?t[r].map(function(t){return i+encodeURIComponent(f(t))}).join(e):i+encodeURIComponent(f(t[r]))}).join(e):r?encodeURIComponent(f(r))+n+encodeURIComponent(f(t)):""},_=c(function(t,e){e.decode=e.parse=h,e.encode=e.stringify=d}),g=(_.decode,_.parse,_.encode,_.stringify,S),y=function(t,e){return S(t,!1,!0).resolve(e)},m=function(t,e){if(!t)return e;return S(t,!1,!0).resolveObject(e)},v=function(t){p.isString(t)&&(t=S(t));if(!(t instanceof w))return w.prototype.format.call(t);return t.format()},b=w;function w(){this.protocol=null,this.slashes=null,this.auth=null,this.host=null,this.port=null,this.hostname=null,this.hash=null,this.search=null,this.query=null,this.pathname=null,this.path=null,this.href=null}var x=/^([a-z0-9.+-]+:)/i,E=/:[0-9]*$/,M=/^(\/\/?(?!\/)[^\?\s]*)(\?[^\s]*)?$/,C=["{","}","|","\\","^","`"].concat(["<",">",'"',"`"," ","\r","\n","\t"]),B=["'"].concat(C),O=["%","/","?",";","#"].concat(B),k=["/","?","#"],P=/^[+a-z0-9A-Z_-]{0,63}$/,I=/^([+a-z0-9A-Z_-]{0,63})(.*)$/,T={javascript:!0,"javascript:":!0},D={javascript:!0,"javascript:":!0},L={http:!0,https:!0,ftp:!0,gopher:!0,file:!0,"http:":!0,"https:":!0,"ftp:":!0,"gopher:":!0,"file:":!0};function S(t,e,n){if(t&&p.isObject(t)&&t instanceof w)return t;var r=new w;return r.parse(t,e,n),r}w.prototype.parse=function(t,e,n){if(!p.isString(t))throw new TypeError("Parameter 'url' must be a string, not "+typeof t);var r=t.indexOf("?"),i=-1!==r&&r127?E+="x":E+=w[C];if(!E.match(P)){var z=v.slice(0,g),R=v.slice(g+1),j=w.match(I);j&&(z.push(j[1]),R.unshift(j[2])),R.length&&(a="/"+R.join(".")+a),this.hostname=z.join(".");break}}}this.hostname.length>255?this.hostname="":this.hostname=this.hostname.toLowerCase(),m||(this.hostname=u.toASCII(this.hostname));var U=this.port?":"+this.port:"",F=this.hostname||"";this.host=F+U,this.href+=this.host,m&&(this.hostname=this.hostname.substr(1,this.hostname.length-2),"/"!==a[0]&&(a="/"+a))}if(!T[c])for(g=0,b=B.length;g0)&&n.host.split("@"))&&(n.auth=B.shift(),n.host=n.hostname=B.shift());return n.search=t.search,n.query=t.query,p.isNull(n.pathname)&&p.isNull(n.search)||(n.path=(n.pathname?n.pathname:"")+(n.search?n.search:"")),n.href=n.format(),n}if(!v.length)return n.pathname=null,n.search?n.path="/"+n.search:n.path=null,n.href=n.format(),n;for(var x=v.slice(-1)[0],E=(n.host||t.host||v.length>1)&&("."===x||".."===x)||""===x,M=0,C=v.length;C>=0;C--)"."===(x=v[C])?v.splice(C,1):".."===x?(v.splice(C,1),M++):M&&(v.splice(C,1),M--);if(!y&&!m)for(;M--;M)v.unshift("..");!y||""===v[0]||v[0]&&"/"===v[0].charAt(0)||v.unshift(""),E&&"/"!==v.join("/").substr(-1)&&v.push("");var B,O=""===v[0]||v[0]&&"/"===v[0].charAt(0);b&&(n.hostname=n.host=O?"":v.length?v.shift():"",(B=!!(n.host&&n.host.indexOf("@")>0)&&n.host.split("@"))&&(n.auth=B.shift(),n.host=n.hostname=B.shift()));return(y=y||n.host&&v.length)&&!O&&v.unshift(""),v.length?n.pathname=v.join("/"):(n.pathname=null,n.path=null),p.isNull(n.pathname)&&p.isNull(n.search)||(n.path=(n.pathname?n.pathname:"")+(n.search?n.search:"")),n.auth=t.auth||n.auth,n.slashes=n.slashes||t.slashes,n.href=n.format(),n},w.prototype.parseHost=function(){var t=this.host,e=E.exec(t);e&&(":"!==(e=e[0])&&(this.port=e.substr(1)),t=t.substr(0,t.length-e.length)),t&&(this.hostname=t)};var z={parse:g,resolve:y,resolveObject:m,format:v,Url:b};function R(t,e){for(var n in t.sources)e(t.sources[n])}function j(t,e){for(var n=0,r=t.layers;n=0;n--){if("symbol"!==t.layers[n].type){e=n+1;break}}var r=t.layers.splice(e);return r.reverse(),t.layers=t.layers.concat(r),t}function V(t){for(var e=[],n=arguments.length-1;n-- >0;)e[n]=arguments[n+1];for(var r=0,i=e;r":"value"===t.itemType.kind?"array":"array<"+e+">"}return t.kind}var ot=[q,X,Y,Z,J,nt,$,rt(tt)];function at(t,e){if("error"===e.kind)return null;if("array"===t.kind){if("array"===e.kind&&(0===e.N&&"value"===e.itemType.kind||!at(t.itemType,e.itemType))&&("number"!=typeof t.N||t.N===e.N))return null}else{if(t.kind===e.kind)return null;if("value"===t.kind)for(var n=0,r=ot;n255?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 l=i.indexOf("("),c=i.indexOf(")");if(-1!==l&&c+1===i.length){var u=i.substr(0,l),p=i.substr(l+1,c-(l+1)).split(","),A=1;switch(u){case"rgba":if(4!==p.length)return null;A=a(p.pop());case"rgb":return 3!==p.length?null:[o(p[0]),o(p[1]),o(p[2]),A];case"hsla":if(4!==p.length)return null;A=a(p.pop());case"hsl":if(3!==p.length)return null;var h=(parseFloat(p[0])%360+360)%360/360,f=a(p[1]),d=a(p[2]),_=d<=.5?d*(f+1):d+f-d*f,g=2*d-_;return[r(255*s(g,_,h+1/3)),r(255*s(g,_,h)),r(255*s(g,_,h-1/3)),A];default:return null}}return null}}catch(t){}}).parseCSSColor,lt=function(t,e,n,r){void 0===r&&(r=1),this.r=t,this.g=e,this.b=n,this.a=r};lt.parse=function(t){if(t){if(t instanceof lt)return t;if("string"==typeof t){var e=st(t);if(e)return new lt(e[0]/255*e[3],e[1]/255*e[3],e[2]/255*e[3],e[3])}}},lt.prototype.toString=function(){var t=this.toArray(),e=t[0],n=t[1],r=t[2],i=t[3];return"rgba("+Math.round(e)+","+Math.round(n)+","+Math.round(r)+","+i+")"},lt.prototype.toArray=function(){var t=this.r,e=this.g,n=this.b,r=this.a;return 0===r?[0,0,0,0]:[255*t/r,255*e/r,255*n/r,r]},lt.black=new lt(0,0,0,1),lt.white=new lt(1,1,1,1),lt.transparent=new lt(0,0,0,0),lt.red=new lt(1,0,0,1);var ct=function(t,e,n){this.sensitivity=t?e?"variant":"case":e?"accent":"base",this.locale=n,this.collator=new Intl.Collator(this.locale?this.locale:[],{sensitivity:this.sensitivity,usage:"search"})};ct.prototype.compare=function(t,e){return this.collator.compare(t,e)},ct.prototype.resolvedLocale=function(){return new Intl.Collator(this.locale?this.locale:[]).resolvedOptions().locale};var ut=function(t,e,n){this.text=t,this.scale=e,this.fontStack=n},pt=function(t){this.sections=t};function At(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 ["+[t,e,n,r].join(", ")+"]: 'a' must be between 0 and 1.":"Invalid rgba value ["+("number"==typeof r?[t,e,n,r]:[t,e,n]).join(", ")+"]: 'r', 'g', and 'b' must be between 0 and 255."}function ht(t){if(null===t)return q;if("string"==typeof t)return Y;if("boolean"==typeof t)return Z;if("number"==typeof t)return X;if(t instanceof lt)return J;if(t instanceof ct)return et;if(t instanceof pt)return nt;if(Array.isArray(t)){for(var e,n=t.length,r=0,i=t;r2){var s=t[1];if("string"!=typeof s||!(s in gt)||"object"===s)return e.error('The item type argument of "array" must be one of string, number, boolean',1);o=gt[s],r++}else o=tt;if(t.length>3){if(null!==t[2]&&("number"!=typeof t[2]||t[2]<0||t[2]!==Math.floor(t[2])))return e.error('The length argument to "array" must be a positive integer literal',2);a=t[2],r++}n=rt(o,a)}else n=gt[i];for(var l=[];r1)&&e.push(r)}}return e.concat(this.args.map(function(t){return t.serialize()}))};var mt=function(t){this.type=nt,this.sections=t};mt.parse=function(t,e){if(t.length<3)return e.error("Expected at least two arguments.");if((t.length-1)%2!=0)return e.error("Expected an even number of arguments.");for(var n=[],r=1;r4?"Invalid rbga value "+JSON.stringify(e)+": expected an array containing either three or four numeric values.":At(e[0],e[1],e[2],e[3])))return new lt(e[0]/255,e[1]/255,e[2]/255,e[3])}throw new _t(n||"Could not parse color from value '"+("string"==typeof e?e:JSON.stringify(e))+"'")}if("number"===this.type.kind){for(var a=null,s=0,l=this.args;s=0)return!1;var n=!0;return t.eachChild(function(t){n&&!Ot(t,e)&&(n=!1)}),n}Mt.parse=function(t,e){if(2!==t.length)return e.error("Expected one argument.");var n=t[1];if("object"!=typeof n||Array.isArray(n))return e.error("Collator options argument must be an object.");var r=e.parse(void 0!==n["case-sensitive"]&&n["case-sensitive"],1,Z);if(!r)return null;var i=e.parse(void 0!==n["diacritic-sensitive"]&&n["diacritic-sensitive"],1,Z);if(!i)return null;var o=null;return n.locale&&!(o=e.parse(n.locale,1,Y))?null:new Mt(r,i,o)},Mt.prototype.evaluate=function(t){return new ct(this.caseSensitive.evaluate(t),this.diacriticSensitive.evaluate(t),this.locale?this.locale.evaluate(t):null)},Mt.prototype.eachChild=function(t){t(this.caseSensitive),t(this.diacriticSensitive),this.locale&&t(this.locale)},Mt.prototype.possibleOutputs=function(){return[void 0]},Mt.prototype.serialize=function(){var t={};return t["case-sensitive"]=this.caseSensitive.serialize(),t["diacritic-sensitive"]=this.diacriticSensitive.serialize(),this.locale&&(t.locale=this.locale.serialize()),["collator",t]};var kt=function(t,e){this.type=e.type,this.name=t,this.boundExpression=e};kt.parse=function(t,e){if(2!==t.length||"string"!=typeof t[1])return e.error("'var' expression requires exactly one string literal argument.");var n=t[1];return e.scope.has(n)?new kt(n,e.scope.get(n)):e.error('Unknown variable "'+n+'". Make sure "'+n+'" has been bound in an enclosing "let" expression before using it.',1)},kt.prototype.evaluate=function(t){return this.boundExpression.evaluate(t)},kt.prototype.eachChild=function(){},kt.prototype.possibleOutputs=function(){return[void 0]},kt.prototype.serialize=function(){return["var",this.name]};var Pt=function(t,e,n,r,i){void 0===e&&(e=[]),void 0===r&&(r=new G),void 0===i&&(i=[]),this.registry=t,this.path=e,this.key=e.map(function(t){return"["+t+"]"}).join(""),this.scope=r,this.errors=i,this.expectedType=n};function It(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)],r=t[a+1],e===n||e>n&&ee))throw new _t("Input is not a number.");o=a-1}}return Math.max(a-1,0)}Pt.prototype.parse=function(t,e,n,r,i){return void 0===i&&(i={}),e?this.concat(e,n,r)._parse(t,i):this._parse(t,i)},Pt.prototype._parse=function(t,e){function n(t,e,n){return"assert"===n?new yt(e,[t]):"coerce"===n?new bt(e,[t]):t}if(null!==t&&"string"!=typeof t&&"boolean"!=typeof t&&"number"!=typeof t||(t=["literal",t]),Array.isArray(t)){if(0===t.length)return this.error('Expected an array with at least one element. If you wanted a literal array, use ["literal", []].');var r=t[0];if("string"!=typeof r)return this.error("Expression name must be a string, but found "+typeof r+' instead. If you wanted a literal array, use ["literal", [...]].',0),null;var i=this.registry[r];if(i){var o=i.parse(t,this);if(!o)return null;if(this.expectedType){var a=this.expectedType,s=o.type;if("string"!==a.kind&&"number"!==a.kind&&"boolean"!==a.kind&&"object"!==a.kind&&"array"!==a.kind||"value"!==s.kind)if("color"!==a.kind&&"formatted"!==a.kind||"value"!==s.kind&&"string"!==s.kind){if(this.checkSubtype(a,s))return null}else o=n(o,a,e.typeAnnotation||"coerce");else o=n(o,a,e.typeAnnotation||"assert")}if(!(o instanceof dt)&&function t(e){if(e instanceof kt)return t(e.boundExpression);if(e instanceof Et&&"error"===e.name)return!1;if(e instanceof Mt)return!1;var n=e instanceof bt||e instanceof yt;var r=!0;e.eachChild(function(e){r=n?r&&t(e):r&&e instanceof dt});if(!r)return!1;return Ct(e)&&Ot(e,["zoom","heatmap-density","line-progress","is-supported-script"])}(o)){var l=new xt;try{o=new dt(o.type,o.evaluate(l))}catch(t){return this.error(t.message),null}}return o}return this.error('Unknown expression "'+r+'". If you wanted a literal array, use ["literal", [...]].',0)}return void 0===t?this.error("'undefined' value invalid. Use null instead."):"object"==typeof t?this.error('Bare objects invalid. Use ["literal", {...}] instead.'):this.error("Expected an array, but found "+typeof t+" instead.")},Pt.prototype.concat=function(t,e,n){var r="number"==typeof t?this.path.concat(t):this.path,i=n?this.scope.concat(n):this.scope;return new Pt(this.registry,r,e||null,i,this.errors)},Pt.prototype.error=function(t){for(var e=[],n=arguments.length-1;n-- >0;)e[n]=arguments[n+1];var r=""+this.key+e.map(function(t){return"["+t+"]"}).join("");this.errors.push(new N(r,t))},Pt.prototype.checkSubtype=function(t,e){var n=at(t,e);return n&&this.error(n),n};var Tt=function(t,e,n){this.type=t,this.input=e,this.labels=[],this.outputs=[];for(var r=0,i=n;r=s)return e.error('Input/output pairs for "step" expressions must be arranged with input values in strictly ascending order.',c);var p=e.parse(l,u,o);if(!p)return null;o=o||p.type,i.push([s,p])}return new Tt(o,n,i)},Tt.prototype.evaluate=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[It(e,r)].evaluate(t)},Tt.prototype.eachChild=function(t){t(this.input);for(var e=0,n=this.outputs;e0&&t.push(this.labels[e]),t.push(this.outputs[e].serialize());return t};var Dt=Lt;function Lt(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}function St(t,e,n){return t*(1-n)+e*n}Lt.prototype.sampleCurveX=function(t){return((this.ax*t+this.bx)*t+this.cx)*t},Lt.prototype.sampleCurveY=function(t){return((this.ay*t+this.by)*t+this.cy)*t},Lt.prototype.sampleCurveDerivativeX=function(t){return(3*this.ax*t+2*this.bx)*t+this.cx},Lt.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)r)return r;for(;no?n=i:r=i,i=.5*(r-n)+n}return i},Lt.prototype.solve=function(t,e){return this.sampleCurveY(this.solveCurveX(t,e))};var zt=Object.freeze({number:St,color:function(t,e,n){return new lt(St(t.r,e.r,n),St(t.g,e.g,n),St(t.b,e.b,n),St(t.a,e.a,n))},array:function(t,e,n){return t.map(function(t,r){return St(t,e[r],n)})}}),Rt=.95047,jt=1,Ut=1.08883,Ft=4/29,Qt=6/29,Kt=3*Qt*Qt,Wt=Qt*Qt*Qt,Ht=Math.PI/180,Vt=180/Math.PI;function Nt(t){return t>Wt?Math.pow(t,1/3):t/Kt+Ft}function Gt(t){return t>Qt?t*t*t:Kt*(t-Ft)}function qt(t){return 255*(t<=.0031308?12.92*t:1.055*Math.pow(t,1/2.4)-.055)}function Xt(t){return(t/=255)<=.04045?t/12.92:Math.pow((t+.055)/1.055,2.4)}function Yt(t){var e=Xt(t.r),n=Xt(t.g),r=Xt(t.b),i=Nt((.4124564*e+.3575761*n+.1804375*r)/Rt),o=Nt((.2126729*e+.7151522*n+.072175*r)/jt);return{l:116*o-16,a:500*(i-o),b:200*(o-Nt((.0193339*e+.119192*n+.9503041*r)/Ut)),alpha:t.a}}function Zt(t){var e=(t.l+16)/116,n=isNaN(t.a)?e:e+t.a/500,r=isNaN(t.b)?e:e-t.b/200;return e=jt*Gt(e),n=Rt*Gt(n),r=Ut*Gt(r),new lt(qt(3.2404542*n-1.5371385*e-.4985314*r),qt(-.969266*n+1.8760108*e+.041556*r),qt(.0556434*n-.2040259*e+1.0572252*r),t.alpha)}var Jt={forward:Yt,reverse:Zt,interpolate:function(t,e,n){return{l:St(t.l,e.l,n),a:St(t.a,e.a,n),b:St(t.b,e.b,n),alpha:St(t.alpha,e.alpha,n)}}},$t={forward:function(t){var e=Yt(t),n=e.l,r=e.a,i=e.b,o=Math.atan2(i,r)*Vt;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*Ht,n=t.c;return Zt({l:t.l,a:Math.cos(e)*n,b:Math.sin(e)*n,alpha:t.alpha})},interpolate:function(t,e,n){return{h:function(t,e,n){var r=e-t;return t+n*(r>180||r<-180?r-360*Math.round(r/360):r)}(t.h,e.h,n),c:St(t.c,e.c,n),l:St(t.l,e.l,n),alpha:St(t.alpha,e.alpha,n)}}},te=Object.freeze({lab:Jt,hcl:$t}),ee=function(t,e,n,r,i){this.type=t,this.operator=e,this.interpolation=n,this.input=r,this.labels=[],this.outputs=[];for(var o=0,a=i;o1}))return e.error("Cubic bezier interpolation requires four numeric arguments with values between 0 and 1.",1);r={name:"cubic-bezier",controlPoints:s}}if(t.length-1<4)return e.error("Expected at least 4 arguments, but found only "+(t.length-1)+".");if((t.length-1)%2!=0)return e.error("Expected an even number of arguments.");if(!(i=e.parse(i,2,X)))return null;var l=[],c=null;"interpolate-hcl"===n||"interpolate-lab"===n?c=J:e.expectedType&&"value"!==e.expectedType.kind&&(c=e.expectedType);for(var u=0;u=p)return e.error('Input/output pairs for "interpolate" expressions must be arranged with input values in strictly ascending order.',h);var d=e.parse(A,f,c);if(!d)return null;c=c||d.type,l.push([p,d])}return"number"===c.kind||"color"===c.kind||"array"===c.kind&&"number"===c.itemType.kind&&"number"==typeof c.N?new ee(c,n,r,i,l):e.error("Type "+it(c)+" is not interpolatable.")},ee.prototype.evaluate=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;if(r>=e[i-1])return n[i-1].evaluate(t);var o=It(e,r),a=e[o],s=e[o+1],l=ee.interpolationFactor(this.interpolation,r,a,s),c=n[o].evaluate(t),u=n[o+1].evaluate(t);return"interpolate"===this.operator?zt[this.type.kind.toLowerCase()](c,u,l):"interpolate-hcl"===this.operator?$t.reverse($t.interpolate($t.forward(c),$t.forward(u),l)):Jt.reverse(Jt.interpolate(Jt.forward(c),Jt.forward(u),l))},ee.prototype.eachChild=function(t){t(this.input);for(var e=0,n=this.outputs;e=n.length)throw new _t("Array index out of bounds: "+e+" > "+(n.length-1)+".");if(e!==Math.floor(e))throw new _t("Array index must be an integer, but found "+e+" instead.");return n[e]},oe.prototype.eachChild=function(t){t(this.index),t(this.input)},oe.prototype.possibleOutputs=function(){return[void 0]},oe.prototype.serialize=function(){return["at",this.index.serialize(),this.input.serialize()]};var ae=function(t,e,n,r,i,o){this.inputType=t,this.type=e,this.input=n,this.cases=r,this.outputs=i,this.otherwise=o};ae.parse=function(t,e){if(t.length<5)return e.error("Expected at least 4 arguments, but found only "+(t.length-1)+".");if(t.length%2!=1)return e.error("Expected an even number of arguments.");var n,r;e.expectedType&&"value"!==e.expectedType.kind&&(r=e.expectedType);for(var i={},o=[],a=2;aNumber.MAX_SAFE_INTEGER)return c.error("Branch labels must be integers no larger than "+Number.MAX_SAFE_INTEGER+".");if("number"==typeof A&&Math.floor(A)!==A)return c.error("Numeric branch labels must be integer values.");if(n){if(c.checkSubtype(n,ht(A)))return null}else n=ht(A);if(void 0!==i[String(A)])return c.error("Branch labels must be unique.");i[String(A)]=o.length}var h=e.parse(l,a,r);if(!h)return null;r=r||h.type,o.push(h)}var f=e.parse(t[1],1,tt);if(!f)return null;var d=e.parse(t[t.length-1],t.length-1,r);return d?"value"!==f.type.kind&&e.concat(1).checkSubtype(n,f.type)?null:new ae(n,r,f,i,o,d):null},ae.prototype.evaluate=function(t){var e=this.input.evaluate(t);return(ht(e)===this.inputType&&this.outputs[this.cases[e]]||this.otherwise).evaluate(t)},ae.prototype.eachChild=function(t){t(this.input),this.outputs.forEach(t),t(this.otherwise)},ae.prototype.possibleOutputs=function(){return(t=[]).concat.apply(t,this.outputs.map(function(t){return t.possibleOutputs()})).concat(this.otherwise.possibleOutputs());var t},ae.prototype.serialize=function(){for(var t=this,e=["match",this.input.serialize()],n=[],r={},i=0,o=Object.keys(this.cases).sort();i",function(t,e,n){return e>n},function(t,e,n,r){return r.compare(e,n)>0}),de=ue("<=",function(t,e,n){return e<=n},function(t,e,n,r){return r.compare(e,n)<=0}),_e=ue(">=",function(t,e,n){return e>=n},function(t,e,n,r){return r.compare(e,n)>=0}),ge=function(t){this.type=X,this.input=t};ge.parse=function(t,e){if(2!==t.length)return e.error("Expected 1 argument, but found "+(t.length-1)+" instead.");var n=e.parse(t[1],1);return n?"array"!==n.type.kind&&"string"!==n.type.kind&&"value"!==n.type.kind?e.error("Expected argument of type string or array, but found "+it(n.type)+" instead."):new ge(n):null},ge.prototype.evaluate=function(t){var e=this.input.evaluate(t);if("string"==typeof e)return e.length;if(Array.isArray(e))return e.length;throw new _t("Expected value to be of type string or array, but found "+it(ht(e))+" instead.")},ge.prototype.eachChild=function(t){t(this.input)},ge.prototype.possibleOutputs=function(){return[void 0]},ge.prototype.serialize=function(){var t=["length"];return this.eachChild(function(e){t.push(e.serialize())}),t};var ye={"==":pe,"!=":Ae,">":fe,"<":he,">=":_e,"<=":de,array:yt,at:oe,boolean:yt,case:se,coalesce:re,collator:Mt,format:mt,interpolate:ee,"interpolate-hcl":ee,"interpolate-lab":ee,length:ge,let:ie,literal:dt,match:ae,number:yt,object:yt,step:Tt,string:yt,"to-boolean":bt,"to-color":bt,"to-number":bt,"to-string":bt,var:kt};function me(t,e){var n=e[0],r=e[1],i=e[2],o=e[3];n=n.evaluate(t),r=r.evaluate(t),i=i.evaluate(t);var a=o?o.evaluate(t):1,s=At(n,r,i,a);if(s)throw new _t(s);return new lt(n/255*a,r/255*a,i/255*a,a)}function ve(t,e){return t in e}function be(t,e){var n=e[t];return void 0===n?null:n}function we(t){return{type:t}}function xe(t){return{result:"success",value:t}}function Ee(t){return{result:"error",value:t}}function Me(t){return"data-driven"===t["property-type"]||"cross-faded-data-driven"===t["property-type"]}function Ce(t){return!!t.expression&&t.expression.parameters.indexOf("zoom")>-1}function Be(t){return!!t.expression&&t.expression.interpolated}function Oe(t){return t instanceof Number?"number":t instanceof String?"string":t instanceof Boolean?"boolean":Array.isArray(t)?"array":null===t?"null":typeof t}function ke(t){return"object"==typeof t&&null!==t&&!Array.isArray(t)}function Pe(t){return t}function Ie(t,e){var n,r,i,o="color"===e.type,a=t.stops&&"object"==typeof t.stops[0][0],s=a||void 0!==t.property,l=a||!s,c=t.type||(Be(e)?"exponential":"interval");if(o&&((t=V({},t)).stops&&(t.stops=t.stops.map(function(t){return[t[0],lt.parse(t[1])]})),t.default?t.default=lt.parse(t.default):t.default=lt.parse(e.default)),t.colorSpace&&"rgb"!==t.colorSpace&&!te[t.colorSpace])throw new Error("Unknown color space: "+t.colorSpace);if("exponential"===c)n=Se;else if("interval"===c)n=Le;else if("categorical"===c){n=De,r=Object.create(null);for(var u=0,p=t.stops;u=t.stops[r-1][0])return t.stops[r-1][1];var i=Re(t.stops,n);return t.stops[i][1]}function Se(t,e,n){var r=void 0!==t.base?t.base:1;if("number"!==Oe(n))return Te(t.default,e.default);var i=t.stops.length;if(1===i)return t.stops[0][1];if(n<=t.stops[0][0])return t.stops[0][1];if(n>=t.stops[i-1][0])return t.stops[i-1][1];var o=Re(t.stops,n),a=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[o][0],t.stops[o+1][0]),s=t.stops[o][1],l=t.stops[o+1][1],c=zt[e.type]||Pe;if(t.colorSpace&&"rgb"!==t.colorSpace){var u=te[t.colorSpace];c=function(t,e){return u.reverse(u.interpolate(u.forward(t),u.forward(e),a))}}return"function"==typeof s.evaluate?{evaluate:function(){for(var t=[],e=arguments.length;e--;)t[e]=arguments[e];var n=s.evaluate.apply(void 0,t),r=l.evaluate.apply(void 0,t);if(void 0!==n&&void 0!==r)return c(n,r,a)}}:c(s,l,a)}function ze(t,e,n){return"color"===e.type?n=lt.parse(n):"formatted"===e.type?n=pt.fromString(n.toString()):Oe(n)===e.type||"enum"===e.type&&e.values[n]||(n=void 0),Te(n,t.default,e.default)}function Re(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&&ee&&(o=a-1)}return Math.max(a-1,0)}Et.register(ye,{error:[{kind:"error"},[Y],function(t,e){var n=e[0];throw new _t(n.evaluate(t))}],typeof:[Y,[tt],function(t,e){return it(ht(e[0].evaluate(t)))}],"to-rgba":[rt(X,4),[J],function(t,e){return e[0].evaluate(t).toArray()}],rgb:[J,[X,X,X],me],rgba:[J,[X,X,X,X],me],has:{type:Z,overloads:[[[Y],function(t,e){return ve(e[0].evaluate(t),t.properties())}],[[Y,$],function(t,e){var n=e[0],r=e[1];return ve(n.evaluate(t),r.evaluate(t))}]]},get:{type:tt,overloads:[[[Y],function(t,e){return be(e[0].evaluate(t),t.properties())}],[[Y,$],function(t,e){var n=e[0],r=e[1];return be(n.evaluate(t),r.evaluate(t))}]]},"feature-state":[tt,[Y],function(t,e){return be(e[0].evaluate(t),t.featureState||{})}],properties:[$,[],function(t){return t.properties()}],"geometry-type":[Y,[],function(t){return t.geometryType()}],id:[tt,[],function(t){return t.id()}],zoom:[X,[],function(t){return t.globals.zoom}],"heatmap-density":[X,[],function(t){return t.globals.heatmapDensity||0}],"line-progress":[X,[],function(t){return t.globals.lineProgress||0}],"+":[X,we(X),function(t,e){for(var n=0,r=0,i=e;r":[Z,[Y,tt],function(t,e){var n=e[0],r=e[1],i=t.properties()[n.value],o=r.value;return typeof i==typeof o&&i>o}],"filter-id->":[Z,[tt],function(t,e){var n=e[0],r=t.id(),i=n.value;return typeof r==typeof i&&r>i}],"filter-<=":[Z,[Y,tt],function(t,e){var n=e[0],r=e[1],i=t.properties()[n.value],o=r.value;return typeof i==typeof o&&i<=o}],"filter-id-<=":[Z,[tt],function(t,e){var n=e[0],r=t.id(),i=n.value;return typeof r==typeof i&&r<=i}],"filter->=":[Z,[Y,tt],function(t,e){var n=e[0],r=e[1],i=t.properties()[n.value],o=r.value;return typeof i==typeof o&&i>=o}],"filter-id->=":[Z,[tt],function(t,e){var n=e[0],r=t.id(),i=n.value;return typeof r==typeof i&&r>=i}],"filter-has":[Z,[tt],function(t,e){return e[0].value in t.properties()}],"filter-has-id":[Z,[],function(t){return null!==t.id()}],"filter-type-in":[Z,[rt(Y)],function(t,e){return e[0].value.indexOf(t.geometryType())>=0}],"filter-id-in":[Z,[rt(tt)],function(t,e){return e[0].value.indexOf(t.id())>=0}],"filter-in-small":[Z,[Y,rt(tt)],function(t,e){var n=e[0];return e[1].value.indexOf(t.properties()[n.value])>=0}],"filter-in-large":[Z,[Y,rt(tt)],function(t,e){var n=e[0],r=e[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()[n.value],r.value,0,r.value.length-1)}],all:{type:Z,overloads:[[[Z,Z],function(t,e){var n=e[0],r=e[1];return n.evaluate(t)&&r.evaluate(t)}],[we(Z),function(t,e){for(var n=0,r=e;n0&&"string"==typeof t[0]&&t[0]in ye}function Fe(t,e){var n=new Pt(ye,[],function(t){var e={color:J,string:Y,number:X,enum:Y,boolean:Z,formatted:nt};if("array"===t.type)return rt(e[t.value]||tt,t.length);return e[t.type]}(e)),r=n.parse(t,void 0,void 0,void 0,"string"===e.type?{typeAnnotation:"coerce"}:void 0);return r?xe(new je(r,e)):Ee(n.errors)}je.prototype.evaluateWithoutErrorHandling=function(t,e,n){return this._evaluator.globals=t,this._evaluator.feature=e,this._evaluator.featureState=n,this.expression.evaluate(this._evaluator)},je.prototype.evaluate=function(t,e,n){this._evaluator.globals=t,this._evaluator.feature=e||null,this._evaluator.featureState=n||null;try{var r=this.expression.evaluate(this._evaluator);if(null===r||void 0===r)return this._defaultValue;if(this._enumValues&&!(r in this._enumValues))throw new _t("Expected value to be one of "+Object.keys(this._enumValues).map(function(t){return JSON.stringify(t)}).join(", ")+", but found "+JSON.stringify(r)+" instead.");return r}catch(t){return this._warningHistory[t.message]||(this._warningHistory[t.message]=!0,"undefined"!=typeof console&&console.warn(t.message)),this._defaultValue}};var Qe=function(t,e){this.kind=t,this._styleExpression=e,this.isStateDependent="constant"!==t&&!Bt(e.expression)};Qe.prototype.evaluateWithoutErrorHandling=function(t,e,n){return this._styleExpression.evaluateWithoutErrorHandling(t,e,n)},Qe.prototype.evaluate=function(t,e,n){return this._styleExpression.evaluate(t,e,n)};var Ke=function(t,e,n){this.kind=t,this.zoomStops=n.labels,this._styleExpression=e,this.isStateDependent="camera"!==t&&!Bt(e.expression),n instanceof ee&&(this._interpolationType=n.interpolation)};function We(t,e){if("error"===(t=Fe(t,e)).result)return t;var n=t.value.expression,r=Ct(n);if(!r&&!Me(e))return Ee([new N("","data expressions not supported")]);var i=Ot(n,["zoom"]);if(!i&&!Ce(e))return Ee([new N("","zoom expressions not supported")]);var o=function t(e){var n=null;if(e instanceof ie)n=t(e.result);else if(e instanceof re)for(var r=0,i=e.args;r3&&e===t[t.length-2]||(r&&2===t.length||t.push(e),t.push(n))}function Je(t,e){return t.type?t.type:e.expression.interpolated?"exponential":"interval"}function $e(t){for(var e=["concat"],n=/{([^{}]+)}/g,r=0,i=n.exec(t);null!==i;i=n.exec(t)){var o=t.slice(r,n.lastIndex-i[0].length);r=n.lastIndex,o.length>0&&e.push(o),e.push(["get",i[1]])}if(1===e.length)return t;if(r=2&&"$id"!==t[1]&&"$type"!==t[1];case"in":case"!in":case"!has":case"none":return!1;case"==":case"!=":case">":case">=":case"<":case"<=":return 3!==t.length||Array.isArray(t[1])||Array.isArray(t[2]);case"any":case"all":for(var e=0,n=t.slice(1);ee?1:0}function rn(t){if(!t)return!0;var e=t[0];return t.length<=1?"any"!==e:"=="===e?on(t[1],t[2],"=="):"!="===e?ln(on(t[1],t[2],"==")):"<"===e||">"===e||"<="===e||">="===e?on(t[1],t[2],e):"any"===e?function(t){return["any"].concat(t.map(rn))}(t.slice(1)):"all"===e?["all"].concat(t.slice(1).map(rn)):"none"===e?["all"].concat(t.slice(1).map(rn).map(ln)):"in"===e?an(t[1],t.slice(2)):"!in"===e?ln(an(t[1],t.slice(2))):"has"===e?sn(t[1]):"!has"!==e||ln(sn(t[1]))}function on(t,e,n){switch(t){case"$type":return["filter-type-"+n,e];case"$id":return["filter-id-"+n,e];default:return["filter-"+n,t,e]}}function an(t,e){if(0===e.length)return!1;switch(t){case"$type":return["filter-type-in",["literal",e]];case"$id":return["filter-id-in",["literal",e]];default:return e.length>200&&!e.some(function(t){return typeof t!=typeof e[0]})?["filter-in-large",t,["literal",e.sort(nn)]]:["filter-in-small",t,["literal",e]]}}function sn(t){switch(t){case"$type":return!0;case"$id":return["filter-has-id"];default:return["filter-has",t]}}function ln(t){return["!",t]}function cn(t){return function t(e,n){if(tn(e))return e;if(!e)return!0;var r=e[0];if(e.length<=1)return"any"!==r;var i;if("=="===r||"!="===r||"<"===r||">"===r||"<="===r||">="===r){var o=e,a=o[1],s=o[2];i=function(t,e,n,r){var i;if("$type"===t)return[n,["geometry-type"],e];i="$id"===t?["id"]:["get",t];if(r&&null!==e){var o=typeof e;r[t]=o}if("=="===n&&"$id"!==t&&null===e)return["all",["has",t],["==",i,null]];if("!="===n&&"$id"!==t&&null===e)return["any",["!",["has",t]],["!=",i,null]];return[n,i,e]}(a,s,r,n)}else{if("any"===r){var l=e.slice(1).map(function(e){var n={},r=t(e,n),i=function(t){var e=[];for(var n in t){var r="$id"===n?["id"]:["get",n];e.push(["==",["typeof",r],t[n]])}if(0===e.length)return!0;if(1===e.length)return e[0];return["all"].concat(e)}(n);return!0===i?r:["case",i,r,!1]});return["any"].concat(l)}if("all"===r){var c=e.slice(1).map(function(e){return t(e,n)});return["all"].concat(c)}if("none"===r)return["!",t(["any"].concat(e.slice(1)),{})];i="in"===r?un(e[1],e.slice(2)):"!in"===r?un(e[1],e.slice(2),!0):"has"===r?pn(e[1]):"!has"!==r||["!",pn(e[1])]}return i}(t,{})}function un(t,e,n){if(void 0===n&&(n=!1),0===e.length)return n;var r;r="$type"===t?["geometry-type"]:"$id"===t?["id"]:["get",t];for(var i=!0,o=typeof e[0],a=0,s=e;ar.maximum?[new bn(e,n,n+" is greater than the maximum value "+r.maximum)]:[]}function kn(t){var e,n,r,i=t.valueSpec,o=En(t.value.type),a={},s="categorical"!==o&&void 0===t.value.property,l=!s,c="array"===Oe(t.value.stops)&&"array"===Oe(t.value.stops[0])&&"object"===Oe(t.value.stops[0][0]),u=Cn({key:t.key,value:t.value,valueSpec:t.styleSpec.function,style:t.style,styleSpec:t.styleSpec,objectElementValidators:{stops:function(t){if("identity"===o)return[new bn(t.key,t.value,'identity function may not have a "stops" property')];var e=[],n=t.value;e=e.concat(Bn({key:t.key,value:n,valueSpec:t.valueSpec,style:t.style,styleSpec:t.styleSpec,arrayElementValidator:p})),"array"===Oe(n)&&0===n.length&&e.push(new bn(t.key,n,"array must have at least one stop"));return e},default:function(t){return Qn({key:t.key,value:t.value,valueSpec:i,style:t.style,styleSpec:t.styleSpec})}}});return"identity"===o&&s&&u.push(new bn(t.key,t.value,'missing required property "property"')),"identity"===o||t.value.stops||u.push(new bn(t.key,t.value,'missing required property "stops"')),"exponential"===o&&t.valueSpec.expression&&!Be(t.valueSpec)&&u.push(new bn(t.key,t.value,"exponential functions not supported")),t.styleSpec.$version>=8&&(l&&!Me(t.valueSpec)?u.push(new bn(t.key,t.value,"property functions not supported")):s&&!Ce(t.valueSpec)&&u.push(new bn(t.key,t.value,"zoom functions not supported"))),"categorical"!==o&&!c||void 0!==t.value.property||u.push(new bn(t.key,t.value,'"property" property is required')),u;function p(t){var e=[],o=t.value,s=t.key;if("array"!==Oe(o))return[new bn(s,o,"array expected, "+Oe(o)+" found")];if(2!==o.length)return[new bn(s,o,"array length 2 expected, length "+o.length+" found")];if(c){if("object"!==Oe(o[0]))return[new bn(s,o,"object expected, "+Oe(o[0])+" found")];if(void 0===o[0].zoom)return[new bn(s,o,"object stop key must have zoom")];if(void 0===o[0].value)return[new bn(s,o,"object stop key must have value")];if(r&&r>En(o[0].zoom))return[new bn(s,o[0].zoom,"stop zoom values must appear in ascending order")];En(o[0].zoom)!==r&&(r=En(o[0].zoom),n=void 0,a={}),e=e.concat(Cn({key:s+"[0]",value:o[0],valueSpec:{zoom:{}},style:t.style,styleSpec:t.styleSpec,objectElementValidators:{zoom:On,value:A}}))}else e=e.concat(A({key:s+"[0]",value:o[0],valueSpec:{},style:t.style,styleSpec:t.styleSpec},o));return e.concat(Qn({key:s+"[1]",value:o[1],valueSpec:i,style:t.style,styleSpec:t.styleSpec}))}function A(t,r){var s=Oe(t.value),l=En(t.value),c=null!==t.value?t.value:r;if(e){if(s!==e)return[new bn(t.key,c,s+" stop domain type must match previous stop domain type "+e)]}else e=s;if("number"!==s&&"string"!==s&&"boolean"!==s)return[new bn(t.key,c,"stop domain value must be a number, string, or boolean")];if("number"!==s&&"categorical"!==o){var u="number expected, "+s+" found";return Me(i)&&void 0===o&&(u+='\nIf you intended to use a categorical function, specify `"type": "categorical"`.'),[new bn(t.key,c,u)]}return"categorical"!==o||"number"!==s||isFinite(l)&&Math.floor(l)===l?"categorical"!==o&&"number"===s&&void 0!==n&&l":case">=":n.length>=2&&"$type"===En(n[1])&&a.push(new bn(r,n,'"$type" cannot be use with operator "'+n[0]+'"'));case"==":case"!=":3!==n.length&&a.push(new bn(r,n,'filter array for operator "'+n[0]+'" must have 3 elements'));case"in":case"!in":n.length>=2&&"string"!==(o=Oe(n[1]))&&a.push(new bn(r+"[1]",n[1],"string expected, "+o+" found"));for(var s=2;s2&&M.push("'"+this.terminals_[w]+"'");B=p.showPosition?"Parse error on line "+(s+1)+":\n"+p.showPosition()+"\nExpecting "+M.join(", ")+", got '"+(this.terminals_[g]||g)+"'":"Parse error on line "+(s+1)+": Unexpected "+(g==c?"end of input":"'"+(this.terminals_[g]||g)+"'"),this.parseError(B,{text:p.match,token:this.terminals_[g]||g,line:p.yylineno,loc:f,expected:M})}if(v[0]instanceof Array&&v.length>1)throw new Error("Parse Error: multiple actions possible at state: "+m+", token: "+g);switch(v[0]){case 1:n.push(g),r.push(p.yytext),i.push(p.yylloc),n.push(v[1]),g=null,y?(g=y,y=null):(l=p.yyleng,a=p.yytext,s=p.yylineno,f=p.yylloc);break;case 2:if(x=this.productions_[v[1]][1],C.$=r[r.length-x],C._$={first_line:i[i.length-(x||1)].first_line,last_line:i[i.length-1].last_line,first_column:i[i.length-(x||1)].first_column,last_column:i[i.length-1].last_column},d&&(C._$.range=[i[i.length-(x||1)].range[0],i[i.length-1].range[1]]),void 0!==(b=this.performAction.apply(C,[a,l,s,A.yy,v[1],r,i].concat(u))))return b;x&&(n=n.slice(0,-1*x*2),r=r.slice(0,-1*x),i=i.slice(0,-1*x)),n.push(this.productions_[v[1]][0]),r.push(C.$),i.push(C._$),E=o[n[n.length-2]][n[n.length-1]],n.push(E);break;case 3:return!0}}return!0}},A={EOF:1,parseError:function(t,e){if(!this.yy.parser)throw new Error(t);this.yy.parser.parseError(t,e)},setInput:function(t,e){return this.yy=e||this.yy||{},this._input=t,this._more=this._backtrack=this.done=!1,this.yylineno=this.yyleng=0,this.yytext=this.matched=this.match="",this.conditionStack=["INITIAL"],this.yylloc={first_line:1,first_column:0,last_line:1,last_column:0},this.options.ranges&&(this.yylloc.range=[0,0]),this.offset=0,this},input:function(){var t=this._input[0];return this.yytext+=t,this.yyleng++,this.offset++,this.match+=t,this.matched+=t,t.match(/(?:\r\n?|\n).*/g)?(this.yylineno++,this.yylloc.last_line++):this.yylloc.last_column++,this.options.ranges&&this.yylloc.range[1]++,this._input=this._input.slice(1),t},unput:function(t){var e=t.length,n=t.split(/(?:\r\n?|\n)/g);this._input=t+this._input,this.yytext=this.yytext.substr(0,this.yytext.length-e),this.offset-=e;var r=this.match.split(/(?:\r\n?|\n)/g);this.match=this.match.substr(0,this.match.length-1),this.matched=this.matched.substr(0,this.matched.length-1),n.length-1&&(this.yylineno-=n.length-1);var i=this.yylloc.range;return this.yylloc={first_line:this.yylloc.first_line,last_line:this.yylineno+1,first_column:this.yylloc.first_column,last_column:n?(n.length===r.length?this.yylloc.first_column:0)+r[r.length-n.length].length-n[0].length:this.yylloc.first_column-e},this.options.ranges&&(this.yylloc.range=[i[0],i[0]+this.yyleng-e]),this.yyleng=this.yytext.length,this},more:function(){return this._more=!0,this},reject:function(){return this.options.backtrack_lexer?(this._backtrack=!0,this):this.parseError("Lexical error on line "+(this.yylineno+1)+". You can only invoke reject() in the lexer when the lexer is of the backtracking persuasion (options.backtrack_lexer = true).\n"+this.showPosition(),{text:"",token:null,line:this.yylineno})},less:function(t){this.unput(this.match.slice(t))},pastInput:function(){var t=this.matched.substr(0,this.matched.length-this.match.length);return(t.length>20?"...":"")+t.substr(-20).replace(/\n/g,"")},upcomingInput:function(){var t=this.match;return t.length<20&&(t+=this._input.substr(0,20-t.length)),(t.substr(0,20)+(t.length>20?"...":"")).replace(/\n/g,"")},showPosition:function(){var t=this.pastInput(),e=new Array(t.length+1).join("-");return t+this.upcomingInput()+"\n"+e+"^"},test_match:function(t,e){var n,r,i;if(this.options.backtrack_lexer&&(i={yylineno:this.yylineno,yylloc:{first_line:this.yylloc.first_line,last_line:this.last_line,first_column:this.yylloc.first_column,last_column:this.yylloc.last_column},yytext:this.yytext,match:this.match,matches:this.matches,matched:this.matched,yyleng:this.yyleng,offset:this.offset,_more:this._more,_input:this._input,yy:this.yy,conditionStack:this.conditionStack.slice(0),done:this.done},this.options.ranges&&(i.yylloc.range=this.yylloc.range.slice(0))),(r=t[0].match(/(?:\r\n?|\n).*/g))&&(this.yylineno+=r.length),this.yylloc={first_line:this.yylloc.last_line,last_line:this.yylineno+1,first_column:this.yylloc.last_column,last_column:r?r[r.length-1].length-r[r.length-1].match(/\r?\n?/)[0].length:this.yylloc.last_column+t[0].length},this.yytext+=t[0],this.match+=t[0],this.matches=t,this.yyleng=this.yytext.length,this.options.ranges&&(this.yylloc.range=[this.offset,this.offset+=this.yyleng]),this._more=!1,this._backtrack=!1,this._input=this._input.slice(t[0].length),this.matched+=t[0],n=this.performAction.call(this,this.yy,this,e,this.conditionStack[this.conditionStack.length-1]),this.done&&this._input&&(this.done=!1),n)return n;if(this._backtrack){for(var o in i)this[o]=i[o];return!1}return!1},next:function(){var t,e,n,r;if(this.done)return this.EOF;this._input||(this.done=!0),this._more||(this.yytext="",this.match="");for(var i=this._currentRules(),o=0;oe[0].length)){if(e=n,r=o,this.options.backtrack_lexer){if(!1!==(t=this.test_match(n,i[o])))return t;if(this._backtrack){e=!1;continue}return!1}if(!this.options.flex)break}return e?!1!==(t=this.test_match(e,i[r]))&&t:""===this._input?this.EOF:this.parseError("Lexical error on line "+(this.yylineno+1)+". Unrecognized text.\n"+this.showPosition(),{text:"",token:null,line:this.yylineno})},lex:function(){var t=this.next();return t||this.lex()},begin:function(t){this.conditionStack.push(t)},popState:function(){return this.conditionStack.length-1>0?this.conditionStack.pop():this.conditionStack[0]},_currentRules:function(){return this.conditionStack.length&&this.conditionStack[this.conditionStack.length-1]?this.conditions[this.conditionStack[this.conditionStack.length-1]].rules:this.conditions.INITIAL.rules},topState:function(t){return(t=this.conditionStack.length-1-Math.abs(t||0))>=0?this.conditionStack[t]:"INITIAL"},pushState:function(t){this.begin(t)},stateStackSize:function(){return this.conditionStack.length},options:{},performAction:function(t,e,n,r){switch(n){case 0:break;case 1:return 6;case 2:return e.yytext=e.yytext.substr(1,e.yyleng-2),4;case 3:return 17;case 4:return 18;case 5:return 23;case 6:return 24;case 7:return 22;case 8:return 21;case 9:return 10;case 10:return 11;case 11:return 8;case 12:return 14;case 13:return"INVALID"}},rules:[/^(?:\s+)/,/^(?:(-?([0-9]|[1-9][0-9]+))(\.[0-9]+)?([eE][-+]?[0-9]+)?\b)/,/^(?:"(?:\\[\\"bfnrt/]|\\u[a-fA-F0-9]{4}|[^\\\0-\x09\x0a-\x1f"])*")/,/^(?:\{)/,/^(?:\})/,/^(?:\[)/,/^(?:\])/,/^(?:,)/,/^(?::)/,/^(?:true\b)/,/^(?:false\b)/,/^(?:null\b)/,/^(?:$)/,/^(?:.)/],conditions:{INITIAL:{rules:[0,1,2,3,4,5,6,7,8,9,10,11,12,13],inclusive:!0}}};function h(){this.yy={}}return p.lexer=A,h.prototype=p,p.Parser=h,new h}();e.parser=n,e.Parser=n.Parser,e.parse=function(){return n.parse.apply(n,arguments)}});Nn.parser,Nn.Parser,Nn.parse;function Gn(t,e){if(t instanceof String||"string"==typeof t||t instanceof n)try{t=Nn.parse(t.toString())}catch(t){return[new wn(t)]}return Wn(t,e=e||r)}var qn={StyleExpression:je,isExpression:Ue,createExpression:Fe,createPropertyExpression:We,normalizePropertyExpression:function(t,e){if(ke(t))return new He(t,e);if(Ue(t)){var n=We(t,e);if("error"===n.result)throw new Error(n.value.map(function(t){return t.key+": "+t.message}).join(", "));return n.value}var r=t;return"string"==typeof t&&"color"===e.type&&(r=lt.parse(t)),{kind:"constant",evaluate:function(){return r}}},ZoomConstantExpression:Qe,ZoomDependentExpression:Ke,StylePropertyFunction:He},Xn={convertFunction:Ne,createFunction:Ie,isFunction:ke},Yn={eachSource:R,eachLayer:j,eachProperty:U};Gn.parsed=Gn,Gn.latest=Gn,e.v8=r,e.latest=r,e.format=function(t,e){return void 0===e&&(e=2),(t=s(t,r.$root)).layers&&(t.layers=t.layers.map(function(t){return s(t,r.layer)})),a(t,{indent:e})},e.migrate=function(t){var e=!1;if(7===t.version&&(t=H(t),e=!0),8===t.version&&(e=function(t){var e=[];return j(t,function(t){t.filter&&(t.filter=cn(t.filter))}),U(t,{paint:!0,layout:!0},function(t){var n=t.path,r=t.value,i=t.reference,o=t.set;Ue(r)||("object"!=typeof r||Array.isArray(r)?i.tokens&&"string"==typeof r&&o($e(r)):(o(Ne(r,i)),e.push(n.join("."))))}),t}(t),e=!0),!e)throw new Error("cannot migrate from",t.version);return t},e.composite=function(t){var e=[],n=[],r=[];for(var i in t.sources){var o=t.sources[i];if("vector"===o.type){var a=/^mapbox:\/\/(.*)/.exec(o.url);a&&(e.push(i),n.push(a[1]))}}if(e.length<2)return t;e.forEach(function(e){delete t.sources[e]});var s=n.join(",");return t.sources[s]={type:"vector",url:"mapbox://"+s},t.layers.forEach(function(t){if(e.indexOf(t.source)>=0&&(t.source=s,"source-layer"in t)){if(r.indexOf(t["source-layer"])>=0)throw new Error("Conflicting source layer names");r.push(t["source-layer"])}}),t},e.diff=function(t,e){if(!t)return[{command:hn.setStyle,args:[e]}];var n=[];try{if(!An(t.version,e.version))return[{command:hn.setStyle,args:[e]}];An(t.center,e.center)||n.push({command:hn.setCenter,args:[e.center]}),An(t.zoom,e.zoom)||n.push({command:hn.setZoom,args:[e.zoom]}),An(t.bearing,e.bearing)||n.push({command:hn.setBearing,args:[e.bearing]}),An(t.pitch,e.pitch)||n.push({command:hn.setPitch,args:[e.pitch]}),An(t.sprite,e.sprite)||n.push({command:hn.setSprite,args:[e.sprite]}),An(t.glyphs,e.glyphs)||n.push({command:hn.setGlyphs,args:[e.glyphs]}),An(t.transition,e.transition)||n.push({command:hn.setTransition,args:[e.transition]}),An(t.light,e.light)||n.push({command:hn.setLight,args:[e.light]});var r={},i=[];!function(t,e,n,r){var i;for(i in t=t||{},e=e||{},t)t.hasOwnProperty(i)&&(e.hasOwnProperty(i)||dn(i,n,r));for(i in e)e.hasOwnProperty(i)&&(t.hasOwnProperty(i)?An(t[i],e[i])||("geojson"===t[i].type&&"geojson"===e[i].type&&gn(t,e,i)?n.push({command:hn.setGeoJSONSourceData,args:[i,e[i].data]}):_n(i,e,n,r)):fn(i,e,n))}(t.sources,e.sources,i,r);var o=[];t.layers&&t.layers.forEach(function(t){r[t.source]?n.push({command:hn.removeLayer,args:[t.id]}):o.push(t)}),n=n.concat(i),function(t,e,n){t=t||[],e=e||[];var r,i,o,a,s,l,c,u=t.map(mn),p=e.map(mn),A=t.reduce(vn,{}),h=e.reduce(vn,{}),f=u.slice(),d=Object.create(null);for(r=0,i=0;r1?n:2,o=e;void 0===o&&(o=i>2?t.slice():new Array(r));for(var a=c,s=0;sa?u=a:u<-a&&(u=-a),o[s+1]=u}return o}function d(t,e,n){var r=t.length,i=n>1?n:2,o=e;void 0===o&&(o=i>2?t.slice():new Array(r));for(var a=0;a2&&void 0!==arguments[2]?arguments[2]:{},r=t.sources[e];if(!r)return t;if(!r.hasOwnProperty("url"))return t;var i=f(e,t,n);return i?o({},t,{sources:o({},t.sources,a({},e,o({},r,{url:r.url.replace("{key}",i)})))}):t}function _(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},n=t;if(Object.keys(t.sources).forEach(function(t){n=d(n,t,e)}),t.glyphs&&t.glyphs.match(/\.tilehosting\.com/)){var r=f("openmaptiles",t,e);r&&(n=o({},n,{glyphs:t.glyphs.replace("{key}",r)}))}return n}var g={ensureStyleValidity:A,emptyStyle:s,indexOfLayer:h,generateId:l,replaceAccessTokens:_};e.a=g,function(){var e=n(2).default,r=n(2).leaveModule;e&&(e.register(s,"emptyStyle","/Users/peter.richardson/work/maputnik-editor/src/libs/style.js"),e.register(l,"generateId","/Users/peter.richardson/work/maputnik-editor/src/libs/style.js"),e.register(c,"ensureHasId","/Users/peter.richardson/work/maputnik-editor/src/libs/style.js"),e.register(u,"ensureHasNoInteractive","/Users/peter.richardson/work/maputnik-editor/src/libs/style.js"),e.register(p,"ensureHasNoRefs","/Users/peter.richardson/work/maputnik-editor/src/libs/style.js"),e.register(A,"ensureStyleValidity","/Users/peter.richardson/work/maputnik-editor/src/libs/style.js"),e.register(h,"indexOfLayer","/Users/peter.richardson/work/maputnik-editor/src/libs/style.js"),e.register(f,"getAccessToken","/Users/peter.richardson/work/maputnik-editor/src/libs/style.js"),e.register(d,"replaceSourceAccessToken","/Users/peter.richardson/work/maputnik-editor/src/libs/style.js"),e.register(_,"replaceAccessTokens","/Users/peter.richardson/work/maputnik-editor/src/libs/style.js"),e.register(g,"default","/Users/peter.richardson/work/maputnik-editor/src/libs/style.js"),r(t))}()}).call(this,n(8)(t))},function(t,e,n){"use strict";e.a={OPACITY:"opacity",VISIBLE:"visible",EXTENT:"extent",Z_INDEX:"zIndex",MAX_RESOLUTION:"maxResolution",MIN_RESOLUTION:"minResolution",SOURCE:"source"}},function(t,e,n){"use strict";var r=n(130),i=n(41),o=n(24),a="length",s=function(t){function e(e,n){t.call(this,e),this.element=n}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e}(n(25).a),l=function(t){function e(e,n){t.call(this);var r=n||{};if(this.unique_=!!r.unique,this.array_=e||[],this.unique_)for(var i=0,o=this.array_.length;i0;)this.pop()},e.prototype.extend=function(t){for(var e=0,n=t.length;ethis.props.max))}},{key:"render",value:function(){var t=this;return react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement("input",{spellCheck:"false",className:"maputnik-number",placeholder:this.props.default,value:this.state.value,onChange:function(e){return t.changeValue(e.target.value)},onBlur:this.resetValue})}},{key:"__reactstandin__regenerateByEval",value:function __reactstandin__regenerateByEval(key,code){this[key]=eval(code)}}],[{key:"getDerivedStateFromProps",value:function(t,e){return{value:t.value}}}]),NumberInput}(react__WEBPACK_IMPORTED_MODULE_0___default.a.Component);_defineProperty(NumberInput,"propTypes",{value:prop_types__WEBPACK_IMPORTED_MODULE_1___default.a.number,default:prop_types__WEBPACK_IMPORTED_MODULE_1___default.a.number,min:prop_types__WEBPACK_IMPORTED_MODULE_1___default.a.number,max:prop_types__WEBPACK_IMPORTED_MODULE_1___default.a.number,onChange:prop_types__WEBPACK_IMPORTED_MODULE_1___default.a.func});var _default=NumberInput;__webpack_exports__.a=_default,function(){var t=__webpack_require__(2).default,e=__webpack_require__(2).leaveModule;t&&(t.register(NumberInput,"NumberInput","/Users/peter.richardson/work/maputnik-editor/src/components/inputs/NumberInput.jsx"),t.register(_default,"default","/Users/peter.richardson/work/maputnik-editor/src/components/inputs/NumberInput.jsx"),e(module))}()}).call(this,__webpack_require__(8)(module))},function(t,e,n){"use strict";e.a={ADD:"add",REMOVE:"remove"}},function(t,e,n){"use strict";function r(t,e,n,r,i,o){for(var a=o||[],s=0,l=e;l0&&!Array.isArray(e[0])&&(e=e.map(function(t){return[t,t]})),react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement("select",{className:"maputnik-select","data-wd-key":this.props["data-wd-key"],style:this.props.style,value:this.props.value,onChange:function(e){return t.props.onChange(e.target.value)}},e.map(function(t){var e=_slicedToArray(t,2),n=e[0],r=e[1];return react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement("option",{key:n,value:n},r)}))}},{key:"__reactstandin__regenerateByEval",value:function __reactstandin__regenerateByEval(key,code){this[key]=eval(code)}}]),SelectInput}(react__WEBPACK_IMPORTED_MODULE_0___default.a.Component);_defineProperty(SelectInput,"propTypes",{value:prop_types__WEBPACK_IMPORTED_MODULE_1___default.a.string.isRequired,"data-wd-key":prop_types__WEBPACK_IMPORTED_MODULE_1___default.a.string,options:prop_types__WEBPACK_IMPORTED_MODULE_1___default.a.array.isRequired,style:prop_types__WEBPACK_IMPORTED_MODULE_1___default.a.object,onChange:prop_types__WEBPACK_IMPORTED_MODULE_1___default.a.func.isRequired});var _default=SelectInput;__webpack_exports__.a=_default,function(){var t=__webpack_require__(2).default,e=__webpack_require__(2).leaveModule;t&&(t.register(SelectInput,"SelectInput","/Users/peter.richardson/work/maputnik-editor/src/components/inputs/SelectInput.jsx"),t.register(_default,"default","/Users/peter.richardson/work/maputnik-editor/src/components/inputs/SelectInput.jsx"),e(module))}()}).call(this,__webpack_require__(8)(module))},function(t,e,n){"use strict";e.a={IMAGE:"IMAGE",TILE:"TILE",VECTOR_TILE:"VECTOR_TILE",VECTOR:"VECTOR"}},function(t,e,n){"use strict";e.a={UNDEFINED:"undefined",LOADING:"loading",READY:"ready",ERROR:"error"}},function(t,e,n){"use strict";function r(t,e,n,r,i){for(var o=void 0!==i?i:[],a=0,s=e;s1)l=n;else{if(h>0){for(var f=0;fo&&(o=u),a=l,s=c}return o}function a(t,e,n,r,i){for(var a=0,s=n.length;a0&&t[1]>0}function i(t,e,n){return void 0===n&&(n=[0,0]),n[0]=t[0]*e+.5|0,n[1]=t[1]*e+.5|0,n}function o(t,e){return Array.isArray(t)?t:(void 0===e?e=[t,t]:e[0]=e[1]=t,e)}n.d(e,"a",function(){return r}),n.d(e,"b",function(){return i}),n.d(e,"c",function(){return o})},function(t,e,n){"use strict";var r=n(97),i=n(4),o=n(12),a=n(25),s=function(t){function e(){t.call(this),this.pendingRemovals_={},this.dispatching_={},this.listeners_={}}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype.addEventListener=function(t,e){var n=this.listeners_[t];n||(n=this.listeners_[t]=[]),-1===n.indexOf(e)&&n.push(e)},e.prototype.dispatchEvent=function(t){var e="string"==typeof t?new a.a(t):t,n=e.type;e.target=this;var r,i=this.listeners_[n];if(i){n in this.dispatching_||(this.dispatching_[n]=0,this.pendingRemovals_[n]=0),++this.dispatching_[n];for(var s=0,l=i.length;s0},e.prototype.removeEventListener=function(t,e){var n=this.listeners_[t];if(n){var r=n.indexOf(e);t in this.pendingRemovals_?(n[r]=o.c,++this.pendingRemovals_[t]):(n.splice(r,1),0===n.length&&delete this.listeners_[t])}},e}(r.a);e.a=s},function(t,e,n){"use strict";function r(t,e,n,r){for(var i=0,o=n.length;i0;){for(var A=u.pop(),h=u.pop(),f=0,d=t[h],_=t[h+1],g=t[A],y=t[A+1],m=h+i;mf&&(p=m,f=w)}f>o&&(c[(p-e)/i]=1,h+i0&&_>f)&&(d<0&&g0&&g>d)?(l=A,c=h):(o[s++]=l,o[s++]=c,u=l,p=c,l=A,c=h)}}return o[s++]=l,o[s++]=c,s}function l(t,e,n,r,i,o,a,l){for(var c=0,u=n.length;c=1024){var s=0;for(var l in t)0==(3&s++)&&(delete t[l],--e)}i=function(t){var e,n,i,s,l;a.exec(t)&&(t=function(t){var e=document.createElement("div");if(e.style.color=t,""!==e.style.color){document.body.appendChild(e);var n=getComputedStyle(e).color;return document.body.removeChild(e),n}return""}(t));if(o.exec(t)){var c,p=t.length-1;c=p<=4?1:2;var A=4===p||8===p;e=parseInt(t.substr(1+0*c,c),16),n=parseInt(t.substr(1+1*c,c),16),i=parseInt(t.substr(1+2*c,c),16),s=A?parseInt(t.substr(1+3*c,c),16):255,1==c&&(e=(e<<4)+e,n=(n<<4)+n,i=(i<<4)+i,A&&(s=(s<<4)+s)),l=[e,n,i,s/255]}else 0==t.indexOf("rgba(")?u(l=t.slice(5,-1).split(",").map(Number)):0==t.indexOf("rgb(")?((l=t.slice(4,-1).split(",").map(Number)).push(1),u(l)):Object(r.a)(!1,14);return l}(n),t[n]=i,++e}return i}}();function c(t){return Array.isArray(t)?t:l(t)}function u(t){return t[0]=Object(i.a)(t[0]+.5|0,0,255),t[1]=Object(i.a)(t[1]+.5|0,0,255),t[2]=Object(i.a)(t[2]+.5|0,0,255),t[3]=Object(i.a)(t[3],0,1),t}function p(t){var e=t[0];e!=(0|e)&&(e=e+.5|0);var n=t[1];n!=(0|n)&&(n=n+.5|0);var r=t[2];return r!=(0|r)&&(r=r+.5|0),"rgba("+e+","+n+","+r+","+(void 0===t[3]?1:t[3])+")"}},function(t,e,n){"use strict";n.d(e,"a",function(){return i}),n.d(e,"b",function(){return o}),n.d(e,"c",function(){return a}),n.d(e,"d",function(){return s});var r=n(3);function i(t,e,n,i,a){return!Object(r.t)(a,function(r){return!o(t,e,n,i,r[0],r[1])})}function o(t,e,n,r,i,o){for(var a=0,s=t[n-r],l=t[n-r+1];eo&&(c-s)*(o-l)-(i-s)*(u-l)>0&&a++:u<=o&&(c-s)*(o-l)-(i-s)*(u-l)<0&&a--,s=c,l=u}return 0!==a}function a(t,e,n,r,i,a){if(0===n.length)return!1;if(!o(t,e,n[0],r,i,a))return!1;for(var s=1,l=n.length;s=0;--r)if(t[r]!=e[r]){n=!1;break}return n}function o(t,e){var n=Math.cos(e),r=Math.sin(e),i=t[0]*n-t[1]*r,o=t[1]*n+t[0]*r;return t[0]=i,t[1]=o,t}function a(t,e){return t[0]*=e,t[1]*=e,t}n.d(e,"a",function(){return r}),n.d(e,"b",function(){return i}),n.d(e,"c",function(){return o}),n.d(e,"d",function(){return a})},function(t,e,n){"use strict";e.a={IMAGE:"image",HYBRID:"hybrid",VECTOR:"vector"}},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.ReactCSS=e.loop=e.handleActive=e.handleHover=e.hover=void 0;var r=c(n(377)),i=c(n(451)),o=c(n(476)),a=c(n(477)),s=c(n(478)),l=c(n(479));function c(t){return t&&t.__esModule?t:{default:t}}e.hover=a.default,e.handleHover=a.default,e.handleActive=s.default,e.loop=l.default;var u=e.ReactCSS=function(t){for(var e=arguments.length,n=Array(e>1?e-1:0),a=1;a=t.minResolution&&er)return r;for(;no?n=i:r=i,i=.5*(r-n)+n}return i},r.prototype.solve=function(t,e){return this.sampleCurveY(this.solveCurveX(t,e))};var i=function(t,e,n){this.column=t,this.row=e,this.zoom=n};i.prototype.clone=function(){return new i(this.column,this.row,this.zoom)},i.prototype.zoomTo=function(t){return this.clone()._zoomTo(t)},i.prototype.sub=function(t){return this.clone()._sub(t)},i.prototype._zoomTo=function(t){var e=Math.pow(2,t-this.zoom);return this.column*=e,this.row*=e,this.zoom=t,this},i.prototype._sub=function(t){return t=t.zoomTo(this.zoom),this.column-=t.column,this.row-=t.row,this};var o=a;function a(t,e){this.x=t,this.y=e}function s(t,e){if(Array.isArray(t)){if(!Array.isArray(e)||t.length!==e.length)return!1;for(var n=0;n0;)e[n]=arguments[n+1];for(var r=0,i=e;r(e.y-t.y)*(n.x-t.x)}function w(t){for(var e=0,n=0,r=t.length,i=r-1,o=void 0,a=void 0;n=200&&n.status<300||0===n.status)&&n.response?e(null,{data:r,cacheControl:n.getResponseHeader("Cache-Control"),expires:n.getResponseHeader("Expires")}):e(new k(n.statusText,n.status,t.url))},n.send(),{cancel:function(){return n.abort()}}};function T(t,e,n){n[t]&&-1!==n[t].indexOf(e)||(n[t]=n[t]||[],n[t].push(e))}function D(t,e,n){if(n&&n[t]){var r=n[t].indexOf(e);-1!==r&&n[t].splice(r,1)}}var L=function(t,e){void 0===e&&(e={}),p(this,e),this.type=t},S=function(t){function e(e,n){void 0===n&&(n={}),t.call(this,"error",p({error:e},n))}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e}(L),z=function(){};z.prototype.on=function(t,e){return this._listeners=this._listeners||{},T(t,e,this._listeners),this},z.prototype.off=function(t,e){return D(t,e,this._listeners),D(t,e,this._oneTimeListeners),this},z.prototype.once=function(t,e){return this._oneTimeListeners=this._oneTimeListeners||{},T(t,e,this._oneTimeListeners),this},z.prototype.fire=function(t){"string"==typeof t&&(t=new L(t,arguments[1]||{}));var e=t.type;if(this.listens(e)){t.target=this;for(var n=0,r=this._listeners&&this._listeners[e]?this._listeners[e].slice():[];n0||this._oneTimeListeners&&this._oneTimeListeners[t]&&this._oneTimeListeners[t].length>0||this._eventedParent&&this._eventedParent.listens(t)},z.prototype.setEventedParent=function(t,e){return this._eventedParent=t,this._eventedParentData=e,this};var R={$version:8,$root:{version:{required:!0,type:"enum",values:[8]},name:{type:"string"},metadata:{type:"*"},center:{type:"array",value:"number"},zoom:{type:"number"},bearing:{type:"number",default:0,period:360,units:"degrees"},pitch:{type:"number",default:0,units:"degrees"},light:{type:"light"},sources:{required:!0,type:"sources"},sprite:{type:"string"},glyphs:{type:"string"},transition:{type:"transition"},layers:{required:!0,type:"array",value:"layer"}},sources:{"*":{type:"source"}},source:["source_vector","source_raster","source_raster_dem","source_geojson","source_video","source_image"],source_vector:{type:{required:!0,type:"enum",values:{vector:{}}},url:{type:"string"},tiles:{type:"array",value:"string"},bounds:{type:"array",value:"number",length:4,default:[-180,-85.051129,180,85.051129]},scheme:{type:"enum",values:{xyz:{},tms:{}},default:"xyz"},minzoom:{type:"number",default:0},maxzoom:{type:"number",default:22},attribution:{type:"string"},"*":{type:"*"}},source_raster:{type:{required:!0,type:"enum",values:{raster:{}}},url:{type:"string"},tiles:{type:"array",value:"string"},bounds:{type:"array",value:"number",length:4,default:[-180,-85.051129,180,85.051129]},minzoom:{type:"number",default:0},maxzoom:{type:"number",default:22},tileSize:{type:"number",default:512,units:"pixels"},scheme:{type:"enum",values:{xyz:{},tms:{}},default:"xyz"},attribution:{type:"string"},"*":{type:"*"}},source_raster_dem:{type:{required:!0,type:"enum",values:{"raster-dem":{}}},url:{type:"string"},tiles:{type:"array",value:"string"},bounds:{type:"array",value:"number",length:4,default:[-180,-85.051129,180,85.051129]},minzoom:{type:"number",default:0},maxzoom:{type:"number",default:22},tileSize:{type:"number",default:512,units:"pixels"},attribution:{type:"string"},encoding:{type:"enum",values:{terrarium:{},mapbox:{}},default:"mapbox"},"*":{type:"*"}},source_geojson:{type:{required:!0,type:"enum",values:{geojson:{}}},data:{type:"*"},maxzoom:{type:"number",default:18},attribution:{type:"string"},buffer:{type:"number",default:128,maximum:512,minimum:0},tolerance:{type:"number",default:.375},cluster:{type:"boolean",default:!1},clusterRadius:{type:"number",default:50,minimum:0},clusterMaxZoom:{type:"number"},lineMetrics:{type:"boolean",default:!1},generateId:{type:"boolean",default:!1}},source_video:{type:{required:!0,type:"enum",values:{video:{}}},urls:{required:!0,type:"array",value:"string"},coordinates:{required:!0,type:"array",length:4,value:{type:"array",length:2,value:"number"}}},source_image:{type:{required:!0,type:"enum",values:{image:{}}},url:{required:!0,type:"string"},coordinates:{required:!0,type:"array",length:4,value:{type:"array",length:2,value:"number"}}},layer:{id:{type:"string",required:!0},type:{type:"enum",values:{fill:{},line:{},symbol:{},circle:{},heatmap:{},"fill-extrusion":{},raster:{},hillshade:{},background:{}},required:!0},metadata:{type:"*"},source:{type:"string"},"source-layer":{type:"string"},minzoom:{type:"number",minimum:0,maximum:24},maxzoom:{type:"number",minimum:0,maximum:24},filter:{type:"filter"},layout:{type:"layout"},paint:{type:"paint"}},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:{},none:{}},default:"visible","property-type":"constant"}},layout_fill:{visibility:{type:"enum",values:{visible:{},none:{}},default:"visible","property-type":"constant"}},layout_circle:{visibility:{type:"enum",values:{visible:{},none:{}},default:"visible","property-type":"constant"}},layout_heatmap:{visibility:{type:"enum",values:{visible:{},none:{}},default:"visible","property-type":"constant"}},layout_line:{"line-cap":{type:"enum",values:{butt:{},round:{},square:{}},default:"butt",expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"line-join":{type:"enum",values:{bevel:{},round:{},miter:{}},default:"miter",expression:{interpolated:!1,parameters:["zoom","feature"]},"property-type":"data-driven"},"line-miter-limit":{type:"number",default:2,requires:[{"line-join":"miter"}],expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"line-round-limit":{type:"number",default:1.05,requires:[{"line-join":"round"}],expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},visibility:{type:"enum",values:{visible:{},none:{}},default:"visible","property-type":"constant"}},layout_symbol:{"symbol-placement":{type:"enum",values:{point:{},line:{},"line-center":{}},default:"point",expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"symbol-spacing":{type:"number",default:250,minimum:1,units:"pixels",requires:[{"symbol-placement":"line"}],expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"symbol-avoid-edges":{type:"boolean",default:!1,expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"symbol-z-order":{type:"enum",values:{"viewport-y":{},source:{}},default:"viewport-y",expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"icon-allow-overlap":{type:"boolean",default:!1,requires:["icon-image"],expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"icon-ignore-placement":{type:"boolean",default:!1,requires:["icon-image"],expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"icon-optional":{type:"boolean",default:!1,requires:["icon-image","text-field"],expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"icon-rotation-alignment":{type:"enum",values:{map:{},viewport:{},auto:{}},default:"auto",requires:["icon-image"],expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"icon-size":{type:"number",default:1,minimum:0,units:"factor of the original icon size",requires:["icon-image"],expression:{interpolated:!0,parameters:["zoom","feature"]},"property-type":"data-driven"},"icon-text-fit":{type:"enum",values:{none:{},width:{},height:{},both:{}},default:"none",requires:["icon-image","text-field"],expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"icon-text-fit-padding":{type:"array",value:"number",length:4,default:[0,0,0,0],units:"pixels",requires:["icon-image","text-field",{"icon-text-fit":["both","width","height"]}],expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"icon-image":{type:"string",tokens:!0,expression:{interpolated:!1,parameters:["zoom","feature"]},"property-type":"data-driven"},"icon-rotate":{type:"number",default:0,period:360,units:"degrees",requires:["icon-image"],expression:{interpolated:!0,parameters:["zoom","feature"]},"property-type":"data-driven"},"icon-padding":{type:"number",default:2,minimum:0,units:"pixels",requires:["icon-image"],expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"icon-keep-upright":{type:"boolean",default:!1,requires:["icon-image",{"icon-rotation-alignment":"map"},{"symbol-placement":["line","line-center"]}],expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"icon-offset":{type:"array",value:"number",length:2,default:[0,0],requires:["icon-image"],expression:{interpolated:!0,parameters:["zoom","feature"]},"property-type":"data-driven"},"icon-anchor":{type:"enum",values:{center:{},left:{},right:{},top:{},bottom:{},"top-left":{},"top-right":{},"bottom-left":{},"bottom-right":{}},default:"center",requires:["icon-image"],expression:{interpolated:!1,parameters:["zoom","feature"]},"property-type":"data-driven"},"icon-pitch-alignment":{type:"enum",values:{map:{},viewport:{},auto:{}},default:"auto",requires:["icon-image"],expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"text-pitch-alignment":{type:"enum",values:{map:{},viewport:{},auto:{}},default:"auto",requires:["text-field"],expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"text-rotation-alignment":{type:"enum",values:{map:{},viewport:{},auto:{}},default:"auto",requires:["text-field"],expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"text-field":{type:"formatted",default:"",tokens:!0,expression:{interpolated:!1,parameters:["zoom","feature"]},"property-type":"data-driven"},"text-font":{type:"array",value:"string",default:["Open Sans Regular","Arial Unicode MS Regular"],requires:["text-field"],expression:{interpolated:!1,parameters:["zoom","feature"]},"property-type":"data-driven"},"text-size":{type:"number",default:16,minimum:0,units:"pixels",requires:["text-field"],expression:{interpolated:!0,parameters:["zoom","feature"]},"property-type":"data-driven"},"text-max-width":{type:"number",default:10,minimum:0,units:"ems",requires:["text-field"],expression:{interpolated:!0,parameters:["zoom","feature"]},"property-type":"data-driven"},"text-line-height":{type:"number",default:1.2,units:"ems",requires:["text-field"],expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"text-letter-spacing":{type:"number",default:0,units:"ems",requires:["text-field"],expression:{interpolated:!0,parameters:["zoom","feature"]},"property-type":"data-driven"},"text-justify":{type:"enum",values:{left:{},center:{},right:{}},default:"center",requires:["text-field"],expression:{interpolated:!1,parameters:["zoom","feature"]},"property-type":"data-driven"},"text-anchor":{type:"enum",values:{center:{},left:{},right:{},top:{},bottom:{},"top-left":{},"top-right":{},"bottom-left":{},"bottom-right":{}},default:"center",requires:["text-field"],expression:{interpolated:!1,parameters:["zoom","feature"]},"property-type":"data-driven"},"text-max-angle":{type:"number",default:45,units:"degrees",requires:["text-field",{"symbol-placement":["line","line-center"]}],expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"text-rotate":{type:"number",default:0,period:360,units:"degrees",requires:["text-field"],expression:{interpolated:!0,parameters:["zoom","feature"]},"property-type":"data-driven"},"text-padding":{type:"number",default:2,minimum:0,units:"pixels",requires:["text-field"],expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"text-keep-upright":{type:"boolean",default:!0,requires:["text-field",{"text-rotation-alignment":"map"},{"symbol-placement":["line","line-center"]}],expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"text-transform":{type:"enum",values:{none:{},uppercase:{},lowercase:{}},default:"none",requires:["text-field"],expression:{interpolated:!1,parameters:["zoom","feature"]},"property-type":"data-driven"},"text-offset":{type:"array",value:"number",units:"ems",length:2,default:[0,0],requires:["text-field"],expression:{interpolated:!0,parameters:["zoom","feature"]},"property-type":"data-driven"},"text-allow-overlap":{type:"boolean",default:!1,requires:["text-field"],expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"text-ignore-placement":{type:"boolean",default:!1,requires:["text-field"],expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"text-optional":{type:"boolean",default:!1,requires:["text-field","icon-image"],expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},visibility:{type:"enum",values:{visible:{},none:{}},default:"visible","property-type":"constant"}},layout_raster:{visibility:{type:"enum",values:{visible:{},none:{}},default:"visible","property-type":"constant"}},layout_hillshade:{visibility:{type:"enum",values:{visible:{},none:{}},default:"visible","property-type":"constant"}},filter:{type:"array",value:"*"},filter_operator:{type:"enum",values:{"==":{},"!=":{},">":{},">=":{},"<":{},"<=":{},in:{},"!in":{},all:{},any:{},none:{},has:{},"!has":{}}},geometry_type:{type:"enum",values:{Point:{},LineString:{},Polygon:{}}},function_stop:{type:"array",minimum:0,maximum:22,value:["number","color"],length:2},expression:{type:"array",value:"*",minimum:1},expression_name:{type:"enum",values:{let:{group:"Variable binding"},var:{group:"Variable binding"},literal:{group:"Types"},array:{group:"Types"},at:{group:"Lookup"},case:{group:"Decision"},match:{group:"Decision"},coalesce:{group:"Decision"},step:{group:"Ramps, scales, curves"},interpolate:{group:"Ramps, scales, curves"},"interpolate-hcl":{group:"Ramps, scales, curves"},"interpolate-lab":{group:"Ramps, scales, curves"},ln2:{group:"Math"},pi:{group:"Math"},e:{group:"Math"},typeof:{group:"Types"},string:{group:"Types"},number:{group:"Types"},boolean:{group:"Types"},object:{group:"Types"},collator:{group:"Types"},format:{group:"Types"},"to-string":{group:"Types"},"to-number":{group:"Types"},"to-boolean":{group:"Types"},"to-rgba":{group:"Color"},"to-color":{group:"Types"},rgb:{group:"Color"},rgba:{group:"Color"},get:{group:"Lookup"},has:{group:"Lookup"},length:{group:"Lookup"},properties:{group:"Feature data"},"feature-state":{group:"Feature data"},"geometry-type":{group:"Feature data"},id:{group:"Feature data"},zoom:{group:"Zoom"},"heatmap-density":{group:"Heatmap"},"line-progress":{group:"Heatmap"},"+":{group:"Math"},"*":{group:"Math"},"-":{group:"Math"},"/":{group:"Math"},"%":{group:"Math"},"^":{group:"Math"},sqrt:{group:"Math"},log10:{group:"Math"},ln:{group:"Math"},log2:{group:"Math"},sin:{group:"Math"},cos:{group:"Math"},tan:{group:"Math"},asin:{group:"Math"},acos:{group:"Math"},atan:{group:"Math"},min:{group:"Math"},max:{group:"Math"},round:{group:"Math"},abs:{group:"Math"},ceil:{group:"Math"},floor:{group:"Math"},"==":{group:"Decision"},"!=":{group:"Decision"},">":{group:"Decision"},"<":{group:"Decision"},">=":{group:"Decision"},"<=":{group:"Decision"},all:{group:"Decision"},any:{group:"Decision"},"!":{group:"Decision"},"is-supported-script":{group:"String"},upcase:{group:"String"},downcase:{group:"String"},concat:{group:"String"},"resolved-locale":{group:"String"}}},light:{anchor:{type:"enum",default:"viewport",values:{map:{},viewport:{}},"property-type":"data-constant",transition:!1,expression:{interpolated:!1,parameters:["zoom"]}},position:{type:"array",default:[1.15,210,30],length:3,value:"number","property-type":"data-constant",transition:!0,expression:{interpolated:!0,parameters:["zoom"]}},color:{type:"color","property-type":"data-constant",default:"#ffffff",expression:{interpolated:!0,parameters:["zoom"]},transition:!0},intensity:{type:"number","property-type":"data-constant",default:.5,minimum:0,maximum:1,expression:{interpolated:!0,parameters:["zoom"]},transition:!0}},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",default:!0,expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"fill-opacity":{type:"number",default:1,minimum:0,maximum:1,transition:!0,expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"fill-color":{type:"color",default:"#000000",transition:!0,requires:[{"!":"fill-pattern"}],expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"fill-outline-color":{type:"color",transition:!0,requires:[{"!":"fill-pattern"},{"fill-antialias":!0}],expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"fill-translate":{type:"array",value:"number",length:2,default:[0,0],transition:!0,units:"pixels",expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"fill-translate-anchor":{type:"enum",values:{map:{},viewport:{}},default:"map",requires:["fill-translate"],expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"fill-pattern":{type:"string",transition:!0,expression:{interpolated:!1,parameters:["zoom","feature"]},"property-type":"cross-faded-data-driven"}},paint_line:{"line-opacity":{type:"number",default:1,minimum:0,maximum:1,transition:!0,expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"line-color":{type:"color",default:"#000000",transition:!0,requires:[{"!":"line-pattern"}],expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"line-translate":{type:"array",value:"number",length:2,default:[0,0],transition:!0,units:"pixels",expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"line-translate-anchor":{type:"enum",values:{map:{},viewport:{}},default:"map",requires:["line-translate"],expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"line-width":{type:"number",default:1,minimum:0,transition:!0,units:"pixels",expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"line-gap-width":{type:"number",default:0,minimum:0,transition:!0,units:"pixels",expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"line-offset":{type:"number",default:0,transition:!0,units:"pixels",expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"line-blur":{type:"number",default:0,minimum:0,transition:!0,units:"pixels",expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"line-dasharray":{type:"array",value:"number",minimum:0,transition:!0,units:"line widths",requires:[{"!":"line-pattern"}],expression:{interpolated:!1,parameters:["zoom"]},"property-type":"cross-faded"},"line-pattern":{type:"string",transition:!0,expression:{interpolated:!1,parameters:["zoom","feature"]},"property-type":"cross-faded-data-driven"},"line-gradient":{type:"color",transition:!1,requires:[{"!":"line-dasharray"},{"!":"line-pattern"},{source:"geojson",has:{lineMetrics:!0}}],expression:{interpolated:!0,parameters:["line-progress"]},"property-type":"color-ramp"}},paint_circle:{"circle-radius":{type:"number",default:5,minimum:0,transition:!0,units:"pixels",expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"circle-color":{type:"color",default:"#000000",transition:!0,expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"circle-blur":{type:"number",default:0,transition:!0,expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"circle-opacity":{type:"number",default:1,minimum:0,maximum:1,transition:!0,expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"circle-translate":{type:"array",value:"number",length:2,default:[0,0],transition:!0,units:"pixels",expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"circle-translate-anchor":{type:"enum",values:{map:{},viewport:{}},default:"map",requires:["circle-translate"],expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"circle-pitch-scale":{type:"enum",values:{map:{},viewport:{}},default:"map",expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"circle-pitch-alignment":{type:"enum",values:{map:{},viewport:{}},default:"viewport",expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"circle-stroke-width":{type:"number",default:0,minimum:0,transition:!0,units:"pixels",expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"circle-stroke-color":{type:"color",default:"#000000",transition:!0,expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"circle-stroke-opacity":{type:"number",default:1,minimum:0,maximum:1,transition:!0,expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"}},paint_heatmap:{"heatmap-radius":{type:"number",default:30,minimum:1,transition:!0,units:"pixels",expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"heatmap-weight":{type:"number",default:1,minimum:0,transition:!1,expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"heatmap-intensity":{type:"number",default:1,minimum:0,transition:!0,expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"heatmap-color":{type:"color",default:["interpolate",["linear"],["heatmap-density"],0,"rgba(0, 0, 255, 0)",.1,"royalblue",.3,"cyan",.5,"lime",.7,"yellow",1,"red"],transition:!1,expression:{interpolated:!0,parameters:["heatmap-density"]},"property-type":"color-ramp"},"heatmap-opacity":{type:"number",default:1,minimum:0,maximum:1,transition:!0,expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"}},paint_symbol:{"icon-opacity":{type:"number",default:1,minimum:0,maximum:1,transition:!0,requires:["icon-image"],expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"icon-color":{type:"color",default:"#000000",transition:!0,requires:["icon-image"],expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"icon-halo-color":{type:"color",default:"rgba(0, 0, 0, 0)",transition:!0,requires:["icon-image"],expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"icon-halo-width":{type:"number",default:0,minimum:0,transition:!0,units:"pixels",requires:["icon-image"],expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"icon-halo-blur":{type:"number",default:0,minimum:0,transition:!0,units:"pixels",requires:["icon-image"],expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"icon-translate":{type:"array",value:"number",length:2,default:[0,0],transition:!0,units:"pixels",requires:["icon-image"],expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"icon-translate-anchor":{type:"enum",values:{map:{},viewport:{}},default:"map",requires:["icon-image","icon-translate"],expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"text-opacity":{type:"number",default:1,minimum:0,maximum:1,transition:!0,requires:["text-field"],expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"text-color":{type:"color",default:"#000000",transition:!0,requires:["text-field"],expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"text-halo-color":{type:"color",default:"rgba(0, 0, 0, 0)",transition:!0,requires:["text-field"],expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"text-halo-width":{type:"number",default:0,minimum:0,transition:!0,units:"pixels",requires:["text-field"],expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"text-halo-blur":{type:"number",default:0,minimum:0,transition:!0,units:"pixels",requires:["text-field"],expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"text-translate":{type:"array",value:"number",length:2,default:[0,0],transition:!0,units:"pixels",requires:["text-field"],expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"text-translate-anchor":{type:"enum",values:{map:{},viewport:{}},default:"map",requires:["text-field","text-translate"],expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"}},paint_raster:{"raster-opacity":{type:"number",default:1,minimum:0,maximum:1,transition:!0,expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"raster-hue-rotate":{type:"number",default:0,period:360,transition:!0,units:"degrees",expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"raster-brightness-min":{type:"number",default:0,minimum:0,maximum:1,transition:!0,expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"raster-brightness-max":{type:"number",default:1,minimum:0,maximum:1,transition:!0,expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"raster-saturation":{type:"number",default:0,minimum:-1,maximum:1,transition:!0,expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"raster-contrast":{type:"number",default:0,minimum:-1,maximum:1,transition:!0,expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"raster-resampling":{type:"enum",values:{linear:{},nearest:{}},default:"linear",expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"raster-fade-duration":{type:"number",default:300,minimum:0,transition:!1,units:"milliseconds",expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"}},paint_hillshade:{"hillshade-illumination-direction":{type:"number",default:335,minimum:0,maximum:359,transition:!1,expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"hillshade-illumination-anchor":{type:"enum",values:{map:{},viewport:{}},default:"viewport",expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"hillshade-exaggeration":{type:"number",default:.5,minimum:0,maximum:1,transition:!0,expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"hillshade-shadow-color":{type:"color",default:"#000000",transition:!0,expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"hillshade-highlight-color":{type:"color",default:"#FFFFFF",transition:!0,expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"hillshade-accent-color":{type:"color",default:"#000000",transition:!0,expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"}},paint_background:{"background-color":{type:"color",default:"#000000",transition:!0,requires:[{"!":"background-pattern"}],expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"background-pattern":{type:"string",transition:!0,expression:{interpolated:!1,parameters:["zoom"]},"property-type":"cross-faded"},"background-opacity":{type:"number",default:1,minimum:0,maximum:1,transition:!0,expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"}},transition:{duration:{type:"number",default:300,minimum:0,units:"milliseconds"},delay:{type:"number",default:0,minimum:0,units:"milliseconds"}},"layout_fill-extrusion":{visibility:{type:"enum",values:{visible:{},none:{}},default:"visible","property-type":"constant"}},function:{expression:{type:"expression"},stops:{type:"array",value:"function_stop"},base:{type:"number",default:1,minimum:0},property:{type:"string",default:"$zoom"},type:{type:"enum",values:{identity:{},exponential:{},interval:{},categorical:{}},default:"exponential"},colorSpace:{type:"enum",values:{rgb:{},lab:{},hcl:{}},default:"rgb"},default:{type:"*",required:!1}},"paint_fill-extrusion":{"fill-extrusion-opacity":{type:"number",default:1,minimum:0,maximum:1,transition:!0,expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"fill-extrusion-color":{type:"color",default:"#000000",transition:!0,requires:[{"!":"fill-extrusion-pattern"}],expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"fill-extrusion-translate":{type:"array",value:"number",length:2,default:[0,0],transition:!0,units:"pixels",expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"fill-extrusion-translate-anchor":{type:"enum",values:{map:{},viewport:{}},default:"map",requires:["fill-extrusion-translate"],expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"fill-extrusion-pattern":{type:"string",transition:!0,expression:{interpolated:!1,parameters:["zoom","feature"]},"property-type":"cross-faded-data-driven"},"fill-extrusion-height":{type:"number",default:0,minimum:0,units:"meters",transition:!0,expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"fill-extrusion-base":{type:"number",default:0,minimum:0,units:"meters",transition:!0,requires:["fill-extrusion-height"],expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"fill-extrusion-vertical-gradient":{type:"boolean",default:!0,transition:!1,expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"}},"property-type":{"data-driven":{type:"property-type"},"cross-faded":{type:"property-type"},"cross-faded-data-driven":{type:"property-type"},"color-ramp":{type:"property-type"},"data-constant":{type:"property-type"},constant:{type:"property-type"}}},j=function(t,e,n,r){this.message=(t?t+": ":"")+n,r&&(this.identifier=r),null!==e&&void 0!==e&&e.__line__&&(this.line=e.__line__)};function U(t){var e=t.key,n=t.value;return n?[new j(e,n,"constants have been deprecated as of v8")]:[]}function F(t){for(var e=[],n=arguments.length-1;n-- >0;)e[n]=arguments[n+1];for(var r=0,i=e;r":"value"===t.itemType.kind?"array":"array<"+e+">"}return t.kind}var nt=[V,N,G,q,X,$,Y,tt(Z)];function rt(t,e){if("error"===e.kind)return null;if("array"===t.kind){if("array"===e.kind&&(0===e.N&&"value"===e.itemType.kind||!rt(t.itemType,e.itemType))&&("number"!=typeof t.N||t.N===e.N))return null}else{if(t.kind===e.kind)return null;if("value"===t.kind)for(var n=0,r=nt;n255?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 l=i.indexOf("("),c=i.indexOf(")");if(-1!==l&&c+1===i.length){var u=i.substr(0,l),p=i.substr(l+1,c-(l+1)).split(","),A=1;switch(u){case"rgba":if(4!==p.length)return null;A=a(p.pop());case"rgb":return 3!==p.length?null:[o(p[0]),o(p[1]),o(p[2]),A];case"hsla":if(4!==p.length)return null;A=a(p.pop());case"hsl":if(3!==p.length)return null;var h=(parseFloat(p[0])%360+360)%360/360,f=a(p[1]),d=a(p[2]),_=d<=.5?d*(f+1):d+f-d*f,g=2*d-_;return[r(255*s(g,_,h+1/3)),r(255*s(g,_,h)),r(255*s(g,_,h-1/3)),A];default:return null}}return null}}catch(t){}}).parseCSSColor,ot=function(t,e,n,r){void 0===r&&(r=1),this.r=t,this.g=e,this.b=n,this.a=r};ot.parse=function(t){if(t){if(t instanceof ot)return t;if("string"==typeof t){var e=it(t);if(e)return new ot(e[0]/255*e[3],e[1]/255*e[3],e[2]/255*e[3],e[3])}}},ot.prototype.toString=function(){var t=this.toArray(),e=t[0],n=t[1],r=t[2],i=t[3];return"rgba("+Math.round(e)+","+Math.round(n)+","+Math.round(r)+","+i+")"},ot.prototype.toArray=function(){var t=this.r,e=this.g,n=this.b,r=this.a;return 0===r?[0,0,0,0]:[255*t/r,255*e/r,255*n/r,r]},ot.black=new ot(0,0,0,1),ot.white=new ot(1,1,1,1),ot.transparent=new ot(0,0,0,0),ot.red=new ot(1,0,0,1);var at=function(t,e,n){this.sensitivity=t?e?"variant":"case":e?"accent":"base",this.locale=n,this.collator=new Intl.Collator(this.locale?this.locale:[],{sensitivity:this.sensitivity,usage:"search"})};at.prototype.compare=function(t,e){return this.collator.compare(t,e)},at.prototype.resolvedLocale=function(){return new Intl.Collator(this.locale?this.locale:[]).resolvedOptions().locale};var st=function(t,e,n){this.text=t,this.scale=e,this.fontStack=n},lt=function(t){this.sections=t};function ct(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 ["+[t,e,n,r].join(", ")+"]: 'a' must be between 0 and 1.":"Invalid rgba value ["+("number"==typeof r?[t,e,n,r]:[t,e,n]).join(", ")+"]: 'r', 'g', and 'b' must be between 0 and 255."}function ut(t){if(null===t)return V;if("string"==typeof t)return G;if("boolean"==typeof t)return q;if("number"==typeof t)return N;if(t instanceof ot)return X;if(t instanceof at)return J;if(t instanceof lt)return $;if(Array.isArray(t)){for(var e,n=t.length,r=0,i=t;r2){var s=t[1];if("string"!=typeof s||!(s in ft)||"object"===s)return e.error('The item type argument of "array" must be one of string, number, boolean',1);o=ft[s],r++}else o=Z;if(t.length>3){if(null!==t[2]&&("number"!=typeof t[2]||t[2]<0||t[2]!==Math.floor(t[2])))return e.error('The length argument to "array" must be a positive integer literal',2);a=t[2],r++}n=tt(o,a)}else n=ft[i];for(var l=[];r1)&&e.push(r)}}return e.concat(this.args.map(function(t){return t.serialize()}))};var _t=function(t){this.type=$,this.sections=t};_t.parse=function(t,e){if(t.length<3)return e.error("Expected at least two arguments.");if((t.length-1)%2!=0)return e.error("Expected an even number of arguments.");for(var n=[],r=1;r4?"Invalid rbga value "+JSON.stringify(e)+": expected an array containing either three or four numeric values.":ct(e[0],e[1],e[2],e[3])))return new ot(e[0]/255,e[1]/255,e[2]/255,e[3])}throw new ht(n||"Could not parse color from value '"+("string"==typeof e?e:JSON.stringify(e))+"'")}if("number"===this.type.kind){for(var a=null,s=0,l=this.args;s=0)return!1;var n=!0;return t.eachChild(function(t){n&&!Mt(t,e)&&(n=!1)}),n}wt.parse=function(t,e){if(2!==t.length)return e.error("Expected one argument.");var n=t[1];if("object"!=typeof n||Array.isArray(n))return e.error("Collator options argument must be an object.");var r=e.parse(void 0!==n["case-sensitive"]&&n["case-sensitive"],1,q);if(!r)return null;var i=e.parse(void 0!==n["diacritic-sensitive"]&&n["diacritic-sensitive"],1,q);if(!i)return null;var o=null;return n.locale&&!(o=e.parse(n.locale,1,G))?null:new wt(r,i,o)},wt.prototype.evaluate=function(t){return new at(this.caseSensitive.evaluate(t),this.diacriticSensitive.evaluate(t),this.locale?this.locale.evaluate(t):null)},wt.prototype.eachChild=function(t){t(this.caseSensitive),t(this.diacriticSensitive),this.locale&&t(this.locale)},wt.prototype.possibleOutputs=function(){return[void 0]},wt.prototype.serialize=function(){var t={};return t["case-sensitive"]=this.caseSensitive.serialize(),t["diacritic-sensitive"]=this.diacriticSensitive.serialize(),this.locale&&(t.locale=this.locale.serialize()),["collator",t]};var Ct=function(t,e){this.type=e.type,this.name=t,this.boundExpression=e};Ct.parse=function(t,e){if(2!==t.length||"string"!=typeof t[1])return e.error("'var' expression requires exactly one string literal argument.");var n=t[1];return e.scope.has(n)?new Ct(n,e.scope.get(n)):e.error('Unknown variable "'+n+'". Make sure "'+n+'" has been bound in an enclosing "let" expression before using it.',1)},Ct.prototype.evaluate=function(t){return this.boundExpression.evaluate(t)},Ct.prototype.eachChild=function(){},Ct.prototype.possibleOutputs=function(){return[void 0]},Ct.prototype.serialize=function(){return["var",this.name]};var Bt=function(t,e,n,r,i){void 0===e&&(e=[]),void 0===r&&(r=new H),void 0===i&&(i=[]),this.registry=t,this.path=e,this.key=e.map(function(t){return"["+t+"]"}).join(""),this.scope=r,this.errors=i,this.expectedType=n};function Ot(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)],r=t[a+1],e===n||e>n&&ee))throw new ht("Input is not a number.");o=a-1}}return Math.max(a-1,0)}Bt.prototype.parse=function(t,e,n,r,i){return void 0===i&&(i={}),e?this.concat(e,n,r)._parse(t,i):this._parse(t,i)},Bt.prototype._parse=function(t,e){function n(t,e,n){return"assert"===n?new dt(e,[t]):"coerce"===n?new yt(e,[t]):t}if(null!==t&&"string"!=typeof t&&"boolean"!=typeof t&&"number"!=typeof t||(t=["literal",t]),Array.isArray(t)){if(0===t.length)return this.error('Expected an array with at least one element. If you wanted a literal array, use ["literal", []].');var r=t[0];if("string"!=typeof r)return this.error("Expression name must be a string, but found "+typeof r+' instead. If you wanted a literal array, use ["literal", [...]].',0),null;var i=this.registry[r];if(i){var o=i.parse(t,this);if(!o)return null;if(this.expectedType){var a=this.expectedType,s=o.type;if("string"!==a.kind&&"number"!==a.kind&&"boolean"!==a.kind&&"object"!==a.kind&&"array"!==a.kind||"value"!==s.kind)if("color"!==a.kind&&"formatted"!==a.kind||"value"!==s.kind&&"string"!==s.kind){if(this.checkSubtype(a,s))return null}else o=n(o,a,e.typeAnnotation||"coerce");else o=n(o,a,e.typeAnnotation||"assert")}if(!(o instanceof At)&&function t(e){if(e instanceof Ct)return t(e.boundExpression);if(e instanceof bt&&"error"===e.name)return!1;if(e instanceof wt)return!1;var n=e instanceof yt||e instanceof dt,r=!0;return e.eachChild(function(e){r=n?r&&t(e):r&&e instanceof At}),!!r&&(xt(e)&&Mt(e,["zoom","heatmap-density","line-progress","is-supported-script"]))}(o)){var l=new vt;try{o=new At(o.type,o.evaluate(l))}catch(t){return this.error(t.message),null}}return o}return this.error('Unknown expression "'+r+'". If you wanted a literal array, use ["literal", [...]].',0)}return void 0===t?this.error("'undefined' value invalid. Use null instead."):"object"==typeof t?this.error('Bare objects invalid. Use ["literal", {...}] instead.'):this.error("Expected an array, but found "+typeof t+" instead.")},Bt.prototype.concat=function(t,e,n){var r="number"==typeof t?this.path.concat(t):this.path,i=n?this.scope.concat(n):this.scope;return new Bt(this.registry,r,e||null,i,this.errors)},Bt.prototype.error=function(t){for(var e=[],n=arguments.length-1;n-- >0;)e[n]=arguments[n+1];var r=""+this.key+e.map(function(t){return"["+t+"]"}).join("");this.errors.push(new W(r,t))},Bt.prototype.checkSubtype=function(t,e){var n=rt(t,e);return n&&this.error(n),n};var kt=function(t,e,n){this.type=t,this.input=e,this.labels=[],this.outputs=[];for(var r=0,i=n;r=s)return e.error('Input/output pairs for "step" expressions must be arranged with input values in strictly ascending order.',c);var p=e.parse(l,u,o);if(!p)return null;o=o||p.type,i.push([s,p])}return new kt(o,n,i)},kt.prototype.evaluate=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[Ot(e,r)].evaluate(t)},kt.prototype.eachChild=function(t){t(this.input);for(var e=0,n=this.outputs;e0&&t.push(this.labels[e]),t.push(this.outputs[e].serialize());return t};var It=Object.freeze({number:Pt,color:function(t,e,n){return new ot(Pt(t.r,e.r,n),Pt(t.g,e.g,n),Pt(t.b,e.b,n),Pt(t.a,e.a,n))},array:function(t,e,n){return t.map(function(t,r){return Pt(t,e[r],n)})}}),Tt=.95047,Dt=1,Lt=1.08883,St=4/29,zt=6/29,Rt=3*zt*zt,jt=zt*zt*zt,Ut=Math.PI/180,Ft=180/Math.PI;function Qt(t){return t>jt?Math.pow(t,1/3):t/Rt+St}function Kt(t){return t>zt?t*t*t:Rt*(t-St)}function Wt(t){return 255*(t<=.0031308?12.92*t:1.055*Math.pow(t,1/2.4)-.055)}function Ht(t){return(t/=255)<=.04045?t/12.92:Math.pow((t+.055)/1.055,2.4)}function Vt(t){var e=Ht(t.r),n=Ht(t.g),r=Ht(t.b),i=Qt((.4124564*e+.3575761*n+.1804375*r)/Tt),o=Qt((.2126729*e+.7151522*n+.072175*r)/Dt);return{l:116*o-16,a:500*(i-o),b:200*(o-Qt((.0193339*e+.119192*n+.9503041*r)/Lt)),alpha:t.a}}function Nt(t){var e=(t.l+16)/116,n=isNaN(t.a)?e:e+t.a/500,r=isNaN(t.b)?e:e-t.b/200;return e=Dt*Kt(e),n=Tt*Kt(n),r=Lt*Kt(r),new ot(Wt(3.2404542*n-1.5371385*e-.4985314*r),Wt(-.969266*n+1.8760108*e+.041556*r),Wt(.0556434*n-.2040259*e+1.0572252*r),t.alpha)}var Gt={forward:Vt,reverse:Nt,interpolate:function(t,e,n){return{l:Pt(t.l,e.l,n),a:Pt(t.a,e.a,n),b:Pt(t.b,e.b,n),alpha:Pt(t.alpha,e.alpha,n)}}},qt={forward:function(t){var e=Vt(t),n=e.l,r=e.a,i=e.b,o=Math.atan2(i,r)*Ft;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*Ut,n=t.c;return Nt({l:t.l,a:Math.cos(e)*n,b:Math.sin(e)*n,alpha:t.alpha})},interpolate:function(t,e,n){return{h:function(t,e,n){var r=e-t;return t+n*(r>180||r<-180?r-360*Math.round(r/360):r)}(t.h,e.h,n),c:Pt(t.c,e.c,n),l:Pt(t.l,e.l,n),alpha:Pt(t.alpha,e.alpha,n)}}},Xt=Object.freeze({lab:Gt,hcl:qt}),Yt=function(t,e,n,r,i){this.type=t,this.operator=e,this.interpolation=n,this.input=r,this.labels=[],this.outputs=[];for(var o=0,a=i;o1}))return e.error("Cubic bezier interpolation requires four numeric arguments with values between 0 and 1.",1);r={name:"cubic-bezier",controlPoints:s}}if(t.length-1<4)return e.error("Expected at least 4 arguments, but found only "+(t.length-1)+".");if((t.length-1)%2!=0)return e.error("Expected an even number of arguments.");if(!(i=e.parse(i,2,N)))return null;var l=[],c=null;"interpolate-hcl"===n||"interpolate-lab"===n?c=X:e.expectedType&&"value"!==e.expectedType.kind&&(c=e.expectedType);for(var u=0;u=p)return e.error('Input/output pairs for "interpolate" expressions must be arranged with input values in strictly ascending order.',h);var d=e.parse(A,f,c);if(!d)return null;c=c||d.type,l.push([p,d])}return"number"===c.kind||"color"===c.kind||"array"===c.kind&&"number"===c.itemType.kind&&"number"==typeof c.N?new Yt(c,n,r,i,l):e.error("Type "+et(c)+" is not interpolatable.")},Yt.prototype.evaluate=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;if(r>=e[i-1])return n[i-1].evaluate(t);var o=Ot(e,r),a=e[o],s=e[o+1],l=Yt.interpolationFactor(this.interpolation,r,a,s),c=n[o].evaluate(t),u=n[o+1].evaluate(t);return"interpolate"===this.operator?It[this.type.kind.toLowerCase()](c,u,l):"interpolate-hcl"===this.operator?qt.reverse(qt.interpolate(qt.forward(c),qt.forward(u),l)):Gt.reverse(Gt.interpolate(Gt.forward(c),Gt.forward(u),l))},Yt.prototype.eachChild=function(t){t(this.input);for(var e=0,n=this.outputs;e=n.length)throw new ht("Array index out of bounds: "+e+" > "+(n.length-1)+".");if(e!==Math.floor(e))throw new ht("Array index must be an integer, but found "+e+" instead.");return n[e]},te.prototype.eachChild=function(t){t(this.index),t(this.input)},te.prototype.possibleOutputs=function(){return[void 0]},te.prototype.serialize=function(){return["at",this.index.serialize(),this.input.serialize()]};var ee=function(t,e,n,r,i,o){this.inputType=t,this.type=e,this.input=n,this.cases=r,this.outputs=i,this.otherwise=o};ee.parse=function(t,e){if(t.length<5)return e.error("Expected at least 4 arguments, but found only "+(t.length-1)+".");if(t.length%2!=1)return e.error("Expected an even number of arguments.");var n,r;e.expectedType&&"value"!==e.expectedType.kind&&(r=e.expectedType);for(var i={},o=[],a=2;aNumber.MAX_SAFE_INTEGER)return c.error("Branch labels must be integers no larger than "+Number.MAX_SAFE_INTEGER+".");if("number"==typeof A&&Math.floor(A)!==A)return c.error("Numeric branch labels must be integer values.");if(n){if(c.checkSubtype(n,ut(A)))return null}else n=ut(A);if(void 0!==i[String(A)])return c.error("Branch labels must be unique.");i[String(A)]=o.length}var h=e.parse(l,a,r);if(!h)return null;r=r||h.type,o.push(h)}var f=e.parse(t[1],1,Z);if(!f)return null;var d=e.parse(t[t.length-1],t.length-1,r);return d?"value"!==f.type.kind&&e.concat(1).checkSubtype(n,f.type)?null:new ee(n,r,f,i,o,d):null},ee.prototype.evaluate=function(t){var e=this.input.evaluate(t);return(ut(e)===this.inputType&&this.outputs[this.cases[e]]||this.otherwise).evaluate(t)},ee.prototype.eachChild=function(t){t(this.input),this.outputs.forEach(t),t(this.otherwise)},ee.prototype.possibleOutputs=function(){return(t=[]).concat.apply(t,this.outputs.map(function(t){return t.possibleOutputs()})).concat(this.otherwise.possibleOutputs());var t},ee.prototype.serialize=function(){for(var t=this,e=["match",this.input.serialize()],n=[],r={},i=0,o=Object.keys(this.cases).sort();i",function(t,e,n){return e>n},function(t,e,n,r){return r.compare(e,n)>0}),ue=oe("<=",function(t,e,n){return e<=n},function(t,e,n,r){return r.compare(e,n)<=0}),pe=oe(">=",function(t,e,n){return e>=n},function(t,e,n,r){return r.compare(e,n)>=0}),Ae=function(t){this.type=N,this.input=t};Ae.parse=function(t,e){if(2!==t.length)return e.error("Expected 1 argument, but found "+(t.length-1)+" instead.");var n=e.parse(t[1],1);return n?"array"!==n.type.kind&&"string"!==n.type.kind&&"value"!==n.type.kind?e.error("Expected argument of type string or array, but found "+et(n.type)+" instead."):new Ae(n):null},Ae.prototype.evaluate=function(t){var e=this.input.evaluate(t);if("string"==typeof e)return e.length;if(Array.isArray(e))return e.length;throw new ht("Expected value to be of type string or array, but found "+et(ut(e))+" instead.")},Ae.prototype.eachChild=function(t){t(this.input)},Ae.prototype.possibleOutputs=function(){return[void 0]},Ae.prototype.serialize=function(){var t=["length"];return this.eachChild(function(e){t.push(e.serialize())}),t};var he={"==":ae,"!=":se,">":ce,"<":le,">=":pe,"<=":ue,array:dt,at:te,boolean:dt,case:ne,coalesce:Jt,collator:wt,format:_t,interpolate:Yt,"interpolate-hcl":Yt,"interpolate-lab":Yt,length:Ae,let:$t,literal:At,match:ee,number:dt,object:dt,step:kt,string:dt,"to-boolean":yt,"to-color":yt,"to-number":yt,"to-string":yt,var:Ct};function fe(t,e){var n=e[0],r=e[1],i=e[2],o=e[3];n=n.evaluate(t),r=r.evaluate(t),i=i.evaluate(t);var a=o?o.evaluate(t):1,s=ct(n,r,i,a);if(s)throw new ht(s);return new ot(n/255*a,r/255*a,i/255*a,a)}function de(t,e){return t in e}function _e(t,e){var n=e[t];return void 0===n?null:n}function ge(t){return{type:t}}function ye(t){return{result:"success",value:t}}function me(t){return{result:"error",value:t}}function ve(t){return"data-driven"===t["property-type"]||"cross-faded-data-driven"===t["property-type"]}function be(t){return!!t.expression&&t.expression.parameters.indexOf("zoom")>-1}function we(t){return!!t.expression&&t.expression.interpolated}function xe(t){return t instanceof Number?"number":t instanceof String?"string":t instanceof Boolean?"boolean":Array.isArray(t)?"array":null===t?"null":typeof t}function Ee(t){return"object"==typeof t&&null!==t&&!Array.isArray(t)}function Me(t){return t}function Ce(t,e,n){return void 0!==t?t:void 0!==e?e:void 0!==n?n:void 0}function Be(t,e,n,r,i){return Ce(typeof n===i?r[n]:void 0,t.default,e.default)}function Oe(t,e,n){if("number"!==xe(n))return Ce(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=Ie(t.stops,n);return t.stops[i][1]}function ke(t,e,n){var r=void 0!==t.base?t.base:1;if("number"!==xe(n))return Ce(t.default,e.default);var i=t.stops.length;if(1===i)return t.stops[0][1];if(n<=t.stops[0][0])return t.stops[0][1];if(n>=t.stops[i-1][0])return t.stops[i-1][1];var o=Ie(t.stops,n),a=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[o][0],t.stops[o+1][0]),s=t.stops[o][1],l=t.stops[o+1][1],c=It[e.type]||Me;if(t.colorSpace&&"rgb"!==t.colorSpace){var u=Xt[t.colorSpace];c=function(t,e){return u.reverse(u.interpolate(u.forward(t),u.forward(e),a))}}return"function"==typeof s.evaluate?{evaluate:function(){for(var t=[],e=arguments.length;e--;)t[e]=arguments[e];var n=s.evaluate.apply(void 0,t),r=l.evaluate.apply(void 0,t);if(void 0!==n&&void 0!==r)return c(n,r,a)}}:c(s,l,a)}function Pe(t,e,n){return"color"===e.type?n=ot.parse(n):"formatted"===e.type?n=lt.fromString(n.toString()):xe(n)===e.type||"enum"===e.type&&e.values[n]||(n=void 0),Ce(n,t.default,e.default)}function Ie(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&&ee&&(o=a-1)}return Math.max(a-1,0)}bt.register(he,{error:[{kind:"error"},[G],function(t,e){var n=e[0];throw new ht(n.evaluate(t))}],typeof:[G,[Z],function(t,e){return et(ut(e[0].evaluate(t)))}],"to-rgba":[tt(N,4),[X],function(t,e){return e[0].evaluate(t).toArray()}],rgb:[X,[N,N,N],fe],rgba:[X,[N,N,N,N],fe],has:{type:q,overloads:[[[G],function(t,e){return de(e[0].evaluate(t),t.properties())}],[[G,Y],function(t,e){var n=e[0],r=e[1];return de(n.evaluate(t),r.evaluate(t))}]]},get:{type:Z,overloads:[[[G],function(t,e){return _e(e[0].evaluate(t),t.properties())}],[[G,Y],function(t,e){var n=e[0],r=e[1];return _e(n.evaluate(t),r.evaluate(t))}]]},"feature-state":[Z,[G],function(t,e){return _e(e[0].evaluate(t),t.featureState||{})}],properties:[Y,[],function(t){return t.properties()}],"geometry-type":[G,[],function(t){return t.geometryType()}],id:[Z,[],function(t){return t.id()}],zoom:[N,[],function(t){return t.globals.zoom}],"heatmap-density":[N,[],function(t){return t.globals.heatmapDensity||0}],"line-progress":[N,[],function(t){return t.globals.lineProgress||0}],"+":[N,ge(N),function(t,e){for(var n=0,r=0,i=e;r":[q,[G,Z],function(t,e){var n=e[0],r=e[1],i=t.properties()[n.value],o=r.value;return typeof i==typeof o&&i>o}],"filter-id->":[q,[Z],function(t,e){var n=e[0],r=t.id(),i=n.value;return typeof r==typeof i&&r>i}],"filter-<=":[q,[G,Z],function(t,e){var n=e[0],r=e[1],i=t.properties()[n.value],o=r.value;return typeof i==typeof o&&i<=o}],"filter-id-<=":[q,[Z],function(t,e){var n=e[0],r=t.id(),i=n.value;return typeof r==typeof i&&r<=i}],"filter->=":[q,[G,Z],function(t,e){var n=e[0],r=e[1],i=t.properties()[n.value],o=r.value;return typeof i==typeof o&&i>=o}],"filter-id->=":[q,[Z],function(t,e){var n=e[0],r=t.id(),i=n.value;return typeof r==typeof i&&r>=i}],"filter-has":[q,[Z],function(t,e){return e[0].value in t.properties()}],"filter-has-id":[q,[],function(t){return null!==t.id()}],"filter-type-in":[q,[tt(G)],function(t,e){return e[0].value.indexOf(t.geometryType())>=0}],"filter-id-in":[q,[tt(Z)],function(t,e){return e[0].value.indexOf(t.id())>=0}],"filter-in-small":[q,[G,tt(Z)],function(t,e){var n=e[0];return e[1].value.indexOf(t.properties()[n.value])>=0}],"filter-in-large":[q,[G,tt(Z)],function(t,e){var n=e[0],r=e[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()[n.value],r.value,0,r.value.length-1)}],all:{type:q,overloads:[[[q,q],function(t,e){var n=e[0],r=e[1];return n.evaluate(t)&&r.evaluate(t)}],[ge(q),function(t,e){for(var n=0,r=e;n0&&"string"==typeof t[0]&&t[0]in he}function Le(t,e){var n=new Bt(he,[],function(t){var e={color:X,string:G,number:N,enum:G,boolean:q,formatted:$};return"array"===t.type?tt(e[t.value]||Z,t.length):e[t.type]}(e)),r=n.parse(t,void 0,void 0,void 0,"string"===e.type?{typeAnnotation:"coerce"}:void 0);return r?ye(new Te(r,e)):me(n.errors)}Te.prototype.evaluateWithoutErrorHandling=function(t,e,n){return this._evaluator.globals=t,this._evaluator.feature=e,this._evaluator.featureState=n,this.expression.evaluate(this._evaluator)},Te.prototype.evaluate=function(t,e,n){this._evaluator.globals=t,this._evaluator.feature=e||null,this._evaluator.featureState=n||null;try{var r=this.expression.evaluate(this._evaluator);if(null===r||void 0===r)return this._defaultValue;if(this._enumValues&&!(r in this._enumValues))throw new ht("Expected value to be one of "+Object.keys(this._enumValues).map(function(t){return JSON.stringify(t)}).join(", ")+", but found "+JSON.stringify(r)+" instead.");return r}catch(t){return this._warningHistory[t.message]||(this._warningHistory[t.message]=!0,"undefined"!=typeof console&&console.warn(t.message)),this._defaultValue}};var Se=function(t,e){this.kind=t,this._styleExpression=e,this.isStateDependent="constant"!==t&&!Et(e.expression)};Se.prototype.evaluateWithoutErrorHandling=function(t,e,n){return this._styleExpression.evaluateWithoutErrorHandling(t,e,n)},Se.prototype.evaluate=function(t,e,n){return this._styleExpression.evaluate(t,e,n)};var ze=function(t,e,n){this.kind=t,this.zoomStops=n.labels,this._styleExpression=e,this.isStateDependent="camera"!==t&&!Et(e.expression),n instanceof Yt&&(this._interpolationType=n.interpolation)};function Re(t,e){if("error"===(t=Le(t,e)).result)return t;var n=t.value.expression,r=xt(n);if(!r&&!ve(e))return me([new W("","data expressions not supported")]);var i=Mt(n,["zoom"]);if(!i&&!be(e))return me([new W("","zoom expressions not supported")]);var o=function t(e){var n=null;if(e instanceof $t)n=t(e.result);else if(e instanceof Jt)for(var r=0,i=e.args;rr.maximum?[new j(e,n,n+" is greater than the maximum value "+r.maximum)]:[]}function We(t){var e,n,r,i=t.valueSpec,o=Q(t.value.type),a={},s="categorical"!==o&&void 0===t.value.property,l=!s,c="array"===xe(t.value.stops)&&"array"===xe(t.value.stops[0])&&"object"===xe(t.value.stops[0][0]),u=Fe({key:t.key,value:t.value,valueSpec:t.styleSpec.function,style:t.style,styleSpec:t.styleSpec,objectElementValidators:{stops:function(t){if("identity"===o)return[new j(t.key,t.value,'identity function may not have a "stops" property')];var e=[],n=t.value;return e=e.concat(Qe({key:t.key,value:n,valueSpec:t.valueSpec,style:t.style,styleSpec:t.styleSpec,arrayElementValidator:p})),"array"===xe(n)&&0===n.length&&e.push(new j(t.key,n,"array must have at least one stop")),e},default:function(t){return pn({key:t.key,value:t.value,valueSpec:i,style:t.style,styleSpec:t.styleSpec})}}});return"identity"===o&&s&&u.push(new j(t.key,t.value,'missing required property "property"')),"identity"===o||t.value.stops||u.push(new j(t.key,t.value,'missing required property "stops"')),"exponential"===o&&t.valueSpec.expression&&!we(t.valueSpec)&&u.push(new j(t.key,t.value,"exponential functions not supported")),t.styleSpec.$version>=8&&(l&&!ve(t.valueSpec)?u.push(new j(t.key,t.value,"property functions not supported")):s&&!be(t.valueSpec)&&u.push(new j(t.key,t.value,"zoom functions not supported"))),"categorical"!==o&&!c||void 0!==t.value.property||u.push(new j(t.key,t.value,'"property" property is required')),u;function p(t){var e=[],o=t.value,s=t.key;if("array"!==xe(o))return[new j(s,o,"array expected, "+xe(o)+" found")];if(2!==o.length)return[new j(s,o,"array length 2 expected, length "+o.length+" found")];if(c){if("object"!==xe(o[0]))return[new j(s,o,"object expected, "+xe(o[0])+" found")];if(void 0===o[0].zoom)return[new j(s,o,"object stop key must have zoom")];if(void 0===o[0].value)return[new j(s,o,"object stop key must have value")];if(r&&r>Q(o[0].zoom))return[new j(s,o[0].zoom,"stop zoom values must appear in ascending order")];Q(o[0].zoom)!==r&&(r=Q(o[0].zoom),n=void 0,a={}),e=e.concat(Fe({key:s+"[0]",value:o[0],valueSpec:{zoom:{}},style:t.style,styleSpec:t.styleSpec,objectElementValidators:{zoom:Ke,value:A}}))}else e=e.concat(A({key:s+"[0]",value:o[0],valueSpec:{},style:t.style,styleSpec:t.styleSpec},o));return e.concat(pn({key:s+"[1]",value:o[1],valueSpec:i,style:t.style,styleSpec:t.styleSpec}))}function A(t,r){var s=xe(t.value),l=Q(t.value),c=null!==t.value?t.value:r;if(e){if(s!==e)return[new j(t.key,c,s+" stop domain type must match previous stop domain type "+e)]}else e=s;if("number"!==s&&"string"!==s&&"boolean"!==s)return[new j(t.key,c,"stop domain value must be a number, string, or boolean")];if("number"!==s&&"categorical"!==o){var u="number expected, "+s+" found";return ve(i)&&void 0===o&&(u+='\nIf you intended to use a categorical function, specify `"type": "categorical"`.'),[new j(t.key,c,u)]}return"categorical"!==o||"number"!==s||isFinite(l)&&Math.floor(l)===l?"categorical"!==o&&"number"===s&&void 0!==n&&l=2&&"$id"!==t[1]&&"$type"!==t[1];case"in":case"!in":case"!has":case"none":return!1;case"==":case"!=":case">":case">=":case"<":case"<=":return 3!==t.length||Array.isArray(t[1])||Array.isArray(t[2]);case"any":case"all":for(var e=0,n=t.slice(1);ee?1:0}function Ye(t){if(!t)return!0;var e,n=t[0];return t.length<=1?"any"!==n:"=="===n?Ze(t[1],t[2],"=="):"!="===n?tn(Ze(t[1],t[2],"==")):"<"===n||">"===n||"<="===n||">="===n?Ze(t[1],t[2],n):"any"===n?(e=t.slice(1),["any"].concat(e.map(Ye))):"all"===n?["all"].concat(t.slice(1).map(Ye)):"none"===n?["all"].concat(t.slice(1).map(Ye).map(tn)):"in"===n?Je(t[1],t.slice(2)):"!in"===n?tn(Je(t[1],t.slice(2))):"has"===n?$e(t[1]):"!has"!==n||tn($e(t[1]))}function Ze(t,e,n){switch(t){case"$type":return["filter-type-"+n,e];case"$id":return["filter-id-"+n,e];default:return["filter-"+n,t,e]}}function Je(t,e){if(0===e.length)return!1;switch(t){case"$type":return["filter-type-in",["literal",e]];case"$id":return["filter-id-in",["literal",e]];default:return e.length>200&&!e.some(function(t){return typeof t!=typeof e[0]})?["filter-in-large",t,["literal",e.sort(Xe)]]:["filter-in-small",t,["literal",e]]}}function $e(t){switch(t){case"$type":return!0;case"$id":return["filter-has-id"];default:return["filter-has",t]}}function tn(t){return["!",t]}function en(t){return Ne(K(t.value))?He(F({},t,{expressionContext:"filter",valueSpec:{value:"boolean"}})):function t(e){var n=e.value,r=e.key;if("array"!==xe(n))return[new j(r,n,"array expected, "+xe(n)+" found")];var i,o=e.styleSpec,a=[];if(n.length<1)return[new j(r,n,"filter array must have at least 1 element")];switch(a=a.concat(Ve({key:r+"[0]",value:n[0],valueSpec:o.filter_operator,style:e.style,styleSpec:e.styleSpec})),Q(n[0])){case"<":case"<=":case">":case">=":n.length>=2&&"$type"===Q(n[1])&&a.push(new j(r,n,'"$type" cannot be use with operator "'+n[0]+'"'));case"==":case"!=":3!==n.length&&a.push(new j(r,n,'filter array for operator "'+n[0]+'" must have 3 elements'));case"in":case"!in":n.length>=2&&"string"!==(i=xe(n[1]))&&a.push(new j(r+"[1]",n[1],"string expected, "+i+" found"));for(var s=2;s=c[A+0]&&r>=c[A+1]?(a[p]=!0,o.push(l[p])):a[p]=!1}}},xn.prototype._forEachCell=function(t,e,n,r,i,o,a){for(var s=this._convertToCellCoord(t),l=this._convertToCellCoord(e),c=this._convertToCellCoord(n),u=this._convertToCellCoord(r),p=s;p<=c;p++)for(var A=l;A<=u;A++){var h=this.d*A+p;if(i.call(this,t,e,n,r,h,o,a))return}},xn.prototype._convertToCellCoord=function(t){return Math.max(0,Math.min(this.d-1,Math.floor(t*this.scale)+this.padding))},xn.prototype.toArrayBuffer=function(){if(this.arrayBuffer)return this.arrayBuffer;for(var t=this.cells,e=wn+this.cells.length+1+1,n=0,r=0;r=0)){var p=t[u];c[u]=Mn[l].shallow.indexOf(u)>=0?p:On(p,e)}t instanceof Error&&(c.message=t.message)}if(c.$name)throw new Error("$name property is reserved for worker serialization logic.");return"Object"!==l&&(c.$name=l),c}throw new Error("can't serialize object of type "+typeof t)}function kn(t){if(null===t||void 0===t||"boolean"==typeof t||"number"==typeof t||"string"==typeof t||t instanceof Boolean||t instanceof Number||t instanceof String||t instanceof Date||t instanceof RegExp||t instanceof ArrayBuffer||ArrayBuffer.isView(t)||t instanceof En)return t;if(Array.isArray(t))return t.map(kn);if("object"==typeof t){var e=t.$name||"Object",n=Mn[e].klass;if(!n)throw new Error("can't deserialize unregistered class "+e);if(n.deserialize)return n.deserialize(t);for(var r=Object.create(n.prototype),i=0,o=Object.keys(t);i=0?s:kn(s)}}return r}throw new Error("can't deserialize object of type "+typeof t)}var Pn=function(){this.first=!0};Pn.prototype.update=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=128&&t<=255},Arabic:function(t){return t>=1536&&t<=1791},"Arabic Supplement":function(t){return t>=1872&&t<=1919},"Arabic Extended-A":function(t){return t>=2208&&t<=2303},"Hangul Jamo":function(t){return t>=4352&&t<=4607},"Unified Canadian Aboriginal Syllabics":function(t){return t>=5120&&t<=5759},Khmer:function(t){return t>=6016&&t<=6143},"Unified Canadian Aboriginal Syllabics Extended":function(t){return t>=6320&&t<=6399},"General Punctuation":function(t){return t>=8192&&t<=8303},"Letterlike Symbols":function(t){return t>=8448&&t<=8527},"Number Forms":function(t){return t>=8528&&t<=8591},"Miscellaneous Technical":function(t){return t>=8960&&t<=9215},"Control Pictures":function(t){return t>=9216&&t<=9279},"Optical Character Recognition":function(t){return t>=9280&&t<=9311},"Enclosed Alphanumerics":function(t){return t>=9312&&t<=9471},"Geometric Shapes":function(t){return t>=9632&&t<=9727},"Miscellaneous Symbols":function(t){return t>=9728&&t<=9983},"Miscellaneous Symbols and Arrows":function(t){return t>=11008&&t<=11263},"CJK Radicals Supplement":function(t){return t>=11904&&t<=12031},"Kangxi Radicals":function(t){return t>=12032&&t<=12255},"Ideographic Description Characters":function(t){return t>=12272&&t<=12287},"CJK Symbols and Punctuation":function(t){return t>=12288&&t<=12351},Hiragana:function(t){return t>=12352&&t<=12447},Katakana:function(t){return t>=12448&&t<=12543},Bopomofo:function(t){return t>=12544&&t<=12591},"Hangul Compatibility Jamo":function(t){return t>=12592&&t<=12687},Kanbun:function(t){return t>=12688&&t<=12703},"Bopomofo Extended":function(t){return t>=12704&&t<=12735},"CJK Strokes":function(t){return t>=12736&&t<=12783},"Katakana Phonetic Extensions":function(t){return t>=12784&&t<=12799},"Enclosed CJK Letters and Months":function(t){return t>=12800&&t<=13055},"CJK Compatibility":function(t){return t>=13056&&t<=13311},"CJK Unified Ideographs Extension A":function(t){return t>=13312&&t<=19903},"Yijing Hexagram Symbols":function(t){return t>=19904&&t<=19967},"CJK Unified Ideographs":function(t){return t>=19968&&t<=40959},"Yi Syllables":function(t){return t>=40960&&t<=42127},"Yi Radicals":function(t){return t>=42128&&t<=42191},"Hangul Jamo Extended-A":function(t){return t>=43360&&t<=43391},"Hangul Syllables":function(t){return t>=44032&&t<=55215},"Hangul Jamo Extended-B":function(t){return t>=55216&&t<=55295},"Private Use Area":function(t){return t>=57344&&t<=63743},"CJK Compatibility Ideographs":function(t){return t>=63744&&t<=64255},"Arabic Presentation Forms-A":function(t){return t>=64336&&t<=65023},"Vertical Forms":function(t){return t>=65040&&t<=65055},"CJK Compatibility Forms":function(t){return t>=65072&&t<=65103},"Small Form Variants":function(t){return t>=65104&&t<=65135},"Arabic Presentation Forms-B":function(t){return t>=65136&&t<=65279},"Halfwidth and Fullwidth Forms":function(t){return t>=65280&&t<=65519}};function Tn(t){for(var e=0,n=t;e=65097&&t<=65103)||In["CJK Compatibility Ideographs"](t)||In["CJK Compatibility"](t)||In["CJK Radicals Supplement"](t)||In["CJK Strokes"](t)||!(!In["CJK Symbols and Punctuation"](t)||t>=12296&&t<=12305||t>=12308&&t<=12319||12336===t)||In["CJK Unified Ideographs Extension A"](t)||In["CJK Unified Ideographs"](t)||In["Enclosed CJK Letters and Months"](t)||In["Hangul Compatibility Jamo"](t)||In["Hangul Jamo Extended-A"](t)||In["Hangul Jamo Extended-B"](t)||In["Hangul Jamo"](t)||In["Hangul Syllables"](t)||In.Hiragana(t)||In["Ideographic Description Characters"](t)||In.Kanbun(t)||In["Kangxi Radicals"](t)||In["Katakana Phonetic Extensions"](t)||In.Katakana(t)&&12540!==t||!(!In["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)||!(!In["Small Form Variants"](t)||t>=65112&&t<=65118||t>=65123&&t<=65126)||In["Unified Canadian Aboriginal Syllabics"](t)||In["Unified Canadian Aboriginal Syllabics Extended"](t)||In["Vertical Forms"](t)||In["Yijing Hexagram Symbols"](t)||In["Yi Syllables"](t)||In["Yi Radicals"](t)))}function Sn(t){return!(Ln(t)||function(t){return!!(In["Latin-1 Supplement"](t)&&(167===t||169===t||174===t||177===t||188===t||189===t||190===t||215===t||247===t)||In["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)||In["Letterlike Symbols"](t)||In["Number Forms"](t)||In["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)||In["Control Pictures"](t)&&9251!==t||In["Optical Character Recognition"](t)||In["Enclosed Alphanumerics"](t)||In["Geometric Shapes"](t)||In["Miscellaneous Symbols"](t)&&!(t>=9754&&t<=9759)||In["Miscellaneous Symbols and Arrows"](t)&&(t>=11026&&t<=11055||t>=11088&&t<=11097||t>=11192&&t<=11243)||In["CJK Symbols and Punctuation"](t)||In.Katakana(t)||In["Private Use Area"](t)||In["CJK Compatibility Forms"](t)||In["Small Form Variants"](t)||In["Halfwidth and Fullwidth Forms"](t)||8734===t||8756===t||8757===t||t>=9984&&t<=10087||t>=10102&&t<=10131||65532===t||65533===t)}(t))}function zn(t,e){return!(!e&&(t>=1424&&t<=2303||In["Arabic Presentation Forms-A"](t)||In["Arabic Presentation Forms-B"](t))||t>=2304&&t<=3583||t>=3840&&t<=4255||In.Khmer(t))}var Rn,jn=!1,Un=null,Fn=!1,Qn=new z,Kn={applyArabicShaping:null,processBidirectionalText:null,processStyledBidirectionalText:null,isLoaded:function(){return Fn||null!=Kn.applyArabicShaping}},Wn=function(t,e){this.zoom=t,e?(this.now=e.now,this.fadeDuration=e.fadeDuration,this.zoomHistory=e.zoomHistory,this.transition=e.transition):(this.now=0,this.fadeDuration=0,this.zoomHistory=new Pn,this.transition={})};Wn.prototype.isSupportedScript=function(t){return function(t,e){for(var n=0,r=t;nthis.zoomHistory.lastIntegerZoom?{fromScale:2,toScale:1,t:e+(1-e)*n}:{fromScale:.5,toScale:1,t:1-(1-n)*e}};var Hn=function(t,e){this.property=t,this.value=e,this.expression=Ue(void 0===e?t.specification.default:e,t.specification)};Hn.prototype.isDataDriven=function(){return"source"===this.expression.kind||"composite"===this.expression.kind},Hn.prototype.possiblyEvaluate=function(t){return this.property.possiblyEvaluate(this,t)};var Vn=function(t){this.property=t,this.value=new Hn(t,void 0)};Vn.prototype.transitioned=function(t,e){return new Gn(this.property,this.value,e,p({},t.transition,this.transition),t.now)},Vn.prototype.untransitioned=function(){return new Gn(this.property,this.value,null,{},0)};var Nn=function(t){this._properties=t,this._values=Object.create(t.defaultTransitionablePropertyValues)};Nn.prototype.getValue=function(t){return y(this._values[t].value.value)},Nn.prototype.setValue=function(t,e){this._values.hasOwnProperty(t)||(this._values[t]=new Vn(this._values[t].property)),this._values[t].value=new Hn(this._values[t].property,null===e?void 0:y(e))},Nn.prototype.getTransition=function(t){return y(this._values[t].transition)},Nn.prototype.setTransition=function(t,e){this._values.hasOwnProperty(t)||(this._values[t]=new Vn(this._values[t].property)),this._values[t].transition=y(e)||void 0},Nn.prototype.serialize=function(){for(var t={},e=0,n=Object.keys(this._values);ethis.end)return this.prior=null,n;if(this.value.isDataDriven())return this.prior=null,n;if(e=1)return 1;var e=t*t,n=e*t;return 4*(t<.5?n:3*(t-e)+n-.75)}(i))}return n};var qn=function(t){this._properties=t,this._values=Object.create(t.defaultTransitioningPropertyValues)};qn.prototype.possiblyEvaluate=function(t){for(var e=new Zn(this._properties),n=0,r=Object.keys(this._values);nr.zoomHistory.lastIntegerZoom?{from:t,to:e}:{from:n,to:e}},e.prototype.interpolate=function(t){return t},e}($n),er=function(t){this.specification=t};er.prototype.possiblyEvaluate=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 this._calculate(t.expression.evaluate(new Wn(Math.floor(e.zoom-1),e)),t.expression.evaluate(new Wn(Math.floor(e.zoom),e)),t.expression.evaluate(new Wn(Math.floor(e.zoom+1),e)),e)}},er.prototype._calculate=function(t,e,n,r){return r.zoom>r.zoomHistory.lastIntegerZoom?{from:t,to:e}:{from:n,to:e}},er.prototype.interpolate=function(t){return t};var nr=function(t){this.specification=t};nr.prototype.possiblyEvaluate=function(t,e){return!!t.expression.evaluate(e)},nr.prototype.interpolate=function(){return!1};var rr=function(t){for(var e in this.properties=t,this.defaultPropertyValues={},this.defaultTransitionablePropertyValues={},this.defaultTransitioningPropertyValues={},this.defaultPossiblyEvaluatedValues={},t){var n=t[e],r=this.defaultPropertyValues[e]=new Hn(n,void 0),i=this.defaultTransitionablePropertyValues[e]=new Vn(n);this.defaultTransitioningPropertyValues[e]=i.untransitioned(),this.defaultPossiblyEvaluatedValues[e]=r.possiblyEvaluate({})}};Cn("DataDrivenProperty",$n),Cn("DataConstantProperty",Jn),Cn("CrossFadedDataDrivenProperty",tr),Cn("CrossFadedProperty",er),Cn("ColorRampProperty",nr);var ir=function(t){function e(e,n){if(t.call(this),this.id=e.id,this.type=e.type,this.visibility="visible",this._featureFilter=function(){return!0},"custom"!==e.type&&(e=e,this.metadata=e.metadata,this.minzoom=e.minzoom,this.maxzoom=e.maxzoom,"background"!==e.type&&(this.source=e.source,this.sourceLayer=e["source-layer"],this.filter=e.filter),n.layout&&(this._unevaluatedLayout=new Xn(n.layout)),n.paint)){for(var r in this._transitionablePaint=new Nn(n.paint),e.paint)this.setPaintProperty(r,e.paint[r],{validate:!1});for(var i in e.layout)this.setLayoutProperty(i,e.layout[i],{validate:!1});this._transitioningPaint=this._transitionablePaint.untransitioned()}}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype.getCrossfadeParameters=function(){return this._crossfadeParameters},e.prototype.getLayoutProperty=function(t){return"visibility"===t?this.visibility:this._unevaluatedLayout.getValue(t)},e.prototype.setLayoutProperty=function(t,e,n){if(null!==e&&void 0!==e){var r="layers."+this.id+".layout."+t;if(this._validate(mn,r,t,e,n))return}"visibility"!==t?this._unevaluatedLayout.setValue(t,e):this.visibility="none"===e?e:"visible"},e.prototype.getPaintProperty=function(t){return d(t,"-transition")?this._transitionablePaint.getTransition(t.slice(0,-"-transition".length)):this._transitionablePaint.getValue(t)},e.prototype.setPaintProperty=function(t,e,n){if(null!==e&&void 0!==e){var r="layers."+this.id+".paint."+t;if(this._validate(yn,r,t,e,n))return!1}if(d(t,"-transition"))return this._transitionablePaint.setTransition(t.slice(0,-"-transition".length),e||void 0),!1;var i=this._transitionablePaint._values[t],o="cross-faded-data-driven"===i.property.specification["property-type"]&&!i.value.value&&e,a=this._transitionablePaint._values[t].value.isDataDriven();this._transitionablePaint.setValue(t,e);var s=this._transitionablePaint._values[t].value.isDataDriven();return this._handleSpecialPaintPropertyUpdate(t),s||a||o},e.prototype._handleSpecialPaintPropertyUpdate=function(t){},e.prototype.isHidden=function(t){return!!(this.minzoom&&t=this.maxzoom)||"none"===this.visibility},e.prototype.updateTransitions=function(t){this._transitioningPaint=this._transitionablePaint.transitioned(t,this._transitioningPaint)},e.prototype.hasTransition=function(){return this._transitioningPaint.hasTransition()},e.prototype.recalculate=function(t){t.getCrossfadeParameters&&(this._crossfadeParameters=t.getCrossfadeParameters()),this._unevaluatedLayout&&(this.layout=this._unevaluatedLayout.possiblyEvaluate(t)),this.paint=this._transitioningPaint.possiblyEvaluate(t)},e.prototype.serialize=function(){var t={id:this.id,type:this.type,source:this.source,"source-layer":this.sourceLayer,metadata:this.metadata,minzoom:this.minzoom,maxzoom:this.maxzoom,filter:this.filter,layout:this._unevaluatedLayout&&this._unevaluatedLayout.serialize(),paint:this._transitionablePaint&&this._transitionablePaint.serialize()};return"none"===this.visibility&&(t.layout=t.layout||{},t.layout.visibility="none"),g(t,function(t,e){return!(void 0===t||"layout"===e&&!Object.keys(t).length||"paint"===e&&!Object.keys(t).length)})},e.prototype._validate=function(t,e,n,r,i){return(!i||!1!==i.validate)&&vn(this,t.call(_n,{key:e,layerType:this.type,objectKey:n,value:r,styleSpec:R,style:{glyphs:!0,sprite:!0}}))},e.prototype.hasOffscreenPass=function(){return!1},e.prototype.resize=function(){},e.prototype.isStateDependent=function(){for(var t in this.paint._values){var e=this.paint.get(t);if(e instanceof Yn&&ve(e.property.specification)&&("source"===e.value.kind||"composite"===e.value.kind)&&e.value.isStateDependent)return!0}return!1},e}(z),or={Int8:Int8Array,Uint8:Uint8Array,Int16:Int16Array,Uint16:Uint16Array,Int32:Int32Array,Uint32:Uint32Array,Float32:Float32Array},ar=function(t,e){this._structArray=t,this._pos1=e*this.size,this._pos2=this._pos1/2,this._pos4=this._pos1/4,this._pos8=this._pos1/8},sr=function(){this.isTransferred=!1,this.capacity=-1,this.resize(0)};function lr(t,e){void 0===e&&(e=1);var n=0,r=0;return{members:t.map(function(t){var i,o=(i=t.type,or[i].BYTES_PER_ELEMENT),a=n=cr(n,Math.max(e,o)),s=t.components||1;return r=Math.max(r,o),n+=o*s,{name:t.name,type:t.type,components:s,offset:a}}),size:cr(n,Math.max(r,e)),alignment:e}}function cr(t,e){return Math.ceil(t/e)*e}sr.serialize=function(t,e){return t._trim(),e&&(t.isTransferred=!0,e.push(t.arrayBuffer)),{length:t.length,arrayBuffer:t.arrayBuffer}},sr.deserialize=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},sr.prototype._trim=function(){this.length!==this.capacity&&(this.capacity=this.length,this.arrayBuffer=this.arrayBuffer.slice(0,this.length*this.bytesPerElement),this._refreshViews())},sr.prototype.clear=function(){this.length=0},sr.prototype.resize=function(t){this.reserve(t),this.length=t},sr.prototype.reserve=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)}},sr.prototype._refreshViews=function(){throw new Error("_refreshViews() must be implemented by each concrete StructArray layout")};var ur=function(t){function e(){t.apply(this,arguments)}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype._refreshViews=function(){this.uint8=new Uint8Array(this.arrayBuffer),this.int16=new Int16Array(this.arrayBuffer)},e.prototype.emplaceBack=function(t,e){var n=this.length;this.resize(n+1);var r=2*n;return this.int16[r+0]=t,this.int16[r+1]=e,n},e.prototype.emplace=function(t,e,n){var r=2*t;return this.int16[r+0]=e,this.int16[r+1]=n,t},e}(sr);ur.prototype.bytesPerElement=4,Cn("StructArrayLayout2i4",ur);var pr=function(t){function e(){t.apply(this,arguments)}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype._refreshViews=function(){this.uint8=new Uint8Array(this.arrayBuffer),this.int16=new Int16Array(this.arrayBuffer)},e.prototype.emplaceBack=function(t,e,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.prototype.emplace=function(t,e,n,r,i){var o=4*t;return this.int16[o+0]=e,this.int16[o+1]=n,this.int16[o+2]=r,this.int16[o+3]=i,t},e}(sr);pr.prototype.bytesPerElement=8,Cn("StructArrayLayout4i8",pr);var Ar=function(t){function e(){t.apply(this,arguments)}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype._refreshViews=function(){this.uint8=new Uint8Array(this.arrayBuffer),this.int16=new Int16Array(this.arrayBuffer)},e.prototype.emplaceBack=function(t,e,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.prototype.emplace=function(t,e,n,r,i,o,a){var s=6*t;return this.int16[s+0]=e,this.int16[s+1]=n,this.int16[s+2]=r,this.int16[s+3]=i,this.int16[s+4]=o,this.int16[s+5]=a,t},e}(sr);Ar.prototype.bytesPerElement=12,Cn("StructArrayLayout2i4i12",Ar);var hr=function(t){function e(){t.apply(this,arguments)}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype._refreshViews=function(){this.uint8=new Uint8Array(this.arrayBuffer),this.int16=new Int16Array(this.arrayBuffer)},e.prototype.emplaceBack=function(t,e,n,r,i,o,a,s){var l=this.length;this.resize(l+1);var c=6*l,u=12*l;return this.int16[c+0]=t,this.int16[c+1]=e,this.int16[c+2]=n,this.int16[c+3]=r,this.uint8[u+8]=i,this.uint8[u+9]=o,this.uint8[u+10]=a,this.uint8[u+11]=s,l},e.prototype.emplace=function(t,e,n,r,i,o,a,s,l){var c=6*t,u=12*t;return this.int16[c+0]=e,this.int16[c+1]=n,this.int16[c+2]=r,this.int16[c+3]=i,this.uint8[u+8]=o,this.uint8[u+9]=a,this.uint8[u+10]=s,this.uint8[u+11]=l,t},e}(sr);hr.prototype.bytesPerElement=12,Cn("StructArrayLayout4i4ub12",hr);var fr=function(t){function e(){t.apply(this,arguments)}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype._refreshViews=function(){this.uint8=new Uint8Array(this.arrayBuffer),this.uint16=new Uint16Array(this.arrayBuffer)},e.prototype.emplaceBack=function(t,e,n,r,i,o,a,s){var l=this.length;this.resize(l+1);var c=8*l;return this.uint16[c+0]=t,this.uint16[c+1]=e,this.uint16[c+2]=n,this.uint16[c+3]=r,this.uint16[c+4]=i,this.uint16[c+5]=o,this.uint16[c+6]=a,this.uint16[c+7]=s,l},e.prototype.emplace=function(t,e,n,r,i,o,a,s,l){var c=8*t;return this.uint16[c+0]=e,this.uint16[c+1]=n,this.uint16[c+2]=r,this.uint16[c+3]=i,this.uint16[c+4]=o,this.uint16[c+5]=a,this.uint16[c+6]=s,this.uint16[c+7]=l,t},e}(sr);fr.prototype.bytesPerElement=16,Cn("StructArrayLayout8ui16",fr);var dr=function(t){function e(){t.apply(this,arguments)}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype._refreshViews=function(){this.uint8=new Uint8Array(this.arrayBuffer),this.int16=new Int16Array(this.arrayBuffer),this.uint16=new Uint16Array(this.arrayBuffer)},e.prototype.emplaceBack=function(t,e,n,r,i,o,a,s){var l=this.length;this.resize(l+1);var c=8*l;return this.int16[c+0]=t,this.int16[c+1]=e,this.int16[c+2]=n,this.int16[c+3]=r,this.uint16[c+4]=i,this.uint16[c+5]=o,this.uint16[c+6]=a,this.uint16[c+7]=s,l},e.prototype.emplace=function(t,e,n,r,i,o,a,s,l){var c=8*t;return this.int16[c+0]=e,this.int16[c+1]=n,this.int16[c+2]=r,this.int16[c+3]=i,this.uint16[c+4]=o,this.uint16[c+5]=a,this.uint16[c+6]=s,this.uint16[c+7]=l,t},e}(sr);dr.prototype.bytesPerElement=16,Cn("StructArrayLayout4i4ui16",dr);var _r=function(t){function e(){t.apply(this,arguments)}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype._refreshViews=function(){this.uint8=new Uint8Array(this.arrayBuffer),this.float32=new Float32Array(this.arrayBuffer)},e.prototype.emplaceBack=function(t,e,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.emplace=function(t,e,n,r){var i=3*t;return this.float32[i+0]=e,this.float32[i+1]=n,this.float32[i+2]=r,t},e}(sr);_r.prototype.bytesPerElement=12,Cn("StructArrayLayout3f12",_r);var gr=function(t){function e(){t.apply(this,arguments)}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype._refreshViews=function(){this.uint8=new Uint8Array(this.arrayBuffer),this.uint32=new Uint32Array(this.arrayBuffer)},e.prototype.emplaceBack=function(t){var e=this.length;this.resize(e+1);var n=1*e;return this.uint32[n+0]=t,e},e.prototype.emplace=function(t,e){var n=1*t;return this.uint32[n+0]=e,t},e}(sr);gr.prototype.bytesPerElement=4,Cn("StructArrayLayout1ul4",gr);var yr=function(t){function e(){t.apply(this,arguments)}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype._refreshViews=function(){this.uint8=new Uint8Array(this.arrayBuffer),this.int16=new Int16Array(this.arrayBuffer),this.uint32=new Uint32Array(this.arrayBuffer),this.uint16=new Uint16Array(this.arrayBuffer)},e.prototype.emplaceBack=function(t,e,n,r,i,o,a,s,l,c,u){var p=this.length;this.resize(p+1);var A=12*p,h=6*p;return this.int16[A+0]=t,this.int16[A+1]=e,this.int16[A+2]=n,this.int16[A+3]=r,this.int16[A+4]=i,this.int16[A+5]=o,this.uint32[h+3]=a,this.uint16[A+8]=s,this.uint16[A+9]=l,this.int16[A+10]=c,this.int16[A+11]=u,p},e.prototype.emplace=function(t,e,n,r,i,o,a,s,l,c,u,p){var A=12*t,h=6*t;return this.int16[A+0]=e,this.int16[A+1]=n,this.int16[A+2]=r,this.int16[A+3]=i,this.int16[A+4]=o,this.int16[A+5]=a,this.uint32[h+3]=s,this.uint16[A+8]=l,this.uint16[A+9]=c,this.int16[A+10]=u,this.int16[A+11]=p,t},e}(sr);yr.prototype.bytesPerElement=24,Cn("StructArrayLayout6i1ul2ui2i24",yr);var mr=function(t){function e(){t.apply(this,arguments)}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype._refreshViews=function(){this.uint8=new Uint8Array(this.arrayBuffer),this.int16=new Int16Array(this.arrayBuffer)},e.prototype.emplaceBack=function(t,e,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.prototype.emplace=function(t,e,n,r,i,o,a){var s=6*t;return this.int16[s+0]=e,this.int16[s+1]=n,this.int16[s+2]=r,this.int16[s+3]=i,this.int16[s+4]=o,this.int16[s+5]=a,t},e}(sr);mr.prototype.bytesPerElement=12,Cn("StructArrayLayout2i2i2i12",mr);var vr=function(t){function e(){t.apply(this,arguments)}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype._refreshViews=function(){this.uint8=new Uint8Array(this.arrayBuffer)},e.prototype.emplaceBack=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.prototype.emplace=function(t,e,n){var r=4*t;return this.uint8[r+0]=e,this.uint8[r+1]=n,t},e}(sr);vr.prototype.bytesPerElement=4,Cn("StructArrayLayout2ub4",vr);var br=function(t){function e(){t.apply(this,arguments)}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype._refreshViews=function(){this.uint8=new Uint8Array(this.arrayBuffer),this.int16=new Int16Array(this.arrayBuffer),this.uint16=new Uint16Array(this.arrayBuffer),this.uint32=new Uint32Array(this.arrayBuffer),this.float32=new Float32Array(this.arrayBuffer)},e.prototype.emplaceBack=function(t,e,n,r,i,o,a,s,l,c,u,p,A,h){var f=this.length;this.resize(f+1);var d=20*f,_=10*f,g=40*f;return this.int16[d+0]=t,this.int16[d+1]=e,this.uint16[d+2]=n,this.uint16[d+3]=r,this.uint32[_+2]=i,this.uint32[_+3]=o,this.uint32[_+4]=a,this.uint16[d+10]=s,this.uint16[d+11]=l,this.uint16[d+12]=c,this.float32[_+7]=u,this.float32[_+8]=p,this.uint8[g+36]=A,this.uint8[g+37]=h,f},e.prototype.emplace=function(t,e,n,r,i,o,a,s,l,c,u,p,A,h,f){var d=20*t,_=10*t,g=40*t;return this.int16[d+0]=e,this.int16[d+1]=n,this.uint16[d+2]=r,this.uint16[d+3]=i,this.uint32[_+2]=o,this.uint32[_+3]=a,this.uint32[_+4]=s,this.uint16[d+10]=l,this.uint16[d+11]=c,this.uint16[d+12]=u,this.float32[_+7]=p,this.float32[_+8]=A,this.uint8[g+36]=h,this.uint8[g+37]=f,t},e}(sr);br.prototype.bytesPerElement=40,Cn("StructArrayLayout2i2ui3ul3ui2f2ub40",br);var wr=function(t){function e(){t.apply(this,arguments)}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype._refreshViews=function(){this.uint8=new Uint8Array(this.arrayBuffer),this.int16=new Int16Array(this.arrayBuffer),this.uint16=new Uint16Array(this.arrayBuffer),this.uint32=new Uint32Array(this.arrayBuffer)},e.prototype.emplaceBack=function(t,e,n,r,i,o,a,s,l,c,u,p,A,h){var f=this.length;this.resize(f+1);var d=16*f,_=8*f;return this.int16[d+0]=t,this.int16[d+1]=e,this.int16[d+2]=n,this.int16[d+3]=r,this.uint16[d+4]=i,this.uint16[d+5]=o,this.uint16[d+6]=a,this.uint16[d+7]=s,this.uint16[d+8]=l,this.uint16[d+9]=c,this.uint16[d+10]=u,this.uint16[d+11]=p,this.uint16[d+12]=A,this.uint32[_+7]=h,f},e.prototype.emplace=function(t,e,n,r,i,o,a,s,l,c,u,p,A,h,f){var d=16*t,_=8*t;return this.int16[d+0]=e,this.int16[d+1]=n,this.int16[d+2]=r,this.int16[d+3]=i,this.uint16[d+4]=o,this.uint16[d+5]=a,this.uint16[d+6]=s,this.uint16[d+7]=l,this.uint16[d+8]=c,this.uint16[d+9]=u,this.uint16[d+10]=p,this.uint16[d+11]=A,this.uint16[d+12]=h,this.uint32[_+7]=f,t},e}(sr);wr.prototype.bytesPerElement=32,Cn("StructArrayLayout4i9ui1ul32",wr);var xr=function(t){function e(){t.apply(this,arguments)}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype._refreshViews=function(){this.uint8=new Uint8Array(this.arrayBuffer),this.float32=new Float32Array(this.arrayBuffer)},e.prototype.emplaceBack=function(t){var e=this.length;this.resize(e+1);var n=1*e;return this.float32[n+0]=t,e},e.prototype.emplace=function(t,e){var n=1*t;return this.float32[n+0]=e,t},e}(sr);xr.prototype.bytesPerElement=4,Cn("StructArrayLayout1f4",xr);var Er=function(t){function e(){t.apply(this,arguments)}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype._refreshViews=function(){this.uint8=new Uint8Array(this.arrayBuffer),this.int16=new Int16Array(this.arrayBuffer)},e.prototype.emplaceBack=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.prototype.emplace=function(t,e,n,r){var i=3*t;return this.int16[i+0]=e,this.int16[i+1]=n,this.int16[i+2]=r,t},e}(sr);Er.prototype.bytesPerElement=6,Cn("StructArrayLayout3i6",Er);var Mr=function(t){function e(){t.apply(this,arguments)}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype._refreshViews=function(){this.uint8=new Uint8Array(this.arrayBuffer),this.uint32=new Uint32Array(this.arrayBuffer),this.uint16=new Uint16Array(this.arrayBuffer)},e.prototype.emplaceBack=function(t,e,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.prototype.emplace=function(t,e,n,r){var i=2*t,o=4*t;return this.uint32[i+0]=e,this.uint16[o+2]=n,this.uint16[o+3]=r,t},e}(sr);Mr.prototype.bytesPerElement=8,Cn("StructArrayLayout1ul2ui8",Mr);var Cr=function(t){function e(){t.apply(this,arguments)}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype._refreshViews=function(){this.uint8=new Uint8Array(this.arrayBuffer),this.uint16=new Uint16Array(this.arrayBuffer)},e.prototype.emplaceBack=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.prototype.emplace=function(t,e,n,r){var i=3*t;return this.uint16[i+0]=e,this.uint16[i+1]=n,this.uint16[i+2]=r,t},e}(sr);Cr.prototype.bytesPerElement=6,Cn("StructArrayLayout3ui6",Cr);var Br=function(t){function e(){t.apply(this,arguments)}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype._refreshViews=function(){this.uint8=new Uint8Array(this.arrayBuffer),this.uint16=new Uint16Array(this.arrayBuffer)},e.prototype.emplaceBack=function(t,e){var n=this.length;this.resize(n+1);var r=2*n;return this.uint16[r+0]=t,this.uint16[r+1]=e,n},e.prototype.emplace=function(t,e,n){var r=2*t;return this.uint16[r+0]=e,this.uint16[r+1]=n,t},e}(sr);Br.prototype.bytesPerElement=4,Cn("StructArrayLayout2ui4",Br);var Or=function(t){function e(){t.apply(this,arguments)}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype._refreshViews=function(){this.uint8=new Uint8Array(this.arrayBuffer),this.uint16=new Uint16Array(this.arrayBuffer)},e.prototype.emplaceBack=function(t){var e=this.length;this.resize(e+1);var n=1*e;return this.uint16[n+0]=t,e},e.prototype.emplace=function(t,e){var n=1*t;return this.uint16[n+0]=e,t},e}(sr);Or.prototype.bytesPerElement=2,Cn("StructArrayLayout1ui2",Or);var kr=function(t){function e(){t.apply(this,arguments)}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype._refreshViews=function(){this.uint8=new Uint8Array(this.arrayBuffer),this.float32=new Float32Array(this.arrayBuffer)},e.prototype.emplaceBack=function(t,e){var n=this.length;this.resize(n+1);var r=2*n;return this.float32[r+0]=t,this.float32[r+1]=e,n},e.prototype.emplace=function(t,e,n){var r=2*t;return this.float32[r+0]=e,this.float32[r+1]=n,t},e}(sr);kr.prototype.bytesPerElement=8,Cn("StructArrayLayout2f8",kr);var Pr=function(t){function e(){t.apply(this,arguments)}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype._refreshViews=function(){this.uint8=new Uint8Array(this.arrayBuffer),this.float32=new Float32Array(this.arrayBuffer)},e.prototype.emplaceBack=function(t,e,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.prototype.emplace=function(t,e,n,r,i){var o=4*t;return this.float32[o+0]=e,this.float32[o+1]=n,this.float32[o+2]=r,this.float32[o+3]=i,t},e}(sr);Pr.prototype.bytesPerElement=16,Cn("StructArrayLayout4f16",Pr);var Ir=function(t){function e(){t.apply(this,arguments)}t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e;var n={anchorPointX:{configurable:!0},anchorPointY:{configurable:!0},x1:{configurable:!0},y1:{configurable:!0},x2:{configurable:!0},y2:{configurable:!0},featureIndex:{configurable:!0},sourceLayerIndex:{configurable:!0},bucketIndex:{configurable:!0},radius:{configurable:!0},signedDistanceFromAnchor:{configurable:!0},anchorPoint:{configurable:!0}};return n.anchorPointX.get=function(){return this._structArray.int16[this._pos2+0]},n.anchorPointX.set=function(t){this._structArray.int16[this._pos2+0]=t},n.anchorPointY.get=function(){return this._structArray.int16[this._pos2+1]},n.anchorPointY.set=function(t){this._structArray.int16[this._pos2+1]=t},n.x1.get=function(){return this._structArray.int16[this._pos2+2]},n.x1.set=function(t){this._structArray.int16[this._pos2+2]=t},n.y1.get=function(){return this._structArray.int16[this._pos2+3]},n.y1.set=function(t){this._structArray.int16[this._pos2+3]=t},n.x2.get=function(){return this._structArray.int16[this._pos2+4]},n.x2.set=function(t){this._structArray.int16[this._pos2+4]=t},n.y2.get=function(){return this._structArray.int16[this._pos2+5]},n.y2.set=function(t){this._structArray.int16[this._pos2+5]=t},n.featureIndex.get=function(){return this._structArray.uint32[this._pos4+3]},n.featureIndex.set=function(t){this._structArray.uint32[this._pos4+3]=t},n.sourceLayerIndex.get=function(){return this._structArray.uint16[this._pos2+8]},n.sourceLayerIndex.set=function(t){this._structArray.uint16[this._pos2+8]=t},n.bucketIndex.get=function(){return this._structArray.uint16[this._pos2+9]},n.bucketIndex.set=function(t){this._structArray.uint16[this._pos2+9]=t},n.radius.get=function(){return this._structArray.int16[this._pos2+10]},n.radius.set=function(t){this._structArray.int16[this._pos2+10]=t},n.signedDistanceFromAnchor.get=function(){return this._structArray.int16[this._pos2+11]},n.signedDistanceFromAnchor.set=function(t){this._structArray.int16[this._pos2+11]=t},n.anchorPoint.get=function(){return new o(this.anchorPointX,this.anchorPointY)},Object.defineProperties(e.prototype,n),e}(ar);Ir.prototype.size=24;var Tr=function(t){function e(){t.apply(this,arguments)}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype.get=function(t){return new Ir(this,t)},e}(yr);Cn("CollisionBoxArray",Tr);var Dr=function(t){function e(){t.apply(this,arguments)}t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e;var n={anchorX:{configurable:!0},anchorY:{configurable:!0},glyphStartIndex:{configurable:!0},numGlyphs:{configurable:!0},vertexStartIndex:{configurable:!0},lineStartIndex:{configurable:!0},lineLength:{configurable:!0},segment:{configurable:!0},lowerSize:{configurable:!0},upperSize:{configurable:!0},lineOffsetX:{configurable:!0},lineOffsetY:{configurable:!0},writingMode:{configurable:!0},hidden:{configurable:!0}};return n.anchorX.get=function(){return this._structArray.int16[this._pos2+0]},n.anchorX.set=function(t){this._structArray.int16[this._pos2+0]=t},n.anchorY.get=function(){return this._structArray.int16[this._pos2+1]},n.anchorY.set=function(t){this._structArray.int16[this._pos2+1]=t},n.glyphStartIndex.get=function(){return this._structArray.uint16[this._pos2+2]},n.glyphStartIndex.set=function(t){this._structArray.uint16[this._pos2+2]=t},n.numGlyphs.get=function(){return this._structArray.uint16[this._pos2+3]},n.numGlyphs.set=function(t){this._structArray.uint16[this._pos2+3]=t},n.vertexStartIndex.get=function(){return this._structArray.uint32[this._pos4+2]},n.vertexStartIndex.set=function(t){this._structArray.uint32[this._pos4+2]=t},n.lineStartIndex.get=function(){return this._structArray.uint32[this._pos4+3]},n.lineStartIndex.set=function(t){this._structArray.uint32[this._pos4+3]=t},n.lineLength.get=function(){return this._structArray.uint32[this._pos4+4]},n.lineLength.set=function(t){this._structArray.uint32[this._pos4+4]=t},n.segment.get=function(){return this._structArray.uint16[this._pos2+10]},n.segment.set=function(t){this._structArray.uint16[this._pos2+10]=t},n.lowerSize.get=function(){return this._structArray.uint16[this._pos2+11]},n.lowerSize.set=function(t){this._structArray.uint16[this._pos2+11]=t},n.upperSize.get=function(){return this._structArray.uint16[this._pos2+12]},n.upperSize.set=function(t){this._structArray.uint16[this._pos2+12]=t},n.lineOffsetX.get=function(){return this._structArray.float32[this._pos4+7]},n.lineOffsetX.set=function(t){this._structArray.float32[this._pos4+7]=t},n.lineOffsetY.get=function(){return this._structArray.float32[this._pos4+8]},n.lineOffsetY.set=function(t){this._structArray.float32[this._pos4+8]=t},n.writingMode.get=function(){return this._structArray.uint8[this._pos1+36]},n.writingMode.set=function(t){this._structArray.uint8[this._pos1+36]=t},n.hidden.get=function(){return this._structArray.uint8[this._pos1+37]},n.hidden.set=function(t){this._structArray.uint8[this._pos1+37]=t},Object.defineProperties(e.prototype,n),e}(ar);Dr.prototype.size=40;var Lr=function(t){function e(){t.apply(this,arguments)}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype.get=function(t){return new Dr(this,t)},e}(br);Cn("PlacedSymbolArray",Lr);var Sr=function(t){function e(){t.apply(this,arguments)}t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e;var n={anchorX:{configurable:!0},anchorY:{configurable:!0},horizontalPlacedTextSymbolIndex:{configurable:!0},verticalPlacedTextSymbolIndex:{configurable:!0},key:{configurable:!0},textBoxStartIndex:{configurable:!0},textBoxEndIndex:{configurable:!0},iconBoxStartIndex:{configurable:!0},iconBoxEndIndex:{configurable:!0},featureIndex:{configurable:!0},numGlyphVertices:{configurable:!0},numVerticalGlyphVertices:{configurable:!0},numIconVertices:{configurable:!0},crossTileID:{configurable:!0}};return n.anchorX.get=function(){return this._structArray.int16[this._pos2+0]},n.anchorX.set=function(t){this._structArray.int16[this._pos2+0]=t},n.anchorY.get=function(){return this._structArray.int16[this._pos2+1]},n.anchorY.set=function(t){this._structArray.int16[this._pos2+1]=t},n.horizontalPlacedTextSymbolIndex.get=function(){return this._structArray.int16[this._pos2+2]},n.horizontalPlacedTextSymbolIndex.set=function(t){this._structArray.int16[this._pos2+2]=t},n.verticalPlacedTextSymbolIndex.get=function(){return this._structArray.int16[this._pos2+3]},n.verticalPlacedTextSymbolIndex.set=function(t){this._structArray.int16[this._pos2+3]=t},n.key.get=function(){return this._structArray.uint16[this._pos2+4]},n.key.set=function(t){this._structArray.uint16[this._pos2+4]=t},n.textBoxStartIndex.get=function(){return this._structArray.uint16[this._pos2+5]},n.textBoxStartIndex.set=function(t){this._structArray.uint16[this._pos2+5]=t},n.textBoxEndIndex.get=function(){return this._structArray.uint16[this._pos2+6]},n.textBoxEndIndex.set=function(t){this._structArray.uint16[this._pos2+6]=t},n.iconBoxStartIndex.get=function(){return this._structArray.uint16[this._pos2+7]},n.iconBoxStartIndex.set=function(t){this._structArray.uint16[this._pos2+7]=t},n.iconBoxEndIndex.get=function(){return this._structArray.uint16[this._pos2+8]},n.iconBoxEndIndex.set=function(t){this._structArray.uint16[this._pos2+8]=t},n.featureIndex.get=function(){return this._structArray.uint16[this._pos2+9]},n.featureIndex.set=function(t){this._structArray.uint16[this._pos2+9]=t},n.numGlyphVertices.get=function(){return this._structArray.uint16[this._pos2+10]},n.numGlyphVertices.set=function(t){this._structArray.uint16[this._pos2+10]=t},n.numVerticalGlyphVertices.get=function(){return this._structArray.uint16[this._pos2+11]},n.numVerticalGlyphVertices.set=function(t){this._structArray.uint16[this._pos2+11]=t},n.numIconVertices.get=function(){return this._structArray.uint16[this._pos2+12]},n.numIconVertices.set=function(t){this._structArray.uint16[this._pos2+12]=t},n.crossTileID.get=function(){return this._structArray.uint32[this._pos4+7]},n.crossTileID.set=function(t){this._structArray.uint32[this._pos4+7]=t},Object.defineProperties(e.prototype,n),e}(ar);Sr.prototype.size=32;var zr=function(t){function e(){t.apply(this,arguments)}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype.get=function(t){return new Sr(this,t)},e}(wr);Cn("SymbolInstanceArray",zr);var Rr=function(t){function e(){t.apply(this,arguments)}t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e;var n={offsetX:{configurable:!0}};return n.offsetX.get=function(){return this._structArray.float32[this._pos4+0]},n.offsetX.set=function(t){this._structArray.float32[this._pos4+0]=t},Object.defineProperties(e.prototype,n),e}(ar);Rr.prototype.size=4;var jr=function(t){function e(){t.apply(this,arguments)}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype.getoffsetX=function(t){return this.float32[1*t+0]},e.prototype.get=function(t){return new Rr(this,t)},e}(xr);Cn("GlyphOffsetArray",jr);var Ur=function(t){function e(){t.apply(this,arguments)}t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e;var n={x:{configurable:!0},y:{configurable:!0},tileUnitDistanceFromAnchor:{configurable:!0}};return n.x.get=function(){return this._structArray.int16[this._pos2+0]},n.x.set=function(t){this._structArray.int16[this._pos2+0]=t},n.y.get=function(){return this._structArray.int16[this._pos2+1]},n.y.set=function(t){this._structArray.int16[this._pos2+1]=t},n.tileUnitDistanceFromAnchor.get=function(){return this._structArray.int16[this._pos2+2]},n.tileUnitDistanceFromAnchor.set=function(t){this._structArray.int16[this._pos2+2]=t},Object.defineProperties(e.prototype,n),e}(ar);Ur.prototype.size=6;var Fr=function(t){function e(){t.apply(this,arguments)}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype.getx=function(t){return this.int16[3*t+0]},e.prototype.gety=function(t){return this.int16[3*t+1]},e.prototype.gettileUnitDistanceFromAnchor=function(t){return this.int16[3*t+2]},e.prototype.get=function(t){return new Ur(this,t)},e}(Er);Cn("SymbolLineVertexArray",Fr);var Qr=function(t){function e(){t.apply(this,arguments)}t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e;var n={featureIndex:{configurable:!0},sourceLayerIndex:{configurable:!0},bucketIndex:{configurable:!0}};return n.featureIndex.get=function(){return this._structArray.uint32[this._pos4+0]},n.featureIndex.set=function(t){this._structArray.uint32[this._pos4+0]=t},n.sourceLayerIndex.get=function(){return this._structArray.uint16[this._pos2+2]},n.sourceLayerIndex.set=function(t){this._structArray.uint16[this._pos2+2]=t},n.bucketIndex.get=function(){return this._structArray.uint16[this._pos2+3]},n.bucketIndex.set=function(t){this._structArray.uint16[this._pos2+3]=t},Object.defineProperties(e.prototype,n),e}(ar);Qr.prototype.size=8;var Kr=function(t){function e(){t.apply(this,arguments)}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype.get=function(t){return new Qr(this,t)},e}(Mr);Cn("FeatureIndexArray",Kr);var Wr=lr([{name:"a_pos",components:2,type:"Int16"}],4),Hr=Wr.members,Vr=(Wr.size,Wr.alignment,function(t){void 0===t&&(t=[]),this.segments=t});Vr.prototype.prepareSegment=function(t,e,n){var r=this.segments[this.segments.length-1];return t>Vr.MAX_VERTEX_ARRAY_LENGTH&&v("Max vertices per segment is "+Vr.MAX_VERTEX_ARRAY_LENGTH+": bucket requested "+t),(!r||r.vertexLength+t>Vr.MAX_VERTEX_ARRAY_LENGTH)&&(r={vertexOffset:e.length,primitiveOffset:n.length,vertexLength:0,primitiveLength:0},this.segments.push(r)),r},Vr.prototype.get=function(){return this.segments},Vr.prototype.destroy=function(){for(var t=0,e=this.segments;t>1;this.ids[r]>=t?n=r:e=r+1}for(var i=[];this.ids[e]===t;){var o=this.positions[3*e],a=this.positions[3*e+1],s=this.positions[3*e+2];i.push({index:o,start:a,end:s}),e++}return i},Gr.serialize=function(t,e){var n=new Float64Array(t.ids),r=new Uint32Array(t.positions);return function t(e,n,r,i){if(!(r>=i)){for(var o=e[r+i>>1],a=r-1,s=i+1;;){do{a++}while(e[a]o);if(a>=s)break;qr(e,a,s),qr(n,3*a,3*s),qr(n,3*a+1,3*s+1),qr(n,3*a+2,3*s+2)}t(e,n,r,s),t(e,n,s+1,i)}}(n,r,0,n.length-1),e.push(n.buffer,r.buffer),{ids:n,positions:r}},Gr.deserialize=function(t){var e=new Gr;return e.ids=t.ids,e.positions=t.positions,e.indexed=!0,e},Cn("FeaturePositionMap",Gr);var Xr=function(t,e){this.gl=t.gl,this.location=e},Yr=function(t){function e(e,n){t.call(this,e,n),this.current=0}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype.set=function(t){this.current!==t&&(this.current=t,this.gl.uniform1i(this.location,t))},e}(Xr),Zr=function(t){function e(e,n){t.call(this,e,n),this.current=0}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype.set=function(t){this.current!==t&&(this.current=t,this.gl.uniform1f(this.location,t))},e}(Xr),Jr=function(t){function e(e,n){t.call(this,e,n),this.current=[0,0]}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype.set=function(t){t[0]===this.current[0]&&t[1]===this.current[1]||(this.current=t,this.gl.uniform2f(this.location,t[0],t[1]))},e}(Xr),$r=function(t){function e(e,n){t.call(this,e,n),this.current=[0,0,0]}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype.set=function(t){t[0]===this.current[0]&&t[1]===this.current[1]&&t[2]===this.current[2]||(this.current=t,this.gl.uniform3f(this.location,t[0],t[1],t[2]))},e}(Xr),ti=function(t){function e(e,n){t.call(this,e,n),this.current=[0,0,0,0]}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype.set=function(t){t[0]===this.current[0]&&t[1]===this.current[1]&&t[2]===this.current[2]&&t[3]===this.current[3]||(this.current=t,this.gl.uniform4f(this.location,t[0],t[1],t[2],t[3]))},e}(Xr),ei=function(t){function e(e,n){t.call(this,e,n),this.current=ot.transparent}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype.set=function(t){t.r===this.current.r&&t.g===this.current.g&&t.b===this.current.b&&t.a===this.current.a||(this.current=t,this.gl.uniform4f(this.location,t.r,t.g,t.b,t.a))},e}(Xr),ni=new Float32Array(16),ri=function(t){function e(e,n){t.call(this,e,n),this.current=ni}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype.set=function(t){if(t[12]!==this.current[12]||t[0]!==this.current[0])return this.current=t,void this.gl.uniformMatrix4fv(this.location,!1,t);for(var e=1;e<16;e++)if(t[e]!==this.current[e]){this.current=t,this.gl.uniformMatrix4fv(this.location,!1,t);break}},e}(Xr);function ii(t){return[Nr(255*t.r,255*t.g),Nr(255*t.b,255*t.a)]}var oi=function(t,e,n){this.value=t,this.names=e,this.uniformNames=this.names.map(function(t){return"u_"+t}),this.type=n,this.maxValue=-1/0};oi.prototype.defines=function(){return this.names.map(function(t){return"#define HAS_UNIFORM_u_"+t})},oi.prototype.setConstantPatternPositions=function(){},oi.prototype.populatePaintArray=function(){},oi.prototype.updatePaintArray=function(){},oi.prototype.upload=function(){},oi.prototype.destroy=function(){},oi.prototype.setUniforms=function(t,e,n,r){e.set(r.constantOr(this.value))},oi.prototype.getBinding=function(t,e){return"color"===this.type?new ei(t,e):new Zr(t,e)},oi.serialize=function(t){var e=t.value,n=t.names,r=t.type;return{value:On(e),names:n,type:r}},oi.deserialize=function(t){var e=t.value,n=t.names,r=t.type;return new oi(kn(e),n,r)};var ai=function(t,e,n){this.value=t,this.names=e,this.uniformNames=this.names.map(function(t){return"u_"+t}),this.type=n,this.maxValue=-1/0,this.patternPositions={patternTo:null,patternFrom:null}};ai.prototype.defines=function(){return this.names.map(function(t){return"#define HAS_UNIFORM_u_"+t})},ai.prototype.populatePaintArray=function(){},ai.prototype.updatePaintArray=function(){},ai.prototype.upload=function(){},ai.prototype.destroy=function(){},ai.prototype.setConstantPatternPositions=function(t,e){this.patternPositions.patternTo=t.tlbr,this.patternPositions.patternFrom=e.tlbr},ai.prototype.setUniforms=function(t,e,n,r,i){var o=this.patternPositions;"u_pattern_to"===i&&o.patternTo&&e.set(o.patternTo),"u_pattern_from"===i&&o.patternFrom&&e.set(o.patternFrom)},ai.prototype.getBinding=function(t,e){return new ti(t,e)};var si=function(t,e,n,r){this.expression=t,this.names=e,this.type=n,this.uniformNames=this.names.map(function(t){return"a_"+t}),this.maxValue=-1/0,this.paintVertexAttributes=e.map(function(t){return{name:"a_"+t,type:"Float32",components:"color"===n?2:1,offset:0}}),this.paintVertexArray=new r};si.prototype.defines=function(){return[]},si.prototype.setConstantPatternPositions=function(){},si.prototype.populatePaintArray=function(t,e){var n=this.paintVertexArray,r=n.length;n.reserve(t);var i=this.expression.evaluate(new Wn(0),e,{});if("color"===this.type)for(var o=ii(i),a=r;adi.max||a.ydi.max)&&v("Geometry exceeds allowed extent, reduce your vector tile buffer size")}return n}function gi(t,e,n,r,i){t.emplaceBack(2*e+(r+1)/2,2*n+(i+1)/2)}var yi=function(t){this.zoom=t.zoom,this.overscaling=t.overscaling,this.layers=t.layers,this.layerIds=this.layers.map(function(t){return t.id}),this.index=t.index,this.hasPattern=!1,this.layoutVertexArray=new ur,this.indexArray=new Cr,this.segments=new Vr,this.programConfigurations=new pi(Hr,t.layers,t.zoom)};function mi(t,e,n){for(var r=0;r=3)for(var s=0;s1){if(xi(t,e))return!0;for(var r=0;r1?t.distSqr(n):t.distSqr(n.sub(e)._mult(i)._add(e))}function Bi(t,e){for(var n,r,i,o=!1,a=0;ae.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 Oi(t,e){for(var n=!1,r=0,i=t.length-1;re.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}function ki(t,e,n){var r=e.paint.get(t).value;return"constant"===r.kind?r.value:n.programConfigurations.get(e.id).binders[t].maxValue}function Pi(t){return Math.sqrt(t[0]*t[0]+t[1]*t[1])}function Ii(t,e,n,r,i){if(!e[0]&&!e[1])return t;var a=o.convert(e);"viewport"===n&&a._rotate(-r);for(var s=[],l=0;l=fi||c<0||c>=fi)){var u=this.segments.prepareSegment(4,this.layoutVertexArray,this.indexArray),p=u.vertexLength;gi(this.layoutVertexArray,l,c,-1,-1),gi(this.layoutVertexArray,l,c,1,-1),gi(this.layoutVertexArray,l,c,1,1),gi(this.layoutVertexArray,l,c,-1,1),this.indexArray.emplaceBack(p,p+1,p+2),this.indexArray.emplaceBack(p,p+3,p+2),u.vertexLength+=4,u.primitiveLength+=2}}this.programConfigurations.populatePaintArrays(this.layoutVertexArray.length,t,n,{})},Cn("CircleBucket",yi,{omit:["layers"]});var Ti={paint:new rr({"circle-radius":new $n(R.paint_circle["circle-radius"]),"circle-color":new $n(R.paint_circle["circle-color"]),"circle-blur":new $n(R.paint_circle["circle-blur"]),"circle-opacity":new $n(R.paint_circle["circle-opacity"]),"circle-translate":new Jn(R.paint_circle["circle-translate"]),"circle-translate-anchor":new Jn(R.paint_circle["circle-translate-anchor"]),"circle-pitch-scale":new Jn(R.paint_circle["circle-pitch-scale"]),"circle-pitch-alignment":new Jn(R.paint_circle["circle-pitch-alignment"]),"circle-stroke-width":new $n(R.paint_circle["circle-stroke-width"]),"circle-stroke-color":new $n(R.paint_circle["circle-stroke-color"]),"circle-stroke-opacity":new $n(R.paint_circle["circle-stroke-opacity"])})},Di="undefined"!=typeof Float32Array?Float32Array:Array;function Li(){var t=new Di(9);return Di!=Float32Array&&(t[1]=0,t[2]=0,t[3]=0,t[5]=0,t[6]=0,t[7]=0),t[0]=1,t[4]=1,t[8]=1,t}function Si(){var t=new Di(3);return Di!=Float32Array&&(t[0]=0,t[1]=0,t[2]=0),t}function zi(t){var e=t[0],n=t[1],r=t[2];return Math.sqrt(e*e+n*n+r*r)}function Ri(t,e,n){var r=new Di(3);return r[0]=t,r[1]=e,r[2]=n,r}Math.PI;var ji,Ui=zi,Fi=(ji=Si(),function(t,e,n,r,i,o){var a,s=void 0;for(e||(e=3),n||(n=0),a=r?Math.min(r*e+n,t.length):t.length,s=n;s0&&(a=1/Math.sqrt(a),t[0]=n*a,t[1]=r*a,t[2]=i*a,t[3]=o*a),t}function Wi(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}var Hi=function(){var t=Qi();return function(e,n,r,i,o,a){var s,l=void 0;for(n||(n=4),r||(r=0),s=i?Math.min(i*n+r,e.length):e.length,l=r;lt.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");for(var a=t.data,s=e.data,l=0;l80*n){r=o=t[0],i=a=t[1];for(var f=n;fo&&(o=s),l>a&&(a=l);c=0!==(c=Math.max(o-r,a-i))?1/c:0}return Ao(A,h,n,r,i,c),h}function uo(t,e,n,r,i){var o,a;if(i===To(t,e,n,r)>0)for(o=e;o=e;o-=r)a=ko(o,t[o],t[o+1],a);return a&&Mo(a,a.next)&&(Po(a),a=a.next),a}function po(t,e){if(!t)return t;e||(e=t);var n,r=t;do{if(n=!1,r.steiner||!Mo(r,r.next)&&0!==Eo(r.prev,r,r.next))r=r.next;else{if(Po(r),(r=e=r.prev)===r.next)break;n=!0}}while(n||r!==e);return e}function Ao(t,e,n,r,i,o,a){if(t){!a&&o&&function(t,e,n,r){var i=t;do{null===i.z&&(i.z=vo(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,l,c=1;do{for(n=t,t=null,o=null,a=0;n;){for(a++,r=n,s=0,e=0;e0||l>0&&r;)0!==s&&(0===l||!r||n.z<=r.z)?(i=n,n=n.nextZ,s--):(i=r,r=r.nextZ,l--),o?o.nextZ=i:t=i,i.prevZ=o,o=i;n=r}o.nextZ=null,c*=2}while(a>1)}(i)}(t,r,i,o);for(var s,l,c=t;t.prev!==t.next;)if(s=t.prev,l=t.next,o?fo(t,r,i,o):ho(t))e.push(s.i/n),e.push(t.i/n),e.push(l.i/n),Po(t),t=l.next,c=l.next;else if((t=l)===c){a?1===a?Ao(t=_o(t,e,n),e,n,r,i,o,2):2===a&&go(t,e,n,r,i,o):Ao(po(t),e,n,r,i,o,1);break}}}function ho(t){var e=t.prev,n=t,r=t.next;if(Eo(e,n,r)>=0)return!1;for(var i=t.next.next;i!==t.prev;){if(wo(e.x,e.y,n.x,n.y,r.x,r.y,i.x,i.y)&&Eo(i.prev,i,i.next)>=0)return!1;i=i.next}return!0}function fo(t,e,n,r){var i=t.prev,o=t,a=t.next;if(Eo(i,o,a)>=0)return!1;for(var s=i.xo.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,p=vo(s,l,e,n,r),A=vo(c,u,e,n,r),h=t.prevZ,f=t.nextZ;h&&h.z>=p&&f&&f.z<=A;){if(h!==t.prev&&h!==t.next&&wo(i.x,i.y,o.x,o.y,a.x,a.y,h.x,h.y)&&Eo(h.prev,h,h.next)>=0)return!1;if(h=h.prevZ,f!==t.prev&&f!==t.next&&wo(i.x,i.y,o.x,o.y,a.x,a.y,f.x,f.y)&&Eo(f.prev,f,f.next)>=0)return!1;f=f.nextZ}for(;h&&h.z>=p;){if(h!==t.prev&&h!==t.next&&wo(i.x,i.y,o.x,o.y,a.x,a.y,h.x,h.y)&&Eo(h.prev,h,h.next)>=0)return!1;h=h.prevZ}for(;f&&f.z<=A;){if(f!==t.prev&&f!==t.next&&wo(i.x,i.y,o.x,o.y,a.x,a.y,f.x,f.y)&&Eo(f.prev,f,f.next)>=0)return!1;f=f.nextZ}return!0}function _o(t,e,n){var r=t;do{var i=r.prev,o=r.next.next;!Mo(i,o)&&Co(i,r,r.next,o)&&Bo(i,o)&&Bo(o,i)&&(e.push(i.i/n),e.push(r.i/n),e.push(o.i/n),Po(r),Po(r.next),r=t=o),r=r.next}while(r!==t);return r}function go(t,e,n,r,i,o){var a=t;do{for(var s=a.next.next;s!==a.prev;){if(a.i!==s.i&&xo(a,s)){var l=Oo(a,s);return a=po(a,a.next),l=po(l,l.next),Ao(a,e,n,r,i,o),void Ao(l,e,n,r,i,o)}s=s.next}a=a.next}while(a!==t)}function yo(t,e){return t.x-e.x}function mo(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.x&&r.x>=u&&i!==r.x&&wo(on.x)&&Bo(r,t)&&(n=r,A=l),r=r.next;return n}(t,e)){var n=Oo(e,t);po(n,n.next)}}function vo(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 bo(t){var e=t,n=t;do{e.x=0&&(t-a)*(r-s)-(n-a)*(e-s)>=0&&(n-a)*(o-s)-(i-a)*(r-s)>=0}function xo(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&&Co(n,n.next,t,e))return!0;n=n.next}while(n!==t);return!1}(t,e)&&Bo(t,e)&&Bo(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 Eo(t,e,n){return(e.y-t.y)*(n.x-e.x)-(e.x-t.x)*(n.y-e.y)}function Mo(t,e){return t.x===e.x&&t.y===e.y}function Co(t,e,n,r){return!!(Mo(t,e)&&Mo(n,r)||Mo(t,r)&&Mo(n,e))||Eo(t,e,n)>0!=Eo(t,e,r)>0&&Eo(n,r,t)>0!=Eo(n,r,e)>0}function Bo(t,e){return Eo(t.prev,t,t.next)<0?Eo(t,e,t.next)>=0&&Eo(t,t.prev,e)>=0:Eo(t,e,t.prev)<0||Eo(t,t.next,e)<0}function Oo(t,e){var n=new Io(t.i,t.x,t.y),r=new Io(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 ko(t,e,n,r){var i=new Io(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 Po(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 Io(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 To(t,e,n,r){for(var i=0,o=e,a=n-r;o0&&(r+=t[i-1].length,n.holes.push(r))}return n},so.default=lo;var Do=e(function(t,e){t.exports=function(){function t(t,e,n){var r=t[e];t[e]=t[n],t[n]=r}function e(t,e){return te?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,l=r-i+1,c=Math.log(s),u=.5*Math.exp(2*c/3),p=.5*Math.sqrt(c*u*(s-u)/s)*(l-s/2<0?-1:1);e(n,r,Math.max(i,Math.floor(r-l*u/s+p)),Math.min(o,Math.floor(r+(s-l)*u/s+p)),a)}var A=n[r],h=i,f=o;for(t(n,i,r),a(n[o],A)>0&&t(n,i,o);h0;)f--}0===a(n[i],A)?t(n,i,f):t(n,++f,o),f<=r&&(i=f+1),r<=f&&(o=f-1)}}(n,r,i||0,o||n.length-1,a||e)}}()});function Lo(t,e){var n=t.length;if(n<=1)return[t];for(var r,i,o=[],a=0;a1)for(var l=0;lfi)||t.y===e.y&&(t.y<0||t.y>fi)}function Go(t){return t.every(function(t){return t.x<0})||t.every(function(t){return t.x>fi})||t.every(function(t){return t.y<0})||t.every(function(t){return t.y>fi})}Vo.prototype.populate=function(t,e){this.features=[],this.hasPattern=zo("fill-extrusion",this.layers,e);for(var n=0,r=t;n=1){var g=h[d-1];if(!No(_,g)){u.vertexLength+4>Vr.MAX_VERTEX_ARRAY_LENGTH&&(u=this.segments.prepareSegment(4,this.layoutVertexArray,this.indexArray));var y=_.sub(g)._perp()._unit(),m=g.dist(_);f+m>32768&&(f=0),Ho(this.layoutVertexArray,_.x,_.y,y.x,y.y,0,0,f),Ho(this.layoutVertexArray,_.x,_.y,y.x,y.y,0,1,f),f+=m,Ho(this.layoutVertexArray,g.x,g.y,y.x,y.y,0,0,f),Ho(this.layoutVertexArray,g.x,g.y,y.x,y.y,0,1,f);var v=u.vertexLength;this.indexArray.emplaceBack(v,v+2,v+1),this.indexArray.emplaceBack(v+1,v+2,v+3),u.vertexLength+=4,u.primitiveLength+=2}}}}u.vertexLength+s>Vr.MAX_VERTEX_ARRAY_LENGTH&&(u=this.segments.prepareSegment(s,this.layoutVertexArray,this.indexArray));for(var b=[],w=[],x=u.vertexLength,E=0,M=a;E>3}if(i--,1===r||2===r)a+=t.readSVarint(),s+=t.readSVarint(),1===r&&(e&&l.push(e),e=[]),e.push(new o(a,s));else{if(7!==r)throw new Error("unknown command "+r);e&&e.push(e[0].clone())}}return e&&l.push(e),l},$o.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,l=1/0,c=-1/0;t.pos>3}if(r--,1===n||2===n)i+=t.readSVarint(),o+=t.readSVarint(),is&&(s=i),oc&&(c=o);else if(7!==n)throw new Error("unknown command "+n)}return[a,l,s,c]},$o.prototype.toGeoJSON=function(t,e,n){var r,i,o=this.extent*Math.pow(2,n),a=this.extent*t,s=this.extent*e,l=this.loadGeometry(),c=$o.types[this.type];function u(t){for(var e=0;e>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))}function oa(t,e,n){if(3===t){var r=new na(n,n.readVarint()+n.pos);r.length&&(e[r.name]=r)}}ra.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 Jo(this._pbf,e,this.extent,this._keys,this._values)};var aa={VectorTile:function(t,e){this.layers=t.readFields(oa,{},e)},VectorTileFeature:Jo,VectorTileLayer:na},sa=aa.VectorTileFeature.types,la=63,ca=Math.cos(Math.PI/180*37.5),ua=.5,pa=Math.pow(2,14)/ua;function Aa(t,e,n,r,i,o,a){t.emplaceBack(e.x,e.y,r?1:0,i?1:-1,Math.round(la*n.x)+128,Math.round(la*n.y)+128,1+(0===o?0:o<0?-1:1)|(a*ua&63)<<2,a*ua>>6)}var ha=function(t){this.zoom=t.zoom,this.overscaling=t.overscaling,this.layers=t.layers,this.layerIds=this.layers.map(function(t){return t.id}),this.index=t.index,this.features=[],this.hasPattern=!1,this.layoutVertexArray=new hr,this.indexArray=new Cr,this.programConfigurations=new pi(Zo,t.layers,t.zoom),this.segments=new Vr};function fa(t,e){return(t/e.tileTotal*(e.end-e.start)+e.start)*(pa-1)}ha.prototype.populate=function(t,e){this.features=[],this.hasPattern=zo("line",this.layers,e);for(var n=0,r=t;n=2&&t[u-1].equals(t[u-2]);)u--;for(var p=0;pp){var P=d.dist(b);if(P>2*A){var I=d.sub(d.sub(b)._mult(A/P)._round());this.distance+=I.dist(b),this.addCurrentVertex(I,this.distance,x.mult(1),0,0,!1,f,l),b=I}}var T=b&&w,D=T?n:w?y:m;if(T&&"round"===D&&(Oi&&(D="bevel"),"bevel"===D&&(O>2&&(D="flipbevel"),O100)C=E.clone().mult(-1);else{var L=x.x*E.y-x.y*E.x>0?-1:1,S=O*x.add(E).mag()/x.sub(E).mag();C._perp()._mult(S*L)}this.addCurrentVertex(d,this.distance,C,0,0,!1,f,l),this.addCurrentVertex(d,this.distance,C.mult(-1),0,0,!1,f,l)}else if("bevel"===D||"fakeround"===D){var z=x.x*E.y-x.y*E.x>0,R=-Math.sqrt(O*O-1);if(z?(g=0,_=R):(_=0,g=R),v||this.addCurrentVertex(d,this.distance,x,_,g,!1,f,l),"fakeround"===D){for(var j=Math.floor(8*(.5-(B-.5))),U=void 0,F=0;F=0;Q--)U=x.mult((Q+1)/(j+1))._add(E)._unit(),this.addPieSliceVertex(d,this.distance,U,z,f,l)}w&&this.addCurrentVertex(d,this.distance,E,-_,-g,!1,f,l)}else"butt"===D?(v||this.addCurrentVertex(d,this.distance,x,0,0,!1,f,l),w&&this.addCurrentVertex(d,this.distance,E,0,0,!1,f,l)):"square"===D?(v||(this.addCurrentVertex(d,this.distance,x,1,1,!1,f,l),this.e1=this.e2=-1),w&&this.addCurrentVertex(d,this.distance,E,-1,-1,!1,f,l)):"round"===D&&(v||(this.addCurrentVertex(d,this.distance,x,0,0,!1,f,l),this.addCurrentVertex(d,this.distance,x,1,1,!0,f,l),this.e1=this.e2=-1),w&&(this.addCurrentVertex(d,this.distance,E,-1,-1,!0,f,l),this.addCurrentVertex(d,this.distance,E,0,0,!1,f,l)));if(k&&M2*A){var W=d.add(w.sub(d)._mult(A/K)._round());this.distance+=W.dist(d),this.addCurrentVertex(W,this.distance,E.mult(1),0,0,!1,f,l),d=W}}v=!1}this.programConfigurations.populatePaintArrays(this.layoutVertexArray.length,e,a,s)}},ha.prototype.addCurrentVertex=function(t,e,n,r,i,o,a,s){var l,c=this.layoutVertexArray,u=this.indexArray;s&&(e=fa(e,s)),l=n.clone(),r&&l._sub(n.perp()._mult(r)),Aa(c,t,l,o,!1,r,e),this.e3=a.vertexLength++,this.e1>=0&&this.e2>=0&&(u.emplaceBack(this.e1,this.e2,this.e3),a.primitiveLength++),this.e1=this.e2,this.e2=this.e3,l=n.mult(-1),i&&l._sub(n.perp()._mult(i)),Aa(c,t,l,o,!0,-i,e),this.e3=a.vertexLength++,this.e1>=0&&this.e2>=0&&(u.emplaceBack(this.e1,this.e2,this.e3),a.primitiveLength++),this.e1=this.e2,this.e2=this.e3,e>pa/2&&!s&&(this.distance=0,this.addCurrentVertex(t,this.distance,n,r,i,o,a))},ha.prototype.addPieSliceVertex=function(t,e,n,r,i,o){n=n.mult(r?-1:1);var a=this.layoutVertexArray,s=this.indexArray;o&&(e=fa(e,o)),Aa(a,t,n,!1,r,0,e),this.e3=i.vertexLength++,this.e1>=0&&this.e2>=0&&(s.emplaceBack(this.e1,this.e2,this.e3),i.primitiveLength++),r?this.e2=this.e3:this.e1=this.e3},Cn("LineBucket",ha,{omit:["layers","features"]});var da=new rr({"line-cap":new Jn(R.layout_line["line-cap"]),"line-join":new $n(R.layout_line["line-join"]),"line-miter-limit":new Jn(R.layout_line["line-miter-limit"]),"line-round-limit":new Jn(R.layout_line["line-round-limit"])}),_a={paint:new rr({"line-opacity":new $n(R.paint_line["line-opacity"]),"line-color":new $n(R.paint_line["line-color"]),"line-translate":new Jn(R.paint_line["line-translate"]),"line-translate-anchor":new Jn(R.paint_line["line-translate-anchor"]),"line-width":new $n(R.paint_line["line-width"]),"line-gap-width":new $n(R.paint_line["line-gap-width"]),"line-offset":new $n(R.paint_line["line-offset"]),"line-blur":new $n(R.paint_line["line-blur"]),"line-dasharray":new er(R.paint_line["line-dasharray"]),"line-pattern":new tr(R.paint_line["line-pattern"]),"line-gradient":new nr(R.paint_line["line-gradient"])}),layout:da},ga=new(function(t){function e(){t.apply(this,arguments)}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype.possiblyEvaluate=function(e,n){return n=new Wn(Math.floor(n.zoom),{now:n.now,fadeDuration:n.fadeDuration,zoomHistory:n.zoomHistory,transition:n.transition}),t.prototype.possiblyEvaluate.call(this,e,n)},e.prototype.evaluate=function(e,n,r,i){return n=p({},n,{zoom:Math.floor(n.zoom)}),t.prototype.evaluate.call(this,e,n,r,i)},e}($n))(_a.paint.properties["line-width"].specification);ga.useIntegerZoom=!0;var ya=function(t){function e(e){t.call(this,e,_a)}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype._handleSpecialPaintPropertyUpdate=function(t){"line-gradient"===t&&this._updateGradient()},e.prototype._updateGradient=function(){var t=this._transitionablePaint._values["line-gradient"].value.expression;this.gradient=eo(t,"lineProgress"),this.gradientTexture=null},e.prototype.recalculate=function(e){t.prototype.recalculate.call(this,e),this.paint._values["line-floorwidth"]=ga.possiblyEvaluate(this._transitioningPaint._values["line-width"].value,e)},e.prototype.createBucket=function(t){return new ha(t)},e.prototype.queryRadius=function(t){var e=t,n=ma(ki("line-width",this,e),ki("line-gap-width",this,e)),r=ki("line-offset",this,e);return n/2+Math.abs(r)+Pi(this.paint.get("line-translate"))},e.prototype.queryIntersectsFeature=function(t,e,n,r,i,a,s){var l=Ii(t,this.paint.get("line-translate"),this.paint.get("line-translate-anchor"),a.angle,s),c=s/2*ma(this.paint.get("line-width").evaluate(e,n),this.paint.get("line-gap-width").evaluate(e,n)),u=this.paint.get("line-offset").evaluate(e,n);return u&&(r=function(t,e){for(var n=[],r=new o(0,0),i=0;i0?e+2*t:t}var va=lr([{name:"a_pos_offset",components:4,type:"Int16"},{name:"a_data",components:4,type:"Uint16"}]),ba=lr([{name:"a_projected_pos",components:3,type:"Float32"}],4),wa=(lr([{name:"a_fade_opacity",components:1,type:"Uint32"}],4),lr([{name:"a_placed",components:2,type:"Uint8"}],4)),xa=(lr([{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"}]),lr([{name:"a_pos",components:2,type:"Int16"},{name:"a_anchor_pos",components:2,type:"Int16"},{name:"a_extrude",components:2,type:"Int16"}],4)),Ea=lr([{name:"a_pos",components:2,type:"Int16"},{name:"a_anchor_pos",components:2,type:"Int16"},{name:"a_extrude",components:2,type:"Int16"}],4);function Ma(t,e,n){return t.sections.forEach(function(t){t.text=function(t,e,n){var r=e.layout.get("text-transform").evaluate(n,{});return"uppercase"===r?t=t.toLocaleUpperCase():"lowercase"===r&&(t=t.toLocaleLowerCase()),Kn.applyArabicShaping&&(t=Kn.applyArabicShaping(t)),t}(t.text,e,n)}),t}lr([{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"}]),lr([{type:"Int16",name:"anchorX"},{type:"Int16",name:"anchorY"},{type:"Int16",name:"horizontalPlacedTextSymbolIndex"},{type:"Int16",name:"verticalPlacedTextSymbolIndex"},{type:"Uint16",name:"key"},{type:"Uint16",name:"textBoxStartIndex"},{type:"Uint16",name:"textBoxEndIndex"},{type:"Uint16",name:"iconBoxStartIndex"},{type:"Uint16",name:"iconBoxEndIndex"},{type:"Uint16",name:"featureIndex"},{type:"Uint16",name:"numGlyphVertices"},{type:"Uint16",name:"numVerticalGlyphVertices"},{type:"Uint16",name:"numIconVertices"},{type:"Uint32",name:"crossTileID"}]),lr([{type:"Float32",name:"offsetX"}]),lr([{type:"Int16",name:"x"},{type:"Int16",name:"y"},{type:"Int16",name:"tileUnitDistanceFromAnchor"}]);var Ca={"!":"︕","#":"#",$:"$","%":"%","&":"&","(":"︵",")":"︶","*":"*","+":"+",",":"︐","-":"︲",".":"・","/":"/",":":"︓",";":"︔","<":"︿","=":"=",">":"﹀","?":"︖","@":"@","[":"﹇","\\":"\","]":"﹈","^":"^",_:"︳","`":"`","{":"︷","|":"―","}":"︸","~":"~","¢":"¢","£":"£","¥":"¥","¦":"¦","¬":"¬","¯":" ̄","–":"︲","—":"︱","‘":"﹃","’":"﹄","“":"﹁","”":"﹂","…":"︙","‧":"・","₩":"₩","、":"︑","。":"︒","〈":"︿","〉":"﹀","《":"︽","》":"︾","「":"﹁","」":"﹂","『":"﹃","』":"﹄","【":"︻","】":"︼","〔":"︹","〕":"︺","〖":"︗","〗":"︘","!":"︕","(":"︵",")":"︶",",":"︐","-":"︲",".":"・",":":"︓",";":"︔","<":"︿",">":"﹀","?":"︖","[":"﹇","]":"﹈","_":"︳","{":"︷","|":"―","}":"︸","⦅":"︵","⦆":"︶","。":"︒","「":"﹁","」":"﹂"},Ba=function(t){function e(e,n,r,i){t.call(this,e,n),this.angle=r,void 0!==i&&(this.segment=i)}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype.clone=function(){return new e(this.x,this.y,this.angle,this.segment)},e}(o);Cn("Anchor",Ba);function Oa(t,e){var n=e.expression;if("constant"===n.kind)return{functionType:"constant",layoutSize:n.evaluate(new Wn(t+1))};if("source"===n.kind)return{functionType:"source"};for(var r=n.zoomStops,i=0;i0)&&("constant"!==i.value.kind||i.value.value.length>0),l="constant"!==a.value.kind||a.value.value&&a.value.value.length>0;if(this.features=[],s||l){for(var c=e.iconDependencies,u=e.glyphDependencies,p=new Wn(this.zoom),A=0,h=t;A=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 l=0;l0;this.addCollisionDebugVertices(o,a,s,l,c?this.collisionCircle:this.collisionBox,i.anchorPoint,n,c)}},Sa.prototype.generateCollisionDebugBuffers=function(){for(var t=0;t0},Sa.prototype.hasIconData=function(){return this.icon.segments.get().length>0},Sa.prototype.hasCollisionBoxData=function(){return this.collisionBox.segments.get().length>0},Sa.prototype.hasCollisionCircleData=function(){return this.collisionCircle.segments.get().length>0},Sa.prototype.addIndicesForPlacedTextSymbol=function(t){for(var e=this.text.placedSymbolArray.get(t),n=e.vertexStartIndex+4*e.numGlyphs,r=e.vertexStartIndex;r1||this.icon.segments.get().length>1))){for(var e=[],n=0;n=0&&this.addIndicesForPlacedTextSymbol(A.horizontalPlacedTextSymbolIndex),A.verticalPlacedTextSymbolIndex>=0&&this.addIndicesForPlacedTextSymbol(A.verticalPlacedTextSymbolIndex);var h=this.icon.placedSymbolArray.get(p);if(h.numGlyphs){var f=h.vertexStartIndex;this.icon.indexArray.emplaceBack(f,f+1,f+2),this.icon.indexArray.emplaceBack(f+1,f+2,f+3)}}this.text.indexBuffer&&this.text.indexBuffer.updateData(this.text.indexArray),this.icon.indexBuffer&&this.icon.indexBuffer.updateData(this.icon.indexArray)}},Cn("SymbolBucket",Sa,{omit:["layers","collisionBoxArray","features","compareText"]}),Sa.MAX_GLYPHS=65535,Sa.addDynamicAttributes=Ta;var za=new rr({"symbol-placement":new Jn(R.layout_symbol["symbol-placement"]),"symbol-spacing":new Jn(R.layout_symbol["symbol-spacing"]),"symbol-avoid-edges":new Jn(R.layout_symbol["symbol-avoid-edges"]),"symbol-z-order":new Jn(R.layout_symbol["symbol-z-order"]),"icon-allow-overlap":new Jn(R.layout_symbol["icon-allow-overlap"]),"icon-ignore-placement":new Jn(R.layout_symbol["icon-ignore-placement"]),"icon-optional":new Jn(R.layout_symbol["icon-optional"]),"icon-rotation-alignment":new Jn(R.layout_symbol["icon-rotation-alignment"]),"icon-size":new $n(R.layout_symbol["icon-size"]),"icon-text-fit":new Jn(R.layout_symbol["icon-text-fit"]),"icon-text-fit-padding":new Jn(R.layout_symbol["icon-text-fit-padding"]),"icon-image":new $n(R.layout_symbol["icon-image"]),"icon-rotate":new $n(R.layout_symbol["icon-rotate"]),"icon-padding":new Jn(R.layout_symbol["icon-padding"]),"icon-keep-upright":new Jn(R.layout_symbol["icon-keep-upright"]),"icon-offset":new $n(R.layout_symbol["icon-offset"]),"icon-anchor":new $n(R.layout_symbol["icon-anchor"]),"icon-pitch-alignment":new Jn(R.layout_symbol["icon-pitch-alignment"]),"text-pitch-alignment":new Jn(R.layout_symbol["text-pitch-alignment"]),"text-rotation-alignment":new Jn(R.layout_symbol["text-rotation-alignment"]),"text-field":new $n(R.layout_symbol["text-field"]),"text-font":new $n(R.layout_symbol["text-font"]),"text-size":new $n(R.layout_symbol["text-size"]),"text-max-width":new $n(R.layout_symbol["text-max-width"]),"text-line-height":new Jn(R.layout_symbol["text-line-height"]),"text-letter-spacing":new $n(R.layout_symbol["text-letter-spacing"]),"text-justify":new $n(R.layout_symbol["text-justify"]),"text-anchor":new $n(R.layout_symbol["text-anchor"]),"text-max-angle":new Jn(R.layout_symbol["text-max-angle"]),"text-rotate":new $n(R.layout_symbol["text-rotate"]),"text-padding":new Jn(R.layout_symbol["text-padding"]),"text-keep-upright":new Jn(R.layout_symbol["text-keep-upright"]),"text-transform":new $n(R.layout_symbol["text-transform"]),"text-offset":new $n(R.layout_symbol["text-offset"]),"text-allow-overlap":new Jn(R.layout_symbol["text-allow-overlap"]),"text-ignore-placement":new Jn(R.layout_symbol["text-ignore-placement"]),"text-optional":new Jn(R.layout_symbol["text-optional"])}),Ra={paint:new rr({"icon-opacity":new $n(R.paint_symbol["icon-opacity"]),"icon-color":new $n(R.paint_symbol["icon-color"]),"icon-halo-color":new $n(R.paint_symbol["icon-halo-color"]),"icon-halo-width":new $n(R.paint_symbol["icon-halo-width"]),"icon-halo-blur":new $n(R.paint_symbol["icon-halo-blur"]),"icon-translate":new Jn(R.paint_symbol["icon-translate"]),"icon-translate-anchor":new Jn(R.paint_symbol["icon-translate-anchor"]),"text-opacity":new $n(R.paint_symbol["text-opacity"]),"text-color":new $n(R.paint_symbol["text-color"]),"text-halo-color":new $n(R.paint_symbol["text-halo-color"]),"text-halo-width":new $n(R.paint_symbol["text-halo-width"]),"text-halo-blur":new $n(R.paint_symbol["text-halo-blur"]),"text-translate":new Jn(R.paint_symbol["text-translate"]),"text-translate-anchor":new Jn(R.paint_symbol["text-translate-anchor"])}),layout:za},ja=function(t){function e(e){t.call(this,e,Ra)}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype.recalculate=function(e){t.prototype.recalculate.call(this,e),"auto"===this.layout.get("icon-rotation-alignment")&&("point"!==this.layout.get("symbol-placement")?this.layout._values["icon-rotation-alignment"]="map":this.layout._values["icon-rotation-alignment"]="viewport"),"auto"===this.layout.get("text-rotation-alignment")&&("point"!==this.layout.get("symbol-placement")?this.layout._values["text-rotation-alignment"]="map":this.layout._values["text-rotation-alignment"]="viewport"),"auto"===this.layout.get("text-pitch-alignment")&&(this.layout._values["text-pitch-alignment"]=this.layout.get("text-rotation-alignment")),"auto"===this.layout.get("icon-pitch-alignment")&&(this.layout._values["icon-pitch-alignment"]=this.layout.get("icon-rotation-alignment"))},e.prototype.getValueAndResolveTokens=function(t,e){var n,r=this.layout.get(t).evaluate(e,{}),i=this._unevaluatedLayout._values[t];return i.isDataDriven()||De(i.value)?r:(n=e.properties,r.replace(/{([^{}]+)}/g,function(t,e){return e in n?String(n[e]):""}))},e.prototype.createBucket=function(t){return new Sa(t)},e.prototype.queryRadius=function(){return 0},e.prototype.queryIntersectsFeature=function(){return!1},e}(ir),Ua={paint:new rr({"background-color":new Jn(R.paint_background["background-color"]),"background-pattern":new er(R.paint_background["background-pattern"]),"background-opacity":new Jn(R.paint_background["background-opacity"])})},Fa=function(t){function e(e){t.call(this,e,Ua)}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e}(ir),Qa={paint:new rr({"raster-opacity":new Jn(R.paint_raster["raster-opacity"]),"raster-hue-rotate":new Jn(R.paint_raster["raster-hue-rotate"]),"raster-brightness-min":new Jn(R.paint_raster["raster-brightness-min"]),"raster-brightness-max":new Jn(R.paint_raster["raster-brightness-max"]),"raster-saturation":new Jn(R.paint_raster["raster-saturation"]),"raster-contrast":new Jn(R.paint_raster["raster-contrast"]),"raster-resampling":new Jn(R.paint_raster["raster-resampling"]),"raster-fade-duration":new Jn(R.paint_raster["raster-fade-duration"])})},Ka=function(t){function e(e){t.call(this,e,Qa)}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e}(ir),Wa=function(t){function e(e){t.call(this,e,{}),this.implementation=e}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype.hasOffscreenPass=function(){return void 0!==this.implementation.prerender||"3d"===this.implementation.renderingMode},e.prototype.recalculate=function(){},e.prototype.updateTransitions=function(){},e.prototype.hasTransition=function(){},e.prototype.serialize=function(){},e.prototype.resize=function(){this.viewportFrame&&(this.viewportFrame.destroy(),this.viewportFrame=null)},e.prototype.onAdd=function(t){this.implementation.onAdd&&this.implementation.onAdd(t,t.painter.context.gl)},e.prototype.onRemove=function(t){this.implementation.onRemove&&this.implementation.onRemove(t)},e}(ir),Ha={circle:Ni,heatmap:no,hillshade:io,fill:Fo,"fill-extrusion":Xo,line:ya,symbol:ja,background:Fa,raster:Ka};function Va(t){for(var e=0,n=0,r=0,i=t;r=0;A--){var h=a[A];if(!(p.w>h.w||p.h>h.h)){if(p.x=h.x,p.y=h.y,l=Math.max(l,p.y+p.h),s=Math.max(s,p.x+p.w),p.w===h.w&&p.h===h.h){var f=a.pop();A>1,u=-7,p=n?i-1:0,A=n?-1:1,h=t[e+p];for(p+=A,o=h&(1<<-u)-1,h>>=-u,u+=s;u>0;o=256*o+t[e+p],p+=A,u-=8);for(a=o&(1<<-u)-1,o>>=-u,u+=r;u>0;a=256*a+t[e+p],p+=A,u-=8);if(0===o)o=1-c;else{if(o===l)return a?NaN:1/0*(h?-1:1);a+=Math.pow(2,r),o-=c}return(h?-1:1)*a*Math.pow(2,o-r)},es=function(t,e,n,r,i,o){var a,s,l,c=8*o-i-1,u=(1<>1,A=23===i?Math.pow(2,-24)-Math.pow(2,-77):0,h=r?0:o-1,f=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=u):(a=Math.floor(Math.log(e)/Math.LN2),e*(l=Math.pow(2,-a))<1&&(a--,l*=2),(e+=a+p>=1?A/l:A*Math.pow(2,1-p))*l>=2&&(a++,l/=2),a+p>=u?(s=0,a=u):a+p>=1?(s=(e*l-1)*Math.pow(2,i),a+=p):(s=e*Math.pow(2,p-1)*Math.pow(2,i),a=0));i>=8;t[n+h]=255&s,h+=f,s/=256,i-=8);for(a=a<0;t[n+h]=255&a,h+=f,a/=256,c-=8);t[n+h-f]|=128*d},ns=rs;function rs(t){this.buf=ArrayBuffer.isView&&ArrayBuffer.isView(t)?t:new Uint8Array(t||0),this.pos=0,this.type=0,this.length=this.buf.length}function is(t){return t.type===rs.Bytes?t.readVarint()+t.pos:t.pos+1}function os(t,e,n){return n?4294967296*e+(t>>>0):4294967296*(e>>>0)+(t>>>0)}function as(t,e,n){var r=e<=16383?1:e<=2097151?2:e<=268435455?3:Math.ceil(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 ss(t,e){for(var n=0;n>>8,t[n+2]=e>>>16,t[n+3]=e>>>24}function ys(t,e){return(t[e]|t[e+1]<<8|t[e+2]<<16)+(t[e+3]<<24)}rs.Varint=0,rs.Fixed64=1,rs.Bytes=2,rs.Fixed32=5,rs.prototype={destroy:function(){this.buf=null},readFields:function(t,e,n){for(n=n||this.length;this.pos>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=_s(this.buf,this.pos);return this.pos+=4,t},readSFixed32:function(){var t=ys(this.buf,this.pos);return this.pos+=4,t},readFixed64:function(){var t=_s(this.buf,this.pos)+4294967296*_s(this.buf,this.pos+4);return this.pos+=8,t},readSFixed64:function(){var t=_s(this.buf,this.pos)+4294967296*ys(this.buf,this.pos+4);return this.pos+=8,t},readFloat:function(){var t=ts(this.buf,this.pos,!0,23,4);return this.pos+=4,t},readDouble:function(){var t=ts(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(r=(112&(i=o[n.pos++]))>>4,i<128)return os(t,r,e);if(r|=(127&(i=o[n.pos++]))<<3,i<128)return os(t,r,e);if(r|=(127&(i=o[n.pos++]))<<10,i<128)return os(t,r,e);if(r|=(127&(i=o[n.pos++]))<<17,i<128)return os(t,r,e);if(r|=(127&(i=o[n.pos++]))<<24,i<128)return os(t,r,e);if(r|=(1&(i=o[n.pos++]))<<31,i<128)return os(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){for(var r="",i=e;i239?4:l>223?3:l>191?2:1;if(i+u>n)break;1===u?l<128&&(c=l):2===u?128==(192&(o=t[i+1]))&&(c=(31&l)<<6|63&o)<=127&&(c=null):3===u?(o=t[i+1],a=t[i+2],128==(192&o)&&128==(192&a)&&((c=(15&l)<<12|(63&o)<<6|63&a)<=2047||c>=55296&&c<=57343)&&(c=null)):4===u&&(o=t[i+1],a=t[i+2],s=t[i+3],128==(192&o)&&128==(192&a)&&128==(192&s)&&((c=(15&l)<<18|(63&o)<<12|(63&a)<<6|63&s)<=65535||c>=1114112)&&(c=null)),null===c?(c=65533,u=1):c>65535&&(c-=65536,r+=String.fromCharCode(c>>>10&1023|55296),c=56320|1023&c),r+=String.fromCharCode(c),i+=u}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){var n=is(this);for(t=t||[];this.pos127;);else if(e===rs.Bytes)this.pos=this.readVarint()+this.pos;else if(e===rs.Fixed32)this.pos+=4;else{if(e!==rs.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;e268435455||t<0?function(t,e){var n,r;if(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)),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;e.buf[e.pos++]|=n|((t>>>=3)?128:0),t&&(e.buf[e.pos++]=127&t|((t>>>=7)?128:0),t&&(e.buf[e.pos++]=127&t|((t>>>=7)?128:0),t&&(e.buf[e.pos++]=127&t|((t>>>=7)?128:0),t&&(e.buf[e.pos++]=127&t|((t>>>=7)?128:0),t&&(e.buf[e.pos++]=127&t)))))}(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;o55295&&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&&as(e,n,this),this.pos=e-1,this.writeVarint(n),this.pos+=n},writeFloat:function(t){this.realloc(4),es(this.buf,t,this.pos,!0,23,4),this.pos+=4},writeDouble:function(t){this.realloc(8),es(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=128&&as(n,r,this),this.pos=n-1,this.writeVarint(r),this.pos+=r},writeMessage:function(t,e,n){this.writeTag(t,rs.Bytes),this.writeRawMessage(e,n)},writePackedVarint:function(t,e){this.writeMessage(t,ss,e)},writePackedSVarint:function(t,e){this.writeMessage(t,ls,e)},writePackedBoolean:function(t,e){this.writeMessage(t,ps,e)},writePackedFloat:function(t,e){this.writeMessage(t,cs,e)},writePackedDouble:function(t,e){this.writeMessage(t,us,e)},writePackedFixed32:function(t,e){this.writeMessage(t,As,e)},writePackedSFixed32:function(t,e){this.writeMessage(t,hs,e)},writePackedFixed64:function(t,e){this.writeMessage(t,fs,e)},writePackedSFixed64:function(t,e){this.writeMessage(t,ds,e)},writeBytesField:function(t,e){this.writeTag(t,rs.Bytes),this.writeBytes(e)},writeFixed32Field:function(t,e){this.writeTag(t,rs.Fixed32),this.writeFixed32(e)},writeSFixed32Field:function(t,e){this.writeTag(t,rs.Fixed32),this.writeSFixed32(e)},writeFixed64Field:function(t,e){this.writeTag(t,rs.Fixed64),this.writeFixed64(e)},writeSFixed64Field:function(t,e){this.writeTag(t,rs.Fixed64),this.writeSFixed64(e)},writeVarintField:function(t,e){this.writeTag(t,rs.Varint),this.writeVarint(e)},writeSVarintField:function(t,e){this.writeTag(t,rs.Varint),this.writeSVarint(e)},writeStringField:function(t,e){this.writeTag(t,rs.Bytes),this.writeString(e)},writeFloatField:function(t,e){this.writeTag(t,rs.Fixed32),this.writeFloat(e)},writeDoubleField:function(t,e){this.writeTag(t,rs.Fixed64),this.writeDouble(e)},writeBooleanField:function(t,e){this.writeVarintField(t,Boolean(e))}};var ms=3;function vs(t,e,n){1===t&&n.readMessage(bs,e)}function bs(t,e,n){if(3===t){var r=n.readMessage(ws,{}),i=r.id,o=r.bitmap,a=r.width,s=r.height,l=r.left,c=r.top,u=r.advance;e.push({id:i,bitmap:new Ji({width:a+2*ms,height:s+2*ms},o),metrics:{width:a,height:s,left:l,top:c,advance:u}})}}function ws(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())}var xs=ms,Es=function(t,e,n){this.target=t,this.parent=e,this.mapId=n,this.callbacks={},this.callbackID=0,f(["receive"],this),this.target.addEventListener("message",this.receive,!1)};function Ms(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]}Es.prototype.send=function(t,e,n,r){var i=n?this.mapId+":"+this.callbackID++:null;n&&(this.callbacks[i]=n);var o=[];this.target.postMessage({targetMapId:r,sourceMapId:this.mapId,type:t,id:String(i),data:On(e,o)},o)},Es.prototype.receive=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:"",id:String(i),error:t?On(t):null,data:On(e,r)},r)};if(""===r.type)e=this.callbacks[r.id],delete this.callbacks[r.id],e&&r.error?e(kn(r.error)):e&&e(null,kn(r.data));else if(void 0!==r.id&&this.parent[r.type])this.parent[r.type](r.sourceMapId,kn(r.data),o);else if(void 0!==r.id&&this.parent.getWorkerSource){var a=r.type.split("."),s=kn(r.data);this.parent.getWorkerSource(r.sourceMapId,a[0],s.source)[a[1]](s,o)}else this.parent[r.type](kn(r.data))}},Es.prototype.remove=function(){this.target.removeEventListener("message",this.receive,!1)};var Cs=function(t,e,n){this.z=t,this.x=e,this.y=n,this.key=ks(0,t,e,n)};Cs.prototype.equals=function(t){return this.z===t.z&&this.x===t.x&&this.y===t.y},Cs.prototype.url=function(t,e){var n,r,i,o,a,s=(n=this.x,r=this.y,i=this.z,o=Ms(256*n,256*(r=Math.pow(2,i)-r-1),i),a=Ms(256*(n+1),256*(r+1),i),o[0]+","+o[1]+","+a[0]+","+a[1]),l=function(t,e,n){for(var r,i="",o=t;o>0;o--)i+=(e&(r=1<this.canonical.z?new Os(t,this.wrap,this.canonical.z,this.canonical.x,this.canonical.y):new Os(t,this.wrap,t,this.canonical.x>>e,this.canonical.y>>e)},Os.prototype.isChildOf=function(t){var e=this.canonical.z-t.canonical.z;return 0===t.overscaledZ||t.overscaledZ>e&&t.canonical.y===this.canonical.y>>e},Os.prototype.children=function(t){if(this.overscaledZ>=t)return[new Os(this.overscaledZ+1,this.wrap,this.canonical.z,this.canonical.x,this.canonical.y)];var e=this.canonical.z+1,n=2*this.canonical.x,r=2*this.canonical.y;return[new Os(e,this.wrap,e,n,r),new Os(e,this.wrap,e,n+1,r),new Os(e,this.wrap,e,n,r+1),new Os(e,this.wrap,e,n+1,r+1)]},Os.prototype.isLessThan=function(t){return this.wrapt.wrap)&&(this.overscaledZt.overscaledZ)&&(this.canonical.xt.canonical.x)&&this.canonical.y=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)},Ps.prototype._unpackMapbox=function(t,e,n){return(256*t*256+256*e+n)/10-1e4},Ps.prototype._unpackTerrarium=function(t,e,n){return 256*t+e+n/256-32768},Ps.prototype.getPixels=function(){return new $i({width:this.dim+2*this.border,height:this.dim+2*this.border},new Uint8Array(this.data.buffer))},Ps.prototype.backfillBorder=function(t,e,n){if(this.dim!==t.dim)throw new Error("dem dimension mismatch");var r=e*this.dim,i=e*this.dim+this.dim,o=n*this.dim,a=n*this.dim+this.dim;switch(e){case-1:r=i-1;break;case 1:i=r+1}switch(n){case-1:o=a-1;break;case 1:a=o+1}for(var s=u(r,-this.border,this.dim+this.border),l=u(i,-this.border,this.dim+this.border),c=u(o,-this.border,this.dim+this.border),p=u(a,-this.border,this.dim+this.border),A=-e*this.dim,h=-n*this.dim,f=c;f=0&&l[3]>=0&&this.grid.insert(o,l[0],l[1],l[2],l[3])}},zs.prototype.loadVTLayers=function(){return this.vtLayers||(this.vtLayers=new aa.VectorTile(new ns(this.rawTileData)).layers,this.sourceLayerCoder=new Ts(this.vtLayers?Object.keys(this.vtLayers).sort():["_geojsonTileLayer"])),this.vtLayers},zs.prototype.query=function(t,e,n){var r=this;this.loadVTLayers();for(var i=t.params||{},o=fi/t.tileSize/t.scale,a=qe(i.filter),s=t.queryGeometry,l=t.queryPadding*o,c=1/0,u=1/0,p=-1/0,A=-1/0,h=0;h=0)return!0;return!1}(o,l)){var c=this.sourceLayerCoder.decode(n),u=this.vtLayers[c].feature(r);if(i(new Wn(this.tileID.overscaledZ),u))for(var p=0;p>l.z,u=new o(l.x*c,l.y*c),p=new o(u.x+c,u.y+c),A=this.segments.prepareSegment(4,n,r);n.emplaceBack(u.x,u.y,u.x,u.y),n.emplaceBack(p.x,u.y,p.x,u.y),n.emplaceBack(u.x,p.y,u.x,p.y),n.emplaceBack(p.x,p.y,p.x,p.y);var h=A.vertexLength;r.emplaceBack(h,h+1,h+2),r.emplaceBack(h+1,h+2,h+3),A.vertexLength+=4,A.primitiveLength+=2}this.maskedBoundsBuffer=e.createVertexBuffer(n,Is.members),this.maskedIndexBuffer=e.createIndexBuffer(r)}},js.prototype.hasData=function(){return"loaded"===this.state||"reloading"===this.state||"expired"===this.state},js.prototype.patternsLoaded=function(){return this.imageAtlas&&!!Object.keys(this.imageAtlas.patternPositions).length},js.prototype.setExpiryData=function(t){var e=this.expirationTime;if(t.cacheControl){var n=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}(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(),i=!1;if(this.expirationTime>r)i=!1;else if(e)if(this.expirationTime=0&&r>=t&&Qs[this.text.charCodeAt(r)];r--)n--;this.text=this.text.substring(t,n),this.sectionIndex=this.sectionIndex.slice(t,n)},Fs.prototype.substring=function(t,e){var n=new Fs;return n.text=this.text.substring(t,e),n.sectionIndex=this.sectionIndex.slice(t,e),n.sections=this.sections,n},Fs.prototype.toString=function(){return this.text},Fs.prototype.getMaxScale=function(){var t=this;return this.sectionIndex.reduce(function(e,n){return Math.max(e,t.sections[n].scale)},0)};var Qs={9:!0,10:!0,11:!0,12:!0,13:!0,32:!0},Ks={};function Ws(t,e,n,r){var i=Math.pow(t-e,2);return r?t>e/4).toString(16):([1e7]+-[1e3]+-4e3+-8e3+-1e11).replace(/[018]/g,t)}()},t.validateUuid=function(t){return!!t&&/^[0-9a-f]{8}-[0-9a-f]{4}-[4][0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}$/i.test(t)},t.storageAvailable=function(t){try{var e=self[t];return e.setItem("_mapbox_test_",1),e.removeItem("_mapbox_test_"),!0}catch(t){return!1}},t.warnOnce=v,t.postData=function(t,e,n){var r=P(p(t,{method:"POST"}));return r.onerror=function(){n(new Error(r.statusText))},r.onload=function(){r.status>=200&&r.status<300?n(null,r.response):n(new k(r.statusText,r.status,t.url))},r.send(e),{cancel:function(){return r.abort()}}},t.getJSON=function(t,e){var n=P(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||0===n.status)&&n.response){var r;try{r=JSON.parse(n.response)}catch(t){return e(t)}e(null,r)}else 401===n.status&&t.url.match(/mapbox.com/)?e(new k(n.statusText+": you may have provided an invalid Mapbox access token. See https://www.mapbox.com/api-documentation/#access-tokens",n.status,t.url)):e(new k(n.statusText,n.status,t.url))},n.send(),{cancel:function(){return n.abort()}}},t.getImage=function(t,e){return I(t,function(t,n){if(t)e(t);else if(n){var r=new self.Image,i=self.URL||self.webkitURL;r.onload=function(){e(null,r),i.revokeObjectURL(r.src)},r.onerror=function(){return e(new Error("Could not load image. Please make sure to use a supported image type such as PNG or JPEG. Note that SVGs are not supported."))};var o=new self.Blob([new Uint8Array(n.data)],{type:"image/png"});r.cacheControl=n.cacheControl,r.expires=n.expires,r.src=n.data.byteLength?i.createObjectURL(o):"data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAEAAAABCAYAAAAfFcSJAAAAC0lEQVQYV2NgAAIAAAUAAarVyFEAAAAASUVORK5CYII="}})},t.ResourceType=O,t.RGBAImage=$i,t.potpack=Va,t.ImagePosition=Na,t.Texture=$a,t.getArrayBuffer=I,t.parseGlyphPBF=function(t){return new ns(t).readFields(vs,[])},t.isChar=In,t.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)})})},t.AlphaImage=Ji,t.styleSpec=R,t.endsWith=d,t.extend=p,t.sphericalToCartesian=function(t){var e=t[0],n=t[1],r=t[2];return n+=90,n*=Math.PI/180,r*=Math.PI/180,{x:e*Math.cos(n)*Math.sin(r),y:e*Math.sin(n)*Math.sin(r),z:e*Math.cos(r)}},t.Evented=z,t.validateStyle=_n,t.validateLight=gn,t.emitValidationErrors=vn,t.Color=ot,t.number=Pt,t.Properties=rr,t.Transitionable=Nn,t.Transitioning=qn,t.PossiblyEvaluated=Zn,t.DataConstantProperty=Jn,t.uniqueId=h,t.Actor=Es,t.pick=function(t,e){for(var n={},r=0;r0&&(o=1/Math.sqrt(o),t[0]=e[0]*o,t[1]=e[1]*o,t[2]=e[2]*o),t},t.dot=function(t,e){return t[0]*e[0]+t[1]*e[1]+t[2]*e[2]},t.cross=function(t,e,n){var r=e[0],i=e[1],o=e[2],a=n[0],s=n[1],l=n[2];return t[0]=i*l-o*s,t[1]=o*a-r*l,t[2]=r*s-i*a,t},t.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},t.len=Ui,t.forEach$1=Fi,t.UniformColor=ei,t.StructArrayLayout2i4=ur,t.StructArrayLayout2ui4=Br,t.StructArrayLayout3ui6=Cr,t.StructArrayLayout1ui2=Or,t.UnwrappedTileID=Bs,t.create$4=function(){var t=new Di(4);return Di!=Float32Array&&(t[1]=0,t[2]=0),t[0]=1,t[3]=1,t},t.rotate=function(t,e,n){var r=e[0],i=e[1],o=e[2],a=e[3],s=Math.sin(n),l=Math.cos(n);return t[0]=r*l+o*s,t[1]=i*l+a*s,t[2]=r*-s+o*l,t[3]=i*-s+a*l,t},t.ease=c,t.bezier=l,t.EvaluationParameters=Wn,t.setRTLTextPlugin=function(t,e){if(jn)throw new Error("setRTLTextPlugin cannot be called multiple times.");jn=!0,Un=C.resolveURL(t),Rn=function(t){t?(jn=!1,Un=null,e&&e(t)):Fn=!0},Qn.fire(new L("pluginAvailable",{pluginURL:Un,completionCallback:Rn}))},t.values=function(t){var e=[];for(var n in t)e.push(t[n]);return e},t.featureFilter=qe,t.Anchor=Ba,t.GLYPH_PBF_BORDER=xs,t.shapeText=function(t,e,n,r,i,o,a,s,l,c,u){var p=Fs.fromFeature(t,n);u===Us.vertical&&p.verticalizePunctuation();var A,h=[],f={positionedGlyphs:h,text:p,top:l[1],bottom:l[1],left:l[0],right:l[0],writingMode:u},d=Kn.processBidirectionalText,_=Kn.processStyledBidirectionalText;if(d&&1===p.sections.length){A=[];for(var g=0,y=d(p.toString(),Ns(p,s,r,e));g-n/2;){if(--a<0)return!1;s-=t[a].dist(o),o=t[a]}s+=t[a].dist(t[a+1]),a++;for(var l=[],c=0;sr;)c-=l.shift().angleDelta;if(c>i)return!1;a++,s+=p.dist(A)}return!0}function o(t){for(var e=0,n=0;nf){var m=(f-h)/y,v=t.number(_.x,g.x,m),b=t.number(_.y,g.y,m),w=new t.Anchor(v,b,g.angleTo(_),d);return w._round(),!p||i(e,w,A,p,n)?w:void 0}h+=y}}function c(e,n,r,l,c,u,p,A,h){var f=a(l,u,p),d=s(l,c),_=d*p,g=0===e[0].x||e[0].x===h||0===e[0].y||e[0].y===h;return n-_=0&&E=0&&M=0&&_+h<=f){var C=new t.Anchor(E,M,w,y);C._round(),s&&!i(n,C,c,s,l)||g.push(C)}}d+=b}return p||g.length||u||(g=e(n,d/2,a,s,l,c,u,!0,A)),g}(e,g?n/2*A%n:(d/2+2*u)*p*A%n,n,f,r,_,g,!1,h)}r.prototype.replace=function(t){this._layerConfigs={},this._layers={},this.update(t,[])},r.prototype.update=function(e,r){for(var i=this,o=0,a=e;o0&&(g=Math.max(10*l,g),this._addLineCollisionCircles(e,n,r,r.segment,y,g,i,o,a,p))}else{if(A){var m=new t.Point(d,h),v=new t.Point(_,h),b=new t.Point(d,f),w=new t.Point(_,f),x=A*Math.PI/180;m._rotate(x),v._rotate(x),b._rotate(x),w._rotate(x),d=Math.min(m.x,v.x,b.x,w.x),_=Math.max(m.x,v.x,b.x,w.x),h=Math.min(m.y,v.y,b.y,w.y),f=Math.max(m.y,v.y,b.y,w.y)}e.emplaceBack(r.x,r.y,d,h,_,f,i,o,a,0,0)}this.boxEndIndex=e.length};u.prototype._addLineCollisionCircles=function(t,e,n,r,i,o,a,s,l,c){var u=o/2,p=Math.floor(i/u)||1,A=1+.4*Math.log(c)/Math.LN2,h=Math.floor(p*A/2),f=-o/2,d=n,_=r+1,g=f,y=-i/2,m=y-i/4;do{if(--_<0){if(g>y)return;_=0;break}g-=e[_].dist(d),d=e[_]}while(g>m);for(var v=e[_].dist(e[_+1]),b=-h;bi&&(x+=w-i),!(x=e.length)return;v=e[_].dist(e[_+1])}var E=x-g,M=e[_],C=e[_+1].sub(M)._unit()._mult(E)._add(M)._round(),B=Math.abs(x-f)0)for(var n=(this.length>>1)-1;n>=0;n--)this._down(n)}function f(t,e){return te?1:0}function d(e,n,r){void 0===n&&(n=1),void 0===r&&(r=!1);for(var i=1/0,o=1/0,a=-1/0,s=-1/0,l=e[0],c=0;ca)&&(a=u.x),(!c||u.y>s)&&(s=u.y)}var A=a-i,h=s-o,f=Math.min(A,h),d=f/2,y=new p(null,_);if(0===f)return new t.Point(i,o);for(var m=i;mb.d||!b.d)&&(b=x,r&&console.log("found best %d after %d probes",Math.round(1e4*x.d)/1e4,w)),x.max-b.d<=n||(d=x.h/2,y.push(new g(x.p.x-d,x.p.y-d,d,e)),y.push(new g(x.p.x+d,x.p.y-d,d,e)),y.push(new g(x.p.x-d,x.p.y+d,d,e)),y.push(new g(x.p.x+d,x.p.y+d,d,e)),w+=4)}return r&&(console.log("num probes: "+w),console.log("best distance: "+b.d)),b.p}function _(t,e){return e.max-t.max}function g(e,n,r,i){this.p=new t.Point(e,n),this.h=r,this.d=function(e,n){for(var r=!1,i=1/0,o=0;oe.y!=p.y>e.y&&e.x<(p.x-u.x)*(e.y-u.y)/(p.y-u.y)+u.x&&(r=!r),i=Math.min(i,t.distToSegmentSquared(e,u,p))}return(r?1:-1)*Math.sqrt(i)}(this.p,i),this.max=this.d+this.h*Math.SQRT2}h.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=0)break;e[t]=s,t=o}e[t]=i}},p.default=A;var y=t.createCommonjsModule(function(t){t.exports=function(t,e){var n,r,i,o,a,s,l,c;for(n=3&t.length,r=t.length-n,i=e,a=3432918353,s=461845907,c=0;c>>16)*a&65535)<<16)&4294967295)<<15|l>>>17))*s+(((l>>>16)*s&65535)<<16)&4294967295)<<13|i>>>19))+((5*(i>>>16)&65535)<<16)&4294967295))+((58964+(o>>>16)&65535)<<16);switch(l=0,n){case 3:l^=(255&t.charCodeAt(c+2))<<16;case 2:l^=(255&t.charCodeAt(c+1))<<8;case 1:i^=l=(65535&(l=(l=(65535&(l^=255&t.charCodeAt(c)))*a+(((l>>>16)*a&65535)<<16)&4294967295)<<15|l>>>17))*s+(((l>>>16)*s&65535)<<16)&4294967295}return i^=t.length,i=2246822507*(65535&(i^=i>>>16))+((2246822507*(i>>>16)&65535)<<16)&4294967295,i=3266489909*(65535&(i^=i>>>13))+((3266489909*(i>>>16)&65535)<<16)&4294967295,(i^=i>>>16)>>>0}}),m=y,v=y,b=t.createCommonjsModule(function(t){t.exports=function(t,e){for(var n,r=t.length,i=e^r,o=0;r>=4;)n=1540483477*(65535&(n=255&t.charCodeAt(o)|(255&t.charCodeAt(++o))<<8|(255&t.charCodeAt(++o))<<16|(255&t.charCodeAt(++o))<<24))+((1540483477*(n>>>16)&65535)<<16),i=1540483477*(65535&i)+((1540483477*(i>>>16)&65535)<<16)^(n=1540483477*(65535&(n^=n>>>24))+((1540483477*(n>>>16)&65535)<<16)),r-=4,++o;switch(r){case 3:i^=(255&t.charCodeAt(o+2))<<16;case 2:i^=(255&t.charCodeAt(o+1))<<8;case 1:i=1540483477*(65535&(i^=255&t.charCodeAt(o)))+((1540483477*(i>>>16)&65535)<<16)}return i=1540483477*(65535&(i^=i>>>13))+((1540483477*(i>>>16)&65535)<<16),(i^=i>>>15)>>>0}});function w(e,n,r,i,o,a){e.createArrays();var s=512*e.overscaling;e.tilePixelRatio=t.EXTENT/s,e.compareText={},e.iconsNeedLinear=!1;var l=e.layers[0].layout,c=e.layers[0]._unevaluatedLayout._values,u={};if("composite"===e.textSizeData.functionType){var p=e.textSizeData.zoomRange,A=p.min,h=p.max;u.compositeTextSizes=[c["text-size"].possiblyEvaluate(new t.EvaluationParameters(A)),c["text-size"].possiblyEvaluate(new t.EvaluationParameters(h))]}if("composite"===e.iconSizeData.functionType){var f=e.iconSizeData.zoomRange,d=f.min,_=f.max;u.compositeIconSizes=[c["icon-size"].possiblyEvaluate(new t.EvaluationParameters(d)),c["icon-size"].possiblyEvaluate(new t.EvaluationParameters(_))]}u.layoutTextSize=c["text-size"].possiblyEvaluate(new t.EvaluationParameters(e.zoom+1)),u.layoutIconSize=c["icon-size"].possiblyEvaluate(new t.EvaluationParameters(e.zoom+1)),u.textMaxSize=c["text-size"].possiblyEvaluate(new t.EvaluationParameters(18));for(var g=24*l.get("text-line-height"),y="map"===l.get("text-rotation-alignment")&&"point"!==l.get("symbol-placement"),m=l.get("text-keep-upright"),v=0,b=e.features;v=t.EXTENT||l.y<0||l.y>=t.EXTENT||function(e,n,r,i,o,a,s,l,c,p,A,h,f,d,_,g,y,v,b,w,x){var C,B,O=e.addToLineVertexArray(n,r),k=0,P=0,I=0,T=m(i.horizontal?i.horizontal.text:""),D=[];if(i.horizontal){var L=a.layout.get("text-rotate").evaluate(b,{});C=new u(s,r,n,l,c,p,i.horizontal,A,h,f,e.overscaling,L),P+=M(e,n,i.horizontal,a,f,b,d,O,i.vertical?t.WritingMode.horizontal:t.WritingMode.horizontalOnly,D,w,x),i.vertical&&(I+=M(e,n,i.vertical,a,f,b,d,O,t.WritingMode.vertical,D,w,x))}var S=C?C.boxStartIndex:e.collisionBoxArray.length,z=C?C.boxEndIndex:e.collisionBoxArray.length;if(o){var R=function(e,n,r,i,o,a){var s,l,c,u,p=n.image,A=r.layout,h=n.top-1/p.pixelRatio,f=n.left-1/p.pixelRatio,d=n.bottom+1/p.pixelRatio,_=n.right+1/p.pixelRatio;if("none"!==A.get("icon-text-fit")&&o){var g=_-f,y=d-h,m=A.get("text-size").evaluate(a,{})/24,v=o.left*m,b=o.right*m,w=o.top*m,x=b-v,E=o.bottom*m-w,M=A.get("icon-text-fit-padding")[0],C=A.get("icon-text-fit-padding")[1],B=A.get("icon-text-fit-padding")[2],O=A.get("icon-text-fit-padding")[3],k="width"===A.get("icon-text-fit")?.5*(E-y):0,P="height"===A.get("icon-text-fit")?.5*(x-g):0,I="width"===A.get("icon-text-fit")||"both"===A.get("icon-text-fit")?x:g,T="height"===A.get("icon-text-fit")||"both"===A.get("icon-text-fit")?E:y;s=new t.Point(v+P-O,w+k-M),l=new t.Point(v+P+C+I,w+k-M),c=new t.Point(v+P+C+I,w+k+B+T),u=new t.Point(v+P-O,w+k+B+T)}else s=new t.Point(f,h),l=new t.Point(_,h),c=new t.Point(_,d),u=new t.Point(f,d);var D=r.layout.get("icon-rotate").evaluate(a,{})*Math.PI/180;if(D){var L=Math.sin(D),S=Math.cos(D),z=[S,-L,L,S];s._matMult(z),l._matMult(z),u._matMult(z),c._matMult(z)}return[{tl:s,tr:l,bl:u,br:c,tex:p.paddedRect,writingMode:void 0,glyphOffset:[0,0]}]}(0,o,a,0,i.horizontal,b),j=a.layout.get("icon-rotate").evaluate(b,{});B=new u(s,r,n,l,c,p,o,_,g,!1,e.overscaling,j),k=4*R.length;var U=e.iconSizeData,F=null;"source"===U.functionType?(F=[t.SIZE_PACK_FACTOR*a.layout.get("icon-size").evaluate(b,{})])[0]>E&&t.warnOnce(e.layerIds[0]+': Value for "icon-size" is >= 256. Reduce your "icon-size".'):"composite"===U.functionType&&((F=[t.SIZE_PACK_FACTOR*x.compositeIconSizes[0].evaluate(b,{}),t.SIZE_PACK_FACTOR*x.compositeIconSizes[1].evaluate(b,{})])[0]>E||F[1]>E)&&t.warnOnce(e.layerIds[0]+': Value for "icon-size" is >= 256. Reduce your "icon-size".'),e.addSymbols(e.icon,R,F,v,y,b,!1,n,O.lineStartIndex,O.lineLength)}var Q=B?B.boxStartIndex:e.collisionBoxArray.length,K=B?B.boxEndIndex:e.collisionBoxArray.length;e.glyphOffsetArray.length>=t.SymbolBucket.MAX_GLYPHS&&t.warnOnce("Too many glyphs being rendered in a tile. See https://github.com/mapbox/mapbox-gl-js/issues/2907"),e.symbolInstances.emplaceBack(n.x,n.y,D.length>0?D[0]:-1,D.length>1?D[1]:-1,T,S,z,Q,K,l,P,I,k,0)}(e,l,s,r,i,e.layers[0],e.collisionBoxArray,n.index,n.sourceLayerIndex,e.index,y,x,k,f,b,B,P,_,n,o,a)};if("line"===I)for(var L=0,S=function(e,n,r,i,o){for(var a=[],s=0;s=i&&A.x>=i||(p.x>=i?p=new t.Point(i,p.y+(A.y-p.y)*((i-p.x)/(A.x-p.x)))._round():A.x>=i&&(A=new t.Point(i,p.y+(A.y-p.y)*((i-p.x)/(A.x-p.x)))._round()),p.y>=o&&A.y>=o||(p.y>=o?p=new t.Point(p.x+(A.x-p.x)*((o-p.y)/(A.y-p.y)),o)._round():A.y>=o&&(A=new t.Point(p.x+(A.x-p.x)*((o-p.y)/(A.y-p.y)),o)._round()),c&&p.equals(c[c.length-1])||(c=[p],a.push(c)),c.push(A)))))}return a}(n.geometry,0,0,t.EXTENT,t.EXTENT);L1){var H=l(W,O,r.vertical||r.horizontal,i,24,v);H&&D(W,H)}}else if("Polygon"===n.type)for(var V=0,N=t.classifyRings(n.geometry,0);VE&&t.warnOnce(e.layerIds[0]+': Value for "text-size" is >= 256. Reduce your "text-size".'):"composite"===f.functionType&&((d=[t.SIZE_PACK_FACTOR*A.compositeTextSizes[0].evaluate(a,{}),t.SIZE_PACK_FACTOR*A.compositeTextSizes[1].evaluate(a,{})])[0]>E||d[1]>E)&&t.warnOnce(e.layerIds[0]+': Value for "text-size" is >= 256. Reduce your "text-size".'),e.addSymbols(e.text,h,d,s,o,a,c,n,l.lineStartIndex,l.lineLength),u.push(e.text.placedSymbolArray.length-1),4*h.length}function C(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])=M.maxzoom||"none"!==M.visibility&&(k(E,o.zoom),(A[M.id]=M.createBucket({index:s.bucketLayerIDs.length,layers:E,zoom:o.zoom,pixelRatio:o.pixelRatio,overscaling:o.overscaling,collisionBoxArray:o.collisionBoxArray,sourceLayerIndex:g,sourceID:o.source})).populate(y,h),s.bucketLayerIDs.push(E.map(function(t){return t.id})))}}}var C=t.mapObject(h.glyphDependencies,function(t){return Object.keys(t).map(Number)});Object.keys(C).length?r.send("getGlyphs",{uid:this.uid,stacks:C},function(t,e){l||(l=t,c=e,I.call(o))}):c={};var O=Object.keys(h.iconDependencies);O.length?r.send("getImages",{icons:O},function(t,e){l||(l=t,u=e,I.call(o))}):u={};var P=Object.keys(h.patternDependencies);function I(){if(l)return i(l);if(c&&u&&p){var e=new B(c),n=new t.ImageAtlas(u,p);for(var r in A){var o=A[r];o instanceof t.SymbolBucket?(k(o.layers,this.zoom),w(o,c,e.positions,u,n.iconPositions,this.showCollisionBoxes)):o.hasPattern&&(o instanceof t.LineBucket||o instanceof t.FillBucket||o instanceof t.FillExtrusionBucket)&&(k(o.layers,this.zoom),o.addFeatures(h,n.patternPositions))}this.status="done",i(null,{buckets:t.values(A).filter(function(t){return!t.isEmpty()}),featureIndex:s,collisionBoxArray:this.collisionBoxArray,glyphAtlasImage:e.image,imageAtlas:n})}}P.length?r.send("getImages",{icons:P},function(t,e){l||(l=t,p=e,I.call(o))}):p={},I.call(this)};var P="undefined"!=typeof performance,I={getEntriesByName:function(t){return!!(P&&performance&&performance.getEntriesByName)&&performance.getEntriesByName(t)},mark:function(t){return!!(P&&performance&&performance.mark)&&performance.mark(t)},measure:function(t,e,n){return!!(P&&performance&&performance.measure)&&performance.measure(t,e,n)},clearMarks:function(t){return!!(P&&performance&&performance.clearMarks)&&performance.clearMarks(t)},clearMeasures:function(t){return!!(P&&performance&&performance.clearMeasures)&&performance.clearMeasures(t)}},T=function(t){this._marks={start:[t.url,"start"].join("#"),end:[t.url,"end"].join("#"),measure:t.url.toString()},I.mark(this._marks.start)};function D(e,n){var r=t.getArrayBuffer(e.request,function(e,r){e?n(e):r&&n(null,{vectorTile:new t.mvt.VectorTile(new t.Protobuf(r.data)),rawData:r.data,cacheControl:r.cacheControl,expires:r.expires})});return function(){r.cancel(),n()}}T.prototype.finish=function(){I.mark(this._marks.end);var t=I.getEntriesByName(this._marks.measure);return 0===t.length&&(I.measure(this._marks.measure,this._marks.start,this._marks.end),t=I.getEntriesByName(this._marks.measure),I.clearMarks(this._marks.start),I.clearMarks(this._marks.end),I.clearMeasures(this._marks.measure)),t},I.Performance=T;var L=function(t,e,n){this.actor=t,this.layerIndex=e,this.loadVectorData=n||D,this.loading={},this.loaded={}};L.prototype.loadTile=function(e,n){var r=this,i=e.uid;this.loading||(this.loading={});var o=!!(e&&e.request&&e.request.collectResourceTiming)&&new I.Performance(e.request),a=this.loading[i]=new O(e);a.abort=this.loadVectorData(e,function(e,s){if(delete r.loading[i],e||!s)return a.status="done",r.loaded[i]=a,n(e);var l=s.rawData,c={};s.expires&&(c.expires=s.expires),s.cacheControl&&(c.cacheControl=s.cacheControl);var u={};if(o){var p=o.finish();p&&(u.resourceTiming=JSON.parse(JSON.stringify(p)))}a.vectorTile=s.vectorTile,a.parse(s.vectorTile,r.layerIndex,r.actor,function(e,r){if(e||!r)return n(e);n(null,t.extend({rawTileData:l.slice(0)},r,c,u))}),r.loaded=r.loaded||{},r.loaded[i]=a})},L.prototype.reloadTile=function(t,e){var n=this.loaded,r=t.uid,i=this;if(n&&n[r]){var o=n[r];o.showCollisionBoxes=t.showCollisionBoxes;var a=function(t,n){var r=o.reloadCallback;r&&(delete o.reloadCallback,o.parse(o.vectorTile,i.layerIndex,i.actor,r)),e(t,n)};"parsing"===o.status?o.reloadCallback=a:"done"===o.status&&(o.vectorTile?o.parse(o.vectorTile,this.layerIndex,this.actor,a):a())}},L.prototype.abortTile=function(t,e){var n=this.loading,r=t.uid;n&&n[r]&&n[r].abort&&(n[r].abort(),delete n[r]),e()},L.prototype.removeTile=function(t,e){var n=this.loaded,r=t.uid;n&&n[r]&&delete n[r],e()};var S=function(){this.loaded={}};S.prototype.loadTile=function(e,n){var r=e.uid,i=e.encoding,o=e.rawImageData,a=new t.DEMData(r,o,i);this.loaded=this.loaded||{},this.loaded[r]=a,n(null,a)},S.prototype.removeTile=function(t){var e=this.loaded,n=t.uid;e&&e[n]&&delete e[n]};var z={RADIUS:6378137,FLATTENING:1/298.257223563,POLAR_RADIUS:6356752.3142};function R(t){var e=0;if(t&&t.length>0){e+=Math.abs(j(t[0]));for(var n=1;n2){for(a=0;a=0}(t)===e?t:t.reverse()}var H=t.mvt.VectorTileFeature.prototype.toGeoJSON,V=function(e){this._feature=e,this.extent=t.EXTENT,this.type=e.type,this.properties=e.tags,"id"in e&&!isNaN(e.id)&&(this.id=parseInt(e.id,10))};V.prototype.loadGeometry=function(){if(1===this._feature.type){for(var e=[],n=0,r=this._feature.geometry;n>31}function at(t,e){for(var n=t.loadGeometry(),r=t.type,i=0,o=0,a=n.length,s=0;si;){if(o-i>600){var s=o-i+1,l=r-i+1,c=Math.log(s),u=.5*Math.exp(2*c/3),p=.5*Math.sqrt(c*u*(s-u)/s)*(l-s/2<0?-1:1);t(e,n,r,Math.max(i,Math.floor(r-l*u/s+p)),Math.min(o,Math.floor(r+(s-l)*u/s+p)),a)}var A=n[2*r+a],h=i,f=o;for(lt(e,n,i,r),n[2*o+a]>A&<(e,n,i,o);hA;)f--}n[2*i+a]===A?lt(e,n,i,f):lt(e,n,++f,o),f<=r&&(i=f+1),r<=f&&(o=f-1)}}(e,n,s,i,o,a%2),t(e,n,r,i,s-1,a+1),t(e,n,r,s+1,o,a+1)}}(this.ids,this.coords,this.nodeSize,0,this.ids.length-1,0)}function ht(t){return t[0]}function ft(t){return t[1]}function dt(t){this.options=bt(Object.create(this.options),t),this.trees=new Array(this.options.maxZoom+1)}function _t(t,e,n,r,i){return{x:t,y:e,zoom:1/0,id:n,parentId:-1,numPoints:r,properties:i}}function gt(t){return{type:"Feature",id:t.id,properties:yt(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 yt(t){var e=t.numPoints,n=e>=1e4?Math.round(e/1e3)+"k":e>=1e3?Math.round(e/100)/10+"k":e;return bt(bt({},t.properties),{cluster:!0,cluster_id:t.id,point_count:e,point_count_abbreviated:n})}function mt(t){return t/360+.5}function vt(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 bt(t,e){for(var n in e)t[n]=e[n];return t}function wt(t){return t.x}function xt(t){return t.y}function Et(t,e,n,r,i,o){var a=i-n,s=o-r;if(0!==a||0!==s){var l=((t-n)*a+(e-r)*s)/(a*a+s*s);l>1?(n=i,r=o):l>0&&(n+=a*l,r+=s*l)}return(a=t-n)*a+(s=e-r)*s}function Mt(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)Ct(t,e);else if("Polygon"===n||"MultiLineString"===n)for(var r=0;r0&&(a+=r?(i*c-l*o)/2:Math.sqrt(Math.pow(l-i,2)+Math.pow(c-o,2))),i=l,o=c}var u=e.length-3;e[2]=1,function t(e,n,r,i){for(var o,a=i,s=r-n>>1,l=r-n,c=e[n],u=e[n+1],p=e[r],A=e[r+1],h=n+3;ha)o=h,a=f;else if(f===a){var d=Math.abs(h-s);di&&(o-n>3&&t(e,n,o,i),e[o+2]=a,r-o>3&&t(e,o,r,i))}(e,0,u,n),e[u+2]=1,e.size=Math.abs(a),e.start=0,e.end=e.size}function Pt(t,e,n,r){for(var i=0;i1?1:n}function Dt(t,e,n,r,i,o,a,s){if(r/=e,o>=(n/=e)&&a=r)return null;for(var l=[],c=0;c=n&&f=r)){var d=[];if("Point"===A||"MultiPoint"===A)Lt(p,d,n,r,i);else if("LineString"===A)St(p,d,n,r,i,!1,s.lineMetrics);else if("MultiLineString"===A)Rt(p,d,n,r,i,!1);else if("Polygon"===A)Rt(p,d,n,r,i,!0);else if("MultiPolygon"===A)for(var _=0;_=n&&a<=r&&(e.push(t[o]),e.push(t[o+1]),e.push(t[o+2]))}}function St(t,e,n,r,i,o,a){for(var s,l,c=zt(t),u=0===i?Ut:Ft,p=t.start,A=0;A=n&&(l=u(c,h,f,_,g,n),a&&(c.start=p+s*l)):y>=r?m=n&&(l=u(c,h,f,_,g,n),v=!0),m>r&&y<=r&&(l=u(c,h,f,_,g,r),v=!0),!o&&v&&(a&&(c.end=p+s*l),e.push(c),c=zt(t)),a&&(p+=s)}var b=t.length-3;h=t[b],f=t[b+1],d=t[b+2],(y=0===i?h:f)>=n&&y<=r&&jt(c,h,f,d),b=c.length-3,o&&b>=3&&(c[b]!==c[0]||c[b+1]!==c[1])&&jt(c,c[0],c[1],c[2]),c.length&&e.push(c)}function zt(t){var e=[];return e.size=t.size,e.start=t.start,e.end=t.end,e}function Rt(t,e,n,r,i,o){for(var a=0;aa.maxX&&(a.maxX=u),p>a.maxY&&(a.maxY=p)}return a}function Nt(t,e,n,r){var i=e.geometry,o=e.type,a=[];if("Point"===o||"MultiPoint"===o)for(var s=0;s0&&e.size<(i?a:r))n.numPoints+=e.length/3;else{for(var s=[],l=0;la)&&(n.numSimplified++,s.push(e[l]),s.push(e[l+1])),n.numPoints++;i&&function(t,e){for(var n=0,r=0,i=t.length,o=i-2;r0===e)for(r=0,i=t.length;r24)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=n&&s<=i&&l>=r&&l<=o&&u.push(t[f]);else{var d=Math.floor((h+A)/2);s=e[2*d],l=e[2*d+1],s>=n&&s<=i&&l>=r&&l<=o&&u.push(t[d]);var _=(p+1)%2;(0===p?n<=s:r<=l)&&(c.push(h),c.push(d-1),c.push(_)),(0===p?i>=s:o>=l)&&(c.push(d+1),c.push(A),c.push(_))}}return u}(this.ids,this.coords,t,e,n,r,this.nodeSize)},within:function(t,e,n){return function(t,e,n,r,i,o){for(var a=[0,t.length-1,0],s=[],l=i*i;a.length;){var c=a.pop(),u=a.pop(),p=a.pop();if(u-p<=o)for(var A=p;A<=u;A++)ut(e[2*A],e[2*A+1],n,r)<=l&&s.push(t[A]);else{var h=Math.floor((p+u)/2),f=e[2*h],d=e[2*h+1];ut(f,d,n,r)<=l&&s.push(t[h]);var _=(c+1)%2;(0===c?n-i<=f:r-i<=d)&&(a.push(p),a.push(h-1),a.push(_)),(0===c?n+i>=f:r+i>=d)&&(a.push(h+1),a.push(u),a.push(_))}}return s}(this.ids,this.coords,t,e,n,this.nodeSize)}},dt.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;for(var r,i,o=[],a=0;a=this.options.minZoom;s--){var l=+Date.now();o=this._cluster(o,s),this.trees[s]=pt(o,wt,xt,this.options.nodeSize,Float32Array),e&&console.log("z%d: %d clusters in %dms",s,o.length,+Date.now()-l)}return e&&console.timeEnd("total time"),this},getClusters:function(t,e){var n=((t[0]+180)%360+360)%360-180,r=Math.max(-90,Math.min(90,t[1])),i=180===t[2]?180:((t[2]+180)%360+360)%360-180,o=Math.max(-90,Math.min(90,t[3]));if(t[2]-t[0]>=360)n=-180,i=180;else if(n>i){var a=this.getClusters([n,r,180,o],e),s=this.getClusters([-180,r,i,o],e);return a.concat(s)}for(var l=this.trees[this._limitZoom(e)],c=l.range(mt(n),vt(o),mt(i),vt(r)),u=[],p=0;p>5,n=t%32,r="No cluster with the specified id.",i=this.trees[n];if(!i)throw new Error(r);var o=i.points[e];if(!o)throw new Error(r);for(var a=this.options.radius/(this.options.extent*Math.pow(2,n-1)),s=i.within(o.x,o.y,a),l=[],c=0;c1&&console.time("creation"),A=this.tiles[p]=Vt(t,e,n,r,l),this.tileCoords.push({z:e,x:n,y:r}),c)){c>1&&(console.log("tile z%d-%d-%d (features: %d, points: %d, simplified: %d)",e,n,r,A.numFeatures,A.numPoints,A.numSimplified),console.timeEnd("creation"));var h="z"+e;this.stats[h]=(this.stats[h]||0)+1,this.total++}if(A.source=t,i){if(e===l.maxZoom||e===i)continue;var f=1<1&&console.time("clipping");var d,_,g,y,m,v,b=.5*l.buffer/l.extent,w=.5-b,x=.5+b,E=1+b;d=_=g=y=null,m=Dt(t,u,n-b,n+x,0,A.minX,A.maxX,l),v=Dt(t,u,n+w,n+E,0,A.minX,A.maxX,l),t=null,m&&(d=Dt(m,u,r-b,r+x,1,A.minY,A.maxY,l),_=Dt(m,u,r+w,r+E,1,A.minY,A.maxY,l),m=null),v&&(g=Dt(v,u,r-b,r+x,1,A.minY,A.maxY,l),y=Dt(v,u,r+w,r+E,1,A.minY,A.maxY,l),v=null),c>1&&console.timeEnd("clipping"),s.push(d||[],e+1,2*n,2*r),s.push(_||[],e+1,2*n,2*r+1),s.push(g||[],e+1,2*n+1,2*r),s.push(y||[],e+1,2*n+1,2*r+1)}}},qt.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<1&&console.log("drilling down to z%d-%d-%d",t,e,n);for(var l,c=t,u=e,p=n;!l&&c>0;)c--,u=Math.floor(u/2),p=Math.floor(p/2),l=this.tiles[Xt(c,u,p)];return l&&l.source?(o>1&&console.log("found parent tile z%d-%d-%d",c,u,p),o>1&&console.time("drilling down"),this.splitTile(l.source,c,u,p,t,e,n),o>1&&console.timeEnd("drilling down"),this.tiles[s]?Wt(this.tiles[s],i):null):null};var Zt=function(e){function n(t,n,r){e.call(this,t,n,Yt),r&&(this.loadGeoJSON=r)}return e&&(n.__proto__=e),n.prototype=Object.create(e&&e.prototype),n.prototype.constructor=n,n.prototype.loadData=function(t,e){this._pendingCallback&&this._pendingCallback(null,{abandoned:!0}),this._pendingCallback=e,this._pendingLoadDataParams=t,this._state&&"Idle"!==this._state?this._state="NeedsLoadData":(this._state="Coalescing",this._loadData())},n.prototype._loadData=function(){var t=this;if(this._pendingCallback&&this._pendingLoadDataParams){var e=this._pendingCallback,n=this._pendingLoadDataParams;delete this._pendingCallback,delete this._pendingLoadDataParams;var r=!!(n&&n.request&&n.request.collectResourceTiming)&&new I.Performance(n.request);this.loadGeoJSON(n,function(i,o){if(i||!o)return e(i);if("object"!=typeof o)return e(new Error("Input data is not a valid GeoJSON object."));!function t(e,n){switch(e&&e.type||null){case"FeatureCollection":return e.features=e.features.map(Q(t,n)),e;case"Feature":return e.geometry=t(e.geometry,n),e;case"Polygon":case"MultiPolygon":return function(t,e){return"Polygon"===t.type?t.coordinates=K(t.coordinates,e):"MultiPolygon"===t.type&&(t.coordinates=t.coordinates.map(Q(K,e))),t}(e,n);default:return e}}(o,!0);try{t._geoJSONIndex=n.cluster?(a=n.superclusterOptions,new dt(a)).load(o.features):new qt(o,n.geojsonVtOptions)}catch(i){return e(i)}t.loaded={};var a,s={};if(r){var l=r.finish();l&&(s.resourceTiming={},s.resourceTiming[n.source]=JSON.parse(JSON.stringify(l)))}e(null,s)})}},n.prototype.coalesce=function(){"Coalescing"===this._state?this._state="Idle":"NeedsLoadData"===this._state&&(this._state="Coalescing",this._loadData())},n.prototype.reloadTile=function(t,n){var r=this.loaded,i=t.uid;return r&&r[i]?e.prototype.reloadTile.call(this,t,n):this.loadTile(t,n)},n.prototype.loadGeoJSON=function(e,n){if(e.request)t.getJSON(e.request,n);else{if("string"!=typeof e.data)return n(new Error("Input data is not a valid GeoJSON object."));try{return n(null,JSON.parse(e.data))}catch(t){return n(new Error("Input data is not a valid GeoJSON object."))}}},n.prototype.removeSource=function(t,e){this._pendingCallback&&this._pendingCallback(null,{abandoned:!0}),e()},n.prototype.getClusterExpansionZoom=function(t,e){e(null,this._geoJSONIndex.getClusterExpansionZoom(t.clusterId))},n.prototype.getClusterChildren=function(t,e){e(null,this._geoJSONIndex.getChildren(t.clusterId))},n.prototype.getClusterLeaves=function(t,e){e(null,this._geoJSONIndex.getLeaves(t.clusterId,t.limit,t.offset))},n}(L),Jt=function(e){var n=this;this.self=e,this.actor=new t.Actor(e,this),this.layerIndexes={},this.workerSourceTypes={vector:L,geojson:Zt},this.workerSources={},this.demWorkerSources={},this.self.registerWorkerSource=function(t,e){if(n.workerSourceTypes[t])throw new Error('Worker source with name "'+t+'" already registered.');n.workerSourceTypes[t]=e},this.self.registerRTLTextPlugin=function(e){if(t.plugin.isLoaded())throw new Error("RTL text plugin already registered.");t.plugin.applyArabicShaping=e.applyArabicShaping,t.plugin.processBidirectionalText=e.processBidirectionalText,t.plugin.processStyledBidirectionalText=e.processStyledBidirectionalText}};return Jt.prototype.setLayers=function(t,e,n){this.getLayerIndex(t).replace(e),n()},Jt.prototype.updateLayers=function(t,e,n){this.getLayerIndex(t).update(e.layers,e.removedIds),n()},Jt.prototype.loadTile=function(t,e,n){this.getWorkerSource(t,e.type,e.source).loadTile(e,n)},Jt.prototype.loadDEMTile=function(t,e,n){this.getDEMWorkerSource(t,e.source).loadTile(e,n)},Jt.prototype.reloadTile=function(t,e,n){this.getWorkerSource(t,e.type,e.source).reloadTile(e,n)},Jt.prototype.abortTile=function(t,e,n){this.getWorkerSource(t,e.type,e.source).abortTile(e,n)},Jt.prototype.removeTile=function(t,e,n){this.getWorkerSource(t,e.type,e.source).removeTile(e,n)},Jt.prototype.removeDEMTile=function(t,e){this.getDEMWorkerSource(t,e.source).removeTile(e)},Jt.prototype.removeSource=function(t,e,n){if(this.workerSources[t]&&this.workerSources[t][e.type]&&this.workerSources[t][e.type][e.source]){var r=this.workerSources[t][e.type][e.source];delete this.workerSources[t][e.type][e.source],void 0!==r.removeSource?r.removeSource(e,n):n()}},Jt.prototype.loadWorkerSource=function(t,e,n){try{this.self.importScripts(e.url),n()}catch(t){n(t.toString())}},Jt.prototype.loadRTLTextPlugin=function(e,n,r){try{t.plugin.isLoaded()||(this.self.importScripts(n),r(t.plugin.isLoaded()?null:new Error("RTL Text Plugin failed to import scripts from "+n)))}catch(t){r(t.toString())}},Jt.prototype.getLayerIndex=function(t){var e=this.layerIndexes[t];return e||(e=this.layerIndexes[t]=new r),e},Jt.prototype.getWorkerSource=function(t,e,n){var r=this;if(this.workerSources[t]||(this.workerSources[t]={}),this.workerSources[t][e]||(this.workerSources[t][e]={}),!this.workerSources[t][e][n]){var i={send:function(e,n,i){r.actor.send(e,n,i,t)}};this.workerSources[t][e][n]=new this.workerSourceTypes[e](i,this.getLayerIndex(t))}return this.workerSources[t][e][n]},Jt.prototype.getDEMWorkerSource=function(t,e){return this.demWorkerSources[t]||(this.demWorkerSources[t]={}),this.demWorkerSources[t][e]||(this.demWorkerSources[t][e]=new S),this.demWorkerSources[t][e]},"undefined"!=typeof WorkerGlobalScope&&"undefined"!=typeof self&&self instanceof WorkerGlobalScope&&new Jt(self),Jt}),r(0,function(t){var e=t.createCommonjsModule(function(t){function e(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}return e&&e.terminate(),URL.revokeObjectURL(r),t}()&&"Uint8ClampedArray"in window&&ArrayBuffer.isView&&function(t){return void 0===n[t]&&(n[t]=function(t){var n=document.createElement("canvas"),r=Object.create(e.webGLContextAttributes);return r.failIfMajorPerformanceCaveat=t,n.probablySupportsContext?n.probablySupportsContext("webgl",r)||n.probablySupportsContext("experimental-webgl",r):n.supportsContext?n.supportsContext("webgl",r)||n.supportsContext("experimental-webgl",r):n.getContext("webgl",r)||n.getContext("experimental-webgl",r)}(t)),n[t]}(t&&t.failIfMajorPerformanceCaveat))}t.exports?t.exports=e:window&&(window.mapboxgl=window.mapboxgl||{},window.mapboxgl.supported=e);var n={};e.webGLContextAttributes={antialias:!1,alpha:!0,stencil:!0,depth:!0}}),n={create:function(e,n,r){var i=t.window.document.createElement(e);return n&&(i.className=n),r&&r.appendChild(i),i},createNS:function(e,n){return t.window.document.createElementNS(e,n)}},r=t.window.document?t.window.document.documentElement.style:null;function i(t){if(!r)return null;for(var e=0;e=0?0:e.button},n.remove=function(t){t.parentNode&&t.parentNode.removeChild(t)};var p={API_URL:"https://api.mapbox.com",get EVENTS_URL(){return 0===this.API_URL.indexOf("https://api.mapbox.cn")?"https://events.mapbox.cn/events/v2":"https://events.mapbox.com/events/v2"},REQUIRE_ACCESS_TOKEN:!0,ACCESS_TOKEN:null},A="See https://www.mapbox.com/api-documentation/#access-tokens";function h(t,e){var n=v(p.API_URL);if(t.protocol=n.protocol,t.authority=n.authority,"/"!==n.path&&(t.path=""+n.path+t.path),!p.REQUIRE_ACCESS_TOKEN)return b(t);if(!(e=e||p.ACCESS_TOKEN))throw new Error("An API access token is required to use Mapbox GL. "+A);if("s"===e[0])throw new Error("Use a public access token (pk.*) with Mapbox GL, not a secret access token (sk.*). "+A);return t.params.push("access_token="+e),b(t)}function f(t){return 0===t.indexOf("mapbox:")}var d=function(t,e){if(!f(t))return t;var n=v(t);return n.path="/v4/"+n.authority+".json",n.params.push("secure"),h(n,e)},_=function(t,e,n,r){var i=v(t);return f(t)?(i.path="/styles/v1"+i.path+"/sprite"+e+n,h(i,r)):(i.path+=""+e+n,b(i))},g=/(\.(png|jpg)\d*)(?=$)/,y=function(e,n,r){if(!n||!f(n))return e;var i=v(e),o=t.browser.devicePixelRatio>=2||512===r?"@2x":"",a=t.browser.supportsWebp?".webp":"$1";return i.path=i.path.replace(g,""+o+a),function(t){for(var e=0;e=1||c<-1||s.getDate()!==l.getDate()}if(!i)return this.processRequests();var u=v(p.EVENTS_URL);u.params.push("access_token="+(p.ACCESS_TOKEN||""));var A={url:b(u),headers:{"Content-Type":"text/plain"}},h=JSON.stringify([{event:"appUserTurnstile",created:new Date(a).toISOString(),sdkIdentifier:"mapbox-gl-js",sdkVersion:"0.50.0-beta.1","enabled.telemetry":!1,userId:this.eventData.anonId}]);this.pendingRequest=t.postData(A,h,function(i){if(e.pendingRequest=null,!i){if(e.eventData.lastSuccess=a,e.eventData.accessToken=p.ACCESS_TOKEN,r)try{t.window.localStorage.setItem(n,JSON.stringify(e.eventData))}catch(e){t.warnOnce("Unable to write to LocalStorage")}e.processRequests()}})}};var x=new w,E=x.postTurnstileEvent.bind(x),M=function(){this.images={},this.loaded=!1,this.requestors=[],this.patterns={},this.atlasImage=new t.RGBAImage({width:1,height:1}),this.dirty=!0};M.prototype.isLoaded=function(){return this.loaded},M.prototype.setLoaded=function(t){if(this.loaded!==t&&(this.loaded=t,t)){for(var e=0,n=this.requestors;e=0?1.2:1))}function k(t,e,n,r,i,o,a){for(var s=0;s65535)e(new Error("glyphs > 65535 not supported"));else{var l=o.requests[s];l||(l=o.requests[s]=[],I.loadGlyphRange(n,s,r.url,r.requestTransform,function(t,e){if(e)for(var n in e)o.glyphs[+n]=e[+n];for(var r=0,i=l;rthis.height)return t.warnOnce("LineAtlas out of space"),null;for(var o=0,a=0;a90||this.lat<-90)throw new Error("Invalid LngLat latitude value: must be between -90 and 90")};j.prototype.wrap=function(){return new j(t.wrap(this.lng,-180,180),this.lat)},j.prototype.toArray=function(){return[this.lng,this.lat]},j.prototype.toString=function(){return"LngLat("+this.lng+", "+this.lat+")"},j.prototype.toBounds=function(t){var e=360*t/40075017,n=e/Math.cos(Math.PI/180*this.lat);return new U(new j(this.lng-n,this.lat-e),new j(this.lng+n,this.lat+e))},j.convert=function(t){if(t instanceof j)return t;if(Array.isArray(t)&&(2===t.length||3===t.length))return new j(Number(t[0]),Number(t[1]));if(!Array.isArray(t)&&"object"==typeof t&&null!==t)return new j(Number(t.lng),Number(t.lat));throw new Error("`LngLatLike` argument must be specified as a LngLat instance, an object {lng: , lat: }, or an array of [, ]")};var U=function(t,e){t&&(e?this.setSouthWest(t).setNorthEast(e):4===t.length?this.setSouthWest([t[0],t[1]]).setNorthEast([t[2],t[3]]):this.setSouthWest(t[0]).setNorthEast(t[1]))};U.prototype.setNorthEast=function(t){return this._ne=t instanceof j?new j(t.lng,t.lat):j.convert(t),this},U.prototype.setSouthWest=function(t){return this._sw=t instanceof j?new j(t.lng,t.lat):j.convert(t),this},U.prototype.extend=function(t){var e,n,r=this._sw,i=this._ne;if(t instanceof j)e=t,n=t;else{if(!(t instanceof U))return Array.isArray(t)?t.every(Array.isArray)?this.extend(U.convert(t)):this.extend(j.convert(t)):this;if(e=t._sw,n=t._ne,!e||!n)return this}return r||i?(r.lng=Math.min(e.lng,r.lng),r.lat=Math.min(e.lat,r.lat),i.lng=Math.max(n.lng,i.lng),i.lat=Math.max(n.lat,i.lat)):(this._sw=new j(e.lng,e.lat),this._ne=new j(n.lng,n.lat)),this},U.prototype.getCenter=function(){return new j((this._sw.lng+this._ne.lng)/2,(this._sw.lat+this._ne.lat)/2)},U.prototype.getSouthWest=function(){return this._sw},U.prototype.getNorthEast=function(){return this._ne},U.prototype.getNorthWest=function(){return new j(this.getWest(),this.getNorth())},U.prototype.getSouthEast=function(){return new j(this.getEast(),this.getSouth())},U.prototype.getWest=function(){return this._sw.lng},U.prototype.getSouth=function(){return this._sw.lat},U.prototype.getEast=function(){return this._ne.lng},U.prototype.getNorth=function(){return this._ne.lat},U.prototype.toArray=function(){return[this._sw.toArray(),this._ne.toArray()]},U.prototype.toString=function(){return"LngLatBounds("+this._sw.toString()+", "+this._ne.toString()+")"},U.prototype.isEmpty=function(){return!(this._sw&&this._ne)},U.convert=function(t){return!t||t instanceof U?t:new U(t)};var F=function(t,e,n){this.bounds=U.convert(this.validateBounds(t)),this.minzoom=e||0,this.maxzoom=n||24};F.prototype.validateBounds=function(t){return Array.isArray(t)&&4===t.length?[Math.max(-180,t[0]),Math.max(-90,t[1]),Math.min(180,t[2]),Math.min(90,t[3])]:[-180,-90,180,90]},F.prototype.contains=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=n&&t.y0&&(l[new t.OverscaledTileID(e.overscaledZ,o,n.z,i,n.y-1).key]={backfilled:!1},l[new t.OverscaledTileID(e.overscaledZ,e.wrap,n.z,n.x,n.y-1).key]={backfilled:!1},l[new t.OverscaledTileID(e.overscaledZ,s,n.z,a,n.y-1).key]={backfilled:!1}),n.y+10&&(r.resourceTiming=e._resourceTiming,e._resourceTiming=[]),e.fire(new t.Event("data",r))}})},n.prototype.onAdd=function(t){this.map=t,this.load()},n.prototype.setData=function(e){var n=this;return this._data=e,this.fire(new t.Event("dataloading",{dataType:"source"})),this._updateWorkerData(function(e){if(e)n.fire(new t.ErrorEvent(e));else{var r={dataType:"source",sourceDataType:"content"};n._collectResourceTiming&&n._resourceTiming&&n._resourceTiming.length>0&&(r.resourceTiming=n._resourceTiming,n._resourceTiming=[]),n.fire(new t.Event("data",r))}}),this},n.prototype.getClusterExpansionZoom=function(t,e){return this.dispatcher.send("geojson.getClusterExpansionZoom",{clusterId:t,source:this.id},e,this.workerID),this},n.prototype.getClusterChildren=function(t,e){return this.dispatcher.send("geojson.getClusterChildren",{clusterId:t,source:this.id},e,this.workerID),this},n.prototype.getClusterLeaves=function(t,e,n,r){return this.dispatcher.send("geojson.getClusterLeaves",{source:this.id,clusterId:t,limit:e,offset:n},r,this.workerID),this},n.prototype._updateWorkerData=function(e){var n=this,r=t.extend({},this.workerOptions),i=this._data;"string"==typeof i?(r.request=this.map._transformRequest(t.browser.resolveURL(i),t.ResourceType.Source),r.request.collectResourceTiming=this._collectResourceTiming):r.data=JSON.stringify(i),this.workerID=this.dispatcher.send(this.type+".loadData",r,function(t,i){n._removed||i&&i.abandoned||(n._loaded=!0,i&&i.resourceTiming&&i.resourceTiming[n.id]&&(n._resourceTiming=i.resourceTiming[n.id].slice(0)),n.dispatcher.send(n.type+".coalesce",{source:r.source},null,n.workerID),e(t))},this.workerID)},n.prototype.loadTile=function(e,n){var r=this,i=void 0===e.workerID?"loadTile":"reloadTile",o={type:this.type,uid:e.uid,tileID:e.tileID,zoom:e.tileID.overscaledZ,maxZoom:this.maxzoom,tileSize:this.tileSize,source:this.id,pixelRatio:t.browser.devicePixelRatio,showCollisionBoxes:this.map.showCollisionBoxes};e.workerID=this.dispatcher.send(i,o,function(t,o){return e.unloadVectorData(),e.aborted?n(null):t?n(t):(e.loadVectorData(o,r.map.painter,"reloadTile"===i),n(null))},this.workerID)},n.prototype.abortTile=function(t){t.aborted=!0},n.prototype.unloadTile=function(t){t.unloadVectorData(),this.dispatcher.send("removeTile",{uid:t.uid,type:this.type,source:this.id},null,t.workerID)},n.prototype.onRemove=function(){this._removed=!0,this.dispatcher.send("removeSource",{type:this.type,source:this.id},null,this.workerID)},n.prototype.serialize=function(){return t.extend({},this._options,{type:this.type,data:this._data})},n.prototype.hasTransition=function(){return!1},n}(t.Evented),V=function(e){function n(t,n,r,i){e.call(this),this.id=t,this.dispatcher=r,this.coordinates=n.coordinates,this.type="image",this.minzoom=0,this.maxzoom=22,this.tileSize=512,this.tiles={},this.setEventedParent(i),this.options=n}return e&&(n.__proto__=e),n.prototype=Object.create(e&&e.prototype),n.prototype.constructor=n,n.prototype.load=function(e,n){var r=this;this.fire(new t.Event("dataloading",{dataType:"source"})),this.url=this.options.url,t.getImage(this.map._transformRequest(this.url,t.ResourceType.Image),function(i,o){i?r.fire(new t.ErrorEvent(i)):o&&(r.image=t.browser.getImageData(o),e&&(r.coordinates=e),n&&n(),r._finishLoading())})},n.prototype.updateImage=function(t){var e=this;return this.image&&t.url?(this.options.url=t.url,this.load(t.coordinates,function(){e.texture=null}),this):this},n.prototype._finishLoading=function(){this.map&&(this.setCoordinates(this.coordinates),this.fire(new t.Event("data",{dataType:"source",sourceDataType:"metadata"})))},n.prototype.onAdd=function(t){this.map=t,this.load()},n.prototype.setCoordinates=function(e){this.coordinates=e;var n=this.map,r=e.map(function(t){return n.transform.locationCoordinate(j.convert(t)).zoomTo(0)}),i=this.centerCoord=t.getCoordinatesCenter(r);i.column=Math.floor(i.column),i.row=Math.floor(i.row),this.tileID=new t.CanonicalTileID(i.zoom,i.column,i.row),this.minzoom=this.maxzoom=i.zoom;var o=r.map(function(e){var n=e.zoomTo(i.zoom);return new t.Point(Math.round((n.column-i.column)*t.EXTENT),Math.round((n.row-i.row)*t.EXTENT))});return this._boundsArray=new t.StructArrayLayout4i8,this._boundsArray.emplaceBack(o[0].x,o[0].y,0,0),this._boundsArray.emplaceBack(o[1].x,o[1].y,t.EXTENT,0),this._boundsArray.emplaceBack(o[3].x,o[3].y,0,t.EXTENT),this._boundsArray.emplaceBack(o[2].x,o[2].y,t.EXTENT,t.EXTENT),this.boundsBuffer&&(this.boundsBuffer.destroy(),delete this.boundsBuffer),this.fire(new t.Event("data",{dataType:"source",sourceDataType:"content"})),this},n.prototype.prepare=function(){if(0!==Object.keys(this.tiles).length&&this.image){var e=this.map.painter.context,n=e.gl;for(var r in this.boundsBuffer||(this.boundsBuffer=e.createVertexBuffer(this._boundsArray,t.rasterBoundsAttributes.members)),this.boundsSegments||(this.boundsSegments=t.SegmentVector.simpleSegment(0,0,4,2)),this.texture||(this.texture=new t.Texture(e,this.image,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)}}},n.prototype.loadTile=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))},n.prototype.serialize=function(){return{type:"image",url:this.options.url,coordinates:this.coordinates}},n.prototype.hasTransition=function(){return!1},n}(t.Evented),N=function(e){function n(t,n,r,i){e.call(this,t,n,r,i),this.roundZoom=!0,this.type="video",this.options=n}return e&&(n.__proto__=e),n.prototype=Object.create(e&&e.prototype),n.prototype.constructor=n,n.prototype.load=function(){var e=this,n=this.options;this.urls=[];for(var r=0,i=n.urls;rthis.max){var a=this._getAndRemoveByKey(this.order[0]);a&&this.onRemove(a)}return this},J.prototype.has=function(t){return t.wrapped().key in this.data},J.prototype.getAndRemove=function(t){return this.has(t)?this._getAndRemoveByKey(t.wrapped().key):null},J.prototype._getAndRemoveByKey=function(t){var e=this.data[t].shift();return e.timeout&&clearTimeout(e.timeout),0===this.data[t].length&&delete this.data[t],this.order.splice(this.order.indexOf(t),1),e.value},J.prototype.get=function(t){return this.has(t)?this.data[t.wrapped().key][0].value:null},J.prototype.remove=function(t,e){if(!this.has(t))return this;var n=t.wrapped().key,r=void 0===e?0:this.data[n].indexOf(e),i=this.data[n][r];return this.data[n].splice(r,1),i.timeout&&clearTimeout(i.timeout),0===this.data[n].length&&delete this.data[n],this.onRemove(i.value),this.order.splice(this.order.indexOf(n),1),this},J.prototype.setMaxSize=function(t){for(this.max=t;this.order.length>this.max;){var e=this._getAndRemoveByKey(this.order[0]);e&&this.onRemove(e)}return this};var $=function(t,e,n){this.context=t;var r=t.gl;this.buffer=r.createBuffer(),this.dynamicDraw=Boolean(n),this.context.unbindVAO(),t.bindElementBuffer.set(this.buffer),r.bufferData(r.ELEMENT_ARRAY_BUFFER,e.arrayBuffer,this.dynamicDraw?r.DYNAMIC_DRAW:r.STATIC_DRAW),this.dynamicDraw||delete e.arrayBuffer};$.prototype.bind=function(){this.context.bindElementBuffer.set(this.buffer)},$.prototype.updateData=function(t){var e=this.context.gl;this.context.unbindVAO(),this.bind(),e.bufferSubData(e.ELEMENT_ARRAY_BUFFER,0,t.arrayBuffer)},$.prototype.destroy=function(){var t=this.context.gl;this.buffer&&(t.deleteBuffer(this.buffer),delete this.buffer)};var tt={Int8:"BYTE",Uint8:"UNSIGNED_BYTE",Int16:"SHORT",Uint16:"UNSIGNED_SHORT",Int32:"INT",Uint32:"UNSIGNED_INT",Float32:"FLOAT"},et=function(t,e,n,r){this.length=e.length,this.attributes=n,this.itemSize=e.bytesPerElement,this.dynamicDraw=r,this.context=t;var i=t.gl;this.buffer=i.createBuffer(),t.bindVertexBuffer.set(this.buffer),i.bufferData(i.ARRAY_BUFFER,e.arrayBuffer,this.dynamicDraw?i.DYNAMIC_DRAW:i.STATIC_DRAW),this.dynamicDraw||delete e.arrayBuffer};et.prototype.bind=function(){this.context.bindVertexBuffer.set(this.buffer)},et.prototype.updateData=function(t){var e=this.context.gl;this.bind(),e.bufferSubData(e.ARRAY_BUFFER,0,t.arrayBuffer)},et.prototype.enableAttributes=function(t,e){for(var n=0;n1||(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)))}},n.prototype.getTile=function(t){return this.getTileByID(t.key)},n.prototype.getTileByID=function(t){return this._tiles[t]},n.prototype.getZoom=function(t){return t.zoom+t.scaleZoom(t.tileSize/this._source.tileSize)},n.prototype._retainLoadedChildren=function(t,e,n,r){for(var i in this._tiles){var o=this._tiles[i];if(!(r[i]||!o.hasData()||o.tileID.overscaledZ<=e||o.tileID.overscaledZ>n)){for(var a=o.tileID;o&&o.tileID.overscaledZ>e+1;){var s=o.tileID.scaledTo(o.tileID.overscaledZ-1);(o=this._tiles[s.key])&&o.hasData()&&(a=s)}for(var l=a;l.overscaledZ>e;)if(t[(l=l.scaledTo(l.overscaledZ-1)).key]){r[a.key]=a;break}}}},n.prototype.findLoadedParent=function(t,e){for(var n=t.overscaledZ-1;n>=e;n--){var r=t.scaledTo(n);if(!r)return;var i=String(r.key),o=this._tiles[i];if(o&&o.hasData())return o;if(this._cache.has(r))return this._cache.get(r)}},n.prototype.updateCacheSize=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)},n.prototype.handleWrapJump=function(t){var e=(t-(void 0===this._prevLng?t:this._prevLng))/360,n=Math.round(e);if(this._prevLng=t,n){var r={};for(var i in this._tiles){var o=this._tiles[i];o.tileID=o.tileID.unwrapTo(o.tileID.wrap+n),r[o.tileID.key]=o}for(var a in this._tiles=r,this._timers)clearTimeout(this._timers[a]),delete this._timers[a];for(var s in this._tiles){var l=this._tiles[s];this._setTileReloadTimer(s,l)}}},n.prototype.update=function(e){var r=this;if(this.transform=e,this._sourceLoaded&&!this._paused){var i;this.updateCacheSize(e),this.handleWrapJump(this.transform.center.lng),this._coveredTiles={},this.used?this._source.tileID?i=e.getVisibleUnwrappedCoordinates(this._source.tileID).map(function(e){return new t.OverscaledTileID(e.canonical.z,e.wrap,e.canonical.z,e.canonical.x,e.canonical.y)}):(i=e.coveringTiles({tileSize:this._source.tileSize,minzoom:this._source.minzoom,maxzoom:this._source.maxzoom,roundZoom:this._source.roundZoom,reparseOverscaled:this._source.reparseOverscaled}),this._source.hasTile&&(i=i.filter(function(t){return r._source.hasTile(t)}))):i=[];var o=(this._source.roundZoom?Math.round:Math.floor)(this.getZoom(e)),a=Math.max(o-n.maxOverzooming,this._source.minzoom),s=Math.max(o+n.maxUnderzooming,this._source.minzoom),l=this._updateRetainedTiles(i,o);if(Vt(this._source.type)){for(var c={},u={},p=0,A=Object.keys(l);pthis._source.maxzoom){var _=f.children(this._source.maxzoom)[0],g=this.getTile(_);if(g&&g.hasData()){r[_.key]=_;continue}}else{var y=f.children(this._source.maxzoom);if(r[y[0].key]&&r[y[1].key]&&r[y[2].key]&&r[y[3].key])continue}for(var m=d.wasRequested(),v=f.overscaledZ-1;v>=o;--v){var b=f.scaledTo(v);if(i[b.key])break;if(i[b.key]=!0,!(d=this.getTile(b))&&m&&(d=this._addTile(b)),d&&(r[b.key]=b,m=d.wasRequested(),d.hasData()))break}}}return r},n.prototype._addTile=function(e){var n=this._tiles[e.key];if(n)return n;(n=this._cache.getAndRemove(e))&&(this._setTileReloadTimer(e.key,n),n.tileID=e,this._state.initializeTileState(n,this.map?this.map.painter:null),this._cacheTimers[e.key]&&(clearTimeout(this._cacheTimers[e.key]),delete this._cacheTimers[e.key],this._setTileReloadTimer(e.key,n)));var r=Boolean(n);return r||(n=new t.Tile(e,this._source.tileSize*e.overscaleFactor()),this._loadTile(n,this._tileLoaded.bind(this,n,e.key,n.state))),n?(n.uses++,this._tiles[e.key]=n,r||this._source.fire(new t.Event("dataloading",{tile:n,coord:n.tileID,dataType:"source"})),n):null},n.prototype._setTileReloadTimer=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))},n.prototype._removeTile=function(t){var e=this._tiles[t];e&&(e.uses--,delete this._tiles[t],this._timers[t]&&(clearTimeout(this._timers[t]),delete this._timers[t]),e.uses>0||(e.hasData()?this._cache.add(e.tileID,e,e.getExpiryTimeout()):(e.aborted=!0,this._abortTile(e),this._unloadTile(e))))},n.prototype.clearTiles=function(){for(var t in this._shouldReloadOnResume=!1,this._paused=!1,this._tiles)this._removeTile(t);this._cache.reset()},n.prototype.tilesIn=function(e,n){for(var r=[],i=this.getIds(),o=1/0,a=1/0,s=-1/0,l=-1/0,c=e[0].zoom,u=0;u=0&&g[1].y+_>=0){for(var y=[],m=0;m=t.browser.now())return!0}return!1},n.prototype.setFeatureState=function(t,e,n){t=t||"_geojsonTileLayer",this._state.updateState(t,e,n)},n.prototype.getFeatureState=function(t,e){return t=t||"_geojsonTileLayer",this._state.getState(t,e)},n}(t.Evented);function Wt(e,n){var r=n.zoomTo(e.canonical.z);return new t.Point((r.column-(e.canonical.x+e.wrap*Math.pow(2,e.canonical.z)))*t.EXTENT,(r.row-e.canonical.y)*t.EXTENT)}function Ht(t,e){return t%32-e%32||e-t}function Vt(t){return"raster"===t||"image"===t||"video"===t}function Nt(){return new t.window.Worker(Fr.workerUrl)}Kt.maxOverzooming=10,Kt.maxUnderzooming=3;var Gt,qt=function(){this.active={}};function Xt(e,n){var r={};for(var i in e)"ref"!==i&&(r[i]=e[i]);return t.refProperties.forEach(function(t){t in n&&(r[t]=n[t])}),r}function Yt(t){t=t.slice();for(var e=Object.create(null),n=0;nthis.width||r<0||e>this.height)return!i&&[];var a=[];if(t<=0&&e<=0&&this.width<=n&&this.height<=r){if(i)return!0;for(var s=0;s0:a},oe.prototype._queryCircle=function(t,e,n,r,i){var o=t-n,a=t+n,s=e-n,l=e+n;if(a<0||o>this.width||l<0||s>this.height)return!r&&[];var c=[],u={hitTest:r,circle:{x:t,y:e,radius:n},seenUids:{box:{},circle:{}}};return this._forEachCell(o,s,a,l,this._queryCellCircle,c,u,i),r?c.length>0:c},oe.prototype.query=function(t,e,n,r,i){return this._query(t,e,n,r,!1,i)},oe.prototype.hitTest=function(t,e,n,r,i){return this._query(t,e,n,r,!0,i)},oe.prototype.hitTestCircle=function(t,e,n,r){return this._queryCircle(t,e,n,!0,r)},oe.prototype._queryCell=function(t,e,n,r,i,o,a,s){var l=a.seenUids,c=this.boxCells[i];if(null!==c)for(var u=this.bboxes,p=0,A=c;p=u[f+0]&&r>=u[f+1]&&(!s||s(this.boxKeys[h]))){if(a.hitTest)return o.push(!0),!0;o.push({key:this.boxKeys[h],x1:u[f],y1:u[f+1],x2:u[f+2],y2:u[f+3]})}}}var d=this.circleCells[i];if(null!==d)for(var _=this.circles,g=0,y=d;ga*a+s*s},oe.prototype._circleAndRectCollide=function(t,e,n,r,i,o,a){var s=(o-r)/2,l=Math.abs(t-(r+s));if(l>s+n)return!1;var c=(a-i)/2,u=Math.abs(e-(i+c));if(u>c+n)return!1;if(l<=s||u<=c)return!0;var p=l-s,A=u-c;return p*p+A*A<=n*n};var ae=t.properties.layout;function se(e,n,r,i,o){var a=t.identity(new Float32Array(16));return n?(t.identity(a),t.scale(a,a,[1/o,1/o,1]),r||t.rotateZ(a,a,i.angle)):(t.scale(a,a,[i.width/2,-i.height/2,1]),t.translate(a,a,[1,-1,0]),t.multiply(a,a,e)),a}function le(e,n,r,i,o){var a=t.identity(new Float32Array(16));return n?(t.multiply(a,a,e),t.scale(a,a,[o,o,1]),r||t.rotateZ(a,a,-i.angle)):(t.scale(a,a,[1,-1,1]),t.translate(a,a,[-1,-1,0]),t.scale(a,a,[2/i.width,2/i.height,1])),a}function ce(e,n){var r=[e.x,e.y,0,1];me(r,r,n);var i=r[3];return{point:new t.Point(r[0]/i,r[1]/i),signedDistanceFromCamera:i}}function ue(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 pe(e,n,r,i,o,a,s,l){var c=i?e.textSizeData:e.iconSizeData,u=t.evaluateSizeForZoom(c,r.transform.zoom,ae.properties[i?"text-size":"icon-size"]),p=[256/r.width*2+1,256/r.height*2+1],A=i?e.text.dynamicLayoutVertexArray:e.icon.dynamicLayoutVertexArray;A.clear();for(var h=e.lineVertexArray,f=i?e.text.placedSymbolArray:e.icon.placedSymbolArray,d=r.transform.width/r.transform.height,_=!1,g=0;gMath.abs(r.x-n.x)*i?{useVertical:!0}:(e===t.WritingMode.vertical?n.yr.x)?{needsFlipping:!0}:null}function fe(e,n,r,i,o,a,s,l,c,u,p,A,h,f){var d,_=n/24,g=e.lineOffsetX*n,y=e.lineOffsetY*n;if(e.numGlyphs>1){var m=e.glyphStartIndex+e.numGlyphs,v=e.lineStartIndex,b=e.lineStartIndex+e.lineLength,w=Ae(_,l,g,y,r,p,A,e,c,a,h,!1);if(!w)return{notEnoughRoom:!0};var x=ce(w.first.point,s).point,E=ce(w.last.point,s).point;if(i&&!r){var M=he(e.writingMode,x,E,f);if(M)return M}d=[w.first];for(var C=e.glyphStartIndex+1;C0?P.point:de(A,k,B,1,o),T=he(e.writingMode,B,I,f);if(T)return T}var D=_e(_*l.getoffsetX(e.glyphStartIndex),g,y,r,p,A,e.segment,e.lineStartIndex,e.lineStartIndex+e.lineLength,c,a,h,!1);if(!D)return{notEnoughRoom:!0};d=[D]}for(var L=0,S=d;L0?1:-1,_=0;i&&(d*=-1,_=Math.PI),d<0&&(_+=Math.PI);for(var g=d>0?l+s:l+s+1,y=g,m=o,v=o,b=0,w=0,x=Math.abs(f);b+w<=x;){if((g+=d)=c)return null;if(v=m,void 0===(m=A[g])){var E=new t.Point(u.getx(g),u.gety(g)),M=ce(E,p);if(M.signedDistanceFromCamera>0)m=A[g]=M.point;else{var C=g-d;m=de(0===b?a:new t.Point(u.getx(C),u.gety(C)),E,v,x-b+1,p)}}b+=w,w=v.dist(m)}var B=(x-b)/w,O=m.sub(v),k=O.mult(B)._add(v);return k._add(O._unit()._perp()._mult(r*d)),{point:k,angle:_+Math.atan2(m.y-v.y,m.x-v.x),tileDistance:h?{prevTileDistance:g-d===y?0:u.gettileUnitDistanceFromAnchor(g-d),lastSegmentViewportDistance:x-b}:null}}var ge=new Float32Array([-1/0,-1/0,0,-1/0,-1/0,0,-1/0,-1/0,0,-1/0,-1/0,0]);function ye(t,e){for(var n=0;nB)be(e,O,!1);else{var D=this.projectPoint(c,k,P),L=I*E;if(f.length>0){var S=D.x-f[f.length-4],z=D.y-f[f.length-3];if(L*L*2>S*S+z*z&&O+8-C&&R=this.screenRightBoundary||r<100||e>this.screenBottomBoundary},ve.prototype.isInsideGrid=function(t,e,n,r){return n>=0&&t=0&&e0,E=E&&M.offscreen);var I=P.textCircles;if(I){var T=e.text.placedSymbolArray.get(b.horizontalPlacedTextSymbolIndex),D=t.evaluateSizeForFeature(e.textSizeData,A,T);C=this.collisionIndex.placeCollisionCircles(I,p.get("text-allow-overlap"),o,a,T,e.lineVertexArray,e.glyphOffsetArray,D,n,r,s,"map"===p.get("text-pitch-alignment"),m.predicate),w=p.get("text-allow-overlap")||C.circles.length>0,E=E&&C.offscreen}P.iconFeatureIndex&&(k=P.iconFeatureIndex),P.iconBox&&(x=(B=this.collisionIndex.placeCollisionBox(P.iconBox,p.get("icon-allow-overlap"),a,n,m.predicate)).box.length>0,E=E&&B.offscreen);var L=h||0===b.numGlyphVertices&&0===b.numVerticalGlyphVertices,S=f||0===b.numIconVertices;L||S?S?L||(x=x&&w):w=x&&w:x=w=x&&w,w&&M&&this.collisionIndex.insertCollisionBox(M.box,p.get("text-ignore-placement"),e.bucketInstanceId,O,m.ID),x&&B&&this.collisionIndex.insertCollisionBox(B.box,p.get("icon-ignore-placement"),e.bucketInstanceId,k,m.ID),w&&C&&this.collisionIndex.insertCollisionCircles(C.circles,p.get("text-ignore-placement"),e.bucketInstanceId,O,m.ID),this.placements[b.crossTileID]=new Me(w||g,x||y,E||e.justReloaded),c[b.crossTileID]=!0}}e.justReloaded=!1},Be.prototype.commit=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 Ee(s,r,a.text,a.icon),n=n||a.text!==s.text.placed||a.icon!==s.icon.placed):(this.opacities[o]=new Ee(null,r,a.text,a.icon,a.skipFade),n=n||a.text||a.icon)}for(var l in i){var c=i[l];if(!this.opacities[l]){var u=new Ee(c,r,!1,!1);u.isHidden()||(this.opacities[l]=u,n=n||c.text.placed||c.icon.placed)}}n?this.lastPlacementChangeTime=e:"number"!=typeof this.lastPlacementChangeTime&&(this.lastPlacementChangeTime=t?t.lastPlacementChangeTime:e)},Be.prototype.updateLayerOpacities=function(t,e){for(var n={},r=0,i=e;r0||c.numVerticalGlyphVertices>0,h=c.numIconVertices>0;if(A){for(var f=ze(p.text),d=(c.numGlyphVertices+c.numVerticalGlyphVertices)/4,_=0;_=0&&(t.text.placedSymbolArray.get(c.verticalPlacedTextSymbolIndex).hidden=p.text.isHidden())}if(h){for(var g=ze(p.icon),y=0;yt},Be.prototype.setStale=function(){this.stale=!0};var ke=Math.pow(2,25),Pe=Math.pow(2,24),Ie=Math.pow(2,17),Te=Math.pow(2,16),De=Math.pow(2,9),Le=Math.pow(2,8),Se=Math.pow(2,1);function ze(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*ke+e*Pe+n*Ie+e*Te+n*De+e*Le+n*Se+e}var Re=function(){this._currentTileIndex=0,this._seenCrossTileIDs={}};Re.prototype.continuePlacement=function(t,e,n,r,i){for(;this._currentTileIndex2};this._currentPlacementIndex>=0;){var s=n[e[i._currentPlacementIndex]],l=i.placement.collisionIndex.transform.zoom;if("symbol"===s.type&&(!s.minzoom||s.minzoom<=l)&&(!s.maxzoom||s.maxzoom>l)){if(i._inProgressLayer||(i._inProgressLayer=new Re),i._inProgressLayer.continuePlacement(r[s.source],i.placement,i._showCollisionBoxes,s,a))return;delete i._inProgressLayer}i._currentPlacementIndex--}this._done=!0},je.prototype.commit=function(t,e){return this.placement.commit(t,e),this.placement};var Ue=512/t.EXTENT/2,Fe=function(t,e,n){this.tileID=t,this.indexedSymbolInstances={},this.bucketInstanceId=n;for(var r=0;rt.overscaledZ)for(var s in a){var l=a[s];l.tileID.isChildOf(t)&&l.findMatches(e.symbolInstances,t,i)}else{var c=a[t.scaledTo(Number(o)).key];c&&c.findMatches(e.symbolInstances,t,i)}}for(var u=0;u1?"@2x":"",l=t.getJSON(n(_(e,s,".json"),t.ResourceType.SpriteJSON),function(t,e){l=null,a||(a=t,i=e,u())}),c=t.getImage(n(_(e,s,".png"),t.ResourceType.SpriteImage),function(t,e){c=null,a||(a=t,o=e,u())});function u(){if(a)r(a);else if(i&&o){var e=t.browser.getImageData(o),n={};for(var s in i){var l=i[s],c=l.width,u=l.height,p=l.x,A=l.y,h=l.sdf,f=l.pixelRatio,d=new t.RGBAImage({width:c,height:u});t.RGBAImage.copy(e,d,{x:p,y:A},{x:0,y:0},{width:c,height:u}),n[s]={data:d,pixelRatio:f,sdf:h}}r(null,n)}}return{cancel:function(){l&&(l.cancel(),l=null),c&&(c.cancel(),c=null)}}}(e.sprite,this.map._transformRequest,function(e,n){if(r._spriteRequest=null,e)r.fire(new t.ErrorEvent(e));else if(n)for(var i in n)r.imageManager.addImage(i,n[i]);r.imageManager.setLoaded(!0),r.fire(new t.Event("data",{dataType:"style"}))}):this.imageManager.setLoaded(!0),this.glyphManager.setURL(e.glyphs);var o=Yt(this.stylesheet.layers);this._order=o.map(function(t){return t.id}),this._layers={};for(var a=0,s=o;a0)throw new Error("Unimplemented: "+i.map(function(t){return t.command}).join(", ")+".");return r.forEach(function(t){"setTransition"!==t.command&&n[t.command].apply(n,t.args)}),this.stylesheet=e,!0},n.prototype.addImage=function(e,n){if(this.getImage(e))return this.fire(new t.ErrorEvent(new Error("An image with this name already exists.")));this.imageManager.addImage(e,n),this.fire(new t.Event("data",{dataType:"style"}))},n.prototype.getImage=function(t){return this.imageManager.getImage(t)},n.prototype.removeImage=function(e){if(!this.getImage(e))return this.fire(new t.ErrorEvent(new Error("No image with this name exists.")));this.imageManager.removeImage(e),this.fire(new t.Event("data",{dataType:"style"}))},n.prototype.listImages=function(){return this._checkLoaded(),this.imageManager.listImages()},n.prototype.addSource=function(e,n,r){var i=this;if(this._checkLoaded(),void 0!==this.sourceCaches[e])throw new Error("There is already a source with this ID");if(!n.type)throw new Error("The type property must be defined, but the only the following properties were given: "+Object.keys(n).join(", ")+".");if(!(["vector","raster","geojson","video","image"].indexOf(n.type)>=0&&this._validate(t.validateStyle.source,"sources."+e,n,null,r))){this.map&&this.map._collectResourceTiming&&(n.collectResourceTiming=!0);var o=this.sourceCaches[e]=new Kt(e,n,this.dispatcher);o.style=this,o.setEventedParent(this,function(){return{isSourceLoaded:i.loaded(),source:o.serialize(),sourceId:e}}),o.onAdd(this.map),this._changed=!0}},n.prototype.removeSource=function(e){if(this._checkLoaded(),void 0===this.sourceCaches[e])throw new Error("There is no source with this ID");for(var n in this._layers)if(this._layers[n].source===e)return this.fire(new t.ErrorEvent(new Error('Source "'+e+'" cannot be removed while layer "'+n+'" is using it.')));var r=this.sourceCaches[e];delete this.sourceCaches[e],delete this._updatedSources[e],r.fire(new t.Event("data",{sourceDataType:"metadata",dataType:"source",sourceId:e})),r.setEventedParent(null),r.clearTiles(),r.onRemove&&r.onRemove(this.map),this._changed=!0},n.prototype.setGeoJSONSourceData=function(t,e){this._checkLoaded(),this.sourceCaches[t].getSource().setData(e),this._changed=!0},n.prototype.getSource=function(t){return this.sourceCaches[t]&&this.sourceCaches[t].getSource()},n.prototype.addLayer=function(e,n,r){this._checkLoaded();var i=e.id;if(this.getLayer(i))this.fire(new t.ErrorEvent(new Error('Layer with id "'+i+'" already exists on this map')));else{var o;if("custom"===e.type){if(He(this,t.validateCustomStyleLayer(e)))return;o=t.createStyleLayer(e)}else{if("object"==typeof e.source&&(this.addSource(i,e.source),e=t.clone(e),e=t.extend(e,{source:i})),this._validate(t.validateStyle.layer,"layers."+i,e,{arrayIndex:-1},r))return;o=t.createStyleLayer(e),this._validateLayer(o),o.setEventedParent(this,{layer:{id:i}})}var a=n?this._order.indexOf(n):this._order.length;if(n&&-1===a)this.fire(new t.ErrorEvent(new Error('Layer with id "'+n+'" 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&&"custom"!==o.type){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),o.onAdd&&o.onAdd(this.map)}}},n.prototype.moveLayer=function(e,n){if(this._checkLoaded(),this._changed=!0,this._layers[e]){if(e!==n){var r=this._order.indexOf(e);this._order.splice(r,1);var i=n?this._order.indexOf(n):this._order.length;n&&-1===i?this.fire(new t.ErrorEvent(new Error('Layer with id "'+n+'" does not exist on this map.'))):(this._order.splice(i,0,e),this._layerOrderChanged=!0)}}else this.fire(new t.ErrorEvent(new Error("The layer '"+e+"' does not exist in the map's style and cannot be moved.")))},n.prototype.removeLayer=function(e){this._checkLoaded();var n=this._layers[e];if(n){n.setEventedParent(null);var r=this._order.indexOf(e);this._order.splice(r,1),this._layerOrderChanged=!0,this._changed=!0,this._removedLayers[e]=n,delete this._layers[e],delete this._updatedLayers[e],delete this._updatedPaintProps[e],n.onRemove&&n.onRemove(this.map)}else this.fire(new t.ErrorEvent(new Error("The layer '"+e+"' does not exist in the map's style and cannot be removed.")))},n.prototype.getLayer=function(t){return this._layers[t]},n.prototype.setLayerZoomRange=function(e,n,r){this._checkLoaded();var i=this.getLayer(e);i?i.minzoom===n&&i.maxzoom===r||(null!=n&&(i.minzoom=n),null!=r&&(i.maxzoom=r),this._updateLayer(i)):this.fire(new t.ErrorEvent(new Error("The layer '"+e+"' does not exist in the map's style and cannot have zoom extent.")))},n.prototype.setFilter=function(e,n){this._checkLoaded();var r=this.getLayer(e);if(r){if(!t.isEqual(r.filter,n))return null===n||void 0===n?(r.filter=void 0,void this._updateLayer(r)):void(this._validate(t.validateStyle.filter,"layers."+r.id+".filter",n)||(r.filter=t.clone(n),this._updateLayer(r)))}else this.fire(new t.ErrorEvent(new Error("The layer '"+e+"' does not exist in the map's style and cannot be filtered.")))},n.prototype.getFilter=function(e){return t.clone(this.getLayer(e).filter)},n.prototype.setLayoutProperty=function(e,n,r){this._checkLoaded();var i=this.getLayer(e);i?t.isEqual(i.getLayoutProperty(n),r)||(i.setLayoutProperty(n,r),this._updateLayer(i)):this.fire(new t.ErrorEvent(new Error("The layer '"+e+"' does not exist in the map's style and cannot be styled.")))},n.prototype.getLayoutProperty=function(t,e){return this.getLayer(t).getLayoutProperty(e)},n.prototype.setPaintProperty=function(e,n,r){this._checkLoaded();var i=this.getLayer(e);i?t.isEqual(i.getPaintProperty(n),r)||(i.setPaintProperty(n,r)&&this._updateLayer(i),this._changed=!0,this._updatedPaintProps[e]=!0):this.fire(new t.ErrorEvent(new Error("The layer '"+e+"' does not exist in the map's style and cannot be styled.")))},n.prototype.getPaintProperty=function(t,e){return this.getLayer(t).getPaintProperty(e)},n.prototype.setFeatureState=function(e,n){this._checkLoaded();var r=e.source,i=e.sourceLayer,o=this.sourceCaches[r],a=parseInt(e.id,10);void 0!==o?"vector"!==o.getSource().type||i?isNaN(a)||a<0?this.fire(new t.ErrorEvent(new Error("The feature id parameter must be provided and non-negative."))):o.setFeatureState(i,a,n):this.fire(new t.ErrorEvent(new Error("The sourceLayer parameter must be provided for vector source types."))):this.fire(new t.ErrorEvent(new Error("The source '"+r+"' does not exist in the map's style.")))},n.prototype.getFeatureState=function(e){this._checkLoaded();var n=e.source,r=e.sourceLayer,i=this.sourceCaches[n],o=parseInt(e.id,10);if(void 0!==i)if("vector"!==i.getSource().type||r){if(!(isNaN(o)||o<0))return i.getFeatureState(r,o);this.fire(new t.ErrorEvent(new Error("The feature id parameter must be provided and non-negative.")))}else this.fire(new t.ErrorEvent(new Error("The sourceLayer parameter must be provided for vector source types.")));else this.fire(new t.ErrorEvent(new Error("The source '"+n+"' does not exist in the map's style.")))},n.prototype.getTransition=function(){return t.extend({duration:300,delay:0},this.stylesheet&&this.stylesheet.transition)},n.prototype.serialize=function(){return t.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:t.mapObject(this.sourceCaches,function(t){return t.serialize()}),layers:this._serializeLayers(this._order)},function(t){return void 0!==t})},n.prototype._updateLayer=function(t){this._updatedLayers[t.id]=!0,t.source&&!this._updatedSources[t.source]&&(this._updatedSources[t.source]="reload",this.sourceCaches[t.source].pause()),this._changed=!0},n.prototype._flattenRenderedFeatures=function(t){for(var e=[],n=this._order.length-1;n>=0;n--)for(var r=this._order[n],i=0,o=t;i 0.5) {\n gl_FragColor = vec4(0.0, 0.0, 1.0, 0.5) * alpha;\n }\n\n if (v_notUsed > 0.5) {\n // This box not used, fade it out\n gl_FragColor *= .1;\n }\n}",vertexSource:"attribute vec2 a_pos;\nattribute vec2 a_anchor_pos;\nattribute vec2 a_extrude;\nattribute vec2 a_placed;\n\nuniform mat4 u_matrix;\nuniform vec2 u_extrude_scale;\nuniform float u_camera_to_center_distance;\n\nvarying float v_placed;\nvarying float v_notUsed;\n\nvoid main() {\n vec4 projectedPoint = u_matrix * vec4(a_anchor_pos, 0, 1);\n highp float camera_to_anchor_distance = projectedPoint.w;\n highp float collision_perspective_ratio = clamp(\n 0.5 + 0.5 * (u_camera_to_center_distance / camera_to_anchor_distance),\n 0.0, // Prevents oversized near-field boxes in pitched/overzoomed tiles\n 4.0);\n\n gl_Position = u_matrix * vec4(a_pos, 0.0, 1.0);\n gl_Position.xy += a_extrude * u_extrude_scale * gl_Position.w * collision_perspective_ratio;\n\n v_placed = a_placed.x;\n v_notUsed = a_placed.y;\n}\n"},collisionCircle:{fragmentSource:"uniform float u_overscale_factor;\n\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 / u_overscale_factor;\n float radius = v_radius * extrude_scale_length;\n\n float distance_to_edge = abs(extrude_length - radius);\n float opacity_t = smoothstep(-stroke_width, 0.0, -distance_to_edge);\n\n gl_FragColor = opacity_t * color;\n}\n",vertexSource:"attribute vec2 a_pos;\nattribute vec2 a_anchor_pos;\nattribute vec2 a_extrude;\nattribute vec2 a_placed;\n\nuniform mat4 u_matrix;\nuniform vec2 u_extrude_scale;\nuniform float u_camera_to_center_distance;\n\nvarying float v_placed;\nvarying float v_notUsed;\nvarying float v_radius;\n\nvarying vec2 v_extrude;\nvarying vec2 v_extrude_scale;\n\nvoid main() {\n vec4 projectedPoint = u_matrix * vec4(a_anchor_pos, 0, 1);\n highp float camera_to_anchor_distance = projectedPoint.w;\n highp float collision_perspective_ratio = clamp(\n 0.5 + 0.5 * (u_camera_to_center_distance / camera_to_anchor_distance),\n 0.0, // Prevents oversized near-field circles in pitched/overzoomed tiles\n 4.0);\n\n gl_Position = u_matrix * vec4(a_pos, 0.0, 1.0);\n\n highp float padding_factor = 1.2; // Pad the vertices slightly to make room for anti-alias blur\n gl_Position.xy += a_extrude * u_extrude_scale * padding_factor * gl_Position.w * collision_perspective_ratio;\n\n v_placed = a_placed.x;\n v_notUsed = a_placed.y;\n v_radius = abs(a_extrude.y); // We don't pitch the circles, so both units of the extrusion vector are equal in magnitude to the radius\n\n v_extrude = a_extrude * padding_factor;\n v_extrude_scale = u_extrude_scale * u_camera_to_center_distance * collision_perspective_ratio;\n}\n"},debug:{fragmentSource:"uniform highp vec4 u_color;\n\nvoid main() {\n gl_FragColor = u_color;\n}\n",vertexSource:"attribute vec2 a_pos;\n\nuniform mat4 u_matrix;\n\nvoid main() {\n gl_Position = u_matrix * vec4(a_pos, 0, 1);\n}\n"},fill:{fragmentSource:"#pragma mapbox: define highp vec4 color\n#pragma mapbox: define lowp float opacity\n\nvoid main() {\n #pragma mapbox: initialize highp vec4 color\n #pragma mapbox: initialize lowp float opacity\n\n gl_FragColor = color * opacity;\n\n#ifdef OVERDRAW_INSPECTOR\n gl_FragColor = vec4(1.0);\n#endif\n}\n",vertexSource:"attribute vec2 a_pos;\n\nuniform mat4 u_matrix;\n\n#pragma mapbox: define highp vec4 color\n#pragma mapbox: define lowp float opacity\n\nvoid main() {\n #pragma mapbox: initialize highp vec4 color\n #pragma mapbox: initialize lowp float opacity\n\n gl_Position = u_matrix * vec4(a_pos, 0, 1);\n}\n"},fillOutline:{fragmentSource:"#pragma mapbox: define highp vec4 outline_color\n#pragma mapbox: define lowp float opacity\n\nvarying vec2 v_pos;\n\nvoid main() {\n #pragma mapbox: initialize highp vec4 outline_color\n #pragma mapbox: initialize lowp float opacity\n\n float dist = length(v_pos - gl_FragCoord.xy);\n float alpha = 1.0 - smoothstep(0.0, 1.0, dist);\n gl_FragColor = outline_color * (alpha * opacity);\n\n#ifdef OVERDRAW_INSPECTOR\n gl_FragColor = vec4(1.0);\n#endif\n}\n",vertexSource:"attribute vec2 a_pos;\n\nuniform mat4 u_matrix;\nuniform vec2 u_world;\n\nvarying vec2 v_pos;\n\n#pragma mapbox: define highp vec4 outline_color\n#pragma mapbox: define lowp float opacity\n\nvoid main() {\n #pragma mapbox: initialize highp vec4 outline_color\n #pragma mapbox: initialize lowp float opacity\n\n gl_Position = u_matrix * vec4(a_pos, 0, 1);\n v_pos = (gl_Position.xy / gl_Position.w + 1.0) / 2.0 * u_world;\n}\n"},fillOutlinePattern:{fragmentSource:"\nuniform vec2 u_texsize;\nuniform sampler2D u_image;\nuniform float u_fade;\n\nvarying vec2 v_pos_a;\nvarying vec2 v_pos_b;\nvarying vec2 v_pos;\n\n#pragma mapbox: define lowp float opacity\n#pragma mapbox: define lowp vec4 pattern_from\n#pragma mapbox: define lowp vec4 pattern_to\n\nvoid main() {\n #pragma mapbox: initialize lowp float opacity\n #pragma mapbox: initialize mediump vec4 pattern_from\n #pragma mapbox: initialize mediump vec4 pattern_to\n\n vec2 pattern_tl_a = pattern_from.xy;\n vec2 pattern_br_a = pattern_from.zw;\n vec2 pattern_tl_b = pattern_to.xy;\n vec2 pattern_br_b = pattern_to.zw;\n\n vec2 imagecoord = mod(v_pos_a, 1.0);\n vec2 pos = mix(pattern_tl_a / u_texsize, 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(pattern_tl_b / u_texsize, 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_fade) * alpha * opacity;\n\n#ifdef OVERDRAW_INSPECTOR\n gl_FragColor = vec4(1.0);\n#endif\n}\n",vertexSource:"uniform mat4 u_matrix;\nuniform vec2 u_world;\nuniform vec2 u_pixel_coord_upper;\nuniform vec2 u_pixel_coord_lower;\nuniform vec4 u_scale;\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#pragma mapbox: define lowp vec4 pattern_from\n#pragma mapbox: define lowp vec4 pattern_to\n\nvoid main() {\n #pragma mapbox: initialize lowp float opacity\n #pragma mapbox: initialize mediump vec4 pattern_from\n #pragma mapbox: initialize mediump vec4 pattern_to\n\n vec2 pattern_tl_a = pattern_from.xy;\n vec2 pattern_br_a = pattern_from.zw;\n vec2 pattern_tl_b = pattern_to.xy;\n vec2 pattern_br_b = pattern_to.zw;\n\n float pixelRatio = u_scale.x;\n float tileRatio = u_scale.y;\n float fromScale = u_scale.z;\n float toScale = u_scale.w;\n\n gl_Position = u_matrix * vec4(a_pos, 0, 1);\n\n vec2 display_size_a = vec2((pattern_br_a.x - pattern_tl_a.x) / pixelRatio, (pattern_br_a.y - pattern_tl_a.y) / pixelRatio);\n vec2 display_size_b = vec2((pattern_br_b.x - pattern_tl_b.x) / pixelRatio, (pattern_br_b.y - pattern_tl_b.y) / pixelRatio);\n\n v_pos_a = get_pattern_pos(u_pixel_coord_upper, u_pixel_coord_lower, fromScale * display_size_a, tileRatio, a_pos);\n v_pos_b = get_pattern_pos(u_pixel_coord_upper, u_pixel_coord_lower, toScale * display_size_b, tileRatio, a_pos);\n\n v_pos = (gl_Position.xy / gl_Position.w + 1.0) / 2.0 * u_world;\n}\n"},fillPattern:{fragmentSource:"uniform vec2 u_texsize;\nuniform float u_fade;\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#pragma mapbox: define lowp vec4 pattern_from\n#pragma mapbox: define lowp vec4 pattern_to\n\nvoid main() {\n #pragma mapbox: initialize lowp float opacity\n #pragma mapbox: initialize mediump vec4 pattern_from\n #pragma mapbox: initialize mediump vec4 pattern_to\n\n vec2 pattern_tl_a = pattern_from.xy;\n vec2 pattern_br_a = pattern_from.zw;\n vec2 pattern_tl_b = pattern_to.xy;\n vec2 pattern_br_b = pattern_to.zw;\n\n vec2 imagecoord = mod(v_pos_a, 1.0);\n vec2 pos = mix(pattern_tl_a / u_texsize, 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(pattern_tl_b / u_texsize, pattern_br_b / u_texsize, imagecoord_b);\n vec4 color2 = texture2D(u_image, pos2);\n\n gl_FragColor = mix(color1, color2, u_fade) * opacity;\n\n#ifdef OVERDRAW_INSPECTOR\n gl_FragColor = vec4(1.0);\n#endif\n}\n",vertexSource:"uniform mat4 u_matrix;\nuniform vec2 u_pixel_coord_upper;\nuniform vec2 u_pixel_coord_lower;\nuniform vec4 u_scale;\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#pragma mapbox: define lowp vec4 pattern_from\n#pragma mapbox: define lowp vec4 pattern_to\n\nvoid main() {\n #pragma mapbox: initialize lowp float opacity\n #pragma mapbox: initialize mediump vec4 pattern_from\n #pragma mapbox: initialize mediump vec4 pattern_to\n\n vec2 pattern_tl_a = pattern_from.xy;\n vec2 pattern_br_a = pattern_from.zw;\n vec2 pattern_tl_b = pattern_to.xy;\n vec2 pattern_br_b = pattern_to.zw;\n\n float pixelRatio = u_scale.x;\n float tileZoomRatio = u_scale.y;\n float fromScale = u_scale.z;\n float toScale = u_scale.w;\n\n vec2 display_size_a = vec2((pattern_br_a.x - pattern_tl_a.x) / pixelRatio, (pattern_br_a.y - pattern_tl_a.y) / pixelRatio);\n vec2 display_size_b = vec2((pattern_br_b.x - pattern_tl_b.x) / pixelRatio, (pattern_br_b.y - pattern_tl_b.y) / pixelRatio);\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, fromScale * display_size_a, tileZoomRatio, a_pos);\n v_pos_b = get_pattern_pos(u_pixel_coord_upper, u_pixel_coord_lower, toScale * display_size_b, tileZoomRatio, a_pos);\n}\n"},fillExtrusion:{fragmentSource:"varying vec4 v_color;\n\nvoid main() {\n gl_FragColor = v_color;\n\n#ifdef OVERDRAW_INSPECTOR\n gl_FragColor = vec4(1.0);\n#endif\n}\n",vertexSource:"uniform mat4 u_matrix;\nuniform vec3 u_lightcolor;\nuniform lowp vec3 u_lightpos;\nuniform lowp float u_lightintensity;\nuniform float u_vertical_gradient;\n\nattribute vec2 a_pos;\nattribute vec4 a_normal_ed;\n\nvarying vec4 v_color;\n\n#pragma mapbox: define highp float base\n#pragma mapbox: define highp float height\n\n#pragma mapbox: define highp vec4 color\n\nvoid main() {\n #pragma mapbox: initialize highp float base\n #pragma mapbox: initialize highp 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 // This avoids another branching statement, but multiplies by a constant of 0.84 if no vertical gradient,\n // and otherwise calculates the gradient based on base + height\n directional *= (\n (1.0 - u_vertical_gradient) +\n (u_vertical_gradient * clamp((t + base) * pow(height / 150.0, 0.5), mix(0.7, 0.98, 1.0 - u_lightintensity), 1.0)));\n }\n\n // Assign final color based on surface + ambient light color, diffuse light directional, and light color\n // with lower bounds adjusted to hue of light\n // so that shading is tinted with the complementary (opposite) color to the light color\n v_color.r += clamp(color.r * directional * u_lightcolor.r, mix(0.0, 0.3, 1.0 - u_lightcolor.r), 1.0);\n v_color.g += clamp(color.g * directional * u_lightcolor.g, mix(0.0, 0.3, 1.0 - u_lightcolor.g), 1.0);\n v_color.b += clamp(color.b * directional * u_lightcolor.b, mix(0.0, 0.3, 1.0 - u_lightcolor.b), 1.0);\n}\n"},fillExtrusionPattern:{fragmentSource:"uniform vec2 u_texsize;\nuniform float u_fade;\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#pragma mapbox: define lowp vec4 pattern_from\n#pragma mapbox: define lowp vec4 pattern_to\n\nvoid main() {\n #pragma mapbox: initialize lowp float base\n #pragma mapbox: initialize lowp float height\n #pragma mapbox: initialize mediump vec4 pattern_from\n #pragma mapbox: initialize mediump vec4 pattern_to\n\n vec2 pattern_tl_a = pattern_from.xy;\n vec2 pattern_br_a = pattern_from.zw;\n vec2 pattern_tl_b = pattern_to.xy;\n vec2 pattern_br_b = pattern_to.zw;\n\n vec2 imagecoord = mod(v_pos_a, 1.0);\n vec2 pos = mix(pattern_tl_a / u_texsize, 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(pattern_tl_b / u_texsize, pattern_br_b / u_texsize, imagecoord_b);\n vec4 color2 = texture2D(u_image, pos2);\n\n vec4 mixedColor = mix(color1, color2, u_fade);\n\n gl_FragColor = mixedColor * v_lighting;\n\n#ifdef OVERDRAW_INSPECTOR\n gl_FragColor = vec4(1.0);\n#endif\n}\n",vertexSource:"uniform mat4 u_matrix;\nuniform vec2 u_pixel_coord_upper;\nuniform vec2 u_pixel_coord_lower;\nuniform float u_height_factor;\nuniform vec4 u_scale;\nuniform float u_vertical_gradient;\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;\n\n#pragma mapbox: define lowp float base\n#pragma mapbox: define lowp float height\n#pragma mapbox: define lowp vec4 pattern_from\n#pragma mapbox: define lowp vec4 pattern_to\n\nvoid main() {\n #pragma mapbox: initialize lowp float base\n #pragma mapbox: initialize lowp float height\n #pragma mapbox: initialize mediump vec4 pattern_from\n #pragma mapbox: initialize mediump vec4 pattern_to\n\n vec2 pattern_tl_a = pattern_from.xy;\n vec2 pattern_br_a = pattern_from.zw;\n vec2 pattern_tl_b = pattern_to.xy;\n vec2 pattern_br_b = pattern_to.zw;\n\n float pixelRatio = u_scale.x;\n float tileRatio = u_scale.y;\n float fromScale = u_scale.z;\n float toScale = u_scale.w;\n\n vec3 normal = a_normal_ed.xyz;\n float edgedistance = a_normal_ed.w;\n\n vec2 display_size_a = vec2((pattern_br_a.x - pattern_tl_a.x) / pixelRatio, (pattern_br_a.y - pattern_tl_a.y) / pixelRatio);\n vec2 display_size_b = vec2((pattern_br_b.x - pattern_tl_b.x) / pixelRatio, (pattern_br_b.y - pattern_tl_b.y) / pixelRatio);\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, fromScale * display_size_a, tileRatio, pos);\n v_pos_b = get_pattern_pos(u_pixel_coord_upper, u_pixel_coord_lower, toScale * display_size_b, tileRatio, 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 // This avoids another branching statement, but multiplies by a constant of 0.84 if no vertical gradient,\n // and otherwise calculates the gradient based on base + height\n directional *= (\n (1.0 - u_vertical_gradient) +\n (u_vertical_gradient * clamp((t + base) * pow(height / 150.0, 0.5), mix(0.7, 0.98, 1.0 - u_lightintensity), 1.0)));\n }\n\n v_lighting.rgb += clamp(directional * u_lightcolor, mix(vec3(0.0), vec3(0.3), 1.0 - u_lightcolor), vec3(1.0));\n}\n"},extrusionTexture:{fragmentSource:"uniform sampler2D u_image;\nuniform float u_opacity;\nvarying vec2 v_pos;\n\nvoid main() {\n gl_FragColor = texture2D(u_image, v_pos) * u_opacity;\n\n#ifdef OVERDRAW_INSPECTOR\n gl_FragColor = vec4(0.0);\n#endif\n}\n",vertexSource:"uniform mat4 u_matrix;\nuniform vec2 u_world;\nattribute vec2 a_pos;\nvarying vec2 v_pos;\n\nvoid main() {\n gl_Position = u_matrix * vec4(a_pos * u_world, 0, 1);\n\n v_pos.x = a_pos.x;\n v_pos.y = 1.0 - a_pos.y;\n}\n"},hillshadePrepare:{fragmentSource:"#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;\nuniform float u_maxzoom;\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 - u_maxzoom) * a) where a is an arbitrary value\n // Here we use a=0.3 which works out to the expression below. see \n // 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 - u_maxzoom) * 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",vertexSource:"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"},hillshade:{fragmentSource:"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",vertexSource:"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"},line:{fragmentSource:"#pragma mapbox: define highp vec4 color\n#pragma mapbox: define lowp float blur\n#pragma mapbox: define lowp float opacity\n\nvarying vec2 v_width2;\nvarying vec2 v_normal;\nvarying float v_gamma_scale;\n\nvoid main() {\n #pragma mapbox: initialize highp vec4 color\n #pragma mapbox: initialize lowp float blur\n #pragma mapbox: initialize lowp float opacity\n\n // Calculate the distance of the pixel from the line in pixels.\n float dist = length(v_normal) * v_width2.s;\n\n // Calculate the antialiasing fade factor. This is either when fading in\n // the line in case of an offset line (v_width2.t) or when fading out\n // (v_width2.s)\n float blur2 = (blur + 1.0 / DEVICE_PIXEL_RATIO) * v_gamma_scale;\n float alpha = clamp(min(dist - (v_width2.t - blur2), v_width2.s - dist) / blur2, 0.0, 1.0);\n\n gl_FragColor = color * (alpha * opacity);\n\n#ifdef OVERDRAW_INSPECTOR\n gl_FragColor = vec4(1.0);\n#endif\n}\n",vertexSource:"\n\n// the distance over which the line edge fades out.\n// Retina devices need a smaller distance to avoid aliasing.\n#define ANTIALIASING 1.0 / DEVICE_PIXEL_RATIO / 2.0\n\n// floor(127 / 2) == 63.0\n// the maximum allowed miter limit is 2.0 at the moment. the extrude normal is\n// stored in a byte (-128..127). we scale regular normals up to length 63, but\n// there are also \"special\" normals that have a bigger length (of up to 126 in\n// this case).\n// #define scale 63.0\n#define scale 0.015873016\n\nattribute vec4 a_pos_normal;\nattribute vec4 a_data;\n\nuniform mat4 u_matrix;\nuniform mediump float u_ratio;\nuniform vec2 u_gl_units_to_pixels;\n\nvarying vec2 v_normal;\nvarying vec2 v_width2;\nvarying float v_gamma_scale;\nvarying highp float v_linesofar;\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 v_linesofar = (floor(a_data.z / 4.0) + a_data.w * 64.0) * 2.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) + (halfwidth == 0.0 ? 0.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"},lineGradient:{fragmentSource:"\n#pragma mapbox: define lowp float blur\n#pragma mapbox: define lowp float opacity\n\nuniform sampler2D u_image;\n\nvarying vec2 v_width2;\nvarying vec2 v_normal;\nvarying float v_gamma_scale;\nvarying highp float v_lineprogress;\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 // For gradient lines, v_lineprogress is the ratio along the entire line,\n // scaled to [0, 2^15), and the gradient ramp is stored in a texture.\n vec4 color = texture2D(u_image, vec2(v_lineprogress, 0.5));\n\n gl_FragColor = color * (alpha * opacity);\n\n#ifdef OVERDRAW_INSPECTOR\n gl_FragColor = vec4(1.0);\n#endif\n}\n",vertexSource:"\n// the attribute conveying progress along a line is scaled to [0, 2^15)\n#define MAX_LINE_DISTANCE 32767.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\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;\nvarying highp float v_lineprogress;\n\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 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 v_lineprogress = (floor(a_data.z / 4.0) + a_data.w * 64.0) * 2.0 / MAX_LINE_DISTANCE;\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) + (halfwidth == 0.0 ? 0.0 : ANTIALIASING);\n\n // Scale the extrusion vector down to a normal and then up by the line width\n // of this vertex.\n mediump vec2 dist = outset * a_extrude * scale;\n\n // Calculate the offset when drawing a line that is to the side of the actual line.\n // We do this by creating a vector that points towards the extrude, but rotate\n // it when we're drawing round end points (a_direction = -1 or 1) since their\n // extrude vector points in another direction.\n mediump float u = 0.5 * a_direction;\n mediump float t = 1.0 - abs(u);\n mediump vec2 offset2 = offset * a_extrude * scale * normal.y * mat2(t, -u, u, t);\n\n vec4 projected_extrude = u_matrix * vec4(dist / u_ratio, 0.0, 0.0);\n gl_Position = u_matrix * vec4(pos + offset2 / u_ratio, 0.0, 1.0) + projected_extrude;\n\n // calculate how much the perspective view squishes or stretches the extrude\n float extrude_length_without_perspective = length(dist);\n float extrude_length_with_perspective = length(projected_extrude.xy / gl_Position.w * u_gl_units_to_pixels);\n v_gamma_scale = extrude_length_without_perspective / extrude_length_with_perspective;\n\n v_width2 = vec2(outset, inset);\n}\n"},linePattern:{fragmentSource:"uniform vec2 u_texsize;\nuniform float u_fade;\nuniform mediump vec4 u_scale;\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 vec4 pattern_from\n#pragma mapbox: define lowp vec4 pattern_to\n#pragma mapbox: define lowp float blur\n#pragma mapbox: define lowp float opacity\n\nvoid main() {\n #pragma mapbox: initialize mediump vec4 pattern_from\n #pragma mapbox: initialize mediump vec4 pattern_to\n\n #pragma mapbox: initialize lowp float blur\n #pragma mapbox: initialize lowp float opacity\n\n vec2 pattern_tl_a = pattern_from.xy;\n vec2 pattern_br_a = pattern_from.zw;\n vec2 pattern_tl_b = pattern_to.xy;\n vec2 pattern_br_b = pattern_to.zw;\n\n float pixelRatio = u_scale.x;\n float tileZoomRatio = u_scale.y;\n float fromScale = u_scale.z;\n float toScale = u_scale.w;\n\n vec2 display_size_a = vec2((pattern_br_a.x - pattern_tl_a.x) / pixelRatio, (pattern_br_a.y - pattern_tl_a.y) / pixelRatio);\n vec2 display_size_b = vec2((pattern_br_b.x - pattern_tl_b.x) / pixelRatio, (pattern_br_b.y - pattern_tl_b.y) / pixelRatio);\n\n vec2 pattern_size_a = vec2(display_size_a.x * fromScale / tileZoomRatio, display_size_a.y);\n vec2 pattern_size_b = vec2(display_size_b.x * toScale / tileZoomRatio, display_size_b.y);\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 / pattern_size_a.x, 1.0);\n float x_b = mod(v_linesofar / pattern_size_b.x, 1.0);\n\n // v_normal.y is 0 at the midpoint of the line, -1 at the lower edge, 1 at the upper edge\n // we clamp the line width outset to be between 0 and half the pattern height plus padding (2.0)\n // to ensure we don't sample outside the designated symbol on the sprite sheet.\n // 0.5 is added to shift the component to be bounded between 0 and 1 for interpolation of\n // the texture coordinate\n float y_a = 0.5 + (v_normal.y * clamp(v_width2.s, 0.0, (pattern_size_a.y + 2.0) / 2.0) / pattern_size_a.y);\n float y_b = 0.5 + (v_normal.y * clamp(v_width2.s, 0.0, (pattern_size_b.y + 2.0) / 2.0) / pattern_size_b.y);\n vec2 pos_a = mix(pattern_tl_a / u_texsize, pattern_br_a / u_texsize, vec2(x_a, y_a));\n vec2 pos_b = mix(pattern_tl_b / u_texsize, pattern_br_b / u_texsize, vec2(x_b, y_b));\n\n vec4 color = mix(texture2D(u_image, pos_a), texture2D(u_image, pos_b), u_fade);\n\n gl_FragColor = color * alpha * opacity;\n\n#ifdef OVERDRAW_INSPECTOR\n gl_FragColor = vec4(1.0);\n#endif\n}\n",vertexSource:"// floor(127 / 2) == 63.0\n// the maximum allowed miter limit is 2.0 at the moment. the extrude normal is\n// stored in a byte (-128..127). we scale regular normals up to length 63, but\n// there are also \"special\" normals that have a bigger length (of up to 126 in\n// this case).\n// #define scale 63.0\n#define scale 0.015873016\n\n// We scale the distance before adding it to the buffers so that we can store\n// long distances for long segments. Use this value to unscale the distance.\n#define LINE_DISTANCE_SCALE 2.0\n\n// the distance over which the line edge fades out.\n// Retina devices need a smaller distance to avoid aliasing.\n#define ANTIALIASING 1.0 / DEVICE_PIXEL_RATIO / 2.0\n\nattribute vec4 a_pos_normal;\nattribute vec4 a_data;\n\nuniform mat4 u_matrix;\nuniform vec2 u_gl_units_to_pixels;\nuniform mediump float u_ratio;\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#pragma mapbox: define lowp vec4 pattern_from\n#pragma mapbox: define lowp vec4 pattern_to\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 #pragma mapbox: initialize mediump vec4 pattern_from\n #pragma mapbox: initialize mediump vec4 pattern_to\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 // float tileRatio = u_scale.y;\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) + (halfwidth == 0.0 ? 0.0 : ANTIALIASING);\n\n // Scale the extrusion vector down to a normal and then up by the line width\n // of this vertex.\n mediump vec2 dist = outset * a_extrude * scale;\n\n // Calculate the offset when drawing a line that is to the side of the actual line.\n // We do this by creating a vector that points towards the extrude, but rotate\n // it when we're drawing round end points (a_direction = -1 or 1) since their\n // extrude vector points in another direction.\n mediump float u = 0.5 * a_direction;\n mediump float t = 1.0 - abs(u);\n mediump vec2 offset2 = offset * a_extrude * scale * normal.y * mat2(t, -u, u, t);\n\n vec4 projected_extrude = u_matrix * vec4(dist / u_ratio, 0.0, 0.0);\n gl_Position = u_matrix * vec4(pos + offset2 / u_ratio, 0.0, 1.0) + projected_extrude;\n\n // calculate how much the perspective view squishes or stretches the extrude\n float extrude_length_without_perspective = length(dist);\n float extrude_length_with_perspective = length(projected_extrude.xy / gl_Position.w * u_gl_units_to_pixels);\n v_gamma_scale = extrude_length_without_perspective / extrude_length_with_perspective;\n\n v_linesofar = a_linesofar;\n v_width2 = vec2(outset, inset);\n}\n"},lineSDF:{fragmentSource:"\nuniform sampler2D u_image;\nuniform float u_sdfgamma;\nuniform float u_mix;\n\nvarying vec2 v_normal;\nvarying vec2 v_width2;\nvarying vec2 v_tex_a;\nvarying vec2 v_tex_b;\nvarying float v_gamma_scale;\n\n#pragma mapbox: define highp vec4 color\n#pragma mapbox: define lowp float blur\n#pragma mapbox: define lowp float opacity\n#pragma mapbox: define mediump float width\n#pragma mapbox: define lowp float floorwidth\n\nvoid main() {\n #pragma mapbox: initialize highp vec4 color\n #pragma mapbox: initialize lowp float blur\n #pragma mapbox: initialize lowp float opacity\n #pragma mapbox: initialize mediump float width\n #pragma mapbox: initialize lowp float floorwidth\n\n // Calculate the distance of the pixel from the line in pixels.\n float dist = length(v_normal) * v_width2.s;\n\n // Calculate the antialiasing fade factor. This is either when fading in\n // the line in case of an offset line (v_width2.t) or when fading out\n // (v_width2.s)\n float blur2 = (blur + 1.0 / DEVICE_PIXEL_RATIO) * v_gamma_scale;\n float alpha = clamp(min(dist - (v_width2.t - blur2), v_width2.s - dist) / blur2, 0.0, 1.0);\n\n float sdfdist_a = texture2D(u_image, v_tex_a).a;\n float sdfdist_b = texture2D(u_image, v_tex_b).a;\n float sdfdist = mix(sdfdist_a, sdfdist_b, u_mix);\n alpha *= smoothstep(0.5 - u_sdfgamma / floorwidth, 0.5 + u_sdfgamma / floorwidth, sdfdist);\n\n gl_FragColor = color * (alpha * opacity);\n\n#ifdef OVERDRAW_INSPECTOR\n gl_FragColor = vec4(1.0);\n#endif\n}\n",vertexSource:"// floor(127 / 2) == 63.0\n// the maximum allowed miter limit is 2.0 at the moment. the extrude normal is\n// stored in a byte (-128..127). we scale regular normals up to length 63, but\n// there are also \"special\" normals that have a bigger length (of up to 126 in\n// this case).\n// #define scale 63.0\n#define scale 0.015873016\n\n// We scale the distance before adding it to the buffers so that we can store\n// long distances for long segments. Use this value to unscale the distance.\n#define LINE_DISTANCE_SCALE 2.0\n\n// the distance over which the line edge fades out.\n// Retina devices need a smaller distance to avoid aliasing.\n#define ANTIALIASING 1.0 / DEVICE_PIXEL_RATIO / 2.0\n\nattribute vec4 a_pos_normal;\nattribute vec4 a_data;\n\nuniform mat4 u_matrix;\nuniform mediump float u_ratio;\nuniform vec2 u_patternscale_a;\nuniform float u_tex_y_a;\nuniform vec2 u_patternscale_b;\nuniform float u_tex_y_b;\nuniform vec2 u_gl_units_to_pixels;\n\nvarying vec2 v_normal;\nvarying vec2 v_width2;\nvarying vec2 v_tex_a;\nvarying vec2 v_tex_b;\nvarying float v_gamma_scale;\n\n#pragma mapbox: define highp vec4 color\n#pragma mapbox: define lowp float blur\n#pragma mapbox: define lowp float opacity\n#pragma mapbox: define mediump float gapwidth\n#pragma mapbox: define lowp float offset\n#pragma mapbox: define mediump float width\n#pragma mapbox: define lowp float floorwidth\n\nvoid main() {\n #pragma mapbox: initialize highp vec4 color\n #pragma mapbox: initialize lowp float blur\n #pragma mapbox: initialize lowp float opacity\n #pragma mapbox: initialize mediump float gapwidth\n #pragma mapbox: initialize lowp float offset\n #pragma mapbox: initialize mediump float width\n #pragma mapbox: initialize lowp float floorwidth\n\n vec2 a_extrude = a_data.xy - 128.0;\n float a_direction = mod(a_data.z, 4.0) - 1.0;\n float a_linesofar = (floor(a_data.z / 4.0) + a_data.w * 64.0) * LINE_DISTANCE_SCALE;\n\n vec2 pos = a_pos_normal.xy;\n\n // x is 1 if it's a round cap, 0 otherwise\n // y is 1 if the normal points up, and -1 if it points down\n mediump vec2 normal = a_pos_normal.zw;\n v_normal = normal;\n\n // these transformations used to be applied in the JS and native code bases.\n // moved them into the shader for clarity and simplicity.\n gapwidth = gapwidth / 2.0;\n float halfwidth = width / 2.0;\n offset = -1.0 * offset;\n\n float inset = gapwidth + (gapwidth > 0.0 ? ANTIALIASING : 0.0);\n float outset = gapwidth + halfwidth * (gapwidth > 0.0 ? 2.0 : 1.0) + (halfwidth == 0.0 ? 0.0 : ANTIALIASING);\n\n // Scale the extrusion vector down to a normal and then up by the line width\n // of this vertex.\n mediump vec2 dist =outset * a_extrude * scale;\n\n // Calculate the offset when drawing a line that is to the side of the actual line.\n // We do this by creating a vector that points towards the extrude, but rotate\n // it when we're drawing round end points (a_direction = -1 or 1) since their\n // extrude vector points in another direction.\n mediump float u = 0.5 * a_direction;\n mediump float t = 1.0 - abs(u);\n mediump vec2 offset2 = offset * a_extrude * scale * normal.y * mat2(t, -u, u, t);\n\n vec4 projected_extrude = u_matrix * vec4(dist / u_ratio, 0.0, 0.0);\n gl_Position = u_matrix * vec4(pos + offset2 / u_ratio, 0.0, 1.0) + projected_extrude;\n\n // calculate how much the perspective view squishes or stretches the extrude\n float extrude_length_without_perspective = length(dist);\n float extrude_length_with_perspective = length(projected_extrude.xy / gl_Position.w * u_gl_units_to_pixels);\n v_gamma_scale = extrude_length_without_perspective / extrude_length_with_perspective;\n\n v_tex_a = vec2(a_linesofar * u_patternscale_a.x / floorwidth, normal.y * u_patternscale_a.y + u_tex_y_a);\n v_tex_b = vec2(a_linesofar * u_patternscale_b.x / floorwidth, normal.y * u_patternscale_b.y + u_tex_y_b);\n\n v_width2 = vec2(outset, inset);\n}\n"},raster:{fragmentSource:"uniform float u_fade_t;\nuniform float u_opacity;\nuniform sampler2D u_image0;\nuniform sampler2D u_image1;\nvarying vec2 v_pos0;\nvarying vec2 v_pos1;\n\nuniform float u_brightness_low;\nuniform float u_brightness_high;\n\nuniform float u_saturation_factor;\nuniform float u_contrast_factor;\nuniform vec3 u_spin_weights;\n\nvoid main() {\n\n // read and cross-fade colors from the main and parent tiles\n vec4 color0 = texture2D(u_image0, v_pos0);\n vec4 color1 = texture2D(u_image1, v_pos1);\n if (color0.a > 0.0) {\n color0.rgb = color0.rgb / color0.a;\n }\n if (color1.a > 0.0) {\n color1.rgb = color1.rgb / color1.a;\n }\n vec4 color = mix(color0, color1, u_fade_t);\n color.a *= u_opacity;\n vec3 rgb = color.rgb;\n\n // spin\n rgb = vec3(\n dot(rgb, u_spin_weights.xyz),\n dot(rgb, u_spin_weights.zxy),\n dot(rgb, u_spin_weights.yzx));\n\n // saturation\n float average = (color.r + color.g + color.b) / 3.0;\n rgb += (average - rgb) * u_saturation_factor;\n\n // contrast\n rgb = (rgb - 0.5) * u_contrast_factor + 0.5;\n\n // brightness\n vec3 u_high_vec = vec3(u_brightness_low, u_brightness_low, u_brightness_low);\n vec3 u_low_vec = vec3(u_brightness_high, u_brightness_high, u_brightness_high);\n\n gl_FragColor = vec4(mix(u_high_vec, u_low_vec, rgb) * color.a, color.a);\n\n#ifdef OVERDRAW_INSPECTOR\n gl_FragColor = vec4(1.0);\n#endif\n}\n",vertexSource:"uniform mat4 u_matrix;\nuniform vec2 u_tl_parent;\nuniform float u_scale_parent;\nuniform float u_buffer_scale;\n\nattribute vec2 a_pos;\nattribute vec2 a_texture_pos;\n\nvarying vec2 v_pos0;\nvarying vec2 v_pos1;\n\nvoid main() {\n gl_Position = u_matrix * vec4(a_pos, 0, 1);\n // We are using Int16 for texture position coordinates to give us enough precision for\n // fractional coordinates. We use 8192 to scale the texture coordinates in the buffer\n // as an arbitrarily high number to preserve adequate precision when rendering.\n // This is also the same value as the EXTENT we are using for our tile buffer pos coordinates,\n // so math for modifying either is consistent.\n v_pos0 = (((a_texture_pos / 8192.0) - 0.5) / u_buffer_scale ) + 0.5;\n v_pos1 = (v_pos0 * u_scale_parent) + u_tl_parent;\n}\n"},symbolIcon:{fragmentSource:"uniform sampler2D u_texture;\n\n#pragma mapbox: define lowp float opacity\n\nvarying vec2 v_tex;\nvarying float v_fade_opacity;\n\nvoid main() {\n #pragma mapbox: initialize lowp float opacity\n\n lowp float alpha = opacity * v_fade_opacity;\n gl_FragColor = texture2D(u_texture, v_tex) * alpha;\n\n#ifdef OVERDRAW_INSPECTOR\n gl_FragColor = vec4(1.0);\n#endif\n}\n",vertexSource:"const float PI = 3.141592653589793;\n\nattribute vec4 a_pos_offset;\nattribute vec4 a_data;\nattribute vec3 a_projected_pos;\nattribute float a_fade_opacity;\n\nuniform bool u_is_size_zoom_constant;\nuniform bool u_is_size_feature_constant;\nuniform highp float u_size_t; // used to interpolate between zoom stops when size is a composite function\nuniform highp float u_size; // used when size is both zoom and feature constant\nuniform highp float u_camera_to_center_distance;\nuniform highp float u_pitch;\nuniform bool u_rotate_symbol;\nuniform highp float u_aspect_ratio;\nuniform float u_fade_change;\n\n#pragma mapbox: define lowp float opacity\n\nuniform mat4 u_matrix;\nuniform mat4 u_label_plane_matrix;\nuniform mat4 u_gl_coord_matrix;\n\nuniform bool u_is_text;\nuniform bool u_pitch_with_map;\n\nuniform vec2 u_texsize;\n\nvarying vec2 v_tex;\nvarying float v_fade_opacity;\n\nvoid main() {\n #pragma mapbox: initialize lowp float opacity\n\n vec2 a_pos = a_pos_offset.xy;\n vec2 a_offset = a_pos_offset.zw;\n\n vec2 a_tex = a_data.xy;\n vec2 a_size = a_data.zw;\n\n highp float segment_angle = -a_projected_pos[2];\n\n float size;\n if (!u_is_size_zoom_constant && !u_is_size_feature_constant) {\n size = mix(a_size[0], a_size[1], u_size_t) / 256.0;\n } else if (u_is_size_zoom_constant && !u_is_size_feature_constant) {\n size = a_size[0] / 256.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 = clamp(\n 0.5 + 0.5 * distance_ratio,\n 0.0, // Prevents oversized near-field symbols in pitched/overzoomed tiles\n 4.0);\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 / 32.0 * fontScale), 0.0, 1.0);\n\n v_tex = a_tex / u_texsize;\n vec2 fade_opacity = unpack_opacity(a_fade_opacity);\n float fade_change = fade_opacity[1] > 0.5 ? u_fade_change : -u_fade_change;\n v_fade_opacity = max(0.0, min(1.0, fade_opacity[0] + fade_change));\n}\n"},symbolSDF:{fragmentSource:"#define SDF_PX 8.0\n#define EDGE_GAMMA 0.105/DEVICE_PIXEL_RATIO\n\nuniform bool u_is_halo;\n#pragma mapbox: define highp vec4 fill_color\n#pragma mapbox: define highp vec4 halo_color\n#pragma mapbox: define lowp float opacity\n#pragma mapbox: define lowp float halo_width\n#pragma mapbox: define lowp float halo_blur\n\nuniform sampler2D u_texture;\nuniform highp float u_gamma_scale;\nuniform bool u_is_text;\n\nvarying vec2 v_data0;\nvarying vec3 v_data1;\n\nvoid main() {\n #pragma mapbox: initialize highp vec4 fill_color\n #pragma mapbox: initialize highp vec4 halo_color\n #pragma mapbox: initialize lowp float opacity\n #pragma mapbox: initialize lowp float halo_width\n #pragma mapbox: initialize lowp float halo_blur\n\n vec2 tex = v_data0.xy;\n float gamma_scale = v_data1.x;\n float size = v_data1.y;\n float fade_opacity = v_data1[2];\n\n float fontScale = u_is_text ? size / 24.0 : size;\n\n lowp vec4 color = fill_color;\n highp float gamma = EDGE_GAMMA / (fontScale * u_gamma_scale);\n lowp float buff = (256.0 - 64.0) / 256.0;\n if (u_is_halo) {\n color = halo_color;\n gamma = (halo_blur * 1.19 / SDF_PX + EDGE_GAMMA) / (fontScale * u_gamma_scale);\n buff = (6.0 - halo_width / fontScale) / SDF_PX;\n }\n\n lowp float dist = texture2D(u_texture, tex).a;\n highp float gamma_scaled = gamma * gamma_scale;\n highp float alpha = smoothstep(buff - gamma_scaled, buff + gamma_scaled, dist);\n\n gl_FragColor = color * (alpha * opacity * fade_opacity);\n\n#ifdef OVERDRAW_INSPECTOR\n gl_FragColor = vec4(1.0);\n#endif\n}\n",vertexSource:"const float PI = 3.141592653589793;\n\nattribute vec4 a_pos_offset;\nattribute vec4 a_data;\nattribute vec3 a_projected_pos;\nattribute float a_fade_opacity;\n\n// contents of a_size vary based on the type of property value\n// used for {text,icon}-size.\n// For constants, a_size is disabled.\n// For source functions, we bind only one value per vertex: the value of {text,icon}-size evaluated for the current feature.\n// For composite functions:\n// [ text-size(lowerZoomStop, feature),\n// text-size(upperZoomStop, feature) ]\nuniform bool u_is_size_zoom_constant;\nuniform bool u_is_size_feature_constant;\nuniform highp float u_size_t; // used to interpolate between zoom stops when size is a composite function\nuniform highp float u_size; // used when size is both zoom and feature constant\n\n#pragma mapbox: define highp vec4 fill_color\n#pragma mapbox: define highp vec4 halo_color\n#pragma mapbox: define lowp float opacity\n#pragma mapbox: define lowp float halo_width\n#pragma mapbox: define lowp float halo_blur\n\nuniform mat4 u_matrix;\nuniform mat4 u_label_plane_matrix;\nuniform mat4 u_gl_coord_matrix;\n\nuniform bool u_is_text;\nuniform bool u_pitch_with_map;\nuniform highp float u_pitch;\nuniform bool u_rotate_symbol;\nuniform highp float u_aspect_ratio;\nuniform highp float u_camera_to_center_distance;\nuniform float u_fade_change;\n\nuniform vec2 u_texsize;\n\nvarying vec2 v_data0;\nvarying vec3 v_data1;\n\nvoid main() {\n #pragma mapbox: initialize highp vec4 fill_color\n #pragma mapbox: initialize highp vec4 halo_color\n #pragma mapbox: initialize lowp float opacity\n #pragma mapbox: initialize lowp float halo_width\n #pragma mapbox: initialize lowp float halo_blur\n\n vec2 a_pos = a_pos_offset.xy;\n vec2 a_offset = a_pos_offset.zw;\n\n vec2 a_tex = a_data.xy;\n vec2 a_size = a_data.zw;\n\n highp float segment_angle = -a_projected_pos[2];\n float size;\n\n if (!u_is_size_zoom_constant && !u_is_size_feature_constant) {\n size = mix(a_size[0], a_size[1], u_size_t) / 256.0;\n } else if (u_is_size_zoom_constant && !u_is_size_feature_constant) {\n size = a_size[0] / 256.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 = clamp(\n 0.5 + 0.5 * distance_ratio,\n 0.0, // Prevents oversized near-field symbols in pitched/overzoomed tiles\n 4.0);\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 / 32.0 * fontScale), 0.0, 1.0);\n float gamma_scale = gl_Position.w;\n\n vec2 tex = a_tex / u_texsize;\n vec2 fade_opacity = unpack_opacity(a_fade_opacity);\n float fade_change = fade_opacity[1] > 0.5 ? u_fade_change : -u_fade_change;\n float interpolated_fade_opacity = max(0.0, min(1.0, fade_opacity[0] + fade_change));\n\n v_data0 = vec2(tex.x, tex.y);\n v_data1 = vec3(gamma_scale, size, interpolated_fade_opacity);\n}\n"}},Ye=/#pragma mapbox: ([\w]+) ([\w]+) ([\w]+) ([\w]+)/g,Ze=function(t){var e=Xe[t],n={};e.fragmentSource=e.fragmentSource.replace(Ye,function(t,e,r,i,o){return n[o]=!0,"define"===e?"\n#ifndef HAS_UNIFORM_u_"+o+"\nvarying "+r+" "+i+" "+o+";\n#else\nuniform "+r+" "+i+" u_"+o+";\n#endif\n":"\n#ifdef HAS_UNIFORM_u_"+o+"\n "+r+" "+i+" "+o+" = u_"+o+";\n#endif\n"}),e.vertexSource=e.vertexSource.replace(Ye,function(t,e,r,i,o){var a="float"===i?"vec2":"vec4",s=o.match(/color/)?"color":a;return n[o]?"define"===e?"\n#ifndef HAS_UNIFORM_u_"+o+"\nuniform lowp float a_"+o+"_t;\nattribute "+r+" "+a+" a_"+o+";\nvarying "+r+" "+i+" "+o+";\n#else\nuniform "+r+" "+i+" u_"+o+";\n#endif\n":"vec4"===s?"\n#ifndef HAS_UNIFORM_u_"+o+"\n "+o+" = a_"+o+";\n#else\n "+r+" "+i+" "+o+" = u_"+o+";\n#endif\n":"\n#ifndef HAS_UNIFORM_u_"+o+"\n "+o+" = unpack_mix_"+s+"(a_"+o+", a_"+o+"_t);\n#else\n "+r+" "+i+" "+o+" = u_"+o+";\n#endif\n":"define"===e?"\n#ifndef HAS_UNIFORM_u_"+o+"\nuniform lowp float a_"+o+"_t;\nattribute "+r+" "+a+" a_"+o+";\n#else\nuniform "+r+" "+i+" u_"+o+";\n#endif\n":"vec4"===s?"\n#ifndef HAS_UNIFORM_u_"+o+"\n "+r+" "+i+" "+o+" = a_"+o+";\n#else\n "+r+" "+i+" "+o+" = u_"+o+";\n#endif\n":"\n#ifndef HAS_UNIFORM_u_"+o+"\n "+r+" "+i+" "+o+" = unpack_mix_"+s+"(a_"+o+", a_"+o+"_t);\n#else\n "+r+" "+i+" "+o+" = u_"+o+";\n#endif\n"})};for(var Je in Xe)Ze(Je);var $e=Xe,tn=function(){this.boundProgram=null,this.boundLayoutVertexBuffer=null,this.boundPaintVertexBuffers=[],this.boundIndexBuffer=null,this.boundVertexOffset=null,this.boundDynamicVertexBuffer=null,this.vao=null};tn.prototype.bind=function(t,e,n,r,i,o,a,s){this.context=t;for(var l=this.boundPaintVertexBuffers.length!==r.length,c=0;!l&&c>16,l>>16],u_pixel_coord_lower:[65535&s,65535&l]}}en.prototype.draw=function(t,e,n,r,i,o,a,s,l,c,u,p,A,h,f,d){var _,g=t.gl;for(var y in t.program.set(this.program),t.setDepthMode(n),t.setStencilMode(r),t.setColorMode(i),t.setCullFace(o),this.fixedUniforms)this.fixedUniforms[y].set(a[y]);h&&h.setUniforms(t,this.binderUniforms,p,{zoom:A});for(var m=(_={},_[g.LINES]=2,_[g.TRIANGLES]=3,_[g.LINE_STRIP]=1,_)[e],v=0,b=u.get();v0?1-1/(1.001-a):-a),u_contrast_factor:(o=i.paint.get("raster-contrast"),o>0?1/(1-o):1+o),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]}(i.paint.get("raster-hue-rotate"))};var o,a},Cn=function(t,e,n,r,i,o,a,s,l,c){var u=i.transform;return{u_is_size_zoom_constant:+("constant"===t||"source"===t),u_is_size_feature_constant:+("constant"===t||"camera"===t),u_size_t:e?e.uSizeT:0,u_size:e?e.uSize:0,u_camera_to_center_distance:u.cameraToCenterDistance,u_pitch:u.pitch/360*2*Math.PI,u_rotate_symbol:+n,u_aspect_ratio:u.width/u.height,u_fade_change:i.options.fadeDuration?i.symbolFadeChange:1,u_matrix:o,u_label_plane_matrix:a,u_gl_coord_matrix:s,u_is_text:+l,u_pitch_with_map:+r,u_texsize:c,u_texture:0}},Bn=function(e,n,r,i,o,a,s,l,c,u,p){var A=o.transform;return t.extend(Cn(e,n,r,i,o,a,s,l,c,u),{u_gamma_scale:i?Math.cos(A._pitch)*A.cameraToCenterDistance:1,u_is_halo:+p})},On=function(t,e,n){return{u_matrix:t,u_opacity:e,u_color:n}},kn=function(e,n,r,i,o,a){return t.extend(function(t,e,n,r){var i=n.imageManager.getPattern(t.from),o=n.imageManager.getPattern(t.to),a=n.imageManager.getPixelSize(),s=a.width,l=a.height,c=Math.pow(2,r.tileID.overscaledZ),u=r.tileSize*Math.pow(2,n.transform.tileZoom)/c,p=u*(r.tileID.canonical.x+r.tileID.wrap*c),A=u*r.tileID.canonical.y;return{u_image:0,u_pattern_tl_a:i.tl,u_pattern_br_a:i.br,u_pattern_tl_b:o.tl,u_pattern_br_b:o.br,u_texsize:[s,l],u_mix:e.t,u_pattern_size_a:i.displaySize,u_pattern_size_b:o.displaySize,u_scale_a:e.fromScale,u_scale_b:e.toScale,u_tile_units_to_pixels:1/we(r,1,n.transform.tileZoom),u_pixel_coord_upper:[p>>16,A>>16],u_pixel_coord_lower:[65535&p,65535&A]}}(i,a,r,o),{u_matrix:e,u_opacity:n})},Pn={fillExtrusion:function(e,n){return{u_matrix:new t.UniformMatrix4f(e,n.u_matrix),u_lightpos:new t.Uniform3f(e,n.u_lightpos),u_lightintensity:new t.Uniform1f(e,n.u_lightintensity),u_lightcolor:new t.Uniform3f(e,n.u_lightcolor),u_vertical_gradient:new t.Uniform1f(e,n.u_vertical_gradient)}},fillExtrusionPattern:function(e,n){return{u_matrix:new t.UniformMatrix4f(e,n.u_matrix),u_lightpos:new t.Uniform3f(e,n.u_lightpos),u_lightintensity:new t.Uniform1f(e,n.u_lightintensity),u_lightcolor:new t.Uniform3f(e,n.u_lightcolor),u_vertical_gradient:new t.Uniform1f(e,n.u_vertical_gradient),u_height_factor:new t.Uniform1f(e,n.u_height_factor),u_image:new t.Uniform1i(e,n.u_image),u_texsize:new t.Uniform2f(e,n.u_texsize),u_pixel_coord_upper:new t.Uniform2f(e,n.u_pixel_coord_upper),u_pixel_coord_lower:new t.Uniform2f(e,n.u_pixel_coord_lower),u_scale:new t.Uniform4f(e,n.u_scale),u_fade:new t.Uniform1f(e,n.u_fade)}},extrusionTexture:function(e,n){return{u_matrix:new t.UniformMatrix4f(e,n.u_matrix),u_world:new t.Uniform2f(e,n.u_world),u_image:new t.Uniform1i(e,n.u_image),u_opacity:new t.Uniform1f(e,n.u_opacity)}},fill:function(e,n){return{u_matrix:new t.UniformMatrix4f(e,n.u_matrix)}},fillPattern:function(e,n){return{u_matrix:new t.UniformMatrix4f(e,n.u_matrix),u_image:new t.Uniform1i(e,n.u_image),u_texsize:new t.Uniform2f(e,n.u_texsize),u_pixel_coord_upper:new t.Uniform2f(e,n.u_pixel_coord_upper),u_pixel_coord_lower:new t.Uniform2f(e,n.u_pixel_coord_lower),u_scale:new t.Uniform4f(e,n.u_scale),u_fade:new t.Uniform1f(e,n.u_fade)}},fillOutline:function(e,n){return{u_matrix:new t.UniformMatrix4f(e,n.u_matrix),u_world:new t.Uniform2f(e,n.u_world)}},fillOutlinePattern:function(e,n){return{u_matrix:new t.UniformMatrix4f(e,n.u_matrix),u_world:new t.Uniform2f(e,n.u_world),u_image:new t.Uniform1i(e,n.u_image),u_texsize:new t.Uniform2f(e,n.u_texsize),u_pixel_coord_upper:new t.Uniform2f(e,n.u_pixel_coord_upper),u_pixel_coord_lower:new t.Uniform2f(e,n.u_pixel_coord_lower),u_scale:new t.Uniform4f(e,n.u_scale),u_fade:new t.Uniform1f(e,n.u_fade)}},circle:function(e,n){return{u_camera_to_center_distance:new t.Uniform1f(e,n.u_camera_to_center_distance),u_scale_with_map:new t.Uniform1i(e,n.u_scale_with_map),u_pitch_with_map:new t.Uniform1i(e,n.u_pitch_with_map),u_extrude_scale:new t.Uniform2f(e,n.u_extrude_scale),u_matrix:new t.UniformMatrix4f(e,n.u_matrix)}},collisionBox:An,collisionCircle:An,debug:function(e,n){return{u_color:new t.UniformColor(e,n.u_color),u_matrix:new t.UniformMatrix4f(e,n.u_matrix)}},clippingMask:function(e,n){return{u_matrix:new t.UniformMatrix4f(e,n.u_matrix)}},heatmap:function(e,n){return{u_extrude_scale:new t.Uniform1f(e,n.u_extrude_scale),u_intensity:new t.Uniform1f(e,n.u_intensity),u_matrix:new t.UniformMatrix4f(e,n.u_matrix)}},heatmapTexture:function(e,n){return{u_matrix:new t.UniformMatrix4f(e,n.u_matrix),u_world:new t.Uniform2f(e,n.u_world),u_image:new t.Uniform1i(e,n.u_image),u_color_ramp:new t.Uniform1i(e,n.u_color_ramp),u_opacity:new t.Uniform1f(e,n.u_opacity)}},hillshade:function(e,n){return{u_matrix:new t.UniformMatrix4f(e,n.u_matrix),u_image:new t.Uniform1i(e,n.u_image),u_latrange:new t.Uniform2f(e,n.u_latrange),u_light:new t.Uniform2f(e,n.u_light),u_shadow:new t.UniformColor(e,n.u_shadow),u_highlight:new t.UniformColor(e,n.u_highlight),u_accent:new t.UniformColor(e,n.u_accent)}},hillshadePrepare:function(e,n){return{u_matrix:new t.UniformMatrix4f(e,n.u_matrix),u_image:new t.Uniform1i(e,n.u_image),u_dimension:new t.Uniform2f(e,n.u_dimension),u_zoom:new t.Uniform1f(e,n.u_zoom),u_maxzoom:new t.Uniform1f(e,n.u_maxzoom)}},line:function(e,n){return{u_matrix:new t.UniformMatrix4f(e,n.u_matrix),u_ratio:new t.Uniform1f(e,n.u_ratio),u_gl_units_to_pixels:new t.Uniform2f(e,n.u_gl_units_to_pixels)}},lineGradient:function(e,n){return{u_matrix:new t.UniformMatrix4f(e,n.u_matrix),u_ratio:new t.Uniform1f(e,n.u_ratio),u_gl_units_to_pixels:new t.Uniform2f(e,n.u_gl_units_to_pixels),u_image:new t.Uniform1i(e,n.u_image)}},linePattern:function(e,n){return{u_matrix:new t.UniformMatrix4f(e,n.u_matrix),u_texsize:new t.Uniform2f(e,n.u_texsize),u_ratio:new t.Uniform1f(e,n.u_ratio),u_image:new t.Uniform1i(e,n.u_image),u_gl_units_to_pixels:new t.Uniform2f(e,n.u_gl_units_to_pixels),u_scale:new t.Uniform4f(e,n.u_scale),u_fade:new t.Uniform1f(e,n.u_fade)}},lineSDF:function(e,n){return{u_matrix:new t.UniformMatrix4f(e,n.u_matrix),u_ratio:new t.Uniform1f(e,n.u_ratio),u_gl_units_to_pixels:new t.Uniform2f(e,n.u_gl_units_to_pixels),u_patternscale_a:new t.Uniform2f(e,n.u_patternscale_a),u_patternscale_b:new t.Uniform2f(e,n.u_patternscale_b),u_sdfgamma:new t.Uniform1f(e,n.u_sdfgamma),u_image:new t.Uniform1i(e,n.u_image),u_tex_y_a:new t.Uniform1f(e,n.u_tex_y_a),u_tex_y_b:new t.Uniform1f(e,n.u_tex_y_b),u_mix:new t.Uniform1f(e,n.u_mix)}},raster:function(e,n){return{u_matrix:new t.UniformMatrix4f(e,n.u_matrix),u_tl_parent:new t.Uniform2f(e,n.u_tl_parent),u_scale_parent:new t.Uniform1f(e,n.u_scale_parent),u_buffer_scale:new t.Uniform1f(e,n.u_buffer_scale),u_fade_t:new t.Uniform1f(e,n.u_fade_t),u_opacity:new t.Uniform1f(e,n.u_opacity),u_image0:new t.Uniform1i(e,n.u_image0),u_image1:new t.Uniform1i(e,n.u_image1),u_brightness_low:new t.Uniform1f(e,n.u_brightness_low),u_brightness_high:new t.Uniform1f(e,n.u_brightness_high),u_saturation_factor:new t.Uniform1f(e,n.u_saturation_factor),u_contrast_factor:new t.Uniform1f(e,n.u_contrast_factor),u_spin_weights:new t.Uniform3f(e,n.u_spin_weights)}},symbolIcon:function(e,n){return{u_is_size_zoom_constant:new t.Uniform1i(e,n.u_is_size_zoom_constant),u_is_size_feature_constant:new t.Uniform1i(e,n.u_is_size_feature_constant),u_size_t:new t.Uniform1f(e,n.u_size_t),u_size:new t.Uniform1f(e,n.u_size),u_camera_to_center_distance:new t.Uniform1f(e,n.u_camera_to_center_distance),u_pitch:new t.Uniform1f(e,n.u_pitch),u_rotate_symbol:new t.Uniform1i(e,n.u_rotate_symbol),u_aspect_ratio:new t.Uniform1f(e,n.u_aspect_ratio),u_fade_change:new t.Uniform1f(e,n.u_fade_change),u_matrix:new t.UniformMatrix4f(e,n.u_matrix),u_label_plane_matrix:new t.UniformMatrix4f(e,n.u_label_plane_matrix),u_gl_coord_matrix:new t.UniformMatrix4f(e,n.u_gl_coord_matrix),u_is_text:new t.Uniform1f(e,n.u_is_text),u_pitch_with_map:new t.Uniform1i(e,n.u_pitch_with_map),u_texsize:new t.Uniform2f(e,n.u_texsize),u_texture:new t.Uniform1i(e,n.u_texture)}},symbolSDF:function(e,n){return{u_is_size_zoom_constant:new t.Uniform1i(e,n.u_is_size_zoom_constant),u_is_size_feature_constant:new t.Uniform1i(e,n.u_is_size_feature_constant),u_size_t:new t.Uniform1f(e,n.u_size_t),u_size:new t.Uniform1f(e,n.u_size),u_camera_to_center_distance:new t.Uniform1f(e,n.u_camera_to_center_distance),u_pitch:new t.Uniform1f(e,n.u_pitch),u_rotate_symbol:new t.Uniform1i(e,n.u_rotate_symbol),u_aspect_ratio:new t.Uniform1f(e,n.u_aspect_ratio),u_fade_change:new t.Uniform1f(e,n.u_fade_change),u_matrix:new t.UniformMatrix4f(e,n.u_matrix),u_label_plane_matrix:new t.UniformMatrix4f(e,n.u_label_plane_matrix),u_gl_coord_matrix:new t.UniformMatrix4f(e,n.u_gl_coord_matrix),u_is_text:new t.Uniform1f(e,n.u_is_text),u_pitch_with_map:new t.Uniform1i(e,n.u_pitch_with_map),u_texsize:new t.Uniform2f(e,n.u_texsize),u_texture:new t.Uniform1i(e,n.u_texture),u_gamma_scale:new t.Uniform1f(e,n.u_gamma_scale),u_is_halo:new t.Uniform1f(e,n.u_is_halo)}},background:function(e,n){return{u_matrix:new t.UniformMatrix4f(e,n.u_matrix),u_opacity:new t.Uniform1f(e,n.u_opacity),u_color:new t.UniformColor(e,n.u_color)}},backgroundPattern:function(e,n){return{u_matrix:new t.UniformMatrix4f(e,n.u_matrix),u_opacity:new t.Uniform1f(e,n.u_opacity),u_image:new t.Uniform1i(e,n.u_image),u_pattern_tl_a:new t.Uniform2f(e,n.u_pattern_tl_a),u_pattern_br_a:new t.Uniform2f(e,n.u_pattern_br_a),u_pattern_tl_b:new t.Uniform2f(e,n.u_pattern_tl_b),u_pattern_br_b:new t.Uniform2f(e,n.u_pattern_br_b),u_texsize:new t.Uniform2f(e,n.u_texsize),u_mix:new t.Uniform1f(e,n.u_mix),u_pattern_size_a:new t.Uniform2f(e,n.u_pattern_size_a),u_pattern_size_b:new t.Uniform2f(e,n.u_pattern_size_b),u_scale_a:new t.Uniform1f(e,n.u_scale_a),u_scale_b:new t.Uniform1f(e,n.u_scale_b),u_pixel_coord_upper:new t.Uniform2f(e,n.u_pixel_coord_upper),u_pixel_coord_lower:new t.Uniform2f(e,n.u_pixel_coord_lower),u_tile_units_to_pixels:new t.Uniform1f(e,n.u_tile_units_to_pixels)}}};function In(e,n){for(var r=e.sort(function(t,e){return t.tileID.isLessThan(e.tileID)?-1:e.tileID.isLessThan(t.tileID)?1:0}),i=0;i0){var s=t.browser.now(),l=(s-e.timeAdded)/a,c=n?(s-n.timeAdded)/a:-1,u=r.getSource(),p=o.coveringZoomLevel({tileSize:u.tileSize,roundZoom:u.roundZoom}),A=!n||Math.abs(n.tileID.overscaledZ-p)>Math.abs(e.tileID.overscaledZ-p),h=A&&e.refreshedUponExpiration?1:t.clamp(A?l:1-c,0,1);return e.refreshedUponExpiration&&l>=1&&(e.refreshedUponExpiration=!1),n?{opacity:1,mix:1-h}:{opacity:h,mix:0}}return{opacity:1,mix:0}}function Hn(e,n,r){var i=e.context,o=i.gl,a=r.posMatrix,s=e.useProgram("debug"),l=Rt.disabled,c=jt.disabled,u=e.colorModeForRenderPass(),p="$debug";s.draw(i,o.LINE_STRIP,l,c,u,Ft.disabled,fn(a,t.Color.red),p,e.debugBuffer,e.tileBorderIndexBuffer,e.debugSegments);for(var A=function(t,e,n,r){r=r||1;var i,o,a,s,l,c,u,p,A=[];for(i=0,o=t.length;i":[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]]},Nn={symbol:function(t,e,n,r){if("translucent"===t.renderPass){var i=jt.disabled,o=t.colorModeForRenderPass();0!==n.paint.get("icon-opacity").constantOr(1)&&zn(t,e,n,r,!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"),i,o),0!==n.paint.get("text-opacity").constantOr(1)&&zn(t,e,n,r,!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"),i,o),e.map.showCollisionBoxes&&function(t,e,n,r){Dn(t,e,n,r,!1),Dn(t,e,n,r,!0)}(t,e,n,r)}},circle:function(t,e,n,r){if("translucent"===t.renderPass){var i=n.paint.get("circle-opacity"),o=n.paint.get("circle-stroke-width"),a=n.paint.get("circle-stroke-opacity");if(0!==i.constantOr(1)||0!==o.constantOr(1)&&0!==a.constantOr(1))for(var s=t.context,l=s.gl,c=t.depthModeForSublayer(0,Rt.ReadOnly),u=jt.disabled,p=t.colorModeForRenderPass(),A=0;Ae.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 Xn(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.dx0,p=e.dx<0,A=o;Al.dy&&(a=s,s=l,l=a),s.dy>c.dy&&(a=s,s=c,c=a),l.dy>c.dy&&(a=l,l=c,c=a),s.dy&&Xn(c,s,r,i,o),l.dy&&Xn(c,l,r,i,o)}Gn.prototype.resize=function(e,n){var r=this.context.gl;if(this.width=e*t.browser.devicePixelRatio,this.height=n*t.browser.devicePixelRatio,this.context.viewport.set([0,0,this.width,this.height]),this.style)for(var i=0,o=this.style._order;i=0;this.currentLayer--){var M=this.style._layers[r[this.currentLayer]],C=i[M.source],B=l[M.source];M.source!==s&&C&&(this.clearStencil(),C.getSource().isTileClipped&&this._renderTileClippingMasks(B)),this.renderLayer(this,C,M,B),s=M.source}for(this.renderPass="translucent",this.currentLayer=0,s=null;this.currentLayer0?e.pop():null},Gn.prototype.isPatternMissing=function(t){if(!t)return!1;var e=this.imageManager.getPattern(t.from),n=this.imageManager.getPattern(t.to);return!e||!n},Gn.prototype.useProgram=function(t,e){void 0===e&&(e=this.emptyProgramConfiguration),this.cache=this.cache||{};var n=""+t+(e.cacheKey||"")+(this._showOverdrawInspector?"/overdraw":"");return this.cache[n]||(this.cache[n]=new en(this.context,$e[t],e,Pn[t],this._showOverdrawInspector)),this.cache[n]},Gn.prototype.setCustomLayerDefaults=function(){this.context.unbindVAO(),this.context.cullFace.setDefault(),this.context.activeTexture.setDefault(),this.context.pixelStoreUnpack.setDefault(),this.context.pixelStoreUnpackPremultiplyAlpha.setDefault(),this.context.pixelStoreUnpackFlipY.setDefault()},Gn.prototype.setBaseState=function(){var t=this.context.gl;this.context.cullFace.set(!1),this.context.viewport.set([0,0,this.width,this.height]),this.context.blendEquation.set(t.FUNC_ADD)};var Zn=function(t,e,n){this.tileSize=512,this.maxValidLatitude=85.051129,this._renderWorldCopies=void 0===n||n,this._minZoom=t||0,this._maxZoom=e||22,this.setMaxBounds(),this.width=0,this.height=0,this._center=new j(0,0),this.zoom=0,this.angle=0,this._fov=.6435011087932844,this._pitch=0,this._unmodified=!0,this._posMatrixCache={},this._alignedPosMatrixCache={}},Jn={minZoom:{configurable:!0},maxZoom:{configurable:!0},renderWorldCopies:{configurable:!0},worldSize:{configurable:!0},centerPoint:{configurable:!0},size:{configurable:!0},bearing:{configurable:!0},pitch:{configurable:!0},fov:{configurable:!0},zoom:{configurable:!0},center:{configurable:!0},unmodified:{configurable:!0},x:{configurable:!0},y:{configurable:!0},point:{configurable:!0}};Zn.prototype.clone=function(){var t=new Zn(this._minZoom,this._maxZoom,this._renderWorldCopies);return t.tileSize=this.tileSize,t.latRange=this.latRange,t.width=this.width,t.height=this.height,t._center=this._center,t.zoom=this.zoom,t.angle=this.angle,t._fov=this._fov,t._pitch=this._pitch,t._unmodified=this._unmodified,t._calcMatrices(),t},Jn.minZoom.get=function(){return this._minZoom},Jn.minZoom.set=function(t){this._minZoom!==t&&(this._minZoom=t,this.zoom=Math.max(this.zoom,t))},Jn.maxZoom.get=function(){return this._maxZoom},Jn.maxZoom.set=function(t){this._maxZoom!==t&&(this._maxZoom=t,this.zoom=Math.min(this.zoom,t))},Jn.renderWorldCopies.get=function(){return this._renderWorldCopies},Jn.renderWorldCopies.set=function(t){void 0===t?t=!0:null===t&&(t=!1),this._renderWorldCopies=t},Jn.worldSize.get=function(){return this.tileSize*this.scale},Jn.centerPoint.get=function(){return this.size._div(2)},Jn.size.get=function(){return new t.Point(this.width,this.height)},Jn.bearing.get=function(){return-this.angle/Math.PI*180},Jn.bearing.set=function(e){var n=-t.wrap(e,-180,180)*Math.PI/180;this.angle!==n&&(this._unmodified=!1,this.angle=n,this._calcMatrices(),this.rotationMatrix=t.create$4(),t.rotate(this.rotationMatrix,this.rotationMatrix,this.angle))},Jn.pitch.get=function(){return this._pitch/Math.PI*180},Jn.pitch.set=function(e){var n=t.clamp(e,0,60)/180*Math.PI;this._pitch!==n&&(this._unmodified=!1,this._pitch=n,this._calcMatrices())},Jn.fov.get=function(){return this._fov/Math.PI*180},Jn.fov.set=function(t){t=Math.max(.01,Math.min(60,t)),this._fov!==t&&(this._unmodified=!1,this._fov=t/180*Math.PI,this._calcMatrices())},Jn.zoom.get=function(){return this._zoom},Jn.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())},Jn.center.get=function(){return this._center},Jn.center.set=function(t){t.lat===this._center.lat&&t.lng===this._center.lng||(this._unmodified=!1,this._center=t,this._constrain(),this._calcMatrices())},Zn.prototype.coveringZoomLevel=function(t){return(t.roundZoom?Math.round:Math.floor)(this.zoom+this.scaleZoom(this.tileSize/t.tileSize))},Zn.prototype.getVisibleUnwrappedCoordinates=function(e){var n=[new t.UnwrappedTileID(0,e)];if(this._renderWorldCopies)for(var r=this.pointCoordinate(new t.Point(0,0),0),i=this.pointCoordinate(new t.Point(this.width,0),0),o=this.pointCoordinate(new t.Point(this.width,this.height),0),a=this.pointCoordinate(new t.Point(0,this.height),0),s=Math.floor(Math.min(r.column,i.column,o.column,a.column)),l=Math.floor(Math.max(r.column,i.column,o.column,a.column)),c=s-1;c<=l+1;c++)0!==c&&n.push(new t.UnwrappedTileID(c,e));return n},Zn.prototype.coveringTiles=function(e){var n=this.coveringZoomLevel(e),r=n;if(void 0!==e.minzoom&&ne.maxzoom&&(n=e.maxzoom);var i=this.pointCoordinate(this.centerPoint,n),o=new t.Point(i.column-.5,i.row-.5);return function(e,n,r,i){void 0===i&&(i=!0);var o=1<=0&&l<=o)for(c=n;ca&&(i=a-d)}if(this.lngRange){var _=this.x,g=c.x/2;_-gl&&(r=l-g)}void 0===r&&void 0===i||(this.center=this.unproject(new t.Point(void 0!==r?r:this.x,void 0!==i?i:this.y))),this._unmodified=u,this._constraining=!1}},Zn.prototype._calcMatrices=function(){if(this.height){this.cameraToCenterDistance=.5/Math.tan(this._fov/2)*this.height;var e=this._fov/2,n=Math.PI/2+this._pitch,r=Math.sin(e)*this.cameraToCenterDistance/Math.sin(Math.PI-n-e),i=this.x,o=this.y,a=1.01*(Math.cos(Math.PI/2-this._pitch)*r+this.cameraToCenterDistance),s=new Float64Array(16);t.perspective(s,this._fov,this.width/this.height,1,a),t.scale(s,s,[1,-1,1]),t.translate(s,s,[0,0,-this.cameraToCenterDistance]),t.rotateX(s,s,this._pitch),t.rotateZ(s,s,this.angle),t.translate(s,s,[-i,-o,0]),this.mercatorMatrix=t.scale([],s,[this.worldSize,this.worldSize,this.worldSize]);var l=this.worldSize/(2*Math.PI*6378137*Math.abs(Math.cos(this.center.lat*(Math.PI/180))));t.scale(s,s,[1,1,l,1]),this.projMatrix=s;var c=this.width%2/2,u=this.height%2/2,p=Math.cos(this.angle),A=Math.sin(this.angle),h=i-Math.round(i)+p*c+A*u,f=o-Math.round(o)+p*u+A*c,d=new Float64Array(s);if(t.translate(d,d,[h>.5?h-1:h,f>.5?f-1:f,0]),this.alignedProjMatrix=d,s=t.create(),t.scale(s,s,[this.width/2,-this.height/2,1]),t.translate(s,s,[1,-1,0]),this.pixelMatrix=t.multiply(new Float64Array(16),s,this.projMatrix),!(s=t.invert(new Float64Array(16),this.pixelMatrix)))throw new Error("failed to invert matrix");this.pixelMatrixInverse=s,this._posMatrixCache={},this._alignedPosMatrixCache={}}},Zn.prototype.maxPitchScaleFactor=function(){if(!this.pixelMatrixInverse)return 1;var e=this.pointCoordinate(new t.Point(0,0)).zoomTo(this.zoom),n=[e.column*this.tileSize,e.row*this.tileSize,0,1];return t.transformMat4(n,n,this.pixelMatrix)[3]/this.cameraToCenterDistance},Object.defineProperties(Zn.prototype,Jn);var $n=function(){var e,n,r,i;t.bindAll(["_onHashChange","_updateHash"],this),this._updateHash=(e=this._updateHashUnthrottled.bind(this),300,n=!1,r=0,i=function(){r=0,n&&(e(),r=setTimeout(i,300),n=!1)},function(){return n=!0,r||i(),r})};$n.prototype.addTo=function(e){return this._map=e,t.window.addEventListener("hashchange",this._onHashChange,!1),this._map.on("moveend",this._updateHash),this},$n.prototype.remove=function(){return t.window.removeEventListener("hashchange",this._onHashChange,!1),this._map.off("moveend",this._updateHash),clearTimeout(this._updateHash()),delete this._map,this},$n.prototype.getHashString=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(),l=this._map.getPitch(),c="";return c+=t?"#/"+o+"/"+a+"/"+n:"#"+n+"/"+a+"/"+o,(s||l)&&(c+="/"+Math.round(10*s)/10),l&&(c+="/"+Math.round(l)),c},$n.prototype._onHashChange=function(){var e=t.window.location.hash.replace("#","").split("/");return e.length>=3&&(this._map.jumpTo({center:[+e[2],+e[1]],zoom:+e[0],bearing:+(e[3]||0),pitch:+(e[4]||0)}),!0)},$n.prototype._updateHashUnthrottled=function(){var e=this.getHashString();t.window.history.replaceState(t.window.history.state,"",e)};var tr=function(e){function r(r,i,o,a){void 0===a&&(a={});var s=n.mousePos(i.getCanvasContainer(),o),l=i.unproject(s);e.call(this,r,t.extend({point:s,lngLat:l,originalEvent:o},a)),this._defaultPrevented=!1,this.target=i}e&&(r.__proto__=e),r.prototype=Object.create(e&&e.prototype),r.prototype.constructor=r;var i={defaultPrevented:{configurable:!0}};return r.prototype.preventDefault=function(){this._defaultPrevented=!0},i.defaultPrevented.get=function(){return this._defaultPrevented},Object.defineProperties(r.prototype,i),r}(t.Event),er=function(e){function r(r,i,o){var a=n.touchPos(i.getCanvasContainer(),o),s=a.map(function(t){return i.unproject(t)}),l=a.reduce(function(t,e,n,r){return t.add(e.div(r.length))},new t.Point(0,0)),c=i.unproject(l);e.call(this,r,{points:a,point:l,lngLats:s,lngLat:c,originalEvent:o}),this._defaultPrevented=!1}e&&(r.__proto__=e),r.prototype=Object.create(e&&e.prototype),r.prototype.constructor=r;var i={defaultPrevented:{configurable:!0}};return r.prototype.preventDefault=function(){this._defaultPrevented=!0},i.defaultPrevented.get=function(){return this._defaultPrevented},Object.defineProperties(r.prototype,i),r}(t.Event),nr=function(t){function e(e,n,r){t.call(this,e,{originalEvent:r}),this._defaultPrevented=!1}t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e;var n={defaultPrevented:{configurable:!0}};return e.prototype.preventDefault=function(){this._defaultPrevented=!0},n.defaultPrevented.get=function(){return this._defaultPrevented},Object.defineProperties(e.prototype,n),e}(t.Event),rr=function(e){this._map=e,this._el=e.getCanvasContainer(),this._delta=0,t.bindAll(["_onWheel","_onTimeout","_onScrollFrame","_onScrollFinished"],this)};rr.prototype.isEnabled=function(){return!!this._enabled},rr.prototype.isActive=function(){return!!this._active},rr.prototype.enable=function(t){this.isEnabled()||(this._enabled=!0,this._aroundCenter=t&&"center"===t.around)},rr.prototype.disable=function(){this.isEnabled()&&(this._enabled=!1)},rr.prototype.onWheel=function(e){if(this.isEnabled()){var n=e.deltaMode===t.window.WheelEvent.DOM_DELTA_LINE?40*e.deltaY:e.deltaY,r=t.browser.now(),i=r-(this._lastWheelEventTime||0);this._lastWheelEventTime=r,0!==n&&n%4.000244140625==0?this._type="wheel":0!==n&&Math.abs(n)<4?this._type="trackpad":i>400?(this._type=null,this._lastValue=n,this._timeout=setTimeout(this._onTimeout,40,e)):this._type||(this._type=Math.abs(i*n)<200?"trackpad":"wheel",this._timeout&&(clearTimeout(this._timeout),this._timeout=null,n+=this._lastValue)),e.shiftKey&&n&&(n/=4),this._type&&(this._lastWheelEvent=e,this._delta-=n,this.isActive()||this._start(e)),e.preventDefault()}},rr.prototype._onTimeout=function(t){this._type="wheel",this._delta-=this._lastValue,this.isActive()||this._start(t)},rr.prototype._start=function(e){if(this._delta){this._frameId&&(this._map._cancelRenderFrame(this._frameId),this._frameId=null),this._active=!0,this._map.fire(new t.Event("movestart",{originalEvent:e})),this._map.fire(new t.Event("zoomstart",{originalEvent:e})),this._finishTimeout&&clearTimeout(this._finishTimeout);var r=n.mousePos(this._el,e);this._around=j.convert(this._aroundCenter?this._map.getCenter():this._map.unproject(r)),this._aroundPoint=this._map.transform.locationPoint(this._around),this._frameId||(this._frameId=this._map._requestRenderFrame(this._onScrollFrame))}},rr.prototype._onScrollFrame=function(){var e=this;if(this._frameId=null,this.isActive()){var n=this._map.transform;if(0!==this._delta){var r="wheel"===this._type&&Math.abs(this._delta)>4.000244140625?1/450:.01,i=2/(1+Math.exp(-Math.abs(this._delta*r)));this._delta<0&&0!==i&&(i=1/i);var o="number"==typeof this._targetZoom?n.zoomScale(this._targetZoom):n.scale;this._targetZoom=Math.min(n.maxZoom,Math.max(n.minZoom,n.scaleZoom(o*i))),"wheel"===this._type&&(this._startZoom=n.zoom,this._easing=this._smoothOutEasing(200)),this._delta=0}var a="number"==typeof this._targetZoom?this._targetZoom:n.zoom,s=this._startZoom,l=this._easing,c=!1;if("wheel"===this._type&&s&&l){var u=Math.min((t.browser.now()-this._lastWheelEventTime)/200,1),p=l(u);n.zoom=t.number(s,a,p),u<1?this._frameId||(this._frameId=this._map._requestRenderFrame(this._onScrollFrame)):c=!0}else n.zoom=a,c=!0;n.setLocationAtPoint(this._around,this._aroundPoint),this._map.fire(new t.Event("move",{originalEvent:this._lastWheelEvent})),this._map.fire(new t.Event("zoom",{originalEvent:this._lastWheelEvent})),c&&(this._active=!1,this._finishTimeout=setTimeout(function(){e._map.fire(new t.Event("zoomend",{originalEvent:e._lastWheelEvent})),e._map.fire(new t.Event("moveend",{originalEvent:e._lastWheelEvent})),delete e._targetZoom},200))}},rr.prototype._smoothOutEasing=function(e){var n=t.ease;if(this._prevEase){var r=this._prevEase,i=(t.browser.now()-r.start)/r.duration,o=r.easing(i+.01)-r.easing(i),a=.27/Math.sqrt(o*o+1e-4)*.01,s=Math.sqrt(.0729-a*a);n=t.bezier(a,s,.25,1)}return this._prevEase={start:t.browser.now(),duration:e,easing:n},n};var ir=function(e,n){this._map=e,this._el=e.getCanvasContainer(),this._container=e.getContainer(),this._clickTolerance=n.clickTolerance||1,t.bindAll(["_onMouseMove","_onMouseUp","_onKeyDown"],this)};ir.prototype.isEnabled=function(){return!!this._enabled},ir.prototype.isActive=function(){return!!this._active},ir.prototype.enable=function(){this.isEnabled()||(this._enabled=!0)},ir.prototype.disable=function(){this.isEnabled()&&(this._enabled=!1)},ir.prototype.onMouseDown=function(e){this.isEnabled()&&e.shiftKey&&0===e.button&&(t.window.document.addEventListener("mousemove",this._onMouseMove,!1),t.window.document.addEventListener("keydown",this._onKeyDown,!1),t.window.document.addEventListener("mouseup",this._onMouseUp,!1),n.disableDrag(),this._startPos=this._lastPos=n.mousePos(this._el,e),this._active=!0)},ir.prototype._onMouseMove=function(t){var e=n.mousePos(this._el,t);if(!(this._lastPos.equals(e)||!this._box&&e.dist(this._startPos)180&&(h=180);var f=h/180;c+=p*h*(f/2),Math.abs(n._normalizeBearing(c,0))0&&n-e[0][0]>160;)e.shift()};var sr=t.bezier(0,0,.3,1),lr=function(e,n){this._map=e,this._el=e.getCanvasContainer(),this._state="disabled",this._clickTolerance=n.clickTolerance||1,t.bindAll(["_onMove","_onMouseUp","_onTouchEnd","_onBlur","_onDragFrame"],this)};lr.prototype.isEnabled=function(){return"disabled"!==this._state},lr.prototype.isActive=function(){return"active"===this._state},lr.prototype.enable=function(){this.isEnabled()||(this._el.classList.add("mapboxgl-touch-drag-pan"),this._state="enabled")},lr.prototype.disable=function(){if(this.isEnabled())switch(this._el.classList.remove("mapboxgl-touch-drag-pan"),this._state){case"active":this._state="disabled",this._unbind(),this._deactivate(),this._fireEvent("dragend"),this._fireEvent("moveend");break;case"pending":this._state="disabled",this._unbind();break;default:this._state="disabled"}},lr.prototype.onMouseDown=function(e){"enabled"===this._state&&(e.ctrlKey||0!==n.mouseButton(e)||(n.addEventListener(t.window.document,"mousemove",this._onMove,{capture:!0}),n.addEventListener(t.window.document,"mouseup",this._onMouseUp),this._start(e)))},lr.prototype.onTouchStart=function(e){"enabled"===this._state&&(e.touches.length>1||(n.addEventListener(t.window.document,"touchmove",this._onMove,{capture:!0,passive:!1}),n.addEventListener(t.window.document,"touchend",this._onTouchEnd),this._start(e)))},lr.prototype._start=function(e){t.window.addEventListener("blur",this._onBlur),this._state="pending",this._startPos=this._mouseDownPos=this._lastPos=n.mousePos(this._el,e),this._inertia=[[t.browser.now(),this._startPos]]},lr.prototype._onMove=function(e){e.preventDefault();var r=n.mousePos(this._el,e);this._lastPos.equals(r)||"pending"===this._state&&r.dist(this._mouseDownPos)1400&&(s=1400,a._unit()._mult(s));var l=s/750,c=a.mult(-l/2);this._map.panBy(c,{duration:1e3*l,easing:sr,noMoveStart:!0},{originalEvent:t})}}},lr.prototype._fireEvent=function(e,n){return this._map.fire(new t.Event(e,n?{originalEvent:n}:{}))},lr.prototype._drainInertiaBuffer=function(){for(var e=this._inertia,n=t.browser.now();e.length>0&&n-e[0][0]>160;)e.shift()};var cr=function(e){this._map=e,this._el=e.getCanvasContainer(),t.bindAll(["_onKeyDown"],this)};function ur(t){return t*(2-t)}cr.prototype.isEnabled=function(){return!!this._enabled},cr.prototype.enable=function(){this.isEnabled()||(this._el.addEventListener("keydown",this._onKeyDown,!1),this._enabled=!0)},cr.prototype.disable=function(){this.isEnabled()&&(this._el.removeEventListener("keydown",this._onKeyDown),this._enabled=!1)},cr.prototype._onKeyDown=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 a=this._map,s=a.getZoom(),l={duration:300,delayEndEvents:500,easing:ur,zoom:e?Math.round(s)+e*(t.shiftKey?2:1):s,bearing:a.getBearing()+15*n,pitch:a.getPitch()+10*r,offset:[100*-i,100*-o],center:a.getCenter()};a.easeTo(l,{originalEvent:t})}};var pr=function(e){this._map=e,t.bindAll(["_onDblClick","_onZoomEnd"],this)};pr.prototype.isEnabled=function(){return!!this._enabled},pr.prototype.isActive=function(){return!!this._active},pr.prototype.enable=function(){this.isEnabled()||(this._enabled=!0)},pr.prototype.disable=function(){this.isEnabled()&&(this._enabled=!1)},pr.prototype.onTouchStart=function(t){var e=this;this.isEnabled()&&(t.points.length>1||(this._tapped?(clearTimeout(this._tapped),this._tapped=null,this._zoom(t)):this._tapped=setTimeout(function(){e._tapped=null},300)))},pr.prototype.onDblClick=function(t){this.isEnabled()&&(t.originalEvent.preventDefault(),this._zoom(t))},pr.prototype._zoom=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)},pr.prototype._onZoomEnd=function(){this._active=!1,this._map.off("zoomend",this._onZoomEnd)};var Ar=t.bezier(0,0,.15,1),hr=function(e){this._map=e,this._el=e.getCanvasContainer(),t.bindAll(["_onMove","_onEnd","_onTouchFrame"],this)};hr.prototype.isEnabled=function(){return!!this._enabled},hr.prototype.enable=function(t){this.isEnabled()||(this._el.classList.add("mapboxgl-touch-zoom-rotate"),this._enabled=!0,this._aroundCenter=!!t&&"center"===t.around)},hr.prototype.disable=function(){this.isEnabled()&&(this._el.classList.remove("mapboxgl-touch-zoom-rotate"),this._enabled=!1)},hr.prototype.disableRotation=function(){this._rotationDisabled=!0},hr.prototype.enableRotation=function(){this._rotationDisabled=!1},hr.prototype.onStart=function(e){if(this.isEnabled()&&2===e.touches.length){var r=n.mousePos(this._el,e.touches[0]),i=n.mousePos(this._el,e.touches[1]),o=r.add(i).div(2);this._startVec=r.sub(i),this._startAround=this._map.transform.pointLocation(o),this._gestureIntent=void 0,this._inertia=[],n.addEventListener(t.window.document,"touchmove",this._onMove,{passive:!1}),n.addEventListener(t.window.document,"touchend",this._onEnd)}},hr.prototype._getTouchEventData=function(t){var e=n.mousePos(this._el,t.touches[0]),r=n.mousePos(this._el,t.touches[1]),i=e.sub(r);return{vec:i,center:e.add(r).div(2),scale:i.mag()/this._startVec.mag(),bearing:this._rotationDisabled?0:180*i.angleWith(this._startVec)/Math.PI}},hr.prototype._onMove=function(e){if(2===e.touches.length){var n=this._getTouchEventData(e),r=n.vec,i=n.scale,o=n.bearing;if(!this._gestureIntent){var a=Math.abs(1-i)>.15;Math.abs(o)>10?this._gestureIntent="rotate":a&&(this._gestureIntent="zoom"),this._gestureIntent&&(this._map.fire(new t.Event(this._gestureIntent+"start",{originalEvent:e})),this._map.fire(new t.Event("movestart",{originalEvent:e})),this._startVec=r)}this._lastTouchEvent=e,this._frameId||(this._frameId=this._map._requestRenderFrame(this._onTouchFrame)),e.preventDefault()}},hr.prototype._onTouchFrame=function(){this._frameId=null;var e=this._gestureIntent;if(e){var n=this._map.transform;this._startScale||(this._startScale=n.scale,this._startBearing=n.bearing);var r=this._getTouchEventData(this._lastTouchEvent),i=r.center,o=r.bearing,a=r.scale,s=n.pointLocation(i),l=n.locationPoint(s);"rotate"===e&&(n.bearing=this._startBearing+o),n.zoom=n.scaleZoom(this._startScale*a),n.setLocationAtPoint(this._startAround,l),this._map.fire(new t.Event(e,{originalEvent:this._lastTouchEvent})),this._map.fire(new t.Event("move",{originalEvent:this._lastTouchEvent})),this._drainInertiaBuffer(),this._inertia.push([t.browser.now(),a,i])}},hr.prototype._onEnd=function(e){n.removeEventListener(t.window.document,"touchmove",this._onMove,{passive:!1}),n.removeEventListener(t.window.document,"touchend",this._onEnd);var r=this._gestureIntent,i=this._startScale;if(this._frameId&&(this._map._cancelRenderFrame(this._frameId),this._frameId=null),delete this._gestureIntent,delete this._startScale,delete this._startBearing,delete this._lastTouchEvent,r){this._map.fire(new t.Event(r+"end",{originalEvent:e})),this._drainInertiaBuffer();var o=this._inertia,a=this._map;if(o.length<2)a.snapToNorth({},{originalEvent:e});else{var s=o[o.length-1],l=o[0],c=a.transform.scaleZoom(i*s[1]),u=a.transform.scaleZoom(i*l[1]),p=c-u,A=(s[0]-l[0])/1e3,h=s[2];if(0!==A&&c!==u){var f=.15*p/A;Math.abs(f)>2.5&&(f=f>0?2.5:-2.5);var d=1e3*Math.abs(f/(12*.15)),_=c+f*d/2e3;_<0&&(_=0),a.easeTo({zoom:_,duration:d,easing:Ar,around:this._aroundCenter?a.getCenter():a.unproject(h),noMoveStart:!0},{originalEvent:e})}else a.snapToNorth({},{originalEvent:e})}}},hr.prototype._drainInertiaBuffer=function(){for(var e=this._inertia,n=t.browser.now();e.length>2&&n-e[0][0]>160;)e.shift()};var fr={scrollZoom:rr,boxZoom:ir,dragRotate:ar,dragPan:lr,keyboard:cr,doubleClickZoom:pr,touchZoomRotate:hr},dr=function(e){function n(n,r){e.call(this),this._moving=!1,this._zooming=!1,this.transform=n,this._bearingSnap=r.bearingSnap,t.bindAll(["_renderFrameCallback"],this)}return e&&(n.__proto__=e),n.prototype=Object.create(e&&e.prototype),n.prototype.constructor=n,n.prototype.getCenter=function(){return this.transform.center},n.prototype.setCenter=function(t,e){return this.jumpTo({center:t},e)},n.prototype.panBy=function(e,n,r){return e=t.Point.convert(e).mult(-1),this.panTo(this.transform.center,t.extend({offset:e},n),r)},n.prototype.panTo=function(e,n,r){return this.easeTo(t.extend({center:e},n),r)},n.prototype.getZoom=function(){return this.transform.zoom},n.prototype.setZoom=function(t,e){return this.jumpTo({zoom:t},e),this},n.prototype.zoomTo=function(e,n,r){return this.easeTo(t.extend({zoom:e},n),r)},n.prototype.zoomIn=function(t,e){return this.zoomTo(this.getZoom()+1,t,e),this},n.prototype.zoomOut=function(t,e){return this.zoomTo(this.getZoom()-1,t,e),this},n.prototype.getBearing=function(){return this.transform.bearing},n.prototype.setBearing=function(t,e){return this.jumpTo({bearing:t},e),this},n.prototype.rotateTo=function(e,n,r){return this.easeTo(t.extend({bearing:e},n),r)},n.prototype.resetNorth=function(e,n){return this.rotateTo(0,t.extend({duration:1e3},e),n),this},n.prototype.snapToNorth=function(t,e){return Math.abs(this.getBearing())e?1:0}),["bottom","left","right","top"])){var a=[(i.padding.left-i.padding.right)/2,(i.padding.top-i.padding.bottom)/2],s=Math.min(i.padding.right,i.padding.left),l=Math.min(i.padding.top,i.padding.bottom);i.offset=[i.offset[0]+a[0],i.offset[1]+a[1]];var c=this.transform,u=c.project(j.convert(e)),p=c.project(j.convert(n)),A=u.rotate(-r*Math.PI/180),h=p.rotate(-r*Math.PI/180),f=new t.Point(Math.max(A.x,h.x),Math.max(A.y,h.y)),d=new t.Point(Math.min(A.x,h.x),Math.min(A.y,h.y)),_=t.Point.convert(i.offset),g=f.sub(d),y=(c.width-2*s-2*Math.abs(_.x))/g.x,m=(c.height-2*l-2*Math.abs(_.y))/g.y;if(!(m<0||y<0))return i.center=c.unproject(u.add(p).div(2)),i.zoom=Math.min(c.scaleZoom(c.scale*Math.min(y,m)),i.maxZoom),i.bearing=r,i;t.warnOnce("Map cannot fit within canvas with the given bounds, padding, and/or offset.")}else t.warnOnce("options.padding must be a positive number, or an Object with keys 'bottom', 'left', 'right', 'top'")},n.prototype.fitBounds=function(t,e,n){return this._fitInternal(this.cameraForBounds(t,e),e,n)},n.prototype.fitScreenCoordinates=function(e,n,r,i,o){return this._fitInternal(this._cameraForBoxAndBearing(this.transform.pointLocation(t.Point.convert(e)),this.transform.pointLocation(t.Point.convert(n)),r,i),i,o)},n.prototype._fitInternal=function(e,n,r){return e?(n=t.extend(e,n)).linear?this.easeTo(n,r):this.flyTo(n,r):this},n.prototype.jumpTo=function(e,n){this.stop();var r=this.transform,i=!1,o=!1,a=!1;return"zoom"in e&&r.zoom!==+e.zoom&&(i=!0,r.zoom=+e.zoom),void 0!==e.center&&(r.center=j.convert(e.center)),"bearing"in e&&r.bearing!==+e.bearing&&(o=!0,r.bearing=+e.bearing),"pitch"in e&&r.pitch!==+e.pitch&&(a=!0,r.pitch=+e.pitch),this.fire(new t.Event("movestart",n)).fire(new t.Event("move",n)),i&&this.fire(new t.Event("zoomstart",n)).fire(new t.Event("zoom",n)).fire(new t.Event("zoomend",n)),o&&this.fire(new t.Event("rotatestart",n)).fire(new t.Event("rotate",n)).fire(new t.Event("rotateend",n)),a&&this.fire(new t.Event("pitchstart",n)).fire(new t.Event("pitch",n)).fire(new t.Event("pitchend",n)),this.fire(new t.Event("moveend",n))},n.prototype.easeTo=function(e,n){var r=this;this.stop(),!1===(e=t.extend({offset:[0,0],duration:500,easing:t.ease},e)).animate&&(e.duration=0);var i=this.transform,o=this.getZoom(),a=this.getBearing(),s=this.getPitch(),l="zoom"in e?+e.zoom:o,c="bearing"in e?this._normalizeBearing(e.bearing,a):a,u="pitch"in e?+e.pitch:s,p=i.centerPoint.add(t.Point.convert(e.offset)),A=i.pointLocation(p),h=j.convert(e.center||A);this._normalizeCenter(h);var f,d,_=i.project(A),g=i.project(h).sub(_),y=i.zoomScale(l-o);return e.around&&(f=j.convert(e.around),d=i.locationPoint(f)),this._zooming=l!==o,this._rotating=a!==c,this._pitching=u!==s,this._prepareEase(n,e.noMoveStart),clearTimeout(this._easeEndTimeoutID),this._ease(function(e){if(r._zooming&&(i.zoom=t.number(o,l,e)),r._rotating&&(i.bearing=t.number(a,c,e)),r._pitching&&(i.pitch=t.number(s,u,e)),f)i.setLocationAtPoint(f,d);else{var A=i.zoomScale(i.zoom-o),h=l>o?Math.min(2,y):Math.max(.5,y),m=Math.pow(h,1-e),v=i.unproject(_.add(g.mult(e*m)).mult(A));i.setLocationAtPoint(i.renderWorldCopies?v.wrap():v,p)}r._fireMoveEvents(n)},function(){e.delayEndEvents?r._easeEndTimeoutID=setTimeout(function(){return r._afterEase(n)},e.delayEndEvents):r._afterEase(n)},e),this},n.prototype._prepareEase=function(e,n){this._moving=!0,n||this.fire(new t.Event("movestart",e)),this._zooming&&this.fire(new t.Event("zoomstart",e)),this._rotating&&this.fire(new t.Event("rotatestart",e)),this._pitching&&this.fire(new t.Event("pitchstart",e))},n.prototype._fireMoveEvents=function(e){this.fire(new t.Event("move",e)),this._zooming&&this.fire(new t.Event("zoom",e)),this._rotating&&this.fire(new t.Event("rotate",e)),this._pitching&&this.fire(new t.Event("pitch",e))},n.prototype._afterEase=function(e){var n=this._zooming,r=this._rotating,i=this._pitching;this._moving=!1,this._zooming=!1,this._rotating=!1,this._pitching=!1,n&&this.fire(new t.Event("zoomend",e)),r&&this.fire(new t.Event("rotateend",e)),i&&this.fire(new t.Event("pitchend",e)),this.fire(new t.Event("moveend",e))},n.prototype.flyTo=function(e,n){var r=this;this.stop(),e=t.extend({offset:[0,0],speed:1.2,curve:1.42,easing:t.ease},e);var i=this.transform,o=this.getZoom(),a=this.getBearing(),s=this.getPitch(),l="zoom"in e?t.clamp(+e.zoom,i.minZoom,i.maxZoom):o,c="bearing"in e?this._normalizeBearing(e.bearing,a):a,u="pitch"in e?+e.pitch:s,p=i.zoomScale(l-o),A=i.centerPoint.add(t.Point.convert(e.offset)),h=i.pointLocation(A),f=j.convert(e.center||h);this._normalizeCenter(f);var d=i.project(h),_=i.project(f).sub(d),g=e.curve,y=Math.max(i.width,i.height),m=y/p,v=_.mag();if("minZoom"in e){var b=t.clamp(Math.min(e.minZoom,o,l),i.minZoom,i.maxZoom),w=y/i.zoomScale(b-o);g=Math.sqrt(w/v*2)}var x=g*g;function E(t){var e=(m*m-y*y+(t?-1:1)*x*x*v*v)/(2*(t?m:y)*x*v);return Math.log(Math.sqrt(e*e+1)-e)}function M(t){return(Math.exp(t)-Math.exp(-t))/2}function C(t){return(Math.exp(t)+Math.exp(-t))/2}var B=E(0),O=function(t){return C(B)/C(B+g*t)},k=function(t){return y*((C(B)*(M(e=B+g*t)/C(e))-M(B))/x)/v;var e},P=(E(1)-B)/g;if(Math.abs(v)<1e-6||!isFinite(P)){if(Math.abs(y-m)<1e-6)return this.easeTo(e,n);var I=me.maxDuration&&(e.duration=0),this._zooming=!0,this._rotating=a!==c,this._pitching=u!==s,this._prepareEase(n,!1),this._ease(function(e){var p=e*P,h=1/O(p);i.zoom=1===e?l:o+i.scaleZoom(h),r._rotating&&(i.bearing=t.number(a,c,e)),r._pitching&&(i.pitch=t.number(s,u,e));var g=1===e?f:i.unproject(d.add(_.mult(k(p))).mult(h));i.setLocationAtPoint(i.renderWorldCopies?g.wrap():g,A),r._fireMoveEvents(n)},function(){return r._afterEase(n)},e),this},n.prototype.isEasing=function(){return!!this._easeFrameId},n.prototype.stop=function(){if(this._easeFrameId&&(this._cancelRenderFrame(this._easeFrameId),delete this._easeFrameId,delete this._onEaseFrame),this._onEaseEnd){var t=this._onEaseEnd;delete this._onEaseEnd,t.call(this)}return this},n.prototype._ease=function(e,n,r){!1===r.animate||0===r.duration?(e(1),n()):(this._easeStart=t.browser.now(),this._easeOptions=r,this._onEaseFrame=e,this._onEaseEnd=n,this._easeFrameId=this._requestRenderFrame(this._renderFrameCallback))},n.prototype._renderFrameCallback=function(){var e=Math.min((t.browser.now()-this._easeStart)/this._easeOptions.duration,1);this._onEaseFrame(this._easeOptions.easing(e)),e<1?this._easeFrameId=this._requestRenderFrame(this._renderFrameCallback):this.stop()},n.prototype._normalizeBearing=function(e,n){e=t.wrap(e,-180,180);var r=Math.abs(e-n);return Math.abs(e-360-n)180?-360:n<-180?360:0}},n}(t.Evented),_r=function(e){void 0===e&&(e={}),this.options=e,t.bindAll(["_updateEditLink","_updateData","_updateCompact"],this)};_r.prototype.getDefaultPosition=function(){return"bottom-right"},_r.prototype.onAdd=function(t){var e=this.options&&this.options.compact;return this._map=t,this._container=n.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},_r.prototype.onRemove=function(){n.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},_r.prototype._updateEditLink=function(){var t=this._editLink;t||(t=this._editLink=this._container.querySelector(".mapbox-improve-map"));var e=[{key:"owner",value:this.styleOwner},{key:"id",value:this.styleId},{key:"access_token",value:p.ACCESS_TOKEN}];if(t){var n=e.reduce(function(t,n,r){return n.value&&(t+=n.key+"="+n.value+(r=0)return!1;return!0})).length?(this._container.innerHTML=t.join(" | "),this._container.classList.remove("mapboxgl-attrib-empty")):this._container.classList.add("mapboxgl-attrib-empty"),this._editLink=null}},_r.prototype._updateCompact=function(){this._map.getCanvasContainer().offsetWidth<=640?this._container.classList.add("mapboxgl-compact"):this._container.classList.remove("mapboxgl-compact")};var gr=function(){t.bindAll(["_updateLogo"],this),t.bindAll(["_updateCompact"],this)};gr.prototype.onAdd=function(t){this._map=t,this._container=n.create("div","mapboxgl-ctrl");var e=n.create("a","mapboxgl-ctrl-logo");return e.target="_blank",e.href="https://www.mapbox.com/",e.setAttribute("aria-label","Mapbox logo"),e.setAttribute("rel","noopener"),this._container.appendChild(e),this._container.style.display="none",this._map.on("sourcedata",this._updateLogo),this._updateLogo(),this._map.on("resize",this._updateCompact),this._updateCompact(),this._container},gr.prototype.onRemove=function(){n.remove(this._container),this._map.off("sourcedata",this._updateLogo),this._map.off("resize",this._updateCompact)},gr.prototype.getDefaultPosition=function(){return"bottom-left"},gr.prototype._updateLogo=function(t){t&&"metadata"!==t.sourceDataType||(this._container.style.display=this._logoRequired()?"block":"none")},gr.prototype._logoRequired=function(){if(this._map.style){var t=this._map.style.sourceCaches;for(var e in t)if(t[e].getSource().mapbox_logo)return!0;return!1}},gr.prototype._updateCompact=function(){var t=this._container.children;if(t.length){var e=t[0];this._map.getCanvasContainer().offsetWidth<250?e.classList.add("mapboxgl-compact"):e.classList.remove("mapboxgl-compact")}};var yr=function(){this._queue=[],this._id=0,this._cleared=!1,this._currentlyRunning=!1};yr.prototype.add=function(t){var e=++this._id;return this._queue.push({callback:t,id:e,cancelled:!1}),e},yr.prototype.remove=function(t){for(var e=this._currentlyRunning,n=0,r=e?this._queue.concat(e):this._queue;ne.maxZoom)throw new Error("maxZoom must be greater than minZoom");var o=new Zn(e.minZoom,e.maxZoom,e.renderWorldCopies);r.call(this,o,e),this._interactive=e.interactive,this._maxTileCacheSize=e.maxTileCacheSize,this._failIfMajorPerformanceCaveat=e.failIfMajorPerformanceCaveat,this._preserveDrawingBuffer=e.preserveDrawingBuffer,this._trackResize=e.trackResize,this._bearingSnap=e.bearingSnap,this._refreshExpiredTiles=e.refreshExpiredTiles,this._fadeDuration=e.fadeDuration,this._crossSourceCollisions=e.crossSourceCollisions,this._crossFadingFactor=1,this._collectResourceTiming=e.collectResourceTiming,this._renderTaskQueue=new yr,this._controls=[];var a=e.transformRequest;if(this._transformRequest=a?function(t,e){return a(t,e)||{url:t}}:function(t){return{url:t}},"string"==typeof e.container){if(this._container=t.window.document.getElementById(e.container),!this._container)throw new Error("Container '"+e.container+"' not found.")}else{if(!(e.container instanceof vr))throw new Error("Invalid type: 'container' must be a String or HTMLElement.");this._container=e.container}if(e.maxBounds&&this.setMaxBounds(e.maxBounds),t.bindAll(["_onWindowOnline","_onWindowResize","_contextLost","_contextRestored"],this),this._setupContainer(),this._setupPainter(),void 0===this.painter)throw new Error("Failed to initialize WebGL.");this.on("move",function(){return i._update(!1)}),this.on("zoom",function(){return i._update(!0)}),void 0!==t.window&&(t.window.addEventListener("online",this._onWindowOnline,!1),t.window.addEventListener("resize",this._onWindowResize,!1)),function(t,e){var r=t.getCanvasContainer(),i=null,o=!1,a=null;for(var s in fr)t[s]=new fr[s](t,e),e.interactive&&e[s]&&t[s].enable(e[s]);n.addEventListener(r,"mouseout",function(e){t.fire(new tr("mouseout",t,e))}),n.addEventListener(r,"mousedown",function(i){o=!0,a=n.mousePos(r,i);var s=new tr("mousedown",t,i);t.fire(s),s.defaultPrevented||(e.interactive&&!t.doubleClickZoom.isActive()&&t.stop(),t.boxZoom.onMouseDown(i),t.boxZoom.isActive()||t.dragPan.isActive()||t.dragRotate.onMouseDown(i),t.boxZoom.isActive()||t.dragRotate.isActive()||t.dragPan.onMouseDown(i))}),n.addEventListener(r,"mouseup",function(e){var n=t.dragRotate.isActive();i&&!n&&t.fire(new tr("contextmenu",t,i)),i=null,o=!1,t.fire(new tr("mouseup",t,e))}),n.addEventListener(r,"mousemove",function(e){if(!t.dragPan.isActive()&&!t.dragRotate.isActive()){for(var n=e.target;n&&n!==r;)n=n.parentNode;n===r&&t.fire(new tr("mousemove",t,e))}}),n.addEventListener(r,"mouseover",function(e){for(var n=e.target;n&&n!==r;)n=n.parentNode;n===r&&t.fire(new tr("mouseover",t,e))}),n.addEventListener(r,"touchstart",function(n){var r=new er("touchstart",t,n);t.fire(r),r.defaultPrevented||(e.interactive&&t.stop(),t.boxZoom.isActive()||t.dragRotate.isActive()||t.dragPan.onTouchStart(n),t.touchZoomRotate.onStart(n),t.doubleClickZoom.onTouchStart(r))},{passive:!1}),n.addEventListener(r,"touchmove",function(e){t.fire(new er("touchmove",t,e))},{passive:!1}),n.addEventListener(r,"touchend",function(e){t.fire(new er("touchend",t,e))}),n.addEventListener(r,"touchcancel",function(e){t.fire(new er("touchcancel",t,e))}),n.addEventListener(r,"click",function(i){var o=n.mousePos(r,i);(o.equals(a)||o.dist(a)-1&&this._controls.splice(n,1),e.onRemove(this),this},i.prototype.resize=function(e){var n=this._containerDimensions(),r=n[0],i=n[1];return this._resizeCanvas(r,i),this.transform.resize(r,i),this.painter.resize(r,i),this.fire(new t.Event("movestart",e)).fire(new t.Event("move",e)).fire(new t.Event("resize",e)).fire(new t.Event("moveend",e)),this},i.prototype.getBounds=function(){return this.transform.getBounds()},i.prototype.getMaxBounds=function(){return this.transform.getMaxBounds()},i.prototype.setMaxBounds=function(t){return this.transform.setMaxBounds(U.convert(t)),this._update()},i.prototype.setMinZoom=function(t){if((t=null===t||void 0===t?0:t)>=0&&t<=this.transform.maxZoom)return this.transform.minZoom=t,this._update(),this.getZoom()=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")},i.prototype.getRenderWorldCopies=function(){return this.transform.renderWorldCopies},i.prototype.setRenderWorldCopies=function(t){return this.transform.renderWorldCopies=t,this._update()},i.prototype.getMaxZoom=function(){return this.transform.maxZoom},i.prototype.project=function(t){return this.transform.locationPoint(j.convert(t))},i.prototype.unproject=function(e){return this.transform.pointLocation(t.Point.convert(e))},i.prototype.isMoving=function(){return this._moving||this.dragPan.isActive()||this.dragRotate.isActive()||this.scrollZoom.isActive()},i.prototype.isZooming=function(){return this._zooming||this.scrollZoom.isActive()},i.prototype.isRotating=function(){return this._rotating||this.dragRotate.isActive()},i.prototype.on=function(t,e,n){var i,o=this;if(void 0===n)return r.prototype.on.call(this,t,e);var a=function(){if("mouseenter"===t||"mouseover"===t){var r=!1;return{layer:e,listener:n,delegates:{mousemove:function(i){var a=o.getLayer(e)?o.queryRenderedFeatures(i.point,{layers:[e]}):[];a.length?r||(r=!0,n.call(o,new tr(t,o,i.originalEvent,{features:a}))):r=!1},mouseout:function(){r=!1}}}}if("mouseleave"===t||"mouseout"===t){var a=!1;return{layer:e,listener:n,delegates:{mousemove:function(r){(o.getLayer(e)?o.queryRenderedFeatures(r.point,{layers:[e]}):[]).length?a=!0:a&&(a=!1,n.call(o,new tr(t,o,r.originalEvent)))},mouseout:function(e){a&&(a=!1,n.call(o,new tr(t,o,e.originalEvent)))}}}}return{layer:e,listener:n,delegates:(i={},i[t]=function(t){var r=o.getLayer(e)?o.queryRenderedFeatures(t.point,{layers:[e]}):[];r.length&&(t.features=r,n.call(o,t),delete t.features)},i)}}();for(var s in this._delegatedListeners=this._delegatedListeners||{},this._delegatedListeners[t]=this._delegatedListeners[t]||[],this._delegatedListeners[t].push(a),a.delegates)o.on(s,a.delegates[s]);return this},i.prototype.off=function(t,e,n){if(void 0===n)return r.prototype.off.call(this,t,e);if(this._delegatedListeners&&this._delegatedListeners[t])for(var i=this._delegatedListeners[t],o=0;o180;){var a=n.locationPoint(t);if(a.x>=0&&a.y>=0&&a.x<=n.width&&a.y<=n.height)break;t.lng>n.center.lng?t.lng-=360:t.lng+=360}return t}Mr.prototype._rotateCompassArrow=function(){var t="rotate("+this._map.transform.angle*(180/Math.PI)+"deg)";this._compassArrow.style.transform=t},Mr.prototype.onAdd=function(t){return this._map=t,this.options.showCompass&&(this._map.on("rotate",this._rotateCompassArrow),this._rotateCompassArrow(),this._handler=new ar(t,{button:"left",element:this._compass}),n.addEventListener(this._compass,"mousedown",this._handler.onMouseDown),this._handler.enable()),this._container},Mr.prototype.onRemove=function(){n.remove(this._container),this.options.showCompass&&(this._map.off("rotate",this._rotateCompassArrow),n.removeEventListener(this._compass,"mousedown",this._handler.onMouseDown),this._handler.disable(),delete this._handler),delete this._map},Mr.prototype._createButton=function(t,e,r){var i=n.create("button",t,this._container);return i.type="button",i.setAttribute("aria-label",e),i.addEventListener("click",r),i};var Br={center:"translate(-50%,-50%)",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%)"};function Or(t,e,n){var r=t.classList;for(var i in Br)r.remove("mapboxgl-"+n+"-anchor-"+i);r.add("mapboxgl-"+n+"-anchor-"+e)}var kr,Pr=function(e){function r(r){if(e.call(this),(arguments[0]instanceof t.window.HTMLElement||2===arguments.length)&&(r=t.extend({element:r},arguments[1])),t.bindAll(["_update","_onMove","_onUp","_addDragHandler","_onMapClick"],this),this._anchor=r&&r.anchor||"center",this._color=r&&r.color||"#3FB1CE",this._draggable=r&&r.draggable||!1,this._state="inactive",r&&r.element)this._element=r.element,this._offset=t.Point.convert(r&&r.offset||[0,0]);else{this._defaultMarker=!0,this._element=n.create("div");var i=n.createNS("http://www.w3.org/2000/svg","svg");i.setAttributeNS(null,"height","41px"),i.setAttributeNS(null,"width","27px"),i.setAttributeNS(null,"viewBox","0 0 27 41");var o=n.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 a=n.createNS("http://www.w3.org/2000/svg","g");a.setAttributeNS(null,"fill-rule","nonzero");var s=n.createNS("http://www.w3.org/2000/svg","g");s.setAttributeNS(null,"transform","translate(3.0, 29.0)"),s.setAttributeNS(null,"fill","#000000");for(var l=0,c=[{rx:"10.5",ry:"5.25002273"},{rx:"10.5",ry:"5.25002273"},{rx:"9.5",ry:"4.77275007"},{rx:"8.5",ry:"4.29549936"},{rx:"7.5",ry:"3.81822308"},{rx:"6.5",ry:"3.34094679"},{rx:"5.5",ry:"2.86367051"},{rx:"4.5",ry:"2.38636864"}];l5280?zr(e,c,A/5280,"mi"):zr(e,c,A,"ft")}else n&&"nautical"===n.unit?zr(e,c,p/1852,"nm"):zr(e,c,p,"m")}function zr(t,e,n,r){var i,o,a,s=(i=n,(o=Math.pow(10,(""+Math.floor(i)).length-1))*(a=(a=i/o)>=10?10:a>=5?5:a>=3?3:a>=2?2:1)),l=s/n;"m"===r&&s>=1e3&&(s/=1e3,r="km"),t.style.width=e*l+"px",t.innerHTML=s+r}Lr.prototype.getDefaultPosition=function(){return"bottom-left"},Lr.prototype._onMove=function(){Sr(this._map,this._container,this.options)},Lr.prototype.onAdd=function(t){return this._map=t,this._container=n.create("div","mapboxgl-ctrl mapboxgl-ctrl-scale",t.getContainer()),this._map.on("move",this._onMove),this._onMove(),this._container},Lr.prototype.onRemove=function(){n.remove(this._container),this._map.off("move",this._onMove),this._map=void 0},Lr.prototype.setUnit=function(t){this.options.unit=t,Sr(this._map,this._container,this.options)};var Rr=function(){this._fullscreen=!1,t.bindAll(["_onClickFullscreen","_changeIcon"],this),"onfullscreenchange"in t.window.document?this._fullscreenchange="fullscreenchange":"onmozfullscreenchange"in t.window.document?this._fullscreenchange="mozfullscreenchange":"onwebkitfullscreenchange"in t.window.document?this._fullscreenchange="webkitfullscreenchange":"onmsfullscreenchange"in t.window.document&&(this._fullscreenchange="MSFullscreenChange"),this._className="mapboxgl-ctrl"};Rr.prototype.onAdd=function(e){return this._map=e,this._mapContainer=this._map.getContainer(),this._container=n.create("div",this._className+" mapboxgl-ctrl-group"),this._checkFullscreenSupport()?this._setupUI():(this._container.style.display="none",t.warnOnce("This device does not support fullscreen mode.")),this._container},Rr.prototype.onRemove=function(){n.remove(this._container),this._map=null,t.window.document.removeEventListener(this._fullscreenchange,this._changeIcon)},Rr.prototype._checkFullscreenSupport=function(){return!!(t.window.document.fullscreenEnabled||t.window.document.mozFullScreenEnabled||t.window.document.msFullscreenEnabled||t.window.document.webkitFullscreenEnabled)},Rr.prototype._setupUI=function(){var e=this._fullscreenButton=n.create("button",this._className+"-icon "+this._className+"-fullscreen",this._container);e.setAttribute("aria-label","Toggle fullscreen"),e.type="button",this._fullscreenButton.addEventListener("click",this._onClickFullscreen),t.window.document.addEventListener(this._fullscreenchange,this._changeIcon)},Rr.prototype._isFullscreen=function(){return this._fullscreen},Rr.prototype._changeIcon=function(){(t.window.document.fullscreenElement||t.window.document.mozFullScreenElement||t.window.document.webkitFullscreenElement||t.window.document.msFullscreenElement)===this._mapContainer!==this._fullscreen&&(this._fullscreen=!this._fullscreen,this._fullscreenButton.classList.toggle(this._className+"-shrink"),this._fullscreenButton.classList.toggle(this._className+"-fullscreen"))},Rr.prototype._onClickFullscreen=function(){this._isFullscreen()?t.window.document.exitFullscreen?t.window.document.exitFullscreen():t.window.document.mozCancelFullScreen?t.window.document.mozCancelFullScreen():t.window.document.msExitFullscreen?t.window.document.msExitFullscreen():t.window.document.webkitCancelFullScreen&&t.window.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()};var jr={closeButton:!0,closeOnClick:!0,className:""},Ur=function(e){function r(n){e.call(this),this.options=t.extend(Object.create(jr),n),t.bindAll(["_update","_onClickClose"],this)}return e&&(r.__proto__=e),r.prototype=Object.create(e&&e.prototype),r.prototype.constructor=r,r.prototype.addTo=function(e){return this._map=e,this._map.on("move",this._update),this.options.closeOnClick&&this._map.on("click",this._onClickClose),this._update(),this.fire(new t.Event("open")),this},r.prototype.isOpen=function(){return!!this._map},r.prototype.remove=function(){return this._content&&n.remove(this._content),this._container&&(n.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(new t.Event("close")),this},r.prototype.getLngLat=function(){return this._lngLat},r.prototype.setLngLat=function(t){return this._lngLat=j.convert(t),this._pos=null,this._update(),this},r.prototype.setText=function(e){return this.setDOMContent(t.window.document.createTextNode(e))},r.prototype.setHTML=function(e){var n,r=t.window.document.createDocumentFragment(),i=t.window.document.createElement("body");for(i.innerHTML=e;n=i.firstChild;)r.appendChild(n);return this.setDOMContent(r)},r.prototype.setDOMContent=function(t){return this._createContent(),this._content.appendChild(t),this._update(),this},r.prototype._createContent=function(){this._content&&n.remove(this._content),this._content=n.create("div","mapboxgl-popup-content",this._container),this.options.closeButton&&(this._closeButton=n.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))},r.prototype._update=function(){var e=this;if(this._map&&this._lngLat&&this._content){this._container||(this._container=n.create("div","mapboxgl-popup",this._map.getContainer()),this._tip=n.create("div","mapboxgl-popup-tip",this._container),this._container.appendChild(this._content),this.options.className&&this.options.className.split(" ").forEach(function(t){return e._container.classList.add(t)})),this._map.transform.renderWorldCopies&&(this._lngLat=Cr(this._lngLat,this._pos,this._map.transform));var r=this._pos=this._map.project(this._lngLat),i=this.options.anchor,o=function e(n){if(n){if("number"==typeof n){var r=Math.round(Math.sqrt(.5*Math.pow(n,2)));return{center:new t.Point(0,0),top:new t.Point(0,n),"top-left":new t.Point(r,r),"top-right":new t.Point(-r,r),bottom:new t.Point(0,-n),"bottom-left":new t.Point(r,-r),"bottom-right":new t.Point(-r,-r),left:new t.Point(n,0),right:new t.Point(-n,0)}}if(n instanceof t.Point||Array.isArray(n)){var i=t.Point.convert(n);return{center:i,top:i,"top-left":i,"top-right":i,bottom:i,"bottom-left":i,"bottom-right":i,left:i,right:i}}return{center:t.Point.convert(n.center||[0,0]),top:t.Point.convert(n.top||[0,0]),"top-left":t.Point.convert(n["top-left"]||[0,0]),"top-right":t.Point.convert(n["top-right"]||[0,0]),bottom:t.Point.convert(n.bottom||[0,0]),"bottom-left":t.Point.convert(n["bottom-left"]||[0,0]),"bottom-right":t.Point.convert(n["bottom-right"]||[0,0]),left:t.Point.convert(n.left||[0,0]),right:t.Point.convert(n.right||[0,0])}}return e(new t.Point(0,0))}(this.options.offset);if(!i){var a,s=this._container.offsetWidth,l=this._container.offsetHeight;a=r.y+o.bottom.ythis._map.transform.height-l?["bottom"]:[],r.xthis._map.transform.width-s/2&&a.push("right"),i=0===a.length?"bottom":a.join("-")}var c=r.add(o[i]).round();n.setTransform(this._container,Br[i]+" translate("+c.x+"px,"+c.y+"px)"),Or(this._container,i,"popup")}},r.prototype._onClickClose=function(){this.remove()},r}(t.Evented),Fr={version:"0.50.0-beta.1",supported:e,setRTLTextPlugin:t.setRTLTextPlugin,Map:wr,NavigationControl:Mr,GeolocateControl:Tr,AttributionControl:_r,ScaleControl:Lr,FullscreenControl:Rr,Popup:Ur,Marker:Pr,Style:Ge,LngLat:j,LngLatBounds:U,Point:t.Point,Evented:t.Evented,config:p,get accessToken(){return p.ACCESS_TOKEN},set accessToken(t){p.ACCESS_TOKEN=t},get workerCount(){return qt.workerCount},set workerCount(t){qt.workerCount=t},workerUrl:""};return Fr}),n})},function(t,e,n){"use strict";var r=n(0),i=n.n(r),o=n(1),a=n.n(o),s=Object.assign||function(t){for(var e=1;e=0||Object.prototype.hasOwnProperty.call(t,r)&&(n[r]=t[r]);return n}(t,["children","color","size","style","width","height"]),p=e.reactIconBase,A=void 0===p?{}:p,h=o||A.size||"1em";return i.a.createElement("svg",s({children:n,fill:"currentColor",preserveAspectRatio:"xMidYMid meet",height:c||h,width:l||h},A,u,{style:s({verticalAlign:"middle",color:r||A.color},A.style||{},a)}))};l.propTypes={color:a.a.string,size:a.a.oneOfType([a.a.string,a.a.number]),width:a.a.oneOfType([a.a.string,a.a.number]),height:a.a.oneOfType([a.a.string,a.a.number]),style:a.a.object},l.contextTypes={reactIconBase:a.a.shape(l.propTypes)},e.a=l},function(module,__webpack_exports__,__webpack_require__){"use strict";(function(module){var react__WEBPACK_IMPORTED_MODULE_0__=__webpack_require__(0),react__WEBPACK_IMPORTED_MODULE_0___default=__webpack_require__.n(react__WEBPACK_IMPORTED_MODULE_0__),prop_types__WEBPACK_IMPORTED_MODULE_1__=__webpack_require__(1),prop_types__WEBPACK_IMPORTED_MODULE_1___default=__webpack_require__.n(prop_types__WEBPACK_IMPORTED_MODULE_1__),classnames__WEBPACK_IMPORTED_MODULE_2__=__webpack_require__(48),classnames__WEBPACK_IMPORTED_MODULE_2___default=__webpack_require__.n(classnames__WEBPACK_IMPORTED_MODULE_2__),react_autocomplete__WEBPACK_IMPORTED_MODULE_3__=__webpack_require__(246),react_autocomplete__WEBPACK_IMPORTED_MODULE_3___default=__webpack_require__.n(react_autocomplete__WEBPACK_IMPORTED_MODULE_3__);function _typeof(t){return(_typeof="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 _classCallCheck(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function _defineProperties(t,e){for(var n=0;n1&&void 0!==arguments[1]?arguments[1]:"";if("string"==typeof e)return t[0].toLowerCase().indexOf(e.toLowerCase())>-1},renderItem:function(t,e){return react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement("div",{key:t[0],className:classnames__WEBPACK_IMPORTED_MODULE_2___default()({"maputnik-autocomplete-menu-item":!0,"maputnik-autocomplete-menu-item-selected":e})},t[1])}}))}},{key:"__reactstandin__regenerateByEval",value:function __reactstandin__regenerateByEval(key,code){this[key]=eval(code)}}]),AutocompleteInput}(react__WEBPACK_IMPORTED_MODULE_0___default.a.Component);_defineProperty(AutocompleteInput,"propTypes",{value:prop_types__WEBPACK_IMPORTED_MODULE_1___default.a.string,options:prop_types__WEBPACK_IMPORTED_MODULE_1___default.a.array,onChange:prop_types__WEBPACK_IMPORTED_MODULE_1___default.a.func,keepMenuWithinWindowBounds:prop_types__WEBPACK_IMPORTED_MODULE_1___default.a.bool}),_defineProperty(AutocompleteInput,"defaultProps",{onChange:function(){},options:[]});var _default=AutocompleteInput;__webpack_exports__.a=_default,function(){var t=__webpack_require__(2).default,e=__webpack_require__(2).leaveModule;t&&(t.register(MAX_HEIGHT,"MAX_HEIGHT","/Users/peter.richardson/work/maputnik-editor/src/components/inputs/AutocompleteInput.jsx"),t.register(AutocompleteInput,"AutocompleteInput","/Users/peter.richardson/work/maputnik-editor/src/components/inputs/AutocompleteInput.jsx"),t.register(_default,"default","/Users/peter.richardson/work/maputnik-editor/src/components/inputs/AutocompleteInput.jsx"),e(module))}()}).call(this,__webpack_require__(8)(module))},function(t,e,n){"use strict";e.a={PROPERTYCHANGE:"propertychange"}},function(t,e,n){"use strict";n.d(e,"c",function(){return i}),n.d(e,"d",function(){return o}),n.d(e,"a",function(){return a}),n.d(e,"b",function(){return s});var r=n(10);function i(t,e){return void 0!==t?0:void 0}function o(t,e){return void 0!==t?t+e:void 0}function a(t){var e=2*Math.PI/t;return function(t,n){return void 0!==t?t=Math.floor((t+n)/e+.5)*e:void 0}}function s(t){var e=t||Object(r.i)(5);return function(t,n){return void 0!==t?Math.abs(t+n)<=e?0:t+n:void 0}}},function(t,e,n){"use strict";function r(t,e,n,r){for(;e0}function o(t,e,n,r,o){for(var a=void 0!==o&&o,s=0,l=n.length;s`."},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://`."},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 RGB-encoded raster DEM source"}},doc:"The type of the source."},url:{type:"string",doc:"A URL to a TileJSON resource. Supported protocols are `http:`, `https:`, and `mapbox://`."},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."},encoding:{type:"enum",values:{terrarium:{doc:"Terrarium format PNG tiles. See https://aws.amazon.com/es/public-datasets/terrain/ for more info."},mapbox:{doc:"Mapbox Terrain RGB tiles. See https://www.mapbox.com/help/access-elevation-data/#mapbox-terrain-rgb for more info."}},default:"mapbox",doc:"The encoding used by this source. Mapbox Terrain RGB is used by default"},"*":{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)."},lineMetrics:{type:"boolean",default:!1,doc:"Whether to calculate line distance metrics. This is required for line layers that specify `line-gradient` values."}},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."}}},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",android:"6.0.0",ios:"4.0.0",macos:"0.7.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 and Mapzen Terrarium tiles.","sdk-support":{"basic functionality":{js:"0.43.0",android:"6.0.0",ios:"4.0.0",macos:"0.7.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 for the layer. At zoom levels less than the minzoom, the layer will be hidden."},maxzoom:{type:"number",minimum:0,maximum:24,doc:"The maximum zoom level for the layer. At zoom levels equal to or greater than the maxzoom, the layer will be hidden."},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",android:"6.0.0",ios:"4.0.0",macos:"0.7.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.",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.","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":{js:"0.43.0",android:"6.0.0",ios:"4.0.0",macos:"0.7.0"}}},"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",android:"6.0.0",ios:"4.0.0",macos:"0.7.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_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","sdk-support":{"basic functionality":{js:"0.41.0",android:"6.0.0",ios:"4.0.0",macos:"0.7.0"}}},var:{doc:'References variable bound using "let".',group:"Variable binding","sdk-support":{"basic functionality":{js:"0.41.0",android:"6.0.0",ios:"4.0.0",macos:"0.7.0"}}},literal:{doc:"Provides a literal array or object value.",group:"Types","sdk-support":{"basic functionality":{js:"0.41.0",android:"6.0.0",ios:"4.0.0",macos:"0.7.0"}}},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","sdk-support":{"basic functionality":{js:"0.41.0",android:"6.0.0",ios:"4.0.0",macos:"0.7.0"}}},at:{doc:"Retrieves an item from an array.",group:"Lookup","sdk-support":{"basic functionality":{js:"0.41.0",android:"6.0.0",ios:"4.0.0",macos:"0.7.0"}}},case:{doc:"Selects the first output whose corresponding test condition evaluates to true.",group:"Decision","sdk-support":{"basic functionality":{js:"0.41.0",android:"6.0.0",ios:"4.0.0",macos:"0.7.0"}}},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","sdk-support":{"basic functionality":{js:"0.41.0",android:"6.0.0",ios:"4.0.0",macos:"0.7.0"}}},coalesce:{doc:"Evaluates each expression in turn until the first non-null value is obtained, and returns that value.",group:"Decision","sdk-support":{"basic functionality":{js:"0.41.0",android:"6.0.0",ios:"4.0.0",macos:"0.7.0"}}},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","sdk-support":{"basic functionality":{js:"0.42.0",android:"6.0.0",ios:"4.0.0",macos:"0.7.0"}}},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`, 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","sdk-support":{"basic functionality":{js:"0.42.0",android:"6.0.0",ios:"4.0.0",macos:"0.7.0"}}},ln2:{doc:"Returns mathematical constant ln(2).",group:"Math","sdk-support":{"basic functionality":{js:"0.41.0",android:"6.0.0",ios:"4.0.0",macos:"0.7.0"}}},pi:{doc:"Returns the mathematical constant pi.",group:"Math","sdk-support":{"basic functionality":{js:"0.41.0",android:"6.0.0",ios:"4.0.0",macos:"0.7.0"}}},e:{doc:"Returns the mathematical constant e.",group:"Math","sdk-support":{"basic functionality":{js:"0.41.0",android:"6.0.0",ios:"4.0.0",macos:"0.7.0"}}},typeof:{doc:"Returns a string describing the type of the given value.",group:"Types","sdk-support":{"basic functionality":{js:"0.41.0",android:"6.0.0",ios:"4.0.0",macos:"0.7.0"}}},string:{doc:"Asserts that the input value is a string. If multiple values are provided, each one is evaluated in order until a string is obtained. If none of the inputs are strings, the expression is an error.",group:"Types","sdk-support":{"basic functionality":{js:"0.41.0",android:"6.0.0",ios:"4.0.0",macos:"0.7.0"}}},number:{doc:"Asserts that the input value is a number. If multiple values are provided, each one is evaluated in order until a number is obtained. If none of the inputs are numbers, the expression is an error.",group:"Types","sdk-support":{"basic functionality":{js:"0.41.0",android:"6.0.0",ios:"4.0.0",macos:"0.7.0"}}},boolean:{doc:"Asserts that the input value is a boolean. If multiple values are provided, each one is evaluated in order until a boolean is obtained. If none of the inputs are booleans, the expression is an error.",group:"Types","sdk-support":{"basic functionality":{js:"0.41.0",android:"6.0.0",ios:"4.0.0",macos:"0.7.0"}}},object:{doc:"Asserts that the input value is an object. If multiple values are provided, each one is evaluated in order until an object is obtained. If none of the inputs are objects, the expression is an error.",group:"Types","sdk-support":{"basic functionality":{js:"0.41.0",android:"6.0.0",ios:"4.0.0",macos:"0.7.0"}}},collator:{doc:"Returns a `collator` for use in locale-dependent comparison operations. The `case-sensitive` and `diacritic-sensitive` options default to `false`. The `locale` argument specifies the IETF language tag of the locale to use. If none is provided, the default locale is used. If the requested locale is not available, the `collator` will use a system-defined fallback locale. Use `resolved-locale` to test the results of locale fallback behavior.",group:"Types","sdk-support":{"basic functionality":{js:"0.45.0"}}},"to-string":{doc:'Converts the input value to a string. If the input is `null`, the result is `""`. 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","sdk-support":{"basic functionality":{js:"0.41.0",android:"6.0.0",ios:"4.0.0",macos:"0.7.0"}}},"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","sdk-support":{"basic functionality":{js:"0.41.0",android:"6.0.0",ios:"4.0.0",macos:"0.7.0"}}},"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","sdk-support":{"basic functionality":{js:"0.41.0",android:"6.0.0",ios:"4.0.0",macos:"0.7.0"}}},"to-rgba":{doc:"Returns a four-element array containing the input color's red, green, blue, and alpha components, in that order.",group:"Color","sdk-support":{"basic functionality":{js:"0.41.0",android:"6.0.0",ios:"4.0.0",macos:"0.7.0"}}},"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","sdk-support":{"basic functionality":{js:"0.41.0",android:"6.0.0",ios:"4.0.0",macos:"0.7.0"}}},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","sdk-support":{"basic functionality":{js:"0.41.0",android:"6.0.0",ios:"4.0.0",macos:"0.7.0"}}},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","sdk-support":{"basic functionality":{js:"0.41.0",android:"6.0.0",ios:"4.0.0",macos:"0.7.0"}}},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","sdk-support":{"basic functionality":{js:"0.41.0",android:"6.0.0",ios:"4.0.0",macos:"0.7.0"}}},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","sdk-support":{"basic functionality":{js:"0.41.0",android:"6.0.0",ios:"4.0.0",macos:"0.7.0"}}},length:{doc:"Gets the length of an array or string.",group:"Lookup","sdk-support":{"basic functionality":{js:"0.41.0",android:"6.0.0",ios:"4.0.0",macos:"0.7.0"}}},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","sdk-support":{"basic functionality":{js:"0.41.0",android:"6.0.0",ios:"4.0.0",macos:"0.7.0"}}},"geometry-type":{doc:"Gets the feature's geometry type: Point, MultiPoint, LineString, MultiLineString, Polygon, MultiPolygon.",group:"Feature data","sdk-support":{"basic functionality":{js:"0.41.0",android:"6.0.0",ios:"4.0.0",macos:"0.7.0"}}},id:{doc:"Gets the feature's id, if it has one.",group:"Feature data","sdk-support":{"basic functionality":{js:"0.41.0",android:"6.0.0",ios:"4.0.0",macos:"0.7.0"}}},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","sdk-support":{"basic functionality":{js:"0.41.0",android:"6.0.0",ios:"4.0.0",macos:"0.7.0"}}},"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","sdk-support":{"basic functionality":{js:"0.41.0",android:"6.0.0",ios:"4.0.0",macos:"0.7.0"}}},"line-progress":{doc:"Gets the progress along a gradient line. Can only be used in the `line-gradient` property.",group:"Heatmap"},"+":{doc:"Returns the sum of the inputs.",group:"Math","sdk-support":{"basic functionality":{js:"0.41.0",android:"6.0.0",ios:"4.0.0",macos:"0.7.0"}}},"*":{doc:"Returns the product of the inputs.",group:"Math","sdk-support":{"basic functionality":{js:"0.41.0",android:"6.0.0",ios:"4.0.0",macos:"0.7.0"}}},"-":{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","sdk-support":{"basic functionality":{js:"0.41.0",android:"6.0.0",ios:"4.0.0",macos:"0.7.0"}}},"/":{doc:"Returns the result of floating point division of the first input by the second.",group:"Math","sdk-support":{"basic functionality":{js:"0.41.0",android:"6.0.0",ios:"4.0.0",macos:"0.7.0"}}},"%":{doc:"Returns the remainder after integer division of the first input by the second.",group:"Math","sdk-support":{"basic functionality":{js:"0.41.0",android:"6.0.0",ios:"4.0.0",macos:"0.7.0"}}},"^":{doc:"Returns the result of raising the first input to the power specified by the second.",group:"Math","sdk-support":{"basic functionality":{js:"0.41.0",android:"6.0.0",ios:"4.0.0",macos:"0.7.0"}}},sqrt:{doc:"Returns the square root of the input.",group:"Math","sdk-support":{"basic functionality":{js:"0.42.0",android:"6.0.0",ios:"4.0.0",macos:"0.7.0"}}},log10:{doc:"Returns the base-ten logarithm of the input.",group:"Math","sdk-support":{"basic functionality":{js:"0.41.0",android:"6.0.0",ios:"4.0.0",macos:"0.7.0"}}},ln:{doc:"Returns the natural logarithm of the input.",group:"Math","sdk-support":{"basic functionality":{js:"0.41.0",android:"6.0.0",ios:"4.0.0",macos:"0.7.0"}}},log2:{doc:"Returns the base-two logarithm of the input.",group:"Math","sdk-support":{"basic functionality":{js:"0.41.0",android:"6.0.0",ios:"4.0.0",macos:"0.7.0"}}},sin:{doc:"Returns the sine of the input.",group:"Math","sdk-support":{"basic functionality":{js:"0.41.0",android:"6.0.0",ios:"4.0.0",macos:"0.7.0"}}},cos:{doc:"Returns the cosine of the input.",group:"Math","sdk-support":{"basic functionality":{js:"0.41.0",android:"6.0.0",ios:"4.0.0",macos:"0.7.0"}}},tan:{doc:"Returns the tangent of the input.",group:"Math","sdk-support":{"basic functionality":{js:"0.41.0",android:"6.0.0",ios:"4.0.0",macos:"0.7.0"}}},asin:{doc:"Returns the arcsine of the input.",group:"Math","sdk-support":{"basic functionality":{js:"0.41.0",android:"6.0.0",ios:"4.0.0",macos:"0.7.0"}}},acos:{doc:"Returns the arccosine of the input.",group:"Math","sdk-support":{"basic functionality":{js:"0.41.0",android:"6.0.0",ios:"4.0.0",macos:"0.7.0"}}},atan:{doc:"Returns the arctangent of the input.",group:"Math","sdk-support":{"basic functionality":{js:"0.41.0",android:"6.0.0",ios:"4.0.0",macos:"0.7.0"}}},min:{doc:"Returns the minimum value of the inputs.",group:"Math","sdk-support":{"basic functionality":{js:"0.41.0",android:"6.0.0",ios:"4.0.0",macos:"0.7.0"}}},max:{doc:"Returns the maximum value of the inputs.",group:"Math","sdk-support":{"basic functionality":{js:"0.41.0",android:"6.0.0",ios:"4.0.0",macos:"0.7.0"}}},round:{doc:'Rounds the input to the nearest integer. Halfway values are rounded away from zero. For example, `["round", -1.5]` evaluates to -2.',group:"Math","sdk-support":{"basic functionality":{js:"0.45.0",android:"6.0.0",ios:"4.0.0",macos:"0.7.0"}}},abs:{doc:"Returns the absolute value of the input.",group:"Math","sdk-support":{"basic functionality":{js:"0.45.0",android:"6.0.0",ios:"4.0.0",macos:"0.7.0"}}},ceil:{doc:"Returns the smallest integer that is greater than or equal to the input.",group:"Math","sdk-support":{"basic functionality":{js:"0.45.0",android:"6.0.0",ios:"4.0.0",macos:"0.7.0"}}},floor:{doc:"Returns the largest integer that is less than or equal to the input.",group:"Math","sdk-support":{"basic functionality":{js:"0.45.0",android:"6.0.0",ios:"4.0.0",macos:"0.7.0"}}},"==":{doc:"Returns `true` if the input values are equal, `false` otherwise. Equality is strictly typed: values of different types are always considered not equal. Accepts an optional `collator` argument to control locale-dependent string comparisons.",group:"Decision","sdk-support":{"basic functionality":{js:"0.41.0",android:"6.0.0",ios:"4.0.0",macos:"0.7.0"}}},"!=":{doc:"Returns `true` if the input values are not equal, `false` otherwise. Equality is strictly typed: values of different types are always considered not equal. Accepts an optional `collator` argument to control locale-dependent string comparisons.",group:"Decision","sdk-support":{"basic functionality":{js:"0.41.0",android:"6.0.0",ios:"4.0.0",macos:"0.7.0"}}},">":{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. Accepts an optional `collator` argument to control locale-dependent string comparisons.",group:"Decision","sdk-support":{"basic functionality":{js:"0.41.0",android:"6.0.0",ios:"4.0.0",macos:"0.7.0"}}},"<":{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. Accepts an optional `collator` argument to control locale-dependent string comparisons.",group:"Decision","sdk-support":{"basic functionality":{js:"0.41.0",android:"6.0.0",ios:"4.0.0",macos:"0.7.0"}}},">=":{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. Accepts an optional `collator` argument to control locale-dependent string comparisons.",group:"Decision","sdk-support":{"basic functionality":{js:"0.41.0",android:"6.0.0",ios:"4.0.0",macos:"0.7.0"}}},"<=":{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. Accepts an optional `collator` argument to control locale-dependent string comparisons.",group:"Decision","sdk-support":{"basic functionality":{js:"0.41.0",android:"6.0.0",ios:"4.0.0",macos:"0.7.0"}}},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","sdk-support":{"basic functionality":{js:"0.41.0",android:"6.0.0",ios:"4.0.0",macos:"0.7.0"}}},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","sdk-support":{"basic functionality":{js:"0.41.0",android:"6.0.0",ios:"4.0.0",macos:"0.7.0"}}},"!":{doc:"Logical negation. Returns `true` if the input is `false`, and `false` if the input is `true`.",group:"Decision","sdk-support":{"basic functionality":{js:"0.41.0",android:"6.0.0",ios:"4.0.0",macos:"0.7.0"}}},"is-supported-script":{doc:"Returns `true` if the input string is expected to render legibly. Returns `false` if the input string contains sections that cannot be rendered without potential loss of meaning (e.g. Indic scripts that require complex text shaping, or right-to-left scripts if the the `mapbox-gl-rtl-text` plugin is not in use in Mapbox GL JS).",group:"String"},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","sdk-support":{"basic functionality":{js:"0.41.0",android:"6.0.0",ios:"4.0.0",macos:"0.7.0"}}},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","sdk-support":{"basic functionality":{js:"0.41.0",android:"6.0.0",ios:"4.0.0",macos:"0.7.0"}}},concat:{doc:"Returns a string consisting of the concatenation of the inputs.",group:"String","sdk-support":{"basic functionality":{js:"0.41.0",android:"6.0.0",ios:"4.0.0",macos:"0.7.0"}}},"resolved-locale":{doc:"Returns the IETF language tag of the locale being used by the provided `collator`. This can be used to determine the default system locale, or to determine if a requested locale was successfully loaded.",group:"String","sdk-support":{"basic functionality":{js:"0.45.0"}}}}},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). Note that zoom-dependent expressions will be evaluated only at integer zoom levels.","sdk-support":{"basic functionality":{js:"0.10.0",android:"2.0.1",ios:"2.0.0",macos:"0.1.0"},"data-driven styling":{}}}},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",android:"5.2.0",ios:"3.7.0",macos:"0.6.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. Note that GeoJSON sources with `lineMetrics: true` specified won't render dashed lines to the expected scale. Also note that zoom-dependent expressions will be evaluated only at integer zoom levels.",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). Note that zoom-dependent expressions will be evaluated only at integer zoom levels.","sdk-support":{"basic functionality":{js:"0.10.0",android:"2.0.1",ios:"2.0.0",macos:"0.1.0"},"data-driven styling":{}}},"line-gradient":{type:"color",doc:'Defines a gradient with which to color a line feature. Can only be used with GeoJSON sources that specify `"lineMetrics": true`.',function:"interpolated","zoom-function":!1,"property-function":!1,transition:!1,requires:[{"!":"line-dasharray"},{"!":"line-pattern"},{source:"geojson",has:{lineMetrics:!0}}],"sdk-support":{"basic functionality":{js:"0.45.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",android:"6.0.0",ios:"4.0.0",macos:"0.7.0"},"data-driven styling":{js:"0.43.0",android:"6.0.0",ios:"4.0.0",macos:"0.7.0"}}},"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",android:"6.0.0",ios:"4.0.0",macos:"0.7.0"},"data-driven styling":{js:"0.41.0",android:"6.0.0",ios:"4.0.0",macos:"0.7.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",android:"6.0.0",ios:"4.0.0",macos:"0.7.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",android:"6.0.0",ios:"4.0.0",macos:"0.7.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",android:"6.0.0",ios:"4.0.0",macos:"0.7.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,"sdk-support":{"basic functionality":{js:"0.43.0",android:"6.0.0",ios:"4.0.0",macos:"0.7.0"},"data-driven styling":{}}},"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.","sdk-support":{"basic functionality":{js:"0.43.0",android:"6.0.0",ios:"4.0.0",macos:"0.7.0"},"data-driven styling":{}}},"hillshade-exaggeration":{type:"number",doc:"Intensity of the hillshade",default:.5,minimum:0,maximum:1,function:"interpolated","zoom-function":!0,transition:!0,"sdk-support":{"basic functionality":{js:"0.43.0",android:"6.0.0",ios:"4.0.0",macos:"0.7.0"},"data-driven styling":{}}},"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,"sdk-support":{"basic functionality":{js:"0.43.0",android:"6.0.0",ios:"4.0.0",macos:"0.7.0"},"data-driven styling":{}}},"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,"sdk-support":{"basic functionality":{js:"0.43.0",android:"6.0.0",ios:"4.0.0",macos:"0.7.0"},"data-driven styling":{}}},"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,"sdk-support":{"basic functionality":{js:"0.43.0",android:"6.0.0",ios:"4.0.0",macos:"0.7.0"},"data-driven styling":{}}}},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). Note that zoom-dependent expressions will be evaluated only at integer zoom levels.","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."}},"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"}}}},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."}},"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). Note that zoom-dependent expressions will be evaluated only at integer zoom levels.","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"}}}}},s=function(t,e){return t= 0x80 (not a basic code point)","invalid-input":"Invalid input"},w=c-u,x=Math.floor,E=String.fromCharCode;function M(t){throw RangeError(b[t])}function C(t,e){for(var n=t.length,r=[];n--;)r[n]=e(t[n]);return r}function B(t,e){var n=t.split("@"),r="";return n.length>1&&(r=n[0]+"@",t=n[1]),r+C((t=t.replace(v,".")).split("."),e).join(".")}function O(t){for(var e,n,r=[],i=0,o=t.length;i=55296&&e<=56319&&i65535&&(e+=E((t-=65536)>>>10&1023|55296),t=56320|1023&t),e+=E(t)}).join("")}function P(t){return t-48<10?t-22:t-65<26?t-65:t-97<26?t-97:c}function I(t,e){return t+22+75*(t<26)-((0!=e)<<5)}function T(t,e,n){var r=0;for(t=n?x(t/f):t>>1,t+=x(t/e);t>w*A>>1;r+=c)t=x(t/w);return x(r+(w+1)*t/(t+h))}function D(t){var e,n,r,i,o,a,s,p,h,f,y=[],m=t.length,v=0,b=_,w=d;for((n=t.lastIndexOf(g))<0&&(n=0),r=0;r=128&&M("not-basic"),y.push(t.charCodeAt(r));for(i=n>0?n+1:0;i=m&&M("invalid-input"),((p=P(t.charCodeAt(i++)))>=c||p>x((l-v)/a))&&M("overflow"),v+=p*a,!(p<(h=s<=w?u:s>=w+A?A:s-w));s+=c)a>x(l/(f=c-h))&&M("overflow"),a*=f;w=T(v-o,e=y.length+1,0==o),x(v/e)>l-b&&M("overflow"),b+=x(v/e),v%=e,y.splice(v++,0,b)}return k(y)}function L(t){var e,n,r,i,o,a,s,p,h,f,y,m,v,b,w,C=[];for(m=(t=O(t)).length,e=_,n=0,o=d,a=0;a=e&&yx((l-n)/(v=r+1))&&M("overflow"),n+=(s-e)*v,e=s,a=0;al&&M("overflow"),y==e){for(p=n,h=c;!(p<(f=h<=o?u:h>=o+A?A:h-o));h+=c)w=p-f,b=c-f,C.push(E(I(f+w%b,0))),p=x(w/b);C.push(E(I(p,0))),o=T(n,v,r==i),n=0,++r}++n,++e}return C.join("")}if(a={version:"1.3.2",ucs2:{decode:O,encode:k},decode:D,encode:L,toASCII:function(t){return B(t,function(t){return m.test(t)?"xn--"+L(t):t})},toUnicode:function(t){return B(t,function(t){return y.test(t)?D(t.slice(4).toLowerCase()):t})}},r&&i)if(t.exports==r)i.exports=a;else for(s in a)a.hasOwnProperty(s)&&(r[s]=a[s]);else n.punycode=a}(p)}),d={isString:function(t){return"string"==typeof t},isObject:function(t){return"object"==typeof t&&null!==t},isNull:function(t){return null===t},isNullOrUndefined:function(t){return null==t}};function _(t,e){return Object.prototype.hasOwnProperty.call(t,e)}var g=function(t,e,n,r){e=e||"&",n=n||"=";var i={};if("string"!=typeof t||0===t.length)return i;var o=/\+/g;t=t.split(e);var a=1e3;r&&"number"==typeof r.maxKeys&&(a=r.maxKeys);var s=t.length;a>0&&s>a&&(s=a);for(var l=0;l=0?(c=h.substr(0,f),u=h.substr(f+1)):(c=h,u=""),p=decodeURIComponent(c),A=decodeURIComponent(u),_(i,p)?Array.isArray(i[p])?i[p].push(A):i[p]=[i[p],A]:i[p]=A}return i},y=function(t){switch(typeof t){case"string":return t;case"boolean":return t?"true":"false";case"number":return isFinite(t)?t:"";default:return""}},m=function(t,e,n,r){return e=e||"&",n=n||"=",null===t&&(t=void 0),"object"==typeof t?Object.keys(t).map(function(r){var i=encodeURIComponent(y(r))+n;return Array.isArray(t[r])?t[r].map(function(t){return i+encodeURIComponent(y(t))}).join(e):i+encodeURIComponent(y(t[r]))}).join(e):r?encodeURIComponent(y(r))+n+encodeURIComponent(y(t)):""},v=h(function(t,e){e.decode=e.parse=g,e.encode=e.stringify=m}),b=(v.decode,v.parse,v.encode,v.stringify,U),w=function(t,e){return U(t,!1,!0).resolve(e)},x=function(t,e){if(!t)return e;return U(t,!1,!0).resolveObject(e)},E=function(t){d.isString(t)&&(t=U(t));if(!(t instanceof C))return C.prototype.format.call(t);return t.format()},M=C;function C(){this.protocol=null,this.slashes=null,this.auth=null,this.host=null,this.port=null,this.hostname=null,this.hash=null,this.search=null,this.query=null,this.pathname=null,this.path=null,this.href=null}var B=/^([a-z0-9.+-]+:)/i,O=/:[0-9]*$/,k=/^(\/\/?(?!\/)[^\?\s]*)(\?[^\s]*)?$/,P=["{","}","|","\\","^","`"].concat(["<",">",'"',"`"," ","\r","\n","\t"]),I=["'"].concat(P),T=["%","/","?",";","#"].concat(I),D=["/","?","#"],L=/^[+a-z0-9A-Z_-]{0,63}$/,S=/^([+a-z0-9A-Z_-]{0,63})(.*)$/,z={javascript:!0,"javascript:":!0},R={javascript:!0,"javascript:":!0},j={http:!0,https:!0,ftp:!0,gopher:!0,file:!0,"http:":!0,"https:":!0,"ftp:":!0,"gopher:":!0,"file:":!0};function U(t,e,n){if(t&&d.isObject(t)&&t instanceof C)return t;var r=new C;return r.parse(t,e,n),r}C.prototype.parse=function(t,e,n){if(!d.isString(t))throw new TypeError("Parameter 'url' must be a string, not "+typeof t);var r=t.indexOf("?"),i=-1!==r&&r127?x+="x":x+=w[E];if(!x.match(L)){var C=m.slice(0,_),O=m.slice(_+1),P=w.match(S);P&&(C.push(P[1]),O.unshift(P[2])),O.length&&(a="/"+O.join(".")+a),this.hostname=C.join(".");break}}}this.hostname.length>255?this.hostname="":this.hostname=this.hostname.toLowerCase(),y||(this.hostname=f.toASCII(this.hostname));var U=this.port?":"+this.port:"",F=this.hostname||"";this.host=F+U,this.href+=this.host,y&&(this.hostname=this.hostname.substr(1,this.hostname.length-2),"/"!==a[0]&&(a="/"+a))}if(!z[c])for(_=0,b=I.length;_0)&&n.host.split("@"))&&(n.auth=B.shift(),n.host=n.hostname=B.shift());return n.search=t.search,n.query=t.query,d.isNull(n.pathname)&&d.isNull(n.search)||(n.path=(n.pathname?n.pathname:"")+(n.search?n.search:"")),n.href=n.format(),n}if(!v.length)return n.pathname=null,n.search?n.path="/"+n.search:n.path=null,n.href=n.format(),n;for(var w=v.slice(-1)[0],x=(n.host||t.host||v.length>1)&&("."===w||".."===w)||""===w,E=0,M=v.length;M>=0;M--)"."===(w=v[M])?v.splice(M,1):".."===w?(v.splice(M,1),E++):E&&(v.splice(M,1),E--);if(!y&&!m)for(;E--;E)v.unshift("..");!y||""===v[0]||v[0]&&"/"===v[0].charAt(0)||v.unshift(""),x&&"/"!==v.join("/").substr(-1)&&v.push("");var B,O=""===v[0]||v[0]&&"/"===v[0].charAt(0);b&&(n.hostname=n.host=O?"":v.length?v.shift():"",(B=!!(n.host&&n.host.indexOf("@")>0)&&n.host.split("@"))&&(n.auth=B.shift(),n.host=n.hostname=B.shift()));return(y=y||n.host&&v.length)&&!O&&v.unshift(""),v.length?n.pathname=v.join("/"):(n.pathname=null,n.path=null),d.isNull(n.pathname)&&d.isNull(n.search)||(n.path=(n.pathname?n.pathname:"")+(n.search?n.search:"")),n.auth=t.auth||n.auth,n.slashes=n.slashes||t.slashes,n.href=n.format(),n},C.prototype.parseHost=function(){var t=this.host,e=O.exec(t);e&&(":"!==(e=e[0])&&(this.port=e.substr(1)),t=t.substr(0,t.length-e.length)),t&&(this.hostname=t)};var F={parse:b,resolve:w,resolveObject:x,format:E,Url:M};function Q(t,e){for(var n in t.layers)e(t.layers[n]),Q(t.layers[n],e)}function K(t,e){for(var n in t)0===n.indexOf("layout")&&e(t[n],n)}function W(t,e){for(var n in t)0===n.indexOf("paint")&&e(t[n],n)}function H(t,e){return"string"==typeof e&&"@"===e[0]?H(t,t.constants[e]):e}function V(t,e,n){function r(t,e){Object.keys(e).forEach(function(t){n({key:t,value:e[t],reference:function(t){for(var e=0;e=0;n--){if("symbol"!==t.layers[n].type){e=n+1;break}}var r=t.layers.splice(e);return r.reverse(),t.layers=t.layers.concat(r),t}function q(t,e){if(Array.isArray(t)){if(!Array.isArray(e)||t.length!==e.length)return!1;for(var n=0;n0;)e[n]=arguments[n+1];for(var r=0,i=e;r":"value"===t.itemType.kind?"array":"array<"+e+">"}return t.kind}var yt=[lt,ct,ut,pt,At,ht,_t(ft)];function mt(t,e){if("error"===e.kind)return null;if("array"===t.kind){if("array"===e.kind&&!mt(t.itemType,e.itemType)&&("number"!=typeof t.N||t.N===e.N))return null}else{if(t.kind===e.kind)return null;if("value"===t.kind)for(var n=0,r=yt;n255?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 l=i.indexOf("("),c=i.indexOf(")");if(-1!==l&&c+1===i.length){var u=i.substr(0,l),p=i.substr(l+1,c-(l+1)).split(","),A=1;switch(u){case"rgba":if(4!==p.length)return null;A=a(p.pop());case"rgb":return 3!==p.length?null:[o(p[0]),o(p[1]),o(p[2]),A];case"hsla":if(4!==p.length)return null;A=a(p.pop());case"hsl":if(3!==p.length)return null;var h=(parseFloat(p[0])%360+360)%360/360,f=a(p[1]),d=a(p[2]),_=d<=.5?d*(f+1):d+f-d*f,g=2*d-_;return[r(255*s(g,_,h+1/3)),r(255*s(g,_,h)),r(255*s(g,_,h-1/3)),A];default:return null}}return null}}catch(t){}}).parseCSSColor,bt=function(t,e,n,r){void 0===r&&(r=1),this.r=t,this.g=e,this.b=n,this.a=r};bt.parse=function(t){if(t){if(t instanceof bt)return t;if("string"==typeof t){var e=vt(t);if(e)return new bt(e[0]/255*e[3],e[1]/255*e[3],e[2]/255*e[3],e[3])}}},bt.prototype.toString=function(){var t=this.toArray(),e=t[0],n=t[1],r=t[2],i=t[3];return"rgba("+Math.round(e)+","+Math.round(n)+","+Math.round(r)+","+i+")"},bt.prototype.toArray=function(){var t=this.r,e=this.g,n=this.b,r=this.a;return 0===r?[0,0,0,0]:[255*t/r,255*e/r,255*n/r,r]},bt.black=new bt(0,0,0,1),bt.white=new bt(1,1,1,1),bt.transparent=new bt(0,0,0,0);var wt=function(t,e,n){this.sensitivity=t?e?"variant":"case":e?"accent":"base",this.locale=n,this.collator=new Intl.Collator(this.locale?this.locale:[],{sensitivity:this.sensitivity,usage:"search"})};wt.prototype.compare=function(t,e){return this.collator.compare(t,e)},wt.prototype.resolvedLocale=function(){return new Intl.Collator(this.locale?this.locale:[]).resolvedOptions().locale};var xt=function(t,e,n){this.type=dt,this.locale=n,this.caseSensitive=t,this.diacriticSensitive=e};function Et(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 ["+[t,e,n,r].join(", ")+"]: 'a' must be between 0 and 1.":"Invalid rgba value ["+("number"==typeof r?[t,e,n,r]:[t,e,n]).join(", ")+"]: 'r', 'g', and 'b' must be between 0 and 255."}function Mt(t){if(null===t)return lt;if("string"==typeof t)return ut;if("boolean"==typeof t)return pt;if("number"==typeof t)return ct;if(t instanceof bt)return At;if(t instanceof wt)return dt;if(Array.isArray(t)){for(var e,n=t.length,r=0,i=t;r4)return e.error("Expected 1, 2, or 3 arguments, but found "+(t.length-1)+" instead.");var n,r;if(t.length>2){var i=t[1];if("string"!=typeof i||!(i in Pt))return e.error('The item type argument of "array" must be one of string, number, boolean',1);n=Pt[i]}else n=ft;if(t.length>3){if("number"!=typeof t[2]||t[2]<0||t[2]!==Math.floor(t[2]))return e.error('The length argument to "array" must be a positive integer literal',2);r=t[2]}var o=_t(n,r),a=e.parse(t[t.length-1],t.length-1,ft);return a?new It(o,a):null},It.prototype.evaluate=function(t){var e=this.input.evaluate(t);if(mt(this.type,Mt(e)))throw new Bt("Expected value to be of type "+gt(this.type)+", but found "+gt(Mt(e))+" instead.");return e},It.prototype.eachChild=function(t){t(this.input)},It.prototype.possibleOutputs=function(){return this.input.possibleOutputs()},It.prototype.serialize=function(){var t=["array"],e=this.type.itemType;if("string"===e.kind||"number"===e.kind||"boolean"===e.kind){t.push(e.kind);var n=this.type.N;"number"==typeof n&&t.push(n)}return t.push(this.input.serialize()),t};var Tt={"to-number":ct,"to-color":At},Dt=function(t,e){this.type=t,this.args=e};Dt.parse=function(t,e){if(t.length<2)return e.error("Expected at least one argument.");for(var n=t[0],r=Tt[n],i=[],o=1;o4?"Invalid rbga value "+JSON.stringify(e)+": expected an array containing either three or four numeric values.":Et(e[0],e[1],e[2],e[3])))return new bt(e[0]/255,e[1]/255,e[2]/255,e[3])}throw new Bt(n||"Could not parse color from value '"+("string"==typeof e?e:JSON.stringify(e))+"'")}for(var a=null,s=0,l=this.args;s=0)return!1;var n=!0;return t.eachChild(function(t){n&&!jt(t,e)&&(n=!1)}),n}zt.prototype.evaluate=function(t){return this._evaluate(t,this.args)},zt.prototype.eachChild=function(t){this.args.forEach(t)},zt.prototype.possibleOutputs=function(){return[void 0]},zt.prototype.serialize=function(){return[this.name].concat(this.args.map(function(t){return t.serialize()}))},zt.parse=function(t,e){var n=t[0],r=zt.definitions[n];if(!r)return e.error('Unknown expression "'+n+'". If you wanted a literal array, use ["literal", [...]].',0);for(var i=Array.isArray(r)?r[0]:r.type,o=Array.isArray(r)?[[r[1],r[2]]]:r.overloads,a=o.filter(function(e){var n=e[0];return!Array.isArray(n)||n.length===t.length-1}),s=[],l=1;ln&&ee))throw new Bt("Input is not a number.");o=a-1}}return Math.max(a-1,0)}Ft.prototype.parse=function(t,e,n,r,i){return void 0===i&&(i={}),e?this.concat(e,n,r)._parse(t,i):this._parse(t,i)},Ft.prototype._parse=function(t,e){if(null!==t&&"string"!=typeof t&&"boolean"!=typeof t&&"number"!=typeof t||(t=["literal",t]),Array.isArray(t)){if(0===t.length)return this.error('Expected an array with at least one element. If you wanted a literal array, use ["literal", []].');var n=t[0];if("string"!=typeof n)return this.error("Expression name must be a string, but found "+typeof n+' instead. If you wanted a literal array, use ["literal", [...]].',0),null;var r=this.registry[n];if(r){var i=r.parse(t,this);if(!i)return null;if(this.expectedType){var o=this.expectedType,a=i.type;if("string"!==o.kind&&"number"!==o.kind&&"boolean"!==o.kind&&"object"!==o.kind||"value"!==a.kind)if("array"===o.kind&&"value"===a.kind)e.omitTypeAnnotations||(i=new It(o,i));else if("color"!==o.kind||"value"!==a.kind&&"string"!==a.kind){if(this.checkSubtype(this.expectedType,i.type))return null}else e.omitTypeAnnotations||(i=new Dt(o,[i]));else e.omitTypeAnnotations||(i=new kt(o,[i]))}if(!(i instanceof Ct)&&function t(e){if(e instanceof Ut)return t(e.boundExpression);if(e instanceof zt&&"error"===e.name)return!1;if(e instanceof xt)return!1;var n=e instanceof Dt||e instanceof kt||e instanceof It;var r=!0;e.eachChild(function(e){r=n?r&&t(e):r&&e instanceof Ct});if(!r)return!1;return Rt(e)&&jt(e,["zoom","heatmap-density","line-progress","is-supported-script"])}(i)){var s=new St;try{i=new Ct(i.type,i.evaluate(s))}catch(t){return this.error(t.message),null}}return i}return this.error('Unknown expression "'+n+'". If you wanted a literal array, use ["literal", [...]].',0)}return void 0===t?this.error("'undefined' value invalid. Use null instead."):"object"==typeof t?this.error('Bare objects invalid. Use ["literal", {...}] instead.'):this.error("Expected an array, but found "+typeof t+" instead.")},Ft.prototype.concat=function(t,e,n){var r="number"==typeof t?this.path.concat(t):this.path,i=n?this.scope.concat(n):this.scope;return new Ft(this.registry,r,e||null,i,this.errors)},Ft.prototype.error=function(t){for(var e=[],n=arguments.length-1;n-- >0;)e[n]=arguments[n+1];var r=""+this.key+e.map(function(t){return"["+t+"]"}).join("");this.errors.push(new at(r,t))},Ft.prototype.checkSubtype=function(t,e){var n=mt(t,e);return n&&this.error(n),n};var Kt=function(t,e,n){this.type=t,this.input=e,this.labels=[],this.outputs=[];for(var r=0,i=n;r=s)return e.error('Input/output pairs for "step" expressions must be arranged with input values in strictly ascending order.',c);var p=e.parse(l,u,o);if(!p)return null;o=o||p.type,i.push([s,p])}return new Kt(o,n,i)},Kt.prototype.evaluate=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[Qt(e,r)].evaluate(t)},Kt.prototype.eachChild=function(t){t(this.input);for(var e=0,n=this.outputs;e0&&t.push(this.labels[e]),t.push(this.outputs[e].serialize());return t};var Wt=Ht;function Ht(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}function Vt(t,e,n){return t*(1-n)+e*n}Ht.prototype.sampleCurveX=function(t){return((this.ax*t+this.bx)*t+this.cx)*t},Ht.prototype.sampleCurveY=function(t){return((this.ay*t+this.by)*t+this.cy)*t},Ht.prototype.sampleCurveDerivativeX=function(t){return(3*this.ax*t+2*this.bx)*t+this.cx},Ht.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)r)return r;for(;no?n=i:r=i,i=.5*(r-n)+n}return i},Ht.prototype.solve=function(t,e){return this.sampleCurveY(this.solveCurveX(t,e))};var Nt=Object.freeze({number:Vt,color:function(t,e,n){return new bt(Vt(t.r,e.r,n),Vt(t.g,e.g,n),Vt(t.b,e.b,n),Vt(t.a,e.a,n))},array:function(t,e,n){return t.map(function(t,r){return Vt(t,e[r],n)})}}),Gt=function(t,e,n,r){this.type=t,this.interpolation=e,this.input=n,this.labels=[],this.outputs=[];for(var i=0,o=r;i1}))return e.error("Cubic bezier interpolation requires four numeric arguments with values between 0 and 1.",1);n={name:"cubic-bezier",controlPoints:a}}if(t.length-1<4)return e.error("Expected at least 4 arguments, but found only "+(t.length-1)+".");if((t.length-1)%2!=0)return e.error("Expected an even number of arguments.");if(!(r=e.parse(r,2,ct)))return null;var s=[],l=null;e.expectedType&&"value"!==e.expectedType.kind&&(l=e.expectedType);for(var c=0;c=u)return e.error('Input/output pairs for "interpolate" expressions must be arranged with input values in strictly ascending order.',A);var f=e.parse(p,h,l);if(!f)return null;l=l||f.type,s.push([u,f])}return"number"===l.kind||"color"===l.kind||"array"===l.kind&&"number"===l.itemType.kind&&"number"==typeof l.N?new Gt(l,n,r,s):e.error("Type "+gt(l)+" is not interpolatable.")},Gt.prototype.evaluate=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;if(r>=e[i-1])return n[i-1].evaluate(t);var o=Qt(e,r),a=e[o],s=e[o+1],l=Gt.interpolationFactor(this.interpolation,r,a,s),c=n[o].evaluate(t),u=n[o+1].evaluate(t);return Nt[this.type.kind.toLowerCase()](c,u,l)},Gt.prototype.eachChild=function(t){t(this.input);for(var e=0,n=this.outputs;e=n.length)throw new Bt("Array index out of bounds: "+e+" > "+(n.length-1)+".");if(e!==Math.floor(e))throw new Bt("Array index must be an integer, but found "+e+" instead.");return n[e]},Zt.prototype.eachChild=function(t){t(this.index),t(this.input)},Zt.prototype.possibleOutputs=function(){return[void 0]},Zt.prototype.serialize=function(){return["at",this.index.serialize(),this.input.serialize()]};var Jt=function(t,e,n,r,i,o){this.inputType=t,this.type=e,this.input=n,this.cases=r,this.outputs=i,this.otherwise=o};Jt.parse=function(t,e){if(t.length<5)return e.error("Expected at least 4 arguments, but found only "+(t.length-1)+".");if(t.length%2!=1)return e.error("Expected an even number of arguments.");var n,r;e.expectedType&&"value"!==e.expectedType.kind&&(r=e.expectedType);for(var i={},o=[],a=2;aNumber.MAX_SAFE_INTEGER)return c.error("Branch labels must be integers no larger than "+Number.MAX_SAFE_INTEGER+".");if("number"==typeof A&&Math.floor(A)!==A)return c.error("Numeric branch labels must be integer values.");if(n){if(c.checkSubtype(n,Mt(A)))return null}else n=Mt(A);if(void 0!==i[String(A)])return c.error("Branch labels must be unique.");i[String(A)]=o.length}var h=e.parse(l,a,r);if(!h)return null;r=r||h.type,o.push(h)}var f=e.parse(t[1],1,n);if(!f)return null;var d=e.parse(t[t.length-1],t.length-1,r);return d?new Jt(n,r,f,i,o,d):null},Jt.prototype.evaluate=function(t){var e=this.input.evaluate(t);return(this.outputs[this.cases[e]]||this.otherwise).evaluate(t)},Jt.prototype.eachChild=function(t){t(this.input),this.outputs.forEach(t),t(this.otherwise)},Jt.prototype.possibleOutputs=function(){return(t=[]).concat.apply(t,this.outputs.map(function(t){return t.possibleOutputs()})).concat(this.otherwise.possibleOutputs());var t},Jt.prototype.serialize=function(){for(var t=this,e=["match",this.input.serialize()],n=[],r={},i=0,o=Object.keys(this.cases).sort();ir.evaluate(t)}function pe(t,e){var n=e[0],r=e[1];return n.evaluate(t)<=r.evaluate(t)}function Ae(t,e){var n=e[0],r=e[1];return n.evaluate(t)>=r.evaluate(t)}function he(t){return{type:t}}function fe(t){return{result:"success",value:t}}function de(t){return{result:"error",value:t}}zt.register(oe,{error:[{kind:"error"},[ut],function(t,e){var n=e[0];throw new Bt(n.evaluate(t))}],typeof:[ut,[ft],function(t,e){return gt(Mt(e[0].evaluate(t)))}],"to-string":[ut,[ft],function(t,e){var n=e[0],r=typeof(n=n.evaluate(t));return null===n?"":"string"===r||"number"===r||"boolean"===r?String(n):n instanceof bt?n.toString():JSON.stringify(n)}],"to-boolean":[pt,[ft],function(t,e){var n=e[0];return Boolean(n.evaluate(t))}],"to-rgba":[_t(ct,4),[At],function(t,e){return e[0].evaluate(t).toArray()}],rgb:[At,[ct,ct,ct],ae],rgba:[At,[ct,ct,ct,ct],ae],has:{type:pt,overloads:[[[ut],function(t,e){return se(e[0].evaluate(t),t.properties())}],[[ut,ht],function(t,e){var n=e[0],r=e[1];return se(n.evaluate(t),r.evaluate(t))}]]},get:{type:ft,overloads:[[[ut],function(t,e){return le(e[0].evaluate(t),t.properties())}],[[ut,ht],function(t,e){var n=e[0],r=e[1];return le(n.evaluate(t),r.evaluate(t))}]]},properties:[ht,[],function(t){return t.properties()}],"geometry-type":[ut,[],function(t){return t.geometryType()}],id:[ft,[],function(t){return t.id()}],zoom:[ct,[],function(t){return t.globals.zoom}],"heatmap-density":[ct,[],function(t){return t.globals.heatmapDensity||0}],"line-progress":[ct,[],function(t){return t.globals.lineProgress||0}],"+":[ct,he(ct),function(t,e){for(var n=0,r=0,i=e;r":[pt,[ut,ft],function(t,e){var n=e[0],r=e[1],i=t.properties()[n.value],o=r.value;return typeof i==typeof o&&i>o}],"filter-id->":[pt,[ft],function(t,e){var n=e[0],r=t.id(),i=n.value;return typeof r==typeof i&&r>i}],"filter-<=":[pt,[ut,ft],function(t,e){var n=e[0],r=e[1],i=t.properties()[n.value],o=r.value;return typeof i==typeof o&&i<=o}],"filter-id-<=":[pt,[ft],function(t,e){var n=e[0],r=t.id(),i=n.value;return typeof r==typeof i&&r<=i}],"filter->=":[pt,[ut,ft],function(t,e){var n=e[0],r=e[1],i=t.properties()[n.value],o=r.value;return typeof i==typeof o&&i>=o}],"filter-id->=":[pt,[ft],function(t,e){var n=e[0],r=t.id(),i=n.value;return typeof r==typeof i&&r>=i}],"filter-has":[pt,[ft],function(t,e){return e[0].value in t.properties()}],"filter-has-id":[pt,[],function(t){return null!==t.id()}],"filter-type-in":[pt,[_t(ut)],function(t,e){return e[0].value.indexOf(t.geometryType())>=0}],"filter-id-in":[pt,[_t(ft)],function(t,e){return e[0].value.indexOf(t.id())>=0}],"filter-in-small":[pt,[ut,_t(ft)],function(t,e){var n=e[0];return e[1].value.indexOf(t.properties()[n.value])>=0}],"filter-in-large":[pt,[ut,_t(ft)],function(t,e){var n=e[0],r=e[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()[n.value],r.value,0,r.value.length-1)}],">":{type:pt,overloads:[[[ct,ct],ue],[[ut,ut],ue],[[ut,ut,dt],function(t,e){var n=e[0],r=e[1];return e[2].evaluate(t).compare(n.evaluate(t),r.evaluate(t))>0}]]},"<":{type:pt,overloads:[[[ct,ct],ce],[[ut,ut],ce],[[ut,ut,dt],function(t,e){var n=e[0],r=e[1];return e[2].evaluate(t).compare(n.evaluate(t),r.evaluate(t))<0}]]},">=":{type:pt,overloads:[[[ct,ct],Ae],[[ut,ut],Ae],[[ut,ut,dt],function(t,e){var n=e[0],r=e[1];return e[2].evaluate(t).compare(n.evaluate(t),r.evaluate(t))>=0}]]},"<=":{type:pt,overloads:[[[ct,ct],pe],[[ut,ut],pe],[[ut,ut,dt],function(t,e){var n=e[0],r=e[1];return e[2].evaluate(t).compare(n.evaluate(t),r.evaluate(t))<=0}]]},all:{type:pt,overloads:[[[pt,pt],function(t,e){var n=e[0],r=e[1];return n.evaluate(t)&&r.evaluate(t)}],[he(pt),function(t,e){for(var n=0,r=e;nwe?Math.pow(t,1/3):t/be+me}function Ce(t){return t>ve?t*t*t:be*(t-me)}function Be(t){return 255*(t<=.0031308?12.92*t:1.055*Math.pow(t,1/2.4)-.055)}function Oe(t){return(t/=255)<=.04045?t/12.92:Math.pow((t+.055)/1.055,2.4)}function ke(t){var e=Oe(t.r),n=Oe(t.g),r=Oe(t.b),i=Me((.4124564*e+.3575761*n+.1804375*r)/_e),o=Me((.2126729*e+.7151522*n+.072175*r)/ge);return{l:116*o-16,a:500*(i-o),b:200*(o-Me((.0193339*e+.119192*n+.9503041*r)/ye)),alpha:t.a}}function Pe(t){var e=(t.l+16)/116,n=isNaN(t.a)?e:e+t.a/500,r=isNaN(t.b)?e:e-t.b/200;return e=ge*Ce(e),n=_e*Ce(n),r=ye*Ce(r),new bt(Be(3.2404542*n-1.5371385*e-.4985314*r),Be(-.969266*n+1.8760108*e+.041556*r),Be(.0556434*n-.2040259*e+1.0572252*r),t.alpha)}var Ie={forward:ke,reverse:Pe,interpolate:function(t,e,n){return{l:Vt(t.l,e.l,n),a:Vt(t.a,e.a,n),b:Vt(t.b,e.b,n),alpha:Vt(t.alpha,e.alpha,n)}}},Te={forward:function(t){var e=ke(t),n=e.l,r=e.a,i=e.b,o=Math.atan2(i,r)*Ee;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*xe,n=t.c;return Pe({l:t.l,a:Math.cos(e)*n,b:Math.sin(e)*n,alpha:t.alpha})},interpolate:function(t,e,n){return{h:function(t,e,n){var r=e-t;return t+n*(r>180||r<-180?r-360*Math.round(r/360):r)}(t.h,e.h,n),c:Vt(t.c,e.c,n),l:Vt(t.l,e.l,n),alpha:Vt(t.alpha,e.alpha,n)}}},De=Object.freeze({lab:Ie,hcl:Te});function Le(t){return t instanceof Number?"number":t instanceof String?"string":t instanceof Boolean?"boolean":Array.isArray(t)?"array":null===t?"null":typeof t}function Se(t){return"object"==typeof t&&null!==t&&!Array.isArray(t)}function ze(t){return t}function Re(t,e){var n,r,i,o="color"===e.type,a=t.stops&&"object"==typeof t.stops[0][0],s=a||void 0!==t.property,l=a||!s,c=t.type||("interpolated"===e.function?"exponential":"interval");if(o&&((t=ot({},t)).stops&&(t.stops=t.stops.map(function(t){return[t[0],bt.parse(t[1])]})),t.default?t.default=bt.parse(t.default):t.default=bt.parse(e.default)),t.colorSpace&&"rgb"!==t.colorSpace&&!De[t.colorSpace])throw new Error("Unknown color space: "+t.colorSpace);if("exponential"===c)n=Qe;else if("interval"===c)n=Fe;else if("categorical"===c){n=Ue,r=Object.create(null);for(var u=0,p=t.stops;u=t.stops[r-1][0])return t.stops[r-1][1];var i=We(t.stops,n);return t.stops[i][1]}function Qe(t,e,n){var r=void 0!==t.base?t.base:1;if("number"!==Le(n))return je(t.default,e.default);var i=t.stops.length;if(1===i)return t.stops[0][1];if(n<=t.stops[0][0])return t.stops[0][1];if(n>=t.stops[i-1][0])return t.stops[i-1][1];var o=We(t.stops,n),a=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[o][0],t.stops[o+1][0]),s=t.stops[o][1],l=t.stops[o+1][1],c=Nt[e.type]||ze;if(t.colorSpace&&"rgb"!==t.colorSpace){var u=De[t.colorSpace];c=function(t,e){return u.reverse(u.interpolate(u.forward(t),u.forward(e),a))}}return"function"==typeof s.evaluate?{evaluate:function(){for(var t=[],e=arguments.length;e--;)t[e]=arguments[e];var n=s.evaluate.apply(void 0,t),r=l.evaluate.apply(void 0,t);if(void 0!==n&&void 0!==r)return c(n,r,a)}}:c(s,l,a)}function Ke(t,e,n){return"color"===e.type?n=bt.parse(n):Le(n)===e.type||"enum"===e.type&&e.values[n]||(n=void 0),je(n,t.default,e.default)}function We(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&&ee&&(o=a-1)}return Math.max(a-1,0)}var He=function(t,e){this.expression=t,this._warningHistory={},this._defaultValue=function(t){return"color"===t.type&&Se(t.default)?new bt(0,0,0,0):"color"===t.type?bt.parse(t.default)||null:void 0===t.default?null:t.default}(e),"enum"===e.type&&(this._enumValues=e.values)};function Ve(t){return Array.isArray(t)&&t.length>0&&"string"==typeof t[0]&&t[0]in oe}function Ne(t,e){var n=new Ft(oe,[],function(t){var e={color:At,string:ut,number:ct,enum:ut,boolean:pt};if("array"===t.type)return _t(e[t.value]||ft,t.length);return e[t.type]||null}(e)),r=n.parse(t);return r?fe(new He(r,e)):de(n.errors)}He.prototype.evaluateWithoutErrorHandling=function(t,e){return this._evaluator||(this._evaluator=new St),this._evaluator.globals=t,this._evaluator.feature=e,this.expression.evaluate(this._evaluator)},He.prototype.evaluate=function(t,e){this._evaluator||(this._evaluator=new St),this._evaluator.globals=t,this._evaluator.feature=e;try{var n=this.expression.evaluate(this._evaluator);if(null===n||void 0===n)return this._defaultValue;if(this._enumValues&&!(n in this._enumValues))throw new Bt("Expected value to be one of "+Object.keys(this._enumValues).map(function(t){return JSON.stringify(t)}).join(", ")+", but found "+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}};var Ge=function(t,e){this.kind=t,this._styleExpression=e};Ge.prototype.evaluateWithoutErrorHandling=function(t,e){return this._styleExpression.evaluateWithoutErrorHandling(t,e)},Ge.prototype.evaluate=function(t,e){return this._styleExpression.evaluate(t,e)};var qe=function(t,e,n){this.kind=t,this.zoomStops=n.labels,this._styleExpression=e,n instanceof Gt&&(this._interpolationType=n.interpolation)};function Xe(t,e){if("error"===(t=Ne(t,e)).result)return t;var n=t.value.expression,r=Rt(n);if(!r&&!e["property-function"])return de([new at("","property expressions not supported")]);var i=jt(n,["zoom"]);if(!i&&!1===e["zoom-function"])return de([new at("","zoom expressions not supported")]);var o=function t(e){var n=null;if(e instanceof Yt)n=t(e.result);else if(e instanceof Xt)for(var r=0,i=e.args;r=2&&"$id"!==t[1]&&"$type"!==t[1];case"in":case"!in":case"!has":case"none":return!1;case"==":case"!=":case">":case">=":case"<":case"<=":return 3===t.length&&(Array.isArray(t[1])||Array.isArray(t[2]));case"any":case"all":for(var e=0,n=t.slice(1);ee?1:0}function tn(t){if(!t)return!0;var e=t[0];return t.length<=1?"any"!==e:"=="===e?en(t[1],t[2],"=="):"!="===e?on(en(t[1],t[2],"==")):"<"===e||">"===e||"<="===e||">="===e?en(t[1],t[2],e):"any"===e?function(t){return["any"].concat(t.map(tn))}(t.slice(1)):"all"===e?["all"].concat(t.slice(1).map(tn)):"none"===e?["all"].concat(t.slice(1).map(tn).map(on)):"in"===e?nn(t[1],t.slice(2)):"!in"===e?on(nn(t[1],t.slice(2))):"has"===e?rn(t[1]):"!has"!==e||on(rn(t[1]))}function en(t,e,n){switch(t){case"$type":return["filter-type-"+n,e];case"$id":return["filter-id-"+n,e];default:return["filter-"+n,t,e]}}function nn(t,e){if(0===e.length)return!1;switch(t){case"$type":return["filter-type-in",["literal",e]];case"$id":return["filter-id-in",["literal",e]];default:return e.length>200&&!e.some(function(t){return typeof t!=typeof e[0]})?["filter-in-large",t,["literal",e.sort($e)]]:["filter-in-small",t,["literal",e]]}}function rn(t){switch(t){case"$type":return!0;case"$id":return["filter-has-id"];default:return["filter-has",t]}}function on(t){return["!",t]}function an(t,e){return void 0===t||null===t?null:"color"===e.type?t:"array"===e.type?["literal",t]:t}function sn(t,e,n,r){var i,o=un(t,e),a=typeof n[0][0],s=[a,["get",t.property]],l=!1;if("categorical"===o&&"boolean"===a)return!1===t.stops[0][0]&&(s=["!",s]),i=["case",s,t.stops[0][1]],t.stops.length>1?i.push(t.stops[1][1]):i.push(r),i;if("categorical"===o)i=["match",s];else if("interval"===o)i=["step",s],l=!0;else{if("exponential"!==o)throw new Error("Unknown property function type "+o);i=["interpolate",["exponential",void 0!==t.base?t.base:1],s]}for(var c=0,u=n;c3&&e===t[t.length-2]||(r&&2===t.length||t.push(e),t.push(n))}function un(t,e){return t.type?t.type:e.function?"interpolated"===e.function?"exponential":"interval":"exponential"}function pn(t){var e=t.key,n=t.value;return n?[new rt(e,n,"constants have been deprecated as of v8")]:[]}function An(t){return t instanceof Number||t instanceof String||t instanceof Boolean?t.valueOf():t}function hn(t){return Array.isArray(t)?t.map(hn):An(t)}function fn(t){var e=t.key,n=t.value,r=t.valueSpec||{},i=t.objectElementValidators||{},o=t.style,a=t.styleSpec,s=[],l=Le(n);if("object"!==l)return[new rt(e,n,"object expected, "+l+" found")];for(var c in n){var u=c.split(".")[0],p=r[u]||r["*"],A=void 0;if(i[u])A=i[u];else if(r[u])A=kn;else if(i["*"])A=i["*"];else{if(!r["*"]){s.push(new rt(e,n[c],'unknown property "'+c+'"'));continue}A=kn}s=s.concat(A({key:(e?e+".":e)+c,value:n[c],valueSpec:p,style:o,styleSpec:a,object:n,objectKey:c},n))}for(var h in r)i[h]||r[h].required&&void 0===r[h].default&&void 0===n[h]&&s.push(new rt(e,n,'missing required property "'+h+'"'));return s}function dn(t){var e=t.value,n=t.valueSpec,r=t.style,i=t.styleSpec,o=t.key,a=t.arrayElementValidator||kn;if("array"!==Le(e))return[new rt(o,e,"array expected, "+Le(e)+" found")];if(n.length&&e.length!==n.length)return[new rt(o,e,"array length "+n.length+" expected, length "+e.length+" found")];if(n["min-length"]&&e.lengthr.maximum?[new rt(e,n,n+" is greater than the maximum value "+r.maximum)]:[]}function gn(t){var e,n,r,i=t.valueSpec,o=An(t.value.type),a={},s="categorical"!==o&&void 0===t.value.property,l=!s,c="array"===Le(t.value.stops)&&"array"===Le(t.value.stops[0])&&"object"===Le(t.value.stops[0][0]),u=fn({key:t.key,value:t.value,valueSpec:t.styleSpec.function,style:t.style,styleSpec:t.styleSpec,objectElementValidators:{stops:function(t){if("identity"===o)return[new rt(t.key,t.value,'identity function may not have a "stops" property')];var e=[],n=t.value;e=e.concat(dn({key:t.key,value:n,valueSpec:t.valueSpec,style:t.style,styleSpec:t.styleSpec,arrayElementValidator:p})),"array"===Le(n)&&0===n.length&&e.push(new rt(t.key,n,"array must have at least one stop"));return e},default:function(t){return kn({key:t.key,value:t.value,valueSpec:i,style:t.style,styleSpec:t.styleSpec})}}});return"identity"===o&&s&&u.push(new rt(t.key,t.value,'missing required property "property"')),"identity"===o||t.value.stops||u.push(new rt(t.key,t.value,'missing required property "stops"')),"exponential"===o&&"piecewise-constant"===t.valueSpec.function&&u.push(new rt(t.key,t.value,"exponential functions not supported")),t.styleSpec.$version>=8&&(l&&!t.valueSpec["property-function"]?u.push(new rt(t.key,t.value,"property functions not supported")):s&&!t.valueSpec["zoom-function"]&&"heatmap-color"!==t.objectKey&&"line-gradient"!==t.objectKey&&u.push(new rt(t.key,t.value,"zoom functions not supported"))),"categorical"!==o&&!c||void 0!==t.value.property||u.push(new rt(t.key,t.value,'"property" property is required')),u;function p(t){var e=[],o=t.value,s=t.key;if("array"!==Le(o))return[new rt(s,o,"array expected, "+Le(o)+" found")];if(2!==o.length)return[new rt(s,o,"array length 2 expected, length "+o.length+" found")];if(c){if("object"!==Le(o[0]))return[new rt(s,o,"object expected, "+Le(o[0])+" found")];if(void 0===o[0].zoom)return[new rt(s,o,"object stop key must have zoom")];if(void 0===o[0].value)return[new rt(s,o,"object stop key must have value")];if(r&&r>An(o[0].zoom))return[new rt(s,o[0].zoom,"stop zoom values must appear in ascending order")];An(o[0].zoom)!==r&&(r=An(o[0].zoom),n=void 0,a={}),e=e.concat(fn({key:s+"[0]",value:o[0],valueSpec:{zoom:{}},style:t.style,styleSpec:t.styleSpec,objectElementValidators:{zoom:_n,value:A}}))}else e=e.concat(A({key:s+"[0]",value:o[0],valueSpec:{},style:t.style,styleSpec:t.styleSpec},o));return e.concat(kn({key:s+"[1]",value:o[1],valueSpec:i,style:t.style,styleSpec:t.styleSpec}))}function A(t,r){var s=Le(t.value),l=An(t.value),c=null!==t.value?t.value:r;if(e){if(s!==e)return[new rt(t.key,c,s+" stop domain type must match previous stop domain type "+e)]}else e=s;if("number"!==s&&"string"!==s&&"boolean"!==s)return[new rt(t.key,c,"stop domain value must be a number, string, or boolean")];if("number"!==s&&"categorical"!==o){var u="number expected, "+s+" found";return i["property-function"]&&void 0===o&&(u+='\nIf you intended to use a categorical function, specify `"type": "categorical"`.'),[new rt(t.key,c,u)]}return"categorical"!==o||"number"!==s||isFinite(l)&&Math.floor(l)===l?"categorical"!==o&&"number"===s&&void 0!==n&&l":case">=":n.length>=2&&"$type"===An(n[1])&&a.push(new rt(r,n,'"$type" cannot be use with operator "'+n[0]+'"'));case"==":case"!=":3!==n.length&&a.push(new rt(r,n,'filter array for operator "'+n[0]+'" must have 3 elements'));case"in":case"!in":n.length>=2&&"string"!==(o=Le(n[1]))&&a.push(new rt(r+"[1]",n[1],"string expected, "+o+" found"));for(var s=2;s2&&M.push("'"+this.terminals_[w]+"'");B=p.showPosition?"Parse error on line "+(s+1)+":\n"+p.showPosition()+"\nExpecting "+M.join(", ")+", got '"+(this.terminals_[g]||g)+"'":"Parse error on line "+(s+1)+": Unexpected "+(g==c?"end of input":"'"+(this.terminals_[g]||g)+"'"),this.parseError(B,{text:p.match,token:this.terminals_[g]||g,line:p.yylineno,loc:f,expected:M})}if(v[0]instanceof Array&&v.length>1)throw new Error("Parse Error: multiple actions possible at state: "+m+", token: "+g);switch(v[0]){case 1:n.push(g),r.push(p.yytext),i.push(p.yylloc),n.push(v[1]),g=null,y?(g=y,y=null):(l=p.yyleng,a=p.yytext,s=p.yylineno,f=p.yylloc);break;case 2:if(x=this.productions_[v[1]][1],C.$=r[r.length-x],C._$={first_line:i[i.length-(x||1)].first_line,last_line:i[i.length-1].last_line,first_column:i[i.length-(x||1)].first_column,last_column:i[i.length-1].last_column},d&&(C._$.range=[i[i.length-(x||1)].range[0],i[i.length-1].range[1]]),void 0!==(b=this.performAction.apply(C,[a,l,s,A.yy,v[1],r,i].concat(u))))return b;x&&(n=n.slice(0,-1*x*2),r=r.slice(0,-1*x),i=i.slice(0,-1*x)),n.push(this.productions_[v[1]][0]),r.push(C.$),i.push(C._$),E=o[n[n.length-2]][n[n.length-1]],n.push(E);break;case 3:return!0}}return!0}},A={EOF:1,parseError:function(t,e){if(!this.yy.parser)throw new Error(t);this.yy.parser.parseError(t,e)},setInput:function(t,e){return this.yy=e||this.yy||{},this._input=t,this._more=this._backtrack=this.done=!1,this.yylineno=this.yyleng=0,this.yytext=this.matched=this.match="",this.conditionStack=["INITIAL"],this.yylloc={first_line:1,first_column:0,last_line:1,last_column:0},this.options.ranges&&(this.yylloc.range=[0,0]),this.offset=0,this},input:function(){var t=this._input[0];return this.yytext+=t,this.yyleng++,this.offset++,this.match+=t,this.matched+=t,t.match(/(?:\r\n?|\n).*/g)?(this.yylineno++,this.yylloc.last_line++):this.yylloc.last_column++,this.options.ranges&&this.yylloc.range[1]++,this._input=this._input.slice(1),t},unput:function(t){var e=t.length,n=t.split(/(?:\r\n?|\n)/g);this._input=t+this._input,this.yytext=this.yytext.substr(0,this.yytext.length-e),this.offset-=e;var r=this.match.split(/(?:\r\n?|\n)/g);this.match=this.match.substr(0,this.match.length-1),this.matched=this.matched.substr(0,this.matched.length-1),n.length-1&&(this.yylineno-=n.length-1);var i=this.yylloc.range;return this.yylloc={first_line:this.yylloc.first_line,last_line:this.yylineno+1,first_column:this.yylloc.first_column,last_column:n?(n.length===r.length?this.yylloc.first_column:0)+r[r.length-n.length].length-n[0].length:this.yylloc.first_column-e},this.options.ranges&&(this.yylloc.range=[i[0],i[0]+this.yyleng-e]),this.yyleng=this.yytext.length,this},more:function(){return this._more=!0,this},reject:function(){return this.options.backtrack_lexer?(this._backtrack=!0,this):this.parseError("Lexical error on line "+(this.yylineno+1)+". You can only invoke reject() in the lexer when the lexer is of the backtracking persuasion (options.backtrack_lexer = true).\n"+this.showPosition(),{text:"",token:null,line:this.yylineno})},less:function(t){this.unput(this.match.slice(t))},pastInput:function(){var t=this.matched.substr(0,this.matched.length-this.match.length);return(t.length>20?"...":"")+t.substr(-20).replace(/\n/g,"")},upcomingInput:function(){var t=this.match;return t.length<20&&(t+=this._input.substr(0,20-t.length)),(t.substr(0,20)+(t.length>20?"...":"")).replace(/\n/g,"")},showPosition:function(){var t=this.pastInput(),e=new Array(t.length+1).join("-");return t+this.upcomingInput()+"\n"+e+"^"},test_match:function(t,e){var n,r,i;if(this.options.backtrack_lexer&&(i={yylineno:this.yylineno,yylloc:{first_line:this.yylloc.first_line,last_line:this.last_line,first_column:this.yylloc.first_column,last_column:this.yylloc.last_column},yytext:this.yytext,match:this.match,matches:this.matches,matched:this.matched,yyleng:this.yyleng,offset:this.offset,_more:this._more,_input:this._input,yy:this.yy,conditionStack:this.conditionStack.slice(0),done:this.done},this.options.ranges&&(i.yylloc.range=this.yylloc.range.slice(0))),(r=t[0].match(/(?:\r\n?|\n).*/g))&&(this.yylineno+=r.length),this.yylloc={first_line:this.yylloc.last_line,last_line:this.yylineno+1,first_column:this.yylloc.last_column,last_column:r?r[r.length-1].length-r[r.length-1].match(/\r?\n?/)[0].length:this.yylloc.last_column+t[0].length},this.yytext+=t[0],this.match+=t[0],this.matches=t,this.yyleng=this.yytext.length,this.options.ranges&&(this.yylloc.range=[this.offset,this.offset+=this.yyleng]),this._more=!1,this._backtrack=!1,this._input=this._input.slice(t[0].length),this.matched+=t[0],n=this.performAction.call(this,this.yy,this,e,this.conditionStack[this.conditionStack.length-1]),this.done&&this._input&&(this.done=!1),n)return n;if(this._backtrack){for(var o in i)this[o]=i[o];return!1}return!1},next:function(){var t,e,n,r;if(this.done)return this.EOF;this._input||(this.done=!0),this._more||(this.yytext="",this.match="");for(var i=this._currentRules(),o=0;oe[0].length)){if(e=n,r=o,this.options.backtrack_lexer){if(!1!==(t=this.test_match(n,i[o])))return t;if(this._backtrack){e=!1;continue}return!1}if(!this.options.flex)break}return e?!1!==(t=this.test_match(e,i[r]))&&t:""===this._input?this.EOF:this.parseError("Lexical error on line "+(this.yylineno+1)+". Unrecognized text.\n"+this.showPosition(),{text:"",token:null,line:this.yylineno})},lex:function(){var t=this.next();return t||this.lex()},begin:function(t){this.conditionStack.push(t)},popState:function(){return this.conditionStack.length-1>0?this.conditionStack.pop():this.conditionStack[0]},_currentRules:function(){return this.conditionStack.length&&this.conditionStack[this.conditionStack.length-1]?this.conditions[this.conditionStack[this.conditionStack.length-1]].rules:this.conditions.INITIAL.rules},topState:function(t){return(t=this.conditionStack.length-1-Math.abs(t||0))>=0?this.conditionStack[t]:"INITIAL"},pushState:function(t){this.begin(t)},stateStackSize:function(){return this.conditionStack.length},options:{},performAction:function(t,e,n,r){switch(n){case 0:break;case 1:return 6;case 2:return e.yytext=e.yytext.substr(1,e.yyleng-2),4;case 3:return 17;case 4:return 18;case 5:return 23;case 6:return 24;case 7:return 22;case 8:return 21;case 9:return 10;case 10:return 11;case 11:return 8;case 12:return 14;case 13:return"INVALID"}},rules:[/^(?:\s+)/,/^(?:(-?([0-9]|[1-9][0-9]+))(\.[0-9]+)?([eE][-+]?[0-9]+)?\b)/,/^(?:"(?:\\[\\"bfnrt/]|\\u[a-fA-F0-9]{4}|[^\\\0-\x09\x0a-\x1f"])*")/,/^(?:\{)/,/^(?:\})/,/^(?:\[)/,/^(?:\])/,/^(?:,)/,/^(?::)/,/^(?:true\b)/,/^(?:false\b)/,/^(?:null\b)/,/^(?:$)/,/^(?:.)/],conditions:{INITIAL:{rules:[0,1,2,3,4,5,6,7,8,9,10,11,12,13],inclusive:!0}}};function h(){this.yy={}}return p.lexer=A,h.prototype=p,p.Parser=h,new h}();e.parser=i,e.Parser=i.Parser,e.parse=function(){return i.parse.apply(i,arguments)},e.main=function(t){t[1]||(console.log("Usage: "+t[0]+" FILE"),r.exit(1));var i=n.readFileSync(o.normalize(t[1]),"utf8");return e.parser.parse(i)},A.main===t&&e.main(r.argv.slice(1))});Ln.parser,Ln.Parser,Ln.parse,Ln.main;function Sn(t,e){if(t instanceof String||"string"==typeof t||t instanceof i)try{t=Ln.parse(t.toString())}catch(t){return[new it(t)]}return In(t,e=e||a)}var zn={StyleExpression:He,isExpression:Ve,createExpression:Ne,createPropertyExpression:Xe,normalizePropertyExpression:function(t,e){if(Se(t))return new Ye(t,e);if(Ve(t)){var n=Xe(t,e);if("error"===n.result)throw new Error(n.value.map(function(t){return t.key+": "+t.message}).join(", "));return n.value}var r=t;return"string"==typeof t&&"color"===e.type&&(r=bt.parse(t)),{kind:"constant",evaluate:function(){return r}}},ZoomConstantExpression:Ge,ZoomDependentExpression:qe,StylePropertyFunction:Ye},Rn={convertFunction:function(t,e){var n,r;if(void 0!==(t=ot({},t)).default?r=an(t.default,e):null===(r=an(e.default,e))&&(r=["error","No default property value available."]),t.stops){var i=t.stops&&"object"==typeof t.stops[0][0],o=i||void 0!==t.property,a=i||!o,s=t.stops.map(function(t){return!o&&e.tokens&&"string"==typeof t[1]?[t[0],function(t){for(var e,n=["concat"],r=/{([^{}]+)}/g,i=0;null!==(e=r.exec(t));){var o=t.slice(i,r.lastIndex-e[0].length);i=r.lastIndex,o.length>0&&n.push(o),n.push(["to-string",["get",e[1]]])}if(1===n.length)return t;if(i=0&&(t.source=s,"source-layer"in t)){if(r.indexOf(t["source-layer"])>=0)throw new Error("Conflicting source layer names");r.push(t["source-layer"])}}),t},e.diff=function(t,e){if(!t)return[{command:X.setStyle,args:[e]}];var n=[];try{if(!q(t.version,e.version))return[{command:X.setStyle,args:[e]}];q(t.center,e.center)||n.push({command:X.setCenter,args:[e.center]}),q(t.zoom,e.zoom)||n.push({command:X.setZoom,args:[e.zoom]}),q(t.bearing,e.bearing)||n.push({command:X.setBearing,args:[e.bearing]}),q(t.pitch,e.pitch)||n.push({command:X.setPitch,args:[e.pitch]}),q(t.sprite,e.sprite)||n.push({command:X.setSprite,args:[e.sprite]}),q(t.glyphs,e.glyphs)||n.push({command:X.setGlyphs,args:[e.glyphs]}),q(t.transition,e.transition)||n.push({command:X.setTransition,args:[e.transition]}),q(t.light,e.light)||n.push({command:X.setLight,args:[e.light]});var r={},i=[];!function(t,e,n,r){var i;for(i in t=t||{},e=e||{},t)t.hasOwnProperty(i)&&(e.hasOwnProperty(i)||Z(i,n,r));for(i in e)e.hasOwnProperty(i)&&(t.hasOwnProperty(i)?q(t[i],e[i])||("geojson"===t[i].type&&"geojson"===e[i].type&&$(t,e,i)?n.push({command:X.setGeoJSONSourceData,args:[i,e[i].data]}):J(i,e,n,r)):Y(i,e,n))}(t.sources,e.sources,i,r);var o=[];t.layers&&t.layers.forEach(function(t){r[t.source]?n.push({command:X.removeLayer,args:[t.id]}):o.push(t)}),n=n.concat(i),function(t,e,n){t=t||[],e=e||[];var r,i,o,a,s,l,c,u=t.map(et),p=e.map(et),A=t.reduce(nt,{}),h=e.reduce(nt,{}),f=u.slice(),d=Object.create(null);for(r=0,i=0;r=a[0]&&s[2]<=a[2]||(s[1]>=a[1]&&s[3]<=a[3]||Object(o.a)(t,e,n,i,function(t,e){return Object(r.G)(a,t,e)}))))}function s(t,e,n,r,i){for(var o=0,s=n.length;o",'"',"`"," ","\r","\n","\t"]),u=["'"].concat(c),p=["%","/","?",";","#"].concat(u),A=["/","?","#"],h=/^[+a-z0-9A-Z_-]{0,63}$/,f=/^([+a-z0-9A-Z_-]{0,63})(.*)$/,d={javascript:!0,"javascript:":!0},_={javascript:!0,"javascript:":!0},g={http:!0,https:!0,ftp:!0,gopher:!0,file:!0,"http:":!0,"https:":!0,"ftp:":!0,"gopher:":!0,"file:":!0},y=n(95);function m(t,e,n){if(t&&i.isObject(t)&&t instanceof o)return t;var r=new o;return r.parse(t,e,n),r}o.prototype.parse=function(t,e,n){if(!i.isString(t))throw new TypeError("Parameter 'url' must be a string, not "+typeof t);var o=t.indexOf("?"),s=-1!==o&&o127?D+="x":D+=T[L];if(!D.match(h)){var z=P.slice(0,B),R=P.slice(B+1),j=T.match(f);j&&(z.push(j[1]),R.unshift(j[2])),R.length&&(m="/"+R.join(".")+m),this.hostname=z.join(".");break}}}this.hostname.length>255?this.hostname="":this.hostname=this.hostname.toLowerCase(),k||(this.hostname=r.toASCII(this.hostname));var U=this.port?":"+this.port:"",F=this.hostname||"";this.host=F+U,this.href+=this.host,k&&(this.hostname=this.hostname.substr(1,this.hostname.length-2),"/"!==m[0]&&(m="/"+m))}if(!d[w])for(B=0,I=u.length;B0)&&n.host.split("@"))&&(n.auth=k.shift(),n.host=n.hostname=k.shift());return n.search=t.search,n.query=t.query,i.isNull(n.pathname)&&i.isNull(n.search)||(n.path=(n.pathname?n.pathname:"")+(n.search?n.search:"")),n.href=n.format(),n}if(!x.length)return n.pathname=null,n.search?n.path="/"+n.search:n.path=null,n.href=n.format(),n;for(var M=x.slice(-1)[0],C=(n.host||t.host||x.length>1)&&("."===M||".."===M)||""===M,B=0,O=x.length;O>=0;O--)"."===(M=x[O])?x.splice(O,1):".."===M?(x.splice(O,1),B++):B&&(x.splice(O,1),B--);if(!b&&!w)for(;B--;B)x.unshift("..");!b||""===x[0]||x[0]&&"/"===x[0].charAt(0)||x.unshift(""),C&&"/"!==x.join("/").substr(-1)&&x.push("");var k,P=""===x[0]||x[0]&&"/"===x[0].charAt(0);E&&(n.hostname=n.host=P?"":x.length?x.shift():"",(k=!!(n.host&&n.host.indexOf("@")>0)&&n.host.split("@"))&&(n.auth=k.shift(),n.host=n.hostname=k.shift()));return(b=b||n.host&&x.length)&&!P&&x.unshift(""),x.length?n.pathname=x.join("/"):(n.pathname=null,n.path=null),i.isNull(n.pathname)&&i.isNull(n.search)||(n.path=(n.pathname?n.pathname:"")+(n.search?n.search:"")),n.auth=t.auth||n.auth,n.slashes=n.slashes||t.slashes,n.href=n.format(),n},o.prototype.parseHost=function(){var t=this.host,e=s.exec(t);e&&(":"!==(e=e[0])&&(this.port=e.substr(1)),t=t.substr(0,t.length-e.length)),t&&(this.hostname=t)}},function(t){t.exports={mapbox:"pk.eyJ1IjoibW9yZ2Vua2FmZmVlIiwiYSI6ImNpeHJmNXNmZTAwNHIycXBid2NqdTJibjMifQ.Dv1-GDpTWi0NP6xW9Fct1w",openmaptiles:"Og58UhhtiiTaLVlPtPgs",thunderforest:"b71f7f0ba4064f5eb9e903859a9cf5c6"}},function(t,e,n){"use strict";(function(t){n.d(e,"a",function(){return l}),n.d(e,"b",function(){return c}),n.d(e,"c",function(){return u});var r=n(80),i=n.n(r),o=n(95),a=n.n(o),s=n(33);function l(){return(i.a.parse(window.location.href,!0).query||{}).style}function c(t,e){console.log("Loading style",t),fetch(t,{mode:"cors",credentials:"same-origin"}).then(function(t){return t.json()}).then(function(t){e(s.a.ensureStyleValidity(t))}).catch(function(){console.warn("Could not fetch default style",t),e(s.a.emptyStyle)})}function u(){var t=i.a.parse(window.location.href,!0),e=a.a.parse(window.location.search.slice(1));delete e.style,e=0===Object.getOwnPropertyNames(e).length?"":"?"+a.a.stringify(e);var n=t.hash;null===n&&(n="");var r=t.protocol+"//"+t.host+t.pathname+e+n;window.history.replaceState({},document.title,r)}function p(t,e,n){fetch(t,{mode:"cors",credentials:"same-origin"}).then(function(t){return t.json()}).then(function(t){try{n(t)}catch(t){console.error(t),n(e)}}).catch(function(){console.error("Can not load JSON from "+t),n(e)})}!function(){var e=n(2).enterModule;e&&e(t)}(),function(){var e=n(2).default,r=n(2).leaveModule;e&&(e.register(l,"initialStyleUrl","/Users/peter.richardson/work/maputnik-editor/src/libs/urlopen.js"),e.register(c,"loadStyleUrl","/Users/peter.richardson/work/maputnik-editor/src/libs/urlopen.js"),e.register(u,"removeStyleQuerystring","/Users/peter.richardson/work/maputnik-editor/src/libs/urlopen.js"),e.register(p,"loadJSON","/Users/peter.richardson/work/maputnik-editor/src/libs/urlopen.js"),r(t))}()}).call(this,n(8)(t))},function(t,e){t.exports=function(t){var e=[];return e.toString=function(){return this.map(function(e){var n=function(t,e){var n=t[1]||"",r=t[3];if(!r)return n;if(e&&"function"==typeof btoa){var i=function(t){return"/*# sourceMappingURL=data:application/json;charset=utf-8;base64,"+btoa(unescape(encodeURIComponent(JSON.stringify(t))))+" */"}(r),o=r.sources.map(function(t){return"/*# sourceURL="+r.sourceRoot+t+" */"});return[n].concat(o).concat([i]).join("\n")}return[n].join("\n")}(e,t);return e[2]?"@media "+e[2]+"{"+n+"}":n}).join("")},e.i=function(t,n){"string"==typeof t&&(t=[[null,t,""]]);for(var r={},i=0;i=0&&l.splice(e,1)}function f(t){var e=document.createElement("style");if(void 0===t.attrs.type&&(t.attrs.type="text/css"),void 0===t.attrs.nonce){var r=function(){0;return n.nc}();r&&(t.attrs.nonce=r)}return d(e,t.attrs),A(t,e),e}function d(t,e){Object.keys(e).forEach(function(n){t.setAttribute(n,e[n])})}function _(t,e){var n,r,i,o;if(e.transform&&t.css){if(!(o=e.transform(t.css)))return function(){};t.css=o}if(e.singleton){var l=s++;n=a||(a=f(e)),r=y.bind(null,n,l,!1),i=y.bind(null,n,l,!0)}else t.sourceMap&&"function"==typeof URL&&"function"==typeof URL.createObjectURL&&"function"==typeof URL.revokeObjectURL&&"function"==typeof Blob&&"function"==typeof btoa?(n=function(t){var e=document.createElement("link");return void 0===t.attrs.type&&(t.attrs.type="text/css"),t.attrs.rel="stylesheet",d(e,t.attrs),A(t,e),e}(e),r=function(t,e,n){var r=n.css,i=n.sourceMap,o=void 0===e.convertToAbsoluteUrls&&i;(e.convertToAbsoluteUrls||o)&&(r=c(r));i&&(r+="\n/*# sourceMappingURL=data:application/json;base64,"+btoa(unescape(encodeURIComponent(JSON.stringify(i))))+" */");var a=new Blob([r],{type:"text/css"}),s=t.href;t.href=URL.createObjectURL(a),s&&URL.revokeObjectURL(s)}.bind(null,n,e),i=function(){h(n),n.href&&URL.revokeObjectURL(n.href)}):(n=f(e),r=function(t,e){var n=e.css,r=e.media;r&&t.setAttribute("media",r);if(t.styleSheet)t.styleSheet.cssText=n;else{for(;t.firstChild;)t.removeChild(t.firstChild);t.appendChild(document.createTextNode(n))}}.bind(null,n),i=function(){h(n)});return r(t),function(e){if(e){if(e.css===t.css&&e.media===t.media&&e.sourceMap===t.sourceMap)return;r(t=e)}else i()}}t.exports=function(t,e){if("undefined"!=typeof DEBUG&&DEBUG&&"object"!=typeof document)throw new Error("The style-loader cannot be used in a non-browser environment");(e=e||{}).attrs="object"==typeof e.attrs?e.attrs:{},e.singleton||"boolean"==typeof e.singleton||(e.singleton=i()),e.insertInto||(e.insertInto="head"),e.insertAt||(e.insertAt="bottom");var n=p(t,e);return u(n,e),function(t){for(var i=[],o=0;ow&&(p=(A+h)/2,Object(i.c)(t,e,n,o,p,_)&&(b=p,w=x)),A=h}return isNaN(b)&&(b=a[s]),l?(l.push(b,_,w),l):[b,_,w]}function a(t,e,n,r,i){for(var a=[],s=0,l=n.length;s0&&(e=e.charAt(0).toUpperCase()+e.slice(1)),e}function optionsLabelLength(t){var e=0;return t.forEach(function(t){var n=_slicedToArray(t,2),r=(n[0],n[1]);e+=r.length}),e}var SpecField=function(_React$Component){function SpecField(){return _classCallCheck(this,SpecField),_possibleConstructorReturn(this,_getPrototypeOf(SpecField).apply(this,arguments))}return _inherits(SpecField,_React$Component),_createClass(SpecField,[{key:"render",value:function(){var t=this,e={style:this.props.style,value:this.props.value,default:this.props.fieldSpec.default,name:this.props.fieldName,onChange:function(e){return t.props.onChange(t.props.fieldName,e)}};return react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement("div",{"data-wd-key":"spec-field:"+this.props.fieldName},function(){switch(this.props.fieldSpec.type){case"number":return react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_inputs_NumberInput__WEBPACK_IMPORTED_MODULE_3__.a,_extends({},e,{min:this.props.fieldSpec.minimum,max:this.props.fieldSpec.maximum}));case"enum":var t=Object.keys(this.props.fieldSpec.values).map(function(t){return[t,lodash_capitalize__WEBPACK_IMPORTED_MODULE_12___default()(t)]});return t.length<=3&&optionsLabelLength(t)<=20?react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_inputs_MultiButtonInput__WEBPACK_IMPORTED_MODULE_7__.a,_extends({},e,{options:t})):react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_inputs_SelectInput__WEBPACK_IMPORTED_MODULE_6__.a,_extends({},e,{options:t}));case"string":return iconProperties.indexOf(this.props.fieldName)>=0?react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_inputs_IconInput__WEBPACK_IMPORTED_MODULE_11__.a,_extends({},e,{icons:this.props.fieldSpec.values})):react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_inputs_StringInput__WEBPACK_IMPORTED_MODULE_5__.a,e);case"color":return react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_ColorField__WEBPACK_IMPORTED_MODULE_2__.a,e);case"boolean":return react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_inputs_CheckboxInput__WEBPACK_IMPORTED_MODULE_4__.a,e);case"array":return"text-font"===this.props.fieldName?react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_inputs_FontInput__WEBPACK_IMPORTED_MODULE_10__.a,_extends({},e,{fonts:this.props.fieldSpec.values})):this.props.fieldSpec.length?react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_inputs_ArrayInput__WEBPACK_IMPORTED_MODULE_8__.a,_extends({},e,{type:this.props.fieldSpec.value,length:this.props.fieldSpec.length})):react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_inputs_DynamicArrayInput__WEBPACK_IMPORTED_MODULE_9__.a,_extends({},e,{type:this.props.fieldSpec.value}));default:return null}}.call(this))}},{key:"__reactstandin__regenerateByEval",value:function __reactstandin__regenerateByEval(key,code){this[key]=eval(code)}}]),SpecField}(react__WEBPACK_IMPORTED_MODULE_0___default.a.Component);_defineProperty(SpecField,"propTypes",{onChange:prop_types__WEBPACK_IMPORTED_MODULE_1___default.a.func.isRequired,fieldName:prop_types__WEBPACK_IMPORTED_MODULE_1___default.a.string.isRequired,fieldSpec:prop_types__WEBPACK_IMPORTED_MODULE_1___default.a.object.isRequired,value:prop_types__WEBPACK_IMPORTED_MODULE_1___default.a.oneOfType([prop_types__WEBPACK_IMPORTED_MODULE_1___default.a.string,prop_types__WEBPACK_IMPORTED_MODULE_1___default.a.number,prop_types__WEBPACK_IMPORTED_MODULE_1___default.a.array,prop_types__WEBPACK_IMPORTED_MODULE_1___default.a.bool]),style:prop_types__WEBPACK_IMPORTED_MODULE_1___default.a.object}),function(){var t=__webpack_require__(2).default,e=__webpack_require__(2).leaveModule;t&&(t.register(iconProperties,"iconProperties","/Users/peter.richardson/work/maputnik-editor/src/components/fields/SpecField.jsx"),t.register(labelFromFieldName,"labelFromFieldName","/Users/peter.richardson/work/maputnik-editor/src/components/fields/SpecField.jsx"),t.register(optionsLabelLength,"optionsLabelLength","/Users/peter.richardson/work/maputnik-editor/src/components/fields/SpecField.jsx"),t.register(SpecField,"SpecField","/Users/peter.richardson/work/maputnik-editor/src/components/fields/SpecField.jsx"),e(module))}()}).call(this,__webpack_require__(8)(module))},function(t,e,n){"use strict";e.a={BOTTOM_LEFT:"bottom-left",BOTTOM_RIGHT:"bottom-right",TOP_LEFT:"top-left",TOP_RIGHT:"top-right"}},function(t,e,n){"use strict";n.d(e,"a",function(){return i});var r=function(t,e,n,r){this.minX=t,this.maxX=e,this.minY=n,this.maxY=r};function i(t,e,n,i,o){return void 0!==o?(o.minX=t,o.maxX=e,o.minY=n,o.maxY=i,o):new r(t,e,n,i)}r.prototype.contains=function(t){return this.containsXY(t[1],t[2])},r.prototype.containsTileRange=function(t){return this.minX<=t.minX&&t.maxX<=this.maxX&&this.minY<=t.minY&&t.maxY<=this.maxY},r.prototype.containsXY=function(t,e){return this.minX<=t&&t<=this.maxX&&this.minY<=e&&e<=this.maxY},r.prototype.equals=function(t){return this.minX==t.minX&&this.minY==t.minY&&this.maxX==t.maxX&&this.maxY==t.maxY},r.prototype.extend=function(t){t.minXthis.maxX&&(this.maxX=t.maxX),t.minYthis.maxY&&(this.maxY=t.maxY)},r.prototype.getHeight=function(){return this.maxY-this.minY+1},r.prototype.getSize=function(){return[this.getWidth(),this.getHeight()]},r.prototype.getWidth=function(){return this.maxX-this.minX+1},r.prototype.intersects=function(t){return this.minX<=t.maxX&&this.maxX>=t.minX&&this.minY<=t.maxY&&this.maxY>=t.minY},e.b=r},function(t,e,n){"use strict";(function(t){var r=n(95),i=n.n(r);!function(){var e=n(2).enterModule;e&&e(t)}();var o={};function a(){var t=i.a.parse(window.location.search.slice(1));return!!t.hasOwnProperty("debug")&&!!t.debug.match(/^(|1|true)$/)}function s(){return new Error("Debug not enabled, enable by appending '?debug' to your query string")}function l(t,e,n){if(!a())throw s();o[t]=o[t]||{},o[t][e]=n}function c(t,e){if(!a())throw s();if(o.hasOwnProperty(t))return o[t][e]}var u={enabled:a,get:c,set:l};window.debug=u;var p=u;e.a=p,function(){var e=n(2).default,r=n(2).leaveModule;e&&(e.register(o,"debugStore","/Users/peter.richardson/work/maputnik-editor/src/libs/debug.js"),e.register(a,"enabled","/Users/peter.richardson/work/maputnik-editor/src/libs/debug.js"),e.register(s,"genErr","/Users/peter.richardson/work/maputnik-editor/src/libs/debug.js"),e.register(l,"set","/Users/peter.richardson/work/maputnik-editor/src/libs/debug.js"),e.register(c,"get","/Users/peter.richardson/work/maputnik-editor/src/libs/debug.js"),e.register(u,"mod","/Users/peter.richardson/work/maputnik-editor/src/libs/debug.js"),e.register(p,"default","/Users/peter.richardson/work/maputnik-editor/src/libs/debug.js"),r(t))}()}).call(this,n(8)(t))},function(t,e,n){"use strict";e.decode=e.parse=n(326),e.encode=e.stringify=n(327)},function(t,e,n){(function(t,n){var r=200,i="__lodash_hash_undefined__",o=1,a=2,s=9007199254740991,l="[object Arguments]",c="[object Array]",u="[object AsyncFunction]",p="[object Boolean]",A="[object Date]",h="[object Error]",f="[object Function]",d="[object GeneratorFunction]",_="[object Map]",g="[object Number]",y="[object Null]",m="[object Object]",v="[object Proxy]",b="[object RegExp]",w="[object Set]",x="[object String]",E="[object Symbol]",M="[object Undefined]",C="[object ArrayBuffer]",B="[object DataView]",O=/^\[object .+?Constructor\]$/,k=/^(?:0|[1-9]\d*)$/,P={};P["[object Float32Array]"]=P["[object Float64Array]"]=P["[object Int8Array]"]=P["[object Int16Array]"]=P["[object Int32Array]"]=P["[object Uint8Array]"]=P["[object Uint8ClampedArray]"]=P["[object Uint16Array]"]=P["[object Uint32Array]"]=!0,P[l]=P[c]=P[C]=P[p]=P[B]=P[A]=P[h]=P[f]=P[_]=P[g]=P[m]=P[b]=P[w]=P[x]=P["[object WeakMap]"]=!1;var I="object"==typeof t&&t&&t.Object===Object&&t,T="object"==typeof self&&self&&self.Object===Object&&self,D=I||T||Function("return this")(),L="object"==typeof e&&e&&!e.nodeType&&e,S=L&&"object"==typeof n&&n&&!n.nodeType&&n,z=S&&S.exports===L,R=z&&I.process,j=function(){try{return R&&R.binding&&R.binding("util")}catch(t){}}(),U=j&&j.isTypedArray;function F(t,e){for(var n=-1,r=null==t?0:t.length;++nc))return!1;var p=s.get(t);if(p&&s.get(e))return p==e;var A=-1,h=!0,f=n&a?new Et:void 0;for(s.set(t,e),s.set(e,t);++A-1},wt.prototype.set=function(t,e){var n=this.__data__,r=Bt(n,t);return r<0?(++this.size,n.push([t,e])):n[r][1]=e,this},xt.prototype.clear=function(){this.size=0,this.__data__={hash:new bt,map:new(ct||wt),string:new bt}},xt.prototype.delete=function(t){var e=St(this,t).delete(t);return this.size-=e?1:0,e},xt.prototype.get=function(t){return St(this,t).get(t)},xt.prototype.has=function(t){return St(this,t).has(t)},xt.prototype.set=function(t,e){var n=St(this,t),r=n.size;return n.set(t,e),this.size+=n.size==r?0:1,this},Et.prototype.add=Et.prototype.push=function(t){return this.__data__.set(t,i),this},Et.prototype.has=function(t){return this.__data__.has(t)},Mt.prototype.clear=function(){this.__data__=new wt,this.size=0},Mt.prototype.delete=function(t){var e=this.__data__,n=e.delete(t);return this.size=e.size,n},Mt.prototype.get=function(t){return this.__data__.get(t)},Mt.prototype.has=function(t){return this.__data__.has(t)},Mt.prototype.set=function(t,e){var n=this.__data__;if(n instanceof wt){var i=n.__data__;if(!ct||i.length-1&&t%1==0&&t-1&&t%1==0&&t<=s}function Gt(t){var e=typeof t;return null!=t&&("object"==e||"function"==e)}function qt(t){return null!=t&&"object"==typeof t}var Xt=U?function(t){return function(e){return t(e)}}(U):function(t){return qt(t)&&Nt(t.length)&&!!P[Ot(t)]};function Yt(t){return function(t){return null!=t&&Nt(t.length)&&!Vt(t)}(t)?Ct(t):Tt(t)}n.exports=function(t,e){return Pt(t,e)}}).call(this,n(26),n(85)(t))},function(t,e,n){"use strict";var r=function(){this.disposed_=!1};r.prototype.dispose=function(){this.disposed_||(this.disposed_=!0,this.disposeInternal())},r.prototype.disposeInternal=function(){},e.a=r},function(t,e,n){"use strict";n.d(e,"b",function(){return s});var r=n(4),i=n(52),o=n(7),a=function(t){function e(){t.call(this),this.revision_=0}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype.changed=function(){++this.revision_,this.dispatchEvent(o.a.CHANGE)},e.prototype.getRevision=function(){return this.revision_},e.prototype.on=function(t,e){if(Array.isArray(t)){for(var n=t.length,i=new Array(n),o=0;o=t.minX&&e.maxY>=t.minY}function g(t){return{children:t,height:1,leaf:!0,minX:1/0,minY:1/0,maxX:-1/0,maxY:-1/0}}function y(t,e,n,i,o){for(var a,s=[e,n];s.length;)(n=s.pop())-(e=s.pop())<=i||(a=e+Math.ceil((n-e)/i/2)*i,r(t,a,e,n,o),s.push(e,a,a,n))}i.prototype={all:function(){return this._all(this.data,[])},search:function(t){var e=this.data,n=[],r=this.toBBox;if(!_(t,e))return n;for(var i,o,a,s,l=[];e;){for(i=0,o=e.children.length;i=0&&o[e].children.length>this._maxEntries;)this._split(o,e),e--;this._adjustParentBBoxes(i,o,e)},_split:function(t,e){var n=t[e],r=n.children.length,i=this._minEntries;this._chooseSplitAxis(n,i,r);var o=this._chooseSplitIndex(n,i,r),s=g(n.children.splice(o,n.children.length-o));s.height=n.height,s.leaf=n.leaf,a(n,this.toBBox),a(s,this.toBBox),e?t[e-1].children.push(s):this._splitRoot(n,s)},_splitRoot:function(t,e){this.data=g([t,e]),this.data.height=t.height+1,this.data.leaf=!1,a(this.data,this.toBBox)},_chooseSplitIndex:function(t,e,n){var r,i,o,a,l,c,u,A;for(c=u=1/0,r=e;r<=n-e;r++)a=f(i=s(t,0,r,this.toBBox),o=s(t,r,n,this.toBBox)),l=p(i)+p(o),a=e;i--)o=t.children[i],l(u,t.leaf?a(o):o),p+=A(u);return p},_adjustParentBBoxes:function(t,e,n){for(var r=n;r>=0;r--)l(e[r],t)},_condense:function(t){for(var e,n=t.length-1;n>=0;n--)0===t[n].children.length?n>0?(e=t[n-1].children).splice(e.indexOf(t[n]),1):this.clear():a(t[n],this.toBBox)},_initFormat:function(t){var e=["return a"," - b",";"];this.compareMinX=new Function("a","b",e.join(t[0])),this.compareMinY=new Function("a","b",e.join(t[1])),this.toBBox=new Function("a","return {minX: a"+t[0]+", minY: a"+t[1]+", maxX: a"+t[2]+", maxY: a"+t[3]+"};")}}},function(t,e,n){"use strict";(function(t){n.d(e,"a",function(){return o});var r=n(142),i=n.n(r);function o(t){var e=t.split("-").slice(1).join(" ");return i()(e)}!function(){var e=n(2).enterModule;e&&e(t)}(),function(){var e=n(2).default,r=n(2).leaveModule;e&&(e.register(o,"labelFromFieldName","/Users/peter.richardson/work/maputnik-editor/src/components/fields/_labelFromFieldName.js"),r(t))}()}).call(this,n(8)(t))},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 l,c=[],u=!1,p=-1;function A(){u&&l&&(u=!1,l.length?c=l.concat(c):p=-1,c.length&&h())}function h(){if(!u){var t=s(A);u=!0;for(var e=c.length;e;){for(l=c,c=[];++p1)for(var n=1;n>16&255,t>>8&255,255&t],this.valpha=1;else{this.valpha=1;var f=Object.keys(t);"alpha"in t&&(f.splice(f.indexOf("alpha"),1),this.valpha="number"==typeof t.alpha?t.alpha:0);var d=f.sort().join("");if(!(d in s))throw new Error("Unable to parse color from object: "+JSON.stringify(t));this.model=s[d];var _=i[this.model].labels,g=[];for(n=0;n<_.length;n++)g.push(t[_[n]]);this.color=A(g)}else this.model="rgb",this.color=[0,0,0],this.valpha=1;if(l[this.model])for(u=i[this.model].channels,n=0;nn?(e+.05)/(n+.05):(n+.05)/(e+.05)},level:function(t){var e=this.contrast(t);return e>=7.1?"AAA":e>=4.5?"AA":""},isDark:function(){var t=this.rgb().color;return(299*t[0]+587*t[1]+114*t[2])/1e3<128},isLight:function(){return!this.isDark()},negate:function(){for(var t=this.rgb(),e=0;e<3;e++)t.color[e]=255-t.color[e];return t},lighten:function(t){var e=this.hsl();return e.color[2]+=e.color[2]*t,e},darken:function(t){var e=this.hsl();return e.color[2]-=e.color[2]*t,e},saturate:function(t){var e=this.hsl();return e.color[1]+=e.color[1]*t,e},desaturate:function(t){var e=this.hsl();return e.color[1]-=e.color[1]*t,e},whiten:function(t){var e=this.hwb();return e.color[1]+=e.color[1]*t,e},blacken:function(t){var e=this.hwb();return e.color[2]+=e.color[2]*t,e},grayscale:function(){var t=this.rgb().color,e=.3*t[0]+.59*t[1]+.11*t[2];return c.rgb(e,e,e)},fade:function(t){return this.alpha(this.valpha-this.valpha*t)},opaquer:function(t){return this.alpha(this.valpha+this.valpha*t)},rotate:function(t){var e=this.hsl(),n=e.color[0];return n=(n=(n+t)%360)<0?360+n:n,e.color[0]=n,e},mix:function(t,e){var n=t.rgb(),r=this.rgb(),i=void 0===e?.5:e,o=2*i-1,a=n.alpha()-r.alpha(),s=((o*a==-1?o:(o+a)/(1+o*a))+1)/2,l=1-s;return c.rgb(s*n.red()+l*r.red(),s*n.green()+l*r.green(),s*n.blue()+l*r.blue(),n.alpha()*i+r.alpha()*(1-i))}},Object.keys(i).forEach(function(t){if(-1===a.indexOf(t)){var e=i[t].channels;c.prototype[t]=function(){if(this.model===t)return new c(this);if(arguments.length)return new c(arguments,t);var n="number"==typeof arguments[e]?e:this.valpha;return new c(function(t){return Array.isArray(t)?t:[t]}(i[this.model][t].raw(this.color)).concat(n),t)},c[t]=function(n){return"number"==typeof n&&(n=A(o.call(arguments),e)),new c(n,t)}}}),t.exports=c},function(t,e,n){"use strict";n.d(e,"a",function(){return o}),n.d(e,"b",function(){return a});var r=n(10),i=(n(5),6371008.8);function o(t,e,n){var o=n||i,a=Object(r.i)(t[1]),s=Object(r.i)(e[1]),l=(s-a)/2,c=Object(r.i)(e[0]-t[0])/2,u=Math.sin(l)*Math.sin(l)+Math.sin(c)*Math.sin(c)*Math.cos(a)*Math.cos(s);return 2*o*Math.atan2(Math.sqrt(u),Math.sqrt(1-u))}function a(t,e,n,o){var a=o||i,s=Object(r.i)(t[1]),l=Object(r.i)(t[0]),c=e/a,u=Math.asin(Math.sin(s)*Math.cos(c)+Math.cos(s)*Math.sin(c)*Math.cos(n)),p=l+Math.atan2(Math.sin(n)*Math.sin(c)*Math.cos(s),Math.cos(c)-Math.sin(s)*Math.sin(u));return[Object(r.h)(p),Object(r.h)(u)]}},function(t,e,n){"use strict";n.d(e,"a",function(){return a});var r=n(60),i=function(){this.cache_={},this.cacheSize_=0,this.maxCacheSize_=32};function o(t,e,n){return e+":"+t+":"+(n?Object(r.b)(n):"null")}i.prototype.clear=function(){this.cache_={},this.cacheSize_=0},i.prototype.expire=function(){if(this.cacheSize_>this.maxCacheSize_){var t=0;for(var e in this.cache_){var n=this.cache_[e];0!=(3&t++)||n.hasListener()||(delete this.cache_[e],--this.cacheSize_)}}},i.prototype.get=function(t,e,n){var r=o(t,e,n);return r in this.cache_?this.cache_[r]:null},i.prototype.set=function(t,e,n,r){var i=o(t,e,n);this.cache_[i]=r,++this.cacheSize_},i.prototype.setSize=function(t){this.maxCacheSize_=t,this.expire()};var a=new i},function(t,e,n){"use strict";(function(t){n.d(e,"a",function(){return i}),n.d(e,"b",function(){return a});var r=n(17);!function(){var e=n(2).enterModule;e&&e(t)}();var i=["all","any","none"],o=["in","!in"],a=Object.keys(r.latest.filter_operator.values).filter(function(t){return i.indexOf(t)<0});!function(){var e=n(2).default,r=n(2).leaveModule;e&&(e.register(i,"combiningFilterOps","/Users/peter.richardson/work/maputnik-editor/src/libs/filterops.js"),e.register(o,"setFilterOps","/Users/peter.richardson/work/maputnik-editor/src/libs/filterops.js"),e.register(a,"otherFilterOps","/Users/peter.richardson/work/maputnik-editor/src/libs/filterops.js"),r(t))}()}).call(this,n(8)(t))},function(module,__webpack_exports__,__webpack_require__){"use strict";(function(module){__webpack_require__.d(__webpack_exports__,"a",function(){return FillIcon});var react__WEBPACK_IMPORTED_MODULE_0__=__webpack_require__(0),react__WEBPACK_IMPORTED_MODULE_0___default=__webpack_require__.n(react__WEBPACK_IMPORTED_MODULE_0__),react_icon_base__WEBPACK_IMPORTED_MODULE_1__=__webpack_require__(69);function _typeof(t){return(_typeof="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 _extends(){return(_extends=Object.assign||function(t){for(var e=1;e=r.length)for(var i=n-r.length;1+i--;)r.push(void 0);return r.splice(n,0,r.splice(e,1)[0]),r},e.omit=function(t){for(var e=arguments.length,n=Array(e>1?e-1:0),r=1;re)return e;return n},e.getElementMargin=function(t){var e=window.getComputedStyle(t);return{top:i(e.marginTop),right:i(e.marginRight),bottom:i(e.marginBottom),left:i(e.marginLeft)}},e.provideDisplayName=function(t,e){var n=e.displayName||e.name;return n?t+"("+n+")":t},e.getPosition=function(t){return t.touches&&t.touches.length?{x:t.touches[0].pageX,y:t.touches[0].pageY}:t.changedTouches&&t.changedTouches.length?{x:t.changedTouches[0].pageX,y:t.changedTouches[0].pageY}:{x:t.pageX,y:t.pageY}},e.isTouchEvent=function(t){return t.touches&&t.touches.length||t.changedTouches&&t.changedTouches.length},e.getEdgeOffset=function t(e,n){var r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{top:0,left:0};if(e){var i={top:r.top+e.offsetTop,left:r.left+e.offsetLeft};return e.parentNode!==n?t(e.parentNode,n,i):i}},e.getLockPixelOffset=function(t){var e=t.lockOffset,n=t.width,i=t.height,o=e,a=e,s="px";if("string"==typeof e){var l=/^[+-]?\d*(?:\.\d*)?(px|%)$/.exec(e);(0,r.default)(null!==l,'lockOffset value should be a number or a string of a number followed by "px" or "%". Given %s',e),o=a=parseFloat(e),s=l[1]}(0,r.default)(isFinite(o)&&isFinite(a),"lockOffset value should be a finite. Given %s",e),"%"===s&&(o=o*n/100,a=a*i/100);return{x:o,y:a}};var r=function(t){return t&&t.__esModule?t:{default:t}}(n(115));e.events={start:["touchstart","mousedown"],move:["touchmove","mousemove"],end:["touchend","touchcancel","mouseup"]},e.vendorPrefix=function(){if("undefined"==typeof window||"undefined"==typeof document)return"";var t=window.getComputedStyle(document.documentElement,"")||["-moz-hidden-iframe"],e=(Array.prototype.slice.call(t).join("").match(/-(moz|webkit|ms)-/)||""===t.OLink&&["","o"])[1];switch(e){case"ms":return"ms";default:return e&&e.length?e[0].toUpperCase()+e.substr(1):""}}();function i(t){return"px"===t.substr(-2)?parseFloat(t):0}},function(t,e,n){"use strict";t.exports=function(t,e,n,r,i,o,a,s){if(!t){var l;if(void 0===e)l=new Error("Minified exception occurred; use the non-minified dev environment for the full error message and additional helpful warnings.");else{var c=[n,r,i,o,a,s],u=0;(l=new Error(e.replace(/%s/g,function(){return c[u++]}))).name="Invariant Violation"}throw l.framesToPop=1,l}}},function(t,e,n){"use strict";t.exports=function(t,e,n){for(var r in n=n||{},e)e.hasOwnProperty(r)&&(n[r]||(t[r]=e[r]))}},function(t,e,n){t.exports=function(){"use strict";var t=navigator.userAgent,e=navigator.platform,n=/gecko\/\d/i.test(t),r=/MSIE \d/.test(t),i=/Trident\/(?:[7-9]|\d{2,})\..*rv:(\d+)/.exec(t),o=/Edge\/(\d+)/.exec(t),a=r||i||o,s=a&&(r?document.documentMode||6:+(o||i)[1]),l=!o&&/WebKit\//.test(t),c=l&&/Qt\/\d+\.\d+/.test(t),u=!o&&/Chrome\//.test(t),p=/Opera\//.test(t),A=/Apple Computer/.test(navigator.vendor),h=/Mac OS X 1\d\D([8-9]|\d\d)\D/.test(t),f=/PhantomJS/.test(t),d=!o&&/AppleWebKit/.test(t)&&/Mobile\/\w+/.test(t),_=/Android/.test(t),g=d||_||/webOS|BlackBerry|Opera Mini|Opera Mobi|IEMobile/i.test(t),y=d||/Mac/.test(e),m=/\bCrOS\b/.test(t),v=/win/i.test(e),b=p&&t.match(/Version\/(\d*\.\d*)/);b&&(b=Number(b[1])),b&&b>=15&&(p=!1,l=!0);var w=y&&(c||p&&(null==b||b<12.11)),x=n||a&&s>=9;function E(t){return new RegExp("(^|\\s)"+t+"(?:$|\\s)\\s*")}var M,C=function(t,e){var n=t.className,r=E(e).exec(n);if(r){var i=n.slice(r.index+r[0].length);t.className=n.slice(0,r.index)+(i?r[1]+i:"")}};function B(t){for(var e=t.childNodes.length;e>0;--e)t.removeChild(t.firstChild);return t}function O(t,e){return B(t).appendChild(e)}function k(t,e,n,r){var i=document.createElement(t);if(n&&(i.className=n),r&&(i.style.cssText=r),"string"==typeof e)i.appendChild(document.createTextNode(e));else if(e)for(var o=0;o=e)return a+(e-o);a+=s-o,a+=n-a%n,o=s+1}}d?S=function(t){t.selectionStart=0,t.selectionEnd=t.value.length}:a&&(S=function(t){try{t.select()}catch(t){}});var U=function(){this.id=null};function F(t,e){for(var n=0;n=e)return r+Math.min(a,e-i);if(i+=o-r,r=o+1,(i+=n-i%n)>=e)return r}}var G=[""];function q(t){for(;G.length<=t;)G.push(X(G)+" ");return G[t]}function X(t){return t[t.length-1]}function Y(t,e){for(var n=[],r=0;r"€"&&(t.toUpperCase()!=t.toLowerCase()||$.test(t))}function et(t,e){return e?!!(e.source.indexOf("\\w")>-1&&tt(t))||e.test(t):tt(t)}function nt(t){for(var e in t)if(t.hasOwnProperty(e)&&t[e])return!1;return!0}var rt=/[\u0300-\u036f\u0483-\u0489\u0591-\u05bd\u05bf\u05c1\u05c2\u05c4\u05c5\u05c7\u0610-\u061a\u064b-\u065e\u0670\u06d6-\u06dc\u06de-\u06e4\u06e7\u06e8\u06ea-\u06ed\u0711\u0730-\u074a\u07a6-\u07b0\u07eb-\u07f3\u0816-\u0819\u081b-\u0823\u0825-\u0827\u0829-\u082d\u0900-\u0902\u093c\u0941-\u0948\u094d\u0951-\u0955\u0962\u0963\u0981\u09bc\u09be\u09c1-\u09c4\u09cd\u09d7\u09e2\u09e3\u0a01\u0a02\u0a3c\u0a41\u0a42\u0a47\u0a48\u0a4b-\u0a4d\u0a51\u0a70\u0a71\u0a75\u0a81\u0a82\u0abc\u0ac1-\u0ac5\u0ac7\u0ac8\u0acd\u0ae2\u0ae3\u0b01\u0b3c\u0b3e\u0b3f\u0b41-\u0b44\u0b4d\u0b56\u0b57\u0b62\u0b63\u0b82\u0bbe\u0bc0\u0bcd\u0bd7\u0c3e-\u0c40\u0c46-\u0c48\u0c4a-\u0c4d\u0c55\u0c56\u0c62\u0c63\u0cbc\u0cbf\u0cc2\u0cc6\u0ccc\u0ccd\u0cd5\u0cd6\u0ce2\u0ce3\u0d3e\u0d41-\u0d44\u0d4d\u0d57\u0d62\u0d63\u0dca\u0dcf\u0dd2-\u0dd4\u0dd6\u0ddf\u0e31\u0e34-\u0e3a\u0e47-\u0e4e\u0eb1\u0eb4-\u0eb9\u0ebb\u0ebc\u0ec8-\u0ecd\u0f18\u0f19\u0f35\u0f37\u0f39\u0f71-\u0f7e\u0f80-\u0f84\u0f86\u0f87\u0f90-\u0f97\u0f99-\u0fbc\u0fc6\u102d-\u1030\u1032-\u1037\u1039\u103a\u103d\u103e\u1058\u1059\u105e-\u1060\u1071-\u1074\u1082\u1085\u1086\u108d\u109d\u135f\u1712-\u1714\u1732-\u1734\u1752\u1753\u1772\u1773\u17b7-\u17bd\u17c6\u17c9-\u17d3\u17dd\u180b-\u180d\u18a9\u1920-\u1922\u1927\u1928\u1932\u1939-\u193b\u1a17\u1a18\u1a56\u1a58-\u1a5e\u1a60\u1a62\u1a65-\u1a6c\u1a73-\u1a7c\u1a7f\u1b00-\u1b03\u1b34\u1b36-\u1b3a\u1b3c\u1b42\u1b6b-\u1b73\u1b80\u1b81\u1ba2-\u1ba5\u1ba8\u1ba9\u1c2c-\u1c33\u1c36\u1c37\u1cd0-\u1cd2\u1cd4-\u1ce0\u1ce2-\u1ce8\u1ced\u1dc0-\u1de6\u1dfd-\u1dff\u200c\u200d\u20d0-\u20f0\u2cef-\u2cf1\u2de0-\u2dff\u302a-\u302f\u3099\u309a\ua66f-\ua672\ua67c\ua67d\ua6f0\ua6f1\ua802\ua806\ua80b\ua825\ua826\ua8c4\ua8e0-\ua8f1\ua926-\ua92d\ua947-\ua951\ua980-\ua982\ua9b3\ua9b6-\ua9b9\ua9bc\uaa29-\uaa2e\uaa31\uaa32\uaa35\uaa36\uaa43\uaa4c\uaab0\uaab2-\uaab4\uaab7\uaab8\uaabe\uaabf\uaac1\uabe5\uabe8\uabed\udc00-\udfff\ufb1e\ufe00-\ufe0f\ufe20-\ufe26\uff9e\uff9f]/;function it(t){return t.charCodeAt(0)>=768&&rt.test(t)}function ot(t,e,n){for(;(n<0?e>0:en?-1:1;;){if(e==n)return e;var i=(e+n)/2,o=r<0?Math.ceil(i):Math.floor(i);if(o==e)return t(o)?e:n;t(o)?n=o:e=o+r}}function st(t,e){if((e-=t.first)<0||e>=t.size)throw new Error("There is no line "+(e+t.first)+" in the document.");for(var n=t;!n.lines;)for(var r=0;;++r){var i=n.children[r],o=i.chunkSize();if(e=t.first&&en?dt(n,st(t,n).text.length):function(t,e){var n=t.ch;return null==n||n>e?dt(t.line,e):n<0?dt(t.line,0):t}(e,st(t,e.line).text.length)}function xt(t,e){for(var n=[],r=0;r=e:o.to>e);(r||(r=[])).push(new Ct(a,o.from,l?null:o.to))}}return r}(n,i,a),l=function(t,e,n){var r;if(t)for(var i=0;i=e:o.to>e);if(s||o.from==e&&"bookmark"==a.type&&(!n||o.marker.insertLeft)){var l=null==o.from||(a.inclusiveLeft?o.from<=e:o.from0&&s)for(var v=0;ve)&&(!n||St(n,o.marker)<0)&&(n=o.marker)}return n}function Ft(t,e,n,r,i){var o=st(t,e),a=Mt&&o.markedSpans;if(a)for(var s=0;s=0&&p<=0||u<=0&&p>=0)&&(u<=0&&(l.marker.inclusiveRight&&i.inclusiveLeft?_t(c.to,n)>=0:_t(c.to,n)>0)||u>=0&&(l.marker.inclusiveRight&&i.inclusiveLeft?_t(c.from,r)<=0:_t(c.from,r)<0)))return!0}}}function Qt(t){for(var e;e=Rt(t);)t=e.find(-1,!0).line;return t}function Kt(t,e){var n=st(t,e),r=Qt(n);return n==r?e:pt(r)}function Wt(t,e){if(e>t.lastLine())return e;var n,r=st(t,e);if(!Ht(t,r))return e;for(;n=jt(r);)r=n.find(1,!0).line;return pt(r)+1}function Ht(t,e){var n=Mt&&e.markedSpans;if(n)for(var r=void 0,i=0;ie.maxLineLength&&(e.maxLineLength=n,e.maxLine=t)})}var Xt=null;function Yt(t,e,n){var r;Xt=null;for(var i=0;ie)return i;o.to==e&&(o.from!=o.to&&"before"==n?r=i:Xt=i),o.from==e&&(o.from!=o.to&&"before"!=n?r=i:Xt=i)}return null!=r?r:Xt}var Zt=function(){var t="bbbbbbbbbtstwsbbbbbbbbbbbbbbssstwNN%%%NNNNNN,N,N1111111111NNNNNNNLLLLLLLLLLLLLLLLLLLLLLLLLLNNNNNNLLLLLLLLLLLLLLLLLLLLLLLLLLNNNNbbbbbbsbbbbbbbbbbbbbbbbbbbbbbbbbb,N%%%%NNNNLNNNNN%%11NLNNN1LNNNNNLLLLLLLLLLLLLLLLLLLLLLLNLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLN",e="nnnnnnNNr%%r,rNNmmmmmmmmmmmrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrmmmmmmmmmmmmmmmmmmmmmnnnnnnnnnn%nnrrrmrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrmmmmmmmnNmmmmmmrrmmNmmmmrr1111111111";function n(n){return n<=247?t.charAt(n):1424<=n&&n<=1524?"R":1536<=n&&n<=1785?e.charAt(n-1536):1774<=n&&n<=2220?"r":8192<=n&&n<=8203?"w":8204==n?"b":"L"}var r=/[\u0590-\u05f4\u0600-\u06ff\u0700-\u08ac]/,i=/[stwN]/,o=/[LRr]/,a=/[Lb1n]/,s=/[1n]/;function l(t,e,n){this.level=t,this.from=e,this.to=n}return function(t,e){var c="ltr"==e?"L":"R";if(0==t.length||"ltr"==e&&!r.test(t))return!1;for(var u=t.length,p=[],A=0;A-1&&(r[e]=i.slice(0,o).concat(i.slice(o+1)))}}}function re(t,e){var n=ee(t,e);if(n.length)for(var r=Array.prototype.slice.call(arguments,2),i=0;i0}function se(t){t.prototype.on=function(t,e){te(this,t,e)},t.prototype.off=function(t,e){ne(this,t,e)}}function le(t){t.preventDefault?t.preventDefault():t.returnValue=!1}function ce(t){t.stopPropagation?t.stopPropagation():t.cancelBubble=!0}function ue(t){return null!=t.defaultPrevented?t.defaultPrevented:0==t.returnValue}function pe(t){le(t),ce(t)}function Ae(t){return t.target||t.srcElement}function he(t){var e=t.which;return null==e&&(1&t.button?e=1:2&t.button?e=3:4&t.button&&(e=2)),y&&t.ctrlKey&&1==e&&(e=3),e}var fe,de,_e=function(){if(a&&s<9)return!1;var t=k("div");return"draggable"in t||"dragDrop"in t}();function ge(t){if(null==fe){var e=k("span","​");O(t,k("span",[e,document.createTextNode("x")])),0!=t.firstChild.offsetHeight&&(fe=e.offsetWidth<=1&&e.offsetHeight>2&&!(a&&s<8))}var n=fe?k("span","​"):k("span"," ",null,"display: inline-block; width: 1px; margin-right: -1px");return n.setAttribute("cm-text",""),n}function ye(t){if(null!=de)return de;var e=O(t,document.createTextNode("AخA")),n=M(e,0,1).getBoundingClientRect(),r=M(e,1,2).getBoundingClientRect();return B(t),!(!n||n.left==n.right)&&(de=r.right-n.right<3)}var me=3!="\n\nb".split(/\n/).length?function(t){for(var e=0,n=[],r=t.length;e<=r;){var i=t.indexOf("\n",e);-1==i&&(i=t.length);var o=t.slice(e,"\r"==t.charAt(i-1)?i-1:i),a=o.indexOf("\r");-1!=a?(n.push(o.slice(0,a)),e+=a+1):(n.push(o),e=i+1)}return n}:function(t){return t.split(/\r\n?|\n/)},ve=window.getSelection?function(t){try{return t.selectionStart!=t.selectionEnd}catch(t){return!1}}:function(t){var e;try{e=t.ownerDocument.selection.createRange()}catch(t){}return!(!e||e.parentElement()!=t)&&0!=e.compareEndPoints("StartToEnd",e)},be=function(){var t=k("div");return"oncopy"in t||(t.setAttribute("oncopy","return;"),"function"==typeof t.oncopy)}(),we=null,xe={},Ee={};function Me(t){if("string"==typeof t&&Ee.hasOwnProperty(t))t=Ee[t];else if(t&&"string"==typeof t.name&&Ee.hasOwnProperty(t.name)){var e=Ee[t.name];"string"==typeof e&&(e={name:e}),(t=J(e,t)).name=e.name}else{if("string"==typeof t&&/^[\w\-]+\/[\w\-]+\+xml$/.test(t))return Me("application/xml");if("string"==typeof t&&/^[\w\-]+\/[\w\-]+\+json$/.test(t))return Me("application/json")}return"string"==typeof t?{name:t}:t||{name:"null"}}function Ce(t,e){e=Me(e);var n=xe[e.name];if(!n)return Ce(t,"text/plain");var r=n(t,e);if(Be.hasOwnProperty(e.name)){var i=Be[e.name];for(var o in i)i.hasOwnProperty(o)&&(r.hasOwnProperty(o)&&(r["_"+o]=r[o]),r[o]=i[o])}if(r.name=e.name,e.helperType&&(r.helperType=e.helperType),e.modeProps)for(var a in e.modeProps)r[a]=e.modeProps[a];return r}var Be={};function Oe(t,e){var n=Be.hasOwnProperty(t)?Be[t]:Be[t]={};R(e,n)}function ke(t,e){if(!0===e)return e;if(t.copyState)return t.copyState(e);var n={};for(var r in e){var i=e[r];i instanceof Array&&(i=i.concat([])),n[r]=i}return n}function Pe(t,e){for(var n;t.innerMode&&(n=t.innerMode(e))&&n.mode!=t;)e=n.state,t=n.mode;return n||{mode:t,state:e}}function Ie(t,e,n){return!t.startState||t.startState(e,n)}var Te=function(t,e,n){this.pos=this.start=0,this.string=t,this.tabSize=e||8,this.lastColumnPos=this.lastColumnValue=0,this.lineStart=0,this.lineOracle=n};Te.prototype.eol=function(){return this.pos>=this.string.length},Te.prototype.sol=function(){return this.pos==this.lineStart},Te.prototype.peek=function(){return this.string.charAt(this.pos)||void 0},Te.prototype.next=function(){if(this.pose},Te.prototype.eatSpace=function(){for(var t=this.pos;/[\s\u00a0]/.test(this.string.charAt(this.pos));)++this.pos;return this.pos>t},Te.prototype.skipToEnd=function(){this.pos=this.string.length},Te.prototype.skipTo=function(t){var e=this.string.indexOf(t,this.pos);if(e>-1)return this.pos=e,!0},Te.prototype.backUp=function(t){this.pos-=t},Te.prototype.column=function(){return this.lastColumnPos0?null:(r&&!1!==e&&(this.pos+=r[0].length),r)}var i=function(t){return n?t.toLowerCase():t},o=this.string.substr(this.pos,t.length);if(i(o)==i(t))return!1!==e&&(this.pos+=t.length),!0},Te.prototype.current=function(){return this.string.slice(this.start,this.pos)},Te.prototype.hideFirstChars=function(t,e){this.lineStart+=t;try{return e()}finally{this.lineStart-=t}},Te.prototype.lookAhead=function(t){var e=this.lineOracle;return e&&e.lookAhead(t)},Te.prototype.baseToken=function(){var t=this.lineOracle;return t&&t.baseToken(this.pos)};var De=function(t,e){this.state=t,this.lookAhead=e},Le=function(t,e,n,r){this.state=e,this.doc=t,this.line=n,this.maxLookAhead=r||0,this.baseTokens=null,this.baseTokenPos=1};function Se(t,e,n,r){var i=[t.state.modeGen],o={};He(t,e.text,t.doc.mode,n,function(t,e){return i.push(t,e)},o,r);for(var a=n.state,s=function(r){n.baseTokens=i;var s=t.state.overlays[r],l=1,c=0;n.state=!0,He(t,e.text,s.mode,n,function(t,e){for(var n=l;ct&&i.splice(l,1,t,i[l+1],r),l+=2,c=Math.min(t,r)}if(e)if(s.opaque)i.splice(n,l-n,t,"overlay "+e),l=n+2;else for(;nt.options.maxHighlightLength&&ke(t.doc.mode,r.state),o=Se(t,e,r);i&&(r.state=i),e.stateAfter=r.save(!i),e.styles=o.styles,o.classes?e.styleClasses=o.classes:e.styleClasses&&(e.styleClasses=null),n===t.doc.highlightFrontier&&(t.doc.modeFrontier=Math.max(t.doc.modeFrontier,++t.doc.highlightFrontier))}return e.styles}function Re(t,e,n){var r=t.doc,i=t.display;if(!r.mode.startState)return new Le(r,!0,e);var o=function(t,e,n){for(var r,i,o=t.doc,a=n?-1:e-(t.doc.mode.innerMode?1e3:100),s=e;s>a;--s){if(s<=o.first)return o.first;var l=st(o,s-1),c=l.stateAfter;if(c&&(!n||s+(c instanceof De?c.lookAhead:0)<=o.modeFrontier))return s;var u=j(l.text,null,t.options.tabSize);(null==i||r>u)&&(i=s-1,r=u)}return i}(t,e,n),a=o>r.first&&st(r,o-1).stateAfter,s=a?Le.fromSaved(r,a,o):new Le(r,Ie(r.mode),o);return r.iter(o,e,function(n){je(t,n.text,s);var r=s.line;n.stateAfter=r==e-1||r%5==0||r>=i.viewFrom&&re.start)return o}throw new Error("Mode "+t.name+" failed to advance stream.")}Le.prototype.lookAhead=function(t){var e=this.doc.getLine(this.line+t);return null!=e&&t>this.maxLookAhead&&(this.maxLookAhead=t),e},Le.prototype.baseToken=function(t){if(!this.baseTokens)return null;for(;this.baseTokens[this.baseTokenPos]<=t;)this.baseTokenPos+=2;var e=this.baseTokens[this.baseTokenPos+1];return{type:e&&e.replace(/( |^)overlay .*/,""),size:this.baseTokens[this.baseTokenPos]-t}},Le.prototype.nextLine=function(){this.line++,this.maxLookAhead>0&&this.maxLookAhead--},Le.fromSaved=function(t,e,n){return e instanceof De?new Le(t,ke(t.mode,e.state),n,e.lookAhead):new Le(t,ke(t.mode,e),n)},Le.prototype.save=function(t){var e=!1!==t?ke(this.doc.mode,this.state):this.state;return this.maxLookAhead>0?new De(e,this.maxLookAhead):e};var Qe=function(t,e,n){this.start=t.start,this.end=t.pos,this.string=t.current(),this.type=e||null,this.state=n};function Ke(t,e,n,r){var i,o=t.doc,a=o.mode;e=wt(o,e);var s,l=st(o,e.line),c=Re(t,e.line,n),u=new Te(l.text,t.options.tabSize,c);for(r&&(s=[]);(r||u.post.options.maxHighlightLength?(s=!1,a&&je(t,e,r,p.pos),p.pos=e.length,l=null):l=We(Fe(n,p,r.state,A),o),A){var h=A[0].name;h&&(l="m-"+(l?h+" "+l:h))}if(!s||u!=l){for(;c1&&!/ /.test(t))return t;for(var n=e,r="",i=0;ic&&p.from<=c);A++);if(p.to>=u)return t(n,r,i,o,a,s,l);t(n,r.slice(0,p.to-c),i,o,null,s,l),o=null,r=r.slice(p.to-c),c=p.to}}}function tn(t,e,n,r){var i=!r&&n.widgetNode;i&&t.map.push(t.pos,t.pos+e,i),!r&&t.cm.display.input.needsContentAttribute&&(i||(i=t.content.appendChild(document.createElement("span"))),i.setAttribute("cm-marker",n.id)),i&&(t.cm.display.input.setUneditable(i),t.content.appendChild(i)),t.pos+=e,t.trailingSpace=!1}function en(t,e,n){var r=t.markedSpans,i=t.text,o=0;if(r)for(var a,s,l,c,u,p,A,h=i.length,f=0,d=1,_="",g=0;;){if(g==f){l=c=u=p=s="",A=null,g=1/0;for(var y=[],m=void 0,v=0;vf||w.collapsed&&b.to==f&&b.from==f)?(null!=b.to&&b.to!=f&&g>b.to&&(g=b.to,c=""),w.className&&(l+=" "+w.className),w.css&&(s=(s?s+";":"")+w.css),w.startStyle&&b.from==f&&(u+=" "+w.startStyle),w.endStyle&&b.to==g&&(m||(m=[])).push(w.endStyle,b.to),w.title&&!p&&(p=w.title),w.collapsed&&(!A||St(A.marker,w)<0)&&(A=b)):b.from>f&&g>b.from&&(g=b.from)}if(m)for(var x=0;x=h)break;for(var M=Math.min(h,g);;){if(_){var C=f+_.length;if(!A){var B=C>M?_.slice(0,M-f):_;e.addToken(e,B,a?a+l:l,u,f+B.length==g?c:"",p,s)}if(C>=M){_=_.slice(M-f),f=M;break}f=C,u=""}_=i.slice(o,o=n[d++]),a=Xe(n[d++],e.cm.options)}}else for(var O=1;On)return{map:t.measure.maps[i],cache:t.measure.caches[i],before:!0}}function kn(t,e,n,r){return Tn(t,In(t,e),n,r)}function Pn(t,e){if(e>=t.display.viewFrom&&e=n.lineN&&e2&&o.push((l.bottom+c.top)/2-n.top)}}o.push(n.bottom-n.top)}}(t,e.view,e.rect),e.hasHeights=!0),(o=function(t,e,n,r){var i,o=Sn(e.map,n,r),l=o.node,c=o.start,u=o.end,p=o.collapse;if(3==l.nodeType){for(var A=0;A<4;A++){for(;c&&it(e.line.text.charAt(o.coverStart+c));)--c;for(;o.coverStart+u1}(t))return e;var n=screen.logicalXDPI/screen.deviceXDPI,r=screen.logicalYDPI/screen.deviceYDPI;return{left:e.left*n,right:e.right*n,top:e.top*r,bottom:e.bottom*r}}(t.display.measure,i))}else{var h;c>0&&(p=r="right"),i=t.options.lineWrapping&&(h=l.getClientRects()).length>1?h["right"==r?h.length-1:0]:l.getBoundingClientRect()}if(a&&s<9&&!c&&(!i||!i.left&&!i.right)){var f=l.parentNode.getClientRects()[0];i=f?{left:f.left,right:f.left+er(t.display),top:f.top,bottom:f.bottom}:Ln}for(var d=i.top-e.rect.top,_=i.bottom-e.rect.top,g=(d+_)/2,y=e.view.measure.heights,m=0;me)&&(i=(o=l-s)-1,e>=l&&(a="right")),null!=i){if(r=t[c+2],s==l&&n==(r.insertLeft?"left":"right")&&(a=n),"left"==n&&0==i)for(;c&&t[c-2]==t[c-3]&&t[c-1].insertLeft;)r=t[2+(c-=3)],a="left";if("right"==n&&i==l-s)for(;c=0&&(n=t[i]).left==n.right;i--);return n}function Rn(t){if(t.measure&&(t.measure.cache={},t.measure.heights=null,t.rest))for(var e=0;e=r.text.length?(l=r.text.length,c="before"):l<=0&&(l=0,c="after"),!s)return a("before"==c?l-1:l,"before"==c);function u(t,e,n){var r=s[e],i=1==r.level;return a(n?t-1:t,i!=n)}var p=Yt(s,l,c),A=Xt,h=u(l,p,"before"==c);return null!=A&&(h.other=u(l,A,"before"!=c)),h}function Gn(t,e){var n=0;e=wt(t.doc,e),t.options.lineWrapping||(n=er(t.display)*e.ch);var r=st(t.doc,e.line),i=Nt(r)+wn(t.display);return{left:n,right:n,top:i,bottom:i+r.height}}function qn(t,e,n,r,i){var o=dt(t,e,n);return o.xRel=i,r&&(o.outside=!0),o}function Xn(t,e,n){var r=t.doc;if((n+=t.display.viewOffset)<0)return qn(r.first,0,null,!0,-1);var i=At(r,n),o=r.first+r.size-1;if(i>o)return qn(r.first+r.size-1,st(r,o).text.length,null,!0,1);e<0&&(e=0);for(var a=st(r,i);;){var s=$n(t,a,i,e,n),l=Ut(a,s.ch+(s.xRel>0?1:0));if(!l)return s;var c=l.find(1);if(c.line==i)return c;a=st(r,i=c.line)}}function Yn(t,e,n,r){r-=Kn(e);var i=e.text.length,o=at(function(e){return Tn(t,n,e-1).bottom<=r},i,0);return i=at(function(e){return Tn(t,n,e).top>r},o,i),{begin:o,end:i}}function Zn(t,e,n,r){n||(n=In(t,e));var i=Wn(t,e,Tn(t,n,r),"line").top;return Yn(t,e,n,i)}function Jn(t,e,n,r){return!(t.bottom<=n)&&(t.top>n||(r?t.left:t.right)>e)}function $n(t,e,n,r,i){i-=Nt(e);var o=In(t,e),a=Kn(e),s=0,l=e.text.length,c=!0,u=Jt(e,t.doc.direction);if(u){var p=(t.options.lineWrapping?function(t,e,n,r,i,o,a){var s=Yn(t,e,r,a),l=s.begin,c=s.end;/\s/.test(e.text.charAt(c-1))&&c--;for(var u=null,p=null,A=0;A=c||h.to<=l)){var f=1!=h.level,d=Tn(t,r,f?Math.min(c,h.to)-1:Math.max(l,h.from)).right,_=d_)&&(u=h,p=_)}}return u||(u=i[i.length-1]),u.fromc&&(u={from:u.from,to:c,level:u.level}),u}:function(t,e,n,r,i,o,a){var s=at(function(s){var l=i[s],c=1!=l.level;return Jn(Nn(t,dt(n,c?l.to:l.from,c?"before":"after"),"line",e,r),o,a,!0)},0,i.length-1),l=i[s];if(s>0){var c=1!=l.level,u=Nn(t,dt(n,c?l.from:l.to,c?"after":"before"),"line",e,r);Jn(u,o,a,!0)&&u.top>a&&(l=i[s-1])}return l})(t,e,n,o,u,r,i);c=1!=p.level,s=c?p.from:p.to-1,l=c?p.to:p.from-1}var A,h,f=null,d=null,_=at(function(e){var n=Tn(t,o,e);return n.top+=a,n.bottom+=a,!!Jn(n,r,i,!1)&&(n.top<=i&&n.left<=r&&(f=e,d=n),!0)},s,l),g=!1;if(d){var y=r-d.left=v.bottom}return _=ot(e.text,_,1),qn(n,_,h,g,r-A)}function tr(t){if(null!=t.cachedTextHeight)return t.cachedTextHeight;if(null==Dn){Dn=k("pre");for(var e=0;e<49;++e)Dn.appendChild(document.createTextNode("x")),Dn.appendChild(k("br"));Dn.appendChild(document.createTextNode("x"))}O(t.measure,Dn);var n=Dn.offsetHeight/50;return n>3&&(t.cachedTextHeight=n),B(t.measure),n||1}function er(t){if(null!=t.cachedCharWidth)return t.cachedCharWidth;var e=k("span","xxxxxxxxxx"),n=k("pre",[e]);O(t.measure,n);var r=e.getBoundingClientRect(),i=(r.right-r.left)/10;return i>2&&(t.cachedCharWidth=i),i||10}function nr(t){for(var e=t.display,n={},r={},i=e.gutters.clientLeft,o=e.gutters.firstChild,a=0;o;o=o.nextSibling,++a)n[t.options.gutters[a]]=o.offsetLeft+o.clientLeft+i,r[t.options.gutters[a]]=o.clientWidth;return{fixedPos:rr(e),gutterTotalWidth:e.gutters.offsetWidth,gutterLeft:n,gutterWidth:r,wrapperWidth:e.wrapper.clientWidth}}function rr(t){return t.scroller.getBoundingClientRect().left-t.sizer.getBoundingClientRect().left}function ir(t){var e=tr(t.display),n=t.options.lineWrapping,r=n&&Math.max(5,t.display.scroller.clientWidth/er(t.display)-3);return function(i){if(Ht(t.doc,i))return 0;var o=0;if(i.widgets)for(var a=0;a=t.display.viewTo)return null;if((e-=t.display.viewFrom)<0)return null;for(var n=t.display.view,r=0;r=t.display.viewTo||s.to().linee||e==n&&a.to==e)&&(r(Math.max(a.from,e),Math.min(a.to,n),1==a.level?"rtl":"ltr",o),i=!0)}i||r(e,n,"ltr")}(d,n||0,null==r?A:r,function(t,e,i,p){var _="ltr"==i,g=h(t,_?"left":"right"),y=h(e-1,_?"right":"left"),m=null==n&&0==t,v=null==r&&e==A,b=0==p,w=!d||p==d.length-1;if(y.top-g.top<=3){var x=(c?m:v)&&b,E=(c?v:m)&&w,M=x?s:(_?g:y).left,C=E?l:(_?y:g).right;u(M,g.top,C-M,g.bottom)}else{var B,O,k,P;_?(B=c&&m&&b?s:g.left,O=c?l:f(t,i,"before"),k=c?s:f(e,i,"after"),P=c&&v&&w?l:y.right):(B=c?f(t,i,"before"):s,O=!c&&m&&b?l:g.right,k=!c&&v&&w?s:y.left,P=c?f(e,i,"after"):l),u(B,g.top,O-B,g.bottom),g.bottom0?e.blinker=setInterval(function(){return e.cursorDiv.style.visibility=(n=!n)?"":"hidden"},t.options.cursorBlinkRate):t.options.cursorBlinkRate<0&&(e.cursorDiv.style.visibility="hidden")}}function fr(t){t.state.focused||(t.display.input.focus(),_r(t))}function dr(t){t.state.delayingBlurEvent=!0,setTimeout(function(){t.state.delayingBlurEvent&&(t.state.delayingBlurEvent=!1,gr(t))},100)}function _r(t,e){t.state.delayingBlurEvent&&(t.state.delayingBlurEvent=!1),"nocursor"!=t.options.readOnly&&(t.state.focused||(re(t,"focus",t,e),t.state.focused=!0,D(t.display.wrapper,"CodeMirror-focused"),t.curOp||t.display.selForContextMenu==t.doc.sel||(t.display.input.reset(),l&&setTimeout(function(){return t.display.input.reset(!0)},20)),t.display.input.receivedFocus()),hr(t))}function gr(t,e){t.state.delayingBlurEvent||(t.state.focused&&(re(t,"blur",t,e),t.state.focused=!1,C(t.display.wrapper,"CodeMirror-focused")),clearInterval(t.display.blinker),setTimeout(function(){t.state.focused||(t.display.shift=!1)},150))}function yr(t){for(var e=t.display,n=e.lineDiv.offsetTop,r=0;r.005||u<-.005)&&(ut(i.line,o),mr(i.line),i.rest))for(var p=0;p=a&&(o=At(e,Nt(st(e,l))-t.wrapper.clientHeight),a=l)}return{from:o,to:Math.max(a,o+1)}}function br(t){var e=t.display,n=e.view;if(e.alignWidgets||e.gutters.firstChild&&t.options.fixedGutter){for(var r=rr(e)-e.scroller.scrollLeft+t.doc.scrollLeft,i=e.gutters.offsetWidth,o=r+"px",a=0;ao&&(e.bottom=e.top+o);var s=t.doc.height+xn(n),l=e.tops-r;if(e.topi+o){var u=Math.min(e.top,(c?s:e.bottom)-o);u!=i&&(a.scrollTop=u)}var p=t.curOp&&null!=t.curOp.scrollLeft?t.curOp.scrollLeft:n.scroller.scrollLeft,A=Cn(t)-(t.options.fixedGutter?n.gutters.offsetWidth:0),h=e.right-e.left>A;return h&&(e.right=e.left+A),e.left<10?a.scrollLeft=0:e.leftA+p-3&&(a.scrollLeft=e.right+(h?0:10)-A),a}function Er(t,e){null!=e&&(Br(t),t.curOp.scrollTop=(null==t.curOp.scrollTop?t.doc.scrollTop:t.curOp.scrollTop)+e)}function Mr(t){Br(t);var e=t.getCursor();t.curOp.scrollToPos={from:e,to:e,margin:t.options.cursorScrollMargin}}function Cr(t,e,n){null==e&&null==n||Br(t),null!=e&&(t.curOp.scrollLeft=e),null!=n&&(t.curOp.scrollTop=n)}function Br(t){var e=t.curOp.scrollToPos;if(e){t.curOp.scrollToPos=null;var n=Gn(t,e.from),r=Gn(t,e.to);Or(t,n,r,e.margin)}}function Or(t,e,n,r){var i=xr(t,{left:Math.min(e.left,n.left),top:Math.min(e.top,n.top)-r,right:Math.max(e.right,n.right),bottom:Math.max(e.bottom,n.bottom)+r});Cr(t,i.scrollLeft,i.scrollTop)}function kr(t,e){Math.abs(t.doc.scrollTop-e)<2||(n||si(t,{top:e}),Pr(t,e,!0),n&&si(t),ni(t,100))}function Pr(t,e,n){e=Math.min(t.display.scroller.scrollHeight-t.display.scroller.clientHeight,e),(t.display.scroller.scrollTop!=e||n)&&(t.doc.scrollTop=e,t.display.scrollbars.setScrollTop(e),t.display.scroller.scrollTop!=e&&(t.display.scroller.scrollTop=e))}function Ir(t,e,n,r){e=Math.min(e,t.display.scroller.scrollWidth-t.display.scroller.clientWidth),(n?e==t.doc.scrollLeft:Math.abs(t.doc.scrollLeft-e)<2)&&!r||(t.doc.scrollLeft=e,br(t),t.display.scroller.scrollLeft!=e&&(t.display.scroller.scrollLeft=e),t.display.scrollbars.setScrollLeft(e))}function Tr(t){var e=t.display,n=e.gutters.offsetWidth,r=Math.round(t.doc.height+xn(t.display));return{clientHeight:e.scroller.clientHeight,viewHeight:e.wrapper.clientHeight,scrollWidth:e.scroller.scrollWidth,clientWidth:e.scroller.clientWidth,viewWidth:e.wrapper.clientWidth,barLeft:t.options.fixedGutter?n:0,docHeight:r,scrollHeight:r+Mn(t)+e.barHeight,nativeBarWidth:e.nativeBarWidth,gutterWidth:n}}var Dr=function(t,e,n){this.cm=n;var r=this.vert=k("div",[k("div",null,null,"min-width: 1px")],"CodeMirror-vscrollbar"),i=this.horiz=k("div",[k("div",null,null,"height: 100%; min-height: 1px")],"CodeMirror-hscrollbar");r.tabIndex=i.tabIndex=-1,t(r),t(i),te(r,"scroll",function(){r.clientHeight&&e(r.scrollTop,"vertical")}),te(i,"scroll",function(){i.clientWidth&&e(i.scrollLeft,"horizontal")}),this.checkedZeroWidth=!1,a&&s<8&&(this.horiz.style.minHeight=this.vert.style.minWidth="18px")};Dr.prototype.update=function(t){var e=t.scrollWidth>t.clientWidth+1,n=t.scrollHeight>t.clientHeight+1,r=t.nativeBarWidth;if(n){this.vert.style.display="block",this.vert.style.bottom=e?r+"px":"0";var i=t.viewHeight-(e?r:0);this.vert.firstChild.style.height=Math.max(0,t.scrollHeight-t.clientHeight+i)+"px"}else this.vert.style.display="",this.vert.firstChild.style.height="0";if(e){this.horiz.style.display="block",this.horiz.style.right=n?r+"px":"0",this.horiz.style.left=t.barLeft+"px";var o=t.viewWidth-t.barLeft-(n?r:0);this.horiz.firstChild.style.width=Math.max(0,t.scrollWidth-t.clientWidth+o)+"px"}else this.horiz.style.display="",this.horiz.firstChild.style.width="0";return!this.checkedZeroWidth&&t.clientHeight>0&&(0==r&&this.zeroWidthHack(),this.checkedZeroWidth=!0),{right:n?r:0,bottom:e?r:0}},Dr.prototype.setScrollLeft=function(t){this.horiz.scrollLeft!=t&&(this.horiz.scrollLeft=t),this.disableHoriz&&this.enableZeroWidthBar(this.horiz,this.disableHoriz,"horiz")},Dr.prototype.setScrollTop=function(t){this.vert.scrollTop!=t&&(this.vert.scrollTop=t),this.disableVert&&this.enableZeroWidthBar(this.vert,this.disableVert,"vert")},Dr.prototype.zeroWidthHack=function(){var t=y&&!h?"12px":"18px";this.horiz.style.height=this.vert.style.width=t,this.horiz.style.pointerEvents=this.vert.style.pointerEvents="none",this.disableHoriz=new U,this.disableVert=new U},Dr.prototype.enableZeroWidthBar=function(t,e,n){t.style.pointerEvents="auto",e.set(1e3,function r(){var i=t.getBoundingClientRect(),o="vert"==n?document.elementFromPoint(i.right-1,(i.top+i.bottom)/2):document.elementFromPoint((i.right+i.left)/2,i.bottom-1);o!=t?t.style.pointerEvents="none":e.set(1e3,r)})},Dr.prototype.clear=function(){var t=this.horiz.parentNode;t.removeChild(this.horiz),t.removeChild(this.vert)};var Lr=function(){};function Sr(t,e){e||(e=Tr(t));var n=t.display.barWidth,r=t.display.barHeight;zr(t,e);for(var i=0;i<4&&n!=t.display.barWidth||r!=t.display.barHeight;i++)n!=t.display.barWidth&&t.options.lineWrapping&&yr(t),zr(t,Tr(t)),n=t.display.barWidth,r=t.display.barHeight}function zr(t,e){var n=t.display,r=n.scrollbars.update(e);n.sizer.style.paddingRight=(n.barWidth=r.right)+"px",n.sizer.style.paddingBottom=(n.barHeight=r.bottom)+"px",n.heightForcer.style.borderBottom=r.bottom+"px solid transparent",r.right&&r.bottom?(n.scrollbarFiller.style.display="block",n.scrollbarFiller.style.height=r.bottom+"px",n.scrollbarFiller.style.width=r.right+"px"):n.scrollbarFiller.style.display="",r.bottom&&t.options.coverGutterNextToScrollbar&&t.options.fixedGutter?(n.gutterFiller.style.display="block",n.gutterFiller.style.height=r.bottom+"px",n.gutterFiller.style.width=e.gutterWidth+"px"):n.gutterFiller.style.display=""}Lr.prototype.update=function(){return{bottom:0,right:0}},Lr.prototype.setScrollLeft=function(){},Lr.prototype.setScrollTop=function(){},Lr.prototype.clear=function(){};var Rr={native:Dr,null:Lr};function jr(t){t.display.scrollbars&&(t.display.scrollbars.clear(),t.display.scrollbars.addClass&&C(t.display.wrapper,t.display.scrollbars.addClass)),t.display.scrollbars=new Rr[t.options.scrollbarStyle](function(e){t.display.wrapper.insertBefore(e,t.display.scrollbarFiller),te(e,"mousedown",function(){t.state.focused&&setTimeout(function(){return t.display.input.focus()},0)}),e.setAttribute("cm-not-content","true")},function(e,n){"horizontal"==n?Ir(t,e):kr(t,e)},t),t.display.scrollbars.addClass&&D(t.display.wrapper,t.display.scrollbars.addClass)}var Ur=0;function Fr(t){t.curOp={cm:t,viewChanged:!1,startHeight:t.doc.height,forceUpdate:!1,updateInput:null,typing:!1,changeObjs:null,cursorActivityHandlers:null,cursorActivityCalled:0,selectionChanged:!1,updateMaxLine:!1,scrollLeft:null,scrollTop:null,scrollToPos:null,focus:!1,id:++Ur},function(t){on?on.ops.push(t):t.ownsGroup=on={ops:[t],delayedCallbacks:[]}}(t.curOp)}function Qr(t){var e=t.curOp;!function(t,e){var n=t.ownsGroup;if(n)try{!function(t){var e=t.delayedCallbacks,n=0;do{for(;n=n.viewTo)||n.maxLineChanged&&e.options.lineWrapping,t.update=t.mustUpdate&&new ii(e,t.mustUpdate&&{top:t.scrollTop,ensure:t.scrollToPos},t.forceUpdate)}function Wr(t){t.updatedDisplay=t.mustUpdate&&oi(t.cm,t.update)}function Hr(t){var e=t.cm,n=e.display;t.updatedDisplay&&yr(e),t.barMeasure=Tr(e),n.maxLineChanged&&!e.options.lineWrapping&&(t.adjustWidthTo=kn(e,n.maxLine,n.maxLine.text.length).left+3,e.display.sizerWidth=t.adjustWidthTo,t.barMeasure.scrollWidth=Math.max(n.scroller.clientWidth,n.sizer.offsetLeft+t.adjustWidthTo+Mn(e)+e.display.barWidth),t.maxScrollLeft=Math.max(0,n.sizer.offsetLeft+t.adjustWidthTo-Cn(e))),(t.updatedDisplay||t.selectionChanged)&&(t.preparedSelection=n.input.prepareSelection())}function Vr(t){var e=t.cm;null!=t.adjustWidthTo&&(e.display.sizer.style.minWidth=t.adjustWidthTo+"px",t.maxScrollLeft1&&(a=!0)),null!=c.scrollLeft&&(Ir(t,c.scrollLeft),Math.abs(t.doc.scrollLeft-p)>1&&(a=!0)),!a)break}return i}(e,wt(r,t.scrollToPos.from),wt(r,t.scrollToPos.to),t.scrollToPos.margin);!function(t,e){if(!ie(t,"scrollCursorIntoView")){var n=t.display,r=n.sizer.getBoundingClientRect(),i=null;if(e.top+r.top<0?i=!0:e.bottom+r.top>(window.innerHeight||document.documentElement.clientHeight)&&(i=!1),null!=i&&!f){var o=k("div","​",null,"position: absolute;\n top: "+(e.top-n.viewOffset-wn(t.display))+"px;\n height: "+(e.bottom-e.top+Mn(t)+n.barHeight)+"px;\n left: "+e.left+"px; width: "+Math.max(2,e.right-e.left)+"px;");t.display.lineSpace.appendChild(o),o.scrollIntoView(i),t.display.lineSpace.removeChild(o)}}}(e,i)}var o=t.maybeHiddenMarkers,a=t.maybeUnhiddenMarkers;if(o)for(var s=0;se)&&(i.updateLineNumbers=e),t.curOp.viewChanged=!0,e>=i.viewTo)Mt&&Kt(t.doc,e)i.viewFrom?$r(t):(i.viewFrom+=r,i.viewTo+=r);else if(e<=i.viewFrom&&n>=i.viewTo)$r(t);else if(e<=i.viewFrom){var o=ti(t,n,n+r,1);o?(i.view=i.view.slice(o.index),i.viewFrom=o.lineN,i.viewTo+=r):$r(t)}else if(n>=i.viewTo){var a=ti(t,e,e,-1);a?(i.view=i.view.slice(0,a.index),i.viewTo=a.lineN):$r(t)}else{var s=ti(t,e,e,-1),l=ti(t,n,n+r,1);s&&l?(i.view=i.view.slice(0,s.index).concat(rn(t,s.lineN,l.lineN)).concat(i.view.slice(l.index)),i.viewTo+=r):$r(t)}var c=i.externalMeasured;c&&(n=i.lineN&&e=r.viewTo)){var o=r.view[sr(t,e)];if(null!=o.node){var a=o.changes||(o.changes=[]);-1==F(a,n)&&a.push(n)}}}function $r(t){t.display.viewFrom=t.display.viewTo=t.doc.first,t.display.view=[],t.display.viewOffset=0}function ti(t,e,n,r){var i,o=sr(t,e),a=t.display.view;if(!Mt||n==t.doc.first+t.doc.size)return{index:o,lineN:n};for(var s=t.display.viewFrom,l=0;l0){if(o==a.length-1)return null;i=s+a[o].size-e,o++}else i=s-e;e+=i,n+=i}for(;Kt(t.doc,n)!=n;){if(o==(r<0?0:a.length-1))return null;n+=r*a[o-(r<0?1:0)].size,o+=r}return{index:o,lineN:n}}function ei(t){for(var e=t.display.view,n=0,r=0;r=t.display.viewTo)){var n=+new Date+t.options.workTime,r=Re(t,e.highlightFrontier),i=[];e.iter(r.line,Math.min(e.first+e.size,t.display.viewTo+500),function(o){if(r.line>=t.display.viewFrom){var a=o.styles,s=o.text.length>t.options.maxHighlightLength?ke(e.mode,r.state):null,l=Se(t,o,r,!0);s&&(r.state=s),o.styles=l.styles;var c=o.styleClasses,u=l.classes;u?o.styleClasses=u:c&&(o.styleClasses=null);for(var p=!a||a.length!=o.styles.length||c!=u&&(!c||!u||c.bgClass!=u.bgClass||c.textClass!=u.textClass),A=0;!p&&An)return ni(t,t.options.workDelay),!0}),e.highlightFrontier=r.line,e.modeFrontier=Math.max(e.modeFrontier,r.line),i.length&&Gr(t,function(){for(var e=0;e=n.viewFrom&&e.visible.to<=n.viewTo&&(null==n.updateLineNumbers||n.updateLineNumbers>=n.viewTo)&&n.renderedView==n.view&&0==ei(t))return!1;wr(t)&&($r(t),e.dims=nr(t));var i=r.first+r.size,o=Math.max(e.visible.from-t.options.viewportMargin,r.first),a=Math.min(i,e.visible.to+t.options.viewportMargin);n.viewFroma&&n.viewTo-a<20&&(a=Math.min(i,n.viewTo)),Mt&&(o=Kt(t.doc,o),a=Wt(t.doc,a));var s=o!=n.viewFrom||a!=n.viewTo||n.lastWrapHeight!=e.wrapperHeight||n.lastWrapWidth!=e.wrapperWidth;!function(t,e,n){var r=t.display;0==r.view.length||e>=r.viewTo||n<=r.viewFrom?(r.view=rn(t,e,n),r.viewFrom=e):(r.viewFrom>e?r.view=rn(t,e,r.viewFrom).concat(r.view):r.viewFromn&&(r.view=r.view.slice(0,sr(t,n)))),r.viewTo=n}(t,o,a),n.viewOffset=Nt(st(t.doc,n.viewFrom)),t.display.mover.style.top=n.viewOffset+"px";var c=ei(t);if(!s&&0==c&&!e.force&&n.renderedView==n.view&&(null==n.updateLineNumbers||n.updateLineNumbers>=n.viewTo))return!1;var u=function(t){if(t.hasFocus())return null;var e=T();if(!e||!I(t.display.lineDiv,e))return null;var n={activeElt:e};if(window.getSelection){var r=window.getSelection();r.anchorNode&&r.extend&&I(t.display.lineDiv,r.anchorNode)&&(n.anchorNode=r.anchorNode,n.anchorOffset=r.anchorOffset,n.focusNode=r.focusNode,n.focusOffset=r.focusOffset)}return n}(t);return c>4&&(n.lineDiv.style.display="none"),function(t,e,n){var r=t.display,i=t.options.lineNumbers,o=r.lineDiv,a=o.firstChild;function s(e){var n=e.nextSibling;return l&&y&&t.display.currentWheelTarget==e?e.style.display="none":e.parentNode.removeChild(e),n}for(var c=r.view,u=r.viewFrom,p=0;p-1&&(h=!1),cn(t,A,u,n)),h&&(B(A.lineNumber),A.lineNumber.appendChild(document.createTextNode(ft(t.options,u)))),a=A.node.nextSibling}else{var f=_n(t,A,u,n);o.insertBefore(f,a)}u+=A.size}for(;a;)a=s(a)}(t,n.updateLineNumbers,e.dims),c>4&&(n.lineDiv.style.display=""),n.renderedView=n.view,function(t){if(t&&t.activeElt&&t.activeElt!=T()&&(t.activeElt.focus(),t.anchorNode&&I(document.body,t.anchorNode)&&I(document.body,t.focusNode))){var e=window.getSelection(),n=document.createRange();n.setEnd(t.anchorNode,t.anchorOffset),n.collapse(!1),e.removeAllRanges(),e.addRange(n),e.extend(t.focusNode,t.focusOffset)}}(u),B(n.cursorDiv),B(n.selectionDiv),n.gutters.style.height=n.sizer.style.minHeight=0,s&&(n.lastWrapHeight=e.wrapperHeight,n.lastWrapWidth=e.wrapperWidth,ni(t,400)),n.updateLineNumbers=null,!0}function ai(t,e){for(var n=e.viewport,r=!0;(r&&t.options.lineWrapping&&e.oldDisplayWidth!=Cn(t)||(n&&null!=n.top&&(n={top:Math.min(t.doc.height+xn(t.display)-Bn(t),n.top)}),e.visible=vr(t.display,t.doc,n),!(e.visible.from>=t.display.viewFrom&&e.visible.to<=t.display.viewTo)))&&oi(t,e);r=!1){yr(t);var i=Tr(t);lr(t),Sr(t,i),ci(t,i),e.force=!1}e.signal(t,"update",t),t.display.viewFrom==t.display.reportedViewFrom&&t.display.viewTo==t.display.reportedViewTo||(e.signal(t,"viewportChange",t,t.display.viewFrom,t.display.viewTo),t.display.reportedViewFrom=t.display.viewFrom,t.display.reportedViewTo=t.display.viewTo)}function si(t,e){var n=new ii(t,e);if(oi(t,n)){yr(t),ai(t,n);var r=Tr(t);lr(t),Sr(t,r),ci(t,r),n.finish()}}function li(t){var e=t.display.gutters.offsetWidth;t.display.sizer.style.marginLeft=e+"px"}function ci(t,e){t.display.sizer.style.minHeight=e.docHeight+"px",t.display.heightForcer.style.top=e.docHeight+"px",t.display.gutters.style.height=e.docHeight+t.display.barHeight+Mn(t)+"px"}function ui(t){var e=t.display.gutters,n=t.options.gutters;B(e);for(var r=0;r-1&&!t.lineNumbers&&(t.gutters=t.gutters.slice(0),t.gutters.splice(e,1))}ii.prototype.signal=function(t,e){ae(t,e)&&this.events.push(arguments)},ii.prototype.finish=function(){for(var t=0;ts.clientWidth,u=s.scrollHeight>s.clientHeight;if(i&&c||o&&u){if(o&&y&&l)t:for(var A=e.target,h=a.view;A!=s;A=A.parentNode)for(var f=0;f=0&&_t(t,r.to())<=0)return n}return-1};var yi=function(t,e){this.anchor=t,this.head=e};function mi(t,e){var n=t[e];t.sort(function(t,e){return _t(t.from(),e.from())}),e=F(t,n);for(var r=1;r=0){var a=vt(o.from(),i.from()),s=mt(o.to(),i.to()),l=o.empty()?i.from()==i.head:o.from()==o.head;r<=e&&--e,t.splice(--r,2,new yi(l?s:a,l?a:s))}}return new gi(t,e)}function vi(t,e){return new gi([new yi(t,e||t)],0)}function bi(t){return t.text?dt(t.from.line+t.text.length-1,X(t.text).length+(1==t.text.length?t.from.ch:0)):t.to}function wi(t,e){if(_t(t,e.from)<0)return t;if(_t(t,e.to)<=0)return bi(e);var n=t.line+e.text.length-(e.to.line-e.from.line)-1,r=t.ch;return t.line==e.to.line&&(r+=bi(e).ch-e.to.ch),dt(n,r)}function xi(t,e){for(var n=[],r=0;r1&&t.remove(s.line+1,f-1),t.insert(s.line+1,g)}sn(t,"change",t,e)}function ki(t,e,n){!function t(r,i,o){if(r.linked)for(var a=0;as-(t.cm?t.cm.options.historyEventDelay:500)||"*"==e.origin.charAt(0)))&&(o=function(t,e){return e?(Li(t.done),X(t.done)):t.done.length&&!X(t.done).ranges?X(t.done):t.done.length>1&&!t.done[t.done.length-2].ranges?(t.done.pop(),X(t.done)):void 0}(i,i.lastOp==r)))a=X(o.changes),0==_t(e.from,e.to)&&0==_t(e.from,a.to)?a.to=bi(e):o.changes.push(Di(t,e));else{var l=X(i.done);for(l&&l.ranges||Ri(t.sel,i.done),o={changes:[Di(t,e)],generation:i.generation},i.done.push(o);i.done.length>i.undoDepth;)i.done.shift(),i.done[0].ranges||i.done.shift()}i.done.push(n),i.generation=++i.maxGeneration,i.lastModTime=i.lastSelTime=s,i.lastOp=i.lastSelOp=r,i.lastOrigin=i.lastSelOrigin=e.origin,a||re(t,"historyAdded")}function zi(t,e,n,r){var i=t.history,o=r&&r.origin;n==i.lastSelOp||o&&i.lastSelOrigin==o&&(i.lastModTime==i.lastSelTime&&i.lastOrigin==o||function(t,e,n,r){var i=e.charAt(0);return"*"==i||"+"==i&&n.ranges.length==r.ranges.length&&n.somethingSelected()==r.somethingSelected()&&new Date-t.history.lastSelTime<=(t.cm?t.cm.options.historyEventDelay:500)}(t,o,X(i.done),e))?i.done[i.done.length-1]=e:Ri(e,i.done),i.lastSelTime=+new Date,i.lastSelOrigin=o,i.lastSelOp=n,r&&!1!==r.clearRedo&&Li(i.undone)}function Ri(t,e){var n=X(e);n&&n.ranges&&n.equals(t)||e.push(t)}function ji(t,e,n,r){var i=e["spans_"+t.id],o=0;t.iter(Math.max(t.first,n),Math.min(t.first+t.size,r),function(n){n.markedSpans&&((i||(i=e["spans_"+t.id]={}))[o]=n.markedSpans),++o})}function Ui(t){if(!t)return null;for(var e,n=0;n-1&&(X(s)[p]=c[p],delete c[p])}}}return r}function Ki(t,e,n,r){if(r){var i=t.anchor;if(n){var o=_t(e,i)<0;o!=_t(n,i)<0?(i=e,e=n):o!=_t(e,n)<0&&(e=n)}return new yi(i,e)}return new yi(n||e,e)}function Wi(t,e,n,r,i){null==i&&(i=t.cm&&(t.cm.display.shift||t.extend)),qi(t,new gi([Ki(t.sel.primary(),e,n,i)],0),r)}function Hi(t,e,n){for(var r=[],i=t.cm&&(t.cm.display.shift||t.extend),o=0;o=e.ch:s.to>e.ch))){if(i&&(re(l,"beforeCursorEnter"),l.explicitlyCleared)){if(o.markedSpans){--a;continue}break}if(!l.atomic)continue;if(n){var c=l.find(r<0?1:-1),u=void 0;if((r<0?l.inclusiveRight:l.inclusiveLeft)&&(c=eo(t,c,-r,c&&c.line==e.line?o:null)),c&&c.line==e.line&&(u=_t(c,n))&&(r<0?u<0:u>0))return $i(t,c,e,r,i)}var p=l.find(r<0?-1:1);return(r<0?l.inclusiveLeft:l.inclusiveRight)&&(p=eo(t,p,r,p.line==e.line?o:null)),p?$i(t,p,e,r,i):null}}return e}function to(t,e,n,r,i){var o=r||1,a=$i(t,e,n,o,i)||!i&&$i(t,e,n,o,!0)||$i(t,e,n,-o,i)||!i&&$i(t,e,n,-o,!0);return a||(t.cantEdit=!0,dt(t.first,0))}function eo(t,e,n,r){return n<0&&0==e.ch?e.line>t.first?wt(t,dt(e.line-1)):null:n>0&&e.ch==(r||st(t,e.line)).text.length?e.line0)){var u=[l,1],p=_t(c.from,s.from),A=_t(c.to,s.to);(p<0||!a.inclusiveLeft&&!p)&&u.push({from:c.from,to:s.from}),(A>0||!a.inclusiveRight&&!A)&&u.push({from:s.to,to:c.to}),i.splice.apply(i,u),l+=u.length-3}}return i}(t,e.from,e.to);if(r)for(var i=r.length-1;i>=0;--i)oo(t,{from:r[i].from,to:r[i].to,text:i?[""]:e.text,origin:e.origin});else oo(t,e)}}function oo(t,e){if(1!=e.text.length||""!=e.text[0]||0!=_t(e.from,e.to)){var n=xi(t,e);Si(t,e,n,t.cm?t.cm.curOp.id:NaN),lo(t,e,n,kt(t,e));var r=[];ki(t,function(t,n){n||-1!=F(r,t.history)||(Ao(t.history,e),r.push(t.history)),lo(t,e,null,kt(t,e))})}}function ao(t,e,n){var r=t.cm&&t.cm.state.suppressEdits;if(!r||n){for(var i,o=t.history,a=t.sel,s="undo"==e?o.done:o.undone,l="undo"==e?o.undone:o.done,c=0;c=0;--h){var f=A(h);if(f)return f.v}}}}function so(t,e){if(0!=e&&(t.first+=e,t.sel=new gi(Y(t.sel.ranges,function(t){return new yi(dt(t.anchor.line+e,t.anchor.ch),dt(t.head.line+e,t.head.ch))}),t.sel.primIndex),t.cm)){Zr(t.cm,t.first,t.first-e,e);for(var n=t.cm.display,r=n.viewFrom;rt.lastLine())){if(e.from.lineo&&(e={from:e.from,to:dt(o,st(t,o).text.length),text:[e.text[0]],origin:e.origin}),e.removed=lt(t,e.from,e.to),n||(n=xi(t,e)),t.cm?function(t,e,n){var r=t.doc,i=t.display,o=e.from,a=e.to,s=!1,l=o.line;t.options.lineWrapping||(l=pt(Qt(st(r,o.line))),r.iter(l,a.line+1,function(t){if(t==i.maxLine)return s=!0,!0})),r.sel.contains(e.from,e.to)>-1&&oe(t),Oi(r,e,n,ir(t)),t.options.lineWrapping||(r.iter(l,o.line+e.text.length,function(t){var e=Gt(t);e>i.maxLineLength&&(i.maxLine=t,i.maxLineLength=e,i.maxLineChanged=!0,s=!1)}),s&&(t.curOp.updateMaxLine=!0)),function(t,e){if(t.modeFrontier=Math.min(t.modeFrontier,e),!(t.highlightFrontiern;r--){var i=st(t,r).stateAfter;if(i&&(!(i instanceof De)||r+i.lookAhead1||!(this.children[0]instanceof fo))){var s=[];this.collapse(s),this.children=[new fo(s)],this.children[0].parent=this}},collapse:function(t){for(var e=0;e50){for(var a=i.lines.length%25+25,s=a;s10);t.parent.maybeSpill()}},iterN:function(t,e,n){for(var r=0;r0||0==a&&!1!==o.clearWhenEmpty)return o;if(o.replacedWith&&(o.collapsed=!0,o.widgetNode=P("span",[o.replacedWith],"CodeMirror-widget"),r.handleMouseEvents||o.widgetNode.setAttribute("cm-ignore-events","true"),r.insertLeft&&(o.widgetNode.insertLeft=!0)),o.collapsed){if(Ft(t,e.line,e,n,o)||e.line!=n.line&&Ft(t,n.line,e,n,o))throw new Error("Inserting collapsed marker partially overlapping an existing one");Mt=!0}o.addToHistory&&Si(t,{from:e,to:n,origin:"markText"},t.sel,NaN);var s,l=e.line,c=t.cm;if(t.iter(l,n.line+1,function(t){c&&o.collapsed&&!c.options.lineWrapping&&Qt(t)==c.display.maxLine&&(s=!0),o.collapsed&&l!=e.line&&ut(t,0),function(t,e){t.markedSpans=t.markedSpans?t.markedSpans.concat([e]):[e],e.marker.attachLine(t)}(t,new Ct(o,l==e.line?e.ch:null,l==n.line?n.ch:null)),++l}),o.collapsed&&t.iter(e.line,n.line+1,function(e){Ht(t,e)&&ut(e,0)}),o.clearOnEnter&&te(o,"beforeCursorEnter",function(){return o.clear()}),o.readOnly&&(Et=!0,(t.history.done.length||t.history.undone.length)&&t.clearHistory()),o.collapsed&&(o.id=++mo,o.atomic=!0),c){if(s&&(c.curOp.updateMaxLine=!0),o.collapsed)Zr(c,e.line,n.line+1);else if(o.className||o.title||o.startStyle||o.endStyle||o.css)for(var u=e.line;u<=n.line;u++)Jr(c,u,"text");o.atomic&&Zi(c.doc),sn(c,"markerAdded",c,o)}return o}vo.prototype.clear=function(){if(!this.explicitlyCleared){var t=this.doc.cm,e=t&&!t.curOp;if(e&&Fr(t),ae(this,"clear")){var n=this.find();n&&sn(this,"clear",n.from,n.to)}for(var r=null,i=null,o=0;ot.display.maxLineLength&&(t.display.maxLine=c,t.display.maxLineLength=u,t.display.maxLineChanged=!0)}null!=r&&t&&this.collapsed&&Zr(t,r,i+1),this.lines.length=0,this.explicitlyCleared=!0,this.atomic&&this.doc.cantEdit&&(this.doc.cantEdit=!1,t&&Zi(t.doc)),t&&sn(t,"markerCleared",t,this,r,i),e&&Qr(t),this.parent&&this.parent.clear()}},vo.prototype.find=function(t,e){var n,r;null==t&&"bookmark"==this.type&&(t=1);for(var i=0;i=0;l--)io(this,r[l]);s?Gi(this,s):this.cm&&Mr(this.cm)}),undo:Yr(function(){ao(this,"undo")}),redo:Yr(function(){ao(this,"redo")}),undoSelection:Yr(function(){ao(this,"undo",!0)}),redoSelection:Yr(function(){ao(this,"redo",!0)}),setExtending:function(t){this.extend=t},getExtending:function(){return this.extend},historySize:function(){for(var t=this.history,e=0,n=0,r=0;r=t.ch)&&e.push(i.marker.parent||i.marker)}return e},findMarks:function(t,e,n){t=wt(this,t),e=wt(this,e);var r=[],i=t.line;return this.iter(t.line,e.line+1,function(o){var a=o.markedSpans;if(a)for(var s=0;s=l.to||null==l.from&&i!=t.line||null!=l.from&&i==e.line&&l.from>=e.ch||n&&!n(l.marker)||r.push(l.marker.parent||l.marker)}++i}),r},getAllMarks:function(){var t=[];return this.iter(function(e){var n=e.markedSpans;if(n)for(var r=0;rt)return e=t,!0;t-=o,++n}),wt(this,dt(n,e))},indexFromPos:function(t){var e=(t=wt(this,t)).ch;if(t.linee&&(e=t.from),null!=t.to&&t.to-1)return e.state.draggingText(t),void setTimeout(function(){return e.display.input.focus()},20);try{var u=t.dataTransfer.getData("Text");if(u){var p;if(e.state.draggingText&&!e.state.draggingText.copy&&(p=e.listSelections()),Xi(e.doc,vi(n,n)),p)for(var A=0;A=0;e--)co(t.doc,"",r[e].from,r[e].to,"+delete");Mr(t)})}function Go(t,e,n){var r=ot(t.text,e+n,n);return r<0||r>t.text.length?null:r}function qo(t,e,n){var r=Go(t,e.ch,n);return null==r?null:new dt(e.line,r,n<0?"after":"before")}function Xo(t,e,n,r,i){if(t){var o=Jt(n,e.doc.direction);if(o){var a,s=i<0?X(o):o[0],l=i<0==(1==s.level),c=l?"after":"before";if(s.level>0||"rtl"==e.doc.direction){var u=In(e,n);a=i<0?n.text.length-1:0;var p=Tn(e,u,a).top;a=at(function(t){return Tn(e,u,t).top==p},i<0==(1==s.level)?s.from:s.to-1,a),"before"==c&&(a=Go(n,a,1))}else a=i<0?s.to:s.from;return new dt(r,a,c)}}return new dt(r,i<0?n.text.length:0,i<0?"before":"after")}jo.basic={Left:"goCharLeft",Right:"goCharRight",Up:"goLineUp",Down:"goLineDown",End:"goLineEnd",Home:"goLineStartSmart",PageUp:"goPageUp",PageDown:"goPageDown",Delete:"delCharAfter",Backspace:"delCharBefore","Shift-Backspace":"delCharBefore",Tab:"defaultTab","Shift-Tab":"indentAuto",Enter:"newlineAndIndent",Insert:"toggleOverwrite",Esc:"singleSelection"},jo.pcDefault={"Ctrl-A":"selectAll","Ctrl-D":"deleteLine","Ctrl-Z":"undo","Shift-Ctrl-Z":"redo","Ctrl-Y":"redo","Ctrl-Home":"goDocStart","Ctrl-End":"goDocEnd","Ctrl-Up":"goLineUp","Ctrl-Down":"goLineDown","Ctrl-Left":"goGroupLeft","Ctrl-Right":"goGroupRight","Alt-Left":"goLineStart","Alt-Right":"goLineEnd","Ctrl-Backspace":"delGroupBefore","Ctrl-Delete":"delGroupAfter","Ctrl-S":"save","Ctrl-F":"find","Ctrl-G":"findNext","Shift-Ctrl-G":"findPrev","Shift-Ctrl-F":"replace","Shift-Ctrl-R":"replaceAll","Ctrl-[":"indentLess","Ctrl-]":"indentMore","Ctrl-U":"undoSelection","Shift-Ctrl-U":"redoSelection","Alt-U":"redoSelection",fallthrough:"basic"},jo.emacsy={"Ctrl-F":"goCharRight","Ctrl-B":"goCharLeft","Ctrl-P":"goLineUp","Ctrl-N":"goLineDown","Alt-F":"goWordRight","Alt-B":"goWordLeft","Ctrl-A":"goLineStart","Ctrl-E":"goLineEnd","Ctrl-V":"goPageDown","Shift-Ctrl-V":"goPageUp","Ctrl-D":"delCharAfter","Ctrl-H":"delCharBefore","Alt-D":"delWordAfter","Alt-Backspace":"delWordBefore","Ctrl-K":"killLine","Ctrl-T":"transposeChars","Ctrl-O":"openLine"},jo.macDefault={"Cmd-A":"selectAll","Cmd-D":"deleteLine","Cmd-Z":"undo","Shift-Cmd-Z":"redo","Cmd-Y":"redo","Cmd-Home":"goDocStart","Cmd-Up":"goDocStart","Cmd-End":"goDocEnd","Cmd-Down":"goDocEnd","Alt-Left":"goGroupLeft","Alt-Right":"goGroupRight","Cmd-Left":"goLineLeft","Cmd-Right":"goLineRight","Alt-Backspace":"delGroupBefore","Ctrl-Alt-Backspace":"delGroupAfter","Alt-Delete":"delGroupAfter","Cmd-S":"save","Cmd-F":"find","Cmd-G":"findNext","Shift-Cmd-G":"findPrev","Cmd-Alt-F":"replace","Shift-Cmd-Alt-F":"replaceAll","Cmd-[":"indentLess","Cmd-]":"indentMore","Cmd-Backspace":"delWrappedLineLeft","Cmd-Delete":"delWrappedLineRight","Cmd-U":"undoSelection","Shift-Cmd-U":"redoSelection","Ctrl-Up":"goDocStart","Ctrl-Down":"goDocEnd",fallthrough:["basic","emacsy"]},jo.default=y?jo.macDefault:jo.pcDefault;var Yo={selectAll:no,singleSelection:function(t){return t.setSelection(t.getCursor("anchor"),t.getCursor("head"),W)},killLine:function(t){return No(t,function(e){if(e.empty()){var n=st(t.doc,e.head.line).text.length;return e.head.ch==n&&e.head.line0)i=new dt(i.line,i.ch+1),t.replaceRange(o.charAt(i.ch-1)+o.charAt(i.ch-2),dt(i.line,i.ch-2),i,"+transpose");else if(i.line>t.doc.first){var a=st(t.doc,i.line-1).text;a&&(i=new dt(i.line,1),t.replaceRange(o.charAt(0)+t.doc.lineSeparator()+a.charAt(a.length-1),dt(i.line-1,a.length-1),i,"+transpose"))}n.push(new yi(i,i))}t.setSelections(n)})},newlineAndIndent:function(t){return Gr(t,function(){for(var e=t.listSelections(),n=e.length-1;n>=0;n--)t.replaceRange(t.doc.lineSeparator(),e[n].anchor,e[n].head,"+input");e=t.listSelections();for(var r=0;r-1&&(_t((i=c.ranges[i]).from(),e)<0||e.xRel>0)&&(_t(i.to(),e)>0||e.xRel<0)?function(t,e,n,r){var i=t.display,o=!1,c=qr(t,function(e){l&&(i.scroller.draggable=!1),t.state.draggingText=!1,ne(i.wrapper.ownerDocument,"mouseup",c),ne(i.wrapper.ownerDocument,"mousemove",u),ne(i.scroller,"dragstart",p),ne(i.scroller,"drop",c),o||(le(e),r.addNew||Wi(t.doc,n,null,null,r.extend),l||a&&9==s?setTimeout(function(){i.wrapper.ownerDocument.body.focus(),i.input.focus()},20):i.input.focus())}),u=function(t){o=o||Math.abs(e.clientX-t.clientX)+Math.abs(e.clientY-t.clientY)>=10},p=function(){return o=!0};l&&(i.scroller.draggable=!0),t.state.draggingText=c,c.copy=!r.moveOnDrag,i.scroller.dragDrop&&i.scroller.dragDrop(),te(i.wrapper.ownerDocument,"mouseup",c),te(i.wrapper.ownerDocument,"mousemove",u),te(i.scroller,"dragstart",p),te(i.scroller,"drop",c),dr(t),setTimeout(function(){return i.input.focus()},20)}(t,r,e,o):function(t,e,n,r){var i=t.display,o=t.doc;le(e);var a,s,l=o.sel,c=l.ranges;if(r.addNew&&!r.extend?(s=o.sel.contains(n),a=s>-1?c[s]:new yi(n,n)):(a=o.sel.primary(),s=o.sel.primIndex),"rectangle"==r.unit)r.addNew||(a=new yi(n,n)),n=ar(t,e,!0,!0),s=-1;else{var u=Aa(t,n,r.unit);a=r.extend?Ki(a,u.anchor,u.head,r.extend):u}r.addNew?-1==s?(s=c.length,qi(o,mi(c.concat([a]),s),{scroll:!1,origin:"*mouse"})):c.length>1&&c[s].empty()&&"char"==r.unit&&!r.extend?(qi(o,mi(c.slice(0,s).concat(c.slice(s+1)),0),{scroll:!1,origin:"*mouse"}),l=o.sel):Vi(o,s,a,H):(s=0,qi(o,new gi([a],0),H),l=o.sel);var p=n;function A(e){if(0!=_t(p,e))if(p=e,"rectangle"==r.unit){for(var i=[],c=t.options.tabSize,u=j(st(o,n.line).text,n.ch,c),A=j(st(o,e.line).text,e.ch,c),h=Math.min(u,A),f=Math.max(u,A),d=Math.min(n.line,e.line),_=Math.min(t.lastLine(),Math.max(n.line,e.line));d<=_;d++){var g=st(o,d).text,y=N(g,h,c);h==f?i.push(new yi(dt(d,y),dt(d,y))):g.length>y&&i.push(new yi(dt(d,y),dt(d,N(g,f,c))))}i.length||i.push(new yi(n,n)),qi(o,mi(l.ranges.slice(0,s).concat(i),s),{origin:"*mouse",scroll:!1}),t.scrollIntoView(e)}else{var m,v=a,b=Aa(t,e,r.unit),w=v.anchor;_t(b.anchor,w)>0?(m=b.head,w=vt(v.from(),b.anchor)):(m=b.anchor,w=mt(v.to(),b.head));var x=l.ranges.slice(0);x[s]=function(t,e){var n=e.anchor,r=e.head,i=st(t.doc,n.line);if(0==_t(n,r)&&n.sticky==r.sticky)return e;var o=Jt(i);if(!o)return e;var a=Yt(o,n.ch,n.sticky),s=o[a];if(s.from!=n.ch&&s.to!=n.ch)return e;var l,c=a+(s.from==n.ch==(1!=s.level)?0:1);if(0==c||c==o.length)return e;if(r.line!=n.line)l=(r.line-n.line)*("ltr"==t.doc.direction?1:-1)>0;else{var u=Yt(o,r.ch,r.sticky),p=u-a||(r.ch-n.ch)*(1==s.level?-1:1);l=u==c-1||u==c?p<0:p>0}var A=o[c+(l?-1:0)],h=l==(1==A.level),f=h?A.from:A.to,d=h?"after":"before";return n.ch==f&&n.sticky==d?e:new yi(new dt(n.line,f,d),r)}(t,new yi(wt(o,w),m)),qi(o,mi(x,s),H)}}var h=i.wrapper.getBoundingClientRect(),f=0;function d(e){t.state.selectingText=!1,f=1/0,le(e),i.input.focus(),ne(i.wrapper.ownerDocument,"mousemove",_),ne(i.wrapper.ownerDocument,"mouseup",g),o.history.lastSelOrigin=null}var _=qr(t,function(e){0!==e.buttons&&he(e)?function e(n){var a=++f,s=ar(t,n,!0,"rectangle"==r.unit);if(s)if(0!=_t(s,p)){t.curOp.focus=T(),A(s);var l=vr(i,o);(s.line>=l.to||s.lineh.bottom?20:0;c&&setTimeout(qr(t,function(){f==a&&(i.scroller.scrollTop+=c,e(n))}),50)}}(e):d(e)}),g=qr(t,d);t.state.selectingText=g,te(i.wrapper.ownerDocument,"mousemove",_),te(i.wrapper.ownerDocument,"mouseup",g)}(t,r,e,o)}(e,i,o,t):Ae(t)==n.scroller&&le(t):2==r?(i&&Wi(e.doc,i),setTimeout(function(){return n.input.focus()},20)):3==r&&(x?da(e,t):dr(e)))}}}function Aa(t,e,n){if("char"==n)return new yi(e,e);if("word"==n)return t.findWordAt(e);if("line"==n)return new yi(dt(e.line,0),wt(t.doc,dt(e.line+1,0)));var r=n(t,e);return new yi(r.from,r.to)}function ha(t,e,n,r){var i,o;if(e.touches)i=e.touches[0].clientX,o=e.touches[0].clientY;else try{i=e.clientX,o=e.clientY}catch(e){return!1}if(i>=Math.floor(t.display.gutters.getBoundingClientRect().right))return!1;r&&le(e);var a=t.display,s=a.lineDiv.getBoundingClientRect();if(o>s.bottom||!ae(t,n))return ue(e);o-=s.top-a.viewOffset;for(var l=0;l=i){var u=At(t.doc,o),p=t.options.gutters[l];return re(t,n,t,u,p,e),ue(e)}}}function fa(t,e){return ha(t,e,"gutterClick",!0)}function da(t,e){bn(t.display,e)||_a(t,e)||ie(t,e,"contextmenu")||t.display.input.onContextMenu(e)}function _a(t,e){return!!ae(t,"gutterContextMenu")&&ha(t,e,"gutterContextMenu",!1)}function ga(t){t.display.wrapper.className=t.display.wrapper.className.replace(/\s*cm-s-\S+/g,"")+t.options.theme.replace(/(^|\s)\s*/g," cm-s-"),Un(t)}ua.prototype.compare=function(t,e,n){return this.time+400>t&&0==_t(e,this.pos)&&n==this.button};var ya={toString:function(){return"CodeMirror.Init"}},ma={},va={};function ba(t){ui(t),Zr(t),br(t)}function wa(t,e,n){var r=n&&n!=ya;if(!e!=!r){var i=t.display.dragFunctions,o=e?te:ne;o(t.display.scroller,"dragstart",i.start),o(t.display.scroller,"dragenter",i.enter),o(t.display.scroller,"dragover",i.over),o(t.display.scroller,"dragleave",i.leave),o(t.display.scroller,"drop",i.drop)}}function xa(t){t.options.lineWrapping?(D(t.display.wrapper,"CodeMirror-wrap"),t.display.sizer.style.minWidth="",t.display.sizerWidth=null):(C(t.display.wrapper,"CodeMirror-wrap"),qt(t)),or(t),Zr(t),Un(t),setTimeout(function(){return Sr(t)},100)}function Ea(t,e){var r=this;if(!(this instanceof Ea))return new Ea(t,e);this.options=e=e?R(e):{},R(ma,e,!1),pi(e);var i=e.value;"string"==typeof i?i=new Co(i,e.mode,null,e.lineSeparator,e.direction):e.mode&&(i.modeOption=e.mode),this.doc=i;var o=new Ea.inputStyles[e.inputStyle](this),c=this.display=new function(t,e,r){var i=this;this.input=r,i.scrollbarFiller=k("div",null,"CodeMirror-scrollbar-filler"),i.scrollbarFiller.setAttribute("cm-not-content","true"),i.gutterFiller=k("div",null,"CodeMirror-gutter-filler"),i.gutterFiller.setAttribute("cm-not-content","true"),i.lineDiv=P("div",null,"CodeMirror-code"),i.selectionDiv=k("div",null,null,"position: relative; z-index: 1"),i.cursorDiv=k("div",null,"CodeMirror-cursors"),i.measure=k("div",null,"CodeMirror-measure"),i.lineMeasure=k("div",null,"CodeMirror-measure"),i.lineSpace=P("div",[i.measure,i.lineMeasure,i.selectionDiv,i.cursorDiv,i.lineDiv],null,"position: relative; outline: none");var o=P("div",[i.lineSpace],"CodeMirror-lines");i.mover=k("div",[o],null,"position: relative"),i.sizer=k("div",[i.mover],"CodeMirror-sizer"),i.sizerWidth=null,i.heightForcer=k("div",null,null,"position: absolute; height: "+Q+"px; width: 1px;"),i.gutters=k("div",null,"CodeMirror-gutters"),i.lineGutter=null,i.scroller=k("div",[i.sizer,i.heightForcer,i.gutters],"CodeMirror-scroll"),i.scroller.setAttribute("tabIndex","-1"),i.wrapper=k("div",[i.scrollbarFiller,i.gutterFiller,i.scroller],"CodeMirror"),a&&s<8&&(i.gutters.style.zIndex=-1,i.scroller.style.paddingRight=0),l||n&&g||(i.scroller.draggable=!0),t&&(t.appendChild?t.appendChild(i.wrapper):t(i.wrapper)),i.viewFrom=i.viewTo=e.first,i.reportedViewFrom=i.reportedViewTo=e.first,i.view=[],i.renderedView=null,i.externalMeasured=null,i.viewOffset=0,i.lastWrapHeight=i.lastWrapWidth=0,i.updateLineNumbers=null,i.nativeBarWidth=i.barHeight=i.barWidth=0,i.scrollbarsClipped=!1,i.lineNumWidth=i.lineNumInnerWidth=i.lineNumChars=null,i.alignWidgets=!1,i.cachedCharWidth=i.cachedTextHeight=i.cachedPaddingH=null,i.maxLine=null,i.maxLineLength=0,i.maxLineChanged=!1,i.wheelDX=i.wheelDY=i.wheelStartX=i.wheelStartY=null,i.shift=!1,i.selForContextMenu=null,i.activeTouch=null,r.init(i)}(t,i,o);for(var u in c.wrapper.CodeMirror=this,ui(this),ga(this),e.lineWrapping&&(this.display.wrapper.className+=" CodeMirror-wrap"),jr(this),this.state={keyMaps:[],overlays:[],modeGen:0,overwrite:!1,delayingBlurEvent:!1,focused:!1,suppressEdits:!1,pasteIncoming:!1,cutIncoming:!1,selectingText:!1,draggingText:!1,highlight:new U,keySeq:null,specialChars:null},e.autofocus&&!g&&c.input.focus(),a&&s<11&&setTimeout(function(){return r.display.input.reset(!0)},20),function(t){var e=t.display;te(e.scroller,"mousedown",qr(t,pa)),te(e.scroller,"dblclick",a&&s<11?qr(t,function(e){if(!ie(t,e)){var n=ar(t,e);if(n&&!fa(t,e)&&!bn(t.display,e)){le(e);var r=t.findWordAt(n);Wi(t.doc,r.anchor,r.head)}}}):function(e){return ie(t,e)||le(e)}),x||te(e.scroller,"contextmenu",function(e){return da(t,e)});var n,r={end:0};function i(){e.activeTouch&&(n=setTimeout(function(){return e.activeTouch=null},1e3),(r=e.activeTouch).end=+new Date)}function o(t,e){if(null==e.left)return!0;var n=e.left-t.left,r=e.top-t.top;return n*n+r*r>400}te(e.scroller,"touchstart",function(i){if(!ie(t,i)&&!function(t){if(1!=t.touches.length)return!1;var e=t.touches[0];return e.radiusX<=1&&e.radiusY<=1}(i)&&!fa(t,i)){e.input.ensurePolled(),clearTimeout(n);var o=+new Date;e.activeTouch={start:o,moved:!1,prev:o-r.end<=300?r:null},1==i.touches.length&&(e.activeTouch.left=i.touches[0].pageX,e.activeTouch.top=i.touches[0].pageY)}}),te(e.scroller,"touchmove",function(){e.activeTouch&&(e.activeTouch.moved=!0)}),te(e.scroller,"touchend",function(n){var r=e.activeTouch;if(r&&!bn(e,n)&&null!=r.left&&!r.moved&&new Date-r.start<300){var a,s=t.coordsChar(e.activeTouch,"page");a=!r.prev||o(r,r.prev)?new yi(s,s):!r.prev.prev||o(r,r.prev.prev)?t.findWordAt(s):new yi(dt(s.line,0),wt(t.doc,dt(s.line+1,0))),t.setSelection(a.anchor,a.head),t.focus(),le(n)}i()}),te(e.scroller,"touchcancel",i),te(e.scroller,"scroll",function(){e.scroller.clientHeight&&(kr(t,e.scroller.scrollTop),Ir(t,e.scroller.scrollLeft,!0),re(t,"scroll",t))}),te(e.scroller,"mousewheel",function(e){return _i(t,e)}),te(e.scroller,"DOMMouseScroll",function(e){return _i(t,e)}),te(e.wrapper,"scroll",function(){return e.wrapper.scrollTop=e.wrapper.scrollLeft=0}),e.dragFunctions={enter:function(e){ie(t,e)||pe(e)},over:function(e){ie(t,e)||(function(t,e){var n=ar(t,e);if(n){var r=document.createDocumentFragment();ur(t,n,r),t.display.dragCursor||(t.display.dragCursor=k("div",null,"CodeMirror-cursors CodeMirror-dragcursors"),t.display.lineSpace.insertBefore(t.display.dragCursor,t.display.cursorDiv)),O(t.display.dragCursor,r)}}(t,e),pe(e))},start:function(e){return function(t,e){if(a&&(!t.state.draggingText||+new Date-Bo<100))pe(e);else if(!ie(t,e)&&!bn(t.display,e)&&(e.dataTransfer.setData("Text",t.getSelection()),e.dataTransfer.effectAllowed="copyMove",e.dataTransfer.setDragImage&&!A)){var n=k("img",null,null,"position: fixed; left: 0; top: 0;");n.src="data:image/gif;base64,R0lGODlhAQABAAAAACH5BAEKAAEALAAAAAABAAEAAAICTAEAOw==",p&&(n.width=n.height=1,t.display.wrapper.appendChild(n),n._top=n.offsetTop),e.dataTransfer.setDragImage(n,0,0),p&&n.parentNode.removeChild(n)}}(t,e)},drop:qr(t,Oo),leave:function(e){ie(t,e)||ko(t)}};var l=e.input.getField();te(l,"keyup",function(e){return aa.call(t,e)}),te(l,"keydown",qr(t,oa)),te(l,"keypress",qr(t,sa)),te(l,"focus",function(e){return _r(t,e)}),te(l,"blur",function(e){return gr(t,e)})}(this),To(),Fr(this),this.curOp.forceUpdate=!0,Pi(this,i),e.autofocus&&!g||this.hasFocus()?setTimeout(z(_r,this),20):gr(this),va)va.hasOwnProperty(u)&&va[u](r,e[u],ya);wr(this),e.finishInit&&e.finishInit(this);for(var h=0;h150)){if(!r)return;n="prev"}}else c=0,n="not";"prev"==n?c=e>o.first?j(st(o,e-1).text,null,a):0:"add"==n?c=l+t.options.indentUnit:"subtract"==n?c=l-t.options.indentUnit:"number"==typeof n&&(c=l+n),c=Math.max(0,c);var p="",A=0;if(t.options.indentWithTabs)for(var h=Math.floor(c/a);h;--h)A+=a,p+="\t";if(A1)if(Ba&&Ba.text.join("\n")==e){if(r.ranges.length%Ba.text.length==0){c=[];for(var u=0;u=0;p--){var A=r.ranges[p],h=A.from(),f=A.to();A.empty()&&(n&&n>0?h=dt(h.line,h.ch-n):t.state.overwrite&&!s?f=dt(f.line,Math.min(st(o,f.line).text.length,f.ch+X(l).length)):Ba&&Ba.lineWise&&Ba.text.join("\n")==e&&(h=f=dt(h.line,0))),a=t.curOp.updateInput;var d={from:h,to:f,text:c?c[p%c.length]:l,origin:i||(s?"paste":t.state.cutIncoming?"cut":"+input")};io(t.doc,d),sn(t,"inputRead",t,d)}e&&!s&&Ia(t,e),Mr(t),t.curOp.updateInput=a,t.curOp.typing=!0,t.state.pasteIncoming=t.state.cutIncoming=!1}function Pa(t,e){var n=t.clipboardData&&t.clipboardData.getData("Text");if(n)return t.preventDefault(),e.isReadOnly()||e.options.disableInput||Gr(e,function(){return ka(e,n,0,null,"paste")}),!0}function Ia(t,e){if(t.options.electricChars&&t.options.smartIndent)for(var n=t.doc.sel,r=n.ranges.length-1;r>=0;r--){var i=n.ranges[r];if(!(i.head.ch>100||r&&n.ranges[r-1].head.line==i.head.line)){var o=t.getModeAt(i.head),a=!1;if(o.electricChars){for(var s=0;s-1){a=Ca(t,i.head.line,"smart");break}}else o.electricInput&&o.electricInput.test(st(t.doc,i.head.line).text.slice(0,i.head.ch))&&(a=Ca(t,i.head.line,"smart"));a&&sn(t,"electricInput",t,i.head.line)}}}function Ta(t){for(var e=[],n=[],r=0;r=e.text.length?(n.ch=e.text.length,n.sticky="before"):n.ch<=0&&(n.ch=0,n.sticky="after");var o=Yt(i,n.ch,n.sticky),a=i[o];if("ltr"==t.doc.direction&&a.level%2==0&&(r>0?a.to>n.ch:a.from=a.from&&A>=u.begin)){var h=p?"before":"after";return new dt(n.line,A,h)}}var f=function(t,e,r){for(var o=function(t,e){return e?new dt(n.line,l(t,1),"before"):new dt(n.line,t,"after")};t>=0&&t0==(1!=a.level),c=s?r.begin:l(r.end,-1);if(a.from<=c&&c0?u.end:l(u.begin,-1);return null==_||r>0&&_==e.text.length||!(d=f(r>0?0:i.length-1,r,c(_)))?null:d}(t.cm,s,e,n):qo(s,e,n))){if(r||!function(){var r=e.line+n;return!(r=t.first+t.size)&&(e=new dt(r,e.ch,e.sticky),s=st(t,r))}())return!1;e=Xo(i,t.cm,s,e.line,n)}else e=o;return!0}if("char"==r)l();else if("column"==r)l(!0);else if("word"==r||"group"==r)for(var c=null,u="group"==r,p=t.cm&&t.cm.getHelper(e,"wordChars"),A=!0;!(n<0)||l(!A);A=!1){var h=s.text.charAt(e.ch)||"\n",f=et(h,p)?"w":u&&"\n"==h?"n":!u||/\s/.test(h)?null:"p";if(!u||A||f||(f="s"),c&&c!=f){n<0&&(n=1,l(),e.sticky="after");break}if(f&&(c=f),n>0&&!l(!A))break}var d=to(t,e,o,a,!0);return gt(o,d)&&(d.hitSide=!0),d}function za(t,e,n,r){var i,o,a=t.doc,s=e.left;if("page"==r){var l=Math.min(t.display.wrapper.clientHeight,window.innerHeight||document.documentElement.clientHeight),c=Math.max(l-.5*tr(t.display),3);i=(n>0?e.bottom:e.top)+n*c}else"line"==r&&(i=n>0?e.bottom+3:e.top-3);for(;(o=Xn(t,s,i)).outside;){if(n<0?i<=0:i>=a.height){o.hitSide=!0;break}i+=5*n}return o}var Ra=function(t){this.cm=t,this.lastAnchorNode=this.lastAnchorOffset=this.lastFocusNode=this.lastFocusOffset=null,this.polling=new U,this.composing=null,this.gracePeriod=!1,this.readDOMTimeout=null};function ja(t,e){var n=Pn(t,e.line);if(!n||n.hidden)return null;var r=st(t.doc,e.line),i=On(n,r,e.line),o=Jt(r,t.doc.direction),a="left";if(o){var s=Yt(o,e.ch);a=s%2?"right":"left"}var l=Sn(i.map,e.ch,a);return l.offset="right"==l.collapse?l.end:l.start,l}function Ua(t,e){return e&&(t.bad=!0),t}function Fa(t,e,n){var r;if(e==t.display.lineDiv){if(!(r=t.display.lineDiv.childNodes[n]))return Ua(t.clipPos(dt(t.display.viewTo-1)),!0);e=null,n=0}else for(r=e;;r=r.parentNode){if(!r||r==t.display.lineDiv)return null;if(r.parentNode&&r.parentNode==t.display.lineDiv)break}for(var i=0;i=e.display.viewTo||o.line=e.display.viewFrom&&ja(e,i)||{node:l[0].measure.map[2],offset:0},u=o.liner.firstLine()&&(a=dt(a.line-1,st(r.doc,a.line-1).length)),s.ch==st(r.doc,s.line).text.length&&s.linei.viewTo-1)return!1;a.line==i.viewFrom||0==(t=sr(r,a.line))?(e=pt(i.view[0].line),n=i.view[0].node):(e=pt(i.view[t].line),n=i.view[t-1].node.nextSibling);var l,c,u=sr(r,s.line);if(u==i.view.length-1?(l=i.viewTo-1,c=i.lineDiv.lastChild):(l=pt(i.view[u+1].line)-1,c=i.view[u+1].node.previousSibling),!n)return!1;for(var p=r.doc.splitLines(function(t,e,n,r,i){var o="",a=!1,s=t.doc.lineSeparator(),l=!1;function c(){a&&(o+=s,l&&(o+=s),a=l=!1)}function u(t){t&&(c(),o+=t)}function p(e){if(1==e.nodeType){var n=e.getAttribute("cm-text");if(n)return void u(n);var o,A=e.getAttribute("cm-marker");if(A){var h=t.findMarks(dt(r,0),dt(i+1,0),function(t){return function(e){return e.id==t}}(+A));return void(h.length&&(o=h[0].find(0))&&u(lt(t.doc,o.from,o.to).join(s)))}if("false"==e.getAttribute("contenteditable"))return;var f=/^(pre|div|p|li|table|br)$/i.test(e.nodeName);if(!/^br$/i.test(e.nodeName)&&0==e.textContent.length)return;f&&c();for(var d=0;d1&&A.length>1;)if(X(p)==X(A))p.pop(),A.pop(),l--;else{if(p[0]!=A[0])break;p.shift(),A.shift(),e++}for(var h=0,f=0,d=p[0],_=A[0],g=Math.min(d.length,_.length);ha.ch&&y.charCodeAt(y.length-f-1)==m.charCodeAt(m.length-f-1);)h--,f++;p[p.length-1]=y.slice(0,y.length-f).replace(/^\u200b+/,""),p[0]=p[0].slice(h).replace(/\u200b+$/,"");var b=dt(e,h),w=dt(l,A.length?X(A).length-f:0);return p.length>1||p[0]||_t(b,w)?(co(r.doc,p,b,w,"+input"),!0):void 0},Ra.prototype.ensurePolled=function(){this.forceCompositionEnd()},Ra.prototype.reset=function(){this.forceCompositionEnd()},Ra.prototype.forceCompositionEnd=function(){this.composing&&(clearTimeout(this.readDOMTimeout),this.composing=null,this.updateFromDOM(),this.div.blur(),this.div.focus())},Ra.prototype.readFromDOMSoon=function(){var t=this;null==this.readDOMTimeout&&(this.readDOMTimeout=setTimeout(function(){if(t.readDOMTimeout=null,t.composing){if(!t.composing.done)return;t.composing=null}t.updateFromDOM()},80))},Ra.prototype.updateFromDOM=function(){var t=this;!this.cm.isReadOnly()&&this.pollContent()||Gr(this.cm,function(){return Zr(t.cm)})},Ra.prototype.setUneditable=function(t){t.contentEditable="false"},Ra.prototype.onKeyPress=function(t){0==t.charCode||this.composing||(t.preventDefault(),this.cm.isReadOnly()||qr(this.cm,ka)(this.cm,String.fromCharCode(null==t.charCode?t.keyCode:t.charCode),0))},Ra.prototype.readOnlyChanged=function(t){this.div.contentEditable=String("nocursor"!=t)},Ra.prototype.onContextMenu=function(){},Ra.prototype.resetPosition=function(){},Ra.prototype.needsContentAttribute=!0;var Ka=function(t){this.cm=t,this.prevInput="",this.pollingFast=!1,this.polling=new U,this.hasSelection=!1,this.composing=null};Ka.prototype.init=function(t){var e=this,n=this,r=this.cm;this.createField(t);var i=this.textarea;function o(t){if(!ie(r,t)){if(r.somethingSelected())Oa({lineWise:!1,text:r.getSelections()});else{if(!r.options.lineWiseCopyCut)return;var e=Ta(r);Oa({lineWise:!0,text:e.text}),"cut"==t.type?r.setSelections(e.ranges,null,W):(n.prevInput="",i.value=e.text.join("\n"),S(i))}"cut"==t.type&&(r.state.cutIncoming=!0)}}t.wrapper.insertBefore(this.wrapper,t.wrapper.firstChild),d&&(i.style.width="0px"),te(i,"input",function(){a&&s>=9&&e.hasSelection&&(e.hasSelection=null),n.poll()}),te(i,"paste",function(t){ie(r,t)||Pa(t,r)||(r.state.pasteIncoming=!0,n.fastPoll())}),te(i,"cut",o),te(i,"copy",o),te(t.scroller,"paste",function(e){bn(t,e)||ie(r,e)||(r.state.pasteIncoming=!0,n.focus())}),te(t.lineSpace,"selectstart",function(e){bn(t,e)||le(e)}),te(i,"compositionstart",function(){var t=r.getCursor("from");n.composing&&n.composing.range.clear(),n.composing={start:t,range:r.markText(t,r.getCursor("to"),{className:"CodeMirror-composing"})}}),te(i,"compositionend",function(){n.composing&&(n.poll(),n.composing.range.clear(),n.composing=null)})},Ka.prototype.createField=function(t){this.wrapper=La(),this.textarea=this.wrapper.firstChild},Ka.prototype.prepareSelection=function(){var t=this.cm,e=t.display,n=t.doc,r=cr(t);if(t.options.moveInputWithCursor){var i=Nn(t,n.sel.primary().head,"div"),o=e.wrapper.getBoundingClientRect(),a=e.lineDiv.getBoundingClientRect();r.teTop=Math.max(0,Math.min(e.wrapper.clientHeight-10,i.top+a.top-o.top)),r.teLeft=Math.max(0,Math.min(e.wrapper.clientWidth-10,i.left+a.left-o.left))}return r},Ka.prototype.showSelection=function(t){var e=this.cm,n=e.display;O(n.cursorDiv,t.cursors),O(n.selectionDiv,t.selection),null!=t.teTop&&(this.wrapper.style.top=t.teTop+"px",this.wrapper.style.left=t.teLeft+"px")},Ka.prototype.reset=function(t){if(!this.contextMenuPending&&!this.composing){var e=this.cm;if(e.somethingSelected()){this.prevInput="";var n=e.getSelection();this.textarea.value=n,e.state.focused&&S(this.textarea),a&&s>=9&&(this.hasSelection=n)}else t||(this.prevInput=this.textarea.value="",a&&s>=9&&(this.hasSelection=null))}},Ka.prototype.getField=function(){return this.textarea},Ka.prototype.supportsTouch=function(){return!1},Ka.prototype.focus=function(){if("nocursor"!=this.cm.options.readOnly&&(!g||T()!=this.textarea))try{this.textarea.focus()}catch(t){}},Ka.prototype.blur=function(){this.textarea.blur()},Ka.prototype.resetPosition=function(){this.wrapper.style.top=this.wrapper.style.left=0},Ka.prototype.receivedFocus=function(){this.slowPoll()},Ka.prototype.slowPoll=function(){var t=this;this.pollingFast||this.polling.set(this.cm.options.pollInterval,function(){t.poll(),t.cm.state.focused&&t.slowPoll()})},Ka.prototype.fastPoll=function(){var t=!1,e=this;e.pollingFast=!0,e.polling.set(20,function n(){var r=e.poll();r||t?(e.pollingFast=!1,e.slowPoll()):(t=!0,e.polling.set(60,n))})},Ka.prototype.poll=function(){var t=this,e=this.cm,n=this.textarea,r=this.prevInput;if(this.contextMenuPending||!e.state.focused||ve(n)&&!r&&!this.composing||e.isReadOnly()||e.options.disableInput||e.state.keySeq)return!1;var i=n.value;if(i==r&&!e.somethingSelected())return!1;if(a&&s>=9&&this.hasSelection===i||y&&/[\uf700-\uf7ff]/.test(i))return e.display.input.reset(),!1;if(e.doc.sel==e.display.selForContextMenu){var o=i.charCodeAt(0);if(8203!=o||r||(r="​"),8666==o)return this.reset(),this.cm.execCommand("undo")}for(var l=0,c=Math.min(r.length,i.length);l1e3||i.indexOf("\n")>-1?n.value=t.prevInput="":t.prevInput=i,t.composing&&(t.composing.range.clear(),t.composing.range=e.markText(t.composing.start,e.getCursor("to"),{className:"CodeMirror-composing"}))}),!0},Ka.prototype.ensurePolled=function(){this.pollingFast&&this.poll()&&(this.pollingFast=!1)},Ka.prototype.onKeyPress=function(){a&&s>=9&&(this.hasSelection=null),this.fastPoll()},Ka.prototype.onContextMenu=function(t){var e=this,n=e.cm,r=n.display,i=e.textarea,o=ar(n,t),c=r.scroller.scrollTop;if(o&&!p){var u=n.options.resetSelectionOnContextMenu;u&&-1==n.doc.sel.contains(o)&&qr(n,qi)(n.doc,vi(o),W);var A=i.style.cssText,h=e.wrapper.style.cssText;e.wrapper.style.cssText="position: absolute";var f,d=e.wrapper.getBoundingClientRect();if(i.style.cssText="position: absolute; width: 30px; height: 30px;\n top: "+(t.clientY-d.top-5)+"px; left: "+(t.clientX-d.left-5)+"px;\n z-index: 1000; background: "+(a?"rgba(255, 255, 255, .05)":"transparent")+";\n outline: none; border-width: 0; outline: none; overflow: hidden; opacity: .05; filter: alpha(opacity=5);",l&&(f=window.scrollY),r.input.focus(),l&&window.scrollTo(null,f),r.input.reset(),n.somethingSelected()||(i.value=e.prevInput=" "),e.contextMenuPending=!0,r.selForContextMenu=n.doc.sel,clearTimeout(r.detectingSelectAll),a&&s>=9&&g(),x){pe(t);var _=function(){ne(window,"mouseup",_),setTimeout(y,20)};te(window,"mouseup",_)}else setTimeout(y,50)}function g(){if(null!=i.selectionStart){var t=n.somethingSelected(),o="​"+(t?i.value:"");i.value="⇚",i.value=o,e.prevInput=t?"":"​",i.selectionStart=1,i.selectionEnd=o.length,r.selForContextMenu=n.doc.sel}}function y(){if(e.contextMenuPending=!1,e.wrapper.style.cssText=h,i.style.cssText=A,a&&s<9&&r.scrollbars.setScrollTop(r.scroller.scrollTop=c),null!=i.selectionStart){(!a||a&&s<9)&&g();var t=0,o=function(){r.selForContextMenu==n.doc.sel&&0==i.selectionStart&&i.selectionEnd>0&&"​"==e.prevInput?qr(n,no)(n):t++<10?r.detectingSelectAll=setTimeout(o,500):(r.selForContextMenu=null,r.input.reset())};r.detectingSelectAll=setTimeout(o,200)}}},Ka.prototype.readOnlyChanged=function(t){t||this.reset(),this.textarea.disabled="nocursor"==t},Ka.prototype.setUneditable=function(){},Ka.prototype.needsContentAttribute=!1,function(t){var e=t.optionHandlers;function n(n,r,i,o){t.defaults[n]=r,i&&(e[n]=o?function(t,e,n){n!=ya&&i(t,e,n)}:i)}t.defineOption=n,t.Init=ya,n("value","",function(t,e){return t.setValue(e)},!0),n("mode",null,function(t,e){t.doc.modeOption=e,Mi(t)},!0),n("indentUnit",2,Mi,!0),n("indentWithTabs",!1),n("smartIndent",!0),n("tabSize",4,function(t){Ci(t),Un(t),Zr(t)},!0),n("lineSeparator",null,function(t,e){if(t.doc.lineSep=e,e){var n=[],r=t.doc.first;t.doc.iter(function(t){for(var i=0;;){var o=t.text.indexOf(e,i);if(-1==o)break;i=o+e.length,n.push(dt(r,o))}r++});for(var i=n.length-1;i>=0;i--)co(t.doc,e,n[i],dt(n[i].line,n[i].ch+e.length))}}),n("specialChars",/[\u0000-\u001f\u007f-\u009f\u00ad\u061c\u200b-\u200f\u2028\u2029\ufeff]/g,function(t,e,n){t.state.specialChars=new RegExp(e.source+(e.test("\t")?"":"|\t"),"g"),n!=ya&&t.refresh()}),n("specialCharPlaceholder",Ze,function(t){return t.refresh()},!0),n("electricChars",!0),n("inputStyle",g?"contenteditable":"textarea",function(){throw new Error("inputStyle can not (yet) be changed in a running editor")},!0),n("spellcheck",!1,function(t,e){return t.getInputField().spellcheck=e},!0),n("rtlMoveVisually",!v),n("wholeLineUpdateBefore",!0),n("theme","default",function(t){ga(t),ba(t)},!0),n("keyMap","default",function(t,e,n){var r=Vo(e),i=n!=ya&&Vo(n);i&&i.detach&&i.detach(t,r),r.attach&&r.attach(t,i||null)}),n("extraKeys",null),n("configureMouse",null),n("lineWrapping",!1,xa,!0),n("gutters",[],function(t){pi(t.options),ba(t)},!0),n("fixedGutter",!0,function(t,e){t.display.gutters.style.left=e?rr(t.display)+"px":"0",t.refresh()},!0),n("coverGutterNextToScrollbar",!1,function(t){return Sr(t)},!0),n("scrollbarStyle","native",function(t){jr(t),Sr(t),t.display.scrollbars.setScrollTop(t.doc.scrollTop),t.display.scrollbars.setScrollLeft(t.doc.scrollLeft)},!0),n("lineNumbers",!1,function(t){pi(t.options),ba(t)},!0),n("firstLineNumber",1,ba,!0),n("lineNumberFormatter",function(t){return t},ba,!0),n("showCursorWhenSelecting",!1,lr,!0),n("resetSelectionOnContextMenu",!0),n("lineWiseCopyCut",!0),n("pasteLinesPerSelection",!0),n("readOnly",!1,function(t,e){"nocursor"==e&&(gr(t),t.display.input.blur()),t.display.input.readOnlyChanged(e)}),n("disableInput",!1,function(t,e){e||t.display.input.reset()},!0),n("dragDrop",!0,wa),n("allowDropFileTypes",null),n("cursorBlinkRate",530),n("cursorScrollMargin",0),n("cursorHeight",1,lr,!0),n("singleCursorHeightPerLine",!0,lr,!0),n("workTime",100),n("workDelay",100),n("flattenSpans",!0,Ci,!0),n("addModeClass",!1,Ci,!0),n("pollInterval",100),n("undoDepth",200,function(t,e){return t.doc.history.undoDepth=e}),n("historyEventDelay",1250),n("viewportMargin",10,function(t){return t.refresh()},!0),n("maxHighlightLength",1e4,Ci,!0),n("moveInputWithCursor",!0,function(t,e){e||t.display.input.resetPosition()}),n("tabindex",null,function(t,e){return t.display.input.getField().tabIndex=e||""}),n("autofocus",null),n("direction","ltr",function(t,e){return t.doc.setDirection(e)},!0),n("phrases",null)}(Ea),function(t){var e=t.optionHandlers,n=t.helpers={};t.prototype={constructor:t,focus:function(){window.focus(),this.display.input.focus()},setOption:function(t,n){var r=this.options,i=r[t];r[t]==n&&"mode"!=t||(r[t]=n,e.hasOwnProperty(t)&&qr(this,e[t])(this,n,i),re(this,"optionChange",this,t))},getOption:function(t){return this.options[t]},getDoc:function(){return this.doc},addKeyMap:function(t,e){this.state.keyMaps[e?"push":"unshift"](Vo(t))},removeKeyMap:function(t){for(var e=this.state.keyMaps,n=0;nn&&(Ca(this,i.head.line,t,!0),n=i.head.line,r==this.doc.sel.primIndex&&Mr(this));else{var o=i.from(),a=i.to(),s=Math.max(n,o.line);n=Math.min(this.lastLine(),a.line-(a.ch?0:1))+1;for(var l=s;l0&&Vi(this.doc,r,new yi(o,c[r].to()),W)}}}),getTokenAt:function(t,e){return Ke(this,t,e)},getLineTokens:function(t,e){return Ke(this,dt(t),e,!0)},getTokenTypeAt:function(t){t=wt(this.doc,t);var e,n=ze(this,st(this.doc,t.line)),r=0,i=(n.length-1)/2,o=t.ch;if(0==o)e=n[2];else for(;;){var a=r+i>>1;if((a?n[2*a-1]:0)>=o)i=a;else{if(!(n[2*a+1]o&&(t=o,i=!0),r=st(this.doc,t)}else r=t;return Wn(this,r,{top:0,left:0},e||"page",n||i).top+(i?this.doc.height-Nt(r):0)},defaultTextHeight:function(){return tr(this.display)},defaultCharWidth:function(){return er(this.display)},getViewport:function(){return{from:this.display.viewFrom,to:this.display.viewTo}},addWidget:function(t,e,n,r,i){var o=this.display,a=(t=Nn(this,wt(this.doc,t))).bottom,s=t.left;if(e.style.position="absolute",e.setAttribute("cm-ignore-events","true"),this.display.input.setUneditable(e),o.sizer.appendChild(e),"over"==r)a=t.top;else if("above"==r||"near"==r){var l=Math.max(o.wrapper.clientHeight,this.doc.height),c=Math.max(o.sizer.clientWidth,o.lineSpace.clientWidth);("above"==r||t.bottom+e.offsetHeight>l)&&t.top>e.offsetHeight?a=t.top-e.offsetHeight:t.bottom+e.offsetHeight<=l&&(a=t.bottom),s+e.offsetWidth>c&&(s=c-e.offsetWidth)}e.style.top=a+"px",e.style.left=e.style.right="","right"==i?(s=o.sizer.clientWidth-e.offsetWidth,e.style.right="0px"):("left"==i?s=0:"middle"==i&&(s=(o.sizer.clientWidth-e.offsetWidth)/2),e.style.left=s+"px"),n&&function(t,e){var n=xr(t,e);null!=n.scrollTop&&kr(t,n.scrollTop),null!=n.scrollLeft&&Ir(t,n.scrollLeft)}(this,{left:s,top:a,right:s+e.offsetWidth,bottom:a+e.offsetHeight})},triggerOnKeyDown:Xr(oa),triggerOnKeyPress:Xr(sa),triggerOnKeyUp:aa,triggerOnMouseDown:Xr(pa),execCommand:function(t){if(Yo.hasOwnProperty(t))return Yo[t].call(null,this)},triggerElectric:Xr(function(t){Ia(this,t)}),findPosH:function(t,e,n,r){var i=1;e<0&&(i=-1,e=-e);for(var o=wt(this.doc,t),a=0;a0&&s(n.charAt(r-1));)--r;for(;i.5)&&or(this),re(this,"refresh",this)}),swapDoc:Xr(function(t){var e=this.doc;return e.cm=null,Pi(this,t),Un(this),this.display.input.reset(),Cr(this,t.scrollLeft,t.scrollTop),this.curOp.forceScroll=!0,sn(this,"swapDoc",this,e),e}),phrase:function(t){var e=this.options.phrases;return e&&Object.prototype.hasOwnProperty.call(e,t)?e[t]:t},getInputField:function(){return this.display.input.getField()},getWrapperElement:function(){return this.display.wrapper},getScrollerElement:function(){return this.display.scroller},getGutterElement:function(){return this.display.gutters}},se(t),t.registerHelper=function(e,r,i){n.hasOwnProperty(e)||(n[e]=t[e]={_global:[]}),n[e][r]=i},t.registerGlobalHelper=function(e,r,i,o){t.registerHelper(e,r,o),n[e]._global.push({pred:i,val:o})}}(Ea);var Wa="iter insert remove copy getEditor constructor".split(" ");for(var Ha in Co.prototype)Co.prototype.hasOwnProperty(Ha)&&F(Wa,Ha)<0&&(Ea.prototype[Ha]=function(t){return function(){return t.apply(this.doc,arguments)}}(Co.prototype[Ha]));return se(Co),Ea.inputStyles={textarea:Ka,contenteditable:Ra},Ea.defineMode=function(t){Ea.defaults.mode||"null"==t||(Ea.defaults.mode=t),function(t,e){arguments.length>2&&(e.dependencies=Array.prototype.slice.call(arguments,2)),xe[t]=e}.apply(this,arguments)},Ea.defineMIME=function(t,e){Ee[t]=e},Ea.defineMode("null",function(){return{token:function(t){return t.skipToEnd()}}}),Ea.defineMIME("text/plain","null"),Ea.defineExtension=function(t,e){Ea.prototype[t]=e},Ea.defineDocExtension=function(t,e){Co.prototype[t]=e},Ea.fromTextArea=function(t,e){if((e=e?R(e):{}).value=t.value,!e.tabindex&&t.tabIndex&&(e.tabindex=t.tabIndex),!e.placeholder&&t.placeholder&&(e.placeholder=t.placeholder),null==e.autofocus){var n=T();e.autofocus=n==t||null!=t.getAttribute("autofocus")&&n==document.body}function r(){t.value=s.getValue()}var i;if(t.form&&(te(t.form,"submit",r),!e.leaveSubmitMethodAlone)){var o=t.form;i=o.submit;try{var a=o.submit=function(){r(),o.submit=i,o.submit(),o.submit=a}}catch(t){}}e.finishInit=function(e){e.save=r,e.getTextArea=function(){return t},e.toTextArea=function(){e.toTextArea=isNaN,r(),t.parentNode.removeChild(e.getWrapperElement()),t.style.display="",t.form&&(ne(t.form,"submit",r),"function"==typeof t.form.submit&&(t.form.submit=i))}},t.style.display="none";var s=Ea(function(e){return t.parentNode.insertBefore(e,t.nextSibling)},e);return s},function(t){t.off=ne,t.on=te,t.wheelEventPixels=di,t.Doc=Co,t.splitLines=me,t.countColumn=j,t.findColumn=N,t.isWordChar=tt,t.Pass=K,t.signal=re,t.Line=Ve,t.changeEnd=bi,t.scrollbarModel=Rr,t.Pos=dt,t.cmpPos=_t,t.modes=xe,t.mimeModes=Ee,t.resolveMode=Me,t.getMode=Ce,t.modeExtensions=Be,t.extendMode=Oe,t.copyState=ke,t.startState=Ie,t.innerMode=Pe,t.commands=Yo,t.keyMap=jo,t.keyName=Ho,t.isModifierKey=Ko,t.lookupKey=Qo,t.normalizeKeyMap=Fo,t.StringStream=Te,t.SharedTextMarker=wo,t.TextMarker=vo,t.LineWidget=go,t.e_preventDefault=le,t.e_stopPropagation=ce,t.e_stop=pe,t.addClass=D,t.contains=I,t.rmClass=C,t.keyNames=Lo}(Ea),Ea.version="5.40.2",Ea}()},function(t,e,n){var r=n(198),i=n(151);t.exports=function(t){return null!=t&&i(t.length)&&!r(t)}},function(t,e,n){var r=n(394),i=n(395),o=n(396),a=n(397),s=n(398);function l(t){var e=-1,n=null==t?0:t.length;for(this.clear();++ethis.highWaterMark},e.prototype.clear=function(){this.count_=0,this.entries_={},this.oldest_=null,this.newest_=null,this.dispatchEvent(o.a.CLEAR)},e.prototype.containsKey=function(t){return this.entries_.hasOwnProperty(t)},e.prototype.forEach=function(t,e){for(var n=this.oldest_;n;)t.call(e,n.value_,n.key_,this),n=n.newer},e.prototype.get=function(t){var e=this.entries_[t];return Object(r.a)(void 0!==e,15),e===this.newest_?e.value_:(e===this.oldest_?(this.oldest_=this.oldest_.newer,this.oldest_.older=null):(e.newer.older=e.older,e.older.newer=e.newer),e.newer=null,e.older=this.newest_,this.newest_.newer=e,this.newest_=e,e.value_)},e.prototype.remove=function(t){var e=this.entries_[t];return Object(r.a)(void 0!==e,15),e===this.newest_?(this.newest_=e.older,this.newest_&&(this.newest_.newer=null)):e===this.oldest_?(this.oldest_=e.newer,this.oldest_&&(this.oldest_.older=null)):(e.newer.older=e.older,e.older.newer=e.newer),delete this.entries_[t],--this.count_,e.value_},e.prototype.getCount=function(){return this.count_},e.prototype.getKeys=function(){var t,e=new Array(this.count_),n=0;for(t=this.newest_;t;t=t.older)e[n++]=t.key_;return e},e.prototype.getValues=function(){var t,e=new Array(this.count_),n=0;for(t=this.newest_;t;t=t.older)e[n++]=t.value_;return e},e.prototype.peekLast=function(){return this.oldest_.value_},e.prototype.peekLastKey=function(){return this.oldest_.key_},e.prototype.peekFirstKey=function(){return this.newest_.key_},e.prototype.pop=function(){var t=this.oldest_;return delete this.entries_[t.key_],t.newer&&(t.newer.older=null),this.oldest_=t.newer,this.oldest_||(this.newest_=null),--this.count_,t.value_},e.prototype.replace=function(t,e){this.get(t),this.entries_[t].value_=e},e.prototype.set=function(t,e){Object(r.a)(!(t in this.entries_),16);var n={key_:t,newer:null,older:this.newest_,value_:e};this.newest_?this.newest_.newer=n:this.oldest_=n,this.newest_=n,this.entries_[t]=n,++this.count_},e.prototype.setSize=function(t){this.highWaterMark=t},e.prototype.prune=function(){for(;this.canExpireCache();)this.pop()},e}(i.a);e.a=a},function(t,e,n){"use strict";e.a={POINT:"point",LINE:"line"}},function(t,e,n){"use strict";e.a={IMAGE:"image",VECTOR:"vector"}},function(t,e,n){"use strict";var r=n(24),i=n(34),o=n(10),a=n(13),s=function(t){function e(e){t.call(this);var n=Object(a.a)({},e);n[i.a.OPACITY]=void 0!==e.opacity?e.opacity:1,n[i.a.VISIBLE]=void 0===e.visible||e.visible,n[i.a.Z_INDEX]=e.zIndex,n[i.a.MAX_RESOLUTION]=void 0!==e.maxResolution?e.maxResolution:1/0,n[i.a.MIN_RESOLUTION]=void 0!==e.minResolution?e.minResolution:0,this.setProperties(n),this.state_={layer:this,managed:!0},this.type}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype.getType=function(){return this.type},e.prototype.getLayerState=function(){return this.state_.opacity=Object(o.a)(this.getOpacity(),0,1),this.state_.sourceState=this.getSourceState(),this.state_.visible=this.getVisible(),this.state_.extent=this.getExtent(),this.state_.zIndex=this.getZIndex()||0,this.state_.maxResolution=this.getMaxResolution(),this.state_.minResolution=Math.max(this.getMinResolution(),0),this.state_},e.prototype.getLayersArray=function(t){},e.prototype.getLayerStatesArray=function(t){},e.prototype.getExtent=function(){return this.get(i.a.EXTENT)},e.prototype.getMaxResolution=function(){return this.get(i.a.MAX_RESOLUTION)},e.prototype.getMinResolution=function(){return this.get(i.a.MIN_RESOLUTION)},e.prototype.getOpacity=function(){return this.get(i.a.OPACITY)},e.prototype.getSourceState=function(){},e.prototype.getVisible=function(){return this.get(i.a.VISIBLE)},e.prototype.getZIndex=function(){return this.get(i.a.Z_INDEX)},e.prototype.setExtent=function(t){this.set(i.a.EXTENT,t)},e.prototype.setMaxResolution=function(t){this.set(i.a.MAX_RESOLUTION,t)},e.prototype.setMinResolution=function(t){this.set(i.a.MIN_RESOLUTION,t)},e.prototype.setOpacity=function(t){this.set(i.a.OPACITY,t)},e.prototype.setVisible=function(t){this.set(i.a.VISIBLE,t)},e.prototype.setZIndex=function(t){this.set(i.a.Z_INDEX,t)},e}(r.a);e.a=s},function(t,e,n){"use strict";function r(t,e,n,r,i,o){for(var a,s=[t[e],t[e+1]],l=[];e+r=r?t:function(t,e,n){var r=-1,i=t.length;e<0&&(e=-e>i?0:i+e),(n=n>i?i:n)<0&&(n+=i),i=e>n?0:n-e>>>0,e>>>=0;for(var o=Array(i);++r=e||n<0||A&&t-u>=a}function b(){var t=_();if(v(t))return w(t);l=setTimeout(b,function(t){var n=e-(t-c);return A?d(n,a-(t-u)):n}(t))}function w(t){return l=void 0,h&&i?g(t):(i=o=void 0,s)}function x(){var t=_(),n=v(t);if(i=arguments,o=this,c=t,n){if(void 0===l)return function(t){return u=t,l=setTimeout(b,e),p?g(t):s}(c);if(A)return l=setTimeout(b,e),g(c)}return void 0===l&&(l=setTimeout(b,e)),s}return e=m(e)||0,y(r)&&(p=!!r.leading,a=(A="maxWait"in r)?f(m(r.maxWait)||0,e):a,h="trailing"in r?!!r.trailing:h),x.cancel=function(){void 0!==l&&clearTimeout(l),u=0,i=c=o=l=void 0},x.flush=function(){return void 0===l?s:w(_())},x}function y(t){var e=typeof t;return!!t&&("object"==e||"function"==e)}function m(t){if("number"==typeof t)return t;if(function(t){return"symbol"==typeof t||function(t){return!!t&&"object"==typeof t}(t)&&h.call(t)==i}(t))return r;if(y(t)){var e="function"==typeof t.valueOf?t.valueOf():t;t=y(e)?e+"":e}if("string"!=typeof t)return 0===t?t:+t;t=t.replace(o,"");var n=s.test(t);return n||l.test(t)?c(t.slice(2),n?2:8):a.test(t)?r:+t}t.exports=function(t,e,r){var i=!0,o=!0;if("function"!=typeof t)throw new TypeError(n);return y(r)&&(i="leading"in r?!!r.leading:i,o="trailing"in r?!!r.trailing:o),g(t,e,{leading:i,maxWait:e,trailing:o})}}).call(this,n(26))},function(t,e,n){t.exports=n.p+"img/logo-color.svg"},function(t){t.exports=[{id:"klokantech-basic",title:"Klokantech Basic",url:"https://cdn.jsdelivr.net/gh/openmaptiles/klokantech-basic-gl-style@v1.7/style.json",thumbnail:"https://maputnik.github.io/thumbnails/klokantech-basic.png"},{id:"dark-matter",title:"Dark Matter",url:"https://cdn.jsdelivr.net/gh/openmaptiles/dark-matter-gl-style@v1.6/style.json",thumbnail:"https://maputnik.github.io/thumbnails/dark-matter.png"},{id:"positron",title:"Positron",url:"https://cdn.jsdelivr.net/gh/openmaptiles/positron-gl-style@v1.6/style.json",thumbnail:"https://maputnik.github.io/thumbnails/positron.png"},{id:"osm-bright",title:"OSM Bright",url:"https://cdn.jsdelivr.net/gh/openmaptiles/osm-bright-gl-style@v1.7/style.json",thumbnail:"https://maputnik.github.io/thumbnails/osm-bright.png"},{id:"osm-liberty",title:"OSM Liberty",url:"https://maputnik.github.io/osm-liberty/style.json",thumbnail:"https://maputnik.github.io/osm-liberty/thumbnail.png"},{id:"empty-style",title:"Empty Style",url:"https://cdn.jsdelivr.net/gh/maputnik/editor@v1.5.0/src/config/empty-style.json",thumbnail:"data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAYAAAAECAQAAAAHDYbIAAAAEUlEQVR42mP8/58BDhiJ4wAA974H/U5Xe1oAAAAASUVORK5CYII="},{id:"os-zoomstack-outdoor",title:"Zoomstack Outdoor",url:"https://s3-eu-west-1.amazonaws.com/tiles.os.uk/styles/open-zoomstack-outdoor/style.json",thumbnail:"https://maputnik.github.io/thumbnails/os-zoomstack-outdoor.png"},{id:"os-zoomstack-road",title:"Zoomstack Road",url:"https://s3-eu-west-1.amazonaws.com/tiles.os.uk/styles/open-zoomstack-road/style.json",thumbnail:"https://maputnik.github.io/thumbnails/os-zoomstack-road.png"},{id:"os-zoomstack-light",title:"Zoomstack Light",url:"https://s3-eu-west-1.amazonaws.com/tiles.os.uk/styles/open-zoomstack-light/style.json",thumbnail:"https://maputnik.github.io/thumbnails/os-zoomstack-light.png"},{id:"os-zoomstack-night",title:"Zoomstack Night",url:"https://s3-eu-west-1.amazonaws.com/tiles.os.uk/styles/open-zoomstack-night/style.json",thumbnail:"https://maputnik.github.io/thumbnails/os-zoomstack-night.png"}]},function(t,e,n){(function(t){function e(t,e){return!!t.hasOwnProperty(e)&&!t[e].match(/^false|0$/)}!function(){var e=n(2).enterModule;e&&e(t)}(),t.exports={asBool:e},function(){var r=n(2).default,i=n(2).leaveModule;r&&(r.register(e,"asBool","/Users/peter.richardson/work/maputnik-editor/src/libs/query-util.js"),i(t))}()}).call(this,n(85)(t))},function(t,e,n){"use strict";var r=n(9),i=n(35),o=n(41),a=n(25),s=function(t){function e(e,n,r){t.call(this,e),this.map=n,this.frameState=void 0!==r?r:null}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e}(a.a),l=function(t){function e(e,n,r,i,o){t.call(this,e,n,o),this.originalEvent=r,this.pixel=n.getEventPixel(r),this.coordinate=n.getCoordinateFromPixel(this.pixel),this.dragging=void 0!==i&&i}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype.preventDefault=function(){t.prototype.preventDefault.call(this),this.originalEvent.preventDefault()},e.prototype.stopPropagation=function(){t.prototype.stopPropagation.call(this),this.originalEvent.stopPropagation()},e}(s),c=n(32),u=n(7),p={SINGLECLICK:"singleclick",CLICK:u.a.CLICK,DBLCLICK:u.a.DBLCLICK,POINTERDRAG:"pointerdrag",POINTERMOVE:"pointermove",POINTERDOWN:"pointerdown",POINTERUP:"pointerup",POINTEROVER:"pointerover",POINTEROUT:"pointerout",POINTERENTER:"pointerenter",POINTERLEAVE:"pointerleave",POINTERCANCEL:"pointercancel"},A=function(t){function e(e,n,r,i,o){t.call(this,e,n,r.originalEvent,i,o),this.pointerEvent=r}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e}(l),h=n(4),f=n(52),d={POINTERMOVE:"pointermove",POINTERDOWN:"pointerdown",POINTERUP:"pointerup",POINTEROVER:"pointerover",POINTEROUT:"pointerout",POINTERENTER:"pointerenter",POINTERLEAVE:"pointerleave",POINTERCANCEL:"pointercancel"},_=function(t,e){this.dispatcher=t,this.mapping_=e};_.prototype.getEvents=function(){return Object.keys(this.mapping_)},_.prototype.getHandlerForEvent=function(t){return this.mapping_[t]};var g=_,y=1,m="mouse";function v(t){if(!this.isEventSimulatedFromTouch_(t)){y.toString()in this.pointerMap&&this.cancel(t);var e=M(t,this.dispatcher);this.pointerMap[y.toString()]=t,this.dispatcher.down(e,t)}}function b(t){if(!this.isEventSimulatedFromTouch_(t)){var e=M(t,this.dispatcher);this.dispatcher.move(e,t)}}function w(t){if(!this.isEventSimulatedFromTouch_(t)){var e=this.pointerMap[y.toString()];if(e&&e.button===t.button){var n=M(t,this.dispatcher);this.dispatcher.up(n,t),this.cleanupMouse()}}}function x(t){if(!this.isEventSimulatedFromTouch_(t)){var e=M(t,this.dispatcher);this.dispatcher.enterOver(e,t)}}function E(t){if(!this.isEventSimulatedFromTouch_(t)){var e=M(t,this.dispatcher);this.dispatcher.leaveOut(e,t)}}function M(t,e){var n=e.cloneEvent(t,t),r=n.preventDefault;return n.preventDefault=function(){t.preventDefault(),r()},n.pointerId=y,n.isPrimary=!0,n.pointerType=m,n}var C=function(t){function e(e){var n={mousedown:v,mousemove:b,mouseup:w,mouseover:x,mouseout:E};t.call(this,e,n),this.pointerMap=e.pointerMap,this.lastTouches=[]}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype.isEventSimulatedFromTouch_=function(t){for(var e=this.lastTouches,n=t.clientX,r=t.clientY,i=0,o=e.length,a=void 0;i=e.length){for(var i=[],o=0;othis.moveTolerance_||Math.abs(t.clientY-this.down_.clientY)>this.moveTolerance_},e.prototype.disposeInternal=function(){this.relayedListenerKey_&&(Object(h.e)(this.relayedListenerKey_),this.relayedListenerKey_=null),this.pointerdownListenerKey_&&(Object(h.e)(this.pointerdownListenerKey_),this.pointerdownListenerKey_=null),this.dragListenerKeys_.forEach(h.e),this.dragListenerKeys_.length=0,this.documentPointerEventHandler_&&(this.documentPointerEventHandler_.dispose(),this.documentPointerEventHandler_=null),this.pointerEventHandler_&&(this.pointerEventHandler_.dispose(),this.pointerEventHandler_=null),t.prototype.disposeInternal.call(this)},e}(f.a),it={POSTRENDER:"postrender",MOVESTART:"movestart",MOVEEND:"moveend"},ot={LAYERGROUP:"layergroup",SIZE:"size",TARGET:"target",VIEW:"view"},at=n(56),st=n(24),lt=n(71),ct=n(6),ut=n(14),pt=n(13),At=function(t,e){this.priorityFunction_=t,this.keyFunction_=e,this.elements_=[],this.priorities_=[],this.queuedElements_={}};At.prototype.clear=function(){this.elements_.length=0,this.priorities_.length=0,Object(pt.b)(this.queuedElements_)},At.prototype.dequeue=function(){var t=this.elements_,e=this.priorities_,n=t[0];1==t.length?(t.length=0,e.length=0):(t[0]=t.pop(),e[0]=e.pop(),this.siftUp_(0));var r=this.keyFunction_(n);return delete this.queuedElements_[r],n},At.prototype.enqueue=function(t){Object(ut.a)(!(this.keyFunction_(t)in this.queuedElements_),31);var e=this.priorityFunction_(t);return e!=1/0&&(this.elements_.push(t),this.priorities_.push(e),this.queuedElements_[this.keyFunction_(t)]=!0,this.siftDown_(0,this.elements_.length-1),!0)},At.prototype.getCount=function(){return this.elements_.length},At.prototype.getLeftChildIndex_=function(t){return 2*t+1},At.prototype.getRightChildIndex_=function(t){return 2*t+2},At.prototype.getParentIndex_=function(t){return t-1>>1},At.prototype.heapify_=function(){var t;for(t=(this.elements_.length>>1)-1;t>=0;t--)this.siftUp_(t)},At.prototype.isEmpty=function(){return 0===this.elements_.length},At.prototype.isKeyQueued=function(t){return t in this.queuedElements_},At.prototype.isQueued=function(t){return this.isKeyQueued(this.keyFunction_(t))},At.prototype.siftUp_=function(t){for(var e=this.elements_,n=this.priorities_,r=e.length,i=e[t],o=n[t],a=t;t>1;){var s=this.getLeftChildIndex_(t),l=this.getRightChildIndex_(t),c=lt;){var a=this.getParentIndex_(e);if(!(r[a]>o))break;n[e]=n[a],r[e]=r[a],e=a}n[e]=i,r[e]=o},At.prototype.reprioritize=function(){var t,e,n,r=this.priorityFunction_,i=this.elements_,o=this.priorities_,a=0,s=i.length;for(e=0;e0;)i=(r=this.dequeue()[0]).getKey(),(n=r.getState())===ct.a.ABORT?a=!0:n!==ct.a.IDLE||i in this.tilesLoadingKeys_||(this.tilesLoadingKeys_[i]=!0,++this.tilesLoading_,++o,r.load());0===o&&a&&this.tileChangeCallback_()},e}(At),ft=n(181),dt=n(19),_t=n(20),gt=n(3),yt=n(12),mt=n(134),vt=n(46),bt={LAYERS:"layers"},wt=function(t){function e(e){var n=e||{},r=Object(pt.a)({},n);delete r.layers;var o=n.layers;t.call(this,r),this.layersListenerKeys_=[],this.listenerKeys_={},Object(h.a)(this,Object(st.b)(bt.LAYERS),this.handleLayersChanged_,this),o?Array.isArray(o)?o=new i.a(o.slice(),{unique:!0}):(Object(ut.a)(o instanceof i.a,43),o=o):o=new i.a(void 0,{unique:!0}),this.setLayers(o)}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype.handleLayerChange_=function(){this.changed()},e.prototype.handleLayersChanged_=function(){this.layersListenerKeys_.forEach(h.e),this.layersListenerKeys_.length=0;var t=this.getLayers();for(var e in this.layersListenerKeys_.push(Object(h.a)(t,o.a.ADD,this.handleLayersAdd_,this),Object(h.a)(t,o.a.REMOVE,this.handleLayersRemove_,this)),this.listenerKeys_)this.listenerKeys_[e].forEach(h.e);Object(pt.b)(this.listenerKeys_);for(var n=t.getArray(),i=0,a=n.length;i=0;n--){var r=e[n];if(r.getActive())if(!r.handleEvent(t))break}}},e.prototype.handlePostRender=function(){var t=this.frameState_,e=this.tileQueue_;if(!e.isEmpty()){var n=this.maxTilesLoading_,r=n;if(t){var i=t.viewHints;i[dt.a.ANIMATING]&&(n=this.loadTilesWhileAnimating_?8:0,r=2),i[dt.a.INTERACTING]&&(n=this.loadTilesWhileInteracting_?8:0,r=2)}e.getTilesLoading()0;if(this.renderedVisible_!=n&&(this.element.style.display=n?"":"none",this.renderedVisible_=n),!Object(X.b)(e,this.renderedAttributions_)){Object(_t.b)(this.ulElement_);for(var r=0,i=e.length;r0?t.animate({rotation:0,duration:this.duration_,easing:It.b}):t.setRotation(0))},e}(Ct),Lt=function(t){function e(e){var n=e||{};t.call(this,{element:document.createElement("div"),target:n.target});var r=void 0!==n.className?n.className:"ol-zoom",i=void 0!==n.delta?n.delta:1,o=void 0!==n.zoomInLabel?n.zoomInLabel:"+",a=void 0!==n.zoomOutLabel?n.zoomOutLabel:"−",s=void 0!==n.zoomInTipLabel?n.zoomInTipLabel:"Zoom in",l=void 0!==n.zoomOutTipLabel?n.zoomOutTipLabel:"Zoom out",c=document.createElement("button");c.className=r+"-in",c.setAttribute("type","button"),c.title=s,c.appendChild("string"==typeof o?document.createTextNode(o):o),Object(h.a)(c,u.a.CLICK,this.handleClick_.bind(this,i));var p=document.createElement("button");p.className=r+"-out",p.setAttribute("type","button"),p.title=l,p.appendChild("string"==typeof a?document.createTextNode(a):a),Object(h.a)(p,u.a.CLICK,this.handleClick_.bind(this,-i));var A=r+" "+Bt.d+" "+Bt.b,f=this.element;f.className=A,f.appendChild(c),f.appendChild(p),this.duration_=void 0!==n.duration?n.duration:250}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype.handleClick_=function(t,e){e.preventDefault(),this.zoomByDelta_(t)},e.prototype.zoomByDelta_=function(t){var e=this.getMap().getView();if(e){var n=e.getResolution();if(n){var r=e.constrainResolution(n,t);this.duration_>0?(e.getAnimating()&&e.cancelAnimations(),e.animate({resolution:r,duration:this.duration_,easing:It.b})):e.setResolution(r)}}},e}(Ct);var St=function(t,e,n){this.decay_=t,this.minVelocity_=e,this.delay_=n,this.points_=[],this.angle_=0,this.initialVelocity_=0};St.prototype.begin=function(){this.points_.length=0,this.angle_=0,this.initialVelocity_=0},St.prototype.update=function(t,e){this.points_.push(t,e,Date.now())},St.prototype.end=function(){if(this.points_.length<6)return!1;var t=Date.now()-this.delay_,e=this.points_.length-3;if(this.points_[e+2]0&&this.points_[n+2]>t;)n-=3;var r=this.points_[e+2]-this.points_[n+2];if(r<1e3/60)return!1;var i=this.points_[e]-this.points_[n],o=this.points_[e+1]-this.points_[n+1];return this.angle_=Math.atan2(o,i),this.initialVelocity_=Math.sqrt(i*i+o*o)/r,this.initialVelocity_>this.minVelocity_},St.prototype.getDistance=function(){return(this.minVelocity_-this.initialVelocity_)/this.decay_},St.prototype.getAngle=function(){return this.angle_};var zt=St,Rt="active",jt=n(10);function Ut(t,e,n,r){Ft(t,e=t.constrainRotation(e,0),n,r)}function Ft(t,e,n,r){if(void 0!==e){var i=t.getRotation(),o=t.getCenter();void 0!==i&&o&&r>0?t.animate({rotation:e,anchor:n,duration:r,easing:It.b}):t.rotate(e,n)}}function Qt(t,e,n,r){var i=t.getResolution(),o=t.constrainResolution(i,e,0);if(void 0!==o){var a=t.getResolutions();o=Object(jt.a)(o,t.getMinResolution()||a[a.length-1],t.getMaxResolution()||a[0])}if(n&&void 0!==o&&o!==i){var s=t.getCenter(),l=t.calculateCenterZoom(o,n);l=t.constrainCenter(l),n=[(o*s[0]-i*l[0])/(o-i),(o*s[1]-i*l[1])/(o-i)]}Kt(t,o,n,r)}function Kt(t,e,n,r){if(e){var i=t.getResolution(),o=t.getCenter();if(void 0!==i&&o&&e!==i&&r)t.animate({resolution:e,anchor:n,duration:r,easing:It.b});else{if(n){var a=t.calculateCenterZoom(e,n);t.setCenter(a)}t.setResolution(e)}}}var Wt=function(t){function e(e){t.call(this),this.map_=null,this.setActive(!0),this.handleEvent=e.handleEvent}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype.getActive=function(){return this.get(Rt)},e.prototype.getMap=function(){return this.map_},e.prototype.setActive=function(t){this.set(Rt,t)},e.prototype.setMap=function(t){this.map_=t},e}(st.a);function Ht(t){var e=!1,n=t.originalEvent;if(t.type==p.DBLCLICK){var r=t.map,i=t.coordinate,o=n.shiftKey?-this.delta_:this.delta_;Qt(r.getView(),o,i,this.duration_),t.preventDefault(),e=!0}return!e}var Vt=function(t){function e(e){t.call(this,{handleEvent:Ht});var n=e||{};this.delta_=n.delta?n.delta:1,this.duration_=void 0!==n.duration?n.duration:250}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e}(Wt),Nt=n(62),Gt=function(t){var e=t.originalEvent;return e.altKey&&!(e.metaKey||e.ctrlKey)&&e.shiftKey},qt=function(t){return t.target.getTargetElement()===document.activeElement},Xt=yt.b,Yt=function(t){var e=t.originalEvent;return 0==e.button&&!(c.i&&c.d&&e.ctrlKey)},Zt=(yt.a,function(t){var e=t.originalEvent;return!e.altKey&&!(e.metaKey||e.ctrlKey)&&!e.shiftKey}),Jt=function(t){var e=t.originalEvent;return!e.altKey&&!(e.metaKey||e.ctrlKey)&&e.shiftKey},$t=function(t){var e=t.originalEvent.target.tagName;return"INPUT"!==e&&"SELECT"!==e&&"TEXTAREA"!==e},te=function(t){return Object(ut.a)(t.pointerEvent,56),"mouse"==t.pointerEvent.pointerType},ee=yt.c,ne=yt.a,re=yt.a,ie=yt.c;function oe(t){for(var e=t.length,n=0,r=0,i=0;i0}}else if(t.type==p.POINTERDOWN){var r=this.handleDownEvent_(t);r&&t.preventDefault(),this.handlingDownUpSequence=r,e=this.stopDown(r)}else t.type==p.POINTERMOVE&&this.handleMoveEvent_(t);return!e}var se=function(t){function e(e){var n=e||{};t.call(this,{handleEvent:n.handleEvent||ae}),this.handleDownEvent_=n.handleDownEvent?n.handleDownEvent:re,this.handleDragEvent_=n.handleDragEvent?n.handleDragEvent:ee,this.handleMoveEvent_=n.handleMoveEvent?n.handleMoveEvent:ie,this.handleUpEvent_=n.handleUpEvent?n.handleUpEvent:ne,this.handlingDownUpSequence=!1,this.stopDown=n.stopDown?n.stopDown:le,this.trackedPointers_={},this.targetPointers=[]}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype.updateTrackedPointers_=function(t){if(function(t){var e=t.type;return e===p.POINTERDOWN||e===p.POINTERDRAG||e===p.POINTERUP}(t)){var e=t.pointerEvent,n=e.pointerId.toString();t.type==p.POINTERUP?delete this.trackedPointers_[n]:t.type==p.POINTERDOWN?this.trackedPointers_[n]=e:n in this.trackedPointers_&&(this.trackedPointers_[n]=e),this.targetPointers=Object(pt.c)(this.trackedPointers_)}},e}(Wt);function le(t){return t}function ce(t){this.panning_||(this.panning_=!0,this.getMap().getView().setHint(dt.a.INTERACTING,1));var e=this.targetPointers,n=oe(e);if(e.length==this.lastPointersCount_){if(this.kinetic_&&this.kinetic_.update(n[0],n[1]),this.lastCentroid){var r=this.lastCentroid[0]-n[0],i=n[1]-this.lastCentroid[1],o=t.map.getView(),a=[r,i];Object(Nt.d)(a,o.getResolution()),Object(Nt.c)(a,o.getRotation()),Object(Nt.a)(a,o.getCenter()),a=o.constrainCenter(a),o.setCenter(a)}}else this.kinetic_&&this.kinetic_.begin();this.lastCentroid=n,this.lastPointersCount_=e.length}function ue(t){var e=t.map,n=e.getView();if(0===this.targetPointers.length){if(!this.noKinetic_&&this.kinetic_&&this.kinetic_.end()){var r=this.kinetic_.getDistance(),i=this.kinetic_.getAngle(),o=n.getCenter(),a=e.getPixelFromCoordinate(o),s=e.getCoordinateFromPixel([a[0]-r*Math.cos(i),a[1]-r*Math.sin(i)]);n.animate({center:n.constrainCenter(s),duration:500,easing:It.b})}return this.panning_&&(this.panning_=!1,n.setHint(dt.a.INTERACTING,-1)),!1}return this.kinetic_&&this.kinetic_.begin(),this.lastCentroid=null,!0}function pe(t){if(this.targetPointers.length>0&&this.condition_(t)){var e=t.map.getView();return this.lastCentroid=null,e.getAnimating()&&e.setCenter(t.frameState.viewState.center),this.kinetic_&&this.kinetic_.begin(),this.noKinetic_=this.targetPointers.length>1,!0}return!1}var Ae=function(t){function e(e){t.call(this,{handleDownEvent:pe,handleDragEvent:ce,handleUpEvent:ue,stopDown:yt.a});var n=e||{};this.kinetic_=n.kinetic,this.lastCentroid=null,this.lastPointersCount_,this.panning_=!1,this.condition_=n.condition?n.condition:Zt,this.noKinetic_=!1}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e}(se),he=n(72);function fe(t){if(te(t)){var e=t.map,n=e.getView();if(n.getConstraints().rotation!==he.c){var r=e.getSize(),i=t.pixel,o=Math.atan2(r[1]/2-i[1],i[0]-r[0]/2);if(void 0!==this.lastAngle_){var a=o-this.lastAngle_;Ft(n,n.getRotation()-a)}this.lastAngle_=o}}}function de(t){if(!te(t))return!0;var e=t.map.getView();return e.setHint(dt.a.INTERACTING,-1),Ut(e,e.getRotation(),void 0,this.duration_),!1}function _e(t){return!!te(t)&&(!(!Yt(t)||!this.condition_(t))&&(t.map.getView().setHint(dt.a.INTERACTING,1),this.lastAngle_=void 0,!0))}var ge=function(t){function e(e){var n=e||{};t.call(this,{handleDownEvent:_e,handleDragEvent:fe,handleUpEvent:de,stopDown:yt.a}),this.condition_=n.condition?n.condition:Gt,this.lastAngle_=void 0,this.duration_=void 0!==n.duration?n.duration:250}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e}(se),ye=n(97),me=n(57),ve=function(t){function e(e){t.call(this),this.geometry_=null,this.element_=document.createElement("div"),this.element_.style.position="absolute",this.element_.className="ol-box "+e,this.map_=null,this.startPixel_=null,this.endPixel_=null}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype.disposeInternal=function(){this.setMap(null)},e.prototype.render_=function(){var t=this.startPixel_,e=this.endPixel_,n=this.element_.style;n.left=Math.min(t[0],e[0])+"px",n.top=Math.min(t[1],e[1])+"px",n.width=Math.abs(e[0]-t[0])+"px",n.height=Math.abs(e[1]-t[1])+"px"},e.prototype.setMap=function(t){if(this.map_){this.map_.getOverlayContainer().removeChild(this.element_);var e=this.element_.style;e.left=e.top=e.width=e.height="inherit"}this.map_=t,this.map_&&this.map_.getOverlayContainer().appendChild(this.element_)},e.prototype.setPixels=function(t,e){this.startPixel_=t,this.endPixel_=e,this.createOrUpdateGeometry(),this.render_()},e.prototype.createOrUpdateGeometry=function(){var t=this.startPixel_,e=this.endPixel_,n=[t,[t[0],e[1]],e,[e[0],t[1]]].map(this.map_.getCoordinateFromPixel,this.map_);n[4]=n[0].slice(),this.geometry_?this.geometry_.setCoordinates([n]):this.geometry_=new me.a([n])},e.prototype.getGeometry=function(){return this.geometry_},e}(ye.a),be={BOXSTART:"boxstart",BOXDRAG:"boxdrag",BOXEND:"boxend"},we=function(t){function e(e,n,r){t.call(this,e),this.coordinate=n,this.mapBrowserEvent=r}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e}(a.a);function xe(t,e,n){var r=n[0]-e[0],i=n[1]-e[1];return r*r+i*i>=this.minArea_}function Ee(t){te(t)&&(this.box_.setPixels(this.startPixel_,t.pixel),this.dispatchEvent(new we(be.BOXDRAG,t.coordinate,t)))}function Me(t){return!te(t)||(this.box_.setMap(null),this.boxEndCondition_(t,this.startPixel_,t.pixel)&&(this.onBoxEnd_(t),this.dispatchEvent(new we(be.BOXEND,t.coordinate,t))),!1)}function Ce(t){return!!te(t)&&(!(!Yt(t)||!this.condition_(t))&&(this.startPixel_=t.pixel,this.box_.setMap(t.map),this.box_.setPixels(this.startPixel_,this.startPixel_),this.dispatchEvent(new we(be.BOXSTART,t.coordinate,t)),!0))}function Be(){var t=this.getMap(),e=t.getView(),n=t.getSize(),r=this.getGeometry().getExtent();if(this.out_){var i=e.calculateExtent(n),o=Object(gt.n)([t.getPixelFromCoordinate(Object(gt.v)(r)),t.getPixelFromCoordinate(Object(gt.D)(r))]),a=e.getResolutionForExtent(o,n);Object(gt.J)(i,1/a),r=i}var s=e.constrainResolution(e.getResolutionForExtent(r,n)),l=Object(gt.x)(r);l=e.constrainCenter(l),e.animate({resolution:s,center:l,duration:this.duration_,easing:It.b})}var Oe=function(t){function e(e){var n=e||{},r=n.condition?n.condition:Jt;t.call(this,{condition:r,className:n.className||"ol-dragzoom",onBoxEnd:Be}),this.duration_=void 0!==n.duration?n.duration:200,this.out_=void 0!==n.out&&n.out}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e}(function(t){function e(e){t.call(this,{handleDownEvent:Ce,handleDragEvent:Ee,handleUpEvent:Me});var n=e||{};this.box_=new ve(n.className||"ol-dragbox"),this.minArea_=void 0!==n.minArea?n.minArea:64,this.onBoxEnd_=n.onBoxEnd?n.onBoxEnd:yt.c,this.startPixel_=null,this.condition_=n.condition?n.condition:Xt,this.boxEndCondition_=n.boxEndCondition?n.boxEndCondition:xe}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype.getGeometry=function(){return this.box_.getGeometry()},e}(se)),ke={LEFT:37,UP:38,RIGHT:39,DOWN:40};function Pe(t){var e=!1;if(t.type==u.a.KEYDOWN){var n=t.originalEvent.keyCode;if(this.condition_(t)&&(n==ke.DOWN||n==ke.LEFT||n==ke.RIGHT||n==ke.UP)){var r=t.map.getView(),i=r.getResolution()*this.pixelDelta_,o=0,a=0;n==ke.DOWN?a=-i:n==ke.LEFT?o=-i:n==ke.RIGHT?o=i:a=i;var s=[o,a];Object(Nt.c)(s,r.getRotation()),function(t,e,n){var r=t.getCenter();if(r){var i=t.constrainCenter([r[0]+e[0],r[1]+e[1]]);n?t.animate({duration:n,easing:It.d,center:i}):t.setCenter(i)}}(r,s,this.duration_),t.preventDefault(),e=!0}}return!e}var Ie=function(t){function e(e){t.call(this,{handleEvent:Pe});var n=e||{};this.defaultCondition_=function(t){return Zt(t)&&$t(t)},this.condition_=void 0!==n.condition?n.condition:this.defaultCondition_,this.duration_=void 0!==n.duration?n.duration:100,this.pixelDelta_=void 0!==n.pixelDelta?n.pixelDelta:128}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e}(Wt);function Te(t){var e=!1;if(t.type==u.a.KEYDOWN||t.type==u.a.KEYPRESS){var n=t.originalEvent.charCode;if(this.condition_(t)&&(n=="+".charCodeAt(0)||n=="-".charCodeAt(0))){var r=t.map,i=n=="+".charCodeAt(0)?this.delta_:-this.delta_;Qt(r.getView(),i,void 0,this.duration_),t.preventDefault(),e=!0}}return!e}var De=function(t){function e(e){t.call(this,{handleEvent:Te});var n=e||{};this.condition_=n.condition?n.condition:$t,this.delta_=n.delta?n.delta:1,this.duration_=void 0!==n.duration?n.duration:100}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e}(Wt),Le={TRACKPAD:"trackpad",WHEEL:"wheel"};function Se(t){if(!this.condition_(t))return!0;var e=t.type;if(e!==u.a.WHEEL&&e!==u.a.MOUSEWHEEL)return!0;t.preventDefault();var n,r=t.map,i=t.originalEvent;if(this.useAnchor_&&(this.lastAnchor_=t.coordinate),t.type==u.a.WHEEL?(n=i.deltaY,c.c&&i.deltaMode===WheelEvent.DOM_DELTA_PIXEL&&(n/=c.b),i.deltaMode===WheelEvent.DOM_DELTA_LINE&&(n*=40)):t.type==u.a.MOUSEWHEEL&&(n=-i.wheelDeltaY,c.g&&(n/=3)),0===n)return!1;var o=Date.now();if(void 0===this.startTime_&&(this.startTime_=o),(!this.mode_||o-this.startTime_>this.trackpadEventGap_)&&(this.mode_=Math.abs(n)<4?Le.TRACKPAD:Le.WHEEL),this.mode_===Le.TRACKPAD){var a=r.getView();this.trackpadTimeoutId_?clearTimeout(this.trackpadTimeoutId_):a.setHint(dt.a.INTERACTING,1),this.trackpadTimeoutId_=setTimeout(this.decrementInteractingHint_.bind(this),this.trackpadEventGap_);var s=a.getResolution()*Math.pow(2,n/this.trackpadDeltaPerZoom_),l=a.getMinResolution(),p=a.getMaxResolution(),A=0;if(sp&&(s=Math.min(s,p*this.trackpadZoomBuffer_),A=-1),this.lastAnchor_){var h=a.calculateCenterZoom(s,this.lastAnchor_);a.setCenter(a.constrainCenter(h))}return a.setResolution(s),0===A&&this.constrainResolution_&&a.animate({resolution:a.constrainResolution(s,n>0?-1:1),easing:It.b,anchor:this.lastAnchor_,duration:this.duration_}),A>0?a.animate({resolution:l,easing:It.b,anchor:this.lastAnchor_,duration:500}):A<0&&a.animate({resolution:p,easing:It.b,anchor:this.lastAnchor_,duration:500}),this.startTime_=o,!1}this.delta_+=n;var f=Math.max(this.timeout_-(o-this.startTime_),0);return clearTimeout(this.timeoutId_),this.timeoutId_=setTimeout(this.handleWheelZoom_.bind(this,r),f),!1}var ze=function(t){function e(e){t.call(this,{handleEvent:Se});var n=e||{};this.delta_=0,this.duration_=void 0!==n.duration?n.duration:250,this.timeout_=void 0!==n.timeout?n.timeout:80,this.useAnchor_=void 0===n.useAnchor||n.useAnchor,this.constrainResolution_=n.constrainResolution||!1,this.condition_=n.condition?n.condition:Xt,this.lastAnchor_=null,this.startTime_=void 0,this.timeoutId_=void 0,this.mode_=void 0,this.trackpadEventGap_=400,this.trackpadTimeoutId_=void 0,this.trackpadDeltaPerZoom_=300,this.trackpadZoomBuffer_=1.5}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype.decrementInteractingHint_=function(){this.trackpadTimeoutId_=void 0,this.getMap().getView().setHint(dt.a.INTERACTING,-1)},e.prototype.handleWheelZoom_=function(t){var e=t.getView();e.getAnimating()&&e.cancelAnimations();Qt(e,-Object(jt.a)(this.delta_,-1,1),this.lastAnchor_,this.duration_),this.mode_=void 0,this.delta_=0,this.lastAnchor_=null,this.startTime_=void 0,this.timeoutId_=void 0},e.prototype.setMouseAnchor=function(t){this.useAnchor_=t,t||(this.lastAnchor_=null)},e}(Wt);function Re(t){var e=0,n=this.targetPointers[0],r=this.targetPointers[1],i=Math.atan2(r.clientY-n.clientY,r.clientX-n.clientX);if(void 0!==this.lastAngle_){var o=i-this.lastAngle_;this.rotationDelta_+=o,!this.rotating_&&Math.abs(this.rotationDelta_)>this.threshold_&&(this.rotating_=!0),e=o}this.lastAngle_=i;var a=t.map,s=a.getView();if(s.getConstraints().rotation!==he.c){var l=a.getViewport().getBoundingClientRect(),c=oe(this.targetPointers);if(c[0]-=l.left,c[1]-=l.top,this.anchor_=a.getCoordinateFromPixel(c),this.rotating_){var u=s.getRotation();a.render(),Ft(s,u+e,this.anchor_)}}}function je(t){if(this.targetPointers.length<2){var e=t.map.getView();if(e.setHint(dt.a.INTERACTING,-1),this.rotating_)Ut(e,e.getRotation(),this.anchor_,this.duration_);return!1}return!0}function Ue(t){if(this.targetPointers.length>=2){var e=t.map;return this.anchor_=null,this.lastAngle_=void 0,this.rotating_=!1,this.rotationDelta_=0,this.handlingDownUpSequence||e.getView().setHint(dt.a.INTERACTING,1),!0}return!1}var Fe=function(t){function e(e){t.call(this,{handleDownEvent:Ue,handleDragEvent:Re,handleUpEvent:je,stopDown:yt.a});var n=e||{};this.anchor_=null,this.lastAngle_=void 0,this.rotating_=!1,this.rotationDelta_=0,this.threshold_=void 0!==n.threshold?n.threshold:.3,this.duration_=void 0!==n.duration?n.duration:250}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e}(se);function Qe(t){var e=1,n=this.targetPointers[0],r=this.targetPointers[1],i=n.clientX-r.clientX,o=n.clientY-r.clientY,a=Math.sqrt(i*i+o*o);void 0!==this.lastDistance_&&(e=this.lastDistance_/a),this.lastDistance_=a;var s=t.map,l=s.getView(),c=l.getResolution(),u=l.getMaxResolution(),p=l.getMinResolution(),A=c*e;A>u?(e=u/c,A=u):Ae.getMaxResolution()){var r=this.lastScaleDelta_-1;!function(t,e,n,r,i){Kt(t,e=t.constrainResolution(e,0,i),n,r)}(e,n,this.anchor_,this.duration_,r)}return!1}return!0}function We(t){if(this.targetPointers.length>=2){var e=t.map;return this.anchor_=null,this.lastDistance_=void 0,this.lastScaleDelta_=1,this.handlingDownUpSequence||e.getView().setHint(dt.a.INTERACTING,1),!0}return!1}var He=function(t){function e(e){t.call(this,{handleDownEvent:We,handleDragEvent:Qe,handleUpEvent:Ke,stopDown:yt.a});var n=e||{};this.constrainResolution_=n.constrainResolution||!1,this.anchor_=null,this.duration_=void 0!==n.duration?n.duration:400,this.lastDistance_=void 0,this.lastScaleDelta_=1}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e}(se);var Ve=n(55),Ne=function(t){function e(e,n,r,i){t.call(this),this.extent=e,this.pixelRatio_=r,this.resolution=n,this.state=i}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype.changed=function(){this.dispatchEvent(u.a.CHANGE)},e.prototype.getExtent=function(){return this.extent},e.prototype.getImage=function(){},e.prototype.getPixelRatio=function(){return this.pixelRatio_},e.prototype.getResolution=function(){return this.resolution},e.prototype.getState=function(){return this.state},e.prototype.load=function(){},e}(f.a),Ge=n(31),qe=function(t){function e(e,n,r,i,o){var a=void 0!==o?Ge.a.IDLE:Ge.a.LOADED;t.call(this,e,n,r,a),this.loader_=void 0!==o?o:null,this.canvas_=i,this.error_=null}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype.getError=function(){return this.error_},e.prototype.handleLoad_=function(t){t?(this.error_=t,this.state=Ge.a.ERROR):this.state=Ge.a.LOADED,this.changed()},e.prototype.load=function(){this.state==Ge.a.IDLE&&(this.state=Ge.a.LOADING,this.changed(),this.loader_(this.handleLoad_.bind(this)))},e.prototype.getImage=function(){return this.canvas_},e}(Ne),Xe=n(45),Ye=n(133),Ze=function(t){function e(e,n,r,i,o){t.call(this,e),this.vectorContext=n,this.frameState=r,this.context=i,this.glContext=o}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e}(a.a),Je=n(29),$e=n(54),tn=n(5),en=n(39),nn=n(42),rn=function(){};rn.prototype.drawCustom=function(t,e,n){},rn.prototype.drawGeometry=function(t){},rn.prototype.setStyle=function(t){},rn.prototype.drawCircle=function(t,e){},rn.prototype.drawFeature=function(t,e){},rn.prototype.drawGeometryCollection=function(t,e){},rn.prototype.drawLineString=function(t,e){},rn.prototype.drawMultiLineString=function(t,e){},rn.prototype.drawMultiPoint=function(t,e){},rn.prototype.drawMultiPolygon=function(t,e){},rn.prototype.drawPoint=function(t,e){},rn.prototype.drawPolygon=function(t,e){},rn.prototype.drawText=function(t,e){},rn.prototype.setFillStrokeStyle=function(t,e){},rn.prototype.setImageStyle=function(t,e){},rn.prototype.setTextStyle=function(t,e){};var on=rn,an=function(t){function e(e,n,r,i,o){t.call(this),this.context_=e,this.pixelRatio_=n,this.extent_=r,this.transform_=i,this.viewRotation_=o,this.contextFillState_=null,this.contextStrokeState_=null,this.contextTextState_=null,this.fillState_=null,this.strokeState_=null,this.image_=null,this.imageAnchorX_=0,this.imageAnchorY_=0,this.imageHeight_=0,this.imageOpacity_=0,this.imageOriginX_=0,this.imageOriginY_=0,this.imageRotateWithView_=!1,this.imageRotation_=0,this.imageScale_=0,this.imageWidth_=0,this.text_="",this.textOffsetX_=0,this.textOffsetY_=0,this.textRotateWithView_=!1,this.textRotation_=0,this.textScale_=0,this.textFillState_=null,this.textStrokeState_=null,this.textState_=null,this.pixelCoordinates_=[],this.tmpLocalTransform_=Object(Et.c)()}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype.drawImages_=function(t,e,n,r){if(this.image_){var i=Object(nn.c)(t,e,n,2,this.transform_,this.pixelCoordinates_),o=this.context_,a=this.tmpLocalTransform_,s=o.globalAlpha;1!=this.imageOpacity_&&(o.globalAlpha=s*this.imageOpacity_);var l=this.imageRotation_;this.imageRotateWithView_&&(l+=this.viewRotation_);for(var c=0,u=i.length;cf[2])h=[_+d*Math.ceil((f[0]-_)/d),t[1]]}var g,y=e.layerStatesArray;for(g=y.length-1;g>=0;--g){var m=y[g],v=m.layer;if(Object(Ot.b)(m,u)&&a.call(s,v)){var b=this.getLayerRenderer(v);if(v.getSource()&&(l=b.forEachFeatureAtCoordinate(v.getSource().getWrapX()?h:t,e,n,p,o)),l)return l}}},e.prototype.forEachLayerAtPixel=function(t,e,n,r,i,o,a){},e.prototype.hasFeatureAtCoordinate=function(t,e,n,r,i){return void 0!==this.forEachFeatureAtCoordinate(t,e,n,yt.b,this,r,i)},e.prototype.getLayerRenderer=function(t){var e=Object(r.b)(t).toString();if(e in this.layerRenderers_)return this.layerRenderers_[e];for(var n,i=0,o=this.layerRendererConstructors_.length;i=0;--l){var h=u[l],f=h.layer;if(Object(Ot.b)(h,c)&&o.call(a,f))if(s=this.getLayerRenderer(f).forEachLayerAtCoordinate(A,e,n,r,i))return s}},e.prototype.registerLayerRenderers=function(e){t.prototype.registerLayerRenderers.call(this,e);for(var n=0,r=e.length;n0?i.call(o,this.getLayer(),s):void 0}},e}(fn),_n=function(t){function e(n){if(t.call(this,n),this.image_=null,this.imageTransform_=Object(Et.c)(),this.skippedFeatures_=[],this.vectorRenderer_=null,n.getType()===Xe.a.VECTOR)for(var r=0,i=pn.length;r0&&(this.newTiles_=!0):a.setState(ct.a.LOADED)),this.isDrawableTile_(a)||(a=a.getInterimTile()),a},e.prototype.prepareFrame=function(t,e){var n=t.pixelRatio,i=t.size,o=t.viewState,a=o.projection,s=o.resolution,l=o.center,c=this.getLayer(),u=c.getSource(),p=u.getRevision(),A=u.getTileGridForProjection(a),h=A.getZForResolution(s,this.zDirection),f=A.getResolution(h),d=Math.round(s/f)||1,_=t.extent;if(void 0!==e.extent&&(_=Object(gt.B)(_,e.extent)),Object(gt.H)(_))return!1;var g=A.getTileRangeForExtentAndZ(_,h),y=A.getTileRangeExtent(h,g),m=u.getTilePixelRatio(n),v={};v[h]={};var b,w,x,E=this.createLoadedTileFinder(u,a,v),M=t.viewHints,C=M[dt.a.ANIMATING]||M[dt.a.INTERACTING],B=this.tmpExtent,O=this.tmpTileRange_;for(this.newTiles_=!1,w=g.minX;w<=g.maxX;++w)for(x=g.minY;x<=g.maxY;++x)if(!(Date.now()-t.time>16&&C)){if(b=this.getTile(h,w,x,n,a),this.isDrawableTile_(b)){var k=Object(r.b)(this);if(b.getState()==ct.a.LOADED){v[h][b.tileCoord.toString()]=b;var P=b.inTransition(k);this.newTiles_||!P&&-1!==this.renderedTiles.indexOf(b)||(this.newTiles_=!0)}if(1===b.getAlpha(k,t.time))continue}var I=A.getTileCoordChildTileRange(b.tileCoord,O,B),T=!1;I&&(T=E(h+1,I)),T||A.forEachTileCoordParentTileRange(b.tileCoord,E,null,O,B)}var D=f*n/m*d;if(!(this.renderedResolution&&Date.now()-t.time>16&&C)&&(this.newTiles_||!this.renderedExtent_||!Object(gt.g)(this.renderedExtent_,_)||this.renderedRevision!=p||d!=this.oversampling_||!C&&D!=this.renderedResolution)){var L=this.context;if(L){var S=u.getTilePixelSize(h,n,a),z=Math.round(g.getWidth()*S[0]/d),R=Math.round(g.getHeight()*S[1]/d),j=L.canvas;j.width!=z||j.height!=R?(this.oversampling_=d,j.width=z,j.height=R):(this.renderedExtent_&&!Object(gt.p)(y,this.renderedExtent_)&&L.clearRect(0,0,z,R),d=this.oversampling_)}this.renderedTiles.length=0;var U,F,Q,K,W,H,V,N,G,q,X=Object.keys(v).map(Number);for(X.sort(function(t,e){return t===h?1:e===h?-1:t>e?1:t0},e.prototype.drawTileImage=function(t,e,n,i,o,a,s,l,c){var u=t.getImage(this.getLayer());if(u){var p=Object(r.b)(this),A=c?t.getAlpha(p,e.time):1;1!==A||this.getLayer().getSource().getOpaque(e.viewState.projection)||this.context.clearRect(i,o,a,s);var h=A!==this.context.globalAlpha;h&&(this.context.save(),this.context.globalAlpha=A),this.context.drawImage(u,l,l,u.width-2*l,u.height-2*l,i,o,a,s),h&&this.context.restore(),1!==A?e.animate=!0:c&&t.endTransition(p)}},e.prototype.getImage=function(){var t=this.context;return t?t.canvas:null},e.prototype.getImageTransform=function(){return this.imageTransform_},e}(dn);mn.handles=function(t){return t.getType()===Xe.a.TILE},mn.create=function(t,e){return new mn(e)},mn.prototype.getLayer;var vn=mn,bn=n(100),wn=n.n(bn),xn=function(){};xn.prototype.getReplay=function(t,e){},xn.prototype.isEmpty=function(){};var En=xn,Mn={CIRCLE:"Circle",DEFAULT:"Default",IMAGE:"Image",LINE_STRING:"LineString",POLYGON:"Polygon",TEXT:"Text"},Cn=n(37),Bn=n(47),On=n(136);function kn(t,e,n,r,i,o,a,s){for(var l,c,u,p=[],A=t[e]>t[n-r],h=i.length,f=t[e],d=t[e+1],_=t[e+=r],g=t[e+1],y=0,m=Math.sqrt(Math.pow(_-f,2)+Math.pow(g-d,2)),v="",b=0,w=0;w0?-Math.PI:Math.PI),void 0!==u){var O=B-u;if(O+=O>Math.PI?-2*Math.PI:O<-Math.PI?2*Math.PI:0,Math.abs(O)>s)return null}var k=C/m,P=Object(jt.c)(f,_,k),I=Object(jt.c)(d,g,k);u==B?(A&&(l[0]=P,l[1]=I,l[2]=E/2),l[4]=v):(b=E,l=[P,I,E/2,B,v=x],A?p.unshift(l):p.push(l),u=B),a+=E}return p}var Pn={BEGIN_GEOMETRY:0,BEGIN_PATH:1,CIRCLE:2,CLOSE_PATH:3,CUSTOM:4,DRAW_CHARS:5,DRAW_IMAGE:6,END_GEOMETRY:7,FILL:8,MOVE_TO_LINE_TO:9,SET_FILL_STYLE:10,SET_STROKE_STYLE:11,STROKE:12},In=[Pn.FILL],Tn=[Pn.STROKE],Dn=[Pn.BEGIN_PATH],Ln=[Pn.CLOSE_PATH],Sn=Pn,zn=[Mn.POLYGON,Mn.CIRCLE,Mn.LINE_STRING,Mn.IMAGE,Mn.TEXT,Mn.DEFAULT],Rn={left:0,end:0,center:.5,right:1,start:1,top:0,middle:.5,hanging:.2,alphabetic:.8,ideographic:.8,bottom:1},jn=Object(gt.j)(),Un=Object(Et.c)(),Fn=function(t){function e(e,n,r,i,o,a){t.call(this),this.declutterTree=a,this.tolerance=e,this.maxExtent=n,this.overlaps=o,this.pixelRatio=i,this.maxLineWidth=0,this.resolution=r,this.alignFill_,this.beginGeometryInstruction1_=null,this.beginGeometryInstruction2_=null,this.bufferedMaxExtent_=null,this.instructions=[],this.coordinates=[],this.coordinateCache_={},this.renderedTransform_=Object(Et.c)(),this.hitDetectionInstructions=[],this.pixelCoordinates_=null,this.state={},this.viewRotation_=0}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype.replayTextBackground_=function(t,e,n,r,i,o,a){t.beginPath(),t.moveTo.apply(t,e),t.lineTo.apply(t,n),t.lineTo.apply(t,r),t.lineTo.apply(t,i),t.lineTo.apply(t,e),o&&(this.alignFill_=o[2],this.fill_(t)),a&&(this.setStrokeStyle_(t,a),t.stroke())},e.prototype.replayImage_=function(t,e,n,r,i,o,a,s,l,c,u,p,A,h,f,d,_,g){var y=_||g;e-=i*=A,n-=o*=A;var m,v,b,w,x=f+c>r.width?r.width-c:f,E=s+u>r.height?r.height-u:s,M=d[3]+x*A+d[1],C=d[0]+E*A+d[2],B=e-d[3],O=n-d[0];(y||0!==p)&&(m=[B,O],v=[B+M,O],b=[B+M,O+C],w=[B,O+C]);var k=null;if(0!==p){var P=e+i,I=n+o;k=Object(Et.b)(Un,P,I,1,1,p,-P,-I),Object(gt.l)(jn),Object(gt.r)(jn,Object(Et.a)(Un,m)),Object(gt.r)(jn,Object(Et.a)(Un,v)),Object(gt.r)(jn,Object(Et.a)(Un,b)),Object(gt.r)(jn,Object(Et.a)(Un,w))}else Object(gt.k)(B,O,B+M,O+C,jn);var T=t.canvas,D=g?g[2]*A/2:0,L=jn[0]-D<=T.width&&jn[2]+D>=0&&jn[1]-D<=T.height&&jn[3]+D>=0;if(h&&(e=Math.round(e),n=Math.round(n)),a){if(!L&&1==a[4])return;Object(gt.q)(a,jn);var S=L?[t,k?k.slice(0):null,l,r,c,u,x,E,e,n,A]:null;S&&y&&S.push(_,g,m,v,b,w),a.push(S)}else L&&(y&&this.replayTextBackground_(t,m,v,b,w,_,g),Object(Je.n)(t,k,l,r,c,u,x,E,e,n,A))},e.prototype.applyPixelRatio=function(t){var e=this.pixelRatio;return 1==e?t:t.map(function(t){return t*e})},e.prototype.appendFlatCoordinates=function(t,e,n,r,i,o){var a=this.coordinates.length,s=this.getBufferedMaxExtent();o&&(e+=r);var l,c,u,p=[t[e],t[e+1]],A=[NaN,NaN],h=!0;for(l=e+r;l5){var n=t[4];if(1==n||n==t.length-5){var r={minX:t[0],minY:t[1],maxX:t[2],maxY:t[3],value:e};if(!this.declutterTree.collides(r)){this.declutterTree.insert(r);for(var i=5,o=t.length;i11&&this.replayTextBackground_(a[0],a[13],a[14],a[15],a[16],a[11],a[12]),Je.n.apply(void 0,a))}}t.length=5,Object(gt.l)(t)}}},e.prototype.replay_=function(t,e,n,i,o,a,s){var l;this.pixelCoordinates_&&Object(X.b)(e,this.renderedTransform_)?l=this.pixelCoordinates_:(this.pixelCoordinates_||(this.pixelCoordinates_=[]),l=Object(nn.c)(this.coordinates,0,this.coordinates.length,2,e,this.pixelCoordinates_),Object(Et.g)(this.renderedTransform_,e));for(var c,u,p,A,h,f,d,_,g,y,m,v,b=!Object(pt.d)(n),w=0,x=i.length,E=0,M=0,C=0,B=null,O=null,k=this.coordinateCache_,P=this.viewRotation_,I={context:t,pixelRatio:this.pixelRatio,resolution:this.resolution,rotation:P},T=this.instructions!=i||this.overlaps?0:200;wT&&(this.fill_(t),M=0),C>T&&(t.stroke(),C=0),M||C||(t.beginPath(),A=h=NaN),++w;break;case Sn.CIRCLE:var L=l[E=D[1]],S=l[E+1],z=l[E+2]-L,R=l[E+3]-S,j=Math.sqrt(z*z+R*R);t.moveTo(L+j,S),t.arc(L,S,j,0,2*Math.PI,!0),++w;break;case Sn.CLOSE_PATH:t.closePath(),++w;break;case Sn.CUSTOM:E=D[1],c=D[2];var U=D[3],F=D[4],Q=6==D.length?D[5]:void 0;I.geometry=U,I.feature=y,w in k||(k[w]=[]);var K=k[w];Q?Q(l,E,c,2,K):(K[0]=l[E],K[1]=l[E+1],K.length=2),F(K,I),++w;break;case Sn.DRAW_IMAGE:E=D[1],c=D[2],g=D[3],u=D[4],p=D[5],_=a?null:D[6];var W=D[7],H=D[8],V=D[9],N=D[10],G=D[11],q=D[12],Y=D[13],Z=D[14],J=void 0,$=void 0,tt=void 0;for(D.length>16?(J=D[15],$=D[16],tt=D[17]):(J=Je.j,$=tt=!1),G&&(q+=P);Ethis.maxLineWidth&&(this.maxLineWidth=n.lineWidth,this.bufferedMaxExtent_=null)}else n.strokeStyle=void 0,n.lineCap=void 0,n.lineDash=null,n.lineDashOffset=void 0,n.lineJoin=void 0,n.lineWidth=void 0,n.miterLimit=void 0},e.prototype.createFill=function(t,e){var n=t.fillStyle,r=[Sn.SET_FILL_STYLE,n];return"string"!=typeof n&&r.push(!0),r},e.prototype.applyStroke=function(t){this.instructions.push(this.createStroke(t))},e.prototype.createStroke=function(t){return[Sn.SET_STROKE_STYLE,t.strokeStyle,t.lineWidth*this.pixelRatio,t.lineCap,t.lineJoin,t.miterLimit,this.applyPixelRatio(t.lineDash),t.lineDashOffset*this.pixelRatio]},e.prototype.updateFillStyle=function(t,e,n){var r=t.fillStyle;"string"==typeof r&&t.currentFillStyle==r||(void 0!==r&&this.instructions.push(e.call(this,t,n)),t.currentFillStyle=r)},e.prototype.updateStrokeStyle=function(t,e){var n=t.strokeStyle,r=t.lineCap,i=t.lineDash,o=t.lineDashOffset,a=t.lineJoin,s=t.lineWidth,l=t.miterLimit;(t.currentStrokeStyle!=n||t.currentLineCap!=r||i!=t.currentLineDash&&!Object(X.b)(t.currentLineDash,i)||t.currentLineDashOffset!=o||t.currentLineJoin!=a||t.currentLineWidth!=s||t.currentMiterLimit!=l)&&(void 0!==n&&e.call(this,t),t.currentStrokeStyle=n,t.currentLineCap=r,t.currentLineDash=i,t.currentLineDashOffset=o,t.currentLineJoin=a,t.currentLineWidth=s,t.currentMiterLimit=l)},e.prototype.endGeometry=function(t,e){this.beginGeometryInstruction1_[2]=this.instructions.length,this.beginGeometryInstruction1_=null,this.beginGeometryInstruction2_[2]=this.hitDetectionInstructions.length,this.beginGeometryInstruction2_=null;var n=[Sn.END_GEOMETRY,e];this.instructions.push(n),this.hitDetectionInstructions.push(n)},e.prototype.getBufferedMaxExtent=function(){if(!this.bufferedMaxExtent_&&(this.bufferedMaxExtent_=Object(gt.d)(this.maxExtent),this.maxLineWidth>0)){var t=this.resolution*(this.maxLineWidth+1)/2;Object(gt.c)(this.bufferedMaxExtent_,t,this.bufferedMaxExtent_)}return this.bufferedMaxExtent_},e}(on);Fn.prototype.finish=yt.c;var Qn=Fn,Kn=function(t){function e(e,n,r,i,o,a){t.call(this,e,n,r,i,o,a),this.declutterGroup_=null,this.hitDetectionImage_=null,this.image_=null,this.anchorX_=void 0,this.anchorY_=void 0,this.height_=void 0,this.opacity_=void 0,this.originX_=void 0,this.originY_=void 0,this.rotateWithView_=void 0,this.rotation_=void 0,this.scale_=void 0,this.width_=void 0}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype.drawCoordinates_=function(t,e,n,r){return this.appendFlatCoordinates(t,e,n,r,!1,!1)},e.prototype.drawPoint=function(t,e){if(this.image_){this.beginGeometry(t,e);var n=t.getFlatCoordinates(),r=t.getStride(),i=this.coordinates.length,o=this.drawCoordinates_(n,0,n.length,r);this.instructions.push([Sn.DRAW_IMAGE,i,o,this.image_,this.anchorX_,this.anchorY_,this.declutterGroup_,this.height_,this.opacity_,this.originX_,this.originY_,this.rotateWithView_,this.rotation_,this.scale_*this.pixelRatio,this.width_]),this.hitDetectionInstructions.push([Sn.DRAW_IMAGE,i,o,this.hitDetectionImage_,this.anchorX_,this.anchorY_,this.declutterGroup_,this.height_,this.opacity_,this.originX_,this.originY_,this.rotateWithView_,this.rotation_,this.scale_,this.width_]),this.endGeometry(t,e)}},e.prototype.drawMultiPoint=function(t,e){if(this.image_){this.beginGeometry(t,e);var n=t.getFlatCoordinates(),r=t.getStride(),i=this.coordinates.length,o=this.drawCoordinates_(n,0,n.length,r);this.instructions.push([Sn.DRAW_IMAGE,i,o,this.image_,this.anchorX_,this.anchorY_,this.declutterGroup_,this.height_,this.opacity_,this.originX_,this.originY_,this.rotateWithView_,this.rotation_,this.scale_*this.pixelRatio,this.width_]),this.hitDetectionInstructions.push([Sn.DRAW_IMAGE,i,o,this.hitDetectionImage_,this.anchorX_,this.anchorY_,this.declutterGroup_,this.height_,this.opacity_,this.originX_,this.originY_,this.rotateWithView_,this.rotation_,this.scale_,this.width_]),this.endGeometry(t,e)}},e.prototype.finish=function(){this.reverseHitDetectionInstructions(),this.anchorX_=void 0,this.anchorY_=void 0,this.hitDetectionImage_=null,this.image_=null,this.height_=void 0,this.scale_=void 0,this.opacity_=void 0,this.originX_=void 0,this.originY_=void 0,this.rotateWithView_=void 0,this.rotation_=void 0,this.width_=void 0},e.prototype.setImageStyle=function(t,e){var n=t.getAnchor(),r=t.getSize(),i=t.getHitDetectionImage(1),o=t.getImage(1),a=t.getOrigin();this.anchorX_=n[0],this.anchorY_=n[1],this.declutterGroup_=e,this.hitDetectionImage_=i,this.image_=o,this.height_=r[1],this.opacity_=t.getOpacity(),this.originX_=a[0],this.originY_=a[1],this.rotateWithView_=t.getRotateWithView(),this.rotation_=t.getRotation(),this.scale_=t.getScale(),this.width_=r[0]},e}(Qn),Wn=function(t){function e(e,n,r,i,o,a){t.call(this,e,n,r,i,o,a)}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype.drawFlatCoordinates_=function(t,e,n,r){var i=this.coordinates.length,o=this.appendFlatCoordinates(t,e,n,r,!1,!1),a=[Sn.MOVE_TO_LINE_TO,i,o];return this.instructions.push(a),this.hitDetectionInstructions.push(a),n},e.prototype.drawLineString=function(t,e){var n=this.state,r=n.strokeStyle,i=n.lineWidth;if(void 0!==r&&void 0!==i){this.updateStrokeStyle(n,this.applyStroke),this.beginGeometry(t,e),this.hitDetectionInstructions.push([Sn.SET_STROKE_STYLE,n.strokeStyle,n.lineWidth,n.lineCap,n.lineJoin,n.miterLimit,n.lineDash,n.lineDashOffset],Dn);var o=t.getFlatCoordinates(),a=t.getStride();this.drawFlatCoordinates_(o,0,o.length,a),this.hitDetectionInstructions.push(Tn),this.endGeometry(t,e)}},e.prototype.drawMultiLineString=function(t,e){var n=this.state,r=n.strokeStyle,i=n.lineWidth;if(void 0!==r&&void 0!==i){this.updateStrokeStyle(n,this.applyStroke),this.beginGeometry(t,e),this.hitDetectionInstructions.push([Sn.SET_STROKE_STYLE,n.strokeStyle,n.lineWidth,n.lineCap,n.lineJoin,n.miterLimit,n.lineDash,n.lineDashOffset],Dn);for(var o=t.getEnds(),a=t.getFlatCoordinates(),s=t.getStride(),l=0,c=0,u=o.length;ct&&(g>_&&(_=g,f=y,d=o),g=0,y=o-i)),a=s,u=A,p=h),l=m,c=v}return(g+=s)>_?[y,o]:[f,d]}var qn=n(132);var Xn={Circle:Nn,Default:Qn,Image:Kn,LineString:Wn,Polygon:Nn,Text:function(t){function e(e,n,r,i,o,a){t.call(this,e,n,r,i,o,a),this.declutterGroup_,this.labels_=null,this.text_="",this.textOffsetX_=0,this.textOffsetY_=0,this.textRotateWithView_=void 0,this.textRotation_=0,this.textFillState_=null,this.fillStates={},this.textStrokeState_=null,this.strokeStates={},this.textState_={},this.textStates={},this.textKey_="",this.fillKey_="",this.strokeKey_="",this.widths_={},Je.o.prune()}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype.drawText=function(t,e){var n=this.textFillState_,r=this.textStrokeState_,i=this.textState_;if(""!==this.text_&&i&&(n||r)){var o,a,s=this.coordinates.length,l=t.getType(),c=null,u=2,p=2;if(i.placement===qn.a.LINE){if(!Object(gt.F)(this.getBufferedMaxExtent(),t.getExtent()))return;var A;if(c=t.getFlatCoordinates(),p=t.getStride(),l==tn.a.LINE_STRING)A=[c.length];else if(l==tn.a.MULTI_LINE_STRING)A=t.getEnds();else if(l==tn.a.POLYGON)A=t.getEnds().slice(0,1);else if(l==tn.a.MULTI_POLYGON){var h=t.getEndss();for(A=[],o=0,a=h.length;o=b)&&c.push(w[o],w[o+1]);if(0==(u=c.length))return}u=this.appendFlatCoordinates(c,0,u,p,!1,!1),(i.backgroundFill||i.backgroundStroke)&&(this.setFillStrokeStyle(i.backgroundFill,i.backgroundStroke),i.backgroundFill&&(this.updateFillStyle(this.state,this.createFill,t),this.hitDetectionInstructions.push(this.createFill(this.state,t))),i.backgroundStroke&&(this.updateStrokeStyle(this.state,this.applyStroke),this.hitDetectionInstructions.push(this.createStroke(this.state)))),this.beginGeometry(t,e),this.drawTextImage_(v,s,u),this.endGeometry(t,e)}}},e.prototype.getImage=function(t,e,n,r){var i,o=r+e+t+n+this.pixelRatio;if(!Je.o.containsKey(o)){var a=r?this.strokeStates[r]||this.textStrokeState_:null,s=n?this.fillStates[n]||this.textFillState_:null,l=this.textStates[e]||this.textState_,u=this.pixelRatio,p=l.scale*u,A=Rn[l.textAlign||Je.l],h=r&&a.lineWidth?a.lineWidth:0,f=t.split("\n"),d=f.length,_=[],g=function(t,e,n){for(var r=e.length,i=0,o=0;o=o;)Jn(n,t+i,t+o),Jn(n,t+o,t+i),Jn(n,t-o,t+i),Jn(n,t-i,t+o),Jn(n,t-i,t-o),Jn(n,t-o,t-i),Jn(n,t+o,t-i),Jn(n,t+i,t-o),2*((a+=1+2*++o)-i)+1>0&&(a+=1-2*(i-=1));return Zn[t]=n,n}(r);function f(t){for(var e=u.getImageData(0,0,l,l).data,n=0;n0){var i=void 0;return(!p||A!=Mn.IMAGE&&A!=Mn.TEXT||-1!==p.indexOf(t))&&(i=o(t)),i||void u.clearRect(0,0,l,l)}}this.declutterTree_&&(p=this.declutterTree_.all().map(function(t){return t.value}));var d,_,g,y,m,v=Object.keys(this.replaysByZIndex_).map(Number);for(v.sort(X.g),d=v.length-1;d>=0;--d){var b=v[d].toString();for(g=this.replaysByZIndex_[b],_=zn.length-1;_>=0;--_)if(void 0!==(y=g[A=zn[_]]))if(!a||A!=Mn.IMAGE&&A!=Mn.TEXT){if(m=y.replayHitDetection(u,c,n,i,f,s))return m}else{var w=a[b];w?w.push(y,c.slice(0)):a[b]=[y,c.slice(0)]}}},e.prototype.getClipCoords=function(t){var e=this.maxExtent_,n=e[0],r=e[1],i=e[2],o=e[3],a=[n,r,n,o,i,o,i,r];return Object(nn.c)(a,0,8,2,t,a),a},e.prototype.getReplay=function(t,e){var n=void 0!==t?t.toString():"0",r=this.replaysByZIndex_[n];void 0===r&&(r={},this.replaysByZIndex_[n]=r);var i=r[e];void 0===i&&(i=new(0,Xn[e])(this.tolerance_,this.maxExtent_,this.resolution_,this.pixelRatio_,this.overlaps_,this.declutterTree_),r[e]=i);return i},e.prototype.getReplays=function(){return this.replaysByZIndex_},e.prototype.isEmpty=function(){return Object(pt.d)(this.replaysByZIndex_)},e.prototype.replay=function(t,e,n,r,i,o,a){var s=Object.keys(this.replaysByZIndex_).map(Number);s.sort(X.g),t.save(),this.clip(t,e);var l,c,u,p,A,h,f=o||zn;for(l=0,c=s.length;l=i)for(r=i;rc[2];)k=I*++T,p=this.getTransform(e,k),f.replay(d,p,l,o,C),P-=I}if(Object(Je.s)(d,l,B/2,O/2),v&&this.dispatchRenderEvent(d,e,p),d!=t){if(m){var D=t.globalAlpha;t.globalAlpha=n.opacity,t.drawImage(d.canvas,-g,-y),t.globalAlpha=D}else t.drawImage(d.canvas,-g,-y);d.translate(-g,-y)}m||(d.globalAlpha=E)}h&&t.restore()},e.prototype.composeFrame=function(t,e,n){var r=this.getTransform(t,0);this.preCompose(n,t,r),this.compose(n,t,e),this.postCompose(n,t,e,r)},e.prototype.forEachFeatureAtCoordinate=function(t,e,n,i,o){if(this.replayGroup_){var a=e.viewState.resolution,s=e.viewState.rotation,l=this.getLayer(),c={};return this.replayGroup_.forEachFeatureAtCoordinate(t,a,s,n,{},function(t){var e=Object(r.b)(t).toString();if(!(e in c))return c[e]=!0,i.call(o,t,l)},null)}},e.prototype.handleFontsChanged_=function(t){var e=this.getLayer();e.getVisible()&&this.replayGroup_&&e.changed()},e.prototype.handleStyleImageChange_=function(t){this.renderIfReadyAndVisible()},e.prototype.prepareFrame=function(t,e){var n=this.getLayer(),r=n.getSource(),i=t.viewHints[dt.a.ANIMATING],o=t.viewHints[dt.a.INTERACTING],a=n.getUpdateWhileAnimating(),s=n.getUpdateWhileInteracting();if(!this.dirty_&&!a&&i||!s&&o)return!0;var l=t.extent,c=t.viewState,u=c.projection,p=c.resolution,A=t.pixelRatio,h=n.getRevision(),f=n.getRenderBuffer(),d=n.getRenderOrder();void 0===d&&(d=nr);var _=Object(gt.c)(l,f*p),g=c.projection.getExtent();if(r.getWrapX()&&c.projection.canWrapX()&&!Object(gt.g)(g,t.extent)){var y=Object(gt.E)(g),m=Math.max(Object(gt.E)(_)/2,y);_[0]=g[0]-m,_[2]=g[2]+m}if(!this.dirty_&&this.renderedResolution_==p&&this.renderedRevision_==h&&this.renderedRenderOrder_==d&&Object(gt.g)(this.renderedExtent_,_))return this.replayGroupChanged=!1,!0;this.replayGroup_=null,this.dirty_=!1;var v=new $n(ir(p,A),_,p,A,r.getOverlaps(),this.declutterTree_,n.getRenderBuffer());r.loadFeatures(_,p,u);var b=function(t){var e,r=t.getStyleFunction()||n.getStyleFunction();if(r&&(e=r(t,p)),e){var i=this.renderFeature(t,p,A,e,v);this.dirty_=this.dirty_||i}}.bind(this);if(d){var w=[];r.forEachFeatureInExtent(_,function(t){w.push(t)},this),w.sort(d);for(var x=0,E=w.length;x=0;--v){var b=_[v];if(b.getState()!=ct.a.ABORT)for(var w=b.tileCoord,x=g.getTileCoordExtent(w,this.tmpExtent)[0]-b.extent[0],E=void 0,M=0,C=b.tileKeys.length;M-1&&t%1==0&&t<=n}},function(t,e){t.exports=function(t){return function(e){return t(e)}}},function(t,e,n){(function(t){var r=n(191),i="object"==typeof e&&e&&!e.nodeType&&e,o=i&&"object"==typeof t&&t&&!t.nodeType&&t,a=o&&o.exports===i&&r.process,s=function(){try{return a&&a.binding&&a.binding("util")}catch(t){}}();t.exports=s}).call(this,n(85)(t))},function(t,e){var n=Object.prototype;t.exports=function(t){var e=t&&t.constructor;return t===("function"==typeof e&&e.prototype||n)}},function(t,e,n){var r=n(197)(Object.getPrototypeOf,Object);t.exports=r},function(t,e,n){var r=n(119),i=n(399),o=n(400),a=n(401),s=n(402),l=n(403);function c(t){var e=this.__data__=new r(t);this.size=e.size}c.prototype.clear=i,c.prototype.delete=o,c.prototype.get=a,c.prototype.has=s,c.prototype.set=l,t.exports=c},function(t,e){t.exports=function(t,e){return t===e||t!=t&&e!=e}},function(t,e,n){var r=n(87)(n(65),"Map");t.exports=r},function(t,e,n){var r=n(408),i=n(415),o=n(417),a=n(418),s=n(419);function l(t){var e=-1,n=null==t?0:t.length;for(this.clear();++e=e?t:e)),t}(p(t),e,n)}},function(module,__webpack_exports__,__webpack_require__){"use strict";(function(module){__webpack_require__.d(__webpack_exports__,"a",function(){return BackgroundIcon});var react__WEBPACK_IMPORTED_MODULE_0__=__webpack_require__(0),react__WEBPACK_IMPORTED_MODULE_0___default=__webpack_require__.n(react__WEBPACK_IMPORTED_MODULE_0__),react_icon_base__WEBPACK_IMPORTED_MODULE_1__=__webpack_require__(69);function _typeof(t){return(_typeof="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 _extends(){return(_extends=Object.assign||function(t){for(var e=1;e stats.json",build:"webpack --config config/webpack.production.config.js --progress --profile --colors",test:"cross-env NODE_ENV=test wdio config/wdio.conf.js","test-watch":"cross-env NODE_ENV=test wdio config/wdio.conf.js --watch",start:"webpack-dev-server --progress --profile --colors --config config/webpack.config.js",lint:"eslint --ext js --ext jsx src test","lint-styles":"stylelint 'src/styles/*.scss'"},repository:{type:"git",url:"https://github.com/maputnik/editor"},author:"Lukas Martinelli",license:"MIT",homepage:"https://github.com/maputnik/editor#readme",dependencies:{"@babel/runtime":"^7.1.2","@mapbox/mapbox-gl-rtl-text":"^0.2.1","@mapbox/mapbox-gl-style-spec":"^13.3.0",classnames:"^2.2.6",codemirror:"^5.40.2",color:"^3.0.0","file-saver":"^1.3.8",jsonlint:"github:josdejong/jsonlint#85a19d7","lodash.capitalize":"^4.2.1","lodash.clamp":"^4.0.3","lodash.clonedeep":"^4.5.0","lodash.isequal":"^4.5.0","lodash.throttle":"^4.1.1","mapbox-gl":"^0.50.0-beta.1","mapbox-gl-inspect":"^1.3.1","maputnik-design":"github:maputnik/design",ol:"^5.2.0","ol-mapbox-style":"^3.1.0","prop-types":"^15.6.2",react:"^16.5.2","react-aria-menubutton":"^6.0.1","react-aria-modal":"^3.0.0","react-autobind":"^1.0.6","react-autocomplete":"^1.8.1","react-codemirror2":"^5.1.0","react-collapse":"^4.0.3","react-color":"^2.14.1","react-dom":"^16.5.2","react-file-reader-input":"^2.0.0","react-icon-base":"^2.1.2","react-icons":"^3.1.0","react-motion":"^0.5.2","react-sortable-hoc":"^0.8.3","reconnecting-websocket":"^3.2.2",slugify:"^1.3.1",url:"^0.11.0"},jshintConfig:{esversion:6},stylelint:{extends:"stylelint-config-recommended-scss",rules:{"no-descending-specificity":null,"media-feature-name-no-unknown":[!0,{ignoreMediaFeatureNames:["prefers-reduced-motion"]}]}},eslintConfig:{plugins:["react"],extends:["plugin:react/recommended"],env:{browser:!0,node:!0,es6:!0},parser:"babel-eslint",parserOptions:{ecmaVersion:6,sourceType:"module",ecmaFeatures:{impliedStrict:!0,experimentalObjectRestSpread:!0,jsx:!0}}},devDependencies:{"@babel/core":"^7.1.2","@babel/plugin-proposal-class-properties":"^7.1.0","@babel/plugin-transform-runtime":"^7.1.0","@babel/preset-env":"^7.1.0","@babel/preset-flow":"^7.0.0","@babel/preset-react":"^7.0.0","babel-eslint":"^10.0.1","babel-loader":"8.0.4","babel-plugin-istanbul":"^5.0.1","copy-webpack-plugin":"^4.5.2",cors:"^2.8.4","cross-env":"^5.2.0","css-loader":"^1.0.0",eslint:"^5.6.1","eslint-plugin-react":"^7.11.1",express:"^4.16.3","file-loader":"^2.0.0","html-webpack-plugin":"^3.2.0","is-docker":"^1.1.0",istanbul:"^0.4.5","istanbul-lib-coverage":"^2.0.1",mkdirp:"^0.5.1",mocha:"^5.2.0","node-sass":"^4.9.3","raw-loader":"^0.5.1","react-hot-loader":"^4.3.11","sass-loader":"^7.1.0","selenium-standalone":"^6.15.3","style-loader":"^0.23.0",stylelint:"^9.6.0","stylelint-config-recommended-scss":"^3.2.0","stylelint-scss":"^3.3.1","transform-loader":"^0.2.4",uuid:"^3.3.2","wdio-mocha-framework":"^0.6.3","wdio-selenium-standalone-service":"0.0.10","wdio-spec-reporter":"^0.1.5",webdriverio:"^4.13.2",webpack:"^4.20.2","webpack-bundle-analyzer":"^3.0.2","webpack-cleanup-plugin":"^0.5.1","webpack-cli":"^3.1.2","webpack-dev-server":"^3.1.9"}}},function(module,__webpack_exports__,__webpack_require__){"use strict";(function(module){var react__WEBPACK_IMPORTED_MODULE_0__=__webpack_require__(0),react__WEBPACK_IMPORTED_MODULE_0___default=__webpack_require__.n(react__WEBPACK_IMPORTED_MODULE_0__),prop_types__WEBPACK_IMPORTED_MODULE_1__=__webpack_require__(1),prop_types__WEBPACK_IMPORTED_MODULE_1___default=__webpack_require__.n(prop_types__WEBPACK_IMPORTED_MODULE_1__);function _typeof(t){return(_typeof="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 _classCallCheck(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function _defineProperties(t,e){for(var n=0;n1&&"function"==typeof arguments[r-1]&&(e=arguments[r-1],--r),!this.isDef()){var i=arguments[r-1];return i.center&&this.setCenter(i.center),void 0!==i.zoom&&this.setZoom(i.zoom),void 0!==i.rotation&&this.setRotation(i.rotation),void(e&&B(e,!0))}for(var o=Date.now(),s=this.getCenter().slice(),l=this.getResolution(),c=this.getRotation(),u=[],A=0;A0},e.prototype.getInteracting=function(){return this.hints_[p.a.INTERACTING]>0},e.prototype.cancelAnimations=function(){this.setHint(p.a.ANIMATING,-this.hints_[p.a.ANIMATING]);for(var t=0,e=this.animations_.length;t=0;--n){for(var r=this.animations_[n],i=!0,o=0,s=r.length;o0?c/l.duration:1;u>=1?(l.complete=!0,u=1):i=!1;var d=l.easing(u);if(l.sourceCenter){var _=l.sourceCenter[0],g=l.sourceCenter[1],y=_+d*(l.targetCenter[0]-_),m=g+d*(l.targetCenter[1]-g);this.set(A,[y,m])}if(l.sourceResolution&&l.targetResolution){var v=1===d?l.targetResolution:l.sourceResolution+d*(l.targetResolution-l.sourceResolution);l.anchor&&this.set(A,this.calculateCenterZoom(v,l.anchor)),this.set(h,v)}if(void 0!==l.sourceRotation&&void 0!==l.targetRotation){var b=1===d?Object(a.d)(l.targetRotation+Math.PI,2*Math.PI)-Math.PI:l.sourceRotation+d*(l.targetRotation-l.sourceRotation);l.anchor&&this.set(A,this.calculateCenterRotate(b,l.anchor)),this.set(f,b)}if(e=!0,!l.complete)break}}if(i){this.animations_[n]=null,this.setHint(p.a.ANIMATING,-1);var w=r[0].callback;w&&B(w,!0)}}this.animations_=this.animations_.filter(Boolean),e&&void 0===this.updateAnimationKey_&&(this.updateAnimationKey_=requestAnimationFrame(this.updateAnimations_))}},e.prototype.calculateCenterRotate=function(t,e){var n,r=this.getCenter();return void 0!==r&&(n=[r[0]-e[0],r[1]-e[1]],Object(_.c)(n,t-this.getRotation()),Object(_.a)(n,e)),n},e.prototype.calculateCenterZoom=function(t,e){var n,r=this.getCenter(),i=this.getResolution();void 0!==r&&void 0!==i&&(n=[e[0]-t*(e[0]-r[0])/i,e[1]-t*(e[1]-r[1])/i]);return n},e.prototype.getSizeFromViewport_=function(){var t=[100,100],e='.ol-viewport[data-view="'+Object(i.b)(this)+'"]',n=document.querySelector(e);if(n){var r=getComputedStyle(n);t[0]=parseInt(r.width,10),t[1]=parseInt(r.height,10)}return t},e.prototype.constrainCenter=function(t){return this.constraints_.center(t)},e.prototype.constrainResolution=function(t,e,n){var r=e||0,i=n||0;return this.constraints_.resolution(t,r,i)},e.prototype.constrainRotation=function(t,e){var n=e||0;return this.constraints_.rotation(t,n)},e.prototype.getCenter=function(){return this.get(A)},e.prototype.getConstraints=function(){return this.constraints_},e.prototype.getHints=function(t){return void 0!==t?(t[0]=this.hints_[0],t[1]=this.hints_[1],t):this.hints_.slice()},e.prototype.calculateExtent=function(t){var e=t||this.getSizeFromViewport_(),n=this.getCenter();Object(d.a)(n,1);var r=this.getResolution();Object(d.a)(void 0!==r,2);var i=this.getRotation();return Object(d.a)(void 0!==i,3),Object(y.z)(n,r,i,e)},e.prototype.getMaxResolution=function(){return this.maxResolution_},e.prototype.getMinResolution=function(){return this.minResolution_},e.prototype.getMaxZoom=function(){return this.getZoomForResolution(this.minResolution_)},e.prototype.setMaxZoom=function(t){this.applyOptions_(this.getUpdatedOptions_({maxZoom:t}))},e.prototype.getMinZoom=function(){return this.getZoomForResolution(this.maxResolution_)},e.prototype.setMinZoom=function(t){this.applyOptions_(this.getUpdatedOptions_({minZoom:t}))},e.prototype.getProjection=function(){return this.projection_},e.prototype.getResolution=function(){return this.get(h)},e.prototype.getResolutions=function(){return this.resolutions_},e.prototype.getResolutionForExtent=function(t,e){var n=e||this.getSizeFromViewport_(),r=Object(y.E)(t)/n[0],i=Object(y.A)(t)/n[1];return Math.max(r,i)},e.prototype.getResolutionForValueFunction=function(t){var e=t||2,n=this.maxResolution_,r=this.minResolution_,i=Math.log(n/r)/Math.log(e);return function(t){return n/Math.pow(e,t*i)}},e.prototype.getRotation=function(){return this.get(f)},e.prototype.getValueForResolutionFunction=function(t){var e=t||2,n=this.maxResolution_,r=this.minResolution_,i=Math.log(n/r)/Math.log(e);return function(t){return Math.log(n/t)/Math.log(e)/i}},e.prototype.getState=function(t){var e=this.getCenter(),n=this.getProjection(),r=this.getResolution(),i=r/t,o=this.getRotation();return{center:[Math.round(e[0]/i)*i,Math.round(e[1]/i)*i],projection:void 0!==n?n:null,resolution:r,rotation:o,zoom:this.getZoom()}},e.prototype.getZoom=function(){var t,e=this.getResolution();return void 0!==e&&(t=this.getZoomForResolution(e)),t},e.prototype.getZoomForResolution=function(t){var e,n,r=this.minZoom_||0;if(this.resolutions_){var i=Object(c.f)(this.resolutions_,t,1);r=i,e=this.resolutions_[i],n=i==this.resolutions_.length-1?2:e/this.resolutions_[i+1]}else e=this.maxResolution_,n=this.zoomFactor_;return r+Math.log(e/t)/Math.log(n)},e.prototype.getResolutionForZoom=function(t){return this.constrainResolution(this.maxResolution_,t-this.minZoom_,0)},e.prototype.fit=function(t,e){var n,r=e||{},i=r.size;i||(i=this.getSizeFromViewport_()),t instanceof b.a?t.getType()===m.a.CIRCLE?(t=t.getExtent(),(n=Object(v.b)(t)).rotate(this.getRotation(),Object(y.x)(t))):n=t:(Object(d.a)(Array.isArray(t),24),Object(d.a)(!Object(y.H)(t),25),n=Object(v.b)(t));var a,s=void 0!==r.padding?r.padding:[0,0,0,0],l=void 0===r.constrainResolution||r.constrainResolution,c=void 0!==r.nearest&&r.nearest;a=void 0!==r.minResolution?r.minResolution:void 0!==r.maxZoom?this.constrainResolution(this.maxResolution_,r.maxZoom-this.minZoom_,0):0;for(var u=n.getFlatCoordinates(),p=this.getRotation(),A=Math.cos(-p),h=Math.sin(-p),f=1/0,_=1/0,g=-1/0,w=-1/0,x=n.getStride(),E=0,M=u.length;E.04045?Math.pow((e+.055)/1.055,2.4):e/12.92)+.3576*(n=n>.04045?Math.pow((n+.055)/1.055,2.4):n/12.92)+.1805*(r=r>.04045?Math.pow((r+.055)/1.055,2.4):r/12.92)),100*(.2126*e+.7152*n+.0722*r),100*(.0193*e+.1192*n+.9505*r)]},a.rgb.lab=function(t){var e=a.rgb.xyz(t),n=e[0],r=e[1],i=e[2];return r/=100,i/=108.883,n=(n/=95.047)>.008856?Math.pow(n,1/3):7.787*n+16/116,[116*(r=r>.008856?Math.pow(r,1/3):7.787*r+16/116)-16,500*(n-r),200*(r-(i=i>.008856?Math.pow(i,1/3):7.787*i+16/116))]},a.hsl.rgb=function(t){var e,n,r,i,o,a=t[0]/360,s=t[1]/100,l=t[2]/100;if(0===s)return[o=255*l,o,o];e=2*l-(n=l<.5?l*(1+s):l+s-l*s),i=[0,0,0];for(var c=0;c<3;c++)(r=a+1/3*-(c-1))<0&&r++,r>1&&r--,o=6*r<1?e+6*(n-e)*r:2*r<1?n:3*r<2?e+(n-e)*(2/3-r)*6:e,i[c]=255*o;return i},a.hsl.hsv=function(t){var e=t[0],n=t[1]/100,r=t[2]/100,i=n,o=Math.max(r,.01);return n*=(r*=2)<=1?r:2-r,i*=o<=1?o:2-o,[e,100*(0===r?2*i/(o+i):2*n/(r+n)),100*((r+n)/2)]},a.hsv.rgb=function(t){var e=t[0]/60,n=t[1]/100,r=t[2]/100,i=Math.floor(e)%6,o=e-Math.floor(e),a=255*r*(1-n),s=255*r*(1-n*o),l=255*r*(1-n*(1-o));switch(r*=255,i){case 0:return[r,l,a];case 1:return[s,r,a];case 2:return[a,r,l];case 3:return[a,s,r];case 4:return[l,a,r];case 5:return[r,a,s]}},a.hsv.hsl=function(t){var e,n,r,i=t[0],o=t[1]/100,a=t[2]/100,s=Math.max(a,.01);return r=(2-o)*a,n=o*s,[i,100*(n=(n/=(e=(2-o)*s)<=1?e:2-e)||0),100*(r/=2)]},a.hwb.rgb=function(t){var e,n,r,i,o,a,s,l=t[0]/360,c=t[1]/100,u=t[2]/100,p=c+u;switch(p>1&&(c/=p,u/=p),n=1-u,r=6*l-(e=Math.floor(6*l)),0!=(1&e)&&(r=1-r),i=c+r*(n-c),e){default:case 6:case 0:o=n,a=i,s=c;break;case 1:o=i,a=n,s=c;break;case 2:o=c,a=n,s=i;break;case 3:o=c,a=i,s=n;break;case 4:o=i,a=c,s=n;break;case 5:o=n,a=c,s=i}return[255*o,255*a,255*s]},a.cmyk.rgb=function(t){var e=t[0]/100,n=t[1]/100,r=t[2]/100,i=t[3]/100;return[255*(1-Math.min(1,e*(1-i)+i)),255*(1-Math.min(1,n*(1-i)+i)),255*(1-Math.min(1,r*(1-i)+i))]},a.xyz.rgb=function(t){var e,n,r,i=t[0]/100,o=t[1]/100,a=t[2]/100;return n=-.9689*i+1.8758*o+.0415*a,r=.0557*i+-.204*o+1.057*a,e=(e=3.2406*i+-1.5372*o+-.4986*a)>.0031308?1.055*Math.pow(e,1/2.4)-.055:12.92*e,n=n>.0031308?1.055*Math.pow(n,1/2.4)-.055:12.92*n,r=r>.0031308?1.055*Math.pow(r,1/2.4)-.055:12.92*r,[255*(e=Math.min(Math.max(0,e),1)),255*(n=Math.min(Math.max(0,n),1)),255*(r=Math.min(Math.max(0,r),1))]},a.xyz.lab=function(t){var e=t[0],n=t[1],r=t[2];return n/=100,r/=108.883,e=(e/=95.047)>.008856?Math.pow(e,1/3):7.787*e+16/116,[116*(n=n>.008856?Math.pow(n,1/3):7.787*n+16/116)-16,500*(e-n),200*(n-(r=r>.008856?Math.pow(r,1/3):7.787*r+16/116))]},a.lab.xyz=function(t){var e,n,r,i=t[0],o=t[1],a=t[2];e=o/500+(n=(i+16)/116),r=n-a/200;var s=Math.pow(n,3),l=Math.pow(e,3),c=Math.pow(r,3);return n=s>.008856?s:(n-16/116)/7.787,e=l>.008856?l:(e-16/116)/7.787,r=c>.008856?c:(r-16/116)/7.787,[e*=95.047,n*=100,r*=108.883]},a.lab.lch=function(t){var e,n=t[0],r=t[1],i=t[2];return(e=360*Math.atan2(i,r)/2/Math.PI)<0&&(e+=360),[n,Math.sqrt(r*r+i*i),e]},a.lch.lab=function(t){var e,n=t[0],r=t[1];return e=t[2]/360*2*Math.PI,[n,r*Math.cos(e),r*Math.sin(e)]},a.rgb.ansi16=function(t){var e=t[0],n=t[1],r=t[2],i=1 in arguments?arguments[1]:a.rgb.hsv(t)[2];if(0===(i=Math.round(i/50)))return 30;var o=30+(Math.round(r/255)<<2|Math.round(n/255)<<1|Math.round(e/255));return 2===i&&(o+=60),o},a.hsv.ansi16=function(t){return a.rgb.ansi16(a.hsv.rgb(t),t[2])},a.rgb.ansi256=function(t){var e=t[0],n=t[1],r=t[2];return e===n&&n===r?e<8?16:e>248?231:Math.round((e-8)/247*24)+232:16+36*Math.round(e/255*5)+6*Math.round(n/255*5)+Math.round(r/255*5)},a.ansi16.rgb=function(t){var e=t%10;if(0===e||7===e)return t>50&&(e+=3.5),[e=e/10.5*255,e,e];var n=.5*(1+~~(t>50));return[(1&e)*n*255,(e>>1&1)*n*255,(e>>2&1)*n*255]},a.ansi256.rgb=function(t){if(t>=232){var e=10*(t-232)+8;return[e,e,e]}var n;return t-=16,[Math.floor(t/36)/5*255,Math.floor((n=t%36)/6)/5*255,n%6/5*255]},a.rgb.hex=function(t){var e=(((255&Math.round(t[0]))<<16)+((255&Math.round(t[1]))<<8)+(255&Math.round(t[2]))).toString(16).toUpperCase();return"000000".substring(e.length)+e},a.hex.rgb=function(t){var e=t.toString(16).match(/[a-f0-9]{6}|[a-f0-9]{3}/i);if(!e)return[0,0,0];var n=e[0];3===e[0].length&&(n=n.split("").map(function(t){return t+t}).join(""));var r=parseInt(n,16);return[r>>16&255,r>>8&255,255&r]},a.rgb.hcg=function(t){var e,n,r=t[0]/255,i=t[1]/255,o=t[2]/255,a=Math.max(Math.max(r,i),o),s=Math.min(Math.min(r,i),o),l=a-s;return e=l<1?s/(1-l):0,n=l<=0?0:a===r?(i-o)/l%6:a===i?2+(o-r)/l:4+(r-i)/l+4,n/=6,[360*(n%=1),100*l,100*e]},a.hsl.hcg=function(t){var e=t[1]/100,n=t[2]/100,r=1,i=0;return(r=n<.5?2*e*n:2*e*(1-n))<1&&(i=(n-.5*r)/(1-r)),[t[0],100*r,100*i]},a.hsv.hcg=function(t){var e=t[1]/100,n=t[2]/100,r=e*n,i=0;return r<1&&(i=(n-r)/(1-r)),[t[0],100*r,100*i]},a.hcg.rgb=function(t){var e=t[0]/360,n=t[1]/100,r=t[2]/100;if(0===n)return[255*r,255*r,255*r];var i,o=[0,0,0],a=e%1*6,s=a%1,l=1-s;switch(Math.floor(a)){case 0:o[0]=1,o[1]=s,o[2]=0;break;case 1:o[0]=l,o[1]=1,o[2]=0;break;case 2:o[0]=0,o[1]=1,o[2]=s;break;case 3:o[0]=0,o[1]=l,o[2]=1;break;case 4:o[0]=s,o[1]=0,o[2]=1;break;default:o[0]=1,o[1]=0,o[2]=l}return i=(1-n)*r,[255*(n*o[0]+i),255*(n*o[1]+i),255*(n*o[2]+i)]},a.hcg.hsv=function(t){var e=t[1]/100,n=e+t[2]/100*(1-e),r=0;return n>0&&(r=e/n),[t[0],100*r,100*n]},a.hcg.hsl=function(t){var e=t[1]/100,n=t[2]/100*(1-e)+.5*e,r=0;return n>0&&n<.5?r=e/(2*n):n>=.5&&n<1&&(r=e/(2*(1-n))),[t[0],100*r,100*n]},a.hcg.hwb=function(t){var e=t[1]/100,n=e+t[2]/100*(1-e);return[t[0],100*(n-e),100*(1-n)]},a.hwb.hcg=function(t){var e=t[1]/100,n=1-t[2]/100,r=n-e,i=0;return r<1&&(i=(n-r)/(1-r)),[t[0],100*r,100*i]},a.apple.rgb=function(t){return[t[0]/65535*255,t[1]/65535*255,t[2]/65535*255]},a.rgb.apple=function(t){return[t[0]/255*65535,t[1]/255*65535,t[2]/255*65535]},a.gray.rgb=function(t){return[t[0]/100*255,t[0]/100*255,t[0]/100*255]},a.gray.hsl=a.gray.hsv=function(t){return[0,0,t[0]]},a.gray.hwb=function(t){return[0,100,t[0]]},a.gray.cmyk=function(t){return[0,0,0,t[0]]},a.gray.lab=function(t){return[t[0],0,0]},a.gray.hex=function(t){var e=255&Math.round(t[0]/100*255),n=((e<<16)+(e<<8)+e).toString(16).toUpperCase();return"000000".substring(n.length)+n},a.rgb.gray=function(t){return[(t[0]+t[1]+t[2])/3/255*100]}},function(t,e,n){"use strict";(function(t){ +/*! + * The buffer module from node.js, for the browser. + * + * @author Feross Aboukhadijeh + * @license MIT + */ +var r=n(345),i=n(186),o=n(346);function a(){return l.TYPED_ARRAY_SUPPORT?2147483647:1073741823}function s(t,e){if(a()=a())throw new RangeError("Attempt to allocate Buffer larger than maximum size: 0x"+a().toString(16)+" bytes");return 0|t}function f(t,e){if(l.isBuffer(t))return t.length;if("undefined"!=typeof ArrayBuffer&&"function"==typeof ArrayBuffer.isView&&(ArrayBuffer.isView(t)||t instanceof ArrayBuffer))return t.byteLength;"string"!=typeof t&&(t=""+t);var n=t.length;if(0===n)return 0;for(var r=!1;;)switch(e){case"ascii":case"latin1":case"binary":return n;case"utf8":case"utf-8":case void 0:return F(t).length;case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return 2*n;case"hex":return n>>>1;case"base64":return Q(t).length;default:if(r)return F(t).length;e=(""+e).toLowerCase(),r=!0}}function d(t,e,n){var r=t[e];t[e]=t[n],t[n]=r}function _(t,e,n,r,i){if(0===t.length)return-1;if("string"==typeof n?(r=n,n=0):n>2147483647?n=2147483647:n<-2147483648&&(n=-2147483648),n=+n,isNaN(n)&&(n=i?0:t.length-1),n<0&&(n=t.length+n),n>=t.length){if(i)return-1;n=t.length-1}else if(n<0){if(!i)return-1;n=0}if("string"==typeof e&&(e=l.from(e,r)),l.isBuffer(e))return 0===e.length?-1:g(t,e,n,r,i);if("number"==typeof e)return e&=255,l.TYPED_ARRAY_SUPPORT&&"function"==typeof Uint8Array.prototype.indexOf?i?Uint8Array.prototype.indexOf.call(t,e,n):Uint8Array.prototype.lastIndexOf.call(t,e,n):g(t,[e],n,r,i);throw new TypeError("val must be string, number or Buffer")}function g(t,e,n,r,i){var o,a=1,s=t.length,l=e.length;if(void 0!==r&&("ucs2"===(r=String(r).toLowerCase())||"ucs-2"===r||"utf16le"===r||"utf-16le"===r)){if(t.length<2||e.length<2)return-1;a=2,s/=2,l/=2,n/=2}function c(t,e){return 1===a?t[e]:t.readUInt16BE(e*a)}if(i){var u=-1;for(o=n;os&&(n=s-l),o=n;o>=0;o--){for(var p=!0,A=0;Ai&&(r=i):r=i;var o=e.length;if(o%2!=0)throw new TypeError("Invalid hex string");r>o/2&&(r=o/2);for(var a=0;a>8,i=n%256,o.push(i),o.push(r);return o}(e,t.length-n),t,n,r)}function E(t,e,n){return 0===e&&n===t.length?r.fromByteArray(t):r.fromByteArray(t.slice(e,n))}function M(t,e,n){n=Math.min(t.length,n);for(var r=[],i=e;i239?4:c>223?3:c>191?2:1;if(i+p<=n)switch(p){case 1:c<128&&(u=c);break;case 2:128==(192&(o=t[i+1]))&&(l=(31&c)<<6|63&o)>127&&(u=l);break;case 3:o=t[i+1],a=t[i+2],128==(192&o)&&128==(192&a)&&(l=(15&c)<<12|(63&o)<<6|63&a)>2047&&(l<55296||l>57343)&&(u=l);break;case 4:o=t[i+1],a=t[i+2],s=t[i+3],128==(192&o)&&128==(192&a)&&128==(192&s)&&(l=(15&c)<<18|(63&o)<<12|(63&a)<<6|63&s)>65535&&l<1114112&&(u=l)}null===u?(u=65533,p=1):u>65535&&(u-=65536,r.push(u>>>10&1023|55296),u=56320|1023&u),r.push(u),i+=p}return function(t){var e=t.length;if(e<=C)return String.fromCharCode.apply(String,t);var n="",r=0;for(;rthis.length)return"";if((void 0===n||n>this.length)&&(n=this.length),n<=0)return"";if((n>>>=0)<=(e>>>=0))return"";for(t||(t="utf8");;)switch(t){case"hex":return k(this,e,n);case"utf8":case"utf-8":return M(this,e,n);case"ascii":return B(this,e,n);case"latin1":case"binary":return O(this,e,n);case"base64":return E(this,e,n);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return P(this,e,n);default:if(r)throw new TypeError("Unknown encoding: "+t);t=(t+"").toLowerCase(),r=!0}}.apply(this,arguments)},l.prototype.equals=function(t){if(!l.isBuffer(t))throw new TypeError("Argument must be a Buffer");return this===t||0===l.compare(this,t)},l.prototype.inspect=function(){var t="",n=e.INSPECT_MAX_BYTES;return this.length>0&&(t=this.toString("hex",0,n).match(/.{2}/g).join(" "),this.length>n&&(t+=" ... ")),""},l.prototype.compare=function(t,e,n,r,i){if(!l.isBuffer(t))throw new TypeError("Argument must be a Buffer");if(void 0===e&&(e=0),void 0===n&&(n=t?t.length:0),void 0===r&&(r=0),void 0===i&&(i=this.length),e<0||n>t.length||r<0||i>this.length)throw new RangeError("out of range index");if(r>=i&&e>=n)return 0;if(r>=i)return-1;if(e>=n)return 1;if(e>>>=0,n>>>=0,r>>>=0,i>>>=0,this===t)return 0;for(var o=i-r,a=n-e,s=Math.min(o,a),c=this.slice(r,i),u=t.slice(e,n),p=0;pi)&&(n=i),t.length>0&&(n<0||e<0)||e>this.length)throw new RangeError("Attempt to write outside buffer bounds");r||(r="utf8");for(var o=!1;;)switch(r){case"hex":return y(this,t,e,n);case"utf8":case"utf-8":return m(this,t,e,n);case"ascii":return v(this,t,e,n);case"latin1":case"binary":return b(this,t,e,n);case"base64":return w(this,t,e,n);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return x(this,t,e,n);default:if(o)throw new TypeError("Unknown encoding: "+r);r=(""+r).toLowerCase(),o=!0}},l.prototype.toJSON=function(){return{type:"Buffer",data:Array.prototype.slice.call(this._arr||this,0)}};var C=4096;function B(t,e,n){var r="";n=Math.min(t.length,n);for(var i=e;ir)&&(n=r);for(var i="",o=e;on)throw new RangeError("Trying to access beyond buffer length")}function T(t,e,n,r,i,o){if(!l.isBuffer(t))throw new TypeError('"buffer" argument must be a Buffer instance');if(e>i||et.length)throw new RangeError("Index out of range")}function D(t,e,n,r){e<0&&(e=65535+e+1);for(var i=0,o=Math.min(t.length-n,2);i>>8*(r?i:1-i)}function L(t,e,n,r){e<0&&(e=4294967295+e+1);for(var i=0,o=Math.min(t.length-n,4);i>>8*(r?i:3-i)&255}function S(t,e,n,r,i,o){if(n+r>t.length)throw new RangeError("Index out of range");if(n<0)throw new RangeError("Index out of range")}function z(t,e,n,r,o){return o||S(t,0,n,4),i.write(t,e,n,r,23,4),n+4}function R(t,e,n,r,o){return o||S(t,0,n,8),i.write(t,e,n,r,52,8),n+8}l.prototype.slice=function(t,e){var n,r=this.length;if(t=~~t,e=void 0===e?r:~~e,t<0?(t+=r)<0&&(t=0):t>r&&(t=r),e<0?(e+=r)<0&&(e=0):e>r&&(e=r),e0&&(i*=256);)r+=this[t+--e]*i;return r},l.prototype.readUInt8=function(t,e){return e||I(t,1,this.length),this[t]},l.prototype.readUInt16LE=function(t,e){return e||I(t,2,this.length),this[t]|this[t+1]<<8},l.prototype.readUInt16BE=function(t,e){return e||I(t,2,this.length),this[t]<<8|this[t+1]},l.prototype.readUInt32LE=function(t,e){return e||I(t,4,this.length),(this[t]|this[t+1]<<8|this[t+2]<<16)+16777216*this[t+3]},l.prototype.readUInt32BE=function(t,e){return e||I(t,4,this.length),16777216*this[t]+(this[t+1]<<16|this[t+2]<<8|this[t+3])},l.prototype.readIntLE=function(t,e,n){t|=0,e|=0,n||I(t,e,this.length);for(var r=this[t],i=1,o=0;++o=(i*=128)&&(r-=Math.pow(2,8*e)),r},l.prototype.readIntBE=function(t,e,n){t|=0,e|=0,n||I(t,e,this.length);for(var r=e,i=1,o=this[t+--r];r>0&&(i*=256);)o+=this[t+--r]*i;return o>=(i*=128)&&(o-=Math.pow(2,8*e)),o},l.prototype.readInt8=function(t,e){return e||I(t,1,this.length),128&this[t]?-1*(255-this[t]+1):this[t]},l.prototype.readInt16LE=function(t,e){e||I(t,2,this.length);var n=this[t]|this[t+1]<<8;return 32768&n?4294901760|n:n},l.prototype.readInt16BE=function(t,e){e||I(t,2,this.length);var n=this[t+1]|this[t]<<8;return 32768&n?4294901760|n:n},l.prototype.readInt32LE=function(t,e){return e||I(t,4,this.length),this[t]|this[t+1]<<8|this[t+2]<<16|this[t+3]<<24},l.prototype.readInt32BE=function(t,e){return e||I(t,4,this.length),this[t]<<24|this[t+1]<<16|this[t+2]<<8|this[t+3]},l.prototype.readFloatLE=function(t,e){return e||I(t,4,this.length),i.read(this,t,!0,23,4)},l.prototype.readFloatBE=function(t,e){return e||I(t,4,this.length),i.read(this,t,!1,23,4)},l.prototype.readDoubleLE=function(t,e){return e||I(t,8,this.length),i.read(this,t,!0,52,8)},l.prototype.readDoubleBE=function(t,e){return e||I(t,8,this.length),i.read(this,t,!1,52,8)},l.prototype.writeUIntLE=function(t,e,n,r){(t=+t,e|=0,n|=0,r)||T(this,t,e,n,Math.pow(2,8*n)-1,0);var i=1,o=0;for(this[e]=255&t;++o=0&&(o*=256);)this[e+i]=t/o&255;return e+n},l.prototype.writeUInt8=function(t,e,n){return t=+t,e|=0,n||T(this,t,e,1,255,0),l.TYPED_ARRAY_SUPPORT||(t=Math.floor(t)),this[e]=255&t,e+1},l.prototype.writeUInt16LE=function(t,e,n){return t=+t,e|=0,n||T(this,t,e,2,65535,0),l.TYPED_ARRAY_SUPPORT?(this[e]=255&t,this[e+1]=t>>>8):D(this,t,e,!0),e+2},l.prototype.writeUInt16BE=function(t,e,n){return t=+t,e|=0,n||T(this,t,e,2,65535,0),l.TYPED_ARRAY_SUPPORT?(this[e]=t>>>8,this[e+1]=255&t):D(this,t,e,!1),e+2},l.prototype.writeUInt32LE=function(t,e,n){return t=+t,e|=0,n||T(this,t,e,4,4294967295,0),l.TYPED_ARRAY_SUPPORT?(this[e+3]=t>>>24,this[e+2]=t>>>16,this[e+1]=t>>>8,this[e]=255&t):L(this,t,e,!0),e+4},l.prototype.writeUInt32BE=function(t,e,n){return t=+t,e|=0,n||T(this,t,e,4,4294967295,0),l.TYPED_ARRAY_SUPPORT?(this[e]=t>>>24,this[e+1]=t>>>16,this[e+2]=t>>>8,this[e+3]=255&t):L(this,t,e,!1),e+4},l.prototype.writeIntLE=function(t,e,n,r){if(t=+t,e|=0,!r){var i=Math.pow(2,8*n-1);T(this,t,e,n,i-1,-i)}var o=0,a=1,s=0;for(this[e]=255&t;++o>0)-s&255;return e+n},l.prototype.writeIntBE=function(t,e,n,r){if(t=+t,e|=0,!r){var i=Math.pow(2,8*n-1);T(this,t,e,n,i-1,-i)}var o=n-1,a=1,s=0;for(this[e+o]=255&t;--o>=0&&(a*=256);)t<0&&0===s&&0!==this[e+o+1]&&(s=1),this[e+o]=(t/a>>0)-s&255;return e+n},l.prototype.writeInt8=function(t,e,n){return t=+t,e|=0,n||T(this,t,e,1,127,-128),l.TYPED_ARRAY_SUPPORT||(t=Math.floor(t)),t<0&&(t=255+t+1),this[e]=255&t,e+1},l.prototype.writeInt16LE=function(t,e,n){return t=+t,e|=0,n||T(this,t,e,2,32767,-32768),l.TYPED_ARRAY_SUPPORT?(this[e]=255&t,this[e+1]=t>>>8):D(this,t,e,!0),e+2},l.prototype.writeInt16BE=function(t,e,n){return t=+t,e|=0,n||T(this,t,e,2,32767,-32768),l.TYPED_ARRAY_SUPPORT?(this[e]=t>>>8,this[e+1]=255&t):D(this,t,e,!1),e+2},l.prototype.writeInt32LE=function(t,e,n){return t=+t,e|=0,n||T(this,t,e,4,2147483647,-2147483648),l.TYPED_ARRAY_SUPPORT?(this[e]=255&t,this[e+1]=t>>>8,this[e+2]=t>>>16,this[e+3]=t>>>24):L(this,t,e,!0),e+4},l.prototype.writeInt32BE=function(t,e,n){return t=+t,e|=0,n||T(this,t,e,4,2147483647,-2147483648),t<0&&(t=4294967295+t+1),l.TYPED_ARRAY_SUPPORT?(this[e]=t>>>24,this[e+1]=t>>>16,this[e+2]=t>>>8,this[e+3]=255&t):L(this,t,e,!1),e+4},l.prototype.writeFloatLE=function(t,e,n){return z(this,t,e,!0,n)},l.prototype.writeFloatBE=function(t,e,n){return z(this,t,e,!1,n)},l.prototype.writeDoubleLE=function(t,e,n){return R(this,t,e,!0,n)},l.prototype.writeDoubleBE=function(t,e,n){return R(this,t,e,!1,n)},l.prototype.copy=function(t,e,n,r){if(n||(n=0),r||0===r||(r=this.length),e>=t.length&&(e=t.length),e||(e=0),r>0&&r=this.length)throw new RangeError("sourceStart out of bounds");if(r<0)throw new RangeError("sourceEnd out of bounds");r>this.length&&(r=this.length),t.length-e=0;--i)t[i+e]=this[i+n];else if(o<1e3||!l.TYPED_ARRAY_SUPPORT)for(i=0;i>>=0,n=void 0===n?this.length:n>>>0,t||(t=0),"number"==typeof t)for(o=e;o55295&&n<57344){if(!i){if(n>56319){(e-=3)>-1&&o.push(239,191,189);continue}if(a+1===r){(e-=3)>-1&&o.push(239,191,189);continue}i=n;continue}if(n<56320){(e-=3)>-1&&o.push(239,191,189),i=n;continue}n=65536+(i-55296<<10|n-56320)}else i&&(e-=3)>-1&&o.push(239,191,189);if(i=null,n<128){if((e-=1)<0)break;o.push(n)}else if(n<2048){if((e-=2)<0)break;o.push(n>>6|192,63&n|128)}else if(n<65536){if((e-=3)<0)break;o.push(n>>12|224,n>>6&63|128,63&n|128)}else{if(!(n<1114112))throw new Error("Invalid code point");if((e-=4)<0)break;o.push(n>>18|240,n>>12&63|128,n>>6&63|128,63&n|128)}}return o}function Q(t){return r.toByteArray(function(t){if((t=function(t){return t.trim?t.trim():t.replace(/^\s+|\s+$/g,"")}(t).replace(j,"")).length<2)return"";for(;t.length%4!=0;)t+="=";return t}(t))}function K(t,e,n,r){for(var i=0;i=e.length||i>=t.length);++i)e[i+n]=t[i];return i}}).call(this,n(26))},function(t,e){e.read=function(t,e,n,r,i){var o,a,s=8*i-r-1,l=(1<>1,u=-7,p=n?i-1:0,A=n?-1:1,h=t[e+p];for(p+=A,o=h&(1<<-u)-1,h>>=-u,u+=s;u>0;o=256*o+t[e+p],p+=A,u-=8);for(a=o&(1<<-u)-1,o>>=-u,u+=r;u>0;a=256*a+t[e+p],p+=A,u-=8);if(0===o)o=1-c;else{if(o===l)return a?NaN:1/0*(h?-1:1);a+=Math.pow(2,r),o-=c}return(h?-1:1)*a*Math.pow(2,o-r)},e.write=function(t,e,n,r,i,o){var a,s,l,c=8*o-i-1,u=(1<>1,A=23===i?Math.pow(2,-24)-Math.pow(2,-77):0,h=r?0:o-1,f=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=u):(a=Math.floor(Math.log(e)/Math.LN2),e*(l=Math.pow(2,-a))<1&&(a--,l*=2),(e+=a+p>=1?A/l:A*Math.pow(2,1-p))*l>=2&&(a++,l/=2),a+p>=u?(s=0,a=u):a+p>=1?(s=(e*l-1)*Math.pow(2,i),a+=p):(s=e*Math.pow(2,p-1)*Math.pow(2,i),a=0));i>=8;t[n+h]=255&s,h+=f,s/=256,i-=8);for(a=a<0;t[n+h]=255&a,h+=f,a/=256,c-=8);t[n+h-f]|=128*d}},function(t,e,n){"use strict";var r=this&&this.__assign||Object.assign||function(t){for(var e,n=1,r=arguments.length;n2&&b.push("'"+this.terminals_[y]+"'");var x="";x=this.lexer.showPosition?"Parse error on line "+(s+1)+":\n"+this.lexer.showPosition()+"\nExpecting "+b.join(", ")+", got '"+this.terminals_[h]+"'":"Parse error on line "+(s+1)+": Unexpected "+(1==h?"end of input":"'"+(this.terminals_[h]||h)+"'"),this.parseError(x,{text:this.lexer.match,token:this.terminals_[h]||h,line:this.lexer.yylineno,loc:u,expected:b})}if(3==c){if(1==h)throw new Error(x||"Parsing halted.");l=this.lexer.yyleng,a=this.lexer.yytext,s=this.lexer.yylineno,u=this.lexer.yylloc,h=A()}for(;!(2..toString()in o[d]);){if(0==d)throw new Error(x||"Parsing halted.");p(1),d=n[n.length-1]}f=h,h=2,_=o[d=n[n.length-1]]&&o[d][2],c=3}if(_[0]instanceof Array&&_.length>1)throw new Error("Parse Error: multiple actions possible at state: "+d+", token: "+h);switch(_[0]){case 1:n.push(h),r.push(this.lexer.yytext),i.push(this.lexer.yylloc),n.push(_[1]),h=null,f?(h=f,f=null):(l=this.lexer.yyleng,a=this.lexer.yytext,s=this.lexer.yylineno,u=this.lexer.yylloc,c>0&&c--);break;case 2:if(m=this.productions_[_[1]][1],w.$=r[r.length-m],w._$={first_line:i[i.length-(m||1)].first_line,last_line:i[i.length-1].last_line,first_column:i[i.length-(m||1)].first_column,last_column:i[i.length-1].last_column},void 0!==(g=this.performAction.call(w,a,l,s,this.yy,_[1],r,i)))return g;m&&(n=n.slice(0,-1*m*2),r=r.slice(0,-1*m),i=i.slice(0,-1*m)),n.push(this.productions_[_[1]][0]),r.push(w.$),i.push(w._$),v=o[n[n.length-2]][n[n.length-1]],n.push(v);break;case 3:return!0}}return!0}},e=function(){var t={EOF:1,parseError:function(t,e){if(!this.yy.parseError)throw new Error(t);this.yy.parseError(t,e)},setInput:function(t){return this._input=t,this._more=this._less=this.done=!1,this.yylineno=this.yyleng=0,this.yytext=this.matched=this.match="",this.conditionStack=["INITIAL"],this.yylloc={first_line:1,first_column:0,last_line:1,last_column:0},this},input:function(){var t=this._input[0];return this.yytext+=t,this.yyleng++,this.match+=t,this.matched+=t,t.match(/\n/)&&this.yylineno++,this._input=this._input.slice(1),t},unput:function(t){return this._input=t+this._input,this},more:function(){return this._more=!0,this},less:function(t){this._input=this.match.slice(t)+this._input},pastInput:function(){var t=this.matched.substr(0,this.matched.length-this.match.length);return(t.length>20?"...":"")+t.substr(-20).replace(/\n/g,"")},upcomingInput:function(){var t=this.match;return t.length<20&&(t+=this._input.substr(0,20-t.length)),(t.substr(0,20)+(t.length>20?"...":"")).replace(/\n/g,"")},showPosition:function(){var t=this.pastInput(),e=new Array(t.length+1).join("-");return t+this.upcomingInput()+"\n"+e+"^"},next:function(){if(this.done)return this.EOF;var t,e,n,r,i;this._input||(this.done=!0),this._more||(this.yytext="",this.match="");for(var o=this._currentRules(),a=0;ae[0].length)||(e=n,r=a,this.options.flex));a++);return e?((i=e[0].match(/\n.*/g))&&(this.yylineno+=i.length),this.yylloc={first_line:this.yylloc.last_line,last_line:this.yylineno+1,first_column:this.yylloc.last_column,last_column:i?i[i.length-1].length-1:this.yylloc.last_column+e[0].length},this.yytext+=e[0],this.match+=e[0],this.yyleng=this.yytext.length,this._more=!1,this._input=this._input.slice(e[0].length),this.matched+=e[0],t=this.performAction.call(this,this.yy,this,o[r],this.conditionStack[this.conditionStack.length-1]),this.done&&this._input&&(this.done=!1),t||void 0):""===this._input?this.EOF:void this.parseError("Lexical error on line "+(this.yylineno+1)+". Unrecognized text.\n"+this.showPosition(),{text:"",token:null,line:this.yylineno})},lex:function(){var t=this.next();return void 0!==t?t:this.lex()},begin:function(t){this.conditionStack.push(t)},popState:function(){return this.conditionStack.pop()},_currentRules:function(){return this.conditions[this.conditionStack[this.conditionStack.length-1]].rules},topState:function(){return this.conditionStack[this.conditionStack.length-2]},pushState:function(t){this.begin(t)},options:{},performAction:function(t,e,n,r){switch(n){case 0:break;case 1:return 6;case 2:return e.yytext=e.yytext.substr(1,e.yyleng-2),4;case 3:return 17;case 4:return 18;case 5:return 23;case 6:return 24;case 7:return 22;case 8:return 21;case 9:return 10;case 10:return 11;case 11:return 8;case 12:return 14;case 13:return"INVALID"}},rules:[/^(?:\s+)/,/^(?:(-?([0-9]|[1-9][0-9]+))(\.[0-9]+)?([eE][-+]?[0-9]+)?\b)/,/^(?:"(?:\\[\\"bfnrt/]|\\u[a-fA-F0-9]{4}|[^\\\0-\x09\x0a-\x1f"])*")/,/^(?:\{)/,/^(?:\})/,/^(?:\[)/,/^(?:\])/,/^(?:,)/,/^(?::)/,/^(?:true\b)/,/^(?:false\b)/,/^(?:null\b)/,/^(?:$)/,/^(?:.)/],conditions:{INITIAL:{rules:[0,1,2,3,4,5,6,7,8,9,10,11,12,13],inclusive:!0}}};return t}();return t.lexer=e,t}();e.parser=r,e.parse=r.parse.bind(r)},function(t,e,n){(function(e){var n="object"==typeof e&&e&&e.Object===Object&&e;t.exports=n}).call(this,n(26))},function(t,e,n){var r=n(381),i=n(104);t.exports=function(t,e){return t&&r(t,e,i)}},function(t,e,n){var r=n(383),i=n(194),o=n(58),a=n(150),s=n(195),l=n(196),c=Object.prototype.hasOwnProperty;t.exports=function(t,e){var n=o(t),u=!n&&i(t),p=!n&&!u&&a(t),A=!n&&!u&&!p&&l(t),h=n||u||p||A,f=h?r(t.length,String):[],d=f.length;for(var _ in t)!e&&!c.call(t,_)||h&&("length"==_||p&&("offset"==_||"parent"==_)||A&&("buffer"==_||"byteLength"==_||"byteOffset"==_)||s(_,d))||f.push(_);return f}},function(t,e,n){var r=n(384),i=n(74),o=Object.prototype,a=o.hasOwnProperty,s=o.propertyIsEnumerable,l=r(function(){return arguments}())?r:function(t){return i(t)&&a.call(t,"callee")&&!s.call(t,"callee")};t.exports=l},function(t,e){var n=9007199254740991,r=/^(?:0|[1-9]\d*)$/;t.exports=function(t,e){var i=typeof t;return!!(e=null==e?n:e)&&("number"==i||"symbol"!=i&&r.test(t))&&t>-1&&t%1==0&&tA))return!1;var f=u.get(t);if(f&&u.get(e))return f==e;var d=-1,_=!0,g=n&s?new r:void 0;for(u.set(t,e),u.set(e,t);++d=e||n<0||g&&t-d>=p}function b(){var t=i();if(v(t))return w(t);h=setTimeout(b,function(t){var n=e-(t-f);return g?l(n,p-(t-d)):n}(t))}function w(t){return h=void 0,y&&c?m(t):(c=u=void 0,A)}function x(){var t=i(),n=v(t);if(c=arguments,u=this,f=t,n){if(void 0===h)return function(t){return d=t,h=setTimeout(b,e),_?m(t):A}(f);if(g)return h=setTimeout(b,e),m(f)}return void 0===h&&(h=setTimeout(b,e)),A}return e=o(e)||0,r(n)&&(_=!!n.leading,p=(g="maxWait"in n)?s(o(n.maxWait)||0,e):p,y="trailing"in n?!!n.trailing:y),x.cancel=function(){void 0!==h&&clearTimeout(h),d=0,c=f=u=h=void 0},x.flush=function(){return void 0===h?A:w(i())},x}},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.red=void 0;var r=o(n(493)),i=o(n(495));function o(t){return t&&t.__esModule?t:{default:t}}e.default={simpleCheckForValidColor:function(t){var e=0,n=0;return(0,r.default)(["r","g","b","a","h","s","l","v"],function(r){if(t[r]&&(e+=1,isNaN(t[r])||(n+=1),"s"===r||"l"===r)){/^\d+%$/.test(t[r])&&(n+=1)}}),e===n&&t},toState:function(t,e){var n=t.hex?(0,i.default)(t.hex):(0,i.default)(t),r=n.toHsl(),o=n.toHsv(),a=n.toRgb(),s=n.toHex();return 0===r.s&&(r.h=e||0,o.h=e||0),{hsl:r,hex:"000000"===s&&0===a.a?"transparent":"#"+s,rgb:a,hsv:o,oldHue:t.h||e||r.h,source:t.source}},isValidHex:function(t){var e="#"===String(t).charAt(0)?1:0;return t.length!==4+e&&t.length<7+e&&(0,i.default)(t).isValid()},getContrastingColor:function(t){if(!t)return"#fff";var e=this.toState(t);return"transparent"===e.hex?"rgba(0,0,0,0.4)":(299*e.rgb.r+587*e.rgb.g+114*e.rgb.b)/1e3>=128?"#000":"#fff"}};e.red={hsl:{a:1,h:0,l:.5,s:1},hex:"#ff0000",rgb:{r:255,g:0,b:0,a:1},hsv:{h:0,s:1,v:1,a:1}}},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.Collapse=void 0;var r=Object.assign||function(t){for(var e=1;e-1?e:t.content.clientHeight},this.getWrapperStyle=function(e){if(t.state.currentState===c&&t.state.to){var n=t.props.fixedHeight;return n>-1?{overflow:"hidden",height:n}:{height:"auto"}}return"WAITING"!==t.state.currentState||t.state.to?{overflow:"hidden",height:Math.max(0,e)}:{overflow:"hidden",height:0}},this.getMotionProps=function(){var e=t.props.springConfig;return t.state.currentState===c?{defaultStyle:{height:t.state.to},style:{height:t.state.to}}:{defaultStyle:{height:t.state.from},style:{height:(0,s.spring)(t.state.to,r({precision:1},e))}}},this.renderContent=function(e){var n=e.height,i=t.props,a=(i.isOpened,i.springConfig,i.forceInitialAnimation,i.hasNestedCollapse,i.fixedHeight,i.theme),s=i.style,l=i.onRender,c=(i.onRest,i.onMeasure,i.children),u=function(t,e){var n={};for(var r in t)e.indexOf(r)>=0||Object.prototype.hasOwnProperty.call(t,r)&&(n[r]=t[r]);return n}(i,["isOpened","springConfig","forceInitialAnimation","hasNestedCollapse","fixedHeight","theme","style","onRender","onRest","onMeasure","children"]),p=t.state;return l({current:n,from:p.from,to:p.to}),o.default.createElement("div",r({ref:t.onWrapperRef,className:a.collapse,style:r({},t.getWrapperStyle(Math.max(0,n)),s)},u),o.default.createElement("div",{ref:t.onContentRef,className:a.content},c))}}},function(t,e,n){"use strict";e.__esModule=!0,e.default={noWobble:{stiffness:170,damping:26},gentle:{stiffness:120,damping:14},wobbly:{stiffness:180,damping:12},stiff:{stiffness:210,damping:20}},t.exports=e.default},function(module,__webpack_exports__,__webpack_require__){"use strict";(function(module){__webpack_require__.d(__webpack_exports__,"a",function(){return App});var react_autobind__WEBPACK_IMPORTED_MODULE_0__=__webpack_require__(226),react_autobind__WEBPACK_IMPORTED_MODULE_0___default=__webpack_require__.n(react_autobind__WEBPACK_IMPORTED_MODULE_0__),react__WEBPACK_IMPORTED_MODULE_1__=__webpack_require__(0),react__WEBPACK_IMPORTED_MODULE_1___default=__webpack_require__.n(react__WEBPACK_IMPORTED_MODULE_1__),lodash_clonedeep__WEBPACK_IMPORTED_MODULE_2__=__webpack_require__(227),lodash_clonedeep__WEBPACK_IMPORTED_MODULE_2___default=__webpack_require__.n(lodash_clonedeep__WEBPACK_IMPORTED_MODULE_2__),lodash_clamp__WEBPACK_IMPORTED_MODULE_3__=__webpack_require__(170),lodash_clamp__WEBPACK_IMPORTED_MODULE_3___default=__webpack_require__.n(lodash_clamp__WEBPACK_IMPORTED_MODULE_3__),react_sortable_hoc__WEBPACK_IMPORTED_MODULE_4__=__webpack_require__(88),react_sortable_hoc__WEBPACK_IMPORTED_MODULE_4___default=__webpack_require__.n(react_sortable_hoc__WEBPACK_IMPORTED_MODULE_4__),url__WEBPACK_IMPORTED_MODULE_5__=__webpack_require__(80),url__WEBPACK_IMPORTED_MODULE_5___default=__webpack_require__.n(url__WEBPACK_IMPORTED_MODULE_5__),_map_MapboxGlMap__WEBPACK_IMPORTED_MODULE_6__=__webpack_require__(228),_map_OpenLayersMap__WEBPACK_IMPORTED_MODULE_7__=__webpack_require__(237),_layers_LayerList__WEBPACK_IMPORTED_MODULE_8__=__webpack_require__(241),_layers_LayerEditor__WEBPACK_IMPORTED_MODULE_9__=__webpack_require__(247),_Toolbar__WEBPACK_IMPORTED_MODULE_10__=__webpack_require__(275),_AppLayout__WEBPACK_IMPORTED_MODULE_11__=__webpack_require__(276),_MessagePanel__WEBPACK_IMPORTED_MODULE_12__=__webpack_require__(277),_modals_SettingsModal__WEBPACK_IMPORTED_MODULE_13__=__webpack_require__(278),_modals_ExportModal__WEBPACK_IMPORTED_MODULE_14__=__webpack_require__(279),_modals_SourcesModal__WEBPACK_IMPORTED_MODULE_15__=__webpack_require__(282),_modals_OpenModal__WEBPACK_IMPORTED_MODULE_16__=__webpack_require__(283),_modals_ShortcutsModal__WEBPACK_IMPORTED_MODULE_17__=__webpack_require__(286),_modals_SurveyModal__WEBPACK_IMPORTED_MODULE_18__=__webpack_require__(287),_libs_metadata__WEBPACK_IMPORTED_MODULE_19__=__webpack_require__(178),_mapbox_mapbox_gl_style_spec__WEBPACK_IMPORTED_MODULE_20__=__webpack_require__(17),_mapbox_mapbox_gl_style_spec__WEBPACK_IMPORTED_MODULE_20___default=__webpack_require__.n(_mapbox_mapbox_gl_style_spec__WEBPACK_IMPORTED_MODULE_20__),_libs_style__WEBPACK_IMPORTED_MODULE_21__=__webpack_require__(33),_libs_urlopen__WEBPACK_IMPORTED_MODULE_22__=__webpack_require__(82),_libs_diffmessage__WEBPACK_IMPORTED_MODULE_23__=__webpack_require__(179),_libs_stylestore__WEBPACK_IMPORTED_MODULE_24__=__webpack_require__(180),_libs_apistore__WEBPACK_IMPORTED_MODULE_25__=__webpack_require__(288),_libs_revisions__WEBPACK_IMPORTED_MODULE_26__=__webpack_require__(290),_libs_layerwatcher__WEBPACK_IMPORTED_MODULE_27__=__webpack_require__(291),_config_tokens_json__WEBPACK_IMPORTED_MODULE_28__=__webpack_require__(81),_config_tokens_json__WEBPACK_IMPORTED_MODULE_28___namespace=__webpack_require__.t(81,1),lodash_isequal__WEBPACK_IMPORTED_MODULE_29__=__webpack_require__(96),lodash_isequal__WEBPACK_IMPORTED_MODULE_29___default=__webpack_require__.n(lodash_isequal__WEBPACK_IMPORTED_MODULE_29__),_libs_debug__WEBPACK_IMPORTED_MODULE_30__=__webpack_require__(94),_libs_query_util__WEBPACK_IMPORTED_MODULE_31__=__webpack_require__(147),_libs_query_util__WEBPACK_IMPORTED_MODULE_31___default=__webpack_require__.n(_libs_query_util__WEBPACK_IMPORTED_MODULE_31__),mapbox_gl__WEBPACK_IMPORTED_MODULE_32__=__webpack_require__(68),mapbox_gl__WEBPACK_IMPORTED_MODULE_32___default=__webpack_require__.n(mapbox_gl__WEBPACK_IMPORTED_MODULE_32__);function _typeof(t){return(_typeof="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 _extends(){return(_extends=Object.assign||function(t){for(var e=1;e1&&void 0!==arguments[1]?arguments[1]:"",n=t.match(/^mapbox:\/\/(.*)/);return n?"https://api.mapbox.com/v4/".concat(n[1],".json?secure&access_token=").concat(e):t}function updateRootSpec(t,e,n){return _objectSpread({},t,{$root:_objectSpread({},t.$root,_defineProperty({},e,_objectSpread({},t.$root[e],{values:n})))})}!function(){var t=__webpack_require__(2).enterModule;t&&t(module)}();var App=function(_React$Component){function App(t){var e;_classCallCheck(this,App),_defineProperty(_assertThisInitialized(_assertThisInitialized(e=_possibleConstructorReturn(this,_getPrototypeOf(App).call(this,t)))),"onStyleChanged",function(t){var n=!(arguments.length>1&&void 0!==arguments[1])||arguments[1],r=Object(_mapbox_mapbox_gl_style_spec__WEBPACK_IMPORTED_MODULE_20__.validate)(t,_mapbox_mapbox_gl_style_spec__WEBPACK_IMPORTED_MODULE_20__.latest);0===r.length?(t.glyphs!==e.state.mapStyle.glyphs&&e.updateFonts(t.glyphs),t.sprite!==e.state.mapStyle.sprite&&e.updateIcons(t.sprite),e.revisionStore.addRevision(t),n&&e.saveStyle(t),e.setState({mapStyle:t,errors:[]})):e.setState({errors:r.map(function(t){return t.message})}),e.fetchSources()}),_defineProperty(_assertThisInitialized(_assertThisInitialized(e)),"onUndo",function(){var t=e.revisionStore.undo(),n=Object(_libs_diffmessage__WEBPACK_IMPORTED_MODULE_23__.b)(e.state.mapStyle,t);e.saveStyle(t),e.setState({mapStyle:t,infos:n})}),_defineProperty(_assertThisInitialized(_assertThisInitialized(e)),"onRedo",function(){var t=e.revisionStore.redo(),n=Object(_libs_diffmessage__WEBPACK_IMPORTED_MODULE_23__.a)(e.state.mapStyle,t);e.saveStyle(t),e.setState({mapStyle:t,infos:n})}),_defineProperty(_assertThisInitialized(_assertThisInitialized(e)),"onMoveLayer",function(t){var n=t.oldIndex,r=t.newIndex,i=e.state.mapStyle.layers;(n=lodash_clamp__WEBPACK_IMPORTED_MODULE_3___default()(n,0,i.length-1))!==(r=lodash_clamp__WEBPACK_IMPORTED_MODULE_3___default()(r,0,i.length-1))&&(n===e.state.selectedLayerIndex&&e.setState({selectedLayerIndex:r}),i=i.slice(0),i=Object(react_sortable_hoc__WEBPACK_IMPORTED_MODULE_4__.arrayMove)(i,n,r),e.onLayersChange(i))}),_defineProperty(_assertThisInitialized(_assertThisInitialized(e)),"onLayersChange",function(t){var n=_objectSpread({},e.state.mapStyle,{layers:t});e.onStyleChanged(n)}),_defineProperty(_assertThisInitialized(_assertThisInitialized(e)),"onLayerDestroy",function(t){var n=e.state.mapStyle.layers.slice(0),r=_libs_style__WEBPACK_IMPORTED_MODULE_21__.a.indexOfLayer(n,t);n.splice(r,1),e.onLayersChange(n)}),_defineProperty(_assertThisInitialized(_assertThisInitialized(e)),"onLayerCopy",function(t){var n=e.state.mapStyle.layers.slice(0),r=_libs_style__WEBPACK_IMPORTED_MODULE_21__.a.indexOfLayer(n,t),i=lodash_clonedeep__WEBPACK_IMPORTED_MODULE_2___default()(n[r]);i.id=i.id+"-copy",n.splice(r,0,i),e.onLayersChange(n)}),_defineProperty(_assertThisInitialized(_assertThisInitialized(e)),"onLayerVisibilityToggle",function(t){var n=e.state.mapStyle.layers.slice(0),r=_libs_style__WEBPACK_IMPORTED_MODULE_21__.a.indexOfLayer(n,t),i=_objectSpread({},n[r]),o="layout"in i?_objectSpread({},i.layout):{};o.visibility="none"===o.visibility?"visible":"none",i.layout=o,n[r]=i,e.onLayersChange(n)}),_defineProperty(_assertThisInitialized(_assertThisInitialized(e)),"onLayerIdChange",function(t,n){var r=e.state.mapStyle.layers.slice(0),i=_libs_style__WEBPACK_IMPORTED_MODULE_21__.a.indexOfLayer(r,t);r[i]=_objectSpread({},r[i],{id:n}),e.onLayersChange(r)}),_defineProperty(_assertThisInitialized(_assertThisInitialized(e)),"onLayerChanged",function(t){var n=e.state.mapStyle.layers.slice(0);n[_libs_style__WEBPACK_IMPORTED_MODULE_21__.a.indexOfLayer(n,t.id)]=t,e.onLayersChange(n)}),_defineProperty(_assertThisInitialized(_assertThisInitialized(e)),"setMapState",function(t){e.setState({mapState:t})}),_defineProperty(_assertThisInitialized(_assertThisInitialized(e)),"onLayerSelect",function(t){var n=_libs_style__WEBPACK_IMPORTED_MODULE_21__.a.indexOfLayer(e.state.mapStyle.layers,t);e.setState({selectedLayerIndex:n})}),react_autobind__WEBPACK_IMPORTED_MODULE_0___default()(_assertThisInitialized(_assertThisInitialized(e))),e.revisionStore=new _libs_revisions__WEBPACK_IMPORTED_MODULE_26__.a,e.styleStore=new _libs_apistore__WEBPACK_IMPORTED_MODULE_25__.a({onLocalStyleChange:function(t){return e.onStyleChanged(t,!1)}});var n=[{key:"?",handler:function(){e.toggleModal("shortcuts")}},{key:"o",handler:function(){e.toggleModal("open")}},{key:"e",handler:function(){e.toggleModal("export")}},{key:"d",handler:function(){e.toggleModal("sources")}},{key:"s",handler:function(){e.toggleModal("settings")}},{key:"i",handler:function(){e.setMapState("map"===e.state.mapState?"inspect":"map")}},{key:"m",handler:function(){document.querySelector(".mapboxgl-canvas").focus()}}];document.body.addEventListener("keyup",function(t){if("Escape"===t.key)t.target.blur(),document.body.focus();else if(e.state.isOpen.shortcuts||document.activeElement===document.body){var r=n.find(function(e){return e.key===t.key});r&&(e.setModal("shortcuts",!1),r.handler(t))}});var r=Object(_libs_urlopen__WEBPACK_IMPORTED_MODULE_22__.a)();r&&window.confirm("Load style from URL: "+r+" and discard current changes?")?(e.styleStore=new _libs_stylestore__WEBPACK_IMPORTED_MODULE_24__.a,Object(_libs_urlopen__WEBPACK_IMPORTED_MODULE_22__.b)(r,function(t){return e.onStyleChanged(t)}),Object(_libs_urlopen__WEBPACK_IMPORTED_MODULE_22__.c)()):(r&&Object(_libs_urlopen__WEBPACK_IMPORTED_MODULE_22__.c)(),e.styleStore.init(function(t){t&&(console.log("Falling back to local storage for storing styles"),e.styleStore=new _libs_stylestore__WEBPACK_IMPORTED_MODULE_24__.a),e.styleStore.latestStyle(function(t){return e.onStyleChanged(t)}),_libs_debug__WEBPACK_IMPORTED_MODULE_30__.a.enabled()&&(_libs_debug__WEBPACK_IMPORTED_MODULE_30__.a.set("maputnik","styleStore",e.styleStore),_libs_debug__WEBPACK_IMPORTED_MODULE_30__.a.set("maputnik","revisionStore",e.revisionStore))})),_libs_debug__WEBPACK_IMPORTED_MODULE_30__.a.enabled()&&(_libs_debug__WEBPACK_IMPORTED_MODULE_30__.a.set("maputnik","revisionStore",e.revisionStore),_libs_debug__WEBPACK_IMPORTED_MODULE_30__.a.set("maputnik","styleStore",e.styleStore));var i=url__WEBPACK_IMPORTED_MODULE_5___default.a.parse(window.location.href,!0).query;return e.state={errors:[],infos:[],mapStyle:_libs_style__WEBPACK_IMPORTED_MODULE_21__.a.emptyStyle,selectedLayerIndex:0,sources:{},vectorLayers:{},mapState:"map",spec:_mapbox_mapbox_gl_style_spec__WEBPACK_IMPORTED_MODULE_20__.latest,isOpen:{settings:!1,sources:!1,open:!1,shortcuts:!1,export:!1,survey:!localStorage.hasOwnProperty("survey")},mapOptions:{showTileBoundaries:_libs_query_util__WEBPACK_IMPORTED_MODULE_31___default.a.asBool(i,"show-tile-boundaries"),showCollisionBoxes:_libs_query_util__WEBPACK_IMPORTED_MODULE_31___default.a.asBool(i,"show-collision-boxes"),showOverdrawInspector:_libs_query_util__WEBPACK_IMPORTED_MODULE_31___default.a.asBool(i,"show-overdraw-inspector")}},e.layerWatcher=new _libs_layerwatcher__WEBPACK_IMPORTED_MODULE_27__.a({onVectorLayersChange:function(t){return e.setState({vectorLayers:t})}}),e}return _inherits(App,_React$Component),_createClass(App,[{key:"handleKeyPress",value:function(t){navigator.platform.toUpperCase().indexOf("MAC")>=0?t.metaKey&&t.shiftKey&&90===t.keyCode?this.onRedo(t):t.metaKey&&90===t.keyCode&&this.onUndo(t):t.ctrlKey&&90===t.keyCode?this.onUndo(t):t.ctrlKey&&89===t.keyCode&&this.onRedo(t)}},{key:"componentDidMount",value:function(){window.addEventListener("keydown",this.handleKeyPress)}},{key:"componentWillUnmount",value:function(){window.removeEventListener("keydown",this.handleKeyPress)}},{key:"saveStyle",value:function(t){this.styleStore.save(t)}},{key:"updateFonts",value:function(t){var e=this,n=(this.state.mapStyle.metadata||{})["maputnik:openmaptiles_access_token"]||_config_tokens_json__WEBPACK_IMPORTED_MODULE_28__.openmaptiles,r="string"==typeof t?t.replace("{key}",n):t;Object(_libs_metadata__WEBPACK_IMPORTED_MODULE_19__.a)(r,function(t){e.setState({spec:updateRootSpec(e.state.spec,"glyphs",t)})})}},{key:"updateIcons",value:function(t){var e=this;Object(_libs_metadata__WEBPACK_IMPORTED_MODULE_19__.b)(t,function(t){e.setState({spec:updateRootSpec(e.state.spec,"sprite",t)})})}},{key:"fetchSources",value:function(){for(var t=this,e=_objectSpread({},this.state.sources),n=Object.entries(this.state.mapStyle.sources),r=function(){var r=_slicedToArray(n[i],2),o=r[0],a=r[1];if(e.hasOwnProperty(o))return"continue";if(e[o]={type:a.type,layers:[]},!t.state.sources.hasOwnProperty(o)&&"vector"===a.type&&a.hasOwnProperty("url")){var s=a.url;try{s=normalizeSourceURL(s,mapbox_gl__WEBPACK_IMPORTED_MODULE_32___default.a.accessToken)}catch(t){console.warn("Failed to normalizeSourceURL: ",t)}fetch(s,{mode:"cors"}).then(function(t){return t.json()}).then(function(e){if(e.hasOwnProperty("vector_layers")){var n=Object.assign({},t.state.sources),r=!0,i=!1,a=void 0;try{for(var s,l=e.vector_layers[Symbol.iterator]();!(r=(s=l.next()).done);r=!0){var c=s.value;n[o].layers.push(c.id)}}catch(t){i=!0,a=t}finally{try{r||null==l.return||l.return()}finally{if(i)throw a}}console.debug("Updating source: "+o),t.setState({sources:n})}}).catch(function(t){console.error("Failed to process sources for '%s'",s,t)})}},i=0;i0?e[this.state.selectedLayerIndex]:null,r=(this.state.mapStyle.metadata,react__WEBPACK_IMPORTED_MODULE_1___default.a.createElement(_Toolbar__WEBPACK_IMPORTED_MODULE_10__.a,{mapState:this.state.mapState,mapStyle:this.state.mapStyle,inspectModeEnabled:"inspect"===this.state.mapState,sources:this.state.sources,onStyleChanged:this.onStyleChanged,onStyleOpen:this.onStyleChanged,onSetMapState:this.setMapState,onToggleModal:this.toggleModal.bind(this)})),i=react__WEBPACK_IMPORTED_MODULE_1___default.a.createElement(_layers_LayerList__WEBPACK_IMPORTED_MODULE_8__.a,{onMoveLayer:this.onMoveLayer,onLayerDestroy:this.onLayerDestroy,onLayerCopy:this.onLayerCopy,onLayerVisibilityToggle:this.onLayerVisibilityToggle,onLayersChange:this.onLayersChange,onLayerSelect:this.onLayerSelect,selectedLayerIndex:this.state.selectedLayerIndex,layers:e,sources:this.state.sources}),o=n?react__WEBPACK_IMPORTED_MODULE_1___default.a.createElement(_layers_LayerEditor__WEBPACK_IMPORTED_MODULE_9__.a,{layer:n,layerIndex:this.state.selectedLayerIndex,isFirstLayer:this.state.selectedLayerIndex<1,isLastLayer:this.state.selectedLayerIndex===this.state.mapStyle.layers.length-1,sources:this.state.sources,vectorLayers:this.state.vectorLayers,spec:this.state.spec,onMoveLayer:this.onMoveLayer,onLayerChanged:this.onLayerChanged,onLayerDestroy:this.onLayerDestroy,onLayerCopy:this.onLayerCopy,onLayerVisibilityToggle:this.onLayerVisibilityToggle,onLayerIdChange:this.onLayerIdChange}):null,a=this.state.errors.length+this.state.infos.length>0?react__WEBPACK_IMPORTED_MODULE_1___default.a.createElement(_MessagePanel__WEBPACK_IMPORTED_MODULE_12__.a,{errors:this.state.errors,infos:this.state.infos}):null,s=react__WEBPACK_IMPORTED_MODULE_1___default.a.createElement("div",null,react__WEBPACK_IMPORTED_MODULE_1___default.a.createElement(_modals_ShortcutsModal__WEBPACK_IMPORTED_MODULE_17__.a,{ref:function(e){return t.shortcutEl=e},isOpen:this.state.isOpen.shortcuts,onOpenToggle:this.toggleModal.bind(this,"shortcuts")}),react__WEBPACK_IMPORTED_MODULE_1___default.a.createElement(_modals_SettingsModal__WEBPACK_IMPORTED_MODULE_13__.a,{mapStyle:this.state.mapStyle,onStyleChanged:this.onStyleChanged,isOpen:this.state.isOpen.settings,onOpenToggle:this.toggleModal.bind(this,"settings")}),react__WEBPACK_IMPORTED_MODULE_1___default.a.createElement(_modals_ExportModal__WEBPACK_IMPORTED_MODULE_14__.a,{mapStyle:this.state.mapStyle,onStyleChanged:this.onStyleChanged,isOpen:this.state.isOpen.export,onOpenToggle:this.toggleModal.bind(this,"export")}),react__WEBPACK_IMPORTED_MODULE_1___default.a.createElement(_modals_OpenModal__WEBPACK_IMPORTED_MODULE_16__.a,{isOpen:this.state.isOpen.open,onStyleOpen:this.onStyleChanged,onOpenToggle:this.toggleModal.bind(this,"open")}),react__WEBPACK_IMPORTED_MODULE_1___default.a.createElement(_modals_SourcesModal__WEBPACK_IMPORTED_MODULE_15__.a,{mapStyle:this.state.mapStyle,onStyleChanged:this.onStyleChanged,isOpen:this.state.isOpen.sources,onOpenToggle:this.toggleModal.bind(this,"sources")}),react__WEBPACK_IMPORTED_MODULE_1___default.a.createElement(_modals_SurveyModal__WEBPACK_IMPORTED_MODULE_18__.a,{isOpen:this.state.isOpen.survey,onOpenToggle:this.toggleModal.bind(this,"survey")}));return react__WEBPACK_IMPORTED_MODULE_1___default.a.createElement(_AppLayout__WEBPACK_IMPORTED_MODULE_11__.a,{toolbar:r,layerList:i,layerEditor:o,map:this.mapRenderer(),bottom:a,modals:s})}},{key:"__reactstandin__regenerateByEval",value:function __reactstandin__regenerateByEval(key,code){this[key]=eval(code)}}]),App}(react__WEBPACK_IMPORTED_MODULE_1___default.a.Component);!function(){var t=__webpack_require__(2).default,e=__webpack_require__(2).leaveModule;t&&(t.register(normalizeSourceURL,"normalizeSourceURL","/Users/peter.richardson/work/maputnik-editor/src/components/App.jsx"),t.register(updateRootSpec,"updateRootSpec","/Users/peter.richardson/work/maputnik-editor/src/components/App.jsx"),t.register(App,"App","/Users/peter.richardson/work/maputnik-editor/src/components/App.jsx"),e(module))}()}).call(this,__webpack_require__(8)(module))},function(t,e,n){t.exports=n(317)},function(t,e,n){(function(t,n){var r=200,i="__lodash_hash_undefined__",o=9007199254740991,a="[object Arguments]",s="[object Boolean]",l="[object Date]",c="[object Function]",u="[object GeneratorFunction]",p="[object Map]",A="[object Number]",h="[object Object]",f="[object RegExp]",d="[object Set]",_="[object String]",g="[object Symbol]",y="[object ArrayBuffer]",m="[object DataView]",v="[object Float32Array]",b="[object Float64Array]",w="[object Int8Array]",x="[object Int16Array]",E="[object Int32Array]",M="[object Uint8Array]",C="[object Uint8ClampedArray]",B="[object Uint16Array]",O="[object Uint32Array]",k=/\w*$/,P=/^\[object .+?Constructor\]$/,I=/^(?:0|[1-9]\d*)$/,T={};T[a]=T["[object Array]"]=T[y]=T[m]=T[s]=T[l]=T[v]=T[b]=T[w]=T[x]=T[E]=T[p]=T[A]=T[h]=T[f]=T[d]=T[_]=T[g]=T[M]=T[C]=T[B]=T[O]=!0,T["[object Error]"]=T[c]=T["[object WeakMap]"]=!1;var D="object"==typeof t&&t&&t.Object===Object&&t,L="object"==typeof self&&self&&self.Object===Object&&self,S=D||L||Function("return this")(),z="object"==typeof e&&e&&!e.nodeType&&e,R=z&&"object"==typeof n&&n&&!n.nodeType&&n,j=R&&R.exports===z;function U(t,e){return t.set(e[0],e[1]),t}function F(t,e){return t.add(e),t}function Q(t,e,n,r){var i=-1,o=t?t.length:0;for(r&&o&&(n=t[++i]);++i-1},Mt.prototype.set=function(t,e){var n=this.__data__,r=Pt(n,t);return r<0?n.push([t,e]):n[r][1]=e,this},Ct.prototype.clear=function(){this.__data__={hash:new Et,map:new(At||Mt),string:new Et}},Ct.prototype.delete=function(t){return St(this,t).delete(t)},Ct.prototype.get=function(t){return St(this,t).get(t)},Ct.prototype.has=function(t){return St(this,t).has(t)},Ct.prototype.set=function(t,e){return St(this,t).set(t,e),this},Bt.prototype.clear=function(){this.__data__=new Mt},Bt.prototype.delete=function(t){return this.__data__.delete(t)},Bt.prototype.get=function(t){return this.__data__.get(t)},Bt.prototype.has=function(t){return this.__data__.has(t)},Bt.prototype.set=function(t,e){var n=this.__data__;if(n instanceof Mt){var i=n.__data__;if(!At||i.length-1&&t%1==0&&t-1&&t%1==0&&t<=o}(t.length)&&!Nt(t)}var Vt=ct||function(){return!1};function Nt(t){var e=Gt(t)?$.call(t):"";return e==c||e==u}function Gt(t){var e=typeof t;return!!t&&("object"==e||"function"==e)}function qt(t){return Ht(t)?Ot(t):function(t){if(!Ft(t))return ut(t);var e=[];for(var n in Object(t))J.call(t,n)&&"constructor"!=n&&e.push(n);return e}(t)}n.exports=function(t){return It(t,!0,!0)}}).call(this,n(26),n(85)(t))},function(module,__webpack_exports__,__webpack_require__){"use strict";(function(module){__webpack_require__.d(__webpack_exports__,"a",function(){return MapboxGlMap});var react__WEBPACK_IMPORTED_MODULE_0__=__webpack_require__(0),react__WEBPACK_IMPORTED_MODULE_0___default=__webpack_require__.n(react__WEBPACK_IMPORTED_MODULE_0__),prop_types__WEBPACK_IMPORTED_MODULE_1__=__webpack_require__(1),prop_types__WEBPACK_IMPORTED_MODULE_1___default=__webpack_require__.n(prop_types__WEBPACK_IMPORTED_MODULE_1__),react_dom__WEBPACK_IMPORTED_MODULE_2__=__webpack_require__(27),react_dom__WEBPACK_IMPORTED_MODULE_2___default=__webpack_require__.n(react_dom__WEBPACK_IMPORTED_MODULE_2__),mapbox_gl__WEBPACK_IMPORTED_MODULE_3__=__webpack_require__(68),mapbox_gl__WEBPACK_IMPORTED_MODULE_3___default=__webpack_require__.n(mapbox_gl__WEBPACK_IMPORTED_MODULE_3__),mapbox_gl_inspect__WEBPACK_IMPORTED_MODULE_4__=__webpack_require__(229),mapbox_gl_inspect__WEBPACK_IMPORTED_MODULE_4___default=__webpack_require__.n(mapbox_gl_inspect__WEBPACK_IMPORTED_MODULE_4__),_FeatureLayerPopup__WEBPACK_IMPORTED_MODULE_5__=__webpack_require__(230),_FeaturePropertyPopup__WEBPACK_IMPORTED_MODULE_6__=__webpack_require__(234),_config_tokens_json__WEBPACK_IMPORTED_MODULE_7__=__webpack_require__(81),_config_tokens_json__WEBPACK_IMPORTED_MODULE_7___namespace=__webpack_require__.t(81,1),mapbox_gl_inspect_lib_colors__WEBPACK_IMPORTED_MODULE_8__=__webpack_require__(105),mapbox_gl_inspect_lib_colors__WEBPACK_IMPORTED_MODULE_8___default=__webpack_require__.n(mapbox_gl_inspect_lib_colors__WEBPACK_IMPORTED_MODULE_8__),color__WEBPACK_IMPORTED_MODULE_9__=__webpack_require__(107),color__WEBPACK_IMPORTED_MODULE_9___default=__webpack_require__.n(color__WEBPACK_IMPORTED_MODULE_9__),_libs_zoomcontrol__WEBPACK_IMPORTED_MODULE_10__=__webpack_require__(235),_libs_highlight__WEBPACK_IMPORTED_MODULE_11__=__webpack_require__(236),mapbox_gl_dist_mapbox_gl_css__WEBPACK_IMPORTED_MODULE_12__=__webpack_require__(337),mapbox_gl_dist_mapbox_gl_css__WEBPACK_IMPORTED_MODULE_12___default=__webpack_require__.n(mapbox_gl_dist_mapbox_gl_css__WEBPACK_IMPORTED_MODULE_12__),_mapboxgl_css__WEBPACK_IMPORTED_MODULE_13__=__webpack_require__(339),_mapboxgl_css__WEBPACK_IMPORTED_MODULE_13___default=__webpack_require__.n(_mapboxgl_css__WEBPACK_IMPORTED_MODULE_13__),_libs_mapbox_rtl__WEBPACK_IMPORTED_MODULE_14__=__webpack_require__(341);function _typeof(t){return(_typeof="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 _classCallCheck(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function _defineProperties(t,e){for(var n=0;n`."},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://`."},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 RGB-encoded raster DEM source"}},doc:"The type of the source."},url:{type:"string",doc:"A URL to a TileJSON resource. Supported protocols are `http:`, `https:`, and `mapbox://`."},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."},encoding:{type:"enum",values:{terrarium:{doc:"Terrarium format PNG tiles. See https://aws.amazon.com/es/public-datasets/terrain/ for more info."},mapbox:{doc:"Mapbox Terrain RGB tiles. See https://www.mapbox.com/help/access-elevation-data/#mapbox-terrain-rgb for more info."}},default:"mapbox",doc:"The encoding used by this source. Mapbox Terrain RGB is used by default"},"*":{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)."},lineMetrics:{type:"boolean",default:!1,doc:"Whether to calculate line distance metrics. This is required for line layers that specify `line-gradient` values."}},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."}}},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",android:"6.0.0",ios:"4.0.0",macos:"0.7.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 and Mapzen Terrarium tiles.","sdk-support":{"basic functionality":{js:"0.43.0",android:"6.0.0",ios:"4.0.0",macos:"0.7.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 for the layer. At zoom levels less than the minzoom, the layer will be hidden."},maxzoom:{type:"number",minimum:0,maximum:24,doc:"The maximum zoom level for the layer. At zoom levels equal to or greater than the maxzoom, the layer will be hidden."},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",android:"6.0.0",ios:"4.0.0",macos:"0.7.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.",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.","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":{js:"0.43.0",android:"6.0.0",ios:"4.0.0",macos:"0.7.0"}}},"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",android:"6.0.0",ios:"4.0.0",macos:"0.7.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","sdk-support":{"basic functionality":{js:"0.41.0",android:"6.0.0",ios:"4.0.0",macos:"0.7.0"}}},var:{doc:'References variable bound using "let".',group:"Variable binding","sdk-support":{"basic functionality":{js:"0.41.0",android:"6.0.0",ios:"4.0.0",macos:"0.7.0"}}},literal:{doc:"Provides a literal array or object value.",group:"Types","sdk-support":{"basic functionality":{js:"0.41.0",android:"6.0.0",ios:"4.0.0",macos:"0.7.0"}}},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","sdk-support":{"basic functionality":{js:"0.41.0",android:"6.0.0",ios:"4.0.0",macos:"0.7.0"}}},at:{doc:"Retrieves an item from an array.",group:"Lookup","sdk-support":{"basic functionality":{js:"0.41.0",android:"6.0.0",ios:"4.0.0",macos:"0.7.0"}}},case:{doc:"Selects the first output whose corresponding test condition evaluates to true.",group:"Decision","sdk-support":{"basic functionality":{js:"0.41.0",android:"6.0.0",ios:"4.0.0",macos:"0.7.0"}}},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","sdk-support":{"basic functionality":{js:"0.41.0",android:"6.0.0",ios:"4.0.0",macos:"0.7.0"}}},coalesce:{doc:"Evaluates each expression in turn until the first non-null value is obtained, and returns that value.",group:"Decision","sdk-support":{"basic functionality":{js:"0.41.0",android:"6.0.0",ios:"4.0.0",macos:"0.7.0"}}},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","sdk-support":{"basic functionality":{js:"0.42.0",android:"6.0.0",ios:"4.0.0",macos:"0.7.0"}}},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`, 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","sdk-support":{"basic functionality":{js:"0.42.0",android:"6.0.0",ios:"4.0.0",macos:"0.7.0"}}},ln2:{doc:"Returns mathematical constant ln(2).",group:"Math","sdk-support":{"basic functionality":{js:"0.41.0",android:"6.0.0",ios:"4.0.0",macos:"0.7.0"}}},pi:{doc:"Returns the mathematical constant pi.",group:"Math","sdk-support":{"basic functionality":{js:"0.41.0",android:"6.0.0",ios:"4.0.0",macos:"0.7.0"}}},e:{doc:"Returns the mathematical constant e.",group:"Math","sdk-support":{"basic functionality":{js:"0.41.0",android:"6.0.0",ios:"4.0.0",macos:"0.7.0"}}},typeof:{doc:"Returns a string describing the type of the given value.",group:"Types","sdk-support":{"basic functionality":{js:"0.41.0",android:"6.0.0",ios:"4.0.0",macos:"0.7.0"}}},string:{doc:"Asserts that the input value is a string. If multiple values are provided, each one is evaluated in order until a string is obtained. If none of the inputs are strings, the expression is an error.",group:"Types","sdk-support":{"basic functionality":{js:"0.41.0",android:"6.0.0",ios:"4.0.0",macos:"0.7.0"}}},number:{doc:"Asserts that the input value is a number. If multiple values are provided, each one is evaluated in order until a number is obtained. If none of the inputs are numbers, the expression is an error.",group:"Types","sdk-support":{"basic functionality":{js:"0.41.0",android:"6.0.0",ios:"4.0.0",macos:"0.7.0"}}},boolean:{doc:"Asserts that the input value is a boolean. If multiple values are provided, each one is evaluated in order until a boolean is obtained. If none of the inputs are booleans, the expression is an error.",group:"Types","sdk-support":{"basic functionality":{js:"0.41.0",android:"6.0.0",ios:"4.0.0",macos:"0.7.0"}}},object:{doc:"Asserts that the input value is an object. If multiple values are provided, each one is evaluated in order until an object is obtained. If none of the inputs are objects, the expression is an error.",group:"Types","sdk-support":{"basic functionality":{js:"0.41.0",android:"6.0.0",ios:"4.0.0",macos:"0.7.0"}}},collator:{doc:"Returns a `collator` for use in locale-dependent comparison operations. The `case-sensitive` and `diacritic-sensitive` options default to `false`. The `locale` argument specifies the IETF language tag of the locale to use. If none is provided, the default locale is used. If the requested locale is not available, the `collator` will use a system-defined fallback locale. Use `resolved-locale` to test the results of locale fallback behavior.",group:"Types","sdk-support":{"basic functionality":{js:"0.45.0"}}},"to-string":{doc:'Converts the input value to a string. If the input is `null`, the result is `""`. 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","sdk-support":{"basic functionality":{js:"0.41.0",android:"6.0.0",ios:"4.0.0",macos:"0.7.0"}}},"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","sdk-support":{"basic functionality":{js:"0.41.0",android:"6.0.0",ios:"4.0.0",macos:"0.7.0"}}},"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","sdk-support":{"basic functionality":{js:"0.41.0",android:"6.0.0",ios:"4.0.0",macos:"0.7.0"}}},"to-rgba":{doc:"Returns a four-element array containing the input color's red, green, blue, and alpha components, in that order.",group:"Color","sdk-support":{"basic functionality":{js:"0.41.0",android:"6.0.0",ios:"4.0.0",macos:"0.7.0"}}},"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","sdk-support":{"basic functionality":{js:"0.41.0",android:"6.0.0",ios:"4.0.0",macos:"0.7.0"}}},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","sdk-support":{"basic functionality":{js:"0.41.0",android:"6.0.0",ios:"4.0.0",macos:"0.7.0"}}},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","sdk-support":{"basic functionality":{js:"0.41.0",android:"6.0.0",ios:"4.0.0",macos:"0.7.0"}}},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","sdk-support":{"basic functionality":{js:"0.41.0",android:"6.0.0",ios:"4.0.0",macos:"0.7.0"}}},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","sdk-support":{"basic functionality":{js:"0.41.0",android:"6.0.0",ios:"4.0.0",macos:"0.7.0"}}},length:{doc:"Gets the length of an array or string.",group:"Lookup","sdk-support":{"basic functionality":{js:"0.41.0",android:"6.0.0",ios:"4.0.0",macos:"0.7.0"}}},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","sdk-support":{"basic functionality":{js:"0.41.0",android:"6.0.0",ios:"4.0.0",macos:"0.7.0"}}},"geometry-type":{doc:"Gets the feature's geometry type: Point, MultiPoint, LineString, MultiLineString, Polygon, MultiPolygon.",group:"Feature data","sdk-support":{"basic functionality":{js:"0.41.0",android:"6.0.0",ios:"4.0.0",macos:"0.7.0"}}},id:{doc:"Gets the feature's id, if it has one.",group:"Feature data","sdk-support":{"basic functionality":{js:"0.41.0",android:"6.0.0",ios:"4.0.0",macos:"0.7.0"}}},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","sdk-support":{"basic functionality":{js:"0.41.0",android:"6.0.0",ios:"4.0.0",macos:"0.7.0"}}},"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","sdk-support":{"basic functionality":{js:"0.41.0",android:"6.0.0",ios:"4.0.0",macos:"0.7.0"}}},"line-progress":{doc:"Gets the progress along a gradient line. Can only be used in the `line-gradient` property.",group:"Heatmap"},"+":{doc:"Returns the sum of the inputs.",group:"Math","sdk-support":{"basic functionality":{js:"0.41.0",android:"6.0.0",ios:"4.0.0",macos:"0.7.0"}}},"*":{doc:"Returns the product of the inputs.",group:"Math","sdk-support":{"basic functionality":{js:"0.41.0",android:"6.0.0",ios:"4.0.0",macos:"0.7.0"}}},"-":{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","sdk-support":{"basic functionality":{js:"0.41.0",android:"6.0.0",ios:"4.0.0",macos:"0.7.0"}}},"/":{doc:"Returns the result of floating point division of the first input by the second.",group:"Math","sdk-support":{"basic functionality":{js:"0.41.0",android:"6.0.0",ios:"4.0.0",macos:"0.7.0"}}},"%":{doc:"Returns the remainder after integer division of the first input by the second.",group:"Math","sdk-support":{"basic functionality":{js:"0.41.0",android:"6.0.0",ios:"4.0.0",macos:"0.7.0"}}},"^":{doc:"Returns the result of raising the first input to the power specified by the second.",group:"Math","sdk-support":{"basic functionality":{js:"0.41.0",android:"6.0.0",ios:"4.0.0",macos:"0.7.0"}}},sqrt:{doc:"Returns the square root of the input.",group:"Math","sdk-support":{"basic functionality":{js:"0.42.0",android:"6.0.0",ios:"4.0.0",macos:"0.7.0"}}},log10:{doc:"Returns the base-ten logarithm of the input.",group:"Math","sdk-support":{"basic functionality":{js:"0.41.0",android:"6.0.0",ios:"4.0.0",macos:"0.7.0"}}},ln:{doc:"Returns the natural logarithm of the input.",group:"Math","sdk-support":{"basic functionality":{js:"0.41.0",android:"6.0.0",ios:"4.0.0",macos:"0.7.0"}}},log2:{doc:"Returns the base-two logarithm of the input.",group:"Math","sdk-support":{"basic functionality":{js:"0.41.0",android:"6.0.0",ios:"4.0.0",macos:"0.7.0"}}},sin:{doc:"Returns the sine of the input.",group:"Math","sdk-support":{"basic functionality":{js:"0.41.0",android:"6.0.0",ios:"4.0.0",macos:"0.7.0"}}},cos:{doc:"Returns the cosine of the input.",group:"Math","sdk-support":{"basic functionality":{js:"0.41.0",android:"6.0.0",ios:"4.0.0",macos:"0.7.0"}}},tan:{doc:"Returns the tangent of the input.",group:"Math","sdk-support":{"basic functionality":{js:"0.41.0",android:"6.0.0",ios:"4.0.0",macos:"0.7.0"}}},asin:{doc:"Returns the arcsine of the input.",group:"Math","sdk-support":{"basic functionality":{js:"0.41.0",android:"6.0.0",ios:"4.0.0",macos:"0.7.0"}}},acos:{doc:"Returns the arccosine of the input.",group:"Math","sdk-support":{"basic functionality":{js:"0.41.0",android:"6.0.0",ios:"4.0.0",macos:"0.7.0"}}},atan:{doc:"Returns the arctangent of the input.",group:"Math","sdk-support":{"basic functionality":{js:"0.41.0",android:"6.0.0",ios:"4.0.0",macos:"0.7.0"}}},min:{doc:"Returns the minimum value of the inputs.",group:"Math","sdk-support":{"basic functionality":{js:"0.41.0",android:"6.0.0",ios:"4.0.0",macos:"0.7.0"}}},max:{doc:"Returns the maximum value of the inputs.",group:"Math","sdk-support":{"basic functionality":{js:"0.41.0",android:"6.0.0",ios:"4.0.0",macos:"0.7.0"}}},round:{doc:'Rounds the input to the nearest integer. Halfway values are rounded away from zero. For example, `["round", -1.5]` evaluates to -2.',group:"Math","sdk-support":{"basic functionality":{js:"0.45.0",android:"6.0.0",ios:"4.0.0",macos:"0.7.0"}}},abs:{doc:"Returns the absolute value of the input.",group:"Math","sdk-support":{"basic functionality":{js:"0.45.0",android:"6.0.0",ios:"4.0.0",macos:"0.7.0"}}},ceil:{doc:"Returns the smallest integer that is greater than or equal to the input.",group:"Math","sdk-support":{"basic functionality":{js:"0.45.0",android:"6.0.0",ios:"4.0.0",macos:"0.7.0"}}},floor:{doc:"Returns the largest integer that is less than or equal to the input.",group:"Math","sdk-support":{"basic functionality":{js:"0.45.0",android:"6.0.0",ios:"4.0.0",macos:"0.7.0"}}},"==":{doc:"Returns `true` if the input values are equal, `false` otherwise. Equality is strictly typed: values of different types are always considered not equal. Accepts an optional `collator` argument to control locale-dependent string comparisons.",group:"Decision","sdk-support":{"basic functionality":{js:"0.41.0",android:"6.0.0",ios:"4.0.0",macos:"0.7.0"}}},"!=":{doc:"Returns `true` if the input values are not equal, `false` otherwise. Equality is strictly typed: values of different types are always considered not equal. Accepts an optional `collator` argument to control locale-dependent string comparisons.",group:"Decision","sdk-support":{"basic functionality":{js:"0.41.0",android:"6.0.0",ios:"4.0.0",macos:"0.7.0"}}},">":{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. Accepts an optional `collator` argument to control locale-dependent string comparisons.",group:"Decision","sdk-support":{"basic functionality":{js:"0.41.0",android:"6.0.0",ios:"4.0.0",macos:"0.7.0"}}},"<":{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. Accepts an optional `collator` argument to control locale-dependent string comparisons.",group:"Decision","sdk-support":{"basic functionality":{js:"0.41.0",android:"6.0.0",ios:"4.0.0",macos:"0.7.0"}}},">=":{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. Accepts an optional `collator` argument to control locale-dependent string comparisons.",group:"Decision","sdk-support":{"basic functionality":{js:"0.41.0",android:"6.0.0",ios:"4.0.0",macos:"0.7.0"}}},"<=":{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. Accepts an optional `collator` argument to control locale-dependent string comparisons.",group:"Decision","sdk-support":{"basic functionality":{js:"0.41.0",android:"6.0.0",ios:"4.0.0",macos:"0.7.0"}}},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","sdk-support":{"basic functionality":{js:"0.41.0",android:"6.0.0",ios:"4.0.0",macos:"0.7.0"}}},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","sdk-support":{"basic functionality":{js:"0.41.0",android:"6.0.0",ios:"4.0.0",macos:"0.7.0"}}},"!":{doc:"Logical negation. Returns `true` if the input is `false`, and `false` if the input is `true`.",group:"Decision","sdk-support":{"basic functionality":{js:"0.41.0",android:"6.0.0",ios:"4.0.0",macos:"0.7.0"}}},"is-supported-script":{doc:"Returns `true` if the input string is expected to render legibly. Returns `false` if the input string contains sections that cannot be rendered without potential loss of meaning (e.g. Indic scripts that require complex text shaping, or right-to-left scripts if the the `mapbox-gl-rtl-text` plugin is not in use in Mapbox GL JS).",group:"String"},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","sdk-support":{"basic functionality":{js:"0.41.0",android:"6.0.0",ios:"4.0.0",macos:"0.7.0"}}},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","sdk-support":{"basic functionality":{js:"0.41.0",android:"6.0.0",ios:"4.0.0",macos:"0.7.0"}}},concat:{doc:"Returns a string consisting of the concatenation of the inputs.",group:"String","sdk-support":{"basic functionality":{js:"0.41.0",android:"6.0.0",ios:"4.0.0",macos:"0.7.0"}}},"resolved-locale":{doc:"Returns the IETF language tag of the locale being used by the provided `collator`. This can be used to determine the default system locale, or to determine if a requested locale was successfully loaded.",group:"String","sdk-support":{"basic functionality":{js:"0.45.0"}}}}},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). Note that zoom-dependent expressions will be evaluated only at integer zoom levels.","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). Note that zoom-dependent expressions will be evaluated only at integer zoom levels.","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",android:"5.2.0",ios:"3.7.0",macos:"0.6.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. Note that GeoJSON sources with `lineMetrics: true` specified won't render dashed lines to the expected scale. Also note that zoom-dependent expressions will be evaluated only at integer zoom levels.",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). Note that zoom-dependent expressions will be evaluated only at integer zoom levels.","sdk-support":{"basic functionality":{js:"0.10.0",android:"2.0.1",ios:"2.0.0",macos:"0.1.0"},"data-driven styling":{}}},"line-gradient":{type:"color",doc:'Defines a gradient with which to color a line feature. Can only be used with GeoJSON sources that specify `"lineMetrics": true`.',function:"interpolated","zoom-function":!1,"property-function":!1,transition:!1,requires:[{"!":"line-dasharray"},{"!":"line-pattern"},{source:"geojson",has:{lineMetrics:!0}}],"sdk-support":{"basic functionality":{js:"0.45.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",android:"6.0.0",ios:"4.0.0",macos:"0.7.0"},"data-driven styling":{js:"0.43.0",android:"6.0.0",ios:"4.0.0",macos:"0.7.0"}}},"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",android:"6.0.0",ios:"4.0.0",macos:"0.7.0"},"data-driven styling":{js:"0.41.0",android:"6.0.0",ios:"4.0.0",macos:"0.7.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",android:"6.0.0",ios:"4.0.0",macos:"0.7.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",android:"6.0.0",ios:"4.0.0",macos:"0.7.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",android:"6.0.0",ios:"4.0.0",macos:"0.7.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,"sdk-support":{"basic functionality":{js:"0.43.0",android:"6.0.0",ios:"4.0.0",macos:"0.7.0"},"data-driven styling":{}}},"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.","sdk-support":{"basic functionality":{js:"0.43.0",android:"6.0.0",ios:"4.0.0",macos:"0.7.0"},"data-driven styling":{}}},"hillshade-exaggeration":{type:"number",doc:"Intensity of the hillshade",default:.5,minimum:0,maximum:1,function:"interpolated","zoom-function":!0,transition:!0,"sdk-support":{"basic functionality":{js:"0.43.0",android:"6.0.0",ios:"4.0.0",macos:"0.7.0"},"data-driven styling":{}}},"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,"sdk-support":{"basic functionality":{js:"0.43.0",android:"6.0.0",ios:"4.0.0",macos:"0.7.0"},"data-driven styling":{}}},"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,"sdk-support":{"basic functionality":{js:"0.43.0",android:"6.0.0",ios:"4.0.0",macos:"0.7.0"},"data-driven styling":{}}},"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,"sdk-support":{"basic functionality":{js:"0.43.0",android:"6.0.0",ios:"4.0.0",macos:"0.7.0"},"data-driven styling":{}}}},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). Note that zoom-dependent expressions will be evaluated only at integer zoom levels.","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){(function(){var e;t.exports={icon:"icons/google.svg",name:"google",title:"Google Fonts",link:"google.com/fonts",getNames:function(){return e},getLink:function(t){return"https://fonts.google.com/specimen/"+t.replace(/( )/g,"+")},normalizeName:function(t){return t}},e=["ABeeZee","Abel","Abril Fatface","Aclonica","Acme","Actor","Adamina","Advent Pro","Aguafina Script","Akronim","Aladin","Aldrich","Alef","Alegreya","Alegreya SC","Alegreya Sans","Alegreya Sans SC","Alex Brush","Alfa Slab One","Alice","Alike","Alike Angular","Allan","Allerta","Allerta Stencil","Allura","Almendra","Almendra Display","Almendra SC","Amarante","Amaranth","Amatic SC","Amethysta","Amiri","Amita","Anaheim","Andada","Andika","Angkor","Annie Use Your Telescope","Anonymous Pro","Antic","Antic Didone","Antic Slab","Anton","Arapey","Arbutus","Arbutus Slab","Architects Daughter","Archivo Black","Archivo Narrow","Arimo","Arizonia","Armata","Artifika","Arvo","Arya","Asap","Asar","Asset","Astloch","Asul","Atomic Age","Aubrey","Audiowide","Autour One","Average","Average Sans","Averia Gruesa Libre","Averia Libre","Averia Sans Libre","Averia Serif Libre","Bad Script","Balthazar","Bangers","Basic","Battambang","Baumans","Bayon","Belgrano","Belleza","BenchNine","Bentham","Berkshire Swash","Bevan","Bigelow Rules","Bigshot One","Bilbo","Bilbo Swash Caps","Biryani","Bitter","Black Ops One","Bokor","Bonbon","Boogaloo","Bowlby One","Bowlby One SC","Brawler","Bree Serif","Bubblegum Sans","Bubbler One","Buda","Buenard","Butcherman","Butterfly Kids","Cabin","Cabin Condensed","Cabin Sketch","Caesar Dressing","Cagliostro","Calligraffitti","Cambay","Cambo","Candal","Cantarell","Cantata One","Cantora One","Capriola","Cardo","Carme","Carrois Gothic","Carrois Gothic SC","Carter One","Catamaran","Caudex","Caveat","Caveat Brush","Cedarville Cursive","Ceviche One","Changa One","Chango","Chau Philomene One","Chela One","Chelsea Market","Chenla","Cherry Cream Soda","Cherry Swash","Chewy","Chicle","Chivo","Chonburi","Cinzel","Cinzel Decorative","Clicker Script","Coda","Coda Caption","Codystar","Combo","Comfortaa","Coming Soon","Concert One","Condiment","Content","Contrail One","Convergence","Cookie","Copse","Corben","Courgette","Cousine","Coustard","Covered By Your Grace","Crafty Girls","Creepster","Crete Round","Crimson Text","Croissant One","Crushed","Cuprum","Cutive","Cutive Mono","Damion","Dancing Script","Dangrek","Dawning of a New Day","Days One","Dekko","Delius","Delius Swash Caps","Delius Unicase","Della Respira","Denk One","Devonshire","Dhurjati","Didact Gothic","Diplomata","Diplomata SC","Domine","Donegal One","Doppio One","Dorsa","Dosis","Dr Sugiyama","Droid Sans","Droid Sans Mono","Droid Serif","Duru Sans","Dynalight","EB Garamond","Eagle Lake","Eater","Economica","Eczar","Ek Mukta","Electrolize","Elsie","Elsie Swash Caps","Emblema One","Emilys Candy","Engagement","Englebert","Enriqueta","Erica One","Esteban","Euphoria Script","Ewert","Exo","Exo 2","Expletus Sans","Fanwood Text","Fascinate","Fascinate Inline","Faster One","Fasthand","Fauna One","Federant","Federo","Felipa","Fenix","Finger Paint","Fira Mono","Fira Sans","Fjalla One","Fjord One","Flamenco","Flavors","Fondamento","Fontdiner Swanky","Forum","Francois One","Freckle Face","Fredericka the Great","Fredoka One","Freehand","Fresca","Frijole","Fruktur","Fugaz One","GFS Didot","GFS Neohellenic","Gabriela","Gafata","Galdeano","Galindo","Gentium Basic","Gentium Book Basic","Geo","Geostar","Geostar Fill","Germania One","Gidugu","Gilda Display","Give You Glory","Glass Antiqua","Glegoo","Gloria Hallelujah","Goblin One","Gochi Hand","Gorditas","Goudy Bookletter 1911","Graduate","Grand Hotel","Gravitas One","Great Vibes","Griffy","Gruppo","Gudea","Gurajada","Habibi","Halant","Hammersmith One","Hanalei","Hanalei Fill","Handlee","Hanuman","Happy Monkey","Headland One","Henny Penny","Herr Von Muellerhoff","Hind","Hind Siliguri","Hind Vadodara","Holtwood One SC","Homemade Apple","Homenaje","IM Fell DW Pica","IM Fell DW Pica SC","IM Fell Double Pica","IM Fell Double Pica SC","IM Fell English","IM Fell English SC","IM Fell French Canon","IM Fell French Canon SC","IM Fell Great Primer","IM Fell Great Primer SC","Iceberg","Iceland","Imprima","Inconsolata","Inder","Indie Flower","Inika","Inknut Antiqua","Irish Grover","Istok Web","Italiana","Italianno","Itim","Jacques Francois","Jacques Francois Shadow","Jaldi","Jim Nightshade","Jockey One","Jolly Lodger","Josefin Sans","Josefin Slab","Joti One","Judson","Julee","Julius Sans One","Junge","Jura","Just Another Hand","Just Me Again Down Here","Kadwa","Kalam","Kameron","Kantumruy","Karla","Karma","Kaushan Script","Kavoon","Kdam Thmor","Keania One","Kelly Slab","Kenia","Khand","Khmer","Khula","Kite One","Knewave","Kotta One","Koulen","Kranky","Kreon","Kristi","Krona One","Kurale","La Belle Aurore","Laila","Lakki Reddy","Lancelot","Lateef","Lato","League Script","Leckerli One","Ledger","Lekton","Lemon","Libre Baskerville","Life Savers","Lilita One","Lily Script One","Limelight","Linden Hill","Lobster","Lobster Two","Londrina Outline","Londrina Shadow","Londrina Sketch","Londrina Solid","Lora","Love Ya Like A Sister","Loved by the King","Lovers Quarrel","Luckiest Guy","Lusitana","Lustria","Macondo","Macondo Swash Caps","Magra","Maiden Orange","Mako","Mallanna","Mandali","Marcellus","Marcellus SC","Marck Script","Margarine","Marko One","Marmelad","Martel","Martel Sans","Marvel","Mate","Mate SC","Maven Pro","McLaren","Meddon","MedievalSharp","Medula One","Megrim","Meie Script","Merienda","Merienda One","Merriweather","Merriweather Sans","Metal","Metal Mania","Metamorphous","Metrophobic","Michroma","Milonga","Miltonian","Miltonian Tattoo","Miniver","Miss Fajardose","Modak","Modern Antiqua","Molengo","Molle","Monda","Monofett","Monoton","Monsieur La Doulaise","Montaga","Montez","Montserrat","Montserrat Alternates","Montserrat Subrayada","Moul","Moulpali","Mountains of Christmas","Mouse Memoirs","Mr Bedfort","Mr Dafoe","Mr De Haviland","Mrs Saint Delafield","Mrs Sheppards","Muli","Mystery Quest","NTR","Neucha","Neuton","New Rocker","News Cycle","Niconne","Nixie One","Nobile","Nokora","Norican","Nosifer","Nothing You Could Do","Noticia Text","Noto Sans","Noto Serif","Nova Cut","Nova Flat","Nova Mono","Nova Oval","Nova Round","Nova Script","Nova Slim","Nova Square","Numans","Nunito","Odor Mean Chey","Offside","Old Standard TT","Oldenburg","Oleo Script","Oleo Script Swash Caps","Open Sans","Open Sans Condensed","Oranienbaum","Orbitron","Oregano","Orienta","Original Surfer","Oswald","Over the Rainbow","Overlock","Overlock SC","Ovo","Oxygen","Oxygen Mono","PT Mono","PT Sans","PT Sans Caption","PT Sans Narrow","PT Serif","PT Serif Caption","Pacifico","Palanquin","Palanquin Dark","Paprika","Parisienne","Passero One","Passion One","Pathway Gothic One","Patrick Hand","Patrick Hand SC","Patua One","Paytone One","Peddana","Peralta","Permanent Marker","Petit Formal Script","Petrona","Philosopher","Piedra","Pinyon Script","Pirata One","Plaster","Play","Playball","Playfair Display","Playfair Display SC","Podkova","Poiret One","Poller One","Poly","Pompiere","Pontano Sans","Poppins","Port Lligat Sans","Port Lligat Slab","Pragati Narrow","Prata","Preahvihear","Press Start 2P","Princess Sofia","Prociono","Prosto One","Puritan","Purple Purse","Quando","Quantico","Quattrocento","Quattrocento Sans","Questrial","Quicksand","Quintessential","Qwigley","Racing Sans One","Radley","Rajdhani","Raleway","Raleway Dots","Ramabhadra","Ramaraja","Rambla","Rammetto One","Ranchers","Rancho","Ranga","Rationale","Ravi Prakash","Redressed","Reenie Beanie","Revalia","Rhodium Libre","Ribeye","Ribeye Marrow","Righteous","Risque","Roboto","Roboto Condensed","Roboto Mono","Roboto Slab","Rochester","Rock Salt","Rokkitt","Romanesco","Ropa Sans","Rosario","Rosarivo","Rouge Script","Rozha One","Rubik","Rubik Mono One","Rubik One","Ruda","Rufina","Ruge Boogie","Ruluko","Rum Raisin","Ruslan Display","Russo One","Ruthie","Rye","Sacramento","Sahitya","Sail","Salsa","Sanchez","Sancreek","Sansita One","Sarala","Sarina","Sarpanch","Satisfy","Scada","Scheherazade","Schoolbell","Seaweed Script","Sevillana","Seymour One","Shadows Into Light","Shadows Into Light Two","Shanti","Share","Share Tech","Share Tech Mono","Shojumaru","Short Stack","Siemreap","Sigmar One","Signika","Signika Negative","Simonetta","Sintony","Sirin Stencil","Six Caps","Skranji","Slabo 13px","Slabo 27px","Slackey","Smokum","Smythe","Sniglet","Snippet","Snowburst One","Sofadi One","Sofia","Sonsie One","Sorts Mill Goudy","Source Code Pro","Source Sans Pro","Source Serif Pro","Special Elite","Spicy Rice","Spinnaker","Spirax","Squada One","Sree Krushnadevaraya","Stalemate","Stalinist One","Stardos Stencil","Stint Ultra Condensed","Stint Ultra Expanded","Stoke","Strait","Sue Ellen Francisco","Sumana","Sunshiney","Supermercado One","Sura","Suranna","Suravaram","Suwannaphum","Swanky and Moo Moo","Syncopate","Tangerine","Taprom","Tauri","Teko","Telex","Tenali Ramakrishna","Tenor Sans","Text Me One","The Girl Next Door","Tienne","Tillana","Timmana","Tinos","Titan One","Titillium Web","Trade Winds","Trocchi","Trochut","Trykker","Tulpen One","Ubuntu","Ubuntu Condensed","Ubuntu Mono","Ultra","Uncial Antiqua","Underdog","Unica One","UnifrakturCook","UnifrakturMaguntia","Unkempt","Unlock","Unna","VT323","Vampiro One","Varela","Varela Round","Vast Shadow","Vesper Libre","Vibur","Vidaloka","Viga","Voces","Volkhov","Vollkorn","Voltaire","Waiting for the Sunrise","Wallpoet","Walter Turncoat","Warnes","Wellfleet","Wendy One","Wire One","Work Sans","Yanone Kaffeesatz","Yantramanav","Yellowtail","Yeseva One","Yesteryear","Zeyada"]}).call(this)},function(t,e,n){"use strict";t.exports=i;var r=n(186);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.ceil(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 l(t,e){for(var n=0;n>>8,t[n+2]=e>>>16,t[n+3]=e>>>24}function m(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>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=g(this.buf,this.pos);return this.pos+=4,t},readSFixed32:function(){var t=m(this.buf,this.pos);return this.pos+=4,t},readFixed64:function(){var t=g(this.buf,this.pos)+4294967296*g(this.buf,this.pos+4);return this.pos+=8,t},readSFixed64:function(){var t=g(this.buf,this.pos)+4294967296*m(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(;i239?4:l>223?3:l>191?2:1;if(i+u>n)break;1===u?l<128&&(c=l):2===u?128==(192&(o=t[i+1]))&&(c=(31&l)<<6|63&o)<=127&&(c=null):3===u?(o=t[i+1],a=t[i+2],128==(192&o)&&128==(192&a)&&((c=(15&l)<<12|(63&o)<<6|63&a)<=2047||c>=55296&&c<=57343)&&(c=null)):4===u&&(o=t[i+1],a=t[i+2],s=t[i+3],128==(192&o)&&128==(192&a)&&128==(192&s)&&((c=(15&l)<<18|(63&o)<<12|(63&a)<<6|63&s)<=65535||c>=1114112)&&(c=null)),null===c?(c=65533,u=1):c>65535&&(c-=65536,r+=String.fromCharCode(c>>>10&1023|55296),c=56320|1023&c),r+=String.fromCharCode(c),i+=u}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){var n=o(this);for(t=t||[];this.pos127;);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;e268435455||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;o55295&&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=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){this.writeMessage(t,l,e)},writePackedSVarint:function(t,e){this.writeMessage(t,c,e)},writePackedBoolean:function(t,e){this.writeMessage(t,A,e)},writePackedFloat:function(t,e){this.writeMessage(t,u,e)},writePackedDouble:function(t,e){this.writeMessage(t,p,e)},writePackedFixed32:function(t,e){this.writeMessage(t,h,e)},writePackedSFixed32:function(t,e){this.writeMessage(t,f,e)},writePackedFixed64:function(t,e){this.writeMessage(t,d,e)},writePackedSFixed64:function(t,e){this.writeMessage(t,_,e)},writeBytesField:function(t,e){this.writeTag(t,i.Bytes),this.writeBytes(e)},writeFixed32Field:function(t,e){this.writeTag(t,i.Fixed32),this.writeFixed32(e)},writeSFixed32Field:function(t,e){this.writeTag(t,i.Fixed32),this.writeSFixed32(e)},writeFixed64Field:function(t,e){this.writeTag(t,i.Fixed64),this.writeFixed64(e)},writeSFixed64Field:function(t,e){this.writeTag(t,i.Fixed64),this.writeSFixed64(e)},writeVarintField:function(t,e){this.writeTag(t,i.Varint),this.writeVarint(e)},writeSVarintField:function(t,e){this.writeTag(t,i.Varint),this.writeSVarint(e)},writeStringField:function(t,e){this.writeTag(t,i.Bytes),this.writeString(e)},writeFloatField:function(t,e){this.writeTag(t,i.Fixed32),this.writeFloat(e)},writeDoubleField:function(t,e){this.writeTag(t,i.Fixed64),this.writeDouble(e)},writeBooleanField:function(t,e){this.writeVarintField(t,Boolean(e))}}},function(module,__webpack_exports__,__webpack_require__){"use strict";(function(module){__webpack_require__.d(__webpack_exports__,"a",function(){return LayerList});var react__WEBPACK_IMPORTED_MODULE_0__=__webpack_require__(0),react__WEBPACK_IMPORTED_MODULE_0___default=__webpack_require__.n(react__WEBPACK_IMPORTED_MODULE_0__),prop_types__WEBPACK_IMPORTED_MODULE_1__=__webpack_require__(1),prop_types__WEBPACK_IMPORTED_MODULE_1___default=__webpack_require__.n(prop_types__WEBPACK_IMPORTED_MODULE_1__),classnames__WEBPACK_IMPORTED_MODULE_2__=__webpack_require__(48),classnames__WEBPACK_IMPORTED_MODULE_2___default=__webpack_require__.n(classnames__WEBPACK_IMPORTED_MODULE_2__),_LayerListGroup__WEBPACK_IMPORTED_MODULE_3__=__webpack_require__(242),_LayerListItem__WEBPACK_IMPORTED_MODULE_4__=__webpack_require__(243),_modals_AddModal__WEBPACK_IMPORTED_MODULE_5__=__webpack_require__(244),react_sortable_hoc__WEBPACK_IMPORTED_MODULE_6__=__webpack_require__(88),react_sortable_hoc__WEBPACK_IMPORTED_MODULE_6___default=__webpack_require__.n(react_sortable_hoc__WEBPACK_IMPORTED_MODULE_6__);function _extends(){return(_extends=Object.assign||function(t){for(var e=1;e0;i--){if(layerPrefix(t[i-1].id)!==n)return r;r=i-1}return r}var LayerListContainer=function(_React$Component){function LayerListContainer(){var t,e;_classCallCheck(this,LayerListContainer);for(var n=arguments.length,r=new Array(n),i=0;i1&&(n[i]=e.state.areAllGroupsExpanded),r.forEach(function(e){t+=1})}),e.setState({collapsedGroups:n,areAllGroupsExpanded:!e.state.areAllGroupsExpanded})}),e}return _inherits(LayerListContainer,_React$Component),_createClass(LayerListContainer,[{key:"toggleModal",value:function(t){this.setState({isOpen:_objectSpread({},this.state.isOpen,_defineProperty({},t,!this.state.isOpen[t]))})}},{key:"groupedLayers",value:function(){for(var t=[],e=0;e1){var o=react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_LayerListGroup__WEBPACK_IMPORTED_MODULE_3__.a,{"data-wd-key":[i,n].join("-"),key:[i,n].join("-"),title:i,isActive:!t.isCollapsed(i,n)||n===t.props.selectedLayerIndex,onActiveToggle:t.toggleLayerGroup.bind(t,i,n)});e.push(o)}r.forEach(function(o,a){var s=findClosestCommonPrefix(t.props.layers,n),l=react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_LayerListItem__WEBPACK_IMPORTED_MODULE_4__.a,{className:classnames__WEBPACK_IMPORTED_MODULE_2___default()({"maputnik-layer-list-item-collapsed":r.length>1&&t.isCollapsed(i,s)&&n!==t.props.selectedLayerIndex,"maputnik-layer-list-item-group-last":a==r.length-1&&r.length>1}),index:n,key:o.id,layerId:o.id,layerType:o.type,visibility:(o.layout||{}).visibility,isSelected:n===t.props.selectedLayerIndex,onLayerSelect:t.props.onLayerSelect,onLayerDestroy:t.props.onLayerDestroy.bind(t),onLayerCopy:t.props.onLayerCopy.bind(t),onLayerVisibilityToggle:t.props.onLayerVisibilityToggle.bind(t)});e.push(l),n+=1})}),react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement("div",{className:"maputnik-layer-list"},react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_modals_AddModal__WEBPACK_IMPORTED_MODULE_5__.a,{layers:this.props.layers,sources:this.props.sources,isOpen:this.state.isOpen.add,onOpenToggle:this.toggleModal.bind(this,"add"),onLayersChange:this.props.onLayersChange}),react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement("header",{className:"maputnik-layer-list-header"},react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement("span",{className:"maputnik-layer-list-header-title"},"Layers"),react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement("span",{className:"maputnik-space"}),react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement("div",{className:"maputnik-default-property"},react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement("div",{className:"maputnik-multibutton"},react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement("button",{id:"skip-menu",onClick:this.toggleLayers,className:"maputnik-button"},!0===this.state.areAllGroupsExpanded?"Collapse":"Expand"))),react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement("div",{className:"maputnik-default-property"},react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement("div",{className:"maputnik-multibutton"},react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement("button",{onClick:this.toggleModal.bind(this,"add"),"data-wd-key":"layer-list:add-layer",className:"maputnik-button maputnik-button-selected"},"Add Layer")))),react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement("ul",{className:"maputnik-layer-list-container"},e))}},{key:"__reactstandin__regenerateByEval",value:function __reactstandin__regenerateByEval(key,code){this[key]=eval(code)}}]),LayerListContainer}(react__WEBPACK_IMPORTED_MODULE_0___default.a.Component);_defineProperty(LayerListContainer,"propTypes",_objectSpread({},layerListPropTypes)),_defineProperty(LayerListContainer,"defaultProps",{onLayerSelect:function(){}});var LayerListContainerSortable=Object(react_sortable_hoc__WEBPACK_IMPORTED_MODULE_6__.SortableContainer)(function(t){return react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(LayerListContainer,t)}),LayerList=function(_React$Component2){function LayerList(){return _classCallCheck(this,LayerList),_possibleConstructorReturn(this,_getPrototypeOf(LayerList).apply(this,arguments))}return _inherits(LayerList,_React$Component2),_createClass(LayerList,[{key:"render",value:function(){return react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(LayerListContainerSortable,_extends({},this.props,{helperClass:"sortableHelper",onSortEnd:this.props.onMoveLayer.bind(this),useDragHandle:!0}))}},{key:"__reactstandin__regenerateByEval",value:function __reactstandin__regenerateByEval(key,code){this[key]=eval(code)}}]),LayerList}(react__WEBPACK_IMPORTED_MODULE_0___default.a.Component);_defineProperty(LayerList,"propTypes",_objectSpread({},layerListPropTypes)),function(){var t=__webpack_require__(2).default,e=__webpack_require__(2).leaveModule;t&&(t.register(layerListPropTypes,"layerListPropTypes","/Users/peter.richardson/work/maputnik-editor/src/components/layers/LayerList.jsx"),t.register(layerPrefix,"layerPrefix","/Users/peter.richardson/work/maputnik-editor/src/components/layers/LayerList.jsx"),t.register(findClosestCommonPrefix,"findClosestCommonPrefix","/Users/peter.richardson/work/maputnik-editor/src/components/layers/LayerList.jsx"),t.register(LayerListContainer,"LayerListContainer","/Users/peter.richardson/work/maputnik-editor/src/components/layers/LayerList.jsx"),t.register(LayerListContainerSortable,"LayerListContainerSortable","/Users/peter.richardson/work/maputnik-editor/src/components/layers/LayerList.jsx"),t.register(LayerList,"LayerList","/Users/peter.richardson/work/maputnik-editor/src/components/layers/LayerList.jsx"),e(module))}()}).call(this,__webpack_require__(8)(module))},function(module,__webpack_exports__,__webpack_require__){"use strict";(function(module){__webpack_require__.d(__webpack_exports__,"a",function(){return LayerListGroup});var react__WEBPACK_IMPORTED_MODULE_0__=__webpack_require__(0),react__WEBPACK_IMPORTED_MODULE_0___default=__webpack_require__.n(react__WEBPACK_IMPORTED_MODULE_0__),prop_types__WEBPACK_IMPORTED_MODULE_1__=__webpack_require__(1),prop_types__WEBPACK_IMPORTED_MODULE_1___default=__webpack_require__.n(prop_types__WEBPACK_IMPORTED_MODULE_1__),_Collapser__WEBPACK_IMPORTED_MODULE_2__=__webpack_require__(137);function _typeof(t){return(_typeof="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 _classCallCheck(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function _defineProperties(t,e){for(var n=0;n0&&(e.state.source=Object.keys(e.props.sources)[0],e.state["source-layer"]=e.props.sources[e.state.source][0]),e}return _inherits(AddModal,_React$Component),_createClass(AddModal,[{key:"UNSAFE_componentWillUpdate",value:function(t,e){var n=this.state.type,r=e.type,i=this.getSources(n),o=this.getSources(r);n!==r&&""!==this.state.source&&i.indexOf(this.state.source)>-1&&o.indexOf(e.source)<0&&this.setState({source:""})}},{key:"getLayersForSource",value:function(t){return(this.props.sources[t]||{}).layers||[]}},{key:"getSources",value:function(t){for(var e=[],n={vector:["fill","line","symbol","circle","fill-extrusion"],raster:["raster"]},r=Object.entries(this.props.sources),i=0;i-1&&e.push(a)}return e}},{key:"render",value:function(){var t=this,e=this.getSources(this.state.type),n=this.getLayersForSource(this.state.source);return react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_Modal__WEBPACK_IMPORTED_MODULE_3__.a,{isOpen:this.props.isOpen,onOpenToggle:this.props.onOpenToggle,title:"Add Layer","data-wd-key":"modal:add-layer"},react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement("div",{className:"maputnik-add-layer"},react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_layers_LayerIdBlock__WEBPACK_IMPORTED_MODULE_5__.a,{value:this.state.id,wdKey:"add-layer.layer-id",onChange:function(e){t.setState({id:e})}}),react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_layers_LayerTypeBlock__WEBPACK_IMPORTED_MODULE_4__.a,{value:this.state.type,wdKey:"add-layer.layer-type",onChange:function(e){return t.setState({type:e})}}),"background"!==this.state.type&&react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_layers_LayerSourceBlock__WEBPACK_IMPORTED_MODULE_6__.a,{sourceIds:e,wdKey:"add-layer.layer-source-block",value:this.state.source,onChange:function(e){return t.setState({source:e})}}),["background","raster","hillshade","heatmap"].indexOf(this.state.type)<0&&react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_layers_LayerSourceLayerBlock__WEBPACK_IMPORTED_MODULE_7__.a,{isFixed:!0,sourceLayerIds:n,value:this.state["source-layer"],onChange:function(e){return t.setState({"source-layer":e})}}),react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_Button__WEBPACK_IMPORTED_MODULE_2__.a,{className:"maputnik-add-layer-button",onClick:this.addLayer,"data-wd-key":"add-layer"},"Add Layer")))}},{key:"__reactstandin__regenerateByEval",value:function __reactstandin__regenerateByEval(key,code){this[key]=eval(code)}}]),AddModal}(react__WEBPACK_IMPORTED_MODULE_0___default.a.Component);_defineProperty(AddModal,"propTypes",{layers:prop_types__WEBPACK_IMPORTED_MODULE_1___default.a.array.isRequired,onLayersChange:prop_types__WEBPACK_IMPORTED_MODULE_1___default.a.func.isRequired,isOpen:prop_types__WEBPACK_IMPORTED_MODULE_1___default.a.bool.isRequired,onOpenToggle:prop_types__WEBPACK_IMPORTED_MODULE_1___default.a.func.isRequired,sources:prop_types__WEBPACK_IMPORTED_MODULE_1___default.a.object.isRequired});var _default=AddModal;__webpack_exports__.a=_default,function(){var t=__webpack_require__(2).default,e=__webpack_require__(2).leaveModule;t&&(t.register(AddModal,"AddModal","/Users/peter.richardson/work/maputnik-editor/src/components/modals/AddModal.jsx"),t.register(_default,"default","/Users/peter.richardson/work/maputnik-editor/src/components/modals/AddModal.jsx"),e(module))}()}).call(this,__webpack_require__(8)(module))},function(t,e,n){"use strict";var r=function(){function t(t,e){for(var n=0;n=this.getFilteredItems(e).length)return{highlightedIndex:null}}},{key:"setMenuPositions",value:function(){var t=this.refs.input,n=t.getBoundingClientRect(),r=e.window.getComputedStyle(t),i=parseInt(r.marginBottom,10)||0,o=parseInt(r.marginLeft,10)||0,a=parseInt(r.marginRight,10)||0;this.setState({menuTop:n.bottom+i,menuLeft:n.left+o,menuWidth:n.width+o+a})}},{key:"highlightItemFromMouse",value:function(t){this.setState({highlightedIndex:t})}},{key:"selectItemFromMouse",value:function(t){var e=this,n=this.props.getItemValue(t);this.setIgnoreBlur(!1),this.setState({isOpen:!1,highlightedIndex:null},function(){e.props.onSelect(n,t)})}},{key:"setIgnoreBlur",value:function(t){this._ignoreBlur=t}},{key:"renderMenu",value:function(){var t=this,e=this.getFilteredItems(this.props).map(function(e,n){var r=t.props.renderItem(e,t.state.highlightedIndex===n,{cursor:"default"});return o.cloneElement(r,{onMouseEnter:t.props.isItemSelectable(e)?function(){return t.highlightItemFromMouse(n)}:null,onClick:t.props.isItemSelectable(e)?function(){return t.selectItemFromMouse(e)}:null,ref:function(e){return t.refs["item-"+n]=e}})}),n={left:this.state.menuLeft,top:this.state.menuTop,minWidth:this.state.menuWidth},r=this.props.renderMenu(e,this.props.value,n);return o.cloneElement(r,{ref:function(e){return t.refs.menu=e},onTouchStart:function(){return t.setIgnoreBlur(!0)},onMouseEnter:function(){return t.setIgnoreBlur(!0)},onMouseLeave:function(){return t.setIgnoreBlur(!1)}})}},{key:"handleInputBlur",value:function(t){var e=this;if(this._ignoreBlur)return this._ignoreFocus=!0,this._scrollOffset={x:void 0!==window.pageXOffset?window.pageXOffset:(document.documentElement||document.body.parentNode||document.body).scrollLeft,y:void 0!==window.pageYOffset?window.pageYOffset:(document.documentElement||document.body.parentNode||document.body).scrollTop},void this.refs.input.focus();var n=void 0,r=this.state.highlightedIndex;if(this.props.selectOnBlur&&null!==r){var i=this.getFilteredItems(this.props)[r],o=this.props.getItemValue(i);n=function(){return e.props.onSelect(o,i)}}this.setState({isOpen:!1,highlightedIndex:null},n);var a=this.props.inputProps.onBlur;a&&a(t)}},{key:"handleInputFocus",value:function(t){var e=this;if(this._ignoreFocus){this._ignoreFocus=!1;var n=this._scrollOffset,r=n.x,i=n.y;return this._scrollOffset=null,window.scrollTo(r,i),clearTimeout(this._scrollTimer),void(this._scrollTimer=setTimeout(function(){e._scrollTimer=null,window.scrollTo(r,i)},0))}this.setState({isOpen:!0});var o=this.props.inputProps.onFocus;o&&o(t)}},{key:"isInputFocused",value:function(){var t=this.refs.input;return t.ownerDocument&&t===t.ownerDocument.activeElement}},{key:"handleInputClick",value:function(){this.isInputFocused()&&!this.isOpen()&&this.setState({isOpen:!0})}},{key:"composeEventHandlers",value:function(t,e){return e?function(n){t(n),e(n)}:t}},{key:"isOpen",value:function(){return"open"in this.props?this.props.open:this.state.isOpen}},{key:"render",value:function(){this.props.debug&&this._debugStates.push({id:this._debugStates.length,state:this.state});var t=this.props.inputProps,e=this.isOpen();return o.createElement("div",r({style:r({},this.props.wrapperStyle)},this.props.wrapperProps),this.props.renderInput(r({},t,{role:"combobox","aria-autocomplete":"list","aria-expanded":e,autoComplete:"off",ref:this.exposeAPI,onFocus:this.handleInputFocus,onBlur:this.handleInputBlur,onChange:this.handleChange,onKeyDown:this.composeEventHandlers(this.handleKeyDown,t.onKeyDown),onClick:this.composeEventHandlers(this.handleInputClick,t.onClick),value:this.props.value})),e&&this.renderMenu(),this.props.debug&&o.createElement("pre",{style:{marginLeft:300}},JSON.stringify(this._debugStates.slice(Math.max(0,this._debugStates.length-5),this._debugStates.length),null,2)))}}]),n}();u.propTypes={items:a.array.isRequired,value:a.any,onChange:a.func,onSelect:a.func,shouldItemRender:a.func,isItemSelectable:a.func,sortItems:a.func,getItemValue:a.func.isRequired,renderItem:a.func.isRequired,renderMenu:a.func,menuStyle:a.object,renderInput:a.func,inputProps:a.object,wrapperProps:a.object,wrapperStyle:a.object,autoHighlight:a.bool,selectOnBlur:a.bool,onMenuVisibilityChange:a.func,open:a.bool,debug:a.bool},u.defaultProps={value:"",wrapperProps:{},wrapperStyle:{display:"inline-block"},inputProps:{},renderInput:function(t){return o.createElement("input",t)},onChange:function(){},onSelect:function(){},isItemSelectable:function(){return!0},renderMenu:function(t,e,n){return o.createElement("div",{style:r({},n,this.menuStyle),children:t})},menuStyle:{borderRadius:"3px",boxShadow:"0 2px 12px rgba(0, 0, 0, 0.1)",background:"rgba(255, 255, 255, 0.9)",padding:"2px 0",fontSize:"90%",position:"fixed",overflow:"auto",maxHeight:"50%"},autoHighlight:!0,selectOnBlur:!1,onMenuVisibilityChange:function(){}},u.keyDownHandlers={ArrowDown:function(t){t.preventDefault();var e=this.getFilteredItems(this.props);if(e.length){for(var n=this.state.highlightedIndex,r=null===n?-1:n,i=0;i-1&&r!==n&&this.setState({highlightedIndex:r,isOpen:!0})}},ArrowUp:function(t){t.preventDefault();var e=this.getFilteredItems(this.props);if(e.length){for(var n=this.state.highlightedIndex,r=null===n?e.length:n,i=0;i=0}function hasNestedCombiningFilter(t){if(hasCombiningFilter(t)){t.slice(1);return t.slice(1).map(function(t){return hasCombiningFilter(t)}).filter(function(t){return 1==t}).length>0}return!1}!function(){var t=__webpack_require__(2).enterModule;t&&t(module)}();var CombiningFilterEditor=function(_React$Component){function CombiningFilterEditor(){var t,e;_classCallCheck(this,CombiningFilterEditor);for(var n=arguments.length,r=new Array(n),i=0;i0&&react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement("div",{className:"maputnik-filter-editor-args"},react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_inputs_StringInput__WEBPACK_IMPORTED_MODULE_3__.a,{value:i.join(","),onChange:function(e){return t.onFilterPartChanged(n,r,e.split(","))}})))}},{key:"__reactstandin__regenerateByEval",value:function __reactstandin__regenerateByEval(key,code){this[key]=eval(code)}}]),SingleFilterEditor}(react__WEBPACK_IMPORTED_MODULE_0___default.a.Component);_defineProperty(SingleFilterEditor,"propTypes",{filter:prop_types__WEBPACK_IMPORTED_MODULE_1___default.a.array.isRequired,onChange:prop_types__WEBPACK_IMPORTED_MODULE_1___default.a.func.isRequired,properties:prop_types__WEBPACK_IMPORTED_MODULE_1___default.a.object}),_defineProperty(SingleFilterEditor,"defaultProps",{properties:{}});var _default=SingleFilterEditor;__webpack_exports__.a=_default,function(){var t=__webpack_require__(2).default,e=__webpack_require__(2).leaveModule;t&&(t.register(tryParseInt,"tryParseInt","/Users/peter.richardson/work/maputnik-editor/src/components/filter/SingleFilterEditor.jsx"),t.register(tryParseBool,"tryParseBool","/Users/peter.richardson/work/maputnik-editor/src/components/filter/SingleFilterEditor.jsx"),t.register(parseFilter,"parseFilter","/Users/peter.richardson/work/maputnik-editor/src/components/filter/SingleFilterEditor.jsx"),t.register(SingleFilterEditor,"SingleFilterEditor","/Users/peter.richardson/work/maputnik-editor/src/components/filter/SingleFilterEditor.jsx"),t.register(_default,"default","/Users/peter.richardson/work/maputnik-editor/src/components/filter/SingleFilterEditor.jsx"),e(module))}()}).call(this,__webpack_require__(8)(module))},function(module,__webpack_exports__,__webpack_require__){"use strict";(function(module){var react__WEBPACK_IMPORTED_MODULE_0__=__webpack_require__(0),react__WEBPACK_IMPORTED_MODULE_0___default=__webpack_require__.n(react__WEBPACK_IMPORTED_MODULE_0__),prop_types__WEBPACK_IMPORTED_MODULE_1__=__webpack_require__(1),prop_types__WEBPACK_IMPORTED_MODULE_1___default=__webpack_require__.n(prop_types__WEBPACK_IMPORTED_MODULE_1__),_Button__WEBPACK_IMPORTED_MODULE_2__=__webpack_require__(23),react_icons_md__WEBPACK_IMPORTED_MODULE_3__=__webpack_require__(21),react_icons_md__WEBPACK_IMPORTED_MODULE_3___default=__webpack_require__.n(react_icons_md__WEBPACK_IMPORTED_MODULE_3__);function _typeof(t){return(_typeof="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 _classCallCheck(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function _defineProperties(t,e){for(var n=0;n=0?_objectSpread({},r,{values:t.$root.sprite.values}):"text-font"===n?_objectSpread({},r,{values:t.$root.glyphs.values}):r}function getGroupName(t,e,n){return n in(t["paint_"+e]||{})?"paint":"layout"}var PropertyGroup=function(_React$Component){function PropertyGroup(){var t,e;_classCallCheck(this,PropertyGroup);for(var n=arguments.length,r=new Array(n),i=0;i0&&!Array.isArray(e[0])&&(e=e.map(function(t){return[t,t]}));var n=this.props.value||e[0][0],r=e.map(function(e){var r=_slicedToArray(e,2),i=r[0],o=r[1];return react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_Button__WEBPACK_IMPORTED_MODULE_3__.a,{key:i,onClick:function(e){return t.props.onChange(i)},className:classnames__WEBPACK_IMPORTED_MODULE_2___default()({"maputnik-button-selected":i===n})},o)});return react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement("div",{className:"maputnik-multibutton"},r)}},{key:"__reactstandin__regenerateByEval",value:function __reactstandin__regenerateByEval(key,code){this[key]=eval(code)}}]),MultiButtonInput}(react__WEBPACK_IMPORTED_MODULE_0___default.a.Component);_defineProperty(MultiButtonInput,"propTypes",{value:prop_types__WEBPACK_IMPORTED_MODULE_1___default.a.string.isRequired,options:prop_types__WEBPACK_IMPORTED_MODULE_1___default.a.array.isRequired,onChange:prop_types__WEBPACK_IMPORTED_MODULE_1___default.a.func.isRequired});var _default=MultiButtonInput;__webpack_exports__.a=_default,function(){var t=__webpack_require__(2).default,e=__webpack_require__(2).leaveModule;t&&(t.register(MultiButtonInput,"MultiButtonInput","/Users/peter.richardson/work/maputnik-editor/src/components/inputs/MultiButtonInput.jsx"),t.register(_default,"default","/Users/peter.richardson/work/maputnik-editor/src/components/inputs/MultiButtonInput.jsx"),e(module))}()}).call(this,__webpack_require__(8)(module))},function(module,__webpack_exports__,__webpack_require__){"use strict";(function(module){var react__WEBPACK_IMPORTED_MODULE_0__=__webpack_require__(0),react__WEBPACK_IMPORTED_MODULE_0___default=__webpack_require__.n(react__WEBPACK_IMPORTED_MODULE_0__),prop_types__WEBPACK_IMPORTED_MODULE_1__=__webpack_require__(1),prop_types__WEBPACK_IMPORTED_MODULE_1___default=__webpack_require__.n(prop_types__WEBPACK_IMPORTED_MODULE_1__),_StringInput__WEBPACK_IMPORTED_MODULE_2__=__webpack_require__(22),_NumberInput__WEBPACK_IMPORTED_MODULE_3__=__webpack_require__(40);function _typeof(t){return(_typeof="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 _classCallCheck(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function _defineProperties(t,e){for(var n=0;n0&&void 0!==arguments[0]?arguments[0]:"")+ ++r};e.a=i,function(){var e=n(2).default,o=n(2).leaveModule;e&&(e.register(r,"REF","/Users/peter.richardson/work/maputnik-editor/src/libs/document-uid.js"),e.register(i,"default","/Users/peter.richardson/work/maputnik-editor/src/libs/document-uid.js"),o(t))}()}).call(this,n(8)(t))},function(t,e,n){"use strict";(function(t){!function(){var e=n(2).enterModule;e&&e(t)}();var r=function(t,e){return(t=parseFloat(t,10))<(e=parseFloat(e,10))?-1:t>e?1:0};e.a=r,function(){var e=n(2).default,i=n(2).leaveModule;e&&(e.register(r,"default","/Users/peter.richardson/work/maputnik-editor/src/libs/sort-numerically.js"),i(t))}()}).call(this,n(8)(t))},function(module,__webpack_exports__,__webpack_require__){"use strict";(function(module){__webpack_require__.d(__webpack_exports__,"a",function(){return LayerEditorGroup});var react__WEBPACK_IMPORTED_MODULE_0__=__webpack_require__(0),react__WEBPACK_IMPORTED_MODULE_0___default=__webpack_require__.n(react__WEBPACK_IMPORTED_MODULE_0__),prop_types__WEBPACK_IMPORTED_MODULE_1__=__webpack_require__(1),prop_types__WEBPACK_IMPORTED_MODULE_1___default=__webpack_require__.n(prop_types__WEBPACK_IMPORTED_MODULE_1__),_Collapser__WEBPACK_IMPORTED_MODULE_2__=__webpack_require__(137),_Collapse__WEBPACK_IMPORTED_MODULE_3__=__webpack_require__(269);function _typeof(t){return(_typeof="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 _classCallCheck(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function _defineProperties(t,e){for(var n=0;n":"greater","|":"or","¢":"cent","£":"pound","¤":"currency","¥":"yen","©":"(c)","ª":"a","®":"(r)","º":"o","À":"A","Á":"A","Â":"A","Ã":"A","Ä":"A","Å":"A","Æ":"AE","Ç":"C","È":"E","É":"E","Ê":"E","Ë":"E","Ì":"I","Í":"I","Î":"I","Ï":"I","Ð":"D","Ñ":"N","Ò":"O","Ó":"O","Ô":"O","Õ":"O","Ö":"O","Ø":"O","Ù":"U","Ú":"U","Û":"U","Ü":"U","Ý":"Y","Þ":"TH","ß":"ss","à":"a","á":"a","â":"a","ã":"a","ä":"a","å":"a","æ":"ae","ç":"c","è":"e","é":"e","ê":"e","ë":"e","ì":"i","í":"i","î":"i","ï":"i","ð":"d","ñ":"n","ò":"o","ó":"o","ô":"o","õ":"o","ö":"o","ø":"o","ù":"u","ú":"u","û":"u","ü":"u","ý":"y","þ":"th","ÿ":"y","Ā":"A","ā":"a","Ă":"A","ă":"a","Ą":"A","ą":"a","Ć":"C","ć":"c","Č":"C","č":"c","Ď":"D","ď":"d","Đ":"DJ","đ":"dj","Ē":"E","ē":"e","Ė":"E","ė":"e","Ę":"e","ę":"e","Ě":"E","ě":"e","Ğ":"G","ğ":"g","Ģ":"G","ģ":"g","Ĩ":"I","ĩ":"i","Ī":"i","ī":"i","Į":"I","į":"i","İ":"I","ı":"i","Ķ":"k","ķ":"k","Ļ":"L","ļ":"l","Ł":"L","ł":"l","Ń":"N","ń":"n","Ņ":"N","ņ":"n","Ň":"N","ň":"n","Ő":"O","ő":"o","Œ":"OE","œ":"oe","Ř":"R","ř":"r","Ś":"S","ś":"s","Ş":"S","ş":"s","Š":"S","š":"s","Ţ":"T","ţ":"t","Ť":"T","ť":"t","Ũ":"U","ũ":"u","Ū":"u","ū":"u","Ů":"U","ů":"u","Ű":"U","ű":"u","Ų":"U","ų":"u","Ź":"Z","ź":"z","Ż":"Z","ż":"z","Ž":"Z","ž":"z","ƒ":"f","Ơ":"O","ơ":"o","Ư":"U","ư":"u","Lj":"LJ","lj":"lj","Nj":"NJ","nj":"nj","Ș":"S","ș":"s","Ț":"T","ț":"t","˚":"o","Ά":"A","Έ":"E","Ή":"H","Ί":"I","Ό":"O","Ύ":"Y","Ώ":"W","ΐ":"i","Α":"A","Β":"B","Γ":"G","Δ":"D","Ε":"E","Ζ":"Z","Η":"H","Θ":"8","Ι":"I","Κ":"K","Λ":"L","Μ":"M","Ν":"N","Ξ":"3","Ο":"O","Π":"P","Ρ":"R","Σ":"S","Τ":"T","Υ":"Y","Φ":"F","Χ":"X","Ψ":"PS","Ω":"W","Ϊ":"I","Ϋ":"Y","ά":"a","έ":"e","ή":"h","ί":"i","ΰ":"y","α":"a","β":"b","γ":"g","δ":"d","ε":"e","ζ":"z","η":"h","θ":"8","ι":"i","κ":"k","λ":"l","μ":"m","ν":"n","ξ":"3","ο":"o","π":"p","ρ":"r","ς":"s","σ":"s","τ":"t","υ":"y","φ":"f","χ":"x","ψ":"ps","ω":"w","ϊ":"i","ϋ":"y","ό":"o","ύ":"y","ώ":"w","Ё":"Yo","Ђ":"DJ","Є":"Ye","І":"I","Ї":"Yi","Ј":"J","Љ":"LJ","Њ":"NJ","Ћ":"C","Џ":"DZ","А":"A","Б":"B","В":"V","Г":"G","Д":"D","Е":"E","Ж":"Zh","З":"Z","И":"I","Й":"J","К":"K","Л":"L","М":"M","Н":"N","О":"O","П":"P","Р":"R","С":"S","Т":"T","У":"U","Ф":"F","Х":"H","Ц":"C","Ч":"Ch","Ш":"Sh","Щ":"Sh","Ъ":"U","Ы":"Y","Ь":"","Э":"E","Ю":"Yu","Я":"Ya","а":"a","б":"b","в":"v","г":"g","д":"d","е":"e","ж":"zh","з":"z","и":"i","й":"j","к":"k","л":"l","м":"m","н":"n","о":"o","п":"p","р":"r","с":"s","т":"t","у":"u","ф":"f","х":"h","ц":"c","ч":"ch","ш":"sh","щ":"sh","ъ":"u","ы":"y","ь":"","э":"e","ю":"yu","я":"ya","ё":"yo","ђ":"dj","є":"ye","і":"i","ї":"yi","ј":"j","љ":"lj","њ":"nj","ћ":"c","џ":"dz","Ґ":"G","ґ":"g","฿":"baht","ა":"a","ბ":"b","გ":"g","დ":"d","ე":"e","ვ":"v","ზ":"z","თ":"t","ი":"i","კ":"k","ლ":"l","მ":"m","ნ":"n","ო":"o","პ":"p","ჟ":"zh","რ":"r","ს":"s","ტ":"t","უ":"u","ფ":"f","ქ":"k","ღ":"gh","ყ":"q","შ":"sh","ჩ":"ch","ც":"ts","ძ":"dz","წ":"ts","ჭ":"ch","ხ":"kh","ჯ":"j","ჰ":"h","ẞ":"SS","Ạ":"A","ạ":"a","Ả":"A","ả":"a","Ấ":"A","ấ":"a","Ầ":"A","ầ":"a","Ẩ":"A","ẩ":"a","Ẫ":"A","ẫ":"a","Ậ":"A","ậ":"a","Ắ":"A","ắ":"a","Ằ":"A","ằ":"a","Ẳ":"A","ẳ":"a","Ẵ":"A","ẵ":"a","Ặ":"A","ặ":"a","Ẹ":"E","ẹ":"e","Ẻ":"E","ẻ":"e","Ẽ":"E","ẽ":"e","Ế":"E","ế":"e","Ề":"E","ề":"e","Ể":"E","ể":"e","Ễ":"E","ễ":"e","Ệ":"E","ệ":"e","Ỉ":"I","ỉ":"i","Ị":"I","ị":"i","Ọ":"O","ọ":"o","Ỏ":"O","ỏ":"o","Ố":"O","ố":"o","Ồ":"O","ồ":"o","Ổ":"O","ổ":"o","Ỗ":"O","ỗ":"o","Ộ":"O","ộ":"o","Ớ":"O","ớ":"o","Ờ":"O","ờ":"o","Ở":"O","ở":"o","Ỡ":"O","ỡ":"o","Ợ":"O","ợ":"o","Ụ":"U","ụ":"u","Ủ":"U","ủ":"u","Ứ":"U","ứ":"u","Ừ":"U","ừ":"u","Ử":"U","ử":"u","Ữ":"U","ữ":"u","Ự":"U","ự":"u","Ỳ":"Y","ỳ":"y","Ỵ":"Y","ỵ":"y","Ỷ":"Y","ỷ":"y","Ỹ":"Y","ỹ":"y","‘":"\'","’":"\'","“":"\\"","”":"\\"","†":"+","•":"*","…":"...","₠":"ecu","₢":"cruzeiro","₣":"french franc","₤":"lira","₥":"mill","₦":"naira","₧":"peseta","₨":"rupee","₩":"won","₪":"new shequel","₫":"dong","€":"euro","₭":"kip","₮":"tugrik","₯":"drachma","₰":"penny","₱":"peso","₲":"guarani","₳":"austral","₴":"hryvnia","₵":"cedi","₹":"indian rupee","₽":"russian ruble","℠":"sm","™":"tm","∂":"d","∆":"delta","∑":"sum","∞":"infinity","♥":"love","元":"yuan","円":"yen","﷼":"rial"}');function e(e,n){if("string"!=typeof e)throw new Error("slugify: string argument expected");n="string"==typeof n?{replacement:n}:n||{};var r=e.split("").reduce(function(e,r){return e+(t[r]||r).replace(n.remove||/[^\w\s$*_+~.()'"!\-:@]/g,"")},"").trim().replace(/[-\s]+/g,n.replacement||"-").replace("#{replacement}$","");return n.lower?r.toLowerCase():r}return e.extend=function(e){for(var n in e)t[n]=e[n]},e})},function(t,e,n){var r,i=i||function(t){"use strict";if(!(void 0===t||"undefined"!=typeof navigator&&/MSIE [1-9]\./.test(navigator.userAgent))){var e=function(){return t.URL||t.webkitURL||t},n=t.document.createElementNS("http://www.w3.org/1999/xhtml","a"),r="download"in n,i=/constructor/i.test(t.HTMLElement)||t.safari,o=/CriOS\/[\d]+/.test(navigator.userAgent),a=function(e){(t.setImmediate||t.setTimeout)(function(){throw e},0)},s=function(t){setTimeout(function(){"string"==typeof t?e().revokeObjectURL(t):t.remove()},4e4)},l=function(t){return/^\s*(?:text\/\S*|application\/xml|\S*\/\S*\+xml)\s*;.*charset\s*=\s*utf-8/i.test(t.type)?new Blob([String.fromCharCode(65279),t],{type:t.type}):t},c=function(c,u,p){p||(c=l(c));var A,h=this,f="application/octet-stream"===c.type,d=function(){!function(t,e,n){for(var r=(e=[].concat(e)).length;r--;){var i=t["on"+e[r]];if("function"==typeof i)try{i.call(t,n||t)}catch(t){a(t)}}}(h,"writestart progress write writeend".split(" "))};if(h.readyState=h.INIT,r)return A=e().createObjectURL(c),void setTimeout(function(){n.href=A,n.download=u,function(t){var e=new MouseEvent("click");t.dispatchEvent(e)}(n),d(),s(A),h.readyState=h.DONE});!function(){if((o||f&&i)&&t.FileReader){var n=new FileReader;return n.onloadend=function(){var e=o?n.result:n.result.replace(/^data:[^;]*;/,"data:attachment/file;");t.open(e,"_blank")||(t.location.href=e),e=void 0,h.readyState=h.DONE,d()},n.readAsDataURL(c),void(h.readyState=h.INIT)}A||(A=e().createObjectURL(c)),f?t.location.href=A:t.open(A,"_blank")||(t.location.href=A);h.readyState=h.DONE,d(),s(A)}()},u=c.prototype;return"undefined"!=typeof navigator&&navigator.msSaveOrOpenBlob?function(t,e,n){return e=e||t.name||"download",n||(t=l(t)),navigator.msSaveOrOpenBlob(t,e)}:(u.abort=function(){},u.readyState=u.INIT=0,u.WRITING=1,u.DONE=2,u.error=u.onwritestart=u.onprogress=u.onwrite=u.onabort=u.onerror=u.onwriteend=null,function(t,e,n){return new c(t,e||t.name||"download",n)})}}("undefined"!=typeof self&&self||"undefined"!=typeof window&&window||this.content); +/*! @source http://purl.eligrey.com/github/FileSaver.js/blob/master/FileSaver.js */void 0!==t&&t.exports?t.exports.saveAs=i:null!==n(510)&&null!==n(511)&&(void 0===(r=function(){return i}.call(e,n,e,t))||(t.exports=r))},function(module,__webpack_exports__,__webpack_require__){"use strict";(function(module){var react__WEBPACK_IMPORTED_MODULE_0__=__webpack_require__(0),react__WEBPACK_IMPORTED_MODULE_0___default=__webpack_require__.n(react__WEBPACK_IMPORTED_MODULE_0__),prop_types__WEBPACK_IMPORTED_MODULE_1__=__webpack_require__(1),prop_types__WEBPACK_IMPORTED_MODULE_1___default=__webpack_require__.n(prop_types__WEBPACK_IMPORTED_MODULE_1__),_mapbox_mapbox_gl_style_spec__WEBPACK_IMPORTED_MODULE_2__=__webpack_require__(17),_mapbox_mapbox_gl_style_spec__WEBPACK_IMPORTED_MODULE_2___default=__webpack_require__.n(_mapbox_mapbox_gl_style_spec__WEBPACK_IMPORTED_MODULE_2__),_Modal__WEBPACK_IMPORTED_MODULE_3__=__webpack_require__(43),_Button__WEBPACK_IMPORTED_MODULE_4__=__webpack_require__(23),_inputs_InputBlock__WEBPACK_IMPORTED_MODULE_5__=__webpack_require__(16),_inputs_StringInput__WEBPACK_IMPORTED_MODULE_6__=__webpack_require__(22),_inputs_SelectInput__WEBPACK_IMPORTED_MODULE_7__=__webpack_require__(44),_sources_SourceTypeEditor__WEBPACK_IMPORTED_MODULE_8__=__webpack_require__(176),_libs_style__WEBPACK_IMPORTED_MODULE_9__=__webpack_require__(33),_libs_source__WEBPACK_IMPORTED_MODULE_10__=__webpack_require__(113),_config_tilesets_json__WEBPACK_IMPORTED_MODULE_11__=__webpack_require__(177),_config_tilesets_json__WEBPACK_IMPORTED_MODULE_11___namespace=__webpack_require__.t(177,1),react_icons_md__WEBPACK_IMPORTED_MODULE_12__=__webpack_require__(21),react_icons_md__WEBPACK_IMPORTED_MODULE_12___default=__webpack_require__.n(react_icons_md__WEBPACK_IMPORTED_MODULE_12__);function _objectSpread(t){for(var e=1;e=0||Object.prototype.hasOwnProperty.call(t,r)&&(n[r]=t[r]);return n}(e,["as","children","style"]),s=n?{position:"absolute",top:"-9999px"}:{};return a.createElement("div",{className:"_react-file-reader-input",onClick:this.triggerInput,style:i},a.createElement("input",r({},o,{type:"file",ref:function(e){t._reactFileReaderInput=e},onChange:this.handleChange,onClick:function(){t._reactFileReaderInput.value=null},style:s})),n)}}]),e}();e.default=l},function(module,__webpack_exports__,__webpack_require__){"use strict";(function(module){var react__WEBPACK_IMPORTED_MODULE_0__=__webpack_require__(0),react__WEBPACK_IMPORTED_MODULE_0___default=__webpack_require__.n(react__WEBPACK_IMPORTED_MODULE_0__),prop_types__WEBPACK_IMPORTED_MODULE_1__=__webpack_require__(1),prop_types__WEBPACK_IMPORTED_MODULE_1___default=__webpack_require__.n(prop_types__WEBPACK_IMPORTED_MODULE_1__),_Modal__WEBPACK_IMPORTED_MODULE_2__=__webpack_require__(43);function _typeof(t){return(_typeof="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 _classCallCheck(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function _defineProperties(t,e){for(var n=0;ng.maxRetries?m("EHOSTDOWN","Too many failed connection attempts"):(A=A?function(t,e){var n=e*t.reconnectionDelayGrowFactor;return n>t.maxReconnectionDelay?t.maxReconnectionDelay:n}(g,A):a(g),y("handleClose - reconnectDelay:",A),f&&setTimeout(b,A))},b=function(){if(f){y("connect");var n=c,r="function"==typeof t?t():t;for(var i in c=new g.constructor(r,e),u=setTimeout(function(){y("timeout"),c.close(),m("ETIMEDOUT","Connection timeout")},g.connectionTimeout),y("bypass properties"),c)["addEventListener","removeEventListener","close","send"].indexOf(i)<0&&o(c,p,i);c.addEventListener("open",function(){clearTimeout(u),y("open"),A=a(g),y("reconnectDelay:",A),h=0}),c.addEventListener("close",v),function(t,e,n){Object.keys(n).forEach(function(e){n[e].forEach(function(n){var r=n[0],i=n[1];t.addEventListener(e,r,i)})}),e&&s.forEach(function(n){t[n]=e[n]})}(c,n,_),c.onclose=c.onclose||d,d=null}};y("init"),b(),this.close=function(t,e,n){void 0===t&&(t=1e3),void 0===e&&(e="");var r=void 0===n?{}:n,i=r.keepClosed,o=void 0!==i&&i,a=r.fastClose,s=void 0===a||a,l=r.delay,u=void 0===l?0:l;if(y("close - params:",{reason:e,keepClosed:o,fastClose:s,delay:u,retriesCount:h,maxRetries:g.maxRetries}),f=!o&&h<=g.maxRetries,u&&(A=u),c.close(t,e),s){var p={code:t,reason:e,wasClean:!0};v(),c.removeEventListener("close",v),Array.isArray(_.close)&&_.close.forEach(function(t){var e=t[0],n=t[1];e(p),c.removeEventListener("close",e,n)}),c.onclose&&(d=c.onclose,c.onclose(p),c.onclose=null)}},this.send=function(t){c.send(t)},this.addEventListener=function(t,e,n){Array.isArray(_[t])?_[t].some(function(t){return t[0]===e})||_[t].push([e,n]):_[t]=[[e,n]],c.addEventListener(t,e,n)},this.removeEventListener=function(t,e,n){Array.isArray(_[t])&&(_[t]=_[t].filter(function(t){return t[0]!==e})),c.removeEventListener(t,e,n)}};t.exports=l},function(module,__webpack_exports__,__webpack_require__){"use strict";(function(module){function _classCallCheck(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function _defineProperties(t,e){for(var n=0;n0&&void 0!==arguments[0]?arguments[0]:[];_classCallCheck(this,RevisionStore),this.revisions=t,this.currentIdx=t.length-1}return _createClass(RevisionStore,[{key:"addRevision",value:function(t){this.revisions.push(t),this.currentIdx++}},{key:"undo",value:function(){return this.currentIdx>0&&this.currentIdx--,this.current}},{key:"redo",value:function(){return this.currentIdx0&&void 0!==arguments[0]?arguments[0]:{};_classCallCheck(this,LayerWatcher),this.onSourcesChange=t.onSourcesChange||function(){},this.onVectorLayersChange=t.onVectorLayersChange||function(){},this._sources={},this._vectorLayers={},this.throttledAnalyzeVectorLayerFields=lodash_throttle__WEBPACK_IMPORTED_MODULE_0___default()(this.analyzeVectorLayerFields,5e3)}return _createClass(LayerWatcher,[{key:"analyzeMap",value:function(t){var e=this,n=_objectSpread({},this._sources);Object.keys(t.style.sourceCaches).forEach(function(n){e._sources[n]=t.style.sourceCaches[n]._source.vectorLayerIds}),lodash_isequal__WEBPACK_IMPORTED_MODULE_1___default()(n,this._sources)||this.onSourcesChange(this._sources),this.throttledAnalyzeVectorLayerFields(t)}},{key:"analyzeVectorLayerFields",value:function(t){var e=this,n=_objectSpread({},this._vectorLayers);Object.keys(this._sources).forEach(function(n){(e._sources[n]||[]).forEach(function(r){var i=e._vectorLayers[r]||{},o={sourceLayer:r};t.querySourceFeatures(n,o).forEach(function(t){Object.keys(t.properties).forEach(function(e){var n=i[e]||{};n[t.properties[e]]={},i[e]=n})}),e._vectorLayers[r]=i})}),lodash_isequal__WEBPACK_IMPORTED_MODULE_1___default()(n,this._vectorLayers)||this.onVectorLayersChange(this._vectorLayers)}},{key:"__reactstandin__regenerateByEval",value:function __reactstandin__regenerateByEval(key,code){this[key]=eval(code)}},{key:"sources",get:function(){return this._sources}},{key:"vectorLayers",get:function(){return this._vectorLayers}}]),LayerWatcher}();!function(){var t=__webpack_require__(2).default,e=__webpack_require__(2).leaveModule;t&&(t.register(LayerWatcher,"LayerWatcher","/Users/peter.richardson/work/maputnik-editor/src/libs/layerwatcher.js"),e(module))}()}).call(this,__webpack_require__(8)(module))},function(t,e,n){"use strict";function r(t){for(var n in t)e.hasOwnProperty(n)||(e[n]=t[n])}Object.defineProperty(e,"__esModule",{value:!0}),r(n(512)),r(n(187)),r(n(188))},function(t,e,n){"use strict";var r=n(129),i=n.n(r),o=n(14),a=n(5),s=n(54),l=n(20),c=n(32),u=n(31),p=n(29),A=function(t){this.opacity_=t.opacity,this.rotateWithView_=t.rotateWithView,this.rotation_=t.rotation,this.scale_=t.scale};A.prototype.getOpacity=function(){return this.opacity_},A.prototype.getRotateWithView=function(){return this.rotateWithView_},A.prototype.getRotation=function(){return this.rotation_},A.prototype.getScale=function(){return this.scale_},A.prototype.getSnapToPixel=function(){return!1},A.prototype.getAnchor=function(){},A.prototype.getImage=function(t){},A.prototype.getHitDetectionImage=function(t){},A.prototype.getImageState=function(){},A.prototype.getImageSize=function(){},A.prototype.getHitDetectionImageSize=function(){},A.prototype.getOrigin=function(){},A.prototype.getSize=function(){},A.prototype.setOpacity=function(t){this.opacity_=t},A.prototype.setRotateWithView=function(t){this.rotateWithView_=t},A.prototype.setRotation=function(t){this.rotation_=t},A.prototype.setScale=function(t){this.scale_=t},A.prototype.setSnapToPixel=function(t){},A.prototype.listenImageChange=function(t,e){},A.prototype.load=function(){},A.prototype.unlistenImageChange=function(t,e){};var h=A,f=function(t){function e(e){var n=e||{};t.call(this,{points:1/0,fill:n.fill,radius:n.radius,stroke:n.stroke,atlasManager:n.atlasManager})}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype.clone=function(){var t=new e({fill:this.getFill()?this.getFill().clone():void 0,stroke:this.getStroke()?this.getStroke().clone():void 0,radius:this.getRadius(),atlasManager:this.atlasManager_});return t.setOpacity(this.getOpacity()),t.setScale(this.getScale()),t},e.prototype.setRadius=function(t){this.radius_=t,this.render_(this.atlasManager_)},e}(function(t){function e(e){var n=void 0!==e.rotateWithView&&e.rotateWithView;t.call(this,{opacity:1,rotateWithView:n,rotation:void 0!==e.rotation?e.rotation:0,scale:1}),this.checksums_=null,this.canvas_=null,this.hitDetectionCanvas_=null,this.fill_=void 0!==e.fill?e.fill:null,this.origin_=[0,0],this.points_=e.points,this.radius_=void 0!==e.radius?e.radius:e.radius1,this.radius2_=e.radius2,this.angle_=void 0!==e.angle?e.angle:0,this.stroke_=void 0!==e.stroke?e.stroke:null,this.anchor_=null,this.size_=null,this.imageSize_=null,this.hitDetectionImageSize_=null,this.atlasManager_=e.atlasManager,this.render_(this.atlasManager_)}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype.clone=function(){var t=new e({fill:this.getFill()?this.getFill().clone():void 0,points:this.getPoints(),radius:this.getRadius(),radius2:this.getRadius2(),angle:this.getAngle(),stroke:this.getStroke()?this.getStroke().clone():void 0,rotation:this.getRotation(),rotateWithView:this.getRotateWithView(),atlasManager:this.atlasManager_});return t.setOpacity(this.getOpacity()),t.setScale(this.getScale()),t},e.prototype.getAnchor=function(){return this.anchor_},e.prototype.getAngle=function(){return this.angle_},e.prototype.getFill=function(){return this.fill_},e.prototype.getHitDetectionImage=function(t){return this.hitDetectionCanvas_},e.prototype.getImage=function(t){return this.canvas_},e.prototype.getImageSize=function(){return this.imageSize_},e.prototype.getHitDetectionImageSize=function(){return this.hitDetectionImageSize_},e.prototype.getImageState=function(){return u.a.LOADED},e.prototype.getOrigin=function(){return this.origin_},e.prototype.getPoints=function(){return this.points_},e.prototype.getRadius=function(){return this.radius_},e.prototype.getRadius2=function(){return this.radius2_},e.prototype.getSize=function(){return this.size_},e.prototype.getStroke=function(){return this.stroke_},e.prototype.listenImageChange=function(t,e){},e.prototype.load=function(){},e.prototype.unlistenImageChange=function(t,e){},e.prototype.render_=function(t){var e,n,r="",i="",o=0,a=null,u=0,A=0;this.stroke_&&(null===(n=this.stroke_.getColor())&&(n=p.k),n=Object(s.a)(n),void 0===(A=this.stroke_.getWidth())&&(A=p.h),a=this.stroke_.getLineDash(),u=this.stroke_.getLineDashOffset(),c.a||(a=null,u=0),void 0===(i=this.stroke_.getLineJoin())&&(i=p.g),void 0===(r=this.stroke_.getLineCap())&&(r=p.d),void 0===(o=this.stroke_.getMiterLimit())&&(o=p.i));var h=2*(this.radius_+A)+1,f={strokeStyle:n,strokeWidth:A,size:h,lineCap:r,lineDash:a,lineDashOffset:u,lineJoin:i,miterLimit:o};if(void 0===t){var d=Object(l.a)(h,h);this.canvas_=d.canvas,e=h=this.canvas_.width,this.draw_(f,d,0,0),this.createHitDetectionCanvas_(f)}else{h=Math.round(h);var _,g=!this.fill_;g&&(_=this.drawHitDetectionCanvas_.bind(this,f));var y=this.getChecksum(),m=t.add(y,h,h,this.draw_.bind(this,f),_);this.canvas_=m.image,this.origin_=[m.offsetX,m.offsetY],e=m.image.width,g?(this.hitDetectionCanvas_=m.hitImage,this.hitDetectionImageSize_=[m.hitImage.width,m.hitImage.height]):(this.hitDetectionCanvas_=this.canvas_,this.hitDetectionImageSize_=[e,e])}this.anchor_=[h/2,h/2],this.size_=[h,h],this.imageSize_=[e,e]},e.prototype.draw_=function(t,e,n,r){var i,o,a;e.setTransform(1,0,0,1,0,0),e.translate(n,r),e.beginPath();var l=this.points_;if(l===1/0)e.arc(t.size/2,t.size/2,this.radius_,0,2*Math.PI,!0);else{var c=void 0!==this.radius2_?this.radius2_:this.radius_;for(c!==this.radius_&&(l*=2),i=0;i<=l;i++)o=2*i*Math.PI/l-Math.PI/2+this.angle_,a=i%2==0?this.radius_:c,e.lineTo(t.size/2+a*Math.cos(o),t.size/2+a*Math.sin(o))}if(this.fill_){var u=this.fill_.getColor();null===u&&(u=p.b),e.fillStyle=Object(s.a)(u),e.fill()}this.stroke_&&(e.strokeStyle=t.strokeStyle,e.lineWidth=t.strokeWidth,t.lineDash&&(e.setLineDash(t.lineDash),e.lineDashOffset=t.lineDashOffset),e.lineCap=t.lineCap,e.lineJoin=t.lineJoin,e.miterLimit=t.miterLimit,e.stroke()),e.closePath()},e.prototype.createHitDetectionCanvas_=function(t){if(this.hitDetectionImageSize_=[t.size,t.size],this.fill_)this.hitDetectionCanvas_=this.canvas_;else{var e=Object(l.a)(t.size,t.size);this.hitDetectionCanvas_=e.canvas,this.drawHitDetectionCanvas_(t,e,0,0)}},e.prototype.drawHitDetectionCanvas_=function(t,e,n,r){e.setTransform(1,0,0,1,0,0),e.translate(n,r),e.beginPath();var i=this.points_;if(i===1/0)e.arc(t.size/2,t.size/2,this.radius_,0,2*Math.PI,!0);else{var o,a,s,l=void 0!==this.radius2_?this.radius2_:this.radius_;for(l!==this.radius_&&(i*=2),o=0;o<=i;o++)s=2*o*Math.PI/i-Math.PI/2+this.angle_,a=o%2==0?this.radius_:l,e.lineTo(t.size/2+a*Math.cos(s),t.size/2+a*Math.sin(s))}e.fillStyle=p.b,e.fill(),this.stroke_&&(e.strokeStyle=t.strokeStyle,e.lineWidth=t.strokeWidth,t.lineDash&&(e.setLineDash(t.lineDash),e.lineDashOffset=t.lineDashOffset),e.stroke()),e.closePath()},e.prototype.getChecksum=function(){var t=this.stroke_?this.stroke_.getChecksum():"-",e=this.fill_?this.fill_.getChecksum():"-";if(!this.checksums_||t!=this.checksums_[1]||e!=this.checksums_[2]||this.radius_!=this.checksums_[3]||this.radius2_!=this.checksums_[4]||this.angle_!=this.checksums_[5]||this.points_!=this.checksums_[6]){var n="r"+t+e+(void 0!==this.radius_?this.radius_.toString():"-")+(void 0!==this.radius2_?this.radius2_.toString():"-")+(void 0!==this.angle_?this.angle_.toString():"-")+(void 0!==this.points_?this.points_.toString():"-");this.checksums_=[n,t,e,this.radius_,this.radius2_,this.angle_,this.points_]}return this.checksums_[0]},e}(h)),d=n(9),_=n(60),g=function(t){var e=t||{};this.color_=void 0!==e.color?e.color:null,this.checksum_=void 0};g.prototype.clone=function(){var t=this.getColor();return new g({color:t&&t.slice?t.slice():t||void 0})},g.prototype.getColor=function(){return this.color_},g.prototype.setColor=function(t){this.color_=t,this.checksum_=void 0},g.prototype.getChecksum=function(){return void 0===this.checksum_&&(this.color_ instanceof CanvasPattern||this.color_ instanceof CanvasGradient?this.checksum_=Object(d.b)(this.color_).toString():this.checksum_="f"+(this.color_?Object(_.b)(this.color_):"-")),this.checksum_};var y=g,m=function(t){var e=t||{};this.color_=void 0!==e.color?e.color:null,this.lineCap_=e.lineCap,this.lineDash_=void 0!==e.lineDash?e.lineDash:null,this.lineDashOffset_=e.lineDashOffset,this.lineJoin_=e.lineJoin,this.miterLimit_=e.miterLimit,this.width_=e.width,this.checksum_=void 0};m.prototype.clone=function(){var t=this.getColor();return new m({color:t&&t.slice?t.slice():t||void 0,lineCap:this.getLineCap(),lineDash:this.getLineDash()?this.getLineDash().slice():void 0,lineDashOffset:this.getLineDashOffset(),lineJoin:this.getLineJoin(),miterLimit:this.getMiterLimit(),width:this.getWidth()})},m.prototype.getColor=function(){return this.color_},m.prototype.getLineCap=function(){return this.lineCap_},m.prototype.getLineDash=function(){return this.lineDash_},m.prototype.getLineDashOffset=function(){return this.lineDashOffset_},m.prototype.getLineJoin=function(){return this.lineJoin_},m.prototype.getMiterLimit=function(){return this.miterLimit_},m.prototype.getWidth=function(){return this.width_},m.prototype.setColor=function(t){this.color_=t,this.checksum_=void 0},m.prototype.setLineCap=function(t){this.lineCap_=t,this.checksum_=void 0},m.prototype.setLineDash=function(t){this.lineDash_=t,this.checksum_=void 0},m.prototype.setLineDashOffset=function(t){this.lineDashOffset_=t,this.checksum_=void 0},m.prototype.setLineJoin=function(t){this.lineJoin_=t,this.checksum_=void 0},m.prototype.setMiterLimit=function(t){this.miterLimit_=t,this.checksum_=void 0},m.prototype.setWidth=function(t){this.width_=t,this.checksum_=void 0},m.prototype.getChecksum=function(){return void 0===this.checksum_&&(this.checksum_="s",this.color_?"string"==typeof this.color_?this.checksum_+=this.color_:this.checksum_+=Object(d.b)(this.color_).toString():this.checksum_+="-",this.checksum_+=","+(void 0!==this.lineCap_?this.lineCap_.toString():"-")+","+(this.lineDash_?this.lineDash_.toString():"-")+","+(void 0!==this.lineDashOffset_?this.lineDashOffset_:"-")+","+(void 0!==this.lineJoin_?this.lineJoin_:"-")+","+(void 0!==this.miterLimit_?this.miterLimit_.toString():"-")+","+(void 0!==this.width_?this.width_.toString():"-")),this.checksum_};var v=m,b=function(t){var e=t||{};this.geometry_=null,this.geometryFunction_=E,void 0!==e.geometry&&this.setGeometry(e.geometry),this.fill_=void 0!==e.fill?e.fill:null,this.image_=void 0!==e.image?e.image:null,this.renderer_=void 0!==e.renderer?e.renderer:null,this.stroke_=void 0!==e.stroke?e.stroke:null,this.text_=void 0!==e.text?e.text:null,this.zIndex_=e.zIndex};b.prototype.clone=function(){var t=this.getGeometry();return t&&t.clone&&(t=t.clone()),new b({geometry:t,fill:this.getFill()?this.getFill().clone():void 0,image:this.getImage()?this.getImage().clone():void 0,stroke:this.getStroke()?this.getStroke().clone():void 0,text:this.getText()?this.getText().clone():void 0,zIndex:this.getZIndex()})},b.prototype.getRenderer=function(){return this.renderer_},b.prototype.setRenderer=function(t){this.renderer_=t},b.prototype.getGeometry=function(){return this.geometry_},b.prototype.getGeometryFunction=function(){return this.geometryFunction_},b.prototype.getFill=function(){return this.fill_},b.prototype.setFill=function(t){this.fill_=t},b.prototype.getImage=function(){return this.image_},b.prototype.setImage=function(t){this.image_=t},b.prototype.getStroke=function(){return this.stroke_},b.prototype.setStroke=function(t){this.stroke_=t},b.prototype.getText=function(){return this.text_},b.prototype.setText=function(t){this.text_=t},b.prototype.getZIndex=function(){return this.zIndex_},b.prototype.setGeometry=function(t){"function"==typeof t?this.geometryFunction_=t:"string"==typeof t?this.geometryFunction_=function(e){return e.get(t)}:t?void 0!==t&&(this.geometryFunction_=function(){return t}):this.geometryFunction_=E,this.geometry_=t},b.prototype.setZIndex=function(t){this.zIndex_=t};var w=null;function x(t,e){if(!w){var n=new y({color:"rgba(255,255,255,0.4)"}),r=new v({color:"#3399CC",width:1.25});w=[new b({image:new f({fill:n,stroke:r,radius:5}),fill:n,stroke:r})]}return w}function E(t){return t.getGeometry()}var M=b,C=n(4),B=n(7),O={FRACTION:"fraction",PIXELS:"pixels"},k=n(52),P=n(109),I=function(t){function e(e,n,r,i,o,a){t.call(this),this.hitDetectionImage_=null,this.image_=e||new Image,null!==i&&(this.image_.crossOrigin=i),this.canvas_=a?document.createElement("canvas"):null,this.color_=a,this.imageListenerKeys_=null,this.imageState_=o,this.size_=r,this.src_=n,this.tainting_=!1,this.imageState_==u.a.LOADED&&this.determineTainting_()}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype.determineTainting_=function(){var t=Object(l.a)(1,1);try{t.drawImage(this.image_,0,0),t.getImageData(0,0,1,1)}catch(t){this.tainting_=!0}},e.prototype.dispatchChangeEvent_=function(){this.dispatchEvent(B.a.CHANGE)},e.prototype.handleImageError_=function(){this.imageState_=u.a.ERROR,this.unlistenImage_(),this.dispatchChangeEvent_()},e.prototype.handleImageLoad_=function(){this.imageState_=u.a.LOADED,this.size_&&(this.image_.width=this.size_[0],this.image_.height=this.size_[1]),this.size_=[this.image_.width,this.image_.height],this.unlistenImage_(),this.determineTainting_(),this.replaceColor_(),this.dispatchChangeEvent_()},e.prototype.getImage=function(t){return this.canvas_?this.canvas_:this.image_},e.prototype.getImageState=function(){return this.imageState_},e.prototype.getHitDetectionImage=function(t){if(!this.hitDetectionImage_)if(this.tainting_){var e=this.size_[0],n=this.size_[1],r=Object(l.a)(e,n);r.fillRect(0,0,e,n),this.hitDetectionImage_=r.canvas}else this.hitDetectionImage_=this.image_;return this.hitDetectionImage_},e.prototype.getSize=function(){return this.size_},e.prototype.getSrc=function(){return this.src_},e.prototype.load=function(){if(this.imageState_==u.a.IDLE){this.imageState_=u.a.LOADING,this.imageListenerKeys_=[Object(C.b)(this.image_,B.a.ERROR,this.handleImageError_,this),Object(C.b)(this.image_,B.a.LOAD,this.handleImageLoad_,this)];try{this.image_.src=this.src_}catch(t){this.handleImageError_()}}},e.prototype.replaceColor_=function(){if(!this.tainting_&&null!==this.color_){this.canvas_.width=this.image_.width,this.canvas_.height=this.image_.height;var t=this.canvas_.getContext("2d");t.drawImage(this.image_,0,0);for(var e=t.getImageData(0,0,this.image_.width,this.image_.height),n=e.data,r=this.color_[0]/255,i=this.color_[1]/255,o=this.color_[2]/255,a=0,s=n.length;a0,6);var A=void 0!==n.src?u.a.IDLE:u.a.LOADED;this.color_=void 0!==n.color?Object(_.a)(n.color):null,this.iconImage_=function(t,e,n,r,i,o){var a=P.a.get(e,r,o);return a||(a=new I(t,e,n,r,i,o),P.a.set(e,r,o,a)),a}(l,p,c,this.crossOrigin_,A,this.color_),this.offset_=void 0!==n.offset?n.offset:[0,0],this.offsetOrigin_=void 0!==n.offsetOrigin?n.offsetOrigin:T.TOP_LEFT,this.origin_=null,this.size_=void 0!==n.size?n.size:null}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype.clone=function(){return new e({anchor:this.anchor_.slice(),anchorOrigin:this.anchorOrigin_,anchorXUnits:this.anchorXUnits_,anchorYUnits:this.anchorYUnits_,crossOrigin:this.crossOrigin_,color:this.color_&&this.color_.slice?this.color_.slice():this.color_||void 0,src:this.getSrc(),offset:this.offset_.slice(),offsetOrigin:this.offsetOrigin_,size:null!==this.size_?this.size_.slice():void 0,opacity:this.getOpacity(),scale:this.getScale(),rotation:this.getRotation(),rotateWithView:this.getRotateWithView()})},e.prototype.getAnchor=function(){if(this.normalizedAnchor_)return this.normalizedAnchor_;var t=this.anchor_,e=this.getSize();if(this.anchorXUnits_==O.FRACTION||this.anchorYUnits_==O.FRACTION){if(!e)return null;t=this.anchor_.slice(),this.anchorXUnits_==O.FRACTION&&(t[0]*=e[0]),this.anchorYUnits_==O.FRACTION&&(t[1]*=e[1])}if(this.anchorOrigin_!=T.TOP_LEFT){if(!e)return null;t===this.anchor_&&(t=this.anchor_.slice()),this.anchorOrigin_!=T.TOP_RIGHT&&this.anchorOrigin_!=T.BOTTOM_RIGHT||(t[0]=-t[0]+e[0]),this.anchorOrigin_!=T.BOTTOM_LEFT&&this.anchorOrigin_!=T.BOTTOM_RIGHT||(t[1]=-t[1]+e[1])}return this.normalizedAnchor_=t,this.normalizedAnchor_},e.prototype.setAnchor=function(t){this.anchor_=t,this.normalizedAnchor_=null},e.prototype.getColor=function(){return this.color_},e.prototype.getImage=function(t){return this.iconImage_.getImage(t)},e.prototype.getImageSize=function(){return this.iconImage_.getSize()},e.prototype.getHitDetectionImageSize=function(){return this.getImageSize()},e.prototype.getImageState=function(){return this.iconImage_.getImageState()},e.prototype.getHitDetectionImage=function(t){return this.iconImage_.getHitDetectionImage(t)},e.prototype.getOrigin=function(){if(this.origin_)return this.origin_;var t=this.offset_;if(this.offsetOrigin_!=T.TOP_LEFT){var e=this.getSize(),n=this.iconImage_.getSize();if(!e||!n)return null;t=t.slice(),this.offsetOrigin_!=T.TOP_RIGHT&&this.offsetOrigin_!=T.BOTTOM_RIGHT||(t[0]=n[0]-e[0]-t[0]),this.offsetOrigin_!=T.BOTTOM_LEFT&&this.offsetOrigin_!=T.BOTTOM_RIGHT||(t[1]=n[1]-e[1]-t[1])}return this.origin_=t,this.origin_},e.prototype.getSrc=function(){return this.iconImage_.getSrc()},e.prototype.getSize=function(){return this.size_?this.size_:this.iconImage_.getSize()},e.prototype.listenImageChange=function(t,e){return Object(C.a)(this.iconImage_,B.a.CHANGE,t,e)},e.prototype.load=function(){this.iconImage_.load()},e.prototype.unlistenImageChange=function(t,e){Object(C.c)(this.iconImage_,B.a.CHANGE,t,e)},e}(h),L=n(132),S=function(t){var e=t||{};this.font_=e.font,this.rotation_=e.rotation,this.rotateWithView_=e.rotateWithView,this.scale_=e.scale,this.text_=e.text,this.textAlign_=e.textAlign,this.textBaseline_=e.textBaseline,this.fill_=void 0!==e.fill?e.fill:new y({color:"#333"}),this.maxAngle_=void 0!==e.maxAngle?e.maxAngle:Math.PI/4,this.placement_=void 0!==e.placement?e.placement:L.a.POINT,this.overflow_=!!e.overflow,this.stroke_=void 0!==e.stroke?e.stroke:null,this.offsetX_=void 0!==e.offsetX?e.offsetX:0,this.offsetY_=void 0!==e.offsetY?e.offsetY:0,this.backgroundFill_=e.backgroundFill?e.backgroundFill:null,this.backgroundStroke_=e.backgroundStroke?e.backgroundStroke:null,this.padding_=void 0===e.padding?null:e.padding};S.prototype.clone=function(){return new S({font:this.getFont(),placement:this.getPlacement(),maxAngle:this.getMaxAngle(),overflow:this.getOverflow(),rotation:this.getRotation(),rotateWithView:this.getRotateWithView(),scale:this.getScale(),text:this.getText(),textAlign:this.getTextAlign(),textBaseline:this.getTextBaseline(),fill:this.getFill()?this.getFill().clone():void 0,stroke:this.getStroke()?this.getStroke().clone():void 0,offsetX:this.getOffsetX(),offsetY:this.getOffsetY(),backgroundFill:this.getBackgroundFill()?this.getBackgroundFill().clone():void 0,backgroundStroke:this.getBackgroundStroke()?this.getBackgroundStroke().clone():void 0})},S.prototype.getOverflow=function(){return this.overflow_},S.prototype.getFont=function(){return this.font_},S.prototype.getMaxAngle=function(){return this.maxAngle_},S.prototype.getPlacement=function(){return this.placement_},S.prototype.getOffsetX=function(){return this.offsetX_},S.prototype.getOffsetY=function(){return this.offsetY_},S.prototype.getFill=function(){return this.fill_},S.prototype.getRotateWithView=function(){return this.rotateWithView_},S.prototype.getRotation=function(){return this.rotation_},S.prototype.getScale=function(){return this.scale_},S.prototype.getStroke=function(){return this.stroke_},S.prototype.getText=function(){return this.text_},S.prototype.getTextAlign=function(){return this.textAlign_},S.prototype.getTextBaseline=function(){return this.textBaseline_},S.prototype.getBackgroundFill=function(){return this.backgroundFill_},S.prototype.getBackgroundStroke=function(){return this.backgroundStroke_},S.prototype.getPadding=function(){return this.padding_},S.prototype.setOverflow=function(t){this.overflow_=t},S.prototype.setFont=function(t){this.font_=t},S.prototype.setMaxAngle=function(t){this.maxAngle_=t},S.prototype.setOffsetX=function(t){this.offsetX_=t},S.prototype.setOffsetY=function(t){this.offsetY_=t},S.prototype.setPlacement=function(t){this.placement_=t},S.prototype.setFill=function(t){this.fill_=t},S.prototype.setRotation=function(t){this.rotation_=t},S.prototype.setScale=function(t){this.scale_=t},S.prototype.setStroke=function(t){this.stroke_=t},S.prototype.setText=function(t){this.text_=t},S.prototype.setTextAlign=function(t){this.textAlign_=t},S.prototype.setTextBaseline=function(t){this.textBaseline_=t},S.prototype.setBackgroundFill=function(t){this.backgroundFill_=t},S.prototype.setBackgroundStroke=function(t){this.backgroundStroke_=t},S.prototype.setPadding=function(t){this.padding_=t};var z=S,R=n(66),j=["type","source","source-layer","minzoom","maxzoom","filter","layout"];function U(t,e){const n={};for(const e in t)"ref"!==e&&(n[e]=t[e]);return j.forEach(t=>{t in e&&(n[t]=e[t])}),n}var F=function(t){t=t.slice();const e=Object.create(null);for(let n=0;n`${t.key}: ${t.message}`).join(", "));return n.value},Y={},Z={zoom:0},J={};function $(t,e,n,r,i){const o=t.id;J[o]||(J[o]={});const a=J[o];if(!a[n]){let r=(t[e]||Y)[n];const i=Q[`${e}_${t.type}`][n];void 0===r&&(r=i.default);let o=N(r);if(!o&&H(r)&&(r=V(r,i),o=!0),o){const t=X(r,i);a[n]=t.evaluate.bind(t)}else"color"==i.type&&(r=K.Color.parse(r)),a[n]=function(){return r}}return Z.zoom=r,a[n](Z,i)}const tt={};function et(t,e,n,r){return t in tt||(tt[t]=Object(K.featureFilter)(e)),Z.zoom=r,tt[t](Z,n)}const nt={};function rt(t,e){if(t&&void 0!==e){let n=nt[t];n||(nt[t]=n={color:t.toArray(),opacity:t.a}),(t=n.color)[3]=n.opacity*e,0===t[3]&&(t=void 0)}return t}const it=/^([^]*)\{(.*)\}([^]*)$/;function ot(t,e){let n;do{if(n=t.match(it)){const r=e[n[2]]||"";t=n[1]+r+n[3]}}while(n);return t}var at=function(t,e,n,r,o,a,s){if(!r){r=[];for(let t=78271.51696402048;r.length<21;t/=2)r.push(t)}if("string"==typeof e&&(e=JSON.parse(e)),8!=e.version)throw new Error("glStyle version 8 required.");let l,c;if(a){const e=new Image;e.crossOrigin="anonymous",e.onload=function(){l=e,c=[e.width,e.height],t.changed(),e.onload=null},e.src=a}const u=document.createElement("CANVAS").getContext("2d"),p={};function A(t,e,n){const r=n+","+e+","+t;let i=p[r];if(!i){u.font=e;const o=u.measureText("M").width*n,a=t.split(" ");let s="";const l=[];for(let t=0,e=a.length;t=g.maxzoom)continue;const k=g.filter;if(!k||et(C,k,h,u)){let r,a,C,k,P,I;const T=d.index;if(3==p&&"fill"==g.type)if(a=$(g,"paint","fill-opacity",u,h),"fill-pattern"in O){const t=$(g,"paint","fill-pattern",u,h);if(t){const e=ot(t,n);if(l&&o&&o[e]){(I=E[++_])&&I.getFill()&&!I.getStroke()&&!I.getText()||(I=E[_]=new M({fill:new y})),C=I.getFill(),I.setZIndex(T);const t=e+"."+a;let n=x[t];if(!n){const r=o[e],i=document.createElement("canvas");i.width=r.width,i.height=r.height;const s=i.getContext("2d");s.globalAlpha=a,s.drawImage(l,r.x,r.y,r.width,r.height,0,0,r.width,r.height),n=s.createPattern(i,"repeat"),x[t]=n}C.setColor(n)}}}else a=$(g,"paint","fill-opacity",u,h),(r=rt($(g,"paint","fill-color",u,h),a))&&((I=E[++_])&&I.getFill()&&!I.getStroke()&&!I.getText()||(I=E[_]=new M({fill:new y})),(C=I.getFill()).setColor(r),I.setZIndex(T)),"fill-outline-color"in O&&(P=rt($(g,"paint","fill-outline-color",u,h),a)),P&&((I=E[++_])&&I.getStroke()&&!I.getFill()&&!I.getText()||(I=E[_]=new M({stroke:new v})),(k=I.getStroke()).setLineCap(Q.layout_line["line-cap"]),k.setLineJoin(Q.layout_line["line-join"]),k.setMiterLimit(Q.layout_line["line-miter-limit"]),k.setColor(P),k.setWidth(1),k.setLineDash(null),I.setZIndex(T));if(1!=p){r=!("line-pattern"in O)&&"line-color"in O?rt($(g,"paint","line-color",u,h),$(g,"paint","line-opacity",u,h)):void 0;const t="line"==g.type?$(g,"paint","line-width",u,h):1;r&&t>0&&((I=E[++_])&&I.getStroke()&&!I.getFill()&&!I.getText()||(I=E[_]=new M({stroke:new v})),(k=I.getStroke()).setLineCap($(g,"layout","line-cap",u,h)),k.setLineJoin($(g,"layout","line-join",u,h)),k.setMiterLimit($(g,"layout","line-miter-limit",u,h)),k.setColor(r),k.setWidth(t),k.setLineDash(O["line-dasharray"]?$(g,"paint","line-dasharray",u,h).map(function(e){return e*t}):null),I.setZIndex(T))}let L,S,j,U,F=!1,K=null;if((1==p||2==p)&&"icon-image"in B){const i=$(g,"layout","icon-image",u,h);if(i){L=ot(i,n);let a=void 0;if(l&&o&&o[L]){if(2==p){const n=t.getGeometry();if(n.getFlatMidpoint){const t=n.getExtent();Math.sqrt(Math.max(Math.pow((t[2]-t[0])/e,2),Math.pow((t[3]-t[1])/e,2)))>150&&(a=new R.a(n.getFlatMidpoint()))}}if(2!==p||a){(I=E[++_])&&I.getImage()&&!I.getFill()&&!I.getStroke()||(I=E[_]=new M),I.setGeometry(a);const t=$(g,"layout","icon-size",u,h),e=void 0!==O["icon-color"]?$(g,"paint","icon-color",u,h):null;let n=L+"."+t;if(null!==e&&(n+="."+e),!(S=w[n])){const i=o[L];if(null!==e){r=rt(e,1);const o=document.createElement("canvas");o.width=i.width,o.height=i.height;const a=o.getContext("2d");a.drawImage(l,i.x,i.y,i.width,i.height,0,0,i.width,i.height);const s=a.getImageData(0,0,o.width,o.height);for(let t=0,e=s.data.length;t-1?(E.length=_+1,E):void 0};return t.setStyle(C),t.set("mapbox-source",g),t.set("mapbox-layers",_),C},st=n(239),lt=n.n(st),ct=n(18),ut=n(90),pt=n(51),At=n(3),ht=n(92),ft=n(13),dt=n(28),_t=n(93),gt=n(15),yt=n(10);function mt(t,e,n,r){return void 0!==r?(r[0]=t,r[1]=e,r[2]=n,r):[t,e,n]}function vt(t,e,n){return t+"/"+e+"/"+n}function bt(t){return vt(t[0],t[1],t[2])}var wt=[0,0,0],xt=function(t){var e;if(this.minZoom=void 0!==t.minZoom?t.minZoom:0,this.resolutions_=t.resolutions,Object(o.a)(Object(gt.e)(this.resolutions_,function(t,e){return e-t},!0),17),!t.origins)for(var n=0,r=this.resolutions_.length-1;n=this.minZoom;){if(2===this.zoomFactor_?(a=Math.floor(a/2),s=Math.floor(s/2),o=Object(_t.a)(a,a,s,s,r)):o=this.getTileRangeForExtentAndZ(l,c,r),e.call(n,c,o))return!0;--c}return!1},xt.prototype.getExtent=function(){return this.extent_},xt.prototype.getMaxZoom=function(){return this.maxZoom},xt.prototype.getMinZoom=function(){return this.minZoom},xt.prototype.getOrigin=function(t){return this.origin_?this.origin_:this.origins_[t]},xt.prototype.getResolution=function(t){return this.resolutions_[t]},xt.prototype.getResolutions=function(){return this.resolutions_},xt.prototype.getTileCoordChildTileRange=function(t,e,n){if(t[0]>1;i>3)?n.readString():2===t?n.readFloat():3===t?n.readDouble():4===t?n.readVarint64():5===t?n.readVarint():6===t?n.readSVarint():7===t?n.readBoolean():null;e.values.push(r)}}function Me(t,e,n){if(1==t)e.id=n.readVarint();else if(2==t)for(var r=n.readVarint()+n.pos;n.pos>3}s--,1===a||2===a?(l+=t.readSVarint(),c+=t.readSVarint(),1===a&&u>p&&(r.push(u),p=u),n.push(l,c),u+=2):7===a?u>p&&(n.push(n[p],n[p+1]),u+=2):Object(o.a)(!1,59)}u>p&&(r.push(u),p=u)},e.prototype.createFeature_=function(t,e,n){var r,i=e.type;if(0===i)return null;var o=e.id,s=e.properties;s[this.layerName_]=e.layer.name;var l=[],c=[];this.readRawGeometry_(t,e,l,c);var u=function(t,e){var n;1===t?n=1===e?a.a.POINT:a.a.MULTI_POINT:2===t?n=1===e?a.a.LINE_STRING:a.a.MULTI_LINE_STRING:3===t&&(n=a.a.POLYGON);return n}(i,c.length);if(this.featureClass_===we)r=new this.featureClass_(u,l,c,s,o);else{var p;if(u==a.a.POLYGON){for(var A=[],h=0,f=0,d=0,_=c.length;d<_;++d){var g=c[d];Object(se.a)(l,h,g,2)||(A.push(c.slice(f,d)),f=d),h=g}p=A.length>1?new le(l,Kt.a.XY,A):new ne.a(l,Kt.a.XY,c)}else p=u===a.a.POINT?new R.a(l,Kt.a.XY):u===a.a.LINE_STRING?new $t(l,Kt.a.XY):u===a.a.POLYGON?new ne.a(l,Kt.a.XY,c):u===a.a.MULTI_POINT?new ee(l,Kt.a.XY):u===a.a.MULTI_LINE_STRING?new te(l,Kt.a.XY,c):null;r=new this.featureClass_,this.geometryName_&&r.setGeometryName(this.geometryName_);var y=zt(p,!1,this.adaptOptions(n));r.setGeometry(y),r.setId(o),r.setProperties(s)}return r},e.prototype.getLastExtent=function(){return this.extent_},e.prototype.getType=function(){return Rt.ARRAY_BUFFER},e.prototype.readFeatures=function(t,e){var n=this.layers_,r=new de.a(t),i=r.readFields(xe,{}),o=[];for(var a in i)if(!n||-1!=n.indexOf(a)){for(var s=i[a],l=0,c=s.length;l=this.transition_?1:Object(qe.a)(r/this.transition_)},e.prototype.inTransition=function(t){return!!this.transition_&&-1!==this.transitionStarts_[t]},e.prototype.endTransition=function(t){this.transition_&&(this.transitionStarts_[t]=-1)},e}(k.a);function Ye(){var t=Object(l.a)(1,1);return t.fillStyle="rgba(0,0,0,0)",t.fillRect(0,0,1,1),t.canvas}var Ze=function(t){function e(e,n,r,i,o,a){t.call(this,e,n,a),this.crossOrigin_=i,this.src_=r,this.image_=new Image,null!==i&&(this.image_.crossOrigin=i),this.imageListenerKeys_=null,this.tileLoadFunction_=o}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype.disposeInternal=function(){this.state==Ge.a.LOADING&&(this.unlistenImage_(),this.image_=Ye()),this.interimTile&&this.interimTile.dispose(),this.state=Ge.a.ABORT,this.changed(),t.prototype.disposeInternal.call(this)},e.prototype.getImage=function(){return this.image_},e.prototype.getKey=function(){return this.src_},e.prototype.handleImageError_=function(){this.state=Ge.a.ERROR,this.unlistenImage_(),this.image_=Ye(),this.changed()},e.prototype.handleImageLoad_=function(){this.image_.naturalWidth&&this.image_.naturalHeight?this.state=Ge.a.LOADED:this.state=Ge.a.EMPTY,this.unlistenImage_(),this.changed()},e.prototype.load=function(){this.state==Ge.a.ERROR&&(this.state=Ge.a.IDLE,this.image_=new Image,null!==this.crossOrigin_&&(this.image_.crossOrigin=this.crossOrigin_)),this.state==Ge.a.IDLE&&(this.state=Ge.a.LOADING,this.changed(),this.imageListenerKeys_=[Object(C.b)(this.image_,B.a.ERROR,this.handleImageError_,this),Object(C.b)(this.image_,B.a.LOAD,this.handleImageLoad_,this)],this.tileLoadFunction_(this,this.src_))},e.prototype.unlistenImage_=function(){this.imageListenerKeys_.forEach(C.e),this.imageListenerKeys_=null},e}(Xe),Je=function(t){function e(e){t.call(this,e)}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype.expireCache=function(t){for(;this.canExpireCache();){var e=this.peekLast(),n=e.tileCoord[0].toString();if(n in t&&t[n].contains(e.tileCoord))break;this.pop().dispose()}},e.prototype.pruneExceptNewestZ=function(){if(0!==this.getCount()){var t=function(t){return t.split("/").map(Number)}(this.peekFirstKey())[0];this.forEach(function(e){e.tileCoord[0]!==t&&(this.remove(bt(e.tileCoord)),e.dispose())},this)}},e}(n(131).a);function $e(t,e,n,r){var i=n-t,o=r-e,a=Math.sqrt(i*i+o*o);return[Math.round(n+i/a),Math.round(r+o/a)]}var tn=function(t,e,n,r,i){this.sourceProj_=t,this.targetProj_=e;var o={},a=Object(ct.f)(this.targetProj_,this.sourceProj_);this.transformInv_=function(t){var e=t[0]+"/"+t[1];return o[e]||(o[e]=a(t)),o[e]},this.maxSourceExtent_=r,this.errorThresholdSquared_=i*i,this.triangles_=[],this.wrapsXInSource_=!1,this.canWrapXInSource_=this.sourceProj_.canWrapX()&&!!r&&!!this.sourceProj_.getExtent()&&Object(At.E)(r)==Object(At.E)(this.sourceProj_.getExtent()),this.sourceWorldWidth_=this.sourceProj_.getExtent()?Object(At.E)(this.sourceProj_.getExtent()):null,this.targetWorldWidth_=this.targetProj_.getExtent()?Object(At.E)(this.targetProj_.getExtent()):null;var s=Object(At.C)(n),l=Object(At.D)(n),c=Object(At.w)(n),u=Object(At.v)(n),p=this.transformInv_(s),A=this.transformInv_(l),h=this.transformInv_(c),f=this.transformInv_(u);if(this.addQuad_(s,l,c,u,p,A,h,f,10),this.wrapsXInSource_){var d=1/0;this.triangles_.forEach(function(t,e,n){d=Math.min(d,t.source[0][0],t.source[1][0],t.source[2][0])}),this.triangles_.forEach(function(t){if(Math.max(t.source[0][0],t.source[1][0],t.source[2][0])-d>this.sourceWorldWidth_/2){var e=[[t.source[0][0],t.source[0][1]],[t.source[1][0],t.source[1][1]],[t.source[2][0],t.source[2][1]]];e[0][0]-d>this.sourceWorldWidth_/2&&(e[0][0]-=this.sourceWorldWidth_),e[1][0]-d>this.sourceWorldWidth_/2&&(e[1][0]-=this.sourceWorldWidth_),e[2][0]-d>this.sourceWorldWidth_/2&&(e[2][0]-=this.sourceWorldWidth_);var n=Math.min(e[0][0],e[1][0],e[2][0]);Math.max(e[0][0],e[1][0],e[2][0])-n.5&&u<1,h=!1;if(l>0){if(this.targetProj_.isGlobal()&&this.targetWorldWidth_){var f=Object(At.b)([t,e,n,r]);h|=Object(At.E)(f)/this.targetWorldWidth_>.25}!A&&this.sourceProj_.isGlobal()&&u&&(h|=u>.25)}if(h||!this.maxSourceExtent_||Object(At.F)(c,this.maxSourceExtent_)){if(!(h||isFinite(i[0])&&isFinite(i[1])&&isFinite(o[0])&&isFinite(o[1])&&isFinite(a[0])&&isFinite(a[1])&&isFinite(s[0])&&isFinite(s[1]))){if(!(l>0))return;h=!0}if(l>0){if(!h){var d,_=[(t[0]+n[0])/2,(t[1]+n[1])/2],g=this.transformInv_(_);if(A)d=(Object(yt.d)(i[0],p)+Object(yt.d)(a[0],p))/2-Object(yt.d)(g[0],p);else d=(i[0]+a[0])/2-g[0];var y=(i[1]+a[1])/2-g[1];h=d*d+y*y>this.errorThresholdSquared_}if(h){if(Math.abs(t[0]-n[0])<=Math.abs(t[1]-n[1])){var m=[(e[0]+n[0])/2,(e[1]+n[1])/2],v=this.transformInv_(m),b=[(r[0]+t[0])/2,(r[1]+t[1])/2],w=this.transformInv_(b);this.addQuad_(t,e,m,b,i,o,v,w,l-1),this.addQuad_(b,m,n,r,w,v,a,s,l-1)}else{var x=[(t[0]+e[0])/2,(t[1]+e[1])/2],E=this.transformInv_(x),M=[(n[0]+r[0])/2,(n[1]+r[1])/2],C=this.transformInv_(M);this.addQuad_(t,x,M,r,i,E,C,s,l-1),this.addQuad_(x,e,n,M,E,o,a,C,l-1)}return}}if(A){if(!this.canWrapXInSource_)return;this.wrapsXInSource_=!0}this.addTriangle_(t,n,r,i,a,s),this.addTriangle_(t,e,n,i,o,a)}},tn.prototype.calculateSourceExtent=function(){var t=Object(At.j)();return this.triangles_.forEach(function(e,n,r){var i=e.source;Object(At.r)(t,i[0]),Object(At.r)(t,i[1]),Object(At.r)(t,i[2])}),t},tn.prototype.getTriangles=function(){return this.triangles_};var en=tn,nn=function(t){function e(e,n,r,i,o,a,s,l,c,u,p){t.call(this,o,Ge.a.IDLE),this.renderEdges_=void 0!==p&&p,this.pixelRatio_=s,this.gutter_=l,this.canvas_=null,this.sourceTileGrid_=n,this.targetTileGrid_=i,this.wrappedTileCoord_=a||o,this.sourceTiles_=[],this.sourcesListenerKeys_=null,this.sourceZ_=0;var A=i.getTileCoordExtent(this.wrappedTileCoord_),h=this.targetTileGrid_.getExtent(),f=this.sourceTileGrid_.getExtent(),d=h?Object(At.B)(A,h):A;if(0!==Object(At.u)(d)){var _=e.getExtent();_&&(f=f?Object(At.B)(f,_):_);var g=i.getResolution(this.wrappedTileCoord_[0]),y=function(t,e,n,r){var i=Object(ct.h)(n,e,t),o=Object(ct.e)(e,r,n),a=e.getMetersPerUnit();void 0!==a&&(o*=a);var s=t.getMetersPerUnit();void 0!==s&&(o/=s);var l=t.getExtent();if(!l||Object(At.f)(l,i)){var c=Object(ct.e)(t,o,i)/o;isFinite(c)&&c>0&&(o/=c)}return o}(e,r,Object(At.x)(d),g);if(!isFinite(y)||y<=0)this.state=Ge.a.EMPTY;else{var m=void 0!==u?u:Ne.b;if(this.triangulation_=new en(e,r,d,f,y*m),0!==this.triangulation_.getTriangles().length){this.sourceZ_=n.getZForResolution(y);var v=this.triangulation_.calculateSourceExtent();if(f&&(e.canWrapX()?(v[1]=Object(yt.a)(v[1],f[1],f[3]),v[3]=Object(yt.a)(v[3],f[1],f[3])):v=Object(At.B)(v,f)),Object(At.u)(v)){for(var b=n.getTileRangeForExtentAndZ(v,this.sourceZ_),w=b.minX;w<=b.maxX;w++)for(var x=b.minY;x<=b.maxY;x++){var E=c(this.sourceZ_,w,x,s);E&&this.sourceTiles_.push(E)}0===this.sourceTiles_.length&&(this.state=Ge.a.EMPTY)}else this.state=Ge.a.EMPTY}else this.state=Ge.a.EMPTY}}else this.state=Ge.a.EMPTY}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype.disposeInternal=function(){this.state==Ge.a.LOADING&&this.unlistenSources_(),t.prototype.disposeInternal.call(this)},e.prototype.getImage=function(){return this.canvas_},e.prototype.reproject_=function(){var t=[];if(this.sourceTiles_.forEach(function(e,n,r){e&&e.getState()==Ge.a.LOADED&&t.push({extent:this.sourceTileGrid_.getTileCoordExtent(e.tileCoord),image:e.getImage()})}.bind(this)),this.sourceTiles_.length=0,0===t.length)this.state=Ge.a.ERROR;else{var e=this.wrappedTileCoord_[0],n=this.targetTileGrid_.getTileSize(e),r="number"==typeof n?n:n[0],i="number"==typeof n?n:n[1],o=this.targetTileGrid_.getResolution(e),a=this.sourceTileGrid_.getResolution(this.sourceZ_),s=this.targetTileGrid_.getTileCoordExtent(this.wrappedTileCoord_);this.canvas_=function(t,e,n,r,i,o,a,s,c,u,p){var A=Object(l.a)(Math.round(n*t),Math.round(n*e));if(0===c.length)return A.canvas;A.scale(n,n);var h=Object(At.j)();c.forEach(function(t,e,n){Object(At.q)(h,t.extent)});var f=Object(At.E)(h),d=Object(At.A)(h),_=Object(l.a)(Math.round(n*f/r),Math.round(n*d/r)),g=n/r;c.forEach(function(t,e,n){var r=t.extent[0]-h[0],i=-(t.extent[3]-h[3]),o=Object(At.E)(t.extent),a=Object(At.A)(t.extent);_.drawImage(t.image,u,u,t.image.width-2*u,t.image.height-2*u,r*g,i*g,o*g,a*g)});var y=Object(At.C)(a);return s.getTriangles().forEach(function(t,e,i){var a=t.source,s=t.target,l=a[0][0],c=a[0][1],u=a[1][0],p=a[1][1],f=a[2][0],d=a[2][1],g=(s[0][0]-y[0])/o,m=-(s[0][1]-y[1])/o,v=(s[1][0]-y[0])/o,b=-(s[1][1]-y[1])/o,w=(s[2][0]-y[0])/o,x=-(s[2][1]-y[1])/o,E=l,M=c;l=0,c=0;var C=[[u-=E,p-=M,0,0,v-g],[f-=E,d-=M,0,0,w-g],[0,0,u,p,b-m],[0,0,f,d,x-m]],B=Object(yt.e)(C);if(B){A.save(),A.beginPath();var O=(g+v+w)/3,k=(m+b+x)/3,P=$e(O,k,g,m),I=$e(O,k,v,b),T=$e(O,k,w,x);A.moveTo(I[0],I[1]),A.lineTo(P[0],P[1]),A.lineTo(T[0],T[1]),A.clip(),A.transform(B[0],B[2],B[1],B[3],g,m),A.translate(h[0]-E,h[3]-M),A.scale(r/n,-r/n),A.drawImage(_.canvas,0,0),A.restore()}}),p&&(A.save(),A.strokeStyle="black",A.lineWidth=1,s.getTriangles().forEach(function(t,e,n){var r=t.target,i=(r[0][0]-y[0])/o,a=-(r[0][1]-y[1])/o,s=(r[1][0]-y[0])/o,l=-(r[1][1]-y[1])/o,c=(r[2][0]-y[0])/o,u=-(r[2][1]-y[1])/o;A.beginPath(),A.moveTo(s,l),A.lineTo(i,a),A.lineTo(c,u),A.closePath(),A.stroke()}),A.restore()),A.canvas}(r,i,this.pixelRatio_,a,this.sourceTileGrid_.getExtent(),o,s,this.triangulation_,t,this.gutter_,this.renderEdges_),this.state=Ge.a.LOADED}this.changed()},e.prototype.load=function(){if(this.state==Ge.a.IDLE){this.state=Ge.a.LOADING,this.changed();var t=0;this.sourcesListenerKeys_=[],this.sourceTiles_.forEach(function(e,n,r){var i=e.getState();if(i==Ge.a.IDLE||i==Ge.a.LOADING){t++;var o=Object(C.a)(e,B.a.CHANGE,function(n){var r=e.getState();r!=Ge.a.LOADED&&r!=Ge.a.ERROR&&r!=Ge.a.EMPTY||(Object(C.e)(o),0===--t&&(this.unlistenSources_(),this.reproject_()))},this);this.sourcesListenerKeys_.push(o)}}.bind(this)),this.sourceTiles_.forEach(function(t,e,n){t.getState()==Ge.a.IDLE&&t.load()}),0===t&&setTimeout(this.reproject_.bind(this),0)}},e.prototype.unlistenSources_=function(){this.sourcesListenerKeys_.forEach(C.e),this.sourcesListenerKeys_=null},e}(Xe),rn=n(25),on=function(t){function e(e){t.call(this),this.projection_=Object(ct.d)(e.projection),this.attributions_=this.adaptAttributions_(e.attributions),this.loading=!1,this.state_=void 0!==e.state?e.state:Ve.a.READY,this.wrapX_=void 0!==e.wrapX&&e.wrapX}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype.adaptAttributions_=function(t){return t?Array.isArray(t)?function(e){return t}:"function"==typeof t?t:function(e){return[t]}:null},e.prototype.getAttributions=function(){return this.attributions_},e.prototype.getProjection=function(){return this.projection_},e.prototype.getResolutions=function(){},e.prototype.getState=function(){return this.state_},e.prototype.getWrapX=function(){return this.wrapX_},e.prototype.refresh=function(){this.changed()},e.prototype.setAttributions=function(t){this.attributions_=this.adaptAttributions_(t),this.changed()},e.prototype.setState=function(t){this.state_=t,this.changed()},e}(It.a);on.prototype.forEachFeatureAtCoordinate=ge.c;var an=on,sn=function(t){function e(e){t.call(this,{attributions:e.attributions,extent:e.extent,projection:e.projection,state:e.state,wrapX:e.wrapX}),this.opaque_=void 0!==e.opaque&&e.opaque,this.tilePixelRatio_=void 0!==e.tilePixelRatio?e.tilePixelRatio:1,this.tileGrid=void 0!==e.tileGrid?e.tileGrid:null,this.tileCache=new Je(e.cacheSize),this.tmpSize=[0,0],this.key_="",this.tileOptions={transition:e.transition}}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype.canExpireCache=function(){return this.tileCache.canExpireCache()},e.prototype.expireCache=function(t,e){var n=this.getTileCacheForProjection(t);n&&n.expireCache(e)},e.prototype.forEachLoadedTile=function(t,e,n,r){var i=this.getTileCacheForProjection(t);if(!i)return!1;for(var o,a,s,l=!0,c=n.minX;c<=n.maxX;++c)for(var u=n.minY;u<=n.maxY;++u)a=vt(e,c,u),s=!1,i.containsKey(a)&&(s=(o=i.get(a)).getState()===Ge.a.LOADED)&&(s=!1!==r(o)),s||(l=!1);return l},e.prototype.getGutterForProjection=function(t){return 0},e.prototype.getKey=function(){return this.key_},e.prototype.setKey=function(t){this.key_!==t&&(this.key_=t,this.changed())},e.prototype.getOpaque=function(t){return this.opaque_},e.prototype.getResolutions=function(){return this.tileGrid.getResolutions()},e.prototype.getTile=function(t,e,n,r,i){},e.prototype.getTileGrid=function(){return this.tileGrid},e.prototype.getTileGridForProjection=function(t){return this.tileGrid?this.tileGrid:Mt(t)},e.prototype.getTileCacheForProjection=function(t){var e=this.getProjection();return e&&!Object(ct.b)(e,t)?null:this.tileCache},e.prototype.getTilePixelRatio=function(t){return this.tilePixelRatio_},e.prototype.getTilePixelSize=function(t,e,n){var r=this.getTileGridForProjection(n),i=this.getTilePixelRatio(e),o=Object(pt.c)(r.getTileSize(t),this.tmpSize);return 1==i?o:Object(pt.b)(o,i,this.tmpSize)},e.prototype.getTileCoordForTileUrlFunction=function(t,e){var n=void 0!==e?e:this.getProjection(),r=this.getTileGridForProjection(n);return this.getWrapX()&&n.isGlobal()&&(t=function(t,e,n){var r=e[0],i=t.getTileCoordCenter(e),o=kt(n);if(Object(At.f)(o,i))return e;var a=Object(At.E)(o),s=Math.ceil((o[0]-i[0])/a);return i[0]+=a*s,t.getTileCoordForCoordAndZ(i,r)}(r,t,n)),function(t,e){var n=t[0],r=t[1],i=t[2];if(e.getMinZoom()>n||n>e.getMaxZoom())return!1;var o,a=e.getExtent();return!(o=a?e.getTileRangeForExtentAndZ(a,n):e.getFullTileRange(n))||o.containsXY(r,i)}(t,r)?t:null},e.prototype.refresh=function(){this.tileCache.clear(),this.changed()},e}(an);sn.prototype.useTile=ge.c;var ln=function(t){function e(e,n){t.call(this,e),this.tile=n}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e}(rn.a),cn="tileloadstart",un="tileloadend",pn="tileloaderror",An=function(t){function e(e){t.call(this,{attributions:e.attributions,cacheSize:e.cacheSize,extent:e.extent,opaque:e.opaque,projection:e.projection,state:e.state,tileGrid:e.tileGrid,tilePixelRatio:e.tilePixelRatio,wrapX:e.wrapX,transition:e.transition}),this.tileLoadFunction=e.tileLoadFunction,this.tileUrlFunction=this.fixedTileUrlFunction?this.fixedTileUrlFunction.bind(this):He,this.urls=null,e.urls?this.setUrls(e.urls):e.url&&this.setUrl(e.url),e.tileUrlFunction&&this.setTileUrlFunction(e.tileUrlFunction),this.tileLoadingKeys_={}}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype.getTileLoadFunction=function(){return this.tileLoadFunction},e.prototype.getTileUrlFunction=function(){return this.tileUrlFunction},e.prototype.getUrls=function(){return this.urls},e.prototype.handleTileChange=function(t){var e,n=t.target,r=Object(d.b)(n),i=n.getState();i==Ge.a.LOADING?(this.tileLoadingKeys_[r]=!0,e=cn):r in this.tileLoadingKeys_&&(delete this.tileLoadingKeys_[r],e=i==Ge.a.ERROR?pn:i==Ge.a.LOADED||i==Ge.a.ABORT?un:void 0),void 0!=e&&this.dispatchEvent(new ln(e,n))},e.prototype.setTileLoadFunction=function(t){this.tileCache.clear(),this.tileLoadFunction=t,this.changed()},e.prototype.setTileUrlFunction=function(t,e){this.tileUrlFunction=t,this.tileCache.pruneExceptNewestZ(),void 0!==e?this.setKey(e):this.changed()},e.prototype.setUrl=function(t){var e=this.urls=function(t){var e=[],n=/\{([a-z])-([a-z])\}/.exec(t);if(n){var r,i=n[1].charCodeAt(0),o=n[2].charCodeAt(0);for(r=i;r<=o;++r)e.push(t.replace(n[0],String.fromCharCode(r)));return e}if(n=n=/\{(\d+)-(\d+)\}/.exec(t)){for(var a=parseInt(n[2],10),s=parseInt(n[1],10);s<=a;s++)e.push(t.replace(n[0],s.toString()));return e}return e.push(t),e}(t);this.setTileUrlFunction(this.fixedTileUrlFunction?this.fixedTileUrlFunction.bind(this):We(e,this.tileGrid),t)},e.prototype.setUrls=function(t){this.urls=t;var e=t.join("\n");this.setTileUrlFunction(this.fixedTileUrlFunction?this.fixedTileUrlFunction.bind(this):We(t,this.tileGrid),e)},e.prototype.useTile=function(t,e,n){var r=vt(t,e,n);this.tileCache.containsKey(r)&&this.tileCache.get(r)},e}(sn);An.prototype.fixedTileUrlFunction;var hn=An;function fn(t,e){t.getImage().src=e}var dn=function(t){function e(e){t.call(this,{attributions:e.attributions,cacheSize:e.cacheSize,extent:e.extent,opaque:e.opaque,projection:e.projection,state:e.state,tileGrid:e.tileGrid,tileLoadFunction:e.tileLoadFunction?e.tileLoadFunction:fn,tilePixelRatio:e.tilePixelRatio,tileUrlFunction:e.tileUrlFunction,url:e.url,urls:e.urls,wrapX:e.wrapX,transition:e.transition}),this.crossOrigin=void 0!==e.crossOrigin?e.crossOrigin:null,this.tileClass=void 0!==e.tileClass?e.tileClass:Ze,this.tileCacheForProjection={},this.tileGridForProjection={},this.reprojectionErrorThreshold_=e.reprojectionErrorThreshold,this.renderReprojectionEdges_=!1}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype.canExpireCache=function(){if(!Ne.a)return t.prototype.canExpireCache.call(this);if(this.tileCache.canExpireCache())return!0;for(var e in this.tileCacheForProjection)if(this.tileCacheForProjection[e].canExpireCache())return!0;return!1},e.prototype.expireCache=function(e,n){if(Ne.a){var r=this.getTileCacheForProjection(e);for(var i in this.tileCache.expireCache(this.tileCache==r?n:{}),this.tileCacheForProjection){var o=this.tileCacheForProjection[i];o.expireCache(o==r?n:{})}}else t.prototype.expireCache.call(this,e,n)},e.prototype.getGutterForProjection=function(t){return Ne.a&&this.getProjection()&&t&&!Object(ct.b)(this.getProjection(),t)?0:this.getGutter()},e.prototype.getGutter=function(){return 0},e.prototype.getOpaque=function(e){return!(Ne.a&&this.getProjection()&&e&&!Object(ct.b)(this.getProjection(),e))&&t.prototype.getOpaque.call(this,e)},e.prototype.getTileGridForProjection=function(e){if(!Ne.a)return t.prototype.getTileGridForProjection.call(this,e);var n=this.getProjection();if(!this.tileGrid||n&&!Object(ct.b)(n,e)){var r=Object(d.b)(e).toString();return r in this.tileGridForProjection||(this.tileGridForProjection[r]=Mt(e)),this.tileGridForProjection[r]}return this.tileGrid},e.prototype.getTileCacheForProjection=function(e){if(!Ne.a)return t.prototype.getTileCacheForProjection.call(this,e);var n=this.getProjection();if(!n||Object(ct.b)(n,e))return this.tileCache;var r=Object(d.b)(e).toString();return r in this.tileCacheForProjection||(this.tileCacheForProjection[r]=new Je(this.tileCache.highWaterMark)),this.tileCacheForProjection[r]},e.prototype.createTile_=function(t,e,n,r,i,o){var a=[t,e,n],s=this.getTileCoordForTileUrlFunction(a,i),l=s?this.tileUrlFunction(s,r,i):void 0,c=new this.tileClass(a,void 0!==l?Ge.a.IDLE:Ge.a.EMPTY,void 0!==l?l:"",this.crossOrigin,this.tileLoadFunction,this.tileOptions);return c.key=o,Object(C.a)(c,B.a.CHANGE,this.handleTileChange,this),c},e.prototype.getTile=function(t,e,n,r,i){var o=this.getProjection();if(Ne.a&&o&&i&&!Object(ct.b)(o,i)){var a,s=this.getTileCacheForProjection(i),l=[t,e,n],c=bt(l);s.containsKey(c)&&(a=s.get(c));var u=this.getKey();if(a&&a.key==u)return a;var p=this.getTileGridForProjection(o),A=this.getTileGridForProjection(i),h=this.getTileCoordForTileUrlFunction(l,i),f=new nn(o,p,i,A,l,h,this.getTilePixelRatio(r),this.getGutter(),function(t,e,n,r){return this.getTileInternal(t,e,n,r,o)}.bind(this),this.reprojectionErrorThreshold_,this.renderReprojectionEdges_);return f.key=u,a?(f.interimTile=a,f.refreshInterimChain(),s.replace(c,f)):s.set(c,f),f}return this.getTileInternal(t,e,n,r,o||i)},e.prototype.getTileInternal=function(t,e,n,r,i){var o=null,a=vt(t,e,n),s=this.getKey();if(this.tileCache.containsKey(a)){if((o=this.tileCache.get(a)).key!=s){var l=o;o=this.createTile_(t,e,n,r,i,s),l.getState()==Ge.a.IDLE?o.interimTile=l.interimTile:o.interimTile=l,o.refreshInterimChain(),this.tileCache.replace(a,o)}}else o=this.createTile_(t,e,n,r,i,s),this.tileCache.set(a,o);return o},e.prototype.setRenderReprojectionEdges=function(t){if(Ne.a&&this.renderReprojectionEdges_!=t){for(var e in this.renderReprojectionEdges_=t,this.tileCacheForProjection)this.tileCacheForProjection[e].clear();this.changed()}},e.prototype.setTileGridForProjection=function(t,e){if(Ne.a){var n=Object(ct.d)(t);if(n){var r=Object(d.b)(n).toString();r in this.tileGridForProjection||(this.tileGridForProjection[r]=e)}}},e}(hn),_n=function(t){function e(e){if(t.call(this,{attributions:e.attributions,cacheSize:e.cacheSize,crossOrigin:e.crossOrigin,projection:Object(ct.d)("EPSG:3857"),reprojectionErrorThreshold:e.reprojectionErrorThreshold,state:Ve.a.LOADING,tileLoadFunction:e.tileLoadFunction,wrapX:void 0===e.wrapX||e.wrapX,transition:e.transition}),this.tileJSON_=null,e.url)if(e.jsonp)!function(t,e,n,r){var i=document.createElement("script"),o="olc_"+Object(d.b)(e);function a(){delete window[o],i.parentNode.removeChild(i)}i.async=!0,i.src=t+(-1==t.indexOf("?")?"?":"&")+(r||"callback")+"="+o;var s=setTimeout(function(){a(),n&&n()},1e4);window[o]=function(t){clearTimeout(s),a(),e(t)},document.getElementsByTagName("head")[0].appendChild(i)}(e.url,this.handleTileJSONResponse.bind(this),this.handleTileJSONError.bind(this));else{var n=new XMLHttpRequest;n.addEventListener("load",this.onXHRLoad_.bind(this)),n.addEventListener("error",this.onXHRError_.bind(this)),n.open("GET",e.url),n.send()}else e.tileJSON?this.handleTileJSONResponse(e.tileJSON):Object(o.a)(!1,51)}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype.onXHRLoad_=function(t){var e=t.target;if(!e.status||e.status>=200&&e.status<300){var n;try{n=JSON.parse(e.responseText)}catch(t){return void this.handleTileJSONError()}this.handleTileJSONResponse(n)}else this.handleTileJSONError()},e.prototype.onXHRError_=function(t){this.handleTileJSONError()},e.prototype.getTileJSON=function(){return this.tileJSON_},e.prototype.handleTileJSONResponse=function(t){var e,n=Object(ct.d)("EPSG:4326"),r=this.getProjection();if(void 0!==t.bounds){var i=Object(ct.g)(n,r);e=Object(At.a)(t.bounds,i)}var o=t.minzoom||0,a=t.maxzoom||22,s=Ct({extent:kt(r),maxZoom:a,minZoom:o});if(this.tileGrid=s,this.tileUrlFunction=We(t.tiles,s),void 0!==t.attribution&&!this.getAttributions()){var l=void 0!==e?e:n.getExtent();this.setAttributions(function(e){return Object(At.F)(l,e.extent)?[t.attribution]:null})}this.tileJSON_=t,this.setState(Ve.a.READY)},e.prototype.handleTileJSONError=function(){this.setState(Ve.a.ERROR)},e}(dn),gn=n(35),yn=n(41),mn=n(71);function vn(t,e,n,r){return function(i,o,a){var s=new XMLHttpRequest;s.open("GET","function"==typeof t?t(i,o,a):t,!0),e.getType()==Rt.ARRAY_BUFFER&&(s.responseType="arraybuffer"),s.onload=function(t){if(!s.status||s.status>=200&&s.status<300){var i,o=e.getType();o==Rt.JSON||o==Rt.TEXT?i=s.responseText:o==Rt.XML?(i=s.responseXML)||(i=(new DOMParser).parseFromString(s.responseText,"application/xml")):o==Rt.ARRAY_BUFFER&&(i=s.response),i?n.call(this,e.readFeatures(i,{featureProjection:a}),e.readProjection(i),e.getLastExtent()):r.call(this)}else r.call(this)}.bind(this),s.onerror=function(){r.call(this)}.bind(this),s.send()}}function bn(t,e){return[[-1/0,-1/0,1/0,1/0]]}var wn="addfeature",xn="changefeature",En="clear",Mn="removefeature",Cn=n(100),Bn=n.n(Cn),On=function(t){this.rbush_=Bn()(t,void 0),this.items_={}};On.prototype.insert=function(t,e){var n={minX:t[0],minY:t[1],maxX:t[2],maxY:t[3],value:e};this.rbush_.insert(n),this.items_[Object(d.b)(e)]=n},On.prototype.load=function(t,e){for(var n=new Array(e.length),r=0,i=e.length;r=.5&&Object(At.A)(e)/y>=.5){++b;var r=t.toString(),i=p[r];if(!i&&!v){var s=l(t,A,h);i=p[r]=new f(t,void 0==s?Ge.a.EMPTY:Ge.a.IDLE,void 0==s?"":s,o,a),this.sourceTileListenerKeys_.push(Object(C.a)(i,B.a.CHANGE,d))}!i||v&&i.getState()!=Ge.a.LOADED||(i.consumers++,this.tileKeys.push(r))}}.bind(this)),v&&b==this.tileKeys.length&&this.finishLoading_(),_<=n[0]&&this.state!=Ge.a.LOADED)for(;_>u.getMinZoom();){var w=new e(n,r,i,o,a,s,l,c,u,p,A,h,f,ge.c,--_);if(w.state==Ge.a.LOADED){this.interimTile=w;break}}}}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype.disposeInternal=function(){this.state=Ge.a.ABORT,this.changed(),this.interimTile&&this.interimTile.dispose();for(var e=0,n=this.tileKeys.length;e=0;--n){var r=this.getTile(this.tileKeys[n]).getState();r!=Ge.a.LOADED&&--t,r==Ge.a.EMPTY&&++e}t==this.tileKeys.length?(this.loadListenerKeys_.forEach(C.e),this.loadListenerKeys_.length=0,this.setState(Ge.a.LOADED)):this.setState(e==this.tileKeys.length?Ge.a.EMPTY:Ge.a.ERROR)},e}(Xe);function Dn(t,e){var n=vn(e,t.getFormat(),t.onLoad.bind(t),t.onError.bind(t));t.setLoader(n)}var Ln=[0,0,4096,4096],Sn=function(t){function e(e,n,r,i,o,a){t.call(this,e,n,a),this.consumers=0,this.extent_=null,this.format_=i,this.features_=null,this.loader_,this.projection_=null,this.replayGroups_={},this.tileLoadFunction_=o,this.url_=r}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype.disposeInternal=function(){this.features_=null,this.replayGroups_={},this.state=Ge.a.ABORT,this.changed(),t.prototype.disposeInternal.call(this)},e.prototype.getExtent=function(){return this.extent_||Ln},e.prototype.getFormat=function(){return this.format_},e.prototype.getFeatures=function(){return this.features_},e.prototype.getKey=function(){return this.url_},e.prototype.getProjection=function(){return this.projection_},e.prototype.getReplayGroup=function(t,e){return this.replayGroups_[Object(d.b)(t)+","+e]},e.prototype.load=function(){this.state==Ge.a.IDLE&&(this.setState(Ge.a.LOADING),this.tileLoadFunction_(this,this.url_),this.loader_(null,NaN,null))},e.prototype.onLoad=function(t,e,n){this.setProjection(e),this.setFeatures(t),this.setExtent(n)},e.prototype.onError=function(){this.setState(Ge.a.ERROR)},e.prototype.setExtent=function(t){this.extent_=t},e.prototype.setFeatures=function(t){this.features_=t,this.setState(Ge.a.LOADED)},e.prototype.setProjection=function(t){this.projection_=t},e.prototype.setReplayGroup=function(t,e,n){this.replayGroups_[Object(d.b)(t)+","+e]=n},e.prototype.setLoader=function(t){this.loader_=t},e}(Xe),zn=function(t){function e(e){var n=e.projection||"EPSG:3857",r=e.extent||kt(n),i=e.tileGrid||Ct({extent:r,maxZoom:e.maxZoom||22,minZoom:e.minZoom,tileSize:e.tileSize||512});t.call(this,{attributions:e.attributions,cacheSize:void 0!==e.cacheSize?e.cacheSize:128,extent:r,opaque:!1,projection:n,state:e.state,tileGrid:i,tileLoadFunction:e.tileLoadFunction?e.tileLoadFunction:Dn,tileUrlFunction:e.tileUrlFunction,url:e.url,urls:e.urls,wrapX:void 0===e.wrapX||e.wrapX,transition:e.transition}),this.format_=e.format?e.format:null,this.sourceTiles_={},this.overlaps_=void 0==e.overlaps||e.overlaps,this.tileClass=e.tileClass?e.tileClass:Sn,this.tileGrids_={}}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype.getOverlaps=function(){return this.overlaps_},e.prototype.clear=function(){this.tileCache.clear(),this.sourceTiles_={}},e.prototype.getTile=function(t,e,n,r,i){var o=vt(t,e,n);if(this.tileCache.containsKey(o))return this.tileCache.get(o);var a=[t,e,n],s=this.getTileCoordForTileUrlFunction(a,i),l=new Tn(a,null!==s?Ge.a.IDLE:Ge.a.EMPTY,this.getRevision(),this.format_,this.tileLoadFunction,s,this.tileUrlFunction,this.tileGrid,this.getTileGridForProjection(i),this.sourceTiles_,r,i,this.tileClass,this.handleTileChange.bind(this),a[0]);return this.tileCache.set(o,l),l},e.prototype.getTileGridForProjection=function(t){var e=t.getCode(),n=this.tileGrids_[e];if(!n){var r=this.tileGrid;n=this.tileGrids_[e]=Ot(t,void 0,r?r.getTileSize(r.getMinZoom()):void 0)}return n},e.prototype.getTilePixelRatio=function(t){return t},e.prototype.getTilePixelSize=function(t,e,n){var r=this.getTileGridForProjection(n),i=Object(pt.c)(r.getTileSize(t),this.tmpSize);return[Math.round(i[0]*e),Math.round(i[1]*e)]},e}(hn),Rn=function(t){function e(e){var n=e||{},r=void 0!==n.projection?n.projection:"EPSG:3857",i=void 0!==n.tileGrid?n.tileGrid:Ct({extent:kt(r),maxZoom:n.maxZoom,minZoom:n.minZoom,tileSize:n.tileSize});t.call(this,{attributions:n.attributions,cacheSize:n.cacheSize,crossOrigin:n.crossOrigin,opaque:n.opaque,projection:r,reprojectionErrorThreshold:n.reprojectionErrorThreshold,tileGrid:i,tileLoadFunction:n.tileLoadFunction,tilePixelRatio:n.tilePixelRatio,tileUrlFunction:n.tileUrlFunction,url:n.url,urls:n.urls,wrapX:void 0===n.wrapX||n.wrapX,transition:n.transition})}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e}(dn);n.d(e,"a",function(){return Zn});var jn,Un=/font-family: ?([^;]*);/,Fn=/("|')/g;var Qn={},Kn=lt.a.getNames();function Wn(t){if(t in Qn)return Qn[t];var e=t.map(function(t){return i()(t,1).split(" 1px ")[1].replace(/"/g,"")})[0];if(!function(t){if(!jn){jn={};for(var e=document.styleSheets,n=0,r=e.length;n2?r[2]:""):t+n}const Gn={};function qn(t,e){function n(){var n=t.getTargetElement();if(n){var r=e.layout||{},i=e.paint||{},o=t.getView().getZoom();if("background-color"in i){var a=$(e,"paint","background-color",o,Gn);n.style.backgroundColor=K.Color.parse(a).toString()}"background-opacity"in i&&(n.style.backgroundOpacity=$(e,"paint","background-opacity",o,Gn)),"none"==r.visibility&&(n.style.backgroundColor="",n.style.backgroundOpacity="")}}t.getTargetElement()&&n(),t.on(["change:resolution","change:target"],n)}function Xn(t,e){var n;return t.some(function(t){if(t.id==e)return n=t.source,!0}),n}function Yn(t,e,n,r,i,o){var a=e.getView();"center"in t&&!a.getCenter()&&a.setCenter(Object(ct.c)(t.center)),"zoom"in t&&void 0===a.getZoom()&&a.setZoom(t.zoom),a.getCenter()&&void 0!==a.getZoom()||a.fit(a.getProjection().getExtent(),{nearest:!0,size:e.getSize()}),t.sprite&&(0==t.sprite.indexOf("mapbox://")?t.sprite=n+"/sprite"+o:0!=t.sprite.indexOf("http")&&(t.sprite=(r?r+i:"")+t.sprite+o));var s,l,c,u,p,A,h,f,d=t.layers,_=new he,g=[];function y(n){if(g.length>0){e.addLayer(n);var r=function(){(function(t,e,n,r,i){return new Promise(function(o,a){var s,l,c;function u(){c||e.sprite&&!s?c&&t.setStyle(c):((t instanceof je||t instanceof Qe)&&(c=at(t,e,n,i,s,l,Wn)),o())}if("object"!=typeof e&&(e=JSON.parse(e)),8!=e.version&&a(new Error("glStyle version 8 required.")),e.sprite){var p=.5==(window.devicePixelRatio>=1.5?.5:1)?"@2x":"",A=Nn(e.sprite,r,p+".json");fetch(A,{credentials:"same-origin"}).then(function(t){return 200===t.status?t.json():""!==p?(p="",A=Nn(e.sprite,r,".json"),fetch(A,{credentials:"same-origin"}).then(t=>t.json())):void 0}).then(function(t){if(void 0===t)throw"No sprites found.";s=t,l=Nn(e.sprite,r,p+".png"),u()}).catch(function(t){console.error(t),a(new Error("Sprites cannot be loaded from "+A))})}else u()})})(n,t,g,i).then(function(){n.setVisible(!0)},function(t){console.error(t)})};n.getSource()?r():n.once("change:source",r)}}for(var m=0,v=d.length;m0?t.getResolution(t.getMinZoom()):void 0,source:new zn({attributions:l.attribution,format:new Be,tileGrid:t,urls:b}),visible:!1,zIndex:m})}():function(){var t=new Qe({declutter:!0,visible:!1,zIndex:m}),e=new _n({url:f}),n=e.on("change",function(){if("ready"==e.getState()){for(var r=e.getTileJSON(),i=Array.isArray(r.tiles)?r.tiles:[r.tiles],o=0,a=i.length;o0&&t.setMaxResolution(c.getResolution(c.getMinZoom())),Object(Oe.b)(n)}});return t}();else if("raster"==l.type){var w;l.tiles?(w=new Rn({transition:h,attributions:l.attribution,minZoom:l.minzoom,maxZoom:"maxzoom"in l?l.maxzoom:22,tileSize:l.tileSize||512,url:f,urls:l.tiles,crossOrigin:"anonymous"}),h=0):w=new _n({transition:h,url:f,crossOrigin:"anonymous"}),w.setTileLoadFunction(function(t,e){if(-1!=e.indexOf("{bbox-epsg-3857}")){var n=w.getTileGrid().getTileCoordExtent(t.getTileCoord());e=e.replace("{bbox-epsg-3857}",n.toString())}t.getImage().src=e}),p=new Le({source:w,visible:!s.layout||"none"!==s.layout.visibility})}else if("geojson"==l.type){var x,E,M=l.data;"string"==typeof M?E=Vn(M,i):x=_.readFeatures(M,{featureProjection:"EPSG:3857"}),p=new je({source:new In({attributions:l.attribution,features:x,format:_,url:E}),visible:!1,zIndex:m})}c=u}g.push(s.id)}y(p),e.set("mapbox-style",t)}function Zn(t,e){var n,r,i,o;if(n=r=i=o="",t instanceof Pt.a||(t=new Pt.a({target:t})),"string"==typeof e){var a=e.match(Hn);a&&(r=a[1],n=a.length>2?a[2]:""),fetch(e,{credentials:"same-origin"}).then(function(t){return t.json()}).then(function(a){var s=document.createElement("A");s.href=e,o=s.pathname.split("/").slice(0,-1).join("/")+"/",i=e.substr(0,e.indexOf(o)),Yn(a,t,r,i,o,n)}).catch(function(t){throw console.error(t),new Error("Could not load "+e)})}else setTimeout(function(){Yn(e,t)},0);return t}},function(t,e,n){"use strict";var r=["type","source","source-layer","minzoom","maxzoom","filter","layout"];function i(t,e){const n={};for(const e in t)"ref"!==e&&(n[e]=t[e]);return r.forEach(t=>{t in e&&(n[t]=e[t])}),n}e.a=function(t){t=t.slice();const e=Object.create(null);for(let n=0;nO.length&&O.push(t)}function I(t,e,n){return null==t?0:function t(e,n,r,i){var s=typeof e;"undefined"!==s&&"boolean"!==s||(e=null);var l=!1;if(null===e)l=!0;else switch(s){case"string":case"number":l=!0;break;case"object":switch(e.$$typeof){case o:case a:l=!0}}if(l)return r(i,e,""===n?"."+T(e,0):n),1;if(l=0,n=""===n?".":n+":",Array.isArray(e))for(var c=0;cthis.eventPool.length&&this.eventPool.push(t)}function ht(t){t.eventPool=[],t.getPooled=pt,t.release=At}i(ut.prototype,{preventDefault:function(){this.defaultPrevented=!0;var t=this.nativeEvent;t&&(t.preventDefault?t.preventDefault():"unknown"!=typeof t.returnValue&&(t.returnValue=!1),this.isDefaultPrevented=lt)},stopPropagation:function(){var t=this.nativeEvent;t&&(t.stopPropagation?t.stopPropagation():"unknown"!=typeof t.cancelBubble&&(t.cancelBubble=!0),this.isPropagationStopped=lt)},persist:function(){this.isPersistent=lt},isPersistent:ct,destructor:function(){var t,e=this.constructor.Interface;for(t in e)this[t]=null;this.nativeEvent=this._targetInst=this.dispatchConfig=null,this.isPropagationStopped=this.isDefaultPrevented=ct,this._dispatchInstances=this._dispatchListeners=null}}),ut.Interface={type:null,target:null,currentTarget:function(){return null},eventPhase:null,bubbles:null,cancelable:null,timeStamp:function(t){return t.timeStamp||Date.now()},defaultPrevented:null,isTrusted:null},ut.extend=function(t){function e(){}function n(){return r.apply(this,arguments)}var r=this;e.prototype=r.prototype;var o=new e;return i(o,n.prototype),n.prototype=o,n.prototype.constructor=n,n.Interface=i({},r.Interface,t),n.extend=r.extend,ht(n),n},ht(ut);var ft=ut.extend({data:null}),dt=ut.extend({data:null}),_t=[9,13,27,32],gt=G&&"CompositionEvent"in window,yt=null;G&&"documentMode"in document&&(yt=document.documentMode);var mt=G&&"TextEvent"in window&&!yt,vt=G&&(!gt||yt&&8=yt),bt=String.fromCharCode(32),wt={beforeInput:{phasedRegistrationNames:{bubbled:"onBeforeInput",captured:"onBeforeInputCapture"},dependencies:["compositionend","keypress","textInput","paste"]},compositionEnd:{phasedRegistrationNames:{bubbled:"onCompositionEnd",captured:"onCompositionEndCapture"},dependencies:"blur compositionend keydown keypress keyup mousedown".split(" ")},compositionStart:{phasedRegistrationNames:{bubbled:"onCompositionStart",captured:"onCompositionStartCapture"},dependencies:"blur compositionstart keydown keypress keyup mousedown".split(" ")},compositionUpdate:{phasedRegistrationNames:{bubbled:"onCompositionUpdate",captured:"onCompositionUpdateCapture"},dependencies:"blur compositionupdate keydown keypress keyup mousedown".split(" ")}},xt=!1;function Et(t,e){switch(t){case"keyup":return-1!==_t.indexOf(e.keyCode);case"keydown":return 229!==e.keyCode;case"keypress":case"mousedown":case"blur":return!0;default:return!1}}function Mt(t){return"object"==typeof(t=t.detail)&&"data"in t?t.data:null}var Ct=!1;var Bt={eventTypes:wt,extractEvents:function(t,e,n,r){var i=void 0,o=void 0;if(gt)t:{switch(t){case"compositionstart":i=wt.compositionStart;break t;case"compositionend":i=wt.compositionEnd;break t;case"compositionupdate":i=wt.compositionUpdate;break t}i=void 0}else Ct?Et(t,n)&&(i=wt.compositionEnd):"keydown"===t&&229===n.keyCode&&(i=wt.compositionStart);return i?(vt&&"ko"!==n.locale&&(Ct||i!==wt.compositionStart?i===wt.compositionEnd&&Ct&&(o=st()):(ot="value"in(it=r)?it.value:it.textContent,Ct=!0)),i=ft.getPooled(i,e,n,r),o?i.data=o:null!==(o=Mt(n))&&(i.data=o),N(i),o=i):o=null,(t=mt?function(t,e){switch(t){case"compositionend":return Mt(e);case"keypress":return 32!==e.which?null:(xt=!0,bt);case"textInput":return(t=e.data)===bt&&xt?null:t;default:return null}}(t,n):function(t,e){if(Ct)return"compositionend"===t||!gt&&Et(t,e)?(t=st(),at=ot=it=null,Ct=!1,t):null;switch(t){case"paste":return null;case"keypress":if(!(e.ctrlKey||e.altKey||e.metaKey)||e.ctrlKey&&e.altKey){if(e.char&&1