{"version":3,"sources":["webpack://olms/webpack/bootstrap","webpack://olms/./node_modules/ol/asserts.js","webpack://olms/./node_modules/ol/index.js","webpack://olms/./stylefunction.js","webpack://olms/./node_modules/mapbox-to-css-font/index.js","webpack://olms/./node_modules/@mapbox/mapbox-gl-style-spec/function/index.js","webpack://olms/external \"ol.source.XYZ\"","webpack://olms/external \"ol.source.VectorTile\"","webpack://olms/external \"ol.source.Vector\"","webpack://olms/external \"ol.source.TileJSON\"","webpack://olms/external \"ol.layer.VectorTile\"","webpack://olms/external \"ol.layer.Vector\"","webpack://olms/external \"ol.layer.Tile\"","webpack://olms/external \"ol.Observable\"","webpack://olms/external \"ol.format.MVT\"","webpack://olms/external \"ol.format.GeoJSON\"","webpack://olms/external \"ol.CanvasMap\"","webpack://olms/external \"ol.tilegrid\"","webpack://olms/external \"ol.proj\"","webpack://olms/./node_modules/webfont-matcher/lib/fonts/google.js","webpack://olms/./util.js","webpack://olms/./node_modules/@mapbox/mapbox-gl-style-spec/feature_filter/index.js","webpack://olms/./node_modules/@mapbox/mapbox-gl-style-spec/util/ref_properties.js","webpack://olms/./node_modules/@mapbox/mapbox-gl-style-spec/deref.js","webpack://olms/external \"ol.geom.Point\"","webpack://olms/external \"ol.style.Circle\"","webpack://olms/./node_modules/ol/style/textplacement.js","webpack://olms/./node_modules/ol/math.js","webpack://olms/./node_modules/ol/assertionerror.js","webpack://olms/./node_modules/ol/color.js","webpack://olms/./node_modules/ol/style/fill.js","webpack://olms/./node_modules/ol/style/text.js","webpack://olms/external \"ol.style.Icon\"","webpack://olms/external \"ol.style.Stroke\"","webpack://olms/external \"ol.style.Fill\"","webpack://olms/external \"ol.style.Style\"","webpack://olms/./node_modules/@mapbox/mapbox-gl-style-spec/util/interpolate.js","webpack://olms/./node_modules/@mapbox/mapbox-gl-style-spec/util/get_type.js","webpack://olms/./node_modules/@mapbox/mapbox-gl-style-spec/util/extend.js","webpack://olms/./node_modules/csscolorparser/csscolorparser.js","webpack://olms/./node_modules/@mapbox/mapbox-gl-style-spec/util/parse_color.js","webpack://olms/./node_modules/@mapbox/mapbox-gl-style-spec/function/color_spaces.js","webpack://olms/./index.js","webpack://olms/./olms.js"],"names":["installedModules","__webpack_require__","moduleId","exports","module","i","l","modules","call","m","c","d","name","getter","o","Object","defineProperty","configurable","enumerable","get","r","value","n","__esModule","object","property","prototype","hasOwnProperty","p","s","_assertionerror","_ol_asserts_","assertion","errorCode","_assertionerror2","default","_ol_","WEBGL_MAX_TEXTURE_SIZE","WEBGL_EXTENSIONS","inherits","childCtor","parentCtor","create","constructor","nullFunction","getUid","obj","ol_uid","uidCounter_","olLayer","glStyle","source","resolutions","spriteData","spriteImageUrl","fonts","res","length","push","JSON","parse","version","Error","spriteImage","spriteImgSize","img","Image","crossOrigin","onload","width","height","changed","src","ctx","document","createElement","getContext","measureCache","wrapText","text","font","em","key","wrappedText","measureText","words","split","line","lines","ii","word","join","allLayers","_deref2","layers","layersBySourceLayer","mapboxLayers","mapboxSource","layer","indexOf","id","sourceLayer","index","textHalo","_stroke2","textColor","_fill2","iconImageCache","styles","styleFunction","feature","resolution","properties","getProperties","zoom","_util","getZoomForResolution","type","types","getGeometry","getType","f","stylesLength","layerData","layerId","functionCache","filterCache","layout","emptyObj","paint","visibility","minzoom","maxzoom","filter","evaluateFilter","color","opacity","stroke","strokeColor","style","getValue","colorWithOpacity","getFill","getStroke","getText","_style2","fill","setColor","setZIndex","setLineCap","defaults","setLineJoin","setMiterLimit","setWidth","setLineDash","undefined","map","x","hasImage","icon","iconImg","skipLabel","iconImage","fromTemplate","styleGeom","geom","getFlatMidpoint","extent","getExtent","Math","sqrt","max","pow","_point2","getImage","setGeometry","iconSize","iconColor","icon_cache_key","spriteImageData","canvas","drawImage","y","data","getImageData","cc","putImageData","_icon2","imgSize","scale","pixelRatio","size","offset","setRotation","deg2rad","setOpacity","setImage","setText","circleRadius","circleStrokeColor","circleColor","circleOpacity","circleStrokeWidth","_circle2","radius","label","_text2","textSize","_mapboxToCssFont2","chooseFont","textTransform","toUpperCase","toLowerCase","wrappedLabel","setFont","textAnchor","placement","setPlacement","textAlign","setTextAlign","textBaseline","setTextBaseline","textOffset","setOffsetX","setOffsetY","setFill","haloColor","setStroke","setStyle","set","functionTypes","line-miter-limit","fill-opacity","line-opacity","line-width","text-halo-width","text-max-width","text-offset","text-opacity","text-rotate","text-size","icon-opacity","icon-rotate","icon-size","icon-color","circle-radius","circle-opacity","circle-stroke-width","circle-color","circle-stroke-color","text-halo-color","text-color","line-color","fill-outline-color","fill-color","icon-image","line-cap","line-join","line-dasharray","symbol-placement","text-anchor","text-field","text-font","Point","MultiPoint","LineString","MultiLineString","Polygon","MultiPolygon","layoutOrPaint","functions","_function2","function","_typeof","stops","fontMap","availableFonts","_feature_filter2","colorCache","colorData","templateRegEx","parts","match","fontWeights","thin","hairline","ultra-light","extra-light","light","book","regular","normal","plain","roman","standard","medium","semi-bold","demi-bold","bold","heavy","black","extra-bold","ultra-black","extra-black","ultra-bold","heavy-black","fat","poster","fontCache","cssData","maybeWeight","weight","w","pop","replace","fontFamily","colorSpaces","parseColor","extend","interpolate","identityFunction","coalesce","a","b","evaluateCategoricalFunction","parameters","propertySpec","input","hashedStops","keyType","evaluateIntervalFunction","findStopLessThanOrEqualTo","evaluateExponentialFunction","base","t","interpolationFactor","outputLower","outputUpper","interp","_len","arguments","args","Array","_key","evaluatedLower","apply","evaluatedUpper","evaluateIdentityFunction","values","lowerIndex","upperIndex","currentIndex","currentValue","upperValue","floor","isFunctionDefinition","lowerValue","difference","progress","createFunction","isColor","fun","zoomAndFeatureDependent","featureDependent","zoomDependent","stop","innerFun","categoricalKeyType","_iteratorNormalCompletion","_didIteratorError","_iteratorError","_step","_iterator","Symbol","iterator","next","done","err","return","outputFunction","colorSpace","colorspace","stringify","forward","reverse","featureFunctions","zoomStops","featureFunctionStops","_iteratorNormalCompletion2","_didIteratorError2","_iteratorError2","_step2","_iterator2","z","isFeatureConstant","isZoomConstant","ol","XYZ","VectorTile","Vector","TileJSON","Tile","Observable","format","MVT","GeoJSON","CanvasMap","tilegrid","proj","families","title","link","getNames","getLink","normalizeName","degrees","PI","candidate","zoomFactor","log","Function","compile","op","compileComparisonOp","compileLogicalOp","slice","compileNegation","compileInOp","compileHasOp","compilePropertyReference","checkType","left","right","expressions","sort","compare","expression","refProperties","deref","parent","result","k","forEach","ref","Circle","POINT","LINE","_asserts","_ol_math_","min","cosh","exp","roundUpToPowerOfTwo","_asserts2","assert","ceil","LN2","squaredSegmentDistance","x1","y1","x2","y2","dx","dy","squaredDistance","solveLinearSystem","mat","maxRow","maxEl","abs","absValue","tmp","j","coef","toDegrees","angleInRadians","toRadians","angleInDegrees","modulo","lerp","_index","_ol_AssertionError_","code","path","_index2","VERSION","this","message","cache","cacheSize","_ol_color_","HEX_COLOR_RE_","NAMED_COLOR_RE_","asArray","isArray","fromString","asString","toString","fromNamed","el","body","appendChild","rgb","getComputedStyle","removeChild","fromStringInternal_","g","exec","hasAlpha","parseInt","substr","Number","normalize","opt_color","_math2","clamp","_ol_style_Fill_","opt_options","options","color_","checksum_","clone","getColor","getChecksum","CanvasPattern","CanvasGradient","_color2","_ol_style_Text_","font_","rotation_","rotation","rotateWithView_","rotateWithView","scale_","text_","textAlign_","textBaseline_","fill_","DEFAULT_FILL_COLOR_","maxAngle_","maxAngle","placement_","_textplacement2","overflow","exceedLength","overflow_","stroke_","offsetX_","offsetX","offsetY_","offsetY","backgroundFill_","backgroundFill","backgroundStroke_","backgroundStroke","padding_","padding","getFont","getPlacement","getMaxAngle","getOverflow","getRotation","getRotateWithView","getScale","getTextAlign","getTextBaseline","getOffsetX","getOffsetY","getBackgroundFill","getBackgroundStroke","getPadding","setOverflow","setMaxAngle","setScale","setBackgroundFill","setBackgroundStroke","setPadding","Icon","Stroke","Fill","Style","number","vec2","from","to","array","val","String","Boolean","output","inputs","kCSSColorTable","transparent","aliceblue","antiquewhite","aqua","aquamarine","azure","beige","bisque","blanchedalmond","blue","blueviolet","brown","burlywood","cadetblue","chartreuse","chocolate","coral","cornflowerblue","cornsilk","crimson","cyan","darkblue","darkcyan","darkgoldenrod","darkgray","darkgreen","darkgrey","darkkhaki","darkmagenta","darkolivegreen","darkorange","darkorchid","darkred","darksalmon","darkseagreen","darkslateblue","darkslategray","darkslategrey","darkturquoise","darkviolet","deeppink","deepskyblue","dimgray","dimgrey","dodgerblue","firebrick","floralwhite","forestgreen","fuchsia","gainsboro","ghostwhite","gold","goldenrod","gray","green","greenyellow","grey","honeydew","hotpink","indianred","indigo","ivory","khaki","lavender","lavenderblush","lawngreen","lemonchiffon","lightblue","lightcoral","lightcyan","lightgoldenrodyellow","lightgray","lightgreen","lightgrey","lightpink","lightsalmon","lightseagreen","lightskyblue","lightslategray","lightslategrey","lightsteelblue","lightyellow","lime","limegreen","linen","magenta","maroon","mediumaquamarine","mediumblue","mediumorchid","mediumpurple","mediumseagreen","mediumslateblue","mediumspringgreen","mediumturquoise","mediumvioletred","midnightblue","mintcream","mistyrose","moccasin","navajowhite","navy","oldlace","olive","olivedrab","orange","orangered","orchid","palegoldenrod","palegreen","paleturquoise","palevioletred","papayawhip","peachpuff","peru","pink","plum","powderblue","purple","rebeccapurple","red","rosybrown","royalblue","saddlebrown","salmon","sandybrown","seagreen","seashell","sienna","silver","skyblue","slateblue","slategray","slategrey","snow","springgreen","steelblue","tan","teal","thistle","tomato","turquoise","violet","wheat","white","whitesmoke","yellow","yellowgreen","clamp_css_byte","round","clamp_css_float","parse_css_int","str","parseFloat","parse_css_float","css_hue_to_rgb","m1","m2","h","parseCSSColor","css_str","iv","ep","fname","params","alpha","e","parseColorString","rgba","Xn","Yn","Zn","t0","t1","t2","t3","rad2deg","xyz2lab","lab2xyz","xyz2rgb","rgb2xyz","rgbToLab","rgbColor","labToRgb","labColor","isNaN","lab","hcl","atan2","hclColor","cos","sin","applyStyle","applyBackground","some","setBackground","accessToken","baseUrl","host","_canvasmap2","target","spriteRegEx","fetch","credentials","then","response","json","href","pathname","processStyle","catch","console","error","defaultFont","preprocess","loadFont","googleFamilies","_google2","family","fontUrl","querySelector","markup","rel","getElementsByTagName","withPath","url","toSpriteUrl","extension","Promise","resolve","reject","sprite","sizeFactor","window","devicePixelRatio","spriteUrl","status","spritesJson","onChange","_stylefunction2","setTimeout","updateStyle","element","getTargetElement","getView","getZoom","bg","backgroundColor","backgroundOpacity","on","getSourceIdByRef","sourceId","view","getCenter","setCenter","_proj2","fromLonLat","center","setZoom","fit","getProjection","nearest","getSize","glLayer","glSource","glSourceId","mapid","tileGrid","glLayers","geoJsonFormat","_geojson2","layerIds","finalizeLayer","addLayer","setVisible","getSource","once","sources","tiles","_tilegrid2","createXYZ","tileSize","maxZoom","minZoom","_vectortile2","declutter","maxResolution","getMinZoom","getResolution","_vectortile4","attributions","attribution","_mvt2","urls","visible","zIndex","tilejson","_tilejson2","getState","tileJSONDoc","getTileJSON","tile","getTileGrid","setSource","getAttributions","getMaxZoom","setMaxResolution","_observable2","unByKey","_xyz2","setTileLoadFunction","bbox","getTileCoordExtent","getTileCoord","_tile2","features","geoJsonUrl","readFeatures","featureProjection","_vector2","_vector4","_stylefunction","stylefunction"],"mappings":"iBACA,IAAAA,KAGA,SAAAC,EAAAC,GAGA,GAAAF,EAAAE,GACA,OAAAF,EAAAE,GAAAC,QAGA,IAAAC,EAAAJ,EAAAE,IACAG,EAAAH,EACAI,GAAA,EACAH,YAUA,OANAI,EAAAL,GAAAM,KAAAJ,EAAAD,QAAAC,IAAAD,QAAAF,GAGAG,EAAAE,GAAA,EAGAF,EAAAD,QA2CA,OAtCAF,EAAAQ,EAAAF,EAGAN,EAAAS,EAAAV,EAGAC,EAAAU,EAAA,SAAAR,EAAAS,EAAAC,GACAZ,EAAAa,EAAAX,EAAAS,IACAG,OAAAC,eAAAb,EAAAS,GACAK,cAAA,EACAC,YAAA,EACAC,IAAAN,KAMAZ,EAAAmB,EAAA,SAAAjB,GACAY,OAAAC,eAAAb,EAAA,cAAiDkB,OAAA,KAIjDpB,EAAAqB,EAAA,SAA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QAASnB,EAASrtB,QAClBuuB,QAAS,YAAalB,EAAWA,EAASptB,QAAU,GACpDquB,SAAUjB,EAASiB,UAAY,IAC/BxD,IAAKA,EACLoE,KAAM7B,EAASc,MACfnyB,YAAa,cAbN,IAAAszB,EAAAt1B,SACL8wB,IAAKA,EACL9uB,YAAa,eAcZm0B,oBAAoB,SAAST,EAAMrzB,GACxC,IAAwC,GAApCA,EAAI2B,QAAQ,oBAA2B,CACzC,IAAIoyB,EAAOp1B,EAAO20B,cAAcU,mBAAmBX,EAAKY,gBACxDj0B,EAAMA,EAAIkP,QAAQ,mBAAoB6kB,EAAKtZ,YAE7C4Y,EAAK/sB,WAAWtG,IAAMA,IAExB0B,EAAQ,IAAAwyB,EAAAv2B,SACNgB,OAAQA,EACRm0B,SAAS/B,EAAQxtB,QAAuC,SAA9BwtB,EAAQxtB,OAAOG,kBAEtC,GAAqB,WAAjBstB,EAASnuB,KAAmB,CACrC,IACIsxB,EAAUC,EADVrtB,EAAOiqB,EAASjqB,KAED,iBAARA,EACTqtB,EAAa5F,EAASznB,EAAM4S,GAE5Bwa,EAAW9C,EAAcgD,aAAattB,GAAOutB,kBAAmB,cAElE5yB,EAAQ,IAAA6yB,EAAA52B,SACNgB,OAAQ,IAAA61B,EAAA72B,SACN+0B,aAAc1B,EAAS2B,YACvBwB,SAAUA,EACVxf,OAAQ0c,EACR5C,IAAK2F,IAEPtB,SAAS,EACTC,OAAQl3B,IAGZo1B,EAAarvB,EAEf2vB,EAASryB,KAAK6xB,EAAQnvB,IAG1B4vB,EAAc9vB,mFCnahB,MAAA8X,EAAA/d,EAAA,IACAg5B,EAAAh5B,EAAA,kDAGEwV,cACAwb,kCACAD,wBACAkI","file":"olms.js","sourcesContent":[" \t// The module cache\n \tvar installedModules = {};\n\n \t// The require function\n \tfunction __webpack_require__(moduleId) {\n\n \t\t// Check if module is in cache\n \t\tif(installedModules[moduleId]) {\n \t\t\treturn installedModules[moduleId].exports;\n \t\t}\n \t\t// Create a new module (and put it into the cache)\n \t\tvar module = installedModules[moduleId] = {\n \t\t\ti: moduleId,\n \t\t\tl: false,\n \t\t\texports: {}\n \t\t};\n\n \t\t// Execute the module function\n \t\tmodules[moduleId].call(module.exports, module, module.exports, __webpack_require__);\n\n \t\t// Flag the module as loaded\n \t\tmodule.l = true;\n\n \t\t// Return the exports of the module\n \t\treturn module.exports;\n \t}\n\n\n \t// expose the modules object (__webpack_modules__)\n \t__webpack_require__.m = modules;\n\n \t// expose the module cache\n \t__webpack_require__.c = installedModules;\n\n \t// define getter function for harmony exports\n \t__webpack_require__.d = function(exports, name, getter) {\n \t\tif(!__webpack_require__.o(exports, name)) {\n \t\t\tObject.defineProperty(exports, name, {\n \t\t\t\tconfigurable: false,\n \t\t\t\tenumerable: true,\n \t\t\t\tget: getter\n \t\t\t});\n \t\t}\n \t};\n\n \t// define __esModule on exports\n \t__webpack_require__.r = function(exports) {\n \t\tObject.defineProperty(exports, '__esModule', { value: true });\n \t};\n\n \t// getDefaultExport function for compatibility with non-harmony modules\n \t__webpack_require__.n = function(module) {\n \t\tvar getter = module && module.__esModule ?\n \t\t\tfunction getDefault() { return module['default']; } :\n \t\t\tfunction getModuleExports() { return module; };\n \t\t__webpack_require__.d(getter, 'a', getter);\n \t\treturn getter;\n \t};\n\n \t// Object.prototype.hasOwnProperty.call\n \t__webpack_require__.o = function(object, property) { return Object.prototype.hasOwnProperty.call(object, property); };\n\n \t// __webpack_public_path__\n \t__webpack_require__.p = \"\";\n\n\n \t// Load entry module and return exports\n \treturn __webpack_require__(__webpack_require__.s = 42);\n","import _ol_AssertionError_ from './assertionerror.js';\nvar _ol_asserts_ = {};\n\n\n/**\n * @param {*} assertion Assertion we expected to be truthy.\n * @param {number} errorCode Error code.\n */\n_ol_asserts_.assert = function(assertion, errorCode) {\n if (!assertion) {\n throw new _ol_AssertionError_(errorCode);\n }\n};\nexport default _ol_asserts_;\n","var _ol_ = {};\n\n\n/**\n * Constants defined with the define tag cannot be changed in application\n * code, but can be set at compile time.\n * Some reduce the size of the build in advanced compile mode.\n */\n\n\n/**\n * @define {boolean} Assume touch. Default is `false`.\n */\n_ol_.ASSUME_TOUCH = false;\n\n\n/**\n * TODO: rename this to something having to do with tile grids\n * see https://github.com/openlayers/openlayers/issues/2076\n * @define {number} Default maximum zoom for default tile grids.\n */\n_ol_.DEFAULT_MAX_ZOOM = 42;\n\n\n/**\n * @define {number} Default min zoom level for the map view. Default is `0`.\n */\n_ol_.DEFAULT_MIN_ZOOM = 0;\n\n\n/**\n * @define {number} Default maximum allowed threshold (in pixels) for\n * reprojection triangulation. Default is `0.5`.\n */\n_ol_.DEFAULT_RASTER_REPROJECTION_ERROR_THRESHOLD = 0.5;\n\n\n/**\n * @define {number} Default tile size.\n */\n_ol_.DEFAULT_TILE_SIZE = 256;\n\n\n/**\n * @define {string} Default WMS version.\n */\n_ol_.DEFAULT_WMS_VERSION = '1.3.0';\n\n\n/**\n * @define {boolean} Enable the Canvas renderer. Default is `true`. Setting\n * this to false at compile time in advanced mode removes all code\n * supporting the Canvas renderer from the build.\n */\n_ol_.ENABLE_CANVAS = true;\n\n\n/**\n * @define {boolean} Enable integration with the Proj4js library. Default is\n * `true`.\n */\n_ol_.ENABLE_PROJ4JS = true;\n\n\n/**\n * @define {boolean} Enable automatic reprojection of raster sources. Default is\n * `true`.\n */\n_ol_.ENABLE_RASTER_REPROJECTION = true;\n\n\n/**\n * @define {boolean} Enable the WebGL renderer. Default is `true`. Setting\n * this to false at compile time in advanced mode removes all code\n * supporting the WebGL renderer from the build.\n */\n_ol_.ENABLE_WEBGL = true;\n\n\n/**\n * @define {boolean} Include debuggable shader sources. Default is `true`.\n * This should be set to `false` for production builds (if `ol.ENABLE_WEBGL`\n * is `true`).\n */\n_ol_.DEBUG_WEBGL = true;\n\n\n/**\n * @define {number} The size in pixels of the first atlas image. Default is\n * `256`.\n */\n_ol_.INITIAL_ATLAS_SIZE = 256;\n\n\n/**\n * @define {number} The maximum size in pixels of atlas images. Default is\n * `-1`, meaning it is not used (and `ol.WEBGL_MAX_TEXTURE_SIZE` is\n * used instead).\n */\n_ol_.MAX_ATLAS_SIZE = -1;\n\n\n/**\n * @define {number} Maximum mouse wheel delta.\n */\n_ol_.MOUSEWHEELZOOM_MAXDELTA = 1;\n\n\n/**\n * @define {number} Maximum width and/or height extent ratio that determines\n * when the overview map should be zoomed out.\n */\n_ol_.OVERVIEWMAP_MAX_RATIO = 0.75;\n\n\n/**\n * @define {number} Minimum width and/or height extent ratio that determines\n * when the overview map should be zoomed in.\n */\n_ol_.OVERVIEWMAP_MIN_RATIO = 0.1;\n\n\n/**\n * @define {number} Maximum number of source tiles for raster reprojection of\n * a single tile.\n * If too many source tiles are determined to be loaded to create a single\n * reprojected tile the browser can become unresponsive or even crash.\n * This can happen if the developer defines projections improperly and/or\n * with unlimited extents.\n * If too many tiles are required, no tiles are loaded and\n * `ol.TileState.ERROR` state is set. Default is `100`.\n */\n_ol_.RASTER_REPROJECTION_MAX_SOURCE_TILES = 100;\n\n\n/**\n * @define {number} Maximum number of subdivision steps during raster\n * reprojection triangulation. Prevents high memory usage and large\n * number of proj4 calls (for certain transformations and areas).\n * At most `2*(2^this)` triangles are created for each triangulated\n * extent (tile/image). Default is `10`.\n */\n_ol_.RASTER_REPROJECTION_MAX_SUBDIVISION = 10;\n\n\n/**\n * @define {number} Maximum allowed size of triangle relative to world width.\n * When transforming corners of world extent between certain projections,\n * the resulting triangulation seems to have zero error and no subdivision\n * is performed.\n * If the triangle width is more than this (relative to world width; 0-1),\n * subdivison is forced (up to `ol.RASTER_REPROJECTION_MAX_SUBDIVISION`).\n * Default is `0.25`.\n */\n_ol_.RASTER_REPROJECTION_MAX_TRIANGLE_WIDTH = 0.25;\n\n\n/**\n * @define {number} Tolerance for geometry simplification in device pixels.\n */\n_ol_.SIMPLIFY_TOLERANCE = 0.5;\n\n\n/**\n * @define {number} Texture cache high water mark.\n */\n_ol_.WEBGL_TEXTURE_CACHE_HIGH_WATER_MARK = 1024;\n\n\n/**\n * @define {string} OpenLayers version.\n */\n_ol_.VERSION = 'v4.6.5';\n\n\n/**\n * The maximum supported WebGL texture size in pixels. If WebGL is not\n * supported, the value is set to `undefined`.\n * @const\n * @type {number|undefined}\n */\n_ol_.WEBGL_MAX_TEXTURE_SIZE; // value is set in `ol.has`\n\n\n/**\n * List of supported WebGL extensions.\n * @const\n * @type {Array.}\n */\n_ol_.WEBGL_EXTENSIONS; // value is set in `ol.has`\n\n\n/**\n * Inherit the prototype methods from one constructor into another.\n *\n * Usage:\n *\n * function ParentClass(a, b) { }\n * ParentClass.prototype.foo = function(a) { }\n *\n * function ChildClass(a, b, c) {\n * // Call parent constructor\n * ParentClass.call(this, a, b);\n * }\n * ol.inherits(ChildClass, ParentClass);\n *\n * var child = new ChildClass('a', 'b', 'see');\n * child.foo(); // This works.\n *\n * @param {!Function} childCtor Child constructor.\n * @param {!Function} parentCtor Parent constructor.\n * @function\n * @api\n */\n_ol_.inherits = function(childCtor, parentCtor) {\n childCtor.prototype = Object.create(parentCtor.prototype);\n childCtor.prototype.constructor = childCtor;\n};\n\n\n/**\n * A reusable function, used e.g. as a default for callbacks.\n *\n * @return {undefined} Nothing.\n */\n_ol_.nullFunction = function() {};\n\n\n/**\n * Gets a unique ID for an object. This mutates the object so that further calls\n * with the same object as a parameter returns the same value. Unique IDs are generated\n * as a strictly increasing sequence. Adapted from goog.getUid.\n *\n * @param {Object} obj The object to get the unique ID for.\n * @return {number} The unique ID for the object.\n */\n_ol_.getUid = function(obj) {\n return obj.ol_uid ||\n (obj.ol_uid = ++_ol_.uidCounter_);\n};\n\n\n/**\n * Counter for getUid.\n * @type {number}\n * @private\n */\n_ol_.uidCounter_ = 0;\nexport default _ol_;\n","/*\nol-mapbox-style - Use Mapbox Style objects with OpenLayers\nCopyright 2016-present Boundless Spatial, Inc.\nLicense: https://raw.githubusercontent.com/boundlessgeo/ol-mapbox-gl-style/master/LICENSE\n*/\n\nimport Style from 'ol/style/style';\nimport Fill from 'ol/style/fill';\nimport Stroke from 'ol/style/stroke';\nimport Icon from 'ol/style/icon';\nimport Text from 'ol/style/text';\nimport Circle from 'ol/style/circle';\nimport Point from 'ol/geom/point';\nimport derefLayers from '@mapbox/mapbox-gl-style-spec/deref';\nimport glfun from '@mapbox/mapbox-gl-style-spec/function';\nimport createFilter from '@mapbox/mapbox-gl-style-spec/feature_filter';\nimport mb2css from 'mapbox-to-css-font';\nimport {deg2rad, getZoomForResolution} from './util';\n\nconst functionTypes = {\n 'line-miter-limit': 'interpolated',\n 'fill-opacity': 'interpolated',\n 'line-opacity': 'interpolated',\n 'line-width': 'interpolated',\n 'text-halo-width': 'interpolated',\n 'text-max-width': 'interpolated',\n 'text-offset': 'interpolated',\n 'text-opacity': 'interpolated',\n 'text-rotate': 'interpolated',\n 'text-size': 'interpolated',\n 'icon-opacity': 'interpolated',\n 'icon-rotate': 'interpolated',\n 'icon-size': 'interpolated',\n 'icon-color': 'interpolated',\n 'circle-radius': 'interpolated',\n 'circle-opacity': 'interpolated',\n 'circle-stroke-width': 'interpolated',\n 'circle-color': 'interpolated',\n 'circle-stroke-color': 'interpolated',\n 'text-halo-color': 'interpolated',\n 'text-color': 'interpolated',\n 'line-color': 'interpolated',\n 'fill-outline-color': 'interpolated',\n 'fill-color': 'interpolated',\n 'icon-image': 'piecewise-constant',\n 'line-cap': 'piecewise-constant',\n 'line-join': 'piecewise-constant',\n 'line-dasharray': 'piecewise-constant',\n 'symbol-placement': 'piecewise-constant',\n 'text-anchor': 'piecewise-constant',\n 'text-field': 'piecewise-constant',\n 'text-font': 'piecewise-constant'\n};\n\nconst defaults = {\n 'fill-opacity': 1,\n 'line-cap': 'butt',\n 'line-join': 'miter',\n 'line-miter-limit': 2,\n 'line-opacity': 1,\n 'line-width': 1,\n 'symbol-placement': 'point',\n 'text-anchor': 'center',\n 'text-color': '#000000',\n 'text-font': ['Open Sans Regular', 'Arial Unicode MS Regular'],\n 'text-halo-color': 'rgba(0, 0, 0, 0)',\n 'text-halo-width': 0,\n 'text-max-width': 10,\n 'text-offset': [0, 0],\n 'text-opacity': 1,\n 'text-rotate': 0,\n 'text-size': 16,\n 'icon-opacity': 1,\n 'icon-rotate': 0,\n 'icon-size': 1,\n 'circle-color': '#000000',\n 'circle-stroke-color': '#000000',\n 'circle-opacity': 1,\n 'circle-stroke-width': 0\n};\n\nconst types = {\n 'Point': 1,\n 'MultiPoint': 1,\n 'LineString': 2,\n 'MultiLineString': 2,\n 'Polygon': 3,\n 'MultiPolygon': 3\n};\n\nconst functionCache = {};\nfunction getValue(layerId, layoutOrPaint, property, zoom, properties) {\n if (!functionCache[layerId]) {\n functionCache[layerId] = {};\n }\n const functions = functionCache[layerId];\n if (!functions[property]) {\n let value = layoutOrPaint[property];\n if (value === undefined) {\n value = defaults[property];\n }\n functions[property] = glfun(value, {\n function: functionTypes[property],\n type: property.indexOf('color') !== -1 ? 'color' :\n typeof value == 'object' && value.stops && typeof value.stops[0][0] == 'number' ? 'number' : undefined\n });\n }\n return functions[property](zoom, properties);\n}\n\nconst fontMap = {};\nfunction chooseFont(fonts, availableFonts) {\n if (fontMap[fonts]) {\n return fontMap[fonts];\n }\n if (availableFonts) {\n for (let i = 0, ii = fonts.length; i < ii; ++i) {\n const font = fonts[i];\n if (availableFonts.indexOf(font) != -1) {\n fontMap[fonts] = font;\n break;\n }\n }\n if (!fontMap[fonts]) {\n // fallback font\n fontMap[fonts] = fonts[fonts.length - 1];\n }\n } else {\n fontMap[fonts] = fonts[0];\n }\n return fontMap[fonts];\n}\n\nconst filterCache = {};\nfunction evaluateFilter(layerId, filter, feature) {\n if (!(layerId in filterCache)) {\n filterCache[layerId] = createFilter(filter);\n }\n return filterCache[layerId](feature);\n}\n\nconst colorCache = {};\nfunction colorWithOpacity(color, opacity) {\n if (color && opacity !== undefined) {\n let colorData = colorCache[color];\n if (!colorData) {\n colorCache[color] = colorData = {\n color: [\n color[0] * 255 / color[3],\n color[1] * 255 / color[3],\n color[2] * 255 / color[3],\n color[3]\n ],\n opacity: color[3]\n };\n }\n color = colorData.color;\n color[3] = colorData.opacity * opacity;\n if (color[3] === 0) {\n color = undefined;\n }\n }\n return color;\n}\n\nconst templateRegEx = /^([^]*)\\{(.*)\\}([^]*)$/;\nfunction fromTemplate(text, properties) {\n let parts;\n do {\n parts = text.match(templateRegEx);\n if (parts) {\n const value = properties[parts[2]] || '';\n text = parts[1] + value + parts[3];\n }\n } while (parts);\n return text;\n}\n\nconst emptyObj = {};\n\n/**\n * Creates a style function from the `glStyle` object for all layers that use\n * the specified `source`, which needs to be a `\"type\": \"vector\"` or\n * `\"type\": \"geojson\"` source and applies it to the specified OpenLayers layer.\n *\n * @param {ol.layer.Vector|ol.layer.VectorTile} olLayer OpenLayers layer to\n * apply the style to. In addition to the style, the layer will get two\n * properties: `mapbox-source` will be the `id` of the `glStyle`'s source used\n * for the layer, and `mapbox-layers` will be an array of the `id`s of the\n * `glStyle`'s layers.\n * @param {string|Object} glStyle Mapbox Style object.\n * @param {string|Array} source `source` key or an array of layer `id`s\n * from the Mapbox Style object. When a `source` key is provided, all layers for\n * the specified source will be included in the style function. When layer `id`s\n * are provided, they must be from layers that use the same source.\n * @param {Array} [resolutions=[78271.51696402048, 39135.75848201024,\n * 19567.87924100512, 9783.93962050256, 4891.96981025128, 2445.98490512564,\n * 1222.99245256282, 611.49622628141, 305.748113140705, 152.8740565703525,\n * 76.43702828517625, 38.21851414258813, 19.109257071294063, 9.554628535647032,\n * 4.777314267823516, 2.388657133911758, 1.194328566955879, 0.5971642834779395,\n * 0.29858214173896974, 0.14929107086948487, 0.07464553543474244]]\n * Resolutions for mapping resolution to zoom level.\n * @param {Object} [spriteData=undefined] Sprite data from the url specified in\n * the Mapbox Style object's `sprite` property. Only required if a `sprite`\n * property is specified in the Mapbox Style object.\n * @param {Object} [spriteImageUrl=undefined] Sprite image url for the sprite\n * specified in the Mapbox Style object's `sprite` property. Only required if a\n * `sprite` property is specified in the Mapbox Style object.\n * @param {Array} [fonts=undefined] Array of available fonts, using the\n * same font names as the Mapbox Style object. If not provided, the style\n * function will always use the first font from the font array.\n * @return {ol.style.StyleFunction} Style function for use in\n * `ol.layer.Vector` or `ol.layer.VectorTile`.\n */\nexport default function(olLayer, glStyle, source, resolutions, spriteData, spriteImageUrl, fonts) {\n if (!resolutions) {\n resolutions = [];\n for (let res = 78271.51696402048; resolutions.length < 21; res /= 2) {\n resolutions.push(res);\n }\n }\n if (typeof glStyle == 'string') {\n glStyle = JSON.parse(glStyle);\n }\n if (glStyle.version != 8) {\n throw new Error('glStyle version 8 required.');\n }\n\n let spriteImage, spriteImgSize;\n if (spriteImageUrl) {\n const img = new Image();\n img.crossOrigin = 'anonymous';\n img.onload = function() {\n spriteImage = img;\n spriteImgSize = [img.width, img.height];\n olLayer.changed();\n };\n img.src = spriteImageUrl;\n }\n\n const ctx = document.createElement('CANVAS').getContext('2d');\n const measureCache = {};\n function wrapText(text, font, em) {\n const key = em + ',' + font + ',' + text;\n let wrappedText = measureCache[key];\n if (!wrappedText) {\n ctx.font = font;\n const oneEm = ctx.measureText('M').width;\n const width = oneEm * em;\n const words = text.split(' ');\n let line = '';\n const lines = [];\n for (let i = 0, ii = words.length; i < ii; ++i) {\n const word = words[i];\n if ((ctx.measureText(line + word).width <= width)) {\n line += (line ? ' ' : '') + word;\n } else {\n if (line) {\n lines.push(line);\n }\n line = word;\n }\n }\n if (line) {\n lines.push(line);\n }\n measureCache[key] = wrappedText = lines.join('\\n');\n }\n return wrappedText;\n }\n\n const allLayers = derefLayers(glStyle.layers);\n\n const layersBySourceLayer = {};\n const mapboxLayers = [];\n let mapboxSource;\n for (let i = 0, ii = allLayers.length; i < ii; ++i) {\n const layer = allLayers[i];\n if (typeof source == 'string' && layer.source == source ||\n source.indexOf(layer.id) !== -1) {\n const sourceLayer = layer['source-layer'];\n if (!mapboxSource) {\n mapboxSource = layer.source;\n }\n let layers = layersBySourceLayer[sourceLayer];\n if (!layers) {\n layers = layersBySourceLayer[sourceLayer] = [];\n }\n layers.push({\n layer: layer,\n index: i\n });\n mapboxLayers.push(layer.id);\n }\n }\n\n const textHalo = new Stroke();\n const textColor = new Fill();\n\n const iconImageCache = {};\n\n const styles = [];\n\n const styleFunction = function(feature, resolution) {\n const properties = feature.getProperties();\n const layers = layersBySourceLayer[properties.layer];\n if (!layers) {\n return;\n }\n let zoom = resolutions.indexOf(resolution);\n if (zoom == -1) {\n zoom = getZoomForResolution(resolution, resolutions);\n }\n const type = types[feature.getGeometry().getType()];\n const f = {\n properties: properties,\n type: type\n };\n let stylesLength = -1;\n for (let i = 0, ii = layers.length; i < ii; ++i) {\n const layerData = layers[i];\n const layer = layerData.layer;\n const layerId = layer.id;\n // TODO revisit when diffing gets added\n delete functionCache[layerId];\n delete filterCache[layerId];\n\n const layout = layer.layout || emptyObj;\n const paint = layer.paint || emptyObj;\n if (layout.visibility === 'none' || ('minzoom' in layer && zoom < layer.minzoom) ||\n ('maxzoom' in layer && zoom >= layer.maxzoom)) {\n continue;\n }\n const filter = layer.filter;\n if (!filter || evaluateFilter(layerId, filter, f)) {\n let color, opacity, fill, stroke, strokeColor, style;\n const index = layerData.index;\n if (type == 3) {\n if (!('fill-pattern' in paint) && 'fill-color' in paint) {\n opacity = getValue(layerId, paint, 'fill-opacity', zoom, properties);\n color = colorWithOpacity(getValue(layerId, paint, 'fill-color', zoom, properties), opacity);\n if (color) {\n ++stylesLength;\n style = styles[stylesLength];\n if (!style || !style.getFill() || style.getStroke() || style.getText()) {\n style = styles[stylesLength] = new Style({\n fill: new Fill()\n });\n }\n fill = style.getFill();\n fill.setColor(color);\n style.setZIndex(index);\n }\n if ('fill-outline-color' in paint) {\n strokeColor = colorWithOpacity(getValue(layerId, paint, 'fill-outline-color', zoom, properties), opacity);\n }\n if (strokeColor) {\n ++stylesLength;\n style = styles[stylesLength];\n if (!style || !style.getStroke() || style.getFill() || style.getText()) {\n style = styles[stylesLength] = new Style({\n stroke: new Stroke()\n });\n }\n stroke = style.getStroke();\n stroke.setLineCap(defaults['line-cap']);\n stroke.setLineJoin(defaults['line-join']);\n stroke.setMiterLimit(defaults['line-miter-limit']);\n stroke.setColor(strokeColor);\n stroke.setWidth(1);\n stroke.setLineDash(null);\n style.setZIndex(index);\n }\n }\n }\n if (type != 1) {\n color = !('line-pattern' in paint) && 'line-color' in paint ?\n colorWithOpacity(getValue(layerId, paint, 'line-color', zoom, properties), getValue(layerId, paint, 'line-opacity', zoom, properties)) :\n undefined;\n const width = getValue(layerId, paint, 'line-width', zoom, properties);\n if (color && width > 0) {\n ++stylesLength;\n style = styles[stylesLength];\n if (!style || !style.getStroke() || style.getFill() || style.getText()) {\n style = styles[stylesLength] = new Style({\n stroke: new Stroke()\n });\n }\n stroke = style.getStroke();\n stroke.setLineCap(getValue(layerId, layout, 'line-cap', zoom, properties));\n stroke.setLineJoin(getValue(layerId, layout, 'line-join', zoom, properties));\n stroke.setMiterLimit(getValue(layerId, layout, 'line-miter-limit', zoom, properties));\n stroke.setColor(color);\n stroke.setWidth(width);\n stroke.setLineDash(paint['line-dasharray'] ?\n getValue(layerId, paint, 'line-dasharray', zoom, properties).map(function(x) {\n return x * width;\n }) : null);\n style.setZIndex(index);\n }\n }\n\n let hasImage = false;\n let text = null;\n let icon, iconImg, skipLabel;\n if ((type == 1 || type == 2) && 'icon-image' in layout) {\n const iconImage = getValue(layerId, layout, 'icon-image', zoom, properties);\n if (iconImage) {\n icon = fromTemplate(iconImage, properties);\n let styleGeom = undefined;\n if (spriteImage && spriteData && spriteData[icon]) {\n if (type == 2) {\n const geom = feature.getGeometry();\n // ol package and ol-debug.js only\n if (geom.getFlatMidpoint) {\n const extent = geom.getExtent();\n const size = Math.sqrt(Math.max(\n Math.pow((extent[2] - extent[0]) / resolution, 2),\n Math.pow((extent[3] - extent[1]) / resolution, 2))\n );\n if (size > 150) {\n //FIXME Do not hard-code a size of 150\n styleGeom = new Point(geom.getFlatMidpoint());\n }\n }\n }\n if (type !== 2 || styleGeom) {\n ++stylesLength;\n style = styles[stylesLength];\n if (!style || !style.getImage() || style.getFill() || style.getStroke()) {\n style = styles[stylesLength] = new Style();\n }\n style.setGeometry(styleGeom);\n const iconSize = getValue(layerId, layout, 'icon-size', zoom, properties);\n const iconColor = paint['icon-color'] !== undefined ? getValue(layerId, paint, 'icon-color', zoom, properties) : null;\n let icon_cache_key = icon + '.' + iconSize;\n if (iconColor !== null) {\n icon_cache_key += '.' + iconColor;\n }\n iconImg = iconImageCache[icon_cache_key];\n if (!iconImg) {\n const spriteImageData = spriteData[icon];\n if (iconColor !== null) {\n // cut out the sprite and color it\n color = colorWithOpacity(iconColor, 1);\n const canvas = document.createElement('canvas');\n canvas.width = spriteImageData.width;\n canvas.height = spriteImageData.height;\n const ctx = canvas.getContext('2d');\n ctx.drawImage(\n spriteImage,\n spriteImageData.x,\n spriteImageData.y,\n spriteImageData.width,\n spriteImageData.height,\n 0,\n 0,\n spriteImageData.width,\n spriteImageData.height\n );\n const data = ctx.getImageData(0, 0, canvas.width, canvas.height);\n for (let c = 0, cc = data.data.length; c < cc; c += 4) {\n data.data[c] = color[0];\n data.data[c + 1] = color[1];\n data.data[c + 2] = color[2];\n }\n ctx.putImageData(data, 0, 0);\n iconImg = iconImageCache[icon_cache_key] = new Icon({\n img: canvas,\n imgSize: [canvas.width, canvas.height],\n scale: iconSize / spriteImageData.pixelRatio\n });\n } else {\n iconImg = iconImageCache[icon_cache_key] = new Icon({\n img: spriteImage,\n imgSize: spriteImgSize,\n size: [spriteImageData.width, spriteImageData.height],\n offset: [spriteImageData.x, spriteImageData.y],\n scale: iconSize / spriteImageData.pixelRatio\n });\n }\n }\n iconImg.setRotation(deg2rad(getValue(layerId, layout, 'icon-rotate', zoom, properties)));\n iconImg.setOpacity(getValue(layerId, paint, 'icon-opacity', zoom, properties));\n style.setImage(iconImg);\n text = style.getText();\n style.setText(undefined);\n style.setZIndex(99999 - index);\n hasImage = true;\n skipLabel = false;\n } else {\n skipLabel = true;\n }\n }\n }\n }\n\n if (type == 1 && 'circle-radius' in paint) {\n ++stylesLength;\n style = styles[stylesLength];\n if (!style || !style.getImage() || style.getFill() || style.getStroke()) {\n style = styles[stylesLength] = new Style();\n }\n const circleRadius = getValue(layerId, paint, 'circle-radius', zoom, properties);\n const circleStrokeColor = getValue(layerId, paint, 'circle-stroke-color', zoom, properties);\n const circleColor = getValue(layerId, paint, 'circle-color', zoom, properties);\n const circleOpacity = getValue(layerId, paint, 'circle-opacity', zoom, properties);\n const circleStrokeWidth = getValue(layerId, paint, 'circle-stroke-width', zoom, properties);\n const cache_key = circleRadius + '.' + circleStrokeColor + '.' +\n circleColor + '.' + circleOpacity + '.' + circleStrokeWidth;\n iconImg = iconImageCache[cache_key];\n if (!iconImg) {\n iconImg = new Circle({\n radius: circleRadius,\n stroke: circleStrokeWidth === 0 ? undefined : new Stroke({\n width: circleStrokeWidth,\n color: colorWithOpacity(circleStrokeColor, circleOpacity)\n }),\n fill: new Fill({\n color: colorWithOpacity(circleColor, circleOpacity)\n })\n });\n }\n style.setImage(iconImg);\n text = style.getText();\n style.setText(undefined);\n style.setGeometry(undefined);\n style.setZIndex(99999 - index);\n hasImage = true;\n }\n\n let label;\n if ('text-field' in layout) {\n const textField = getValue(layerId, layout, 'text-field', zoom, properties);\n label = fromTemplate(textField, properties);\n }\n if (label && !skipLabel) {\n if (!hasImage) {\n ++stylesLength;\n style = styles[stylesLength];\n if (!style || !style.getText() || style.getFill() || style.getStroke()) {\n style = styles[stylesLength] = new Style();\n }\n style.setImage(undefined);\n style.setGeometry(undefined);\n }\n if (!style.getText()) {\n style.setText(text || new Text());\n }\n text = style.getText();\n const textSize = getValue(layerId, layout, 'text-size', zoom, properties);\n const font = mb2css(chooseFont(getValue(layerId, layout, 'text-font', zoom, properties)), textSize);\n const textTransform = layout['text-transform'];\n if (textTransform == 'uppercase') {\n label = label.toUpperCase();\n } else if (textTransform == 'lowercase') {\n label = label.toLowerCase();\n }\n const wrappedLabel = type == 2 ? label : wrapText(label, font, getValue(layerId, layout, 'text-max-width', zoom, properties));\n text.setText(wrappedLabel);\n text.setFont(font);\n text.setRotation(deg2rad(getValue(layerId, layout, 'text-rotate', zoom, properties)));\n const textAnchor = getValue(layerId, layout, 'text-anchor', zoom, properties);\n const placement = (hasImage || type == 1) ? 'point' : getValue(layerId, layout, 'symbol-placement', zoom, properties);\n text.setPlacement(placement);\n if (placement == 'point') {\n let textAlign = 'center';\n if (textAnchor.indexOf('left') !== -1) {\n textAlign = 'left';\n } else if (textAnchor.indexOf('right') !== -1) {\n textAlign = 'right';\n }\n text.setTextAlign(textAlign);\n } else {\n text.setTextAlign();\n }\n let textBaseline = 'middle';\n if (textAnchor.indexOf('bottom') == 0) {\n textBaseline = 'bottom';\n } else if (textAnchor.indexOf('top') == 0) {\n textBaseline = 'top';\n }\n text.setTextBaseline(textBaseline);\n const textOffset = getValue(layerId, layout, 'text-offset', zoom, properties);\n text.setOffsetX(textOffset[0] * textSize);\n text.setOffsetY(textOffset[1] * textSize);\n opacity = getValue(layerId, paint, 'text-opacity', zoom, properties);\n textColor.setColor(colorWithOpacity(getValue(layerId, paint, 'text-color', zoom, properties), opacity));\n text.setFill(textColor);\n const haloColor = colorWithOpacity(getValue(layerId, paint, 'text-halo-color', zoom, properties), opacity);\n if (haloColor) {\n textHalo.setColor(haloColor);\n textHalo.setWidth(getValue(layerId, paint, 'text-halo-width', zoom, properties));\n text.setStroke(textHalo);\n } else {\n text.setStroke(undefined);\n }\n style.setZIndex(99999 - index);\n }\n }\n }\n\n if (stylesLength > -1) {\n styles.length = stylesLength + 1;\n return styles;\n }\n };\n\n olLayer.setStyle(styleFunction);\n olLayer.set('mapbox-source', mapboxSource);\n olLayer.set('mapbox-layers', mapboxLayers);\n return styleFunction;\n}\n","var fontWeights = {\n thin: 100,\n hairline: 100,\n 'ultra-light': 100,\n 'extra-light': 100,\n light: 200,\n book: 300,\n regular: 400,\n normal: 400,\n plain: 400,\n roman: 400,\n standard: 400,\n medium: 500,\n 'semi-bold': 600,\n 'demi-bold': 600,\n bold: 700,\n heavy: 800,\n black: 800,\n 'extra-bold': 800,\n 'ultra-black': 900,\n 'extra-black': 900,\n 'ultra-bold': 900,\n 'heavy-black': 900,\n fat: 900,\n poster: 900\n};\nvar sp = ' ';\n\nvar fontCache = {};\n\nmodule.exports = function(font, size) {\n var cssData = fontCache[font];\n if (!cssData) {\n var parts = font.split(' ');\n var maybeWeight = parts[parts.length - 1].toLowerCase();\n var weight = 'normal';\n var style = 'normal';\n if (maybeWeight == 'normal' || maybeWeight == 'italic' || maybeWeight == 'oblique') {\n style = maybeWeight;\n parts.pop();\n maybeWeight = parts[parts.length - 1].toLowerCase();\n }\n for (var w in fontWeights) {\n if (maybeWeight == w || maybeWeight == w.replace('-', '') || maybeWeight == w.replace('-', ' ')) {\n weight = fontWeights[w];\n parts.pop();\n break;\n }\n }\n if (typeof maybeWeight == 'number') {\n weight = maybeWeight;\n }\n var fontFamily = parts.join(' ')\n .replace('Klokantech Noto Sans', 'Noto Sans');\n if (fontFamily.indexOf(' ') !== -1) {\n fontFamily = '\"' + fontFamily + '\"';\n }\n // CSS font property: font-style font-weight font-size font-family\n cssData = fontCache[font] = [style, weight, fontFamily];\n }\n return cssData[0] + sp + cssData[1] + sp + size + 'px' + sp + cssData[2];\n}\n","\nconst colorSpaces = require('./color_spaces');\nconst parseColor = require('../util/parse_color');\nconst extend = require('../util/extend');\nconst getType = require('../util/get_type');\nconst interpolate = require('../util/interpolate');\n\nfunction identityFunction(x) {\n return x;\n}\n\nfunction createFunction(parameters, propertySpec) {\n const isColor = propertySpec.type === 'color';\n\n let fun;\n\n if (!isFunctionDefinition(parameters)) {\n if (isColor && parameters) {\n parameters = parseColor(parameters);\n }\n fun = function() {\n return parameters;\n };\n fun.isFeatureConstant = true;\n fun.isZoomConstant = true;\n\n } else {\n const zoomAndFeatureDependent = parameters.stops && typeof parameters.stops[0][0] === 'object';\n const featureDependent = zoomAndFeatureDependent || parameters.property !== undefined;\n const zoomDependent = zoomAndFeatureDependent || !featureDependent;\n const type = parameters.type || (propertySpec.function === 'interpolated' ? 'exponential' : 'interval');\n\n if (isColor) {\n parameters = extend({}, parameters);\n\n if (parameters.stops) {\n parameters.stops = parameters.stops.map((stop) => {\n return [stop[0], parseColor(stop[1])];\n });\n }\n\n if (parameters.default) {\n parameters.default = parseColor(parameters.default);\n } else {\n parameters.default = parseColor(propertySpec.default);\n }\n }\n\n let innerFun;\n let hashedStops;\n let categoricalKeyType;\n if (type === 'exponential') {\n innerFun = evaluateExponentialFunction;\n } else if (type === 'interval') {\n innerFun = evaluateIntervalFunction;\n } else if (type === 'categorical') {\n innerFun = evaluateCategoricalFunction;\n\n // For categorical functions, generate an Object as a hashmap of the stops for fast searching\n hashedStops = Object.create(null);\n for (const stop of parameters.stops) {\n hashedStops[stop[0]] = stop[1];\n }\n\n // Infer key type based on first stop key-- used to encforce strict type checking later\n categoricalKeyType = typeof parameters.stops[0][0];\n\n } else if (type === 'identity') {\n innerFun = evaluateIdentityFunction;\n } else {\n throw new Error(`Unknown function type \"${type}\"`);\n }\n\n let outputFunction;\n\n // If we're interpolating colors in a color system other than RGBA,\n // first translate all stop values to that color system, then interpolate\n // arrays as usual. The `outputFunction` option lets us then translate\n // the result of that interpolation back into RGBA.\n if (parameters.colorSpace && parameters.colorSpace !== 'rgb') {\n if (colorSpaces[parameters.colorSpace]) {\n const colorspace = colorSpaces[parameters.colorSpace];\n // Avoid mutating the parameters value\n parameters = JSON.parse(JSON.stringify(parameters));\n for (let s = 0; s < parameters.stops.length; s++) {\n parameters.stops[s] = [\n parameters.stops[s][0],\n colorspace.forward(parameters.stops[s][1])\n ];\n }\n outputFunction = colorspace.reverse;\n } else {\n throw new Error(`Unknown color space: ${parameters.colorSpace}`);\n }\n } else {\n outputFunction = identityFunction;\n }\n\n if (zoomAndFeatureDependent) {\n const featureFunctions = {};\n const zoomStops = [];\n for (let s = 0; s < parameters.stops.length; s++) {\n const stop = parameters.stops[s];\n const zoom = stop[0].zoom;\n if (featureFunctions[zoom] === undefined) {\n featureFunctions[zoom] = {\n zoom: zoom,\n type: parameters.type,\n property: parameters.property,\n default: parameters.default,\n stops: []\n };\n zoomStops.push(zoom);\n }\n featureFunctions[zoom].stops.push([stop[0].value, stop[1]]);\n }\n\n const featureFunctionStops = [];\n for (const z of zoomStops) {\n featureFunctionStops.push([featureFunctions[z].zoom, createFunction(featureFunctions[z], propertySpec)]);\n }\n fun = function(zoom, feature) {\n return outputFunction(evaluateExponentialFunction({\n stops: featureFunctionStops,\n base: parameters.base\n }, propertySpec, zoom)(zoom, feature));\n };\n fun.isFeatureConstant = false;\n fun.isZoomConstant = false;\n\n } else if (zoomDependent) {\n fun = function(zoom) {\n return outputFunction(innerFun(parameters, propertySpec, zoom, hashedStops, categoricalKeyType));\n };\n fun.isFeatureConstant = true;\n fun.isZoomConstant = false;\n } else {\n fun = function(zoom, feature) {\n const value = feature[parameters.property];\n if (value === undefined) {\n return coalesce(parameters.default, propertySpec.default);\n }\n return outputFunction(innerFun(parameters, propertySpec, value, hashedStops, categoricalKeyType));\n };\n fun.isFeatureConstant = false;\n fun.isZoomConstant = true;\n }\n }\n\n return fun;\n}\n\nfunction coalesce(a, b, c) {\n if (a !== undefined) return a;\n if (b !== undefined) return b;\n if (c !== undefined) return c;\n}\n\nfunction evaluateCategoricalFunction(parameters, propertySpec, input, hashedStops, keyType) {\n const evaluated = typeof input === keyType ? hashedStops[input] : undefined; // Enforce strict typing on input\n return coalesce(evaluated, parameters.default, propertySpec.default);\n}\n\nfunction evaluateIntervalFunction(parameters, propertySpec, input) {\n // Edge cases\n if (getType(input) !== 'number') return coalesce(parameters.default, propertySpec.default);\n const n = parameters.stops.length;\n if (n === 1) return parameters.stops[0][1];\n if (input <= parameters.stops[0][0]) return parameters.stops[0][1];\n if (input >= parameters.stops[n - 1][0]) return parameters.stops[n - 1][1];\n\n const index = findStopLessThanOrEqualTo(parameters.stops, input);\n\n return parameters.stops[index][1];\n}\n\nfunction evaluateExponentialFunction(parameters, propertySpec, input) {\n const base = parameters.base !== undefined ? parameters.base : 1;\n\n // Edge cases\n if (getType(input) !== 'number') return coalesce(parameters.default, propertySpec.default);\n const n = parameters.stops.length;\n if (n === 1) return parameters.stops[0][1];\n if (input <= parameters.stops[0][0]) return parameters.stops[0][1];\n if (input >= parameters.stops[n - 1][0]) return parameters.stops[n - 1][1];\n\n const index = findStopLessThanOrEqualTo(parameters.stops, input);\n const t = interpolationFactor(\n input, base,\n parameters.stops[index][0],\n parameters.stops[index + 1][0]);\n\n const outputLower = parameters.stops[index][1];\n const outputUpper = parameters.stops[index + 1][1];\n const interp = interpolate[propertySpec.type] || identityFunction;\n\n if (typeof outputLower === 'function') {\n return function(...args) {\n const evaluatedLower = outputLower.apply(undefined, args);\n const evaluatedUpper = outputUpper.apply(undefined, args);\n // Special case for fill-outline-color, which has no spec default.\n if (evaluatedLower === undefined || evaluatedUpper === undefined) {\n return undefined;\n }\n return interp(evaluatedLower, evaluatedUpper, t);\n };\n }\n\n return interp(outputLower, outputUpper, t);\n}\n\nfunction evaluateIdentityFunction(parameters, propertySpec, input) {\n if (propertySpec.type === 'color') {\n input = parseColor(input);\n } else if (getType(input) !== propertySpec.type && (propertySpec.type !== 'enum' || !propertySpec.values[input])) {\n input = undefined;\n }\n return coalesce(input, parameters.default, propertySpec.default);\n}\n\n/**\n * Returns the index of the last stop <= input, or 0 if it doesn't exist.\n *\n * @private\n */\nfunction findStopLessThanOrEqualTo(stops, input) {\n const n = stops.length;\n let lowerIndex = 0;\n let upperIndex = n - 1;\n let currentIndex = 0;\n let currentValue, upperValue;\n\n while (lowerIndex <= upperIndex) {\n currentIndex = Math.floor((lowerIndex + upperIndex) / 2);\n currentValue = stops[currentIndex][0];\n upperValue = stops[currentIndex + 1][0];\n if (input === currentValue || input > currentValue && input < upperValue) { // Search complete\n return currentIndex;\n } else if (currentValue < input) {\n lowerIndex = currentIndex + 1;\n } else if (currentValue > input) {\n upperIndex = currentIndex - 1;\n }\n }\n\n return Math.max(currentIndex - 1, 0);\n}\n\nfunction isFunctionDefinition(value) {\n return typeof value === 'object' && (value.stops || value.type === 'identity');\n}\n\n/**\n * Returns a ratio that can be used to interpolate between exponential function\n * stops.\n *\n * How it works:\n * Two consecutive stop values define a (scaled and shifted) exponential\n * function `f(x) = a * base^x + b`, where `base` is the user-specified base,\n * and `a` and `b` are constants affording sufficient degrees of freedom to fit\n * the function to the given stops.\n *\n * Here's a bit of algebra that lets us compute `f(x)` directly from the stop\n * values without explicitly solving for `a` and `b`:\n *\n * First stop value: `f(x0) = y0 = a * base^x0 + b`\n * Second stop value: `f(x1) = y1 = a * base^x1 + b`\n * => `y1 - y0 = a(base^x1 - base^x0)`\n * => `a = (y1 - y0)/(base^x1 - base^x0)`\n *\n * Desired value: `f(x) = y = a * base^x + b`\n * => `f(x) = y0 + a * (base^x - base^x0)`\n *\n * From the above, we can replace the `a` in `a * (base^x - base^x0)` and do a\n * little algebra:\n * ```\n * a * (base^x - base^x0) = (y1 - y0)/(base^x1 - base^x0) * (base^x - base^x0)\n * = (y1 - y0) * (base^x - base^x0) / (base^x1 - base^x0)\n * ```\n *\n * If we let `(base^x - base^x0) / (base^x1 base^x0)`, then we have\n * `f(x) = y0 + (y1 - y0) * ratio`. In other words, `ratio` may be treated as\n * an interpolation factor between the two stops' output values.\n *\n * (Note: a slightly different form for `ratio`,\n * `(base^(x-x0) - 1) / (base^(x1-x0) - 1) `, is equivalent, but requires fewer\n * expensive `Math.pow()` operations.)\n *\n * @private\n*/\nfunction interpolationFactor(input, base, lowerValue, upperValue) {\n const difference = upperValue - lowerValue;\n const progress = input - lowerValue;\n\n if (difference === 0) {\n return 0;\n } else if (base === 1) {\n return progress / difference;\n } else {\n return (Math.pow(base, progress) - 1) / (Math.pow(base, difference) - 1);\n }\n}\n\nmodule.exports = createFunction;\nmodule.exports.isFunctionDefinition = isFunctionDefinition;\nmodule.exports.interpolationFactor = interpolationFactor;\nmodule.exports.findStopLessThanOrEqualTo = findStopLessThanOrEqualTo;\n","module.exports = ol.source.XYZ;","module.exports = ol.source.VectorTile;","module.exports = ol.source.Vector;","module.exports = ol.source.TileJSON;","module.exports = ol.layer.VectorTile;","module.exports = ol.layer.Vector;","module.exports = ol.layer.Tile;","module.exports = ol.Observable;","module.exports = ol.format.MVT;","module.exports = ol.format.GeoJSON;","module.exports = ol.CanvasMap;","module.exports = ol.tilegrid;","module.exports = ol.proj;","// Generated by CoffeeScript 1.10.0\n(function() {\n var families;\n\n module.exports = {\n icon: 'icons/google.svg',\n name: 'google',\n title: 'Google Fonts',\n link: 'google.com/fonts',\n getNames: function() {\n return families;\n },\n getLink: function(name) {\n return \"https://fonts.google.com/specimen/\" + (name.replace(/( )/g, '+'));\n },\n normalizeName: function(name) {\n return name;\n }\n };\n\n families = [\"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\"];\n\n}).call(this);\n","export function deg2rad(degrees) {\n return degrees * Math.PI / 180;\n}\n\nexport function getZoomForResolution(resolution, resolutions) {\n let i = 0;\n const ii = resolutions.length;\n for (; i < ii; ++i) {\n const candidate = resolutions[i];\n if (candidate < resolution && i + 1 < ii) {\n const zoomFactor = resolutions[i] / resolutions[i + 1];\n return i + Math.log(resolutions[i] / resolution) / Math.log(zoomFactor);\n }\n }\n return ii - 1;\n}\n","module.exports = createFilter;\n\nconst types = ['Unknown', 'Point', 'LineString', 'Polygon'];\n\n/**\n * Given a filter expressed as nested arrays, return a new function\n * that evaluates whether a given feature (with a .properties or .tags property)\n * passes its test.\n *\n * @private\n * @param {Array} filter mapbox gl filter\n * @returns {Function} filter-evaluating function\n */\nfunction createFilter(filter) {\n return new Function('f', `var p = (f && f.properties || {}); return ${compile(filter)}`);\n}\n\nfunction compile(filter) {\n if (!filter) return 'true';\n const op = filter[0];\n if (filter.length <= 1) return op === 'any' ? 'false' : 'true';\n const str =\n op === '==' ? compileComparisonOp(filter[1], filter[2], '===', false) :\n op === '!=' ? compileComparisonOp(filter[1], filter[2], '!==', false) :\n op === '<' ||\n op === '>' ||\n op === '<=' ||\n op === '>=' ? compileComparisonOp(filter[1], filter[2], op, true) :\n op === 'any' ? compileLogicalOp(filter.slice(1), '||') :\n op === 'all' ? compileLogicalOp(filter.slice(1), '&&') :\n op === 'none' ? compileNegation(compileLogicalOp(filter.slice(1), '||')) :\n op === 'in' ? compileInOp(filter[1], filter.slice(2)) :\n op === '!in' ? compileNegation(compileInOp(filter[1], filter.slice(2))) :\n op === 'has' ? compileHasOp(filter[1]) :\n op === '!has' ? compileNegation(compileHasOp(filter[1])) :\n 'true';\n return `(${str})`;\n}\n\nfunction compilePropertyReference(property) {\n const ref =\n property === '$type' ? 'f.type' :\n property === '$id' ? 'f.id' : `p[${JSON.stringify(property)}]`;\n return ref;\n}\n\nfunction compileComparisonOp(property, value, op, checkType) {\n const left = compilePropertyReference(property);\n const right = property === '$type' ? types.indexOf(value) : JSON.stringify(value);\n return (checkType ? `typeof ${left}=== typeof ${right}&&` : '') + left + op + right;\n}\n\nfunction compileLogicalOp(expressions, op) {\n return expressions.map(compile).join(op);\n}\n\nfunction compileInOp(property, values) {\n if (property === '$type') values = values.map((value) => {\n return types.indexOf(value);\n });\n const left = JSON.stringify(values.sort(compare));\n const right = compilePropertyReference(property);\n\n if (values.length <= 200) return `${left}.indexOf(${right}) !== -1`;\n\n return `${'function(v, a, i, j) {' +\n 'while (i <= j) { var m = (i + j) >> 1;' +\n ' if (a[m] === v) return true; if (a[m] > v) j = m - 1; else i = m + 1;' +\n '}' +\n 'return false; }('}${right}, ${left},0,${values.length - 1})`;\n}\n\nfunction compileHasOp(property) {\n return property === '$id' ? '\"id\" in f' : `${JSON.stringify(property)} in p`;\n}\n\nfunction compileNegation(expression) {\n return `!(${expression})`;\n}\n\n// Comparison function to sort numbers and strings\nfunction compare(a, b) {\n return a < b ? -1 : a > b ? 1 : 0;\n}\n","\nmodule.exports = ['type', 'source', 'source-layer', 'minzoom', 'maxzoom', 'filter', 'layout'];\n","\nconst refProperties = require('./util/ref_properties');\n\nfunction deref(layer, parent) {\n const result = {};\n\n for (const k in layer) {\n if (k !== 'ref') {\n result[k] = layer[k];\n }\n }\n\n refProperties.forEach((k) => {\n if (k in parent) {\n result[k] = parent[k];\n }\n });\n\n return result;\n}\n\nmodule.exports = derefLayers;\n\n/**\n * Given an array of layers, some of which may contain `ref` properties\n * whose value is the `id` of another property, return a new array where\n * such layers have been augmented with the 'type', 'source', etc. properties\n * from the parent layer, and the `ref` property has been removed.\n *\n * The input is not modified. The output may contain references to portions\n * of the input.\n *\n * @private\n * @param {Array} layers\n * @returns {Array}\n */\nfunction derefLayers(layers) {\n layers = layers.slice();\n\n const map = Object.create(null);\n for (let i = 0; i < layers.length; i++) {\n map[layers[i].id] = layers[i];\n }\n\n for (let i = 0; i < layers.length; i++) {\n if ('ref' in layers[i]) {\n layers[i] = deref(layers[i], map[layers[i].ref]);\n }\n }\n\n return layers;\n}\n","module.exports = ol.geom.Point;","module.exports = ol.style.Circle;","/**\n * Text placement. One of `'point'`, `'line'`. Default is `'point'`. Note that\n * `'line'` requires the underlying geometry to be a {@link ol.geom.LineString},\n * {@link ol.geom.Polygon}, {@link ol.geom.MultiLineString} or\n * {@link ol.geom.MultiPolygon}.\n * @enum {string}\n */\nvar _ol_style_TextPlacement_ = {\n POINT: 'point',\n LINE: 'line'\n};\n\nexport default _ol_style_TextPlacement_;\n","import _ol_asserts_ from './asserts.js';\nvar _ol_math_ = {};\n\n\n/**\n * Takes a number and clamps it to within the provided bounds.\n * @param {number} value The input number.\n * @param {number} min The minimum value to return.\n * @param {number} max The maximum value to return.\n * @return {number} The input number if it is within bounds, or the nearest\n * number within the bounds.\n */\n_ol_math_.clamp = function(value, min, max) {\n return Math.min(Math.max(value, min), max);\n};\n\n\n/**\n * Return the hyperbolic cosine of a given number. The method will use the\n * native `Math.cosh` function if it is available, otherwise the hyperbolic\n * cosine will be calculated via the reference implementation of the Mozilla\n * developer network.\n *\n * @param {number} x X.\n * @return {number} Hyperbolic cosine of x.\n */\n_ol_math_.cosh = (function() {\n // Wrapped in a iife, to save the overhead of checking for the native\n // implementation on every invocation.\n var cosh;\n if ('cosh' in Math) {\n // The environment supports the native Math.cosh function, use it…\n cosh = Math.cosh;\n } else {\n // … else, use the reference implementation of MDN:\n cosh = function(x) {\n var y = Math.exp(x);\n return (y + 1 / y) / 2;\n };\n }\n return cosh;\n}());\n\n\n/**\n * @param {number} x X.\n * @return {number} The smallest power of two greater than or equal to x.\n */\n_ol_math_.roundUpToPowerOfTwo = function(x) {\n _ol_asserts_.assert(0 < x, 29); // `x` must be greater than `0`\n return Math.pow(2, Math.ceil(Math.log(x) / Math.LN2));\n};\n\n\n/**\n * Returns the square of the closest distance between the point (x, y) and the\n * line segment (x1, y1) to (x2, y2).\n * @param {number} x X.\n * @param {number} y Y.\n * @param {number} x1 X1.\n * @param {number} y1 Y1.\n * @param {number} x2 X2.\n * @param {number} y2 Y2.\n * @return {number} Squared distance.\n */\n_ol_math_.squaredSegmentDistance = function(x, y, x1, y1, x2, y2) {\n var dx = x2 - x1;\n var dy = y2 - y1;\n if (dx !== 0 || dy !== 0) {\n var t = ((x - x1) * dx + (y - y1) * dy) / (dx * dx + dy * dy);\n if (t > 1) {\n x1 = x2;\n y1 = y2;\n } else if (t > 0) {\n x1 += dx * t;\n y1 += dy * t;\n }\n }\n return _ol_math_.squaredDistance(x, y, x1, y1);\n};\n\n\n/**\n * Returns the square of the distance between the points (x1, y1) and (x2, y2).\n * @param {number} x1 X1.\n * @param {number} y1 Y1.\n * @param {number} x2 X2.\n * @param {number} y2 Y2.\n * @return {number} Squared distance.\n */\n_ol_math_.squaredDistance = function(x1, y1, x2, y2) {\n var dx = x2 - x1;\n var dy = y2 - y1;\n return dx * dx + dy * dy;\n};\n\n\n/**\n * Solves system of linear equations using Gaussian elimination method.\n *\n * @param {Array.>} mat Augmented matrix (n x n + 1 column)\n * in row-major order.\n * @return {Array.} The resulting vector.\n */\n_ol_math_.solveLinearSystem = function(mat) {\n var n = mat.length;\n\n for (var i = 0; i < n; i++) {\n // Find max in the i-th column (ignoring i - 1 first rows)\n var maxRow = i;\n var maxEl = Math.abs(mat[i][i]);\n for (var r = i + 1; r < n; r++) {\n var absValue = Math.abs(mat[r][i]);\n if (absValue > maxEl) {\n maxEl = absValue;\n maxRow = r;\n }\n }\n\n if (maxEl === 0) {\n return null; // matrix is singular\n }\n\n // Swap max row with i-th (current) row\n var tmp = mat[maxRow];\n mat[maxRow] = mat[i];\n mat[i] = tmp;\n\n // Subtract the i-th row to make all the remaining rows 0 in the i-th column\n for (var j = i + 1; j < n; j++) {\n var coef = -mat[j][i] / mat[i][i];\n for (var k = i; k < n + 1; k++) {\n if (i == k) {\n mat[j][k] = 0;\n } else {\n mat[j][k] += coef * mat[i][k];\n }\n }\n }\n }\n\n // Solve Ax=b for upper triangular matrix A (mat)\n var x = new Array(n);\n for (var l = n - 1; l >= 0; l--) {\n x[l] = mat[l][n] / mat[l][l];\n for (var m = l - 1; m >= 0; m--) {\n mat[m][n] -= mat[m][l] * x[l];\n }\n }\n return x;\n};\n\n\n/**\n * Converts radians to to degrees.\n *\n * @param {number} angleInRadians Angle in radians.\n * @return {number} Angle in degrees.\n */\n_ol_math_.toDegrees = function(angleInRadians) {\n return angleInRadians * 180 / Math.PI;\n};\n\n\n/**\n * Converts degrees to radians.\n *\n * @param {number} angleInDegrees Angle in degrees.\n * @return {number} Angle in radians.\n */\n_ol_math_.toRadians = function(angleInDegrees) {\n return angleInDegrees * Math.PI / 180;\n};\n\n/**\n * Returns the modulo of a / b, depending on the sign of b.\n *\n * @param {number} a Dividend.\n * @param {number} b Divisor.\n * @return {number} Modulo.\n */\n_ol_math_.modulo = function(a, b) {\n var r = a % b;\n return r * b < 0 ? r + b : r;\n};\n\n/**\n * Calculates the linearly interpolated value of x between a and b.\n *\n * @param {number} a Number\n * @param {number} b Number\n * @param {number} x Value to be interpolated.\n * @return {number} Interpolated value.\n */\n_ol_math_.lerp = function(a, b, x) {\n return a + x * (b - a);\n};\nexport default _ol_math_;\n","import _ol_ from './index.js';\n\n/**\n * Error object thrown when an assertion failed. This is an ECMA-262 Error,\n * extended with a `code` property.\n * @see {@link https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Error}\n * @constructor\n * @extends {Error}\n * @implements {oli.AssertionError}\n * @param {number} code Error code.\n */\nvar _ol_AssertionError_ = function(code) {\n\n var path = _ol_.VERSION ? _ol_.VERSION.split('-')[0] : 'latest';\n\n /**\n * @type {string}\n */\n this.message = 'Assertion failed. See https://openlayers.org/en/' + path +\n '/doc/errors/#' + code + ' for details.';\n\n /**\n * Error code. The meaning of the code can be found on\n * {@link https://openlayers.org/en/latest/doc/errors/} (replace `latest` with\n * the version found in the OpenLayers script's header comment if a version\n * other than the latest is used).\n * @type {number}\n * @api\n */\n this.code = code;\n\n this.name = 'AssertionError';\n\n};\n\n_ol_.inherits(_ol_AssertionError_, Error);\nexport default _ol_AssertionError_;\n","import _ol_asserts_ from './asserts.js';\nimport _ol_math_ from './math.js';\nvar _ol_color_ = {};\n\n\n/**\n * This RegExp matches # followed by 3, 4, 6, or 8 hex digits.\n * @const\n * @type {RegExp}\n * @private\n */\n_ol_color_.HEX_COLOR_RE_ = /^#(?:[0-9a-f]{3,4}){1,2}$/i;\n\n\n/**\n * Regular expression for matching potential named color style strings.\n * @const\n * @type {RegExp}\n * @private\n */\n_ol_color_.NAMED_COLOR_RE_ = /^([a-z]*)$/i;\n\n\n/**\n * Return the color as an array. This function maintains a cache of calculated\n * arrays which means the result should not be modified.\n * @param {ol.Color|string} color Color.\n * @return {ol.Color} Color.\n * @api\n */\n_ol_color_.asArray = function(color) {\n if (Array.isArray(color)) {\n return color;\n } else {\n return _ol_color_.fromString(/** @type {string} */ (color));\n }\n};\n\n\n/**\n * Return the color as an rgba string.\n * @param {ol.Color|string} color Color.\n * @return {string} Rgba string.\n * @api\n */\n_ol_color_.asString = function(color) {\n if (typeof color === 'string') {\n return color;\n } else {\n return _ol_color_.toString(color);\n }\n};\n\n/**\n * Return named color as an rgba string.\n * @param {string} color Named color.\n * @return {string} Rgb string.\n */\n_ol_color_.fromNamed = function(color) {\n var el = document.createElement('div');\n el.style.color = color;\n document.body.appendChild(el);\n var rgb = getComputedStyle(el).color;\n document.body.removeChild(el);\n return rgb;\n};\n\n\n/**\n * @param {string} s String.\n * @return {ol.Color} Color.\n */\n_ol_color_.fromString = (\n function() {\n\n // We maintain a small cache of parsed strings. To provide cheap LRU-like\n // semantics, whenever the cache grows too large we simply delete an\n // arbitrary 25% of the entries.\n\n /**\n * @const\n * @type {number}\n */\n var MAX_CACHE_SIZE = 1024;\n\n /**\n * @type {Object.}\n */\n var cache = {};\n\n /**\n * @type {number}\n */\n var cacheSize = 0;\n\n return (\n /**\n * @param {string} s String.\n * @return {ol.Color} Color.\n */\n function(s) {\n var color;\n if (cache.hasOwnProperty(s)) {\n color = cache[s];\n } else {\n if (cacheSize >= MAX_CACHE_SIZE) {\n var i = 0;\n var key;\n for (key in cache) {\n if ((i++ & 3) === 0) {\n delete cache[key];\n --cacheSize;\n }\n }\n }\n color = _ol_color_.fromStringInternal_(s);\n cache[s] = color;\n ++cacheSize;\n }\n return color;\n }\n );\n\n })();\n\n\n/**\n * @param {string} s String.\n * @private\n * @return {ol.Color} Color.\n */\n_ol_color_.fromStringInternal_ = function(s) {\n var r, g, b, a, color, parts;\n\n if (_ol_color_.NAMED_COLOR_RE_.exec(s)) {\n s = _ol_color_.fromNamed(s);\n }\n\n if (_ol_color_.HEX_COLOR_RE_.exec(s)) { // hex\n var n = s.length - 1; // number of hex digits\n var d; // number of digits per channel\n if (n <= 4) {\n d = 1;\n } else {\n d = 2;\n }\n var hasAlpha = n === 4 || n === 8;\n r = parseInt(s.substr(1 + 0 * d, d), 16);\n g = parseInt(s.substr(1 + 1 * d, d), 16);\n b = parseInt(s.substr(1 + 2 * d, d), 16);\n if (hasAlpha) {\n a = parseInt(s.substr(1 + 3 * d, d), 16);\n } else {\n a = 255;\n }\n if (d == 1) {\n r = (r << 4) + r;\n g = (g << 4) + g;\n b = (b << 4) + b;\n if (hasAlpha) {\n a = (a << 4) + a;\n }\n }\n color = [r, g, b, a / 255];\n } else if (s.indexOf('rgba(') == 0) { // rgba()\n parts = s.slice(5, -1).split(',').map(Number);\n color = _ol_color_.normalize(parts);\n } else if (s.indexOf('rgb(') == 0) { // rgb()\n parts = s.slice(4, -1).split(',').map(Number);\n parts.push(1);\n color = _ol_color_.normalize(parts);\n } else {\n _ol_asserts_.assert(false, 14); // Invalid color\n }\n return /** @type {ol.Color} */ (color);\n};\n\n\n/**\n * @param {ol.Color} color Color.\n * @param {ol.Color=} opt_color Color.\n * @return {ol.Color} Clamped color.\n */\n_ol_color_.normalize = function(color, opt_color) {\n var result = opt_color || [];\n result[0] = _ol_math_.clamp((color[0] + 0.5) | 0, 0, 255);\n result[1] = _ol_math_.clamp((color[1] + 0.5) | 0, 0, 255);\n result[2] = _ol_math_.clamp((color[2] + 0.5) | 0, 0, 255);\n result[3] = _ol_math_.clamp(color[3], 0, 1);\n return result;\n};\n\n\n/**\n * @param {ol.Color} color Color.\n * @return {string} String.\n */\n_ol_color_.toString = function(color) {\n var r = color[0];\n if (r != (r | 0)) {\n r = (r + 0.5) | 0;\n }\n var g = color[1];\n if (g != (g | 0)) {\n g = (g + 0.5) | 0;\n }\n var b = color[2];\n if (b != (b | 0)) {\n b = (b + 0.5) | 0;\n }\n var a = color[3] === undefined ? 1 : color[3];\n return 'rgba(' + r + ',' + g + ',' + b + ',' + a + ')';\n};\nexport default _ol_color_;\n","import _ol_ from '../index.js';\nimport _ol_color_ from '../color.js';\n\n/**\n * @classdesc\n * Set fill style for vector features.\n *\n * @constructor\n * @param {olx.style.FillOptions=} opt_options Options.\n * @api\n */\nvar _ol_style_Fill_ = function(opt_options) {\n\n var options = opt_options || {};\n\n /**\n * @private\n * @type {ol.Color|ol.ColorLike}\n */\n this.color_ = options.color !== undefined ? options.color : null;\n\n /**\n * @private\n * @type {string|undefined}\n */\n this.checksum_ = undefined;\n};\n\n\n/**\n * Clones the style. The color is not cloned if it is an {@link ol.ColorLike}.\n * @return {ol.style.Fill} The cloned style.\n * @api\n */\n_ol_style_Fill_.prototype.clone = function() {\n var color = this.getColor();\n return new _ol_style_Fill_({\n color: (color && color.slice) ? color.slice() : color || undefined\n });\n};\n\n\n/**\n * Get the fill color.\n * @return {ol.Color|ol.ColorLike} Color.\n * @api\n */\n_ol_style_Fill_.prototype.getColor = function() {\n return this.color_;\n};\n\n\n/**\n * Set the color.\n *\n * @param {ol.Color|ol.ColorLike} color Color.\n * @api\n */\n_ol_style_Fill_.prototype.setColor = function(color) {\n this.color_ = color;\n this.checksum_ = undefined;\n};\n\n\n/**\n * @return {string} The checksum.\n */\n_ol_style_Fill_.prototype.getChecksum = function() {\n if (this.checksum_ === undefined) {\n if (\n this.color_ instanceof CanvasPattern ||\n this.color_ instanceof CanvasGradient\n ) {\n this.checksum_ = _ol_.getUid(this.color_).toString();\n } else {\n this.checksum_ = 'f' + (this.color_ ?\n _ol_color_.asString(this.color_) : '-');\n }\n }\n\n return this.checksum_;\n};\nexport default _ol_style_Fill_;\n","import _ol_style_Fill_ from '../style/fill.js';\nimport _ol_style_TextPlacement_ from '../style/textplacement.js';\n\n/**\n * @classdesc\n * Set text style for vector features.\n *\n * @constructor\n * @param {olx.style.TextOptions=} opt_options Options.\n * @api\n */\nvar _ol_style_Text_ = function(opt_options) {\n\n var options = opt_options || {};\n\n /**\n * @private\n * @type {string|undefined}\n */\n this.font_ = options.font;\n\n /**\n * @private\n * @type {number|undefined}\n */\n this.rotation_ = options.rotation;\n\n /**\n * @private\n * @type {boolean|undefined}\n */\n this.rotateWithView_ = options.rotateWithView;\n\n /**\n * @private\n * @type {number|undefined}\n */\n this.scale_ = options.scale;\n\n /**\n * @private\n * @type {string|undefined}\n */\n this.text_ = options.text;\n\n /**\n * @private\n * @type {string|undefined}\n */\n this.textAlign_ = options.textAlign;\n\n /**\n * @private\n * @type {string|undefined}\n */\n this.textBaseline_ = options.textBaseline;\n\n /**\n * @private\n * @type {ol.style.Fill}\n */\n this.fill_ = options.fill !== undefined ? options.fill :\n new _ol_style_Fill_({color: _ol_style_Text_.DEFAULT_FILL_COLOR_});\n\n /**\n * @private\n * @type {number}\n */\n this.maxAngle_ = options.maxAngle !== undefined ? options.maxAngle : Math.PI / 4;\n\n /**\n * @private\n * @type {ol.style.TextPlacement|string}\n */\n this.placement_ = options.placement !== undefined ? options.placement : _ol_style_TextPlacement_.POINT;\n\n //TODO Use options.overflow directly after removing @deprecated exceedLength\n var overflow = options.overflow === undefined ? options.exceedLength : options.overflow;\n\n /**\n * @private\n * @type {boolean}\n */\n this.overflow_ = overflow !== undefined ? overflow : false;\n\n /**\n * @private\n * @type {ol.style.Stroke}\n */\n this.stroke_ = options.stroke !== undefined ? options.stroke : null;\n\n /**\n * @private\n * @type {number}\n */\n this.offsetX_ = options.offsetX !== undefined ? options.offsetX : 0;\n\n /**\n * @private\n * @type {number}\n */\n this.offsetY_ = options.offsetY !== undefined ? options.offsetY : 0;\n\n /**\n * @private\n * @type {ol.style.Fill}\n */\n this.backgroundFill_ = options.backgroundFill ? options.backgroundFill : null;\n\n /**\n * @private\n * @type {ol.style.Stroke}\n */\n this.backgroundStroke_ = options.backgroundStroke ? options.backgroundStroke : null;\n\n /**\n * @private\n * @type {Array.}\n */\n this.padding_ = options.padding === undefined ? null : options.padding;\n};\n\n\n/**\n * The default fill color to use if no fill was set at construction time; a\n * blackish `#333`.\n *\n * @const {string}\n * @private\n */\n_ol_style_Text_.DEFAULT_FILL_COLOR_ = '#333';\n\n\n/**\n * Clones the style.\n * @return {ol.style.Text} The cloned style.\n * @api\n */\n_ol_style_Text_.prototype.clone = function() {\n return new _ol_style_Text_({\n font: this.getFont(),\n placement: this.getPlacement(),\n maxAngle: this.getMaxAngle(),\n overflow: this.getOverflow(),\n rotation: this.getRotation(),\n rotateWithView: this.getRotateWithView(),\n scale: this.getScale(),\n text: this.getText(),\n textAlign: this.getTextAlign(),\n textBaseline: this.getTextBaseline(),\n fill: this.getFill() ? this.getFill().clone() : undefined,\n stroke: this.getStroke() ? this.getStroke().clone() : undefined,\n offsetX: this.getOffsetX(),\n offsetY: this.getOffsetY()\n });\n};\n\n\n/**\n * Get the `overflow` configuration.\n * @return {boolean} Let text overflow the length of the path they follow.\n * @api\n */\n_ol_style_Text_.prototype.getOverflow = function() {\n return this.overflow_;\n};\n\n\n/**\n * Get the font name.\n * @return {string|undefined} Font.\n * @api\n */\n_ol_style_Text_.prototype.getFont = function() {\n return this.font_;\n};\n\n\n/**\n * Get the maximum angle between adjacent characters.\n * @return {number} Angle in radians.\n * @api\n */\n_ol_style_Text_.prototype.getMaxAngle = function() {\n return this.maxAngle_;\n};\n\n\n/**\n * Get the label placement.\n * @return {ol.style.TextPlacement|string} Text placement.\n * @api\n */\n_ol_style_Text_.prototype.getPlacement = function() {\n return this.placement_;\n};\n\n\n/**\n * Get the x-offset for the text.\n * @return {number} Horizontal text offset.\n * @api\n */\n_ol_style_Text_.prototype.getOffsetX = function() {\n return this.offsetX_;\n};\n\n\n/**\n * Get the y-offset for the text.\n * @return {number} Vertical text offset.\n * @api\n */\n_ol_style_Text_.prototype.getOffsetY = function() {\n return this.offsetY_;\n};\n\n\n/**\n * Get the fill style for the text.\n * @return {ol.style.Fill} Fill style.\n * @api\n */\n_ol_style_Text_.prototype.getFill = function() {\n return this.fill_;\n};\n\n\n/**\n * Determine whether the text rotates with the map.\n * @return {boolean|undefined} Rotate with map.\n * @api\n */\n_ol_style_Text_.prototype.getRotateWithView = function() {\n return this.rotateWithView_;\n};\n\n\n/**\n * Get the text rotation.\n * @return {number|undefined} Rotation.\n * @api\n */\n_ol_style_Text_.prototype.getRotation = function() {\n return this.rotation_;\n};\n\n\n/**\n * Get the text scale.\n * @return {number|undefined} Scale.\n * @api\n */\n_ol_style_Text_.prototype.getScale = function() {\n return this.scale_;\n};\n\n\n/**\n * Get the stroke style for the text.\n * @return {ol.style.Stroke} Stroke style.\n * @api\n */\n_ol_style_Text_.prototype.getStroke = function() {\n return this.stroke_;\n};\n\n\n/**\n * Get the text to be rendered.\n * @return {string|undefined} Text.\n * @api\n */\n_ol_style_Text_.prototype.getText = function() {\n return this.text_;\n};\n\n\n/**\n * Get the text alignment.\n * @return {string|undefined} Text align.\n * @api\n */\n_ol_style_Text_.prototype.getTextAlign = function() {\n return this.textAlign_;\n};\n\n\n/**\n * Get the text baseline.\n * @return {string|undefined} Text baseline.\n * @api\n */\n_ol_style_Text_.prototype.getTextBaseline = function() {\n return this.textBaseline_;\n};\n\n\n/**\n * Get the background fill style for the text.\n * @return {ol.style.Fill} Fill style.\n * @api\n */\n_ol_style_Text_.prototype.getBackgroundFill = function() {\n return this.backgroundFill_;\n};\n\n\n/**\n * Get the background stroke style for the text.\n * @return {ol.style.Stroke} Stroke style.\n * @api\n */\n_ol_style_Text_.prototype.getBackgroundStroke = function() {\n return this.backgroundStroke_;\n};\n\n\n/**\n * Get the padding for the text.\n * @return {Array.} Padding.\n * @api\n */\n_ol_style_Text_.prototype.getPadding = function() {\n return this.padding_;\n};\n\n\n/**\n * Set the `overflow` property.\n *\n * @param {boolean} overflow Let text overflow the path that it follows.\n * @api\n */\n_ol_style_Text_.prototype.setOverflow = function(overflow) {\n this.overflow_ = overflow;\n};\n\n\n/**\n * Set the font.\n *\n * @param {string|undefined} font Font.\n * @api\n */\n_ol_style_Text_.prototype.setFont = function(font) {\n this.font_ = font;\n};\n\n\n/**\n * Set the maximum angle between adjacent characters.\n *\n * @param {number} maxAngle Angle in radians.\n * @api\n */\n_ol_style_Text_.prototype.setMaxAngle = function(maxAngle) {\n this.maxAngle_ = maxAngle;\n};\n\n\n/**\n * Set the x offset.\n *\n * @param {number} offsetX Horizontal text offset.\n * @api\n */\n_ol_style_Text_.prototype.setOffsetX = function(offsetX) {\n this.offsetX_ = offsetX;\n};\n\n\n/**\n * Set the y offset.\n *\n * @param {number} offsetY Vertical text offset.\n * @api\n */\n_ol_style_Text_.prototype.setOffsetY = function(offsetY) {\n this.offsetY_ = offsetY;\n};\n\n\n/**\n * Set the text placement.\n *\n * @param {ol.style.TextPlacement|string} placement Placement.\n * @api\n */\n_ol_style_Text_.prototype.setPlacement = function(placement) {\n this.placement_ = placement;\n};\n\n\n/**\n * Set the fill.\n *\n * @param {ol.style.Fill} fill Fill style.\n * @api\n */\n_ol_style_Text_.prototype.setFill = function(fill) {\n this.fill_ = fill;\n};\n\n\n/**\n * Set the rotation.\n *\n * @param {number|undefined} rotation Rotation.\n * @api\n */\n_ol_style_Text_.prototype.setRotation = function(rotation) {\n this.rotation_ = rotation;\n};\n\n\n/**\n * Set the scale.\n *\n * @param {number|undefined} scale Scale.\n * @api\n */\n_ol_style_Text_.prototype.setScale = function(scale) {\n this.scale_ = scale;\n};\n\n\n/**\n * Set the stroke.\n *\n * @param {ol.style.Stroke} stroke Stroke style.\n * @api\n */\n_ol_style_Text_.prototype.setStroke = function(stroke) {\n this.stroke_ = stroke;\n};\n\n\n/**\n * Set the text.\n *\n * @param {string|undefined} text Text.\n * @api\n */\n_ol_style_Text_.prototype.setText = function(text) {\n this.text_ = text;\n};\n\n\n/**\n * Set the text alignment.\n *\n * @param {string|undefined} textAlign Text align.\n * @api\n */\n_ol_style_Text_.prototype.setTextAlign = function(textAlign) {\n this.textAlign_ = textAlign;\n};\n\n\n/**\n * Set the text baseline.\n *\n * @param {string|undefined} textBaseline Text baseline.\n * @api\n */\n_ol_style_Text_.prototype.setTextBaseline = function(textBaseline) {\n this.textBaseline_ = textBaseline;\n};\n\n\n/**\n * Set the background fill.\n *\n * @param {ol.style.Fill} fill Fill style.\n * @api\n */\n_ol_style_Text_.prototype.setBackgroundFill = function(fill) {\n this.backgroundFill_ = fill;\n};\n\n\n/**\n * Set the background stroke.\n *\n * @param {ol.style.Stroke} stroke Stroke style.\n * @api\n */\n_ol_style_Text_.prototype.setBackgroundStroke = function(stroke) {\n this.backgroundStroke_ = stroke;\n};\n\n\n/**\n * Set the padding (`[top, right, bottom, left]`).\n *\n * @param {!Array.} padding Padding.\n * @api\n */\n_ol_style_Text_.prototype.setPadding = function(padding) {\n this.padding_ = padding;\n};\nexport default _ol_style_Text_;\n","module.exports = ol.style.Icon;","module.exports = ol.style.Stroke;","module.exports = ol.style.Fill;","module.exports = ol.style.Style;","\nmodule.exports = interpolate;\n\nfunction interpolate(a, b, t) {\n return (a * (1 - t)) + (b * t);\n}\n\ninterpolate.number = interpolate;\n\ninterpolate.vec2 = function(from, to, t) {\n return [\n interpolate(from[0], to[0], t),\n interpolate(from[1], to[1], t)\n ];\n};\n\n/*\n * Interpolate between two colors given as 4-element arrays.\n *\n * @param {Color} from\n * @param {Color} to\n * @param {number} t interpolation factor between 0 and 1\n * @returns {Color} interpolated color\n */\ninterpolate.color = function(from, to, t) {\n return [\n interpolate(from[0], to[0], t),\n interpolate(from[1], to[1], t),\n interpolate(from[2], to[2], t),\n interpolate(from[3], to[3], t)\n ];\n};\n\ninterpolate.array = function(from, to, t) {\n return from.map((d, i) => {\n return interpolate(d, to[i], t);\n });\n};\n","\nmodule.exports = function getType(val) {\n if (val instanceof Number) {\n return 'number';\n } else if (val instanceof String) {\n return 'string';\n } else if (val instanceof Boolean) {\n return 'boolean';\n } else if (Array.isArray(val)) {\n return 'array';\n } else if (val === null) {\n return 'null';\n } else {\n return typeof val;\n }\n};\n","\nmodule.exports = function (output, ...inputs) {\n for (const input of inputs) {\n for (const k in input) {\n output[k] = input[k];\n }\n }\n return output;\n};\n","// (c) Dean McNamee , 2012.\n//\n// https://github.com/deanm/css-color-parser-js\n//\n// Permission is hereby granted, free of charge, to any person obtaining a copy\n// of this software and associated documentation files (the \"Software\"), to\n// deal in the Software without restriction, including without limitation the\n// rights to use, copy, modify, merge, publish, distribute, sublicense, and/or\n// sell copies of the Software, and to permit persons to whom the Software is\n// furnished to do so, subject to the following conditions:\n//\n// The above copyright notice and this permission notice shall be included in\n// all copies or substantial portions of the Software.\n//\n// THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\n// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\n// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\n// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\n// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING\n// FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS\n// IN THE SOFTWARE.\n\n// http://www.w3.org/TR/css3-color/\nvar kCSSColorTable = {\n \"transparent\": [0,0,0,0], \"aliceblue\": [240,248,255,1],\n \"antiquewhite\": [250,235,215,1], \"aqua\": [0,255,255,1],\n \"aquamarine\": [127,255,212,1], \"azure\": [240,255,255,1],\n \"beige\": [245,245,220,1], \"bisque\": [255,228,196,1],\n \"black\": [0,0,0,1], \"blanchedalmond\": [255,235,205,1],\n \"blue\": [0,0,255,1], \"blueviolet\": [138,43,226,1],\n \"brown\": [165,42,42,1], \"burlywood\": [222,184,135,1],\n \"cadetblue\": [95,158,160,1], \"chartreuse\": [127,255,0,1],\n \"chocolate\": [210,105,30,1], \"coral\": [255,127,80,1],\n \"cornflowerblue\": [100,149,237,1], \"cornsilk\": [255,248,220,1],\n \"crimson\": [220,20,60,1], \"cyan\": [0,255,255,1],\n \"darkblue\": [0,0,139,1], \"darkcyan\": [0,139,139,1],\n \"darkgoldenrod\": [184,134,11,1], \"darkgray\": [169,169,169,1],\n \"darkgreen\": [0,100,0,1], \"darkgrey\": [169,169,169,1],\n \"darkkhaki\": [189,183,107,1], \"darkmagenta\": [139,0,139,1],\n \"darkolivegreen\": [85,107,47,1], \"darkorange\": [255,140,0,1],\n \"darkorchid\": [153,50,204,1], \"darkred\": [139,0,0,1],\n \"darksalmon\": [233,150,122,1], \"darkseagreen\": [143,188,143,1],\n \"darkslateblue\": [72,61,139,1], \"darkslategray\": [47,79,79,1],\n \"darkslategrey\": [47,79,79,1], \"darkturquoise\": [0,206,209,1],\n \"darkviolet\": [148,0,211,1], \"deeppink\": [255,20,147,1],\n \"deepskyblue\": [0,191,255,1], \"dimgray\": [105,105,105,1],\n \"dimgrey\": [105,105,105,1], \"dodgerblue\": [30,144,255,1],\n \"firebrick\": [178,34,34,1], \"floralwhite\": [255,250,240,1],\n \"forestgreen\": [34,139,34,1], \"fuchsia\": [255,0,255,1],\n \"gainsboro\": [220,220,220,1], \"ghostwhite\": [248,248,255,1],\n \"gold\": [255,215,0,1], \"goldenrod\": [218,165,32,1],\n \"gray\": [128,128,128,1], \"green\": [0,128,0,1],\n \"greenyellow\": [173,255,47,1], \"grey\": [128,128,128,1],\n \"honeydew\": [240,255,240,1], \"hotpink\": [255,105,180,1],\n \"indianred\": [205,92,92,1], \"indigo\": [75,0,130,1],\n \"ivory\": [255,255,240,1], \"khaki\": [240,230,140,1],\n \"lavender\": [230,230,250,1], \"lavenderblush\": [255,240,245,1],\n \"lawngreen\": [124,252,0,1], \"lemonchiffon\": [255,250,205,1],\n \"lightblue\": [173,216,230,1], \"lightcoral\": [240,128,128,1],\n \"lightcyan\": [224,255,255,1], \"lightgoldenrodyellow\": [250,250,210,1],\n \"lightgray\": [211,211,211,1], \"lightgreen\": [144,238,144,1],\n \"lightgrey\": [211,211,211,1], \"lightpink\": [255,182,193,1],\n \"lightsalmon\": [255,160,122,1], \"lightseagreen\": [32,178,170,1],\n \"lightskyblue\": [135,206,250,1], \"lightslategray\": [119,136,153,1],\n \"lightslategrey\": [119,136,153,1], \"lightsteelblue\": [176,196,222,1],\n \"lightyellow\": [255,255,224,1], \"lime\": [0,255,0,1],\n \"limegreen\": [50,205,50,1], \"linen\": [250,240,230,1],\n \"magenta\": [255,0,255,1], \"maroon\": [128,0,0,1],\n \"mediumaquamarine\": [102,205,170,1], \"mediumblue\": [0,0,205,1],\n \"mediumorchid\": [186,85,211,1], \"mediumpurple\": [147,112,219,1],\n \"mediumseagreen\": [60,179,113,1], \"mediumslateblue\": [123,104,238,1],\n \"mediumspringgreen\": [0,250,154,1], \"mediumturquoise\": [72,209,204,1],\n \"mediumvioletred\": [199,21,133,1], \"midnightblue\": [25,25,112,1],\n \"mintcream\": [245,255,250,1], \"mistyrose\": [255,228,225,1],\n \"moccasin\": [255,228,181,1], \"navajowhite\": [255,222,173,1],\n \"navy\": [0,0,128,1], \"oldlace\": [253,245,230,1],\n \"olive\": [128,128,0,1], \"olivedrab\": [107,142,35,1],\n \"orange\": [255,165,0,1], \"orangered\": [255,69,0,1],\n \"orchid\": [218,112,214,1], \"palegoldenrod\": [238,232,170,1],\n \"palegreen\": [152,251,152,1], \"paleturquoise\": [175,238,238,1],\n \"palevioletred\": [219,112,147,1], \"papayawhip\": [255,239,213,1],\n \"peachpuff\": [255,218,185,1], \"peru\": [205,133,63,1],\n \"pink\": [255,192,203,1], \"plum\": [221,160,221,1],\n \"powderblue\": [176,224,230,1], \"purple\": [128,0,128,1],\n \"rebeccapurple\": [102,51,153,1],\n \"red\": [255,0,0,1], \"rosybrown\": [188,143,143,1],\n \"royalblue\": [65,105,225,1], \"saddlebrown\": [139,69,19,1],\n \"salmon\": [250,128,114,1], \"sandybrown\": [244,164,96,1],\n \"seagreen\": [46,139,87,1], \"seashell\": [255,245,238,1],\n \"sienna\": [160,82,45,1], \"silver\": [192,192,192,1],\n \"skyblue\": [135,206,235,1], \"slateblue\": [106,90,205,1],\n \"slategray\": [112,128,144,1], \"slategrey\": [112,128,144,1],\n \"snow\": [255,250,250,1], \"springgreen\": [0,255,127,1],\n \"steelblue\": [70,130,180,1], \"tan\": [210,180,140,1],\n \"teal\": [0,128,128,1], \"thistle\": [216,191,216,1],\n \"tomato\": [255,99,71,1], \"turquoise\": [64,224,208,1],\n \"violet\": [238,130,238,1], \"wheat\": [245,222,179,1],\n \"white\": [255,255,255,1], \"whitesmoke\": [245,245,245,1],\n \"yellow\": [255,255,0,1], \"yellowgreen\": [154,205,50,1]}\n\nfunction clamp_css_byte(i) { // Clamp to integer 0 .. 255.\n i = Math.round(i); // Seems to be what Chrome does (vs truncation).\n return i < 0 ? 0 : i > 255 ? 255 : i;\n}\n\nfunction clamp_css_float(f) { // Clamp to float 0.0 .. 1.0.\n return f < 0 ? 0 : f > 1 ? 1 : f;\n}\n\nfunction parse_css_int(str) { // int or percentage.\n if (str[str.length - 1] === '%')\n return clamp_css_byte(parseFloat(str) / 100 * 255);\n return clamp_css_byte(parseInt(str));\n}\n\nfunction parse_css_float(str) { // float or percentage.\n if (str[str.length - 1] === '%')\n return clamp_css_float(parseFloat(str) / 100);\n return clamp_css_float(parseFloat(str));\n}\n\nfunction css_hue_to_rgb(m1, m2, h) {\n if (h < 0) h += 1;\n else if (h > 1) h -= 1;\n\n if (h * 6 < 1) return m1 + (m2 - m1) * h * 6;\n if (h * 2 < 1) return m2;\n if (h * 3 < 2) return m1 + (m2 - m1) * (2/3 - h) * 6;\n return m1;\n}\n\nfunction parseCSSColor(css_str) {\n // Remove all whitespace, not compliant, but should just be more accepting.\n var str = css_str.replace(/ /g, '').toLowerCase();\n\n // Color keywords (and transparent) lookup.\n if (str in kCSSColorTable) return kCSSColorTable[str].slice(); // dup.\n\n // #abc and #abc123 syntax.\n if (str[0] === '#') {\n if (str.length === 4) {\n var iv = parseInt(str.substr(1), 16); // TODO(deanm): Stricter parsing.\n if (!(iv >= 0 && iv <= 0xfff)) return null; // Covers NaN.\n return [((iv & 0xf00) >> 4) | ((iv & 0xf00) >> 8),\n (iv & 0xf0) | ((iv & 0xf0) >> 4),\n (iv & 0xf) | ((iv & 0xf) << 4),\n 1];\n } else if (str.length === 7) {\n var iv = parseInt(str.substr(1), 16); // TODO(deanm): Stricter parsing.\n if (!(iv >= 0 && iv <= 0xffffff)) return null; // Covers NaN.\n return [(iv & 0xff0000) >> 16,\n (iv & 0xff00) >> 8,\n iv & 0xff,\n 1];\n }\n\n return null;\n }\n\n var op = str.indexOf('('), ep = str.indexOf(')');\n if (op !== -1 && ep + 1 === str.length) {\n var fname = str.substr(0, op);\n var params = str.substr(op+1, ep-(op+1)).split(',');\n var alpha = 1; // To allow case fallthrough.\n switch (fname) {\n case 'rgba':\n if (params.length !== 4) return null;\n alpha = parse_css_float(params.pop());\n // Fall through.\n case 'rgb':\n if (params.length !== 3) return null;\n return [parse_css_int(params[0]),\n parse_css_int(params[1]),\n parse_css_int(params[2]),\n alpha];\n case 'hsla':\n if (params.length !== 4) return null;\n alpha = parse_css_float(params.pop());\n // Fall through.\n case 'hsl':\n if (params.length !== 3) return null;\n var h = (((parseFloat(params[0]) % 360) + 360) % 360) / 360; // 0 .. 1\n // NOTE(deanm): According to the CSS spec s/l should only be\n // percentages, but we don't bother and let float or percentage.\n var s = parse_css_float(params[1]);\n var l = parse_css_float(params[2]);\n var m2 = l <= 0.5 ? l * (s + 1) : l + s - l * s;\n var m1 = l * 2 - m2;\n return [clamp_css_byte(css_hue_to_rgb(m1, m2, h+1/3) * 255),\n clamp_css_byte(css_hue_to_rgb(m1, m2, h) * 255),\n clamp_css_byte(css_hue_to_rgb(m1, m2, h-1/3) * 255),\n alpha];\n default:\n return null;\n }\n }\n\n return null;\n}\n\ntry { exports.parseCSSColor = parseCSSColor } catch(e) { }\n","\nconst parseColorString = require('csscolorparser').parseCSSColor;\n\nmodule.exports = function parseColor(input) {\n if (typeof input === 'string') {\n const rgba = parseColorString(input);\n if (!rgba) { return undefined; }\n\n // GL expects all components to be in the range [0, 1] and to be\n // multipled by the alpha value.\n return [\n rgba[0] / 255 * rgba[3],\n rgba[1] / 255 * rgba[3],\n rgba[2] / 255 * rgba[3],\n rgba[3]\n ];\n\n } else if (Array.isArray(input)) {\n return input;\n\n } else {\n return undefined;\n }\n};\n","\n// Constants\nconst Xn = 0.950470, // D65 standard referent\n Yn = 1,\n Zn = 1.088830,\n t0 = 4 / 29,\n t1 = 6 / 29,\n t2 = 3 * t1 * t1,\n t3 = t1 * t1 * t1,\n deg2rad = Math.PI / 180,\n rad2deg = 180 / Math.PI;\n\n// Utilities\nfunction xyz2lab(t) {\n return t > t3 ? Math.pow(t, 1 / 3) : t / t2 + t0;\n}\n\nfunction lab2xyz(t) {\n return t > t1 ? t * t * t : t2 * (t - t0);\n}\n\nfunction xyz2rgb(x) {\n return 255 * (x <= 0.0031308 ? 12.92 * x : 1.055 * Math.pow(x, 1 / 2.4) - 0.055);\n}\n\nfunction rgb2xyz(x) {\n x /= 255;\n return x <= 0.04045 ? x / 12.92 : Math.pow((x + 0.055) / 1.055, 2.4);\n}\n\n// LAB\nfunction rgbToLab(rgbColor) {\n const b = rgb2xyz(rgbColor[0]),\n a = rgb2xyz(rgbColor[1]),\n l = rgb2xyz(rgbColor[2]),\n x = xyz2lab((0.4124564 * b + 0.3575761 * a + 0.1804375 * l) / Xn),\n y = xyz2lab((0.2126729 * b + 0.7151522 * a + 0.0721750 * l) / Yn),\n z = xyz2lab((0.0193339 * b + 0.1191920 * a + 0.9503041 * l) / Zn);\n\n return [\n 116 * y - 16,\n 500 * (x - y),\n 200 * (y - z),\n rgbColor[3]\n ];\n}\n\nfunction labToRgb(labColor) {\n let y = (labColor[0] + 16) / 116,\n x = isNaN(labColor[1]) ? y : y + labColor[1] / 500,\n z = isNaN(labColor[2]) ? y : y - labColor[2] / 200;\n y = Yn * lab2xyz(y);\n x = Xn * lab2xyz(x);\n z = Zn * lab2xyz(z);\n return [\n xyz2rgb(3.2404542 * x - 1.5371385 * y - 0.4985314 * z), // D65 -> sRGB\n xyz2rgb(-0.9692660 * x + 1.8760108 * y + 0.0415560 * z),\n xyz2rgb(0.0556434 * x - 0.2040259 * y + 1.0572252 * z),\n labColor[3]\n ];\n}\n\n// HCL\nfunction rgbToHcl(rgbColor) {\n const labColor = rgbToLab(rgbColor);\n const l = labColor[0],\n a = labColor[1],\n b = labColor[2];\n const h = Math.atan2(b, a) * rad2deg;\n return [\n h < 0 ? h + 360 : h,\n Math.sqrt(a * a + b * b),\n l,\n rgbColor[3]\n ];\n}\n\nfunction hclToRgb(hclColor) {\n const h = hclColor[0] * deg2rad,\n c = hclColor[1],\n l = hclColor[2];\n return labToRgb([\n l,\n Math.cos(h) * c,\n Math.sin(h) * c,\n hclColor[3]\n ]);\n}\n\nmodule.exports = {\n lab: {\n forward: rgbToLab,\n reverse: labToRgb\n },\n hcl: {\n forward: rgbToHcl,\n reverse: hclToRgb\n }\n};\n","/*\nol-mapbox-style - Use Mapbox Style objects with OpenLayers\nCopyright 2016-present Boundless Spatial, Inc.\nLicense: https://raw.githubusercontent.com/boundlessgeo/ol-mapbox-gl-style/master/LICENSE\n*/\n\nimport glfun from '@mapbox/mapbox-gl-style-spec/function';\nimport mb2css from 'mapbox-to-css-font';\nimport applyStyleFunction from './stylefunction';\nimport googleFonts from 'webfont-matcher/lib/fonts/google';\nimport proj from 'ol/proj';\nimport tilegrid from 'ol/tilegrid';\nimport CanvasMap from 'ol/canvasmap';\nimport GeoJSON from 'ol/format/geojson';\nimport MVT from 'ol/format/mvt';\nimport observable from 'ol/observable';\nimport TileLayer from 'ol/layer/tile';\nimport VectorLayer from 'ol/layer/vector';\nimport VectorTileLayer from 'ol/layer/vectortile';\nimport TileJSON from 'ol/source/tilejson';\nimport VectorSource from 'ol/source/vector';\nimport VectorTileSource from 'ol/source/vectortile';\nimport XYZ from 'ol/source/xyz';\n\nvar availableFonts;\n\nfunction loadFont(fonts) {\n var i, ii;\n if (!Array.isArray(fonts)) {\n var stops = fonts.stops;\n if (stops) {\n for (i = 0, ii = stops.length; i < ii; ++i) {\n loadFont(stops[i][1]);\n }\n }\n return;\n }\n var googleFamilies = googleFonts.getNames();\n var families = fonts.map(function(font) {\n return mb2css(font, 1).split(' 1px ')[1].replace(/\"/g, '');\n });\n for (i = 0, ii = families.length; i < ii; ++i) {\n var family = families[i];\n var font = fonts[i];\n if (googleFamilies.indexOf(family) !== -1) {\n if (!availableFonts) {\n availableFonts = [];\n }\n if (availableFonts.indexOf(font) == -1) {\n availableFonts.push(font);\n var fontUrl = 'https://fonts.googleapis.com/css?family=' + family.replace(/ /g, '+');\n if (!document.querySelector('link[href=\"' + fontUrl + '\"]')) {\n var markup = document.createElement('link');\n markup.href = fontUrl;\n markup.rel = 'stylesheet';\n document.getElementsByTagName('head')[0].appendChild(markup);\n }\n }\n break;\n }\n }\n}\n\nvar defaultFont = ['Open Sans Regular', 'Arial Regular'];\n\nfunction preprocess(layer) {\n if ('layout' in layer && 'text-field' in layer.layout) {\n loadFont(layer.layout['text-font'] || defaultFont);\n }\n}\n\nvar spriteRegEx = /^(.*)(\\?.*)$/;\n\nfunction withPath(url, path) {\n if (path && url.indexOf('http') != 0) {\n url = path + url;\n }\n return url;\n}\n\nfunction toSpriteUrl(url, path, extension) {\n url = withPath(url, path);\n var parts = url.match(spriteRegEx);\n return parts ?\n parts[1] + extension + (parts.length > 2 ? parts[2] : '') :\n url + extension;\n}\n\n/**\n * Applies a style function to an `ol.layer.VectorTile` or `ol.layer.Vector`\n * with an `ol.source.VectorTile` or an `ol.source.Vector`. The style function\n * will render all layers from the `glStyle` object that use the specified\n * `source`, or a subset of layers from the same source. The source needs to be\n * a `\"type\": \"vector\"`, `\"type\": \"geojson\"` or `\"type\": \"raster\"` source.\n *\n * @param {ol.layer.VectorTile} layer OpenLayers layer.\n * @param {string|Object} glStyle Mapbox Style object.\n * @param {string} source `source` key or an array of layer `id`s from the\n * Mapbox Style object. When a `source` key is provided, all layers for the\n * specified source will be included in the style function. When layer `id`s\n * are provided, they must be from layers that use the same source.\n * @param {string} [path=undefined] Path of the style file. Only required when\n * a relative path is used with the `\"sprite\"` property of the style.\n * @return {Promise} Promise which will be resolved when the style can be used\n * for rendering.\n */\nexport function applyStyle(layer, glStyle, source, path) {\n return new Promise(function(resolve, reject) {\n\n if (typeof glStyle != 'object') {\n glStyle = JSON.parse(glStyle);\n }\n if (glStyle.version != 8) {\n reject(new Error('glStyle version 8 required.'));\n }\n var spriteScale, spriteData, spriteImageUrl;\n if (glStyle.sprite) {\n spriteScale = window.devicePixelRatio >= 1.5 ? 0.5 : 1;\n var sizeFactor = spriteScale == 0.5 ? '@2x' : '';\n var spriteUrl = toSpriteUrl(glStyle.sprite, path, sizeFactor + '.json');\n\n fetch(spriteUrl, {credentials: 'same-origin'})\n .then(function(response) {\n // if the response is ready return the JSON promise\n if (response.status === 200) {\n return response.json();\n } else if (sizeFactor !== '') {\n // return the JSON promise for the low-resolution sprites.\n sizeFactor = '';\n spriteUrl = toSpriteUrl(glStyle.sprite, path, '.json');\n return fetch(spriteUrl, {credentials: 'same-origin'}).then(r => r.json());\n }\n })\n .then(function(spritesJson) {\n if (spritesJson === undefined) {\n throw 'No sprites found.';\n }\n spriteData = spritesJson;\n spriteImageUrl = toSpriteUrl(glStyle.sprite, path, sizeFactor + '.png');\n onChange();\n })\n .catch(function(err) {\n console.error(err);\n reject(new Error('Sprites cannot be loaded from ' + spriteUrl));\n });\n }\n\n var style;\n function onChange() {\n if (!style && (!glStyle.sprite || spriteData) && (!availableFonts || availableFonts.length > 0)) {\n style = applyStyleFunction(layer, glStyle, source, undefined, spriteData, spriteImageUrl, availableFonts);\n resolve();\n } else if (style) {\n layer.setStyle(style);\n }\n }\n\n if (layer instanceof VectorTileLayer || layer instanceof VectorLayer) {\n try {\n var layers = glStyle.layers;\n for (var i = 0, ii = layers.length; i < ii; ++i) {\n if (typeof source == 'string' && layers[i].source == source || source.indexOf(layers[i].id) >= 0) {\n preprocess(layers[i]);\n }\n }\n onChange();\n } catch (e) {\n window.setTimeout(function() {\n reject(e);\n }, 0);\n }\n }\n });\n}\n\nfunction setBackground(map, layer) {\n function updateStyle() {\n var element = map.getTargetElement();\n if (!element) {\n return;\n }\n var layout = layer.layout || {};\n var paint = layer.paint || {};\n var zoom = map.getView().getZoom();\n if ('background-color' in paint) {\n var bg = glfun(paint['background-color'], {function: 'interpolated', type: 'color'})(zoom);\n if (Array.isArray(bg)) {\n bg = 'rgba(' +\n Math.round(bg[0] * 255) + ',' +\n Math.round(bg[1] * 255) + ',' +\n Math.round(bg[2] * 255) + ',' +\n (bg[3] ? bg[3] : 1) + ')';\n }\n element.style.backgroundColor = bg;\n }\n if ('background-opacity' in paint) {\n element.style.backgroundOpacity =\n glfun(paint['background-opacity'], {function: 'interpolated', type: 'number'})(zoom);\n }\n if (layout.visibility == 'none') {\n element.style.backgroundColor = '';\n element.style.backgroundOpacity = '';\n }\n }\n if (map.getTargetElement()) {\n updateStyle();\n }\n map.on(['change:resolution', 'change:target'], updateStyle);\n}\n\n/**\n * Applies properties of the Mapbox Style's first `background` layer to the map.\n * @param {ol.Map} map OpenLayers Map.\n * @param {Object} glStyle Mapbox Style object.\n */\nexport function applyBackground(map, glStyle) {\n glStyle.layers.some(function(l) {\n if (l.type == 'background') {\n setBackground(map, l);\n return true;\n }\n });\n}\n\nfunction getSourceIdByRef(layers, ref) {\n var sourceId;\n layers.some(function(layer) {\n if (layer.id == ref) {\n sourceId = layer.source;\n return true;\n }\n });\n return sourceId;\n}\n\nfunction processStyle(glStyle, map, baseUrl, host, path, accessToken) {\n var view = map.getView();\n if ('center' in glStyle && !view.getCenter()) {\n view.setCenter(proj.fromLonLat(glStyle.center));\n }\n if ('zoom' in glStyle && view.getZoom() === undefined) {\n view.setZoom(glStyle.zoom);\n }\n if (!view.getCenter() || view.getZoom() === undefined) {\n view.fit(view.getProjection().getExtent(), {\n nearest: true,\n size: map.getSize()\n });\n }\n if (glStyle.sprite) {\n if (glStyle.sprite.indexOf('mapbox://') == 0) {\n glStyle.sprite = baseUrl + '/sprite' + accessToken;\n } else if (glStyle.sprite.indexOf('http') != 0) {\n glStyle.sprite = (host ? (host + path) : '') + glStyle.sprite + accessToken;\n }\n }\n\n var glLayers = glStyle.layers;\n var geoJsonFormat = new GeoJSON();\n var layerIds = [];\n\n function finalizeLayer(layer) {\n if (layerIds.length > 0) {\n map.addLayer(layer);\n var setStyle = function() {\n applyStyle(layer, glStyle, layerIds, path).then(function() {\n layer.setVisible(true);\n }, function(e) {\n /*eslint no-console: [\"error\", { allow: [\"error\"] }] */\n console.error(e);\n });\n };\n if (layer.getSource()) {\n setStyle();\n } else {\n layer.once('change:source', setStyle);\n }\n }\n }\n\n var glLayer, glSource, glSourceId, id, layer, mapid, url;\n for (var i = 0, ii = glLayers.length; i < ii; ++i) {\n glLayer = glLayers[i];\n if (glLayer.type == 'background') {\n setBackground(map, glLayer);\n } else {\n id = glLayer.source || getSourceIdByRef(glLayers, glLayer.ref);\n if (id != glSourceId) {\n finalizeLayer(layer);\n layerIds = [];\n glSource = glStyle.sources[id];\n url = glSource.url;\n var tiles = glSource.tiles;\n if (url) {\n if (url.indexOf('mapbox://') == 0) {\n mapid = url.replace('mapbox://', '');\n tiles = ['a', 'b', 'c', 'd'].map(function(host) {\n return 'https://' + host + '.tiles.mapbox.com/v4/' + mapid +\n '/{z}/{x}/{y}.' +\n (glSource.type == 'vector' ? 'vector.pbf' : 'png') +\n accessToken;\n });\n }\n }\n\n if (glSource.type == 'vector') {\n layer = tiles ? (function() {\n var tileGrid = tilegrid.createXYZ({\n tileSize: 512,\n maxZoom: 'maxzoom' in glSource ? glSource.maxzoom : 22,\n minZoom: glSource.minzoom\n });\n return new VectorTileLayer({\n declutter: true,\n maxResolution: tileGrid.getMinZoom() > 0 ?\n tileGrid.getResolution(tileGrid.getMinZoom()) : undefined,\n source: new VectorTileSource({\n attributions: glSource.attribution,\n format: new MVT(),\n tileGrid: tileGrid,\n urls: tiles\n }),\n visible: false,\n zIndex: i\n });\n })() : (function() {\n var layer = new VectorTileLayer({\n declutter: true,\n visible: false,\n zIndex: i\n });\n var tilejson = new TileJSON({\n url: url\n });\n var key = tilejson.on('change', function() {\n if (tilejson.getState() == 'ready') {\n var tileJSONDoc = tilejson.getTileJSON();\n var tiles = Array.isArray(tileJSONDoc.tiles) ? tileJSONDoc.tiles : [tileJSONDoc.tiles];\n for (var i = 0, ii = tiles.length; i < ii; ++i) {\n var tile = tiles[i];\n if (tile.indexOf('http') != 0) {\n tiles[i] = glSource.url + tile;\n }\n }\n var tileGrid = tilejson.getTileGrid();\n layer.setSource(new VectorTileSource({\n attributions: tilejson.getAttributions() || tileJSONDoc.attribution,\n format: new MVT(),\n tileGrid: tilegrid.createXYZ({\n minZoom: tileGrid.getMinZoom(),\n maxZoom: tileGrid.getMaxZoom(),\n tileSize: 512\n }),\n urls: tiles\n }));\n if (tileGrid.getMinZoom() > 0) {\n layer.setMaxResolution(\n tileGrid.getResolution(tileGrid.getMinZoom()));\n }\n observable.unByKey(key);\n }\n });\n return layer;\n })();\n } else if (glSource.type == 'raster') {\n var source;\n if (!glSource.tiles) {\n source = (function() {\n return new TileJSON({\n url: url,\n crossOrigin: 'anonymous'\n });\n })();\n } else {\n source = new XYZ({\n attributions: glSource.attribution,\n minZoom: glSource.minzoom,\n maxZoom: 'maxzoom' in glSource ? glSource.maxzoom : 22,\n tileSize: glSource.tileSize || 512,\n url: url,\n urls: glSource.tiles,\n crossOrigin: 'anonymous'\n });\n }\n source.setTileLoadFunction(function(tile, src) {\n if (src.indexOf('{bbox-epsg-3857}') != -1) {\n var bbox = source.getTileGrid().getTileCoordExtent(tile.getTileCoord());\n src = src.replace('{bbox-epsg-3857}', bbox.toString());\n }\n tile.getImage().src = src;\n });\n layer = new TileLayer({\n source: source,\n visible: glLayer.layout ? glLayer.layout.visibility !== 'none' : true\n });\n } else if (glSource.type == 'geojson') {\n var data = glSource.data;\n var features, geoJsonUrl;\n if (typeof data == 'string') {\n geoJsonUrl = withPath(data, path);\n } else {\n features = geoJsonFormat.readFeatures(data, {featureProjection: 'EPSG:3857'});\n }\n layer = new VectorLayer({\n source: new VectorSource({\n attributions: glSource.attribution,\n features: features,\n format: geoJsonFormat,\n url: geoJsonUrl\n }),\n visible: false,\n zIndex: i\n });\n }\n glSourceId = id;\n }\n layerIds.push(glLayer.id);\n }\n }\n finalizeLayer(layer);\n}\n\n/**\n * Loads and applies a Mapbox Style object to an OpenLayers Map. This includes\n * the map background, the layers, the center and the zoom.\n *\n * The center and zoom will only be set if present in the Mapbox Style document,\n * and if not already set on the OpenLayers map.\n *\n * Layers will be added to the OpenLayers map, without affecting any layers that\n * might already be set on the map.\n *\n * Layers added by `apply()` will have two additional properties:\n *\n * * `mapbox-source`: The `id` of the Mapbox Style document's source that the\n * OpenLayers layer was created from. Usually `apply()` creates one\n * OpenLayers layer per Mapbox Style source, unless the layer stack has\n * layers from different sources in between.\n * * `mapbox-layers`: The `id`s of the Mapbox Style document's layers that are\n * included in the OpenLayers layer.\n *\n * @param {ol.Map|HTMLElement|string} map Either an existing OpenLayers Map\n * instance, or a HTML element, or the id of a HTML element that will be the\n * target of a new OpenLayers Map.\n * @param {string|Object} style JSON style object or style url pointing to a\n * Mapbox Style object. When using Mapbox APIs, the url must contain an access\n * token and look like\n * `https://api.mapbox.com/styles/v1/mapbox/bright-v9?access_token=[your_access_token_here]`.\n * When passed as JSON style object, all OpenLayers layers created by `apply()`\n * will be immediately available, but they may not have a source yet (i.e. when\n * they are defined by a TileJSON url in the Mapbox Style document). When passed\n * as style url, layers will be added to the map when the Mapbox Style document\n * is loaded and parsed.\n * @return {ol.Map} The OpenLayers Map instance that will be populated with the\n * contents described in the Mapbox Style object.\n */\nexport function apply(map, style) {\n\n var accessToken, baseUrl, host, path;\n accessToken = baseUrl = host = path = '';\n\n if (!(map instanceof CanvasMap)) {\n map = new CanvasMap({\n target: map\n });\n }\n\n if (typeof style === 'string') {\n var parts = style.match(spriteRegEx);\n if (parts) {\n baseUrl = parts[1];\n accessToken = parts.length > 2 ? parts[2] : '';\n }\n\n fetch(style, {\n credentials: 'same-origin'\n })\n .then(function(response) {\n return response.json();\n })\n .then(function(glStyle) {\n var a = document.createElement('A');\n a.href = style;\n path = a.pathname.split('/').slice(0, -1).join('/') + '/';\n host = style.substr(0, style.indexOf(path));\n\n processStyle(glStyle, map, baseUrl, host, path, accessToken);\n })\n .catch(function(err) {\n console.error(err);\n throw new Error('Could not load ' + style);\n });\n } else {\n processStyle(style, map);\n }\n return map;\n}\n","import {apply, applyBackground, applyStyle} from './index';\nimport stylefunction from './stylefunction';\n\nexport default {\n apply: apply,\n applyBackground: applyBackground,\n applyStyle: applyStyle,\n stylefunction: stylefunction\n};\n"],"sourceRoot":""}